qsh-webview-sdk 2.0.3 → 2.0.4
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 +41 -0
- package/dist/index.d.ts +20 -0
- package/dist/uni-webview.es.js +1586 -196
- package/dist/uni-webview.es.js.map +1 -1
- package/dist/uni-webview.umd.js +1 -1
- package/dist/uni-webview.umd.js.map +1 -1
- package/package.json +4 -1
package/dist/uni-webview.umd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(o,r){typeof exports=="object"&&typeof module!="undefined"?module.exports=r():typeof define=="function"&&define.amd?define(r):(o=typeof globalThis!="undefined"?globalThis:o||self,o.qsh=r())})(this,function(){"use strict";function o(){return!!(typeof window!="undefined"&&window.__wxjs_environment==="miniprogram"||typeof window!="undefined"&&window.wx&&window.wx.miniProgram||/micromessenger/i.test(navigator.userAgent)&&/miniProgram/i.test(navigator.userAgent))}function r(){return typeof window.plus!="undefined"}function c(){return window.__dcloud_weex_postMessage||window.__dcloud_weex_}function p(){return window.__uniapp_x_postMessage||window.__uniapp_x_}function g(){return/uni-app/i.test(navigator.userAgent)}function _(){return/Html5Plus/i.test(navigator.userAgent)}function A(){return p()?"uvue":c()?"nvue":o()?"weixin":r()?"plus":"h5"}const l={isWeixinMiniProgram:o(),isAppPlus:r(),isNvue:c(),isUvue:p(),isUniApp:g(),isHtml5Plus:_(),type:A()},m=/complete|loaded|interactive/;function U(){window.UniAppJSBridge=!0,document.dispatchEvent(new CustomEvent("UniAppJSBridgeReady",{bubbles:!0,cancelable:!0}))}function W(e){return g()||_()?(window.__uniapp_x_postMessage||window.__uniapp_x_||window.__dcloud_weex_postMessage||window.__dcloud_weex_?document.addEventListener("DOMContentLoaded",e):window.plus&&m.test(document.readyState)?setTimeout(e,0):document.addEventListener("plusready",e),!0):!1}function L(e){return window.wx&&window.wx.miniProgram?(window.WeixinJSBridge&&window.WeixinJSBridge.invoke?setTimeout(e,0):document.addEventListener("WeixinJSBridgeReady",e),!0):!1}function R(e){return W(e)||L(e)||(m.test(document.readyState)?setTimeout(e,0):document.addEventListener("DOMContentLoaded",e)),!0}function O(){return new Promise(e=>{window.UniAppJSBridge?e():document.addEventListener("UniAppJSBridgeReady",e,{once:!0})})}let v=!1;function f(){v||(v=!0,R(U))}let w=[];function N(){if(w.length===0&&window.plus){const e=plus.webview.currentWebview();if(!e)throw new Error("plus.webview.currentWebview() is undefined");const n=e.parent(),i=n?n.id:e.id;w.push(i)}return w}function $(e,n){const i={options:{timestamp:+new Date},name:e,arg:n};if(e==="postMessage"){const u={data:n};return window.__uniapp_x_postMessage?window.__uniapp_x_postMessage(u):window.__uniapp_x_.postMessage(JSON.stringify(u))}const s={type:"WEB_INVOKE_APPSERVICE",args:{data:i,webviewIds:w}};window.__uniapp_x_postMessage?window.__uniapp_x_postMessageToService(s):window.__uniapp_x_.postMessageToService(JSON.stringify(s))}function J(e,n){const i={options:{timestamp:+new Date},name:e,arg:n};if(e==="postMessage"){const u={data:[n]};return window.__dcloud_weex_postMessage?window.__dcloud_weex_postMessage(u):window.__dcloud_weex_.postMessage(JSON.stringify(u))}const s={type:"WEB_INVOKE_APPSERVICE",args:{data:i,webviewIds:w}};window.__dcloud_weex_postMessage?window.__dcloud_weex_postMessageToService(s):window.__dcloud_weex_.postMessageToService(JSON.stringify(s))}function V(e,n){const i={options:{timestamp:+new Date},name:e,arg:n},s=N();if(plus.webview.getWebviewById("__uniapp__service"))plus.webview.postMessageToUniNView({type:"WEB_INVOKE_APPSERVICE",args:{data:i,webviewIds:s}},"__uniapp__service");else{const u=JSON.stringify(i),ne=JSON.stringify(s);plus.webview.getLaunchWebview().evalJS(`UniPlusBridge.subscribeHandler("WEB_INVOKE_APPSERVICE",${u},${ne});`)}}function C(e,n){const i={options:{timestamp:+new Date},name:e,arg:n};window.parent.postMessage({type:"WEB_INVOKE_APPSERVICE",data:i,pageId:""},"*")}function t(e,n){p()?$(e,n):c()?J(e,n):r()?V(e,n):C(e,n)}function D(e={}){const{url:n}=e;if(window.wx&&window.wx.miniProgram)return window.wx.miniProgram.navigateTo({url:n});t("navigateTo",{url:encodeURI(n)})}function j(e={}){const{delta:n=1}=e;if(window.wx&&window.wx.miniProgram)return window.wx.miniProgram.navigateBack({delta:parseInt(n)});t("navigateBack",{delta:parseInt(n)})}function z(e={}){const{url:n}=e;if(window.wx&&window.wx.miniProgram)return window.wx.miniProgram.switchTab({url:n});t("switchTab",{url:encodeURI(n)})}function K(e={}){const{url:n}=e;if(window.wx&&window.wx.miniProgram)return window.wx.miniProgram.reLaunch({url:n});t("reLaunch",{url:encodeURI(n)})}function H(e={}){const{url:n}=e;if(window.wx&&window.wx.miniProgram)return window.wx.miniProgram.redirectTo({url:n});t("redirectTo",{url:encodeURI(n)})}function k(e={}){const{data:n={}}=e;if(window.wx&&window.wx.miniProgram)return window.wx.miniProgram.postMessage({data:n});t("postMessage",n)}function q(e){if(window.wx&&window.wx.miniProgram&&window.wx.miniProgram.getEnv)return window.wx.miniProgram.getEnv(e);e({miniprogram:!0,weixin:!0})}var x=Object.freeze({__proto__:null,getEnv:q,navigateBack:j,navigateTo:D,postMessage:k,reLaunch:K,redirectTo:H,switchTab:z});function X(e={}){const{url:n}=e;t("navigateTo",{url:encodeURI(n)})}function F(e={}){const{delta:n=1}=e;t("navigateBack",{delta:parseInt(n)})}function G(e={}){const{url:n}=e;t("switchTab",{url:encodeURI(n)})}function Y(e={}){const{url:n}=e;t("reLaunch",{url:encodeURI(n)})}function Q(e={}){const{url:n}=e;t("redirectTo",{url:encodeURI(n)})}function Z(e={}){const{data:n={}}=e;t("postMessage",n)}function ee(e){const n={};let i=!1;p()?(n.uvue=!0,i=!0):c()?(n.nvue=!0,i=!0):r()&&(n.plus=!0,i=!0),i?n.app=!0:n.h5=!0,e(n)}var P=Object.freeze({__proto__:null,getEnv:ee,navigateBack:F,navigateTo:X,postMessage:Z,reLaunch:Y,redirectTo:Q,switchTab:G});function d(){return o()?x:P}function E(e){return d().navigateTo(e)}function T(e){return d().navigateBack(e)}function M(e){return d().switchTab(e)}function I(e){return d().reLaunch(e)}function b(e){return d().redirectTo(e)}function h(){return o()?x:P}function y(e={}){return h().postMessage(e)}function S(e){return h().getEnv(e)}typeof window!="undefined"&&(document.readyState==="complete"||document.readyState==="interactive"?setTimeout(()=>f(),0):document.addEventListener("DOMContentLoaded",()=>{f()}));const a={navigateTo:E,navigateBack:T,switchTab:M,reLaunch:I,redirectTo:b,postMessage:y,getEnv:S,environment:l,ready:O,init:f,webView:null};l.isWeixinMiniProgram?a.webView=window.wx&&window.wx.miniProgram:a.webView={navigateTo:E,navigateBack:T,switchTab:M,reLaunch:I,redirectTo:b,postMessage:y,getEnv:S};const B=typeof window.uni!="undefined"?window.uni:{};return Object.keys(B).forEach(e=>{a.hasOwnProperty(e)||(a[e]=B[e])}),typeof window!="undefined"&&(window.qsh=a),a});
|
|
1
|
+
(function(vt,dt){typeof exports=="object"&&typeof module!="undefined"?module.exports=dt():typeof define=="function"&&define.amd?define(dt):(vt=typeof globalThis!="undefined"?globalThis:vt||self,vt.qsh=dt())})(this,function(){"use strict";function vt(){return!!(typeof window!="undefined"&&window.__wxjs_environment==="miniprogram"||typeof window!="undefined"&&window.wx&&window.wx.miniProgram||/micromessenger/i.test(navigator.userAgent)&&/miniProgram/i.test(navigator.userAgent))}function dt(){return typeof window.plus!="undefined"}function Et(){return window.__dcloud_weex_postMessage||window.__dcloud_weex_}function Pt(){return window.__uniapp_x_postMessage||window.__uniapp_x_}function Kt(){return/uni-app/i.test(navigator.userAgent)}function Wt(){return/Html5Plus/i.test(navigator.userAgent)}function ve(){return Pt()?"uvue":Et()?"nvue":vt()?"weixin":dt()?"plus":"h5"}const $t={isWeixinMiniProgram:vt(),isAppPlus:dt(),isNvue:Et(),isUvue:Pt(),isUniApp:Kt(),isHtml5Plus:Wt(),type:ve()},Zt=/complete|loaded|interactive/;function de(){window.UniAppJSBridge=!0,document.dispatchEvent(new CustomEvent("UniAppJSBridgeReady",{bubbles:!0,cancelable:!0}))}function xe(u){return Kt()||Wt()?(window.__uniapp_x_postMessage||window.__uniapp_x_||window.__dcloud_weex_postMessage||window.__dcloud_weex_?document.addEventListener("DOMContentLoaded",u):window.plus&&Zt.test(document.readyState)?setTimeout(u,0):document.addEventListener("plusready",u),!0):!1}function ge(u){return window.wx&&window.wx.miniProgram?(window.WeixinJSBridge&&window.WeixinJSBridge.invoke?setTimeout(u,0):document.addEventListener("WeixinJSBridgeReady",u),!0):!1}function me(u){return xe(u)||ge(u)||(Zt.test(document.readyState)?setTimeout(u,0):document.addEventListener("DOMContentLoaded",u)),!0}function we(){return new Promise(u=>{window.UniAppJSBridge?u():document.addEventListener("UniAppJSBridgeReady",u,{once:!0})})}let Jt=!1;function Ct(){Jt||(Jt=!0,me(de))}let yt=[];function ye(){if(yt.length===0&&window.plus){const u=plus.webview.currentWebview();if(!u)throw new Error("plus.webview.currentWebview() is undefined");const h=u.parent(),A=h?h.id:u.id;yt.push(A)}return yt}function be(u,h){const A={options:{timestamp:+new Date},name:u,arg:h};if(u==="postMessage"){const y={data:h};return window.__uniapp_x_postMessage?window.__uniapp_x_postMessage(y):window.__uniapp_x_.postMessage(JSON.stringify(y))}const q={type:"WEB_INVOKE_APPSERVICE",args:{data:A,webviewIds:yt}};window.__uniapp_x_postMessage?window.__uniapp_x_postMessageToService(q):window.__uniapp_x_.postMessageToService(JSON.stringify(q))}function Te(u,h){const A={options:{timestamp:+new Date},name:u,arg:h};if(u==="postMessage"){const y={data:[h]};return window.__dcloud_weex_postMessage?window.__dcloud_weex_postMessage(y):window.__dcloud_weex_.postMessage(JSON.stringify(y))}const q={type:"WEB_INVOKE_APPSERVICE",args:{data:A,webviewIds:yt}};window.__dcloud_weex_postMessage?window.__dcloud_weex_postMessageToService(q):window.__dcloud_weex_.postMessageToService(JSON.stringify(q))}function Fe(u,h){const A={options:{timestamp:+new Date},name:u,arg:h},q=ye();if(plus.webview.getWebviewById("__uniapp__service"))plus.webview.postMessageToUniNView({type:"WEB_INVOKE_APPSERVICE",args:{data:A,webviewIds:q}},"__uniapp__service");else{const y=JSON.stringify(A),n=JSON.stringify(q);plus.webview.getLaunchWebview().evalJS(`UniPlusBridge.subscribeHandler("WEB_INVOKE_APPSERVICE",${y},${n});`)}}function Be(u,h){const A={options:{timestamp:+new Date},name:u,arg:h};window.parent.postMessage({type:"WEB_INVOKE_APPSERVICE",data:A,pageId:""},"*")}function st(u,h){Pt()?be(u,h):Et()?Te(u,h):dt()?Fe(u,h):Be(u,h)}function Ee(u={}){const{url:h}=u;if(window.wx&&window.wx.miniProgram)return window.wx.miniProgram.navigateTo({url:h});st("navigateTo",{url:encodeURI(h)})}function Pe(u={}){const{delta:h=1}=u;if(window.wx&&window.wx.miniProgram)return window.wx.miniProgram.navigateBack({delta:parseInt(h)});st("navigateBack",{delta:parseInt(h)})}function Se(u={}){const{url:h}=u;if(window.wx&&window.wx.miniProgram)return window.wx.miniProgram.switchTab({url:h});st("switchTab",{url:encodeURI(h)})}function Ie(u={}){const{url:h}=u;if(window.wx&&window.wx.miniProgram)return window.wx.miniProgram.reLaunch({url:h});st("reLaunch",{url:encodeURI(h)})}function De(u={}){const{url:h}=u;if(window.wx&&window.wx.miniProgram)return window.wx.miniProgram.redirectTo({url:h});st("redirectTo",{url:encodeURI(h)})}function Me(u={}){const{data:h={}}=u;if(window.wx&&window.wx.miniProgram)return window.wx.miniProgram.postMessage({data:h});st("postMessage",h)}function Re(u){if(window.wx&&window.wx.miniProgram&&window.wx.miniProgram.getEnv)return window.wx.miniProgram.getEnv(u);u({miniprogram:!0,weixin:!0})}var Gt=Object.freeze({__proto__:null,getEnv:Re,navigateBack:Pe,navigateTo:Ee,postMessage:Me,reLaunch:Ie,redirectTo:De,switchTab:Se});function qe(u={}){const{url:h}=u;st("navigateTo",{url:encodeURI(h)})}function Ae(u={}){const{delta:h=1}=u;st("navigateBack",{delta:parseInt(h)})}function _e(u={}){const{url:h}=u;st("switchTab",{url:encodeURI(h)})}function Oe(u={}){const{url:h}=u;st("reLaunch",{url:encodeURI(h)})}function Ce(u={}){const{url:h}=u;st("redirectTo",{url:encodeURI(h)})}function Ve(u={}){const{data:h={}}=u;st("postMessage",h)}function Le(u){const h={};let A=!1;Pt()?(h.uvue=!0,A=!0):Et()?(h.nvue=!0,A=!0):dt()&&(h.plus=!0,A=!0),A?h.app=!0:h.h5=!0,u(h)}var Yt=Object.freeze({__proto__:null,getEnv:Le,navigateBack:Ae,navigateTo:qe,postMessage:Ve,reLaunch:Oe,redirectTo:Ce,switchTab:_e});function bt(){return vt()?Gt:Yt}function Xt(u){return bt().navigateTo(u)}function kt(u){return bt().navigateBack(u)}function Qt(u){return bt().switchTab(u)}function jt(u){return bt().reLaunch(u)}function te(u){return bt().redirectTo(u)}function ee(){return vt()?Gt:Yt}function re(u={}){return ee().postMessage(u)}function ie(u){return ee().getEnv(u)}var Vt={exports:{}},St={exports:{}},He=St.exports,ne;function Ne(){return ne||(ne=1,function(u,h){(function(){var A,q=0xdeadbeefcafe,y=(q&16777215)==15715070;function n(t,e,r){t!=null&&(typeof t=="number"?this.fromNumber(t,e,r):e==null&&typeof t!="string"?this.fromString(t,256):this.fromString(t,e))}function p(){return new n(null)}function $(t,e,r,i,a,l){for(;--l>=0;){var b=e*this[t++]+r[i]+a;a=Math.floor(b/67108864),r[i++]=b&67108863}return a}function K(t,e,r,i,a,l){for(var b=e&32767,E=e>>15;--l>=0;){var W=this[t]&32767,X=this[t++]>>15,ft=E*W+X*b;W=b*W+((ft&32767)<<15)+r[i]+(a&1073741823),a=(W>>>30)+(ft>>>15)+E*X+(a>>>30),r[i++]=W&1073741823}return a}function D(t,e,r,i,a,l){for(var b=e&16383,E=e>>14;--l>=0;){var W=this[t]&16383,X=this[t++]>>14,ft=E*W+X*b;W=b*W+((ft&16383)<<14)+r[i]+a,a=(W>>28)+(ft>>14)+E*X,r[i++]=W&268435455}return a}var N=typeof navigator!="undefined";N&&y&&navigator.appName=="Microsoft Internet Explorer"?(n.prototype.am=K,A=30):N&&y&&navigator.appName!="Netscape"?(n.prototype.am=$,A=26):(n.prototype.am=D,A=28),n.prototype.DB=A,n.prototype.DM=(1<<A)-1,n.prototype.DV=1<<A;var _=52;n.prototype.FV=Math.pow(2,_),n.prototype.F1=_-A,n.prototype.F2=2*A-_;var d="0123456789abcdefghijklmnopqrstuvwxyz",I=new Array,c,P;for(c=48,P=0;P<=9;++P)I[c++]=P;for(c=97,P=10;P<36;++P)I[c++]=P;for(c=65,P=10;P<36;++P)I[c++]=P;function g(t){return d.charAt(t)}function o(t,e){var r=I[t.charCodeAt(e)];return r==null?-1:r}function M(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s}function S(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0}function s(t){var e=p();return e.fromInt(t),e}function x(t,e){var r;if(e==16)r=4;else if(e==8)r=3;else if(e==256)r=8;else if(e==2)r=1;else if(e==32)r=5;else if(e==4)r=2;else{this.fromRadix(t,e);return}this.t=0,this.s=0;for(var i=t.length,a=!1,l=0;--i>=0;){var b=r==8?t[i]&255:o(t,i);if(b<0){t.charAt(i)=="-"&&(a=!0);continue}a=!1,l==0?this[this.t++]=b:l+r>this.DB?(this[this.t-1]|=(b&(1<<this.DB-l)-1)<<l,this[this.t++]=b>>this.DB-l):this[this.t-1]|=b<<l,l+=r,l>=this.DB&&(l-=this.DB)}r==8&&(t[0]&128)!=0&&(this.s=-1,l>0&&(this[this.t-1]|=(1<<this.DB-l)-1<<l)),this.clamp(),a&&n.ZERO.subTo(this,this)}function T(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t}function f(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(t==16)e=4;else if(t==8)e=3;else if(t==2)e=1;else if(t==32)e=5;else if(t==4)e=2;else return this.toRadix(t);var r=(1<<e)-1,i,a=!1,l="",b=this.t,E=this.DB-b*this.DB%e;if(b-- >0)for(E<this.DB&&(i=this[b]>>E)>0&&(a=!0,l=g(i));b>=0;)E<e?(i=(this[b]&(1<<E)-1)<<e-E,i|=this[--b]>>(E+=this.DB-e)):(i=this[b]>>(E-=e)&r,E<=0&&(E+=this.DB,--b)),i>0&&(a=!0),a&&(l+=g(i));return a?l:"0"}function w(){var t=p();return n.ZERO.subTo(this,t),t}function v(){return this.s<0?this.negate():this}function m(t){var e=this.s-t.s;if(e!=0)return e;var r=this.t;if(e=r-t.t,e!=0)return this.s<0?-e:e;for(;--r>=0;)if((e=this[r]-t[r])!=0)return e;return 0}function B(t){var e=1,r;return(r=t>>>16)!=0&&(t=r,e+=16),(r=t>>8)!=0&&(t=r,e+=8),(r=t>>4)!=0&&(t=r,e+=4),(r=t>>2)!=0&&(t=r,e+=2),(r=t>>1)!=0&&(t=r,e+=1),e}function F(){return this.t<=0?0:this.DB*(this.t-1)+B(this[this.t-1]^this.s&this.DM)}function C(t,e){var r;for(r=this.t-1;r>=0;--r)e[r+t]=this[r];for(r=t-1;r>=0;--r)e[r]=0;e.t=this.t+t,e.s=this.s}function R(t,e){for(var r=t;r<this.t;++r)e[r-t]=this[r];e.t=Math.max(this.t-t,0),e.s=this.s}function O(t,e){var r=t%this.DB,i=this.DB-r,a=(1<<i)-1,l=Math.floor(t/this.DB),b=this.s<<r&this.DM,E;for(E=this.t-1;E>=0;--E)e[E+l+1]=this[E]>>i|b,b=(this[E]&a)<<r;for(E=l-1;E>=0;--E)e[E]=0;e[l]=b,e.t=this.t+l+1,e.s=this.s,e.clamp()}function U(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t){e.t=0;return}var i=t%this.DB,a=this.DB-i,l=(1<<i)-1;e[0]=this[r]>>i;for(var b=r+1;b<this.t;++b)e[b-r-1]|=(this[b]&l)<<a,e[b-r]=this[b]>>i;i>0&&(e[this.t-r-1]|=(this.s&l)<<a),e.t=this.t-r,e.clamp()}function H(t,e){for(var r=0,i=0,a=Math.min(t.t,this.t);r<a;)i+=this[r]-t[r],e[r++]=i&this.DM,i>>=this.DB;if(t.t<this.t){for(i-=t.s;r<this.t;)i+=this[r],e[r++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;r<t.t;)i-=t[r],e[r++]=i&this.DM,i>>=this.DB;i-=t.s}e.s=i<0?-1:0,i<-1?e[r++]=this.DV+i:i>0&&(e[r++]=i),e.t=r,e.clamp()}function V(t,e){var r=this.abs(),i=t.abs(),a=r.t;for(e.t=a+i.t;--a>=0;)e[a]=0;for(a=0;a<i.t;++a)e[a+r.t]=r.am(0,i[a],e,a,0,r.t);e.s=0,e.clamp(),this.s!=t.s&&n.ZERO.subTo(e,e)}function L(t){for(var e=this.abs(),r=t.t=2*e.t;--r>=0;)t[r]=0;for(r=0;r<e.t-1;++r){var i=e.am(r,e[r],t,2*r,0,1);(t[r+e.t]+=e.am(r+1,2*e[r],t,2*r+1,i,e.t-r-1))>=e.DV&&(t[r+e.t]-=e.DV,t[r+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(r,e[r],t,2*r,0,1)),t.s=0,t.clamp()}function Z(t,e,r){var i=t.abs();if(!(i.t<=0)){var a=this.abs();if(a.t<i.t){e!=null&&e.fromInt(0),r!=null&&this.copyTo(r);return}r==null&&(r=p());var l=p(),b=this.s,E=t.s,W=this.DB-B(i[i.t-1]);W>0?(i.lShiftTo(W,l),a.lShiftTo(W,r)):(i.copyTo(l),a.copyTo(r));var X=l.t,ft=l[X-1];if(ft!=0){var ot=ft*(1<<this.F1)+(X>1?l[X-2]>>this.F2:0),pt=this.FV/ot,_t=(1<<this.F1)/ot,ct=1<<this.F2,lt=r.t,Ot=lt-X,xt=e==null?p():e;for(l.dlShiftTo(Ot,xt),r.compareTo(xt)>=0&&(r[r.t++]=1,r.subTo(xt,r)),n.ONE.dlShiftTo(X,xt),xt.subTo(l,l);l.t<X;)l[l.t++]=0;for(;--Ot>=0;){var zt=r[--lt]==ft?this.DM:Math.floor(r[lt]*pt+(r[lt-1]+ct)*_t);if((r[lt]+=l.am(0,zt,r,Ot,0,X))<zt)for(l.dlShiftTo(Ot,xt),r.subTo(xt,r);r[lt]<--zt;)r.subTo(xt,r)}e!=null&&(r.drShiftTo(X,e),b!=E&&n.ZERO.subTo(e,e)),r.t=X,r.clamp(),W>0&&r.rShiftTo(W,r),b<0&&n.ZERO.subTo(r,r)}}}function J(t){var e=p();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(n.ZERO)>0&&t.subTo(e,e),e}function z(t){this.m=t}function k(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t}function G(t){return t}function Q(t){t.divRemTo(this.m,null,t)}function tt(t,e,r){t.multiplyTo(e,r),this.reduce(r)}function rt(t,e){t.squareTo(e),this.reduce(e)}z.prototype.convert=k,z.prototype.revert=G,z.prototype.reduce=Q,z.prototype.mulTo=tt,z.prototype.sqrTo=rt;function at(){if(this.t<1)return 0;var t=this[0];if((t&1)==0)return 0;var e=t&3;return e=e*(2-(t&15)*e)&15,e=e*(2-(t&255)*e)&255,e=e*(2-((t&65535)*e&65535))&65535,e=e*(2-t*e%this.DV)%this.DV,e>0?this.DV-e:-e}function ut(t){this.m=t,this.mp=t.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}function Tt(t){var e=p();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(n.ZERO)>0&&this.m.subTo(e,e),e}function It(t){var e=p();return t.copyTo(e),this.reduce(e),e}function Dt(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var r=t[e]&32767,i=r*this.mpl+((r*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(r=e+this.m.t,t[r]+=this.m.am(0,i,t,e,0,this.m.t);t[r]>=t.DV;)t[r]-=t.DV,t[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)}function Mt(t,e){t.squareTo(e),this.reduce(e)}function Rt(t,e,r){t.multiplyTo(e,r),this.reduce(r)}ut.prototype.convert=Tt,ut.prototype.revert=It,ut.prototype.reduce=Dt,ut.prototype.mulTo=Rt,ut.prototype.sqrTo=Mt;function it(){return(this.t>0?this[0]&1:this.s)==0}function qt(t,e){if(t>4294967295||t<1)return n.ONE;var r=p(),i=p(),a=e.convert(this),l=B(t)-1;for(a.copyTo(r);--l>=0;)if(e.sqrTo(r,i),(t&1<<l)>0)e.mulTo(i,a,r);else{var b=r;r=i,i=b}return e.revert(r)}function Ft(t,e){var r;return t<256||e.isEven()?r=new z(e):r=new ut(e),this.exp(t,r)}n.prototype.copyTo=M,n.prototype.fromInt=S,n.prototype.fromString=x,n.prototype.clamp=T,n.prototype.dlShiftTo=C,n.prototype.drShiftTo=R,n.prototype.lShiftTo=O,n.prototype.rShiftTo=U,n.prototype.subTo=H,n.prototype.multiplyTo=V,n.prototype.squareTo=L,n.prototype.divRemTo=Z,n.prototype.invDigit=at,n.prototype.isEven=it,n.prototype.exp=qt,n.prototype.toString=f,n.prototype.negate=w,n.prototype.abs=v,n.prototype.compareTo=m,n.prototype.bitLength=F,n.prototype.mod=J,n.prototype.modPowInt=Ft,n.ZERO=s(0),n.ONE=s(1);function Lt(){var t=p();return this.copyTo(t),t}function wt(){if(this.s<0){if(this.t==1)return this[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this[0];if(this.t==0)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}function ir(){return this.t==0?this.s:this[0]<<24>>24}function nr(){return this.t==0?this.s:this[0]<<16>>16}function or(t){return Math.floor(Math.LN2*this.DB/Math.log(t))}function sr(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1}function ar(t){if(t==null&&(t=10),this.signum()==0||t<2||t>36)return"0";var e=this.chunkSize(t),r=Math.pow(t,e),i=s(r),a=p(),l=p(),b="";for(this.divRemTo(i,a,l);a.signum()>0;)b=(r+l.intValue()).toString(t).substr(1)+b,a.divRemTo(i,a,l);return l.intValue().toString(t)+b}function fr(t,e){this.fromInt(0),e==null&&(e=10);for(var r=this.chunkSize(e),i=Math.pow(e,r),a=!1,l=0,b=0,E=0;E<t.length;++E){var W=o(t,E);if(W<0){t.charAt(E)=="-"&&this.signum()==0&&(a=!0);continue}b=e*b+W,++l>=r&&(this.dMultiply(i),this.dAddOffset(b,0),l=0,b=0)}l>0&&(this.dMultiply(Math.pow(e,l)),this.dAddOffset(b,0)),a&&n.ZERO.subTo(this,this)}function ur(t,e,r){if(typeof e=="number")if(t<2)this.fromInt(1);else for(this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(n.ONE.shiftLeft(t-1),Ht,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(n.ONE.shiftLeft(t-1),this);else{var i=new Array,a=t&7;i.length=(t>>3)+1,e.nextBytes(i),a>0?i[0]&=(1<<a)-1:i[0]=0,this.fromString(i,256)}}function hr(){var t=this.t,e=new Array;e[0]=this.s;var r=this.DB-t*this.DB%8,i,a=0;if(t-- >0)for(r<this.DB&&(i=this[t]>>r)!=(this.s&this.DM)>>r&&(e[a++]=i|this.s<<this.DB-r);t>=0;)r<8?(i=(this[t]&(1<<r)-1)<<8-r,i|=this[--t]>>(r+=this.DB-8)):(i=this[t]>>(r-=8)&255,r<=0&&(r+=this.DB,--t)),(i&128)!=0&&(i|=-256),a==0&&(this.s&128)!=(i&128)&&++a,(a>0||i!=this.s)&&(e[a++]=i);return e}function cr(t){return this.compareTo(t)==0}function lr(t){return this.compareTo(t)<0?this:t}function pr(t){return this.compareTo(t)>0?this:t}function vr(t,e,r){var i,a,l=Math.min(t.t,this.t);for(i=0;i<l;++i)r[i]=e(this[i],t[i]);if(t.t<this.t){for(a=t.s&this.DM,i=l;i<this.t;++i)r[i]=e(this[i],a);r.t=this.t}else{for(a=this.s&this.DM,i=l;i<t.t;++i)r[i]=e(a,t[i]);r.t=t.t}r.s=e(this.s,t.s),r.clamp()}function dr(t,e){return t&e}function xr(t){var e=p();return this.bitwiseTo(t,dr,e),e}function Ht(t,e){return t|e}function gr(t){var e=p();return this.bitwiseTo(t,Ht,e),e}function ae(t,e){return t^e}function mr(t){var e=p();return this.bitwiseTo(t,ae,e),e}function fe(t,e){return t&~e}function wr(t){var e=p();return this.bitwiseTo(t,fe,e),e}function yr(){for(var t=p(),e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t}function br(t){var e=p();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e}function Tr(t){var e=p();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e}function Fr(t){if(t==0)return-1;var e=0;return(t&65535)==0&&(t>>=16,e+=16),(t&255)==0&&(t>>=8,e+=8),(t&15)==0&&(t>>=4,e+=4),(t&3)==0&&(t>>=2,e+=2),(t&1)==0&&++e,e}function Br(){for(var t=0;t<this.t;++t)if(this[t]!=0)return t*this.DB+Fr(this[t]);return this.s<0?this.t*this.DB:-1}function Er(t){for(var e=0;t!=0;)t&=t-1,++e;return e}function Pr(){for(var t=0,e=this.s&this.DM,r=0;r<this.t;++r)t+=Er(this[r]^e);return t}function Sr(t){var e=Math.floor(t/this.DB);return e>=this.t?this.s!=0:(this[e]&1<<t%this.DB)!=0}function Ir(t,e){var r=n.ONE.shiftLeft(t);return this.bitwiseTo(r,e,r),r}function Dr(t){return this.changeBit(t,Ht)}function Mr(t){return this.changeBit(t,fe)}function Rr(t){return this.changeBit(t,ae)}function qr(t,e){for(var r=0,i=0,a=Math.min(t.t,this.t);r<a;)i+=this[r]+t[r],e[r++]=i&this.DM,i>>=this.DB;if(t.t<this.t){for(i+=t.s;r<this.t;)i+=this[r],e[r++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;r<t.t;)i+=t[r],e[r++]=i&this.DM,i>>=this.DB;i+=t.s}e.s=i<0?-1:0,i>0?e[r++]=i:i<-1&&(e[r++]=this.DV+i),e.t=r,e.clamp()}function Ar(t){var e=p();return this.addTo(t,e),e}function _r(t){var e=p();return this.subTo(t,e),e}function Or(t){var e=p();return this.multiplyTo(t,e),e}function Cr(){var t=p();return this.squareTo(t),t}function Vr(t){var e=p();return this.divRemTo(t,e,null),e}function Lr(t){var e=p();return this.divRemTo(t,null,e),e}function Hr(t){var e=p(),r=p();return this.divRemTo(t,e,r),new Array(e,r)}function Nr(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()}function Ur(t,e){if(t!=0){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}}function Bt(){}function ue(t){return t}function zr(t,e,r){t.multiplyTo(e,r)}function Kr(t,e){t.squareTo(e)}Bt.prototype.convert=ue,Bt.prototype.revert=ue,Bt.prototype.mulTo=zr,Bt.prototype.sqrTo=Kr;function Wr(t){return this.exp(t,new Bt)}function $r(t,e,r){var i=Math.min(this.t+t.t,e);for(r.s=0,r.t=i;i>0;)r[--i]=0;var a;for(a=r.t-this.t;i<a;++i)r[i+this.t]=this.am(0,t[i],r,i,0,this.t);for(a=Math.min(t.t,e);i<a;++i)this.am(0,t[i],r,i,0,e-i);r.clamp()}function Zr(t,e,r){--e;var i=r.t=this.t+t.t-e;for(r.s=0;--i>=0;)r[i]=0;for(i=Math.max(e-this.t,0);i<t.t;++i)r[this.t+i-e]=this.am(e-i,t[i],r,0,0,this.t+i-e);r.clamp(),r.drShiftTo(1,r)}function gt(t){this.r2=p(),this.q3=p(),n.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}function Jr(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=p();return t.copyTo(e),this.reduce(e),e}function Gr(t){return t}function Yr(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)}function Xr(t,e){t.squareTo(e),this.reduce(e)}function kr(t,e,r){t.multiplyTo(e,r),this.reduce(r)}gt.prototype.convert=Jr,gt.prototype.revert=Gr,gt.prototype.reduce=Yr,gt.prototype.mulTo=kr,gt.prototype.sqrTo=Xr;function Qr(t,e){var r=t.bitLength(),i,a=s(1),l;if(r<=0)return a;r<18?i=1:r<48?i=3:r<144?i=4:r<768?i=5:i=6,r<8?l=new z(e):e.isEven()?l=new gt(e):l=new ut(e);var b=new Array,E=3,W=i-1,X=(1<<i)-1;if(b[1]=l.convert(this),i>1){var ft=p();for(l.sqrTo(b[1],ft);E<=X;)b[E]=p(),l.mulTo(ft,b[E-2],b[E]),E+=2}var ot=t.t-1,pt,_t=!0,ct=p(),lt;for(r=B(t[ot])-1;ot>=0;){for(r>=W?pt=t[ot]>>r-W&X:(pt=(t[ot]&(1<<r+1)-1)<<W-r,ot>0&&(pt|=t[ot-1]>>this.DB+r-W)),E=i;(pt&1)==0;)pt>>=1,--E;if((r-=E)<0&&(r+=this.DB,--ot),_t)b[pt].copyTo(a),_t=!1;else{for(;E>1;)l.sqrTo(a,ct),l.sqrTo(ct,a),E-=2;E>0?l.sqrTo(a,ct):(lt=a,a=ct,ct=lt),l.mulTo(ct,b[pt],a)}for(;ot>=0&&(t[ot]&1<<r)==0;)l.sqrTo(a,ct),lt=a,a=ct,ct=lt,--r<0&&(r=this.DB-1,--ot)}return l.revert(a)}function jr(t){var e=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(e.compareTo(r)<0){var i=e;e=r,r=i}var a=e.getLowestSetBit(),l=r.getLowestSetBit();if(l<0)return e;for(a<l&&(l=a),l>0&&(e.rShiftTo(l,e),r.rShiftTo(l,r));e.signum()>0;)(a=e.getLowestSetBit())>0&&e.rShiftTo(a,e),(a=r.getLowestSetBit())>0&&r.rShiftTo(a,r),e.compareTo(r)>=0?(e.subTo(r,e),e.rShiftTo(1,e)):(r.subTo(e,r),r.rShiftTo(1,r));return l>0&&r.lShiftTo(l,r),r}function ti(t){if(t<=0)return 0;var e=this.DV%t,r=this.s<0?t-1:0;if(this.t>0)if(e==0)r=this[0]%t;else for(var i=this.t-1;i>=0;--i)r=(e*r+this[i])%t;return r}function ei(t){var e=t.isEven();if(this.isEven()&&e||t.signum()==0)return n.ZERO;for(var r=t.clone(),i=this.clone(),a=s(1),l=s(0),b=s(0),E=s(1);r.signum()!=0;){for(;r.isEven();)r.rShiftTo(1,r),e?((!a.isEven()||!l.isEven())&&(a.addTo(this,a),l.subTo(t,l)),a.rShiftTo(1,a)):l.isEven()||l.subTo(t,l),l.rShiftTo(1,l);for(;i.isEven();)i.rShiftTo(1,i),e?((!b.isEven()||!E.isEven())&&(b.addTo(this,b),E.subTo(t,E)),b.rShiftTo(1,b)):E.isEven()||E.subTo(t,E),E.rShiftTo(1,E);r.compareTo(i)>=0?(r.subTo(i,r),e&&a.subTo(b,a),l.subTo(E,l)):(i.subTo(r,i),e&&b.subTo(a,b),E.subTo(l,E))}if(i.compareTo(n.ONE)!=0)return n.ZERO;if(E.compareTo(t)>=0)return E.subtract(t);if(E.signum()<0)E.addTo(t,E);else return E;return E.signum()<0?E.add(t):E}var et=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],ri=(1<<26)/et[et.length-1];function ii(t){var e,r=this.abs();if(r.t==1&&r[0]<=et[et.length-1]){for(e=0;e<et.length;++e)if(r[0]==et[e])return!0;return!1}if(r.isEven())return!1;for(e=1;e<et.length;){for(var i=et[e],a=e+1;a<et.length&&i<ri;)i*=et[a++];for(i=r.modInt(i);e<a;)if(i%et[e++]==0)return!1}return r.millerRabin(t)}function ni(t){var e=this.subtract(n.ONE),r=e.getLowestSetBit();if(r<=0)return!1;var i=e.shiftRight(r);t=t+1>>1,t>et.length&&(t=et.length);for(var a=p(),l=0;l<t;++l){a.fromInt(et[Math.floor(Math.random()*et.length)]);var b=a.modPow(i,this);if(b.compareTo(n.ONE)!=0&&b.compareTo(e)!=0){for(var E=1;E++<r&&b.compareTo(e)!=0;)if(b=b.modPowInt(2,this),b.compareTo(n.ONE)==0)return!1;if(b.compareTo(e)!=0)return!1}}return!0}n.prototype.chunkSize=or,n.prototype.toRadix=ar,n.prototype.fromRadix=fr,n.prototype.fromNumber=ur,n.prototype.bitwiseTo=vr,n.prototype.changeBit=Ir,n.prototype.addTo=qr,n.prototype.dMultiply=Nr,n.prototype.dAddOffset=Ur,n.prototype.multiplyLowerTo=$r,n.prototype.multiplyUpperTo=Zr,n.prototype.modInt=ti,n.prototype.millerRabin=ni,n.prototype.clone=Lt,n.prototype.intValue=wt,n.prototype.byteValue=ir,n.prototype.shortValue=nr,n.prototype.signum=sr,n.prototype.toByteArray=hr,n.prototype.equals=cr,n.prototype.min=lr,n.prototype.max=pr,n.prototype.and=xr,n.prototype.or=gr,n.prototype.xor=mr,n.prototype.andNot=wr,n.prototype.not=yr,n.prototype.shiftLeft=br,n.prototype.shiftRight=Tr,n.prototype.getLowestSetBit=Br,n.prototype.bitCount=Pr,n.prototype.testBit=Sr,n.prototype.setBit=Dr,n.prototype.clearBit=Mr,n.prototype.flipBit=Rr,n.prototype.add=Ar,n.prototype.subtract=_r,n.prototype.multiply=Or,n.prototype.divide=Vr,n.prototype.remainder=Lr,n.prototype.divideAndRemainder=Hr,n.prototype.modPow=Qr,n.prototype.modInverse=ei,n.prototype.pow=Wr,n.prototype.gcd=jr,n.prototype.isProbablePrime=ii,n.prototype.square=Cr,n.prototype.Barrett=gt;var At,nt,Y;function oi(t){nt[Y++]^=t&255,nt[Y++]^=t>>8&255,nt[Y++]^=t>>16&255,nt[Y++]^=t>>24&255,Y>=Ut&&(Y-=Ut)}function he(){oi(new Date().getTime())}if(nt==null){nt=new Array,Y=0;var ht;if(typeof window!="undefined"&&window.crypto){if(window.crypto.getRandomValues){var ce=new Uint8Array(32);for(window.crypto.getRandomValues(ce),ht=0;ht<32;++ht)nt[Y++]=ce[ht]}else if(navigator.appName=="Netscape"&&navigator.appVersion<"5"){var le=window.crypto.random(32);for(ht=0;ht<le.length;++ht)nt[Y++]=le.charCodeAt(ht)&255}}for(;Y<Ut;)ht=Math.floor(65536*Math.random()),nt[Y++]=ht>>>8,nt[Y++]=ht&255;Y=0,he()}function si(){if(At==null){for(he(),At=hi(),At.init(nt),Y=0;Y<nt.length;++Y)nt[Y]=0;Y=0}return At.next()}function ai(t){var e;for(e=0;e<t.length;++e)t[e]=si()}function pe(){}pe.prototype.nextBytes=ai;function Nt(){this.i=0,this.j=0,this.S=new Array}function fi(t){var e,r,i;for(e=0;e<256;++e)this.S[e]=e;for(r=0,e=0;e<256;++e)r=r+this.S[e]+t[e%t.length]&255,i=this.S[e],this.S[e]=this.S[r],this.S[r]=i;this.i=0,this.j=0}function ui(){var t;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,t=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=t,this.S[t+this.S[this.i]&255]}Nt.prototype.init=fi,Nt.prototype.next=ui;function hi(){return new Nt}var Ut=256;u.exports={default:n,BigInteger:n,SecureRandom:pe}}).call(He)}(St)),St.exports}var oe;function Ue(){return oe||(oe=1,function(u){u.exports=function(h){var A={};function q(y){if(A[y])return A[y].exports;var n=A[y]={i:y,l:!1,exports:{}};return h[y].call(n.exports,n,n.exports,q),n.l=!0,n.exports}return q.m=h,q.c=A,q.d=function(y,n,p){q.o(y,n)||Object.defineProperty(y,n,{enumerable:!0,get:p})},q.r=function(y){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(y,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(y,"__esModule",{value:!0})},q.t=function(y,n){if(n&1&&(y=q(y)),n&8||n&4&&typeof y=="object"&&y&&y.__esModule)return y;var p=Object.create(null);if(q.r(p),Object.defineProperty(p,"default",{enumerable:!0,value:y}),n&2&&typeof y!="string")for(var $ in y)q.d(p,$,function(K){return y[K]}.bind(null,$));return p},q.n=function(y){var n=y&&y.__esModule?function(){return y.default}:function(){return y};return q.d(n,"a",n),n},q.o=function(y,n){return Object.prototype.hasOwnProperty.call(y,n)},q.p="",q(q.s=2)}([function(h,A){h.exports=Ne()},function(h,A,q){var y=new Uint32Array(68),n=new Uint32Array(64);function p(g,o){var M=o&31;return g<<M|g>>>32-M}function $(g,o){for(var M=[],S=g.length-1;S>=0;S--)M[S]=(g[S]^o[S])&255;return M}function K(g){return g^p(g,9)^p(g,17)}function D(g){return g^p(g,15)^p(g,23)}function N(g){var o=g.length*8,M=o%512;M=M>=448?512-M%448-1:448-M-1;for(var S=new Array((M-7)/8),s=new Array(8),x=0,T=S.length;x<T;x++)S[x]=0;for(var f=0,w=s.length;f<w;f++)s[f]=0;o=o.toString(2);for(var v=7;v>=0;v--)if(o.length>8){var m=o.length-8;s[v]=parseInt(o.substr(m),2),o=o.substr(0,m)}else o.length>0&&(s[v]=parseInt(o,2),o="");for(var B=new Uint8Array([].concat(g,[128],S,s)),F=new DataView(B.buffer,0),C=B.length/64,R=new Uint32Array([1937774191,1226093241,388252375,3666478592,2842636476,372324522,3817729613,2969243214]),O=0;O<C;O++){y.fill(0),n.fill(0);for(var U=16*O,H=0;H<16;H++)y[H]=F.getUint32((U+H)*4,!1);for(var V=16;V<68;V++)y[V]=D(y[V-16]^y[V-9]^p(y[V-3],15))^p(y[V-13],7)^y[V-6];for(var L=0;L<64;L++)n[L]=y[L]^y[L+4];for(var Z=2043430169,J=2055708042,z=R[0],k=R[1],G=R[2],Q=R[3],tt=R[4],rt=R[5],at=R[6],ut=R[7],Tt=void 0,It=void 0,Dt=void 0,Mt=void 0,Rt=void 0,it=0;it<64;it++)Rt=it>=0&&it<=15?Z:J,Tt=p(p(z,12)+tt+p(Rt,it),7),It=Tt^p(z,12),Dt=(it>=0&&it<=15?z^k^G:z&k|z&G|k&G)+Q+It+n[it],Mt=(it>=0&&it<=15?tt^rt^at:tt&rt|~tt&at)+ut+Tt+y[it],Q=G,G=p(k,9),k=z,z=Dt,ut=at,at=p(rt,19),rt=tt,tt=K(Mt);R[0]^=z,R[1]^=k,R[2]^=G,R[3]^=Q,R[4]^=tt,R[5]^=rt,R[6]^=at,R[7]^=ut}for(var qt=[],Ft=0,Lt=R.length;Ft<Lt;Ft++){var wt=R[Ft];qt.push((wt&4278190080)>>>24,(wt&16711680)>>>16,(wt&65280)>>>8,wt&255)}return qt}for(var _=64,d=new Uint8Array(_),I=new Uint8Array(_),c=0;c<_;c++)d[c]=54,I[c]=92;function P(g,o){for(o.length>_&&(o=N(o));o.length<_;)o.push(0);var M=$(o,d),S=$(o,I),s=N([].concat(M,g));return N([].concat(S,s))}h.exports={sm3:N,hmac:P}},function(h,A,q){h.exports={sm2:q(3),sm3:q(7),sm4:q(8)}},function(h,A,q){var y=q(0),n=y.BigInteger,p=q(4),$=p.encodeDer,K=p.decodeDer,D=q(5),N=q(1).sm3,_=D.generateEcparam(),d=_.G,I=_.curve,c=_.n,P=0;function g(f,w){var v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;f=typeof f=="string"?D.hexToArray(D.utf8ToHex(f)):Array.prototype.slice.call(f),w=D.getGlobalCurve().decodePointHex(w);var m=D.generateKeyPairHex(),B=new n(m.privateKey,16),F=m.publicKey;F.length>128&&(F=F.substr(F.length-128));var C=w.multiply(B),R=D.hexToArray(D.leftPad(C.getX().toBigInteger().toRadix(16),64)),O=D.hexToArray(D.leftPad(C.getY().toBigInteger().toRadix(16),64)),U=D.arrayToHex(N([].concat(R,f,O))),H=1,V=0,L=[],Z=[].concat(R,O),J=function(){L=N([].concat(Z,[H>>24&255,H>>16&255,H>>8&255,H&255])),H++,V=0};J();for(var z=0,k=f.length;z<k;z++)V===L.length&&J(),f[z]^=L[V++]&255;var G=D.arrayToHex(f);return v===P?F+G+U:F+U+G}function o(f,w){var v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},B=m.output,F=B===void 0?"string":B;w=new n(w,16);var C=f.substr(128,64),R=f.substr(192);v===P&&(C=f.substr(f.length-64),R=f.substr(128,f.length-128-64));var O=D.hexToArray(R),U=D.getGlobalCurve().decodePointHex("04"+f.substr(0,128)),H=U.multiply(w),V=D.hexToArray(D.leftPad(H.getX().toBigInteger().toRadix(16),64)),L=D.hexToArray(D.leftPad(H.getY().toBigInteger().toRadix(16),64)),Z=1,J=0,z=[],k=[].concat(V,L),G=function(){z=N([].concat(k,[Z>>24&255,Z>>16&255,Z>>8&255,Z&255])),Z++,J=0};G();for(var Q=0,tt=O.length;Q<tt;Q++)J===z.length&&G(),O[Q]^=z[J++]&255;var rt=D.arrayToHex(N([].concat(V,O,L)));return rt===C.toLowerCase()?F==="array"?O:D.arrayToUtf8(O):F==="array"?[]:""}function M(f,w){var v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},m=v.pointPool,B=v.der,F=v.hash,C=v.publicKey,R=v.userId,O=typeof f=="string"?D.utf8ToHex(f):D.arrayToHex(f);F&&(C=C||x(w),O=s(O,C,R));var U=new n(w,16),H=new n(O,16),V=null,L=null,Z=null;do{do{var J=void 0;m&&m.length?J=m.pop():J=T(),V=J.k,L=H.add(J.x1).mod(c)}while(L.equals(n.ZERO)||L.add(V).equals(c));Z=U.add(n.ONE).modInverse(c).multiply(V.subtract(L.multiply(U))).mod(c)}while(Z.equals(n.ZERO));return B?$(L,Z):D.leftPad(L.toString(16),64)+D.leftPad(Z.toString(16),64)}function S(f,w,v){var m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},B=m.der,F=m.hash,C=m.userId,R=typeof f=="string"?D.utf8ToHex(f):D.arrayToHex(f);F&&(R=s(R,v,C));var O=void 0,U=void 0;if(B){var H=K(w);O=H.r,U=H.s}else O=new n(w.substring(0,64),16),U=new n(w.substring(64),16);var V=I.decodePointHex(v),L=new n(R,16),Z=O.add(U).mod(c);if(Z.equals(n.ZERO))return!1;var J=d.multiply(U).add(V.multiply(Z)),z=L.add(J.getX().toBigInteger()).mod(c);return O.equals(z)}function s(f,w){var v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"1234567812345678";v=D.utf8ToHex(v);var m=D.leftPad(d.curve.a.toBigInteger().toRadix(16),64),B=D.leftPad(d.curve.b.toBigInteger().toRadix(16),64),F=D.leftPad(d.getX().toBigInteger().toRadix(16),64),C=D.leftPad(d.getY().toBigInteger().toRadix(16),64),R=void 0,O=void 0;if(w.length===128)R=w.substr(0,64),O=w.substr(64,64);else{var U=d.curve.decodePointHex(w);R=D.leftPad(U.getX().toBigInteger().toRadix(16),64),O=D.leftPad(U.getY().toBigInteger().toRadix(16),64)}var H=D.hexToArray(v+m+B+F+C+R+O),V=v.length*4;H.unshift(V&255),H.unshift(V>>8&255);var L=N(H);return D.arrayToHex(N(L.concat(D.hexToArray(f))))}function x(f){var w=d.multiply(new n(f,16)),v=D.leftPad(w.getX().toBigInteger().toString(16),64),m=D.leftPad(w.getY().toBigInteger().toString(16),64);return"04"+v+m}function T(){var f=D.generateKeyPairHex(),w=I.decodePointHex(f.publicKey);return f.k=new n(f.privateKey,16),f.x1=w.getX().toBigInteger(),f}h.exports={generateKeyPairHex:D.generateKeyPairHex,compressPublicKeyHex:D.compressPublicKeyHex,comparePublicKeyHex:D.comparePublicKeyHex,doEncrypt:g,doDecrypt:o,doSignature:M,doVerifySignature:S,getPublicKeyFromPrivateKey:x,getPoint:T,verifyPublicKey:D.verifyPublicKey}},function(h,A,q){function y(g,o){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o&&(typeof o=="object"||typeof o=="function")?o:g}function n(g,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof o);g.prototype=Object.create(o&&o.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),o&&(Object.setPrototypeOf?Object.setPrototypeOf(g,o):g.__proto__=o)}function p(g,o){if(!(g instanceof o))throw new TypeError("Cannot call a class as a function")}var $=q(0),K=$.BigInteger;function D(g){var o=g.toString(16);if(o[0]!=="-")o.length%2===1?o="0"+o:o.match(/^[0-7]/)||(o="00"+o);else{o=o.substr(1);var M=o.length;M%2===1?M+=1:o.match(/^[0-7]/)||(M+=2);for(var S="",s=0;s<M;s++)S+="f";S=new K(S,16),o=S.xor(g).add(K.ONE),o=o.toString(16).replace(/^-/,"")}return o}var N=function(){function g(){p(this,g),this.tlv=null,this.t="00",this.l="00",this.v=""}return g.prototype.getEncodedHex=function(){return this.tlv||(this.v=this.getValue(),this.l=this.getLength(),this.tlv=this.t+this.l+this.v),this.tlv},g.prototype.getLength=function(){var M=this.v.length/2,S=M.toString(16);if(S.length%2===1&&(S="0"+S),M<128)return S;var s=128+S.length/2;return s.toString(16)+S},g.prototype.getValue=function(){return""},g}(),_=function(g){n(o,g);function o(M){p(this,o);var S=y(this,g.call(this));return S.t="02",M&&(S.v=D(M)),S}return o.prototype.getValue=function(){return this.v},o}(N),d=function(g){n(o,g);function o(M){p(this,o);var S=y(this,g.call(this));return S.t="30",S.asn1Array=M,S}return o.prototype.getValue=function(){return this.v=this.asn1Array.map(function(S){return S.getEncodedHex()}).join(""),this.v},o}(N);function I(g,o){return+g[o+2]<8?1:+g.substr(o+2,2)&128}function c(g,o){var M=I(g,o),S=g.substr(o+2,M*2);if(!S)return-1;var s=+S[0]<8?new K(S,16):new K(S.substr(2),16);return s.intValue()}function P(g,o){var M=I(g,o);return o+(M+1)*2}h.exports={encodeDer:function(o,M){var S=new _(o),s=new _(M),x=new d([S,s]);return x.getEncodedHex()},decodeDer:function(o){var M=P(o,0),S=P(o,M),s=c(o,M),x=o.substr(S,s*2),T=S+x.length,f=P(o,T),w=c(o,T),v=o.substr(f,w*2),m=new K(x,16),B=new K(v,16);return{r:m,s:B}}}},function(h,A,q){var y=q(0),n=y.BigInteger,p=y.SecureRandom,$=q(6),K=$.ECCurveFp,D=new p,N=P(),_=N.curve,d=N.G,I=N.n;function c(){return _}function P(){var v=new n("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFF",16),m=new n("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFC",16),B=new n("28E9FA9E9D9F5E344D5A9E4BCF6509A7F39789F515AB8F92DDBCBD414D940E93",16),F=new K(v,m,B),C="32C4AE2C1F1981195F9904466A39C9948FE30BBFF2660BE1715A4589334C74C7",R="BC3736A2F4F6779C59BDCEE36B692153D0A9877CC62A474002DF32E52139F0A0",O=F.decodePointHex("04"+C+R),U=new n("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFF7203DF6B21C6052B53BBF40939D54123",16);return{curve:F,G:O,n:U}}function g(v,m,B){var F=v?new n(v,m,B):new n(I.bitLength(),D),C=F.mod(I.subtract(n.ONE)).add(n.ONE),R=S(C.toString(16),64),O=d.multiply(C),U=S(O.getX().toBigInteger().toString(16),64),H=S(O.getY().toBigInteger().toString(16),64),V="04"+U+H;return{privateKey:R,publicKey:V}}function o(v){if(v.length!==130)throw new Error("Invalid public key to compress");var m=(v.length-2)/2,B=v.substr(2,m),F=new n(v.substr(m+2,m),16),C="03";return F.mod(new n("2")).equals(n.ZERO)&&(C="02"),C+B}function M(v){v=unescape(encodeURIComponent(v));for(var m=v.length,B=[],F=0;F<m;F++)B[F>>>2]|=(v.charCodeAt(F)&255)<<24-F%4*8;for(var C=[],R=0;R<m;R++){var O=B[R>>>2]>>>24-R%4*8&255;C.push((O>>>4).toString(16)),C.push((O&15).toString(16))}return C.join("")}function S(v,m){return v.length>=m?v:new Array(m-v.length+1).join("0")+v}function s(v){return v.map(function(m){return m=m.toString(16),m.length===1?"0"+m:m}).join("")}function x(v){for(var m=[],B=0,F=0;F<v.length*2;F+=2)m[F>>>3]|=parseInt(v[B],10)<<24-F%8*4,B++;try{for(var C=[],R=0;R<v.length;R++){var O=m[R>>>2]>>>24-R%4*8&255;C.push(String.fromCharCode(O))}return decodeURIComponent(escape(C.join("")))}catch(U){throw new Error("Malformed UTF-8 data")}}function T(v){var m=[],B=v.length;B%2!==0&&(v=S(v,B+1)),B=v.length;for(var F=0;F<B;F+=2)m.push(parseInt(v.substr(F,2),16));return m}function f(v){var m=_.decodePointHex(v);if(!m)return!1;var B=m.getX(),F=m.getY();return F.square().equals(B.multiply(B.square()).add(B.multiply(_.a)).add(_.b))}function w(v,m){var B=_.decodePointHex(v);if(!B)return!1;var F=_.decodePointHex(m);return F?B.equals(F):!1}h.exports={getGlobalCurve:c,generateEcparam:P,generateKeyPairHex:g,compressPublicKeyHex:o,utf8ToHex:M,leftPad:S,arrayToHex:s,arrayToUtf8:x,hexToArray:T,verifyPublicKey:f,comparePublicKeyHex:w}},function(h,A,q){function y(d,I){if(!(d instanceof I))throw new TypeError("Cannot call a class as a function")}var n=q(0),p=n.BigInteger,$=new p("2"),K=new p("3"),D=function(){function d(I,c){y(this,d),this.x=c,this.q=I}return d.prototype.equals=function(c){return c===this?!0:this.q.equals(c.q)&&this.x.equals(c.x)},d.prototype.toBigInteger=function(){return this.x},d.prototype.negate=function(){return new d(this.q,this.x.negate().mod(this.q))},d.prototype.add=function(c){return new d(this.q,this.x.add(c.toBigInteger()).mod(this.q))},d.prototype.subtract=function(c){return new d(this.q,this.x.subtract(c.toBigInteger()).mod(this.q))},d.prototype.multiply=function(c){return new d(this.q,this.x.multiply(c.toBigInteger()).mod(this.q))},d.prototype.divide=function(c){return new d(this.q,this.x.multiply(c.toBigInteger().modInverse(this.q)).mod(this.q))},d.prototype.square=function(){return new d(this.q,this.x.square().mod(this.q))},d}(),N=function(){function d(I,c,P,g){y(this,d),this.curve=I,this.x=c,this.y=P,this.z=g==null?p.ONE:g,this.zinv=null}return d.prototype.getX=function(){return this.zinv===null&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.x.toBigInteger().multiply(this.zinv).mod(this.curve.q))},d.prototype.getY=function(){return this.zinv===null&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.y.toBigInteger().multiply(this.zinv).mod(this.curve.q))},d.prototype.equals=function(c){if(c===this)return!0;if(this.isInfinity())return c.isInfinity();if(c.isInfinity())return this.isInfinity();var P=c.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(c.z)).mod(this.curve.q);if(!P.equals(p.ZERO))return!1;var g=c.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(c.z)).mod(this.curve.q);return g.equals(p.ZERO)},d.prototype.isInfinity=function(){return this.x===null&&this.y===null?!0:this.z.equals(p.ZERO)&&!this.y.toBigInteger().equals(p.ZERO)},d.prototype.negate=function(){return new d(this.curve,this.x,this.y.negate(),this.z)},d.prototype.add=function(c){if(this.isInfinity())return c;if(c.isInfinity())return this;var P=this.x.toBigInteger(),g=this.y.toBigInteger(),o=this.z,M=c.x.toBigInteger(),S=c.y.toBigInteger(),s=c.z,x=this.curve.q,T=P.multiply(s).mod(x),f=M.multiply(o).mod(x),w=T.subtract(f),v=g.multiply(s).mod(x),m=S.multiply(o).mod(x),B=v.subtract(m);if(p.ZERO.equals(w))return p.ZERO.equals(B)?this.twice():this.curve.infinity;var F=T.add(f),C=o.multiply(s).mod(x),R=w.square().mod(x),O=w.multiply(R).mod(x),U=C.multiply(B.square()).subtract(F.multiply(R)).mod(x),H=w.multiply(U).mod(x),V=B.multiply(R.multiply(T).subtract(U)).subtract(v.multiply(O)).mod(x),L=O.multiply(C).mod(x);return new d(this.curve,this.curve.fromBigInteger(H),this.curve.fromBigInteger(V),L)},d.prototype.twice=function(){if(this.isInfinity())return this;if(!this.y.toBigInteger().signum())return this.curve.infinity;var c=this.x.toBigInteger(),P=this.y.toBigInteger(),g=this.z,o=this.curve.q,M=this.curve.a.toBigInteger(),S=c.square().multiply(K).add(M.multiply(g.square())).mod(o),s=P.shiftLeft(1).multiply(g).mod(o),x=P.square().mod(o),T=x.multiply(c).multiply(g).mod(o),f=s.square().mod(o),w=S.square().subtract(T.shiftLeft(3)).mod(o),v=s.multiply(w).mod(o),m=S.multiply(T.shiftLeft(2).subtract(w)).subtract(f.shiftLeft(1).multiply(x)).mod(o),B=s.multiply(f).mod(o);return new d(this.curve,this.curve.fromBigInteger(v),this.curve.fromBigInteger(m),B)},d.prototype.multiply=function(c){if(this.isInfinity())return this;if(!c.signum())return this.curve.infinity;for(var P=c.multiply(K),g=this.negate(),o=this,M=P.bitLength()-2;M>0;M--){o=o.twice();var S=P.testBit(M),s=c.testBit(M);S!==s&&(o=o.add(S?this:g))}return o},d}(),_=function(){function d(I,c,P){y(this,d),this.q=I,this.a=this.fromBigInteger(c),this.b=this.fromBigInteger(P),this.infinity=new N(this,null,null)}return d.prototype.equals=function(c){return c===this?!0:this.q.equals(c.q)&&this.a.equals(c.a)&&this.b.equals(c.b)},d.prototype.fromBigInteger=function(c){return new D(this.q,c)},d.prototype.decodePointHex=function(c){switch(parseInt(c.substr(0,2),16)){case 0:return this.infinity;case 2:case 3:var P=this.fromBigInteger(new p(c.substr(2),16)),g=this.fromBigInteger(P.multiply(P.square()).add(P.multiply(this.a)).add(this.b).toBigInteger().modPow(this.q.divide(new p("4")).add(p.ONE),this.q));return g.toBigInteger().mod($).equals(new p(c.substr(0,2),16).subtract($))||(g=g.negate()),new N(this,P,g);case 4:case 6:case 7:var o=(c.length-2)/2,M=c.substr(2,o),S=c.substr(o+2,o);return new N(this,this.fromBigInteger(new p(M,16)),this.fromBigInteger(new p(S,16)));default:return null}},d}();h.exports={ECPointFp:N,ECCurveFp:_}},function(h,A,q){var y=q(1),n=y.sm3,p=y.hmac;function $(_,d){return _.length>=d?_:new Array(d-_.length+1).join("0")+_}function K(_){return _.map(function(d){return d=d.toString(16),d.length===1?"0"+d:d}).join("")}function D(_){var d=[],I=_.length;I%2!==0&&(_=$(_,I+1)),I=_.length;for(var c=0;c<I;c+=2)d.push(parseInt(_.substr(c,2),16));return d}function N(_){for(var d=[],I=0,c=_.length;I<c;I++){var P=_.codePointAt(I);if(P<=127)d.push(P);else if(P<=2047)d.push(192|P>>>6),d.push(128|P&63);else if(P<=55295||P>=57344&&P<=65535)d.push(224|P>>>12),d.push(128|P>>>6&63),d.push(128|P&63);else if(P>=65536&&P<=1114111)I++,d.push(240|P>>>18&28),d.push(128|P>>>12&63),d.push(128|P>>>6&63),d.push(128|P&63);else throw d.push(P),new Error("input is not supported")}return d}h.exports=function(_,d){if(_=typeof _=="string"?N(_):Array.prototype.slice.call(_),d){var I=d.mode||"hmac";if(I!=="hmac")throw new Error("invalid mode");var c=d.key;if(!c)throw new Error("invalid key");return c=typeof c=="string"?D(c):Array.prototype.slice.call(c),K(p(_,c))}return K(n(_))}},function(h,A,q){var y=0,n=32,p=16,$=[214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5,43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153,156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98,228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166,71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168,104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53,30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135,212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158,234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161,224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227,29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111,213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81,141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216,10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176,137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132,24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72],K=[462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257];function D(s){for(var x=[],T=0,f=s.length;T<f;T+=2)x.push(parseInt(s.substr(T,2),16));return x}function N(s){return s.map(function(x){return x=x.toString(16),x.length===1?"0"+x:x}).join("")}function _(s){for(var x=[],T=0,f=s.length;T<f;T++){var w=s.codePointAt(T);if(w<=127)x.push(w);else if(w<=2047)x.push(192|w>>>6),x.push(128|w&63);else if(w<=55295||w>=57344&&w<=65535)x.push(224|w>>>12),x.push(128|w>>>6&63),x.push(128|w&63);else if(w>=65536&&w<=1114111)T++,x.push(240|w>>>18&28),x.push(128|w>>>12&63),x.push(128|w>>>6&63),x.push(128|w&63);else throw x.push(w),new Error("input is not supported")}return x}function d(s){for(var x=[],T=0,f=s.length;T<f;T++)s[T]>=240&&s[T]<=247?(x.push(String.fromCodePoint(((s[T]&7)<<18)+((s[T+1]&63)<<12)+((s[T+2]&63)<<6)+(s[T+3]&63))),T+=3):s[T]>=224&&s[T]<=239?(x.push(String.fromCodePoint(((s[T]&15)<<12)+((s[T+1]&63)<<6)+(s[T+2]&63))),T+=2):s[T]>=192&&s[T]<=223?(x.push(String.fromCodePoint(((s[T]&31)<<6)+(s[T+1]&63))),T++):x.push(String.fromCodePoint(s[T]));return x.join("")}function I(s,x){var T=x&31;return s<<T|s>>>32-T}function c(s){return($[s>>>24&255]&255)<<24|($[s>>>16&255]&255)<<16|($[s>>>8&255]&255)<<8|$[s&255]&255}function P(s){return s^I(s,2)^I(s,10)^I(s,18)^I(s,24)}function g(s){return s^I(s,13)^I(s,23)}function o(s,x,T){for(var f=new Array(4),w=new Array(4),v=0;v<4;v++)w[0]=s[4*v]&255,w[1]=s[4*v+1]&255,w[2]=s[4*v+2]&255,w[3]=s[4*v+3]&255,f[v]=w[0]<<24|w[1]<<16|w[2]<<8|w[3];for(var m=0,B;m<32;m+=4)B=f[1]^f[2]^f[3]^T[m+0],f[0]^=P(c(B)),B=f[2]^f[3]^f[0]^T[m+1],f[1]^=P(c(B)),B=f[3]^f[0]^f[1]^T[m+2],f[2]^=P(c(B)),B=f[0]^f[1]^f[2]^T[m+3],f[3]^=P(c(B));for(var F=0;F<16;F+=4)x[F]=f[3-F/4]>>>24&255,x[F+1]=f[3-F/4]>>>16&255,x[F+2]=f[3-F/4]>>>8&255,x[F+3]=f[3-F/4]&255}function M(s,x,T){for(var f=new Array(4),w=new Array(4),v=0;v<4;v++)w[0]=s[0+4*v]&255,w[1]=s[1+4*v]&255,w[2]=s[2+4*v]&255,w[3]=s[3+4*v]&255,f[v]=w[0]<<24|w[1]<<16|w[2]<<8|w[3];f[0]^=2746333894,f[1]^=1453994832,f[2]^=1736282519,f[3]^=2993693404;for(var m=0,B;m<32;m+=4)B=f[1]^f[2]^f[3]^K[m+0],x[m+0]=f[0]^=g(c(B)),B=f[2]^f[3]^f[0]^K[m+1],x[m+1]=f[1]^=g(c(B)),B=f[3]^f[0]^f[1]^K[m+2],x[m+2]=f[2]^=g(c(B)),B=f[0]^f[1]^f[2]^K[m+3],x[m+3]=f[3]^=g(c(B));if(T===y)for(var F=0,C;F<16;F++)C=x[F],x[F]=x[31-F],x[31-F]=C}function S(s,x,T){var f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},w=f.padding,v=w===void 0?"pkcs#7":w,m=f.mode,B=f.iv,F=B===void 0?[]:B,C=f.output,R=C===void 0?"string":C;if(m==="cbc"&&(typeof F=="string"&&(F=D(F)),F.length!==128/8))throw new Error("iv is invalid");if(typeof x=="string"&&(x=D(x)),x.length!==128/8)throw new Error("key is invalid");if(typeof s=="string"?T!==y?s=_(s):s=D(s):s=[].concat(s),(v==="pkcs#5"||v==="pkcs#7")&&T!==y)for(var O=p-s.length%p,U=0;U<O;U++)s.push(O);var H=new Array(n);M(x,H,T);for(var V=[],L=F,Z=s.length,J=0;Z>=p;){var z=s.slice(J,J+16),k=new Array(16);if(m==="cbc")for(var G=0;G<p;G++)T!==y&&(z[G]^=L[G]);o(z,k,H);for(var Q=0;Q<p;Q++)m==="cbc"&&T===y&&(k[Q]^=L[Q]),V[J+Q]=k[Q];m==="cbc"&&(T!==y?L=k:L=z),Z-=p,J+=p}if((v==="pkcs#5"||v==="pkcs#7")&&T===y){for(var tt=V.length,rt=V[tt-1],at=1;at<=rt;at++)if(V[tt-at]!==rt)throw new Error("padding is invalid");V.splice(tt-rt,rt)}return R!=="array"?T!==y?N(V):d(V):V}h.exports={encrypt:function(x,T,f){return S(x,T,1,f)},decrypt:function(x,T,f){return S(x,T,0,f)}}}])}(Vt)),Vt.exports}var j=Ue();const ze=u=>j.sm2.generateKeyPairHex(u),Ke=(u,h,A=1,q)=>j.sm2.doEncrypt(u,h,A,q),We=(u,h,A=1,q)=>j.sm2.doDecrypt(u,h,A,q),$e=(u,h,A)=>j.sm2.doSignature(u,h,A),Ze=(u,h,A,q)=>j.sm2.doVerifySignature(u,h,A,q),Je=u=>j.sm2.getPublicKeyFromPrivateKey(u),Ge=()=>j.sm2.getPoint(),Ye=u=>j.sm2.compressPublicKeyHex(u),Xe=(u,h)=>j.sm2.comparePublicKeyHex(u,h),ke=u=>j.sm2.verifyPublicKey(u),Qe=(u,h)=>j.sm3(u,h),je=(u,h,A)=>j.sm4.encrypt(u,h,A),tr=(u,h,A)=>j.sm4.decrypt(u,h,A),er={sm2:j.sm2,sm3:j.sm3,sm4:j.sm4};var rr={sm2GenerateKeyPair:ze,sm2Encrypt:Ke,sm2Decrypt:We,sm2Sign:$e,sm2Verify:Ze,sm2GetPublicKey:Je,sm2GetPoint:Ge,sm2CompressPublicKey:Ye,sm2ComparePublicKey:Xe,sm2VerifyPublicKey:ke,sm3Hash:Qe,sm4Encrypt:je,sm4Decrypt:tr,__raw__:er};typeof window!="undefined"&&(document.readyState==="complete"||document.readyState==="interactive"?setTimeout(()=>Ct(),0):document.addEventListener("DOMContentLoaded",()=>{Ct()}));const mt={navigateTo:Xt,navigateBack:kt,switchTab:Qt,reLaunch:jt,redirectTo:te,postMessage:re,getEnv:ie,crypto:rr,environment:$t,ready:we,init:Ct,webView:null};$t.isWeixinMiniProgram?mt.webView=window.wx&&window.wx.miniProgram:mt.webView={navigateTo:Xt,navigateBack:kt,switchTab:Qt,reLaunch:jt,redirectTo:te,postMessage:re,getEnv:ie};const se=typeof window.uni!="undefined"?window.uni:{};return Object.keys(se).forEach(u=>{mt.hasOwnProperty(u)||(mt[u]=se[u])}),typeof window!="undefined"&&(window.qsh=mt),mt});
|
|
2
2
|
//# sourceMappingURL=uni-webview.umd.js.map
|