this repo has no description
1var isDev = /dev\./.test(window.location.hostname);
2var _rollbarConfig = {
3 accessToken: 'ec3e07829d324a29abf6c83472a9740d',
4 captureUncaught: true,
5 captureUnhandledRejections: true,
6 enabled: isDev,
7 hostSafeList: ['dev.phanpy.social', 'phanpy.social'],
8 payload: {
9 environment: isDev ? 'development' : 'production',
10 },
11 captureIp: false,
12 scrubTelemetryInputs: true,
13};
14
15// Rollbar Snippet
16!(function (r) {
17 var e = {};
18 function o(n) {
19 if (e[n]) return e[n].exports;
20 var t = (e[n] = { i: n, l: !1, exports: {} });
21 return r[n].call(t.exports, t, t.exports, o), (t.l = !0), t.exports;
22 }
23 (o.m = r),
24 (o.c = e),
25 (o.d = function (r, e, n) {
26 o.o(r, e) || Object.defineProperty(r, e, { enumerable: !0, get: n });
27 }),
28 (o.r = function (r) {
29 'undefined' != typeof Symbol &&
30 Symbol.toStringTag &&
31 Object.defineProperty(r, Symbol.toStringTag, { value: 'Module' }),
32 Object.defineProperty(r, '__esModule', { value: !0 });
33 }),
34 (o.t = function (r, e) {
35 if ((1 & e && (r = o(r)), 8 & e)) return r;
36 if (4 & e && 'object' == typeof r && r && r.__esModule) return r;
37 var n = Object.create(null);
38 if (
39 (o.r(n),
40 Object.defineProperty(n, 'default', { enumerable: !0, value: r }),
41 2 & e && 'string' != typeof r)
42 )
43 for (var t in r)
44 o.d(
45 n,
46 t,
47 function (e) {
48 return r[e];
49 }.bind(null, t),
50 );
51 return n;
52 }),
53 (o.n = function (r) {
54 var e =
55 r && r.__esModule
56 ? function () {
57 return r.default;
58 }
59 : function () {
60 return r;
61 };
62 return o.d(e, 'a', e), e;
63 }),
64 (o.o = function (r, e) {
65 return Object.prototype.hasOwnProperty.call(r, e);
66 }),
67 (o.p = ''),
68 o((o.s = 0));
69})([
70 function (r, e, o) {
71 'use strict';
72 var n = o(1),
73 t = o(5);
74 (_rollbarConfig = _rollbarConfig || {}),
75 (_rollbarConfig.rollbarJsUrl =
76 _rollbarConfig.rollbarJsUrl ||
77 'https://cdn.rollbar.com/rollbarjs/refs/tags/v2.26.4/rollbar.min.js'),
78 (_rollbarConfig.async =
79 void 0 === _rollbarConfig.async || _rollbarConfig.async);
80 var a = n.setupShim(window, _rollbarConfig),
81 l = t(_rollbarConfig);
82 (window.rollbar = n.Rollbar),
83 a.loadFull(window, document, !_rollbarConfig.async, _rollbarConfig, l);
84 },
85 function (r, e, o) {
86 'use strict';
87 var n = o(2),
88 t = o(3);
89 function a(r) {
90 return function () {
91 try {
92 return r.apply(this, arguments);
93 } catch (r) {
94 try {
95 console.error('[Rollbar]: Internal error', r);
96 } catch (r) {}
97 }
98 };
99 }
100 var l = 0;
101 function i(r, e) {
102 (this.options = r), (this._rollbarOldOnError = null);
103 var o = l++;
104 (this.shimId = function () {
105 return o;
106 }),
107 'undefined' != typeof window &&
108 window._rollbarShims &&
109 (window._rollbarShims[o] = { handler: e, messages: [] });
110 }
111 var s = o(4),
112 d = function (r, e) {
113 return new i(r, e);
114 },
115 c = function (r) {
116 return new s(d, r);
117 };
118 function u(r) {
119 return a(function () {
120 var e = this,
121 o = Array.prototype.slice.call(arguments, 0),
122 n = { shim: e, method: r, args: o, ts: new Date() };
123 window._rollbarShims[this.shimId()].messages.push(n);
124 });
125 }
126 (i.prototype.loadFull = function (r, e, o, n, t) {
127 var l = !1,
128 i = e.createElement('script'),
129 s = e.getElementsByTagName('script')[0],
130 d = s.parentNode;
131 (i.crossOrigin = ''),
132 (i.src = n.rollbarJsUrl),
133 o || (i.async = !0),
134 (i.onload = i.onreadystatechange =
135 a(function () {
136 if (
137 !(
138 l ||
139 (this.readyState &&
140 'loaded' !== this.readyState &&
141 'complete' !== this.readyState)
142 )
143 ) {
144 i.onload = i.onreadystatechange = null;
145 try {
146 d.removeChild(i);
147 } catch (r) {}
148 (l = !0),
149 (function () {
150 var e;
151 if (void 0 === r._rollbarDidLoad) {
152 e = new Error('rollbar.js did not load');
153 for (var o, n, a, l, i = 0; (o = r._rollbarShims[i++]); )
154 for (o = o.messages || []; (n = o.shift()); )
155 for (a = n.args || [], i = 0; i < a.length; ++i)
156 if ('function' == typeof (l = a[i])) {
157 l(e);
158 break;
159 }
160 }
161 'function' == typeof t && t(e);
162 })();
163 }
164 })),
165 d.insertBefore(i, s);
166 }),
167 (i.prototype.wrap = function (r, e, o) {
168 try {
169 var n;
170 if (
171 ((n =
172 'function' == typeof e
173 ? e
174 : function () {
175 return e || {};
176 }),
177 'function' != typeof r)
178 )
179 return r;
180 if (r._isWrap) return r;
181 if (
182 !r._rollbar_wrapped &&
183 ((r._rollbar_wrapped = function () {
184 o && 'function' == typeof o && o.apply(this, arguments);
185 try {
186 return r.apply(this, arguments);
187 } catch (o) {
188 var e = o;
189 throw (
190 (e &&
191 ('string' == typeof e && (e = new String(e)),
192 (e._rollbarContext = n() || {}),
193 (e._rollbarContext._wrappedSource = r.toString()),
194 (window._rollbarWrappedError = e)),
195 e)
196 );
197 }
198 }),
199 (r._rollbar_wrapped._isWrap = !0),
200 r.hasOwnProperty)
201 )
202 for (var t in r)
203 r.hasOwnProperty(t) && (r._rollbar_wrapped[t] = r[t]);
204 return r._rollbar_wrapped;
205 } catch (e) {
206 return r;
207 }
208 });
209 for (
210 var p =
211 'log,debug,info,warn,warning,error,critical,global,configure,handleUncaughtException,handleAnonymousErrors,handleUnhandledRejection,captureEvent,captureDomContentLoaded,captureLoad'.split(
212 ',',
213 ),
214 f = 0;
215 f < p.length;
216 ++f
217 )
218 i.prototype[p[f]] = u(p[f]);
219 r.exports = {
220 setupShim: function (r, e) {
221 if (r) {
222 var o = e.globalAlias || 'Rollbar';
223 if ('object' == typeof r[o]) return r[o];
224 (r._rollbarShims = {}), (r._rollbarWrappedError = null);
225 var l = new c(e);
226 return a(function () {
227 e.captureUncaught &&
228 ((l._rollbarOldOnError = r.onerror),
229 n.captureUncaughtExceptions(r, l, !0),
230 e.wrapGlobalEventHandlers && t(r, l, !0)),
231 e.captureUnhandledRejections &&
232 n.captureUnhandledRejections(r, l, !0);
233 var a = e.autoInstrument;
234 return (
235 !1 !== e.enabled &&
236 (void 0 === a ||
237 !0 === a ||
238 (function (r) {
239 return !(
240 'object' != typeof r ||
241 (void 0 !== r.page && !r.page)
242 );
243 })(a)) &&
244 r.addEventListener &&
245 (r.addEventListener('load', l.captureLoad.bind(l)),
246 r.addEventListener(
247 'DOMContentLoaded',
248 l.captureDomContentLoaded.bind(l),
249 )),
250 (r[o] = l),
251 l
252 );
253 })();
254 }
255 },
256 Rollbar: c,
257 };
258 },
259 function (r, e, o) {
260 'use strict';
261 function n(r, e, o, n) {
262 r._rollbarWrappedError &&
263 (n[4] || (n[4] = r._rollbarWrappedError),
264 n[5] || (n[5] = r._rollbarWrappedError._rollbarContext),
265 (r._rollbarWrappedError = null));
266 var t = e.handleUncaughtException.apply(e, n);
267 o && o.apply(r, n), 'anonymous' === t && (e.anonymousErrorsPending += 1);
268 }
269 r.exports = {
270 captureUncaughtExceptions: function (r, e, o) {
271 if (r) {
272 var t;
273 if ('function' == typeof e._rollbarOldOnError)
274 t = e._rollbarOldOnError;
275 else if (r.onerror) {
276 for (t = r.onerror; t._rollbarOldOnError; )
277 t = t._rollbarOldOnError;
278 e._rollbarOldOnError = t;
279 }
280 e.handleAnonymousErrors();
281 var a = function () {
282 var o = Array.prototype.slice.call(arguments, 0);
283 n(r, e, t, o);
284 };
285 o && (a._rollbarOldOnError = t), (r.onerror = a);
286 }
287 },
288 captureUnhandledRejections: function (r, e, o) {
289 if (r) {
290 'function' == typeof r._rollbarURH &&
291 r._rollbarURH.belongsToShim &&
292 r.removeEventListener('unhandledrejection', r._rollbarURH);
293 var n = function (r) {
294 var o, n, t;
295 try {
296 o = r.reason;
297 } catch (r) {
298 o = void 0;
299 }
300 try {
301 n = r.promise;
302 } catch (r) {
303 n = '[unhandledrejection] error getting `promise` from event';
304 }
305 try {
306 (t = r.detail), !o && t && ((o = t.reason), (n = t.promise));
307 } catch (r) {}
308 o || (o = '[unhandledrejection] error getting `reason` from event'),
309 e &&
310 e.handleUnhandledRejection &&
311 e.handleUnhandledRejection(o, n);
312 };
313 (n.belongsToShim = o),
314 (r._rollbarURH = n),
315 r.addEventListener('unhandledrejection', n);
316 }
317 },
318 };
319 },
320 function (r, e, o) {
321 'use strict';
322 function n(r, e, o) {
323 if (e.hasOwnProperty && e.hasOwnProperty('addEventListener')) {
324 for (var n = e.addEventListener; n._rollbarOldAdd && n.belongsToShim; )
325 n = n._rollbarOldAdd;
326 var t = function (e, o, t) {
327 n.call(this, e, r.wrap(o), t);
328 };
329 (t._rollbarOldAdd = n), (t.belongsToShim = o), (e.addEventListener = t);
330 for (
331 var a = e.removeEventListener;
332 a._rollbarOldRemove && a.belongsToShim;
333 )
334 a = a._rollbarOldRemove;
335 var l = function (r, e, o) {
336 a.call(this, r, (e && e._rollbar_wrapped) || e, o);
337 };
338 (l._rollbarOldRemove = a),
339 (l.belongsToShim = o),
340 (e.removeEventListener = l);
341 }
342 }
343 r.exports = function (r, e, o) {
344 if (r) {
345 var t,
346 a,
347 l =
348 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(
349 ',',
350 );
351 for (t = 0; t < l.length; ++t)
352 r[(a = l[t])] && r[a].prototype && n(e, r[a].prototype, o);
353 }
354 };
355 },
356 function (r, e, o) {
357 'use strict';
358 function n(r, e) {
359 (this.impl = r(e, this)),
360 (this.options = e),
361 (function (r) {
362 for (
363 var e = function (r) {
364 return function () {
365 var e = Array.prototype.slice.call(arguments, 0);
366 if (this.impl[r]) return this.impl[r].apply(this.impl, e);
367 };
368 },
369 o =
370 'log,debug,info,warn,warning,error,critical,global,configure,handleUncaughtException,handleAnonymousErrors,handleUnhandledRejection,_createItem,wrap,loadFull,shimId,captureEvent,captureDomContentLoaded,captureLoad'.split(
371 ',',
372 ),
373 n = 0;
374 n < o.length;
375 n++
376 )
377 r[o[n]] = e(o[n]);
378 })(n.prototype);
379 }
380 (n.prototype._swapAndProcessMessages = function (r, e) {
381 var o, n, t;
382 for (this.impl = r(this.options); (o = e.shift()); )
383 (n = o.method),
384 (t = o.args),
385 this[n] &&
386 'function' == typeof this[n] &&
387 ('captureDomContentLoaded' === n || 'captureLoad' === n
388 ? this[n].apply(this, [t[0], o.ts])
389 : this[n].apply(this, t));
390 return this;
391 }),
392 (r.exports = n);
393 },
394 function (r, e, o) {
395 'use strict';
396 r.exports = function (r) {
397 return function (e) {
398 if (!e && !window._rollbarInitialized) {
399 for (
400 var o,
401 n,
402 t = (r = r || {}).globalAlias || 'Rollbar',
403 a = window.rollbar,
404 l = function (r) {
405 return new a(r);
406 },
407 i = 0;
408 (o = window._rollbarShims[i++]);
409 )
410 n || (n = o.handler),
411 o.handler._swapAndProcessMessages(l, o.messages);
412 (window[t] = n), (window._rollbarInitialized = !0);
413 }
414 };
415 };
416 },
417]);
418// End Rollbar Snippet