var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.checkStringArgs=function(a,d,b){if(null==a)throw new TypeError("The 'this' value for String.prototype."+b+" must not be null or undefined");if(d instanceof RegExp)throw new TypeError("First argument to String.prototype."+b+" must not be a regular expression");return a+""};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,d,b){a!=Array.prototype&&a!=Object.prototype&&(a[d]=b.value)};$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(a,d,b,k){if(d){b=$jscomp.global;a=a.split(".");for(k=0;k=m}},"es6","es3");$jscomp.polyfill("String.prototype.endsWith",function(a){return a?a:function(a,b){var d=$jscomp.checkStringArgs(this,a,"endsWith");a+="";void 0===b&&(b=d.length);b=Math.max(0,Math.min(b|0,d.length));for(var l=a.length;0=l}},"es6","es3");var __importcert=function(a){function d(a,b){a=document.getElementsByClassName(a);for(var c=0;cb.length)return f.IDS_ERROR.INPUT_PASSWORD;if("pfx"==h.type){var p=h.filelist[0].data;try{var n=a.usWebToolkit.util.decode64(p),e=der=crosscert.asn1.fromDer(n);a.usWebToolkit.pkcs12.getCertNKeyFromPKCS12(e,b)}catch(x){return 115010==x.code?f.IDS_ERROR.NO_MATCH_PASSWORD:"Error Message : "+x.message+" \nError Code : "+x.code}"searchpfx"==m.type&&c("us-cert-import-pfx-download").checked&&(d=!0)}else{p=a.usWebToolkit.pkcs8.encryptedPrivateKeyFromBase64(v("signPri"));n=a.usWebToolkit.pkcs8.checkUserCertPassword(p,b);if(!n)return f.IDS_ERROR.NO_MATCH_PASSWORD;e=a.usWebToolkit.pki.certificateFromBase64(v("signCert"));var k=null,l=null;if("fullpfx"==h.type&&(k=a.usWebToolkit.pki.certificateFromBase64(v("kmCert")),l=a.usWebToolkit.pkcs8.encryptedPrivateKeyFromBase64(v("kmPri")),n=a.usWebToolkit.pkcs8.checkUserCertPassword(l,b),!n))return f.IDS_ERROR.NO_MATCH_PASSWORD;p=a.usWebToolkit.pkcs12.makePKCS12(e,p,k,l,b,{useMac:!0,generateLocalKeyId:!0});e=a.usWebToolkit.asn1.toDer(p).getBytes();p=a.usWebToolkit.util.encode64(e);c("us-cert-import-pfx-download").checked&&("searchpfx"==m.type?d=!0:a.fileUtil().save(h.certattr.dn+".pfx",p.toArrayBuffer()))}m.onConfirm(p,b,d);return null},v=function(a){for(var b=0;b