PageSourceSearch

https://ohto.ca/sites/default/files/js/optimized/js_V1oRQ-kJlXBZaE…VZj1zEhrh5oWPKChJFj0G7eN4ULI.js?v=9.5.0-dev

js ohto.ca collected 2026-09-26 14:42:29 UTC 6,387 bytes, 215 lines download raw bytes

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