@realsee/dnalogel 0.1.7 → 2.0.0-alpha.11

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 (731) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +24 -68
  3. package/{plugins → dist}/CSS3DRenderPlugin/index.d.ts +1 -1
  4. package/dist/CSS3DRenderPlugin/index.js +231 -0
  5. package/dist/CSS3DRenderPlugin/utils/createResizeObserver.d.ts +7 -0
  6. package/{plugins → dist}/CameraMovementPlugin/index.d.ts +0 -0
  7. package/dist/CameraMovementPlugin/index.js +302 -0
  8. package/{plugins → dist}/CameraMovementPlugin/typing.d.ts +0 -0
  9. package/{plugins → dist}/ModelChassisCompassPlugin/index.d.ts +1 -1
  10. package/dist/ModelChassisCompassPlugin/index.js +142 -0
  11. package/{plugins → dist}/ModelEntryDoorGuidePlugin/index.d.ts +6 -2
  12. package/dist/ModelEntryDoorGuidePlugin/index.js +196 -0
  13. package/dist/ModelRoomLabelPlugin/Assets/roomLabelBg.d.ts +1 -0
  14. package/{plugins → dist}/ModelRoomLabelPlugin/Controller.d.ts +3 -2
  15. package/dist/ModelRoomLabelPlugin/index.d.ts +12 -0
  16. package/dist/ModelRoomLabelPlugin/index.js +463 -0
  17. package/{plugins → dist}/ModelRoomLabelPlugin/typings.d.ts +2 -2
  18. package/{plugins → dist}/ModelRoomLabelPlugin/utils/parseData.d.ts +0 -0
  19. package/{plugins → dist}/ModelViewPlugin/index.d.ts +0 -0
  20. package/dist/ModelViewPlugin/index.js +187 -0
  21. package/dist/PanoCompassPlugin/Assets/roomInfoIcon.d.ts +1 -0
  22. package/dist/PanoCompassPlugin/getRoomInfoInstance.d.ts +8 -0
  23. package/dist/PanoCompassPlugin/index.d.ts +51 -0
  24. package/dist/PanoCompassPlugin/index.js +521 -0
  25. package/{plugins → dist}/PanoCursorRaycasterPlugin/index.d.ts +2 -3
  26. package/dist/PanoCursorRaycasterPlugin/index.js +88 -0
  27. package/dist/PanoMeasurePlugin/Controller/BaseController.d.ts +36 -0
  28. package/dist/PanoMeasurePlugin/Controller/EditController.d.ts +52 -0
  29. package/dist/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +12 -0
  30. package/dist/PanoMeasurePlugin/Controller/WatchController.d.ts +25 -0
  31. package/dist/PanoMeasurePlugin/Controller/index.d.ts +61 -0
  32. package/dist/PanoMeasurePlugin/Model/index.d.ts +38 -0
  33. package/dist/PanoMeasurePlugin/Model/line.d.ts +30 -0
  34. package/dist/PanoMeasurePlugin/Model/point.d.ts +16 -0
  35. package/dist/PanoMeasurePlugin/Model/polyline.d.ts +16 -0
  36. package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.d.ts +2 -0
  37. package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.d.ts +2 -0
  38. package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.d.ts +2 -0
  39. package/dist/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +22 -0
  40. package/dist/PanoMeasurePlugin/Modules/FiveHelper.d.ts +11 -0
  41. package/dist/PanoMeasurePlugin/Modules/GuideController.d.ts +18 -0
  42. package/dist/PanoMeasurePlugin/Modules/Magnifier.d.ts +24 -0
  43. package/dist/PanoMeasurePlugin/Modules/UIController/HTML.d.ts +6 -0
  44. package/dist/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +18 -0
  45. package/dist/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +12 -0
  46. package/dist/PanoMeasurePlugin/Modules/UIController/index.d.ts +16 -0
  47. package/dist/PanoMeasurePlugin/Modules/UIController/style.d.ts +17 -0
  48. package/dist/PanoMeasurePlugin/index.d.ts +7 -0
  49. package/dist/PanoMeasurePlugin/index.js +4789 -0
  50. package/dist/PanoMeasurePlugin/typings/data.d.ts +28 -0
  51. package/dist/PanoMeasurePlugin/typings/event.type.d.ts +28 -0
  52. package/dist/PanoMeasurePlugin/typings/utils.type.d.ts +1 -0
  53. package/dist/PanoMeasurePlugin/utils/clearGroup.d.ts +2 -0
  54. package/dist/PanoMeasurePlugin/utils/constants.d.ts +4 -0
  55. package/dist/PanoMeasurePlugin/utils/distanceDom.d.ts +28 -0
  56. package/dist/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +2 -0
  57. package/dist/PanoMeasurePlugin/utils/findClosestPoint.d.ts +10 -0
  58. package/dist/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +4 -0
  59. package/dist/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +10 -0
  60. package/dist/PanoMeasurePlugin/utils/ironbox.d.ts +1 -0
  61. package/dist/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +2 -0
  62. package/dist/PanoMeasurePlugin/utils/line.d.ts +17 -0
  63. package/dist/PanoMeasurePlugin/utils/math.d.ts +17 -0
  64. package/dist/PanoMeasurePlugin/utils/mouseGroup.d.ts +2 -0
  65. package/dist/PanoMeasurePlugin/utils/ndc2Screen.d.ts +5 -0
  66. package/{plugins → dist}/PanoRulerPlugin/index.d.ts +9 -5
  67. package/dist/PanoRulerPlugin/index.js +610 -0
  68. package/dist/PanoRulerPlugin/style.d.ts +2 -0
  69. package/{plugins → dist}/PanoRulerPlugin/typings.d.ts +0 -0
  70. package/dist/PanoSpatialTagPlugin/index.d.ts +33 -0
  71. package/dist/PanoSpatialTagPlugin/index.js +1259 -0
  72. package/dist/PanoSpatialTagPlugin/store.d.ts +1 -0
  73. package/{plugins/floorplan/TopviewFloorplanPlugin → dist/PanoSpatialTagPlugin}/style.d.ts +0 -0
  74. package/dist/PanoSpatialTagPlugin/typings.d.ts +40 -0
  75. package/dist/floorplan/Assets/camera.d.ts +1 -0
  76. package/dist/floorplan/Assets/floorplanExtraObject.d.ts +1 -0
  77. package/dist/floorplan/ModelFloorplanPlugin/Assets/compass.d.ts +1 -0
  78. package/{plugins → dist}/floorplan/ModelFloorplanPlugin/Controller.d.ts +19 -14
  79. package/{plugins → dist}/floorplan/ModelFloorplanPlugin/index.d.ts +1 -1
  80. package/dist/floorplan/ModelFloorplanPlugin/index.js +3842 -0
  81. package/{plugins → dist}/floorplan/ModelFloorplanPlugin/typings/events.type.d.ts +0 -0
  82. package/{plugins → dist}/floorplan/ModelFloorplanPlugin/utils/constant.d.ts +1 -1
  83. package/{plugins → dist}/floorplan/ModelFloorplanPlugin/utils/correctFiveState.d.ts +0 -0
  84. package/{plugins → dist}/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +6 -11
  85. package/{plugins → dist}/floorplan/PanoFloorplanRadarPlugin/index.d.ts +0 -0
  86. package/dist/floorplan/PanoFloorplanRadarPlugin/index.js +1673 -0
  87. package/{plugins → dist}/floorplan/TopviewFloorplanPlugin/Controller.d.ts +18 -11
  88. package/{plugins → dist}/floorplan/TopviewFloorplanPlugin/index.d.ts +0 -0
  89. package/dist/floorplan/TopviewFloorplanPlugin/index.js +3481 -0
  90. package/{plugins/floorplan/ModelFloorplanPlugin/controller.style.d.ts → dist/floorplan/TopviewFloorplanPlugin/style.d.ts} +0 -0
  91. package/dist/floorplan/constant.d.ts +5 -0
  92. package/{plugins → dist}/floorplan/typings/floorplanData.d.ts +6 -0
  93. package/{plugins → dist}/floorplan/typings/floorplanServerData.d.ts +8 -2
  94. package/dist/floorplan/typings/utility.d.ts +2 -0
  95. package/{plugins → dist}/floorplan/utils/formatData.d.ts +3 -3
  96. package/{plugins → dist}/floorplan/utils/formatPosition.d.ts +3 -4
  97. package/dist/index.d.ts +26 -0
  98. package/dist/index.es.js +12928 -0
  99. package/dist/index.js +12967 -0
  100. package/dist/index.umd.js +12961 -0
  101. package/{shared-utils → dist/shared-utils}/Preloader.d.ts +0 -0
  102. package/{shared-utils → dist/shared-utils}/Subscribe.d.ts +3 -3
  103. package/{shared-utils → dist/shared-utils}/animationFrame/BetterTween.d.ts +0 -0
  104. package/{shared-utils → dist/shared-utils}/animationFrame/calculateProgress.d.ts +0 -0
  105. package/{shared-utils → dist/shared-utils}/animationFrame/formatRad.d.ts +0 -0
  106. package/{shared-utils → dist/shared-utils}/animationFrame/index.d.ts +0 -0
  107. package/{shared-utils → dist/shared-utils}/animationFrame/tween.d.ts +0 -0
  108. package/dist/shared-utils/changeModelCanvasOpacity.d.ts +2 -0
  109. package/{shared-utils → dist/shared-utils}/createCanvasTextTexture.d.ts +0 -0
  110. package/{shared-utils → dist/shared-utils}/createLine/index.d.ts +1 -1
  111. package/{shared-utils → dist/shared-utils}/debounce.d.ts +1 -1
  112. package/{shared-utils → dist/shared-utils}/equal.d.ts +0 -0
  113. package/{shared-utils → dist/shared-utils}/filter.d.ts +0 -0
  114. package/{shared-utils → dist/shared-utils}/five/changeMode.d.ts +0 -0
  115. package/{shared-utils → dist/shared-utils}/five/useFivePlugin.d.ts +0 -0
  116. package/{shared-utils → dist/shared-utils}/formatRad.d.ts +0 -0
  117. package/dist/shared-utils/getPxmm.d.ts +11 -0
  118. package/{shared-utils → dist/shared-utils}/getRandomColor.d.ts +0 -0
  119. package/{shared-utils → dist/shared-utils}/isNil.d.ts +0 -0
  120. package/{shared-utils → dist/shared-utils}/isTruelyObject.d.ts +0 -0
  121. package/dist/shared-utils/math/evenNumber.d.ts +3 -0
  122. package/{shared-utils → dist/shared-utils}/math/planimetry.d.ts +4 -4
  123. package/{shared-utils → dist/shared-utils}/math/rad2Deg.d.ts +0 -0
  124. package/{shared-utils → dist/shared-utils}/nearlyEqual.d.ts +0 -0
  125. package/{shared-utils → dist/shared-utils}/nextFrame.d.ts +0 -0
  126. package/{shared-utils → dist/shared-utils}/noop.d.ts +0 -0
  127. package/{shared-utils → dist/shared-utils}/object3d2LocalMatrix.d.ts +0 -0
  128. package/{shared-utils → dist/shared-utils}/px2rem.d.ts +0 -0
  129. package/dist/shared-utils/removeArrayItem.d.ts +7 -0
  130. package/{shared-utils → dist/shared-utils}/tap.d.ts +0 -0
  131. package/{shared-utils → dist/shared-utils}/three/centerPoint.d.ts +0 -0
  132. package/{shared-utils → dist/shared-utils}/three/getExtraModelLoader.d.ts +0 -0
  133. package/{shared-utils → dist/shared-utils}/three/getNormal.d.ts +0 -0
  134. package/{shared-utils → dist/shared-utils}/three/getTextureLoader.d.ts +0 -0
  135. package/{shared-utils → dist/shared-utils}/three/loadFbxObj.d.ts +0 -0
  136. package/dist/shared-utils/three/loadTexture.d.ts +2 -0
  137. package/{shared-utils → dist/shared-utils}/three/transformPositionToVector3.d.ts +0 -0
  138. package/{shared-utils → dist/shared-utils}/three/transfromToMeshBasicMaterial.d.ts +0 -0
  139. package/{shared-utils → dist/shared-utils}/throttle.d.ts +1 -1
  140. package/dist/shared-utils/tinyEJSrender.d.ts +5 -0
  141. package/{shared-utils → dist/shared-utils}/to.d.ts +0 -0
  142. package/{shared-utils → dist/shared-utils}/useDebounce.d.ts +0 -0
  143. package/{shared-utils → dist/shared-utils}/useThrottle.d.ts +0 -0
  144. package/{libs/gltf-viewer → dist/shared-utils}/uuid.d.ts +0 -0
  145. package/{shared-utils → dist/shared-utils}/vectorTocoordinates.d.ts +0 -0
  146. package/{typings → dist/typings}/math.type.d.ts +0 -0
  147. package/{typings → dist/typings}/utils.type.d.ts +0 -0
  148. package/docs/.nojekyll +1 -0
  149. package/docs/assets/highlight.css +78 -0
  150. package/docs/assets/icons.css +1043 -0
  151. package/docs/assets/icons.png +0 -0
  152. package/docs/assets/icons@2x.png +0 -0
  153. package/docs/assets/main.js +52 -0
  154. package/docs/assets/search.js +1 -0
  155. package/docs/assets/style.css +1413 -0
  156. package/docs/assets/widgets.png +0 -0
  157. package/docs/assets/widgets@2x.png +0 -0
  158. package/docs/classes/ModelRoomLabelController.html +20 -0
  159. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -0
  160. package/docs/enums/ModelFloorplanErrorType.html +1 -0
  161. package/docs/index.html +43 -0
  162. package/docs/interfaces/LineJson.html +1 -0
  163. package/docs/interfaces/ModelChassisCompassPluginData.html +1 -0
  164. package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -0
  165. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -0
  166. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -0
  167. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -0
  168. package/docs/interfaces/ModelFloorplanParameterType.html +1 -0
  169. package/docs/interfaces/ModelFloorplanViewEvent.html +5 -0
  170. package/docs/interfaces/ModelRoomLabelPluginData.html +1 -0
  171. package/docs/interfaces/PanoCompassPluginData.html +1 -0
  172. package/docs/interfaces/PanoCompassPluginParameterType.html +1 -0
  173. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +11 -0
  174. package/docs/interfaces/PanoRulerPluginExportType.html +1 -0
  175. package/docs/interfaces/PanoRulerPluginOptions.html +1 -0
  176. package/docs/interfaces/PanoRulerPluginParameterType.html +1 -0
  177. package/docs/interfaces/PanoSpatialTagPluginData.html +1 -0
  178. package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -0
  179. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -0
  180. package/docs/interfaces/PointJson.html +1 -0
  181. package/docs/interfaces/RoomLabel.html +13 -0
  182. package/docs/interfaces/TopviewFloorplanPluginParameterType.html +1 -0
  183. package/docs/modules.html +28 -0
  184. package/libs/CSS3DRenderPlugin/index.d.ts +49 -0
  185. package/libs/CSS3DRenderPlugin/index.js +179 -0
  186. package/libs/CSS3DRenderPlugin/utils/createResizeObserver.d.ts +7 -0
  187. package/libs/CSS3DRenderPlugin/utils/createResizeObserver.js +18 -0
  188. package/libs/CameraMovementPlugin/index.d.ts +7 -0
  189. package/libs/CameraMovementPlugin/index.js +159 -0
  190. package/libs/CameraMovementPlugin/typing.d.ts +68 -0
  191. package/libs/CameraMovementPlugin/typing.js +17 -0
  192. package/libs/ModelChassisCompassPlugin/index.d.ts +19 -0
  193. package/libs/ModelChassisCompassPlugin/index.js +75 -0
  194. package/libs/ModelEntryDoorGuidePlugin/index.d.ts +26 -0
  195. package/libs/ModelEntryDoorGuidePlugin/index.js +137 -0
  196. package/libs/ModelRoomLabelPlugin/Assets/roomLabelBg.d.ts +1 -0
  197. package/libs/ModelRoomLabelPlugin/Assets/roomLabelBg.js +1 -0
  198. package/libs/ModelRoomLabelPlugin/Controller.d.ts +36 -0
  199. package/libs/ModelRoomLabelPlugin/Controller.js +100 -0
  200. package/libs/ModelRoomLabelPlugin/RoomLabelItem.js +121 -0
  201. package/libs/ModelRoomLabelPlugin/RoomLabelItems.js +255 -0
  202. package/libs/ModelRoomLabelPlugin/index.d.ts +12 -0
  203. package/libs/ModelRoomLabelPlugin/index.js +9 -0
  204. package/libs/ModelRoomLabelPlugin/typings.d.ts +35 -0
  205. package/libs/ModelRoomLabelPlugin/typings.js +1 -0
  206. package/libs/ModelRoomLabelPlugin/utils/parseData.d.ts +3 -0
  207. package/libs/ModelRoomLabelPlugin/utils/parseData.js +14 -0
  208. package/libs/ModelViewPlugin/index.d.ts +17 -0
  209. package/libs/ModelViewPlugin/index.js +160 -0
  210. package/libs/PanoCompassPlugin/Assets/roomInfoIcon.d.ts +1 -0
  211. package/libs/PanoCompassPlugin/Assets/roomInfoIcon.js +1 -0
  212. package/libs/PanoCompassPlugin/getRoomInfoInstance.d.ts +8 -0
  213. package/libs/PanoCompassPlugin/getRoomInfoInstance.js +48 -0
  214. package/libs/PanoCompassPlugin/index.d.ts +51 -0
  215. package/libs/PanoCompassPlugin/index.js +171 -0
  216. package/libs/PanoCursorRaycasterPlugin/index.d.ts +48 -0
  217. package/libs/PanoCursorRaycasterPlugin/index.js +74 -0
  218. package/libs/PanoMeasurePlugin/Controller/BaseController.d.ts +36 -0
  219. package/libs/PanoMeasurePlugin/Controller/BaseController.js +69 -0
  220. package/libs/PanoMeasurePlugin/Controller/EditController.d.ts +52 -0
  221. package/libs/PanoMeasurePlugin/Controller/EditController.js +216 -0
  222. package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +12 -0
  223. package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.js +44 -0
  224. package/libs/PanoMeasurePlugin/Controller/WatchController.d.ts +25 -0
  225. package/libs/PanoMeasurePlugin/Controller/WatchController.js +223 -0
  226. package/libs/PanoMeasurePlugin/Controller/index.d.ts +61 -0
  227. package/libs/PanoMeasurePlugin/Controller/index.js +176 -0
  228. package/libs/PanoMeasurePlugin/Model/index.d.ts +38 -0
  229. package/libs/PanoMeasurePlugin/Model/index.js +114 -0
  230. package/libs/PanoMeasurePlugin/Model/line.d.ts +30 -0
  231. package/libs/PanoMeasurePlugin/Model/line.js +64 -0
  232. package/libs/PanoMeasurePlugin/Model/point.d.ts +16 -0
  233. package/libs/PanoMeasurePlugin/Model/point.js +28 -0
  234. package/libs/PanoMeasurePlugin/Model/polyline.d.ts +16 -0
  235. package/libs/PanoMeasurePlugin/Model/polyline.js +48 -0
  236. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.d.ts +2 -0
  237. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.js +15 -0
  238. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.d.ts +2 -0
  239. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.js +2 -0
  240. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.d.ts +2 -0
  241. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.js +2 -0
  242. package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +22 -0
  243. package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.js +108 -0
  244. package/libs/PanoMeasurePlugin/Modules/FiveHelper.d.ts +11 -0
  245. package/libs/PanoMeasurePlugin/Modules/FiveHelper.js +33 -0
  246. package/libs/PanoMeasurePlugin/Modules/GuideController.d.ts +18 -0
  247. package/libs/PanoMeasurePlugin/Modules/GuideController.js +75 -0
  248. package/libs/PanoMeasurePlugin/Modules/Magnifier.d.ts +24 -0
  249. package/libs/PanoMeasurePlugin/Modules/Magnifier.js +103 -0
  250. package/libs/PanoMeasurePlugin/Modules/UIController/HTML.d.ts +6 -0
  251. package/libs/PanoMeasurePlugin/Modules/UIController/HTML.js +117 -0
  252. package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +18 -0
  253. package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.js +102 -0
  254. package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +12 -0
  255. package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.js +35 -0
  256. package/libs/PanoMeasurePlugin/Modules/UIController/index.d.ts +16 -0
  257. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +69 -0
  258. package/libs/PanoMeasurePlugin/Modules/UIController/style.d.ts +17 -0
  259. package/libs/PanoMeasurePlugin/Modules/UIController/style.js +78 -0
  260. package/libs/PanoMeasurePlugin/index.d.ts +7 -0
  261. package/libs/PanoMeasurePlugin/index.js +5 -0
  262. package/libs/PanoMeasurePlugin/typings/data.d.ts +28 -0
  263. package/libs/PanoMeasurePlugin/typings/data.js +1 -0
  264. package/libs/PanoMeasurePlugin/typings/event.type.d.ts +28 -0
  265. package/libs/PanoMeasurePlugin/typings/event.type.js +1 -0
  266. package/libs/PanoMeasurePlugin/typings/utils.type.d.ts +1 -0
  267. package/libs/PanoMeasurePlugin/typings/utils.type.js +1 -0
  268. package/libs/PanoMeasurePlugin/utils/clearGroup.d.ts +2 -0
  269. package/libs/PanoMeasurePlugin/utils/clearGroup.js +3 -0
  270. package/libs/PanoMeasurePlugin/utils/constants.d.ts +4 -0
  271. package/libs/PanoMeasurePlugin/utils/constants.js +31 -0
  272. package/libs/PanoMeasurePlugin/utils/distanceDom.d.ts +28 -0
  273. package/libs/PanoMeasurePlugin/utils/distanceDom.js +114 -0
  274. package/libs/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +2 -0
  275. package/libs/PanoMeasurePlugin/utils/findAssociatedLines.js +21 -0
  276. package/libs/PanoMeasurePlugin/utils/findClosestPoint.d.ts +10 -0
  277. package/libs/PanoMeasurePlugin/utils/findClosestPoint.js +27 -0
  278. package/libs/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +4 -0
  279. package/libs/PanoMeasurePlugin/utils/getIntersectionFromEvent.js +9 -0
  280. package/libs/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +10 -0
  281. package/libs/PanoMeasurePlugin/utils/getPointFromHammerEvent.js +14 -0
  282. package/libs/PanoMeasurePlugin/utils/ironbox.d.ts +1 -0
  283. package/libs/PanoMeasurePlugin/utils/ironbox.js +1 -0
  284. package/libs/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +2 -0
  285. package/libs/PanoMeasurePlugin/utils/isNDCPointInScreen.js +6 -0
  286. package/libs/PanoMeasurePlugin/utils/line.d.ts +17 -0
  287. package/libs/PanoMeasurePlugin/utils/line.js +32 -0
  288. package/libs/PanoMeasurePlugin/utils/math.d.ts +17 -0
  289. package/libs/PanoMeasurePlugin/utils/math.js +44 -0
  290. package/libs/PanoMeasurePlugin/utils/mouseGroup.d.ts +2 -0
  291. package/libs/PanoMeasurePlugin/utils/mouseGroup.js +21 -0
  292. package/libs/PanoMeasurePlugin/utils/ndc2Screen.d.ts +5 -0
  293. package/libs/PanoMeasurePlugin/utils/ndc2Screen.js +6 -0
  294. package/libs/PanoRulerPlugin/index.d.ts +31 -0
  295. package/libs/PanoRulerPlugin/index.js +398 -0
  296. package/libs/PanoRulerPlugin/style.d.ts +2 -0
  297. package/libs/PanoRulerPlugin/style.js +88 -0
  298. package/libs/PanoRulerPlugin/typings.d.ts +21 -0
  299. package/libs/PanoRulerPlugin/typings.js +1 -0
  300. package/libs/PanoSpatialTagPlugin/Components/origins.js +168 -0
  301. package/libs/PanoSpatialTagPlugin/Components/tag.js +302 -0
  302. package/libs/PanoSpatialTagPlugin/index.d.ts +33 -0
  303. package/libs/PanoSpatialTagPlugin/index.js +411 -0
  304. package/libs/PanoSpatialTagPlugin/store.d.ts +1 -0
  305. package/libs/PanoSpatialTagPlugin/store.js +2 -0
  306. package/libs/PanoSpatialTagPlugin/style.d.ts +1 -0
  307. package/libs/PanoSpatialTagPlugin/style.js +8 -0
  308. package/libs/PanoSpatialTagPlugin/typings.d.ts +40 -0
  309. package/libs/PanoSpatialTagPlugin/typings.js +1 -0
  310. package/libs/floorplan/Assets/camera.d.ts +1 -0
  311. package/libs/floorplan/Assets/camera.js +1 -0
  312. package/libs/floorplan/Assets/floorplanExtraObject.d.ts +1 -0
  313. package/libs/floorplan/Assets/floorplanExtraObject.js +1 -0
  314. package/libs/floorplan/Components/BaseImage.js +217 -0
  315. package/libs/floorplan/Components/Normalmage.js +63 -0
  316. package/libs/floorplan/Components/RoomHighlight/Room.js +70 -0
  317. package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +289 -0
  318. package/libs/floorplan/Components/RoomMaterials/RoomMaterial.js +328 -0
  319. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.js +64 -0
  320. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.js +103 -0
  321. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.js +140 -0
  322. package/libs/floorplan/Components/SvgImage.js +83 -0
  323. package/libs/floorplan/ModelFloorplanPlugin/Assets/compass.d.ts +1 -0
  324. package/libs/floorplan/ModelFloorplanPlugin/Assets/compass.js +1 -0
  325. package/libs/floorplan/ModelFloorplanPlugin/Components/Camera.js +120 -0
  326. package/libs/floorplan/ModelFloorplanPlugin/Components/Compass.js +114 -0
  327. package/libs/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.js +463 -0
  328. package/libs/floorplan/ModelFloorplanPlugin/Components/Main.js +383 -0
  329. package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.js +171 -0
  330. package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.js +265 -0
  331. package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.js +301 -0
  332. package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleLabels.js +219 -0
  333. package/libs/floorplan/ModelFloorplanPlugin/Controller.d.ts +105 -0
  334. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +359 -0
  335. package/libs/floorplan/ModelFloorplanPlugin/index.d.ts +9 -0
  336. package/libs/floorplan/ModelFloorplanPlugin/index.js +5 -0
  337. package/libs/floorplan/ModelFloorplanPlugin/typings/events.type.d.ts +23 -0
  338. package/libs/floorplan/ModelFloorplanPlugin/typings/events.type.js +1 -0
  339. package/libs/floorplan/ModelFloorplanPlugin/utils/constant.d.ts +15 -0
  340. package/libs/floorplan/ModelFloorplanPlugin/utils/constant.js +16 -0
  341. package/libs/floorplan/ModelFloorplanPlugin/utils/correctFiveState.d.ts +14 -0
  342. package/libs/floorplan/ModelFloorplanPlugin/utils/correctFiveState.js +46 -0
  343. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.js +152 -0
  344. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.js +248 -0
  345. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.js +154 -0
  346. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.js +312 -0
  347. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +28 -0
  348. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +88 -0
  349. package/libs/floorplan/PanoFloorplanRadarPlugin/index.d.ts +8 -0
  350. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +5 -0
  351. package/libs/floorplan/TopviewFloorplanPlugin/Controller.d.ts +62 -0
  352. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +191 -0
  353. package/libs/floorplan/TopviewFloorplanPlugin/index.d.ts +5 -0
  354. package/libs/floorplan/TopviewFloorplanPlugin/index.js +5 -0
  355. package/libs/floorplan/TopviewFloorplanPlugin/style.d.ts +1 -0
  356. package/libs/floorplan/TopviewFloorplanPlugin/style.js +8 -0
  357. package/libs/floorplan/constant.d.ts +5 -0
  358. package/libs/floorplan/constant.js +6 -0
  359. package/libs/floorplan/typings/floorplanData.d.ts +137 -0
  360. package/libs/floorplan/typings/floorplanData.js +6 -0
  361. package/libs/floorplan/typings/floorplanServerData.d.ts +131 -0
  362. package/libs/floorplan/typings/floorplanServerData.js +101 -0
  363. package/libs/floorplan/typings/utility.d.ts +2 -0
  364. package/libs/floorplan/typings/utility.js +1 -0
  365. package/libs/floorplan/utils/formatData.d.ts +5 -0
  366. package/libs/floorplan/utils/formatData.js +94 -0
  367. package/libs/floorplan/utils/formatPosition.d.ts +36 -0
  368. package/libs/floorplan/utils/formatPosition.js +50 -0
  369. package/libs/index.d.ts +26 -0
  370. package/libs/index.js +16 -0
  371. package/libs/shared-utils/Preloader.d.ts +6 -0
  372. package/libs/shared-utils/Preloader.js +38 -0
  373. package/libs/shared-utils/Subscribe.d.ts +45 -0
  374. package/libs/shared-utils/Subscribe.js +101 -0
  375. package/libs/shared-utils/animationFrame/BetterTween.d.ts +11 -0
  376. package/libs/shared-utils/animationFrame/BetterTween.js +30 -0
  377. package/libs/shared-utils/animationFrame/calculateProgress.d.ts +8 -0
  378. package/libs/shared-utils/animationFrame/calculateProgress.js +23 -0
  379. package/libs/shared-utils/animationFrame/formatRad.d.ts +15 -0
  380. package/libs/shared-utils/animationFrame/formatRad.js +20 -0
  381. package/libs/shared-utils/animationFrame/index.d.ts +15 -0
  382. package/libs/shared-utils/animationFrame/index.js +48 -0
  383. package/libs/shared-utils/animationFrame/tween.d.ts +75 -0
  384. package/libs/shared-utils/animationFrame/tween.js +44 -0
  385. package/libs/shared-utils/changeModelCanvasOpacity.d.ts +2 -0
  386. package/libs/shared-utils/changeModelCanvasOpacity.js +15 -0
  387. package/libs/shared-utils/createCanvasTextTexture.d.ts +8 -0
  388. package/libs/shared-utils/createCanvasTextTexture.js +19 -0
  389. package/libs/shared-utils/createLine/index.d.ts +3 -0
  390. package/libs/shared-utils/createLine/index.js +8 -0
  391. package/libs/shared-utils/debounce.d.ts +6 -0
  392. package/libs/shared-utils/debounce.js +14 -0
  393. package/libs/shared-utils/equal.d.ts +11 -0
  394. package/libs/shared-utils/equal.js +84 -0
  395. package/libs/shared-utils/filter.d.ts +27 -0
  396. package/libs/shared-utils/filter.js +53 -0
  397. package/libs/shared-utils/five/changeMode.d.ts +2 -0
  398. package/libs/shared-utils/five/changeMode.js +15 -0
  399. package/libs/shared-utils/five/useFivePlugin.d.ts +1 -0
  400. package/libs/shared-utils/five/useFivePlugin.js +8 -0
  401. package/libs/shared-utils/formatRad.d.ts +7 -0
  402. package/libs/shared-utils/formatRad.js +10 -0
  403. package/libs/shared-utils/getPxmm.d.ts +11 -0
  404. package/libs/shared-utils/getPxmm.js +34 -0
  405. package/libs/shared-utils/getRandomColor.d.ts +1 -0
  406. package/libs/shared-utils/getRandomColor.js +10 -0
  407. package/libs/shared-utils/isNil.d.ts +10 -0
  408. package/libs/shared-utils/isNil.js +14 -0
  409. package/libs/shared-utils/isTruelyObject.d.ts +18 -0
  410. package/libs/shared-utils/isTruelyObject.js +20 -0
  411. package/libs/shared-utils/math/evenNumber.d.ts +3 -0
  412. package/libs/shared-utils/math/evenNumber.js +4 -0
  413. package/libs/shared-utils/math/planimetry.d.ts +116 -0
  414. package/libs/shared-utils/math/planimetry.js +288 -0
  415. package/libs/shared-utils/math/rad2Deg.d.ts +1 -0
  416. package/libs/shared-utils/math/rad2Deg.js +3 -0
  417. package/libs/shared-utils/nearlyEqual.d.ts +7 -0
  418. package/libs/shared-utils/nearlyEqual.js +9 -0
  419. package/libs/shared-utils/nextFrame.d.ts +1 -0
  420. package/libs/shared-utils/nextFrame.js +6 -0
  421. package/libs/shared-utils/noop.d.ts +5 -0
  422. package/libs/shared-utils/noop.js +7 -0
  423. package/libs/shared-utils/object3d2LocalMatrix.d.ts +12 -0
  424. package/libs/shared-utils/object3d2LocalMatrix.js +29 -0
  425. package/libs/shared-utils/px2rem.d.ts +1 -0
  426. package/libs/shared-utils/px2rem.js +4 -0
  427. package/libs/shared-utils/removeArrayItem.d.ts +7 -0
  428. package/libs/shared-utils/removeArrayItem.js +12 -0
  429. package/libs/shared-utils/tap.d.ts +8 -0
  430. package/{shared-utils → libs/shared-utils}/tap.js +4 -13
  431. package/libs/shared-utils/three/centerPoint.d.ts +2 -0
  432. package/libs/shared-utils/three/centerPoint.js +4 -0
  433. package/libs/shared-utils/three/getExtraModelLoader.d.ts +6 -0
  434. package/libs/shared-utils/three/getExtraModelLoader.js +18 -0
  435. package/libs/shared-utils/three/getNormal.d.ts +2 -0
  436. package/libs/shared-utils/three/getNormal.js +6 -0
  437. package/libs/shared-utils/three/getTextureLoader.d.ts +6 -0
  438. package/libs/shared-utils/three/getTextureLoader.js +17 -0
  439. package/libs/shared-utils/three/loadFbxObj.d.ts +2 -0
  440. package/libs/shared-utils/three/loadFbxObj.js +13 -0
  441. package/libs/shared-utils/three/loadTexture.d.ts +2 -0
  442. package/libs/shared-utils/three/loadTexture.js +10 -0
  443. package/libs/shared-utils/three/transformPositionToVector3.d.ts +7 -0
  444. package/libs/shared-utils/three/transformPositionToVector3.js +3 -0
  445. package/libs/shared-utils/three/transfromToMeshBasicMaterial.d.ts +2 -0
  446. package/libs/shared-utils/three/transfromToMeshBasicMaterial.js +14 -0
  447. package/libs/shared-utils/throttle.d.ts +7 -0
  448. package/libs/shared-utils/throttle.js +18 -0
  449. package/libs/shared-utils/tinyEJSrender.d.ts +5 -0
  450. package/libs/shared-utils/tinyEJSrender.js +180 -0
  451. package/libs/shared-utils/to.d.ts +8 -0
  452. package/libs/shared-utils/to.js +18 -0
  453. package/libs/shared-utils/useDebounce.d.ts +8 -0
  454. package/libs/shared-utils/useDebounce.js +22 -0
  455. package/libs/shared-utils/useThrottle.d.ts +8 -0
  456. package/libs/shared-utils/useThrottle.js +25 -0
  457. package/{shared-utils → libs/shared-utils}/uuid.d.ts +0 -0
  458. package/libs/shared-utils/uuid.js +11 -0
  459. package/libs/shared-utils/vectorTocoordinates.d.ts +7 -0
  460. package/libs/shared-utils/vectorTocoordinates.js +9 -0
  461. package/libs/typings/math.type.d.ts +44 -0
  462. package/libs/typings/math.type.js +1 -0
  463. package/libs/typings/utils.type.d.ts +2 -0
  464. package/libs/typings/utils.type.js +1 -0
  465. package/package.json +55 -17
  466. package/components/ARVideoFigure/ARVideoFigureMesh.d.ts +0 -44
  467. package/components/ARVideoFigure/ARVideoFigureMesh.js +0 -371
  468. package/components/ARVideoFigure/ARVideoFigureScene.d.ts +0 -11
  469. package/components/ARVideoFigure/ARVideoFigureScene.js +0 -85
  470. package/components/ARVideoFigure/ImgBgTransparent.d.ts +0 -16
  471. package/components/ARVideoFigure/ImgBgTransparent.js +0 -65
  472. package/components/ARVideoFigure/ImgBgTransparentMesh.d.ts +0 -30
  473. package/components/ARVideoFigure/ImgBgTransparentMesh.js +0 -183
  474. package/components/ARVideoFigure/fragmentShader.d.ts +0 -5
  475. package/components/ARVideoFigure/fragmentShader.js +0 -18
  476. package/components/ARVideoFigure/index.d.ts +0 -15
  477. package/components/ARVideoFigure/index.js +0 -80
  478. package/components/ARVideoFigure/vertexShader.d.ts +0 -1
  479. package/components/ARVideoFigure/vertexShader.js +0 -10
  480. package/components/GLTFView/index.d.ts +0 -72
  481. package/components/GLTFView/index.js +0 -149
  482. package/components/GlassFilters/index.d.ts +0 -32
  483. package/components/GlassFilters/index.js +0 -78
  484. package/components/ModelView/ModelViewController.d.ts +0 -18
  485. package/components/ModelView/ModelViewController.js +0 -157
  486. package/components/ModelView/index.d.ts +0 -10
  487. package/components/ModelView/index.js +0 -24
  488. package/components/PaintBrush/index.d.ts +0 -16
  489. package/components/PaintBrush/index.js +0 -47
  490. package/components/PanoTag/index.d.ts +0 -4
  491. package/components/PanoTag/index.js +0 -13
  492. package/custom.d.js +0 -3
  493. package/data/1aGKl9JmrlXMXx8d.d.ts +0 -104
  494. package/data/1aGKl9JmrlXMXx8d.js +0 -537
  495. package/data/54djM0oR6ky3Ey8e.d.ts +0 -55
  496. package/data/54djM0oR6ky3Ey8e.js +0 -350
  497. package/data/6gyq3v1verxD7JO1.d.ts +0 -104
  498. package/data/6gyq3v1verxD7JO1.js +0 -462
  499. package/data/8054djM0oR6ky3Ey8e.d.ts +0 -55
  500. package/data/8054djM0oR6ky3Ey8e.js +0 -350
  501. package/data/KpokNd82rwjhackhQTBEoYKHg8zGbPXe.d.ts +0 -84
  502. package/data/KpokNd82rwjhackhQTBEoYKHg8zGbPXe.js +0 -600
  503. package/data/PrXel3aqGbp34JQn.d.ts +0 -389
  504. package/data/PrXel3aqGbp34JQn.js +0 -4649
  505. package/data/XJ6NMLWnkAY3Rdx8.d.ts +0 -843
  506. package/data/XJ6NMLWnkAY3Rdx8.js +0 -7989
  507. package/data/YdoNP9K4rwQDwjJr.d.ts +0 -83
  508. package/data/YdoNP9K4rwQDwjJr.js +0 -1453
  509. package/data/ZLvK29zj4L29Jowd.d.ts +0 -55
  510. package/data/ZLvK29zj4L29Jowd.js +0 -372
  511. package/data/auto3d-njL5J99VwCmnjtQElOmXQr.d.ts +0 -86
  512. package/data/auto3d-njL5J99VwCmnjtQElOmXQr.js +0 -711
  513. package/data/extrude-walls/ZLvK29zj4L29Jowd.d.ts +0 -5
  514. package/data/extrude-walls/ZLvK29zj4L29Jowd.js +0 -14
  515. package/data/extrude-walls/lo024DEgzanMj5BE.d.ts +0 -5
  516. package/data/extrude-walls/lo024DEgzanMj5BE.js +0 -14
  517. package/data/jd6oMOzPxnQ3BvxY_B7yw51J9rXlhYhjhGTOgRVqu6WeEqjNX.d.ts +0 -85
  518. package/data/jd6oMOzPxnQ3BvxY_B7yw51J9rXlhYhjhGTOgRVqu6WeEqjNX.js +0 -511
  519. package/data/lo024DEgzanMj5BE.d.ts +0 -55
  520. package/data/lo024DEgzanMj5BE.js +0 -966
  521. package/data/oPzy3ApbjjpD8YdR.d.ts +0 -83
  522. package/data/oPzy3ApbjjpD8YdR.js +0 -283
  523. package/data/qjAxMG4XbPn96wKG.d.ts +0 -104
  524. package/data/qjAxMG4XbPn96wKG.js +0 -637
  525. package/data/rXel3aPQRRBD4JQn.d.ts +0 -86
  526. package/data/rXel3aPQRRBD4JQn.js +0 -622
  527. package/data/vLykj3NWrllMrG06.d.ts +0 -91
  528. package/data/vLykj3NWrllMrG06.js +0 -2729
  529. package/data/wz0QV9KA4ugyo9ME.d.ts +0 -39
  530. package/data/wz0QV9KA4ugyo9ME.js +0 -136
  531. package/data/zxMawr9raSg8LYjG.d.ts +0 -53
  532. package/data/zxMawr9raSg8LYjG.js +0 -590
  533. package/examples/FiveStateController/index.js +0 -134
  534. package/examples/VRHouse/Mobile.js +0 -36
  535. package/examples/VRHouse/PC.js +0 -36
  536. package/examples/VRHouse/index.js +0 -36
  537. package/index.d.ts +0 -15
  538. package/index.js +0 -45
  539. package/libs/gltf-viewer/Subscribe.d.ts +0 -76
  540. package/libs/gltf-viewer/Subscribe.js +0 -231
  541. package/libs/gltf-viewer/coordsMoveByOffset.d.ts +0 -13
  542. package/libs/gltf-viewer/coordsMoveByOffset.js +0 -22
  543. package/libs/gltf-viewer/coordsToDirection.d.ts +0 -5
  544. package/libs/gltf-viewer/coordsToDirection.js +0 -41
  545. package/libs/gltf-viewer/formatRad.d.ts +0 -1
  546. package/libs/gltf-viewer/formatRad.js +0 -13
  547. package/libs/gltf-viewer/getFrameTime.d.ts +0 -1
  548. package/libs/gltf-viewer/getFrameTime.js +0 -28
  549. package/libs/gltf-viewer/index.d.ts +0 -55
  550. package/libs/gltf-viewer/index.js +0 -650
  551. package/libs/gltf-viewer/mouseWheel.d.ts +0 -2
  552. package/libs/gltf-viewer/mouseWheel.js +0 -59
  553. package/libs/gltf-viewer/requestAnimationFrame.d.ts +0 -1
  554. package/libs/gltf-viewer/requestAnimationFrame.js +0 -18
  555. package/libs/gltf-viewer/requestAnimationFrameInterval.d.ts +0 -1
  556. package/libs/gltf-viewer/requestAnimationFrameInterval.js +0 -31
  557. package/libs/gltf-viewer/uuid.js +0 -28
  558. package/plugins/AutoPreloadPlugin/index.d.ts +0 -23
  559. package/plugins/AutoPreloadPlugin/index.js +0 -111
  560. package/plugins/CSS3DRenderPlugin/components/Marker/index.d.ts +0 -12
  561. package/plugins/CSS3DRenderPlugin/components/Marker/index.js +0 -121
  562. package/plugins/CSS3DRenderPlugin/index.js +0 -298
  563. package/plugins/CameraMovementPlugin/index.js +0 -362
  564. package/plugins/CameraMovementPlugin/typing.js +0 -37
  565. package/plugins/ModelChassisCompassPlugin/index.js +0 -157
  566. package/plugins/ModelEntryDoorGuidePlugin/index.js +0 -247
  567. package/plugins/ModelExtrudeWallsPlugin/index.d.ts +0 -16
  568. package/plugins/ModelExtrudeWallsPlugin/index.js +0 -252
  569. package/plugins/ModelRoomLabelPlugin/Controller.js +0 -153
  570. package/plugins/ModelRoomLabelPlugin/RoomLabelItem.d.ts +0 -8
  571. package/plugins/ModelRoomLabelPlugin/RoomLabelItem.js +0 -66
  572. package/plugins/ModelRoomLabelPlugin/RoomLabelItems.d.ts +0 -7
  573. package/plugins/ModelRoomLabelPlugin/RoomLabelItems.js +0 -159
  574. package/plugins/ModelRoomLabelPlugin/index.d.ts +0 -8
  575. package/plugins/ModelRoomLabelPlugin/index.js +0 -18
  576. package/plugins/ModelRoomLabelPlugin/typings.js +0 -7
  577. package/plugins/ModelRoomLabelPlugin/utils/parseData.js +0 -35
  578. package/plugins/ModelTVVideoPlugin/index.d.ts +0 -21
  579. package/plugins/ModelTVVideoPlugin/index.js +0 -397
  580. package/plugins/ModelViewPlugin/index.js +0 -223
  581. package/plugins/PanoCursorRaycasterPlugin/PanoCursorRaycasterPluginUsage.d.ts +0 -48
  582. package/plugins/PanoCursorRaycasterPlugin/components/MovePointTowardsCamera.d.ts +0 -9
  583. package/plugins/PanoCursorRaycasterPlugin/components/MovePointTowardsCamera.js +0 -117
  584. package/plugins/PanoCursorRaycasterPlugin/components/PointAxesHelper.d.ts +0 -11
  585. package/plugins/PanoCursorRaycasterPlugin/components/PointAxesHelper.js +0 -39
  586. package/plugins/PanoCursorRaycasterPlugin/index.js +0 -126
  587. package/plugins/PanoCursorRaycasterPlugin/utils/addLineToFive.d.ts +0 -5
  588. package/plugins/PanoCursorRaycasterPlugin/utils/addLineToFive.js +0 -27
  589. package/plugins/PanoCursorRaycasterPlugin/utils/createLine.d.ts +0 -3
  590. package/plugins/PanoCursorRaycasterPlugin/utils/createLine.js +0 -48
  591. package/plugins/PanoDoorLabelPlugin/index.d.ts +0 -4
  592. package/plugins/PanoDoorLabelPlugin/index.js +0 -14
  593. package/plugins/PanoIRobotPlugin/index.d.ts +0 -10
  594. package/plugins/PanoIRobotPlugin/index.js +0 -18
  595. package/plugins/PanoMaskSelectorPlugin/compare.d.ts +0 -1
  596. package/plugins/PanoMaskSelectorPlugin/compare.js +0 -17
  597. package/plugins/PanoMaskSelectorPlugin/createBox.d.ts +0 -7
  598. package/plugins/PanoMaskSelectorPlugin/createBox.js +0 -79
  599. package/plugins/PanoMaskSelectorPlugin/createTextures.d.ts +0 -3
  600. package/plugins/PanoMaskSelectorPlugin/createTextures.js +0 -45
  601. package/plugins/PanoMaskSelectorPlugin/fragmentShader.d.ts +0 -1
  602. package/plugins/PanoMaskSelectorPlugin/fragmentShader.js +0 -10
  603. package/plugins/PanoMaskSelectorPlugin/index.d.ts +0 -49
  604. package/plugins/PanoMaskSelectorPlugin/index.js +0 -348
  605. package/plugins/PanoMaskSelectorPlugin/vertexShader.d.ts +0 -1
  606. package/plugins/PanoMaskSelectorPlugin/vertexShader.js +0 -10
  607. package/plugins/PanoRulerPlugin/data/roomInfo.d.ts +0 -3
  608. package/plugins/PanoRulerPlugin/data/roomInfo.js +0 -51
  609. package/plugins/PanoRulerPlugin/data/roomRules.d.ts +0 -3
  610. package/plugins/PanoRulerPlugin/data/roomRules.js +0 -235
  611. package/plugins/PanoRulerPlugin/index.js +0 -637
  612. package/plugins/PanoRulerPlugin/typings.js +0 -7
  613. package/plugins/PanoTVVideoPlugin/index.d.ts +0 -26
  614. package/plugins/PanoTVVideoPlugin/index.js +0 -433
  615. package/plugins/TreasurePlugin/Controller.d.ts +0 -73
  616. package/plugins/TreasurePlugin/Controller.js +0 -250
  617. package/plugins/TreasurePlugin/TreasureFaceAnime.d.ts +0 -25
  618. package/plugins/TreasurePlugin/TreasureFaceAnime.js +0 -143
  619. package/plugins/TreasurePlugin/TreasureObject.d.ts +0 -53
  620. package/plugins/TreasurePlugin/TreasureObject.js +0 -406
  621. package/plugins/TreasurePlugin/TreasureOpenAnime.d.ts +0 -25
  622. package/plugins/TreasurePlugin/TreasureOpenAnime.js +0 -127
  623. package/plugins/TreasurePlugin/constants.d.ts +0 -33
  624. package/plugins/TreasurePlugin/constants.js +0 -67
  625. package/plugins/TreasurePlugin/index.d.ts +0 -11
  626. package/plugins/TreasurePlugin/index.js +0 -26
  627. package/plugins/TreasurePlugin/typings.d.ts +0 -2
  628. package/plugins/TreasurePlugin/typings.js +0 -7
  629. package/plugins/floorplan/Assets/floorplanExtraObject.d.ts +0 -1
  630. package/plugins/floorplan/Assets/floorplanExtraObject.js +0 -10
  631. package/plugins/floorplan/ModelFloorplanPlugin/Controller.js +0 -626
  632. package/plugins/floorplan/ModelFloorplanPlugin/components/Camera.d.ts +0 -13
  633. package/plugins/floorplan/ModelFloorplanPlugin/components/Camera.js +0 -78
  634. package/plugins/floorplan/ModelFloorplanPlugin/components/Compass.d.ts +0 -5
  635. package/plugins/floorplan/ModelFloorplanPlugin/components/Compass.js +0 -84
  636. package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomHighlight.d.ts +0 -10
  637. package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomHighlight.js +0 -129
  638. package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomLabels.d.ts +0 -13
  639. package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomLabels.js +0 -118
  640. package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/index.d.ts +0 -13
  641. package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/index.js +0 -62
  642. package/plugins/floorplan/ModelFloorplanPlugin/components/index.d.ts +0 -20
  643. package/plugins/floorplan/ModelFloorplanPlugin/components/index.js +0 -88
  644. package/plugins/floorplan/ModelFloorplanPlugin/controller.style.js +0 -16
  645. package/plugins/floorplan/ModelFloorplanPlugin/index.js +0 -20
  646. package/plugins/floorplan/ModelFloorplanPlugin/typings/events.type.js +0 -7
  647. package/plugins/floorplan/ModelFloorplanPlugin/utils/constant.js +0 -33
  648. package/plugins/floorplan/ModelFloorplanPlugin/utils/correctFiveState.js +0 -154
  649. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/Camera.d.ts +0 -13
  650. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/Camera.js +0 -113
  651. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/Camera.style.d.ts +0 -3
  652. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/Camera.style.js +0 -39
  653. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/ExtraObjects.d.ts +0 -5
  654. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/ExtraObjects.js +0 -66
  655. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/RoomHighlight.d.ts +0 -9
  656. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/RoomHighlight.js +0 -126
  657. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/index.d.ts +0 -11
  658. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/index.js +0 -58
  659. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/index.d.ts +0 -17
  660. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/index.js +0 -85
  661. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/index.style.d.ts +0 -2
  662. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/index.style.js +0 -15
  663. package/plugins/floorplan/PanoFloorplanRadarPlugin/Controller.js +0 -211
  664. package/plugins/floorplan/PanoFloorplanRadarPlugin/index.js +0 -20
  665. package/plugins/floorplan/TopviewFloorplanPlugin/Controller.js +0 -262
  666. package/plugins/floorplan/TopviewFloorplanPlugin/index.js +0 -18
  667. package/plugins/floorplan/TopviewFloorplanPlugin/style.js +0 -16
  668. package/plugins/floorplan/components/FloorplanImage.d.ts +0 -7
  669. package/plugins/floorplan/components/FloorplanImage.js +0 -90
  670. package/plugins/floorplan/typings/floorplanData.js +0 -7
  671. package/plugins/floorplan/typings/floorplanServerData.js +0 -382
  672. package/plugins/floorplan/utils/formatData.js +0 -217
  673. package/plugins/floorplan/utils/formatPosition.js +0 -89
  674. package/shared-utils/Preloader.js +0 -57
  675. package/shared-utils/Subscribe.js +0 -230
  676. package/shared-utils/animationFrame/BetterTween.js +0 -103
  677. package/shared-utils/animationFrame/calculateProgress.js +0 -40
  678. package/shared-utils/animationFrame/formatRad.js +0 -36
  679. package/shared-utils/animationFrame/index.js +0 -81
  680. package/shared-utils/animationFrame/tween.js +0 -92
  681. package/shared-utils/changeModelCanvansOpacity.d.ts +0 -2
  682. package/shared-utils/changeModelCanvansOpacity.js +0 -38
  683. package/shared-utils/createCanvasTextTexture.js +0 -31
  684. package/shared-utils/createFiveContainer.d.ts +0 -10
  685. package/shared-utils/createFiveContainer.js +0 -171
  686. package/shared-utils/createLine/index.js +0 -43
  687. package/shared-utils/debounce.js +0 -30
  688. package/shared-utils/equal.js +0 -107
  689. package/shared-utils/filter.js +0 -127
  690. package/shared-utils/five/changeMode.js +0 -82
  691. package/shared-utils/five/useFivePlugin.js +0 -17
  692. package/shared-utils/formatRad.js +0 -18
  693. package/shared-utils/getPxmm.d.ts +0 -6
  694. package/shared-utils/getPxmm.js +0 -51
  695. package/shared-utils/getRandomColor.js +0 -23
  696. package/shared-utils/isNil.js +0 -26
  697. package/shared-utils/isTruelyObject.js +0 -31
  698. package/shared-utils/math/evenNumber.d.ts +0 -1
  699. package/shared-utils/math/evenNumber.js +0 -13
  700. package/shared-utils/math/planimetry.js +0 -352
  701. package/shared-utils/math/rad2Deg.js +0 -12
  702. package/shared-utils/nearlyEqual.js +0 -19
  703. package/shared-utils/nextFrame.js +0 -15
  704. package/shared-utils/noop.js +0 -19
  705. package/shared-utils/object3d2LocalMatrix.js +0 -79
  706. package/shared-utils/px2rem.js +0 -22
  707. package/shared-utils/three/centerPoint.js +0 -14
  708. package/shared-utils/three/getExtraModelLoader.js +0 -45
  709. package/shared-utils/three/getNormal.js +0 -17
  710. package/shared-utils/three/getTextureLoader.js +0 -50
  711. package/shared-utils/three/loadFbxObj.js +0 -54
  712. package/shared-utils/three/loadTexture.d.ts +0 -2
  713. package/shared-utils/three/loadTexture.js +0 -46
  714. package/shared-utils/three/transformPositionToVector3.js +0 -20
  715. package/shared-utils/three/transfromToMeshBasicMaterial.js +0 -33
  716. package/shared-utils/throttle.js +0 -29
  717. package/shared-utils/to.js +0 -67
  718. package/shared-utils/useDebounce.js +0 -49
  719. package/shared-utils/useThrottle.js +0 -47
  720. package/shared-utils/uuid.js +0 -28
  721. package/shared-utils/vectorTocoordinates.js +0 -18
  722. package/typedoc/components.d.ts +0 -6
  723. package/typedoc/components.js +0 -7
  724. package/typedoc/plugins.d.ts +0 -19
  725. package/typedoc/plugins.js +0 -165
  726. package/typedoc/shared-utils.d.ts +0 -3
  727. package/typedoc/shared-utils.js +0 -7
  728. package/typedoc/typings.d.ts +0 -3
  729. package/typedoc/typings.js +0 -7
  730. package/typings/math.type.js +0 -7
  731. package/typings/utils.type.js +0 -7
