xjzh-component 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,6 +6,7 @@ self.onmessage = function (event) {
6
6
  } = event.data;
7
7
  let cameraNum = 0;
8
8
  let ws = new WebSocket(url);
9
+ console.log('object :>> ws', ws);
9
10
  // socket 连接
10
11
  ws.onopen = function () {
11
12
  self.postMessage({
@@ -16,6 +17,7 @@ self.onmessage = function (event) {
16
17
  ws.onmessage = async function ({
17
18
  data
18
19
  }) {
20
+ console.log('object :>> ws - data', data);
19
21
  if (data.size == 1) {
20
22
  // 摄像头数量 || 是否开启人脸
21
23
  cameraNum = await self.convertBlobToNumber(data);
@@ -386,22 +386,6 @@ var userAgent = navigator && navigator.userAgent;
386
386
  module.exports = userAgent ? String(userAgent) : '';
387
387
 
388
388
 
389
- /***/ }),
390
-
391
- /***/ 3008:
392
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
393
-
394
- // style-loader: Adds some css to the DOM by adding a <style> tag
395
-
396
- // load the styles
397
- var content = __webpack_require__(3570);
398
- if(content.__esModule) content = content.default;
399
- if(typeof content === 'string') content = [[module.id, content, '']];
400
- if(content.locals) module.exports = content.locals;
401
- // add the styles to the DOM
402
- var add = (__webpack_require__(9548)/* ["default"] */ .A)
403
- var update = add("4e066afe", content, true, {"sourceMap":false,"shadowMode":false});
404
-
405
389
  /***/ }),
406
390
 
407
391
  /***/ 3392:
@@ -420,27 +404,6 @@ module.exports = function (key) {
420
404
  };
421
405
 
422
406
 
423
- /***/ }),
424
-
425
- /***/ 3570:
426
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
427
-
428
- "use strict";
429
- __webpack_require__.r(__webpack_exports__);
430
- /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1601);
431
- /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
432
- /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6314);
433
- /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
434
- // Imports
435
-
436
-
437
- var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
438
- // Module
439
- ___CSS_LOADER_EXPORT___.push([module.id, ".xjzh-img-canvas[data-v-5aa81db6]{width:100%;height:100%;display:flex;justify-content:space-evenly;align-items:center;flex-wrap:wrap}.xjzh-img-canvas .itemBox[data-v-5aa81db6]{border-radius:4px;transform:translateZ(0);position:relative;overflow:hidden}.xjzh-img-canvas .itemBox .item-title[data-v-5aa81db6]{width:30px;height:30px;padding:0;margin:0;font-size:20px;border-radius:50%;text-align:center;line-height:30px;position:absolute;left:10px;top:10px;z-index:999;background-color:#fff;color:#0076f6}.xjzh-img-canvas .itemBox canvas[data-v-5aa81db6]{margin:0;padding:0;width:100%;height:100%;will-change:transform;image-rendering:optimizeSpeed;image-rendering:-moz-crisp-edges;image-rendering:-o-crisp-edges;image-rendering:-webkit-optimize-contrast;image-rendering:crisp-edges}.xjzh-img-canvas .itemBox[data-v-5aa81db6]:last-child{margin-bottom:0}.xjzh-img-canvas .full-screen[data-v-5aa81db6]{width:100%!important;height:100%!important;position:fixed;top:0;bottom:0;left:0;right:0;z-index:999}", ""]);
440
- // Exports
441
- /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
442
-
443
-
444
407
  /***/ }),
445
408
 
446
409
  /***/ 3706:
@@ -645,6 +608,27 @@ if (params + '' !== 'a=2') {
645
608
  }
646
609
 
647
610
 
611
+ /***/ }),
612
+
613
+ /***/ 4633:
614
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
615
+
616
+ "use strict";
617
+ __webpack_require__.r(__webpack_exports__);
618
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1601);
619
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
620
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6314);
621
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
622
+ // Imports
623
+
624
+
625
+ var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
626
+ // Module
627
+ ___CSS_LOADER_EXPORT___.push([module.id, ".xjzh-img-canvas[data-v-450f21fe]{width:100%;height:100%;display:flex;justify-content:space-evenly;align-items:center;flex-wrap:wrap}.xjzh-img-canvas .itemBox[data-v-450f21fe]{border-radius:4px;transform:translateZ(0);position:relative;overflow:hidden}.xjzh-img-canvas .itemBox .item-title[data-v-450f21fe]{width:30px;height:30px;padding:0;margin:0;font-size:20px;border-radius:50%;text-align:center;line-height:30px;position:absolute;left:10px;top:10px;z-index:999;background-color:#fff;color:#0076f6}.xjzh-img-canvas .itemBox canvas[data-v-450f21fe]{margin:0;padding:0;width:100%;height:100%;will-change:transform;image-rendering:optimizeSpeed;image-rendering:-moz-crisp-edges;image-rendering:-o-crisp-edges;image-rendering:-webkit-optimize-contrast;image-rendering:crisp-edges}.xjzh-img-canvas .itemBox[data-v-450f21fe]:last-child{margin-bottom:0}.xjzh-img-canvas .full-screen[data-v-450f21fe]{width:100%!important;height:100%!important;position:fixed;top:0;bottom:0;left:0;right:0;z-index:999}", ""]);
628
+ // Exports
629
+ /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
630
+
631
+
648
632
  /***/ }),
649
633
 
650
634
  /***/ 4901:
@@ -1034,6 +1018,22 @@ module.exports = function (bitmap, value) {
1034
1018
  };
1035
1019
 
1036
1020
 
1021
+ /***/ }),
1022
+
1023
+ /***/ 7011:
1024
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1025
+
1026
+ // style-loader: Adds some css to the DOM by adding a <style> tag
1027
+
1028
+ // load the styles
1029
+ var content = __webpack_require__(4633);
1030
+ if(content.__esModule) content = content.default;
1031
+ if(typeof content === 'string') content = [[module.id, content, '']];
1032
+ if(content.locals) module.exports = content.locals;
1033
+ // add the styles to the DOM
1034
+ var add = (__webpack_require__(9548)/* ["default"] */ .A)
1035
+ var update = add("ab4a675a", content, true, {"sourceMap":false,"shadowMode":false});
1036
+
1037
1037
  /***/ }),
1038
1038
 
1039
1039
  /***/ 7040:
