{"version":3,"sources":["webpack://angularjs-nouislider/webpack/universalModuleDefinition","webpack://angularjs-nouislider/webpack/bootstrap","webpack://angularjs-nouislider/external \"angular\"","webpack://angularjs-nouislider/external {\"commonjs\":\"nouislider\",\"commonjs2\":\"nouislider\",\"amd\":\"nouislider\",\"root\":\"noUiSlider\"}","webpack://angularjs-nouislider/./src/module.js","webpack://angularjs-nouislider/./src/directive.js","webpack://angularjs-nouislider/./src/index.js"],"names":["root","factory","exports","module","require","define","amd","window","__WEBPACK_EXTERNAL_MODULE__0__","__WEBPACK_EXTERNAL_MODULE__1__","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","angular","directive","$timeout","$q","$log","restrict","scope","created","options","link","element","attrs","ngModel","htmlElement","copy","createInstance","api","$on","eventName","callback","wrappedCallback","on","off","extendApi","noUiSlider","$watch","newCallback","isFunction","setCreatedWatcher","newOptions","oldOptions","equals","updateOptions","setOptionsWatcher","$render","set","$modelValue","positions","$setViewValue","bindNgModelControls","resolve","isArray","isNumber","Error","then","start","error","moduleName"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,WAAYA,QAAQ,eAC5B,mBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,uBAAwB,CAAC,UAAW,cAAeJ,GAChC,iBAAZC,QACdA,QAAQ,wBAA0BD,EAAQG,QAAQ,WAAYA,QAAQ,eAEtEJ,EAAK,wBAA0BC,EAAQD,EAAc,QAAGA,EAAiB,YAR3E,CASGO,QAAQ,SAASC,EAAgCC,GACpD,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUV,QAGnC,IAAIC,EAASO,EAAiBE,GAAY,CACzCC,EAAG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QwB,eAAgBpC,IAAQ0C,SAAS9B,EAAQwB,aACrE,MAAM,IAAIO,MAAJ,+HAAmI/B,EAAQwB,cAGnJI,EAAQ5B,EAAQwB,oBAqBnBQ,MAAK,SAACR,GACe,OAAhBA,IAEF5B,EAAQqC,MAAQT,GAIlBrB,OARJ,MAUSX,EAAK0C,YC9IHC,UFDW","file":"angularjs-nouislider.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"angular\"), require(\"nouislider\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"angularjs-nouislider\", [\"angular\", \"nouislider\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"angularjs-nouislider\"] = factory(require(\"angular\"), require(\"nouislider\"));\n\telse\n\t\troot[\"angularjs-nouislider\"] = factory(root[\"angular\"], root[\"noUiSlider\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE__0__, __WEBPACK_EXTERNAL_MODULE__1__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 2);\n","module.exports = __WEBPACK_EXTERNAL_MODULE__0__;","module.exports = __WEBPACK_EXTERNAL_MODULE__1__;","import angular from 'angular';\n\nexport const moduleName = 'noUiSlider';\nexport const module = angular.module(moduleName, []);\n","import angular from 'angular';\nimport noUiSlider from 'nouislider';\nimport { module } from './module';\n\nmodule.directive('noUiSlider', ($timeout, $q, $log) => ({\n restrict: 'AE',\n require: '?ngModel',\n scope: {\n created: '&?sliderCreated',\n options: '=?sliderOptions',\n },\n link: (scope, element, attrs, ngModel) => {\n const htmlElement = element[0];\n let options = angular.copy(scope.options);\n\n /**\n * Extends the API returned by noUiSlider with the `$on` function which wraps the `on` function\n * to use Angular.\n *\n * @param {Object} api The API instance returned by the `noUiSlider.create()` method\n * @return {Object} The API instance with the added `$on` function\n */\n function extendApi(api) {\n api.$on = (eventName, callback) => {\n const wrappedCallback = () => {\n $timeout(() => {\n callback(api.get());\n });\n };\n\n api.on(eventName, wrappedCallback);\n\n return () => {\n api.off(eventName, wrappedCallback);\n };\n };\n\n return api;\n }\n\n /**\n * Creates a watcher that calls the function given by the `slider-created` directive attribute.\n * The watcher fires every time the `slider-created` function changes.\n *\n * @param {Object} api The API instance returned by the `noUiSlider.create()` method\n */\n function setCreatedWatcher(api) {\n scope.$watch('created', (newCallback) => {\n if (!angular.isFunction(newCallback)) {\n return;\n }\n\n newCallback({ api });\n });\n }\n\n /**\n * Creates a watcher that looks for changes in the `slider-options` directive attribute. When a\n * change is detected the options for the noUiSlider instance are updated. Note that only the\n * 'margin', 'limit', 'step', 'range', 'animate' and 'snap' options can be updated this way (as\n * documented in https://refreshless.com/nouislider/more/#section-update). All other option\n * updates require you to destroy the current instance and create a new one.\n *\n * @param {Object} api The API instance returned by the `noUiSlider.create()` method\n */\n function setOptionsWatcher(api) {\n scope.$watch('options', (newOptions, oldOptions) => {\n if (angular.equals(newOptions, oldOptions)) {\n return;\n }\n\n options = angular.copy(scope.options);\n\n api.updateOptions(options);\n });\n }\n\n /**\n * Add ngModel controls to the directive. This allows the use of ngModel to set and get the\n * value in the slider. It uses the noUiSlider API's get and set functions, so no custom\n * formatters need to be defined for ngModel. The ngModelOptions can be used.\n *\n * @param {Object} api The API instance returned by the `noUiSlider.create()` method\n */\n function bindNgModelControls(api) {\n ngModel.$render = () => {\n api.set(ngModel.$modelValue);\n };\n\n api.on('update', () => {\n const positions = api.get();\n ngModel.$setViewValue(positions);\n });\n }\n\n /**\n * A utility function that returns a promise which resolves when ngModel is correctly loaded,\n * using $timeout.\n *\n * @return {Promise} Returns a promise that resolves with `null` when ngModel is null and thus\n * not in use. If the value entered for ngModel is not an array or number, an error is thrown\n * and thus the promise rejects. If the value entered for ngModel is correct, the promise\n * resolves with this value.\n */\n function initializeNgModel() {\n if (ngModel === null) {\n return $q.resolve(null);\n }\n\n return $q((resolve) => {\n $timeout(() => {\n if (!(angular.isArray(ngModel.$modelValue) || angular.isNumber(ngModel.$modelValue))) {\n throw new Error(`Value provided in ngModel is not a valid noUislider start position. Expected a Number or an Array of Numbers, found: ${ ngModel.$modelValue }`);\n }\n\n resolve(ngModel.$modelValue);\n });\n });\n }\n\n /**\n * Creates a noUiSlider instance.\n */\n function createInstance() {\n const api = extendApi(noUiSlider.create(htmlElement, options));\n\n setCreatedWatcher(api);\n setOptionsWatcher(api);\n\n if (ngModel !== null) {\n bindNgModelControls(api);\n }\n }\n\n // Wait for ngModel to be initialized\n initializeNgModel()\n .then(($modelValue) => {\n if ($modelValue !== null) {\n // If ngModel is being used, (over)write the start option for the noUiSlider options\n options.start = $modelValue;\n }\n\n // Create a noUiSlider instance\n createInstance();\n })\n .catch($log.error);\n },\n}));\n","import { moduleName } from './module';\nimport './directive';\n\nexport default moduleName;\n"],"sourceRoot":""}