1/* global a2a*/ 2(function (Drupal) { 3 'use strict'; 4 5 Drupal.behaviors.addToAny = { 6 attach: function (context, settings) { 7 // If not the full document (it's probably AJAX), and window.a2a exists 8 if (context !== document && window.a2a) { 9 a2a.init_all(); // Init all uninitiated AddToAny instances 10 } 11 } 12 }; 13 14})(Drupal); 15; 16/** 17 * @file 18 * Attaches several event listener to a web page. 19 */ 20 21(function ($, Drupal, drupalSettings) { 22 23 /* eslint max-nested-callbacks: ["error", 4] */ 24 25 'use strict'; 26 27 Drupal.google_analytics = {}; 28 29 $(document).ready(function () { 30 31 // Attach mousedown, keyup, touchstart events to document only and catch 32 // clicks on all elements. 33 $(document.body).on('mousedown keyup touchstart', function (event) { 34 35 // Catch the closest surrounding link of a clicked element. 36 $(event.target).closest('a,area').each(function () { 37 38 // Is the clicked URL internal? 39 if (Drupal.google_analytics.isInternal(this.href)) { 40 // Skip 'click' tracking, if custom tracking events are bound. 41 if ($(this).is('.colorbox') && (drupalSettings.google_analytics.trackColorbox)) { 42 // Do nothing here. The custom event will handle all tracking. 43 // console.info('Click on .colorbox item has been detected.'); 44 } 45 // Is download tracking activated and the file extension configured 46 // for download tracking? 47 else if (drupalSettings.google_analytics.trackDownload && Drupal.google_analytics.isDownload(this.href)) { 48 // Download link clicked. 49 gtag('event', Drupal.google_analytics.getDownloadExtension(this.href).toUpperCase(), { 50 event_category: 'Downloads', 51 event_label: Drupal.google_analytics.getPageUrl(this.href), 52 transport_type: 'beacon' 53 }); 54 } 55 else if (Drupal.google_analytics.isInternalSpecial(this.href)) { 56 // Keep the internal URL for Google Analytics website overlay intact. 57 // @todo: May require tracking ID 58 gtag('config', drupalSettings.google_analytics.account, { 59 page_path: Drupal.google_analytics.getPageUrl(this.href), 60 transport_type: 'beacon' 61 }); 62 } 63 } 64 else { 65 if (drupalSettings.google_analytics.trackMailto && $(this).is("a[href^='mailto:'],area[href^='mailto:']")) { 66 // Mailto link clicked. 67 gtag('event', 'Click', { 68 event_category: 'Mails', 69 event_label: this.href.substring(7), 70 transport_type: 'beacon' 71 }); 72 } 73 else if (drupalSettings.google_analytics.trackTel && $(this).is("a[href^='tel:'],area[href^='tel:']")) { 74 // Tel link clicked. 75 gtag('event', 'Click', { 76 event_category: 'Telephone calls', 77 event_label: this.href.substring(4), 78 transport_type: 'beacon' 79 }); 80 } 81 else if (drupalSettings.google_analytics.trackOutbound && this.href.match(/^\w+:\/\//i)) { 82 if (drupalSettings.google_analytics.trackDomainMode !== 2 || (drupalSettings.google_analytics.trackDomainMode === 2 && !Drupal.google_analytics.isCrossDomain(this.hostname, drupalSettings.google_analytics.trackCrossDomains))) { 83 // External link clicked / No top-level cross domain clicked. 84 gtag('event', 'Click', { 85 event_category: 'Outbound links', 86 event_label: this.href, 87 transport_type: 'beacon' 88 }); 89 } 90 } 91 } 92 }); 93 }); 94 95 // Track hash changes as unique pageviews, if this option has been enabled. 96 if (drupalSettings.google_analytics.trackUrlFragments) { 97 window.onhashchange = function () { 98 gtag('config', drupalSettings.google_analytics.account, { 99 page_path: location.pathname + location.search + location.hash 100 }); 101 }; 102 } 103 104 // Colorbox: This event triggers when the transition has completed and the 105 // newly loaded content has been revealed. 106 if (drupalSettings.google_analytics.trackColorbox) { 107 $(document).on('cbox_complete', function () {
108 var href = $.colorbox.element().attr('href'); 109 if (href) { 110 gtag('config', drupalSettings.google_analytics.account, { 111 page_path: Drupal.google_analytics.getPageUrl(href) 112 }); 113 } 114 }); 115 } 116 117 }); 118 119 /** 120 * Check whether the hostname is part of the cross domains or not. 121 * 122 * @param {string} hostname 123 * The hostname of the clicked URL. 124 * @param {array} crossDomains 125 * All cross domain hostnames as JS array. 126 * 127 * @return {boolean} isCrossDomain 128 */ 129 Drupal.google_analytics.isCrossDomain = function (hostname, crossDomains) { 130 return $.inArray(hostname, crossDomains) > -1 ? true : false; 131 }; 132 133 /** 134 * Check whether this is a download URL or not. 135 * 136 * @param {string} url 137 * The web url to check. 138 * 139 * @return {boolean} isDownload 140 */ 141 Drupal.google_analytics.isDownload = function (url) { 142 var isDownload = new RegExp('\\.(' + drupalSettings.google_analytics.trackDownloadExtensions + ')([\?#].*)?$', 'i'); 143 return isDownload.test(url); 144 }; 145 146 /** 147 * Check whether this is an absolute internal URL or not. 148 * 149 * @param {string} url 150 * The web url to check. 151 * 152 * @return {boolean} isInternal 153 */ 154 Drupal.google_analytics.isInternal = function (url) { 155 var isInternal = new RegExp('^(https?):\/\/' + window.location.host, 'i'); 156 return isInternal.test(url); 157 }; 158 159 /** 160 * Check whether this is a special URL or not. 161 * 162 * URL types: 163 * - gotwo.module /go/* links. 164 * 165 * @param {string} url 166 * The web url to check. 167 * 168 * @return {boolean} isInternalSpecial 169 */ 170 Drupal.google_analytics.isInternalSpecial = function (url) { 171 var isInternalSpecial = new RegExp('(\/go\/.*)$', 'i'); 172 return isInternalSpecial.test(url); 173 }; 174 175 /** 176 * Extract the relative internal URL from an absolute internal URL. 177 * 178 * Examples: 179 * - https://mydomain.com/node/1 -> /node/1 180 * - https://example.com/foo/bar -> https://example.com/foo/bar 181 * 182 * @param {string} url 183 * The web url to check. 184 * 185 * @return {string} getPageUrl 186 * Internal website URL. 187 */ 188 Drupal.google_analytics.getPageUrl = function (url) { 189 var extractInternalUrl = new RegExp('^(https?):\/\/' + window.location.host, 'i'); 190 return url.replace(extractInternalUrl, ''); 191 }; 192 193 /** 194 * Extract the download file extension from the URL. 195 * 196 * @param {string} url 197 * The web url to check. 198 * 199 * @return {string} getDownloadExtension 200 * The file extension of the passed url. e.g. 'zip', 'txt' 201 */ 202 Drupal.google_analytics.getDownloadExtension = function (url) { 203 var extractDownloadextension = new RegExp('\\.(' + drupalSettings.google_analytics.trackDownloadExtensions + ')([\?#].*)?$', 'i'); 204 var extension = extractDownloadextension.exec(url); 205 return (extension === null) ? '' : extension[1]; 206 }; 207 208})(jQuery, Drupal, drupalSettings); 209; 210/** 211 * @file 212 * Attaches several event listener to a web page. 213 */ 214 215(function ($, drupalSettings) { 216 217 'use strict'; 218 219 $(document).ready(function () { 220 defaultBind(); 221 222 // Colorbox: This event triggers when the transition has completed and the 223 // newly loaded content has been revealed. 224 if (drupalSettings.matomo.trackColorbox) { 225 $(document).bind('cbox_complete', function () { 226 var href = $.colorbox.element().attr('href'); 227 if (href) { 228 _paq.push(['setCustomUrl', href]); 229 if (drupalSettings.matomo.disableCookies) { 230 _paq.push(['disableCookies']); 231 } 232 _paq.push(['trackPageView']); 233 } 234 }); 235 } 236 237 }); 238 239 /** 240 * Default event binding. 241 * 242 * Attach mousedown, keyup, touchstart events to document only and catch 243 * clicks on all elements. 244 */ 245 function defaultBind() { 246 $(document.body).bind('mousedown keyup touchstart', function (event) { 247 248 // Catch the closest surrounding link of a clicked element. 249 $(event.target).closest('a,area').each(function () { 250 251 if (drupalSettings.matomo.trackMailto && $(this).is("a[href^='mailto:'],area[href^='mailto:']")) { 252 // Mailto link clicked. 253 _paq.push(['trackEvent', 'Mails', 'Click', this.href.substring(7)]); 254 } 255 256 }); 257 }); 258 } 259 260})(jQuery, drupalSettings); 261; 262(function (Drupal) { 263 'use strict'; 264 265 function init(context) { 266 var elements = context.querySelectorAll('[data-mail-to]'); 267 var clickable = context.querySelectorAll('[data-mail-click-link]'); 268 269 if (!elements) { 270 return; 271 } 272 273 /** 274 * Shift the string with rot 13. 275 * Rewrite from Jonas Raoni Soares Silva 276 * 277 * @see http://jsfromhell.com/string/rot13 [rev. #1] 278 * 279 * @param string 280 * @returns string 281 */ 282 function rot13(string) { 283 return string.replace(/[a-zA-Z]/g, function (c) { 284 return String.fromCharCode((c <= 'Z' ? 90 : 122) >
284= (c = c.charCodeAt(0) + 13) ? c : c - 26); 285 }); 286 } 287 288 /** 289 * Decrypt the string to an email. 290 * 291 * @param string 292 * @returns string 293 */ 294 function normalizeEncryptEmail(string) { 295 string = rot13(string); 296 string = string.replace(/\/dot\//g, '.'); 297 string = string.replace(/\/at\//g, '@'); 298 299 return string; 300 } 301 302 function setMailAddress(element) { 303 var mailTo = normalizeEncryptEmail(element.getAttribute('data-mail-to')); 304 var replaceInner = element.getAttribute('data-replace-inner'); 305 306 element.removeAttribute('data-mail-to'); 307 element.removeAttribute('data-replace-inner'); 308 309 // set href if anchor tag 310 if (element.tagName === 'A') { 311 element.setAttribute('href', 'mailto:' + mailTo); 312 } 313 314 // replace hole string 315 if (replaceInner === 'true' || replaceInner === '') { 316 element.innerHTML = mailTo; 317 318 return; 319 } 320 321 // replace the token given in [data-replace-inner] 322 if (replaceInner) { 323 element.innerHTML = element.innerHTML.replace(replaceInner, mailTo); 324 } 325 } 326 327 if (clickable.length) { 328 clickable.forEach(function (element) { 329 element.addEventListener('click', function (event) { 330 if (element.className.split(/\s+/).indexOf('link-processed') === -1) { 331 event.preventDefault(); 332 setMailAddress(element); 333 element.classList.add('link-processed'); 334 } 335 336 }); 337 }); 338 339 return; 340 } 341 342 NodeList.prototype.forEach = Array.prototype.forEach; 343 344 elements.forEach(function (element) { 345 setMailAddress(element); 346 }); 347 } 348 349 Drupal.behaviors.obfuscateEmailField = { 350 attach: init 351 }; 352})(Drupal); 353; 354window.matchMedia||(window.matchMedia=function(){"use strict";var e=window.styleMedia||window.media;if(!e){var t=document.createElement("style"),i=document.getElementsByTagName("script")[0],n=null;t.type="text/css";t.id="matchmediajs-test";i.parentNode.insertBefore(t,i);n="getComputedStyle"in window&&window.getComputedStyle(t,null)||t.currentStyle;e={matchMedium:function(e){var i="@media "+e+"{ #matchmediajs-test { width: 1px; } }";if(t.styleSheet){t.styleSheet.cssText=i}else{t.textContent=i}return n.width==="1px"}}}return function(t){return{matches:e.matchMedium(t||"all"),media:t||"all"}}}()); 355; 356/*! 357 * jQuery Form Plugin 358 * version: 4.2.2 359 * Requires jQuery v1.7.2 or later 360 * Project repository: https://github.com/jquery-form/form 361 362 * Copyright 2017 Kevin Morris 363 * Copyright 2006 M. Alsup 364 365 * Dual licensed under the LGPL-2.1+ or MIT licenses 366 * https://github.com/jquery-form/form#license 367 368 * This library is free software; you can redistribute it and/or 369 * modify it under the terms of the GNU Lesser General Public 370 * License as published by the Free Software Foundation; either 371 * version 2.1 of the License, or (at your option) any later version. 372 * This library is distributed in the hope that it will be useful, 373 * but WITHOUT ANY WARRANTY; without even the implied warranty of 374 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 375 * Lesser General Public License for more details. 376 */ 377!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=function(t,r){return void 0===r&&(r="undefined"!=typeof window?require("jquery"):require("jquery")(t)),e(r),r}:e(jQuery)}(function(e){"use strict";function t(t){var r=t.data;t.isDefaultPrevented()||(t.preventDefault(),e(t.target).closest("form").ajaxSubmit(r))}function r(t){var r=t.target,a=e(r);if(!a.is("[type=submit],[type=image]")){var n=a.closest("[type=submit]");if(0===n.length)return;r=n[0]}var i=r.form;if(i.clk=r,"image"===r.type)if(void 0!==t.offsetX)i.clk_x=t.offsetX,i.clk_y=t.offsetY;else if("function"==typeof e.fn.offset){var o=a.offset();i.clk_x=t.pageX-o.left,i.clk_y=t.pageY-o.top}else i.clk_x=t.pageX-r.offsetLeft,i.clk_y=t.pageY-r.offsetTop;setTimeout(function(){i.clk=i.clk_x=i.clk_y=null},100)}function a(){if(e.fn.ajaxSubmit.debug){var t="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(t):window.opera&&window.opera.postError&&window.opera.postError(t)}}var n=/\r?\n/g,i={};i.fileapi=void 0!==e('<input type="file">').get(0).files,i.formdata=void 0!==window.FormData;var o=!!e.fn.prop;e.fn.attr2=function(){if(!o)return this.attr.apply(this,arguments);var e=this.prop.apply(this,arguments);return e&&e.jquery||"string"==typeof e?e:this.attr.apply(this,arguments)},e.fn.ajaxSubmit=function(t,r,n,s){function u(r){var a,n,i=e.param(r,t.traditional).split("&"),o=i.length,s=[];for(a=0;a<o;a++)i[a]=i[a].replace(/\+/g," "),n=i[a].split("="),s.push([decodeURIComponent(n[0]),decodeURIComponent(n[1])]);return s}function c(r){function n(e){var t=null;try{e.contentWindow&&(t=e.contentWindow.document)}catch(e){a("cannot get iframe.contentWindow document: "+e)}if(t)return t;try{t=e.contentDocument?e.contentDocument:e.document}catch(r){a("cannot get iframe.contentDocument: "+r),t=e.document}return t}function i(){function t(){try{var e=n(v).readyState;a("state = "+e),e&&"uninitialized"===e.toLowerCase()&&setTimeout(t,50)}catch(e){a("Server abort: ",e," (",e.name,")"),s(L),j&&clearTimeout(j),j=void 0}}
377var r=p.attr2("target"),i=p.attr2("action"),o=p.attr("enctype")||p.attr("encoding")||"multipart/form-data";w.setAttribute("target",m),l&&!/post/i.test(l)||w.setAttribute("method","POST"),i!==f.url&&w.setAttribute("action",f.url),f.skipEncodingOverride||l&&!/post/i.test(l)||p.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),f.timeout&&(j=setTimeout(function(){T=!0,s(A)},f.timeout));var u=[];try{if(f.extraData)for(var c in f.extraData)f.extraData.hasOwnProperty(c)&&(e.isPlainObject(f.extraData[c])&&f.extraData[c].hasOwnProperty("name")&&f.extraData[c].hasOwnProperty("value")?u.push(e('<input type="hidden" name="'+f.extraData[c].name+'">',k).val(f.extraData[c].value).appendTo(w)[0]):u.push(e('<input type="hidden" name="'+c+'">',k).val(f.extraData[c]).appendTo(w)[0]));f.iframeTarget||h.appendTo(D),v.attachEvent?v.attachEvent("onload",s):v.addEventListener("load",s,!1),setTimeout(t,15);try{w.submit()}catch(e){document.createElement("form").submit.apply(w)}}finally{w.setAttribute("action",i),w.setAttribute("enctype",o),r?w.setAttribute("target",r):p.removeAttr("target"),e(u).remove()}}function s(t){if(!x.aborted&&!X){if((O=n(v))||(a("cannot access response document"),t=L),t===A&&x)return x.abort("timeout"),void S.reject(x,"timeout");if(t===L&&x)return x.abort("server abort"),void S.reject(x,"error","server abort");if(O&&O.location.href!==f.iframeSrc||T){v.detachEvent?v.detachEvent("onload",s):v.removeEventListener("load",s,!1);var r,i="success";try{if(T)throw"timeout";var o="xml"===f.dataType||O.XMLDocument||e.isXMLDoc(O);if(a("isXml="+o),!o&&window.opera&&(null===O.body||!O.body.innerHTML)&&--C)return a("requeing onLoad callback, DOM not available"),void setTimeout(s,250);var u=O.body?O.body:O.documentElement;x.responseText=u?u.innerHTML:null,x.responseXML=O.XMLDocument?O.XMLDocument:O,o&&(f.dataType="xml"),x.getResponseHeader=function(e){return{"content-type":f.dataType}[e.toLowerCase()]},u&&(x.status=Number(u.getAttribute("status"))||x.status,x.statusText=u.getAttribute("statusText")||x.statusText);var c=(f.dataType||"").toLowerCase(),l=/(json|script|text)/.test(c);if(l||f.textarea){var p=O.getElementsByTagName("textarea")[0];if(p)x.responseText=p.value,x.status=Number(p.getAttribute("status"))||x.status,x.statusText=p.getAttribute("statusText")||x.statusText;else if(l){var m=O.getElementsByTagName("pre")[0],g=O.getElementsByTagName("body")[0];m?x.responseText=m.textContent?m.textContent:m.innerText:g&&(x.responseText=g.textContent?g.textContent:g.innerText)}}else"xml"===c&&!x.responseXML&&x.responseText&&(x.responseXML=q(x.responseText));try{M=N(x,c,f)}catch(e){i="parsererror",x.error=r=e||i}}catch(e){a("error caught: ",e),i="error",x.error=r=e||i}x.aborted&&(a("upload aborted"),i=null),x.status&&(i=x.status>=200&&x.status<300||304===x.status?"success":"error"),"success"===i?(f.success&&f.success.call(f.context,M,"success",x),S.resolve(x.responseText,"success",x),d&&e.event.trigger("ajaxSuccess",[x,f])):i&&(void 0===r&&(r=x.statusText),f.error&&f.error.call(f.context,x,i,r),S.reject(x,"error",r),d&&e.event.trigger("ajaxError",[x,f,r])),d&&e.event.trigger("ajaxComplete",[x,f]),d&&!--e.active&&e.event.trigger("ajaxStop"),f.complete&&f.complete.call(f.context,x,i),X=!0,f.timeout&&clearTimeout(j),setTimeout(function(){f.iframeTarget?h.attr("src",f.iframeSrc):h.remove(),x.responseXML=null},100)}}}var u,c,f,d,m,h,v,x,y,b,T,j,w=p[0],S=e.Deferred();if(S.abort=function(e){x.abort(e)},r)for(c=0;c<g.length;c++)u=e(g[c]),o?u.prop("disabled",!1):u.removeAttr("disabled");(f=e.extend(!0,{},e.ajaxSettings,t)).context=f.context||f,m="jqFormIO"+(new Date).getTime();var k=w.ownerDocument,D=p.closest("body");if(f.iframeTarget?(b=(h=e(f.iframeTarget,k)).attr2("name"))?m=b:h.attr2("name",m):(h=e('<iframe name="'+m+'" src="'+f.iframeSrc+'" />',k)).css({position:"absolute",top:"-1000px",left:"-1000px"}),v=h[0],x={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(t){var r="timeout"===t?"timeout":"aborted";a("aborting upload... "+r),this.aborted=1;try{v.contentWindow.document.execCommand&&v.contentWindow.document.execCommand("Stop")}catch(e){}h.attr("src",f.iframeSrc),x.error=r,f.error&&f.error.call(f.context,x,r,t),d&&e.event.trigger("ajaxError",[x,f,r]),f.complete&&f.complete.call(f.context,x,r)}},(d=f.global)&&0==e.active++&&e.event.trigger("ajaxStart"),d&&e.event.trigger("ajaxSend",[x,f]),f.beforeSend&&!1===f.beforeSend.c
377all(f.context,x,f))return f.global&&e.active--,S.reject(),S;if(x.aborted)return S.reject(),S;(y=w.clk)&&(b=y.name)&&!y.disabled&&(f.extraData=f.extraData||{},f.extraData[b]=y.value,"image"===y.type&&(f.extraData[b+".x"]=w.clk_x,f.extraData[b+".y"]=w.clk_y));var A=1,L=2,F=e("meta[name=csrf-token]").attr("content"),E=e("meta[name=csrf-param]").attr("content");E&&F&&(f.extraData=f.extraData||{},f.extraData[E]=F),f.forceSync?i():setTimeout(i,10);var M,O,X,C=50,q=e.parseXML||function(e,t){return window.ActiveXObject?((t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!==t.documentElement.nodeName?t:null},_=e.parseJSON||function(e){return window.eval("("+e+")")},N=function(t,r,a){var n=t.getResponseHeader("content-type")||"",i=("xml"===r||!r)&&n.indexOf("xml")>=0,o=i?t.responseXML:t.responseText;return i&&"parsererror"===o.documentElement.nodeName&&e.error&&e.error("parsererror"),a&&a.dataFilter&&(o=a.dataFilter(o,r)),"string"==typeof o&&(("json"===r||!r)&&n.indexOf("json")>=0?o=_(o):("script"===r||!r)&&n.indexOf("javascript")>=0&&e.globalEval(o)),o};return S}if(!this.length)return a("ajaxSubmit: skipping submit process - no element selected"),this;var l,f,d,p=this;"function"==typeof t?t={success:t}
377:"string"==typeof t||!1===t&&arguments.length>0?(t={url:t,data:r,dataType:n},"function"==typeof s&&(t.success=s)):void 0===t&&(t={}),l=t.method||t.type||this.attr2("method"),(d=(d="string"==typeof(f=t.url||this.attr2("action"))?e.trim(f):"")||window.location.href||"")&&(d=(d.match(/^([^#]+)/)||[])[1]),t=e.extend(!0,{url:d,success:e.ajaxSettings.success,type:l||e.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},t);var m={};if(this.trigger("form-pre-serialize",[this,t,m]),m.veto)return a("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(t.beforeSerialize&&!1===t.beforeSerialize(this,t))return a("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var h=t.traditional;void 0===h&&(h=e.ajaxSettings.traditional);var v,g=[],x=this.formToArray(t.semantic,g,t.filtering);if(t.data){var y=e.isFunction(t.data)?t.data(x):t.data;t.extraData=y,v=e.param(y,h)}if(t.beforeSubmit&&!1===t.beforeSubmit(x,this,t))return a("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[x,this,t,m]),m.veto)return a("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var b=e.param(x,h);v&&(b=b?b+"&"+v:v),"GET"===t.type.toUpperCase()?(t.url+=(t.url.indexOf("?")>=0?"&":"?")+b,t.data=null):t.data=b;var T=[];
377if(t.resetForm&&T.push(function(){p.resetForm()}),t.clearForm&&T.push(function(){p.clearForm(t.includeHidden)}),!t.dataType&&t.target){var j=t.success||function(){};T.push(function(r,a,n){var i=arguments,o=t.replaceTarget?"replaceWith":"html";e(t.target)[o](r).each(function(){j.apply(this,i)})})}else t.success&&(e.isArray(t.success)?e.merge(T,t.success):T.push(t.success));if(t.success=function(e,r,a){for(var n=t.context||this,i=0,o=T.length;i<o;i++)T[i].apply(n,[e,r,a||p,p])},t.error){var w=t.error;t.error=function(e,r,a){var n=t.context||this;w.apply(n,[e,r,a,p])}}if(t.complete){var S=t.complete;t.complete=function(e,r){var a=t.context||this;S.apply(a,[e,r,p])}}var k=e("input[type=file]:enabled",this).filter(function(){return""!==e(this).val()}).length>0,D="multipart/form-data",A=p.attr("enctype")===D||p.attr("encoding")===D,L=i.fileapi&&i.formdata;a("fileAPI :"+L);var F,E=(k||A)&&!L;!1!==t.iframe&&(t.iframe||E)?t.closeKeepAlive?e.get(t.closeKeepAlive,function(){F=c(x)}):F=c(x):F=(k||A)&&L?function(r){for(var a=new FormData,n=0;n<r.length;n++)a.append(r[n].name,r[n].value);if(t.extraData){var i=u(t.extraData);for(n=0;n<i.length;n++)i[n]&&a.append(i[n][0],i[n][1])}t.data=null;var o=e.extend(!0,{},e.ajaxSettings,t,{contentType:!1,processData:!1,cache:!1,type:l||"POST"});t.uploadProgress&&(o.xhr=function(){var r=e.ajaxSettings.xhr();return r.upload&&r.upload.addEventListener("progress",function(e){var r=0,a=e.loaded||e.position,n=e.total;e.lengthComputable&&(r=Math.ceil(a/n*100)),t.uploadProgress(e,a,n,r)},!1),r}),o.data=null;var s=o.beforeSend;return o.beforeSend=function(e,r){t.formData?r.data=t.formData:r.data=a,s&&s.call(this,e,r)},e.ajax(o)}(x):e.ajax(t),p.removeData("jqxhr").data("jqxhr",F);for(var M=0;M<g.length;M++)g[M]=null;return this.trigger("form-submit-notify",[this,t]),this},e.fn.ajaxForm=function(n,i,o,s){if(("string"==typeof n||!1===n&&arguments.length>0)&&(n={url:n,data:i,dataType:o},"function"==typeof s&&(n.success=s)),n=n||{},n.delegation=n.delegation&&e.isFunction(e.fn.on),!n.delegation&&0===this.length){var u={s:this.selector,c:this.context};return!e.isReady&&u.s?(a("DOM not ready, queuing ajaxForm"),e(function(){e(u.s,u.c).ajaxForm(n)}),this):(a("terminating; zero elements found by selector"+(e.isReady?"":" (DOM not ready)")),this)}return n.delegation?(e(document).off("submit.form-plugin",this.selector,t).off("click.form-plugin",this.selector,r).on("submit.form-plugin",this.selector,n,t).on("click.form-plugin",this.selector,n,r),this):this.ajaxFormUnbind().on("submit.form-plugin",n,t).on("click.form-plugin",n,r)},e.fn.ajaxFormUnbind=function(){return this.off("submit.form-plugin click.form-plugin")},e.fn.formToArray=function(t,r,a){var n=[];if(0===this.length)return n;var o,s=this[0],u=this.attr("id"),c=t||void 0===s.elements?s.getElementsByTagName("*"):s.elements;if(c&&(c=e.makeArray(c)),u&&(t||/(Edge|Trident)\//.test(navigator.userAgent))&&(o=e(':input[form="'+u+'"]').get()).length&&(c=(c||[]).concat(o)),!c||!c.length)return n;e.isFunction(a)&&(c=e.map(c,a));var l,f,d,p,m,h,v;for(l=0,h=c.length;l<h;l++)if(m=c[l],(d=m.name)&&!m.disabled)if(t&&s.clk&&"image"===m.type)s.clk===m&&(n.push({name:d,value:e(m).val(),type:m.type}),n.push({name:d+".x",value:s.clk_x},{name:d+".y",value:s.clk_y}));else if((p=e.fieldValue(m,!0))&&p.constructor===Array)for(r&&r.push(m),f=0,v=p.length;f<v;f++)n.push({name:d,value:p[f]});else if(i.fileapi&&"file"===m.type){r&&r.push(m);var g=m.files;if(g.length)for(f=0;f<g.length;f++)n.push({name:d,value:g[f],type:m.type});else n.push({name:d,value:"",type:m.type})}else null!==p&&void 0!==p&&(r&&r.push(m),n.push({name:d,value:p,type:m.type,required:m.required}));if(!t&&s.clk){var x=e(s.clk),y=x[0];(d=y.name)&&!y.disabled&&"image"===y.type&&(n.push({name:d,value:x.val()}),n.push({name:d+".x",value:s.clk_x},{name:d+".y",value:s.clk_y}))}return n},e.fn.formSerialize=function(t){return e.param(this.formToArray(t))},e.fn.fieldSerialize=function(t){var r=[];return this.each(function(){var a=this.name;if(a){var n=e.fieldValue(this,t);if(n&&n.constructor===Array)for(var i=0,o=n.length;i<o;i++)r.push({name:a,value:n[i]});else null!==n&&void 0!==n&&r.push({name:this.name,value:n})}}),e.param(r)},e.fn.fieldValue=function(t){for(var r=[],a=0,n=this.length;a<n;a++){var i=this[a],o=e.fieldValue(i,t);null===o||void 0===o||o.constructor===Array&&!o.length||(o.constructor===Array?e.merge(r,o):r.push(o))}return r},e.fieldValue=function(t,r){var a=t.name,i=t.type,o=t.tagName.toLowerCase();if(void 0===r&&(r=!0),r&&(!a||t.disabled||"reset"===i||"button"===i||("checkbox"===i||"radio"===i)&&!t.checked||("submit"===i||"image"===i)&&t.form&&t.form.clk!==t||"select"===o&&-1===t.selectedIndex))return null;if("select"===o){var s=t.selectedIndex;if(s<0)return null;for(var u=[],c=t.options,l="select-one"===i,f=l?s+1:c.length,d=l?s:0;d<f;d++){var p=c[d];if(p.selected&&!p.disabled){var m=p.value;if(m||(m=p.attributes&&p.attributes.value&&!p.attributes.value.specified?p.text:p.value),l)return m;u.push(m)}}return u}return e(t).val().replace(n,"\r\n")},e.fn.clearForm=function(t){return this.each(function(){e("input,select,textarea",this).clearFields(t)})},e.fn.clearFields=e.fn.clearInputs=function(t){var r=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var a=this.type,n=this.tagName.toLowerCase();r.test(a)||"textarea"===n?this.value="":"checkbox"===a||"radio"===a?this.checked=!1:"select"===n?this.selectedIndex=-1:"file"===a?/MSIE/.test(navigator.userAgent)?e(this).replaceWith(e(this).clone(!0)):e(this).val(""):t&&(!0===t&&/hidden/.test(a)||"string"==typeof t&&e(this).is(t))&&(this.value="")}
377)},e.fn.resetForm=function(){return this.each(function(){var t=e(this),r=this.tagName.toLowerCase();switch(r){case"input":this.checked=this.defaultChecked;case"textarea":return this.value=this.defaultValue,!0;case"option":case"optgroup":var a=t.parents("select");return a.length&&a[0].multiple?"option"===r?this.selected=this.defaultSelected:t.find("option").resetForm():a.resetForm(),!0;case"select":return t.find("option").each(function(e){if(this.selected=this.defaultSelected,this.defaultSelected&&!t[0].multiple)return t[0].selectedIndex=e,!1}),!0;case"label":var n=e(t.attr("for")),i=t.find("input,select,textarea");return n[0]&&i.unshift(n[0]),i.resetForm(),!0;case"form":return("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset(),!0;default:return t.find("form,input,label,select,textarea").resetForm(),!0}})},e.fn.enable=function(e){return void 0===e&&(e=!0),this.each(function(){this.disabled=!e})},e.fn.selected=function(t){return void 0===t&&(t=!0),this.each(function(){var r=this.type;if("checkbox"===r||"radio"===r)this.checked=t;else if("option"===this.tagName.toLowerCase()){var a=e(this).parent("select");t&&a[0]&&"select-one"===a[0].type&&a.find("option").selected(!1),this.selected=t}})},e.fn.ajaxSubmit.debug=!1}); 378 379; 380/** 381* DO NOT EDIT THIS FILE. 382* See the following change record for more information, 383* https://www.drupal.org/node/2815083 384* @preserve 385**/ 386 387(function ($, Drupal) { 388 Drupal.theme.progressBar = function (id) { 389 return '<div id="' + id + '" class="progress" aria-live="polite">' + '<div class="progress__label"> </div>' + '<div class="progress__track"><div class="progress__bar"></div></div>' + '<div class="progress__percentage"></div>' + '<div class="progress__description"> </div>' + '</div>'; 390 }; 391 392 Drupal.ProgressBar = function (id, updateCallback, method, errorCallback) { 393 this.id = id; 394 this.method = method || 'GET'; 395 this.updateCallback = updateCallback; 396 this.errorCallback = errorCallback; 397 398 this.element = $(Drupal.theme('progressBar', id)); 399 }; 400 401 $.extend(Drupal.ProgressBar.prototype, { 402 setProgress: function setProgress(percentage, message, label) { 403 if (percentage >= 0 && percentage <= 100) { 404 $(this.element).find('div.progress__bar').css('width', percentage + '%'); 405 $(this.element).find('div.progress__percentage').html(percentage + '%'); 406 } 407 $('div.progress__description', this.element).html(message); 408 $('div.progress__label', this.element).html(label); 409 if (this.updateCallback) { 410 this.updateCallback(percentage, message, this); 411 } 412 }, 413 startMonitoring: function startMonitoring(uri, delay) { 414 this.delay = delay; 415 this.uri = uri; 416 this.sendPing(); 417 }, 418 stopMonitoring: function stopMonitoring() { 419 clearTimeout(this.timer); 420 421 this.uri = null; 422 }, 423 sendPing: function sendPing() { 424 if (this.timer) { 425 clearTimeout(this.timer); 426 } 427 if (this.uri) { 428 var pb = this; 429 430 var uri = this.uri; 431 if (uri.indexOf('?') === -1) { 432 uri += '?'; 433 } else { 434 uri += '&'; 435 } 436 uri += '_format=json'; 437 $.ajax({ 438 type: this.method, 439 url: uri, 440 data: '', 441 dataType: 'json', 442 success: function success(progress) { 443 if (progress.status === 0) { 444 pb.displayError(progress.data); 445 return; 446 } 447 448 pb.setProgress(progress.percentage, progress.message, progress.label); 449 450 pb.timer = setTimeout(function () { 451 pb.sendPing(); 452 }, pb.delay); 453 }, 454 error: function error(xmlhttp) { 455 var e = new Drupal.AjaxError(xmlhttp, pb.uri); 456 pb.displayError('<pre>' + e.message + '</pre>'); 457 } 458 }); 459 } 460 }, 461 displayError: function displayError(string) { 462 var error = $('<div class="messages messages--error"></div>').html(string); 463 $(this.element).before(error).hide(); 464 465 if (this.errorCallback) { 466 this.errorCallback(this); 467 } 468 } 469 }); 470})(jQuery, Drupal);; 471/** 472* DO NOT EDIT THIS FILE. 473* See the following change record for more information, 474* https://www.drupal.org/node/2815083 475* @preserve 476**/ 477 478(function (Drupal) { 479 Drupal.behaviors.responsiveImageAJAX = { 480 attach: function attach() { 481 if (window.picturefill) { 482 window.picturefill(); 483 } 484 } 485 }; 486})(Drupal);; 487/** 488* DO NOT EDIT THIS FILE. 489* See the following change record for more information, 490* https://www.drupal.org/node/2815083 491* @preserve 492**/ 493function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } 494 495(function ($, window, Drupal, drupalSettings) { 496 Drupal.behaviors.AJAX = { 497 attach: function attach(context, settings) { 498 function loadAjaxBehavior(base) { 499 var elementSettings = settings.ajax[base]; 500 if (typeof elementSettings.selector === 'undefined') { 501 elementSettings.selector = '#' + base; 502 } 503 $(elementSettings.selector).once('drupal-ajax').each(function () { 504 elementSettings.element = this; 505 elementSettings.base = base; 506 Drupal.ajax(elementSettings); 507 }); 508 } 509 510 Object.keys(settings.ajax || {}
510).forEach(function (base) { 511 return loadAjaxBehavior(base); 512 }); 513 514 Drupal.ajax.bindAjaxLinks(document.body); 515 516 $('.use-ajax-submit').once('ajax').each(function () { 517 var elementSettings = {}; 518 519 elementSettings.url = $(this.form).attr('action'); 520 521 elementSettings.setClick = true; 522 523 elementSettings.event = 'click'; 524 525 elementSettings.progress = { type: 'throbber' }; 526 elementSettings.base = $(this).attr('id'); 527 elementSettings.element = this; 528 529 Drupal.ajax(elementSettings); 530 }); 531 }, 532 detach: function detach(context, settings, trigger) { 533 if (trigger === 'unload') { 534 Drupal.ajax.expired().forEach(function (instance) { 535 Drupal.ajax.instances[instance.instanceIndex] = null; 536 }); 537 } 538 } 539 }; 540 541 Drupal.AjaxError = function (xmlhttp, uri, customMessage) { 542 var statusCode = void 0; 543 var statusText = void 0; 544 var responseText = void 0; 545 if (xmlhttp.status) { 546 statusCode = '\n' + Drupal.t('An AJAX HTTP error occurred.') + '\n' + Drupal.t('HTTP Result Code: !status', { 547 '!status': xmlhttp.status 548 }); 549 } else { 550 statusCode = '\n' + Drupal.t('An AJAX HTTP request terminated abnormally.'); 551 } 552 statusCode += '\n' + Drupal.t('Debugging information follows.'); 553 var pathText = '\n' + Drupal.t('Path: !uri', { '!uri': uri }); 554 statusText = ''; 555 556 try { 557 statusText = '\n' + Drupal.t('StatusText: !statusText', { 558 '!statusText': $.trim(xmlhttp.statusText) 559 }); 560 } catch (e) {} 561 562 responseText = ''; 563 564 try { 565 responseText = '\n' + Drupal.t('ResponseText: !responseText', { 566 '!responseText': $.trim(xmlhttp.responseText) 567 }); 568 } catch (e) {} 569 570 responseText = responseText.replace(/<("[^"]*"|'[^']*'|[^'">])*>/gi, ''); 571 responseText = responseText.replace(/[\n]+\s+/g, '\n'); 572 573 var readyStateText = xmlhttp.status === 0 ? '\n' + Drupal.t('ReadyState: !readyState', { 574 '!readyState': xmlhttp.readyState 575 }) : ''; 576 577 customMessage = customMessage ? '\n' + Drupal.t('CustomMessage: !customMessage', { 578 '!customMessage': customMessage 579 }) : ''; 580 581 this.message = statusCode + pathText + statusText + customMessage + responseText + readyStateText; 582 583 this.name = 'AjaxError'; 584 }; 585 586 Drupal.AjaxError.prototype = new Error(); 587 Drupal.AjaxError.prototype.constructor = Drupal.AjaxError; 588 589 Drupal.ajax = function (settings) { 590 if (arguments.length !== 1) { 591 throw new Error('Drupal.ajax() function must be called with one configuration object only'); 592 } 593 594 var base = settings.base || false; 595 var element = settings.element || false; 596 delete settings.base; 597 delete settings.element; 598 599 if (!settings.progress && !element) { 600 settings.progress = false; 601 } 602 603 var ajax = new Drupal.Ajax(base, element, settings); 604 ajax.instanceIndex = Drupal.ajax.instances.length; 605 Drupal.ajax.instances.push(ajax); 606 607 return ajax; 608 }; 609 610 Drupal.ajax.instances = []; 611 612 Drupal.ajax.expired = function () { 613 return Drupal.ajax.instances.filter(function (instance) { 614 return instance && instance.element !== false && !document.body.contains(instance.element); 615 }); 616 }; 617 618 Drupal.ajax.bindAjaxLinks = function (element) { 619 $(element).find('.use-ajax').once('ajax').each(function (i, ajaxLink) { 620 var $linkElement = $(ajaxLink); 621 622 var elementSettings = { 623 progress: { type: 'throbber' }, 624 dialogType: $linkElement.data('dialog-type'), 625 dialog: $linkElement.data('dialog-options'), 626 dialogRenderer: $linkElement.data('dialog-renderer'), 627 base: $linkElement.attr('id'), 628 element: ajaxLink 629 }; 630 var href = $linkElement.attr('href'); 631 632 if (href) { 633 elementSettings.url = href; 634 elementSettings.event = 'click'; 635 } 636 Drupal.ajax(elementSettings); 637 }); 638 }; 639 640 Drupal.Ajax = function (base, element, elementSettings) { 641 var defaults = { 642 event: element ? 'mousedown' : null, 643 keypress: true, 644 selector: base ? '#' + base : null, 645 effect: 'none', 646 speed: 'none', 647 method: 'replaceWith', 648 progress: { 649 type: 'throbber', 650 message: Drupal.t('Please wait...') 651 }, 652 submit: { 653 js: true 654 } 655 }; 656 657 $.extend(this, defaults, elementSettings); 658 659 this.commands = new Drupal.AjaxCommands(); 660 661 this.instanceIndex = false;
662 663 if (this.wrapper) { 664 this.wrapper = '#' + this.wrapper; 665 } 666 667 this.element = element; 668 669 this.element_settings = elementSettings; 670 671 this.elementSettings = elementSettings; 672 673 if (this.element && this.element.form) { 674 this.$form = $(this.element.form); 675 } 676 677 if (!this.url) { 678 var $element = $(this.element); 679 if ($element.is('a')) { 680 this.url = $element.attr('href'); 681 } else if (this.element && element.form) { 682 this.url = this.$form.attr('action'); 683 } 684 } 685 686 var originalUrl = this.url; 687 688 this.url = this.url.replace(/\/nojs(\/|$|\?|#)/, '/ajax$1'); 689 690 if (drupalSettings.ajaxTrustedUrl[originalUrl]) { 691 drupalSettings.ajaxTrustedUrl[this.url] = true; 692 } 693 694 var ajax = this; 695 696 ajax.options = { 697 url: ajax.url, 698 data: ajax.submit, 699 beforeSerialize: function beforeSerialize(elementSettings, options) { 700 return ajax.beforeSerialize(elementSettings, options); 701 }, 702 beforeSubmit: function beforeSubmit(formValues, elementSettings, options) { 703 ajax.ajaxing = true; 704 return ajax.beforeSubmit(formValues, elementSettings, options); 705 }, 706 beforeSend: function beforeSend(xmlhttprequest, options) { 707 ajax.ajaxing = true; 708 return ajax.beforeSend(xmlhttprequest, options); 709 }, 710 success: function success(response, status, xmlhttprequest) { 711 if (typeof response === 'string') { 712 response = $.parseJSON(response); 713 } 714 715 if (response !== null && !drupalSettings.ajaxTrustedUrl[ajax.url]) { 716 if (xmlhttprequest.getResponseHeader('X-Drupal-Ajax-Token') !== '1') { 717 var customMessage = Drupal.t('The response failed verification so will not be processed.'); 718 return ajax.error(xmlhttprequest, ajax.url, customMessage); 719 } 720 } 721 722 return ajax.success(response, status); 723 }, 724 complete: function complete(xmlhttprequest, status) { 725 ajax.ajaxing = false; 726 if (status === 'error' || status === 'parsererror') { 727 return ajax.error(xmlhttprequest, ajax.url); 728 } 729 }, 730 731 dataType: 'json', 732 jsonp: false, 733 type: 'POST' 734 }; 735 736 if (elementSettings.dialog) { 737 ajax.options.data.dialogOptions = elementSettings.dialog; 738 } 739 740 if (ajax.options.url.indexOf('?') === -1) { 741 ajax.options.url += '?'; 742 } else { 743 ajax.options.url += '&'; 744 } 745 746 var wrapper = 'drupal_' + (elementSettings.dialogType || 'ajax'); 747 if (elementSettings.dialogRenderer) { 748 wrapper += '.' + elementSettings.dialogRenderer; 749 } 750 ajax.options.url += Drupal.ajax.WRAPPER_FORMAT + '=' + wrapper; 751 752 $(ajax.element).on(elementSettings.event, function (event) { 753 if (!drupalSettings.ajaxTrustedUrl[ajax.url] && !Drupal.url.isLocal(ajax.url)) { 754 throw new Error(Drupal.t('The callback URL is not local and not trusted: !url', { 755 '!url': ajax.url 756 })); 757 } 758 return ajax.eventResponse(this, event); 759 }); 760 761 if (elementSettings.keypress) { 762 $(ajax.element).on('keypress', function (event) { 763 return ajax.keypressResponse(this, event); 764 }); 765 } 766 767 if (elementSettings.prevent) { 768 $(ajax.element).on(elementSettings.prevent, false); 769 } 770 }; 771 772 Drupal.ajax.WRAPPER_FORMAT = '_wrapper_format'; 773 774 Drupal.Ajax.AJAX_REQUEST_PARAMETER = '_drupal_ajax'; 775 776 Drupal.Ajax.prototype.execute = function () { 777 if (this.ajaxing) { 778 return; 779 } 780 781 try { 782 this.beforeSerialize(this.element, this.options); 783 784 return $.ajax(this.options); 785 } catch (e) { 786 this.ajaxing = false; 787 window.alert('An error occurred while attempting to process ' + this.options.url + ': ' + e.message); 788 789 return $.Deferred().reject(); 790 } 791 }; 792 793 Drupal.Ajax.prototype.keypressResponse = function (element, event) { 794 var ajax = this; 795 796 if (event.which === 13 || event.which === 32 && element.type !== 'text' && element.type !== 'textarea' && element.type !== 'tel' && element.type !== 'number') { 797 event.preventDefault(); 798 event.stopPropagation(); 799 $(element).trigger(ajax.elementSettings.event); 800 } 801 }; 802 803 Drupal.Ajax.prototype.eventResponse = function (element, event) { 804 event.preventDefault(); 805 event.stopPropagation(); 806 807 var ajax = this; 808 809 if (ajax.ajaxing) { 810 return; 811 } 812 813 try { 814 if (ajax.$form) { 815 if (ajax.setClick) { 816 element.form.clk = element; 817 } 818 819 ajax.$form.ajaxSubmit(ajax.options); 820 } else { 821 ajax.beforeSerialize(ajax.element, ajax.options); 822 $.ajax(ajax.options); 823 } 824 } catch (e) { 825 ajax.ajaxing = false;
826 window.alert('An error occurred while attempting to process ' + ajax.options.url + ': ' + e.message); 827 } 828 }; 829 830 Drupal.Ajax.prototype.beforeSerialize = function (element, options) { 831 if (this.$form && document.body.contains(this.$form.get(0))) { 832 var settings = this.settings || drupalSettings; 833 Drupal.detachBehaviors(this.$form.get(0), settings, 'serialize'); 834 } 835 836 options.data[Drupal.Ajax.AJAX_REQUEST_PARAMETER] = 1; 837 838 var pageState = drupalSettings.ajaxPageState; 839 options.data['ajax_page_state[theme]'] = pageState.theme; 840 options.data['ajax_page_state[theme_token]'] = pageState.theme_token; 841 options.data['ajax_page_state[libraries]'] = pageState.libraries; 842 }; 843 844 Drupal.Ajax.prototype.beforeSubmit = function (formValues, element, options) {}; 845 846 Drupal.Ajax.prototype.beforeSend = function (xmlhttprequest, options) { 847 if (this.$form) { 848 options.extraData = options.extraData || {}; 849 850 options.extraData.ajax_iframe_upload = '1'; 851 852 var v = $.fieldValue(this.element); 853 if (v !== null) { 854 options.extraData[this.element.name] = v; 855 } 856 } 857 858 $(this.element).prop('disabled', true); 859 860 if (!this.progress || !this.progress.type) { 861 return; 862 } 863 864 var progressIndicatorMethod = 'setProgressIndicator' + this.progress.type.slice(0, 1).toUpperCase() + this.progress.type.slice(1).toLowerCase(); 865 if (progressIndicatorMethod in this && typeof this[progressIndicatorMethod] === 'function') { 866 this[progressIndicatorMethod].call(this); 867 } 868 }; 869 870 Drupal.theme.ajaxProgressThrobber = function (message) { 871 var messageMarkup = typeof message === 'string' ? Drupal.theme('ajaxProgressMessage', message) : ''; 872 var throbber = '<div class="throbber"> </div>'; 873 874 return '<div class="ajax-progress ajax-progress-throbber">' + throbber + messageMarkup + '</div>'; 875 }; 876 877 Drupal.theme.ajaxProgressIndicatorFullscreen = function () { 878 return '<div class="ajax-progress ajax-progress-fullscreen"> </div>'; 879 }; 880 881 Drupal.theme.ajaxProgressMessage = function (message) { 882 return '<div class="message">' + message + '</div>'; 883 }; 884 885 Drupal.theme.ajaxProgressBar = function ($element) { 886 return $('<div class="ajax-progress ajax-progress-bar"></div>').append($element); 887 }; 888 889 Drupal.Ajax.prototype.setProgressIndicatorBar = function () { 890 var progressBar = new Drupal.ProgressBar('ajax-progress-' + this.element.id, $.noop, this.progress.method, $.noop); 891 if (this.progress.message) { 892 progressBar.setProgress(-1, this.progress.message); 893 } 894 if (this.progress.url) { 895 progressBar.startMonitoring(this.progress.url, this.progress.interval || 1500); 896 } 897 this.progress.element = $(Drupal.theme('ajaxProgressBar', progressBar.element)); 898 this.progress.object = progressBar; 899 $(this.element).after(this.progress.element); 900 }; 901 902 Drupal.Ajax.prototype.setProgressIndicatorThrobber = function () { 903 this.progress.element = $(Drupal.theme('ajaxProgressThrobber', this.progress.message)); 904 $(this.element).after(this.progress.element); 905 }; 906 907 Drupal.Ajax.prototype.setProgressIndicatorFullscreen = function () { 908 this.progress.element = $(Drupal.theme('ajaxProgressIndicatorFullscreen')); 909 $('body').append(this.progress.element); 910 }; 911 912 Drupal.Ajax.prototype.success = function (response, status) { 913 var _this = this; 914 915 if (this.progress.element) { 916 $(this.progress.element).remove(); 917 } 918 if (this.progress.object) { 919 this.progress.object.stopMonitoring(); 920 } 921 $(this.element).prop('disabled', false); 922 923 var elementParents = $(this.element).parents('[data-drupal-selector]').addBack().toArray(); 924 925 var focusChanged = false; 926 Object.keys(response || {}).forEach(function (i) { 927 if (response[i].command && _this.commands[response[i].command]) { 928 _this.commands[response[i].command](_this, response[i], status); 929 if (response[i].command === 'invoke' && response[i].method === 'focus') { 930 focusChanged = true; 931 } 932 } 933 }); 934 935 if (!focusChanged && this.element && !$(this.element).data('disable-refocus')) { 936 var target = false;
937 938 for (var n = elementParents.length - 1; !target && n >= 0; n--) { 939 target = document.querySelector('[data-drupal-selector="' + elementParents[n].getAttribute('data-drupal-selector') + '"]'); 940 } 941 942 if (target) { 943 $(target).trigger('focus'); 944 } 945 } 946 947 if (this.$form && document.body.contains(this.$form.get(0))) { 948 var settings = this.settings || drupalSettings; 949 Drupal.attachBehaviors(this.$form.get(0), settings); 950 } 951 952 this.settings = null; 953 }; 954 955 Drupal.Ajax.prototype.getEffect = function (response) { 956 var type = response.effect || this.effect; 957 var speed = response.speed || this.speed; 958 959 var effect = {}; 960 if (type === 'none') { 961 effect.showEffect = 'show'; 962 effect.hideEffect = 'hide'; 963 effect.showSpeed = ''; 964 } else if (type === 'fade') { 965 effect.showEffect = 'fadeIn'; 966 effect.hideEffect = 'fadeOut'; 967 effect.showSpeed = speed; 968 } else { 969 effect.showEffect = type + 'Toggle'; 970 effect.hideEffect = type + 'Toggle'; 971 effect.showSpeed = speed; 972 } 973 974 return effect; 975 }; 976 977 Drupal.Ajax.prototype.error = function (xmlhttprequest, uri, customMessage) { 978 if (this.progress.element) { 979 $(this.progress.element).remove(); 980 } 981 if (this.progress.object) { 982 this.progress.object.stopMonitoring(); 983 } 984 985 $(this.wrapper).show(); 986 987 $(this.element).prop('disabled', false); 988 989 if (this.$form && document.body.contains(this.$form.get(0))) { 990 var settings = this.settings || drupalSettings; 991 Drupal.attachBehaviors(this.$form.get(0), settings); 992 } 993 throw new Drupal.AjaxError(xmlhttprequest, uri, customMessage); 994 }; 995 996 Drupal.theme.ajaxWrapperNewContent = function ($newContent, ajax, response) { 997 return (response.effect || ajax.effect) !== 'none' && $newContent.filter(function (i) { 998 return !($newContent[i].nodeName === '#comment' || $newContent[i].nodeName === '#text' && /^(\s|\n|\r)*$/.test($newContent[i].textContent)); 999 }).length > 1 ? Drupal.theme('ajaxWrapperMultipleRootElements', $newContent) : $newContent; 1000 }; 1001 1002 Drupal.theme.ajaxWrapperMultipleRootElements = function ($elements) { 1003 return $('<div></div>').append($elements); 1004 }; 1005 1006 Drupal.AjaxCommands = function () {}; 1007 Drupal.AjaxCommands.prototype = { 1008 insert: function insert(ajax, response) { 1009 var $wrapper = response.selector ? $(response.selector) : $(ajax.wrapper); 1010 var method = response.method || ajax.method; 1011 var effect = ajax.getEffect(response); 1012 1013 var settings = response.settings || ajax.settings || drupalSettings; 1014 1015 var $newContent = $($.parseHTML(response.data, document, true)); 1016 1017 $newContent = Drupal.theme('ajaxWrapperNewContent', $newContent, ajax, response); 1018 1019 switch (method) { 1020 case 'html': 1021 case 'replaceWith': 1022 case 'replaceAll': 1023 case 'empty': 1024 case 'remove': 1025 Drupal.detachBehaviors($wrapper.get(0), settings); 1026 break; 1027 default: 1028 break; 1029 } 1030 1031 $wrapper[method]($newContent); 1032 1033 if (effect.showEffect !== 'show') { 1034 $newContent.hide(); 1035 } 1036 1037 var $ajaxNewContent = $newContent.find('.ajax-new-content'); 1038 if ($ajaxNewContent.length) { 1039 $ajaxNewContent.hide(); 1040 $newContent.show(); 1041 $ajaxNewContent[effect.showEffect](effect.showSpeed); 1042 } else if (effect.showEffect !== 'show') { 1043 $newContent[effect.showEffect](effect.showSpeed); 1044 } 1045 1046 if ($newContent.parents('html').length) { 1047 $newContent.each(function (index, element) { 1048 if (element.nodeType === Node.ELEMENT_NODE) { 1049 Drupal.attachBehaviors(element, settings); 1050 } 1051 }); 1052 } 1053 }, 1054 remove: function remove(ajax, response, status) { 1055 var settings = response.settings || ajax.settings || drupalSettings; 1056 $(response.selector).each(function () { 1057 Drupal.detachBehaviors(this, settings); 1058 }).remove(); 1059 }, 1060 changed: function changed(ajax, response, status) { 1061 var $element = $(response.selector); 1062 if (!$element.hasClass('ajax-changed')) { 1063 $element.addClass('ajax-changed'); 1064 if (response.asterisk) { 1065 $element.find(response.asterisk).append(' <abbr class="ajax-changed" title="' + Drupal.t('Changed') + '">*</abbr> '); 1066 } 1067 } 1068 }, 1069 alert: function alert(ajax, response, status) { 1070 window.alert(response.text, response.title); 1071 }, 1072 announce: function announce(ajax, response) { 1073 if (response.priority) { 1074 Drupal.announce(response.text, response.priority); 1075 } else { 1076 Drupal.announce(response.text); 1077 } 1078 }, 1079 redirect: function redirect(ajax, response, status) { 1080 window.location = response.url; 1081 }, 1082 css: function css(ajax, response, status) { 1083 $(response.selector).css(response.argument); 1084 }, 1085 settings: function settings(ajax, response, status) { 1086 var ajaxSettings = drupalSettings.ajax; 1087 1088 if (ajaxSettings) {
1089 Drupal.ajax.expired().forEach(function (instance) { 1090 1091 if (instance.selector) { 1092 var selector = instance.selector.replace('#', ''); 1093 if (selector in ajaxSettings) { 1094 delete ajaxSettings[selector]; 1095 } 1096 } 1097 }); 1098 } 1099 1100 if (response.merge) { 1101 $.extend(true, drupalSettings, response.settings); 1102 } else { 1103 ajax.settings = response.settings; 1104 } 1105 }, 1106 data: function data(ajax, response, status) { 1107 $(response.selector).data(response.name, response.value); 1108 }, 1109 invoke: function invoke(ajax, response, status) { 1110 var $element = $(response.selector); 1111 $element[response.method].apply($element, _toConsumableArray(response.args)); 1112 }, 1113 restripe: function restripe(ajax, response, status) { 1114 $(response.selector).find('> tbody > tr:visible, > tr:visible').removeClass('odd even').filter(':even').addClass('odd').end().filter(':odd').addClass('even'); 1115 }, 1116 update_build_id: function update_build_id(ajax, response, status) { 1117 $('input[name="form_build_id"][value="' + response.old + '"]').val(response.new); 1118 }, 1119 add_css: function add_css(ajax, response, status) { 1120 $('head').prepend(response.data); 1121 }, 1122 message: function message(ajax, response) { 1123 var messages = new Drupal.Message(document.querySelector(response.messageWrapperQuerySelector)); 1124 if (response.clearPrevious) { 1125 messages.clear(); 1126 } 1127 messages.add(response.message, response.messageOptions); 1128 } 1129 }; 1130})(jQuery, window, Drupal, drupalSettings);; 1131/** 1132* DO NOT EDIT THIS FILE. 1133* See the following change record for more information, 1134* https://www.drupal.org/node/2815083 1135* @preserve 1136**/ 1137 1138(function (Drupal) { 1139 Drupal.theme.ajaxProgressBar = function ($element) { 1140 return $element.addClass('ajax-progress ajax-progress-bar'); 1141 }; 1142})(Drupal);; 1143/** 1144* DO NOT EDIT THIS FILE. 1145* See the following change record for more information, 1146* https://www.drupal.org/node/2815083 1147* @preserve 1148**/ 1149 1150(function ($, Drupal, drupalSettings) { 1151 Drupal.Views = {}; 1152 1153 Drupal.Views.parseQueryString = function (query) { 1154 var args = {}; 1155 var pos = query.indexOf('?'); 1156 if (pos !== -1) { 1157 query = query.substring(pos + 1); 1158 } 1159 var pair = void 0; 1160 var pairs = query.split('&'); 1161 for (var i = 0; i < pairs.length; i++) { 1162 pair = pairs[i].split('='); 1163 1164 if (pair[0] !== 'q' && pair[1]) { 1165 args[decodeURIComponent(pair[0].replace(/\+/g, ' '))] = decodeURIComponent(pair[1].replace(/\+/g, ' ')); 1166 } 1167 } 1168 return args; 1169 }; 1170 1171 Drupal.Views.parseViewArgs = function (href, viewPath) { 1172 var returnObj = {}; 1173 var path = Drupal.Views.getPath(href); 1174 1175 var viewHref = Drupal.url(viewPath).substring(drupalSettings.path.baseUrl.length); 1176 1177 if (viewHref && path.substring(0, viewHref.length + 1) === viewHref + '/') { 1178 returnObj.view_args = decodeURIComponent(path.substring(viewHref.length + 1, path.length)); 1179 returnObj.view_path = path; 1180 } 1181 return returnObj; 1182 }; 1183 1184 Drupal.Views.pathPortion = function (href) { 1185 var protocol = window.location.protocol; 1186 if (href.substring(0, protocol.length) === protocol) { 1187 href = href.substring(href.indexOf('/', protocol.length + 2)); 1188 } 1189 return href; 1190 }; 1191 1192 Drupal.Views.getPath = function (href) { 1193 href = Drupal.Views.pathPortion(href); 1194 href = href.substring(drupalSettings.path.baseUrl.length, href.length); 1195 1196 if (href.substring(0, 3) === '?q=') { 1197 href = href.substring(3, href.length); 1198 } 1199 var chars = ['#', '?', '&']; 1200 for (var i = 0; i < chars.length; i++) { 1201 if (href.indexOf(chars[i]) > -1) { 1202 href = href.substr(0, href.indexOf(chars[i])); 1203 } 1204 } 1205 return href; 1206 }; 1207})(jQuery, Drupal, drupalSettings);; 1208/** 1209* DO NOT EDIT THIS FILE. 1210* See the following change record for more information, 1211* https://www.drupal.org/node/2815083 1212* @preserve 1213**/ 1214 1215(function ($, Drupal, drupalSettings) { 1216 Drupal.behaviors.ViewsAjaxView = {}; 1217 Drupal.behaviors.ViewsAjaxView.attach = function (context, settings) { 1218 if (settings && settings.views && settings.views.ajaxViews) { 1219 var ajaxViews = settings.views.ajaxViews; 1220 1221 Object.keys(ajaxViews || {}
1221).forEach(function (i) { 1222 Drupal.views.instances[i] = new Drupal.views.ajaxView(ajaxViews[i]); 1223 }); 1224 } 1225 }; 1226 Drupal.behaviors.ViewsAjaxView.detach = function (context, settings, trigger) { 1227 if (trigger === 'unload') { 1228 if (settings && settings.views && settings.views.ajaxViews) { 1229 var ajaxViews = settings.views.ajaxViews; 1230 1231 Object.keys(ajaxViews || {}).forEach(function (i) { 1232 var selector = '.js-view-dom-id-' + ajaxViews[i].view_dom_id; 1233 if ($(selector, context).length) { 1234 delete Drupal.views.instances[i]; 1235 delete settings.views.ajaxViews[i]; 1236 } 1237 }); 1238 } 1239 } 1240 }; 1241 1242 Drupal.views = {}; 1243 1244 Drupal.views.instances = {}; 1245 1246 Drupal.views.ajaxView = function (settings) { 1247 var selector = '.js-view-dom-id-' + settings.view_dom_id; 1248 this.$view = $(selector); 1249 1250 var ajaxPath = drupalSettings.views.ajax_path; 1251 1252 if (ajaxPath.constructor.toString().indexOf('Array') !== -1) { 1253 ajaxPath = ajaxPath[0]; 1254 } 1255 1256 var queryString = window.location.search || ''; 1257 if (queryString !== '') { 1258 queryString = queryString.slice(1).replace(/q=[^&]+&?|&?render=[^&]+/, ''); 1259 if (queryString !== '') { 1260 queryString = (/\?/.test(ajaxPath) ? '&' : '?') + queryString; 1261 } 1262 } 1263 1264 this.element_settings = { 1265 url: ajaxPath + queryString, 1266 submit: settings, 1267 setClick: true, 1268 event: 'click', 1269 selector: selector, 1270 progress: { type: 'fullscreen' } 1271 }; 1272 1273 this.settings = settings; 1274 1275 this.$exposed_form = $('form#views-exposed-form-' + settings.view_name.replace(/_/g, '-') + '-' + settings.view_display_id.replace(/_/g, '-')); 1276 this.$exposed_form.once('exposed-form').each($.proxy(this.attachExposedFormAjax, this)); 1277 1278 this.$view.filter($.proxy(this.filterNestedViews, this)).once('ajax-pager').each($.proxy(this.attachPagerAjax, this)); 1279 1280 var selfSettings = $.extend({}, this.element_settings, { 1281 event: 'RefreshView', 1282 base: this.selector, 1283 element: this.$view.get(0) 1284 }); 1285 this.refreshViewAjax = Drupal.ajax(selfSettings); 1286 }; 1287 1288 Drupal.views.ajaxView.prototype.attachExposedFormAjax = function () { 1289 var that = this; 1290 this.exposedFormAjax = []; 1291 1292 $('input[type=submit], input[type=image]', this.$exposed_form).not('[data-drupal-selector=edit-reset]').each(function (index) { 1293 var selfSettings = $.extend({}, that.element_settings, { 1294 base: $(this).attr('id'), 1295 element: this 1296 }); 1297 that.exposedFormAjax[index] = Drupal.ajax(selfSettings); 1298 }); 1299 }; 1300 1301 Drupal.views.ajaxView.prototype.filterNestedViews = function () { 1302 return !this.$view.parents('.view').length; 1303 }; 1304 1305 Drupal.views.ajaxView.prototype.attachPagerAjax = function () { 1306 this.$view.find('ul.js-pager__items > li > a, th.views-field a, .attachment .views-summary a').each($.proxy(this.attachPagerLinkAjax, this)); 1307 }; 1308 1309 Drupal.views.ajaxView.prototype.attachPagerLinkAjax = function (id, link) { 1310 var $link = $(link); 1311 var viewData = {}; 1312 var href = $link.attr('href'); 1313 1314 $.extend(viewData, this.settings, Drupal.Views.parseQueryString(href), Drupal.Views.parseViewArgs(href, this.settings.view_base_path)); 1315 1316 var selfSettings = $.extend({}, this.element_settings, {
1317 submit: viewData, 1318 base: false, 1319 element: link 1320 }); 1321 this.pagerAjax = Drupal.ajax(selfSettings); 1322 }; 1323 1324 Drupal.AjaxCommands.prototype.viewsScrollTop = function (ajax, response) { 1325 var offset = $(response.selector).offset(); 1326 1327 var scrollTarget = response.selector; 1328 while ($(scrollTarget).scrollTop() === 0 && $(scrollTarget).parent()) { 1329 scrollTarget = $(scrollTarget).parent(); 1330 } 1331 1332 if (offset.top - 10 < $(scrollTarget).scrollTop()) { 1333 $(scrollTarget).animate({ scrollTop: offset.top - 10 }, 500); 1334 } 1335 }; 1336})(jQuery, Drupal, drupalSettings);; 1337(function (Drupal,$) { 1338 1339 })(Drupal, jQuery); 1340; 1341 1342(function (Drupal, $) { 1343 $(document).ready(function () { 1344 console.log('galerÃa'); 1345 $('.field--name-field-galeria-de-imagenes').each(function () { 1346 var $pic = $(this), 1347 getItems = function () { 1348 var items = []; 1349 $pic.find('> .field__item').each(function () { 1350 var $html; 1351 $img = $(this).find('img'); 1352 $link = $(this).find('a'); 1353 $link.append('<span class="enlace-galeria "></span>'); 1354 console.log($link); 1355 $html = '<div class="image-wrapper">' + $img[0]['outerHTML']; 1356 $html += '</div>'; 1357 var item = { 1358 html: $html, 1359 } 1360 items.push(item); 1361 1362 }); 1363 return items; 1364 } 1365 1366 var items = getItems(); 1367 var $pswp = $('.pswp')[0]; 1368 1369 $('.field--name-field-galeria-de-imagenes').on('click', '.field__item', function (event) { 1370 event.preventDefault(); 1371 event.stopPropagation(); 1372 var $index = $(this.parentElement).find('> .field__item').index(this); 1373 console.log($index ); 1374 var options = { 1375 index: $index, 1376 bgOpacity: 0.9, 1377 showHideOpacity: true, 1378 showAnimationDuration: 400, 1379 hideAnimationDuration: 400, 1380 closeOnScroll: false, 1381 shareEl: false, 1382 closeOnVerticalDrag: false, 1383 } 1384 1385 // Initialize PhotoSwipe 1386 var lightBox = new PhotoSwipe($pswp, PhotoSwipeUI_Default, items, options); 1387 lightBox.init(); 1388 1389 lightBox.listen('preventDragEvent', function(e, isDown, preventObj) { 1390 preventObj.prevent = false; 1391 }); 1392 }); 1393 }); 1394 1395 $(this).on('click', '.pswp__button--close, .pswp__button--arrow--left, .pswp__button--arrow--right', function (event) { 1396 $('.pswp__scroll-wrap iframe').each(function(){ 1397 $(this).attr('src', $(this).attr('src')); 1398 }); 1399 1400 $('.pswp__scroll-wrap video').each(function(){ 1401 $(this).get(0).pause(); 1402 }); 1403 }); 1404 1405 1406 1407 }); 1408})(Drupal, jQuery);; 1409/*! js-cookie v3.0.0-rc.0 | MIT */ 1410!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self,function(){var r=e.Cookies,n=e.Cookies=t();n.noConflict=function(){return e.Cookies=r,n}}())}(this,function(){"use strict";function e(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)e[n]=r[n]}return e}var t={read:function(e){return e.replace(/%3B/g,";")},write:function(e){return e.replace(/;/g,"%3B")}};return function r(n,i){function o(r,o,u){if("undefined"!=typeof document){"number"==typeof(u=e({},i,u)).expires&&(u.expires=new Date(Date.now()+864e5*u.expires)),u.expires&&(u.expires=u.expires.toUTCString()),r=t.write(r).replace(/=/g,"%3D"),o=n.write(String(o),r);var c="";for(var f in u)u[f]&&(c+="; "+f,!0!==u[f]&&(c+="="+u[f].split(";")[0]));return document.cookie=r+"="+o+c}}return Object.create({set:o,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var r=document.cookie?document.cookie.split("; "):[],i={},o=0;o<r.length;o++){var u=r[o].split("="),c=u.slice(1).join("="),f=t.read(u[0]).replace(/%3D/g,"=");if(i[f]=n.read(c,f),e===f)break}return e?i[e]:i}},remove:function(t,r){o(t,"",e({},r,{expires:-1}))},withAttributes:function(t){return r(this.converter,e({},this.attributes,t))},withConverter:function(t){return r(e({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(i)},converter:{value:Object.freeze(n)}})}(t,{path:"/"})}); 1411; 1412/** 1413* DO NOT EDIT THIS FILE. 1414* See the following change record for more information, 1415* https://www.drupal.org/node/2815083 1416* @preserve 1417**/ 1418 1419(function ($, Drupal, cookies) { 1420 var isFunction = function isFunction(obj) { 1421 return Object.prototype.toString.call(obj) === '[object Function]'; 1422 }; 1423 1424 var parseCookieValue = function parseCookieValue(value, parseJson) { 1425 if (value.indexOf('"') === 0) { 1426 value = value.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\'); 1427 } 1428 1429 try { 1430 value = decodeURIComponent(value.replace(/\+/g, ' ')); 1431 return parseJson ? JSON.parse(value) : value; 1432 } catch (e) {} 1433 }; 1434 1435 var reader = function reader(cookieValue, cookieName, converter, readUnsanitized, parseJson) { 1436 var value = readUnsanitized ? cookieValue : parseCookieValue(cookieValue, parseJson); 1437 1438 if (converter !== undefined && isFunction(converter)) { 1439 return converter(value, cookieName); 1440 } 1441 1442 return value; 1443 }; 1444 1445 $.cookie = function (key) { 1446 var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; 1447 var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined; 1448 1449 key = key && !$.cookie.raw ? encodeURIComponent(key) : key; 1450 if (value !== undefined && !isFunction(value)) { 1451 var attributes = Object.assign({}, $.cookie.defaults, options); 1452 1453 if (typeof attributes.expires === 'string' && attributes.expires !== '') { 1454 attributes.expires = new Date(attributes.expires); 1455 } 1456 1457 var cookieSetter = cookies.withConverter({ 1458 write: function write(cookieValue) { 1459 return encodeURIComponent(cookieValue); 1460 } 1461 }); 1462 1463 value = $.cookie.json && !$.cookie.raw ? JSON.stringify(value) : String(value); 1464 1465 return cookieSetter.set(key, value, attributes); 1466 } 1467 1468 var userProvidedConverter = value; 1469 var cookiesShim = cookies.withConverter({ 1470 read: function read(cookieValue, cookieName) { 1471 return reader(cookieValue, cookieName, userProvidedConverter, $.cookie.raw, $.cookie.json); 1472 } 1473 }); 1474 1475 if (key !== undefined) { 1476 return cookiesShim.get(key); 1477 } 1478 1479 var results = cookiesShim.get();
1480 Object.keys(results).forEach(function (resultKey) { 1481 if (results[resultKey] === undefined) { 1482 delete results[resultKey]; 1483 } 1484 }); 1485 1486 return results; 1487 }; 1488 1489 $.cookie.defaults = Object.assign({ path: '' }, cookies.defaults); 1490 1491 $.cookie.json = false; 1492 1493 $.cookie.raw = false; 1494 1495 $.removeCookie = function (key, options) { 1496 cookies.remove(key, Object.assign({}, $.cookie.defaults, options)); 1497 return !cookies.get(key); 1498 }; 1499})(jQuery, Drupal, window.Cookies);;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.