@@ -1845,7 +1845,7 @@ if (typeof window !== 'undefined') {
1845
1845
  // Indicate to webpack that this file can be concatenated
1846
1846
  /* harmony default export */ var setPublicPath = (null);
1847
1847
 
1848
- ;// ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/xjzhImgCanvas.vue?vue&type=template&id=5aa81db6&scoped=true
1848
+ ;// ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/xjzhImgCanvas.vue?vue&type=template&id=450f21fe&scoped=true
1849
1849
  var render = function render() {
1850
1850
  var _vm = this,
1851
1851
  _c = _vm._self._c;
@@ -1979,7 +1979,9 @@ var web_url_search_params_size = __webpack_require__(8721);
1979
1979
  let count = 0;
1980
1980
  this.destroyWorker();
1981
1981
  this.destroyCanvasData();
1982
+ console.log('object :>> url', url);
1982
1983
  this.worker = new Worker(new URL(/* worker import */ __webpack_require__.p + __webpack_require__.u(906), __webpack_require__.b));
1984
+ console.log('object :>> this.worker', this.worker);
1983
1985
  this.worker.onmessage = async event => {
1984
1986
  const {
1985
1987
  type,
@@ -2152,9 +2154,9 @@ var web_url_search_params_size = __webpack_require__(8721);
2152
2154
  });
2153
2155
  ;// ./packages/components/xjzhImgCanvas.vue?vue&type=script&lang=js
2154
2156
  /* harmony default export */ var components_xjzhImgCanvasvue_type_script_lang_js = (xjzhImgCanvasvue_type_script_lang_js);
2155
- // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/xjzhImgCanvas.vue?vue&type=style&index=0&id=5aa81db6&prod&lang=scss&scoped=true
2156
- var xjzhImgCanvasvue_type_style_index_0_id_5aa81db6_prod_lang_scss_scoped_true = __webpack_require__(3008);
2157
- ;// ./packages/components/xjzhImgCanvas.vue?vue&type=style&index=0&id=5aa81db6&prod&lang=scss&scoped=true
2157
+ // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/xjzhImgCanvas.vue?vue&type=style&index=0&id=450f21fe&prod&lang=scss&scoped=true
2158
+ var xjzhImgCanvasvue_type_style_index_0_id_450f21fe_prod_lang_scss_scoped_true = __webpack_require__(7011);
2159
+ ;// ./packages/components/xjzhImgCanvas.vue?vue&type=style&index=0&id=450f21fe&prod&lang=scss&scoped=true
2158
2160
 
2159
2161
  ;// ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
2160
2162
  /* globals __VUE_SSR_CONTEXT__ */
@@ -2269,7 +2271,7 @@ var component = normalizeComponent(
2269
2271
  staticRenderFns,
2270
2272
  false,
2271
2273
  null,
2272
- "5aa81db6",
2274
+ "450f21fe",
2273
2275
  null
2274
2276
 
2275
2277
  )
@@ -16,6 +16,7 @@ self.onmessage = function (event) {
16
16
  } = event.data;
17
17
  let cameraNum = 0;
18
18
  let ws = new WebSocket(url);
19
+ console.log('object :>> ws', ws);
19
20
  // socket 连接
20
21
  ws.onopen = function () {
21
22
  self.postMessage({
@@ -26,6 +27,7 @@ self.onmessage = function (event) {
26
27
  ws.onmessage = async function ({
27
28
  data
28
29
  }) {
30
+ console.log('object :>> ws - data', data);
29
31
  if (data.size == 1) {
30
32
  // 摄像头数量 || 是否开启人脸
31
33
  cameraNum = await self.convertBlobToNumber(data);
@@ -281,27 +281,6 @@ var uncurryThis = __webpack_require__(9504);
281
281
  module.exports = uncurryThis({}.isPrototypeOf);
282
282
 
283
283
 
284
- /***/ }),
285
-
286
- /***/ 1762:
287
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
288
-
289
- "use strict";
290
- __webpack_require__.r(__webpack_exports__);
291
- /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1601);
292
- /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
293
- /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6314);
294
- /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
295
- // Imports
296
-
297
-
298
- var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
299
- // Module
300
- ___CSS_LOADER_EXPORT___.push([module.id, ".xjzh-img-canvas[data-v-5aa81db6]{width:100%;height:100%;display:flex;justify-content:space-evenly;align-items:center;flex-wrap:wrap}.xjzh-img-canvas .itemBox[data-v-5aa81db6]{border-radius:4px;transform:translateZ(0);position:relative;overflow:hidden}.xjzh-img-canvas .itemBox .item-title[data-v-5aa81db6]{width:30px;height:30px;padding:0;margin:0;font-size:20px;border-radius:50%;text-align:center;line-height:30px;position:absolute;left:10px;top:10px;z-index:999;background-color:#fff;color:#0076f6}.xjzh-img-canvas .itemBox canvas[data-v-5aa81db6]{margin:0;padding:0;width:100%;height:100%;will-change:transform;image-rendering:optimizeSpeed;image-rendering:-moz-crisp-edges;image-rendering:-o-crisp-edges;image-rendering:-webkit-optimize-contrast;image-rendering:crisp-edges}.xjzh-img-canvas .itemBox[data-v-5aa81db6]:last-child{margin-bottom:0}.xjzh-img-canvas .full-screen[data-v-5aa81db6]{width:100%!important;height:100%!important;position:fixed;top:0;bottom:0;left:0;right:0;z-index:999}", ""]);
301
- // Exports
302
- /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
303
-
304
-
305
284
  /***/ }),
306
285
 
307
286
  /***/ 2106:
@@ -402,6 +381,27 @@ module.exports = function (passed, required) {
402
381
  };
403
382
 
404
383
 
384
+ /***/ }),
385
+
386
+ /***/ 2825:
387
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
388
+
389
+ "use strict";
390
+ __webpack_require__.r(__webpack_exports__);
391
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1601);
392
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
393
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6314);
394
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
395
+ // Imports
396
+
397
+
398
+ var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
399
+ // Module
400
+ ___CSS_LOADER_EXPORT___.push([module.id, ".xjzh-img-canvas[data-v-450f21fe]{width:100%;height:100%;display:flex;justify-content:space-evenly;align-items:center;flex-wrap:wrap}.xjzh-img-canvas .itemBox[data-v-450f21fe]{border-radius:4px;transform:translateZ(0);position:relative;overflow:hidden}.xjzh-img-canvas .itemBox .item-title[data-v-450f21fe]{width:30px;height:30px;padding:0;margin:0;font-size:20px;border-radius:50%;text-align:center;line-height:30px;position:absolute;left:10px;top:10px;z-index:999;background-color:#fff;color:#0076f6}.xjzh-img-canvas .itemBox canvas[data-v-450f21fe]{margin:0;padding:0;width:100%;height:100%;will-change:transform;image-rendering:optimizeSpeed;image-rendering:-moz-crisp-edges;image-rendering:-o-crisp-edges;image-rendering:-webkit-optimize-contrast;image-rendering:crisp-edges}.xjzh-img-canvas .itemBox[data-v-450f21fe]:last-child{margin-bottom:0}.xjzh-img-canvas .full-screen[data-v-450f21fe]{width:100%!important;height:100%!important;position:fixed;top:0;bottom:0;left:0;right:0;z-index:999}", ""]);
401
+ // Exports
402
+ /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
403
+
404
+
405
405
  /***/ }),
406
406
 
407
407
  /***/ 2839:
@@ -639,22 +639,6 @@ if (params + '' !== 'a=2') {
639
639
  }
640
640
 
641
641
 
642
- /***/ }),
643
-
644
- /***/ 4710:
645
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
646
-
647
- // style-loader: Adds some css to the DOM by adding a <style> tag
648
-
649
- // load the styles
650
- var content = __webpack_require__(1762);
651
- if(content.__esModule) content = content.default;
652
- if(typeof content === 'string') content = [[module.id, content, '']];
653
- if(content.locals) module.exports = content.locals;
654
- // add the styles to the DOM
655
- var add = (__webpack_require__(9548)/* ["default"] */ .A)
656
- var update = add("21f25f42", content, true, {"sourceMap":false,"shadowMode":false});
657
-
658
642
  /***/ }),
659
643
 
660
644
  /***/ 4901:
@@ -1301,6 +1285,22 @@ module.exports = function (exec) {
1301
1285
  };
1302
1286
 
1303
1287
 
1288
+ /***/ }),
1289
+
1290
+ /***/ 9101:
1291
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1292
+
1293
+ // style-loader: Adds some css to the DOM by adding a <style> tag
1294
+
1295
+ // load the styles
1296
+ var content = __webpack_require__(2825);
1297
+ if(content.__esModule) content = content.default;
1298
+ if(typeof content === 'string') content = [[module.id, content, '']];
1299
+ if(content.locals) module.exports = content.locals;
1300
+ // add the styles to the DOM
1301
+ var add = (__webpack_require__(9548)/* ["default"] */ .A)
1302
+ var update = add("7e46c097", content, true, {"sourceMap":false,"shadowMode":false});
1303
+
1304
1304
  /***/ }),
1305
1305
 
1306
1306
  /***/ 9297:
