1/** 2* DO NOT EDIT THIS FILE. 3* See the following change record for more information, 4* https://www.drupal.org/node/2815083 5* @preserve 6**/ 7window.Drupal = { 8 behaviors: {}, 9 locale: {} 10}; 11(function (Drupal, drupalSettings, drupalTranslations, console, Proxy, Reflect) { 12 Drupal.throwError = function (error) { 13 setTimeout(function () { 14 throw error; 15 }, 0); 16 }; 17 Drupal.attachBehaviors = function (context, settings) { 18 context = context || document; 19 settings = settings || drupalSettings; 20 var behaviors = Drupal.behaviors; 21 Object.keys(behaviors || {}).forEach(function (i) { 22 if (typeof behaviors[i].attach === 'function') { 23 try { 24 behaviors[i].attach(context, settings); 25 } catch (e) { 26 Drupal.throwError(e); 27 } 28 } 29 }); 30 }; 31 Drupal.detachBehaviors = function (context, settings, trigger) { 32 context = context || document; 33 settings = settings || drupalSettings; 34 trigger = trigger || 'unload'; 35 var behaviors = Drupal.behaviors; 36 Object.keys(behaviors || {}).forEach(function (i) { 37 if (typeof behaviors[i].detach === 'function') { 38 try { 39 behaviors[i].detach(context, settings, trigger); 40 } catch (e) { 41 Drupal.throwError(e); 42 } 43 } 44 }); 45 }; 46 Drupal.checkPlain = function (str) { 47 str = str.toString().replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, '''); 48 return str; 49 }; 50 Drupal.formatString = function (str, args) { 51 var processedArgs = {}; 52 Object.keys(args || {}).forEach(function (key) { 53 switch (key.charAt(0)) { 54 case '@': 55 processedArgs[key] = Drupal.checkPlain(args[key]); 56 break; 57 case '!': 58 processedArgs[key] = args[key]; 59 break; 60 default: 61 processedArgs[key] = Drupal.theme('placeholder', args[key]); 62 break; 63 } 64 }); 65 return Drupal.stringReplace(str, processedArgs, null); 66 }; 67 Drupal.stringReplace = function (str, args, keys) { 68 if (str.length === 0) { 69 return str; 70 } 71 if (!Array.isArray(keys)) { 72 keys = Object.keys(args || {}); 73 keys.sort(function (a, b) { 74 return a.length - b.length; 75 }); 76 } 77 if (keys.length === 0) { 78 return str; 79 } 80 var key = keys.pop(); 81 var fragments = str.split(key); 82 if (keys.length) { 83 for (var i = 0; i < fragments.length; i++) { 84 fragments[i] = Drupal.stringReplace(fragments[i], args, keys.slice(0)); 85 } 86 } 87 return fragments.join(args[key]); 88 }; 89 Drupal.t = function (str, args, options) { 90 options = options || {}; 91 options.context = options.context || ''; 92 if (typeof drupalTranslations !== 'undefined' && drupalTranslations.strings && drupalTranslations.strings[options.context] && drupalTranslations.strings[options.context][str]) { 93 str = drupalTranslations.strings[options.context][str]; 94 } 95 if (args) { 96 str = Drupal.formatString(str, args); 97 } 98 return str; 99 }; 100 Drupal.url = function (path) { 101 return drupalSettings.path.baseUrl + drupalSettings.path.pathPrefix + path; 102 }; 103 Drupal.url.toAbsolute = function (url) { 104 var urlParsingNode = document.createElement('a'); 105 try { 106 url = decodeURIComponent(url); 107 } catch (e) {} 108 urlParsingNode.setAttribute('href', url); 109 return urlParsingNode.cloneNode(false).href; 110 }; 111 Drupal.url.isLocal = function (url) { 112 var absoluteUrl = Drupal.url.toAbsolute(url); 113 var protocol = window.location.protocol; 114 if (protocol === 'http:' && absoluteUrl.indexOf('https:') === 0) { 115 protocol = 'https:'; 116 } 117 var baseUrl = "".concat(protocol, "//").concat(window.location.host).concat(drupalSettings.path.baseUrl.slice(0, -1)); 118 try { 119 absoluteUrl = decodeURIComponent(absoluteUrl); 120 } catch (e) {} 121 try { 122 baseUrl = decodeURIComponent(baseUrl); 123 } catch (e) {} 124 return absoluteUrl === baseUrl || absoluteUrl.indexOf("".concat(baseUrl, "/")) === 0; 125 }; 126 Drupal.formatPlural = function (count, singular, plural, args, options) { 127 args = args || {}; 128 args['@count'] = count; 129 var pluralDelimiter = drupalSettings.pluralDelimiter; 130 var translations = Drupal.t(singular + pluralDelimiter + plural, args, options).split(pluralDelimiter); 131 var index = 0; 132 if (typeof drupalTranslations !== 'undefined' && drupalTranslations.pluralFormula) { 133 index = count in drupalTranslations.pluralFormula ? drupalTranslations.pluralFormula[count] : drupalTranslations.pluralFormula.default; 134 } else if (args['@count'] !== 1) { 135 index = 1; 136 } 137 return translations[index]; 138 }; 139 Drupal.encodePath = function (item) { 140 return window.encodeURIComponent(item).replace(/%2F/g, '/'); 141 }; 142 Drupal.deprecationError = function (_ref) { 143 var message = _ref.message; 144 if (drupalSettings.suppressDeprecationErrors === false && typeof console !== 'undefined' && console.warn) { 145 console.warn("[Deprecation] ".concat(message)); 146 } 147 }; 148 Drupal.deprecatedProperty = function (_ref2) { 149 var target = _ref2.target, 150 deprecatedProperty = _ref2.deprecatedProperty, 151 message = _ref2.message; 152 if (!Proxy || !Reflect) { 153 return target; 154 } 155 return new Proxy(target, { 156 get: function get(target, key) { 157 if (key === deprecatedProperty) { 158 Drupal.deprecationError({ 159 message: message 160 }); 161 } 162 for (var _len = arguments.length, rest = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { 163 rest[_key - 2] = arguments[_key]; 164 } 165 return Reflect.get.apply(Reflect, [target, key].concat(rest)); 166 } 167 }); 168 }; 169 Drupal.theme = function (func) { 170 if (func in Drupal.theme) { 171 var _Drupal$theme; 172 for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { 173 args[_key2 - 1] = arguments[_key2]; 174 }
175 return (_Drupal$theme = Drupal.theme)[func].apply(_Drupal$theme, args); 176 } 177 }; 178 Drupal.theme.placeholder = function (str) { 179 return "<em class=\"placeholder\">".concat(Drupal.checkPlain(str), "</em>"); 180 }; 181})(Drupal, window.drupalSettings, window.drupalTranslations, window.console, window.Proxy, window.Reflect);
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.