{"id":304145,"date":"2020-05-24T15:00:22","date_gmt":"2020-05-24T15:00:22","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=304145"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=304145","title":{"rendered":"\u0410\u043d\u0430\u043b\u0438\u0437 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e QR \u043a\u043e\u0434\u043e\u0432 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0445 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0430\u0432\u0438\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 \u0420\u041a \u0432\u043e \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434\u0435"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/503574\/\">\n<p>\u042f \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u044e \u043a\u0430\u043a \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e JavaScript \u043f\u0440\u044f\u043c\u043e \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0438 \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 QR \u043a\u043e\u0434\u043e\u0432 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0445\u0441\u044f \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0445 \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0440\u0442\u0430\u043b\u0430\u043c\u0438 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0430\u0432\u0438\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 \u0420\u0435\u0441\u043f\u0443\u0431\u043b\u0438\u043a\u0438 \u041a\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043d (\u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443 <a href=\"https:\/\/egov.kz\">https:\/\/egov.kz<\/a>).<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p>\u0412 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u044b\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0445 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0430:<\/p>\n<p>  <\/p>\n<blockquote><p>*\u0448\u0442\u0440\u0438\u0445-\u043a\u043e\u0434 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0438\u0437 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0413\u0411\u0414 \u0420\u041d \u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e-\u0446\u0438\u0444\u0440\u043e\u0432\u043e\u0439 \u043f\u043e\u0434\u043f\u0438\u0441\u044c\u044e \u0424\u0438\u043b\u0438\u0430\u043b\u0430 \u041d\u0410\u041e \u00ab\u0413\u043e\u0441\u0443\u0434\u0430\u0440\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0446\u0438\u044f \u00ab\u041f\u0440\u0430\u0432\u0438\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e \u0434\u043b\u044f \u0433\u0440\u0430\u0436\u0434\u0430\u043d\u00bb.<\/p><\/blockquote>\n<p>\u041d\u0430 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043d\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 QR \u043a\u043e\u0434\u0430\u0445 \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.<\/p>\n<p>  <\/p>\n<p>\u041a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u0446\u0435\u043b\u044c \u0441\u0442\u0430\u0432\u043b\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e: \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u044c, \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u041e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435 \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u0439 \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u0432 \u044d\u0442\u043e\u0439 \u0437\u0430\u043c\u0435\u0442\u043a\u0435 \u0440\u0435\u0447\u0438 \u0438\u0434\u0442\u0438 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442, \u0442\u043e\u043b\u044c\u043a\u043e \u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435 \u0445\u0435\u0448\u0430. \u0414\u0435\u0442\u0430\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0445 \u043f\u043e\u0434\u043f\u0438\u0441\u0435\u0439 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c, \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043f\u0443\u0431\u043b\u0438\u043a\u0430 \u043f\u0440\u043e\u044f\u0432\u0438\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441 \u043a \u044d\u0442\u043e\u0439 \u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0435.<\/p>\n<p>  <\/p>\n<p><strong>\u0412\u0430\u0436\u043d\u043e:<\/strong> \u044d\u0442\u0430 \u0437\u0430\u043c\u0435\u0442\u043a\u0430 \u043d\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043c\u0435\u0442\u043e\u0434\u0438\u043a \u0432\u0437\u043b\u043e\u043c\u0430 \u0438 \u043d\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043d\u0435\u0441\u0430\u043d\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0434\u0430\u043d\u043d\u044b\u043c, \u0440\u0435\u0447\u044c \u0431\u0443\u0434\u0435\u0442 \u0438\u0434\u0442\u0438 \u043e \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u043e\u0434\u043d\u0438\u0445 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0439 \u0432 \u0434\u0440\u0443\u0433\u0438\u0435.<\/p>\n<p>  <\/p>\n<p>\u042f \u043f\u043e\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0435 PDF \u0444\u0430\u0439\u043b\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u044e\u0442 \u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0434\u043b\u044f \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0440\u0442\u0430\u043b\u044b \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0430\u0432\u0438\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 \u0420\u041a. \u042d\u0442\u0438 PDF \u0444\u0430\u0439\u043b\u044b \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 QR \u043a\u043e\u0434\u044b \u043a\u0430\u043a \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u043d\u044b\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<p>\u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044f \u0431\u0443\u0434\u0443 \u043d\u0430 \u0441\u043f\u0440\u0430\u0432\u043a\u0435 \u043e\u0431 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0438 \u0441\u0443\u0434\u0438\u043c\u043e\u0441\u0442\u0438.<\/p>\n<p>  <\/p>\n<p>\u042f \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0441\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u043c\u0438:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/mozilla\/pdf.js\/\">PDF.js<\/a> \u0434\u043b\u044f \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0438\u0437 PDF \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430;<\/li>\n<li><a href=\"https:\/\/github.com\/cozmo\/jsQR\">jsQR<\/a> \u0434\u043b\u044f \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f QR \u043a\u043e\u0434\u043e\u0432;<\/li>\n<li><a href=\"https:\/\/github.com\/Stuk\/jszip\">JSZip<\/a> \u0434\u043b\u044f \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u0438 ZIP \u0444\u0430\u0439\u043b\u043e\u0432;<\/li>\n<li><a href=\"https:\/\/github.com\/PeculiarVentures\/xmldsigjs\">XMLDSIGjs<\/a> \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 XML;<\/li>\n<li><a href=\"https:\/\/gostcrypto.com\/\">WebCrypto GOST (gostCrypto)<\/a> \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0445\u0435\u0448\u0435\u0439 \u0438 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f\/\u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445.<\/li>\n<\/ul>\n<p>  <\/p>\n<h1 id=\"0-schityvanie-pdf-fayla-v-arraybuffer\">0. \u0421\u0447\u0438\u0442\u044b\u0432\u0430\u043d\u0438\u0435 PDF \u0444\u0430\u0439\u043b\u0430 \u0432 ArrayBuffer<\/h1>\n<p>  <\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a PDF \u0444\u0430\u0439\u043b\u0443 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c\u0438 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 HTML \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0435\u0433\u0430 <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTML\/Element\/input\/file\"><code>&lt;input type=&quot;file&quot;&gt;<\/code><\/a> \u0438 \u0435\u0433\u043e \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTML\/Element\/input\/file#files\"><code>files<\/code><\/a>.<\/p>\n<p>  <\/p>\n<p>\u0412 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u0445 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 \u0432 \u0432\u0438\u0434\u0435 <code>ArrayBuffer<\/code> \u043c\u043e\u0436\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const fileContents = await fileInput.files[0].arrayBuffer();<\/code><\/pre>\n<p>  <\/p>\n<h1 id=\"1-izvlechenie-izobrazheniy-iz-pdf-dokumenta\">1. \u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0438\u0437 PDF \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430<\/h1>\n<p>  <\/p>\n<p>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 PDF.js \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0434 \u043d\u0430\u0447\u0430\u043b\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u044b, \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 <a href=\"https:\/\/mozilla.github.io\/pdf.js\/examples\/index.html#interactive-examples\">https:\/\/mozilla.github.io\/pdf.js\/examples\/index.html#interactive-examples<\/a><\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const pdfjsLib = window['pdfjs-dist\/build\/pdf']; pdfjsLib.GlobalWorkerOptions.workerSrc = 'pdf.worker.js';<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 PDF.js \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0445 \u043d\u0430\u0434 \u043d\u0438\u043c\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439. \u0422\u0430\u043a \u043a\u0430\u043a \u043c\u0435\u043d\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0442 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043a\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const ops = [   pdfjsLib.OPS.paintJpegXObject,   pdfjsLib.OPS.paintImageXObject, ];<\/code><\/pre>\n<p>  <\/p>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0441\u043e \u0432\u0441\u0435\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 PDF \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const loadingTask = pdfjsLib.getDocument(fileContents); const pdf = await loadingTask.promise;  const objIDs = []; const images = [];  await (async function () {   for (let pageIndex = 1; pageIndex &lt;= pdf.numPages; pageIndex += 1) {     const page = await pdf.getPage(pageIndex);      \/\/ \u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0430\u0431\u043e\u0440 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432, \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0435.     const operators = await page.getOperatorList();     for (let i = 0; i &lt; operators.fnArray.length; i++) {       const fn = operators.fnArray[i];        if (ops.indexOf(fn) !== -1) {         \/\/ \u041f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0435\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 - \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043e\u0431\u044a\u0435\u043a\u0442\u0430.         const objID = operators.argsArray[i][0];          \/\/ \u041d\u0430\u0434 \u043e\u0434\u043d\u0438\u043c \u0438 \u0442\u0435\u043c \u0436\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c \u043c\u043e\u0433\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439, \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u044b \u043d\u0435 \u043d\u0443\u0436\u043d\u044b.         if (objIDs.indexOf(objID) === -1) {           objIDs.push(objID);            \/\/ \u041e\u0431\u044a\u0435\u043a\u0442 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u043e \u0435\u0433\u043e \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0443.           try {             const imageInfo = page.objs.get(objID);             images.push(imageInfo);           } catch (err) {             console.log(err);           }         }       }     }   } })()<\/code><\/pre>\n<p>  <\/p>\n<h1 id=\"2-dekodirovanie-qr-kodov\">2. \u0414\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 QR \u043a\u043e\u0434\u043e\u0432<\/h1>\n<p>  <\/p>\n<p>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 <strong>jsQR<\/strong> \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432 <a href=\"https:\/\/en.wikipedia.org\/wiki\/RGBA_color_model\">RGBA<\/a> \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u0432 PDF \u0444\u0430\u0439\u043b\u044b \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u044b \u0438 \u043a\u0430\u043a <a href=\"https:\/\/en.wikipedia.org\/wiki\/RGB_color_model\">RGB<\/a>, \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0449\u0430\u044f RGB \u043a RGBA:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">function extractRGBAData(image) {   if (image.kind === 3) { \/\/ ImageKind.RGBA_32BPP \u0438\u0437 https:\/\/github.com\/mozilla\/pdf.js\/blob\/master\/src\/shared\/util.js     return image.data;   }    if (image.kind !== 2) { \/\/ ImageKind.RGB_24BPP \u0438\u0437 https:\/\/github.com\/mozilla\/pdf.js\/blob\/master\/src\/shared\/util.js     throw new Error(`Image kind &quot;${image.kind}&quot; is not supported.`);   }    const data = new Uint8ClampedArray(image.width * image.height * 4);    let destPosition = 0;   for (let srcPosition = 0; srcPosition &lt; image.data.length;) {     data[destPosition++] = image.data[srcPosition++];     data[destPosition++] = image.data[srcPosition++];     data[destPosition++] = image.data[srcPosition++];     data[destPosition++] = 255;   }    return data; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u044e \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const qrCodes = []; images.forEach((image) =&gt; {   if (image.data) {     const data = extractRGBAData(image);      try {       const code = jsQR(data, image.width, image.height);       console.log(code);       qrCodes.push(code);     } catch (err) {       console.log(err);     }   } });<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u0432\u044b\u0432\u0435\u0434\u0435\u043d\u043e 7 \u0441\u0442\u043e\u0440\u043a \u2014 \u043f\u043e \u043e\u0434\u043d\u043e\u0439 \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 QR \u043a\u043e\u0434 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435. \u041e\u0434\u043d\u0430 \u0438\u0437 \u0441\u0442\u0440\u043e\u043a \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 URL \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u2014 QR \u043a\u043e\u0434 \u0441 \u043d\u0435\u0439 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d \u0432 \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u043f\u0440\u0430\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043e\u043d\u0430 \u043c\u0435\u043d\u044f \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442. \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 6 \u0441\u0442\u0440\u043e\u043a \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 XML \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0430 (\u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u044b):<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot;?&gt; &lt;BarcodeElement xmlns=&quot;http:\/\/barcodes.pdf.shep.nitec.kz\/&quot;&gt;   &lt;creationDate&gt;...&lt;\/creationDate&gt;   &lt;elementData&gt;...&lt;\/elementData&gt;   &lt;elementNumber&gt;1&lt;\/elementNumber&gt;   &lt;elementsAmount&gt;6&lt;\/elementsAmount&gt;   &lt;FavorID&gt;...&lt;\/FavorID&gt; &lt;\/BarcodeElement&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418\u0437 \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u043d\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0442\u0435\u0433\u0438:<\/p>\n<p>  <\/p>\n<ul>\n<li><code>&lt;elementData&gt;...&lt;\/elementData&gt;<\/code> \u2014 \u0447\u0430\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445<\/li>\n<li><code>&lt;elementNumber&gt;1&lt;\/elementNumber&gt;<\/code> \u2014 \u0438\u043d\u0434\u0435\u043a\u0441 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438<\/li>\n<li><code>&lt;elementsAmount&gt;6&lt;\/elementsAmount&gt;<\/code> \u2014 \u043e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0447\u0430\u0441\u0442\u0435\u0439 \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u044b \u0434\u0430\u043d\u043d\u044b\u0435<\/li>\n<\/ul>\n<p>  <\/p>\n<h1 id=\"3-izvlechenie-chastey-dannyh\">3. \u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u0447\u0430\u0441\u0442\u0435\u0439 \u0434\u0430\u043d\u043d\u044b\u0445<\/h1>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0447\u0430\u0441\u0442\u0435\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043f\u043e\u0437\u0438\u0446\u0438\u044f\u043c \u044f \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0441\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const qrCodesBlocks = [];  function addQRCodeBlock(code) {   if (!code || !code.data) {     return;   }    \/\/ \u041f\u043e\u043b\u0443\u0447\u0443 \u043e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0447\u0430\u0441\u0442\u0435\u0439.   const elementsAmountRegexp = \/&lt;elementsAmount&gt;((.|\\r|\\n)+?)&lt;\\\/elementsAmount&gt;\/;   const elementsAmountResult = elementsAmountRegexp.exec(code.data);   if (!elementsAmountResult || elementsAmountResult.length &lt;= 2) {     return;   }   const elementsAmount = +elementsAmountResult[1];   if (!Number.isSafeInteger(elementsAmount)) {     throw new Error('\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u043e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0447\u0430\u0441\u0442\u0435\u0439 \u0438\u0437 \u0442\u0435\u0433\u0430 &lt;elementsAmount&gt;');   }    \/\/ \u041f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043d\u0443\u0436\u043d\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432.   if (qrCodesBlocks.length === 0) {     for (let i = 0; i &lt; elementsAmount; i++) {       qrCodesBlocks.push('');     }   } else {     if (qrCodesBlocks.length !== elementsAmount) {       throw new Error(`\u0412 \u0440\u0430\u0437\u043d\u044b\u0445 QR \u043a\u043e\u0434\u0430\u0445 \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0440\u0430\u0437\u043d\u043e\u0435 \u043e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e QR \u043a\u043e\u0434\u043e\u0432: &quot;${qrCodesBlocks.length}&quot; \u0438 &quot;${elementsAmount}&quot;`);     }   }    \/\/ \u041f\u043e\u043b\u0443\u0447\u0443 \u0438\u043d\u0434\u0435\u043a\u0441 \u0447\u0430\u0441\u0442\u0438.   const elementNumberRegexp = \/&lt;elementNumber&gt;((.|\\r|\\n)+?)&lt;\\\/elementNumber&gt;\/;   const elementNumberResult = elementNumberRegexp.exec(code.data);   if (!elementNumberResult || elementNumberResult.length &lt; 2) {     throw new Error(`\u0412 QR \u043a\u043e\u0434\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 &quot;&lt;elementNumber&gt;&quot;`);   }   const elementNumber = +elementNumberResult[1];   if (!Number.isSafeInteger(elementNumber)) {     throw new Error(`&quot;&lt;elementNumber&gt;&quot; \u0432 QR \u043a\u043e\u0434\u0435 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0438\u0441\u043b\u043e\u043c`);   }    \/\/ \u0417\u0430\u0449\u0438\u0442\u0430 \u043e\u0442 \u0432\u043d\u0435\u0448\u0442\u0430\u0442\u043d\u044b\u0445 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0439.   if (elementNumber &gt; elementsAmount) {     throw new Error(`\u0418\u043d\u0434\u0435\u043a\u0441 QR \u043a\u043e\u0434\u0430 &quot;${elementNumber}&quot; \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0431\u0449\u0435\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 QR \u043a\u043e\u0434\u043e\u0432 &quot;${elementsAmount}&quot;`);   }    if (qrCodesBlocks[elementNumber - 1] !== '') {     throw new Error(`\u0418\u043d\u0434\u0435\u043a\u0441 QR \u043a\u043e\u0434\u0430 &quot;${elementNumber}&quot; \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d \u0431\u043e\u043b\u0435\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0430`);   }    \/\/ \u041f\u043e\u043c\u0435\u0449\u0443 \u0447\u0430\u0441\u0442\u044c \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e \u043f\u043e\u0437\u0438\u0446\u0438\u044e.   const elementDataRegexp = \/&lt;elementData&gt;((.|\\r|\\n)+?)&lt;\\\/elementData&gt;\/;   const elementDataResult = elementDataRegexp.exec(code.data);   if (!elementDataResult || elementDataResult.length &lt; 2) {     throw new Error('\u0412 QR \u043a\u043e\u0434\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 &quot;&lt;elementData&gt;&quot;');   }   const elementData = elementDataResult[1];    qrCodesBlocks[elementNumber - 1] = elementData; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0447\u0430\u0441\u0442\u0438 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0447\u0442\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0448\u043b\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u043e.<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">qrCodes.forEach(addQRCodeBlock);  if (qrCodesBlocks.length === 0) {   throw new Error('\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 QR \u043a\u043e\u0434\u043e\u0432: \u043d\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u043e \u043d\u0438 \u043e\u0434\u043d\u043e\u0433\u043e QR \u043a\u043e\u0434\u0430 \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438'); }  const foundBlocks = qrCodesBlocks.filter((block) =&gt; !!block); if (qrCodesBlocks.length !== foundBlocks.length) {   throw new Error('\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 QR \u043a\u043e\u0434\u043e\u0432: \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u0441\u0435\u0445 QR \u043a\u043e\u0434\u043e\u0432'); }<\/code><\/pre>\n<p>  <\/p>\n<h1 id=\"4-vosstanovlenie-dannyh\">4. \u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445<\/h1>\n<p>  <\/p>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437 \u0447\u0430\u0441\u0442\u0435\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043a\u0430\u0437\u0430\u043b \u0447\u0442\u043e \u044d\u0442\u043e ZIP \u0430\u0440\u0445\u0438\u0432 \u0440\u0430\u0437\u0440\u0435\u0437\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 \u0447\u0430\u0441\u0442\u0438 \u043a\u0430\u0436\u0434\u0430\u044f \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0437\u0430\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0432 Base64.<\/p>\n<p>  <\/p>\n<p>\u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043d\u0443\u0436\u043d\u043e \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0447\u0430\u0441\u0442\u0438 \u0438\u0437 Base64:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const zippedParts = qrCodesBlocks.map(block =&gt; new Uint8Array(gostCrypto.coding.Base64.decode(block)));<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0438\u0445:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const totalLength = zippedParts.reduce((accumulator, part) =&gt; accumulator + part.length, 0);  const zippedData = new Uint8Array(totalLength); let zippedDataIndex = 0; zippedParts.forEach((part) =&gt; {   zippedData.set(part, zippedDataIndex);   zippedDataIndex += part.length; });<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u0442\u044c \u0430\u0440\u0445\u0438\u0432:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const zip = await JSZip.loadAsync(zippedData, { checkCRC32: true });<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u0430\u0440\u0445\u0438\u0432\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <code>one<\/code>, \u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043c\u0435\u043d\u044f \u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const file = zip.file('one'); if (!file) {   throw new Error('\u0412 \u0430\u0440\u0445\u0438\u0432\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u0439 \u0444\u0430\u0439\u043b &quot;one&quot;'); }  const recoveredContents = await file.async(&quot;string&quot;);<\/code><\/pre>\n<p>  <\/p>\n<h1 id=\"5-podgotovka-dannyh-k-analizu\">5. \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043a \u0430\u043d\u0430\u043b\u0438\u0437\u0443<\/h1>\n<p>  <\/p>\n<p>\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u2014 \u044d\u0442\u043e XML \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0430 (\u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u044b):<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot;?&gt; &lt;p1001Response&gt;     &lt;SystemInfo&gt;         &lt;messageId xsi:nil=&quot;true&quot; xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot;\/&gt;         &lt;chainId&gt;...&lt;\/chainId&gt;         &lt;messageDate&gt;...&lt;\/messageDate&gt;         `1`         &lt;responseInfoRu&gt;\u0417\u0430\u043f\u0440\u043e\u0441 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d&lt;\/responseInfoRu&gt;         &lt;responseInfoKz&gt;\u0417\u0430\u043f\u0440\u043e\u0441 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d&lt;\/responseInfoKz&gt;         &lt;digiSign&gt;...&lt;\/digiSign&gt;     &lt;\/SystemInfo&gt;     &lt;ResponseData&gt;         &lt;ResponseType&gt;UNJUDGED&lt;\/ResponseType&gt;         &lt;Person&gt;             &lt;IIN&gt;...&lt;\/IIN&gt;             &lt;SurName&gt;...&lt;\/SurName&gt;             &lt;Name&gt;...&lt;\/Name&gt;             &lt;MiddleName&gt;...&lt;\/MiddleName&gt;             &lt;BirthDate&gt;...&lt;\/BirthDate&gt;             &lt;BirthPlace&gt;                 &lt;Country&gt;...&lt;\/Country&gt;                 &lt;CountryKz&gt;...&lt;\/CountryKz&gt;                 &lt;District&gt;...&lt;\/District&gt;                 &lt;DistrictKz&gt;...&lt;\/DistrictKz&gt;                 &lt;City&gt;...&lt;\/City&gt;                 &lt;CityKz&gt;...&lt;\/CityKz&gt;                 &lt;Locality&gt;...&lt;\/Locality&gt;                 &lt;LocalityKz&gt;...&lt;\/LocalityKz&gt;             &lt;\/BirthPlace&gt;         &lt;\/Person&gt;         &lt;Untried\/&gt;         &lt;CheckDate&gt;...&lt;\/CheckDate&gt;     &lt;\/ResponseData&gt; &lt;\/p1001Response&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418\u0437 \u0432\u0441\u0435\u0433\u043e \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e <code>digiSign<\/code> \u2014 \u044d\u0442\u043e \u0435\u0449\u0435 \u043e\u0434\u0438\u043d XML \u0437\u0430\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432 Base64. \u041d\u0430 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u044f \u043d\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u044e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u043e\u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0433\u043b\u0443\u0431\u0436\u0435.<\/p>\n<p>  <\/p>\n<p>\u0418\u0437\u0432\u043b\u0435\u043a\u0443 \u0438 \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u0443\u044e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 XML:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const regexp = \/&lt;digiSign&gt;((.|\\r|\\n)+?)&lt;\\\/digiSign&gt;\/; const regexpResult = regexp.exec(recoveredContents); if (!regexpResult &amp;&amp; regexpResult.length !== 2) {   throw new Error('\u0412 XML \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 &quot;&lt;digiSign&gt;&quot;'); }  const digiSignBytes = gostCrypto.coding.Base64.decode(regexpResult[1]); const xmlDataAndSignature = gostCrypto.coding.Chars.encode(digiSignBytes, 'utf8');<\/code><\/pre>\n<p>  <\/p>\n<h1 id=\"6-analiz-dannyh\">6. \u0410\u043d\u0430\u043b\u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445<\/h1>\n<p>  <\/p>\n<p>\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0433\u043e XML \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c (\u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u044b):<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt; &lt;ResponseData&gt;   &lt;ResponseType&gt;UNJUDGED&lt;\/ResponseType&gt;   &lt;Person&gt;     &lt;IIN&gt;...&lt;\/IIN&gt;     &lt;SurName&gt;...&lt;\/SurName&gt;     &lt;Name&gt;...&lt;\/Name&gt;     &lt;MiddleName&gt;...&lt;\/MiddleName&gt;     &lt;BirthDate&gt;...&lt;\/BirthDate&gt;     &lt;BirthPlace&gt;       &lt;Country&gt;...&lt;\/Country&gt;       &lt;CountryKz&gt;...&lt;\/CountryKz&gt;       &lt;District&gt;...&lt;\/District&gt;       &lt;DistrictKz&gt;...&lt;\/DistrictKz&gt;       &lt;City&gt;...&lt;\/City&gt;       &lt;CityKz&gt;...&lt;\/CityKz&gt;       &lt;Locality&gt;...&lt;\/Locality&gt;       &lt;LocalityKz&gt;...&lt;\/LocalityKz&gt;     &lt;\/BirthPlace&gt;   &lt;\/Person&gt;   &lt;Untried\/&gt;   &lt;CheckDate&gt;...&lt;\/CheckDate&gt;   &lt;ds:Signature xmlns:ds=&quot;http:\/\/www.w3.org\/2000\/09\/xmldsig#&quot;&gt;     &lt;ds:SignedInfo&gt;       &lt;ds:CanonicalizationMethod Algorithm=&quot;http:\/\/www.w3.org\/TR\/2001\/REC-xml-c14n-20010315&quot;\/&gt;       &lt;ds:SignatureMethod Algorithm=&quot;http:\/\/www.w3.org\/2001\/04\/xmldsig-more#gost34310-gost34311&quot;\/&gt;       &lt;ds:Reference URI=&quot;&quot;&gt;         &lt;ds:Transforms&gt;           &lt;ds:Transform Algorithm=&quot;http:\/\/www.w3.org\/2000\/09\/xmldsig#enveloped-signature&quot;\/&gt;           &lt;ds:Transform Algorithm=&quot;http:\/\/www.w3.org\/TR\/2001\/REC-xml-c14n-20010315#WithComments&quot;\/&gt;         &lt;\/ds:Transforms&gt;         &lt;ds:DigestMethod Algorithm=&quot;http:\/\/www.w3.org\/2001\/04\/xmldsig-more#gost34311&quot;\/&gt;         &lt;ds:DigestValue&gt;...&lt;\/ds:DigestValue&gt;       &lt;\/ds:Reference&gt;     &lt;\/ds:SignedInfo&gt;     &lt;ds:SignatureValue&gt;...&lt;\/ds:SignatureValue&gt;     &lt;ds:KeyInfo&gt;       &lt;ds:X509Data&gt;         &lt;ds:X509Certificate&gt;...&lt;\/ds:X509Certificate&gt;       &lt;\/ds:X509Data&gt;     &lt;\/ds:KeyInfo&gt;   &lt;\/ds:Signature&gt; &lt;\/ResponseData&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u042d\u0442\u043e <a href=\"https:\/\/en.wikipedia.org\/wiki\/XML_Signature\">XML \u043f\u043e\u0434\u043f\u0438\u0441\u044c<\/a> \u0441 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445, \u0441\u0443\u0434\u044f \u043f\u043e \u0432\u0441\u0435\u043c\u0443, \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0447\u0442\u043e \u0441\u0443\u0434\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0443 \u0441\u0443\u0431\u044a\u0435\u043a\u0442\u0430 \u043d\u0435\u0442 <code>&lt;ResponseType&gt;UNJUDGED&lt;\/ResponseType&gt;<\/code>, \u0430 \u0442\u0430\u043a \u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0441\u0443\u0431\u044a\u0435\u043a\u0442\u0430 \u0432 \u0442\u0435\u0433\u0435 <code>&lt;Person&gt;...&lt;\/Person&gt;<\/code>.<\/p>\n<p>  <\/p>\n<h1 id=\"7-proverka-celostnosti-podpisannyh-dannyh\">7. \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445<\/h1>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u0432 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u0432 XML \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0445\u0435\u0448\u0430 \u0441 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u043c.<\/p>\n<p>  <\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 XML \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const xml = XmlDSigJs.Parse(xmlDataAndSignature);<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0445\u0435\u0448\u0430 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043e \u0432 \u0442\u0435\u0433\u0435 <code>&lt;ds:DigestValue&gt;...&lt;\/ds:DigestValue&gt;<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const xmlSignatures = XmlDSigJs.Select(xml, &quot;\/\/*[local-name(.)='Signature' and namespace-uri(.)='http:\/\/www.w3.org\/2000\/09\/xmldsig#']&quot;); if (xmlSignatures.length === 0) {   throw new Error(`\u0412 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0446\u0438\u0444\u0440\u043e\u0432\u0430\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u044c (\u0442\u0435\u0433 &quot;&lt;Signature&gt;&quot;): &quot;${xmlDataAndSignature}&quot;`); } if (xmlSignatures.length &gt; 1) {   throw new Error(`\u0412 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0445 \u043f\u043e\u0434\u043f\u0438\u0441\u0435\u0439 (\u0442\u0435\u0433 &quot;&lt;Signature&gt;&quot;): &quot;${xmlDataAndSignature}&quot;`); }  const hashElementsInSignature = XmlDSigJs.Select(xmlSignatures[0], &quot;\/\/*[local-name(.)='DigestValue']&quot;); if (hashElementsInSignature.length === 0) {   throw new Error(`\u0412 XML \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0445\u0435\u0448 (\u0442\u0435\u0433 &quot;&lt;DigestValue&gt;&quot;): &quot;${xmlDataAndSignature}&quot;`); } if (hashElementsInSignature.length &gt; 1) {   throw new Error(`\u0412 XML \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0445\u0435\u0448\u0435\u0439 (\u0442\u0435\u0433 &quot;&lt;DigestValue&gt;&quot;): &quot;${xmlDataAndSignature}&quot;`); } const hashInSignature = hashElementsInSignature[0].textContent;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u0430\u043d\u043d\u044b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u043a \u0445\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u2014 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043d\u0430\u0434 \u043d\u0438\u043c\u0438 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0435 \u0432 \u0442\u0435\u0433\u0435 <code>&lt;ds:Transforms&gt;...&lt;\/ds:Transforms&gt;<\/code> XML \u043f\u043e\u0434\u043f\u0438\u0441\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const xmlDsigEnvelopedSignatureTransform = new XmlDSigJs.XmlDsigEnvelopedSignatureTransform(); xmlDsigEnvelopedSignatureTransform.LoadInnerXml(xml.documentElement); xmlDsigEnvelopedSignatureTransform.GetOutput();  const xmlDsigC14NWithCommentsTransform = new XmlDSigJs.XmlDsigC14NWithCommentsTransform(); xmlDsigC14NWithCommentsTransform.LoadInnerXml(xml.documentElement); const signedDataXML = xmlDsigC14NWithCommentsTransform.GetOutput();  const dataToHash = gostCrypto.coding.Chars.decode(signedDataXML, 'utf8');<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u0443\u043a\u0430\u0437\u0430\u043d \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0445\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f <code>&quot;http:\/\/www.w3.org\/2001\/04\/xmldsig-more#gost34311&quot;<\/code>, \u044d\u0442\u043e <strong>\u0413\u041e\u0421\u0422 34.311-95<\/strong> \u0447\u0442\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e <code>GOST R 34.11-94<\/code> \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 <code>gostCrypto<\/code>. \u0412 \u0420\u041a \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e \u0441 \u043d\u0438\u043c \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043d\u0430\u0431\u043e\u0440 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 <code>D-TEST<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0445\u0435\u0448\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const hashBytes = await gostCrypto.subtle.digest({name: 'GOST R 34.11-94', version: 1994, sBox: 'D-TEST'}, dataToHash); const signedDataXMLHash = gostCrypto.coding.Base64.encode(hashBytes);<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043c\u043e\u0435\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0435 \u043f\u0440\u043e\u0448\u043b\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">if (signedDataXMLHash !== hashInSignature) {   throw new Error(`\u0425\u0435\u0448 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0439 \u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 XML \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 &quot;${signedDataXMLHash}&quot; \u043d\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \u0432 \u043f\u043e\u0434\u043f\u0438\u0441\u0438 &quot;${hashInSignature}&quot;`); }<\/code><\/pre>\n<p>  <\/p>\n<h1 id=\"zaklyuchenie\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h1>\n<p>  <\/p>\n<p>\u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u0441\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e, \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u0430\u044f \u0446\u0435\u043b\u044c \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442\u0430. \u041d\u043e \u043d\u0443\u0436\u043d\u043e \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044c \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0431\u0435\u0437 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u0439 \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043e \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0443\u043a\u0430\u0432\u043e \u2014 \u043d\u0435\u0442 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0445\u0435\u0448\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 XML \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u043d\u0435 \u0431\u044b\u043b\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043e.<\/p>\n<p>  <\/p>\n<p>\u0415\u0449\u0435 \u043e\u0434\u043d\u0438\u043c \u043d\u044e\u0430\u043d\u0441\u043e\u043c \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0442\u043e, \u0447\u0442\u043e \u0440\u0430\u0437\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0430\u0432\u0438\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 \u0420\u041a \u0438\u043c\u0435\u044e\u0442 \u0440\u0430\u0437\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443: \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u0441\u0440\u0430\u0437\u0443 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f XML \u043f\u043e\u0434\u043f\u0438\u0441\u044c\u044e, \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u0432 <code>digiSign<\/code> \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u043d\u0435 \u0437\u0430\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0432 Base64, \u0430 \u0432\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0432 <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Glossary\/Entity\">HTML \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0435<\/a>, \u0431\u044b\u0432\u0430\u044e\u0442 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b. \u0412 \u0441\u0432\u044f\u0437\u0438 \u0441 \u0447\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u0432\u044b\u0448\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u043c \u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u043e\u0434 \u0440\u0430\u0437\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/sigex.kz\/support\/register-egov-document\/\">\u0412\u0435\u0431 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0435 \u043d\u0430 \u0431\u0430\u0437\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u0432 \u0437\u0430\u043c\u0435\u0442\u043a\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430<\/a><\/li>\n<li><a href=\"http:\/\/adilet.zan.kz\/rus\/docs\/Z030000370_\">\u0417\u0430\u043a\u043e\u043d \u0420\u041a \u201c\u041e\u0431 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0435 \u0438 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0439 \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u0439 \u043f\u043e\u0434\u043f\u0438\u0441\u0438\u201d<\/a><\/li>\n<li><a href=\"http:\/\/adilet.zan.kz\/rus\/docs\/V1500012864\">\u041f\u0440\u0438\u043a\u0430\u0437 \u041c\u0438\u043d\u0438\u0441\u0442\u0440\u0430 \u043f\u043e \u0438\u043d\u0432\u0435\u0441\u0442\u0438\u0446\u0438\u044f\u043c \u0438 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044e \u0420\u0435\u0441\u043f\u0443\u0431\u043b\u0438\u043a\u0438 \u041a\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043d \u201c\u041e\u0431 \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0438 \u041f\u0440\u0430\u0432\u0438\u043b \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u043e\u0434\u043b\u0438\u043d\u043d\u043e\u0441\u0442\u0438 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0439 \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u0439 \u043f\u043e\u0434\u043f\u0438\u0441\u0438\u201d<\/a><\/li>\n<\/ul>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/503574\/\"> https:\/\/habr.com\/ru\/post\/503574\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/503574\/\">\n<p>\u042f \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u044e \u043a\u0430\u043a \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e JavaScript \u043f\u0440\u044f\u043c\u043e \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0438 \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 QR \u043a\u043e\u0434\u043e\u0432 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0445\u0441\u044f \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0445 \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0440\u0442\u0430\u043b\u0430\u043c\u0438 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0430\u0432\u0438\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 \u0420\u0435\u0441\u043f\u0443\u0431\u043b\u0438\u043a\u0438 \u041a\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043d (\u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443 <a href=\"https:\/\/egov.kz\">https:\/\/egov.kz<\/a>).<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-304145","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/304145","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=304145"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/304145\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=304145"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=304145"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=304145"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}