Server IP : 185.86.78.101 / Your IP : 216.73.216.124 Web Server : Apache System : Linux 675867-vds-valikoshka1996.gmhost.pp.ua 5.4.0-150-generic #167-Ubuntu SMP Mon May 15 17:35:05 UTC 2023 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /www/wwwroot/mifepriston.org/node_modules/@webassemblyjs/wast-parser/esm/ |
Upload File : |
// string literal characters cannot contain control codes var CONTROL_CODES = [0, // null 7, // bell 8, // backspace 9, // horizontal 10, // line feed 11, // vertical tab 12, // form feed 13, // carriage return 26, // Control-Z 27, // escape 127 // delete ]; // escaped sequences can either be a two character hex value, or one of the // following single character codes function decodeControlCharacter(char) { switch (char) { case "t": return 0x09; case "n": return 0x0a; case "r": return 0x0d; case '"': return 0x22; case "′": return 0x27; case "\\": return 0x5c; } return -1; } var ESCAPE_CHAR = 92; // backslash var QUOTE_CHAR = 34; // backslash // parse string as per the spec: // https://webassembly.github.io/spec/core/multipage/text/values.html#text-string export function parseString(value) { var byteArray = []; var index = 0; while (index < value.length) { var charCode = value.charCodeAt(index); if (CONTROL_CODES.indexOf(charCode) !== -1) { throw new Error("ASCII control characters are not permitted within string literals"); } if (charCode === QUOTE_CHAR) { throw new Error("quotes are not permitted within string literals"); } if (charCode === ESCAPE_CHAR) { var firstChar = value.substr(index + 1, 1); var decodedControlChar = decodeControlCharacter(firstChar); if (decodedControlChar !== -1) { // single character escaped values, e.g. \r byteArray.push(decodedControlChar); index += 2; } else { // hex escaped values, e.g. \2a var hexValue = value.substr(index + 1, 2); if (!/^[0-9A-F]{2}$/i.test(hexValue)) { throw new Error("invalid character encoding"); } byteArray.push(parseInt(hexValue, 16)); index += 3; } } else { // ASCII encoded values byteArray.push(charCode); index++; } } return byteArray; }