From adfa1ac51900d2d4bc122069aedf04395c73c076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9=20=D0=91=D0=B0=D0=B1?= =?UTF-8?q?=D1=83=D1=88=D0=BA=D0=B8=D0=BD?= Date: Thu, 6 Mar 2025 15:16:17 +0100 Subject: [PATCH] updated locales --- frontend/app/assets/prism/prism-bash.min.js | 168 +- .../app/assets/prism/prism-javascript.min.js | 127 +- frontend/app/assets/prism/prism-jsx.min.js | 96 +- frontend/app/assets/prism/prism-kotlin.min.js | 67 +- frontend/app/assets/prism/prism-swift.min.js | 97 +- .../app/assets/prism/prism-typescript.min.js | 43 +- frontend/app/assets/prism/prism.min.js | 919 +--------- .../Assist/RecordingsList/Recordings.tsx | 8 +- .../components/Alerts/AlertsSearch.tsx | 4 +- .../components/Alerts/AlertsView.tsx | 2 +- .../Dashboard/components/Alerts/NewAlert.tsx | 38 +- .../DashboardList/DashboardSearch.tsx | 4 +- .../components/DashboardList/Header.tsx | 4 +- .../MetricsSearch/MetricsSearch.tsx | 4 +- .../components/FFlags/FFlagsListHeader.tsx | 2 +- .../app/components/FFlags/NewFFlag/HowTo.tsx | 2 +- .../Header/HealthStatus/HealthWidget.tsx | 4 +- .../DateRangeDropdown/DateRangePopup.tsx | 2 +- .../SessionList/SessionDateRange.tsx | 2 +- .../SortOrderButton/SortOrderButton.tsx | 6 +- frontend/app/locales/en.json | 15 +- frontend/app/locales/es.json | 15 +- frontend/app/locales/fr.json | 49 +- frontend/app/locales/ru.json | 1591 +++++++++-------- frontend/app/locales/zh.json | 15 +- frontend/app/types/session/issue.ts | 5 +- frontend/eslint.config.js | 1 + 27 files changed, 937 insertions(+), 2353 deletions(-) diff --git a/frontend/app/assets/prism/prism-bash.min.js b/frontend/app/assets/prism/prism-bash.min.js index dba1edeee..f1659f1e3 100644 --- a/frontend/app/assets/prism/prism-bash.min.js +++ b/frontend/app/assets/prism/prism-bash.min.js @@ -1,167 +1 @@ -!(function (e) { - const t = '\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b'; - const a = { - pattern: /(^(["']?)\w+\2)[ \t]+\S.*/, - lookbehind: !0, - alias: 'punctuation', - inside: null, - }; - const n = { - bash: a, - environment: { pattern: RegExp(`\\$${t}`), alias: 'constant' }, - variable: [ - { - pattern: /\$?\(\([\s\S]+?\)\)/, - greedy: !0, - inside: { - variable: [ - { pattern: /(^\$\(\([\s\S]+)\)\)/, lookbehind: !0 }, - /^\$\(\(/, - ], - number: - /\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/, - operator: - /--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/, - punctuation: /\(\(?|\)\)?|,|;/, - }, - }, - { - pattern: /\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/, - greedy: !0, - inside: { variable: /^\$\(|^`|\)$|`$/ }, - }, - { - pattern: /\$\{[^}]+\}/, - greedy: !0, - inside: { - operator: /:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/, - punctuation: /[\[\]]/, - environment: { - pattern: RegExp(`(\\{)${t}`), - lookbehind: !0, - alias: 'constant', - }, - }, - }, - /\$(?:\w+|[#?*!@$])/, - ], - entity: - /\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/, - }; - (e.languages.bash = { - shebang: { pattern: /^#!\s*\/.*/, alias: 'important' }, - comment: { pattern: /(^|[^"{\\$])#.*/, lookbehind: !0 }, - 'function-name': [ - { - pattern: /(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/, - lookbehind: !0, - alias: 'function', - }, - { pattern: /\b[\w-]+(?=\s*\(\s*\)\s*\{)/, alias: 'function' }, - ], - 'for-or-select': { - pattern: /(\b(?:for|select)\s+)\w+(?=\s+in\s)/, - alias: 'variable', - lookbehind: !0, - }, - 'assign-left': { - pattern: /(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/, - inside: { - environment: { - pattern: RegExp(`(^|[\\s;|&]|[<>]\\()${t}`), - lookbehind: !0, - alias: 'constant', - }, - }, - alias: 'variable', - lookbehind: !0, - }, - parameter: { - pattern: /(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/, - alias: 'variable', - lookbehind: !0, - }, - string: [ - { - pattern: /((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/, - lookbehind: !0, - greedy: !0, - inside: n, - }, - { - pattern: /((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/, - lookbehind: !0, - greedy: !0, - inside: { bash: a }, - }, - { - pattern: - /(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/, - lookbehind: !0, - greedy: !0, - inside: n, - }, - { pattern: /(^|[^$\\])'[^']*'/, lookbehind: !0, greedy: !0 }, - { - pattern: /\$'(?:[^'\\]|\\[\s\S])*'/, - greedy: !0, - inside: { entity: n.entity }, - }, - ], - environment: { pattern: RegExp(`\\$?${t}`), alias: 'constant' }, - variable: n.variable, - function: { - pattern: - /(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/, - lookbehind: !0, - }, - keyword: { - pattern: - /(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/, - lookbehind: !0, - }, - builtin: { - pattern: - /(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/, - lookbehind: !0, - alias: 'class-name', - }, - boolean: { - pattern: /(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/, - lookbehind: !0, - }, - 'file-descriptor': { pattern: /\B&\d\b/, alias: 'important' }, - operator: { - pattern: - /\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/, - inside: { 'file-descriptor': { pattern: /^\d/, alias: 'important' } }, - }, - punctuation: /\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/, - number: { pattern: /(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/, lookbehind: !0 }, - }), - (a.inside = e.languages.bash); - for ( - let s = [ - 'comment', - 'function-name', - 'for-or-select', - 'assign-left', - 'parameter', - 'string', - 'environment', - 'function', - 'keyword', - 'builtin', - 'boolean', - 'file-descriptor', - 'operator', - 'punctuation', - 'number', - ], - o = n.variable[1].inside, - i = 0; - i < s.length; - i++ - ) o[s[i]] = e.languages.bash[s[i]]; - (e.languages.sh = e.languages.bash), (e.languages.shell = e.languages.bash); -}(Prism)); +!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",a={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},n={bash:a,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:n},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:a}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:n},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:n.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:n.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},a.inside=e.languages.bash;for(var s=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=n.variable[1].inside,i=0;i|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/, -})), -(Prism.languages.javascript['class-name'][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/), -Prism.languages.insertBefore('javascript', 'keyword', { - regex: { - pattern: RegExp( - '((?:^|[^$\\w\\xA0-\\uFFFF."\'\\])\\s]|\\b(?:return|yield))\\s*)/(?:(?:\\[(?:[^\\]\\\\\r\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|/\\*(?:[^*]|\\*(?!/))*\\*/)*(?:$|[\r\n,.;:})\\]]|//))', - ), - lookbehind: !0, - greedy: !0, - inside: { - 'regex-source': { - pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/, - lookbehind: !0, - alias: 'language-regex', - inside: Prism.languages.regex, - }, - 'regex-delimiter': /^\/|\/$/, - 'regex-flags': /^[a-z]+$/, - }, - }, - 'function-variable': { - pattern: - /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/, - alias: 'function', - }, - parameter: [ - { - pattern: - /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/, - lookbehind: !0, - inside: Prism.languages.javascript, - }, - { - pattern: - /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i, - lookbehind: !0, - inside: Prism.languages.javascript, - }, - { - pattern: - /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/, - lookbehind: !0, - inside: Prism.languages.javascript, - }, - { - pattern: - /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/, - lookbehind: !0, - inside: Prism.languages.javascript, - }, - ], - constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/, -}), -Prism.languages.insertBefore('javascript', 'string', { - hashbang: { pattern: /^#!.*/, greedy: !0, alias: 'comment' }, - 'template-string': { - pattern: - /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/, - greedy: !0, - inside: { - 'template-punctuation': { pattern: /^`|`$/, alias: 'string' }, - interpolation: { - pattern: - /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/, - lookbehind: !0, - inside: { - 'interpolation-punctuation': { - pattern: /^\$\{|\}$/, - alias: 'punctuation', - }, - rest: Prism.languages.javascript, - }, - }, - string: /[\s\S]+/, - }, - }, - 'string-property': { - pattern: - /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m, - lookbehind: !0, - greedy: !0, - alias: 'property', - }, -}), -Prism.languages.insertBefore('javascript', 'operator', { - 'literal-property': { - pattern: - /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m, - lookbehind: !0, - alias: 'property', - }, -}), -Prism.languages.markup - && (Prism.languages.markup.tag.addInlined('script', 'javascript'), - Prism.languages.markup.tag.addAttribute( - 'on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)', - 'javascript', - )), -(Prism.languages.js = Prism.languages.javascript); +Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp("(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])"),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp("((?:^|[^$\\w\\xA0-\\uFFFF.\"'\\])\\s]|\\b(?:return|yield))\\s*)/(?:(?:\\[(?:[^\\]\\\\\r\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|/\\*(?:[^*]|\\*(?!/))*\\*/)*(?:$|[\r\n,.;:})\\]]|//))"),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)","javascript")),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file diff --git a/frontend/app/assets/prism/prism-jsx.min.js b/frontend/app/assets/prism/prism-jsx.min.js index a1e99d3d9..8aa6362fa 100644 --- a/frontend/app/assets/prism/prism-jsx.min.js +++ b/frontend/app/assets/prism/prism-jsx.min.js @@ -1,95 +1 @@ -!(function (t) { - const n = t.util.clone(t.languages.javascript); - let e = '(?:\\{*\\.{3}(?:[^{}]|)*\\})'; - function a(t, n) { - return ( - (t = t - .replace(//g, () => '(?:\\s|//.*(?!.)|/\\*(?:[^*]|\\*(?!/))\\*/)') - .replace(//g, () => '(?:\\{(?:\\{(?:\\{[^{}]*\\}|[^{}])*\\}|[^{}])*\\})') - .replace(//g, () => e)), - RegExp(t, n) - ); - } - (e = a(e).source), - (t.languages.jsx = t.languages.extend('markup', n)), - (t.languages.jsx.tag.pattern = a( - '+(?:[\\w.:$-]+(?:=(?:"(?:\\\\[^]|[^\\\\"])*"|\'(?:\\\\[^]|[^\\\\\'])*\'|[^\\s{\'"/>=]+|))?|))**/?)?>', - )), - (t.languages.jsx.tag.inside.tag.pattern = /^<\/?[^\s>\/]*/), - (t.languages.jsx.tag.inside['attr-value'].pattern = /=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/), - (t.languages.jsx.tag.inside.tag.inside['class-name'] = /^[A-Z]\w*(?:\.[A-Z]\w*)*$/), - (t.languages.jsx.tag.inside.comment = n.comment), - t.languages.insertBefore( - 'inside', - 'attr-name', - { spread: { pattern: a(''), inside: t.languages.jsx } }, - t.languages.jsx.tag, - ), - t.languages.insertBefore( - 'inside', - 'special-attr', - { - script: { - pattern: a('='), - alias: 'language-javascript', - inside: { - 'script-punctuation': { pattern: /^=(?=\{)/, alias: 'punctuation' }, - rest: t.languages.jsx, - }, - }, - }, - t.languages.jsx.tag, - ); - const s = function (t) { - return t - ? typeof t === 'string' - ? t - : typeof t.content === 'string' - ? t.content - : t.content.map(s).join('') - : ''; - }; - const g = function (n) { - for (let e = [], a = 0; a < n.length; a++) { - const o = n[a]; - let i = !1; - if ( - (typeof o !== 'string' - && (o.type === 'tag' && o.content[0] && o.content[0].type === 'tag' - ? o.content[0].content[0].content === ' 0 - && e[e.length - 1].tagName === s(o.content[0].content[1]) - && e.pop() - : o.content[o.content.length - 1].content === '/>' - || e.push({ - tagName: s(o.content[0].content[1]), - openedBraces: 0, - }) - : e.length > 0 && o.type === 'punctuation' && o.content === '{' - ? e[e.length - 1].openedBraces++ - : e.length > 0 - && e[e.length - 1].openedBraces > 0 - && o.type === 'punctuation' - && o.content === '}' - ? e[e.length - 1].openedBraces-- - : (i = !0)), - (i || typeof o === 'string') - && e.length > 0 - && e[e.length - 1].openedBraces === 0) - ) { - let r = s(o); - a < n.length - 1 - && (typeof n[a + 1] === 'string' || n[a + 1].type === 'plain-text') - && ((r += s(n[a + 1])), n.splice(a + 1, 1)), - a > 0 - && (typeof n[a - 1] === 'string' || n[a - 1].type === 'plain-text') - && ((r = s(n[a - 1]) + r), n.splice(a - 1, 1), a--), - (n[a] = new t.Token('plain-text', r, null, r)); - } - o.content && typeof o.content !== 'string' && g(o.content); - } - }; - t.hooks.add('after-tokenize', (t) => { - (t.language !== 'jsx' && t.language !== 'tsx') || g(t.tokens); - }); -}(Prism)); +!function(t){var n=t.util.clone(t.languages.javascript),e="(?:\\{*\\.{3}(?:[^{}]|)*\\})";function a(t,n){return t=t.replace(//g,(function(){return"(?:\\s|//.*(?!.)|/\\*(?:[^*]|\\*(?!/))\\*/)"})).replace(//g,(function(){return"(?:\\{(?:\\{(?:\\{[^{}]*\\}|[^{}])*\\}|[^{}])*\\})"})).replace(//g,(function(){return e})),RegExp(t,n)}e=a(e).source,t.languages.jsx=t.languages.extend("markup",n),t.languages.jsx.tag.pattern=a("+(?:[\\w.:$-]+(?:=(?:\"(?:\\\\[^]|[^\\\\\"])*\"|'(?:\\\\[^]|[^\\\\'])*'|[^\\s{'\"/>=]+|))?|))**/?)?>"),t.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,t.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,t.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,t.languages.jsx.tag.inside.comment=n.comment,t.languages.insertBefore("inside","attr-name",{spread:{pattern:a(""),inside:t.languages.jsx}},t.languages.jsx.tag),t.languages.insertBefore("inside","special-attr",{script:{pattern:a("="),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:t.languages.jsx}}},t.languages.jsx.tag);var s=function(t){return t?"string"==typeof t?t:"string"==typeof t.content?t.content:t.content.map(s).join(""):""},g=function(n){for(var e=[],a=0;a0&&e[e.length-1].tagName===s(o.content[0].content[1])&&e.pop():"/>"===o.content[o.content.length-1].content||e.push({tagName:s(o.content[0].content[1]),openedBraces:0}):e.length>0&&"punctuation"===o.type&&"{"===o.content?e[e.length-1].openedBraces++:e.length>0&&e[e.length-1].openedBraces>0&&"punctuation"===o.type&&"}"===o.content?e[e.length-1].openedBraces--:i=!0),(i||"string"==typeof o)&&e.length>0&&0===e[e.length-1].openedBraces){var r=s(o);a0&&("string"==typeof n[a-1]||"plain-text"===n[a-1].type)&&(r=s(n[a-1])+r,n.splice(a-1,1),a--),n[a]=new t.Token("plain-text",r,null,r)}o.content&&"string"!=typeof o.content&&g(o.content)}};t.hooks.add("after-tokenize",(function(t){"jsx"!==t.language&&"tsx"!==t.language||g(t.tokens)}))}(Prism); \ No newline at end of file diff --git a/frontend/app/assets/prism/prism-kotlin.min.js b/frontend/app/assets/prism/prism-kotlin.min.js index b32bbd969..78a905718 100644 --- a/frontend/app/assets/prism/prism-kotlin.min.js +++ b/frontend/app/assets/prism/prism-kotlin.min.js @@ -1,66 +1 @@ -!(function (n) { - (n.languages.kotlin = n.languages.extend('clike', { - keyword: { - pattern: - /(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/, - lookbehind: !0, - }, - function: [ - { pattern: /(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/, greedy: !0 }, - { - pattern: /(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/, - lookbehind: !0, - greedy: !0, - }, - ], - number: - /\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/, - operator: - /\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/, - })), - delete n.languages.kotlin['class-name']; - const e = { - 'interpolation-punctuation': { - pattern: /^\$\{?|\}$/, - alias: 'punctuation', - }, - expression: { pattern: /[\s\S]+/, inside: n.languages.kotlin }, - }; - n.languages.insertBefore('kotlin', 'string', { - 'string-literal': [ - { - pattern: /"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/, - alias: 'multiline', - inside: { - interpolation: { pattern: /\$(?:[a-z_]\w*|\{[^{}]*\})/i, inside: e }, - string: /[\s\S]+/, - }, - }, - { - pattern: /"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/, - alias: 'singleline', - inside: { - interpolation: { - pattern: /((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i, - lookbehind: !0, - inside: e, - }, - string: /[\s\S]+/, - }, - }, - ], - char: { pattern: /'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/, greedy: !0 }, - }), - delete n.languages.kotlin.string, - n.languages.insertBefore('kotlin', 'keyword', { - annotation: { - pattern: /\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/, - alias: 'builtin', - }, - }), - n.languages.insertBefore('kotlin', 'function', { - label: { pattern: /\b\w+@|@\w+\b/, alias: 'symbol' }, - }), - (n.languages.kt = n.languages.kotlin), - (n.languages.kts = n.languages.kotlin); -}(Prism)); +!function(n){n.languages.kotlin=n.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete n.languages.kotlin["class-name"];var e={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:n.languages.kotlin}};n.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:e},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:e},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete n.languages.kotlin.string,n.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),n.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),n.languages.kt=n.languages.kotlin,n.languages.kts=n.languages.kotlin}(Prism); \ No newline at end of file diff --git a/frontend/app/assets/prism/prism-swift.min.js b/frontend/app/assets/prism/prism-swift.min.js index 058060b27..b4f87f463 100644 --- a/frontend/app/assets/prism/prism-swift.min.js +++ b/frontend/app/assets/prism/prism-swift.min.js @@ -1,96 +1 @@ -(Prism.languages.swift = { - comment: { - pattern: - /(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/, - lookbehind: !0, - greedy: !0, - }, - 'string-literal': [ - { - pattern: RegExp( - '(^|[^"#])(?:"(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|\r\n|[^(])|[^\\\\\r\n"])*"|"""(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|[^(])|[^\\\\"]|"(?!""))*""")(?!["#])', - ), - lookbehind: !0, - greedy: !0, - inside: { - interpolation: { - pattern: /(\\\()(?:[^()]|\([^()]*\))*(?=\))/, - lookbehind: !0, - inside: null, - }, - 'interpolation-punctuation': { - pattern: /^\)|\\\($/, - alias: 'punctuation', - }, - punctuation: /\\(?=[\r\n])/, - string: /[\s\S]+/, - }, - }, - { - pattern: RegExp( - '(^|[^"#])(#+)(?:"(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|\r\n|[^#])|[^\\\\\r\n])*?"|"""(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|[^#])|[^\\\\])*?""")\\2', - ), - lookbehind: !0, - greedy: !0, - inside: { - interpolation: { - pattern: /(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/, - lookbehind: !0, - inside: null, - }, - 'interpolation-punctuation': { - pattern: /^\)|\\#+\($/, - alias: 'punctuation', - }, - string: /[\s\S]+/, - }, - }, - ], - directive: { - pattern: RegExp( - '#(?:(?:elseif|if)\\b(?:[ \t]*(?:![ \t]*)?(?:\\b\\w+\\b(?:[ \t]*\\((?:[^()]|\\([^()]*\\))*\\))?|\\((?:[^()]|\\([^()]*\\))*\\))(?:[ \t]*(?:&&|\\|\\|))?)+|(?:else|endif)\\b)', - ), - alias: 'property', - inside: { - 'directive-name': /^#\w+/, - boolean: /\b(?:false|true)\b/, - number: /\b\d+(?:\.\d+)*\b/, - operator: /!|&&|\|\||[<>]=?/, - punctuation: /[(),]/, - }, - }, - literal: { - pattern: - /#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/, - alias: 'constant', - }, - 'other-directive': { pattern: /#\w+\b/, alias: 'property' }, - attribute: { pattern: /@\w+/, alias: 'atrule' }, - 'function-definition': { - pattern: /(\bfunc\s+)\w+/, - lookbehind: !0, - alias: 'function', - }, - label: { - pattern: - /\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/, - lookbehind: !0, - alias: 'important', - }, - keyword: - /\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/, - boolean: /\b(?:false|true)\b/, - nil: { pattern: /\bnil\b/, alias: 'constant' }, - 'short-argument': /\$\d+\b/, - omit: { pattern: /\b_\b/, alias: 'keyword' }, - number: - /\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i, - 'class-name': /\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/, - function: /\b[a-z_]\w*(?=\s*\()/i, - constant: /\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/, - operator: /[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/, - punctuation: /[{}[\]();,.:\\]/, -}), -Prism.languages.swift['string-literal'].forEach((e) => { - e.inside.interpolation.inside = Prism.languages.swift; -}); +Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp('(^|[^"#])(?:"(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|\r\n|[^(])|[^\\\\\r\n"])*"|"""(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|[^(])|[^\\\\"]|"(?!""))*""")(?!["#])'),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp('(^|[^"#])(#+)(?:"(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|\r\n|[^#])|[^\\\\\r\n])*?"|"""(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|[^#])|[^\\\\])*?""")\\2'),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp("#(?:(?:elseif|if)\\b(?:[ \t]*(?:![ \t]*)?(?:\\b\\w+\\b(?:[ \t]*\\((?:[^()]|\\([^()]*\\))*\\))?|\\((?:[^()]|\\([^()]*\\))*\\))(?:[ \t]*(?:&&|\\|\\|))?)+|(?:else|endif)\\b)"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach((function(e){e.inside.interpolation.inside=Prism.languages.swift})); \ No newline at end of file diff --git a/frontend/app/assets/prism/prism-typescript.min.js b/frontend/app/assets/prism/prism-typescript.min.js index 0f7f7b2b8..b512c1617 100644 --- a/frontend/app/assets/prism/prism-typescript.min.js +++ b/frontend/app/assets/prism/prism-typescript.min.js @@ -1,42 +1 @@ -!(function (e) { - (e.languages.typescript = e.languages.extend('javascript', { - 'class-name': { - pattern: - /(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/, - lookbehind: !0, - greedy: !0, - inside: null, - }, - builtin: - /\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/, - })), - e.languages.typescript.keyword.push( - /\b(?:abstract|declare|is|keyof|readonly|require)\b/, - /\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/, - /\btype\b(?=\s*(?:[\{*]|$))/, - ), - delete e.languages.typescript.parameter, - delete e.languages.typescript['literal-property']; - const s = e.languages.extend('typescript', {}); - delete s['class-name'], - (e.languages.typescript['class-name'].inside = s), - e.languages.insertBefore('typescript', 'function', { - decorator: { - pattern: /@[$\w\xA0-\uFFFF]+/, - inside: { - at: { pattern: /^@/, alias: 'operator' }, - function: /^[\s\S]+/, - }, - }, - 'generic-function': { - pattern: - /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/, - greedy: !0, - inside: { - function: /^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/, - generic: { pattern: /<[\s\S]+/, alias: 'class-name', inside: s }, - }, - }, - }), - (e.languages.ts = e.languages.typescript); -}(Prism)); +!function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var s=e.languages.extend("typescript",{});delete s["class-name"],e.languages.typescript["class-name"].inside=s,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:s}}}}),e.languages.ts=e.languages.typescript}(Prism); \ No newline at end of file diff --git a/frontend/app/assets/prism/prism.min.js b/frontend/app/assets/prism/prism.min.js index 65b6cfae0..b6318e2af 100644 --- a/frontend/app/assets/prism/prism.min.js +++ b/frontend/app/assets/prism/prism.min.js @@ -1,430 +1,4 @@ -/** - * Minified by jsDelivr using Terser v5.19.2. - * Original file: /npm/prismjs@1.29.0/prism.js - * - * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files - */ -const _self = typeof window !== 'undefined' - ? window - : typeof WorkerGlobalScope !== 'undefined' - && self instanceof WorkerGlobalScope - ? self - : {}; -const Prism = (function (e) { - const t = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i; - let n = 0; - const a = {}; - var r = { - manual: e.Prism && e.Prism.manual, - disableWorkerMessageHandler: - e.Prism && e.Prism.disableWorkerMessageHandler, - util: { - encode: function e(t) { - return t instanceof s - ? new s(t.type, e(t.content), t.alias) - : Array.isArray(t) - ? t.map(e) - : t - .replace(/&/g, '&') - .replace(/ { - a[r] = e(t, n); - }), - a) - ); - default: - return t; - } - }, - getLanguage(e) { - for (; e;) { - const n = t.exec(e.className); - if (n) return n[1].toLowerCase(); - e = e.parentElement; - } - return 'none'; - }, - setLanguage(e, n) { - (e.className = e.className.replace(RegExp(t, 'gi'), '')), - e.classList.add(`language-${n}`); - }, - currentScript() { - if (typeof document === 'undefined') return null; - if ('currentScript' in document) return document.currentScript; - try { - throw new Error(); - } catch (a) { - const e = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(a.stack) - || [])[1]; - if (e) { - const t = document.getElementsByTagName('script'); - for (const n in t) if (t[n].src == e) return t[n]; - } - return null; - } - }, - isActive(e, t, n) { - for (let a = `no-${t}`; e;) { - const r = e.classList; - if (r.contains(t)) return !0; - if (r.contains(a)) return !1; - e = e.parentElement; - } - return !!n; - }, - }, - languages: { - plain: a, - plaintext: a, - text: a, - txt: a, - extend(e, t) { - const n = r.util.clone(r.languages[e]); - for (const a in t) n[a] = t[a]; - return n; - }, - insertBefore(e, t, n, a) { - const s = (a = a || r.languages)[e]; - const i = {}; - for (const o in s) { - if (s.hasOwnProperty(o)) { - if (o == t) for (const l in n) n.hasOwnProperty(l) && (i[l] = n[l]); - n.hasOwnProperty(o) || (i[o] = s[o]); - } - } - const u = a[e]; - return ( - (a[e] = i), - r.languages.DFS(r.languages, function (t, n) { - n === u && t != e && (this[t] = i); - }), - i - ); - }, - DFS: function e(t, n, a, s) { - s = s || {}; - const i = r.util.objId; - for (const o in t) { - if (t.hasOwnProperty(o)) { - n.call(t, o, t[o], a || o); - const l = t[o]; - const u = r.util.type(l); - u !== 'Object' || s[i(l)] - ? u !== 'Array' || s[i(l)] || ((s[i(l)] = !0), e(l, n, o, s)) - : ((s[i(l)] = !0), e(l, n, null, s)); - } - } - }, - }, - plugins: {}, - highlightAll(e, t) { - r.highlightAllUnder(document, e, t); - }, - highlightAllUnder(e, t, n) { - const a = { - callback: n, - container: e, - selector: - 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code', - }; - r.hooks.run('before-highlightall', a), - (a.elements = Array.prototype.slice.apply( - a.container.querySelectorAll(a.selector), - )), - r.hooks.run('before-all-elements-highlight', a); - for (var s, i = 0; (s = a.elements[i++]);) r.highlightElement(s, !0 === t, a.callback); - }, - highlightElement(t, n, a) { - const s = r.util.getLanguage(t); - const i = r.languages[s]; - r.util.setLanguage(t, s); - let o = t.parentElement; - o && o.nodeName.toLowerCase() === 'pre' && r.util.setLanguage(o, s); - const l = { - element: t, language: s, grammar: i, code: t.textContent, - }; - function u(e) { - (l.highlightedCode = e), - r.hooks.run('before-insert', l), - (l.element.innerHTML = l.highlightedCode), - r.hooks.run('after-highlight', l), - r.hooks.run('complete', l), - a && a.call(l.element); - } - if ( - (r.hooks.run('before-sanity-check', l), - (o = l.element.parentElement) - && o.nodeName.toLowerCase() === 'pre' - && !o.hasAttribute('tabindex') - && o.setAttribute('tabindex', '0'), - !l.code) - ) return r.hooks.run('complete', l), void (a && a.call(l.element)); - if ((r.hooks.run('before-highlight', l), l.grammar)) { - if (n && e.Worker) { - const g = new Worker(r.filename); - (g.onmessage = function (e) { - u(e.data); - }), - g.postMessage( - JSON.stringify({ - language: l.language, - code: l.code, - immediateClose: !0, - }), - ); - } else u(r.highlight(l.code, l.grammar, l.language)); - } else u(r.util.encode(l.code)); - }, - highlight(e, t, n) { - const a = { code: e, grammar: t, language: n }; - if ((r.hooks.run('before-tokenize', a), !a.grammar)) { - throw new Error( - `The language "${a.language}" has no grammar.`, - ); - } - return ( - (a.tokens = r.tokenize(a.code, a.grammar)), - r.hooks.run('after-tokenize', a), - s.stringify(r.util.encode(a.tokens), a.language) - ); - }, - tokenize(e, t) { - const n = t.rest; - if (n) { - for (const a in n) t[a] = n[a]; - delete t.rest; - } - const r = new l(); - return ( - u(r, r.head, e), - o(e, r, t, r.head, 0), - (function (e) { - const t = []; - let n = e.head.next; - for (; n !== e.tail;) t.push(n.value), (n = n.next); - return t; - }(r)) - ); - }, - hooks: { - all: {}, - add(e, t) { - const n = r.hooks.all; - (n[e] = n[e] || []), n[e].push(t); - }, - run(e, t) { - const n = r.hooks.all[e]; - if (n && n.length) for (var a, s = 0; (a = n[s++]);) a(t); - }, - }, - Token: s, - }; - function s(e, t, n, a) { - (this.type = e), - (this.content = t), - (this.alias = n), - (this.length = 0 | (a || '').length); - } - function i(e, t, n, a) { - e.lastIndex = t; - const r = e.exec(n); - if (r && a && r[1]) { - const s = r[1].length; - (r.index += s), (r[0] = r[0].slice(s)); - } - return r; - } - function o(e, t, n, a, l, c) { - for (const d in n) { - if (n.hasOwnProperty(d) && n[d]) { - let p = n[d]; - p = Array.isArray(p) ? p : [p]; - for (let m = 0; m < p.length; ++m) { - if (c && c.cause == `${d},${m}`) return; - const h = p[m]; - const f = h.inside; - const v = !!h.lookbehind; - const b = !!h.greedy; - const y = h.alias; - if (b && !h.pattern.global) { - const F = h.pattern.toString().match(/[imsuy]*$/)[0]; - h.pattern = RegExp(h.pattern.source, `${F}g`); - } - for ( - let x = h.pattern || h, k = a.next, w = l; - k !== t.tail && !(c && w >= c.reach); - w += k.value.length, k = k.next - ) { - let A = k.value; - if (t.length > e.length) return; - if (!(A instanceof s)) { - var P; - let $ = 1; - if (b) { - if (!(P = i(x, w, e, v)) || P.index >= e.length) break; - var S = P.index; - const E = P.index + P[0].length; - let _ = w; - for (_ += k.value.length; S >= _;) _ += (k = k.next).value.length; - if (((w = _ -= k.value.length), k.value instanceof s)) continue; - for ( - let j = k; - j !== t.tail && (_ < E || typeof j.value === 'string'); - j = j.next - ) $++, (_ += j.value.length); - $--, (A = e.slice(w, _)), (P.index -= w); - } else if (!(P = i(x, 0, A, v))) continue; - S = P.index; - const C = P[0]; - const L = A.slice(0, S); - const z = A.slice(S + C.length); - const O = w + A.length; - c && O > c.reach && (c.reach = O); - let T = k.prev; - if ( - (L && ((T = u(t, T, L)), (w += L.length)), - g(t, T, $), - (k = u(t, T, new s(d, f ? r.tokenize(C, f) : C, y, C))), - z && u(t, k, z), - $ > 1) - ) { - const M = { cause: `${d},${m}`, reach: O }; - o(e, t, n, k.prev, w, M), - c && M.reach > c.reach && (c.reach = M.reach); - } - } - } - } - } - } - } - function l() { - const e = { value: null, prev: null, next: null }; - const t = { value: null, prev: e, next: null }; - (e.next = t), (this.head = e), (this.tail = t), (this.length = 0); - } - function u(e, t, n) { - const a = t.next; - const r = { value: n, prev: t, next: a }; - return (t.next = r), (a.prev = r), e.length++, r; - } - function g(e, t, n) { - for (var a = t.next, r = 0; r < n && a !== e.tail; r++) a = a.next; - (t.next = a), (a.prev = t), (e.length -= r); - } - if ( - ((e.Prism = r), - (s.stringify = function e(t, n) { - if (typeof t === 'string') return t; - if (Array.isArray(t)) { - let a = ''; - return ( - t.forEach((t) => { - a += e(t, n); - }), - a - ); - } - const s = { - type: t.type, - content: e(t.content, n), - tag: 'span', - classes: ['token', t.type], - attributes: {}, - language: n, - }; - const i = t.alias; - i - && (Array.isArray(i) - ? Array.prototype.push.apply(s.classes, i) - : s.classes.push(i)), - r.hooks.run('wrap', s); - let o = ''; - for (const l in s.attributes) { - o - += ` ${ - l - }="${ - (s.attributes[l] || '').replace(/"/g, '"') - }"`; - } - return ( - `<${ - s.tag - } class="${ - s.classes.join(' ') - }"${ - o - }>${ - s.content - }` - ); - }), - !e.document) - ) { - return e.addEventListener - ? (r.disableWorkerMessageHandler - || e.addEventListener( - 'message', - (t) => { - const n = JSON.parse(t.data); - const a = n.language; - const s = n.code; - const i = n.immediateClose; - e.postMessage(r.highlight(s, r.languages[a], a)), - i && e.close(); - }, - !1, - ), - r) - : r; - } - const c = r.util.currentScript(); - function d() { - r.manual || r.highlightAll(); - } - if ( - (c - && ((r.filename = c.src), - c.hasAttribute('data-manual') && (r.manual = !0)), - !r.manual) - ) { - const p = document.readyState; - p === 'loading' || (p === 'interactive' && c && c.defer) - ? document.addEventListener('DOMContentLoaded', d) - : window.requestAnimationFrame - ? window.requestAnimationFrame(d) - : window.setTimeout(d, 16); - } - return r; -}(_self)); +var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,a={},r={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof s?new s(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/=c.reach);w+=k.value.length,k=k.next){var A=k.value;if(t.length>e.length)return;if(!(A instanceof s)){var P,$=1;if(b){if(!(P=i(x,w,e,v))||P.index>=e.length)break;var S=P.index,E=P.index+P[0].length,_=w;for(_+=k.value.length;S>=_;)_+=(k=k.next).value.length;if(w=_-=k.value.length,k.value instanceof s)continue;for(var j=k;j!==t.tail&&(_c.reach&&(c.reach=O);var T=k.prev;if(L&&(T=u(t,T,L),w+=L.length),g(t,T,$),k=u(t,T,new s(d,f?r.tokenize(C,f):C,y,C)),z&&u(t,k,z),$>1){var M={cause:d+","+m,reach:O};o(e,t,n,k.prev,w,M),c&&M.reach>c.reach&&(c.reach=M.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function u(e,t,n){var a=t.next,r={value:n,prev:t,next:a};return t.next=r,a.prev=r,e.length++,r}function g(e,t,n){for(var a=t.next,r=0;r"+s.content+""},!e.document)return e.addEventListener?(r.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var n=JSON.parse(t.data),a=n.language,s=n.code,i=n.immediateClose;e.postMessage(r.highlight(s,r.languages[a],a)),i&&e.close()}),!1),r):r;var c=r.util.currentScript();function d(){r.manual||r.highlightAll()}if(c&&(r.filename=c.src,c.hasAttribute("data-manual")&&(r.manual=!0)),!r.manual){var p=document.readyState;"loading"===p||"interactive"===p&&c&&c.defer?document.addEventListener("DOMContentLoaded",d):window.requestAnimationFrame?window.requestAnimationFrame(d):window.setTimeout(d,16)}return r}(_self); /** * Prism: Lightweight, robust, elegant syntax highlighting * @@ -432,492 +6,5 @@ const Prism = (function (e) { * @author Lea Verou * @namespace * @public - */ typeof module !== 'undefined' && module.exports && (module.exports = Prism), -typeof global !== 'undefined' && (global.Prism = Prism), -(Prism.languages.markup = { - comment: { pattern: //, greedy: !0 }, - prolog: { pattern: /<\?[\s\S]+?\?>/, greedy: !0 }, - doctype: { - pattern: - /"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i, - greedy: !0, - inside: { - 'internal-subset': { - pattern: /(^[^\[]*\[)[\s\S]+(?=\]>$)/, - lookbehind: !0, - greedy: !0, - inside: null, - }, - string: { pattern: /"[^"]*"|'[^']*'/, greedy: !0 }, - punctuation: /^$|[[\]]/, - 'doctype-tag': /^DOCTYPE/i, - name: /[^\s<>'"]+/, - }, - }, - cdata: { pattern: //i, greedy: !0 }, - tag: { - pattern: - /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/, - greedy: !0, - inside: { - tag: { - pattern: /^<\/?[^\s>\/]+/, - inside: { punctuation: /^<\/?/, namespace: /^[^\s>\/:]+:/ }, - }, - 'special-attr': [], - 'attr-value': { - pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/, - inside: { - punctuation: [ - { pattern: /^=/, alias: 'attr-equals' }, - { pattern: /^(\s*)["']|["']$/, lookbehind: !0 }, - ], - }, - }, - punctuation: /\/?>/, - 'attr-name': { - pattern: /[^\s>\/]+/, - inside: { namespace: /^[^\s>\/:]+:/ }, - }, - }, - }, - entity: [ - { pattern: /&[\da-z]{1,8};/i, alias: 'named-entity' }, - /&#x?[\da-f]{1,8};/i, - ], -}), -(Prism.languages.markup.tag.inside['attr-value'].inside.entity = Prism.languages.markup.entity), -(Prism.languages.markup.doctype.inside['internal-subset'].inside = Prism.languages.markup), -Prism.hooks.add('wrap', (e) => { - e.type === 'entity' - && (e.attributes.title = e.content.replace(/&/, '&')); -}), -Object.defineProperty(Prism.languages.markup.tag, 'addInlined', { - value(e, t) { - const n = {}; - (n[`language-${t}`] = { - pattern: /(^$)/i, - lookbehind: !0, - inside: Prism.languages[t], - }), - (n.cdata = /^$/i); - const a = { - 'included-cdata': { pattern: //i, inside: n }, - }; - a[`language-${t}`] = { pattern: /[\s\S]+/, inside: Prism.languages[t] }; - const r = {}; - (r[e] = { - pattern: RegExp( - /(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace( - /__/g, - () => e, - ), - 'i', - ), - lookbehind: !0, - greedy: !0, - inside: a, - }), - Prism.languages.insertBefore('markup', 'cdata', r); - }, -}), -Object.defineProperty(Prism.languages.markup.tag, 'addAttribute', { - value(e, t) { - Prism.languages.markup.tag.inside['special-attr'].push({ - pattern: RegExp( - `${/(^|["'\s])/.source - }(?:${ - e - })${ - /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source}`, - 'i', - ), - lookbehind: !0, - inside: { - 'attr-name': /^[^\s=]+/, - 'attr-value': { - pattern: /=[\s\S]+/, - inside: { - value: { - pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/, - lookbehind: !0, - alias: [t, `language-${t}`], - inside: Prism.languages[t], - }, - punctuation: [{ pattern: /^=/, alias: 'attr-equals' }, /"|'/], - }, - }, - }, - }); - }, -}), -(Prism.languages.html = Prism.languages.markup), -(Prism.languages.mathml = Prism.languages.markup), -(Prism.languages.svg = Prism.languages.markup), -(Prism.languages.xml = Prism.languages.extend('markup', {})), -(Prism.languages.ssml = Prism.languages.xml), -(Prism.languages.atom = Prism.languages.xml), -(Prism.languages.rss = Prism.languages.xml), -(function (e) { - const t = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/; - (e.languages.css = { - comment: /\/\*[\s\S]*?\*\//, - atrule: { - pattern: RegExp( - `@[\\w-](?:${ - /[^;{\s"']|\s+(?!\s)/.source - }|${ - t.source - })*?${ - /(?:;|(?=\s*\{))/.source}`, - ), - inside: { - rule: /^@[\w-]+/, - 'selector-function-argument': { - pattern: - /(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/, - lookbehind: !0, - alias: 'selector', - }, - keyword: { - pattern: /(^|[^\w-])(?:and|not|only|or)(?![\w-])/, - lookbehind: !0, - }, - }, - }, - url: { - pattern: RegExp( - `\\burl\\((?:${ - t.source - }|${ - /(?:[^\\\r\n()"']|\\[\s\S])*/.source - })\\)`, - 'i', - ), - greedy: !0, - inside: { - function: /^url/i, - punctuation: /^\(|\)$/, - string: { pattern: RegExp(`^${t.source}$`), alias: 'url' }, - }, - }, - selector: { - pattern: RegExp( - `(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|${ - t.source - })*(?=\\s*\\{)`, - ), - lookbehind: !0, - }, - string: { pattern: t, greedy: !0 }, - property: { - pattern: - /(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i, - lookbehind: !0, - }, - important: /!important\b/i, - function: { pattern: /(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i, lookbehind: !0 }, - punctuation: /[(){};:,]/, - }), - (e.languages.css.atrule.inside.rest = e.languages.css); - const n = e.languages.markup; - n && (n.tag.addInlined('style', 'css'), n.tag.addAttribute('style', 'css')); -}(Prism)), -(Prism.languages.clike = { - comment: [ - { - pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, - lookbehind: !0, - greedy: !0, - }, - { pattern: /(^|[^\\:])\/\/.*/, lookbehind: !0, greedy: !0 }, - ], - string: { - pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, - greedy: !0, - }, - 'class-name': { - pattern: - /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i, - lookbehind: !0, - inside: { punctuation: /[.\\]/ }, - }, - keyword: - /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/, - boolean: /\b(?:false|true)\b/, - function: /\b\w+(?=\()/, - number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i, - operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/, - punctuation: /[{}[\];(),.:]/, -}), -(Prism.languages.javascript = Prism.languages.extend('clike', { - 'class-name': [ - Prism.languages.clike['class-name'], - { - pattern: - /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/, - lookbehind: !0, - }, - ], - keyword: [ - { pattern: /((?:^|\})\s*)catch\b/, lookbehind: !0 }, - { - pattern: - /(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, - lookbehind: !0, - }, - ], - function: - /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/, - number: { - pattern: RegExp( - `${/(^|[^\w$])/.source - }(?:${ - /NaN|Infinity/.source - }|${ - /0[bB][01]+(?:_[01]+)*n?/.source - }|${ - /0[oO][0-7]+(?:_[0-7]+)*n?/.source - }|${ - /0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source - }|${ - /\d+(?:_\d+)*n/.source - }|${ - /(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/ - .source - })${ - /(?![\w$])/.source}`, - ), - lookbehind: !0, - }, - operator: - /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/, -})), -(Prism.languages.javascript['class-name'][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/), -Prism.languages.insertBefore('javascript', 'keyword', { - regex: { - pattern: RegExp( - `${/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source - + /\//.source - }(?:${ - /(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/ - .source - }|${ - /(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/ - .source - })${ - /(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/ - .source}`, - ), - lookbehind: !0, - greedy: !0, - inside: { - 'regex-source': { - pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/, - lookbehind: !0, - alias: 'language-regex', - inside: Prism.languages.regex, - }, - 'regex-delimiter': /^\/|\/$/, - 'regex-flags': /^[a-z]+$/, - }, - }, - 'function-variable': { - pattern: - /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/, - alias: 'function', - }, - parameter: [ - { - pattern: - /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/, - lookbehind: !0, - inside: Prism.languages.javascript, - }, - { - pattern: - /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i, - lookbehind: !0, - inside: Prism.languages.javascript, - }, - { - pattern: - /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/, - lookbehind: !0, - inside: Prism.languages.javascript, - }, - { - pattern: - /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/, - lookbehind: !0, - inside: Prism.languages.javascript, - }, - ], - constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/, -}), -Prism.languages.insertBefore('javascript', 'string', { - hashbang: { pattern: /^#!.*/, greedy: !0, alias: 'comment' }, - 'template-string': { - pattern: - /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/, - greedy: !0, - inside: { - 'template-punctuation': { pattern: /^`|`$/, alias: 'string' }, - interpolation: { - pattern: - /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/, - lookbehind: !0, - inside: { - 'interpolation-punctuation': { - pattern: /^\$\{|\}$/, - alias: 'punctuation', - }, - rest: Prism.languages.javascript, - }, - }, - string: /[\s\S]+/, - }, - }, - 'string-property': { - pattern: - /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m, - lookbehind: !0, - greedy: !0, - alias: 'property', - }, -}), -Prism.languages.insertBefore('javascript', 'operator', { - 'literal-property': { - pattern: - /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m, - lookbehind: !0, - alias: 'property', - }, -}), -Prism.languages.markup - && (Prism.languages.markup.tag.addInlined('script', 'javascript'), - Prism.languages.markup.tag.addAttribute( - /on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/ - .source, - 'javascript', - )), -(Prism.languages.js = Prism.languages.javascript), -(function () { - if (void 0 !== Prism && typeof document !== 'undefined') { - Element.prototype.matches - || (Element.prototype.matches = Element.prototype.msMatchesSelector - || Element.prototype.webkitMatchesSelector); - const e = { - js: 'javascript', - py: 'python', - rb: 'ruby', - ps1: 'powershell', - psm1: 'powershell', - sh: 'bash', - bat: 'batch', - h: 'c', - tex: 'latex', - }; - const t = 'data-src-status'; - const n = 'loading'; - const a = 'loaded'; - const r = `pre[data-src]:not([${ - t - }="${ - a - }"]):not([${ - t - }="${ - n - }"])`; - Prism.hooks.add('before-highlightall', (e) => { - e.selector += `, ${r}`; - }), - Prism.hooks.add('before-sanity-check', (s) => { - const i = s.element; - if (i.matches(r)) { - (s.code = ''), i.setAttribute(t, n); - const o = i.appendChild(document.createElement('CODE')); - o.textContent = 'Loading…'; - const l = i.getAttribute('data-src'); - let u = s.language; - if (u === 'none') { - const g = (/\.(\w+)$/.exec(l) || [, 'none'])[1]; - u = e[g] || g; - } - Prism.util.setLanguage(o, u), Prism.util.setLanguage(i, u); - const c = Prism.plugins.autoloader; - c && c.loadLanguages(u), - (function (e, t, n) { - const a = new XMLHttpRequest(); - a.open('GET', e, !0), - (a.onreadystatechange = function () { - a.readyState == 4 - && (a.status < 400 && a.responseText - ? t(a.responseText) - : a.status >= 400 - ? n( - `✖ Error ${ - a.status - } while fetching file: ${ - a.statusText}`, - ) - : n('✖ Error: File does not exist or is empty')); - }), - a.send(null); - }( - l, - (e) => { - i.setAttribute(t, a); - const n = (function (e) { - const t = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec( - e || '', - ); - if (t) { - const n = Number(t[1]); - const a = t[2]; - const r = t[3]; - return a ? (r ? [n, Number(r)] : [n, void 0]) : [n, n]; - } - }(i.getAttribute('data-range'))); - if (n) { - const r = e.split(/\r\n?|\n/g); - let s = n[0]; - let l = n[1] == null ? r.length : n[1]; - s < 0 && (s += r.length), - (s = Math.max(0, Math.min(s - 1, r.length))), - l < 0 && (l += r.length), - (l = Math.max(0, Math.min(l, r.length))), - (e = r.slice(s, l).join('\n')), - i.hasAttribute('data-start') - || i.setAttribute('data-start', String(s + 1)); - } - (o.textContent = e), Prism.highlightElement(o); - }, - (e) => { - i.setAttribute(t, 'failed'), (o.textContent = e); - }, - )); - } - }), - (Prism.plugins.fileHighlight = { - highlight(e) { - for ( - var t, n = (e || document).querySelectorAll(r), a = 0; - (t = n[a++]); - - ) Prism.highlightElement(t); - }, - }); - let s = !1; - Prism.fileHighlight = function () { - s - || (console.warn( - 'Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead.', - ), - (s = !0)), - Prism.plugins.fileHighlight.highlight.apply(this, arguments); - }; - } -}()); -// # sourceMappingURL=/sm/1f55244a569fc0911044b5e4725a97872b6d85b0662a3429a809bb62f713c381.map + */"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism),Prism.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[t]},n.cdata=/^$/i;var a={"included-cdata":{pattern://i,inside:n}};a["language-"+t]={pattern:/[\s\S]+/,inside:Prism.languages[t]};var r={};r[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:a},Prism.languages.insertBefore("markup","cdata",r)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(Prism),Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),Prism.languages.js=Prism.languages.javascript,function(){if(void 0!==Prism&&"undefined"!=typeof document){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},t="data-src-status",n="loading",a="loaded",r="pre[data-src]:not(["+t+'="'+a+'"]):not(['+t+'="'+n+'"])';Prism.hooks.add("before-highlightall",(function(e){e.selector+=", "+r})),Prism.hooks.add("before-sanity-check",(function(s){var i=s.element;if(i.matches(r)){s.code="",i.setAttribute(t,n);var o=i.appendChild(document.createElement("CODE"));o.textContent="Loading…";var l=i.getAttribute("data-src"),u=s.language;if("none"===u){var g=(/\.(\w+)$/.exec(l)||[,"none"])[1];u=e[g]||g}Prism.util.setLanguage(o,u),Prism.util.setLanguage(i,u);var c=Prism.plugins.autoloader;c&&c.loadLanguages(u),function(e,t,n){var a=new XMLHttpRequest;a.open("GET",e,!0),a.onreadystatechange=function(){4==a.readyState&&(a.status<400&&a.responseText?t(a.responseText):a.status>=400?n("✖ Error "+a.status+" while fetching file: "+a.statusText):n("✖ Error: File does not exist or is empty"))},a.send(null)}(l,(function(e){i.setAttribute(t,a);var n=function(e){var t=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(e||"");if(t){var n=Number(t[1]),a=t[2],r=t[3];return a?r?[n,Number(r)]:[n,void 0]:[n,n]}}(i.getAttribute("data-range"));if(n){var r=e.split(/\r\n?|\n/g),s=n[0],l=null==n[1]?r.length:n[1];s<0&&(s+=r.length),s=Math.max(0,Math.min(s-1,r.length)),l<0&&(l+=r.length),l=Math.max(0,Math.min(l,r.length)),e=r.slice(s,l).join("\n"),i.hasAttribute("data-start")||i.setAttribute("data-start",String(s+1))}o.textContent=e,Prism.highlightElement(o)}),(function(e){i.setAttribute(t,"failed"),o.textContent=e}))}})),Prism.plugins.fileHighlight={highlight:function(e){for(var t,n=(e||document).querySelectorAll(r),a=0;t=n[a++];)Prism.highlightElement(t)}};var s=!1;Prism.fileHighlight=function(){s||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),s=!0),Prism.plugins.fileHighlight.highlight.apply(this,arguments)}}}(); +//# sourceMappingURL=/sm/1f55244a569fc0911044b5e4725a97872b6d85b0662a3429a809bb62f713c381.map \ No newline at end of file diff --git a/frontend/app/components/Assist/RecordingsList/Recordings.tsx b/frontend/app/components/Assist/RecordingsList/Recordings.tsx index 3de24c7c3..074386797 100644 --- a/frontend/app/components/Assist/RecordingsList/Recordings.tsx +++ b/frontend/app/components/Assist/RecordingsList/Recordings.tsx @@ -6,14 +6,16 @@ import SelectDateRange from 'Shared/SelectDateRange/SelectDateRange'; import { observer } from 'mobx-react-lite'; import RecordingsList from './RecordingsList'; import RecordingsSearch from './RecordingsSearch'; +import { useTranslation } from 'react-i18next'; function Recordings() { + const { t } = useTranslation(); const { recordingsStore, userStore } = useStore(); const userId = userStore.account.id; const recordingsOwner = [ - { value: '0', label: 'All Videos' }, - { value: userId, label: 'My Videos' }, + { value: '0', label: t('All Videos') }, + { value: userId, label: t('My Videos') }, ]; const onDateChange = (e: any) => { @@ -27,7 +29,7 @@ function Recordings() { >
- +
{}; function AlertsSearch() { + const { t } = useTranslation(); const { alertsStore } = useStore(); const [inputValue, setInputValue] = useState(alertsStore.alertsSearch); @@ -37,7 +39,7 @@ function AlertsSearch() { allowClear name="alertsSearch" className="w-full" - placeholder="Filter by alert title" + placeholder={t('Filter by alert title')} onChange={write} />
diff --git a/frontend/app/components/Dashboard/components/Alerts/AlertsView.tsx b/frontend/app/components/Dashboard/components/Alerts/AlertsView.tsx index 1bd729e1d..92ec68dd2 100644 --- a/frontend/app/components/Dashboard/components/Alerts/AlertsView.tsx +++ b/frontend/app/components/Dashboard/components/Alerts/AlertsView.tsx @@ -35,7 +35,7 @@ function AlertsView({ siteId }: IAlertsView) { >
- +
diff --git a/frontend/app/components/Dashboard/components/Alerts/NewAlert.tsx b/frontend/app/components/Dashboard/components/Alerts/NewAlert.tsx index 5c71a303c..b679bccdb 100644 --- a/frontend/app/components/Dashboard/components/Alerts/NewAlert.tsx +++ b/frontend/app/components/Dashboard/components/Alerts/NewAlert.tsx @@ -15,6 +15,7 @@ import BottomButtons from './AlertForm/BottomButtons'; import NotifyHooks from './AlertForm/NotifyHooks'; import AlertListItem from './AlertListItem'; import Condition from './AlertForm/Condition'; +import { useTranslation } from 'react-i18next'; function Circle({ text }: { text: string }) { return ( @@ -68,6 +69,7 @@ interface IProps extends RouteComponentProps { } function NewAlert(props: IProps) { + const { t } = useTranslation(); const { alertsStore, settingsStore } = useStore(); const { fetchTriggerOptions, @@ -122,18 +124,18 @@ function NewAlert(props: IProps) { const onDelete = async (instance: Alert) => { if ( await confirm({ - header: 'Confirm', - confirmButton: 'Yes, delete', - confirmation: 'Are you sure you want to permanently delete this alert?', + header: t('Confirm'), + confirmButton: t('Yes, delete'), + confirmation: t('Are you sure you want to permanently delete this alert?'), }) ) { remove(instance.alertId) .then(() => { props.history.push(withSiteId(alerts(), siteId)); - toast.success('Alert deleted'); + toast.success(t('Alert deleted')); }) .catch(() => { - toast.error('Failed to delete an alert'); + toast.error(t('Failed to delete an alert')); }); } }; @@ -143,14 +145,14 @@ function NewAlert(props: IProps) { save(instance) .then(() => { if (!wasUpdating) { - toast.success('New alert saved'); + toast.success(t('New alert saved')); props.history.push(withSiteId(alerts(), siteId)); } else { - toast.success('Alert updated'); + toast.success(t('Alert updated')); } }) .catch(() => { - toast.error('Failed to create an alert'); + toast.error(t('Failed to create an alert')); }); }; @@ -202,10 +204,10 @@ function NewAlert(props: IProps) {
{isThreshold && - 'Eg. When Threshold is above 1ms over the past 15mins, notify me through Slack #foss-notifications.'} + t('Eg. When Threshold is above 1ms over the past 15mins, notify me through Slack #foss-notifications.')} {!isThreshold && - 'Eg. Alert me if % change of memory.avg is greater than 10% over the past 4 hours compared to the previous 4 hours.'} + t('Eg. Alert me if % change of memory.avg is greater than 10% over the past 4 hours compared to the previous 4 hours.')}
@@ -257,7 +259,7 @@ function NewAlert(props: IProps) { />
{}; function DashboardSearch() { + const { t } = useTranslation(); const { dashboardStore } = useStore(); const [query, setQuery] = useState(dashboardStore.dashboardsSearch); useEffect(() => { @@ -32,7 +34,7 @@ function DashboardSearch() { allowClear name="dashboardsSearch" className="w-full btn-search-dashboard" - placeholder="Filter by dashboard title" + placeholder={t('Filter by dashboard title')} onChange={write} onSearch={(value) => dashboardStore.updateKey('filter', { diff --git a/frontend/app/components/Dashboard/components/DashboardList/Header.tsx b/frontend/app/components/Dashboard/components/DashboardList/Header.tsx index c2cfaf53a..89513f46c 100644 --- a/frontend/app/components/Dashboard/components/DashboardList/Header.tsx +++ b/frontend/app/components/Dashboard/components/DashboardList/Header.tsx @@ -6,15 +6,17 @@ import CreateDashboardButton from 'Components/Dashboard/components/CreateDashboa import { useStore } from 'App/mstore'; import { observer } from 'mobx-react-lite'; import DashboardSearch from './DashboardSearch'; +import { useTranslation } from 'react-i18next'; function Header() { + const { t } = useTranslation(); const { dashboardStore } = useStore(); const dashboardsSearch = dashboardStore.filter.query; const showSearch = dashboardStore.dashboards.length > 0 || dashboardsSearch; return (
- +
{showSearch && (
diff --git a/frontend/app/components/Dashboard/components/MetricsSearch/MetricsSearch.tsx b/frontend/app/components/Dashboard/components/MetricsSearch/MetricsSearch.tsx index 67f0815b1..b294dda9c 100644 --- a/frontend/app/components/Dashboard/components/MetricsSearch/MetricsSearch.tsx +++ b/frontend/app/components/Dashboard/components/MetricsSearch/MetricsSearch.tsx @@ -4,9 +4,11 @@ import { useStore } from 'App/mstore'; import { Icon } from 'UI'; import { Input } from 'antd'; import { debounce } from 'App/utils'; +import { useTranslation } from 'react-i18next'; let debounceUpdate: any = () => {}; function MetricsSearch() { + const { t } = useTranslation(); const { metricStore } = useStore(); const [query, setQuery] = useState(metricStore.filter.query); useEffect(() => { @@ -32,7 +34,7 @@ function MetricsSearch() { allowClear name="metricsSearch" className="w-full input-search-card" - placeholder="Filter by title or owner" + placeholder={t('Filter by title or owner')} onChange={write} />
diff --git a/frontend/app/components/FFlags/FFlagsListHeader.tsx b/frontend/app/components/FFlags/FFlagsListHeader.tsx index b03a41087..015fa9a1d 100644 --- a/frontend/app/components/FFlags/FFlagsListHeader.tsx +++ b/frontend/app/components/FFlags/FFlagsListHeader.tsx @@ -13,7 +13,7 @@ function FFlagsListHeader({ siteId }: { siteId: string }) { return (
- +