mixdashboards 1.0.47 → 1.0.49

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 (277) hide show
  1. package/dist/{EChartComponentBase-CQYZ0922.js → EChartComponentBase-CafVdj74.js} +1 -1
  2. package/dist/{EChartComponentBase-DRY0bLOI.cjs → EChartComponentBase-Dz5E-lyI.cjs} +1 -1
  3. package/dist/{UniverSheet-CJP8jNCA.cjs → UniverSheet-BqLvs6V6.cjs} +1 -1
  4. package/dist/{UniverSheet-BWB0aXry.js → UniverSheet-CH1YywcZ.js} +2 -2
  5. package/dist/{accelerationChart-CiK-Qd4o.cjs → accelerationChart-BWRlw5-L.cjs} +1 -1
  6. package/dist/{accelerationChart-BE04sofp.js → accelerationChart-V4UmpPse.js} +3 -3
  7. package/dist/{actionItem-7rT4wvbt.js → actionItem-CBwfWvTO.js} +3 -3
  8. package/dist/{actionItem-BNzvi8fB.cjs → actionItem-Dsg6qYSp.cjs} +1 -1
  9. package/dist/{alarmLevelChart-DbIf9kQc.js → alarmLevelChart-CnKEZZZv.js} +2 -2
  10. package/dist/{alarmLevelChart-JTbC7581.cjs → alarmLevelChart-DN8hyTdg.cjs} +1 -1
  11. package/dist/{alertTable-CW-9nTxG.js → alertTable-BluC1smp.js} +2 -2
  12. package/dist/{alertTable-3Fq9oPQa.cjs → alertTable-CdkiAZIu.cjs} +1 -1
  13. package/dist/{annualRainfallChart-BFadflcO.cjs → annualRainfallChart-BeenDSmW.cjs} +1 -1
  14. package/dist/{annualRainfallChart-Cg2tZJFq.js → annualRainfallChart-COeieHTg.js} +2 -2
  15. package/dist/{api-DAUw_RyI.js → api-Cyx2Fha0.js} +3 -3
  16. package/dist/{api-CsM841lz.cjs → api-nw_9niqv.cjs} +1 -1
  17. package/dist/{aqi-CSNzCt6A.cjs → aqi-BXtF-SsB.cjs} +1 -1
  18. package/dist/{aqi-DMhNfLSS.js → aqi-naf_yg1B.js} +3 -3
  19. package/dist/{aqiIndass-LhWIw1L-.js → aqiIndass-CiHVV6y-.js} +2 -2
  20. package/dist/{aqiIndass-CbnX8jy1.cjs → aqiIndass-YO0txxEM.cjs} +1 -1
  21. package/dist/{arrayCard-Fl5xZbvQ.js → arrayCard-CPtHFB--.js} +2 -2
  22. package/dist/{arrayCard-D6Yzq7nX.cjs → arrayCard-USJyzspe.cjs} +1 -1
  23. package/dist/{audio-PoEUMLRp.js → audio-7HMku35Z.js} +4 -4
  24. package/dist/{audio-R7LCUpjr.cjs → audio-Uz_XIJyA.cjs} +1 -1
  25. package/dist/{bar-CJv74yw7.js → bar-Bq_RDVaa.js} +4 -4
  26. package/dist/{bar-CIWKC7cd.cjs → bar-CSideFNS.cjs} +1 -1
  27. package/dist/{bmp-B5d3cPx5.js → bmp-BF-OdMoW.js} +3 -3
  28. package/dist/{bmp-DVNypten.cjs → bmp-DZ9_aKMT.cjs} +1 -1
  29. package/dist/{box--lry72SE.cjs → box-C1n5r8hT.cjs} +1 -1
  30. package/dist/{box-Da5gDSqP.js → box-DfqNW1B6.js} +2 -2
  31. package/dist/{chartConfigPanel-BvbDCHoU.js → chartConfigPanel-8wROQoL0.js} +1 -1
  32. package/dist/{chartConfigPanel-B8FYxnZb.cjs → chartConfigPanel-C62JqDqE.cjs} +1 -1
  33. package/dist/{circleBar-2Si4M0J8.js → circleBar-C54UQvaf.js} +3 -3
  34. package/dist/{circleBar-B-e8HYux.cjs → circleBar-UrV2_yVK.cjs} +1 -1
  35. package/dist/{clock-DGtbfiIm.js → clock-CbebZdlU.js} +2 -2
  36. package/dist/{clock-CF9OvH6i.cjs → clock-DgkEPumE.cjs} +1 -1
  37. package/dist/{clt-BD_Q3tyx.js → clt-B32D8bK9.js} +3 -3
  38. package/dist/{clt-CXcGotkx.cjs → clt-DWBynZO1.cjs} +1 -1
  39. package/dist/{cmc-Bt7H4Q8b.cjs → cmc-BVrFcoih.cjs} +1 -1
  40. package/dist/{cmc-C_UjLQvo.js → cmc-CC-6njzU.js} +3 -3
  41. package/dist/{cmp-DWI9Y7Oz.js → cmp-BCvtkNwO.js} +3 -3
  42. package/dist/{cmp-CdfaXTm_.cjs → cmp-D6aHhSC6.cjs} +1 -1
  43. package/dist/{composite-Dc4QkCcc.js → composite-CWYjAAsg.js} +3 -3
  44. package/dist/{composite-C7BE3mkS.cjs → composite-kODICk08.cjs} +1 -1
  45. package/dist/{controlList-DQWfqJLF.cjs → controlList-BXvCyR2L.cjs} +1 -1
  46. package/dist/{controlList-B8dEMDkH.js → controlList-zYX8DbNE.js} +3 -3
  47. package/dist/{controlRecordList-CLfY8XsN.js → controlRecordList-Bc2M0iyo.js} +3 -3
  48. package/dist/{controlRecordList-B8xmY2wh.cjs → controlRecordList-Dly5aorA.cjs} +1 -1
  49. package/dist/{crd-dBlZavms.cjs → crd--3Oj3Y1t.cjs} +1 -1
  50. package/dist/{crd-BE7bxQCV.js → crd-CoB00gS6.js} +2 -2
  51. package/dist/{ctrBtn-CtS30Duz.cjs → ctrBtn-BusKAhHv.cjs} +1 -1
  52. package/dist/{ctrBtn-NbVm0_9a.js → ctrBtn-CUADz_pu.js} +4 -4
  53. package/dist/{ctrSet-BNVppkzh.js → ctrSet-BKVsejze.js} +4 -4
  54. package/dist/{ctrSet-AYfzoAjr.cjs → ctrSet-C0R2aIby.cjs} +1 -1
  55. package/dist/{ctrSwitch-SvqyuNMs.js → ctrSwitch-BqRBh40z.js} +4 -4
  56. package/dist/{ctrSwitch-DvgqH5Zq.cjs → ctrSwitch-uIqQRKaq.cjs} +1 -1
  57. package/dist/{dataManagement-DDAGR2Zs.cjs → dataManagement-BdP1iSeC.cjs} +1 -1
  58. package/dist/{dataManagement-D4yFedxJ.js → dataManagement-C6jHI7-1.js} +2 -2
  59. package/dist/{dataReport-DN0yZtS2.js → dataReport-C2XWn_Xv.js} +2 -2
  60. package/dist/{dataReport-lflcAgwv.cjs → dataReport-DNPD3MZl.cjs} +1 -1
  61. package/dist/{dataTable--ZzYF0m4.js → dataTable-5bUrqBWz.js} +1 -1
  62. package/dist/{dataTable-C1AeOvHe.cjs → dataTable-BvlEs83r.cjs} +1 -1
  63. package/dist/{datetime-B4lktfti.cjs → datetime-CE5wsyi7.cjs} +1 -1
  64. package/dist/{datetime-CRxM48pG.js → datetime-Dp8mPzSO.js} +2 -2
  65. package/dist/{deepClusterSlipSurface-CsXZnbol.cjs → deepClusterSlipSurface-BinAmtCz.cjs} +1 -1
  66. package/dist/{deepClusterSlipSurface-jbVue8lK.js → deepClusterSlipSurface-D_7LRpHz.js} +3 -3
  67. package/dist/{deepDataMatrix-D08J4nfA.js → deepDataMatrix-BXTJm6UD.js} +2 -2
  68. package/dist/{deepDataMatrix-CdbDYkh1.cjs → deepDataMatrix-t6axw0An.cjs} +1 -1
  69. package/dist/{deepDisplacement3D-DTVDR3Em.cjs → deepDisplacement3D-BRutQ6Ut.cjs} +1 -1
  70. package/dist/{deepDisplacement3D-Dqh03kLT.js → deepDisplacement3D-Cy-FIGAq.js} +3 -3
  71. package/dist/{deepDisplacementChart-B72y4A4Q.js → deepDisplacementChart---DgDx8L.js} +2 -2
  72. package/dist/{deepDisplacementChart-CnAJ3arx.js → deepDisplacementChart-BWVcNgaX.js} +4 -4
  73. package/dist/{deepDisplacementChart-ccBRKTeg.cjs → deepDisplacementChart-DboPezyJ.cjs} +1 -1
  74. package/dist/{deepDisplacementChart-Be6UqmJN.cjs → deepDisplacementChart-eD2GOxML.cjs} +1 -1
  75. package/dist/{deepDisplacementView-DoJclaK2.cjs → deepDisplacementView-BNVTS7Ar.cjs} +1 -1
  76. package/dist/{deepDisplacementView-BRnskO-S.js → deepDisplacementView-CHFgG2wy.js} +1 -1
  77. package/dist/{deepNodeTemperatureChart-Cmvs1LI7.cjs → deepNodeTemperatureChart-CpJI7axl.cjs} +1 -1
  78. package/dist/{deepNodeTemperatureChart-CtPE4BFq.js → deepNodeTemperatureChart-N1z-KMmu.js} +3 -3
  79. package/dist/{deepTangentAngleChart-Dkh9kDJY.js → deepTangentAngleChart-ClnxPvUM.js} +3 -3
  80. package/dist/{deepTangentAngleChart-BqZzc_RS.cjs → deepTangentAngleChart-DxB4EaWm.cjs} +1 -1
  81. package/dist/{deepTemperatureField-Cm18SLto.js → deepTemperatureField-DT7iyND9.js} +3 -3
  82. package/dist/{deepTemperatureField-BByMhon_.cjs → deepTemperatureField-DWO8Dcjh.cjs} +1 -1
  83. package/dist/{deepTrendChart-BoDcH88s.js → deepTrendChart-C7_BfEiR.js} +3 -3
  84. package/dist/{deepTrendChart-FoMxS9EI.cjs → deepTrendChart-D9uQKgck.cjs} +1 -1
  85. package/dist/{deviceOnlineStatus-DsKQeLmt.cjs → deviceOnlineStatus-BA7D5fbt.cjs} +1 -1
  86. package/dist/{deviceOnlineStatus-DYQkhQsg.js → deviceOnlineStatus-DlrB6EXN.js} +2 -2
  87. package/dist/{deviceStatus-BCOou44x.js → deviceStatus-aPf8MflS.js} +2 -2
  88. package/dist/{deviceStatus-BWQtb9Mi.cjs → deviceStatus-mDl8zF_Z.cjs} +1 -1
  89. package/dist/{displacementDataTable-B85PTW_G.cjs → displacementDataTable-Co4In07D.cjs} +1 -1
  90. package/dist/{displacementDataTable-R8nTN3L8.js → displacementDataTable-Da1xkiXG.js} +2 -2
  91. package/dist/{displacementTrajectoryChart-BSEi-hRr.js → displacementTrajectoryChart-B85ad8vc.js} +3 -3
  92. package/dist/{displacementTrajectoryChart-lycYTQxe.cjs → displacementTrajectoryChart-FPrvrbUa.cjs} +1 -1
  93. package/dist/{displacementTrendChart-D8IuzbRv.js → displacementTrendChart-BRxIsjeK.js} +2 -2
  94. package/dist/{displacementTrendChart-BQO8Eznx.cjs → displacementTrendChart-DcBu8-_Z.cjs} +1 -1
  95. package/dist/{dxf-5s9RTKqm.cjs → dxf-EDkdonhJ.cjs} +1 -1
  96. package/dist/{dxf-BV__k04Q.js → dxf-FrPSVW4C.js} +4 -4
  97. package/dist/{dzc-BGPhJ-St.cjs → dzc-BBijV6-m.cjs} +1 -1
  98. package/dist/{dzc-D6aciipN.js → dzc-BOaL7miE.js} +3 -3
  99. package/dist/{element-resize-detector-B-0BgVLy.js → element-resize-detector-BCRzpPES.js} +4 -4
  100. package/dist/{element-resize-detector-BvkAwVg8.cjs → element-resize-detector-DYs3pJPp.cjs} +1 -1
  101. package/dist/{evn-COCxFd08.cjs → evn-CAWNNpK2.cjs} +1 -1
  102. package/dist/{evn-Dr19A1zo.js → evn-T-0VLXht.js} +2 -2
  103. package/dist/{evolutionChart-C9r2yUYj.cjs → evolutionChart-B8vzbfrk.cjs} +1 -1
  104. package/dist/{evolutionChart-pMtNKqkK.js → evolutionChart-DYf3V-rl.js} +3 -3
  105. package/dist/{fileViewer-BgkyDwyJ.js → fileViewer-BRVwWDA3.js} +4 -4
  106. package/dist/{fileViewer-DtOwluP2.cjs → fileViewer-D6rC0YFY.cjs} +1 -1
  107. package/dist/{filterBar-CDBwgkGb.cjs → filterBar-B3Ka4jw8.cjs} +1 -1
  108. package/dist/{filterBar-DMzt6Mud.js → filterBar-hfIbyNh_.js} +2 -2
  109. package/dist/{fireCombustionCurve-D5gRdu46.js → fireCombustionCurve-D1wKpm4i.js} +2 -2
  110. package/dist/{fireCombustionCurve-cvFl1WHh.cjs → fireCombustionCurve-DKQJzKh2.cjs} +1 -1
  111. package/dist/{fireFilterBar-CNMAFXr5.js → fireFilterBar-Bl0iCn48.js} +2 -2
  112. package/dist/{fireFilterBar-DPismk7o.cjs → fireFilterBar-D8TTM4KM.cjs} +1 -1
  113. package/dist/{gag-Axg1ovwC.js → gag-Vt7-rYYR.js} +2 -2
  114. package/dist/{gag-C34ZOxdk.cjs → gag-dKpxHBTV.cjs} +1 -1
  115. package/dist/{gasStationList-Bz9w4T9z.js → gasStationList-BDRHTLvR.js} +416 -357
  116. package/dist/gasStationList-g4AUNuxi.cjs +1 -0
  117. package/dist/{glbModel-CfO76ZcK.cjs → glbModel-BCgQzSz1.cjs} +1 -1
  118. package/dist/{glbModel-BzKQ2kUi.js → glbModel-BpnMbHQe.js} +2 -2
  119. package/dist/{gnssFilterBar-CGvbDUCu.cjs → gnssFilterBar-BgS-JH3k.cjs} +1 -1
  120. package/dist/{gnssFilterBar-GDvX4_p8.js → gnssFilterBar-CaGGhgEk.js} +2 -2
  121. package/dist/{gnssHistoryTable-DKFJnMPu.cjs → gnssHistoryTable-Bkt4Zvxa.cjs} +1 -1
  122. package/dist/{gnssHistoryTable-DTN1gZMt.js → gnssHistoryTable-CGY1ROb6.js} +3 -3
  123. package/dist/{gnssMapView-CT-XahN-.js → gnssMapView-C4-pk-1_.js} +2 -2
  124. package/dist/{gnssMapView-YpBcjDJ9.cjs → gnssMapView-DuNotJym.cjs} +1 -1
  125. package/dist/{gnssTimeSeriesChart-iZPRyPen.js → gnssTimeSeriesChart-MZbERhu9.js} +4 -4
  126. package/dist/{gnssTimeSeriesChart-BU5wQTYd.cjs → gnssTimeSeriesChart-y7L6j_y5.cjs} +1 -1
  127. package/dist/{gnssXYTrajectory-C-WzUbAW.js → gnssXYTrajectory-DL8WWe1C.js} +3 -3
  128. package/dist/{gnssXYTrajectory-R_i0mY-j.cjs → gnssXYTrajectory-DZFjqFPv.cjs} +1 -1
  129. package/dist/{grd-CGigUZ7q.js → grd-BgaxrUfI.js} +3 -3
  130. package/dist/{grd-BPXiohye.cjs → grd-DNJ1rlwR.cjs} +1 -1
  131. package/dist/{grdIndass-D800xVzH.js → grdIndass-Bxf2L3J5.js} +3 -3
  132. package/dist/{grdIndass-DKD_3XkD.cjs → grdIndass-DlwlkKKH.cjs} +1 -1
  133. package/dist/{grg-CNou8dMo.js → grg-78Sh9Nr7.js} +2 -2
  134. package/dist/{grg-BGSppQcI.cjs → grg-CmxBlYJ6.cjs} +1 -1
  135. package/dist/{gridview-B5B7gPOT.js → gridview-BWe_qLy-.js} +2 -2
  136. package/dist/{gridview-BhtVLKUD.cjs → gridview-FFx-3wNz.cjs} +1 -1
  137. package/dist/{groupCard-yQmb7VH_.js → groupCard-B2ORsgUN.js} +2 -2
  138. package/dist/{groupCard-BBmOnpyI.cjs → groupCard-BOqERSM4.cjs} +1 -1
  139. package/dist/{headerBar-CWGye11m.js → headerBar-DPlPX8uD.js} +3 -3
  140. package/dist/{headerBar-BNfQmsFC.cjs → headerBar-o2J2Dqkd.cjs} +1 -1
  141. package/dist/{history-BlHYyu1s.cjs → history-5W6pGCPq.cjs} +1 -1
  142. package/dist/{history-oKCbbOLM.js → history-DH68UK_U.js} +3 -3
  143. package/dist/{index-C8teBAQd.js → index-LgTfdmT4.js} +1795 -1754
  144. package/dist/{index-BSzyUGIT.cjs → index-ZwyqrmaH.cjs} +7 -7
  145. package/dist/{insarDeformChart-DE67w_u4.js → insarDeformChart-9Qss0VGu.js} +2 -2
  146. package/dist/{insarDeformChart-DSrGvm7x.cjs → insarDeformChart-BTwU5ktS.cjs} +1 -1
  147. package/dist/{insarImageViewer-Ctp0wqIt.cjs → insarImageViewer-B-ExpEa8.cjs} +1 -1
  148. package/dist/{insarImageViewer-B4-PsYRV.js → insarImageViewer-C7aTZp-m.js} +2 -2
  149. package/dist/{kds-Enim5bJp.cjs → kds-8n-a2GhL.cjs} +1 -1
  150. package/dist/{kds-Dx_GiIEm.js → kds-CS7G3BaQ.js} +2 -2
  151. package/dist/{layerTabs-D3YRlheV.cjs → layerTabs-1lOAiEhu.cjs} +1 -1
  152. package/dist/{layerTabs-BFiu4lIL.js → layerTabs-pJJzTbu9.js} +2 -2
  153. package/dist/{lin-uY94Ojnz.js → lin-Bk49Db_G.js} +3 -3
  154. package/dist/{lin-CkjPgG_B.cjs → lin-IHxWU55I.cjs} +1 -1
  155. package/dist/{linIndass-qABT3VEJ.cjs → linIndass-Cpf8pnLn.cjs} +1 -1
  156. package/dist/{linIndass-C8gREDKn.js → linIndass-Drxnj7KQ.js} +2 -2
  157. package/dist/{lst-D5g7DrtQ.js → lst-CL6bmgJ2.js} +2 -2
  158. package/dist/{lst-BFKnMtL5.cjs → lst-CPd37vza.cjs} +1 -1
  159. package/dist/{manualEntry-Bck0F-yh.cjs → manualEntry-CcCE4O6Q.cjs} +1 -1
  160. package/dist/{manualEntry-DVz9oTYB.js → manualEntry-D_doLqqH.js} +2 -2
  161. package/dist/{mapBackground-BFU29YnH.js → mapBackground-CvLXKuJx.js} +2 -2
  162. package/dist/{mapBackground-CiPISf2B.cjs → mapBackground-DEBggmVp.cjs} +1 -1
  163. package/dist/{mappingList-Bkx4vu-u.js → mappingList-BZODl4t5.js} +3 -3
  164. package/dist/{mappingList--PVo2aUQ.cjs → mappingList-qKR-0uhY.cjs} +1 -1
  165. package/dist/{markdownViewer-COnk_pk4.js → markdownViewer-CtN6ailN.js} +4 -4
  166. package/dist/{markdownViewer-RG3j8l1L.cjs → markdownViewer-DZ8gvoHk.cjs} +1 -1
  167. package/dist/{mix-control-modal-B2cEQKI8.js → mix-control-modal-BlWtiePl.js} +3 -3
  168. package/dist/{mix-control-modal-B1UN2Cjo.cjs → mix-control-modal-zbr85DkZ.cjs} +1 -1
  169. package/dist/{mixDataPermission-t4r0S4Or.js → mixDataPermission-C-Cu3_y0.js} +1 -1
  170. package/dist/{mixDataPermission-BG1BmNQe.cjs → mixDataPermission-Gcl_4czp.cjs} +1 -1
  171. package/dist/{mixGrid-CUvQlc4n.js → mixGrid-DJQ2jXcg.js} +3 -3
  172. package/dist/{mixGrid-_dbNIf6t.cjs → mixGrid-Dh9y_kW0.cjs} +1 -1
  173. package/dist/{mixMap-D6z1_hNV.js → mixMap-2REwmqmi.js} +3 -3
  174. package/dist/{mixMap-DCvXa0ab.cjs → mixMap-BRnDOkNF.cjs} +1 -1
  175. package/dist/{mixModel-BRW3rJIV.cjs → mixModel-C1CKMCLi.cjs} +1 -1
  176. package/dist/{mixModel-CulQbgWh.js → mixModel-CHtF97xc.js} +3 -3
  177. package/dist/{mixPie-DjHVr74J.js → mixPie-DwDffWz5.js} +3 -3
  178. package/dist/{mixPie-BcYeLQ0o.cjs → mixPie-sD-AjwaC.cjs} +1 -1
  179. package/dist/mixdashboards.cjs +1 -1
  180. package/dist/mixdashboards.css +1 -1
  181. package/dist/mixdashboards.js +1 -1
  182. package/dist/{mjpegCamera-DlAcVOoi.js → mjpegCamera-Dbfd7eUC.js} +2 -2
  183. package/dist/{mjpegCamera-B7mjuPXA.cjs → mjpegCamera-RMS_dnv0.cjs} +1 -1
  184. package/dist/{monitorAlert-zPmD55Rs.cjs → monitorAlert-CjIQQ6fQ.cjs} +1 -1
  185. package/dist/{monitorAlert-B0KID2eA.js → monitorAlert-DagV3vuc.js} +2 -2
  186. package/dist/{monitorData-BidsO_6J.js → monitorData-CTkeA21g.js} +3 -3
  187. package/dist/{monitorData-CHMrdKJf.cjs → monitorData-DUansNO5.cjs} +1 -1
  188. package/dist/{monitorSpeedChart-DLZh-mSE.js → monitorSpeedChart-BFnREZYZ.js} +1 -1
  189. package/dist/{monitorSpeedChart-4D-maRjp.cjs → monitorSpeedChart-CjfFqWon.cjs} +1 -1
  190. package/dist/{mxa-DmZnrbe4.js → mxa-B6ezKf-C.js} +3 -3
  191. package/dist/{mxa-D4qd0Plz.cjs → mxa-CN6zXgZA.cjs} +1 -1
  192. package/dist/{myValue-B6YZ6dY0.cjs → myValue-BG_jI_HT.cjs} +1 -1
  193. package/dist/{myValue-BWMSYYbJ.js → myValue-C08vYRJC.js} +2 -2
  194. package/dist/{myValueList-DvjaY4Fk.js → myValueList-BKVL_kPb.js} +2 -2
  195. package/dist/{myValueList-DaNcKyP9.cjs → myValueList-Bwg3XCPF.cjs} +1 -1
  196. package/dist/{objectList-V3GkI15k.cjs → objectList-FArM7oEM.cjs} +1 -1
  197. package/dist/{objectList-B-DwKe6G.js → objectList-emtQyLbD.js} +4 -4
  198. package/dist/{photo-CMsOPCDi.cjs → photo-B9Veb_Am.cjs} +1 -1
  199. package/dist/{photo-BXxSVVs-.js → photo-DXbQg_FJ.js} +4 -4
  200. package/dist/{pie-Cq5U2vj8.js → pie-DZzf2lL7.js} +3 -3
  201. package/dist/{pie-DEAPOjlU.cjs → pie-U9hOnFzz.cjs} +1 -1
  202. package/dist/{pressBtn-CCxhhl94.cjs → pressBtn-BNr1R0gW.cjs} +1 -1
  203. package/dist/{pressBtn-C2Iq30mu.js → pressBtn-R5Wsj-Jw.js} +4 -4
  204. package/dist/{progressBar-7yCF8b0A.cjs → progressBar-CUSoF6f0.cjs} +1 -1
  205. package/dist/{progressBar-yWKY_v4S.js → progressBar-sLfJICdr.js} +2 -2
  206. package/dist/{progressCircle-D8JyF73W.cjs → progressCircle-B6P8B-t_.cjs} +1 -1
  207. package/dist/{progressCircle--w8mHGf0.js → progressCircle-BZgPxs_q.js} +2 -2
  208. package/dist/{qrcode-B2Ue7vYR.js → qrcode-C96PznAO.js} +2 -2
  209. package/dist/{qrcode-CXmICWJP.cjs → qrcode-DMrNxgq5.cjs} +1 -1
  210. package/dist/{raceBar-Bs0i8Afj.cjs → raceBar-BTExTEsZ.cjs} +1 -1
  211. package/dist/{raceBar-BjWSPr8P.js → raceBar-Dryx8Onl.js} +3 -3
  212. package/dist/{rad-xDBdI8mF.cjs → rad-DpkIOKs_.cjs} +1 -1
  213. package/dist/{rad-vI2aKcPX.js → rad-vw4O2ByZ.js} +2 -2
  214. package/dist/{rainfallFilterBar-0HQ-tE3G.js → rainfallFilterBar-BjAWqKtM.js} +2 -2
  215. package/dist/{rainfallFilterBar-CN0nk3fJ.cjs → rainfallFilterBar-CH3abw6C.cjs} +1 -1
  216. package/dist/{rainfallTimeCurve-vaLAn45Q.js → rainfallTimeCurve-BPDZGrlQ.js} +3 -3
  217. package/dist/{rainfallTimeCurve-ORf8Vjfg.cjs → rainfallTimeCurve-oJUJ2mt7.cjs} +1 -1
  218. package/dist/{rangeLin-BsFq4g_r.js → rangeLin-BFFy57TT.js} +2 -2
  219. package/dist/{rangeLin-DpeEuqHq.cjs → rangeLin-CBqKAU0P.cjs} +1 -1
  220. package/dist/{request-CipSkL_e.cjs → request-BcQP_dWt.cjs} +1 -1
  221. package/dist/{request-BKxONB4_.js → request-jIo7FwQD.js} +1 -1
  222. package/dist/{retainer1-fHIyhuCd.cjs → retainer1-CfcwA39J.cjs} +1 -1
  223. package/dist/{retainer1-Dff5PtOO.js → retainer1-goSPppQ-.js} +3 -3
  224. package/dist/{retainer2-CiQBrt5K.js → retainer2-BHdnsKrO.js} +3 -3
  225. package/dist/{retainer2-DVzzy6cB.cjs → retainer2-DwQmFU10.cjs} +1 -1
  226. package/dist/{riskRegionTable-C7wPe9Wi.js → riskRegionTable-B8-f5xx-.js} +2 -2
  227. package/dist/{riskRegionTable-S52o0BGS.cjs → riskRegionTable-CSJpPxPB.cjs} +1 -1
  228. package/dist/{sankey-CnfyQhE9.js → sankey-C0gaE3HM.js} +3 -3
  229. package/dist/{sankey-CaIBIfyD.cjs → sankey-DXCBHb16.cjs} +1 -1
  230. package/dist/{scd-DlNUR6eL.cjs → scd-CkEHu7nZ.cjs} +1 -1
  231. package/dist/{scd-DIMdDXIq.js → scd-Cwyft2g6.js} +2 -2
  232. package/dist/{sideMenu-zU_aIvID.js → sideMenu-BtVCCKw9.js} +2 -2
  233. package/dist/{sideMenu-Bkbku5u7.cjs → sideMenu-DUdDDJ9K.cjs} +1 -1
  234. package/dist/{slopeStability-DbSAX15K.cjs → slopeStability-Byb6AKti.cjs} +1 -1
  235. package/dist/{slopeStability-gOE7dn2Q.js → slopeStability-DwxDXTQG.js} +3 -3
  236. package/dist/{speedCurve-CSvi3dD_.js → speedCurve-BuNsy-ev.js} +3 -3
  237. package/dist/{speedCurve-U4Q4lhNV.cjs → speedCurve-DArreweP.cjs} +1 -1
  238. package/dist/{staticLine-DLQxHc40.cjs → staticLine-C50p0CZs.cjs} +1 -1
  239. package/dist/{staticLine-B9bZ_t-z.js → staticLine-DfkpF6ZW.js} +3 -3
  240. package/dist/{store-DEUtRQFz.cjs → store-ByTYoqyI.cjs} +1 -1
  241. package/dist/{store-CS3njfh9.js → store-D_TrU3nw.js} +2 -2
  242. package/dist/{swiper-7lbXP2Xv.js → swiper-CQiRByJd.js} +2 -2
  243. package/dist/{swiper-BWo-bX2U.cjs → swiper-L0Oo2dYD.cjs} +1 -1
  244. package/dist/{terminalConfigList-DSF7VA9Q.js → terminalConfigList-BhmfFm4f.js} +3 -3
  245. package/dist/{terminalConfigList-D_OHlni0.cjs → terminalConfigList-ChC43Bwq.cjs} +1 -1
  246. package/dist/{terminalList-BwF47jlu.cjs → terminalList-BQModRyk.cjs} +1 -1
  247. package/dist/{terminalList-DxSUKAey.js → terminalList-C6tswBt1.js} +3 -3
  248. package/dist/{textbox-DgjHYbNl.cjs → textbox-CSuiDl8k.cjs} +1 -1
  249. package/dist/{textbox-ANFqNmpB.js → textbox-CgOhFsYo.js} +3 -3
  250. package/dist/{timeQueryBar-DygP7vFr.cjs → timeQueryBar-BtCXHgrg.cjs} +1 -1
  251. package/dist/{timeQueryBar-CtVF9zsa.js → timeQueryBar-QEg1Flg9.js} +1 -1
  252. package/dist/{timeSeries-uWbV8gXH.js → timeSeries-B7NgbHfJ.js} +4 -4
  253. package/dist/{timeSeries-DpBC38Dd.cjs → timeSeries-DMINp9Fr.cjs} +1 -1
  254. package/dist/{timeSeriesCurve-CjS9xNfa.js → timeSeriesCurve-DEY5KQvu.js} +3 -3
  255. package/dist/{timeSeriesCurve-BSEfLBDp.cjs → timeSeriesCurve-wC9wHGI4.cjs} +1 -1
  256. package/dist/{toggleBtn-DSq8CzjF.js → toggleBtn-Brtfu0-e.js} +3 -3
  257. package/dist/{toggleBtn-Bk89Ssp4.cjs → toggleBtn-DO953U-q.cjs} +1 -1
  258. package/dist/{trajectoryConfigPanel-DmPGuqtg.js → trajectoryConfigPanel-BDdP3SdV.js} +1 -1
  259. package/dist/{trajectoryConfigPanel-CF1pM2pP.cjs → trajectoryConfigPanel-Bl_o9h2e.cjs} +1 -1
  260. package/dist/{trajectoryScatter-ChdtZPYx.js → trajectoryScatter-7-lJ5SMe.js} +3 -3
  261. package/dist/{trajectoryScatter-D9v1KK6I.cjs → trajectoryScatter-DVm5ljvY.cjs} +1 -1
  262. package/dist/{universalConfigPanel-D5EdU-OC.cjs → universalConfigPanel-Cm4TfqAK.cjs} +1 -1
  263. package/dist/{universalConfigPanel-DOr_O_6t.js → universalConfigPanel-DTLFrGXs.js} +1 -1
  264. package/dist/{universalTable-DlsTht70.cjs → universalTable-Bl9x3wEx.cjs} +1 -1
  265. package/dist/{universalTable-BAN6hSY_.js → universalTable-CCFr-GKz.js} +2 -2
  266. package/dist/{video-Pt7TPShk.cjs → video-DObKrYkw.cjs} +1 -1
  267. package/dist/{video-DNziJElR.js → video-gqqvz5Ge.js} +4 -4
  268. package/dist/{videoMonitor-Dt77p1d2.cjs → videoMonitor-B_Ur25fz.cjs} +1 -1
  269. package/dist/{videoMonitor-PFD2iawe.js → videoMonitor-CGMHzNdh.js} +2 -2
  270. package/dist/{vlu-BElCZvHd.js → vlu-6DSf0haZ.js} +2 -2
  271. package/dist/{vlu-4ykgONXu.cjs → vlu-Dbj9euY_.cjs} +1 -1
  272. package/dist/{weather-YG9UpLx7.cjs → weather-BsIBTn7G.cjs} +1 -1
  273. package/dist/{weather-Csspb97-.js → weather-CQBxQBld.js} +2 -2
  274. package/dist/{windLin-DPeoy6Jq.js → windLin-KIVk9hOD.js} +2 -2
  275. package/dist/{windLin-C0wheGq6.cjs → windLin-jVF-rhIx.cjs} +1 -1
  276. package/package.json +1 -1
  277. package/dist/gasStationList-sODxF5vW.cjs +0 -1
