@toolspack/ttd-common 0.4.8 → 0.5.0
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 +2 -1
- package/lib/ttd-common.common.js +2050 -5328
- package/lib/ttd-common.umd.js +2050 -5328
- package/lib/ttd-common.umd.min.js +1 -1
- package/package.json +1 -1
- package/src/App.vue +0 -2
- package/src/packages/index.js +4 -0
- package/src/packages/ukey/SignNew.vue +35 -0
- package/src/packages/ukey/WZHforChrome.js +167 -0
- package/src/packages/ukey/WzhSign.vue +47 -29
- package/src/packages/ukey/WzhSignChrome.vue +261 -0
- package/src/packages/ukey/nmCryptokit.ToToDi.js +338 -0
- package/src/views/About.vue +0 -14
- package/src/views/MakeLabel.vue +0 -178
- package/src/views/MakelLabel.less +0 -162
- package/src/views/labels.js +0 -48
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["ttd-common"]=e():t["ttd-common"]=e()})("undefined"!==typeof self?self:this,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s="fb15")}({"00ee":function(t,e,r){var n=r("b622"),o=n("toStringTag"),i={};i[o]="z",t.exports="[object z]"===String(i)},"0366":function(t,e,r){var n=r("1c0b");t.exports=function(t,e,r){if(n(t),void 0===e)return t;switch(r){case 0:return function(){return t.call(e)};case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,o){return t.call(e,r,n,o)}}return function(){return t.apply(e,arguments)}}},"06cf":function(t,e,r){var n=r("83ab"),o=r("d1e7"),i=r("5c6c"),a=r("fc6a"),c=r("c04e"),s=r("5135"),u=r("0cfb"),f=Object.getOwnPropertyDescriptor;e.f=n?f:function(t,e){if(t=a(t),e=c(e,!0),u)try{return f(t,e)}catch(r){}if(s(t,e))return i(!o.f.call(t,e),t[e])}},"0cb2":function(t,e,r){var n=r("7b0b"),o=Math.floor,i="".replace,a=/\$([$&'`]|\d\d?|<[^>]*>)/g,c=/\$([$&'`]|\d\d?)/g;t.exports=function(t,e,r,s,u,f){var l=r+t.length,p=s.length,d=c;return void 0!==u&&(u=n(u),d=a),i.call(f,d,(function(n,i){var a;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(l);case"<":a=u[i.slice(1,-1)];break;default:var c=+i;if(0===c)return n;if(c>p){var f=o(c/10);return 0===f?n:f<=p?void 0===s[f-1]?i.charAt(1):s[f-1]+i.charAt(1):n}a=s[c-1]}return void 0===a?"":a}))}},"0cfb":function(t,e,r){var n=r("83ab"),o=r("d039"),i=r("cc12");t.exports=!n&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},"0d03":function(t,e,r){var n=r("6eeb"),o=Date.prototype,i="Invalid Date",a="toString",c=o[a],s=o.getTime;new Date(NaN)+""!=i&&n(o,a,(function(){var t=s.call(this);return t===t?c.call(this):i}))},"14c3":function(t,e,r){var n=r("c6b6"),o=r("9263");t.exports=function(t,e){var r=t.exec;if("function"===typeof r){var i=r.call(t,e);if("object"!==typeof i)throw TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==n(t))throw TypeError("RegExp#exec called on incompatible receiver");return o.call(t,e)}},"19aa":function(t,e){t.exports=function(t,e,r){if(!(t instanceof e))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return t}},"1be4":function(t,e,r){var n=r("d066");t.exports=n("document","documentElement")},"1c0b":function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},"1c7e":function(t,e,r){var n=r("b622"),o=n("iterator"),i=!1;try{var a=0,c={next:function(){return{done:!!a++}},return:function(){i=!0}};c[o]=function(){return this},Array.from(c,(function(){throw 2}))}catch(s){}t.exports=function(t,e){if(!e&&!i)return!1;var r=!1;try{var n={};n[o]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(s){}return r}},"1cdc":function(t,e,r){var n=r("342f");t.exports=/(iphone|ipod|ipad).*applewebkit/i.test(n)},"1d80":function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},"1dde":function(t,e,r){var n=r("d039"),o=r("b622"),i=r("2d00"),a=o("species");t.exports=function(t){return i>=51||!n((function(){var e=[],r=e.constructor={};return r[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},2266:function(t,e,r){var n=r("825a"),o=r("e95a"),i=r("50c4"),a=r("0366"),c=r("35a1"),s=r("2a62"),u=function(t,e){this.stopped=t,this.result=e};t.exports=function(t,e,r){var f,l,p,d,h,g,v,y=r&&r.that,m=!(!r||!r.AS_ENTRIES),b=!(!r||!r.IS_ITERATOR),x=!(!r||!r.INTERRUPTED),C=a(e,y,1+m+x),S=function(t){return f&&s(f),new u(!0,t)},w=function(t){return m?(n(t),x?C(t[0],t[1],S):C(t[0],t[1])):x?C(t,S):C(t)};if(b)f=t;else{if(l=c(t),"function"!=typeof l)throw TypeError("Target is not iterable");if(o(l)){for(p=0,d=i(t.length);d>p;p++)if(h=w(t[p]),h&&h instanceof u)return h;return new u(!1)}f=l.call(t)}g=f.next;while(!(v=g.call(f)).done){try{h=w(v.value)}catch(P){throw s(f),P}if("object"==typeof h&&h&&h instanceof u)return h}return new u(!1)}},"23cb":function(t,e,r){var n=r("a691"),o=Math.max,i=Math.min;t.exports=function(t,e){var r=n(t);return r<0?o(r+e,0):i(r,e)}},"23e7":function(t,e,r){var n=r("da84"),o=r("06cf").f,i=r("9112"),a=r("6eeb"),c=r("ce4e"),s=r("e893"),u=r("94ca");t.exports=function(t,e){var r,f,l,p,d,h,g=t.target,v=t.global,y=t.stat;if(f=v?n:y?n[g]||c(g,{}):(n[g]||{}).prototype,f)for(l in e){if(d=e[l],t.noTargetGet?(h=o(f,l),p=h&&h.value):p=f[l],r=u(v?l:g+(y?".":"#")+l,t.forced),!r&&void 0!==p){if(typeof d===typeof p)continue;s(d,p)}(t.sham||p&&p.sham)&&i(d,"sham",!0),a(f,l,d,t)}}},"241c":function(t,e,r){var n=r("ca84"),o=r("7839"),i=o.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,i)}},"24fb":function(t,e,r){"use strict";function n(t,e){var r=t[1]||"",n=t[3];if(!n)return r;if(e&&"function"===typeof btoa){var i=o(n),a=n.sources.map((function(t){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(t," */")}));return[r].concat(a).concat([i]).join("\n")}return[r].join("\n")}function o(t){var e=btoa(unescape(encodeURIComponent(JSON.stringify(t)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(e);return"/*# ".concat(r," */")}t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r=n(e,t);return e[2]?"@media ".concat(e[2]," {").concat(r,"}"):r})).join("")},e.i=function(t,r,n){"string"===typeof t&&(t=[[null,t,""]]);var o={};if(n)for(var i=0;i<this.length;i++){var a=this[i][0];null!=a&&(o[a]=!0)}for(var c=0;c<t.length;c++){var s=[].concat(t[c]);n&&o[s[0]]||(r&&(s[2]?s[2]="".concat(r," and ").concat(s[2]):s[2]=r),e.push(s))}},e}},2626:function(t,e,r){"use strict";var n=r("d066"),o=r("9bf2"),i=r("b622"),a=r("83ab"),c=i("species");t.exports=function(t){var e=n(t),r=o.f;a&&e&&!e[c]&&r(e,c,{configurable:!0,get:function(){return this}})}},"2a62":function(t,e,r){var n=r("825a");t.exports=function(t){var e=t["return"];if(void 0!==e)return n(e.call(t)).value}},"2cf4":function(t,e,r){var n,o,i,a=r("da84"),c=r("d039"),s=r("0366"),u=r("1be4"),f=r("cc12"),l=r("1cdc"),p=r("605d"),d=a.location,h=a.setImmediate,g=a.clearImmediate,v=a.process,y=a.MessageChannel,m=a.Dispatch,b=0,x={},C="onreadystatechange",S=function(t){if(x.hasOwnProperty(t)){var e=x[t];delete x[t],e()}},w=function(t){return function(){S(t)}},P=function(t){S(t.data)},E=function(t){a.postMessage(t+"",d.protocol+"//"+d.host)};h&&g||(h=function(t){var e=[],r=1;while(arguments.length>r)e.push(arguments[r++]);return x[++b]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},n(b),b},g=function(t){delete x[t]},p?n=function(t){v.nextTick(w(t))}:m&&m.now?n=function(t){m.now(w(t))}:y&&!l?(o=new y,i=o.port2,o.port1.onmessage=P,n=s(i.postMessage,i,1)):a.addEventListener&&"function"==typeof postMessage&&!a.importScripts&&d&&"file:"!==d.protocol&&!c(E)?(n=E,a.addEventListener("message",P,!1)):n=C in f("script")?function(t){u.appendChild(f("script"))[C]=function(){u.removeChild(this),S(t)}}:function(t){setTimeout(w(t),0)}),t.exports={set:h,clear:g}},"2d00":function(t,e,r){var n,o,i=r("da84"),a=r("342f"),c=i.process,s=c&&c.versions,u=s&&s.v8;u?(n=u.split("."),o=n[0]+n[1]):a&&(n=a.match(/Edge\/(\d+)/),(!n||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/),n&&(o=n[1]))),t.exports=o&&+o},"2e16":function(t,e,r){var n=r("24fb");e=n(!1),e.push([t.i,".CryptoAgent-wrapper[data-v-cac4c7fc]{height:0;width:0;position:absolute;left:-5000px}",""]),t.exports=e},"342f":function(t,e,r){var n=r("d066");t.exports=n("navigator","userAgent")||""},"35a1":function(t,e,r){var n=r("f5df"),o=r("3f8c"),i=r("b622"),a=i("iterator");t.exports=function(t){if(void 0!=t)return t[a]||t["@@iterator"]||o[n(t)]}},"37e8":function(t,e,r){var n=r("83ab"),o=r("9bf2"),i=r("825a"),a=r("df75");t.exports=n?Object.defineProperties:function(t,e){i(t);var r,n=a(e),c=n.length,s=0;while(c>s)o.f(t,r=n[s++],e[r]);return t}},"3a50":function(t,e,r){var n=r("6780");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var o=r("499e").default;o("271332fa",n,!0,{sourceMap:!1,shadowMode:!1})},"3bbe":function(t,e,r){var n=r("861d");t.exports=function(t){if(!n(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},"3ee9":function(t,e,r){var n=r("24fb");e=n(!1),e.push([t.i,".CryptoAgent-wrapper[data-v-22a309ec]{height:0;width:0;position:absoute;left:-5000px}",""]),t.exports=e},"3f8c":function(t,e){t.exports={}},4224:function(t,e,r){"use strict";r("8ff8")},"428f":function(t,e,r){var n=r("da84");t.exports=n},"44ad":function(t,e,r){var n=r("d039"),o=r("c6b6"),i="".split;t.exports=n((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?i.call(t,""):Object(t)}:Object},"44de":function(t,e,r){var n=r("da84");t.exports=function(t,e){var r=n.console;r&&r.error&&(1===arguments.length?r.error(t):r.error(t,e))}},4795:function(t,e,r){var n=r("23e7"),o=r("da84"),i=r("342f"),a=[].slice,c=/MSIE .\./.test(i),s=function(t){return function(e,r){var n=arguments.length>2,o=n?a.call(arguments,2):void 0;return t(n?function(){("function"==typeof e?e:Function(e)).apply(this,o)}:e,r)}};n({global:!0,bind:!0,forced:c},{setTimeout:s(o.setTimeout),setInterval:s(o.setInterval)})},4840:function(t,e,r){var n=r("825a"),o=r("1c0b"),i=r("b622"),a=i("species");t.exports=function(t,e){var r,i=n(t).constructor;return void 0===i||void 0==(r=n(i)[a])?e:o(r)}},4930:function(t,e,r){var n=r("d039");t.exports=!!Object.getOwnPropertySymbols&&!n((function(){return!String(Symbol())}))},"499e":function(t,e,r){"use strict";function n(t,e){for(var r=[],n={},o=0;o<e.length;o++){var i=e[o],a=i[0],c=i[1],s=i[2],u=i[3],f={id:t+":"+o,css:c,media:s,sourceMap:u};n[a]?n[a].parts.push(f):r.push(n[a]={id:a,parts:[f]})}return r}r.r(e),r.d(e,"default",(function(){return h}));var o="undefined"!==typeof document;if("undefined"!==typeof DEBUG&&DEBUG&&!o)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var i={},a=o&&(document.head||document.getElementsByTagName("head")[0]),c=null,s=0,u=!1,f=function(){},l=null,p="data-vue-ssr-id",d="undefined"!==typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function h(t,e,r,o){u=r,l=o||{};var a=n(t,e);return g(a),function(e){for(var r=[],o=0;o<a.length;o++){var c=a[o],s=i[c.id];s.refs--,r.push(s)}e?(a=n(t,e),g(a)):a=[];for(o=0;o<r.length;o++){s=r[o];if(0===s.refs){for(var u=0;u<s.parts.length;u++)s.parts[u]();delete i[s.id]}}}}function g(t){for(var e=0;e<t.length;e++){var r=t[e],n=i[r.id];if(n){n.refs++;for(var o=0;o<n.parts.length;o++)n.parts[o](r.parts[o]);for(;o<r.parts.length;o++)n.parts.push(y(r.parts[o]));n.parts.length>r.parts.length&&(n.parts.length=r.parts.length)}else{var a=[];for(o=0;o<r.parts.length;o++)a.push(y(r.parts[o]));i[r.id]={id:r.id,refs:1,parts:a}}}}function v(){var t=document.createElement("style");return t.type="text/css",a.appendChild(t),t}function y(t){var e,r,n=document.querySelector("style["+p+'~="'+t.id+'"]');if(n){if(u)return f;n.parentNode.removeChild(n)}if(d){var o=s++;n=c||(c=v()),e=b.bind(null,n,o,!1),r=b.bind(null,n,o,!0)}else n=v(),e=x.bind(null,n),r=function(){n.parentNode.removeChild(n)};return e(t),function(n){if(n){if(n.css===t.css&&n.media===t.media&&n.sourceMap===t.sourceMap)return;e(t=n)}else r()}}var m=function(){var t=[];return function(e,r){return t[e]=r,t.filter(Boolean).join("\n")}}();function b(t,e,r,n){var o=r?"":n.css;if(t.styleSheet)t.styleSheet.cssText=m(e,o);else{var i=document.createTextNode(o),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(i,a[e]):t.appendChild(i)}}function x(t,e){var r=e.css,n=e.media,o=e.sourceMap;if(n&&t.setAttribute("media",n),l.ssrId&&t.setAttribute(p,e.id),o&&(r+="\n/*# sourceURL="+o.sources[0]+" */",r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),t.styleSheet)t.styleSheet.cssText=r;else{while(t.firstChild)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))}}},"4d64":function(t,e,r){var n=r("fc6a"),o=r("50c4"),i=r("23cb"),a=function(t){return function(e,r,a){var c,s=n(e),u=o(s.length),f=i(a,u);if(t&&r!=r){while(u>f)if(c=s[f++],c!=c)return!0}else for(;u>f;f++)if((t||f in s)&&s[f]===r)return t||f||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},"50c4":function(t,e,r){var n=r("a691"),o=Math.min;t.exports=function(t){return t>0?o(n(t),9007199254740991):0}},5135:function(t,e){var r={}.hasOwnProperty;t.exports=function(t,e){return r.call(t,e)}},5319:function(t,e,r){"use strict";var n=r("d784"),o=r("825a"),i=r("50c4"),a=r("a691"),c=r("1d80"),s=r("8aa5"),u=r("0cb2"),f=r("14c3"),l=Math.max,p=Math.min,d=function(t){return void 0===t?t:String(t)};n("replace",2,(function(t,e,r,n){var h=n.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,g=n.REPLACE_KEEPS_$0,v=h?"$":"$0";return[function(r,n){var o=c(this),i=void 0==r?void 0:r[t];return void 0!==i?i.call(r,o,n):e.call(String(o),r,n)},function(t,n){if(!h&&g||"string"===typeof n&&-1===n.indexOf(v)){var c=r(e,t,this,n);if(c.done)return c.value}var y=o(t),m=String(this),b="function"===typeof n;b||(n=String(n));var x=y.global;if(x){var C=y.unicode;y.lastIndex=0}var S=[];while(1){var w=f(y,m);if(null===w)break;if(S.push(w),!x)break;var P=String(w[0]);""===P&&(y.lastIndex=s(m,i(y.lastIndex),C))}for(var E="",D=0,F=0;F<S.length;F++){w=S[F];for(var A=String(w[0]),I=l(p(a(w.index),m.length),0),O=[],T=1;T<w.length;T++)O.push(d(w[T]));var _=w.groups;if(b){var j=[A].concat(O,I,m);void 0!==_&&j.push(_);var N=String(n.apply(void 0,j))}else N=u(A,m,I,O,_,n);I>=D&&(E+=m.slice(D,I)+N,D=I+A.length)}return E+m.slice(D)}]}))},5692:function(t,e,r){var n=r("c430"),o=r("c6cd");(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.8.3",mode:n?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},"56ef":function(t,e,r){var n=r("d066"),o=r("241c"),i=r("7418"),a=r("825a");t.exports=n("Reflect","ownKeys")||function(t){var e=o.f(a(t)),r=i.f;return r?e.concat(r(t)):e}},5899:function(t,e){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},"58a8":function(t,e,r){var n=r("1d80"),o=r("5899"),i="["+o+"]",a=RegExp("^"+i+i+"*"),c=RegExp(i+i+"*$"),s=function(t){return function(e){var r=String(n(e));return 1&t&&(r=r.replace(a,"")),2&t&&(r=r.replace(c,"")),r}};t.exports={start:s(1),end:s(2),trim:s(3)}},"5c6c":function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"605d":function(t,e,r){var n=r("c6b6"),o=r("da84");t.exports="process"==n(o.process)},6187:function(t,e,r){"use strict";r("935c")},6547:function(t,e,r){var n=r("a691"),o=r("1d80"),i=function(t){return function(e,r){var i,a,c=String(o(e)),s=n(r),u=c.length;return s<0||s>=u?t?"":void 0:(i=c.charCodeAt(s),i<55296||i>56319||s+1===u||(a=c.charCodeAt(s+1))<56320||a>57343?t?c.charAt(s):i:t?c.slice(s,s+2):a-56320+(i-55296<<10)+65536)}};t.exports={codeAt:i(!1),charAt:i(!0)}},"65f0":function(t,e,r){var n=r("861d"),o=r("e8b5"),i=r("b622"),a=i("species");t.exports=function(t,e){var r;return o(t)&&(r=t.constructor,"function"!=typeof r||r!==Array&&!o(r.prototype)?n(r)&&(r=r[a],null===r&&(r=void 0)):r=void 0),new(void 0===r?Array:r)(0===e?0:e)}},6780:function(t,e,r){var n=r("24fb");e=n(!1),e.push([t.i,".cfca-pdf{width:100%;min-height:100%;position:relative;margin-top:-1px}.cfca-pdf .fontSize1{font-size:65%}.cfca-pdf .fontSize1,.cfca-pdf .fontSize2{font-family:Verdana,Geneva,Arial,Helvetica,sans-serif}.cfca-pdf .fontSize2{font-size:70%}.cfca-pdf .fontSize3{font-size:75%;font-family:Verdana,Geneva,Arial,Helvetica,sans-serif}.cfca-pdf .fakehlink{cursor:pointer;text-decoration:underline;font-weight:400;line-height:26px;color:#06c}.cfca-pdf .plaintext{line-height:28px}.cfca-pdf .blankline{height:5px}.cfca-pdf .remaining{width:100%;position:absolute;z-index:1;top:72px;bottom:0}.cfca-pdf .cfca-page .page-num{display:inline-block;width:auto}.cfca-pdf .cfca-page .page-num input{display:inline-block;width:48px;height:32px;border:1px solid #ccc;border-radius:2px;margin:0 5px}.cfca-pdf .cfca-pdf-wrapper{position:relative;width:560px;margin:0 auto;box-shadow:0 5px 10px 0 rgba(0,0,0,.05)}.cfca-pdf .cfca-pdf-wrapper .cfca-left,.cfca-pdf .cfca-pdf-wrapper .cfca-right{color:#dcdcdc;position:absolute;width:73px;height:130px;text-align:center;font-size:33px;cursor:pointer;border-radius:4px;top:50%;left:-72px}.cfca-pdf .cfca-pdf-wrapper .disabled{cursor:not-allowed}.cfca-pdf .cfca-pdf-wrapper .cfca-right{left:auto;right:-72px}.cfca-pdf .cfca-pdf-wrapper .cfca-content{display:flex;flex-direction:column;justify-content:space-between;position:relative;background:#fff;border:1px solid #d4d4d4;border-radius:0;padding:0;box-sizing:border-box;overflow:hidden}.cfca-pdf .cfca-pdf-wrapper .cfca-content .cfca-object{box-sizing:border-box;position:relative}.cfca-pdf .cfca-pdf-wrapper .cfca-content .cfca-object .obj-wrapper{height:758px}.cfca-pdf .cfca-pdf-wrapper .cfca-content .cfca-page{position:relative;height:48px;line-height:48px;box-sizing:border-box;overflow:hidden;padding:0 20px;text-align:left;font-size:14px;background:#fff;color:#666;border-bottom:1px solid #d4d4d4}.cfca-pdf .cfca-pdf-wrapper .cfca-content .cfca-page .cfca-title h2{max-width:340px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-size:18px;color:#222;line-height:48px;font-weight:400;margin:0;padding:0}.cfca-pdf .cfca-pdf-wrapper .cfca-content .cfca-page .cfca-title .sub-title{font-size:12px;color:#999;line-height:17px}.cfca-pdf .cfca-pdf-wrapper .cfca-content .cfca-page .fr{position:absolute;right:20px;top:0;max-width:180px;white-space:nowrap;text-overflow:ellipsis}.cfca-pdf .cfca-pdf-wrapper .cfca-content .cfca-page .di{margin-left:10px}.cfca-pdf .cfca-pdf-wrapper .cfca-content .cfca-control{line-height:64px;box-sizing:border-box;overflow:hidden;padding:0 20px;text-align:right;font-size:14px;background:#f5f5f5;color:#666}",""]),t.exports=e},"69f3":function(t,e,r){var n,o,i,a=r("7f9a"),c=r("da84"),s=r("861d"),u=r("9112"),f=r("5135"),l=r("c6cd"),p=r("f772"),d=r("d012"),h=c.WeakMap,g=function(t){return i(t)?o(t):n(t,{})},v=function(t){return function(e){var r;if(!s(e)||(r=o(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}};if(a){var y=l.state||(l.state=new h),m=y.get,b=y.has,x=y.set;n=function(t,e){return e.facade=t,x.call(y,t,e),e},o=function(t){return m.call(y,t)||{}},i=function(t){return b.call(y,t)}}else{var C=p("state");d[C]=!0,n=function(t,e){return e.facade=t,u(t,C,e),e},o=function(t){return f(t,C)?t[C]:{}},i=function(t){return f(t,C)}}t.exports={set:n,get:o,has:i,enforce:g,getterFor:v}},"6eeb":function(t,e,r){var n=r("da84"),o=r("9112"),i=r("5135"),a=r("ce4e"),c=r("8925"),s=r("69f3"),u=s.get,f=s.enforce,l=String(String).split("String");(t.exports=function(t,e,r,c){var s,u=!!c&&!!c.unsafe,p=!!c&&!!c.enumerable,d=!!c&&!!c.noTargetGet;"function"==typeof r&&("string"!=typeof e||i(r,"name")||o(r,"name",e),s=f(r),s.source||(s.source=l.join("string"==typeof e?e:""))),t!==n?(u?!d&&t[e]&&(p=!0):delete t[e],p?t[e]=r:o(t,e,r)):p?t[e]=r:a(e,r)})(Function.prototype,"toString",(function(){return"function"==typeof this&&u(this).source||c(this)}))},7156:function(t,e,r){var n=r("861d"),o=r("d2bb");t.exports=function(t,e,r){var i,a;return o&&"function"==typeof(i=e.constructor)&&i!==r&&n(a=i.prototype)&&a!==r.prototype&&o(t,a),t}},7418:function(t,e){e.f=Object.getOwnPropertySymbols},7839:function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(t,e,r){var n=r("1d80");t.exports=function(t){return Object(n(t))}},"7c73":function(t,e,r){var n,o=r("825a"),i=r("37e8"),a=r("7839"),c=r("d012"),s=r("1be4"),u=r("cc12"),f=r("f772"),l=">",p="<",d="prototype",h="script",g=f("IE_PROTO"),v=function(){},y=function(t){return p+h+l+t+p+"/"+h+l},m=function(t){t.write(y("")),t.close();var e=t.parentWindow.Object;return t=null,e},b=function(){var t,e=u("iframe"),r="java"+h+":";return e.style.display="none",s.appendChild(e),e.src=String(r),t=e.contentWindow.document,t.open(),t.write(y("document.F=Object")),t.close(),t.F},x=function(){try{n=document.domain&&new ActiveXObject("htmlfile")}catch(e){}x=n?m(n):b();var t=a.length;while(t--)delete x[d][a[t]];return x()};c[g]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(v[d]=o(t),r=new v,v[d]=null,r[g]=t):r=x(),void 0===e?r:i(r,e)}},"7f9a":function(t,e,r){var n=r("da84"),o=r("8925"),i=n.WeakMap;t.exports="function"===typeof i&&/native code/.test(o(i))},"825a":function(t,e,r){var n=r("861d");t.exports=function(t){if(!n(t))throw TypeError(String(t)+" is not an object");return t}},"83ab":function(t,e,r){var n=r("d039");t.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},8418:function(t,e,r){"use strict";var n=r("c04e"),o=r("9bf2"),i=r("5c6c");t.exports=function(t,e,r){var a=n(e);a in t?o.f(t,a,i(0,r)):t[a]=r}},"861d":function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},8875:function(t,e,r){var n,o,i;(function(r,a){o=[],n=a,i="function"===typeof n?n.apply(e,o):n,void 0===i||(t.exports=i)})("undefined"!==typeof self&&self,(function(){function t(){var e=Object.getOwnPropertyDescriptor(document,"currentScript");if(!e&&"currentScript"in document&&document.currentScript)return document.currentScript;if(e&&e.get!==t&&document.currentScript)return document.currentScript;try{throw new Error}catch(d){var r,n,o,i=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,a=/@([^@]*):(\d+):(\d+)\s*$/gi,c=i.exec(d.stack)||a.exec(d.stack),s=c&&c[1]||!1,u=c&&c[2]||!1,f=document.location.href.replace(document.location.hash,""),l=document.getElementsByTagName("script");s===f&&(r=document.documentElement.outerHTML,n=new RegExp("(?:[^\\n]+?\\n){0,"+(u-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),o=r.replace(n,"$1").trim());for(var p=0;p<l.length;p++){if("interactive"===l[p].readyState)return l[p];if(l[p].src===s)return l[p];if(s===f&&l[p].innerHTML&&l[p].innerHTML.trim()===o)return l[p]}return null}}return t}))},8925:function(t,e,r){var n=r("c6cd"),o=Function.toString;"function"!=typeof n.inspectSource&&(n.inspectSource=function(t){return o.call(t)}),t.exports=n.inspectSource},"8aa5":function(t,e,r){"use strict";var n=r("6547").charAt;t.exports=function(t,e,r){return e+(r?n(t,e).length:1)}},"8ff8":function(t,e,r){var n=r("3ee9");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var o=r("499e").default;o("42cf06ab",n,!0,{sourceMap:!1,shadowMode:!1})},"90e3":function(t,e){var r=0,n=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++r+n).toString(36)}},9112:function(t,e,r){var n=r("83ab"),o=r("9bf2"),i=r("5c6c");t.exports=n?function(t,e,r){return o.f(t,e,i(1,r))}:function(t,e,r){return t[e]=r,t}},9263:function(t,e,r){"use strict";var n=r("ad6d"),o=r("9f7f"),i=RegExp.prototype.exec,a=String.prototype.replace,c=i,s=function(){var t=/a/,e=/b*/g;return i.call(t,"a"),i.call(e,"a"),0!==t.lastIndex||0!==e.lastIndex}(),u=o.UNSUPPORTED_Y||o.BROKEN_CARET,f=void 0!==/()??/.exec("")[1],l=s||f||u;l&&(c=function(t){var e,r,o,c,l=this,p=u&&l.sticky,d=n.call(l),h=l.source,g=0,v=t;return p&&(d=d.replace("y",""),-1===d.indexOf("g")&&(d+="g"),v=String(t).slice(l.lastIndex),l.lastIndex>0&&(!l.multiline||l.multiline&&"\n"!==t[l.lastIndex-1])&&(h="(?: "+h+")",v=" "+v,g++),r=new RegExp("^(?:"+h+")",d)),f&&(r=new RegExp("^"+h+"$(?!\\s)",d)),s&&(e=l.lastIndex),o=i.call(p?r:l,v),p?o?(o.input=o.input.slice(g),o[0]=o[0].slice(g),o.index=l.lastIndex,l.lastIndex+=o[0].length):l.lastIndex=0:s&&o&&(l.lastIndex=l.global?o.index+o[0].length:e),f&&o&&o.length>1&&a.call(o[0],r,(function(){for(c=1;c<arguments.length-2;c++)void 0===arguments[c]&&(o[c]=void 0)})),o}),t.exports=c},"935c":function(t,e,r){var n=r("2e16");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var o=r("499e").default;o("3a4a6758",n,!0,{sourceMap:!1,shadowMode:!1})},"94ca":function(t,e,r){var n=r("d039"),o=/#|\.prototype\./,i=function(t,e){var r=c[a(t)];return r==u||r!=s&&("function"==typeof e?n(e):!!e)},a=i.normalize=function(t){return String(t).replace(o,".").toLowerCase()},c=i.data={},s=i.NATIVE="N",u=i.POLYFILL="P";t.exports=i},"96cf":function(t,e,r){var n=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,o="function"===typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(_){s=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof v?e:v,i=Object.create(o.prototype),a=new I(n||[]);return i._invoke=E(t,r,a),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(_){return{type:"throw",arg:_}}}t.wrap=u;var l="suspendedStart",p="suspendedYield",d="executing",h="completed",g={};function v(){}function y(){}function m(){}var b={};b[i]=function(){return this};var x=Object.getPrototypeOf,C=x&&x(x(O([])));C&&C!==r&&n.call(C,i)&&(b=C);var S=m.prototype=v.prototype=Object.create(b);function w(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function r(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"===typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return r("throw",t,a,c)}))}c(s.arg)}var o;function i(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}this._invoke=i}function E(t,e,r){var n=l;return function(o,i){if(n===d)throw new Error("Generator is already running");if(n===h){if("throw"===o)throw i;return T()}r.method=o,r.arg=i;while(1){var a=r.delegate;if(a){var c=D(a,r);if(c){if(c===g)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===l)throw n=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=d;var s=f(t,e,r);if("normal"===s.type){if(n=r.done?h:p,s.arg===g)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n=h,r.method="throw",r.arg=s.arg)}}}function D(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator["return"]&&(r.method="return",r.arg=e,D(t,r),"throw"===r.method))return g;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var o=f(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function F(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(F,this),this.reset(!0)}function O(t){if(t){var r=t[i];if(r)return r.call(t);if("function"===typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){while(++o<t.length)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:T}}function T(){return{value:e,done:!0}}return y.prototype=S.constructor=m,m.constructor=y,y.displayName=s(m,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"===typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,s(t,c,"GeneratorFunction")),t.prototype=Object.create(S),t},t.awrap=function(t){return{__await:t}},w(P.prototype),P.prototype[a]=function(){return this},t.AsyncIterator=P,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new P(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(S),s(S,c,"Generator"),S[i]=function(){return this},S.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){while(e.length){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=O,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0],e=t.completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:O(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}(t.exports);try{regeneratorRuntime=n}catch(o){Function("r","regeneratorRuntime = r")(n)}},"99af":function(t,e,r){"use strict";var n=r("23e7"),o=r("d039"),i=r("e8b5"),a=r("861d"),c=r("7b0b"),s=r("50c4"),u=r("8418"),f=r("65f0"),l=r("1dde"),p=r("b622"),d=r("2d00"),h=p("isConcatSpreadable"),g=9007199254740991,v="Maximum allowed index exceeded",y=d>=51||!o((function(){var t=[];return t[h]=!1,t.concat()[0]!==t})),m=l("concat"),b=function(t){if(!a(t))return!1;var e=t[h];return void 0!==e?!!e:i(t)},x=!y||!m;n({target:"Array",proto:!0,forced:x},{concat:function(t){var e,r,n,o,i,a=c(this),l=f(a,0),p=0;for(e=-1,n=arguments.length;e<n;e++)if(i=-1===e?a:arguments[e],b(i)){if(o=s(i.length),p+o>g)throw TypeError(v);for(r=0;r<o;r++,p++)r in i&&u(l,p,i[r])}else{if(p>=g)throw TypeError(v);u(l,p++,i)}return l.length=p,l}})},"9bf2":function(t,e,r){var n=r("83ab"),o=r("0cfb"),i=r("825a"),a=r("c04e"),c=Object.defineProperty;e.f=n?c:function(t,e,r){if(i(t),e=a(e,!0),i(r),o)try{return c(t,e,r)}catch(n){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},"9f7f":function(t,e,r){"use strict";var n=r("d039");function o(t,e){return RegExp(t,e)}e.UNSUPPORTED_Y=n((function(){var t=o("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),e.BROKEN_CARET=n((function(){var t=o("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},a4b4:function(t,e,r){var n=r("342f");t.exports=/web0s(?!.*chrome)/i.test(n)},a640:function(t,e,r){"use strict";var n=r("d039");t.exports=function(t,e){var r=[][t];return!!r&&n((function(){r.call(null,e||function(){throw 1},1)}))}},a691:function(t,e){var r=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:r)(t)}},a9e3:function(t,e,r){"use strict";var n=r("83ab"),o=r("da84"),i=r("94ca"),a=r("6eeb"),c=r("5135"),s=r("c6b6"),u=r("7156"),f=r("c04e"),l=r("d039"),p=r("7c73"),d=r("241c").f,h=r("06cf").f,g=r("9bf2").f,v=r("58a8").trim,y="Number",m=o[y],b=m.prototype,x=s(p(b))==y,C=function(t){var e,r,n,o,i,a,c,s,u=f(t,!1);if("string"==typeof u&&u.length>2)if(u=v(u),e=u.charCodeAt(0),43===e||45===e){if(r=u.charCodeAt(2),88===r||120===r)return NaN}else if(48===e){switch(u.charCodeAt(1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+u}for(i=u.slice(2),a=i.length,c=0;c<a;c++)if(s=i.charCodeAt(c),s<48||s>o)return NaN;return parseInt(i,n)}return+u};if(i(y,!m(" 0o1")||!m("0b1")||m("+0x1"))){for(var S,w=function(t){var e=arguments.length<1?0:t,r=this;return r instanceof w&&(x?l((function(){b.valueOf.call(r)})):s(r)!=y)?u(new m(C(e)),r,w):C(e)},P=n?d(m):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),E=0;P.length>E;E++)c(m,S=P[E])&&!c(w,S)&&g(w,S,h(m,S));w.prototype=b,b.constructor=w,a(o,y,w)}},ac1f:function(t,e,r){"use strict";var n=r("23e7"),o=r("9263");n({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},ad6d:function(t,e,r){"use strict";var n=r("825a");t.exports=function(){var t=n(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},ae40:function(t,e,r){var n=r("83ab"),o=r("d039"),i=r("5135"),a=Object.defineProperty,c={},s=function(t){throw t};t.exports=function(t,e){if(i(c,t))return c[t];e||(e={});var r=[][t],u=!!i(e,"ACCESSORS")&&e.ACCESSORS,f=i(e,0)?e[0]:s,l=i(e,1)?e[1]:void 0;return c[t]=!!r&&!o((function(){if(u&&!n)return!0;var t={length:-1};u?a(t,1,{enumerable:!0,get:s}):t[1]=1,r.call(t,f,l)}))}},b041:function(t,e,r){"use strict";var n=r("00ee"),o=r("f5df");t.exports=n?{}.toString:function(){return"[object "+o(this)+"]"}},b575:function(t,e,r){var n,o,i,a,c,s,u,f,l=r("da84"),p=r("06cf").f,d=r("2cf4").set,h=r("1cdc"),g=r("a4b4"),v=r("605d"),y=l.MutationObserver||l.WebKitMutationObserver,m=l.document,b=l.process,x=l.Promise,C=p(l,"queueMicrotask"),S=C&&C.value;S||(n=function(){var t,e;v&&(t=b.domain)&&t.exit();while(o){e=o.fn,o=o.next;try{e()}catch(r){throw o?a():i=void 0,r}}i=void 0,t&&t.enter()},h||v||g||!y||!m?x&&x.resolve?(u=x.resolve(void 0),f=u.then,a=function(){f.call(u,n)}):a=v?function(){b.nextTick(n)}:function(){d.call(l,n)}:(c=!0,s=m.createTextNode(""),new y(n).observe(s,{characterData:!0}),a=function(){s.data=c=!c})),t.exports=S||function(t){var e={fn:t,next:void 0};i&&(i.next=e),o||(o=e,a()),i=e}},b622:function(t,e,r){var n=r("da84"),o=r("5692"),i=r("5135"),a=r("90e3"),c=r("4930"),s=r("fdbf"),u=o("wks"),f=n.Symbol,l=s?f:f&&f.withoutSetter||a;t.exports=function(t){return i(u,t)||(c&&i(f,t)?u[t]=f[t]:u[t]=l("Symbol."+t)),u[t]}},c04e:function(t,e,r){var n=r("861d");t.exports=function(t,e){if(!n(t))return t;var r,o;if(e&&"function"==typeof(r=t.toString)&&!n(o=r.call(t)))return o;if("function"==typeof(r=t.valueOf)&&!n(o=r.call(t)))return o;if(!e&&"function"==typeof(r=t.toString)&&!n(o=r.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},c430:function(t,e){t.exports=!1},c6b6:function(t,e){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},c6cd:function(t,e,r){var n=r("da84"),o=r("ce4e"),i="__core-js_shared__",a=n[i]||o(i,{});t.exports=a},c8ba:function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(n){"object"===typeof window&&(r=window)}t.exports=r},c975:function(t,e,r){"use strict";var n=r("23e7"),o=r("4d64").indexOf,i=r("a640"),a=r("ae40"),c=[].indexOf,s=!!c&&1/[1].indexOf(1,-0)<0,u=i("indexOf"),f=a("indexOf",{ACCESSORS:!0,1:0});n({target:"Array",proto:!0,forced:s||!u||!f},{indexOf:function(t){return s?c.apply(this,arguments)||0:o(this,t,arguments.length>1?arguments[1]:void 0)}})},ca84:function(t,e,r){var n=r("5135"),o=r("fc6a"),i=r("4d64").indexOf,a=r("d012");t.exports=function(t,e){var r,c=o(t),s=0,u=[];for(r in c)!n(a,r)&&n(c,r)&&u.push(r);while(e.length>s)n(c,r=e[s++])&&(~i(u,r)||u.push(r));return u}},cc12:function(t,e,r){var n=r("da84"),o=r("861d"),i=n.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},cdf9:function(t,e,r){var n=r("825a"),o=r("861d"),i=r("f069");t.exports=function(t,e){if(n(t),o(e)&&e.constructor===t)return e;var r=i.f(t),a=r.resolve;return a(e),r.promise}},ce4e:function(t,e,r){var n=r("da84"),o=r("9112");t.exports=function(t,e){try{o(n,t,e)}catch(r){n[t]=e}return e}},d012:function(t,e){t.exports={}},d039:function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},d066:function(t,e,r){var n=r("428f"),o=r("da84"),i=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?i(n[t])||i(o[t]):n[t]&&n[t][e]||o[t]&&o[t][e]}},d1e7:function(t,e,r){"use strict";var n={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!n.call({1:2},1);e.f=i?function(t){var e=o(this,t);return!!e&&e.enumerable}:n},d2bb:function(t,e,r){var n=r("825a"),o=r("3bbe");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,t.call(r,[]),e=r instanceof Array}catch(i){}return function(r,i){return n(r),o(i),e?t.call(r,i):r.__proto__=i,r}}():void 0)},d3b7:function(t,e,r){var n=r("00ee"),o=r("6eeb"),i=r("b041");n||o(Object.prototype,"toString",i,{unsafe:!0})},d44e:function(t,e,r){var n=r("9bf2").f,o=r("5135"),i=r("b622"),a=i("toStringTag");t.exports=function(t,e,r){t&&!o(t=r?t:t.prototype,a)&&n(t,a,{configurable:!0,value:e})}},d784:function(t,e,r){"use strict";r("ac1f");var n=r("6eeb"),o=r("d039"),i=r("b622"),a=r("9263"),c=r("9112"),s=i("species"),u=!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),f=function(){return"$0"==="a".replace(/./,"$0")}(),l=i("replace"),p=function(){return!!/./[l]&&""===/./[l]("a","$0")}(),d=!o((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]}));t.exports=function(t,e,r,l){var h=i(t),g=!o((function(){var e={};return e[h]=function(){return 7},7!=""[t](e)})),v=g&&!o((function(){var e=!1,r=/a/;return"split"===t&&(r={},r.constructor={},r.constructor[s]=function(){return r},r.flags="",r[h]=/./[h]),r.exec=function(){return e=!0,null},r[h](""),!e}));if(!g||!v||"replace"===t&&(!u||!f||p)||"split"===t&&!d){var y=/./[h],m=r(h,""[t],(function(t,e,r,n,o){return e.exec===a?g&&!o?{done:!0,value:y.call(e,r,n)}:{done:!0,value:t.call(r,e,n)}:{done:!1}}),{REPLACE_KEEPS_$0:f,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:p}),b=m[0],x=m[1];n(String.prototype,t,b),n(RegExp.prototype,h,2==e?function(t,e){return x.call(t,this,e)}:function(t){return x.call(t,this)})}l&&c(RegExp.prototype[h],"sham",!0)}},da84:function(t,e,r){(function(e){var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof e&&e)||function(){return this}()||Function("return this")()}).call(this,r("c8ba"))},df75:function(t,e,r){var n=r("ca84"),o=r("7839");t.exports=Object.keys||function(t){return n(t,o)}},e2cc:function(t,e,r){var n=r("6eeb");t.exports=function(t,e,r){for(var o in e)n(t,o,e[o],r);return t}},e667:function(t,e){t.exports=function(t){try{return{error:!1,value:t()}}catch(e){return{error:!0,value:e}}}},e6cf:function(t,e,r){"use strict";var n,o,i,a,c=r("23e7"),s=r("c430"),u=r("da84"),f=r("d066"),l=r("fea9"),p=r("6eeb"),d=r("e2cc"),h=r("d44e"),g=r("2626"),v=r("861d"),y=r("1c0b"),m=r("19aa"),b=r("8925"),x=r("2266"),C=r("1c7e"),S=r("4840"),w=r("2cf4").set,P=r("b575"),E=r("cdf9"),D=r("44de"),F=r("f069"),A=r("e667"),I=r("69f3"),O=r("94ca"),T=r("b622"),_=r("605d"),j=r("2d00"),N=T("species"),G="Promise",L=I.get,k=I.set,R=I.getterFor(G),U=l,K=u.TypeError,M=u.document,$=u.process,z=f("fetch"),B=F.f,H=B,Y=!!(M&&M.createEvent&&u.dispatchEvent),V="function"==typeof PromiseRejectionEvent,X="unhandledrejection",W="rejectionhandled",Z=0,q=1,J=2,Q=1,tt=2,et=O(G,(function(){var t=b(U)!==String(U);if(!t){if(66===j)return!0;if(!_&&!V)return!0}if(s&&!U.prototype["finally"])return!0;if(j>=51&&/native code/.test(U))return!1;var e=U.resolve(1),r=function(t){t((function(){}),(function(){}))},n=e.constructor={};return n[N]=r,!(e.then((function(){}))instanceof r)})),rt=et||!C((function(t){U.all(t)["catch"]((function(){}))})),nt=function(t){var e;return!(!v(t)||"function"!=typeof(e=t.then))&&e},ot=function(t,e){if(!t.notified){t.notified=!0;var r=t.reactions;P((function(){var n=t.value,o=t.state==q,i=0;while(r.length>i){var a,c,s,u=r[i++],f=o?u.ok:u.fail,l=u.resolve,p=u.reject,d=u.domain;try{f?(o||(t.rejection===tt&&st(t),t.rejection=Q),!0===f?a=n:(d&&d.enter(),a=f(n),d&&(d.exit(),s=!0)),a===u.promise?p(K("Promise-chain cycle")):(c=nt(a))?c.call(a,l,p):l(a)):p(n)}catch(h){d&&!s&&d.exit(),p(h)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&at(t)}))}},it=function(t,e,r){var n,o;Y?(n=M.createEvent("Event"),n.promise=e,n.reason=r,n.initEvent(t,!1,!0),u.dispatchEvent(n)):n={promise:e,reason:r},!V&&(o=u["on"+t])?o(n):t===X&&D("Unhandled promise rejection",r)},at=function(t){w.call(u,(function(){var e,r=t.facade,n=t.value,o=ct(t);if(o&&(e=A((function(){_?$.emit("unhandledRejection",n,r):it(X,r,n)})),t.rejection=_||ct(t)?tt:Q,e.error))throw e.value}))},ct=function(t){return t.rejection!==Q&&!t.parent},st=function(t){w.call(u,(function(){var e=t.facade;_?$.emit("rejectionHandled",e):it(W,e,t.value)}))},ut=function(t,e,r){return function(n){t(e,n,r)}},ft=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=J,ot(t,!0))},lt=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw K("Promise can't be resolved itself");var n=nt(e);n?P((function(){var r={done:!1};try{n.call(e,ut(lt,r,t),ut(ft,r,t))}catch(o){ft(r,o,t)}})):(t.value=e,t.state=q,ot(t,!1))}catch(o){ft({done:!1},o,t)}}};et&&(U=function(t){m(this,U,G),y(t),n.call(this);var e=L(this);try{t(ut(lt,e),ut(ft,e))}catch(r){ft(e,r)}},n=function(t){k(this,{type:G,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:Z,value:void 0})},n.prototype=d(U.prototype,{then:function(t,e){var r=R(this),n=B(S(this,U));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=_?$.domain:void 0,r.parent=!0,r.reactions.push(n),r.state!=Z&&ot(r,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new n,e=L(t);this.promise=t,this.resolve=ut(lt,e),this.reject=ut(ft,e)},F.f=B=function(t){return t===U||t===i?new o(t):H(t)},s||"function"!=typeof l||(a=l.prototype.then,p(l.prototype,"then",(function(t,e){var r=this;return new U((function(t,e){a.call(r,t,e)})).then(t,e)}),{unsafe:!0}),"function"==typeof z&&c({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return E(U,z.apply(u,arguments))}}))),c({global:!0,wrap:!0,forced:et},{Promise:U}),h(U,G,!1,!0),g(G),i=f(G),c({target:G,stat:!0,forced:et},{reject:function(t){var e=B(this);return e.reject.call(void 0,t),e.promise}}),c({target:G,stat:!0,forced:s||et},{resolve:function(t){return E(s&&this===i?U:this,t)}}),c({target:G,stat:!0,forced:rt},{all:function(t){var e=this,r=B(e),n=r.resolve,o=r.reject,i=A((function(){var r=y(e.resolve),i=[],a=0,c=1;x(t,(function(t){var s=a++,u=!1;i.push(void 0),c++,r.call(e,t).then((function(t){u||(u=!0,i[s]=t,--c||n(i))}),o)})),--c||n(i)}));return i.error&&o(i.value),r.promise},race:function(t){var e=this,r=B(e),n=r.reject,o=A((function(){var o=y(e.resolve);x(t,(function(t){o.call(e,t).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}})},e893:function(t,e,r){var n=r("5135"),o=r("56ef"),i=r("06cf"),a=r("9bf2");t.exports=function(t,e){for(var r=o(e),c=a.f,s=i.f,u=0;u<r.length;u++){var f=r[u];n(t,f)||c(t,f,s(e,f))}}},e8b5:function(t,e,r){var n=r("c6b6");t.exports=Array.isArray||function(t){return"Array"==n(t)}},e95a:function(t,e,r){var n=r("b622"),o=r("3f8c"),i=n("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||a[i]===t)}},f069:function(t,e,r){"use strict";var n=r("1c0b"),o=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n})),this.resolve=n(e),this.reject=n(r)};t.exports.f=function(t){return new o(t)}},f5df:function(t,e,r){var n=r("00ee"),o=r("c6b6"),i=r("b622"),a=i("toStringTag"),c="Arguments"==o(function(){return arguments}()),s=function(t,e){try{return t[e]}catch(r){}};t.exports=n?o:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=s(e=Object(t),a))?r:c?o(e):"Object"==(n=o(e))&&"function"==typeof e.callee?"Arguments":n}},f772:function(t,e,r){var n=r("5692"),o=r("90e3"),i=n("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},fb15:function(t,e,r){"use strict";if(r.r(e),"undefined"!==typeof window){var n=window.document.currentScript,o=r("8875");n=o(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:o});var i=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);i&&(r.p=i[1])}var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"cfca-pdf"},[t.isIE?[r("div",{staticClass:"cfca-pdf-wrapper",style:{visibility:t.visible}},[r("div",{class:{"cfca-left":!0,active:"left"===t.active,disabled:t.pageNo<=1},on:{click:function(e){return t.GoToPrevPage()}}},[r("span",{staticClass:"el-icon-arrow-left"})]),r("div",{staticClass:"cfca-content"},[r("div",{staticClass:"cfca-page"},[r("div",{staticClass:"fl cfca-title"},[r("h2",[t._v(t._s(t.title))])]),r("div",{staticClass:"fr"},[t._v(" "+t._s(t.pageNo)+"/"+t._s(t.pageCount)+" "),r("span",{staticClass:"di"},[t._v("第")]),r("el-input",{staticClass:"page-num",attrs:{size:"mini"},on:{change:t.GoToPage},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.GoToPage(e)}},model:{value:t.inputPage,callback:function(e){t.inputPage=e},expression:"inputPage"}}),t._v("页 ")],1)]),r("div",{ref:"PDFCtrlPlaceHolder",staticClass:"cfca-object"},[r("div",{staticClass:"obj-wrapper",on:{dragenter:t.onDragEnter,dragover:t.onDragOver,drop:t.onDrop}},[this.idstr?[r("object",{ref:"pdfCtrl",staticClass:"PDFCtrlObject",staticStyle:{position:"relative","z-Index":"1"},attrs:{id:"PDFCtrl"+this.idstr,tabindex:0,codebase:t.publicPath+t.codebase,classid:"clsid:6F60FE31-F827-4295-8AC4-775EF7478A6A",width:"100%",height:"100%"}},[r("param",{attrs:{name:"wmode",value:"transparent"}}),r("param",{attrs:{name:"showToolbar",value:"false"}})])]:[r("object",{ref:"pdfCtrl",staticClass:"PDFCtrlObject",staticStyle:{position:"relative","z-Index":"1"},attrs:{tabindex:0,codebase:t.publicPath+t.codebase,classid:"clsid:6F60FE31-F827-4295-8AC4-775EF7478A6A",width:"100%",height:"100%"}},[r("param",{attrs:{name:"wmode",value:"transparent"}}),r("param",{attrs:{name:"showToolbar",value:"false"}})])]],2)]),r("div",{staticClass:"cfca-control"},[t._t("default")],2)]),r("div",{class:{"cfca-right":!0,active:"right"===t.active,disabled:t.pageNo>=t.pageCount},on:{click:function(e){return t.GoToNextPage()}}},[r("span",{staticClass:"el-icon-arrow-right"})])])]:[r("div",{staticClass:"red",staticStyle:{height:"350px",padding:"20px",position:"relative","margin-bottom":"20px"}},[t._v(" 提示:当前浏览器不支持控件预览,请切换IE浏览器进行查看 "),r("div",{staticClass:"tc",staticStyle:{position:"absolute",bottom:"0",left:"0",right:"0"}},[t._t("default")],2)])]],2)},c=[];r("99af"),r("c975"),r("a9e3"),r("d3b7"),r("e6cf"),r("ac1f"),r("5319"),r("4795"),r("96cf");function s(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(u){return void r(u)}c.done?e(s):Promise.resolve(s).then(n,o)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){s(i,n,o,a,c,"next",t)}function c(t){s(i,n,o,a,c,"throw",t)}a(void 0)}))}}var f=function(t){var e={};return t&&(e="string"===typeof t&&/^{/.test(t)?JSON.parse(t):t),e.url&&(e.url=decodeURI(e.url)),e},l={name:"cfca-pdf",props:{action:{type:String,default:""},pdfurl:{type:String,default:""},visible:{type:[String,Boolean],default:"visible"},title:{type:String,default:""},image:{type:String,default:""},idstr:{type:[String,Number]}},data:function(){var t="";return t="x86"===window.navigator.cpuClass?"TrustSignPDFPlugin.ttd.x86.cab#version=3,2,1,4":"TrustSignPDFPlugin.ttd.x64.cab#version=3,2,1,4",{publicPath:"https://wsp.totodi.com/cfca_plug/",PDFCtrl:"",codebase:t,active:"",inputPage:"",isIE:navigator.appName.indexOf("Internet")>=0||navigator.appVersion.indexOf("Trident")>=0,pageNo:1,pageCount:1}},beforeDestroy:function(){console.log("--cfca-pdf-beforeDestroy")},beforeRouteLeave:function(t,e,r){var n=this;return u(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return console.log("-cfca--beforeRouteLeave---"),t.next=3,n.CloseFile();case 3:r();case 4:case"end":return t.stop()}}),t)})))()},mounted:function(){this.isIE&&(this.OnLoad(),console.log("cfca mounted =".concat(this.pdfurl)),this.pdfurl&&setTimeout(this.OpenFile,100))},methods:{OnLoad:function(){return!this.PDFCtrl&&(!!this.isIE&&(this.PDFCtrl=this.$refs.pdfCtrl,this.PDFCtrl||(console.log("使用id 加载this.PDFCtrl "),this.PDFCtrl=window["PDFCtrl".concat(this.idstr)]),void(window.OnClickPoint=this.OnClickPoint)))},OpenFile:function(t){var e=this;if(t=t||this.pdfurl,!t)return alert("未发现pdf资源路径!"),!1;try{console.log("OpenFile--src--".concat(t)),this.PDFCtrl.OpenWebFile(encodeURI(t)),this.PDFCtrl=this.$refs.pdfCtrl,setTimeout((function(){e.PDFCtrl.ZoomTo(-1),e.GetPageNo()}),100)}catch(n){if(this.PDFCtrl.GetLastErrorDesc){var r=this.PDFCtrl.GetLastErrorDesc();alert(r+n)}}},sleep:function(t){return new Promise((function(e){return setTimeout(e,t)}))},CloseFile:function(){try{this.pdfurl&&this.PDFCtrl&&(console.log("CloseFile---"),this.PDFCtrl.CloseFile())}catch(e){if(console.log("CloseFile error--",e),this.PDFCtrl&&this.PDFCtrl.GetLastErrorDesc){var t=this.PDFCtrl.GetLastErrorDesc();alert(t+e)}}},onDragEnter:function(t){this.$emit("cfcaDragEnter",t)},onDragOver:function(t){t.preventDefault(),this.$emit("cfcaDragOver",t)},onDrop:function(t){this.$emit("cfcaDrop",t)},GoToFirstPage:function(){try{this.PDFCtrl.GoToFirstPage()}catch(e){if(this.PDFCtrl&&this.PDFCtrl.GetLastErrorDesc){var t=this.PDFCtrl.GetLastErrorDesc();alert(t+e)}}},GoToLastPage:function(){try{this.PDFCtrl.GoToLastPage()}catch(e){if(this.PDFCtrl&&this.PDFCtrl.GetLastErrorDesc){var t=this.PDFCtrl.GetLastErrorDesc();alert(t+e)}}},GoToPrevPage:function(){this.active="left";var t=this;try{this.PDFCtrl.GoToPrevPage(),this.inputPage="",setTimeout((function(){t.GetPageNo()}),100)}catch(r){if(this.PDFCtrl&&this.PDFCtrl.GetLastErrorDesc){var e=this.PDFCtrl.GetLastErrorDesc();alert(e+r)}}},GoToNextPage:function(){this.active="right";var t=this;try{this.PDFCtrl.GoToNextPage(),this.inputPage="",setTimeout((function(){t.GetPageNo()}),100)}catch(r){if(this.PDFCtrl&&this.PDFCtrl.GetLastErrorDesc){var e=this.PDFCtrl.GetLastErrorDesc();alert(e+r)}}},GetPageNo:function(){try{this.pageNo=this.PDFCtrl.GetCurrentPageNo(),this.pageCount=this.PDFCtrl.GetPageCount()}catch(e){if(this.PDFCtrl&&this.PDFCtrl.GetLastErrorDesc){var t=this.PDFCtrl.GetLastErrorDesc();alert(t+e)}}},GoToPage:function(){var t=this;try{var e=this.inputPage.replace(/\D/,"");if(""===e)return void alert("请输入页码!");this.PDFCtrl.GoToPage(e),setTimeout((function(){t.GetPageNo()}),100)}catch(n){if(this.PDFCtrl&&this.PDFCtrl.GetLastErrorDesc){var r=this.PDFCtrl.GetLastErrorDesc();alert(r+n)}}},ZoomTo:function(t){try{this.PDFCtrl.ZoomTo(t)}catch(r){if(this.PDFCtrl&&this.PDFCtrl.GetLastErrorDesc){var e=this.PDFCtrl.GetLastErrorDesc();alert(e+r)}}},ZoomOut:function(){try{this.PDFCtrl.ZoomOut()}catch(e){if(this.PDFCtrl&&this.PDFCtrl.GetLastErrorDesc){var t=this.PDFCtrl.GetLastErrorDesc();alert(t+e)}}},ZoomIn:function(){try{this.PDFCtrl.ZoomIn()}catch(e){if(this.PDFCtrl&&this.PDFCtrl.GetLastErrorDesc){var t=this.PDFCtrl.GetLastErrorDesc();alert(t+e)}}},OnClickPoint:function(t,e,r){console.log("OnClickPoint--","nPageNo=".concat(t,", x=").concat(e,", y=").concat(r));try{console.log("image2=",this.image),this.image?this.PDFCtrl.SignFile_Image(t,e,r,this.image):this.PDFCtrl.SignFile_KeyImage(t,e,r),this.$emit("cfca-point",t,e,r)}catch(o){var n=this.PDFCtrl.GetLastErrorDesc();alert(n+o)}},openDialog:function(t){var e=this;this.isIE&&(console.log(" openDialog---"),setTimeout((function(){e.OpenFile(t)}),350))},getUkeyImage:function(){var t=this.PDFCtrl.GetVersion();if(console.log(t),this.PDFCtrl.SetPKCS11Module("UyeePKCS11.Enterprise.dll|UlanPKCS11.Enterprise.dll|UlanPKCS11.dll|CFCA_UKEY_P11.dll"),"3.2.1.7"===t)return this.PDFCtrl.ReadKeyImage();alert("客户端签章控件[v=".concat(t,"],需要升级!"))},GetCertInfo:function(t){t=t||"SubjectDN";try{var e=this.PDFCtrl.GetSignCertInfo(t);if(!e){var r=this.PDFCtrl.GetLastErrorDesc();return void alert(r)}return e}catch(o){console.log("GetCertInfo :",o);var n=this.PDFCtrl.GetLastErrorDesc();alert(n+o)}},selectSignCert:function(t){try{var e="",r="CFCA ACS ",n=t||"";return console.log("证书序列号,精确匹配",n),this.PDFCtrl.SelectSignCert(e,r,"".concat(n),""),this.PDFCtrl.SetTimestampServer("http://210.74.41.195/timestamp"),!0}catch(o){return console.log("PDFCtrl.SelectSignCert ",o),alert("选择证书失败!".concat(o)),!1}},UploadFile:function(){try{var t=this.PDFCtrl.UploadCurrentFile(this.action);return t=JSON.parse(t),0===t.code?t.data.list[0]:""}catch(r){var e=this.PDFCtrl.GetLastErrorDesc();console.log("PDFCtrl 文件上传:",e),alert("PDFCtrl 文件上传:".concat(e).concat(r))}return!1},signFileKeyImage:function(t,e){var r=this.PDFCtrl.GetSignCertInfo("SerialNumber");console.log("-signFileKeyImage--certSN-".concat(r),t);try{var n="",o="";return t.height?(n=Number(t.X)+47,o=Number(t.height)-Number(t.Y)-47):(n=Number(t.X)+47,o=Number(t.Y)-47),console.log(" 参数 pageIndex = ".concat(t.pageIndex," x = ").concat(n," Y = ").concat(o)),console.log("signFileKeyImage: image=".concat(e)),e?this.PDFCtrl.SignFile_Image(t.pageIndex,n,o,e):this.PDFCtrl.SignFile_KeyImage(t.pageIndex,n,o),console.log("SignFile_KeyImage 成功"),!0}catch(a){var i=this.PDFCtrl.GetLastErrorDesc();return console.log("signFileKeyImage",a),alert("".concat(i," ").concat(a)),!1}},multipleSign7:function(t,e,r,n,o){for(var i=0;i<t.length;i++){var a=t[i];"number"===typeof o&&(a.Y-=o);try{var c="",s="";return a.height?(c=Number(a.X)+47,s=Number(a.height)-Number(a.Y)-47):(c=Number(a.X)+47,s=Number(a.Y)-47),this.PDFCtrl.AddSignaturePosition(a.pageIndex,c,s),!0}catch(f){var u=this.PDFCtrl.GetLastErrorDesc();console.log(" multipleSign7",f),alert(u+f)}}n?this.PDFCtrl.SignFile_Image(n):this.PDFCtrl.SignFile_KeyImage()},multipleSign5:function(t,e,r,n,o){console.log("multipleSign 循环签的begin ",r);var i=this.PDFCtrl.GetSignCertInfo("SerialNumber");console.log("serialNoBegin ",i);for(var a="",c=0;c<t.length;c++){var s=t[c];if(console.log("item=",s),"number"===typeof o&&(s.Y-=o),c>0){var u=this.PDFCtrl.GetSignCertInfo("SerialNumber");if(console.log("本次获得的序列号serialNoAgain:",u),i!==u)return alert("签署过程中,请不要更换ukey!"),!1;console.log("serialNo=",r),a=a&&this.signFileKeyImage(s,n),console.log("iterateSign 签章结果".concat(c,"-------"),a)}else console.log("第一个章,不用验签",c),a=this.signFileKeyImage(s,n),console.log("iterateSign 签章结果",a);if(!a)return!1}return console.log("multipleSign 签章的结果",a),a},multipleSign:function(t,e,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return n||this.PDFCtrl.SetPKCS11Module("UyeePKCS11.Enterprise.dll|UlanPKCS11.Enterprise.dll|UlanPKCS11.dll|CFCA_UKEY_P11.dll"),this.PDFCtrl.AddSignaturePosition?(console.log("新版插件"),this.multipleSign7(t,e,r,n,o)):this.multipleSign5(t,e,r,n,o)},GetSignatureInfo:function(){for(var t=this.PDFCtrl.GetSignatureCount(),e=[],r=0;r<t;r++){var n=this.PDFCtrl.VerifySignature(r),o=n.GetSignCertInfo("SerialNumber");e.push({SerialNumber:o})}return e}},watch:{pdfurl:function(t,e){this.inputPage=1,this.isIE&&t&&(this.PDFCtrl?(console.log("cfca watch pdfurl=="),e?e!==t&&(console.log("cfca watch oldval==",e),this.CloseFile(),setTimeout(this.OpenFile,100)):setTimeout(this.OpenFile,100)):console.log("cfca watch PDFCtrl 未加载 "))}}},p=l;r("ff64");function d(t,e,r,n,o,i,a,c){var s,u="function"===typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=r,u._compiled=!0),n&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),a?(s=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=s):o&&(s=c?function(){o.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:o),s)if(u.functional){u._injectStyles=s;var f=u.render;u.render=function(t,e){return s.call(e),f(t,e)}}else{var l=u.beforeCreate;u.beforeCreate=l?[].concat(l,s):[s]}return{exports:t,options:u}}var h=d(p,a,c,!1,null,null,null),g=h.exports,v=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"CryptoAgent-wrapper"},[t.isIE?[r("object",{ref:"CryptoAgent",attrs:{codebase:t.publicPath+t.codebase,classid:t.classid}})]:[r("embed",{ref:"CryptoAgent",staticStyle:{height:"0px",width:"0px"},attrs:{type:"application/npCryptoKit.Ultimate.x86"}})]],2)},y=[],m=(r("0d03"),{methods:{SignOnClick:function(){var t="";this.sourceData="".concat((new Date).getTime());try{var e=this.sourceData,r="",n="Attach",o="SHA-1";return r="Attach"===n?this.CryptoAgent.SignMsgPKCS7(e,o,!0):"Detach"===n?this.CryptoAgent.SignMsgPKCS7(e,o,!1):this.CryptoAgent.SignMsgPKCS1(e,o),r?(console.log("SignOnClick 签名结果:",r),r):(t=this.CryptoAgent.GetLastErrorDesc(),alert(t),"")}catch(i){console.log("SignOnClick error=",i),t=this.CryptoAgent.GetLastErrorDesc(),alert(t)}return""}}}),b={name:"ukey",mixins:[m],data:function(){var t="",e="";return"x86"===window.navigator.cpuClass?(t="ukey/Cryptokit/x86/CryptoKit.ToToDi.x86.cab",e="clsid:5635B01D-C661-4ACE-B997-EECFA63BD388"):(t="ukey/Cryptokit/x64/CryptoKit.ToToDi.x64.cab",e="clsid:63F9892E-D854-476E-A839-C8BA79254EC1"),{isIE:navigator.appName.indexOf("Internet")>=0||navigator.appVersion.indexOf("Trident")>=0,publicPath:"https://wsp.totodi.com/jz/",codebase:t,classid:e,sourceData:"",certType:"RSA",hashAlg:"SHA-1",singType:"Detach",CryptoAgent:"",random:"ttd"}},mounted:function(){this.onLoad()},methods:{onLoad:function(){return!this.CryptoAgent&&(!!this.isIE&&(this.CryptoAgent=this.$refs.CryptoAgent,this.CryptoAgent||alert("验签插件加载失败!"),void console.log("加载this.CryptoAgent ",this.CryptoAgent)))},SelectCertificateOnClick:function(t){this.isIE||alert("请使用IE浏览器!");try{var e="",r="CFCA ACS ",n=t;n||console.log(" Ukye, 无序列号筛选证书, serialNo 非必传 ");var o="",i="",a="Uyee CSP v6.0 (Enterprise)||CFCA FOR UKEY CSP v1.1.0";return o=this.CryptoAgent.SelectCertificate(e,r,n,a),o||(i=this.CryptoAgent.GetLastErrorDesc(),alert(i)),o}catch(s){console.log("SelectCertificateOnClick catch",s);var c=this.CryptoAgent.GetLastErrorDesc();return alert("".concat(c,"/error")),!1}},GetSignCertInfoUkey:function(t){t=t||"SubjectDN",console.log("-Ukey-GetSignCertInfoUkey:InfoTypeID ",t);try{var e=this.CryptoAgent.GetSignCertInfo(t);if(!e){var r=this.CryptoAgent.GetLastErrorDesc();return void alert(r)}return e}catch(o){console.log("GetSignCertInfoUkey-Ukey: ",o);var n=this.CryptoAgent.GetLastErrorDesc();alert(n)}}}},x=b,C=(r("4224"),d(x,v,y,!1,null,"22a309ec",null)),S=C.exports,w=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"CryptoAgent-wrapper"},[t.isIE?[r("object",{ref:"CryptoAgent",attrs:{codebase:t.publicPath+t.codebase,classid:t.classid}})]:[r("embed",{ref:"CryptoAgent",staticStyle:{height:"0px",width:"0px"},attrs:{type:"application/npCryptoKit.Paperless.x86"}})]],2)},P=[],E={name:"wzh-sing",mixins:[m],data:function(){var t="",e="";return"x86"===window.navigator.cpuClass?(t="wzh/CryptoKit.Paperless.x86.cab",e="clsid:B64B695B-348D-400D-8D58-9AAB1DA5851A"):(t="wzh/CryptoKit.Paperless.x64.cab",e="clsid:8BF7E683-630E-4B59-9E61-C996B671EBDF"),{isIE:navigator.appName.indexOf("Internet")>=0||navigator.appVersion.indexOf("Trident")>=0,publicPath:"https://wsp.totodi.com/jz/",codebase:t,classid:e,sourceData:"",certType:"RSA",CryptoAgent:null}},props:{api:{type:Object,required:!0}},mounted:function(){this.onLoad()},methods:{onLoad:function(){return!this.CryptoAgent&&(!!this.isIE&&(this.CryptoAgent=this.$refs.CryptoAgent,this.CryptoAgent||alert("验签插件加载失败!"),void console.log("加载this.CryptoAgent ",this.CryptoAgent)))},getUkeyImage:function(){var t="";try{t=this.CryptoAgent.GetSealImage("CFCA_UKEY_P11.dll"),console.log("UyeePKCS11",t)}catch(e){console.log("error",e)}if(!t)try{t=this.CryptoAgent.GetSealImage("UyeePKCS11.Enterprise.dll"),console.log("CFCA_UKEY_P11",t)}catch(e){console.log("error",e)}if(!t)try{t=this.CryptoAgent.GetSealImage("UlanPKCS11.Enterprise.dll"),console.log("UlanPKCS11",t)}catch(e){console.log("error",e)}if(!t)try{t=this.CryptoAgent.GetSealImage("UlanPKCS11.dll"),console.log("UlanPKCS11",t)}catch(e){console.log("error",e)}return t||alert("读取Ukey印章图片失败!"),t},GetCertInfoOnClick:function(t){t=t||"SubjectDN",console.log("GetCertInfoOnClick:InfoTypeID ",t);try{var e=this.CryptoAgent.GetSignCertInfo(t);if(!e){var r=this.CryptoAgent.GetLastErrorDesc();return alert(r),!1}return e}catch(o){console.log("GetCertInfoOnClick-WzhSign: ",o);var n=this.CryptoAgent.GetLastErrorDesc();alert(n+o)}},SelectCertificateOnClick:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.isIE||alert("请使用IE浏览器!");try{var e="",r="CFCA ACS ",n=t,o="Uyee CSP v6.0 (Enterprise)||CFCA FOR UKEY CSP v1.1.0",i="";if(console.log("无纸化 选证书 selectSignCert, serialNo(非传)=",t),i=this.CryptoAgent.SelectCertificate(e,r,n,o),!i){var a=this.CryptoAgent.GetLastErrorDesc();return console.log("wzh SelectCertResult 不存在",a),alert(a),!1}return console.log("wzh SelectCertResult",i),!0}catch(s){var c=this.CryptoAgent.GetLastErrorDesc();return console.log("wzh SelectCertResult catch error: ",c),alert(c+s),!1}},getHashValue:function(t,e,r){var n=this.CryptoAgent.GetSignCertInfo("CertContent");return this.$emit("getImg",r),n?e.bucketName&&e.objectKey?this.api.getSignHash({jsonData:{source:"TTDFUND",timestamp:(new Date).getTime(),msgBody:{attachfile:"oss:".concat(e.bucketName,":").concat(e.objectKey),reason:"",location:"",signImgfileName:"",signImgfile:r,pageNo:t.pageIndex,pageX:Number(t.X),pageY:Number(t.Y),certBase64:n}}}):(alert("文件对象不合规!"),Promise.reject()):(alert("获取证书公钥失败!"),Promise.reject())},getSignHashValue:function(t,e,r){var n=this;return u(regeneratorRuntime.mark((function o(){var i,a,c,s,u,f,l;return regeneratorRuntime.wrap((function(o){while(1)switch(o.prev=o.next){case 0:return o.prev=0,i="",o.next=4,n.getHashValue(t,e,r);case 4:if(a=o.sent,c=a.code,s=a.data,0===c&&"200"==="".concat(s.bean.code)&&(i=s.bean.pdfHash),i){o.next=11;break}return alert("CFCA计算HASH值失败!( ".concat(s.bean.msg||"",")")),o.abrupt("return",!1);case 11:if(u=n.CryptoAgent.SignHashMsgPKCS7Detached(i,"SHA-1"),u){o.next=16;break}return f=n.CryptoAgent.GetLastErrorDesc(),alert(f),o.abrupt("return",!1);case 16:return o.abrupt("return",{signature:u,id:s.bean.id});case 19:o.prev=19,o.t0=o["catch"](0),l=n.CryptoAgent.GetLastErrorDesc(),console.log("getSignHashValue",o.t0),alert(l+o.t0);case 24:case"end":return o.stop()}}),o,null,[[0,19]])})))()},signFileKeyImage:function(t,e,r){var n=this;return u(regeneratorRuntime.mark((function o(){var i,a,c,s,u;return regeneratorRuntime.wrap((function(o){while(1)switch(o.prev=o.next){case 0:return o.next=2,n.getSignHashValue(t,e,r);case 2:if(i=o.sent,a="计算Hash 失败!",!i){o.next=17;break}return o.next=7,n.api.mergeHash({jsonData:{source:"TTDFUND",timestamp:(new Date).getTime(),msgBody:{sigString:i.signature,id:i.id}}});case 7:if(c=o.sent,s=c.data,u=c.code,0!==u){o.next=16;break}if(!s.bean.url){o.next=13;break}return o.abrupt("return",s.bean);case 13:a=s.bean.msg,o.next=17;break;case 16:a=s.msg;case 17:return n.$message.error(a||"error计算Hash失败!"),o.abrupt("return",!1);case 19:case"end":return o.stop()}}),o)})))()},multipleSign:function(t,e,r,n){var o=arguments,i=this;return u(regeneratorRuntime.mark((function r(){var a,c,s,u,l,p;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:if(a=o.length>4&&void 0!==o[4]?o[4]:18,c=i.CryptoAgent.GetSignCertInfo("SerialNumber"),s="",n){r.next=6;break}return alert("印章图片缺失!"),r.abrupt("return",!1);case 6:u=0;case 7:if(!(u<t.length)){r.next=29;break}if(l=f(t[u]),"number"===typeof a&&(l.Y-=a),!(u>0)){r.next=22;break}if(p=i.CryptoAgent.GetSignCertInfo("SerialNumber"),c===p){r.next=15;break}return alert("签署过程中,请不要更换ukey!"),r.abrupt("return",!1);case 15:if(!s){r.next=19;break}return r.next=18,i.signFileKeyImage(l,s,n);case 18:s=r.sent;case 19:console.log("iterateSign 签章结果".concat(u,"---result----"),s),r.next=26;break;case 22:return r.next=24,i.signFileKeyImage(l,e,n);case 24:s=r.sent,console.log("第一个章 签章结果",s);case 26:u++,r.next=7;break;case 29:return console.log("multipleSign 签章的结果",s),r.abrupt("return",s);case 31:case"end":return r.stop()}}),r)})))()}}},D=E,F=(r("6187"),d(D,w,P,!1,null,"cac4c7fc",null)),A=F.exports,I={CfcaPdf:g,Ukey:S,WzhSign:A};e["default"]=I},fc6a:function(t,e,r){var n=r("44ad"),o=r("1d80");t.exports=function(t){return n(o(t))}},fdbf:function(t,e,r){var n=r("4930");t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},fea9:function(t,e,r){var n=r("da84");t.exports=n.Promise},ff64:function(t,e,r){"use strict";r("3a50")}})}));
|
|
1
|
+
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["ttd-common"]=t():e["ttd-common"]=t()})("undefined"!==typeof self?self:this,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s="fb15")}({"1be4":function(e,t,r){var n=r("8b98");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=r("499e").default;o("07ae2840",n,!0,{sourceMap:!1,shadowMode:!1})},"222a":function(e,t,r){"use strict";r("c266")},"24fb":function(e,t,r){"use strict";function n(e,t){var r=e[1]||"",n=e[3];if(!n)return r;if(t&&"function"===typeof btoa){var i=o(n),s=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(e," */")}));return[r].concat(s).concat([i]).join("\n")}return[r].join("\n")}function o(e){var t=btoa(unescape(encodeURIComponent(JSON.stringify(e)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(t);return"/*# ".concat(r," */")}e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=n(t,e);return t[2]?"@media ".concat(t[2]," {").concat(r,"}"):r})).join("")},t.i=function(e,r,n){"string"===typeof e&&(e=[[null,e,""]]);var o={};if(n)for(var i=0;i<this.length;i++){var s=this[i][0];null!=s&&(o[s]=!0)}for(var a=0;a<e.length;a++){var c=[].concat(e[a]);n&&o[c[0]]||(r&&(c[2]?c[2]="".concat(r," and ").concat(c[2]):c[2]=r),t.push(c))}},t}},"3a50":function(e,t,r){var n=r("6780");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=r("499e").default;o("271332fa",n,!0,{sourceMap:!1,shadowMode:!1})},"3ee9":function(e,t,r){var n=r("24fb");t=n(!1),t.push([e.i,".CryptoAgent-wrapper[data-v-22a309ec]{height:0;width:0;position:absoute;left:-5000px}",""]),e.exports=t},4224:function(e,t,r){"use strict";r("8ff8")},"499e":function(e,t,r){"use strict";function n(e,t){for(var r=[],n={},o=0;o<t.length;o++){var i=t[o],s=i[0],a=i[1],c=i[2],l=i[3],p={id:e+":"+o,css:a,media:c,sourceMap:l};n[s]?n[s].parts.push(p):r.push(n[s]={id:s,parts:[p]})}return r}r.r(t),r.d(t,"default",(function(){return d}));var o="undefined"!==typeof document;if("undefined"!==typeof DEBUG&&DEBUG&&!o)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var i={},s=o&&(document.head||document.getElementsByTagName("head")[0]),a=null,c=0,l=!1,p=function(){},g=null,f="data-vue-ssr-id",u="undefined"!==typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function d(e,t,r,o){l=r,g=o||{};var s=n(e,t);return h(s),function(t){for(var r=[],o=0;o<s.length;o++){var a=s[o],c=i[a.id];c.refs--,r.push(c)}t?(s=n(e,t),h(s)):s=[];for(o=0;o<r.length;o++){c=r[o];if(0===c.refs){for(var l=0;l<c.parts.length;l++)c.parts[l]();delete i[c.id]}}}}function h(e){for(var t=0;t<e.length;t++){var r=e[t],n=i[r.id];if(n){n.refs++;for(var o=0;o<n.parts.length;o++)n.parts[o](r.parts[o]);for(;o<r.parts.length;o++)n.parts.push(m(r.parts[o]));n.parts.length>r.parts.length&&(n.parts.length=r.parts.length)}else{var s=[];for(o=0;o<r.parts.length;o++)s.push(m(r.parts[o]));i[r.id]={id:r.id,refs:1,parts:s}}}}function C(){var e=document.createElement("style");return e.type="text/css",s.appendChild(e),e}function m(e){var t,r,n=document.querySelector("style["+f+'~="'+e.id+'"]');if(n){if(l)return p;n.parentNode.removeChild(n)}if(u){var o=c++;n=a||(a=C()),t=S.bind(null,n,o,!1),r=S.bind(null,n,o,!0)}else n=C(),t=v.bind(null,n),r=function(){n.parentNode.removeChild(n)};return t(e),function(n){if(n){if(n.css===e.css&&n.media===e.media&&n.sourceMap===e.sourceMap)return;t(e=n)}else r()}}var y=function(){var e=[];return function(t,r){return e[t]=r,e.filter(Boolean).join("\n")}}();function S(e,t,r,n){var o=r?"":n.css;if(e.styleSheet)e.styleSheet.cssText=y(t,o);else{var i=document.createTextNode(o),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(i,s[t]):e.appendChild(i)}}function v(e,t){var r=t.css,n=t.media,o=t.sourceMap;if(n&&e.setAttribute("media",n),g.ssrId&&e.setAttribute(f,t.id),o&&(r+="\n/*# sourceURL="+o.sources[0]+" */",r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),e.styleSheet)e.styleSheet.cssText=r;else{while(e.firstChild)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}},6780:function(e,t,r){var n=r("24fb");t=n(!1),t.push([e.i,".cfca-pdf{width:100%;min-height:100%;position:relative;margin-top:-1px}.cfca-pdf .fontSize1{font-size:65%}.cfca-pdf .fontSize1,.cfca-pdf .fontSize2{font-family:Verdana,Geneva,Arial,Helvetica,sans-serif}.cfca-pdf .fontSize2{font-size:70%}.cfca-pdf .fontSize3{font-size:75%;font-family:Verdana,Geneva,Arial,Helvetica,sans-serif}.cfca-pdf .fakehlink{cursor:pointer;text-decoration:underline;font-weight:400;line-height:26px;color:#06c}.cfca-pdf .plaintext{line-height:28px}.cfca-pdf .blankline{height:5px}.cfca-pdf .remaining{width:100%;position:absolute;z-index:1;top:72px;bottom:0}.cfca-pdf .cfca-page .page-num{display:inline-block;width:auto}.cfca-pdf .cfca-page .page-num input{display:inline-block;width:48px;height:32px;border:1px solid #ccc;border-radius:2px;margin:0 5px}.cfca-pdf .cfca-pdf-wrapper{position:relative;width:560px;margin:0 auto;box-shadow:0 5px 10px 0 rgba(0,0,0,.05)}.cfca-pdf .cfca-pdf-wrapper .cfca-left,.cfca-pdf .cfca-pdf-wrapper .cfca-right{color:#dcdcdc;position:absolute;width:73px;height:130px;text-align:center;font-size:33px;cursor:pointer;border-radius:4px;top:50%;left:-72px}.cfca-pdf .cfca-pdf-wrapper .disabled{cursor:not-allowed}.cfca-pdf .cfca-pdf-wrapper .cfca-right{left:auto;right:-72px}.cfca-pdf .cfca-pdf-wrapper .cfca-content{display:flex;flex-direction:column;justify-content:space-between;position:relative;background:#fff;border:1px solid #d4d4d4;border-radius:0;padding:0;box-sizing:border-box;overflow:hidden}.cfca-pdf .cfca-pdf-wrapper .cfca-content .cfca-object{box-sizing:border-box;position:relative}.cfca-pdf .cfca-pdf-wrapper .cfca-content .cfca-object .obj-wrapper{height:758px}.cfca-pdf .cfca-pdf-wrapper .cfca-content .cfca-page{position:relative;height:48px;line-height:48px;box-sizing:border-box;overflow:hidden;padding:0 20px;text-align:left;font-size:14px;background:#fff;color:#666;border-bottom:1px solid #d4d4d4}.cfca-pdf .cfca-pdf-wrapper .cfca-content .cfca-page .cfca-title h2{max-width:340px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-size:18px;color:#222;line-height:48px;font-weight:400;margin:0;padding:0}.cfca-pdf .cfca-pdf-wrapper .cfca-content .cfca-page .cfca-title .sub-title{font-size:12px;color:#999;line-height:17px}.cfca-pdf .cfca-pdf-wrapper .cfca-content .cfca-page .fr{position:absolute;right:20px;top:0;max-width:180px;white-space:nowrap;text-overflow:ellipsis}.cfca-pdf .cfca-pdf-wrapper .cfca-content .cfca-page .di{margin-left:10px}.cfca-pdf .cfca-pdf-wrapper .cfca-content .cfca-control{line-height:64px;box-sizing:border-box;overflow:hidden;padding:0 20px;text-align:right;font-size:14px;background:#f5f5f5;color:#666}",""]),e.exports=t},"721c":function(e,t,r){var n=r("24fb");t=n(!1),t.push([e.i,".CryptoAgent-wrapper[data-v-0e3d8284]{height:0;width:0;position:absolute;left:-5000px}",""]),e.exports=t},"75da":function(e,t,r){"use strict";r("1be4")},8875:function(e,t,r){var n,o,i;(function(r,s){o=[],n=s,i="function"===typeof n?n.apply(t,o):n,void 0===i||(e.exports=i)})("undefined"!==typeof self&&self,(function(){function e(){var t=Object.getOwnPropertyDescriptor(document,"currentScript");if(!t&&"currentScript"in document&&document.currentScript)return document.currentScript;if(t&&t.get!==e&&document.currentScript)return document.currentScript;try{throw new Error}catch(u){var r,n,o,i=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,s=/@([^@]*):(\d+):(\d+)\s*$/gi,a=i.exec(u.stack)||s.exec(u.stack),c=a&&a[1]||!1,l=a&&a[2]||!1,p=document.location.href.replace(document.location.hash,""),g=document.getElementsByTagName("script");c===p&&(r=document.documentElement.outerHTML,n=new RegExp("(?:[^\\n]+?\\n){0,"+(l-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),o=r.replace(n,"$1").trim());for(var f=0;f<g.length;f++){if("interactive"===g[f].readyState)return g[f];if(g[f].src===c)return g[f];if(c===p&&g[f].innerHTML&&g[f].innerHTML.trim()===o)return g[f]}return null}}return e}))},"8b98":function(e,t,r){var n=r("24fb");t=n(!1),t.push([e.i,".CryptoAgent-wrapper[data-v-7a77408f]{height:0;width:0;position:absolute;left:-5000px}",""]),e.exports=t},"8ff8":function(e,t,r){var n=r("3ee9");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=r("499e").default;o("42cf06ab",n,!0,{sourceMap:!1,shadowMode:!1})},c266:function(e,t,r){var n=r("721c");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=r("499e").default;o("f835a368",n,!0,{sourceMap:!1,shadowMode:!1})},fb15:function(e,t,r){"use strict";if(r.r(t),"undefined"!==typeof window){var n=window.document.currentScript,o=r("8875");n=o(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:o});var i=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);i&&(r.p=i[1])}var s=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"cfca-pdf"},[e.isIE?[r("div",{staticClass:"cfca-pdf-wrapper",style:{visibility:e.visible}},[r("div",{class:{"cfca-left":!0,active:"left"===e.active,disabled:e.pageNo<=1},on:{click:function(t){return e.GoToPrevPage()}}},[r("span",{staticClass:"el-icon-arrow-left"})]),r("div",{staticClass:"cfca-content"},[r("div",{staticClass:"cfca-page"},[r("div",{staticClass:"fl cfca-title"},[r("h2",[e._v(e._s(e.title))])]),r("div",{staticClass:"fr"},[e._v(" "+e._s(e.pageNo)+"/"+e._s(e.pageCount)+" "),r("span",{staticClass:"di"},[e._v("第")]),r("el-input",{staticClass:"page-num",attrs:{size:"mini"},on:{change:e.GoToPage},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.GoToPage(t)}},model:{value:e.inputPage,callback:function(t){e.inputPage=t},expression:"inputPage"}}),e._v("页 ")],1)]),r("div",{ref:"PDFCtrlPlaceHolder",staticClass:"cfca-object"},[r("div",{staticClass:"obj-wrapper",on:{dragenter:e.onDragEnter,dragover:e.onDragOver,drop:e.onDrop}},[this.idstr?[r("object",{ref:"pdfCtrl",staticClass:"PDFCtrlObject",staticStyle:{position:"relative","z-Index":"1"},attrs:{id:"PDFCtrl"+this.idstr,tabindex:0,codebase:e.publicPath+e.codebase,classid:"clsid:6F60FE31-F827-4295-8AC4-775EF7478A6A",width:"100%",height:"100%"}},[r("param",{attrs:{name:"wmode",value:"transparent"}}),r("param",{attrs:{name:"showToolbar",value:"false"}})])]:[r("object",{ref:"pdfCtrl",staticClass:"PDFCtrlObject",staticStyle:{position:"relative","z-Index":"1"},attrs:{tabindex:0,codebase:e.publicPath+e.codebase,classid:"clsid:6F60FE31-F827-4295-8AC4-775EF7478A6A",width:"100%",height:"100%"}},[r("param",{attrs:{name:"wmode",value:"transparent"}}),r("param",{attrs:{name:"showToolbar",value:"false"}})])]],2)]),r("div",{staticClass:"cfca-control"},[e._t("default")],2)]),r("div",{class:{"cfca-right":!0,active:"right"===e.active,disabled:e.pageNo>=e.pageCount},on:{click:function(t){return e.GoToNextPage()}}},[r("span",{staticClass:"el-icon-arrow-right"})])])]:[r("div",{staticClass:"red",staticStyle:{height:"350px",padding:"20px",position:"relative","margin-bottom":"20px"}},[e._v(" 提示:当前浏览器不支持控件预览,请切换IE浏览器进行查看 "),r("div",{staticClass:"tc",staticStyle:{position:"absolute",bottom:"0",left:"0",right:"0"}},[e._t("default")],2)])]],2)},a=[];const c=e=>{let t={};return e&&(t="string"===typeof e&&/^{/.test(e)?JSON.parse(e):e),t.url&&(t.url=decodeURI(t.url)),t};var l={name:"cfca-pdf",props:{action:{type:String,default:""},pdfurl:{type:String,default:""},visible:{type:[String,Boolean],default:"visible"},title:{type:String,default:""},image:{type:String,default:""},idstr:{type:[String,Number]}},data(){let e="";return e="x86"===window.navigator.cpuClass?"TrustSignPDFPlugin.ttd.x86.cab#version=3,2,1,4":"TrustSignPDFPlugin.ttd.x64.cab#version=3,2,1,4",{publicPath:"https://wsp.totodi.com/cfca_plug/",PDFCtrl:"",codebase:e,active:"",inputPage:"",isIE:navigator.appName.indexOf("Internet")>=0||navigator.appVersion.indexOf("Trident")>=0,pageNo:1,pageCount:1}},beforeDestroy(){console.log("--cfca-pdf-beforeDestroy")},async beforeRouteLeave(e,t,r){console.log("-cfca--beforeRouteLeave---"),await this.CloseFile(),r()},mounted(){this.isIE&&(this.OnLoad(),console.log("cfca mounted ="+this.pdfurl),this.pdfurl&&setTimeout(this.OpenFile,100))},methods:{OnLoad(){return!this.PDFCtrl&&(!!this.isIE&&(this.PDFCtrl=this.$refs.pdfCtrl,this.PDFCtrl||(console.log("使用id 加载this.PDFCtrl "),this.PDFCtrl=window["PDFCtrl"+this.idstr]),void(window.OnClickPoint=this.OnClickPoint)))},OpenFile(e){if(e=e||this.pdfurl,!e)return alert("未发现pdf资源路径!"),!1;try{console.log("OpenFile--src--"+e),this.PDFCtrl.OpenWebFile(encodeURI(e)),this.PDFCtrl=this.$refs.pdfCtrl,setTimeout(()=>{this.PDFCtrl.ZoomTo(-1),this.GetPageNo()},100)}catch(t){if(this.PDFCtrl.GetLastErrorDesc){const e=this.PDFCtrl.GetLastErrorDesc();alert(e+t)}}},sleep(e){return new Promise(t=>setTimeout(t,e))},CloseFile(){try{this.pdfurl&&this.PDFCtrl&&(console.log("CloseFile---"),this.PDFCtrl.CloseFile())}catch(e){if(console.log("CloseFile error--",e),this.PDFCtrl&&this.PDFCtrl.GetLastErrorDesc){const t=this.PDFCtrl.GetLastErrorDesc();alert(t+e)}}},onDragEnter(e){this.$emit("cfcaDragEnter",e)},onDragOver(e){e.preventDefault(),this.$emit("cfcaDragOver",e)},onDrop(e){this.$emit("cfcaDrop",e)},GoToFirstPage(){try{this.PDFCtrl.GoToFirstPage()}catch(e){if(this.PDFCtrl&&this.PDFCtrl.GetLastErrorDesc){const t=this.PDFCtrl.GetLastErrorDesc();alert(t+e)}}},GoToLastPage(){try{this.PDFCtrl.GoToLastPage()}catch(e){if(this.PDFCtrl&&this.PDFCtrl.GetLastErrorDesc){const t=this.PDFCtrl.GetLastErrorDesc();alert(t+e)}}},GoToPrevPage(){this.active="left";const e=this;try{this.PDFCtrl.GoToPrevPage(),this.inputPage="",setTimeout(()=>{e.GetPageNo()},100)}catch(t){if(this.PDFCtrl&&this.PDFCtrl.GetLastErrorDesc){const e=this.PDFCtrl.GetLastErrorDesc();alert(e+t)}}},GoToNextPage(){this.active="right";const e=this;try{this.PDFCtrl.GoToNextPage(),this.inputPage="",setTimeout(()=>{e.GetPageNo()},100)}catch(t){if(this.PDFCtrl&&this.PDFCtrl.GetLastErrorDesc){const e=this.PDFCtrl.GetLastErrorDesc();alert(e+t)}}},GetPageNo(){try{this.pageNo=this.PDFCtrl.GetCurrentPageNo(),this.pageCount=this.PDFCtrl.GetPageCount()}catch(e){if(this.PDFCtrl&&this.PDFCtrl.GetLastErrorDesc){const t=this.PDFCtrl.GetLastErrorDesc();alert(t+e)}}},GoToPage(){const e=this;try{const t=this.inputPage.replace(/\D/,"");if(""===t)return void alert("请输入页码!");this.PDFCtrl.GoToPage(t),setTimeout(()=>{e.GetPageNo()},100)}catch(t){if(this.PDFCtrl&&this.PDFCtrl.GetLastErrorDesc){const e=this.PDFCtrl.GetLastErrorDesc();alert(e+t)}}},ZoomTo(e){try{this.PDFCtrl.ZoomTo(e)}catch(t){if(this.PDFCtrl&&this.PDFCtrl.GetLastErrorDesc){const e=this.PDFCtrl.GetLastErrorDesc();alert(e+t)}}},ZoomOut(){try{this.PDFCtrl.ZoomOut()}catch(e){if(this.PDFCtrl&&this.PDFCtrl.GetLastErrorDesc){const t=this.PDFCtrl.GetLastErrorDesc();alert(t+e)}}},ZoomIn(){try{this.PDFCtrl.ZoomIn()}catch(e){if(this.PDFCtrl&&this.PDFCtrl.GetLastErrorDesc){const t=this.PDFCtrl.GetLastErrorDesc();alert(t+e)}}},OnClickPoint(e,t,r){console.log("OnClickPoint--",`nPageNo=${e}, x=${t}, y=${r}`);try{console.log("image2=",this.image),this.image?this.PDFCtrl.SignFile_Image(e,t,r,this.image):this.PDFCtrl.SignFile_KeyImage(e,t,r),this.$emit("cfca-point",e,t,r)}catch(n){const e=this.PDFCtrl.GetLastErrorDesc();alert(e+n)}},openDialog(e){this.isIE&&(console.log(" openDialog---"),setTimeout(()=>{this.OpenFile(e)},350))},getUkeyImage(){const e=this.PDFCtrl.GetVersion();if(console.log(e),this.PDFCtrl.SetPKCS11Module("UyeePKCS11.Enterprise.dll|UlanPKCS11.Enterprise.dll|UlanPKCS11.dll|CFCA_UKEY_P11.dll"),"3.2.1.7"===e)return this.PDFCtrl.ReadKeyImage();alert(`客户端签章控件[v=${e}],需要升级!`)},GetCertInfo(e){e=e||"SubjectDN";try{const t=this.PDFCtrl.GetSignCertInfo(e);if(!t){const e=this.PDFCtrl.GetLastErrorDesc();return void alert(e)}return t}catch(t){console.log("GetCertInfo :",t);const e=this.PDFCtrl.GetLastErrorDesc();alert(e+t)}},selectSignCert(e){try{const t="",r="CFCA ACS ",n=e||"";return console.log("证书序列号,精确匹配",n),this.PDFCtrl.SelectSignCert(t,r,""+n,""),this.PDFCtrl.SetTimestampServer("http://210.74.41.195/timestamp"),!0}catch(t){return console.log("PDFCtrl.SelectSignCert ",t),alert("选择证书失败!"+t),!1}},UploadFile(){try{let e=this.PDFCtrl.UploadCurrentFile(this.action);return e=JSON.parse(e),0===e.code?e.data.list[0]:""}catch(e){const t=this.PDFCtrl.GetLastErrorDesc();console.log("PDFCtrl 文件上传:",t),alert(`PDFCtrl 文件上传:${t}${e}`)}return!1},signFileKeyImage(e,t){const r=this.PDFCtrl.GetSignCertInfo("SerialNumber");console.log("-signFileKeyImage--certSN-"+r,e);try{let r="",n="";return e.height?(r=Number(e.X)+47,n=Number(e.height)-Number(e.Y)-47):(r=Number(e.X)+47,n=Number(e.Y)-47),console.log(` 参数 pageIndex = ${e.pageIndex} x = ${r} Y = ${n}`),console.log("signFileKeyImage: image="+t),t?this.PDFCtrl.SignFile_Image(e.pageIndex,r,n,t):this.PDFCtrl.SignFile_KeyImage(e.pageIndex,r,n),console.log("SignFile_KeyImage 成功"),!0}catch(n){const e=this.PDFCtrl.GetLastErrorDesc();return console.log("signFileKeyImage",n),alert(`${e} ${n}`),!1}},multipleSign7(e,t,r,n,o){for(let s=0;s<e.length;s++){const t=e[s];"number"===typeof o&&(t.Y-=o);try{let e="",r="";return t.height?(e=Number(t.X)+47,r=Number(t.height)-Number(t.Y)-47):(e=Number(t.X)+47,r=Number(t.Y)-47),this.PDFCtrl.AddSignaturePosition(t.pageIndex,e,r),!0}catch(i){const e=this.PDFCtrl.GetLastErrorDesc();console.log(" multipleSign7",i),alert(e+i)}}n?this.PDFCtrl.SignFile_Image(n):this.PDFCtrl.SignFile_KeyImage()},multipleSign5(e,t,r,n,o){console.log("multipleSign 循环签的begin ",r);const i=this.PDFCtrl.GetSignCertInfo("SerialNumber");console.log("serialNoBegin ",i);let s="";for(let a=0;a<e.length;a++){const t=e[a];if(console.log("item=",t),"number"===typeof o&&(t.Y-=o),a>0){const e=this.PDFCtrl.GetSignCertInfo("SerialNumber");if(console.log("本次获得的序列号serialNoAgain:",e),i!==e)return alert("签署过程中,请不要更换ukey!"),!1;console.log("serialNo=",r),s=s&&this.signFileKeyImage(t,n),console.log(`iterateSign 签章结果${a}-------`,s)}else console.log("第一个章,不用验签",a),s=this.signFileKeyImage(t,n),console.log("iterateSign 签章结果",s);if(!s)return!1}return console.log("multipleSign 签章的结果",s),s},multipleSign(e,t,r,n,o=0){return n||this.PDFCtrl.SetPKCS11Module("UyeePKCS11.Enterprise.dll|UlanPKCS11.Enterprise.dll|UlanPKCS11.dll|CFCA_UKEY_P11.dll"),this.PDFCtrl.AddSignaturePosition?(console.log("新版插件"),this.multipleSign7(e,t,r,n,o)):this.multipleSign5(e,t,r,n,o)},GetSignatureInfo(){const e=this.PDFCtrl.GetSignatureCount(),t=[];for(let r=0;r<e;r++){const e=this.PDFCtrl.VerifySignature(r),n=e.GetSignCertInfo("SerialNumber");t.push({SerialNumber:n})}return t}},watch:{pdfurl(e,t){this.inputPage=1,this.isIE&&e&&(this.PDFCtrl?(console.log("cfca watch pdfurl=="),t?t!==e&&(console.log("cfca watch oldval==",t),this.CloseFile(),setTimeout(this.OpenFile,100)):setTimeout(this.OpenFile,100)):console.log("cfca watch PDFCtrl 未加载 "))}}},p=l;r("ff64");function g(e,t,r,n,o,i,s,a){var c,l="function"===typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=r,l._compiled=!0),n&&(l.functional=!0),i&&(l._scopeId="data-v-"+i),s?(c=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},l._ssrRegister=c):o&&(c=a?function(){o.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:o),c)if(l.functional){l._injectStyles=c;var p=l.render;l.render=function(e,t){return c.call(t),p(e,t)}}else{var g=l.beforeCreate;l.beforeCreate=g?[].concat(g,c):[c]}return{exports:e,options:l}}var f=g(p,s,a,!1,null,null,null),u=f.exports,d=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"CryptoAgent-wrapper"},[e.isIE?[r("object",{ref:"CryptoAgent",attrs:{codebase:e.publicPath+e.codebase,classid:e.classid}})]:[r("embed",{ref:"CryptoAgent",staticStyle:{height:"0px",width:"0px"},attrs:{type:"application/npCryptoKit.Ultimate.x86"}})]],2)},h=[],C={methods:{SignOnClick(){let e="";this.sourceData=""+(new Date).getTime();try{const t=this.sourceData;let r="";const n="Attach",o="SHA-1";return r="Attach"===n?this.CryptoAgent.SignMsgPKCS7(t,o,!0):"Detach"===n?this.CryptoAgent.SignMsgPKCS7(t,o,!1):this.CryptoAgent.SignMsgPKCS1(t,o),r?(console.log("SignOnClick 签名结果:",r),r):(e=this.CryptoAgent.GetLastErrorDesc(),alert(e),"")}catch(t){console.log("SignOnClick error=",t),e=this.CryptoAgent.GetLastErrorDesc(),alert(e)}return""}}},m={name:"ukey",mixins:[C],data(){let e="",t="";return"x86"===window.navigator.cpuClass?(e="ukey/Cryptokit/x86/CryptoKit.ToToDi.x86.cab",t="clsid:5635B01D-C661-4ACE-B997-EECFA63BD388"):(e="ukey/Cryptokit/x64/CryptoKit.ToToDi.x64.cab",t="clsid:63F9892E-D854-476E-A839-C8BA79254EC1"),{isIE:navigator.appName.indexOf("Internet")>=0||navigator.appVersion.indexOf("Trident")>=0,publicPath:"https://wsp.totodi.com/jz/",codebase:e,classid:t,sourceData:"",certType:"RSA",hashAlg:"SHA-1",singType:"Detach",CryptoAgent:"",random:"ttd"}},mounted(){this.onLoad()},methods:{onLoad(){return!this.CryptoAgent&&(!!this.isIE&&(this.CryptoAgent=this.$refs.CryptoAgent,this.CryptoAgent||alert("验签插件加载失败!"),void console.log("加载this.CryptoAgent ",this.CryptoAgent)))},SelectCertificateOnClick(e){this.isIE||alert("请使用IE浏览器!");try{const t="",r="CFCA ACS ",n=e;n||console.log(" Ukye, 无序列号筛选证书, serialNo 非必传 ");let o="",i="";const s="Uyee CSP v6.0 (Enterprise)||CFCA FOR UKEY CSP v1.1.0";return o=this.CryptoAgent.SelectCertificate(t,r,n,s),o||(i=this.CryptoAgent.GetLastErrorDesc(),alert(i)),o}catch(t){console.log("SelectCertificateOnClick catch",t);const e=this.CryptoAgent.GetLastErrorDesc();return alert(e+"/error"),!1}},GetSignCertInfoUkey(e){e=e||"SubjectDN",console.log("-Ukey-GetSignCertInfoUkey:InfoTypeID ",e);try{const t=this.CryptoAgent.GetSignCertInfo(e);if(!t){const e=this.CryptoAgent.GetLastErrorDesc();return void alert(e)}return t}catch(t){console.log("GetSignCertInfoUkey-Ukey: ",t);const e=this.CryptoAgent.GetLastErrorDesc();alert(e)}}}},y=m,S=(r("4224"),g(y,d,h,!1,null,"22a309ec",null)),v=S.exports,b=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"CryptoAgent-wrapper"},[r("object",{ref:"CryptoAgent",attrs:{codebase:e.publicPath+e.codebase,classid:e.classid}})])},D=[],P={name:"wzh-sing",data(){let e="",t="";return"x86"===window.navigator.cpuClass?(e="wzh/CryptoKit.Paperless.x86.cab",t="clsid:B64B695B-348D-400D-8D58-9AAB1DA5851A"):(e="wzh/CryptoKit.Paperless.x64.cab",t="clsid:8BF7E683-630E-4B59-9E61-C996B671EBDF"),{isIE:navigator.appName.indexOf("Internet")>=0||navigator.appVersion.indexOf("Trident")>=0,publicPath:"https://wsp.totodi.com/jz/",codebase:e,classid:t,sourceData:"",certType:"RSA",CryptoAgent:null}},props:{api:{type:Object,required:!0}},mounted(){this.onLoad()},methods:{onLoad(){if(this.CryptoAgent)return!1;this.CryptoAgent=this.$refs.CryptoAgent,this.CryptoAgent||alert("验签插件加载失败!"),console.log("加载this.CryptoAgent ",this.CryptoAgent)},getUkeyImage(){let e="";try{e=this.CryptoAgent.GetSealImage("CFCA_UKEY_P11.dll"),console.log("CFCA_UKEY_P11",e)}catch(t){console.log("CFCA_UKEY_P11 error",t)}if(!e)try{e=this.CryptoAgent.GetSealImage("UyeePKCS11.Enterprise.dll"),console.log("UyeePKCS11",e)}catch(t){console.log("UyeePKCS11 error",t)}if(!e)try{e=this.CryptoAgent.GetSealImage("UlanPKCS11.Enterprise.dll"),console.log("UlanPKCS11.Enterprise",e)}catch(t){console.log("UlanPKCS11.Enterprise error",t)}if(!e)try{e=this.CryptoAgent.GetSealImage("UlanPKCS11.dll"),console.log("UlanPKCS11",e)}catch(t){console.log("error",t)}return e||alert("读取Ukey印章图片失败!"),e},SignOnClick(){let e="";this.sourceData=""+(new Date).getTime();try{const t=this.sourceData;let r="";const n="Attach",o="SHA-1";return r="Attach"===n?this.CryptoAgent.SignMsgPKCS7(t,o,!0):"Detach"===n?this.CryptoAgent.SignMsgPKCS7(t,o,!1):this.CryptoAgent.SignMsgPKCS1(t,o),r?(console.log("SignOnClick 签名结果:",r),r):(e=this.CryptoAgent.GetLastErrorDesc(),alert(e),"")}catch(t){console.log("SignOnClick error=",t),e=this.CryptoAgent.GetLastErrorDesc(),alert(e)}return""},GetCertInfoOnClick(e){e=e||"SubjectDN",console.log("GetCertInfoOnClick:InfoTypeID ",e);try{const t=this.CryptoAgent.GetSignCertInfo(e);if(!t){const e=this.CryptoAgent.GetLastErrorDesc();return alert(e),!1}return t}catch(t){console.log("GetCertInfoOnClick-WzhSign: ",t);const e=this.CryptoAgent.GetLastErrorDesc();alert(e+t)}},SelectCertificateOnClick(e=""){this.isIE||alert("请使用IE浏览器!");try{const t="",r="CFCA ACS",n=e,o="Uyee CSP v6.0 (Enterprise)||CFCA FOR UKEY CSP v1.1.0";let i="";if(console.log("无纸化 选证书 selectSignCert, serialNo(非传)=",e),i=this.CryptoAgent.SelectCertificate(t,r,n,o),!i){const e=this.CryptoAgent.GetLastErrorDesc();return console.log("wzh SelectCertResult 不存在",e),alert(e),!1}return console.log("wzh SelectCertResult",i),!0}catch(t){const e=this.CryptoAgent.GetLastErrorDesc();return console.log("wzh SelectCertResult catch error: ",e),alert(e+t),!1}},getHashValue(e,t,r){const n=this.CryptoAgent.GetSignCertInfo("CertContent");return this.$emit("getImg",r),n?t.bucketName&&t.objectKey?this.api.getSignHash({jsonData:{source:"TTDFUND",timestamp:(new Date).getTime(),msgBody:{attachfile:`oss:${t.bucketName}:${t.objectKey}`,reason:"",location:"",signImgfileName:"",signImgfile:r,pageNo:e.pageIndex,pageX:Number(e.X),pageY:Number(e.Y),certBase64:n}}}):(alert("文件对象不合规!"),Promise.reject()):(alert("获取证书公钥失败!"),Promise.reject())},async getSignHashValue(e,t,r){try{let n="";const{code:o,data:i}=await this.getHashValue(e,t,r);if(0===o&&""+i.bean.code==="200"&&(n=i.bean.pdfHash),!n)return alert(`CFCA计算HASH值失败!( ${i.bean.msg||""})`),!1;const s=this.CryptoAgent.SignHashMsgPKCS7Detached(n,"SHA-1");if(!s){const e=this.CryptoAgent.GetLastErrorDesc();return alert(e),!1}return{signature:s,id:i.bean.id}}catch(n){const e=this.CryptoAgent.GetLastErrorDesc();console.log("getSignHashValue",n),alert(e+n)}},async signFileKeyImage(e,t,r){const n=await this.getSignHashValue(e,t,r);let o="计算Hash 失败!";if(n){const{data:e,code:t}=await this.api.mergeHash({jsonData:{source:"TTDFUND",timestamp:(new Date).getTime(),msgBody:{sigString:n.signature,id:n.id}}});if(0===t){if(e.bean.url)return e.bean;o=e.bean.msg}else o=e.msg}return this.$message.error(o||"error计算Hash失败!"),!1},async multipleSign(e,t,r,n,o=18){const i=this.CryptoAgent.GetSignCertInfo("SerialNumber");let s="";if(!n)return alert("印章图片缺失!"),!1;for(let a=0;a<e.length;a++){const r=c(e[a]);if("number"===typeof o&&(r.Y-=o),a>0){const e=this.CryptoAgent.GetSignCertInfo("SerialNumber");if(i!==e)return alert("签署过程中,请不要更换ukey!"),!1;s&&(s=await this.signFileKeyImage(r,s,n)),console.log(`iterateSign 签章结果${a}---result----`,s)}else s=await this.signFileKeyImage(r,t,n),console.log("第一个章 签章结果",s)}return console.log("multipleSign 签章的结果",s),s}}},w=P,x=(r("75da"),g(w,b,D,!1,null,"7a77408f",null)),E=x.exports,F=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[e.isIE?r("WzhSign",{ref:"signIe",attrs:{api:e.api}}):r("WzhSignChrome",{ref:"signChrome",attrs:{api:e.api}})],1)},I=[],A=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"CryptoAgent-wrapper"})},G=[];function O(e){this.browser=e}function k(){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890",t=e.length,r="",n=0;n<10;n++)r+=e.charAt(Math.floor(Math.random()*t));return r}O.chromeExtension="ldpdnooafijfamkammjmhjnnfblekpno",O.edgeExtension="odpbakhphoggmefmfppocigpfppblick",O.productID="com.cfca.cryptokit.totodi",O.extensionName=O.productID+".extension",O.reqEventName=O.productID+".request",O.respEventName=O.productID+".response",O.Browser={IE:"Internet Explorer",Edge:"Edge",Edg:"Edge(Chromium)",Chrome:"Chrome",Safari:"Safari",Firefox:"Firefox"},window.nmCryptokit=O,O.SendMessageforChrome=function(e){return new Promise((function(t,r){chrome.runtime.sendMessage(O.chromeExtension,e,(function(e){if(e)0==e.errorcode?t(e):r(e);else{var n=new Object;n.errorcode=1,n.result=chrome.runtime.lastError.message,r(n)}}))}))},O.SendMessageforEdge=function(e){return new Promise((function(t,r){chrome.runtime.sendMessage(O.edgeExtension,e,(function(e){if(e)0==e.errorcode?t(e):r(e);else{var n=new Object;n.errorcode=1,n.result=chrome.runtime.lastError.message,r(n)}}))}))},O.SendMessagebyEvent=function(e){var t=new CustomEvent(O.reqEventName,{detail:e});return document.dispatchEvent(t),new Promise((function(t,r){var n=O.respEventName;void 0!=e.funcInfo&&void 0!=e.funcInfo.randomId&&(n+="."+e.funcInfo.randomId),document.addEventListener(n,(function e(n){document.removeEventListener(n.type,e);var o=JSON.parse(n.detail);null!=o&&0==o.errorcode?t(o):r(o)}),!1)}))},O.SendMessage=function(e,t){return O.Browser.Chrome==e?O.SendMessageforChrome(t):O.Browser.Edg==e?O.SendMessageforEdge(t):O.SendMessagebyEvent(t)},O.checkExtension=function(e){return new Promise((function(t,r){var n=new Object;console.log("444",e),O.Browser.Chrome==e||O.Browser.Edg==e?(console.log("555",chrome),chrome.runtime?t(e):(n.errorcode=2,n.result="Extension does not exist!",r(n))):O.Browser.Edge==e||O.Browser.Firefox==e?document.getElementById(O.extensionName)?t(e):(n.errorcode=2,n.result="Extension does not exist!",r(n)):(n.errorcode=3,n.result="Only support Chrome/Edge/Firefox",r(n))}))},O.prototype.init=function(){var e=this.browser;return console.log("2223",e),O.checkExtension(e).then((function(e){var t=new Object;return t.action="connect",t.host=O.productID,O.SendMessage(e,t)})).then((function(){var t=new Object,r=new Object,n=k();return r.function="GetLastErrorDesc",r.params=null,r.randomId=n,t.action="invoke",t.funcInfo=r,O.SendMessage(e,t)}))},O.prototype.uninit=function(){var e=new Object;return e.action="disconnect",e.host=O.productID,O.SendMessage(this.browser,e)},O.prototype.getExtensionVersion=function(){var e=new Object,t=new Object;return t.function="getExtensionVersion",t.params=null,e.action="getExtensionVersion",e.funcInfo=t,O.SendMessage(this.browser,e)},O.prototype.getHostVersion=function(){var e=new Object,t=new Object,r=k();return t.function="GetVersion",t.params=null,t.randomId=r,e.action="invoke",e.funcInfo=t,O.SendMessage(this.browser,e)},O.prototype.SelectCertificate=function(e,t,r,n){var o=new Object,i=new Object,s=new Array,a=k();return s.push(e),s.push(t),s.push(r),s.push(n),i.function="SelectCertificate",i.params=s,i.randomId=a,o.action="invoke",o.funcInfo=i,O.SendMessage(this.browser,o)},O.prototype.GetSignCertInfo=function(e){var t=new Object,r=new Object,n=new Array,o=k();return n.push(e),r.function="getSignCertInfo",r.params=n,r.randomId=o,t.action="invoke",t.funcInfo=r,O.SendMessage(this.browser,t)},O.prototype.SignMsgPKCS7=function(e,t,r){var n=new Object,o=new Object,i=new Array,s=k();return i.push(e),i.push(t),i.push(r),o.function="SignMsgPKCS7",o.params=i,o.randomId=s,n.action="invoke",n.funcInfo=o,O.SendMessage(this.browser,n)},O.prototype.SignHashMsgPKCS7Detached=function(e,t){var r=new Object,n=new Object,o=new Array,i=k();return o.push(e),o.push(t),n.function="SignHashMsgPKCS7Detached",n.params=o,n.randomId=i,r.action="invoke",r.funcInfo=n,O.SendMessage(this.browser,r)},O.prototype.GetVersion=function(){var e=new Object,t=new Object,r=k();return t.function="GetVersion",t.params=null,t.randomId=r,e.action="invoke",e.funcInfo=t,O.SendMessage(this.browser,e)},O.prototype.GetLastErrorDesc=function(){var e=new Object,t=new Object,r=k();return t.function="GetLastErrorDesc",t.params=null,t.randomId=r,e.action="invoke",e.funcInfo=t,O.SendMessage(this.browser,e)};var N={methods:{BrowserInfo(){const e={name:"",version:""};let t;const r=self.navigator.userAgent;return(t=/edge\/([\d\.]+)/i.exec(r))?(e.name="Edge",e.version=t[1]):(t=/edg\/([\d\.]+)/i.exec(r))?(e.name="Edge(Chromium)",e.version=t[1]):/msie/i.test(r)?(e.name="Internet Explorer",e.version=/msie ([\d\.]+)/i.exec(r)[1]):/Trident/i.test(r)?(e.name="Internet Explorer",e.version=/rv:([\d\.]+)/i.exec(r)[1]):/chrome/i.test(r)?(e.name="Chrome",e.version=/chrome\/([\d\.]+)/i.exec(r)[1]):/safari/i.test(r)?(e.name="Safari",e.version=/version\/([\d\.]+)/i.exec(r)[1]):/firefox/i.test(r)&&(e.name="Firefox",e.version=/firefox\/([\d\.]+)/i.exec(r)[1]),e},LoadObj(){try{let e,t;const r=this.BrowserInfo();console.log("browser=",r),"Edge"==r.name||"Edge(Chromium)"==r.name||"Chrome"==r.name&&parseInt(r.version)>41||"Firefox"==r.name&&parseInt(r.version)>52?(this.CryptoAgent=new O(r.name),this.CryptoAgent.init().then(()=>(console.log(6662),this.CryptoAgent.getExtensionVersion())).then(t=>(console.log(777),e=t.result,this.CryptoAgent.getHostVersion())).then(r=>{console.log(85888),t=r.result,console.log("extension version: "+e),console.log("host version: "+t);const n=this.compareExtensionVersion(e),o=this.compareVersion(t,"3.4.0.1");console.log("extensionLevel "+n),console.log("hostLevel: "+o),o<0&&n<0?alert("Please install host"):o<0?installHost():console.log("LoadObj success!")}).catch(e=>{console.log("response=",e)})):alert("Unsupported browser!")}catch(e){alert(e)}},compareVersion(e,t){const r=e.split("."),n=t.split("."),o=Math.min(r.length,n.length);for(let s=0;s<o;s++){if(parseInt(r[s],10)>parseInt(n[s],10))return 1;if(parseInt(r[s],10)<parseInt(n[s],10))return-1}if(o<r.length)for(var i=o;i<r.length;i++)if(0!=parseInt(r[i],10))return 1;if(o<n.length)for(i=o;i<n.length;i++)if(0!=parseInt(n[i],10))return-1;return 0},compareExtensionVersion(e){const t=this.BrowserInfo();return"Edge"==t.name||"Chrome"==t.name||"Firefox"==t.name?this.compareVersion(e,"3.4.0.1"):void 0},intallExtensionCallback(e,t){0==t?window.setTimeout("installHost()",1e3):alert("Install extension failed!")},OnUnLoad(){try{this.CryptoAgent.uninit().then(()=>{})}catch(e){alert(e)}},ShowErrorInfo(e){null==e?alert("Extension has been remove!"):1==e.errorcode?alert(e.result):this.CryptoAgent.GetLastErrorDesc().then(e=>{alert(e.result)})}}},j={mixins:[N],data(){return{isIE:navigator.appName.indexOf("Internet")>=0||navigator.appVersion.indexOf("Trident")>=0,sourceData:"",certType:"RSA",CryptoAgent:null}},props:{api:{type:Object,required:!0}},mounted(){this.onLoad()},provide(){return{GetCertInfoOnClick:this.GetCertInfoOnClick,SelectCertificateOnClick:this.SelectCertificateOnClick}},methods:{onLoad(){if(this.CryptoAgent)return console.log(3333,this.CryptoAgent),!1;this.LoadObj()},getUkeyImage(){let e="";try{e=this.CryptoAgent.GetSealImage("CFCA_UKEY_P11.dll"),console.log("CFCA_UKEY_P11",e)}catch(t){console.log("CFCA_UKEY_P11 error",t)}if(!e)try{e=this.CryptoAgent.GetSealImage("UyeePKCS11.Enterprise.dll"),console.log("UyeePKCS11",e)}catch(t){console.log("UyeePKCS11 error",t)}if(!e)try{e=this.CryptoAgent.GetSealImage("UlanPKCS11.Enterprise.dll"),console.log("UlanPKCS11.Enterprise",e)}catch(t){console.log("UlanPKCS11.Enterprise error",t)}if(!e)try{e=this.CryptoAgent.GetSealImage("UlanPKCS11.dll"),console.log("UlanPKCS11",e)}catch(t){console.log("error",t)}return e||alert("读取Ukey印章图片失败!"),e},GetCertInfoOnClick(e){return e=e||"SubjectDN",console.log("GetCertInfoOnClick:InfoTypeID ",e),this.CryptoAgent.GetSignCertInfo(e).then(e=>e.result).catch(e=>{console.log("GetCertInfoOnClick-WzhSign: ",e),alert(e)})},async SignOnClick(){this.sourceData=""+(new Date).getTime();const e=this.sourceData;let t="";const r="Attach",n="SHA-1";return t="Attach"===r?await this.CryptoAgent.SignMsgPKCS7(e,n,!0):"Detach"===r?await this.CryptoAgent.SignMsgPKCS7(e,n,!1):await this.CryptoAgent.SignMsgPKCS1(e,n),console.log("SignOnClick 签名结果:",t),t.result},async SelectCertificateOnClick(e=""){const t="",r="CFCA ACS ",n=e,o="Uyee CSP v6.0 (Enterprise)||CFCA FOR UKEY CSP v1.1.0";return this.CryptoAgent.SelectCertificate(t,r,n,o).then(e=>e.result).catch(e=>{console.log("SelectCertificate:",e),alert("证书选择失败!")})},async getHashValue(e,t,r){const n=await this.GetCertInfoOnClick("CertContent");return this.$emit("getImg",r),n?t.bucketName&&t.objectKey?this.api.getSignHash({jsonData:{source:"TTDFUND",timestamp:(new Date).getTime(),msgBody:{attachfile:`oss:${t.bucketName}:${t.objectKey}`,reason:"",location:"",signImgfileName:"",signImgfile:r,pageNo:e.pageIndex,pageX:Number(e.X),pageY:Number(e.Y),certBase64:n}}}):(alert("文件对象不合规!"),Promise.reject()):(alert("获取证书公钥失败!"),Promise.reject())},async getSignHashValue(e,t,r){let n="";const{code:o,data:i}=await this.getHashValue(e,t,r);return 0===o&&""+i.bean.code==="200"&&(n=i.bean.pdfHash),n?this.CryptoAgent.SignHashMsgPKCS7Detached(n,"SHA-1").then(e=>({signature:e.result,id:i.bean.id})).catch(e=>(alert(e),!1)):(alert(`CFCA计算HASH值失败!( ${i.bean.msg||""})`),!1)},async signFileKeyImage(e,t,r){const n=await this.getSignHashValue(e,t,r);let o="计算Hash 失败!";if(n){const{data:e,code:t}=await this.api.mergeHash({jsonData:{source:"TTDFUND",timestamp:(new Date).getTime(),msgBody:{sigString:n.signature,id:n.id}}});if(0===t){if(e.bean.url)return e.bean;o=e.bean.msg}else o=e.msg}return this.$message.error(o||"error计算Hash失败!"),!1},async multipleSign(e,t,r,n,o=18){const i=await this.GetCertInfoOnClick("SerialNumber");let s="";if(!n)return alert("印章图片缺失!"),!1;for(let a=0;a<e.length;a++){const r=c(e[a]);if("number"===typeof o&&(r.Y-=o),a>0){const e=await this.GetCertInfoOnClick("SerialNumber");if(i!==e)return alert("签署过程中,请不要更换ukey!"),!1;s&&(s=await this.signFileKeyImage(r,s,n)),console.log(`iterateSign 签章结果${a}---result----`,s)}else s=await this.signFileKeyImage(r,t,n),console.log("第一个章 签章结果",s)}return console.log("multipleSign 签章的结果",s),s}}},T=j,K=(r("222a"),g(T,A,G,!1,null,"0e3d8284",null)),L=K.exports,U={components:{WzhSign:E,WzhSignChrome:L},data(){return{child:null,isIE:navigator.appName.indexOf("Internet")>=0||navigator.appVersion.indexOf("Trident")>=0}},props:{api:{type:Object,required:!0}},mounted(){this.isIE?this.child=this.$refs.signIe:this.child=this.$refs.signChrome},methods:{}},_=U,M=g(_,F,I,!1,null,null,null),$=M.exports,H={CfcaPdf:u,Ukey:v,WzhSign:E,WzhSignChrome:L,SignNew:$};t["default"]=H},ff64:function(e,t,r){"use strict";r("3a50")}})}));
|
|
2
2
|
//# sourceMappingURL=ttd-common.umd.min.js.map
|
package/package.json
CHANGED
package/src/App.vue
CHANGED
package/src/packages/index.js
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import CfcaPdf from './cfca/CfcaPdf.vue'
|
|
2
2
|
import Ukey from './ukey/Ukey.vue'
|
|
3
3
|
import WzhSign from './ukey/WzhSign.vue'
|
|
4
|
+
import SignNew from './ukey/SignNew.vue'
|
|
5
|
+
import WzhSignChrome from './ukey/WzhSignChrome.vue'
|
|
4
6
|
|
|
5
7
|
export default {
|
|
6
8
|
CfcaPdf,
|
|
7
9
|
Ukey,
|
|
8
10
|
WzhSign,
|
|
11
|
+
WzhSignChrome,
|
|
12
|
+
SignNew,
|
|
9
13
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<WzhSign :api="api" ref="signIe" v-if="isIE" />
|
|
4
|
+
<WzhSignChrome :api="api" ref="signChrome" v-else />
|
|
5
|
+
</div>
|
|
6
|
+
</template>
|
|
7
|
+
<script>
|
|
8
|
+
import WzhSign from './WzhSign.vue';
|
|
9
|
+
import WzhSignChrome from './WzhSignChrome.vue';
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
components: { WzhSign, WzhSignChrome },
|
|
13
|
+
data() {
|
|
14
|
+
return {
|
|
15
|
+
child: null,
|
|
16
|
+
isIE: navigator.appName.indexOf('Internet') >= 0 || navigator.appVersion.indexOf('Trident') >= 0,
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
props: {
|
|
20
|
+
api: {
|
|
21
|
+
type: Object,
|
|
22
|
+
required: true,
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
mounted() {
|
|
26
|
+
if (this.isIE) {
|
|
27
|
+
this.child = this.$refs.signIe
|
|
28
|
+
} else {
|
|
29
|
+
this.child = this.$refs.signChrome
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
methods: {
|
|
33
|
+
},
|
|
34
|
+
}
|
|
35
|
+
</script>
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
|
|
3
|
+
import {nmCryptokit} from './nmCryptokit.ToToDi.js'
|
|
4
|
+
export default {
|
|
5
|
+
methods: {
|
|
6
|
+
BrowserInfo() {
|
|
7
|
+
const res = {
|
|
8
|
+
name: '',
|
|
9
|
+
version: '',
|
|
10
|
+
};
|
|
11
|
+
let reg;
|
|
12
|
+
const userAgent = self.navigator.userAgent;
|
|
13
|
+
|
|
14
|
+
if (reg = /edge\/([\d\.]+)/i.exec(userAgent)) {
|
|
15
|
+
res.name = 'Edge';
|
|
16
|
+
res.version = reg[1];
|
|
17
|
+
} else if (reg = /edg\/([\d\.]+)/i.exec(userAgent)) {
|
|
18
|
+
res.name = 'Edge(Chromium)';
|
|
19
|
+
res.version = reg[1];
|
|
20
|
+
} else if (/msie/i.test(userAgent)) {
|
|
21
|
+
res.name = 'Internet Explorer';
|
|
22
|
+
res.version = /msie ([\d\.]+)/i.exec(userAgent)[1];
|
|
23
|
+
} else if (/Trident/i.test(userAgent)) {
|
|
24
|
+
res.name = 'Internet Explorer';
|
|
25
|
+
res.version = /rv:([\d\.]+)/i.exec(userAgent)[1];
|
|
26
|
+
} else if (/chrome/i.test(userAgent)) {
|
|
27
|
+
res.name = 'Chrome';
|
|
28
|
+
res.version = /chrome\/([\d\.]+)/i.exec(userAgent)[1];
|
|
29
|
+
} else if (/safari/i.test(userAgent)) {
|
|
30
|
+
res.name = 'Safari';
|
|
31
|
+
res.version = /version\/([\d\.]+)/i.exec(userAgent)[1];
|
|
32
|
+
} else if (/firefox/i.test(userAgent)) {
|
|
33
|
+
res.name = 'Firefox';
|
|
34
|
+
res.version = /firefox\/([\d\.]+)/i.exec(userAgent)[1];
|
|
35
|
+
}
|
|
36
|
+
return res;
|
|
37
|
+
},
|
|
38
|
+
LoadObj() {
|
|
39
|
+
|
|
40
|
+
try {
|
|
41
|
+
let extensionVer;
|
|
42
|
+
let hostVer;
|
|
43
|
+
|
|
44
|
+
const browser = this.BrowserInfo();
|
|
45
|
+
|
|
46
|
+
console.log('browser=' ,browser)
|
|
47
|
+
if ((browser.name == 'Edge')
|
|
48
|
+
|| (browser.name == 'Edge(Chromium)')
|
|
49
|
+
|| (browser.name == 'Chrome' && parseInt(browser.version) > 41)
|
|
50
|
+
|| (browser.name == 'Firefox' && parseInt(browser.version) > 52)) {
|
|
51
|
+
this.CryptoAgent = new nmCryptokit(browser.name);
|
|
52
|
+
|
|
53
|
+
this.CryptoAgent.init()
|
|
54
|
+
.then(() => {
|
|
55
|
+
console.log(6662);
|
|
56
|
+
return this.CryptoAgent.getExtensionVersion()
|
|
57
|
+
}).then((response) => {
|
|
58
|
+
console.log(777);
|
|
59
|
+
extensionVer = response.result;
|
|
60
|
+
return this.CryptoAgent.getHostVersion();
|
|
61
|
+
}).then((response) => {
|
|
62
|
+
console.log(85888);
|
|
63
|
+
hostVer = response.result;
|
|
64
|
+
console.log(`extension version: ${ extensionVer}`);
|
|
65
|
+
console.log(`host version: ${ hostVer}`);
|
|
66
|
+
|
|
67
|
+
const extensionLevel = this.compareExtensionVersion(extensionVer);
|
|
68
|
+
const hostLevel = this.compareVersion(hostVer, '3.4.0.1')
|
|
69
|
+
|
|
70
|
+
console.log(`extensionLevel ${ extensionLevel}`);
|
|
71
|
+
console.log(`hostLevel: ${ hostLevel}`);
|
|
72
|
+
|
|
73
|
+
if (hostLevel < 0 && extensionLevel < 0) {
|
|
74
|
+
alert('Please install host');
|
|
75
|
+
} else if (hostLevel < 0) {
|
|
76
|
+
installHost();
|
|
77
|
+
} else {
|
|
78
|
+
console.log('LoadObj success!')
|
|
79
|
+
}
|
|
80
|
+
}).catch((response) => {
|
|
81
|
+
console.log('response=', response)
|
|
82
|
+
// alert(response.result);
|
|
83
|
+
});
|
|
84
|
+
} else {
|
|
85
|
+
alert('Unsupported browser!');
|
|
86
|
+
}
|
|
87
|
+
} catch (e) {
|
|
88
|
+
alert(e);
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
|
|
92
|
+
// version1 == version2 0
|
|
93
|
+
// version1 < version2 -1
|
|
94
|
+
// version1 > version2 1
|
|
95
|
+
compareVersion(version1, version2) {
|
|
96
|
+
const v1Arr = version1.split('.');
|
|
97
|
+
const v2Arr = version2.split('.');
|
|
98
|
+
const len = Math.min(v1Arr.length, v2Arr.length);
|
|
99
|
+
for (let i = 0; i < len; i++) {
|
|
100
|
+
if (parseInt(v1Arr[i], 10) > parseInt(v2Arr[i], 10)) { return 1; }
|
|
101
|
+
|
|
102
|
+
if (parseInt(v1Arr[i], 10) < parseInt(v2Arr[i], 10)) { return -1; }
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
if (len < v1Arr.length) {
|
|
106
|
+
for (var j = len; j < v1Arr.length; j++) {
|
|
107
|
+
if (parseInt(v1Arr[j], 10) != 0) { return 1; }
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
if (len < v2Arr.length) {
|
|
112
|
+
for (var j = len; j < v2Arr.length; j++) {
|
|
113
|
+
if (parseInt(v2Arr[j], 10) != 0) { return -1; }
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
return 0;
|
|
118
|
+
},
|
|
119
|
+
|
|
120
|
+
// version1 == version2 0
|
|
121
|
+
// version1 < version2 -1
|
|
122
|
+
// version1 > version2 1
|
|
123
|
+
compareExtensionVersion(version) {
|
|
124
|
+
const browser = this.BrowserInfo();
|
|
125
|
+
|
|
126
|
+
if (browser.name == 'Edge') {
|
|
127
|
+
return this.compareVersion(version, '3.4.0.1');
|
|
128
|
+
}
|
|
129
|
+
if (browser.name == 'Chrome') {
|
|
130
|
+
return this.compareVersion(version, '3.4.0.1');
|
|
131
|
+
}
|
|
132
|
+
if (browser.name == 'Firefox') {
|
|
133
|
+
return this.compareVersion(version, '3.4.0.1');
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
|
|
137
|
+
intallExtensionCallback(url, status) {
|
|
138
|
+
if (status == 0) {
|
|
139
|
+
window.setTimeout('installHost()', 1000);
|
|
140
|
+
} else {
|
|
141
|
+
alert('Install extension failed!');
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
|
|
145
|
+
OnUnLoad() {
|
|
146
|
+
try {
|
|
147
|
+
this.CryptoAgent.uninit().then(() => { });
|
|
148
|
+
} catch (e) {
|
|
149
|
+
alert(e);
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
ShowErrorInfo(response) {
|
|
155
|
+
if (response == null) {
|
|
156
|
+
alert('Extension has been remove!');
|
|
157
|
+
} else if (response.errorcode == 1) { // connection error
|
|
158
|
+
alert(response.result);
|
|
159
|
+
} else { // host error
|
|
160
|
+
this.CryptoAgent.GetLastErrorDesc()
|
|
161
|
+
.then((response) => {
|
|
162
|
+
alert(response.result);
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
}
|