学习目标:
- 熟悉 webpack 打包原理
- 熟悉 webpack 打包方式
- 了解 webpack 多模块打包
一、webpack打包概念及简介
1.概念
Webpack 是一个现代化的 JavaScript 应用程序模块打包工具。它将开发中的所有资源(如图片、JS 文件、CSS 文件等)视为模块,通过 loader(加载器)和 plugin(插件)机制对这些资源进行处理,最终打包成适合生产环境部署的前端资源。
Webpack 的核心特点是:
-
模块化处理:所有资源都被视为相互依赖的模块
-
可扩展性:通过丰富的 loader 和 plugin 系统实现各种处理需求
-
高效打包:通过依赖图分析优化最终输出
-
开发支持:提供开发服务器和热更新等功能
- webpack 是一个基于模块化的打包(构建)工具,它把一切都视作模块
- 如果一个页面大部分是script标签构成,80%以上是webpack打包,如下图示例所示

在 Webpack 的工作流程中,JavaScript 通常作为整个应用的入口和模块组织核心,但通过适当的配置,各类资源都能被正确处理和优化。
2.Webpack 打包机制简介
Webpack 打包后的文件是一个自执行函数(IIFE),其核心结构如下:
-
加载器(Runtime)
- 自执行函数内部实现了 Webpack 的模块加载逻辑,负责管理模块依赖和执行顺序。
-
模块存储方式
-
所有模块(JS 文件、CSS、图片等转换后的代码)会被存储在一个模块对象里,通常有两种组织形式:
-
数组形式:模块按顺序存储,通过索引引用(适用于生产环境优化)。
-
键值对形式(对象方式):模块以路径或 ID 作为 key,方便开发和调试。
-
-
-
运行机制
- 打包后的代码会先执行 Webpack 的运行时逻辑,然后按需加载并执行模块,最终渲染应用。
这种设计确保了模块化、依赖管理和代码优化的高效性。
webpack基本结构
javascript
!function (e) {
// 加载器
function aa(t) {
return e[t].call()
}
aa('aa')
}(
// 模块(或插件)
// 1.数组形式
// [function () {
// console.log('hello')
// }]
// 2.字典形式
{
aa:function (){
console.log('hello')
}
}
)
3.加载器样式
加载器是网站的开发人员用工具生成的我们可以不用管直接拿过来用就好(一般加载器的名字都是n可以直接通过加载器的名字定位到打包的位置)
- 加载器的核心代码
javascript
!function (e) {
// 存放加载器
var c = {}
// t是加载器对应的名字
function n(t) {
// 创建一个a对象
var a = c[t] = {
i: t, // 表示模块的标识符,它被设置为参数 t。
l: !1, // 一个布尔值,初始值为 false,用于标记模块是否已经加载。
exports: {} // 一个空对象,用于将模块的导出内容存储在其中。
};
console.log(a)
// 执行函数里面的方法
return e[t].call(a.exports, a, a.exports, n),
// 设置模块已被加载
a.l = !0,
a.exports
}
//
n.m = e
// 入口
n(2)
}([])
(1) webpack 数组形式
给需要处理业务的模块进行打包,通过下标取值
javascript
// 这个格式就是webpack
!function (e){
// 存放加载器
var c={}
function n(t){
var a=c[t]={
i:t,
l:!1,
exports:{}
};
console.log(a)
return e[t].call(a.exports,a,a.exports,n),
a.l=!0,
a.exports
}
n.m=e
// 入口
n(2)
}([
// 存放模块
function(){
console.log('负责登录')
},
function(){
console.log('负责注册')
},
function(){
console.log('负责注册')
}
])
(2) webpack 对象格式
给需要处理业务的模块进行打包,通过 key 取值
javascript
!function(e){
var t={};
// 所有的模块 都是从这个加载器执行的 分发器
function n(r){
if(t[r])
return t[r].exports;
var o=t[r]={
i:r,
l:!1,
exports:{}
};
return e[r].call(o.exports,o,o.exports,n),
o.l=!0,
o.exports
}
n("xiaohai")// 对象 根据KEY 找模块
}({
0:function (){
console.log('我是模块1 负责加密')
},
'xiaohai':function (){
console.log('我是模块2 负责解密')
},
2:function(){
console.log('我是模块3 负责爬数据')
}
})
(3) 多个 js 文件打包
当模块数量较多时,通常会将它们打包成多个 JS 文件。为了管理这些动态导入的模块,Webpack 会定义一个全局数组变量 window["webpackJsonp"] = []
,其主要作用是存储需要动态加载的模块信息。
关键之处在于,Webpack 会重写该数组的 push
方法,将其指向自定义的 webpackJsonpCallback
函数。这意味着每次调用 window["webpackJsonp"].push()
时,实际上执行的是 webpackJsonpCallback()
。
该 push
方法接收三个参数:
-
模块 ID:标识被加载模块的唯一值
-
模块对象:一个包含大量模块函数的数组或对象,这些函数用于构建模块内容
-
可选执行函数:需要立即调用的函数(可选参数)
二、案例
1.案例一
(1)逆向目标
接口:https://gateway.36kr.com/api/mus/login/byMobilePassword
加密参数:
(2)逆向分析


