iobroker.admin 7.4.4 → 7.4.7
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 +5 -4
- package/adminWww/asset-manifest.json +25 -25
- package/adminWww/index.html +1 -1
- package/adminWww/static/js/1737.08641cc2.chunk.js +3 -0
- package/adminWww/static/js/1737.08641cc2.chunk.js.map +1 -0
- package/adminWww/static/js/{288.20da45b9.chunk.js → 288.12201160.chunk.js} +2 -2
- package/adminWww/static/js/{288.20da45b9.chunk.js.map → 288.12201160.chunk.js.map} +1 -1
- package/adminWww/static/js/2930.8e88fcf2.chunk.js.LICENSE.txt +1 -1
- package/adminWww/static/js/2930.8e88fcf2.chunk.js.map +1 -1
- package/adminWww/static/js/4289.e9a5790f.chunk.js.map +1 -1
- package/adminWww/static/js/4720.72b71322.chunk.js +2 -0
- package/adminWww/static/js/4720.72b71322.chunk.js.map +1 -0
- package/adminWww/static/js/5503.a4ce73d8.chunk.js +3 -0
- package/adminWww/static/js/5503.a4ce73d8.chunk.js.map +1 -0
- package/adminWww/static/js/6853.cfc24286.chunk.js +2 -0
- package/adminWww/static/js/6853.cfc24286.chunk.js.map +1 -0
- package/adminWww/static/js/7424.223daaa3.chunk.js +2 -0
- package/adminWww/static/js/7424.223daaa3.chunk.js.map +1 -0
- package/adminWww/static/js/9072.4505ce12.chunk.js +2 -0
- package/adminWww/static/js/9072.4505ce12.chunk.js.map +1 -0
- package/adminWww/static/js/9086.a4fdc813.chunk.js +2 -0
- package/adminWww/static/js/9086.a4fdc813.chunk.js.map +1 -0
- package/adminWww/static/js/9228.cf388444.chunk.js +3 -0
- package/adminWww/static/js/9228.cf388444.chunk.js.map +1 -0
- package/adminWww/static/js/9701.2178b9bd.chunk.js +2 -0
- package/adminWww/static/js/9701.2178b9bd.chunk.js.map +1 -0
- package/adminWww/static/js/9731.b09a7023.chunk.js +3 -0
- package/adminWww/static/js/{9731.f67b583c.chunk.js.LICENSE.txt → 9731.b09a7023.chunk.js.LICENSE.txt} +1 -1
- package/adminWww/static/js/9731.b09a7023.chunk.js.map +1 -0
- package/adminWww/static/js/main.d26a969d.js +2 -0
- package/adminWww/static/js/main.d26a969d.js.map +1 -0
- package/io-package.json +14 -14
- package/package.json +5 -5
- package/adminWww/static/js/38.e125c16b.chunk.js +0 -3
- package/adminWww/static/js/38.e125c16b.chunk.js.map +0 -1
- package/adminWww/static/js/4720.4bbc23ec.chunk.js +0 -2
- package/adminWww/static/js/4720.4bbc23ec.chunk.js.map +0 -1
- package/adminWww/static/js/5503.751d48e4.chunk.js +0 -3
- package/adminWww/static/js/5503.751d48e4.chunk.js.map +0 -1
- package/adminWww/static/js/6853.f9170a75.chunk.js +0 -2
- package/adminWww/static/js/6853.f9170a75.chunk.js.map +0 -1
- package/adminWww/static/js/7424.98e61818.chunk.js +0 -2
- package/adminWww/static/js/7424.98e61818.chunk.js.map +0 -1
- package/adminWww/static/js/7863.92e61020.chunk.js +0 -2
- package/adminWww/static/js/7863.92e61020.chunk.js.map +0 -1
- package/adminWww/static/js/9072.4eaaedc2.chunk.js +0 -2
- package/adminWww/static/js/9072.4eaaedc2.chunk.js.map +0 -1
- package/adminWww/static/js/9228.3ce3911c.chunk.js +0 -3
- package/adminWww/static/js/9228.3ce3911c.chunk.js.map +0 -1
- package/adminWww/static/js/9701.b2813984.chunk.js +0 -2
- package/adminWww/static/js/9701.b2813984.chunk.js.map +0 -1
- package/adminWww/static/js/9731.f67b583c.chunk.js +0 -3
- package/adminWww/static/js/9731.f67b583c.chunk.js.map +0 -1
- package/adminWww/static/js/main.11639e29.js +0 -2
- package/adminWww/static/js/main.11639e29.js.map +0 -1
- /package/adminWww/static/js/{38.e125c16b.chunk.js.LICENSE.txt → 1737.08641cc2.chunk.js.LICENSE.txt} +0 -0
- /package/adminWww/static/js/{5503.751d48e4.chunk.js.LICENSE.txt → 5503.a4ce73d8.chunk.js.LICENSE.txt} +0 -0
- /package/adminWww/static/js/{9228.3ce3911c.chunk.js.LICENSE.txt → 9228.cf388444.chunk.js.LICENSE.txt} +0 -0
package/README.md
CHANGED
|
@@ -87,6 +87,11 @@ The icons may not be reused in other projects without the proper flaticon licens
|
|
|
87
87
|
<!--
|
|
88
88
|
### **WORK IN PROGRESS**
|
|
89
89
|
-->
|
|
90
|
+
### 7.4.7 (2024-12-12)
|
|
91
|
+
|
|
92
|
+
- (@GermanBluefox) Corrected the rendering of custom JSON config components
|
|
93
|
+
- (@GermanBluefox) Corrected the news dialog for multi-line messages
|
|
94
|
+
|
|
90
95
|
### 7.4.4 (2024-12-08)
|
|
91
96
|
|
|
92
97
|
- (@GermanBluefox) Showed value in object edit dialog
|
|
@@ -108,10 +113,6 @@ The icons may not be reused in other projects without the proper flaticon licens
|
|
|
108
113
|
|
|
109
114
|
- (@GermanBluefox) Made improvement for JSONConfig components
|
|
110
115
|
|
|
111
|
-
### 7.4.0 (2024-11-17)
|
|
112
|
-
|
|
113
|
-
- (@GermanBluefox) Added new JsonConfig control: staticInfo
|
|
114
|
-
|
|
115
116
|
## License
|
|
116
117
|
|
|
117
118
|
The MIT License (MIT)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"files": {
|
|
3
|
-
"main.js": "./static/js/main.
|
|
3
|
+
"main.js": "./static/js/main.d26a969d.js",
|
|
4
4
|
"static/css/288.c0edd320.chunk.css": "./static/css/288.c0edd320.chunk.css",
|
|
5
|
-
"static/js/288.
|
|
5
|
+
"static/js/288.12201160.chunk.js": "./static/js/288.12201160.chunk.js",
|
|
6
6
|
"static/js/4669.59fb05c3.chunk.js": "./static/js/4669.59fb05c3.chunk.js",
|
|
7
7
|
"static/js/9379.8bf77bba.chunk.js": "./static/js/9379.8bf77bba.chunk.js",
|
|
8
8
|
"static/js/2233.a42dca22.chunk.js": "./static/js/2233.a42dca22.chunk.js",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"static/js/4203.cf3ffdb3.chunk.js": "./static/js/4203.cf3ffdb3.chunk.js",
|
|
29
29
|
"static/js/8387.2cb15163.chunk.js": "./static/js/8387.2cb15163.chunk.js",
|
|
30
30
|
"static/js/8222.399b9b24.chunk.js": "./static/js/8222.399b9b24.chunk.js",
|
|
31
|
-
"static/js/7424.
|
|
32
|
-
"static/js/6853.
|
|
31
|
+
"static/js/7424.223daaa3.chunk.js": "./static/js/7424.223daaa3.chunk.js",
|
|
32
|
+
"static/js/6853.cfc24286.chunk.js": "./static/js/6853.cfc24286.chunk.js",
|
|
33
33
|
"static/js/1869.02f95681.chunk.js": "./static/js/1869.02f95681.chunk.js",
|
|
34
34
|
"static/js/3849.363dd3ca.chunk.js": "./static/js/3849.363dd3ca.chunk.js",
|
|
35
35
|
"static/js/706.2cac44d0.chunk.js": "./static/js/706.2cac44d0.chunk.js",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"static/js/7050.dcdd30eb.chunk.js": "./static/js/7050.dcdd30eb.chunk.js",
|
|
39
39
|
"static/js/921.f7fc8142.chunk.js": "./static/js/921.f7fc8142.chunk.js",
|
|
40
40
|
"static/js/7249.ff7ffd3f.chunk.js": "./static/js/7249.ff7ffd3f.chunk.js",
|
|
41
|
-
"static/js/4720.
|
|
41
|
+
"static/js/4720.72b71322.chunk.js": "./static/js/4720.72b71322.chunk.js",
|
|
42
42
|
"static/js/3997.8ee38232.chunk.js": "./static/js/3997.8ee38232.chunk.js",
|
|
43
43
|
"static/js/5446.7055c034.chunk.js": "./static/js/5446.7055c034.chunk.js",
|
|
44
44
|
"static/js/6331.a5f853ac.chunk.js": "./static/js/6331.a5f853ac.chunk.js",
|
|
@@ -196,22 +196,22 @@
|
|
|
196
196
|
"static/js/2883.6f8e5e90.chunk.js": "./static/js/2883.6f8e5e90.chunk.js",
|
|
197
197
|
"static/js/5844.4eebd786.chunk.js": "./static/js/5844.4eebd786.chunk.js",
|
|
198
198
|
"static/js/773.9140b30e.chunk.js": "./static/js/773.9140b30e.chunk.js",
|
|
199
|
-
"static/js/9701.
|
|
199
|
+
"static/js/9701.2178b9bd.chunk.js": "./static/js/9701.2178b9bd.chunk.js",
|
|
200
200
|
"static/js/2930.8e88fcf2.chunk.js": "./static/js/2930.8e88fcf2.chunk.js",
|
|
201
|
-
"static/js/9072.
|
|
201
|
+
"static/js/9072.4505ce12.chunk.js": "./static/js/9072.4505ce12.chunk.js",
|
|
202
202
|
"static/js/184.412f828f.chunk.js": "./static/js/184.412f828f.chunk.js",
|
|
203
203
|
"static/js/4386.2fbc4060.chunk.js": "./static/js/4386.2fbc4060.chunk.js",
|
|
204
|
-
"static/js/9228.
|
|
204
|
+
"static/js/9228.cf388444.chunk.js": "./static/js/9228.cf388444.chunk.js",
|
|
205
205
|
"static/js/7949.922477b8.chunk.js": "./static/js/7949.922477b8.chunk.js",
|
|
206
206
|
"static/js/6603.614b4df4.chunk.js": "./static/js/6603.614b4df4.chunk.js",
|
|
207
|
-
"static/js/
|
|
207
|
+
"static/js/9086.a4fdc813.chunk.js": "./static/js/9086.a4fdc813.chunk.js",
|
|
208
208
|
"static/js/632.72c332b3.chunk.js": "./static/js/632.72c332b3.chunk.js",
|
|
209
209
|
"static/js/2825.60a77210.chunk.js": "./static/js/2825.60a77210.chunk.js",
|
|
210
|
-
"static/js/5503.
|
|
210
|
+
"static/js/5503.a4ce73d8.chunk.js": "./static/js/5503.a4ce73d8.chunk.js",
|
|
211
211
|
"static/js/2918.079e3fcb.chunk.js": "./static/js/2918.079e3fcb.chunk.js",
|
|
212
|
-
"static/js/9731.
|
|
212
|
+
"static/js/9731.b09a7023.chunk.js": "./static/js/9731.b09a7023.chunk.js",
|
|
213
213
|
"static/js/5139.3a8afe05.chunk.js": "./static/js/5139.3a8afe05.chunk.js",
|
|
214
|
-
"static/js/
|
|
214
|
+
"static/js/1737.08641cc2.chunk.js": "./static/js/1737.08641cc2.chunk.js",
|
|
215
215
|
"static/js/1193.b155bee3.chunk.js": "./static/js/1193.b155bee3.chunk.js",
|
|
216
216
|
"static/js/1809.fa89dca7.chunk.js": "./static/js/1809.fa89dca7.chunk.js",
|
|
217
217
|
"static/js/9823.f3f5cd8c.chunk.js": "./static/js/9823.f3f5cd8c.chunk.js",
|
|
@@ -381,9 +381,9 @@
|
|
|
381
381
|
"static/media/file.svg": "./static/media/file.d39f44d0930a01c6b1a0.svg",
|
|
382
382
|
"static/media/certificates.svg": "./static/media/certificates.0a7c4a4c750fa74d2f98.svg",
|
|
383
383
|
"static/media/rooms.svg": "./static/media/rooms.8d7a30c563e146914ecb.svg",
|
|
384
|
-
"main.
|
|
384
|
+
"main.d26a969d.js.map": "./static/js/main.d26a969d.js.map",
|
|
385
385
|
"288.c0edd320.chunk.css.map": "./static/css/288.c0edd320.chunk.css.map",
|
|
386
|
-
"288.
|
|
386
|
+
"288.12201160.chunk.js.map": "./static/js/288.12201160.chunk.js.map",
|
|
387
387
|
"4669.59fb05c3.chunk.js.map": "./static/js/4669.59fb05c3.chunk.js.map",
|
|
388
388
|
"9379.8bf77bba.chunk.js.map": "./static/js/9379.8bf77bba.chunk.js.map",
|
|
389
389
|
"2233.a42dca22.chunk.js.map": "./static/js/2233.a42dca22.chunk.js.map",
|
|
@@ -409,8 +409,8 @@
|
|
|
409
409
|
"4203.cf3ffdb3.chunk.js.map": "./static/js/4203.cf3ffdb3.chunk.js.map",
|
|
410
410
|
"8387.2cb15163.chunk.js.map": "./static/js/8387.2cb15163.chunk.js.map",
|
|
411
411
|
"8222.399b9b24.chunk.js.map": "./static/js/8222.399b9b24.chunk.js.map",
|
|
412
|
-
"7424.
|
|
413
|
-
"6853.
|
|
412
|
+
"7424.223daaa3.chunk.js.map": "./static/js/7424.223daaa3.chunk.js.map",
|
|
413
|
+
"6853.cfc24286.chunk.js.map": "./static/js/6853.cfc24286.chunk.js.map",
|
|
414
414
|
"1869.02f95681.chunk.js.map": "./static/js/1869.02f95681.chunk.js.map",
|
|
415
415
|
"3849.363dd3ca.chunk.js.map": "./static/js/3849.363dd3ca.chunk.js.map",
|
|
416
416
|
"706.2cac44d0.chunk.js.map": "./static/js/706.2cac44d0.chunk.js.map",
|
|
@@ -419,23 +419,23 @@
|
|
|
419
419
|
"7050.dcdd30eb.chunk.js.map": "./static/js/7050.dcdd30eb.chunk.js.map",
|
|
420
420
|
"921.f7fc8142.chunk.js.map": "./static/js/921.f7fc8142.chunk.js.map",
|
|
421
421
|
"7249.ff7ffd3f.chunk.js.map": "./static/js/7249.ff7ffd3f.chunk.js.map",
|
|
422
|
-
"4720.
|
|
423
|
-
"9701.
|
|
422
|
+
"4720.72b71322.chunk.js.map": "./static/js/4720.72b71322.chunk.js.map",
|
|
423
|
+
"9701.2178b9bd.chunk.js.map": "./static/js/9701.2178b9bd.chunk.js.map",
|
|
424
424
|
"2930.8e88fcf2.chunk.js.map": "./static/js/2930.8e88fcf2.chunk.js.map",
|
|
425
|
-
"9072.
|
|
425
|
+
"9072.4505ce12.chunk.js.map": "./static/js/9072.4505ce12.chunk.js.map",
|
|
426
426
|
"184.412f828f.chunk.js.map": "./static/js/184.412f828f.chunk.js.map",
|
|
427
427
|
"4386.2fbc4060.chunk.js.map": "./static/js/4386.2fbc4060.chunk.js.map",
|
|
428
|
-
"9228.
|
|
428
|
+
"9228.cf388444.chunk.js.map": "./static/js/9228.cf388444.chunk.js.map",
|
|
429
429
|
"7949.922477b8.chunk.js.map": "./static/js/7949.922477b8.chunk.js.map",
|
|
430
430
|
"6603.614b4df4.chunk.js.map": "./static/js/6603.614b4df4.chunk.js.map",
|
|
431
|
-
"
|
|
431
|
+
"9086.a4fdc813.chunk.js.map": "./static/js/9086.a4fdc813.chunk.js.map",
|
|
432
432
|
"632.72c332b3.chunk.js.map": "./static/js/632.72c332b3.chunk.js.map",
|
|
433
433
|
"2825.60a77210.chunk.js.map": "./static/js/2825.60a77210.chunk.js.map",
|
|
434
|
-
"5503.
|
|
434
|
+
"5503.a4ce73d8.chunk.js.map": "./static/js/5503.a4ce73d8.chunk.js.map",
|
|
435
435
|
"2918.079e3fcb.chunk.js.map": "./static/js/2918.079e3fcb.chunk.js.map",
|
|
436
|
-
"9731.
|
|
436
|
+
"9731.b09a7023.chunk.js.map": "./static/js/9731.b09a7023.chunk.js.map",
|
|
437
437
|
"5139.3a8afe05.chunk.js.map": "./static/js/5139.3a8afe05.chunk.js.map",
|
|
438
|
-
"
|
|
438
|
+
"1737.08641cc2.chunk.js.map": "./static/js/1737.08641cc2.chunk.js.map",
|
|
439
439
|
"1193.b155bee3.chunk.js.map": "./static/js/1193.b155bee3.chunk.js.map",
|
|
440
440
|
"1809.fa89dca7.chunk.js.map": "./static/js/1809.fa89dca7.chunk.js.map",
|
|
441
441
|
"9823.f3f5cd8c.chunk.js.map": "./static/js/9823.f3f5cd8c.chunk.js.map",
|
|
@@ -446,6 +446,6 @@
|
|
|
446
446
|
"3834.2e04eb51.chunk.js.map": "./static/js/3834.2e04eb51.chunk.js.map"
|
|
447
447
|
},
|
|
448
448
|
"entrypoints": [
|
|
449
|
-
"static/js/main.
|
|
449
|
+
"static/js/main.d26a969d.js"
|
|
450
450
|
]
|
|
451
451
|
}
|
package/adminWww/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html lang="en" translate="no"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no"/><meta name="theme-color" content="#000000"/><meta name="description" content="admin - ioBroker"/><link rel="apple-touch-icon" href="./logo192.png"/><link rel="stylesheet" href="./css/leaflet.css"/><link rel="manifest" href="./manifest.json" crossorigin="use-credentials"/><script type="text/javascript" onerror="setTimeout(function(){window.location.reload()}, 5000)" src="./lib/js/socket.io.js"></script><script type="text/javascript" src="./lib/js/sparkline.js"></script><title>Admin</title><script>window.loginHideLogo="@@loginHideLogo@@",window.loginMotto="@@loginMotto@@",window.login="@@auth@@",window.loginLogo="@@loginLogo@@",window.loginLink="@@loginLink@@",window.loginTitle="@@loginTitle@@",window.loginBackgroundColor="@@loginBackgroundColor@@",window.loginBackgroundImage="@@loginBackgroundImage@@",window.vendorPrefix="@@vendorPrefix@@",window.disableDataReporting="@@disableDataReporting@@",window.loadingBackgroundColor="@@loadingBackgroundColor@@",window.loadingBackgroundImage="@@loadingBackgroundImage@@",window.loadingHideLogo="@@loadingHideLogo@@"</script><style>.root{background-color:rgba(255,255,255,.87);border-radius:10px}.unsupported{width:200px;background-color:#aaa;margin:auto;margin-top:3rem;padding:10px;line-height:25px;border-radius:4px;text-align:center}.leaflet-container{height:400px;width:100%}</style><script>setTimeout((()=>{const o=document.body;window.location.search.includes("?login")?(window.loginBackgroundColor&&-1===window.loginBackgroundColor.indexOf("loginBackgroundColor")&&(o.style.backgroundColor=window.loginBackgroundColor),window.loginBackgroundImage&&-1===window.loginBackgroundImage.indexOf("loginBackgroundImage")&&(o.style.backgroundImage="url("+window.loginBackgroundImage+")",o.style.backgroundSize="cover")):(window.loadingBackgroundColor&&-1===window.loadingBackgroundColor.indexOf("loadingBackgroundColor")&&(o.style.backgroundColor=window.loadingBackgroundColor),window.loadingBackgroundImage&&-1===window.loadingBackgroundImage.indexOf("loadingBackgroundImage")&&(o.style.backgroundImage="url("+window.loadingBackgroundImage+")",o.style.backgroundSize="cover"))}),0),window.addEventListener("load",(function o(n){window.removeEventListener("load",o,!1);if(window.navigator.userAgent.indexOf("MSIE ")>0||navigator.userAgent.match(/Trident.*rv\:11\./)){const o=document.getElementById("root");o.classList.add("unsupported"),o.innerHTML="Browser is not supported. Please use Firefox or Chrome."}}),!1)</script><script defer="defer" src="static/js/main.
|
|
1
|
+
<!doctype html><html lang="en" translate="no"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no"/><meta name="theme-color" content="#000000"/><meta name="description" content="admin - ioBroker"/><link rel="apple-touch-icon" href="./logo192.png"/><link rel="stylesheet" href="./css/leaflet.css"/><link rel="manifest" href="./manifest.json" crossorigin="use-credentials"/><script type="text/javascript" onerror="setTimeout(function(){window.location.reload()}, 5000)" src="./lib/js/socket.io.js"></script><script type="text/javascript" src="./lib/js/sparkline.js"></script><title>Admin</title><script>window.loginHideLogo="@@loginHideLogo@@",window.loginMotto="@@loginMotto@@",window.login="@@auth@@",window.loginLogo="@@loginLogo@@",window.loginLink="@@loginLink@@",window.loginTitle="@@loginTitle@@",window.loginBackgroundColor="@@loginBackgroundColor@@",window.loginBackgroundImage="@@loginBackgroundImage@@",window.vendorPrefix="@@vendorPrefix@@",window.disableDataReporting="@@disableDataReporting@@",window.loadingBackgroundColor="@@loadingBackgroundColor@@",window.loadingBackgroundImage="@@loadingBackgroundImage@@",window.loadingHideLogo="@@loadingHideLogo@@"</script><style>.root{background-color:rgba(255,255,255,.87);border-radius:10px}.unsupported{width:200px;background-color:#aaa;margin:auto;margin-top:3rem;padding:10px;line-height:25px;border-radius:4px;text-align:center}.leaflet-container{height:400px;width:100%}</style><script>setTimeout((()=>{const o=document.body;window.location.search.includes("?login")?(window.loginBackgroundColor&&-1===window.loginBackgroundColor.indexOf("loginBackgroundColor")&&(o.style.backgroundColor=window.loginBackgroundColor),window.loginBackgroundImage&&-1===window.loginBackgroundImage.indexOf("loginBackgroundImage")&&(o.style.backgroundImage="url("+window.loginBackgroundImage+")",o.style.backgroundSize="cover")):(window.loadingBackgroundColor&&-1===window.loadingBackgroundColor.indexOf("loadingBackgroundColor")&&(o.style.backgroundColor=window.loadingBackgroundColor),window.loadingBackgroundImage&&-1===window.loadingBackgroundImage.indexOf("loadingBackgroundImage")&&(o.style.backgroundImage="url("+window.loadingBackgroundImage+")",o.style.backgroundSize="cover"))}),0),window.addEventListener("load",(function o(n){window.removeEventListener("load",o,!1);if(window.navigator.userAgent.indexOf("MSIE ")>0||navigator.userAgent.match(/Trident.*rv\:11\./)){const o=document.getElementById("root");o.classList.add("unsupported"),o.innerHTML="Browser is not supported. Please use Firefox or Chrome."}}),!1)</script><script defer="defer" src="static/js/main.d26a969d.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! For license information please see 1737.08641cc2.chunk.js.LICENSE.txt */
|
|
2
|
+
(self.webpackChunksrc_rx=self.webpackChunksrc_rx||[]).push([[1737],{4526:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});const o=(0,i(15719).A)()},62172:(t,e,i)=>{"use strict";i.d(e,{A:()=>s});i(29183);var o=i(68334),n=i(4526),r=i(99947);function s(){const t=(0,o.A)(n.A);return t[r.A]||t}},68334:(t,e,i)=>{"use strict";i.d(e,{A:()=>s});var o=i(8867),n=i(46096);const r=(0,o.A)();const s=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r;return(0,n.A)(t)}},67186:function(t){t.exports=function(){"use strict";function t(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,o)}return i}function e(e){for(var i=1;i<arguments.length;i++){var o=null!=arguments[i]?arguments[i]:{};i%2?t(Object(o),!0).forEach((function(t){c(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function i(t,e){if("object"!=typeof t||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,e||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function o(t){var e=i(t,"string");return"symbol"==typeof e?e:e+""}function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,o(n.key),n)}}function a(t,e,i){return e&&s(t.prototype,e),i&&s(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(t,e,i){return(e=o(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function h(t){return l(t)||u(t)||d(t)||p()}function l(t){if(Array.isArray(t))return m(t)}function u(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function d(t,e){if(t){if("string"===typeof t)return m(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?m(t,e):void 0}}function m(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,o=new Array(e);i<e;i++)o[i]=t[i];return o}function p(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var f="undefined"!==typeof window&&"undefined"!==typeof window.document,g=f?window:{},v=!(!f||!g.document.documentElement)&&"ontouchstart"in g.document.documentElement,b=!!f&&"PointerEvent"in g,y="cropper",w="all",x="crop",k="move",C="zoom",S="e",T="w",E="s",_="n",O="ne",D="nw",A="se",M="sw",R="".concat(y,"-crop"),N="".concat(y,"-disabled"),I="".concat(y,"-hidden"),L="".concat(y,"-hide"),j="".concat(y,"-invisible"),H="".concat(y,"-modal"),P="".concat(y,"-move"),q="".concat(y,"Action"),B="".concat(y,"Preview"),F="crop",z="move",W="none",U="crop",Y="cropend",X="cropmove",K="cropstart",V="dblclick",G=v?"touchstart":"mousedown",$=v?"touchmove":"mousemove",J=v?"touchend touchcancel":"mouseup",Z=b?"pointerdown":G,Q=b?"pointermove":$,tt=b?"pointerup pointercancel":J,et="ready",it="resize",ot="wheel",nt="zoom",rt="image/jpeg",st=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,at=/^data:/,ct=/^data:image\/jpeg;base64,/,ht=/^img|canvas$/i,lt=200,ut=100,dt={viewMode:0,dragMode:F,initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:lt,minContainerHeight:ut,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},mt='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>',pt=Number.isNaN||g.isNaN;function ft(t){return"number"===typeof t&&!pt(t)}var gt=function(t){return t>0&&t<1/0};function vt(t){return"undefined"===typeof t}function bt(t){return"object"===n(t)&&null!==t}var yt=Object.prototype.hasOwnProperty;function wt(t){if(!bt(t))return!1;try{var e=t.constructor,i=e.prototype;return e&&i&&yt.call(i,"isPrototypeOf")}catch(o){return!1}}function xt(t){return"function"===typeof t}var kt=Array.prototype.slice;function Ct(t){return Array.from?Array.from(t):kt.call(t)}function St(t,e){return t&&xt(e)&&(Array.isArray(t)||ft(t.length)?Ct(t).forEach((function(i,o){e.call(t,i,o,t)})):bt(t)&&Object.keys(t).forEach((function(i){e.call(t,t[i],i,t)}))),t}var Tt=Object.assign||function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),o=1;o<e;o++)i[o-1]=arguments[o];return bt(t)&&i.length>0&&i.forEach((function(e){bt(e)&&Object.keys(e).forEach((function(i){t[i]=e[i]}))})),t},Et=/\.\d*(?:0|9){12}\d*$/;function _t(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e11;return Et.test(t)?Math.round(t*e)/e:t}var Ot=/^width|height|left|top|marginLeft|marginTop$/;function Dt(t,e){var i=t.style;St(e,(function(t,e){Ot.test(e)&&ft(t)&&(t="".concat(t,"px")),i[e]=t}))}function At(t,e){return t.classList?t.classList.contains(e):t.className.indexOf(e)>-1}function Mt(t,e){if(e)if(ft(t.length))St(t,(function(t){Mt(t,e)}));else if(t.classList)t.classList.add(e);else{var i=t.className.trim();i?i.indexOf(e)<0&&(t.className="".concat(i," ").concat(e)):t.className=e}}function Rt(t,e){e&&(ft(t.length)?St(t,(function(t){Rt(t,e)})):t.classList?t.classList.remove(e):t.className.indexOf(e)>=0&&(t.className=t.className.replace(e,"")))}function Nt(t,e,i){e&&(ft(t.length)?St(t,(function(t){Nt(t,e,i)})):i?Mt(t,e):Rt(t,e))}var It=/([a-z\d])([A-Z])/g;function Lt(t){return t.replace(It,"$1-$2").toLowerCase()}function jt(t,e){return bt(t[e])?t[e]:t.dataset?t.dataset[e]:t.getAttribute("data-".concat(Lt(e)))}function Ht(t,e,i){bt(i)?t[e]=i:t.dataset?t.dataset[e]=i:t.setAttribute("data-".concat(Lt(e)),i)}function Pt(t,e){if(bt(t[e]))try{delete t[e]}catch(i){t[e]=void 0}else if(t.dataset)try{delete t.dataset[e]}catch(i){t.dataset[e]=void 0}else t.removeAttribute("data-".concat(Lt(e)))}var qt=/\s\s*/,Bt=function(){var t=!1;if(f){var e=!1,i=function(){},o=Object.defineProperty({},"once",{get:function(){return t=!0,e},set:function(t){e=t}});g.addEventListener("test",i,o),g.removeEventListener("test",i,o)}return t}();function Ft(t,e,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=i;e.trim().split(qt).forEach((function(e){if(!Bt){var r=t.listeners;r&&r[e]&&r[e][i]&&(n=r[e][i],delete r[e][i],0===Object.keys(r[e]).length&&delete r[e],0===Object.keys(r).length&&delete t.listeners)}t.removeEventListener(e,n,o)}))}function zt(t,e,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=i;e.trim().split(qt).forEach((function(e){if(o.once&&!Bt){var r=t.listeners,s=void 0===r?{}:r;n=function(){delete s[e][i],t.removeEventListener(e,n,o);for(var r=arguments.length,a=new Array(r),c=0;c<r;c++)a[c]=arguments[c];i.apply(t,a)},s[e]||(s[e]={}),s[e][i]&&t.removeEventListener(e,s[e][i],o),s[e][i]=n,t.listeners=s}t.addEventListener(e,n,o)}))}function Wt(t,e,i){var o;return xt(Event)&&xt(CustomEvent)?o=new CustomEvent(e,{detail:i,bubbles:!0,cancelable:!0}):(o=document.createEvent("CustomEvent")).initCustomEvent(e,!0,!0,i),t.dispatchEvent(o)}function Ut(t){var e=t.getBoundingClientRect();return{left:e.left+(window.pageXOffset-document.documentElement.clientLeft),top:e.top+(window.pageYOffset-document.documentElement.clientTop)}}var Yt=g.location,Xt=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function Kt(t){var e=t.match(Xt);return null!==e&&(e[1]!==Yt.protocol||e[2]!==Yt.hostname||e[3]!==Yt.port)}function Vt(t){var e="timestamp=".concat((new Date).getTime());return t+(-1===t.indexOf("?")?"?":"&")+e}function Gt(t){var e=t.rotate,i=t.scaleX,o=t.scaleY,n=t.translateX,r=t.translateY,s=[];ft(n)&&0!==n&&s.push("translateX(".concat(n,"px)")),ft(r)&&0!==r&&s.push("translateY(".concat(r,"px)")),ft(e)&&0!==e&&s.push("rotate(".concat(e,"deg)")),ft(i)&&1!==i&&s.push("scaleX(".concat(i,")")),ft(o)&&1!==o&&s.push("scaleY(".concat(o,")"));var a=s.length?s.join(" "):"none";return{WebkitTransform:a,msTransform:a,transform:a}}function $t(t){var i=e({},t),o=0;return St(t,(function(t,e){delete i[e],St(i,(function(e){var i=Math.abs(t.startX-e.startX),n=Math.abs(t.startY-e.startY),r=Math.abs(t.endX-e.endX),s=Math.abs(t.endY-e.endY),a=Math.sqrt(i*i+n*n),c=(Math.sqrt(r*r+s*s)-a)/a;Math.abs(c)>Math.abs(o)&&(o=c)}))})),o}function Jt(t,i){var o=t.pageX,n=t.pageY,r={endX:o,endY:n};return i?r:e({startX:o,startY:n},r)}function Zt(t){var e=0,i=0,o=0;return St(t,(function(t){var n=t.startX,r=t.startY;e+=n,i+=r,o+=1})),{pageX:e/=o,pageY:i/=o}}function Qt(t){var e=t.aspectRatio,i=t.height,o=t.width,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"contain",r=gt(o),s=gt(i);if(r&&s){var a=i*e;"contain"===n&&a>o||"cover"===n&&a<o?i=o/e:o=i*e}else r?i=o/e:s&&(o=i*e);return{width:o,height:i}}function te(t){var e=t.width,i=t.height,o=t.degree;if(90===(o=Math.abs(o)%180))return{width:i,height:e};var n=o%90*Math.PI/180,r=Math.sin(n),s=Math.cos(n),a=e*s+i*r,c=e*r+i*s;return o>90?{width:c,height:a}:{width:a,height:c}}function ee(t,e,i,o){var n=e.aspectRatio,r=e.naturalWidth,s=e.naturalHeight,a=e.rotate,c=void 0===a?0:a,l=e.scaleX,u=void 0===l?1:l,d=e.scaleY,m=void 0===d?1:d,p=i.aspectRatio,f=i.naturalWidth,g=i.naturalHeight,v=o.fillColor,b=void 0===v?"transparent":v,y=o.imageSmoothingEnabled,w=void 0===y||y,x=o.imageSmoothingQuality,k=void 0===x?"low":x,C=o.maxWidth,S=void 0===C?1/0:C,T=o.maxHeight,E=void 0===T?1/0:T,_=o.minWidth,O=void 0===_?0:_,D=o.minHeight,A=void 0===D?0:D,M=document.createElement("canvas"),R=M.getContext("2d"),N=Qt({aspectRatio:p,width:S,height:E}),I=Qt({aspectRatio:p,width:O,height:A},"cover"),L=Math.min(N.width,Math.max(I.width,f)),j=Math.min(N.height,Math.max(I.height,g)),H=Qt({aspectRatio:n,width:S,height:E}),P=Qt({aspectRatio:n,width:O,height:A},"cover"),q=Math.min(H.width,Math.max(P.width,r)),B=Math.min(H.height,Math.max(P.height,s)),F=[-q/2,-B/2,q,B];return M.width=_t(L),M.height=_t(j),R.fillStyle=b,R.fillRect(0,0,L,j),R.save(),R.translate(L/2,j/2),R.rotate(c*Math.PI/180),R.scale(u,m),R.imageSmoothingEnabled=w,R.imageSmoothingQuality=k,R.drawImage.apply(R,[t].concat(h(F.map((function(t){return Math.floor(_t(t))}))))),R.restore(),M}var ie=String.fromCharCode;function oe(t,e,i){var o="";i+=e;for(var n=e;n<i;n+=1)o+=ie(t.getUint8(n));return o}var ne=/^data:.*,/;function re(t){var e=t.replace(ne,""),i=atob(e),o=new ArrayBuffer(i.length),n=new Uint8Array(o);return St(n,(function(t,e){n[e]=i.charCodeAt(e)})),o}function se(t,e){for(var i=[],o=8192,n=new Uint8Array(t);n.length>0;)i.push(ie.apply(null,Ct(n.subarray(0,o)))),n=n.subarray(o);return"data:".concat(e,";base64,").concat(btoa(i.join("")))}function ae(t){var e,i=new DataView(t);try{var o,n,r;if(255===i.getUint8(0)&&216===i.getUint8(1))for(var s=i.byteLength,a=2;a+1<s;){if(255===i.getUint8(a)&&225===i.getUint8(a+1)){n=a;break}a+=1}if(n){var c=n+10;if("Exif"===oe(i,n+4,4)){var h=i.getUint16(c);if(((o=18761===h)||19789===h)&&42===i.getUint16(c+2,o)){var l=i.getUint32(c+4,o);l>=8&&(r=c+l)}}}if(r){var u,d,m=i.getUint16(r,o);for(d=0;d<m;d+=1)if(u=r+12*d+2,274===i.getUint16(u,o)){u+=8,e=i.getUint16(u,o),i.setUint16(u,1,o);break}}}catch(p){e=1}return e}function ce(t){var e=0,i=1,o=1;switch(t){case 2:i=-1;break;case 3:e=-180;break;case 4:o=-1;break;case 5:e=90,o=-1;break;case 6:e=90;break;case 7:e=90,i=-1;break;case 8:e=-90}return{rotate:e,scaleX:i,scaleY:o}}var he={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var t=this.element,e=this.options,i=this.container,o=this.cropper,n=Number(e.minContainerWidth),r=Number(e.minContainerHeight);Mt(o,I),Rt(t,I);var s={width:Math.max(i.offsetWidth,n>=0?n:lt),height:Math.max(i.offsetHeight,r>=0?r:ut)};this.containerData=s,Dt(o,{width:s.width,height:s.height}),Mt(t,I),Rt(o,I)},initCanvas:function(){var t=this.containerData,e=this.imageData,i=this.options.viewMode,o=Math.abs(e.rotate)%180===90,n=o?e.naturalHeight:e.naturalWidth,r=o?e.naturalWidth:e.naturalHeight,s=n/r,a=t.width,c=t.height;t.height*s>t.width?3===i?a=t.height*s:c=t.width/s:3===i?c=t.width/s:a=t.height*s;var h={aspectRatio:s,naturalWidth:n,naturalHeight:r,width:a,height:c};this.canvasData=h,this.limited=1===i||2===i,this.limitCanvas(!0,!0),h.width=Math.min(Math.max(h.width,h.minWidth),h.maxWidth),h.height=Math.min(Math.max(h.height,h.minHeight),h.maxHeight),h.left=(t.width-h.width)/2,h.top=(t.height-h.height)/2,h.oldLeft=h.left,h.oldTop=h.top,this.initialCanvasData=Tt({},h)},limitCanvas:function(t,e){var i=this.options,o=this.containerData,n=this.canvasData,r=this.cropBoxData,s=i.viewMode,a=n.aspectRatio,c=this.cropped&&r;if(t){var h=Number(i.minCanvasWidth)||0,l=Number(i.minCanvasHeight)||0;s>1?(h=Math.max(h,o.width),l=Math.max(l,o.height),3===s&&(l*a>h?h=l*a:l=h/a)):s>0&&(h?h=Math.max(h,c?r.width:0):l?l=Math.max(l,c?r.height:0):c&&(h=r.width,(l=r.height)*a>h?h=l*a:l=h/a));var u=Qt({aspectRatio:a,width:h,height:l});h=u.width,l=u.height,n.minWidth=h,n.minHeight=l,n.maxWidth=1/0,n.maxHeight=1/0}if(e)if(s>(c?0:1)){var d=o.width-n.width,m=o.height-n.height;n.minLeft=Math.min(0,d),n.minTop=Math.min(0,m),n.maxLeft=Math.max(0,d),n.maxTop=Math.max(0,m),c&&this.limited&&(n.minLeft=Math.min(r.left,r.left+(r.width-n.width)),n.minTop=Math.min(r.top,r.top+(r.height-n.height)),n.maxLeft=r.left,n.maxTop=r.top,2===s&&(n.width>=o.width&&(n.minLeft=Math.min(0,d),n.maxLeft=Math.max(0,d)),n.height>=o.height&&(n.minTop=Math.min(0,m),n.maxTop=Math.max(0,m))))}else n.minLeft=-n.width,n.minTop=-n.height,n.maxLeft=o.width,n.maxTop=o.height},renderCanvas:function(t,e){var i=this.canvasData,o=this.imageData;if(e){var n=te({width:o.naturalWidth*Math.abs(o.scaleX||1),height:o.naturalHeight*Math.abs(o.scaleY||1),degree:o.rotate||0}),r=n.width,s=n.height,a=i.width*(r/i.naturalWidth),c=i.height*(s/i.naturalHeight);i.left-=(a-i.width)/2,i.top-=(c-i.height)/2,i.width=a,i.height=c,i.aspectRatio=r/s,i.naturalWidth=r,i.naturalHeight=s,this.limitCanvas(!0,!1)}(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCanvas(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,Dt(this.canvas,Tt({width:i.width,height:i.height},Gt({translateX:i.left,translateY:i.top}))),this.renderImage(t),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(t){var e=this.canvasData,i=this.imageData,o=i.naturalWidth*(e.width/e.naturalWidth),n=i.naturalHeight*(e.height/e.naturalHeight);Tt(i,{width:o,height:n,left:(e.width-o)/2,top:(e.height-n)/2}),Dt(this.image,Tt({width:i.width,height:i.height},Gt(Tt({translateX:i.left,translateY:i.top},i)))),t&&this.output()},initCropBox:function(){var t=this.options,e=this.canvasData,i=t.aspectRatio||t.initialAspectRatio,o=Number(t.autoCropArea)||.8,n={width:e.width,height:e.height};i&&(e.height*i>e.width?n.height=n.width/i:n.width=n.height*i),this.cropBoxData=n,this.limitCropBox(!0,!0),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),n.width=Math.max(n.minWidth,n.width*o),n.height=Math.max(n.minHeight,n.height*o),n.left=e.left+(e.width-n.width)/2,n.top=e.top+(e.height-n.height)/2,n.oldLeft=n.left,n.oldTop=n.top,this.initialCropBoxData=Tt({},n)},limitCropBox:function(t,e){var i=this.options,o=this.containerData,n=this.canvasData,r=this.cropBoxData,s=this.limited,a=i.aspectRatio;if(t){var c=Number(i.minCropBoxWidth)||0,h=Number(i.minCropBoxHeight)||0,l=s?Math.min(o.width,n.width,n.width+n.left,o.width-n.left):o.width,u=s?Math.min(o.height,n.height,n.height+n.top,o.height-n.top):o.height;c=Math.min(c,o.width),h=Math.min(h,o.height),a&&(c&&h?h*a>c?h=c/a:c=h*a:c?h=c/a:h&&(c=h*a),u*a>l?u=l/a:l=u*a),r.minWidth=Math.min(c,l),r.minHeight=Math.min(h,u),r.maxWidth=l,r.maxHeight=u}e&&(s?(r.minLeft=Math.max(0,n.left),r.minTop=Math.max(0,n.top),r.maxLeft=Math.min(o.width,n.left+n.width)-r.width,r.maxTop=Math.min(o.height,n.top+n.height)-r.height):(r.minLeft=0,r.minTop=0,r.maxLeft=o.width-r.width,r.maxTop=o.height-r.height))},renderCropBox:function(){var t=this.options,e=this.containerData,i=this.cropBoxData;(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCropBox(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,t.movable&&t.cropBoxMovable&&Ht(this.face,q,i.width>=e.width&&i.height>=e.height?k:w),Dt(this.cropBox,Tt({width:i.width,height:i.height},Gt({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),Wt(this.element,U,this.getData())}},le={initPreview:function(){var t=this.element,e=this.crossOrigin,i=this.options.preview,o=e?this.crossOriginUrl:this.url,n=t.alt||"The image to preview",r=document.createElement("img");if(e&&(r.crossOrigin=e),r.src=o,r.alt=n,this.viewBox.appendChild(r),this.viewBoxImage=r,i){var s=i;"string"===typeof i?s=t.ownerDocument.querySelectorAll(i):i.querySelector&&(s=[i]),this.previews=s,St(s,(function(t){var i=document.createElement("img");Ht(t,B,{width:t.offsetWidth,height:t.offsetHeight,html:t.innerHTML}),e&&(i.crossOrigin=e),i.src=o,i.alt=n,i.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',t.innerHTML="",t.appendChild(i)}))}},resetPreview:function(){St(this.previews,(function(t){var e=jt(t,B);Dt(t,{width:e.width,height:e.height}),t.innerHTML=e.html,Pt(t,B)}))},preview:function(){var t=this.imageData,e=this.canvasData,i=this.cropBoxData,o=i.width,n=i.height,r=t.width,s=t.height,a=i.left-e.left-t.left,c=i.top-e.top-t.top;this.cropped&&!this.disabled&&(Dt(this.viewBoxImage,Tt({width:r,height:s},Gt(Tt({translateX:-a,translateY:-c},t)))),St(this.previews,(function(e){var i=jt(e,B),h=i.width,l=i.height,u=h,d=l,m=1;o&&(d=n*(m=h/o)),n&&d>l&&(u=o*(m=l/n),d=l),Dt(e,{width:u,height:d}),Dt(e.getElementsByTagName("img")[0],Tt({width:r*m,height:s*m},Gt(Tt({translateX:-a*m,translateY:-c*m},t))))})))}},ue={bind:function(){var t=this.element,e=this.options,i=this.cropper;xt(e.cropstart)&&zt(t,K,e.cropstart),xt(e.cropmove)&&zt(t,X,e.cropmove),xt(e.cropend)&&zt(t,Y,e.cropend),xt(e.crop)&&zt(t,U,e.crop),xt(e.zoom)&&zt(t,nt,e.zoom),zt(i,Z,this.onCropStart=this.cropStart.bind(this)),e.zoomable&&e.zoomOnWheel&&zt(i,ot,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&zt(i,V,this.onDblclick=this.dblclick.bind(this)),zt(t.ownerDocument,Q,this.onCropMove=this.cropMove.bind(this)),zt(t.ownerDocument,tt,this.onCropEnd=this.cropEnd.bind(this)),e.responsive&&zt(window,it,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,e=this.options,i=this.cropper;xt(e.cropstart)&&Ft(t,K,e.cropstart),xt(e.cropmove)&&Ft(t,X,e.cropmove),xt(e.cropend)&&Ft(t,Y,e.cropend),xt(e.crop)&&Ft(t,U,e.crop),xt(e.zoom)&&Ft(t,nt,e.zoom),Ft(i,Z,this.onCropStart),e.zoomable&&e.zoomOnWheel&&Ft(i,ot,this.onWheel,{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&Ft(i,V,this.onDblclick),Ft(t.ownerDocument,Q,this.onCropMove),Ft(t.ownerDocument,tt,this.onCropEnd),e.responsive&&Ft(window,it,this.onResize)}},de={resize:function(){if(!this.disabled){var t,e,i=this.options,o=this.container,n=this.containerData,r=o.offsetWidth/n.width,s=o.offsetHeight/n.height,a=Math.abs(r-1)>Math.abs(s-1)?r:s;1!==a&&(i.restore&&(t=this.getCanvasData(),e=this.getCropBoxData()),this.render(),i.restore&&(this.setCanvasData(St(t,(function(e,i){t[i]=e*a}))),this.setCropBoxData(St(e,(function(t,i){e[i]=t*a})))))}},dblclick:function(){this.disabled||this.options.dragMode===W||this.setDragMode(At(this.dragBox,R)?z:F)},wheel:function(t){var e=this,i=Number(this.options.wheelZoomRatio)||.1,o=1;this.disabled||(t.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout((function(){e.wheeling=!1}),50),t.deltaY?o=t.deltaY>0?1:-1:t.wheelDelta?o=-t.wheelDelta/120:t.detail&&(o=t.detail>0?1:-1),this.zoom(-o*i,t)))},cropStart:function(t){var e=t.buttons,i=t.button;if(!(this.disabled||("mousedown"===t.type||"pointerdown"===t.type&&"mouse"===t.pointerType)&&(ft(e)&&1!==e||ft(i)&&0!==i||t.ctrlKey))){var o,n=this.options,r=this.pointers;t.changedTouches?St(t.changedTouches,(function(t){r[t.identifier]=Jt(t)})):r[t.pointerId||0]=Jt(t),o=Object.keys(r).length>1&&n.zoomable&&n.zoomOnTouch?C:jt(t.target,q),st.test(o)&&!1!==Wt(this.element,K,{originalEvent:t,action:o})&&(t.preventDefault(),this.action=o,this.cropping=!1,o===x&&(this.cropping=!0,Mt(this.dragBox,H)))}},cropMove:function(t){var e=this.action;if(!this.disabled&&e){var i=this.pointers;t.preventDefault(),!1!==Wt(this.element,X,{originalEvent:t,action:e})&&(t.changedTouches?St(t.changedTouches,(function(t){Tt(i[t.identifier]||{},Jt(t,!0))})):Tt(i[t.pointerId||0]||{},Jt(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var e=this.action,i=this.pointers;t.changedTouches?St(t.changedTouches,(function(t){delete i[t.identifier]})):delete i[t.pointerId||0],e&&(t.preventDefault(),Object.keys(i).length||(this.action=""),this.cropping&&(this.cropping=!1,Nt(this.dragBox,H,this.cropped&&this.options.modal)),Wt(this.element,Y,{originalEvent:t,action:e}))}}},me={change:function(t){var e,i=this.options,o=this.canvasData,n=this.containerData,r=this.cropBoxData,s=this.pointers,a=this.action,c=i.aspectRatio,h=r.left,l=r.top,u=r.width,d=r.height,m=h+u,p=l+d,f=0,g=0,v=n.width,b=n.height,y=!0;!c&&t.shiftKey&&(c=u&&d?u/d:1),this.limited&&(f=r.minLeft,g=r.minTop,v=f+Math.min(n.width,o.width,o.left+o.width),b=g+Math.min(n.height,o.height,o.top+o.height));var R=s[Object.keys(s)[0]],N={x:R.endX-R.startX,y:R.endY-R.startY},L=function(t){switch(t){case S:m+N.x>v&&(N.x=v-m);break;case T:h+N.x<f&&(N.x=f-h);break;case _:l+N.y<g&&(N.y=g-l);break;case E:p+N.y>b&&(N.y=b-p)}};switch(a){case w:h+=N.x,l+=N.y;break;case S:if(N.x>=0&&(m>=v||c&&(l<=g||p>=b))){y=!1;break}L(S),(u+=N.x)<0&&(a=T,h-=u=-u),c&&(d=u/c,l+=(r.height-d)/2);break;case _:if(N.y<=0&&(l<=g||c&&(h<=f||m>=v))){y=!1;break}L(_),d-=N.y,l+=N.y,d<0&&(a=E,l-=d=-d),c&&(u=d*c,h+=(r.width-u)/2);break;case T:if(N.x<=0&&(h<=f||c&&(l<=g||p>=b))){y=!1;break}L(T),u-=N.x,h+=N.x,u<0&&(a=S,h-=u=-u),c&&(d=u/c,l+=(r.height-d)/2);break;case E:if(N.y>=0&&(p>=b||c&&(h<=f||m>=v))){y=!1;break}L(E),(d+=N.y)<0&&(a=_,l-=d=-d),c&&(u=d*c,h+=(r.width-u)/2);break;case O:if(c){if(N.y<=0&&(l<=g||m>=v)){y=!1;break}L(_),d-=N.y,l+=N.y,u=d*c}else L(_),L(S),N.x>=0?m<v?u+=N.x:N.y<=0&&l<=g&&(y=!1):u+=N.x,N.y<=0?l>g&&(d-=N.y,l+=N.y):(d-=N.y,l+=N.y);u<0&&d<0?(a=M,l-=d=-d,h-=u=-u):u<0?(a=D,h-=u=-u):d<0&&(a=A,l-=d=-d);break;case D:if(c){if(N.y<=0&&(l<=g||h<=f)){y=!1;break}L(_),d-=N.y,l+=N.y,u=d*c,h+=r.width-u}else L(_),L(T),N.x<=0?h>f?(u-=N.x,h+=N.x):N.y<=0&&l<=g&&(y=!1):(u-=N.x,h+=N.x),N.y<=0?l>g&&(d-=N.y,l+=N.y):(d-=N.y,l+=N.y);u<0&&d<0?(a=A,l-=d=-d,h-=u=-u):u<0?(a=O,h-=u=-u):d<0&&(a=M,l-=d=-d);break;case M:if(c){if(N.x<=0&&(h<=f||p>=b)){y=!1;break}L(T),u-=N.x,h+=N.x,d=u/c}else L(E),L(T),N.x<=0?h>f?(u-=N.x,h+=N.x):N.y>=0&&p>=b&&(y=!1):(u-=N.x,h+=N.x),N.y>=0?p<b&&(d+=N.y):d+=N.y;u<0&&d<0?(a=O,l-=d=-d,h-=u=-u):u<0?(a=A,h-=u=-u):d<0&&(a=D,l-=d=-d);break;case A:if(c){if(N.x>=0&&(m>=v||p>=b)){y=!1;break}L(S),d=(u+=N.x)/c}else L(E),L(S),N.x>=0?m<v?u+=N.x:N.y>=0&&p>=b&&(y=!1):u+=N.x,N.y>=0?p<b&&(d+=N.y):d+=N.y;u<0&&d<0?(a=D,l-=d=-d,h-=u=-u):u<0?(a=M,h-=u=-u):d<0&&(a=O,l-=d=-d);break;case k:this.move(N.x,N.y),y=!1;break;case C:this.zoom($t(s),t),y=!1;break;case x:if(!N.x||!N.y){y=!1;break}e=Ut(this.cropper),h=R.startX-e.left,l=R.startY-e.top,u=r.minWidth,d=r.minHeight,N.x>0?a=N.y>0?A:O:N.x<0&&(h-=u,a=N.y>0?M:D),N.y<0&&(l-=d),this.cropped||(Rt(this.cropBox,I),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))}y&&(r.width=u,r.height=d,r.left=h,r.top=l,this.action=a,this.renderCropBox()),St(s,(function(t){t.startX=t.endX,t.startY=t.endY}))}},pe={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&Mt(this.dragBox,H),Rt(this.cropBox,I),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=Tt({},this.initialImageData),this.canvasData=Tt({},this.initialCanvasData),this.cropBoxData=Tt({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(Tt(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),Rt(this.dragBox,H),Mt(this.cropBox,I)),this},replace:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!this.disabled&&t&&(this.isImg&&(this.element.src=t),e?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,St(this.previews,(function(e){e.getElementsByTagName("img")[0].src=t})))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,Rt(this.cropper,N)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,Mt(this.cropper,N)),this},destroy:function(){var t=this.element;return t[y]?(t[y]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,o=i.left,n=i.top;return this.moveTo(vt(t)?t:o+Number(t),vt(e)?e:n+Number(e))},moveTo:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,o=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.movable&&(ft(t)&&(i.left=t,o=!0),ft(e)&&(i.top=e,o=!0),o&&this.renderCanvas(!0)),this},zoom:function(t,e){var i=this.canvasData;return t=(t=Number(t))<0?1/(1-t):1+t,this.zoomTo(i.width*t/i.naturalWidth,null,e)},zoomTo:function(t,e,i){var o=this.options,n=this.canvasData,r=n.width,s=n.height,a=n.naturalWidth,c=n.naturalHeight;if((t=Number(t))>=0&&this.ready&&!this.disabled&&o.zoomable){var h=a*t,l=c*t;if(!1===Wt(this.element,nt,{ratio:t,oldRatio:r/a,originalEvent:i}))return this;if(i){var u=this.pointers,d=Ut(this.cropper),m=u&&Object.keys(u).length?Zt(u):{pageX:i.pageX,pageY:i.pageY};n.left-=(h-r)*((m.pageX-d.left-n.left)/r),n.top-=(l-s)*((m.pageY-d.top-n.top)/s)}else wt(e)&&ft(e.x)&&ft(e.y)?(n.left-=(h-r)*((e.x-n.left)/r),n.top-=(l-s)*((e.y-n.top)/s)):(n.left-=(h-r)/2,n.top-=(l-s)/2);n.width=h,n.height=l,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return ft(t=Number(t))&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var e=this.imageData.scaleY;return this.scale(t,ft(e)?e:1)},scaleY:function(t){var e=this.imageData.scaleX;return this.scale(ft(e)?e:1,t)},scale:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.imageData,o=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.scalable&&(ft(t)&&(i.scaleX=t,o=!0),ft(e)&&(i.scaleY=e,o=!0),o&&this.renderCanvas(!0,!0)),this},getData:function(){var t,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=this.options,o=this.imageData,n=this.canvasData,r=this.cropBoxData;if(this.ready&&this.cropped){t={x:r.left-n.left,y:r.top-n.top,width:r.width,height:r.height};var s=o.width/o.naturalWidth;if(St(t,(function(e,i){t[i]=e/s})),e){var a=Math.round(t.y+t.height),c=Math.round(t.x+t.width);t.x=Math.round(t.x),t.y=Math.round(t.y),t.width=c-t.x,t.height=a-t.y}}else t={x:0,y:0,width:0,height:0};return i.rotatable&&(t.rotate=o.rotate||0),i.scalable&&(t.scaleX=o.scaleX||1,t.scaleY=o.scaleY||1),t},setData:function(t){var e=this.options,i=this.imageData,o=this.canvasData,n={};if(this.ready&&!this.disabled&&wt(t)){var r=!1;e.rotatable&&ft(t.rotate)&&t.rotate!==i.rotate&&(i.rotate=t.rotate,r=!0),e.scalable&&(ft(t.scaleX)&&t.scaleX!==i.scaleX&&(i.scaleX=t.scaleX,r=!0),ft(t.scaleY)&&t.scaleY!==i.scaleY&&(i.scaleY=t.scaleY,r=!0)),r&&this.renderCanvas(!0,!0);var s=i.width/i.naturalWidth;ft(t.x)&&(n.left=t.x*s+o.left),ft(t.y)&&(n.top=t.y*s+o.top),ft(t.width)&&(n.width=t.width*s),ft(t.height)&&(n.height=t.height*s),this.setCropBoxData(n)}return this},getContainerData:function(){return this.ready?Tt({},this.containerData):{}},getImageData:function(){return this.sized?Tt({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,e={};return this.ready&&St(["left","top","width","height","naturalWidth","naturalHeight"],(function(i){e[i]=t[i]})),e},setCanvasData:function(t){var e=this.canvasData,i=e.aspectRatio;return this.ready&&!this.disabled&&wt(t)&&(ft(t.left)&&(e.left=t.left),ft(t.top)&&(e.top=t.top),ft(t.width)?(e.width=t.width,e.height=t.width/i):ft(t.height)&&(e.height=t.height,e.width=t.height*i),this.renderCanvas(!0)),this},getCropBoxData:function(){var t,e=this.cropBoxData;return this.ready&&this.cropped&&(t={left:e.left,top:e.top,width:e.width,height:e.height}),t||{}},setCropBoxData:function(t){var e,i,o=this.cropBoxData,n=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&wt(t)&&(ft(t.left)&&(o.left=t.left),ft(t.top)&&(o.top=t.top),ft(t.width)&&t.width!==o.width&&(e=!0,o.width=t.width),ft(t.height)&&t.height!==o.height&&(i=!0,o.height=t.height),n&&(e?o.height=o.width/n:i&&(o.width=o.height*n)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var e=this.canvasData,i=ee(this.image,this.imageData,e,t);if(!this.cropped)return i;var o=this.getData(t.rounded),n=o.x,r=o.y,s=o.width,a=o.height,c=i.width/Math.floor(e.naturalWidth);1!==c&&(n*=c,r*=c,s*=c,a*=c);var l=s/a,u=Qt({aspectRatio:l,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),d=Qt({aspectRatio:l,width:t.minWidth||0,height:t.minHeight||0},"cover"),m=Qt({aspectRatio:l,width:t.width||(1!==c?i.width:s),height:t.height||(1!==c?i.height:a)}),p=m.width,f=m.height;p=Math.min(u.width,Math.max(d.width,p)),f=Math.min(u.height,Math.max(d.height,f));var g=document.createElement("canvas"),v=g.getContext("2d");g.width=_t(p),g.height=_t(f),v.fillStyle=t.fillColor||"transparent",v.fillRect(0,0,p,f);var b=t.imageSmoothingEnabled,y=void 0===b||b,w=t.imageSmoothingQuality;v.imageSmoothingEnabled=y,w&&(v.imageSmoothingQuality=w);var x,k,C,S,T,E,_=i.width,O=i.height,D=n,A=r;D<=-s||D>_?(D=0,x=0,C=0,T=0):D<=0?(C=-D,D=0,T=x=Math.min(_,s+D)):D<=_&&(C=0,T=x=Math.min(s,_-D)),x<=0||A<=-a||A>O?(A=0,k=0,S=0,E=0):A<=0?(S=-A,A=0,E=k=Math.min(O,a+A)):A<=O&&(S=0,E=k=Math.min(a,O-A));var M=[D,A,x,k];if(T>0&&E>0){var R=p/s;M.push(C*R,S*R,T*R,E*R)}return v.drawImage.apply(v,[i].concat(h(M.map((function(t){return Math.floor(_t(t))}))))),g},setAspectRatio:function(t){var e=this.options;return this.disabled||vt(t)||(e.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var e=this.options,i=this.dragBox,o=this.face;if(this.ready&&!this.disabled){var n=t===F,r=e.movable&&t===z;t=n||r?t:W,e.dragMode=t,Ht(i,q,t),Nt(i,R,n),Nt(i,P,r),e.cropBoxMovable||(Ht(o,q,t),Nt(o,R,n),Nt(o,P,r))}return this}},fe=g.Cropper,ge=function(){function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(r(this,t),!e||!ht.test(e.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=e,this.options=Tt({},dt,wt(i)&&i),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return a(t,[{key:"init",value:function(){var t,e=this.element,i=e.tagName.toLowerCase();if(!e[y]){if(e[y]=this,"img"===i){if(this.isImg=!0,t=e.getAttribute("src")||"",this.originalUrl=t,!t)return;t=e.src}else"canvas"===i&&window.HTMLCanvasElement&&(t=e.toDataURL());this.load(t)}}},{key:"load",value:function(t){var e=this;if(t){this.url=t,this.imageData={};var i=this.element,o=this.options;if(o.rotatable||o.scalable||(o.checkOrientation=!1),o.checkOrientation&&window.ArrayBuffer)if(at.test(t))ct.test(t)?this.read(re(t)):this.clone();else{var n=new XMLHttpRequest,r=this.clone.bind(this);this.reloading=!0,this.xhr=n,n.onabort=r,n.onerror=r,n.ontimeout=r,n.onprogress=function(){n.getResponseHeader("content-type")!==rt&&n.abort()},n.onload=function(){e.read(n.response)},n.onloadend=function(){e.reloading=!1,e.xhr=null},o.checkCrossOrigin&&Kt(t)&&i.crossOrigin&&(t=Vt(t)),n.open("GET",t,!0),n.responseType="arraybuffer",n.withCredentials="use-credentials"===i.crossOrigin,n.send()}else this.clone()}}},{key:"read",value:function(t){var e=this.options,i=this.imageData,o=ae(t),n=0,r=1,s=1;if(o>1){this.url=se(t,rt);var a=ce(o);n=a.rotate,r=a.scaleX,s=a.scaleY}e.rotatable&&(i.rotate=n),e.scalable&&(i.scaleX=r,i.scaleY=s),this.clone()}},{key:"clone",value:function(){var t=this.element,e=this.url,i=t.crossOrigin,o=e;this.options.checkCrossOrigin&&Kt(e)&&(i||(i="anonymous"),o=Vt(e)),this.crossOrigin=i,this.crossOriginUrl=o;var n=document.createElement("img");i&&(n.crossOrigin=i),n.src=o||e,n.alt=t.alt||"The image to crop",this.image=n,n.onload=this.start.bind(this),n.onerror=this.stop.bind(this),Mt(n,L),t.parentNode.insertBefore(n,t.nextSibling)}},{key:"start",value:function(){var t=this,e=this.image;e.onload=null,e.onerror=null,this.sizing=!0;var i=g.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(g.navigator.userAgent),o=function(e,i){Tt(t.imageData,{naturalWidth:e,naturalHeight:i,aspectRatio:e/i}),t.initialImageData=Tt({},t.imageData),t.sizing=!1,t.sized=!0,t.build()};if(!e.naturalWidth||i){var n=document.createElement("img"),r=document.body||document.documentElement;this.sizingImage=n,n.onload=function(){o(n.width,n.height),i||r.removeChild(n)},n.src=e.src,i||(n.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",r.appendChild(n))}else o(e.naturalWidth,e.naturalHeight)}},{key:"stop",value:function(){var t=this.image;t.onload=null,t.onerror=null,t.parentNode.removeChild(t),this.image=null}},{key:"build",value:function(){if(this.sized&&!this.ready){var t=this.element,e=this.options,i=this.image,o=t.parentNode,n=document.createElement("div");n.innerHTML=mt;var r=n.querySelector(".".concat(y,"-container")),s=r.querySelector(".".concat(y,"-canvas")),a=r.querySelector(".".concat(y,"-drag-box")),c=r.querySelector(".".concat(y,"-crop-box")),h=c.querySelector(".".concat(y,"-face"));this.container=o,this.cropper=r,this.canvas=s,this.dragBox=a,this.cropBox=c,this.viewBox=r.querySelector(".".concat(y,"-view-box")),this.face=h,s.appendChild(i),Mt(t,I),o.insertBefore(r,t.nextSibling),Rt(i,L),this.initPreview(),this.bind(),e.initialAspectRatio=Math.max(0,e.initialAspectRatio)||NaN,e.aspectRatio=Math.max(0,e.aspectRatio)||NaN,e.viewMode=Math.max(0,Math.min(3,Math.round(e.viewMode)))||0,Mt(c,I),e.guides||Mt(c.getElementsByClassName("".concat(y,"-dashed")),I),e.center||Mt(c.getElementsByClassName("".concat(y,"-center")),I),e.background&&Mt(r,"".concat(y,"-bg")),e.highlight||Mt(h,j),e.cropBoxMovable&&(Mt(h,P),Ht(h,q,w)),e.cropBoxResizable||(Mt(c.getElementsByClassName("".concat(y,"-line")),I),Mt(c.getElementsByClassName("".concat(y,"-point")),I)),this.render(),this.ready=!0,this.setDragMode(e.dragMode),e.autoCrop&&this.crop(),this.setData(e.data),xt(e.ready)&&zt(t,et,e.ready,{once:!0}),Wt(t,et)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var t=this.cropper.parentNode;t&&t.removeChild(this.cropper),Rt(this.element,I)}}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],[{key:"noConflict",value:function(){return window.Cropper=fe,t}},{key:"setDefaults",value:function(t){Tt(dt,wt(t)&&t)}}])}();return Tt(ge.prototype,he,le,ue,de,me,pe),ge}()},35185:(t,e,i)=>{"use strict";i.d(e,{I:()=>u});var o=i(29183),n=i.n(o),r=i(67186),s=i.n(r),a=function(){return a=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},a.apply(this,arguments)};function c(t,e){var i={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(i[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(t);n<o.length;n++)e.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(t,o[n])&&(i[o[n]]=t[o[n]])}return i}var h=["aspectRatio","autoCrop","autoCropArea","background","center","checkCrossOrigin","checkOrientation","cropBoxMovable","cropBoxResizable","data","dragMode","guides","highlight","initialAspectRatio","minCanvasHeight","minCanvasWidth","minContainerHeight","minContainerWidth","minCropBoxHeight","minCropBoxWidth","modal","movable","preview","responsive","restore","rotatable","scalable","toggleDragModeOnDblclick","viewMode","wheelZoomRatio","zoomOnTouch","zoomOnWheel","zoomable","cropstart","cropmove","cropend","crop","zoom","ready"],l={opacity:0,maxWidth:"100%"},u=n().forwardRef((function(t,e){var i=c(t,[]),r=i.dragMode,u=void 0===r?"crop":r,d=i.src,m=i.style,p=i.className,f=i.crossOrigin,g=i.scaleX,v=i.scaleY,b=i.enable,y=i.zoomTo,w=i.rotateTo,x=i.alt,k=void 0===x?"picture":x,C=i.ready,S=i.onInitialized,T=c(i,["dragMode","src","style","className","crossOrigin","scaleX","scaleY","enable","zoomTo","rotateTo","alt","ready","onInitialized"]),E={scaleY:v,scaleX:g,enable:b,zoomTo:y,rotateTo:w},_=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var i=(0,o.useRef)(null);return n().useEffect((function(){t.forEach((function(t){t&&("function"==typeof t?t(i.current):t.current=i.current)}))}),[t]),i}(e,(0,o.useRef)(null));(0,o.useEffect)((function(){var t;(null===(t=_.current)||void 0===t?void 0:t.cropper)&&"number"==typeof y&&_.current.cropper.zoomTo(y)}),[i.zoomTo]),(0,o.useEffect)((function(){var t;(null===(t=_.current)||void 0===t?void 0:t.cropper)&&void 0!==d&&_.current.cropper.reset().clear().replace(d)}),[d]),(0,o.useEffect)((function(){if(null!==_.current){var t=new(s())(_.current,a(a({dragMode:u},T),{ready:function(t){null!==t.currentTarget&&function(t,e){void 0===e&&(e={});var i=e.enable,o=void 0===i||i,n=e.scaleX,r=void 0===n?1:n,s=e.scaleY,a=void 0===s?1:s,c=e.zoomTo,h=void 0===c?0:c,l=e.rotateTo;o?t.enable():t.disable(),t.scaleX(r),t.scaleY(a),void 0!==l&&t.rotateTo(l),h>0&&t.zoomTo(h)}(t.currentTarget.cropper,E),C&&C(t)}}));S&&S(t)}return function(){var t,e;null===(e=null===(t=_.current)||void 0===t?void 0:t.cropper)||void 0===e||e.destroy()}}),[_]);var O=function(t){return h.reduce((function(t,e){var i=t,o=e;return i[o],c(i,["symbol"==typeof o?o:o+""])}),t)}(a(a({},T),{crossOrigin:f,src:d,alt:k}));return n().createElement("div",{style:m,className:p},n().createElement("img",a({},O,{style:l,ref:_})))}))},4473:(t,e,i)=>{"use strict";function o(t,e){if(!{}.hasOwnProperty.call(t,e))throw new TypeError("attempted to use private field on non-instance");return t}i.d(e,{A:()=>o})},68341:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});var o=0;function n(t){return"__private_"+o+++"_"+t}},603:(t,e,i)=>{"use strict";i.d(e,{jI:()=>j});var o=i(29183);function n(){return(n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(t[o]=i[o])}return t}).apply(this,arguments)}function r(t,e){if(null==t)return{};var i,o,n={},r=Object.keys(t);for(o=0;o<r.length;o++)e.indexOf(i=r[o])>=0||(n[i]=t[i]);return n}function s(t){var e=(0,o.useRef)(t),i=(0,o.useRef)((function(t){e.current&&e.current(t)}));return e.current=t,i.current}var a=function(t,e,i){return void 0===e&&(e=0),void 0===i&&(i=1),t>i?i:t<e?e:t},c=function(t){return"touches"in t},h=function(t){return t&&t.ownerDocument.defaultView||self},l=function(t,e,i){var o=t.getBoundingClientRect(),n=c(e)?function(t,e){for(var i=0;i<t.length;i++)if(t[i].identifier===e)return t[i];return t[0]}(e.touches,i):e;return{left:a((n.pageX-(o.left+h(t).pageXOffset))/o.width),top:a((n.pageY-(o.top+h(t).pageYOffset))/o.height)}},u=function(t){!c(t)&&t.preventDefault()},d=o.memo((function(t){var e=t.onMove,i=t.onKey,a=r(t,["onMove","onKey"]),d=(0,o.useRef)(null),m=s(e),p=s(i),f=(0,o.useRef)(null),g=(0,o.useRef)(!1),v=(0,o.useMemo)((function(){var t=function(t){u(t),(c(t)?t.touches.length>0:t.buttons>0)&&d.current?m(l(d.current,t,f.current)):i(!1)},e=function(){return i(!1)};function i(i){var o=g.current,n=h(d.current),r=i?n.addEventListener:n.removeEventListener;r(o?"touchmove":"mousemove",t),r(o?"touchend":"mouseup",e)}return[function(t){var e=t.nativeEvent,o=d.current;if(o&&(u(e),!function(t,e){return e&&!c(t)}(e,g.current)&&o)){if(c(e)){g.current=!0;var n=e.changedTouches||[];n.length&&(f.current=n[0].identifier)}o.focus(),m(l(o,e,f.current)),i(!0)}},function(t){var e=t.which||t.keyCode;e<37||e>40||(t.preventDefault(),p({left:39===e?.05:37===e?-.05:0,top:40===e?.05:38===e?-.05:0}))},i]}),[p,m]),b=v[0],y=v[1],w=v[2];return(0,o.useEffect)((function(){return w}),[w]),o.createElement("div",n({},a,{onTouchStart:b,onMouseDown:b,className:"react-colorful__interactive",ref:d,onKeyDown:y,tabIndex:0,role:"slider"}))})),m=function(t){return t.filter(Boolean).join(" ")},p=function(t){var e=t.color,i=t.left,n=t.top,r=void 0===n?.5:n,s=m(["react-colorful__pointer",t.className]);return o.createElement("div",{className:s,style:{top:100*r+"%",left:100*i+"%"}},o.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:e}}))},f=function(t,e,i){return void 0===e&&(e=0),void 0===i&&(i=Math.pow(10,e)),Math.round(i*t)/i},g=(Math.PI,function(t){return S(v(t))}),v=function(t){return"#"===t[0]&&(t=t.substring(1)),t.length<6?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:4===t.length?f(parseInt(t[3]+t[3],16)/255,2):1}:{r:parseInt(t.substring(0,2),16),g:parseInt(t.substring(2,4),16),b:parseInt(t.substring(4,6),16),a:8===t.length?f(parseInt(t.substring(6,8),16)/255,2):1}},b=function(t){return C(x(t))},y=function(t){var e=t.s,i=t.v,o=t.a,n=(200-e)*i/100;return{h:f(t.h),s:f(n>0&&n<200?e*i/100/(n<=100?n:200-n)*100:0),l:f(n/2),a:f(o,2)}},w=function(t){var e=y(t);return"hsl("+e.h+", "+e.s+"%, "+e.l+"%)"},x=function(t){var e=t.h,i=t.s,o=t.v,n=t.a;e=e/360*6,i/=100,o/=100;var r=Math.floor(e),s=o*(1-i),a=o*(1-(e-r)*i),c=o*(1-(1-e+r)*i),h=r%6;return{r:f(255*[o,a,s,s,c,o][h]),g:f(255*[c,o,o,a,s,s][h]),b:f(255*[s,s,c,o,o,a][h]),a:f(n,2)}},k=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},C=function(t){var e=t.r,i=t.g,o=t.b,n=t.a,r=n<1?k(f(255*n)):"";return"#"+k(e)+k(i)+k(o)+r},S=function(t){var e=t.r,i=t.g,o=t.b,n=t.a,r=Math.max(e,i,o),s=r-Math.min(e,i,o),a=s?r===e?(i-o)/s:r===i?2+(o-e)/s:4+(e-i)/s:0;return{h:f(60*(a<0?a+6:a)),s:f(r?s/r*100:0),v:f(r/255*100),a:n}},T=o.memo((function(t){var e=t.hue,i=t.onChange,n=m(["react-colorful__hue",t.className]);return o.createElement("div",{className:n},o.createElement(d,{onMove:function(t){i({h:360*t.left})},onKey:function(t){i({h:a(e+360*t.left,0,360)})},"aria-label":"Hue","aria-valuenow":f(e),"aria-valuemax":"360","aria-valuemin":"0"},o.createElement(p,{className:"react-colorful__hue-pointer",left:e/360,color:w({h:e,s:100,v:100,a:1})})))})),E=o.memo((function(t){var e=t.hsva,i=t.onChange,n={backgroundColor:w({h:e.h,s:100,v:100,a:1})};return o.createElement("div",{className:"react-colorful__saturation",style:n},o.createElement(d,{onMove:function(t){i({s:100*t.left,v:100-100*t.top})},onKey:function(t){i({s:a(e.s+100*t.left,0,100),v:a(e.v-100*t.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+f(e.s)+"%, Brightness "+f(e.v)+"%"},o.createElement(p,{className:"react-colorful__saturation-pointer",top:1-e.v/100,left:e.s/100,color:w(e)})))})),_=function(t,e){if(t===e)return!0;for(var i in t)if(t[i]!==e[i])return!1;return!0},O=function(t,e){return t.toLowerCase()===e.toLowerCase()||_(v(t),v(e))};function D(t,e,i){var n=s(i),r=(0,o.useState)((function(){return t.toHsva(e)})),a=r[0],c=r[1],h=(0,o.useRef)({color:e,hsva:a});(0,o.useEffect)((function(){if(!t.equal(e,h.current.color)){var i=t.toHsva(e);h.current={hsva:i,color:e},c(i)}}),[e,t]),(0,o.useEffect)((function(){var e;_(a,h.current.hsva)||t.equal(e=t.fromHsva(a),h.current.color)||(h.current={hsva:a,color:e},n(e))}),[a,t,n]);var l=(0,o.useCallback)((function(t){c((function(e){return Object.assign({},e,t)}))}),[]);return[a,l]}var A,M="undefined"!=typeof window?o.useLayoutEffect:o.useEffect,R=new Map,N=function(t){M((function(){var e=t.current?t.current.ownerDocument:document;if(void 0!==e&&!R.has(e)){var o=e.createElement("style");o.innerHTML='.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',R.set(e,o);var n=A||i.nc;n&&o.setAttribute("nonce",n),e.head.appendChild(o)}}),[])},I=function(t){var e=t.className,i=t.colorModel,s=t.color,a=void 0===s?i.defaultColor:s,c=t.onChange,h=r(t,["className","colorModel","color","onChange"]),l=(0,o.useRef)(null);N(l);var u=D(i,a,c),d=u[0],p=u[1],f=m(["react-colorful",e]);return o.createElement("div",n({},h,{ref:l,className:f}),o.createElement(E,{hsva:d,onChange:p}),o.createElement(T,{hue:d.h,onChange:p,className:"react-colorful__last-control"}))},L={defaultColor:"000",toHsva:g,fromHsva:function(t){return b({h:t.h,s:t.s,v:t.v,a:1})},equal:O},j=function(t){return o.createElement(I,n({},t,{colorModel:L}))}},50783:(t,e,i)=>{"use strict";i.d(e,{A:()=>O});var o=i(89379),n=i(29183),r=i(53986);const s=["key","level"];var a=t=>"string"!==typeof t?{}:t.split(/ ?; ?/).reduce(((t,e)=>{const[i,o]=e.split(/ ?: ?/).map(((t,e)=>0===e?t.replace(/\s+/g,""):t.trim()));if(i&&o){const e=i.replace(/(\w)-(\w)/g,((t,e,i)=>"".concat(e).concat(i.toUpperCase())));let n=o.trim();Number.isNaN(Number(o))||(n=Number(o)),t[i.startsWith("-")?i:e]=n}return t}),{});var c=["br","col","colgroup","dl","hr","iframe","img","input","link","menuitem","meta","ol","param","select","table","tbody","tfoot","thead","tr","ul","wbr"],h={"accept-charset":"acceptCharset",acceptcharset:"acceptCharset",accesskey:"accessKey",allowfullscreen:"allowFullScreen",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",cellpadding:"cellPadding",cellspacing:"cellSpacing",charset:"charSet",class:"className",classid:"classID",classname:"className",colspan:"colSpan",contenteditable:"contentEditable",contextmenu:"contextMenu",controlslist:"controlsList",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",datetime:"dateTime",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",enctype:"encType",for:"htmlFor",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",innerhtml:"innerHTML",inputmode:"inputMode",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",marginwidth:"marginWidth",marginheight:"marginHeight",maxlength:"maxLength",mediagroup:"mediaGroup",minlength:"minLength",nomodule:"noModule",novalidate:"noValidate",playsinline:"playsInline",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rowspan:"rowSpan",spellcheck:"spellCheck",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex",typemustmatch:"typeMustMatch",usemap:"useMap",accentheight:"accentHeight","accent-height":"accentHeight",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",arabicform:"arabicForm","arabic-form":"arabicForm",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",diffuseconstant:"diffuseConstant",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",edgemode:"edgeMode",enablebackground:"enableBackground","enable-background":"enableBackground",externalresourcesrequired:"externalResourcesRequired",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",imagerendering:"imageRendering","image-rendering":"imageRendering",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",vmathematical:"vMathematical","v-mathematical":"vMathematical",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan",onblur:"onBlur",onchange:"onChange",onclick:"onClick",oncontextmenu:"onContextMenu",ondoubleclick:"onDoubleClick",ondrag:"onDrag",ondragend:"onDragEnd",ondragenter:"onDragEnter",ondragexit:"onDragExit",ondragleave:"onDragLeave",ondragover:"onDragOver",ondragstart:"onDragStart",ondrop:"onDrop",onerror:"onError",onfocus:"onFocus",oninput:"onInput",oninvalid:"onInvalid",onkeydown:"onKeyDown",onkeypress:"onKeyPress",onkeyup:"onKeyUp",onload:"onLoad",onmousedown:"onMouseDown",onmouseenter:"onMouseEnter",onmouseleave:"onMouseLeave",onmousemove:"onMouseMove",onmouseout:"onMouseOut",onmouseover:"onMouseOver",onmouseup:"onMouseUp",onscroll:"onScroll",onsubmit:"onSubmit",ontouchcancel:"onTouchCancel",ontouchend:"onTouchEnd",ontouchmove:"onTouchMove",ontouchstart:"onTouchStart",onwheel:"onWheel"};function l(t,e){const{key:i,level:o}=e,l=(0,r.A)(e,s);switch(t.nodeType){case 1:return n.createElement(function(t){if(/[a-z]+[A-Z]+[a-z]+/.test(t))return t;return t.toLowerCase()}(t.nodeName),function(t,e){const i={key:e};if(t instanceof Element){const e=t.getAttribute("class");e&&(i.className=e),[...t.attributes].forEach((t=>{switch(t.name){case"class":break;case"style":i[t.name]=a(t.value);break;case"allowfullscreen":case"allowpaymentrequest":case"async":case"autofocus":case"autoplay":case"checked":case"controls":case"default":case"defer":case"disabled":case"formnovalidate":case"hidden":case"ismap":case"itemscope":case"loop":case"multiple":case"muted":case"nomodule":case"novalidate":case"open":case"readonly":case"required":case"reversed":case"selected":case"typemustmatch":i[h[t.name]||t.name]=!0;break;default:i[h[t.name]||t.name]=t.value}}))}return i}(t,i),u(t.childNodes,o,l));case 3:{var d,m;const e=null!==(d=null===(m=t.nodeValue)||void 0===m?void 0:m.toString())&&void 0!==d?d:"";if(!l.allowWhiteSpaces&&/^\s+$/.test(e)&&!/[\u00A0\u202F]/.test(e))return null;if(!t.parentNode)return e;const i=t.parentNode.nodeName.toLowerCase();return c.includes(i)?(/\S/.test(e)&&console.warn("A textNode is not allowed inside '".concat(i,"'. Your text \"").concat(e,'" will be ignored')),null):e}case 8:default:return null;case 11:return u(t.childNodes,o,e)}}function u(t,e,i){const n=[...t].map(((t,n)=>d(t,(0,o.A)((0,o.A)({},i),{},{index:n,level:e+1})))).filter(Boolean);return n.length?n:null}function d(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t||!(t instanceof Node))return null;const{actions:i=[],index:n=0,level:r=0,randomKey:s}=e;let a=t,c="".concat(r,"-").concat(n);const h=[];return s&&0===r&&(c="".concat(function(){const t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";let e="";for(let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:6;i>0;--i)e+=t[Math.round(61*Math.random())];return e}(),"-").concat(c)),Array.isArray(i)&&i.forEach((e=>{e.condition(a,c,r)&&("function"===typeof e.pre&&(a=e.pre(a,c,r),a instanceof Node||(a=t)),"function"===typeof e.post&&h.push(e.post(a,c,r)))})),h.length?h:l(a,(0,o.A)({key:c,level:r},e))}function m(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"===typeof t?function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t||"string"!==typeof t)return null;const{includeAllNodes:i=!1,nodeOnly:o=!1,selector:n="body > *",type:r="text/html"}=e;try{const s=(new DOMParser).parseFromString(t,r);if(i){const{childNodes:t}=s.body;return o?t:[...t].map((t=>d(t,e)))}const a=s.querySelector(n)||s.body.childNodes[0];if(!(a instanceof Node))throw new TypeError("Error parsing input");return o?a:d(a,e)}catch(s){}return null}(t,e):t instanceof Node?d(t,e):null}var p=Object.defineProperty,f=(t,e,i)=>((t,e,i)=>e in t?p(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i)(t,"symbol"!==typeof e?e+"":e,i),g="react-inlinesvg",v={IDLE:"idle",LOADING:"loading",LOADED:"loaded",FAILED:"failed",READY:"ready",UNSUPPORTED:"unsupported"};function b(){return!("undefined"===typeof window||!window.document||!window.document.createElement)}function y(){return function(){if(!document)return!1;const t=document.createElement("div");t.innerHTML="<svg />";const e=t.firstChild;return!!e&&"http://www.w3.org/2000/svg"===e.namespaceURI}()&&"undefined"!==typeof window&&null!==window}async function w(t,e){const i=await fetch(t,e),o=i.headers.get("content-type"),[n]=(null!==o&&void 0!==o?o:"").split(/ ?; ?/);if(i.status>299)throw new Error("Not found");if(!["image/svg+xml","text/plain"].some((t=>n.includes(t))))throw new Error("Content type isn't valid: ".concat(n));return i.text()}function x(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return new Promise((e=>{setTimeout(e,1e3*t)}))}var k,C=class{constructor(){f(this,"cacheApi"),f(this,"cacheStore"),f(this,"subscribers",[]),f(this,"isReady",!1),this.cacheStore=new Map;let t=g,e=!1;var i;b()&&(t=null!==(i=window.REACT_INLINESVG_CACHE_NAME)&&void 0!==i?i:g,e=!!window.REACT_INLINESVG_PERSISTENT_CACHE&&"caches"in window);e?caches.open(t).then((t=>{this.cacheApi=t})).catch((t=>{console.error("Failed to open cache: ".concat(t.message))})).finally((()=>{this.isReady=!0,this.subscribers.forEach((t=>t()))})):this.isReady=!0}onReady(t){this.isReady?t():this.subscribers.push(t)}async get(t,e){var i,o;return await(this.cacheApi?this.fetchAndAddToPersistentCache(t,e):this.fetchAndAddToInternalCache(t,e)),null!==(i=null===(o=this.cacheStore.get(t))||void 0===o?void 0:o.content)&&void 0!==i?i:""}set(t,e){this.cacheStore.set(t,e)}isCached(t){var e;return(null===(e=this.cacheStore.get(t))||void 0===e?void 0:e.status)===v.LOADED}async fetchAndAddToInternalCache(t,e){const i=this.cacheStore.get(t);if((null===i||void 0===i?void 0:i.status)!==v.LOADING){if(null===i||void 0===i||!i.content){this.cacheStore.set(t,{content:"",status:v.LOADING});try{const i=await w(t,e);this.cacheStore.set(t,{content:i,status:v.LOADED})}catch(o){throw this.cacheStore.set(t,{content:"",status:v.FAILED}),o}}}else await this.handleLoading(t,(async()=>{this.cacheStore.set(t,{content:"",status:v.IDLE}),await this.fetchAndAddToInternalCache(t,e)}))}async fetchAndAddToPersistentCache(t,e){var i;const o=this.cacheStore.get(t);if((null===o||void 0===o?void 0:o.status)===v.LOADED)return;if((null===o||void 0===o?void 0:o.status)===v.LOADING)return void await this.handleLoading(t,(async()=>{this.cacheStore.set(t,{content:"",status:v.IDLE}),await this.fetchAndAddToPersistentCache(t,e)}));this.cacheStore.set(t,{content:"",status:v.LOADING});const n=await(null===(i=this.cacheApi)||void 0===i?void 0:i.match(t));if(n){const e=await n.text();this.cacheStore.set(t,{content:e,status:v.LOADED})}else try{var r,s,a;await(null===(r=this.cacheApi)||void 0===r?void 0:r.add(new Request(t,e)));const i=await(null===(s=this.cacheApi)||void 0===s?void 0:s.match(t)),o=null!==(a=await(null===i||void 0===i?void 0:i.text()))&&void 0!==a?a:"";this.cacheStore.set(t,{content:o,status:v.LOADED})}catch(c){throw this.cacheStore.set(t,{content:"",status:v.FAILED}),c}}async handleLoading(t,e){let i=0;for(;(null===(o=this.cacheStore.get(t))||void 0===o?void 0:o.status)===v.LOADING&&i<10;){var o;await x(.1),i+=1}i>=10&&await e()}keys(){return[...this.cacheStore.keys()]}data(){return[...this.cacheStore.entries()].map((t=>{let[e,i]=t;return{[e]:i}}))}async delete(t){this.cacheApi&&await this.cacheApi.delete(t),this.cacheStore.delete(t)}async clear(){if(this.cacheApi){const t=await this.cacheApi.keys();for(const e of t)await this.cacheApi.delete(e)}this.cacheStore.clear()}};function S(t){const e=(0,n.useRef)();return(0,n.useEffect)((()=>{e.current=t})),e.current}function T(t){const{baseURL:e,content:i,description:o,handleError:n,hash:r,preProcessor:s,title:a,uniquifyIDs:c=!1}=t;try{const t=function(t,e){if(e)return e(t);return t}(i,s),n=m(t,{nodeOnly:!0});if(!n||!(n instanceof SVGSVGElement))throw new Error("Could not convert the src to a DOM Node");const h=E(n,{baseURL:e,hash:r,uniquifyIDs:c});if(o){const t=h.querySelector("desc");null!==t&&void 0!==t&&t.parentNode&&t.parentNode.removeChild(t);const e=document.createElementNS("http://www.w3.org/2000/svg","desc");e.innerHTML=o,h.prepend(e)}if("undefined"!==typeof a){const t=h.querySelector("title");if(null!==t&&void 0!==t&&t.parentNode&&t.parentNode.removeChild(t),a){const t=document.createElementNS("http://www.w3.org/2000/svg","title");t.innerHTML=a,h.prepend(t)}}return h}catch(h){return n(h)}}function E(t,e){const{baseURL:i="",hash:o,uniquifyIDs:n}=e,r=["id","href","xlink:href","xlink:role","xlink:arcrole"],s=["href","xlink:href"];return n?([...t.children].forEach((t=>{var n;if(null!==(n=t.attributes)&&void 0!==n&&n.length){const e=Object.values(t.attributes).map((t=>{const e=t,n=/url\((.*?)\)/.exec(t.value);return null!==n&&void 0!==n&&n[1]&&(e.value=t.value.replace(n[0],"url(".concat(i).concat(n[1],"__").concat(o,")"))),e}));r.forEach((t=>{const i=e.find((e=>e.name===t));var n,r;i&&(n=t,r=i.value,!s.includes(n)||!r||r.includes("#"))&&(i.value="".concat(i.value,"__").concat(o))}))}return t.children.length?E(t,e):t})),t):t}function _(t){const{cacheRequests:e=!0,children:i=null,description:r,fetchOptions:s,innerRef:a,loader:c=null,onError:h,onLoad:l,src:u,title:d,uniqueHash:p}=t,[f,g]=(0,n.useReducer)(((t,e)=>(0,o.A)((0,o.A)({},t),e)),{content:"",element:null,isCached:e&&k.isCached(t.src),status:v.IDLE}),{content:x,element:C,isCached:E,status:_}=f,O=S(t),D=S(f),A=(0,n.useRef)(null!==p&&void 0!==p?p:function(t){const e="abcdefghijklmnopqrstuvwxyz",i="".concat(e).concat(e.toUpperCase()).concat("1234567890");let o="";for(let r=0;r<t;r++)o+=(n=i)[Math.floor(Math.random()*n.length)];var n;return o}(8)),M=(0,n.useRef)(!1),R=(0,n.useRef)(!1),N=(0,n.useCallback)((t=>{M.current&&(g({status:"Browser does not support SVG"===t.message?v.UNSUPPORTED:v.FAILED}),null===h||void 0===h||h(t))}),[h]),I=(0,n.useCallback)((function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];M.current&&g({content:t,isCached:e,status:v.LOADED})}),[]),L=(0,n.useCallback)((async()=>{const t=await w(u,s);I(t)}),[s,I,u]),j=(0,n.useCallback)((()=>{try{const e=m(T((0,o.A)((0,o.A)({},t),{},{handleError:N,hash:A.current,content:x})));if(!e||!(0,n.isValidElement)(e))throw new Error("Could not convert the src to a React element");g({element:e,status:v.READY})}catch(e){N(new Error(e.message))}}),[x,N,t]),H=(0,n.useCallback)((async()=>{const t=/^data:image\/svg(?:[\0-\+\x2D-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?(;base64)?,((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)/.exec(u);let i;if(t?i=t[1]?window.atob(t[2]):decodeURIComponent(t[2]):u.includes("<svg")&&(i=u),i)I(i);else try{if(e){const t=await k.get(u,s);I(t,!0)}else await L()}catch(o){N(o)}}),[e,L,s,N,I,u]),P=(0,n.useCallback)((async()=>{M.current&&g({content:"",element:null,isCached:!1,status:v.LOADING})}),[]);(0,n.useEffect)((()=>{if(M.current=!0,!b()||R.current)return()=>{};try{if(_===v.IDLE){if(!y())throw new Error("Browser does not support SVG");if(!u)throw new Error("Missing src");P()}}catch(t){N(t)}return R.current=!0,()=>{M.current=!1}}),[]),(0,n.useEffect)((()=>{if(b()&&O)if(O.src!==u){if(!u)return void N(new Error("Missing src"));P()}else O.title===d&&O.description===r||j()}),[r,j,N,P,O,u,d]),(0,n.useEffect)((()=>{D&&(D.status!==v.LOADING&&_===v.LOADING&&H(),D.status!==v.LOADED&&_===v.LOADED&&j(),D.status!==v.READY&&_===v.READY&&(null===l||void 0===l||l(u,E)))}),[H,j,E,l,D,u,_]);const q=function(t){const e={};for(var i=arguments.length,o=new Array(i>1?i-1:0),n=1;n<i;n++)o[n-1]=arguments[n];for(const r in t)({}).hasOwnProperty.call(t,r)&&(o.includes(r)||(e[r]=t[r]));return e}(t,"baseURL","cacheRequests","children","description","fetchOptions","innerRef","loader","onError","onLoad","preProcessor","src","title","uniqueHash","uniquifyIDs");return b()?C?(0,n.cloneElement)(C,(0,o.A)({ref:a},q)):[v.UNSUPPORTED,v.FAILED].includes(_)?i:c:c}function O(t){k||(k=new C);const{loader:e}=t,i=(0,n.useRef)(!1),[r,s]=(0,n.useState)(k.isReady);return(0,n.useEffect)((()=>{i.current||(k.onReady((()=>{s(!0)})),i.current=!0)}),[]),r?n.createElement(_,(0,o.A)({},t)):e}},23040:(t,e,i)=>{"use strict";i.d(e,{wz:()=>f,Ng:()=>p,Sr:()=>n,fq:()=>d,Gd:()=>o});var o,n,r=i(89379),s=i(64467);function a(t){var e;return null!==(e=null===t||void 0===t?void 0:t.rows.map((t=>t.value)).filter((t=>!!t)))&&void 0!==e?e:[]}function c(t){var e;return null!==(e=t)&&void 0!==e&&e.startsWith("system.host.")||(t="system.host.".concat(t)),t}function h(t){var e;return null!==(e=t)&&void 0!==e&&e.startsWith("system.host.")&&(t=t.substring(12)),t}function l(t){return new Promise((e=>{setTimeout(e,t)}))}function u(t){const e="*"===(t=(t||"").toString())[0],i="*"===t[t.length-1];return(e?"":"^")+(t=t.replace(/[-/\\^$+?.()|[\]{}]/g,"\\$&").replace(/\*/g,".*"))+(i?"":"$")}!function(t){t[t.CONNECTING=0]="CONNECTING",t[t.CONNECTED=1]="CONNECTED",t[t.OBJECTS_LOADED=2]="OBJECTS_LOADED",t[t.READY=3]="READY"}(o||(o={})),function(t){t.PERMISSION_ERROR="permissionError",t.NOT_CONNECTED="notConnectedError",t.TIMEOUT="timeout",t.NOT_ADMIN="Allowed only in admin",t.NOT_SUPPORTED="Not supported"}(n||(n={}));const d=n.PERMISSION_ERROR,m=(n.NOT_CONNECTED,["material","echarts","vis"]);class p{constructor(t){(0,s.A)(this,"props",void 0),(0,s.A)(this,"ignoreState",""),(0,s.A)(this,"connected",!1),(0,s.A)(this,"subscribed",!1),(0,s.A)(this,"firstConnect",!0),(0,s.A)(this,"waitForRestart",!1),(0,s.A)(this,"loaded",!1),(0,s.A)(this,"simStates",{}),(0,s.A)(this,"statesSubscribes",{}),(0,s.A)(this,"filesSubscribes",{}),(0,s.A)(this,"objectsSubscribes",{}),(0,s.A)(this,"objects",{}),(0,s.A)(this,"states",{}),(0,s.A)(this,"acl",null),(0,s.A)(this,"isSecure",!1),(0,s.A)(this,"onReadyDone",!1),(0,s.A)(this,"onConnectionHandlers",[]),(0,s.A)(this,"onLogHandlers",[]),(0,s.A)(this,"onCmdStdoutHandler",void 0),(0,s.A)(this,"onCmdStderrHandler",void 0),(0,s.A)(this,"onCmdExitHandler",void 0),(0,s.A)(this,"_socket",void 0),(0,s.A)(this,"_waitForSocketPromise",void 0),(0,s.A)(this,"_waitForFirstConnectionPromise",function(){let t,e;const i=new Promise(((i,o)=>{t=i,e=o}));return i.resolve=t,i.reject=e,i}()),(0,s.A)(this,"_instanceSubscriptions",{}),(0,s.A)(this,"_promises",{}),(0,s.A)(this,"_authTimer",void 0),(0,s.A)(this,"_systemConfig",void 0),(0,s.A)(this,"systemLang","en"),this.props=this.applyDefaultProps(t),this.waitForSocketLib().then((()=>this.startSocket())).catch((t=>{alert("Socket connection could not be initialized: ".concat(t))}))}applyDefaultProps(t){var e,i,o,n;return(0,r.A)((0,r.A)({},t),{},{protocol:t.protocol||window.location.protocol,host:t.host||window.location.hostname,port:t.port||("3000"===window.location.port?8081:window.location.port),ioTimeout:Math.max(t.ioTimeout||2e4,2e4),cmdTimeout:Math.max(t.cmdTimeout||5e3,5e3),admin5only:t.admin5only||!1,autoSubscribes:null!==(e=t.autoSubscribes)&&void 0!==e?e:[],autoSubscribeLog:null!==(i=t.autoSubscribeLog)&&void 0!==i&&i,doNotLoadACL:null===(o=t.doNotLoadACL)||void 0===o||o,doNotLoadAllObjects:null===(n=t.doNotLoadAllObjects)||void 0===n||n})}onError(t){var e;(null!==(e=this.props.onError)&&void 0!==e?e:console.error)(t)}get systemConfig(){return this._systemConfig}static isWeb(){return void 0!==window.socketUrl}waitForSocketLib(){return this._waitForSocketPromise||(this._waitForSocketPromise=new Promise((async(t,e)=>{if("undefined"===typeof window.io&&"undefined"===typeof window.iob)if("function"===typeof window.registerSocketOnLoad)window.registerSocketOnLoad((()=>t()));else{for(let e=1;e<=30;e++){if(window.io||window.iob)return t();await l(100)}e(new Error("Socket library could not be loaded!"))}else t()}))),this._waitForSocketPromise}async startSocket(){if(this._socket)return;let t=this.props.host,e=this.props.port,i=(this.props.protocol||window.location.protocol).replace(":",""),n=window.location.pathname;if("iobroker.net"===window.location.hostname||"iobroker.pro"===window.location.hostname)n="";else{if(window.socketUrl){const o=new URL(window.socketUrl);t=o.hostname,e=o.port,i=o.protocol.replace(":","")}const o=n.lastIndexOf("/");if(-1!==o&&(n=n.substring(0,o+1)),p.isWeb()){const t=n.split("/");t.length>2&&(t.pop(),t.pop(),m.includes(t[t.length-1])&&t.pop(),n=t.join("/"),n.endsWith("/")||(n+="/"))}}const r=e?"".concat(i,"://").concat(t,":").concat(e):"".concat(i,"://").concat(t);return this._socket=(window.io||window.iob).connect(r,{path:n.endsWith("/")?"".concat(n,"socket.io"):"".concat(n,"/socket.io"),query:"ws=true",name:this.props.name,timeout:this.props.ioTimeout,uuid:this.props.uuid,token:this.props.token}),this._socket.on("connect",(t=>{this.onReadyDone=!1,!0!==t?(this.connected=!0,setTimeout((()=>this.getVersion().then((t=>{const[e,i,o]=t.version.split(".");1e4*parseInt(e,10)+100*parseInt(i,10)+parseInt(o,10)<40102?(this._authTimer=null,this.onPreConnect(!1,!1)):this._socket.emit("authenticate",((t,e)=>this.onPreConnect(t,e)))})).catch((t=>this.onError({message:t.toString(),operation:"getVersion"})))),500)):this._socket.emit("authenticate",((t,e)=>{this.onPreConnect(t,e)}))})),this._socket.on("reconnect",(()=>{var t,e;this.onReadyDone=!1,null===(t=(e=this.props).onProgress)||void 0===t||t.call(e,o.READY),this.connected=!0,this.waitForRestart?window.location.reload():(this._subscribe(!0),this.onConnectionHandlers.forEach((t=>t(!0))))})),this._socket.on("disconnect",(()=>{var t,e;this.onReadyDone=!1,this.connected=!1,this.subscribed=!1,null===(t=(e=this.props).onProgress)||void 0===t||t.call(e,o.CONNECTING),this.onConnectionHandlers.forEach((t=>t(!1)))})),this._socket.on("reauthenticate",(()=>this.authenticate())),this._socket.on("log",(t=>{var e,i;null===(e=(i=this.props).onLog)||void 0===e||e.call(i,t),this.onLogHandlers.forEach((e=>e(t)))})),this._socket.on("error",(t=>{let e;void 0==t?e="":"function"===typeof t.toString?e=t.toString():(e=JSON.stringify(t),console.error("Received strange error: ".concat(e))),e.includes("User not authorized")?this.authenticate():e.includes("websocket error")?(console.error("Socket Error => reload: ".concat(t)),window.location.reload()):console.error("Socket Error: ".concat(t))})),this._socket.on("connect_error",(t=>console.error("Connect error: ".concat(t)))),this._socket.on("permissionError",(t=>this.onError({message:"no permission",operation:t.operation,type:t.type,id:t.id||""}))),this._socket.on("objectChange",((t,e)=>{setTimeout((()=>this.objectChange(t,e)),0)})),this._socket.on("stateChange",((t,e)=>{setTimeout((()=>this.stateChange(t,e)),0)})),this._socket.on("im",((t,e,i)=>{setTimeout((()=>this.instanceMessage(t,e,i)),0)})),this._socket.on("fileChange",((t,e,i)=>{setTimeout((()=>this.fileChange(t,e,i)),0)})),this._socket.on("cmdStdout",((t,e)=>{var i;null===(i=this.onCmdStdoutHandler)||void 0===i||i.call(this,t,e)})),this._socket.on("cmdStderr",((t,e)=>{var i;null===(i=this.onCmdStderrHandler)||void 0===i||i.call(this,t,e)})),this._socket.on("cmdExit",((t,e)=>{var i;null===(i=this.onCmdExitHandler)||void 0===i||i.call(this,t,e)})),Promise.resolve()}onPreConnect(t,e){if(this._authTimer&&(clearTimeout(this._authTimer),this._authTimer=null),this.connected=!0,this.isSecure=e,this.waitForRestart)window.location.reload();else{var i,n;if(this.firstConnect)this.loadData().catch((t=>console.error("Cannot load data: ".concat(t))));else null===(i=(n=this.props).onProgress)||void 0===i||i.call(n,o.READY);this._subscribe(!0),this.onConnectionHandlers.forEach((t=>t(!0)))}this._waitForFirstConnectionPromise.resolve()}static isCloud(){return!(!window.location.hostname.includes("amazonaws.com")&&!window.location.hostname.includes("iobroker.in"))||"undefined"!==typeof window.socketUrl&&(window.socketUrl.includes("iobroker.in")||window.socketUrl.includes("amazonaws"))}isConnected(){return this.connected}waitForFirstConnection(){return this._waitForFirstConnectionPromise}async getUserPermissions(){return this.request({commandTimeout:!1,executor:(t,e)=>{this._socket.emit("getUserPermissions",((i,o)=>{i?e(i):t(o)}))}})}async loadData(){if(this.loaded)return;for(let t=1;t<=10;t++){if(this.doLoadData().catch((t=>console.error("Cannot load data: ".concat(t)))),this.loaded)return;await l(p.isCloud()?5e3:1e3)}}async doLoadData(){var t,e,i,n,r,s;if(!this.loaded){if(!this.props.doNotLoadACL)try{this.acl=await this.getUserPermissions()}catch(l){return void this.onError("Cannot read user permissions: ".concat(l))}try{!this.props.admin5only||p.isWeb()||window.vendorPrefix&&"@@vendorPrefix@@"!==window.vendorPrefix?this._systemConfig=await this.getSystemConfig():this._systemConfig=await this.getCompactSystemConfig()}catch(l){return void this.onError("Cannot read system config: ".concat(l))}var a,c,h;if(this._systemConfig)this.systemLang=null===(a=this._systemConfig.common)||void 0===a?void 0:a.language,this.systemLang||(this.systemLang=window.navigator.userLanguage||window.navigator.language,/^(en|de|ru|pt|nl|fr|it|es|pl|uk)-?/.test(this.systemLang)?this.systemLang=this.systemLang.substring(0,2):/^(en|de|ru|pt|nl|fr|it|es|pl|uk|zh-cn)$/.test(this.systemLang)||(this.systemLang="en"),this._systemConfig.common.language=this.systemLang);if(null===(t=(e=this.props).onLanguage)||void 0===t||t.call(e,this.systemLang),this.loaded=!0,null===(i=(n=this.props).onProgress)||void 0===i||i.call(n,o.CONNECTED),this.firstConnect=!1,this.props.doNotLoadAllObjects?this.props.admin5only?this.objects={}:this.objects={"system.config":this._systemConfig}:this.objects=await this.getObjects(),null===(r=(s=this.props).onProgress)||void 0===r||r.call(s,o.READY),!this.onReadyDone)this.onReadyDone=!0,null===(c=(h=this.props).onReady)||void 0===c||c.call(h,this.objects)}}authenticate(){window.location.search.includes("&href=")?window.location.href="".concat(window.location.protocol,"//").concat(window.location.host).concat(window.location.pathname).concat(window.location.search).concat(window.location.hash):window.location.href="".concat(window.location.protocol,"//").concat(window.location.host).concat(window.location.pathname,"?login&href=").concat(window.location.search).concat(window.location.hash)}async subscribeState(){let t,e,i,o;for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];if(3===r.length?[t,e,i]=r:([t,i]=r,e=!1),o=Array.isArray(t)?t:[t],"function"!==typeof i)throw new Error("The state change handler must be a function!");const a=[];for(let h=0;h<o.length;h++){const e=o[h];this.statesSubscribes[e]?!this.statesSubscribes[e].cbs.includes(i)&&this.statesSubscribes[e].cbs.push(i):(this.statesSubscribes[e]={reg:new RegExp(u(e)),cbs:[i]},t!==this.ignoreState&&a.push(e))}if(this.connected)if(a.length&&this._socket.emit("subscribe",a),e){let t;for(let e=0;e<o.length;e++){try{t=await this.getBinaryState(o[e])}catch(c){console.error('Cannot getBinaryState "'.concat(o[e],'": ').concat(JSON.stringify(c))),t=void 0}void 0!=t&&i(o[e],t)}}else if(o.find((t=>t.includes("*")))){let t;for(let e=0;e<o.length;e++){try{t=await this.getForeignStates(o[e])}catch(c){return void console.error('Cannot getForeignStates "'.concat(o[e],'": ').concat(JSON.stringify(c)))}if(t)for(const[e,o]of Object.entries(t)){const t=i(e,o);t instanceof Promise&&t.catch((t=>console.error("Cannot call state change handler: ".concat(t))))}}}else try{const t=await(p.isWeb()?this.getStates(o):this.getForeignStates(o));if(t)for(const[e,o]of Object.entries(t)){const t=i(e,o);t instanceof Promise&&t.catch((t=>console.error("Cannot call state change handler: ".concat(t))))}}catch(c){return void console.error('Cannot getState "'.concat(o.join(", "),'": ').concat(c.message))}}async subscribeStateAsync(t,e){return this.subscribeState(t,e)}unsubscribeState(t,e){let i;i=Array.isArray(t)?t:[t];const o=[];for(let r=0;r<i.length;r++){const t=i[r];if(this.statesSubscribes[t]){var n;const i=this.statesSubscribes[t];if(e){const t=i.cbs.indexOf(e);-1!==t&&i.cbs.splice(t,1)}else i.cbs=[];null!==(n=i.cbs)&&void 0!==n&&n.length||(delete this.statesSubscribes[t],t!==this.ignoreState&&o.push(t))}}this.connected&&o.length&&this._socket.emit("unsubscribe",i)}subscribeObject(t,e){let i;if(i=Array.isArray(t)?t:[t],"function"!==typeof e)throw new Error("The object change handler must be a function!");const o=[];for(let n=0;n<i.length;n++){const t=i[n];this.objectsSubscribes[t]?!this.objectsSubscribes[t].cbs.includes(e)&&this.objectsSubscribes[t].cbs.push(e):(this.objectsSubscribes[t]={reg:new RegExp(u(t)),cbs:[e]},o.push(t))}return this.connected&&o.length&&this._socket.emit("subscribeObjects",o),Promise.resolve()}unsubscribeObject(t,e){let i;i=Array.isArray(t)?t:[t];const o=[];for(let r=0;r<i.length;r++){const t=i[r];if(this.objectsSubscribes[t]){var n;const i=this.objectsSubscribes[t];if(e){const t=i.cbs.indexOf(e);-1!==t&&i.cbs.splice(t,1)}else i.cbs=[];null!==(n=i.cbs)&&void 0!==n&&n.length||(delete this.objectsSubscribes[t],o.push(t))}}return this.connected&&o.length&&this._socket.emit("unsubscribeObjects",o),Promise.resolve()}objectChange(t,e){let i;this.objects[t]&&(i={_id:t,type:this.objects[t].type});let o=!1;e?(e._rev&&this.objects[t]&&(this.objects[t]._rev=e._rev),this.objects[t]&&JSON.stringify(this.objects[t])===JSON.stringify(e)||(this.objects[t]=e,o=!0)):this.objects[t]&&(delete this.objects[t],o=!0);for(const[s,a]of Object.entries(this.objectsSubscribes))(s===t||a.reg.test(t))&&a.cbs.forEach((o=>{try{const n=o(t,e,i);n instanceof Promise&&n.catch((t=>console.error("Cannot call object change handler: ".concat(t))))}catch(n){console.error("Error by callback of objectChange: ".concat(n))}}));if(o){var n,r;const i=null===(n=(r=this.props).onObjectChange)||void 0===n?void 0:n.call(r,t,e);i instanceof Promise&&i.catch((t=>console.error("Cannot call object change handler: ".concat(t))))}}stateChange(t,e){for(const o of Object.values(this.statesSubscribes))if(o.reg.test(t))for(const n of o.cbs)try{const i=n(t,null!==e&&void 0!==e?e:null);i instanceof Promise&&i.catch((t=>console.error("Cannot call state change handler: ".concat(t))))}catch(i){console.error("Error by callback of stateChanged: ".concat(i))}}instanceMessage(t,e,i){var o;null===(o=this._instanceSubscriptions[e])||void 0===o||o.forEach((o=>{if(o.messageType===t){const n=o.callback(i,e,t);n instanceof Promise&&n.catch((t=>console.error("Cannot call instance message handler: ".concat(t))))}}))}fileChange(t,e,i){for(const n of Object.values(this.filesSubscribes))if(n.regId.test(t)&&n.regFilePattern.test(e))for(const r of n.cbs)try{r(t,e,i)}catch(o){console.error("Error by callback of fileChange: ".concat(o))}}async subscribeFiles(t,e,i){if("function"!==typeof i)throw new Error("The state change handler must be a function!");let o;o=Array.isArray(e)?e:[e];const n=[];for(let r=0;r<o.length;r++){const e=o[r],s="".concat(t,"$%$").concat(e);this.filesSubscribes[s]?!this.filesSubscribes[s].cbs.includes(i)&&this.filesSubscribes[s].cbs.push(i):(this.filesSubscribes[s]={regId:new RegExp(u(t)),regFilePattern:new RegExp(u(e)),cbs:[i]},n.push(e))}return this.connected&&n.length&&this._socket.emit("subscribeFiles",t,n),Promise.resolve()}unsubscribeFiles(t,e,i){let o;o=Array.isArray(e)?e:[e];const n=[];for(let s=0;s<o.length;s++){const e=o[s],a="".concat(t,"$%$").concat(e);if(this.filesSubscribes[a]){var r;const t=this.filesSubscribes[a];if(i){const e=t.cbs.indexOf(i);-1!==e&&t.cbs.splice(e,1)}else t.cbs=[];null!==(r=t.cbs)&&void 0!==r&&r.length||(delete this.filesSubscribes[a],n.push(e))}}this.connected&&n.length&&this._socket.emit("unsubscribeFiles",t,n)}async request(t){let{cacheKey:e,forceUpdate:i,commandTimeout:o,onTimeout:r,requireAdmin:s,requireFeatures:a,executor:c}=t;if(s&&p.isWeb())return Promise.reject(new Error(n.NOT_ADMIN));if(e&&!i&&e in this._promises)return this._promises[e];if(!this.connected)return Promise.reject(new Error(n.NOT_CONNECTED));if(null!==a&&void 0!==a&&a.length)for(const l of a)if(!await this.checkFeatureSupported(l))throw new Error(n.NOT_SUPPORTED);const h=new Promise((async(t,i)=>{const s={elapsed:!1,clearTimeout:()=>{}};let a;!1!==o&&(a=setTimeout((()=>{s.elapsed=!0,null===r||void 0===r||r(),e&&this._promises[e]instanceof Promise&&delete this._promises[e],i(new Error(n.TIMEOUT))}),null!==o&&void 0!==o?o:this.props.cmdTimeout),s.clearTimeout=()=>{clearTimeout(a)});try{await c(t,i,s)}catch(h){e&&this._promises[e]instanceof Promise&&delete this._promises[e],i(new Error(h.toString()))}}));return e&&(this._promises[e]=h),h}resetCache(t,e){e?Object.keys(this._promises).filter((e=>e.startsWith(t))).forEach((t=>{delete this._promises[t]})):delete this._promises[t]}getStates(t){return this.request({commandTimeout:!1,executor:(e,i)=>{this._socket.emit("getStates",t,((t,o)=>{this.states=null!==o&&void 0!==o?o:{},t?i(t):e(this.states)}))}})}getState(t){return this.request({commandTimeout:!1,executor:(e,i)=>{t&&t===this.ignoreState?e(this.simStates[t]||{val:null,ack:!0}):this._socket.emit("getState",t,((t,o)=>{t?i(t):e(o)}))}})}getBinaryState(t){return this.request({commandTimeout:!1,executor:(e,i)=>{this._socket.emit("getBinaryState",t,((t,o)=>{t?i(t):e(o)}))}})}setBinaryState(t,e){return this.request({commandTimeout:!1,executor:(i,o)=>{this._socket.emit("setBinaryState",t,e,(t=>{t?o(t):i()}))}})}setState(t,e,i){return"boolean"===typeof i&&(e={val:e,ack:i}),this.request({commandTimeout:!1,executor:(o,n)=>{if(t&&t===this.ignoreState){let n;if(n="boolean"===typeof i||"object"===typeof e&&void 0!==e.val?e:{val:e,ack:!1,ts:Date.now(),lc:Date.now(),from:"system.adapter.vis.0"},this.simStates[t]=n,this.statesSubscribes[t])for(const e of this.statesSubscribes[t].cbs)try{const i=e(t,n);i instanceof Promise&&i.catch((t=>console.error("Cannot call state change handler: ".concat(t))))}catch(r){console.error("Error by callback of stateChanged: ".concat(r))}o()}else this._socket.emit("setState",t,e,(t=>{t?n(t):o()}))}})}getObjects(t,e){return this.request({commandTimeout:!1,executor:(i,n)=>{t||!this.objects?this._socket.emit(p.isWeb()?"getObjects":"getAllObjects",((t,r)=>{var s,a;e||(null===(s=(a=this.props).onProgress)||void 0===s||s.call(a,o.OBJECTS_LOADED));t?n(t):(this.objects=null!==r&&void 0!==r?r:{},i(this.objects))})):i(this.objects)}})}getObjectsById(t){return this.request({commandTimeout:!1,executor:(e,i)=>{this._socket.emit("getObjects",t,((t,o)=>{t?i(t):e(o)}))}})}_subscribe(t){if(t&&!this.subscribed){var e;this.subscribed=!0,null!==(e=this.props.autoSubscribes)&&void 0!==e&&e.length&&this._socket.emit("subscribeObjects",this.props.autoSubscribes);const t=Object.keys(this.objectsSubscribes);t.length&&this._socket.emit("subscribeObjects",t),Object.keys(this.objectsSubscribes).forEach((t=>this._socket.emit("subscribeObjects",t))),this.props.autoSubscribeLog&&this._socket.emit("requireLog",!0),Object.keys(this.statesSubscribes).forEach((t=>this._socket.emit("subscribe",t))),Object.keys(this.filesSubscribes).forEach((t=>{const[e,i]=t.split("$%$");this._socket.emit("subscribeFiles",e,i)}))}else if(!t&&this.subscribed){var i;this.subscribed=!1,null!==(i=this.props.autoSubscribes)&&void 0!==i&&i.length&&this._socket.emit("unsubscribeObjects",this.props.autoSubscribes);const t=Object.keys(this.objectsSubscribes);t.length&&this._socket.emit("unsubscribeObjects",t),this.props.autoSubscribeLog&&this._socket.emit("requireLog",!1),Object.keys(this.statesSubscribes).forEach((t=>this._socket.emit("unsubscribe",t))),Object.keys(this.filesSubscribes).forEach((t=>{const[e,i]=t.split("$%$");this._socket.emit("unsubscribeFiles",e,i)}))}}requireLog(t){return this.request({commandTimeout:!1,executor:(e,i)=>{this._socket.emit("requireLog",t,(t=>{t?i(t):e()}))}})}delObject(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.request({commandTimeout:!1,executor:(i,o)=>{this._socket.emit("delObject",t,{maintenance:e},(t=>{t?o(t):i()}))}})}delObjects(t,e){return this.request({commandTimeout:!1,executor:(i,o)=>{this._socket.emit("delObjects",t,{maintenance:e},(t=>{t?o(t):i()}))}})}setObject(t,e){return e?(delete(e=JSON.parse(JSON.stringify(e))).from,delete e.user,delete e.ts,this.request({commandTimeout:!1,executor:(i,o)=>{this._socket.emit("setObject",t,e,(t=>{t?o(t):i()}))}})):Promise.reject(new Error("Null object is not allowed"))}getObject(t){return this.request({commandTimeout:!1,executor:(e,i)=>{t&&t===this.ignoreState?e({_id:this.ignoreState,type:"state",common:{name:"ignored state",type:"mixed"}}):this._socket.emit("getObject",t,((t,o)=>{t?i(t):e(o)}))}})}sendTo(t,e,i){return this.request({commandTimeout:!1,executor:o=>{this._socket.emit("sendTo",t,e,i,(t=>{o(t)}))}})}extendObject(t,e){return e?(delete(e=JSON.parse(JSON.stringify(e))).from,delete e.user,delete e.ts,this.request({commandTimeout:!1,executor:(i,o)=>{this._socket.emit("extendObject",t,e,(t=>{t?o(t):i()}))}})):Promise.reject(new Error("Null object is not allowed"))}registerLogHandler(t){this.onLogHandlers.includes(t)||this.onLogHandlers.push(t)}unregisterLogHandler(t){const e=this.onLogHandlers.indexOf(t);-1!==e&&this.onLogHandlers.splice(e,1)}registerConnectionHandler(t){this.onConnectionHandlers.includes(t)||this.onConnectionHandlers.push(t)}unregisterConnectionHandler(t){const e=this.onConnectionHandlers.indexOf(t);-1!==e&&this.onConnectionHandlers.splice(e,1)}registerCmdStdoutHandler(t){this.onCmdStdoutHandler=t}unregisterCmdStdoutHandler(){this.onCmdStdoutHandler=void 0}registerCmdStderrHandler(t){this.onCmdStderrHandler=t}unregisterCmdStderrHandler(){this.onCmdStderrHandler=void 0}registerCmdExitHandler(t){this.onCmdExitHandler=t}unregisterCmdExitHandler(){this.onCmdExitHandler=void 0}getEnums(t,e){return this.request({cacheKey:"enums_".concat(t||"all"),forceUpdate:e,commandTimeout:!1,executor:(e,i)=>{this._socket.emit("getObjectView","system","enum",{startkey:"enum.".concat(t||""),endkey:t?"enum.".concat(t,".\u9999"):"enum.\u9999"},((o,n)=>{if(o)i(o);else{const i={};if(n)for(let e=0;e<n.rows.length;e++)t&&n.rows[e].id==="enum.".concat(t)||(i[n.rows[e].id]=n.rows[e].value);e(i)}}))}})}getObjectView(t,e,i){return this.getObjectViewCustom("system",i,t,e)}getObjectViewSystem(t,e,i){return this.getObjectViewCustom("system",t,e,i)}getObjectViewCustom(t,e,i,o){return this.request({commandTimeout:!1,executor:(n,r)=>{i=i||"",o=o||"\u9999",this._socket.emit("getObjectView",t,e,{startkey:i,endkey:o},((t,e)=>{if(t)r(t);else{const t={};if(e&&e.rows)for(let i=0;i<e.rows.length;i++)t[e.rows[i].id]=e.rows[i].value;n(t)}}))}})}readMetaItems(){return this.request({commandTimeout:!1,executor:(t,e)=>{this._socket.emit("getObjectView","system","meta",{startkey:"",endkey:"\u9999"},((i,o)=>{var n;i?e(i):t(null===(n=o.rows)||void 0===n?void 0:n.map((t=>t.value)).filter((t=>!!t)))}))}})}readDir(t,e){return this.request({commandTimeout:!1,executor:(i,o)=>{this._socket.emit("readDir",t,e,((t,e)=>{t?o(t):i(e)}))}})}readFile(t,e,i){return this.request({commandTimeout:!1,executor:(o,n)=>{this._socket.emit(i?"readFile64":"readFile",t,e,((t,e,i)=>{t?n(t):o({file:e,mimeType:i})}))}})}writeFile64(t,e,i){return this.request({commandTimeout:!1,executor:(o,n)=>{if("string"===typeof i)this._socket.emit("writeFile",t,e,i,(t=>{t?n(t):o()}));else{const r=btoa(new Uint8Array(i).reduce(((t,e)=>t+String.fromCharCode(e)),""));this._socket.emit("writeFile64",t,e,r,(t=>{t?n(t):o()}))}}})}deleteFile(t,e){return this.request({commandTimeout:!1,executor:(i,o)=>{this._socket.emit("deleteFile",t,e,(t=>{t?o(t):i()}))}})}deleteFolder(t,e){return this.request({commandTimeout:!1,executor:(i,o)=>{this._socket.emit("deleteFolder",t,e,(t=>{t?o(t):i()}))}})}rename(t,e,i){return this.request({commandTimeout:!1,executor:(o,n)=>{this._socket.emit("rename",t,e,i,(t=>{t?n(t):o()}))}})}renameFile(t,e,i){return this.request({commandTimeout:!1,executor:(o,n)=>{this._socket.emit("renameFile",t,e,i,(t=>{t?n(t):o()}))}})}cmdExec(t,e,i,o){return this.request({commandTimeout:o,executor:(o,n,r)=>{t=c(t),this._socket.emit("cmdExec",t,i,e,(t=>{r.elapsed||(r.clearTimeout(),t?n(t):o())}))}})}getSystemConfig(t){return this.request({cacheKey:"systemConfig",forceUpdate:t,commandTimeout:!1,executor:async t=>{var e,i,o,n,r;let s=await this.getObject("system.config");null!==(e=s)&&void 0!==e||(s={}),null!==(o=(i=s).common)&&void 0!==o||(i.common={}),null!==(r=(n=s).native)&&void 0!==r||(n.native={}),t(s)}})}getCompactSystemConfig(t){return this.request({cacheKey:"systemConfigCommon",forceUpdate:t,commandTimeout:!1,requireAdmin:!0,executor:(t,e)=>{this._socket.emit("getCompactSystemConfig",((i,o)=>{var n,r,s,a,c;i?e(i):(null!==(n=o)&&void 0!==n||(o={}),null!==(s=(r=o).common)&&void 0!==s||(r.common={}),null!==(c=(a=o).native)&&void 0!==c||(a.native={}),t(o))}))}})}getForeignStates(t){return this.request({commandTimeout:!1,executor:(e,i)=>{this._socket.emit("getForeignStates",t||"*",((t,o)=>{t?i(t):e(null!==o&&void 0!==o?o:{})}))}})}getForeignObjects(t,e){return this.request({commandTimeout:!1,executor:(i,o)=>{this._socket.emit("getForeignObjects",t||"*",e,((t,e)=>{t?o(t):i(e)}))}})}setSystemConfig(t){return this.setObject("system.config",t)}getRawSocket(){return this._socket}getHistory(t,e){return this.request({commandTimeout:!1,executor:(i,o)=>{this._socket.emit("getHistory",t,e,((t,e)=>{t?o(t):i(e)}))}})}getHistoryEx(t,e){return this.request({commandTimeout:!1,executor:(i,o)=>{this._socket.emit("getHistory",t,e,((t,e,n,r)=>{t?o(t):i({values:e,sessionId:r,step:n})}))}})}getIpAddresses(t,e){return t=c(t),this.request({cacheKey:"IPs_".concat(t),forceUpdate:e,commandTimeout:!1,executor:async e=>{var i;const o=await this.getObject(t);e(null!==(i=null===o||void 0===o?void 0:o.common.address)&&void 0!==i?i:[])}})}getVersion(t){return this.request({cacheKey:"version",forceUpdate:t,commandTimeout:!1,executor:(t,e)=>{this._socket.emit("getVersion",((i,o,n)=>{i&&!o&&"string"===typeof i&&i.match(/\d+\.\d+\.\d+/)?t({version:i,serverName:"socketio"}):i?e(i):t({version:o,serverName:n})}))}})}getWebServerName(){return this.request({cacheKey:"webName",commandTimeout:!1,executor:(t,e)=>{this._socket.emit("getAdapterName",((i,o)=>{i?e(i):t(o)}))}})}fileExists(t,e){return this.request({commandTimeout:!1,executor:(i,o)=>{this._socket.emit("fileExists",t,e,((t,e)=>{t?o(t):i(!!e)}))}})}getCurrentUser(){return this.request({commandTimeout:!1,executor:t=>{this._socket.emit("authEnabled",((e,i)=>{t(i)}))}})}getUuid(){return this.request({cacheKey:"uuid",commandTimeout:!1,executor:async t=>{var e;const i=await this.getObject("system.meta.uuid");t(null===i||void 0===i||null===(e=i.native)||void 0===e?void 0:e.uuid)}})}checkFeatureSupported(t,e){return this.request({cacheKey:"supportedFeatures_".concat(t),forceUpdate:e,commandTimeout:!1,executor:(e,i)=>{this._socket.emit("checkFeatureSupported",t,((t,o)=>{t?i(t):e(o)}))}})}getAdapterInstances(t,e){return"boolean"===typeof t&&(e=t,t=""),t=t||"",this.request({cacheKey:"instances_".concat(t),forceUpdate:e,commandTimeout:!1,executor:async e=>{const i=t?"system.adapter.".concat(t,"."):"system.adapter.",o="".concat(i,"\u9999"),n=await this.getObjectViewSystem("instance",i,o),r=Object.values(n);e(t?r.filter((e=>e.common.name===t)):r)}})}getAdapters(t,e){return"boolean"===typeof t&&(e=t,t=""),t=t||"",this.request({cacheKey:"adapter_".concat(t),forceUpdate:e,commandTimeout:!1,executor:async e=>{const i=await this.getObjectViewSystem("adapter","system.adapter.".concat(t||""),"system.adapter.".concat(t||"\u9999")),o=Object.values(i);e(t?o.filter((e=>e.common.name===t)):o)}})}getGroups(t){return this.request({cacheKey:"groups",forceUpdate:t,commandTimeout:!1,executor:(t,e)=>{this._socket.emit("getObjectView","system","group",{startkey:"system.group.",endkey:"system.group.\u9999"},((i,o)=>{i?e(i):t(a(o))}))}})}logout(){return this.request({commandTimeout:!1,executor:(t,e)=>{this._socket.emit("logout",(i=>{i?e(i):t(null)}))}})}subscribeOnInstance(t,e,i,o){return this.request({commandTimeout:!1,executor:(n,r)=>{this._socket.emit("clientSubscribe",t,e,i,((i,s)=>{i?r(i):s&&(s.error?r(s.error):(t.startsWith("system.adapter.")||(t="system.adapter.".concat(t)),this._instanceSubscriptions[t]=this._instanceSubscriptions[t]||[],this._instanceSubscriptions[t].find((t=>t.messageType===e&&t.callback===o))||this._instanceSubscriptions[t].push({messageType:e,callback:o}),n(s)))}))}})}unsubscribeFromInstance(t,e,i){let o;t.startsWith("system.adapter.")||(t="system.adapter.".concat(t));const n=[];do{var r;o=!1;const s=null===(r=this._instanceSubscriptions[t])||void 0===r?void 0:r.findIndex((t=>(!e||t.messageType===e)&&(!i||t.callback===i)));if(void 0!==s&&null!==s&&-1!==s){o=!0;const i=this._instanceSubscriptions[t][s].messageType;this._instanceSubscriptions[t].splice(s,1),this._instanceSubscriptions[t].length||delete this._instanceSubscriptions[t];this._instanceSubscriptions[t]&&this._instanceSubscriptions[t].find((t=>t.messageType===i))||n.push(this.request({commandTimeout:!1,executor:(i,o)=>{this._socket.emit("clientUnsubscribe",t,e,((t,e)=>t?o(t):i(e)))}}))}}while(o&&(!i||!e));return n.length?Promise.all(n).then((t=>!!t.find((t=>t)))):Promise.resolve(!1)}log(t,e){return t?this.request({commandTimeout:!1,executor:i=>(this._socket.emit("log",t,e),i(null))}):Promise.resolve(null)}setStateToIgnore(t){this.ignoreState=t}}class f extends p{constructor(t){super(t)}request(t){return super.request((0,r.A)({requireAdmin:!0},t))}getCertificates(t){return this.request({cacheKey:"cert",forceUpdate:t,commandTimeout:!1,executor:async t=>{var e;const i=await this.getObject("system.certificates");null!==i&&void 0!==i&&null!==(e=i.native)&&void 0!==e&&e.certificates?t(Object.entries(i.native.certificates).map((t=>{let[e,i]=t;return function(t,e){if(!e)return;let i;if(e.length<700&&(-1!==e.indexOf("/")||-1!==e.indexOf("\\")))if(t.toLowerCase().includes("private"))i="private";else if(e.toLowerCase().includes("private"))i="private";else if(t.toLowerCase().includes("public"))i="public";else if(e.toLowerCase().includes("public"))i="public";else if(t.toLowerCase().includes("chain"))i="chained";else{if(!e.toLowerCase().includes("chain"))return;i="chained"}else i="-----BEGIN RSA PRIVATE KEY"===e.substring(0,26)||"-----BEGIN PRIVATE KEY"===e.substring(0,22)?"private":"public","public"===i&&e.split("-----END CERTIFICATE-----").filter((t=>t.replace(/\r\n|\r|\n/,"").trim())).length>1&&(i="chained");return{name:t,type:i}}(e,i)})).filter((t=>!!t))):t([])}})}getLogs(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200;return this.request({commandTimeout:!1,executor:i=>{this._socket.emit("sendToHost",t,"getLogs",e||200,(t=>{i(t)}))}})}upgradeAdapterWithWebserver(t,e){return this.request({commandTimeout:!1,executor:i=>{this._socket.emit("sendToHost",t,"upgradeAdapterWithWebserver",e,(t=>{i(t)}))}})}upgradeController(t,e,i){return this.request({commandTimeout:!1,executor:(o,n)=>{this._socket.emit("sendToHost",t,"upgradeController",{version:e,adminInstance:i},(t=>{const e=t;e.error?n(e.error):o(e.result)}))}})}updateLicenses(t,e){return this.request({commandTimeout:!1,executor:(i,o)=>{this._socket.emit("updateLicenses",t,e,((t,e)=>{t?o(t):i(e)}))}})}upgradeOsPackages(t,e,i){return this.request({commandTimeout:!1,executor:o=>{this._socket.emit("sendToHost",t,"upgradeOsPackages",{packages:e,restart:!!i},(t=>{o(t)}))}})}getLogsFiles(t){return this.request({commandTimeout:!1,executor:(e,i)=>{this._socket.emit("readLogs",t,((t,o)=>{t&&i(t),e(o)}))}})}delLogs(t){return this.request({commandTimeout:!1,executor:(e,i)=>{this._socket.emit("sendToHost",t,"delLogs",null,(t=>{t&&i(t),e()}))}})}deleteFile(t,e){return this.request({commandTimeout:!1,executor:(i,o)=>{this._socket.emit("deleteFile",t,e,(t=>{t&&o(t),i()}))}})}deleteFolder(t,e){return this.request({commandTimeout:!1,executor:(i,o)=>{this._socket.emit("deleteFolder",t,e,(t=>{t&&o(t),i()}))}})}rename(t,e,i){return this.request({commandTimeout:!1,executor:(o,n)=>{this._socket.emit("rename",t,e,i,(t=>{t&&n(t),o()}))}})}renameFile(t,e,i){return this.request({commandTimeout:!1,executor:(o,n)=>{this._socket.emit("renameFile",t,e,i,(t=>{t&&n(t),o()}))}})}getHosts(t){return this.request({cacheKey:"hosts",forceUpdate:t,commandTimeout:!1,executor:(t,e)=>{this._socket.emit("getObjectView","system","host",{startkey:"system.host.",endkey:"system.host.\u9999"},((i,o)=>{i?e(i):t(a(o))}))}})}getUsers(t){return this.request({cacheKey:"users",forceUpdate:t,commandTimeout:!1,executor:(t,e)=>{this._socket.emit("getObjectView","system","user",{startkey:"system.user.",endkey:"system.user.\u9999"},((i,o)=>{i?e(i):t(a(o))}))}})}renameGroup(t,e,i){return this.request({commandTimeout:!1,executor:async o=>{const n=await this.getGroups(!0),r=n.filter((e=>e._id.startsWith("".concat(t,"."))));for(const i of r){const o=i._id,n=e+i._id.substring(t.length);i._id=n,await this.setObject(n,i),await this.delObject(o)}const s=n.find((e=>e._id===t));if(s){const t=s._id;var a;if(s._id=e,void 0!==i)null!==(a=s.common)&&void 0!==a||(s.common={}),s.common.name=i;await this.setObject(e,s),await this.delObject(t)}o()}})}getHostInfo(t,e,i){return t=c(t),this.request({cacheKey:"hostInfo_".concat(t),forceUpdate:e,commandTimeout:i,executor:(e,i,o)=>{this._socket.emit("sendToHost",t,"getHostInfo",null,(t=>{o.elapsed||(o.clearTimeout(),t===n.PERMISSION_ERROR?i('May not read "getHostInfo"'):t?e(t):i('Cannot read "getHostInfo"'))}))}})}getHostInfoShort(t,e,i){return t=c(t),this.request({cacheKey:"hostInfoShort_".concat(t),forceUpdate:e,commandTimeout:i,executor:(e,i,o)=>{this._socket.emit("sendToHost",t,"getHostInfoShort",null,(t=>{o.elapsed||(o.clearTimeout(),t===n.PERMISSION_ERROR?i('May not read "getHostInfoShort"'):t?e(t):i('Cannot read "getHostInfoShort"'))}))}})}getRepository(t,e,i,o){return this.request({cacheKey:"repository_".concat(t),forceUpdate:i,commandTimeout:o,executor:(i,o,r)=>{this._socket.emit("sendToHost",t,"getRepository",e,(t=>{r.elapsed||(r.clearTimeout(),t===n.PERMISSION_ERROR?o('May not read "getRepository"'):t?i(t):o('Cannot read "getRepository"'))}))}})}getInstalled(t,e,i){return t=c(t),this.request({cacheKey:"installed_".concat(t),forceUpdate:e,commandTimeout:i,executor:(e,i,o)=>{this._socket.emit("sendToHost",t,"getInstalled",null,(t=>{o.elapsed||(o.clearTimeout(),t===n.PERMISSION_ERROR?i('May not read "getInstalled"'):t?e(t):i('Cannot read "getInstalled"'))}))}})}cmdExec(t,e,i,o){return this.request({commandTimeout:o,executor:(o,n,r)=>{t=c(t),this._socket.emit("cmdExec",t,i,e,(t=>{r.elapsed||(r.clearTimeout(),t&&n(t),o())}))}})}readBaseSettings(t){return t=h(t),this.request({requireFeatures:["CONTROLLER_READWRITE_BASE_SETTINGS"],executor:(e,i,o)=>{this._socket.emit("sendToHost",t,"readBaseSettings",null,(t=>{o.elapsed||(o.clearTimeout(),t===n.PERMISSION_ERROR?i('May not read "BaseSettings"'):t?t.error?i(new Error(t.error)):e(t):i('Cannot read "BaseSettings"'))}))}})}writeBaseSettings(t,e){return t=h(t),this.request({requireFeatures:["CONTROLLER_READWRITE_BASE_SETTINGS"],executor:(i,o,r)=>{this._socket.emit("sendToHost",t,"writeBaseSettings",e,(t=>{r.elapsed||(r.clearTimeout(),t===n.PERMISSION_ERROR?o('May not write "BaseSettings"'):t?i(t):o('Cannot write "BaseSettings"'))}))}})}restartController(t){return t=h(t),this.request({executor:(e,i,o)=>{this._socket.emit("sendToHost",t,"restartController",null,(()=>{o.elapsed||(o.clearTimeout(),e(!0))}))}})}getDiagData(t,e){return t=h(t),this.request({executor:(i,o,n)=>{this._socket.emit("sendToHost",t,"getDiagData",e,(t=>{n.elapsed||(n.clearTimeout(),i(t||null))}))}})}changePassword(t,e){return this.request({executor:(i,o,n)=>{this._socket.emit("changePassword",t,e,(t=>{n.elapsed||(n.clearTimeout(),t&&o(t),i())}))}})}getIpAddresses(t,e){return t=c(t),this.request({cacheKey:"IPs_".concat(t),forceUpdate:e,commandTimeout:!1,executor:async e=>{var i;const o=await this.getObject(t);e(null!==(i=null===o||void 0===o?void 0:o.common.address)&&void 0!==i?i:[])}})}getHostByIp(t,e){return t=h(t),this.request({cacheKey:"rIPs_".concat(t),forceUpdate:e,executor:(e,i,o)=>{this._socket.emit("getHostByIp",t,((t,i)=>{if(o.elapsed)return;o.clearTimeout();const{IPs4:n,IPs6:r}=function(t){var e;const i=[{name:"[IPv4] 0.0.0.0 - Listen on all IPs",address:"0.0.0.0",family:"ipv4"}],o=[{name:"[IPv6] :: - Listen on all IPs",address:"::",family:"ipv6"}];if(null!==(e=t.native)&&void 0!==e&&null!==(e=e.hardware)&&void 0!==e&&e.networkInterfaces){var n;const e=null===(n=t.native)||void 0===n||null===(n=n.hardware)||void 0===n?void 0:n.networkInterfaces;Object.keys(e).forEach((t=>{e[t].forEach((e=>{"IPv6"!==e.family?i.push({name:"[".concat(e.family,"] ").concat(e.address," - ").concat(t),address:e.address,family:"ipv4"}):o.push({name:"[".concat(e.family,"] ").concat(e.address," - ").concat(t),address:e.address,family:"ipv6"})}))}))}return{IPs4:i,IPs6:o}}(i);e([...n,...r])}))}})}encrypt(t){return this.request({executor:(e,i,o)=>{this._socket.emit("encrypt",t,((t,n)=>{o.elapsed||(o.clearTimeout(),t&&i(t),e(n))}))}})}decrypt(t){return this.request({executor:(e,i,o)=>{this._socket.emit("decrypt",t,((t,n)=>{o.elapsed||(o.clearTimeout(),t&&i(t),e(n))}))}})}chmodFile(t,e,i){return this.request({executor:(o,n,r)=>{this._socket.emit("chmodFile",t,e,i,((t,e)=>{r.elapsed||(r.clearTimeout(),t&&n(t),o(e))}))}})}chownFile(t,e,i){return this.request({executor:(o,n,r)=>{this._socket.emit("chownFile",t,e,i,((t,e)=>{r.elapsed||(r.clearTimeout(),t&&n(t),o(e))}))}})}getNotifications(t,e){return this.request({executor:(i,o,n)=>{this._socket.emit("sendToHost",t,"getNotifications",{category:e},(t=>{n.elapsed||(n.clearTimeout(),i(t))}))}})}clearNotifications(t,e){return this.request({executor:(i,o,n)=>{this._socket.emit("sendToHost",t,"clearNotifications",{category:e},(t=>{n.elapsed||(n.clearTimeout(),i(t))}))}})}getIsEasyModeStrict(){return this.request({executor:(t,e,i)=>{this._socket.emit("getIsEasyModeStrict",((o,n)=>{i.elapsed||(i.clearTimeout(),o&&e(o),t(!!n))}))}})}getEasyMode(){return this.request({executor:(t,e,i)=>{this._socket.emit("getEasyMode",((o,n)=>{i.elapsed||(i.clearTimeout(),o?e(new Error(o)):t(n))}))}})}getRatings(t){return this.request({executor:(e,i,o)=>{this._socket.emit("getRatings",!!t,((t,n)=>{o.elapsed||(o.clearTimeout(),t?i(new Error(t)):e(n))}))}})}getCurrentSession(t){const e=new AbortController;return this.request({commandTimeout:t||5e3,onTimeout:()=>{e.abort()},executor:async(t,i,o)=>{try{const i=await fetch("./session",{signal:e.signal});if(o.elapsed)return;o.clearTimeout(),t(i.json())}catch(n){i("getCurrentSession: ".concat(n))}}})}getCurrentInstance(){return this.request({cacheKey:"currentInstance",executor:(t,e,i)=>{this._socket.emit("getCurrentInstance",((o,n)=>{i.elapsed||(i.clearTimeout(),o&&e(o),t(n))}))}})}getAdapterInstances(t,e){let i;return"boolean"===typeof t?(e=t,i=""):i=t||"",this.request({cacheKey:"instances_".concat(i),forceUpdate:e,executor:(t,e,o)=>{this._socket.emit("getAdapterInstances",i,((i,n)=>{o.elapsed||(o.clearTimeout(),i&&e(i),t(n))}))}})}getAdapters(t,e){let i;return"boolean"===typeof t?(e=t,i=""):i=t||"",this.request({cacheKey:"adapter_".concat(i),forceUpdate:e,executor:(t,e,o)=>{this._socket.emit("getAdapters",i,((i,n)=>{o.elapsed||(o.clearTimeout(),i&&e(i),t(n))}))}})}getCompactAdapters(t){return this.request({cacheKey:"compactAdapters",forceUpdate:t,executor:(t,e,i)=>{this._socket.emit("getCompactAdapters",((o,n)=>{i.elapsed||(i.clearTimeout(),o&&e(o),t(n))}))}})}getAdaptersResetCache(t){var e;t=null!==(e=t)&&void 0!==e?e:"",this.resetCache("adapter_".concat(t)),this.resetCache("compactAdapters")}getCompactInstances(t){return this.request({cacheKey:"compactInstances",forceUpdate:t,executor:(t,e,i)=>{this._socket.emit("getCompactInstances",((o,n)=>{i.elapsed||(i.clearTimeout(),o&&e(o),t(n))}))}})}getAdapterInstancesResetCache(t){var e;t=null!==(e=t)&&void 0!==e?e:"",this.resetCache("instances_".concat(t)),this.resetCache("compactInstances")}getCompactInstalled(t,e,i){return t=c(t),this.request({cacheKey:"installedCompact_".concat(t),forceUpdate:e,commandTimeout:i,executor:(e,i,o)=>{this._socket.emit("getCompactInstalled",t,(t=>{o.elapsed||(o.clearTimeout(),t===n.PERMISSION_ERROR?i('May not read "getCompactInstalled"'):t?e(t):i('Cannot read "getCompactInstalled"'))}))}})}getInstalledResetCache(t){t?(this.resetCache("installedCompact_".concat(t)),this.resetCache("installed_".concat(t))):(this.resetCache("installedCompact_",!0),this.resetCache("installed_",!0))}getCompactRepository(t,e,i){return t=c(t),this.request({cacheKey:"repositoryCompact_".concat(t),forceUpdate:e,commandTimeout:i,executor:(e,i,o)=>{this._socket.emit("getCompactRepository",t,(t=>{o.elapsed||(o.clearTimeout(),t===n.PERMISSION_ERROR?i('May not read "getCompactRepository"'):t?e(t):i('Cannot read "getCompactRepository"'))}))}})}getRepositoryResetCache(t){t?(this.resetCache("repositoryCompact_".concat(t)),this.resetCache("repository_".concat(t))):(this.resetCache("repositoryCompact_",!0),this.resetCache("repository_",!0))}getCompactHosts(t){return this.request({cacheKey:"hostsCompact",forceUpdate:t,executor:(t,e,i)=>{this._socket.emit("getCompactHosts",((o,n)=>{i.elapsed||(i.clearTimeout(),o&&e(o),t(n))}))}})}getCompactSystemRepositories(t){return this.request({cacheKey:"repositoriesCompact",forceUpdate:t,executor:(t,e,i)=>{this._socket.emit("getCompactSystemRepositories",((o,n)=>{i.elapsed||(i.clearTimeout(),o&&e(o),t(n))}))}})}}}}]);
|
|
3
|
+
//# sourceMappingURL=1737.08641cc2.chunk.js.map
|