myrtex-mf-signer 1.1.51 → 1.1.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -11
- package/esm2020/lib/components/certificate-select/certificate-select.component.mjs +3 -3
- package/esm2020/lib/components/sign-modal/sign-modal.component.mjs +17 -12
- package/esm2020/lib/enums/signer-type.enum.mjs +8 -0
- package/esm2020/lib/helpers/strippingCharacters.mjs +1 -1
- package/esm2020/lib/models/certificate.model.mjs +1 -1
- package/esm2020/lib/models/index.mjs +1 -1
- package/esm2020/lib/models/internal/verify.cert.model.mjs +1 -1
- package/esm2020/lib/models/internal/verify.cert.response.model.mjs +1 -1
- package/esm2020/lib/models/sign-request.model.mjs +1 -1
- package/esm2020/lib/models/sign-validate-response.model.mjs +1 -1
- package/esm2020/lib/models/signed-result.model.mjs +1 -1
- package/esm2020/lib/myrtex-signer.module.mjs +1 -1
- package/esm2020/lib/providers/crypto.provider.mjs +48 -40
- package/esm2020/lib/providers/cryptojinn.provider.mjs +3 -2
- package/esm2020/lib/providers/cryptots.provider.mjs +4 -3
- package/esm2020/lib/providers/empty.provider.mjs +2 -2
- package/esm2020/lib/providers/interfaces/isign.provider.mjs +1 -1
- package/esm2020/lib/providers/signprovider.factory.mjs +1 -1
- package/esm2020/lib/services/certificate.adjuster.mjs +15 -15
- package/esm2020/lib/services/crypto.api.service.mjs +1 -1
- package/esm2020/lib/services/crypto.base.service.mjs +1 -1
- package/esm2020/lib/services/crypto.service.mjs +1 -1
- package/esm2020/lib/services/cryptopro/crypto.pro.async.service.mjs +1 -1
- package/esm2020/lib/services/cryptopro/crypto.pro.base.service.mjs +45 -11
- package/esm2020/lib/services/cryptopro/crypto.pro.ts.service.mjs +1 -1
- package/esm2020/lib/services/download.service.mjs +1 -1
- package/esm2020/lib/services/public.sign.service.mjs +1 -1
- package/esm2020/public-api.mjs +1 -1
- package/fesm2015/myrtex-mf-signer.mjs +143 -85
- package/fesm2015/myrtex-mf-signer.mjs.map +1 -1
- package/fesm2020/myrtex-mf-signer.mjs +141 -85
- package/fesm2020/myrtex-mf-signer.mjs.map +1 -1
- package/lib/components/sign-modal/sign-modal.component.d.ts +9 -1
- package/lib/enums/signer-type.enum.d.ts +6 -0
- package/lib/helpers/strippingCharacters.d.ts +1 -1
- package/lib/models/sign-request.model.d.ts +16 -2
- package/lib/providers/crypto.provider.d.ts +3 -5
- package/lib/providers/cryptojinn.provider.d.ts +2 -2
- package/lib/providers/cryptots.provider.d.ts +2 -2
- package/lib/providers/empty.provider.d.ts +2 -2
- package/lib/providers/interfaces/isign.provider.d.ts +17 -2
- package/lib/services/certificate.adjuster.d.ts +10 -10
- package/lib/services/cryptopro/crypto.pro.base.service.d.ts +6 -2
- package/package.json +1 -1
|
@@ -49,55 +49,70 @@ class CertificateAdjuster {
|
|
|
49
49
|
return '';
|
|
50
50
|
}
|
|
51
51
|
;
|
|
52
|
-
|
|
52
|
+
print2Digit(digit) {
|
|
53
53
|
return (digit < 10) ? '0' + digit : digit;
|
|
54
54
|
}
|
|
55
55
|
;
|
|
56
|
-
|
|
56
|
+
getCertDate(paramDate) {
|
|
57
57
|
let certDate = new Date(paramDate);
|
|
58
|
-
return this.
|
|
58
|
+
return this.print2Digit(certDate.getUTCDate()) + '.' + this.print2Digit(certDate.getMonth() + 1) +
|
|
59
59
|
'.' + certDate.getFullYear() + ' ' +
|
|
60
|
-
this.
|
|
61
|
-
':' + this.
|
|
60
|
+
this.print2Digit(certDate.getUTCHours()) + ':' + this.print2Digit(certDate.getUTCMinutes()) +
|
|
61
|
+
':' + this.print2Digit(certDate.getUTCSeconds());
|
|
62
62
|
}
|
|
63
63
|
;
|
|
64
|
-
|
|
64
|
+
getCertFio(certSubjectName) {
|
|
65
65
|
const lastName = this.extract(certSubjectName, 'SN');
|
|
66
66
|
const name = this.extract(certSubjectName, 'G');
|
|
67
67
|
return lastName + ' ' + name;
|
|
68
68
|
}
|
|
69
69
|
;
|
|
70
|
-
|
|
70
|
+
getCertPost(certSubjectName) {
|
|
71
71
|
return this.extract(certSubjectName, 'T');
|
|
72
72
|
}
|
|
73
73
|
;
|
|
74
|
-
|
|
74
|
+
getCertOgrn(certSubjectName) {
|
|
75
75
|
return this.extract(certSubjectName, ['OGRN', 'ОГРН', 'ОГРНИП', 'OGRNIP', '1.2.643.100.1']);
|
|
76
76
|
}
|
|
77
77
|
;
|
|
78
|
-
|
|
78
|
+
getCertOrg(certSubjectName) {
|
|
79
79
|
return this.extract(certSubjectName, 'O');
|
|
80
80
|
}
|
|
81
81
|
;
|
|
82
|
-
|
|
82
|
+
getCertInn(certSubjectName) {
|
|
83
83
|
return this.extract(certSubjectName, ['INN', 'ИНН', '1.2.643.3.131.1.1']);
|
|
84
84
|
}
|
|
85
85
|
;
|
|
86
|
-
|
|
86
|
+
getCertName(certSubjectName) {
|
|
87
87
|
return this.extract(certSubjectName, 'CN');
|
|
88
88
|
}
|
|
89
89
|
;
|
|
90
|
-
|
|
90
|
+
getIssuer(certIssuerName) {
|
|
91
91
|
return this.extract(certIssuerName, 'CN');
|
|
92
92
|
}
|
|
93
93
|
;
|
|
94
|
-
|
|
95
|
-
return this.extract(certSubjectName, 'CN') + '; Выдан: ' + this.
|
|
94
|
+
getCertInfoString(certSubjectName, certFromDate) {
|
|
95
|
+
return this.extract(certSubjectName, 'CN') + '; Выдан: ' + this.getCertDate(certFromDate);
|
|
96
96
|
}
|
|
97
97
|
;
|
|
98
98
|
}
|
|
99
99
|
const instance = new CertificateAdjuster();
|
|
100
100
|
|
|
101
|
+
var SignerTypeEnum;
|
|
102
|
+
(function (SignerTypeEnum) {
|
|
103
|
+
SignerTypeEnum[SignerTypeEnum["Unknown"] = 0] = "Unknown";
|
|
104
|
+
SignerTypeEnum[SignerTypeEnum["FL"] = 1] = "FL";
|
|
105
|
+
SignerTypeEnum[SignerTypeEnum["UL"] = 2] = "UL";
|
|
106
|
+
SignerTypeEnum[SignerTypeEnum["IP"] = 3] = "IP";
|
|
107
|
+
})(SignerTypeEnum || (SignerTypeEnum = {}));
|
|
108
|
+
|
|
109
|
+
const strippingCharacters = (text) => {
|
|
110
|
+
if (!text) {
|
|
111
|
+
return '';
|
|
112
|
+
}
|
|
113
|
+
return text.replace(/\.|,|!|"|«|»|<|>|'|:|;|-|\\(|\\)/g, '').toLowerCase();
|
|
114
|
+
};
|
|
115
|
+
|
|
101
116
|
class CryptoProBaseService extends CryptoBaseService {
|
|
102
117
|
constructor() {
|
|
103
118
|
super();
|
|
@@ -109,7 +124,8 @@ class CryptoProBaseService extends CryptoBaseService {
|
|
|
109
124
|
});
|
|
110
125
|
}
|
|
111
126
|
;
|
|
112
|
-
getCertificates() {
|
|
127
|
+
getCertificates(filter) {
|
|
128
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
113
129
|
return __awaiter(this, void 0, void 0, function* () {
|
|
114
130
|
const store = yield window.cadesplugin.CreateObjectAsync("CAdESCOM.Store" /* Store */);
|
|
115
131
|
yield store.Open(2 /* CAPICOM_CURRENT_USER_STORE */, "My" /* CAPICOM_MY_STORE */, 2 /* CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED */);
|
|
@@ -121,24 +137,56 @@ class CryptoProBaseService extends CryptoBaseService {
|
|
|
121
137
|
let validFromDate = new Date(yield cert.ValidFromDate);
|
|
122
138
|
let validToDate = new Date(yield cert.ValidToDate);
|
|
123
139
|
const subjectName = yield cert.SubjectName;
|
|
124
|
-
|
|
140
|
+
const certificate = {
|
|
125
141
|
id: i,
|
|
126
142
|
certificate: cert,
|
|
127
143
|
subjectName: subjectName,
|
|
128
|
-
name: instance.
|
|
129
|
-
cn: instance.
|
|
130
|
-
fio: instance.
|
|
131
|
-
post: instance.
|
|
132
|
-
ogrn: instance.
|
|
133
|
-
organization: instance.
|
|
134
|
-
inn: instance.
|
|
144
|
+
name: instance.getCertInfoString(subjectName, validFromDate),
|
|
145
|
+
cn: instance.getCertName(subjectName),
|
|
146
|
+
fio: instance.getCertFio(subjectName),
|
|
147
|
+
post: instance.getCertPost(subjectName),
|
|
148
|
+
ogrn: instance.getCertOgrn(subjectName),
|
|
149
|
+
organization: instance.getCertOrg(subjectName),
|
|
150
|
+
inn: instance.getCertInn(subjectName),
|
|
135
151
|
validFromDate: validFromDate.toLocaleDateString('ru-RU'),
|
|
136
152
|
validToDate: validToDate.toLocaleDateString('ru-RU'),
|
|
137
153
|
thumbprint: yield cert.Thumbprint,
|
|
138
154
|
issuerName: yield cert.IssuerName,
|
|
139
155
|
serialNumber: yield cert.SerialNumber,
|
|
140
156
|
isExpired: validToDate < new Date()
|
|
141
|
-
}
|
|
157
|
+
};
|
|
158
|
+
let filterOk = true;
|
|
159
|
+
if (((_a = filter === null || filter === void 0 ? void 0 : filter.certificateCheck) === null || _a === void 0 ? void 0 : _a.signerType) === SignerTypeEnum.FL) {
|
|
160
|
+
filterOk = !certificate.ogrn;
|
|
161
|
+
}
|
|
162
|
+
else if ([SignerTypeEnum.UL, SignerTypeEnum.IP]
|
|
163
|
+
.indexOf(((_b = filter === null || filter === void 0 ? void 0 : filter.certificateCheck) === null || _b === void 0 ? void 0 : _b.signerType) || SignerTypeEnum.Unknown) > -1) {
|
|
164
|
+
filterOk = certificate.ogrn ? true : false;
|
|
165
|
+
if (filterOk) {
|
|
166
|
+
const organization = certificate.organization || certificate.cn;
|
|
167
|
+
if (organization) {
|
|
168
|
+
const orgIsValid = (((_c = filter === null || filter === void 0 ? void 0 : filter.certificateCheck) === null || _c === void 0 ? void 0 : _c.fullName) &&
|
|
169
|
+
strippingCharacters(organization) == strippingCharacters((_d = filter === null || filter === void 0 ? void 0 : filter.certificateCheck) === null || _d === void 0 ? void 0 : _d.fullName))
|
|
170
|
+
|| (((_e = filter === null || filter === void 0 ? void 0 : filter.certificateCheck) === null || _e === void 0 ? void 0 : _e.shortName) &&
|
|
171
|
+
strippingCharacters(organization) == strippingCharacters((_f = filter === null || filter === void 0 ? void 0 : filter.certificateCheck) === null || _f === void 0 ? void 0 : _f.shortName));
|
|
172
|
+
if (!orgIsValid) {
|
|
173
|
+
filterOk = false;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
filterOk = false;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
if (filterOk && ((_g = filter === null || filter === void 0 ? void 0 : filter.certificateCheck) === null || _g === void 0 ? void 0 : _g.signerType)) {
|
|
182
|
+
const fio = certificate.fio.toLowerCase();
|
|
183
|
+
if (((_j = (_h = filter === null || filter === void 0 ? void 0 : filter.certificateCheck) === null || _h === void 0 ? void 0 : _h.fio) === null || _j === void 0 ? void 0 : _j.toLocaleLowerCase()) !== fio) {
|
|
184
|
+
filterOk = false;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
if (filterOk) {
|
|
188
|
+
certificates.push(certificate);
|
|
189
|
+
}
|
|
142
190
|
}
|
|
143
191
|
yield store.Close();
|
|
144
192
|
return certificates;
|
|
@@ -191,19 +239,12 @@ class CertificateSelectComponent extends SimpleModalComponent {
|
|
|
191
239
|
}
|
|
192
240
|
}
|
|
193
241
|
CertificateSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CertificateSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
194
|
-
CertificateSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: CertificateSelectComponent, selector: "lib-certificate-select", usesInheritance: true, ngImport: i0, template: "<div class=\"modal-content open accent-head certificate\">\
|
|
242
|
+
CertificateSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: CertificateSelectComponent, selector: "lib-certificate-select", usesInheritance: true, ngImport: i0, template: "<div class=\"modal-content open accent-head certificate\">\n <div class=\"modal-header\">\n <div class=\"modal-title\" [innerHTML]=\"'\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043A\u0430\u0442'\">\n </div>\n <span class='close close-click' (click)=\"close()\">\n <svg width='14' height='14' fill='none' xmlns='http://www.w3.org/2000/svg'>\n <path d='M13 1L1 13M1 1l12 12' stroke='#3A3A3A' stroke-width='1.5' stroke-linecap='round'\n stroke-linejoin='round' />\n </svg>\n </span>\n </div>\n <div class=\"modal-body text-center\">\n\n <div class=\"modal-body-other\">\n <div *ngFor=\"let cert of certificates\">\n <div class=\"modal-body-info\" *ngIf=\"!cert.isExpired\">\n <div class=\"modal-body-info__item\">\n <span class=\"text\">\n \u0412\u043B\u0430\u0434\u0435\u043B\u0435\u0446:\n </span>\n <span class=\"text\">\n {{cert.cn}}<br/>\n {{cert.fio}}<span *ngIf=\"cert.post\">, {{cert.post}}</span>\n </span>\n </div>\n <div class=\"modal-body-info__item\">\n <span class=\"text\">\n \u0421\u0440\u043E\u043A \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F:\n </span>\n <span class=\"text\">\n {{cert.validFromDate}} - {{cert.validToDate}}\n </span>\n </div>\n <div class=\"modal-body-info__item\">\n <span class=\"text hash\">\n {{cert.thumbprint}} {{cert.isExpired ? \"(\u0438\u0441\u0442\u0435\u043A)\" : \"\"}}\n </span>\n </div>\n <button\n (click)=\"ok(cert)\"\n [disabled]=\"cert.isExpired\"\n class=\"btn btn-md\">\u0421\u043E\u0437\u0434\u0430\u0442\u044C \u043F\u043E\u0434\u043F\u0438\u0441\u044C</button>\n </div>\n </div>\n </div>\n </div>\n <div class=\"modal-footer\">\n </div>\n</div>", styles: [":host{display:contents}:host textarea{width:100%;height:600px;border:0}\n"], directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
195
243
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CertificateSelectComponent, decorators: [{
|
|
196
244
|
type: Component,
|
|
197
|
-
args: [{ selector: 'lib-certificate-select', template: "<div class=\"modal-content open accent-head certificate\">\
|
|
245
|
+
args: [{ selector: 'lib-certificate-select', template: "<div class=\"modal-content open accent-head certificate\">\n <div class=\"modal-header\">\n <div class=\"modal-title\" [innerHTML]=\"'\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043A\u0430\u0442'\">\n </div>\n <span class='close close-click' (click)=\"close()\">\n <svg width='14' height='14' fill='none' xmlns='http://www.w3.org/2000/svg'>\n <path d='M13 1L1 13M1 1l12 12' stroke='#3A3A3A' stroke-width='1.5' stroke-linecap='round'\n stroke-linejoin='round' />\n </svg>\n </span>\n </div>\n <div class=\"modal-body text-center\">\n\n <div class=\"modal-body-other\">\n <div *ngFor=\"let cert of certificates\">\n <div class=\"modal-body-info\" *ngIf=\"!cert.isExpired\">\n <div class=\"modal-body-info__item\">\n <span class=\"text\">\n \u0412\u043B\u0430\u0434\u0435\u043B\u0435\u0446:\n </span>\n <span class=\"text\">\n {{cert.cn}}<br/>\n {{cert.fio}}<span *ngIf=\"cert.post\">, {{cert.post}}</span>\n </span>\n </div>\n <div class=\"modal-body-info__item\">\n <span class=\"text\">\n \u0421\u0440\u043E\u043A \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F:\n </span>\n <span class=\"text\">\n {{cert.validFromDate}} - {{cert.validToDate}}\n </span>\n </div>\n <div class=\"modal-body-info__item\">\n <span class=\"text hash\">\n {{cert.thumbprint}} {{cert.isExpired ? \"(\u0438\u0441\u0442\u0435\u043A)\" : \"\"}}\n </span>\n </div>\n <button\n (click)=\"ok(cert)\"\n [disabled]=\"cert.isExpired\"\n class=\"btn btn-md\">\u0421\u043E\u0437\u0434\u0430\u0442\u044C \u043F\u043E\u0434\u043F\u0438\u0441\u044C</button>\n </div>\n </div>\n </div>\n </div>\n <div class=\"modal-footer\">\n </div>\n</div>", styles: [":host{display:contents}:host textarea{width:100%;height:600px;border:0}\n"] }]
|
|
198
246
|
}], ctorParameters: function () { return []; } });
|
|
199
247
|
|
|
200
|
-
const strippingCharacters = (text) => {
|
|
201
|
-
if (!text) {
|
|
202
|
-
return '';
|
|
203
|
-
}
|
|
204
|
-
return text.replace(/\.|,|!|"|«|»|<|>|'|:|;|-|\\(|\\)/g, '').toLowerCase();
|
|
205
|
-
};
|
|
206
|
-
|
|
207
248
|
class CryptoProTsService extends CryptoProBaseService {
|
|
208
249
|
constructor() {
|
|
209
250
|
super();
|
|
@@ -396,44 +437,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
396
437
|
}], ctorParameters: function () { return [{ type: i1$1.HttpClient }, { type: i0.Injector }]; } });
|
|
397
438
|
|
|
398
439
|
class CryptoProvider {
|
|
399
|
-
constructor(simpleModalService, cryptoService,
|
|
440
|
+
constructor(simpleModalService, cryptoService, cryptoApiService) {
|
|
400
441
|
this.simpleModalService = simpleModalService;
|
|
401
442
|
this.cryptoService = cryptoService;
|
|
402
|
-
this.alertService = alertService;
|
|
403
443
|
this.cryptoApiService = cryptoApiService;
|
|
404
444
|
}
|
|
405
|
-
sign(data,
|
|
445
|
+
sign(data, options) {
|
|
446
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
406
447
|
return __awaiter(this, void 0, void 0, function* () {
|
|
448
|
+
const withLog = options === null || options === void 0 ? void 0 : options.withLog;
|
|
407
449
|
yield this.cryptoService.startUp(withLog);
|
|
408
450
|
const service = yield this.cryptoService.getService(CryptoProAsyncService.key);
|
|
409
|
-
const list = yield service.getCertificates(
|
|
451
|
+
const list = yield service.getCertificates({
|
|
452
|
+
certificateCheck: options === null || options === void 0 ? void 0 : options.certificateCheck
|
|
453
|
+
});
|
|
454
|
+
if (list.length === 0) {
|
|
455
|
+
return Promise.reject('Отсутствует подходящий сертификат');
|
|
456
|
+
}
|
|
410
457
|
const modalResult = yield this.simpleModalService
|
|
411
458
|
.addModal(CertificateSelectComponent, { certificates: list }).toPromise();
|
|
412
459
|
if (!modalResult.selected) {
|
|
413
460
|
if (withLog) {
|
|
414
|
-
console.log('
|
|
461
|
+
console.log('Сертификат не выбран, отмена');
|
|
415
462
|
}
|
|
416
463
|
return Promise.reject();
|
|
417
464
|
}
|
|
418
465
|
let certificateFail = 0;
|
|
419
466
|
if (window.CRYPTO_SKIP_CHECK !== true) {
|
|
420
|
-
if (options.
|
|
421
|
-
modalResult.selected.fio.toLowerCase() !== options.
|
|
467
|
+
if (((_a = options === null || options === void 0 ? void 0 : options.certificateCheck) === null || _a === void 0 ? void 0 : _a.fio) &&
|
|
468
|
+
modalResult.selected.fio.toLowerCase() !== ((_b = options === null || options === void 0 ? void 0 : options.certificateCheck) === null || _b === void 0 ? void 0 : _b.fio.toLowerCase())) {
|
|
422
469
|
certificateFail = 1;
|
|
423
470
|
}
|
|
424
|
-
|
|
425
|
-
//
|
|
426
|
-
// if (options.checkOgrn && !ogrnIsValid) {
|
|
427
|
-
// certificateFail = 2;
|
|
428
|
-
// }
|
|
429
|
-
if (options.checkOrganizationFullName || options.checkOrganizationShortName) {
|
|
471
|
+
if (((_c = options === null || options === void 0 ? void 0 : options.certificateCheck) === null || _c === void 0 ? void 0 : _c.fullName) || ((_d = options === null || options === void 0 ? void 0 : options.certificateCheck) === null || _d === void 0 ? void 0 : _d.shortName)) {
|
|
430
472
|
let organization = modalResult.selected.organization;
|
|
431
473
|
if (!organization) {
|
|
432
474
|
organization = modalResult.selected.cn;
|
|
433
475
|
}
|
|
434
476
|
if (organization) {
|
|
435
|
-
const orgIsValid =
|
|
436
|
-
|
|
477
|
+
const orgIsValid = (((_e = options === null || options === void 0 ? void 0 : options.certificateCheck) === null || _e === void 0 ? void 0 : _e.fullName) &&
|
|
478
|
+
strippingCharacters(organization) == strippingCharacters((_f = options === null || options === void 0 ? void 0 : options.certificateCheck) === null || _f === void 0 ? void 0 : _f.fullName))
|
|
479
|
+
|| (((_g = options === null || options === void 0 ? void 0 : options.certificateCheck) === null || _g === void 0 ? void 0 : _g.shortName) &&
|
|
480
|
+
strippingCharacters(organization) == strippingCharacters((_h = options === null || options === void 0 ? void 0 : options.certificateCheck) === null || _h === void 0 ? void 0 : _h.shortName));
|
|
437
481
|
if (!orgIsValid) {
|
|
438
482
|
certificateFail = 2;
|
|
439
483
|
}
|
|
@@ -442,39 +486,46 @@ class CryptoProvider {
|
|
|
442
486
|
certificateFail = 2;
|
|
443
487
|
}
|
|
444
488
|
}
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
489
|
+
/** @deprecated */
|
|
490
|
+
if ((options === null || options === void 0 ? void 0 : options.checkFio) &&
|
|
491
|
+
modalResult.selected.fio.toLowerCase() !== (options === null || options === void 0 ? void 0 : options.checkFio.toLowerCase())) {
|
|
492
|
+
certificateFail = 1;
|
|
493
|
+
}
|
|
494
|
+
if ((options === null || options === void 0 ? void 0 : options.checkOrganizationFullName) || (options === null || options === void 0 ? void 0 : options.checkOrganizationShortName)) {
|
|
495
|
+
let organization = modalResult.selected.organization;
|
|
496
|
+
if (!organization) {
|
|
497
|
+
organization = modalResult.selected.cn;
|
|
498
|
+
}
|
|
499
|
+
if (organization) {
|
|
500
|
+
const orgIsValid = ((options === null || options === void 0 ? void 0 : options.checkOrganizationFullName) &&
|
|
501
|
+
strippingCharacters(organization) == strippingCharacters(options === null || options === void 0 ? void 0 : options.checkOrganizationFullName))
|
|
502
|
+
|| ((options === null || options === void 0 ? void 0 : options.checkOrganizationShortName) &&
|
|
503
|
+
strippingCharacters(organization) == strippingCharacters(options === null || options === void 0 ? void 0 : options.checkOrganizationShortName));
|
|
504
|
+
if (!orgIsValid) {
|
|
505
|
+
certificateFail = 2;
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
else {
|
|
509
|
+
certificateFail = 2;
|
|
510
|
+
}
|
|
448
511
|
}
|
|
449
512
|
}
|
|
450
513
|
if (certificateFail > 0) {
|
|
451
|
-
// this.alertService.showDialog({
|
|
452
|
-
// title: 'Ошибка сертификата',
|
|
453
|
-
// message: certificateFail == 1 ?
|
|
454
|
-
// 'Данные лица, подписывающего заявку не совпадают с данными усиленной квалифицированной подписи.' :
|
|
455
|
-
// certificateFail === 3 ? 'Отсутствует сертификат с данными усиленной квалифицированной подписи' :
|
|
456
|
-
// 'Данные организации не совпадают с данными усиленной квалифицированной подписи. ' +
|
|
457
|
-
// 'Убедитесь, что вы используете сертификат, выданные от организации.',
|
|
458
|
-
// color: DialogColor.red,
|
|
459
|
-
// type: DialogType.alert,
|
|
460
|
-
// okCallback: (ok) => {
|
|
461
|
-
// //
|
|
462
|
-
// }
|
|
463
|
-
// });
|
|
464
514
|
return Promise.reject(certificateFail == 1 ?
|
|
465
515
|
'Данные лица, подписывающего заявку не совпадают с данными усиленной квалифицированной подписи.' :
|
|
466
|
-
certificateFail === 3 ? 'Отсутствует активный КриптоПровайдер (не установлен либо недоступен плагин).
|
|
516
|
+
certificateFail === 3 ? 'Отсутствует активный КриптоПровайдер (не установлен либо недоступен плагин). ' +
|
|
517
|
+
'Чтобы подписать, установите плагин КриптоПро и проверьте наличие сертификата' :
|
|
467
518
|
'Данные организации не совпадают с данными усиленной квалифицированной подписи. ' +
|
|
468
519
|
'Убедитесь, что вы используете сертификат, выданные от организации.');
|
|
469
520
|
}
|
|
470
521
|
if (withLog) {
|
|
471
|
-
console.log('
|
|
522
|
+
console.log('Подписываемые данные', data);
|
|
472
523
|
}
|
|
473
524
|
const signedData = yield service.signBase64(modalResult.selected.certificate, data, true);
|
|
474
525
|
if (withLog) {
|
|
475
|
-
console.log('
|
|
526
|
+
console.log('Подписанные данные', signedData);
|
|
476
527
|
}
|
|
477
|
-
if (!options.skipServerCheck) {
|
|
528
|
+
if (!(options === null || options === void 0 ? void 0 : options.skipServerCheck)) {
|
|
478
529
|
const verifyResult = yield this.cryptoApiService.verify({
|
|
479
530
|
data: data,
|
|
480
531
|
signature: Base64.encode(signedData),
|
|
@@ -498,14 +549,14 @@ class CryptoProvider {
|
|
|
498
549
|
});
|
|
499
550
|
}
|
|
500
551
|
}
|
|
501
|
-
CryptoProvider.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CryptoProvider, deps: [{ token: i1$2.SimpleModalService }, { token: CryptoService }, { token:
|
|
552
|
+
CryptoProvider.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CryptoProvider, deps: [{ token: i1$2.SimpleModalService }, { token: CryptoService }, { token: CryptoApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
502
553
|
CryptoProvider.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CryptoProvider, providedIn: 'root' });
|
|
503
554
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CryptoProvider, decorators: [{
|
|
504
555
|
type: Injectable,
|
|
505
556
|
args: [{
|
|
506
557
|
providedIn: 'root'
|
|
507
558
|
}]
|
|
508
|
-
}], ctorParameters: function () { return [{ type: i1$2.SimpleModalService }, { type: CryptoService }, { type:
|
|
559
|
+
}], ctorParameters: function () { return [{ type: i1$2.SimpleModalService }, { type: CryptoService }, { type: CryptoApiService }]; } });
|
|
509
560
|
|
|
510
561
|
class CryptoJinnProvider {
|
|
511
562
|
constructor(simpleModalService, cryptoService, cryptoApiService) {
|
|
@@ -513,8 +564,9 @@ class CryptoJinnProvider {
|
|
|
513
564
|
this.cryptoService = cryptoService;
|
|
514
565
|
this.cryptoApiService = cryptoApiService;
|
|
515
566
|
}
|
|
516
|
-
sign(data,
|
|
567
|
+
sign(data, options) {
|
|
517
568
|
return __awaiter(this, void 0, void 0, function* () {
|
|
569
|
+
const withLog = options === null || options === void 0 ? void 0 : options.withLog;
|
|
518
570
|
yield this.cryptoService.startUp(withLog);
|
|
519
571
|
const service = yield this.cryptoService.getService(CryptoProAsyncService.key);
|
|
520
572
|
const list = yield service.getCertificates();
|
|
@@ -555,8 +607,9 @@ class CryptoTsProvider {
|
|
|
555
607
|
this.cryptoService = cryptoService;
|
|
556
608
|
this.cryptoApiService = cryptoApiService;
|
|
557
609
|
}
|
|
558
|
-
sign(data,
|
|
610
|
+
sign(data, options) {
|
|
559
611
|
return __awaiter(this, void 0, void 0, function* () {
|
|
612
|
+
const withLog = options === null || options === void 0 ? void 0 : options.withLog;
|
|
560
613
|
yield this.cryptoService.startUp(withLog);
|
|
561
614
|
const service = yield this.cryptoService.getService(CryptoProTsService.key);
|
|
562
615
|
const list = yield service.getCertificates();
|
|
@@ -569,7 +622,7 @@ class CryptoTsProvider {
|
|
|
569
622
|
return Promise.reject();
|
|
570
623
|
}
|
|
571
624
|
const signedData = yield service.sign(modalResult.selected.certificate, data);
|
|
572
|
-
if (!options.skipServerCheck) {
|
|
625
|
+
if (!(options === null || options === void 0 ? void 0 : options.skipServerCheck)) {
|
|
573
626
|
const validateResult = yield this.cryptoApiService.validate(signedData).toPromise();
|
|
574
627
|
return {
|
|
575
628
|
data,
|
|
@@ -601,7 +654,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
601
654
|
}], ctorParameters: function () { return [{ type: i1$2.SimpleModalService }, { type: CryptoService }, { type: CryptoApiService }]; } });
|
|
602
655
|
|
|
603
656
|
class EmptyProvider {
|
|
604
|
-
sign(data,
|
|
657
|
+
sign(data, options) {
|
|
605
658
|
return __awaiter(this, void 0, void 0, function* () {
|
|
606
659
|
return Promise.resolve({
|
|
607
660
|
data: data,
|
|
@@ -724,8 +777,10 @@ class SignModalComponent extends SimpleModalComponent {
|
|
|
724
777
|
break;
|
|
725
778
|
}
|
|
726
779
|
this.signProviderFactory.create(this.provider)
|
|
727
|
-
.sign(signData,
|
|
780
|
+
.sign(signData, {
|
|
728
781
|
skipServerCheck: this.skipServerCheck,
|
|
782
|
+
withLog: this.withLog,
|
|
783
|
+
certificateCheck: this.certificateCheck,
|
|
729
784
|
checkFio: this.checkFio,
|
|
730
785
|
checkOgrn: this.checkOgrn,
|
|
731
786
|
checkOrganizationFullName: this.checkOrganizationFullName,
|
|
@@ -761,14 +816,17 @@ class SignModalComponent extends SimpleModalComponent {
|
|
|
761
816
|
if (this.withLog) {
|
|
762
817
|
console.error(error);
|
|
763
818
|
}
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
819
|
+
if (error) {
|
|
820
|
+
this.alertService.showDialog({
|
|
821
|
+
title: 'Ошибка проверки подписи',
|
|
822
|
+
message: typeof (error) == 'string' ? error : JSON.stringify(error),
|
|
823
|
+
color: DialogColor.red,
|
|
824
|
+
type: DialogType.alert,
|
|
825
|
+
okCallback: (ok) => {
|
|
826
|
+
//
|
|
827
|
+
}
|
|
828
|
+
});
|
|
829
|
+
}
|
|
772
830
|
}
|
|
773
831
|
downloadXml() {
|
|
774
832
|
if (!this.xmlUrl) {
|
|
@@ -813,10 +871,10 @@ class SignModalComponent extends SimpleModalComponent {
|
|
|
813
871
|
}
|
|
814
872
|
}
|
|
815
873
|
SignModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SignModalComponent, deps: [{ token: SignProviderFactory }, { token: DownloadService }, { token: i3.AlertService }], target: i0.ɵɵFactoryTarget.Component });
|
|
816
|
-
SignModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: SignModalComponent, selector: "lib-sign-modal", usesInheritance: true, ngImport: i0, template: "<div class=\"modal-content accent-head xl\">\
|
|
874
|
+
SignModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: SignModalComponent, selector: "lib-sign-modal", usesInheritance: true, ngImport: i0, template: "<div class=\"modal-content accent-head xl\">\n <div class=\"modal-header\">\n <div class=\"modal-title uppercase\">\n <h4 class=\"ng-binding\">{{title || '\u041D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430 \u043D\u0430 \u043F\u043E\u0434\u043F\u0438\u0441\u0430\u043D\u0438\u0435'}}</h4>\n </div>\n <span class=\"close close-click\" (click)=\"close()\">\n <svg width=\"14\" height=\"14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M13 1L1 13M1 1l12 12\" stroke=\"#3A3A3A\" stroke-width=\"1.5\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\"></path>\n </svg>\n </span>\n </div>\n\n <div class=\"modal-body text-center\">\n <div class=\"widget\">\n <my-tabs>\n <app-tab tabTitle=\"\u0412\u0438\u0437\u0443\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\" *ngIf=\"pdfUrl\">\n <pre *ngIf=\"downloadingPdf\">\n \u041F\u043E\u0434\u043E\u0436\u0434\u0438\u0442\u0435, \u0438\u0434\u0435\u0442 \u0444\u043E\u0440\u043C\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\n </pre>\n <iframe *ngIf=\"!downloadingPdf\" [src]=\"pdfViewUrl | safeurl\"\n title=\"webviewer\" frameborder=\"0\" width=\"100%\" height=\"800\"></iframe>\n </app-tab>\n <app-tab tabTitle=\"\u041F\u043E\u0434\u043F\u0438\u0441\u044B\u0432\u0430\u0435\u043C\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435\" *ngIf=\"xmlUrl\">\n <pre [innerText]=\"xmlToSign\"></pre>\n </app-tab>\n </my-tabs>\n </div>\n </div>\n\n <div class=\"modal-footer\">\n <div *ngIf=\"pdfUrl || xmlUrl || additionalPdfUrl\"\n class=\"modal-footer-item\">\n <a *ngIf=\"pdfUrl\"\n class=\"modal-footer-item__link\"\n target=\"_blank\"\n [href]=\"pdfUrl\">\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M18 21.25H6C5.30964 21.25 4.75 20.6904 4.75 20V4C4.75 3.30964 5.30964 2.75 6 2.75H13.1893L19.25 8.81066V20C19.25 20.6904 18.6904 21.25 18 21.25Z\"\n stroke=\"#282828\" stroke-width=\"1.5\"/>\n </svg>\n <span>\u0421\u043A\u0430\u0447\u0430\u0442\u044C \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442</span>\n </a>\n <a *ngIf=\"xmlUrl\"\n class=\"modal-footer-item__link\"\n target=\"_blank\"\n [href]=\"xmlUrl\">\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M6 16L2 12L6 8\" stroke=\"#282828\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M18 16L22 12L18 8\" stroke=\"#282828\" stroke-width=\"1.5\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\"/>\n <path d=\"M7.56689 19.1782L15.5669 5.32182\" stroke=\"#282828\" stroke-width=\"1.5\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\"/>\n </svg>\n <span>\u0421\u043A\u0430\u0447\u0430\u0442\u044C XML-\u0434\u0430\u043D\u043D\u044B\u0435</span>\n </a>\n <a *ngIf=\"additionalPdfUrl\"\n class=\"modal-footer-item__link\"\n target=\"_blank\"\n [href]=\"additionalPdfUrl\">\n <svg width=\"24\" height=\"20\" viewBox=\"0 0 24 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7.21404 14.2776C7.50693 13.9847 7.98181 13.9847 8.2747 14.2776L12.2747 18.2776C12.5676 18.5705 12.5676 19.0454 12.2747 19.3383C11.9818 19.6312 11.5069 19.6312 11.214 19.3383L7.21404 15.3383C6.92115 15.0454 6.92115 14.5705 7.21404 14.2776Z\" fill=\"#33373C\"/>\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M16.2747 14.2776C16.5676 14.5705 16.5676 15.0454 16.2747 15.3383L12.2747 19.3383C11.9818 19.6312 11.5069 19.6312 11.214 19.3383C10.9211 19.0454 10.9211 18.5705 11.214 18.2776L15.214 14.2776C15.5069 13.9847 15.9818 13.9847 16.2747 14.2776Z\" fill=\"#33373C\"/>\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M11.7444 9.05796C12.1586 9.05796 12.4944 9.39374 12.4944 9.80796V18.808C12.4944 19.2222 12.1586 19.558 11.7444 19.558C11.3302 19.558 10.9944 19.2222 10.9944 18.808V9.80796C10.9944 9.39374 11.3302 9.05796 11.7444 9.05796Z\" fill=\"#33373C\"/>\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M0.978206 4.66339C2.62297 1.48351 6.12559 -0.37405 9.73462 0.063407C13.146 0.476912 15.9708 2.84408 17.0094 6.05796H17.7444C20.2757 6.05796 22.4565 7.67267 23.2559 10.0708C23.2593 10.0811 23.2625 10.0915 23.2655 10.1019C23.9483 12.4917 23.1511 15.0227 21.0835 16.516C20.7477 16.7585 20.2789 16.6829 20.0364 16.3471C19.7938 16.0113 19.8695 15.5425 20.2053 15.2999C21.7333 14.1964 22.337 12.335 21.8277 10.5297C21.223 8.73647 19.6077 7.55796 17.7444 7.55796H16.4444C16.1002 7.55796 15.8002 7.32373 15.7168 6.98986C14.9919 4.0904 12.5447 1.915 9.55412 1.55251C6.56314 1.18997 3.66577 2.7324 2.31053 5.35252C0.950478 7.98196 1.3145 11.2478 3.3074 13.5125C3.58105 13.8234 3.5508 14.2974 3.23984 14.571C2.92888 14.8446 2.45498 14.8144 2.18133 14.5034C-0.225765 11.7681 -0.66174 7.83395 0.978206 4.66339Z\" fill=\"#33373C\"/>\n </svg>\n <span>{{additionalPdfUrlTitle}}</span>\n </a>\n </div>\n <div class=\"modal-footer-item\">\n <button\n class=\"mrx-btn mrx-btn-secondary mrx-btn-md wpx-120 mr-3\"\n (click)=\"cancel()\"\n >\n <div class=\"mrx-btn-label\">{{cancelLabel || '\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C'}}</div>\n </button>\n <button\n class=\"mrx-btn mrx-btn-primary mrx-btn-md\"\n [disabled]=\"disabled\"\n (click)=\"ok()\"\n >\n <div class=\"mrx-btn-label\">{{okLabel || '\u041F\u043E\u0434\u043F\u0438\u0441\u0430\u0442\u044C'}}</div>\n </button>\n </div>\n </div>\n</div>\n", styles: [":host{display:contents}:host pre{width:100%;height:600px;border:0;text-align:left;overflow-y:scroll}.modal-footer{justify-content:space-between;align-items:center}.modal-footer-item__link{display:inline-flex;align-items:center;font-family:PT Sans,sans-serif;font-weight:700;font-size:14px;line-height:160%;color:var(--Main1);margin-right:16px}.modal-footer-item__link svg{margin-right:4px}.modal-body iframe{height:600px}pre{height:600px;overflow:scroll}\n"], components: [{ type: i3.TabsComponent, selector: "my-tabs" }, { type: i3.TabComponent, selector: "app-tab", inputs: ["tabTitle", "active"] }], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "safeurl": i3.SafeUrlPipe } });
|
|
817
875
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SignModalComponent, decorators: [{
|
|
818
876
|
type: Component,
|
|
819
|
-
args: [{ selector: 'lib-sign-modal', template: "<div class=\"modal-content accent-head xl\">\
|
|
877
|
+
args: [{ selector: 'lib-sign-modal', template: "<div class=\"modal-content accent-head xl\">\n <div class=\"modal-header\">\n <div class=\"modal-title uppercase\">\n <h4 class=\"ng-binding\">{{title || '\u041D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430 \u043D\u0430 \u043F\u043E\u0434\u043F\u0438\u0441\u0430\u043D\u0438\u0435'}}</h4>\n </div>\n <span class=\"close close-click\" (click)=\"close()\">\n <svg width=\"14\" height=\"14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M13 1L1 13M1 1l12 12\" stroke=\"#3A3A3A\" stroke-width=\"1.5\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\"></path>\n </svg>\n </span>\n </div>\n\n <div class=\"modal-body text-center\">\n <div class=\"widget\">\n <my-tabs>\n <app-tab tabTitle=\"\u0412\u0438\u0437\u0443\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\" *ngIf=\"pdfUrl\">\n <pre *ngIf=\"downloadingPdf\">\n \u041F\u043E\u0434\u043E\u0436\u0434\u0438\u0442\u0435, \u0438\u0434\u0435\u0442 \u0444\u043E\u0440\u043C\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\n </pre>\n <iframe *ngIf=\"!downloadingPdf\" [src]=\"pdfViewUrl | safeurl\"\n title=\"webviewer\" frameborder=\"0\" width=\"100%\" height=\"800\"></iframe>\n </app-tab>\n <app-tab tabTitle=\"\u041F\u043E\u0434\u043F\u0438\u0441\u044B\u0432\u0430\u0435\u043C\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435\" *ngIf=\"xmlUrl\">\n <pre [innerText]=\"xmlToSign\"></pre>\n </app-tab>\n </my-tabs>\n </div>\n </div>\n\n <div class=\"modal-footer\">\n <div *ngIf=\"pdfUrl || xmlUrl || additionalPdfUrl\"\n class=\"modal-footer-item\">\n <a *ngIf=\"pdfUrl\"\n class=\"modal-footer-item__link\"\n target=\"_blank\"\n [href]=\"pdfUrl\">\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M18 21.25H6C5.30964 21.25 4.75 20.6904 4.75 20V4C4.75 3.30964 5.30964 2.75 6 2.75H13.1893L19.25 8.81066V20C19.25 20.6904 18.6904 21.25 18 21.25Z\"\n stroke=\"#282828\" stroke-width=\"1.5\"/>\n </svg>\n <span>\u0421\u043A\u0430\u0447\u0430\u0442\u044C \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442</span>\n </a>\n <a *ngIf=\"xmlUrl\"\n class=\"modal-footer-item__link\"\n target=\"_blank\"\n [href]=\"xmlUrl\">\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M6 16L2 12L6 8\" stroke=\"#282828\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M18 16L22 12L18 8\" stroke=\"#282828\" stroke-width=\"1.5\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\"/>\n <path d=\"M7.56689 19.1782L15.5669 5.32182\" stroke=\"#282828\" stroke-width=\"1.5\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\"/>\n </svg>\n <span>\u0421\u043A\u0430\u0447\u0430\u0442\u044C XML-\u0434\u0430\u043D\u043D\u044B\u0435</span>\n </a>\n <a *ngIf=\"additionalPdfUrl\"\n class=\"modal-footer-item__link\"\n target=\"_blank\"\n [href]=\"additionalPdfUrl\">\n <svg width=\"24\" height=\"20\" viewBox=\"0 0 24 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7.21404 14.2776C7.50693 13.9847 7.98181 13.9847 8.2747 14.2776L12.2747 18.2776C12.5676 18.5705 12.5676 19.0454 12.2747 19.3383C11.9818 19.6312 11.5069 19.6312 11.214 19.3383L7.21404 15.3383C6.92115 15.0454 6.92115 14.5705 7.21404 14.2776Z\" fill=\"#33373C\"/>\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M16.2747 14.2776C16.5676 14.5705 16.5676 15.0454 16.2747 15.3383L12.2747 19.3383C11.9818 19.6312 11.5069 19.6312 11.214 19.3383C10.9211 19.0454 10.9211 18.5705 11.214 18.2776L15.214 14.2776C15.5069 13.9847 15.9818 13.9847 16.2747 14.2776Z\" fill=\"#33373C\"/>\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M11.7444 9.05796C12.1586 9.05796 12.4944 9.39374 12.4944 9.80796V18.808C12.4944 19.2222 12.1586 19.558 11.7444 19.558C11.3302 19.558 10.9944 19.2222 10.9944 18.808V9.80796C10.9944 9.39374 11.3302 9.05796 11.7444 9.05796Z\" fill=\"#33373C\"/>\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M0.978206 4.66339C2.62297 1.48351 6.12559 -0.37405 9.73462 0.063407C13.146 0.476912 15.9708 2.84408 17.0094 6.05796H17.7444C20.2757 6.05796 22.4565 7.67267 23.2559 10.0708C23.2593 10.0811 23.2625 10.0915 23.2655 10.1019C23.9483 12.4917 23.1511 15.0227 21.0835 16.516C20.7477 16.7585 20.2789 16.6829 20.0364 16.3471C19.7938 16.0113 19.8695 15.5425 20.2053 15.2999C21.7333 14.1964 22.337 12.335 21.8277 10.5297C21.223 8.73647 19.6077 7.55796 17.7444 7.55796H16.4444C16.1002 7.55796 15.8002 7.32373 15.7168 6.98986C14.9919 4.0904 12.5447 1.915 9.55412 1.55251C6.56314 1.18997 3.66577 2.7324 2.31053 5.35252C0.950478 7.98196 1.3145 11.2478 3.3074 13.5125C3.58105 13.8234 3.5508 14.2974 3.23984 14.571C2.92888 14.8446 2.45498 14.8144 2.18133 14.5034C-0.225765 11.7681 -0.66174 7.83395 0.978206 4.66339Z\" fill=\"#33373C\"/>\n </svg>\n <span>{{additionalPdfUrlTitle}}</span>\n </a>\n </div>\n <div class=\"modal-footer-item\">\n <button\n class=\"mrx-btn mrx-btn-secondary mrx-btn-md wpx-120 mr-3\"\n (click)=\"cancel()\"\n >\n <div class=\"mrx-btn-label\">{{cancelLabel || '\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C'}}</div>\n </button>\n <button\n class=\"mrx-btn mrx-btn-primary mrx-btn-md\"\n [disabled]=\"disabled\"\n (click)=\"ok()\"\n >\n <div class=\"mrx-btn-label\">{{okLabel || '\u041F\u043E\u0434\u043F\u0438\u0441\u0430\u0442\u044C'}}</div>\n </button>\n </div>\n </div>\n</div>\n", styles: [":host{display:contents}:host pre{width:100%;height:600px;border:0;text-align:left;overflow-y:scroll}.modal-footer{justify-content:space-between;align-items:center}.modal-footer-item__link{display:inline-flex;align-items:center;font-family:PT Sans,sans-serif;font-weight:700;font-size:14px;line-height:160%;color:var(--Main1);margin-right:16px}.modal-footer-item__link svg{margin-right:4px}.modal-body iframe{height:600px}pre{height:600px;overflow:scroll}\n"] }]
|
|
820
878
|
}], ctorParameters: function () { return [{ type: SignProviderFactory }, { type: DownloadService }, { type: i3.AlertService }]; } });
|
|
821
879
|
|
|
822
880
|
class SignService {
|