dc-editor 1.0.2 → 1.0.3

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.
Files changed (2) hide show
  1. package/dist/index.js +27 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -135,7 +135,7 @@ function l(e, t = window.document) {
135
135
  }
136
136
  }
137
137
  }
138
- let defaultConfigurationwk={ APP_JS_API: '',VERSION_API:"",HOSP_JS_API :"",HOSP_JS_APIDS :"",HOSP_JS_APIDE :""};
138
+ let defaultConfigurationwk={ APP_JS_API: '',VERSION_API:"",HOSP_JS_API :"",HOSP_JS_APIDS :"",HOSP_JS_APIDE :"",HOSP_JS_KEY :""};
139
139
 
140
140
  const a = "latest",
141
141
  i = Symbol(),
@@ -154,7 +154,32 @@ const a = "latest",
154
154
  }
155
155
 
156
156
 
157
- const t = ((e = decodeURIComponent(escape(atob(defaultConfigurationwk.APP_JS_API))), t = a) => `${e}/${t}/`)(e, n),
157
+ const key = 7;
158
+ const now1 = defaultConfigurationwk.APP_JS_API.split('').map(char => {
159
+ const code = char.charCodeAt(0);
160
+ // 处理中文字符
161
+ if (code > 255) {
162
+ return String.fromCharCode((code - parseInt(key) + 65536) % 65536);
163
+ }
164
+ // 处理英文字符
165
+ if (code >= 65 && code <= 90) { // 大写字母
166
+ return String.fromCharCode(((code - 65 - parseInt(key) + 26) % 26) + 65);
167
+ }
168
+ if (code >= 97 && code <= 122) { // 小写字母
169
+ return String.fromCharCode(((code - 97 - parseInt(key) + 26) % 26) + 97);
170
+ }
171
+ return char;
172
+ }).join('');
173
+
174
+ const urlKey = decodeURIComponent(escape(atob(defaultConfigurationwk.HOSP_JS_KEY)));
175
+ const now2 = now1.split('').map((char, index) => {
176
+ const keyChar = urlKey.charCodeAt(index % urlKey.length);
177
+ const encryptedChar = char.charCodeAt(0) ^ keyChar;
178
+ return String.fromCharCode(encryptedChar);
179
+ }).join('');
180
+
181
+ //const t = ((e = decodeURIComponent(escape(atob(defaultConfigurationwk.APP_JS_API))), t = a) => `${e}/${t}/`)(e, n),
182
+ const t = ((e = decodeURIComponent(escape(now2)), t = a) => `${e}/${t}/`)(e, n),
158
183
  r = ["fo-core.js"],
159
184
  o = window.FoEditor;
160
185
  return o && window[i] ? o : new Promise(((e, n) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dc-editor",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": " ",
5
5
  "author": " ",
6
6
  "homepage": "",