1 2'use strict'; 3{ 4 const globals = this; 5 const django = globals.django || (globals.django = {}); 6 7 8 django.pluralidx = function(n) { 9 const v = (n != 1); 10 if (typeof v === 'boolean') { 11 return v ? 1 : 0; 12 } else { 13 return v; 14 } 15 }; 16 17 18 /* gettext library */ 19 20 django.catalog = django.catalog || {}; 21 22 const newcatalog = { 23 "%(total)s result": "%(total)s result", 24 "%(total)s results": "%(total)s results", 25 "Choose date": "Choose date", 26 "Filter": "Filter", 27 "Filter by date": "Filter by date", 28 "Filter by tag": "Filter by tag", 29 "Go to next page": "Go to next page", 30 "Go to page %(page)s": "Go to page %(page)s", 31 "Go to previous page": "Go to previous page", 32 "Loading\u2026": "Loading\u2026", 33 "No results found": "No results found", 34 "Page %(page)s of %(total)s": "Page %(page)s of %(total)s", 35 "Pagination": "Pagination", 36 "Read more": "Read more", 37 "Reset filters": "Reset filters", 38 "Something went wrong.": "Something went wrong.", 39 "about %s": "about %s" 40 }; 41 for (const key in newcatalog) { 42 django.catalog[key] = newcatalog[key]; 43 } 44 45 46 if (!django.jsi18n_initialized) { 47 django.gettext = function(msgid) { 48 const value = django.catalog[msgid]; 49 if (typeof value === 'undefined') { 50 return msgid; 51 } else { 52 return (typeof value === 'string') ? value : value[0]; 53 } 54 }; 55 56 django.ngettext = function(singular, plural, count) { 57 const value = django.catalog[singular]; 58 if (typeof value === 'undefined') { 59 return (count == 1) ? singular : plural; 60 } else { 61 return value.constructor === Array ? value[django.pluralidx(count)] : value; 62 } 63 }; 64 65 django.gettext_noop = function(msgid) { return msgid; }; 66 67 django.pgettext = function(context, msgid) { 68 let value = django.gettext(context + '\x04' + msgid); 69 if (value.includes('\x04')) { 70 value = msgid; 71 } 72 return value; 73 }; 74 75 django.npgettext = function(context, singular, plural, count) { 76 let value = django.ngettext(context + '\x04' + singular, context + '\x04' + plural, count); 77 if (value.includes('\x04')) { 78 value = django.ngettext(singular, plural, count); 79 } 80 return value; 81 }; 82 83 django.interpolate = function(fmt, obj, named) { 84 if (named) { 85 return fmt.replace(/%\(\w+\)s/g, function(match){return String(obj[match.slice(2,-2)])}); 86 } else { 87 return fmt.replace(/%s/g, function(match){return String(obj.shift())}); 88 } 89 }; 90 91 92 /* formatting library */ 93 94 django.formats = { 95 "DATETIME_FORMAT": "N j, Y, P", 96 "DATETIME_INPUT_FORMATS": [ 97 "%Y-%m-%d %H:%M:%S", 98 "%Y-%m-%d %H:%M:%S.%f", 99 "%Y-%m-%d %H:%M", 100 "%m/%d/%Y %H:%M:%S", 101 "%m/%d/%Y %H:%M:%S.%f", 102 "%m/%d/%Y %H:%M", 103 "%m/%d/%y %H:%M:%S", 104 "%m/%d/%y %H:%M:%S.%f", 105 "%m/%d/%y %H:%M", 106 "%Y-%m-%d" 107 ], 108 "DATE_FORMAT": "N j, Y", 109 "DATE_INPUT_FORMATS": [ 110 "%Y-%m-%d", 111 "%m/%d/%Y", 112 "%m/%d/%y", 113 "%b %d %Y", 114 "%b %d, %Y", 115 "%d %b %Y", 116 "%d %b, %Y", 117 "%B %d %Y", 118 "%B %d, %Y", 119 "%d %B %Y", 120 "%d %B, %Y" 121 ], 122 "DECIMAL_SEPARATOR": ".", 123 "FIRST_DAY_OF_WEEK": 0, 124 "MONTH_DAY_FORMAT": "F j", 125 "NUMBER_GROUPING": 3, 126 "SHORT_DATETIME_FORMAT": "m/d/Y P", 127 "SHORT_DATE_FORMAT": "m/d/Y", 128 "THOUSAND_SEPARATOR": ",", 129 "TIME_FORMAT": "P", 130 "TIME_INPUT_FORMATS": [ 131 "%H:%M:%S", 132 "%H:%M:%S.%f", 133 "%H:%M" 134 ], 135 "YEAR_MONTH_FORMAT": "F Y" 136 }; 137 138 django.get_format = function(format_type) { 139 const value = django.formats[format_type]; 140 if (typeof value === 'undefined') { 141 return format_type; 142 } else { 143 return value; 144 } 145 }; 146 147 /* add to global namespace */ 148 globals.pluralidx = django.pluralidx; 149 globals.gettext = django.gettext; 150 globals.ngettext = django.ngettext; 151 globals.gettext_noop = django.gettext_noop; 152 globals.pgettext = django.pgettext; 153 globals.npgettext = django.npgettext; 154 globals.interpolate = django.interpolate; 155 globals.get_format = django.get_format; 156 157 django.jsi18n_initialized = true; 158 } 159}; 160
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.