(3)代码实现
javascript:
javascript
window = global
navigator = {
appName: "Netscape"
}
var bc
!function (e) {
function t(t) {
for (var c, r, n = t[0], s = t[1], l = t[2], d = 0, u = []; d < n.length; d++)
r = n[d],
Object.prototype.hasOwnProperty.call(o, r) && o[r] && u.push(o[r][0]),
o[r] = 0;
for (c in s)
Object.prototype.hasOwnProperty.call(s, c) && (e[c] = s[c]);
for (f && f(t); u.length;)
u.shift()();
return i.push.apply(i, l || []),
a()
}
function a() {
for (var e, t = 0; t < i.length; t++) {
for (var a = i[t], c = !0, r = 1; r < a.length; r++) {
var s = a[r];
0 !== o[s] && (c = !1)
}
c && (i.splice(t--, 1),
e = n(n.s = a[0]))
}
return e
}
var c = {}
, r = {
83: 0
}
, o = {
83: 0
}
, i = [];
function n(t) {
if (c[t])
return c[t].exports;
var a = c[t] = {
i: t,
l: !1,
exports: {}
};
// console.log('需要模块:', t)
return e[t].call(a.exports, a, a.exports, n),
a.l = !0,
a.exports
}
n.e = function (e) {
var t = [];
r[e] ? t.push(r[e]) : 0 !== r[e] && {
3: 1,
4: 1,
5: 1,
6: 1,
7: 1,
8: 1,
9: 1,
10: 1,
11: 1,
12: 1,
13: 1,
14: 1,
15: 1,
16: 1,
17: 1,
18: 1,
19: 1,
20: 1,
21: 1,
22: 1,
24: 1,
25: 1,
27: 1,
28: 1,
29: 1,
30: 1,
31: 1,
32: 1,
34: 1,
35: 1,
36: 1,
37: 1,
38: 1,
39: 1,
40: 1,
41: 1,
42: 1,
43: 1,
44: 1,
45: 1,
46: 1,
47: 1,
48: 1,
49: 1,
50: 1,
51: 1,
52: 1,
53: 1,
54: 1,
55: 1,
56: 1,
57: 1,
58: 1,
59: 1,
60: 1,
61: 1,
62: 1,
63: 1,
64: 1,
65: 1,
66: 1,
67: 1,
68: 1,
69: 1,
70: 1,
71: 1,
73: 1,
74: 1,
75: 1,
76: 1,
77: 1,
79: 1,
81: 1,
82: 1,
84: 1,
85: 1,
86: 1,
87: 1,
88: 1,
89: 1,
90: 1,
91: 1,
92: 1,
93: 1,
94: 1,
95: 1,
96: 1,
97: 1,
98: 1,
99: 1,
100: 1,
101: 1,
102: 1,
103: 1,
104: 1,
105: 1,
107: 1
}[e] && t.push(r[e] = new Promise((function (t, a) {
for (var c = "static/" + ({
2: "vendors~academe~acvitity~email-unsubscribe~hp-2020~motif-catalog~project-settled-welcome~special-top~0049f470",
3: "chronicle~home~hot-list-catalog~local-station~motif-detail~policy-detail~search-list-Detail~tags-Detail",
4: "newsflash-catalog",
5: "vendors~wise-2019~wise-2019-nov~wise-2019-nov-dec",
6: "home~motif-detail",
7: "invite-record-entry",
8: "live-channel~live-column",
9: "nftags",
10: "project-form-claim",
11: "project-seek-report-36kr",
12: "project-settled-welcome",
13: "search-list",
14: "tags",
15: "video-detail",
17: "LPlan",
18: "VClub",
19: "about",
20: "about-us-en",
21: "academe",
22: "acvitity",
24: "application-authority",
25: "article",
26: "audit-investor",
27: "author",
28: "baidu-ai",
29: "chronicle",
30: "defaultReport",
31: "defaultReport2021",
32: "dell2021FormSuccess",
33: "demo",
34: "download",
35: "email-unsubscribe",
36: "enterprise-catalog",
37: "enterprise-detail",
38: "enterprisesList",
39: "entrepreneurship-competition",
40: "entrepreneurship-project-list",
41: "external-author-apply",
42: "facebookFormSuccess",
43: "gclub-catalog",
44: "home",
45: "hot-list-catalog",
46: "hot-list-detail",
47: "hp-2020",
48: "hp-club",
49: "iframe-login",
50: "info-share-list",
51: "information",
52: "innovate",
53: "invite-record-success",
54: "live-channel",
55: "live-column",
56: "live-detail",
57: "live-home",
58: "local-station",
59: "mform",
60: "motif-catalog",
61: "motif-detail",
62: "newsflash-detail",
63: "nftags-Detail",
64: "organization-catalog",
65: "organization-detail",
66: "other-protocols",
67: "overseas",
68: "policy-detail",
69: "privacy-terms",
70: "project-claim-settled-rights",
71: "project-claim-settled-success",
72: "project-detail",
73: "project-info-mod",
74: "project-info-mod-success",
75: "project-library-report",
76: "project-seek-report-new-36kr",
77: "project-seek-report-success",
78: "project-topic-detail",
79: "project-unclaimed",
80: "projects-catalog",
81: "refute-rumor-notice",
82: "rss-center",
84: "s2city-project-list",
85: "s2l-project-list",
86: "search-list-Detail",
87: "search-result",
88: "service-agreement",
89: "sign-up-acvitity",
90: "sign-up-acvitity-form",
91: "sign-up-claim-activity-form-success",
92: "special-topic-catalog",
93: "special-topic-detail",
94: "star-2020-city",
95: "star-2020-yl",
96: "station-business",
97: "tags-Detail",
98: "unsubscribe",
99: "usercenter",
100: "vendors~LPlan",
101: "video-catalog",
102: "wise-2019",
103: "wise-2019-nov",
104: "wise-2019-nov-dec",
105: "wise-2020-efficiency"
}[e] || e) + "." + {
0: "31d6cfe0",
1: "31d6cfe0",
2: "31d6cfe0",
3: "6185cfd9",
4: "c604bcc2",
5: "cbdba712",
6: "751ce55a",
7: "439820b9",
8: "5b198e53",
9: "4201c8be",
10: "91089e5b",
11: "3112225a",
12: "18cd8a4c",
13: "855c18a5",
14: "4201c8be",
15: "bebeb6d0",
16: "a113e4d2",
17: "29faa47e",
18: "7eefd931",
19: "545152db",
20: "0565ab62",
21: "b2629252",
22: "b18f9fb5",
24: "7c9ee757",
25: "b5731980",
26: "31d6cfe0",
27: "1a05e8b6",
28: "f8ab52ca",
29: "a5e9e7be",
30: "c785b037",
31: "7118a397",
32: "e429abf5",
33: "31d6cfe0",
34: "f95caa45",
35: "18ab7052",
36: "a6a1996d",
37: "c7ef5636",
38: "45e29b62",
39: "1462f806",
40: "ffce1e02",
41: "9b26b463",
42: "e1edb531",
43: "629569f8",
44: "9e65eccb",
45: "e505893a",
46: "fc4814f6",
47: "c9f3016f",
48: "24deea8b",
49: "84b7b4c6",
50: "26a313b6",
51: "5676f72c",
52: "c0c90251",
53: "43dbf94b",
54: "7a1f0e0e",
55: "dc501ece",
56: "6a327cdc",
57: "894433a2",
58: "4707d449",
59: "94e3020f",
60: "23d2891d",
61: "4c514903",
62: "14061666",
63: "3e48286b",
64: "68b91aca",
65: "5badd26f",
66: "da1bcfba",
67: "5ad3788b",
68: "9fb932a6",
69: "1f4e9cd8",
70: "5be6b9db",
71: "0d63ddb5",
72: "31d6cfe0",
73: "aff98cc6",
74: "57e76863",
75: "39d7242f",
76: "0a9050dc",
77: "17cbd9b4",
78: "31d6cfe0",
79: "5c657ff4",
80: "31d6cfe0",
81: "d49e4a80",
82: "5f82defe",
84: "321dde9e",
85: "bc845698",
86: "75da9c1c",
87: "41caa0a9",
88: "49c3acd0",
89: "df311389",
90: "c1e03716",
91: "51f0d678",
92: "ea9b55d1",
93: "ade38c9f",
94: "231df59d",
95: "3f2653e4",
96: "35171aa8",
97: "27e4c878",
98: "4a0de17b",
99: "d89c327e",
100: "c412edf5",
101: "ff43c61c",
102: "d498d2f5",
103: "41fc484d",
104: "179ff0ab",
105: "21c36c89",
106: "31d6cfe0",
107: "57be4e4e"
}[e] + ".css", o = n.p + c, i = document.getElementsByTagName("link"), s = 0; s < i.length; s++) {
var l = (f = i[s]).getAttribute("data-href") || f.getAttribute("href");
if ("stylesheet" === f.rel && (l === c || l === o))
return t()
}
var d = document.getElementsByTagName("style");
for (s = 0; s < d.length; s++) {
var f;
if ((l = (f = d[s]).getAttribute("data-href")) === c || l === o)
return t()
}
var u = document.createElement("link");
u.rel = "stylesheet",
u.type = "text/css",
u.onload = t,
u.onerror = function (t) {
var c = t && t.target && t.target.src || o
, i = new Error("Loading CSS chunk " + e + " failed.\n(" + c + ")");
i.code = "CSS_CHUNK_LOAD_FAILED",
i.request = c,
delete r[e],
u.parentNode.removeChild(u),
a(i)
}
,
u.href = o,
document.getElementsByTagName("head")[0].appendChild(u)
}
)).then((function () {
r[e] = 0
}
)));
var a = o[e];
if (0 !== a)
if (a)
t.push(a[2]);
else {
var c = new Promise((function (t, c) {
a = o[e] = [t, c]
}
));
t.push(a[2] = c);
var i, s = document.createElement("script");
s.charset = "utf-8",
s.timeout = 120,
n.nc && s.setAttribute("nonce", n.nc),
s.src = function (e) {
return n.p + "static/" + ({
2: "vendors~academe~acvitity~email-unsubscribe~hp-2020~motif-catalog~project-settled-welcome~special-top~0049f470",
3: "chronicle~home~hot-list-catalog~local-station~motif-detail~policy-detail~search-list-Detail~tags-Detail",
4: "newsflash-catalog",
5: "vendors~wise-2019~wise-2019-nov~wise-2019-nov-dec",
6: "home~motif-detail",
7: "invite-record-entry",
8: "live-channel~live-column",
9: "nftags",
10: "project-form-claim",
11: "project-seek-report-36kr",
12: "project-settled-welcome",
13: "search-list",
14: "tags",
15: "video-detail",
17: "LPlan",
18: "VClub",
19: "about",
20: "about-us-en",
21: "academe",
22: "acvitity",
24: "application-authority",
25: "article",
26: "audit-investor",
27: "author",
28: "baidu-ai",
29: "chronicle",
30: "defaultReport",
31: "defaultReport2021",
32: "dell2021FormSuccess",
33: "demo",
34: "download",
35: "email-unsubscribe",
36: "enterprise-catalog",
37: "enterprise-detail",
38: "enterprisesList",
39: "entrepreneurship-competition",
40: "entrepreneurship-project-list",
41: "external-author-apply",
42: "facebookFormSuccess",
43: "gclub-catalog",
44: "home",
45: "hot-list-catalog",
46: "hot-list-detail",
47: "hp-2020",
48: "hp-club",
49: "iframe-login",
50: "info-share-list",
51: "information",
52: "innovate",
53: "invite-record-success",
54: "live-channel",
55: "live-column",
56: "live-detail",
57: "live-home",
58: "local-station",
59: "mform",
60: "motif-catalog",
61: "motif-detail",
62: "newsflash-detail",
63: "nftags-Detail",
64: "organization-catalog",
65: "organization-detail",
66: "other-protocols",
67: "overseas",
68: "policy-detail",
69: "privacy-terms",
70: "project-claim-settled-rights",
71: "project-claim-settled-success",
72: "project-detail",
73: "project-info-mod",
74: "project-info-mod-success",
75: "project-library-report",
76: "project-seek-report-new-36kr",
77: "project-seek-report-success",
78: "project-topic-detail",
79: "project-unclaimed",
80: "projects-catalog",
81: "refute-rumor-notice",
82: "rss-center",
84: "s2city-project-list",
85: "s2l-project-list",
86: "search-list-Detail",
87: "search-result",
88: "service-agreement",
89: "sign-up-acvitity",
90: "sign-up-acvitity-form",
91: "sign-up-claim-activity-form-success",
92: "special-topic-catalog",
93: "special-topic-detail",
94: "star-2020-city",
95: "star-2020-yl",
96: "station-business",
97: "tags-Detail",
98: "unsubscribe",
99: "usercenter",
100: "vendors~LPlan",
101: "video-catalog",
102: "wise-2019",
103: "wise-2019-nov",
104: "wise-2019-nov-dec",
105: "wise-2020-efficiency"
}[e] || e) + "." + {
0: "caa23179",
1: "e8bb4230",
2: "f69958ba",
3: "e0c27df6",
4: "3e53f2a7",
5: "f5525a5f",
6: "a1e89bf9",
7: "de49028d",
8: "3f8dbf69",
9: "e1995a70",
10: "3f29711c",
11: "e1f9dcad",
12: "1c0a4329",
13: "dd63f044",
14: "a33bd04e",
15: "81b53f93",
16: "9c88a00b",
17: "8e8bb59d",
18: "25a613ed",
19: "d505009f",
20: "55554a86",
21: "b48174b4",
22: "5c919cdf",
24: "93ab7bd7",
25: "75acb832",
26: "e97ff511",
27: "122dafb0",
28: "f7c06398",
29: "817cbe94",
30: "705fef68",
31: "0f49b4a2",
32: "72892536",
33: "55189e19",
34: "37070c39",
35: "c3fa9382",
36: "cbe977d0",
37: "afe1355d",
38: "113d21b9",
39: "d7354e20",
40: "6071ffc9",
41: "248bcdf2",
42: "366ea3b5",
43: "f51fc5e6",
44: "e0210910",
45: "96bb4b8f",
46: "b8fd902e",
47: "40e0ca3e",
48: "c27d5650",
49: "7712c9e3",
50: "7e684dd6",
51: "7417f096",
52: "fbcd05e7",
53: "e9ce1453",
54: "e1527964",
55: "bb3e35e5",
56: "8224fa48",
57: "111fbeec",
58: "eb47920d",
59: "86076b8b",
60: "2ea49779",
61: "9121e6c9",
62: "8ba9fb44",
63: "d1126af8",
64: "10788711",
65: "896c2ab5",
66: "adc6127a",
67: "b7073246",
68: "a6db66e3",
69: "58d136ac",
70: "fbc4c655",
71: "4f4f776f",
72: "828c0290",
73: "6f44f79e",
74: "cd386804",
75: "7786983a",
76: "7b18ce31",
77: "2bb25aca",
78: "4dfc4131",
79: "42ba23c7",
80: "39d0c785",
81: "a220d9ff",
82: "b00c0d64",
84: "d1011cff",
85: "ced34626",
86: "d4de51d6",
87: "88de1e63",
88: "d6ca61ea",
89: "2ed2c458",
90: "a143f5c8",
91: "d1b1cb02",
92: "9fddda4a",
93: "ff41f2c6",
94: "f729208d",
95: "5e3cdf8c",
96: "47abe6fd",
97: "f4ce8e42",
98: "12f5330a",
99: "bace9775",
100: "9497e2bf",
101: "a9467cc9",
102: "6d29eb74",
103: "86e66511",
104: "4871e422",
105: "5dd31414",
106: "995f46f7",
107: "f975bb14"
}[e] + ".js"
}(e);
var l = new Error;
i = function (t) {
s.onerror = s.onload = null,
clearTimeout(d);
var a = o[e];
if (0 !== a) {
if (a) {
var c = t && ("load" === t.type ? "missing" : t.type)
, r = t && t.target && t.target.src;
l.message = "Loading chunk " + e + " failed.\n(" + c + ": " + r + ")",
l.name = "ChunkLoadError",
l.type = c,
l.request = r,
a[1](l)
}
o[e] = void 0
}
}
;
var d = setTimeout((function () {
i({
type: "timeout",
target: s
})
}
), 12e4);
s.onerror = s.onload = i,
document.head.appendChild(s)
}
return Promise.all(t)
}
,
n.m = e,
n.c = c,
n.d = function (e, t, a) {
n.o(e, t) || Object.defineProperty(e, t, {
enumerable: !0,
get: a
})
}
,
n.r = function (e) {
"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {
value: "Module"
}),
Object.defineProperty(e, "__esModule", {
value: !0
})
}
,
n.t = function (e, t) {
if (1 & t && (e = n(e)),
8 & t)
return e;
if (4 & t && "object" == typeof e && e && e.__esModule)
return e;
var a = Object.create(null);
if (n.r(a),
Object.defineProperty(a, "default", {
enumerable: !0,
value: e
}),
2 & t && "string" != typeof e)
for (var c in e)
n.d(a, c, function (t) {
return e[t]
}
.bind(null, c));
return a
}
,
n.n = function (e) {
var t = e && e.__esModule ? function () {
return e.default
}
: function () {
return e
}
;
return n.d(t, "a", t),
t
}
,
n.o = function (e, t) {
return Object.prototype.hasOwnProperty.call(e, t)
}
,
n.p = "//staticx.36krcdn.com/36kr-web/",
n.oe = function (e) {
throw console.error(e),
e
}
;
var s = window.webpackJsonp = window.webpackJsonp || []
, l = s.push.bind(s);
s.push = t,
s = s.slice();
for (var d = 0; d < s.length; d++)
t(s[d]);
var f = l;
bc = n;
}(
{
778: function (e, t, n) {
var r, o, i;
o = [t],
void 0 === (i = "function" == typeof (r = function (e) {
var t;
function n(e, t, n) {
null != e && ("number" == typeof e ? this.fromNumber(e, t, n) : null == t && "string" != typeof e ? this.fromString(e, 256) : this.fromString(e, t))
}
function r() {
return new n(null)
}
"Microsoft Internet Explorer" == navigator.appName ? (n.prototype.am = function (e, t, n, r, o, i) {
for (var a = 32767 & t, s = t >> 15; --i >= 0;) {
var u = 32767 & this[e]
, c = this[e++] >> 15
, l = s * u + c * a;
o = ((u = a * u + ((32767 & l) << 15) + n[r] + (1073741823 & o)) >>> 30) + (l >>> 15) + s * c + (o >>> 30),
n[r++] = 1073741823 & u
}
return o
}
,
t = 30) : "Netscape" != navigator.appName ? (n.prototype.am = function (e, t, n, r, o, i) {
for (; --i >= 0;) {
var a = t * this[e++] + n[r] + o;
o = Math.floor(a / 67108864),
n[r++] = 67108863 & a
}
return o
}
,
t = 26) : (n.prototype.am = function (e, t, n, r, o, i) {
for (var a = 16383 & t, s = t >> 14; --i >= 0;) {
var u = 16383 & this[e]
, c = this[e++] >> 14
, l = s * u + c * a;
o = ((u = a * u + ((16383 & l) << 14) + n[r] + o) >> 28) + (l >> 14) + s * c,
n[r++] = 268435455 & u
}
return o
}
,
t = 28),
n.prototype.DB = t,
n.prototype.DM = (1 << t) - 1,
n.prototype.DV = 1 << t,
n.prototype.FV = Math.pow(2, 52),
n.prototype.F1 = 52 - t,
n.prototype.F2 = 2 * t - 52;
var o, i, a = new Array;
for (o = "0".charCodeAt(0),
i = 0; i <= 9; ++i)
a[o++] = i;
for (o = "a".charCodeAt(0),
i = 10; i < 36; ++i)
a[o++] = i;
for (o = "A".charCodeAt(0),
i = 10; i < 36; ++i)
a[o++] = i;
function s(e) {
return "0123456789abcdefghijklmnopqrstuvwxyz".charAt(e)
}
function u(e, t) {
var n = a[e.charCodeAt(t)];
return null == n ? -1 : n
}
function c(e) {
var t = r();
return t.fromInt(e),
t
}
function l(e) {
var t, n = 1;
return 0 != (t = e >>> 16) && (e = t,
n += 16),
0 != (t = e >> 8) && (e = t,
n += 8),
0 != (t = e >> 4) && (e = t,
n += 4),
0 != (t = e >> 2) && (e = t,
n += 2),
0 != (t = e >> 1) && (e = t,
n += 1),
n
}
function f(e) {
this.m = e
}
function d(e) {
this.m = e,
this.mp = e.invDigit(),
this.mpl = 32767 & this.mp,
this.mph = this.mp >> 15,
this.um = (1 << e.DB - 15) - 1,
this.mt2 = 2 * e.t
}
function p(e, t) {
return e & t
}
function h(e, t) {
return e | t
}
function m(e, t) {
return e ^ t
}
function _(e, t) {
return e & ~t
}
function y(e) {
if (0 == e)
return -1;
var t = 0;
return 0 == (65535 & e) && (e >>= 16,
t += 16),
0 == (255 & e) && (e >>= 8,
t += 8),
0 == (15 & e) && (e >>= 4,
t += 4),
0 == (3 & e) && (e >>= 2,
t += 2),
0 == (1 & e) && ++t,
t
}
function g(e) {
for (var t = 0; 0 != e;)
e &= e - 1,
++t;
return t
}
function b() {
}
function T(e) {
return e
}
function E(e) {
this.r2 = r(),
this.q3 = r(),
n.ONE.dlShiftTo(2 * e.t, this.r2),
this.mu = this.r2.divide(e),
this.m = e
}
f.prototype.convert = function (e) {
return e.s < 0 || e.compareTo(this.m) >= 0 ? e.mod(this.m) : e
}
,
f.prototype.revert = function (e) {
return e
}
,
f.prototype.reduce = function (e) {
e.divRemTo(this.m, null, e)
}
,
f.prototype.mulTo = function (e, t, n) {
e.multiplyTo(t, n),
this.reduce(n)
}
,
f.prototype.sqrTo = function (e, t) {
e.squareTo(t),
this.reduce(t)
}
,
d.prototype.convert = function (e) {
var t = r();
return e.abs().dlShiftTo(this.m.t, t),
t.divRemTo(this.m, null, t),
e.s < 0 && t.compareTo(n.ZERO) > 0 && this.m.subTo(t, t),
t
}
,
d.prototype.revert = function (e) {
var t = r();
return e.copyTo(t),
this.reduce(t),
t
}
,
d.prototype.reduce = function (e) {
for (; e.t <= this.mt2;)
e[e.t++] = 0;
for (var t = 0; t < this.m.t; ++t) {
var n = 32767 & e[t]
,
r = n * this.mpl + ((n * this.mph + (e[t] >> 15) * this.mpl & this.um) << 15) & e.DM;
for (e[n = t + this.m.t] += this.m.am(0, r, e, t, 0, this.m.t); e[n] >= e.DV;)
e[n] -= e.DV,
e[++n]++
}
e.clamp(),
e.drShiftTo(this.m.t, e),
e.compareTo(this.m) >= 0 && e.subTo(this.m, e)
}
,
d.prototype.mulTo = function (e, t, n) {
e.multiplyTo(t, n),
this.reduce(n)
}
,
d.prototype.sqrTo = function (e, t) {
e.squareTo(t),
this.reduce(t)
}
,
n.prototype.copyTo = function (e) {
for (var t = this.t - 1; t >= 0; --t)
e[t] = this[t];
e.t = this.t,
e.s = this.s
}
,
n.prototype.fromInt = function (e) {
this.t = 1,
this.s = e < 0 ? -1 : 0,
e > 0 ? this[0] = e : e < -1 ? this[0] = e + this.DV : this.t = 0
}
,
n.prototype.fromString = function (e, t) {
var r;
if (16 == t)
r = 4;
else if (8 == t)
r = 3;
else if (256 == t)
r = 8;
else if (2 == t)
r = 1;
else if (32 == t)
r = 5;
else {
if (4 != t)
return void this.fromRadix(e, t);
r = 2
}
this.t = 0,
this.s = 0;
for (var o = e.length, i = !1, a = 0; --o >= 0;) {
var s = 8 == r ? 255 & e[o] : u(e, o);
s < 0 ? "-" == e.charAt(o) && (i = !0) : (i = !1,
0 == a ? this[this.t++] = s : a + r > this.DB ? (this[this.t - 1] |= (s & (1 << this.DB - a) - 1) << a,
this[this.t++] = s >> this.DB - a) : this[this.t - 1] |= s << a,
(a += r) >= this.DB && (a -= this.DB))
}
8 == r && 0 != (128 & e[0]) && (this.s = -1,
a > 0 && (this[this.t - 1] |= (1 << this.DB - a) - 1 << a)),
this.clamp(),
i && n.ZERO.subTo(this, this)
}
,
n.prototype.clamp = function () {
for (var e = this.s & this.DM; this.t > 0 && this[this.t - 1] == e;)
--this.t
}
,
n.prototype.dlShiftTo = function (e, t) {
var n;
for (n = this.t - 1; n >= 0; --n)
t[n + e] = this[n];
for (n = e - 1; n >= 0; --n)
t[n] = 0;
t.t = this.t + e,
t.s = this.s
}
,
n.prototype.drShiftTo = function (e, t) {
for (var n = e; n < this.t; ++n)
t[n - e] = this[n];
t.t = Math.max(this.t - e, 0),
t.s = this.s
}
,
n.prototype.lShiftTo = function (e, t) {
var n, r = e % this.DB, o = this.DB - r, i = (1 << o) - 1, a = Math.floor(e / this.DB),
s = this.s << r & this.DM;
for (n = this.t - 1; n >= 0; --n)
t[n + a + 1] = this[n] >> o | s,
s = (this[n] & i) << r;
for (n = a - 1; n >= 0; --n)
t[n] = 0;
t[a] = s,
t.t = this.t + a + 1,
t.s = this.s,
t.clamp()
}
,
n.prototype.rShiftTo = function (e, t) {
t.s = this.s;
var n = Math.floor(e / this.DB);
if (n >= this.t)
t.t = 0;
else {
var r = e % this.DB
, o = this.DB - r
, i = (1 << r) - 1;
t[0] = this[n] >> r;
for (var a = n + 1; a < this.t; ++a)
t[a - n - 1] |= (this[a] & i) << o,
t[a - n] = this[a] >> r;
r > 0 && (t[this.t - n - 1] |= (this.s & i) << o),
t.t = this.t - n,
t.clamp()
}
}
,
n.prototype.subTo = function (e, t) {
for (var n = 0, r = 0, o = Math.min(e.t, this.t); n < o;)
r += this[n] - e[n],
t[n++] = r & this.DM,
r >>= this.DB;
if (e.t < this.t) {
for (r -= e.s; n < this.t;)
r += this[n],
t[n++] = r & this.DM,
r >>= this.DB;
r += this.s
} else {
for (r += this.s; n < e.t;)
r -= e[n],
t[n++] = r & this.DM,
r >>= this.DB;
r -= e.s
}
t.s = r < 0 ? -1 : 0,
r < -1 ? t[n++] = this.DV + r : r > 0 && (t[n++] = r),
t.t = n,
t.clamp()
}
,
n.prototype.multiplyTo = function (e, t) {
var r = this.abs()
, o = e.abs()
, i = r.t;
for (t.t = i + o.t; --i >= 0;)
t[i] = 0;
for (i = 0; i < o.t; ++i)
t[i + r.t] = r.am(0, o[i], t, i, 0, r.t);
t.s = 0,
t.clamp(),
this.s != e.s && n.ZERO.subTo(t, t)
}
,
n.prototype.squareTo = function (e) {
for (var t = this.abs(), n = e.t = 2 * t.t; --n >= 0;)
e[n] = 0;
for (n = 0; n < t.t - 1; ++n) {
var r = t.am(n, t[n], e, 2 * n, 0, 1);
(e[n + t.t] += t.am(n + 1, 2 * t[n], e, 2 * n + 1, r, t.t - n - 1)) >= t.DV && (e[n + t.t] -= t.DV,
e[n + t.t + 1] = 1)
}
e.t > 0 && (e[e.t - 1] += t.am(n, t[n], e, 2 * n, 0, 1)),
e.s = 0,
e.clamp()
}
,
n.prototype.divRemTo = function (e, t, o) {
var i = e.abs();
if (!(i.t <= 0)) {
var a = this.abs();
if (a.t < i.t)
return null != t && t.fromInt(0),
void (null != o && this.copyTo(o));
null == o && (o = r());
var s = r()
, u = this.s
, c = e.s
, f = this.DB - l(i[i.t - 1]);
f > 0 ? (i.lShiftTo(f, s),
a.lShiftTo(f, o)) : (i.copyTo(s),
a.copyTo(o));
var d = s.t
, p = s[d - 1];
if (0 != p) {
var h = p * (1 << this.F1) + (d > 1 ? s[d - 2] >> this.F2 : 0)
, m = this.FV / h
, _ = (1 << this.F1) / h
, y = 1 << this.F2
, g = o.t
, v = g - d
, b = null == t ? r() : t;
for (s.dlShiftTo(v, b),
o.compareTo(b) >= 0 && (o[o.t++] = 1,
o.subTo(b, o)),
n.ONE.dlShiftTo(d, b),
b.subTo(s, s); s.t < d;)
s[s.t++] = 0;
for (; --v >= 0;) {
var T = o[--g] == p ? this.DM : Math.floor(o[g] * m + (o[g - 1] + y) * _);
if ((o[g] += s.am(0, T, o, v, 0, d)) < T)
for (s.dlShiftTo(v, b),
o.subTo(b, o); o[g] < --T;)
o.subTo(b, o)
}
null != t && (o.drShiftTo(d, t),
u != c && n.ZERO.subTo(t, t)),
o.t = d,
o.clamp(),
f > 0 && o.rShiftTo(f, o),
u < 0 && n.ZERO.subTo(o, o)
}
}
}
,
n.prototype.invDigit = function () {
if (this.t < 1)
return 0;
var e = this[0];
if (0 == (1 & e))
return 0;
var t = 3 & e;
return (t = (t = (t = (t = t * (2 - (15 & e) * t) & 15) * (2 - (255 & e) * t) & 255) * (2 - ((65535 & e) * t & 65535)) & 65535) * (2 - e * t % this.DV) % this.DV) > 0 ? this.DV - t : -t
}
,
n.prototype.isEven = function () {
return 0 == (this.t > 0 ? 1 & this[0] : this.s)
}
,
n.prototype.exp = function (e, t) {
if (e > 4294967295 || e < 1)
return n.ONE;
var o = r()
, i = r()
, a = t.convert(this)
, s = l(e) - 1;
for (a.copyTo(o); --s >= 0;)
if (t.sqrTo(o, i),
(e & 1 << s) > 0)
t.mulTo(i, a, o);
else {
var u = o;
o = i,
i = u
}
return t.revert(o)
}
,
n.prototype.toString = function (e) {
if (this.s < 0)
return "-" + this.negate().toString(e);
var t;
if (16 == e)
t = 4;
else if (8 == e)
t = 3;
else if (2 == e)
t = 1;
else if (32 == e)
t = 5;
else {
if (4 != e)
return this.toRadix(e);
t = 2
}
var n, r = (1 << t) - 1, o = !1, i = "", a = this.t, u = this.DB - a * this.DB % t;
if (a-- > 0)
for (u < this.DB && (n = this[a] >> u) > 0 && (o = !0,
i = s(n)); a >= 0;)
u < t ? (n = (this[a] & (1 << u) - 1) << t - u,
n |= this[--a] >> (u += this.DB - t)) : (n = this[a] >> (u -= t) & r,
u <= 0 && (u += this.DB,
--a)),
n > 0 && (o = !0),
o && (i += s(n));
return o ? i : "0"
}
,
n.prototype.negate = function () {
var e = r();
return n.ZERO.subTo(this, e),
e
}
,
n.prototype.abs = function () {
return this.s < 0 ? this.negate() : this
}
,
n.prototype.compareTo = function (e) {
var t = this.s - e.s;
if (0 != t)
return t;
var n = this.t;
if (0 != (t = n - e.t))
return this.s < 0 ? -t : t;
for (; --n >= 0;)
if (0 != (t = this[n] - e[n]))
return t;
return 0
}
,
n.prototype.bitLength = function () {
return this.t <= 0 ? 0 : this.DB * (this.t - 1) + l(this[this.t - 1] ^ this.s & this.DM)
}
,
n.prototype.mod = function (e) {
var t = r();
return this.abs().divRemTo(e, null, t),
this.s < 0 && t.compareTo(n.ZERO) > 0 && e.subTo(t, t),
t
}
,
n.prototype.modPowInt = function (e, t) {
var n;
return n = e < 256 || t.isEven() ? new f(t) : new d(t),
this.exp(e, n)
}
,
n.ZERO = c(0),
n.ONE = c(1),
b.prototype.convert = T,
b.prototype.revert = T,
b.prototype.mulTo = function (e, t, n) {
e.multiplyTo(t, n)
}
,
b.prototype.sqrTo = function (e, t) {
e.squareTo(t)
}
,
E.prototype.convert = function (e) {
if (e.s < 0 || e.t > 2 * this.m.t)
return e.mod(this.m);
if (e.compareTo(this.m) < 0)
return e;
var t = r();
return e.copyTo(t),
this.reduce(t),
t
}
,
E.prototype.revert = function (e) {
return e
}
,
E.prototype.reduce = function (e) {
for (e.drShiftTo(this.m.t - 1, this.r2),
e.t > this.m.t + 1 && (e.t = this.m.t + 1,
e.clamp()),
this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3),
this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2); e.compareTo(this.r2) < 0;)
e.dAddOffset(1, this.m.t + 1);
for (e.subTo(this.r2, e); e.compareTo(this.m) >= 0;)
e.subTo(this.m, e)
}
,
E.prototype.mulTo = function (e, t, n) {
e.multiplyTo(t, n),
this.reduce(n)
}
,
E.prototype.sqrTo = function (e, t) {
e.squareTo(t),
this.reduce(t)
}
;
var w, S, M,
k = [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],
O = (1 << 26) / k[k.length - 1];
function L() {
this.i = 0,
this.j = 0,
this.S = new Array
}
if (n.prototype.chunkSize = function (e) {
return Math.floor(Math.LN2 * this.DB / Math.log(e))
}
,
n.prototype.toRadix = function (e) {
if (null == e && (e = 10),
0 == this.signum() || e < 2 || e > 36)
return "0";
var t = this.chunkSize(e)
, n = Math.pow(e, t)
, o = c(n)
, i = r()
, a = r()
, s = "";
for (this.divRemTo(o, i, a); i.signum() > 0;)
s = (n + a.intValue()).toString(e).substr(1) + s,
i.divRemTo(o, i, a);
return a.intValue().toString(e) + s
}
,
n.prototype.fromRadix = function (e, t) {
this.fromInt(0),
null == t && (t = 10);
for (var r = this.chunkSize(t), o = Math.pow(t, r), i = !1, a = 0, s = 0, c = 0; c < e.length; ++c) {
var l = u(e, c);
l < 0 ? "-" == e.charAt(c) && 0 == this.signum() && (i = !0) : (s = t * s + l,
++a >= r && (this.dMultiply(o),
this.dAddOffset(s, 0),
a = 0,
s = 0))
}
a > 0 && (this.dMultiply(Math.pow(t, a)),
this.dAddOffset(s, 0)),
i && n.ZERO.subTo(this, this)
}
,
n.prototype.fromNumber = function (e, t, r) {
if ("number" == typeof t)
if (e < 2)
this.fromInt(1);
else
for (this.fromNumber(e, r),
this.testBit(e - 1) || this.bitwiseTo(n.ONE.shiftLeft(e - 1), h, this),
this.isEven() && this.dAddOffset(1, 0); !this.isProbablePrime(t);)
this.dAddOffset(2, 0),
this.bitLength() > e && this.subTo(n.ONE.shiftLeft(e - 1), this);
else {
var o = new Array
, i = 7 & e;
o.length = 1 + (e >> 3),
t.nextBytes(o),
i > 0 ? o[0] &= (1 << i) - 1 : o[0] = 0,
this.fromString(o, 256)
}
}
,
n.prototype.bitwiseTo = function (e, t, n) {
var r, o, i = Math.min(e.t, this.t);
for (r = 0; r < i; ++r)
n[r] = t(this[r], e[r]);
if (e.t < this.t) {
for (o = e.s & this.DM,
r = i; r < this.t; ++r)
n[r] = t(this[r], o);
n.t = this.t
} else {
for (o = this.s & this.DM,
r = i; r < e.t; ++r)
n[r] = t(o, e[r]);
n.t = e.t
}
n.s = t(this.s, e.s),
n.clamp()
}
,
n.prototype.changeBit = function (e, t) {
var r = n.ONE.shiftLeft(e);
return this.bitwiseTo(r, t, r),
r
}
,
n.prototype.addTo = function (e, t) {
for (var n = 0, r = 0, o = Math.min(e.t, this.t); n < o;)
r += this[n] + e[n],
t[n++] = r & this.DM,
r >>= this.DB;
if (e.t < this.t) {
for (r += e.s; n < this.t;)
r += this[n],
t[n++] = r & this.DM,
r >>= this.DB;
r += this.s
} else {
for (r += this.s; n < e.t;)
r += e[n],
t[n++] = r & this.DM,
r >>= this.DB;
r += e.s
}
t.s = r < 0 ? -1 : 0,
r > 0 ? t[n++] = r : r < -1 && (t[n++] = this.DV + r),
t.t = n,
t.clamp()
}
,
n.prototype.dMultiply = function (e) {
this[this.t] = this.am(0, e - 1, this, 0, 0, this.t),
++this.t,
this.clamp()
}
,
n.prototype.dAddOffset = function (e, t) {
if (0 != e) {
for (; this.t <= t;)
this[this.t++] = 0;
for (this[t] += e; this[t] >= this.DV;)
this[t] -= this.DV,
++t >= this.t && (this[this.t++] = 0),
++this[t]
}
}
,
n.prototype.multiplyLowerTo = function (e, t, n) {
var r, o = Math.min(this.t + e.t, t);
for (n.s = 0,
n.t = o; o > 0;)
n[--o] = 0;
for (r = n.t - this.t; o < r; ++o)
n[o + this.t] = this.am(0, e[o], n, o, 0, this.t);
for (r = Math.min(e.t, t); o < r; ++o)
this.am(0, e[o], n, o, 0, t - o);
n.clamp()
}
,
n.prototype.multiplyUpperTo = function (e, t, n) {
--t;
var r = n.t = this.t + e.t - t;
for (n.s = 0; --r >= 0;)
n[r] = 0;
for (r = Math.max(t - this.t, 0); r < e.t; ++r)
n[this.t + r - t] = this.am(t - r, e[r], n, 0, 0, this.t + r - t);
n.clamp(),
n.drShiftTo(1, n)
}
,
n.prototype.modInt = function (e) {
if (e <= 0)
return 0;
var t = this.DV % e
, n = this.s < 0 ? e - 1 : 0;
if (this.t > 0)
if (0 == t)
n = this[0] % e;
else
for (var r = this.t - 1; r >= 0; --r)
n = (t * n + this[r]) % e;
return n
}
,
n.prototype.millerRabin = function (e) {
var t = this.subtract(n.ONE)
, o = t.getLowestSetBit();
if (o <= 0)
return !1;
var i = t.shiftRight(o);
(e = e + 1 >> 1) > k.length && (e = k.length);
for (var a = r(), s = 0; s < e; ++s) {
a.fromInt(k[Math.floor(Math.random() * k.length)]);
var u = a.modPow(i, this);
if (0 != u.compareTo(n.ONE) && 0 != u.compareTo(t)) {
for (var c = 1; c++ < o && 0 != u.compareTo(t);)
if (0 == (u = u.modPowInt(2, this)).compareTo(n.ONE))
return !1;
if (0 != u.compareTo(t))
return !1
}
}
return !0
}
,
n.prototype.clone = function () {
var e = r();
return this.copyTo(e),
e
}
,
n.prototype.intValue = function () {
if (this.s < 0) {
if (1 == this.t)
return this[0] - this.DV;
if (0 == this.t)
return -1
} else {
if (1 == this.t)
return this[0];
if (0 == this.t)
return 0
}
return (this[1] & (1 << 32 - this.DB) - 1) << this.DB | this[0]
}
,
n.prototype.byteValue = function () {
return 0 == this.t ? this.s : this[0] << 24 >> 24
}
,
n.prototype.shortValue = function () {
return 0 == this.t ? this.s : this[0] << 16 >> 16
}
,
n.prototype.signum = function () {
return this.s < 0 ? -1 : this.t <= 0 || 1 == this.t && this[0] <= 0 ? 0 : 1
}
,
n.prototype.toByteArray = function () {
var e = this.t
, t = new Array;
t[0] = this.s;
var n, r = this.DB - e * this.DB % 8, o = 0;
if (e-- > 0)
for (r < this.DB && (n = this[e] >> r) != (this.s & this.DM) >> r && (t[o++] = n | this.s << this.DB - r); e >= 0;)
r < 8 ? (n = (this[e] & (1 << r) - 1) << 8 - r,
n |= this[--e] >> (r += this.DB - 8)) : (n = this[e] >> (r -= 8) & 255,
r <= 0 && (r += this.DB,
--e)),
0 != (128 & n) && (n |= -256),
0 == o && (128 & this.s) != (128 & n) && ++o,
(o > 0 || n != this.s) && (t[o++] = n);
return t
}
,
n.prototype.equals = function (e) {
return 0 == this.compareTo(e)
}
,
n.prototype.min = function (e) {
return this.compareTo(e) < 0 ? this : e
}
,
n.prototype.max = function (e) {
return this.compareTo(e) > 0 ? this : e
}
,
n.prototype.and = function (e) {
var t = r();
return this.bitwiseTo(e, p, t),
t
}
,
n.prototype.or = function (e) {
var t = r();
return this.bitwiseTo(e, h, t),
t
}
,
n.prototype.xor = function (e) {
var t = r();
return this.bitwiseTo(e, m, t),
t
}
,
n.prototype.andNot = function (e) {
var t = r();
return this.bitwiseTo(e, _, t),
t
}
,
n.prototype.not = function () {
for (var e = r(), t = 0; t < this.t; ++t)
e[t] = this.DM & ~this[t];
return e.t = this.t,
e.s = ~this.s,
e
}
,
n.prototype.shiftLeft = function (e) {
var t = r();
return e < 0 ? this.rShiftTo(-e, t) : this.lShiftTo(e, t),
t
}
,
n.prototype.shiftRight = function (e) {
var t = r();
return e < 0 ? this.lShiftTo(-e, t) : this.rShiftTo(e, t),
t
}
,
n.prototype.getLowestSetBit = function () {
for (var e = 0; e < this.t; ++e)
if (0 != this[e])
return e * this.DB + y(this[e]);
return this.s < 0 ? this.t * this.DB : -1
}
,
n.prototype.bitCount = function () {
for (var e = 0, t = this.s & this.DM, n = 0; n < this.t; ++n)
e += g(this[n] ^ t);
return e
}
,
n.prototype.testBit = function (e) {
var t = Math.floor(e / this.DB);
return t >= this.t ? 0 != this.s : 0 != (this[t] & 1 << e % this.DB)
}
,
n.prototype.setBit = function (e) {
return this.changeBit(e, h)
}
,
n.prototype.clearBit = function (e) {
return this.changeBit(e, _)
}
,
n.prototype.flipBit = function (e) {
return this.changeBit(e, m)
}
,
n.prototype.add = function (e) {
var t = r();
return this.addTo(e, t),
t
}
,
n.prototype.subtract = function (e) {
var t = r();
return this.subTo(e, t),
t
}
,
n.prototype.multiply = function (e) {
var t = r();
return this.multiplyTo(e, t),
t
}
,
n.prototype.divide = function (e) {
var t = r();
return this.divRemTo(e, t, null),
t
}
,
n.prototype.remainder = function (e) {
var t = r();
return this.divRemTo(e, null, t),
t
}
,
n.prototype.divideAndRemainder = function (e) {
var t = r()
, n = r();
return this.divRemTo(e, t, n),
new Array(t, n)
}
,
n.prototype.modPow = function (e, t) {
var n, o, i = e.bitLength(), a = c(1);
if (i <= 0)
return a;
n = i < 18 ? 1 : i < 48 ? 3 : i < 144 ? 4 : i < 768 ? 5 : 6,
o = i < 8 ? new f(t) : t.isEven() ? new E(t) : new d(t);
var s = new Array
, u = 3
, p = n - 1
, h = (1 << n) - 1;
if (s[1] = o.convert(this),
n > 1) {
var m = r();
for (o.sqrTo(s[1], m); u <= h;)
s[u] = r(),
o.mulTo(m, s[u - 2], s[u]),
u += 2
}
var _, y, g = e.t - 1, v = !0, b = r();
for (i = l(e[g]) - 1; g >= 0;) {
for (i >= p ? _ = e[g] >> i - p & h : (_ = (e[g] & (1 << i + 1) - 1) << p - i,
g > 0 && (_ |= e[g - 1] >> this.DB + i - p)),
u = n; 0 == (1 & _);)
_ >>= 1,
--u;
if ((i -= u) < 0 && (i += this.DB,
--g),
v)
s[_].copyTo(a),
v = !1;
else {
for (; u > 1;)
o.sqrTo(a, b),
o.sqrTo(b, a),
u -= 2;
u > 0 ? o.sqrTo(a, b) : (y = a,
a = b,
b = y),
o.mulTo(b, s[_], a)
}
for (; g >= 0 && 0 == (e[g] & 1 << i);)
o.sqrTo(a, b),
y = a,
a = b,
b = y,
--i < 0 && (i = this.DB - 1,
--g)
}
return o.revert(a)
}
,
n.prototype.modInverse = function (e) {
var t = e.isEven();
if (this.isEven() && t || 0 == e.signum())
return n.ZERO;
for (var r = e.clone(), o = this.clone(), i = c(1), a = c(0), s = c(0), u = c(1); 0 != r.signum();) {
for (; r.isEven();)
r.rShiftTo(1, r),
t ? (i.isEven() && a.isEven() || (i.addTo(this, i),
a.subTo(e, a)),
i.rShiftTo(1, i)) : a.isEven() || a.subTo(e, a),
a.rShiftTo(1, a);
for (; o.isEven();)
o.rShiftTo(1, o),
t ? (s.isEven() && u.isEven() || (s.addTo(this, s),
u.subTo(e, u)),
s.rShiftTo(1, s)) : u.isEven() || u.subTo(e, u),
u.rShiftTo(1, u);
r.compareTo(o) >= 0 ? (r.subTo(o, r),
t && i.subTo(s, i),
a.subTo(u, a)) : (o.subTo(r, o),
t && s.subTo(i, s),
u.subTo(a, u))
}
return 0 != o.compareTo(n.ONE) ? n.ZERO : u.compareTo(e) >= 0 ? u.subtract(e) : u.signum() < 0 ? (u.addTo(e, u),
u.signum() < 0 ? u.add(e) : u) : u
}
,
n.prototype.pow = function (e) {
return this.exp(e, new b)
}
,
n.prototype.gcd = function (e) {
var t = this.s < 0 ? this.negate() : this.clone()
, n = e.s < 0 ? e.negate() : e.clone();
if (t.compareTo(n) < 0) {
var r = t;
t = n,
n = r
}
var o = t.getLowestSetBit()
, i = n.getLowestSetBit();
if (i < 0)
return t;
for (o < i && (i = o),
i > 0 && (t.rShiftTo(i, t),
n.rShiftTo(i, n)); t.signum() > 0;)
(o = t.getLowestSetBit()) > 0 && t.rShiftTo(o, t),
(o = n.getLowestSetBit()) > 0 && n.rShiftTo(o, n),
t.compareTo(n) >= 0 ? (t.subTo(n, t),
t.rShiftTo(1, t)) : (n.subTo(t, n),
n.rShiftTo(1, n));
return i > 0 && n.lShiftTo(i, n),
n
}
,
n.prototype.isProbablePrime = function (e) {
var t, n = this.abs();
if (1 == n.t && n[0] <= k[k.length - 1]) {
for (t = 0; t < k.length; ++t)
if (n[0] == k[t])
return !0;
return !1
}
if (n.isEven())
return !1;
for (t = 1; t < k.length;) {
for (var r = k[t], o = t + 1; o < k.length && r < O;)
r *= k[o++];
for (r = n.modInt(r); t < o;)
if (r % k[t++] == 0)
return !1
}
return n.millerRabin(e)
}
,
n.prototype.square = function () {
var e = r();
return this.squareTo(e),
e
}
,
L.prototype.init = function (e) {
var t, n, r;
for (t = 0; t < 256; ++t)
this.S[t] = t;
for (n = 0,
t = 0; t < 256; ++t)
n = n + this.S[t] + e[t % e.length] & 255,
r = this.S[t],
this.S[t] = this.S[n],
this.S[n] = r;
this.i = 0,
this.j = 0
}
,
L.prototype.next = function () {
var e;
return this.i = this.i + 1 & 255,
this.j = this.j + this.S[this.i] & 255,
e = this.S[this.i],
this.S[this.i] = this.S[this.j],
this.S[this.j] = e,
this.S[e + this.S[this.i] & 255]
}
,
null == S) {
var A;
if (S = new Array,
M = 0,
window.crypto && window.crypto.getRandomValues) {
var D = new Uint32Array(256);
for (window.crypto.getRandomValues(D),
A = 0; A < D.length; ++A)
S[M++] = 255 & D[A]
}
var x = function (e) {
if (this.count = this.count || 0,
this.count >= 256 || M >= 256)
window.removeEventListener ? window.removeEventListener("mousemove", x, !1) : window.detachEvent && window.detachEvent("onmousemove", x);
else
try {
var t = e.x + e.y;
S[M++] = 255 & t,
this.count += 1
} catch (e) {
}
};
window.addEventListener ? window.addEventListener("mousemove", x, !1) : window.attachEvent && window.attachEvent("onmousemove", x)
}
function C() {
if (null == w) {
for (w = new L; M < 256;) {
var e = Math.floor(65536 * Math.random());
S[M++] = 255 & e
}
for (w.init(S),
M = 0; M < S.length; ++M)
S[M] = 0;
M = 0
}
return w.next()
}
function N() {
}
function P(e, t) {
return new n(e, t)
}
function R() {
this.n = null,
this.e = 0,
this.d = null,
this.p = null,
this.q = null,
this.dmp1 = null,
this.dmq1 = null,
this.coeff = null
}
N.prototype.nextBytes = function (e) {
var t;
for (t = 0; t < e.length; ++t)
e[t] = C()
}
,
R.prototype.doPublic = function (e) {
return e.modPowInt(this.e, this.n)
}
,
R.prototype.setPublic = function (e, t) {
null != e && null != t && e.length > 0 && t.length > 0 ? (this.n = P(e, 16),
this.e = parseInt(t, 16)) : console.error("Invalid RSA public key")
}
,
R.prototype.encrypt = function (e) {
var t = function (e, t) {
if (t < e.length + 11)
return console.error("Message too long for RSA"),
null;
for (var r = new Array, o = e.length - 1; o >= 0 && t > 0;) {
var i = e.charCodeAt(o--);
i < 128 ? r[--t] = i : i > 127 && i < 2048 ? (r[--t] = 63 & i | 128,
r[--t] = i >> 6 | 192) : (r[--t] = 63 & i | 128,
r[--t] = i >> 6 & 63 | 128,
r[--t] = i >> 12 | 224)
}
r[--t] = 0;
for (var a = new N, s = new Array; t > 2;) {
for (s[0] = 0; 0 == s[0];)
a.nextBytes(s);
r[--t] = s[0]
}
return r[--t] = 2,
r[--t] = 0,
new n(r)
}(e, this.n.bitLength() + 7 >> 3);
if (null == t)
return null;
var r = this.doPublic(t);
if (null == r)
return null;
var o = r.toString(16);
return 0 == (1 & o.length) ? o : "0" + o
}
,
R.prototype.doPrivate = function (e) {
if (null == this.p || null == this.q)
return e.modPow(this.d, this.n);
for (var t = e.mod(this.p).modPow(this.dmp1, this.p), n = e.mod(this.q).modPow(this.dmq1, this.q); t.compareTo(n) < 0;)
t = t.add(this.p);
return t.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n)
}
,
R.prototype.setPrivate = function (e, t, n) {
null != e && null != t && e.length > 0 && t.length > 0 ? (this.n = P(e, 16),
this.e = parseInt(t, 16),
this.d = P(n, 16)) : console.error("Invalid RSA private key")
}
,
R.prototype.setPrivateEx = function (e, t, n, r, o, i, a, s) {
null != e && null != t && e.length > 0 && t.length > 0 ? (this.n = P(e, 16),
this.e = parseInt(t, 16),
this.d = P(n, 16),
this.p = P(r, 16),
this.q = P(o, 16),
this.dmp1 = P(i, 16),
this.dmq1 = P(a, 16),
this.coeff = P(s, 16)) : console.error("Invalid RSA private key")
}
,
R.prototype.generate = function (e, t) {
var r = new N
, o = e >> 1;
this.e = parseInt(t, 16);
for (var i = new n(t, 16); ;) {
for (; this.p = new n(e - o, 1, r),
0 != this.p.subtract(n.ONE).gcd(i).compareTo(n.ONE) || !this.p.isProbablePrime(10);)
;
for (; this.q = new n(o, 1, r),
0 != this.q.subtract(n.ONE).gcd(i).compareTo(n.ONE) || !this.q.isProbablePrime(10);)
;
if (this.p.compareTo(this.q) <= 0) {
var a = this.p;
this.p = this.q,
this.q = a
}
var s = this.p.subtract(n.ONE)
, u = this.q.subtract(n.ONE)
, c = s.multiply(u);
if (0 == c.gcd(i).compareTo(n.ONE)) {
this.n = this.p.multiply(this.q),
this.d = i.modInverse(c),
this.dmp1 = this.d.mod(s),
this.dmq1 = this.d.mod(u),
this.coeff = this.q.modInverse(this.p);
break
}
}
}
,
R.prototype.decrypt = function (e) {
var t = P(e, 16)
, n = this.doPrivate(t);
return null == n ? null : function (e, t) {
for (var n = e.toByteArray(), r = 0; r < n.length && 0 == n[r];)
++r;
if (n.length - r != t - 1 || 2 != n[r])
return null;
for (++r; 0 != n[r];)
if (++r >= n.length)
return null;
for (var o = ""; ++r < n.length;) {
var i = 255 & n[r];
i < 128 ? o += String.fromCharCode(i) : i > 191 && i < 224 ? (o += String.fromCharCode((31 & i) << 6 | 63 & n[r + 1]),
++r) : (o += String.fromCharCode((15 & i) << 12 | (63 & n[r + 1]) << 6 | 63 & n[r + 2]),
r += 2)
}
return o
}(n, this.n.bitLength() + 7 >> 3)
}
,
R.prototype.generateAsync = function (e, t, o) {
var i = new N
, a = e >> 1;
this.e = parseInt(t, 16);
var s = new n(t, 16)
, u = this
, c = function () {
var t = function () {
if (u.p.compareTo(u.q) <= 0) {
var e = u.p;
u.p = u.q,
u.q = e
}
var t = u.p.subtract(n.ONE)
, r = u.q.subtract(n.ONE)
, i = t.multiply(r);
0 == i.gcd(s).compareTo(n.ONE) ? (u.n = u.p.multiply(u.q),
u.d = s.modInverse(i),
u.dmp1 = u.d.mod(t),
u.dmq1 = u.d.mod(r),
u.coeff = u.q.modInverse(u.p),
setTimeout((function () {
o()
}
), 0)) : setTimeout(c, 0)
}
, l = function () {
u.q = r(),
u.q.fromNumberAsync(a, 1, i, (function () {
u.q.subtract(n.ONE).gcda(s, (function (e) {
0 == e.compareTo(n.ONE) && u.q.isProbablePrime(10) ? setTimeout(t, 0) : setTimeout(l, 0)
}
))
}
))
}
, f = function () {
u.p = r(),
u.p.fromNumberAsync(e - a, 1, i, (function () {
u.p.subtract(n.ONE).gcda(s, (function (e) {
0 == e.compareTo(n.ONE) && u.p.isProbablePrime(10) ? setTimeout(l, 0) : setTimeout(f, 0)
}
))
}
))
};
setTimeout(f, 0)
};
setTimeout(c, 0)
}
,
n.prototype.gcda = function (e, t) {
var n = this.s < 0 ? this.negate() : this.clone()
, r = e.s < 0 ? e.negate() : e.clone();
if (n.compareTo(r) < 0) {
var o = n;
n = r,
r = o
}
var i = n.getLowestSetBit()
, a = r.getLowestSetBit();
if (a < 0)
t(n);
else {
i < a && (a = i),
a > 0 && (n.rShiftTo(a, n),
r.rShiftTo(a, r));
var s = function () {
(i = n.getLowestSetBit()) > 0 && n.rShiftTo(i, n),
(i = r.getLowestSetBit()) > 0 && r.rShiftTo(i, r),
n.compareTo(r) >= 0 ? (n.subTo(r, n),
n.rShiftTo(1, n)) : (r.subTo(n, r),
r.rShiftTo(1, r)),
n.signum() > 0 ? setTimeout(s, 0) : (a > 0 && r.lShiftTo(a, r),
setTimeout((function () {
t(r)
}
), 0))
};
setTimeout(s, 10)
}
}
,
n.prototype.fromNumberAsync = function (e, t, r, o) {
if ("number" == typeof t)
if (e < 2)
this.fromInt(1);
else {
this.fromNumber(e, r),
this.testBit(e - 1) || this.bitwiseTo(n.ONE.shiftLeft(e - 1), h, this),
this.isEven() && this.dAddOffset(1, 0);
var i = this
, a = function () {
i.dAddOffset(2, 0),
i.bitLength() > e && i.subTo(n.ONE.shiftLeft(e - 1), i),
i.isProbablePrime(t) ? setTimeout((function () {
o()
}
), 0) : setTimeout(a, 0)
};
setTimeout(a, 0)
}
else {
var s = new Array
, u = 7 & e;
s.length = 1 + (e >> 3),
t.nextBytes(s),
u > 0 ? s[0] &= (1 << u) - 1 : s[0] = 0,
this.fromString(s, 256)
}
}
;
var j = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
function I(e) {
var t, n, r = "";
for (t = 0; t + 3 <= e.length; t += 3)
n = parseInt(e.substring(t, t + 3), 16),
r += j.charAt(n >> 6) + j.charAt(63 & n);
for (t + 1 == e.length ? (n = parseInt(e.substring(t, t + 1), 16),
r += j.charAt(n << 2)) : t + 2 == e.length && (n = parseInt(e.substring(t, t + 2), 16),
r += j.charAt(n >> 2) + j.charAt((3 & n) << 4)); (3 & r.length) > 0;)
r += "=";
return r
}
function Y(e) {
var t, n, r = "", o = 0;
for (t = 0; t < e.length && "=" != e.charAt(t); ++t)
v = j.indexOf(e.charAt(t)),
v < 0 || (0 == o ? (r += s(v >> 2),
n = 3 & v,
o = 1) : 1 == o ? (r += s(n << 2 | v >> 4),
n = 15 & v,
o = 2) : 2 == o ? (r += s(n),
r += s(v >> 2),
n = 3 & v,
o = 3) : (r += s(n << 2 | v >> 4),
r += s(15 & v),
o = 0));
return 1 == o && (r += s(n << 2)),
r
}
var H = H || {};
H.env = H.env || {};
var F = H
, B = Object.prototype
, U = ["toString", "valueOf"];
H.env.parseUA = function (e) {
var t, n = function (e) {
var t = 0;
return parseFloat(e.replace(/\./g, (function () {
return 1 == t++ ? "" : "."
}
)))
}, r = navigator, o = {
ie: 0,
opera: 0,
gecko: 0,
webkit: 0,
chrome: 0,
mobile: null,
air: 0,
ipad: 0,
iphone: 0,
ipod: 0,
ios: null,
android: 0,
webos: 0,
caja: r && r.cajaVersion,
secure: !1,
os: null
}, i = e || navigator && navigator.userAgent, a = window && window.location, s = a && a.href;
return o.secure = s && 0 === s.toLowerCase().indexOf("https"),
i && (/windows|win32/i.test(i) ? o.os = "windows" : /macintosh/i.test(i) ? o.os = "macintosh" : /rhino/i.test(i) && (o.os = "rhino"),
/KHTML/.test(i) && (o.webkit = 1),
(t = i.match(/AppleWebKit\/([^\s]*)/)) && t[1] && (o.webkit = n(t[1]),
/ Mobile\//.test(i) ? (o.mobile = "Apple",
(t = i.match(/OS ([^\s]*)/)) && t[1] && (t = n(t[1].replace("_", "."))),
o.ios = t,
o.ipad = o.ipod = o.iphone = 0,
(t = i.match(/iPad|iPod|iPhone/)) && t[0] && (o[t[0].toLowerCase()] = o.ios)) : ((t = i.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/)) && (o.mobile = t[0]),
/webOS/.test(i) && (o.mobile = "WebOS",
(t = i.match(/webOS\/([^\s]*);/)) && t[1] && (o.webos = n(t[1]))),
/ Android/.test(i) && (o.mobile = "Android",
(t = i.match(/Android ([^\s]*);/)) && t[1] && (o.android = n(t[1])))),
(t = i.match(/Chrome\/([^\s]*)/)) && t[1] ? o.chrome = n(t[1]) : (t = i.match(/AdobeAIR\/([^\s]*)/)) && (o.air = t[0])),
o.webkit || ((t = i.match(/Opera[\s\/]([^\s]*)/)) && t[1] ? (o.opera = n(t[1]),
(t = i.match(/Version\/([^\s]*)/)) && t[1] && (o.opera = n(t[1])),
(t = i.match(/Opera Mini[^;]*/)) && (o.mobile = t[0])) : (t = i.match(/MSIE\s([^;]*)/)) && t[1] ? o.ie = n(t[1]) : (t = i.match(/Gecko\/([^\s]*)/)) && (o.gecko = 1,
(t = i.match(/rv:([^\s\)]*)/)) && t[1] && (o.gecko = n(t[1]))))),
o
}
,
H.env.ua = H.env.parseUA(),
H.isFunction = function (e) {
return "function" == typeof e || "[object Function]" === B.toString.apply(e)
}
,
H._IEEnumFix = H.env.ua.ie ? function (e, t) {
var n, r, o;
for (n = 0; n < U.length; n += 1)
o = t[r = U[n]],
F.isFunction(o) && o != B[r] && (e[r] = o)
}
: function () {
}
,
H.extend = function (e, t, n) {
if (!t || !e)
throw new Error("extend failed, please check that all dependencies are included.");
var r, o = function () {
};
if (o.prototype = t.prototype,
e.prototype = new o,
e.prototype.constructor = e,
e.superclass = t.prototype,
t.prototype.constructor == B.constructor && (t.prototype.constructor = t),
n) {
for (r in n)
F.hasOwnProperty(n, r) && (e.prototype[r] = n[r]);
F._IEEnumFix(e.prototype, n)
}
}
,
"undefined" != typeof KJUR && KJUR || (KJUR = {}),
void 0 !== KJUR.asn1 && KJUR.asn1 || (KJUR.asn1 = {}),
KJUR.asn1.ASN1Util = new function () {
this.integerToByteHex = function (e) {
var t = e.toString(16);
return t.length % 2 == 1 && (t = "0" + t),
t
}
,
this.bigIntToMinTwosComplementsHex = function (e) {
var t = e.toString(16);
if ("-" != t.substr(0, 1))
t.length % 2 == 1 ? t = "0" + t : t.match(/^[0-7]/) || (t = "00" + t);
else {
var r = t.substr(1).length;
r % 2 == 1 ? r += 1 : t.match(/^[0-7]/) || (r += 2);
for (var o = "", i = 0; i < r; i++)
o += "f";
t = new n(o, 16).xor(e).add(n.ONE).toString(16).replace(/^-/, "")
}
return t
}
,
this.getPEMStringFromHex = function (e, t) {
var n = CryptoJS.enc.Hex.parse(e)
, r = CryptoJS.enc.Base64.stringify(n).replace(/(.{64})/g, "$1\r\n");
return "-----BEGIN " + t + "-----\r\n" + (r = r.replace(/\r\n$/, "")) + "\r\n-----END " + t + "-----\r\n"
}
}
,
KJUR.asn1.ASN1Object = function () {
this.getLengthHexFromValue = function () {
if (void 0 === this.hV || null == this.hV)
throw "this.hV is null or undefined.";
if (this.hV.length % 2 == 1)
throw "value hex must be even length: n=" + "".length + ",v=" + this.hV;
var e = this.hV.length / 2
, t = e.toString(16);
if (t.length % 2 == 1 && (t = "0" + t),
e < 128)
return t;
var n = t.length / 2;
if (n > 15)
throw "ASN.1 length too long to represent by 8x: n = " + e.toString(16);
return (128 + n).toString(16) + t
}
,
this.getEncodedHex = function () {
return (null == this.hTLV || this.isModified) && (this.hV = this.getFreshValueHex(),
this.hL = this.getLengthHexFromValue(),
this.hTLV = this.hT + this.hL + this.hV,
this.isModified = !1),
this.hTLV
}
,
this.getValueHex = function () {
return this.getEncodedHex(),
this.hV
}
,
this.getFreshValueHex = function () {
return ""
}
}
,
KJUR.asn1.DERAbstractString = function (e) {
KJUR.asn1.DERAbstractString.superclass.constructor.call(this),
this.getString = function () {
return this.s
}
,
this.setString = function (e) {
this.hTLV = null,
this.isModified = !0,
this.s = e,
this.hV = stohex(this.s)
}
,
this.setStringHex = function (e) {
this.hTLV = null,
this.isModified = !0,
this.s = null,
this.hV = e
}
,
this.getFreshValueHex = function () {
return this.hV
}
,
void 0 !== e && (void 0 !== e.str ? this.setString(e.str) : void 0 !== e.hex && this.setStringHex(e.hex))
}
,
H.extend(KJUR.asn1.DERAbstractString, KJUR.asn1.ASN1Object),
KJUR.asn1.DERAbstractTime = function (e) {
KJUR.asn1.DERAbstractTime.superclass.constructor.call(this),
this.localDateToUTC = function (e) {
return utc = e.getTime() + 6e4 * e.getTimezoneOffset(),
new Date(utc)
}
,
this.formatDate = function (e, t) {
var n = this.zeroPadding
, r = this.localDateToUTC(e)
, o = String(r.getFullYear());
return "utc" == t && (o = o.substr(2, 2)),
o + n(String(r.getMonth() + 1), 2) + n(String(r.getDate()), 2) + n(String(r.getHours()), 2) + n(String(r.getMinutes()), 2) + n(String(r.getSeconds()), 2) + "Z"
}
,
this.zeroPadding = function (e, t) {
return e.length >= t ? e : new Array(t - e.length + 1).join("0") + e
}
,
this.getString = function () {
return this.s
}
,
this.setString = function (e) {
this.hTLV = null,
this.isModified = !0,
this.s = e,
this.hV = stohex(this.s)
}
,
this.setByDateValue = function (e, t, n, r, o, i) {
var a = new Date(Date.UTC(e, t - 1, n, r, o, i, 0));
this.setByDate(a)
}
,
this.getFreshValueHex = function () {
return this.hV
}
}
,
H.extend(KJUR.asn1.DERAbstractTime, KJUR.asn1.ASN1Object),
KJUR.asn1.DERAbstractStructured = function (e) {
KJUR.asn1.DERAbstractString.superclass.constructor.call(this),
this.setByASN1ObjectArray = function (e) {
this.hTLV = null,
this.isModified = !0,
this.asn1Array = e
}
,
this.appendASN1Object = function (e) {
this.hTLV = null,
this.isModified = !0,
this.asn1Array.push(e)
}
,
this.asn1Array = new Array,
void 0 !== e && void 0 !== e.array && (this.asn1Array = e.array)
}
,
H.extend(KJUR.asn1.DERAbstractStructured, KJUR.asn1.ASN1Object),
KJUR.asn1.DERBoolean = function () {
KJUR.asn1.DERBoolean.superclass.constructor.call(this),
this.hT = "01",
this.hTLV = "0101ff"
}
,
H.extend(KJUR.asn1.DERBoolean, KJUR.asn1.ASN1Object),
KJUR.asn1.DERInteger = function (e) {
KJUR.asn1.DERInteger.superclass.constructor.call(this),
this.hT = "02",
this.setByBigInteger = function (e) {
this.hTLV = null,
this.isModified = !0,
this.hV = KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)
}
,
this.setByInteger = function (e) {
var t = new n(String(e), 10);
this.setByBigInteger(t)
}
,
this.setValueHex = function (e) {
this.hV = e
}
,
this.getFreshValueHex = function () {
return this.hV
}
,
void 0 !== e && (void 0 !== e.bigint ? this.setByBigInteger(e.bigint) : void 0 !== e.int ? this.setByInteger(e.int) : void 0 !== e.hex && this.setValueHex(e.hex))
}
,
H.extend(KJUR.asn1.DERInteger, KJUR.asn1.ASN1Object),
KJUR.asn1.DERBitString = function (e) {
KJUR.asn1.DERBitString.superclass.constructor.call(this),
this.hT = "03",
this.setHexValueIncludingUnusedBits = function (e) {
this.hTLV = null,
this.isModified = !0,
this.hV = e
}
,
this.setUnusedBitsAndHexValue = function (e, t) {
if (e < 0 || 7 < e)
throw "unused bits shall be from 0 to 7: u = " + e;
var n = "0" + e;
this.hTLV = null,
this.isModified = !0,
this.hV = n + t
}
,
this.setByBinaryString = function (e) {
var t = 8 - (e = e.replace(/0+$/, "")).length % 8;
8 == t && (t = 0);
for (var n = 0; n <= t; n++)
e += "0";
var r = "";
for (n = 0; n < e.length - 1; n += 8) {
var o = e.substr(n, 8)
, i = parseInt(o, 2).toString(16);
1 == i.length && (i = "0" + i),
r += i
}
this.hTLV = null,
this.isModified = !0,
this.hV = "0" + t + r
}
,
this.setByBooleanArray = function (e) {
for (var t = "", n = 0; n < e.length; n++)
1 == e[n] ? t += "1" : t += "0";
this.setByBinaryString(t)
}
,
this.newFalseArray = function (e) {
for (var t = new Array(e), n = 0; n < e; n++)
t[n] = !1;
return t
}
,
this.getFreshValueHex = function () {
return this.hV
}
,
void 0 !== e && (void 0 !== e.hex ? this.setHexValueIncludingUnusedBits(e.hex) : void 0 !== e.bin ? this.setByBinaryString(e.bin) : void 0 !== e.array && this.setByBooleanArray(e.array))
}
,
H.extend(KJUR.asn1.DERBitString, KJUR.asn1.ASN1Object),
KJUR.asn1.DEROctetString = function (e) {
KJUR.asn1.DEROctetString.superclass.constructor.call(this, e),
this.hT = "04"
}
,
H.extend(KJUR.asn1.DEROctetString, KJUR.asn1.DERAbstractString),
KJUR.asn1.DERNull = function () {
KJUR.asn1.DERNull.superclass.constructor.call(this),
this.hT = "05",
this.hTLV = "0500"
}
,
H.extend(KJUR.asn1.DERNull, KJUR.asn1.ASN1Object),
KJUR.asn1.DERObjectIdentifier = function (e) {
var t = function (e) {
var t = e.toString(16);
return 1 == t.length && (t = "0" + t),
t
}
, r = function (e) {
var r = ""
, o = new n(e, 10).toString(2)
, i = 7 - o.length % 7;
7 == i && (i = 0);
for (var a = "", s = 0; s < i; s++)
a += "0";
for (o = a + o,
s = 0; s < o.length - 1; s += 7) {
var u = o.substr(s, 7);
s != o.length - 7 && (u = "1" + u),
r += t(parseInt(u, 2))
}
return r
};
KJUR.asn1.DERObjectIdentifier.superclass.constructor.call(this),
this.hT = "06",
this.setValueHex = function (e) {
this.hTLV = null,
this.isModified = !0,
this.s = null,
this.hV = e
}
,
this.setValueOidString = function (e) {
if (!e.match(/^[0-9.]+$/))
throw "malformed oid string: " + e;
var n = ""
, o = e.split(".")
, i = 40 * parseInt(o[0]) + parseInt(o[1]);
n += t(i),
o.splice(0, 2);
for (var a = 0; a < o.length; a++)
n += r(o[a]);
this.hTLV = null,
this.isModified = !0,
this.s = null,
this.hV = n
}
,
this.setValueName = function (e) {
if (void 0 === KJUR.asn1.x509.OID.name2oidList[e])
throw "DERObjectIdentifier oidName undefined: " + e;
var t = KJUR.asn1.x509.OID.name2oidList[e];
this.setValueOidString(t)
}
,
this.getFreshValueHex = function () {
return this.hV
}
,
void 0 !== e && (void 0 !== e.oid ? this.setValueOidString(e.oid) : void 0 !== e.hex ? this.setValueHex(e.hex) : void 0 !== e.name && this.setValueName(e.name))
}
,
H.extend(KJUR.asn1.DERObjectIdentifier, KJUR.asn1.ASN1Object),
KJUR.asn1.DERUTF8String = function (e) {
KJUR.asn1.DERUTF8String.superclass.constructor.call(this, e),
this.hT = "0c"
}
,
H.extend(KJUR.asn1.DERUTF8String, KJUR.asn1.DERAbstractString),
KJUR.asn1.DERNumericString = function (e) {
KJUR.asn1.DERNumericString.superclass.constructor.call(this, e),
this.hT = "12"
}
,
H.extend(KJUR.asn1.DERNumericString, KJUR.asn1.DERAbstractString),
KJUR.asn1.DERPrintableString = function (e) {
KJUR.asn1.DERPrintableString.superclass.constructor.call(this, e),
this.hT = "13"
}
,
H.extend(KJUR.asn1.DERPrintableString, KJUR.asn1.DERAbstractString),
KJUR.asn1.DERTeletexString = function (e) {
KJUR.asn1.DERTeletexString.superclass.constructor.call(this, e),
this.hT = "14"
}
,
H.extend(KJUR.asn1.DERTeletexString, KJUR.asn1.DERAbstractString),
KJUR.asn1.DERIA5String = function (e) {
KJUR.asn1.DERIA5String.superclass.constructor.call(this, e),
this.hT = "16"
}
,
H.extend(KJUR.asn1.DERIA5String, KJUR.asn1.DERAbstractString),
KJUR.asn1.DERUTCTime = function (e) {
KJUR.asn1.DERUTCTime.superclass.constructor.call(this, e),
this.hT = "17",
this.setByDate = function (e) {
this.hTLV = null,
this.isModified = !0,
this.date = e,
this.s = this.formatDate(this.date, "utc"),
this.hV = stohex(this.s)
}
,
void 0 !== e && (void 0 !== e.str ? this.setString(e.str) : void 0 !== e.hex ? this.setStringHex(e.hex) : void 0 !== e.date && this.setByDate(e.date))
}
,
H.extend(KJUR.asn1.DERUTCTime, KJUR.asn1.DERAbstractTime),
KJUR.asn1.DERGeneralizedTime = function (e) {
KJUR.asn1.DERGeneralizedTime.superclass.constructor.call(this, e),
this.hT = "18",
this.setByDate = function (e) {
this.hTLV = null,
this.isModified = !0,
this.date = e,
this.s = this.formatDate(this.date, "gen"),
this.hV = stohex(this.s)
}
,
void 0 !== e && (void 0 !== e.str ? this.setString(e.str) : void 0 !== e.hex ? this.setStringHex(e.hex) : void 0 !== e.date && this.setByDate(e.date))
}
,
H.extend(KJUR.asn1.DERGeneralizedTime, KJUR.asn1.DERAbstractTime),
KJUR.asn1.DERSequence = function (e) {
KJUR.asn1.DERSequence.superclass.constructor.call(this, e),
this.hT = "30",
this.getFreshValueHex = function () {
for (var e = "", t = 0; t < this.asn1Array.length; t++)
e += this.asn1Array[t].getEncodedHex();
return this.hV = e,
this.hV
}
}
,
H.extend(KJUR.asn1.DERSequence, KJUR.asn1.DERAbstractStructured),
KJUR.asn1.DERSet = function (e) {
KJUR.asn1.DERSet.superclass.constructor.call(this, e),
this.hT = "31",
this.getFreshValueHex = function () {
for (var e = new Array, t = 0; t < this.asn1Array.length; t++) {
var n = this.asn1Array[t];
e.push(n.getEncodedHex())
}
return e.sort(),
this.hV = e.join(""),
this.hV
}
}
,
H.extend(KJUR.asn1.DERSet, KJUR.asn1.DERAbstractStructured),
KJUR.asn1.DERTaggedObject = function (e) {
KJUR.asn1.DERTaggedObject.superclass.constructor.call(this),
this.hT = "a0",
this.hV = "",
this.isExplicit = !0,
this.asn1Object = null,
this.setASN1Object = function (e, t, n) {
this.hT = t,
this.isExplicit = e,
this.asn1Object = n,
this.isExplicit ? (this.hV = this.asn1Object.getEncodedHex(),
this.hTLV = null,
this.isModified = !0) : (this.hV = null,
this.hTLV = n.getEncodedHex(),
this.hTLV = this.hTLV.replace(/^../, t),
this.isModified = !1)
}
,
this.getFreshValueHex = function () {
return this.hV
}
,
void 0 !== e && (void 0 !== e.tag && (this.hT = e.tag),
void 0 !== e.explicit && (this.isExplicit = e.explicit),
void 0 !== e.obj && (this.asn1Object = e.obj,
this.setASN1Object(this.isExplicit, this.hT, this.asn1Object)))
}
,
H.extend(KJUR.asn1.DERTaggedObject, KJUR.asn1.ASN1Object),
function (e) {
"use strict";
var t, n = {
decode: function (e) {
var n;
if (void 0 === t) {
var r = "0123456789ABCDEF";
for (t = [],
n = 0; n < 16; ++n)
t[r.charAt(n)] = n;
for (r = r.toLowerCase(),
n = 10; n < 16; ++n)
t[r.charAt(n)] = n;
for (n = 0; n < " \f\n\r\t \u2028\u2029".length; ++n)
t[" \f\n\r\t \u2028\u2029".charAt(n)] = -1
}
var o = []
, i = 0
, a = 0;
for (n = 0; n < e.length; ++n) {
var s = e.charAt(n);
if ("=" == s)
break;
if (-1 != (s = t[s])) {
if (void 0 === s)
throw "Illegal character at offset " + n;
i |= s,
++a >= 2 ? (o[o.length] = i,
i = 0,
a = 0) : i <<= 4
}
}
if (a)
throw "Hex encoding incomplete: 4 bits missing";
return o
}
};
window.Hex = n
}(),
function (e) {
"use strict";
var t, n = {
decode: function (e) {
var n;
if (void 0 === t) {
for (t = [],
n = 0; n < 64; ++n)
t["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(n)] = n;
for (n = 0; n < "= \f\n\r\t \u2028\u2029".length; ++n)
t["= \f\n\r\t \u2028\u2029".charAt(n)] = -1
}
var r = []
, o = 0
, i = 0;
for (n = 0; n < e.length; ++n) {
var a = e.charAt(n);
if ("=" == a)
break;
if (-1 != (a = t[a])) {
if (void 0 === a)
throw "Illegal character at offset " + n;
o |= a,
++i >= 4 ? (r[r.length] = o >> 16,
r[r.length] = o >> 8 & 255,
r[r.length] = 255 & o,
o = 0,
i = 0) : o <<= 6
}
}
switch (i) {
case 1:
throw "Base64 encoding incomplete: at least 2 bits missing";
case 2:
r[r.length] = o >> 10;
break;
case 3:
r[r.length] = o >> 16,
r[r.length] = o >> 8 & 255
}
return r
},
re: /-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,
unarmor: function (e) {
var t = n.re.exec(e);
if (t)
if (t[1])
e = t[1];
else {
if (!t[2])
throw "RegExp out of sync";
e = t[2]
}
return n.decode(e)
}
};
window.Base64 = n
}(),
function (e) {
"use strict";
var t = function (e, t) {
var n = document.createElement(e);
return n.className = t,
n
}
, n = function (e) {
return document.createTextNode(e)
};
function r(e, t) {
e instanceof r ? (this.enc = e.enc,
this.pos = e.pos) : (this.enc = e,
this.pos = t)
}
function o(e, t, n, r, o) {
this.stream = e,
this.header = t,
this.length = n,
this.tag = r,
this.sub = o
}
r.prototype.get = function (e) {
if (void 0 === e && (e = this.pos++),
e >= this.enc.length)
throw "Requesting byte offset " + e + " on a stream of length " + this.enc.length;
return this.enc[e]
}
,
r.prototype.hexDigits = "0123456789ABCDEF",
r.prototype.hexByte = function (e) {
return this.hexDigits.charAt(e >> 4 & 15) + this.hexDigits.charAt(15 & e)
}
,
r.prototype.hexDump = function (e, t, n) {
for (var r = "", o = e; o < t; ++o)
if (r += this.hexByte(this.get(o)),
!0 !== n)
switch (15 & o) {
case 7:
r += " ";
break;
case 15:
r += "\n";
break;
default:
r += " "
}
return r
}
,
r.prototype.parseStringISO = function (e, t) {
for (var n = "", r = e; r < t; ++r)
n += String.fromCharCode(this.get(r));
return n
}
,
r.prototype.parseStringUTF = function (e, t) {
for (var n = "", r = e; r < t;) {
var o = this.get(r++);
n += o < 128 ? String.fromCharCode(o) : o > 191 && o < 224 ? String.fromCharCode((31 & o) << 6 | 63 & this.get(r++)) : String.fromCharCode((15 & o) << 12 | (63 & this.get(r++)) << 6 | 63 & this.get(r++))
}
return n
}
,
r.prototype.parseStringBMP = function (e, t) {
for (var n = "", r = e; r < t; r += 2) {
var o = this.get(r)
, i = this.get(r + 1);
n += String.fromCharCode((o << 8) + i)
}
return n
}
,
r.prototype.reTime = /^((?:1[89]|2\d)?\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,
r.prototype.parseTime = function (e, t) {
var n = this.parseStringISO(e, t)
, r = this.reTime.exec(n);
return r ? (n = r[1] + "-" + r[2] + "-" + r[3] + " " + r[4],
r[5] && (n += ":" + r[5],
r[6] && (n += ":" + r[6],
r[7] && (n += "." + r[7]))),
r[8] && (n += " UTC",
"Z" != r[8] && (n += r[8],
r[9] && (n += ":" + r[9]))),
n) : "Unrecognized time: " + n
}
,
r.prototype.parseInteger = function (e, t) {
var n = t - e;
if (n > 4) {
n <<= 3;
var r = this.get(e);
if (0 === r)
n -= 8;
else
for (; r < 128;)
r <<= 1,
--n;
return "(" + n + " bit)"
}
for (var o = 0, i = e; i < t; ++i)
o = o << 8 | this.get(i);
return o
}
,
r.prototype.parseBitString = function (e, t) {
var n = this.get(e)
, r = (t - e - 1 << 3) - n
, o = "(" + r + " bit)";
if (r <= 20) {
var i = n;
o += " ";
for (var a = t - 1; a > e; --a) {
for (var s = this.get(a), u = i; u < 8; ++u)
o += s >> u & 1 ? "1" : "0";
i = 0
}
}
return o
}
,
r.prototype.parseOctetString = function (e, t) {
var n = t - e
, r = "(" + n + " byte) ";
n > 100 && (t = e + 100);
for (var o = e; o < t; ++o)
r += this.hexByte(this.get(o));
return n > 100 && (r += "..."),
r
}
,
r.prototype.parseOID = function (e, t) {
for (var n = "", r = 0, o = 0, i = e; i < t; ++i) {
var a = this.get(i);
if (r = r << 7 | 127 & a,
o += 7,
!(128 & a)) {
if ("" === n) {
var s = r < 80 ? r < 40 ? 0 : 1 : 2;
n = s + "." + (r - 40 * s)
} else
n += "." + (o >= 31 ? "bigint" : r);
r = o = 0
}
}
return n
}
,
o.prototype.typeName = function () {
if (void 0 === this.tag)
return "unknown";
var e = this.tag >> 6
, t = (this.tag,
31 & this.tag);
switch (e) {
case 0:
switch (t) {
case 0:
return "EOC";
case 1:
return "BOOLEAN";
case 2:
return "INTEGER";
case 3:
return "BIT_STRING";
case 4:
return "OCTET_STRING";
case 5:
return "NULL";
case 6:
return "OBJECT_IDENTIFIER";
case 7:
return "ObjectDescriptor";
case 8:
return "EXTERNAL";
case 9:
return "REAL";
case 10:
return "ENUMERATED";
case 11:
return "EMBEDDED_PDV";
case 12:
return "UTF8String";
case 16:
return "SEQUENCE";
case 17:
return "SET";
case 18:
return "NumericString";
case 19:
return "PrintableString";
case 20:
return "TeletexString";
case 21:
return "VideotexString";
case 22:
return "IA5String";
case 23:
return "UTCTime";
case 24:
return "GeneralizedTime";
case 25:
return "GraphicString";
case 26:
return "VisibleString";
case 27:
return "GeneralString";
case 28:
return "UniversalString";
case 30:
return "BMPString";
default:
return "Universal_" + t.toString(16)
}
case 1:
return "Application_" + t.toString(16);
case 2:
return "[" + t + "]";
case 3:
return "Private_" + t.toString(16)
}
}
,
o.prototype.reSeemsASCII = /^[ -~]+$/,
o.prototype.content = function () {
if (void 0 === this.tag)
return null;
var e = this.tag >> 6
, t = 31 & this.tag
, n = this.posContent()
, r = Math.abs(this.length);
if (0 !== e) {
if (null !== this.sub)
return "(" + this.sub.length + " elem)";
var o = this.stream.parseStringISO(n, n + Math.min(r, 100));
return this.reSeemsASCII.test(o) ? o.substring(0, 200) + (o.length > 200 ? "..." : "") : this.stream.parseOctetString(n, n + r)
}
switch (t) {
case 1:
return 0 === this.stream.get(n) ? "false" : "true";
case 2:
return this.stream.parseInteger(n, n + r);
case 3:
return this.sub ? "(" + this.sub.length + " elem)" : this.stream.parseBitString(n, n + r);
case 4:
return this.sub ? "(" + this.sub.length + " elem)" : this.stream.parseOctetString(n, n + r);
case 6:
return this.stream.parseOID(n, n + r);
case 16:
case 17:
return "(" + this.sub.length + " elem)";
case 12:
return this.stream.parseStringUTF(n, n + r);
case 18:
case 19:
case 20:
case 21:
case 22:
case 26:
return this.stream.parseStringISO(n, n + r);
case 30:
return this.stream.parseStringBMP(n, n + r);
case 23:
case 24:
return this.stream.parseTime(n, n + r)
}
return null
}
,
o.prototype.toString = function () {
return this.typeName() + "@" + this.stream.pos + "[header:" + this.header + ",length:" + this.length + ",sub:" + (null === this.sub ? "null" : this.sub.length) + "]"
}
,
o.prototype.print = function (e) {
if (void 0 === e && (e = ""),
document.writeln(e + this),
null !== this.sub) {
e += " ";
for (var t = 0, n = this.sub.length; t < n; ++t)
this.sub[t].print(e)
}
}
,
o.prototype.toPrettyString = function (e) {
void 0 === e && (e = "");
var t = e + this.typeName() + " @" + this.stream.pos;
if (this.length >= 0 && (t += "+"),
t += this.length,
32 & this.tag ? t += " (constructed)" : 3 != this.tag && 4 != this.tag || null === this.sub || (t += " (encapsulates)"),
t += "\n",
null !== this.sub) {
e += " ";
for (var n = 0, r = this.sub.length; n < r; ++n)
t += this.sub[n].toPrettyString(e)
}
return t
}
,
o.prototype.toDOM = function () {
var e = t("div", "node");
e.asn1 = this;
var r = t("div", "head")
, o = this.typeName().replace(/_/g, " ");
r.innerHTML = o;
var i = this.content();
if (null !== i) {
i = String(i).replace(/</g, "<");
var a = t("span", "preview");
a.appendChild(n(i)),
r.appendChild(a)
}
e.appendChild(r),
this.node = e,
this.head = r;
var s = t("div", "value");
if (o = "Offset: " + this.stream.pos + "<br/>",
o += "Length: " + this.header + "+",
this.length >= 0 ? o += this.length : o += -this.length + " (undefined)",
32 & this.tag ? o += "<br/>(constructed)" : 3 != this.tag && 4 != this.tag || null === this.sub || (o += "<br/>(encapsulates)"),
null !== i && (o += "<br/>Value:<br/><b>" + i + "</b>",
"object" == typeof oids && 6 == this.tag)) {
var u = oids[i];
u && (u.d && (o += "<br/>" + u.d),
u.c && (o += "<br/>" + u.c),
u.w && (o += "<br/>(warning!)"))
}
s.innerHTML = o,
e.appendChild(s);
var c = t("div", "sub");
if (null !== this.sub)
for (var l = 0, f = this.sub.length; l < f; ++l)
c.appendChild(this.sub[l].toDOM());
return e.appendChild(c),
r.onclick = function () {
e.className = "node collapsed" == e.className ? "node" : "node collapsed"
}
,
e
}
,
o.prototype.posStart = function () {
return this.stream.pos
}
,
o.prototype.posContent = function () {
return this.stream.pos + this.header
}
,
o.prototype.posEnd = function () {
return this.stream.pos + this.header + Math.abs(this.length)
}
,
o.prototype.fakeHover = function (e) {
this.node.className += " hover",
e && (this.head.className += " hover")
}
,
o.prototype.fakeOut = function (e) {
var t = / ?hover/;
this.node.className = this.node.className.replace(t, ""),
e && (this.head.className = this.head.className.replace(t, ""))
}
,
o.prototype.toHexDOM_sub = function (e, r, o, i, a) {
if (!(i >= a)) {
var s = t("span", r);
s.appendChild(n(o.hexDump(i, a))),
e.appendChild(s)
}
}
,
o.prototype.toHexDOM = function (e) {
var r = t("span", "hex");
if (void 0 === e && (e = r),
this.head.hexNode = r,
this.head.onmouseover = function () {
this.hexNode.className = "hexCurrent"
}
,
this.head.onmouseout = function () {
this.hexNode.className = "hex"
}
,
r.asn1 = this,
r.onmouseover = function () {
var t = !e.selected;
t && (e.selected = this.asn1,
this.className = "hexCurrent"),
this.asn1.fakeHover(t)
}
,
r.onmouseout = function () {
var t = e.selected == this.asn1;
this.asn1.fakeOut(t),
t && (e.selected = null,
this.className = "hex")
}
,
this.toHexDOM_sub(r, "tag", this.stream, this.posStart(), this.posStart() + 1),
this.toHexDOM_sub(r, this.length >= 0 ? "dlen" : "ulen", this.stream, this.posStart() + 1, this.posContent()),
null === this.sub)
r.appendChild(n(this.stream.hexDump(this.posContent(), this.posEnd())));
else if (this.sub.length > 0) {
var o = this.sub[0]
, i = this.sub[this.sub.length - 1];
this.toHexDOM_sub(r, "intro", this.stream, this.posContent(), o.posStart());
for (var a = 0, s = this.sub.length; a < s; ++a)
r.appendChild(this.sub[a].toHexDOM(e));
this.toHexDOM_sub(r, "outro", this.stream, i.posEnd(), this.posEnd())
}
return r
}
,
o.prototype.toHexString = function (e) {
return this.stream.hexDump(this.posStart(), this.posEnd(), !0)
}
,
o.decodeLength = function (e) {
var t = e.get()
, n = 127 & t;
if (n == t)
return n;
if (n > 3)
throw "Length over 24 bits not supported at position " + (e.pos - 1);
if (0 === n)
return -1;
t = 0;
for (var r = 0; r < n; ++r)
t = t << 8 | e.get();
return t
}
,
o.hasContent = function (e, t, n) {
if (32 & e)
return !0;
if (e < 3 || e > 4)
return !1;
var i = new r(n);
if (3 == e && i.get(),
i.get() >> 6 & 1)
return !1;
try {
var a = o.decodeLength(i);
return i.pos - n.pos + a == t
} catch (e) {
return !1
}
}
,
o.decode = function (e) {
e instanceof r || (e = new r(e, 0));
var t = new r(e)
, n = e.get()
, i = o.decodeLength(e)
, a = e.pos - t.pos
, s = null;
if (o.hasContent(n, i, e)) {
var u = e.pos;
if (3 == n && e.get(),
s = [],
i >= 0) {
for (var c = u + i; e.pos < c;)
s[s.length] = o.decode(e);
if (e.pos != c)
throw "Content size is not correct for container starting at offset " + u
} else
try {
for (; ;) {
var l = o.decode(e);
if (0 === l.tag)
break;
s[s.length] = l
}
i = u - e.pos
} catch (e) {
throw "Exception while decoding undefined length content: " + e
}
} else
e.pos += i;
return new o(t, a, i, n, s)
}
,
o.test = function () {
for (var e = [{
value: [39],
expected: 39
}, {
value: [129, 201],
expected: 201
}, {
value: [131, 254, 220, 186],
expected: 16702650
}], t = 0, n = e.length; t < n; ++t) {
var i = new r(e[t].value, 0)
, a = o.decodeLength(i);
a != e[t].expected && document.write("In test[" + t + "] expected " + e[t].expected + " got " + a + "\n")
}
}
,
window.ASN1 = o
}(),
ASN1.prototype.getHexStringValue = function () {
var e = this.toHexString()
, t = 2 * this.header
, n = 2 * this.length;
return e.substr(t, n)
}
,
R.prototype.parseKey = function (e) {
try {
var t = 0
, n = 0
,
r = /^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(e) ? Hex.decode(e) : Base64.unarmor(e)
, o = ASN1.decode(r);
if (3 === o.sub.length && (o = o.sub[2].sub[0]),
9 === o.sub.length) {
t = o.sub[1].getHexStringValue(),
this.n = P(t, 16),
n = o.sub[2].getHexStringValue(),
this.e = parseInt(n, 16);
var i = o.sub[3].getHexStringValue();
this.d = P(i, 16);
var a = o.sub[4].getHexStringValue();
this.p = P(a, 16);
var s = o.sub[5].getHexStringValue();
this.q = P(s, 16);
var u = o.sub[6].getHexStringValue();
this.dmp1 = P(u, 16);
var c = o.sub[7].getHexStringValue();
this.dmq1 = P(c, 16);
var l = o.sub[8].getHexStringValue();
this.coeff = P(l, 16)
} else {
if (2 !== o.sub.length)
return !1;
var f = o.sub[1].sub[0];
t = f.sub[0].getHexStringValue(),
this.n = P(t, 16),
n = f.sub[1].getHexStringValue(),
this.e = parseInt(n, 16)
}
return !0
} catch (e) {
return !1
}
}
,
R.prototype.getPrivateBaseKey = function () {
var e = {
array: [new KJUR.asn1.DERInteger({
int: 0
}), new KJUR.asn1.DERInteger({
bigint: this.n
}), new KJUR.asn1.DERInteger({
int: this.e
}), new KJUR.asn1.DERInteger({
bigint: this.d
}), new KJUR.asn1.DERInteger({
bigint: this.p
}), new KJUR.asn1.DERInteger({
bigint: this.q
}), new KJUR.asn1.DERInteger({
bigint: this.dmp1
}), new KJUR.asn1.DERInteger({
bigint: this.dmq1
}), new KJUR.asn1.DERInteger({
bigint: this.coeff
})]
};
return new KJUR.asn1.DERSequence(e).getEncodedHex()
}
,
R.prototype.getPrivateBaseKeyB64 = function () {
return I(this.getPrivateBaseKey())
}
,
R.prototype.getPublicBaseKey = function () {
var e = {
array: [new KJUR.asn1.DERObjectIdentifier({
oid: "1.2.840.113549.1.1.1"
}), new KJUR.asn1.DERNull]
}
, t = new KJUR.asn1.DERSequence(e);
return e = {
array: [new KJUR.asn1.DERInteger({
bigint: this.n
}), new KJUR.asn1.DERInteger({
int: this.e
})]
},
e = {
hex: "00" + new KJUR.asn1.DERSequence(e).getEncodedHex()
},
e = {
array: [t, new KJUR.asn1.DERBitString(e)]
},
new KJUR.asn1.DERSequence(e).getEncodedHex()
}
,
R.prototype.getPublicBaseKeyB64 = function () {
return I(this.getPublicBaseKey())
}
,
R.prototype.wordwrap = function (e, t) {
if (!e)
return e;
var n = "(.{1," + (t = t || 64) + "})( +|$\n?)|(.{1," + t + "})";
return e.match(RegExp(n, "g")).join("\n")
}
,
R.prototype.getPrivateKey = function () {
var e = "-----BEGIN RSA PRIVATE KEY-----\n";
return e += this.wordwrap(this.getPrivateBaseKeyB64()) + "\n",
e += "-----END RSA PRIVATE KEY-----"
}
,
R.prototype.getPublicKey = function () {
var e = "-----BEGIN PUBLIC KEY-----\n";
return e += this.wordwrap(this.getPublicBaseKeyB64()) + "\n",
e += "-----END PUBLIC KEY-----"
}
,
R.prototype.hasPublicKeyProperty = function (e) {
return (e = e || {}).hasOwnProperty("n") && e.hasOwnProperty("e")
}
,
R.prototype.hasPrivateKeyProperty = function (e) {
return (e = e || {}).hasOwnProperty("n") && e.hasOwnProperty("e") && e.hasOwnProperty("d") && e.hasOwnProperty("p") && e.hasOwnProperty("q") && e.hasOwnProperty("dmp1") && e.hasOwnProperty("dmq1") && e.hasOwnProperty("coeff")
}
,
R.prototype.parsePropertiesFrom = function (e) {
this.n = e.n,
this.e = e.e,
e.hasOwnProperty("d") && (this.d = e.d,
this.p = e.p,
this.q = e.q,
this.dmp1 = e.dmp1,
this.dmq1 = e.dmq1,
this.coeff = e.coeff)
}
;
var W = function (e) {
R.call(this),
e && ("string" == typeof e ? this.parseKey(e) : (this.hasPrivateKeyProperty(e) || this.hasPublicKeyProperty(e)) && this.parsePropertiesFrom(e))
};
(W.prototype = new R).constructor = W;
var G = function (e) {
e = e || {},
this.default_key_size = parseInt(e.default_key_size) || 1024,
this.default_public_exponent = e.default_public_exponent || "010001",
this.log = e.log || !1,
this.key = null
};
G.prototype.setKey = function (e) {
this.log && this.key && console.warn("A key was already set, overriding existing."),
this.key = new W(e)
}
,
G.prototype.setPrivateKey = function (e) {
this.setKey(e)
}
,
G.prototype.setPublicKey = function (e) {
this.setKey(e)
}
,
G.prototype.decrypt = function (e) {
try {
return this.getKey().decrypt(Y(e))
} catch (e) {
return !1
}
}
,
G.prototype.encrypt = function (e) {
try {
return I(this.getKey().encrypt(e))
} catch (e) {
return !1
}
}
,
G.prototype.getKey = function (e) {
if (!this.key) {
if (this.key = new W,
e && "[object Function]" === {}.toString.call(e))
return void this.key.generateAsync(this.default_key_size, this.default_public_exponent, e);
this.key.generate(this.default_key_size, this.default_public_exponent)
}
return this.key
}
,
G.prototype.getPrivateKey = function () {
return this.getKey().getPrivateKey()
}
,
G.prototype.getPrivateKeyB64 = function () {
return this.getKey().getPrivateBaseKeyB64()
}
,
G.prototype.getPublicKey = function () {
return this.getKey().getPublicKey()
}
,
G.prototype.getPublicKeyB64 = function () {
return this.getKey().getPublicBaseKeyB64()
}
,
G.version = "2.3.1",
e.JSEncrypt = G
}
) ? r.apply(t, o) : r) || (e.exports = i)
}
}
);
var i = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCeiLxP4ZavN8qhI+x+whAiFpGWpY9y1AHSQC86qEMBVnmqC8vdZAfxxuQWeQaeMWG07lXhXegTjZ5wn9pHnjg15wbjRGSTfwuZxSFW6sS3GYlrg40ckqAagzIjkE+5OLPsdjVYQyhLfKxj/79oOfjl/lV3rQnk/SSczHW0PEyUbQIDAQAB"
var t = bc(778)
var r = new t.JSEncrypt;
r.setPublicKey(i);
var a = r.encrypt("15878324952");
console.log(a)
2.案例二
(1)逆向目标
网址:https://shanxisheng-zfcgdzmcgov.cn/gpmall-main-web/basic/sxNotice
接口:https://shanxishengzfcgdzmcgov.cn/gateway/gpfabpoc/api/notice/kc/v1/ignore/pagingKcAgreementNotice
加密:
(2)逆向分析




