hzzt-kfb-slide 0.1.4 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/dist/components/{annotateCR9KG-3F.js → annotateCdSQFwCj.js} +1 -1
  2. package/dist/components/{annotateeaYSTegE.js → annotateCl71xIPH.js} +12 -11
  3. package/dist/components/annotateDO5M9JWn.js +1 -0
  4. package/dist/components/{annotateDAo62muz.js → annotatetAUvSoEJ.js} +1 -1
  5. package/dist/components/{arrowCg4wTfkZ.js → arrowBPWE_Tj8.js} +1 -1
  6. package/dist/components/{arrowCircleDP_e9KCk.js → arrowCircleC0Vg8mp7.js} +1 -1
  7. package/dist/components/{arrowCirclet2SbJIBg.js → arrowCircleCReazPnY.js} +1 -1
  8. package/dist/components/{arrowBQ8Z77kj.js → arrowDgJclFBQ.js} +1 -1
  9. package/dist/components/{arrowDownhRMram4O.js → arrowDownBQKVy4bt.js} +1 -1
  10. package/dist/components/{arrowDownVStC_Rgo.js → arrowDownnqDRPbBd.js} +1 -1
  11. package/dist/components/{arrowLeftLT-SB32n.js → arrowLeftB2U1F2qZ.js} +1 -1
  12. package/dist/components/{arrowLeftCbrGnjEA.js → arrowLeftDj6Itp4F.js} +1 -1
  13. package/dist/components/{arrowRightB41bdlNB.js → arrowRightCSwKUrhN.js} +1 -1
  14. package/dist/components/{arrowRightCXo2PmJn.js → arrowRightDCr2AlGZ.js} +1 -1
  15. package/dist/components/{arrowUpBRQqlvlm.js → arrowUpCpYvRfVO.js} +1 -1
  16. package/dist/components/{arrowUpCXSvtCjj.js → arrowUpDgrtjFV6.js} +1 -1
  17. package/dist/components/{bilateralDspCXWMP.js → bilateralBUw2SoJf.js} +1 -1
  18. package/dist/components/{bilateralDAqr15v8.js → bilateralDVJhO31-.js} +1 -1
  19. package/dist/components/{channelDX5VLbZp.js → channelCJCVpuLF.js} +1 -1
  20. package/dist/components/{channelCeqFRWFS.js → channelCs6ZE8um.js} +1 -1
  21. package/dist/components/{checkBlw6idpM.js → check8TJn3_jJ.js} +1 -1
  22. package/dist/components/{checkBg2gGrZh.js → checkCfXktCml.js} +1 -1
  23. package/dist/components/{configD8ZieJXs.js → configBe8-dLRN.js} +1 -1
  24. package/dist/components/{configDRo1nkFc.js → configqcWqLkt4.js} +1 -1
  25. package/dist/components/{customCorIZb01.js → customBrybVHZv.js} +1 -1
  26. package/dist/components/{customD7mZ7UNY.js → customCQCfV-gG.js} +1 -1
  27. package/dist/components/{deleteJT3ej1t7.js → deleteBU0GP7Yy.js} +1 -1
  28. package/dist/components/{deleteCoRw6cgn.js → deleteCmIU67QE.js} +1 -1
  29. package/dist/components/dotBQOp_rwi.js +1 -0
  30. package/dist/components/{dotDTBU0mNQ.js → dotBcJiiYty.js} +12 -11
  31. package/dist/components/{dotC8Cn9HBv.js → dotBh_s1V_P.js} +1 -1
  32. package/dist/components/{dotBzZFhv3A.js → dotCphUYVyB.js} +1 -1
  33. package/dist/components/{dotCPjUa1C2.js → dotCvH1RlzH.js} +1 -1
  34. package/dist/components/{dotBRiK22PH.js → doteFPFBfAW.js} +1 -1
  35. package/dist/components/{downloadB_NP85Et.js → downloadBI_yUCk3.js} +9 -8
  36. package/dist/components/{downloadCJ8JN9yG.js → downloadCHx2b2_B.js} +1 -1
  37. package/dist/components/downloadXGx0oGdp.js +1 -0
  38. package/dist/components/{downloadBqzU62Qb.js → downloadcEXbNygZ.js} +1 -1
  39. package/dist/components/{ellipseClAcoBrZ.js → ellipseDe7HHOXa.js} +1 -1
  40. package/dist/components/{ellipseCUgzImFs.js → ellipseDyv6_gDz.js} +1 -1
  41. package/dist/components/{expandLeftCBduCmzp.js → expandLeftBgJbKplZ.js} +1 -1
  42. package/dist/components/{expandLeftBFp31T43.js → expandLeftDg3adQ4T.js} +1 -1
  43. package/dist/components/{expandRightBPKLGWm0.js → expandRightdxRBWwRm.js} +1 -1
  44. package/dist/components/{expandRightXBFKrMFd.js → expandRightqFe_W3sR.js} +1 -1
  45. package/dist/components/{flagBeqSH6wI.js → flagCU6uqzPN.js} +1 -1
  46. package/dist/components/{flagDeylVVdT.js → flagDRe0SWi3.js} +1 -1
  47. package/dist/components/{flipDX9vCZsy.js → flip9lYVaLpe.js} +1 -1
  48. package/dist/components/{flipBO5bQj9K.js → flipCDCxOt9y.js} +1 -1
  49. package/dist/components/{fontD7eTPKps.js → fontDkvAgbCM.js} +1 -1
  50. package/dist/components/{fontBjX_7Th9.js → fontd7EzPpXH.js} +1 -1
  51. package/dist/components/fullscreenCZwukv-0.js +1 -0
  52. package/dist/components/{fullscreenBQ0RpFjW.js → fullscreenDy4Qm4ZR.js} +1 -1
  53. package/dist/components/{fullscreenIHrpmxWv.js → fullscreenTdRK3tdy.js} +1 -1
  54. package/dist/components/{fullscreen_YCGsxzu.js → fullscreencCCYQmz_.js} +15 -15
  55. package/dist/components/indexBT0pDXGv.js +4 -0
  56. package/dist/components/{indexCC_s3GdF.js → indexDsZFgGo3.js} +416 -413
  57. package/dist/components/{infoDR2eJ_8o.js → infoC1BWzO7n.js} +1 -1
  58. package/dist/components/{infoCIwheXne.js → infoCiA71kXk.js} +1 -1
  59. package/dist/components/{levelCAlGIhJ0.js → levelDSTSikX9.js} +1 -1
  60. package/dist/components/{levelB9jESksc.js → levelOdW6h7X2.js} +1 -1
  61. package/dist/components/{linecPazLEBr.js → lineBSHtlWxM.js} +1 -1
  62. package/dist/components/{lineCK4IOF0A.js → lineBkNX_3iO.js} +1 -1
  63. package/dist/components/{microscopeBm8sed7y.js → microscopeBrBArxoj.js} +1 -1
  64. package/dist/components/microscopeBxdGVcdh.js +1 -0
  65. package/dist/components/{microscopeB9EFtiqd.js → microscopeCE4DFA5Y.js} +19 -14
  66. package/dist/components/{microscopeBf2kOH1T.js → microscopeCxL3T7-N.js} +1 -1
  67. package/dist/components/{moveD4R_ClcF.js → moveBRvr2sY1.js} +1 -1
  68. package/dist/components/{moveCvpedroE.js → moveD15Zgiom.js} +12 -11
  69. package/dist/components/{moveDcd5CPmg.js → moveDummawTk.js} +1 -1
  70. package/dist/components/movefwH4M5H0.js +1 -0
  71. package/dist/components/{nextCIs9GPoe.js → nextBDggmoQ_.js} +1 -1
  72. package/dist/components/{nextB55biH_O.js → nextChP2Vlnb.js} +1 -1
  73. package/dist/components/{polygondmQqW2ps.js → polygonCmzlG1iP.js} +1 -1
  74. package/dist/components/{polygonC7_9Bk0t.js → polygonDo1Cbrt6.js} +1 -1
  75. package/dist/components/{prevCHbldCd6.js → prevbRAbQ3BR.js} +1 -1
  76. package/dist/components/{prevA1O-9Wj0.js → prevmE7bILKU.js} +1 -1
  77. package/dist/components/processBUGF5YEC.js +1 -0
  78. package/dist/components/{processSKSn4n8U.js → processCVbgqqwQ.js} +1 -1
  79. package/dist/components/{processDRBn7BJ3.js → processD9HeCeP-.js} +1 -1
  80. package/dist/components/{processC7Gs4GXQ.js → processDzM4HfLm.js} +14 -13
  81. package/dist/components/{rectangleD-FvfGHr.js → rectangleBK-f_GHa.js} +1 -1
  82. package/dist/components/{rectangleCNa0xTCL.js → rectangleDOV_C_Ja.js} +1 -1
  83. package/dist/components/{rotateCnn1NwC3.js → rotateB_h0GOmZ.js} +7 -6
  84. package/dist/components/rotateBcLjWjrA.js +1 -0
  85. package/dist/components/{rotateCreZGnjg.js → rotateCmFZEZx8.js} +1 -1
  86. package/dist/components/{rotateCbpyCbNC.js → rotateT_e50-cB.js} +1 -1
  87. package/dist/components/setting8hsjZ-e4.js +1 -0
  88. package/dist/components/{settingCE_v2uSj.js → settingBfLQ5p0p.js} +1 -1
  89. package/dist/components/{settingBfTJrbR4.js → settingCVD1ckI-.js} +1 -1
  90. package/dist/components/{settingDCV6xuXV.js → settingjTUOI6Mm.js} +6 -5
  91. package/dist/components/{starBKGvQ1-a.js → starBYNGaEpq.js} +1 -1
  92. package/dist/components/{star76DeKyCh.js → starDlznUFWe.js} +1 -1
  93. package/dist/components/{tailorCDFj0iiX.js → tailorDNalOD3B.js} +1 -1
  94. package/dist/components/{tailorBSixx8Aa.js → tailorIp9ltUDh.js} +1 -1
  95. package/dist/components/{useCommonBfwh9yTn.js → useCommonIatIQYgz.js} +1 -1
  96. package/dist/components/{useCommonqtTpTeqy.js → useCommonQuWXQYVy.js} +1 -1
  97. package/dist/components/{voiceCVmpm6GP.js → voiceCEHlUUHi.js} +1 -1
  98. package/dist/components/{voiceC-FXokXs.js → voiceDLOYP8uT.js} +1 -1
  99. package/dist/components/{zoomBI25SD2L.js → zoomCfjxf2fA.js} +1 -1
  100. package/dist/components/{zoomTx-waJ3j.js → zoomDDgUA7UY.js} +1 -1
  101. package/dist/components/{zoomInCd6Dpkve.js → zoomInCT6fL7B4.js} +1 -1
  102. package/dist/components/{zoomInDYnxo1vR.js → zoomInfc0fWGjY.js} +1 -1
  103. package/dist/components/{zoomOut1FPtS-xc.js → zoomOutCCyBnDpt.js} +1 -1
  104. package/dist/components/{zoomOutDnINHhzQ.js → zoomOutCHMkqZ20.js} +1 -1
  105. package/dist/index.cjs.js +1 -1
  106. package/dist/index.css +1 -1
  107. package/dist/index.es.js +1 -1
  108. package/package.json +1 -1
  109. package/types/components/KfbView/index.d.ts +1 -1
  110. package/web-types.json +1 -1
  111. package/dist/components/annotate6FffM0W1.js +0 -1
  112. package/dist/components/dotm5YI4D68.js +0 -1
  113. package/dist/components/downloadCLKRx8KM.js +0 -1
  114. package/dist/components/fullscreenVlAGUy4v.js +0 -1
  115. package/dist/components/indexCCS1cXZe.js +0 -4
  116. package/dist/components/microscopeDpKQo6gd.js +0 -1
  117. package/dist/components/moveCR91uykt.js +0 -1
  118. package/dist/components/processA5wzWRCi.js +0 -1
  119. package/dist/components/rotatet2GaK4pm.js +0 -1
  120. package/dist/components/settingD6SLvmC5.js +0 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("vue"),t=require("./indexCCS1cXZe.js"),r={},n={viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"};function o(s,e){return C.openBlock(),C.createElementBlock("svg",n,e[0]||(e[0]=[C.createElementVNode("g",{id:"24*24/全屏"},[C.createElementVNode("path",{id:"Vector",d:"M4.25 5H19.75C20.0814 5.00037 20.3991 5.13219 20.6335 5.36653C20.8678 5.60087 20.9996 5.91859 21 6.25V17.75C20.9996 18.0814 20.8678 18.3991 20.6335 18.6335C20.3991 18.8678 20.0814 18.9996 19.75 19H4.25C3.91859 18.9996 3.60087 18.8678 3.36653 18.6335C3.13219 18.3991 3.00037 18.0814 3 17.75V6.25C3.00037 5.91859 3.13219 5.60087 3.36653 5.36653C3.60087 5.13219 3.91859 5.00037 4.25 5ZM5.5 20H2.25C2.1837 20 2.12011 19.9737 2.07322 19.9268C2.02634 19.8799 2 19.8163 2 19.75V16.5C2 16.3674 1.94732 16.2402 1.85355 16.1464C1.75979 16.0527 1.63261 16 1.5 16C1.36739 16 1.24021 16.0527 1.14645 16.1464C1.05268 16.2402 1 16.3674 1 16.5V19.75C1.00037 20.0814 1.13219 20.3991 1.36653 20.6335C1.60087 20.8678 1.91859 20.9996 2.25 21H5.5C5.63261 21 5.75979 20.9473 5.85355 20.8536C5.94732 20.7598 6 20.6326 6 20.5C6 20.3674 5.94732 20.2402 5.85355 20.1464C5.75979 20.0527 5.63261 20 5.5 20ZM1.5 8C1.63261 8 1.75979 7.94732 1.85355 7.85355C1.94732 7.75978 2 7.63261 2 7.5V4.25C2 4.1837 2.02634 4.12011 2.07322 4.07322C2.12011 4.02634 2.1837 4 2.25 4H5.5C5.63261 4 5.75979 3.94732 5.85355 3.85355C5.94732 3.75979 6 3.63261 6 3.5C6 3.36739 5.94732 3.24021 5.85355 3.14645C5.75979 3.05268 5.63261 3 5.5 3H2.25C1.91859 3.00037 1.60087 3.13219 1.36653 3.36653C1.13219 3.60087 1.00037 3.91859 1 4.25V7.5C1 7.63261 1.05268 7.75978 1.14645 7.85355C1.24021 7.94732 1.36739 8 1.5 8ZM22.5 16C22.4343 16 22.3693 16.0129 22.3087 16.0381C22.248 16.0632 22.1929 16.1 22.1464 16.1464C22.1 16.1929 22.0632 16.248 22.0381 16.3087C22.0129 16.3693 22 16.4343 22 16.5V19.75C22 19.8163 21.9737 19.8799 21.9268 19.9268C21.8799 19.9737 21.8163 20 21.75 20H18.5C18.3674 20 18.2402 20.0527 18.1464 20.1464C18.0527 20.2402 18 20.3674 18 20.5C18 20.6326 18.0527 20.7598 18.1464 20.8536C18.2402 20.9473 18.3674 21 18.5 21H21.75C22.0814 20.9996 22.3991 20.8678 22.6335 20.6335C22.8678 20.3991 22.9996 20.0814 23 19.75V16.5C23 16.3674 22.9473 16.2402 22.8536 16.1464C22.7598 16.0527 22.6326 16 22.5 16ZM21.75 3H18.5C18.3674 3 18.2402 3.05268 18.1464 3.14645C18.0527 3.24021 18 3.36739 18 3.5C18 3.63261 18.0527 3.75979 18.1464 3.85355C18.2402 3.94732 18.3674 4 18.5 4H21.75C21.8163 4 21.8799 4.02634 21.9268 4.07322C21.9737 4.12011 22 4.1837 22 4.25V7.5C22 7.63261 22.0527 7.75978 22.1464 7.85355C22.2402 7.94732 22.3674 8 22.5 8C22.6326 8 22.7598 7.94732 22.8536 7.85355C22.9473 7.75978 23 7.63261 23 7.5V4.25C22.9996 3.91859 22.8678 3.60087 22.6335 3.36653C22.3991 3.13219 22.0814 3.00037 21.75 3Z"})],-1)]))}const c=t._export_sfc(r,[["render",o]]);exports.default=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("vue"),t=require("./indexBT0pDXGv.js"),r={},n={viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"};function o(s,e){return C.openBlock(),C.createElementBlock("svg",n,e[0]||(e[0]=[C.createElementVNode("g",{id:"24*24/全屏"},[C.createElementVNode("path",{id:"Vector",d:"M4.25 5H19.75C20.0814 5.00037 20.3991 5.13219 20.6335 5.36653C20.8678 5.60087 20.9996 5.91859 21 6.25V17.75C20.9996 18.0814 20.8678 18.3991 20.6335 18.6335C20.3991 18.8678 20.0814 18.9996 19.75 19H4.25C3.91859 18.9996 3.60087 18.8678 3.36653 18.6335C3.13219 18.3991 3.00037 18.0814 3 17.75V6.25C3.00037 5.91859 3.13219 5.60087 3.36653 5.36653C3.60087 5.13219 3.91859 5.00037 4.25 5ZM5.5 20H2.25C2.1837 20 2.12011 19.9737 2.07322 19.9268C2.02634 19.8799 2 19.8163 2 19.75V16.5C2 16.3674 1.94732 16.2402 1.85355 16.1464C1.75979 16.0527 1.63261 16 1.5 16C1.36739 16 1.24021 16.0527 1.14645 16.1464C1.05268 16.2402 1 16.3674 1 16.5V19.75C1.00037 20.0814 1.13219 20.3991 1.36653 20.6335C1.60087 20.8678 1.91859 20.9996 2.25 21H5.5C5.63261 21 5.75979 20.9473 5.85355 20.8536C5.94732 20.7598 6 20.6326 6 20.5C6 20.3674 5.94732 20.2402 5.85355 20.1464C5.75979 20.0527 5.63261 20 5.5 20ZM1.5 8C1.63261 8 1.75979 7.94732 1.85355 7.85355C1.94732 7.75978 2 7.63261 2 7.5V4.25C2 4.1837 2.02634 4.12011 2.07322 4.07322C2.12011 4.02634 2.1837 4 2.25 4H5.5C5.63261 4 5.75979 3.94732 5.85355 3.85355C5.94732 3.75979 6 3.63261 6 3.5C6 3.36739 5.94732 3.24021 5.85355 3.14645C5.75979 3.05268 5.63261 3 5.5 3H2.25C1.91859 3.00037 1.60087 3.13219 1.36653 3.36653C1.13219 3.60087 1.00037 3.91859 1 4.25V7.5C1 7.63261 1.05268 7.75978 1.14645 7.85355C1.24021 7.94732 1.36739 8 1.5 8ZM22.5 16C22.4343 16 22.3693 16.0129 22.3087 16.0381C22.248 16.0632 22.1929 16.1 22.1464 16.1464C22.1 16.1929 22.0632 16.248 22.0381 16.3087C22.0129 16.3693 22 16.4343 22 16.5V19.75C22 19.8163 21.9737 19.8799 21.9268 19.9268C21.8799 19.9737 21.8163 20 21.75 20H18.5C18.3674 20 18.2402 20.0527 18.1464 20.1464C18.0527 20.2402 18 20.3674 18 20.5C18 20.6326 18.0527 20.7598 18.1464 20.8536C18.2402 20.9473 18.3674 21 18.5 21H21.75C22.0814 20.9996 22.3991 20.8678 22.6335 20.6335C22.8678 20.3991 22.9996 20.0814 23 19.75V16.5C23 16.3674 22.9473 16.2402 22.8536 16.1464C22.7598 16.0527 22.6326 16 22.5 16ZM21.75 3H18.5C18.3674 3 18.2402 3.05268 18.1464 3.14645C18.0527 3.24021 18 3.36739 18 3.5C18 3.63261 18.0527 3.75979 18.1464 3.85355C18.2402 3.94732 18.3674 4 18.5 4H21.75C21.8163 4 21.8799 4.02634 21.9268 4.07322C21.9737 4.12011 22 4.1837 22 4.25V7.5C22 7.63261 22.0527 7.75978 22.1464 7.85355C22.2402 7.94732 22.3674 8 22.5 8C22.6326 8 22.7598 7.94732 22.8536 7.85355C22.9473 7.75978 23 7.63261 23 7.5V4.25C22.9996 3.91859 22.8678 3.60087 22.6335 3.36653C22.3991 3.13219 22.0814 3.00037 21.75 3Z"})],-1)]))}const c=t._export_sfc(r,[["render",o]]);exports.default=c;
