{"version":3,"sources":["webpack:///app.21ab7e84ea89f8703bf9.js","webpack:///webpack/bootstrap 21ab7e84ea89f8703bf9","webpack:///./javascript/app.js","webpack:///./javascript/theme.js","webpack:///./javascript/forms.js","webpack:///./javascript/filters.js","webpack:///./javascript/popup.js","webpack:///./javascript/sticky.js","webpack:////Users/ceesvanegmond/Sites/sonata-theme-bundle/node_modules/@wearejust/sticky/dist/sticky.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","$","document","on","e","data","append","replace","result","this","next","click","focus","each","index","item","url","attr","closest","hasClass","target","is","ctrlKey","metaKey","which","window","open","location","_classCallCheck","instance","Constructor","TypeError","elements","length","html","imageRemove","dialog","checkbox","find","change","bind","cancel","toggleClass","preventDefault","appendTo","Dropdown","css","toggle","stop","slideToggle","magnificPopup","type","closeBtnInside","mainClass","resizeDelayed","clearTimeout","timeout","setTimeout","resize","$window","width","MIN_WIDTH","cloneShown","clone","show","hide","element","offset","left","addClass","sticky","active","topHeightOffset","options","Sticky","fn","id","extend","scroll","top","outerHeight","scrollTop","removeClass"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,G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AG,GACA,MAAAxE,GAAAQ,MAAAI,KAAA,SAAAC,EAAAC,GACArC,EAAAD,QAAAwB,EAAAc,GAAA0D,KAIA,IAAAC,GAAA,WACA,QAAAA,GAAAR,EAAAO,GACA7C,EAAAnB,KAAAiE,GAEAjE,KAAAyD,UAEAzD,KAAAmE,GAAAnE,KAAAyD,QAAAjD,KAAA,sBACAR,KAAAmE,KAEAnE,KAAAW,OAAAnB,EAAA,oBAAAQ,KAAAmE,GAAA,MACAnE,KAAAW,OAAAa,SAEAxB,KAAAgE,QAAAxE,EAAA4E,QACAN,OAAA,YACAC,gBAAA,GACSC,GAEThE,KAAA8D,OAAA9D,KAAAyD,QAAA/C,SAAAV,KAAAgE,QAAAF,QAEAZ,EAAAxD,GAAA,SAAAM,KAAAiD,OAAAlB,KAAA/B,OACAkD,EAAAxD,GAAA,SAAAM,KAAAqE,OAAAtC,KAAA/B,OACAA,KAAAiD,WAuBA,MApBAgB,GAAA7E,UAAA6D,OAAA,WACAjD,KAAAsE,IAAAtE,KAAAW,OAAA+C,SAAAY,IACAtE,KAAAgE,QAAAD,kBACA/D,KAAAsE,KAAAtE,KAAAW,OAAA4D,cAAAvE,KAAAgE,QAAAD,iBAEA/D,KAAAqE,UAGAJ,EAAA7E,UAAAiF,OAAA,WACAnB,EAAAsB,aAAAxE,KAAAsE,IACAtE,KAAA8D,SACA9D,KAAA8D,QAAA,EACA9D,KAAAyD,QAAAG,SAAA5D,KAAAgE,QAAAF,SAES9D,KAAA8D,SACT9D,KAAA8D,QAAA,EACA9D,KAAAyD,QAAAgB,YAAAzE,KAAAgE,QAAAF,UAIAG,MR4SM,SAAUhG,EAAQD","file":"app.21ab7e84ea89f8703bf9.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \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, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\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 = \"/bundles/wearejustsonatatheme/build/\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(1);\nmodule.exports = __webpack_require__(8);\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n__webpack_require__(2);\n__webpack_require__(3);\n__webpack_require__(4);\n__webpack_require__(5);\n__webpack_require__(6);\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n$(function () {\n\n var msg = '
%s
';\n var msgAlt = '
%s
';\n\n $(document).on('pixSortableBehaviorBundle.success', function (e, data) {\n $('body').append(msg.replace('%s', data.result));\n });\n\n $(document).on('pixSortableBehaviorBundle.error', function (e, data) {\n $('body').append(msgAlt.replace('%s', data.result));\n });\n\n // Trigger calendar on input click\n // without changing existing HTML\n $('.date input').on('click', function () {\n $(this).next('span').click();\n });\n\n $('#username').focus();\n\n $('.box-body table tr:not(.sonata-ba-list-field-header) a.edit_link').each(function (index, item) {\n item = $(item);\n var url = item.attr('href');\n var el = item.closest('tr');\n\n el.on('mouseup touchend', function (e) {\n if ($('body').hasClass('is-dragging')) return;\n\n if (!$(e.target).is('input, a, button, .js-sortable-move')) {\n if (e.ctrlKey || e.metaKey || e.which == 2) {\n window.open(url);\n } else if (e.which != 3) {\n window.location = url;\n }\n }\n });\n });\n});\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n$(function () {\n var elements = $('.vich-image, .vich-file, .cropper');\n if (!elements.length) return;\n\n $.get('/wearejust/sonata_theme/delete_dialog', function (html) {\n elements.each(function (index, item) {\n new imageRemove($(item), html);\n });\n });\n});\n\nvar imageRemove = function () {\n function imageRemove(item, html) {\n _classCallCheck(this, imageRemove);\n\n this.item = item;\n this.dialog = $(html);\n this.checkbox = this.item.find('input[type=\"checkbox\"]');\n this.item.append(this.dialog);\n this.checkbox.on('change', this.change.bind(this));\n this.item.find('.js-delete-cancel').on('click', this.cancel.bind(this));\n }\n\n imageRemove.prototype.change = function change() {\n this.item.find('input, img, .checkbox, .cropper-local').toggleClass('accessibility');\n this.dialog.toggleClass('is-active');\n };\n\n imageRemove.prototype.cancel = function cancel(e) {\n e.preventDefault();\n this.change();\n this.checkbox.attr('checked', false);\n };\n\n return imageRemove;\n}();\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n$(function () {\n $('.navbar-header').append('
');\n $('.sonata-filter-form').appendTo('.filter-box');\n $('.dropdown.sonata-actions').each(function (index, item) {\n item = $(item);\n if (!item.find('.sonata-ba-action').length) return;\n if (!item.data('Dropdown')) {\n item.data('Dropdown', new Dropdown(item));\n }\n });\n});\n\nvar Dropdown = function () {\n function Dropdown(item, html) {\n _classCallCheck(this, Dropdown);\n\n this.item = item;\n this.item.find('ul').css('display', 'none');\n this.item.on('click', this.toggle.bind(this));\n }\n\n Dropdown.prototype.toggle = function toggle() {\n $('.filter-box').stop().slideToggle();\n };\n\n return Dropdown;\n}();\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n$(function () {\n\t$('.delete_link, .sonata-ba-form-actions .btn-danger').magnificPopup({\n\t\ttype: 'ajax',\n\t\tcloseBtnInside: true,\n\t\tmainClass: 'mfp-fade'\n\t});\n});\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n__webpack_require__(7);\n\nvar MIN_WIDTH = 940;\nvar $window = $(window);\n\nvar clone = void 0;\nvar element = void 0;\nvar timeout = void 0;\nvar cloneShown = void 0;\n\n$(function () {\n\telement = $('.add_records');\n\tif (!element.length) return;\n\n\telement.attr('data-sticky-id', 'sticky_add_btn');\n\n\tclone = element.clone(true);\n\tclone.addClass('is-clone');\n\tclone.attr('data-sticky-target', 'sticky_add_btn');\n\tclone.hide();\n\tclone.appendTo('.navbar-collapse');\n\tclone.sticky({\n\t\tactive: 'is-sticky',\n\t\ttopHeightOffset: -1\n\t});\n\n\t$window.on('resize', resizeDelayed);\n\tresize();\n});\n\nfunction resizeDelayed() {\n\tclearTimeout(timeout);\n\ttimeout = setTimeout(resize, 300);\n}\n\nfunction resize() {\n\tif ($window.width() >= MIN_WIDTH) {\n\t\tif (!cloneShown) {\n\t\t\tcloneShown = true;\n\t\t\tclone.show();\n\t\t}\n\t} else if (cloneShown) {\n\t\tcloneShown = false;\n\t\tclone.hide();\n\t\tclone.css('left', '');\n\t}\n\n\tif (cloneShown) {\n\t\tclone.css('left', element.offset().left);\n\t}\n}\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/** \n* @wearejust/sticky \n* Add/remove classes to sticky elements \n* \n* @version 1.0.0 \n* @author Emre Koc \n*/\n\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar $window = $(window);\n\nmodule.exports = function (element, options) {\n if (!element.data('Sticky')) {\n element.data('Sticky', new Sticky(element, options));\n }\n};\n\n$.fn.sticky = function (options) {\n return $(this).each(function (index, item) {\n module.exports($(item), options);\n });\n};\n\nvar Sticky = function () {\n function Sticky(element, options) {\n _classCallCheck(this, Sticky);\n\n this.element = element;\n\n this.id = this.element.attr('data-sticky-target');\n if (!this.id) return;\n\n this.target = $('[data-sticky-id=\"' + this.id + '\"]');\n if (!this.target.length) return;\n\n this.options = $.extend({\n active: 'is-active',\n topHeightOffset: 0\n }, options);\n\n this.active = this.element.hasClass(this.options.active);\n\n $window.on('resize', this.resize.bind(this));\n $window.on('scroll', this.scroll.bind(this));\n this.resize();\n }\n\n Sticky.prototype.resize = function resize() {\n this.top = this.target.offset().top;\n if (this.options.topHeightOffset) {\n this.top += this.target.outerHeight() * this.options.topHeightOffset;\n }\n this.scroll();\n };\n\n Sticky.prototype.scroll = function scroll() {\n if ($window.scrollTop() >= this.top) {\n if (!this.active) {\n this.active = true;\n this.element.addClass(this.options.active);\n }\n } else if (this.active) {\n this.active = false;\n this.element.removeClass(this.options.active);\n }\n };\n\n return Sticky;\n}();\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// app.21ab7e84ea89f8703bf9.js"," \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, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\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 = \"/bundles/wearejustsonatatheme/build/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 21ab7e84ea89f8703bf9","require('./theme.js');\nrequire('./forms.js');\nrequire('./filters.js');\nrequire('./popup.js');\nrequire('./sticky.js');\n\n\n// WEBPACK FOOTER //\n// ./javascript/app.js","$(function(){\n\n let msg = '
%s
';\n let msgAlt = '
%s
'\n\n $(document).on('pixSortableBehaviorBundle.success', (e, data) => {\n $('body').append(\n msg.replace('%s', data.result)\n );\n });\n\n $(document).on('pixSortableBehaviorBundle.error', (e, data) => {\n $('body').append(\n msgAlt.replace('%s', data.result)\n );\n });\n\n // Trigger calendar on input click\n // without changing existing HTML\n $('.date input').on('click', function(){\n $(this).next('span').click();\n });\n\n $('#username').focus();\n\n $('.box-body table tr:not(.sonata-ba-list-field-header) a.edit_link').each(function(index, item){\n item = $(item);\n let url = item.attr('href');\n let el = item.closest('tr');\n\n el.on('mouseup touchend', function(e){\n if ($('body').hasClass('is-dragging')) return;\n\n if (!$(e.target).is('input, a, button, .js-sortable-move')) {\n if (e.ctrlKey || e.metaKey || e.which == 2) {\n window.open(url);\n } else if (e.which != 3) {\n window.location = url;\n }\n }\n })\n\n });\n});\n\n\n// WEBPACK FOOTER //\n// ./javascript/theme.js","$(function(){\n let elements = $('.vich-image, .vich-file, .cropper');\n if(!elements.length) return;\n\n $.get('/wearejust/sonata_theme/delete_dialog', (html) => {\n elements.each(function(index,item){\n new imageRemove($(item), html);\n });\n });\n});\n\nclass imageRemove {\n constructor(item, html) {\n this.item = item;\n this.dialog = $(html);\n this.checkbox = this.item.find('input[type=\"checkbox\"]');\n this.item.append(this.dialog);\n this.checkbox.on('change', this.change.bind(this));\n this.item.find('.js-delete-cancel').on('click', this.cancel.bind(this));\n }\n\n change() {\n this.item.find('input, img, .checkbox, .cropper-local').toggleClass('accessibility');\n this.dialog.toggleClass('is-active');\n }\n\n cancel(e) {\n e.preventDefault();\n this.change();\n this.checkbox.attr('checked', false); \n }\n}\n\n\n\n\n// WEBPACK FOOTER //\n// ./javascript/forms.js","$(function(){\n $('.navbar-header').append('
');\n $('.sonata-filter-form').appendTo('.filter-box');\n $('.dropdown.sonata-actions').each(function(index, item) {\n item = $(item);\n if(!item.find('.sonata-ba-action').length) return;\n if (!item.data('Dropdown')) {\n item.data('Dropdown', new Dropdown(item));\n }\n });\n});\n \nclass Dropdown {\n constructor(item, html) {\n this.item = item;\n this.item.find('ul').css('display', 'none');\n this.item.on('click', this.toggle.bind(this));\n }\n toggle() {\n $('.filter-box').stop().slideToggle();\n }\n}\n\n\n// WEBPACK FOOTER //\n// ./javascript/filters.js","$(function(){\n\t$('.delete_link, .sonata-ba-form-actions .btn-danger').magnificPopup({\n\t type: 'ajax',\n\t closeBtnInside: true,\n\t mainClass: 'mfp-fade'\n\t});\n});\n\n\n// WEBPACK FOOTER //\n// ./javascript/popup.js","require('@wearejust/sticky');\n\nconst MIN_WIDTH = 940;\nconst $window = $(window);\n\nlet clone;\nlet element;\nlet timeout;\nlet cloneShown;\n\n$(function() {\n\telement = $('.add_records');\n\tif (!element.length) return;\n\n\telement.attr('data-sticky-id', 'sticky_add_btn');\n\n\tclone = element.clone(true);\n\tclone.addClass('is-clone');\n\tclone.attr('data-sticky-target', 'sticky_add_btn');\n\tclone.hide();\n\tclone.appendTo('.navbar-collapse');\n\tclone.sticky({\n\t\tactive: 'is-sticky',\n\t\ttopHeightOffset: -1\n\t});\n\n\t$window.on('resize', resizeDelayed);\n\tresize();\n});\n\nfunction resizeDelayed() {\n\tclearTimeout(timeout);\n\ttimeout = setTimeout(resize, 300);\t\n}\n\nfunction resize() {\n\tif ($window.width() >= MIN_WIDTH) {\n\t\tif (!cloneShown) {\n\t\t\tcloneShown = true;\n\t\t\tclone.show();\n\t\t}\n\t} else if (cloneShown) {\n\t\tcloneShown = false;\n\t\tclone.hide();\n\t\tclone.css('left', '');\n\t}\n\n\tif (cloneShown) {\n\t\tclone.css('left', element.offset().left);\n\t}\n}\n\n\n\n// WEBPACK FOOTER //\n// ./javascript/sticky.js","/** \n* @wearejust/sticky \n* Add/remove classes to sticky elements \n* \n* @version 1.0.0 \n* @author Emre Koc \n*/\n'use strict';\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar $window = $(window);\n\nmodule.exports = function (element, options) {\n if (!element.data('Sticky')) {\n element.data('Sticky', new Sticky(element, options));\n }\n};\n\n$.fn.sticky = function (options) {\n return $(this).each(function (index, item) {\n module.exports($(item), options);\n });\n};\n\nvar Sticky = function () {\n function Sticky(element, options) {\n _classCallCheck(this, Sticky);\n\n this.element = element;\n\n this.id = this.element.attr('data-sticky-target');\n if (!this.id) return;\n\n this.target = $('[data-sticky-id=\"' + this.id + '\"]');\n if (!this.target.length) return;\n\n this.options = $.extend({\n active: 'is-active',\n topHeightOffset: 0\n }, options);\n\n this.active = this.element.hasClass(this.options.active);\n\n $window.on('resize', this.resize.bind(this));\n $window.on('scroll', this.scroll.bind(this));\n this.resize();\n }\n\n Sticky.prototype.resize = function resize() {\n this.top = this.target.offset().top;\n if (this.options.topHeightOffset) {\n this.top += this.target.outerHeight() * this.options.topHeightOffset;\n }\n this.scroll();\n };\n\n Sticky.prototype.scroll = function scroll() {\n if ($window.scrollTop() >= this.top) {\n if (!this.active) {\n this.active = true;\n this.element.addClass(this.options.active);\n }\n } else if (this.active) {\n this.active = false;\n this.element.removeClass(this.options.active);\n }\n };\n\n return Sticky;\n}();\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/ceesvanegmond/Sites/sonata-theme-bundle/node_modules/@wearejust/sticky/dist/sticky.js\n// module id = 7\n// module chunks = 0"],"sourceRoot":""}