mixdashboards 1.0.39 → 1.0.40

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 (288) hide show
  1. package/dist/{EChartComponentBase-BaQpBzVC.cjs → EChartComponentBase-BTqBoBn8.cjs} +1 -1
  2. package/dist/{EChartComponentBase-BQOhWkz2.js → EChartComponentBase-GBbKjtlb.js} +1 -1
  3. package/dist/{UniverSheet-KlvmL1Yw.cjs → UniverSheet-B9dCqA-W.cjs} +1 -1
  4. package/dist/{UniverSheet-MSHzUXq0.js → UniverSheet-DIkltx8i.js} +2 -2
  5. package/dist/{accelerationChart-B1HPMmd2.js → accelerationChart-B7grHeml.js} +3 -3
  6. package/dist/{accelerationChart-DZj2V2vD.cjs → accelerationChart-CvNoIyue.cjs} +1 -1
  7. package/dist/{actionItem-BYCPoQK7.cjs → actionItem-BKNfuprM.cjs} +1 -1
  8. package/dist/{actionItem-Bb2xiYlY.js → actionItem-BrTSUE0J.js} +3 -3
  9. package/dist/{alarmLevelChart-CCioESvL.js → alarmLevelChart-CmjyIsWH.js} +2 -2
  10. package/dist/{alarmLevelChart-Bb0mAbwQ.cjs → alarmLevelChart-DBqGvaXQ.cjs} +1 -1
  11. package/dist/{alertTable-CQwr8YYt.js → alertTable-C8beWyfK.js} +2 -2
  12. package/dist/{alertTable-oaX5eJC0.cjs → alertTable-CZ2ufzg9.cjs} +1 -1
  13. package/dist/{annualRainfallChart-C21jEMBe.js → annualRainfallChart-D3Pck4he.js} +2 -2
  14. package/dist/{annualRainfallChart-pO8q6aUJ.cjs → annualRainfallChart-D3YQwScd.cjs} +1 -1
  15. package/dist/{api-P_s372dW.cjs → api-C0okiLNC.cjs} +1 -1
  16. package/dist/{api-C0GhBpqd.js → api-DhQsrEGY.js} +4 -4
  17. package/dist/{aqi-DlY2r7OA.cjs → aqi-91QfhWTq.cjs} +1 -1
  18. package/dist/{aqi-iLwQH4rc.js → aqi-DnrkU6z-.js} +10 -10
  19. package/dist/{aqiIndass-DBeVSBdy.js → aqiIndass-CzA5PVzc.js} +15 -15
  20. package/dist/{aqiIndass-BaIVBfdC.cjs → aqiIndass-D2h-731s.cjs} +1 -1
  21. package/dist/arrayCard-C-V_01r7.cjs +1 -0
  22. package/dist/arrayCard-mprI5bQN.js +94 -0
  23. package/dist/{audio-CThzVIDU.cjs → audio-CdVI14ea.cjs} +1 -1
  24. package/dist/{audio-CAP4D-J2.js → audio-Xj66qRvv.js} +5 -5
  25. package/dist/{bar-BjR566__.cjs → bar-DQ6kQXTC.cjs} +1 -1
  26. package/dist/{bar-D8C06GO4.js → bar-ub8ERs66.js} +4 -4
  27. package/dist/{bmp-Cjizh2x6.js → bmp-bXQBGW16.js} +3 -3
  28. package/dist/{bmp-DsmTzyce.cjs → bmp-xuWyQ9_n.cjs} +1 -1
  29. package/dist/{box-qgu_67OD.cjs → box-C9s5aZjl.cjs} +1 -1
  30. package/dist/{box-DqewT3MF.js → box-Dx6V-j_J.js} +2 -2
  31. package/dist/{chartConfigPanel-DwAUq3pf.js → chartConfigPanel-Bd47rczI.js} +1 -1
  32. package/dist/{chartConfigPanel-BiQArCoQ.cjs → chartConfigPanel-CLbbeZzN.cjs} +1 -1
  33. package/dist/{circleBar-CO89T7kj.cjs → circleBar-BsmKIein.cjs} +1 -1
  34. package/dist/{circleBar-DGHDWQih.js → circleBar-D8I2e0Ov.js} +8 -8
  35. package/dist/{clock-CT8YXEU3.js → clock-7kw9zMJ0.js} +2 -2
  36. package/dist/{clock-32hGccm4.cjs → clock-bnKjuzzp.cjs} +1 -1
  37. package/dist/{clt-5bP_g1O-.cjs → clt-7F8jS0WQ.cjs} +1 -1
  38. package/dist/{clt-FfIEfGtn.js → clt-BGGFfbQ5.js} +3 -3
  39. package/dist/{cmc-dbuLkE8o.cjs → cmc-B2ja2VKe.cjs} +1 -1
  40. package/dist/{cmc-B2nQFZIS.js → cmc-DTiGNWEl.js} +3 -3
  41. package/dist/{cmp-QQlYcnqo.js → cmp-BXx9BxO1.js} +12 -12
  42. package/dist/{cmp-l3U9fIrz.cjs → cmp-D9MzneF0.cjs} +1 -1
  43. package/dist/{composite-DjhrBgG1.js → composite-C6PQB2RS.js} +8 -8
  44. package/dist/{composite-DlY2_x6P.cjs → composite-Dh9pPcWq.cjs} +1 -1
  45. package/dist/config-D3MEjLGn.js +9 -0
  46. package/dist/config-UTUPYJ45.cjs +1 -0
  47. package/dist/{controlList-BdF8xNAi.js → controlList-VioXoP_4.js} +3 -3
  48. package/dist/{controlList-De6PXdOc.cjs → controlList-uLJtFu1P.cjs} +1 -1
  49. package/dist/{controlRecordList-CKpAr1ON.js → controlRecordList-DY7qKQp1.js} +3 -3
  50. package/dist/{controlRecordList-u5a7chIX.cjs → controlRecordList-GtFLhcc9.cjs} +1 -1
  51. package/dist/{crd-BVAf41oX.js → crd-Bf8Rmcf5.js} +2 -2
  52. package/dist/{crd-BoaXQhFQ.cjs → crd-DdsOuCBh.cjs} +1 -1
  53. package/dist/{ctrBtn-ZPRYWE66.js → ctrBtn-BSzyUEkN.js} +4 -4
  54. package/dist/{ctrBtn-C9kQiqY1.cjs → ctrBtn-GKFfJlE2.cjs} +1 -1
  55. package/dist/{ctrSet-C87dxLfQ.js → ctrSet--1TrVZDc.js} +4 -4
  56. package/dist/{ctrSet-CNCrnLSs.cjs → ctrSet-CDr5scQE.cjs} +1 -1
  57. package/dist/{ctrSwitch-CkC_Axtp.js → ctrSwitch-ezGEAkLG.js} +4 -4
  58. package/dist/{ctrSwitch-CVEtbdfb.cjs → ctrSwitch-kHoyJDax.cjs} +1 -1
  59. package/dist/{dataManagement-n711sd1g.cjs → dataManagement-DxTZAlJy.cjs} +1 -1
  60. package/dist/{dataManagement-CjlNfeYq.js → dataManagement-oWoI1QPO.js} +2 -2
  61. package/dist/{dataReport-ByjswEqq.js → dataReport-BATqcXj4.js} +2 -2
  62. package/dist/{dataReport-BsVjW3p7.cjs → dataReport-Dygq1jQV.cjs} +1 -1
  63. package/dist/{dataTable-K7j4fhnq.cjs → dataTable-CotUzlhz.cjs} +1 -1
  64. package/dist/{dataTable-DX500R1i.js → dataTable-DIKwnInT.js} +1 -1
  65. package/dist/{datetime-DVbJtALf.js → datetime-CK042aN0.js} +2 -2
  66. package/dist/{datetime-DYXWKrXI.cjs → datetime-DLASaAKw.cjs} +1 -1
  67. package/dist/{deepClusterSlipSurface-CQUE05cK.js → deepClusterSlipSurface-C52_bDho.js} +6 -6
  68. package/dist/{deepClusterSlipSurface-B7nkEM9A.cjs → deepClusterSlipSurface-D8v4xJGF.cjs} +1 -1
  69. package/dist/{deepDataMatrix-DHZA0IAm.cjs → deepDataMatrix-C-NrtGtk.cjs} +1 -1
  70. package/dist/{deepDataMatrix-ai5rB6ET.js → deepDataMatrix-CdB1ZO5Q.js} +2 -2
  71. package/dist/{deepDisplacement3D-BsUzvbQb.js → deepDisplacement3D-C3Salw1w.js} +3 -3
  72. package/dist/{deepDisplacement3D-BFqKqSYg.cjs → deepDisplacement3D-CzM-wm4q.cjs} +1 -1
  73. package/dist/{deepDisplacementChart-Ba67v6um.cjs → deepDisplacementChart-BqZ4nUgg.cjs} +1 -1
  74. package/dist/{deepDisplacementChart-2JZNrhrw.cjs → deepDisplacementChart-ByIJTYX6.cjs} +1 -1
  75. package/dist/{deepDisplacementChart-igl4rW1K.js → deepDisplacementChart-GcH8IGA4.js} +2 -2
  76. package/dist/{deepDisplacementChart-BCIuCMdK.js → deepDisplacementChart-ndHgH60B.js} +4 -4
  77. package/dist/{deepDisplacementView-BedWJsx7.js → deepDisplacementView-Bo_pmf0R.js} +1 -1
  78. package/dist/{deepDisplacementView-wQxyKzB-.cjs → deepDisplacementView-Bq_G0GlS.cjs} +1 -1
  79. package/dist/{deepNodeTemperatureChart-DLeb9jKp.js → deepNodeTemperatureChart-CXgft_WM.js} +6 -6
  80. package/dist/{deepNodeTemperatureChart-albL8hKa.cjs → deepNodeTemperatureChart-Dsl1Zm8T.cjs} +1 -1
  81. package/dist/{deepTangentAngleChart-C6xOiITk.js → deepTangentAngleChart-D-WoGKz7.js} +7 -7
  82. package/dist/{deepTangentAngleChart-DukevXaM.cjs → deepTangentAngleChart-iLt3bK8f.cjs} +1 -1
  83. package/dist/{deepTemperatureField-B-y94GPV.js → deepTemperatureField-BFB8bQde.js} +7 -7
  84. package/dist/{deepTemperatureField-De4xKoHw.cjs → deepTemperatureField-DnpuZuD8.cjs} +1 -1
  85. package/dist/{deepTrendChart-MmuYSXtu.cjs → deepTrendChart-BghE13XG.cjs} +1 -1
  86. package/dist/{deepTrendChart-DCkV2HNv.js → deepTrendChart-E-mAzsST.js} +6 -6
  87. package/dist/{deviceOnlineStatus-CFuCTx7_.js → deviceOnlineStatus-CkZijkjC.js} +2 -2
  88. package/dist/{deviceOnlineStatus-B5cCjhNA.cjs → deviceOnlineStatus-TQ-Fv8ye.cjs} +1 -1
  89. package/dist/{deviceStatus-DsEtKiGo.cjs → deviceStatus-BkKc9wqU.cjs} +1 -1
  90. package/dist/{deviceStatus-B2ibBDSi.js → deviceStatus-BvJr98D0.js} +2 -2
  91. package/dist/{displacementDataTable-BDqG1IvI.js → displacementDataTable-BJ5S7te1.js} +2 -2
  92. package/dist/{displacementDataTable-oLnUdafv.cjs → displacementDataTable-DJUK3mBu.cjs} +1 -1
  93. package/dist/{displacementTrajectoryChart-CBhPwZhe.cjs → displacementTrajectoryChart-C2estBCm.cjs} +1 -1
  94. package/dist/{displacementTrajectoryChart-Crf55oKi.js → displacementTrajectoryChart-DGS9Mn7o.js} +3 -3
  95. package/dist/{displacementTrendChart-CWihCuIJ.cjs → displacementTrendChart-CgsIcHCK.cjs} +1 -1
  96. package/dist/{displacementTrendChart-10n_lC9j.js → displacementTrendChart-Ddgpsnta.js} +2 -2
  97. package/dist/{dxf-D8zHpz5g.js → dxf-B0EL1hyB.js} +5 -5
  98. package/dist/{dxf-DDh_DcQy.cjs → dxf-DbxtgQWv.cjs} +1 -1
  99. package/dist/{dzc-DLCdTCwW.js → dzc-ACr2bZGl.js} +10 -10
  100. package/dist/{dzc-uNTDJqpi.cjs → dzc-Bdm2nr1F.cjs} +1 -1
  101. package/dist/{arrayCard-DNNUEPvW.js → ele-arrayCard-icon-CAk9ojr4.js} +3 -91
  102. package/dist/ele-arrayCard-icon-QOabvV0y.cjs +1 -0
  103. package/dist/{element-resize-detector-Bo5uDQAu.cjs → element-resize-detector-BlMXyWIR.cjs} +1 -1
  104. package/dist/{element-resize-detector-DJcsrJ8s.js → element-resize-detector-DeMhGbNi.js} +4 -4
  105. package/dist/{evn-YwCALVXj.js → evn-D0llPvjK.js} +2 -2
  106. package/dist/{evn-DuL5oVRl.cjs → evn-Moewbl2h.cjs} +1 -1
  107. package/dist/{evolutionChart-4noZSdLX.js → evolutionChart-Cz_GOcB8.js} +3 -3
  108. package/dist/{evolutionChart-AeL67MAt.cjs → evolutionChart-DBwL00ZJ.cjs} +1 -1
  109. package/dist/{fileViewer-bsrjlJkC.cjs → fileViewer-BtjOAdM9.cjs} +1 -1
  110. package/dist/{fileViewer-DiH3PM0r.js → fileViewer-D-WNR3vF.js} +5 -5
  111. package/dist/{filterBar-Ct1BFhrS.cjs → filterBar-4Q9XSiAY.cjs} +1 -1
  112. package/dist/{filterBar-CWEguwYc.js → filterBar-DLYmU350.js} +2 -2
  113. package/dist/{fireCombustionCurve-DYPC4zKJ.js → fireCombustionCurve-BU3pplHd.js} +2 -2
  114. package/dist/{fireCombustionCurve-DyiQn-WA.cjs → fireCombustionCurve-CWggQsw1.cjs} +1 -1
  115. package/dist/{fireFilterBar-Bdm2ljuO.cjs → fireFilterBar-EKwzMAFp.cjs} +1 -1
  116. package/dist/{fireFilterBar-DGHPNTwF.js → fireFilterBar-ROtoXZex.js} +2 -2
  117. package/dist/{gag-HiNaL81R.cjs → gag-CvMEVCbE.cjs} +1 -1
  118. package/dist/{gag-kvkKzJuO.js → gag-D8mNPZnH.js} +5 -5
  119. package/dist/gasStationList-CWg8IYCo.cjs +1 -0
  120. package/dist/gasStationList-qVKS-fgC.js +984 -0
  121. package/dist/{glbModel-DtBI72ap.cjs → glbModel-CQBEujd2.cjs} +1 -1
  122. package/dist/{glbModel-CUz6CyVF.js → glbModel-U_yKQZWm.js} +2 -2
  123. package/dist/{gnssFilterBar-TBtirXIB.js → gnssFilterBar-o7zpW7jS.js} +2 -2
  124. package/dist/{gnssFilterBar-BQgY5x1W.cjs → gnssFilterBar-pvMsIjFy.cjs} +1 -1
  125. package/dist/{gnssHistoryTable-U8O7nyO7.js → gnssHistoryTable-BYg9jtl5.js} +3 -3
  126. package/dist/{gnssHistoryTable-D1ZLJOgh.cjs → gnssHistoryTable-Ddcw3-NB.cjs} +1 -1
  127. package/dist/{gnssMapView-42zmAd9q.cjs → gnssMapView--c2UXuOb.cjs} +1 -1
  128. package/dist/{gnssMapView-CaBfWeT1.js → gnssMapView-DMcq2u2c.js} +2 -2
  129. package/dist/{gnssTimeSeriesChart-CV2w_Aik.cjs → gnssTimeSeriesChart-984dcBPA.cjs} +1 -1
  130. package/dist/{gnssTimeSeriesChart-BrXYvuh6.js → gnssTimeSeriesChart-BtUSps0z.js} +4 -4
  131. package/dist/{gnssXYTrajectory-BmzSYjQ_.cjs → gnssXYTrajectory-D9JmAqC0.cjs} +1 -1
  132. package/dist/{gnssXYTrajectory-D2DoYnze.js → gnssXYTrajectory-DvIpI-GX.js} +3 -3
  133. package/dist/{grd-DW8cSFVR.cjs → grd-Cb8vd52d.cjs} +1 -1
  134. package/dist/{grd-B0GUjLm9.js → grd-DcxFaMyv.js} +3 -3
  135. package/dist/{grdIndass-DduUKZJm.js → grdIndass-BPLTUWIc.js} +3 -3
  136. package/dist/{grdIndass-BeBXVsos.cjs → grdIndass-FkNJ9pl6.cjs} +1 -1
  137. package/dist/{grg-CeX0pirQ.js → grg-Baot_Pdv.js} +6 -6
  138. package/dist/{grg-fnpcXtju.cjs → grg-CoDiLjcl.cjs} +1 -1
  139. package/dist/{gridview-DpABhCIw.cjs → gridview-BwDeg0tI.cjs} +1 -1
  140. package/dist/{gridview-BPwWXza9.js → gridview-DN8V84hl.js} +2 -2
  141. package/dist/{groupCard-De1E15mW.js → groupCard-D5wLscZo.js} +2 -2
  142. package/dist/{groupCard-WNE6gAAl.cjs → groupCard-DChtdioU.cjs} +1 -1
  143. package/dist/{headerBar-CZ3qcLHo.js → headerBar-DLvSZsMl.js} +3 -3
  144. package/dist/{headerBar-Qi1EXrr6.cjs → headerBar-m57S9WlE.cjs} +1 -1
  145. package/dist/{history-DAmBl4_5.cjs → history-C4gipwnp.cjs} +1 -1
  146. package/dist/{history-BkZhlpdY.js → history-DN0IVkYL.js} +3 -3
  147. package/dist/index-EnNA0nIi.cjs +582 -0
  148. package/dist/{index-kShjySl9.js → index-zPaMBZk-.js} +1047 -1065
  149. package/dist/{insarDeformChart-CnuSL1d9.js → insarDeformChart-DZl03mOe.js} +2 -2
  150. package/dist/{insarDeformChart-BGr2xe7w.cjs → insarDeformChart-DkiLrhem.cjs} +1 -1
  151. package/dist/{insarImageViewer-DRgGdQmN.cjs → insarImageViewer-ZcqHEEZr.cjs} +1 -1
  152. package/dist/{insarImageViewer-EmVThmVQ.js → insarImageViewer-kqYV5A1S.js} +2 -2
  153. package/dist/{kds-DTYWOq4K.cjs → kds-Ba0yzyNm.cjs} +1 -1
  154. package/dist/{kds-CpIQFgeY.js → kds-BbyaSB3L.js} +10 -10
  155. package/dist/{layerTabs-BATcBkTA.cjs → layerTabs-D2M3EVxt.cjs} +1 -1
  156. package/dist/{layerTabs-uze6K91A.js → layerTabs-SRHmamTF.js} +2 -2
  157. package/dist/{lin-Ba6fHkYf.cjs → lin-0U8FQZHZ.cjs} +1 -1
  158. package/dist/{lin-DU_EuPRg.js → lin-DxnORLL5.js} +8 -8
  159. package/dist/{linIndass-urYe5inp.cjs → linIndass-CX9Z02-e.cjs} +1 -1
  160. package/dist/{linIndass-XHKElG7L.js → linIndass-DXtxVxcr.js} +7 -7
  161. package/dist/{lst-C7aee1cU.js → lst-BKALUOuy.js} +2 -2
  162. package/dist/{lst-CpmoEQDY.cjs → lst-Bk2nvLuQ.cjs} +1 -1
  163. package/dist/{manualEntry-D9m_WPw3.js → manualEntry-DHH0Yrr3.js} +2 -2
  164. package/dist/{manualEntry-CJPiO5nh.cjs → manualEntry-DRK0QRnb.cjs} +1 -1
  165. package/dist/{mapBackground-6g_71Fwa.js → mapBackground-BXj8T-bG.js} +2 -2
  166. package/dist/{mapBackground-CF_TqNBy.cjs → mapBackground-DTuXORjO.cjs} +1 -1
  167. package/dist/{mappingList-CR55Tq4t.cjs → mappingList-M9OukdCu.cjs} +1 -1
  168. package/dist/{mappingList-luT5YE0d.js → mappingList-N-lL8mnV.js} +3 -3
  169. package/dist/{markdownViewer-D1hDk2Y7.cjs → markdownViewer-CcLL2hzV.cjs} +1 -1
  170. package/dist/{markdownViewer-CnguoUr8.js → markdownViewer-CgabPFUn.js} +5 -5
  171. package/dist/{mix-control-modal-CHiX3hQs.js → mix-control-modal-DRL4otx8.js} +3 -3
  172. package/dist/{mix-control-modal-BDHAB4Tw.cjs → mix-control-modal-Lhzopftt.cjs} +1 -1
  173. package/dist/{mixDataPermission-BaqV0Z6N.js → mixDataPermission-B5fpqFgm.js} +4 -3
  174. package/dist/{mixDataPermission-BTA1jNd1.cjs → mixDataPermission-CWt9H_Ib.cjs} +1 -1
  175. package/dist/{mixGrid-3BqQCvg8.cjs → mixGrid-DTwH6At3.cjs} +1 -1
  176. package/dist/{mixGrid-C0eEvwPy.js → mixGrid-wE427LB0.js} +3 -3
  177. package/dist/{mixMap-7upgYwWk.js → mixMap-Bo7_Womf.js} +3 -3
  178. package/dist/{mixMap-Bw-We4Cm.cjs → mixMap-DKDtSARk.cjs} +1 -1
  179. package/dist/{mixModel-BqE_Kd4c.js → mixModel-CdMcRi5k.js} +10 -10
  180. package/dist/{mixModel-CgV4XptM.cjs → mixModel-Dufgy8XG.cjs} +1 -1
  181. package/dist/{mixPie-9LfMCTQV.cjs → mixPie-BoUARcVT.cjs} +1 -1
  182. package/dist/{mixPie-B-HeglUn.js → mixPie-Dr9Toi5T.js} +7 -7
  183. package/dist/mixdashboards.cjs +1 -1
  184. package/dist/mixdashboards.css +1 -1
  185. package/dist/mixdashboards.js +1 -1
  186. package/dist/{mjpegCamera-Cfw3rzT5.js → mjpegCamera-BBqBIpmz.js} +2 -2
  187. package/dist/{mjpegCamera-nxKfhobY.cjs → mjpegCamera-C20yRxub.cjs} +1 -1
  188. package/dist/{monitorAlert-Bt0baNh4.cjs → monitorAlert-BgRCm9Vs.cjs} +1 -1
  189. package/dist/{monitorAlert-Bg5vzzyG.js → monitorAlert-DVfJ6uNR.js} +2 -2
  190. package/dist/{monitorData-CzPVIk_4.cjs → monitorData-Dz_cHcBR.cjs} +1 -1
  191. package/dist/{monitorData-BvAMeOrp.js → monitorData-zfcYQmc8.js} +3 -3
  192. package/dist/{monitorSpeedChart-0bDuU3Kj.js → monitorSpeedChart-DYV_S1um.js} +1 -1
  193. package/dist/{monitorSpeedChart-C52QjA5K.cjs → monitorSpeedChart-jAf_Agnm.cjs} +1 -1
  194. package/dist/{mxa-eLAgZPMC.cjs → mxa-DGkX2ysU.cjs} +1 -1
  195. package/dist/{mxa-BW80xKCc.js → mxa-mziDHRQU.js} +7 -7
  196. package/dist/myValue-6J41vLFg.cjs +1 -0
  197. package/dist/myValue-s0IC6eg0.js +149 -0
  198. package/dist/myValueList-Dl-JfGq6.cjs +1 -0
  199. package/dist/myValueList-cOT1nYnO.js +451 -0
  200. package/dist/{objectList-Cf9GMyXN.js → objectList-DGBiB_w6.js} +100 -95
  201. package/dist/objectList-DK5_HGK_.cjs +1 -0
  202. package/dist/photo-CBfgcj6v.cjs +1 -0
  203. package/dist/photo-C_1tDAZa.js +342 -0
  204. package/dist/{pie-DxoBrm0D.cjs → pie-DAEzlPEp.cjs} +1 -1
  205. package/dist/{pie-BDLg-Rls.js → pie-p9CvjJ_m.js} +7 -7
  206. package/dist/{pressBtn-t0g4vk7s.cjs → pressBtn-DMMLEAFZ.cjs} +1 -1
  207. package/dist/{pressBtn-CXG1eSWC.js → pressBtn-DlhDUUdy.js} +4 -4
  208. package/dist/{progressBar-BXaFKSCq.js → progressBar-C3K0DYlI.js} +2 -2
  209. package/dist/{progressBar-CJEWkZ42.cjs → progressBar-ZksfXpzu.cjs} +1 -1
  210. package/dist/{progressCircle-DpOI5D5z.js → progressCircle-BBLr8loP.js} +2 -2
  211. package/dist/{progressCircle-uQ7vaMKM.cjs → progressCircle-eFwDltuC.cjs} +1 -1
  212. package/dist/{qrcode-CX8aymYZ.js → qrcode-DgwPQO8V.js} +297 -298
  213. package/dist/qrcode-F7MtRi3K.cjs +1 -0
  214. package/dist/{raceBar-Cv0-0ogd.cjs → raceBar-Cp-9uqpX.cjs} +1 -1
  215. package/dist/{raceBar-DFaH342G.js → raceBar-CyW79eH-.js} +7 -7
  216. package/dist/{rad-CFswUTwi.cjs → rad-CLvi3eWj.cjs} +1 -1
  217. package/dist/{rad-NS2G_nMg.js → rad-CbFS-xjy.js} +7 -7
  218. package/dist/{rainfallFilterBar-D_Ye_NeB.js → rainfallFilterBar-B0G4jUib.js} +2 -2
  219. package/dist/{rainfallFilterBar-BI45QvJm.cjs → rainfallFilterBar-DldKT-I5.cjs} +1 -1
  220. package/dist/{rainfallTimeCurve-BHWqX47Q.js → rainfallTimeCurve-BlyxLbcV.js} +3 -3
  221. package/dist/{rainfallTimeCurve-Ke1JvSWq.cjs → rainfallTimeCurve-C5r3fOW8.cjs} +1 -1
  222. package/dist/{rangeLin-D6VZ2U3C.cjs → rangeLin-B2vKFJHK.cjs} +1 -1
  223. package/dist/{rangeLin-GMYEgLeP.js → rangeLin-CLAcLUai.js} +7 -7
  224. package/dist/{request-Bn100qAJ.cjs → request-4n94CBXg.cjs} +1 -1
  225. package/dist/{request-BD0x5Hkt.js → request-DT13bnc0.js} +1 -1
  226. package/dist/{retainer1-h-Whr2c9.js → retainer1-Dy2VHVgc.js} +3 -3
  227. package/dist/{retainer1-D2XmjXYH.cjs → retainer1-EFUFSxMm.cjs} +1 -1
  228. package/dist/{retainer2-ByQdiRjq.js → retainer2-3ITxlgwH.js} +3 -3
  229. package/dist/{retainer2-cF-trL2g.cjs → retainer2-BKVJLvBo.cjs} +1 -1
  230. package/dist/{riskRegionTable-CQxAkG7k.js → riskRegionTable-BQ88G7F7.js} +2 -2
  231. package/dist/{riskRegionTable-cKnxra4_.cjs → riskRegionTable-C2GOEi0n.cjs} +1 -1
  232. package/dist/{sankey-Bk1IcVJQ.js → sankey-ehJmtfKp.js} +9 -9
  233. package/dist/{sankey-MRirEgU0.cjs → sankey-utV5RADH.cjs} +1 -1
  234. package/dist/{scd-BDRpzmsa.js → scd-D-Y1EEoF.js} +2 -2
  235. package/dist/{scd-J-mN3eI5.cjs → scd-Nx15OHeb.cjs} +1 -1
  236. package/dist/{sideMenu-l8X2E00H.cjs → sideMenu-Ci3pDMFm.cjs} +1 -1
  237. package/dist/{sideMenu-BgTMtnMq.js → sideMenu-D6MgOAkf.js} +2 -2
  238. package/dist/{slopeStability-BPf7m0fJ.cjs → slopeStability-B9WvyL3-.cjs} +1 -1
  239. package/dist/{slopeStability-C5RqZ1im.js → slopeStability-Bu2a83d7.js} +3 -3
  240. package/dist/{speedCurve-C3pK-zZy.js → speedCurve-BR_xyp4X.js} +3 -3
  241. package/dist/{speedCurve-CluwNAZl.cjs → speedCurve-DrndMOKB.cjs} +1 -1
  242. package/dist/{staticLine-C6tGGXcN.cjs → staticLine-BLUdDtae.cjs} +1 -1
  243. package/dist/{staticLine-DXWOLj15.js → staticLine-DYQUjE_3.js} +7 -7
  244. package/dist/{store-DzDtVfSX.js → store-BpVoYd93.js} +2 -2
  245. package/dist/{store-BJW2NQkK.cjs → store-KXsdwyLp.cjs} +1 -1
  246. package/dist/{swiper-DGqDoUkX.cjs → swiper-53BGkj5I.cjs} +1 -1
  247. package/dist/{swiper-IMlGje3t.js → swiper-S8NYmcYS.js} +3 -3
  248. package/dist/{terminalConfigList-D6xDHsnb.cjs → terminalConfigList-DFDsxg1q.cjs} +1 -1
  249. package/dist/{terminalConfigList-SAyXi-BK.js → terminalConfigList-DaEpZiog.js} +3 -3
  250. package/dist/{terminalList-ml2C18MY.cjs → terminalList-BgNFp3E0.cjs} +1 -1
  251. package/dist/{terminalList-CjSHshiR.js → terminalList-mKVmYqJm.js} +3 -3
  252. package/dist/{textbox-BLV-SY8e.js → textbox-Bazh9LRC.js} +4 -4
  253. package/dist/{textbox-AQtCe25j.cjs → textbox-DAyhC67s.cjs} +1 -1
  254. package/dist/{timeQueryBar-BuKakMy8.cjs → timeQueryBar-2cbPr7zw.cjs} +1 -1
  255. package/dist/{timeQueryBar-BeMu_DYr.js → timeQueryBar-BnVnJk5K.js} +1 -1
  256. package/dist/{timeSeries-DP5iZKVM.js → timeSeries-BF-2qAA7.js} +4 -4
  257. package/dist/{timeSeries-DfGgFWiF.cjs → timeSeries-DEeo2zjY.cjs} +1 -1
  258. package/dist/{timeSeriesCurve-B0Mw6eNK.cjs → timeSeriesCurve-BMhNq3WC.cjs} +1 -1
  259. package/dist/{timeSeriesCurve-BSgtPqYw.js → timeSeriesCurve-CkCeP5mK.js} +3 -3
  260. package/dist/{toggleBtn-O2Y75Uen.js → toggleBtn-BnIia9MT.js} +7 -7
  261. package/dist/{toggleBtn-Dh64vVWo.cjs → toggleBtn-hg6nIH97.cjs} +1 -1
  262. package/dist/{trajectoryConfigPanel--C1h3tK6.js → trajectoryConfigPanel-CfnLHqWP.js} +1 -1
  263. package/dist/{trajectoryConfigPanel-P_Qa4omj.cjs → trajectoryConfigPanel-agVnGJJ6.cjs} +1 -1
  264. package/dist/{trajectoryScatter-VLrmImlq.js → trajectoryScatter-BBL5uJSS.js} +6 -6
  265. package/dist/{trajectoryScatter-BbpbgNb8.cjs → trajectoryScatter-BzFxJkJn.cjs} +1 -1
  266. package/dist/{universalConfigPanel-DBg76b4F.js → universalConfigPanel-BueS1CeL.js} +1 -1
  267. package/dist/{universalConfigPanel-C0lDSzOB.cjs → universalConfigPanel-Db87fd8H.cjs} +1 -1
  268. package/dist/{universalTable-DGK02ywi.js → universalTable-5QpYwmyj.js} +2 -2
  269. package/dist/{universalTable-Bzq9VqzA.cjs → universalTable-BXfm_1je.cjs} +1 -1
  270. package/dist/{video-DCzzaEmV.js → video-C75mXLnF.js} +5 -5
  271. package/dist/{video-CyRoSQf1.cjs → video-QWpkqafn.cjs} +1 -1
  272. package/dist/{videoMonitor-ByaQeIWR.js → videoMonitor-DSOQbTy9.js} +2 -2
  273. package/dist/{videoMonitor-BjD-ZFS0.cjs → videoMonitor-Dlvtlmf3.cjs} +1 -1
  274. package/dist/{vlu-h-9twmCr.js → vlu-BRrxfbLm.js} +2 -2
  275. package/dist/{vlu-CYZjYHaV.cjs → vlu-DqqX7UrQ.cjs} +1 -1
  276. package/dist/{weather-C_aC0XJ1.js → weather-B4twNcEf.js} +3 -3
  277. package/dist/{weather-B7B5E1EJ.cjs → weather-GNGvUFJc.cjs} +1 -1
  278. package/dist/{windLin-DPNzX7JN.cjs → windLin-DPr5J4_t.cjs} +1 -1
  279. package/dist/{windLin-B7V4NUV8.js → windLin-DSh910GU.js} +9 -9
  280. package/package.json +10 -9
  281. package/dist/arrayCard-OlVAAsZq.cjs +0 -1
  282. package/dist/config-BLSroAzs.cjs +0 -1
  283. package/dist/config-Cc2W4vke.js +0 -9
  284. package/dist/index-Mh5Dw2sd.cjs +0 -585
  285. package/dist/objectList-CpqQxG8L.cjs +0 -1
  286. package/dist/photo-BODEtaYh.cjs +0 -1
  287. package/dist/photo-BfLkWAo8.js +0 -256
  288. package/dist/qrcode-DHCRfp0M.cjs +0 -1
