{"version":3,"sources":["webpack:///scripts/pop-window--e3051ae43897d28f9f6d.js","webpack:///./client/src/core/components/pop-window/pop-window.js"],"names":["webpackJsonpHairCare","D:\\a\\1\\s\\node_modules\\babel-loader\\lib\\index.js??ref--12-0!D:\\a\\1\\s\\node_modules\\eslint-loader\\index.js??ref--12-1!D:\\a\\1\\s\\client\\src\\core\\components\\pop-window\\pop-window.js","module","exports","__webpack_require__","_classCallCheck","instance","Constructor","TypeError","Object","defineProperty","value","_createClass","defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","key","protoProps","staticProps","prototype","_debug2","obj","__esModule","default","_debug","log","PopWindow","element","options","this","$element","$","windowName","watch","href","on","clickHandler","bind","off","event","ctrlKey","metaKey","shiftKey","altKey","preventDefault","features","height","width","menubar","status","toolbar","location","noopener","noreferrer","windowFeatures","filter","join","windows","window","open","focus","DEFAULTS"],"mappings":"AAAAA,sBAAsB,eAEhBC,wMACA,SAAUC,EAAQC,EAASC,GAEjC,YAeA,SAASC,GAAgBC,EAAUC,GAAe,KAAMD,YAAoBC,IAAgB,KAAM,IAAIC,WAAU,qCAZhHC,OAAOC,eAAeP,EAAS,cAC9BQ,OAAO,GAGR,IAAIC,GAAe,WAAc,QAASC,GAAiBC,EAAQC,GAAS,IAAK,GAAIC,GAAI,EAAGA,EAAID,EAAME,OAAQD,IAAK,CAAE,GAAIE,GAAaH,EAAMC,EAAIE,GAAWC,WAAaD,EAAWC,aAAc,EAAOD,EAAWE,cAAe,EAAU,SAAWF,KAAYA,EAAWG,UAAW,GAAMZ,OAAOC,eAAeI,EAAQI,EAAWI,IAAKJ,IAAiB,MAAO,UAAUX,EAAagB,EAAYC,GAAiJ,MAA9HD,IAAYV,EAAiBN,EAAYkB,UAAWF,GAAiBC,GAAaX,EAAiBN,EAAaiB,GAAqBjB,MCZhiB,yLDgBImB,EAEJ,SAAgCC,GAAO,MAAOA,IAAOA,EAAIC,WAAaD,GAAQE,QAASF,IAFlDG,GCf/BC,GAAM,aAAM,cA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,EAGRE,UAAU,EAGVD,SAAS,EAGTlB,WAAY,aAIZoB,UAAU,EAIVC,YAAY,GAWb3B,EAAU+B,WDgBV5D,EAAQ0B,QCdOG","file":"scripts/pop-window--e3051ae43897d28f9f6d.js","sourcesContent":["webpackJsonpHairCare([\"pop-window\"],{\n\n/***/ \"D:\\\\a\\\\1\\\\s\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js??ref--12-0!D:\\\\a\\\\1\\\\s\\\\node_modules\\\\eslint-loader\\\\index.js??ref--12-1!D:\\\\a\\\\1\\\\s\\\\client\\\\src\\\\core\\\\components\\\\pop-window\\\\pop-window.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _debug = __webpack_require__(\"D:\\\\a\\\\1\\\\s\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js??ref--12-0!D:\\\\a\\\\1\\\\s\\\\node_modules\\\\eslint-loader\\\\index.js??ref--12-1!D:\\\\a\\\\1\\\\s\\\\node_modules\\\\debug\\\\src\\\\browser.js\");\n\nvar _debug2 = _interopRequireDefault(_debug);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar log = (0, _debug2.default)(\"pop-window\");\n\nvar PopWindow = function () {\n\tfunction PopWindow(element, options) {\n\t\t_classCallCheck(this, PopWindow);\n\n\t\tthis.element = element;\n\t\tthis.options = options;\n\t\tthis.$element = $(element);\n\t\tlog(\"PopWindow\", element, options);\n\n\t\tthis.windowName = this.element.target || this.options.windowName;\n\t\tthis.watch();\n\t}\n\n\t_createClass(PopWindow, [{\n\t\tkey: \"watch\",\n\t\tvalue: function watch() {\n\t\t\tif (!this.element.href) {\n\t\t\t\tlog(\"Anchor has no href. Aborting...\", this.element);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tthis.$element.on(\"click.popwindow\", this.clickHandler.bind(this));\n\t\t}\n\t}, {\n\t\tkey: \"unwatch\",\n\t\tvalue: function unwatch() {\n\t\t\tthis.$element.off(\".popwindow\");\n\t\t\tlog(\"unbound\", this.element);\n\t\t}\n\t}, {\n\t\tkey: \"clickHandler\",\n\t\tvalue: function clickHandler(event) {\n\t\t\tlog(\"click\");\n\n\t\t\t//\tEnsure script does not interfere with modifier clicks\n\t\t\tif (event.ctrlKey || event.metaKey || event.shiftKey || event.altKey) {\n\t\t\t\tlog(\"Modifier key detected. Aborting window pop\");\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tevent.preventDefault();\n\n\t\t\tvar features = [this.options.height ? \"height=\" + this.options.height : false, this.options.width ? \"width=\" + this.options.width : false, this.options.menubar ? \"`menubar=1\" : false, this.options.status ? \"status=1\" : false, this.options.toolbar ? \"toolbar=1\" : false, this.options.location ? \"location=1\" : false, this.options.noopener ? \"noopener=1\" : false, this.options.noreferrer ? \"noreferrer=1\" : false, \"scrollbars=1\"];\n\n\t\t\tvar windowFeatures = features.filter(function (i) {\n\t\t\t\treturn i;\n\t\t\t}).join(\",\");\n\n\t\t\tlog(windowFeatures);\n\n\t\t\tthis.windows[this.windowName] = window.open(this.element.href, this.windowName, windowFeatures);\n\t\t\tthis.windows[this.windowName].focus();\n\t\t}\n\t}]);\n\n\treturn PopWindow;\n}();\n\nPopWindow.DEFAULTS = {\n\t// sets the width in pixels of the window.\n\twidth: false,\n\n\t// sets the height in pixels of the window.\n\theight: false,\n\n\t// determines whether the menubar is displayed {1 (YES) or 0 (NO)}.\n\tmenubar: false,\n\n\t// whether a status line appears at the bottom of the window {1 (YES) or 0 (NO)}.\n\tstatus: false,\n\n\t// visible location/address bar\n\tlocation: false,\n\n\t// determines whether a toolbar (includes the forward and back buttons) is displayed {1 (YES) or 0 (NO)}.\n\ttoolbar: false,\n\n\t// Fallback name if target not applied to anchor\n\twindowName: \"pop_window\",\n\n\t// Prevent opened window having access to parent\n\t// Default to true as popped windows usually to 3rd party domains\n\tnoopener: true,\n\n\t// Prevent opened window have access to referrer\n\t// Default to true as popped windows usually to 3rd party domains\n\tnoreferrer: true\n\n\t// determines whether scrollbars appear on the window {1 (YES) or 0 (NO)}.\n\t// Not an option: default is false! Set to true for best practice\n\t// scrollbars: true,\n\n\t// whether the window can be resized {1 (YES) or 0 (NO)}. Can also be overloaded using resizable.\n\t// Not an option: default of true retained for best practice\n\t// resizable: true,\n};\n\nPopWindow.windows = {};\n\nexports.default = PopWindow;\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// scripts/pop-window--e3051ae43897d28f9f6d.js","import debug from \"debug\";\r\nconst log = debug(\"pop-window\");\r\n\r\nclass PopWindow {\r\n\tconstructor(element, options) {\r\n\t\tthis.element = element;\r\n\t\tthis.options = options;\r\n\t\tthis.$element = $(element);\r\n\t\tlog(\"PopWindow\", element, options);\r\n\r\n\t\tthis.windowName = this.element.target || this.options.windowName;\r\n\t\tthis.watch();\r\n\t}\r\n\r\n\twatch() {\r\n\t\tif (!this.element.href) {\r\n\t\t\tlog(\"Anchor has no href. Aborting...\", this.element);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tthis.$element.on(\"click.popwindow\", this.clickHandler.bind(this));\r\n\t}\r\n\r\n\tunwatch() {\r\n\t\tthis.$element.off(\".popwindow\");\r\n\t\tlog(\"unbound\", this.element);\r\n\t}\r\n\r\n\tclickHandler(event) {\r\n\t\tlog(\"click\");\r\n\r\n\t\t//\tEnsure script does not interfere with modifier clicks\r\n\t\tif (event.ctrlKey || event.metaKey || event.shiftKey || event.altKey) {\r\n\t\t\tlog(\"Modifier key detected. Aborting window pop\");\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tevent.preventDefault();\r\n\r\n\t\tconst features = [\r\n\t\t\tthis.options.height ? `height=${this.options.height}` : false,\r\n\t\t\tthis.options.width ? `width=${this.options.width}` : false,\r\n\t\t\tthis.options.menubar ? \"`menubar=1\" : false,\r\n\t\t\tthis.options.status ? \"status=1\" : false,\r\n\t\t\tthis.options.toolbar ? \"toolbar=1\" : false,\r\n\t\t\tthis.options.location ? \"location=1\" : false,\r\n\t\t\tthis.options.noopener ? \"noopener=1\" : false,\r\n\t\t\tthis.options.noreferrer ? \"noreferrer=1\" : false,\r\n\t\t\t\"scrollbars=1\", // don't disabled scrollbars!\r\n\t\t];\r\n\r\n\t\tconst windowFeatures = features\r\n\t\t\t.filter((i) => {\r\n\t\t\t\treturn i;\r\n\t\t\t})\r\n\t\t\t.join(\",\");\r\n\r\n\t\tlog(windowFeatures);\r\n\r\n\t\tthis.windows[this.windowName] = window.open(\r\n\t\t\tthis.element.href,\r\n\t\t\tthis.windowName,\r\n\t\t\twindowFeatures\r\n\t\t);\r\n\t\tthis.windows[this.windowName].focus();\r\n\t}\r\n}\r\n\r\nPopWindow.DEFAULTS = {\r\n\t// sets the width in pixels of the window.\r\n\twidth: false,\r\n\r\n\t// sets the height in pixels of the window.\r\n\theight: false,\r\n\r\n\t// determines whether the menubar is displayed {1 (YES) or 0 (NO)}.\r\n\tmenubar: false,\r\n\r\n\t// whether a status line appears at the bottom of the window {1 (YES) or 0 (NO)}.\r\n\tstatus: false,\r\n\r\n\t// visible location/address bar\r\n\tlocation: false,\r\n\r\n\t// determines whether a toolbar (includes the forward and back buttons) is displayed {1 (YES) or 0 (NO)}.\r\n\ttoolbar: false,\r\n\r\n\t// Fallback name if target not applied to anchor\r\n\twindowName: \"pop_window\",\r\n\r\n\t// Prevent opened window having access to parent\r\n\t// Default to true as popped windows usually to 3rd party domains\r\n\tnoopener: true,\r\n\r\n\t// Prevent opened window have access to referrer\r\n\t// Default to true as popped windows usually to 3rd party domains\r\n\tnoreferrer: true,\r\n\r\n\t// determines whether scrollbars appear on the window {1 (YES) or 0 (NO)}.\r\n\t// Not an option: default is false! Set to true for best practice\r\n\t// scrollbars: true,\r\n\r\n\t// whether the window can be resized {1 (YES) or 0 (NO)}. Can also be overloaded using resizable.\r\n\t// Not an option: default of true retained for best practice\r\n\t// resizable: true,\r\n};\r\n\r\nPopWindow.windows = {};\r\n\r\nexport default PopWindow;\r\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/core/components/pop-window/pop-window.js"],"sourceRoot":""}