· 6 years ago · Jan 31, 2020, 03:26 PM
1'use strict';
2(window.NREUM || (NREUM = {})).loader_config = {
3 xpid : "UgEBUlNbGwYEVFRbBAc=",
4 licenseKey : "963e63f096",
5 applicationID : "5405936"
6};
7window.NREUM || (NREUM = {}), __nr_require = function(parentOptions, n, r) {
8 /**
9 * @param {?} o
10 * @return {?}
11 */
12 function s(o) {
13 if (!n[o]) {
14 var u = n[o] = {
15 exports : {}
16 };
17 parentOptions[o][0].call(u.exports, function(e) {
18 var n = parentOptions[o][1][e];
19 return s(n || e);
20 }, u, u.exports);
21 }
22 return n[o].exports;
23 }
24 if ("function" == typeof __nr_require) {
25 return __nr_require;
26 }
27 /** @type {number} */
28 var o = 0;
29 for (; o < r.length; o++) {
30 s(r[o]);
31 }
32 return s;
33}({
34 1 : [function(observable, n, canCreateDiscussions) {
35 /**
36 * @param {string} e
37 * @return {undefined}
38 */
39 function logStack(e) {
40 try {
41 if (a.console) {
42 console.log(e);
43 }
44 } catch (n) {
45 }
46 }
47 var manifestName;
48 var self = observable("ee");
49 var o = observable(20);
50 var a = {};
51 try {
52 manifestName = localStorage.getItem("__nr_flags").split(",");
53 if (console && "function" == typeof console.log) {
54 /** @type {boolean} */
55 a.console = true;
56 if (manifestName.indexOf("dev") !== -1) {
57 /** @type {boolean} */
58 a.dev = true;
59 }
60 if (manifestName.indexOf("nr_dev") !== -1) {
61 /** @type {boolean} */
62 a.nrDev = true;
63 }
64 }
65 } catch (c) {
66 }
67 if (a.nrDev) {
68 self.on("internal-error", function(error) {
69 logStack(error.stack);
70 });
71 }
72 if (a.dev) {
73 self.on("fn-err", function(canCreateDiscussions, n, error) {
74 logStack(error.stack);
75 });
76 }
77 if (a.dev) {
78 logStack("NR AGENT IN DEVELOPMENT MODE");
79 logStack("flags: " + o(a, function(canCreateDiscussions, n) {
80 return canCreateDiscussions;
81 }).join(", "));
82 }
83 }, {}],
84 2 : [function($, n, canCreateDiscussions) {
85 /**
86 * @param {?} test
87 * @param {boolean} error
88 * @param {boolean} type
89 * @param {?} index
90 * @param {?} q
91 * @return {?}
92 */
93 function next(test, error, type, index, q) {
94 try {
95 if (val) {
96 /** @type {number} */
97 val = val - 1;
98 } else {
99 log(q || new TestError(test, error, type), true);
100 }
101 } catch (pathtest3) {
102 try {
103 callback("ierr", [pathtest3, result.now(), true]);
104 } catch (d) {
105 }
106 }
107 return "function" == typeof t && t.apply(this, p(arguments));
108 }
109 /**
110 * @param {string} message
111 * @param {string} error
112 * @param {(number|string)} line
113 * @return {undefined}
114 */
115 function TestError(message, error, line) {
116 this.message = message || "Uncaught error with no additional information";
117 /** @type {string} */
118 this.sourceURL = error;
119 /** @type {(number|string)} */
120 this.line = line;
121 }
122 /**
123 * @param {!Object} data
124 * @param {boolean} limit
125 * @return {undefined}
126 */
127 function log(data, limit) {
128 var results = limit ? null : result.now();
129 callback("err", [data, results]);
130 }
131 var callback = $("handle");
132 var p = $(21);
133 var self = $("ee");
134 var result = $("loader");
135 var coveredByRange = $("gos");
136 /** @type {(function(string, string, number): ?|null)} */
137 var t = window.onerror;
138 /** @type {boolean} */
139 var rett = false;
140 /** @type {string} */
141 var end = "nr@seenError";
142 /** @type {number} */
143 var val = 0;
144 /** @type {boolean} */
145 result.features.err = true;
146 $(1);
147 /** @type {function(?, boolean, boolean, ?, ?): ?} */
148 window.onerror = next;
149 try {
150 throw new Error;
151 } catch (err) {
152 if ("stack" in err) {
153 $(9);
154 $(8);
155 if ("addEventListener" in window) {
156 $(5);
157 }
158 if (result.xhrWrappable) {
159 $(10);
160 }
161 /** @type {boolean} */
162 rett = true;
163 }
164 }
165 self.on("fn-start", function(canCreateDiscussions, n, isSlidingUp) {
166 if (rett) {
167 val = val + 1;
168 }
169 });
170 self.on("fn-err", function(canCreateDiscussions, n, json) {
171 if (rett && !json[end]) {
172 coveredByRange(json, end, function() {
173 return true;
174 });
175 /** @type {boolean} */
176 this.thrown = true;
177 log(json);
178 }
179 });
180 self.on("fn-end", function() {
181 if (rett && !this.thrown && val > 0) {
182 /** @type {number} */
183 val = val - 1;
184 }
185 });
186 self.on("internal-error", function(res) {
187 callback("ierr", [res, result.now(), true]);
188 });
189 }, {}],
190 3 : [function(loaderBeforeEach, n, canCreateDiscussions) {
191 /** @type {boolean} */
192 loaderBeforeEach("loader").features.ins = true;
193 }, {}],
194 4 : [function($, n, canCreateDiscussions) {
195 /**
196 * @param {?} event
197 * @return {undefined}
198 */
199 function onDocumentKeyUp(event) {
200 }
201 if (window.performance && window.performance.timing && window.performance.getEntriesByType) {
202 var o = $("ee");
203 var h = $("handle");
204 var buttons = $(9);
205 var tags = $(8);
206 /** @type {string} */
207 var name = "learResourceTimings";
208 /** @type {string} */
209 var method = "addEventListener";
210 /** @type {string} */
211 var event = "resourcetimingbufferfull";
212 /** @type {string} */
213 var TimeTravelSlider = "bstResource";
214 /** @type {string} */
215 var variable = "resource";
216 /** @type {string} */
217 var i = "-start";
218 /** @type {string} */
219 var _ = "-end";
220 /** @type {string} */
221 var j = "fn" + i;
222 /** @type {string} */
223 var btn = "fn" + _;
224 /** @type {string} */
225 var addr_high = "bstTimer";
226 /** @type {string} */
227 var pluginName = "pushState";
228 var result = $("loader");
229 /** @type {boolean} */
230 result.features.stn = true;
231 $(7);
232 if ("addEventListener" in window) {
233 $(5);
234 }
235 var RoboHydraHeadNotFoundException = NREUM.o.EV;
236 o.on(j, function(nameAndE, n) {
237 var e = nameAndE[0];
238 if (e instanceof RoboHydraHeadNotFoundException) {
239 this.bstStart = result.now();
240 }
241 });
242 o.on(btn, function(nameAndE, imagePicker) {
243 var e = nameAndE[0];
244 if (e instanceof RoboHydraHeadNotFoundException) {
245 h("bst", [e, imagePicker, this.bstStart, result.now()]);
246 }
247 });
248 buttons.on(j, function(isSlidingUp, n, canCreateDiscussions) {
249 this.bstStart = result.now();
250 this.bstType = canCreateDiscussions;
251 });
252 buttons.on(btn, function(canCreateDiscussions, a) {
253 h(addr_high, [a, this.bstStart, result.now(), this.bstType]);
254 });
255 tags.on(j, function() {
256 this.bstStart = result.now();
257 });
258 tags.on(btn, function(canCreateDiscussions, a) {
259 h(addr_high, [a, this.bstStart, result.now(), "requestAnimationFrame"]);
260 });
261 o.on(pluginName + i, function(canCreateDiscussions) {
262 this.time = result.now();
263 /** @type {string} */
264 this.startPath = location.pathname + location.hash;
265 });
266 o.on(pluginName + _, function(canCreateDiscussions) {
267 h("bstHist", [location.pathname + location.hash, this.startPath, this.time]);
268 });
269 if (method in window.performance) {
270 if (window.performance["c" + name]) {
271 window.performance[method](event, function(canCreateDiscussions) {
272 h(TimeTravelSlider, [window.performance.getEntriesByType(variable)]);
273 window.performance["c" + name]();
274 }, false);
275 } else {
276 window.performance[method]("webkit" + event, function(canCreateDiscussions) {
277 h(TimeTravelSlider, [window.performance.getEntriesByType(variable)]);
278 window.performance["webkitC" + name]();
279 }, false);
280 }
281 }
282 document[method]("scroll", onDocumentKeyUp, {
283 passive : true
284 });
285 document[method]("keypress", onDocumentKeyUp, false);
286 document[method]("click", onDocumentKeyUp, false);
287 }
288 }, {}],
289 5 : [function($, parserOptions, canCreateDiscussions) {
290 /**
291 * @param {!Object} object
292 * @return {undefined}
293 */
294 function instanceToString(object) {
295 /** @type {!Object} */
296 var source = object;
297 for (; source && !source.hasOwnProperty(key);) {
298 /** @type {(Object|null)} */
299 source = Object.getPrototypeOf(source);
300 }
301 if (source) {
302 getPrototypeOf(source);
303 }
304 }
305 /**
306 * @param {!Object} o
307 * @return {undefined}
308 */
309 function getPrototypeOf(o) {
310 store.inPlace(o, [key, id], "-", value);
311 }
312 /**
313 * @param {!Object} target
314 * @param {?} type
315 * @return {?}
316 */
317 function value(target, type) {
318 return target[1];
319 }
320 var path = $("ee").get("events");
321 var store = $("wrap-function")(path, true);
322 var select = $("gos");
323 /** @type {function(new:XMLHttpRequest): ?} */
324 var classDefinition = XMLHttpRequest;
325 /** @type {string} */
326 var key = "addEventListener";
327 /** @type {string} */
328 var id = "removeEventListener";
329 parserOptions.exports = path;
330 if ("getPrototypeOf" in Object) {
331 instanceToString(document);
332 instanceToString(window);
333 instanceToString(classDefinition.prototype);
334 } else {
335 if (classDefinition.prototype.hasOwnProperty(key)) {
336 getPrototypeOf(window);
337 getPrototypeOf(classDefinition.prototype);
338 }
339 }
340 path.on(key + "-start", function(res, n) {
341 var f = res[1];
342 var s = select(f, "nr@wrapped", function() {
343 /**
344 * @return {?}
345 */
346 function bind() {
347 if ("function" == typeof f.handleEvent) {
348 return f.handleEvent.apply(f, arguments);
349 }
350 }
351 var value = {
352 object : bind,
353 "function" : f
354 }[typeof f];
355 return value ? store(value, "fn-", null, value.name || "anonymous") : f;
356 });
357 this.wrapped = res[1] = s;
358 });
359 path.on(id + "-start", function(canCreateDiscussions) {
360 canCreateDiscussions[1] = this.wrapped || canCreateDiscussions[1];
361 });
362 }, {}],
363 6 : [function($, module, canCreateDiscussions) {
364 /**
365 * @param {!Window} result
366 * @param {!Object} value
367 * @param {string} name
368 * @return {undefined}
369 */
370 function callback(result, value, name) {
371 var action = result[value];
372 if ("function" == typeof action) {
373 /**
374 * @return {?}
375 */
376 result[value] = function() {
377 var data = extract_data(arguments);
378 var b = {};
379 self.emit(name + "before-start", [data], b);
380 var clientId;
381 if (b[i] && b[i].dt) {
382 clientId = b[i].dt;
383 }
384 var value = action.apply(this, data);
385 return self.emit(name + "start", [data, clientId], value), value.then(function(result) {
386 return self.emit(name + "end", [null, result], value), result;
387 }, function(result) {
388 throw self.emit(name + "end", [result], value), result;
389 });
390 };
391 }
392 }
393 var self = $("ee").get("fetch");
394 var extract_data = $(21);
395 var includes = $(20);
396 module.exports = self;
397 /** @type {!Window} */
398 var res = window;
399 /** @type {string} */
400 var name = "fetch-";
401 /** @type {string} */
402 var message = name + "body-";
403 /** @type {!Array} */
404 var types = ["arrayBuffer", "blob", "json", "text", "formData"];
405 var result = res.Request;
406 var data = res.Response;
407 /** @type {function(this:Window, (Request|string), !RequestInit=): !Promise<Response>} */
408 var fileName = res.fetch;
409 /** @type {string} */
410 var r = "prototype";
411 /** @type {string} */
412 var i = "nr@context";
413 if (result && data && fileName) {
414 includes(types, function(canCreateDiscussions, exisObj) {
415 callback(result[r], exisObj, message);
416 callback(data[r], exisObj, message);
417 });
418 callback(res, "fetch", name);
419 self.on(name + "end", function(host, result) {
420 var value = this;
421 if (result) {
422 var len = result.headers.get("content-length");
423 if (null !== len) {
424 value.rxSize = len;
425 }
426 self.emit(name + "done", [null, result], value);
427 } else {
428 self.emit(name + "done", [host], value);
429 }
430 });
431 }
432 }, {}],
433 7 : [function($, module, canCreateDiscussions) {
434 var output = $("ee").get("history");
435 var css = $("wrap-function")(output);
436 module.exports = output;
437 /** @type {(Function.prototype|null)} */
438 var history = window.history && window.history.constructor && window.history.constructor.prototype;
439 /** @type {!History} */
440 var data = window.history;
441 if (history && history.pushState && history.replaceState) {
442 data = history;
443 }
444 css.inPlace(data, ["pushState", "replaceState"], "-");
445 }, {}],
446 8 : [function($, module, canCreateDiscussions) {
447 var msg = $("ee").get("raf");
448 var parseFloat = $("wrap-function")(msg);
449 /** @type {string} */
450 var t = "equestAnimationFrame";
451 module.exports = msg;
452 parseFloat.inPlace(window, ["r" + t, "mozR" + t, "webkitR" + t, "msR" + t], "raf-");
453 msg.on("raf-start", function(object) {
454 object[0] = parseFloat(object[0], "fn-");
455 });
456 }, {}],
457 9 : [function($, module, canCreateDiscussions) {
458 /**
459 * @param {!Object} key
460 * @param {?} instance
461 * @param {?} fn
462 * @return {undefined}
463 */
464 function r(key, instance, fn) {
465 key[0] = data(key[0], "fn-", null, fn);
466 }
467 /**
468 * @param {!Object} target
469 * @param {?} duration
470 * @param {!Object} fn
471 * @return {undefined}
472 */
473 function Timer(target, duration, fn) {
474 /** @type {!Object} */
475 this.method = fn;
476 /** @type {number} */
477 this.timerDuration = isNaN(target[1]) ? 0 : +target[1];
478 target[0] = data(target[0], "fn-", this, fn);
479 }
480 var test = $("ee").get("timer");
481 var data = $("wrap-function")(test);
482 /** @type {string} */
483 var key = "setTimeout";
484 /** @type {string} */
485 var name = "setInterval";
486 /** @type {string} */
487 var pos = "clearTimeout";
488 /** @type {string} */
489 var method = "-start";
490 /** @type {string} */
491 var i = "-";
492 module.exports = test;
493 data.inPlace(window, [key, "setImmediate"], key + i);
494 data.inPlace(window, [name], name + i);
495 data.inPlace(window, [pos, "clearImmediate"], pos + i);
496 test.on(name + method, r);
497 test.on(key + method, Timer);
498 }, {}],
499 10 : [function(resolve, module, canCreateDiscussions) {
500 /**
501 * @param {!Array} result
502 * @param {!Object} value
503 * @return {undefined}
504 */
505 function cb(result, value) {
506 assert.inPlace(value, ["onreadystatechange"], "fn-", setter);
507 }
508 /**
509 * @return {undefined}
510 */
511 function done() {
512 var context = this;
513 var body = self.context(context);
514 if (context.readyState > 3 && !body.resolved) {
515 /** @type {boolean} */
516 body.resolved = true;
517 self.emit("xhr-resolved", [], context);
518 }
519 assert.inPlace(context, props, "fn-", setter);
520 }
521 /**
522 * @param {!Object} data
523 * @return {undefined}
524 */
525 function query(data) {
526 certs.push(data);
527 if (ObservablePath) {
528 if (b) {
529 b.then(a);
530 } else {
531 if (contains) {
532 contains(a);
533 } else {
534 /** @type {number} */
535 size = -size;
536 /** @type {number} */
537 td.data = size;
538 }
539 }
540 }
541 }
542 /**
543 * @return {undefined}
544 */
545 function a() {
546 /** @type {number} */
547 var i = 0;
548 for (; i < certs.length; i++) {
549 cb([], certs[i]);
550 }
551 if (certs.length) {
552 /** @type {!Array} */
553 certs = [];
554 }
555 }
556 /**
557 * @param {?} prop
558 * @param {?} val
559 * @return {?}
560 */
561 function setter(prop, val) {
562 return val;
563 }
564 /**
565 * @param {!Object} data
566 * @param {!Function} user
567 * @return {?}
568 */
569 function transform(data, user) {
570 var i;
571 for (i in data) {
572 user[i] = data[i];
573 }
574 return user;
575 }
576 resolve(5);
577 var res = resolve("ee");
578 var self = res.get("xhr");
579 var assert = resolve("wrap-function")(self);
580 var i18n = NREUM.o;
581 var type = i18n.XHR;
582 var ObservablePath = i18n.MO;
583 var n = i18n.PR;
584 var contains = i18n.SI;
585 /** @type {string} */
586 var id = "readystatechange";
587 /** @type {!Array} */
588 var props = ["onload", "onerror", "onabort", "onloadstart", "onloadend", "onprogress", "ontimeout"];
589 /** @type {!Array} */
590 var certs = [];
591 module.exports = self;
592 /** @type {function(?): ?} */
593 var ret = window.XMLHttpRequest = function(opts) {
594 var item = new type(opts);
595 try {
596 self.emit("new-xhr", [item], item);
597 item.addEventListener(id, done, false);
598 } catch (fabricObject) {
599 try {
600 self.emit("internal-error", [fabricObject]);
601 } catch (r) {
602 }
603 }
604 return item;
605 };
606 if (transform(type, ret), ret.prototype = type.prototype, assert.inPlace(ret.prototype, ["open", "send"], "-xhr-", setter), self.on("send-xhr-start", function(t, song) {
607 cb(t, song);
608 query(song);
609 }), self.on("open-xhr-start", cb), ObservablePath) {
610 var b = n && n.resolve();
611 if (!contains && !n) {
612 /** @type {number} */
613 var size = 1;
614 /** @type {!Text} */
615 var td = document.createTextNode(size);
616 (new ObservablePath(a)).observe(td, {
617 characterData : true
618 });
619 }
620 } else {
621 res.on("fn-end", function(rows) {
622 if (!(rows[0] && rows[0].type === id)) {
623 a();
624 }
625 });
626 }
627 }, {}],
628 11 : [function(__webpack_require__, mixin, canCreateDiscussions) {
629 /**
630 * @param {!Object} domain
631 * @return {?}
632 */
633 function error(domain) {
634 if (!database_module(domain)) {
635 return null;
636 }
637 var evt = window.NREUM;
638 if (!evt.loader_config) {
639 return null;
640 }
641 var items = (evt.loader_config.accountID || "").toString() || null;
642 var count = (evt.loader_config.agentID || "").toString() || null;
643 var dir = (evt.loader_config.trustKey || "").toString() || null;
644 if (!items || !count) {
645 return null;
646 }
647 var key = __WEBPACK_IMPORTED_MODULE_11_date_fns_end_of_month__.generateCatId();
648 var d = __WEBPACK_IMPORTED_MODULE_11_date_fns_end_of_month__.generateCatId();
649 /** @type {number} */
650 var i = Date.now();
651 var f = replace(key, d, i, items, count, dir);
652 return {
653 header : f,
654 guid : key,
655 traceId : d,
656 timestamp : i
657 };
658 }
659 /**
660 * @param {string} index
661 * @param {string} item
662 * @param {number} file
663 * @param {boolean} val
664 * @param {?} message
665 * @param {boolean} name
666 * @return {?}
667 */
668 function replace(index, item, file, val, message, name) {
669 /** @type {boolean} */
670 var a = "btoa" in window && "function" == typeof window.btoa;
671 if (!a) {
672 return null;
673 }
674 var data = {
675 v : [0, 1],
676 d : {
677 ty : "Browser",
678 ac : val,
679 ap : message,
680 id : index,
681 tr : item,
682 ti : file
683 }
684 };
685 return name && val !== name && (data.d.tk = name), btoa(JSON.stringify(data));
686 }
687 /**
688 * @param {!Object} url
689 * @return {?}
690 */
691 function database_module(url) {
692 /** @type {boolean} */
693 var om = false;
694 /** @type {boolean} */
695 var v = false;
696 var r = {};
697 if ("init" in NREUM && "distributed_tracing" in NREUM.init && (r = NREUM.init.distributed_tracing, v = !!r.enabled), v) {
698 if (url.sameOrigin) {
699 /** @type {boolean} */
700 om = true;
701 } else {
702 if (r.allowed_origins instanceof Array) {
703 /** @type {number} */
704 var i = 0;
705 for (; i < r.allowed_origins.length; i++) {
706 var location = parse(r.allowed_origins[i]);
707 if (url.hostname === location.hostname && url.protocol === location.protocol && url.port === location.port) {
708 /** @type {boolean} */
709 om = true;
710 break;
711 }
712 }
713 }
714 }
715 }
716 return v && om;
717 }
718 var __WEBPACK_IMPORTED_MODULE_11_date_fns_end_of_month__ = __webpack_require__(18);
719 var parse = __webpack_require__(13);
720 mixin.exports = {
721 generateTracePayload : error,
722 shouldGenerateTrace : database_module
723 };
724 }, {}],
725 12 : [function($, n, canCreateDiscussions) {
726 /**
727 * @param {!Object} node
728 * @return {undefined}
729 */
730 function update(node) {
731 var atom = this.params;
732 var test = this.metrics;
733 if (!this.ended) {
734 /** @type {boolean} */
735 this.ended = true;
736 /** @type {number} */
737 var i = 0;
738 for (; i < count; i++) {
739 node.removeEventListener(events[i], this.listener, false);
740 }
741 if (!atom.aborted) {
742 /** @type {number} */
743 test.duration = results.now() - this.startTime;
744 if (this.loadCaptureCalled || 4 !== node.readyState) {
745 if (null == atom.status) {
746 /** @type {number} */
747 atom.status = 0;
748 }
749 } else {
750 init(this, node);
751 }
752 test.cbTime = this.cbTime;
753 me.emit("xhr-done", [node], node);
754 value("xhr", [atom, test, this.startTime]);
755 }
756 }
757 }
758 /**
759 * @param {!Object} x
760 * @param {number} r
761 * @return {?}
762 */
763 function load(x, r) {
764 var responseType = x.responseType;
765 if ("json" === responseType && null !== r) {
766 return r;
767 }
768 var cont_content = "arraybuffer" === responseType || "blob" === responseType || "json" === responseType ? x.response : x.responseText;
769 return cb(cont_content);
770 }
771 /**
772 * @param {!Object} options
773 * @param {?} path
774 * @return {undefined}
775 */
776 function build(options, path) {
777 var relative = require(path);
778 var source = options.params;
779 /** @type {string} */
780 source.host = relative.hostname + ":" + relative.port;
781 source.pathname = relative.pathname;
782 options.parsedOrigin = require(path);
783 options.sameOrigin = options.parsedOrigin.sameOrigin;
784 }
785 /**
786 * @param {!Object} options
787 * @param {!Object} data
788 * @return {undefined}
789 */
790 function init(options, data) {
791 options.params.status = data.status;
792 var ok = load(data, options.lastSize);
793 if (ok && (options.metrics.rxSize = ok), options.sameOrigin) {
794 var componentsStr = data.getResponseHeader("X-NewRelic-App-Data");
795 if (componentsStr) {
796 options.params.cat = componentsStr.split(", ").pop();
797 }
798 }
799 /** @type {boolean} */
800 options.loadCaptureCalled = true;
801 }
802 var results = $("loader");
803 if (results.xhrWrappable) {
804 var value = $("handle");
805 var require = $(13);
806 var getInitOpts = $(11).generateTracePayload;
807 var me = $("ee");
808 /** @type {!Array} */
809 var events = ["load", "error", "abort", "timeout"];
810 /** @type {number} */
811 var count = events.length;
812 var interpolateBar = $("id");
813 var args = $(16);
814 var cb = $(15);
815 /** @type {function(?): ?} */
816 var Object = window.XMLHttpRequest;
817 /** @type {boolean} */
818 results.features.xhr = true;
819 $(10);
820 $(6);
821 me.on("new-xhr", function(element) {
822 var that = this;
823 /** @type {number} */
824 that.totalCbs = 0;
825 /** @type {number} */
826 that.called = 0;
827 /** @type {number} */
828 that.cbTime = 0;
829 /** @type {function(!Object): undefined} */
830 that.end = update;
831 /** @type {boolean} */
832 that.ended = false;
833 that.xhrGuids = {};
834 /** @type {null} */
835 that.lastSize = null;
836 /** @type {boolean} */
837 that.loadCaptureCalled = false;
838 element.addEventListener("load", function(canCreateDiscussions) {
839 init(that, element);
840 }, false);
841 if (!(args && (args > 34 || args < 10) || window.opera)) {
842 element.addEventListener("progress", function(data) {
843 that.lastSize = data.loaded;
844 }, false);
845 }
846 });
847 me.on("open-xhr-start", function(commands) {
848 this.params = {
849 method : commands[0]
850 };
851 build(this, commands[1]);
852 this.metrics = {};
853 });
854 me.on("open-xhr-end", function(canCreateDiscussions, self) {
855 if ("loader_config" in NREUM && "xpid" in NREUM.loader_config && this.sameOrigin) {
856 self.setRequestHeader("X-NewRelic-ID", NREUM.loader_config.xpid);
857 }
858 var opts = getInitOpts(this.parsedOrigin);
859 if (opts && opts.header) {
860 self.setRequestHeader("newrelic", opts.header);
861 this.dt = opts;
862 }
863 });
864 me.on("send-xhr-start", function(oauthConfigs, node) {
865 var m = this.metrics;
866 var params = oauthConfigs[0];
867 var context = this;
868 if (m && params) {
869 var key = cb(params);
870 if (key) {
871 m.txSize = key;
872 }
873 }
874 this.startTime = results.now();
875 /**
876 * @param {!Object} event
877 * @return {undefined}
878 */
879 this.listener = function(event) {
880 try {
881 if (!("abort" !== event.type || context.loadCaptureCalled)) {
882 /** @type {boolean} */
883 context.params.aborted = true;
884 }
885 if ("load" !== event.type || context.called === context.totalCbs && (context.onloadCalled || "function" != typeof node.onload)) {
886 context.end(node);
887 }
888 } catch (data) {
889 try {
890 me.emit("internal-error", [data]);
891 } catch (r) {
892 }
893 }
894 };
895 /** @type {number} */
896 var i = 0;
897 for (; i < count; i++) {
898 node.addEventListener(events[i], this.listener, false);
899 }
900 });
901 me.on("xhr-cb-time", function(canCreateDiscussions, n, source) {
902 this.cbTime += canCreateDiscussions;
903 if (n) {
904 /** @type {boolean} */
905 this.onloadCalled = true;
906 } else {
907 this.called += 1;
908 }
909 if (!(this.called !== this.totalCbs || !this.onloadCalled && "function" == typeof source.onload)) {
910 this.end(source);
911 }
912 });
913 me.on("xhr-load-added", function(t, n) {
914 var indexLookupKey = "" + interpolateBar(t) + !!n;
915 if (this.xhrGuids && !this.xhrGuids[indexLookupKey]) {
916 /** @type {boolean} */
917 this.xhrGuids[indexLookupKey] = true;
918 this.totalCbs += 1;
919 }
920 });
921 me.on("xhr-load-removed", function(t, n) {
922 var indexLookupKey = "" + interpolateBar(t) + !!n;
923 if (this.xhrGuids && this.xhrGuids[indexLookupKey]) {
924 delete this.xhrGuids[indexLookupKey];
925 this.totalCbs -= 1;
926 }
927 });
928 me.on("addEventListener-end", function(canCreateDiscussions, fields) {
929 if (fields instanceof Object && "load" === canCreateDiscussions[0]) {
930 me.emit("xhr-load-added", [canCreateDiscussions[1], canCreateDiscussions[2]], fields);
931 }
932 });
933 me.on("removeEventListener-end", function(canCreateDiscussions, fields) {
934 if (fields instanceof Object && "load" === canCreateDiscussions[0]) {
935 me.emit("xhr-load-removed", [canCreateDiscussions[1], canCreateDiscussions[2]], fields);
936 }
937 });
938 me.on("fn-start", function(tags, bindkey, markName) {
939 if (bindkey instanceof Object) {
940 if ("onload" === markName) {
941 /** @type {boolean} */
942 this.onload = true;
943 }
944 if ("load" === (tags[0] && tags[0].type) || this.onload) {
945 this.xhrCbStart = results.now();
946 }
947 }
948 });
949 me.on("fn-end", function(canCreateDiscussions, input) {
950 if (this.xhrCbStart) {
951 me.emit("xhr-cb-time", [results.now() - this.xhrCbStart, this.onload, input], input);
952 }
953 });
954 me.on("fetch-before-start", function(results) {
955 var id;
956 var properties = results[1] || {};
957 if ("string" == typeof results[0]) {
958 id = results[0];
959 } else {
960 if (results[0] && results[0].url) {
961 id = results[0].url;
962 }
963 }
964 if (id) {
965 this.parsedOrigin = require(id);
966 this.sameOrigin = this.parsedOrigin.sameOrigin;
967 }
968 var opts = getInitOpts(this.parsedOrigin);
969 if (opts && opts.header) {
970 var message = opts.header;
971 if ("string" == typeof results[0]) {
972 var p = {};
973 var j;
974 for (j in properties) {
975 p[j] = properties[j];
976 }
977 /** @type {!Headers} */
978 p.headers = new Headers(properties.headers || {});
979 p.headers.set("newrelic", message);
980 this.dt = opts;
981 if (results.length > 1) {
982 results[1] = p;
983 } else {
984 results.push(p);
985 }
986 } else {
987 if (results[0] && results[0].headers) {
988 results[0].headers.append("newrelic", message);
989 this.dt = opts;
990 }
991 }
992 }
993 });
994 }
995 }, {}],
996 13 : [function(canCreateDiscussions, mixin, isSlidingUp) {
997 var constants = {};
998 /**
999 * @param {string} val
1000 * @return {?}
1001 */
1002 mixin.exports = function(val) {
1003 if (val in constants) {
1004 return constants[val];
1005 }
1006 /** @type {!Element} */
1007 var url = document.createElement("a");
1008 /** @type {!Location} */
1009 var location = window.location;
1010 var options = {};
1011 /** @type {string} */
1012 url.href = val;
1013 options.port = url.port;
1014 var split = url.href.split("://");
1015 if (!options.port && split[1]) {
1016 options.port = split[1].split("/")[0].split("@").pop().split(":")[1];
1017 }
1018 if (!(options.port && "0" !== options.port)) {
1019 /** @type {string} */
1020 options.port = "https" === split[0] ? "443" : "80";
1021 }
1022 options.hostname = url.hostname || location.hostname;
1023 options.pathname = url.pathname;
1024 options.protocol = split[0];
1025 if ("/" !== options.pathname.charAt(0)) {
1026 /** @type {string} */
1027 options.pathname = "/" + options.pathname;
1028 }
1029 /** @type {boolean} */
1030 var newBanIsRemoved = !url.protocol || ":" === url.protocol || url.protocol === location.protocol;
1031 /** @type {boolean} */
1032 var oldBanIsPerm = url.hostname === document.domain && url.port === location.port;
1033 return options.sameOrigin = newBanIsRemoved && (!url.hostname || oldBanIsPerm), "/" === options.pathname && (constants[val] = options), options;
1034 };
1035 }, {}],
1036 14 : [function($, req, canCreateDiscussions) {
1037 /**
1038 * @return {undefined}
1039 */
1040 function HttpMethodElement() {
1041 }
1042 /**
1043 * @param {string} label
1044 * @param {boolean} err
1045 * @param {string} val
1046 * @return {?}
1047 */
1048 function callback(label, err, val) {
1049 return function() {
1050 return debug(label, [l.now()].concat(map(arguments)), err ? null : this, val), err ? void 0 : this;
1051 };
1052 }
1053 var debug = $("handle");
1054 var template = $(20);
1055 var map = $(21);
1056 var self = $("ee").get("tracer");
1057 var l = $("loader");
1058 var result = NREUM;
1059 if ("undefined" == typeof window.newrelic) {
1060 newrelic = result;
1061 }
1062 /** @type {!Array} */
1063 var thinkspec = ["setPageViewName", "setCustomAttribute", "setErrorHandler", "finished", "addToTrace", "inlineHit", "addRelease"];
1064 /** @type {string} */
1065 var i = "api-";
1066 /** @type {string} */
1067 var prefix = i + "ixn-";
1068 template(thinkspec, function(canCreateDiscussions, index) {
1069 result[index] = callback(i + index, true, "api");
1070 });
1071 result.addPageAction = callback(i + "addPageAction", true);
1072 result.setCurrentRouteName = callback(i + "routeName", true);
1073 req.exports = newrelic;
1074 /**
1075 * @return {?}
1076 */
1077 result.interaction = function() {
1078 return (new HttpMethodElement).get();
1079 };
1080 var xhrCallbacks = HttpMethodElement.prototype = {
1081 createTracer : function(name, callback) {
1082 var value = {};
1083 var height = this;
1084 /** @type {boolean} */
1085 var result = "function" == typeof callback;
1086 return debug(prefix + "tracer", [l.now(), name, value], height), function() {
1087 if (self.emit((result ? "" : "no-") + "fn-start", [l.now(), height, result], value), result) {
1088 try {
1089 return callback.apply(this, arguments);
1090 } catch (result) {
1091 throw self.emit("fn-err", [arguments, this, result], value), result;
1092 } finally {
1093 self.emit("fn-end", [l.now()], value);
1094 }
1095 }
1096 };
1097 }
1098 };
1099 template("actionText,setName,setAttribute,save,ignore,onEnd,getContext,end,get".split(","), function(canCreateDiscussions, key) {
1100 xhrCallbacks[key] = callback(prefix + key);
1101 });
1102 /**
1103 * @param {!Object} err
1104 * @param {?} params
1105 * @return {undefined}
1106 */
1107 newrelic.noticeError = function(err, params) {
1108 if ("string" == typeof err) {
1109 /** @type {!Error} */
1110 err = new Error(err);
1111 }
1112 debug("err", [err, l.now(), false, params]);
1113 };
1114 }, {}],
1115 15 : [function(canCreateDiscussions, mixin, isSlidingUp) {
1116 /**
1117 * @param {!Object} value
1118 * @return {?}
1119 */
1120 mixin.exports = function(value) {
1121 if ("string" == typeof value && value.length) {
1122 return value.length;
1123 }
1124 if ("object" == typeof value) {
1125 if ("undefined" != typeof ArrayBuffer && value instanceof ArrayBuffer && value.byteLength) {
1126 return value.byteLength;
1127 }
1128 if ("undefined" != typeof Blob && value instanceof Blob && value.size) {
1129 return value.size;
1130 }
1131 if (!("undefined" != typeof FormData && value instanceof FormData)) {
1132 try {
1133 return JSON.stringify(value).length;
1134 } catch (n) {
1135 return;
1136 }
1137 }
1138 }
1139 };
1140 }, {}],
1141 16 : [function(canCreateDiscussions, module, isSlidingUp) {
1142 /** @type {number} */
1143 var storeMixin = 0;
1144 /** @type {(Array<string>|null)} */
1145 var o = navigator.userAgent.match(/Firefox[\/\s](\d+\.\d+)/);
1146 if (o) {
1147 /** @type {number} */
1148 storeMixin = +o[1];
1149 }
1150 /** @type {number} */
1151 module.exports = storeMixin;
1152 }, {}],
1153 17 : [function(require, n, canCreateDiscussions) {
1154 /**
1155 * @param {?} storage
1156 * @param {?} $location
1157 * @return {undefined}
1158 */
1159 function run(storage, $location) {
1160 var pipelets = storage.getEntries();
1161 pipelets.forEach(function(t) {
1162 if ("first-paint" === t.name) {
1163 size("timing", ["fp", Math.floor(t.startTime)]);
1164 } else {
1165 if ("first-contentful-paint" === t.name) {
1166 size("timing", ["fcp", Math.floor(t.startTime)]);
1167 }
1168 }
1169 });
1170 }
1171 /**
1172 * @param {!Object} e
1173 * @return {undefined}
1174 */
1175 function show(e) {
1176 if (e instanceof Recoverable && !sawCtrlD) {
1177 var fid;
1178 /** @type {number} */
1179 var exports = Math.round(e.timeStamp);
1180 /** @type {number} */
1181 fid = exports > 1E12 ? Date.now() - exports : p.now() - exports;
1182 /** @type {boolean} */
1183 sawCtrlD = true;
1184 size("timing", ["fi", exports, {
1185 type : e.type,
1186 fid : fid
1187 }]);
1188 }
1189 }
1190 if (!("init" in NREUM && "page_view_timing" in NREUM.init && "enabled" in NREUM.init.page_view_timing && NREUM.init.page_view_timing.enabled === false)) {
1191 var observer;
1192 var size = require("handle");
1193 var p = require("loader");
1194 var Recoverable = NREUM.o.EV;
1195 if ("PerformanceObserver" in window && "function" == typeof window.PerformanceObserver) {
1196 /** @type {!PerformanceObserver} */
1197 observer = new PerformanceObserver(run);
1198 try {
1199 observer.observe({
1200 entryTypes : ["paint"]
1201 });
1202 } catch (f) {
1203 }
1204 }
1205 if ("addEventListener" in document) {
1206 /** @type {boolean} */
1207 var sawCtrlD = false;
1208 /** @type {!Array} */
1209 var events = ["click", "keydown", "mousedown", "pointerdown", "touchstart"];
1210 events.forEach(function(t) {
1211 document.addEventListener(t, show, false);
1212 });
1213 }
1214 }
1215 }, {}],
1216 18 : [function(canCreateDiscussions, mixin, isSlidingUp) {
1217 /**
1218 * @return {?}
1219 */
1220 function create() {
1221 /**
1222 * @return {?}
1223 */
1224 function now() {
1225 return i ? 15 & i[c++] : 16 * Math.random() | 0;
1226 }
1227 /** @type {null} */
1228 var i = null;
1229 /** @type {number} */
1230 var c = 0;
1231 var _crypto = window.crypto || window.msCrypto;
1232 if (_crypto && _crypto.getRandomValues) {
1233 i = _crypto.getRandomValues(new Uint8Array(31));
1234 }
1235 var b;
1236 /** @type {string} */
1237 var grandchildren = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx";
1238 /** @type {string} */
1239 var result = "";
1240 /** @type {number} */
1241 var cc = 0;
1242 for (; cc < grandchildren.length; cc++) {
1243 b = grandchildren[cc];
1244 if ("x" === b) {
1245 result = result + now().toString(16);
1246 } else {
1247 if ("y" === b) {
1248 /** @type {number} */
1249 b = 3 & now() | 8;
1250 /** @type {string} */
1251 result = result + b.toString(16);
1252 } else {
1253 /** @type {string} */
1254 result = result + b;
1255 }
1256 }
1257 }
1258 return result;
1259 }
1260 /**
1261 * @return {?}
1262 */
1263 function randomBytes() {
1264 /**
1265 * @return {?}
1266 */
1267 function rng() {
1268 return i ? 15 & i[c++] : 16 * Math.random() | 0;
1269 }
1270 /** @type {null} */
1271 var i = null;
1272 /** @type {number} */
1273 var c = 0;
1274 var _crypto = window.crypto || window.msCrypto;
1275 if (_crypto && _crypto.getRandomValues && Uint8Array) {
1276 i = _crypto.getRandomValues(new Uint8Array(31));
1277 }
1278 /** @type {!Array} */
1279 var outChance = [];
1280 /** @type {number} */
1281 var n = 0;
1282 for (; n < 16; n++) {
1283 outChance.push(rng().toString(16));
1284 }
1285 return outChance.join("");
1286 }
1287 mixin.exports = {
1288 generateUuid : create,
1289 generateCatId : randomBytes
1290 };
1291 }, {}],
1292 19 : [function(canCreateDiscussions, module, isSlidingUp) {
1293 /**
1294 * @param {string} context
1295 * @param {string} returned
1296 * @return {?}
1297 */
1298 function r(context, returned) {
1299 if (!name) {
1300 return false;
1301 }
1302 if (context !== name) {
1303 return false;
1304 }
1305 if (!returned) {
1306 return true;
1307 }
1308 if (!API_VERSION) {
1309 return false;
1310 }
1311 /** @type {!Array<string>} */
1312 var old = API_VERSION.split(".");
1313 var object = returned.split(".");
1314 /** @type {number} */
1315 var j = 0;
1316 for (; j < object.length; j++) {
1317 if (object[j] !== old[j]) {
1318 return false;
1319 }
1320 }
1321 return true;
1322 }
1323 /** @type {null} */
1324 var name = null;
1325 /** @type {null} */
1326 var API_VERSION = null;
1327 /** @type {!RegExp} */
1328 var p = /Version\/(\S+)\s+Safari/;
1329 if (navigator.userAgent) {
1330 /** @type {string} */
1331 var ua = navigator.userAgent;
1332 /** @type {(Array<string>|null)} */
1333 var numpat = ua.match(p);
1334 if (numpat && ua.indexOf("Chrome") === -1 && ua.indexOf("Chromium") === -1) {
1335 /** @type {string} */
1336 name = "Safari";
1337 /** @type {string} */
1338 API_VERSION = numpat[1];
1339 }
1340 }
1341 module.exports = {
1342 agent : name,
1343 version : API_VERSION,
1344 match : r
1345 };
1346 }, {}],
1347 20 : [function(canCreateDiscussions, module, isSlidingUp) {
1348 /**
1349 * @param {!Object} o
1350 * @param {?} n
1351 * @return {?}
1352 */
1353 function s(o, n) {
1354 /** @type {!Array} */
1355 var t = [];
1356 /** @type {string} */
1357 var i = "";
1358 /** @type {number} */
1359 var e = 0;
1360 for (i in o) {
1361 if (hasOwn.call(o, i)) {
1362 t[e] = n(i, o[i]);
1363 /** @type {number} */
1364 e = e + 1;
1365 }
1366 }
1367 return t;
1368 }
1369 /** @type {function(this:Object, *): boolean} */
1370 var hasOwn = Object.prototype.hasOwnProperty;
1371 /** @type {function(!Object, ?): ?} */
1372 module.exports = s;
1373 }, {}],
1374 21 : [function(canCreateDiscussions, u, isSlidingUp) {
1375 /**
1376 * @param {number} name
1377 * @param {number} side
1378 * @param {number} e
1379 * @return {?}
1380 */
1381 function get(name, side, e) {
1382 if (!side) {
1383 /** @type {number} */
1384 side = 0;
1385 }
1386 if ("undefined" == typeof e) {
1387 e = name ? name.length : 0;
1388 }
1389 /** @type {number} */
1390 var i = -1;
1391 /** @type {number} */
1392 var length = e - side || 0;
1393 /** @type {!Array} */
1394 var fns = Array(length < 0 ? 0 : length);
1395 for (; ++i < length;) {
1396 fns[i] = name[side + i];
1397 }
1398 return fns;
1399 }
1400 /** @type {function(number, number, number): ?} */
1401 u.exports = get;
1402 }, {}],
1403 22 : [function(canCreateDiscussions, self, isSlidingUp) {
1404 self.exports = {
1405 exists : "undefined" != typeof window.performance && window.performance.timing && "undefined" != typeof window.performance.timing.navigationStart
1406 };
1407 }, {}],
1408 ee : [function(debounce, blob, canCreateDiscussions) {
1409 /**
1410 * @return {undefined}
1411 */
1412 function Event() {
1413 }
1414 /**
1415 * @param {!Function} cb
1416 * @return {?}
1417 */
1418 function parse(cb) {
1419 /**
1420 * @param {string} e
1421 * @return {?}
1422 */
1423 function copy(e) {
1424 return e && e instanceof Event ? e : e ? fn(e, script, clone) : clone();
1425 }
1426 /**
1427 * @param {string} key
1428 * @param {!Array} value
1429 * @param {string} id
1430 * @param {boolean} object
1431 * @return {?}
1432 */
1433 function done(key, value, id, object) {
1434 if (!self.aborted || object) {
1435 if (cb) {
1436 cb(key, value, id);
1437 }
1438 var b = copy(id);
1439 var handlers = require(key);
1440 var handlerCount = handlers.length;
1441 /** @type {number} */
1442 var j = 0;
1443 for (; j < handlerCount; j++) {
1444 handlers[j].apply(b, value);
1445 }
1446 var cmd = argv[aliases[key]];
1447 return cmd && cmd.push([data, key, value, b]), b;
1448 }
1449 }
1450 /**
1451 * @param {string} name
1452 * @param {!Function} callback
1453 * @return {undefined}
1454 */
1455 function add(name, callback) {
1456 options[name] = require(name).concat(callback);
1457 }
1458 /**
1459 * @param {?} name
1460 * @param {?} version
1461 * @return {undefined}
1462 */
1463 function remove(name, version) {
1464 var keys = options[name];
1465 if (keys) {
1466 /** @type {number} */
1467 var i = 0;
1468 for (; i < keys.length; i++) {
1469 if (keys[i] === version) {
1470 keys.splice(i, 1);
1471 }
1472 }
1473 }
1474 }
1475 /**
1476 * @param {string} packageName
1477 * @return {?}
1478 */
1479 function require(packageName) {
1480 return options[packageName] || [];
1481 }
1482 /**
1483 * @param {string} name
1484 * @return {?}
1485 */
1486 function readEmbeddedObject(name) {
1487 return __mojoServiceRegistry[name] = __mojoServiceRegistry[name] || parse(done);
1488 }
1489 /**
1490 * @param {!Array} callback
1491 * @param {?} name
1492 * @return {undefined}
1493 */
1494 function parse_buffer(callback, name) {
1495 dispatch(callback, function(canCreateDiscussions, controlRef) {
1496 name = name || "feature";
1497 aliases[controlRef] = name;
1498 if (!(name in argv)) {
1499 /** @type {!Array} */
1500 argv[name] = [];
1501 }
1502 });
1503 }
1504 var options = {};
1505 var aliases = {};
1506 var data = {
1507 on : add,
1508 addEventListener : add,
1509 removeEventListener : remove,
1510 emit : done,
1511 get : readEmbeddedObject,
1512 listeners : require,
1513 context : copy,
1514 buffer : parse_buffer,
1515 abort : init,
1516 aborted : false
1517 };
1518 return data;
1519 }
1520 /**
1521 * @return {?}
1522 */
1523 function clone() {
1524 return new Event;
1525 }
1526 /**
1527 * @return {undefined}
1528 */
1529 function init() {
1530 if (argv.api || argv.feature) {
1531 /** @type {boolean} */
1532 self.aborted = true;
1533 argv = self.backlog = {};
1534 }
1535 }
1536 /** @type {string} */
1537 var script = "nr@context";
1538 var fn = debounce("gos");
1539 var dispatch = debounce(20);
1540 var argv = {};
1541 var __mojoServiceRegistry = {};
1542 var self = blob.exports = parse();
1543 self.backlog = argv;
1544 }, {}],
1545 gos : [function(canCreateDiscussions, module, isSlidingUp) {
1546 /**
1547 * @param {!NodeList} object
1548 * @param {number} name
1549 * @param {?} callback
1550 * @return {?}
1551 */
1552 function main(object, name, callback) {
1553 if (hasOwn.call(object, name)) {
1554 return object[name];
1555 }
1556 var result = callback();
1557 if (Object.defineProperty && Object.keys) {
1558 try {
1559 return Object.defineProperty(object, name, {
1560 value : result,
1561 writable : true,
1562 enumerable : false
1563 }), result;
1564 } catch (i) {
1565 }
1566 }
1567 return object[name] = result, result;
1568 }
1569 /** @type {function(this:Object, *): boolean} */
1570 var hasOwn = Object.prototype.hasOwnProperty;
1571 /** @type {function(!NodeList, number, ?): ?} */
1572 module.exports = main;
1573 }, {}],
1574 handle : [function($, module, canCreateDiscussions) {
1575 /**
1576 * @param {string} i
1577 * @param {!Array} m
1578 * @param {string} key
1579 * @param {?} callback
1580 * @return {undefined}
1581 */
1582 function x(i, m, key, callback) {
1583 value.buffer([i], callback);
1584 value.emit(i, m, key);
1585 }
1586 var value = $("ee").get("handle");
1587 /** @type {function(string, !Array, string, ?): undefined} */
1588 module.exports = x;
1589 x.ee = value;
1590 }, {}],
1591 id : [function(require, pkg, canCreateDiscussions) {
1592 /**
1593 * @param {!Object} element
1594 * @return {?}
1595 */
1596 function from(element) {
1597 /** @type {string} */
1598 var type = typeof element;
1599 return !element || "object" !== type && "function" !== type ? -1 : element === window ? 0 : $(element, $dataPreviewPanel, function() {
1600 return o++;
1601 });
1602 }
1603 /** @type {number} */
1604 var o = 1;
1605 /** @type {string} */
1606 var $dataPreviewPanel = "nr@id";
1607 var $ = require("gos");
1608 /** @type {function(!Object): ?} */
1609 pkg.exports = from;
1610 }, {}],
1611 loader : [function(check, self, canCreateDiscussions) {
1612 /**
1613 * @return {?}
1614 */
1615 function init() {
1616 if (!E++) {
1617 var opts = ret.info = NREUM.info;
1618 var wafCss = document.getElementsByTagName("script")[0];
1619 if (setTimeout(promise.abort, 3E4), !(opts && opts.licenseKey && opts.applicationID && wafCss)) {
1620 return promise.abort();
1621 }
1622 error(options, function(pin_code, pinCode) {
1623 if (!opts[pin_code]) {
1624 opts[pin_code] = pinCode;
1625 }
1626 });
1627 test("mark", ["onload", _init() + ret.offset], null, "api");
1628 var expScript = document.createElement("script");
1629 /** @type {string} */
1630 expScript.src = "https://" + opts.agent;
1631 wafCss.parentNode.insertBefore(expScript, wafCss);
1632 }
1633 }
1634 /**
1635 * @return {undefined}
1636 */
1637 function DOMContentLoaded() {
1638 if ("complete" === document.readyState) {
1639 initialize();
1640 }
1641 }
1642 /**
1643 * @return {undefined}
1644 */
1645 function initialize() {
1646 test("mark", ["domContent", _init() + ret.offset], null, "api");
1647 }
1648 /**
1649 * @return {?}
1650 */
1651 function _init() {
1652 return global.exists && performance.now ? Math.round(performance.now()) : (d = Math.max((new Date).getTime(), d)) - ret.offset;
1653 }
1654 /** @type {number} */
1655 var d = (new Date).getTime();
1656 var test = check("handle");
1657 var error = check(20);
1658 var promise = check("ee");
1659 var customUserAgent = check(19);
1660 /** @type {!Window} */
1661 var win = window;
1662 var document = win.document;
1663 /** @type {string} */
1664 var addEventListener = "addEventListener";
1665 /** @type {string} */
1666 var add = "attachEvent";
1667 var parent = win.XMLHttpRequest;
1668 var obj = parent && parent.prototype;
1669 NREUM.o = {
1670 ST : setTimeout,
1671 SI : win.setImmediate,
1672 CT : clearTimeout,
1673 XHR : parent,
1674 REQ : win.Request,
1675 EV : win.Event,
1676 PR : win.Promise,
1677 MO : win.MutationObserver
1678 };
1679 /** @type {string} */
1680 var url = "" + location;
1681 var options = {
1682 beacon : "bam.nr-data.net",
1683 errorBeacon : "bam.nr-data.net",
1684 agent : "js-agent.newrelic.com/nr-1158.min.js"
1685 };
1686 var x = parent && obj && obj[addEventListener] && !/CriOS/.test(navigator.userAgent);
1687 var ret = self.exports = {
1688 offset : d,
1689 now : _init,
1690 origin : url,
1691 features : {},
1692 xhrWrappable : x,
1693 userAgent : customUserAgent
1694 };
1695 check(14);
1696 check(17);
1697 if (document[addEventListener]) {
1698 document[addEventListener]("DOMContentLoaded", initialize, false);
1699 win[addEventListener]("load", init, false);
1700 } else {
1701 document[add]("onreadystatechange", DOMContentLoaded);
1702 win[add]("onload", init);
1703 }
1704 test("mark", ["firstbyte", d], null, "api");
1705 /** @type {number} */
1706 var E = 0;
1707 var global = check(22);
1708 }, {}],
1709 "wrap-function" : [function(errorHandlerInstance, mixin, canCreateDiscussions) {
1710 /**
1711 * @param {!Function} value
1712 * @return {?}
1713 */
1714 function isArray(value) {
1715 return !(value && value instanceof Function && value.apply && !value[name]);
1716 }
1717 var requestHandlerInstance = errorHandlerInstance("ee");
1718 var validateConfig = errorHandlerInstance(21);
1719 /** @type {string} */
1720 var name = "nr@original";
1721 /** @type {function(this:Object, *): boolean} */
1722 var has = Object.prototype.hasOwnProperty;
1723 /** @type {boolean} */
1724 var searchScope = false;
1725 /**
1726 * @param {?} exports
1727 * @param {boolean} name
1728 * @return {?}
1729 */
1730 mixin.exports = function(exports, name) {
1731 /**
1732 * @param {!Function} b
1733 * @param {string} message
1734 * @param {string} callback
1735 * @param {!Object} context
1736 * @return {?}
1737 */
1738 function fn(b, message, callback, context) {
1739 /**
1740 * @return {?}
1741 */
1742 function init() {
1743 var err;
1744 var result;
1745 var d;
1746 var line;
1747 try {
1748 result = this;
1749 err = validateConfig(arguments);
1750 d = "function" == typeof callback ? callback(err, result) : callback || {};
1751 } catch (yFunc) {
1752 test([yFunc, "", [err, result, context], d]);
1753 }
1754 callback(message + "start", [err, result, context], d);
1755 try {
1756 return line = b.apply(result, err);
1757 } catch (undefined) {
1758 throw callback(message + "err", [err, result, undefined], d), undefined;
1759 } finally {
1760 callback(message + "end", [err, result, line], d);
1761 }
1762 }
1763 return isArray(b) ? b : (message || (message = ""), init[name] = b, text(b, init), init);
1764 }
1765 /**
1766 * @param {!Object} obj
1767 * @param {!Array} k
1768 * @param {string} index
1769 * @param {!Function} value
1770 * @return {undefined}
1771 */
1772 function f(obj, k, index, value) {
1773 if (!index) {
1774 /** @type {string} */
1775 index = "";
1776 }
1777 var val;
1778 var key;
1779 var a;
1780 /** @type {boolean} */
1781 var flipIndices = "-" === index.charAt(0);
1782 /** @type {number} */
1783 a = 0;
1784 for (; a < k.length; a++) {
1785 key = k[a];
1786 val = obj[key];
1787 if (!isArray(val)) {
1788 obj[key] = fn(val, flipIndices ? key + index : index, value, key);
1789 }
1790 }
1791 }
1792 /**
1793 * @param {string} a
1794 * @param {!Array} c
1795 * @param {string} d
1796 * @return {undefined}
1797 */
1798 function callback(a, c, d) {
1799 if (!searchScope || name) {
1800 var possibleSearchScope = searchScope;
1801 /** @type {boolean} */
1802 searchScope = true;
1803 try {
1804 exports.emit(a, c, d, name);
1805 } catch (yFunc) {
1806 test([yFunc, a, c, d]);
1807 }
1808 searchScope = possibleSearchScope;
1809 }
1810 }
1811 /**
1812 * @param {!Function} d
1813 * @param {?} o
1814 * @return {?}
1815 */
1816 function text(d, o) {
1817 if (Object.defineProperty && Object.keys) {
1818 try {
1819 /** @type {!Array<string>} */
1820 var linkAmps = Object.keys(d);
1821 return linkAmps.forEach(function(i) {
1822 Object.defineProperty(o, i, {
1823 get : function() {
1824 return d[i];
1825 },
1826 set : function(width) {
1827 return d[i] = width, width;
1828 }
1829 });
1830 }), o;
1831 } catch (yFunc) {
1832 test([yFunc]);
1833 }
1834 }
1835 var i;
1836 for (i in d) {
1837 if (has.call(d, i)) {
1838 o[i] = d[i];
1839 }
1840 }
1841 return o;
1842 }
1843 /**
1844 * @param {!Array} n
1845 * @return {undefined}
1846 */
1847 function test(n) {
1848 try {
1849 exports.emit("internal-error", n);
1850 } catch (e) {
1851 }
1852 }
1853 return exports || (exports = requestHandlerInstance), fn.inPlace = f, fn.flag = name, fn;
1854 };
1855 }, {}]
1856}, {}, ["loader", 2, 12, 4, 3]);