From 5bf66662a9bdd62c5bccab15e607cd95cfb8fcab Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Mon, 27 Jul 2020 10:05:23 +0200 Subject: Removed wordpress and phpmyadmin, my server doesn't handle it well and it brings shame on my familly --- .../tcpdf/include/barcodes/datamatrix.php | 1176 -- .../tecnickcom/tcpdf/include/barcodes/pdf417.php | 996 - .../tecnickcom/tcpdf/include/barcodes/qrcode.php | 2867 --- .../tecnickcom/tcpdf/include/tcpdf_colors.php | 462 - .../tecnickcom/tcpdf/include/tcpdf_filters.php | 481 - .../tecnickcom/tcpdf/include/tcpdf_font_data.php | 18447 ------------------- .../tecnickcom/tcpdf/include/tcpdf_fonts.php | 2654 --- .../tecnickcom/tcpdf/include/tcpdf_images.php | 360 - .../tecnickcom/tcpdf/include/tcpdf_static.php | 2616 --- 9 files changed, 30059 deletions(-) delete mode 100644 srcs/phpmyadmin/vendor/tecnickcom/tcpdf/include/barcodes/datamatrix.php delete mode 100644 srcs/phpmyadmin/vendor/tecnickcom/tcpdf/include/barcodes/pdf417.php delete mode 100644 srcs/phpmyadmin/vendor/tecnickcom/tcpdf/include/barcodes/qrcode.php delete mode 100644 srcs/phpmyadmin/vendor/tecnickcom/tcpdf/include/tcpdf_colors.php delete mode 100644 srcs/phpmyadmin/vendor/tecnickcom/tcpdf/include/tcpdf_filters.php delete mode 100644 srcs/phpmyadmin/vendor/tecnickcom/tcpdf/include/tcpdf_font_data.php delete mode 100644 srcs/phpmyadmin/vendor/tecnickcom/tcpdf/include/tcpdf_fonts.php delete mode 100644 srcs/phpmyadmin/vendor/tecnickcom/tcpdf/include/tcpdf_images.php delete mode 100644 srcs/phpmyadmin/vendor/tecnickcom/tcpdf/include/tcpdf_static.php (limited to 'srcs/phpmyadmin/vendor/tecnickcom/tcpdf/include') diff --git a/srcs/phpmyadmin/vendor/tecnickcom/tcpdf/include/barcodes/datamatrix.php b/srcs/phpmyadmin/vendor/tecnickcom/tcpdf/include/barcodes/datamatrix.php deleted file mode 100644 index 19b46fa..0000000 --- a/srcs/phpmyadmin/vendor/tecnickcom/tcpdf/include/barcodes/datamatrix.php +++ /dev/null @@ -1,1176 +0,0 @@ -. -// -// See LICENSE.TXT file for more information. -// ------------------------------------------------------------------- -// -// DESCRIPTION : -// -// Class to create DataMatrix ECC 200 barcode arrays for TCPDF class. -// DataMatrix (ISO/IEC 16022:2006) is a 2-dimensional bar code. -//============================================================+ - -/** -* @file -* Class to create DataMatrix ECC 200 barcode arrays for TCPDF class. -* DataMatrix (ISO/IEC 16022:2006) is a 2-dimensional bar code. -* -* @package com.tecnick.tcpdf -* @author Nicola Asuni -* @version 1.0.008 -*/ - -// custom definitions -if (!defined('DATAMATRIXDEFS')) { - - /** - * Indicate that definitions for this class are set - */ - define('DATAMATRIXDEFS', true); - - // ----------------------------------------------------- - -} // end of custom definitions - -// #*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*# - - -/** -* ASCII encoding: ASCII character 0 to 127 (1 byte per CW) -*/ -define('ENC_ASCII', 0); - -/** -* C40 encoding: Upper-case alphanumeric (3/2 bytes per CW) -*/ -define('ENC_C40', 1); - -/** -* TEXT encoding: Lower-case alphanumeric (3/2 bytes per CW) -*/ -define('ENC_TXT', 2); - -/** -* X12 encoding: ANSI X12 (3/2 byte per CW) -*/ -define('ENC_X12', 3); - -/** -* EDIFACT encoding: ASCII character 32 to 94 (4/3 bytes per CW) -*/ -define('ENC_EDF', 4); - -/** -* BASE 256 encoding: ASCII character 0 to 255 (1 byte per CW) -*/ -define('ENC_BASE256', 5); - -/** -* ASCII extended encoding: ASCII character 128 to 255 (1/2 byte per CW) -*/ -define('ENC_ASCII_EXT', 6); - -/** -* ASCII number encoding: ASCII digits (2 bytes per CW) -*/ -define('ENC_ASCII_NUM', 7); - -/** -* @class Datamatrix -* Class to create DataMatrix ECC 200 barcode arrays for TCPDF class. -* DataMatrix (ISO/IEC 16022:2006) is a 2-dimensional bar code. -* -* @package com.tecnick.tcpdf -* @author Nicola Asuni -* @version 1.0.004 -*/ -class Datamatrix { - - /** - * Barcode array to be returned which is readable by TCPDF. - * @protected - */ - protected $barcode_array = array(); - - /** - * Store last used encoding for data codewords. - * @protected - */ - protected $last_enc = ENC_ASCII; - - /** - * Table of Data Matrix ECC 200 Symbol Attributes: - * @protected - */ - protected $symbattr = array( - // square form --------------------------------------------------------------------------------------- - array(0x00a,0x00a,0x008,0x008,0x00a,0x00a,0x008,0x008,0x001,0x001,0x001,0x003,0x005,0x001,0x003,0x005), // 10x10 - array(0x00c,0x00c,0x00a,0x00a,0x00c,0x00c,0x00a,0x00a,0x001,0x001,0x001,0x005,0x007,0x001,0x005,0x007), // 12x12 - array(0x00e,0x00e,0x00c,0x00c,0x00e,0x00e,0x00c,0x00c,0x001,0x001,0x001,0x008,0x00a,0x001,0x008,0x00a), // 14x14 - array(0x010,0x010,0x00e,0x00e,0x010,0x010,0x00e,0x00e,0x001,0x001,0x001,0x00c,0x00c,0x001,0x00c,0x00c), // 16x16 - array(0x012,0x012,0x010,0x010,0x012,0x012,0x010,0x010,0x001,0x001,0x001,0x012,0x00e,0x001,0x012,0x00e), // 18x18 - array(0x014,0x014,0x012,0x012,0x014,0x014,0x012,0x012,0x001,0x001,0x001,0x016,0x012,0x001,0x016,0x012), // 20x20 - array(0x016,0x016,0x014,0x014,0x016,0x016,0x014,0x014,0x001,0x001,0x001,0x01e,0x014,0x001,0x01e,0x014), // 22x22 - array(0x018,0x018,0x016,0x016,0x018,0x018,0x016,0x016,0x001,0x001,0x001,0x024,0x018,0x001,0x024,0x018), // 24x24 - array(0x01a,0x01a,0x018,0x018,0x01a,0x01a,0x018,0x018,0x001,0x001,0x001,0x02c,0x01c,0x001,0x02c,0x01c), // 26x26 - array(0x020,0x020,0x01c,0x01c,0x010,0x010,0x00e,0x00e,0x002,0x002,0x004,0x03e,0x024,0x001,0x03e,0x024), // 32x32 - array(0x024,0x024,0x020,0x020,0x012,0x012,0x010,0x010,0x002,0x002,0x004,0x056,0x02a,0x001,0x056,0x02a), // 36x36 - array(0x028,0x028,0x024,0x024,0x014,0x014,0x012,0x012,0x002,0x002,0x004,0x072,0x030,0x001,0x072,0x030), // 40x40 - array(0x02c,0x02c,0x028,0x028,0x016,0x016,0x014,0x014,0x002,0x002,0x004,0x090,0x038,0x001,0x090,0x038), // 44x44 - array(0x030,0x030,0x02c,0x02c,0x018,0x018,0x016,0x016,0x002,0x002,0x004,0x0ae,0x044,0x001,0x0ae,0x044), // 48x48 - array(0x034,0x034,0x030,0x030,0x01a,0x01a,0x018,0x018,0x002,0x002,0x004,0x0cc,0x054,0x002,0x066,0x02a), // 52x52 - array(0x040,0x040,0x038,0x038,0x010,0x010,0x00e,0x00e,0x004,0x004,0x010,0x118,0x070,0x002,0x08c,0x038), // 64x64 - array(0x048,0x048,0x040,0x040,0x012,0x012,0x010,0x010,0x004,0x004,0x010,0x170,0x090,0x004,0x05c,0x024), // 72x72 - array(0x050,0x050,0x048,0x048,0x014,0x014,0x012,0x012,0x004,0x004,0x010,0x1c8,0x0c0,0x004,0x072,0x030), // 80x80 - array(0x058,0x058,0x050,0x050,0x016,0x016,0x014,0x014,0x004,0x004,0x010,0x240,0x0e0,0x004,0x090,0x038), // 88x88 - array(0x060,0x060,0x058,0x058,0x018,0x018,0x016,0x016,0x004,0x004,0x010,0x2b8,0x110,0x004,0x0ae,0x044), // 96x96 - array(0x068,0x068,0x060,0x060,0x01a,0x01a,0x018,0x018,0x004,0x004,0x010,0x330,0x150,0x006,0x088,0x038), // 104x104 - array(0x078,0x078,0x06c,0x06c,0x014,0x014,0x012,0x012,0x006,0x006,0x024,0x41a,0x198,0x006,0x0af,0x044), // 120x120 - array(0x084,0x084,0x078,0x078,0x016,0x016,0x014,0x014,0x006,0x006,0x024,0x518,0x1f0,0x008,0x0a3,0x03e), // 132x132 - array(0x090,0x090,0x084,0x084,0x018,0x018,0x016,0x016,0x006,0x006,0x024,0x616,0x26c,0x00a,0x09c,0x03e), // 144x144 - // rectangular form (currently unused) --------------------------------------------------------------------------- - array(0x008,0x012,0x006,0x010,0x008,0x012,0x006,0x010,0x001,0x001,0x001,0x005,0x007,0x001,0x005,0x007), // 8x18 - array(0x008,0x020,0x006,0x01c,0x008,0x010,0x006,0x00e,0x001,0x002,0x002,0x00a,0x00b,0x001,0x00a,0x00b), // 8x32 - array(0x00c,0x01a,0x00a,0x018,0x00c,0x01a,0x00a,0x018,0x001,0x001,0x001,0x010,0x00e,0x001,0x010,0x00e), // 12x26 - array(0x00c,0x024,0x00a,0x020,0x00c,0x012,0x00a,0x010,0x001,0x002,0x002,0x00c,0x012,0x001,0x00c,0x012), // 12x36 - array(0x010,0x024,0x00e,0x020,0x010,0x012,0x00e,0x010,0x001,0x002,0x002,0x020,0x018,0x001,0x020,0x018), // 16x36 - array(0x010,0x030,0x00e,0x02c,0x010,0x018,0x00e,0x016,0x001,0x002,0x002,0x031,0x01c,0x001,0x031,0x01c) // 16x48 - ); - - /** - * Map encodation modes whit character sets. - * @protected - */ - protected $chset_id = array(ENC_C40 => 'C40', ENC_TXT => 'TXT', ENC_X12 =>'X12'); - - /** - * Basic set of characters for each encodation mode. - * @protected - */ - protected $chset = array( - 'C40' => array( // Basic set for C40 ---------------------------------------------------------------------------- - 'S1'=>0x00,'S2'=>0x01,'S3'=>0x02,0x20=>0x03,0x30=>0x04,0x31=>0x05,0x32=>0x06,0x33=>0x07,0x34=>0x08,0x35=>0x09, // - 0x36=>0x0a,0x37=>0x0b,0x38=>0x0c,0x39=>0x0d,0x41=>0x0e,0x42=>0x0f,0x43=>0x10,0x44=>0x11,0x45=>0x12,0x46=>0x13, // - 0x47=>0x14,0x48=>0x15,0x49=>0x16,0x4a=>0x17,0x4b=>0x18,0x4c=>0x19,0x4d=>0x1a,0x4e=>0x1b,0x4f=>0x1c,0x50=>0x1d, // - 0x51=>0x1e,0x52=>0x1f,0x53=>0x20,0x54=>0x21,0x55=>0x22,0x56=>0x23,0x57=>0x24,0x58=>0x25,0x59=>0x26,0x5a=>0x27),// - 'TXT' => array( // Basic set for TEXT --------------------------------------------------------------------------- - 'S1'=>0x00,'S2'=>0x01,'S3'=>0x02,0x20=>0x03,0x30=>0x04,0x31=>0x05,0x32=>0x06,0x33=>0x07,0x34=>0x08,0x35=>0x09, // - 0x36=>0x0a,0x37=>0x0b,0x38=>0x0c,0x39=>0x0d,0x61=>0x0e,0x62=>0x0f,0x63=>0x10,0x64=>0x11,0x65=>0x12,0x66=>0x13, // - 0x67=>0x14,0x68=>0x15,0x69=>0x16,0x6a=>0x17,0x6b=>0x18,0x6c=>0x19,0x6d=>0x1a,0x6e=>0x1b,0x6f=>0x1c,0x70=>0x1d, // - 0x71=>0x1e,0x72=>0x1f,0x73=>0x20,0x74=>0x21,0x75=>0x22,0x76=>0x23,0x77=>0x24,0x78=>0x25,0x79=>0x26,0x7a=>0x27),// - 'SH1' => array( // Shift 1 set ---------------------------------------------------------------------------------- - 0x00=>0x00,0x01=>0x01,0x02=>0x02,0x03=>0x03,0x04=>0x04,0x05=>0x05,0x06=>0x06,0x07=>0x07,0x08=>0x08,0x09=>0x09, // - 0x0a=>0x0a,0x0b=>0x0b,0x0c=>0x0c,0x0d=>0x0d,0x0e=>0x0e,0x0f=>0x0f,0x10=>0x10,0x11=>0x11,0x12=>0x12,0x13=>0x13, // - 0x14=>0x14,0x15=>0x15,0x16=>0x16,0x17=>0x17,0x18=>0x18,0x19=>0x19,0x1a=>0x1a,0x1b=>0x1b,0x1c=>0x1c,0x1d=>0x1d, // - 0x1e=>0x1e,0x1f=>0x1f), // - 'SH2' => array( // Shift 2 set ---------------------------------------------------------------------------------- - 0x21=>0x00,0x22=>0x01,0x23=>0x02,0x24=>0x03,0x25=>0x04,0x26=>0x05,0x27=>0x06,0x28=>0x07,0x29=>0x08,0x2a=>0x09, // - 0x2b=>0x0a,0x2c=>0x0b,0x2d=>0x0c,0x2e=>0x0d,0x2f=>0x0e,0x3a=>0x0f,0x3b=>0x10,0x3c=>0x11,0x3d=>0x12,0x3e=>0x13, // - 0x3f=>0x14,0x40=>0x15,0x5b=>0x16,0x5c=>0x17,0x5d=>0x18,0x5e=>0x19,0x5f=>0x1a,'F1'=>0x1b,'US'=>0x1e), // - 'S3C' => array( // Shift 3 set for C40 -------------------------------------------------------------------------- - 0x60=>0x00,0x61=>0x01,0x62=>0x02,0x63=>0x03,0x64=>0x04,0x65=>0x05,0x66=>0x06,0x67=>0x07,0x68=>0x08,0x69=>0x09, // - 0x6a=>0x0a,0x6b=>0x0b,0x6c=>0x0c,0x6d=>0x0d,0x6e=>0x0e,0x6f=>0x0f,0x70=>0x10,0x71=>0x11,0x72=>0x12,0x73=>0x13, // - 0x74=>0x14,0x75=>0x15,0x76=>0x16,0x77=>0x17,0x78=>0x18,0x79=>0x19,0x7a=>0x1a,0x7b=>0x1b,0x7c=>0x1c,0x7d=>0x1d, // - 0x7e=>0x1e,0x7f=>0x1f), - 'S3T' => array( // Shift 3 set for TEXT ------------------------------------------------------------------------- - 0x60=>0x00,0x41=>0x01,0x42=>0x02,0x43=>0x03,0x44=>0x04,0x45=>0x05,0x46=>0x06,0x47=>0x07,0x48=>0x08,0x49=>0x09, // - 0x4a=>0x0a,0x4b=>0x0b,0x4c=>0x0c,0x4d=>0x0d,0x4e=>0x0e,0x4f=>0x0f,0x50=>0x10,0x51=>0x11,0x52=>0x12,0x53=>0x13, // - 0x54=>0x14,0x55=>0x15,0x56=>0x16,0x57=>0x17,0x58=>0x18,0x59=>0x19,0x5a=>0x1a,0x7b=>0x1b,0x7c=>0x1c,0x7d=>0x1d, // - 0x7e=>0x1e,0x7f=>0x1f), // - 'X12' => array( // Set for X12 ---------------------------------------------------------------------------------- - 0x0d=>0x00,0x2a=>0x01,0x3e=>0x02,0x20=>0x03,0x30=>0x04,0x31=>0x05,0x32=>0x06,0x33=>0x07,0x34=>0x08,0x35=>0x09, // - 0x36=>0x0a,0x37=>0x0b,0x38=>0x0c,0x39=>0x0d,0x41=>0x0e,0x42=>0x0f,0x43=>0x10,0x44=>0x11,0x45=>0x12,0x46=>0x13, // - 0x47=>0x14,0x48=>0x15,0x49=>0x16,0x4a=>0x17,0x4b=>0x18,0x4c=>0x19,0x4d=>0x1a,0x4e=>0x1b,0x4f=>0x1c,0x50=>0x1d, // - 0x51=>0x1e,0x52=>0x1f,0x53=>0x20,0x54=>0x21,0x55=>0x22,0x56=>0x23,0x57=>0x24,0x58=>0x25,0x59=>0x26,0x5a=>0x27) // - ); - -// ----------------------------------------------------------------------------- - - /** - * This is the class constructor. - * Creates a datamatrix object - * @param $code (string) Code to represent using Datamatrix. - * @public - */ - public function __construct($code) { - $barcode_array = array(); - if ((is_null($code)) OR ($code == '\0') OR ($code == '')) { - return false; - } - // get data codewords - $cw = $this->getHighLevelEncoding($code); - // number of data codewords - $nd = count($cw); - // check size - if ($nd > 1558) { - return false; - } - // get minimum required matrix size. - foreach ($this->symbattr as $params) { - if ($params[11] >= $nd) { - break; - } - } - if ($params[11] < $nd) { - // too much data - return false; - } elseif ($params[11] > $nd) { - // add padding - if ((($params[11] - $nd) > 1) AND ($cw[($nd - 1)] != 254)) { - if ($this->last_enc == ENC_EDF) { - // switch to ASCII encoding - $cw[] = 124; - ++$nd; - } elseif (($this->last_enc != ENC_ASCII) AND ($this->last_enc != ENC_BASE256)) { - // switch to ASCII encoding - $cw[] = 254; - ++$nd; - } - } - if ($params[11] > $nd) { - // add first pad - $cw[] = 129; - ++$nd; - // add remaining pads - for ($i = $nd; $i < $params[11]; ++$i) { - $cw[] = $this->get253StateCodeword(129, $i); - } - } - } - // add error correction codewords - $cw = $this->getErrorCorrection($cw, $params[13], $params[14], $params[15]); - // initialize empty arrays - $grid = array_fill(0, ($params[2] * $params[3]), 0); - // get placement map - $places = $this->getPlacementMap($params[2], $params[3]); - // fill the grid with data - $grid = array(); - $i = 0; - // region data row max index - $rdri = ($params[4] - 1); - // region data column max index - $rdci = ($params[5] - 1); - // for each vertical region - for ($vr = 0; $vr < $params[9]; ++$vr) { - // for each row on region - for ($r = 0; $r < $params[4]; ++$r) { - // get row - $row = (($vr * $params[4]) + $r); - // for each horizontal region - for ($hr = 0; $hr < $params[8]; ++$hr) { - // for each column on region - for ($c = 0; $c < $params[5]; ++$c) { - // get column - $col = (($hr * $params[5]) + $c); - // braw bits by case - if ($r == 0) { - // top finder pattern - if ($c % 2) { - $grid[$row][$col] = 0; - } else { - $grid[$row][$col] = 1; - } - } elseif ($r == $rdri) { - // bottom finder pattern - $grid[$row][$col] = 1; - } elseif ($c == 0) { - // left finder pattern - $grid[$row][$col] = 1; - } elseif ($c == $rdci) { - // right finder pattern - if ($r % 2) { - $grid[$row][$col] = 1; - } else { - $grid[$row][$col] = 0; - } - } else { // data bit - if ($places[$i] < 2) { - $grid[$row][$col] = $places[$i]; - } else { - // codeword ID - $cw_id = (floor($places[$i] / 10) - 1); - // codeword BIT mask - $cw_bit = pow(2, (8 - ($places[$i] % 10))); - $grid[$row][$col] = (($cw[$cw_id] & $cw_bit) == 0) ? 0 : 1; - } - ++$i; - } - } - } - } - } - $this->barcode_array['num_rows'] = $params[0]; - $this->barcode_array['num_cols'] = $params[1]; - $this->barcode_array['bcode'] = $grid; - } - - /** - * Returns a barcode array which is readable by TCPDF - * @return array barcode array readable by TCPDF; - * @public - */ - public function getBarcodeArray() { - return $this->barcode_array; - } - - /** - * Product of two numbers in a Power-of-Two Galois Field - * @param $a (int) first number to multiply. - * @param $b (int) second number to multiply. - * @param $log (array) Log table. - * @param $alog (array) Anti-Log table. - * @param $gf (array) Number of Factors of the Reed-Solomon polynomial. - * @return int product - * @protected - */ - protected function getGFProduct($a, $b, $log, $alog, $gf) { - if (($a == 0) OR ($b == 0)) { - return 0; - } - return ($alog[($log[$a] + $log[$b]) % ($gf - 1)]); - } - - /** - * Add error correction codewords to data codewords array (ANNEX E). - * @param $wd (array) Array of datacodewords. - * @param $nb (int) Number of blocks. - * @param $nd (int) Number of data codewords per block. - * @param $nc (int) Number of correction codewords per block. - * @param $gf (int) numner of fields on log/antilog table (power of 2). - * @param $pp (int) The value of its prime modulus polynomial (301 for ECC200). - * @return array data codewords + error codewords - * @protected - */ - protected function getErrorCorrection($wd, $nb, $nd, $nc, $gf=256, $pp=301) { - // generate the log ($log) and antilog ($alog) tables - $log[0] = 0; - $alog[0] = 1; - for ($i = 1; $i < $gf; ++$i) { - $alog[$i] = ($alog[($i - 1)] * 2); - if ($alog[$i] >= $gf) { - $alog[$i] ^= $pp; - } - $log[$alog[$i]] = $i; - } - ksort($log); - // generate the polynomial coefficients (c) - $c = array_fill(0, ($nc + 1), 0); - $c[0] = 1; - for ($i = 1; $i <= $nc; ++$i) { - $c[$i] = $c[($i-1)]; - for ($j = ($i - 1); $j >= 1; --$j) { - $c[$j] = $c[($j - 1)] ^ $this->getGFProduct($c[$j], $alog[$i], $log, $alog, $gf); - } - $c[0] = $this->getGFProduct($c[0], $alog[$i], $log, $alog, $gf); - } - ksort($c); - // total number of data codewords - $num_wd = ($nb * $nd); - // total number of error codewords - $num_we = ($nb * $nc); - // for each block - for ($b = 0; $b < $nb; ++$b) { - // create interleaved data block - $block = array(); - for ($n = $b; $n < $num_wd; $n += $nb) { - $block[] = $wd[$n]; - } - // initialize error codewords - $we = array_fill(0, ($nc + 1), 0); - // calculate error correction codewords for this block - for ($i = 0; $i < $nd; ++$i) { - $k = ($we[0] ^ $block[$i]); - for ($j = 0; $j < $nc; ++$j) { - $we[$j] = ($we[($j + 1)] ^ $this->getGFProduct($k, $c[($nc - $j - 1)], $log, $alog, $gf)); - } - } - // add error codewords at the end of data codewords - $j = 0; - for ($i = $b; $i < $num_we; $i += $nb) { - $wd[($num_wd + $i)] = $we[$j]; - ++$j; - } - } - // reorder codewords - ksort($wd); - return $wd; - } - - /** - * Return the 253-state codeword - * @param $cwpad (int) Pad codeword. - * @param $cwpos (int) Number of data codewords from the beginning of encoded data. - * @return pad codeword - * @protected - */ - protected function get253StateCodeword($cwpad, $cwpos) { - $pad = ($cwpad + (((149 * $cwpos) % 253) + 1)); - if ($pad > 254) { - $pad -= 254; - } - return $pad; - } - - /** - * Return the 255-state codeword - * @param $cwpad (int) Pad codeword. - * @param $cwpos (int) Number of data codewords from the beginning of encoded data. - * @return pad codeword - * @protected - */ - protected function get255StateCodeword($cwpad, $cwpos) { - $pad = ($cwpad + (((149 * $cwpos) % 255) + 1)); - if ($pad > 255) { - $pad -= 256; - } - return $pad; - } - - /** - * Returns true if the char belongs to the selected mode - * @param $chr (int) Character (byte) to check. - * @param $mode (int) Current encoding mode. - * @return boolean true if the char is of the selected mode. - * @protected - */ - protected function isCharMode($chr, $mode) { - $status = false; - switch ($mode) { - case ENC_ASCII: { // ASCII character 0 to 127 - $status = (($chr >= 0) AND ($chr <= 127)); - break; - } - case ENC_C40: { // Upper-case alphanumeric - $status = (($chr == 32) OR (($chr >= 48) AND ($chr <= 57)) OR (($chr >= 65) AND ($chr <= 90))); - break; - } - case ENC_TXT: { // Lower-case alphanumeric - $status = (($chr == 32) OR (($chr >= 48) AND ($chr <= 57)) OR (($chr >= 97) AND ($chr <= 122))); - break; - } - case ENC_X12: { // ANSI X12 - $status = (($chr == 13) OR ($chr == 42) OR ($chr == 62)); - break; - } - case ENC_EDF: { // ASCII character 32 to 94 - $status = (($chr >= 32) AND ($chr <= 94)); - break; - } - case ENC_BASE256: { // Function character (FNC1, Structured Append, Reader Program, or Code Page) - $status = (($chr == 232) OR ($chr == 233) OR ($chr == 234) OR ($chr == 241)); - break; - } - case ENC_ASCII_EXT: { // ASCII character 128 to 255 - $status = (($chr >= 128) AND ($chr <= 255)); - break; - } - case ENC_ASCII_NUM: { // ASCII digits - $status = (($chr >= 48) AND ($chr <= 57)); - break; - } - } - return $status; - } - - /** - * The look-ahead test scans the data to be encoded to find the best mode (Annex P - steps from J to S). - * @param $data (string) data to encode - * @param $pos (int) current position - * @param $mode (int) current encoding mode - * @return int encoding mode - * @protected - */ - protected function lookAheadTest($data, $pos, $mode) { - $data_length = strlen($data); - if ($pos >= $data_length) { - return $mode; - } - $charscount = 0; // count processed chars - // STEP J - if ($mode == ENC_ASCII) { - $numch = array(0, 1, 1, 1, 1, 1.25); - } else { - $numch = array(1, 2, 2, 2, 2, 2.25); - $numch[$mode] = 0; - } - while (true) { - // STEP K - if (($pos + $charscount) == $data_length) { - if ($numch[ENC_ASCII] <= ceil(min($numch[ENC_C40], $numch[ENC_TXT], $numch[ENC_X12], $numch[ENC_EDF], $numch[ENC_BASE256]))) { - return ENC_ASCII; - } - if ($numch[ENC_BASE256] < ceil(min($numch[ENC_ASCII], $numch[ENC_C40], $numch[ENC_TXT], $numch[ENC_X12], $numch[ENC_EDF]))) { - return ENC_BASE256; - } - if ($numch[ENC_EDF] < ceil(min($numch[ENC_ASCII], $numch[ENC_C40], $numch[ENC_TXT], $numch[ENC_X12], $numch[ENC_BASE256]))) { - return ENC_EDF; - } - if ($numch[ENC_TXT] < ceil(min($numch[ENC_ASCII], $numch[ENC_C40], $numch[ENC_X12], $numch[ENC_EDF], $numch[ENC_BASE256]))) { - return ENC_TXT; - } - if ($numch[ENC_X12] < ceil(min($numch[ENC_ASCII], $numch[ENC_C40], $numch[ENC_TXT], $numch[ENC_EDF], $numch[ENC_BASE256]))) { - return ENC_X12; - } - return ENC_C40; - } - // get char - $chr = ord($data[$pos + $charscount]); - $charscount++; - // STEP L - if ($this->isCharMode($chr, ENC_ASCII_NUM)) { - $numch[ENC_ASCII] += (1 / 2); - } elseif ($this->isCharMode($chr, ENC_ASCII_EXT)) { - $numch[ENC_ASCII] = ceil($numch[ENC_ASCII]); - $numch[ENC_ASCII] += 2; - } else { - $numch[ENC_ASCII] = ceil($numch[ENC_ASCII]); - $numch[ENC_ASCII] += 1; - } - // STEP M - if ($this->isCharMode($chr, ENC_C40)) { - $numch[ENC_C40] += (2 / 3); - } elseif ($this->isCharMode($chr, ENC_ASCII_EXT)) { - $numch[ENC_C40] += (8 / 3); - } else { - $numch[ENC_C40] += (4 / 3); - } - // STEP N - if ($this->isCharMode($chr, ENC_TXT)) { - $numch[ENC_TXT] += (2 / 3); - } elseif ($this->isCharMode($chr, ENC_ASCII_EXT)) { - $numch[ENC_TXT] += (8 / 3); - } else { - $numch[ENC_TXT] += (4 / 3); - } - // STEP O - if ($this->isCharMode($chr, ENC_X12) OR $this->isCharMode($chr, ENC_C40)) { - $numch[ENC_X12] += (2 / 3); - } elseif ($this->isCharMode($chr, ENC_ASCII_EXT)) { - $numch[ENC_X12] += (13 / 3); - } else { - $numch[ENC_X12] += (10 / 3); - } - // STEP P - if ($this->isCharMode($chr, ENC_EDF)) { - $numch[ENC_EDF] += (3 / 4); - } elseif ($this->isCharMode($chr, ENC_ASCII_EXT)) { - $numch[ENC_EDF] += (17 / 4); - } else { - $numch[ENC_EDF] += (13 / 4); - } - // STEP Q - if ($this->isCharMode($chr, ENC_BASE256)) { - $numch[ENC_BASE256] += 4; - } else { - $numch[ENC_BASE256] += 1; - } - // STEP R - if ($charscount >= 4) { - if (($numch[ENC_ASCII] + 1) <= min($numch[ENC_C40], $numch[ENC_TXT], $numch[ENC_X12], $numch[ENC_EDF], $numch[ENC_BASE256])) { - return ENC_ASCII; - } - if ((($numch[ENC_BASE256] + 1) <= $numch[ENC_ASCII]) - OR (($numch[ENC_BASE256] + 1) < min($numch[ENC_C40], $numch[ENC_TXT], $numch[ENC_X12], $numch[ENC_EDF]))) { - return ENC_BASE256; - } - if (($numch[ENC_EDF] + 1) < min($numch[ENC_ASCII], $numch[ENC_C40], $numch[ENC_TXT], $numch[ENC_X12], $numch[ENC_BASE256])) { - return ENC_EDF; - } - if (($numch[ENC_TXT] + 1) < min($numch[ENC_ASCII], $numch[ENC_C40], $numch[ENC_X12], $numch[ENC_EDF], $numch[ENC_BASE256])) { - return ENC_TXT; - } - if (($numch[ENC_X12] + 1) < min($numch[ENC_ASCII], $numch[ENC_C40], $numch[ENC_TXT], $numch[ENC_EDF], $numch[ENC_BASE256])) { - return ENC_X12; - } - if (($numch[ENC_C40] + 1) < min($numch[ENC_ASCII], $numch[ENC_TXT], $numch[ENC_EDF], $numch[ENC_BASE256])) { - if ($numch[ENC_C40] < $numch[ENC_X12]) { - return ENC_C40; - } - if ($numch[ENC_C40] == $numch[ENC_X12]) { - $k = ($pos + $charscount + 1); - while ($k < $data_length) { - $tmpchr = ord($data{$k}); - if ($this->isCharMode($tmpchr, ENC_X12)) { - return ENC_X12; - } elseif (!($this->isCharMode($tmpchr, ENC_X12) OR $this->isCharMode($tmpchr, ENC_C40))) { - break; - } - ++$k; - } - return ENC_C40; - } - } - } - } // end of while - } - - /** - * Get the switching codeword to a new encoding mode (latch codeword) - * @param $mode (int) New encoding mode. - * @return (int) Switch codeword. - * @protected - */ - protected function getSwitchEncodingCodeword($mode) { - switch ($mode) { - case ENC_ASCII: { // ASCII character 0 to 127 - $cw = 254; - if ($this->last_enc == ENC_EDF) { - $cw = 124; - } - break; - } - case ENC_C40: { // Upper-case alphanumeric - $cw = 230; - break; - } - case ENC_TXT: { // Lower-case alphanumeric - $cw = 239; - break; - } - case ENC_X12: { // ANSI X12 - $cw = 238; - break; - } - case ENC_EDF: { // ASCII character 32 to 94 - $cw = 240; - break; - } - case ENC_BASE256: { // Function character (FNC1, Structured Append, Reader Program, or Code Page) - $cw = 231; - break; - } - } - return $cw; - } - - /** - * Choose the minimum matrix size and return the max number of data codewords. - * @param $numcw (int) Number of current codewords. - * @return number of data codewords in matrix - * @protected - */ - protected function getMaxDataCodewords($numcw) { - foreach ($this->symbattr as $key => $matrix) { - if ($matrix[11] >= $numcw) { - return $matrix[11]; - } - } - return 0; - } - - /** - * Get high level encoding using the minimum symbol data characters for ECC 200 - * @param $data (string) data to encode - * @return array of codewords - * @protected - */ - protected function getHighLevelEncoding($data) { - // STEP A. Start in ASCII encodation. - $enc = ENC_ASCII; // current encoding mode - $pos = 0; // current position - $cw = array(); // array of codewords to be returned - $cw_num = 0; // number of data codewords - $data_length = strlen($data); // number of chars - while ($pos < $data_length) { - // set last used encoding - $this->last_enc = $enc; - switch ($enc) { - case ENC_ASCII: { // STEP B. While in ASCII encodation - if (($data_length > 1) AND ($pos < ($data_length - 1)) AND ($this->isCharMode(ord($data[$pos]), ENC_ASCII_NUM) AND $this->isCharMode(ord($data[$pos + 1]), ENC_ASCII_NUM))) { - // 1. If the next data sequence is at least 2 consecutive digits, encode the next two digits as a double digit in ASCII mode. - $cw[] = (intval(substr($data, $pos, 2)) + 130); - ++$cw_num; - $pos += 2; - } else { - // 2. If the look-ahead test (starting at step J) indicates another mode, switch to that mode. - $newenc = $this->lookAheadTest($data, $pos, $enc); - if ($newenc != $enc) { - // switch to new encoding - $enc = $newenc; - $cw[] = $this->getSwitchEncodingCodeword($enc); - ++$cw_num; - } else { - // get new byte - $chr = ord($data[$pos]); - ++$pos; - if ($this->isCharMode($chr, ENC_ASCII_EXT)) { - // 3. If the next data character is extended ASCII (greater than 127) encode it in ASCII mode first using the Upper Shift (value 235) character. - $cw[] = 235; - $cw[] = ($chr - 127); - $cw_num += 2; - } else { - // 4. Otherwise process the next data character in ASCII encodation. - $cw[] = ($chr + 1); - ++$cw_num; - } - } - } - break; - } - case ENC_C40 : // Upper-case alphanumeric - case ENC_TXT : // Lower-case alphanumeric - case ENC_X12 : { // ANSI X12 - $temp_cw = array(); - $p = 0; - $epos = $pos; - // get charset ID - $set_id = $this->chset_id[$enc]; - // get basic charset for current encoding - $charset = $this->chset[$set_id]; - do { - // 2. process the next character in C40 encodation. - $chr = ord($data[$epos]); - ++$epos; - // check for extended character - if ($chr & 0x80) { - if ($enc == ENC_X12) { - return false; - } - $chr = ($chr & 0x7f); - $temp_cw[] = 1; // shift 2 - $temp_cw[] = 30; // upper shift - $p += 2; - } - if (isset($charset[$chr])) { - $temp_cw[] = $charset[$chr]; - ++$p; - } else { - if (isset($this->chset['SH1'][$chr])) { - $temp_cw[] = 0; // shift 1 - $shiftset = $this->chset['SH1']; - } elseif (isset($chr, $this->chset['SH2'][$chr])) { - $temp_cw[] = 1; // shift 2 - $shiftset = $this->chset['SH2']; - } elseif (($enc == ENC_C40) AND isset($this->chset['S3C'][$chr])) { - $temp_cw[] = 2; // shift 3 - $shiftset = $this->chset['S3C']; - } elseif (($enc == ENC_TXT) AND isset($this->chset['S3T'][$chr])) { - $temp_cw[] = 2; // shift 3 - $shiftset = $this->chset['S3T']; - } else { - return false; - } - $temp_cw[] = $shiftset[$chr]; - $p += 2; - } - if ($p >= 3) { - $c1 = array_shift($temp_cw); - $c2 = array_shift($temp_cw); - $c3 = array_shift($temp_cw); - $p -= 3; - $tmp = ((1600 * $c1) + (40 * $c2) + $c3 + 1); - $cw[] = ($tmp >> 8); - $cw[] = ($tmp % 256); - $cw_num += 2; - $pos = $epos; - // 1. If the C40 encoding is at the point of starting a new double symbol character and if the look-ahead test (starting at step J) indicates another mode, switch to that mode. - $newenc = $this->lookAheadTest($data, $pos, $enc); - if ($newenc != $enc) { - // switch to new encoding - $enc = $newenc; - if ($enc != ENC_ASCII) { - // set unlatch character - $cw[] = $this->getSwitchEncodingCodeword(ENC_ASCII); - ++$cw_num; - } - $cw[] = $this->getSwitchEncodingCodeword($enc); - ++$cw_num; - $pos -= $p; - $p = 0; - break; - } - } - } while (($p > 0) AND ($epos < $data_length)); - // process last data (if any) - if ($p > 0) { - // get remaining number of data symbols - $cwr = ($this->getMaxDataCodewords($cw_num) - $cw_num); - if (($cwr == 1) AND ($p == 1)) { - // d. If one symbol character remains and one C40 value (data character) remains to be encoded - $c1 = array_shift($temp_cw); - --$p; - $cw[] = ($chr + 1); - ++$cw_num; - $pos = $epos; - $enc = ENC_ASCII; - $this->last_enc = $enc; - } elseif (($cwr == 2) AND ($p == 1)) { - // c. If two symbol characters remain and only one C40 value (data character) remains to be encoded - $c1 = array_shift($temp_cw); - --$p; - $cw[] = 254; - $cw[] = ($chr + 1); - $cw_num += 2; - $pos = $epos; - $enc = ENC_ASCII; - $this->last_enc = $enc; - } elseif (($cwr == 2) AND ($p == 2)) { - // b. If two symbol characters remain and two C40 values remain to be encoded - $c1 = array_shift($temp_cw); - $c2 = array_shift($temp_cw); - $p -= 2; - $tmp = ((1600 * $c1) + (40 * $c2) + 1); - $cw[] = ($tmp >> 8); - $cw[] = ($tmp % 256); - $cw_num += 2; - $pos = $epos; - $enc = ENC_ASCII; - $this->last_enc = $enc; - } else { - // switch to ASCII encoding - if ($enc != ENC_ASCII) { - $enc = ENC_ASCII; - $this->last_enc = $enc; - $cw[] = $this->getSwitchEncodingCodeword($enc); - ++$cw_num; - $pos = ($epos - $p); - } - } - } - break; - } - case ENC_EDF: { // F. While in EDIFACT (EDF) encodation - // initialize temporary array with 0 length - $temp_cw = array(); - $epos = $pos; - $field_length = 0; - $newenc = $enc; - do { - // 2. process the next character in EDIFACT encodation. - $chr = ord($data[$epos]); - if ($this->isCharMode($chr, ENC_EDF)) { - ++$epos; - $temp_cw[] = $chr; - ++$field_length; - } - if (($field_length == 4) OR ($epos == $data_length) OR !$this->isCharMode($chr, ENC_EDF)) { - if (($epos == $data_length) AND ($field_length < 3)) { - $enc = ENC_ASCII; - $cw[] = $this->getSwitchEncodingCodeword($enc); - ++$cw_num; - break; - } - if ($field_length < 4) { - // set unlatch character - $temp_cw[] = 0x1f; - ++$field_length; - // fill empty characters - for ($i = $field_length; $i < 4; ++$i) { - $temp_cw[] = 0; - } - $enc = ENC_ASCII; - $this->last_enc = $enc; - } - // encodes four data characters in three codewords - $tcw = (($temp_cw[0] & 0x3F) << 2) + (($temp_cw[1] & 0x30) >> 4); - if ($tcw > 0) { - $cw[] = $tcw; - $cw_num++; - } - $tcw= (($temp_cw[1] & 0x0F) << 4) + (($temp_cw[2] & 0x3C) >> 2); - if ($tcw > 0) { - $cw[] = $tcw; - $cw_num++; - } - $tcw = (($temp_cw[2] & 0x03) << 6) + ($temp_cw[3] & 0x3F); - if ($tcw > 0) { - $cw[] = $tcw; - $cw_num++; - } - $temp_cw = array(); - $pos = $epos; - $field_length = 0; - if ($enc == ENC_ASCII) { - break; // exit from EDIFACT mode - } - } - } while ($epos < $data_length); - break; - } - case ENC_BASE256: { // G. While in Base 256 (B256) encodation - // initialize temporary array with 0 length - $temp_cw = array(); - $field_length = 0; - while (($pos < $data_length) AND ($field_length <= 1555)) { - $newenc = $this->lookAheadTest($data, $pos, $enc); - if ($newenc != $enc) { - // 1. If the look-ahead test (starting at step J) indicates another mode, switch to that mode. - $enc = $newenc; - break; // exit from B256 mode - } else { - // 2. Otherwise, process the next character in Base 256 encodation. - $chr = ord($data[$pos]); - ++$pos; - $temp_cw[] = $chr; - ++$field_length; - } - } - // set field length - if ($field_length <= 249) { - $cw[] = $this->get255StateCodeword($field_length, ($cw_num + 1)); - ++$cw_num; - } else { - $cw[] = $this->get255StateCodeword((floor($field_length / 250) + 249), ($cw_num + 1)); - $cw[] = $this->get255StateCodeword(($field_length % 250), ($cw_num + 2)); - $cw_num += 2; - } - if (!empty($temp_cw)) { - // add B256 field - foreach ($temp_cw as $p => $cht) { - $cw[] = $this->get255StateCodeword($cht, ($cw_num + $p + 1)); - } - } - break; - } - } // end of switch enc - } // end of while - return $cw; - } - - /** - * Places "chr+bit" with appropriate wrapping within array[]. - * (Annex F - ECC 200 symbol character placement) - * @param $marr (array) Array of symbols. - * @param $nrow (int) Number of rows. - * @param $ncol (int) Number of columns. - * @param $row (int) Row number. - * @param $col (int) Column number. - * @param $chr (int) Char byte. - * @param $bit (int) Bit. - * @return array - * @protected - */ - protected function placeModule($marr, $nrow, $ncol, $row, $col, $chr, $bit) { - if ($row < 0) { - $row += $nrow; - $col += (4 - (($nrow + 4) % 8)); - } - if ($col < 0) { - $col += $ncol; - $row += (4 - (($ncol + 4) % 8)); - } - $marr[(($row * $ncol) + $col)] = ((10 * $chr) + $bit); - return $marr; - } - - /** - * Places the 8 bits of a utah-shaped symbol character. - * (Annex F - ECC 200 symbol character placement) - * @param $marr (array) Array of symbols. - * @param $nrow (int) Number of rows. - * @param $ncol (int) Number of columns. - * @param $row (int) Row number. - * @param $col (int) Column number. - * @param $chr (int) Char byte. - * @return array - * @protected - */ - protected function placeUtah($marr, $nrow, $ncol, $row, $col, $chr) { - $marr = $this->placeModule($marr, $nrow, $ncol, $row-2, $col-2, $chr, 1); - $marr = $this->placeModule($marr, $nrow, $ncol, $row-2, $col-1, $chr, 2); - $marr = $this->placeModule($marr, $nrow, $ncol, $row-1, $col-2, $chr, 3); - $marr = $this->placeModule($marr, $nrow, $ncol, $row-1, $col-1, $chr, 4); - $marr = $this->placeModule($marr, $nrow, $ncol, $row-1, $col, $chr, 5); - $marr = $this->placeModule($marr, $nrow, $ncol, $row, $col-2, $chr, 6); - $marr = $this->placeModule($marr, $nrow, $ncol, $row, $col-1, $chr, 7); - $marr = $this->placeModule($marr, $nrow, $ncol, $row, $col, $chr, 8); - return $marr; - } - - /** - * Places the 8 bits of the first special corner case. - * (Annex F - ECC 200 symbol character placement) - * @param $marr (array) Array of symbols. - * @param $nrow (int) Number of rows. - * @param $ncol (int) Number of columns. - * @param $chr (int) Char byte. - * @return array - * @protected - */ - protected function placeCornerA($marr, $nrow, $ncol, $chr) { - $marr = $this->placeModule($marr, $nrow, $ncol, $nrow-1, 0, $chr, 1); - $marr = $this->placeModule($marr, $nrow, $ncol, $nrow-1, 1, $chr, 2); - $marr = $this->placeModule($marr, $nrow, $ncol, $nrow-1, 2, $chr, 3); - $marr = $this->placeModule($marr, $nrow, $ncol, 0, $ncol-2, $chr, 4); - $marr = $this->placeModule($marr, $nrow, $ncol, 0, $ncol-1, $chr, 5); - $marr = $this->placeModule($marr, $nrow, $ncol, 1, $ncol-1, $chr, 6); - $marr = $this->placeModule($marr, $nrow, $ncol, 2, $ncol-1, $chr, 7); - $marr = $this->placeModule($marr, $nrow, $ncol, 3, $ncol-1, $chr, 8); - return $marr; - } - - /** - * Places the 8 bits of the second special corner case. - * (Annex F - ECC 200 symbol character placement) - * @param $marr (array) Array of symbols. - * @param $nrow (int) Number of rows. - * @param $ncol (int) Number of columns. - * @param $chr (int) Char byte. - * @return array - * @protected - */ - protected function placeCornerB($marr, $nrow, $ncol, $chr) { - $marr = $this->placeModule($marr, $nrow, $ncol, $nrow-3, 0, $chr, 1); - $marr = $this->placeModule($marr, $nrow, $ncol, $nrow-2, 0, $chr, 2); - $marr = $this->placeModule($marr, $nrow, $ncol, $nrow-1, 0, $chr, 3); - $marr = $this->placeModule($marr, $nrow, $ncol, 0, $ncol-4, $chr, 4); - $marr = $this->placeModule($marr, $nrow, $ncol, 0, $ncol-3, $chr, 5); - $marr = $this->placeModule($marr, $nrow, $ncol, 0, $ncol-2, $chr, 6); - $marr = $this->placeModule($marr, $nrow, $ncol, 0, $ncol-1, $chr, 7); - $marr = $this->placeModule($marr, $nrow, $ncol, 1, $ncol-1, $chr, 8); - return $marr; - } - - /** - * Places the 8 bits of the third special corner case. - * (Annex F - ECC 200 symbol character placement) - * @param $marr (array) Array of symbols. - * @param $nrow (int) Number of rows. - * @param $ncol (int) Number of columns. - * @param $chr (int) Char byte. - * @return array - * @protected - */ - protected function placeCornerC($marr, $nrow, $ncol, $chr) { - $marr = $this->placeModule($marr, $nrow, $ncol, $nrow-3, 0, $chr, 1); - $marr = $this->placeModule($marr, $nrow, $ncol, $nrow-2, 0, $chr, 2); - $marr = $this->placeModule($marr, $nrow, $ncol, $nrow-1, 0, $chr, 3); - $marr = $this->placeModule($marr, $nrow, $ncol, 0, $ncol-2, $chr, 4); - $marr = $this->placeModule($marr, $nrow, $ncol, 0, $ncol-1, $chr, 5); - $marr = $this->placeModule($marr, $nrow, $ncol, 1, $ncol-1, $chr, 6); - $marr = $this->placeModule($marr, $nrow, $ncol, 2, $ncol-1, $chr, 7); - $marr = $this->placeModule($marr, $nrow, $ncol, 3, $ncol-1, $chr, 8); - return $marr; - } - - /** - * Places the 8 bits of the fourth special corner case. - * (Annex F - ECC 200 symbol character placement) - * @param $marr (array) Array of symbols. - * @param $nrow (int) Number of rows. - * @param $ncol (int) Number of columns. - * @param $chr (int) Char byte. - * @return array - * @protected - */ - protected function placeCornerD($marr, $nrow, $ncol, $chr) { - $marr = $this->placeModule($marr, $nrow, $ncol, $nrow-1, 0, $chr, 1); - $marr = $this->placeModule($marr, $nrow, $ncol, $nrow-1, $ncol-1, $chr, 2); - $marr = $this->placeModule($marr, $nrow, $ncol, 0, $ncol-3, $chr, 3); - $marr = $this->placeModule($marr, $nrow, $ncol, 0, $ncol-2, $chr, 4); - $marr = $this->placeModule($marr, $nrow, $ncol, 0, $ncol-1, $chr, 5); - $marr = $this->placeModule($marr, $nrow, $ncol, 1, $ncol-3, $chr, 6); - $marr = $this->placeModule($marr, $nrow, $ncol, 1, $ncol-2, $chr, 7); - $marr = $this->placeModule($marr, $nrow, $ncol, 1, $ncol-1, $chr, 8); - return $marr; - } - - /** - * Build a placement map. - * (Annex F - ECC 200 symbol character placement) - * @param $nrow (int) Number of rows. - * @param $ncol (int) Number of columns. - * @return array - * @protected - */ - protected function getPlacementMap($nrow, $ncol) { - // initialize array with zeros - $marr = array_fill(0, ($nrow * $ncol), 0); - // set starting values - $chr = 1; - $row = 4; - $col = 0; - do { - // repeatedly first check for one of the special corner cases, then - if (($row == $nrow) AND ($col == 0)) { - $marr = $this->placeCornerA($marr, $nrow, $ncol, $chr); - ++$chr; - } - if (($row == ($nrow - 2)) AND ($col == 0) AND ($ncol % 4)) { - $marr = $this->placeCornerB($marr, $nrow, $ncol, $chr); - ++$chr; - } - if (($row == ($nrow - 2)) AND ($col == 0) AND (($ncol % 8) == 4)) { - $marr = $this->placeCornerC($marr, $nrow, $ncol, $chr); - ++$chr; - } - if (($row == ($nrow + 4)) AND ($col == 2) AND (!($ncol % 8))) { - $marr = $this->placeCornerD($marr, $nrow, $ncol, $chr); - ++$chr; - } - // sweep upward diagonally, inserting successive characters, - do { - if (($row < $nrow) AND ($col >= 0) AND (!$marr[(($row * $ncol) + $col)])) { - $marr = $this->placeUtah($marr, $nrow, $ncol, $row, $col, $chr); - ++$chr; - } - $row -= 2; - $col += 2; - } while (($row >= 0) AND ($col < $ncol)); - ++$row; - $col += 3; - // & then sweep downward diagonally, inserting successive characters,... - do { - if (($row >= 0) AND ($col < $ncol) AND (!$marr[(($row * $ncol) + $col)])) { - $marr = $this->placeUtah($marr, $nrow, $ncol, $row, $col, $chr); - ++$chr; - } - $row += 2; - $col -= 2; - } while (($row < $nrow) AND ($col >= 0)); - $row += 3; - ++$col; - // ... until the entire array is scanned - } while (($row < $nrow) OR ($col < $ncol)); - // lastly, if the lower righthand corner is untouched, fill in fixed pattern - if (!$marr[(($nrow * $ncol) - 1)]) { - $marr[(($nrow * $ncol) - 1)] = 1; - $marr[(($nrow * $ncol) - $ncol - 2)] = 1; - } - return $marr; - } - -} // end DataMatrix class -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/srcs/phpmyadmin/vendor/tecnickcom/tcpdf/include/barcodes/pdf417.php b/srcs/phpmyadmin/vendor/tecnickcom/tcpdf/include/barcodes/pdf417.php deleted file mode 100644 index 3b1774e..0000000 --- a/srcs/phpmyadmin/vendor/tecnickcom/tcpdf/include/barcodes/pdf417.php +++ /dev/null @@ -1,996 +0,0 @@ -. -// -// See LICENSE.TXT file for more information. -// ------------------------------------------------------------------- -// -// DESCRIPTION : -// -// Class to create PDF417 barcode arrays for TCPDF class. -// PDF417 (ISO/IEC 15438:2006) is a 2-dimensional stacked bar code created by Symbol Technologies in 1991. -// It is one of the most popular 2D codes because of its ability to be read with slightly modified handheld laser or linear CCD scanners. -// TECHNICAL DATA / FEATURES OF PDF417: -// Encodable Character Set: All 128 ASCII Characters (including extended) -// Code Type: Continuous, Multi-Row -// Symbol Height: 3 - 90 Rows -// Symbol Width: 90X - 583X -// Bidirectional Decoding: Yes -// Error Correction Characters: 2 - 512 -// Maximum Data Characters: 1850 text, 2710 digits, 1108 bytes -// -//============================================================+ - -/** - * @file - * Class to create PDF417 barcode arrays for TCPDF class. - * PDF417 (ISO/IEC 15438:2006) is a 2-dimensional stacked bar code created by Symbol Technologies in 1991. - * (requires PHP bcmath extension) - * @package com.tecnick.tcpdf - * @author Nicola Asuni - * @version 1.0.005 - */ - -// definitions -if (!defined('PDF417DEFS')) { - - /** - * Indicate that definitions for this class are set - */ - define('PDF417DEFS', true); - - // ----------------------------------------------------- - - /** - * Row height respect X dimension of single module - */ - define('ROWHEIGHT', 4); - - /** - * Horizontal quiet zone in modules - */ - define('QUIETH', 2); - - /** - * Vertical quiet zone in modules - */ - define('QUIETV', 2); - -} // end of definitions - -// #*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*# - -/** - * @class PDF417 - * Class to create PDF417 barcode arrays for TCPDF class. - * PDF417 (ISO/IEC 15438:2006) is a 2-dimensional stacked bar code created by Symbol Technologies in 1991. - * @package com.tecnick.tcpdf - * @author Nicola Asuni - * @version 1.0.003 - */ -class PDF417 { - - /** - * Barcode array to be returned which is readable by TCPDF. - * @protected - */ - protected $barcode_array = array(); - - /** - * Start pattern. - * @protected - */ - protected $start_pattern = '11111111010101000'; - - /** - * Stop pattern. - * @protected - */ - protected $stop_pattern = '111111101000101001'; - - /** - * Array of text Compaction Sub-Modes (values 0xFB - 0xFF are used for submode changers). - * @protected - */ - protected $textsubmodes = array( - array(0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4a,0x4b,0x4c,0x4d,0x4e,0x4f,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5a,0x20,0xFD,0xFE,0xFF), // Alpha - array(0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7a,0x20,0xFD,0xFE,0xFF), // Lower - array(0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x26,0x0d,0x09,0x2c,0x3a,0x23,0x2d,0x2e,0x24,0x2f,0x2b,0x25,0x2a,0x3d,0x5e,0xFB,0x20,0xFD,0xFE,0xFF), // Mixed - array(0x3b,0x3c,0x3e,0x40,0x5b,0x5c,0x5d,0x5f,0x60,0x7e,0x21,0x0d,0x09,0x2c,0x3a,0x0a,0x2d,0x2e,0x24,0x2f,0x22,0x7c,0x2a,0x28,0x29,0x3f,0x7b,0x7d,0x27,0xFF) // Puntuaction - ); - - /** - * Array of switching codes for Text Compaction Sub-Modes. - * @protected - */ - protected $textlatch = array( - '01' => array(27), '02' => array(28), '03' => array(28,25), // - '10' => array(28,28), '12' => array(28), '13' => array(28,25), // - '20' => array(28), '21' => array(27), '23' => array(25), // - '30' => array(29), '31' => array(29,27), '32' => array(29,28) // - ); - - /** - * Clusters of codewords (0, 3, 6)
- * Values are hex equivalents of binary representation of bars (1 = bar, 0 = space).
- * The codewords numbered from 900 to 928 have special meaning, some enable to switch between modes in order to optimise the code: - * @protected - */ - protected $clusters = array( - array( // cluster 0 ----------------------------------------------------------------------- - 0x1d5c0,0x1eaf0,0x1f57c,0x1d4e0,0x1ea78,0x1f53e,0x1a8c0,0x1d470,0x1a860,0x15040, // 10 - 0x1a830,0x15020,0x1adc0,0x1d6f0,0x1eb7c,0x1ace0,0x1d678,0x1eb3e,0x158c0,0x1ac70, // 20 - 0x15860,0x15dc0,0x1aef0,0x1d77c,0x15ce0,0x1ae78,0x1d73e,0x15c70,0x1ae3c,0x15ef0, // 30 - 0x1af7c,0x15e78,0x1af3e,0x15f7c,0x1f5fa,0x1d2e0,0x1e978,0x1f4be,0x1a4c0,0x1d270, // 40 - 0x1e93c,0x1a460,0x1d238,0x14840,0x1a430,0x1d21c,0x14820,0x1a418,0x14810,0x1a6e0, // 50 - 0x1d378,0x1e9be,0x14cc0,0x1a670,0x1d33c,0x14c60,0x1a638,0x1d31e,0x14c30,0x1a61c, // 60 - 0x14ee0,0x1a778,0x1d3be,0x14e70,0x1a73c,0x14e38,0x1a71e,0x14f78,0x1a7be,0x14f3c, // 70 - 0x14f1e,0x1a2c0,0x1d170,0x1e8bc,0x1a260,0x1d138,0x1e89e,0x14440,0x1a230,0x1d11c, // 80 - 0x14420,0x1a218,0x14410,0x14408,0x146c0,0x1a370,0x1d1bc,0x14660,0x1a338,0x1d19e, // 90 - 0x14630,0x1a31c,0x14618,0x1460c,0x14770,0x1a3bc,0x14738,0x1a39e,0x1471c,0x147bc, // 100 - 0x1a160,0x1d0b8,0x1e85e,0x14240,0x1a130,0x1d09c,0x14220,0x1a118,0x1d08e,0x14210, // 110 - 0x1a10c,0x14208,0x1a106,0x14360,0x1a1b8,0x1d0de,0x14330,0x1a19c,0x14318,0x1a18e, // 120 - 0x1430c,0x14306,0x1a1de,0x1438e,0x14140,0x1a0b0,0x1d05c,0x14120,0x1a098,0x1d04e, // 130 - 0x14110,0x1a08c,0x14108,0x1a086,0x14104,0x141b0,0x14198,0x1418c,0x140a0,0x1d02e, // 140 - 0x1a04c,0x1a046,0x14082,0x1cae0,0x1e578,0x1f2be,0x194c0,0x1ca70,0x1e53c,0x19460, // 150 - 0x1ca38,0x1e51e,0x12840,0x19430,0x12820,0x196e0,0x1cb78,0x1e5be,0x12cc0,0x19670, // 160 - 0x1cb3c,0x12c60,0x19638,0x12c30,0x12c18,0x12ee0,0x19778,0x1cbbe,0x12e70,0x1973c, // 170 - 0x12e38,0x12e1c,0x12f78,0x197be,0x12f3c,0x12fbe,0x1dac0,0x1ed70,0x1f6bc,0x1da60, // 180 - 0x1ed38,0x1f69e,0x1b440,0x1da30,0x1ed1c,0x1b420,0x1da18,0x1ed0e,0x1b410,0x1da0c, // 190 - 0x192c0,0x1c970,0x1e4bc,0x1b6c0,0x19260,0x1c938,0x1e49e,0x1b660,0x1db38,0x1ed9e, // 200 - 0x16c40,0x12420,0x19218,0x1c90e,0x16c20,0x1b618,0x16c10,0x126c0,0x19370,0x1c9bc, // 210 - 0x16ec0,0x12660,0x19338,0x1c99e,0x16e60,0x1b738,0x1db9e,0x16e30,0x12618,0x16e18, // 220 - 0x12770,0x193bc,0x16f70,0x12738,0x1939e,0x16f38,0x1b79e,0x16f1c,0x127bc,0x16fbc, // 230 - 0x1279e,0x16f9e,0x1d960,0x1ecb8,0x1f65e,0x1b240,0x1d930,0x1ec9c,0x1b220,0x1d918, // 240 - 0x1ec8e,0x1b210,0x1d90c,0x1b208,0x1b204,0x19160,0x1c8b8,0x1e45e,0x1b360,0x19130, // 250 - 0x1c89c,0x16640,0x12220,0x1d99c,0x1c88e,0x16620,0x12210,0x1910c,0x16610,0x1b30c, // 260 - 0x19106,0x12204,0x12360,0x191b8,0x1c8de,0x16760,0x12330,0x1919c,0x16730,0x1b39c, // 270 - 0x1918e,0x16718,0x1230c,0x12306,0x123b8,0x191de,0x167b8,0x1239c,0x1679c,0x1238e, // 280 - 0x1678e,0x167de,0x1b140,0x1d8b0,0x1ec5c,0x1b120,0x1d898,0x1ec4e,0x1b110,0x1d88c, // 290 - 0x1b108,0x1d886,0x1b104,0x1b102,0x12140,0x190b0,0x1c85c,0x16340,0x12120,0x19098, // 300 - 0x1c84e,0x16320,0x1b198,0x1d8ce,0x16310,0x12108,0x19086,0x16308,0x1b186,0x16304, // 310 - 0x121b0,0x190dc,0x163b0,0x12198,0x190ce,0x16398,0x1b1ce,0x1638c,0x12186,0x16386, // 320 - 0x163dc,0x163ce,0x1b0a0,0x1d858,0x1ec2e,0x1b090,0x1d84c,0x1b088,0x1d846,0x1b084, // 330 - 0x1b082,0x120a0,0x19058,0x1c82e,0x161a0,0x12090,0x1904c,0x16190,0x1b0cc,0x19046, // 340 - 0x16188,0x12084,0x16184,0x12082,0x120d8,0x161d8,0x161cc,0x161c6,0x1d82c,0x1d826, // 350 - 0x1b042,0x1902c,0x12048,0x160c8,0x160c4,0x160c2,0x18ac0,0x1c570,0x1e2bc,0x18a60, // 360 - 0x1c538,0x11440,0x18a30,0x1c51c,0x11420,0x18a18,0x11410,0x11408,0x116c0,0x18b70, // 370 - 0x1c5bc,0x11660,0x18b38,0x1c59e,0x11630,0x18b1c,0x11618,0x1160c,0x11770,0x18bbc, // 380 - 0x11738,0x18b9e,0x1171c,0x117bc,0x1179e,0x1cd60,0x1e6b8,0x1f35e,0x19a40,0x1cd30, // 390 - 0x1e69c,0x19a20,0x1cd18,0x1e68e,0x19a10,0x1cd0c,0x19a08,0x1cd06,0x18960,0x1c4b8, // 400 - 0x1e25e,0x19b60,0x18930,0x1c49c,0x13640,0x11220,0x1cd9c,0x1c48e,0x13620,0x19b18, // 410 - 0x1890c,0x13610,0x11208,0x13608,0x11360,0x189b8,0x1c4de,0x13760,0x11330,0x1cdde, // 420 - 0x13730,0x19b9c,0x1898e,0x13718,0x1130c,0x1370c,0x113b8,0x189de,0x137b8,0x1139c, // 430 - 0x1379c,0x1138e,0x113de,0x137de,0x1dd40,0x1eeb0,0x1f75c,0x1dd20,0x1ee98,0x1f74e, // 440 - 0x1dd10,0x1ee8c,0x1dd08,0x1ee86,0x1dd04,0x19940,0x1ccb0,0x1e65c,0x1bb40,0x19920, // 450 - 0x1eedc,0x1e64e,0x1bb20,0x1dd98,0x1eece,0x1bb10,0x19908,0x1cc86,0x1bb08,0x1dd86, // 460 - 0x19902,0x11140,0x188b0,0x1c45c,0x13340,0x11120,0x18898,0x1c44e,0x17740,0x13320, // 470 - 0x19998,0x1ccce,0x17720,0x1bb98,0x1ddce,0x18886,0x17710,0x13308,0x19986,0x17708, // 480 - 0x11102,0x111b0,0x188dc,0x133b0,0x11198,0x188ce,0x177b0,0x13398,0x199ce,0x17798, // 490 - 0x1bbce,0x11186,0x13386,0x111dc,0x133dc,0x111ce,0x177dc,0x133ce,0x1dca0,0x1ee58, // 500 - 0x1f72e,0x1dc90,0x1ee4c,0x1dc88,0x1ee46,0x1dc84,0x1dc82,0x198a0,0x1cc58,0x1e62e, // 510 - 0x1b9a0,0x19890,0x1ee6e,0x1b990,0x1dccc,0x1cc46,0x1b988,0x19884,0x1b984,0x19882, // 520 - 0x1b982,0x110a0,0x18858,0x1c42e,0x131a0,0x11090,0x1884c,0x173a0,0x13190,0x198cc, // 530 - 0x18846,0x17390,0x1b9cc,0x11084,0x17388,0x13184,0x11082,0x13182,0x110d8,0x1886e, // 540 - 0x131d8,0x110cc,0x173d8,0x131cc,0x110c6,0x173cc,0x131c6,0x110ee,0x173ee,0x1dc50, // 550 - 0x1ee2c,0x1dc48,0x1ee26,0x1dc44,0x1dc42,0x19850,0x1cc2c,0x1b8d0,0x19848,0x1cc26, // 560 - 0x1b8c8,0x1dc66,0x1b8c4,0x19842,0x1b8c2,0x11050,0x1882c,0x130d0,0x11048,0x18826, // 570 - 0x171d0,0x130c8,0x19866,0x171c8,0x1b8e6,0x11042,0x171c4,0x130c2,0x171c2,0x130ec, // 580 - 0x171ec,0x171e6,0x1ee16,0x1dc22,0x1cc16,0x19824,0x19822,0x11028,0x13068,0x170e8, // 590 - 0x11022,0x13062,0x18560,0x10a40,0x18530,0x10a20,0x18518,0x1c28e,0x10a10,0x1850c, // 600 - 0x10a08,0x18506,0x10b60,0x185b8,0x1c2de,0x10b30,0x1859c,0x10b18,0x1858e,0x10b0c, // 610 - 0x10b06,0x10bb8,0x185de,0x10b9c,0x10b8e,0x10bde,0x18d40,0x1c6b0,0x1e35c,0x18d20, // 620 - 0x1c698,0x18d10,0x1c68c,0x18d08,0x1c686,0x18d04,0x10940,0x184b0,0x1c25c,0x11b40, // 630 - 0x10920,0x1c6dc,0x1c24e,0x11b20,0x18d98,0x1c6ce,0x11b10,0x10908,0x18486,0x11b08, // 640 - 0x18d86,0x10902,0x109b0,0x184dc,0x11bb0,0x10998,0x184ce,0x11b98,0x18dce,0x11b8c, // 650 - 0x10986,0x109dc,0x11bdc,0x109ce,0x11bce,0x1cea0,0x1e758,0x1f3ae,0x1ce90,0x1e74c, // 660 - 0x1ce88,0x1e746,0x1ce84,0x1ce82,0x18ca0,0x1c658,0x19da0,0x18c90,0x1c64c,0x19d90, // 670 - 0x1cecc,0x1c646,0x19d88,0x18c84,0x19d84,0x18c82,0x19d82,0x108a0,0x18458,0x119a0, // 680 - 0x10890,0x1c66e,0x13ba0,0x11990,0x18ccc,0x18446,0x13b90,0x19dcc,0x10884,0x13b88, // 690 - 0x11984,0x10882,0x11982,0x108d8,0x1846e,0x119d8,0x108cc,0x13bd8,0x119cc,0x108c6, // 700 - 0x13bcc,0x119c6,0x108ee,0x119ee,0x13bee,0x1ef50,0x1f7ac,0x1ef48,0x1f7a6,0x1ef44, // 710 - 0x1ef42,0x1ce50,0x1e72c,0x1ded0,0x1ef6c,0x1e726,0x1dec8,0x1ef66,0x1dec4,0x1ce42, // 720 - 0x1dec2,0x18c50,0x1c62c,0x19cd0,0x18c48,0x1c626,0x1bdd0,0x19cc8,0x1ce66,0x1bdc8, // 730 - 0x1dee6,0x18c42,0x1bdc4,0x19cc2,0x1bdc2,0x10850,0x1842c,0x118d0,0x10848,0x18426, // 740 - 0x139d0,0x118c8,0x18c66,0x17bd0,0x139c8,0x19ce6,0x10842,0x17bc8,0x1bde6,0x118c2, // 750 - 0x17bc4,0x1086c,0x118ec,0x10866,0x139ec,0x118e6,0x17bec,0x139e6,0x17be6,0x1ef28, // 760 - 0x1f796,0x1ef24,0x1ef22,0x1ce28,0x1e716,0x1de68,0x1ef36,0x1de64,0x1ce22,0x1de62, // 770 - 0x18c28,0x1c616,0x19c68,0x18c24,0x1bce8,0x19c64,0x18c22,0x1bce4,0x19c62,0x1bce2, // 780 - 0x10828,0x18416,0x11868,0x18c36,0x138e8,0x11864,0x10822,0x179e8,0x138e4,0x11862, // 790 - 0x179e4,0x138e2,0x179e2,0x11876,0x179f6,0x1ef12,0x1de34,0x1de32,0x19c34,0x1bc74, // 800 - 0x1bc72,0x11834,0x13874,0x178f4,0x178f2,0x10540,0x10520,0x18298,0x10510,0x10508, // 810 - 0x10504,0x105b0,0x10598,0x1058c,0x10586,0x105dc,0x105ce,0x186a0,0x18690,0x1c34c, // 820 - 0x18688,0x1c346,0x18684,0x18682,0x104a0,0x18258,0x10da0,0x186d8,0x1824c,0x10d90, // 830 - 0x186cc,0x10d88,0x186c6,0x10d84,0x10482,0x10d82,0x104d8,0x1826e,0x10dd8,0x186ee, // 840 - 0x10dcc,0x104c6,0x10dc6,0x104ee,0x10dee,0x1c750,0x1c748,0x1c744,0x1c742,0x18650, // 850 - 0x18ed0,0x1c76c,0x1c326,0x18ec8,0x1c766,0x18ec4,0x18642,0x18ec2,0x10450,0x10cd0, // 860 - 0x10448,0x18226,0x11dd0,0x10cc8,0x10444,0x11dc8,0x10cc4,0x10442,0x11dc4,0x10cc2, // 870 - 0x1046c,0x10cec,0x10466,0x11dec,0x10ce6,0x11de6,0x1e7a8,0x1e7a4,0x1e7a2,0x1c728, // 880 - 0x1cf68,0x1e7b6,0x1cf64,0x1c722,0x1cf62,0x18628,0x1c316,0x18e68,0x1c736,0x19ee8, // 890 - 0x18e64,0x18622,0x19ee4,0x18e62,0x19ee2,0x10428,0x18216,0x10c68,0x18636,0x11ce8, // 900 - 0x10c64,0x10422,0x13de8,0x11ce4,0x10c62,0x13de4,0x11ce2,0x10436,0x10c76,0x11cf6, // 910 - 0x13df6,0x1f7d4,0x1f7d2,0x1e794,0x1efb4,0x1e792,0x1efb2,0x1c714,0x1cf34,0x1c712, // 920 - 0x1df74,0x1cf32,0x1df72,0x18614,0x18e34,0x18612,0x19e74,0x18e32,0x1bef4), // 929 - array( // cluster 3 ----------------------------------------------------------------------- - 0x1f560,0x1fab8,0x1ea40,0x1f530,0x1fa9c,0x1ea20,0x1f518,0x1fa8e,0x1ea10,0x1f50c, // 10 - 0x1ea08,0x1f506,0x1ea04,0x1eb60,0x1f5b8,0x1fade,0x1d640,0x1eb30,0x1f59c,0x1d620, // 20 - 0x1eb18,0x1f58e,0x1d610,0x1eb0c,0x1d608,0x1eb06,0x1d604,0x1d760,0x1ebb8,0x1f5de, // 30 - 0x1ae40,0x1d730,0x1eb9c,0x1ae20,0x1d718,0x1eb8e,0x1ae10,0x1d70c,0x1ae08,0x1d706, // 40 - 0x1ae04,0x1af60,0x1d7b8,0x1ebde,0x15e40,0x1af30,0x1d79c,0x15e20,0x1af18,0x1d78e, // 50 - 0x15e10,0x1af0c,0x15e08,0x1af06,0x15f60,0x1afb8,0x1d7de,0x15f30,0x1af9c,0x15f18, // 60 - 0x1af8e,0x15f0c,0x15fb8,0x1afde,0x15f9c,0x15f8e,0x1e940,0x1f4b0,0x1fa5c,0x1e920, // 70 - 0x1f498,0x1fa4e,0x1e910,0x1f48c,0x1e908,0x1f486,0x1e904,0x1e902,0x1d340,0x1e9b0, // 80 - 0x1f4dc,0x1d320,0x1e998,0x1f4ce,0x1d310,0x1e98c,0x1d308,0x1e986,0x1d304,0x1d302, // 90 - 0x1a740,0x1d3b0,0x1e9dc,0x1a720,0x1d398,0x1e9ce,0x1a710,0x1d38c,0x1a708,0x1d386, // 100 - 0x1a704,0x1a702,0x14f40,0x1a7b0,0x1d3dc,0x14f20,0x1a798,0x1d3ce,0x14f10,0x1a78c, // 110 - 0x14f08,0x1a786,0x14f04,0x14fb0,0x1a7dc,0x14f98,0x1a7ce,0x14f8c,0x14f86,0x14fdc, // 120 - 0x14fce,0x1e8a0,0x1f458,0x1fa2e,0x1e890,0x1f44c,0x1e888,0x1f446,0x1e884,0x1e882, // 130 - 0x1d1a0,0x1e8d8,0x1f46e,0x1d190,0x1e8cc,0x1d188,0x1e8c6,0x1d184,0x1d182,0x1a3a0, // 140 - 0x1d1d8,0x1e8ee,0x1a390,0x1d1cc,0x1a388,0x1d1c6,0x1a384,0x1a382,0x147a0,0x1a3d8, // 150 - 0x1d1ee,0x14790,0x1a3cc,0x14788,0x1a3c6,0x14784,0x14782,0x147d8,0x1a3ee,0x147cc, // 160 - 0x147c6,0x147ee,0x1e850,0x1f42c,0x1e848,0x1f426,0x1e844,0x1e842,0x1d0d0,0x1e86c, // 170 - 0x1d0c8,0x1e866,0x1d0c4,0x1d0c2,0x1a1d0,0x1d0ec,0x1a1c8,0x1d0e6,0x1a1c4,0x1a1c2, // 180 - 0x143d0,0x1a1ec,0x143c8,0x1a1e6,0x143c4,0x143c2,0x143ec,0x143e6,0x1e828,0x1f416, // 190 - 0x1e824,0x1e822,0x1d068,0x1e836,0x1d064,0x1d062,0x1a0e8,0x1d076,0x1a0e4,0x1a0e2, // 200 - 0x141e8,0x1a0f6,0x141e4,0x141e2,0x1e814,0x1e812,0x1d034,0x1d032,0x1a074,0x1a072, // 210 - 0x1e540,0x1f2b0,0x1f95c,0x1e520,0x1f298,0x1f94e,0x1e510,0x1f28c,0x1e508,0x1f286, // 220 - 0x1e504,0x1e502,0x1cb40,0x1e5b0,0x1f2dc,0x1cb20,0x1e598,0x1f2ce,0x1cb10,0x1e58c, // 230 - 0x1cb08,0x1e586,0x1cb04,0x1cb02,0x19740,0x1cbb0,0x1e5dc,0x19720,0x1cb98,0x1e5ce, // 240 - 0x19710,0x1cb8c,0x19708,0x1cb86,0x19704,0x19702,0x12f40,0x197b0,0x1cbdc,0x12f20, // 250 - 0x19798,0x1cbce,0x12f10,0x1978c,0x12f08,0x19786,0x12f04,0x12fb0,0x197dc,0x12f98, // 260 - 0x197ce,0x12f8c,0x12f86,0x12fdc,0x12fce,0x1f6a0,0x1fb58,0x16bf0,0x1f690,0x1fb4c, // 270 - 0x169f8,0x1f688,0x1fb46,0x168fc,0x1f684,0x1f682,0x1e4a0,0x1f258,0x1f92e,0x1eda0, // 280 - 0x1e490,0x1fb6e,0x1ed90,0x1f6cc,0x1f246,0x1ed88,0x1e484,0x1ed84,0x1e482,0x1ed82, // 290 - 0x1c9a0,0x1e4d8,0x1f26e,0x1dba0,0x1c990,0x1e4cc,0x1db90,0x1edcc,0x1e4c6,0x1db88, // 300 - 0x1c984,0x1db84,0x1c982,0x1db82,0x193a0,0x1c9d8,0x1e4ee,0x1b7a0,0x19390,0x1c9cc, // 310 - 0x1b790,0x1dbcc,0x1c9c6,0x1b788,0x19384,0x1b784,0x19382,0x1b782,0x127a0,0x193d8, // 320 - 0x1c9ee,0x16fa0,0x12790,0x193cc,0x16f90,0x1b7cc,0x193c6,0x16f88,0x12784,0x16f84, // 330 - 0x12782,0x127d8,0x193ee,0x16fd8,0x127cc,0x16fcc,0x127c6,0x16fc6,0x127ee,0x1f650, // 340 - 0x1fb2c,0x165f8,0x1f648,0x1fb26,0x164fc,0x1f644,0x1647e,0x1f642,0x1e450,0x1f22c, // 350 - 0x1ecd0,0x1e448,0x1f226,0x1ecc8,0x1f666,0x1ecc4,0x1e442,0x1ecc2,0x1c8d0,0x1e46c, // 360 - 0x1d9d0,0x1c8c8,0x1e466,0x1d9c8,0x1ece6,0x1d9c4,0x1c8c2,0x1d9c2,0x191d0,0x1c8ec, // 370 - 0x1b3d0,0x191c8,0x1c8e6,0x1b3c8,0x1d9e6,0x1b3c4,0x191c2,0x1b3c2,0x123d0,0x191ec, // 380 - 0x167d0,0x123c8,0x191e6,0x167c8,0x1b3e6,0x167c4,0x123c2,0x167c2,0x123ec,0x167ec, // 390 - 0x123e6,0x167e6,0x1f628,0x1fb16,0x162fc,0x1f624,0x1627e,0x1f622,0x1e428,0x1f216, // 400 - 0x1ec68,0x1f636,0x1ec64,0x1e422,0x1ec62,0x1c868,0x1e436,0x1d8e8,0x1c864,0x1d8e4, // 410 - 0x1c862,0x1d8e2,0x190e8,0x1c876,0x1b1e8,0x1d8f6,0x1b1e4,0x190e2,0x1b1e2,0x121e8, // 420 - 0x190f6,0x163e8,0x121e4,0x163e4,0x121e2,0x163e2,0x121f6,0x163f6,0x1f614,0x1617e, // 430 - 0x1f612,0x1e414,0x1ec34,0x1e412,0x1ec32,0x1c834,0x1d874,0x1c832,0x1d872