(3)收集webpack调用模块
- 1.批量扣模块方式,下断点刷新页面

- 2.进入到加载器内部,删除缓存的模块包让他能进入执行代码
- 清空缓存的模块
r = {}

- 3.清空r={}
- 在给一个参数用来接受的模块参数aaa={}

- 4.在当前位置下一个条件断点,这个代码没有断点的作用给的条件是0,作用就是把方法都收集到
aaa
当中 aaa[n]=e[n], 0

- 5.在到方法下面下个断点就能把所有的方法进行收集


- 6.把所有方法都收集下来
bash
result = '{'; for(let x of Object.keys(aaa)){result = result + '"' + x + '"' + ":" + aaa[x] + ','}; result = result + '}'

注意: 复制下来代码的\n
需要去除一下, 很多情况下格式也会有问题,要注意排除
(4)代码实现
扣代码的时候要把框起来的那几行删掉,相对应得最后几行也要删掉。

3.案例三
(1)逆向目标
网址:凤凰云智影院管理平台
接口:https://lark-acl.alibaba.com/idp/loginAccountAndPwd?access_token=
加密参数:
(2)逆向分析
xhr进行定位:




然后发现在异步中对数据没有进行加密,所以我们去异步之前找


(3)代码实现
javascript
var bc;
window=global
!((e) => {
"use strict";
var d = {};
function a(c) {
var f = d[c];
if (void 0 !== f)
return f.exports;
var b = d[c] = {
id: c,
loaded: !1,
exports: {}
};
// console.log('需要的模块:', c)
return e[c].call(b.exports, b, b.exports, a),
b.loaded = !0,
b.exports
}
a.m = e,
a.amdO = {},
(() => {
var e = [];
a.O = (d, c, f, b) => {
if (!c) {
var r = 1 / 0;
for (i = 0; i < e.length; i++) {
for (var [c, f, b] = e[i], t = !0, o = 0; o < c.length; o++)
(!1 & b || r >= b) && Object.keys(a.O).every((e => a.O[e](c[o]))) ? c.splice(o--, 1) : (t = !1,
b < r && (r = b));
if (t) {
e.splice(i--, 1);
var n = f();
void 0 !== n && (d = n)
}
}
return d
}
b = b || 0;
for (var i = e.length; i > 0 && e[i - 1][2] > b; i--)
e[i] = e[i - 1];
e[i] = [c, f, b]
}
}
)(),
a.n = e => {
var d = e && e.__esModule ? () => e.default : () => e;
return a.d(d, {
a: d
}),
d
}
,
a.d = (e, d) => {
for (var c in d)
a.o(d, c) && !a.o(e, c) && Object.defineProperty(e, c, {
enumerable: !0,
get: d[c]
})
}
,
a.f = {},
a.e = e => Promise.all(Object.keys(a.f).reduce(((d, c) => (a.f[c](e, d),
d)), [])),
a.u = e => "js/" + ({
879: "singleSubsidyManagement",
4089: "hoPurchase",
12686: "goodsStorageCheck",
13255: "goodsStorageLoss",
17807: "storageItem",
26515: "goodsStorageHandout",
33728: "goodsHoSalesInfo",
37973: "agreement",
69782: "purchase",
79692: "goodsStorageReturn",
84594: "sortablejs",
91456: "goodsImportData",
94099: "goodsStorageTransfer",
94266: "cinemaAgreement",
96945: "otherSetting"
}[e] || e) + "." + {
879: "56fcf392",
908: "48a76844",
929: "a4e28a02",
974: "6a8832f1",
1100: "c813640c",
1212: "86cd98fb",
1395: "8b5d3663",
1444: "8bee457d",
1579: "f18113e3",
1753: "61955d90",
1812: "7a656e74",
2124: "b1f21838",
2269: "fa28bde9",
2369: "782f3bd7",
2523: "b9938d3f",
2816: "e77eb58f",
2920: "05fd5676",
3016: "dd78dbeb",
3239: "a91ee2b7",
3608: "0a79879a",
3819: "0f6587f1",
3829: "13a0ac41",
3832: "4daaa77a",
4089: "cc6c9795",
4093: "2a16fd28",
4397: "88d6da0b",
4760: "76b3134b",
4895: "7152ee25",
5246: "53ae5e1f",
5441: "3c640cab",
5630: "cc43903b",
5758: "d866ad25",
5791: "3bdf78a4",
5880: "91454bb5",
6116: "5a3777fd",
6139: "54f85b00",
6183: "4224abf4",
6333: "c3b40c9f",
6514: "f39c2f65",
6647: "3ba35691",
6989: "ce06f9f0",
7088: "ae5fb1be",
7205: "5912100f",
7666: "5e46a3ad",
7685: "63b90d03",
7795: "28c45bb1",
7800: "bf457a81",
7852: "4897af9a",
7884: "5e7822ce",
7975: "25bbe55a",
8023: "58ac3f46",
8386: "16563e5d",
8481: "6378df51",
8980: "04b5b975",
9066: "7f729009",
9147: "c0d13372",
9266: "bcd102b6",
9342: "d9b6dc8d",
9555: "b7159478",
9588: "27095e32",
9734: "e619e24c",
10025: "80dcfa7d",
10142: "5e36afa5",
10221: "73551d6c",
10377: "d66d5043",
10556: "2debec25",
10572: "0e292cca",
10604: "c2a00545",
10611: "6b0b6825",
10775: "d4cc42f9",
10859: "73506915",
10926: "92db367e",
11121: "bf55ff4a",
11588: "e5f4f66e",
11707: "8c2a2da9",
11881: "28bc7e53",
11911: "fd6f0606",
11970: "0ea23a09",
11999: "6f85d948",
12112: "8096189d",
12385: "33098e1a",
12686: "644036de",
12700: "ad7bcbeb",
12711: "8ac9a228",
12828: "c9d1f6b0",
13186: "dac6db40",
13255: "da949559",
13317: "cf0213a7",
13331: "7a721359",
13510: "76c160bb",
13560: "d1dfd5fd",
13792: "d6f84c52",
13795: "7e03ee76",
13807: "41f9a818",
13839: "4974698f",
13883: "f86b48b1",
14012: "cc045cee",
14075: "bfca56dc",
14100: "fa86a298",
14146: "5cb2d86c",
14230: "35747bd1",
14258: "fd50bb04",
14384: "9c8dde5f",
14508: "84c1d7b1",
14601: "f20442b6",
14760: "9d1c7528",
15054: "0614bff8",
15339: "392d017b",
15366: "26b71da5",
15464: "64f798f1",
15576: "dca89dd7",
16040: "4433bf6d",
16092: "1eff91bc",
16485: "c3423cf8",
16729: "b0526acb",
16803: "93b0b4f5",
16896: "4e0719b8",
17066: "fc36b649",
17106: "738ffa91",
17201: "306c96ec",
17443: "10d54836",
17729: "6afc0be7",
17738: "b6dcf6b1",
17772: "83eb275f",
17807: "8ad908e2",
17931: "d1eb5aa7",
18203: "6cee5a5a",
18256: "1400df4b",
18265: "c937e7b0",
18336: "86a1dba9",
18406: "fa62a947",
18582: "195b7c36",
18588: "cb4ecdb0",
18729: "b37cd431",
18860: "eb9b91c9",
18881: "7bd71180",
18898: "e43b4776",
19090: "be0eb0ac",
19157: "e2535d39",
19285: "25e4bc06",
19319: "39f56a87",
19631: "4f25377b",
19647: "c3b77771",
20145: "87e88f5a",
20259: "537cb555",
20272: "0e88c625",
20370: "d52defd4",
20406: "01445a3e",
20632: "42f6df2b",
20793: "83f9163e",
20887: "a7458e59",
20958: "a63198c3",
21032: "2f62dc42",
21060: "f846a64e",
21132: "c9eea791",
21244: "e8e0011d",
21499: "f096a870",
21581: "4672ce00",
21770: "7f960fd2",
21781: "514eb209",
22252: "a6ecb47c",
22844: "d78bd09c",
23118: "a13bf44b",
23260: "75a2dc65",
23357: "e24b196d",
23469: "bc6f9b13",
23534: "afd74c4a",
23925: "fc570ed3",
24503: "7023da47",
24534: "ac81c56a",
24861: "cdf26047",
25308: "5faa4311",
25437: "d9fc3bf4",
25893: "2e635b80",
26086: "6d72e95f",
26515: "7a82b068",
26590: "ed897008",
26808: "2c1678f1",
26883: "006a0249",
26976: "677f2a48",
27552: "ca5259a3",
27647: "27c93c26",
27816: "9e725af3",
27821: "eabd2a4c",
28032: "c5ea8ffd",
28164: "233b7099",
28192: "689d45c4",
28565: "f2f367a3",
28616: "7abdd3c4",
28724: "99b36543",
28927: "c190f36c",
28934: "34198c20",
29237: "129b6ee8",
29280: "303d9ef9",
29578: "355228d1",
29636: "0d4d6fbf",
30654: "a2f7dfd4",
30849: "7e0c4f55",
30915: "049a585a",
31028: "c9320800",
31038: "582e8524",
31105: "506df5ed",
31156: "66cf5073",
31522: "52ee1fc1",
31816: "2b633415",
31836: "61b3273c",
31963: "740d16a6",
32019: "2e45c096",
32193: "007032fb",
32218: "e56d183e",
32226: "7faac018",
32505: "06e1a440",
32525: "1401793b",
32567: "a639aefe",
32610: "eddc168e",
32647: "dd33d4c1",
32793: "7012a781",
33067: "ff40bc66",
33305: "80d895ed",
33358: "b57593de",
33567: "ff4e4413",
33610: "85de5b6c",
33728: "dea88a36",
33760: "cd53d202",
34044: "e6647118",
34565: "c9aa5692",
34575: "7b55cd4b",
34725: "c7adb6c5",
35117: "2f8c4492",
35415: "352969e2",
35656: "62035fcd",
35692: "c9a24f4b",
35876: "a4ee28e3",
35916: "9d8cb7c0",
35961: "9fe2dc6e",
36086: "4506f171",
36720: "9cc94a82",
36946: "0163fd17",
37207: "805d6ca2",
37610: "aa45f257",
37741: "aed461f7",
37774: "6ec59c70",
37837: "f873024a",
37973: "b459f6bf",
38138: "db7a66be",
38157: "6c00bca4",
38367: "a7e47684",
38556: "cba27f00",
38573: "106be44b",
38667: "a67c9fe8",
38888: "bf38d998",
39091: "6dd7a55a",
39169: "5d5463c7",
39248: "65c1f593",
39317: "cc22af4c",
39368: "4a227b28",
39556: "ad589e94",
39600: "7916c3d5",
39763: "3eafbf3a",
39871: "20cac8ef",
40149: "275127fd",
40281: "43c3bd68",
40376: "03171e61",
40417: "09161848",
40434: "e7edf41f",
40485: "e2e9d9b6",
40836: "8e2d2420",
40926: "6f93bcd1",
40964: "054aed89",
41153: "3ca54685",
41601: "1307135a",
42055: "f13ec6fb",
42143: "6d4071d4",
42449: "ccd1abff",
42502: "dc98c342",
42670: "cb0dda71",
42836: "55c0795d",
43033: "116dc043",
43130: "94de0d53",
43135: "21c6225a",
43377: "39d3dc00",
43532: "a3fc1850",
43642: "30a54beb",
43665: "d8301cf8",
43861: "611d8572",
44143: "3fe22624",
44295: "0a833340",
44605: "c6d095f0",
44761: "5c7286c6",
44843: "81113f87",
44920: "ce28df9b",
44981: "5c12c36f",
45064: "467c5753",
45127: "55f9789b",
45306: "d7da8c8f",
45424: "26bf898f",
45586: "544848de",
45605: "9a03cd8c",
46044: "a1d11450",
46099: "baa6c54b",
46246: "8c58e5ef",
46277: "b113900b",
46457: "4dc6b241",
46590: "ef781b49",
46644: "a3538986",
46883: "e7eee024",
46964: "10e7b375",
47033: "3636c4d9",
47250: "6bba2681",
47284: "885d6e1c",
47668: "57c575eb",
48164: "54182cfe",
48235: "acc1122e",
48328: "f4bcba8e",
48751: "585bc5cb",
48782: "d6a320f2",
48783: "d440529c",
48850: "a7696f5a",
48969: "e6117014",
49409: "e572f82c",
49517: "bc317268",
49598: "59fc38ae",
49600: "3a862f29",
49640: "de8e67cd",
49969: "6ad2ff52",
50180: "ff8110ca",
50221: "db1bd837",
50249: "bb1b7862",
50325: "f17f5ec8",
50591: "c109dcb2",
51002: "f40351b7",
51024: "ee9d00e5",
51325: "e8fbfd43",
51637: "0e5b754b",
51780: "78127894",
51884: "48acbc63",
52074: "eeaf95a0",
52121: "d5a80a94",
52125: "d7722507",
52528: "8b9750fa",
52550: "776a4e04",
53040: "270b3660",
53409: "4ec3dbf3",
53476: "bf8aaef9",
53510: "57211c69",
53538: "7fa8711e",
53715: "21e3c91e",
54057: "3eda6981",
54142: "e449f930",
54286: "0feabd47",
54634: "483d9436",
54749: "1510c7dd",
54767: "0368cfb9",
54872: "437107e3",
54904: "357a622e",
55149: "d890b9f9",
55188: "3e0d7633",
55198: "7e6d2508",
55221: "dca05037",
55860: "ee2d7183",
56048: "09b0646e",
56058: "aef729d2",
56602: "ec56fc80",
56712: "2a9c5afb",
56761: "354416c0",
57008: "32f78135",
57320: "4c56fe8a",
57497: "493c15f5",
57979: "2498ef70",
58357: "cd0fb797",
58465: "02adb097",
58652: "7d83086f",
58822: "e0818044",
58954: "c6812f68",
59625: "81cef15e",
59819: "51f54ca9",
59904: "19d22b6d",
59924: "794cc1d2",
60108: "3a8d8f47",
60314: "c11d488d",
60374: "c03e0c79",
60448: "c3f402e4",
60453: "df4c13c6",
60969: "f61d8e85",
61179: "8a1c35f6",
61188: "81ec7d69",
61271: "b20f6b24",
61290: "301d6bd3",
61335: "ba0fbff9",
61712: "cab18bf5",
61948: "d1f9413c",
62119: "c74a1192",
62128: "598fb7a1",
62130: "6e86fe40",
62205: "199ba3ae",
62307: "2fc35779",
62422: "395092a3",
62769: "178f87c5",
62787: "a81a1d7a",
62856: "300c6bd1",
63310: "56eae4bf",
63524: "a4c76960",
63630: "e375fe4d",
63734: "61a82474",
63970: "0cdeecf9",
64053: "922cde78",
64218: "7a0d91a7",
64431: "89ce8aec",
64458: "7ba398d0",
64499: "332a9869",
64615: "c851c7ee",
64768: "5edc43f3",
64787: "6f97c8ab",
64927: "30f4c169",
65061: "ca64071f",
65130: "e138f69a",
65288: "8c053d41",
65420: "8f8b637d",
65478: "f5c51573",
65662: "e59c4910",
65735: "d6a76457",
65926: "53ccba68",
66103: "8d236406",
66383: "f5da08ab",
66583: "c1573fc6",
66596: "7e69e958",
66881: "6acb8142",
66984: "911b2c57",
67005: "a08dce42",
67842: "a53bf3aa",
68055: "bfff3c57",
68185: "9ce73a5f",
68351: "4ae8faad",
68362: "fefc5e76",
68375: "35a6b437",
68507: "165382fa",
68550: "ffaf724e",
69141: "7244148d",
69254: "ae771808",
69312: "384ed3e2",
69495: "266ae4f7",
69685: "41919c85",
69782: "e6958db4",
69834: "b93dad46",
69934: "44ac32f8",
70098: "721cb583",
70197: "b5106283",
70290: "9a0dbf97",
70375: "e75469f5",
70510: "fd56f05a",
70668: "67c203d6",
70937: "9cdf0b4e",
71240: "fe649a3e",
71315: "c7198293",
71427: "ec80bea0",
71470: "657f8ed9",
71524: "4fa9b01f",
71616: "0d06e529",
71730: "0d7c225e",
71790: "54358184",
71805: "8afd88b9",
71861: "bf38aebd",
71981: "73db57e0",
72251: "bf315fd4",
72282: "faf7e333",
72470: "1116dc41",
72562: "a200105d",
72980: "3cb09165",
72984: "f73f47cd",
73016: "d3d9b607",
73107: "3c42d939",
73166: "ff05cf52",
73270: "e1545b26",
73313: "2ae3579d",
73345: "f6046089",
73364: "36fea22a",
73422: "c0105303",
73666: "f090c8f7",
73679: "7ec10907",
73915: "e4837cf8",
74492: "ea89f8f7",
74839: "71c3bc32",
74880: "0fb35ef8",
75234: "2583979c",
75472: "048fa06b",
75655: "dac8f4dd",
75776: "53cfe585",
75788: "af3ca93a",
75993: "4a553852",
76038: "983eb1f1",
76387: "32d47d09",
76428: "0a6ca6db",
76514: "af21e2cc",
76560: "198210cb",
76796: "5a7cef8e",
76881: "27e6d825",
77054: "168848ef",
77146: "635a10b4",
77155: "47a89a9e",
77184: "f7e60b54",
77383: "fca6e959",
77715: "1fbe0c9c",
77795: "0a218700",
77909: "627929a7",
77955: "c9bd9249",
77987: "564fe770",
77996: "b8c07d49",
78124: "760a05d3",
78349: "f30e475f",
78941: "caeb908a",
79026: "cdbda05d",
79345: "f7b364bb",
79548: "90a9ef66",
79589: "0ccfc866",
79692: "3bc9b836",
80005: "182cb3c7",
80026: "74c5dda4",
80118: "9fd82369",
80395: "6b9f106d",
80443: "36d41492",
81085: "0cc49bc1",
81296: "d51948d5",
81314: "49e51f3b",
81370: "d175e002",
81405: "ed847502",
81620: "ea54da57",
81709: "ea9486cc",
81758: "be9ff0f4",
82466: "28b0ced4",
82527: "2c024db5",
82571: "ea750586",
82948: "ca980344",
83040: "b5ee8999",
83583: "024b741d",
83974: "b06494ff",
84164: "41c9bd2b",
84251: "a70dcc92",
84298: "d94536c1",
84419: "f528867b",
84500: "80c6ce0f",
84568: "6ad45a64",
84594: "1e178571",
84681: "d74c36d2",
84712: "e48b62f8",
85045: "ecfcca40",
85253: "4d907222",
85298: "e97d917d",
85361: "25ad3034",
85399: "6e066611",
85615: "27b4c612",
85661: "f8aaee3c",
85662: "c545ab18",
85761: "18d20a6a",
85983: "be58392c",
86230: "524b4860",
86323: "01d1b53e",
86403: "8fc133c6",
86473: "d30b2377",
86612: "267c913f",
86618: "0efdd79a",
86692: "1c837c5b",
86703: "f4a888ea",
87095: "80ca93c8",
87423: "71915e4a",
87480: "bc209dcc",
87626: "bc735297",
87662: "63c4c27b",
87732: "f7a20b45",
88330: "b102fab1",
88696: "29ae872e",
88784: "eb5e4721",
89037: "4414e765",
89318: "4894a44b",
89518: "9f0818ae",
89608: "abb129c8",
89683: "c35d5ee3",
89727: "82775e11",
89762: "8da36aa7",
90036: "f648ce8d",
90360: "01fec74a",
90560: "352d2ac9",
90772: "97cfaf58",
90867: "307450eb",
91320: "346ea3df",
91456: "d61029ef",
91736: "aa9dcc82",
91758: "fac1215d",
91797: "7d32a339",
91878: "276d269b",
91935: "4db54076",
91991: "9c133607",
92133: "2f9c1ec4",
92187: "be377d5d",
92326: "ff5b0cf2",
92378: "0a73d35d",
92393: "8380e1bb",
92407: "78843959",
92473: "c4db84ad",
92693: "8accc897",
93199: "2910eda4",
93462: "e1826102",
93472: "052a62ac",
93487: "f5e2cfde",
93715: "d8e55abc",
93863: "8dafdb6c",
93933: "d736b28a",
93957: "28841f42",
94099: "ca61acdd",
94266: "8b19a871",
94313: "544ab2cf",
94902: "3c635d77",
95159: "a3db461a",
95161: "715d72b0",
95417: "08e19b59",
95594: "5829d210",
95646: "2a0d4280",
95781: "9834fc84",
95927: "da3a0297",
96088: "f96020f8",
96872: "ae5fa2b8",
96909: "68834823",
96945: "41c8697b",
96983: "619679d7",
97026: "2903ddce",
97412: "bba2d5f4",
97469: "cdc0fe2b",
97614: "c2a63171",
97833: "4cee82e6",
97953: "71af4e20",
98159: "489a35c4",
98178: "23218356",
98460: "a9a162d7",
98500: "04208ed6",
98536: "ad4bc132",
99064: "9d217468",
99088: "a5500461",
99390: "edf0a25d",
99404: "7690d660",
99591: "fc4aeb25",
99702: "f148ee4f"
}[e] + ".chunk.js",
a.miniCssF = e => "css/" + ({
4089: "hoPurchase",
37973: "agreement",
69782: "purchase",
91456: "goodsImportData",
94266: "cinemaAgreement",
96945: "otherSetting"
}[e] || e) + "." + {
974: "08bb620b",
1100: "dec7d9ea",
1395: "f1c65897",
1444: "565f563e",
1579: "20f4aad4",
1812: "6b38ac03",
2124: "60c53af6",
2269: "57792e76",
2369: "23cd88e9",
2523: "20f4aad4",
2816: "fdc783e3",
2920: "579938f5",
3239: "84b86d7e",
3819: "9a97800c",
3829: "de0b8541",
4089: "56de69fb",
4093: "d8038c6c",
4760: "7f3dc3b3",
4895: "59bce377",
5246: "97af52ab",
5441: "f904ae4b",
5630: "59410c7d",
5758: "49b3add6",
5791: "00f5e65a",
5880: "675f7b45",
6116: "a0ac911e",
6139: "e9523f56",
6183: "f5c3eaf7",
6514: "22c4b8b8",
6989: "1e52675b",
7205: "bd6e8f27",
7685: "c1c1bac4",
7795: "823cf273",
7800: "8d30c822",
7852: "92b3365c",
7884: "d3a73030",
7975: "47ca6234",
8023: "c23a4f68",
8481: "e7c83c2a",
9066: "b990bb7c",
9147: "af4741ec",
9266: "c8b1ed3c",
9342: "0848fb84",
9555: "22b149bb",
9588: "5b807d14",
10142: "876ca205",
10221: "1598dd02",
10377: "3b5205f0",
10556: "6760a32d",
10572: "4a19bbaf",
10604: "3d79041a",
10611: "133f16f6",
10859: "c1d28e35",
10926: "e7bf9b0a",
11121: "6c648790",
11588: "f96c1d91",
11881: "62c7fade",
11911: "e76a42a9",
11970: "6b255b41",
11999: "a8916456",
12112: "03332789",
12385: "94b8a889",
12700: "3bd8f8aa",
12711: "59410c7d",
12828: "e212e30f",
13317: "00f76b4f",
13331: "67ad7488",
13510: "947e58a6",
13560: "92b3365c",
13792: "62a8bacc",
13795: "1ee39631",
13807: "cd226698",
13839: "6a0b1e76",
13883: "acdb934a",
14075: "1bb3a5d7",
14230: "397100ed",
14384: "ddbbda0e",
14601: "835d409d",
14760: "f7fde5c1",
15054: "91359ef8",
15366: "751e6dd8",
15464: "cbd4ff74",
15576: "67ad7488",
16040: "a11b168c",
16092: "dd7da841",
16485: "7f9a3d72",
16729: "74eaba3a",
16803: "58ac143a",
17066: "5b1ee722",
17729: "97d4e57f",
17738: "aa667483",
17772: "5c9d17d6",
17931: "ee3d90c0",
18203: "9a97800c",
18256: "f1f45d8b",
18265: "bb687961",
18336: "ca3e76d1",
18406: "fadd528e",
18582: "99d7a56e",
18588: "ed922dbc",
18729: "51df6a90",
18860: "2acfc086",
18881: "8586ce9e",
18898: "fdc783e3",
19319: "9217eacb",
19647: "9d55364d",
20145: "b0438a35",
20259: "39845920",
20272: "d31aa840",
20370: "624d0a66",
20632: "e33c58a8",
20958: "1a1cadcd",
21032: "c002598d",
21060: "2d414b15",
21244: "48dd0372",
21499: "4354ac1f",
21581: "31d6cfe0",
21781: "c4c5713f",
22844: "32e16cf5",
23118: "bde537d1",
23260: "8ebe61a9",
23357: "09389824",
23469: "55b0ab67",
23534: "31d6cfe0",
23925: "36cfcbd8",
24503: "28f539c7",
24534: "1adcf4e2",
24861: "92b3365c",
25308: "2f81b11e",
25437: "a368a290",
25893: "fa167d54",
26086: "cbc54206",
26590: "41f3ad3f",
26808: "4801877a",
26883: "d8edc407",
26976: "a9150169",
27552: "d806997f",
27647: "a158a1ed",
27821: "0448df19",
28164: "b8115022",
28565: "d3ca6884",
28616: "8cbdaff6",
28934: "78e6c464",
29280: "c8fcdc62",
29578: "c05cc6a4",
29636: "933200b4",
30654: "037a187f",
30849: "8e82c546",
31028: "357d3f33",
31038: "31d6cfe0",
31105: "0621db49",
31816: "6b57c4b8",
31836: "257c6cd8",
31963: "649b76c8",
32193: "65c24f09",
32218: "5695ff83",
32226: "8f458d6a",
32505: "75de9830",
32525: "f7fde5c1",
32567: "768a59da",
32610: "2facf3f2",
32793: "9a97800c",
33067: "3e558723",
33358: "bdcc0e6a",
33567: "78ac2405",
34044: "8fdb2791",
34565: "a11b168c",
35117: "3f2062d9",
35415: "bae4eb25",
35656: "368d80e8",
35692: "d3743ae5",
35876: "7c2f979b",
35916: "4d800a37",
35961: "1da9ed0f",
36086: "20f4aad4",
36720: "8e82c546",
36946: "de9dc156",
37207: "3b56e8f2",
37610: "03728703",
37741: "be5a4bfd",
37774: "a4e29aa8",
37973: "61706c4b",
38138: "17707109",
38157: "61b50fd9",
38367: "b0bb66c5",
38556: "9934c046",
38573: "8cff4b1d",
38667: "3f2062d9",
38888: "48955f6e",
39091: "9fc76d0e",
39169: "23bd3962",
39248: "f2f6de04",
39600: "13bbe8ee",
39763: "e8a3493c",
39871: "933c0df5",
40149: "fbef7ec8",
40281: "55b0ab67",
40376: "eb869b99",
40417: "ab33658c",
40434: "933c0df5",
40836: "ac52d73e",
40926: "23781ce6",
40964: "15d34f30",
41153: "1f271091",
41601: "9a97800c",
42055: "cbc54206",
42502: "c7696804",
42670: "efa7c0c3",
42836: "dcc608e7",
43033: "99d7a56e",
43135: "ae4b25ab",
43377: "cad6c2a3",
43532: "b3e721e4",
43642: "63aaadbf",
43861: "8d1c3ff7",
44143: "db1dfa76",
44295: "3bd8f8aa",
44605: "837d011e",
44761: "33ed3dc6",
44920: "570a8c8d",
44981: "4845573a",
45064: "a32df113",
45127: "4a19bbaf",
45424: "a345ff60",
45586: "313f7560",
45605: "bda33783",
46099: "0befc057",
46246: "091e5c92",
46590: "8997216e",
46644: "cef01bdb",
46883: "e28b8d9e",
47033: "24ac8fcf",
47250: "be30afb0",
47284: "acfba995",
47668: "639caac7",
48164: "ea793f26",
48235: "a78a9b34",
48328: "7ec38d5f",
48751: "a86817e1",
48850: "24c4812c",
49517: "41ef3df0",
49600: "835d409d",
49969: "2f81b11e",
50180: "31d6cfe0",
50221: "5fc85871",
50249: "35bc5e3c",
50325: "edbc1873",
51024: "8e4b9ba0",
51325: "04c266c6",
51637: "5296766e",
51780: "d38c51b0",
51884: "6ee1cbe4",
52074: "6c3a5730",
52125: "f546753f",
52528: "07cc3623",
53040: "b0c26745",
53510: "31d6cfe0",
53538: "6778d514",
53715: "2a28789b",
54057: "186ae091",
54142: "d02a1b22",
54767: "a75d66c7",
54872: "31d6cfe0",
54904: "cb7907bd",
55188: "4a373986",
55221: "134e006d",
55860: "a77da7f5",
56602: "a9092f8d",
56712: "dcbeb221",
56761: "7ec38d5f",
57320: "d8edc407",
57497: "29ea825b",
57979: "5d8635ff",
58357: "1c56505a",
58465: "7ca4dda3",
58652: "44eaca15",
58822: "35c053b0",
58954: "8fadf247",
59625: "794cec38",
59819: "31d6cfe0",
59904: "65c8b145",
59924: "06f52af7",
60314: "ea793f26",
60374: "bb9ba812",
60453: "c2f4deac",
60969: "b602c172",
61188: "8586ce9e",
61271: "b8115022",
61290: "648e3813",
61712: "415f76d1",
61948: "d8038c6c",
62128: "d9509b9c",
62205: "c1c1bac4",
62769: "00c47427",
62787: "dd8c342b",
62856: "3a510848",
63310: "b725dff6",
63630: "a75d66c7",
63734: "f48c10be",
63970: "3d6b39ba",
64053: "f94973d6",
64218: "a11b168c",
64458: "fd5932ca",
64499: "c64569b2",
64615: "29b36a63",
64768: "c2f4deac",
64787: "9fe89a94",
64927: "2fd8e6f0",
65130: "75c88a6a",
65288: "2dcf826a",
65478: "94d9469d",
65662: "a7801f90",
65735: "3a071e02",
65926: "078c8694",
66103: "113d966d",
66596: "c2f4deac",
66881: "2278cffe",
67005: "45e6f8dc",
67842: "cb8dd412",
68055: "4fb3af41",
68351: "a75d66c7",
68375: "c8b1ed3c",
68507: "e5c088b9",
69141: "fdc783e3",
69254: "826108d4",
69312: "08570391",
69495: "61fb729f",
69685: "7ec38d5f",
69782: "79a7f6be",
69834: "cfb1e120",
69934: "39b21849",
70098: "69b40c5c",
70290: "03558564",
70375: "99b54d86",
70510: "496864f7",
70668: "823cf273",
71315: "2e8bf65f",
71427: "821ab953",
71524: "3c28bbba",
71616: "f81d0c48",
71730: "8235eb86",
71861: "ee24f3f2",
71981: "879b3ca7",
72251: "25a6d00c",
72282: "4a34e0a7",
72562: "fe925e04",
72980: "892ae419",
72984: "4ead11dd",
73016: "201a46bf",
73107: "59410c7d",
73313: "67ad7488",
73345: "b8f7d578",
73364: "f1e4ede6",
73422: "d80cc2cc",
73679: "61eb24f6",
74492: "00f0582e",
74839: "13f587af",
74880: "264278e3",
75472: "fed4f9cb",
75788: "62085630",
76038: "82b56a85",
76387: "870b69bb",
76514: "62c7fade",
76796: "113d966d",
76881: "da77c3da",
77054: "aeb65dac",
77146: "2409e4a2",
77184: "1a1cadcd",
77715: "e3f83449",
77795: "1fc72372",
77909: "4f3a4791",
77955: "2c76bdba",
77987: "9a5d406d",
77996: "59b267c6",
78941: "7ec38d5f",
79026: "12ba553b",
79345: "de03ba3d",
79589: "92e2a1cb",
80005: "0954f799",
80026: "870b69bb",
80118: "1a1cadcd",
80395: "a54373a4",
81085: "0a19ac14",
81296: "be8563d3",
81314: "e42b1776",
81405: "d65ade74",
81620: "65187f01",
81709: "b24aef09",
81758: "e808f90e",
82466: "8d00c7b2",
82527: "3400f040",
82571: "e25e8d64",
82948: "83ac8640",
83583: "1381efb4",
83974: "21688ac8",
84251: "89e32ef3",
84298: "cc9700de",
84500: "e56e56e8",
84568: "821ab953",
84681: "c875d0e6",
85298: "f411f195",
85399: "2963c22a",
85615: "31d6cfe0",
85661: "cde47b7a",
85983: "cadeaee4",
86230: "9a97800c",
86323: "9f6c1abc",
86403: "9d3195bd",
86612: "e7d74b8a",
86618: "0ad23934",
86692: "45af9468",
87423: "70d2e250",
87480: "085029b7",
87626: "4bd5a16a",
87662: "51d03d57",
87732: "0d5499d8",
88330: "6be7fcf0",
88696: "49f30692",
88784: "f48c10be",
89037: "6a498f68",
89318: "d59a7238",
89518: "adf7e541",
89683: "b47f6941",
89727: "31d6cfe0",
89762: "de26ca11",
90036: "6e7d898d",
90360: "5cddf191",
90560: "b333e7ad",
90867: "31d6cfe0",
91320: "f8d996ea",
91456: "f3aee17c",
91758: "11ba11c8",
91797: "d2c0f421",
91878: "48bbab45",
91935: "bbcbf554",
91991: "15d34f30",
92133: "31d6cfe0",
92187: "041e8439",
92326: "98c8a019",
92378: "51df6a90",
92407: "697e085f",
92473: "238f6352",
92693: "f411f195",
93199: "cc85d467",
93462: "e8d786cb",
93487: "75de9830",
93715: "1949583a",
93933: "0cee6ea0",
94266: "9bc61e65",
94313: "a9150169",
95161: "1a1cadcd",
95417: "a3421cb5",
95646: "ded44b2e",
95781: "7383349b",
95927: "d6defa76",
96088: "d6d1c5b8",
96872: "0e93d0cc",
96909: "264278e3",
96945: "1a7efc78",
96983: "71bd8c2d",
97412: "8247cf10",
97469: "e98fb4ec",
97614: "36d211a7",
97833: "3c28bbba",
98178: "24c4812c",
98460: "d2a08a67",
98500: "2994ebd2",
99064: "21da875a",
99088: "c39920a2",
99390: "9c448760",
99404: "4076d5b3",
99591: "fe68fea5",
99702: "075b8d4c"
}[e] + ".chunk.css",
a.g = function () {
if ("object" === typeof globalThis)
return globalThis;
try {
return this || new Function("return this")()
} catch (e) {
if ("object" === typeof window)
return window
}
}(),
a.hmd = e => ((e = Object.create(e)).children || (e.children = []),
Object.defineProperty(e, "exports", {
enumerable: !0,
set: () => {
throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: " + e.id)
}
}),
e),
a.o = (e, d) => Object.prototype.hasOwnProperty.call(e, d),
(() => {
var e = {};
a.l = (d, c, f, b) => {
if (e[d])
e[d].push(c);
else {
var r, t;
if (void 0 !== f)
for (var o = document.getElementsByTagName("script"), n = 0; n < o.length; n++) {
var i = o[n];
if (i.getAttribute("src") == d) {
r = i;
break
}
}
r || (t = !0,
(r = document.createElement("script")).charset = "utf-8",
r.timeout = 120,
a.nc && r.setAttribute("nonce", a.nc),
r.src = d,
0 !== r.src.indexOf(window.location.origin + "/") && (r.crossOrigin = "anonymous")),
e[d] = [c];
var s = (a, c) => {
r.onerror = r.onload = null,
clearTimeout(l);
var f = e[d];
if (delete e[d],
r.parentNode && r.parentNode.removeChild(r),
f && f.forEach((e => e(c))),
a)
return a(c)
}
, l = setTimeout(s.bind(null, void 0, {
type: "timeout",
target: r
}), 12e4);
r.onerror = s.bind(null, r.onerror),
r.onload = s.bind(null, r.onload),
t && document.head.appendChild(r)
}
}
}
)(),
a.r = e => {
"undefined" !== typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {
value: "Module"
}),
Object.defineProperty(e, "__esModule", {
value: !0
})
}
,
a.nmd = e => (e.paths = [],
e.children || (e.children = []),
e),
a.p = "//g.alicdn.com/alipic-lark/larkportal-front/4.0.896/"
bc = a;
}
)(
{
385784: e => {
e.exports = function (e) {
return e && e.__esModule ? e : {
default: e
}
}
,
e.exports.__esModule = !0,
e.exports.default = e.exports
},
954746: (e, t, n) => {
"use strict";
var r = n(153720);
e.exports = r
},
153720: e => {
var t, n, r, a = 16, o = a, s = 65536, l = s >>> 1, u = s * s, c = s - 1;
function d(e) {
t = new Array(e);
for (var a = 0; a < t.length; a++)
t[a] = 0;
n = new p,
(r = new p).digits[0] = 1
}
d(20);
h(1e15);
function p(e) {
this.digits = "boolean" == typeof e && 1 == e ? null : t.slice(0),
this.isNeg = !1
}
function f(e) {
var t = new p(!0);
return t.digits = e.digits.slice(0),
t.isNeg = e.isNeg,
t
}
function h(e) {
var t = new p;
t.isNeg = e < 0,
e = Math.abs(e);
for (var n = 0; e > 0;)
t.digits[n++] = e & c,
e = Math.floor(e / s);
return t
}
function m(e) {
for (var t = "", n = e.length - 1; n > -1; --n)
t += e.charAt(n);
return t
}
var g = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z");
function v(e, t) {
var r = new p;
r.digits[0] = t;
for (var a = U(e, r), o = g[a[1].digits[0]]; 1 == H(a[0], n);)
a = U(a[0], r),
digit = a[1].digits[0],
o += g[a[1].digits[0]];
return (e.isNeg ? "-" : "") + m(o)
}
var y = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f");
function b(e) {
var t = "";
for (i = 0; i < 4; ++i)
t += y[15 & e],
e >>>= 4;
return m(t)
}
function _(e) {
for (var t = "", n = (w(e),
w(e)); n > -1; --n)
t += b(e.digits[n]);
return t
}
function E(e) {
return e >= 48 && e <= 57 ? e - 48 : e >= 65 && e <= 90 ? 10 + e - 65 : e >= 97 && e <= 122 ? 10 + e - 97 : 0
}
function S(e) {
for (var t = 0, n = Math.min(e.length, 4), r = 0; r < n; ++r)
t <<= 4,
t |= E(e.charCodeAt(r));
return t
}
function C(e) {
for (var t = new p, n = e.length, r = 0; n > 0; n -= 4,
++r)
t.digits[r] = S(e.substr(Math.max(n - 4, 0), Math.min(n, 4)));
return t
}
function T(e, t) {
var n;
if (e.isNeg != t.isNeg)
t.isNeg = !t.isNeg,
n = A(e, t),
t.isNeg = !t.isNeg;
else {
n = new p;
for (var r, a = 0, o = 0; o < e.digits.length; ++o)
r = e.digits[o] + t.digits[o] + a,
n.digits[o] = r % s,
a = Number(r >= s);
n.isNeg = e.isNeg
}
return n
}
function A(e, t) {
var n;
if (e.isNeg != t.isNeg)
t.isNeg = !t.isNeg,
n = T(e, t),
t.isNeg = !t.isNeg;
else {
var r, a;
n = new p,
a = 0;
for (var o = 0; o < e.digits.length; ++o)
r = e.digits[o] - t.digits[o] + a,
n.digits[o] = r % s,
n.digits[o] < 0 && (n.digits[o] += s),
a = 0 - Number(r < 0);
if (-1 == a) {
a = 0;
for (o = 0; o < e.digits.length; ++o)
r = 0 - n.digits[o] + a,
n.digits[o] = r % s,
n.digits[o] < 0 && (n.digits[o] += s),
a = 0 - Number(r < 0);
n.isNeg = !e.isNeg
} else
n.isNeg = e.isNeg
}
return n
}
function w(e) {
for (var t = e.digits.length - 1; t > 0 && 0 == e.digits[t];)
--t;
return t
}
function O(e) {
var t, n = w(e), r = e.digits[n], a = (n + 1) * o;
for (t = a; t > a - o && 0 == (32768 & r); --t)
r <<= 1;
return t
}
function I(e, t) {
for (var n, r, o, i = new p, s = w(e), l = w(t), u = 0; u <= l; ++u) {
for (n = 0,
o = u,
j = 0; j <= s; ++j,
++o)
r = i.digits[o] + e.digits[j] * t.digits[u] + n,
i.digits[o] = r & c,
n = r >>> a;
i.digits[u + s + 1] = n
}
return i.isNeg = e.isNeg != t.isNeg,
i
}
function D(e, t) {
var n, r, o;
result = new p,
n = w(e),
r = 0;
for (var i = 0; i <= n; ++i)
o = result.digits[i] + e.digits[i] * t + r,
result.digits[i] = o & c,
r = o >>> a;
return result.digits[1 + n] = r,
result
}
function M(e, t, n, r, a) {
for (var o = Math.min(t + a, e.length), i = t, s = r; i < o; ++i,
++s)
n[s] = e[i]
}
var x = new Array(0, 32768, 49152, 57344, 61440, 63488, 64512, 65024, 65280, 65408, 65472, 65504, 65520, 65528, 65532, 65534, 65535);
function N(e, t) {
var n = Math.floor(t / o)
, r = new p;
M(e.digits, 0, r.digits, n, r.digits.length - n);
for (var a = t % o, i = o - a, s = r.digits.length - 1, l = s - 1; s > 0; --s,
--l)
r.digits[s] = r.digits[s] << a & c | (r.digits[l] & x[a]) >>> i;
return r.digits[0] = r.digits[s] << a & c,
r.isNeg = e.isNeg,
r
}
var P = new Array(0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535);
function R(e, t) {
var n = Math.floor(t / o)
, r = new p;
M(e.digits, n, r.digits, 0, e.digits.length - n);
for (var a = t % o, i = o - a, s = 0, l = s + 1; s < r.digits.length - 1; ++s,
++l)
r.digits[s] = r.digits[s] >>> a | (r.digits[l] & P[a]) << i;
return r.digits[r.digits.length - 1] >>>= a,
r.isNeg = e.isNeg,
r
}
function k(e, t) {
var n = new p;
return M(e.digits, 0, n.digits, t, n.digits.length - t),
n
}
function L(e, t) {
var n = new p;
return M(e.digits, t, n.digits, 0, n.digits.length - t),
n
}
function F(e, t) {
var n = new p;
return M(e.digits, 0, n.digits, 0, t),
n
}
function H(e, t) {
if (e.isNeg != t.isNeg)
return 1 - 2 * Number(e.isNeg);
for (var n = e.digits.length - 1; n >= 0; --n)
if (e.digits[n] != t.digits[n])
return e.isNeg ? 1 - 2 * Number(e.digits[n] > t.digits[n]) : 1 - 2 * Number(e.digits[n] < t.digits[n]);
return 0
}
function U(e, t) {
var n, a, i = O(e), d = O(t), h = t.isNeg;
if (i < d)
return e.isNeg ? ((n = f(r)).isNeg = !t.isNeg,
e.isNeg = !1,
t.isNeg = !1,
a = A(t, e),
e.isNeg = !0,
t.isNeg = h) : (n = new p,
a = f(e)),
new Array(n, a);
n = new p,
a = e;
for (var m = Math.ceil(d / o) - 1, g = 0; t.digits[m] < l;)
t = N(t, 1),
++g,
++d,
m = Math.ceil(d / o) - 1;
a = N(a, g),
i += g;
for (var v = Math.ceil(i / o) - 1, y = k(t, v - m); -1 != H(a, y);)
++n.digits[v - m],
a = A(a, y);
for (var b = v; b > m; --b) {
var _ = b >= a.digits.length ? 0 : a.digits[b]
, E = b - 1 >= a.digits.length ? 0 : a.digits[b - 1]
, S = b - 2 >= a.digits.length ? 0 : a.digits[b - 2]
, C = m >= t.digits.length ? 0 : t.digits[m]
, I = m - 1 >= t.digits.length ? 0 : t.digits[m - 1];
n.digits[b - m - 1] = _ == C ? c : Math.floor((_ * s + E) / C);
for (var M = n.digits[b - m - 1] * (C * s + I), x = _ * u + (E * s + S); M > x;)
--n.digits[b - m - 1],
M = n.digits[b - m - 1] * (C * s | I),
x = _ * s * s + (E * s + S);
(a = A(a, D(y = k(t, b - m - 1), n.digits[b - m - 1]))).isNeg && (a = T(a, y),
--n.digits[b - m - 1])
}
return a = R(a, g),
n.isNeg = e.isNeg != h,
e.isNeg && (n = h ? T(n, r) : A(n, r),
a = A(t = R(t, g), a)),
0 == a.digits[0] && 0 == w(a) && (a.isNeg = !1),
new Array(n, a)
}
function G(e) {
this.modulus = f(e),
this.k = w(this.modulus) + 1;
var t, n, r = new p;
r.digits[2 * this.k] = 1,
this.mu = (t = r,
n = this.modulus,
U(t, n)[0]),
this.bkplus1 = new p,
this.bkplus1.digits[this.k + 1] = 1,
this.modulo = z,
this.multiplyMod = B,
this.powMod = V
}
function z(e) {
var t = L(e, this.k - 1)
, n = L(I(t, this.mu), this.k + 1)
, r = A(F(e, this.k + 1), F(I(n, this.modulus), this.k + 1));
r.isNeg && (r = T(r, this.bkplus1));
for (var a = H(r, this.modulus) >= 0; a;)
a = H(r = A(r, this.modulus), this.modulus) >= 0;
return r
}
function B(e, t) {
var n = I(e, t);
return this.modulo(n)
}
function V(e, t) {
var n = new p;
n.digits[0] = 1;
for (var r = e, a = t; 0 != (1 & a.digits[0]) && (n = this.multiplyMod(n, r)),
0 != (a = R(a, 1)).digits[0] || 0 != w(a);)
r = this.multiplyMod(r, r);
return n
}
e.exports = {
RSAKeyPair: function (e, t, n) {
this.e = C(e),
this.d = C(t),
this.m = C(n),
this.chunkSize = 2 * w(this.m),
this.radix = 16,
this.barrett = new G(this.m)
},
setMaxDigits: d,
encryptedString: function (e, t) {
for (var n = new Array, r = t.length, a = 0; a < r;)
n[a] = t.charCodeAt(a),
a++;
for (; n.length % e.chunkSize != 0;)
n[a++] = 0;
var o, i, s, l = n.length, u = "";
for (a = 0; a < l; a += e.chunkSize) {
for (s = new p,
o = 0,
i = a; i < a + e.chunkSize; ++o)
s.digits[o] = n[i++],
s.digits[o] += n[i++] << 8;
var c = e.barrett.powMod(s, e.e);
u += (16 == e.radix ? _(c) : v(c, e.radix)) + " "
}
return u.substring(0, u.length - 1)
}
}
},
624362: e => {
"use strict";
e.exports = "f15fb948704151452b51b9914d32d5c51083dab544541f115e7afa4e7783a5c9a9537c9478cb284c369e1687c99ae93c2f7fd0b3787194930ba9d3a06a6c15e0eb0dc393eefc6c2ae491f6289c0eed5bae55ef8731928e388b6311a039a9e97ca33199993fc84982b52f09842ebbd93140e1f98fddba791e06a3e36250ac96df"
},
896378: e => {
"use strict";
e.exports = "8c99bea915e2f3623d5bb15209ffdde3a0aa1b9652a7a3222423f00994ce2d7b5f8ef837ed2bfe940235932e3ecdabf15f15bd6e71943f5fd5166a1dd0e78f309ba39acfadec05de53c0655342caab2231b63bbbac549ce901085a14709e483b1c4037934f9d3bccd0d8a0291403d6c40b00daea810ec5fdb784591dc03188c5"
},
949284: e => {
"use strict";
e.exports = "837ec9791ee734418f44220b56cd22252c53309f59c560ff231d71e2579d38ea7a4408b017b1af85c6683111da151af25dddc53904a01e219bd56495a1add8cb70e54428bb87d95cd40478f6f800414be8a334ac779f4b819ae94fec240dc2ace1f99df64de88eef7bcbde4aabbdeac0e70a55e61331a9ea3d0546fe647977f9"
}
}
);
//# sourceMappingURL=runtime~app.da1030aa.js.map
var r = bc(385784).default;
var a = r(bc(954746))
var o = r(bc(624362))
var i = r(bc(896378))
var s = r(bc(949284));
const l = {
daily: o.default,
zlg_daily: o.default,
pre: i.default,
zlg_pre: i.default,
prod: s.default,
zlg_prod: s.default
};
a.default.setMaxDigits(130);
const u = new a.default.RSAKeyPair("10001", "", l["prod"])
function e(password) {
return a.default.encryptedString(u, password)
}
console.log(e('159632'))