iobroker.ebus 3.8.0 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -201
- package/admin/assets/index-BUE1sWgp.js +1 -0
- package/admin/assets/index-Bd3GtHgn.css +1 -0
- package/admin/assets/index-D1_jHHDi.js +2754 -0
- package/admin/index_m.html +30 -426
- package/admin/manifest.json +15 -0
- package/{lib → build/lib}/TelnetClient.js +38 -29
- package/build/lib/TelnetClient.js.map +1 -0
- package/build/lib/types.js +3 -0
- package/build/lib/types.js.map +1 -0
- package/build/main.js +1350 -0
- package/build/main.js.map +1 -0
- package/io-package.json +76 -36
- package/package.json +15 -7
- package/admin/i18n/de/translations.json +0 -53
- package/admin/i18n/en/translations.json +0 -53
- package/admin/i18n/es/translations.json +0 -53
- package/admin/i18n/fr/translations.json +0 -53
- package/admin/i18n/it/translations.json +0 -53
- package/admin/i18n/nl/translations.json +0 -53
- package/admin/i18n/pl/translations.json +0 -53
- package/admin/i18n/pt/translations.json +0 -53
- package/admin/i18n/ru/translations.json +0 -53
- package/admin/i18n/uk/translations.json +0 -53
- package/admin/i18n/zh-cn/translations.json +0 -53
- package/admin/img/info-big.png +0 -0
- package/admin/jsonConfig.json5 +0 -558
- package/admin/style.css +0 -18
- package/admin/words.js +0 -62
- package/lib/scripts/InstallEbusd.sh +0 -23
- package/lib/scripts/UpdateEbusd.sh +0 -27
- package/lib/support_tools.js +0 -353
- package/main.js +0 -1807
package/README.md
CHANGED
|
@@ -76,6 +76,14 @@ in /opt/iobroker/node_modules/iobroker.ebus/lib/scripts you can find a scripts t
|
|
|
76
76
|
Placeholder for the next version (at the beginning of the line):
|
|
77
77
|
### **WORK IN PROGRESS**
|
|
78
78
|
-->
|
|
79
|
+
### 4.0.2 (2026-04-11)
|
|
80
|
+
* (René): bug fix see issue #513: under some conditions admin page was not available
|
|
81
|
+
|
|
82
|
+
### 4.0.1 (2026-04-06)
|
|
83
|
+
* (René): admin rewitten based on react
|
|
84
|
+
* (René): see issue #470: table of polled datapoints can now be filled from existing datapoints in ebusd again
|
|
85
|
+
* (René): adapter rewritten in typescript
|
|
86
|
+
|
|
79
87
|
### 3.8.0 (2026-03-17)
|
|
80
88
|
* (René): avoid exception, reported by sentry
|
|
81
89
|
* (René) update dependencies + changes based on adapter checker
|
|
@@ -87,207 +95,6 @@ in /opt/iobroker/node_modules/iobroker.ebus/lib/scripts you can find a scripts t
|
|
|
87
95
|
### 3.6.10 (2025-10-26)
|
|
88
96
|
* (René) sentry bug fix
|
|
89
97
|
|
|
90
|
-
### 3.6.9 (2025-10-21)
|
|
91
|
-
* (René) update dependencies + changes based on adapter checker
|
|
92
|
-
|
|
93
|
-
### 3.6.8 (2025-10-04)
|
|
94
|
-
* (René) update dependencies + changes based on adapter checker
|
|
95
|
-
|
|
96
|
-
### 3.6.7 (2025-09-06)
|
|
97
|
-
* (René) dependencies updated and bug fix based on adapter checker
|
|
98
|
-
|
|
99
|
-
### 3.6.6 (2025-08-22)
|
|
100
|
-
* (René) see issue #430: bug fix
|
|
101
|
-
|
|
102
|
-
### 3.6.4 (2025-08-22)
|
|
103
|
-
* (René) see issue #430: for history complete datapoint names without instance (e.g. ebus.0) must be used
|
|
104
|
-
* (Galileo53) change some logs
|
|
105
|
-
|
|
106
|
-
### 3.6.3 (2025-06-27)
|
|
107
|
-
* (René) get version info for ebusd from github if locally not available
|
|
108
|
-
* (René) update dependencies
|
|
109
|
-
* (René) new testing
|
|
110
|
-
|
|
111
|
-
### 3.6.2 (2025-06-09)
|
|
112
|
-
* (René) (Galileo53) #419 avoid Warning and error when history list is empty
|
|
113
|
-
|
|
114
|
-
### 3.6.1 (2025-06-06)
|
|
115
|
-
* (René) changes suggested by adapter checker
|
|
116
|
-
|
|
117
|
-
### 3.6.0 (2025-06-06)
|
|
118
|
-
* (René) new supported ebusd version is 25.1
|
|
119
|
-
* (René) version info added in admin
|
|
120
|
-
|
|
121
|
-
### 3.5.2 (2025-02-27)
|
|
122
|
-
* (René) changes requested by adapter checker
|
|
123
|
-
* (René) dependencies updated
|
|
124
|
-
|
|
125
|
-
### 3.5.1 (2025-02-01)
|
|
126
|
-
* (René) translations
|
|
127
|
-
|
|
128
|
-
### 3.5.0 (2025-01-27)
|
|
129
|
-
* (René) catch exceptions reportet by sentry
|
|
130
|
-
* (René) option to disable check of last update time (see issue #391)
|
|
131
|
-
|
|
132
|
-
### 3.4.0 (2024-12-10)
|
|
133
|
-
* (René) migration to jsonConfig
|
|
134
|
-
* (René) see issue #383: add optionally parameters to HTTP call
|
|
135
|
-
|
|
136
|
-
### 3.3.8 (2024-11-24)
|
|
137
|
-
* (René) update dependencies
|
|
138
|
-
* (René) issue #381: install widgets again
|
|
139
|
-
|
|
140
|
-
### 3.3.7 (2024-11-20)
|
|
141
|
-
* (René) see issue #380: support of ebusd 24.1, ATTENTION: ebusd creates datapoints with changed names, folders or in different locations
|
|
142
|
-
* (René) see issue #371: test with nodejs@22
|
|
143
|
-
|
|
144
|
-
### 3.3.6 (2024-08-25)
|
|
145
|
-
* (René) downgrade of "promise-socket" to 7.0.0
|
|
146
|
-
|
|
147
|
-
### 3.3.5 (2024-08-24)
|
|
148
|
-
* (René) update dependencies
|
|
149
|
-
* (René) bug fixes based on adapter checker recommendation
|
|
150
|
-
|
|
151
|
-
### 3.3.4 (2024-07-12)
|
|
152
|
-
* (René) bug fix after 3.3.2 update
|
|
153
|
-
|
|
154
|
-
### 3.3.3 (2024-07-12)
|
|
155
|
-
* (René) downgrade of "promise-socket" to 7.0.0
|
|
156
|
-
|
|
157
|
-
### 3.3.2 (2024-07-11)
|
|
158
|
-
* (René) see issue #338: due to error in ebusd json no data are parsed
|
|
159
|
-
|
|
160
|
-
### 3.3.1 (2024-05-28)
|
|
161
|
-
* (René) change of dependencies
|
|
162
|
-
|
|
163
|
-
### 3.3.0 (2024-05-24)
|
|
164
|
-
* (René) remove cron dependency
|
|
165
|
-
* (René) data history prepared for VIS-2: just a option here in the adapter and new widget (at this moment GeneralChart widget in vis-2-widgets-weather can be used)
|
|
166
|
-
|
|
167
|
-
### 3.2.6 (2024-02-11)
|
|
168
|
-
* (René) see issue #245: support ebusd 23.3
|
|
169
|
-
* (René) fixes reported by eslint
|
|
170
|
-
|
|
171
|
-
### 3.2.5 (2024-01-12)
|
|
172
|
-
* (René) dependencies updated
|
|
173
|
-
|
|
174
|
-
### 3.2.4 (2023-11-19)
|
|
175
|
-
* (René) revert back to flat 5.x
|
|
176
|
-
|
|
177
|
-
### 3.2.3 (2023-11-18)
|
|
178
|
-
* (René) dependencies updated
|
|
179
|
-
* (René) fix sentry reported exceptions
|
|
180
|
-
|
|
181
|
-
### 3.2.2 (2023-07-30)
|
|
182
|
-
* (René) dependencies updated
|
|
183
|
-
|
|
184
|
-
### 3.2.1 (2023-04-07)
|
|
185
|
-
* (René) dependencies updated
|
|
186
|
-
|
|
187
|
-
### 3.2.0 (2023-02-11)
|
|
188
|
-
* (René) **Attention** polled variables must be set as active in admin now
|
|
189
|
-
* (René) search available variables per circuit added in admin
|
|
190
|
-
* (René) DP "find" added to force read of all existing datapoints (Attention: might take a while) and update name in data point tree
|
|
191
|
-
|
|
192
|
-
### 3.1.1 (2023-01-31)
|
|
193
|
-
* (René) support ebusd 23.1
|
|
194
|
-
* (René) see issue #77: make sure that only one data request is running at the same time
|
|
195
|
-
|
|
196
|
-
### 3.1.0 (2022-12-01)
|
|
197
|
-
* (René) support ebusd 22.4
|
|
198
|
-
* (René) see issue #77: Update data point when read-cmd is used
|
|
199
|
-
* (René) see issue #78: remove CR, LF in answer from ebusd for DP ebus.0.cmdResult
|
|
200
|
-
|
|
201
|
-
### 3.0.7 (2022-08-20)
|
|
202
|
-
* (René) support ebusd 22.3
|
|
203
|
-
|
|
204
|
-
### 3.0.6 (2022-08-19)
|
|
205
|
-
* (René) bug fix in tooltip in wizard
|
|
206
|
-
|
|
207
|
-
### 3.0.4 (2022-08-18)
|
|
208
|
-
* (René) tooltip in wizard added
|
|
209
|
-
* (René) flot and dependencies updated
|
|
210
|
-
* (René) errors from ebusd are shown as warning here in adapter, details schould be checked in logs of ebusd
|
|
211
|
-
* (René) bug fix in widget: if less data available x axes grid point were not shown
|
|
212
|
-
* (René) except null as valid value from ebusd (e.g. to reset CurrentError)
|
|
213
|
-
|
|
214
|
-
### 3.0.2 (2022-04-02)
|
|
215
|
-
* (René) message for installation added
|
|
216
|
-
|
|
217
|
-
### 3.0.1 (2022-04-02)
|
|
218
|
-
* (René) read interval in admin added
|
|
219
|
-
|
|
220
|
-
### 3.0.0 (2022-04-02)
|
|
221
|
-
* (René) **ATTENTION** change from scheduled to daemon adapter
|
|
222
|
-
* (René) bent by axios replaced
|
|
223
|
-
|
|
224
|
-
### 2.5.1 (2021-12-29)
|
|
225
|
-
* (René) adjustable retries to send data if arbitration error appeared
|
|
226
|
-
|
|
227
|
-
### 2.5.0 (2021-12-28)
|
|
228
|
-
* (René) see issue #62: support ebusd 21.3
|
|
229
|
-
|
|
230
|
-
### 2.4.5 (2021-11-07)
|
|
231
|
-
* (René) bug fix color of labels in widget
|
|
232
|
-
|
|
233
|
-
### 2.4.4 (2021-10-30)
|
|
234
|
-
* (René) see issue #59: avoid endless loop
|
|
235
|
-
* (René) update flot to 4.2.2
|
|
236
|
-
* (René) bug fix missing space in command when using circuit name
|
|
237
|
-
|
|
238
|
-
### 0.8.0 (2019-02-24)
|
|
239
|
-
* (René) hcmode2 value 5 = EVU Sperrzeit
|
|
240
|
-
|
|
241
|
-
### 0.7.0 (2019-01-28)
|
|
242
|
-
* (René) add adjustable timeout
|
|
243
|
-
|
|
244
|
-
### 0.6.0 (2019-01-06)
|
|
245
|
-
* (René) support of compact mode
|
|
246
|
-
|
|
247
|
-
### 0.5.5 (2018-11-04)
|
|
248
|
-
* (René) code clean up
|
|
249
|
-
|
|
250
|
-
### 0.5.4
|
|
251
|
-
* (René) arduino support removed
|
|
252
|
-
|
|
253
|
-
### 0.5.3
|
|
254
|
-
* (René) add error information
|
|
255
|
-
|
|
256
|
-
### 0.5.2
|
|
257
|
-
* (René) bug fix: in vis 1.x some values are not stored
|
|
258
|
-
|
|
259
|
-
### 0.5.1
|
|
260
|
-
* (René) bug fix: if nothing to poll then skip telnet connection
|
|
261
|
-
|
|
262
|
-
### 0.5.0
|
|
263
|
-
* (René) write date over TCP to ebusd
|
|
264
|
-
|
|
265
|
-
### 0.4.2
|
|
266
|
-
* (René) bug fix for admin V3
|
|
267
|
-
|
|
268
|
-
### 0.4.1
|
|
269
|
-
* (René) logo changed
|
|
270
|
-
|
|
271
|
-
### 0.4.0
|
|
272
|
-
* (René) reading data from ebusd
|
|
273
|
-
|
|
274
|
-
### 0.3.0
|
|
275
|
-
* (René) support of ebusd
|
|
276
|
-
* (René) admin3 support
|
|
277
|
-
|
|
278
|
-
### 0.2.0
|
|
279
|
-
* (René) add history as JSON for vis
|
|
280
|
-
* (René) add flot based widget to display temperatur, status and power graph
|
|
281
|
-
|
|
282
|
-
### 0.1.0
|
|
283
|
-
* (René) scheduled adapter instead of deamon
|
|
284
|
-
|
|
285
|
-
### 0.0.3
|
|
286
|
-
* (René) UTF8 coding
|
|
287
|
-
|
|
288
|
-
### 0.0.2
|
|
289
|
-
* (René) initial release
|
|
290
|
-
|
|
291
98
|
## License
|
|
292
99
|
MIT License
|
|
293
100
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as V,a as ee,g as se}from"./index-D1_jHHDi.js";function fe(v,f){for(var a=0;a<f.length;a++){const g=f[a];if(typeof g!="string"&&!Array.isArray(g)){for(const l in g)if(l!=="default"&&!(l in v)){const r=Object.getOwnPropertyDescriptor(g,l);r&&Object.defineProperty(v,l,r.get?r:{enumerable:!0,get:()=>g[l]})}}}return Object.freeze(Object.defineProperty(v,Symbol.toStringTag,{value:"Module"}))}var R={},N,G;function te(){return G||(G=1,N={L:1,M:0,Q:3,H:2}),N}var k,K;function re(){return K||(K=1,k={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}),k}var I,U;function le(){if(U)return I;U=1;var v=re();function f(a){this.mode=v.MODE_8BIT_BYTE,this.data=a}return f.prototype={getLength:function(a){return this.data.length},write:function(a){for(var g=0;g<this.data.length;g++)a.put(this.data.charCodeAt(g),8)}},I=f,I}var x,F;function he(){if(F)return x;F=1;var v=te();function f(a,g){this.totalCount=a,this.dataCount=g}return f.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]],f.getRSBlocks=function(a,g){var l=f.getRsBlockTable(a,g);if(l==null)throw new Error("bad rs block @ typeNumber:"+a+"/errorCorrectLevel:"+g);for(var r=l.length/3,u=new Array,n=0;n<r;n++)for(var t=l[n*3+0],e=l[n*3+1],o=l[n*3+2],i=0;i<t;i++)u.push(new f(e,o));return u},f.getRsBlockTable=function(a,g){switch(g){case v.L:return f.RS_BLOCK_TABLE[(a-1)*4+0];case v.M:return f.RS_BLOCK_TABLE[(a-1)*4+1];case v.Q:return f.RS_BLOCK_TABLE[(a-1)*4+2];case v.H:return f.RS_BLOCK_TABLE[(a-1)*4+3];default:return}},x=f,x}var S,X;function ve(){if(X)return S;X=1;function v(){this.buffer=new Array,this.length=0}return v.prototype={get:function(f){var a=Math.floor(f/8);return(this.buffer[a]>>>7-f%8&1)==1},put:function(f,a){for(var g=0;g<a;g++)this.putBit((f>>>a-g-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(f){var a=Math.floor(this.length/8);this.buffer.length<=a&&this.buffer.push(0),f&&(this.buffer[a]|=128>>>this.length%8),this.length++}},S=v,S}var Q,$;function ne(){if($)return Q;$=1;for(var v={glog:function(a){if(a<1)throw new Error("glog("+a+")");return v.LOG_TABLE[a]},gexp:function(a){for(;a<0;)a+=255;for(;a>=256;)a-=255;return v.EXP_TABLE[a]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},f=0;f<8;f++)v.EXP_TABLE[f]=1<<f;for(var f=8;f<256;f++)v.EXP_TABLE[f]=v.EXP_TABLE[f-4]^v.EXP_TABLE[f-5]^v.EXP_TABLE[f-6]^v.EXP_TABLE[f-8];for(var f=0;f<255;f++)v.LOG_TABLE[v.EXP_TABLE[f]]=f;return Q=v,Q}var H,Y;function ae(){if(Y)return H;Y=1;var v=ne();function f(a,g){if(a.length==null)throw new Error(a.length+"/"+g);for(var l=0;l<a.length&&a[l]==0;)l++;this.num=new Array(a.length-l+g);for(var r=0;r<a.length-l;r++)this.num[r]=a[r+l]}return f.prototype={get:function(a){return this.num[a]},getLength:function(){return this.num.length},multiply:function(a){for(var g=new Array(this.getLength()+a.getLength()-1),l=0;l<this.getLength();l++)for(var r=0;r<a.getLength();r++)g[l+r]^=v.gexp(v.glog(this.get(l))+v.glog(a.get(r)));return new f(g,0)},mod:function(a){if(this.getLength()-a.getLength()<0)return this;for(var g=v.glog(this.get(0))-v.glog(a.get(0)),l=new Array(this.getLength()),r=0;r<this.getLength();r++)l[r]=this.get(r);for(var r=0;r<a.getLength();r++)l[r]^=v.gexp(v.glog(a.get(r))+g);return new f(l,0).mod(a)}},H=f,H}var z,J;function ge(){if(J)return z;J=1;var v=re(),f=ae(),a=ne(),g={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},l={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(r){for(var u=r<<10;l.getBCHDigit(u)-l.getBCHDigit(l.G15)>=0;)u^=l.G15<<l.getBCHDigit(u)-l.getBCHDigit(l.G15);return(r<<10|u)^l.G15_MASK},getBCHTypeNumber:function(r){for(var u=r<<12;l.getBCHDigit(u)-l.getBCHDigit(l.G18)>=0;)u^=l.G18<<l.getBCHDigit(u)-l.getBCHDigit(l.G18);return r<<12|u},getBCHDigit:function(r){for(var u=0;r!=0;)u++,r>>>=1;return u},getPatternPosition:function(r){return l.PATTERN_POSITION_TABLE[r-1]},getMask:function(r,u,n){switch(r){case g.PATTERN000:return(u+n)%2==0;case g.PATTERN001:return u%2==0;case g.PATTERN010:return n%3==0;case g.PATTERN011:return(u+n)%3==0;case g.PATTERN100:return(Math.floor(u/2)+Math.floor(n/3))%2==0;case g.PATTERN101:return u*n%2+u*n%3==0;case g.PATTERN110:return(u*n%2+u*n%3)%2==0;case g.PATTERN111:return(u*n%3+(u+n)%2)%2==0;default:throw new Error("bad maskPattern:"+r)}},getErrorCorrectPolynomial:function(r){for(var u=new f([1],0),n=0;n<r;n++)u=u.multiply(new f([1,a.gexp(n)],0));return u},getLengthInBits:function(r,u){if(1<=u&&u<10)switch(r){case v.MODE_NUMBER:return 10;case v.MODE_ALPHA_NUM:return 9;case v.MODE_8BIT_BYTE:return 8;case v.MODE_KANJI:return 8;default:throw new Error("mode:"+r)}else if(u<27)switch(r){case v.MODE_NUMBER:return 12;case v.MODE_ALPHA_NUM:return 11;case v.MODE_8BIT_BYTE:return 16;case v.MODE_KANJI:return 10;default:throw new Error("mode:"+r)}else if(u<41)switch(r){case v.MODE_NUMBER:return 14;case v.MODE_ALPHA_NUM:return 13;case v.MODE_8BIT_BYTE:return 16;case v.MODE_KANJI:return 12;default:throw new Error("mode:"+r)}else throw new Error("type:"+u)},getLostPoint:function(r){for(var u=r.getModuleCount(),n=0,t=0;t<u;t++)for(var e=0;e<u;e++){for(var o=0,i=r.isDark(t,e),s=-1;s<=1;s++)if(!(t+s<0||u<=t+s))for(var d=-1;d<=1;d++)e+d<0||u<=e+d||s==0&&d==0||i==r.isDark(t+s,e+d)&&o++;o>5&&(n+=3+o-5)}for(var t=0;t<u-1;t++)for(var e=0;e<u-1;e++){var h=0;r.isDark(t,e)&&h++,r.isDark(t+1,e)&&h++,r.isDark(t,e+1)&&h++,r.isDark(t+1,e+1)&&h++,(h==0||h==4)&&(n+=3)}for(var t=0;t<u;t++)for(var e=0;e<u-6;e++)r.isDark(t,e)&&!r.isDark(t,e+1)&&r.isDark(t,e+2)&&r.isDark(t,e+3)&&r.isDark(t,e+4)&&!r.isDark(t,e+5)&&r.isDark(t,e+6)&&(n+=40);for(var e=0;e<u;e++)for(var t=0;t<u-6;t++)r.isDark(t,e)&&!r.isDark(t+1,e)&&r.isDark(t+2,e)&&r.isDark(t+3,e)&&r.isDark(t+4,e)&&!r.isDark(t+5,e)&&r.isDark(t+6,e)&&(n+=40);for(var p=0,e=0;e<u;e++)for(var t=0;t<u;t++)r.isDark(t,e)&&p++;var c=Math.abs(100*p/u/u-50)/5;return n+=c*10,n}};return z=l,z}var q,W;function de(){if(W)return q;W=1;var v=le(),f=he(),a=ve(),g=ge(),l=ae();function r(n,t){this.typeNumber=n,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var u=r.prototype;return u.addData=function(n){var t=new v(n);this.dataList.push(t),this.dataCache=null},u.isDark=function(n,t){if(n<0||this.moduleCount<=n||t<0||this.moduleCount<=t)throw new Error(n+","+t);return this.modules[n][t]},u.getModuleCount=function(){return this.moduleCount},u.make=function(){if(this.typeNumber<1){var n=1;for(n=1;n<40;n++){for(var t=f.getRSBlocks(n,this.errorCorrectLevel),e=new a,o=0,i=0;i<t.length;i++)o+=t[i].dataCount;for(var i=0;i<this.dataList.length;i++){var s=this.dataList[i];e.put(s.mode,4),e.put(s.getLength(),g.getLengthInBits(s.mode,n)),s.write(e)}if(e.getLengthInBits()<=o*8)break}this.typeNumber=n}this.makeImpl(!1,this.getBestMaskPattern())},u.makeImpl=function(n,t){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var e=0;e<this.moduleCount;e++){this.modules[e]=new Array(this.moduleCount);for(var o=0;o<this.moduleCount;o++)this.modules[e][o]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(n,t),this.typeNumber>=7&&this.setupTypeNumber(n),this.dataCache==null&&(this.dataCache=r.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},u.setupPositionProbePattern=function(n,t){for(var e=-1;e<=7;e++)if(!(n+e<=-1||this.moduleCount<=n+e))for(var o=-1;o<=7;o++)t+o<=-1||this.moduleCount<=t+o||(0<=e&&e<=6&&(o==0||o==6)||0<=o&&o<=6&&(e==0||e==6)||2<=e&&e<=4&&2<=o&&o<=4?this.modules[n+e][t+o]=!0:this.modules[n+e][t+o]=!1)},u.getBestMaskPattern=function(){for(var n=0,t=0,e=0;e<8;e++){this.makeImpl(!0,e);var o=g.getLostPoint(this);(e==0||n>o)&&(n=o,t=e)}return t},u.createMovieClip=function(n,t,e){var o=n.createEmptyMovieClip(t,e),i=1;this.make();for(var s=0;s<this.modules.length;s++)for(var d=s*i,h=0;h<this.modules[s].length;h++){var p=h*i,c=this.modules[s][h];c&&(o.beginFill(0,100),o.moveTo(p,d),o.lineTo(p+i,d),o.lineTo(p+i,d+i),o.lineTo(p,d+i),o.endFill())}return o},u.setupTimingPattern=function(){for(var n=8;n<this.moduleCount-8;n++)this.modules[n][6]==null&&(this.modules[n][6]=n%2==0);for(var t=8;t<this.moduleCount-8;t++)this.modules[6][t]==null&&(this.modules[6][t]=t%2==0)},u.setupPositionAdjustPattern=function(){for(var n=g.getPatternPosition(this.typeNumber),t=0;t<n.length;t++)for(var e=0;e<n.length;e++){var o=n[t],i=n[e];if(this.modules[o][i]==null)for(var s=-2;s<=2;s++)for(var d=-2;d<=2;d++)s==-2||s==2||d==-2||d==2||s==0&&d==0?this.modules[o+s][i+d]=!0:this.modules[o+s][i+d]=!1}},u.setupTypeNumber=function(n){for(var t=g.getBCHTypeNumber(this.typeNumber),e=0;e<18;e++){var o=!n&&(t>>e&1)==1;this.modules[Math.floor(e/3)][e%3+this.moduleCount-8-3]=o}for(var e=0;e<18;e++){var o=!n&&(t>>e&1)==1;this.modules[e%3+this.moduleCount-8-3][Math.floor(e/3)]=o}},u.setupTypeInfo=function(n,t){for(var e=this.errorCorrectLevel<<3|t,o=g.getBCHTypeInfo(e),i=0;i<15;i++){var s=!n&&(o>>i&1)==1;i<6?this.modules[i][8]=s:i<8?this.modules[i+1][8]=s:this.modules[this.moduleCount-15+i][8]=s}for(var i=0;i<15;i++){var s=!n&&(o>>i&1)==1;i<8?this.modules[8][this.moduleCount-i-1]=s:i<9?this.modules[8][15-i-1+1]=s:this.modules[8][15-i-1]=s}this.modules[this.moduleCount-8][8]=!n},u.mapData=function(n,t){for(var e=-1,o=this.moduleCount-1,i=7,s=0,d=this.moduleCount-1;d>0;d-=2)for(d==6&&d--;;){for(var h=0;h<2;h++)if(this.modules[o][d-h]==null){var p=!1;s<n.length&&(p=(n[s]>>>i&1)==1);var c=g.getMask(t,o,d-h);c&&(p=!p),this.modules[o][d-h]=p,i--,i==-1&&(s++,i=7)}if(o+=e,o<0||this.moduleCount<=o){o-=e,e=-e;break}}},r.PAD0=236,r.PAD1=17,r.createData=function(n,t,e){for(var o=f.getRSBlocks(n,t),i=new a,s=0;s<e.length;s++){var d=e[s];i.put(d.mode,4),i.put(d.getLength(),g.getLengthInBits(d.mode,n)),d.write(i)}for(var h=0,s=0;s<o.length;s++)h+=o[s].dataCount;if(i.getLengthInBits()>h*8)throw new Error("code length overflow. ("+i.getLengthInBits()+">"+h*8+")");for(i.getLengthInBits()+4<=h*8&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(!1);for(;!(i.getLengthInBits()>=h*8||(i.put(r.PAD0,8),i.getLengthInBits()>=h*8));)i.put(r.PAD1,8);return r.createBytes(i,o)},r.createBytes=function(n,t){for(var e=0,o=0,i=0,s=new Array(t.length),d=new Array(t.length),h=0;h<t.length;h++){var p=t[h].dataCount,c=t[h].totalCount-p;o=Math.max(o,p),i=Math.max(i,c),s[h]=new Array(p);for(var m=0;m<s[h].length;m++)s[h][m]=255&n.buffer[m+e];e+=p;var E=g.getErrorCorrectPolynomial(c),B=new l(s[h],E.getLength()-1),T=B.mod(E);d[h]=new Array(E.getLength()-1);for(var m=0;m<d[h].length;m++){var _=m+T.getLength()-d[h].length;d[h][m]=_>=0?T.get(_):0}}for(var P=0,m=0;m<t.length;m++)P+=t[m].totalCount;for(var C=new Array(P),L=0,m=0;m<o;m++)for(var h=0;h<t.length;h++)m<s[h].length&&(C[L++]=s[h][m]);for(var m=0;m<i;m++)for(var h=0;h<t.length;h++)m<d[h].length&&(C[L++]=d[h][m]);return C},q=r,q}var A={},Z;function pe(){if(Z)return A;Z=1,Object.defineProperty(A,"__esModule",{value:!0});var v=Object.assign||function(e){for(var o=1;o<arguments.length;o++){var i=arguments[o];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},f=ee(),a=r(f),g=V(),l=r(g);function r(e){return e&&e.__esModule?e:{default:e}}function u(e,o){var i={};for(var s in e)o.indexOf(s)>=0||Object.prototype.hasOwnProperty.call(e,s)&&(i[s]=e[s]);return i}var n={bgColor:a.default.oneOfType([a.default.object,a.default.string]).isRequired,bgD:a.default.string.isRequired,fgColor:a.default.oneOfType([a.default.object,a.default.string]).isRequired,fgD:a.default.string.isRequired,size:a.default.number.isRequired,title:a.default.string,viewBoxSize:a.default.number.isRequired,xmlns:a.default.string},t=(0,g.forwardRef)(function(e,o){var i=e.bgColor,s=e.bgD,d=e.fgD,h=e.fgColor,p=e.size,c=e.title,m=e.viewBoxSize,E=e.xmlns,B=E===void 0?"http://www.w3.org/2000/svg":E,T=u(e,["bgColor","bgD","fgD","fgColor","size","title","viewBoxSize","xmlns"]);return l.default.createElement("svg",v({},T,{height:p,ref:o,viewBox:"0 0 "+m+" "+m,width:p,xmlns:B}),c?l.default.createElement("title",null,c):null,l.default.createElement("path",{d:s,fill:i}),l.default.createElement("path",{d,fill:h}))});return t.displayName="QRCodeSvg",t.propTypes=n,A.default=t,A}var j;function me(){if(j)return R;j=1,Object.defineProperty(R,"__esModule",{value:!0}),R.QRCode=void 0;var v=Object.assign||function(p){for(var c=1;c<arguments.length;c++){var m=arguments[c];for(var E in m)Object.prototype.hasOwnProperty.call(m,E)&&(p[E]=m[E])}return p},f=ee(),a=i(f),g=te(),l=i(g),r=de(),u=i(r),n=V(),t=i(n),e=pe(),o=i(e);function i(p){return p&&p.__esModule?p:{default:p}}function s(p,c){var m={};for(var E in p)c.indexOf(E)>=0||Object.prototype.hasOwnProperty.call(p,E)&&(m[E]=p[E]);return m}var d={bgColor:a.default.oneOfType([a.default.object,a.default.string]),fgColor:a.default.oneOfType([a.default.object,a.default.string]),level:a.default.string,size:a.default.number,value:a.default.string.isRequired},h=(0,n.forwardRef)(function(p,c){var m=p.bgColor,E=m===void 0?"#FFFFFF":m,B=p.fgColor,T=B===void 0?"#000000":B,_=p.level,P=_===void 0?"L":_,C=p.size,L=C===void 0?256:C,oe=p.value,ue=s(p,["bgColor","fgColor","level","size","value"]),D=new u.default(-1,l.default[P]);D.addData(oe),D.make();var w=D.modules;return t.default.createElement(o.default,v({},ue,{bgColor:E,bgD:w.map(function(y,b){return y.map(function(M,O){return M?"":"M "+O+" "+b+" l 1 0 0 1 -1 0 Z"}).join(" ")}).join(" "),fgColor:T,fgD:w.map(function(y,b){return y.map(function(M,O){return M?"M "+O+" "+b+" l 1 0 0 1 -1 0 Z":""}).join(" ")}).join(" "),ref:c,size:L,viewBoxSize:w.length}))});return R.QRCode=h,h.displayName="QRCode",h.propTypes=d,R.default=h,R}var ie=me();const ce=se(ie),Be=fe({__proto__:null,default:ce},[ie]);export{Be as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
html{height:100%}body{margin:0;padding:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:100%;height:100%;overflow:hidden}*::-webkit-scrollbar-track{background-color:#ccc}*::-webkit-scrollbar{width:6px;background-color:#ccc}*::-webkit-scrollbar-thumb{background-color:#575757}#root,.App{height:100%}
|