PageSourceSearch

https://hamiltonmusical.com/us-tour/wp-content/plugins/limelight-calendar/public/app.js?ver=1790845646

js hamiltonmusical.com collected 2026-10-01 09:19:38 UTC 25,643 bytes, 654 lines download raw bytes

1(function () {
2    'use strict';
3
4    const daysOfTheWeek = type => {
5      let days;
6      switch (type) {
7        case 'ddd':
8          days = ['S<span>un</span>', 'M<span>on</span>', 'T<span>ue</span>', 'W<span>ed</span>', 'T<span>hu</span>', 'F<span>ri</span>', 'S<span>at</span>'];
9          break;
10        case 'dd':
11          days = ['Su', 'M', 'Tu', 'W', 'Th', 'F', 'Sa'];
12          break;
13        case 'd':
14          days = ['S', 'M', 'T', 'W', 'T', 'F', 'S'];
15          break;
16        default:
17          days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
18          break;
19      }
20      return days;
21    };
22
23    const months = type => {
24      let months;
25      switch (type) {
26        case 'mmm':
27          months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
28          break;
29        case 'm':
30          months = ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'];
31          break;
32        default:
33          months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
34          break;
35      }
36      return months;
37    };
38
39    const renderFormattedDate = (theDate, dateFormat) => {
40      let j = theDate.getDate();
41      let m = theDate.getMonth() + 1; // because January is 0 in the array
42
43      let formattedDate = "";
44      switch (dateFormat) {
45        case "month_day":
46          var monthnames = months('mmm');
47          formattedDate = monthnames[m] + " " + j;
48          break;
49        case "month_day_dash":
50          formattedDate = m + "/" + j;
51          break;
52        case "month_day_dot":
53          formattedDate = m + "." + j;
54          break;
55        default:
56          // case "day"
57          formattedDate = j;
58          break;
59      }
60      return formattedDate;
61    };
62    const renderFormattedMonth = theDate => {
63      let formatMonthName = limelight.data.monthname_date_format;
64      const monthNumber = parseInt(theDate.split('-')[1]); // -1 to coincide with month array
65
66      let formatDate = "";
67      switch (formatMonthName) {
68        case "month_full":
69          formatDate = `${months()[monthNumber - 1]}`;
70          break;
71        case "month_full_year":
72          formatDate = `${months()[monthNumber - 1]} ${theDate.split('-')[0]}`;
73          break;
74        case "mon_year":
75          formatDate = `${months('mmm')[monthNumber - 1]} ${theDate.split('-')[0]}`;
76          break;
77        default:
78          // case "mon"
79          formatDate = `${months('mmm')[monthNumber - 1]}`;
80          break;
81      }
82      return formatDate;
83    };
84
85    /*
86     * Generate the label slug, so everyone thinks it is the same.
87     * @author Aaron Hodge Silver
88     */
89    const generateLabelSlug = label => {
90      var stringtouse;
91      if (label.label_slug) {
92        stringtouse = label.label_slug;
93      } else if (label.label_title) {
94        stringtouse = label.label_title;
95      } else {
96        stringtouse = label;
97      }
98      stringtouse = stringtouse.replace(/[^a-zA-Z0-9\s-]/g, '');
99      return stringtouse.toLowerCase().replace(/\s+/g, '-');
100    };
101
102    /*
103     * Decide which label-related classes belong on this performance.
104     * @author Aaron Hodge Silver
105     */
106    const generateLabelClass = perf => {
107      let labelclass = '';
108
109      // assigning labels based on remaining ticket numbers
110      if (limelight.data.ticket_based_labels.length > 0 && perf.remaining_tickets.length > 0) {
111        // Step 1: Sort the array by max_tickets_remaining (smallest first)
112        limelight.data.ticket_based_labels.sort((a, b) => parseInt(a.max_tickets_remaining) - parseInt(b.max_tickets_remaining));
113
114        // Step 2: Find the first item with max_tickets_remaining less than remaining_tickets
115        let selectedLabel = limelight.data.ticket_based_labels.find(item => parseInt(item.max_tickets_remaining) > parseInt(perf.remaining_tickets));
116        if (selectedLabel) {
117          // console.log(perf.remaining_tickets + ' tickets is fewer tickets than this label\'s max of ' + selectedLabel.max_tickets_remaining);
118          labelclass += ' event-time--' + generateLabelSlug(selectedLabel);
119        }
120        // if this performance doesn't get a tickets-based label, use the manual label
121      } else if (perf.label.length > 0) {
122        labelclass += ' event-time--' + generateLabelSlug(perf.label);
123      }
124      return labelclass;
125    };
126
127    /*
128     * After the calendar has rendered, remove some labels from the legend.
129     * Remove those that should only show if there's at least one matching performance, if there aren't any.
130     * @author Aaron Hodge Silver
131     */
132    const removeLabels = () => {
133      let matchFilters = [];
134      limelight.data.labels.filter(item => {
135        if (item.display_legend == "match") {
136          matchFilters.push(item);
137          return;
138        }
139        return;
140      });
141      matchFilters.forEach(label => {
142        var slug = generateLabelSlug(label);
143        var any_of_these = document.querySelector(".event-time--" + slug);
144        if (!any_of_these) {
145          var labelsToRemove = document.querySelectorAll(".calendar__legend-each-" + slug);
146          labelsToRemove.forEach(element => element.remove());
147        }
148      });
149    };
150
151    const dateIsDark = (thisDate, allShowPerformances) => {
152      let d = thisDate.getDate();
153      let m = thisDate.getMonth() + 1;
154      let y = thisDate.getFullYear();
155      let formattedMonth = m > 9 ? m : '0' + m;
156      let formattedDay = d > 9 ? d : '0' + d;
157      let performanceOperator = y + '-' + formattedMonth + '-' + formattedDay;
158      var dayIsDark = true;
159      allShowPerformances.filter(showPerformance => {
160        if (showPerformance.date === performanceOperator) {
161          dayIsDark = false;
162        }
163      });
164      return dayIsDark;
165    };
166    const renderPerformanceLink = (thisPerformance, allShowPerformances) => {
167      let performanceLink = '';
168      let selectedPerformances = [];
169      let d = thisPerformance.getDate();
170      let m = thisPerformance.getMonth() + 1;
171      let y = thisPerformance.getFullYear();
172      let formattedMonth = m > 9 ? m : '0' + m;
173      let formattedDay = d > 9 ? d : '0' + d;
174      let performanceOperator = y + '-' + formattedMonth + '-' + formattedDay;
175      allShowPerformances.filter(showPerformance => {
176        if (showPerformance.date === performanceOperator) {
177          selectedPerformances.push(showPerformance);
178        }
179      });
180      if (selectedPerformances && selectedPerformances.length > 0) {
181        const sorter = (a, b) => {
182          let first = a.time.split(':')[0];
183          let last = b.time.split(':')[0];
184          return first - last;
185        };
186        selectedPerformances.sort(sorter);
187        for (let index = 0; index < selectedPerformances.length; index++) {
188          const perf = selectedPerformances[index];
189          if (perf.time && perf.url) {
190            var match = perf.time.match(/^(\d+):(\d{2})([ap]m)$/i);
191
192            // Extracting components
193            let perfHour = match[1];
194            let perfMins = match[2];
195            let perfAMPM = match[3];
196
197            // Appointed Classes
198            let performanceClasses = 'event-time';
199            performanceClasses += ' event-time--' + perf.date;
200            performanceClasses += generateLabelClass(perf);
201            performanceLink += `
202                    <a class="${performanceClasses}" href="${perf.url}" target="_blank">
203                        ${`<span class="eth">${perfHour}</span>` + `<span class="etm">:${perfMins}</span>` + `<span class="etampm">${perfAMPM}</span>`}
204                    </a>
205                `;
206          }
207        }
208      }
209      return performanceLink;
210    };
211
212    /*
213     * Create the HTML for the legend, with color-coded boxes.
214     * @author Aaron Hodge Silver
215     */
216
217    const renderLegend = () => {
218      let calLegend = "";
219      let calStyle = "";
220      let legendLabels = [];
221
222      // Ticket Amount-based labels
223      if (limelight.data.ticket_based_labels) {
224        limelight.data.ticket_based_labels.filter(item => {
225          legendLabels.push(item);
226          return;
227        });
228      }
229      // Manually-managed labels
230      if (limelight.data.labels) {
231        limelight.data.labels.filter(item => {
232          if (item.display_legend != "never") {
233            legendLabels.push(item);
234            return;
235          }
236          return;
237        });
238      }
239      if (legendLabels.length > 0) {
240        calLegend += '<section class="calendar__legend" aria-label="Labels legend">';
241        calStyle += '<style type="text/css">';
242        legendLabels.forEach(label => {
243          var hex = label.label_color.toLowerCase().slice(1);
244          var slug = generateLabelSlug(label);
245          calLegend += '<div class="calendar__legend-each calendar__legend-each-' + slug + '">';
246          calLegend += '<div class="calendar__legend-color calendar__legend-color--' + slug + '"></div>';
247          calLegend += '<div class="calendar__legend-text"><div>' + label.label_title + "</div></div>";
248          calLegend += "</div>";
249          calStyle += ".rpm-calendar .calendar__legend-color--" + slug + "::before { background-color: #" + hex + "; }";
250          calStyle += "a.event-time.event-time--" + slug + " { color: #" + hex + "; }";
251        });
252        calLegend += "</section>";
253        calStyle += "</style>";
254      }
255      return calLegend + calStyle;
256    };
257
258    const renderWeekly = calendar => {
259      let performances = limelight.performances;
260      let calText = '';
261      let weeklyNumberDays = limelight.data.weekly_shown_days ?? 7;
262      let todayDate = new Date();
263      let startCustom = false;
264      let weekday = daysOfTheWeek('ddd');
265
266      // If user selects start date && before today
267      let commence = todayDate <= startCustom ? startCustom : todayDate;
268      let thisDay = new Date(commence);
269
270      // Display the legend
271      if (calendar.dataset.layout == 'legend_top') {
272        calText += `<div class="calendar__header calendar__header--weekly">${renderLegend()}</div>`;
273      }
274
275      // Generates weekday names
276      calText += '<div class="calendar__grid-container">';
277      calText += '<div class="days">';
278      for (let i = thisDay.getDay(); i < thisDay.getDay() + 7; i++) {
279        let the_day = i;
280        if (the_day > 6) {
281          the_day = the_day - 7;
282        }
283        calText += '<div class="day">' + weekday[the_day] + '</div>';
284      }
285      calText += '</div>';
286
287      // Generates Day
288      calText += '<div class="calendar__grid">';
289      for (let j = 0; j < weeklyNumberDays; j++) {
290        const newDate = new Date(thisDay);
291        let thisRenderedDate = new Date(newDate.setDate(newDate.getDate() + j));
292        calText += `<div class="day-box day-box--perf">
293				<div class="day-box-inner">
294					<div class="box-date">
295						<time>
296							${renderFormattedDate(thisRenderedDate, limelight.data.weekly_date_format)}
297						</time>
298					</div>
299					<div class="performance-holder">
300						${renderPerformanceLink(thisRenderedDate, performances)}
301					</div>
302				</div>
303            </div>`;
304      }
305      calText += '</div</div>'; // end .grid and end .grid-container
306
307      // Display the legend
308      if (calendar.dataset.layout == 'legend_bottom') {
309        calText += `<div class="calendar__footer calendar__footer--weekly">${renderLegend()}</div>`;
310      }
311      calendar.innerHTML += calText;
312      calText = '';
313    };
314
315    const monthlyDates = (month, performances, today) => {
316      let yyyy = month.split('-')[0];
317      let mm = month.split('-')[1];
318      const daysInMonth = (year, month) => new Date(year, month, 0).getDate();
319      let daysThisMonth = daysInMonth(yyyy, mm);
320      let dayBlocks = '';
321
322      // Loop to render blocks
323      for (let index = 0; index < daysThisMonth; index++) {
324        const numberedDay = index + 1;
325        const fullPerformanceDate = yyyy + '-' + mm + '-' + (numberedDay > 9 ? numberedDay : '0' + numberedDay);
326        let tempDate = new Date(Date.UTC(yyyy, mm - 1, numberedDay));
327        const thisRenderedDate = new Date(tempDate.getTime() + tempDate.getTimezoneOffset() * 60000); // this is how we correct for the time zone problem April 1, 2024
328        thisRenderedDate.setHours(23);
329        thisRenderedDate.setMinutes(59);
330        thisRenderedDate.setSeconds(59);
331
332        // add classes
333        var dayboxclasses = 'day-box';
334        if (thisRenderedDate < today) {
335          dayboxclasses += ' day-box-past';
336        } else if (dateIsDark(thisRenderedDate, performances)) {
337          dayboxclasses += ' day-box-dark';
338        }
339        dayBlocks += `<div class="` + dayboxclasses + `" data-performance-date="${fullPerformanceDate}"><div class="day-box-inner">`;
340        dayBlocks += `<div class="box-date">${renderFormattedDate(thisRenderedDate, limelight.data.monthly_date_format)}</div>`;
341        if (thisRenderedDate >= today) {
342          dayBlocks += `<div class="performance-holder">${renderPerformanceLink(thisRenderedDate, performances)}</div>`;
343        } else {
344          dayBlocks += `<div class="performance-holder performance-holder--empty"></div>`;
345        }
346        dayBlocks += `</div></div>`;
347      }
348      return dayBlocks;
349    };
350
351    const offsetDays = (month, direction = 'before') => {
352      if (direction === 'before') {
353        let offset = new Date(month.split('-')[0], parseInt(month.split('-')[1] - 1), 1).getDay();
354        let before = ''; // setup blank days before first day of month
355        for (var f = 0; f < offset; f++) {
356          before += `<div class="day-box offset"><div class="day-box-inner"></div></div>`;
357        }
358        return before;
359      }
360      if (direction === 'after') {
361        let totalDays = new Date(month.split('-')[0], parseInt(month.split('-')[1]), 1).getDate();
362        let offset = new Date(month.split('-')[0], parseInt(month.split('-')[1]), totalDays).getDay();
363        let after = ''; // setup blank days after last day of month
364        for (var t = offset; t > 0 && t < 7; t++) {
365          after += `<div class="day-box offset"><div class="day-box-inner"></div></div>`;
366        }
367        return after;
368      }
369    };
370
371    const tapAction = window.ontouchstart === null ? 'touchstart' : 'click';
372    const doNavigation = (cal, vp) => {
373      let calendar_months = cal.querySelectorAll('.calendar__month');
374      let viewDesktop = 2; // Amount of cal per view on desktop
375      let viewMobile = 1; // Amount of cal per view on mobile
376      let currentView = viewMobile;
377
378      // Add Class for 1 month view
379      cal.classList.add('calendar--1m');
380      if (vp && window.innerWidth > vp) {
381        currentView = viewDesktop;
382        cal.classList.remove('calendar--1m');
383      }
384      if (calendar_months && calendar_months.length > currentView) {
385        for (let index = 0; index < calendar_months.length; index++) {
386          const calendar_month = calendar_months[index];
387          const prev_month = index - 1;
388          const next_month = index + 1;
389          let isFirst = prev_month <= -1;
390          let isLast = next_month === calendar_months.length;
391          let prevButton = calendar_month.querySelector('.calendar__nav--prev');
392          let nextButton = calendar_month.querySelector('.calendar__nav--next');
393          prevButton.disabled = false;
394          nextButton.disabled = false;
395          isFirst ? prevButton.disabled = true : null;
396          isLast ? nextButton.disabled = true : null;
397          prevButton.addEventListener(tapAction, () => {
398            // Resets and remove all active classes
399            calendar_months.forEach(cm => {
400              cm.classList.remove('calendar__month--active');
401            });
402
403            // Adds active classes
404            calendar_months[prev_month].classList.add('calendar__month--active');
405            if (currentView > 1) {
406              calendar_months[prev_month + 1].classList.add('calendar__month--active');
407            }
408            cleanup_first_second();
409          });
410          nextButton.addEventListener(tapAction, () => {
411            // Resets and remove all active classes
412            calendar_months.forEach(cm => {
413              cm.classList.remove('calendar__month--active');
414            });
415            if (calendar_months[next_month]) {
416              calendar_months[next_month].classList.add('calendar__month--active');
417            }
418            if (currentView > 1) {
419              calendar_months[next_month - 1].classList.add('calendar__month--active');
420            }
421            cleanup_first_second();
422          });
423        }
424      }
425    };
426    const cleanup_first_second = () => {
427      // remove all first/second
428      $('.calendar--twomonth .calendar__month').removeClass('first').removeClass('second');
429      // identify first and second
430      $('.calendar--twomonth .calendar__month--active:first').addClass('first');
431      $('.calendar--twomonth .calendar__month--active:eq(1)').addClass('second');
432    };
433
434    const renderHeader = (month, calendar) => {
435      let headHTML = ``;
436      headHTML += `<div class="calendar__header">`;
437      headHTML += `	<nav class="calendar__nav-container">`;
438      headHTML += `		<button class="calendar__nav calendar__nav--prev"><span class="screen-reader-text">Previous</span><span class="arrow"></span></button>`;
439      headHTML += `		<h3>${renderFormattedMonth(month)}</h3>`;
440      headHTML += `		<button class="calendar__nav calendar__nav--next"><span class="screen-reader-text">Next</span><span class="arrow"></span></button>`;
441      headHTML += `	</nav>`;
442      // Display the legend
443      if (calendar.dataset.type !== 'twomonth' && calendar.dataset.layout == 'legend_top') {
444        headHTML += renderLegend();
445      }
446      headHTML += `</div>`;
447      return headHTML;
448    };
449    const renderFooter = calendar => {
450      let footHTML = ``;
451      // Display the legend
452      if (calendar.dataset.layout == 'legend_bottom') {
453        footHTML += `<div class="calendar__footer">`;
454        footHTML += renderLegend();
455        footHTML += `</div>`;
456      }
457      return footHTML;
458    };
459
460    let monthly_view_count$1 = 1,
461      monthlyHTML$1 = '',
462      dd_html$1 = '',
463      today$1 = new Date(),
464      joinPerformancesByYearMonth$1 = [];
465    const renderMonthly = calendar => {
466      let performances = limelight.performances;
467      // Loops all performances
468      for (let di = 0; di < performances.length; di++) {
469        const todayYear = today$1.getFullYear();
470        const todayMonthRaw = today$1.getMonth() + 1;
471        const todayMonth = todayMonthRaw > 9 ? todayMonthRaw : '0' + todayMonthRaw;
472        const todayOperator = todayYear + '-' + todayMonth;
473        let performanceYear = performances[di].date.split('-')[0];
474        let performanceMonth = performances[di].date.split('-')[1];
475        let performanceMonthYear = performanceYear + '-' + performanceMonth;
476        joinPerformancesByYearMonth$1.indexOf(performanceMonthYear) === -1 && todayOperator <= performanceMonthYear ? joinPerformancesByYearMonth$1.push(performanceMonthYear) : null;
477      }
478
479      // Reverse order of peformances by month
480      joinPerformancesByYearMonth$1.reverse();
481      daysOfTheWeek('ddd').forEach(d => {
482        if (d) {
483          dd_html$1 += `<div class="calendar__day">${d}</div>`;
484        }
485      });
486      calendar.innerHTML = '';
487
488      // Render Months
489      for (let index = 0;
489 index < joinPerformancesByYearMonth$1.length; index++) {
490        const monthcount = index + 1;
491        const month = joinPerformancesByYearMonth$1[index];
492        let isActive = monthcount > monthly_view_count$1 ? false : true;
493        // if a starting month has been specified, decide based on that
494        if (calendar.dataset.start_month) {
495          isActive = calendar.dataset.start_month == month ? true : false;
496        }
497        monthlyHTML$1 += `
498            <div class="calendar__month ${isActive ? 'calendar__month--active' : ''}">
499                ${renderHeader(month, calendar)}
500                <div class="calendar__grid-container">
501                    <div class="days">
502                      ${dd_html$1 ?? ''}
503                    </div>
504                    <div class="calendar__grid">
505                        ${offsetDays(month, 'before')}
506                        ${monthlyDates(month, performances, today$1)}
507                        ${offsetDays(month, 'after')}
508                    </div>
509                </div>
510                ${renderFooter(calendar)}
511            </div>`;
512      }
513      calendar.innerHTML = monthlyHTML$1;
514      doNavigation(calendar, null);
515    };
516
517    /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
518      let monthly_view_count,
519      viewBreakpoint = 768,
520      monthlyHTML = '',
521      dd_html = '',
522      today = new Date(),
523      joinPerformancesByYearMonth = [];
524    const renderTwoMonth = calendar => {
525      // mobile = 0; desktop = 1;
526      window.innerWidth > viewBreakpoint ? monthly_view_count = 1 : monthly_view_count = 0;
527      createTwoMonthCalender(calendar);
528
529      // Rerun on resize        
530      // window.addEventListener('resize', () => {
531      // 	if (!screenSizeInit) {
532      // 		window.innerWidth > viewBreakpoint ? monthly_view_count = 1 : monthly_view_count = 0;
533      // 	}
534      // });
535    };
536
537    const createTwoMonthCalender = calendar => {
538      let performances = limelight.performances;
539
540      /* ----------------------*/
541      /** SET UP PERFORMANCES **/
542
543      // Loop all perforamces
544      for (let di = 0; di < performances.length; di++) {
545        const todayYear = today.getFullYear();
546        const todayMonthRaw = today.getMonth() + 1;
547        const todayMonth = todayMonthRaw > 9 ? todayMonthRaw : '0' + todayMonthRaw;
548        const todayOperator = todayYear + '-' + todayMonth;
549        let performanceYear = performances[di].date.split('-')[0];
550        let performanceMonth = performances[di].date.split('-')[1];
551        let performanceMonthYear = performanceYear + '-' + performanceMonth;
552
553        // Calculates performances by month
554        joinPerformancesByYearMonth.indexOf(performanceMonthYear) === -1 && todayOperator <= performanceMonthYear ? joinPerformancesByYearMonth.push(performanceMonthYear) : null;
555      }
556
557      // Reverse order of peformances by month
558      joinPerformancesByYearMonth.reverse();
559
560      /* ----------------------------------*/
561      /** PREPARE HTML FOR ALL THE MONTHS **/
562
563      daysOfTheWeek('ddd').forEach(d => {
564        if (d) {
565          dd_html += `<div class="calendar__day">${d}</div>`;
566        }
567      });
568
569      // Render Month into a string
570      for (let index = 0; index < joinPerformancesByYearMonth.length; index++) {
571        const month = joinPerformancesByYearMonth[index];
572        let isActive;
573
574        // if a starting month has been specified, decide "active" based on that (this month plus next)
575        if (calendar.dataset.start_month) {
576          let [year, tempmonth] = month.split('-').map(Number);
577          if (tempmonth === 1) {
578            year -= 1;
579            tempmonth = 12;
580          } else {
581            tempmonth -= 1;
582          }
583          const prevMonth = year + '-' + tempmonth.toString().padStart(2, '0');
584
585          // is this the start month? OR was the previous month the start month (and we're in desktop width)?
586          if (calendar.dataset.start_month == month || window.innerWidth > viewBreakpoint && calendar.dataset.start_month == prevMonth) {
587            isActive = true;
588          } else {
589            isActive = false;
590          }
591        } else {
592          isActive = index > monthly_view_count ? false : true;
593        }
594        monthlyHTML += `
595            <div class="calendar__month ${isActive ? 'calendar__month--active' : ''}">
596                ${renderHeader(month, calendar)}
597                <div class="calendar__grid-container">
598                    <div class="days">
599                      ${dd_html ?? ''}
600                    </div>
601                    <div class="calendar__grid">
602                        ${offsetDays(month, 'before')}
603                        ${monthlyDates(month, performances, today)}
604                        ${offsetDays(month, 'after')}
605                    </div>
606                </div>
607            </div>`;
608      }
609
610      /* ----------------------*/
611      /** PUT ALL THE HTML TOGETHER **/
612
613      calendar.innerHTML = '';
614
615      // Lengend at the top?
616      if (calendar.dataset.layout == 'legend_top') {
617        calendar.innerHTML += renderLegend();
618      }
619      calendar.innerHTML += '<div class="months_container">' + monthlyHTML + '</div>';
620      calendar.innerHTML += renderFooter(calendar);
621      doNavigation(calendar, viewBreakpoint);
622      cleanup_first_second();
623    };
624
625    window.addEventListener("DOMContentLoaded", e => {
626      $ = jQuery.noConflict();
627      const calendars = document.querySelectorAll('.rpm-calendar .calendar');
628      if (calendars && calendars.length > 0) {
629        let performances = limelight.performances;
630        if (performances && performances.length) {
631          try {
632            calendars.forEach(calendar => {
633              switch (calendar.dataset.type) {
634                case 'weekly':
635                  renderWeekly(calendar);
636                  break;
637                case 'twomonth':
638                  renderTwoMonth(calendar);
639                  break;
640                default:
641                  renderMonthly(calendar);
642                  break;
643              }
644              removeLabels();
645            });
646          } catch (error) {
647            console.error(error);
648          }
649        }
650      }
651    });
652
653})();
654//# sourceMappingURL=app.js.map

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.