{"version":3,"sources":["webpack:///scripts/plugin--document-title--c9070012356885241159.js","webpack:///./project/client/src/site__ale001/components/long-content/document-title/document-title.js"],"names":["webpackJsonp","/tool/node_modules/babel-loader/lib/index.js??ref--7-0!/tool/node_modules/eslint-loader/index.js!/tool/project/client/src/site__ale001/components/long-content/document-title/document-title.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","_debug","_debug2","obj","__esModule","default","log","DocumentTitle","element","options","this","watchElementSelector","watchElement","document","querySelector","viewPortObserver","IntersectionObserver","observerHandler","bind","threshold","watch","observe","entries","_this","forEach","entry","isIntersecting","boundingClientRect","y","watchAboveClass","classList","add","remove","DEFAULTS"],"mappings":"AAAAA,cAAc,2BAERC,kMACA,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,MCZhiBmB,EAAAtB,EAAA,4IDgBIuB,EAEJ,SAAgCC,GAAO,MAAOA,IAAOA,EAAIC,WAAaD,GAAQE,QAASF,IAFlDF,GCd/BK,GAAM,EAAAJ,EAAAG,SAAM,kBAEZE,EDoBc,WCnBnB,QAAAA,GAAYC,EAASC,GAIpB,MAJ6B7B,GAAA8B,KAAAH,GAC7BG,KAAKF,QAAUA,EACfE,KAAKD,QAAUA,EAEVC,KAAKD,QAAQE,sBAOlBD,KAAKE,aAAeC,SAASC,cAC5BJ,KAAKD,QAAQE,sBAGTD,KAAKE,cAOVF,KAAKK,iBAAmB,GAAIC,sBAC3BN,KAAKO,gBAAgBC,KAAKR,OAEzBS,WAAY,SAIdT,MAAKU,UAbJd,uFACsFI,KAAKD,QAAQE,qBADnG,gBAGO,KAdPL,2FAGO,GDqET,MAhCAnB,GAAaoB,IACZV,IAAK,QACLX,MAAO,WCdPwB,KAAKK,iBAAiBM,QAAQX,KAAKE,iBDkBnCf,IAAK,kBACLX,MAAO,SChBQoC,GAAS,GAAAC,GAAAb,IACxBY,GAAQE,QAAQ,SAACC,GAChBnB,EAAI,QAASmB,IAGXA,EAAMC,gBAAkBD,EAAME,mBAAmBC,GAAK,GAGvDtB,EAAI,2BAEiC,KAAjCiB,EAAKd,QAAQoB,iBAChBN,EAAKf,QAAQsB,UAAUC,IAAIR,EAAKd,QAAQoB,mBAIzCvB,EAAI,2BAEiC,KAAjCiB,EAAKd,QAAQoB,iBAChBN,EAAKf,QAAQsB,UAAUE,OAAOT,EAAKd,QAAQoB,wBDuBxCtB,IChBRA,GAAc0B,UACbJ,gBAAiB,IDsBlBnD,EAAQ2B,QCnBOE","file":"scripts/plugin--document-title--c9070012356885241159.js","sourcesContent":["webpackJsonp([\"plugin--document-title\"],{\n\n/***/ \"/tool/node_modules/babel-loader/lib/index.js??ref--7-0!/tool/node_modules/eslint-loader/index.js!/tool/project/client/src/site__ale001/components/long-content/document-title/document-title.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__(\"/tool/node_modules/babel-loader/lib/index.js??ref--7-0!/tool/node_modules/eslint-loader/index.js!/tool/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)(\"document-title\");\n\nvar DocumentTitle = function () {\n\tfunction DocumentTitle(element, options) {\n\t\t_classCallCheck(this, DocumentTitle);\n\n\t\tthis.element = element;\n\t\tthis.options = options;\n\n\t\tif (!this.options.watchElementSelector) {\n\t\t\tlog(\"No element specified to watch, e.g. data-document-title-watch-element-selector=\\\"...\\\"\");\n\t\t\treturn false;\n\t\t}\n\n\t\tthis.watchElement = document.querySelector(this.options.watchElementSelector);\n\n\t\tif (!this.watchElement) {\n\t\t\tlog(\"Specified element to watch not found: data-document-title-watch-element-selector=\\\"\" + this.options.watchElementSelector + \"\\\" Aborting.\");\n\t\t\treturn false;\n\t\t}\n\n\t\tthis.viewPortObserver = new IntersectionObserver(this.observerHandler.bind(this), {\n\t\t\tthreshold: [0]\n\t\t});\n\n\t\tthis.watch();\n\t}\n\n\t_createClass(DocumentTitle, [{\n\t\tkey: \"watch\",\n\t\tvalue: function watch() {\n\t\t\tthis.viewPortObserver.observe(this.watchElement);\n\t\t}\n\t}, {\n\t\tkey: \"observerHandler\",\n\t\tvalue: function observerHandler(entries) {\n\t\t\tvar _this = this;\n\n\t\t\tentries.forEach(function (entry) {\n\t\t\t\tlog(\"entry\", entry);\n\n\t\t\t\tvar isAboveTop = !entry.isIntersecting && entry.boundingClientRect.y <= 0;\n\n\t\t\t\tif (isAboveTop) {\n\t\t\t\t\tlog(\"Watch element above top\");\n\n\t\t\t\t\tif (_this.options.watchAboveClass !== \"\") {\n\t\t\t\t\t\t_this.element.classList.add(_this.options.watchAboveClass);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tlog(\"Watch element below top\");\n\n\t\t\t\t\tif (_this.options.watchAboveClass !== \"\") {\n\t\t\t\t\t\t_this.element.classList.remove(_this.options.watchAboveClass);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}]);\n\n\treturn DocumentTitle;\n}();\n\nDocumentTitle.DEFAULTS = {\n\twatchAboveClass: \"\"\n};\n\nexports.default = DocumentTitle;\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// scripts/plugin--document-title--c9070012356885241159.js","import debug from \"debug\";\r\n\r\nconst log = debug(\"document-title\");\r\n\r\nclass DocumentTitle {\r\n\tconstructor(element, options) {\r\n\t\tthis.element = element;\r\n\t\tthis.options = options;\r\n\r\n\t\tif (!this.options.watchElementSelector) {\r\n\t\t\tlog(\r\n\t\t\t\t`No element specified to watch, e.g. data-document-title-watch-element-selector=\"...\"`\r\n\t\t\t);\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tthis.watchElement = document.querySelector(\r\n\t\t\tthis.options.watchElementSelector\r\n\t\t);\r\n\r\n\t\tif (!this.watchElement) {\r\n\t\t\tlog(\r\n\t\t\t\t`Specified element to watch not found: data-document-title-watch-element-selector=\"${this.options.watchElementSelector}\" Aborting.`\r\n\t\t\t);\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tthis.viewPortObserver = new IntersectionObserver(\r\n\t\t\tthis.observerHandler.bind(this),\r\n\t\t\t{\r\n\t\t\t\tthreshold: [0],\r\n\t\t\t}\r\n\t\t);\r\n\r\n\t\tthis.watch();\r\n\t}\r\n\r\n\twatch() {\r\n\t\tthis.viewPortObserver.observe(this.watchElement);\r\n\t}\r\n\r\n\tobserverHandler(entries) {\r\n\t\tentries.forEach((entry) => {\r\n\t\t\tlog(\"entry\", entry);\r\n\r\n\t\t\tconst isAboveTop =\r\n\t\t\t\t!entry.isIntersecting && entry.boundingClientRect.y <= 0;\r\n\r\n\t\t\tif (isAboveTop) {\r\n\t\t\t\tlog(\"Watch element above top\");\r\n\r\n\t\t\t\tif (this.options.watchAboveClass !== \"\") {\r\n\t\t\t\t\tthis.element.classList.add(this.options.watchAboveClass);\r\n\t\t\t\t}\r\n\r\n\t\t\t} else {\r\n\t\t\t\tlog(\"Watch element below top\");\r\n\r\n\t\t\t\tif (this.options.watchAboveClass !== \"\") {\r\n\t\t\t\t\tthis.element.classList.remove(this.options.watchAboveClass);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}\r\n\r\nDocumentTitle.DEFAULTS = {\r\n\twatchAboveClass: \"\"\r\n};\r\n\r\nexport default DocumentTitle;\r\n\n\n\n// WEBPACK FOOTER //\n// ./project/client/src/site__ale001/components/long-content/document-title/document-title.js"],"sourceRoot":""}