@@ -1855,7 +1855,7 @@ if (typeof window !== 'undefined') {
1855
1855
  // Indicate to webpack that this file can be concatenated
1856
1856
  /* harmony default export */ var setPublicPath = (null);
1857
1857
 
1858
- ;// ./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/babel-loader/lib/index.js!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/xjzhImgCanvas.vue?vue&type=template&id=5aa81db6&scoped=true
1858
+ ;// ./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/babel-loader/lib/index.js!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/xjzhImgCanvas.vue?vue&type=template&id=450f21fe&scoped=true
1859
1859
  var render = function render() {
1860
1860
  var _vm = this,
1861
1861
  _c = _vm._self._c;
@@ -1989,7 +1989,9 @@ var web_url_search_params_size = __webpack_require__(8721);
1989
1989
  let count = 0;
1990
1990
  this.destroyWorker();
1991
1991
  this.destroyCanvasData();
1992
+ console.log('object :>> url', url);
1992
1993
  this.worker = new Worker(new URL(/* worker import */ __webpack_require__.p + __webpack_require__.u(600), __webpack_require__.b));
1994
+ console.log('object :>> this.worker', this.worker);
1993
1995
  this.worker.onmessage = async event => {
1994
1996
  const {
1995
1997
  type,
@@ -2162,9 +2164,9 @@ var web_url_search_params_size = __webpack_require__(8721);
2162
2164
  });
2163
2165
  ;// ./packages/components/xjzhImgCanvas.vue?vue&type=script&lang=js
2164
2166
  /* harmony default export */ var components_xjzhImgCanvasvue_type_script_lang_js = (xjzhImgCanvasvue_type_script_lang_js);
2165
- // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-64.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-64.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-64.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-64.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-64.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/xjzhImgCanvas.vue?vue&type=style&index=0&id=5aa81db6&prod&lang=scss&scoped=true
2166
- var xjzhImgCanvasvue_type_style_index_0_id_5aa81db6_prod_lang_scss_scoped_true = __webpack_require__(4710);
2167
- ;// ./packages/components/xjzhImgCanvas.vue?vue&type=style&index=0&id=5aa81db6&prod&lang=scss&scoped=true
2167
+ // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-64.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-64.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-64.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-64.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-64.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/xjzhImgCanvas.vue?vue&type=style&index=0&id=450f21fe&prod&lang=scss&scoped=true
2168
+ var xjzhImgCanvasvue_type_style_index_0_id_450f21fe_prod_lang_scss_scoped_true = __webpack_require__(9101);
2169
+ ;// ./packages/components/xjzhImgCanvas.vue?vue&type=style&index=0&id=450f21fe&prod&lang=scss&scoped=true
2168
2170
 
2169
2171
  ;// ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
2170
2172
  /* globals __VUE_SSR_CONTEXT__ */
@@ -2279,7 +2281,7 @@ var component = normalizeComponent(
2279
2281
  staticRenderFns,
2280
2282
  false,
2281
2283
  null,
2282
- "5aa81db6",
2284
+ "450f21fe",
2283
2285
  null
2284
2286
 
2285
2287
  )
@@ -1,2 +1,2 @@
1
- (function(e,o){"object"===typeof exports&&"object"===typeof module?module.exports=o():"function"===typeof define&&define.amd?define([],o):"object"===typeof exports?exports["xjzh-component"]=o():e["xjzh-component"]=o()})("undefined"!==typeof self?self:this,function(){return function(){var e={};return self.onmessage=function(e){const{url:o}=e.data;let t=0,n=new WebSocket(o);n.onopen=function(){self.postMessage({type:"open"})},n.onmessage=async function({data:e}){if(1==e.size)t=await self.convertBlobToNumber(e),self.postMessage({type:"message",data:t});else{let o=new Blob([e],{type:"image/jpeg"});self.postMessage({type:"message",data:o}),o=null}e=null},n.onclose=function(e){self.postMessage({type:"close",event:e}),n=null,setTimeout(()=>{n=new WebSocket(o)},1e3)},n.onerror=function(e){self.postMessage({type:"error",error:e})}},self.convertBlobToNumber=function(e){return new Promise((o,t)=>{let n=new FileReader;n.onload=e=>{o(e.target.result.charCodeAt(0)),n=null},n.onerror=e=>{t(e)},n.readAsText(e)})},e}()});
1
+ (function(e,o){"object"===typeof exports&&"object"===typeof module?module.exports=o():"function"===typeof define&&define.amd?define([],o):"object"===typeof exports?exports["xjzh-component"]=o():e["xjzh-component"]=o()})("undefined"!==typeof self?self:this,function(){return function(){var e={};return self.onmessage=function(e){const{url:o}=e.data;let t=0,n=new WebSocket(o);console.log("object :>> ws",n),n.onopen=function(){self.postMessage({type:"open"})},n.onmessage=async function({data:e}){if(console.log("object :>> ws - data",e),1==e.size)t=await self.convertBlobToNumber(e),self.postMessage({type:"message",data:t});else{let o=new Blob([e],{type:"image/jpeg"});self.postMessage({type:"message",data:o}),o=null}e=null},n.onclose=function(e){self.postMessage({type:"close",event:e}),n=null,setTimeout(()=>{n=new WebSocket(o)},1e3)},n.onerror=function(e){self.postMessage({type:"error",error:e})}},self.convertBlobToNumber=function(e){return new Promise((o,t)=>{let n=new FileReader;n.onload=e=>{o(e.target.result.charCodeAt(0)),n=null},n.onerror=e=>{t(e)},n.readAsText(e)})},e}()});
2
2
  //# sourceMappingURL=xjzh-component.umd.min.221.js.map
@@ -1,2 +1,2 @@
1
- (function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["xjzh-component"]=e():t["xjzh-component"]=e()})("undefined"!==typeof self?self:this,function(){return function(){var t={34:function(t,e,r){"use strict";var n=r(4901);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},283:function(t,e,r){"use strict";var n=r(9504),i=r(9039),o=r(4901),a=r(9297),s=r(3724),c=r(350).CONFIGURABLE,u=r(3706),l=r(1181),f=l.enforce,h=l.get,d=String,p=Object.defineProperty,m=n("".slice),v=n("".replace),g=n([].join),b=s&&!i(function(){return 8!==p(function(){},"length",{value:8}).length}),y=String(String).split("String"),w=t.exports=function(t,e,r){"Symbol("===m(d(e),0,7)&&(e="["+v(d(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!a(t,"name")||c&&t.name!==e)&&(s?p(t,"name",{value:e,configurable:!0}):t.name=e),b&&r&&a(r,"arity")&&t.length!==r.arity&&p(t,"length",{value:r.arity});try{r&&a(r,"constructor")&&r.constructor?s&&p(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(i){}var n=f(t);return a(n,"source")||(n.source=g(y,"string"==typeof e?e:"")),t};Function.prototype.toString=w(function(){return o(this)&&h(this).source||u(this)},"toString")},350:function(t,e,r){"use strict";var n=r(3724),i=r(9297),o=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,s=i(o,"name"),c=s&&"something"===function(){}.name,u=s&&(!n||n&&a(o,"name").configurable);t.exports={EXISTS:s,PROPER:c,CONFIGURABLE:u}},421:function(t){"use strict";t.exports={}},616:function(t,e,r){"use strict";var n=r(9039);t.exports=!n(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})},655:function(t,e,r){"use strict";var n=r(6955),i=String;t.exports=function(t){if("Symbol"===n(t))throw new TypeError("Cannot convert a Symbol value to a string");return i(t)}},757:function(t,e,r){"use strict";var n=r(7751),i=r(4901),o=r(1625),a=r(7040),s=Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var e=n("Symbol");return i(e)&&o(e.prototype,s(t))}},1181:function(t,e,r){"use strict";var n,i,o,a=r(8622),s=r(4576),c=r(34),u=r(6699),l=r(9297),f=r(7629),h=r(6119),d=r(421),p="Object already initialized",m=s.TypeError,v=s.WeakMap,g=function(t){return o(t)?i(t):n(t,{})},b=function(t){return function(e){var r;if(!c(e)||(r=i(e)).type!==t)throw new m("Incompatible receiver, "+t+" required");return r}};if(a||f.state){var y=f.state||(f.state=new v);y.get=y.get,y.has=y.has,y.set=y.set,n=function(t,e){if(y.has(t))throw new m(p);return e.facade=t,y.set(t,e),e},i=function(t){return y.get(t)||{}},o=function(t){return y.has(t)}}else{var w=h("state");d[w]=!0,n=function(t,e){if(l(t,w))throw new m(p);return e.facade=t,u(t,w,e),e},i=function(t){return l(t,w)?t[w]:{}},o=function(t){return l(t,w)}}t.exports={set:n,get:i,has:o,enforce:g,getterFor:b}},1601:function(t){"use strict";t.exports=function(t){return t[1]}},1625:function(t,e,r){"use strict";var n=r(9504);t.exports=n({}.isPrototypeOf)},2106:function(t,e,r){"use strict";var n=r(283),i=r(4913);t.exports=function(t,e,r){return r.get&&n(r.get,e,{getter:!0}),r.set&&n(r.set,e,{setter:!0}),i.f(t,e,r)}},2140:function(t,e,r){"use strict";var n=r(8227),i=n("toStringTag"),o={};o[i]="z",t.exports="[object z]"===String(o)},2195:function(t,e,r){"use strict";var n=r(9504),i=n({}.toString),o=n("".slice);t.exports=function(t){return o(i(t),8,-1)}},2777:function(t,e,r){"use strict";var n=r(9565),i=r(34),o=r(757),a=r(5966),s=r(4270),c=r(8227),u=TypeError,l=c("toPrimitive");t.exports=function(t,e){if(!i(t)||o(t))return t;var r,c=a(t,l);if(c){if(void 0===e&&(e="default"),r=n(c,t,e),!i(r)||o(r))return r;throw new u("Can't convert object to primitive value")}return void 0===e&&(e="number"),s(t,e)}},2812:function(t){"use strict";var e=TypeError;t.exports=function(t,r){if(t<r)throw new e("Not enough arguments");return t}},2839:function(t,e,r){"use strict";var n=r(4576),i=n.navigator,o=i&&i.userAgent;t.exports=o?String(o):""},3392:function(t,e,r){"use strict";var n=r(9504),i=0,o=Math.random(),a=n(1.1.toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++i+o,36)}},3706:function(t,e,r){"use strict";var n=r(9504),i=r(4901),o=r(7629),a=n(Function.toString);i(o.inspectSource)||(o.inspectSource=function(t){return a(t)}),t.exports=o.inspectSource},3724:function(t,e,r){"use strict";var n=r(9039);t.exports=!n(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},4055:function(t,e,r){"use strict";var n=r(4576),i=r(34),o=n.document,a=i(o)&&i(o.createElement);t.exports=function(t){return a?o.createElement(t):{}}},4117:function(t){"use strict";t.exports=function(t){return null===t||void 0===t}},4270:function(t,e,r){"use strict";var n=r(9565),i=r(4901),o=r(34),a=TypeError;t.exports=function(t,e){var r,s;if("string"===e&&i(r=t.toString)&&!o(s=n(r,t)))return s;if(i(r=t.valueOf)&&!o(s=n(r,t)))return s;if("string"!==e&&i(r=t.toString)&&!o(s=n(r,t)))return s;throw new a("Can't convert object to primitive value")}},4495:function(t,e,r){"use strict";var n=r(9519),i=r(9039),o=r(4576),a=o.String;t.exports=!!Object.getOwnPropertySymbols&&!i(function(){var t=Symbol("symbol detection");return!a(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41})},4574:function(t,e,r){"use strict";r.r(e);var n=r(1601),i=r.n(n),o=r(6314),a=r.n(o),s=a()(i());s.push([t.id,".xjzh-img-canvas[data-v-5aa81db6]{width:100%;height:100%;display:flex;justify-content:space-evenly;align-items:center;flex-wrap:wrap}.xjzh-img-canvas .itemBox[data-v-5aa81db6]{border-radius:4px;transform:translateZ(0);position:relative;overflow:hidden}.xjzh-img-canvas .itemBox .item-title[data-v-5aa81db6]{width:30px;height:30px;padding:0;margin:0;font-size:20px;border-radius:50%;text-align:center;line-height:30px;position:absolute;left:10px;top:10px;z-index:999;background-color:#fff;color:#0076f6}.xjzh-img-canvas .itemBox canvas[data-v-5aa81db6]{margin:0;padding:0;width:100%;height:100%;will-change:transform;image-rendering:optimizeSpeed;image-rendering:-moz-crisp-edges;image-rendering:-o-crisp-edges;image-rendering:-webkit-optimize-contrast;image-rendering:crisp-edges}.xjzh-img-canvas .itemBox[data-v-5aa81db6]:last-child{margin-bottom:0}.xjzh-img-canvas .full-screen[data-v-5aa81db6]{width:100%!important;height:100%!important;position:fixed;top:0;bottom:0;left:0;right:0;z-index:999}",""]),e["default"]=s},4576:function(t,e,r){"use strict";var n=function(t){return t&&t.Math===Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()},4603:function(t,e,r){"use strict";var n=r(6840),i=r(9504),o=r(655),a=r(2812),s=URLSearchParams,c=s.prototype,u=i(c.append),l=i(c["delete"]),f=i(c.forEach),h=i([].push),d=new s("a=1&a=2&b=3");d["delete"]("a",1),d["delete"]("b",void 0),d+""!=="a=2"&&n(c,"delete",function(t){var e=arguments.length,r=e<2?void 0:arguments[1];if(e&&void 0===r)return l(this,t);var n=[];f(this,function(t,e){h(n,{key:e,value:t})}),a(e,1);var i,s=o(t),c=o(r),d=0,p=0,m=!1,v=n.length;while(d<v)i=n[d++],m||i.key===s?(m=!0,l(this,i.key)):p++;while(p<v)i=n[p++],i.key===s&&i.value===c||u(this,i.key,i.value)},{enumerable:!0,unsafe:!0})},4901:function(t){"use strict";var e="object"==typeof document&&document.all;t.exports="undefined"==typeof e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},4913:function(t,e,r){"use strict";var n=r(3724),i=r(5917),o=r(8686),a=r(8551),s=r(6969),c=TypeError,u=Object.defineProperty,l=Object.getOwnPropertyDescriptor,f="enumerable",h="configurable",d="writable";e.f=n?o?function(t,e,r){if(a(t),e=s(e),a(r),"function"===typeof t&&"prototype"===e&&"value"in r&&d in r&&!r[d]){var n=l(t,e);n&&n[d]&&(t[e]=r.value,r={configurable:h in r?r[h]:n[h],enumerable:f in r?r[f]:n[f],writable:!1})}return u(t,e,r)}:u:function(t,e,r){if(a(t),e=s(e),a(r),i)try{return u(t,e,r)}catch(n){}if("get"in r||"set"in r)throw new c("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},5745:function(t,e,r){"use strict";var n=r(7629);t.exports=function(t,e){return n[t]||(n[t]=e||{})}},5917:function(t,e,r){"use strict";var n=r(3724),i=r(9039),o=r(4055);t.exports=!n&&!i(function(){return 7!==Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a})},5966:function(t,e,r){"use strict";var n=r(9306),i=r(4117);t.exports=function(t,e){var r=t[e];return i(r)?void 0:n(r)}},6119:function(t,e,r){"use strict";var n=r(5745),i=r(3392),o=n("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},6314:function(t){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var r="",n="undefined"!==typeof e[5];return e[4]&&(r+="@supports (".concat(e[4],") {")),e[2]&&(r+="@media ".concat(e[2]," {")),n&&(r+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),r+=t(e),n&&(r+="}"),e[2]&&(r+="}"),e[4]&&(r+="}"),r}).join("")},e.i=function(t,r,n,i,o){"string"===typeof t&&(t=[[null,t,void 0]]);var a={};if(n)for(var s=0;s<this.length;s++){var c=this[s][0];null!=c&&(a[c]=!0)}for(var u=0;u<t.length;u++){var l=[].concat(t[u]);n&&a[l[0]]||("undefined"!==typeof o&&("undefined"===typeof l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=o),r&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=r):l[2]=r),i&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=i):l[4]="".concat(i)),e.push(l))}},e}},6365:function(t,e,r){var n=r(4574);n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.id,n,""]]),n.locals&&(t.exports=n.locals);var i=r(9548).A;i("10ff17d4",n,!0,{sourceMap:!1,shadowMode:!1})},6395:function(t){"use strict";t.exports=!1},6699:function(t,e,r){"use strict";var n=r(3724),i=r(4913),o=r(6980);t.exports=n?function(t,e,r){return i.f(t,e,o(1,r))}:function(t,e,r){return t[e]=r,t}},6823:function(t){"use strict";var e=String;t.exports=function(t){try{return e(t)}catch(r){return"Object"}}},6840:function(t,e,r){"use strict";var n=r(4901),i=r(4913),o=r(283),a=r(9433);t.exports=function(t,e,r,s){s||(s={});var c=s.enumerable,u=void 0!==s.name?s.name:e;if(n(r)&&o(r,u,s),s.global)c?t[e]=r:a(e,r);else{try{s.unsafe?t[e]&&(c=!0):delete t[e]}catch(l){}c?t[e]=r:i.f(t,e,{value:r,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return t}},6955:function(t,e,r){"use strict";var n=r(2140),i=r(4901),o=r(2195),a=r(8227),s=a("toStringTag"),c=Object,u="Arguments"===o(function(){return arguments}()),l=function(t,e){try{return t[e]}catch(r){}};t.exports=n?o:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=l(e=c(t),s))?r:u?o(e):"Object"===(n=o(e))&&i(e.callee)?"Arguments":n}},6969:function(t,e,r){"use strict";var n=r(2777),i=r(757);t.exports=function(t){var e=n(t,"string");return i(e)?e:e+""}},6980:function(t){"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},7040:function(t,e,r){"use strict";var n=r(4495);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},7566:function(t,e,r){"use strict";var n=r(6840),i=r(9504),o=r(655),a=r(2812),s=URLSearchParams,c=s.prototype,u=i(c.getAll),l=i(c.has),f=new s("a=1");!f.has("a",2)&&f.has("a",void 0)||n(c,"has",function(t){var e=arguments.length,r=e<2?void 0:arguments[1];if(e&&void 0===r)return l(this,t);var n=u(this,t);a(e,1);var i=o(r),s=0;while(s<n.length)if(n[s++]===i)return!0;return!1},{enumerable:!0,unsafe:!0})},7629:function(t,e,r){"use strict";var n=r(6395),i=r(4576),o=r(9433),a="__core-js_shared__",s=t.exports=i[a]||o(a,{});(s.versions||(s.versions=[])).push({version:"3.45.1",mode:n?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.45.1/LICENSE",source:"https://github.com/zloirock/core-js"})},7750:function(t,e,r){"use strict";var n=r(4117),i=TypeError;t.exports=function(t){if(n(t))throw new i("Can't call method on "+t);return t}},7751:function(t,e,r){"use strict";var n=r(4576),i=r(4901),o=function(t){return i(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?o(n[t]):n[t]&&n[t][e]}},8227:function(t,e,r){"use strict";var n=r(4576),i=r(5745),o=r(9297),a=r(3392),s=r(4495),c=r(7040),u=n.Symbol,l=i("wks"),f=c?u["for"]||u:u&&u.withoutSetter||a;t.exports=function(t){return o(l,t)||(l[t]=s&&o(u,t)?u[t]:f("Symbol."+t)),l[t]}},8551:function(t,e,r){"use strict";var n=r(34),i=String,o=TypeError;t.exports=function(t){if(n(t))return t;throw new o(i(t)+" is not an object")}},8622:function(t,e,r){"use strict";var n=r(4576),i=r(4901),o=n.WeakMap;t.exports=i(o)&&/native code/.test(String(o))},8686:function(t,e,r){"use strict";var n=r(3724),i=r(9039);t.exports=n&&i(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},8721:function(t,e,r){"use strict";var n=r(3724),i=r(9504),o=r(2106),a=URLSearchParams.prototype,s=i(a.forEach);n&&!("size"in a)&&o(a,"size",{get:function(){var t=0;return s(this,function(){t++}),t},configurable:!0,enumerable:!0})},8981:function(t,e,r){"use strict";var n=r(7750),i=Object;t.exports=function(t){return i(n(t))}},9039:function(t){"use strict";t.exports=function(t){try{return!!t()}catch(e){return!0}}},9297:function(t,e,r){"use strict";var n=r(9504),i=r(8981),o=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(i(t),e)}},9306:function(t,e,r){"use strict";var n=r(4901),i=r(6823),o=TypeError;t.exports=function(t){if(n(t))return t;throw new o(i(t)+" is not a function")}},9433:function(t,e,r){"use strict";var n=r(4576),i=Object.defineProperty;t.exports=function(t,e){try{i(n,t,{value:e,configurable:!0,writable:!0})}catch(r){n[t]=e}return e}},9504:function(t,e,r){"use strict";var n=r(616),i=Function.prototype,o=i.call,a=n&&i.bind.bind(o,o);t.exports=n?a:function(t){return function(){return o.apply(t,arguments)}}},9519:function(t,e,r){"use strict";var n,i,o=r(4576),a=r(2839),s=o.process,c=o.Deno,u=s&&s.versions||c&&c.version,l=u&&u.v8;l&&(n=l.split("."),i=n[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&a&&(n=a.match(/Edge\/(\d+)/),(!n||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/),n&&(i=+n[1]))),t.exports=i},9548:function(t,e,r){"use strict";function n(t,e){for(var r=[],n={},i=0;i<e.length;i++){var o=e[i],a=o[0],s=o[1],c=o[2],u=o[3],l={id:t+":"+i,css:s,media:c,sourceMap:u};n[a]?n[a].parts.push(l):r.push(n[a]={id:a,parts:[l]})}return r}r.d(e,{A:function(){return p}});var i="undefined"!==typeof document;if("undefined"!==typeof DEBUG&&DEBUG&&!i)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var o={},a=i&&(document.head||document.getElementsByTagName("head")[0]),s=null,c=0,u=!1,l=function(){},f=null,h="data-vue-ssr-id",d="undefined"!==typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function p(t,e,r,i){u=r,f=i||{};var a=n(t,e);return m(a),function(e){for(var r=[],i=0;i<a.length;i++){var s=a[i],c=o[s.id];c.refs--,r.push(c)}e?(a=n(t,e),m(a)):a=[];for(i=0;i<r.length;i++){c=r[i];if(0===c.refs){for(var u=0;u<c.parts.length;u++)c.parts[u]();delete o[c.id]}}}}function m(t){for(var e=0;e<t.length;e++){var r=t[e],n=o[r.id];if(n){n.refs++;for(var i=0;i<n.parts.length;i++)n.parts[i](r.parts[i]);for(;i<r.parts.length;i++)n.parts.push(g(r.parts[i]));n.parts.length>r.parts.length&&(n.parts.length=r.parts.length)}else{var a=[];for(i=0;i<r.parts.length;i++)a.push(g(r.parts[i]));o[r.id]={id:r.id,refs:1,parts:a}}}}function v(){var t=document.createElement("style");return t.type="text/css",a.appendChild(t),t}function g(t){var e,r,n=document.querySelector("style["+h+'~="'+t.id+'"]');if(n){if(u)return l;n.parentNode.removeChild(n)}if(d){var i=c++;n=s||(s=v()),e=y.bind(null,n,i,!1),r=y.bind(null,n,i,!0)}else n=v(),e=w.bind(null,n),r=function(){n.parentNode.removeChild(n)};return e(t),function(n){if(n){if(n.css===t.css&&n.media===t.media&&n.sourceMap===t.sourceMap)return;e(t=n)}else r()}}var b=function(){var t=[];return function(e,r){return t[e]=r,t.filter(Boolean).join("\n")}}();function y(t,e,r,n){var i=r?"":n.css;if(t.styleSheet)t.styleSheet.cssText=b(e,i);else{var o=document.createTextNode(i),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}function w(t,e){var r=e.css,n=e.media,i=e.sourceMap;if(n&&t.setAttribute("media",n),f.ssrId&&t.setAttribute(h,e.id),i&&(r+="\n/*# sourceURL="+i.sources[0]+" */",r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),t.styleSheet)t.styleSheet.cssText=r;else{while(t.firstChild)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))}}},9565:function(t,e,r){"use strict";var n=r(616),i=Function.prototype.call;t.exports=n?i.bind(i):function(){return i.apply(i,arguments)}}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={id:n,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}r.m=t,function(){r.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return r.d(e,{a:e}),e}}(),function(){r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})}}(),function(){r.u=function(t){return"xjzh-component.umd.min."+t+".js"}}(),function(){r.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"===typeof window)return window}}()}(),function(){r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}}(),function(){r.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}}(),function(){r.p=""}(),function(){r.b=document.baseURI||self.location.href}();var n={};return function(){"use strict";if(r.r(n),r.d(n,{default:function(){return T}}),"undefined"!==typeof window){var t=window.document.currentScript,e=t&&t.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);e&&(r.p=e[1])}var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"xjzh-img-canvas"},t._l(t.cameraObj,function(r,n){return e("div",{key:n,class:["itemBox",r.isFullScreen?"full-screen":""],style:{width:t.width,height:t.height},on:{click:function(e){return t.handleScreen(n)}}},[e("p",{directives:[{name:"show",rawName:"v-show",value:t.showTitle,expression:"showTitle"}],staticClass:"item-title"},[t._v(t._s(r.title))]),e("canvas",{ref:r.domeId,refInFor:!0})])}),0)},o=[],a=(r(4603),r(7566),r(8721),{name:"XjzhImgCanvas",props:{videoUrl:{type:String,default:"localhost:56000"},width:{type:String,default:"480px"},height:{type:String,default:"270px"},showTitle:{type:Boolean,default:!0},isSwitchSide:{type:Boolean,default:!1},canvasSize:{type:Array,default:()=>[1920,1080]}},watch:{isSwitchSide:{handler(t){console.log("object :>> ",t),this.cameraType[2].label=this.isSwitchSide?"显":"侧"}}},data(){return{cameraNum:0,cameraType:[{label:"斜",value:"main"},{label:"俯",value:"sub"},{label:"侧",value:"side"}],currentFullScreen:"",answerPhoto:{canvas:null,ctx:null,isPhoto:!1,canvasSize:[1920,1080]},cameraObj:null}},mounted(){this.initWorker()},methods:{initAnswerPhoto(){this.answerPhoto.canvas=document.createElement("canvas"),this.answerPhoto.ctx=this.answerPhoto.canvas.getContext("2d"),this.answerPhoto.canvas.width=this.canvasSize[0]*this.cameraNum,this.answerPhoto.canvas.height=this.canvasSize[1]},initCanvas(){for(let t=0;t<this.cameraNum;t++){let e=this.cameraType[t].value;this.cameraObj[e].canvas=this.$refs[this.cameraObj[e].domeId][0],this.cameraObj[e].ctx=this.cameraObj[e].canvas.getContext("2d"),this.cameraObj[e].canvas.width=this.canvasSize[0],this.cameraObj[e].canvas.height=this.canvasSize[1],this.cameraObj[e].imgBox=new Image}},initWorker(){const t=`ws://${this.videoUrl}/socket`;let e=0;this.destroyWorker(),this.destroyCanvasData(),this.worker=new Worker(new URL(r.p+r.u(221),r.b)),this.worker.onmessage=async t=>{const{type:r,data:n,event:i,error:o}=t.data;if("message"===r){if("number"===typeof n){this.cameraNum=n;for(let t=0;t<this.cameraNum;t++){let e=this.cameraType[t].value;this.cameraObj[e]={domeId:`canvas_${e}`,title:this.cameraType[t].label,canvas:null,ctx:null,totalFPS:0,showTotalFPS:0,frameSkip:0,imgBox:null,allUrl:[],isLoading:!1,isFullScreen:!1}}return this.$forceUpdate(),void this.$nextTick(()=>{this.initAnswerPhoto(),this.initCanvas()})}e++,this.showCanvas(this.cameraType[e-1].value,n),e=e>=this.cameraNum?0:e}"close"===r&&console.log("WebSocket closed:",i),"error"===r&&console.log(`WebSocket error: ${o.message}`)},this.worker.onerror=t=>{console.log(`Worker error: ${t.message}`)},this.cameraObj={},this.worker.postMessage({url:t})},destroyWorker(){this.worker&&(this.worker.terminate(),this.worker=null)},showCanvas(t,e){this.cameraObj[t].totalFPS++,this.cameraObj[t]&&this.cameraObj[t].imgBox&&this.cameraObj[t].ctx&&(this.currentFullScreen&&this.currentFullScreen!==t?this.destroyUrl(t):this.cameraObj[t].isLoading||(this.cameraObj[t].isLoading=!0,this.cameraObj[t].allUrl.unshift(URL.createObjectURL(e)),this.cameraObj[t].imgBox.src=this.cameraObj[t].allUrl[0],this.cameraObj[t].imgBox.onload=()=>{if(this.cameraObj[t].ctx){if(this.cameraObj[t].ctx.drawImage(this.cameraObj[t].imgBox,0,0,this.canvasSize[0],this.canvasSize[1]),this.cameraObj[t].isLoading=!1,this.answerPhoto.isPhoto)return this.cameraNum>0&&this.answerPhoto.ctx.drawImage(this.cameraObj.main.imgBox,0*this.answerPhoto.canvasSize[0],0,this.answerPhoto.canvasSize[0],this.answerPhoto.canvasSize[1]),this.cameraNum>1&&this.answerPhoto.ctx.drawImage(this.cameraObj.sub.imgBox,1*this.answerPhoto.canvasSize[0],0,this.answerPhoto.canvasSize[0],this.answerPhoto.canvasSize[1]),void(this.cameraNum>2&&this.answerPhoto.ctx.drawImage(this.cameraObj.side.imgBox,2*this.answerPhoto.canvasSize[0],0,this.answerPhoto.canvasSize[0],this.answerPhoto.canvasSize[1]));this.cameraObj[t].imgBox.src="",this.destroyUrl(t,this.cameraObj[t].maxUrlNum)}},this.cameraObj[t].imgBox.onerror=()=>{this.cameraObj[t].isLoading=!1,this.cameraObj[t]&&this.cameraObj[t].imgBox&&(this.cameraObj[t].imgBox.src="",this.destroyUrl(t,this.cameraObj[t].maxUrlNum))}))},handleScreen(t){this.$set(this.cameraObj[t],"isFullScreen",!this.cameraObj[t].isFullScreen),this.currentFullScreen=this.cameraObj[t].isFullScreen?t:"",this.$forceUpdate()},destroyCanvasData(){for(let t=0;t<this.cameraNum;t++){let e=this.cameraType[t].value;this.destroyUrl(e),this.destroyCanvas(e)}},destroyUrl(t){for(let e=0;e<this.cameraObj[t].allUrl.length;e++)URL.revokeObjectURL(this.cameraObj[t].allUrl[e]),delete this.cameraObj[t].allUrl[e];this.cameraObj[t].allUrl=[]},destroyCanvas(t){if(this.cameraObj[t])for(let e in this.cameraObj[t])"object"==typeof this.cameraObj[t][e]&&(this.cameraObj[t][e]=""),delete this.cameraObj[t][e]},allPhoto(){this.answerPhoto.isPhoto=!0;let t=(new Date).getTime();return new Promise(e=>{setTimeout(()=>{e(this.answerPhoto.canvas.toDataURL("image/jpeg"));let r=(new Date).getTime(),n=(r-t)/1e3;this.cameraObj.main.totalFPS=this.cameraObj.main.totalFPS+~~(30*n),this.cameraObj.sub.totalFPS=this.cameraObj.sub.totalFPS+~~(30*n),this.cameraObj.side.totalFPS=this.cameraObj.side.totalFPS+~~(30*n),this.answerPhoto.isPhoto=!1},200)})},selectPhoto(t){let e=this.cameraType[t-1].value;return this.videoObj.videoMergeSrc=this.cameraObj[e].canvas.toDataURL("image/jpeg"),this.videoObj.videoMergeSrc}},beforeDestroy(){this.answerPhoto.canvas=null,this.answerPhoto.ctx=null,this.destroyWorker(),this.destroyCanvasData()}}),s=a;r(6365);function c(t,e,r,n,i,o,a,s){var c,u="function"===typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=r,u._compiled=!0),n&&(u.functional=!0),o&&(u._scopeId="data-v-"+o),a?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=c):i&&(c=s?function(){i.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:i),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(t,e){return c.call(e),l(t,e)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,c):[c]}return{exports:t,options:u}}var u=c(s,i,o,!1,null,"5aa81db6",null),l=u.exports,f=function(){var t=this,e=t._self._c;return e("div")},h=[],d={name:"VideoRtsp",data(){return{}}},p=d,m=c(p,f,h,!1,null,null,null),v=m.exports,g=function(){var t=this,e=t._self._c;return e("div")},b=[],y={name:"VideoWebGl",data(){return{}}},w=y,x=c(w,g,b,!1,null,null,null),j=x.exports;const S=[l,v,j],O=function(t){O.installed||S.map(e=>t.component(e.name,e))};"undefined"!==typeof window&&window.Vue&&O(window.Vue);var P={install:O},T=P}(),n}()});
1
+ (function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["xjzh-component"]=e():t["xjzh-component"]=e()})("undefined"!==typeof self?self:this,function(){return function(){var t={34:function(t,e,r){"use strict";var n=r(4901);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},283:function(t,e,r){"use strict";var n=r(9504),i=r(9039),o=r(4901),a=r(9297),s=r(3724),c=r(350).CONFIGURABLE,u=r(3706),l=r(1181),f=l.enforce,h=l.get,p=String,d=Object.defineProperty,m=n("".slice),v=n("".replace),g=n([].join),b=s&&!i(function(){return 8!==d(function(){},"length",{value:8}).length}),y=String(String).split("String"),w=t.exports=function(t,e,r){"Symbol("===m(p(e),0,7)&&(e="["+v(p(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!a(t,"name")||c&&t.name!==e)&&(s?d(t,"name",{value:e,configurable:!0}):t.name=e),b&&r&&a(r,"arity")&&t.length!==r.arity&&d(t,"length",{value:r.arity});try{r&&a(r,"constructor")&&r.constructor?s&&d(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(i){}var n=f(t);return a(n,"source")||(n.source=g(y,"string"==typeof e?e:"")),t};Function.prototype.toString=w(function(){return o(this)&&h(this).source||u(this)},"toString")},350:function(t,e,r){"use strict";var n=r(3724),i=r(9297),o=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,s=i(o,"name"),c=s&&"something"===function(){}.name,u=s&&(!n||n&&a(o,"name").configurable);t.exports={EXISTS:s,PROPER:c,CONFIGURABLE:u}},421:function(t){"use strict";t.exports={}},616:function(t,e,r){"use strict";var n=r(9039);t.exports=!n(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})},655:function(t,e,r){"use strict";var n=r(6955),i=String;t.exports=function(t){if("Symbol"===n(t))throw new TypeError("Cannot convert a Symbol value to a string");return i(t)}},757:function(t,e,r){"use strict";var n=r(7751),i=r(4901),o=r(1625),a=r(7040),s=Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var e=n("Symbol");return i(e)&&o(e.prototype,s(t))}},1181:function(t,e,r){"use strict";var n,i,o,a=r(8622),s=r(4576),c=r(34),u=r(6699),l=r(9297),f=r(7629),h=r(6119),p=r(421),d="Object already initialized",m=s.TypeError,v=s.WeakMap,g=function(t){return o(t)?i(t):n(t,{})},b=function(t){return function(e){var r;if(!c(e)||(r=i(e)).type!==t)throw new m("Incompatible receiver, "+t+" required");return r}};if(a||f.state){var y=f.state||(f.state=new v);y.get=y.get,y.has=y.has,y.set=y.set,n=function(t,e){if(y.has(t))throw new m(d);return e.facade=t,y.set(t,e),e},i=function(t){return y.get(t)||{}},o=function(t){return y.has(t)}}else{var w=h("state");p[w]=!0,n=function(t,e){if(l(t,w))throw new m(d);return e.facade=t,u(t,w,e),e},i=function(t){return l(t,w)?t[w]:{}},o=function(t){return l(t,w)}}t.exports={set:n,get:i,has:o,enforce:g,getterFor:b}},1601:function(t){"use strict";t.exports=function(t){return t[1]}},1625:function(t,e,r){"use strict";var n=r(9504);t.exports=n({}.isPrototypeOf)},2106:function(t,e,r){"use strict";var n=r(283),i=r(4913);t.exports=function(t,e,r){return r.get&&n(r.get,e,{getter:!0}),r.set&&n(r.set,e,{setter:!0}),i.f(t,e,r)}},2140:function(t,e,r){"use strict";var n=r(8227),i=n("toStringTag"),o={};o[i]="z",t.exports="[object z]"===String(o)},2195:function(t,e,r){"use strict";var n=r(9504),i=n({}.toString),o=n("".slice);t.exports=function(t){return o(i(t),8,-1)}},2777:function(t,e,r){"use strict";var n=r(9565),i=r(34),o=r(757),a=r(5966),s=r(4270),c=r(8227),u=TypeError,l=c("toPrimitive");t.exports=function(t,e){if(!i(t)||o(t))return t;var r,c=a(t,l);if(c){if(void 0===e&&(e="default"),r=n(c,t,e),!i(r)||o(r))return r;throw new u("Can't convert object to primitive value")}return void 0===e&&(e="number"),s(t,e)}},2812:function(t){"use strict";var e=TypeError;t.exports=function(t,r){if(t<r)throw new e("Not enough arguments");return t}},2839:function(t,e,r){"use strict";var n=r(4576),i=n.navigator,o=i&&i.userAgent;t.exports=o?String(o):""},3392:function(t,e,r){"use strict";var n=r(9504),i=0,o=Math.random(),a=n(1.1.toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++i+o,36)}},3706:function(t,e,r){"use strict";var n=r(9504),i=r(4901),o=r(7629),a=n(Function.toString);i(o.inspectSource)||(o.inspectSource=function(t){return a(t)}),t.exports=o.inspectSource},3724:function(t,e,r){"use strict";var n=r(9039);t.exports=!n(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},4005:function(t,e,r){"use strict";r.r(e);var n=r(1601),i=r.n(n),o=r(6314),a=r.n(o),s=a()(i());s.push([t.id,".xjzh-img-canvas[data-v-450f21fe]{width:100%;height:100%;display:flex;justify-content:space-evenly;align-items:center;flex-wrap:wrap}.xjzh-img-canvas .itemBox[data-v-450f21fe]{border-radius:4px;transform:translateZ(0);position:relative;overflow:hidden}.xjzh-img-canvas .itemBox .item-title[data-v-450f21fe]{width:30px;height:30px;padding:0;margin:0;font-size:20px;border-radius:50%;text-align:center;line-height:30px;position:absolute;left:10px;top:10px;z-index:999;background-color:#fff;color:#0076f6}.xjzh-img-canvas .itemBox canvas[data-v-450f21fe]{margin:0;padding:0;width:100%;height:100%;will-change:transform;image-rendering:optimizeSpeed;image-rendering:-moz-crisp-edges;image-rendering:-o-crisp-edges;image-rendering:-webkit-optimize-contrast;image-rendering:crisp-edges}.xjzh-img-canvas .itemBox[data-v-450f21fe]:last-child{margin-bottom:0}.xjzh-img-canvas .full-screen[data-v-450f21fe]{width:100%!important;height:100%!important;position:fixed;top:0;bottom:0;left:0;right:0;z-index:999}",""]),e["default"]=s},4055:function(t,e,r){"use strict";var n=r(4576),i=r(34),o=n.document,a=i(o)&&i(o.createElement);t.exports=function(t){return a?o.createElement(t):{}}},4117:function(t){"use strict";t.exports=function(t){return null===t||void 0===t}},4270:function(t,e,r){"use strict";var n=r(9565),i=r(4901),o=r(34),a=TypeError;t.exports=function(t,e){var r,s;if("string"===e&&i(r=t.toString)&&!o(s=n(r,t)))return s;if(i(r=t.valueOf)&&!o(s=n(r,t)))return s;if("string"!==e&&i(r=t.toString)&&!o(s=n(r,t)))return s;throw new a("Can't convert object to primitive value")}},4495:function(t,e,r){"use strict";var n=r(9519),i=r(9039),o=r(4576),a=o.String;t.exports=!!Object.getOwnPropertySymbols&&!i(function(){var t=Symbol("symbol detection");return!a(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41})},4576:function(t,e,r){"use strict";var n=function(t){return t&&t.Math===Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()},4603:function(t,e,r){"use strict";var n=r(6840),i=r(9504),o=r(655),a=r(2812),s=URLSearchParams,c=s.prototype,u=i(c.append),l=i(c["delete"]),f=i(c.forEach),h=i([].push),p=new s("a=1&a=2&b=3");p["delete"]("a",1),p["delete"]("b",void 0),p+""!=="a=2"&&n(c,"delete",function(t){var e=arguments.length,r=e<2?void 0:arguments[1];if(e&&void 0===r)return l(this,t);var n=[];f(this,function(t,e){h(n,{key:e,value:t})}),a(e,1);var i,s=o(t),c=o(r),p=0,d=0,m=!1,v=n.length;while(p<v)i=n[p++],m||i.key===s?(m=!0,l(this,i.key)):d++;while(d<v)i=n[d++],i.key===s&&i.value===c||u(this,i.key,i.value)},{enumerable:!0,unsafe:!0})},4901:function(t){"use strict";var e="object"==typeof document&&document.all;t.exports="undefined"==typeof e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},4913:function(t,e,r){"use strict";var n=r(3724),i=r(5917),o=r(8686),a=r(8551),s=r(6969),c=TypeError,u=Object.defineProperty,l=Object.getOwnPropertyDescriptor,f="enumerable",h="configurable",p="writable";e.f=n?o?function(t,e,r){if(a(t),e=s(e),a(r),"function"===typeof t&&"prototype"===e&&"value"in r&&p in r&&!r[p]){var n=l(t,e);n&&n[p]&&(t[e]=r.value,r={configurable:h in r?r[h]:n[h],enumerable:f in r?r[f]:n[f],writable:!1})}return u(t,e,r)}:u:function(t,e,r){if(a(t),e=s(e),a(r),i)try{return u(t,e,r)}catch(n){}if("get"in r||"set"in r)throw new c("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},5326:function(t,e,r){var n=r(4005);n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.id,n,""]]),n.locals&&(t.exports=n.locals);var i=r(9548).A;i("6d537929",n,!0,{sourceMap:!1,shadowMode:!1})},5745:function(t,e,r){"use strict";var n=r(7629);t.exports=function(t,e){return n[t]||(n[t]=e||{})}},5917:function(t,e,r){"use strict";var n=r(3724),i=r(9039),o=r(4055);t.exports=!n&&!i(function(){return 7!==Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a})},5966:function(t,e,r){"use strict";var n=r(9306),i=r(4117);t.exports=function(t,e){var r=t[e];return i(r)?void 0:n(r)}},6119:function(t,e,r){"use strict";var n=r(5745),i=r(3392),o=n("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},6314:function(t){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var r="",n="undefined"!==typeof e[5];return e[4]&&(r+="@supports (".concat(e[4],") {")),e[2]&&(r+="@media ".concat(e[2]," {")),n&&(r+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),r+=t(e),n&&(r+="}"),e[2]&&(r+="}"),e[4]&&(r+="}"),r}).join("")},e.i=function(t,r,n,i,o){"string"===typeof t&&(t=[[null,t,void 0]]);var a={};if(n)for(var s=0;s<this.length;s++){var c=this[s][0];null!=c&&(a[c]=!0)}for(var u=0;u<t.length;u++){var l=[].concat(t[u]);n&&a[l[0]]||("undefined"!==typeof o&&("undefined"===typeof l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=o),r&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=r):l[2]=r),i&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=i):l[4]="".concat(i)),e.push(l))}},e}},6395:function(t){"use strict";t.exports=!1},6699:function(t,e,r){"use strict";var n=r(3724),i=r(4913),o=r(6980);t.exports=n?function(t,e,r){return i.f(t,e,o(1,r))}:function(t,e,r){return t[e]=r,t}},6823:function(t){"use strict";var e=String;t.exports=function(t){try{return e(t)}catch(r){return"Object"}}},6840:function(t,e,r){"use strict";var n=r(4901),i=r(4913),o=r(283),a=r(9433);t.exports=function(t,e,r,s){s||(s={});var c=s.enumerable,u=void 0!==s.name?s.name:e;if(n(r)&&o(r,u,s),s.global)c?t[e]=r:a(e,r);else{try{s.unsafe?t[e]&&(c=!0):delete t[e]}catch(l){}c?t[e]=r:i.f(t,e,{value:r,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return t}},6955:function(t,e,r){"use strict";var n=r(2140),i=r(4901),o=r(2195),a=r(8227),s=a("toStringTag"),c=Object,u="Arguments"===o(function(){return arguments}()),l=function(t,e){try{return t[e]}catch(r){}};t.exports=n?o:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=l(e=c(t),s))?r:u?o(e):"Object"===(n=o(e))&&i(e.callee)?"Arguments":n}},6969:function(t,e,r){"use strict";var n=r(2777),i=r(757);t.exports=function(t){var e=n(t,"string");return i(e)?e:e+""}},6980:function(t){"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},7040:function(t,e,r){"use strict";var n=r(4495);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},7566:function(t,e,r){"use strict";var n=r(6840),i=r(9504),o=r(655),a=r(2812),s=URLSearchParams,c=s.prototype,u=i(c.getAll),l=i(c.has),f=new s("a=1");!f.has("a",2)&&f.has("a",void 0)||n(c,"has",function(t){var e=arguments.length,r=e<2?void 0:arguments[1];if(e&&void 0===r)return l(this,t);var n=u(this,t);a(e,1);var i=o(r),s=0;while(s<n.length)if(n[s++]===i)return!0;return!1},{enumerable:!0,unsafe:!0})},7629:function(t,e,r){"use strict";var n=r(6395),i=r(4576),o=r(9433),a="__core-js_shared__",s=t.exports=i[a]||o(a,{});(s.versions||(s.versions=[])).push({version:"3.45.1",mode:n?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.45.1/LICENSE",source:"https://github.com/zloirock/core-js"})},7750:function(t,e,r){"use strict";var n=r(4117),i=TypeError;t.exports=function(t){if(n(t))throw new i("Can't call method on "+t);return t}},7751:function(t,e,r){"use strict";var n=r(4576),i=r(4901),o=function(t){return i(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?o(n[t]):n[t]&&n[t][e]}},8227:function(t,e,r){"use strict";var n=r(4576),i=r(5745),o=r(9297),a=r(3392),s=r(4495),c=r(7040),u=n.Symbol,l=i("wks"),f=c?u["for"]||u:u&&u.withoutSetter||a;t.exports=function(t){return o(l,t)||(l[t]=s&&o(u,t)?u[t]:f("Symbol."+t)),l[t]}},8551:function(t,e,r){"use strict";var n=r(34),i=String,o=TypeError;t.exports=function(t){if(n(t))return t;throw new o(i(t)+" is not an object")}},8622:function(t,e,r){"use strict";var n=r(4576),i=r(4901),o=n.WeakMap;t.exports=i(o)&&/native code/.test(String(o))},8686:function(t,e,r){"use strict";var n=r(3724),i=r(9039);t.exports=n&&i(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},8721:function(t,e,r){"use strict";var n=r(3724),i=r(9504),o=r(2106),a=URLSearchParams.prototype,s=i(a.forEach);n&&!("size"in a)&&o(a,"size",{get:function(){var t=0;return s(this,function(){t++}),t},configurable:!0,enumerable:!0})},8981:function(t,e,r){"use strict";var n=r(7750),i=Object;t.exports=function(t){return i(n(t))}},9039:function(t){"use strict";t.exports=function(t){try{return!!t()}catch(e){return!0}}},9297:function(t,e,r){"use strict";var n=r(9504),i=r(8981),o=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(i(t),e)}},9306:function(t,e,r){"use strict";var n=r(4901),i=r(6823),o=TypeError;t.exports=function(t){if(n(t))return t;throw new o(i(t)+" is not a function")}},9433:function(t,e,r){"use strict";var n=r(4576),i=Object.defineProperty;t.exports=function(t,e){try{i(n,t,{value:e,configurable:!0,writable:!0})}catch(r){n[t]=e}return e}},9504:function(t,e,r){"use strict";var n=r(616),i=Function.prototype,o=i.call,a=n&&i.bind.bind(o,o);t.exports=n?a:function(t){return function(){return o.apply(t,arguments)}}},9519:function(t,e,r){"use strict";var n,i,o=r(4576),a=r(2839),s=o.process,c=o.Deno,u=s&&s.versions||c&&c.version,l=u&&u.v8;l&&(n=l.split("."),i=n[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&a&&(n=a.match(/Edge\/(\d+)/),(!n||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/),n&&(i=+n[1]))),t.exports=i},9548:function(t,e,r){"use strict";function n(t,e){for(var r=[],n={},i=0;i<e.length;i++){var o=e[i],a=o[0],s=o[1],c=o[2],u=o[3],l={id:t+":"+i,css:s,media:c,sourceMap:u};n[a]?n[a].parts.push(l):r.push(n[a]={id:a,parts:[l]})}return r}r.d(e,{A:function(){return d}});var i="undefined"!==typeof document;if("undefined"!==typeof DEBUG&&DEBUG&&!i)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var o={},a=i&&(document.head||document.getElementsByTagName("head")[0]),s=null,c=0,u=!1,l=function(){},f=null,h="data-vue-ssr-id",p="undefined"!==typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function d(t,e,r,i){u=r,f=i||{};var a=n(t,e);return m(a),function(e){for(var r=[],i=0;i<a.length;i++){var s=a[i],c=o[s.id];c.refs--,r.push(c)}e?(a=n(t,e),m(a)):a=[];for(i=0;i<r.length;i++){c=r[i];if(0===c.refs){for(var u=0;u<c.parts.length;u++)c.parts[u]();delete o[c.id]}}}}function m(t){for(var e=0;e<t.length;e++){var r=t[e],n=o[r.id];if(n){n.refs++;for(var i=0;i<n.parts.length;i++)n.parts[i](r.parts[i]);for(;i<r.parts.length;i++)n.parts.push(g(r.parts[i]));n.parts.length>r.parts.length&&(n.parts.length=r.parts.length)}else{var a=[];for(i=0;i<r.parts.length;i++)a.push(g(r.parts[i]));o[r.id]={id:r.id,refs:1,parts:a}}}}function v(){var t=document.createElement("style");return t.type="text/css",a.appendChild(t),t}function g(t){var e,r,n=document.querySelector("style["+h+'~="'+t.id+'"]');if(n){if(u)return l;n.parentNode.removeChild(n)}if(p){var i=c++;n=s||(s=v()),e=y.bind(null,n,i,!1),r=y.bind(null,n,i,!0)}else n=v(),e=w.bind(null,n),r=function(){n.parentNode.removeChild(n)};return e(t),function(n){if(n){if(n.css===t.css&&n.media===t.media&&n.sourceMap===t.sourceMap)return;e(t=n)}else r()}}var b=function(){var t=[];return function(e,r){return t[e]=r,t.filter(Boolean).join("\n")}}();function y(t,e,r,n){var i=r?"":n.css;if(t.styleSheet)t.styleSheet.cssText=b(e,i);else{var o=document.createTextNode(i),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}function w(t,e){var r=e.css,n=e.media,i=e.sourceMap;if(n&&t.setAttribute("media",n),f.ssrId&&t.setAttribute(h,e.id),i&&(r+="\n/*# sourceURL="+i.sources[0]+" */",r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),t.styleSheet)t.styleSheet.cssText=r;else{while(t.firstChild)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))}}},9565:function(t,e,r){"use strict";var n=r(616),i=Function.prototype.call;t.exports=n?i.bind(i):function(){return i.apply(i,arguments)}}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={id:n,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}r.m=t,function(){r.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return r.d(e,{a:e}),e}}(),function(){r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})}}(),function(){r.u=function(t){return"xjzh-component.umd.min."+t+".js"}}(),function(){r.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"===typeof window)return window}}()}(),function(){r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}}(),function(){r.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}}(),function(){r.p=""}(),function(){r.b=document.baseURI||self.location.href}();var n={};return function(){"use strict";if(r.r(n),r.d(n,{default:function(){return T}}),"undefined"!==typeof window){var t=window.document.currentScript,e=t&&t.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);e&&(r.p=e[1])}var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"xjzh-img-canvas"},t._l(t.cameraObj,function(r,n){return e("div",{key:n,class:["itemBox",r.isFullScreen?"full-screen":""],style:{width:t.width,height:t.height},on:{click:function(e){return t.handleScreen(n)}}},[e("p",{directives:[{name:"show",rawName:"v-show",value:t.showTitle,expression:"showTitle"}],staticClass:"item-title"},[t._v(t._s(r.title))]),e("canvas",{ref:r.domeId,refInFor:!0})])}),0)},o=[],a=(r(4603),r(7566),r(8721),{name:"XjzhImgCanvas",props:{videoUrl:{type:String,default:"localhost:56000"},width:{type:String,default:"480px"},height:{type:String,default:"270px"},showTitle:{type:Boolean,default:!0},isSwitchSide:{type:Boolean,default:!1},canvasSize:{type:Array,default:()=>[1920,1080]}},watch:{isSwitchSide:{handler(t){console.log("object :>> ",t),this.cameraType[2].label=this.isSwitchSide?"显":"侧"}}},data(){return{cameraNum:0,cameraType:[{label:"斜",value:"main"},{label:"俯",value:"sub"},{label:"侧",value:"side"}],currentFullScreen:"",answerPhoto:{canvas:null,ctx:null,isPhoto:!1,canvasSize:[1920,1080]},cameraObj:null}},mounted(){this.initWorker()},methods:{initAnswerPhoto(){this.answerPhoto.canvas=document.createElement("canvas"),this.answerPhoto.ctx=this.answerPhoto.canvas.getContext("2d"),this.answerPhoto.canvas.width=this.canvasSize[0]*this.cameraNum,this.answerPhoto.canvas.height=this.canvasSize[1]},initCanvas(){for(let t=0;t<this.cameraNum;t++){let e=this.cameraType[t].value;this.cameraObj[e].canvas=this.$refs[this.cameraObj[e].domeId][0],this.cameraObj[e].ctx=this.cameraObj[e].canvas.getContext("2d"),this.cameraObj[e].canvas.width=this.canvasSize[0],this.cameraObj[e].canvas.height=this.canvasSize[1],this.cameraObj[e].imgBox=new Image}},initWorker(){const t=`ws://${this.videoUrl}/socket`;let e=0;this.destroyWorker(),this.destroyCanvasData(),console.log("object :>> url",t),this.worker=new Worker(new URL(r.p+r.u(221),r.b)),console.log("object :>> this.worker",this.worker),this.worker.onmessage=async t=>{const{type:r,data:n,event:i,error:o}=t.data;if("message"===r){if("number"===typeof n){this.cameraNum=n;for(let t=0;t<this.cameraNum;t++){let e=this.cameraType[t].value;this.cameraObj[e]={domeId:`canvas_${e}`,title:this.cameraType[t].label,canvas:null,ctx:null,totalFPS:0,showTotalFPS:0,frameSkip:0,imgBox:null,allUrl:[],isLoading:!1,isFullScreen:!1}}return this.$forceUpdate(),void this.$nextTick(()=>{this.initAnswerPhoto(),this.initCanvas()})}e++,this.showCanvas(this.cameraType[e-1].value,n),e=e>=this.cameraNum?0:e}"close"===r&&console.log("WebSocket closed:",i),"error"===r&&console.log(`WebSocket error: ${o.message}`)},this.worker.onerror=t=>{console.log(`Worker error: ${t.message}`)},this.cameraObj={},this.worker.postMessage({url:t})},destroyWorker(){this.worker&&(this.worker.terminate(),this.worker=null)},showCanvas(t,e){this.cameraObj[t].totalFPS++,this.cameraObj[t]&&this.cameraObj[t].imgBox&&this.cameraObj[t].ctx&&(this.currentFullScreen&&this.currentFullScreen!==t?this.destroyUrl(t):this.cameraObj[t].isLoading||(this.cameraObj[t].isLoading=!0,this.cameraObj[t].allUrl.unshift(URL.createObjectURL(e)),this.cameraObj[t].imgBox.src=this.cameraObj[t].allUrl[0],this.cameraObj[t].imgBox.onload=()=>{if(this.cameraObj[t].ctx){if(this.cameraObj[t].ctx.drawImage(this.cameraObj[t].imgBox,0,0,this.canvasSize[0],this.canvasSize[1]),this.cameraObj[t].isLoading=!1,this.answerPhoto.isPhoto)return this.cameraNum>0&&this.answerPhoto.ctx.drawImage(this.cameraObj.main.imgBox,0*this.answerPhoto.canvasSize[0],0,this.answerPhoto.canvasSize[0],this.answerPhoto.canvasSize[1]),this.cameraNum>1&&this.answerPhoto.ctx.drawImage(this.cameraObj.sub.imgBox,1*this.answerPhoto.canvasSize[0],0,this.answerPhoto.canvasSize[0],this.answerPhoto.canvasSize[1]),void(this.cameraNum>2&&this.answerPhoto.ctx.drawImage(this.cameraObj.side.imgBox,2*this.answerPhoto.canvasSize[0],0,this.answerPhoto.canvasSize[0],this.answerPhoto.canvasSize[1]));this.cameraObj[t].imgBox.src="",this.destroyUrl(t,this.cameraObj[t].maxUrlNum)}},this.cameraObj[t].imgBox.onerror=()=>{this.cameraObj[t].isLoading=!1,this.cameraObj[t]&&this.cameraObj[t].imgBox&&(this.cameraObj[t].imgBox.src="",this.destroyUrl(t,this.cameraObj[t].maxUrlNum))}))},handleScreen(t){this.$set(this.cameraObj[t],"isFullScreen",!this.cameraObj[t].isFullScreen),this.currentFullScreen=this.cameraObj[t].isFullScreen?t:"",this.$forceUpdate()},destroyCanvasData(){for(let t=0;t<this.cameraNum;t++){let e=this.cameraType[t].value;this.destroyUrl(e),this.destroyCanvas(e)}},destroyUrl(t){for(let e=0;e<this.cameraObj[t].allUrl.length;e++)URL.revokeObjectURL(this.cameraObj[t].allUrl[e]),delete this.cameraObj[t].allUrl[e];this.cameraObj[t].allUrl=[]},destroyCanvas(t){if(this.cameraObj[t])for(let e in this.cameraObj[t])"object"==typeof this.cameraObj[t][e]&&(this.cameraObj[t][e]=""),delete this.cameraObj[t][e]},allPhoto(){this.answerPhoto.isPhoto=!0;let t=(new Date).getTime();return new Promise(e=>{setTimeout(()=>{e(this.answerPhoto.canvas.toDataURL("image/jpeg"));let r=(new Date).getTime(),n=(r-t)/1e3;this.cameraObj.main.totalFPS=this.cameraObj.main.totalFPS+~~(30*n),this.cameraObj.sub.totalFPS=this.cameraObj.sub.totalFPS+~~(30*n),this.cameraObj.side.totalFPS=this.cameraObj.side.totalFPS+~~(30*n),this.answerPhoto.isPhoto=!1},200)})},selectPhoto(t){let e=this.cameraType[t-1].value;return this.videoObj.videoMergeSrc=this.cameraObj[e].canvas.toDataURL("image/jpeg"),this.videoObj.videoMergeSrc}},beforeDestroy(){this.answerPhoto.canvas=null,this.answerPhoto.ctx=null,this.destroyWorker(),this.destroyCanvasData()}}),s=a;r(5326);function c(t,e,r,n,i,o,a,s){var c,u="function"===typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=r,u._compiled=!0),n&&(u.functional=!0),o&&(u._scopeId="data-v-"+o),a?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=c):i&&(c=s?function(){i.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:i),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(t,e){return c.call(e),l(t,e)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,c):[c]}return{exports:t,options:u}}var u=c(s,i,o,!1,null,"450f21fe",null),l=u.exports,f=function(){var t=this,e=t._self._c;return e("div")},h=[],p={name:"VideoRtsp",data(){return{}}},d=p,m=c(d,f,h,!1,null,null,null),v=m.exports,g=function(){var t=this,e=t._self._c;return e("div")},b=[],y={name:"VideoWebGl",data(){return{}}},w=y,x=c(w,g,b,!1,null,null,null),j=x.exports;const S=[l,v,j],O=function(t){O.installed||S.map(e=>t.component(e.name,e))};"undefined"!==typeof window&&window.Vue&&O(window.Vue);var P={install:O},T=P}(),n}()});
2
2
  //# sourceMappingURL=xjzh-component.umd.min.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xjzh-component",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "private": false,
5
5
  "main": "dist/xjzh-component.umd.min.js",
6
6
  "scripts": {