@@ -0,0 +1,3481 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var THREE = require('three');
6
+ var internal = require('svelte/internal');
7
+ var easing = require('svelte/easing');
8
+ var transition = require('svelte/transition');
9
+
10
+ function _interopNamespace(e) {
11
+ if (e && e.__esModule) return e;
12
+ var n = Object.create(null);
13
+ if (e) {
14
+ Object.keys(e).forEach(function (k) {
15
+ if (k !== 'default') {
16
+ var d = Object.getOwnPropertyDescriptor(e, k);
17
+ Object.defineProperty(n, k, d.get ? d : {
18
+ enumerable: true,
19
+ get: function () { return e[k]; }
20
+ });
21
+ }
22
+ });
23
+ }
24
+ n["default"] = e;
25
+ return Object.freeze(n);
26
+ }
27
+
28
+ var THREE__namespace = /*#__PURE__*/_interopNamespace(THREE);
29
+
30
+ const pluginStyle = {
31
+ position: 'absolute',
32
+ left: '50%',
33
+ top: '50%',
34
+ transform: 'translate(-50%, -50%)',
35
+ pointerEvents: 'none',
36
+ zIndex: '10',
37
+ };
38
+
39
+ function pathD(points, options = {}) {
40
+ let d = '';
41
+ const { needZ, needA } = options;
42
+ const _points = needZ ? points.slice().concat(points[0]) : points.slice();
43
+ _points.forEach((_point, index) => {
44
+ const { x, y } = options.format ? options.format(_point) : _point;
45
+ const point = x + ',' + y;
46
+ if (index === 0) {
47
+ d += 'M' + point;
48
+ return d;
49
+ }
50
+ if (needA?.[index]) {
51
+ d += 'A' + needA[index] + ',' + point;
52
+ return d;
53
+ }
54
+ d += 'L' + point;
55
+ return d;
56
+ });
57
+ return d + (needZ ? 'Z' : '');
58
+ }
59
+ /** 把户型图上点点位转换到 SVG 上的点位 */
60
+ function formatFloorplanPoint({ x, y }, pxmm, bounding) {
61
+ const { max, min } = bounding;
62
+ return { x: (x - min.x) * pxmm, y: (max.y - y) * pxmm };
63
+ }
64
+
65
+ async function formatOutlines(outlines) {
66
+ const headers = new Headers({ 'Content-Type': 'text/plain' });
67
+ const getOutlineItem = async function (item) {
68
+ const outlineItem = {
69
+ index: item.index,
70
+ url: item.url,
71
+ svgUrl: item.svg_url,
72
+ };
73
+ if (item.svg_url) {
74
+ const svgContent = await fetch(item.svg_url, { headers }).then((res) => res.text());
75
+ outlineItem.svgContent = svgContent;
76
+ }
77
+ return outlineItem;
78
+ };
79
+ const svgOutlineItems = await Promise.all(outlines.map(getOutlineItem));
80
+ return svgOutlineItems;
81
+ }
82
+ function formatRoom(data) {
83
+ const floorplanRoomItem = {
84
+ id: data.id,
85
+ size: data.size,
86
+ name: data.name,
87
+ path: data.path,
88
+ roomType: data.room_type,
89
+ floorType: data.floor_type,
90
+ roomLabel: {
91
+ position: data.room_label.position,
92
+ positionInImage: data.room_label.position_in_image,
93
+ },
94
+ observerIndexs: data.observer_indexs,
95
+ };
96
+ return floorplanRoomItem;
97
+ }
98
+ function formatFloorData(_data) {
99
+ return {
100
+ floorName: _data.floor_name,
101
+ floorIndex: _data.floor_index,
102
+ rooms: _data.rooms.map(formatRoom),
103
+ rules: _data.rules,
104
+ };
105
+ }
106
+ function formateFloorplanObserver(data) {
107
+ const floorplanObserver = {
108
+ index: data.index,
109
+ floorIndex: data.floor_index,
110
+ position: data.position,
111
+ positionInImage: data.position_in_image,
112
+ };
113
+ return floorplanObserver;
114
+ }
115
+ function formatFloorplanEntrance(data) {
116
+ const floorplanEntrance = {
117
+ rad: data.rad,
118
+ position: data.position,
119
+ positionInImage: data.position_in_image,
120
+ northRad: data.north_rad,
121
+ roomId: data.room_id,
122
+ floorIndex: data.floor_index,
123
+ };
124
+ return floorplanEntrance;
125
+ }
126
+ async function formatData(data) {
127
+ const outlines = await formatOutlines(data.outlines);
128
+ const bounding = data.computed_data.bounding;
129
+ const floorDatas = data.computed_data.floor_datas.map(formatFloorData);
130
+ const entrance = data.computed_data.entrance ? formatFloorplanEntrance(data.computed_data.entrance) : null;
131
+ const floorplanData = {
132
+ outlines,
133
+ entrance,
134
+ bounding,
135
+ floorDatas,
136
+ observers: data.computed_data.observers.map(formateFloorplanObserver),
137
+ };
138
+ return floorplanData;
139
+ }
140
+
141
+ /**
142
+ * 把第一个参数传入第二个参数(函数)中并执行
143
+ * 一般用于执行函数后返回变量。
144
+ * @param {any} something
145
+ * @param {function} callback
146
+ * @return {any}
147
+ */
148
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
149
+ function tap(something, callback) {
150
+ callback(something);
151
+ return something;
152
+ }
153
+
154
+ /**
155
+ * 过滤掉不需要的对象字段函数:实现从一个对象中排除某些指定属性后生成的新对象。
156
+ * @param object
157
+ * @param props 排除的属性
158
+ * @return
159
+ */
160
+ function omit(object, props) {
161
+ return tap({}, (result) => {
162
+ for (const name in object) {
163
+ if (props.indexOf(name) !== -1)
164
+ continue;
165
+ result[name] = object[name];
166
+ }
167
+ });
168
+ }
169
+
170
+ var FLOOR_PLAN_ATTACHED_TO;
171
+ (function (FLOOR_PLAN_ATTACHED_TO) {
172
+ FLOOR_PLAN_ATTACHED_TO[FLOOR_PLAN_ATTACHED_TO["FLOOR"] = 1] = "FLOOR";
173
+ FLOOR_PLAN_ATTACHED_TO[FLOOR_PLAN_ATTACHED_TO["CEILING"] = 2] = "CEILING";
174
+ FLOOR_PLAN_ATTACHED_TO[FLOOR_PLAN_ATTACHED_TO["BOUNDING_CENTER"] = 3] = "BOUNDING_CENTER";
175
+ })(FLOOR_PLAN_ATTACHED_TO || (FLOOR_PLAN_ATTACHED_TO = {}));
176
+
177
+ /**
178
+ * 获取「在俯视图」状态下,模型 mm 与屏幕像素 px 的对应关系,即每 mm 对应多少 px
179
+ * @param five five
180
+ */
181
+ function getPxmm(five, container, floorIndex, options) {
182
+ const maxFloorIndex = Math.max(...five.work.observers.map((ob) => ob.floorIndex));
183
+ function getFloorY(floorIndex) {
184
+ return floorIndex > maxFloorIndex
185
+ ? five.model.bounding.max.y
186
+ : Math.max(...five.work.observers
187
+ .filter((ob) => ob.floorIndex === floorIndex)
188
+ .map((ob) => ob.standingPosition.y));
189
+ }
190
+ function getY() {
191
+ const currentFloorY = getFloorY(floorIndex);
192
+ const nextFloorY = getFloorY(floorIndex + 1);
193
+ const attachedTo = options?.attachedTo || FLOOR_PLAN_ATTACHED_TO.BOUNDING_CENTER;
194
+ if (attachedTo === FLOOR_PLAN_ATTACHED_TO.BOUNDING_CENTER)
195
+ return (five.model.bounding.max.y + five.model.bounding.min.y) / 2;
196
+ else if (attachedTo === FLOOR_PLAN_ATTACHED_TO.CEILING)
197
+ return nextFloorY;
198
+ else
199
+ return currentFloorY;
200
+ }
201
+ const y = getY();
202
+ const originPosition = new THREE__namespace.Vector3(0, y, 0);
203
+ const originPositionXUnit = new THREE__namespace.Vector3(1, y, 0);
204
+ const mouse = originPosition.clone().project(five.camera);
205
+ const xUnitMouse = originPositionXUnit.clone().project(five.camera);
206
+ const pxmm = Math.abs((xUnitMouse.x - mouse.x) / 1000) * (container.getBoundingClientRect().width / 2);
207
+ return pxmm;
208
+ }
209
+
210
+ const CAMERA_IMAGE = 'data:image/png;base64,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';
211
+
212
+ function rad2Deg$1(rad) {
213
+ return (rad * 180) / Math.PI;
214
+ }
215
+
216
+ /* src/floorplan/ModelFloorplanPlugin/Components/Camera.svelte generated by Svelte v3.47.0 */
217
+
218
+ function add_css$c(target) {
219
+ internal.append_styles(target, "svelte-e8a2kn", ".floorplan__camera-position.svelte-e8a2kn{position:absolute;width:0;height:0}.floorplan__camera-rotate.svelte-e8a2kn{position:absolute;background-repeat:no-repeat;background-size:100%}");
220
+ }
221
+
222
+ function create_fragment$g(ctx) {
223
+ let div1;
224
+ let div0;
225
+
226
+ return {
227
+ c() {
228
+ div1 = internal.element("div");
229
+ div0 = internal.element("div");
230
+ internal.attr(div0, "class", "floorplan__camera-rotate svelte-e8a2kn");
231
+ internal.set_style(div0, "background-image", `url(${/*cameraImageUrl*/ ctx[0] || CAMERA_IMAGE})`);
232
+ internal.set_style(div0, "width", /*domSizeStyle*/ ctx[4], false);
233
+ internal.set_style(div0, "height", /*domSizeStyle*/ ctx[4], false);
234
+ internal.set_style(div0, "left", '-' + /*domSizeStyle*/ ctx[4], false);
235
+ internal.set_style(div0, "top", '-' + /*domSizeStyle*/ ctx[4], false);
236
+ internal.set_style(div0, "transform", `rotate(${/*rotate*/ ctx[3]}deg)`, false);
237
+ internal.set_style(div0, "transform-origin", `${/*domSizeStyle*/ ctx[4]} ${/*domSizeStyle*/ ctx[4]}`, false);
238
+ internal.attr(div1, "class", "floorplan__camera-position svelte-e8a2kn");
239
+ internal.set_style(div1, "left", /*positionLeft*/ ctx[1], false);
240
+ internal.set_style(div1, "top", /*positionTop*/ ctx[2], false);
241
+ },
242
+ m(target, anchor) {
243
+ internal.insert(target, div1, anchor);
244
+ internal.append(div1, div0);
245
+ },
246
+ p(ctx, [dirty]) {
247
+ if (dirty & /*cameraImageUrl*/ 1) {
248
+ internal.set_style(div0, "background-image", `url(${/*cameraImageUrl*/ ctx[0] || CAMERA_IMAGE})`);
249
+ }
250
+ },
251
+ i: internal.noop,
252
+ o: internal.noop,
253
+ d(detaching) {
254
+ if (detaching) internal.detach(div1);
255
+ }
256
+ };
257
+ }
258
+
259
+ function instance$g($$self, $$props, $$invalidate) {
260
+ let { panoIndex } = $$props;
261
+ let { floorplanData } = $$props;
262
+ let { lastPanoramaLongitude } = $$props;
263
+ let { cameraImageUrl } = $$props;
264
+ const { observers } = floorplanData;
265
+ const observer = observers[panoIndex];
266
+ const leftRatio = observer.positionInImage.x;
267
+ const topRatio = observer.positionInImage.y;
268
+ const positionLeft = leftRatio * 100 + '%';
269
+ const positionTop = topRatio * 100 + '%';
270
+ const rotate = -rad2Deg$1(lastPanoramaLongitude) + 45;
271
+
272
+ // TODO: 统一这里的判断条件,目前写了多处
273
+ const bodyWidth = document.body.clientWidth;
274
+
275
+ const bodyHeight = document.body.clientHeight;
276
+ const size = bodyWidth < 500 || bodyHeight < 500 ? 17 : 37;
277
+ const domSizeStyle = `${size / 16}rem`;
278
+
279
+ $$self.$$set = $$props => {
280
+ if ('panoIndex' in $$props) $$invalidate(5, panoIndex = $$props.panoIndex);
281
+ if ('floorplanData' in $$props) $$invalidate(6, floorplanData = $$props.floorplanData);
282
+ if ('lastPanoramaLongitude' in $$props) $$invalidate(7, lastPanoramaLongitude = $$props.lastPanoramaLongitude);
283
+ if ('cameraImageUrl' in $$props) $$invalidate(0, cameraImageUrl = $$props.cameraImageUrl);
284
+ };
285
+
286
+ return [
287
+ cameraImageUrl,
288
+ positionLeft,
289
+ positionTop,
290
+ rotate,
291
+ domSizeStyle,
292
+ panoIndex,
293
+ floorplanData,
294
+ lastPanoramaLongitude
295
+ ];
296
+ }
297
+
298
+ class Camera extends internal.SvelteComponent {
299
+ constructor(options) {
300
+ super();
301
+
302
+ internal.init(
303
+ this,
304
+ options,
305
+ instance$g,
306
+ create_fragment$g,
307
+ internal.safe_not_equal,
308
+ {
309
+ panoIndex: 5,
310
+ floorplanData: 6,
311
+ lastPanoramaLongitude: 7,
312
+ cameraImageUrl: 0
313
+ },
314
+ add_css$c
315
+ );
316
+ }
317
+ }
318
+
319
+ const COMPASS_IMAGE = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAArUAAAB7CAMAAABdA4ieAAAC91BMVEUAAACOpP/H0P+yxP/a4/+asv/W3/+/z/+cs//S3f+mu//Q2//5+v/H1P/d5f/l6//y9f++zf/i6f+ww/+ovP/7/P/u8v/N2f+Mp//q7/+4yf+uwf+Wr/+7y/+1xv+Ho//x9P+9zP+2x/+swP+gt/+Oqf/Y4v/r8P/l7P/b4//F0/+juf+Zsv+XsP+Trf/p7v97mv9wj/+kuv+ftf/x9P92lf/3+f/I1f+5yv+Eof98m//8/f/4+f90lf+9zf/j6f/T3f/L1/+Bnv/6+/+SrP/m7P/f5v/O2v/L2P/E0v/Az//+///s8P/e5v+rv/+pvv+Anv+qvv+Pqv+Kpv+CoP93l/9xlP/z9v/p7v90lf9uj//P2//v8//o7f/k6v/K1v+6yv9rjv98nv/E0v/9/v/09//h6P/X4f9pjP/9/f/N2f/K1v/C0f+Ho/99nP/1+P9sj//6+//u8/+iuP/u8//g6P/U3v+3x/+0xv+etf+Vrv9pjf/B0P9ukf+ht/+Vr/94mP/G0/+8zP+2x//+/v/09v/W4f9ojv/c5P+xxP/d5v+xw/+vwv+Jo//g6P+nvP+SrP/R3P/1+f/W3//U3//C0P+Jp/9nh/+Kpv+Fov/Y4f/J1/+Pqf+rv/+Oqv+Oqv+muv+twP/f5//t8P97mf/h5/+twP+kuf/L2P+juP+Ipf+huP+Pqf/d5v+zxf+cs/+Zsf+wwv/V3v+8zP+Go/+zxP+GpP/T3f/r8P/u8v/o7f/d5P/m7P/H1P/w9P/D0f+uwf/Z4v/F0v/09//D0v/v8//s8v/d5P/Y4f/s8P+etv/X4f+gt/+ovf+bsv+xw/+Vr//j6v+1x//J1v+4yf/r8P+yxf/T3f/B0f+Fo//09//W4P/h6P/L1v/i6f/x9f/t8v/G0/+uwf/z9f/7/P/n7f/z9v/T3f+4yf/J1v/z9f/w8//q7v/O2v/8/f/5+v/y9f/w8//g6P/z9v+/zv+5yf+9zf/5+v/Q3P/B0P/u8f/R2//////LSJnaAAAA/HRSTlMAAwGMx2jAn2u7ebn0q8zX7J3TiHz45bRS35SFYZmPSembkYNwVMXh2cmodWVjXN43DHZu6gfyrJZGOvrzLAbVvbBB91raz7aypqH+4s6Bfj9/Vk9EMint3C8gt+fc1q+XGAml/O/SxBz7s66kSz3wI/bjc+fQvpOObV8VoyZyXjSpmgv97sMPyorNiYZN0XpYuvHCv6JNEhEWw61YgCUdGBIP5CIgHypaUEU6NS9JQy8lGlY6NCuMfVtPSzspJoRxcExBNTMUyn9zaWRfVkk9Oad9emtkY0RBMLGsnJaQj4ZmXVHhsaKbeW9owb466dnVy7mYj45wyaGV3bdGzuNnAAASkklEQVR42uyaS0iUURiGTUQZ1MaMURSEbOFt4ybGQClFHO9rBS8F3nAURHG0hZvyQrgQRsfNuKmRCTcGGaEzThNqMyouwswKNTVMLe/a/bLo+845/5z/dzIiumj971I3gz6+Puc9x0POT6bRaXfYrJa18YHFhYXXKzMz6+/fb2+/ePFia8uvWlXelFkcr6pO2NqCr2xv77xfn5lZWXm9sDgwvmZZGnHYzaZjHnLk/PaYzL0jS9Pji6+XN3Z3gvJPnTkTEJCT01xSUtWuVick+PlVJ6tUqvj44uLipkxIU3F5fLxKlZxc7efnl6BWt1eVlDTn5AQEnDl16lR+be2n3fWZlYWBNcugze485yFHzq/Kub7eEcv44tzyekpsbEhIZGRWVk1NUFBtPqU2gFGbANRWVycnI7XlCO0XQm25mFp1VRWjFrDNz68NCqqpyYqMDAmJjc3NzQ3cmJwfmLba7CZPDzlyfg5Wh3V6YG559HyhUhkVlZJSUJDLqK3pDkJqoS8ZtVWEWiCTUltejl37BaCVdG2Cul1MLUIb1M2pLShIiYpSKpWF58+37U3Oj1ue2E0ecuT8EK1mm3VoYG4vW6MrLQ0MDDwvUIvQ8q6tBWqZIeRQQ+DU8q51NwQxtbVAbRajNrZARG1gaWBpm0anyY6enB+bGOyV6ZVzIK6bPUPzs17Rx48fb80GaHVtpQRaF7XYtZFIbTcRBAFb7rWc2uJM1rVoCCqgFquWdy0TBDCEbqSWlm2KQC38rZSW6nS67OxW+CxXr0Z7ec/J8MqRxtQ7ONQ/2xIREeHlFR191UVtqRu1wBep2hpqCNxrpYYg6dp4Ude2Y9cG8K5FQ8hyNwSglnZtNoE22svLKyKirKxFsTo28cQsH9v+81Bevb29O1qMZQAtUhs9SqnVsK5199osRi3fENwNgXitcBqrrmZly7r2DKUWq7Zb8FrBEAoptW1tGg3rWk5tC3xSQ53ig8zuf5pzd4df9c8qFIrEOgOhtgyphdCubaVdC9iyrkVo+Wnsm12bID6NZYqWLxX32qpm0fKVD9ii10bSrkVDiJJ2bWuriFqjsaUDPmpdXWIifG7f1bGezT55bfhfYrrfM7Wamufrq9cjtIkGA+1aZgiArdRrlUBtirRr2YbAvBZGBLV71/INAcuWbwjcEERey7tWKe7abGnXdiC1DFq9r29eampF/3O5dv/1ODd7pj5og4ODU13UQtdyQ+Beq9FovnMaE20IAdwQJHut2BCE05jaffkSDAGwxbJl1CK27DQ2iqcxCFKLXWsgXatX+BJqg4O1aWlJz14N35XR/RfTeP/2VOeFpKS0tDQCLVDrq9AjtXVIrdFYVsaoHWWGQKgN3EdtCNVa91sGtdQQmvhpjFUtX74QWjoioNdm0a5lGwL3Wp1GI/HaCCP1WkMddi1Cm5cH1BJsky5UxGHrysLw7wQd9pl/XFfFBaRWq9UCtalIrZ56rcG7A7u2jHktMQQN91qllFq2fImoba468G5M6rVq4rV8Q0CvZdTGgtcitrxrNUgtli1QCyFe6+0yBL3eF6Cl1CYBtYBtnL9/0b2ezWseco56QGLvpV++7O8fF1dRAdhC16Ih0K4lhpBoQBaMLS6vZacxTdu+DSFXsiHkU689YENgd2MSQ0iQ7rXiG90Qvnxh2eJhTOfqWihb7rXUEIBalyFotaRru+IQ28uXY9LBF27JD3OObPqePn9TlJ4eExNDqO0CapOQWsCWdq2CUmtgGwKnli9f6LWFrg0hhFEr7doS1rXSu7HM8nK3DaHd7W6shnutyxACqdficYxSyzYEgVqEVsENQYtdi9j6U2rTi4oqfaZu32n0kHO04nlr+N3HjIaGoqIipNafUNsF1KIicK9VUK8FQ8Cu5YbAqQVslfv2Wuq1+TU7uxszK/DycG1t2mJZWrKOjIzYHA673Wx2Ok3nPImbNJqcfWa7vdfhsMG3rUtLFss0PG3Eh43ruzvC8sW7lhkCgxYMQXzLYCReyzYESGoePY0JXesPiYlBbCsbOjMyMu713L/uIedo5NiNm+8++vhkALSVlaRrqSEAtNKu1VNqWddKN4Rs3f6uLdxYnsTXsdNLg7Ze8y95WOhp6rM7RqyW6fGB+bnJ5Q0lNQRyo+u+fOGGIMFWOI2Rqq2ghgDUYtcSbH18fE4AuXLnHvr0PX30JvzEiRM+gG0nYFsE2IIgQARD0LINIY9vCNLla1R8ozu6PLc4brE6zH/iEcAxp90GD83mJ/dAqjU64TTGvNYodC0uX2SvJV1LNwSkFg3B1bWEWvhBhIdfeSjbwiHO9QeP34aFXQkPp9AitWgIgtfGYdcecBrrMJYJy1c0gLIHb62GrE96+/7aCmoyOwYnhvrnJo3otXz5Yl6roNCmptLTGHYtei1imy50rQ+lFrANC7v48ra86B6+HLs1/PDs2YsA7RWAlmLb0MkNgXStdENwv2WIUKzi2yrnoZo98ekkPpYQ7saQWtq1dPlCr+WGIO1axJZSe/Hs2bePHsiae4jSeOfxpdBQhJZULe/aSmIISG0cNwTetQoIMQTDbP9Qj818mP+Pejp7ByfGVmeF5WufIVw4wGuxahm1oaGh9S9vyqPYYYgnnL1O19cDtEAt7VrqtXCIdnWtsCEkYdfyWwaF4jMp174j9JtsvGvrGer/oMcNQXzL0CVZvhoaMii1iG2YQG19/enTp08+li33K/tm7JNGGIbxqiEht5m7iasMcBuwwOJk0tEFcn9BG7s1bizQGBycCCbXpUkTo9VFJVpRSeNkuBqnq6BRoiwOMtldm3Tr+37fJ9+dtFEUbNX3+RPIj+d+93zf/ctgyZb1YDAUAmx510J410JY1wqvbTeEma3vJ9uP9571yObu8rfTd6xrhSEIahFb2bXCayW1wWAwM2CvLf5XFvSMMr9fzw9kMhnEFqmVXSsMYQI3hFFJLUD7GixwZuvHU/kuoG+zsXx0CtS+Yl4runZ0fHzcvSEAtUPcEEKCWshhdYlezx44I0vV80J+AILQQgIuagdby9e1vXbm9Ogp3kmd2j45q7z1Ll/tXRuAoCEAtQzbQkE93qdLCw+Wsa9NXVXVfB6xdXftsOxauSHwszHgtfG0L6IufNkBdhm0vGul10Kk14quzQO1qqqDK7yg9Dwj682wrk+raqEgoGXUtrp2yGUI3Gt/we3T5/L+0Q+6W/mIXTvR7rWArTSEfJ5Rq+the40at5dBMTDDCC2jVhoCYjscAGo5tBC+fA0elXefhsF2dqTdOKtMyLlWvo2F3NQCtNPTiG04aZcI3B6lb6mqJZPhK2rVFrVBFATRtXKvrZw1Fh/RotXdoOzu/LwYhLj3Wo8hCGrDQG1y1jTIcbufvo2ilTJnZxFbnRsC81qxIYQ8XntRpy9SWOZ3y+dv2pevjPRaQa1pplIph87OuoxsXEulTJND6zWEjPRagDZwXqbredd94bgiqfUYgsq6Ngldi9hqmna8Qj9etw6/bMvSNIYt/MAtQ8i7DQG79rLeoPH8b75QPg8wbINyQ+CGILtW0yxLUZoE7v2RrRmKolgaUouGwL1W93gtdu1lnY57bj5IPBRei+GGAHF3rYKJ7608l82lF5lacSLxOFLLutaUXeuhNlOnOyEdkMu9VnYtJGnysrUshDYej6SLG9QBd5TZdASgjSsQhNZFrS69FoilF6+OsgDkIrauDWEWu1ZjhoDYRiKRdNohU+g4CyUnl2tRa1nSEKTXFmwi9s7kNg89G4IwBNG1SG0uZ9BVhQ4PEwzDyKWBWoEtUis2BNG19toSydc9bx81D91dC9hKaiNIrWE4dPxwy8yXnEQCoL3WtSnetQhtsklXRLv1YajNli8BraYgtozaXBqgTSQS2cl1+q1vytj6pD+bBWpF10qvFV2btIukBV2WhVRrQxDQCkNAbLNZv1N7zoeMt/jr13x+P1LLyhawlYLAX8fobl33g0ZWtE2+11oearFr/RDf3gEV7p/z6WDS5/MJaF1eqwhslSo9q3qW/vn9Y63Na7Fqs0gtpDZHhXs9/Z9r0ShC6+5aQS1C65ToEKHXmVqvRtoNwQ9BbKPR96vUGt5H1IcYg9YjCDkxIcSrNB32ONLRSg7H1msIEMA2GqNJoZWp1ckYQCuoRWwZtUYaFSFdpNHwYbOwsodde7UhtLAFaGOxl7U5eub9Ztfscd0Eoihsu8oSKJBoQpUYyYULmhSIBVjACuip0tFQpEaaagTSyLiI9GSMZArEKp4it95N7oXBk6dUr7Ln59sB4uNw7p0BTlfb3s7Wcm0fvfbbV7MveAYo7k9eEB5h+x0Aa22b9OlKb9bHP7kNgLZC2slawKTs80Bx/2sIW8DO7dy7VSt9SfuoyHMurei1k7bnt/3K8ExQXLT2Y0MA8qLwro2mRaG6hV5RTNpuuba81345v+n+E3oR6su7aAjc2hyt9cL4qN+fcNNcw9DzPJG1i7VG2dfidHlHaYW1qK0H2oauZvvz/ZEyhtLyrBUN4WzuxLweIO6HrOXWhiQa6pUupHeLkRCYrbWB2dqzZh+vPGxOl1xoW3iztYyxqNWj4KadG0URm7z9tyHoPZi+PnBJRExjk7WEEHiTrtMof9T7q7NctJYwcBaYGgJwVf/R5Sft3bkh8KydrXVV93aHzs7WklBMY2b+kob65uE0NhcEQhhaa1mWo+7VmqqzgElaRlDbKWtD0wykAg6GikJkretO2saKelt1cRyjtQAD5qw1zUBCdr2L1jIWAdzaWEVvq44+pI0AErLQs/rdyiAjm9ONiF5rATGlpaPWwUM1ZHSxFokIY9FNn12fivw4toQwkbWobemPynhbD1lW0hKtfYTtVa3PUk+q3pp7LYDW0jLL2lGJ+yP14DhZltFFW5DW6swApgbrpn1kbVmCtJnj+KP0GyFwFsCspZRLq1j70Z2qsxC0loK0qK0vd95Wne/7IC1Q8qgd9DgB1Il0dKx4CVsH8P1E3n3C7t76AM/aErKW3s1FAxVZNweUllvrIwc5V5r7MUiSWVoMW5C2NdVAXao7DmNL1vpJkgy1dH/V9W9wNmmTxdqy7OR7CMMnV2EiaxMgkGzoXjdDEKC2S0HwR3OeoD6beuBZ26K0QXC4y/Pa/7Jrx7gJw1AYx2su0iuYgYFI7sAJstiS2ZKpk8UeWfKWKyQLLJ5Qxyp34TZ9D15YOkBpm9ji/U/A8CP+HFj0styMapHtZ54bh/t5y2E9LoQNVppMXoN1uixLQns8rl9PeZ0T3O96O5T4rL2wBQkuZnCbWQ7OXdUe1zwNni8YCsh2VOuK1I/a2jtHapHtZp/J+cD9bf0HoiW1rpAp38TfYlEUgJaetWUOZwP3P3UnetYCW1ChU52JogoS1UKIlq9gT95yILSugKRKciq2VhLaEpIVm3366j2pxaSMyf07YRUlND5qTynvGG6aaDOSWgnptFiIKoQLWmQ7pLphuOkTB0lqoZDSTGiVBrXE1iT0wbgEEn0gtSEEncoNfRV1uKKN/KqL+/4C1xYSA7XapjATRGU1hGxT3NtcGnUK0UJgZf7TuDWEls1yt9wiWsja7awzYRWttYgWYrPcLbejWqua2WaCqBSixQLvWe5mi06RWqv8TDOhNUrZC9sdm+Xuu5cpUqvU+wwzYbVVkIXYLHd/olekVpmpZ8KiMYbU7ma/EXJZBW5JrZl2V9bRnNWyWe4xt8TWTPd3FdEYSEFslnsoURlAi01FqN56f2br2xeOe9ytgbyf4nErGg/hl6RN4Jc5Lt++2rVjHMdCIIqiqtoRQW2mMogIyZFjlsB2B9wjjaY1PXa3wcbSPaEDR1fP9fVt8aPai2+f2+TlWu2l0yweZHlEO5S9cyu1lDKj5T/fWCH4jLaUnXMbvFyrzby8xRrayqUM2+ZWqvuM1nmpgHWkl8F9z9yG7LNa5yEMa0n8yHb93Er1oXjnoMVyFn3KQVcP7VRpFn+sDiznaiuHNufsHnkIwy7aPA/r5jbFGW3m7S12ku55WPN7Li1PPIRhN6sjtBjTmm+KmYcwPEOKs9tHF1JDHCoHLZ5DQ8yPBic9DoHjAKvsb85qjbFxHOCprMZaf5qdhlorxwGeTsPIttvPlno0y3GAZfbHp6n3ynGAV0m99u/2J6H3znGAvW4n+J25tdY7xwFey1pvQe6/DlrjOMDLqfXW7N5pbs0YWhxgtpj0rl1uiaHFISzccSWohUCzOIemm0VKChwHOMutKCVwHOA4av/JVi0xtDiRpCRfRcvQ4lBfxSnG0OJc/+xTjKHFyVRMP38iDC0O92lZVRhanO+vcVWGFu9BRWkW7+Z3rapEizdy7ZVm8V5Gtr8AtSnix59eOmYAAAAASUVORK5CYII=';
320
+
321
+ /* src/floorplan/ModelFloorplanPlugin/Components/Compass.svelte generated by Svelte v3.47.0 */
322
+
323
+ function add_css$b(target) {
324
+ internal.append_styles(target, "svelte-5l80pv", ".floorplan-plugin__compass.svelte-5l80pv{position:absolute;left:50%;top:-46px;width:231px;height:41px;will-change:opacity;transform-origin:center 184px}.floorplan-plugin__compass-image.svelte-5l80pv{width:100%;height:100%;position:absolute;left:0;top:0;opacity:0.1;background-repeat:no-repeat;background-size:100% 100%}.floorplan-plugin__compass-text.svelte-5l80pv{position:absolute;left:50%;top:15px;transform:translateX(-50%);opacity:0.2;font-weight:bold;font-size:10px;color:#fff}");
325
+ }
326
+
327
+ // (12:0) {#if northRad}
328
+ function create_if_block$6(ctx) {
329
+ let div1;
330
+ let div0;
331
+ let t0;
332
+ let span;
333
+ let t1;
334
+
335
+ return {
336
+ c() {
337
+ div1 = internal.element("div");
338
+ div0 = internal.element("div");
339
+ t0 = internal.space();
340
+ span = internal.element("span");
341
+ t1 = internal.text(/*northDesc*/ ctx[0]);
342
+ internal.attr(div0, "class", "floorplan-plugin__compass-image svelte-5l80pv");
343
+ internal.set_style(div0, "background-image", `url(${COMPASS_IMAGE})`);
344
+ internal.attr(span, "class", "floorplan-plugin__compass-text svelte-5l80pv");
345
+ internal.attr(div1, "class", "floorplan-plugin__compass svelte-5l80pv");
346
+ internal.set_style(div1, "transform", /*compassTransformStyle*/ ctx[2], false);
347
+ },
348
+ m(target, anchor) {
349
+ internal.insert(target, div1, anchor);
350
+ internal.append(div1, div0);
351
+ internal.append(div1, t0);
352
+ internal.append(div1, span);
353
+ internal.append(span, t1);
354
+ },
355
+ p(ctx, dirty) {
356
+ if (dirty & /*northDesc*/ 1) internal.set_data(t1, /*northDesc*/ ctx[0]);
357
+ },
358
+ d(detaching) {
359
+ if (detaching) internal.detach(div1);
360
+ }
361
+ };
362
+ }
363
+
364
+ function create_fragment$f(ctx) {
365
+ let if_block_anchor;
366
+ let if_block = /*northRad*/ ctx[1] && create_if_block$6(ctx);
367
+
368
+ return {
369
+ c() {
370
+ if (if_block) if_block.c();
371
+ if_block_anchor = internal.empty();
372
+ },
373
+ m(target, anchor) {
374
+ if (if_block) if_block.m(target, anchor);
375
+ internal.insert(target, if_block_anchor, anchor);
376
+ },
377
+ p(ctx, [dirty]) {
378
+ if (/*northRad*/ ctx[1]) if_block.p(ctx, dirty);
379
+ },
380
+ i: internal.noop,
381
+ o: internal.noop,
382
+ d(detaching) {
383
+ if (if_block) if_block.d(detaching);
384
+ if (detaching) internal.detach(if_block_anchor);
385
+ }
386
+ };
387
+ }
388
+
389
+ function rad2Deg(rad) {
390
+ return rad / Math.PI * 180;
391
+ }
392
+
393
+ function instance$f($$self, $$props, $$invalidate) {
394
+ let { floorplanData } = $$props;
395
+ let { northDesc } = $$props;
396
+ const northRad = floorplanData.entrance?.northRad;
397
+ const rotate = !northRad ? 0 : rad2Deg(northRad);
398
+ const compassTransformStyle = `translateX(-50%) translateZ(10px) rotate(${-rotate + 90}deg)`;
399
+
400
+ $$self.$$set = $$props => {
401
+ if ('floorplanData' in $$props) $$invalidate(3, floorplanData = $$props.floorplanData);
402
+ if ('northDesc' in $$props) $$invalidate(0, northDesc = $$props.northDesc);
403
+ };
404
+
405
+ return [northDesc, northRad, compassTransformStyle, floorplanData];
406
+ }
407
+
408
+ class Compass extends internal.SvelteComponent {
409
+ constructor(options) {
410
+ super();
411
+ internal.init(this, options, instance$f, create_fragment$f, internal.safe_not_equal, { floorplanData: 3, northDesc: 0 }, add_css$b);
412
+ }
413
+ }
414
+
415
+ /* src/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.svelte generated by Svelte v3.47.0 */
416
+
417
+ function add_css$a(target) {
418
+ internal.append_styles(target, "svelte-1ashbdx", ".floorplan-plugin__room-label-item.svelte-1ashbdx{position:absolute;display:flex;flex-flow:column;align-items:center;line-height:15px;color:#fff;transform:translate(-50%, -50%);white-space:nowrap}.floorplan-plugin__room-size.svelte-1ashbdx{opacity:0.45}");
419
+ }
420
+
421
+ // (22:30)
422
+ function create_if_block_1$4(ctx) {
423
+ let html_tag;
424
+ let raw_value = /*userConfigElement*/ ctx[2].outerHTML + "";
425
+ let html_anchor;
426
+
427
+ return {
428
+ c() {
429
+ html_tag = new internal.HtmlTag();
430
+ html_anchor = internal.empty();
431
+ html_tag.a = html_anchor;
432
+ },
433
+ m(target, anchor) {
434
+ html_tag.m(raw_value, target, anchor);
435
+ internal.insert(target, html_anchor, anchor);
436
+ },
437
+ p(ctx, dirty) {
438
+ if (dirty & /*userConfigElement*/ 4 && raw_value !== (raw_value = /*userConfigElement*/ ctx[2].outerHTML + "")) html_tag.p(raw_value);
439
+ },
440
+ d(detaching) {
441
+ if (detaching) internal.detach(html_anchor);
442
+ if (detaching) html_tag.d();
443
+ }
444
+ };
445
+ }
446
+
447
+ // (16:2) {#if getLabelElement === undefined}
448
+ function create_if_block$5(ctx) {
449
+ let span0;
450
+ let t0_value = /*room*/ ctx[0].name + "";
451
+ let t0;
452
+ let t1;
453
+ let span1;
454
+
455
+ return {
456
+ c() {
457
+ span0 = internal.element("span");
458
+ t0 = internal.text(t0_value);
459
+ t1 = internal.space();
460
+ span1 = internal.element("span");
461
+ span1.textContent = `${/*roomSizeDes*/ ctx[3]}`;
462
+ internal.attr(span0, "class", "floorplan-plugin__room-name");
463
+ internal.attr(span1, "class", "floorplan-plugin__room-size svelte-1ashbdx");
464
+ },
465
+ m(target, anchor) {
466
+ internal.insert(target, span0, anchor);
467
+ internal.append(span0, t0);
468
+ internal.insert(target, t1, anchor);
469
+ internal.insert(target, span1, anchor);
470
+ },
471
+ p(ctx, dirty) {
472
+ if (dirty & /*room*/ 1 && t0_value !== (t0_value = /*room*/ ctx[0].name + "")) internal.set_data(t0, t0_value);
473
+ },
474
+ d(detaching) {
475
+ if (detaching) internal.detach(span0);
476
+ if (detaching) internal.detach(t1);
477
+ if (detaching) internal.detach(span1);
478
+ }
479
+ };
480
+ }
481
+
482
+ function create_fragment$e(ctx) {
483
+ let div;
484
+
485
+ function select_block_type(ctx, dirty) {
486
+ if (/*getLabelElement*/ ctx[1] === undefined) return create_if_block$5;
487
+ if (/*userConfigElement*/ ctx[2]) return create_if_block_1$4;
488
+ }
489
+
490
+ let current_block_type = select_block_type(ctx);
491
+ let if_block = current_block_type && current_block_type(ctx);
492
+
493
+ return {
494
+ c() {
495
+ div = internal.element("div");
496
+ if (if_block) if_block.c();
497
+ internal.attr(div, "class", "floorplan-plugin__room-label-item svelte-1ashbdx");
498
+ internal.set_style(div, "left", /*left*/ ctx[4], false);
499
+ internal.set_style(div, "top", /*top*/ ctx[5], false);
500
+ internal.set_style(div, "font-size", /*fontSize*/ ctx[6], false);
501
+ },
502
+ m(target, anchor) {
503
+ internal.insert(target, div, anchor);
504
+ if (if_block) if_block.m(div, null);
505
+ },
506
+ p(ctx, [dirty]) {
507
+ if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) {
508
+ if_block.p(ctx, dirty);
509
+ } else {
510
+ if (if_block) if_block.d(1);
511
+ if_block = current_block_type && current_block_type(ctx);
512
+
513
+ if (if_block) {
514
+ if_block.c();
515
+ if_block.m(div, null);
516
+ }
517
+ }
518
+ },
519
+ i: internal.noop,
520
+ o: internal.noop,
521
+ d(detaching) {
522
+ if (detaching) internal.detach(div);
523
+
524
+ if (if_block) {
525
+ if_block.d();
526
+ }
527
+ }
528
+ };
529
+ }
530
+
531
+ function instance$e($$self, $$props, $$invalidate) {
532
+ let userConfigElement;
533
+ let { room } = $$props;
534
+ let { getLabelElement } = $$props;
535
+
536
+ // TODO: 统一这里的判断条件,目前写了多处
537
+ const bodyWidth = document.body.clientWidth;
538
+
539
+ const bodyHeight = document.body.clientHeight;
540
+ const roomSizeDes = room.size ? (room.size / 1000000).toFixed(1) + '㎡' : '';
541
+ const roomLabel = room.roomLabel;
542
+ const left = roomLabel.positionInImage.x * 100 + '%';
543
+ const top = roomLabel.positionInImage.y * 100 + '%';
544
+ const fontSize = (bodyWidth < 500 || bodyHeight < 500 ? 10 : 14) / 16 + 'rem';
545
+
546
+ $$self.$$set = $$props => {
547
+ if ('room' in $$props) $$invalidate(0, room = $$props.room);
548
+ if ('getLabelElement' in $$props) $$invalidate(1, getLabelElement = $$props.getLabelElement);
549
+ };
550
+
551
+ $$self.$$.update = () => {
552
+ if ($$self.$$.dirty & /*getLabelElement, room*/ 3) {
553
+ $$invalidate(2, userConfigElement = getLabelElement?.(room));
554
+ }
555
+ };
556
+
557
+ return [room, getLabelElement, userConfigElement, roomSizeDes, left, top, fontSize];
558
+ }
559
+
560
+ class RoomLabel extends internal.SvelteComponent {
561
+ constructor(options) {
562
+ super();
563
+ internal.init(this, options, instance$e, create_fragment$e, internal.safe_not_equal, { room: 0, getLabelElement: 1 }, add_css$a);
564
+ }
565
+ }
566
+
567
+ /* src/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.svelte generated by Svelte v3.47.0 */
568
+
569
+ function add_css$9(target) {
570
+ internal.append_styles(target, "svelte-sw25w3", ".floorplan-plugin__room-labels.svelte-sw25w3{width:100%;height:100%;position:absolute;left:0;top:0;z-index:20}");
571
+ }
572
+
573
+ function get_each_context$4(ctx, list, i) {
574
+ const child_ctx = ctx.slice();
575
+ child_ctx[4] = list[i];
576
+ return child_ctx;
577
+ }
578
+
579
+ // (8:0) {#if rooms}
580
+ function create_if_block$4(ctx) {
581
+ let div;
582
+ let each_blocks = [];
583
+ let each_1_lookup = new Map();
584
+ let current;
585
+ let each_value = /*rooms*/ ctx[1];
586
+ const get_key = ctx => /*room*/ ctx[4].id;
587
+
588
+ for (let i = 0; i < each_value.length; i += 1) {
589
+ let child_ctx = get_each_context$4(ctx, each_value, i);
590
+ let key = get_key(child_ctx);
591
+ each_1_lookup.set(key, each_blocks[i] = create_each_block$4(key, child_ctx));
592
+ }
593
+
594
+ return {
595
+ c() {
596
+ div = internal.element("div");
597
+
598
+ for (let i = 0; i < each_blocks.length; i += 1) {
599
+ each_blocks[i].c();
600
+ }
601
+
602
+ internal.attr(div, "class", "floorplan-plugin__room-labels svelte-sw25w3");
603
+ },
604
+ m(target, anchor) {
605
+ internal.insert(target, div, anchor);
606
+
607
+ for (let i = 0; i < each_blocks.length; i += 1) {
608
+ each_blocks[i].m(div, null);
609
+ }
610
+
611
+ current = true;
612
+ },
613
+ p(ctx, dirty) {
614
+ if (dirty & /*rooms, getLabelElement*/ 3) {
615
+ each_value = /*rooms*/ ctx[1];
616
+ internal.group_outros();
617
+ each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, div, internal.outro_and_destroy_block, create_each_block$4, null, get_each_context$4);
618
+ internal.check_outros();
619
+ }
620
+ },
621
+ i(local) {
622
+ if (current) return;
623
+
624
+ for (let i = 0; i < each_value.length; i += 1) {
625
+ internal.transition_in(each_blocks[i]);
626
+ }
627
+
628
+ current = true;
629
+ },
630
+ o(local) {
631
+ for (let i = 0; i < each_blocks.length; i += 1) {
632
+ internal.transition_out(each_blocks[i]);
633
+ }
634
+
635
+ current = false;
636
+ },
637
+ d(detaching) {
638
+ if (detaching) internal.detach(div);
639
+
640
+ for (let i = 0; i < each_blocks.length; i += 1) {
641
+ each_blocks[i].d();
642
+ }
643
+ }
644
+ };
645
+ }
646
+
647
+ // (10:4) {#each rooms as room (room.id)}
648
+ function create_each_block$4(key_1, ctx) {
649
+ let first;
650
+ let roomlabel;
651
+ let current;
652
+
653
+ const roomlabel_spread_levels = [
654
+ {
655
+ room: /*room*/ ctx[4],
656
+ getLabelElement: /*getLabelElement*/ ctx[0]
657
+ }
658
+ ];
659
+
660
+ let roomlabel_props = {};
661
+
662
+ for (let i = 0; i < roomlabel_spread_levels.length; i += 1) {
663
+ roomlabel_props = internal.assign(roomlabel_props, roomlabel_spread_levels[i]);
664
+ }
665
+
666
+ roomlabel = new RoomLabel({ props: roomlabel_props });
667
+
668
+ return {
669
+ key: key_1,
670
+ first: null,
671
+ c() {
672
+ first = internal.empty();
673
+ internal.create_component(roomlabel.$$.fragment);
674
+ this.first = first;
675
+ },
676
+ m(target, anchor) {
677
+ internal.insert(target, first, anchor);
678
+ internal.mount_component(roomlabel, target, anchor);
679
+ current = true;
680
+ },
681
+ p(new_ctx, dirty) {
682
+ ctx = new_ctx;
683
+
684
+ const roomlabel_changes = (dirty & /*rooms, getLabelElement*/ 3)
685
+ ? internal.get_spread_update(roomlabel_spread_levels, [
686
+ {
687
+ room: /*room*/ ctx[4],
688
+ getLabelElement: /*getLabelElement*/ ctx[0]
689
+ }
690
+ ])
691
+ : {};
692
+
693
+ roomlabel.$set(roomlabel_changes);
694
+ },
695
+ i(local) {
696
+ if (current) return;
697
+ internal.transition_in(roomlabel.$$.fragment, local);
698
+ current = true;
699
+ },
700
+ o(local) {
701
+ internal.transition_out(roomlabel.$$.fragment, local);
702
+ current = false;
703
+ },
704
+ d(detaching) {
705
+ if (detaching) internal.detach(first);
706
+ internal.destroy_component(roomlabel, detaching);
707
+ }
708
+ };
709
+ }
710
+
711
+ function create_fragment$d(ctx) {
712
+ let if_block_anchor;
713
+ let current;
714
+ let if_block = /*rooms*/ ctx[1] && create_if_block$4(ctx);
715
+
716
+ return {
717
+ c() {
718
+ if (if_block) if_block.c();
719
+ if_block_anchor = internal.empty();
720
+ },
721
+ m(target, anchor) {
722
+ if (if_block) if_block.m(target, anchor);
723
+ internal.insert(target, if_block_anchor, anchor);
724
+ current = true;
725
+ },
726
+ p(ctx, [dirty]) {
727
+ if (/*rooms*/ ctx[1]) {
728
+ if (if_block) {
729
+ if_block.p(ctx, dirty);
730
+
731
+ if (dirty & /*rooms*/ 2) {
732
+ internal.transition_in(if_block, 1);
733
+ }
734
+ } else {
735
+ if_block = create_if_block$4(ctx);
736
+ if_block.c();
737
+ internal.transition_in(if_block, 1);
738
+ if_block.m(if_block_anchor.parentNode, if_block_anchor);
739
+ }
740
+ } else if (if_block) {
741
+ internal.group_outros();
742
+
743
+ internal.transition_out(if_block, 1, 1, () => {
744
+ if_block = null;
745
+ });
746
+
747
+ internal.check_outros();
748
+ }
749
+ },
750
+ i(local) {
751
+ if (current) return;
752
+ internal.transition_in(if_block);
753
+ current = true;
754
+ },
755
+ o(local) {
756
+ internal.transition_out(if_block);
757
+ current = false;
758
+ },
759
+ d(detaching) {
760
+ if (if_block) if_block.d(detaching);
761
+ if (detaching) internal.detach(if_block_anchor);
762
+ }
763
+ };
764
+ }
765
+
766
+ function instance$d($$self, $$props, $$invalidate) {
767
+ let rooms;
768
+ let { floorIndex } = $$props;
769
+ let { floorplanData } = $$props;
770
+ let { getLabelElement } = $$props;
771
+
772
+ $$self.$$set = $$props => {
773
+ if ('floorIndex' in $$props) $$invalidate(2, floorIndex = $$props.floorIndex);
774
+ if ('floorplanData' in $$props) $$invalidate(3, floorplanData = $$props.floorplanData);
775
+ if ('getLabelElement' in $$props) $$invalidate(0, getLabelElement = $$props.getLabelElement);
776
+ };
777
+
778
+ $$self.$$.update = () => {
779
+ if ($$self.$$.dirty & /*floorplanData, floorIndex*/ 12) {
780
+ $$invalidate(1, rooms = floorplanData.floorDatas[floorIndex].rooms);
781
+ }
782
+ };
783
+
784
+ return [getLabelElement, rooms, floorIndex, floorplanData];
785
+ }
786
+
787
+ class RoomLabels extends internal.SvelteComponent {
788
+ constructor(options) {
789
+ super();
790
+
791
+ internal.init(
792
+ this,
793
+ options,
794
+ instance$d,
795
+ create_fragment$d,
796
+ internal.safe_not_equal,
797
+ {
798
+ floorIndex: 2,
799
+ floorplanData: 3,
800
+ getLabelElement: 0
801
+ },
802
+ add_css$9
803
+ );
804
+ }
805
+ }
806
+
807
+ /**
808
+ * 判断对象是否为`null`或`undefined`。
809
+ * @param
810
+ * @return
811
+ */
812
+ /**
813
+ * 判断对象不为`null`或`undefined`。
814
+ */
815
+ function notNil(value) {
816
+ return value !== null && value !== undefined;
817
+ }
818
+
819
+ /* src/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.svelte generated by Svelte v3.47.0 */
820
+
821
+ function add_css$8(target) {
822
+ internal.append_styles(target, "svelte-1rr09in", ".floorplan-plugin__rule-labels.svelte-1rr09in{position:absolute;height:5px;display:flex;align-items:center}.floorplan-plugin__rule-labels-top.svelte-1rr09in{left:0;top:0}.floorplan-plugin__rule-labels-bottom.svelte-1rr09in{left:0;bottom:0}.floorplan-plugin__rule-labels-left.svelte-1rr09in{bottom:0;left:0}.floorplan-plugin__rule-labels-right.svelte-1rr09in{bottom:0;right:0}.floorplan-plugin__rule-line.svelte-1rr09in{background:#fff;opacity:0.05;width:100%;height:1px}.floorplan-plugin__rule-scale.svelte-1rr09in{position:absolute;background:#fff;opacity:0.05;transform-origin:center;width:1px;height:5px}.floorplan-plugin__text-wrapper.svelte-1rr09in{width:0;height:0;position:absolute}.floorplan-plugin__text-wrapper.floorplan-plugin__text-wrapper--is-left-or-top.svelte-1rr09in{top:10px}.floorplan-plugin__text-wrapper.floorplan-plugin__text-wrapper-is-right-or-bottom.svelte-1rr09in{bottom:10px}.floorplan-plugin__rule-text.svelte-1rr09in{position:absolute;width:max-content;display:block;transform:translate(-50%, -50%) rotate(180deg);font-size:10px;color:#fff;opacity:0.2}.floorplan-plugin__rule-text.is-row.svelte-1rr09in{transform:translate(-50%, -50%)}");
823
+ }
824
+
825
+ function get_each_context$3(ctx, list, i) {
826
+ const child_ctx = ctx.slice();
827
+ child_ctx[24] = list[i];
828
+ child_ctx[26] = i;
829
+ return child_ctx;
830
+ }
831
+
832
+ function get_each_context_1(ctx, list, i) {
833
+ const child_ctx = ctx.slice();
834
+ child_ctx[27] = list[i];
835
+ child_ctx[29] = i;
836
+ return child_ctx;
837
+ }
838
+
839
+ // (66:2) {#each positionPxArray as position, positionIndex (positionIndex)}
840
+ function create_each_block_1(key_1, ctx) {
841
+ let div;
842
+ let style_left = `${/*position*/ ctx[27]}px`;
843
+
844
+ return {
845
+ key: key_1,
846
+ first: null,
847
+ c() {
848
+ div = internal.element("div");
849
+ internal.attr(div, "class", "floorplan-plugin__rule-scale svelte-1rr09in");
850
+ internal.set_style(div, "left", style_left, false);
851
+ this.first = div;
852
+ },
853
+ m(target, anchor) {
854
+ internal.insert(target, div, anchor);
855
+ },
856
+ p(new_ctx, dirty) {
857
+ ctx = new_ctx;
858
+ },
859
+ d(detaching) {
860
+ if (detaching) internal.detach(div);
861
+ }
862
+ };
863
+ }
864
+
865
+ // (69:2) {#each textArray as textItem, textItemIndex (textItemIndex)}
866
+ function create_each_block$3(key_1, ctx) {
867
+ let div;
868
+ let span;
869
+ let t0_value = /*textItem*/ ctx[24].distance + "";
870
+ let t0;
871
+ let t1;
872
+ let style_left = `${/*textItem*/ ctx[24].positionPx}px`;
873
+
874
+ return {
875
+ key: key_1,
876
+ first: null,
877
+ c() {
878
+ div = internal.element("div");
879
+ span = internal.element("span");
880
+ t0 = internal.text(t0_value);
881
+ t1 = internal.space();
882
+ internal.attr(span, "class", "floorplan-plugin__rule-text svelte-1rr09in");
883
+ internal.toggle_class(span, "is-row", /*isRow*/ ctx[5]);
884
+ internal.attr(div, "class", "floorplan-plugin__text-wrapper svelte-1rr09in");
885
+ internal.toggle_class(div, "floorplan-plugin__text-wrapper--is-left-or-top", /*isLeft*/ ctx[3] || /*isTop*/ ctx[1]);
886
+ internal.toggle_class(div, "floorplan-plugin__text-wrapper-is-right-or-bottom", /*isRight*/ ctx[4] || /*isBottom*/ ctx[2]);
887
+ internal.set_style(div, "left", style_left, false);
888
+ this.first = div;
889
+ },
890
+ m(target, anchor) {
891
+ internal.insert(target, div, anchor);
892
+ internal.append(div, span);
893
+ internal.append(span, t0);
894
+ internal.append(div, t1);
895
+ },
896
+ p(new_ctx, dirty) {
897
+ ctx = new_ctx;
898
+ },
899
+ d(detaching) {
900
+ if (detaching) internal.detach(div);
901
+ }
902
+ };
903
+ }
904
+
905
+ function create_fragment$c(ctx) {
906
+ let div1;
907
+ let div0;
908
+ let t0;
909
+ let each_blocks_1 = [];
910
+ let each0_lookup = new Map();
911
+ let t1;
912
+ let each_blocks = [];
913
+ let each1_lookup = new Map();
914
+ let div1_class_value;
915
+ let each_value_1 = /*positionPxArray*/ ctx[6];
916
+ const get_key = ctx => /*positionIndex*/ ctx[29];
917
+
918
+ for (let i = 0; i < each_value_1.length; i += 1) {
919
+ let child_ctx = get_each_context_1(ctx, each_value_1, i);
920
+ let key = get_key(child_ctx);
921
+ each0_lookup.set(key, each_blocks_1[i] = create_each_block_1(key, child_ctx));
922
+ }
923
+
924
+ let each_value = /*textArray*/ ctx[10];
925
+ const get_key_1 = ctx => /*textItemIndex*/ ctx[26];
926
+
927
+ for (let i = 0; i < each_value.length; i += 1) {
928
+ let child_ctx = get_each_context$3(ctx, each_value, i);
929
+ let key = get_key_1(child_ctx);
930
+ each1_lookup.set(key, each_blocks[i] = create_each_block$3(key, child_ctx));
931
+ }
932
+
933
+ return {
934
+ c() {
935
+ div1 = internal.element("div");
936
+ div0 = internal.element("div");
937
+ t0 = internal.space();
938
+
939
+ for (let i = 0; i < each_blocks_1.length; i += 1) {
940
+ each_blocks_1[i].c();
941
+ }
942
+
943
+ t1 = internal.space();
944
+
945
+ for (let i = 0; i < each_blocks.length; i += 1) {
946
+ each_blocks[i].c();
947
+ }
948
+
949
+ internal.attr(div0, "class", "floorplan-plugin__rule-line svelte-1rr09in");
950
+ internal.attr(div1, "class", div1_class_value = "floorplan-plugin__rule-labels floorplan-plugin__rule-labels-" + /*type*/ ctx[0] + " svelte-1rr09in");
951
+ internal.set_style(div1, "width", /*width*/ ctx[9], false);
952
+ internal.set_style(div1, "transform", /*transform*/ ctx[7], false);
953
+ internal.set_style(div1, "transform-origin", /*transformOrigin*/ ctx[8], false);
954
+ },
955
+ m(target, anchor) {
956
+ internal.insert(target, div1, anchor);
957
+ internal.append(div1, div0);
958
+ internal.append(div1, t0);
959
+
960
+ for (let i = 0; i < each_blocks_1.length; i += 1) {
961
+ each_blocks_1[i].m(div1, null);
962
+ }
963
+
964
+ internal.append(div1, t1);
965
+
966
+ for (let i = 0; i < each_blocks.length; i += 1) {
967
+ each_blocks[i].m(div1, null);
968
+ }
969
+ },
970
+ p(ctx, [dirty]) {
971
+ if (dirty & /*positionPxArray*/ 64) {
972
+ each_value_1 = /*positionPxArray*/ ctx[6];
973
+ each_blocks_1 = internal.update_keyed_each(each_blocks_1, dirty, get_key, 1, ctx, each_value_1, each0_lookup, div1, internal.destroy_block, create_each_block_1, t1, get_each_context_1);
974
+ }
975
+
976
+ if (dirty & /*isLeft, isTop, isRight, isBottom, textArray, isRow*/ 1086) {
977
+ each_value = /*textArray*/ ctx[10];
978
+ each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key_1, 1, ctx, each_value, each1_lookup, div1, internal.destroy_block, create_each_block$3, null, get_each_context$3);
979
+ }
980
+
981
+ if (dirty & /*type*/ 1 && div1_class_value !== (div1_class_value = "floorplan-plugin__rule-labels floorplan-plugin__rule-labels-" + /*type*/ ctx[0] + " svelte-1rr09in")) {
982
+ internal.attr(div1, "class", div1_class_value);
983
+ }
984
+ },
985
+ i: internal.noop,
986
+ o: internal.noop,
987
+ d(detaching) {
988
+ if (detaching) internal.detach(div1);
989
+
990
+ for (let i = 0; i < each_blocks_1.length; i += 1) {
991
+ each_blocks_1[i].d();
992
+ }
993
+
994
+ for (let i = 0; i < each_blocks.length; i += 1) {
995
+ each_blocks[i].d();
996
+ }
997
+ }
998
+ };
999
+ }
1000
+
1001
+ const padding = 1000;
1002
+
1003
+ function instance$c($$self, $$props, $$invalidate) {
1004
+ let { pxmm } = $$props;
1005
+ let { type } = $$props;
1006
+ let { data } = $$props;
1007
+ let { bounding } = $$props;
1008
+ const isTop = type === 'top';
1009
+ const isBottom = type === 'bottom';
1010
+ const isLeft = type === 'left';
1011
+ const isRight = type === 'right';
1012
+ const isRow = isTop || isBottom;
1013
+
1014
+ // 计算每一段墙的长度,以及墙两侧点距离标尺初始点的像素值
1015
+ const positionArray = data.map(([start, end]) => isRow ? [start.x, end.x] : [start.y, end.y]).flat().sort().filter((x, index, arr) => {
1016
+ if (index === 0) return true;
1017
+ return x !== arr[index - 1];
1018
+ });
1019
+
1020
+ const minPosition = positionArray[0];
1021
+ const maxPosition = positionArray.slice(-1)[0];
1022
+ const length = maxPosition - minPosition;
1023
+ const minBounding = isRow ? bounding.min.x : bounding.min.y;
1024
+ const lengthPx = length * pxmm;
1025
+ const positionPxArray = positionArray.map(x => (x - minPosition) / length * lengthPx);
1026
+
1027
+ // 在主要方向上的偏移量,上下的标尺是距离图片左侧的长度,左右的标尺是距离图片底部的距离
1028
+ const translateMain = (minPosition - minBounding) * pxmm;
1029
+
1030
+ // 在次要方向的偏移量,希望达到的效果是标尺轴距离户型图边界 27px,但是图片自身是带有 1000mm 的边界,所以在计算时需要减去这个边界
1031
+ const translateSecond = 27 - padding * pxmm;
1032
+
1033
+ const translate = (() => {
1034
+ if (isTop) return `translate(${translateMain}px, ${-translateSecond}px)`;
1035
+ if (isBottom) return `translate(${translateMain}px, ${translateSecond}px)`;
1036
+ if (isLeft) return `translate(${-translateSecond}px, ${-translateMain}px)`;
1037
+ if (isRight) return `translate(${translateSecond}px, ${-translateMain - lengthPx}px)`;
1038
+ })();
1039
+
1040
+ const rotate = isRow ? 'rotate(0)' : 'rotate(-90deg)';
1041
+ const transform = `${translate} ${rotate}`;
1042
+ const transformOrigin = `${isRight ? 'right' : 'left'} ${isTop ? 'top' : 'bottom'}`;
1043
+ const width = lengthPx + 'px';
1044
+
1045
+ // 把点位的户型图坐标转成距离起始位置的像素值
1046
+ const textArray = positionArray.map((position, index, array) => {
1047
+ if (index === 0) return null;
1048
+ const distance = position - array[index - 1];
1049
+ const positionPx = (array[index - 1] + distance / 2 - minPosition) / length * lengthPx;
1050
+ return { distance, positionPx };
1051
+ }).filter(notNil).filter(item => item.distance / length > 0.12);
1052
+
1053
+ $$self.$$set = $$props => {
1054
+ if ('pxmm' in $$props) $$invalidate(11, pxmm = $$props.pxmm);
1055
+ if ('type' in $$props) $$invalidate(0, type = $$props.type);
1056
+ if ('data' in $$props) $$invalidate(12, data = $$props.data);
1057
+ if ('bounding' in $$props) $$invalidate(13, bounding = $$props.bounding);
1058
+ };
1059
+
1060
+ return [
1061
+ type,
1062
+ isTop,
1063
+ isBottom,
1064
+ isLeft,
1065
+ isRight,
1066
+ isRow,
1067
+ positionPxArray,
1068
+ transform,
1069
+ transformOrigin,
1070
+ width,
1071
+ textArray,
1072
+ pxmm,
1073
+ data,
1074
+ bounding
1075
+ ];
1076
+ }
1077
+
1078
+ class RuleItem extends internal.SvelteComponent {
1079
+ constructor(options) {
1080
+ super();
1081
+
1082
+ internal.init(
1083
+ this,
1084
+ options,
1085
+ instance$c,
1086
+ create_fragment$c,
1087
+ internal.safe_not_equal,
1088
+ {
1089
+ pxmm: 11,
1090
+ type: 0,
1091
+ data: 12,
1092
+ bounding: 13
1093
+ },
1094
+ add_css$8
1095
+ );
1096
+ }
1097
+ }
1098
+
1099
+ /* src/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleLabels.svelte generated by Svelte v3.47.0 */
1100
+
1101
+ function get_each_context$2(ctx, list, i) {
1102
+ const child_ctx = ctx.slice();
1103
+ child_ctx[7] = list[i][0];
1104
+ child_ctx[8] = list[i][1];
1105
+ return child_ctx;
1106
+ }
1107
+
1108
+ // (12:2) {#each ruleLabelArray as [type, data] (type)}
1109
+ function create_each_block$2(key_1, ctx) {
1110
+ let first;
1111
+ let ruleitem;
1112
+ let current;
1113
+
1114
+ const ruleitem_spread_levels = [
1115
+ {
1116
+ type: /*type*/ ctx[7],
1117
+ data: /*data*/ ctx[8],
1118
+ pxmm: /*pxmm*/ ctx[0],
1119
+ bounding: /*bounding*/ ctx[2]
1120
+ }
1121
+ ];
1122
+
1123
+ let ruleitem_props = {};
1124
+
1125
+ for (let i = 0; i < ruleitem_spread_levels.length; i += 1) {
1126
+ ruleitem_props = internal.assign(ruleitem_props, ruleitem_spread_levels[i]);
1127
+ }
1128
+
1129
+ ruleitem = new RuleItem({ props: ruleitem_props });
1130
+
1131
+ return {
1132
+ key: key_1,
1133
+ first: null,
1134
+ c() {
1135
+ first = internal.empty();
1136
+ internal.create_component(ruleitem.$$.fragment);
1137
+ this.first = first;
1138
+ },
1139
+ m(target, anchor) {
1140
+ internal.insert(target, first, anchor);
1141
+ internal.mount_component(ruleitem, target, anchor);
1142
+ current = true;
1143
+ },
1144
+ p(new_ctx, dirty) {
1145
+ ctx = new_ctx;
1146
+
1147
+ const ruleitem_changes = (dirty & /*ruleLabelArray, pxmm, bounding*/ 7)
1148
+ ? internal.get_spread_update(ruleitem_spread_levels, [
1149
+ {
1150
+ type: /*type*/ ctx[7],
1151
+ data: /*data*/ ctx[8],
1152
+ pxmm: /*pxmm*/ ctx[0],
1153
+ bounding: /*bounding*/ ctx[2]
1154
+ }
1155
+ ])
1156
+ : {};
1157
+
1158
+ ruleitem.$set(ruleitem_changes);
1159
+ },
1160
+ i(local) {
1161
+ if (current) return;
1162
+ internal.transition_in(ruleitem.$$.fragment, local);
1163
+ current = true;
1164
+ },
1165
+ o(local) {
1166
+ internal.transition_out(ruleitem.$$.fragment, local);
1167
+ current = false;
1168
+ },
1169
+ d(detaching) {
1170
+ if (detaching) internal.detach(first);
1171
+ internal.destroy_component(ruleitem, detaching);
1172
+ }
1173
+ };
1174
+ }
1175
+
1176
+ function create_fragment$b(ctx) {
1177
+ let div;
1178
+ let each_blocks = [];
1179
+ let each_1_lookup = new Map();
1180
+ let current;
1181
+ let each_value = /*ruleLabelArray*/ ctx[1];
1182
+ const get_key = ctx => /*type*/ ctx[7];
1183
+
1184
+ for (let i = 0; i < each_value.length; i += 1) {
1185
+ let child_ctx = get_each_context$2(ctx, each_value, i);
1186
+ let key = get_key(child_ctx);
1187
+ each_1_lookup.set(key, each_blocks[i] = create_each_block$2(key, child_ctx));
1188
+ }
1189
+
1190
+ return {
1191
+ c() {
1192
+ div = internal.element("div");
1193
+
1194
+ for (let i = 0; i < each_blocks.length; i += 1) {
1195
+ each_blocks[i].c();
1196
+ }
1197
+
1198
+ internal.attr(div, "class", "floorplan-plugin__rulelabels");
1199
+ },
1200
+ m(target, anchor) {
1201
+ internal.insert(target, div, anchor);
1202
+
1203
+ for (let i = 0; i < each_blocks.length; i += 1) {
1204
+ each_blocks[i].m(div, null);
1205
+ }
1206
+
1207
+ current = true;
1208
+ },
1209
+ p(ctx, [dirty]) {
1210
+ if (dirty & /*ruleLabelArray, pxmm, bounding*/ 7) {
1211
+ each_value = /*ruleLabelArray*/ ctx[1];
1212
+ internal.group_outros();
1213
+ each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, div, internal.outro_and_destroy_block, create_each_block$2, null, get_each_context$2);
1214
+ internal.check_outros();
1215
+ }
1216
+ },
1217
+ i(local) {
1218
+ if (current) return;
1219
+
1220
+ for (let i = 0; i < each_value.length; i += 1) {
1221
+ internal.transition_in(each_blocks[i]);
1222
+ }
1223
+
1224
+ current = true;
1225
+ },
1226
+ o(local) {
1227
+ for (let i = 0; i < each_blocks.length; i += 1) {
1228
+ internal.transition_out(each_blocks[i]);
1229
+ }
1230
+
1231
+ current = false;
1232
+ },
1233
+ d(detaching) {
1234
+ if (detaching) internal.detach(div);
1235
+
1236
+ for (let i = 0; i < each_blocks.length; i += 1) {
1237
+ each_blocks[i].d();
1238
+ }
1239
+ }
1240
+ };
1241
+ }
1242
+
1243
+ function instance$b($$self, $$props, $$invalidate) {
1244
+ let bounding;
1245
+ let ruleLabelData;
1246
+ let ruleLabelDataKeys;
1247
+ let ruleLabelArray;
1248
+ let { pxmm } = $$props;
1249
+ let { floorIndex } = $$props;
1250
+ let { floorplanData } = $$props;
1251
+
1252
+ $$self.$$set = $$props => {
1253
+ if ('pxmm' in $$props) $$invalidate(0, pxmm = $$props.pxmm);
1254
+ if ('floorIndex' in $$props) $$invalidate(3, floorIndex = $$props.floorIndex);
1255
+ if ('floorplanData' in $$props) $$invalidate(4, floorplanData = $$props.floorplanData);
1256
+ };
1257
+
1258
+ $$self.$$.update = () => {
1259
+ if ($$self.$$.dirty & /*floorplanData*/ 16) {
1260
+ $$invalidate(2, bounding = floorplanData.bounding);
1261
+ }
1262
+
1263
+ if ($$self.$$.dirty & /*floorplanData, floorIndex*/ 24) {
1264
+ $$invalidate(5, ruleLabelData = floorplanData.floorDatas[floorIndex].rules);
1265
+ }
1266
+
1267
+ if ($$self.$$.dirty & /*ruleLabelData*/ 32) {
1268
+ $$invalidate(6, ruleLabelDataKeys = Object.keys(ruleLabelData));
1269
+ }
1270
+
1271
+ if ($$self.$$.dirty & /*ruleLabelDataKeys, ruleLabelData*/ 96) {
1272
+ $$invalidate(1, ruleLabelArray = ruleLabelDataKeys.map(key => [key, ruleLabelData[key]]));
1273
+ }
1274
+ };
1275
+
1276
+ return [
1277
+ pxmm,
1278
+ ruleLabelArray,
1279
+ bounding,
1280
+ floorIndex,
1281
+ floorplanData,
1282
+ ruleLabelData,
1283
+ ruleLabelDataKeys
1284
+ ];
1285
+ }
1286
+
1287
+ class RuleLabels extends internal.SvelteComponent {
1288
+ constructor(options) {
1289
+ super();
1290
+ internal.init(this, options, instance$b, create_fragment$b, internal.safe_not_equal, { pxmm: 0, floorIndex: 3, floorplanData: 4 });
1291
+ }
1292
+ }
1293
+
1294
+ /* src/floorplan/Components/Normalmage.svelte generated by Svelte v3.47.0 */
1295
+
1296
+ function add_css$7(target) {
1297
+ internal.append_styles(target, "svelte-1cuuebb", "img.svelte-1cuuebb{width:100%;height:100%}");
1298
+ }
1299
+
1300
+ function create_fragment$a(ctx) {
1301
+ let img;
1302
+ let img_src_value;
1303
+
1304
+ return {
1305
+ c() {
1306
+ img = internal.element("img");
1307
+ if (!internal.src_url_equal(img.src, img_src_value = /*url*/ ctx[0])) internal.attr(img, "src", img_src_value);
1308
+ internal.attr(img, "alt", "floorplan iamge");
1309
+ internal.attr(img, "class", "svelte-1cuuebb");
1310
+ },
1311
+ m(target, anchor) {
1312
+ internal.insert(target, img, anchor);
1313
+ },
1314
+ p(ctx, [dirty]) {
1315
+ if (dirty & /*url*/ 1 && !internal.src_url_equal(img.src, img_src_value = /*url*/ ctx[0])) {
1316
+ internal.attr(img, "src", img_src_value);
1317
+ }
1318
+ },
1319
+ i: internal.noop,
1320
+ o: internal.noop,
1321
+ d(detaching) {
1322
+ if (detaching) internal.detach(img);
1323
+ }
1324
+ };
1325
+ }
1326
+
1327
+ function instance$a($$self, $$props, $$invalidate) {
1328
+ let { url } = $$props;
1329
+
1330
+ $$self.$$set = $$props => {
1331
+ if ('url' in $$props) $$invalidate(0, url = $$props.url);
1332
+ };
1333
+
1334
+ return [url];
1335
+ }
1336
+
1337
+ class Normalmage extends internal.SvelteComponent {
1338
+ constructor(options) {
1339
+ super();
1340
+ internal.init(this, options, instance$a, create_fragment$a, internal.safe_not_equal, { url: 0 }, add_css$7);
1341
+ }
1342
+ }
1343
+
1344
+ /* src/floorplan/Components/SvgImage.svelte generated by Svelte v3.47.0 */
1345
+
1346
+ function add_css$6(target) {
1347
+ internal.append_styles(target, "svelte-1qqy56u", ".floorplan-plugin__base-image.svelte-1qqy56u{width:100%;height:100%}");
1348
+ }
1349
+
1350
+ function create_fragment$9(ctx) {
1351
+ let div;
1352
+ let html_tag;
1353
+ let t;
1354
+ let html_tag_1;
1355
+
1356
+ return {
1357
+ c() {
1358
+ div = internal.element("div");
1359
+ html_tag = new internal.HtmlTag();
1360
+ t = internal.space();
1361
+ html_tag_1 = new internal.HtmlTag();
1362
+ html_tag.a = t;
1363
+ html_tag_1.a = null;
1364
+ internal.attr(div, "class", "floorplan-plugin__base-image svelte-1qqy56u");
1365
+ },
1366
+ m(target, anchor) {
1367
+ internal.insert(target, div, anchor);
1368
+ html_tag.m(/*svgStyle*/ ctx[1], div);
1369
+ internal.append(div, t);
1370
+ html_tag_1.m(/*content*/ ctx[0], div);
1371
+ },
1372
+ p(ctx, [dirty]) {
1373
+ if (dirty & /*content*/ 1) html_tag_1.p(/*content*/ ctx[0]);
1374
+ },
1375
+ i: internal.noop,
1376
+ o: internal.noop,
1377
+ d(detaching) {
1378
+ if (detaching) internal.detach(div);
1379
+ }
1380
+ };
1381
+ }
1382
+
1383
+ function instance$9($$self, $$props, $$invalidate) {
1384
+ let { content } = $$props;
1385
+
1386
+ const svgStyle = `
1387
+ <style>
1388
+ svg [type='lineGroup'] path {
1389
+ fill: #ffffff;
1390
+ stroke: #ffffff;
1391
+ }
1392
+ svg [type='lineItemGroup'] g g g g {
1393
+ stroke: #ffffff;
1394
+ }
1395
+ </style>
1396
+ `;
1397
+
1398
+ $$self.$$set = $$props => {
1399
+ if ('content' in $$props) $$invalidate(0, content = $$props.content);
1400
+ };
1401
+
1402
+ return [content, svgStyle];
1403
+ }
1404
+
1405
+ class SvgImage extends internal.SvelteComponent {
1406
+ constructor(options) {
1407
+ super();
1408
+ internal.init(this, options, instance$9, create_fragment$9, internal.safe_not_equal, { content: 0 }, add_css$6);
1409
+ }
1410
+ }
1411
+
1412
+ /* src/floorplan/Components/BaseImage.svelte generated by Svelte v3.47.0 */
1413
+
1414
+ function add_css$5(target) {
1415
+ internal.append_styles(target, "svelte-126ja8e", ".floorplan-plugin__base-image.svelte-126ja8e{position:absolute;z-index:10;width:100%;height:100%;pointer-events:none}");
1416
+ }
1417
+
1418
+ // (12:22)
1419
+ function create_if_block_1$3(ctx) {
1420
+ let normalimage;
1421
+ let current;
1422
+ normalimage = new Normalmage({ props: { url: /*imageData*/ ctx[1].url } });
1423
+
1424
+ return {
1425
+ c() {
1426
+ internal.create_component(normalimage.$$.fragment);
1427
+ },
1428
+ m(target, anchor) {
1429
+ internal.mount_component(normalimage, target, anchor);
1430
+ current = true;
1431
+ },
1432
+ p(ctx, dirty) {
1433
+ const normalimage_changes = {};
1434
+ if (dirty & /*imageData*/ 2) normalimage_changes.url = /*imageData*/ ctx[1].url;
1435
+ normalimage.$set(normalimage_changes);
1436
+ },
1437
+ i(local) {
1438
+ if (current) return;
1439
+ internal.transition_in(normalimage.$$.fragment, local);
1440
+ current = true;
1441
+ },
1442
+ o(local) {
1443
+ internal.transition_out(normalimage.$$.fragment, local);
1444
+ current = false;
1445
+ },
1446
+ d(detaching) {
1447
+ internal.destroy_component(normalimage, detaching);
1448
+ }
1449
+ };
1450
+ }
1451
+
1452
+ // (10:2) {#if svgContent}
1453
+ function create_if_block$3(ctx) {
1454
+ let svgimage;
1455
+ let current;
1456
+
1457
+ svgimage = new SvgImage({
1458
+ props: { content: /*svgContent*/ ctx[0] }
1459
+ });
1460
+
1461
+ return {
1462
+ c() {
1463
+ internal.create_component(svgimage.$$.fragment);
1464
+ },
1465
+ m(target, anchor) {
1466
+ internal.mount_component(svgimage, target, anchor);
1467
+ current = true;
1468
+ },
1469
+ p(ctx, dirty) {
1470
+ const svgimage_changes = {};
1471
+ if (dirty & /*svgContent*/ 1) svgimage_changes.content = /*svgContent*/ ctx[0];
1472
+ svgimage.$set(svgimage_changes);
1473
+ },
1474
+ i(local) {
1475
+ if (current) return;
1476
+ internal.transition_in(svgimage.$$.fragment, local);
1477
+ current = true;
1478
+ },
1479
+ o(local) {
1480
+ internal.transition_out(svgimage.$$.fragment, local);
1481
+ current = false;
1482
+ },
1483
+ d(detaching) {
1484
+ internal.destroy_component(svgimage, detaching);
1485
+ }
1486
+ };
1487
+ }
1488
+
1489
+ function create_fragment$8(ctx) {
1490
+ let div;
1491
+ let current_block_type_index;
1492
+ let if_block;
1493
+ let current;
1494
+ const if_block_creators = [create_if_block$3, create_if_block_1$3];
1495
+ const if_blocks = [];
1496
+
1497
+ function select_block_type(ctx, dirty) {
1498
+ if (/*svgContent*/ ctx[0]) return 0;
1499
+ if (/*imageData*/ ctx[1]) return 1;
1500
+ return -1;
1501
+ }
1502
+
1503
+ if (~(current_block_type_index = select_block_type(ctx))) {
1504
+ if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
1505
+ }
1506
+
1507
+ return {
1508
+ c() {
1509
+ div = internal.element("div");
1510
+ if (if_block) if_block.c();
1511
+ internal.attr(div, "class", "floorplan-plugin__base-image svelte-126ja8e");
1512
+ },
1513
+ m(target, anchor) {
1514
+ internal.insert(target, div, anchor);
1515
+
1516
+ if (~current_block_type_index) {
1517
+ if_blocks[current_block_type_index].m(div, null);
1518
+ }
1519
+
1520
+ current = true;
1521
+ },
1522
+ p(ctx, [dirty]) {
1523
+ let previous_block_index = current_block_type_index;
1524
+ current_block_type_index = select_block_type(ctx);
1525
+
1526
+ if (current_block_type_index === previous_block_index) {
1527
+ if (~current_block_type_index) {
1528
+ if_blocks[current_block_type_index].p(ctx, dirty);
1529
+ }
1530
+ } else {
1531
+ if (if_block) {
1532
+ internal.group_outros();
1533
+
1534
+ internal.transition_out(if_blocks[previous_block_index], 1, 1, () => {
1535
+ if_blocks[previous_block_index] = null;
1536
+ });
1537
+
1538
+ internal.check_outros();
1539
+ }
1540
+
1541
+ if (~current_block_type_index) {
1542
+ if_block = if_blocks[current_block_type_index];
1543
+
1544
+ if (!if_block) {
1545
+ if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
1546
+ if_block.c();
1547
+ } else {
1548
+ if_block.p(ctx, dirty);
1549
+ }
1550
+
1551
+ internal.transition_in(if_block, 1);
1552
+ if_block.m(div, null);
1553
+ } else {
1554
+ if_block = null;
1555
+ }
1556
+ }
1557
+ },
1558
+ i(local) {
1559
+ if (current) return;
1560
+ internal.transition_in(if_block);
1561
+ current = true;
1562
+ },
1563
+ o(local) {
1564
+ internal.transition_out(if_block);
1565
+ current = false;
1566
+ },
1567
+ d(detaching) {
1568
+ if (detaching) internal.detach(div);
1569
+
1570
+ if (~current_block_type_index) {
1571
+ if_blocks[current_block_type_index].d();
1572
+ }
1573
+ }
1574
+ };
1575
+ }
1576
+
1577
+ function instance$8($$self, $$props, $$invalidate) {
1578
+ let imageData;
1579
+ let svgContent;
1580
+ let { floorIndex } = $$props;
1581
+ let { floorplanData } = $$props;
1582
+
1583
+ $$self.$$set = $$props => {
1584
+ if ('floorIndex' in $$props) $$invalidate(2, floorIndex = $$props.floorIndex);
1585
+ if ('floorplanData' in $$props) $$invalidate(3, floorplanData = $$props.floorplanData);
1586
+ };
1587
+
1588
+ $$self.$$.update = () => {
1589
+ if ($$self.$$.dirty & /*floorplanData, floorIndex*/ 12) {
1590
+ $$invalidate(1, imageData = floorplanData.outlines[floorIndex]);
1591
+ }
1592
+
1593
+ if ($$self.$$.dirty & /*floorplanData, floorIndex*/ 12) {
1594
+ $$invalidate(0, svgContent = floorplanData.outlines?.[floorIndex]?.svgContent);
1595
+ }
1596
+ };
1597
+
1598
+ return [svgContent, imageData, floorIndex, floorplanData];
1599
+ }
1600
+
1601
+ class BaseImage extends internal.SvelteComponent {
1602
+ constructor(options) {
1603
+ super();
1604
+ internal.init(this, options, instance$8, create_fragment$8, internal.safe_not_equal, { floorIndex: 2, floorplanData: 3 }, add_css$5);
1605
+ }
1606
+ }
1607
+
1608
+ /* src/floorplan/Components/RoomMaterials/RoomMaterial_0.svelte generated by Svelte v3.47.0 */
1609
+
1610
+ function create_fragment$7(ctx) {
1611
+ let path_1;
1612
+
1613
+ return {
1614
+ c() {
1615
+ path_1 = internal.svg_element("path");
1616
+ internal.attr(path_1, "d", /*d*/ ctx[0]);
1617
+ internal.attr(path_1, "fill", "#2F313A");
1618
+ },
1619
+ m(target, anchor) {
1620
+ internal.insert(target, path_1, anchor);
1621
+ },
1622
+ p(ctx, [dirty]) {
1623
+ if (dirty & /*d*/ 1) {
1624
+ internal.attr(path_1, "d", /*d*/ ctx[0]);
1625
+ }
1626
+ },
1627
+ i: internal.noop,
1628
+ o: internal.noop,
1629
+ d(detaching) {
1630
+ if (detaching) internal.detach(path_1);
1631
+ }
1632
+ };
1633
+ }
1634
+
1635
+ function instance$7($$self, $$props, $$invalidate) {
1636
+ let d;
1637
+ let { path } = $$props;
1638
+
1639
+ $$self.$$set = $$props => {
1640
+ if ('path' in $$props) $$invalidate(1, path = $$props.path);
1641
+ };
1642
+
1643
+ $$self.$$.update = () => {
1644
+ if ($$self.$$.dirty & /*path*/ 2) {
1645
+ $$invalidate(0, d = pathD(path, { needZ: true }));
1646
+ }
1647
+ };
1648
+
1649
+ return [d, path];
1650
+ }
1651
+
1652
+ class RoomMaterial_0 extends internal.SvelteComponent {
1653
+ constructor(options) {
1654
+ super();
1655
+ internal.init(this, options, instance$7, create_fragment$7, internal.safe_not_equal, { path: 1 });
1656
+ }
1657
+ }
1658
+
1659
+ /* src/floorplan/Components/RoomMaterials/RoomMaterial_1.svelte generated by Svelte v3.47.0 */
1660
+
1661
+ function create_fragment$6(ctx) {
1662
+ let defs;
1663
+ let pattern;
1664
+ let rect;
1665
+ let path0;
1666
+ let t;
1667
+ let path1;
1668
+
1669
+ return {
1670
+ c() {
1671
+ defs = internal.svg_element("defs");
1672
+ pattern = internal.svg_element("pattern");
1673
+ rect = internal.svg_element("rect");
1674
+ path0 = internal.svg_element("path");
1675
+ t = internal.space();
1676
+ path1 = internal.svg_element("path");
1677
+ internal.attr(rect, "x", "0");
1678
+ internal.attr(rect, "y", "0");
1679
+ internal.attr(rect, "width", /*width*/ ctx[1]);
1680
+ internal.attr(rect, "height", /*width*/ ctx[1]);
1681
+ internal.attr(rect, "fill", "#323747");
1682
+ internal.attr(path0, "d", /*patternPathD*/ ctx[2]);
1683
+ internal.attr(path0, "stroke", "#ffffff");
1684
+ internal.attr(path0, "stroke-opacity", "0.06");
1685
+ internal.attr(path0, "stroke-width", "0.5");
1686
+ internal.attr(path0, "fill", "none");
1687
+ internal.attr(pattern, "id", "fpm-room-pattern-0");
1688
+ internal.attr(pattern, "x", "0");
1689
+ internal.attr(pattern, "y", "0");
1690
+ internal.attr(pattern, "width", /*width*/ ctx[1]);
1691
+ internal.attr(pattern, "height", /*width*/ ctx[1]);
1692
+ internal.attr(pattern, "patternUnits", "userSpaceOnUse");
1693
+ internal.attr(path1, "d", /*d*/ ctx[0]);
1694
+ internal.attr(path1, "fill", "url(#fpm-room-pattern-0)");
1695
+ },
1696
+ m(target, anchor) {
1697
+ internal.insert(target, defs, anchor);
1698
+ internal.append(defs, pattern);
1699
+ internal.append(pattern, rect);
1700
+ internal.append(pattern, path0);
1701
+ internal.insert(target, t, anchor);
1702
+ internal.insert(target, path1, anchor);
1703
+ },
1704
+ p(ctx, [dirty]) {
1705
+ if (dirty & /*d*/ 1) {
1706
+ internal.attr(path1, "d", /*d*/ ctx[0]);
1707
+ }
1708
+ },
1709
+ i: internal.noop,
1710
+ o: internal.noop,
1711
+ d(detaching) {
1712
+ if (detaching) internal.detach(defs);
1713
+ if (detaching) internal.detach(t);
1714
+ if (detaching) internal.detach(path1);
1715
+ }
1716
+ };
1717
+ }
1718
+
1719
+ const halfWidth = 6;
1720
+
1721
+ function instance$6($$self, $$props, $$invalidate) {
1722
+ let d;
1723
+ let { path } = $$props;
1724
+ const width = halfWidth * 2;
1725
+ const patternPathD = `M0 ${halfWidth} h ${width} M${halfWidth} 0 v ${width}`;
1726
+
1727
+ $$self.$$set = $$props => {
1728
+ if ('path' in $$props) $$invalidate(3, path = $$props.path);
1729
+ };
1730
+
1731
+ $$self.$$.update = () => {
1732
+ if ($$self.$$.dirty & /*path*/ 8) {
1733
+ $$invalidate(0, d = pathD(path, { needZ: true }));
1734
+ }
1735
+ };
1736
+
1737
+ return [d, width, patternPathD, path];
1738
+ }
1739
+
1740
+ class RoomMaterial_1 extends internal.SvelteComponent {
1741
+ constructor(options) {
1742
+ super();
1743
+ internal.init(this, options, instance$6, create_fragment$6, internal.safe_not_equal, { path: 3 });
1744
+ }
1745
+ }
1746
+
1747
+ /* src/floorplan/Components/RoomMaterials/RoomMaterial_2.svelte generated by Svelte v3.47.0 */
1748
+
1749
+ function create_fragment$5(ctx) {
1750
+ let defs;
1751
+ let pattern0;
1752
+ let rect0;
1753
+ let pattern1;
1754
+ let rect1;
1755
+ let t0;
1756
+ let path0;
1757
+ let t1;
1758
+ let path1;
1759
+ let t2;
1760
+ let path2;
1761
+
1762
+ return {
1763
+ c() {
1764
+ defs = internal.svg_element("defs");
1765
+ pattern0 = internal.svg_element("pattern");
1766
+ rect0 = internal.svg_element("rect");
1767
+ pattern1 = internal.svg_element("pattern");
1768
+ rect1 = internal.svg_element("rect");
1769
+ t0 = internal.space();
1770
+ path0 = internal.svg_element("path");
1771
+ t1 = internal.space();
1772
+ path1 = internal.svg_element("path");
1773
+ t2 = internal.space();
1774
+ path2 = internal.svg_element("path");
1775
+ internal.attr(rect0, "x", "0.5");
1776
+ internal.attr(rect0, "y", "0.5");
1777
+ internal.attr(rect0, "width", "6");
1778
+ internal.attr(rect0, "height", "50");
1779
+ internal.attr(rect0, "fill", "none");
1780
+ internal.attr(rect0, "stroke", "#4B4B57");
1781
+ internal.attr(rect0, "stroke-width", "0.5");
1782
+ internal.attr(pattern0, "id", "room-material-pattern-1");
1783
+ internal.attr(pattern0, "x", "0");
1784
+ internal.attr(pattern0, "y", "0");
1785
+ internal.attr(pattern0, "width", "13");
1786
+ internal.attr(pattern0, "height", "51");
1787
+ internal.attr(pattern0, "patternUnits", "userSpaceOnUse");
1788
+ internal.attr(rect1, "x", "0.5");
1789
+ internal.attr(rect1, "y", "0.5");
1790
+ internal.attr(rect1, "width", "6");
1791
+ internal.attr(rect1, "height", "50");
1792
+ internal.attr(rect1, "fill", "none");
1793
+ internal.attr(rect1, "stroke", "#4B4B57");
1794
+ internal.attr(rect1, "stroke-width", "0.5");
1795
+ internal.attr(pattern1, "id", "room-material-pattern-2");
1796
+ internal.attr(pattern1, "x", "7");
1797
+ internal.attr(pattern1, "y", "25");
1798
+ internal.attr(pattern1, "width", "13");
1799
+ internal.attr(pattern1, "height", "51");
1800
+ internal.attr(pattern1, "patternUnits", "userSpaceOnUse");
1801
+ internal.attr(path0, "d", /*d*/ ctx[0]);
1802
+ internal.attr(path0, "fill", "#43434D");
1803
+ internal.attr(path1, "d", /*d*/ ctx[0]);
1804
+ internal.attr(path1, "fill", "url(#room-material-pattern-1)");
1805
+ internal.attr(path2, "d", /*d*/ ctx[0]);
1806
+ internal.attr(path2, "fill", "url(#room-material-pattern-2)");
1807
+ },
1808
+ m(target, anchor) {
1809
+ internal.insert(target, defs, anchor);
1810
+ internal.append(defs, pattern0);
1811
+ internal.append(pattern0, rect0);
1812
+ internal.append(defs, pattern1);
1813
+ internal.append(pattern1, rect1);
1814
+ internal.insert(target, t0, anchor);
1815
+ internal.insert(target, path0, anchor);
1816
+ internal.insert(target, t1, anchor);
1817
+ internal.insert(target, path1, anchor);
1818
+ internal.insert(target, t2, anchor);
1819
+ internal.insert(target, path2, anchor);
1820
+ },
1821
+ p(ctx, [dirty]) {
1822
+ if (dirty & /*d*/ 1) {
1823
+ internal.attr(path0, "d", /*d*/ ctx[0]);
1824
+ }
1825
+
1826
+ if (dirty & /*d*/ 1) {
1827
+ internal.attr(path1, "d", /*d*/ ctx[0]);
1828
+ }
1829
+
1830
+ if (dirty & /*d*/ 1) {
1831
+ internal.attr(path2, "d", /*d*/ ctx[0]);
1832
+ }
1833
+ },
1834
+ i: internal.noop,
1835
+ o: internal.noop,
1836
+ d(detaching) {
1837
+ if (detaching) internal.detach(defs);
1838
+ if (detaching) internal.detach(t0);
1839
+ if (detaching) internal.detach(path0);
1840
+ if (detaching) internal.detach(t1);
1841
+ if (detaching) internal.detach(path1);
1842
+ if (detaching) internal.detach(t2);
1843
+ if (detaching) internal.detach(path2);
1844
+ }
1845
+ };
1846
+ }
1847
+
1848
+ function instance$5($$self, $$props, $$invalidate) {
1849
+ let d;
1850
+ let { path } = $$props;
1851
+
1852
+ $$self.$$set = $$props => {
1853
+ if ('path' in $$props) $$invalidate(1, path = $$props.path);
1854
+ };
1855
+
1856
+ $$self.$$.update = () => {
1857
+ if ($$self.$$.dirty & /*path*/ 2) {
1858
+ $$invalidate(0, d = pathD(path, { needZ: true }));
1859
+ }
1860
+ };
1861
+
1862
+ return [d, path];
1863
+ }
1864
+
1865
+ class RoomMaterial_2 extends internal.SvelteComponent {
1866
+ constructor(options) {
1867
+ super();
1868
+ internal.init(this, options, instance$5, create_fragment$5, internal.safe_not_equal, { path: 1 });
1869
+ }
1870
+ }
1871
+
1872
+ /* src/floorplan/Components/RoomMaterials/RoomMaterial.svelte generated by Svelte v3.47.0 */
1873
+
1874
+ function add_css$4(target) {
1875
+ internal.append_styles(target, "svelte-1b0icjc", "svg.svelte-1b0icjc{position:absolute;width:100%;height:100%;overflow:visible}");
1876
+ }
1877
+
1878
+ function get_each_context$1(ctx, list, i) {
1879
+ const child_ctx = ctx.slice();
1880
+ child_ctx[4] = list[i];
1881
+ return child_ctx;
1882
+ }
1883
+
1884
+ // (21:6) {:else}
1885
+ function create_else_block(ctx) {
1886
+ let roommaterial_1;
1887
+ let current;
1888
+ roommaterial_1 = new RoomMaterial_1({ props: { path: /*room*/ ctx[4].path } });
1889
+
1890
+ return {
1891
+ c() {
1892
+ internal.create_component(roommaterial_1.$$.fragment);
1893
+ },
1894
+ m(target, anchor) {
1895
+ internal.mount_component(roommaterial_1, target, anchor);
1896
+ current = true;
1897
+ },
1898
+ p(ctx, dirty) {
1899
+ const roommaterial_1_changes = {};
1900
+ if (dirty & /*rooms*/ 1) roommaterial_1_changes.path = /*room*/ ctx[4].path;
1901
+ roommaterial_1.$set(roommaterial_1_changes);
1902
+ },
1903
+ i(local) {
1904
+ if (current) return;
1905
+ internal.transition_in(roommaterial_1.$$.fragment, local);
1906
+ current = true;
1907
+ },
1908
+ o(local) {
1909
+ internal.transition_out(roommaterial_1.$$.fragment, local);
1910
+ current = false;
1911
+ },
1912
+ d(detaching) {
1913
+ internal.destroy_component(roommaterial_1, detaching);
1914
+ }
1915
+ };
1916
+ }
1917
+
1918
+ // (19:37)
1919
+ function create_if_block_1$2(ctx) {
1920
+ let roommaterial_2;
1921
+ let current;
1922
+ roommaterial_2 = new RoomMaterial_2({ props: { path: /*room*/ ctx[4].path } });
1923
+
1924
+ return {
1925
+ c() {
1926
+ internal.create_component(roommaterial_2.$$.fragment);
1927
+ },
1928
+ m(target, anchor) {
1929
+ internal.mount_component(roommaterial_2, target, anchor);
1930
+ current = true;
1931
+ },
1932
+ p(ctx, dirty) {
1933
+ const roommaterial_2_changes = {};
1934
+ if (dirty & /*rooms*/ 1) roommaterial_2_changes.path = /*room*/ ctx[4].path;
1935
+ roommaterial_2.$set(roommaterial_2_changes);
1936
+ },
1937
+ i(local) {
1938
+ if (current) return;
1939
+ internal.transition_in(roommaterial_2.$$.fragment, local);
1940
+ current = true;
1941
+ },
1942
+ o(local) {
1943
+ internal.transition_out(roommaterial_2.$$.fragment, local);
1944
+ current = false;
1945
+ },
1946
+ d(detaching) {
1947
+ internal.destroy_component(roommaterial_2, detaching);
1948
+ }
1949
+ };
1950
+ }
1951
+
1952
+ // (17:6) {#if room.floorType === 1}
1953
+ function create_if_block$2(ctx) {
1954
+ let roommaterial_0;
1955
+ let current;
1956
+ roommaterial_0 = new RoomMaterial_0({ props: { path: /*room*/ ctx[4].path } });
1957
+
1958
+ return {
1959
+ c() {
1960
+ internal.create_component(roommaterial_0.$$.fragment);
1961
+ },
1962
+ m(target, anchor) {
1963
+ internal.mount_component(roommaterial_0, target, anchor);
1964
+ current = true;
1965
+ },
1966
+ p(ctx, dirty) {
1967
+ const roommaterial_0_changes = {};
1968
+ if (dirty & /*rooms*/ 1) roommaterial_0_changes.path = /*room*/ ctx[4].path;
1969
+ roommaterial_0.$set(roommaterial_0_changes);
1970
+ },
1971
+ i(local) {
1972
+ if (current) return;
1973
+ internal.transition_in(roommaterial_0.$$.fragment, local);
1974
+ current = true;
1975
+ },
1976
+ o(local) {
1977
+ internal.transition_out(roommaterial_0.$$.fragment, local);
1978
+ current = false;
1979
+ },
1980
+ d(detaching) {
1981
+ internal.destroy_component(roommaterial_0, detaching);
1982
+ }
1983
+ };
1984
+ }
1985
+
1986
+ // (15:2) {#each rooms as room}
1987
+ function create_each_block$1(ctx) {
1988
+ let svg;
1989
+ let current_block_type_index;
1990
+ let if_block;
1991
+ let current;
1992
+ const if_block_creators = [create_if_block$2, create_if_block_1$2, create_else_block];
1993
+ const if_blocks = [];
1994
+
1995
+ function select_block_type(ctx, dirty) {
1996
+ if (/*room*/ ctx[4].floorType === 1) return 0;
1997
+ if (/*room*/ ctx[4].floorType === 0) return 1;
1998
+ return 2;
1999
+ }
2000
+
2001
+ current_block_type_index = select_block_type(ctx);
2002
+ if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
2003
+
2004
+ return {
2005
+ c() {
2006
+ svg = internal.svg_element("svg");
2007
+ if_block.c();
2008
+ internal.attr(svg, "class", "svelte-1b0icjc");
2009
+ },
2010
+ m(target, anchor) {
2011
+ internal.insert(target, svg, anchor);
2012
+ if_blocks[current_block_type_index].m(svg, null);
2013
+ current = true;
2014
+ },
2015
+ p(ctx, dirty) {
2016
+ let previous_block_index = current_block_type_index;
2017
+ current_block_type_index = select_block_type(ctx);
2018
+
2019
+ if (current_block_type_index === previous_block_index) {
2020
+ if_blocks[current_block_type_index].p(ctx, dirty);
2021
+ } else {
2022
+ internal.group_outros();
2023
+
2024
+ internal.transition_out(if_blocks[previous_block_index], 1, 1, () => {
2025
+ if_blocks[previous_block_index] = null;
2026
+ });
2027
+
2028
+ internal.check_outros();
2029
+ if_block = if_blocks[current_block_type_index];
2030
+
2031
+ if (!if_block) {
2032
+ if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
2033
+ if_block.c();
2034
+ } else {
2035
+ if_block.p(ctx, dirty);
2036
+ }
2037
+
2038
+ internal.transition_in(if_block, 1);
2039
+ if_block.m(svg, null);
2040
+ }
2041
+ },
2042
+ i(local) {
2043
+ if (current) return;
2044
+ internal.transition_in(if_block);
2045
+ current = true;
2046
+ },
2047
+ o(local) {
2048
+ internal.transition_out(if_block);
2049
+ current = false;
2050
+ },
2051
+ d(detaching) {
2052
+ if (detaching) internal.detach(svg);
2053
+ if_blocks[current_block_type_index].d();
2054
+ }
2055
+ };
2056
+ }
2057
+
2058
+ function create_fragment$4(ctx) {
2059
+ let div;
2060
+ let current;
2061
+ let each_value = /*rooms*/ ctx[0];
2062
+ let each_blocks = [];
2063
+
2064
+ for (let i = 0; i < each_value.length; i += 1) {
2065
+ each_blocks[i] = create_each_block$1(get_each_context$1(ctx, each_value, i));
2066
+ }
2067
+
2068
+ const out = i => internal.transition_out(each_blocks[i], 1, 1, () => {
2069
+ each_blocks[i] = null;
2070
+ });
2071
+
2072
+ return {
2073
+ c() {
2074
+ div = internal.element("div");
2075
+
2076
+ for (let i = 0; i < each_blocks.length; i += 1) {
2077
+ each_blocks[i].c();
2078
+ }
2079
+
2080
+ internal.attr(div, "class", "floorplan-plugin__room-material");
2081
+ },
2082
+ m(target, anchor) {
2083
+ internal.insert(target, div, anchor);
2084
+
2085
+ for (let i = 0; i < each_blocks.length; i += 1) {
2086
+ each_blocks[i].m(div, null);
2087
+ }
2088
+
2089
+ current = true;
2090
+ },
2091
+ p(ctx, [dirty]) {
2092
+ if (dirty & /*rooms*/ 1) {
2093
+ each_value = /*rooms*/ ctx[0];
2094
+ let i;
2095
+
2096
+ for (i = 0; i < each_value.length; i += 1) {
2097
+ const child_ctx = get_each_context$1(ctx, each_value, i);
2098
+
2099
+ if (each_blocks[i]) {
2100
+ each_blocks[i].p(child_ctx, dirty);
2101
+ internal.transition_in(each_blocks[i], 1);
2102
+ } else {
2103
+ each_blocks[i] = create_each_block$1(child_ctx);
2104
+ each_blocks[i].c();
2105
+ internal.transition_in(each_blocks[i], 1);
2106
+ each_blocks[i].m(div, null);
2107
+ }
2108
+ }
2109
+
2110
+ internal.group_outros();
2111
+
2112
+ for (i = each_value.length; i < each_blocks.length; i += 1) {
2113
+ out(i);
2114
+ }
2115
+
2116
+ internal.check_outros();
2117
+ }
2118
+ },
2119
+ i(local) {
2120
+ if (current) return;
2121
+
2122
+ for (let i = 0; i < each_value.length; i += 1) {
2123
+ internal.transition_in(each_blocks[i]);
2124
+ }
2125
+
2126
+ current = true;
2127
+ },
2128
+ o(local) {
2129
+ each_blocks = each_blocks.filter(Boolean);
2130
+
2131
+ for (let i = 0; i < each_blocks.length; i += 1) {
2132
+ internal.transition_out(each_blocks[i]);
2133
+ }
2134
+
2135
+ current = false;
2136
+ },
2137
+ d(detaching) {
2138
+ if (detaching) internal.detach(div);
2139
+ internal.destroy_each(each_blocks, detaching);
2140
+ }
2141
+ };
2142
+ }
2143
+
2144
+ function instance$4($$self, $$props, $$invalidate) {
2145
+ let rooms;
2146
+ let { floorIndex } = $$props;
2147
+ let { pxmm } = $$props;
2148
+ let { floorplanData } = $$props;
2149
+
2150
+ $$self.$$set = $$props => {
2151
+ if ('floorIndex' in $$props) $$invalidate(1, floorIndex = $$props.floorIndex);
2152
+ if ('pxmm' in $$props) $$invalidate(2, pxmm = $$props.pxmm);
2153
+ if ('floorplanData' in $$props) $$invalidate(3, floorplanData = $$props.floorplanData);
2154
+ };
2155
+
2156
+ $$self.$$.update = () => {
2157
+ if ($$self.$$.dirty & /*floorplanData, floorIndex, pxmm*/ 14) {
2158
+ $$invalidate(0, rooms = floorplanData.floorDatas[floorIndex].rooms.map(room => ({
2159
+ ...room,
2160
+ path: room.path.map(p => formatFloorplanPoint(p, pxmm, floorplanData.bounding))
2161
+ })));
2162
+ }
2163
+ };
2164
+
2165
+ return [rooms, floorIndex, pxmm, floorplanData];
2166
+ }
2167
+
2168
+ class RoomMaterial extends internal.SvelteComponent {
2169
+ constructor(options) {
2170
+ super();
2171
+ internal.init(this, options, instance$4, create_fragment$4, internal.safe_not_equal, { floorIndex: 1, pxmm: 2, floorplanData: 3 }, add_css$4);
2172
+ }
2173
+ }
2174
+
2175
+ /* src/floorplan/Components/RoomHighlight/Room.svelte generated by Svelte v3.47.0 */
2176
+
2177
+ function add_css$3(target) {
2178
+ internal.append_styles(target, "svelte-11takew", "path.svelte-11takew{opacity:0}path.svelte-11takew:hover{opacity:0.1}");
2179
+ }
2180
+
2181
+ function create_fragment$3(ctx) {
2182
+ let path;
2183
+
2184
+ return {
2185
+ c() {
2186
+ path = internal.svg_element("path");
2187
+ internal.attr(path, "d", /*_pathD*/ ctx[0]);
2188
+ internal.attr(path, "fill", `#fff`);
2189
+ internal.attr(path, "class", "svelte-11takew");
2190
+ },
2191
+ m(target, anchor) {
2192
+ internal.insert(target, path, anchor);
2193
+ },
2194
+ p: internal.noop,
2195
+ i: internal.noop,
2196
+ o: internal.noop,
2197
+ d(detaching) {
2198
+ if (detaching) internal.detach(path);
2199
+ }
2200
+ };
2201
+ }
2202
+
2203
+ function instance$3($$self, $$props, $$invalidate) {
2204
+ let { pxmm } = $$props;
2205
+ let { room } = $$props;
2206
+ let { floorplanData } = $$props;
2207
+ const { bounding } = floorplanData;
2208
+
2209
+ const _pathD = pathD(room.path, {
2210
+ needZ: true,
2211
+ format: vector => formatFloorplanPoint(vector, pxmm, bounding)
2212
+ });
2213
+
2214
+ $$self.$$set = $$props => {
2215
+ if ('pxmm' in $$props) $$invalidate(1, pxmm = $$props.pxmm);
2216
+ if ('room' in $$props) $$invalidate(2, room = $$props.room);
2217
+ if ('floorplanData' in $$props) $$invalidate(3, floorplanData = $$props.floorplanData);
2218
+ };
2219
+
2220
+ return [_pathD, pxmm, room, floorplanData];
2221
+ }
2222
+
2223
+ class Room extends internal.SvelteComponent {
2224
+ constructor(options) {
2225
+ super();
2226
+ internal.init(this, options, instance$3, create_fragment$3, internal.safe_not_equal, { pxmm: 1, room: 2, floorplanData: 3 }, add_css$3);
2227
+ }
2228
+ }
2229
+
2230
+ /* src/floorplan/Components/RoomHighlight/RoomHighlight.svelte generated by Svelte v3.47.0 */
2231
+
2232
+ function add_css$2(target) {
2233
+ internal.append_styles(target, "svelte-1aais5l", ".floorplan-plugin__room-highlight.svelte-1aais5l{position:absolute;width:100%;height:100%;pointer-events:all}svg.svelte-1aais5l{width:100%;height:100%;overflow:visible}");
2234
+ }
2235
+
2236
+ function get_each_context(ctx, list, i) {
2237
+ const child_ctx = ctx.slice();
2238
+ child_ctx[12] = list[i];
2239
+ return child_ctx;
2240
+ }
2241
+
2242
+ // (41:4) {#each floorplanData.floorDatas[floorIndex].rooms as room (room.id)}
2243
+ function create_each_block(key_1, ctx) {
2244
+ let first;
2245
+ let room;
2246
+ let current;
2247
+
2248
+ const room_spread_levels = [
2249
+ {
2250
+ room: /*room*/ ctx[12],
2251
+ floorplanData: /*floorplanData*/ ctx[2],
2252
+ pxmm: /*pxmm*/ ctx[0]
2253
+ }
2254
+ ];
2255
+
2256
+ let room_props = {};
2257
+
2258
+ for (let i = 0; i < room_spread_levels.length; i += 1) {
2259
+ room_props = internal.assign(room_props, room_spread_levels[i]);
2260
+ }
2261
+
2262
+ room = new Room({ props: room_props });
2263
+
2264
+ return {
2265
+ key: key_1,
2266
+ first: null,
2267
+ c() {
2268
+ first = internal.empty();
2269
+ internal.create_component(room.$$.fragment);
2270
+ this.first = first;
2271
+ },
2272
+ m(target, anchor) {
2273
+ internal.insert(target, first, anchor);
2274
+ internal.mount_component(room, target, anchor);
2275
+ current = true;
2276
+ },
2277
+ p(new_ctx, dirty) {
2278
+ ctx = new_ctx;
2279
+
2280
+ const room_changes = (dirty & /*floorplanData, floorIndex, pxmm*/ 7)
2281
+ ? internal.get_spread_update(room_spread_levels, [
2282
+ {
2283
+ room: /*room*/ ctx[12],
2284
+ floorplanData: /*floorplanData*/ ctx[2],
2285
+ pxmm: /*pxmm*/ ctx[0]
2286
+ }
2287
+ ])
2288
+ : {};
2289
+
2290
+ room.$set(room_changes);
2291
+ },
2292
+ i(local) {
2293
+ if (current) return;
2294
+ internal.transition_in(room.$$.fragment, local);
2295
+ current = true;
2296
+ },
2297
+ o(local) {
2298
+ internal.transition_out(room.$$.fragment, local);
2299
+ current = false;
2300
+ },
2301
+ d(detaching) {
2302
+ if (detaching) internal.detach(first);
2303
+ internal.destroy_component(room, detaching);
2304
+ }
2305
+ };
2306
+ }
2307
+
2308
+ function create_fragment$2(ctx) {
2309
+ let div;
2310
+ let svg;
2311
+ let each_blocks = [];
2312
+ let each_1_lookup = new Map();
2313
+ let div_resize_listener;
2314
+ let current;
2315
+ let mounted;
2316
+ let dispose;
2317
+ let each_value = /*floorplanData*/ ctx[2].floorDatas[/*floorIndex*/ ctx[1]].rooms;
2318
+ const get_key = ctx => /*room*/ ctx[12].id;
2319
+
2320
+ for (let i = 0; i < each_value.length; i += 1) {
2321
+ let child_ctx = get_each_context(ctx, each_value, i);
2322
+ let key = get_key(child_ctx);
2323
+ each_1_lookup.set(key, each_blocks[i] = create_each_block(key, child_ctx));
2324
+ }
2325
+
2326
+ return {
2327
+ c() {
2328
+ div = internal.element("div");
2329
+ svg = internal.svg_element("svg");
2330
+
2331
+ for (let i = 0; i < each_blocks.length; i += 1) {
2332
+ each_blocks[i].c();
2333
+ }
2334
+
2335
+ internal.attr(svg, "class", "svelte-1aais5l");
2336
+ internal.attr(div, "class", "floorplan-plugin__room-highlight svelte-1aais5l");
2337
+ internal.add_render_callback(() => /*div_elementresize_handler*/ ctx[10].call(div));
2338
+ },
2339
+ m(target, anchor) {
2340
+ internal.insert(target, div, anchor);
2341
+ internal.append(div, svg);
2342
+
2343
+ for (let i = 0; i < each_blocks.length; i += 1) {
2344
+ each_blocks[i].m(svg, null);
2345
+ }
2346
+
2347
+ /*div_binding*/ ctx[9](div);
2348
+ div_resize_listener = internal.add_resize_listener(div, /*div_elementresize_handler*/ ctx[10].bind(div));
2349
+ current = true;
2350
+
2351
+ if (!mounted) {
2352
+ dispose = internal.listen(div, "click", /*handleClick*/ ctx[6]);
2353
+ mounted = true;
2354
+ }
2355
+ },
2356
+ p(ctx, [dirty]) {
2357
+ if (dirty & /*floorplanData, floorIndex, pxmm*/ 7) {
2358
+ each_value = /*floorplanData*/ ctx[2].floorDatas[/*floorIndex*/ ctx[1]].rooms;
2359
+ internal.group_outros();
2360
+ each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, svg, internal.outro_and_destroy_block, create_each_block, null, get_each_context);
2361
+ internal.check_outros();
2362
+ }
2363
+ },
2364
+ i(local) {
2365
+ if (current) return;
2366
+
2367
+ for (let i = 0; i < each_value.length; i += 1) {
2368
+ internal.transition_in(each_blocks[i]);
2369
+ }
2370
+
2371
+ current = true;
2372
+ },
2373
+ o(local) {
2374
+ for (let i = 0; i < each_blocks.length; i += 1) {
2375
+ internal.transition_out(each_blocks[i]);
2376
+ }
2377
+
2378
+ current = false;
2379
+ },
2380
+ d(detaching) {
2381
+ if (detaching) internal.detach(div);
2382
+
2383
+ for (let i = 0; i < each_blocks.length; i += 1) {
2384
+ each_blocks[i].d();
2385
+ }
2386
+
2387
+ /*div_binding*/ ctx[9](null);
2388
+ div_resize_listener();
2389
+ mounted = false;
2390
+ dispose();
2391
+ }
2392
+ };
2393
+ }
2394
+
2395
+ function instance$2($$self, $$props, $$invalidate) {
2396
+ let { five } = $$props;
2397
+ let { pxmm } = $$props;
2398
+ let { floorIndex } = $$props;
2399
+ let { floorplanData } = $$props;
2400
+ let { onRoomHeightClick } = $$props;
2401
+ let clientWidth;
2402
+ let clientHeight;
2403
+ let highlightContainerDom;
2404
+ const { observers: floorplan_observers } = floorplanData;
2405
+
2406
+ const handleClick = function (e) {
2407
+ if (onRoomHeightClick?.(e) === false) return;
2408
+
2409
+ // 因为 mouse.offsetX 的兼容性问题,手动计算 mouse offsetX offsetY
2410
+ const boundingClientRect = highlightContainerDom.getBoundingClientRect();
2411
+
2412
+ const mouseClientVector = new THREE.Vector2(e.clientX, e.clientY);
2413
+ const domTopLeftVector = new THREE.Vector2(boundingClientRect.left, boundingClientRect.top);
2414
+ const mouseOffsetVector = mouseClientVector.clone().sub(domTopLeftVector);
2415
+
2416
+ // px 转换为 百分比
2417
+ const mouseOffsetRelativeVector = new THREE.Vector2(mouseOffsetVector.x / clientWidth, mouseOffsetVector.y / clientHeight);
2418
+
2419
+ const closestPoint = floorplan_observers.filter(observer => observer.floorIndex === floorIndex).sort((ob1, ob2) => {
2420
+ const position1 = new THREE.Vector2(ob1.positionInImage.x, ob1.positionInImage.y);
2421
+ const position2 = new THREE.Vector2(ob2.positionInImage.x, ob2.positionInImage.y);
2422
+ return position1.distanceTo(mouseOffsetRelativeVector) - position2.distanceTo(mouseOffsetRelativeVector);
2423
+ })[0];
2424
+
2425
+ five.moveToPano(closestPoint.index);
2426
+ };
2427
+
2428
+ function div_binding($$value) {
2429
+ internal.binding_callbacks[$$value ? 'unshift' : 'push'](() => {
2430
+ highlightContainerDom = $$value;
2431
+ $$invalidate(5, highlightContainerDom);
2432
+ });
2433
+ }
2434
+
2435
+ function div_elementresize_handler() {
2436
+ clientWidth = this.clientWidth;
2437
+ clientHeight = this.clientHeight;
2438
+ $$invalidate(3, clientWidth);
2439
+ $$invalidate(4, clientHeight);
2440
+ }
2441
+
2442
+ $$self.$$set = $$props => {
2443
+ if ('five' in $$props) $$invalidate(7, five = $$props.five);
2444
+ if ('pxmm' in $$props) $$invalidate(0, pxmm = $$props.pxmm);
2445
+ if ('floorIndex' in $$props) $$invalidate(1, floorIndex = $$props.floorIndex);
2446
+ if ('floorplanData' in $$props) $$invalidate(2, floorplanData = $$props.floorplanData);
2447
+ if ('onRoomHeightClick' in $$props) $$invalidate(8, onRoomHeightClick = $$props.onRoomHeightClick);
2448
+ };
2449
+
2450
+ return [
2451
+ pxmm,
2452
+ floorIndex,
2453
+ floorplanData,
2454
+ clientWidth,
2455
+ clientHeight,
2456
+ highlightContainerDom,
2457
+ handleClick,
2458
+ five,
2459
+ onRoomHeightClick,
2460
+ div_binding,
2461
+ div_elementresize_handler
2462
+ ];
2463
+ }
2464
+
2465
+ class RoomHighlight extends internal.SvelteComponent {
2466
+ constructor(options) {
2467
+ super();
2468
+
2469
+ internal.init(
2470
+ this,
2471
+ options,
2472
+ instance$2,
2473
+ create_fragment$2,
2474
+ internal.safe_not_equal,
2475
+ {
2476
+ five: 7,
2477
+ pxmm: 0,
2478
+ floorIndex: 1,
2479
+ floorplanData: 2,
2480
+ onRoomHeightClick: 8
2481
+ },
2482
+ add_css$2
2483
+ );
2484
+ }
2485
+ }
2486
+
2487
+ /* src/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.svelte generated by Svelte v3.47.0 */
2488
+
2489
+ function add_css$1(target) {
2490
+ internal.append_styles(target, "svelte-3pdgs4", ".floorplan-current-floor.svelte-3pdgs4{position:relative;width:100%;height:100%}");
2491
+ }
2492
+
2493
+ // (19:2) {#if hoverEnable}
2494
+ function create_if_block_2(ctx) {
2495
+ let roomhighlight;
2496
+ let current;
2497
+
2498
+ const roomhighlight_spread_levels = [
2499
+ {
2500
+ five: /*five*/ ctx[1],
2501
+ pxmm: /*pxmm*/ ctx[0],
2502
+ floorIndex: /*floorIndex*/ ctx[2],
2503
+ floorplanData: /*floorplanData*/ ctx[6],
2504
+ onRoomHeightClick: /*onRoomHeightClick*/ ctx[7]
2505
+ }
2506
+ ];
2507
+
2508
+ let roomhighlight_props = {};
2509
+
2510
+ for (let i = 0; i < roomhighlight_spread_levels.length; i += 1) {
2511
+ roomhighlight_props = internal.assign(roomhighlight_props, roomhighlight_spread_levels[i]);
2512
+ }
2513
+
2514
+ roomhighlight = new RoomHighlight({ props: roomhighlight_props });
2515
+
2516
+ return {
2517
+ c() {
2518
+ internal.create_component(roomhighlight.$$.fragment);
2519
+ },
2520
+ m(target, anchor) {
2521
+ internal.mount_component(roomhighlight, target, anchor);
2522
+ current = true;
2523
+ },
2524
+ p(ctx, dirty) {
2525
+ const roomhighlight_changes = (dirty & /*five, pxmm, floorIndex, floorplanData, onRoomHeightClick*/ 199)
2526
+ ? internal.get_spread_update(roomhighlight_spread_levels, [
2527
+ {
2528
+ five: /*five*/ ctx[1],
2529
+ pxmm: /*pxmm*/ ctx[0],
2530
+ floorIndex: /*floorIndex*/ ctx[2],
2531
+ floorplanData: /*floorplanData*/ ctx[6],
2532
+ onRoomHeightClick: /*onRoomHeightClick*/ ctx[7]
2533
+ }
2534
+ ])
2535
+ : {};
2536
+
2537
+ roomhighlight.$set(roomhighlight_changes);
2538
+ },
2539
+ i(local) {
2540
+ if (current) return;
2541
+ internal.transition_in(roomhighlight.$$.fragment, local);
2542
+ current = true;
2543
+ },
2544
+ o(local) {
2545
+ internal.transition_out(roomhighlight.$$.fragment, local);
2546
+ current = false;
2547
+ },
2548
+ d(detaching) {
2549
+ internal.destroy_component(roomhighlight, detaching);
2550
+ }
2551
+ };
2552
+ }
2553
+
2554
+ // (23:2) {#if roomLabelsEnable}
2555
+ function create_if_block_1$1(ctx) {
2556
+ let roomlabels;
2557
+ let current;
2558
+
2559
+ const roomlabels_spread_levels = [
2560
+ {
2561
+ floorplanData: /*floorplanData*/ ctx[6],
2562
+ floorIndex: /*floorIndex*/ ctx[2],
2563
+ getLabelElement: /*getLabelElement*/ ctx[8]
2564
+ }
2565
+ ];
2566
+
2567
+ let roomlabels_props = {};
2568
+
2569
+ for (let i = 0; i < roomlabels_spread_levels.length; i += 1) {
2570
+ roomlabels_props = internal.assign(roomlabels_props, roomlabels_spread_levels[i]);
2571
+ }
2572
+
2573
+ roomlabels = new RoomLabels({ props: roomlabels_props });
2574
+
2575
+ return {
2576
+ c() {
2577
+ internal.create_component(roomlabels.$$.fragment);
2578
+ },
2579
+ m(target, anchor) {
2580
+ internal.mount_component(roomlabels, target, anchor);
2581
+ current = true;
2582
+ },
2583
+ p(ctx, dirty) {
2584
+ const roomlabels_changes = (dirty & /*floorplanData, floorIndex, getLabelElement*/ 324)
2585
+ ? internal.get_spread_update(roomlabels_spread_levels, [
2586
+ {
2587
+ floorplanData: /*floorplanData*/ ctx[6],
2588
+ floorIndex: /*floorIndex*/ ctx[2],
2589
+ getLabelElement: /*getLabelElement*/ ctx[8]
2590
+ }
2591
+ ])
2592
+ : {};
2593
+
2594
+ roomlabels.$set(roomlabels_changes);
2595
+ },
2596
+ i(local) {
2597
+ if (current) return;
2598
+ internal.transition_in(roomlabels.$$.fragment, local);
2599
+ current = true;
2600
+ },
2601
+ o(local) {
2602
+ internal.transition_out(roomlabels.$$.fragment, local);
2603
+ current = false;
2604
+ },
2605
+ d(detaching) {
2606
+ internal.destroy_component(roomlabels, detaching);
2607
+ }
2608
+ };
2609
+ }
2610
+
2611
+ // (26:2) {#if ruleLabelsEnable}
2612
+ function create_if_block$1(ctx) {
2613
+ let rulelabels;
2614
+ let current;
2615
+
2616
+ const rulelabels_spread_levels = [
2617
+ {
2618
+ floorplanData: /*floorplanData*/ ctx[6],
2619
+ floorIndex: /*floorIndex*/ ctx[2],
2620
+ pxmm: /*pxmm*/ ctx[0]
2621
+ }
2622
+ ];
2623
+
2624
+ let rulelabels_props = {};
2625
+
2626
+ for (let i = 0; i < rulelabels_spread_levels.length; i += 1) {
2627
+ rulelabels_props = internal.assign(rulelabels_props, rulelabels_spread_levels[i]);
2628
+ }
2629
+
2630
+ rulelabels = new RuleLabels({ props: rulelabels_props });
2631
+
2632
+ return {
2633
+ c() {
2634
+ internal.create_component(rulelabels.$$.fragment);
2635
+ },
2636
+ m(target, anchor) {
2637
+ internal.mount_component(rulelabels, target, anchor);
2638
+ current = true;
2639
+ },
2640
+ p(ctx, dirty) {
2641
+ const rulelabels_changes = (dirty & /*floorplanData, floorIndex, pxmm*/ 69)
2642
+ ? internal.get_spread_update(rulelabels_spread_levels, [
2643
+ {
2644
+ floorplanData: /*floorplanData*/ ctx[6],
2645
+ floorIndex: /*floorIndex*/ ctx[2],
2646
+ pxmm: /*pxmm*/ ctx[0]
2647
+ }
2648
+ ])
2649
+ : {};
2650
+
2651
+ rulelabels.$set(rulelabels_changes);
2652
+ },
2653
+ i(local) {
2654
+ if (current) return;
2655
+ internal.transition_in(rulelabels.$$.fragment, local);
2656
+ current = true;
2657
+ },
2658
+ o(local) {
2659
+ internal.transition_out(rulelabels.$$.fragment, local);
2660
+ current = false;
2661
+ },
2662
+ d(detaching) {
2663
+ internal.destroy_component(rulelabels, detaching);
2664
+ }
2665
+ };
2666
+ }
2667
+
2668
+ function create_fragment$1(ctx) {
2669
+ let div;
2670
+ let roommaterial;
2671
+ let t0;
2672
+ let t1;
2673
+ let baseimage;
2674
+ let t2;
2675
+ let t3;
2676
+ let current;
2677
+
2678
+ const roommaterial_spread_levels = [
2679
+ {
2680
+ floorIndex: /*floorIndex*/ ctx[2],
2681
+ floorplanData: /*floorplanData*/ ctx[6],
2682
+ pxmm: /*pxmm*/ ctx[0]
2683
+ }
2684
+ ];
2685
+
2686
+ let roommaterial_props = {};
2687
+
2688
+ for (let i = 0; i < roommaterial_spread_levels.length; i += 1) {
2689
+ roommaterial_props = internal.assign(roommaterial_props, roommaterial_spread_levels[i]);
2690
+ }
2691
+
2692
+ roommaterial = new RoomMaterial({ props: roommaterial_props });
2693
+ let if_block0 = /*hoverEnable*/ ctx[3] && create_if_block_2(ctx);
2694
+
2695
+ const baseimage_spread_levels = [
2696
+ {
2697
+ floorplanData: /*floorplanData*/ ctx[6],
2698
+ floorIndex: /*floorIndex*/ ctx[2]
2699
+ }
2700
+ ];
2701
+
2702
+ let baseimage_props = {};
2703
+
2704
+ for (let i = 0; i < baseimage_spread_levels.length; i += 1) {
2705
+ baseimage_props = internal.assign(baseimage_props, baseimage_spread_levels[i]);
2706
+ }
2707
+
2708
+ baseimage = new BaseImage({ props: baseimage_props });
2709
+ let if_block1 = /*roomLabelsEnable*/ ctx[4] && create_if_block_1$1(ctx);
2710
+ let if_block2 = /*ruleLabelsEnable*/ ctx[5] && create_if_block$1(ctx);
2711
+
2712
+ return {
2713
+ c() {
2714
+ div = internal.element("div");
2715
+ internal.create_component(roommaterial.$$.fragment);
2716
+ t0 = internal.space();
2717
+ if (if_block0) if_block0.c();
2718
+ t1 = internal.space();
2719
+ internal.create_component(baseimage.$$.fragment);
2720
+ t2 = internal.space();
2721
+ if (if_block1) if_block1.c();
2722
+ t3 = internal.space();
2723
+ if (if_block2) if_block2.c();
2724
+ internal.attr(div, "class", "floorplan-current-floor svelte-3pdgs4");
2725
+ },
2726
+ m(target, anchor) {
2727
+ internal.insert(target, div, anchor);
2728
+ internal.mount_component(roommaterial, div, null);
2729
+ internal.append(div, t0);
2730
+ if (if_block0) if_block0.m(div, null);
2731
+ internal.append(div, t1);
2732
+ internal.mount_component(baseimage, div, null);
2733
+ internal.append(div, t2);
2734
+ if (if_block1) if_block1.m(div, null);
2735
+ internal.append(div, t3);
2736
+ if (if_block2) if_block2.m(div, null);
2737
+ current = true;
2738
+ },
2739
+ p(ctx, [dirty]) {
2740
+ const roommaterial_changes = (dirty & /*floorIndex, floorplanData, pxmm*/ 69)
2741
+ ? internal.get_spread_update(roommaterial_spread_levels, [
2742
+ {
2743
+ floorIndex: /*floorIndex*/ ctx[2],
2744
+ floorplanData: /*floorplanData*/ ctx[6],
2745
+ pxmm: /*pxmm*/ ctx[0]
2746
+ }
2747
+ ])
2748
+ : {};
2749
+
2750
+ roommaterial.$set(roommaterial_changes);
2751
+
2752
+ if (/*hoverEnable*/ ctx[3]) {
2753
+ if (if_block0) {
2754
+ if_block0.p(ctx, dirty);
2755
+
2756
+ if (dirty & /*hoverEnable*/ 8) {
2757
+ internal.transition_in(if_block0, 1);
2758
+ }
2759
+ } else {
2760
+ if_block0 = create_if_block_2(ctx);
2761
+ if_block0.c();
2762
+ internal.transition_in(if_block0, 1);
2763
+ if_block0.m(div, t1);
2764
+ }
2765
+ } else if (if_block0) {
2766
+ internal.group_outros();
2767
+
2768
+ internal.transition_out(if_block0, 1, 1, () => {
2769
+ if_block0 = null;
2770
+ });
2771
+
2772
+ internal.check_outros();
2773
+ }
2774
+
2775
+ const baseimage_changes = (dirty & /*floorplanData, floorIndex*/ 68)
2776
+ ? internal.get_spread_update(baseimage_spread_levels, [
2777
+ {
2778
+ floorplanData: /*floorplanData*/ ctx[6],
2779
+ floorIndex: /*floorIndex*/ ctx[2]
2780
+ }
2781
+ ])
2782
+ : {};
2783
+
2784
+ baseimage.$set(baseimage_changes);
2785
+
2786
+ if (/*roomLabelsEnable*/ ctx[4]) {
2787
+ if (if_block1) {
2788
+ if_block1.p(ctx, dirty);
2789
+
2790
+ if (dirty & /*roomLabelsEnable*/ 16) {
2791
+ internal.transition_in(if_block1, 1);
2792
+ }
2793
+ } else {
2794
+ if_block1 = create_if_block_1$1(ctx);
2795
+ if_block1.c();
2796
+ internal.transition_in(if_block1, 1);
2797
+ if_block1.m(div, t3);
2798
+ }
2799
+ } else if (if_block1) {
2800
+ internal.group_outros();
2801
+
2802
+ internal.transition_out(if_block1, 1, 1, () => {
2803
+ if_block1 = null;
2804
+ });
2805
+
2806
+ internal.check_outros();
2807
+ }
2808
+
2809
+ if (/*ruleLabelsEnable*/ ctx[5]) {
2810
+ if (if_block2) {
2811
+ if_block2.p(ctx, dirty);
2812
+
2813
+ if (dirty & /*ruleLabelsEnable*/ 32) {
2814
+ internal.transition_in(if_block2, 1);
2815
+ }
2816
+ } else {
2817
+ if_block2 = create_if_block$1(ctx);
2818
+ if_block2.c();
2819
+ internal.transition_in(if_block2, 1);
2820
+ if_block2.m(div, null);
2821
+ }
2822
+ } else if (if_block2) {
2823
+ internal.group_outros();
2824
+
2825
+ internal.transition_out(if_block2, 1, 1, () => {
2826
+ if_block2 = null;
2827
+ });
2828
+
2829
+ internal.check_outros();
2830
+ }
2831
+ },
2832
+ i(local) {
2833
+ if (current) return;
2834
+ internal.transition_in(roommaterial.$$.fragment, local);
2835
+ internal.transition_in(if_block0);
2836
+ internal.transition_in(baseimage.$$.fragment, local);
2837
+ internal.transition_in(if_block1);
2838
+ internal.transition_in(if_block2);
2839
+ current = true;
2840
+ },
2841
+ o(local) {
2842
+ internal.transition_out(roommaterial.$$.fragment, local);
2843
+ internal.transition_out(if_block0);
2844
+ internal.transition_out(baseimage.$$.fragment, local);
2845
+ internal.transition_out(if_block1);
2846
+ internal.transition_out(if_block2);
2847
+ current = false;
2848
+ },
2849
+ d(detaching) {
2850
+ if (detaching) internal.detach(div);
2851
+ internal.destroy_component(roommaterial);
2852
+ if (if_block0) if_block0.d();
2853
+ internal.destroy_component(baseimage);
2854
+ if (if_block1) if_block1.d();
2855
+ if (if_block2) if_block2.d();
2856
+ }
2857
+ };
2858
+ }
2859
+
2860
+ function instance$1($$self, $$props, $$invalidate) {
2861
+ let { pxmm } = $$props;
2862
+ let { five } = $$props;
2863
+ let { floorIndex } = $$props;
2864
+ let { hoverEnable } = $$props;
2865
+ let { roomLabelsEnable } = $$props;
2866
+ let { ruleLabelsEnable } = $$props;
2867
+ let { floorplanData } = $$props;
2868
+ let { onRoomHeightClick } = $$props;
2869
+ let { getLabelElement } = $$props;
2870
+
2871
+ $$self.$$set = $$props => {
2872
+ if ('pxmm' in $$props) $$invalidate(0, pxmm = $$props.pxmm);
2873
+ if ('five' in $$props) $$invalidate(1, five = $$props.five);
2874
+ if ('floorIndex' in $$props) $$invalidate(2, floorIndex = $$props.floorIndex);
2875
+ if ('hoverEnable' in $$props) $$invalidate(3, hoverEnable = $$props.hoverEnable);
2876
+ if ('roomLabelsEnable' in $$props) $$invalidate(4, roomLabelsEnable = $$props.roomLabelsEnable);
2877
+ if ('ruleLabelsEnable' in $$props) $$invalidate(5, ruleLabelsEnable = $$props.ruleLabelsEnable);
2878
+ if ('floorplanData' in $$props) $$invalidate(6, floorplanData = $$props.floorplanData);
2879
+ if ('onRoomHeightClick' in $$props) $$invalidate(7, onRoomHeightClick = $$props.onRoomHeightClick);
2880
+ if ('getLabelElement' in $$props) $$invalidate(8, getLabelElement = $$props.getLabelElement);
2881
+ };
2882
+
2883
+ return [
2884
+ pxmm,
2885
+ five,
2886
+ floorIndex,
2887
+ hoverEnable,
2888
+ roomLabelsEnable,
2889
+ ruleLabelsEnable,
2890
+ floorplanData,
2891
+ onRoomHeightClick,
2892
+ getLabelElement
2893
+ ];
2894
+ }
2895
+
2896
+ class CurrentFloor extends internal.SvelteComponent {
2897
+ constructor(options) {
2898
+ super();
2899
+
2900
+ internal.init(
2901
+ this,
2902
+ options,
2903
+ instance$1,
2904
+ create_fragment$1,
2905
+ internal.safe_not_equal,
2906
+ {
2907
+ pxmm: 0,
2908
+ five: 1,
2909
+ floorIndex: 2,
2910
+ hoverEnable: 3,
2911
+ roomLabelsEnable: 4,
2912
+ ruleLabelsEnable: 5,
2913
+ floorplanData: 6,
2914
+ onRoomHeightClick: 7,
2915
+ getLabelElement: 8
2916
+ },
2917
+ add_css$1
2918
+ );
2919
+ }
2920
+ }
2921
+
2922
+ /* src/floorplan/ModelFloorplanPlugin/Components/Main.svelte generated by Svelte v3.47.0 */
2923
+
2924
+ function add_css(target) {
2925
+ internal.append_styles(target, "svelte-177x2q7", ".floorplan-main.svelte-177x2q7{width:100%;height:100%}");
2926
+ }
2927
+
2928
+ // (24:0) {#if visible}
2929
+ function create_if_block(ctx) {
2930
+ let div;
2931
+ let currentfloor;
2932
+ let t0;
2933
+ let camera;
2934
+ let t1;
2935
+ let div_intro;
2936
+ let current;
2937
+
2938
+ const currentfloor_spread_levels = [
2939
+ {
2940
+ five: /*five*/ ctx[2],
2941
+ pxmm: /*pxmm*/ ctx[1],
2942
+ floorIndex: /*floorIndex*/ ctx[6],
2943
+ hoverEnable: /*hoverEnable*/ ctx[7],
2944
+ floorplanData: /*floorplanData*/ ctx[11],
2945
+ getLabelElement: /*getLabelElement*/ ctx[15],
2946
+ roomLabelsEnable: /*roomLabelsEnable*/ ctx[9],
2947
+ ruleLabelsEnable: /*ruleLabelsEnable*/ ctx[10],
2948
+ onRoomHeightClick: /*onRoomHeightClick*/ ctx[14]
2949
+ }
2950
+ ];
2951
+
2952
+ let currentfloor_props = {};
2953
+
2954
+ for (let i = 0; i < currentfloor_spread_levels.length; i += 1) {
2955
+ currentfloor_props = internal.assign(currentfloor_props, currentfloor_spread_levels[i]);
2956
+ }
2957
+
2958
+ currentfloor = new CurrentFloor({ props: currentfloor_props });
2959
+
2960
+ const camera_spread_levels = [
2961
+ {
2962
+ panoIndex: /*panoIndex*/ ctx[5],
2963
+ floorplanData: /*floorplanData*/ ctx[11],
2964
+ lastPanoramaLongitude: /*lastPanoramaLongitude*/ ctx[12],
2965
+ cameraImageUrl: /*cameraImageUrl*/ ctx[13]
2966
+ }
2967
+ ];
2968
+
2969
+ let camera_props = {};
2970
+
2971
+ for (let i = 0; i < camera_spread_levels.length; i += 1) {
2972
+ camera_props = internal.assign(camera_props, camera_spread_levels[i]);
2973
+ }
2974
+
2975
+ camera = new Camera({ props: camera_props });
2976
+ let if_block = /*compassEnable*/ ctx[8] && create_if_block_1(ctx);
2977
+
2978
+ return {
2979
+ c() {
2980
+ div = internal.element("div");
2981
+ internal.create_component(currentfloor.$$.fragment);
2982
+ t0 = internal.space();
2983
+ internal.create_component(camera.$$.fragment);
2984
+ t1 = internal.space();
2985
+ if (if_block) if_block.c();
2986
+ internal.attr(div, "class", "floorplan-main svelte-177x2q7");
2987
+ },
2988
+ m(target, anchor) {
2989
+ internal.insert(target, div, anchor);
2990
+ internal.mount_component(currentfloor, div, null);
2991
+ internal.append(div, t0);
2992
+ internal.mount_component(camera, div, null);
2993
+ internal.append(div, t1);
2994
+ if (if_block) if_block.m(div, null);
2995
+ current = true;
2996
+ },
2997
+ p(new_ctx, dirty) {
2998
+ ctx = new_ctx;
2999
+
3000
+ const currentfloor_changes = (dirty & /*five, pxmm, floorIndex, hoverEnable, floorplanData, getLabelElement, roomLabelsEnable, ruleLabelsEnable, onRoomHeightClick*/ 52934)
3001
+ ? internal.get_spread_update(currentfloor_spread_levels, [
3002
+ {
3003
+ five: /*five*/ ctx[2],
3004
+ pxmm: /*pxmm*/ ctx[1],
3005
+ floorIndex: /*floorIndex*/ ctx[6],
3006
+ hoverEnable: /*hoverEnable*/ ctx[7],
3007
+ floorplanData: /*floorplanData*/ ctx[11],
3008
+ getLabelElement: /*getLabelElement*/ ctx[15],
3009
+ roomLabelsEnable: /*roomLabelsEnable*/ ctx[9],
3010
+ ruleLabelsEnable: /*ruleLabelsEnable*/ ctx[10],
3011
+ onRoomHeightClick: /*onRoomHeightClick*/ ctx[14]
3012
+ }
3013
+ ])
3014
+ : {};
3015
+
3016
+ currentfloor.$set(currentfloor_changes);
3017
+
3018
+ const camera_changes = (dirty & /*panoIndex, floorplanData, lastPanoramaLongitude, cameraImageUrl*/ 14368)
3019
+ ? internal.get_spread_update(camera_spread_levels, [
3020
+ {
3021
+ panoIndex: /*panoIndex*/ ctx[5],
3022
+ floorplanData: /*floorplanData*/ ctx[11],
3023
+ lastPanoramaLongitude: /*lastPanoramaLongitude*/ ctx[12],
3024
+ cameraImageUrl: /*cameraImageUrl*/ ctx[13]
3025
+ }
3026
+ ])
3027
+ : {};
3028
+
3029
+ camera.$set(camera_changes);
3030
+
3031
+ if (/*compassEnable*/ ctx[8]) {
3032
+ if (if_block) {
3033
+ if_block.p(ctx, dirty);
3034
+
3035
+ if (dirty & /*compassEnable*/ 256) {
3036
+ internal.transition_in(if_block, 1);
3037
+ }
3038
+ } else {
3039
+ if_block = create_if_block_1(ctx);
3040
+ if_block.c();
3041
+ internal.transition_in(if_block, 1);
3042
+ if_block.m(div, null);
3043
+ }
3044
+ } else if (if_block) {
3045
+ internal.group_outros();
3046
+
3047
+ internal.transition_out(if_block, 1, 1, () => {
3048
+ if_block = null;
3049
+ });
3050
+
3051
+ internal.check_outros();
3052
+ }
3053
+ },
3054
+ i(local) {
3055
+ if (current) return;
3056
+ internal.transition_in(currentfloor.$$.fragment, local);
3057
+ internal.transition_in(camera.$$.fragment, local);
3058
+ internal.transition_in(if_block);
3059
+
3060
+ if (!div_intro) {
3061
+ internal.add_render_callback(() => {
3062
+ div_intro = internal.create_in_transition(div, transition.fade, {
3063
+ duration: /*duration*/ ctx[3],
3064
+ easing: easing.linear
3065
+ });
3066
+
3067
+ div_intro.start();
3068
+ });
3069
+ }
3070
+
3071
+ current = true;
3072
+ },
3073
+ o(local) {
3074
+ internal.transition_out(currentfloor.$$.fragment, local);
3075
+ internal.transition_out(camera.$$.fragment, local);
3076
+ internal.transition_out(if_block);
3077
+ current = false;
3078
+ },
3079
+ d(detaching) {
3080
+ if (detaching) internal.detach(div);
3081
+ internal.destroy_component(currentfloor);
3082
+ internal.destroy_component(camera);
3083
+ if (if_block) if_block.d();
3084
+ }
3085
+ };
3086
+ }
3087
+
3088
+ // (40:4) {#if compassEnable}
3089
+ function create_if_block_1(ctx) {
3090
+ let compass;
3091
+ let current;
3092
+
3093
+ compass = new Compass({
3094
+ props: {
3095
+ floorplanData: /*floorplanData*/ ctx[11],
3096
+ northDesc: /*northDesc*/ ctx[0]
3097
+ }
3098
+ });
3099
+
3100
+ return {
3101
+ c() {
3102
+ internal.create_component(compass.$$.fragment);
3103
+ },
3104
+ m(target, anchor) {
3105
+ internal.mount_component(compass, target, anchor);
3106
+ current = true;
3107
+ },
3108
+ p(ctx, dirty) {
3109
+ const compass_changes = {};
3110
+ if (dirty & /*floorplanData*/ 2048) compass_changes.floorplanData = /*floorplanData*/ ctx[11];
3111
+ if (dirty & /*northDesc*/ 1) compass_changes.northDesc = /*northDesc*/ ctx[0];
3112
+ compass.$set(compass_changes);
3113
+ },
3114
+ i(local) {
3115
+ if (current) return;
3116
+ internal.transition_in(compass.$$.fragment, local);
3117
+ current = true;
3118
+ },
3119
+ o(local) {
3120
+ internal.transition_out(compass.$$.fragment, local);
3121
+ current = false;
3122
+ },
3123
+ d(detaching) {
3124
+ internal.destroy_component(compass, detaching);
3125
+ }
3126
+ };
3127
+ }
3128
+
3129
+ function create_fragment(ctx) {
3130
+ let if_block_anchor;
3131
+ let current;
3132
+ let if_block = /*visible*/ ctx[4] && create_if_block(ctx);
3133
+
3134
+ return {
3135
+ c() {
3136
+ if (if_block) if_block.c();
3137
+ if_block_anchor = internal.empty();
3138
+ },
3139
+ m(target, anchor) {
3140
+ if (if_block) if_block.m(target, anchor);
3141
+ internal.insert(target, if_block_anchor, anchor);
3142
+ current = true;
3143
+ },
3144
+ p(ctx, [dirty]) {
3145
+ if (/*visible*/ ctx[4]) {
3146
+ if (if_block) {
3147
+ if_block.p(ctx, dirty);
3148
+
3149
+ if (dirty & /*visible*/ 16) {
3150
+ internal.transition_in(if_block, 1);
3151
+ }
3152
+ } else {
3153
+ if_block = create_if_block(ctx);
3154
+ if_block.c();
3155
+ internal.transition_in(if_block, 1);
3156
+ if_block.m(if_block_anchor.parentNode, if_block_anchor);
3157
+ }
3158
+ } else if (if_block) {
3159
+ internal.group_outros();
3160
+
3161
+ internal.transition_out(if_block, 1, 1, () => {
3162
+ if_block = null;
3163
+ });
3164
+
3165
+ internal.check_outros();
3166
+ }
3167
+ },
3168
+ i(local) {
3169
+ if (current) return;
3170
+ internal.transition_in(if_block);
3171
+ current = true;
3172
+ },
3173
+ o(local) {
3174
+ internal.transition_out(if_block);
3175
+ current = false;
3176
+ },
3177
+ d(detaching) {
3178
+ if (if_block) if_block.d(detaching);
3179
+ if (detaching) internal.detach(if_block_anchor);
3180
+ }
3181
+ };
3182
+ }
3183
+
3184
+ function instance($$self, $$props, $$invalidate) {
3185
+ let { northDesc } = $$props;
3186
+ let { pxmm } = $$props;
3187
+ let { five } = $$props;
3188
+ let { duration = 0 } = $$props;
3189
+ let { visible } = $$props;
3190
+ let { panoIndex } = $$props;
3191
+ let { floorIndex } = $$props;
3192
+ let { hoverEnable } = $$props;
3193
+ let { compassEnable } = $$props;
3194
+ let { roomLabelsEnable } = $$props;
3195
+ let { ruleLabelsEnable } = $$props;
3196
+ let { floorplanData } = $$props;
3197
+ let { lastPanoramaLongitude } = $$props;
3198
+ let { cameraImageUrl } = $$props;
3199
+ let { onRoomHeightClick } = $$props;
3200
+ let { getLabelElement } = $$props;
3201
+
3202
+ $$self.$$set = $$props => {
3203
+ if ('northDesc' in $$props) $$invalidate(0, northDesc = $$props.northDesc);
3204
+ if ('pxmm' in $$props) $$invalidate(1, pxmm = $$props.pxmm);
3205
+ if ('five' in $$props) $$invalidate(2, five = $$props.five);
3206
+ if ('duration' in $$props) $$invalidate(3, duration = $$props.duration);
3207
+ if ('visible' in $$props) $$invalidate(4, visible = $$props.visible);
3208
+ if ('panoIndex' in $$props) $$invalidate(5, panoIndex = $$props.panoIndex);
3209
+ if ('floorIndex' in $$props) $$invalidate(6, floorIndex = $$props.floorIndex);
3210
+ if ('hoverEnable' in $$props) $$invalidate(7, hoverEnable = $$props.hoverEnable);
3211
+ if ('compassEnable' in $$props) $$invalidate(8, compassEnable = $$props.compassEnable);
3212
+ if ('roomLabelsEnable' in $$props) $$invalidate(9, roomLabelsEnable = $$props.roomLabelsEnable);
3213
+ if ('ruleLabelsEnable' in $$props) $$invalidate(10, ruleLabelsEnable = $$props.ruleLabelsEnable);
3214
+ if ('floorplanData' in $$props) $$invalidate(11, floorplanData = $$props.floorplanData);
3215
+ if ('lastPanoramaLongitude' in $$props) $$invalidate(12, lastPanoramaLongitude = $$props.lastPanoramaLongitude);
3216
+ if ('cameraImageUrl' in $$props) $$invalidate(13, cameraImageUrl = $$props.cameraImageUrl);
3217
+ if ('onRoomHeightClick' in $$props) $$invalidate(14, onRoomHeightClick = $$props.onRoomHeightClick);
3218
+ if ('getLabelElement' in $$props) $$invalidate(15, getLabelElement = $$props.getLabelElement);
3219
+ };
3220
+
3221
+ return [
3222
+ northDesc,
3223
+ pxmm,
3224
+ five,
3225
+ duration,
3226
+ visible,
3227
+ panoIndex,
3228
+ floorIndex,
3229
+ hoverEnable,
3230
+ compassEnable,
3231
+ roomLabelsEnable,
3232
+ ruleLabelsEnable,
3233
+ floorplanData,
3234
+ lastPanoramaLongitude,
3235
+ cameraImageUrl,
3236
+ onRoomHeightClick,
3237
+ getLabelElement
3238
+ ];
3239
+ }
3240
+
3241
+ class Main extends internal.SvelteComponent {
3242
+ constructor(options) {
3243
+ super();
3244
+
3245
+ internal.init(
3246
+ this,
3247
+ options,
3248
+ instance,
3249
+ create_fragment,
3250
+ internal.safe_not_equal,
3251
+ {
3252
+ northDesc: 0,
3253
+ pxmm: 1,
3254
+ five: 2,
3255
+ duration: 3,
3256
+ visible: 4,
3257
+ panoIndex: 5,
3258
+ floorIndex: 6,
3259
+ hoverEnable: 7,
3260
+ compassEnable: 8,
3261
+ roomLabelsEnable: 9,
3262
+ ruleLabelsEnable: 10,
3263
+ floorplanData: 11,
3264
+ lastPanoramaLongitude: 12,
3265
+ cameraImageUrl: 13,
3266
+ onRoomHeightClick: 14,
3267
+ getLabelElement: 15
3268
+ },
3269
+ add_css
3270
+ );
3271
+ }
3272
+ }
3273
+
3274
+ function changeModelCanvasOpacity(five, opacity, duration = 300) {
3275
+ const fiveEle = five.getElement();
3276
+ if (!fiveEle)
3277
+ return;
3278
+ fiveEle.style.opacity = opacity + '';
3279
+ fiveEle.style.transition = duration === 0 ? 'none' : `opacity ${duration}ms linear`;
3280
+ if (duration === 0)
3281
+ return;
3282
+ Promise.race([
3283
+ new Promise((res) => fiveEle.addEventListener('transitionend', res, { once: true })),
3284
+ new Promise((res) => setTimeout(res, duration)),
3285
+ ]).then(() => {
3286
+ fiveEle.style.transition = 'none';
3287
+ });
3288
+ }
3289
+
3290
+ class TopviewFloorplanPluginController {
3291
+ size = { width: 0, height: 0 };
3292
+ visible = false;
3293
+ pxmm = 0;
3294
+ app;
3295
+ five;
3296
+ panoIndex = 0;
3297
+ floorIndex = 0;
3298
+ configs = {};
3299
+ lastPanoramaLongitude = 0;
3300
+ selector;
3301
+ floorplanData;
3302
+ wrapper;
3303
+ container = document.createElement('div');
3304
+ constructor(five, params) {
3305
+ this.five = five;
3306
+ this.selector = params.selector;
3307
+ this.configs = omit(params, ['selector']);
3308
+ // 设置 container 样式
3309
+ this.container.classList.add('floorplan-plugin');
3310
+ Object.assign(this.container.style, pluginStyle);
3311
+ // 如果初始化的时候模型已经加载完毕了,就不用再等 modelLoaded
3312
+ this.five.model.loaded ? this.handleModelLoaded() : five.once('modelLoaded', this.handleModelLoaded);
3313
+ this.five.once('dispose', this.dispose);
3314
+ this.five.on('modeChange', this.handleModeChange);
3315
+ this.five.on('panoArrived', this.handlePanoArrived);
3316
+ this.five.on('initAnimationEnded', this.handleInitAnimationEnded);
3317
+ this.five.on('modelShownFloorChange', this.onModelShownFloorChange);
3318
+ }
3319
+ /** 加载户型图数据 */
3320
+ async load(data) {
3321
+ const copyData = JSON.parse(JSON.stringify(data));
3322
+ this.floorplanData = await formatData(copyData);
3323
+ this.render();
3324
+ }
3325
+ /** 把插件的渲染DOM插入到对应的容器中去 */
3326
+ appendTo(wrapper) {
3327
+ this.wrapper = wrapper;
3328
+ wrapper.appendChild(this.container);
3329
+ return this;
3330
+ }
3331
+ dispose = () => {
3332
+ this.hide();
3333
+ this.container?.remove();
3334
+ this.app?.$destroy();
3335
+ this.five.off('modeChange', this.handleModeChange);
3336
+ this.five.off('panoArrived', this.handlePanoArrived);
3337
+ this.five.off('modelLoaded', this.handleModelLoaded);
3338
+ this.five.off('wantsMoveToPano', this.handleWantsMoveToPano);
3339
+ this.five.off('wantsPanGesture', this.handleWantsPanGesture);
3340
+ this.five.off('initAnimationEnded', this.handleInitAnimationEnded);
3341
+ this.five.off('modelShownFloorChange', this.onModelShownFloorChange);
3342
+ };
3343
+ /** 模型楼层高亮改变时,自动进行楼层切换 */
3344
+ onModelShownFloorChange = (shownFloor) => {
3345
+ if (shownFloor === null)
3346
+ return;
3347
+ this.floorIndex = shownFloor;
3348
+ this.updateSize();
3349
+ this.render();
3350
+ };
3351
+ /** panoIndex 改变时,更新 floorIndex */
3352
+ handlePanoArrived = (index) => {
3353
+ if (!this.five?.work)
3354
+ return;
3355
+ this.panoIndex = index;
3356
+ this.floorIndex = this.five.work.observers[index].floorIndex;
3357
+ };
3358
+ /** 配置了 preventRoomClick 后,在户型图展示时阻止 Five 走点 */
3359
+ handleWantsMoveToPano = () => {
3360
+ if (!this.visible)
3361
+ return;
3362
+ if (this.configs.preventRoomClick)
3363
+ return false;
3364
+ return;
3365
+ };
3366
+ /** 在户型图展示时阻止 Five 滑动行为 */
3367
+ handleWantsPanGesture = () => {
3368
+ if (!this.visible)
3369
+ return;
3370
+ return false;
3371
+ };
3372
+ handleModelLoaded = () => {
3373
+ if (this.wrapper)
3374
+ return;
3375
+ if (!this.selector)
3376
+ return;
3377
+ const wrapper = this.selector instanceof Element ? this.selector : document.querySelector(this.selector);
3378
+ if (!wrapper)
3379
+ throw new Error('不正确的父容器选择器');
3380
+ this.wrapper = wrapper;
3381
+ wrapper.append(this.container);
3382
+ };
3383
+ /** 非 Topview 态隐藏户型图 */
3384
+ handleModeChange = (mode) => {
3385
+ if (mode !== 'Topview')
3386
+ return this.hide();
3387
+ };
3388
+ /** 动画结束后是 Topview 态就展示户型图 */
3389
+ handleInitAnimationEnded = () => {
3390
+ const { mode } = this.five.getCurrentState();
3391
+ if (mode === 'Topview')
3392
+ this.show();
3393
+ };
3394
+ show() {
3395
+ this.visible = true;
3396
+ this.five.model.show(this.floorIndex);
3397
+ this.updateSize();
3398
+ const renderDuration = 500;
3399
+ const modelOpacity = this.configs.modelOpacity;
3400
+ if (typeof modelOpacity === 'number') {
3401
+ changeModelCanvasOpacity(this.five, modelOpacity, renderDuration);
3402
+ }
3403
+ this.render(renderDuration);
3404
+ this.five.on('wantsMoveToPano', this.handleWantsMoveToPano);
3405
+ this.five.on('wantsPanGesture', this.handleWantsPanGesture);
3406
+ }
3407
+ hide() {
3408
+ const modelOpacity = 1;
3409
+ const renderDuration = 0;
3410
+ this.visible = false;
3411
+ changeModelCanvasOpacity(this.five, modelOpacity, renderDuration);
3412
+ this.render();
3413
+ this.five.on('wantsMoveToPano', this.handleWantsMoveToPano);
3414
+ this.five.on('wantsPanGesture', this.handleWantsPanGesture);
3415
+ }
3416
+ /** 更新户型图大小 */
3417
+ updateSize = () => {
3418
+ if (!this.floorplanData)
3419
+ return;
3420
+ if (!this.container || !this.wrapper)
3421
+ return;
3422
+ if (this.five.getCurrentState().mode !== 'Topview')
3423
+ return;
3424
+ // 计算户型图展示大小
3425
+ const { min, max } = this.floorplanData.bounding;
3426
+ const width = max.x - min.x;
3427
+ const height = max.y - min.y;
3428
+ // 每毫米对应的 px 值
3429
+ const options = this.configs.attachedTo ? { attachedTo: this.configs.attachedTo } : undefined;
3430
+ const pxmm = getPxmm(this.five, this.wrapper, this.floorIndex, options);
3431
+ const _width = Math.ceil(width * pxmm);
3432
+ const _height = Math.ceil(height * pxmm);
3433
+ this.pxmm = pxmm;
3434
+ this.size = { width: _width, height: _height };
3435
+ this.container.style.width = _width + 'px';
3436
+ this.container.style.height = _height + 'px';
3437
+ };
3438
+ render(duration) {
3439
+ if (!this.container || !this.floorplanData)
3440
+ return;
3441
+ if (this.size.width === 0)
3442
+ return;
3443
+ const { northDesc, getLabelElement, cameraImageUrl, preventRoomClick, hoverEnable, compassEnable, roomLabelsEnable, ruleLabelsEnable, } = this.configs;
3444
+ const handleClick = preventRoomClick ? () => false : undefined;
3445
+ const props = {
3446
+ northDesc: northDesc ?? '北',
3447
+ five: this.five,
3448
+ pxmm: this.pxmm,
3449
+ cameraImageUrl,
3450
+ visible: this.visible,
3451
+ duration: duration ?? 0,
3452
+ panoIndex: this.panoIndex,
3453
+ floorIndex: this.floorIndex,
3454
+ floorplanData: this.floorplanData,
3455
+ hoverEnable: hoverEnable ?? false,
3456
+ compassEnable: compassEnable ?? true,
3457
+ ruleLabelsEnable: ruleLabelsEnable ?? true,
3458
+ roomLabelsEnable: roomLabelsEnable ?? true,
3459
+ lastPanoramaLongitude: this.lastPanoramaLongitude,
3460
+ getLabelElement,
3461
+ onRoomHeightClick: handleClick,
3462
+ };
3463
+ if (!this.app) {
3464
+ this.app = new Main({
3465
+ target: this.container,
3466
+ intro: true,
3467
+ props,
3468
+ });
3469
+ }
3470
+ else {
3471
+ this.app.$set(props);
3472
+ }
3473
+ }
3474
+ }
3475
+
3476
+ const TopviewFloorplanPlugin = (five, params) => {
3477
+ return new TopviewFloorplanPluginController(five, params);
3478
+ };
3479
+
3480
+ exports.TopviewFloorplanPlugin = TopviewFloorplanPlugin;
3481
+ exports["default"] = TopviewFloorplanPlugin;