@@ -1,7 +1,7 @@
1
- import { defineComponent as h, mergeDefaults as z, ref as g, onBeforeUnmount as k, createElementBlock as x, openBlock as C, createVNode as u, createElementVNode as b, unref as t, withCtx as q, normalizeClass as w, toDisplayString as L } from "vue";
1
+ import { defineComponent as h, mergeDefaults as z, ref as g, onBeforeUnmount as k, createElementBlock as x, openBlock as C, createVNode as i, createElementVNode as b, unref as s, withCtx as q, normalizeClass as w, toDisplayString as L } from "vue";
2
2
  import { ElIcon as S } from "element-plus";
3
- import R from "./fullscreenBQ0RpFjW.js";
4
- import { u as _, d as B } from "./useCommonBfwh9yTn.js";
3
+ import R from "./fullscreenDy4Qm4ZR.js";
4
+ import { u as _, d as B } from "./useCommonIatIQYgz.js";
5
5
  const N = /* @__PURE__ */ h({
6
6
  name: "ToolFullscreen",
7
7
  __name: "fullscreen",
@@ -15,19 +15,19 @@ const N = /* @__PURE__ */ h({
15
15
  options: {}
16
16
  }, B),
17
17
  emits: ["tool"],
18
- setup(i, { emit: m }) {
19
- const a = i, f = m, s = g(!1), { t: c, textClass: F } = _(), e = document, l = document.documentElement, n = () => {
18
+ setup(m, { emit: a }) {
19
+ const f = m, c = a, t = g(!1), { t: o, textClass: F } = _(), e = document, l = document.documentElement, n = () => {
20
20
  setTimeout(() => {
21
- s.value = o();
21
+ t.value = u(), t.value || c("tool", "fullscreen", t.value);
22
22
  }, 500);
23
- }, o = () => !!(e.fullscreenElement || e.webkitFullscreenElement || e.mozFullScreenElement || e.msFullscreenElement), d = () => {
24
- o() ? v() : E();
25
- }, E = () => {
26
- l.requestFullscreen ? l.requestFullscreen() : l.webkitRequestFullscreen ? l.webkitRequestFullscreen() : l.mozRequestFullScreen ? l.mozRequestFullScreen() : l.msRequestFullscreen && l.msRequestFullscreen();
23
+ }, u = () => !!(e.fullscreenElement || e.webkitFullscreenElement || e.mozFullScreenElement || e.msFullscreenElement), d = () => {
24
+ u() ? E() : v();
27
25
  }, v = () => {
26
+ l.requestFullscreen ? l.requestFullscreen() : l.webkitRequestFullscreen ? l.webkitRequestFullscreen() : l.mozRequestFullScreen ? l.mozRequestFullScreen() : l.msRequestFullscreen && l.msRequestFullscreen();
27
+ }, E = () => {
28
28
  e.exitFullscreen ? e.exitFullscreen() : e.webkitExitFullscreen ? e.webkitExitFullscreen() : e.mozCancelFullScreen ? e.mozCancelFullScreen() : e.msExitFullscreen && e.msExitFullscreen();
29
29
  }, p = () => {
30
- f("tool", "fullscreen", !s.value), a.isPrevent || d();
30
+ c("tool", "fullscreen", !t.value), f.isPrevent || d();
31
31
  };
32
32
  return e.addEventListener("fullscreenchange", n), e.addEventListener("webkitfullscreenchange", n), e.addEventListener("mozfullscreenchange", n), e.addEventListener("MSFullscreenChange", n), k(() => {
33
33
  e.removeEventListener("fullscreenchange", n), e.removeEventListener("webkitfullscreenchange", n), e.removeEventListener("mozfullscreenchange", n), e.removeEventListener("MSFullscreenChange", n);
@@ -35,15 +35,15 @@ const N = /* @__PURE__ */ h({
35
35
  class: "hzzt-kfb-toolbox__icon",
36
36
  onClick: p
37
37
  }, [
38
- u(t(S), { size: r.size }, {
38
+ i(s(S), { size: r.size }, {
39
39
  default: q(() => [
40
- u(R)
40
+ i(R)
41
41
  ]),
42
42
  _: 1
43
43
  }, 8, ["size"]),
44
44
  b("div", {
45
- class: w(t(F))
46
- }, L(s.value ? t(c)(r.text || "退出全屏") : t(c)(r.text || "全屏")), 3)
45
+ class: w(s(F))
46
+ }, L(t.value ? s(o)(r.text || "退出全屏") : s(o)(r.text || "全屏")), 3)
47
47
  ]));
48
48
  }
49
49
  });
@@ -0,0 +1,4 @@
1
+ "use strict";var nt=Object.defineProperty,lt=Object.defineProperties;var at=Object.getOwnPropertyDescriptors;var De=Object.getOwnPropertySymbols;var rt=Object.prototype.hasOwnProperty,it=Object.prototype.propertyIsEnumerable;var Ae=(u,t,n)=>t in u?nt(u,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):u[t]=n,R=(u,t)=>{for(var n in t||(t={}))rt.call(t,n)&&Ae(u,n,t[n]);if(De)for(var n of De(t))it.call(t,n)&&Ae(u,n,t[n]);return u},Y=(u,t)=>lt(u,at(t));var J=(u,t,n)=>new Promise((o,y)=>{var f=v=>{try{r(n.next(v))}catch(w){y(w)}},s=v=>{try{r(n.throw(v))}catch(w){y(w)}},r=v=>v.done?o(v.value):Promise.resolve(v.value).then(f,s);r((n=n.apply(u,t)).next())});const e=require("vue"),b=require("element-plus"),M=require("kfb-view"),st=require("v-lazy-image"),we=Symbol("I18N_INJECT_KEY");function j(){const u=e.inject(we),t=n=>n;return{locale:u==null?void 0:u.locale,t:(u==null?void 0:u.t)||t}}const ut={install(u,t){u.provide(we,t==null?void 0:t.global)}},P=e.ref({annotate:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./annotatetAUvSoEJ.js")))),arrowCircle:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./arrowCircleC0Vg8mp7.js")))),check:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./checkCfXktCml.js")))),dot:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./dotCvH1RlzH.js")))),flip:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./flipCDCxOt9y.js")))),info:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./infoCiA71kXk.js")))),microscope:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./microscopeCxL3T7-N.js")))),move:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./moveBRvr2sY1.js")))),next:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./nextChP2Vlnb.js")))),prev:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./prevmE7bILKU.js")))),process:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./processCVbgqqwQ.js")))),rotate:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./rotateCmFZEZx8.js")))),fullscreen:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./fullscreenTdRK3tdy.js")))),setting:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./settingBfLQ5p0p.js")))),tailor:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./tailorIp9ltUDh.js")))),download:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./downloadcEXbNygZ.js")))),config:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./configqcWqLkt4.js")))),arrowDown:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./arrowDownBQKVy4bt.js")))),arrowUp:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./arrowUpDgrtjFV6.js")))),arrowLeft:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./arrowLeftB2U1F2qZ.js")))),arrowRight:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./arrowRightCSwKUrhN.js")))),zoomIn:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./zoomInfc0fWGjY.js")))),zoomOut:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./zoomOutCHMkqZ20.js")))),level:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./levelOdW6h7X2.js")))),channel:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./channelCs6ZE8um.js")))),delete:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./deleteCmIU67QE.js")))),expandLeft:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./expandLeftBgJbKplZ.js")))),expandRight:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./expandRightqFe_W3sR.js")))),markLine:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./lineBSHtlWxM.js")))),markArrow:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./arrowBPWE_Tj8.js")))),markBilateral:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./bilateralDVJhO31-.js")))),markRectangle:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./rectangleBK-f_GHa.js")))),markEllipse:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./ellipseDe7HHOXa.js")))),markPolygon:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./polygonCmzlG1iP.js")))),markFlag:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./flagCU6uqzPN.js")))),markStar:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./starDlznUFWe.js")))),markDot:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./doteFPFBfAW.js")))),markFont:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./fontDkvAgbCM.js")))),markVoice:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./voiceCEHlUUHi.js"))))}),I=e.defineComponent({__name:"KfbIcon",props:{name:{type:[String,Number],required:!0}},setup(u){return(t,n)=>(e.openBlock(),e.createBlock(e.unref(b.ElIcon),e.normalizeProps(e.guardReactiveProps(t.$attrs)),{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(P)[u.name])))]),_:1},16))}}),ct={class:"hzzt-kfb-tool-config"},dt={class:"hzzt-kfb-tool-config__title margin-b-2"},ft={class:"hzzt-kfb-tool-config__block flex align-items-center"},mt={class:"hzzt-kfb-tool-config__icon flex align-items-center justify-content-center"},vt={class:"margin-l-4 flex-1"},pt={class:"hzzt-kfb-tool-config__title"},ht={class:"flex align-items-center"},gt={class:"margin-t-2 margin-b-2",style:{width:"160px"}},yt={class:"flex align-items-center"},wt={class:"margin-t-2 margin-b-2",style:{width:"160px"}},kt={class:"flex align-items-center"},_t={class:"margin-t-2 margin-b-2",style:{width:"160px"}},bt=e.defineComponent({name:"KfbToolConfig",__name:"KfbToolConfig",props:{menus:{default:()=>[]},menusModifiers:{}},emits:["update:menus"],setup(u){const t=e.useModel(u,"menus"),{t:n}=j(),o=e.computed(()=>t.value.filter(h=>h.name!=="line"&&h.name!=="config"&&h.name!=="zoom")),y={fullscreen:n("全屏"),next:n("上一张"),prev:n("上一张"),flip:n("镜像翻转"),setting:n("工具"),rotate:n("旋转"),dot:n("打点"),annotate:n("标注"),tailor:n("截图"),process:n("图像处理"),microscope:n("镜下"),move:n("快速移动"),info:n("信息"),download:n("下载")},f=e.inject("show-keyboard",e.ref(!1)),s=e.inject("show-watermark",e.ref(!1)),r=e.inject("show-menu-text",e.ref(!0));function v(h){return h in y}function w(h){var l;return((l=h.props)==null?void 0:l.text)||(v(h.name)?y[h.name]:"")}return(h,l)=>(e.openBlock(),e.createElementBlock("div",ct,[e.createElementVNode("h3",dt,e.toDisplayString(e.unref(n)("显示管理")),1),e.createVNode(e.unref(b.ElRow),{gutter:10},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,d=>(e.openBlock(),e.createBlock(e.unref(b.ElCol),{key:d.name,span:8},{default:e.withCtx(()=>{var c,a;return[e.createElementVNode("div",ft,[e.createElementVNode("div",mt,[(c=d.props)!=null&&c.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent((a=d.props)==null?void 0:a.component),{key:1,size:24})):(e.openBlock(),e.createBlock(I,{key:0,size:24,name:d.name},null,8,["name"]))]),e.createElementVNode("p",vt,e.toDisplayString(w(d)),1),e.createVNode(e.unref(b.ElSwitch),{modelValue:d.show,"onUpdate:modelValue":m=>d.show=m,"active-text":"","inactive-text":""},null,8,["modelValue","onUpdate:modelValue"])])]}),_:2},1024))),128))]),_:1}),e.createElementVNode("div",null,[e.createElementVNode("h3",pt,e.toDisplayString(e.unref(n)("其他设置")),1),e.createElementVNode("div",ht,[e.createElementVNode("p",gt,e.toDisplayString(e.unref(n)("工具列表显示切换")),1),e.createVNode(e.unref(b.ElRadioGroup),{modelValue:e.unref(r),"onUpdate:modelValue":l[0]||(l[0]=d=>e.isRef(r)?r.value=d:null)},{default:e.withCtx(()=>[e.createVNode(e.unref(b.ElRadio),{value:!0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("显示工具名称")),1)]),_:1}),e.createVNode(e.unref(b.ElRadio),{value:!1},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("隐藏工具名称")),1)]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",yt,[e.createElementVNode("p",wt,e.toDisplayString(e.unref(n)("小键盘显示切换")),1),e.createVNode(e.unref(b.ElRadioGroup),{modelValue:e.unref(f),"onUpdate:modelValue":l[1]||(l[1]=d=>e.isRef(f)?f.value=d:null)},{default:e.withCtx(()=>[e.createVNode(e.unref(b.ElRadio),{value:!0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("显示小键盘")),1)]),_:1}),e.createVNode(e.unref(b.ElRadio),{value:!1},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("隐藏小键盘")),1)]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",kt,[e.createElementVNode("p",_t,e.toDisplayString(e.unref(n)("水印文字")),1),e.createVNode(e.unref(b.ElRadioGroup),{modelValue:e.unref(s),"onUpdate:modelValue":l[2]||(l[2]=d=>e.isRef(s)?s.value=d:null)},{default:e.withCtx(()=>[e.createVNode(e.unref(b.ElRadio),{value:!0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("启用")),1)]),_:1}),e.createVNode(e.unref(b.ElRadio),{value:!1},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("禁用")),1)]),_:1})]),_:1},8,["modelValue"])])])]))}}),Ct={class:"hzzt-kfb-toolbox"},Vt={class:"hzzt-kfb-toolbox__component"},ae=e.defineComponent({name:"KfbToolbox",__name:"KfbToolbox",props:{menu:{},process:{},microscope:{},showMenuText:{type:Boolean}},emits:["tool"],setup(u,{emit:t}){const n=u,o=t,{t:y}=j(),f={prev:y("上一张"),next:y("下一张"),config:y("配置"),info:y("信息"),flip:y("镜像"),tailor:y("截图")},s=e.inject("kfbViewRef"),r=e.ref(!1),v=e.ref(l(n.menu)),w={fullscreen:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./fullscreenCZwukv-0.js"))),line:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./linej48TZYKp.js"))),setting:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./setting8hsjZ-e4.js"))),rotate:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./rotateBcLjWjrA.js"))),dot:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./dotBQOp_rwi.js"))),annotate:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./annotateDO5M9JWn.js"))),process:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./processBUGF5YEC.js"))),microscope:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./microscopeBxdGVcdh.js"))),move:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./movefwH4M5H0.js"))),custom:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./customBrybVHZv.js"))),zoom:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./zoomDDgUA7UY.js"))),download:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./downloadXGx0oGdp.js")))},h=e.computed(()=>v.value.filter(c=>c.show!==!1).map(c=>({component:w[c.name],props:c.props,slots:c.slots})));e.watch(()=>n.menu,c=>{v.value=l(c)});function l(c){return c.map(a=>{const m=typeof a=="string"?a:a.name;return f[m]?{name:"custom",show:typeof a=="string"?!0:a.show!==!1,props:Y(R({text:f[m],component:e.h(I,{name:m})},typeof a=="string"?{}:a.props),{name:m})}:m==="process"?{name:m,props:typeof a=="string"?{process:n.process}:R({process:n.process},a.props),slots:typeof a=="string"?void 0:a.slots,show:typeof a=="string"?!0:a.show!==!1}:m==="microscope"?{name:m,props:typeof a=="string"?{process:n.process}:R({microscope:n.microscope},a.props),slots:typeof a=="string"?void 0:a.slots,show:typeof a=="string"?!0:a.show!==!1}:{name:m,props:typeof a=="string"?{}:a.props,slots:typeof a=="string"?void 0:a.slots,show:typeof a=="string"?!0:a.show!==!1}})}function d(c,a){const m={annotate:()=>s.value.startDraw(a),tailor:()=>s.value.shotScreen(a),process:()=>s.value.forceRedraw(a),microscope:()=>s.value.scopeChange(a),move:()=>s.value.fastMove(a),endDraw:()=>s.value.endDraw(),info:()=>s.value.info(),zoom:()=>s.value.zoomTo(a),flip:()=>s.value.toggleFlip(a),config:()=>r.value=!0,grid:()=>s.value.updateGrid(a),ruler:()=>s.value.updateGrid(a),graduation:()=>s.value.updateGraduation(a),navigator:()=>s.value.updateNavigator(a),tool:()=>{s.value.updateGrid({show:a}),s.value.updateGraduation({show:a}),s.value.updateGrid({ruler:a}),s.value.updateNavigator(a)}};m[c]?m[c]():o("tool",c,a)}return(c,a)=>(e.openBlock(),e.createElementBlock("div",Ct,[e.renderSlot(c.$slots,"left"),e.createElementVNode("div",Vt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(m,k)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(m.component),e.mergeProps({ref_for:!0},m.props,{key:k,onTool:d}),{default:e.withCtx(()=>[m.slots?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(m.slots,g=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g)))),256)):e.createCommentVNode("",!0)]),_:2},1040))),128))]),e.renderSlot(c.$slots,"right"),e.createVNode(e.unref(b.ElDialog),{modelValue:r.value,"onUpdate:modelValue":a[1]||(a[1]=m=>r.value=m),width:"800px",title:e.unref(y)("阅片工具设置中心")},{default:e.withCtx(()=>[e.createVNode(bt,{menus:v.value,"onUpdate:menus":a[0]||(a[0]=m=>v.value=m)},null,8,["menus"])]),_:1},8,["modelValue","title"])]))}}),ue="data:image/svg+xml,%3csvg%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%3e%3cpath%20d='M556.45%20126.8H904.7c31.31%200%2056.26%2025.47%2057.3%2056.78v656.85c-0.68%2031.26-26.03%2056.35-57.3%2056.72H617.28l74.32-291.24-77.38-56.14%2032.3-27.32c8.28-6.66%2015.51-11.46%2025.7-11.46%209.96%200.24%2019.33%204.77%2025.7%2012.45h-0.06l198.87%20214.09-0.58-522.46c-0.75-13.7-12.21-24.35-25.93-24.08H542.45l14-64.19z%20m-118.47%200l-14.01%2064.24H152.41c-13.6%200-24.31%209.84-26.22%2023.44v522.63l242.33-292.28-13.08%2060.14%20204.6%20148.46-62.22%20243.77H118.15a56.398%2056.398%200%200%201-39.86-16.73A56.35%2056.35%200%200%201%2062%20840.43V183.57c0-31.25%2024.89-56.72%2056.14-56.72h319.83v-0.05z%20m203.67%20224.68c-0.86-34.98%2017.31-67.68%2047.47-85.42%2030.16-17.74%2067.56-17.74%2097.73%200%2030.16%2017.74%2048.33%2050.44%2047.47%2085.42%200%2053.22-43.15%2096.37-96.37%2096.37-53.22%200-96.37-43.14-96.37-96.37h0.07z%20m0%200'%20fill='%23ffffff'%3e%3c/path%3e%3c/svg%3e",ce={shape:"50%",width:.3,color:"#FA0404",borderWidth:5},ke={r:0,g:0,b:0,c:0,s:0,l:0,ga:1};function Et(u){const t=e.reactive(R(R({},ke),u.process));e.watch(()=>u.process,f=>{y(f)});const n=e.computed(()=>{const f=[1+t.r+t.l+.5*t.c,0,0,0,-.25*t.c],s=[0,1+t.g+t.l+.5*t.c,0,0,-.25*t.c],r=[0,0,1+t.b+t.l+.5*t.c,0,-.25*t.c],v=[0,0,0,1,0];return`${f.join(" ")}
2
+ ${s.join(" ")}
3
+ ${r.join(" ")}
4
+ ${v.join(" ")}`}),o=e.computed(()=>String(1+t.s));function y(f){f&&Object.assign(t,f)}return{imageProcess:t,matrixValues:n,saturateValues:o,forceRedraw:y}}function Nt(u,t){function n(){t.value.$on(M.KfbView.events.EVENT_TAILORING_SCREENSHOT,o)}function o({base64:s,region:r}){if(window.ClipboardItem&&(navigator!=null&&navigator.clipboard)){const v=y(s,"image/png");navigator.clipboard.write([new window.ClipboardItem({[v.type]:v})])}u("tool","screen-shot",{base64:s,region:r})}function y(s,r){var d,c;const v=s.split(",");(c=(d=v[0])==null?void 0:d.match(/:(.*?);/))==null||c[1];const w=atob(v==null?void 0:v[1]);let h=w.length;const l=new Uint8Array(h);for(;h--;)l[h]=w.charCodeAt(h);return new Blob([l],{type:r})}function f(s){const{width:r,height:v}=t.value.$options;s?r>v?t.value.tailoring.init({left:(r-v)/2,top:0,height:v,width:v,now:!0}):t.value.tailoring.init({left:0,top:(v-r)/2,height:r,width:r,now:!0}):t.value.tailoring.init({left:r/2-100,top:v/2-100,height:200,width:200,color:"#ff0000"})}return{tailorEvent:n,shotScreen:f}}const zt=["onClick"],Bt=["src"],xt={key:2,style:{width:"18px"},class:"margin-r-3"},Tt={key:1,class:"hzzt-kfb-sub-menu"},St=["onClick"],Lt={class:"flex align-items-center"},$t=["src"],Pt={key:2,style:{width:"18px"},class:"margin-r-2"},Rt=e.defineComponent({__name:"KfbMenu",props:{menus:{}},emits:["tool"],setup(u,{emit:t}){const n=e.ref({top:"0",left:"0",display:"none"}),o=e.inject("kfbView",e.ref({})),y=e.inject("currentLabel"),f=u,s=t,{t:r}=j(),v=[{label:r("直线"),value:"line",icon:P.value.markLine},{label:r("箭头"),value:"arrow",icon:P.value.markArrow},{label:r("双箭头"),value:"bilateral",icon:P.value.markBilateral},{label:r("矩形"),value:"rectangle",icon:P.value.markRectangle},{label:r("圆形"),value:"ellipse",icon:P.value.markEllipse},{label:r("曲线"),value:"polygon",icon:P.value.markPolygon},{label:r("星星"),value:"star",icon:P.value.markStar},{label:r("旗帜"),value:"flag",icon:P.value.markFlag},{label:r("点"),value:"dot",icon:P.value.markDot},{label:r("文字"),value:"font",icon:P.value.markFont},{label:r("语音"),value:"voice",icon:P.value.markVoice}],w=e.computed(()=>{var a;return y!=null&&y.value?[{label:r("删除"),value:"delete",icon:P.value.delete}]:(a=f.menus)!=null&&a.length?f.menus.map(m=>m.value==="annotate"?Y(R({},m),{children:v}):Y(R({},m),{icon:m.icon||P.value[m.value]})):[{label:r("上一张"),value:"prev"},{label:r("下一张"),value:"next"},{label:r("标注"),value:"annotate",icon:P.value.annotate,children:v},{label:r("一键截图"),value:"tailor_now",icon:P.value.tailor},{label:r("区域截图"),value:"tailor"},{label:r("镜像翻转"),value:"flip",icon:P.value.flip},{label:r("切片信息"),value:"info",icon:P.value.info}]});e.watch(()=>o.value,(a,m)=>{m!=null&&m.viewer&&(m.viewer.removeHandler("canvas-contextmenu",h),m.viewer.removeHandler("canvas-click",l)),a!=null&&a.viewer&&(a.viewer.addHandler("canvas-contextmenu",h),a.viewer.addHandler("canvas-click",l))}),e.onMounted(()=>{var a;(a=o.value)!=null&&a.viewer&&(o.value.viewer.addHandler("canvas-contextmenu",h),o.value.viewer.addHandler("canvas-click",l)),document.body.addEventListener("click",l)}),e.onBeforeUnmount(()=>{var a;(a=o.value)!=null&&a.viewer&&(o.value.viewer.removeHandler("canvas-contextmenu",h),o.value.viewer.removeHandler("canvas-click",l)),document.body.removeEventListener("click",l)});function h(a){a.preventDefault=!0,n.value.top=`${a.position.y}px`,n.value.left=`${a.position.x}px`,n.value.display==="block"?n.value.display="none":n.value.display="block"}function l(){n.value.display="none"}function d(a,m){a.children||((m==null?void 0:m.value)==="annotate"?s("tool","annotate",{tool:a.value.substring(0,1).toLocaleUpperCase()+a.value.substring(1),once:!0}):a.value==="tailor_now"?s("tool","tailor",!0):s("tool",a.value),l())}function c(a){return a==null||typeof a!="object"&&typeof a!="function"?!1:typeof a=="function"||"render"in a||"setup"in a}return(a,m)=>(e.openBlock(),e.createElementBlock("div",{class:"hzzt-kfb-menu",style:e.normalizeStyle(n.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(k,g)=>(e.openBlock(),e.createElementBlock("div",{key:g,class:"hzzt-kfb-menu-item"},[e.createElementVNode("div",{class:"flex align-items-center",onClick:p=>d(k)},[c(k.icon)?(e.openBlock(),e.createBlock(e.unref(b.ElIcon),{key:0,class:"margin-r-3",size:18},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(k.icon)))]),_:2},1024)):k.icon?(e.openBlock(),e.createElementBlock("img",{key:1,style:{width:"18px"},class:"margin-r-2",src:k.icon},null,8,Bt)):(e.openBlock(),e.createElementBlock("div",xt)),e.createElementVNode("span",null,e.toDisplayString(k.label),1)],8,zt),k.children?(e.openBlock(),e.createBlock(I,{key:0,name:"arrowRight",class:"margin-r-2",size:14})):e.createCommentVNode("",!0),k.children?(e.openBlock(),e.createElementBlock("div",Tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.children,(p,i)=>(e.openBlock(),e.createElementBlock("div",{key:i,class:"hzzt-kfb-menu-item",onClick:E=>d(p,k)},[e.createElementVNode("div",Lt,[c(p.icon)?(e.openBlock(),e.createBlock(e.unref(b.ElIcon),{key:0,class:"margin-r-2",size:18},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p.icon)))]),_:2},1024)):p.icon?(e.openBlock(),e.createElementBlock("img",{key:1,style:{width:"18px"},class:"margin-r-2",src:p.icon},null,8,$t)):(e.openBlock(),e.createElementBlock("div",Pt)),e.createElementVNode("span",null,e.toDisplayString(p.label),1)])],8,St))),128))])):e.createCommentVNode("",!0)]))),128))],4))}}),G=(u,t)=>{const n=u.__vccOpts||u;for(const[o,y]of t)n[o]=y;return n},It=G(Rt,[["__scopeId","data-v-414722d0"]]),Dt={key:0,class:"hzzt-kfb-microscope"},At=e.defineComponent({__name:"KfbMicroscope",props:e.mergeDefaults({shape:{},width:{},color:{},borderWidth:{}},R({},ce)),setup(u,{expose:t}){const n=u,o=e.reactive(R(R({},ce),n));e.watch(()=>n,l=>{h({name:"change",value:l})});const y=e.ref("200px"),f=e.ref(!1),s=e.computed(()=>({borderRadius:o.shape,borderColor:o.color,borderWidth:o.borderWidth+"px",width:y.value,height:y.value})),r=e.inject("kfbView",e.ref({}));e.watch(()=>r.value,(l,d)=>{d!=null&&d.viewer&&d.viewer.removeHandler("zoom",v),l!=null&&l.viewer&&l.viewer.addHandler("zoom",v)}),e.onMounted(()=>{var l;(l=r.value)!=null&&l.viewer&&r.value.viewer.addHandler("zoom",v)}),e.onBeforeUnmount(()=>{var l;(l=r.value)!=null&&l.viewer&&r.value.viewer.removeHandler("zoom",v)});function v(){setTimeout(()=>{h({name:"change",value:o})},100)}function w(l){let{x:d,y:c}=r.value.viewer.viewport.getCenter(!0);l==="top"?c-=.006:l==="bottom"?c+=.006:l==="left"?d-=.006:l==="right"&&(d+=.006),r.value.area.moveToLabel({x:d,y:c})}function h({name:l,value:d}){var a,m;const c=(m=(a=r.value.$options)==null?void 0:a.pxConversion)==null?void 0:m.imageCapRes;if(l==="visible"){if(f.value=d,d){const k=r.value.area.imageToViewerElementRectangle({x:0,y:0,width:o.width*1e3/c,height:o.width*1e3/c});y.value=k.width+"px"}}else if(l==="change"){Object.assign(o,d);const k=r.value.area.imageToViewerElementRectangle({x:0,y:0,width:o.width*1e3/c,height:o.width*1e3/c});y.value=k.width+"px"}}return t({scopeChange:h}),(l,d)=>f.value?(e.openBlock(),e.createElementBlock("div",Dt,[e.createElementVNode("div",{class:"hzzt-kfb-microscope__container",style:e.normalizeStyle(s.value)},null,4),e.createElementVNode("div",{class:"hzzt-kfb-microscope__top",onClick:d[0]||(d[0]=c=>w("top"))},[e.createVNode(I,{size:"24",name:"arrowUp"})]),e.createElementVNode("div",{class:"hzzt-kfb-microscope__bottom",onClick:d[1]||(d[1]=c=>w("bottom"))},[e.createVNode(I,{size:"24",name:"arrowDown"})]),e.createElementVNode("div",{class:"hzzt-kfb-microscope__left",onClick:d[2]||(d[2]=c=>w("left"))},[e.createVNode(I,{size:"24",name:"arrowLeft"})]),e.createElementVNode("div",{class:"hzzt-kfb-microscope__right",onClick:d[3]||(d[3]=c=>w("right"))},[e.createVNode(I,{size:"24",name:"arrowRight"})])])):e.createCommentVNode("",!0)}}),Mt=G(At,[["__scopeId","data-v-cf5949b8"]]),Ht={class:"hzzt-kfb-label flex column"},Ft={class:"hzzt-kfb-label__img flex justify-content-center"},qt=["src"],Ut={class:"ellipsis flex-1"},jt={class:"flex margin-b-4",style:{width:"100%"}},Kt={class:"flex margin overflow-hidden",style:{height:"132px"}},Ot=["src"],Gt=["src"],Wt=e.defineComponent({__name:"KfbLabel",props:{info:{},slide:{},pathologyHandle:{type:Function}},emits:["tool"],setup(u,{emit:t}){const{t:n}=j(),o=u,y=t,f=e.ref(!0),s=e.ref(!1),r=e.computed(()=>o.slide.pathology_id?n("修改病理号"):n("绑定病理号"));function v(){o.slide.angle||(o.slide.angle=0),o.slide.angle+=90,o.slide.angle>360&&(o.slide.angle=o.slide.angle%360),y("tool","rotate",o.slide.angle)}function w(){s.value=!0}function h(){o.pathologyHandle&&o.pathologyHandle(o.slide).then(()=>{s.value=!1})}return(l,d)=>(e.openBlock(),e.createElementBlock("div",Ht,[e.withDirectives(e.createElementVNode("div",{class:"hzzt-kfb-label__title"},e.toDisplayString(e.unref(n)(`点击标签旋转${l.pathologyHandle?",点击病理号重绑":""}`)),513),[[e.vShow,f.value]]),e.withDirectives(e.createElementVNode("div",Ft,[e.createElementVNode("img",{src:l.info.labelImg,style:e.normalizeStyle({transform:`rotate(${l.slide.angle}deg)`}),onClick:v},null,12,qt)],512),[[e.vShow,f.value]]),l.pathologyHandle?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:0,class:"hzzt-kfb-label__pathology flex align-items-center justify-content-between",onClick:w},[e.createElementVNode("span",Ut,e.toDisplayString(l.slide.pathology_number),1),e.createVNode(I,{size:"14",name:"annotate"})],512)),[[e.vShow,f.value]]):e.createCommentVNode("",!0),e.createElementVNode("span",{onClick:d[0]||(d[0]=c=>f.value=!f.value),style:e.normalizeStyle({transform:`translateY(${f.value?"-50%":0})`}),class:"hzzt-kfb-label__expend flex align-items-center justify-content-center"},[f.value?(e.openBlock(),e.createBlock(I,{key:0,size:"10",name:"arrowLeft"})):(e.openBlock(),e.createBlock(I,{key:1,size:"10",name:"arrowRight"}))],4),e.createVNode(e.unref(b.ElDialog),{modelValue:s.value,"onUpdate:modelValue":d[5]||(d[5]=c=>s.value=c),"append-to-body":!0,title:r.value,width:"450px"},{footer:e.withCtx(()=>[e.createVNode(e.unref(b.ElButton),{onClick:d[4]||(d[4]=c=>s.value=!1)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("取消")),1)]),_:1}),e.createVNode(e.unref(b.ElButton),{type:"primary",onClick:h},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("确认")),1)]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",jt,[e.createElementVNode("div",Kt,[e.createElementVNode("img",{src:l.slide.labelImg},null,8,Ot),e.createElementVNode("img",{src:l.slide.previewImg},null,8,Gt)])]),e.createVNode(e.unref(b.ElForm),{class:"margin-t-2"},{default:e.withCtx(()=>[e.createVNode(e.unref(b.ElFormItem),{label:e.unref(n)("病理号")},{default:e.withCtx(()=>[e.createVNode(e.unref(b.ElInput),{modelValue:l.slide.pathology_number,"onUpdate:modelValue":d[1]||(d[1]=c=>l.slide.pathology_number=c),placeholder:e.unref(n)("输入病理号"),clearable:""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(e.unref(b.ElFormItem),{label:e.unref(n)("蜡块号")},{default:e.withCtx(()=>[e.createVNode(e.unref(b.ElInput),{modelValue:l.slide.paraffin_block_number,"onUpdate:modelValue":d[2]||(d[2]=c=>l.slide.paraffin_block_number=c),placeholder:e.unref(n)("输入蜡块号"),clearable:""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),l.slide.slide_id?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(b.ElFormItem),{key:0,label:e.unref(n)("试剂")},{default:e.withCtx(()=>[e.createVNode(e.unref(b.ElInput),{modelValue:l.slide.reagent,"onUpdate:modelValue":d[3]||(d[3]=c=>l.slide.reagent=c),placeholder:e.unref(n)("输入试剂"),clearable:""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]))]),_:1})]),_:1},8,["modelValue","title"])]))}}),Zt=G(Wt,[["__scopeId","data-v-7397de48"]]);function Yt(u,t){const n=e.ref(1),o=e.ref(null),y=e.ref(null);function f(){u.value.viewer.addHandler("canvas-drag",r=>{o.value||(o.value=r.position)}),u.value.viewer.addHandler("canvas-drag-end",r=>{if(n.value!==1){y.value=r.position;const v=u.value.viewer.viewport.containerSize.x,w=u.value.viewer.viewport.containerSize.y,h=(y.value.x-o.value.x)/(v*t.value)*(n.value-1),l=(y.value.y-o.value.y)/(w*t.value)*(n.value-1),d=u.value.viewer.viewport.getCenter(),c=new M.OpenSeadragon.Point(d.x-h,d.y-l);u.value.viewer.viewport.panTo(c),o.value=null}})}function s({name:r,value:v}){r==="ratio"&&(n.value=v/1)}return{moveEvent:f,fastMove:s}}function Xt(u,t,n,o,y){const f=e.ref(void 0),s=e.ref([]);e.watch(()=>u.aiLabelList,h);function r(){n.value.$on(M.KfbView.events.EVENT_END_PAINTING,v("add")),n.value.$on(M.KfbView.events.EVENT_AREA_MOVE_END,v("move")),n.value.$on(M.KfbView.events.EVENT_ADD_POLYGON_POINT,v("add-point")),n.value.$on(M.KfbView.events.EVENT_DELETE_POLYGON_POINT,v("delete-point")),n.value.$on(M.KfbView.events.EVENT_DELETE_LABEL,v("delete")),n.value.$on(M.KfbView.events.EVENT_SELECT_LABEL,a=>{f.value=a,c(),t("tool","select-label",f.value)}),n.value.$on(M.KfbView.events.EVENT_CANCEL_SELECT_LABEL,()=>{f.value=void 0,t("tool","cancel-select-label",f.value)}),v("list")()}function v(a){return m=>w(a,m)}function w(a,m){var k;if(a==="add"&&m&&((m==null?void 0:m.subType)||((k=m==null?void 0:m.__data__)==null?void 0:k.subType))==="voice")o(m);else return u.labelHandle(a,u.slide,m,s.value).then(g=>{s.value=g,h()}).catch(()=>{h()})}function h(){var a;if((a=n.value)!=null&&a.initLabelList){const m=[...s.value,...u.aiLabelList||[]];m.find(({id:k})=>{var g;return k===((g=f.value)==null?void 0:g.id)})||(f.value=void 0),n.value.initLabelList(m)}}function l(a,m){var g,p;f.value&&(f.value.select=!1,f.value=void 0);const k=(n.value.labelList||[]).findIndex(i=>i.id===a.id);if(k>-1){f.value=(g=n.value.labelList)==null?void 0:g[k],f.value.select=!0;const i=n.value.area.getCenterPoint(a.region);n.value.area.moveToLabel(i),(p=n.value.viewer)!=null&&p.canvas&&n.value.viewer.canvas.focus(),c()}m&&y(m)}function d(a){return u.labelHandle("add",u.slide,a,s.value).then(m=>{s.value=m,h()}).catch(()=>{h()})}function c(){var m,k,g,p;(((m=f.value)==null?void 0:m.subType)||((g=(k=f.value)==null?void 0:k.__data__)==null?void 0:g.subType))==="voice"&&((p=f.value)!=null&&p.src)&&new Audio(f.value.src).play()}return{currentLabel:f,localLabelList:s,initLabel:r,jumpToLabel:l,reloadLabelList:h,eventHandel:v,addHandle:d}}function Jt(){function u(t,n){t.save(),t.strokeStyle="rgba(0,0,0,0)",t.miterLimit=4,t.font="15px",t.fillStyle=n,t.font="15px",t.scale(.02734375,.02734375),t.save(),t.font="15px",t.beginPath(),t.moveTo(512,427.023),t.moveTo(422,427.023),t.translate(512,427.023),t.rotate(0),t.arc(0,0,90,3.141592653589793,6.283185307179586,!0),t.rotate(0),t.translate(-512,-427.023),t.translate(512,427.023),t.rotate(0),t.arc(0,0,90,0,3.141592653589793,!0),t.rotate(0),t.translate(-512,-427.023),t.fill(),t.stroke(),t.restore(),t.save(),t.font="15px",t.beginPath(),t.moveTo(512,910.402),t.bezierCurveTo(492.86,910.402,474.51800000000003,904.548,458.95799999999997,893.4730000000001),t.bezierCurveTo(444.895,883.4630000000001,434.032,869.8770000000001,427.36899999999997,854.013),t.lineTo(255.043,585.177),t.lineTo(254.889,584.927),t.bezierCurveTo(225.522,537.209,210,482.605,210,427.021),t.bezierCurveTo(210,346.35400000000004,241.414,270.515,298.454,213.47500000000002),t.bezierCurveTo(355.494,156.43500000000006,431.333,125.021,512,125.021),t.bezierCurveTo(592.6669999999999,125.021,668.506,156.435,725.546,213.475),t.bezierCurveTo(782.587,270.515,814,346.354,814,427.021),t.bezierCurveTo(814,482.87,798.345,537.692,768.726,585.56),t.lineTo(768.462,585.9789999999999),t.lineTo(596.381,854.6949999999999),t.bezierCurveTo(589.626,870.4209999999999,578.721,883.871,564.677,893.7499999999999),t.bezierCurveTo(549.192,904.6449999999999,530.977,910.4019999999999,512,910.4019999999999),t.closePath(),t.moveTo(309.246,551.141),t.lineTo(484.74,824.9209999999999),t.lineTo(485.934,828.1179999999999),t.bezierCurveTo(490.083,839.2249999999999,500.31500000000005,846.4019999999999,512,846.4019999999999),t.bezierCurveTo(523.584,846.4019999999999,533.791,839.3309999999999,538.004,828.387),t.lineTo(539.169,825.3589999999999),t.lineTo(714.43,551.678),t.bezierCurveTo(737.701,513.983,750,470.884,750,427.021),t.bezierCurveTo(750,363.449,725.244,303.682,680.2909999999999,258.72900000000004),t.bezierCurveTo(635.3389999999999,213.77800000000005,575.5719999999999,189.02100000000004,511.99999999999994,189.02100000000004),t.bezierCurveTo(448.428,189.02100000000004,388.66099999999994,213.77700000000004,343.70799999999997,258.72900000000004),t.bezierCurveTo(298.755,303.68100000000004,274,363.449,274,427.021),t.bezierCurveTo(274,470.661,286.186,513.573,309.246,551.1410000000001),t.closePath(),t.fill(),t.stroke(),t.restore(),t.restore()}return{drawDot:u}}function Qt(u,t){const{t:n}=j(),o=e.ref(!1),y=e.ref();let f=null;const s=e.ref(!1),r=e.ref(0);let v=0;const w=e.ref([]),h=e.ref(void 0);let l=!1;function d(i,E){i.save(),i.strokeStyle="rgba(0,0,0,0)",i.miterLimit=4,i.font="15px ''",i.fillStyle=E,i.font=" 15px ''",i.scale(.03125,.03125),i.save(),i.font=" 15px ''",i.beginPath(),i.moveTo(515.041727,670.617766),i.bezierCurveTo(606.625894,670.617766,681.137374,596.113511,681.137374,504.52212),i.lineTo(681.137374,229.350568),i.bezierCurveTo(681.137374,137.76640100000003,606.625894,63.254920999999996,515.041727,63.254920999999996),i.bezierCurveTo(423.44311000000005,63.254920999999996,348.93885500000005,137.766401,348.93885600000004,229.350568),i.lineTo(348.93885600000004,504.52212),i.bezierCurveTo(348.93885600000004,596.113512,423.44311100000004,670.617767,515.041727,670.617766),i.closePath(),i.fill(),i.stroke(),i.restore(),i.save(),i.font=" 15px ''",i.beginPath(),i.moveTo(801.643237,874.001665),i.lineTo(558.391759,874.001665),i.lineTo(558.391759,828.578057),i.bezierCurveTo(719.899527,807.264291,844.993269,668.7898399999999,844.993269,501.55986699999994),i.translate(801.643237,501.55986699999994),i.rotate(0),i.arc(0,0,43.350032,0,3.141592653589793,!0),i.rotate(0),i.translate(-801.643237,-501.55986699999994),i.bezierCurveTo(758.2932050000001,635.684865,649.166725,744.811345,515.0345020000001,744.811346),i.bezierCurveTo(380.9095040000001,744.811346,271.79024900000013,635.6848659999999,271.79024900000013,501.55986699999994),i.translate(228.44021750000013,501.5664510740879),i.rotate(0),i.arc(0,0,43.350032,-.00015188164315591997,-3.1414407719461273,!0),i.rotate(0),i.translate(-228.44021750000013,-501.5664510740879),i.bezierCurveTo(185.09018600000013,668.7898389999999,310.1911530000001,807.271516,471.69169500000015,828.578057),i.lineTo(471.69169500000015,874.001665),i.lineTo(228.440217,874.001665),i.translate(228.440217,917.3516970000001),i.rotate(0),i.arc(0,0,43.350032,-1.5707963267948966,1.5707963267948966,!0),i.rotate(0),i.translate(-228.440217,-917.3516970000001),i.lineTo(801.643237,960.701729),i.translate(801.643237,917.3516970000001),i.rotate(0),i.arc(0,0,43.350032,1.5707963267948966,4.71238898038469,!0),i.rotate(0),i.translate(-801.643237,-917.3516970000001),i.closePath(),i.fill(),i.stroke(),i.restore(),i.restore()}function c(){return J(this,null,function*(){try{y.value=yield navigator.mediaDevices.getUserMedia({audio:!0}),f=new MediaRecorder(y.value),w.value=[],f.addEventListener("dataavailable",i=>{w.value.push(i.data)}),f.addEventListener("stop",()=>J(this,null,function*(){if(h.value){const i=new Blob(w.value,{type:u.audioType||"audio/wav"});h.value.src=URL.createObjectURL(i)}s.value=!1,l&&(yield p())})),f.start(),s.value=!0,v=window.setInterval(()=>{r.value++},1e3)}catch(i){b.ElMessage.error(n("麦克风启用失败,请确认是否开启麦克风权限"))}})}function a(){y.value&&f?(f.stop(),y.value.getTracks().forEach(i=>i.stop()),f=null,y.value=void 0):(f=null,y.value=void 0),s.value=!1,v&&(clearInterval(v),v=0),r.value=0}function m(i){o.value=!0,h.value=i,w.value=[],l=!1}function k(){s.value&&a(),o.value=!1,s.value=!1,l=!1}function g(){return J(this,null,function*(){if(!s.value&&!w.value.length){b.ElMessage.error(n("请先录音"));return}s.value&&a(),s.value=!1,l=!0,w.value.length&&(yield p()),o.value=!1})}function p(){return J(this,null,function*(){if(u.uploadHandle&&h.value){const i=b.ElLoading.service({text:n("录音上传中")}),E=new Blob(w.value,{type:u.audioType||"audio/wav"});w.value=[];try{yield u.uploadHandle(u.slide,h.value,E).then(B=>{h.value.src=B}),i.close(),t(h.value)}catch(B){i.close()}}})}return{voiceVisible:o,voiceForm:h,recordTime:r,isRecording:s,drawVoice:d,startRecording:c,stopRecording:a,initVoice:m,cancelRecord:k,confirmRecord:g}}function eo(u,t,n){const o=e.ref([]),y=e.ref(0),f=e.ref(!1);let s=null;e.watch(()=>{var c;return(c=u.analysis)==null?void 0:c.hotmap_path},c=>{var a,m,k;if((m=(a=t.value)==null?void 0:a.viewer)!=null&&m.world){y.value=0;const g=t.value.viewer.world.getItemAt(0);g&&(g.tilesMatrix={},g.draw())}c&&((k=u.analysis)!=null&&k.zoom_roi)&&n({x:u.analysis.zoom_roi.x,y:u.analysis.zoom_roi.y,width:u.analysis.zoom_roi.w,height:u.analysis.zoom_roi.h},5)}),e.onMounted(()=>{window.addEventListener("mousemove",w),window.addEventListener("mouseup",l)}),e.onBeforeUnmount(()=>{window.removeEventListener("mousemove",w),window.removeEventListener("mouseup",l)});function r(c,a,m){var g,p,i,E;const k=Y(R({},a),{file:(g=u.analysis)==null?void 0:g.hotmap_path});if((p=u.analysis)!=null&&p.hotmap_info){if(m[a.x+"_"+a.y+"_"+Number(a.scale)])if(((i=u.analysis)==null?void 0:i.hotmap_type)==="drag")v(c,k);else return u.tileHandle(k)}else if(((E=u.analysis)==null?void 0:E.hotmap_type)==="drag")v(c,k);else return u.tileHandle(k);return c}function v(c,a){const m=o.value.find(k=>k.url===c)||{url:c,x:a.x,y:a.y,img:void 0,load:""};if(!(m!=null&&m.img)&&(o.value.push(m),m.load!=="success")){const k=new Image;k.src=u.tileHandle(a),k.onload=()=>{m.load="success"},m.img=k}}function w(c){f.value&&s&&(y.value+=c.x-s.x,y.value<0?y.value=0:y.value>t.value.$options.width&&(y.value=t.value.$options.width,f.value=!1),t.value.viewer.forceRedraw()),s={x:c.x,y:c.y}}function h(c){const{x:a,y:m}=c;f.value=!0,s={x:a,y:m}}function l(){f.value=!1,s=null}function d(c){const{context:a,sourceWidth:m,sourceHeight:k,position:g,size:p,initRendered:i,tile:E,pixelDensityRatio:B}=c,N=E.getUrl(),H=y.value*B,q=g.original.x;if(q<H&&q+p.x>H){const L=H-q,K=p.x-L,F=o.value.find(te=>te.url===N),ee=(F==null?void 0:F.load)==="success"?F.img:i.canvas;a.drawImage(ee,0,0,m*L/p.x,k,g.x,g.y,L,p.y),a.drawImage(i.canvas,m*L/p.x,0,m*K/p.x,k,g.x+L,g.y,K,p.y)}else if(q+p.x<=H){const L=o.value.find(F=>F.url===N),K=(L==null?void 0:L.load)==="success"?L.img:i.canvas;a.drawImage(K,0,0,m,k,g.x,g.y,p.x,p.y)}else q>=H&&a.drawImage(i.canvas,0,0,m,k,g.x,g.y,p.x,p.y)}return{getHotmapUrl:r,hotmapImgs:o,handlerImage:d,hotmapLine:y,lineMouseDown:h}}function to(u,t,n){const o=e.getCurrentInstance(),y=e.ref(!1),f=new BroadcastChannel("sync_kfb_view");f.onmessage=l=>{const d=l.data;w(d)},e.onMounted(()=>{var l,d,c;(l=n.value)==null||l.addEventListener("mouseenter",s),(d=n.value)==null||d.addEventListener("mousemove",s),(c=n.value)==null||c.addEventListener("mouseleave",r)}),e.onBeforeUnmount(()=>{var l,d,c;(l=n.value)==null||l.removeEventListener("mouseenter",s),(d=n.value)==null||d.removeEventListener("mousemove",s),(c=n.value)==null||c.removeEventListener("mouseleave",r),f.close()});function s(){y.value=!0}function r(){y.value=!1}function v(){let l;t.value.viewer.addHandler("pan",d=>{var m,k,g,p;if(!l){l=(k=(m=d.center)==null?void 0:m.clone)==null?void 0:k.call(m);return}const c=d.center,a=(g=c==null?void 0:c.minus)==null?void 0:g.call(c,l);l=(p=c==null?void 0:c.clone)==null?void 0:p.call(c),u.syncPosition&&h({position:a,type:"sync_position"})}),t.value.viewer.addHandler("zoom",d=>{u.syncZoom&&h({zoom:d.zoom,type:"sync_zoom"})}),t.value.viewer.addHandler("animation-finish",()=>{var a;if(u.syncZoom&&h({zoom:t.value.viewer.viewport.getZoom(!0),type:"sync_zoom"}),!l)return;const d=t.value.viewer.viewport.getCenter(!0),c=(a=d==null?void 0:d.minus)==null?void 0:a.call(d,l);l=void 0,u.syncPosition&&h({position:c,type:"sync_position"})})}function w(l){l.uuid&&l.type==="sync_position"&&l.uuid!==(o==null?void 0:o.uid)?t.value&&t.value.viewer.viewport.panBy(l.position,!0):l.uuid&&l.type==="sync_zoom"&&l.uuid!==(o==null?void 0:o.uid)&&t.value&&t.value.viewer.viewport.zoomTo(l.zoom)}function h(l){var d;y.value&&f.postMessage(Y(R({},l),{uuid:o==null?void 0:o.uid,fileName:(d=u.slide)==null?void 0:d.file}))}return{initSync:v}}const oo={class:"hzzt-kfb-keyword flex wrap"},no=["onMouseenter"],lo=e.defineComponent({__name:"KfbKeyword",setup(u){const t=e.ref([{code:"Q",icon:"zoomIn"},{code:"W",icon:"arrowUp"},{code:"E",icon:"zoomOut"},{code:"A",icon:"arrowLeft"},{code:"S",icon:"arrowDown"},{code:"D",icon:"arrowRight"}]),n=e.inject("kfbView",e.ref({}));let o=null;function y(s,r){s.preventDefault(),o&&clearTimeout(o),o=setInterval(()=>{r==="E"&&(n.value.viewer.viewport.zoomBy(1.1),n.value.viewer.viewport.applyConstraints()),r==="Q"&&(n.value.viewer.viewport.zoomBy(.9),n.value.viewer.viewport.applyConstraints()),r==="W"&&(n.value.viewer.viewport.panBy(n.value.viewer.viewport.deltaPointsFromPixels(new M.OpenSeadragon.Point(0,-40))),n.value.viewer.viewport.applyConstraints()),r==="S"&&(n.value.viewer.viewport.panBy(n.value.viewer.viewport.deltaPointsFromPixels(new M.OpenSeadragon.Point(0,40))),n.value.viewer.viewport.applyConstraints()),r==="A"&&(n.value.viewer.viewport.panBy(n.value.viewer.viewport.deltaPointsFromPixels(new M.OpenSeadragon.Point(-40,0))),n.value.viewer.viewport.applyConstraints()),r==="D"&&(n.value.viewer.viewport.panBy(n.value.viewer.viewport.deltaPointsFromPixels(new M.OpenSeadragon.Point(40,0))),n.value.viewer.viewport.applyConstraints())},120)}function f(){o&&(clearInterval(o),o=null)}return e.onBeforeUnmount(()=>{clearTimeout(o)}),(s,r)=>(e.openBlock(),e.createElementBlock("div",oo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,v=>(e.openBlock(),e.createElementBlock("div",{key:v.code,class:"hzzt-kfb-keyword__code flex column align-items-center justify-content-center",onMouseenter:w=>y(w,v.code),onMouseleave:f},[e.createElementVNode("p",null,e.toDisplayString(v.code),1),e.createVNode(I,{size:"14",name:v.icon},null,8,["name"])],40,no))),128))]))}}),ao=G(lo,[["__scopeId","data-v-c8d940f0"]]);function ro(u,t,n={}){const{panSensitivity:o=.2,zoomSensitivity:y=1.1,damping:f=.6,minThreshold:s=.05}=n;let r=!1,v=null,w=0,h=0,l=!1;const d=()=>{r=document.pointerLockElement===t.value,r||c()},c=()=>{w=0,h=0,v&&(cancelAnimationFrame(v),v=null),l=!1},a=i=>J(this,null,function*(){try{i.key==="l"&&t.value&&(document.pointerLockElement?(document.exitPointerLock(),console.log("鼠标已解锁!")):(yield t.value.requestPointerLock(),console.log("鼠标已锁定!")))}catch(E){console.error("无法锁定鼠标:",E)}}),m=i=>{if(r){i.preventDefault();const E=Math.pow(y,Math.sign(i.deltaY)*-1);u.value.viewer.viewport.zoomBy(E),u.value.viewer.viewport.applyConstraints()}},k=i=>{r&&(w+=i.movementX*o,h+=i.movementY*o,!l&&(Math.abs(w)>1||Math.abs(h)>1)&&(l=!0,v=requestAnimationFrame(g)))},g=()=>{const i=u.value.viewer.viewport;if(Math.abs(w)>s||Math.abs(h)>s){const E=i.deltaPointsFromPixels(new M.OpenSeadragon.Point(w,h));i.panBy(E),i.applyConstraints()}w*=f,h*=f,Math.abs(w)>s||Math.abs(h)>s?v=requestAnimationFrame(g):c()},p=()=>{r&&document.exitPointerLock()};return e.onMounted(()=>{var i;(i=t.value)==null||i.addEventListener("keydown",a),document.addEventListener("wheel",m,{passive:!1}),document.addEventListener("click",p),document.addEventListener("mousemove",k),document.addEventListener("pointerlockchange",d)}),e.onBeforeUnmount(()=>{var i;(i=t.value)==null||i.removeEventListener("keydown",a),document.removeEventListener("click",p),document.removeEventListener("wheel",m),document.removeEventListener("mousemove",k),document.removeEventListener("pointerlockchange",d),c()}),{setConfig:i=>{Object.assign(n,i)}}}const io=e.defineComponent({__name:"KfbLevel",props:e.mergeModels({slides:{default:()=>[]}},{"model-value":{default:0},"model-valueModifiers":{}}),emits:["update:model-value"],setup(u){const t=u,n=e.useModel(u,"model-value"),o=e.inject("kfbView",e.ref({})),y=e.computed(()=>Array.from(new Array(t.slides.length+1)).map((s,r)=>r));function f(){const s=o.value.viewer.world.getItemAt(0),r=Object.keys(s.tilesMatrix);r.forEach((v,w)=>{w>r.length-4&&(s.tilesMatrix[v]={})}),s.draw()}return(s,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["hzzt-kfb-level flex column align-items-center",s.slides.length>5?"hzzt-kfb-level--large":""])},[e.createVNode(I,{name:"level",size:"24",class:"margin-b-4 margin-t-2"}),e.createVNode(e.unref(b.ElSlider),{modelValue:n.value,"onUpdate:modelValue":r[0]||(r[0]=v=>n.value=v),vertical:"",min:y.value[0],step:1,max:y.value[y.value.length-1],"show-stops":"","show-tooltip":!0,placement:"left",height:s.slides.length>5?"180px":"130px",onInput:f},null,8,["modelValue","min","max","height"])],2))}}),so={key:0,class:"flex hzzt-kfb-channel"},uo=["onClick"],co=e.defineComponent({__name:"KfbChannel",props:e.mergeModels({info:{}},{"model-value":{default:()=>[]},"model-valueModifiers":{}}),emits:e.mergeModels(["load"],["update:model-value"]),setup(u,{emit:t}){const n=u,o=t,y=e.useModel(u,"model-value"),f=[{key:"DAPI",color:"#4A6CF7"},{key:"480",color:"#00BFFF"},{key:"520",color:"#32CD32"},{key:"570",color:"#FFAA33"},{key:"620",color:"#FF6347"},{key:"670",color:"#DC143C"},{key:"780",color:"#4B0082"}],s=e.computed(()=>{var v;return(((v=n.info)==null?void 0:v.channel)||[]).map(w=>{const h=f.find(l=>l.key===w.eqt_num);return{label:w.eqt_num,color:w.r?`rgb(${w.r}, ${w.g}, ${w.b})`:h==null?void 0:h.color}})});function r(v){y.value.includes(v)?y.value=y.value.filter(w=>w!==v):y.value.push(v),o("load")}return(v,w)=>s.value.length>0?(e.openBlock(),e.createElementBlock("div",so,[e.createVNode(I,{name:"channel",size:"32"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,h=>(e.openBlock(),e.createElementBlock("div",{key:h.label,style:e.normalizeStyle({background:h.color}),class:e.normalizeClass(["hzzt-kfb-channel__box",y.value.includes(h.label)?"":"hzzt-kfb-channel__box--unactive"]),onClick:l=>r(h.label)},e.toDisplayString(h.label),15,uo))),128))])):e.createCommentVNode("",!0)}}),fo={class:"flex align-items-center justify-content-between"},mo={class:"hzzt-kfb-title"},vo={class:"hzzt-kfb-annotation__container flex-1"},po=["onClick"],ho=e.defineComponent({__name:"KfbAnnotation",props:e.mergeModels({annotation:{},annotations:{}},{expand:{type:Boolean},expandModifiers:{}}),emits:e.mergeModels(["select"],["update:expand"]),setup(u,{emit:t}){const n=e.useModel(u,"expand"),o=t,{t:y}=j();function f(r){const v=r.subType||r.tool||"";return`mark${v.substring(0,1).toLocaleUpperCase()}${v.substring(1)}`}function s(r){o("select",r)}return(r,v)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["hzzt-kfb-annotation flex column",n.value?"hzzt-kfb-annotation--expand":""])},[e.createElementVNode("div",fo,[e.withDirectives(e.createElementVNode("div",mo,[e.createElementVNode("span",null,e.toDisplayString(e.unref(y)("标注列表")),1)],512),[[e.vShow,n.value]]),e.createVNode(I,{class:"hzzt-kfb-annotation__icon",name:n.value?"expandLeft":"expandRight",onClick:v[0]||(v[0]=w=>n.value=!n.value)},null,8,["name"])]),e.withDirectives(e.createElementVNode("div",vo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.annotations,(w,h)=>{var l;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["hzzt-kfb-annotation__item",((l=r.annotation)==null?void 0:l.id)===w.id?"hzzt-kfb-annotation__item--active":""]),key:h,onClick:d=>s(w)},[e.createVNode(I,{size:"16",name:f(w)},null,8,["name"]),e.createElementVNode("span",null,e.toDisplayString(e.unref(y)("标注"))+e.toDisplayString(h+1),1)],10,po)}),128))],512),[[e.vShow,n.value]])],2))}}),go=G(ho,[["__scopeId","data-v-bfc56a3e"]]);function Me(u){const{t}=j();return e.computed(()=>{var y;const o=((y=u==null?void 0:u.analysis)==null?void 0:y.result)||"";return o.indexOf("疑似阳性")>-1?{type:"warning",name:o}:o.indexOf("阳性")>-1?{type:"danger",name:o}:o.indexOf("阴性")>-1?{type:"success",name:o}:o.indexOf("不合格")>-1?{type:"danger",name:o}:o.indexOf("合格")>-1?{type:"success",name:o}:{type:"info",name:o||t("未知")}})}const yo=["element-loading-text"],wo={key:1,class:"hzzt-kfb-view__main flex align-items-center justify-content-center"},ko={class:"hzzt-kfb-view__filter",height:"0",width:"0"},_o={id:"colorMatrixFilter"},bo=["values"],Co=["values"],Vo=["exponent"],Eo=["exponent"],No=["exponent"],zo={class:"flex nowrap justify-content-center overflow-hidden"},Bo=["src"],xo=["src"],To={class:"flex-1"},So={class:"flex-1"},Lo={class:"flex-1"},$o={class:"flex-1"},Po={class:"flex-1"},Ro={class:"flex-1"},Io=["src"],Do={key:2,class:"margin-l-2"},Ao={key:9,class:"hzzt-kfb-view__watermark"},Q=e.defineComponent({name:"HzztKfbView",__name:"index",props:{slide:{},fileHandle:{},labelHandle:{},tileHandle:{},navigatorHandle:{},pathologyHandle:{},uploadHandle:{},options:{},labelDrawing:{},process:{default:()=>R({},ke)},microscope:{default:()=>R({},ce)},menus:{},syncPosition:{type:Boolean},syncZoom:{type:Boolean},audioType:{},watermark:{},analysis:{},aiLabelList:{}},emits:["tool"],setup(u,{expose:t,emit:n}){e.useCssVars(_=>({"102f89ac":q.value}));const o=u,y=n,{t:f,locale:s}=j(),r=e.ref(),v=e.ref(),w=e.ref(),h=e.ref(!1),l=e.ref({}),d=e.ref(!1),c=e.ref(0),a=e.ref(0),m=e.ref(0),k=e.ref([]),g=e.ref({width:0,height:0,fileNum:0,scanScale:1,fileName:"",ratiomap:{}}),p=e.inject("show-kfb-label",e.ref(!0)),i=e.inject("show-keyboard",e.ref(!1)),E=e.inject("show-watermark",e.ref(!1)),B=e.ref(!1),N=b.ElLoading.directive;e.watch(()=>{var _;return(_=o.slide)==null?void 0:_.file},()=>{Qe(),setTimeout(()=>{Ee()},100)}),e.onMounted(()=>{Ee()});const H=Me(o),q=e.computed(()=>{var _,V;return`url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='150' height='100'><text x='30' y='80' font-family='Arial' font-size='16' fill='${((_=o.watermark)==null?void 0:_.color)||"rgba(0,0,0,0.2)"}' transform='rotate(-30)' text-anchor='middle'>${((V=o.watermark)==null?void 0:V.text)||"水印文字"}</text></svg>")`}),{imageProcess:L,matrixValues:K,saturateValues:F,forceRedraw:ee}=Et(o),{tailorEvent:te,shotScreen:Z}=Nt(y,l),{moveEvent:re,fastMove:fe}=Yt(l,a),{initSync:me}=to(o,l,r);ro(l,r);const{drawDot:ve}=Jt(),{voiceVisible:oe,voiceForm:ne,drawVoice:pe,recordTime:C,isRecording:z,startRecording:S,stopRecording:O,initVoice:_e,cancelRecord:He,confirmRecord:Fe}=Qt(o,Oe),{currentLabel:he,localLabelList:be,initLabel:qe,jumpToLabel:Ce,reloadLabelList:Ue,eventHandel:je,addHandle:Ke}=Xt(o,y,l,_e,ge);function Oe(_){Ke(_)}const{getHotmapUrl:Ge,handlerImage:We,hotmapLine:Ze,lineMouseDown:Ve,hotmapImgs:Ye}=eo(o,l,ye);function Ee(){var _;(_=o.slide)!=null&&_.file&&o.fileHandle&&(d.value||(d.value=!0,o.fileHandle(o.slide).then(V=>{var D,U,W,$;g.value=V,k.value=(((D=g.value)==null?void 0:D.channel)||[]).map(T=>T.eqt_num),l.value=new M.KfbView(R({el:v.value,fileName:(U=o.slide)==null?void 0:U.file,scale:g.value.scanScale,lang:(s==null?void 0:s.value)==="en-US"?"en":s==null?void 0:s.value,navigator:{style:"left: 0;bottom: 0",thumbnail:g.value.thumbnailImg,width:200,height:180},grid:{show:!1,ruler:!1,pxConversion:!0},thumb:{bgColor:"rgba(0,0,0,0)"},graduation:{show:!0,right:120,bottom:($=(W=g.value)==null?void 0:W.channel)!=null&&$.length?120:30,tick:{number:3,height:8}},pxConversion:{units:["um","mm"],binary:1e3,imageCapRes:g.value.imageCapRes||g.value.scanResolution||1},openSeadragonOptions:{maxZoomLevel:g.value.scanScale*20,pixelsPerArrowPress:200,animationTime:0,tileSources:Ne()},tileDrawing:We,label:{drawing:(T,x,X)=>{var ie;if(x!=null&&x.custom){const A=T.getContext("2d");A.save(),A.beginPath();const le=(x==null?void 0:x.subType)||((ie=x==null?void 0:x.__data__)==null?void 0:ie.subType);le==="count"?(A.translate(X.x-14,X.y-22),ve(A,(x==null?void 0:x.strokeStyle)||"")):le==="voice"?(A.translate(X.x-16,X.y-18),pe(A,(x==null?void 0:x.strokeStyle)||"")):o.labelDrawing&&o.labelDrawing(A,x),A.restore()}}}},o.options||{})),l.value.viewer.drawer.canvas.style.filter="url(#colorMatrixFilter)",qe(),Je(),me(),setTimeout(()=>{var T,x;(T=o.analysis)!=null&&T.hotmap_path&&((x=o.analysis)!=null&&x.zoom_roi)&&ye({x:o.analysis.zoom_roi.x,y:o.analysis.zoom_roi.y,width:o.analysis.zoom_roi.w,height:o.analysis.zoom_roi.h},5)},200)}).finally(()=>{d.value=!1,p.value||(Te({show:!1,ruler:!1}),Se({show:!1}),setTimeout(()=>{Le(!1)},100))})))}function Xe(){const _=l.value.viewer;if(_.world){const V=_.world.getItemAt(0),D=_.viewport.getZoom(),U=_.viewport.getCenter();_.world.removeItem(V),_.addTiledImage({tileSource:Ne(),success:function(){_.viewport.zoomTo(D),_.viewport.panTo(U)}})}}function Ne(){var W,$;const _=g.value.tileWidth||g.value.imageBlockLen||256,V=g.value.tileHeight||g.value.imageBlockLen||256,D={};(W=o.analysis)!=null&&W.hotmap_path&&((($=o.analysis)==null?void 0:$.hotmap_info)||[]).forEach(T=>{D[T[0]/_+"_"+T[1]/V+"_"+T[2]]=!0});let U=10;return Object.keys(g.value.ratiomap).forEach(T=>{const x=g.value.fileNum-Math.sqrt(g.value.scanScale/Number(T));x>0&&(U=U?Math.min(U,x):x)}),{height:g.value.height,width:g.value.width,tileWidth:_,tileHeight:V,minLevel:Math.floor(U||8),getTileUrl:(T,x,X)=>{var $e,Pe,Re,Ie;const ie=T,A={file:(($e=o.slide)==null?void 0:$e.file)||"",x,y:X,scale:"0",level:T,channel:JSON.stringify(k.value)};g.value.fileNum===T?(T=g.value.scanScale,A.scale=T.toFixed(6)):(T=g.value.scanScale/Math.pow(2,g.value.fileNum-T),A.scale=T.toFixed(6)),A.level=ie,A.file=m.value===0?A.file:((Re=(Pe=o.slide)==null?void 0:Pe.children)==null?void 0:Re[m.value-1])||"";const le=o.tileHandle(A);return(Ie=o.analysis)!=null&&Ie.hotmap_path?Ge(le,A,D):le}}}function Je(){l.value.viewer.addHandler("rotate",_=>{c.value=_.degrees||0}),l.value.viewer.addHandler("zoom",_=>{const V=l.value.viewer.viewport.viewportToImageZoom(_.zoom||0)*Number(l.value.$options.scale);a.value=Number(V.toFixed(2))}),l.value.$on(M.KfbView.events.EVENT_NAVIGATOR_VESTIGE,_=>{o.navigatorHandle&&o.navigatorHandle("add",o.slide,_)}),o.navigatorHandle&&o.navigatorHandle("list",o.slide).then(_=>{var V,D;(D=(V=l.value.navigator)==null?void 0:V.drawPointList)==null||D.call(V,_)}),te(),re()}function Qe(){var _;(_=l.value)!=null&&_.destroy&&(l.value.destroy(),l.value={},g.value={width:0,height:0,fileNum:0,scanScale:1,fileName:"",ratiomap:{}},Ye.value=[],k.value=[],a.value=0,c.value=0,m.value=0)}function ze(_,V){_==="annotate"?Be(V):_==="tailor"?Z(V):_==="info"?h.value=!0:_==="flip"?xe():_==="delete"?je("delete")(he.value):y("tool",_,V)}function Be(_){_.tool==="Voice"&&(_.subType="voice",_.tool="Dot",_.custom=!0),l.value.board.startDraw(_)}function et(){l.value.board.endDraw()}function xe(){l.value.viewer.viewport.toggleFlip()}function tt(_){var V,D;(D=(V=w.value)==null?void 0:V.scopeChange)==null||D.call(V,_)}function ot(){h.value=!0}function Te(_){var V;(V=l.value)!=null&&V.grid&&l.value.grid.updated(_)}function Se(_){var V;(V=l.value)!=null&&V.graduation&&l.value.graduation.updated(_)}function Le(_){var V;(V=l.value)!=null&&V.navigator&&(l.value.navigator.element.style.display=_?"flex":"none")}function ge(_){const V=l.value.viewer.viewport.imageToViewportZoom(Number(_/l.value.$options.scale));l.value.viewer.viewport.zoomTo(V)}function ye(_,V){l.value.area&&(l.value.area.moveToLabel(l.value.viewer.viewport.imageToViewportCoordinates(_.x+_.width/2,_.y+_.height/2)),ge(V))}return e.provide("kfbView",l),e.provide("currentLabel",he),t({kfbView:l,degrees:c,zoom:a,forceRedraw:ee,toggleFlip:xe,startDraw:Be,endDraw:et,shotScreen:Z,info:ot,scopeChange:tt,updateGrid:Te,updateGraduation:Se,updateNavigator:Le,fastMove:fe,zoomTo:ge,jumpToLabel:Ce,jumpToPosition:ye,reloadLabelList:Ue}),(_,V)=>{var D,U,W;return e.openBlock(),e.createElementBlock("div",{ref_key:"mainKfbViewRef",ref:r,class:"hzzt-kfb-view"},[_.slide.file?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"kfbViewMainRef",ref:v,class:"hzzt-kfb-view__main","element-loading-text":e.unref(f)("加载中"),"element-loading-background":"rgba(0, 0, 0, 0.8)"},null,8,yo)),[[e.unref(N),d.value]]):(e.openBlock(),e.createElementBlock("div",wo,V[5]||(V[5]=[e.createElementVNode("img",{style:{width:"50%"},src:ue},null,-1)]))),_.analysis&&_.analysis.result?(e.openBlock(),e.createBlock(e.unref(b.ElTag),{key:2,class:"hzzt-kfb-view__tag",type:e.unref(H).type},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(H).name),1)]),_:1},8,["type"])):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",ko,[e.createElementVNode("filter",_o,[e.createElementVNode("feColorMatrix",{values:e.unref(K),type:"matrix"},null,8,bo),e.createElementVNode("feColorMatrix",{values:e.unref(F),type:"saturate"},null,8,Co),e.createElementVNode("feComponentTransfer",null,[e.createElementVNode("feFuncR",{id:"feFuncR",type:"gamma",exponent:e.unref(L).ga,amplitude:"1",offset:"0"},null,8,Vo),e.createElementVNode("feFuncG",{id:"feFuncG",type:"gamma",exponent:e.unref(L).ga,amplitude:"1",offset:"0"},null,8,Eo),e.createElementVNode("feFuncB",{id:"feFuncB",type:"gamma",exponent:e.unref(L).ga,amplitude:"1",offset:"0"},null,8,No)])])])),e.createVNode(It,{menus:_.menus,onTool:ze},null,8,["menus"]),e.createVNode(Mt,e.mergeProps(_.microscope,{ref_key:"microscopeRef",ref:w}),null,16),e.unref(p)&&_.slide.file&&g.value.labelImg?(e.openBlock(),e.createBlock(Zt,{key:3,info:g.value,slide:_.slide,pathologyHandle:_.pathologyHandle,onTool:ze},null,8,["info","slide","pathologyHandle"])):e.createCommentVNode("",!0),e.unref(i)?(e.openBlock(),e.createBlock(ao,{key:4})):e.createCommentVNode("",!0),(D=_.slide.children)!=null&&D.length?(e.openBlock(),e.createBlock(io,{key:5,modelValue:m.value,"onUpdate:modelValue":V[0]||(V[0]=$=>m.value=$),slides:_.slide.children},null,8,["modelValue","slides"])):e.createCommentVNode("",!0),(W=(U=g.value)==null?void 0:U.channel)!=null&&W.length?(e.openBlock(),e.createBlock(co,{key:6,modelValue:k.value,"onUpdate:modelValue":V[1]||(V[1]=$=>k.value=$),info:g.value,onLoad:Xe},null,8,["modelValue","info"])):e.createCommentVNode("",!0),e.unref(be).length?(e.openBlock(),e.createBlock(go,{key:7,expand:B.value,"onUpdate:expand":V[2]||(V[2]=$=>B.value=$),style:e.normalizeStyle({top:_.analysis&&_.analysis.result?"24px":"4px"}),annotation:e.unref(he),annotations:e.unref(be),onSelect:e.unref(Ce)},null,8,["expand","style","annotation","annotations","onSelect"])):e.createCommentVNode("",!0),e.createVNode(e.unref(b.ElDialog),{modelValue:h.value,"onUpdate:modelValue":V[3]||(V[3]=$=>h.value=$),"append-to-body":!0,title:e.unref(f)("图像信息"),width:"700px",top:"5vh"},{default:e.withCtx(()=>[e.createVNode(e.unref(b.ElForm),{"label-position":"left"},{default:e.withCtx(()=>[e.createVNode(e.unref(b.ElFormItem),{class:"flex","label-width":"0px"},{default:e.withCtx(()=>[e.createElementVNode("div",zo,[e.createElementVNode("img",{src:g.value.labelImg,style:{height:"180px"}},null,8,Bo),e.createElementVNode("img",{src:g.value.previewImg,style:{height:"180px"},class:"flex-1"},null,8,xo)])]),_:1}),e.createVNode(e.unref(b.ElFormItem),{label:e.unref(f)("文件名")},{default:e.withCtx(()=>[e.createElementVNode("span",To,e.toDisplayString(g.value.fileName),1)]),_:1},8,["label"]),e.createVNode(e.unref(b.ElFormItem),{label:e.unref(f)("图像像素")},{default:e.withCtx(()=>[e.createElementVNode("span",So,e.toDisplayString(g.value.width)+"Pixel - "+e.toDisplayString(g.value.height)+"Pixel",1)]),_:1},8,["label"]),e.createVNode(e.unref(b.ElFormItem),{label:e.unref(f)("扫描倍率")},{default:e.withCtx(()=>[e.createElementVNode("span",Lo,e.toDisplayString(g.value.scanScale),1)]),_:1},8,["label"]),e.createVNode(e.unref(b.ElFormItem),{label:e.unref(f)("扫描时刻")},{default:e.withCtx(()=>[e.createElementVNode("span",$o,e.toDisplayString(g.value.scanTime),1)]),_:1},8,["label"]),e.createVNode(e.unref(b.ElFormItem),{label:e.unref(f)("扫描时间")},{default:e.withCtx(()=>[e.createElementVNode("span",Po,e.toDisplayString(g.value.scanDuration||0)+"s",1)]),_:1},8,["label"]),g.value.ext?(e.openBlock(),e.createBlock(e.unref(b.ElFormItem),{key:0,label:e.unref(f)("扫描设备")},{default:e.withCtx(()=>[e.createElementVNode("span",Ro,e.toDisplayString(g.value.ext.machineNum||""),1)]),_:1},8,["label"])):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["modelValue","title"]),e.createVNode(e.unref(b.ElDialog),{modelValue:e.unref(oe),"onUpdate:modelValue":V[4]||(V[4]=$=>e.isRef(oe)?oe.value=$:null),"append-to-body":!0,title:e.unref(f)("语音输入"),width:"500px",top:"5vh"},{footer:e.withCtx(()=>[e.createVNode(e.unref(b.ElButton),{onClick:e.unref(He)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)("取消")),1)]),_:1},8,["onClick"]),e.createVNode(e.unref(b.ElButton),{type:"primary",onClick:e.unref(Fe)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)("确定")),1)]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(e.unref(b.ElForm),{"label-position":"left"},{default:e.withCtx(()=>{var $;return[e.createVNode(e.unref(b.ElFormItem),null,{default:e.withCtx(()=>{var T;return[(T=e.unref(ne))!=null&&T.src?(e.openBlock(),e.createElementBlock("audio",{key:0,class:"width-100%",src:e.unref(ne).src,controls:"",preload:"auto"},null,8,Io)):e.createCommentVNode("",!0)]}),_:1}),($=e.unref(ne))!=null&&$.src?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(b.ElFormItem),{key:0},{default:e.withCtx(()=>[e.unref(z)?(e.openBlock(),e.createBlock(e.unref(b.ElButton),{key:1,type:"danger",onClick:e.unref(O)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)("结束录音")),1)]),_:1},8,["onClick"])):(e.openBlock(),e.createBlock(e.unref(b.ElButton),{key:0,type:"primary",onClick:e.unref(S)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)("开始录音")),1)]),_:1},8,["onClick"])),e.unref(z)?(e.openBlock(),e.createElementBlock("span",Do,e.toDisplayString(e.unref(f)("录音时长"))+":"+e.toDisplayString(e.unref(C))+"s",1)):e.createCommentVNode("",!0)]),_:1}))]}),_:1})]),_:1},8,["modelValue","title"]),_.analysis&&_.analysis.hotmap_path&&_.analysis.hotmap_type!=="switch"?(e.openBlock(),e.createElementBlock("div",{key:8,class:"hzzt-kfb-view__hotmap",style:e.normalizeStyle({left:e.unref(Ze)+"px"})},[e.createVNode(e.unref(b.ElIcon),{class:"icon-caret-left",size:"30",onMousedown:e.unref(Ve)},{default:e.withCtx(()=>V[6]||(V[6]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M672 192 288 511.936 672 832z"})],-1)])),_:1,__:[6]},8,["onMousedown"]),e.createVNode(e.unref(b.ElIcon),{class:"icon-caret-right",size:"30",onMousedown:e.unref(Ve)},{default:e.withCtx(()=>V[7]||(V[7]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M384 192v640l384-320.064z"})],-1)])),_:1,__:[7]},8,["onMousedown"])],4)):e.createCommentVNode("",!0),e.unref(E)?(e.openBlock(),e.createElementBlock("div",Ao)):e.createCommentVNode("",!0),e.renderSlot(_.$slots,"default")],512)}}});function Mo(u,t){var k,g;const n=e.ref(!!((k=u.ai)!=null&&k.default)),o=e.ref(!!((g=u.ai)!=null&&g.default)),y=e.ref([]),f=e.computed(()=>{var p,i,E,B;return(p=t.value)!=null&&p.analysis?Object.prototype.toString.call((i=t.value)==null?void 0:i.analysis)==="[object Array]"?(E=t.value)==null?void 0:E.analysis:[(B=t.value)==null?void 0:B.analysis]:[]}),s=e.computed(()=>f.value.find(p=>(p==null?void 0:p.class)==="IQC")),r=e.computed(()=>!!s.value),v=e.computed(()=>f.value.find(p=>(p==null?void 0:p.class)!=="IQC")),w=e.computed(()=>!!v.value),h=e.computed(()=>n.value?v.value:o.value?s.value:void 0);e.watch(()=>{var p;return(p=u.ai)==null?void 0:p.default},()=>{l()}),e.watch(()=>{var p;return(p=t==null?void 0:t.value)==null?void 0:p.id},()=>{l(),d()}),e.onMounted(()=>{l(),d()});function l(){var p,i,E;n.value=!!((p=u.ai)!=null&&p.default),o.value=!!((i=u.ai)!=null&&i.default),w.value&&n.value&&(o.value=!1),r.value&&o.value&&(n.value=!1),(E=t.value)!=null&&E.id&&(w.value||(n.value=!1),r.value||(o.value=!1))}function d(){var p;(p=t.value)!=null&&p.id&&f.value.length?n.value||o.value?c():y.value=[]:y.value=[]}function c(){u.ai.handle(t.value,h.value).then(p=>{y.value=p}).catch(()=>{y.value=[]})}function a(){o.value=!1,d()}function m(){n.value=!1,d()}return{hasAi:w,hasIqc:r,currentAnalysis:h,aiLabelList:y,enableAi:n,enableIqc:o,toggleIqc:m,toggleAi:a}}const Ho=["src","fit"],Fo=["src","fit"],se=e.defineComponent({name:"KfbImage",__name:"KfbImage",props:{src:{type:String,required:!0,default:""},fit:{type:String,validator:u=>["","contain","cover","fill","none","scale-down"].includes(u),default:""},retryTimes:{type:Number,default:0},load:{type:Function,default:()=>({})},hover:{type:Boolean,default:!1}},setup(u){const t=u;let n=0;const o=e.ref(!1),y=e.reactive({x:0,y:0}),f=e.computed(()=>({top:`${y.y+10}px`,left:`${y.x}px`,transform:"translateY(-50%)",width:`${4*300/3}px`,height:"300px",background:"rgba(0,0,0,0.8)",zIndex:"10000"}));function s(h){const l=h.target;n<t.retryTimes?(l.src=t.src,n++):l.src=ue}function r(h){if(!t.hover)return;if(h.target){const m=h.target,k=m.tagName;let g="";if(m.tagName==="IMG"?g=m.src||"":k==="DIV"&&(g=m.children[0].src||""),g.indexOf(ue)>-1)return}const{x:l,y:d}=v(h),c=4*300/3,a=300;y.x=Math.min(Math.max(l,c/2),window.innerWidth-c/2),y.y=Math.min(Math.max(d,a/2),window.innerHeight-a/2),o.value=!0}function v(h){const l=h.target,d=h.offsetX,c=h.offsetY,a=l.clientWidth,m=l.clientHeight;return{x:h.clientX+a-d,y:h.clientY-c+m/2}}function w(){o.value=!1}return(h,l)=>(e.openBlock(),e.createElementBlock("div",{class:"relative",onMouseenter:r,onMouseleave:w},[e.createElementVNode("img",{src:u.src,fit:u.fit,onError:s,style:{height:"100%",width:"100%"}},null,40,Ho),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[o.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed hzzt-kfb-img-triangle-left",style:e.normalizeStyle(f.value)},[e.createElementVNode("img",{src:u.src,fit:u.fit,style:{objectFit:"contain",height:"100%",width:"100%"},onMouseenter:l[0]||(l[0]=()=>{o.value=!0}),onMouseleave:w},null,40,Fo)],4)):e.createCommentVNode("",!0)]))],32))}}),qo={},Uo={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"};function jo(u,t){return e.openBlock(),e.createElementBlock("svg",Uo,t[0]||(t[0]=[e.createElementVNode("path",{fill:"currentColor",d:"M160 448a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zM160 896a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32z"},null,-1)]))}const Ko=G(qo,[["render",jo]]),Oo={},Go={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Wo(u,t){return e.openBlock(),e.createElementBlock("svg",Go,t[0]||(t[0]=[e.createElementVNode("g",{id:"Frame"},[e.createElementVNode("path",{id:"Vector",d:"M5.33333 2.66659H14V3.99992H5.33333V2.66659ZM2 2.33325H4V4.33325H2V2.33325ZM2 6.99992H4V8.99992H2V6.99992ZM2 11.6666H4V13.6666H2V11.6666ZM5.33333 7.33325H14V8.66659H5.33333V7.33325ZM5.33333 11.9999H14V13.3333H5.33333V11.9999Z",fill:"currentColor","fill-opacity":"0.9"})],-1)]))}const Zo=G(Oo,[["render",Wo]]),Yo={class:"hzzt-kfb-slides"},Xo={class:"hzzt-kfb-slides__row"},Jo={class:"hzzt-kfb-slides__top"},Qo={class:"text-primary"},en={class:"flex align-items-center"},tn={key:0},on=["data-index","onClick"],nn={class:"hzzt-kfb-slides__gallery"},ln=["onClick"],an={key:0,class:"hzzt-kfb-slides__read"},rn=["onClick"],sn={key:1,class:"flex column"},un={class:"hzzt-kfb-slides__header"},cn={class:"w-30%"},dn={class:"w-40%"},fn={class:"w-20%"},mn=["data-index","onClick"],vn={class:"w-30% flex"},pn={class:"hzzt-kfb-slides__gallery"},hn={key:0,class:"hzzt-kfb-slides__read"},gn={class:"w-40% flex"},yn=["onClick"],wn=["onClick"],kn={key:0,class:"flex column py-2"},_n={class:"flex align-items-center justify-content-center"},bn={class:"margin-r-1"},Cn={key:0,class:"margin-r-1 margin-l-2"},Vn=e.defineComponent({__name:"KfbSlideList",props:{slides:{}},emits:["select","tool"],setup(u,{expose:t,emit:n}){const o=u,y=n,f=e.inject("file-index",{value:0}),s=e.inject("divide",{value:!1}),r=e.inject("sync",{value:!1}),v=e.ref(!1),w=e.ref(),h=e.computed(()=>o.slides.filter(({read:k})=>k)),l=e.computed(()=>o.slides.filter(({check:k})=>k)),{t:d}=j();function c(k){f.value=k,y("select",k)}function a(k){k.check=!k.check}function m(k){var p,i,E;const g=((E=(i=(p=w.value.querySelector('[data-index="0"]'))==null?void 0:p.getBoundingClientRect)==null?void 0:i.call(p))==null?void 0:E.y)||0;w.value.scrollTop=w.value.querySelector(`[data-index="${k}"]`).getBoundingClientRect().y-g}return t({jumpToSlide:m}),(k,g)=>(e.openBlock(),e.createElementBlock("div",Yo,[e.createElementVNode("div",Xo,[e.createElementVNode("div",Jo,[e.createElementVNode("span",null,[g[4]||(g[4]=e.createTextVNode("已读:")),e.createElementVNode("span",Qo,e.toDisplayString(h.value.length),1),e.createTextVNode("/"+e.toDisplayString(k.slides.length),1)]),e.createElementVNode("div",en,[e.createVNode(e.unref(b.ElIcon),{class:"margin-r-2 pointer",size:"16",color:v.value?"#999":"#000",onClick:g[0]||(g[0]=p=>v.value=!v.value)},{default:e.withCtx(()=>[e.createVNode(Ko)]),_:1},8,["color"]),e.createVNode(e.unref(b.ElIcon),{class:"pointer",name:"cus-list",size:"16",color:v.value?"#000":"#999",onClick:g[1]||(g[1]=p=>v.value=!v.value)},{default:e.withCtx(()=>[e.createVNode(Zo)]),_:1},8,["color"])])]),e.createElementVNode("div",{class:"flex-1 overflow-auto",style:{width:"100%"},ref_key:"slidesRef",ref:w},[v.value?(e.openBlock(),e.createElementBlock("ul",sn,[e.createElementVNode("li",un,[g[5]||(g[5]=e.createElementVNode("div",{class:"w-10%"},null,-1)),e.createElementVNode("div",cn,e.toDisplayString(e.unref(d)("缩略图")),1),e.createElementVNode("div",dn,e.toDisplayString(e.unref(d)("切片名")),1),e.createElementVNode("div",fn,e.toDisplayString(e.unref(d)("评分")),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.slides,(p,i)=>(e.openBlock(),e.createElementBlock("li",{key:i,"data-index":i,class:"flex align-items-center overflow-hidden",style:e.normalizeStyle({backgroundColor:e.unref(f)===i?"rgba(6, 85, 195, 0.1)":"#fff"}),onClick:E=>c(i)},[e.createElementVNode("div",{class:"w-10% text-center",onClick:e.withModifiers(()=>{},["stop"])},[e.createVNode(e.unref(b.ElCheckbox),{modelValue:p.check,"onUpdate:modelValue":E=>p.check=E,style:{width:"14px",height:"16px"}},null,8,["modelValue","onUpdate:modelValue"])]),e.createElementVNode("div",vn,[e.createElementVNode("div",pn,[e.createVNode(se,{style:e.normalizeStyle([{transform:`rotate(${p.angle}deg)`},{height:"45px"}]),"retry-times":1,src:p.labelImg,fit:"cover",class:"flex-1"},null,8,["style","src"]),e.createVNode(se,{"retry-times":1,fit:"cover",src:p.previewImg,style:{height:"45px"},class:"flex-1"},null,8,["src"]),p.read?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",hn,e.toDisplayString(e.unref(d)("未读")),1))])]),e.createElementVNode("div",gn,[e.createVNode(e.unref(b.ElTooltip),{effect:"dark",placement:"bottom",content:`${p.name}`},{default:e.withCtx(()=>[e.createElementVNode("span",{style:{"line-height":"16px"},class:"margin-l-1 ellipsis hzzt-kfb-slides__text",dir:"rtl",onClick:e.withModifiers(E=>a(p),["stop"])},e.toDisplayString(p.name),9,yn)]),_:2},1032,["content"])]),e.createElementVNode("div",{class:"w-20% flex text-center pointer",style:e.normalizeStyle({color:p.gradeColor}),onClick:E=>y("tool","grade",p)},e.toDisplayString(p.grade),13,wn)],12,mn))),128))])):(e.openBlock(),e.createElementBlock("div",tn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.slides,(p,i)=>(e.openBlock(),e.createElementBlock("div",{key:i,class:e.normalizeClass(["hzzt-kfb-slides__box",e.unref(f)===i?"hzzt-kfb-slides__box--active":""]),"data-index":i,onClick:E=>c(i)},[e.createElementVNode("div",nn,[e.createVNode(se,{style:e.normalizeStyle({transform:`rotate(${p.angle}deg)`}),"retry-times":1,src:p.labelImg,class:"hzzt-kfb-slides__img",fit:"cover",hover:""},null,8,["style","src"]),e.createVNode(se,{"retry-times":1,src:p.previewImg,class:"flex-1 hzzt-kfb-slides__img1",fit:"cover"},null,8,["src"])]),e.createElementVNode("div",{class:"flex justify-content-between align-items-center",onClick:e.withModifiers(()=>{},["stop"])},[e.createVNode(e.unref(b.ElCheckbox),{modelValue:p.check,"onUpdate:modelValue":E=>p.check=E,style:{width:"14px",height:"16px"}},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(e.unref(b.ElTooltip),{effect:"dark",placement:"bottom",content:`${p.name}`},{default:e.withCtx(()=>[e.createElementVNode("span",{style:{"line-height":"16px","text-align":"center",width:"calc(100% - 14px)"},class:"margin-l-1 ellipsis",onClick:e.withModifiers(E=>a(p),["stop"])},e.toDisplayString(p.name),9,ln)]),_:2},1032,["content"])]),p.read?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",an,e.toDisplayString(e.unref(d)("未读")),1)),p.grade?(e.openBlock(),e.createElementBlock("div",{key:1,class:"hzzt-kfb-slides__grade",style:e.normalizeStyle({background:p.gradeColor}),onClick:E=>y("tool","grade",p)},e.toDisplayString(p.grade),13,rn)):e.createCommentVNode("",!0),e.renderSlot(k.$slots,"slide",{slide:p},void 0,!0)],10,on))),128))]))],512),l.value.length>1?(e.openBlock(),e.createElementBlock("div",kn,[e.createElementVNode("div",_n,[e.createElementVNode("span",bn,e.toDisplayString(e.unref(d)("分屏")),1),e.createVNode(e.unref(b.ElSwitch),{modelValue:e.unref(s),"onUpdate:modelValue":g[2]||(g[2]=p=>e.isRef(s)?s.value=p:null)},null,8,["modelValue"]),e.unref(s)?(e.openBlock(),e.createElementBlock("span",Cn,e.toDisplayString(e.unref(d)("同步")),1)):e.createCommentVNode("",!0),e.unref(s)?(e.openBlock(),e.createBlock(e.unref(b.ElSwitch),{key:1,modelValue:e.unref(r),"onUpdate:modelValue":g[3]||(g[3]=p=>e.isRef(r)?r.value=p:null)},null,8,["modelValue"])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)])]))}}),En=G(Vn,[["__scopeId","data-v-35358d3a"]]),Nn={class:"hzzt-kfb-ai overflow-hidden"},zn={class:"flex align-items-center margin-t-1"},Bn={style:{color:"var(--el-color-success)"}},xn={class:"flex-1 flex overflow-auto wrap margin-t-1"},Tn=["onClick"],Sn={key:0,style:{"margin-left":"2px"}},Ln=e.defineComponent({name:"KfbAiList",__name:"list",props:{data:{default:()=>[]},analysis:{}},setup(u,{expose:t}){const n=u,{t:o}=j(),y=e.inject("kfbViewRef"),f=e.ref(-1),s=e.ref(1),r=e.ref(100),v=e.ref(!0),w=e.ref([]),h=e.computed(()=>n.data.filter(E=>w.value.includes(E.cls||""))),l=e.computed(()=>h.value.slice((s.value-1)*r.value,s.value*r.value)),d=e.computed(()=>{const E=new Set;return n.data.forEach(B=>{const N=B.cls||"";N&&!E.has(N)&&E.add(N)}),Array.from(E)}),c=e.computed(()=>w.value.length!==0&&w.value.length!==d.value.length),a=Me(n);e.watch(()=>d.value,E=>{m(),w.value=[...E]}),e.onMounted(()=>{w.value=[...d.value]});function m(){f.value=-1,s.value=1,r.value=100,v.value=!0}function k(E){const B=h.value.findIndex(N=>N.id===E.id);f.value=B,y.value.jumpToLabel(E,5)}function g(E){const B=n.data.filter(N=>N.cls===E);return B.length?`(${B.length})`:""}function p(){f.value=-1,v.value=w.value.length==d.value.length}function i(E){w.value=E?[...d.value]:[],f.value=-1}return t({labelList:h}),(E,B)=>(e.openBlock(),e.createElementBlock("div",Nn,[e.createElementVNode("div",zn,[e.createVNode(e.unref(b.ElPopover),{placement:"bottom",trigger:"click",width:"160"},{reference:e.withCtx(()=>[e.createVNode(e.unref(b.ElButton),{class:"margin-r-1",type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("分类"))+" ",1),e.createVNode(I,{name:"arrowDown"})]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(e.unref(b.ElCheckbox),{modelValue:v.value,"onUpdate:modelValue":B[0]||(B[0]=N=>v.value=N),indeterminate:c.value,onChange:i},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("全选")),1)]),_:1},8,["modelValue","indeterminate"]),e.createVNode(e.unref(b.ElCheckboxGroup),{modelValue:w.value,"onUpdate:modelValue":B[1]||(B[1]=N=>w.value=N),class:"flex column",onChange:p},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,N=>(e.openBlock(),e.createBlock(e.unref(b.ElCheckbox),{key:N,value:N},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N)+" ",1),e.createElementVNode("span",Bn,e.toDisplayString(g(N)),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])])]),_:1}),e.createVNode(e.unref(b.ElTag),{type:e.unref(a).type,class:"margin-l-1"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a).name),1)]),_:1},8,["type"])]),e.createElementVNode("div",xn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(N,H)=>(e.openBlock(),e.createElementBlock("div",{key:H+(s.value-1)*r.value,class:e.normalizeClass(`hzzt-kfb-ai__img ${f.value===H+(s.value-1)*r.value?"hzzt-kfb-ai__img--active":""}`),onClick:q=>k(N)},[e.createVNode(e.unref(st),{"retry-times":1,src:N.imageUrl,"error-src":e.unref(ue)},null,8,["src","error-src"]),e.createElementVNode("div",{style:e.normalizeStyle({color:N.strokeStyle}),class:"ellipsis"},[e.createTextVNode(e.toDisplayString(N.cls)+" ",1),N.score?(e.openBlock(),e.createElementBlock("span",Sn,e.toDisplayString(N.score),1)):e.createCommentVNode("",!0)],4)],10,Tn))),128))]),e.createVNode(e.unref(b.ElPagination),{class:"wrap","current-page":s.value,"onUpdate:currentPage":B[2]||(B[2]=N=>s.value=N),"page-size":r.value,"onUpdate:pageSize":B[3]||(B[3]=N=>r.value=N),"page-sizes":[100,200,300,400],layout:"total, sizes, prev, pager, next",total:h.value.length},null,8,["current-page","page-size","total"])]))}}),$n={class:"hzzt-kfb-slide"},Pn={class:"flex flex-1 overflow-hidden"},Rn={class:"flex flex-1"},In={key:0,style:{height:"100%",width:"100%"},class:"flex wrap"},Dn=["onClick"],de=e.defineComponent({name:"HzztKfbSlide",__name:"HzztKfbSlide",props:e.mergeModels({menus:{default:()=>[]},kfb:{},slides:{default:()=>[]},ai:{},teleport:{type:Boolean,default:!1},watermark:{},process:{},microscope:{},showList:{type:Boolean,default:!0},showKfbLabel:{type:Boolean,default:!0},showKeyboard:{type:Boolean,default:!1},showMenuText:{type:Boolean,default:!0},showWatermark:{type:Boolean,default:!1}},{index:{default:0},indexModifiers:{}}),emits:e.mergeModels(["tool"],["update:index"]),setup(u,{expose:t,emit:n}){const o=u,y=n,f=e.useModel(u,"index"),s=e.computed(()=>o.slides[f.value]),r=e.computed(()=>o.slides.filter(({check:C})=>C)),v=e.ref(),w=e.ref(),h=e.ref(),l=e.ref(),d=e.ref(o.showKeyboard),c=e.ref(o.showKfbLabel),a=e.ref(o.showWatermark),m=e.ref(o.showMenuText),k=e.ref(!1),g=e.ref(!1),{t:p}=j(),i=e.computed(()=>{var C;if(k.value){const z=r.value.findIndex(({id:S})=>{var O;return S===((O=s.value)==null?void 0:O.id)});return((C=h.value)==null?void 0:C[z])||w.value}else return w.value}),E=e.computed(()=>r.value.length<=1?{height:"100%",width:"100%"}:r.value.length<=2?{height:"100%",width:"calc((100% - 4px) / 2)"}:r.value.length<=4?{height:"calc((100% - 4px) / 2)",width:"calc((100% - 4px) / 2)"}:r.value.length<=6?{height:"calc((100% - 4px) / 2)",width:"calc((100% - 4px * 2) / 3)"}:r.value.length<=9?{height:"calc((100% - 4px * 2) / 3)",width:"calc((100% - 4px * 2) / 3)"}:{height:"100%",width:"100%"});e.watch(()=>r.value,C=>{k.value&&C.length<=1&&(k.value=!1)}),e.watch(()=>s.value,C=>{if(C){const z=C.read;C.read=!0,y("tool","choose",{slide:C,read:z})}}),Object.entries({keyboard:d,kfbLabel:c,watermark:a,menuText:m}).forEach(([C,z])=>{e.watch(()=>z.value,S=>{y("tool",C,S)})});const{hasAi:N,hasIqc:H,currentAnalysis:q,aiLabelList:L,enableAi:K,enableIqc:F,toggleIqc:ee,toggleAi:te}=Mo(o,s);function Z(C,z){C==="next"&&o.slides[f.value+1]&&f.value++,C==="prev"&&o.slides[f.value-1]&&f.value--,(C==="label"||C==="tool")&&(c.value=z),y("tool",C,z)}function re(C){var S,O;const z=Y(R({},o.kfb),{watermark:o.watermark,process:o.process,microscope:o.microscope,slide:C,aiLabelList:s.value.id===C.id?((S=l.value)==null?void 0:S.labelList)||[]:[],syncPosition:g.value,syncZoom:g.value,handle:void 0,analysis:s.value.id===C.id?q.value:void 0});return(O=o.kfb)!=null&&O.handle?o.kfb.handle(C,z):z}function fe(C){f.value=o.slides.findIndex(z=>z.id===C.id)}function me(C){k.value&&(o.slides[C].check=!0)}function ve(){var C;(C=k.value?h.value:[w.value])==null||C.forEach(z=>{c.value||(z.updateGrid({show:c.value,ruler:c.value}),d.value=c.value),z.updateGraduation({show:c.value}),z.updateNavigator(c.value)})}function oe(C){f.value=C,v.value&&v.value.jumpToSlide(C)}function ne(C,z){i.value&&i.value.jumpToLabel(C,z)}function pe(C,z){i.value&&i.value.jumpToPosition(C,z)}return e.provide("kfbViewRef",i),e.provide("show-keyboard",d),e.provide("show-kfb-label",c),e.provide("show-menu-text",m),e.provide("show-watermark",a),e.provide("file-index",f),e.provide("divide",k),e.provide("sync",g),t({divide:k,slide:s,kfbViewRef:i,jumpToSlide:oe,jumpToLabel:ne,jumpToPosition:pe,analysis:q,enableAi:K,enableIqc:F,showAiList:e.computed(()=>{var C;return!!((C=o.ai)!=null&&C.enable)&&L.value.length})}),(C,z)=>(e.openBlock(),e.createElementBlock("div",$n,[C.menus.length?(e.openBlock(),e.createBlock(ae,{key:0,menu:C.menus,process:C.process,microscope:C.microscope,onTool:Z},{left:e.withCtx(()=>[e.renderSlot(C.$slots,"left")]),right:e.withCtx(()=>[e.createVNode(e.unref(b.ElSwitch),{modelValue:c.value,"onUpdate:modelValue":z[0]||(z[0]=S=>c.value=S),"active-text":e.unref(p)("隐藏标签"),"active-value":!1,"inactive-value":!0,class:"margin-r-2",onChange:ve},null,8,["modelValue","active-text"]),C.ai&&C.ai.enable&&e.unref(H)?(e.openBlock(),e.createBlock(e.unref(b.ElSwitch),{key:0,modelValue:e.unref(F),"onUpdate:modelValue":z[1]||(z[1]=S=>e.isRef(F)?F.value=S:null),"active-text":e.unref(p)("AI质控"),class:"margin-r-2",onChange:e.unref(ee)},null,8,["modelValue","active-text","onChange"])):e.createCommentVNode("",!0),C.ai&&C.ai.enable&&e.unref(N)?(e.openBlock(),e.createBlock(e.unref(b.ElSwitch),{key:1,modelValue:e.unref(K),"onUpdate:modelValue":z[2]||(z[2]=S=>e.isRef(K)?K.value=S:null),"active-text":e.unref(p)("AI分析"),class:"margin-r-2",onChange:e.unref(te)},null,8,["modelValue","active-text","onChange"])):e.createCommentVNode("",!0),e.renderSlot(C.$slots,"right")]),_:3},8,["menu","process","microscope"])):e.createCommentVNode("",!0),e.createElementVNode("div",Pn,[C.showList?(e.openBlock(),e.createBlock(e.Teleport,{key:0,defer:"",to:"#kfb-slide-list",disabled:!C.teleport},[e.createVNode(En,{ref_key:"slidesRef",ref:v,style:e.normalizeStyle(C.teleport?"":"width: 250px"),slides:C.slides,onSelect:me,onTool:Z},{slide:e.withCtx(({slide:S})=>[e.renderSlot(C.$slots,"list",{slide:S})]),_:3},8,["style","slides"])],8,["disabled"])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.Teleport,{defer:"",to:"#kfb-slide-view",disabled:!C.teleport},[e.createElementVNode("div",Rn,[r.value.length&&k.value?(e.openBlock(),e.createElementBlock("ul",In,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(S,O)=>(e.openBlock(),e.createElementBlock("li",{key:O,style:e.normalizeStyle(E.value),class:e.normalizeClass(s.value.id===S.id?"hzzt-kfb-view-screen-active":""),onClick:_e=>fe(S)},[(e.openBlock(),e.createBlock(Q,e.mergeProps({ref_for:!0,ref_key:"kfbViewRefs",ref:h,key:`kfb-${O}`},{ref_for:!0},re(S),{onTool:Z}),{default:e.withCtx(()=>[e.renderSlot(C.$slots,"kfb",{slide:S})]),_:2},1040))],14,Dn))),128))])):s.value?(e.openBlock(),e.createBlock(Q,e.mergeProps({key:1,ref_key:"kfbViewRef",ref:w},re(s.value),{onTool:Z}),{default:e.withCtx(()=>[e.renderSlot(C.$slots,"kfb",{slide:s.value})]),_:3},16)):e.createCommentVNode("",!0)])],8,["disabled"])),C.ai&&C.ai.enable&&e.unref(L).length?(e.openBlock(),e.createBlock(e.Teleport,{key:1,defer:"",to:"#kfb-slide-ai",disabled:!C.teleport},[e.createVNode(Ln,{style:e.normalizeStyle(C.teleport?"":"width: 350px"),ref_key:"kfbAiRef",ref:l,data:e.unref(L),slide:s.value,analysis:e.unref(q)},null,8,["style","data","slide","analysis"])],8,["disabled"])):e.createCommentVNode("",!0),e.renderSlot(C.$slots,"default")])]))}});de.name="HzztKfbSlide";Q.name="HzztKfbView";ae.name="HzztKfbToolbox";const An=(u,t)=>{u.use(ut,t==null?void 0:t.i18n),u.component(de.name,de),u.component(Q.name,Q),u.component(ae.name,ae)},Mn={install:An};exports.DEFAULT_MICROSCOPE=ce;exports.DEFAULT_PROCESS=ke;exports.I18N_INJECT_KEY=we;exports._export_sfc=G;exports._sfc_main=I;exports._sfc_main$1=de;exports._sfc_main$2=Q;exports._sfc_main$3=ae;exports.index=Mn;exports.useLocalI18n=j;