@@ -1,4 +1,4 @@
1
- "use strict";var We=Object.defineProperty,qe=Object.defineProperties;var Ze=Object.getOwnPropertyDescriptors;var Te=Object.getOwnPropertySymbols;var Qe=Object.prototype.hasOwnProperty,$e=Object.prototype.propertyIsEnumerable;var Ae=(u,e,t)=>e in u?We(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,ye=(u,e)=>{for(var t in e||(e={}))Qe.call(e,t)&&Ae(u,t,e[t]);if(Te)for(var t of Te(e))$e.call(e,t)&&Ae(u,t,e[t]);return u},be=(u,e)=>qe(u,Ze(e));var Ee=(u,e,t)=>new Promise((o,s)=>{var i=r=>{try{a(t.next(r))}catch(l){s(l)}},n=r=>{try{a(t.throw(r))}catch(l){s(l)}},a=r=>r.done?o(r.value):Promise.resolve(r.value).then(i,n);a((t=t.apply(u,e)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("vue");require("html2canvas");const Je=require("./element-resize-detector-Bo5uDQAu.cjs"),et=require("./index-Mh5Dw2sd.cjs"),c=require("./three.module-DNVo041Q.cjs"),Se=require("./ele-glbModel-icon-ByACDCrv.cjs");function xe(u,e){if(e===c.TrianglesDrawMode)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),u;if(e===c.TriangleFanDrawMode||e===c.TriangleStripDrawMode){let t=u.getIndex();if(t===null){const n=[],a=u.getAttribute("position");if(a!==void 0){for(let r=0;r<a.count;r++)n.push(r);u.setIndex(n),t=u.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),u}const o=t.count-2,s=[];if(e===c.TriangleFanDrawMode)for(let n=1;n<=o;n++)s.push(t.getX(0)),s.push(t.getX(n)),s.push(t.getX(n+1));else for(let n=0;n<o;n++)n%2===0?(s.push(t.getX(n)),s.push(t.getX(n+1)),s.push(t.getX(n+2))):(s.push(t.getX(n+2)),s.push(t.getX(n+1)),s.push(t.getX(n)));s.length/3!==o&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const i=u.clone();return i.setIndex(s),i.clearGroups(),i}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",e),u}class tt extends c.Loader{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(t){return new rt(t)}),this.register(function(t){return new at(t)}),this.register(function(t){return new gt(t)}),this.register(function(t){return new _t(t)}),this.register(function(t){return new Tt(t)}),this.register(function(t){return new lt(t)}),this.register(function(t){return new ht(t)}),this.register(function(t){return new ut(t)}),this.register(function(t){return new dt(t)}),this.register(function(t){return new ot(t)}),this.register(function(t){return new ft(t)}),this.register(function(t){return new ct(t)}),this.register(function(t){return new mt(t)}),this.register(function(t){return new pt(t)}),this.register(function(t){return new nt(t)}),this.register(function(t){return new At(t)}),this.register(function(t){return new yt(t)})}load(e,t,o,s){const i=this;let n;if(this.resourcePath!=="")n=this.resourcePath;else if(this.path!==""){const l=c.LoaderUtils.extractUrlBase(e);n=c.LoaderUtils.resolveURL(l,this.path)}else n=c.LoaderUtils.extractUrlBase(e);this.manager.itemStart(e);const a=function(l){s?s(l):console.error(l),i.manager.itemError(e),i.manager.itemEnd(e)},r=new c.FileLoader(this.manager);r.setPath(this.path),r.setResponseType("arraybuffer"),r.setRequestHeader(this.requestHeader),r.setWithCredentials(this.withCredentials),r.load(e,function(l){try{i.parse(l,n,function(d){t(d),i.manager.itemEnd(e)},a)}catch(d){a(d)}},o,a)}setDRACOLoader(e){return this.dracoLoader=e,this}setKTX2Loader(e){return this.ktx2Loader=e,this}setMeshoptDecoder(e){return this.meshoptDecoder=e,this}register(e){return this.pluginCallbacks.indexOf(e)===-1&&this.pluginCallbacks.push(e),this}unregister(e){return this.pluginCallbacks.indexOf(e)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,o,s){let i;const n={},a={},r=new TextDecoder;if(typeof e=="string")i=JSON.parse(e);else if(e instanceof ArrayBuffer)if(r.decode(new Uint8Array(e,0,4))===Ne){try{n[M.KHR_BINARY_GLTF]=new bt(e)}catch(h){s&&s(h);return}i=JSON.parse(n[M.KHR_BINARY_GLTF].content)}else i=JSON.parse(r.decode(e));else i=e;if(i.asset===void 0||i.asset.version[0]<2){s&&s(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const l=new It(i,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});l.fileLoader.setRequestHeader(this.requestHeader);for(let d=0;d<this.pluginCallbacks.length;d++){const h=this.pluginCallbacks[d](l);h.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),a[h.name]=h,n[h.name]=!0}if(i.extensionsUsed)for(let d=0;d<i.extensionsUsed.length;++d){const h=i.extensionsUsed[d],f=i.extensionsRequired||[];switch(h){case M.KHR_MATERIALS_UNLIT:n[h]=new it;break;case M.KHR_DRACO_MESH_COMPRESSION:n[h]=new Et(i,this.dracoLoader);break;case M.KHR_TEXTURE_TRANSFORM:n[h]=new St;break;case M.KHR_MESH_QUANTIZATION:n[h]=new xt;break;default:f.indexOf(h)>=0&&a[h]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+h+'".')}}l.setExtensions(n),l.setPlugins(a),l.parse(o,s)}parseAsync(e,t){const o=this;return new Promise(function(s,i){o.parse(e,t,s,i)})}}function st(){let u={};return{get:function(e){return u[e]},add:function(e,t){u[e]=t},remove:function(e){delete u[e]},removeAll:function(){u={}}}}const M={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class nt{constructor(e){this.parser=e,this.name=M.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let o=0,s=t.length;o<s;o++){const i=t[o];i.extensions&&i.extensions[this.name]&&i.extensions[this.name].light!==void 0&&e._addNodeRef(this.cache,i.extensions[this.name].light)}}_loadLight(e){const t=this.parser,o="light:"+e;let s=t.cache.get(o);if(s)return s;const i=t.json,r=((i.extensions&&i.extensions[this.name]||{}).lights||[])[e];let l;const d=new c.Color(16777215);r.color!==void 0&&d.setRGB(r.color[0],r.color[1],r.color[2],c.LinearSRGBColorSpace);const h=r.range!==void 0?r.range:0;switch(r.type){case"directional":l=new c.DirectionalLight(d),l.target.position.set(0,0,-1),l.add(l.target);break;case"point":l=new c.PointLight(d),l.distance=h;break;case"spot":l=new c.SpotLight(d),l.distance=h,r.spot=r.spot||{},r.spot.innerConeAngle=r.spot.innerConeAngle!==void 0?r.spot.innerConeAngle:0,r.spot.outerConeAngle=r.spot.outerConeAngle!==void 0?r.spot.outerConeAngle:Math.PI/4,l.angle=r.spot.outerConeAngle,l.penumbra=1-r.spot.innerConeAngle/r.spot.outerConeAngle,l.target.position.set(0,0,-1),l.add(l.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+r.type)}return l.position.set(0,0,0),l.decay=2,z(l,r),r.intensity!==void 0&&(l.intensity=r.intensity),l.name=t.createUniqueName(r.name||"light_"+e),s=Promise.resolve(l),t.cache.add(o,s),s}getDependency(e,t){if(e==="light")return this._loadLight(t)}createNodeAttachment(e){const t=this,o=this.parser,i=o.json.nodes[e],a=(i.extensions&&i.extensions[this.name]||{}).light;return a===void 0?null:this._loadLight(a).then(function(r){return o._getNodeRef(t.cache,a,r)})}}class it{constructor(){this.name=M.KHR_MATERIALS_UNLIT}getMaterialType(){return c.MeshBasicMaterial}extendParams(e,t,o){const s=[];e.color=new c.Color(1,1,1),e.opacity=1;const i=t.pbrMetallicRoughness;if(i){if(Array.isArray(i.baseColorFactor)){const n=i.baseColorFactor;e.color.setRGB(n[0],n[1],n[2],c.LinearSRGBColorSpace),e.opacity=n[3]}i.baseColorTexture!==void 0&&s.push(o.assignTexture(e,"map",i.baseColorTexture,c.SRGBColorSpace))}return Promise.all(s)}}class ot{constructor(e){this.parser=e,this.name=M.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,t){const s=this.parser.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=s.extensions[this.name].emissiveStrength;return i!==void 0&&(t.emissiveIntensity=i),Promise.resolve()}}class rt{constructor(e){this.parser=e,this.name=M.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:c.MeshPhysicalMaterial}extendMaterialParams(e,t){const o=this.parser,s=o.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=[],n=s.extensions[this.name];if(n.clearcoatFactor!==void 0&&(t.clearcoat=n.clearcoatFactor),n.clearcoatTexture!==void 0&&i.push(o.assignTexture(t,"clearcoatMap",n.clearcoatTexture)),n.clearcoatRoughnessFactor!==void 0&&(t.clearcoatRoughness=n.clearcoatRoughnessFactor),n.clearcoatRoughnessTexture!==void 0&&i.push(o.assignTexture(t,"clearcoatRoughnessMap",n.clearcoatRoughnessTexture)),n.clearcoatNormalTexture!==void 0&&(i.push(o.assignTexture(t,"clearcoatNormalMap",n.clearcoatNormalTexture)),n.clearcoatNormalTexture.scale!==void 0)){const a=n.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new c.Vector2(a,a)}return Promise.all(i)}}class at{constructor(e){this.parser=e,this.name=M.KHR_MATERIALS_DISPERSION}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:c.MeshPhysicalMaterial}extendMaterialParams(e,t){const s=this.parser.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=s.extensions[this.name];return t.dispersion=i.dispersion!==void 0?i.dispersion:0,Promise.resolve()}}class ct{constructor(e){this.parser=e,this.name=M.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:c.MeshPhysicalMaterial}extendMaterialParams(e,t){const o=this.parser,s=o.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=[],n=s.extensions[this.name];return n.iridescenceFactor!==void 0&&(t.iridescence=n.iridescenceFactor),n.iridescenceTexture!==void 0&&i.push(o.assignTexture(t,"iridescenceMap",n.iridescenceTexture)),n.iridescenceIor!==void 0&&(t.iridescenceIOR=n.iridescenceIor),t.iridescenceThicknessRange===void 0&&(t.iridescenceThicknessRange=[100,400]),n.iridescenceThicknessMinimum!==void 0&&(t.iridescenceThicknessRange[0]=n.iridescenceThicknessMinimum),n.iridescenceThicknessMaximum!==void 0&&(t.iridescenceThicknessRange[1]=n.iridescenceThicknessMaximum),n.iridescenceThicknessTexture!==void 0&&i.push(o.assignTexture(t,"iridescenceThicknessMap",n.iridescenceThicknessTexture)),Promise.all(i)}}class lt{constructor(e){this.parser=e,this.name=M.KHR_MATERIALS_SHEEN}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:c.MeshPhysicalMaterial}extendMaterialParams(e,t){const o=this.parser,s=o.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=[];t.sheenColor=new c.Color(0,0,0),t.sheenRoughness=0,t.sheen=1;const n=s.extensions[this.name];if(n.sheenColorFactor!==void 0){const a=n.sheenColorFactor;t.sheenColor.setRGB(a[0],a[1],a[2],c.LinearSRGBColorSpace)}return n.sheenRoughnessFactor!==void 0&&(t.sheenRoughness=n.sheenRoughnessFactor),n.sheenColorTexture!==void 0&&i.push(o.assignTexture(t,"sheenColorMap",n.sheenColorTexture,c.SRGBColorSpace)),n.sheenRoughnessTexture!==void 0&&i.push(o.assignTexture(t,"sheenRoughnessMap",n.sheenRoughnessTexture)),Promise.all(i)}}class ht{constructor(e){this.parser=e,this.name=M.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:c.MeshPhysicalMaterial}extendMaterialParams(e,t){const o=this.parser,s=o.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=[],n=s.extensions[this.name];return n.transmissionFactor!==void 0&&(t.transmission=n.transmissionFactor),n.transmissionTexture!==void 0&&i.push(o.assignTexture(t,"transmissionMap",n.transmissionTexture)),Promise.all(i)}}class ut{constructor(e){this.parser=e,this.name=M.KHR_MATERIALS_VOLUME}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:c.MeshPhysicalMaterial}extendMaterialParams(e,t){const o=this.parser,s=o.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=[],n=s.extensions[this.name];t.thickness=n.thicknessFactor!==void 0?n.thicknessFactor:0,n.thicknessTexture!==void 0&&i.push(o.assignTexture(t,"thicknessMap",n.thicknessTexture)),t.attenuationDistance=n.attenuationDistance||1/0;const a=n.attenuationColor||[1,1,1];return t.attenuationColor=new c.Color().setRGB(a[0],a[1],a[2],c.LinearSRGBColorSpace),Promise.all(i)}}class dt{constructor(e){this.parser=e,this.name=M.KHR_MATERIALS_IOR}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:c.MeshPhysicalMaterial}extendMaterialParams(e,t){const s=this.parser.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=s.extensions[this.name];return t.ior=i.ior!==void 0?i.ior:1.5,Promise.resolve()}}class ft{constructor(e){this.parser=e,this.name=M.KHR_MATERIALS_SPECULAR}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:c.MeshPhysicalMaterial}extendMaterialParams(e,t){const o=this.parser,s=o.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=[],n=s.extensions[this.name];t.specularIntensity=n.specularFactor!==void 0?n.specularFactor:1,n.specularTexture!==void 0&&i.push(o.assignTexture(t,"specularIntensityMap",n.specularTexture));const a=n.specularColorFactor||[1,1,1];return t.specularColor=new c.Color().setRGB(a[0],a[1],a[2],c.LinearSRGBColorSpace),n.specularColorTexture!==void 0&&i.push(o.assignTexture(t,"specularColorMap",n.specularColorTexture,c.SRGBColorSpace)),Promise.all(i)}}class pt{constructor(e){this.parser=e,this.name=M.EXT_MATERIALS_BUMP}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:c.MeshPhysicalMaterial}extendMaterialParams(e,t){const o=this.parser,s=o.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=[],n=s.extensions[this.name];return t.bumpScale=n.bumpFactor!==void 0?n.bumpFactor:1,n.bumpTexture!==void 0&&i.push(o.assignTexture(t,"bumpMap",n.bumpTexture)),Promise.all(i)}}class mt{constructor(e){this.parser=e,this.name=M.KHR_MATERIALS_ANISOTROPY}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:c.MeshPhysicalMaterial}extendMaterialParams(e,t){const o=this.parser,s=o.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=[],n=s.extensions[this.name];return n.anisotropyStrength!==void 0&&(t.anisotropy=n.anisotropyStrength),n.anisotropyRotation!==void 0&&(t.anisotropyRotation=n.anisotropyRotation),n.anisotropyTexture!==void 0&&i.push(o.assignTexture(t,"anisotropyMap",n.anisotropyTexture)),Promise.all(i)}}class gt{constructor(e){this.parser=e,this.name=M.KHR_TEXTURE_BASISU}loadTexture(e){const t=this.parser,o=t.json,s=o.textures[e];if(!s.extensions||!s.extensions[this.name])return null;const i=s.extensions[this.name],n=t.options.ktx2Loader;if(!n){if(o.extensionsRequired&&o.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,i.source,n)}}class _t{constructor(e){this.parser=e,this.name=M.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,o=this.parser,s=o.json,i=s.textures[e];if(!i.extensions||!i.extensions[t])return null;const n=i.extensions[t],a=s.images[n.source];let r=o.textureLoader;if(a.uri){const l=o.options.manager.getHandler(a.uri);l!==null&&(r=l)}return this.detectSupport().then(function(l){if(l)return o.loadTextureImage(e,n.source,r);if(s.extensionsRequired&&s.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return o.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class Tt{constructor(e){this.parser=e,this.name=M.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const t=this.name,o=this.parser,s=o.json,i=s.textures[e];if(!i.extensions||!i.extensions[t])return null;const n=i.extensions[t],a=s.images[n.source];let r=o.textureLoader;if(a.uri){const l=o.options.manager.getHandler(a.uri);l!==null&&(r=l)}return this.detectSupport().then(function(l){if(l)return o.loadTextureImage(e,n.source,r);if(s.extensionsRequired&&s.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return o.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class At{constructor(e){this.name=M.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,o=t.bufferViews[e];if(o.extensions&&o.extensions[this.name]){const s=o.extensions[this.name],i=this.parser.getDependency("buffer",s.buffer),n=this.parser.options.meshoptDecoder;if(!n||!n.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return i.then(function(a){const r=s.byteOffset||0,l=s.byteLength||0,d=s.count,h=s.byteStride,f=new Uint8Array(a,r,l);return n.decodeGltfBufferAsync?n.decodeGltfBufferAsync(d,h,f,s.mode,s.filter).then(function(m){return m.buffer}):n.ready.then(function(){const m=new ArrayBuffer(d*h);return n.decodeGltfBuffer(new Uint8Array(m),d,h,f,s.mode,s.filter),m})})}else return null}}class yt{constructor(e){this.name=M.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,o=t.nodes[e];if(!o.extensions||!o.extensions[this.name]||o.mesh===void 0)return null;const s=t.meshes[o.mesh];for(const l of s.primitives)if(l.mode!==G.TRIANGLES&&l.mode!==G.TRIANGLE_STRIP&&l.mode!==G.TRIANGLE_FAN&&l.mode!==void 0)return null;const n=o.extensions[this.name].attributes,a=[],r={};for(const l in n)a.push(this.parser.getDependency("accessor",n[l]).then(d=>(r[l]=d,r[l])));return a.length<1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then(l=>{const d=l.pop(),h=d.isGroup?d.children:[d],f=l[0].count,m=[];for(const p of h){const g=new c.Matrix4,_=new c.Vector3,y=new c.Quaternion,b=new c.Vector3(1,1,1),C=new c.InstancedMesh(p.geometry,p.material,f);for(let x=0;x<f;x++)r.TRANSLATION&&_.fromBufferAttribute(r.TRANSLATION,x),r.ROTATION&&y.fromBufferAttribute(r.ROTATION,x),r.SCALE&&b.fromBufferAttribute(r.SCALE,x),C.setMatrixAt(x,g.compose(_,y,b));for(const x in r)if(x==="_COLOR_0"){const v=r[x];C.instanceColor=new c.InstancedBufferAttribute(v.array,v.itemSize,v.normalized)}else x!=="TRANSLATION"&&x!=="ROTATION"&&x!=="SCALE"&&p.geometry.setAttribute(x,r[x]);c.Object3D.prototype.copy.call(C,p),this.parser.assignFinalMaterial(C),m.push(C)}return d.isGroup?(d.clear(),d.add(...m),d):m[0]}))}}const Ne="glTF",ee=12,Re={JSON:1313821514,BIN:5130562};class bt{constructor(e){this.name=M.KHR_BINARY_GLTF,this.content=null,this.body=null;const t=new DataView(e,0,ee),o=new TextDecoder;if(this.header={magic:o.decode(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==Ne)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const s=this.header.length-ee,i=new DataView(e,ee);let n=0;for(;n<s;){const a=i.getUint32(n,!0);n+=4;const r=i.getUint32(n,!0);if(n+=4,r===Re.JSON){const l=new Uint8Array(e,ee+n,a);this.content=o.decode(l)}else if(r===Re.BIN){const l=ee+n;this.body=e.slice(l,l+a)}n+=a}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class Et{constructor(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=M.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}decodePrimitive(e,t){const o=this.json,s=this.dracoLoader,i=e.extensions[this.name].bufferView,n=e.extensions[this.name].attributes,a={},r={},l={};for(const d in n){const h=ue[d]||d.toLowerCase();a[h]=n[d]}for(const d in e.attributes){const h=ue[d]||d.toLowerCase();if(n[d]!==void 0){const f=o.accessors[e.attributes[d]],m=Q[f.componentType];l[h]=m.name,r[h]=f.normalized===!0}}return t.getDependency("bufferView",i).then(function(d){return new Promise(function(h,f){s.decodeDracoFile(d,function(m){for(const p in m.attributes){const g=m.attributes[p],_=r[p];_!==void 0&&(g.normalized=_)}h(m)},a,l,c.LinearSRGBColorSpace,f)})})}}class St{constructor(){this.name=M.KHR_TEXTURE_TRANSFORM}extendTexture(e,t){return(t.texCoord===void 0||t.texCoord===e.channel)&&t.offset===void 0&&t.rotation===void 0&&t.scale===void 0||(e=e.clone(),t.texCoord!==void 0&&(e.channel=t.texCoord),t.offset!==void 0&&e.offset.fromArray(t.offset),t.rotation!==void 0&&(e.rotation=t.rotation),t.scale!==void 0&&e.repeat.fromArray(t.scale),e.needsUpdate=!0),e}}class xt{constructor(){this.name=M.KHR_MESH_QUANTIZATION}}class ke extends c.Interpolant{constructor(e,t,o,s){super(e,t,o,s)}copySampleValue_(e){const t=this.resultBuffer,o=this.sampleValues,s=this.valueSize,i=e*s*3+s;for(let n=0;n!==s;n++)t[n]=o[i+n];return t}interpolate_(e,t,o,s){const i=this.resultBuffer,n=this.sampleValues,a=this.valueSize,r=a*2,l=a*3,d=s-t,h=(o-t)/d,f=h*h,m=f*h,p=e*l,g=p-l,_=-2*m+3*f,y=m-f,b=1-_,C=y-f+h;for(let x=0;x!==a;x++){const v=n[g+x+a],B=n[g+x+r]*d,k=n[p+x+a],w=n[p+x]*d;i[x]=b*v+C*B+_*k+y*w}return i}}const Rt=new c.Quaternion;class Mt extends ke{interpolate_(e,t,o,s){const i=super.interpolate_(e,t,o,s);return Rt.fromArray(i).normalize().toArray(i),i}}const G={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},Q={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},Me={9728:c.NearestFilter,9729:c.LinearFilter,9984:c.NearestMipmapNearestFilter,9985:c.LinearMipmapNearestFilter,9986:c.NearestMipmapLinearFilter,9987:c.LinearMipmapLinearFilter},we={33071:c.ClampToEdgeWrapping,33648:c.MirroredRepeatWrapping,10497:c.RepeatWrapping},re={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},ue={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},Y={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},wt={CUBICSPLINE:void 0,LINEAR:c.InterpolateLinear,STEP:c.InterpolateDiscrete},ae={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function Lt(u){return u.DefaultMaterial===void 0&&(u.DefaultMaterial=new c.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:c.FrontSide})),u.DefaultMaterial}function W(u,e,t){for(const o in t.extensions)u[o]===void 0&&(e.userData.gltfExtensions=e.userData.gltfExtensions||{},e.userData.gltfExtensions[o]=t.extensions[o])}function z(u,e){e.extras!==void 0&&(typeof e.extras=="object"?Object.assign(u.userData,e.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+e.extras))}function Ct(u,e,t){let o=!1,s=!1,i=!1;for(let l=0,d=e.length;l<d;l++){const h=e[l];if(h.POSITION!==void 0&&(o=!0),h.NORMAL!==void 0&&(s=!0),h.COLOR_0!==void 0&&(i=!0),o&&s&&i)break}if(!o&&!s&&!i)return Promise.resolve(u);const n=[],a=[],r=[];for(let l=0,d=e.length;l<d;l++){const h=e[l];if(o){const f=h.POSITION!==void 0?t.getDependency("accessor",h.POSITION):u.attributes.position;n.push(f)}if(s){const f=h.NORMAL!==void 0?t.getDependency("accessor",h.NORMAL):u.attributes.normal;a.push(f)}if(i){const f=h.COLOR_0!==void 0?t.getDependency("accessor",h.COLOR_0):u.attributes.color;r.push(f)}}return Promise.all([Promise.all(n),Promise.all(a),Promise.all(r)]).then(function(l){const d=l[0],h=l[1],f=l[2];return o&&(u.morphAttributes.position=d),s&&(u.morphAttributes.normal=h),i&&(u.morphAttributes.color=f),u.morphTargetsRelative=!0,u})}function Dt(u,e){if(u.updateMorphTargets(),e.weights!==void 0)for(let t=0,o=e.weights.length;t<o;t++)u.morphTargetInfluences[t]=e.weights[t];if(e.extras&&Array.isArray(e.extras.targetNames)){const t=e.extras.targetNames;if(u.morphTargetInfluences.length===t.length){u.morphTargetDictionary={};for(let o=0,s=t.length;o<s;o++)u.morphTargetDictionary[t[o]]=o}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function Pt(u){let e;const t=u.extensions&&u.extensions[M.KHR_DRACO_MESH_COMPRESSION];if(t?e="draco:"+t.bufferView+":"+t.indices+":"+ce(t.attributes):e=u.indices+":"+ce(u.attributes)+":"+u.mode,u.targets!==void 0)for(let o=0,s=u.targets.length;o<s;o++)e+=":"+ce(u.targets[o]);return e}function ce(u){let e="";const t=Object.keys(u).sort();for(let o=0,s=t.length;o<s;o++)e+=t[o]+":"+u[t[o]]+";";return e}function de(u){switch(u){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function Ot(u){return u.search(/\.jpe?g($|\?)/i)>0||u.search(/^data\:image\/jpeg/)===0?"image/jpeg":u.search(/\.webp($|\?)/i)>0||u.search(/^data\:image\/webp/)===0?"image/webp":u.search(/\.ktx2($|\?)/i)>0||u.search(/^data\:image\/ktx2/)===0?"image/ktx2":"image/png"}const vt=new c.Matrix4;class It{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new st,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let o=!1,s=-1,i=!1,n=-1;if(typeof navigator!="undefined"){const a=navigator.userAgent;o=/^((?!chrome|android).)*safari/i.test(a)===!0;const r=a.match(/Version\/(\d+)/);s=o&&r?parseInt(r[1],10):-1,i=a.indexOf("Firefox")>-1,n=i?a.match(/Firefox\/([0-9]+)\./)[1]:-1}typeof createImageBitmap=="undefined"||o&&s<17||i&&n<98?this.textureLoader=new c.TextureLoader(this.options.manager):this.textureLoader=new c.ImageBitmapLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new c.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const o=this,s=this.json,i=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(n){return n._markDefs&&n._markDefs()}),Promise.all(this._invokeAll(function(n){return n.beforeRoot&&n.beforeRoot()})).then(function(){return Promise.all([o.getDependencies("scene"),o.getDependencies("animation"),o.getDependencies("camera")])}).then(function(n){const a={scene:n[0][s.scene||0],scenes:n[0],animations:n[1],cameras:n[2],asset:s.asset,parser:o,userData:{}};return W(i,a,s),z(a,s),Promise.all(o._invokeAll(function(r){return r.afterRoot&&r.afterRoot(a)})).then(function(){for(const r of a.scenes)r.updateMatrixWorld();e(a)})}).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],o=this.json.meshes||[];for(let s=0,i=t.length;s<i;s++){const n=t[s].joints;for(let a=0,r=n.length;a<r;a++)e[n[a]].isBone=!0}for(let s=0,i=e.length;s<i;s++){const n=e[s];n.mesh!==void 0&&(this._addNodeRef(this.meshCache,n.mesh),n.skin!==void 0&&(o[n.mesh].isSkinnedMesh=!0)),n.camera!==void 0&&this._addNodeRef(this.cameraCache,n.camera)}}_addNodeRef(e,t){t!==void 0&&(e.refs[t]===void 0&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)}_getNodeRef(e,t,o){if(e.refs[t]<=1)return o;const s=o.clone(),i=(n,a)=>{const r=this.associations.get(n);r!=null&&this.associations.set(a,r);for(const[l,d]of n.children.entries())i(d,a.children[l])};return i(o,s),s.name+="_instance_"+e.uses[t]++,s}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let o=0;o<t.length;o++){const s=e(t[o]);if(s)return s}return null}_invokeAll(e){const t=Object.values(this.plugins);t.unshift(this);const o=[];for(let s=0;s<t.length;s++){const i=e(t[s]);i&&o.push(i)}return o}getDependency(e,t){const o=e+":"+t;let s=this.cache.get(o);if(!s){switch(e){case"scene":s=this.loadScene(t);break;case"node":s=this._invokeOne(function(i){return i.loadNode&&i.loadNode(t)});break;case"mesh":s=this._invokeOne(function(i){return i.loadMesh&&i.loadMesh(t)});break;case"accessor":s=this.loadAccessor(t);break;case"bufferView":s=this._invokeOne(function(i){return i.loadBufferView&&i.loadBufferView(t)});break;case"buffer":s=this.loadBuffer(t);break;case"material":s=this._invokeOne(function(i){return i.loadMaterial&&i.loadMaterial(t)});break;case"texture":s=this._invokeOne(function(i){return i.loadTexture&&i.loadTexture(t)});break;case"skin":s=this.loadSkin(t);break;case"animation":s=this._invokeOne(function(i){return i.loadAnimation&&i.loadAnimation(t)});break;case"camera":s=this.loadCamera(t);break;default:if(s=this._invokeOne(function(i){return i!=this&&i.getDependency&&i.getDependency(e,t)}),!s)throw new Error("Unknown type: "+e);break}this.cache.add(o,s)}return s}getDependencies(e){let t=this.cache.get(e);if(!t){const o=this,s=this.json[e+(e==="mesh"?"es":"s")]||[];t=Promise.all(s.map(function(i,n){return o.getDependency(e,n)})),this.cache.add(e,t)}return t}loadBuffer(e){const t=this.json.buffers[e],o=this.fileLoader;if(t.type&&t.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(t.uri===void 0&&e===0)return Promise.resolve(this.extensions[M.KHR_BINARY_GLTF].body);const s=this.options;return new Promise(function(i,n){o.load(c.LoaderUtils.resolveURL(t.uri,s.path),i,void 0,function(){n(new Error('THREE.GLTFLoader: Failed to load buffer "'+t.uri+'".'))})})}loadBufferView(e){const t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then(function(o){const s=t.byteLength||0,i=t.byteOffset||0;return o.slice(i,i+s)})}loadAccessor(e){const t=this,o=this.json,s=this.json.accessors[e];if(s.bufferView===void 0&&s.sparse===void 0){const n=re[s.type],a=Q[s.componentType],r=s.normalized===!0,l=new a(s.count*n);return Promise.resolve(new c.BufferAttribute(l,n,r))}const i=[];return s.bufferView!==void 0?i.push(this.getDependency("bufferView",s.bufferView)):i.push(null),s.sparse!==void 0&&(i.push(this.getDependency("bufferView",s.sparse.indices.bufferView)),i.push(this.getDependency("bufferView",s.sparse.values.bufferView))),Promise.all(i).then(function(n){const a=n[0],r=re[s.type],l=Q[s.componentType],d=l.BYTES_PER_ELEMENT,h=d*r,f=s.byteOffset||0,m=s.bufferView!==void 0?o.bufferViews[s.bufferView].byteStride:void 0,p=s.normalized===!0;let g,_;if(m&&m!==h){const y=Math.floor(f/m),b="InterleavedBuffer:"+s.bufferView+":"+s.componentType+":"+y+":"+s.count;let C=t.cache.get(b);C||(g=new l(a,y*m,s.count*m/d),C=new c.InterleavedBuffer(g,m/d),t.cache.add(b,C)),_=new c.InterleavedBufferAttribute(C,r,f%m/d,p)}else a===null?g=new l(s.count*r):g=new l(a,f,s.count*r),_=new c.BufferAttribute(g,r,p);if(s.sparse!==void 0){const y=re.SCALAR,b=Q[s.sparse.indices.componentType],C=s.sparse.indices.byteOffset||0,x=s.sparse.values.byteOffset||0,v=new b(n[1],C,s.sparse.count*y),B=new l(n[2],x,s.sparse.count*r);a!==null&&(_=new c.BufferAttribute(_.array.slice(),_.itemSize,_.normalized)),_.normalized=!1;for(let k=0,w=v.length;k<w;k++){const V=v[k];if(_.setX(V,B[k*r]),r>=2&&_.setY(V,B[k*r+1]),r>=3&&_.setZ(V,B[k*r+2]),r>=4&&_.setW(V,B[k*r+3]),r>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}_.normalized=p}return _})}loadTexture(e){const t=this.json,o=this.options,i=t.textures[e].source,n=t.images[i];let a=this.textureLoader;if(n.uri){const r=o.manager.getHandler(n.uri);r!==null&&(a=r)}return this.loadTextureImage(e,i,a)}loadTextureImage(e,t,o){const s=this,i=this.json,n=i.textures[e],a=i.images[t],r=(a.uri||a.bufferView)+":"+n.sampler;if(this.textureCache[r])return this.textureCache[r];const l=this.loadImageSource(t,o).then(function(d){d.flipY=!1,d.name=n.name||a.name||"",d.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(d.name=a.uri);const f=(i.samplers||{})[n.sampler]||{};return d.magFilter=Me[f.magFilter]||c.LinearFilter,d.minFilter=Me[f.minFilter]||c.LinearMipmapLinearFilter,d.wrapS=we[f.wrapS]||c.RepeatWrapping,d.wrapT=we[f.wrapT]||c.RepeatWrapping,d.generateMipmaps=!d.isCompressedTexture&&d.minFilter!==c.NearestFilter&&d.minFilter!==c.LinearFilter,s.associations.set(d,{textures:e}),d}).catch(function(){return null});return this.textureCache[r]=l,l}loadImageSource(e,t){const o=this,s=this.json,i=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(h=>h.clone());const n=s.images[e],a=self.URL||self.webkitURL;let r=n.uri||"",l=!1;if(n.bufferView!==void 0)r=o.getDependency("bufferView",n.bufferView).then(function(h){l=!0;const f=new Blob([h],{type:n.mimeType});return r=a.createObjectURL(f),r});else if(n.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const d=Promise.resolve(r).then(function(h){return new Promise(function(f,m){let p=f;t.isImageBitmapLoader===!0&&(p=function(g){const _=new c.Texture(g);_.needsUpdate=!0,f(_)}),t.load(c.LoaderUtils.resolveURL(h,i.path),p,void 0,m)})}).then(function(h){return l===!0&&a.revokeObjectURL(r),z(h,n),h.userData.mimeType=n.mimeType||Ot(n.uri),h}).catch(function(h){throw console.error("THREE.GLTFLoader: Couldn't load texture",r),h});return this.sourceCache[e]=d,d}assignTexture(e,t,o,s){const i=this;return this.getDependency("texture",o.index).then(function(n){if(!n)return null;if(o.texCoord!==void 0&&o.texCoord>0&&(n=n.clone(),n.channel=o.texCoord),i.extensions[M.KHR_TEXTURE_TRANSFORM]){const a=o.extensions!==void 0?o.extensions[M.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const r=i.associations.get(n);n=i.extensions[M.KHR_TEXTURE_TRANSFORM].extendTexture(n,a),i.associations.set(n,r)}}return s!==void 0&&(n.colorSpace=s),e[t]=n,n})}assignFinalMaterial(e){const t=e.geometry;let o=e.material;const s=t.attributes.tangent===void 0,i=t.attributes.color!==void 0,n=t.attributes.normal===void 0;if(e.isPoints){const a="PointsMaterial:"+o.uuid;let r=this.cache.get(a);r||(r=new c.PointsMaterial,c.Material.prototype.copy.call(r,o),r.color.copy(o.color),r.map=o.map,r.sizeAttenuation=!1,this.cache.add(a,r)),o=r}else if(e.isLine){const a="LineBasicMaterial:"+o.uuid;let r=this.cache.get(a);r||(r=new c.LineBasicMaterial,c.Material.prototype.copy.call(r,o),r.color.copy(o.color),r.map=o.map,this.cache.add(a,r)),o=r}if(s||i||n){let a="ClonedMaterial:"+o.uuid+":";s&&(a+="derivative-tangents:"),i&&(a+="vertex-colors:"),n&&(a+="flat-shading:");let r=this.cache.get(a);r||(r=o.clone(),i&&(r.vertexColors=!0),n&&(r.flatShading=!0),s&&(r.normalScale&&(r.normalScale.y*=-1),r.clearcoatNormalScale&&(r.clearcoatNormalScale.y*=-1)),this.cache.add(a,r),this.associations.set(r,this.associations.get(o))),o=r}e.material=o}getMaterialType(){return c.MeshStandardMaterial}loadMaterial(e){const t=this,o=this.json,s=this.extensions,i=o.materials[e];let n;const a={},r=i.extensions||{},l=[];if(r[M.KHR_MATERIALS_UNLIT]){const h=s[M.KHR_MATERIALS_UNLIT];n=h.getMaterialType(),l.push(h.extendParams(a,i,t))}else{const h=i.pbrMetallicRoughness||{};if(a.color=new c.Color(1,1,1),a.opacity=1,Array.isArray(h.baseColorFactor)){const f=h.baseColorFactor;a.color.setRGB(f[0],f[1],f[2],c.LinearSRGBColorSpace),a.opacity=f[3]}h.baseColorTexture!==void 0&&l.push(t.assignTexture(a,"map",h.baseColorTexture,c.SRGBColorSpace)),a.metalness=h.metallicFactor!==void 0?h.metallicFactor:1,a.roughness=h.roughnessFactor!==void 0?h.roughnessFactor:1,h.metallicRoughnessTexture!==void 0&&(l.push(t.assignTexture(a,"metalnessMap",h.metallicRoughnessTexture)),l.push(t.assignTexture(a,"roughnessMap",h.metallicRoughnessTexture))),n=this._invokeOne(function(f){return f.getMaterialType&&f.getMaterialType(e)}),l.push(Promise.all(this._invokeAll(function(f){return f.extendMaterialParams&&f.extendMaterialParams(e,a)})))}i.doubleSided===!0&&(a.side=c.DoubleSide);const d=i.alphaMode||ae.OPAQUE;if(d===ae.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,d===ae.MASK&&(a.alphaTest=i.alphaCutoff!==void 0?i.alphaCutoff:.5)),i.normalTexture!==void 0&&n!==c.MeshBasicMaterial&&(l.push(t.assignTexture(a,"normalMap",i.normalTexture)),a.normalScale=new c.Vector2(1,1),i.normalTexture.scale!==void 0)){const h=i.normalTexture.scale;a.normalScale.set(h,h)}if(i.occlusionTexture!==void 0&&n!==c.MeshBasicMaterial&&(l.push(t.assignTexture(a,"aoMap",i.occlusionTexture)),i.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=i.occlusionTexture.strength)),i.emissiveFactor!==void 0&&n!==c.MeshBasicMaterial){const h=i.emissiveFactor;a.emissive=new c.Color().setRGB(h[0],h[1],h[2],c.LinearSRGBColorSpace)}return i.emissiveTexture!==void 0&&n!==c.MeshBasicMaterial&&l.push(t.assignTexture(a,"emissiveMap",i.emissiveTexture,c.SRGBColorSpace)),Promise.all(l).then(function(){const h=new n(a);return i.name&&(h.name=i.name),z(h,i),t.associations.set(h,{materials:e}),i.extensions&&W(s,h,i),h})}createUniqueName(e){const t=c.PropertyBinding.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){const t=this,o=this.extensions,s=this.primitiveCache;function i(a){return o[M.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,t).then(function(r){return Le(r,a,t)})}const n=[];for(let a=0,r=e.length;a<r;a++){const l=e[a],d=Pt(l),h=s[d];if(h)n.push(h.promise);else{let f;l.extensions&&l.extensions[M.KHR_DRACO_MESH_COMPRESSION]?f=i(l):f=Le(new c.BufferGeometry,l,t),s[d]={primitive:l,promise:f},n.push(f)}}return Promise.all(n)}loadMesh(e){const t=this,o=this.json,s=this.extensions,i=o.meshes[e],n=i.primitives,a=[];for(let r=0,l=n.length;r<l;r++){const d=n[r].material===void 0?Lt(this.cache):this.getDependency("material",n[r].material);a.push(d)}return a.push(t.loadGeometries(n)),Promise.all(a).then(function(r){const l=r.slice(0,r.length-1),d=r[r.length-1],h=[];for(let m=0,p=d.length;m<p;m++){const g=d[m],_=n[m];let y;const b=l[m];if(_.mode===G.TRIANGLES||_.mode===G.TRIANGLE_STRIP||_.mode===G.TRIANGLE_FAN||_.mode===void 0)y=i.isSkinnedMesh===!0?new c.SkinnedMesh(g,b):new c.Mesh(g,b),y.isSkinnedMesh===!0&&y.normalizeSkinWeights(),_.mode===G.TRIANGLE_STRIP?y.geometry=xe(y.geometry,c.TriangleStripDrawMode):_.mode===G.TRIANGLE_FAN&&(y.geometry=xe(y.geometry,c.TriangleFanDrawMode));else if(_.mode===G.LINES)y=new c.LineSegments(g,b);else if(_.mode===G.LINE_STRIP)y=new c.Line(g,b);else if(_.mode===G.LINE_LOOP)y=new c.LineLoop(g,b);else if(_.mode===G.POINTS)y=new c.Points(g,b);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+_.mode);Object.keys(y.geometry.morphAttributes).length>0&&Dt(y,i),y.name=t.createUniqueName(i.name||"mesh_"+e),z(y,i),_.extensions&&W(s,y,_),t.assignFinalMaterial(y),h.push(y)}for(let m=0,p=h.length;m<p;m++)t.associations.set(h[m],{meshes:e,primitives:m});if(h.length===1)return i.extensions&&W(s,h[0],i),h[0];const f=new c.Group;i.extensions&&W(s,f,i),t.associations.set(f,{meshes:e});for(let m=0,p=h.length;m<p;m++)f.add(h[m]);return f})}loadCamera(e){let t;const o=this.json.cameras[e],s=o[o.type];if(!s){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return o.type==="perspective"?t=new c.PerspectiveCamera(c.MathUtils.radToDeg(s.yfov),s.aspectRatio||1,s.znear||1,s.zfar||2e6):o.type==="orthographic"&&(t=new c.OrthographicCamera(-s.xmag,s.xmag,s.ymag,-s.ymag,s.znear,s.zfar)),o.name&&(t.name=this.createUniqueName(o.name)),z(t,o),Promise.resolve(t)}loadSkin(e){const t=this.json.skins[e],o=[];for(let s=0,i=t.joints.length;s<i;s++)o.push(this._loadNodeShallow(t.joints[s]));return t.inverseBindMatrices!==void 0?o.push(this.getDependency("accessor",t.inverseBindMatrices)):o.push(null),Promise.all(o).then(function(s){const i=s.pop(),n=s,a=[],r=[];for(let l=0,d=n.length;l<d;l++){const h=n[l];if(h){a.push(h);const f=new c.Matrix4;i!==null&&f.fromArray(i.array,l*16),r.push(f)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',t.joints[l])}return new c.Skeleton(a,r)})}loadAnimation(e){const t=this.json,o=this,s=t.animations[e],i=s.name?s.name:"animation_"+e,n=[],a=[],r=[],l=[],d=[];for(let h=0,f=s.channels.length;h<f;h++){const m=s.channels[h],p=s.samplers[m.sampler],g=m.target,_=g.node,y=s.parameters!==void 0?s.parameters[p.input]:p.input,b=s.parameters!==void 0?s.parameters[p.output]:p.output;g.node!==void 0&&(n.push(this.getDependency("node",_)),a.push(this.getDependency("accessor",y)),r.push(this.getDependency("accessor",b)),l.push(p),d.push(g))}return Promise.all([Promise.all(n),Promise.all(a),Promise.all(r),Promise.all(l),Promise.all(d)]).then(function(h){const f=h[0],m=h[1],p=h[2],g=h[3],_=h[4],y=[];for(let b=0,C=f.length;b<C;b++){const x=f[b],v=m[b],B=p[b],k=g[b],w=_[b];if(x===void 0)continue;x.updateMatrix&&x.updateMatrix();const V=o._createAnimationTracks(x,v,B,k,w);if(V)for(let $=0;$<V.length;$++)y.push(V[$])}return new c.AnimationClip(i,void 0,y)})}createNodeMesh(e){const t=this.json,o=this,s=t.nodes[e];return s.mesh===void 0?null:o.getDependency("mesh",s.mesh).then(function(i){const n=o._getNodeRef(o.meshCache,s.mesh,i);return s.weights!==void 0&&n.traverse(function(a){if(a.isMesh)for(let r=0,l=s.weights.length;r<l;r++)a.morphTargetInfluences[r]=s.weights[r]}),n})}loadNode(e){const t=this.json,o=this,s=t.nodes[e],i=o._loadNodeShallow(e),n=[],a=s.children||[];for(let l=0,d=a.length;l<d;l++)n.push(o.getDependency("node",a[l]));const r=s.skin===void 0?Promise.resolve(null):o.getDependency("skin",s.skin);return Promise.all([i,Promise.all(n),r]).then(function(l){const d=l[0],h=l[1],f=l[2];f!==null&&d.traverse(function(m){m.isSkinnedMesh&&m.bind(f,vt)});for(let m=0,p=h.length;m<p;m++)d.add(h[m]);return d})}_loadNodeShallow(e){const t=this.json,o=this.extensions,s=this;if(this.nodeCache[e]!==void 0)return this.nodeCache[e];const i=t.nodes[e],n=i.name?s.createUniqueName(i.name):"",a=[],r=s._invokeOne(function(l){return l.createNodeMesh&&l.createNodeMesh(e)});return r&&a.push(r),i.camera!==void 0&&a.push(s.getDependency("camera",i.camera).then(function(l){return s._getNodeRef(s.cameraCache,i.camera,l)})),s._invokeAll(function(l){return l.createNodeAttachment&&l.createNodeAttachment(e)}).forEach(function(l){a.push(l)}),this.nodeCache[e]=Promise.all(a).then(function(l){let d;if(i.isBone===!0?d=new c.Bone:l.length>1?d=new c.Group:l.length===1?d=l[0]:d=new c.Object3D,d!==l[0])for(let h=0,f=l.length;h<f;h++)d.add(l[h]);if(i.name&&(d.userData.name=i.name,d.name=n),z(d,i),i.extensions&&W(o,d,i),i.matrix!==void 0){const h=new c.Matrix4;h.fromArray(i.matrix),d.applyMatrix4(h)}else i.translation!==void 0&&d.position.fromArray(i.translation),i.rotation!==void 0&&d.quaternion.fromArray(i.rotation),i.scale!==void 0&&d.scale.fromArray(i.scale);return s.associations.has(d)||s.associations.set(d,{}),s.associations.get(d).nodes=e,d}),this.nodeCache[e]}loadScene(e){const t=this.extensions,o=this.json.scenes[e],s=this,i=new c.Group;o.name&&(i.name=s.createUniqueName(o.name)),z(i,o),o.extensions&&W(t,i,o);const n=o.nodes||[],a=[];for(let r=0,l=n.length;r<l;r++)a.push(s.getDependency("node",n[r]));return Promise.all(a).then(function(r){for(let d=0,h=r.length;d<h;d++)i.add(r[d]);const l=d=>{const h=new Map;for(const[f,m]of s.associations)(f instanceof c.Material||f instanceof c.Texture)&&h.set(f,m);return d.traverse(f=>{const m=s.associations.get(f);m!=null&&h.set(f,m)}),h};return s.associations=l(i),i})}_createAnimationTracks(e,t,o,s,i){const n=[],a=e.name?e.name:e.uuid,r=[];Y[i.path]===Y.weights?e.traverse(function(f){f.morphTargetInfluences&&r.push(f.name?f.name:f.uuid)}):r.push(a);let l;switch(Y[i.path]){case Y.weights:l=c.NumberKeyframeTrack;break;case Y.rotation:l=c.QuaternionKeyframeTrack;break;case Y.position:case Y.scale:l=c.VectorKeyframeTrack;break;default:o.itemSize===1?l=c.NumberKeyframeTrack:l=c.VectorKeyframeTrack;break}const d=s.interpolation!==void 0?wt[s.interpolation]:c.InterpolateLinear,h=this._getArrayFromAccessor(o);for(let f=0,m=r.length;f<m;f++){const p=new l(r[f]+"."+Y[i.path],t.array,h,d);s.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(p),n.push(p)}return n}_getArrayFromAccessor(e){let t=e.array;if(e.normalized){const o=de(t.constructor),s=new Float32Array(t.length);for(let i=0,n=t.length;i<n;i++)s[i]=t[i]*o;t=s}return t}_createCubicSplineTrackInterpolant(e){e.createInterpolant=function(o){const s=this instanceof c.QuaternionKeyframeTrack?Mt:ke;return new s(this.times,this.values,this.getValueSize()/3,o)},e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function Nt(u,e,t){const o=e.attributes,s=new c.Box3;if(o.POSITION!==void 0){const a=t.json.accessors[o.POSITION],r=a.min,l=a.max;if(r!==void 0&&l!==void 0){if(s.set(new c.Vector3(r[0],r[1],r[2]),new c.Vector3(l[0],l[1],l[2])),a.normalized){const d=de(Q[a.componentType]);s.min.multiplyScalar(d),s.max.multiplyScalar(d)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const i=e.targets;if(i!==void 0){const a=new c.Vector3,r=new c.Vector3;for(let l=0,d=i.length;l<d;l++){const h=i[l];if(h.POSITION!==void 0){const f=t.json.accessors[h.POSITION],m=f.min,p=f.max;if(m!==void 0&&p!==void 0){if(r.setX(Math.max(Math.abs(m[0]),Math.abs(p[0]))),r.setY(Math.max(Math.abs(m[1]),Math.abs(p[1]))),r.setZ(Math.max(Math.abs(m[2]),Math.abs(p[2]))),f.normalized){const g=de(Q[f.componentType]);r.multiplyScalar(g)}a.max(r)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}s.expandByVector(a)}u.boundingBox=s;const n=new c.Sphere;s.getCenter(n.center),n.radius=s.min.distanceTo(s.max)/2,u.boundingSphere=n}function Le(u,e,t){const o=e.attributes,s=[];function i(n,a){return t.getDependency("accessor",n).then(function(r){u.setAttribute(a,r)})}for(const n in o){const a=ue[n]||n.toLowerCase();a in u.attributes||s.push(i(o[n],a))}if(e.indices!==void 0&&!u.index){const n=t.getDependency("accessor",e.indices).then(function(a){u.setIndex(a)});s.push(n)}return c.ColorManagement.workingColorSpace!==c.LinearSRGBColorSpace&&"COLOR_0"in o&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${c.ColorManagement.workingColorSpace}" not supported.`),z(u,e),Nt(u,e,t),Promise.all(s).then(function(){return e.targets!==void 0?Ct(u,e.targets,t):u})}const le=new WeakMap;class kt extends c.Loader{constructor(e){super(e),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}}setDecoderPath(e){return this.decoderPath=e,this}setDecoderConfig(e){return this.decoderConfig=e,this}setWorkerLimit(e){return this.workerLimit=e,this}load(e,t,o,s){const i=new c.FileLoader(this.manager);i.setPath(this.path),i.setResponseType("arraybuffer"),i.setRequestHeader(this.requestHeader),i.setWithCredentials(this.withCredentials),i.load(e,n=>{this.parse(n,t,s)},o,s)}parse(e,t,o=()=>{}){this.decodeDracoFile(e,t,null,null,c.SRGBColorSpace,o).catch(o)}decodeDracoFile(e,t,o,s,i=c.LinearSRGBColorSpace,n=()=>{}){const a={attributeIDs:o||this.defaultAttributeIDs,attributeTypes:s||this.defaultAttributeTypes,useUniqueIDs:!!o,vertexColorSpace:i};return this.decodeGeometry(e,a).then(t).catch(n)}decodeGeometry(e,t){const o=JSON.stringify(t);if(le.has(e)){const r=le.get(e);if(r.key===o)return r.promise;if(e.byteLength===0)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let s;const i=this.workerNextTaskID++,n=e.byteLength,a=this._getWorker(i,n).then(r=>(s=r,new Promise((l,d)=>{s._callbacks[i]={resolve:l,reject:d},s.postMessage({type:"decode",id:i,taskConfig:t,buffer:e},[e])}))).then(r=>this._createGeometry(r.geometry));return a.catch(()=>!0).then(()=>{s&&i&&this._releaseTask(s,i)}),le.set(e,{key:o,promise:a}),a}_createGeometry(e){const t=new c.BufferGeometry;e.index&&t.setIndex(new c.BufferAttribute(e.index.array,1));for(let o=0;o<e.attributes.length;o++){const s=e.attributes[o],i=s.name,n=s.array,a=s.itemSize,r=new c.BufferAttribute(n,a);i==="color"&&(this._assignVertexColorSpace(r,s.vertexColorSpace),r.normalized=!(n instanceof Float32Array)),t.setAttribute(i,r)}return t}_assignVertexColorSpace(e,t){if(t!==c.SRGBColorSpace)return;const o=new c.Color;for(let s=0,i=e.count;s<i;s++)o.fromBufferAttribute(e,s),c.ColorManagement.toWorkingColorSpace(o,c.SRGBColorSpace),e.setXYZ(s,o.r,o.g,o.b)}_loadLibrary(e,t){const o=new c.FileLoader(this.manager);return o.setPath(this.decoderPath),o.setResponseType(t),o.setWithCredentials(this.withCredentials),new Promise((s,i)=>{o.load(e,s,void 0,i)})}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const e=typeof WebAssembly!="object"||this.decoderConfig.type==="js",t=[];return e?t.push(this._loadLibrary("draco_decoder.js","text")):(t.push(this._loadLibrary("draco_wasm_wrapper.js","text")),t.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(t).then(o=>{const s=o[0];e||(this.decoderConfig.wasmBinary=o[1]);const i=Ft.toString(),n=["/* draco decoder */",s,"","/* worker */",i.substring(i.indexOf("{")+1,i.lastIndexOf("}"))].join(`
1
+ "use strict";var We=Object.defineProperty,qe=Object.defineProperties;var Ze=Object.getOwnPropertyDescriptors;var Te=Object.getOwnPropertySymbols;var Qe=Object.prototype.hasOwnProperty,$e=Object.prototype.propertyIsEnumerable;var Ae=(u,e,t)=>e in u?We(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,ye=(u,e)=>{for(var t in e||(e={}))Qe.call(e,t)&&Ae(u,t,e[t]);if(Te)for(var t of Te(e))$e.call(e,t)&&Ae(u,t,e[t]);return u},be=(u,e)=>qe(u,Ze(e));var Ee=(u,e,t)=>new Promise((o,s)=>{var i=r=>{try{a(t.next(r))}catch(l){s(l)}},n=r=>{try{a(t.throw(r))}catch(l){s(l)}},a=r=>r.done?o(r.value):Promise.resolve(r.value).then(i,n);a((t=t.apply(u,e)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("vue");require("html2canvas");const Je=require("./element-resize-detector-BlMXyWIR.cjs"),et=require("./index-EnNA0nIi.cjs"),c=require("./three.module-DNVo041Q.cjs"),Se=require("./ele-glbModel-icon-ByACDCrv.cjs");function xe(u,e){if(e===c.TrianglesDrawMode)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),u;if(e===c.TriangleFanDrawMode||e===c.TriangleStripDrawMode){let t=u.getIndex();if(t===null){const n=[],a=u.getAttribute("position");if(a!==void 0){for(let r=0;r<a.count;r++)n.push(r);u.setIndex(n),t=u.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),u}const o=t.count-2,s=[];if(e===c.TriangleFanDrawMode)for(let n=1;n<=o;n++)s.push(t.getX(0)),s.push(t.getX(n)),s.push(t.getX(n+1));else for(let n=0;n<o;n++)n%2===0?(s.push(t.getX(n)),s.push(t.getX(n+1)),s.push(t.getX(n+2))):(s.push(t.getX(n+2)),s.push(t.getX(n+1)),s.push(t.getX(n)));s.length/3!==o&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const i=u.clone();return i.setIndex(s),i.clearGroups(),i}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",e),u}class tt extends c.Loader{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(t){return new rt(t)}),this.register(function(t){return new at(t)}),this.register(function(t){return new gt(t)}),this.register(function(t){return new _t(t)}),this.register(function(t){return new Tt(t)}),this.register(function(t){return new lt(t)}),this.register(function(t){return new ht(t)}),this.register(function(t){return new ut(t)}),this.register(function(t){return new dt(t)}),this.register(function(t){return new ot(t)}),this.register(function(t){return new ft(t)}),this.register(function(t){return new ct(t)}),this.register(function(t){return new mt(t)}),this.register(function(t){return new pt(t)}),this.register(function(t){return new nt(t)}),this.register(function(t){return new At(t)}),this.register(function(t){return new yt(t)})}load(e,t,o,s){const i=this;let n;if(this.resourcePath!=="")n=this.resourcePath;else if(this.path!==""){const l=c.LoaderUtils.extractUrlBase(e);n=c.LoaderUtils.resolveURL(l,this.path)}else n=c.LoaderUtils.extractUrlBase(e);this.manager.itemStart(e);const a=function(l){s?s(l):console.error(l),i.manager.itemError(e),i.manager.itemEnd(e)},r=new c.FileLoader(this.manager);r.setPath(this.path),r.setResponseType("arraybuffer"),r.setRequestHeader(this.requestHeader),r.setWithCredentials(this.withCredentials),r.load(e,function(l){try{i.parse(l,n,function(d){t(d),i.manager.itemEnd(e)},a)}catch(d){a(d)}},o,a)}setDRACOLoader(e){return this.dracoLoader=e,this}setKTX2Loader(e){return this.ktx2Loader=e,this}setMeshoptDecoder(e){return this.meshoptDecoder=e,this}register(e){return this.pluginCallbacks.indexOf(e)===-1&&this.pluginCallbacks.push(e),this}unregister(e){return this.pluginCallbacks.indexOf(e)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,o,s){let i;const n={},a={},r=new TextDecoder;if(typeof e=="string")i=JSON.parse(e);else if(e instanceof ArrayBuffer)if(r.decode(new Uint8Array(e,0,4))===Ne){try{n[M.KHR_BINARY_GLTF]=new bt(e)}catch(h){s&&s(h);return}i=JSON.parse(n[M.KHR_BINARY_GLTF].content)}else i=JSON.parse(r.decode(e));else i=e;if(i.asset===void 0||i.asset.version[0]<2){s&&s(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const l=new It(i,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});l.fileLoader.setRequestHeader(this.requestHeader);for(let d=0;d<this.pluginCallbacks.length;d++){const h=this.pluginCallbacks[d](l);h.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),a[h.name]=h,n[h.name]=!0}if(i.extensionsUsed)for(let d=0;d<i.extensionsUsed.length;++d){const h=i.extensionsUsed[d],f=i.extensionsRequired||[];switch(h){case M.KHR_MATERIALS_UNLIT:n[h]=new it;break;case M.KHR_DRACO_MESH_COMPRESSION:n[h]=new Et(i,this.dracoLoader);break;case M.KHR_TEXTURE_TRANSFORM:n[h]=new St;break;case M.KHR_MESH_QUANTIZATION:n[h]=new xt;break;default:f.indexOf(h)>=0&&a[h]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+h+'".')}}l.setExtensions(n),l.setPlugins(a),l.parse(o,s)}parseAsync(e,t){const o=this;return new Promise(function(s,i){o.parse(e,t,s,i)})}}function st(){let u={};return{get:function(e){return u[e]},add:function(e,t){u[e]=t},remove:function(e){delete u[e]},removeAll:function(){u={}}}}const M={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class nt{constructor(e){this.parser=e,this.name=M.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let o=0,s=t.length;o<s;o++){const i=t[o];i.extensions&&i.extensions[this.name]&&i.extensions[this.name].light!==void 0&&e._addNodeRef(this.cache,i.extensions[this.name].light)}}_loadLight(e){const t=this.parser,o="light:"+e;let s=t.cache.get(o);if(s)return s;const i=t.json,r=((i.extensions&&i.extensions[this.name]||{}).lights||[])[e];let l;const d=new c.Color(16777215);r.color!==void 0&&d.setRGB(r.color[0],r.color[1],r.color[2],c.LinearSRGBColorSpace);const h=r.range!==void 0?r.range:0;switch(r.type){case"directional":l=new c.DirectionalLight(d),l.target.position.set(0,0,-1),l.add(l.target);break;case"point":l=new c.PointLight(d),l.distance=h;break;case"spot":l=new c.SpotLight(d),l.distance=h,r.spot=r.spot||{},r.spot.innerConeAngle=r.spot.innerConeAngle!==void 0?r.spot.innerConeAngle:0,r.spot.outerConeAngle=r.spot.outerConeAngle!==void 0?r.spot.outerConeAngle:Math.PI/4,l.angle=r.spot.outerConeAngle,l.penumbra=1-r.spot.innerConeAngle/r.spot.outerConeAngle,l.target.position.set(0,0,-1),l.add(l.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+r.type)}return l.position.set(0,0,0),l.decay=2,z(l,r),r.intensity!==void 0&&(l.intensity=r.intensity),l.name=t.createUniqueName(r.name||"light_"+e),s=Promise.resolve(l),t.cache.add(o,s),s}getDependency(e,t){if(e==="light")return this._loadLight(t)}createNodeAttachment(e){const t=this,o=this.parser,i=o.json.nodes[e],a=(i.extensions&&i.extensions[this.name]||{}).light;return a===void 0?null:this._loadLight(a).then(function(r){return o._getNodeRef(t.cache,a,r)})}}class it{constructor(){this.name=M.KHR_MATERIALS_UNLIT}getMaterialType(){return c.MeshBasicMaterial}extendParams(e,t,o){const s=[];e.color=new c.Color(1,1,1),e.opacity=1;const i=t.pbrMetallicRoughness;if(i){if(Array.isArray(i.baseColorFactor)){const n=i.baseColorFactor;e.color.setRGB(n[0],n[1],n[2],c.LinearSRGBColorSpace),e.opacity=n[3]}i.baseColorTexture!==void 0&&s.push(o.assignTexture(e,"map",i.baseColorTexture,c.SRGBColorSpace))}return Promise.all(s)}}class ot{constructor(e){this.parser=e,this.name=M.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,t){const s=this.parser.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=s.extensions[this.name].emissiveStrength;return i!==void 0&&(t.emissiveIntensity=i),Promise.resolve()}}class rt{constructor(e){this.parser=e,this.name=M.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:c.MeshPhysicalMaterial}extendMaterialParams(e,t){const o=this.parser,s=o.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=[],n=s.extensions[this.name];if(n.clearcoatFactor!==void 0&&(t.clearcoat=n.clearcoatFactor),n.clearcoatTexture!==void 0&&i.push(o.assignTexture(t,"clearcoatMap",n.clearcoatTexture)),n.clearcoatRoughnessFactor!==void 0&&(t.clearcoatRoughness=n.clearcoatRoughnessFactor),n.clearcoatRoughnessTexture!==void 0&&i.push(o.assignTexture(t,"clearcoatRoughnessMap",n.clearcoatRoughnessTexture)),n.clearcoatNormalTexture!==void 0&&(i.push(o.assignTexture(t,"clearcoatNormalMap",n.clearcoatNormalTexture)),n.clearcoatNormalTexture.scale!==void 0)){const a=n.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new c.Vector2(a,a)}return Promise.all(i)}}class at{constructor(e){this.parser=e,this.name=M.KHR_MATERIALS_DISPERSION}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:c.MeshPhysicalMaterial}extendMaterialParams(e,t){const s=this.parser.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=s.extensions[this.name];return t.dispersion=i.dispersion!==void 0?i.dispersion:0,Promise.resolve()}}class ct{constructor(e){this.parser=e,this.name=M.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:c.MeshPhysicalMaterial}extendMaterialParams(e,t){const o=this.parser,s=o.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=[],n=s.extensions[this.name];return n.iridescenceFactor!==void 0&&(t.iridescence=n.iridescenceFactor),n.iridescenceTexture!==void 0&&i.push(o.assignTexture(t,"iridescenceMap",n.iridescenceTexture)),n.iridescenceIor!==void 0&&(t.iridescenceIOR=n.iridescenceIor),t.iridescenceThicknessRange===void 0&&(t.iridescenceThicknessRange=[100,400]),n.iridescenceThicknessMinimum!==void 0&&(t.iridescenceThicknessRange[0]=n.iridescenceThicknessMinimum),n.iridescenceThicknessMaximum!==void 0&&(t.iridescenceThicknessRange[1]=n.iridescenceThicknessMaximum),n.iridescenceThicknessTexture!==void 0&&i.push(o.assignTexture(t,"iridescenceThicknessMap",n.iridescenceThicknessTexture)),Promise.all(i)}}class lt{constructor(e){this.parser=e,this.name=M.KHR_MATERIALS_SHEEN}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:c.MeshPhysicalMaterial}extendMaterialParams(e,t){const o=this.parser,s=o.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=[];t.sheenColor=new c.Color(0,0,0),t.sheenRoughness=0,t.sheen=1;const n=s.extensions[this.name];if(n.sheenColorFactor!==void 0){const a=n.sheenColorFactor;t.sheenColor.setRGB(a[0],a[1],a[2],c.LinearSRGBColorSpace)}return n.sheenRoughnessFactor!==void 0&&(t.sheenRoughness=n.sheenRoughnessFactor),n.sheenColorTexture!==void 0&&i.push(o.assignTexture(t,"sheenColorMap",n.sheenColorTexture,c.SRGBColorSpace)),n.sheenRoughnessTexture!==void 0&&i.push(o.assignTexture(t,"sheenRoughnessMap",n.sheenRoughnessTexture)),Promise.all(i)}}class ht{constructor(e){this.parser=e,this.name=M.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:c.MeshPhysicalMaterial}extendMaterialParams(e,t){const o=this.parser,s=o.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=[],n=s.extensions[this.name];return n.transmissionFactor!==void 0&&(t.transmission=n.transmissionFactor),n.transmissionTexture!==void 0&&i.push(o.assignTexture(t,"transmissionMap",n.transmissionTexture)),Promise.all(i)}}class ut{constructor(e){this.parser=e,this.name=M.KHR_MATERIALS_VOLUME}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:c.MeshPhysicalMaterial}extendMaterialParams(e,t){const o=this.parser,s=o.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=[],n=s.extensions[this.name];t.thickness=n.thicknessFactor!==void 0?n.thicknessFactor:0,n.thicknessTexture!==void 0&&i.push(o.assignTexture(t,"thicknessMap",n.thicknessTexture)),t.attenuationDistance=n.attenuationDistance||1/0;const a=n.attenuationColor||[1,1,1];return t.attenuationColor=new c.Color().setRGB(a[0],a[1],a[2],c.LinearSRGBColorSpace),Promise.all(i)}}class dt{constructor(e){this.parser=e,this.name=M.KHR_MATERIALS_IOR}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:c.MeshPhysicalMaterial}extendMaterialParams(e,t){const s=this.parser.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=s.extensions[this.name];return t.ior=i.ior!==void 0?i.ior:1.5,Promise.resolve()}}class ft{constructor(e){this.parser=e,this.name=M.KHR_MATERIALS_SPECULAR}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:c.MeshPhysicalMaterial}extendMaterialParams(e,t){const o=this.parser,s=o.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=[],n=s.extensions[this.name];t.specularIntensity=n.specularFactor!==void 0?n.specularFactor:1,n.specularTexture!==void 0&&i.push(o.assignTexture(t,"specularIntensityMap",n.specularTexture));const a=n.specularColorFactor||[1,1,1];return t.specularColor=new c.Color().setRGB(a[0],a[1],a[2],c.LinearSRGBColorSpace),n.specularColorTexture!==void 0&&i.push(o.assignTexture(t,"specularColorMap",n.specularColorTexture,c.SRGBColorSpace)),Promise.all(i)}}class pt{constructor(e){this.parser=e,this.name=M.EXT_MATERIALS_BUMP}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:c.MeshPhysicalMaterial}extendMaterialParams(e,t){const o=this.parser,s=o.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=[],n=s.extensions[this.name];return t.bumpScale=n.bumpFactor!==void 0?n.bumpFactor:1,n.bumpTexture!==void 0&&i.push(o.assignTexture(t,"bumpMap",n.bumpTexture)),Promise.all(i)}}class mt{constructor(e){this.parser=e,this.name=M.KHR_MATERIALS_ANISOTROPY}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:c.MeshPhysicalMaterial}extendMaterialParams(e,t){const o=this.parser,s=o.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=[],n=s.extensions[this.name];return n.anisotropyStrength!==void 0&&(t.anisotropy=n.anisotropyStrength),n.anisotropyRotation!==void 0&&(t.anisotropyRotation=n.anisotropyRotation),n.anisotropyTexture!==void 0&&i.push(o.assignTexture(t,"anisotropyMap",n.anisotropyTexture)),Promise.all(i)}}class gt{constructor(e){this.parser=e,this.name=M.KHR_TEXTURE_BASISU}loadTexture(e){const t=this.parser,o=t.json,s=o.textures[e];if(!s.extensions||!s.extensions[this.name])return null;const i=s.extensions[this.name],n=t.options.ktx2Loader;if(!n){if(o.extensionsRequired&&o.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,i.source,n)}}class _t{constructor(e){this.parser=e,this.name=M.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,o=this.parser,s=o.json,i=s.textures[e];if(!i.extensions||!i.extensions[t])return null;const n=i.extensions[t],a=s.images[n.source];let r=o.textureLoader;if(a.uri){const l=o.options.manager.getHandler(a.uri);l!==null&&(r=l)}return this.detectSupport().then(function(l){if(l)return o.loadTextureImage(e,n.source,r);if(s.extensionsRequired&&s.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return o.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class Tt{constructor(e){this.parser=e,this.name=M.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const t=this.name,o=this.parser,s=o.json,i=s.textures[e];if(!i.extensions||!i.extensions[t])return null;const n=i.extensions[t],a=s.images[n.source];let r=o.textureLoader;if(a.uri){const l=o.options.manager.getHandler(a.uri);l!==null&&(r=l)}return this.detectSupport().then(function(l){if(l)return o.loadTextureImage(e,n.source,r);if(s.extensionsRequired&&s.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return o.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class At{constructor(e){this.name=M.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,o=t.bufferViews[e];if(o.extensions&&o.extensions[this.name]){const s=o.extensions[this.name],i=this.parser.getDependency("buffer",s.buffer),n=this.parser.options.meshoptDecoder;if(!n||!n.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return i.then(function(a){const r=s.byteOffset||0,l=s.byteLength||0,d=s.count,h=s.byteStride,f=new Uint8Array(a,r,l);return n.decodeGltfBufferAsync?n.decodeGltfBufferAsync(d,h,f,s.mode,s.filter).then(function(m){return m.buffer}):n.ready.then(function(){const m=new ArrayBuffer(d*h);return n.decodeGltfBuffer(new Uint8Array(m),d,h,f,s.mode,s.filter),m})})}else return null}}class yt{constructor(e){this.name=M.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,o=t.nodes[e];if(!o.extensions||!o.extensions[this.name]||o.mesh===void 0)return null;const s=t.meshes[o.mesh];for(const l of s.primitives)if(l.mode!==G.TRIANGLES&&l.mode!==G.TRIANGLE_STRIP&&l.mode!==G.TRIANGLE_FAN&&l.mode!==void 0)return null;const n=o.extensions[this.name].attributes,a=[],r={};for(const l in n)a.push(this.parser.getDependency("accessor",n[l]).then(d=>(r[l]=d,r[l])));return a.length<1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then(l=>{const d=l.pop(),h=d.isGroup?d.children:[d],f=l[0].count,m=[];for(const p of h){const g=new c.Matrix4,_=new c.Vector3,y=new c.Quaternion,b=new c.Vector3(1,1,1),C=new c.InstancedMesh(p.geometry,p.material,f);for(let x=0;x<f;x++)r.TRANSLATION&&_.fromBufferAttribute(r.TRANSLATION,x),r.ROTATION&&y.fromBufferAttribute(r.ROTATION,x),r.SCALE&&b.fromBufferAttribute(r.SCALE,x),C.setMatrixAt(x,g.compose(_,y,b));for(const x in r)if(x==="_COLOR_0"){const v=r[x];C.instanceColor=new c.InstancedBufferAttribute(v.array,v.itemSize,v.normalized)}else x!=="TRANSLATION"&&x!=="ROTATION"&&x!=="SCALE"&&p.geometry.setAttribute(x,r[x]);c.Object3D.prototype.copy.call(C,p),this.parser.assignFinalMaterial(C),m.push(C)}return d.isGroup?(d.clear(),d.add(...m),d):m[0]}))}}const Ne="glTF",ee=12,Re={JSON:1313821514,BIN:5130562};class bt{constructor(e){this.name=M.KHR_BINARY_GLTF,this.content=null,this.body=null;const t=new DataView(e,0,ee),o=new TextDecoder;if(this.header={magic:o.decode(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==Ne)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const s=this.header.length-ee,i=new DataView(e,ee);let n=0;for(;n<s;){const a=i.getUint32(n,!0);n+=4;const r=i.getUint32(n,!0);if(n+=4,r===Re.JSON){const l=new Uint8Array(e,ee+n,a);this.content=o.decode(l)}else if(r===Re.BIN){const l=ee+n;this.body=e.slice(l,l+a)}n+=a}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class Et{constructor(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=M.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}decodePrimitive(e,t){const o=this.json,s=this.dracoLoader,i=e.extensions[this.name].bufferView,n=e.extensions[this.name].attributes,a={},r={},l={};for(const d in n){const h=ue[d]||d.toLowerCase();a[h]=n[d]}for(const d in e.attributes){const h=ue[d]||d.toLowerCase();if(n[d]!==void 0){const f=o.accessors[e.attributes[d]],m=Q[f.componentType];l[h]=m.name,r[h]=f.normalized===!0}}return t.getDependency("bufferView",i).then(function(d){return new Promise(function(h,f){s.decodeDracoFile(d,function(m){for(const p in m.attributes){const g=m.attributes[p],_=r[p];_!==void 0&&(g.normalized=_)}h(m)},a,l,c.LinearSRGBColorSpace,f)})})}}class St{constructor(){this.name=M.KHR_TEXTURE_TRANSFORM}extendTexture(e,t){return(t.texCoord===void 0||t.texCoord===e.channel)&&t.offset===void 0&&t.rotation===void 0&&t.scale===void 0||(e=e.clone(),t.texCoord!==void 0&&(e.channel=t.texCoord),t.offset!==void 0&&e.offset.fromArray(t.offset),t.rotation!==void 0&&(e.rotation=t.rotation),t.scale!==void 0&&e.repeat.fromArray(t.scale),e.needsUpdate=!0),e}}class xt{constructor(){this.name=M.KHR_MESH_QUANTIZATION}}class ke extends c.Interpolant{constructor(e,t,o,s){super(e,t,o,s)}copySampleValue_(e){const t=this.resultBuffer,o=this.sampleValues,s=this.valueSize,i=e*s*3+s;for(let n=0;n!==s;n++)t[n]=o[i+n];return t}interpolate_(e,t,o,s){const i=this.resultBuffer,n=this.sampleValues,a=this.valueSize,r=a*2,l=a*3,d=s-t,h=(o-t)/d,f=h*h,m=f*h,p=e*l,g=p-l,_=-2*m+3*f,y=m-f,b=1-_,C=y-f+h;for(let x=0;x!==a;x++){const v=n[g+x+a],B=n[g+x+r]*d,k=n[p+x+a],w=n[p+x]*d;i[x]=b*v+C*B+_*k+y*w}return i}}const Rt=new c.Quaternion;class Mt extends ke{interpolate_(e,t,o,s){const i=super.interpolate_(e,t,o,s);return Rt.fromArray(i).normalize().toArray(i),i}}const G={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},Q={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},Me={9728:c.NearestFilter,9729:c.LinearFilter,9984:c.NearestMipmapNearestFilter,9985:c.LinearMipmapNearestFilter,9986:c.NearestMipmapLinearFilter,9987:c.LinearMipmapLinearFilter},we={33071:c.ClampToEdgeWrapping,33648:c.MirroredRepeatWrapping,10497:c.RepeatWrapping},re={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},ue={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},Y={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},wt={CUBICSPLINE:void 0,LINEAR:c.InterpolateLinear,STEP:c.InterpolateDiscrete},ae={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function Lt(u){return u.DefaultMaterial===void 0&&(u.DefaultMaterial=new c.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:c.FrontSide})),u.DefaultMaterial}function W(u,e,t){for(const o in t.extensions)u[o]===void 0&&(e.userData.gltfExtensions=e.userData.gltfExtensions||{},e.userData.gltfExtensions[o]=t.extensions[o])}function z(u,e){e.extras!==void 0&&(typeof e.extras=="object"?Object.assign(u.userData,e.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+e.extras))}function Ct(u,e,t){let o=!1,s=!1,i=!1;for(let l=0,d=e.length;l<d;l++){const h=e[l];if(h.POSITION!==void 0&&(o=!0),h.NORMAL!==void 0&&(s=!0),h.COLOR_0!==void 0&&(i=!0),o&&s&&i)break}if(!o&&!s&&!i)return Promise.resolve(u);const n=[],a=[],r=[];for(let l=0,d=e.length;l<d;l++){const h=e[l];if(o){const f=h.POSITION!==void 0?t.getDependency("accessor",h.POSITION):u.attributes.position;n.push(f)}if(s){const f=h.NORMAL!==void 0?t.getDependency("accessor",h.NORMAL):u.attributes.normal;a.push(f)}if(i){const f=h.COLOR_0!==void 0?t.getDependency("accessor",h.COLOR_0):u.attributes.color;r.push(f)}}return Promise.all([Promise.all(n),Promise.all(a),Promise.all(r)]).then(function(l){const d=l[0],h=l[1],f=l[2];return o&&(u.morphAttributes.position=d),s&&(u.morphAttributes.normal=h),i&&(u.morphAttributes.color=f),u.morphTargetsRelative=!0,u})}function Dt(u,e){if(u.updateMorphTargets(),e.weights!==void 0)for(let t=0,o=e.weights.length;t<o;t++)u.morphTargetInfluences[t]=e.weights[t];if(e.extras&&Array.isArray(e.extras.targetNames)){const t=e.extras.targetNames;if(u.morphTargetInfluences.length===t.length){u.morphTargetDictionary={};for(let o=0,s=t.length;o<s;o++)u.morphTargetDictionary[t[o]]=o}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function Pt(u){let e;const t=u.extensions&&u.extensions[M.KHR_DRACO_MESH_COMPRESSION];if(t?e="draco:"+t.bufferView+":"+t.indices+":"+ce(t.attributes):e=u.indices+":"+ce(u.attributes)+":"+u.mode,u.targets!==void 0)for(let o=0,s=u.targets.length;o<s;o++)e+=":"+ce(u.targets[o]);return e}function ce(u){let e="";const t=Object.keys(u).sort();for(let o=0,s=t.length;o<s;o++)e+=t[o]+":"+u[t[o]]+";";return e}function de(u){switch(u){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function Ot(u){return u.search(/\.jpe?g($|\?)/i)>0||u.search(/^data\:image\/jpeg/)===0?"image/jpeg":u.search(/\.webp($|\?)/i)>0||u.search(/^data\:image\/webp/)===0?"image/webp":u.search(/\.ktx2($|\?)/i)>0||u.search(/^data\:image\/ktx2/)===0?"image/ktx2":"image/png"}const vt=new c.Matrix4;class It{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new st,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let o=!1,s=-1,i=!1,n=-1;if(typeof navigator!="undefined"){const a=navigator.userAgent;o=/^((?!chrome|android).)*safari/i.test(a)===!0;const r=a.match(/Version\/(\d+)/);s=o&&r?parseInt(r[1],10):-1,i=a.indexOf("Firefox")>-1,n=i?a.match(/Firefox\/([0-9]+)\./)[1]:-1}typeof createImageBitmap=="undefined"||o&&s<17||i&&n<98?this.textureLoader=new c.TextureLoader(this.options.manager):this.textureLoader=new c.ImageBitmapLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new c.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const o=this,s=this.json,i=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(n){return n._markDefs&&n._markDefs()}),Promise.all(this._invokeAll(function(n){return n.beforeRoot&&n.beforeRoot()})).then(function(){return Promise.all([o.getDependencies("scene"),o.getDependencies("animation"),o.getDependencies("camera")])}).then(function(n){const a={scene:n[0][s.scene||0],scenes:n[0],animations:n[1],cameras:n[2],asset:s.asset,parser:o,userData:{}};return W(i,a,s),z(a,s),Promise.all(o._invokeAll(function(r){return r.afterRoot&&r.afterRoot(a)})).then(function(){for(const r of a.scenes)r.updateMatrixWorld();e(a)})}).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],o=this.json.meshes||[];for(let s=0,i=t.length;s<i;s++){const n=t[s].joints;for(let a=0,r=n.length;a<r;a++)e[n[a]].isBone=!0}for(let s=0,i=e.length;s<i;s++){const n=e[s];n.mesh!==void 0&&(this._addNodeRef(this.meshCache,n.mesh),n.skin!==void 0&&(o[n.mesh].isSkinnedMesh=!0)),n.camera!==void 0&&this._addNodeRef(this.cameraCache,n.camera)}}_addNodeRef(e,t){t!==void 0&&(e.refs[t]===void 0&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)}_getNodeRef(e,t,o){if(e.refs[t]<=1)return o;const s=o.clone(),i=(n,a)=>{const r=this.associations.get(n);r!=null&&this.associations.set(a,r);for(const[l,d]of n.children.entries())i(d,a.children[l])};return i(o,s),s.name+="_instance_"+e.uses[t]++,s}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let o=0;o<t.length;o++){const s=e(t[o]);if(s)return s}return null}_invokeAll(e){const t=Object.values(this.plugins);t.unshift(this);const o=[];for(let s=0;s<t.length;s++){const i=e(t[s]);i&&o.push(i)}return o}getDependency(e,t){const o=e+":"+t;let s=this.cache.get(o);if(!s){switch(e){case"scene":s=this.loadScene(t);break;case"node":s=this._invokeOne(function(i){return i.loadNode&&i.loadNode(t)});break;case"mesh":s=this._invokeOne(function(i){return i.loadMesh&&i.loadMesh(t)});break;case"accessor":s=this.loadAccessor(t);break;case"bufferView":s=this._invokeOne(function(i){return i.loadBufferView&&i.loadBufferView(t)});break;case"buffer":s=this.loadBuffer(t);break;case"material":s=this._invokeOne(function(i){return i.loadMaterial&&i.loadMaterial(t)});break;case"texture":s=this._invokeOne(function(i){return i.loadTexture&&i.loadTexture(t)});break;case"skin":s=this.loadSkin(t);break;case"animation":s=this._invokeOne(function(i){return i.loadAnimation&&i.loadAnimation(t)});break;case"camera":s=this.loadCamera(t);break;default:if(s=this._invokeOne(function(i){return i!=this&&i.getDependency&&i.getDependency(e,t)}),!s)throw new Error("Unknown type: "+e);break}this.cache.add(o,s)}return s}getDependencies(e){let t=this.cache.get(e);if(!t){const o=this,s=this.json[e+(e==="mesh"?"es":"s")]||[];t=Promise.all(s.map(function(i,n){return o.getDependency(e,n)})),this.cache.add(e,t)}return t}loadBuffer(e){const t=this.json.buffers[e],o=this.fileLoader;if(t.type&&t.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(t.uri===void 0&&e===0)return Promise.resolve(this.extensions[M.KHR_BINARY_GLTF].body);const s=this.options;return new Promise(function(i,n){o.load(c.LoaderUtils.resolveURL(t.uri,s.path),i,void 0,function(){n(new Error('THREE.GLTFLoader: Failed to load buffer "'+t.uri+'".'))})})}loadBufferView(e){const t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then(function(o){const s=t.byteLength||0,i=t.byteOffset||0;return o.slice(i,i+s)})}loadAccessor(e){const t=this,o=this.json,s=this.json.accessors[e];if(s.bufferView===void 0&&s.sparse===void 0){const n=re[s.type],a=Q[s.componentType],r=s.normalized===!0,l=new a(s.count*n);return Promise.resolve(new c.BufferAttribute(l,n,r))}const i=[];return s.bufferView!==void 0?i.push(this.getDependency("bufferView",s.bufferView)):i.push(null),s.sparse!==void 0&&(i.push(this.getDependency("bufferView",s.sparse.indices.bufferView)),i.push(this.getDependency("bufferView",s.sparse.values.bufferView))),Promise.all(i).then(function(n){const a=n[0],r=re[s.type],l=Q[s.componentType],d=l.BYTES_PER_ELEMENT,h=d*r,f=s.byteOffset||0,m=s.bufferView!==void 0?o.bufferViews[s.bufferView].byteStride:void 0,p=s.normalized===!0;let g,_;if(m&&m!==h){const y=Math.floor(f/m),b="InterleavedBuffer:"+s.bufferView+":"+s.componentType+":"+y+":"+s.count;let C=t.cache.get(b);C||(g=new l(a,y*m,s.count*m/d),C=new c.InterleavedBuffer(g,m/d),t.cache.add(b,C)),_=new c.InterleavedBufferAttribute(C,r,f%m/d,p)}else a===null?g=new l(s.count*r):g=new l(a,f,s.count*r),_=new c.BufferAttribute(g,r,p);if(s.sparse!==void 0){const y=re.SCALAR,b=Q[s.sparse.indices.componentType],C=s.sparse.indices.byteOffset||0,x=s.sparse.values.byteOffset||0,v=new b(n[1],C,s.sparse.count*y),B=new l(n[2],x,s.sparse.count*r);a!==null&&(_=new c.BufferAttribute(_.array.slice(),_.itemSize,_.normalized)),_.normalized=!1;for(let k=0,w=v.length;k<w;k++){const V=v[k];if(_.setX(V,B[k*r]),r>=2&&_.setY(V,B[k*r+1]),r>=3&&_.setZ(V,B[k*r+2]),r>=4&&_.setW(V,B[k*r+3]),r>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}_.normalized=p}return _})}loadTexture(e){const t=this.json,o=this.options,i=t.textures[e].source,n=t.images[i];let a=this.textureLoader;if(n.uri){const r=o.manager.getHandler(n.uri);r!==null&&(a=r)}return this.loadTextureImage(e,i,a)}loadTextureImage(e,t,o){const s=this,i=this.json,n=i.textures[e],a=i.images[t],r=(a.uri||a.bufferView)+":"+n.sampler;if(this.textureCache[r])return this.textureCache[r];const l=this.loadImageSource(t,o).then(function(d){d.flipY=!1,d.name=n.name||a.name||"",d.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(d.name=a.uri);const f=(i.samplers||{})[n.sampler]||{};return d.magFilter=Me[f.magFilter]||c.LinearFilter,d.minFilter=Me[f.minFilter]||c.LinearMipmapLinearFilter,d.wrapS=we[f.wrapS]||c.RepeatWrapping,d.wrapT=we[f.wrapT]||c.RepeatWrapping,d.generateMipmaps=!d.isCompressedTexture&&d.minFilter!==c.NearestFilter&&d.minFilter!==c.LinearFilter,s.associations.set(d,{textures:e}),d}).catch(function(){return null});return this.textureCache[r]=l,l}loadImageSource(e,t){const o=this,s=this.json,i=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(h=>h.clone());const n=s.images[e],a=self.URL||self.webkitURL;let r=n.uri||"",l=!1;if(n.bufferView!==void 0)r=o.getDependency("bufferView",n.bufferView).then(function(h){l=!0;const f=new Blob([h],{type:n.mimeType});return r=a.createObjectURL(f),r});else if(n.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const d=Promise.resolve(r).then(function(h){return new Promise(function(f,m){let p=f;t.isImageBitmapLoader===!0&&(p=function(g){const _=new c.Texture(g);_.needsUpdate=!0,f(_)}),t.load(c.LoaderUtils.resolveURL(h,i.path),p,void 0,m)})}).then(function(h){return l===!0&&a.revokeObjectURL(r),z(h,n),h.userData.mimeType=n.mimeType||Ot(n.uri),h}).catch(function(h){throw console.error("THREE.GLTFLoader: Couldn't load texture",r),h});return this.sourceCache[e]=d,d}assignTexture(e,t,o,s){const i=this;return this.getDependency("texture",o.index).then(function(n){if(!n)return null;if(o.texCoord!==void 0&&o.texCoord>0&&(n=n.clone(),n.channel=o.texCoord),i.extensions[M.KHR_TEXTURE_TRANSFORM]){const a=o.extensions!==void 0?o.extensions[M.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const r=i.associations.get(n);n=i.extensions[M.KHR_TEXTURE_TRANSFORM].extendTexture(n,a),i.associations.set(n,r)}}return s!==void 0&&(n.colorSpace=s),e[t]=n,n})}assignFinalMaterial(e){const t=e.geometry;let o=e.material;const s=t.attributes.tangent===void 0,i=t.attributes.color!==void 0,n=t.attributes.normal===void 0;if(e.isPoints){const a="PointsMaterial:"+o.uuid;let r=this.cache.get(a);r||(r=new c.PointsMaterial,c.Material.prototype.copy.call(r,o),r.color.copy(o.color),r.map=o.map,r.sizeAttenuation=!1,this.cache.add(a,r)),o=r}else if(e.isLine){const a="LineBasicMaterial:"+o.uuid;let r=this.cache.get(a);r||(r=new c.LineBasicMaterial,c.Material.prototype.copy.call(r,o),r.color.copy(o.color),r.map=o.map,this.cache.add(a,r)),o=r}if(s||i||n){let a="ClonedMaterial:"+o.uuid+":";s&&(a+="derivative-tangents:"),i&&(a+="vertex-colors:"),n&&(a+="flat-shading:");let r=this.cache.get(a);r||(r=o.clone(),i&&(r.vertexColors=!0),n&&(r.flatShading=!0),s&&(r.normalScale&&(r.normalScale.y*=-1),r.clearcoatNormalScale&&(r.clearcoatNormalScale.y*=-1)),this.cache.add(a,r),this.associations.set(r,this.associations.get(o))),o=r}e.material=o}getMaterialType(){return c.MeshStandardMaterial}loadMaterial(e){const t=this,o=this.json,s=this.extensions,i=o.materials[e];let n;const a={},r=i.extensions||{},l=[];if(r[M.KHR_MATERIALS_UNLIT]){const h=s[M.KHR_MATERIALS_UNLIT];n=h.getMaterialType(),l.push(h.extendParams(a,i,t))}else{const h=i.pbrMetallicRoughness||{};if(a.color=new c.Color(1,1,1),a.opacity=1,Array.isArray(h.baseColorFactor)){const f=h.baseColorFactor;a.color.setRGB(f[0],f[1],f[2],c.LinearSRGBColorSpace),a.opacity=f[3]}h.baseColorTexture!==void 0&&l.push(t.assignTexture(a,"map",h.baseColorTexture,c.SRGBColorSpace)),a.metalness=h.metallicFactor!==void 0?h.metallicFactor:1,a.roughness=h.roughnessFactor!==void 0?h.roughnessFactor:1,h.metallicRoughnessTexture!==void 0&&(l.push(t.assignTexture(a,"metalnessMap",h.metallicRoughnessTexture)),l.push(t.assignTexture(a,"roughnessMap",h.metallicRoughnessTexture))),n=this._invokeOne(function(f){return f.getMaterialType&&f.getMaterialType(e)}),l.push(Promise.all(this._invokeAll(function(f){return f.extendMaterialParams&&f.extendMaterialParams(e,a)})))}i.doubleSided===!0&&(a.side=c.DoubleSide);const d=i.alphaMode||ae.OPAQUE;if(d===ae.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,d===ae.MASK&&(a.alphaTest=i.alphaCutoff!==void 0?i.alphaCutoff:.5)),i.normalTexture!==void 0&&n!==c.MeshBasicMaterial&&(l.push(t.assignTexture(a,"normalMap",i.normalTexture)),a.normalScale=new c.Vector2(1,1),i.normalTexture.scale!==void 0)){const h=i.normalTexture.scale;a.normalScale.set(h,h)}if(i.occlusionTexture!==void 0&&n!==c.MeshBasicMaterial&&(l.push(t.assignTexture(a,"aoMap",i.occlusionTexture)),i.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=i.occlusionTexture.strength)),i.emissiveFactor!==void 0&&n!==c.MeshBasicMaterial){const h=i.emissiveFactor;a.emissive=new c.Color().setRGB(h[0],h[1],h[2],c.LinearSRGBColorSpace)}return i.emissiveTexture!==void 0&&n!==c.MeshBasicMaterial&&l.push(t.assignTexture(a,"emissiveMap",i.emissiveTexture,c.SRGBColorSpace)),Promise.all(l).then(function(){const h=new n(a);return i.name&&(h.name=i.name),z(h,i),t.associations.set(h,{materials:e}),i.extensions&&W(s,h,i),h})}createUniqueName(e){const t=c.PropertyBinding.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){const t=this,o=this.extensions,s=this.primitiveCache;function i(a){return o[M.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,t).then(function(r){return Le(r,a,t)})}const n=[];for(let a=0,r=e.length;a<r;a++){const l=e[a],d=Pt(l),h=s[d];if(h)n.push(h.promise);else{let f;l.extensions&&l.extensions[M.KHR_DRACO_MESH_COMPRESSION]?f=i(l):f=Le(new c.BufferGeometry,l,t),s[d]={primitive:l,promise:f},n.push(f)}}return Promise.all(n)}loadMesh(e){const t=this,o=this.json,s=this.extensions,i=o.meshes[e],n=i.primitives,a=[];for(let r=0,l=n.length;r<l;r++){const d=n[r].material===void 0?Lt(this.cache):this.getDependency("material",n[r].material);a.push(d)}return a.push(t.loadGeometries(n)),Promise.all(a).then(function(r){const l=r.slice(0,r.length-1),d=r[r.length-1],h=[];for(let m=0,p=d.length;m<p;m++){const g=d[m],_=n[m];let y;const b=l[m];if(_.mode===G.TRIANGLES||_.mode===G.TRIANGLE_STRIP||_.mode===G.TRIANGLE_FAN||_.mode===void 0)y=i.isSkinnedMesh===!0?new c.SkinnedMesh(g,b):new c.Mesh(g,b),y.isSkinnedMesh===!0&&y.normalizeSkinWeights(),_.mode===G.TRIANGLE_STRIP?y.geometry=xe(y.geometry,c.TriangleStripDrawMode):_.mode===G.TRIANGLE_FAN&&(y.geometry=xe(y.geometry,c.TriangleFanDrawMode));else if(_.mode===G.LINES)y=new c.LineSegments(g,b);else if(_.mode===G.LINE_STRIP)y=new c.Line(g,b);else if(_.mode===G.LINE_LOOP)y=new c.LineLoop(g,b);else if(_.mode===G.POINTS)y=new c.Points(g,b);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+_.mode);Object.keys(y.geometry.morphAttributes).length>0&&Dt(y,i),y.name=t.createUniqueName(i.name||"mesh_"+e),z(y,i),_.extensions&&W(s,y,_),t.assignFinalMaterial(y),h.push(y)}for(let m=0,p=h.length;m<p;m++)t.associations.set(h[m],{meshes:e,primitives:m});if(h.length===1)return i.extensions&&W(s,h[0],i),h[0];const f=new c.Group;i.extensions&&W(s,f,i),t.associations.set(f,{meshes:e});for(let m=0,p=h.length;m<p;m++)f.add(h[m]);return f})}loadCamera(e){let t;const o=this.json.cameras[e],s=o[o.type];if(!s){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return o.type==="perspective"?t=new c.PerspectiveCamera(c.MathUtils.radToDeg(s.yfov),s.aspectRatio||1,s.znear||1,s.zfar||2e6):o.type==="orthographic"&&(t=new c.OrthographicCamera(-s.xmag,s.xmag,s.ymag,-s.ymag,s.znear,s.zfar)),o.name&&(t.name=this.createUniqueName(o.name)),z(t,o),Promise.resolve(t)}loadSkin(e){const t=this.json.skins[e],o=[];for(let s=0,i=t.joints.length;s<i;s++)o.push(this._loadNodeShallow(t.joints[s]));return t.inverseBindMatrices!==void 0?o.push(this.getDependency("accessor",t.inverseBindMatrices)):o.push(null),Promise.all(o).then(function(s){const i=s.pop(),n=s,a=[],r=[];for(let l=0,d=n.length;l<d;l++){const h=n[l];if(h){a.push(h);const f=new c.Matrix4;i!==null&&f.fromArray(i.array,l*16),r.push(f)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',t.joints[l])}return new c.Skeleton(a,r)})}loadAnimation(e){const t=this.json,o=this,s=t.animations[e],i=s.name?s.name:"animation_"+e,n=[],a=[],r=[],l=[],d=[];for(let h=0,f=s.channels.length;h<f;h++){const m=s.channels[h],p=s.samplers[m.sampler],g=m.target,_=g.node,y=s.parameters!==void 0?s.parameters[p.input]:p.input,b=s.parameters!==void 0?s.parameters[p.output]:p.output;g.node!==void 0&&(n.push(this.getDependency("node",_)),a.push(this.getDependency("accessor",y)),r.push(this.getDependency("accessor",b)),l.push(p),d.push(g))}return Promise.all([Promise.all(n),Promise.all(a),Promise.all(r),Promise.all(l),Promise.all(d)]).then(function(h){const f=h[0],m=h[1],p=h[2],g=h[3],_=h[4],y=[];for(let b=0,C=f.length;b<C;b++){const x=f[b],v=m[b],B=p[b],k=g[b],w=_[b];if(x===void 0)continue;x.updateMatrix&&x.updateMatrix();const V=o._createAnimationTracks(x,v,B,k,w);if(V)for(let $=0;$<V.length;$++)y.push(V[$])}return new c.AnimationClip(i,void 0,y)})}createNodeMesh(e){const t=this.json,o=this,s=t.nodes[e];return s.mesh===void 0?null:o.getDependency("mesh",s.mesh).then(function(i){const n=o._getNodeRef(o.meshCache,s.mesh,i);return s.weights!==void 0&&n.traverse(function(a){if(a.isMesh)for(let r=0,l=s.weights.length;r<l;r++)a.morphTargetInfluences[r]=s.weights[r]}),n})}loadNode(e){const t=this.json,o=this,s=t.nodes[e],i=o._loadNodeShallow(e),n=[],a=s.children||[];for(let l=0,d=a.length;l<d;l++)n.push(o.getDependency("node",a[l]));const r=s.skin===void 0?Promise.resolve(null):o.getDependency("skin",s.skin);return Promise.all([i,Promise.all(n),r]).then(function(l){const d=l[0],h=l[1],f=l[2];f!==null&&d.traverse(function(m){m.isSkinnedMesh&&m.bind(f,vt)});for(let m=0,p=h.length;m<p;m++)d.add(h[m]);return d})}_loadNodeShallow(e){const t=this.json,o=this.extensions,s=this;if(this.nodeCache[e]!==void 0)return this.nodeCache[e];const i=t.nodes[e],n=i.name?s.createUniqueName(i.name):"",a=[],r=s._invokeOne(function(l){return l.createNodeMesh&&l.createNodeMesh(e)});return r&&a.push(r),i.camera!==void 0&&a.push(s.getDependency("camera",i.camera).then(function(l){return s._getNodeRef(s.cameraCache,i.camera,l)})),s._invokeAll(function(l){return l.createNodeAttachment&&l.createNodeAttachment(e)}).forEach(function(l){a.push(l)}),this.nodeCache[e]=Promise.all(a).then(function(l){let d;if(i.isBone===!0?d=new c.Bone:l.length>1?d=new c.Group:l.length===1?d=l[0]:d=new c.Object3D,d!==l[0])for(let h=0,f=l.length;h<f;h++)d.add(l[h]);if(i.name&&(d.userData.name=i.name,d.name=n),z(d,i),i.extensions&&W(o,d,i),i.matrix!==void 0){const h=new c.Matrix4;h.fromArray(i.matrix),d.applyMatrix4(h)}else i.translation!==void 0&&d.position.fromArray(i.translation),i.rotation!==void 0&&d.quaternion.fromArray(i.rotation),i.scale!==void 0&&d.scale.fromArray(i.scale);return s.associations.has(d)||s.associations.set(d,{}),s.associations.get(d).nodes=e,d}),this.nodeCache[e]}loadScene(e){const t=this.extensions,o=this.json.scenes[e],s=this,i=new c.Group;o.name&&(i.name=s.createUniqueName(o.name)),z(i,o),o.extensions&&W(t,i,o);const n=o.nodes||[],a=[];for(let r=0,l=n.length;r<l;r++)a.push(s.getDependency("node",n[r]));return Promise.all(a).then(function(r){for(let d=0,h=r.length;d<h;d++)i.add(r[d]);const l=d=>{const h=new Map;for(const[f,m]of s.associations)(f instanceof c.Material||f instanceof c.Texture)&&h.set(f,m);return d.traverse(f=>{const m=s.associations.get(f);m!=null&&h.set(f,m)}),h};return s.associations=l(i),i})}_createAnimationTracks(e,t,o,s,i){const n=[],a=e.name?e.name:e.uuid,r=[];Y[i.path]===Y.weights?e.traverse(function(f){f.morphTargetInfluences&&r.push(f.name?f.name:f.uuid)}):r.push(a);let l;switch(Y[i.path]){case Y.weights:l=c.NumberKeyframeTrack;break;case Y.rotation:l=c.QuaternionKeyframeTrack;break;case Y.position:case Y.scale:l=c.VectorKeyframeTrack;break;default:o.itemSize===1?l=c.NumberKeyframeTrack:l=c.VectorKeyframeTrack;break}const d=s.interpolation!==void 0?wt[s.interpolation]:c.InterpolateLinear,h=this._getArrayFromAccessor(o);for(let f=0,m=r.length;f<m;f++){const p=new l(r[f]+"."+Y[i.path],t.array,h,d);s.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(p),n.push(p)}return n}_getArrayFromAccessor(e){let t=e.array;if(e.normalized){const o=de(t.constructor),s=new Float32Array(t.length);for(let i=0,n=t.length;i<n;i++)s[i]=t[i]*o;t=s}return t}_createCubicSplineTrackInterpolant(e){e.createInterpolant=function(o){const s=this instanceof c.QuaternionKeyframeTrack?Mt:ke;return new s(this.times,this.values,this.getValueSize()/3,o)},e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function Nt(u,e,t){const o=e.attributes,s=new c.Box3;if(o.POSITION!==void 0){const a=t.json.accessors[o.POSITION],r=a.min,l=a.max;if(r!==void 0&&l!==void 0){if(s.set(new c.Vector3(r[0],r[1],r[2]),new c.Vector3(l[0],l[1],l[2])),a.normalized){const d=de(Q[a.componentType]);s.min.multiplyScalar(d),s.max.multiplyScalar(d)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const i=e.targets;if(i!==void 0){const a=new c.Vector3,r=new c.Vector3;for(let l=0,d=i.length;l<d;l++){const h=i[l];if(h.POSITION!==void 0){const f=t.json.accessors[h.POSITION],m=f.min,p=f.max;if(m!==void 0&&p!==void 0){if(r.setX(Math.max(Math.abs(m[0]),Math.abs(p[0]))),r.setY(Math.max(Math.abs(m[1]),Math.abs(p[1]))),r.setZ(Math.max(Math.abs(m[2]),Math.abs(p[2]))),f.normalized){const g=de(Q[f.componentType]);r.multiplyScalar(g)}a.max(r)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}s.expandByVector(a)}u.boundingBox=s;const n=new c.Sphere;s.getCenter(n.center),n.radius=s.min.distanceTo(s.max)/2,u.boundingSphere=n}function Le(u,e,t){const o=e.attributes,s=[];function i(n,a){return t.getDependency("accessor",n).then(function(r){u.setAttribute(a,r)})}for(const n in o){const a=ue[n]||n.toLowerCase();a in u.attributes||s.push(i(o[n],a))}if(e.indices!==void 0&&!u.index){const n=t.getDependency("accessor",e.indices).then(function(a){u.setIndex(a)});s.push(n)}return c.ColorManagement.workingColorSpace!==c.LinearSRGBColorSpace&&"COLOR_0"in o&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${c.ColorManagement.workingColorSpace}" not supported.`),z(u,e),Nt(u,e,t),Promise.all(s).then(function(){return e.targets!==void 0?Ct(u,e.targets,t):u})}const le=new WeakMap;class kt extends c.Loader{constructor(e){super(e),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}}setDecoderPath(e){return this.decoderPath=e,this}setDecoderConfig(e){return this.decoderConfig=e,this}setWorkerLimit(e){return this.workerLimit=e,this}load(e,t,o,s){const i=new c.FileLoader(this.manager);i.setPath(this.path),i.setResponseType("arraybuffer"),i.setRequestHeader(this.requestHeader),i.setWithCredentials(this.withCredentials),i.load(e,n=>{this.parse(n,t,s)},o,s)}parse(e,t,o=()=>{}){this.decodeDracoFile(e,t,null,null,c.SRGBColorSpace,o).catch(o)}decodeDracoFile(e,t,o,s,i=c.LinearSRGBColorSpace,n=()=>{}){const a={attributeIDs:o||this.defaultAttributeIDs,attributeTypes:s||this.defaultAttributeTypes,useUniqueIDs:!!o,vertexColorSpace:i};return this.decodeGeometry(e,a).then(t).catch(n)}decodeGeometry(e,t){const o=JSON.stringify(t);if(le.has(e)){const r=le.get(e);if(r.key===o)return r.promise;if(e.byteLength===0)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let s;const i=this.workerNextTaskID++,n=e.byteLength,a=this._getWorker(i,n).then(r=>(s=r,new Promise((l,d)=>{s._callbacks[i]={resolve:l,reject:d},s.postMessage({type:"decode",id:i,taskConfig:t,buffer:e},[e])}))).then(r=>this._createGeometry(r.geometry));return a.catch(()=>!0).then(()=>{s&&i&&this._releaseTask(s,i)}),le.set(e,{key:o,promise:a}),a}_createGeometry(e){const t=new c.BufferGeometry;e.index&&t.setIndex(new c.BufferAttribute(e.index.array,1));for(let o=0;o<e.attributes.length;o++){const s=e.attributes[o],i=s.name,n=s.array,a=s.itemSize,r=new c.BufferAttribute(n,a);i==="color"&&(this._assignVertexColorSpace(r,s.vertexColorSpace),r.normalized=!(n instanceof Float32Array)),t.setAttribute(i,r)}return t}_assignVertexColorSpace(e,t){if(t!==c.SRGBColorSpace)return;const o=new c.Color;for(let s=0,i=e.count;s<i;s++)o.fromBufferAttribute(e,s),c.ColorManagement.toWorkingColorSpace(o,c.SRGBColorSpace),e.setXYZ(s,o.r,o.g,o.b)}_loadLibrary(e,t){const o=new c.FileLoader(this.manager);return o.setPath(this.decoderPath),o.setResponseType(t),o.setWithCredentials(this.withCredentials),new Promise((s,i)=>{o.load(e,s,void 0,i)})}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const e=typeof WebAssembly!="object"||this.decoderConfig.type==="js",t=[];return e?t.push(this._loadLibrary("draco_decoder.js","text")):(t.push(this._loadLibrary("draco_wasm_wrapper.js","text")),t.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(t).then(o=>{const s=o[0];e||(this.decoderConfig.wasmBinary=o[1]);const i=Ft.toString(),n=["/* draco decoder */",s,"","/* worker */",i.substring(i.indexOf("{")+1,i.lastIndexOf("}"))].join(`
2
2
  `);this.workerSourceURL=URL.createObjectURL(new Blob([n]))}),this.decoderPending}_getWorker(e,t){return this._initDecoder().then(()=>{if(this.workerPool.length<this.workerLimit){const s=new Worker(this.workerSourceURL);s._callbacks={},s._taskCosts={},s._taskLoad=0,s.postMessage({type:"init",decoderConfig:this.decoderConfig}),s.onmessage=function(i){const n=i.data;switch(n.type){case"decode":s._callbacks[n.id].resolve(n);break;case"error":s._callbacks[n.id].reject(n);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+n.type+'"')}},this.workerPool.push(s)}else this.workerPool.sort(function(s,i){return s._taskLoad>i._taskLoad?-1:1});const o=this.workerPool[this.workerPool.length-1];return o._taskCosts[e]=t,o._taskLoad+=t,o})}_releaseTask(e,t){e._taskLoad-=e._taskCosts[t],delete e._callbacks[t],delete e._taskCosts[t]}debug(){console.log("Task load: ",this.workerPool.map(e=>e._taskLoad))}dispose(){for(let e=0;e<this.workerPool.length;++e)this.workerPool[e].terminate();return this.workerPool.length=0,this.workerSourceURL!==""&&URL.revokeObjectURL(this.workerSourceURL),this}}function Ft(){let u,e;onmessage=function(n){const a=n.data;switch(a.type){case"init":u=a.decoderConfig,e=new Promise(function(d){u.onModuleLoaded=function(h){d({draco:h})},DracoDecoderModule(u)});break;case"decode":const r=a.buffer,l=a.taskConfig;e.then(d=>{const h=d.draco,f=new h.Decoder;try{const m=t(h,f,new Int8Array(r),l),p=m.attributes.map(g=>g.array.buffer);m.index&&p.push(m.index.array.buffer),self.postMessage({type:"decode",id:a.id,geometry:m},p)}catch(m){console.error(m),self.postMessage({type:"error",id:a.id,error:m.message})}finally{h.destroy(f)}});break}};function t(n,a,r,l){const d=l.attributeIDs,h=l.attributeTypes;let f,m;const p=a.GetEncodedGeometryType(r);if(p===n.TRIANGULAR_MESH)f=new n.Mesh,m=a.DecodeArrayToMesh(r,r.byteLength,f);else if(p===n.POINT_CLOUD)f=new n.PointCloud,m=a.DecodeArrayToPointCloud(r,r.byteLength,f);else throw new Error("THREE.DRACOLoader: Unexpected geometry type.");if(!m.ok()||f.ptr===0)throw new Error("THREE.DRACOLoader: Decoding failed: "+m.error_msg());const g={index:null,attributes:[]};for(const _ in d){const y=self[h[_]];let b,C;if(l.useUniqueIDs)C=d[_],b=a.GetAttributeByUniqueId(f,C);else{if(C=a.GetAttributeId(f,n[d[_]]),C===-1)continue;b=a.GetAttribute(f,C)}const x=s(n,a,f,_,y,b);_==="color"&&(x.vertexColorSpace=l.vertexColorSpace),g.attributes.push(x)}return p===n.TRIANGULAR_MESH&&(g.index=o(n,a,f)),n.destroy(f),g}function o(n,a,r){const d=r.num_faces()*3,h=d*4,f=n._malloc(h);a.GetTrianglesUInt32Array(r,h,f);const m=new Uint32Array(n.HEAPF32.buffer,f,d).slice();return n._free(f),{array:m,itemSize:1}}function s(n,a,r,l,d,h){const f=h.num_components(),p=r.num_points()*f,g=p*d.BYTES_PER_ELEMENT,_=i(n,d),y=n._malloc(g);a.GetAttributeDataArrayForAllPoints(r,h,_,g,y);const b=new d(n.HEAPF32.buffer,y,p).slice();return n._free(y),{name:l,array:b,itemSize:f}}function i(n,a){switch(a){case Float32Array:return n.DT_FLOAT32;case Int8Array:return n.DT_INT8;case Int16Array:return n.DT_INT16;case Int32Array:return n.DT_INT32;case Uint8Array:return n.DT_UINT8;case Uint16Array:return n.DT_UINT16;case Uint32Array:return n.DT_UINT32}}}const Ce={type:"change"},fe={type:"start"},Fe={type:"end"},se=new c.Ray,De=new c.Plane,Ut=Math.cos(70*c.MathUtils.DEG2RAD),I=new c.Vector3,H=2*Math.PI,D={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},he=1e-6;class jt extends c.Controls{constructor(e,t=null){super(e,t),this.state=D.NONE,this.enabled=!0,this.target=new c.Vector3,this.cursor=new c.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:c.MOUSE.ROTATE,MIDDLE:c.MOUSE.DOLLY,RIGHT:c.MOUSE.PAN},this.touches={ONE:c.TOUCH.ROTATE,TWO:c.TOUCH.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this._lastPosition=new c.Vector3,this._lastQuaternion=new c.Quaternion,this._lastTargetPosition=new c.Vector3,this._quat=new c.Quaternion().setFromUnitVectors(e.up,new c.Vector3(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new c.Spherical,this._sphericalDelta=new c.Spherical,this._scale=1,this._panOffset=new c.Vector3,this._rotateStart=new c.Vector2,this._rotateEnd=new c.Vector2,this._rotateDelta=new c.Vector2,this._panStart=new c.Vector2,this._panEnd=new c.Vector2,this._panDelta=new c.Vector2,this._dollyStart=new c.Vector2,this._dollyEnd=new c.Vector2,this._dollyDelta=new c.Vector2,this._dollyDirection=new c.Vector3,this._mouse=new c.Vector2,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=Bt.bind(this),this._onPointerDown=Ht.bind(this),this._onPointerUp=Gt.bind(this),this._onContextMenu=qt.bind(this),this._onMouseWheel=zt.bind(this),this._onKeyDown=Xt.bind(this),this._onTouchStart=Yt.bind(this),this._onTouchMove=Wt.bind(this),this._onMouseDown=Vt.bind(this),this._onMouseMove=Kt.bind(this),this._interceptControlDown=Zt.bind(this),this._interceptControlUp=Qt.bind(this),this.domElement!==null&&this.connect(),this.update()}connect(){this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointercancel",this._onPointerUp),this.domElement.addEventListener("contextmenu",this._onContextMenu),this.domElement.addEventListener("wheel",this._onMouseWheel,{passive:!1}),this.domElement.getRootNode().addEventListener("keydown",this._interceptControlDown,{passive:!0,capture:!0}),this.domElement.style.touchAction="none"}disconnect(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.domElement.removeEventListener("pointercancel",this._onPointerUp),this.domElement.removeEventListener("wheel",this._onMouseWheel),this.domElement.removeEventListener("contextmenu",this._onContextMenu),this.stopListenToKeyEvents(),this.domElement.getRootNode().removeEventListener("keydown",this._interceptControlDown,{capture:!0}),this.domElement.style.touchAction="auto"}dispose(){this.disconnect()}getPolarAngle(){return this._spherical.phi}getAzimuthalAngle(){return this._spherical.theta}getDistance(){return this.object.position.distanceTo(this.target)}listenToKeyEvents(e){e.addEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=e}stopListenToKeyEvents(){this._domElementKeyEvents!==null&&(this._domElementKeyEvents.removeEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=null)}saveState(){this.target0.copy(this.target),this.position0.copy(this.object.position),this.zoom0=this.object.zoom}reset(){this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(Ce),this.update(),this.state=D.NONE}update(e=null){const t=this.object.position;I.copy(t).sub(this.target),I.applyQuaternion(this._quat),this._spherical.setFromVector3(I),this.autoRotate&&this.state===D.NONE&&this._rotateLeft(this._getAutoRotationAngle(e)),this.enableDamping?(this._spherical.theta+=this._sphericalDelta.theta*this.dampingFactor,this._spherical.phi+=this._sphericalDelta.phi*this.dampingFactor):(this._spherical.theta+=this._sphericalDelta.theta,this._spherical.phi+=this._sphericalDelta.phi);let o=this.minAzimuthAngle,s=this.maxAzimuthAngle;isFinite(o)&&isFinite(s)&&(o<-Math.PI?o+=H:o>Math.PI&&(o-=H),s<-Math.PI?s+=H:s>Math.PI&&(s-=H),o<=s?this._spherical.theta=Math.max(o,Math.min(s,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(o+s)/2?Math.max(o,this._spherical.theta):Math.min(s,this._spherical.theta)),this._spherical.phi=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this._spherical.phi)),this._spherical.makeSafe(),this.enableDamping===!0?this.target.addScaledVector(this._panOffset,this.dampingFactor):this.target.add(this._panOffset),this.target.sub(this.cursor),this.target.clampLength(this.minTargetRadius,this.maxTargetRadius),this.target.add(this.cursor);let i=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{const n=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),i=n!=this._spherical.radius}if(I.setFromSpherical(this._spherical),I.applyQuaternion(this._quatInverse),t.copy(this.target).add(I),this.object.lookAt(this.target),this.enableDamping===!0?(this._sphericalDelta.theta*=1-this.dampingFactor,this._sphericalDelta.phi*=1-this.dampingFactor,this._panOffset.multiplyScalar(1-this.dampingFactor)):(this._sphericalDelta.set(0,0,0),this._panOffset.set(0,0,0)),this.zoomToCursor&&this._performCursorZoom){let n=null;if(this.object.isPerspectiveCamera){const a=I.length();n=this._clampDistance(a*this._scale);const r=a-n;this.object.position.addScaledVector(this._dollyDirection,r),this.object.updateMatrixWorld(),i=!!r}else if(this.object.isOrthographicCamera){const a=new c.Vector3(this._mouse.x,this._mouse.y,0);a.unproject(this.object);const r=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),i=r!==this.object.zoom;const l=new c.Vector3(this._mouse.x,this._mouse.y,0);l.unproject(this.object),this.object.position.sub(l).add(a),this.object.updateMatrixWorld(),n=I.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;n!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(n).add(this.object.position):(se.origin.copy(this.object.position),se.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(se.direction))<Ut?this.object.lookAt(this.target):(De.setFromNormalAndCoplanarPoint(this.object.up,this.target),se.intersectPlane(De,this.target))))}else if(this.object.isOrthographicCamera){const n=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),n!==this.object.zoom&&(this.object.updateProjectionMatrix(),i=!0)}return this._scale=1,this._performCursorZoom=!1,i||this._lastPosition.distanceToSquared(this.object.position)>he||8*(1-this._lastQuaternion.dot(this.object.quaternion))>he||this._lastTargetPosition.distanceToSquared(this.target)>he?(this.dispatchEvent(Ce),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(e){return e!==null?H/60*this.autoRotateSpeed*e:H/60/60*this.autoRotateSpeed}_getZoomScale(e){const t=Math.abs(e*.01);return Math.pow(.95,this.zoomSpeed*t)}_rotateLeft(e){this._sphericalDelta.theta-=e}_rotateUp(e){this._sphericalDelta.phi-=e}_panLeft(e,t){I.setFromMatrixColumn(t,0),I.multiplyScalar(-e),this._panOffset.add(I)}_panUp(e,t){this.screenSpacePanning===!0?I.setFromMatrixColumn(t,1):(I.setFromMatrixColumn(t,0),I.crossVectors(this.object.up,I)),I.multiplyScalar(e),this._panOffset.add(I)}_pan(e,t){const o=this.domElement;if(this.object.isPerspectiveCamera){const s=this.object.position;I.copy(s).sub(this.target);let i=I.length();i*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*e*i/o.clientHeight,this.object.matrix),this._panUp(2*t*i/o.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(e*(this.object.right-this.object.left)/this.object.zoom/o.clientWidth,this.object.matrix),this._panUp(t*(this.object.top-this.object.bottom)/this.object.zoom/o.clientHeight,this.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)}_dollyOut(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_dollyIn(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_updateZoomParameters(e,t){if(!this.zoomToCursor)return;this._performCursorZoom=!0;const o=this.domElement.getBoundingClientRect(),s=e-o.left,i=t-o.top,n=o.width,a=o.height;this._mouse.x=s/n*2-1,this._mouse.y=-(i/a)*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(e){return Math.max(this.minDistance,Math.min(this.maxDistance,e))}_handleMouseDownRotate(e){this._rotateStart.set(e.clientX,e.clientY)}_handleMouseDownDolly(e){this._updateZoomParameters(e.clientX,e.clientX),this._dollyStart.set(e.clientX,e.clientY)}_handleMouseDownPan(e){this._panStart.set(e.clientX,e.clientY)}_handleMouseMoveRotate(e){this._rotateEnd.set(e.clientX,e.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const t=this.domElement;this._rotateLeft(H*this._rotateDelta.x/t.clientHeight),this._rotateUp(H*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(e){this._dollyEnd.set(e.clientX,e.clientY),this._dollyDelta.subVectors(this._dollyEnd,this._dollyStart),this._dollyDelta.y>0?this._dollyOut(this._getZoomScale(this._dollyDelta.y)):this._dollyDelta.y<0&&this._dollyIn(this._getZoomScale(this._dollyDelta.y)),this._dollyStart.copy(this._dollyEnd),this.update()}_handleMouseMovePan(e){this._panEnd.set(e.clientX,e.clientY),this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd),this.update()}_handleMouseWheel(e){this._updateZoomParameters(e.clientX,e.clientY),e.deltaY<0?this._dollyIn(this._getZoomScale(e.deltaY)):e.deltaY>0&&this._dollyOut(this._getZoomScale(e.deltaY)),this.update()}_handleKeyDown(e){let t=!1;switch(e.code){case this.keys.UP:e.ctrlKey||e.metaKey||e.shiftKey?this._rotateUp(H*this.rotateSpeed/this.domElement.clientHeight):this._pan(0,this.keyPanSpeed),t=!0;break;case this.keys.BOTTOM:e.ctrlKey||e.metaKey||e.shiftKey?this._rotateUp(-H*this.rotateSpeed/this.domElement.clientHeight):this._pan(0,-this.keyPanSpeed),t=!0;break;case this.keys.LEFT:e.ctrlKey||e.metaKey||e.shiftKey?this._rotateLeft(H*this.rotateSpeed/this.domElement.clientHeight):this._pan(this.keyPanSpeed,0),t=!0;break;case this.keys.RIGHT:e.ctrlKey||e.metaKey||e.shiftKey?this._rotateLeft(-H*this.rotateSpeed/this.domElement.clientHeight):this._pan(-this.keyPanSpeed,0),t=!0;break}t&&(e.preventDefault(),this.update())}_handleTouchStartRotate(e){if(this._pointers.length===1)this._rotateStart.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e),o=.5*(e.pageX+t.x),s=.5*(e.pageY+t.y);this._rotateStart.set(o,s)}}_handleTouchStartPan(e){if(this._pointers.length===1)this._panStart.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e),o=.5*(e.pageX+t.x),s=.5*(e.pageY+t.y);this._panStart.set(o,s)}}_handleTouchStartDolly(e){const t=this._getSecondPointerPosition(e),o=e.pageX-t.x,s=e.pageY-t.y,i=Math.sqrt(o*o+s*s);this._dollyStart.set(0,i)}_handleTouchStartDollyPan(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enablePan&&this._handleTouchStartPan(e)}_handleTouchStartDollyRotate(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enableRotate&&this._handleTouchStartRotate(e)}_handleTouchMoveRotate(e){if(this._pointers.length==1)this._rotateEnd.set(e.pageX,e.pageY);else{const o=this._getSecondPointerPosition(e),s=.5*(e.pageX+o.x),i=.5*(e.pageY+o.y);this._rotateEnd.set(s,i)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const t=this.domElement;this._rotateLeft(H*this._rotateDelta.x/t.clientHeight),this._rotateUp(H*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(e){if(this._pointers.length===1)this._panEnd.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e),o=.5*(e.pageX+t.x),s=.5*(e.pageY+t.y);this._panEnd.set(o,s)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(e){const t=this._getSecondPointerPosition(e),o=e.pageX-t.x,s=e.pageY-t.y,i=Math.sqrt(o*o+s*s);this._dollyEnd.set(0,i),this._dollyDelta.set(0,Math.pow(this._dollyEnd.y/this._dollyStart.y,this.zoomSpeed)),this._dollyOut(this._dollyDelta.y),this._dollyStart.copy(this._dollyEnd);const n=(e.pageX+t.x)*.5,a=(e.pageY+t.y)*.5;this._updateZoomParameters(n,a)}_handleTouchMoveDollyPan(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enablePan&&this._handleTouchMovePan(e)}_handleTouchMoveDollyRotate(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enableRotate&&this._handleTouchMoveRotate(e)}_addPointer(e){this._pointers.push(e.pointerId)}_removePointer(e){delete this._pointerPositions[e.pointerId];for(let t=0;t<this._pointers.length;t++)if(this._pointers[t]==e.pointerId){this._pointers.splice(t,1);return}}_isTrackingPointer(e){for(let t=0;t<this._pointers.length;t++)if(this._pointers[t]==e.pointerId)return!0;return!1}_trackPointer(e){let t=this._pointerPositions[e.pointerId];t===void 0&&(t=new c.Vector2,this._pointerPositions[e.pointerId]=t),t.set(e.pageX,e.pageY)}_getSecondPointerPosition(e){const t=e.pointerId===this._pointers[0]?this._pointers[1]:this._pointers[0];return this._pointerPositions[t]}_customWheelEvent(e){const t=e.deltaMode,o={clientX:e.clientX,clientY:e.clientY,deltaY:e.deltaY};switch(t){case 1:o.deltaY*=16;break;case 2:o.deltaY*=100;break}return e.ctrlKey&&!this._controlActive&&(o.deltaY*=10),o}}function Ht(u){this.enabled!==!1&&(this._pointers.length===0&&(this.domElement.setPointerCapture(u.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.domElement.addEventListener("pointerup",this._onPointerUp)),!this._isTrackingPointer(u)&&(this._addPointer(u),u.pointerType==="touch"?this._onTouchStart(u):this._onMouseDown(u)))}function Bt(u){this.enabled!==!1&&(u.pointerType==="touch"?this._onTouchMove(u):this._onMouseMove(u))}function Gt(u){switch(this._removePointer(u),this._pointers.length){case 0:this.domElement.releasePointerCapture(u.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.dispatchEvent(Fe),this.state=D.NONE;break;case 1:const e=this._pointers[0],t=this._pointerPositions[e];this._onTouchStart({pointerId:e,pageX:t.x,pageY:t.y});break}}function Vt(u){let e;switch(u.button){case 0:e=this.mouseButtons.LEFT;break;case 1:e=this.mouseButtons.MIDDLE;break;case 2:e=this.mouseButtons.RIGHT;break;default:e=-1}switch(e){case c.MOUSE.DOLLY:if(this.enableZoom===!1)return;this._handleMouseDownDolly(u),this.state=D.DOLLY;break;case c.MOUSE.ROTATE:if(u.ctrlKey||u.metaKey||u.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(u),this.state=D.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(u),this.state=D.ROTATE}break;case c.MOUSE.PAN:if(u.ctrlKey||u.metaKey||u.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(u),this.state=D.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(u),this.state=D.PAN}break;default:this.state=D.NONE}this.state!==D.NONE&&this.dispatchEvent(fe)}function Kt(u){switch(this.state){case D.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(u);break;case D.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(u);break;case D.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(u);break}}function zt(u){this.enabled===!1||this.enableZoom===!1||this.state!==D.NONE||(u.preventDefault(),this.dispatchEvent(fe),this._handleMouseWheel(this._customWheelEvent(u)),this.dispatchEvent(Fe))}function Xt(u){this.enabled===!1||this.enablePan===!1||this._handleKeyDown(u)}function Yt(u){switch(this._trackPointer(u),this._pointers.length){case 1:switch(this.touches.ONE){case c.TOUCH.ROTATE:if(this.enableRotate===!1)return;this._handleTouchStartRotate(u),this.state=D.TOUCH_ROTATE;break;case c.TOUCH.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(u),this.state=D.TOUCH_PAN;break;default:this.state=D.NONE}break;case 2:switch(this.touches.TWO){case c.TOUCH.DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchStartDollyPan(u),this.state=D.TOUCH_DOLLY_PAN;break;case c.TOUCH.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(u),this.state=D.TOUCH_DOLLY_ROTATE;break;default:this.state=D.NONE}break;default:this.state=D.NONE}this.state!==D.NONE&&this.dispatchEvent(fe)}function Wt(u){switch(this._trackPointer(u),this.state){case D.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(u),this.update();break;case D.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(u),this.update();break;case D.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(u),this.update();break;case D.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(u),this.update();break;default:this.state=D.NONE}}function qt(u){this.enabled!==!1&&u.preventDefault()}function Zt(u){u.key==="Control"&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function Qt(u){u.key==="Control"&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}class $t extends c.Object3D{constructor(e=document.createElement("div")){super(),this.isCSS2DObject=!0,this.element=e,this.element.style.position="absolute",this.element.style.userSelect="none",this.element.setAttribute("draggable",!1),this.center=new c.Vector2(.5,.5),this.addEventListener("removed",function(){this.traverse(function(t){t.element instanceof t.element.ownerDocument.defaultView.Element&&t.element.parentNode!==null&&t.element.remove()})})}copy(e,t){return super.copy(e,t),this.element=e.element.cloneNode(!0),this.center=e.center,this}}const Z=new c.Vector3,Pe=new c.Matrix4,Oe=new c.Matrix4,ve=new c.Vector3,Ie=new c.Vector3;class Jt{constructor(e={}){const t=this;let o,s,i,n;const a={objects:new WeakMap},r=e.element!==void 0?e.element:document.createElement("div");r.style.overflow="hidden",this.domElement=r,this.getSize=function(){return{width:o,height:s}},this.render=function(p,g){p.matrixWorldAutoUpdate===!0&&p.updateMatrixWorld(),g.parent===null&&g.matrixWorldAutoUpdate===!0&&g.updateMatrixWorld(),Pe.copy(g.matrixWorldInverse),Oe.multiplyMatrices(g.projectionMatrix,Pe),d(p,p,g),m(p)},this.setSize=function(p,g){o=p,s=g,i=o/2,n=s/2,r.style.width=p+"px",r.style.height=g+"px"};function l(p){p.isCSS2DObject&&(p.element.style.display="none");for(let g=0,_=p.children.length;g<_;g++)l(p.children[g])}function d(p,g,_){if(p.visible===!1){l(p);return}if(p.isCSS2DObject){Z.setFromMatrixPosition(p.matrixWorld),Z.applyMatrix4(Oe);const y=Z.z>=-1&&Z.z<=1&&p.layers.test(_.layers)===!0,b=p.element;b.style.display=y===!0?"":"none",y===!0&&(p.onBeforeRender(t,g,_),b.style.transform="translate("+-100*p.center.x+"%,"+-100*p.center.y+"%)translate("+(Z.x*i+i)+"px,"+(-Z.y*n+n)+"px)",b.parentNode!==r&&r.appendChild(b),p.onAfterRender(t,g,_));const C={distanceToCameraSquared:h(_,p)};a.objects.set(p,C)}for(let y=0,b=p.children.length;y<b;y++)d(p.children[y],g,_)}function h(p,g){return ve.setFromMatrixPosition(p.matrixWorld),Ie.setFromMatrixPosition(g.matrixWorld),ve.distanceToSquared(Ie)}function f(p){const g=[];return p.traverseVisible(function(_){_.isCSS2DObject&&g.push(_)}),g}function m(p){const g=f(p).sort(function(y,b){if(y.renderOrder!==b.renderOrder)return b.renderOrder-y.renderOrder;const C=a.objects.get(y).distanceToCameraSquared,x=a.objects.get(b).distanceToCameraSquared;return C-x}),_=g.length;for(let y=0,b=g.length;y<b;y++)g[y].element.style.zIndex=_-y}}}const es={key:0,class:"loading-overlay"},ts={key:1,class:"error-overlay"},ss={class:"error-text"},ns={class:"component-modal-wrapper"},is={DEFAULT_ICON:Se.DEFAULT_ICON,ACTIVE_ICON:Se.ACTIVE_ICON,NAME_CN:"三维模型",NAME_EN:"3D Model",ORDER:6},os={bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor",hideAlpha:!0},modelUrl:{value:"",type:"string",label:"component.glbModel.modelUrl"},modelScale:{value:1,type:"number",label:"component.glbModel.modelScale",min:.1,max:10,step:.1},autoRotate:{value:!0,type:"checkbox",label:"component.glbModel.autoRotate"},rotateSpeed:{value:1,type:"number",label:"component.glbModel.rotateSpeed",min:.1,max:5,step:.1},lightIntensity:{value:1,type:"number",label:"component.glbModel.lightIntensity",min:0,max:5,step:.1},cameraDistance:{value:5,type:"number",label:"component.glbModel.cameraDistance",min:1,max:20,step:.5}},rs=[],as=["name","fv","object_id","icon","chartType","targetComponentId","posX","posY","posZ"],cs=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],ls={useAlias:!1,multiObject:!1,source:"mosaic"},hs={DEFAULT:is,OPTIONS:os,DATA:rs,PARAMS:as,SOURCE:cs,COMMON:ls},us=E.defineComponent(be(ye({},hs),{__name:"glbModel",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(u,{expose:e}){E.useCssVars(T=>({v02fb219c:E.unref(i).bgColor}));const t=u;class o extends Je.BaseComponent{extractStyles(){var R,S,L,P,O,N,F,U,X,K,q,ie;const{options:A}=this.props.conf;return{bgColor:((R=A==null?void 0:A.bgColor)==null?void 0:R.value)||"#ffffff",modelUrl:((S=A==null?void 0:A.modelUrl)==null?void 0:S.value)||"",modelScale:(P=(L=A==null?void 0:A.modelScale)==null?void 0:L.value)!=null?P:1,autoRotate:(N=(O=A==null?void 0:A.autoRotate)==null?void 0:O.value)!=null?N:!0,rotateSpeed:(U=(F=A==null?void 0:A.rotateSpeed)==null?void 0:F.value)!=null?U:1,lightIntensity:(K=(X=A==null?void 0:A.lightIntensity)==null?void 0:X.value)!=null?K:1,cameraDistance:(ie=(q=A==null?void 0:A.cameraDistance)==null?void 0:q.value)!=null?ie:5}}}const s=new o(t,"glbModel");s.setupLifecycle();const i=s.getStyle(),n=E.ref(),a=E.ref(),r=E.ref(!1),l=E.ref(""),d=E.ref(i.value.autoRotate);let h,f,m,p,g,_,y=0,b,C;const x=E.ref([]),v=new Map,B=E.ref(!1),k=E.ref();let w=null;const V=()=>{if(w){const T=w._originalParent;T&&(T.appendChild(w),delete w._originalParent),w.style.visibility="hidden",w.style.position="absolute",w.style.zIndex="-1",w=null}B.value=!1,k.value&&(k.value.innerHTML="")},$=()=>{var P;if(!a.value||!n.value)return;y&&(cancelAnimationFrame(y),y=0);const T=n.value.clientWidth,A=n.value.clientHeight;h=new c.Scene,h.background=new c.Color(i.value.bgColor),f=new c.PerspectiveCamera(45,T/A,.1,1e3),f.position.set(0,0,i.value.cameraDistance),m=new c.WebGLRenderer({canvas:a.value,antialias:!0,alpha:!0,powerPreference:"high-performance"}),m.setSize(T,A),m.setPixelRatio(Math.min(window.devicePixelRatio,2)),m.shadowMap.enabled=!1;const R=new c.AmbientLight(16777215,i.value.lightIntensity*.5);h.add(R);const S=new c.DirectionalLight(16777215,i.value.lightIntensity);S.position.set(5,5,5),h.add(S);const L=new c.DirectionalLight(16777215,i.value.lightIntensity*.3);L.position.set(-5,-5,-5),h.add(L),g=new jt(f,m.domElement),g.enableDamping=!0,g.dampingFactor=.05,g.autoRotate=d.value,g.autoRotateSpeed=i.value.rotateSpeed,g.enableZoom=!0,g.enablePan=!1,g.enableRotate=!0,g.minDistance=.5,g.maxDistance=50,g.zoomSpeed=1,g.target.set(0,0,0),p=new Jt,p.setSize(T,A),p.domElement.style.position="absolute",p.domElement.style.top="0",p.domElement.style.left="0",p.domElement.style.pointerEvents="none",n.value.appendChild(p.domElement),b=new c.Raycaster,C=new c.Vector2,t.mode==="edit"&&((P=a.value)==null||P.addEventListener("dblclick",me)),pe()},Ue=T=>Ee(null,null,function*(){if(!T){l.value="请设置模型URL";return}r.value=!0,l.value="";const A=new tt,R=new kt;R.setDecoderPath("https://www.gstatic.com/draco/versioned/decoders/1.5.6/"),R.setDecoderConfig({type:"js"}),A.setDRACOLoader(R);try{const S=yield A.loadAsync(T);_&&(h.remove(_),_.traverse(j=>{j.geometry&&j.geometry.dispose(),j.material&&(Array.isArray(j.material)?j.material.forEach(te=>te.dispose()):j.material.dispose())})),_=S.scene;let L=0,P=0;_.traverse(j=>{if(j.isMesh&&j.material){L++;const te=_e=>{const Xe=_e.color||new c.Color(13421772),Ye=_e.map,oe=new c.MeshStandardMaterial({color:Xe,map:Ye,metalness:.2,roughness:.8});return delete oe.onBuild,delete oe.onBeforeCompile,P++,oe};Array.isArray(j.material)?j.material=j.material.map(te):j.material=te(j.material)}});const O=new c.Box3().setFromObject(_),N=O.getSize(new c.Vector3),F=O.getCenter(new c.Vector3),U=Math.max(N.x,N.y,N.z),K=U>0?1/U:1;_.scale.setScalar(K*i.value.modelScale),_.position.x=-F.x*K*i.value.modelScale,_.position.y=-F.y*K*i.value.modelScale,_.position.z=-F.z*K*i.value.modelScale,h.add(_);const q=O.getSize(new c.Vector3),ze=Math.max(q.x,q.y,q.z)*K*2.5;f.position.set(0,0,Math.max(ze,i.value.cameraDistance)),g.update(),r.value=!1,Ke()}catch(S){l.value=`加载模型失败: ${S.message||"未知错误"}`,r.value=!1}}),pe=()=>{if(!(!h||!f||!m||!g)){y=requestAnimationFrame(pe);try{g.update(),m.render(h,f),p&&p.render(h,f)}catch(T){l.value=`渲染错误: ${T.message||"未知错误"}`,y&&(cancelAnimationFrame(y),y=0)}}},me=T=>{var S,L;if(!_||!n.value)return;const A=n.value.getBoundingClientRect();C.x=(T.clientX-A.left)/A.width*2-1,C.y=-((T.clientY-A.top)/A.height)*2+1,b.setFromCamera(C,f);const R=b.intersectObject(_,!0);if(R.length>0){const P=R[0].point,O=_.worldToLocal(P.clone()),N=((L=(S=t.conf)==null?void 0:S.data)==null?void 0:L.length)||0,F={name:`标记 ${N+1}`,fv:"",object_id:"",icon:"🛜",posX:O.x,posY:O.y,posZ:O.z};t.conf&&Array.isArray(t.conf.data)&&t.conf.data.push(F);const U={id:`marker_${N}`,position:{x:O.x,y:O.y,z:O.z},label:F.name,objectId:"",fv:"",value:""};x.value.push(U),ge(U)}},ge=(T,A="📍")=>{const R=document.createElement("div");R.className="model-marker",R.dataset.markerId=T.id,R.innerHTML=`
3
3
  <div class="marker-icon">${A}</div>
4
4
  ${T.value?`<div class="marker-value">${T.value}</div>`:""}
@@ -28,8 +28,8 @@ var qe = (h, e, t) => new Promise((o, s) => {
28
28
  });
29
29
  import { defineComponent as Bt, useCssVars as Gt, unref as Kt, ref as Q, watch as ee, onMounted as zt, onBeforeUnmount as Xt, openBlock as he, createElementBlock as ge, createElementVNode as W, createCommentVNode as Re, toDisplayString as Vt, createBlock as Yt, Teleport as Wt, withModifiers as Ze, renderSlot as qt, nextTick as Zt } from "vue";
30
30
  import "html2canvas";
31
- import { B as Qt } from "./element-resize-detector-DJcsrJ8s.js";
32
- import { _ as $t } from "./index-kShjySl9.js";
31
+ import { B as Qt } from "./element-resize-detector-DeMhGbNi.js";
32
+ import { _ as $t } from "./index-zPaMBZk-.js";
33
33
  import { T as Jt, k as ve, l as pt, m as mt, n as fe, F as Te, o as Y, p as F, C as K, q as V, r as J, s as es, t as ts, u as Ae, v as ae, V as C, I as ss, Q as ye, w as ns, x as Ue, y as is, z as os, a as pe, A as rs, H as gt, N as as, J as cs, K as ls, R as Ie, U as _t, X as Oe, Y as hs, Z as us, P as ds, _ as we, L as fs, $ as je, D as ps, M as de, a0 as ms, B as At, a1 as gs, g as _s, a2 as As, b as Ts, c as ys, e as bs, G as Se, a3 as Tt, a4 as yt, O as Es, a5 as xs, a6 as Rs, a7 as ws, a8 as Ss, a9 as bt, aa as Ms, ab as Qe, ac as $e, ad as Je, ae as et, af as Ne, ag as Ls, ah as Ds, h as Et, ai as Ps, aj as Cs, ak as oe, al as ie, am as tt, an as vs, ao as Is, S as Os, W as Ns, ap as st, aq as ks } from "./three.module-DcOQNgKS.js";
34
34
  import { A as Fs, D as Us } from "./ele-glbModel-icon-l_SMi3ik.js";
35
35
  function nt(h, e) {
@@ -18,8 +18,8 @@ import "element-plus/es/components/select/style/css";
18
18
  import "element-plus/es/components/option/style/css";
19
19
  import { defineComponent as ye, computed as m, reactive as he, onMounted as ge, onUnmounted as Ce, openBlock as r, createElementBlock as c, normalizeStyle as v, createElementVNode as p, unref as f, createVNode as w, withCtx as k, Fragment as S, renderList as R, createBlock as x, createCommentVNode as b, normalizeClass as _e, toDisplayString as we, createTextVNode as ke, renderSlot as Se, nextTick as Re } from "vue";
20
20
  import "html2canvas";
21
- import { B as xe } from "./element-resize-detector-DJcsrJ8s.js";
22
- import { d as h, _ as De } from "./index-kShjySl9.js";
21
+ import { B as xe } from "./element-resize-detector-DeMhGbNi.js";
22
+ import { d as h, _ as De } from "./index-zPaMBZk-.js";
23
23
  import { A as Ae, D as Ye } from "./ele-lin-icon-Dax-ZiWV.js";
24
24
  const Fe = { class: "filter-bar" }, Be = {
25
25
  key: 0,
@@ -1 +1 @@
1
- "use strict";var Z=Object.defineProperty,ee=Object.defineProperties;var te=Object.getOwnPropertyDescriptors;var L=Object.getOwnPropertySymbols;var le=Object.prototype.hasOwnProperty,ae=Object.prototype.propertyIsEnumerable;var j=(c,n,i)=>n in c?Z(c,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[n]=i,P=(c,n)=>{for(var i in n||(n={}))le.call(n,i)&&j(c,i,n[i]);if(L)for(var i of L(n))ae.call(n,i)&&j(c,i,n[i]);return c},H=(c,n)=>ee(c,te(n));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/date-picker/style/css");require("element-plus/es/components/select/style/css");require("element-plus/es/components/option/style/css");const t=require("vue");require("html2canvas");const oe=require("./element-resize-detector-Bo5uDQAu.cjs"),d=require("./index-Mh5Dw2sd.cjs"),q=require("./ele-lin-icon-Dke_1AmT.cjs"),ne={class:"filter-bar"},re={key:0,class:"filter-item"},ie={key:1,class:"filter-item"},se={key:2,class:"filter-item"},ce={key:3,class:"filter-item"},ue={class:"time-range-btns"},de=["onClick"],me={key:4,class:"filter-item date-picker-item"},pe={DEFAULT_ICON:q.DEFAULT_ICON,ACTIVE_ICON:q.ACTIVE_ICON,NAME_CN:"GNSS筛选栏",NAME_EN:"GNSS Filter Bar",ORDER:1},ve={bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},labelColor:{value:"#1c3d90",type:"color",label:"标签文字颜色"},borderColor:{value:"#e8ecef",type:"color",label:"边框颜色"},btnActiveColor:{value:"#409eff",type:"color",label:"按钮激活颜色"},padding:{value:8,type:"number",label:"component.options.padding",min:0,max:40},fontSize:{value:13,type:"number",label:"字体大小",min:10,max:20},showAreaFilter:{value:!0,type:"checkbox",label:"显示区域筛选"},showLineFilter:{value:!0,type:"checkbox",label:"显示监测线筛选"},showPointFilter:{value:!0,type:"checkbox",label:"显示监测点筛选"},showTimeRange:{value:!0,type:"checkbox",label:"显示时间范围"},showDatePicker:{value:!0,type:"checkbox",label:"显示日期选择器"},showQueryBtn:{value:!0,type:"checkbox",label:"显示查询按钮"},defaultTimeRange:{value:"1d",type:"select",label:"默认时间范围",options:[{label:"一天内",value:"1d"},{label:"一周内",value:"1w"},{label:"一个月内",value:"1m"}]},linkChannel:{value:"gnss",type:"select",label:"联动频道",options:[{label:"GNSS监测",value:"gnss"},{label:"边坡监测",value:"slope"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"自定义频道名",showWhen:{linkChannel:"custom"}}},fe=[{object_id:"",area:"北帮",line:"1号线",point:"35"},{object_id:"",area:"北帮",line:"1号线",point:"55"},{object_id:"",area:"北帮",line:"2号线",point:"110"},{object_id:"",area:"东帮",line:"3号线",point:"33"}],be=["object_id","area","line","point"],ye=["mosaic"],ke={useAlias:!1,multiObject:!0,source:"mosaic"},ge={DEFAULT:pe,OPTIONS:ve,DATA:fe,PARAMS:be,SOURCE:ye,COMMON:ke},he=t.defineComponent(H(P({},ge),{__name:"gnssFilterBar",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(c){const n=c;class i extends oe.BaseComponent{extractStyles(){var v,f,a,C,B,S,E,V,N,x,R,D,F,A,Y,z,T,M,O;const e=(v=this.props.conf)==null?void 0:v.options,s=((f=e==null?void 0:e.linkChannel)==null?void 0:f.value)||"gnss",u=((a=e==null?void 0:e.customChannel)==null?void 0:a.value)||"";return{bgColor:((C=e==null?void 0:e.bgColor)==null?void 0:C.value)||"#ffffff",textColor:((B=e==null?void 0:e.textColor)==null?void 0:B.value)||"#333333",labelColor:((S=e==null?void 0:e.labelColor)==null?void 0:S.value)||"#1c3d90",borderColor:((E=e==null?void 0:e.borderColor)==null?void 0:E.value)||"#e8ecef",btnActiveColor:((V=e==null?void 0:e.btnActiveColor)==null?void 0:V.value)||"#409eff",padding:(x=(N=e==null?void 0:e.padding)==null?void 0:N.value)!=null?x:8,fontSize:(D=(R=e==null?void 0:e.fontSize)==null?void 0:R.value)!=null?D:13,showAreaFilter:((F=e==null?void 0:e.showAreaFilter)==null?void 0:F.value)!==!1,showLineFilter:((A=e==null?void 0:e.showLineFilter)==null?void 0:A.value)!==!1,showPointFilter:((Y=e==null?void 0:e.showPointFilter)==null?void 0:Y.value)!==!1,showTimeRange:((z=e==null?void 0:e.showTimeRange)==null?void 0:z.value)!==!1,showDatePicker:((T=e==null?void 0:e.showDatePicker)==null?void 0:T.value)!==!1,showQueryBtn:((M=e==null?void 0:e.showQueryBtn)==null?void 0:M.value)!==!1,defaultTimeRange:((O=e==null?void 0:e.defaultTimeRange)==null?void 0:O.value)||"1d",linkChannel:s==="custom"&&u?u:s}}}const m=new i(n,"gnssFilterBar");m.setupLifecycle();const r=m.getStyle(),w=t.computed(()=>{var l;return((l=n.conf)==null?void 0:l.data)||[]}),y=t.computed(()=>{const l=new Set;return w.value.filter(e=>e.point&&!l.has(e.point)?(l.add(e.point),!0):!1)}),I=t.computed(()=>{const l=new Set;return y.value.forEach(e=>e.area&&l.add(e.area)),Array.from(l).map(e=>({label:e,value:e}))}),_=t.computed(()=>{const l=new Set;return y.value.filter(e=>e.area===o.area).forEach(e=>e.line&&l.add(e.line)),Array.from(l).map(e=>({label:e,value:e}))}),k=t.computed(()=>{const l=new Set;return y.value.filter(e=>e.area===o.area&&e.line===o.line).forEach(e=>e.point&&l.add(e.point)),Array.from(l).map(e=>({label:e,value:e}))}),U=[{label:"一天内",value:"1d"},{label:"一周内",value:"1w"},{label:"一个月内",value:"1m"}],g=(()=>{var e;const l=(((e=n.conf)==null?void 0:e.data)||[]).find(s=>!!s.point);return{area:(l==null?void 0:l.area)||"",line:(l==null?void 0:l.line)||"",point:(l==null?void 0:l.point)||""}})(),h=r.value.defaultTimeRange||"1d",Q=h==="1w"?d.dayjs().subtract(1,"week"):h==="1m"?d.dayjs().subtract(1,"month"):d.dayjs().subtract(1,"day"),o=t.reactive({area:g.area,line:g.line,point:g.point,timeRange:h,dateRange:[Q.format("YYYY/MM/DD HH:mm"),d.dayjs().format("YYYY/MM/DD HH:mm")]}),$=()=>{var e;const l=_.value;o.line=((e=l[0])==null?void 0:e.value)||"",t.nextTick(()=>{var u;const s=k.value;o.point=((u=s[0])==null?void 0:u.value)||""})},G=()=>{var e;const l=k.value;o.point=((e=l[0])==null?void 0:e.value)||""},W=l=>{o.timeRange=l;const e=d.dayjs(),s=l==="1d"?e.subtract(1,"day"):l==="1w"?e.subtract(1,"week"):e.subtract(1,"month");o.dateRange=[s.format("YYYY/MM/DD HH:mm"),e.format("YYYY/MM/DD HH:mm")]},J=()=>{if(n.mode==="edit")return;const l=w.value.find(e=>e.area===o.area&&e.line===o.line&&e.point===o.point);m.publish({type:"filter",area:o.area,line:o.line,point:o.point,objectId:(l==null?void 0:l.object_id)||"",timeRange:o.timeRange,dateRange:[...o.dateRange]})},K=t.computed(()=>({backgroundColor:r.value.bgColor,color:r.value.textColor,fontSize:`${r.value.fontSize}px`,borderBottom:`1px solid ${r.value.borderColor}`})),p=t.computed(()=>({color:r.value.labelColor,fontSize:`${r.value.fontSize}px`})),X=t.computed(()=>({color:"#fff",background:r.value.btnActiveColor,borderColor:r.value.btnActiveColor}));return t.onMounted(()=>{m.init()}),t.onUnmounted(()=>{m.cleanup()}),(l,e)=>{const s=b.ElOption,u=b.ElSelect,v=b.ElDatePicker,f=b.ElButton;return t.openBlock(),t.createElementBlock("div",{class:"gnss-filter-bar-wrap",style:t.normalizeStyle(K.value)},[t.createElementVNode("div",ne,[t.unref(r).showAreaFilter?(t.openBlock(),t.createElementBlock("div",re,[t.createElementVNode("span",{class:"filter-label",style:t.normalizeStyle(p.value)},"区域位置:",4),t.createVNode(u,{modelValue:o.area,"onUpdate:modelValue":e[0]||(e[0]=a=>o.area=a),size:"small",style:{width:"90px"},onChange:$},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(I.value,a=>(t.openBlock(),t.createBlock(s,{key:a.value,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):t.createCommentVNode("",!0),t.unref(r).showLineFilter?(t.openBlock(),t.createElementBlock("div",ie,[t.createElementVNode("span",{class:"filter-label",style:t.normalizeStyle(p.value)},"监测线:",4),t.createVNode(u,{modelValue:o.line,"onUpdate:modelValue":e[1]||(e[1]=a=>o.line=a),size:"small",style:{width:"90px"},onChange:G},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(_.value,a=>(t.openBlock(),t.createBlock(s,{key:a.value,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):t.createCommentVNode("",!0),t.unref(r).showPointFilter?(t.openBlock(),t.createElementBlock("div",se,[t.createElementVNode("span",{class:"filter-label",style:t.normalizeStyle(p.value)},"监测点:",4),t.createVNode(u,{modelValue:o.point,"onUpdate:modelValue":e[2]||(e[2]=a=>o.point=a),size:"small",style:{width:"80px"}},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(k.value,a=>(t.openBlock(),t.createBlock(s,{key:a.value,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):t.createCommentVNode("",!0),t.unref(r).showTimeRange?(t.openBlock(),t.createElementBlock("div",ce,[t.createElementVNode("span",{class:"filter-label",style:t.normalizeStyle(p.value)},"时间范围:",4),t.createElementVNode("div",ue,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(U,a=>t.createElementVNode("button",{key:a.value,class:t.normalizeClass(["range-btn",{active:o.timeRange===a.value}]),style:t.normalizeStyle(o.timeRange===a.value?X.value:{}),onClick:C=>W(a.value)},t.toDisplayString(a.label),15,de)),64))])])):t.createCommentVNode("",!0),t.unref(r).showDatePicker?(t.openBlock(),t.createElementBlock("div",me,[t.createVNode(v,{modelValue:o.dateRange,"onUpdate:modelValue":e[3]||(e[3]=a=>o.dateRange=a),type:"datetimerange",size:"small",format:"YYYY/MM/DD HH:mm","value-format":"YYYY/MM/DD HH:mm","range-separator":"至","start-placeholder":"开始时间","end-placeholder":"结束时间",style:{"max-width":"340px","min-width":"200px",width:"100%"}},null,8,["modelValue"])])):t.createCommentVNode("",!0),t.unref(r).showQueryBtn?(t.openBlock(),t.createBlock(f,{key:5,type:"primary",size:"small",onClick:J},{default:t.withCtx(()=>[...e[4]||(e[4]=[t.createTextVNode("查询",-1)])]),_:1})):t.createCommentVNode("",!0)]),t.renderSlot(l.$slots,"default",{},void 0,!0)],4)}}})),Ce=d._export_sfc(he,[["__scopeId","data-v-ecbbd401"]]);exports.default=Ce;
1
+ "use strict";var Z=Object.defineProperty,ee=Object.defineProperties;var te=Object.getOwnPropertyDescriptors;var L=Object.getOwnPropertySymbols;var le=Object.prototype.hasOwnProperty,ae=Object.prototype.propertyIsEnumerable;var j=(c,n,i)=>n in c?Z(c,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[n]=i,P=(c,n)=>{for(var i in n||(n={}))le.call(n,i)&&j(c,i,n[i]);if(L)for(var i of L(n))ae.call(n,i)&&j(c,i,n[i]);return c},H=(c,n)=>ee(c,te(n));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/date-picker/style/css");require("element-plus/es/components/select/style/css");require("element-plus/es/components/option/style/css");const t=require("vue");require("html2canvas");const oe=require("./element-resize-detector-BlMXyWIR.cjs"),d=require("./index-EnNA0nIi.cjs"),q=require("./ele-lin-icon-Dke_1AmT.cjs"),ne={class:"filter-bar"},re={key:0,class:"filter-item"},ie={key:1,class:"filter-item"},se={key:2,class:"filter-item"},ce={key:3,class:"filter-item"},ue={class:"time-range-btns"},de=["onClick"],me={key:4,class:"filter-item date-picker-item"},pe={DEFAULT_ICON:q.DEFAULT_ICON,ACTIVE_ICON:q.ACTIVE_ICON,NAME_CN:"GNSS筛选栏",NAME_EN:"GNSS Filter Bar",ORDER:1},ve={bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},labelColor:{value:"#1c3d90",type:"color",label:"标签文字颜色"},borderColor:{value:"#e8ecef",type:"color",label:"边框颜色"},btnActiveColor:{value:"#409eff",type:"color",label:"按钮激活颜色"},padding:{value:8,type:"number",label:"component.options.padding",min:0,max:40},fontSize:{value:13,type:"number",label:"字体大小",min:10,max:20},showAreaFilter:{value:!0,type:"checkbox",label:"显示区域筛选"},showLineFilter:{value:!0,type:"checkbox",label:"显示监测线筛选"},showPointFilter:{value:!0,type:"checkbox",label:"显示监测点筛选"},showTimeRange:{value:!0,type:"checkbox",label:"显示时间范围"},showDatePicker:{value:!0,type:"checkbox",label:"显示日期选择器"},showQueryBtn:{value:!0,type:"checkbox",label:"显示查询按钮"},defaultTimeRange:{value:"1d",type:"select",label:"默认时间范围",options:[{label:"一天内",value:"1d"},{label:"一周内",value:"1w"},{label:"一个月内",value:"1m"}]},linkChannel:{value:"gnss",type:"select",label:"联动频道",options:[{label:"GNSS监测",value:"gnss"},{label:"边坡监测",value:"slope"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"自定义频道名",showWhen:{linkChannel:"custom"}}},fe=[{object_id:"",area:"北帮",line:"1号线",point:"35"},{object_id:"",area:"北帮",line:"1号线",point:"55"},{object_id:"",area:"北帮",line:"2号线",point:"110"},{object_id:"",area:"东帮",line:"3号线",point:"33"}],be=["object_id","area","line","point"],ye=["mosaic"],ke={useAlias:!1,multiObject:!0,source:"mosaic"},ge={DEFAULT:pe,OPTIONS:ve,DATA:fe,PARAMS:be,SOURCE:ye,COMMON:ke},he=t.defineComponent(H(P({},ge),{__name:"gnssFilterBar",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(c){const n=c;class i extends oe.BaseComponent{extractStyles(){var v,f,a,C,B,S,E,V,N,x,R,D,F,A,Y,z,T,M,O;const e=(v=this.props.conf)==null?void 0:v.options,s=((f=e==null?void 0:e.linkChannel)==null?void 0:f.value)||"gnss",u=((a=e==null?void 0:e.customChannel)==null?void 0:a.value)||"";return{bgColor:((C=e==null?void 0:e.bgColor)==null?void 0:C.value)||"#ffffff",textColor:((B=e==null?void 0:e.textColor)==null?void 0:B.value)||"#333333",labelColor:((S=e==null?void 0:e.labelColor)==null?void 0:S.value)||"#1c3d90",borderColor:((E=e==null?void 0:e.borderColor)==null?void 0:E.value)||"#e8ecef",btnActiveColor:((V=e==null?void 0:e.btnActiveColor)==null?void 0:V.value)||"#409eff",padding:(x=(N=e==null?void 0:e.padding)==null?void 0:N.value)!=null?x:8,fontSize:(D=(R=e==null?void 0:e.fontSize)==null?void 0:R.value)!=null?D:13,showAreaFilter:((F=e==null?void 0:e.showAreaFilter)==null?void 0:F.value)!==!1,showLineFilter:((A=e==null?void 0:e.showLineFilter)==null?void 0:A.value)!==!1,showPointFilter:((Y=e==null?void 0:e.showPointFilter)==null?void 0:Y.value)!==!1,showTimeRange:((z=e==null?void 0:e.showTimeRange)==null?void 0:z.value)!==!1,showDatePicker:((T=e==null?void 0:e.showDatePicker)==null?void 0:T.value)!==!1,showQueryBtn:((M=e==null?void 0:e.showQueryBtn)==null?void 0:M.value)!==!1,defaultTimeRange:((O=e==null?void 0:e.defaultTimeRange)==null?void 0:O.value)||"1d",linkChannel:s==="custom"&&u?u:s}}}const m=new i(n,"gnssFilterBar");m.setupLifecycle();const r=m.getStyle(),w=t.computed(()=>{var l;return((l=n.conf)==null?void 0:l.data)||[]}),y=t.computed(()=>{const l=new Set;return w.value.filter(e=>e.point&&!l.has(e.point)?(l.add(e.point),!0):!1)}),I=t.computed(()=>{const l=new Set;return y.value.forEach(e=>e.area&&l.add(e.area)),Array.from(l).map(e=>({label:e,value:e}))}),_=t.computed(()=>{const l=new Set;return y.value.filter(e=>e.area===o.area).forEach(e=>e.line&&l.add(e.line)),Array.from(l).map(e=>({label:e,value:e}))}),k=t.computed(()=>{const l=new Set;return y.value.filter(e=>e.area===o.area&&e.line===o.line).forEach(e=>e.point&&l.add(e.point)),Array.from(l).map(e=>({label:e,value:e}))}),U=[{label:"一天内",value:"1d"},{label:"一周内",value:"1w"},{label:"一个月内",value:"1m"}],g=(()=>{var e;const l=(((e=n.conf)==null?void 0:e.data)||[]).find(s=>!!s.point);return{area:(l==null?void 0:l.area)||"",line:(l==null?void 0:l.line)||"",point:(l==null?void 0:l.point)||""}})(),h=r.value.defaultTimeRange||"1d",Q=h==="1w"?d.dayjs().subtract(1,"week"):h==="1m"?d.dayjs().subtract(1,"month"):d.dayjs().subtract(1,"day"),o=t.reactive({area:g.area,line:g.line,point:g.point,timeRange:h,dateRange:[Q.format("YYYY/MM/DD HH:mm"),d.dayjs().format("YYYY/MM/DD HH:mm")]}),$=()=>{var e;const l=_.value;o.line=((e=l[0])==null?void 0:e.value)||"",t.nextTick(()=>{var u;const s=k.value;o.point=((u=s[0])==null?void 0:u.value)||""})},G=()=>{var e;const l=k.value;o.point=((e=l[0])==null?void 0:e.value)||""},W=l=>{o.timeRange=l;const e=d.dayjs(),s=l==="1d"?e.subtract(1,"day"):l==="1w"?e.subtract(1,"week"):e.subtract(1,"month");o.dateRange=[s.format("YYYY/MM/DD HH:mm"),e.format("YYYY/MM/DD HH:mm")]},J=()=>{if(n.mode==="edit")return;const l=w.value.find(e=>e.area===o.area&&e.line===o.line&&e.point===o.point);m.publish({type:"filter",area:o.area,line:o.line,point:o.point,objectId:(l==null?void 0:l.object_id)||"",timeRange:o.timeRange,dateRange:[...o.dateRange]})},K=t.computed(()=>({backgroundColor:r.value.bgColor,color:r.value.textColor,fontSize:`${r.value.fontSize}px`,borderBottom:`1px solid ${r.value.borderColor}`})),p=t.computed(()=>({color:r.value.labelColor,fontSize:`${r.value.fontSize}px`})),X=t.computed(()=>({color:"#fff",background:r.value.btnActiveColor,borderColor:r.value.btnActiveColor}));return t.onMounted(()=>{m.init()}),t.onUnmounted(()=>{m.cleanup()}),(l,e)=>{const s=b.ElOption,u=b.ElSelect,v=b.ElDatePicker,f=b.ElButton;return t.openBlock(),t.createElementBlock("div",{class:"gnss-filter-bar-wrap",style:t.normalizeStyle(K.value)},[t.createElementVNode("div",ne,[t.unref(r).showAreaFilter?(t.openBlock(),t.createElementBlock("div",re,[t.createElementVNode("span",{class:"filter-label",style:t.normalizeStyle(p.value)},"区域位置:",4),t.createVNode(u,{modelValue:o.area,"onUpdate:modelValue":e[0]||(e[0]=a=>o.area=a),size:"small",style:{width:"90px"},onChange:$},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(I.value,a=>(t.openBlock(),t.createBlock(s,{key:a.value,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):t.createCommentVNode("",!0),t.unref(r).showLineFilter?(t.openBlock(),t.createElementBlock("div",ie,[t.createElementVNode("span",{class:"filter-label",style:t.normalizeStyle(p.value)},"监测线:",4),t.createVNode(u,{modelValue:o.line,"onUpdate:modelValue":e[1]||(e[1]=a=>o.line=a),size:"small",style:{width:"90px"},onChange:G},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(_.value,a=>(t.openBlock(),t.createBlock(s,{key:a.value,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):t.createCommentVNode("",!0),t.unref(r).showPointFilter?(t.openBlock(),t.createElementBlock("div",se,[t.createElementVNode("span",{class:"filter-label",style:t.normalizeStyle(p.value)},"监测点:",4),t.createVNode(u,{modelValue:o.point,"onUpdate:modelValue":e[2]||(e[2]=a=>o.point=a),size:"small",style:{width:"80px"}},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(k.value,a=>(t.openBlock(),t.createBlock(s,{key:a.value,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):t.createCommentVNode("",!0),t.unref(r).showTimeRange?(t.openBlock(),t.createElementBlock("div",ce,[t.createElementVNode("span",{class:"filter-label",style:t.normalizeStyle(p.value)},"时间范围:",4),t.createElementVNode("div",ue,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(U,a=>t.createElementVNode("button",{key:a.value,class:t.normalizeClass(["range-btn",{active:o.timeRange===a.value}]),style:t.normalizeStyle(o.timeRange===a.value?X.value:{}),onClick:C=>W(a.value)},t.toDisplayString(a.label),15,de)),64))])])):t.createCommentVNode("",!0),t.unref(r).showDatePicker?(t.openBlock(),t.createElementBlock("div",me,[t.createVNode(v,{modelValue:o.dateRange,"onUpdate:modelValue":e[3]||(e[3]=a=>o.dateRange=a),type:"datetimerange",size:"small",format:"YYYY/MM/DD HH:mm","value-format":"YYYY/MM/DD HH:mm","range-separator":"至","start-placeholder":"开始时间","end-placeholder":"结束时间",style:{"max-width":"340px","min-width":"200px",width:"100%"}},null,8,["modelValue"])])):t.createCommentVNode("",!0),t.unref(r).showQueryBtn?(t.openBlock(),t.createBlock(f,{key:5,type:"primary",size:"small",onClick:J},{default:t.withCtx(()=>[...e[4]||(e[4]=[t.createTextVNode("查询",-1)])]),_:1})):t.createCommentVNode("",!0)]),t.renderSlot(l.$slots,"default",{},void 0,!0)],4)}}})),Ce=d._export_sfc(he,[["__scopeId","data-v-ecbbd401"]]);exports.default=Ce;
@@ -33,9 +33,9 @@ import "element-plus/es/components/select/style/css";
33
33
  import "element-plus/es/components/option/style/css";
34
34
  import { defineComponent as Ce, ref as q, reactive as oe, computed as T, onMounted as ke, onUnmounted as we, watch as Fe, openBlock as F, createElementBlock as A, normalizeStyle as ie, createElementVNode as r, createVNode as G, withCtx as le, Fragment as K, renderList as W, normalizeClass as ce, toDisplayString as L, createCommentVNode as Ae, renderSlot as Ne } from "vue";
35
35
  import "html2canvas";
36
- import { d as b, _ as Re } from "./index-kShjySl9.js";
37
- import { E as Ee } from "./EChartComponentBase-BQOhWkz2.js";
38
- import { a as Oe } from "./api-C0GhBpqd.js";
36
+ import { d as b, _ as Re } from "./index-zPaMBZk-.js";
37
+ import { E as Ee } from "./EChartComponentBase-GBbKjtlb.js";
38
+ import { a as Oe } from "./api-DhQsrEGY.js";
39
39
  import { A as Te, D as Ge } from "./ele-lin-icon-Dax-ZiWV.js";
40
40
  const $e = { class: "table-section" }, Ie = { class: "table-section-header" }, Xe = { class: "table-toolbar" }, qe = { class: "table-scroll-wrapper" }, Le = { class: "report-table" }, Pe = { key: 0 }, Ue = ["colspan"], Ve = { class: "table-pagination" }, Be = { class: "page-info" }, ze = { class: "page-controls" }, Ke = ["disabled"], We = { class: "page-num" }, Je = ["disabled"], Qe = { DEFAULT_ICON: Ge, ACTIVE_ICON: Te, NAME_CN: "GNSS历史明细报表", NAME_EN: "GNSS History Table", ORDER: 5 }, Ze = {
41
41
  bgColor: { value: "#f5f7fa", type: "color", label: "setting.bgColor" },
@@ -1,3 +1,3 @@
1
- "use strict";var de=Object.defineProperty,ue=Object.defineProperties;var me=Object.getOwnPropertyDescriptors;var U=Object.getOwnPropertySymbols;var pe=Object.prototype.hasOwnProperty,ye=Object.prototype.propertyIsEnumerable;var m=Math.pow,z=(y,l,d)=>l in y?de(y,l,{enumerable:!0,configurable:!0,writable:!0,value:d}):y[l]=d,K=(y,l)=>{for(var d in l||(l={}))pe.call(l,d)&&z(y,d,l[d]);if(U)for(var d of U(l))ye.call(l,d)&&z(y,d,l[d]);return y},W=(y,l)=>ue(y,me(l));var J=(y,l,d)=>new Promise((g,A)=>{var _=p=>{try{h(d.next(p))}catch(F){A(F)}},w=p=>{try{h(d.throw(p))}catch(F){A(F)}},h=p=>p.done?g(p.value):Promise.resolve(p.value).then(_,w);h((d=d.apply(y,l)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/select/style/css");require("element-plus/es/components/option/style/css");const e=require("vue");require("html2canvas");const f=require("./index-Mh5Dw2sd.cjs"),_e=require("./EChartComponentBase-BaQpBzVC.cjs"),fe=require("./api-P_s372dW.cjs"),Q=require("./ele-lin-icon-Dke_1AmT.cjs"),ve={class:"table-section"},be={class:"table-section-header"},ge={class:"table-toolbar"},he={class:"table-scroll-wrapper"},Se={class:"report-table"},xe={key:0},Ye=["colspan"],je={class:"table-pagination"},De={class:"page-info"},Ne={class:"page-controls"},Ee=["disabled"],Me={class:"page-num"},ke=["disabled"],Ce={DEFAULT_ICON:Q.DEFAULT_ICON,ACTIVE_ICON:Q.ACTIVE_ICON,NAME_CN:"GNSS历史明细报表",NAME_EN:"GNSS History Table",ORDER:5},He={bgColor:{value:"#f5f7fa",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},linkChannel:{value:"gnss",type:"select",label:"联动频道",options:[{label:"GNSS监测",value:"gnss"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"自定义频道名",showWhen:{linkChannel:"custom"}}},we=[{name:"序号",fv:"_index",object_id:"",type:"index"},{name:"编号",fv:"_device",object_id:"",type:"device"},{name:"区域",fv:"_area",object_id:"",type:"area"},{name:"时间",fv:"_time",object_id:"",type:"time"},{name:"基准X",fv:"base_x",object_id:"",type:"data"},{name:"基准Y",fv:"base_y",object_id:"",type:"data"},{name:"基准H",fv:"base_h",object_id:"",type:"data"},{name:"X位移",fv:"x_disp",object_id:"",type:"data"},{name:"Y位移",fv:"y_disp",object_id:"",type:"data"},{name:"H位移",fv:"h_disp",object_id:"",type:"data"},{name:"XY位移",fv:"xy_disp",object_id:"",type:"data"},{name:"XYH位移",fv:"xyh_disp",object_id:"",type:"data"},{name:"X累积位移",fv:"x_cum_disp",object_id:"",type:"data"},{name:"Y累积位移",fv:"y_cum_disp",object_id:"",type:"data"},{name:"H累积位移",fv:"h_cum_disp",object_id:"",type:"data"},{name:"XY累积位移",fv:"xy_cum_disp",object_id:"",type:"data"},{name:"XYH累积位移",fv:"xyh_cum_disp",object_id:"",type:"data"},{name:"X速度",fv:"x_speed",object_id:"",type:"data"},{name:"Y速度",fv:"y_speed",object_id:"",type:"data"},{name:"H速度",fv:"h_speed",object_id:"",type:"data"},{name:"XY速度",fv:"xy_speed",object_id:"",type:"data"},{name:"XYH速度",fv:"xyh_speed",object_id:"",type:"data"},{name:"X加速度",fv:"x_accel",object_id:"",type:"data"},{name:"Y加速度",fv:"y_accel",object_id:"",type:"data"},{name:"H加速度",fv:"h_accel",object_id:"",type:"data"},{name:"切线角",fv:"tangent_angle",object_id:"",type:"data"}],Fe=["name","fv","object_id","type"],Ve=["mosaic","statistics","statisticsRealtime"],Ae={useAlias:!1,multiObject:!0,hideMultiObject:!1,source:"mosaic"},Re={DEFAULT:Ce,OPTIONS:He,DATA:we,PARAMS:Fe,SOURCE:Ve,COMMON:Ae},Oe=e.defineComponent(W(K({},Re),{__name:"gnssHistoryTable",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(y){const l=y;class d extends _e.EChartComponentBase{constructor(){super(...arguments),this._lastDedupeKey=""}extractStyles(){var r,n,u,s,c;const t=(r=this.props.conf)==null?void 0:r.options,o=((n=t==null?void 0:t.linkChannel)==null?void 0:n.value)||"gnss",i=((u=t==null?void 0:t.customChannel)==null?void 0:u.value)||"";return{bgColor:((s=t==null?void 0:t.bgColor)==null?void 0:s.value)||"#f5f7fa",textColor:((c=t==null?void 0:t.textColor)==null?void 0:c.value)||"#333333",linkChannel:o==="custom"&&i?i:o}}getChartOption(){return{}}onLinkEvent(t){ne(t)}onPreview(){}setSocketData(t){if(!t||!t.data)return;const{data:o}=this.props.conf;if(!o||!Array.isArray(o))return;const i=t.datetime||f.dayjs().format("YYYY/MM/DD HH:mm:ss"),r=`${i}_${JSON.stringify(t.data)}`;if(r===this._lastDedupeKey)return;this._lastDedupeKey=r;const n={};if(o.forEach(s=>{if(s.type==="data"&&s.fv){const c=this.extractDataValue(t,s.fv);c!=null&&(n[s.fv]=String(c))}}),Object.keys(n).length===0)return;const u={time:i,area:w.value||"-",device:_.value?`GNSS${_.value}`:"GNSS",metrics:n};S.rows.unshift(u),S.rows.length>1e3&&(S.rows=S.rows.slice(0,1e3))}}const g=new d(l,"gnssHistoryTable");g.setupLifecycle();const A=g.getStyle(),_=e.ref(""),w=e.ref(""),h=e.ref(""),p=e.reactive({timeRange:"1d",dateRange:[f.dayjs().subtract(1,"day").format("YYYY/MM/DD HH:mm"),f.dayjs().format("YYYY/MM/DD HH:mm")]}),F=()=>J(null,null,function*(){var n,u,s;if(j.value=1,l.mode==="edit"){I();return}if(!h.value)return;S.rows=[];const a=(n=g.session)==null?void 0:n.value,t=(u=l.conf)==null?void 0:u.id;a!=null&&a.componentRequests&&t&&a.componentRequests.delete(t);const{data:o,common:i}=l.conf;Array.isArray(o)&&o.forEach(c=>{c.object_id=h.value}),i.multiObject||(i.object_id=h.value);try{const c=f.dayjs(p.dateRange[0],"YYYY/MM/DD HH:mm").format("YYYY-MM-DD HH:mm:ss"),D=f.dayjs(p.dateRange[1],"YYYY/MM/DD HH:mm").format("YYYY-MM-DD HH:mm:ss"),k=f.dayjs(p.dateRange[1],"YYYY/MM/DD HH:mm").diff(f.dayjs(p.dateRange[0],"YYYY/MM/DD HH:mm"),"second"),x=Math.max(60,Math.floor(k/500)),V=(l.conf.data||[]).filter(b=>b.type==="data"&&b.fv),G=V.map(b=>b.fv),v=[{block_mapping:"influxdbproxy",action:"get_mosaic_list_with_time_span",start_time:c,end_time:D,time_span:x,time_swing:x,keys:G,object_id:h.value}],N=yield new Promise(b=>{fe.api.platform(Y=>{b(Y.result)},{block_mapping:"mixtools",action:"get_tools_mosaic_list",condition:v})}),E=Array.isArray(N)?((s=N[0])==null?void 0:s.data)||N[0]||[]:[];Array.isArray(E)&&E.length>0&&[...E].sort((Y,H)=>{const M=Y.time||Y.datetime||"",C=H.time||H.datetime||"";return new Date(C).getTime()-new Date(M).getTime()}).forEach(Y=>{const H=Y.time||Y.datetime;if(!H)return;const M={};V.forEach(C=>{const O=Y[C.fv];O!=null&&(M[C.fv]=String(O))}),Object.keys(M).length>0&&S.rows.push({time:f.dayjs(H).format("YYYY/MM/DD HH:mm:ss"),area:w.value||"-",device:_.value?`GNSS${_.value}`:"GNSS",metrics:M})}),console.log(`[GNSS历史明细] 历史数据加载完成,共 ${S.rows.length} 条,时间范围: ${c} ~ ${D}`)}catch(c){console.warn("[GNSS历史明细] 历史数据获取失败:",c)}const r=g.getSource();g.subscribeBySource(r,h.value)}),Z=e.computed(()=>({backgroundColor:A.value.bgColor,color:A.value.textColor})),R=e.computed(()=>{const{data:a}=l.conf;return!a||!Array.isArray(a)?[]:a.map(t=>({key:t.fv||"",label:t.name||t.fv||"-",type:t.type||"data"})).filter(t=>t.key)});e.computed(()=>R.value.filter(a=>a.type==="data"));const T=e.ref("hour"),j=e.ref(1),q=15,S=e.reactive({rows:[]}),B=e.computed(()=>{const a=T.value;if(a==="hour")return S.rows;const t=new Set,o=[];for(const i of S.rows){const r=f.dayjs(i.time,"YYYY/MM/DD HH:mm:ss");let n;if(a==="day")n=r.format("YYYY/MM/DD");else if(a==="week"){const u=r.startOf("year");n=r.year()+"-W"+Math.floor(r.diff(u,"day")/7)}else n=r.format("YYYY/MM");t.has(n)||(t.add(n),o.push(i))}return o}),$=e.computed(()=>Math.max(1,Math.ceil(B.value.length/q))),X=e.computed(()=>{const a=(j.value-1)*q;return B.value.slice(a,a+q)}),ee=()=>{j.value=1},I=()=>{const a=w.value||"-",t=_.value?`GNSS${_.value}`:"GNSS",o=parseInt(_.value)||50,i=f.dayjs(),r=100,n=+(2450+o*.1).toFixed(2),u=+(1300+o*.02).toFixed(2),s=+(1150+o*.01).toFixed(2);let c=0,D=0,k=0;const x=[];for(let V=0;V<r;V++){const G=i.subtract((r-V)*60,"minute"),v=()=>Math.random()-.5,N=+(.8+v()*.2).toFixed(2),E=+(.65+v()*.15).toFixed(2),b=+(.01+v()*.02).toFixed(2),Y=+Math.sqrt(m(N,2)+m(E,2)).toFixed(2),H=+Math.sqrt(m(N,2)+m(E,2)+m(b,2)).toFixed(2);c+=N,D+=E,k+=b;const M=+(8+v()*1.5).toFixed(2),C=+(8+v()*1.5).toFixed(2),O=+(8.5+v()*1).toFixed(2),oe=+Math.sqrt(m(M,2)+m(C,2)).toFixed(2),se=+Math.sqrt(m(M,2)+m(C,2)+m(O,2)).toFixed(2),le=+(v()*.1).toFixed(3),ce=+(v()*.08).toFixed(3),ie=+(v()*.06).toFixed(3),re=+(Math.atan2(E,N)*180/Math.PI).toFixed(1);x.push({time:G.format("YYYY/MM/DD HH:mm:ss"),area:a,device:t,metrics:{base_x:String(n),base_y:String(u),base_h:String(s),x_disp:String(N),y_disp:String(E),h_disp:String(b),xy_disp:String(Y),xyh_disp:String(H),x_cum_disp:c.toFixed(2),y_cum_disp:D.toFixed(2),h_cum_disp:k.toFixed(2),xy_cum_disp:Math.sqrt(m(c,2)+m(D,2)).toFixed(2),xyh_cum_disp:Math.sqrt(m(c,2)+m(D,2)+m(k,2)).toFixed(2),x_speed:String(M),y_speed:String(C),h_speed:String(O),xy_speed:String(oe),xyh_speed:String(se),x_accel:String(le),y_accel:String(ce),h_accel:String(ie),tangent_angle:re+"°"}})}S.rows=x},te=a=>{if(!a)return"#333";const t=parseFloat(a);return isNaN(t)?"#333":t>=20?"#ee4444":t>=10?"#e6a23c":"#333"},P=(a,t,o)=>{var i;switch(t.type){case"index":return String((j.value-1)*q+o+1);case"device":return a.device;case"area":return a.area;case"time":return a.time;default:return(i=a.metrics[t.key])!=null?i:"-"}},ae=()=>{const a=R.value,t=B.value;if(!t.length)return;const o=a.map(c=>c.label).join(","),i=t.map((c,D)=>a.map(k=>{const x=P(c,k,D);return k.type==="time"||x.includes(",")||x.includes('"')?`"${x.replace(/"/g,'""')}"`:x}).join(",")).join(`
1
+ "use strict";var de=Object.defineProperty,ue=Object.defineProperties;var me=Object.getOwnPropertyDescriptors;var U=Object.getOwnPropertySymbols;var pe=Object.prototype.hasOwnProperty,ye=Object.prototype.propertyIsEnumerable;var m=Math.pow,z=(y,l,d)=>l in y?de(y,l,{enumerable:!0,configurable:!0,writable:!0,value:d}):y[l]=d,K=(y,l)=>{for(var d in l||(l={}))pe.call(l,d)&&z(y,d,l[d]);if(U)for(var d of U(l))ye.call(l,d)&&z(y,d,l[d]);return y},W=(y,l)=>ue(y,me(l));var J=(y,l,d)=>new Promise((g,A)=>{var _=p=>{try{h(d.next(p))}catch(F){A(F)}},w=p=>{try{h(d.throw(p))}catch(F){A(F)}},h=p=>p.done?g(p.value):Promise.resolve(p.value).then(_,w);h((d=d.apply(y,l)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/select/style/css");require("element-plus/es/components/option/style/css");const e=require("vue");require("html2canvas");const f=require("./index-EnNA0nIi.cjs"),_e=require("./EChartComponentBase-BTqBoBn8.cjs"),fe=require("./api-C0okiLNC.cjs"),Q=require("./ele-lin-icon-Dke_1AmT.cjs"),ve={class:"table-section"},be={class:"table-section-header"},ge={class:"table-toolbar"},he={class:"table-scroll-wrapper"},Se={class:"report-table"},xe={key:0},Ye=["colspan"],je={class:"table-pagination"},De={class:"page-info"},Ne={class:"page-controls"},Ee=["disabled"],Me={class:"page-num"},ke=["disabled"],Ce={DEFAULT_ICON:Q.DEFAULT_ICON,ACTIVE_ICON:Q.ACTIVE_ICON,NAME_CN:"GNSS历史明细报表",NAME_EN:"GNSS History Table",ORDER:5},He={bgColor:{value:"#f5f7fa",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},linkChannel:{value:"gnss",type:"select",label:"联动频道",options:[{label:"GNSS监测",value:"gnss"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"自定义频道名",showWhen:{linkChannel:"custom"}}},we=[{name:"序号",fv:"_index",object_id:"",type:"index"},{name:"编号",fv:"_device",object_id:"",type:"device"},{name:"区域",fv:"_area",object_id:"",type:"area"},{name:"时间",fv:"_time",object_id:"",type:"time"},{name:"基准X",fv:"base_x",object_id:"",type:"data"},{name:"基准Y",fv:"base_y",object_id:"",type:"data"},{name:"基准H",fv:"base_h",object_id:"",type:"data"},{name:"X位移",fv:"x_disp",object_id:"",type:"data"},{name:"Y位移",fv:"y_disp",object_id:"",type:"data"},{name:"H位移",fv:"h_disp",object_id:"",type:"data"},{name:"XY位移",fv:"xy_disp",object_id:"",type:"data"},{name:"XYH位移",fv:"xyh_disp",object_id:"",type:"data"},{name:"X累积位移",fv:"x_cum_disp",object_id:"",type:"data"},{name:"Y累积位移",fv:"y_cum_disp",object_id:"",type:"data"},{name:"H累积位移",fv:"h_cum_disp",object_id:"",type:"data"},{name:"XY累积位移",fv:"xy_cum_disp",object_id:"",type:"data"},{name:"XYH累积位移",fv:"xyh_cum_disp",object_id:"",type:"data"},{name:"X速度",fv:"x_speed",object_id:"",type:"data"},{name:"Y速度",fv:"y_speed",object_id:"",type:"data"},{name:"H速度",fv:"h_speed",object_id:"",type:"data"},{name:"XY速度",fv:"xy_speed",object_id:"",type:"data"},{name:"XYH速度",fv:"xyh_speed",object_id:"",type:"data"},{name:"X加速度",fv:"x_accel",object_id:"",type:"data"},{name:"Y加速度",fv:"y_accel",object_id:"",type:"data"},{name:"H加速度",fv:"h_accel",object_id:"",type:"data"},{name:"切线角",fv:"tangent_angle",object_id:"",type:"data"}],Fe=["name","fv","object_id","type"],Ve=["mosaic","statistics","statisticsRealtime"],Ae={useAlias:!1,multiObject:!0,hideMultiObject:!1,source:"mosaic"},Re={DEFAULT:Ce,OPTIONS:He,DATA:we,PARAMS:Fe,SOURCE:Ve,COMMON:Ae},Oe=e.defineComponent(W(K({},Re),{__name:"gnssHistoryTable",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(y){const l=y;class d extends _e.EChartComponentBase{constructor(){super(...arguments),this._lastDedupeKey=""}extractStyles(){var r,n,u,s,c;const t=(r=this.props.conf)==null?void 0:r.options,o=((n=t==null?void 0:t.linkChannel)==null?void 0:n.value)||"gnss",i=((u=t==null?void 0:t.customChannel)==null?void 0:u.value)||"";return{bgColor:((s=t==null?void 0:t.bgColor)==null?void 0:s.value)||"#f5f7fa",textColor:((c=t==null?void 0:t.textColor)==null?void 0:c.value)||"#333333",linkChannel:o==="custom"&&i?i:o}}getChartOption(){return{}}onLinkEvent(t){ne(t)}onPreview(){}setSocketData(t){if(!t||!t.data)return;const{data:o}=this.props.conf;if(!o||!Array.isArray(o))return;const i=t.datetime||f.dayjs().format("YYYY/MM/DD HH:mm:ss"),r=`${i}_${JSON.stringify(t.data)}`;if(r===this._lastDedupeKey)return;this._lastDedupeKey=r;const n={};if(o.forEach(s=>{if(s.type==="data"&&s.fv){const c=this.extractDataValue(t,s.fv);c!=null&&(n[s.fv]=String(c))}}),Object.keys(n).length===0)return;const u={time:i,area:w.value||"-",device:_.value?`GNSS${_.value}`:"GNSS",metrics:n};S.rows.unshift(u),S.rows.length>1e3&&(S.rows=S.rows.slice(0,1e3))}}const g=new d(l,"gnssHistoryTable");g.setupLifecycle();const A=g.getStyle(),_=e.ref(""),w=e.ref(""),h=e.ref(""),p=e.reactive({timeRange:"1d",dateRange:[f.dayjs().subtract(1,"day").format("YYYY/MM/DD HH:mm"),f.dayjs().format("YYYY/MM/DD HH:mm")]}),F=()=>J(null,null,function*(){var n,u,s;if(j.value=1,l.mode==="edit"){I();return}if(!h.value)return;S.rows=[];const a=(n=g.session)==null?void 0:n.value,t=(u=l.conf)==null?void 0:u.id;a!=null&&a.componentRequests&&t&&a.componentRequests.delete(t);const{data:o,common:i}=l.conf;Array.isArray(o)&&o.forEach(c=>{c.object_id=h.value}),i.multiObject||(i.object_id=h.value);try{const c=f.dayjs(p.dateRange[0],"YYYY/MM/DD HH:mm").format("YYYY-MM-DD HH:mm:ss"),D=f.dayjs(p.dateRange[1],"YYYY/MM/DD HH:mm").format("YYYY-MM-DD HH:mm:ss"),k=f.dayjs(p.dateRange[1],"YYYY/MM/DD HH:mm").diff(f.dayjs(p.dateRange[0],"YYYY/MM/DD HH:mm"),"second"),x=Math.max(60,Math.floor(k/500)),V=(l.conf.data||[]).filter(b=>b.type==="data"&&b.fv),G=V.map(b=>b.fv),v=[{block_mapping:"influxdbproxy",action:"get_mosaic_list_with_time_span",start_time:c,end_time:D,time_span:x,time_swing:x,keys:G,object_id:h.value}],N=yield new Promise(b=>{fe.api.platform(Y=>{b(Y.result)},{block_mapping:"mixtools",action:"get_tools_mosaic_list",condition:v})}),E=Array.isArray(N)?((s=N[0])==null?void 0:s.data)||N[0]||[]:[];Array.isArray(E)&&E.length>0&&[...E].sort((Y,H)=>{const M=Y.time||Y.datetime||"",C=H.time||H.datetime||"";return new Date(C).getTime()-new Date(M).getTime()}).forEach(Y=>{const H=Y.time||Y.datetime;if(!H)return;const M={};V.forEach(C=>{const O=Y[C.fv];O!=null&&(M[C.fv]=String(O))}),Object.keys(M).length>0&&S.rows.push({time:f.dayjs(H).format("YYYY/MM/DD HH:mm:ss"),area:w.value||"-",device:_.value?`GNSS${_.value}`:"GNSS",metrics:M})}),console.log(`[GNSS历史明细] 历史数据加载完成,共 ${S.rows.length} 条,时间范围: ${c} ~ ${D}`)}catch(c){console.warn("[GNSS历史明细] 历史数据获取失败:",c)}const r=g.getSource();g.subscribeBySource(r,h.value)}),Z=e.computed(()=>({backgroundColor:A.value.bgColor,color:A.value.textColor})),R=e.computed(()=>{const{data:a}=l.conf;return!a||!Array.isArray(a)?[]:a.map(t=>({key:t.fv||"",label:t.name||t.fv||"-",type:t.type||"data"})).filter(t=>t.key)});e.computed(()=>R.value.filter(a=>a.type==="data"));const T=e.ref("hour"),j=e.ref(1),q=15,S=e.reactive({rows:[]}),B=e.computed(()=>{const a=T.value;if(a==="hour")return S.rows;const t=new Set,o=[];for(const i of S.rows){const r=f.dayjs(i.time,"YYYY/MM/DD HH:mm:ss");let n;if(a==="day")n=r.format("YYYY/MM/DD");else if(a==="week"){const u=r.startOf("year");n=r.year()+"-W"+Math.floor(r.diff(u,"day")/7)}else n=r.format("YYYY/MM");t.has(n)||(t.add(n),o.push(i))}return o}),$=e.computed(()=>Math.max(1,Math.ceil(B.value.length/q))),X=e.computed(()=>{const a=(j.value-1)*q;return B.value.slice(a,a+q)}),ee=()=>{j.value=1},I=()=>{const a=w.value||"-",t=_.value?`GNSS${_.value}`:"GNSS",o=parseInt(_.value)||50,i=f.dayjs(),r=100,n=+(2450+o*.1).toFixed(2),u=+(1300+o*.02).toFixed(2),s=+(1150+o*.01).toFixed(2);let c=0,D=0,k=0;const x=[];for(let V=0;V<r;V++){const G=i.subtract((r-V)*60,"minute"),v=()=>Math.random()-.5,N=+(.8+v()*.2).toFixed(2),E=+(.65+v()*.15).toFixed(2),b=+(.01+v()*.02).toFixed(2),Y=+Math.sqrt(m(N,2)+m(E,2)).toFixed(2),H=+Math.sqrt(m(N,2)+m(E,2)+m(b,2)).toFixed(2);c+=N,D+=E,k+=b;const M=+(8+v()*1.5).toFixed(2),C=+(8+v()*1.5).toFixed(2),O=+(8.5+v()*1).toFixed(2),oe=+Math.sqrt(m(M,2)+m(C,2)).toFixed(2),se=+Math.sqrt(m(M,2)+m(C,2)+m(O,2)).toFixed(2),le=+(v()*.1).toFixed(3),ce=+(v()*.08).toFixed(3),ie=+(v()*.06).toFixed(3),re=+(Math.atan2(E,N)*180/Math.PI).toFixed(1);x.push({time:G.format("YYYY/MM/DD HH:mm:ss"),area:a,device:t,metrics:{base_x:String(n),base_y:String(u),base_h:String(s),x_disp:String(N),y_disp:String(E),h_disp:String(b),xy_disp:String(Y),xyh_disp:String(H),x_cum_disp:c.toFixed(2),y_cum_disp:D.toFixed(2),h_cum_disp:k.toFixed(2),xy_cum_disp:Math.sqrt(m(c,2)+m(D,2)).toFixed(2),xyh_cum_disp:Math.sqrt(m(c,2)+m(D,2)+m(k,2)).toFixed(2),x_speed:String(M),y_speed:String(C),h_speed:String(O),xy_speed:String(oe),xyh_speed:String(se),x_accel:String(le),y_accel:String(ce),h_accel:String(ie),tangent_angle:re+"°"}})}S.rows=x},te=a=>{if(!a)return"#333";const t=parseFloat(a);return isNaN(t)?"#333":t>=20?"#ee4444":t>=10?"#e6a23c":"#333"},P=(a,t,o)=>{var i;switch(t.type){case"index":return String((j.value-1)*q+o+1);case"device":return a.device;case"area":return a.area;case"time":return a.time;default:return(i=a.metrics[t.key])!=null?i:"-"}},ae=()=>{const a=R.value,t=B.value;if(!t.length)return;const o=a.map(c=>c.label).join(","),i=t.map((c,D)=>a.map(k=>{const x=P(c,k,D);return k.type==="time"||x.includes(",")||x.includes('"')?`"${x.replace(/"/g,'""')}"`:x}).join(",")).join(`
2
2
  `),r="\uFEFF"+o+`
3
3
  `+i,n=new Blob([r],{type:"text/csv;charset=utf-8;"}),u=URL.createObjectURL(n),s=document.createElement("a");s.href=u,s.download=`GNSS监测历史明细_${_.value||"all"}_${f.dayjs().format("YYYYMMDDHHmmss")}.csv`,s.click(),URL.revokeObjectURL(u)},ne=a=>{const{payload:t}=a;if(!t)return;if(t.type==="filter"){t.point!=null&&(_.value=String(t.point)),t.area!=null&&(w.value=String(t.area)),t.objectId!=null&&(h.value=String(t.objectId)),t.timeRange&&(p.timeRange=t.timeRange),t.dateRange&&(p.dateRange=t.dateRange),F();return}const o=t.point||t.deviceId;o&&(_.value=String(o),F())};return e.onMounted(()=>{g.init(),l.mode==="edit"&&I()}),e.onUnmounted(()=>{g.cleanup()}),e.watch(()=>l.conf,()=>{g.init(),l.mode==="edit"&&I()},{deep:!0}),(a,t)=>{const o=L.ElOption,i=L.ElSelect,r=L.ElButton;return e.openBlock(),e.createElementBlock("div",{class:"gnss-history-table",style:e.normalizeStyle(Z.value)},[e.createElementVNode("div",ve,[e.createElementVNode("div",be,[t[5]||(t[5]=e.createElementVNode("div",{class:"table-title"},[e.createElementVNode("span",{class:"table-title-bar"}),e.createElementVNode("span",null,"GNSS监测 历史明细报表")],-1)),e.createElementVNode("div",ge,[t[4]||(t[4]=e.createElementVNode("span",{class:"toolbar-label"},"显示频率:",-1)),e.createVNode(i,{modelValue:T.value,"onUpdate:modelValue":t[0]||(t[0]=n=>T.value=n),size:"small",style:{width:"95px"},onChange:ee},{default:e.withCtx(()=>[e.createVNode(o,{label:"按小时",value:"hour"}),e.createVNode(o,{label:"按天显示",value:"day"}),e.createVNode(o,{label:"按周显示",value:"week"}),e.createVNode(o,{label:"按月显示",value:"month"})]),_:1},8,["modelValue"]),e.createVNode(r,{size:"small",type:"success",onClick:ae},{default:e.withCtx(()=>[...t[3]||(t[3]=[e.createElementVNode("span",null,"📥 导出分析报表 (Excel)",-1)])]),_:1})])]),e.createElementVNode("div",he,[e.createElementVNode("table",Se,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,n=>(e.openBlock(),e.createElementBlock("th",{key:n.key,class:e.normalizeClass({"col-fixed":n.type!=="data","col-idx":n.type==="index","col-time":n.type==="time"})},e.toDisplayString(n.label),3))),128))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(X.value,(n,u)=>(e.openBlock(),e.createElementBlock("tr",{key:u},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,s=>(e.openBlock(),e.createElementBlock("td",{key:s.key,class:e.normalizeClass({"col-fixed":s.type!=="data","col-idx":s.type==="index","col-time":s.type==="time","cell-angle":s.key==="tangent_angle"}),style:e.normalizeStyle(s.key==="tangent_angle"?{color:te(n.metrics[s.key])}:{})},e.toDisplayString(P(n,s,u)),7))),128))]))),128)),X.value.length===0?(e.openBlock(),e.createElementBlock("tr",xe,[e.createElementVNode("td",{colspan:R.value.length,style:{"text-align":"center",color:"#999",padding:"20px"}},"暂无数据",8,Ye)])):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",je,[e.createElementVNode("span",De,"共 "+e.toDisplayString(B.value.length)+" 条记录",1),e.createElementVNode("div",Ne,[e.createElementVNode("button",{class:"page-arrow",disabled:j.value<=1,onClick:t[1]||(t[1]=n=>j.value--)},"◀",8,Ee),e.createElementVNode("span",Me,e.toDisplayString(j.value)+" / "+e.toDisplayString($.value),1),e.createElementVNode("button",{class:"page-arrow",disabled:j.value>=$.value,onClick:t[2]||(t[2]=n=>j.value++)},"▶",8,ke)])])]),e.renderSlot(a.$slots,"default",{},void 0,!0)],4)}}})),qe=f._export_sfc(Oe,[["__scopeId","data-v-ca0bbfec"]]);exports.default=qe;
@@ -1,4 +1,4 @@
1
- "use strict";var De=Object.defineProperty,Ie=Object.defineProperties;var Ae=Object.getOwnPropertyDescriptors;var H=Object.getOwnPropertySymbols;var Te=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable;var J=(g,m,v)=>m in g?De(g,m,{enumerable:!0,configurable:!0,writable:!0,value:v}):g[m]=v,Q=(g,m)=>{for(var v in m||(m={}))Te.call(m,v)&&J(g,v,m[v]);if(H)for(var v of H(m))_e.call(m,v)&&J(g,v,m[v]);return g},Z=(g,m)=>Ie(g,Ae(m));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/dialog/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/select/style/css");require("element-plus/es/components/option/style/css");const e=require("vue");require("html2canvas");const Pe=require("./element-resize-detector-Bo5uDQAu.cjs"),Be=require("./index-Mh5Dw2sd.cjs");require("./index-mAPVa0s4.cjs");const ee=require("./ele-lin-icon-Dke_1AmT.cjs"),Ue=require("./echarts-BB8O2KSA.cjs"),Fe={class:"toolbar-left"},Oe={class:"filter-item"},$e={class:"filter-item"},ze={class:"filter-item"},Ge={class:"toolbar-right"},Le={key:0,class:"pick-hint-bar"},je=["viewBox"],Ye=["d","stroke"],Xe=["x1","y1","x2","y2"],qe=["onClick","onMouseenter"],We={class:"point-bubble"},Ke={class:"point-id"},He=["innerHTML"],Je={class:"drawer-icons"},Qe=["onClick"],Ze={class:"drawer-icon"},et={class:"drawer-label"},tt={class:"profile-dialog-header"},ot={class:"profile-header-btns"},nt={DEFAULT_ICON:ee.DEFAULT_ICON,ACTIVE_ICON:ee.ACTIVE_ICON,NAME_CN:"GNSS地图监测视图",NAME_EN:"GNSS Map Monitor View",ORDER:10},lt={bgColor:{value:"#0b1a31",type:"color",label:"setting.bgColor"},toolbarBg:{value:"#ffffff",type:"color",label:"工具栏背景色"},toolbarFontSize:{value:12,type:"number",label:"工具栏字体大小",min:10,max:20},geologyMapUrl:{value:"",type:"string",label:"地质模型地图URL"},dtmMapUrl:{value:"",type:"string",label:"DTM面地图URL"},uavMapUrl:{value:"",type:"string",label:"无人机地图URL"},pointCount:{value:80,type:"number",label:"模拟监测点数量",min:20,max:200},linkChannel:{value:"gnss",type:"select",label:"联动频道",options:[{label:"GNSS监测",value:"gnss"},{label:"边坡监测",value:"slope"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"自定义频道名",showWhen:{linkChannel:"custom"}}},at=[{name:"GNSS001",fv:"",fvDeviceName:"",object_id:"",type:"GNSS",x:1e3,y:400,elevation:1350,region:"北帮",lineName:"北帮线"},{name:"GNSS002",fv:"",fvDeviceName:"",object_id:"",type:"GNSS",x:1300,y:400,elevation:1380,region:"北帮",lineName:"北帮线"},{name:"GNSS003",fv:"",fvDeviceName:"",object_id:"",type:"GNSS",x:1600,y:400,elevation:1410,region:"北帮",lineName:"北帮线"},{name:"DEEP001",fv:"",fvDeviceName:"",object_id:"",type:"深部位移",x:500,y:1200,elevation:1280,region:"西帮",lineName:""},{name:"RADAR001",fv:"",fvDeviceName:"",object_id:"",type:"雷达",x:2500,y:1e3,elevation:1320,region:"东帮",lineName:""},{name:"CRACK001",fv:"",fvDeviceName:"",object_id:"",type:"裂缝",x:1500,y:1250,elevation:1300,region:"中央区",lineName:""},{name:"FIRE001",fv:"",fvDeviceName:"",object_id:"",type:"煤自燃",x:1200,y:2100,elevation:1260,region:"南帮",lineName:""},{name:"WATER001",fv:"",fvDeviceName:"",object_id:"",type:"降雨",x:1800,y:2100,elevation:1240,region:"南帮",lineName:""}],it=["object_id","name","fv","fvDeviceName","type","x","y","elevation","region","lineName"],st=["mosaic"],rt={useAlias:!1,multiObject:!0,source:"mosaic"},ct=200,dt={DEFAULT:nt,OPTIONS:lt,DATA:at,PARAMS:it,SOURCE:st,COMMON:rt,ITEMS:ct},ut=e.defineComponent(Z(Q({},dt),{__name:"gnssMapView",props:{conf:{type:Object,default:()=>({})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(g){const m=g,v=3e3,A=2500,F={GNSS:"GNSS",gnss:"GNSS",DEEP:"DEEP",deep:"DEEP",深部位移:"DEEP",RADAR:"RADAR",radar:"RADAR",雷达:"RADAR",SURFACE:"SURFACE",surface:"SURFACE",地表:"SURFACE",CRACK:"CRACK",crack:"CRACK",裂缝:"CRACK",FIRE:"FIRE",fire:"FIRE",煤自燃:"FIRE",WATER:"WATER",water:"WATER",降雨:"WATER",GROUND:"GROUND",ground:"GROUND",地下水:"GROUND",STRESS:"STRESS",stress:"STRESS",应力:"STRESS",VIB:"VIB",vib:"VIB",爆破震动:"VIB",SAT:"SAT",sat:"SAT",遥感卫星:"SAT"},O={GNSS:"📍",DEEP:"⚓",RADAR:"📡",SURFACE:"📐",CRACK:"🧱",FIRE:"🔥",WATER:"💧",GROUND:"🌍",STRESS:"📊",VIB:"💥",SAT:"🛸"},R=[{key:"GNSS",label:"GNSS",icon:"📍"},{key:"DEEP",label:"深部位移",icon:"⚓"},{key:"RADAR",label:"雷达",icon:"📡"},{key:"SURFACE",label:"地表",icon:"📐"},{key:"CRACK",label:"裂缝",icon:"🧱"},{key:"FIRE",label:"煤自燃",icon:"🔥"},{key:"WATER",label:"降雨",icon:"💧"},{key:"GROUND",label:"地下水",icon:"🌍"},{key:"STRESS",label:"应力",icon:"📊"},{key:"VIB",label:"爆破震动",icon:"💥"},{key:"SAT",label:"遥感卫星",icon:"🛸"}],$=["#F57676","#FFA500","#fadb14","#66B1FF","#71C446"],P=[{name:"北帮",xRange:[800,2200],yRange:[200,600]},{name:"南帮",xRange:[800,2200],yRange:[1900,2300]},{name:"西帮",xRange:[200,700],yRange:[800,1700]},{name:"东帮",xRange:[2300,2800],yRange:[800,1700]},{name:"中央区",xRange:[1100,1900],yRange:[1e3,1500]}],z=["#F57676","#FFA500","#66B1FF","#71C446","#9254de","#13c2c2"];class te extends Pe.BaseComponent{extractStyles(){var a,r,n,u,p,f,d,h,S,y;const t=(a=this.props.conf)==null?void 0:a.options,l=((r=t==null?void 0:t.linkChannel)==null?void 0:r.value)||"gnss",s=((n=t==null?void 0:t.customChannel)==null?void 0:n.value)||"";return{bgColor:((u=t==null?void 0:t.bgColor)==null?void 0:u.value)||"#0b1a31",toolbarBg:((p=t==null?void 0:t.toolbarBg)==null?void 0:p.value)||"#ffffff",toolbarFontSize:((f=t==null?void 0:t.toolbarFontSize)==null?void 0:f.value)||12,geologyMapUrl:((d=t==null?void 0:t.geologyMapUrl)==null?void 0:d.value)||"",dtmMapUrl:((h=t==null?void 0:t.dtmMapUrl)==null?void 0:h.value)||"",uavMapUrl:((S=t==null?void 0:t.uavMapUrl)==null?void 0:S.value)||"",pointCount:((y=t==null?void 0:t.pointCount)==null?void 0:y.value)||80,linkChannel:l==="custom"&&s?s:l}}onLinkEvent(t){Ne(t)}}const V=new te(m,"gnssMapView");V.setupLifecycle();const C=V.getStyle(),M=e.ref(null),B=e.ref(null),w=e.ref(!1),N=e.reactive(new Set(R.map(o=>o.key))),D=e.ref([]),G=e.ref([]),i=e.reactive({scale:.4,posX:0,posY:0,viewType:"geology",selectedRegion:"全部",selectedType:"全部"}),U=e.ref(!1),T=e.reactive({x:0,y:0}),x=e.reactive({visible:!1,x:0,y:0,content:""}),c=e.reactive({picking:!1,pickedPoints:[],dialogVisible:!1});let b=null;const E=e.ref(""),oe={onWheel:o=>{o.preventDefault(),pe(o)},onMousedown:o=>me(o),onMousemove:o=>ve(o),onMouseup:()=>q(),onMouseleave:()=>q()},ne=e.computed(()=>({backgroundColor:C.value.bgColor})),L=e.computed(()=>({geology:C.value.geologyMapUrl,dtm:C.value.dtmMapUrl,uav:C.value.uavMapUrl})[i.viewType]||""),le=e.computed(()=>({transform:`translate(${i.posX}px, ${i.posY}px) scale(${i.scale})`,width:v+"px",height:A+"px",backgroundImage:L.value?`url(${L.value})`:"none"})),ae=e.computed(()=>{const o=new Set;return D.value.forEach(t=>{t.region&&o.add(t.region)}),Array.from(o)}),j=e.computed(()=>D.value.filter(o=>{const t=N.has(o.type),l=i.selectedRegion==="全部"||o.region===i.selectedRegion,s=i.selectedType==="全部"||o.type===i.selectedType;return t&&l&&s})),ie=e.computed(()=>N.has("GNSS")?G.value.filter(o=>i.selectedRegion!=="全部"&&o.region!==i.selectedRegion?!1:o.pointIds.filter(l=>j.value.some(s=>s.id===l)).length>=2):[]),se=o=>{const t=o.isOnline?$[o.alarmIdx]||"#71C446":"#999";return{left:o.x+"px",top:o.y+"px",backgroundColor:t,color:t}},re=o=>c.pickedPoints.some(t=>t.id===o.id),ce=e.computed(()=>{var o;return((o=m.conf)==null?void 0:o.data)||[]}),Y=()=>{const o=ce.value;o.length>0?de(o):ue()},de=o=>{const t=[];o.forEach((l,s)=>{var f;const a=l.name||l.deviceId||"",r=l.type||"GNSS",n=F[r]||F[(f=r.toUpperCase)==null?void 0:f.call(r)]||"GNSS",u=Number(l.x)||0,p=Number(l.y)||0;t.push({id:a||`pt-${s}`,type:n,alarmIdx:typeof l.alarmIdx=="number"?l.alarmIdx:4,isOnline:l.isOnline!==!1,deviceId:a||`${n}${s}`,region:l.region||"未分区",x:u,y:p,isOnDetectionLine:!!l.lineName,lineName:l.lineName||"",objectId:l.object_id||""})}),D.value=t,X(t)},ue=()=>{const o=C.value.pointCount||80,t=Object.keys(O),l=[],s=[],a=60,r={};P.forEach(n=>r[n.name]=0);for(let n=0;n<o;n++){let u=t[n%t.length];n<7?u="RADAR":u==="RADAR"&&(u="GNSS");const p=n*7%5,f=n%8!==0,d=P[n%P.length];let h=!1,S="";u==="GNSS"&&r[d.name]<3&&(h=!0,S=`${d.name}线`,r[d.name]++);let y=0,k=0,K=0;for(;K<100;){if(h){const I=r[d.name]-1;d.name==="北帮"||d.name==="南帮"?(k=(d.yRange[0]+d.yRange[1])/2,y=d.xRange[0]+300+I*250):(y=(d.xRange[0]+d.xRange[1])/2,k=d.yRange[0]+300+I*250)}else y=d.xRange[0]+Math.random()*(d.xRange[1]-d.xRange[0]),k=d.yRange[0]+Math.random()*(d.yRange[1]-d.yRange[0]);if(!s.some(I=>Math.hypot(y-I.x,k-I.y)<a))break;K++}s.push({x:y,y:k}),l.push({id:`pt-${n}`,type:u,alarmIdx:p,isOnline:f,deviceId:`${u}${n}`,region:d.name,x:y,y:k,isOnDetectionLine:h,lineName:S,objectId:""})}D.value=l,X(l)},X=o=>{const t=new Map;o.filter(a=>a.lineName).forEach(a=>{t.has(a.lineName)||t.set(a.lineName,[]),t.get(a.lineName).push(a)});const l=[];let s=0;t.forEach((a,r)=>{var p,f,d,h;const n=Math.abs(((p=a[a.length-1])==null?void 0:p.x)-((f=a[0])==null?void 0:f.x)),u=Math.abs(((d=a[a.length-1])==null?void 0:d.y)-((h=a[0])==null?void 0:h.y));if(a.sort((S,y)=>n>=u?S.x-y.x:S.y-y.y),a.length>=2){const S=`M ${a[0].x+16} ${a[0].y+16} `+a.slice(1).map(k=>`L ${k.x+16} ${k.y+16}`).join(" "),y=a[0].region||"";l.push({name:r,region:y,color:z[s%z.length],path:S,pointIds:a.map(k=>k.id)}),s++}}),G.value=l},pe=o=>{const t=M.value;if(!t)return;const l=Math.min(Math.max(.15,i.scale+o.deltaY*-.001),2.5),s=t.getBoundingClientRect(),a=o.clientX-s.left,r=o.clientY-s.top,n=l/i.scale;i.posX=a-(a-i.posX)*n,i.posY=r-(r-i.posY)*n,i.scale=l},me=o=>{o.button===0&&(U.value=!0,T.x=o.clientX-i.posX,T.y=o.clientY-i.posY)},ve=o=>{U.value&&(i.posX=o.clientX-T.x,i.posY=o.clientY-T.y)},q=()=>{U.value=!1},fe=()=>{const o=M.value;if(!o){i.scale=.4,i.posX=0,i.posY=0;return}const t=o.clientWidth,l=o.clientHeight;if(t===0||l===0){i.scale=.4,i.posX=0,i.posY=0;return}const s=t/v,a=l/A,r=Math.min(s,a)*.9;i.scale=Math.max(.15,Math.min(r,1.5)),i.posX=(t-v*i.scale)/2,i.posY=(l-A*i.scale)/2},ye=o=>{if(m.mode!=="edit"){if(c.picking){const t=c.pickedPoints.findIndex(l=>l.id===o.id);if(t>=0){c.pickedPoints.splice(t,1);return}c.pickedPoints.length<2&&c.pickedPoints.push(o),c.pickedPoints.length===2&&(c.picking=!1,c.dialogVisible=!0);return}o.isOnline&&(E.value=o.id,setTimeout(()=>{E.value===o.id&&(E.value="")},3e3),V.publish({objectId:o.objectId,deviceId:o.deviceId,point:o.deviceId,deviceType:o.type,region:o.region,alarmIdx:o.alarmIdx}))}},ge=(o,t)=>{var a,r;x.visible=!0,x.x=o.clientX-(((a=M.value)==null?void 0:a.getBoundingClientRect().left)||0)+15,x.y=o.clientY-(((r=M.value)==null?void 0:r.getBoundingClientRect().top)||0)+15;const l=t.isOnline?"在线":'<span style="color:#f5222d">离线</span>',s=["一级告警(危险)","二级告警(受控)","三级告警(注意)","四级告警(警示)","运行正常"];x.content=`
1
+ "use strict";var De=Object.defineProperty,Ie=Object.defineProperties;var Ae=Object.getOwnPropertyDescriptors;var H=Object.getOwnPropertySymbols;var Te=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable;var J=(g,m,v)=>m in g?De(g,m,{enumerable:!0,configurable:!0,writable:!0,value:v}):g[m]=v,Q=(g,m)=>{for(var v in m||(m={}))Te.call(m,v)&&J(g,v,m[v]);if(H)for(var v of H(m))_e.call(m,v)&&J(g,v,m[v]);return g},Z=(g,m)=>Ie(g,Ae(m));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/dialog/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/select/style/css");require("element-plus/es/components/option/style/css");const e=require("vue");require("html2canvas");const Pe=require("./element-resize-detector-BlMXyWIR.cjs"),Be=require("./index-EnNA0nIi.cjs");require("./index-mAPVa0s4.cjs");const ee=require("./ele-lin-icon-Dke_1AmT.cjs"),Ue=require("./echarts-BB8O2KSA.cjs"),Fe={class:"toolbar-left"},Oe={class:"filter-item"},$e={class:"filter-item"},ze={class:"filter-item"},Ge={class:"toolbar-right"},Le={key:0,class:"pick-hint-bar"},je=["viewBox"],Ye=["d","stroke"],Xe=["x1","y1","x2","y2"],qe=["onClick","onMouseenter"],We={class:"point-bubble"},Ke={class:"point-id"},He=["innerHTML"],Je={class:"drawer-icons"},Qe=["onClick"],Ze={class:"drawer-icon"},et={class:"drawer-label"},tt={class:"profile-dialog-header"},ot={class:"profile-header-btns"},nt={DEFAULT_ICON:ee.DEFAULT_ICON,ACTIVE_ICON:ee.ACTIVE_ICON,NAME_CN:"GNSS地图监测视图",NAME_EN:"GNSS Map Monitor View",ORDER:10},lt={bgColor:{value:"#0b1a31",type:"color",label:"setting.bgColor"},toolbarBg:{value:"#ffffff",type:"color",label:"工具栏背景色"},toolbarFontSize:{value:12,type:"number",label:"工具栏字体大小",min:10,max:20},geologyMapUrl:{value:"",type:"string",label:"地质模型地图URL"},dtmMapUrl:{value:"",type:"string",label:"DTM面地图URL"},uavMapUrl:{value:"",type:"string",label:"无人机地图URL"},pointCount:{value:80,type:"number",label:"模拟监测点数量",min:20,max:200},linkChannel:{value:"gnss",type:"select",label:"联动频道",options:[{label:"GNSS监测",value:"gnss"},{label:"边坡监测",value:"slope"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"自定义频道名",showWhen:{linkChannel:"custom"}}},at=[{name:"GNSS001",fv:"",fvDeviceName:"",object_id:"",type:"GNSS",x:1e3,y:400,elevation:1350,region:"北帮",lineName:"北帮线"},{name:"GNSS002",fv:"",fvDeviceName:"",object_id:"",type:"GNSS",x:1300,y:400,elevation:1380,region:"北帮",lineName:"北帮线"},{name:"GNSS003",fv:"",fvDeviceName:"",object_id:"",type:"GNSS",x:1600,y:400,elevation:1410,region:"北帮",lineName:"北帮线"},{name:"DEEP001",fv:"",fvDeviceName:"",object_id:"",type:"深部位移",x:500,y:1200,elevation:1280,region:"西帮",lineName:""},{name:"RADAR001",fv:"",fvDeviceName:"",object_id:"",type:"雷达",x:2500,y:1e3,elevation:1320,region:"东帮",lineName:""},{name:"CRACK001",fv:"",fvDeviceName:"",object_id:"",type:"裂缝",x:1500,y:1250,elevation:1300,region:"中央区",lineName:""},{name:"FIRE001",fv:"",fvDeviceName:"",object_id:"",type:"煤自燃",x:1200,y:2100,elevation:1260,region:"南帮",lineName:""},{name:"WATER001",fv:"",fvDeviceName:"",object_id:"",type:"降雨",x:1800,y:2100,elevation:1240,region:"南帮",lineName:""}],it=["object_id","name","fv","fvDeviceName","type","x","y","elevation","region","lineName"],st=["mosaic"],rt={useAlias:!1,multiObject:!0,source:"mosaic"},ct=200,dt={DEFAULT:nt,OPTIONS:lt,DATA:at,PARAMS:it,SOURCE:st,COMMON:rt,ITEMS:ct},ut=e.defineComponent(Z(Q({},dt),{__name:"gnssMapView",props:{conf:{type:Object,default:()=>({})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(g){const m=g,v=3e3,A=2500,F={GNSS:"GNSS",gnss:"GNSS",DEEP:"DEEP",deep:"DEEP",深部位移:"DEEP",RADAR:"RADAR",radar:"RADAR",雷达:"RADAR",SURFACE:"SURFACE",surface:"SURFACE",地表:"SURFACE",CRACK:"CRACK",crack:"CRACK",裂缝:"CRACK",FIRE:"FIRE",fire:"FIRE",煤自燃:"FIRE",WATER:"WATER",water:"WATER",降雨:"WATER",GROUND:"GROUND",ground:"GROUND",地下水:"GROUND",STRESS:"STRESS",stress:"STRESS",应力:"STRESS",VIB:"VIB",vib:"VIB",爆破震动:"VIB",SAT:"SAT",sat:"SAT",遥感卫星:"SAT"},O={GNSS:"📍",DEEP:"⚓",RADAR:"📡",SURFACE:"📐",CRACK:"🧱",FIRE:"🔥",WATER:"💧",GROUND:"🌍",STRESS:"📊",VIB:"💥",SAT:"🛸"},R=[{key:"GNSS",label:"GNSS",icon:"📍"},{key:"DEEP",label:"深部位移",icon:"⚓"},{key:"RADAR",label:"雷达",icon:"📡"},{key:"SURFACE",label:"地表",icon:"📐"},{key:"CRACK",label:"裂缝",icon:"🧱"},{key:"FIRE",label:"煤自燃",icon:"🔥"},{key:"WATER",label:"降雨",icon:"💧"},{key:"GROUND",label:"地下水",icon:"🌍"},{key:"STRESS",label:"应力",icon:"📊"},{key:"VIB",label:"爆破震动",icon:"💥"},{key:"SAT",label:"遥感卫星",icon:"🛸"}],$=["#F57676","#FFA500","#fadb14","#66B1FF","#71C446"],P=[{name:"北帮",xRange:[800,2200],yRange:[200,600]},{name:"南帮",xRange:[800,2200],yRange:[1900,2300]},{name:"西帮",xRange:[200,700],yRange:[800,1700]},{name:"东帮",xRange:[2300,2800],yRange:[800,1700]},{name:"中央区",xRange:[1100,1900],yRange:[1e3,1500]}],z=["#F57676","#FFA500","#66B1FF","#71C446","#9254de","#13c2c2"];class te extends Pe.BaseComponent{extractStyles(){var a,r,n,u,p,f,d,h,S,y;const t=(a=this.props.conf)==null?void 0:a.options,l=((r=t==null?void 0:t.linkChannel)==null?void 0:r.value)||"gnss",s=((n=t==null?void 0:t.customChannel)==null?void 0:n.value)||"";return{bgColor:((u=t==null?void 0:t.bgColor)==null?void 0:u.value)||"#0b1a31",toolbarBg:((p=t==null?void 0:t.toolbarBg)==null?void 0:p.value)||"#ffffff",toolbarFontSize:((f=t==null?void 0:t.toolbarFontSize)==null?void 0:f.value)||12,geologyMapUrl:((d=t==null?void 0:t.geologyMapUrl)==null?void 0:d.value)||"",dtmMapUrl:((h=t==null?void 0:t.dtmMapUrl)==null?void 0:h.value)||"",uavMapUrl:((S=t==null?void 0:t.uavMapUrl)==null?void 0:S.value)||"",pointCount:((y=t==null?void 0:t.pointCount)==null?void 0:y.value)||80,linkChannel:l==="custom"&&s?s:l}}onLinkEvent(t){Ne(t)}}const V=new te(m,"gnssMapView");V.setupLifecycle();const C=V.getStyle(),M=e.ref(null),B=e.ref(null),w=e.ref(!1),N=e.reactive(new Set(R.map(o=>o.key))),D=e.ref([]),G=e.ref([]),i=e.reactive({scale:.4,posX:0,posY:0,viewType:"geology",selectedRegion:"全部",selectedType:"全部"}),U=e.ref(!1),T=e.reactive({x:0,y:0}),x=e.reactive({visible:!1,x:0,y:0,content:""}),c=e.reactive({picking:!1,pickedPoints:[],dialogVisible:!1});let b=null;const E=e.ref(""),oe={onWheel:o=>{o.preventDefault(),pe(o)},onMousedown:o=>me(o),onMousemove:o=>ve(o),onMouseup:()=>q(),onMouseleave:()=>q()},ne=e.computed(()=>({backgroundColor:C.value.bgColor})),L=e.computed(()=>({geology:C.value.geologyMapUrl,dtm:C.value.dtmMapUrl,uav:C.value.uavMapUrl})[i.viewType]||""),le=e.computed(()=>({transform:`translate(${i.posX}px, ${i.posY}px) scale(${i.scale})`,width:v+"px",height:A+"px",backgroundImage:L.value?`url(${L.value})`:"none"})),ae=e.computed(()=>{const o=new Set;return D.value.forEach(t=>{t.region&&o.add(t.region)}),Array.from(o)}),j=e.computed(()=>D.value.filter(o=>{const t=N.has(o.type),l=i.selectedRegion==="全部"||o.region===i.selectedRegion,s=i.selectedType==="全部"||o.type===i.selectedType;return t&&l&&s})),ie=e.computed(()=>N.has("GNSS")?G.value.filter(o=>i.selectedRegion!=="全部"&&o.region!==i.selectedRegion?!1:o.pointIds.filter(l=>j.value.some(s=>s.id===l)).length>=2):[]),se=o=>{const t=o.isOnline?$[o.alarmIdx]||"#71C446":"#999";return{left:o.x+"px",top:o.y+"px",backgroundColor:t,color:t}},re=o=>c.pickedPoints.some(t=>t.id===o.id),ce=e.computed(()=>{var o;return((o=m.conf)==null?void 0:o.data)||[]}),Y=()=>{const o=ce.value;o.length>0?de(o):ue()},de=o=>{const t=[];o.forEach((l,s)=>{var f;const a=l.name||l.deviceId||"",r=l.type||"GNSS",n=F[r]||F[(f=r.toUpperCase)==null?void 0:f.call(r)]||"GNSS",u=Number(l.x)||0,p=Number(l.y)||0;t.push({id:a||`pt-${s}`,type:n,alarmIdx:typeof l.alarmIdx=="number"?l.alarmIdx:4,isOnline:l.isOnline!==!1,deviceId:a||`${n}${s}`,region:l.region||"未分区",x:u,y:p,isOnDetectionLine:!!l.lineName,lineName:l.lineName||"",objectId:l.object_id||""})}),D.value=t,X(t)},ue=()=>{const o=C.value.pointCount||80,t=Object.keys(O),l=[],s=[],a=60,r={};P.forEach(n=>r[n.name]=0);for(let n=0;n<o;n++){let u=t[n%t.length];n<7?u="RADAR":u==="RADAR"&&(u="GNSS");const p=n*7%5,f=n%8!==0,d=P[n%P.length];let h=!1,S="";u==="GNSS"&&r[d.name]<3&&(h=!0,S=`${d.name}线`,r[d.name]++);let y=0,k=0,K=0;for(;K<100;){if(h){const I=r[d.name]-1;d.name==="北帮"||d.name==="南帮"?(k=(d.yRange[0]+d.yRange[1])/2,y=d.xRange[0]+300+I*250):(y=(d.xRange[0]+d.xRange[1])/2,k=d.yRange[0]+300+I*250)}else y=d.xRange[0]+Math.random()*(d.xRange[1]-d.xRange[0]),k=d.yRange[0]+Math.random()*(d.yRange[1]-d.yRange[0]);if(!s.some(I=>Math.hypot(y-I.x,k-I.y)<a))break;K++}s.push({x:y,y:k}),l.push({id:`pt-${n}`,type:u,alarmIdx:p,isOnline:f,deviceId:`${u}${n}`,region:d.name,x:y,y:k,isOnDetectionLine:h,lineName:S,objectId:""})}D.value=l,X(l)},X=o=>{const t=new Map;o.filter(a=>a.lineName).forEach(a=>{t.has(a.lineName)||t.set(a.lineName,[]),t.get(a.lineName).push(a)});const l=[];let s=0;t.forEach((a,r)=>{var p,f,d,h;const n=Math.abs(((p=a[a.length-1])==null?void 0:p.x)-((f=a[0])==null?void 0:f.x)),u=Math.abs(((d=a[a.length-1])==null?void 0:d.y)-((h=a[0])==null?void 0:h.y));if(a.sort((S,y)=>n>=u?S.x-y.x:S.y-y.y),a.length>=2){const S=`M ${a[0].x+16} ${a[0].y+16} `+a.slice(1).map(k=>`L ${k.x+16} ${k.y+16}`).join(" "),y=a[0].region||"";l.push({name:r,region:y,color:z[s%z.length],path:S,pointIds:a.map(k=>k.id)}),s++}}),G.value=l},pe=o=>{const t=M.value;if(!t)return;const l=Math.min(Math.max(.15,i.scale+o.deltaY*-.001),2.5),s=t.getBoundingClientRect(),a=o.clientX-s.left,r=o.clientY-s.top,n=l/i.scale;i.posX=a-(a-i.posX)*n,i.posY=r-(r-i.posY)*n,i.scale=l},me=o=>{o.button===0&&(U.value=!0,T.x=o.clientX-i.posX,T.y=o.clientY-i.posY)},ve=o=>{U.value&&(i.posX=o.clientX-T.x,i.posY=o.clientY-T.y)},q=()=>{U.value=!1},fe=()=>{const o=M.value;if(!o){i.scale=.4,i.posX=0,i.posY=0;return}const t=o.clientWidth,l=o.clientHeight;if(t===0||l===0){i.scale=.4,i.posX=0,i.posY=0;return}const s=t/v,a=l/A,r=Math.min(s,a)*.9;i.scale=Math.max(.15,Math.min(r,1.5)),i.posX=(t-v*i.scale)/2,i.posY=(l-A*i.scale)/2},ye=o=>{if(m.mode!=="edit"){if(c.picking){const t=c.pickedPoints.findIndex(l=>l.id===o.id);if(t>=0){c.pickedPoints.splice(t,1);return}c.pickedPoints.length<2&&c.pickedPoints.push(o),c.pickedPoints.length===2&&(c.picking=!1,c.dialogVisible=!0);return}o.isOnline&&(E.value=o.id,setTimeout(()=>{E.value===o.id&&(E.value="")},3e3),V.publish({objectId:o.objectId,deviceId:o.deviceId,point:o.deviceId,deviceType:o.type,region:o.region,alarmIdx:o.alarmIdx}))}},ge=(o,t)=>{var a,r;x.visible=!0,x.x=o.clientX-(((a=M.value)==null?void 0:a.getBoundingClientRect().left)||0)+15,x.y=o.clientY-(((r=M.value)==null?void 0:r.getBoundingClientRect().top)||0)+15;const l=t.isOnline?"在线":'<span style="color:#f5222d">离线</span>',s=["一级告警(危险)","二级告警(受控)","三级告警(注意)","四级告警(警示)","运行正常"];x.content=`
2
2
  <b style="color:#85C6F1;">[${t.region}] ${t.deviceId}</b>
3
3
  <hr style="margin:5px 0; opacity:0.2">
4
4
  设备类型: ${t.type}<br>