{"version":3,"sources":["webpack:///./LeLab.Gcv.Web/src/atomic/molecule/m-accessibility/m-accessibility.chunk.js","webpack:///./LeLab.Gcv.Web/src/atomic/molecule/m-accessibility/m-accessibility.scss"],"names":["require","$","cookie","setContrastOptions","setContrastCookieOptions","on","toggleAccessibilityModal","closeAccessibilityModal","document","$toggleBtn","$modal","slideUp","duration","attr","setBodyContrastAttribute","e","currentTarget","isExpanded","parent","children","slideToggle","value","dataContrastAttr","$dataContrastBtn","$otherDataContrastBtn","removeClass","addClass","setContrastCookie","contrastCookieVal","getContrastCookie","rawCookies","split","i","length"],"mappings":";;;;;;;;AAAA,mBAAAA,CAAQ,GAAR;AACA,IAAMC,IAAI,mBAAAD,CAAQ,CAAR,CAAV;AACA,IAAIE,SAAS,mBAAAF,CAAQ,EAAR,CAAb;;AAEA;;AAEA,SAASG,kBAAT,GAA8B;AAC1BC;;AAEAH,MAAE,8BAAF,EAAkCI,EAAlC,CAAqC,OAArC,EAA8CC,wBAA9C;AACAL,MAAE,6BAAF,EAAiCI,EAAjC,CAAoC,OAApC,EAA6CE,uBAA7C;AACAN,MAAEO,QAAF,EAAYH,EAAZ,CAAe,QAAf,EAAyB,YAAW;AAChC,YAAII,aAAaR,EAAE,8BAAF,CAAjB;AACA,YAAKS,SAAST,EAAE,yBAAF,CAAd;;AAEAS,eAAOC,OAAP,CAAe;AACXC,sBAAU;AADC,SAAf;;AAIAH,mBAAWI,IAAX,CAAgB;AACZ,6BAAiB,OADL;AAEZ,0BAAc;AAFF,SAAhB;AAIH,KAZD;;AAcAZ,MAAE,qCAAF,EAAyCI,EAAzC,CAA4C,OAA5C,EAAqD,YAAY;AAC7DS,iCAAyB,UAAzB;AACH,KAFD;;AAIAb,MAAE,iCAAF,EAAqCI,EAArC,CAAwC,OAAxC,EAAiD,YAAY;AACzDS,iCAAyB,MAAzB;AACH,KAFD;AAGH;;AAED,IAAIR,2BAA2B,SAA3BA,wBAA2B,CAAUS,CAAV,EAAa;AACxC,QAAIN,aA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oBC,mBAAxB;;AAEA,QAAID,qBAAqB,IAAzB,EAA+B;AAC3Bd,iCAAyBc,iBAAzB;AACH;AACJ,CAND;;AAQA,IAAIC,oBAAoB,SAApBA,iBAAoB,GAAY;AAChC,QAAIC,aAAatB,SAASN,MAAT,CAAgB6B,KAAhB,CAAsB,IAAtB,CAAjB;AACA,QAAIH,oBAAoB,IAAxB;;AAEA,SAAK,IAAII,IAAI,CAAb,EAAgBA,IAAIF,WAAWG,MAA/B,EAAuCD,GAAvC,EAA4C;AACxC9B,iBAAS4B,WAAWE,CAAX,EAAcD,KAAd,CAAoB,GAApB,CAAT;AACA,YAAI7B,OAAO,CAAP,MAAc,UAAlB,EAA8B;AAC1B0B,gCAAoB1B,OAAO,CAAP,CAApB;AACH;AACJ;;AAED,WAAO0B,iBAAP;AACH,CAZD;;AAcA,IAAID,oBAAoB,SAApBA,iBAAoB,CAAUN,KAAV,EAAiB;AACrC,QAAIA,KAAJ,EAAW;AACPb,iBAASN,MAAT,GAAkB,cAAcmB,KAAd,GAAsB,UAAxC;AACH;AACJ,CAJD;;AAMAlB,qB;;;;;;;AC9GA,yC","file":"m-accessibility.js","sourcesContent":["require(\"./m-accessibility.scss\");\r\nconst $ = require('jquery');\r\nvar cookie = require('utils/cookies-utils');\r\n\r\n// contrast\r\n\r\nfunction setContrastOptions() {\r\n setContrastCookieOptions();\r\n\r\n $(\".js-accessibility-toggle-btn\").on(\"click\", toggleAccessibilityModal);\r\n $(\".js-accessibility-close-btn\").on(\"click\", closeAccessibilityModal);\r\n $(document).on('scroll', function() {\r\n var $toggleBtn = $(\".js-accessibility-toggle-btn\");\r\n var $modal = $(\".js-accessibility-modal\");\r\n\r\n $modal.slideUp({\r\n duration: 300,\r\n });\r\n\r\n $toggleBtn.attr({\r\n \"aria-expanded\": \"false\",\r\n \"aria-label\": \"Open accessibility menu\",\r\n });\r\n });\r\n\r\n $(\".js-accessibility-contrast-standard\").on(\"click\", function () {\r\n setBodyContrastAttribute(\"standard\");\r\n });\r\n\r\n $(\".js-accessibility-contrast-high\").on(\"click\", function () {\r\n setBodyContrastAttribute(\"high\");\r\n });\r\n}\r\n\r\nvar toggleAccessibilityModal = function (e) {\r\n var $toggleBtn = $(e.currentTarget);\r\n var isExpanded = $toggleBtn.attr(\"aria-expanded\") === \"true\";\r\n var $modal = $toggleBtn.parent().children(\".js-accessibility-modal\");\r\n\r\n $modal.slideToggle({\r\n duration: 300,\r\n });\r\n\r\n if (isExpanded) {\r\n $toggleBtn.attr(\"aria-label\", \"Open accessibility menu\");\r\n } else {\r\n $toggleBtn.attr(\"aria-label\", \"Close accessibility menu\");\r\n }\r\n\r\n $toggleBtn.attr(\"aria-expanded\", !isExpanded);\r\n};\r\n\r\nvar closeAccessibilityModal = function () {\r\n var $toggleBtn = $(\".js-accessibility-toggle-btn\");\r\n var $modal = $(\".js-accessibility-modal\");\r\n\r\n $modal.slideToggle({\r\n duration: 300,\r\n });\r\n\r\n $toggleBtn.attr({\r\n \"aria-expanded\": \"false\",\r\n \"aria-label\": \"Open accessibility menu\",\r\n });\r\n};\r\n\r\nvar setBodyContrastAttribute = function (value) {\r\n var dataContrastAttr = value;\r\n var $dataContrastBtn = $(\".js-accessibility-contrast-\" + dataContrastAttr);\r\n var $otherDataContrastBtn = $(\".js-accessibility-contrast-\" + (dataContrastAttr === \"standard\" ? \"high\" : \"standard\"));\r\n\r\n $otherDataContrastBtn.removeClass(\"selected\");\r\n $dataContrastBtn.addClass(\"selected\");\r\n\r\n if (dataContrastAttr) {\r\n $(\"body\").attr(\"data-contrast\", dataContrastAttr);\r\n setContrastCookie(dataContrastAttr);\r\n }\r\n};\r\n\r\n\r\n// COOKIE\r\nvar setContrastCookieOptions = function () {\r\n var contrastCookieVal = getContrastCookie();\r\n\r\n if (contrastCookieVal != null) {\r\n setBodyContrastAttribute(contrastCookieVal);\r\n }\r\n};\r\n\r\nvar getContrastCookie = function () {\r\n var rawCookies = document.cookie.split(\"; \");\r\n var contrastCookieVal = null;\r\n\r\n for (var i = 0; i < rawCookies.length; i++) {\r\n cookie = rawCookies[i].split(\"=\");\r\n if (cookie[0] === \"contrast\") {\r\n contrastCookieVal = cookie[1];\r\n }\r\n }\r\n\r\n return contrastCookieVal;\r\n};\r\n\r\nvar setContrastCookie = function (value) {\r\n if (value) {\r\n document.cookie = \"contrast=\" + value + \"; path=/\";\r\n }\r\n};\r\n\r\nsetContrastOptions();\r\n\r\n\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./LeLab.Gcv.Web/src/atomic/molecule/m-accessibility/m-accessibility.chunk.js","// removed by extract-text-webpack-plugin\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./LeLab.Gcv.Web/src/atomic/molecule/m-accessibility/m-accessibility.scss\n// module id = 336\n// module chunks = 162"],"sourceRoot":""}