@10yun/open-sdk 0.3.131 → 0.3.133
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of @10yun/open-sdk might be problematic. Click here for more details.
- package/build/plugin-common.js +41 -13
- package/dist/404-C5CPAytv.cjs +1 -0
- package/dist/404-DF2N09dA.js +10 -0
- package/dist/_plugin-vue_export-helper-Be64z-LZ.js +8 -0
- package/dist/_plugin-vue_export-helper-Dip-dkfU.cjs +1 -0
- package/dist/alone_run-CNZGRWXt.js +13 -0
- package/dist/alone_run-D3cAknck.cjs +1 -0
- package/dist/login-BWD-_Dhs.cjs +1 -0
- package/dist/login-C1qKBNQ4.js +2742 -0
- package/dist/none-DcqYeorD.js +13 -0
- package/dist/none-DkAd4m6h.cjs +1 -0
- package/dist/open-sdk.cjs.js +1 -1
- package/dist/open-sdk.css +2 -1
- package/dist/open-sdk.es.js +26 -26
- package/dist/opensdk-v3-BPsKIq21.js +10046 -0
- package/dist/opensdk-v3-ExnN6Qe0.cjs +10 -0
- package/package.json +3 -2
- package/vite-plugin-shiyun.js +3 -2
- package/dist/404-CIjUET_t.js +0 -15
- package/dist/404-x0i5WV4s.cjs +0 -1
- package/dist/alone_run-0VoPU58J.cjs +0 -1
- package/dist/alone_run-olbi6No5.js +0 -18
- package/dist/index-9iozHkWv.cjs +0 -30
- package/dist/index-CU8RWfCo.js +0 -11588
- package/dist/login-B1IbCQFh.cjs +0 -1
- package/dist/login-Cn5RGMdT.js +0 -1472
- package/dist/none-BntNHf_N.cjs +0 -1
- package/dist/none-DbzlBbe6.js +0 -18
package/build/plugin-common.js
CHANGED
|
@@ -4,12 +4,13 @@ import { parseDomainUrl } from './common.js';
|
|
|
4
4
|
/**
|
|
5
5
|
* 通用
|
|
6
6
|
*/
|
|
7
|
-
export function
|
|
7
|
+
export function shiyunPluginCommon(ENV_ARR_VITE, ENV_ARR_CICD, ENV_MODE, params) {
|
|
8
|
+
const { CICD_BUILD_DOMAIN_SCHEME, CICD_BUILD_DOMAIN_ALONE, CICD_BUILD_VERS_FULL, CICD_BUILD_VERS_CODE } = ENV_ARR_CICD;
|
|
9
|
+
const { VITE_SY_PRODUCT_PORT, VITE_SY_PRODUCT_SIGN } = ENV_ARR_VITE;
|
|
10
|
+
|
|
8
11
|
// 根据当前工作目录中的 `mode` 加载 .env 文件
|
|
9
12
|
const PROCESS_CWD = process.cwd();
|
|
10
13
|
const BASENAME_SIGN = path.basename(PROCESS_CWD);
|
|
11
|
-
const { CICD_BUILD_DOMAIN_SCHEME, CICD_BUILD_DOMAIN_ALONE, CICD_BUILD_VERS_FULL, CICD_BUILD_VERS_CODE } = ENV_ARR_CICD;
|
|
12
|
-
const { VITE_SY_PRODUCT_PORT, VITE_SY_PRODUCT_SIGN } = ENV_ARR_VITE;
|
|
13
14
|
const LAST_BUILD_SIGN = VITE_SY_PRODUCT_SIGN || BASENAME_SIGN;
|
|
14
15
|
|
|
15
16
|
let LAST_BUILD_DOMAIN = '';
|
|
@@ -40,10 +41,20 @@ export function shiyunReleaseCommon(ENV_ARR_VITE, ENV_ARR_CICD, ENV_MODE, params
|
|
|
40
41
|
esbuild: {
|
|
41
42
|
drop: ['console', 'debugger']
|
|
42
43
|
},
|
|
44
|
+
// oxc: {
|
|
45
|
+
// dropConsole: true,
|
|
46
|
+
// compress: {
|
|
47
|
+
// drop_console: true, // Remove console statements
|
|
48
|
+
// drop_debugger: true, // Remove debugger statements
|
|
49
|
+
// // passes: 2 // Number of compression passes
|
|
50
|
+
// dropConsole: true,
|
|
51
|
+
// dropDebugger: true,
|
|
52
|
+
// treeshake: {
|
|
53
|
+
// manualPureFunctions: ['console']
|
|
54
|
+
// }
|
|
55
|
+
// }
|
|
56
|
+
// },
|
|
43
57
|
optimizeDeps: {
|
|
44
|
-
esbuildOptions: {
|
|
45
|
-
target: 'esnext'
|
|
46
|
-
},
|
|
47
58
|
// 确保 open-sdk 包在依赖优化中
|
|
48
59
|
// include: ['@10yun/open-sdk']
|
|
49
60
|
exclude: ['@10yun/open-sdk/uncompiled']
|
|
@@ -55,10 +66,27 @@ export function shiyunReleaseCommon(ENV_ARR_VITE, ENV_ARR_CICD, ENV_MODE, params
|
|
|
55
66
|
// exclude: ['@10yun/open-sdk']
|
|
56
67
|
},
|
|
57
68
|
build: {
|
|
69
|
+
minify: 'esbuild', // oxc 、 esbuild
|
|
58
70
|
// target: ['chrome89', 'edge89', 'firefox89', 'safari15', 'chrome87', 'edge88', 'es2020', 'firefox78', 'safari14'],
|
|
59
71
|
target: 'esnext',
|
|
60
72
|
sourcemap: false,
|
|
61
|
-
chunkSizeWarningLimit:
|
|
73
|
+
chunkSizeWarningLimit: 2200
|
|
74
|
+
// rolldownOptions: {
|
|
75
|
+
// output: {
|
|
76
|
+
// advancedChunks: {
|
|
77
|
+
// groups: [
|
|
78
|
+
// { name: 'vue-vendor', test: /[\\/]node_modules[\\/](vue)[\\/]/ },
|
|
79
|
+
// { name: 'pinia', test: /[\\/]node_modules[\\/]pinia[\\/]/ },
|
|
80
|
+
// // { name: '@10yun-ui', test: /[\\/]node_modules[\\/]@10yun[\\/]/ },
|
|
81
|
+
// { name: '@10yun-ui', test: /[\\/]node_modules[\\/]@10yun\/cv-pc-ui[\\/]/ },
|
|
82
|
+
// { name: '@10yun-opensdk', test: /[\\/]node_modules[\\/]@10yun\/open-sdk[\\/]/ },
|
|
83
|
+
// { name: '@10yun-utils', test: /[\\/]node_modules[\\/]@10yun\/cv-js-utils[\\/]/ },
|
|
84
|
+
// // 把 element 单独拆分
|
|
85
|
+
// { name: 'element-plus', test: /[\\/]node_modules[\\/]element-plus[\\/]/ }
|
|
86
|
+
// ]
|
|
87
|
+
// }
|
|
88
|
+
// }
|
|
89
|
+
// }
|
|
62
90
|
},
|
|
63
91
|
output: {
|
|
64
92
|
// 把子应用打包成 umd 库格式
|
|
@@ -101,14 +129,14 @@ export function shiyunReleaseCommon(ENV_ARR_VITE, ENV_ARR_CICD, ENV_MODE, params
|
|
|
101
129
|
* 新增十云相关信息
|
|
102
130
|
*/
|
|
103
131
|
const introductionInfo = 'saas软件,软件开发,软件制定,公众号,小程序,app,十云,十云科技,福州十云,ctocode,10yun.com';
|
|
104
|
-
let shiyunInfo =
|
|
105
|
-
shiyunInfo +=
|
|
106
|
-
shiyunInfo +=
|
|
107
|
-
shiyunInfo +=
|
|
108
|
-
shiyunInfo +=
|
|
132
|
+
let shiyunInfo = ` <meta name="description" content="${introductionInfo}" />\n`;
|
|
133
|
+
shiyunInfo += ` <meta name="keywords" content="${introductionInfo}" />\n`;
|
|
134
|
+
shiyunInfo += ` <meta name="author" content="十云_ctocode_技术支持_https://www.10yun.com" />\n`;
|
|
135
|
+
shiyunInfo += ` <meta name="copyright" content="福州十云科技有限公司" />\n`;
|
|
136
|
+
shiyunInfo += ` <meta name="website" content="https://www.10yun.com/" />\n`;
|
|
109
137
|
|
|
110
138
|
if (CICD_BUILD_VERS_FULL) {
|
|
111
|
-
shiyunInfo +=
|
|
139
|
+
shiyunInfo += ` <meta name="version" content="${CICD_BUILD_VERS_FULL}_${CICD_BUILD_VERS_CODE}" />\n`;
|
|
112
140
|
}
|
|
113
141
|
// 将meta标签插入到head标签内(</head>闭合标签之前)
|
|
114
142
|
html = html.replace('</head>', `\n${shiyunInfo}\n</head>`);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const c=require("./opensdk-v3-ExnN6Qe0.cjs"),l=require("./_plugin-vue_export-helper-Dip-dkfU.cjs");let e=require("vue");var o={},t={class:"cloud-404-wrap"};function _(u,r){return(0,e.openBlock)(),(0,e.createElementBlock)("div",t,[...r[0]||(r[0]=[(0,e.createElementVNode)("div",{class:"cloud-404-box"},[(0,e.createElementVNode)("div",{class:"cloud-404-code"},"404"),(0,e.createElementVNode)("div",{class:"cloud-404-message"},"Not Found")],-1)])])}var d=l.__plugin_vue_export_helper_default(o,[["render",_]]);exports.default=d;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { t as r } from "./_plugin-vue_export-helper-Be64z-LZ.js";
|
|
2
|
+
import { createElementBlock as d, createElementVNode as e, openBlock as l } from "vue";
|
|
3
|
+
var t = {}, a = { class: "cloud-404-wrap" };
|
|
4
|
+
function c(s, o) {
|
|
5
|
+
return l(), d("div", a, [...o[0] || (o[0] = [e("div", { class: "cloud-404-box" }, [e("div", { class: "cloud-404-code" }, "404"), e("div", { class: "cloud-404-message" }, "Not Found")], -1)])]);
|
|
6
|
+
}
|
|
7
|
+
var n = /* @__PURE__ */ r(t, [["render", c]]);
|
|
8
|
+
export {
|
|
9
|
+
n as default
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var n=(e,r)=>{const t=e.__vccOpts||e;for(const[_,u]of r)t[_]=u;return t};Object.defineProperty(exports,"__plugin_vue_export_helper_default",{enumerable:!0,get:function(){return n}});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { t as n } from "./_plugin-vue_export-helper-Be64z-LZ.js";
|
|
2
|
+
import { createElementBlock as r, createElementVNode as e, openBlock as l } from "vue";
|
|
3
|
+
var a = {}, t = {
|
|
4
|
+
class: "cloud-none-wrap",
|
|
5
|
+
style: { "background-color": "none" }
|
|
6
|
+
};
|
|
7
|
+
function c(d, o) {
|
|
8
|
+
return l(), r("div", t, [...o[0] || (o[0] = [e("div", { class: "cloud-none-box" }, [e("div", { class: "cloud-none-code" }, "不建议,子应用单独运行~"), e("div", { class: "cloud-none-message" }, "Not Alone")], -1)])]);
|
|
9
|
+
}
|
|
10
|
+
var u = /* @__PURE__ */ n(a, [["render", c]]);
|
|
11
|
+
export {
|
|
12
|
+
u as default
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const _=require("./opensdk-v3-ExnN6Qe0.cjs"),n=require("./_plugin-vue_export-helper-Dip-dkfU.cjs");let e=require("vue");var o={},l={class:"cloud-none-wrap",style:{"background-color":"none"}};function t(u,r){return(0,e.openBlock)(),(0,e.createElementBlock)("div",l,[...r[0]||(r[0]=[(0,e.createElementVNode)("div",{class:"cloud-none-box"},[(0,e.createElementVNode)("div",{class:"cloud-none-code"},"不建议,子应用单独运行~"),(0,e.createElementVNode)("div",{class:"cloud-none-message"},"Not Alone")],-1)])])}var c=n.__plugin_vue_export_helper_default(o,[["render",t]]);exports.default=c;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const N=require("./opensdk-v3-ExnN6Qe0.cjs"),P=require("./_plugin-vue_export-helper-Dip-dkfU.cjs");let a=require("vue");var G={},$={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"};function x(h,n){return(0,a.openBlock)(),(0,a.createElementBlock)("svg",$,[...n[0]||(n[0]=[(0,a.createElementVNode)("path",{d:"M384 554.666667a85.333333 85.333333 0 0 1 85.333333 85.333333v234.666667a85.333333 85.333333 0 0 1-85.333333 85.333333H149.333333a85.333333 85.333333 0 0 1-85.333333-85.333333V640a85.333333 85.333333 0 0 1 85.333333-85.333333h234.666667z m226.133333 277.333333c4.693333 0 8.533333 3.84 8.533334 8.533333V896h183.466666c4.693333 0 8.533333 3.84 8.533334 8.533333v46.933334a8.533333 8.533333 0 0 1-8.533334 8.533333H563.2a8.533333 8.533333 0 0 1-8.533333-8.533333v-110.933334c0-4.693333 3.84-8.533333 8.533333-8.533333h46.933333z m341.333334 0c4.693333 0 8.533333 3.84 8.533333 8.533333v110.933334a8.533333 8.533333 0 0 1-8.533333 8.533333h-46.933334a8.533333 8.533333 0 0 1-8.533333-8.533333v-110.933334c0-4.693333 3.84-8.533333 8.533333-8.533333h46.933334zM384 618.666667H149.333333a21.333333 21.333333 0 0 0-21.184 18.837333L128 640v234.666667a21.333333 21.333333 0 0 0 18.837333 21.184L149.333333 896h234.666667a21.333333 21.333333 0 0 0 21.184-18.837333L405.333333 874.666667V640a21.333333 21.333333 0 0 0-18.837333-21.184L384 618.666667z m418.133333 149.333333c4.693333 0 8.533333 3.84 8.533334 8.533333v46.933334a8.533333 8.533333 0 0 1-8.533334 8.533333h-46.933333a8.533333 8.533333 0 0 1-8.533333-8.533333v-46.933334c0-4.693333 3.84-8.533333 8.533333-8.533333h46.933333zM298.666667 704a21.333333 21.333333 0 0 1 21.333333 21.333333v64a21.333333 21.333333 0 0 1-21.333333 21.333334h-64a21.333333 21.333333 0 0 1-21.333334-21.333334v-64a21.333333 21.333333 0 0 1 21.333334-21.333333h64z m503.466666-149.333333c4.693333 0 8.533333 3.84 8.533334 8.533333v46.933333a8.533333 8.533333 0 0 1-8.533334 8.533334H618.666667v64h119.466666c4.693333 0 8.533333 3.84 8.533334 8.533333v46.933333a8.533333 8.533333 0 0 1-8.533334 8.533334h-174.933333a8.533333 8.533333 0 0 1-8.533333-8.533334v-174.933333c0-4.693333 3.84-8.533333 8.533333-8.533333h238.933333z m149.333334 128c4.693333 0 8.533333 3.84 8.533333 8.533333v46.933333a8.533333 8.533333 0 0 1-8.533333 8.533334h-132.266667a8.533333 8.533333 0 0 1-8.533333-8.533334v-46.933333c0-4.693333 3.84-8.533333 8.533333-8.533333h132.266667z m0-128c4.693333 0 8.533333 3.84 8.533333 8.533333v46.933333a8.533333 8.533333 0 0 1-8.533333 8.533334h-46.933334a8.533333 8.533333 0 0 1-8.533333-8.533334v-46.933333c0-4.693333 3.84-8.533333 8.533333-8.533333h46.933334zM384 64a85.333333 85.333333 0 0 1 85.333333 85.333333v234.666667a85.333333 85.333333 0 0 1-85.333333 85.333333H149.333333a85.333333 85.333333 0 0 1-85.333333-85.333333V149.333333a85.333333 85.333333 0 0 1 85.333333-85.333333h234.666667z m490.666667 0a85.333333 85.333333 0 0 1 85.333333 85.333333v234.666667a85.333333 85.333333 0 0 1-85.333333 85.333333H640a85.333333 85.333333 0 0 1-85.333333-85.333333V149.333333a85.333333 85.333333 0 0 1 85.333333-85.333333h234.666667zM384 128H149.333333a21.333333 21.333333 0 0 0-21.184 18.837333L128 149.333333v234.666667a21.333333 21.333333 0 0 0 18.837333 21.184L149.333333 405.333333h234.666667a21.333333 21.333333 0 0 0 21.184-18.837333L405.333333 384V149.333333a21.333333 21.333333 0 0 0-18.837333-21.184L384 128z m490.666667 0H640a21.333333 21.333333 0 0 0-21.184 18.837333L618.666667 149.333333v234.666667a21.333333 21.333333 0 0 0 18.837333 21.184L640 405.333333h234.666667a21.333333 21.333333 0 0 0 21.184-18.837333L896 384V149.333333a21.333333 21.333333 0 0 0-18.837333-21.184L874.666667 128z m-576 85.333333a21.333333 21.333333 0 0 1 21.333333 21.333334v64a21.333333 21.333333 0 0 1-21.333333 21.333333h-64a21.333333 21.333333 0 0 1-21.333334-21.333333v-64a21.333333 21.333333 0 0 1 21.333334-21.333334h64z m490.666666 0a21.333333 21.333333 0 0 1 21.333334 21.333334v64a21.333333 21.333333 0 0 1-21.333334 21.333333h-64a21.333333 21.333333 0 0 1-21.333333-21.333333v-64a21.333333 21.333333 0 0 1 21.333333-21.333334h64z",fill:"currentColor","p-id":"27545"},null,-1)])])}var K=P.__plugin_vue_export_helper_default(G,[["render",x]]),J={},X={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Y(h,n){return(0,a.openBlock)(),(0,a.createElementBlock)("svg",X,[...n[0]||(n[0]=[(0,a.createElementVNode)("path",{d:"M23 16a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h18a2 2 0 0 1 2 2v12ZM21 4H3v9h18V4ZM3 15v1h18v-1H3Zm3 6a1 1 0 0 1 1-1h10a1 1 0 1 1 0 2H7a1 1 0 0 1-1-1Z",fill:"currentColor"},null,-1)])])}var W=P.__plugin_vue_export_helper_default(J,[["render",Y]]),Z={},j={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"};function e3(h,n){return(0,a.openBlock)(),(0,a.createElementBlock)("svg",j,[...n[0]||(n[0]=[(0,a.createElementVNode)("path",{d:"M128 669.866667v154.133333a72 72 0 0 0 67.776 71.893333l4.224 0.106667H354.133333c4.693333 0 8.533333 3.84 8.533334 8.533333v46.933334a8.533333 8.533333 0 0 1-8.533334 8.533333H205.482667A141.482667 141.482667 0 0 1 64 818.517333V669.866667c0-4.693333 3.84-8.533333 8.533333-8.533334h46.933334c4.693333 0 8.533333 3.84 8.533333 8.533334z m832 0v148.650666A141.482667 141.482667 0 0 1 818.517333 960H669.866667a8.533333 8.533333 0 0 1-8.533334-8.533333v-46.933334c0-4.693333 3.84-8.533333 8.533334-8.533333h154.133333a72 72 0 0 0 71.893333-67.776l0.106667-4.224V669.866667c0-4.693333 3.84-8.533333 8.533333-8.533334h46.933334c4.693333 0 8.533333 3.84 8.533333 8.533334z m0-170.666667v46.933333a8.533333 8.533333 0 0 1-8.533333 8.533334H72.533333a8.533333 8.533333 0 0 1-8.533333-8.533334v-46.933333c0-4.693333 3.84-8.533333 8.533333-8.533333h878.933334c4.693333 0 8.533333 3.84 8.533333 8.533333z m-597.333333-426.666667v46.933334a8.533333 8.533333 0 0 1-8.533334 8.533333H200a72 72 0 0 0-71.893333 67.776L128 200V354.133333a8.533333 8.533333 0 0 1-8.533333 8.533334H72.533333a8.533333 8.533333 0 0 1-8.533333-8.533334V205.482667A141.482667 141.482667 0 0 1 205.482667 64H354.133333c4.693333 0 8.533333 3.84 8.533334 8.533333zM818.517333 64A141.482667 141.482667 0 0 1 960 205.482667V354.133333a8.533333 8.533333 0 0 1-8.533333 8.533334h-46.933334a8.533333 8.533333 0 0 1-8.533333-8.533334V200a72 72 0 0 0-67.776-71.893333L824 128H669.866667a8.533333 8.533333 0 0 1-8.533334-8.533333V72.533333c0-4.693333 3.84-8.533333 8.533334-8.533333h148.650666z",fill:"currentColor"},null,-1)])])}var t3=P.__plugin_vue_export_helper_default(Z,[["render",e3]]),a3=N.__commonJSMin(((h,n)=>{var c;(function(v,m){typeof h=="object"?n.exports=m():typeof define=="function"&&define.amd?define(m):v.QRCode=m()})(h,function(){function v(e){this.mode=w.MODE_8BIT_BYTE,this.data=e,this.parsedData=[];for(var t=0,o=this.data.length;t<o;t++){var i=[],r=this.data.charCodeAt(t);r>65536?(i[0]=240|(r&1835008)>>>18,i[1]=128|(r&258048)>>>12,i[2]=128|(r&4032)>>>6,i[3]=128|r&63):r>2048?(i[0]=224|(r&61440)>>>12,i[1]=128|(r&4032)>>>6,i[2]=128|r&63):r>128?(i[0]=192|(r&1984)>>>6,i[1]=128|r&63):i[0]=r,this.parsedData.push(i)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}v.prototype={getLength:function(e){return this.parsedData.length},write:function(e){for(var t=0,o=this.parsedData.length;t<o;t++)e.put(this.parsedData[t],8)}};function m(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}m.prototype={addData:function(e){var t=new v(e);this.dataList.push(t),this.dataCache=null},isDark:function(e,t){if(e<0||this.moduleCount<=e||t<0||this.moduleCount<=t)throw new Error(e+","+t);return this.modules[e][t]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(e,t){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var o=0;o<this.moduleCount;o++){this.modules[o]=new Array(this.moduleCount);for(var i=0;i<this.moduleCount;i++)this.modules[o][i]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(e,t),this.typeNumber>=7&&this.setupTypeNumber(e),this.dataCache==null&&(this.dataCache=m.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},setupPositionProbePattern:function(e,t){for(var o=-1;o<=7;o++)if(!(e+o<=-1||this.moduleCount<=e+o))for(var i=-1;i<=7;i++)t+i<=-1||this.moduleCount<=t+i||(0<=o&&o<=6&&(i==0||i==6)||0<=i&&i<=6&&(o==0||o==6)||2<=o&&o<=4&&2<=i&&i<=4?this.modules[e+o][t+i]=!0:this.modules[e+o][t+i]=!1)},getBestMaskPattern:function(){for(var e=0,t=0,o=0;o<8;o++){this.makeImpl(!0,o);var i=_.getLostPoint(this);(o==0||e>i)&&(e=i,t=o)}return t},createMovieClip:function(e,t,o){var i=e.createEmptyMovieClip(t,o),r=1;this.make();for(var l=0;l<this.modules.length;l++)for(var d=l*r,s=0;s<this.modules[l].length;s++){var u=s*r;this.modules[l][s]&&(i.beginFill(0,100),i.moveTo(u,d),i.lineTo(u+r,d),i.lineTo(u+r,d+r),i.lineTo(u,d+r),i.endFill())}return i},setupTimingPattern:function(){for(var e=8;e<this.moduleCount-8;e++)this.modules[e][6]==null&&(this.modules[e][6]=e%2==0);for(var t=8;t<this.moduleCount-8;t++)this.modules[6][t]==null&&(this.modules[6][t]=t%2==0)},setupPositionAdjustPattern:function(){for(var e=_.getPatternPosition(this.typeNumber),t=0;t<e.length;t++)for(var o=0;o<e.length;o++){var i=e[t],r=e[o];if(this.modules[i][r]==null)for(var l=-2;l<=2;l++)for(var d=-2;d<=2;d++)l==-2||l==2||d==-2||d==2||l==0&&d==0?this.modules[i+l][r+d]=!0:this.modules[i+l][r+d]=!1}},setupTypeNumber:function(e){for(var t=_.getBCHTypeNumber(this.typeNumber),o=0;o<18;o++){var i=!e&&(t>>o&1)==1;this.modules[Math.floor(o/3)][o%3+this.moduleCount-8-3]=i}for(var o=0;o<18;o++){var i=!e&&(t>>o&1)==1;this.modules[o%3+this.moduleCount-8-3][Math.floor(o/3)]=i}},setupTypeInfo:function(e,t){for(var o=this.errorCorrectLevel<<3|t,i=_.getBCHTypeInfo(o),r=0;r<15;r++){var l=!e&&(i>>r&1)==1;r<6?this.modules[r][8]=l:r<8?this.modules[r+1][8]=l:this.modules[this.moduleCount-15+r][8]=l}for(var r=0;r<15;r++){var l=!e&&(i>>r&1)==1;r<8?this.modules[8][this.moduleCount-r-1]=l:r<9?this.modules[8][15-r-1+1]=l:this.modules[8][15-r-1]=l}this.modules[this.moduleCount-8][8]=!e},mapData:function(e,t){for(var o=-1,i=this.moduleCount-1,r=7,l=0,d=this.moduleCount-1;d>0;d-=2)for(d==6&&d--;;){for(var s=0;s<2;s++)if(this.modules[i][d-s]==null){var u=!1;l<e.length&&(u=(e[l]>>>r&1)==1),_.getMask(t,i,d-s)&&(u=!u),this.modules[i][d-s]=u,r--,r==-1&&(l++,r=7)}if(i+=o,i<0||this.moduleCount<=i){i-=o,o=-o;break}}}},m.PAD0=236,m.PAD1=17,m.createData=function(e,t,o){for(var i=A.getRSBlocks(e,t),r=new R,l=0;l<o.length;l++){var d=o[l];r.put(d.mode,4),r.put(d.getLength(),_.getLengthInBits(d.mode,e)),d.write(r)}for(var s=0,l=0;l<i.length;l++)s+=i[l].dataCount;if(r.getLengthInBits()>s*8)throw new Error("code length overflow. ("+r.getLengthInBits()+">"+s*8+")");for(r.getLengthInBits()+4<=s*8&&r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(!1);for(;!(r.getLengthInBits()>=s*8||(r.put(m.PAD0,8),r.getLengthInBits()>=s*8));)r.put(m.PAD1,8);return m.createBytes(r,i)},m.createBytes=function(e,t){for(var o=0,i=0,r=0,l=new Array(t.length),d=new Array(t.length),s=0;s<t.length;s++){var u=t[s].dataCount,p=t[s].totalCount-u;i=Math.max(i,u),r=Math.max(r,p),l[s]=new Array(u);for(var f=0;f<l[s].length;f++)l[s][f]=255&e.buffer[f+o];o+=u;var C=_.getErrorCorrectPolynomial(p),k=new D(l[s],C.getLength()-1).mod(C);d[s]=new Array(C.getLength()-1);for(var f=0;f<d[s].length;f++){var y=f+k.getLength()-d[s].length;d[s][f]=y>=0?k.get(y):0}}for(var S=0,f=0;f<t.length;f++)S+=t[f].totalCount;for(var b=new Array(S),V=0,f=0;f<i;f++)for(var s=0;s<t.length;s++)f<l[s].length&&(b[V++]=l[s][f]);for(var f=0;f<r;f++)for(var s=0;s<t.length;s++)f<d[s].length&&(b[V++]=d[s][f]);return b};for(var w={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},L={L:1,M:0,Q:3,H:2},T={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},_={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(e){for(var t=e<<10;_.getBCHDigit(t)-_.getBCHDigit(_.G15)>=0;)t^=_.G15<<_.getBCHDigit(t)-_.getBCHDigit(_.G15);return(e<<10|t)^_.G15_MASK},getBCHTypeNumber:function(e){for(var t=e<<12;_.getBCHDigit(t)-_.getBCHDigit(_.G18)>=0;)t^=_.G18<<_.getBCHDigit(t)-_.getBCHDigit(_.G18);return e<<12|t},getBCHDigit:function(e){for(var t=0;e!=0;)t++,e>>>=1;return t},getPatternPosition:function(e){return _.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,o){switch(e){case T.PATTERN000:return(t+o)%2==0;case T.PATTERN001:return t%2==0;case T.PATTERN010:return o%3==0;case T.PATTERN011:return(t+o)%3==0;case T.PATTERN100:return(Math.floor(t/2)+Math.floor(o/3))%2==0;case T.PATTERN101:return t*o%2+t*o%3==0;case T.PATTERN110:return(t*o%2+t*o%3)%2==0;case T.PATTERN111:return(t*o%3+(t+o)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new D([1],0),o=0;o<e;o++)t=t.multiply(new D([1,E.gexp(o)],0));return t},getLengthInBits:function(e,t){if(1<=t&&t<10)switch(e){case w.MODE_NUMBER:return 10;case w.MODE_ALPHA_NUM:return 9;case w.MODE_8BIT_BYTE:return 8;case w.MODE_KANJI:return 8;default:throw new Error("mode:"+e)}else if(t<27)switch(e){case w.MODE_NUMBER:return 12;case w.MODE_ALPHA_NUM:return 11;case w.MODE_8BIT_BYTE:return 16;case w.MODE_KANJI:return 10;default:throw new Error("mode:"+e)}else if(t<41)switch(e){case w.MODE_NUMBER:return 14;case w.MODE_ALPHA_NUM:return 13;case w.MODE_8BIT_BYTE:return 16;case w.MODE_KANJI:return 12;default:throw new Error("mode:"+e)}else throw new Error("type:"+t)},getLostPoint:function(e){for(var t=e.getModuleCount(),o=0,i=0;i<t;i++)for(var r=0;r<t;r++){for(var l=0,d=e.isDark(i,r),s=-1;s<=1;s++)if(!(i+s<0||t<=i+s))for(var u=-1;u<=1;u++)r+u<0||t<=r+u||s==0&&u==0||d==e.isDark(i+s,r+u)&&l++;l>5&&(o+=3+l-5)}for(var i=0;i<t-1;i++)for(var r=0;r<t-1;r++){var p=0;e.isDark(i,r)&&p++,e.isDark(i+1,r)&&p++,e.isDark(i,r+1)&&p++,e.isDark(i+1,r+1)&&p++,(p==0||p==4)&&(o+=3)}for(var i=0;i<t;i++)for(var r=0;r<t-6;r++)e.isDark(i,r)&&!e.isDark(i,r+1)&&e.isDark(i,r+2)&&e.isDark(i,r+3)&&e.isDark(i,r+4)&&!e.isDark(i,r+5)&&e.isDark(i,r+6)&&(o+=40);for(var r=0;r<t;r++)for(var i=0;i<t-6;i++)e.isDark(i,r)&&!e.isDark(i+1,r)&&e.isDark(i+2,r)&&e.isDark(i+3,r)&&e.isDark(i+4,r)&&!e.isDark(i+5,r)&&e.isDark(i+6,r)&&(o+=40);for(var f=0,r=0;r<t;r++)for(var i=0;i<t;i++)e.isDark(i,r)&&f++;var C=Math.abs(100*f/t/t-50)/5;return o+=C*10,o}},E={glog:function(e){if(e<1)throw new Error("glog("+e+")");return E.LOG_TABLE[e]},gexp:function(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return E.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},g=0;g<8;g++)E.EXP_TABLE[g]=1<<g;for(var g=8;g<256;g++)E.EXP_TABLE[g]=E.EXP_TABLE[g-4]^E.EXP_TABLE[g-5]^E.EXP_TABLE[g-6]^E.EXP_TABLE[g-8];for(var g=0;g<255;g++)E.LOG_TABLE[E.EXP_TABLE[g]]=g;function D(e,t){if(e.length==null)throw new Error(e.length+"/"+t);for(var o=0;o<e.length&&e[o]==0;)o++;this.num=new Array(e.length-o+t);for(var i=0;i<e.length-o;i++)this.num[i]=e[i+o]}D.prototype={get:function(e){return this.num[e]},getLength:function(){return this.num.length},multiply:function(e){for(var t=new Array(this.getLength()+e.getLength()-1),o=0;o<this.getLength();o++)for(var i=0;i<e.getLength();i++)t[o+i]^=E.gexp(E.glog(this.get(o))+E.glog(e.get(i)));return new D(t,0)},mod:function(e){if(this.getLength()-e.getLength()<0)return this;for(var t=E.glog(this.get(0))-E.glog(e.get(0)),o=new Array(this.getLength()),i=0;i<this.getLength();i++)o[i]=this.get(i);for(var i=0;i<e.getLength();i++)o[i]^=E.gexp(E.glog(e.get(i))+t);return new D(o,0).mod(e)}};function A(e,t){this.totalCount=e,this.dataCount=t}A.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],A.getRSBlocks=function(e,t){var o=A.getRsBlockTable(e,t);if(o==null)throw new Error("bad rs block @ typeNumber:"+e+"/errorCorrectLevel:"+t);for(var i=o.length/3,r=[],l=0;l<i;l++)for(var d=o[l*3+0],s=o[l*3+1],u=o[l*3+2],p=0;p<d;p++)r.push(new A(s,u));return r},A.getRsBlockTable=function(e,t){switch(t){case L.L:return A.RS_BLOCK_TABLE[(e-1)*4+0];case L.M:return A.RS_BLOCK_TABLE[(e-1)*4+1];case L.Q:return A.RS_BLOCK_TABLE[(e-1)*4+2];case L.H:return A.RS_BLOCK_TABLE[(e-1)*4+3];default:return}};function R(){this.buffer=[],this.length=0}R.prototype={get:function(e){var t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(var o=0;o<t;o++)this.putBit((e>>>t-o-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var B=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function q(){return typeof CanvasRenderingContext2D<"u"}function O(){var e=!1,t=navigator.userAgent;if(/android/i.test(t)){e=!0;var o=t.toString().match(/android ([0-9]\.[0-9])/i);o&&o[1]&&(e=parseFloat(o[1]))}return e}var U=(function(){var e=function(t,o){this._el=t,this._htOption=o};return e.prototype.draw=function(t){var o=this._htOption,i=this._el,r=t.getModuleCount();Math.floor(o.width/r),Math.floor(o.height/r),this.clear();function l(f,C){var k=document.createElementNS("http://www.w3.org/2000/svg",f);for(var y in C)C.hasOwnProperty(y)&&k.setAttribute(y,C[y]);return k}var d=l("svg",{viewBox:"0 0 "+String(r)+" "+String(r),width:"100%",height:"100%",fill:o.colorLight});d.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),i.appendChild(d),d.appendChild(l("rect",{fill:o.colorLight,width:"100%",height:"100%"})),d.appendChild(l("rect",{fill:o.colorDark,width:"1",height:"1",id:"template"}));for(var s=0;s<r;s++)for(var u=0;u<r;u++)if(t.isDark(s,u)){var p=l("use",{x:String(u),y:String(s)});p.setAttributeNS("http://www.w3.org/1999/xlink","href","#template"),d.appendChild(p)}},e.prototype.clear=function(){for(;this._el.hasChildNodes();)this._el.removeChild(this._el.lastChild)},e})(),H=document.documentElement.tagName.toLowerCase()==="svg"?U:q()?(function(){function e(){this._elImage.src=this._elCanvas.toDataURL("image/png"),this._elImage.style.display="block",this._elCanvas.style.display="none"}if(this&&this._android&&this._android<=2.1){var t=1/window.devicePixelRatio,o=CanvasRenderingContext2D.prototype.drawImage;CanvasRenderingContext2D.prototype.drawImage=function(l,d,s,u,p,f,C,k,y){if("nodeName"in l&&/img/i.test(l.nodeName))for(var S=arguments.length-1;S>=1;S--)arguments[S]=arguments[S]*t;else typeof k>"u"&&(arguments[1]*=t,arguments[2]*=t,arguments[3]*=t,arguments[4]*=t);o.apply(this,arguments)}}function i(l,d){var s=this;if(s._fFail=d,s._fSuccess=l,s._bSupportDataURI===null){var u=document.createElement("img"),p=function(){s._bSupportDataURI=!1,s._fFail&&s._fFail.call(s)},f=function(){s._bSupportDataURI=!0,s._fSuccess&&s._fSuccess.call(s)};u.onabort=p,u.onerror=p,u.onload=f,u.src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==";return}else s._bSupportDataURI===!0&&s._fSuccess?s._fSuccess.call(s):s._bSupportDataURI===!1&&s._fFail&&s._fFail.call(s)}var r=function(l,d){this._bIsPainted=!1,this._android=O(),this._htOption=d,this._elCanvas=document.createElement("canvas"),this._elCanvas.width=d.width,this._elCanvas.height=d.height,l.appendChild(this._elCanvas),this._el=l,this._oContext=this._elCanvas.getContext("2d"),this._bIsPainted=!1,this._elImage=document.createElement("img"),this._elImage.alt="Scan me!",this._elImage.style.display="none",this._el.appendChild(this._elImage),this._bSupportDataURI=null};return r.prototype.draw=function(l){var d=this._elImage,s=this._oContext,u=this._htOption,p=l.getModuleCount(),f=u.width/p,C=u.height/p,k=Math.round(f),y=Math.round(C);d.style.display="none",this.clear();for(var S=0;S<p;S++)for(var b=0;b<p;b++){var V=l.isDark(S,b),I=b*f,M=S*C;s.strokeStyle=V?u.colorDark:u.colorLight,s.lineWidth=1,s.fillStyle=V?u.colorDark:u.colorLight,s.fillRect(I,M,f,C),s.strokeRect(Math.floor(I)+.5,Math.floor(M)+.5,k,y),s.strokeRect(Math.ceil(I)-.5,Math.ceil(M)-.5,k,y)}this._bIsPainted=!0},r.prototype.makeImage=function(){this._bIsPainted&&i.call(this,e)},r.prototype.isPainted=function(){return this._bIsPainted},r.prototype.clear=function(){this._oContext.clearRect(0,0,this._elCanvas.width,this._elCanvas.height),this._bIsPainted=!1},r.prototype.round=function(l){return l&&Math.floor(l*1e3)/1e3},r})():(function(){var e=function(t,o){this._el=t,this._htOption=o};return e.prototype.draw=function(t){for(var o=this._htOption,i=this._el,r=t.getModuleCount(),l=Math.floor(o.width/r),d=Math.floor(o.height/r),s=['<table style="border:0;border-collapse:collapse;">'],u=0;u<r;u++){s.push("<tr>");for(var p=0;p<r;p++)s.push('<td style="border:0;border-collapse:collapse;padding:0;margin:0;width:'+l+"px;height:"+d+"px;background-color:"+(t.isDark(u,p)?o.colorDark:o.colorLight)+';"></td>');s.push("</tr>")}s.push("</table>"),i.innerHTML=s.join("");var f=i.childNodes[0],C=(o.width-f.offsetWidth)/2,k=(o.height-f.offsetHeight)/2;C>0&&k>0&&(f.style.margin=k+"px "+C+"px")},e.prototype.clear=function(){this._el.innerHTML=""},e})();function z(e,t){for(var o=1,i=Q(e),r=0,l=B.length;r<=l;r++){var d=0;switch(t){case L.L:d=B[r][0];break;case L.M:d=B[r][1];break;case L.Q:d=B[r][2];break;case L.H:d=B[r][3];break}if(i<=d)break;o++}if(o>B.length)throw new Error("Too long data");return o}function Q(e){var t=encodeURI(e).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return t.length+(t.length!=e?3:0)}return c=function(e,t){if(this._htOption={width:256,height:256,typeNumber:4,colorDark:"#000000",colorLight:"#ffffff",correctLevel:L.H},typeof t=="string"&&(t={text:t}),t)for(var o in t)this._htOption[o]=t[o];typeof e=="string"&&(e=document.getElementById(e)),this._htOption.useSVG&&(H=U),this._android=O(),this._el=e,this._oQRCode=null,this._oDrawing=new H(this._el,this._htOption),this._htOption.text&&this.makeCode(this._htOption.text)},c.prototype.makeCode=function(e){this._oQRCode=new m(z(e,this._htOption.correctLevel),this._htOption.correctLevel),this._oQRCode.addData(e),this._oQRCode.make(),this._el.title=e,this._oDrawing.draw(this._oQRCode),this.makeImage()},c.prototype.makeImage=function(){typeof this._oDrawing.makeImage=="function"&&(!this._android||this._android>=3)&&this._oDrawing.makeImage()},c.prototype.clear=function(){this._oDrawing.clear()},c.CorrectLevel=L,c})})),F=N.__toESM(a3()),o3={class:"cloud-login-wrap"},i3={key:0,class:"cloud-login-main"},r3={class:"cloud-login-logo no-dark-content can-click"},n3=["src"],s3={key:0,class:"cloud-login-box"},l3={class:"login-title"},h3={class:"login-subtitle"},c3={class:"cloud-login-mode-access"},d3={class:"login-switch"},u3={key:1,class:"cloud-login-box"},g3={class:"login-mode-switch"},f3={class:"login-mode-switch-box"},v3={class:"login-title"},m3={class:"login-subtitle"},p3={class:"cloud-login-mode-access"},_3={key:0,class:"code-load"},w3={key:1,class:"code-error"},E3=["src"],C3={class:"cloud-login-other"},L3={class:"cloud-login-other"},k3={key:0,class:"login-switch"},S3={key:1,class:"page-login-oauth"},T3={key:2,class:"cloud-login-box"},A3={class:"login-mode-switch"},y3={class:"login-mode-switch-box"},N3={class:"login-title"},b3={class:"login-subtitle"},D3={id:"qrcode",ref:"qrCodeUrl"},B3={key:3,class:"cloud-login-box"},V3={class:"login-title"},I3={class:"login-subtitle"},M3={class:"cloud-login-mode-access"},P3={class:"page-login-oauth"},R3=Object.assign({data(){return{loadOngoing:!1,loginMode:"access",loginJump:!1,cache_remember:"off",cache_privacy:"off",account_mobile:"",account_password:"",account_password2:"",captcha_code:"",sms_code:"",account_business_id:0,reg_invite:"",regInviteNeed:!1,codeNeed:!1,codeLoad:0,codeKey:"",codeUrl:"",chainShowFlag:!1,chainAccountList:[],chainTempToken:"",qrcodeExpiredShow:!1,qrcodeTimer:null,qrcodeLoad:!1,qrcodeScanVernum:15,qrcodeScanVererr:0,copyright_info:""}},watch:{$route({query:h}){h.type=="reg"&&this.$nextTick(()=>{this.loginMode="reg"})},account_mobile(h){this.$nextTick(()=>{let n=this.$refs.account_mobile?.$el?.querySelector("input");if(n){const c=getComputedStyle(n).background.match(/rgb\((\d+,\s*\d+,\s*\d+)\)/);c&&c[0]==="rgb(232, 240, 254)"&&this.onBlur()}})},loginMode(h){h=="reg"&&(this.regInviteNeed=!!this.cacheInstConfig.reg_invite_need)}},computed:{currentLanguage(){return this.languageList[this.languageName]||"Language"}},created(){this.cache_remember=localStorage.getItem("cacheLoginRemember")||"off",this.cache_privacy=localStorage.getItem("cacheLoginPrivacy")||"off",this.account_mobile=localStorage.getItem("cacheLoginMobile")||""},async mounted(){this.loginMode=this.$route.query.type==="reg"?"reg":"access",this.$Electron&&(this.$Electron.sendMessage("webTabDestroyAll"),this.$Electron.sendMessage("childWindowDestroyAll")),N.useSdkSystemStore().$subscribe((h,n)=>{h.events.key=="useSSOLogin"&&n.useSSOLogin==!0&&this.inputServerUrl()})},beforeDestroy(){clearInterval(this.qrcodeTimer),this.loginJump=!1,this.account_password="",this.account_password2="",this.captcha_code="",this.reg_invite=""},methods:{handleRemember(h){h=="on"?localStorage.setItem("cacheLoginRemember",h):localStorage.removeItem("cacheLoginRemember")},handleRrivacy(h){h=="on"?(localStorage.setItem("cacheLoginPrivacy",h),this.chackServerUrl().catch(n=>{})):localStorage.removeItem("cacheLoginPrivacy"),this.cache_privacy=h},handleForgot(){this.$message.warning("请联系管理员!")},chackServerUrl(h){return new Promise((n,c)=>{n()})},switchLoginMode(h){this.chackServerUrl(!0).then(()=>{clearInterval(this.qrcodeTimer),h==="qrcode"?(this.loginMode="qrcode",this.scanQrcodeRefresh()):h==="access"?this.loginMode="access":h==="smsLogin"?(this.loginMode="smsLogin",this.refreshCode()):this.loginMode=h})},refreshCode(){this.captcha_code="",!(this.codeLoad>0)&&(setTimeout(h=>{this.codeLoad++},600),this.$request.flagGet("BASE_PASSPORT_CODE_DATA",{account_mobile:this.account_mobile}).then(({data:h})=>{this.codeKey=h.key,this.codeUrl=h.img,this.$refs.captcha_code?.focus()}).catch(h=>{this.codeUrl="error"}).finally(h=>{this.codeLoad--}))},onBlur(){if(!this.account_mobile){this.codeNeed=!1;return}this.loadOngoing=!0,this.$request.flagGet("BASE_PASSPORT_CODE_NEED",{account_mobile:this.account_mobile}).then(h=>{this.loadOngoing=!1,h.data=="need"?(this.refreshCode(),this.codeNeed=!0):this.codeNeed=!1}).catch(h=>{this.loadOngoing=!1}).finally(h=>{this.loadOngoing=!1})},accessLoginFunc(){if(this.loadOngoing)return this.$message({type:"warning",message:"正在登录中,请勿重新确认~"}),!1;this.chackServerUrl(!0).then(()=>{if(this.account_mobile=cvUtils.strTrimAll(this.account_mobile),this.account_password=cvUtils.strTrimAll(this.account_password),this.account_password2=cvUtils.strTrimAll(this.account_password2),this.captcha_code=cvUtils.strTrimAll(this.captcha_code),this.reg_invite=cvUtils.strTrimAll(this.reg_invite),this.cache_privacy!="on"){this.$message.warning("请同意协议");return}if(!cvUtils.isMobile(this.account_mobile)){this.$message.warning("请输入正确的手机号码"),this.$refs.account_mobile.focus();return}if(!this.account_password){this.$message.warning("请输入密码"),this.$refs.account_password.focus();return}if(this.loginMode=="reg"&&this.account_password!=this.account_password2){this.$message.warning("确认密码输入不一致"),this.$refs.account_password2.focus();return}if(this.codeNeed&&!this.captcha_code){this.$message.warning("请输入验证码"),this.$refs.captcha_code.focus();return}this.passportHandle2(null,"MobilePwdLogin")})},loginBusinessCheck(h){this.account_mobile=h.account_mobile_show,this.account_business_id=h.business_id,h.acc_rules_type=="sy-org-admin"?this.passportHandle2(null,"OrgAdminPwdLogin"):h.acc_rules_type=="sy-org-staff"&&this.passportHandle2(null,"OrgStaffPwdLogin")},passportHandle2(h,n){let c=this.$message({iconClass:"ElIconLoading",message:"正在登录...",duration:0});this.loadOngoing=!0,localStorage.setItem("cacheLoginMobile",this.account_mobile);try{let v={};this.loginMode=="access"?(v={account_mobile:this.account_mobile,business_id:this.account_business_id,account_password:this.account_password,captcha_code:this.captcha_code,captcha_key:this.codeKey},(n=="OrgAdminPwdLogin"||n=="OrgStaffPwdLogin")&&(v.temp_token=this.chainTempToken)):this.loginMode=="reg"&&(v={account_mobile:this.account_mobile,business_id:this.account_business_id,account_password:this.account_password,captcha_code:this.captcha_code,captcha_key:this.codeKey,reg_invite:this.reg_invite}),this.$request.setOptions({timeout:1e4}).flagPost("BASE_PASSPORT_PASSPORT",{handleType:n,...v}).then(m=>{c.close(),this.loadOngoing=!1,m.status==200?this.adminLoginSucc(m):m.status==400130?(this.$message.error("验证码有误!"),this.refreshCode(),this.codeNeed=!0):(this.$message.error(m.msg),this.refreshCode())}).catch(m=>{this.loadOngoing=!1,this.chainShowFlag=!1,c.close(),this.refreshCode(),this.codeNeed=!0})}catch{this.$message.error("登录异常"),c.close(),this.loadOngoing=!1,this.refreshCode()}},async adminLoginSucc(h){let n=h.data||{};if(n.result_type=="chain")this.chainAccountList=n.result_data||[],this.chainShowFlag=!0,this.chainTempToken=n.result_token||"";else{const c=n.result_data||{};await N.useSdkAccountStore().SA_ACCOUNT_SIGNIN(c),this.codeNeed=!1,this.$message({type:"success",message:"登录成功...",duration:800,onClose:()=>{this.goNext()}})}},chainReselection(){this.refreshCode(),this.chainShowFlag=!1},scanCreate(h){new F.default(this.$refs.qrCodeUrl,{text:h,width:180,height:180,margin:2,colorDark:"#000000",colorLight:"#ffffff",correctLevel:F.default.CorrectLevel.L})},scanQrcodeRefresh(){if(this.loginMode!="qrcode"||this.qrcodeLoad)return!1;this.qrcodeExpiredShow=!1,this.qrcodeScanVererr=0,this.$nextTick(()=>{document.getElementById("qrcode").innerHTML="",clearInterval(this.qrcodeTimer),this.qrcodeLoad=!0,this.$request.flagGet("BASE_PASSPORT_SCAN_QRCODE",{name:"app",fun:"scanQrcode"}).then(h=>{h.status==200?(this.scanCreate(h?.data?.checkLogin),this.qrcodeTimer=window.setInterval(()=>{this.scanCheckFunc(h?.data?.scanCode)},3e3)):result.status==404}).catch(h=>{}).finally(h=>{this.qrcodeLoad=!1})})},scanCheckFunc(h){if(this.qrcodeScanVererr++,this.qrcodeScanVererr>this.qrcodeScanVernum)return clearInterval(this.qrcodeTimer),this.qrcodeExpiredShow=!0,!1;this.$request.flagPost("BASE_PASSPORT_SCAN_CHECK",{name:"app",fun:"scanCheck",scanCode:h||""}).then(n=>{n.status==200?(n.msg&&n?.data?.scanCVal||"")!=""&&(clearInterval(this.qrcodeTimer),this.scanLoginFunc(h,n?.data?.scanCVal)):n.status==405&&(clearInterval(this.qrcodeTimer),this.qrcodeExpiredShow=!0)}).catch(()=>{})},scanLoginFunc(h,n){this.$message({type:"success",message:"扫码成功,请稍后...",duration:1500}),this.$request.flagPost("BASE_PASSPORT_SCAN_LOGIN",{name:"app",fun:"scanLogin",scanCode:h,scanCVal:n}).then(c=>{if(c.status==200){let v=this.$message({iconClass:"ElIconLoading",message:"正在安全登录中,请稍后...",duration:0});setTimeout(()=>{v.close(),this.$message({message:c.msg,type:c.status==200?"success":"error"})},2e3)}}).catch(()=>{})},goNext(){this.loginJump=!0;let h=cvUtils.urlQueryToObj(this.$route.query);const n=decodeURIComponent(h.from||"");n?N.storage_default.idbSetItem("clearCache","login").then(c=>{window.location.replace(n)}):this.$router.push({path:"/"})},setTheme(h){N.useSdkThemesStore().SA_THEMES_SET(h)},setLanguage(h){N.useSdkLanguageStore().SA_LANGUAGE_SET(h)},inputServerUrl(){},inputServerChack(h){return new Promise((n,c)=>{let v=h;/\/api\/$/.test(v)||(v=v+(cvUtils.strRightExists(v,"/")?"api/":"/api/")),/^https*:\/\//i.test(v)||(v=`https://${v}`),N.http_default.setOptions({checkNetwork:!1}).flagGet("SYS_SETT_ALL",{}).then(async({data:m})=>{typeof m.server_version>"u"&&typeof m.all_group_mute>"u"?c(`服务器(${cvUtils.urlGetDomain(h)})版本过低`):(v!=this.sysServerUrl&&(await N.storage_default.idbSetItem("sysServerUrl",v),window.location.reload()),n())}).catch(({ret:m,msg:w})=>{if(m===-1001){if(!/^https*:\/\//i.test(h)){this.inputServerChack(`http://${h}`).then(n).catch(c);return}w="服务器地址无效"}c(w)})})}}},{__name:"login",setup(h){return(n,c)=>{const v=(0,a.resolveComponent)("el-input"),m=(0,a.resolveComponent)("el-button"),w=(0,a.resolveComponent)("el-icon"),L=(0,a.resolveComponent)("el-tooltip"),T=(0,a.resolveComponent)("cv-icons"),_=(0,a.resolveComponent)("ElIconLoading"),E=(0,a.resolveComponent)("el-checkbox");return(0,a.openBlock)(),(0,a.createElementBlock)("div",o3,[n.chainShowFlag?(0,a.createCommentVNode)("",!0):((0,a.openBlock)(),(0,a.createElementBlock)("div",i3,[(0,a.createElementVNode)("div",r3,[(0,a.createElementVNode)("img",{src:n.cacheInstInfo.LAST_IP_LOGO,alt:""},null,8,n3)]),n.loginMode=="reg"?((0,a.openBlock)(),(0,a.createElementBlock)("div",s3,[(0,a.createElementVNode)("div",l3,(0,a.toDisplayString)(n.cacheInstInfo.LAST_IP_TITLE),1),(0,a.createElementVNode)("div",h3,(0,a.toDisplayString)(n.$t("输入您的信息以创建帐户。")),1),(0,a.createElementVNode)("div",c3,[(0,a.createElementVNode)("form",null,[(0,a.createVNode)(v,{modelValue:n.account_password2,"onUpdate:modelValue":c[0]||(c[0]=g=>n.account_password2=g),ref:"account_password2","prefix-icon":"ElIconLock",placeholder:n.$t("输入确认密码"),type:"password",size:"large",clearable:""},null,8,["modelValue","placeholder"]),n.regInviteNeed?((0,a.openBlock)(),(0,a.createBlock)(v,{key:0,modelValue:n.reg_invite,"onUpdate:modelValue":c[1]||(c[1]=g=>n.reg_invite=g),ref:"reg_invite",class:"login-code",placeholder:n.$t("请输入注册邀请码"),type:"text",size:"large",clearable:""},{prepend:(0,a.withCtx)(()=>[(0,a.createTextVNode)(" "+(0,a.toDisplayString)(n.$t("邀请码"))+" ",1)]),_:1},8,["modelValue","placeholder"])):(0,a.createCommentVNode)("",!0)]),(0,a.createVNode)(m,null,{default:(0,a.withCtx)(()=>[(0,a.createTextVNode)((0,a.toDisplayString)(n.loginJump?"注册成功":"注册"),1)]),_:1}),(0,a.createElementVNode)("div",d3,[(0,a.createTextVNode)((0,a.toDisplayString)(n.$t("已经有帐号?"))+" ",1),(0,a.createElementVNode)("a",{href:"javascript:void(0)",onClick:c[2]||(c[2]=g=>n.switchLoginMode("access"))},(0,a.toDisplayString)(n.$t("登录帐号")),1)])])])):(0,a.createCommentVNode)("",!0),n.loginMode=="access"?((0,a.openBlock)(),(0,a.createElementBlock)("div",u3,[(0,a.createElementVNode)("div",g3,[(0,a.createElementVNode)("div",f3,[(0,a.createVNode)(L,{content:"扫码登录",placement:"left"},{default:(0,a.withCtx)(()=>[(0,a.createElementVNode)("span",{class:"login-mode-switch-icon",onClick:c[3]||(c[3]=g=>n.switchLoginMode("qrcode"))},[(0,a.createVNode)(w,{size:"45"},{default:(0,a.withCtx)(()=>[(0,a.createVNode)(K)]),_:1})])]),_:1})])]),(0,a.createElementVNode)("div",v3,(0,a.toDisplayString)(n.cacheInstInfo.LAST_IP_TITLE),1),(0,a.createElementVNode)("div",m3,(0,a.toDisplayString)(n.$t("输入您的凭证以访问您的帐户。")),1),(0,a.createElementVNode)("div",p3,[(0,a.createElementVNode)("form",null,[(0,a.createVNode)(v,{modelValue:n.account_mobile,"onUpdate:modelValue":c[4]||(c[4]=g=>n.account_mobile=g),ref:"account_mobile","prefix-icon":"ElIconUser",placeholder:n.$t("输入您的手机账号"),type:"text",size:"large",maxlength:"11",onBlur:n.onBlur,clearable:""},null,8,["modelValue","placeholder","onBlur"]),(0,a.createVNode)(v,{modelValue:n.account_password,"onUpdate:modelValue":c[5]||(c[5]=g=>n.account_password=g),ref:"account_password","prefix-icon":"ElIconLock",placeholder:n.$t("输入您的密码"),type:"password",size:"large",clearable:"",onKeydown:(0,a.withKeys)(n.accessLoginFunc,["enter"])},null,8,["modelValue","placeholder","onKeydown"]),n.codeNeed?((0,a.openBlock)(),(0,a.createBlock)(v,{key:0,modelValue:n.captcha_code,"onUpdate:modelValue":c[7]||(c[7]=g=>n.captcha_code=g),ref:"captcha_code",class:"login-code",placeholder:n.$t("输入图形验证码"),type:"text",size:"large",clearable:""},{prefix:(0,a.withCtx)(()=>[(0,a.createVNode)(T,{type:"ElIconCircleCheck"})]),append:(0,a.withCtx)(()=>[(0,a.createElementVNode)("div",{class:"login-code-end",onClick:c[6]||(c[6]=(...g)=>n.refreshCode&&n.refreshCode(...g))},[n.codeLoad>0?((0,a.openBlock)(),(0,a.createElementBlock)("div",_3,[(0,a.createVNode)(_)])):n.codeUrl==="error"?((0,a.openBlock)(),(0,a.createElementBlock)("span",w3,(0,a.toDisplayString)(n.$t("加载失败")),1)):((0,a.openBlock)(),(0,a.createElementBlock)("img",{key:2,src:n.codeUrl},null,8,E3))])]),_:1},8,["modelValue","placeholder"])):(0,a.createCommentVNode)("",!0)]),(0,a.createVNode)(m,{type:"primary",loading:n.loadOngoing||n.loginJump,size:"large",style:{width:"100%","margin-bottom":"15px"},onClick:n.accessLoginFunc},{default:(0,a.withCtx)(()=>[(0,a.createTextVNode)((0,a.toDisplayString)(n.loginJump?"登录成功":"登录"),1)]),_:1},8,["loading","onClick"]),(0,a.createElementVNode)("div",C3,[(0,a.createVNode)(E,{modelValue:n.cache_privacy,"onUpdate:modelValue":c[9]||(c[9]=g=>n.cache_privacy=g),"true-value":"on","false-value":"off",onChange:n.handleRrivacy},{default:(0,a.withCtx)(()=>[c[17]||(c[17]=(0,a.createTextVNode)(" 同意 ",-1)),(0,a.createElementVNode)("a",{onClick:c[8]||(c[8]=g=>n.jumpsXieyi("privacy")),target:"_blank"},"《隐私条款》")]),_:1},8,["modelValue","onChange"]),(0,a.createElementVNode)("a",{href:"javascript:void(0)",onClick:c[10]||(c[10]=(...g)=>n.handleForgot&&n.handleForgot(...g))},(0,a.toDisplayString)(n.$t("忘记密码了?")),1)]),(0,a.createElementVNode)("div",L3,[n.cacheInstConfig.open_business_reg=="on"?((0,a.openBlock)(),(0,a.createElementBlock)("div",k3,[(0,a.createTextVNode)((0,a.toDisplayString)(n.$t("还没有帐号?"))+" ",1),(0,a.createElementVNode)("a",{href:"javascript:void(0)",onClick:c[11]||(c[11]=g=>n.switchLoginMode("reg"))},(0,a.toDisplayString)(n.$t("注册帐号")),1)])):(0,a.createCommentVNode)("",!0),n.cacheInstConfig.open_business_oauth2=="on"?((0,a.openBlock)(),(0,a.createElementBlock)("div",S3,[(0,a.createElementVNode)("a",{href:"javascript:void(0)",onClick:c[12]||(c[12]=g=>n.switchLoginMode("oauth2"))},(0,a.toDisplayString)(n.$t("OAuth2授权登陆")),1)])):(0,a.createCommentVNode)("",!0)])])])):(0,a.createCommentVNode)("",!0),n.loginMode=="qrcode"?((0,a.openBlock)(),(0,a.createElementBlock)("div",T3,[(0,a.createElementVNode)("div",A3,[(0,a.createElementVNode)("div",y3,[(0,a.createVNode)(L,{content:"帐号登录",placement:"left"},{default:(0,a.withCtx)(()=>[(0,a.createElementVNode)("span",{class:"login-mode-switch-icon",onClick:c[13]||(c[13]=g=>n.switchLoginMode("access"))},[(0,a.createVNode)(w,{size:"45"},{default:(0,a.withCtx)(()=>[(0,a.createVNode)(W)]),_:1})])]),_:1})])]),(0,a.createElementVNode)("div",N3,(0,a.toDisplayString)(n.$t("扫码登录")),1),(0,a.createElementVNode)("div",b3,[(0,a.createVNode)(w,{size:"20",style:{"margin-right":"10px"}},{default:(0,a.withCtx)(()=>[(0,a.createVNode)(t3)]),_:1}),(0,a.createTextVNode)(" "+(0,a.toDisplayString)(n.$t(`请使用【${n.cacheInstInfo.LAST_IP_BRAND}】移动端扫描二维码`)),1)]),(0,a.createElementVNode)("div",{class:"login-qrcode",onClick:c[14]||(c[14]=(...g)=>n.scanQrcodeRefresh&&n.scanQrcodeRefresh(...g))},[(0,a.createElementVNode)("div",D3,null,512)])])):(0,a.createCommentVNode)("",!0),n.loginMode=="oauth2"?((0,a.openBlock)(),(0,a.createElementBlock)("div",B3,[(0,a.createElementVNode)("div",V3,(0,a.toDisplayString)(n.cacheInstInfo.LAST_IP_TITLE),1),(0,a.createElementVNode)("div",I3,(0,a.toDisplayString)(n.$t("输入您的信息以创建帐户。")),1),(0,a.createElementVNode)("div",M3,[(0,a.createElementVNode)("div",P3,[(0,a.createElementVNode)("a",{href:"javascript:void(0)",onClick:c[15]||(c[15]=g=>n.switchLoginMode("access"))},(0,a.toDisplayString)(n.$t("帐号登录")),1)])])])):(0,a.createCommentVNode)("",!0)])),n.chainShowFlag?((0,a.openBlock)(),(0,a.createBlock)(N.SwitchBusiness_default,{key:1,modelValue:n.chainAccountList,"onUpdate:modelValue":c[16]||(c[16]=g=>n.chainAccountList=g),reselectTitle:"重新登录",onReselectFunc:n.chainReselection,onSelectFunc:n.loginBusinessCheck},null,8,["modelValue","onReselectFunc","onSelectFunc"])):(0,a.createCommentVNode)("",!0)])}}}),O3=R3;exports.default=O3;
|