@@ -1 +1 @@
1
- "use strict";var Ce=Object.defineProperty,_e=Object.defineProperties;var Le=Object.getOwnPropertyDescriptors;var fe=Object.getOwnPropertySymbols;var Ne=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable;var pe=(s,n,e)=>n in s?Ce(s,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[n]=e,le=(s,n)=>{for(var e in n||(n={}))Ne.call(n,e)&&pe(s,e,n[e]);if(fe)for(var e of fe(n))Pe.call(n,e)&&pe(s,e,n[e]);return s},se=(s,n)=>_e(s,Le(n));var ie=(s,n,e)=>new Promise((t,k)=>{var i=v=>{try{o(e.next(v))}catch(V){k(V)}},g=v=>{try{o(e.throw(v))}catch(V){k(V)}},o=v=>v.done?t(v.value):Promise.resolve(v.value).then(i,g);o((e=e.apply(s,n)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),Z=require("./index-BSzyUGIT.cjs"),c=require("./three.module-DNVo041Q.cjs"),Se=require("./element-resize-detector-BvkAwVg8.cjs"),De=require("./api-CsM841lz.cjs"),Fe=require("./config-DbZfhrwE.cjs"),J=require("element-plus"),Be=require("./store-DEUtRQFz.cjs"),Ae=a.defineComponent({__name:"Button",emits:["click"],setup(s,{emit:n}){const e=n,t=k=>{e("click",k)};return(k,i)=>(a.openBlock(),a.createElementBlock("button",{class:"my-button",onClick:t},[a.renderSlot(k.$slots,"default",{},void 0,!0)]))}}),ve=Z._export_sfc(Ae,[["__scopeId","data-v-01de59b5"]]);ve.install=s=>{s.component("MyButton",ve)};const Te={class:"my-input-wrapper"},Me=["type","placeholder","disabled","value"],Ie=a.defineComponent({__name:"Input",props:{modelValue:{},type:{default:"text"},placeholder:{},disabled:{type:Boolean,default:!1},size:{default:"default"}},emits:["update:modelValue","focus","blur"],setup(s,{emit:n}){const e=s,t=n,k=a.computed(()=>[{[`my-input--${e.size}`]:e.size!=="default","is-disabled":e.disabled}]),i=v=>{const V=v.target;t("update:modelValue",V.value)},g=v=>{t("focus",v)},o=v=>{t("blur",v)};return(v,V)=>(a.openBlock(),a.createElementBlock("div",Te,[a.createElementVNode("input",{class:a.normalizeClass(["my-input",k.value]),type:s.type,placeholder:s.placeholder,disabled:s.disabled,value:s.modelValue,onInput:i,onFocus:g,onBlur:o},null,42,Me)]))}}),he=Z._export_sfc(Ie,[["__scopeId","data-v-658697aa"]]);he.install=s=>{s.component("MyInput",he)};const Oe={key:0,class:"my-card__header"},He={class:"my-card__body"},Re={key:1,class:"my-card__footer"},ze=a.defineComponent({__name:"Card",props:{header:{},shadow:{default:"always"}},setup(s){const n=s,e=a.computed(()=>[`my-card--shadow-${n.shadow}`]);return(t,k)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["my-card",e.value])},[t.$slots.header||s.header?(a.openBlock(),a.createElementBlock("div",Oe,[a.renderSlot(t.$slots,"header",{},()=>[a.createTextVNode(a.toDisplayString(s.header),1)],!0)])):a.createCommentVNode("",!0),a.createElementVNode("div",He,[a.renderSlot(t.$slots,"default",{},void 0,!0)]),t.$slots.footer?(a.openBlock(),a.createElementBlock("div",Re,[a.renderSlot(t.$slots,"footer",{},void 0,!0)])):a.createCommentVNode("",!0)],2))}}),ge=Z._export_sfc(ze,[["__scopeId","data-v-33b37710"]]);ge.install=s=>{s.component("MyCard",ge)};class $e{constructor(n){this._pointer=0,this._eof=!1,this._data=n}next(){if(!this.hasNext())throw this._eof?new Error("Cannot call 'next' after EOF group has been read"):new Error("Unexpected end of input: EOF group not read before end of file. Ended on code "+this._data[this._pointer]);const n={code:parseInt(this._data[this._pointer])};return this._pointer++,n.value=be(n.code,this._data[this._pointer].trim()),this._pointer++,n.code===0&&n.value==="EOF"&&(this._eof=!0),this.lastReadGroup=n,n}peek(){if(!this.hasNext())throw this._eof?new Error("Cannot call 'next' after EOF group has been read"):new Error("Unexpected end of input: EOF group not read before end of file. Ended on code "+this._data[this._pointer]);const n={code:parseInt(this._data[this._pointer])};return n.value=be(n.code,this._data[this._pointer+1].trim()),n}rewind(n=1){this._pointer=this._pointer-n*2}hasNext(){return!(this._eof||this._pointer>this._data.length-2)}isEOF(){return this._eof}}function be(s,n){return s<=9?n:s>=10&&s<=59?parseFloat(n):s>=60&&s<=99?parseInt(n):s>=100&&s<=109?n:s>=110&&s<=149?parseFloat(n):s>=160&&s<=179?parseInt(n):s>=210&&s<=239?parseFloat(n):s>=270&&s<=289?parseInt(n):s>=290&&s<=299?Ge(n):s>=300&&s<=369?n:s>=370&&s<=389?parseInt(n):s>=390&&s<=399?n:s>=400&&s<=409?parseInt(n):s>=410&&s<=419?n:s>=420&&s<=429?parseInt(n):s>=430&&s<=439?n:s>=440&&s<=459?parseInt(n):s>=460&&s<=469?parseFloat(n):s>=470&&s<=481||s===999||s>=1e3&&s<=1009?n:s>=1010&&s<=1059?parseFloat(n):s>=1060&&s<=1071?parseInt(n):(console.log("WARNING: Group code does not have a defined type: %j",{code:s,value:n}),n)}function Ge(s){if(s==="0")return!1;if(s==="1")return!0;throw TypeError("String '"+s+"' cannot be cast to Boolean type")}const ke=[0,16711680,16776960,65280,65535,255,16711935,16777215,8421504,12632256,16711680,16744319,13369344,13395558,10027008,10046540,8323072,8339263,4980736,4990502,16727808,16752511,13382400,13401958,10036736,10051404,8331008,8343359,4985600,4992806,16744192,16760703,13395456,13408614,10046464,10056268,8339200,8347455,4990464,4995366,16760576,16768895,13408512,13415014,10056192,10061132,8347392,8351551,4995328,4997670,16776960,16777087,13421568,13421670,10000384,10000460,8355584,8355647,5000192,5000230,12582656,14679935,10079232,11717734,7510016,8755276,6258432,7307071,3755008,4344870,8388352,12582783,6736896,10079334,5019648,7510092,4161280,6258495,2509824,3755046,4194048,10485631,3394560,8375398,2529280,6264908,2064128,5209919,1264640,3099686,65280,8388479,52224,6736998,38912,5019724,32512,4161343,19456,2509862,65343,8388511,52275,6737023,38950,5019743,32543,4161359,19475,2509871,65407,8388543,52326,6737049,38988,5019762,32575,4161375,19494,2509881,65471,8388575,52377,6737074,39026,5019781,32607,4161391,19513,2509890,65535,8388607,52428,6737100,39064,5019800,32639,4161407,19532,2509900,49151,8380415,39372,6730444,29336,5014936,24447,4157311,14668,2507340,32767,8372223,26316,6724044,19608,5010072,16255,4153215,9804,2505036,16383,8364031,13260,6717388,9880,5005208,8063,4149119,4940,2502476,255,8355839,204,6710988,152,5000344,127,4145023,76,2500172,4129023,10452991,3342540,8349388,2490520,6245528,2031743,5193599,1245260,3089996,8323327,12550143,6684876,10053324,4980888,7490712,4128895,6242175,2490444,3745356,12517631,14647295,10027212,11691724,7471256,8735896,6226047,7290751,3735628,4335180,16711935,16744447,13369548,13395660,9961624,9981080,8323199,8339327,4980812,4990540,16711871,16744415,13369497,13395634,9961586,9981061,8323167,8339311,4980793,4990530,16711807,16744383,13369446,13395609,9961548,9981042,8323135,8339295,4980774,4990521,16711743,16744351,13369395,13395583,9961510,9981023,8323103,8339279,4980755,4990511,3355443,5987163,8684676,11382189,14079702,16777215];function Ue(s){return ke[s]}function P(s){const n={};s.rewind();let e=s.next(),t=e.code;if(n.x=e.value,t+=10,e=s.next(),e.code!=t)throw new Error("Expected code for point value to be "+t+" but got "+e.code+".");return n.y=e.value,t+=10,e=s.next(),e.code!=t?(s.rewind(),n):(n.z=e.value,n)}function G(s,n,e){switch(n.code){case 0:s.type=n.value;break;case 5:s.handle=n.value;break;case 6:s.lineType=n.value;break;case 8:s.layer=n.value;break;case 48:s.lineTypeScale=n.value;break;case 60:s.visible=n.value===0;break;case 62:s.colorIndex=n.value,s.color=Ue(Math.abs(n.value));break;case 67:s.inPaperSpace=n.value!==0;break;case 100:break;case 101:for(;n.code!=0;)n=e.next();e.rewind();break;case 330:s.ownerHandle=n.value;break;case 347:s.materialObjectHandle=n.value;break;case 370:s.lineweight=n.value;break;case 420:s.color=n.value;break;case 1e3:s.extendedData=s.extendedData||{},s.extendedData.customStrings=s.extendedData.customStrings||[],s.extendedData.customStrings.push(n.value);break;case 1001:s.extendedData=s.extendedData||{},s.extendedData.applicationName=n.value;break;default:return!1}return!0}class We{constructor(){this.ForEntityName="3DFACE"}parseEntity(n,e){const t={type:e.value,vertices:[]};for(e=n.next();!n.isEOF()&&e.code!==0;){switch(e.code){case 70:t.shape=(e.value&1)===1,t.hasContinuousLinetypePattern=(e.value&128)===128;break;case 10:t.vertices=Xe(n,e),e=n.lastReadGroup;break;default:G(t,e,n);break}e=n.next()}return t}}function Xe(s,n){var e=[],t=!1,k=!1,i=4;for(let o=0;o<=i;o++){for(var g={};!s.isEOF()&&!(n.code===0||k);){switch(n.code){case 10:case 11:case 12:case 13:if(t){k=!0;continue}g.x=n.value,t=!0;break;case 20:case 21:case 22:case 23:g.y=n.value;break;case 30:case 31:case 32:case 33:g.z=n.value;break;default:return e}n=s.next()}e.push(g),t=!1,k=!1}return s.rewind(),e}class Ye{constructor(){this.ForEntityName="ARC"}parseEntity(n,e){const t={type:e.value};for(e=n.next();!n.isEOF()&&e.code!==0;){switch(e.code){case 10:t.center=P(n);break;case 40:t.radius=e.value;break;case 50:t.startAngle=Math.PI/180*e.value;break;case 51:t.endAngle=Math.PI/180*e.value,t.angleLength=t.endAngle-t.startAngle;break;case 210:t.extrusionDirectionX=e.value;break;case 220:t.extrusionDirectionY=e.value;break;case 230:t.extrusionDirectionZ=e.value;break;default:G(t,e,n);break}e=n.next()}return t}}class Ze{constructor(){this.ForEntityName="ATTDEF"}parseEntity(n,e){var t={type:e.value,scale:1,textStyle:"STANDARD"};for(e=n.next();!n.isEOF()&&e.code!==0;){switch(e.code){case 1:t.text=e.value;break;case 2:t.tag=e.value;break;case 3:t.prompt=e.value;break;case 7:t.textStyle=e.value;break;case 10:t.startPoint=P(n);break;case 11:t.endPoint=P(n);break;case 39:t.thickness=e.value;break;case 40:t.textHeight=e.value;break;case 41:t.scale=e.value;break;case 50:t.rotation=e.value;break;case 51:t.obliqueAngle=e.value;break;case 70:t.invisible=!!(e.value&1),t.constant=!!(e.value&2),t.verificationRequired=!!(e.value&4),t.preset=!!(e.value&8);break;case 71:t.backwards=!!(e.value&2),t.mirrored=!!(e.value&4);break;case 72:t.horizontalJustification=e.value;break;case 73:t.fieldLength=e.value;break;case 74:t.verticalJustification=e.value;break;case 100:break;case 210:t.extrusionDirectionX=e.value;break;case 220:t.extrusionDirectionY=e.value;break;case 230:t.extrusionDirectionZ=e.value;break;default:G(t,e,n);break}e=n.next()}return t}}class je{constructor(){this.ForEntityName="CIRCLE"}parseEntity(n,e){const t={type:e.value};for(e=n.next();!n.isEOF()&&e.code!==0;){switch(e.code){case 10:t.center=P(n);break;case 40:t.radius=e.value;break;case 50:t.startAngle=Math.PI/180*e.value;break;case 51:const k=Math.PI/180*e.value;k<t.startAngle?t.angleLength=k+2*Math.PI-t.startAngle:t.angleLength=k-t.startAngle,t.endAngle=k;break;default:G(t,e,n);break}e=n.next()}return t}}class qe{constructor(){this.ForEntityName="DIMENSION"}parseEntity(n,e){const t={type:e.value};for(e=n.next();!n.isEOF()&&e.code!==0;){switch(e.code){case 2:t.block=e.value;break;case 10:t.anchorPoint=P(n);break;case 11:t.middleOfText=P(n);break;case 12:t.insertionPoint=P(n);break;case 13:t.linearOrAngularPoint1=P(n);break;case 14:t.linearOrAngularPoint2=P(n);break;case 15:t.diameterOrRadiusPoint=P(n);break;case 16:t.arcPoint=P(n);break;case 70:t.dimensionType=e.value;break;case 71:t.attachmentPoint=e.value;break;case 42:t.actualMeasurement=e.value;break;case 1:t.text=e.value;break;case 50:t.angle=e.value;break;default:G(t,e,n);break}e=n.next()}return t}}class Ke{constructor(){this.ForEntityName="ELLIPSE"}parseEntity(n,e){const t={type:e.value};for(e=n.next();!n.isEOF()&&e.code!==0;){switch(e.code){case 10:t.center=P(n);break;case 11:t.majorAxisEndPoint=P(n);break;case 40:t.axisRatio=e.value;break;case 41:t.startAngle=e.value;break;case 42:t.endAngle=e.value;break;case 2:t.name=e.value;break;default:G(t,e,n);break}e=n.next()}return t}}class Je{constructor(){this.ForEntityName="INSERT"}parseEntity(n,e){const t={type:e.value};for(e=n.next();!n.isEOF()&&e.code!==0;){switch(e.code){case 2:t.name=e.value;break;case 41:t.xScale=e.value;break;case 42:t.yScale=e.value;break;case 43:t.zScale=e.value;break;case 10:t.position=P(n);break;case 50:t.rotation=e.value;break;case 70:t.columnCount=e.value;break;case 71:t.rowCount=e.value;break;case 44:t.columnSpacing=e.value;break;case 45:t.rowSpacing=e.value;break;case 210:t.extrusionDirection=P(n);break;default:G(t,e,n);break}e=n.next()}return t}}class Qe{constructor(){this.ForEntityName="LINE"}parseEntity(n,e){const t={type:e.value,vertices:[]};for(e=n.next();!n.isEOF()&&e.code!==0;){switch(e.code){case 10:t.vertices.unshift(P(n));break;case 11:t.vertices.push(P(n));break;case 210:t.extrusionDirection=P(n);break;case 100:break;default:G(t,e,n);break}e=n.next()}return t}}class et{constructor(){this.ForEntityName="LWPOLYLINE"}parseEntity(n,e){const t={type:e.value,vertices:[]};let k=0;for(e=n.next();!n.isEOF()&&e.code!==0;){switch(e.code){case 38:t.elevation=e.value;break;case 39:t.depth=e.value;break;case 70:t.shape=(e.value&1)===1,t.hasContinuousLinetypePattern=(e.value&128)===128;break;case 90:k=e.value;break;case 10:t.vertices=tt(k,n);break;case 43:e.value!==0&&(t.width=e.value);break;case 210:t.extrusionDirectionX=e.value;break;case 220:t.extrusionDirectionY=e.value;break;case 230:t.extrusionDirectionZ=e.value;break;default:G(t,e,n);break}e=n.next()}return t}}function tt(s,n){if(!s||s<=0)throw Error("n must be greater than 0 verticies");const e=[];let t=!1,k=!1,i=n.lastReadGroup;for(let g=0;g<s;g++){const o={};for(;!n.isEOF()&&!(i.code===0||k);){switch(i.code){case 10:if(t){k=!0;continue}o.x=i.value,t=!0;break;case 20:o.y=i.value;break;case 30:o.z=i.value;break;case 40:o.startWidth=i.value;break;case 41:o.endWidth=i.value;break;case 42:i.value!=0&&(o.bulge=i.value);break;default:return n.rewind(),t&&e.push(o),n.rewind(),e}i=n.next()}e.push(o),t=!1,k=!1}return n.rewind(),e}class nt{constructor(){this.ForEntityName="MTEXT"}parseEntity(n,e){const t={type:e.value};for(e=n.next();!n.isEOF()&&e.code!==0;){switch(e.code){case 3:t.text?t.text+=e.value:t.text=e.value;break;case 1:t.text?t.text+=e.value:t.text=e.value;break;case 10:t.position=P(n);break;case 11:t.directionVector=P(n);break;case 40:t.height=e.value;break;case 41:t.width=e.value;break;case 50:t.rotation=e.value;break;case 71:t.attachmentPoint=e.value;break;case 72:t.drawingDirection=e.value;break;default:G(t,e,n);break}e=n.next()}return t}}class ot{constructor(){this.ForEntityName="POINT"}parseEntity(n,e){const k={type:e.value};for(e=n.next();!n.isEOF()&&e.code!==0;){switch(e.code){case 10:k.position=P(n);break;case 39:k.thickness=e.value;break;case 210:k.extrusionDirection=P(n);break;case 100:break;default:G(k,e,n);break}e=n.next()}return k}}class at{constructor(){this.ForEntityName="VERTEX"}parseEntity(n,e){var t={type:e.value};for(e=n.next();!n.isEOF()&&e.code!==0;){switch(e.code){case 10:t.x=e.value;break;case 20:t.y=e.value;break;case 30:t.z=e.value;break;case 40:break;case 41:break;case 42:e.value!=0&&(t.bulge=e.value);break;case 70:t.curveFittingVertex=(e.value&1)!==0,t.curveFitTangent=(e.value&2)!==0,t.splineVertex=(e.value&8)!==0,t.splineControlPoint=(e.value&16)!==0,t.threeDPolylineVertex=(e.value&32)!==0,t.threeDPolylineMesh=(e.value&64)!==0,t.polyfaceMeshVertex=(e.value&128)!==0;break;case 50:break;case 71:t.faceA=e.value;break;case 72:t.faceB=e.value;break;case 73:t.faceC=e.value;break;case 74:t.faceD=e.value;break;default:G(t,e,n);break}e=n.next()}return t}}class lt{constructor(){this.ForEntityName="POLYLINE"}parseEntity(n,e){var t={type:e.value,vertices:[]};for(e=n.next();!n.isEOF()&&e.code!==0;){switch(e.code){case 10:break;case 20:break;case 30:break;case 39:t.thickness=e.value;break;case 40:break;case 41:break;case 70:t.shape=(e.value&1)!==0,t.includesCurveFitVertices=(e.value&2)!==0,t.includesSplineFitVertices=(e.value&4)!==0,t.is3dPolyline=(e.value&8)!==0,t.is3dPolygonMesh=(e.value&16)!==0,t.is3dPolygonMeshClosed=(e.value&32)!==0,t.isPolyfaceMesh=(e.value&64)!==0,t.hasContinuousLinetypePattern=(e.value&128)!==0;break;case 71:break;case 72:break;case 73:break;case 74:break;case 75:break;case 210:t.extrusionDirection=P(n);break;default:G(t,e,n);break}e=n.next()}return t.vertices=st(n,e),t}}function st(s,n){const e=new at,t=[];for(;!s.isEOF();)if(n.code===0){if(n.value==="VERTEX")t.push(e.parseEntity(s,n)),n=s.lastReadGroup;else if(n.value==="SEQEND"){it(s,n);break}}return t}function it(s,n){const e={type:n.value};for(n=s.next();!s.isEOF()&&n.code!=0;)G(e,n,s),n=s.next();return e}class rt{constructor(){this.ForEntityName="SOLID"}parseEntity(n,e){const t={type:e.value,points:[]};for(e=n.next();!n.isEOF()&&e.code!==0;){switch(e.code){case 10:t.points[0]=P(n);break;case 11:t.points[1]=P(n);break;case 12:t.points[2]=P(n);break;case 13:t.points[3]=P(n);break;case 210:t.extrusionDirection=P(n);break;default:G(t,e,n);break}e=n.next()}return t}}class ct{constructor(){this.ForEntityName="SPLINE"}parseEntity(n,e){const t={type:e.value};for(e=n.next();!n.isEOF()&&e.code!==0;){switch(e.code){case 10:t.controlPoints||(t.controlPoints=[]),t.controlPoints.push(P(n));break;case 11:t.fitPoints||(t.fitPoints=[]),t.fitPoints.push(P(n));break;case 12:t.startTangent=P(n);break;case 13:t.endTangent=P(n);break;case 40:t.knotValues||(t.knotValues=[]),t.knotValues.push(e.value);break;case 70:(e.value&1)!=0&&(t.closed=!0),(e.value&2)!=0&&(t.periodic=!0),(e.value&4)!=0&&(t.rational=!0),(e.value&8)!=0&&(t.planar=!0),(e.value&16)!=0&&(t.planar=!0,t.linear=!0);break;case 71:t.degreeOfSplineCurve=e.value;break;case 72:t.numberOfKnots=e.value;break;case 73:t.numberOfControlPoints=e.value;break;case 74:t.numberOfFitPoints=e.value;break;case 210:t.normalVector=P(n);break;default:G(t,e,n);break}e=n.next()}return t}}class ut{constructor(){this.ForEntityName="TEXT"}parseEntity(n,e){const t={type:e.value};for(e=n.next();!n.isEOF()&&e.code!==0;){switch(e.code){case 10:t.startPoint=P(n);break;case 11:t.endPoint=P(n);break;case 40:t.textHeight=e.value;break;case 41:t.xScale=e.value;break;case 50:t.rotation=e.value;break;case 1:t.text=e.value;break;case 72:t.halign=e.value;break;case 73:t.valign=e.value;break;default:G(t,e,n);break}e=n.next()}return t}}var te={exports:{}},dt=te.exports,me;function ft(){return me||(me=1,(function(s){(function(n,e){s.exports?s.exports=e():n.log=e()})(dt,function(){var n=function(){},e="undefined",t=typeof window!==e&&typeof window.navigator!==e&&/Trident\/|MSIE /.test(window.navigator.userAgent),k=["trace","debug","info","warn","error"],i={},g=null;function o(D,I){var x=D[I];if(typeof x.bind=="function")return x.bind(D);try{return Function.prototype.bind.call(x,D)}catch(U){return function(){return Function.prototype.apply.apply(x,[D,arguments])}}}function v(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function V(D){return D==="debug"&&(D="log"),typeof console===e?!1:D==="trace"&&t?v:console[D]!==void 0?o(console,D):console.log!==void 0?o(console,"log"):n}function E(){for(var D=this.getLevel(),I=0;I<k.length;I++){var x=k[I];this[x]=I<D?n:this.methodFactory(x,D,this.name)}if(this.log=this.debug,typeof console===e&&D<this.levels.SILENT)return"No console available for logging"}function w(D){return function(){typeof console!==e&&(E.call(this),this[D].apply(this,arguments))}}function T(D,I,x){return V(D)||w.apply(this,arguments)}function O(D,I){var x=this,U,m,C,F="loglevel";typeof D=="string"?F+=":"+D:typeof D=="symbol"&&(F=void 0);function h(S){var L=(k[S]||"silent").toUpperCase();if(!(typeof window===e||!F)){try{window.localStorage[F]=L;return}catch(W){}try{window.document.cookie=encodeURIComponent(F)+"="+L+";"}catch(W){}}}function d(){var S;if(!(typeof window===e||!F)){try{S=window.localStorage[F]}catch(Q){}if(typeof S===e)try{var L=window.document.cookie,W=encodeURIComponent(F),K=L.indexOf(W+"=");K!==-1&&(S=/^([^;]+)/.exec(L.slice(K+W.length+1))[1])}catch(Q){}return x.levels[S]===void 0&&(S=void 0),S}}function _(){if(!(typeof window===e||!F)){try{window.localStorage.removeItem(F)}catch(S){}try{window.document.cookie=encodeURIComponent(F)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(S){}}}function R(S){var L=S;if(typeof L=="string"&&x.levels[L.toUpperCase()]!==void 0&&(L=x.levels[L.toUpperCase()]),typeof L=="number"&&L>=0&&L<=x.levels.SILENT)return L;throw new TypeError("log.setLevel() called with invalid level: "+S)}x.name=D,x.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},x.methodFactory=I||T,x.getLevel=function(){return C!=null?C:m!=null?m:U},x.setLevel=function(S,L){return C=R(S),L!==!1&&h(C),E.call(x)},x.setDefaultLevel=function(S){m=R(S),d()||x.setLevel(S,!1)},x.resetLevel=function(){C=null,_(),E.call(x)},x.enableAll=function(S){x.setLevel(x.levels.TRACE,S)},x.disableAll=function(S){x.setLevel(x.levels.SILENT,S)},x.rebuild=function(){if(g!==x&&(U=R(g.getLevel())),E.call(x),g===x)for(var S in i)i[S].rebuild()},U=R(g?g.getLevel():"WARN");var z=d();z!=null&&(C=R(z)),E.call(x)}g=new O,g.getLogger=function(I){if(typeof I!="symbol"&&typeof I!="string"||I==="")throw new TypeError("You must supply a name when creating a logger.");var x=i[I];return x||(x=i[I]=new O(I,g.methodFactory)),x};var H=typeof window!==e?window.log:void 0;return g.noConflict=function(){return typeof window!==e&&window.log===g&&(window.log=H),g},g.getLoggers=function(){return i},g.default=g,g})})(te)),te.exports}var pt=ft();const N=Z.getDefaultExportFromCjs(pt);N.setLevel("error");function vt(s){s.registerEntityHandler(We),s.registerEntityHandler(Ye),s.registerEntityHandler(Ze),s.registerEntityHandler(je),s.registerEntityHandler(qe),s.registerEntityHandler(Ke),s.registerEntityHandler(Je),s.registerEntityHandler(Qe),s.registerEntityHandler(et),s.registerEntityHandler(nt),s.registerEntityHandler(ot),s.registerEntityHandler(lt),s.registerEntityHandler(rt),s.registerEntityHandler(ct),s.registerEntityHandler(ut)}class ht{constructor(){this._entityHandlers={},vt(this)}parse(n){return typeof n=="string"?this._parse(n):(console.error("Cannot read dxf source of type `"+typeof n),null)}registerEntityHandler(n){const e=new n;this._entityHandlers[e.ForEntityName]=e}parseSync(n){return this.parse(n)}parseStream(n){let e="";const t=this;return new Promise((k,i)=>{n.on("data",g=>{e+=g}),n.on("end",()=>{try{k(t._parse(e))}catch(g){i(g)}}),n.on("error",g=>{i(g)})})}_parse(n){const e={};let t=0;const k=n.split(/\r\n|\r|\n/g),i=new $e(k);if(!i.hasNext())throw Error("Empty file");const g=this;let o;function v(){for(o=i.next();!i.isEOF();)if(o.code===0&&o.value==="SECTION"){if(o=i.next(),o.code!==2){console.error("Unexpected code %s after 0:SECTION",xe(o)),o=i.next();continue}o.value==="HEADER"?(N.debug("> HEADER"),e.header=V(),N.debug("<")):o.value==="BLOCKS"?(N.debug("> BLOCKS"),e.blocks=E(),N.debug("<")):o.value==="ENTITIES"?(N.debug("> ENTITIES"),e.entities=m(!1),N.debug("<")):o.value==="TABLES"?(N.debug("> TABLES"),e.tables=T(),N.debug("<")):o.value==="EOF"?N.debug("EOF"):N.warn("Skipping section '%s'",o.value)}else o=i.next()}function V(){let h=null,d=null;const _={};for(o=i.next();;){if(Y(o,0,"ENDSEC")){h&&(_[h]=d);break}else o.code===9?(h&&(_[h]=d),h=o.value):o.code===10?d={x:o.value}:o.code===20?d.y=o.value:o.code===30?d.z=o.value:d=o.value;o=i.next()}return o=i.next(),_}function E(){const h={};for(o=i.next();o.value!=="EOF"&&!Y(o,0,"ENDSEC");)if(Y(o,0,"BLOCK")){N.debug("block {");const d=w();N.debug("}"),F(d),d.name?h[d.name]=d:N.error('block with handle "'+d.handle+'" is missing a name.')}else q(o),o=i.next();return h}function w(){const h={};for(o=i.next();o.value!=="EOF";){switch(o.code){case 1:h.xrefPath=o.value,o=i.next();break;case 2:h.name=o.value,o=i.next();break;case 3:h.name2=o.value,o=i.next();break;case 5:h.handle=o.value,o=i.next();break;case 8:h.layer=o.value,o=i.next();break;case 10:h.position=C(o),o=i.next();break;case 67:h.paperSpace=!!(o.value&&o.value==1),o=i.next();break;case 70:o.value!=0&&(h.type=o.value),o=i.next();break;case 100:o=i.next();break;case 330:h.ownerHandle=o.value,o=i.next();break;case 0:if(o.value=="ENDBLK")break;h.entities=m(!0);break;default:q(o),o=i.next()}if(Y(o,0,"ENDBLK")){o=i.next();break}}return h}function T(){const h={};for(o=i.next();o.value!=="EOF"&&!Y(o,0,"ENDSEC");)Y(o,0,"TABLE")?(o=i.next(),U[o.value]?(N.debug(o.value+" Table {"),h[U[o.value].tableName]=H(o),N.debug("}")):N.debug("Unhandled Table "+o.value)):o=i.next();return o=i.next(),h}const O="ENDTAB";function H(h){const d=U[h.value],_={};let R=0;for(o=i.next();!Y(o,0,O);)switch(o.code){case 5:_.handle=o.value,o=i.next();break;case 330:_.ownerHandle=o.value,o=i.next();break;case 100:o.value==="AcDbSymbolTable"||q(o),o=i.next();break;case 70:R=o.value,o=i.next();break;case 0:o.value===d.dxfSymbolName?_[d.tableRecordsProperty]=d.parseTableRecords():(q(o),o=i.next());break;default:q(o),o=i.next()}const z=_[d.tableRecordsProperty];if(z){let S=(()=>{if(z.constructor===Array)return z.length;if(typeof z=="object")return Object.keys(z).length})();R!==S&&N.warn("Parsed "+S+" "+d.dxfSymbolName+"'s but expected "+R)}return o=i.next(),_}function D(){const h=[];let d={};for(N.debug("ViewPort {"),o=i.next();!Y(o,0,O);)switch(o.code){case 2:d.name=o.value,o=i.next();break;case 10:d.lowerLeftCorner=C(o),o=i.next();break;case 11:d.upperRightCorner=C(o),o=i.next();break;case 12:d.center=C(o),o=i.next();break;case 13:d.snapBasePoint=C(o),o=i.next();break;case 14:d.snapSpacing=C(o),o=i.next();break;case 15:d.gridSpacing=C(o),o=i.next();break;case 16:d.viewDirectionFromTarget=C(o),o=i.next();break;case 17:d.viewTarget=C(o),o=i.next();break;case 42:d.lensLength=o.value,o=i.next();break;case 43:d.frontClippingPlane=o.value,o=i.next();break;case 44:d.backClippingPlane=o.value,o=i.next();break;case 45:d.viewHeight=o.value,o=i.next();break;case 50:d.snapRotationAngle=o.value,o=i.next();break;case 51:d.viewTwistAngle=o.value,o=i.next();break;case 79:d.orthographicType=o.value,o=i.next();break;case 110:d.ucsOrigin=C(o),o=i.next();break;case 111:d.ucsXAxis=C(o),o=i.next();break;case 112:d.ucsYAxis=C(o),o=i.next();break;case 110:d.ucsOrigin=C(o),o=i.next();break;case 281:d.renderMode=o.value,o=i.next();break;case 281:d.defaultLightingType=o.value,o=i.next();break;case 292:d.defaultLightingOn=o.value,o=i.next();break;case 330:d.ownerHandle=o.value,o=i.next();break;case 63:case 421:case 431:d.ambientColor=o.value,o=i.next();break;case 0:o.value==="VPORT"&&(N.debug("}"),h.push(d),N.debug("ViewPort {"),d={},o=i.next());break;default:q(o),o=i.next();break}return N.debug("}"),h.push(d),h}function I(){const h={};let d={},_=0,R;for(N.debug("LType {"),o=i.next();!Y(o,0,"ENDTAB");)switch(o.code){case 2:d.name=o.value,R=o.value,o=i.next();break;case 3:d.description=o.value,o=i.next();break;case 73:_=o.value,_>0&&(d.pattern=[]),o=i.next();break;case 40:d.patternLength=o.value,o=i.next();break;case 49:d.pattern.push(o.value),o=i.next();break;case 0:N.debug("}"),_>0&&_!==d.pattern.length&&N.warn("lengths do not match on LTYPE pattern"),h[R]=d,d={},N.debug("LType {"),o=i.next();break;default:o=i.next()}return N.debug("}"),h[R]=d,h}function x(){const h={};let d={},_;for(N.debug("Layer {"),o=i.next();!Y(o,0,"ENDTAB");)switch(o.code){case 2:d.name=o.value,_=o.value,o=i.next();break;case 62:d.visible=o.value>=0,d.colorIndex=Math.abs(o.value),d.color=gt(d.colorIndex),o=i.next();break;case 70:d.frozen=(o.value&1)!=0||(o.value&2)!=0,o=i.next();break;case 0:o.value==="LAYER"&&(N.debug("}"),h[_]=d,N.debug("Layer {"),d={},_=void 0,o=i.next());break;default:q(o),o=i.next();break}return N.debug("}"),h[_]=d,h}const U={VPORT:{tableRecordsProperty:"viewPorts",tableName:"viewPort",dxfSymbolName:"VPORT",parseTableRecords:D},LTYPE:{tableRecordsProperty:"lineTypes",tableName:"lineType",dxfSymbolName:"LTYPE",parseTableRecords:I},LAYER:{tableRecordsProperty:"layers",tableName:"layer",dxfSymbolName:"LAYER",parseTableRecords:x}};function m(h){const d=[],_=h?"ENDBLK":"ENDSEC";for(h||(o=i.next());;)if(o.code===0){if(o.value===_)break;const R=g._entityHandlers[o.value];if(R!=null){N.debug(o.value+" {");const z=R.parseEntity(i,o);o=i.lastReadGroup,N.debug("}"),F(z),d.push(z)}else{N.warn("Unhandled entity "+o.value),o=i.next();continue}}else o=i.next();return _=="ENDSEC"&&(o=i.next()),d}function C(h){const d={};let _=h.code;if(d.x=h.value,_+=10,h=i.next(),h.code!=_)throw new Error("Expected code for point value to be "+_+" but got "+h.code+".");return d.y=h.value,_+=10,h=i.next(),h.code!=_?(i.rewind(),d):(d.z=h.value,d)}function F(h){if(!h)throw new TypeError("entity cannot be undefined or null");h.handle||(h.handle=t++)}return v(),e}}function Y(s,n,e){return s.code===n&&s.value===e}function q(s){N.debug("unhandled group "+xe(s))}function xe(s){return s.code+":"+s.value}function gt(s){return ke[s]}const bt={key:0,class:"my-dxf-viewer__toolbar"},mt={key:0,class:"my-dxf-viewer__loading"},wt={key:1,class:"my-dxf-viewer__error"},kt={key:2,class:"my-dxf-viewer__empty"},xt={key:1,class:"my-dxf-viewer__info"},yt={class:"my-dxf-viewer__info-item"},Et={class:"my-dxf-viewer__info-item"},Vt={class:"my-dxf-viewer__info-item"},Ct=a.defineComponent({__name:"DxfViewer",props:{dxfUrl:{},dxfData:{},width:{default:"100%"},height:{default:"500px"},backgroundColor:{default:"#ffffff"},lineColor:{default:"#000000"},lineWidth:{default:1},showToolbar:{type:Boolean,default:!0},showInfo:{type:Boolean,default:!0},showGrid:{type:Boolean,default:!1},emptyText:{default:"请加载 DXF 文件"}},emits:["load","error"],setup(s,{expose:n,emit:e}){const t=s,k=e,i=a.ref(null),g=a.ref(null),o=a.ref(!1),v=a.ref(""),V=a.ref(null);let E=null,w=null,T=null,O=null,H=null;const D=a.ref(1),I=a.ref({x:0,y:0}),x=a.ref(!1),U=a.ref({x:0,y:0});let m=null;const C=a.computed(()=>({"my-dxf-viewer--loading":o.value,"my-dxf-viewer--error":!!v.value})),F=a.computed(()=>{var l,u,y;return(y=(u=(l=V.value)==null?void 0:l.tables)==null?void 0:u.layer)!=null&&y.layers?Object.keys(V.value.tables.layer.layers).length:0}),h=a.computed(()=>{var l;return(l=V.value)!=null&&l.entities?V.value.entities.length:0}),d=a.computed(()=>{var B;if(!((B=V.value)!=null&&B.header))return"-";const l=V.value.header.$EXTMIN,u=V.value.header.$EXTMAX;if(!l||!u)return"-";const y=(u.x-l.x).toFixed(2),M=(u.y-l.y).toFixed(2);return`${y} × ${M}`}),_=()=>{if(!g.value)return;const l=g.value,u=l.clientWidth,y=l.clientHeight;E=new c.Scene,E.background=new c.Color(t.backgroundColor);const M=u/y,B=1e3;w=new c.OrthographicCamera(-B*M,B*M,B,-B,.1,1e4),w.position.z=100,w.lookAt(0,0,0),T=new c.WebGLRenderer({antialias:!0}),T.setSize(u,y),T.setPixelRatio(window.devicePixelRatio),l.appendChild(T.domElement),O=new c.Group,E.add(O),Q()},R=(l,u)=>{if(!E)return;H&&(E.remove(H),H=null);const y=l||2e4,M=50;H=new c.GridHelper(y,M,4079170,2763306),H.rotation.x=Math.PI/2,u&&H.position.set(u.x,u.y,-.1),H.visible=t.showGrid,E.add(H)},z=l=>ie(null,null,function*(){if(l){o.value=!0,v.value="",V.value=null;try{const u=yield fetch(l);if(!u.ok)throw new Error(`HTTP ${u.status}: ${u.statusText}`);const y=yield u.text(),B=new ht().parseSync(y);if(!B)throw new Error("DXF 解析返回空数据");V.value=B,k("load",B),B.entities&&B.entities.length>0?S(B):(console.warn("DXF 文件中没有实体数据"),v.value="DXF 文件中没有可显示的图形")}catch(u){console.error("DXF 加载/解析错误:",u),v.value=u.message||"加载 DXF 文件失败",k("error",v.value)}finally{o.value=!1}}}),S=l=>{if(!E||!O)return;for(;O.children.length>0;)O.remove(O.children[0]);const u=new c.Color(t.lineColor),y=new Set;l.entities&&l.entities.forEach(M=>{y.add(M.type);const B=W(M,u);B&&O.add(B)}),K()},L=(l,u,y)=>{const M=new c.Vector3().subVectors(u,l),B=M.length(),f=t.lineWidth,r=new c.PlaneGeometry(B,f),p=new c.MeshBasicMaterial({color:y,side:c.DoubleSide}),b=new c.Mesh(r,p),A=new c.Vector3().addVectors(l,u).multiplyScalar(.5);b.position.copy(A);const $=Math.atan2(M.y,M.x);return b.rotation.z=$,b},W=(l,u)=>{var M,B;const y=new c.LineBasicMaterial({color:u});try{if(l.type==="LINE"){const f=new c.Vector3(l.vertices[0].x,l.vertices[0].y,l.vertices[0].z||0),r=new c.Vector3(l.vertices[1].x,l.vertices[1].y,l.vertices[1].z||0);if(t.lineWidth>1)return L(f,r,u);{const p=new c.BufferGeometry,b=new Float32Array([f.x,f.y,f.z,r.x,r.y,r.z]);return p.setAttribute("position",new c.BufferAttribute(b,3)),new c.Line(p,y)}}else if(l.type==="LWPOLYLINE"){const f=[];if(l.vertices.forEach(r=>{f.push(new c.Vector3(r.x,r.y,0))}),l.shape&&f.length>0&&f.push(f[0].clone()),t.lineWidth>1&&f.length>1){const r=new c.Group;for(let p=0;p<f.length-1;p++){const b=L(f[p],f[p+1],u);r.add(b)}return r}else{const r=new c.BufferGeometry().setFromPoints(f);return new c.Line(r,y)}}else if(l.type==="POLYLINE"){const f=[];if(l.vertices.forEach(r=>{f.push(new c.Vector3(r.x,r.y,r.z||0))}),t.lineWidth>1&&f.length>1){const r=new c.Group;for(let p=0;p<f.length-1;p++){const b=L(f[p],f[p+1],u);r.add(b)}return r}else{const r=new c.BufferGeometry().setFromPoints(f);return new c.Line(r,y)}}else if(l.type==="CIRCLE"){const f=l.radius,b=new c.EllipseCurve(l.center.x,l.center.y,f,f,0,2*Math.PI,!1,0).getPoints(64);if(t.lineWidth>1){const A=new c.Group;for(let $=0;$<b.length;$++){const X=b[$],j=b[($+1)%b.length],Ve=L(new c.Vector3(X.x,X.y,0),new c.Vector3(j.x,j.y,0),u);A.add(Ve)}return A}else{const A=new c.BufferGeometry().setFromPoints(b);return new c.LineLoop(A,y)}}else if(l.type==="ARC"){const r=new c.EllipseCurve(l.center.x,l.center.y,l.radius,l.radius,l.startAngle,l.endAngle,!1,0).getPoints(50);if(t.lineWidth>1){const p=new c.Group;for(let b=0;b<r.length-1;b++){const A=r[b],$=r[b+1],X=L(new c.Vector3(A.x,A.y,0),new c.Vector3($.x,$.y,0),u);p.add(X)}return p}else{const p=new c.BufferGeometry().setFromPoints(r);return new c.Line(p,y)}}else if(l.type==="SPLINE"){if(l.controlPoints&&l.controlPoints.length>0){const f=[];l.controlPoints.forEach(b=>{f.push(new c.Vector3(b.x,b.y,b.z||0))});const p=new c.CatmullRomCurve3(f).getPoints(50);if(t.lineWidth>1){const b=new c.Group;for(let A=0;A<p.length-1;A++){const $=L(p[A],p[A+1],u);b.add($)}return b}else{const b=new c.BufferGeometry().setFromPoints(p);return new c.Line(b,y)}}}else if(l.type==="ELLIPSE"){const r=new c.EllipseCurve(l.center.x,l.center.y,l.majorAxisEndPoint.x,l.majorAxisEndPoint.y,l.startAngle||0,l.endAngle||Math.PI*2,!1,0).getPoints(64);if(t.lineWidth>1){const p=new c.Group;for(let b=0;b<r.length-1;b++){const A=r[b],$=r[b+1],X=L(new c.Vector3(A.x,A.y,0),new c.Vector3($.x,$.y,0),u);p.add(X)}return p}else{const p=new c.BufferGeometry().setFromPoints(r);return new c.Line(p,y)}}else if(l.type==="POINT"){const f=new c.BufferGeometry,r=new Float32Array([l.position.x,l.position.y,l.position.z||0]);f.setAttribute("position",new c.BufferAttribute(r,3));const p=new c.PointsMaterial({color:u,size:Math.max(t.lineWidth*2,3)});return new c.Points(f,p)}else if(l.type==="TEXT"||l.type==="MTEXT"){const f=l.text||l.string||"";if(!l.startPoint&&!l.position)return null;const r=l.startPoint||l.position,p=l.textHeight||l.height||10,b=new c.CircleGeometry(p*.3,8);b.translate(r.x,r.y,r.z||0);const A=new c.MeshBasicMaterial({color:u,side:c.DoubleSide});return new c.Mesh(b,A)}else if(l.type==="INSERT"){const f=l.name,r=(B=(M=V.value)==null?void 0:M.blocks)==null?void 0:B[f];if(!r||!r.entities||r.entities.length===0)return null;const p=new c.Group,b=l.position||{x:0,y:0,z:0},A=l.xScale!==void 0?{x:l.xScale||1,y:l.yScale||1,z:l.zScale||1}:{x:1,y:1,z:1},$=l.rotation||0;return r.entities.forEach(X=>{const j=W(X,u);j&&(j.position.set(b.x,b.y,b.z||0),j.scale.set(A.x,A.y,A.z),$&&(j.rotation.z=$*Math.PI/180),p.add(j))}),p.children.length>0?p:null}else if(l.type==="DIMENSION"){const f=new c.Group;if(l.definingPoint&&l.anchorPoint){const r=new c.Vector3(l.definingPoint.x,l.definingPoint.y,0),p=new c.Vector3(l.anchorPoint.x,l.anchorPoint.y,0);if(t.lineWidth>1)f.add(L(r,p,u));else{const b=new c.BufferGeometry,A=new Float32Array([r.x,r.y,r.z,p.x,p.y,p.z]);b.setAttribute("position",new c.BufferAttribute(A,3)),f.add(new c.Line(b,y))}}return f.children.length>0?f:null}else if(l.type==="HATCH"){if(l.boundaries&&l.boundaries.length>0){const f=new c.Group;return l.boundaries.forEach(r=>{r.edges&&r.edges.forEach(p=>{const b=W(p,u);b&&f.add(b)})}),f.children.length>0?f:null}return null}else if(l.type==="3DFACE"||l.type==="SOLID"){if(l.vertices&&l.vertices.length>=3){const f=[];if(l.vertices.forEach(r=>{f.push(new c.Vector3(r.x,r.y,r.z||0))}),f.push(f[0].clone()),t.lineWidth>1&&f.length>1){const r=new c.Group;for(let p=0;p<f.length-1;p++){const b=L(f[p],f[p+1],u);r.add(b)}return r}else{const r=new c.BufferGeometry().setFromPoints(f);return new c.Line(r,y)}}}else{if(l.type==="VERTEX"||l.type==="SEQEND")return null;if(l.type==="ATTRIB"||l.type==="ATTDEF")return null;if(l.type==="LEADER"||l.type==="MLEADER"){if(l.vertices&&l.vertices.length>1){const f=[];if(l.vertices.forEach(r=>{f.push(new c.Vector3(r.x,r.y,r.z||0))}),t.lineWidth>1){const r=new c.Group;for(let p=0;p<f.length-1;p++)r.add(L(f[p],f[p+1],u));return r}else{const r=new c.BufferGeometry().setFromPoints(f);return new c.Line(r,y)}}return null}else if(l.type==="RAY"||l.type==="XLINE"){if(l.startPoint&&l.unitDirectionVector){const f=new c.Vector3(l.startPoint.x,l.startPoint.y,l.startPoint.z||0),r=new c.Vector3(l.unitDirectionVector.x,l.unitDirectionVector.y,l.unitDirectionVector.z||0),p=f.clone().add(r.multiplyScalar(1e5));if(t.lineWidth>1)return L(f,p,u);{const b=new c.BufferGeometry,A=new Float32Array([f.x,f.y,f.z,p.x,p.y,p.z]);return b.setAttribute("position",new c.BufferAttribute(A,3)),new c.Line(b,y)}}return null}else{if(l.type==="REGION")return null;if(l.type==="BODY"||l.type==="3DSOLID")return null;if(l.type==="SURFACE"||l.type==="PLANESURFACE")return null;if(l.type==="VIEWPORT")return null;if(l.type==="IMAGE")return null;if(l.type==="WIPEOUT")return null;if(l.vertices&&Array.isArray(l.vertices)&&l.vertices.length>0){const f=[];if(l.vertices.forEach(r=>{r&&typeof r=="object"&&r.x!==void 0&&r.y!==void 0&&f.push(new c.Vector3(r.x,r.y,r.z||0))}),f.length>1)if(t.lineWidth>1){const r=new c.Group;for(let p=0;p<f.length-1;p++){const b=L(f[p],f[p+1],u);r.add(b)}return r}else{const r=new c.BufferGeometry().setFromPoints(f);return new c.Line(r,y)}}if(l.startPoint&&l.endPoint){const f=new c.Vector3(l.startPoint.x,l.startPoint.y,l.startPoint.z||0),r=new c.Vector3(l.endPoint.x,l.endPoint.y,l.endPoint.z||0);if(t.lineWidth>1)return L(f,r,u);{const p=new c.BufferGeometry,b=new Float32Array([f.x,f.y,f.z,r.x,r.y,r.z]);return p.setAttribute("position",new c.BufferAttribute(b,3)),new c.Line(p,y)}}if(l.center&&l.radius){const r=new c.EllipseCurve(l.center.x,l.center.y,l.radius,l.radius,0,2*Math.PI,!1,0).getPoints(64);if(t.lineWidth>1){const p=new c.Group;for(let b=0;b<r.length;b++){const A=r[b],$=r[(b+1)%r.length],X=L(new c.Vector3(A.x,A.y,0),new c.Vector3($.x,$.y,0),u);p.add(X)}return p}else{const p=new c.BufferGeometry().setFromPoints(r);return new c.LineLoop(p,y)}}console.warn(`无法渲染实体类型 ${l.type},缺少必要的几何信息`)}}}catch(f){console.warn(`创建实体失败 (${l.type}):`,f,l)}return null},K=()=>{if(!w||!O||!T)return;const l=new c.Box3().setFromObject(O);if(l.isEmpty()){console.warn("没有实体,无法适应视图");return}const u=l.getSize(new c.Vector3),y=l.getCenter(new c.Vector3),M=Math.max(u.x,u.y),B=T.domElement.clientWidth/T.domElement.clientHeight,f=M*.6;w.left=-f*B,w.right=f*B,w.top=f,w.bottom=-f,w.position.set(y.x,y.y,100),w.lookAt(y.x,y.y,0),w.updateProjectionMatrix();const r=Math.max(M*1.5,1e3);R(r,y),D.value=1,I.value={x:0,y:0}},Q=()=>{!T||!E||!w||(requestAnimationFrame(Q),T.render(E,w))},ne=()=>{if(!w)return;const l=.8;w.left*=l,w.right*=l,w.top*=l,w.bottom*=l,w.updateProjectionMatrix(),D.value/=l},oe=()=>{if(!w)return;const l=1.25;w.left*=l,w.right*=l,w.top*=l,w.bottom*=l,w.updateProjectionMatrix(),D.value/=l},re=()=>{K()},ye=()=>{H&&(H.visible=!H.visible)},ce=l=>{x.value=!0,U.value={x:l.clientX,y:l.clientY}},ue=l=>{if(!x.value||!w||!T)return;const u=l.clientX-U.value.x,y=l.clientY-U.value.y,M=-u/T.domElement.clientWidth*(w.right-w.left),B=y/T.domElement.clientHeight*(w.top-w.bottom);w.position.x+=M,w.position.y+=B,w.updateProjectionMatrix(),U.value={x:l.clientX,y:l.clientY}},ee=()=>{x.value=!1},de=l=>{l.preventDefault(),l.deltaY<0?ne():oe()},ae=()=>{if(!g.value||!w||!T)return;const l=g.value.clientWidth,u=g.value.clientHeight;if(l<=0||u<=0)return;const y=l/u,M=(w.top-w.bottom)/2,B=M*y;w.left=-B,w.right=B,w.top=M,w.bottom=-M,w.updateProjectionMatrix(),T.setSize(l,u),T.setPixelRatio(window.devicePixelRatio)},Ee=()=>{if(T&&(T.dispose(),g.value&&T.domElement&&g.value.removeChild(T.domElement)),O){const l=u=>{u.geometry&&u.geometry.dispose(),u.material&&(Array.isArray(u.material)?u.material.forEach(y=>y.dispose()):u.material.dispose()),u.children&&u.children.forEach(y=>l(y))};O.children.forEach(u=>{l(u)})}E=null,w=null,T=null,O=null,H=null};return a.watch(()=>t.dxfUrl,l=>{l&&z(l)},{immediate:!0}),a.watch(()=>t.dxfData,l=>{l&&(V.value=l,S(l))},{immediate:!0}),a.watch(()=>t.backgroundColor,l=>{E&&(E.background=new c.Color(l))}),a.watch(()=>t.lineColor,()=>{V.value&&S(V.value)}),a.watch(()=>t.lineWidth,()=>{V.value&&S(V.value)}),a.watch(()=>t.showGrid,l=>{H&&(H.visible=l)}),a.onMounted(()=>{if(_(),window.addEventListener("resize",ae),g.value&&(m=new ResizeObserver(l=>{for(const u of l)u.target===g.value&&ae()}),m.observe(g.value)),g.value){const l=g.value;l.addEventListener("mousedown",ce),l.addEventListener("mousemove",ue),l.addEventListener("mouseup",ee),l.addEventListener("mouseleave",ee),l.addEventListener("wheel",de,{passive:!1})}}),a.onBeforeUnmount(()=>{if(Ee(),window.removeEventListener("resize",ae),m&&g.value&&(m.unobserve(g.value),m.disconnect(),m=null),g.value){const l=g.value;l.removeEventListener("mousedown",ce),l.removeEventListener("mousemove",ue),l.removeEventListener("mouseup",ee),l.removeEventListener("mouseleave",ee),l.removeEventListener("wheel",de)}}),n({loadDxf:z,zoomIn:ne,zoomOut:oe,resetView:re,fitToView:K}),(l,u)=>{var y;return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["my-dxf-viewer",C.value])},[s.showToolbar?(a.openBlock(),a.createElementBlock("div",bt,[a.createElementVNode("button",{class:"my-dxf-viewer__btn",onClick:ne,title:"放大"},[...u[0]||(u[0]=[a.createElementVNode("svg",{viewBox:"0 0 24 24",width:"18",height:"18",fill:"currentColor"},[a.createElementVNode("path",{d:"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"})],-1)])]),a.createElementVNode("button",{class:"my-dxf-viewer__btn",onClick:oe,title:"缩小"},[...u[1]||(u[1]=[a.createElementVNode("svg",{viewBox:"0 0 24 24",width:"18",height:"18",fill:"currentColor"},[a.createElementVNode("path",{d:"M19,13H5V11H19V13Z"})],-1)])]),a.createElementVNode("button",{class:"my-dxf-viewer__btn",onClick:re,title:"适应窗口"},[...u[2]||(u[2]=[a.createElementVNode("svg",{viewBox:"0 0 24 24",width:"18",height:"18",fill:"currentColor"},[a.createElementVNode("path",{d:"M9,3V4H4V9H3V4A1,1 0 0,1 4,3H9M4,20H9V21H4A1,1 0 0,1 3,20V15H4V20M20,20V15H21V20A1,1 0 0,1 20,21H15V20H20M20,9H21V4A1,1 0 0,1 20,3H15V4H20V9Z"})],-1)])]),a.createElementVNode("button",{class:a.normalizeClass(["my-dxf-viewer__btn",{active:t.showGrid&&((y=a.unref(H))==null?void 0:y.visible)}]),onClick:ye,title:"显示/隐藏网格"},[...u[3]||(u[3]=[a.createElementVNode("svg",{viewBox:"0 0 24 24",width:"18",height:"18",fill:"currentColor"},[a.createElementVNode("path",{d:"M10,4V8H14V4H10M16,4V8H20V4H16M16,10V14H20V10H16M16,16V20H20V16H16M14,20V16H10V20H14M8,20V16H4V20H8M8,14V10H4V14H8M8,8V4H4V8H8M10,14H14V10H10V14M4,2H20A2,2 0 0,1 22,4V20A2,2 0 0,1 20,22H4C2.92,22 2,21.1 2,20V4A2,2 0 0,1 4,2Z"})],-1)])],2)])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:"my-dxf-viewer__canvas-wrapper",ref_key:"containerRef",ref:i},[a.createElementVNode("div",{ref_key:"canvasContainerRef",ref:g,class:"my-dxf-viewer__three-container"},null,512),o.value?(a.openBlock(),a.createElementBlock("div",mt,[...u[4]||(u[4]=[a.createElementVNode("div",{class:"my-dxf-viewer__spinner"},null,-1),a.createElementVNode("p",null,"解析 DXF 文件中...",-1)])])):a.createCommentVNode("",!0),v.value?(a.openBlock(),a.createElementBlock("div",wt,[u[5]||(u[5]=a.createElementVNode("svg",{viewBox:"0 0 24 24",width:"48",height:"48",fill:"currentColor"},[a.createElementVNode("path",{d:"M13,13H11V7H13M13,17H11V15H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"})],-1)),a.createElementVNode("p",null,a.toDisplayString(v.value),1)])):a.createCommentVNode("",!0),!s.dxfUrl&&!v.value&&!o.value?(a.openBlock(),a.createElementBlock("div",kt,[u[6]||(u[6]=a.createElementVNode("svg",{viewBox:"0 0 24 24",width:"64",height:"64",fill:"currentColor"},[a.createElementVNode("path",{d:"M13,9H18.5L13,3.5V9M6,2H14L20,8V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V4C4,2.89 4.89,2 6,2M15,18V16H6V18H15M18,14V12H6V14H18Z"})],-1)),a.createElementVNode("p",null,a.toDisplayString(s.emptyText),1)])):a.createCommentVNode("",!0)],512),s.showInfo&&V.value?(a.openBlock(),a.createElementBlock("div",xt,[a.createElementVNode("div",yt,[u[7]||(u[7]=a.createElementVNode("span",null,"图层:",-1)),a.createElementVNode("span",null,a.toDisplayString(F.value),1)]),a.createElementVNode("div",Et,[u[8]||(u[8]=a.createElementVNode("span",null,"实体:",-1)),a.createElementVNode("span",null,a.toDisplayString(h.value),1)]),a.createElementVNode("div",Vt,[u[9]||(u[9]=a.createElementVNode("span",null,"边界:",-1)),a.createElementVNode("span",null,a.toDisplayString(d.value),1)])])):a.createCommentVNode("",!0)],2)}}}),_t=Z._export_sfc(Ct,[["__scopeId","data-v-37660f6e"]]),Lt={key:0,class:"data-panel__header"},Nt={class:"data-panel__title"},Pt={key:0,class:"data-panel__icon"},St={class:"icon-placeholder"},Dt={class:"data-panel__content"},Ft={class:"data-panel__label"},Bt={class:"data-panel__value-wrapper"},At={class:"data-panel__value"},Tt={key:0,class:"data-panel__unit"},Mt={key:0,class:"data-panel__status"},It={class:"status-text"},Ot={key:1,class:"data-panel__description"},Ht={key:0},Rt={key:1},zt={key:2},$t={key:1,class:"data-panel__footer"},Gt={name:"MyDataPanel"},Ut=a.defineComponent(se(le({},Gt),{props:{title:{},dataItems:{},columns:{default:3},showIcon:{type:Boolean,default:!0},theme:{default:"light"},size:{default:"medium"},compact:{type:Boolean,default:!1}},setup(s){const n=s,e=a.computed(()=>[`data-panel--${n.theme}`,`data-panel--${n.size}`,n.compact&&"data-panel--compact"]),t=a.computed(()=>({gridTemplateColumns:`repeat(${n.columns}, 1fr)`})),k=v=>{if(v.customStatus)return v.customStatus;const V=Number(v.value);return isNaN(V)?"normal":v.min!==void 0&&V<v.min||v.max!==void 0&&V>v.max?"danger":v.warnMin!==void 0&&V<v.warnMin||v.warnMax!==void 0&&V>v.warnMax?"warning":"normal"},i=v=>{const V=k(v);return{normal:"正常",warning:"警告",danger:"异常"}[V]},g=v=>typeof v=="string"?v:v.toFixed(2),o=v=>[`data-panel__item--${k(v)}`];return(v,V)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["data-panel",e.value])},[s.title||v.$slots.title?(a.openBlock(),a.createElementBlock("div",Lt,[a.renderSlot(v.$slots,"title",{},()=>[a.createElementVNode("h3",Nt,a.toDisplayString(s.title),1)],!0)])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:"data-panel__grid",style:a.normalizeStyle(t.value)},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.dataItems,(E,w)=>(a.openBlock(),a.createElementBlock("div",{key:w,class:a.normalizeClass(["data-panel__item",o(E)])},[E.icon||s.showIcon?(a.openBlock(),a.createElementBlock("div",Pt,[a.renderSlot(v.$slots,"icon",{item:E},()=>[a.createElementVNode("span",St,a.toDisplayString(E.icon||"📊"),1)],!0)])):a.createCommentVNode("",!0),a.createElementVNode("div",Dt,[a.createElementVNode("div",Ft,a.toDisplayString(E.label),1),a.createElementVNode("div",Bt,[a.createElementVNode("span",At,a.toDisplayString(g(E.value)),1),E.unit?(a.openBlock(),a.createElementBlock("span",Tt,a.toDisplayString(E.unit),1)):a.createCommentVNode("",!0)]),E.showStatus!==!1?(a.openBlock(),a.createElementBlock("div",Mt,[a.createElementVNode("span",{class:a.normalizeClass(["status-dot",`status-dot--${k(E)}`])},null,2),a.createElementVNode("span",It,a.toDisplayString(i(E)),1)])):a.createCommentVNode("",!0),E.description?(a.openBlock(),a.createElementBlock("div",Ot,a.toDisplayString(E.description),1)):a.createCommentVNode("",!0)]),E.trend?(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(["data-panel__trend",`trend--${E.trend}`])},[E.trend==="up"?(a.openBlock(),a.createElementBlock("span",Ht,"↑")):a.createCommentVNode("",!0),E.trend==="down"?(a.openBlock(),a.createElementBlock("span",Rt,"↓")):a.createCommentVNode("",!0),E.trend==="stable"?(a.openBlock(),a.createElementBlock("span",zt,"→")):a.createCommentVNode("",!0)],2)):a.createCommentVNode("",!0)],2))),128))],4),v.$slots.footer?(a.openBlock(),a.createElementBlock("div",$t,[a.renderSlot(v.$slots,"footer",{},void 0,!0)])):a.createCommentVNode("",!0)],2))}})),we=Z._export_sfc(Ut,[["__scopeId","data-v-14261ac2"]]);we.install=s=>{s.component("MyDataPanel",we)};const Wt="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eDXF查看器%3c/title%3e%3cg%20id='页面-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='轮廓化'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M3.5,2.15%20L13.5,2.15%20C14.3284271,2.15%2015,2.82157288%2015,3.65%20L15,13.65%20C15,14.4784271%2014.3284271,15.15%2013.5,15.15%20L3.5,15.15%20C2.67157288,15.15%202,14.4784271%202,13.65%20L2,3.65%20C2,2.82157288%202.67157288,2.15%203.5,2.15%20Z%20M13.5,3.4%20L3.5,3.4%20C3.36192881,3.4%203.25,3.51192881%203.25,3.65%20L3.25,13.65%20C3.25,13.7880712%203.36192881,13.9%203.5,13.9%20L13.5,13.9%20C13.6380712,13.9%2013.75,13.7880712%2013.75,13.65%20L13.75,3.65%20C13.75,3.51192881%2013.6380712,3.4%2013.5,3.4%20Z%20M8.5,5.15%20C10.1568542,5.15%2011.5,6.49314575%2011.5,8.15%20C11.5,9.80685425%2010.1568542,11.15%208.5,11.15%20C6.84314575,11.15%205.5,9.80685425%205.5,8.15%20C5.5,6.49314575%206.84314575,5.15%208.5,5.15%20Z%20M8.5,6.4%20C7.53350169,6.4%206.75,7.18350169%206.75,8.15%20C6.75,9.11649831%207.53350169,9.9%208.5,9.9%20C9.46649831,9.9%2010.25,9.11649831%2010.25,8.15%20C10.25,7.18350169%209.46649831,6.4%208.5,6.4%20Z%20M8.5,7.025%20C8.84517797,7.025%209.125,7.30482203%209.125,7.65%20L9.125,8.65%20C9.125,8.99517797%208.84517797,9.275%208.5,9.275%20C8.15482203,9.275%207.875,8.99517797%207.875,8.65%20L7.875,7.65%20C7.875,7.30482203%208.15482203,7.025%208.5,7.025%20Z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Xt="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eDXF查看器-激活%3c/title%3e%3cg%20id='页面-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='轮廓化'%20fill='%234A90E2'%20fill-rule='nonzero'%3e%3cpath%20d='M3.5,2.15%20L13.5,2.15%20C14.3284271,2.15%2015,2.82157288%2015,3.65%20L15,13.65%20C15,14.4784271%2014.3284271,15.15%2013.5,15.15%20L3.5,15.15%20C2.67157288,15.15%202,14.4784271%202,13.65%20L2,3.65%20C2,2.82157288%202.67157288,2.15%203.5,2.15%20Z%20M13.5,3.4%20L3.5,3.4%20C3.36192881,3.4%203.25,3.51192881%203.25,3.65%20L3.25,13.65%20C3.25,13.7880712%203.36192881,13.9%203.5,13.9%20L13.5,13.9%20C13.6380712,13.9%2013.75,13.7880712%2013.75,13.65%20L13.75,3.65%20C13.75,3.51192881%2013.6380712,3.4%2013.5,3.4%20Z%20M8.5,5.15%20C10.1568542,5.15%2011.5,6.49314575%2011.5,8.15%20C11.5,9.80685425%2010.1568542,11.15%208.5,11.15%20C6.84314575,11.15%205.5,9.80685425%205.5,8.15%20C5.5,6.49314575%206.84314575,5.15%208.5,5.15%20Z%20M8.5,6.4%20C7.53350169,6.4%206.75,7.18350169%206.75,8.15%20C6.75,9.11649831%207.53350169,9.9%208.5,9.9%20C9.46649831,9.9%2010.25,9.11649831%2010.25,8.15%20C10.25,7.18350169%209.46649831,6.4%208.5,6.4%20Z%20M8.5,7.025%20C8.84517797,7.025%209.125,7.30482203%209.125,7.65%20L9.125,8.65%20C9.125,8.99517797%208.84517797,9.275%208.5,9.275%20C8.15482203,9.275%207.875,8.99517797%207.875,8.65%20L7.875,7.65%20C7.875,7.30482203%208.15482203,7.025%208.5,7.025%20Z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Yt={class:"mix-body"},Zt={class:"upload-content"},jt={viewBox:"0 0 24 24",width:"48",height:"48",fill:"currentColor",style:{opacity:"0.5"}},qt={class:"upload-text"},Kt={key:0,class:"upload-hint"},Jt={key:1,class:"viewer-container"},Qt={key:0,class:"file-info"},en={class:"file-name"},tn={DEFAULT_ICON:Wt,ACTIVE_ICON:Xt,NAME_CN:"DXF查看器",NAME_EN:"DXF Viewer",ORDER:3},nn={backgroundColor:"#ffffff",lineColor:"#000000",lineWidth:1,showToolbar:!0,showInfo:!0,showGrid:!1,fileUrl:{value:"",type:"string",label:"component.options.fileUrl",placeholder:"请上传素材"},fileName:{value:"",type:"string",label:"component.options.fileName",placeholder:"请上传素材"}},on=[],an=[],ln=[],sn=null,rn={DEFAULT:tn,OPTIONS:nn,DATA:on,PARAMS:an,SOURCE:ln,COMMON:sn},cn=a.defineComponent(se(le({},rn),{__name:"dxf",props:{conf:{type:Object,default:()=>({})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(s){const n=Be.useCounterStore(),e=s;class t extends Se.BaseComponent{extractStyles(){const C=this.getOptionValue("backgroundColor","#ffffff");return{backgroundColor:C,lineColor:this.getOptionValue("lineColor","#000000"),lineWidth:this.getOptionValue("lineWidth",1),showToolbar:this.getOptionValue("showToolbar",!0),showInfo:this.getOptionValue("showInfo",!0),showGrid:this.getOptionValue("showGrid",!1),bgColor:C,titleColor:"#111",textColor:"#111",radiusSize:this.getOptionValue("radiusSize",0)}}init(){this.Style.value=this.extractStyles(),this.applyTheme(),this.Style.value.backgroundColor=this.Style.value.bgColor,w()}}const k=new t(e,"dxf");k.setupLifecycle();const i=k.getStyle(),g=a.ref(null),o=a.ref(null),v=a.ref(""),V=a.ref(""),E=a.ref(!1),w=()=>{var C,F,h;const{conf:m}=e;(F=(C=m==null?void 0:m.options)==null?void 0:C.fileUrl)!=null&&F.value&&(v.value=m.options.fileUrl.value,V.value=((h=m.options.fileName)==null?void 0:h.value)||"")},T=()=>{var m;(m=g.value)==null||m.click()},O=m=>ie(null,null,function*(){var d,_,R;const C=m.target,F=(d=C==null?void 0:C.files)==null?void 0:d[0];if(!F)return;if(!F.name.toLowerCase().endsWith(".dxf")){J.ElMessage.warning("请选择 DXF 文件");return}v.value&&v.value.startsWith("blob:")&&URL.revokeObjectURL(v.value);const h=URL.createObjectURL(F);v.value=h,V.value=F.name;try{E.value=!0;const z=yield Z.fileToDataUrl(F),S=Z.getFileExtension(F.name),L=yield De.api.post("upload",{dashboard_uid:n.pageData.id,file_data:z,file_type:S,user_id:((_=n.session.userInfo)==null?void 0:_.id)||""},!0);if(L.code===200&&((R=L.result)!=null&&R.relative_path)){const W=Fe.FILE_URL+L.result.relative_path;URL.revokeObjectURL(h),v.value=W,e.conf&&e.conf.options&&(e.conf.options.fileUrl||(e.conf.options.fileUrl={value:"",type:"string",label:""}),e.conf.options.fileName||(e.conf.options.fileName={value:"",type:"string",label:""}),e.conf.options.fileUrl.value=W,e.conf.options.fileName.value=L.result.file_name||F.name),J.ElMessage.success("DXF文件上传成功")}else throw new Error(L.msg||"上传失败")}catch(z){console.error("DXF文件上传失败:",z),J.ElMessage.error("DXF文件上传失败: "+((z==null?void 0:z.message)||"未知错误"))}finally{E.value=!1,g.value&&(g.value.value="")}}),H=()=>{v.value&&URL.revokeObjectURL(v.value),v.value="",V.value="",setTimeout(()=>{T()},100)},D=m=>{console.log("DXF 文件加载成功:",m)},I=m=>{console.error("DXF 文件加载失败:",m),J.ElMessage.error("DXF 文件加载失败: "+((m==null?void 0:m.message)||"未知错误"))},x=m=>{m.preventDefault(),m.stopPropagation()},U=m=>{var h;m.preventDefault(),m.stopPropagation();const F=(h=m.dataTransfer)==null?void 0:h.files;if(F&&F.length>0){const d=F[0];if(d.name.toLowerCase().endsWith(".dxf")){if(g.value){const _=new DataTransfer;_.items.add(d),g.value.files=_.files,O({target:g.value})}}else J.ElMessage.warning("请选择 DXF 文件")}};return a.onMounted(()=>{if(e.mode!=="preview"){const m=document.querySelector(".upload-area");m&&(m.addEventListener("dragover",x),m.addEventListener("drop",U))}}),a.onBeforeUnmount(()=>{v.value&&URL.revokeObjectURL(v.value);const m=document.querySelector(".upload-area");m&&(m.removeEventListener("dragover",x),m.removeEventListener("drop",U))}),(m,C)=>(a.openBlock(),a.createElementBlock("div",{class:"mix-component",style:a.normalizeStyle({borderRadius:`${a.unref(i).radiusSize}px`})},[a.createElementVNode("div",Yt,[v.value?(a.openBlock(),a.createElementBlock("div",Jt,[e.mode!=="preview"?(a.openBlock(),a.createElementBlock("div",Qt,[a.createElementVNode("span",en,a.toDisplayString(V.value),1),a.createElementVNode("button",{class:"change-file-btn",onClick:H,title:"更换文件"},[...C[2]||(C[2]=[a.createElementVNode("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},[a.createElementVNode("path",{d:"M12,6V9L16,5L12,1V4A8,8 0 0,0 4,12C4,13.57 4.46,15.03 5.24,16.26L6.7,14.8C6.25,13.97 6,13 6,12A6,6 0 0,1 12,6M18.76,7.74L17.3,9.2C17.74,10.04 18,11 18,12A6,6 0 0,1 12,18V15L8,19L12,23V20A8,8 0 0,0 20,12C20,10.43 19.54,8.97 18.76,7.74Z"})],-1)])])])):a.createCommentVNode("",!0),a.createVNode(a.unref(_t),{ref_key:"viewerRef",ref:o,"dxf-url":v.value,width:"100%",height:"100%","background-color":a.unref(i).backgroundColor,"line-color":a.unref(i).lineColor,"line-width":a.unref(i).lineWidth,"show-toolbar":a.unref(i).showToolbar,"show-info":a.unref(i).showInfo,"show-grid":a.unref(i).showGrid,onLoad:D,onError:I},null,8,["dxf-url","background-color","line-color","line-width","show-toolbar","show-info","show-grid"])])):(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["upload-area",{"preview-mode":e.mode==="preview"}]),onClick:C[0]||(C[0]=F=>e.mode!=="preview"&&T())},[a.createElementVNode("input",{ref_key:"fileInputRef",ref:g,type:"file",accept:".dxf",onChange:O,style:{display:"none"}},null,544),a.createElementVNode("div",Zt,[(a.openBlock(),a.createElementBlock("svg",jt,[...C[1]||(C[1]=[a.createElementVNode("path",{d:"M9,16V10H5L12,3L19,10H15V16H9M5,20V18H19V20H5Z"},null,-1)])])),a.createElementVNode("p",qt,a.toDisplayString(e.mode==="preview"?m.$t("component.dxf.noFile"):m.$t("component.dxf.uploadText")),1),e.mode!=="preview"?(a.openBlock(),a.createElementBlock("p",Kt,a.toDisplayString(m.$t("component.dxf.uploadHint")),1)):a.createCommentVNode("",!0)])],2))]),a.renderSlot(m.$slots,"default",{},void 0,!0)],4))}})),un=Z._export_sfc(cn,[["__scopeId","data-v-b94225c8"]]);exports.default=un;
1
+ "use strict";var Ce=Object.defineProperty,_e=Object.defineProperties;var Le=Object.getOwnPropertyDescriptors;var fe=Object.getOwnPropertySymbols;var Ne=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable;var pe=(s,n,e)=>n in s?Ce(s,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[n]=e,le=(s,n)=>{for(var e in n||(n={}))Ne.call(n,e)&&pe(s,e,n[e]);if(fe)for(var e of fe(n))Pe.call(n,e)&&pe(s,e,n[e]);return s},se=(s,n)=>_e(s,Le(n));var ie=(s,n,e)=>new Promise((t,k)=>{var i=v=>{try{o(e.next(v))}catch(V){k(V)}},g=v=>{try{o(e.throw(v))}catch(V){k(V)}},o=v=>v.done?t(v.value):Promise.resolve(v.value).then(i,g);o((e=e.apply(s,n)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),Z=require("./index-ZwyqrmaH.cjs"),c=require("./three.module-DNVo041Q.cjs"),Se=require("./element-resize-detector-DYs3pJPp.cjs"),De=require("./api-nw_9niqv.cjs"),Fe=require("./config-DbZfhrwE.cjs"),J=require("element-plus"),Be=require("./store-ByTYoqyI.cjs"),Ae=a.defineComponent({__name:"Button",emits:["click"],setup(s,{emit:n}){const e=n,t=k=>{e("click",k)};return(k,i)=>(a.openBlock(),a.createElementBlock("button",{class:"my-button",onClick:t},[a.renderSlot(k.$slots,"default",{},void 0,!0)]))}}),ve=Z._export_sfc(Ae,[["__scopeId","data-v-01de59b5"]]);ve.install=s=>{s.component("MyButton",ve)};const Te={class:"my-input-wrapper"},Me=["type","placeholder","disabled","value"],Ie=a.defineComponent({__name:"Input",props:{modelValue:{},type:{default:"text"},placeholder:{},disabled:{type:Boolean,default:!1},size:{default:"default"}},emits:["update:modelValue","focus","blur"],setup(s,{emit:n}){const e=s,t=n,k=a.computed(()=>[{[`my-input--${e.size}`]:e.size!=="default","is-disabled":e.disabled}]),i=v=>{const V=v.target;t("update:modelValue",V.value)},g=v=>{t("focus",v)},o=v=>{t("blur",v)};return(v,V)=>(a.openBlock(),a.createElementBlock("div",Te,[a.createElementVNode("input",{class:a.normalizeClass(["my-input",k.value]),type:s.type,placeholder:s.placeholder,disabled:s.disabled,value:s.modelValue,onInput:i,onFocus:g,onBlur:o},null,42,Me)]))}}),he=Z._export_sfc(Ie,[["__scopeId","data-v-658697aa"]]);he.install=s=>{s.component("MyInput",he)};const Oe={key:0,class:"my-card__header"},He={class:"my-card__body"},Re={key:1,class:"my-card__footer"},ze=a.defineComponent({__name:"Card",props:{header:{},shadow:{default:"always"}},setup(s){const n=s,e=a.computed(()=>[`my-card--shadow-${n.shadow}`]);return(t,k)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["my-card",e.value])},[t.$slots.header||s.header?(a.openBlock(),a.createElementBlock("div",Oe,[a.renderSlot(t.$slots,"header",{},()=>[a.createTextVNode(a.toDisplayString(s.header),1)],!0)])):a.createCommentVNode("",!0),a.createElementVNode("div",He,[a.renderSlot(t.$slots,"default",{},void 0,!0)]),t.$slots.footer?(a.openBlock(),a.createElementBlock("div",Re,[a.renderSlot(t.$slots,"footer",{},void 0,!0)])):a.createCommentVNode("",!0)],2))}}),ge=Z._export_sfc(ze,[["__scopeId","data-v-33b37710"]]);ge.install=s=>{s.component("MyCard",ge)};class $e{constructor(n){this._pointer=0,this._eof=!1,this._data=n}next(){if(!this.hasNext())throw this._eof?new Error("Cannot call 'next' after EOF group has been read"):new Error("Unexpected end of input: EOF group not read before end of file. Ended on code "+this._data[this._pointer]);const n={code:parseInt(this._data[this._pointer])};return this._pointer++,n.value=be(n.code,this._data[this._pointer].trim()),this._pointer++,n.code===0&&n.value==="EOF"&&(this._eof=!0),this.lastReadGroup=n,n}peek(){if(!this.hasNext())throw this._eof?new Error("Cannot call 'next' after EOF group has been read"):new Error("Unexpected end of input: EOF group not read before end of file. Ended on code "+this._data[this._pointer]);const n={code:parseInt(this._data[this._pointer])};return n.value=be(n.code,this._data[this._pointer+1].trim()),n}rewind(n=1){this._pointer=this._pointer-n*2}hasNext(){return!(this._eof||this._pointer>this._data.length-2)}isEOF(){return this._eof}}function be(s,n){return s<=9?n:s>=10&&s<=59?parseFloat(n):s>=60&&s<=99?parseInt(n):s>=100&&s<=109?n:s>=110&&s<=149?parseFloat(n):s>=160&&s<=179?parseInt(n):s>=210&&s<=239?parseFloat(n):s>=270&&s<=289?parseInt(n):s>=290&&s<=299?Ge(n):s>=300&&s<=369?n:s>=370&&s<=389?parseInt(n):s>=390&&s<=399?n:s>=400&&s<=409?parseInt(n):s>=410&&s<=419?n:s>=420&&s<=429?parseInt(n):s>=430&&s<=439?n:s>=440&&s<=459?parseInt(n):s>=460&&s<=469?parseFloat(n):s>=470&&s<=481||s===999||s>=1e3&&s<=1009?n:s>=1010&&s<=1059?parseFloat(n):s>=1060&&s<=1071?parseInt(n):(console.log("WARNING: Group code does not have a defined type: %j",{code:s,value:n}),n)}function Ge(s){if(s==="0")return!1;if(s==="1")return!0;throw TypeError("String '"+s+"' cannot be cast to Boolean type")}const ke=[0,16711680,16776960,65280,65535,255,16711935,16777215,8421504,12632256,16711680,16744319,13369344,13395558,10027008,10046540,8323072,8339263,4980736,4990502,16727808,16752511,13382400,13401958,10036736,10051404,8331008,8343359,4985600,4992806,16744192,16760703,13395456,13408614,10046464,10056268,8339200,8347455,4990464,4995366,16760576,16768895,13408512,13415014,10056192,10061132,8347392,8351551,4995328,4997670,16776960,16777087,13421568,13421670,10000384,10000460,8355584,8355647,5000192,5000230,12582656,14679935,10079232,11717734,7510016,8755276,6258432,7307071,3755008,4344870,8388352,12582783,6736896,10079334,5019648,7510092,4161280,6258495,2509824,3755046,4194048,10485631,3394560,8375398,2529280,6264908,2064128,5209919,1264640,3099686,65280,8388479,52224,6736998,38912,5019724,32512,4161343,19456,2509862,65343,8388511,52275,6737023,38950,5019743,32543,4161359,19475,2509871,65407,8388543,52326,6737049,38988,5019762,32575,4161375,19494,2509881,65471,8388575,52377,6737074,39026,5019781,32607,4161391,19513,2509890,65535,8388607,52428,6737100,39064,5019800,32639,4161407,19532,2509900,49151,8380415,39372,6730444,29336,5014936,24447,4157311,14668,2507340,32767,8372223,26316,6724044,19608,5010072,16255,4153215,9804,2505036,16383,8364031,13260,6717388,9880,5005208,8063,4149119,4940,2502476,255,8355839,204,6710988,152,5000344,127,4145023,76,2500172,4129023,10452991,3342540,8349388,2490520,6245528,2031743,5193599,1245260,3089996,8323327,12550143,6684876,10053324,4980888,7490712,4128895,6242175,2490444,3745356,12517631,14647295,10027212,11691724,7471256,8735896,6226047,7290751,3735628,4335180,16711935,16744447,13369548,13395660,9961624,9981080,8323199,8339327,4980812,4990540,16711871,16744415,13369497,13395634,9961586,9981061,8323167,8339311,4980793,4990530,16711807,16744383,13369446,13395609,9961548,9981042,8323135,8339295,4980774,4990521,16711743,16744351,13369395,13395583,9961510,9981023,8323103,8339279,4980755,4990511,3355443,5987163,8684676,11382189,14079702,16777215];function Ue(s){return ke[s]}function P(s){const n={};s.rewind();let e=s.next(),t=e.code;if(n.x=e.value,t+=10,e=s.next(),e.code!=t)throw new Error("Expected code for point value to be "+t+" but got "+e.code+".");return n.y=e.value,t+=10,e=s.next(),e.code!=t?(s.rewind(),n):(n.z=e.value,n)}function G(s,n,e){switch(n.code){case 0:s.type=n.value;break;case 5:s.handle=n.value;break;case 6:s.lineType=n.value;break;case 8:s.layer=n.value;break;case 48:s.lineTypeScale=n.value;break;case 60:s.visible=n.value===0;break;case 62:s.colorIndex=n.value,s.color=Ue(Math.abs(n.value));break;case 67:s.inPaperSpace=n.value!==0;break;case 100:break;case 101:for(;n.code!=0;)n=e.next();e.rewind();break;case 330:s.ownerHandle=n.value;break;case 347:s.materialObjectHandle=n.value;break;case 370:s.lineweight=n.value;break;case 420:s.color=n.value;break;case 1e3:s.extendedData=s.extendedData||{},s.extendedData.customStrings=s.extendedData.customStrings||[],s.extendedData.customStrings.push(n.value);break;case 1001:s.extendedData=s.extendedData||{},s.extendedData.applicationName=n.value;break;default:return!1}return!0}class We{constructor(){this.ForEntityName="3DFACE"}parseEntity(n,e){const t={type:e.value,vertices:[]};for(e=n.next();!n.isEOF()&&e.code!==0;){switch(e.code){case 70:t.shape=(e.value&1)===1,t.hasContinuousLinetypePattern=(e.value&128)===128;break;case 10:t.vertices=Xe(n,e),e=n.lastReadGroup;break;default:G(t,e,n);break}e=n.next()}return t}}function Xe(s,n){var e=[],t=!1,k=!1,i=4;for(let o=0;o<=i;o++){for(var g={};!s.isEOF()&&!(n.code===0||k);){switch(n.code){case 10:case 11:case 12:case 13:if(t){k=!0;continue}g.x=n.value,t=!0;break;case 20:case 21:case 22:case 23:g.y=n.value;break;case 30:case 31:case 32:case 33:g.z=n.value;break;default:return e}n=s.next()}e.push(g),t=!1,k=!1}return s.rewind(),e}class Ye{constructor(){this.ForEntityName="ARC"}parseEntity(n,e){const t={type:e.value};for(e=n.next();!n.isEOF()&&e.code!==0;){switch(e.code){case 10:t.center=P(n);break;case 40:t.radius=e.value;break;case 50:t.startAngle=Math.PI/180*e.value;break;case 51:t.endAngle=Math.PI/180*e.value,t.angleLength=t.endAngle-t.startAngle;break;case 210:t.extrusionDirectionX=e.value;break;case 220:t.extrusionDirectionY=e.value;break;case 230:t.extrusionDirectionZ=e.value;break;default:G(t,e,n);break}e=n.next()}return t}}class Ze{constructor(){this.ForEntityName="ATTDEF"}parseEntity(n,e){var t={type:e.value,scale:1,textStyle:"STANDARD"};for(e=n.next();!n.isEOF()&&e.code!==0;){switch(e.code){case 1:t.text=e.value;break;case 2:t.tag=e.value;break;case 3:t.prompt=e.value;break;case 7:t.textStyle=e.value;break;case 10:t.startPoint=P(n);break;case 11:t.endPoint=P(n);break;case 39:t.thickness=e.value;break;case 40:t.textHeight=e.value;break;case 41:t.scale=e.value;break;case 50:t.rotation=e.value;break;case 51:t.obliqueAngle=e.value;break;case 70:t.invisible=!!(e.value&1),t.constant=!!(e.value&2),t.verificationRequired=!!(e.value&4),t.preset=!!(e.value&8);break;case 71:t.backwards=!!(e.value&2),t.mirrored=!!(e.value&4);break;case 72:t.horizontalJustification=e.value;break;case 73:t.fieldLength=e.value;break;case 74:t.verticalJustification=e.value;break;case 100:break;case 210:t.extrusionDirectionX=e.value;break;case 220:t.extrusionDirectionY=e.value;break;case 230:t.extrusionDirectionZ=e.value;break;default:G(t,e,n);break}e=n.next()}return t}}class je{constructor(){this.ForEntityName="CIRCLE"}parseEntity(n,e){const t={type:e.value};for(e=n.next();!n.isEOF()&&e.code!==0;){switch(e.code){case 10:t.center=P(n);break;case 40:t.radius=e.value;break;case 50:t.startAngle=Math.PI/180*e.value;break;case 51:const k=Math.PI/180*e.value;k<t.startAngle?t.angleLength=k+2*Math.PI-t.startAngle:t.angleLength=k-t.startAngle,t.endAngle=k;break;default:G(t,e,n);break}e=n.next()}return t}}class qe{constructor(){this.ForEntityName="DIMENSION"}parseEntity(n,e){const t={type:e.value};for(e=n.next();!n.isEOF()&&e.code!==0;){switch(e.code){case 2:t.block=e.value;break;case 10:t.anchorPoint=P(n);break;case 11:t.middleOfText=P(n);break;case 12:t.insertionPoint=P(n);break;case 13:t.linearOrAngularPoint1=P(n);break;case 14:t.linearOrAngularPoint2=P(n);break;case 15:t.diameterOrRadiusPoint=P(n);break;case 16:t.arcPoint=P(n);break;case 70:t.dimensionType=e.value;break;case 71:t.attachmentPoint=e.value;break;case 42:t.actualMeasurement=e.value;break;case 1:t.text=e.value;break;case 50:t.angle=e.value;break;default:G(t,e,n);break}e=n.next()}return t}}class Ke{constructor(){this.ForEntityName="ELLIPSE"}parseEntity(n,e){const t={type:e.value};for(e=n.next();!n.isEOF()&&e.code!==0;){switch(e.code){case 10:t.center=P(n);break;case 11:t.majorAxisEndPoint=P(n);break;case 40:t.axisRatio=e.value;break;case 41:t.startAngle=e.value;break;case 42:t.endAngle=e.value;break;case 2:t.name=e.value;break;default:G(t,e,n);break}e=n.next()}return t}}class Je{constructor(){this.ForEntityName="INSERT"}parseEntity(n,e){const t={type:e.value};for(e=n.next();!n.isEOF()&&e.code!==0;){switch(e.code){case 2:t.name=e.value;break;case 41:t.xScale=e.value;break;case 42:t.yScale=e.value;break;case 43:t.zScale=e.value;break;case 10:t.position=P(n);break;case 50:t.rotation=e.value;break;case 70:t.columnCount=e.value;break;case 71:t.rowCount=e.value;break;case 44:t.columnSpacing=e.value;break;case 45:t.rowSpacing=e.value;break;case 210:t.extrusionDirection=P(n);break;default:G(t,e,n);break}e=n.next()}return t}}class Qe{constructor(){this.ForEntityName="LINE"}parseEntity(n,e){const t={type:e.value,vertices:[]};for(e=n.next();!n.isEOF()&&e.code!==0;){switch(e.code){case 10:t.vertices.unshift(P(n));break;case 11:t.vertices.push(P(n));break;case 210:t.extrusionDirection=P(n);break;case 100:break;default:G(t,e,n);break}e=n.next()}return t}}class et{constructor(){this.ForEntityName="LWPOLYLINE"}parseEntity(n,e){const t={type:e.value,vertices:[]};let k=0;for(e=n.next();!n.isEOF()&&e.code!==0;){switch(e.code){case 38:t.elevation=e.value;break;case 39:t.depth=e.value;break;case 70:t.shape=(e.value&1)===1,t.hasContinuousLinetypePattern=(e.value&128)===128;break;case 90:k=e.value;break;case 10:t.vertices=tt(k,n);break;case 43:e.value!==0&&(t.width=e.value);break;case 210:t.extrusionDirectionX=e.value;break;case 220:t.extrusionDirectionY=e.value;break;case 230:t.extrusionDirectionZ=e.value;break;default:G(t,e,n);break}e=n.next()}return t}}function tt(s,n){if(!s||s<=0)throw Error("n must be greater than 0 verticies");const e=[];let t=!1,k=!1,i=n.lastReadGroup;for(let g=0;g<s;g++){const o={};for(;!n.isEOF()&&!(i.code===0||k);){switch(i.code){case 10:if(t){k=!0;continue}o.x=i.value,t=!0;break;case 20:o.y=i.value;break;case 30:o.z=i.value;break;case 40:o.startWidth=i.value;break;case 41:o.endWidth=i.value;break;case 42:i.value!=0&&(o.bulge=i.value);break;default:return n.rewind(),t&&e.push(o),n.rewind(),e}i=n.next()}e.push(o),t=!1,k=!1}return n.rewind(),e}class nt{constructor(){this.ForEntityName="MTEXT"}parseEntity(n,e){const t={type:e.value};for(e=n.next();!n.isEOF()&&e.code!==0;){switch(e.code){case 3:t.text?t.text+=e.value:t.text=e.value;break;case 1:t.text?t.text+=e.value:t.text=e.value;break;case 10:t.position=P(n);break;case 11:t.directionVector=P(n);break;case 40:t.height=e.value;break;case 41:t.width=e.value;break;case 50:t.rotation=e.value;break;case 71:t.attachmentPoint=e.value;break;case 72:t.drawingDirection=e.value;break;default:G(t,e,n);break}e=n.next()}return t}}class ot{constructor(){this.ForEntityName="POINT"}parseEntity(n,e){const k={type:e.value};for(e=n.next();!n.isEOF()&&e.code!==0;){switch(e.code){case 10:k.position=P(n);break;case 39:k.thickness=e.value;break;case 210:k.extrusionDirection=P(n);break;case 100:break;default:G(k,e,n);break}e=n.next()}return k}}class at{constructor(){this.ForEntityName="VERTEX"}parseEntity(n,e){var t={type:e.value};for(e=n.next();!n.isEOF()&&e.code!==0;){switch(e.code){case 10:t.x=e.value;break;case 20:t.y=e.value;break;case 30:t.z=e.value;break;case 40:break;case 41:break;case 42:e.value!=0&&(t.bulge=e.value);break;case 70:t.curveFittingVertex=(e.value&1)!==0,t.curveFitTangent=(e.value&2)!==0,t.splineVertex=(e.value&8)!==0,t.splineControlPoint=(e.value&16)!==0,t.threeDPolylineVertex=(e.value&32)!==0,t.threeDPolylineMesh=(e.value&64)!==0,t.polyfaceMeshVertex=(e.value&128)!==0;break;case 50:break;case 71:t.faceA=e.value;break;case 72:t.faceB=e.value;break;case 73:t.faceC=e.value;break;case 74:t.faceD=e.value;break;default:G(t,e,n);break}e=n.next()}return t}}class lt{constructor(){this.ForEntityName="POLYLINE"}parseEntity(n,e){var t={type:e.value,vertices:[]};for(e=n.next();!n.isEOF()&&e.code!==0;){switch(e.code){case 10:break;case 20:break;case 30:break;case 39:t.thickness=e.value;break;case 40:break;case 41:break;case 70:t.shape=(e.value&1)!==0,t.includesCurveFitVertices=(e.value&2)!==0,t.includesSplineFitVertices=(e.value&4)!==0,t.is3dPolyline=(e.value&8)!==0,t.is3dPolygonMesh=(e.value&16)!==0,t.is3dPolygonMeshClosed=(e.value&32)!==0,t.isPolyfaceMesh=(e.value&64)!==0,t.hasContinuousLinetypePattern=(e.value&128)!==0;break;case 71:break;case 72:break;case 73:break;case 74:break;case 75:break;case 210:t.extrusionDirection=P(n);break;default:G(t,e,n);break}e=n.next()}return t.vertices=st(n,e),t}}function st(s,n){const e=new at,t=[];for(;!s.isEOF();)if(n.code===0){if(n.value==="VERTEX")t.push(e.parseEntity(s,n)),n=s.lastReadGroup;else if(n.value==="SEQEND"){it(s,n);break}}return t}function it(s,n){const e={type:n.value};for(n=s.next();!s.isEOF()&&n.code!=0;)G(e,n,s),n=s.next();return e}class rt{constructor(){this.ForEntityName="SOLID"}parseEntity(n,e){const t={type:e.value,points:[]};for(e=n.next();!n.isEOF()&&e.code!==0;){switch(e.code){case 10:t.points[0]=P(n);break;case 11:t.points[1]=P(n);break;case 12:t.points[2]=P(n);break;case 13:t.points[3]=P(n);break;case 210:t.extrusionDirection=P(n);break;default:G(t,e,n);break}e=n.next()}return t}}class ct{constructor(){this.ForEntityName="SPLINE"}parseEntity(n,e){const t={type:e.value};for(e=n.next();!n.isEOF()&&e.code!==0;){switch(e.code){case 10:t.controlPoints||(t.controlPoints=[]),t.controlPoints.push(P(n));break;case 11:t.fitPoints||(t.fitPoints=[]),t.fitPoints.push(P(n));break;case 12:t.startTangent=P(n);break;case 13:t.endTangent=P(n);break;case 40:t.knotValues||(t.knotValues=[]),t.knotValues.push(e.value);break;case 70:(e.value&1)!=0&&(t.closed=!0),(e.value&2)!=0&&(t.periodic=!0),(e.value&4)!=0&&(t.rational=!0),(e.value&8)!=0&&(t.planar=!0),(e.value&16)!=0&&(t.planar=!0,t.linear=!0);break;case 71:t.degreeOfSplineCurve=e.value;break;case 72:t.numberOfKnots=e.value;break;case 73:t.numberOfControlPoints=e.value;break;case 74:t.numberOfFitPoints=e.value;break;case 210:t.normalVector=P(n);break;default:G(t,e,n);break}e=n.next()}return t}}class ut{constructor(){this.ForEntityName="TEXT"}parseEntity(n,e){const t={type:e.value};for(e=n.next();!n.isEOF()&&e.code!==0;){switch(e.code){case 10:t.startPoint=P(n);break;case 11:t.endPoint=P(n);break;case 40:t.textHeight=e.value;break;case 41:t.xScale=e.value;break;case 50:t.rotation=e.value;break;case 1:t.text=e.value;break;case 72:t.halign=e.value;break;case 73:t.valign=e.value;break;default:G(t,e,n);break}e=n.next()}return t}}var te={exports:{}},dt=te.exports,me;function ft(){return me||(me=1,(function(s){(function(n,e){s.exports?s.exports=e():n.log=e()})(dt,function(){var n=function(){},e="undefined",t=typeof window!==e&&typeof window.navigator!==e&&/Trident\/|MSIE /.test(window.navigator.userAgent),k=["trace","debug","info","warn","error"],i={},g=null;function o(D,I){var x=D[I];if(typeof x.bind=="function")return x.bind(D);try{return Function.prototype.bind.call(x,D)}catch(U){return function(){return Function.prototype.apply.apply(x,[D,arguments])}}}function v(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function V(D){return D==="debug"&&(D="log"),typeof console===e?!1:D==="trace"&&t?v:console[D]!==void 0?o(console,D):console.log!==void 0?o(console,"log"):n}function E(){for(var D=this.getLevel(),I=0;I<k.length;I++){var x=k[I];this[x]=I<D?n:this.methodFactory(x,D,this.name)}if(this.log=this.debug,typeof console===e&&D<this.levels.SILENT)return"No console available for logging"}function w(D){return function(){typeof console!==e&&(E.call(this),this[D].apply(this,arguments))}}function T(D,I,x){return V(D)||w.apply(this,arguments)}function O(D,I){var x=this,U,m,C,F="loglevel";typeof D=="string"?F+=":"+D:typeof D=="symbol"&&(F=void 0);function h(S){var L=(k[S]||"silent").toUpperCase();if(!(typeof window===e||!F)){try{window.localStorage[F]=L;return}catch(W){}try{window.document.cookie=encodeURIComponent(F)+"="+L+";"}catch(W){}}}function d(){var S;if(!(typeof window===e||!F)){try{S=window.localStorage[F]}catch(Q){}if(typeof S===e)try{var L=window.document.cookie,W=encodeURIComponent(F),K=L.indexOf(W+"=");K!==-1&&(S=/^([^;]+)/.exec(L.slice(K+W.length+1))[1])}catch(Q){}return x.levels[S]===void 0&&(S=void 0),S}}function _(){if(!(typeof window===e||!F)){try{window.localStorage.removeItem(F)}catch(S){}try{window.document.cookie=encodeURIComponent(F)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(S){}}}function R(S){var L=S;if(typeof L=="string"&&x.levels[L.toUpperCase()]!==void 0&&(L=x.levels[L.toUpperCase()]),typeof L=="number"&&L>=0&&L<=x.levels.SILENT)return L;throw new TypeError("log.setLevel() called with invalid level: "+S)}x.name=D,x.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},x.methodFactory=I||T,x.getLevel=function(){return C!=null?C:m!=null?m:U},x.setLevel=function(S,L){return C=R(S),L!==!1&&h(C),E.call(x)},x.setDefaultLevel=function(S){m=R(S),d()||x.setLevel(S,!1)},x.resetLevel=function(){C=null,_(),E.call(x)},x.enableAll=function(S){x.setLevel(x.levels.TRACE,S)},x.disableAll=function(S){x.setLevel(x.levels.SILENT,S)},x.rebuild=function(){if(g!==x&&(U=R(g.getLevel())),E.call(x),g===x)for(var S in i)i[S].rebuild()},U=R(g?g.getLevel():"WARN");var z=d();z!=null&&(C=R(z)),E.call(x)}g=new O,g.getLogger=function(I){if(typeof I!="symbol"&&typeof I!="string"||I==="")throw new TypeError("You must supply a name when creating a logger.");var x=i[I];return x||(x=i[I]=new O(I,g.methodFactory)),x};var H=typeof window!==e?window.log:void 0;return g.noConflict=function(){return typeof window!==e&&window.log===g&&(window.log=H),g},g.getLoggers=function(){return i},g.default=g,g})})(te)),te.exports}var pt=ft();const N=Z.getDefaultExportFromCjs(pt);N.setLevel("error");function vt(s){s.registerEntityHandler(We),s.registerEntityHandler(Ye),s.registerEntityHandler(Ze),s.registerEntityHandler(je),s.registerEntityHandler(qe),s.registerEntityHandler(Ke),s.registerEntityHandler(Je),s.registerEntityHandler(Qe),s.registerEntityHandler(et),s.registerEntityHandler(nt),s.registerEntityHandler(ot),s.registerEntityHandler(lt),s.registerEntityHandler(rt),s.registerEntityHandler(ct),s.registerEntityHandler(ut)}class ht{constructor(){this._entityHandlers={},vt(this)}parse(n){return typeof n=="string"?this._parse(n):(console.error("Cannot read dxf source of type `"+typeof n),null)}registerEntityHandler(n){const e=new n;this._entityHandlers[e.ForEntityName]=e}parseSync(n){return this.parse(n)}parseStream(n){let e="";const t=this;return new Promise((k,i)=>{n.on("data",g=>{e+=g}),n.on("end",()=>{try{k(t._parse(e))}catch(g){i(g)}}),n.on("error",g=>{i(g)})})}_parse(n){const e={};let t=0;const k=n.split(/\r\n|\r|\n/g),i=new $e(k);if(!i.hasNext())throw Error("Empty file");const g=this;let o;function v(){for(o=i.next();!i.isEOF();)if(o.code===0&&o.value==="SECTION"){if(o=i.next(),o.code!==2){console.error("Unexpected code %s after 0:SECTION",xe(o)),o=i.next();continue}o.value==="HEADER"?(N.debug("> HEADER"),e.header=V(),N.debug("<")):o.value==="BLOCKS"?(N.debug("> BLOCKS"),e.blocks=E(),N.debug("<")):o.value==="ENTITIES"?(N.debug("> ENTITIES"),e.entities=m(!1),N.debug("<")):o.value==="TABLES"?(N.debug("> TABLES"),e.tables=T(),N.debug("<")):o.value==="EOF"?N.debug("EOF"):N.warn("Skipping section '%s'",o.value)}else o=i.next()}function V(){let h=null,d=null;const _={};for(o=i.next();;){if(Y(o,0,"ENDSEC")){h&&(_[h]=d);break}else o.code===9?(h&&(_[h]=d),h=o.value):o.code===10?d={x:o.value}:o.code===20?d.y=o.value:o.code===30?d.z=o.value:d=o.value;o=i.next()}return o=i.next(),_}function E(){const h={};for(o=i.next();o.value!=="EOF"&&!Y(o,0,"ENDSEC");)if(Y(o,0,"BLOCK")){N.debug("block {");const d=w();N.debug("}"),F(d),d.name?h[d.name]=d:N.error('block with handle "'+d.handle+'" is missing a name.')}else q(o),o=i.next();return h}function w(){const h={};for(o=i.next();o.value!=="EOF";){switch(o.code){case 1:h.xrefPath=o.value,o=i.next();break;case 2:h.name=o.value,o=i.next();break;case 3:h.name2=o.value,o=i.next();break;case 5:h.handle=o.value,o=i.next();break;case 8:h.layer=o.value,o=i.next();break;case 10:h.position=C(o),o=i.next();break;case 67:h.paperSpace=!!(o.value&&o.value==1),o=i.next();break;case 70:o.value!=0&&(h.type=o.value),o=i.next();break;case 100:o=i.next();break;case 330:h.ownerHandle=o.value,o=i.next();break;case 0:if(o.value=="ENDBLK")break;h.entities=m(!0);break;default:q(o),o=i.next()}if(Y(o,0,"ENDBLK")){o=i.next();break}}return h}function T(){const h={};for(o=i.next();o.value!=="EOF"&&!Y(o,0,"ENDSEC");)Y(o,0,"TABLE")?(o=i.next(),U[o.value]?(N.debug(o.value+" Table {"),h[U[o.value].tableName]=H(o),N.debug("}")):N.debug("Unhandled Table "+o.value)):o=i.next();return o=i.next(),h}const O="ENDTAB";function H(h){const d=U[h.value],_={};let R=0;for(o=i.next();!Y(o,0,O);)switch(o.code){case 5:_.handle=o.value,o=i.next();break;case 330:_.ownerHandle=o.value,o=i.next();break;case 100:o.value==="AcDbSymbolTable"||q(o),o=i.next();break;case 70:R=o.value,o=i.next();break;case 0:o.value===d.dxfSymbolName?_[d.tableRecordsProperty]=d.parseTableRecords():(q(o),o=i.next());break;default:q(o),o=i.next()}const z=_[d.tableRecordsProperty];if(z){let S=(()=>{if(z.constructor===Array)return z.length;if(typeof z=="object")return Object.keys(z).length})();R!==S&&N.warn("Parsed "+S+" "+d.dxfSymbolName+"'s but expected "+R)}return o=i.next(),_}function D(){const h=[];let d={};for(N.debug("ViewPort {"),o=i.next();!Y(o,0,O);)switch(o.code){case 2:d.name=o.value,o=i.next();break;case 10:d.lowerLeftCorner=C(o),o=i.next();break;case 11:d.upperRightCorner=C(o),o=i.next();break;case 12:d.center=C(o),o=i.next();break;case 13:d.snapBasePoint=C(o),o=i.next();break;case 14:d.snapSpacing=C(o),o=i.next();break;case 15:d.gridSpacing=C(o),o=i.next();break;case 16:d.viewDirectionFromTarget=C(o),o=i.next();break;case 17:d.viewTarget=C(o),o=i.next();break;case 42:d.lensLength=o.value,o=i.next();break;case 43:d.frontClippingPlane=o.value,o=i.next();break;case 44:d.backClippingPlane=o.value,o=i.next();break;case 45:d.viewHeight=o.value,o=i.next();break;case 50:d.snapRotationAngle=o.value,o=i.next();break;case 51:d.viewTwistAngle=o.value,o=i.next();break;case 79:d.orthographicType=o.value,o=i.next();break;case 110:d.ucsOrigin=C(o),o=i.next();break;case 111:d.ucsXAxis=C(o),o=i.next();break;case 112:d.ucsYAxis=C(o),o=i.next();break;case 110:d.ucsOrigin=C(o),o=i.next();break;case 281:d.renderMode=o.value,o=i.next();break;case 281:d.defaultLightingType=o.value,o=i.next();break;case 292:d.defaultLightingOn=o.value,o=i.next();break;case 330:d.ownerHandle=o.value,o=i.next();break;case 63:case 421:case 431:d.ambientColor=o.value,o=i.next();break;case 0:o.value==="VPORT"&&(N.debug("}"),h.push(d),N.debug("ViewPort {"),d={},o=i.next());break;default:q(o),o=i.next();break}return N.debug("}"),h.push(d),h}function I(){const h={};let d={},_=0,R;for(N.debug("LType {"),o=i.next();!Y(o,0,"ENDTAB");)switch(o.code){case 2:d.name=o.value,R=o.value,o=i.next();break;case 3:d.description=o.value,o=i.next();break;case 73:_=o.value,_>0&&(d.pattern=[]),o=i.next();break;case 40:d.patternLength=o.value,o=i.next();break;case 49:d.pattern.push(o.value),o=i.next();break;case 0:N.debug("}"),_>0&&_!==d.pattern.length&&N.warn("lengths do not match on LTYPE pattern"),h[R]=d,d={},N.debug("LType {"),o=i.next();break;default:o=i.next()}return N.debug("}"),h[R]=d,h}function x(){const h={};let d={},_;for(N.debug("Layer {"),o=i.next();!Y(o,0,"ENDTAB");)switch(o.code){case 2:d.name=o.value,_=o.value,o=i.next();break;case 62:d.visible=o.value>=0,d.colorIndex=Math.abs(o.value),d.color=gt(d.colorIndex),o=i.next();break;case 70:d.frozen=(o.value&1)!=0||(o.value&2)!=0,o=i.next();break;case 0:o.value==="LAYER"&&(N.debug("}"),h[_]=d,N.debug("Layer {"),d={},_=void 0,o=i.next());break;default:q(o),o=i.next();break}return N.debug("}"),h[_]=d,h}const U={VPORT:{tableRecordsProperty:"viewPorts",tableName:"viewPort",dxfSymbolName:"VPORT",parseTableRecords:D},LTYPE:{tableRecordsProperty:"lineTypes",tableName:"lineType",dxfSymbolName:"LTYPE",parseTableRecords:I},LAYER:{tableRecordsProperty:"layers",tableName:"layer",dxfSymbolName:"LAYER",parseTableRecords:x}};function m(h){const d=[],_=h?"ENDBLK":"ENDSEC";for(h||(o=i.next());;)if(o.code===0){if(o.value===_)break;const R=g._entityHandlers[o.value];if(R!=null){N.debug(o.value+" {");const z=R.parseEntity(i,o);o=i.lastReadGroup,N.debug("}"),F(z),d.push(z)}else{N.warn("Unhandled entity "+o.value),o=i.next();continue}}else o=i.next();return _=="ENDSEC"&&(o=i.next()),d}function C(h){const d={};let _=h.code;if(d.x=h.value,_+=10,h=i.next(),h.code!=_)throw new Error("Expected code for point value to be "+_+" but got "+h.code+".");return d.y=h.value,_+=10,h=i.next(),h.code!=_?(i.rewind(),d):(d.z=h.value,d)}function F(h){if(!h)throw new TypeError("entity cannot be undefined or null");h.handle||(h.handle=t++)}return v(),e}}function Y(s,n,e){return s.code===n&&s.value===e}function q(s){N.debug("unhandled group "+xe(s))}function xe(s){return s.code+":"+s.value}function gt(s){return ke[s]}const bt={key:0,class:"my-dxf-viewer__toolbar"},mt={key:0,class:"my-dxf-viewer__loading"},wt={key:1,class:"my-dxf-viewer__error"},kt={key:2,class:"my-dxf-viewer__empty"},xt={key:1,class:"my-dxf-viewer__info"},yt={class:"my-dxf-viewer__info-item"},Et={class:"my-dxf-viewer__info-item"},Vt={class:"my-dxf-viewer__info-item"},Ct=a.defineComponent({__name:"DxfViewer",props:{dxfUrl:{},dxfData:{},width:{default:"100%"},height:{default:"500px"},backgroundColor:{default:"#ffffff"},lineColor:{default:"#000000"},lineWidth:{default:1},showToolbar:{type:Boolean,default:!0},showInfo:{type:Boolean,default:!0},showGrid:{type:Boolean,default:!1},emptyText:{default:"请加载 DXF 文件"}},emits:["load","error"],setup(s,{expose:n,emit:e}){const t=s,k=e,i=a.ref(null),g=a.ref(null),o=a.ref(!1),v=a.ref(""),V=a.ref(null);let E=null,w=null,T=null,O=null,H=null;const D=a.ref(1),I=a.ref({x:0,y:0}),x=a.ref(!1),U=a.ref({x:0,y:0});let m=null;const C=a.computed(()=>({"my-dxf-viewer--loading":o.value,"my-dxf-viewer--error":!!v.value})),F=a.computed(()=>{var l,u,y;return(y=(u=(l=V.value)==null?void 0:l.tables)==null?void 0:u.layer)!=null&&y.layers?Object.keys(V.value.tables.layer.layers).length:0}),h=a.computed(()=>{var l;return(l=V.value)!=null&&l.entities?V.value.entities.length:0}),d=a.computed(()=>{var B;if(!((B=V.value)!=null&&B.header))return"-";const l=V.value.header.$EXTMIN,u=V.value.header.$EXTMAX;if(!l||!u)return"-";const y=(u.x-l.x).toFixed(2),M=(u.y-l.y).toFixed(2);return`${y} × ${M}`}),_=()=>{if(!g.value)return;const l=g.value,u=l.clientWidth,y=l.clientHeight;E=new c.Scene,E.background=new c.Color(t.backgroundColor);const M=u/y,B=1e3;w=new c.OrthographicCamera(-B*M,B*M,B,-B,.1,1e4),w.position.z=100,w.lookAt(0,0,0),T=new c.WebGLRenderer({antialias:!0}),T.setSize(u,y),T.setPixelRatio(window.devicePixelRatio),l.appendChild(T.domElement),O=new c.Group,E.add(O),Q()},R=(l,u)=>{if(!E)return;H&&(E.remove(H),H=null);const y=l||2e4,M=50;H=new c.GridHelper(y,M,4079170,2763306),H.rotation.x=Math.PI/2,u&&H.position.set(u.x,u.y,-.1),H.visible=t.showGrid,E.add(H)},z=l=>ie(null,null,function*(){if(l){o.value=!0,v.value="",V.value=null;try{const u=yield fetch(l);if(!u.ok)throw new Error(`HTTP ${u.status}: ${u.statusText}`);const y=yield u.text(),B=new ht().parseSync(y);if(!B)throw new Error("DXF 解析返回空数据");V.value=B,k("load",B),B.entities&&B.entities.length>0?S(B):(console.warn("DXF 文件中没有实体数据"),v.value="DXF 文件中没有可显示的图形")}catch(u){console.error("DXF 加载/解析错误:",u),v.value=u.message||"加载 DXF 文件失败",k("error",v.value)}finally{o.value=!1}}}),S=l=>{if(!E||!O)return;for(;O.children.length>0;)O.remove(O.children[0]);const u=new c.Color(t.lineColor),y=new Set;l.entities&&l.entities.forEach(M=>{y.add(M.type);const B=W(M,u);B&&O.add(B)}),K()},L=(l,u,y)=>{const M=new c.Vector3().subVectors(u,l),B=M.length(),f=t.lineWidth,r=new c.PlaneGeometry(B,f),p=new c.MeshBasicMaterial({color:y,side:c.DoubleSide}),b=new c.Mesh(r,p),A=new c.Vector3().addVectors(l,u).multiplyScalar(.5);b.position.copy(A);const $=Math.atan2(M.y,M.x);return b.rotation.z=$,b},W=(l,u)=>{var M,B;const y=new c.LineBasicMaterial({color:u});try{if(l.type==="LINE"){const f=new c.Vector3(l.vertices[0].x,l.vertices[0].y,l.vertices[0].z||0),r=new c.Vector3(l.vertices[1].x,l.vertices[1].y,l.vertices[1].z||0);if(t.lineWidth>1)return L(f,r,u);{const p=new c.BufferGeometry,b=new Float32Array([f.x,f.y,f.z,r.x,r.y,r.z]);return p.setAttribute("position",new c.BufferAttribute(b,3)),new c.Line(p,y)}}else if(l.type==="LWPOLYLINE"){const f=[];if(l.vertices.forEach(r=>{f.push(new c.Vector3(r.x,r.y,0))}),l.shape&&f.length>0&&f.push(f[0].clone()),t.lineWidth>1&&f.length>1){const r=new c.Group;for(let p=0;p<f.length-1;p++){const b=L(f[p],f[p+1],u);r.add(b)}return r}else{const r=new c.BufferGeometry().setFromPoints(f);return new c.Line(r,y)}}else if(l.type==="POLYLINE"){const f=[];if(l.vertices.forEach(r=>{f.push(new c.Vector3(r.x,r.y,r.z||0))}),t.lineWidth>1&&f.length>1){const r=new c.Group;for(let p=0;p<f.length-1;p++){const b=L(f[p],f[p+1],u);r.add(b)}return r}else{const r=new c.BufferGeometry().setFromPoints(f);return new c.Line(r,y)}}else if(l.type==="CIRCLE"){const f=l.radius,b=new c.EllipseCurve(l.center.x,l.center.y,f,f,0,2*Math.PI,!1,0).getPoints(64);if(t.lineWidth>1){const A=new c.Group;for(let $=0;$<b.length;$++){const X=b[$],j=b[($+1)%b.length],Ve=L(new c.Vector3(X.x,X.y,0),new c.Vector3(j.x,j.y,0),u);A.add(Ve)}return A}else{const A=new c.BufferGeometry().setFromPoints(b);return new c.LineLoop(A,y)}}else if(l.type==="ARC"){const r=new c.EllipseCurve(l.center.x,l.center.y,l.radius,l.radius,l.startAngle,l.endAngle,!1,0).getPoints(50);if(t.lineWidth>1){const p=new c.Group;for(let b=0;b<r.length-1;b++){const A=r[b],$=r[b+1],X=L(new c.Vector3(A.x,A.y,0),new c.Vector3($.x,$.y,0),u);p.add(X)}return p}else{const p=new c.BufferGeometry().setFromPoints(r);return new c.Line(p,y)}}else if(l.type==="SPLINE"){if(l.controlPoints&&l.controlPoints.length>0){const f=[];l.controlPoints.forEach(b=>{f.push(new c.Vector3(b.x,b.y,b.z||0))});const p=new c.CatmullRomCurve3(f).getPoints(50);if(t.lineWidth>1){const b=new c.Group;for(let A=0;A<p.length-1;A++){const $=L(p[A],p[A+1],u);b.add($)}return b}else{const b=new c.BufferGeometry().setFromPoints(p);return new c.Line(b,y)}}}else if(l.type==="ELLIPSE"){const r=new c.EllipseCurve(l.center.x,l.center.y,l.majorAxisEndPoint.x,l.majorAxisEndPoint.y,l.startAngle||0,l.endAngle||Math.PI*2,!1,0).getPoints(64);if(t.lineWidth>1){const p=new c.Group;for(let b=0;b<r.length-1;b++){const A=r[b],$=r[b+1],X=L(new c.Vector3(A.x,A.y,0),new c.Vector3($.x,$.y,0),u);p.add(X)}return p}else{const p=new c.BufferGeometry().setFromPoints(r);return new c.Line(p,y)}}else if(l.type==="POINT"){const f=new c.BufferGeometry,r=new Float32Array([l.position.x,l.position.y,l.position.z||0]);f.setAttribute("position",new c.BufferAttribute(r,3));const p=new c.PointsMaterial({color:u,size:Math.max(t.lineWidth*2,3)});return new c.Points(f,p)}else if(l.type==="TEXT"||l.type==="MTEXT"){const f=l.text||l.string||"";if(!l.startPoint&&!l.position)return null;const r=l.startPoint||l.position,p=l.textHeight||l.height||10,b=new c.CircleGeometry(p*.3,8);b.translate(r.x,r.y,r.z||0);const A=new c.MeshBasicMaterial({color:u,side:c.DoubleSide});return new c.Mesh(b,A)}else if(l.type==="INSERT"){const f=l.name,r=(B=(M=V.value)==null?void 0:M.blocks)==null?void 0:B[f];if(!r||!r.entities||r.entities.length===0)return null;const p=new c.Group,b=l.position||{x:0,y:0,z:0},A=l.xScale!==void 0?{x:l.xScale||1,y:l.yScale||1,z:l.zScale||1}:{x:1,y:1,z:1},$=l.rotation||0;return r.entities.forEach(X=>{const j=W(X,u);j&&(j.position.set(b.x,b.y,b.z||0),j.scale.set(A.x,A.y,A.z),$&&(j.rotation.z=$*Math.PI/180),p.add(j))}),p.children.length>0?p:null}else if(l.type==="DIMENSION"){const f=new c.Group;if(l.definingPoint&&l.anchorPoint){const r=new c.Vector3(l.definingPoint.x,l.definingPoint.y,0),p=new c.Vector3(l.anchorPoint.x,l.anchorPoint.y,0);if(t.lineWidth>1)f.add(L(r,p,u));else{const b=new c.BufferGeometry,A=new Float32Array([r.x,r.y,r.z,p.x,p.y,p.z]);b.setAttribute("position",new c.BufferAttribute(A,3)),f.add(new c.Line(b,y))}}return f.children.length>0?f:null}else if(l.type==="HATCH"){if(l.boundaries&&l.boundaries.length>0){const f=new c.Group;return l.boundaries.forEach(r=>{r.edges&&r.edges.forEach(p=>{const b=W(p,u);b&&f.add(b)})}),f.children.length>0?f:null}return null}else if(l.type==="3DFACE"||l.type==="SOLID"){if(l.vertices&&l.vertices.length>=3){const f=[];if(l.vertices.forEach(r=>{f.push(new c.Vector3(r.x,r.y,r.z||0))}),f.push(f[0].clone()),t.lineWidth>1&&f.length>1){const r=new c.Group;for(let p=0;p<f.length-1;p++){const b=L(f[p],f[p+1],u);r.add(b)}return r}else{const r=new c.BufferGeometry().setFromPoints(f);return new c.Line(r,y)}}}else{if(l.type==="VERTEX"||l.type==="SEQEND")return null;if(l.type==="ATTRIB"||l.type==="ATTDEF")return null;if(l.type==="LEADER"||l.type==="MLEADER"){if(l.vertices&&l.vertices.length>1){const f=[];if(l.vertices.forEach(r=>{f.push(new c.Vector3(r.x,r.y,r.z||0))}),t.lineWidth>1){const r=new c.Group;for(let p=0;p<f.length-1;p++)r.add(L(f[p],f[p+1],u));return r}else{const r=new c.BufferGeometry().setFromPoints(f);return new c.Line(r,y)}}return null}else if(l.type==="RAY"||l.type==="XLINE"){if(l.startPoint&&l.unitDirectionVector){const f=new c.Vector3(l.startPoint.x,l.startPoint.y,l.startPoint.z||0),r=new c.Vector3(l.unitDirectionVector.x,l.unitDirectionVector.y,l.unitDirectionVector.z||0),p=f.clone().add(r.multiplyScalar(1e5));if(t.lineWidth>1)return L(f,p,u);{const b=new c.BufferGeometry,A=new Float32Array([f.x,f.y,f.z,p.x,p.y,p.z]);return b.setAttribute("position",new c.BufferAttribute(A,3)),new c.Line(b,y)}}return null}else{if(l.type==="REGION")return null;if(l.type==="BODY"||l.type==="3DSOLID")return null;if(l.type==="SURFACE"||l.type==="PLANESURFACE")return null;if(l.type==="VIEWPORT")return null;if(l.type==="IMAGE")return null;if(l.type==="WIPEOUT")return null;if(l.vertices&&Array.isArray(l.vertices)&&l.vertices.length>0){const f=[];if(l.vertices.forEach(r=>{r&&typeof r=="object"&&r.x!==void 0&&r.y!==void 0&&f.push(new c.Vector3(r.x,r.y,r.z||0))}),f.length>1)if(t.lineWidth>1){const r=new c.Group;for(let p=0;p<f.length-1;p++){const b=L(f[p],f[p+1],u);r.add(b)}return r}else{const r=new c.BufferGeometry().setFromPoints(f);return new c.Line(r,y)}}if(l.startPoint&&l.endPoint){const f=new c.Vector3(l.startPoint.x,l.startPoint.y,l.startPoint.z||0),r=new c.Vector3(l.endPoint.x,l.endPoint.y,l.endPoint.z||0);if(t.lineWidth>1)return L(f,r,u);{const p=new c.BufferGeometry,b=new Float32Array([f.x,f.y,f.z,r.x,r.y,r.z]);return p.setAttribute("position",new c.BufferAttribute(b,3)),new c.Line(p,y)}}if(l.center&&l.radius){const r=new c.EllipseCurve(l.center.x,l.center.y,l.radius,l.radius,0,2*Math.PI,!1,0).getPoints(64);if(t.lineWidth>1){const p=new c.Group;for(let b=0;b<r.length;b++){const A=r[b],$=r[(b+1)%r.length],X=L(new c.Vector3(A.x,A.y,0),new c.Vector3($.x,$.y,0),u);p.add(X)}return p}else{const p=new c.BufferGeometry().setFromPoints(r);return new c.LineLoop(p,y)}}console.warn(`无法渲染实体类型 ${l.type},缺少必要的几何信息`)}}}catch(f){console.warn(`创建实体失败 (${l.type}):`,f,l)}return null},K=()=>{if(!w||!O||!T)return;const l=new c.Box3().setFromObject(O);if(l.isEmpty()){console.warn("没有实体,无法适应视图");return}const u=l.getSize(new c.Vector3),y=l.getCenter(new c.Vector3),M=Math.max(u.x,u.y),B=T.domElement.clientWidth/T.domElement.clientHeight,f=M*.6;w.left=-f*B,w.right=f*B,w.top=f,w.bottom=-f,w.position.set(y.x,y.y,100),w.lookAt(y.x,y.y,0),w.updateProjectionMatrix();const r=Math.max(M*1.5,1e3);R(r,y),D.value=1,I.value={x:0,y:0}},Q=()=>{!T||!E||!w||(requestAnimationFrame(Q),T.render(E,w))},ne=()=>{if(!w)return;const l=.8;w.left*=l,w.right*=l,w.top*=l,w.bottom*=l,w.updateProjectionMatrix(),D.value/=l},oe=()=>{if(!w)return;const l=1.25;w.left*=l,w.right*=l,w.top*=l,w.bottom*=l,w.updateProjectionMatrix(),D.value/=l},re=()=>{K()},ye=()=>{H&&(H.visible=!H.visible)},ce=l=>{x.value=!0,U.value={x:l.clientX,y:l.clientY}},ue=l=>{if(!x.value||!w||!T)return;const u=l.clientX-U.value.x,y=l.clientY-U.value.y,M=-u/T.domElement.clientWidth*(w.right-w.left),B=y/T.domElement.clientHeight*(w.top-w.bottom);w.position.x+=M,w.position.y+=B,w.updateProjectionMatrix(),U.value={x:l.clientX,y:l.clientY}},ee=()=>{x.value=!1},de=l=>{l.preventDefault(),l.deltaY<0?ne():oe()},ae=()=>{if(!g.value||!w||!T)return;const l=g.value.clientWidth,u=g.value.clientHeight;if(l<=0||u<=0)return;const y=l/u,M=(w.top-w.bottom)/2,B=M*y;w.left=-B,w.right=B,w.top=M,w.bottom=-M,w.updateProjectionMatrix(),T.setSize(l,u),T.setPixelRatio(window.devicePixelRatio)},Ee=()=>{if(T&&(T.dispose(),g.value&&T.domElement&&g.value.removeChild(T.domElement)),O){const l=u=>{u.geometry&&u.geometry.dispose(),u.material&&(Array.isArray(u.material)?u.material.forEach(y=>y.dispose()):u.material.dispose()),u.children&&u.children.forEach(y=>l(y))};O.children.forEach(u=>{l(u)})}E=null,w=null,T=null,O=null,H=null};return a.watch(()=>t.dxfUrl,l=>{l&&z(l)},{immediate:!0}),a.watch(()=>t.dxfData,l=>{l&&(V.value=l,S(l))},{immediate:!0}),a.watch(()=>t.backgroundColor,l=>{E&&(E.background=new c.Color(l))}),a.watch(()=>t.lineColor,()=>{V.value&&S(V.value)}),a.watch(()=>t.lineWidth,()=>{V.value&&S(V.value)}),a.watch(()=>t.showGrid,l=>{H&&(H.visible=l)}),a.onMounted(()=>{if(_(),window.addEventListener("resize",ae),g.value&&(m=new ResizeObserver(l=>{for(const u of l)u.target===g.value&&ae()}),m.observe(g.value)),g.value){const l=g.value;l.addEventListener("mousedown",ce),l.addEventListener("mousemove",ue),l.addEventListener("mouseup",ee),l.addEventListener("mouseleave",ee),l.addEventListener("wheel",de,{passive:!1})}}),a.onBeforeUnmount(()=>{if(Ee(),window.removeEventListener("resize",ae),m&&g.value&&(m.unobserve(g.value),m.disconnect(),m=null),g.value){const l=g.value;l.removeEventListener("mousedown",ce),l.removeEventListener("mousemove",ue),l.removeEventListener("mouseup",ee),l.removeEventListener("mouseleave",ee),l.removeEventListener("wheel",de)}}),n({loadDxf:z,zoomIn:ne,zoomOut:oe,resetView:re,fitToView:K}),(l,u)=>{var y;return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["my-dxf-viewer",C.value])},[s.showToolbar?(a.openBlock(),a.createElementBlock("div",bt,[a.createElementVNode("button",{class:"my-dxf-viewer__btn",onClick:ne,title:"放大"},[...u[0]||(u[0]=[a.createElementVNode("svg",{viewBox:"0 0 24 24",width:"18",height:"18",fill:"currentColor"},[a.createElementVNode("path",{d:"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"})],-1)])]),a.createElementVNode("button",{class:"my-dxf-viewer__btn",onClick:oe,title:"缩小"},[...u[1]||(u[1]=[a.createElementVNode("svg",{viewBox:"0 0 24 24",width:"18",height:"18",fill:"currentColor"},[a.createElementVNode("path",{d:"M19,13H5V11H19V13Z"})],-1)])]),a.createElementVNode("button",{class:"my-dxf-viewer__btn",onClick:re,title:"适应窗口"},[...u[2]||(u[2]=[a.createElementVNode("svg",{viewBox:"0 0 24 24",width:"18",height:"18",fill:"currentColor"},[a.createElementVNode("path",{d:"M9,3V4H4V9H3V4A1,1 0 0,1 4,3H9M4,20H9V21H4A1,1 0 0,1 3,20V15H4V20M20,20V15H21V20A1,1 0 0,1 20,21H15V20H20M20,9H21V4A1,1 0 0,1 20,3H15V4H20V9Z"})],-1)])]),a.createElementVNode("button",{class:a.normalizeClass(["my-dxf-viewer__btn",{active:t.showGrid&&((y=a.unref(H))==null?void 0:y.visible)}]),onClick:ye,title:"显示/隐藏网格"},[...u[3]||(u[3]=[a.createElementVNode("svg",{viewBox:"0 0 24 24",width:"18",height:"18",fill:"currentColor"},[a.createElementVNode("path",{d:"M10,4V8H14V4H10M16,4V8H20V4H16M16,10V14H20V10H16M16,16V20H20V16H16M14,20V16H10V20H14M8,20V16H4V20H8M8,14V10H4V14H8M8,8V4H4V8H8M10,14H14V10H10V14M4,2H20A2,2 0 0,1 22,4V20A2,2 0 0,1 20,22H4C2.92,22 2,21.1 2,20V4A2,2 0 0,1 4,2Z"})],-1)])],2)])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:"my-dxf-viewer__canvas-wrapper",ref_key:"containerRef",ref:i},[a.createElementVNode("div",{ref_key:"canvasContainerRef",ref:g,class:"my-dxf-viewer__three-container"},null,512),o.value?(a.openBlock(),a.createElementBlock("div",mt,[...u[4]||(u[4]=[a.createElementVNode("div",{class:"my-dxf-viewer__spinner"},null,-1),a.createElementVNode("p",null,"解析 DXF 文件中...",-1)])])):a.createCommentVNode("",!0),v.value?(a.openBlock(),a.createElementBlock("div",wt,[u[5]||(u[5]=a.createElementVNode("svg",{viewBox:"0 0 24 24",width:"48",height:"48",fill:"currentColor"},[a.createElementVNode("path",{d:"M13,13H11V7H13M13,17H11V15H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"})],-1)),a.createElementVNode("p",null,a.toDisplayString(v.value),1)])):a.createCommentVNode("",!0),!s.dxfUrl&&!v.value&&!o.value?(a.openBlock(),a.createElementBlock("div",kt,[u[6]||(u[6]=a.createElementVNode("svg",{viewBox:"0 0 24 24",width:"64",height:"64",fill:"currentColor"},[a.createElementVNode("path",{d:"M13,9H18.5L13,3.5V9M6,2H14L20,8V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V4C4,2.89 4.89,2 6,2M15,18V16H6V18H15M18,14V12H6V14H18Z"})],-1)),a.createElementVNode("p",null,a.toDisplayString(s.emptyText),1)])):a.createCommentVNode("",!0)],512),s.showInfo&&V.value?(a.openBlock(),a.createElementBlock("div",xt,[a.createElementVNode("div",yt,[u[7]||(u[7]=a.createElementVNode("span",null,"图层:",-1)),a.createElementVNode("span",null,a.toDisplayString(F.value),1)]),a.createElementVNode("div",Et,[u[8]||(u[8]=a.createElementVNode("span",null,"实体:",-1)),a.createElementVNode("span",null,a.toDisplayString(h.value),1)]),a.createElementVNode("div",Vt,[u[9]||(u[9]=a.createElementVNode("span",null,"边界:",-1)),a.createElementVNode("span",null,a.toDisplayString(d.value),1)])])):a.createCommentVNode("",!0)],2)}}}),_t=Z._export_sfc(Ct,[["__scopeId","data-v-37660f6e"]]),Lt={key:0,class:"data-panel__header"},Nt={class:"data-panel__title"},Pt={key:0,class:"data-panel__icon"},St={class:"icon-placeholder"},Dt={class:"data-panel__content"},Ft={class:"data-panel__label"},Bt={class:"data-panel__value-wrapper"},At={class:"data-panel__value"},Tt={key:0,class:"data-panel__unit"},Mt={key:0,class:"data-panel__status"},It={class:"status-text"},Ot={key:1,class:"data-panel__description"},Ht={key:0},Rt={key:1},zt={key:2},$t={key:1,class:"data-panel__footer"},Gt={name:"MyDataPanel"},Ut=a.defineComponent(se(le({},Gt),{props:{title:{},dataItems:{},columns:{default:3},showIcon:{type:Boolean,default:!0},theme:{default:"light"},size:{default:"medium"},compact:{type:Boolean,default:!1}},setup(s){const n=s,e=a.computed(()=>[`data-panel--${n.theme}`,`data-panel--${n.size}`,n.compact&&"data-panel--compact"]),t=a.computed(()=>({gridTemplateColumns:`repeat(${n.columns}, 1fr)`})),k=v=>{if(v.customStatus)return v.customStatus;const V=Number(v.value);return isNaN(V)?"normal":v.min!==void 0&&V<v.min||v.max!==void 0&&V>v.max?"danger":v.warnMin!==void 0&&V<v.warnMin||v.warnMax!==void 0&&V>v.warnMax?"warning":"normal"},i=v=>{const V=k(v);return{normal:"正常",warning:"警告",danger:"异常"}[V]},g=v=>typeof v=="string"?v:v.toFixed(2),o=v=>[`data-panel__item--${k(v)}`];return(v,V)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["data-panel",e.value])},[s.title||v.$slots.title?(a.openBlock(),a.createElementBlock("div",Lt,[a.renderSlot(v.$slots,"title",{},()=>[a.createElementVNode("h3",Nt,a.toDisplayString(s.title),1)],!0)])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:"data-panel__grid",style:a.normalizeStyle(t.value)},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.dataItems,(E,w)=>(a.openBlock(),a.createElementBlock("div",{key:w,class:a.normalizeClass(["data-panel__item",o(E)])},[E.icon||s.showIcon?(a.openBlock(),a.createElementBlock("div",Pt,[a.renderSlot(v.$slots,"icon",{item:E},()=>[a.createElementVNode("span",St,a.toDisplayString(E.icon||"📊"),1)],!0)])):a.createCommentVNode("",!0),a.createElementVNode("div",Dt,[a.createElementVNode("div",Ft,a.toDisplayString(E.label),1),a.createElementVNode("div",Bt,[a.createElementVNode("span",At,a.toDisplayString(g(E.value)),1),E.unit?(a.openBlock(),a.createElementBlock("span",Tt,a.toDisplayString(E.unit),1)):a.createCommentVNode("",!0)]),E.showStatus!==!1?(a.openBlock(),a.createElementBlock("div",Mt,[a.createElementVNode("span",{class:a.normalizeClass(["status-dot",`status-dot--${k(E)}`])},null,2),a.createElementVNode("span",It,a.toDisplayString(i(E)),1)])):a.createCommentVNode("",!0),E.description?(a.openBlock(),a.createElementBlock("div",Ot,a.toDisplayString(E.description),1)):a.createCommentVNode("",!0)]),E.trend?(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(["data-panel__trend",`trend--${E.trend}`])},[E.trend==="up"?(a.openBlock(),a.createElementBlock("span",Ht,"↑")):a.createCommentVNode("",!0),E.trend==="down"?(a.openBlock(),a.createElementBlock("span",Rt,"↓")):a.createCommentVNode("",!0),E.trend==="stable"?(a.openBlock(),a.createElementBlock("span",zt,"→")):a.createCommentVNode("",!0)],2)):a.createCommentVNode("",!0)],2))),128))],4),v.$slots.footer?(a.openBlock(),a.createElementBlock("div",$t,[a.renderSlot(v.$slots,"footer",{},void 0,!0)])):a.createCommentVNode("",!0)],2))}})),we=Z._export_sfc(Ut,[["__scopeId","data-v-14261ac2"]]);we.install=s=>{s.component("MyDataPanel",we)};const Wt="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eDXF查看器%3c/title%3e%3cg%20id='页面-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='轮廓化'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M3.5,2.15%20L13.5,2.15%20C14.3284271,2.15%2015,2.82157288%2015,3.65%20L15,13.65%20C15,14.4784271%2014.3284271,15.15%2013.5,15.15%20L3.5,15.15%20C2.67157288,15.15%202,14.4784271%202,13.65%20L2,3.65%20C2,2.82157288%202.67157288,2.15%203.5,2.15%20Z%20M13.5,3.4%20L3.5,3.4%20C3.36192881,3.4%203.25,3.51192881%203.25,3.65%20L3.25,13.65%20C3.25,13.7880712%203.36192881,13.9%203.5,13.9%20L13.5,13.9%20C13.6380712,13.9%2013.75,13.7880712%2013.75,13.65%20L13.75,3.65%20C13.75,3.51192881%2013.6380712,3.4%2013.5,3.4%20Z%20M8.5,5.15%20C10.1568542,5.15%2011.5,6.49314575%2011.5,8.15%20C11.5,9.80685425%2010.1568542,11.15%208.5,11.15%20C6.84314575,11.15%205.5,9.80685425%205.5,8.15%20C5.5,6.49314575%206.84314575,5.15%208.5,5.15%20Z%20M8.5,6.4%20C7.53350169,6.4%206.75,7.18350169%206.75,8.15%20C6.75,9.11649831%207.53350169,9.9%208.5,9.9%20C9.46649831,9.9%2010.25,9.11649831%2010.25,8.15%20C10.25,7.18350169%209.46649831,6.4%208.5,6.4%20Z%20M8.5,7.025%20C8.84517797,7.025%209.125,7.30482203%209.125,7.65%20L9.125,8.65%20C9.125,8.99517797%208.84517797,9.275%208.5,9.275%20C8.15482203,9.275%207.875,8.99517797%207.875,8.65%20L7.875,7.65%20C7.875,7.30482203%208.15482203,7.025%208.5,7.025%20Z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Xt="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eDXF查看器-激活%3c/title%3e%3cg%20id='页面-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='轮廓化'%20fill='%234A90E2'%20fill-rule='nonzero'%3e%3cpath%20d='M3.5,2.15%20L13.5,2.15%20C14.3284271,2.15%2015,2.82157288%2015,3.65%20L15,13.65%20C15,14.4784271%2014.3284271,15.15%2013.5,15.15%20L3.5,15.15%20C2.67157288,15.15%202,14.4784271%202,13.65%20L2,3.65%20C2,2.82157288%202.67157288,2.15%203.5,2.15%20Z%20M13.5,3.4%20L3.5,3.4%20C3.36192881,3.4%203.25,3.51192881%203.25,3.65%20L3.25,13.65%20C3.25,13.7880712%203.36192881,13.9%203.5,13.9%20L13.5,13.9%20C13.6380712,13.9%2013.75,13.7880712%2013.75,13.65%20L13.75,3.65%20C13.75,3.51192881%2013.6380712,3.4%2013.5,3.4%20Z%20M8.5,5.15%20C10.1568542,5.15%2011.5,6.49314575%2011.5,8.15%20C11.5,9.80685425%2010.1568542,11.15%208.5,11.15%20C6.84314575,11.15%205.5,9.80685425%205.5,8.15%20C5.5,6.49314575%206.84314575,5.15%208.5,5.15%20Z%20M8.5,6.4%20C7.53350169,6.4%206.75,7.18350169%206.75,8.15%20C6.75,9.11649831%207.53350169,9.9%208.5,9.9%20C9.46649831,9.9%2010.25,9.11649831%2010.25,8.15%20C10.25,7.18350169%209.46649831,6.4%208.5,6.4%20Z%20M8.5,7.025%20C8.84517797,7.025%209.125,7.30482203%209.125,7.65%20L9.125,8.65%20C9.125,8.99517797%208.84517797,9.275%208.5,9.275%20C8.15482203,9.275%207.875,8.99517797%207.875,8.65%20L7.875,7.65%20C7.875,7.30482203%208.15482203,7.025%208.5,7.025%20Z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Yt={class:"mix-body"},Zt={class:"upload-content"},jt={viewBox:"0 0 24 24",width:"48",height:"48",fill:"currentColor",style:{opacity:"0.5"}},qt={class:"upload-text"},Kt={key:0,class:"upload-hint"},Jt={key:1,class:"viewer-container"},Qt={key:0,class:"file-info"},en={class:"file-name"},tn={DEFAULT_ICON:Wt,ACTIVE_ICON:Xt,NAME_CN:"DXF查看器",NAME_EN:"DXF Viewer",ORDER:3},nn={backgroundColor:"#ffffff",lineColor:"#000000",lineWidth:1,showToolbar:!0,showInfo:!0,showGrid:!1,fileUrl:{value:"",type:"string",label:"component.options.fileUrl",placeholder:"请上传素材"},fileName:{value:"",type:"string",label:"component.options.fileName",placeholder:"请上传素材"}},on=[],an=[],ln=[],sn=null,rn={DEFAULT:tn,OPTIONS:nn,DATA:on,PARAMS:an,SOURCE:ln,COMMON:sn},cn=a.defineComponent(se(le({},rn),{__name:"dxf",props:{conf:{type:Object,default:()=>({})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(s){const n=Be.useCounterStore(),e=s;class t extends Se.BaseComponent{extractStyles(){const C=this.getOptionValue("backgroundColor","#ffffff");return{backgroundColor:C,lineColor:this.getOptionValue("lineColor","#000000"),lineWidth:this.getOptionValue("lineWidth",1),showToolbar:this.getOptionValue("showToolbar",!0),showInfo:this.getOptionValue("showInfo",!0),showGrid:this.getOptionValue("showGrid",!1),bgColor:C,titleColor:"#111",textColor:"#111",radiusSize:this.getOptionValue("radiusSize",0)}}init(){this.Style.value=this.extractStyles(),this.applyTheme(),this.Style.value.backgroundColor=this.Style.value.bgColor,w()}}const k=new t(e,"dxf");k.setupLifecycle();const i=k.getStyle(),g=a.ref(null),o=a.ref(null),v=a.ref(""),V=a.ref(""),E=a.ref(!1),w=()=>{var C,F,h;const{conf:m}=e;(F=(C=m==null?void 0:m.options)==null?void 0:C.fileUrl)!=null&&F.value&&(v.value=m.options.fileUrl.value,V.value=((h=m.options.fileName)==null?void 0:h.value)||"")},T=()=>{var m;(m=g.value)==null||m.click()},O=m=>ie(null,null,function*(){var d,_,R;const C=m.target,F=(d=C==null?void 0:C.files)==null?void 0:d[0];if(!F)return;if(!F.name.toLowerCase().endsWith(".dxf")){J.ElMessage.warning("请选择 DXF 文件");return}v.value&&v.value.startsWith("blob:")&&URL.revokeObjectURL(v.value);const h=URL.createObjectURL(F);v.value=h,V.value=F.name;try{E.value=!0;const z=yield Z.fileToDataUrl(F),S=Z.getFileExtension(F.name),L=yield De.api.post("upload",{dashboard_uid:n.pageData.id,file_data:z,file_type:S,user_id:((_=n.session.userInfo)==null?void 0:_.id)||""},!0);if(L.code===200&&((R=L.result)!=null&&R.relative_path)){const W=Fe.FILE_URL+L.result.relative_path;URL.revokeObjectURL(h),v.value=W,e.conf&&e.conf.options&&(e.conf.options.fileUrl||(e.conf.options.fileUrl={value:"",type:"string",label:""}),e.conf.options.fileName||(e.conf.options.fileName={value:"",type:"string",label:""}),e.conf.options.fileUrl.value=W,e.conf.options.fileName.value=L.result.file_name||F.name),J.ElMessage.success("DXF文件上传成功")}else throw new Error(L.msg||"上传失败")}catch(z){console.error("DXF文件上传失败:",z),J.ElMessage.error("DXF文件上传失败: "+((z==null?void 0:z.message)||"未知错误"))}finally{E.value=!1,g.value&&(g.value.value="")}}),H=()=>{v.value&&URL.revokeObjectURL(v.value),v.value="",V.value="",setTimeout(()=>{T()},100)},D=m=>{console.log("DXF 文件加载成功:",m)},I=m=>{console.error("DXF 文件加载失败:",m),J.ElMessage.error("DXF 文件加载失败: "+((m==null?void 0:m.message)||"未知错误"))},x=m=>{m.preventDefault(),m.stopPropagation()},U=m=>{var h;m.preventDefault(),m.stopPropagation();const F=(h=m.dataTransfer)==null?void 0:h.files;if(F&&F.length>0){const d=F[0];if(d.name.toLowerCase().endsWith(".dxf")){if(g.value){const _=new DataTransfer;_.items.add(d),g.value.files=_.files,O({target:g.value})}}else J.ElMessage.warning("请选择 DXF 文件")}};return a.onMounted(()=>{if(e.mode!=="preview"){const m=document.querySelector(".upload-area");m&&(m.addEventListener("dragover",x),m.addEventListener("drop",U))}}),a.onBeforeUnmount(()=>{v.value&&URL.revokeObjectURL(v.value);const m=document.querySelector(".upload-area");m&&(m.removeEventListener("dragover",x),m.removeEventListener("drop",U))}),(m,C)=>(a.openBlock(),a.createElementBlock("div",{class:"mix-component",style:a.normalizeStyle({borderRadius:`${a.unref(i).radiusSize}px`})},[a.createElementVNode("div",Yt,[v.value?(a.openBlock(),a.createElementBlock("div",Jt,[e.mode!=="preview"?(a.openBlock(),a.createElementBlock("div",Qt,[a.createElementVNode("span",en,a.toDisplayString(V.value),1),a.createElementVNode("button",{class:"change-file-btn",onClick:H,title:"更换文件"},[...C[2]||(C[2]=[a.createElementVNode("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},[a.createElementVNode("path",{d:"M12,6V9L16,5L12,1V4A8,8 0 0,0 4,12C4,13.57 4.46,15.03 5.24,16.26L6.7,14.8C6.25,13.97 6,13 6,12A6,6 0 0,1 12,6M18.76,7.74L17.3,9.2C17.74,10.04 18,11 18,12A6,6 0 0,1 12,18V15L8,19L12,23V20A8,8 0 0,0 20,12C20,10.43 19.54,8.97 18.76,7.74Z"})],-1)])])])):a.createCommentVNode("",!0),a.createVNode(a.unref(_t),{ref_key:"viewerRef",ref:o,"dxf-url":v.value,width:"100%",height:"100%","background-color":a.unref(i).backgroundColor,"line-color":a.unref(i).lineColor,"line-width":a.unref(i).lineWidth,"show-toolbar":a.unref(i).showToolbar,"show-info":a.unref(i).showInfo,"show-grid":a.unref(i).showGrid,onLoad:D,onError:I},null,8,["dxf-url","background-color","line-color","line-width","show-toolbar","show-info","show-grid"])])):(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["upload-area",{"preview-mode":e.mode==="preview"}]),onClick:C[0]||(C[0]=F=>e.mode!=="preview"&&T())},[a.createElementVNode("input",{ref_key:"fileInputRef",ref:g,type:"file",accept:".dxf",onChange:O,style:{display:"none"}},null,544),a.createElementVNode("div",Zt,[(a.openBlock(),a.createElementBlock("svg",jt,[...C[1]||(C[1]=[a.createElementVNode("path",{d:"M9,16V10H5L12,3L19,10H15V16H9M5,20V18H19V20H5Z"},null,-1)])])),a.createElementVNode("p",qt,a.toDisplayString(e.mode==="preview"?m.$t("component.dxf.noFile"):m.$t("component.dxf.uploadText")),1),e.mode!=="preview"?(a.openBlock(),a.createElementBlock("p",Kt,a.toDisplayString(m.$t("component.dxf.uploadHint")),1)):a.createCommentVNode("",!0)])],2))]),a.renderSlot(m.$slots,"default",{},void 0,!0)],4))}})),un=Z._export_sfc(cn,[["__scopeId","data-v-b94225c8"]]);exports.default=un;
@@ -27,13 +27,13 @@ var Ee = (s, a, e) => new Promise((t, x) => {
27
27
  n((e = e.apply(s, a)).next());
28
28
  });
29
29
  import { defineComponent as ue, openBlock as I, createElementBlock as M, renderSlot as le, computed as se, createElementVNode as g, normalizeClass as ne, createTextVNode as et, toDisplayString as Z, createCommentVNode as X, ref as K, watch as ce, onMounted as $e, onBeforeUnmount as Be, unref as ae, normalizeStyle as Ue, Fragment as tt, renderList as at, createVNode as nt } from "vue";
30
- import { _ as de, c as ot, f as st, g as lt } from "./index-C8teBAQd.js";
30
+ import { _ as de, c as ot, f as st, g as lt } from "./index-LgTfdmT4.js";
31
31
  import { S as it, C as _e, O as rt, W as ct, G as q, L as ut, V as H, B as j, a as fe, b as J, E as be, c as Te, d as dt, P as ft, e as vt, f as pt, M as Se, D as Ve, g as Ie, h as ht, i as bt, j as gt } from "./three.module-DcOQNgKS.js";
32
- import { B as wt } from "./element-resize-detector-B-0BgVLy.js";
33
- import { a as xt } from "./api-DAUw_RyI.js";
32
+ import { B as wt } from "./element-resize-detector-BCRzpPES.js";
33
+ import { a as xt } from "./api-Cyx2Fha0.js";
34
34
  import { F as kt } from "./config-BrMFHyZe.js";
35
35
  import { ElMessage as ve } from "element-plus";
36
- import { u as mt } from "./store-CS3njfh9.js";
36
+ import { u as mt } from "./store-D_TrU3nw.js";
37
37
  const yt = /* @__PURE__ */ ue({
38
38
  __name: "Button",
39
39
  emits: ["click"],
@@ -1,2 +1,2 @@
1
- "use strict";var A=Object.defineProperty,v=Object.defineProperties;var L=Object.getOwnPropertyDescriptors;var g=Object.getOwnPropertySymbols;var D=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable;var b=(i,e,l)=>e in i?A(i,e,{enumerable:!0,configurable:!0,writable:!0,value:l}):i[e]=l,p=(i,e)=>{for(var l in e||(e={}))D.call(e,l)&&b(i,l,e[l]);if(g)for(var l of g(e))q.call(e,l)&&b(i,l,e[l]);return i},S=(i,e)=>v(i,L(e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),u=require("./element-resize-detector-BvkAwVg8.cjs"),N=require("./index-BSzyUGIT.cjs"),I=require("./EChartComponentBase-DRY0bLOI.cjs"),R=require("./titleStyle-NSnz6cUg.cjs"),O=require("./ele-dzc-icon-h5wOUHF0.cjs"),f=require("./installCanvasRenderer-CyhM1Qpl.cjs"),T=require("./installMarkLine-Bv53Iw9G.cjs"),w=require("./install-DV5cEgNV.cjs"),F=require("./install-z6wShIZI.cjs"),V=require("./install-CIT6k8Ga.cjs"),$=require("./install-CltTFs4e.cjs"),M=require("./install-C8buXQPI.cjs"),j=require("./install-CYwVETsi.cjs"),k={class:"mix-body"},U=["id"],B={DEFAULT_ICON:O.DEFAULT_ICON,ACTIVE_ICON:O.ACTIVE_ICON,NAME_CN:"区段数据",NAME_EN:"Section Data",ORDER:4},P={titleColor:"#111",textColor:"#111",bgColor:"#fff",upColor:"#FF9E44",downColor:"#FF4683",radiusSize:8,textSize:12,top:20,bottom:40,left:20,right:50,points:100,isSmooth:!1,isHideTitle:!1},G=[{name:"参数一",fv:"",object_id:"",upLimit:80,downLimit:20}],H=["name","fv","object_id","upLimit","downLimit","source"],Z=["mosaic","statistics","calculate"],J=1,K={useAlias:!1,null:{type:"0",value:""},multiObject:!1,source:"mosaic",rate:{checked:!1,value:1}},Q={DEFAULT:B,OPTIONS:P,DATA:G,PARAMS:H,SOURCE:Z,ITEMS:J,COMMON:K},W=o.defineComponent(S(p({},Q),{__name:"dzc",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(i){f.use([T.install,w.install,F.install,V.install,$.install,f.install,M.install,f.install$1,j.install]);const e=i;class l extends I.EChartComponentBase{extractStyles(){return S(p({},super.extractStyles()),{upColor:this.getOptionValue("upColor","#FF9E44"),downColor:this.getOptionValue("downColor","#FF4683"),isSmooth:this.getOptionValue("isSmooth",!1)})}getChartOption(){const t=this.Style.value,a=this.props.conf.data[0]||{};return{tooltip:{trigger:"axis",textStyle:{fontSize:t.textSize}},legend:{show:!0,data:[a.name||""],right:20,top:0,textStyle:{color:t.textColor,fontSize:t.textSize}},grid:{top:t.top,bottom:t.bottom,left:t.left,right:t.right,containLabel:!0},dataZoom:[{type:"slider",start:80,end:100,height:20,bottom:15,left:60,right:60,textStyle:{color:t.textColor}},{type:"inside",start:0,end:20}],xAxis:[{type:"category",boundaryGap:!1,data:this.getTimeAxis(),axisLabel:{formatter:n=>n.includes(" ")?n.replace(" ",`
1
+ "use strict";var A=Object.defineProperty,v=Object.defineProperties;var L=Object.getOwnPropertyDescriptors;var g=Object.getOwnPropertySymbols;var D=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable;var b=(i,e,l)=>e in i?A(i,e,{enumerable:!0,configurable:!0,writable:!0,value:l}):i[e]=l,p=(i,e)=>{for(var l in e||(e={}))D.call(e,l)&&b(i,l,e[l]);if(g)for(var l of g(e))q.call(e,l)&&b(i,l,e[l]);return i},S=(i,e)=>v(i,L(e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),u=require("./element-resize-detector-DYs3pJPp.cjs"),N=require("./index-ZwyqrmaH.cjs"),I=require("./EChartComponentBase-Dz5E-lyI.cjs"),R=require("./titleStyle-NSnz6cUg.cjs"),O=require("./ele-dzc-icon-h5wOUHF0.cjs"),f=require("./installCanvasRenderer-CyhM1Qpl.cjs"),T=require("./installMarkLine-Bv53Iw9G.cjs"),w=require("./install-DV5cEgNV.cjs"),F=require("./install-z6wShIZI.cjs"),V=require("./install-CIT6k8Ga.cjs"),$=require("./install-CltTFs4e.cjs"),M=require("./install-C8buXQPI.cjs"),j=require("./install-CYwVETsi.cjs"),k={class:"mix-body"},U=["id"],B={DEFAULT_ICON:O.DEFAULT_ICON,ACTIVE_ICON:O.ACTIVE_ICON,NAME_CN:"区段数据",NAME_EN:"Section Data",ORDER:4},P={titleColor:"#111",textColor:"#111",bgColor:"#fff",upColor:"#FF9E44",downColor:"#FF4683",radiusSize:8,textSize:12,top:20,bottom:40,left:20,right:50,points:100,isSmooth:!1,isHideTitle:!1},G=[{name:"参数一",fv:"",object_id:"",upLimit:80,downLimit:20}],H=["name","fv","object_id","upLimit","downLimit","source"],Z=["mosaic","statistics","calculate"],J=1,K={useAlias:!1,null:{type:"0",value:""},multiObject:!1,source:"mosaic",rate:{checked:!1,value:1}},Q={DEFAULT:B,OPTIONS:P,DATA:G,PARAMS:H,SOURCE:Z,ITEMS:J,COMMON:K},W=o.defineComponent(S(p({},Q),{__name:"dzc",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(i){f.use([T.install,w.install,F.install,V.install,$.install,f.install,M.install,f.install$1,j.install]);const e=i;class l extends I.EChartComponentBase{extractStyles(){return S(p({},super.extractStyles()),{upColor:this.getOptionValue("upColor","#FF9E44"),downColor:this.getOptionValue("downColor","#FF4683"),isSmooth:this.getOptionValue("isSmooth",!1)})}getChartOption(){const t=this.Style.value,a=this.props.conf.data[0]||{};return{tooltip:{trigger:"axis",textStyle:{fontSize:t.textSize}},legend:{show:!0,data:[a.name||""],right:20,top:0,textStyle:{color:t.textColor,fontSize:t.textSize}},grid:{top:t.top,bottom:t.bottom,left:t.left,right:t.right,containLabel:!0},dataZoom:[{type:"slider",start:80,end:100,height:20,bottom:15,left:60,right:60,textStyle:{color:t.textColor}},{type:"inside",start:0,end:20}],xAxis:[{type:"category",boundaryGap:!1,data:this.getTimeAxis(),axisLabel:{formatter:n=>n.includes(" ")?n.replace(" ",`
2
2
  `):n,color:t.textColor,fontSize:t.textSize},axisLine:{lineStyle:{color:t.textColor}}}],yAxis:{type:"value",boundaryGap:[0,"20%"],splitLine:{lineStyle:{type:"dashed",color:"#e5e5e5"}},axisLabel:{color:t.textColor,fontSize:t.textSize},axisLine:{lineStyle:{color:t.textColor}}},series:this.formatSeries()}}formatSeries(){const t=this.Style.value,a=this.props.conf.data[0]||{};return[{name:a.name||"",type:"line",smooth:t.isSmooth,sampling:"average",itemStyle:{color:u.COLORS[0]},lineStyle:{color:u.COLORS[0]},markLine:{silent:!1,lineStyle:{type:"solid"},label:{formatter:"{b}",fontSize:t.textSize},data:[{name:"上限",yAxis:a.upLimit||80,lineStyle:{color:t.upColor},label:{color:t.upColor}},{name:"下限",yAxis:a.downLimit||20,lineStyle:{color:t.downColor},label:{color:t.downColor}}]},data:u.getRandomArr({num:t.points,max:200,min:0,mode:this.props.mode,hasDataSource:this.hasData()})}]}setSocketData(t){if(!this.hasData()||!this.chartObj||!t)return;const{data:a,common:n}=this.props.conf,_=n.source||"mosaic",s=this.chartObj.getOption();a.forEach((r,c)=>{const d=this.extractDataValue(t,r.fv),C=["statistics","calculate"].includes(_)?t.start_time:t.datetime;C!=null&&(c===0&&s.xAxis[0].data.push(C),s.series[c].data.push(d))});const x=u.addRealtimeData(s.xAxis[0].data,s.series.map(r=>r.data));s.xAxis[0].data=x.times.slice(-this.Style.value.points),s.series.forEach((r,c)=>{var d;r.data=((d=x.data[c])==null?void 0:d.slice(-this.Style.value.points))||[]}),this.updateChart(s)}}const m=new l(e,"dzc");m.setupLifecycle();const h=m.getStyle(),E=m.getEchartId(),z=o.computed(()=>R.generateTitleStyle(e.conf.options));return(y,t)=>(o.openBlock(),o.createElementBlock("div",{class:"mix-component",style:o.normalizeStyle({background:o.unref(h).bgColor,borderRadius:`${o.unref(h).radiusSize}px`})},[o.createElementVNode("div",{class:"mix-title",style:o.normalizeStyle(z.value)},o.toDisplayString(i.conf.caption||i.conf.name),5),o.createElementVNode("div",k,[o.createElementVNode("div",{class:"w-full h-full",id:o.unref(E)},null,8,U)]),o.renderSlot(y.$slots,"default",{},void 0,!0)],4))}})),X=N._export_sfc(W,[["__scopeId","data-v-1e186b00"]]);exports.default=X;
@@ -11,9 +11,9 @@ var g = (o, e, i) => e in o ? E(o, e, { enumerable: !0, configurable: !0, writab
11
11
  return o;
12
12
  }, p = (o, e) => v(o, L(e));
13
13
  import { defineComponent as F, computed as $, openBlock as N, createElementBlock as R, normalizeStyle as b, unref as u, createElementVNode as f, toDisplayString as T, renderSlot as I } from "vue";
14
- import { C as _, a as j, c as k } from "./element-resize-detector-B-0BgVLy.js";
15
- import { _ as M } from "./index-C8teBAQd.js";
16
- import { E as V } from "./EChartComponentBase-CQYZ0922.js";
14
+ import { C as _, a as j, c as k } from "./element-resize-detector-BCRzpPES.js";
15
+ import { _ as M } from "./index-LgTfdmT4.js";
16
+ import { E as V } from "./EChartComponentBase-CafVdj74.js";
17
17
  import { g as U } from "./titleStyle-BT5GlpAb.js";
18
18
  import { A as B, D as G } from "./ele-dzc-icon-D6eVpaHp.js";
19
19
  import { u as P, i as H, a as Z } from "./installCanvasRenderer-CLT2hquJ.js";
@@ -15,7 +15,7 @@ var gt = (n, t, e) => new Promise((i, r) => {
15
15
  c((e = e.apply(n, t)).next());
16
16
  });
17
17
  import { ref as Ot, inject as te, watch as vt, onMounted as ee, onBeforeUnmount as re } from "vue";
18
- import { e as tt, u as ie, c as ne } from "./index-C8teBAQd.js";
18
+ import { e as tt, u as ie, c as ne } from "./index-LgTfdmT4.js";
19
19
  const se = "object_alias_uid_mapping", ze = ["#4162ff", "#3bbc6a", "#e24359", "#fdcd61", "#44b4ff", "#8000ff", "#ae00ae", "#ff8102", "#970000", "#9b9b00", "#939393", "#007700", "#397373"];
20
20
  function ae(n) {
21
21
  if (!n || typeof n != "string" || n.startsWith("var("))
@@ -255,13 +255,13 @@ const Me = [
255
255
  return { times: i, data: r };
256
256
  }, me = (n, t, e, i, r) => gt(null, null, function* () {
257
257
  try {
258
- const a = yield new (yield import("./history-oKCbbOLM.js")).default().getHistoryData(n, r);
258
+ const a = yield new (yield import("./history-DH68UK_U.js")).default().getHistoryData(n, r);
259
259
  e(a);
260
260
  } catch (o) {
261
261
  console.error("获取历史数据时出错:", o);
262
262
  } finally {
263
263
  if (t) {
264
- const { formatRequest: o } = yield import("./request-BKxONB4_.js"), a = o(n.conf, n.uid, r);
264
+ const { formatRequest: o } = yield import("./request-jIo7FwQD.js"), a = o(n.conf, n.uid, r);
265
265
  t.registerComponent({
266
266
  id: n.conf.id,
267
267
  request: a,
@@ -645,7 +645,7 @@ class Fe {
645
645
  if (this.init(), this.props.mode === "preview") {
646
646
  if (this.needsHistoryData())
647
647
  try {
648
- const r = yield new (yield import("./history-oKCbbOLM.js")).default().getHistoryData(this.props, this.componentType);
648
+ const r = yield new (yield import("./history-DH68UK_U.js")).default().getHistoryData(this.props, this.componentType);
649
649
  this.setHistoryData(r);
650
650
  } catch (i) {
651
651
  console.error(`[${this.componentType}] 获取历史数据失败:`, i);
@@ -1,4 +1,4 @@
1
- "use strict";var bt=(n,t,e)=>new Promise((i,r)=>{var o=l=>{try{c(e.next(l))}catch(f){r(f)}},a=l=>{try{c(e.throw(l))}catch(f){r(f)}},c=l=>l.done?i(l.value):Promise.resolve(l.value).then(o,a);c((e=e.apply(n,t)).next())});const X=require("vue"),J=require("./index-BSzyUGIT.cjs"),Vt="object_alias_uid_mapping",ne=["#4162ff","#3bbc6a","#e24359","#fdcd61","#44b4ff","#8000ff","#ae00ae","#ff8102","#970000","#9b9b00","#939393","#007700","#397373"];function se(n){if(!n||typeof n!="string"||n.startsWith("var("))return!1;let t=n.replace("#","").toLowerCase();t.length===8&&(t=t.substring(0,6));let e,i,r;if(t.length===3)e=parseInt(t[0]+t[0],16),i=parseInt(t[1]+t[1],16),r=parseInt(t[2]+t[2],16);else if(t.length===6)e=parseInt(t.substring(0,2),16),i=parseInt(t.substring(2,4),16),r=parseInt(t.substring(4,6),16);else return!1;return(e*299+i*587+r*114)/1e3>180}function ae(n){if(!n||typeof n!="string")return!1;const t=n.replace("#","").toLowerCase();let e,i,r;if(t.length===3)e=parseInt(t[0]+t[0],16),i=parseInt(t[1]+t[1],16),r=parseInt(t[2]+t[2],16);else if(t.length===6)e=parseInt(t.substring(0,2),16),i=parseInt(t.substring(2,4),16),r=parseInt(t.substring(4,6),16);else return!1;return(e*299+i*587+r*114)/1e3<50}function oe(n,t){if(n==="dark"){const e=["bgColor","itemColor","oddColor","evenColor","backgroundColor","cardBgColor","barColor","splitColor","borderColor"],i=["titleColor","textColor","nameColor","valueColor","fontColor","labelColor"];e.forEach(r=>{const o=t[r];o&&typeof o=="string"&&se(o)&&(t[r]="var(--el-bg-color)")}),i.forEach(r=>{const o=t[r];o&&typeof o=="string"&&ae(o)&&(t[r]="var(--el-text-color-primary)")})}}const ce=[{value:"alway",label:"setting.control.alway"},{value:"once",label:"setting.control.once"},{value:"never",label:"setting.control.never"}],ue=(n,t,e=!1)=>{const i=[];if(t==="edit"||t==="preview"&&!e){const r=new Date;i.push(J.dayjs(r).format("YYYY-MM-DD HH")+":00:00");for(let o=0;o<n-1;o++){const a=r.getHours();r.setHours(a-1),i.unshift(J.dayjs(r).format("YYYY-MM-DD HH")+":00:00")}}return i},le=n=>{const{num:t,max:e,min:i,mode:r,hasDataSource:o=!1}=n,a=[];if(r==="edit"||r==="preview"&&!o){const c=t!=null?t:10,l=e!=null?e:200,f=i!=null?i:10;for(let u=0;u<c;u++)a.push(Math.floor(Math.random()*(l-f+1)+f))}return a},de=n=>{let t=[];switch(n){case"last-hour":case"hour":for(let e=0;e<60;e++){const i=e>9?`${e}:00`:`0${e}:00`;t.push(i)}break;case"last-day":case"day":for(let e=0;e<24;e++){const i=e>9?`${e}:00`:`0${e}:00`;t.push(i)}break;case"week":case"last-week":t=["周日","周一","周二","周三","周四","周五","周六"];break;case"last-month":case"month":for(let e=1;e<32;e++){const i=e>9?`${e}日`:`0${e}日`;t.push(i)}break;case"last-year":case"year":for(let e=1;e<13;e++){const i=e>9?`${e}月`:`0${e}月`;t.push(i)}break}return t},he=n=>["周日","周一","周二","周三","周四","周五","周六"][n],fe=(n,t)=>{switch(t){case"hour":return J.dayjs(n).format("mm:00");case"day":return J.dayjs(n).format("HH:00");case"week":return he(J.dayjs(n).day());case"month":return J.dayjs(n).format("DD日");case"year":return J.dayjs(n).format("MM月");default:return""}},Kt=(n,t)=>{let e=null;return function(...i){const r=this;e!==null&&clearTimeout(e),e=setTimeout(()=>{n.apply(r,i)},t)}},lt=(n,t,e)=>{const i=JSON.parse(sessionStorage.getItem(Vt)||"{}")||{};return t?n.object_alias&&i[n.object_alias]||e:n.object_id||e},pe=n=>{if(!n)return!1;const{data:t=[],common:e={}}=n;return e.source==="calculate"?Array.isArray(t)&&t.length>0?t.some(i=>i.uid&&i.uid!==""):!1:e.object_id&&e.object_id!==""||e.object_alias&&e.object_alias!==""?!0:Array.isArray(t)&&t.length>0?t.some(i=>i.object_id&&i.object_id!==""):!1},ve=n=>Number.isNaN(n)||!Number.isFinite(n),ge=n=>n==null||n==="",ut={null:ge,abnormal:ve},be=n=>n.res,ye=n=>{const{res:t,category:e,type:i,conf:r,uid:o}=n,{data:a,common:c}=r,l=c.source||"mosaic";if(e==="history"){const f=[],u=t.history[0].length;for(let y=0;y<u;y++){let D=!0;for(let g=0;g<t.history.length;g++){const b=a[g].fv;if(ut[i](t.history[g][y][b])){D=!1;break}}D&&f.push(y)}const v=[];for(let y=0;y<t.history.length;y++){const D=f.map(g=>t.history[y][g]);D.length>0&&v.push(D)}t.history=v}else{let f=!1;if(a.forEach(u=>{var D,g,b,m,x,I,E,P,p,s,w,h;const v=lt(u,c.useAlias,o);let y;["statistics","calculate"].includes(l)?y=(m=(b=(g=(D=t[v])==null?void 0:D[l])==null?void 0:g.data)==null?void 0:b[u.fv])==null?void 0:m.data:["statisticsRealtime","calculateRealtime"].includes(l)?y=(p=(P=(E=(I=(x=t[v])==null?void 0:x[l])==null?void 0:I.data)==null?void 0:E[u.fv])==null?void 0:P.data)==null?void 0:p.data:y=(h=(w=(s=t[v])==null?void 0:s[l])==null?void 0:w.data)==null?void 0:h[u.fv],f=ut[i](y)}),f)return null}return t},me=n=>{const{res:t,category:e,type:i,conf:r,uid:o}=n,{data:a,common:c}=r,l=c.source||"mosaic";if(e==="history"){const f=t.history[0].length;for(let u=0;u<f;u++)for(let v=0;v<t.history.length;v++){const y=a[v].fv;ut[i](t.history[v][u][y])&&(t.history[v][u][y]=c.null.value)}}else a.forEach(f=>{var v,y,D,g,b,m,x,I,E,P,p,s;const u=lt(f,c.useAlias,o);if(["statistics","calculate"].includes(l)){const w=(g=(D=(y=(v=t[u])==null?void 0:v[l])==null?void 0:y.data)==null?void 0:D[f.fv])==null?void 0:g.data;ut[i](w)&&(t[u][l].data[f.fv].data=c.null.value)}else if(["statisticsRealtime","calculateRealtime"].includes(l)){const w=(E=(I=(x=(m=(b=t[u])==null?void 0:b[l])==null?void 0:m.data)==null?void 0:x[f.fv])==null?void 0:I.data)==null?void 0:E.data;ut[i](w)&&(t[u][l].data[f.fv].data.data=c.null.value)}else{const w=(s=(p=(P=t[u])==null?void 0:P[l])==null?void 0:p.data)==null?void 0:s[f.fv];ut[i](w)&&(t[u][l].data[f.fv]=c.null.value)}});return t},Se=n=>n.res,we={0:be,1:ye,2:me,3:Se},Xt=(n,t,e)=>{var c;const{conf:i,uid:r}=t,o=(c=i.common)==null?void 0:c.null;if(!(o!=null&&o.type))return n;const a={res:n,category:e,type:"null",conf:i,uid:r};return we[o.type](a)},ke=(n,t)=>(n.history=t.map(()=>[]),n.all_data_group.forEach((e,i)=>{if(Array.isArray(e)&&e.length)e.forEach(r=>{n.history[i].push({time:r.start_time,[r.script_uid]:r.data})});else for(const r in e)n.history[i].push({time:r,[t[i].fv]:e[r]})}),n),Ee=(n,t)=>{const e=new Map;for(let a=0;a<n.length;a++)e.set(n[a],a);const i=[],r=t.map(()=>[]),o=new Set;for(let a=0;a<n.length;a++){const c=n[a];if(!o.has(c)){o.add(c);const l=e.get(c);i.push(c);for(let f=0;f<t.length;f++)r[f].push(t[f][l])}}return{times:i,data:r}},Jt=(n,t,e,i,r)=>bt(null,null,function*(){try{const a=yield new(yield Promise.resolve().then(()=>require("./history-BlHYyu1s.cjs"))).default().getHistoryData(n,r);e(a)}catch(o){console.error("获取历史数据时出错:",o)}finally{if(t){const{formatRequest:o}=yield Promise.resolve().then(()=>require("./request-CipSkL_e.cjs")),a=o(n.conf,n.uid,r);t.registerComponent({id:n.conf.id,request:a,onUpdate:(c,l)=>{c==="realtime"&&i(l)}})}}}),Qt=(n,t)=>{t&&t.unregisterComponent(n.conf.id)};class xe{constructor(t,e){this.linkWatchStop=null,this.props=t,this.componentType=e,this.session=X.ref(X.inject("session",null)),this.Style=X.ref({}),this.linkStore=J.useLinkStore()}extractStyles(){return{}}init(){this.Style.value=this.extractStyles(),this.applyTheme()}setHistoryData(t){}onPreview(){var r;const{common:t,data:e}=this.props.conf,i=this.getSource();if(t.multiObject&&Array.isArray(e)){const o=new Set;e.forEach(a=>{const c=this.resolveObjectId(a);!c||o.has(c)||(o.add(c),this.subscribeBySource(i,c,a.uid))}),console.log(`[${this.componentType}] 多对象模式:已订阅 ${o.size} 个对象`)}else{const o=this.resolveObjectId(),a=(r=e==null?void 0:e[0])==null?void 0:r.uid;this.subscribeBySource(i,o,a)}}setSocketData(t){if(!t)return;const{data:e}=this.props.conf;!e||!Array.isArray(e)||e.forEach(i=>{try{const r=this.extractDataValue(t,i.fv);i.value=r!=null?r:"--"}catch(r){i.value="--"}})}onLinkEvent(t){}getLinkChannel(){var t;return((t=this.Style.value)==null?void 0:t.linkChannel)||""}publish(t){const e=this.getLinkChannel();if(!e){console.warn(`[${this.componentType}] 未配置联动频道,无法发布事件`);return}this.linkStore.publish(e,this.componentType,t)}shouldHandleEvent(t){return!(!t||this.props.mode==="edit"||t.topic.source===this.componentType)}setupLinkWatch(){this.linkWatchStop&&this.linkWatchStop(),this.linkWatchStop=X.watch(()=>{const t=this.getLinkChannel();return t?this.linkStore.channels[t]:null},t=>{this.shouldHandleEvent(t)&&this.onLinkEvent(t)},{deep:!0,immediate:!0})}stopLinkWatch(){this.linkWatchStop&&(this.linkWatchStop(),this.linkWatchStop=null)}isLocalIotSubscribeMode(){return localStorage.getItem("dashboardUseLocalToken")==="1"||localStorage.getItem("dashboardUseLocalToken")==="true"}subscribe(t,e,i,r){if(!this.session.value){console.warn(`[${this.componentType}] Session 未初始化,无法订阅`);return}const o={event:t,block:e,object_id:i};r&&Object.assign(o,r);const a=this.isLocalIotSubscribeMode()?{action:"sub_event",block_mapping:"mmq",event:o}:{action:"sub_agent_event",event:o},c=this.props.conf.id;this.session.value.componentRequests&&(this.session.value.componentRequests.has(c)||this.session.value.componentRequests.set(c,[]),this.session.value.componentRequests.get(c).push(a)),this.session.value.send({type:"send_message",message:a})}subscribeFv(t){this.subscribe("recv_fv","mosaic",t)}subscribeRetainerOpen(t){this.subscribe("retainer_open","retainer",t)}subscribeRetainerClose(t){this.subscribe("retainer_close","retainer",t)}subscribeRetainerEvent(t){this.subscribe("retainer_event","retainer",t)}subscribeRetainer(t){this.subscribeRetainerOpen(t),this.subscribeRetainerClose(t),this.subscribeRetainerEvent(t)}subscribeStatisticsRealtimeResult(t){this.subscribe("statistics_realtime_result","statistics",t)}subscribeStatistics(t){var i,r;const e=(r=(i=this.props.conf.data)==null?void 0:i[0])==null?void 0:r.uid;this.subscribeStatisticsWithUid(t,e)}subscribeStatisticsWithUid(t,e){this.subscribe("statistics_result","statistics",t,{uid:e,type:"statistics"})}subscribeCalculate(t){var i,r;const e=(r=(i=this.props.conf.data)==null?void 0:i[0])==null?void 0:r.uid;this.subscribeCalculateWithUid(e)}subscribeCalculateWithUid(t){this.subscribe("statistics_result","statistics","",{uid:t,type:"calculate"})}subscribeBySource(t,e,i){switch(t){case"mosaic":this.subscribeFv(e);break;case"statisticsRealtime":this.subscribeStatisticsRealtimeResult(e);break;case"statistics":i?this.subscribeStatisticsWithUid(e,i):this.subscribeStatistics(e);break;case"calculate":i?this.subscribeCalculateWithUid(i):this.subscribeCalculate(e);break;default:console.warn(`[${this.componentType}] 未知的数据源类型: ${t}`)}}extractDataValue(t,e){var i;return!t||!t.event?null:t.event==="recv_fv"&&t.block==="mosaic"?!e||!t.data?null:t.data[e]:t.event==="statistics_realtime_result"&&t.block==="statistics"?(i=t.data)==null?void 0:i.data:t.event==="statistics_result"&&t.block==="statistics"?t.data:null}getOptionValue(t,e){var r,o;const i=(o=(r=this.props.conf)==null?void 0:r.options)==null?void 0:o[t];return i==null?e:typeof i=="object"&&"value"in i?i.value:i}applyTheme(){oe(this.props.theme,this.Style.value)}getSource(){var t,e;return((e=(t=this.props.conf)==null?void 0:t.common)==null?void 0:e.source)||"mosaic"}isStatistics(){return["statistics","calculate","statisticsRealtime","calculateRealtime"].includes(this.getSource())}resolveObjectId(t){var a,c,l;const{common:e,data:i}=this.props.conf;if(e.multiObject&&t)return lt(t,e.useAlias,this.props.uid);if(typeof e.object_id=="string"&&e.object_id.trim()!==""||typeof e.object_alias=="string"&&e.object_alias.trim()!==""||typeof((a=i==null?void 0:i[0])==null?void 0:a.object_id)=="string"&&i[0].object_id.trim()!==""||typeof((c=i==null?void 0:i[0])==null?void 0:c.object_alias)=="string"&&i[0].object_alias.trim()!==""){const f=e.object_id||e.object_alias?e:i[0]||{};return lt(f,e.useAlias,this.props.uid)}if(((l=this.props)==null?void 0:l.uid)!=null&&String(this.props.uid).trim()!=="")return String(this.props.uid).trim();const o=e.object_id?e:i[0]||{};return lt(o,e.useAlias,this.props.uid)}handleNull(t,e){return Xt(t,this.props,e)}getPreviewHelper(){return{preview:()=>Jt(this.props,this.session.value,t=>this.setHistoryData(t),t=>this.setSocketData(t),this.componentType),unregister:()=>Qt(this.props,this.session.value)}}getDebouncedInit(){return Kt(()=>this.init(),200)}cleanup(){}needsHistoryData(){return!0}setupLifecycle(){const t=this.getDebouncedInit(),e=this.getPreviewHelper();X.onMounted(()=>bt(this,null,function*(){if(this.init(),this.props.mode==="preview"){if(this.needsHistoryData())try{const r=yield new(yield Promise.resolve().then(()=>require("./history-BlHYyu1s.cjs"))).default().getHistoryData(this.props,this.componentType);this.setHistoryData(r)}catch(i){console.error(`[${this.componentType}] 获取历史数据失败:`,i)}this.session.value&&this.session.value.registerComponent({id:this.props.conf.id,request:null,onUpdate:(i,r)=>{i==="realtime"&&this.setSocketData(r)}}),this.onPreview()}this.setupLinkWatch()})),X.onBeforeUnmount(()=>{this.cleanup(),e.unregister(),this.stopLinkWatch()}),X.watch(()=>this.props.conf,()=>{this.props.mode==="edit"&&t()},{deep:!0}),X.watch(()=>this.props.theme,()=>{this.init()}),X.watch(()=>{var i;return(i=this.Style.value)==null?void 0:i.linkChannel},()=>{this.setupLinkWatch()})}getStyle(){return this.Style}getType(){return this.componentType}dispatchModal(t,e,i){this.props.mode==="preview"&&window.dispatchEvent(new CustomEvent("mix-modal",{detail:{action:t,layerId:e,sheetIndex:i!=null?i:-1}}))}triggerModalByKey(t){var i,r;if(this.props.mode!=="preview")return;const e=(i=this.props.conf)==null?void 0:i.modalBinding;if(e&&e.enabled&&e.mode==="key"){const a=(e.map||{})[t];if(!a||!a.layerId)return;const c=a.action||"toggle",l=(r=e.sheetIndex)!=null?r:-1;this.dispatchModal(c,a.layerId,l)}}}var yt={exports:{}},_t;function Zt(){if(_t)return yt.exports;_t=1;var n=yt.exports={};return n.forEach=function(t,e){for(var i=0;i<t.length;i++){var r=e(t[i]);if(r)return r}},yt.exports}var mt,zt;function Ce(){return zt||(zt=1,mt=function(n){var t=n.stateHandler.getState;function e(a){var c=t(a);return c&&!!c.isDetectable}function i(a){t(a).isDetectable=!0}function r(a){return!!t(a).busy}function o(a,c){t(a).busy=!!c}return{isDetectable:e,markAsDetectable:i,isBusy:r,markBusy:o}}),mt}var St,Mt;function De(){return Mt||(Mt=1,St=function(n){var t={};function e(a){var c=n.get(a);return c===void 0?[]:t[c]||[]}function i(a,c){var l=n.get(a);t[l]||(t[l]=[]),t[l].push(c)}function r(a,c){for(var l=e(a),f=0,u=l.length;f<u;++f)if(l[f]===c){l.splice(f,1);break}}function o(a){var c=e(a);c&&(c.length=0)}return{get:e,add:i,removeListener:r,removeAllListeners:o}}),St}var wt,qt;function je(){return qt||(qt=1,wt=function(){var n=1;function t(){return n++}return{generate:t}}),wt}var kt,Nt;function Ie(){return Nt||(Nt=1,kt=function(n){var t=n.idGenerator,e=n.stateHandler.getState;function i(o){var a=e(o);return a&&a.id!==void 0?a.id:null}function r(o){var a=e(o);if(!a)throw new Error("setId required the element to have a resize detection state.");var c=t.generate();return a.id=c,c}return{get:i,set:r}}),kt}var Et,Wt;function Ae(){return Wt||(Wt=1,Et=function(n){function t(){}var e={log:t,warn:t,error:t};if(!n&&window.console){var i=function(r,o){r[o]=function(){var c=console[o];if(c.apply)c.apply(console,arguments);else for(var l=0;l<arguments.length;l++)c(arguments[l])}};i(e,"log"),i(e,"warn"),i(e,"error")}return e}),Et}var xt={exports:{}},Pt;function te(){if(Pt)return xt.exports;Pt=1;var n=xt.exports={};return n.isIE=function(t){function e(){var r=navigator.userAgent.toLowerCase();return r.indexOf("msie")!==-1||r.indexOf("trident")!==-1||r.indexOf(" edge/")!==-1}if(!e())return!1;if(!t)return!0;var i=(function(){var r,o=3,a=document.createElement("div"),c=a.getElementsByTagName("i");do a.innerHTML="<!--[if gt IE "+ ++o+"]><i></i><![endif]-->";while(c[0]);return o>4?o:r})();return t===i},n.isLegacyOpera=function(){return!!window.opera},xt.exports}var Ct={exports:{}},Bt;function Le(){if(Bt)return Ct.exports;Bt=1;var n=Ct.exports={};n.getOption=t;function t(e,i,r){var o=e[i];return o==null&&r!==void 0?r:o}return Ct.exports}var Dt,Ut;function He(){if(Ut)return Dt;Ut=1;var n=Le();Dt=function(i){i=i||{};var r=i.reporter,o=n.getOption(i,"async",!0),a=n.getOption(i,"auto",!0);a&&!o&&(r&&r.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."),o=!0);var c=t(),l,f=!1;function u(m,x){!f&&a&&o&&c.size()===0&&D(),c.add(m,x)}function v(){for(f=!0;c.size();){var m=c;c=t(),m.process()}f=!1}function y(m){f||(m===void 0&&(m=o),l&&(g(l),l=null),m?D():v())}function D(){l=b(v)}function g(m){var x=clearTimeout;return x(m)}function b(m){var x=function(I){return setTimeout(I,0)};return x(m)}return{add:u,force:y}};function t(){var e={},i=0,r=0,o=0;function a(f,u){u||(u=f,f=0),f>r?r=f:f<o&&(o=f),e[f]||(e[f]=[]),e[f].push(u),i++}function c(){for(var f=o;f<=r;f++)for(var u=e[f],v=0;v<u.length;v++){var y=u[v];y()}}function l(){return i}return{add:a,process:c,size:l}}return Dt}var jt,$t;function Te(){if($t)return jt;$t=1;var n="_erd";function t(r){return r[n]={},e(r)}function e(r){return r[n]}function i(r){delete r[n]}return jt={initState:t,getState:e,cleanState:i},jt}var It,Ft;function Re(){if(Ft)return It;Ft=1;var n=te();return It=function(t){t=t||{};var e=t.reporter,i=t.batchProcessor,r=t.stateHandler.getState;if(!e)throw new Error("Missing required dependency: reporter.");function o(u,v){function y(){v(u)}if(n.isIE(8))r(u).object={proxy:y},u.attachEvent("onresize",y);else{var D=l(u);if(!D)throw new Error("Element is not detectable by this strategy.");D.contentDocument.defaultView.addEventListener("resize",y)}}function a(u){var v=t.important?" !important; ":"; ";return(u.join(v)+v).trim()}function c(u,v,y){y||(y=v,v=u,u=null),u=u||{},u.debug;function D(g,b){var m=a(["display: block","position: absolute","top: 0","left: 0","width: 100%","height: 100%","border: none","padding: 0","margin: 0","opacity: 0","z-index: -1000","pointer-events: none"]),x=!1,I=window.getComputedStyle(g),E=g.offsetWidth,P=g.offsetHeight;r(g).startSize={width:E,height:P};function p(){function s(){if(I.position==="static"){g.style.setProperty("position","relative",u.important?"important":"");var j=function(z,H,q,A){function B(dt){return dt.replace(/[^-\d\.]/g,"")}var U=q[A];U!=="auto"&&B(U)!=="0"&&(z.warn("An element that is positioned static has style."+A+"="+U+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+A+" will be set to 0. Element: ",H),H.style.setProperty(A,"0",u.important?"important":""))};j(e,g,I,"top"),j(e,g,I,"right"),j(e,g,I,"bottom"),j(e,g,I,"left")}}function w(){x||s();function j(H,q){if(!H.contentDocument){var A=r(H);A.checkForObjectDocumentTimeoutId&&window.clearTimeout(A.checkForObjectDocumentTimeoutId),A.checkForObjectDocumentTimeoutId=setTimeout(function(){A.checkForObjectDocumentTimeoutId=0,j(H,q)},100);return}q(H.contentDocument)}var z=this;j(z,function(q){b(g)})}I.position!==""&&(s(),x=!0);var h=document.createElement("object");h.style.cssText=m,h.tabIndex=-1,h.type="text/html",h.setAttribute("aria-hidden","true"),h.onload=w,n.isIE()||(h.data="about:blank"),r(g)&&(g.appendChild(h),r(g).object=h,n.isIE()&&(h.data="about:blank"))}i?i.add(p):p()}n.isIE(8)?y(v):D(v,y)}function l(u){return r(u).object}function f(u){if(r(u)){var v=l(u);v&&(n.isIE(8)?u.detachEvent("onresize",v.proxy):u.removeChild(v),r(u).checkForObjectDocumentTimeoutId&&window.clearTimeout(r(u).checkForObjectDocumentTimeoutId),delete r(u).object)}}return{makeDetectable:c,addListener:o,uninstall:f}},It}var At,Yt;function Oe(){if(Yt)return At;Yt=1;var n=Zt().forEach;return At=function(t){t=t||{};var e=t.reporter,i=t.batchProcessor,r=t.stateHandler.getState;t.stateHandler.hasState;var o=t.idHandler;if(!i)throw new Error("Missing required dependency: batchProcessor");if(!e)throw new Error("Missing required dependency: reporter.");var a=v(),c="erd_scroll_detection_scrollbar_style",l="erd_scroll_detection_container";function f(p){y(p,c,l)}f(window.document);function u(p){var s=t.important?" !important; ":"; ";return(p.join(s)+s).trim()}function v(){var p=500,s=500,w=document.createElement("div");w.style.cssText=u(["position: absolute","width: "+p*2+"px","height: "+s*2+"px","visibility: hidden","margin: 0","padding: 0"]);var h=document.createElement("div");h.style.cssText=u(["position: absolute","width: "+p+"px","height: "+s+"px","overflow: scroll","visibility: none","top: "+-p*3+"px","left: "+-s*3+"px","visibility: hidden","margin: 0","padding: 0"]),h.appendChild(w),document.body.insertBefore(h,document.body.firstChild);var j=p-h.clientWidth,z=s-h.clientHeight;return document.body.removeChild(h),{width:j,height:z}}function y(p,s,w){function h(q,A){A=A||function(U){p.head.appendChild(U)};var B=p.createElement("style");return B.innerHTML=q,B.id=s,A(B),B}if(!p.getElementById(s)){var j=w+"_animation",z=w+"_animation_active",H=`/* Created by the element-resize-detector library. */
1
+ "use strict";var bt=(n,t,e)=>new Promise((i,r)=>{var o=l=>{try{c(e.next(l))}catch(f){r(f)}},a=l=>{try{c(e.throw(l))}catch(f){r(f)}},c=l=>l.done?i(l.value):Promise.resolve(l.value).then(o,a);c((e=e.apply(n,t)).next())});const X=require("vue"),J=require("./index-ZwyqrmaH.cjs"),Vt="object_alias_uid_mapping",ne=["#4162ff","#3bbc6a","#e24359","#fdcd61","#44b4ff","#8000ff","#ae00ae","#ff8102","#970000","#9b9b00","#939393","#007700","#397373"];function se(n){if(!n||typeof n!="string"||n.startsWith("var("))return!1;let t=n.replace("#","").toLowerCase();t.length===8&&(t=t.substring(0,6));let e,i,r;if(t.length===3)e=parseInt(t[0]+t[0],16),i=parseInt(t[1]+t[1],16),r=parseInt(t[2]+t[2],16);else if(t.length===6)e=parseInt(t.substring(0,2),16),i=parseInt(t.substring(2,4),16),r=parseInt(t.substring(4,6),16);else return!1;return(e*299+i*587+r*114)/1e3>180}function ae(n){if(!n||typeof n!="string")return!1;const t=n.replace("#","").toLowerCase();let e,i,r;if(t.length===3)e=parseInt(t[0]+t[0],16),i=parseInt(t[1]+t[1],16),r=parseInt(t[2]+t[2],16);else if(t.length===6)e=parseInt(t.substring(0,2),16),i=parseInt(t.substring(2,4),16),r=parseInt(t.substring(4,6),16);else return!1;return(e*299+i*587+r*114)/1e3<50}function oe(n,t){if(n==="dark"){const e=["bgColor","itemColor","oddColor","evenColor","backgroundColor","cardBgColor","barColor","splitColor","borderColor"],i=["titleColor","textColor","nameColor","valueColor","fontColor","labelColor"];e.forEach(r=>{const o=t[r];o&&typeof o=="string"&&se(o)&&(t[r]="var(--el-bg-color)")}),i.forEach(r=>{const o=t[r];o&&typeof o=="string"&&ae(o)&&(t[r]="var(--el-text-color-primary)")})}}const ce=[{value:"alway",label:"setting.control.alway"},{value:"once",label:"setting.control.once"},{value:"never",label:"setting.control.never"}],ue=(n,t,e=!1)=>{const i=[];if(t==="edit"||t==="preview"&&!e){const r=new Date;i.push(J.dayjs(r).format("YYYY-MM-DD HH")+":00:00");for(let o=0;o<n-1;o++){const a=r.getHours();r.setHours(a-1),i.unshift(J.dayjs(r).format("YYYY-MM-DD HH")+":00:00")}}return i},le=n=>{const{num:t,max:e,min:i,mode:r,hasDataSource:o=!1}=n,a=[];if(r==="edit"||r==="preview"&&!o){const c=t!=null?t:10,l=e!=null?e:200,f=i!=null?i:10;for(let u=0;u<c;u++)a.push(Math.floor(Math.random()*(l-f+1)+f))}return a},de=n=>{let t=[];switch(n){case"last-hour":case"hour":for(let e=0;e<60;e++){const i=e>9?`${e}:00`:`0${e}:00`;t.push(i)}break;case"last-day":case"day":for(let e=0;e<24;e++){const i=e>9?`${e}:00`:`0${e}:00`;t.push(i)}break;case"week":case"last-week":t=["周日","周一","周二","周三","周四","周五","周六"];break;case"last-month":case"month":for(let e=1;e<32;e++){const i=e>9?`${e}日`:`0${e}日`;t.push(i)}break;case"last-year":case"year":for(let e=1;e<13;e++){const i=e>9?`${e}月`:`0${e}月`;t.push(i)}break}return t},he=n=>["周日","周一","周二","周三","周四","周五","周六"][n],fe=(n,t)=>{switch(t){case"hour":return J.dayjs(n).format("mm:00");case"day":return J.dayjs(n).format("HH:00");case"week":return he(J.dayjs(n).day());case"month":return J.dayjs(n).format("DD日");case"year":return J.dayjs(n).format("MM月");default:return""}},Kt=(n,t)=>{let e=null;return function(...i){const r=this;e!==null&&clearTimeout(e),e=setTimeout(()=>{n.apply(r,i)},t)}},lt=(n,t,e)=>{const i=JSON.parse(sessionStorage.getItem(Vt)||"{}")||{};return t?n.object_alias&&i[n.object_alias]||e:n.object_id||e},pe=n=>{if(!n)return!1;const{data:t=[],common:e={}}=n;return e.source==="calculate"?Array.isArray(t)&&t.length>0?t.some(i=>i.uid&&i.uid!==""):!1:e.object_id&&e.object_id!==""||e.object_alias&&e.object_alias!==""?!0:Array.isArray(t)&&t.length>0?t.some(i=>i.object_id&&i.object_id!==""):!1},ve=n=>Number.isNaN(n)||!Number.isFinite(n),ge=n=>n==null||n==="",ut={null:ge,abnormal:ve},be=n=>n.res,ye=n=>{const{res:t,category:e,type:i,conf:r,uid:o}=n,{data:a,common:c}=r,l=c.source||"mosaic";if(e==="history"){const f=[],u=t.history[0].length;for(let y=0;y<u;y++){let D=!0;for(let g=0;g<t.history.length;g++){const b=a[g].fv;if(ut[i](t.history[g][y][b])){D=!1;break}}D&&f.push(y)}const v=[];for(let y=0;y<t.history.length;y++){const D=f.map(g=>t.history[y][g]);D.length>0&&v.push(D)}t.history=v}else{let f=!1;if(a.forEach(u=>{var D,g,b,m,x,I,E,P,p,s,w,h;const v=lt(u,c.useAlias,o);let y;["statistics","calculate"].includes(l)?y=(m=(b=(g=(D=t[v])==null?void 0:D[l])==null?void 0:g.data)==null?void 0:b[u.fv])==null?void 0:m.data:["statisticsRealtime","calculateRealtime"].includes(l)?y=(p=(P=(E=(I=(x=t[v])==null?void 0:x[l])==null?void 0:I.data)==null?void 0:E[u.fv])==null?void 0:P.data)==null?void 0:p.data:y=(h=(w=(s=t[v])==null?void 0:s[l])==null?void 0:w.data)==null?void 0:h[u.fv],f=ut[i](y)}),f)return null}return t},me=n=>{const{res:t,category:e,type:i,conf:r,uid:o}=n,{data:a,common:c}=r,l=c.source||"mosaic";if(e==="history"){const f=t.history[0].length;for(let u=0;u<f;u++)for(let v=0;v<t.history.length;v++){const y=a[v].fv;ut[i](t.history[v][u][y])&&(t.history[v][u][y]=c.null.value)}}else a.forEach(f=>{var v,y,D,g,b,m,x,I,E,P,p,s;const u=lt(f,c.useAlias,o);if(["statistics","calculate"].includes(l)){const w=(g=(D=(y=(v=t[u])==null?void 0:v[l])==null?void 0:y.data)==null?void 0:D[f.fv])==null?void 0:g.data;ut[i](w)&&(t[u][l].data[f.fv].data=c.null.value)}else if(["statisticsRealtime","calculateRealtime"].includes(l)){const w=(E=(I=(x=(m=(b=t[u])==null?void 0:b[l])==null?void 0:m.data)==null?void 0:x[f.fv])==null?void 0:I.data)==null?void 0:E.data;ut[i](w)&&(t[u][l].data[f.fv].data.data=c.null.value)}else{const w=(s=(p=(P=t[u])==null?void 0:P[l])==null?void 0:p.data)==null?void 0:s[f.fv];ut[i](w)&&(t[u][l].data[f.fv]=c.null.value)}});return t},Se=n=>n.res,we={0:be,1:ye,2:me,3:Se},Xt=(n,t,e)=>{var c;const{conf:i,uid:r}=t,o=(c=i.common)==null?void 0:c.null;if(!(o!=null&&o.type))return n;const a={res:n,category:e,type:"null",conf:i,uid:r};return we[o.type](a)},ke=(n,t)=>(n.history=t.map(()=>[]),n.all_data_group.forEach((e,i)=>{if(Array.isArray(e)&&e.length)e.forEach(r=>{n.history[i].push({time:r.start_time,[r.script_uid]:r.data})});else for(const r in e)n.history[i].push({time:r,[t[i].fv]:e[r]})}),n),Ee=(n,t)=>{const e=new Map;for(let a=0;a<n.length;a++)e.set(n[a],a);const i=[],r=t.map(()=>[]),o=new Set;for(let a=0;a<n.length;a++){const c=n[a];if(!o.has(c)){o.add(c);const l=e.get(c);i.push(c);for(let f=0;f<t.length;f++)r[f].push(t[f][l])}}return{times:i,data:r}},Jt=(n,t,e,i,r)=>bt(null,null,function*(){try{const a=yield new(yield Promise.resolve().then(()=>require("./history-5W6pGCPq.cjs"))).default().getHistoryData(n,r);e(a)}catch(o){console.error("获取历史数据时出错:",o)}finally{if(t){const{formatRequest:o}=yield Promise.resolve().then(()=>require("./request-BcQP_dWt.cjs")),a=o(n.conf,n.uid,r);t.registerComponent({id:n.conf.id,request:a,onUpdate:(c,l)=>{c==="realtime"&&i(l)}})}}}),Qt=(n,t)=>{t&&t.unregisterComponent(n.conf.id)};class xe{constructor(t,e){this.linkWatchStop=null,this.props=t,this.componentType=e,this.session=X.ref(X.inject("session",null)),this.Style=X.ref({}),this.linkStore=J.useLinkStore()}extractStyles(){return{}}init(){this.Style.value=this.extractStyles(),this.applyTheme()}setHistoryData(t){}onPreview(){var r;const{common:t,data:e}=this.props.conf,i=this.getSource();if(t.multiObject&&Array.isArray(e)){const o=new Set;e.forEach(a=>{const c=this.resolveObjectId(a);!c||o.has(c)||(o.add(c),this.subscribeBySource(i,c,a.uid))}),console.log(`[${this.componentType}] 多对象模式:已订阅 ${o.size} 个对象`)}else{const o=this.resolveObjectId(),a=(r=e==null?void 0:e[0])==null?void 0:r.uid;this.subscribeBySource(i,o,a)}}setSocketData(t){if(!t)return;const{data:e}=this.props.conf;!e||!Array.isArray(e)||e.forEach(i=>{try{const r=this.extractDataValue(t,i.fv);i.value=r!=null?r:"--"}catch(r){i.value="--"}})}onLinkEvent(t){}getLinkChannel(){var t;return((t=this.Style.value)==null?void 0:t.linkChannel)||""}publish(t){const e=this.getLinkChannel();if(!e){console.warn(`[${this.componentType}] 未配置联动频道,无法发布事件`);return}this.linkStore.publish(e,this.componentType,t)}shouldHandleEvent(t){return!(!t||this.props.mode==="edit"||t.topic.source===this.componentType)}setupLinkWatch(){this.linkWatchStop&&this.linkWatchStop(),this.linkWatchStop=X.watch(()=>{const t=this.getLinkChannel();return t?this.linkStore.channels[t]:null},t=>{this.shouldHandleEvent(t)&&this.onLinkEvent(t)},{deep:!0,immediate:!0})}stopLinkWatch(){this.linkWatchStop&&(this.linkWatchStop(),this.linkWatchStop=null)}isLocalIotSubscribeMode(){return localStorage.getItem("dashboardUseLocalToken")==="1"||localStorage.getItem("dashboardUseLocalToken")==="true"}subscribe(t,e,i,r){if(!this.session.value){console.warn(`[${this.componentType}] Session 未初始化,无法订阅`);return}const o={event:t,block:e,object_id:i};r&&Object.assign(o,r);const a=this.isLocalIotSubscribeMode()?{action:"sub_event",block_mapping:"mmq",event:o}:{action:"sub_agent_event",event:o},c=this.props.conf.id;this.session.value.componentRequests&&(this.session.value.componentRequests.has(c)||this.session.value.componentRequests.set(c,[]),this.session.value.componentRequests.get(c).push(a)),this.session.value.send({type:"send_message",message:a})}subscribeFv(t){this.subscribe("recv_fv","mosaic",t)}subscribeRetainerOpen(t){this.subscribe("retainer_open","retainer",t)}subscribeRetainerClose(t){this.subscribe("retainer_close","retainer",t)}subscribeRetainerEvent(t){this.subscribe("retainer_event","retainer",t)}subscribeRetainer(t){this.subscribeRetainerOpen(t),this.subscribeRetainerClose(t),this.subscribeRetainerEvent(t)}subscribeStatisticsRealtimeResult(t){this.subscribe("statistics_realtime_result","statistics",t)}subscribeStatistics(t){var i,r;const e=(r=(i=this.props.conf.data)==null?void 0:i[0])==null?void 0:r.uid;this.subscribeStatisticsWithUid(t,e)}subscribeStatisticsWithUid(t,e){this.subscribe("statistics_result","statistics",t,{uid:e,type:"statistics"})}subscribeCalculate(t){var i,r;const e=(r=(i=this.props.conf.data)==null?void 0:i[0])==null?void 0:r.uid;this.subscribeCalculateWithUid(e)}subscribeCalculateWithUid(t){this.subscribe("statistics_result","statistics","",{uid:t,type:"calculate"})}subscribeBySource(t,e,i){switch(t){case"mosaic":this.subscribeFv(e);break;case"statisticsRealtime":this.subscribeStatisticsRealtimeResult(e);break;case"statistics":i?this.subscribeStatisticsWithUid(e,i):this.subscribeStatistics(e);break;case"calculate":i?this.subscribeCalculateWithUid(i):this.subscribeCalculate(e);break;default:console.warn(`[${this.componentType}] 未知的数据源类型: ${t}`)}}extractDataValue(t,e){var i;return!t||!t.event?null:t.event==="recv_fv"&&t.block==="mosaic"?!e||!t.data?null:t.data[e]:t.event==="statistics_realtime_result"&&t.block==="statistics"?(i=t.data)==null?void 0:i.data:t.event==="statistics_result"&&t.block==="statistics"?t.data:null}getOptionValue(t,e){var r,o;const i=(o=(r=this.props.conf)==null?void 0:r.options)==null?void 0:o[t];return i==null?e:typeof i=="object"&&"value"in i?i.value:i}applyTheme(){oe(this.props.theme,this.Style.value)}getSource(){var t,e;return((e=(t=this.props.conf)==null?void 0:t.common)==null?void 0:e.source)||"mosaic"}isStatistics(){return["statistics","calculate","statisticsRealtime","calculateRealtime"].includes(this.getSource())}resolveObjectId(t){var a,c,l;const{common:e,data:i}=this.props.conf;if(e.multiObject&&t)return lt(t,e.useAlias,this.props.uid);if(typeof e.object_id=="string"&&e.object_id.trim()!==""||typeof e.object_alias=="string"&&e.object_alias.trim()!==""||typeof((a=i==null?void 0:i[0])==null?void 0:a.object_id)=="string"&&i[0].object_id.trim()!==""||typeof((c=i==null?void 0:i[0])==null?void 0:c.object_alias)=="string"&&i[0].object_alias.trim()!==""){const f=e.object_id||e.object_alias?e:i[0]||{};return lt(f,e.useAlias,this.props.uid)}if(((l=this.props)==null?void 0:l.uid)!=null&&String(this.props.uid).trim()!=="")return String(this.props.uid).trim();const o=e.object_id?e:i[0]||{};return lt(o,e.useAlias,this.props.uid)}handleNull(t,e){return Xt(t,this.props,e)}getPreviewHelper(){return{preview:()=>Jt(this.props,this.session.value,t=>this.setHistoryData(t),t=>this.setSocketData(t),this.componentType),unregister:()=>Qt(this.props,this.session.value)}}getDebouncedInit(){return Kt(()=>this.init(),200)}cleanup(){}needsHistoryData(){return!0}setupLifecycle(){const t=this.getDebouncedInit(),e=this.getPreviewHelper();X.onMounted(()=>bt(this,null,function*(){if(this.init(),this.props.mode==="preview"){if(this.needsHistoryData())try{const r=yield new(yield Promise.resolve().then(()=>require("./history-5W6pGCPq.cjs"))).default().getHistoryData(this.props,this.componentType);this.setHistoryData(r)}catch(i){console.error(`[${this.componentType}] 获取历史数据失败:`,i)}this.session.value&&this.session.value.registerComponent({id:this.props.conf.id,request:null,onUpdate:(i,r)=>{i==="realtime"&&this.setSocketData(r)}}),this.onPreview()}this.setupLinkWatch()})),X.onBeforeUnmount(()=>{this.cleanup(),e.unregister(),this.stopLinkWatch()}),X.watch(()=>this.props.conf,()=>{this.props.mode==="edit"&&t()},{deep:!0}),X.watch(()=>this.props.theme,()=>{this.init()}),X.watch(()=>{var i;return(i=this.Style.value)==null?void 0:i.linkChannel},()=>{this.setupLinkWatch()})}getStyle(){return this.Style}getType(){return this.componentType}dispatchModal(t,e,i){this.props.mode==="preview"&&window.dispatchEvent(new CustomEvent("mix-modal",{detail:{action:t,layerId:e,sheetIndex:i!=null?i:-1}}))}triggerModalByKey(t){var i,r;if(this.props.mode!=="preview")return;const e=(i=this.props.conf)==null?void 0:i.modalBinding;if(e&&e.enabled&&e.mode==="key"){const a=(e.map||{})[t];if(!a||!a.layerId)return;const c=a.action||"toggle",l=(r=e.sheetIndex)!=null?r:-1;this.dispatchModal(c,a.layerId,l)}}}var yt={exports:{}},_t;function Zt(){if(_t)return yt.exports;_t=1;var n=yt.exports={};return n.forEach=function(t,e){for(var i=0;i<t.length;i++){var r=e(t[i]);if(r)return r}},yt.exports}var mt,zt;function Ce(){return zt||(zt=1,mt=function(n){var t=n.stateHandler.getState;function e(a){var c=t(a);return c&&!!c.isDetectable}function i(a){t(a).isDetectable=!0}function r(a){return!!t(a).busy}function o(a,c){t(a).busy=!!c}return{isDetectable:e,markAsDetectable:i,isBusy:r,markBusy:o}}),mt}var St,Mt;function De(){return Mt||(Mt=1,St=function(n){var t={};function e(a){var c=n.get(a);return c===void 0?[]:t[c]||[]}function i(a,c){var l=n.get(a);t[l]||(t[l]=[]),t[l].push(c)}function r(a,c){for(var l=e(a),f=0,u=l.length;f<u;++f)if(l[f]===c){l.splice(f,1);break}}function o(a){var c=e(a);c&&(c.length=0)}return{get:e,add:i,removeListener:r,removeAllListeners:o}}),St}var wt,qt;function je(){return qt||(qt=1,wt=function(){var n=1;function t(){return n++}return{generate:t}}),wt}var kt,Nt;function Ie(){return Nt||(Nt=1,kt=function(n){var t=n.idGenerator,e=n.stateHandler.getState;function i(o){var a=e(o);return a&&a.id!==void 0?a.id:null}function r(o){var a=e(o);if(!a)throw new Error("setId required the element to have a resize detection state.");var c=t.generate();return a.id=c,c}return{get:i,set:r}}),kt}var Et,Wt;function Ae(){return Wt||(Wt=1,Et=function(n){function t(){}var e={log:t,warn:t,error:t};if(!n&&window.console){var i=function(r,o){r[o]=function(){var c=console[o];if(c.apply)c.apply(console,arguments);else for(var l=0;l<arguments.length;l++)c(arguments[l])}};i(e,"log"),i(e,"warn"),i(e,"error")}return e}),Et}var xt={exports:{}},Pt;function te(){if(Pt)return xt.exports;Pt=1;var n=xt.exports={};return n.isIE=function(t){function e(){var r=navigator.userAgent.toLowerCase();return r.indexOf("msie")!==-1||r.indexOf("trident")!==-1||r.indexOf(" edge/")!==-1}if(!e())return!1;if(!t)return!0;var i=(function(){var r,o=3,a=document.createElement("div"),c=a.getElementsByTagName("i");do a.innerHTML="<!--[if gt IE "+ ++o+"]><i></i><![endif]-->";while(c[0]);return o>4?o:r})();return t===i},n.isLegacyOpera=function(){return!!window.opera},xt.exports}var Ct={exports:{}},Bt;function Le(){if(Bt)return Ct.exports;Bt=1;var n=Ct.exports={};n.getOption=t;function t(e,i,r){var o=e[i];return o==null&&r!==void 0?r:o}return Ct.exports}var Dt,Ut;function He(){if(Ut)return Dt;Ut=1;var n=Le();Dt=function(i){i=i||{};var r=i.reporter,o=n.getOption(i,"async",!0),a=n.getOption(i,"auto",!0);a&&!o&&(r&&r.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."),o=!0);var c=t(),l,f=!1;function u(m,x){!f&&a&&o&&c.size()===0&&D(),c.add(m,x)}function v(){for(f=!0;c.size();){var m=c;c=t(),m.process()}f=!1}function y(m){f||(m===void 0&&(m=o),l&&(g(l),l=null),m?D():v())}function D(){l=b(v)}function g(m){var x=clearTimeout;return x(m)}function b(m){var x=function(I){return setTimeout(I,0)};return x(m)}return{add:u,force:y}};function t(){var e={},i=0,r=0,o=0;function a(f,u){u||(u=f,f=0),f>r?r=f:f<o&&(o=f),e[f]||(e[f]=[]),e[f].push(u),i++}function c(){for(var f=o;f<=r;f++)for(var u=e[f],v=0;v<u.length;v++){var y=u[v];y()}}function l(){return i}return{add:a,process:c,size:l}}return Dt}var jt,$t;function Te(){if($t)return jt;$t=1;var n="_erd";function t(r){return r[n]={},e(r)}function e(r){return r[n]}function i(r){delete r[n]}return jt={initState:t,getState:e,cleanState:i},jt}var It,Ft;function Re(){if(Ft)return It;Ft=1;var n=te();return It=function(t){t=t||{};var e=t.reporter,i=t.batchProcessor,r=t.stateHandler.getState;if(!e)throw new Error("Missing required dependency: reporter.");function o(u,v){function y(){v(u)}if(n.isIE(8))r(u).object={proxy:y},u.attachEvent("onresize",y);else{var D=l(u);if(!D)throw new Error("Element is not detectable by this strategy.");D.contentDocument.defaultView.addEventListener("resize",y)}}function a(u){var v=t.important?" !important; ":"; ";return(u.join(v)+v).trim()}function c(u,v,y){y||(y=v,v=u,u=null),u=u||{},u.debug;function D(g,b){var m=a(["display: block","position: absolute","top: 0","left: 0","width: 100%","height: 100%","border: none","padding: 0","margin: 0","opacity: 0","z-index: -1000","pointer-events: none"]),x=!1,I=window.getComputedStyle(g),E=g.offsetWidth,P=g.offsetHeight;r(g).startSize={width:E,height:P};function p(){function s(){if(I.position==="static"){g.style.setProperty("position","relative",u.important?"important":"");var j=function(z,H,q,A){function B(dt){return dt.replace(/[^-\d\.]/g,"")}var U=q[A];U!=="auto"&&B(U)!=="0"&&(z.warn("An element that is positioned static has style."+A+"="+U+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+A+" will be set to 0. Element: ",H),H.style.setProperty(A,"0",u.important?"important":""))};j(e,g,I,"top"),j(e,g,I,"right"),j(e,g,I,"bottom"),j(e,g,I,"left")}}function w(){x||s();function j(H,q){if(!H.contentDocument){var A=r(H);A.checkForObjectDocumentTimeoutId&&window.clearTimeout(A.checkForObjectDocumentTimeoutId),A.checkForObjectDocumentTimeoutId=setTimeout(function(){A.checkForObjectDocumentTimeoutId=0,j(H,q)},100);return}q(H.contentDocument)}var z=this;j(z,function(q){b(g)})}I.position!==""&&(s(),x=!0);var h=document.createElement("object");h.style.cssText=m,h.tabIndex=-1,h.type="text/html",h.setAttribute("aria-hidden","true"),h.onload=w,n.isIE()||(h.data="about:blank"),r(g)&&(g.appendChild(h),r(g).object=h,n.isIE()&&(h.data="about:blank"))}i?i.add(p):p()}n.isIE(8)?y(v):D(v,y)}function l(u){return r(u).object}function f(u){if(r(u)){var v=l(u);v&&(n.isIE(8)?u.detachEvent("onresize",v.proxy):u.removeChild(v),r(u).checkForObjectDocumentTimeoutId&&window.clearTimeout(r(u).checkForObjectDocumentTimeoutId),delete r(u).object)}}return{makeDetectable:c,addListener:o,uninstall:f}},It}var At,Yt;function Oe(){if(Yt)return At;Yt=1;var n=Zt().forEach;return At=function(t){t=t||{};var e=t.reporter,i=t.batchProcessor,r=t.stateHandler.getState;t.stateHandler.hasState;var o=t.idHandler;if(!i)throw new Error("Missing required dependency: batchProcessor");if(!e)throw new Error("Missing required dependency: reporter.");var a=v(),c="erd_scroll_detection_scrollbar_style",l="erd_scroll_detection_container";function f(p){y(p,c,l)}f(window.document);function u(p){var s=t.important?" !important; ":"; ";return(p.join(s)+s).trim()}function v(){var p=500,s=500,w=document.createElement("div");w.style.cssText=u(["position: absolute","width: "+p*2+"px","height: "+s*2+"px","visibility: hidden","margin: 0","padding: 0"]);var h=document.createElement("div");h.style.cssText=u(["position: absolute","width: "+p+"px","height: "+s+"px","overflow: scroll","visibility: none","top: "+-p*3+"px","left: "+-s*3+"px","visibility: hidden","margin: 0","padding: 0"]),h.appendChild(w),document.body.insertBefore(h,document.body.firstChild);var j=p-h.clientWidth,z=s-h.clientHeight;return document.body.removeChild(h),{width:j,height:z}}function y(p,s,w){function h(q,A){A=A||function(U){p.head.appendChild(U)};var B=p.createElement("style");return B.innerHTML=q,B.id=s,A(B),B}if(!p.getElementById(s)){var j=w+"_animation",z=w+"_animation_active",H=`/* Created by the element-resize-detector library. */
2
2
  `;H+="."+w+" > div::-webkit-scrollbar { "+u(["display: none"])+` }
3
3
 
4
4
  `,H+="."+z+" { "+u(["-webkit-animation-duration: 0.1s","animation-duration: 0.1s","-webkit-animation-name: "+j,"animation-name: "+j])+` }
@@ -1 +1 @@
1
- "use strict";var C=Object.defineProperty,z=Object.defineProperties;var E=Object.getOwnPropertyDescriptors;var f=Object.getOwnPropertySymbols;var O=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable;var S=(s,e,a)=>e in s?C(s,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):s[e]=a,p=(s,e)=>{for(var a in e||(e={}))O.call(e,a)&&S(s,a,e[a]);if(f)for(var a of f(e))V.call(e,a)&&S(s,a,e[a]);return s},m=(s,e)=>z(s,E(e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),b=require("./element-resize-detector-BvkAwVg8.cjs"),_=require("./index-BSzyUGIT.cjs"),A=require("./titleStyle-NSnz6cUg.cjs"),v=require("./ele-evn-icon-DUQMS-9T.cjs"),D={class:"mix-body"},N={class:"mix-footer"},y="--",T={DEFAULT_ICON:v.DEFAULT_ICON,ACTIVE_ICON:v.ACTIVE_ICON,NAME_CN:"状态卡片",NAME_EN:"State",ORDER:3},I={nameSize:14,valueSize:36,timeSize:12,radiusSize:8,bgColor:"#fff",titleColor:"#111",textColor:"#111"},M=[{fv:"",status_fv:"",object_id:"",status:[{code:0,text:"离线",color:"#a40e0e"}]}],j=["fv","status_fv"],L=["mosaic"],R={useAlias:!1,source:"mosaic",multiObject:!1,hideMultiObject:!0},U=1,q={DEFAULT:T,OPTIONS:I,DATA:M,PARAMS:j,SOURCE:L,ITEMS:U,COMMON:R},$=t.defineComponent(m(p({},q),{__name:"evn",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(s){const e=s,a=t.ref(_.dayjs().format("YYYY-MM-DD HH:mm:ss"));class g extends b.BaseComponent{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#111"),nameSize:this.getOptionValue("nameSize",14),valueSize:this.getOptionValue("valueSize",36),timeSize:this.getOptionValue("timeSize",12),radiusSize:this.getOptionValue("radiusSize",8)}}init(){var o;this.Style.value=this.extractStyles(),this.applyTheme(),(o=this.props.conf.data)!=null&&o.length||(this.props.conf.data=[{fv:"",status_fv:"",object_id:"",status:[{code:0,text:"离线",color:"#a40e0e"}]}])}setSocketData(o){if(!o)return;const{data:n}=this.props.conf;!n||!Array.isArray(n)||n.forEach(i=>{var l;try{i.value=(l=this.extractDataValue(o,i.fv))!=null?l:y,i.statusValue=this.extractDataValue(o,i.status_fv),o.datetime&&(a.value=o.datetime)}catch(F){i.value=y}})}}const u=new g(e,"evn");u.setupLifecycle();const r=u.getStyle(),d=e.conf,h=t.computed(()=>A.generateTitleStyle(e.conf.options)),x=()=>{var i;const{data:c}=e.conf,o=c[0];let n={color:"",text:""};return(i=o==null?void 0:o.status)==null||i.forEach(l=>{String(l.code)===String(o.statusValue)&&(n={text:l.text,color:l.color})}),n};return(c,o)=>{var n,i,l;return t.openBlock(),t.createElementBlock("div",{class:"mix-component",style:t.normalizeStyle({background:t.unref(r).bgColor,borderRadius:`${t.unref(r).radiusSize}px`})},[t.createElementVNode("div",{class:"mix-title",style:t.normalizeStyle(h.value)},t.toDisplayString(t.unref(d).caption||x().text),5),t.createElementVNode("div",D,[t.createElementVNode("div",{class:"body-value",style:t.normalizeStyle({fontSize:`${t.unref(r).valueSize}px`,color:t.unref(r).textColor})},t.toDisplayString((l=(i=(n=t.unref(d))==null?void 0:n.data)==null?void 0:i[0])==null?void 0:l.value),5)]),t.createElementVNode("div",N,[t.createElementVNode("div",{class:"footer-time",style:t.normalizeStyle({fontSize:`${t.unref(r).timeSize}px`,color:t.unref(r).titleColor})},t.toDisplayString(a.value),5)]),t.renderSlot(c.$slots,"default",{},void 0,!0)],4)}}})),k=_._export_sfc($,[["__scopeId","data-v-eb019c9b"]]);exports.default=k;
1
+ "use strict";var C=Object.defineProperty,z=Object.defineProperties;var E=Object.getOwnPropertyDescriptors;var f=Object.getOwnPropertySymbols;var O=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable;var S=(s,e,a)=>e in s?C(s,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):s[e]=a,p=(s,e)=>{for(var a in e||(e={}))O.call(e,a)&&S(s,a,e[a]);if(f)for(var a of f(e))V.call(e,a)&&S(s,a,e[a]);return s},m=(s,e)=>z(s,E(e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),b=require("./element-resize-detector-DYs3pJPp.cjs"),_=require("./index-ZwyqrmaH.cjs"),A=require("./titleStyle-NSnz6cUg.cjs"),v=require("./ele-evn-icon-DUQMS-9T.cjs"),D={class:"mix-body"},N={class:"mix-footer"},y="--",T={DEFAULT_ICON:v.DEFAULT_ICON,ACTIVE_ICON:v.ACTIVE_ICON,NAME_CN:"状态卡片",NAME_EN:"State",ORDER:3},I={nameSize:14,valueSize:36,timeSize:12,radiusSize:8,bgColor:"#fff",titleColor:"#111",textColor:"#111"},M=[{fv:"",status_fv:"",object_id:"",status:[{code:0,text:"离线",color:"#a40e0e"}]}],j=["fv","status_fv"],L=["mosaic"],R={useAlias:!1,source:"mosaic",multiObject:!1,hideMultiObject:!0},U=1,q={DEFAULT:T,OPTIONS:I,DATA:M,PARAMS:j,SOURCE:L,ITEMS:U,COMMON:R},$=t.defineComponent(m(p({},q),{__name:"evn",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(s){const e=s,a=t.ref(_.dayjs().format("YYYY-MM-DD HH:mm:ss"));class g extends b.BaseComponent{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#111"),nameSize:this.getOptionValue("nameSize",14),valueSize:this.getOptionValue("valueSize",36),timeSize:this.getOptionValue("timeSize",12),radiusSize:this.getOptionValue("radiusSize",8)}}init(){var o;this.Style.value=this.extractStyles(),this.applyTheme(),(o=this.props.conf.data)!=null&&o.length||(this.props.conf.data=[{fv:"",status_fv:"",object_id:"",status:[{code:0,text:"离线",color:"#a40e0e"}]}])}setSocketData(o){if(!o)return;const{data:n}=this.props.conf;!n||!Array.isArray(n)||n.forEach(i=>{var l;try{i.value=(l=this.extractDataValue(o,i.fv))!=null?l:y,i.statusValue=this.extractDataValue(o,i.status_fv),o.datetime&&(a.value=o.datetime)}catch(F){i.value=y}})}}const u=new g(e,"evn");u.setupLifecycle();const r=u.getStyle(),d=e.conf,h=t.computed(()=>A.generateTitleStyle(e.conf.options)),x=()=>{var i;const{data:c}=e.conf,o=c[0];let n={color:"",text:""};return(i=o==null?void 0:o.status)==null||i.forEach(l=>{String(l.code)===String(o.statusValue)&&(n={text:l.text,color:l.color})}),n};return(c,o)=>{var n,i,l;return t.openBlock(),t.createElementBlock("div",{class:"mix-component",style:t.normalizeStyle({background:t.unref(r).bgColor,borderRadius:`${t.unref(r).radiusSize}px`})},[t.createElementVNode("div",{class:"mix-title",style:t.normalizeStyle(h.value)},t.toDisplayString(t.unref(d).caption||x().text),5),t.createElementVNode("div",D,[t.createElementVNode("div",{class:"body-value",style:t.normalizeStyle({fontSize:`${t.unref(r).valueSize}px`,color:t.unref(r).textColor})},t.toDisplayString((l=(i=(n=t.unref(d))==null?void 0:n.data)==null?void 0:i[0])==null?void 0:l.value),5)]),t.createElementVNode("div",N,[t.createElementVNode("div",{class:"footer-time",style:t.normalizeStyle({fontSize:`${t.unref(r).timeSize}px`,color:t.unref(r).titleColor})},t.toDisplayString(a.value),5)]),t.renderSlot(c.$slots,"default",{},void 0,!0)],4)}}})),k=_._export_sfc($,[["__scopeId","data-v-eb019c9b"]]);exports.default=k;
@@ -11,8 +11,8 @@ var v = (a, t, o) => t in a ? z(a, t, { enumerable: !0, configurable: !0, writab
11
11
  return a;
12
12
  }, h = (a, t) => O(a, b(t));
13
13
  import { defineComponent as V, ref as D, computed as T, openBlock as M, createElementBlock as N, normalizeStyle as f, unref as n, createElementVNode as c, toDisplayString as d, renderSlot as j } from "vue";
14
- import { B as I } from "./element-resize-detector-B-0BgVLy.js";
15
- import { e as L, _ as R } from "./index-C8teBAQd.js";
14
+ import { B as I } from "./element-resize-detector-BCRzpPES.js";
15
+ import { e as L, _ as R } from "./index-LgTfdmT4.js";
16
16
  import { g as U } from "./titleStyle-BT5GlpAb.js";
17
17
  import { A as k, D as B } from "./ele-evn-icon-MWzAujnD.js";
18
18
  const Y = { class: "mix-body" }, $ = { class: "mix-footer" }, y = "--", F = {