architwin 1.0.9

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 (274) hide show
  1. package/README.md +530 -0
  2. package/bundle/LICENSE.md +17 -0
  3. package/bundle/css/core.css +21 -0
  4. package/bundle/css/late.css +22 -0
  5. package/bundle/css/showcase.css +406 -0
  6. package/bundle/css/unsupported_browser.css +1 -0
  7. package/bundle/cursors/grab.png +0 -0
  8. package/bundle/cursors/grabbing.png +0 -0
  9. package/bundle/cursors/rbe-default.png +0 -0
  10. package/bundle/cursors/rbe-finish-room.png +0 -0
  11. package/bundle/cursors/rbe-moving.png +0 -0
  12. package/bundle/cursors/rbe-place-door.png +0 -0
  13. package/bundle/cursors/rbe-place-node.png +0 -0
  14. package/bundle/cursors/rbe-place-opening.png +0 -0
  15. package/bundle/cursors/zoom-in.png +0 -0
  16. package/bundle/cursors/zoom-out.png +0 -0
  17. package/bundle/fonts/ibm-plex-sans-100.woff +0 -0
  18. package/bundle/fonts/ibm-plex-sans-100.woff2 +0 -0
  19. package/bundle/fonts/ibm-plex-sans-100italic.woff +0 -0
  20. package/bundle/fonts/ibm-plex-sans-100italic.woff2 +0 -0
  21. package/bundle/fonts/ibm-plex-sans-200.woff +0 -0
  22. package/bundle/fonts/ibm-plex-sans-200.woff2 +0 -0
  23. package/bundle/fonts/ibm-plex-sans-200italic.woff +0 -0
  24. package/bundle/fonts/ibm-plex-sans-200italic.woff2 +0 -0
  25. package/bundle/fonts/ibm-plex-sans-300.woff +0 -0
  26. package/bundle/fonts/ibm-plex-sans-300.woff2 +0 -0
  27. package/bundle/fonts/ibm-plex-sans-300italic.woff +0 -0
  28. package/bundle/fonts/ibm-plex-sans-300italic.woff2 +0 -0
  29. package/bundle/fonts/ibm-plex-sans-500.woff +0 -0
  30. package/bundle/fonts/ibm-plex-sans-500.woff2 +0 -0
  31. package/bundle/fonts/ibm-plex-sans-500italic.woff +0 -0
  32. package/bundle/fonts/ibm-plex-sans-500italic.woff2 +0 -0
  33. package/bundle/fonts/ibm-plex-sans-600.woff +0 -0
  34. package/bundle/fonts/ibm-plex-sans-600.woff2 +0 -0
  35. package/bundle/fonts/ibm-plex-sans-600italic.woff +0 -0
  36. package/bundle/fonts/ibm-plex-sans-600italic.woff2 +0 -0
  37. package/bundle/fonts/ibm-plex-sans-700.woff +0 -0
  38. package/bundle/fonts/ibm-plex-sans-700.woff2 +0 -0
  39. package/bundle/fonts/ibm-plex-sans-700italic.woff +0 -0
  40. package/bundle/fonts/ibm-plex-sans-700italic.woff2 +0 -0
  41. package/bundle/fonts/ibm-plex-sans-italic.woff +0 -0
  42. package/bundle/fonts/ibm-plex-sans-italic.woff2 +0 -0
  43. package/bundle/fonts/ibm-plex-sans-regular.woff +0 -0
  44. package/bundle/fonts/ibm-plex-sans-regular.woff2 +0 -0
  45. package/bundle/fonts/mp-font.svg +2079 -0
  46. package/bundle/fonts/mp-font.woff +0 -0
  47. package/bundle/fonts/mp-font.woff2 +0 -0
  48. package/bundle/fonts/roboto-100.woff +0 -0
  49. package/bundle/fonts/roboto-100.woff2 +0 -0
  50. package/bundle/fonts/roboto-100italic.woff +0 -0
  51. package/bundle/fonts/roboto-100italic.woff2 +0 -0
  52. package/bundle/fonts/roboto-300.woff +0 -0
  53. package/bundle/fonts/roboto-300.woff2 +0 -0
  54. package/bundle/fonts/roboto-300italic.woff +0 -0
  55. package/bundle/fonts/roboto-300italic.woff2 +0 -0
  56. package/bundle/fonts/roboto-500.woff +0 -0
  57. package/bundle/fonts/roboto-500.woff2 +0 -0
  58. package/bundle/fonts/roboto-500italic.woff +0 -0
  59. package/bundle/fonts/roboto-500italic.woff2 +0 -0
  60. package/bundle/fonts/roboto-700.woff +0 -0
  61. package/bundle/fonts/roboto-700.woff2 +0 -0
  62. package/bundle/fonts/roboto-700italic.woff +0 -0
  63. package/bundle/fonts/roboto-700italic.woff2 +0 -0
  64. package/bundle/fonts/roboto-900.woff +0 -0
  65. package/bundle/fonts/roboto-900.woff2 +0 -0
  66. package/bundle/fonts/roboto-900italic.woff +0 -0
  67. package/bundle/fonts/roboto-900italic.woff2 +0 -0
  68. package/bundle/fonts/roboto-italic.woff +0 -0
  69. package/bundle/fonts/roboto-italic.woff2 +0 -0
  70. package/bundle/fonts/roboto-regular.woff +0 -0
  71. package/bundle/fonts/roboto-regular.woff2 +0 -0
  72. package/bundle/images/360_placement_pin_mask.png +0 -0
  73. package/bundle/images/Desktop-help-play-button.svg +1 -0
  74. package/bundle/images/Desktop-help-spacebar.png +0 -0
  75. package/bundle/images/MP-logo_H_lock-RGB_color-black.svg +24 -0
  76. package/bundle/images/NoteColor.png +0 -0
  77. package/bundle/images/chrome.png +0 -0
  78. package/bundle/images/edge.png +0 -0
  79. package/bundle/images/escape.png +0 -0
  80. package/bundle/images/exterior.png +0 -0
  81. package/bundle/images/exterior_hover.png +0 -0
  82. package/bundle/images/firefox.png +0 -0
  83. package/bundle/images/headset-quest-2.png +0 -0
  84. package/bundle/images/interior.png +0 -0
  85. package/bundle/images/interior_hover.png +0 -0
  86. package/bundle/images/login-screen-background.jpg +0 -0
  87. package/bundle/images/matterport-app-icon.svg +9 -0
  88. package/bundle/images/matterport-logo-light.svg +1 -0
  89. package/bundle/images/mattertag-disc-128-free.v1.png +0 -0
  90. package/bundle/images/mobile-help-play-button.svg +1 -0
  91. package/bundle/images/nav_help_360.png +0 -0
  92. package/bundle/images/nav_help_click_inside.png +0 -0
  93. package/bundle/images/nav_help_gesture_drag.png +0 -0
  94. package/bundle/images/nav_help_gesture_drag_two_finger.png +0 -0
  95. package/bundle/images/nav_help_gesture_pinch.png +0 -0
  96. package/bundle/images/nav_help_gesture_position.png +0 -0
  97. package/bundle/images/nav_help_gesture_position_two_finger.png +0 -0
  98. package/bundle/images/nav_help_gesture_tap.png +0 -0
  99. package/bundle/images/nav_help_inside_key.png +0 -0
  100. package/bundle/images/nav_help_keyboard_all.png +0 -0
  101. package/bundle/images/nav_help_keyboard_left_right.png +0 -0
  102. package/bundle/images/nav_help_keyboard_up_down.png +0 -0
  103. package/bundle/images/nav_help_mouse_click.png +0 -0
  104. package/bundle/images/nav_help_mouse_drag_left.png +0 -0
  105. package/bundle/images/nav_help_mouse_drag_right.png +0 -0
  106. package/bundle/images/nav_help_mouse_position_left.png +0 -0
  107. package/bundle/images/nav_help_mouse_position_right.png +0 -0
  108. package/bundle/images/nav_help_mouse_zoom.png +0 -0
  109. package/bundle/images/nav_help_tap_inside.png +0 -0
  110. package/bundle/images/nav_help_zoom_keys.png +0 -0
  111. package/bundle/images/objectColor.png +0 -0
  112. package/bundle/images/outlineBasic1024.png +0 -0
  113. package/bundle/images/outlineBasic2048.png +0 -0
  114. package/bundle/images/outlineBasic4096.png +0 -0
  115. package/bundle/images/outlineBasic512.png +0 -0
  116. package/bundle/images/outlineEnhanced1024.png +0 -0
  117. package/bundle/images/outlineEnhanced2048.png +0 -0
  118. package/bundle/images/outlineEnhanced4096.png +0 -0
  119. package/bundle/images/outlineEnhanced512.png +0 -0
  120. package/bundle/images/pinAnchor.png +0 -0
  121. package/bundle/images/pinIconDefault.png +0 -0
  122. package/bundle/images/safari.png +0 -0
  123. package/bundle/images/scope.svg +3 -0
  124. package/bundle/images/selected_sweep_glow.png +0 -0
  125. package/bundle/images/showcase-password-background.jpg +0 -0
  126. package/bundle/images/surface_grid_planar_256.png +0 -0
  127. package/bundle/images/tagColor.png +0 -0
  128. package/bundle/images/unsupported-browser.jpg +0 -0
  129. package/bundle/images/uv_grid_opengl.jpg +0 -0
  130. package/bundle/images/vert_arrows.png +0 -0
  131. package/bundle/js/136.js +18 -0
  132. package/bundle/js/136.js.LICENSE.txt +20 -0
  133. package/bundle/js/143.js +2 -0
  134. package/bundle/js/143.js.LICENSE.txt +20 -0
  135. package/bundle/js/145.js +2 -0
  136. package/bundle/js/145.js.LICENSE.txt +20 -0
  137. package/bundle/js/189.js +2 -0
  138. package/bundle/js/189.js.LICENSE.txt +20 -0
  139. package/bundle/js/217.js +2 -0
  140. package/bundle/js/217.js.LICENSE.txt +20 -0
  141. package/bundle/js/313.js +2 -0
  142. package/bundle/js/313.js.LICENSE.txt +20 -0
  143. package/bundle/js/316.js +2 -0
  144. package/bundle/js/316.js.LICENSE.txt +27 -0
  145. package/bundle/js/321.js +2 -0
  146. package/bundle/js/321.js.LICENSE.txt +20 -0
  147. package/bundle/js/324.js +2 -0
  148. package/bundle/js/324.js.LICENSE.txt +20 -0
  149. package/bundle/js/325.js +2 -0
  150. package/bundle/js/325.js.LICENSE.txt +20 -0
  151. package/bundle/js/330.js +2 -0
  152. package/bundle/js/330.js.LICENSE.txt +20 -0
  153. package/bundle/js/335.js +2 -0
  154. package/bundle/js/335.js.LICENSE.txt +20 -0
  155. package/bundle/js/376.js +2 -0
  156. package/bundle/js/376.js.LICENSE.txt +20 -0
  157. package/bundle/js/422.js +2 -0
  158. package/bundle/js/422.js.LICENSE.txt +22 -0
  159. package/bundle/js/493.js +2 -0
  160. package/bundle/js/493.js.LICENSE.txt +27 -0
  161. package/bundle/js/512.js +2 -0
  162. package/bundle/js/512.js.LICENSE.txt +20 -0
  163. package/bundle/js/519.js +2 -0
  164. package/bundle/js/519.js.LICENSE.txt +20 -0
  165. package/bundle/js/521.js +2 -0
  166. package/bundle/js/521.js.LICENSE.txt +20 -0
  167. package/bundle/js/525.js +2 -0
  168. package/bundle/js/525.js.LICENSE.txt +20 -0
  169. package/bundle/js/607.js +2 -0
  170. package/bundle/js/607.js.LICENSE.txt +27 -0
  171. package/bundle/js/644.js +2 -0
  172. package/bundle/js/644.js.LICENSE.txt +63 -0
  173. package/bundle/js/648.js +2 -0
  174. package/bundle/js/648.js.LICENSE.txt +20 -0
  175. package/bundle/js/66.js +2 -0
  176. package/bundle/js/66.js.LICENSE.txt +20 -0
  177. package/bundle/js/662.js +2 -0
  178. package/bundle/js/662.js.LICENSE.txt +20 -0
  179. package/bundle/js/668.js +2 -0
  180. package/bundle/js/668.js.LICENSE.txt +20 -0
  181. package/bundle/js/718.js +2 -0
  182. package/bundle/js/718.js.LICENSE.txt +20 -0
  183. package/bundle/js/764.js +2 -0
  184. package/bundle/js/764.js.LICENSE.txt +29 -0
  185. package/bundle/js/833.js +20 -0
  186. package/bundle/js/833.js.LICENSE.txt +20 -0
  187. package/bundle/js/858.js +2 -0
  188. package/bundle/js/858.js.LICENSE.txt +20 -0
  189. package/bundle/js/916.js +2 -0
  190. package/bundle/js/916.js.LICENSE.txt +20 -0
  191. package/bundle/js/924.js +2 -0
  192. package/bundle/js/924.js.LICENSE.txt +20 -0
  193. package/bundle/js/932.js +2 -0
  194. package/bundle/js/932.js.LICENSE.txt +20 -0
  195. package/bundle/js/948.js +2 -0
  196. package/bundle/js/948.js.LICENSE.txt +20 -0
  197. package/bundle/js/958.js +2 -0
  198. package/bundle/js/958.js.LICENSE.txt +20 -0
  199. package/bundle/js/JPEGDecoder.worker.worker.js.LICENSE.txt +29 -0
  200. package/bundle/js/JPEGEncoder.worker.worker.js.LICENSE.txt +29 -0
  201. package/bundle/js/PNGDecoder.worker.worker.js.LICENSE.txt +20 -0
  202. package/bundle/js/PNGEncoder.worker.worker.js.LICENSE.txt +20 -0
  203. package/bundle/js/browser-check.js +2 -0
  204. package/bundle/js/browser-check.js.LICENSE.txt +18 -0
  205. package/bundle/js/showcase.js +6 -0
  206. package/bundle/js/showcase.js.LICENSE.txt +144 -0
  207. package/bundle/locale/messages/strings_de.json +1 -0
  208. package/bundle/locale/messages/strings_es.json +1 -0
  209. package/bundle/locale/messages/strings_fr.json +1 -0
  210. package/bundle/locale/messages/strings_it.json +1 -0
  211. package/bundle/locale/messages/strings_ja.json +1 -0
  212. package/bundle/locale/messages/strings_ko.json +1 -0
  213. package/bundle/locale/messages/strings_nl.json +1 -0
  214. package/bundle/locale/messages/strings_pt.json +1 -0
  215. package/bundle/locale/messages/strings_ru.json +1 -0
  216. package/bundle/locale/messages/strings_zh-CN.json +1 -0
  217. package/bundle/locale/messages/strings_zh-TW.json +1 -0
  218. package/bundle/locale/strings.json +1 -0
  219. package/bundle/sdk/cursors/grab.png +0 -0
  220. package/bundle/sdk/cursors/grabbing.png +0 -0
  221. package/bundle/sdk/cursors/rbe-default.png +0 -0
  222. package/bundle/sdk/cursors/rbe-finish-room.png +0 -0
  223. package/bundle/sdk/cursors/rbe-moving.png +0 -0
  224. package/bundle/sdk/cursors/rbe-place-door.png +0 -0
  225. package/bundle/sdk/cursors/rbe-place-node.png +0 -0
  226. package/bundle/sdk/cursors/rbe-place-opening.png +0 -0
  227. package/bundle/sdk/cursors/zoom-in.png +0 -0
  228. package/bundle/sdk/cursors/zoom-out.png +0 -0
  229. package/bundle/sdk/sandbox.html +1 -0
  230. package/bundle/sdk/sdk-client.js +1 -0
  231. package/bundle/sdk/sdk-interface.js +1 -0
  232. package/bundle/sdk.d.ts +5312 -0
  233. package/bundle/showcase.html +114 -0
  234. package/bundle/terms/terms-de-DE.html +69 -0
  235. package/bundle/terms/terms-en-GB.html +62 -0
  236. package/bundle/terms/terms-en-US.html +62 -0
  237. package/bundle/terms/terms-es-MX.html +66 -0
  238. package/bundle/terms/terms-fr-FR.html +65 -0
  239. package/bundle/terms/terms-it-IT.html +65 -0
  240. package/bundle/terms/terms-ja-JP.html +64 -0
  241. package/bundle/terms/terms-ko-KR.html +65 -0
  242. package/bundle/terms/terms-nl-NL.html +65 -0
  243. package/bundle/terms/terms-pt-BR.html +75 -0
  244. package/bundle/terms/terms-ru-RU.html +72 -0
  245. package/bundle/terms/terms-zh-CN.html +65 -0
  246. package/bundle/terms/terms-zh-TW.html +84 -0
  247. package/bundle/vendors/three/0.146.0/libs/basis/README.md +32 -0
  248. package/bundle/vendors/three/0.146.0/libs/basis/basis_transcoder.js +1 -0
  249. package/bundle/vendors/three/0.146.0/libs/basis/basis_transcoder.wasm +0 -0
  250. package/bundle/vendors/three/0.146.0/libs/basis/no-dynamic-execution.patch +11 -0
  251. package/bundle/vendors/three/0.146.0/libs/draco/README.md +32 -0
  252. package/bundle/vendors/three/0.146.0/libs/draco/draco_decoder.js +1 -0
  253. package/bundle/vendors/three/0.146.0/libs/draco/draco_decoder.wasm +0 -0
  254. package/bundle/vendors/three/0.146.0/libs/draco/draco_encoder.js +1 -0
  255. package/bundle/vendors/three/0.146.0/libs/draco/draco_wasm_wrapper.js +1 -0
  256. package/bundle/vendors/three/0.146.0/libs/draco/gltf/draco_decoder.js +1 -0
  257. package/bundle/vendors/three/0.146.0/libs/draco/gltf/draco_decoder.wasm +0 -0
  258. package/bundle/vendors/three/0.146.0/libs/draco/gltf/draco_encoder.js +1 -0
  259. package/bundle/vendors/three/0.146.0/libs/draco/gltf/draco_wasm_wrapper.js +1 -0
  260. package/bundle/vendors/three/0.146.0/three.cjs +2 -0
  261. package/bundle/vendors/three/0.146.0/three.cjs.LICENSE.txt +5 -0
  262. package/bundle/vendors/three/0.146.0/three.js +2 -0
  263. package/bundle/vendors/three/0.146.0/three.js.LICENSE.txt +5 -0
  264. package/bundle/vendors/three/0.146.0/three.min.js +2 -0
  265. package/bundle/vendors/three/0.146.0/three.min.js.LICENSE.txt +5 -0
  266. package/bundle/vendors/three/0.146.0/three.module.js +2 -0
  267. package/bundle/vendors/three/0.146.0/three.module.js.LICENSE.txt +5 -0
  268. package/bundle/version.txt +1 -0
  269. package/lib/architwin.d.ts +24 -0
  270. package/lib/architwin.min.js +1 -0
  271. package/lib/types.d.ts +123 -0
  272. package/lib/types.js +2 -0
  273. package/package.json +26 -0
  274. package/tsconfig.json +11 -0
@@ -0,0 +1,20 @@
1
+ /*!
2
+ * Matterport Showcase SDK
3
+ *
4
+ * © 2022 Matterport, Inc. All rights reserved.
5
+ *
6
+ * Matterport Showcase SDK ("Showcase SDK") must be used according to
7
+ * the Matterport Terms of Service located at https://matterport.com/terms-of-use, the Platform Subscription Agreement ("PSA") available at https://matterport.com/legal/platform-subscription-agreement and the SDK License terms included in the PSA ("SDK License"). Any use of the Showcase SDK requires a current active Matterport account and associated developer key.
8
+ *
9
+ * -------------------------------------------------------------------------------
10
+ *
11
+ * Redistribution and use in source and binary forms, without modification, is permitted in accordance with the SDK License provided that the following conditions are met:
12
+ *
13
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
14
+ * * Neither the name of Matterport nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
15
+ *
16
+ * THE SHOWCASE SDK IS PROVIDED BY MATTERPORT AS THE COPYRIGHT HOLDER AND, IF APPLICABLE, ITS CONTRIBUTORS "AS IS" AND WITHOUT WARRANTIES OF ANY KIND. TO THE FULLEST EXTENT PERMISSIBLE PURSUANT TO APPLICABLE LAW, MATTERPORT DISCLAIMS, ON BEHALF OF ITSELF AND ITS AFFILIATES AND LICENSORS, ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. MATTERPORT DOES NOT WARRANT THAT THE AVAILABILITY OF THE SHOWCASE SDK WILL BE UNINTERRUPTED OR ERROR-FREE, THAT DEFECTS WILL BE CORRECTED, OR THAT THE SHOWCASE SDK WILL BE FREE OF VIRUSES OR OTHER HARMFUL COMPONENTS. MATTERPORT DOES NOT MAKE ANY REPRESENTATIONS OR WARRANTIES REGARDING THE USE OR THE RESULTS OF THE USE OF THE SHOWCASE SDK OR FUNCTIONS ON THE SHOWCASE SDK IN TERMS OF THEIR CORRECTNESS, ACCURACY, RELIABILITY, RESULTS TO BE ACHIEVED, OR OTHERWISE. APPLICABLE LAW MAY NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SOME OR ALL OF THE FOREGOING DISCLAIMERS MAY NOT APPLY TO YOU.
17
+ *
18
+ * TO THE EXTENT PERMITTED UNDER APPLICABLE LAW UNDER NO CIRCUMSTANCES, INCLUDING, BUT NOT LIMITED TO, NEGLIGENCE, SHALL MATTERPORT OR ITS AFFILIATES OR LICENSORS BE LIABLE FOR ANY CONSEQUENTIAL, EXEMPLARY, PUNITIVE, SPECIAL, INCIDENTAL OR OTHER INDIRECT DAMAGES, EVEN IF MATTERPORT OR A MATTERPORT AUTHORIZED REPRESENTATIVE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. APPLICABLE LAW MAY NOT ALLOW SOME OR ALL OF THIS LIMITATION OF LIABILITY, SO IT MAY NOT APPLY TO YOU.
19
+ *
20
+ */
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 143.js.LICENSE.txt */
2
+ (self.webpackChunkmp_webgl=self.webpackChunkmp_webgl||[]).push([[143],{46102:()=>{}}]);
@@ -0,0 +1,20 @@
1
+ /*!
2
+ * Matterport Showcase SDK
3
+ *
4
+ * © 2022 Matterport, Inc. All rights reserved.
5
+ *
6
+ * Matterport Showcase SDK ("Showcase SDK") must be used according to
7
+ * the Matterport Terms of Service located at https://matterport.com/terms-of-use, the Platform Subscription Agreement ("PSA") available at https://matterport.com/legal/platform-subscription-agreement and the SDK License terms included in the PSA ("SDK License"). Any use of the Showcase SDK requires a current active Matterport account and associated developer key.
8
+ *
9
+ * -------------------------------------------------------------------------------
10
+ *
11
+ * Redistribution and use in source and binary forms, without modification, is permitted in accordance with the SDK License provided that the following conditions are met:
12
+ *
13
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
14
+ * * Neither the name of Matterport nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
15
+ *
16
+ * THE SHOWCASE SDK IS PROVIDED BY MATTERPORT AS THE COPYRIGHT HOLDER AND, IF APPLICABLE, ITS CONTRIBUTORS "AS IS" AND WITHOUT WARRANTIES OF ANY KIND. TO THE FULLEST EXTENT PERMISSIBLE PURSUANT TO APPLICABLE LAW, MATTERPORT DISCLAIMS, ON BEHALF OF ITSELF AND ITS AFFILIATES AND LICENSORS, ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. MATTERPORT DOES NOT WARRANT THAT THE AVAILABILITY OF THE SHOWCASE SDK WILL BE UNINTERRUPTED OR ERROR-FREE, THAT DEFECTS WILL BE CORRECTED, OR THAT THE SHOWCASE SDK WILL BE FREE OF VIRUSES OR OTHER HARMFUL COMPONENTS. MATTERPORT DOES NOT MAKE ANY REPRESENTATIONS OR WARRANTIES REGARDING THE USE OR THE RESULTS OF THE USE OF THE SHOWCASE SDK OR FUNCTIONS ON THE SHOWCASE SDK IN TERMS OF THEIR CORRECTNESS, ACCURACY, RELIABILITY, RESULTS TO BE ACHIEVED, OR OTHERWISE. APPLICABLE LAW MAY NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SOME OR ALL OF THE FOREGOING DISCLAIMERS MAY NOT APPLY TO YOU.
17
+ *
18
+ * TO THE EXTENT PERMITTED UNDER APPLICABLE LAW UNDER NO CIRCUMSTANCES, INCLUDING, BUT NOT LIMITED TO, NEGLIGENCE, SHALL MATTERPORT OR ITS AFFILIATES OR LICENSORS BE LIABLE FOR ANY CONSEQUENTIAL, EXEMPLARY, PUNITIVE, SPECIAL, INCIDENTAL OR OTHER INDIRECT DAMAGES, EVEN IF MATTERPORT OR A MATTERPORT AUTHORIZED REPRESENTATIVE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. APPLICABLE LAW MAY NOT ALLOW SOME OR ALL OF THIS LIMITATION OF LIABILITY, SO IT MAY NOT APPLY TO YOU.
19
+ *
20
+ */
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 145.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkmp_webgl=self.webpackChunkmp_webgl||[]).push([[145],{17145:(a,e,s)=>{s.r(e),s.d(e,{default:()=>f});var r=s(97542),t=s(9037),i=s(79727),o=s(53954),n=s(23254),c=s(44443),l=s(7159);class m{constructor(a,e,s,r){this.cameraData=a,this.viewmodeData=e,this.floorsViewData=s,this.sweepData=r,this.name="deeplinks",this.defaultBaseUrl=(0,c.rI)(),this.requiredParams=[...m.requiredUrlParams]}createLink(a){const{baseHref:e,additionalParams:s,paramFilter:r,thisArg:t}=a||{},i=new URLSearchParams(window.location.search),o=new URL(e||this.defaultBaseUrl.href);return this.appendParams(o.searchParams,i),r&&this.filterParamsFromURL(o,r,t),s&&this.appendParamsFromDictionary(o.searchParams,s),this.removeStartParams(o),this.dedupeModelParam(o),o}createModelLink(a,e){const{baseHref:s,additionalParams:r,paramFilter:t,thisArg:i}=e||{},o=new URLSearchParams(window.location.search),n=new URL(s||this.defaultBaseUrl.href);return this.appendParams(n.searchParams,o),t&&this.filterParamsFromURL(n,t,i),r&&this.appendParamsFromDictionary(n.searchParams,r),this.removeStartParams(n),this.dedupeModelParam(n),n}createDeepLink(a){const{baseHref:e,additionalParams:s,paramFilter:r,thisArg:t}=a||{},i=new URLSearchParams(l.K.getQueryString({cameraData:this.cameraData,floorsViewData:this.floorsViewData,sweepData:this.sweepData,viewmodeData:this.viewmodeData})),o=new URLSearchParams(window.location.search),n=new URL(e||this.defaultBaseUrl.href);this.appendParams(n.searchParams,o),this.removeStartParams(n),r&&this.filterParamsFromURL(n,r,t);for(const[a,e]of i)l.K.navigationKeys.has(a)&&n.searchParams.set(a,e);if(s){const a=Object.assign({},s);for(const e of l.K.navigationKeys)delete a[e];this.appendParamsFromDictionary(n.searchParams,a)}return this.dedupeModelParam(n),n}setDefaultBaseHref(a,e){this.defaultBaseUrl=new URL(a),this.requiredParams=[...m.requiredUrlParams,...e]}filterParamsFromURL(a,e,s){const r=new Set;for(const[t,i]of a.searchParams)this.requiredParams.includes(t)||e.call(s,t,i)||r.add(t);for(const e of r)a.searchParams.delete(e)}dedupeModelParam(a){const e=a.searchParams.get("m")||a.searchParams.get("model")||"";a.searchParams.delete("model"),a.searchParams.set("m",e)}removeStartParams(a){["start","sm","sp","sq","sr","ss","sf","sz"].forEach(a.searchParams.delete,a.searchParams)}appendParams(a,e){for(const[s,r]of e)a.set(s,r)}appendParamsFromDictionary(a,e){for(const[s,r]of Object.entries(e))a.set(s,r)}}m.requiredUrlParams=["m","model"];var h,d=s(8403);!function(a){a[a.SAME_ORIGIN=0]="SAME_ORIGIN",a[a.EXTERNAL=1]="EXTERNAL",a[a.MODEL=2]="MODEL",a[a.NAVIGATION=3]="NAVIGATION"}(h||(h={}));var P,N=s(12039);!function(a){a[a.IN_FRAME=0]="IN_FRAME",a[a.NEW_WINDOW=1]="NEW_WINDOW",a[a.CUSTOM=2]="CUSTOM"}(P||(P={}));class w{constructor(a){this.commandBinder=a,this.defaultPolicy={[h.NAVIGATION]:P.IN_FRAME,[h.MODEL]:P.IN_FRAME,[h.SAME_ORIGIN]:P.NEW_WINDOW,[h.EXTERNAL]:P.NEW_WINDOW},this.activePolicy=Object.assign({},this.defaultPolicy),this.linkHandlers={[h.NAVIGATION]:{[P.IN_FRAME]:a=>{const e=l.K.deserialize(a);e&&this.navigateToPose(e)},[P.NEW_WINDOW]:a=>this.openNewWindow(a),[P.CUSTOM]:a=>this.customHandlers[h.NAVIGATION](a)},[h.MODEL]:{[P.IN_FRAME]:a=>this.replaceFrameLocation(a),[P.NEW_WINDOW]:a=>this.openNewWindow(a),[P.CUSTOM]:a=>this.customHandlers[h.MODEL](a)},[h.SAME_ORIGIN]:{[P.IN_FRAME]:a=>this.replaceFrameLocation(a),[P.NEW_WINDOW]:a=>this.openNewWindow(a),[P.CUSTOM]:a=>this.customHandlers[h.SAME_ORIGIN](a)},[h.EXTERNAL]:{[P.IN_FRAME]:()=>{throw Error("Navigating Showcase's frame to an external domain is not supported.")},[P.NEW_WINDOW]:a=>this.openNewWindow(a),[P.CUSTOM]:a=>this.customHandlers[h.EXTERNAL](a)}},this.customHandlers={[h.NAVIGATION]:a=>{},[h.MODEL]:a=>{},[h.SAME_ORIGIN]:a=>{},[h.EXTERNAL]:a=>{}}}get HandlingPolicy(){return P}setPolicy(a,e,s){e===P.CUSTOM&&s&&(this.customHandlers[a]=s),this.activePolicy[a]=e}resetPolicy(a){this.activePolicy[a]=this.defaultPolicy[a]}openLink(a){if(function(a){return(0,d.K)(a)&&"pose"in a}(a)){const e=this.activePolicy[h.NAVIGATION];this.linkHandlers[h.NAVIGATION][e](a.fullLink)}else if(function(a){return(0,d.K)(a)&&"modelId"in a}(a)){const e=this.activePolicy[h.MODEL],s=new URL(window.location.href),r=new URL(a.fullLink);s.search=r.search,s.searchParams.delete("m"),s.searchParams.delete("model"),s.searchParams.set("m",a.modelId),s.searchParams.set("play","1"),this.linkHandlers[h.MODEL][e](s.href)}else try{const e=new URL(a);if(e.origin===document.referrer||e.origin===window.location.origin){const e=this.activePolicy[h.SAME_ORIGIN];this.linkHandlers[h.SAME_ORIGIN][e](a)}else{const e=this.activePolicy[h.EXTERNAL];this.linkHandlers[h.EXTERNAL][e](a)}}catch(e){const s=this.activePolicy[h.EXTERNAL];this.linkHandlers[h.EXTERNAL][s](a)}}replaceFrameLocation(a){window.location.replace(a)}openNewWindow(a){window.open(a)}navigateToPose(a){this.commandBinder.issueCommand(new N.L4(a))}}const f=class extends r.Y{constructor(){super(...arguments),this.name="deep linker"}async init(a,e){const[s,r,c,l]=await Promise.all([e.market.waitForData(t.M),e.market.waitForData(n.O),e.market.waitForData(i.c),e.market.waitForData(o.Z)]);this.creator=new m(s,r,c,l),this.handler=new w(e.commandBinder)}get LinkType(){return h}}}}]);
@@ -0,0 +1,20 @@
1
+ /*!
2
+ * Matterport Showcase SDK
3
+ *
4
+ * © 2022 Matterport, Inc. All rights reserved.
5
+ *
6
+ * Matterport Showcase SDK ("Showcase SDK") must be used according to
7
+ * the Matterport Terms of Service located at https://matterport.com/terms-of-use, the Platform Subscription Agreement ("PSA") available at https://matterport.com/legal/platform-subscription-agreement and the SDK License terms included in the PSA ("SDK License"). Any use of the Showcase SDK requires a current active Matterport account and associated developer key.
8
+ *
9
+ * -------------------------------------------------------------------------------
10
+ *
11
+ * Redistribution and use in source and binary forms, without modification, is permitted in accordance with the SDK License provided that the following conditions are met:
12
+ *
13
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
14
+ * * Neither the name of Matterport nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
15
+ *
16
+ * THE SHOWCASE SDK IS PROVIDED BY MATTERPORT AS THE COPYRIGHT HOLDER AND, IF APPLICABLE, ITS CONTRIBUTORS "AS IS" AND WITHOUT WARRANTIES OF ANY KIND. TO THE FULLEST EXTENT PERMISSIBLE PURSUANT TO APPLICABLE LAW, MATTERPORT DISCLAIMS, ON BEHALF OF ITSELF AND ITS AFFILIATES AND LICENSORS, ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. MATTERPORT DOES NOT WARRANT THAT THE AVAILABILITY OF THE SHOWCASE SDK WILL BE UNINTERRUPTED OR ERROR-FREE, THAT DEFECTS WILL BE CORRECTED, OR THAT THE SHOWCASE SDK WILL BE FREE OF VIRUSES OR OTHER HARMFUL COMPONENTS. MATTERPORT DOES NOT MAKE ANY REPRESENTATIONS OR WARRANTIES REGARDING THE USE OR THE RESULTS OF THE USE OF THE SHOWCASE SDK OR FUNCTIONS ON THE SHOWCASE SDK IN TERMS OF THEIR CORRECTNESS, ACCURACY, RELIABILITY, RESULTS TO BE ACHIEVED, OR OTHERWISE. APPLICABLE LAW MAY NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SOME OR ALL OF THE FOREGOING DISCLAIMERS MAY NOT APPLY TO YOU.
17
+ *
18
+ * TO THE EXTENT PERMITTED UNDER APPLICABLE LAW UNDER NO CIRCUMSTANCES, INCLUDING, BUT NOT LIMITED TO, NEGLIGENCE, SHALL MATTERPORT OR ITS AFFILIATES OR LICENSORS BE LIABLE FOR ANY CONSEQUENTIAL, EXEMPLARY, PUNITIVE, SPECIAL, INCIDENTAL OR OTHER INDIRECT DAMAGES, EVEN IF MATTERPORT OR A MATTERPORT AUTHORIZED REPRESENTATIVE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. APPLICABLE LAW MAY NOT ALLOW SOME OR ALL OF THIS LIMITATION OF LIABILITY, SO IT MAY NOT APPLY TO YOU.
19
+ *
20
+ */
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 189.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkmp_webgl=self.webpackChunkmp_webgl||[]).push([[189],{41835:(t,e,i)=>{i.d(e,{Z:()=>o});class o{}},22533:(t,e,i)=>{var o;i.d(e,{S:()=>o}),function(t){t[t.Standard=0]="Standard",t[t.Depth=1]="Depth",t[t.Transparent=2]="Transparent",t[t.Wireframe=3]="Wireframe",t[t.UV=4]="UV"}(o||(o={}))},7402:(t,e,i)=>{i.d(e,{g:()=>h});var o=i(81396),s=i(17878),n=i(56512),r=i(82814),a=i(12529),l=i(53203);class h extends r.S{constructor(t,e,i=s.o.ALL){super(),this._opacity=1,this._chunks=[],this.size=new o.Vector3,this.center=new o.Vector3,this.built=!1,this.layers.mask=i.mask,this.name=`RoomMesh:${t}-${e}`,this.meshGroup=t,this.meshSubgroup=e,this.renderOrder=a.z.default,this.onBeforeRender=(t,e,i,o,s,n)=>{this.updateUniforms(s,n)}}dispose(){this.reset()}reset(){this._chunks.length=0,this.geometry.dispose(),delete this.onBuild,delete this.onOpacityUpdate,this.built=!1}addChunk(t){-1===this._chunks.indexOf(t)&&this._chunks.push(t)}getChunk(t){return this._chunks[t]}build(){if(this.built)throw new Error("build() should only be called once");if(!this._chunks.length)return;const t=(0,n.qf)(this._chunks.map((t=>t.geometry)));t.clearGroups();let e=0;this.material=[],this._chunks.forEach(((i,o)=>{i.geometry&&i.geometry.index&&(t.addGroup(e,i.geometry.index.count,o),e+=i.geometry.index.count,i.geometry.dispose(),i.geometry=t,i.notifyOnMaterialUpdated((t=>{Array.isArray(this.material)&&(this.material[o]=t),this.onMaterialUpdate&&this.onMaterialUpdate()})),i.onOpacityUpdate=t=>{this.opacity=t})})),this.geometry=t,this.geometry.computeBoundingBox(),this.geometry.computeBoundingSphere(),this.material=this._chunks.map((t=>t.material)),this.size=this.boundingBox.getSize(this.size),this.center=this.boundingBox.getCenter(this.center),this.built=!0,this.onBuild&&this.onBuild()}buildWithTileChunk(t){if(this.built)return;const{meshGroup:e,meshSubgroup:i,lod:o}=t;this.name=`RoomMesh:${o}-${e}-${i}-${t.chunkIndex}`,this.meshGroup=e,this.meshSubgroup=i,this._chunks.push(t),t.notifyOnMaterialUpdated((t=>{this.material=t,this.onMaterialUpdate&&this.onMaterialUpdate()})),t.onOpacityUpdate=t=>{this.opacity=t},this.size=this.boundingBox.getSize(this.size),this.center=this.boundingBox.getCenter(this.center),this.built=!0,this.onBuild&&this.onBuild()}updateUniforms(t,e){t instanceof o.RawShaderMaterial&&(e?this.chunks[e.materialIndex].onBeforeDraw(t):this.chunks.length&&this.chunks[0].onBeforeDraw(t))}get boundingBox(){return(0,n.A5)(this.geometry)}set opacity(t){t!==this.opacity&&(this._opacity=t,this.raycastEnabled=t>l.xx.FADE_CLICKABLE_THRESHOLD,this.renderOrder=t<l.xx.FADE_OPAQUE?a.z.ghostFloor:a.z.default,this.onOpacityUpdate&&this.onOpacityUpdate(t))}get opacity(){return this._opacity}get chunks(){return this._chunks}getSortKey(){return this.chunks.length?this._chunks[0].getSortKey():0}}},51411:(t,e,i)=>{i.d(e,{n:()=>s});var o=i(19663);class s extends o.m{constructor(t,e,i){super(),this.id="MESH_PREVIEW_POSITION",this.payload={enabled:t,previewCirclePosition:e,size:i}}}},68191:(t,e,i)=>{i.d(e,{U:()=>n});var o=i(19663),s=i(22533);class n extends o.m{constructor(t){super(),this.id="SET_CHUNK_RENDER_MODE",this.payload={mode:t}}}n.modes=s.S},38987:(t,e,i)=>{i.d(e,{u:()=>s});var o=i(19663);class s extends o.m{constructor(t=null){super(),this.id="SET_MOUSE_CURSOR",this.payload={cursor:t}}}},34956:(t,e,i)=>{var o;i.d(e,{C:()=>o}),function(t){t.NONE="none",t.DEFAULT="default",t.MOVE="move",t.MOVE_LF="col-resize",t.MOVE_UD="row-resize",t.XHAIR="crosshair",t.PLUS="cell",t.QUESTION="help",t.NOPE="not-allowed",t.FINGER="pointer",t.TEXT="text",t.TEXT_VERT="vertical-text",t.ZOOM_IN="zoom-in",t.ZOOM_OUT="zoom-in",t.GRAB="grab",t.GRABBING="grabbing",t.ARROW_R="e-resize",t.ARROW_L="w-resize",t.ARROW_U="n-resize",t.ARROW_D="s-resize",t.ARROW_UR="ne-resize",t.ARROW_UL="nw-resize",t.ARROW_DR="se-resize",t.ARROW_DL="sw-resize",t.ARROW_LR="ew-resize",t.ARROW_UD="ns-resize",t.ARROW_URDL="nesw-resize",t.ARROW_ULDR="nwse-resize",t.ROOMBOUNDS_DEFAULT="rbe-default",t.ROOMBOUNDS_MOVING="rbe-moving",t.ROOMBOUNDS_PLACE_NODE="rbe-place-node",t.ROOMBOUNDS_FINISH_ROOM="rbe-finish-room",t.ROOMBOUNDS_PLACE_OPENING="rbe-place-opening",t.ROOMBOUNDS_PLACE_DOOR="rbe-place-door"}(o||(o={}))},93642:(t,e,i)=>{i.d(e,{O8:()=>a,SI:()=>s,WI:()=>l,uQ:()=>n,zf:()=>r});var o=i(69505);const s=1e3/60,n=(0,o.Id)(70),r=-n,a=.05,l=.1/60},49219:(t,e,i)=>{i.r(e),i.d(e,{default:()=>b,lookAccelerationKey:()=>S});var o=i(97542),s=i(81396),n=i(90304),r=i(93642),a=i(21646),l=i(49827),h=i(41835),c=i(46950);class d extends h.Z{constructor(t){super(),this.cameraPoseProxy=t,this.lookVelocity=new s.Vector2,this.lookAccel=new s.Vector2,this.tempAxis=new s.Vector3,this.tempOrientation=new s.Quaternion,this.currentOrientation=new s.Quaternion,this.tempEuler=new s.Euler,this.poseController=null,this.transition={active:!1,startTime:0,elapsed:0,duration:0,velocity:new s.Vector2,easeOut:!1}}setController(t){return this.poseController=t,this}setLookAcceleration(t,e=!1){this.transition.active||(e&&(t.x&&this.lookVelocity.x&&Math.sign(t.x)!==Math.sign(this.lookVelocity.x)&&(this.lookVelocity.x=0),t.y&&this.lookVelocity.y&&Math.sign(t.y)!==Math.sign(this.lookVelocity.y)&&(this.lookVelocity.y=0)),this.lookAccel.x=void 0!==t.x?t.x:this.lookAccel.x,this.lookAccel.y=void 0!==t.y?t.y:this.lookAccel.y)}startTransition(t,e,i){var o;const s=new c.Q;return this.transition.active=!0,this.transition.duration=t,this.transition.elapsed=0,this.transition.startTime=Date.now(),this.transition.deferred=s,this.transition.velocity.copy(e),this.transition.easeOut=i,this.lookAccel.set(0,0),this.lookVelocity.copy(e),null===(o=this.poseController)||void 0===o||o.beginExternalTransition(),s.promise()}stopTransition(){var t;this.transition.active&&(null===(t=this.poseController)||void 0===t||t.endExternalTransition(),this.transition.active=!1),this.transition.deferred&&(this.transition.deferred.resolve(),this.transition.deferred=void 0)}updateTransition(t){const e=t/r.SI;if(this.lookVelocity.copy(this.transition.velocity),this.transition.elapsed+=t,this.transition.elapsed>=this.transition.duration){const e=this.transition.duration-(this.transition.elapsed-t);this.lookVelocity.multiplyScalar(e/t)}else this.lookVelocity.multiplyScalar(e)}updateCameraParameters(){var t;const e=this.cameraPoseProxy.pose;this.tempEuler.setFromQuaternion(e.rotation,"YXZ");const i=this.tempEuler.x,o=(0,l.uZ)(this.lookVelocity.y,r.zf-i,r.uQ-i);this.tempAxis.copy(n.f.RIGHT),this.tempOrientation.setFromAxisAngle(this.tempAxis.applyQuaternion(e.rotation),o),this.currentOrientation.copy(e.rotation).premultiply(this.tempOrientation),this.tempOrientation.setFromAxisAngle(n.f.UP,this.lookVelocity.x),this.currentOrientation.premultiply(this.tempOrientation),e.rotation.equals(this.currentOrientation)||(this.tempOrientation.copy(this.currentOrientation).normalize(),null===(t=this.poseController)||void 0===t||t.updateCameraRotation(this.tempOrientation))}update(t){const e=this.cameraPoseProxy.pose,i=t/r.SI;e.rotation.equals(this.currentOrientation)||this.currentOrientation.copy(e.rotation),this.transition.active?(this.updateTransition(t),this.updateCameraParameters(),this.transition.elapsed>=this.transition.duration&&(this.stop(this.transition.easeOut),this.transition.active=!1)):(this.lookAccel.length()>a.Z.epsilon||this.lookVelocity.length()>a.Z.epsilon)&&(this.lookVelocity.addScaledVector(this.lookAccel,i),this.updateCameraParameters(),this.lookVelocity.multiplyScalar(Math.pow(1-r.O8,i)))}stop(t=!1){this.stopTransition(),this.lookAccel.set(0,0),t||this.lookVelocity.set(0,0)}startRotateTransition(t,e,i){return this.beforeStartRotationTransition&&this.beforeStartRotationTransition(),this.startTransition(t,e.clone().multiplyScalar(r.SI),i).nativePromise()}startTranslateTransition(t,e,i=!0){throw new Error("Panning isn't supported in Panorama Controls")}startZoomTransition(t,e,i){throw new Error("Zooming isn't supported in Panorama Controls")}}var u=i(23254),p=i(5135),m=i(95882),y=i(16782),g=i(32597),O=i(6667),R=i(5090),k=i(80592),x=i(89553),A=i(34029),_=i(69170),v=i(9037);const S="Rotation speed";class b extends o.Y{constructor(){super(...arguments),this.name="panorama-controls",this.controlsEngaged=!1,this.lookAccelerationSpeed=r.WI,this.calcRotationAngle=(()=>{const t=new s.Matrix4,e=new s.Vector3,i=new s.Vector3;return(o,n)=>{t.copy(this.cameraData.pose.projection.asThreeMatrix4()),t.invert(),e.set(o.x-n.x,o.y-n.y,-1).applyMatrix4(t),i.set(o.x,o.y,-1).applyMatrix4(t);const r=Math.sqrt(e.x*e.x+e.z*e.z),a=Math.sqrt(i.x*i.x+i.z*i.z),l=Math.atan2(e.y,r),h=Math.atan2(i.y,a)-l;e.y=0,i.y=0,e.normalize(),i.normalize();const c=Math.acos(e.dot(i));let d=0;return isNaN(c)||(d=c,n.x>0&&(d*=-1)),new s.Vector2(-d,-h)}})()}async init(t,e){const i=await e.getModuleBySymbol(_.y.CONTROLS_COMMON);this.controls=new d(i.cameraPoseProxy),this.cameraData=await e.market.waitForData(v.M);const o=this.cameraData;this.controls.beforeStartRotationTransition=()=>{o.transition&&o.transition.activeInternal&&o.transition.to.rotation&&(o.transition.to.rotation=void 0)},i.addControls(m.Ey.Panorama,this.controls),i.addControls(m.Ey.Mesh,this.controls),this.market=e.market,this.bindings.push(e.subscribe(R.Z,(t=>{this.controls.stop()}))),e.getModuleBySymbol(_.y.INPUT).then((t=>{t.registerHandler(k.E0,(t=>{this.validateViewmode()&&this.controls.stop()})),t.registerHandler(k._t,(t=>{this.validateViewmode()&&t.buttons&y.r.PRIMARY&&(this.controlsEngaged=!0,this.onDrag(t.position,t.delta),this.controls.update(r.SI),this.controls.stop())})),t.registerHandler(k._R,(t=>{this.validateViewmode()&&this.controlsEngaged&&(t.timeSinceLastMove<100&&!(t.buttons&y.r.PRIMARY)&&(this.onDrag(t.position,t.delta),this.controls.update(r.SI),this.controls.setLookAcceleration({x:0,y:0})),this.controlsEngaged=!1)})),t.registerHandler(x.e,(t=>{this.validateViewmode()&&this.onKey(t.key,t.state)}))}))}onUpdate(t){this.validateViewmode()&&this.controls.update(t)}onDrag(t,e){this.controls.setLookAcceleration(this.calcRotationAngle(t,e))}onKey(t,e){var i,o;const s=null!==(o=null===(i=this.market.tryGetData(A.e))||void 0===i?void 0:i.tryGetProperty(S,null))&&void 0!==o?o:null;this.lookAccelerationSpeed=s?s*(Math.PI/180)/60:this.lookAccelerationSpeed;const n=e===O.M.DOWN;switch(t){case g.R.LEFTARROW:case g.R.J:this.controls.setLookAcceleration({x:n?this.lookAccelerationSpeed:0},!0);break;case g.R.RIGHTARROW:case g.R.L:this.controls.setLookAcceleration({x:n?-this.lookAccelerationSpeed:0},!0);break;case g.R.K:this.controls.setLookAcceleration({y:n?-this.lookAccelerationSpeed:0},!0);break;case g.R.I:this.controls.setLookAcceleration({y:n?this.lookAccelerationSpeed:0},!0)}}validateViewmode(){var t,e,i,o;return null!==(e=null===(t=this.market.tryGetData(u.O))||void 0===t?void 0:t.isInside())&&void 0!==e&&e&&null!==(o=!(null===(i=this.market.tryGetData(p.Z))||void 0===i?void 0:i.isVR()))&&void 0!==o&&o}}},93377:(t,e,i)=>{i.d(e,{b:()=>s});var o=i(81396);class s extends o.RawShaderMaterial{onBeforeCompile(t,e){super.onBeforeCompile(t,e),e.capabilities.isWebGL2&&this.glslVersion!==o.GLSL3&&(t.glslVersion=o.GLSL3,t.vertexShader=n+t.vertexShader,t.fragmentShader=r+t.fragmentShader)}}const n="\n#define attribute in\n#define varying out\n#define texture2D texture\n",r="\n#define varying in\nout highp vec4 pc_fragColor;\n#define gl_FragColor pc_fragColor\n#define gl_FragDepthEXT gl_FragDepth\n#define texture2D texture\n#define textureCube texture\n#define texture2DProj textureProj\n"},87928:(t,e,i)=>{i.d(e,{E:()=>s});var o=i(81396);class s extends o.Mesh{constructor(t,e){super(t,e)}}},69984:(t,e,i)=>{i.d(e,{D5:()=>h,Ex:()=>c,G1:()=>a,rn:()=>l});var o=i(81396),s=i(39880);const n=()=>Math.random(),r={},a=(t,e=n())=>(r[e]||(r[e]=new o.Vector4(n(),n(),n(),t)),r[e]),l=()=>new o.Color(n(),n(),n()),h=t=>t instanceof Object&&"r"in t&&"g"in t&&"b"in t;function c(t){return`#${(0,s.Q_)(255*t.r,2,"0",16)}${(0,s.Q_)(255*t.g,2,"0",16)}${(0,s.Q_)(255*t.b,2,"0",16)}`}}}]);
@@ -0,0 +1,20 @@
1
+ /*!
2
+ * Matterport Showcase SDK
3
+ *
4
+ * © 2022 Matterport, Inc. All rights reserved.
5
+ *
6
+ * Matterport Showcase SDK ("Showcase SDK") must be used according to
7
+ * the Matterport Terms of Service located at https://matterport.com/terms-of-use, the Platform Subscription Agreement ("PSA") available at https://matterport.com/legal/platform-subscription-agreement and the SDK License terms included in the PSA ("SDK License"). Any use of the Showcase SDK requires a current active Matterport account and associated developer key.
8
+ *
9
+ * -------------------------------------------------------------------------------
10
+ *
11
+ * Redistribution and use in source and binary forms, without modification, is permitted in accordance with the SDK License provided that the following conditions are met:
12
+ *
13
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
14
+ * * Neither the name of Matterport nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
15
+ *
16
+ * THE SHOWCASE SDK IS PROVIDED BY MATTERPORT AS THE COPYRIGHT HOLDER AND, IF APPLICABLE, ITS CONTRIBUTORS "AS IS" AND WITHOUT WARRANTIES OF ANY KIND. TO THE FULLEST EXTENT PERMISSIBLE PURSUANT TO APPLICABLE LAW, MATTERPORT DISCLAIMS, ON BEHALF OF ITSELF AND ITS AFFILIATES AND LICENSORS, ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. MATTERPORT DOES NOT WARRANT THAT THE AVAILABILITY OF THE SHOWCASE SDK WILL BE UNINTERRUPTED OR ERROR-FREE, THAT DEFECTS WILL BE CORRECTED, OR THAT THE SHOWCASE SDK WILL BE FREE OF VIRUSES OR OTHER HARMFUL COMPONENTS. MATTERPORT DOES NOT MAKE ANY REPRESENTATIONS OR WARRANTIES REGARDING THE USE OR THE RESULTS OF THE USE OF THE SHOWCASE SDK OR FUNCTIONS ON THE SHOWCASE SDK IN TERMS OF THEIR CORRECTNESS, ACCURACY, RELIABILITY, RESULTS TO BE ACHIEVED, OR OTHERWISE. APPLICABLE LAW MAY NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SOME OR ALL OF THE FOREGOING DISCLAIMERS MAY NOT APPLY TO YOU.
17
+ *
18
+ * TO THE EXTENT PERMITTED UNDER APPLICABLE LAW UNDER NO CIRCUMSTANCES, INCLUDING, BUT NOT LIMITED TO, NEGLIGENCE, SHALL MATTERPORT OR ITS AFFILIATES OR LICENSORS BE LIABLE FOR ANY CONSEQUENTIAL, EXEMPLARY, PUNITIVE, SPECIAL, INCIDENTAL OR OTHER INDIRECT DAMAGES, EVEN IF MATTERPORT OR A MATTERPORT AUTHORIZED REPRESENTATIVE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. APPLICABLE LAW MAY NOT ALLOW SOME OR ALL OF THIS LIMITATION OF LIABILITY, SO IT MAY NOT APPLY TO YOU.
19
+ *
20
+ */
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 217.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkmp_webgl=self.webpackChunkmp_webgl||[]).push([[217],{1217:(e,t,s)=>{s.r(t),s.d(t,{GLTFLoader:()=>r});var n=s(81396);class r extends n.Loader{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register((function(e){return new u(e)})),this.register((function(e){return new T(e)})),this.register((function(e){return new x(e)})),this.register((function(e){return new d(e)})),this.register((function(e){return new p(e)})),this.register((function(e){return new m(e)})),this.register((function(e){return new f(e)})),this.register((function(e){return new l(e)})),this.register((function(e){return new g(e)})),this.register((function(e){return new h(e)})),this.register((function(e){return new a(e)})),this.register((function(e){return new R(e)})),this.register((function(e){return new M(e)}))}load(e,t,s,r){const i=this;let o;o=""!==this.resourcePath?this.resourcePath:""!==this.path?this.path:n.LoaderUtils.extractUrlBase(e),this.manager.itemStart(e);const a=function(t){r?r(t):console.error(t),i.manager.itemError(e),i.manager.itemEnd(e)},c=new n.FileLoader(this.manager);c.setPath(this.path),c.setResponseType("arraybuffer"),c.setRequestHeader(this.requestHeader),c.setWithCredentials(this.withCredentials),c.load(e,(function(s){try{i.parse(s,o,(function(s){t(s),i.manager.itemEnd(e)}),a)}catch(e){a(e)}}),s,a)}setDRACOLoader(e){return this.dracoLoader=e,this}setDDSLoader(){throw new Error('THREE.GLTFLoader: "MSFT_texture_dds" no longer supported. Please update to "KHR_texture_basisu".')}setKTX2Loader(e){return this.ktx2Loader=e,this}setMeshoptDecoder(e){return this.meshoptDecoder=e,this}register(e){return-1===this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.push(e),this}unregister(e){return-1!==this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,s,r){let i;const a={},l={};if("string"==typeof e)i=JSON.parse(e);else if(e instanceof ArrayBuffer){if(n.LoaderUtils.decodeText(new Uint8Array(e,0,4))===A){try{a[o.KHR_BINARY_GLTF]=new _(e)}catch(e){return void(r&&r(e))}i=JSON.parse(a[o.KHR_BINARY_GLTF].content)}else i=JSON.parse(n.LoaderUtils.decodeText(new Uint8Array(e)))}else i=e;if(void 0===i.asset||i.asset.version[0]<2)return void(r&&r(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported.")));const u=new Y(i,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});u.fileLoader.setRequestHeader(this.requestHeader);for(let e=0;e<this.pluginCallbacks.length;e++){const t=this.pluginCallbacks[e](u);l[t.name]=t,a[t.name]=!0}if(i.extensionsUsed)for(let e=0;e<i.extensionsUsed.length;++e){const t=i.extensionsUsed[e],s=i.extensionsRequired||[];switch(t){case o.KHR_MATERIALS_UNLIT:a[t]=new c;break;case o.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:a[t]=new w;break;case o.KHR_DRACO_MESH_COMPRESSION:a[t]=new S(i,this.dracoLoader);break;case o.KHR_TEXTURE_TRANSFORM:a[t]=new L;break;case o.KHR_MESH_QUANTIZATION:a[t]=new I;break;default:s.indexOf(t)>=0&&void 0===l[t]&&console.warn('THREE.GLTFLoader: Unknown extension "'+t+'".')}}u.setExtensions(a),u.setPlugins(l),u.parse(s,r)}parseAsync(e,t){const s=this;return new Promise((function(n,r){s.parse(e,t,n,r)}))}}function i(){let e={};return{get:function(t){return e[t]},add:function(t,s){e[t]=s},remove:function(t){delete e[t]},removeAll:function(){e={}}}}const o={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:"KHR_materials_pbrSpecularGlossiness",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class a{constructor(e){this.parser=e,this.name=o.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let s=0,n=t.length;s<n;s++){const n=t[s];n.extensions&&n.extensions[this.name]&&void 0!==n.extensions[this.name].light&&e._addNodeRef(this.cache,n.extensions[this.name].light)}}_loadLight(e){const t=this.parser,s="light:"+e;let r=t.cache.get(s);if(r)return r;const i=t.json,o=((i.extensions&&i.extensions[this.name]||{}).lights||[])[e];let a;const c=new n.Color(16777215);void 0!==o.color&&c.fromArray(o.color);const l=void 0!==o.range?o.range:0;switch(o.type){case"directional":a=new n.DirectionalLight(c),a.target.position.set(0,0,-1),a.add(a.target);break;case"point":a=new n.PointLight(c),a.distance=l;break;case"spot":a=new n.SpotLight(c),a.distance=l,o.spot=o.spot||{},o.spot.innerConeAngle=void 0!==o.spot.innerConeAngle?o.spot.innerConeAngle:0,o.spot.outerConeAngle=void 0!==o.spot.outerConeAngle?o.spot.outerConeAngle:Math.PI/4,a.angle=o.spot.outerConeAngle,a.penumbra=1-o.spot.innerConeAngle/o.spot.outerConeAngle,a.target.position.set(0,0,-1),a.add(a.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+o.type)}return a.position.set(0,0,0),a.decay=2,void 0!==o.intensity&&(a.intensity=o.intensity),a.name=t.createUniqueName(o.name||"light_"+e),r=Promise.resolve(a),t.cache.add(s,r),r}createNodeAttachment(e){const t=this,s=this.parser,n=s.json.nodes[e],r=(n.extensions&&n.extensions[this.name]||{}).light;return void 0===r?null:this._loadLight(r).then((function(e){return s._getNodeRef(t.cache,r,e)}))}}class c{constructor(){this.name=o.KHR_MATERIALS_UNLIT}getMaterialType(){return n.MeshBasicMaterial}extendParams(e,t,s){const r=[];e.color=new n.Color(1,1,1),e.opacity=1;const i=t.pbrMetallicRoughness;if(i){if(Array.isArray(i.baseColorFactor)){const t=i.baseColorFactor;e.color.fromArray(t),e.opacity=t[3]}void 0!==i.baseColorTexture&&r.push(s.assignTexture(e,"map",i.baseColorTexture,n.sRGBEncoding))}return Promise.all(r)}}class l{constructor(e){this.parser=e,this.name=o.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,t){const s=this.parser.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const n=s.extensions[this.name].emissiveStrength;return void 0!==n&&(t.emissiveIntensity=n),Promise.resolve()}}class u{constructor(e){this.parser=e,this.name=o.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?n.MeshPhysicalMaterial:null}extendMaterialParams(e,t){const s=this.parser,r=s.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const i=[],o=r.extensions[this.name];if(void 0!==o.clearcoatFactor&&(t.clearcoat=o.clearcoatFactor),void 0!==o.clearcoatTexture&&i.push(s.assignTexture(t,"clearcoatMap",o.clearcoatTexture)),void 0!==o.clearcoatRoughnessFactor&&(t.clearcoatRoughness=o.clearcoatRoughnessFactor),void 0!==o.clearcoatRoughnessTexture&&i.push(s.assignTexture(t,"clearcoatRoughnessMap",o.clearcoatRoughnessTexture)),void 0!==o.clearcoatNormalTexture&&(i.push(s.assignTexture(t,"clearcoatNormalMap",o.clearcoatNormalTexture)),void 0!==o.clearcoatNormalTexture.scale)){const e=o.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new n.Vector2(e,e)}return Promise.all(i)}}class h{constructor(e){this.parser=e,this.name=o.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?n.MeshPhysicalMaterial:null}extendMaterialParams(e,t){const s=this.parser,n=s.json.materials[e];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const r=[],i=n.extensions[this.name];return void 0!==i.iridescenceFactor&&(t.iridescence=i.iridescenceFactor),void 0!==i.iridescenceTexture&&r.push(s.assignTexture(t,"iridescenceMap",i.iridescenceTexture)),void 0!==i.iridescenceIor&&(t.iridescenceIOR=i.iridescenceIor),void 0===t.iridescenceThicknessRange&&(t.iridescenceThicknessRange=[100,400]),void 0!==i.iridescenceThicknessMinimum&&(t.iridescenceThicknessRange[0]=i.iridescenceThicknessMinimum),void 0!==i.iridescenceThicknessMaximum&&(t.iridescenceThicknessRange[1]=i.iridescenceThicknessMaximum),void 0!==i.iridescenceThicknessTexture&&r.push(s.assignTexture(t,"iridescenceThicknessMap",i.iridescenceThicknessTexture)),Promise.all(r)}}class d{constructor(e){this.parser=e,this.name=o.KHR_MATERIALS_SHEEN}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?n.MeshPhysicalMaterial:null}extendMaterialParams(e,t){const s=this.parser,r=s.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const i=[];t.sheenColor=new n.Color(0,0,0),t.sheenRoughness=0,t.sheen=1;const o=r.extensions[this.name];return void 0!==o.sheenColorFactor&&t.sheenColor.fromArray(o.sheenColorFactor),void 0!==o.sheenRoughnessFactor&&(t.sheenRoughness=o.sheenRoughnessFactor),void 0!==o.sheenColorTexture&&i.push(s.assignTexture(t,"sheenColorMap",o.sheenColorTexture,n.sRGBEncoding)),void 0!==o.sheenRoughnessTexture&&i.push(s.assignTexture(t,"sheenRoughnessMap",o.sheenRoughnessTexture)),Promise.all(i)}}class p{constructor(e){this.parser=e,this.name=o.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?n.MeshPhysicalMaterial:null}extendMaterialParams(e,t){const s=this.parser,n=s.json.materials[e];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const r=[],i=n.extensions[this.name];return void 0!==i.transmissionFactor&&(t.transmission=i.transmissionFactor),void 0!==i.transmissionTexture&&r.push(s.assignTexture(t,"transmissionMap",i.transmissionTexture)),Promise.all(r)}}class m{constructor(e){this.parser=e,this.name=o.KHR_MATERIALS_VOLUME}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?n.MeshPhysicalMaterial:null}extendMaterialParams(e,t){const s=this.parser,r=s.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const i=[],o=r.extensions[this.name];t.thickness=void 0!==o.thicknessFactor?o.thicknessFactor:0,void 0!==o.thicknessTexture&&i.push(s.assignTexture(t,"thicknessMap",o.thicknessTexture)),t.attenuationDistance=o.attenuationDistance||1/0;const a=o.attenuationColor||[1,1,1];return t.attenuationColor=new n.Color(a[0],a[1],a[2]),Promise.all(i)}}class f{constructor(e){this.parser=e,this.name=o.KHR_MATERIALS_IOR}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?n.MeshPhysicalMaterial:null}extendMaterialParams(e,t){const s=this.parser.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const n=s.extensions[this.name];return t.ior=void 0!==n.ior?n.ior:1.5,Promise.resolve()}}class g{constructor(e){this.parser=e,this.name=o.KHR_MATERIALS_SPECULAR}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?n.MeshPhysicalMaterial:null}extendMaterialParams(e,t){const s=this.parser,r=s.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const i=[],o=r.extensions[this.name];t.specularIntensity=void 0!==o.specularFactor?o.specularFactor:1,void 0!==o.specularTexture&&i.push(s.assignTexture(t,"specularIntensityMap",o.specularTexture));const a=o.specularColorFactor||[1,1,1];return t.specularColor=new n.Color(a[0],a[1],a[2]),void 0!==o.specularColorTexture&&i.push(s.assignTexture(t,"specularColorMap",o.specularColorTexture,n.sRGBEncoding)),Promise.all(i)}}class T{constructor(e){this.parser=e,this.name=o.KHR_TEXTURE_BASISU}loadTexture(e){const t=this.parser,s=t.json,n=s.textures[e];if(!n.extensions||!n.extensions[this.name])return null;const r=n.extensions[this.name],i=t.options.ktx2Loader;if(!i){if(s.extensionsRequired&&s.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,r.source,i)}}class x{constructor(e){this.parser=e,this.name=o.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,s=this.parser,n=s.json,r=n.textures[e];if(!r.extensions||!r.extensions[t])return null;const i=r.extensions[t],o=n.images[i.source];let a=s.textureLoader;if(o.uri){const e=s.options.manager.getHandler(o.uri);null!==e&&(a=e)}return this.detectSupport().then((function(r){if(r)return s.loadTextureImage(e,i.source,a);if(n.extensionsRequired&&n.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return s.loadTexture(e)}))}detectSupport(){return this.isSupported||(this.isSupported=new Promise((function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(1===t.height)}}))),this.isSupported}}class R{constructor(e){this.name=o.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,s=t.bufferViews[e];if(s.extensions&&s.extensions[this.name]){const e=s.extensions[this.name],n=this.parser.getDependency("buffer",e.buffer),r=this.parser.options.meshoptDecoder;if(!r||!r.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return n.then((function(t){const s=e.byteOffset||0,n=e.byteLength||0,i=e.count,o=e.byteStride,a=new Uint8Array(t,s,n);return r.decodeGltfBufferAsync?r.decodeGltfBufferAsync(i,o,a,e.mode,e.filter).then((function(e){return e.buffer})):r.ready.then((function(){const t=new ArrayBuffer(i*o);return r.decodeGltfBuffer(new Uint8Array(t),i,o,a,e.mode,e.filter),t}))}))}return null}}class M{constructor(e){this.name=o.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,s=t.nodes[e];if(!s.extensions||!s.extensions[this.name]||void 0===s.mesh)return null;const r=t.meshes[s.mesh];for(const e of r.primitives)if(e.mode!==C.TRIANGLES&&e.mode!==C.TRIANGLE_STRIP&&e.mode!==C.TRIANGLE_FAN&&void 0!==e.mode)return null;const i=s.extensions[this.name].attributes,o=[],a={};for(const e in i)o.push(this.parser.getDependency("accessor",i[e]).then((t=>(a[e]=t,a[e]))));return o.length<1?null:(o.push(this.parser.createNodeMesh(e)),Promise.all(o).then((e=>{const t=e.pop(),s=t.isGroup?t.children:[t],r=e[0].count,i=[];for(const e of s){const t=new n.Matrix4,s=new n.Vector3,o=new n.Quaternion,c=new n.Vector3(1,1,1),l=new n.InstancedMesh(e.geometry,e.material,r);for(let e=0;e<r;e++)a.TRANSLATION&&s.fromBufferAttribute(a.TRANSLATION,e),a.ROTATION&&o.fromBufferAttribute(a.ROTATION,e),a.SCALE&&c.fromBufferAttribute(a.SCALE,e),l.setMatrixAt(e,t.compose(s,o,c));for(const t in a)"TRANSLATION"!==t&&"ROTATION"!==t&&"SCALE"!==t&&e.geometry.setAttribute(t,a[t]);n.Object3D.prototype.copy.call(l,e),l.frustumCulled=!1,this.parser.assignFinalMaterial(l),i.push(l)}return t.isGroup?(t.clear(),t.add(...i),t):i[0]})))}}const A="glTF",v=1313821514,E=5130562;class _{constructor(e){this.name=o.KHR_BINARY_GLTF,this.content=null,this.body=null;const t=new DataView(e,0,12);if(this.header={magic:n.LoaderUtils.decodeText(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==A)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const s=this.header.length-12,r=new DataView(e,12);let i=0;for(;i<s;){const t=r.getUint32(i,!0);i+=4;const s=r.getUint32(i,!0);if(i+=4,s===v){const s=new Uint8Array(e,12+i,t);this.content=n.LoaderUtils.decodeText(s)}else if(s===E){const s=12+i;this.body=e.slice(s,s+t)}i+=t}if(null===this.content)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class S{constructor(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=o.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}decodePrimitive(e,t){const s=this.json,n=this.dracoLoader,r=e.extensions[this.name].bufferView,i=e.extensions[this.name].attributes,o={},a={},c={};for(const e in i){const t=k[e]||e.toLowerCase();o[t]=i[e]}for(const t in e.attributes){const n=k[t]||t.toLowerCase();if(void 0!==i[t]){const r=s.accessors[e.attributes[t]],i=O[r.componentType];c[n]=i.name,a[n]=!0===r.normalized}}return t.getDependency("bufferView",r).then((function(e){return new Promise((function(t){n.decodeDracoFile(e,(function(e){for(const t in e.attributes){const s=e.attributes[t],n=a[t];void 0!==n&&(s.normalized=n)}t(e)}),o,c)}))}))}}class L{constructor(){this.name=o.KHR_TEXTURE_TRANSFORM}extendTexture(e,t){return void 0!==t.texCoord&&console.warn('THREE.GLTFLoader: Custom UV sets in "'+this.name+'" extension not yet supported.'),void 0===t.offset&&void 0===t.rotation&&void 0===t.scale||(e=e.clone(),void 0!==t.offset&&e.offset.fromArray(t.offset),void 0!==t.rotation&&(e.rotation=t.rotation),void 0!==t.scale&&e.repeat.fromArray(t.scale),e.needsUpdate=!0),e}}class y extends n.MeshStandardMaterial{constructor(e){super(),this.isGLTFSpecularGlossinessMaterial=!0;const t=["#ifdef USE_SPECULARMAP","\tuniform sampler2D specularMap;","#endif"].join("\n"),s=["#ifdef USE_GLOSSINESSMAP","\tuniform sampler2D glossinessMap;","#endif"].join("\n"),r=["vec3 specularFactor = specular;","#ifdef USE_SPECULARMAP","\tvec4 texelSpecular = texture2D( specularMap, vUv );","\t// reads channel RGB, compatible with a glTF Specular-Glossiness (RGBA) texture","\tspecularFactor *= texelSpecular.rgb;","#endif"].join("\n"),i=["float glossinessFactor = glossiness;","#ifdef USE_GLOSSINESSMAP","\tvec4 texelGlossiness = texture2D( glossinessMap, vUv );","\t// reads channel A, compatible with a glTF Specular-Glossiness (RGBA) texture","\tglossinessFactor *= texelGlossiness.a;","#endif"].join("\n"),o=["PhysicalMaterial material;","material.diffuseColor = diffuseColor.rgb * ( 1. - max( specularFactor.r, max( specularFactor.g, specularFactor.b ) ) );","vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );","float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );","material.roughness = max( 1.0 - glossinessFactor, 0.0525 ); // 0.0525 corresponds to the base mip of a 256 cubemap.","material.roughness += geometryRoughness;","material.roughness = min( material.roughness, 1.0 );","material.specularColor = specularFactor;"].join("\n"),a={specular:{value:(new n.Color).setHex(16777215)},glossiness:{value:1},specularMap:{value:null},glossinessMap:{value:null}};this._extraUniforms=a,this.onBeforeCompile=function(e){for(const t in a)e.uniforms[t]=a[t];e.fragmentShader=e.fragmentShader.replace("uniform float roughness;","uniform vec3 specular;").replace("uniform float metalness;","uniform float glossiness;").replace("#include <roughnessmap_pars_fragment>",t).replace("#include <metalnessmap_pars_fragment>",s).replace("#include <roughnessmap_fragment>",r).replace("#include <metalnessmap_fragment>",i).replace("#include <lights_physical_fragment>",o)},Object.defineProperties(this,{specular:{get:function(){return a.specular.value},set:function(e){a.specular.value=e}},specularMap:{get:function(){return a.specularMap.value},set:function(e){a.specularMap.value=e,e?this.defines.USE_SPECULARMAP="":delete this.defines.USE_SPECULARMAP}},glossiness:{get:function(){return a.glossiness.value},set:function(e){a.glossiness.value=e}},glossinessMap:{get:function(){return a.glossinessMap.value},set:function(e){a.glossinessMap.value=e,e?(this.defines.USE_GLOSSINESSMAP="",this.defines.USE_UV=""):(delete this.defines.USE_GLOSSINESSMAP,delete this.defines.USE_UV)}}}),delete this.metalness,delete this.roughness,delete this.metalnessMap,delete this.roughnessMap,this.setValues(e)}copy(e){return super.copy(e),this.specularMap=e.specularMap,this.specular.copy(e.specular),this.glossinessMap=e.glossinessMap,this.glossiness=e.glossiness,delete this.metalness,delete this.roughness,delete this.metalnessMap,delete this.roughnessMap,this}}class w{constructor(){this.name=o.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS,this.specularGlossinessParams=["color","map","lightMap","lightMapIntensity","aoMap","aoMapIntensity","emissive","emissiveIntensity","emissiveMap","bumpMap","bumpScale","normalMap","normalMapType","displacementMap","displacementScale","displacementBias","specularMap","specular","glossinessMap","glossiness","alphaMap","envMap","envMapIntensity"]}getMaterialType(){return y}extendParams(e,t,s){const r=t.extensions[this.name];e.color=new n.Color(1,1,1),e.opacity=1;const i=[];if(Array.isArray(r.diffuseFactor)){const t=r.diffuseFactor;e.color.fromArray(t),e.opacity=t[3]}if(void 0!==r.diffuseTexture&&i.push(s.assignTexture(e,"map",r.diffuseTexture,n.sRGBEncoding)),e.emissive=new n.Color(0,0,0),e.glossiness=void 0!==r.glossinessFactor?r.glossinessFactor:1,e.specular=new n.Color(1,1,1),Array.isArray(r.specularFactor)&&e.specular.fromArray(r.specularFactor),void 0!==r.specularGlossinessTexture){const t=r.specularGlossinessTexture;i.push(s.assignTexture(e,"glossinessMap",t)),i.push(s.assignTexture(e,"specularMap",t,n.sRGBEncoding))}return Promise.all(i)}createMaterial(e){const t=new y(e);return t.fog=!0,t.color=e.color,t.map=void 0===e.map?null:e.map,t.lightMap=null,t.lightMapIntensity=1,t.aoMap=void 0===e.aoMap?null:e.aoMap,t.aoMapIntensity=1,t.emissive=e.emissive,t.emissiveIntensity=void 0===e.emissiveIntensity?1:e.emissiveIntensity,t.emissiveMap=void 0===e.emissiveMap?null:e.emissiveMap,t.bumpMap=void 0===e.bumpMap?null:e.bumpMap,t.bumpScale=1,t.normalMap=void 0===e.normalMap?null:e.normalMap,t.normalMapType=n.TangentSpaceNormalMap,e.normalScale&&(t.normalScale=e.normalScale),t.displacementMap=null,t.displacementScale=1,t.displacementBias=0,t.specularMap=void 0===e.specularMap?null:e.specularMap,t.specular=e.specular,t.glossinessMap=void 0===e.glossinessMap?null:e.glossinessMap,t.glossiness=e.glossiness,t.alphaMap=null,t.envMap=void 0===e.envMap?null:e.envMap,t.envMapIntensity=1,t}}class I{constructor(){this.name=o.KHR_MESH_QUANTIZATION}}class b extends n.Interpolant{constructor(e,t,s,n){super(e,t,s,n)}copySampleValue_(e){const t=this.resultBuffer,s=this.sampleValues,n=this.valueSize,r=e*n*3+n;for(let e=0;e!==n;e++)t[e]=s[r+e];return t}interpolate_(e,t,s,n){const r=this.resultBuffer,i=this.sampleValues,o=this.valueSize,a=2*o,c=3*o,l=n-t,u=(s-t)/l,h=u*u,d=h*u,p=e*c,m=p-c,f=-2*d+3*h,g=d-h,T=1-f,x=g-h+u;for(let e=0;e!==o;e++){const t=i[m+e+o],s=i[m+e+a]*l,n=i[p+e+o],c=i[p+e]*l;r[e]=T*t+x*s+f*n+g*c}return r}}const N=new n.Quaternion;class P extends b{interpolate_(e,t,s,n){const r=super.interpolate_(e,t,s,n);return N.fromArray(r).normalize().toArray(r),r}}const C={FLOAT:5126,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,LINEAR:9729,REPEAT:10497,SAMPLER_2D:35678,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123},O={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},F={9728:n.NearestFilter,9729:n.LinearFilter,9984:n.NearestMipmapNearestFilter,9985:n.LinearMipmapNearestFilter,9986:n.NearestMipmapLinearFilter,9987:n.LinearMipmapLinearFilter},H={33071:n.ClampToEdgeWrapping,33648:n.MirroredRepeatWrapping,10497:n.RepeatWrapping},U={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},k={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},G={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},D={CUBICSPLINE:void 0,LINEAR:n.InterpolateLinear,STEP:n.InterpolateDiscrete},B="OPAQUE",K="MASK",j="BLEND";function V(e,t,s){for(const n in s.extensions)void 0===e[n]&&(t.userData.gltfExtensions=t.userData.gltfExtensions||{},t.userData.gltfExtensions[n]=s.extensions[n])}function X(e,t){void 0!==t.extras&&("object"==typeof t.extras?Object.assign(e.userData,t.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+t.extras))}function q(e,t){if(e.updateMorphTargets(),void 0!==t.weights)for(let s=0,n=t.weights.length;s<n;s++)e.morphTargetInfluences[s]=t.weights[s];if(t.extras&&Array.isArray(t.extras.targetNames)){const s=t.extras.targetNames;if(e.morphTargetInfluences.length===s.length){e.morphTargetDictionary={};for(let t=0,n=s.length;t<n;t++)e.morphTargetDictionary[s[t]]=t}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function z(e){const t=e.extensions&&e.extensions[o.KHR_DRACO_MESH_COMPRESSION];let s;return s=t?"draco:"+t.bufferView+":"+t.indices+":"+W(t.attributes):e.indices+":"+W(e.attributes)+":"+e.mode,s}function W(e){let t="";const s=Object.keys(e).sort();for(let n=0,r=s.length;n<r;n++)t+=s[n]+":"+e[s[n]]+";";return t}function Q(e){switch(e){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}class Y{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new i,this.associations=new Map,this.primitiveCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};const s=!0===/^((?!chrome|android).)*safari/i.test(navigator.userAgent),r=navigator.userAgent.indexOf("Firefox")>-1,o=r?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1;"undefined"==typeof createImageBitmap||s||r&&o<98?this.textureLoader=new n.TextureLoader(this.options.manager):this.textureLoader=new n.ImageBitmapLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new n.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),"use-credentials"===this.options.crossOrigin&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const s=this,n=this.json,r=this.extensions;this.cache.removeAll(),this._invokeAll((function(e){return e._markDefs&&e._markDefs()})),Promise.all(this._invokeAll((function(e){return e.beforeRoot&&e.beforeRoot()}))).then((function(){return Promise.all([s.getDependencies("scene"),s.getDependencies("animation"),s.getDependencies("camera")])})).then((function(t){const i={scene:t[0][n.scene||0],scenes:t[0],animations:t[1],cameras:t[2],asset:n.asset,parser:s,userData:{}};V(r,i,n),X(i,n),Promise.all(s._invokeAll((function(e){return e.afterRoot&&e.afterRoot(i)}))).then((function(){e(i)}))})).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],s=this.json.meshes||[];for(let s=0,n=t.length;s<n;s++){const n=t[s].joints;for(let t=0,s=n.length;t<s;t++)e[n[t]].isBone=!0}for(let t=0,n=e.length;t<n;t++){const n=e[t];void 0!==n.mesh&&(this._addNodeRef(this.meshCache,n.mesh),void 0!==n.skin&&(s[n.mesh].isSkinnedMesh=!0)),void 0!==n.camera&&this._addNodeRef(this.cameraCache,n.camera)}}_addNodeRef(e,t){void 0!==t&&(void 0===e.refs[t]&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)}_getNodeRef(e,t,s){if(e.refs[t]<=1)return s;const n=s.clone(),r=(e,t)=>{const s=this.associations.get(e);null!=s&&this.associations.set(t,s);for(const[s,n]of e.children.entries())r(n,t.children[s])};return r(s,n),n.name+="_instance_"+e.uses[t]++,n}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let s=0;s<t.length;s++){const n=e(t[s]);if(n)return n}return null}_invokeAll(e){const t=Object.values(this.plugins);t.unshift(this);const s=[];for(let n=0;n<t.length;n++){const r=e(t[n]);r&&s.push(r)}return s}getDependency(e,t){const s=e+":"+t;let n=this.cache.get(s);if(!n){switch(e){case"scene":n=this.loadScene(t);break;case"node":n=this.loadNode(t);break;case"mesh":n=this._invokeOne((function(e){return e.loadMesh&&e.loadMesh(t)}));break;case"accessor":n=this.loadAccessor(t);break;case"bufferView":n=this._invokeOne((function(e){return e.loadBufferView&&e.loadBufferView(t)}));break;case"buffer":n=this.loadBuffer(t);break;case"material":n=this._invokeOne((function(e){return e.loadMaterial&&e.loadMaterial(t)}));break;case"texture":n=this._invokeOne((function(e){return e.loadTexture&&e.loadTexture(t)}));break;case"skin":n=this.loadSkin(t);break;case"animation":n=this._invokeOne((function(e){return e.loadAnimation&&e.loadAnimation(t)}));break;case"camera":n=this.loadCamera(t);break;default:throw new Error("Unknown type: "+e)}this.cache.add(s,n)}return n}getDependencies(e){let t=this.cache.get(e);if(!t){const s=this,n=this.json[e+("mesh"===e?"es":"s")]||[];t=Promise.all(n.map((function(t,n){return s.getDependency(e,n)}))),this.cache.add(e,t)}return t}loadBuffer(e){const t=this.json.buffers[e],s=this.fileLoader;if(t.type&&"arraybuffer"!==t.type)throw new Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(void 0===t.uri&&0===e)return Promise.resolve(this.extensions[o.KHR_BINARY_GLTF].body);const r=this.options;return new Promise((function(e,i){s.load(n.LoaderUtils.resolveURL(t.uri,r.path),e,void 0,(function(){i(new Error('THREE.GLTFLoader: Failed to load buffer "'+t.uri+'".'))}))}))}loadBufferView(e){const t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then((function(e){const s=t.byteLength||0,n=t.byteOffset||0;return e.slice(n,n+s)}))}loadAccessor(e){const t=this,s=this.json,r=this.json.accessors[e];if(void 0===r.bufferView&&void 0===r.sparse)return Promise.resolve(null);const i=[];return void 0!==r.bufferView?i.push(this.getDependency("bufferView",r.bufferView)):i.push(null),void 0!==r.sparse&&(i.push(this.getDependency("bufferView",r.sparse.indices.bufferView)),i.push(this.getDependency("bufferView",r.sparse.values.bufferView))),Promise.all(i).then((function(e){const i=e[0],o=U[r.type],a=O[r.componentType],c=a.BYTES_PER_ELEMENT,l=c*o,u=r.byteOffset||0,h=void 0!==r.bufferView?s.bufferViews[r.bufferView].byteStride:void 0,d=!0===r.normalized;let p,m;if(h&&h!==l){const e=Math.floor(u/h),s="InterleavedBuffer:"+r.bufferView+":"+r.componentType+":"+e+":"+r.count;let l=t.cache.get(s);l||(p=new a(i,e*h,r.count*h/c),l=new n.InterleavedBuffer(p,h/c),t.cache.add(s,l)),m=new n.InterleavedBufferAttribute(l,o,u%h/c,d)}else p=null===i?new a(r.count*o):new a(i,u,r.count*o),m=new n.BufferAttribute(p,o,d);if(void 0!==r.sparse){const t=U.SCALAR,s=O[r.sparse.indices.componentType],c=r.sparse.indices.byteOffset||0,l=r.sparse.values.byteOffset||0,u=new s(e[1],c,r.sparse.count*t),h=new a(e[2],l,r.sparse.count*o);null!==i&&(m=new n.BufferAttribute(m.array.slice(),m.itemSize,m.normalized));for(let e=0,t=u.length;e<t;e++){const t=u[e];if(m.setX(t,h[e*o]),o>=2&&m.setY(t,h[e*o+1]),o>=3&&m.setZ(t,h[e*o+2]),o>=4&&m.setW(t,h[e*o+3]),o>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return m}))}loadTexture(e){const t=this.json,s=this.options,n=t.textures[e].source,r=t.images[n];let i=this.textureLoader;if(r.uri){const e=s.manager.getHandler(r.uri);null!==e&&(i=e)}return this.loadTextureImage(e,n,i)}loadTextureImage(e,t,s){const r=this,i=this.json,o=i.textures[e],a=i.images[t],c=(a.uri||a.bufferView)+":"+o.sampler;if(this.textureCache[c])return this.textureCache[c];const l=this.loadImageSource(t,s).then((function(t){t.flipY=!1,t.name=o.name||a.name||"";const s=(i.samplers||{})[o.sampler]||{};return t.magFilter=F[s.magFilter]||n.LinearFilter,t.minFilter=F[s.minFilter]||n.LinearMipmapLinearFilter,t.wrapS=H[s.wrapS]||n.RepeatWrapping,t.wrapT=H[s.wrapT]||n.RepeatWrapping,r.associations.set(t,{textures:e}),t})).catch((function(){return null}));return this.textureCache[c]=l,l}loadImageSource(e,t){const s=this,r=this.json,i=this.options;if(void 0!==this.sourceCache[e])return this.sourceCache[e].then((e=>e.clone()));const o=r.images[e],a=self.URL||self.webkitURL;let c=o.uri||"",l=!1;if(void 0!==o.bufferView)c=s.getDependency("bufferView",o.bufferView).then((function(e){l=!0;const t=new Blob([e],{type:o.mimeType});return c=a.createObjectURL(t),c}));else if(void 0===o.uri)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const u=Promise.resolve(c).then((function(e){return new Promise((function(s,r){let o=s;!0===t.isImageBitmapLoader&&(o=function(e){const t=new n.Texture(e);t.needsUpdate=!0,s(t)}),t.load(n.LoaderUtils.resolveURL(e,i.path),o,void 0,r)}))})).then((function(e){var t;return!0===l&&a.revokeObjectURL(c),e.userData.mimeType=o.mimeType||((t=o.uri).search(/\.jpe?g($|\?)/i)>0||0===t.search(/^data\:image\/jpeg/)?"image/jpeg":t.search(/\.webp($|\?)/i)>0||0===t.search(/^data\:image\/webp/)?"image/webp":"image/png"),e})).catch((function(e){throw console.error("THREE.GLTFLoader: Couldn't load texture",c),e}));return this.sourceCache[e]=u,u}assignTexture(e,t,s,n){const r=this;return this.getDependency("texture",s.index).then((function(i){if(void 0===s.texCoord||0==s.texCoord||"aoMap"===t&&1==s.texCoord||console.warn("THREE.GLTFLoader: Custom UV set "+s.texCoord+" for texture "+t+" not yet supported."),r.extensions[o.KHR_TEXTURE_TRANSFORM]){const e=void 0!==s.extensions?s.extensions[o.KHR_TEXTURE_TRANSFORM]:void 0;if(e){const t=r.associations.get(i);i=r.extensions[o.KHR_TEXTURE_TRANSFORM].extendTexture(i,e),r.associations.set(i,t)}}return void 0!==n&&(i.encoding=n),e[t]=i,i}))}assignFinalMaterial(e){const t=e.geometry;let s=e.material;const r=void 0===t.attributes.tangent,i=void 0!==t.attributes.color,o=void 0===t.attributes.normal;if(e.isPoints){const e="PointsMaterial:"+s.uuid;let t=this.cache.get(e);t||(t=new n.PointsMaterial,n.Material.prototype.copy.call(t,s),t.color.copy(s.color),t.map=s.map,t.sizeAttenuation=!1,this.cache.add(e,t)),s=t}else if(e.isLine){const e="LineBasicMaterial:"+s.uuid;let t=this.cache.get(e);t||(t=new n.LineBasicMaterial,n.Material.prototype.copy.call(t,s),t.color.copy(s.color),this.cache.add(e,t)),s=t}if(r||i||o){let e="ClonedMaterial:"+s.uuid+":";s.isGLTFSpecularGlossinessMaterial&&(e+="specular-glossiness:"),r&&(e+="derivative-tangents:"),i&&(e+="vertex-colors:"),o&&(e+="flat-shading:");let t=this.cache.get(e);t||(t=s.clone(),i&&(t.vertexColors=!0),o&&(t.flatShading=!0),r&&(t.normalScale&&(t.normalScale.y*=-1),t.clearcoatNormalScale&&(t.clearcoatNormalScale.y*=-1)),this.cache.add(e,t),this.associations.set(t,this.associations.get(s))),s=t}s.aoMap&&void 0===t.attributes.uv2&&void 0!==t.attributes.uv&&t.setAttribute("uv2",t.attributes.uv),e.material=s}getMaterialType(){return n.MeshStandardMaterial}loadMaterial(e){const t=this,s=this.json,r=this.extensions,i=s.materials[e];let a;const c={},l=i.extensions||{},u=[];if(l[o.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]){const e=r[o.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS];a=e.getMaterialType(),u.push(e.extendParams(c,i,t))}else if(l[o.KHR_MATERIALS_UNLIT]){const e=r[o.KHR_MATERIALS_UNLIT];a=e.getMaterialType(),u.push(e.extendParams(c,i,t))}else{const s=i.pbrMetallicRoughness||{};if(c.color=new n.Color(1,1,1),c.opacity=1,Array.isArray(s.baseColorFactor)){const e=s.baseColorFactor;c.color.fromArray(e),c.opacity=e[3]}void 0!==s.baseColorTexture&&u.push(t.assignTexture(c,"map",s.baseColorTexture,n.sRGBEncoding)),c.metalness=void 0!==s.metallicFactor?s.metallicFactor:1,c.roughness=void 0!==s.roughnessFactor?s.roughnessFactor:1,void 0!==s.metallicRoughnessTexture&&(u.push(t.assignTexture(c,"metalnessMap",s.metallicRoughnessTexture)),u.push(t.assignTexture(c,"roughnessMap",s.metallicRoughnessTexture))),a=this._invokeOne((function(t){return t.getMaterialType&&t.getMaterialType(e)})),u.push(Promise.all(this._invokeAll((function(t){return t.extendMaterialParams&&t.extendMaterialParams(e,c)}))))}!0===i.doubleSided&&(c.side=n.DoubleSide);const h=i.alphaMode||B;if(h===j?(c.transparent=!0,c.depthWrite=!1):(c.transparent=!1,h===K&&(c.alphaTest=void 0!==i.alphaCutoff?i.alphaCutoff:.5)),void 0!==i.normalTexture&&a!==n.MeshBasicMaterial&&(u.push(t.assignTexture(c,"normalMap",i.normalTexture)),c.normalScale=new n.Vector2(1,1),void 0!==i.normalTexture.scale)){const e=i.normalTexture.scale;c.normalScale.set(e,e)}return void 0!==i.occlusionTexture&&a!==n.MeshBasicMaterial&&(u.push(t.assignTexture(c,"aoMap",i.occlusionTexture)),void 0!==i.occlusionTexture.strength&&(c.aoMapIntensity=i.occlusionTexture.strength)),void 0!==i.emissiveFactor&&a!==n.MeshBasicMaterial&&(c.emissive=(new n.Color).fromArray(i.emissiveFactor)),void 0!==i.emissiveTexture&&a!==n.MeshBasicMaterial&&u.push(t.assignTexture(c,"emissiveMap",i.emissiveTexture,n.sRGBEncoding)),Promise.all(u).then((function(){let s;return s=a===y?r[o.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(c):new a(c),i.name&&(s.name=i.name),X(s,i),t.associations.set(s,{materials:e}),i.extensions&&V(r,s,i),s}))}createUniqueName(e){const t=n.PropertyBinding.sanitizeNodeName(e||"");let s=t;for(let e=1;this.nodeNamesUsed[s];++e)s=t+"_"+e;return this.nodeNamesUsed[s]=!0,s}loadGeometries(e){const t=this,s=this.extensions,r=this.primitiveCache;function i(e){return s[o.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(e,t).then((function(s){return Z(s,e,t)}))}const a=[];for(let s=0,c=e.length;s<c;s++){const c=e[s],l=z(c),u=r[l];if(u)a.push(u.promise);else{let e;e=c.extensions&&c.extensions[o.KHR_DRACO_MESH_COMPRESSION]?i(c):Z(new n.BufferGeometry,c,t),r[l]={primitive:c,promise:e},a.push(e)}}return Promise.all(a)}loadMesh(e){const t=this,s=this.json,r=this.extensions,i=s.meshes[e],o=i.primitives,a=[];for(let e=0,t=o.length;e<t;e++){const t=void 0===o[e].material?(void 0===(c=this.cache).DefaultMaterial&&(c.DefaultMaterial=new n.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:n.FrontSide})),c.DefaultMaterial):this.getDependency("material",o[e].material);a.push(t)}var c;return a.push(t.loadGeometries(o)),Promise.all(a).then((function(s){const a=s.slice(0,s.length-1),c=s[s.length-1],l=[];for(let s=0,u=c.length;s<u;s++){const u=c[s],h=o[s];let d;const p=a[s];if(h.mode===C.TRIANGLES||h.mode===C.TRIANGLE_STRIP||h.mode===C.TRIANGLE_FAN||void 0===h.mode)d=!0===i.isSkinnedMesh?new n.SkinnedMesh(u,p):new n.Mesh(u,p),!0!==d.isSkinnedMesh||d.geometry.attributes.skinWeight.normalized||d.normalizeSkinWeights(),h.mode===C.TRIANGLE_STRIP?d.geometry=$(d.geometry,n.TriangleStripDrawMode):h.mode===C.TRIANGLE_FAN&&(d.geometry=$(d.geometry,n.TriangleFanDrawMode));else if(h.mode===C.LINES)d=new n.LineSegments(u,p);else if(h.mode===C.LINE_STRIP)d=new n.Line(u,p);else if(h.mode===C.LINE_LOOP)d=new n.LineLoop(u,p);else{if(h.mode!==C.POINTS)throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+h.mode);d=new n.Points(u,p)}Object.keys(d.geometry.morphAttributes).length>0&&q(d,i),d.name=t.createUniqueName(i.name||"mesh_"+e),X(d,i),h.extensions&&V(r,d,h),t.assignFinalMaterial(d),l.push(d)}for(let s=0,n=l.length;s<n;s++)t.associations.set(l[s],{meshes:e,primitives:s});if(1===l.length)return l[0];const u=new n.Group;t.associations.set(u,{meshes:e});for(let e=0,t=l.length;e<t;e++)u.add(l[e]);return u}))}loadCamera(e){let t;const s=this.json.cameras[e],r=s[s.type];if(r)return"perspective"===s.type?t=new n.PerspectiveCamera(n.MathUtils.radToDeg(r.yfov),r.aspectRatio||1,r.znear||1,r.zfar||2e6):"orthographic"===s.type&&(t=new n.OrthographicCamera(-r.xmag,r.xmag,r.ymag,-r.ymag,r.znear,r.zfar)),s.name&&(t.name=this.createUniqueName(s.name)),X(t,s),Promise.resolve(t);console.warn("THREE.GLTFLoader: Missing camera parameters.")}loadSkin(e){const t=this.json.skins[e],s={joints:t.joints};return void 0===t.inverseBindMatrices?Promise.resolve(s):this.getDependency("accessor",t.inverseBindMatrices).then((function(e){return s.inverseBindMatrices=e,s}))}loadAnimation(e){const t=this.json.animations[e],s=[],r=[],i=[],o=[],a=[];for(let e=0,n=t.channels.length;e<n;e++){const n=t.channels[e],c=t.samplers[n.sampler],l=n.target,u=l.node,h=void 0!==t.parameters?t.parameters[c.input]:c.input,d=void 0!==t.parameters?t.parameters[c.output]:c.output;s.push(this.getDependency("node",u)),r.push(this.getDependency("accessor",h)),i.push(this.getDependency("accessor",d)),o.push(c),a.push(l)}return Promise.all([Promise.all(s),Promise.all(r),Promise.all(i),Promise.all(o),Promise.all(a)]).then((function(s){const r=s[0],i=s[1],o=s[2],a=s[3],c=s[4],l=[];for(let e=0,t=r.length;e<t;e++){const t=r[e],s=i[e],u=o[e],h=a[e],d=c[e];if(void 0===t)continue;let p;switch(t.updateMatrix(),G[d.path]){case G.weights:p=n.NumberKeyframeTrack;break;case G.rotation:p=n.QuaternionKeyframeTrack;break;case G.position:case G.scale:default:p=n.VectorKeyframeTrack}const m=t.name?t.name:t.uuid,f=void 0!==h.interpolation?D[h.interpolation]:n.InterpolateLinear,g=[];G[d.path]===G.weights?t.traverse((function(e){e.morphTargetInfluences&&g.push(e.name?e.name:e.uuid)})):g.push(m);let T=u.array;if(u.normalized){const e=Q(T.constructor),t=new Float32Array(T.length);for(let s=0,n=T.length;s<n;s++)t[s]=T[s]*e;T=t}for(let e=0,t=g.length;e<t;e++){const t=new p(g[e]+"."+G[d.path],s.array,T,f);"CUBICSPLINE"===h.interpolation&&(t.createInterpolant=function(e){return new(this instanceof n.QuaternionKeyframeTrack?P:b)(this.times,this.values,this.getValueSize()/3,e)},t.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),l.push(t)}}const u=t.name?t.name:"animation_"+e;return new n.AnimationClip(u,void 0,l)}))}createNodeMesh(e){const t=this.json,s=this,n=t.nodes[e];return void 0===n.mesh?null:s.getDependency("mesh",n.mesh).then((function(e){const t=s._getNodeRef(s.meshCache,n.mesh,e);return void 0!==n.weights&&t.traverse((function(e){if(e.isMesh)for(let t=0,s=n.weights.length;t<s;t++)e.morphTargetInfluences[t]=n.weights[t]})),t}))}loadNode(e){const t=this.json,s=this.extensions,r=this,i=t.nodes[e],o=i.name?r.createUniqueName(i.name):"";return function(){const t=[],s=r._invokeOne((function(t){return t.createNodeMesh&&t.createNodeMesh(e)}));return s&&t.push(s),void 0!==i.camera&&t.push(r.getDependency("camera",i.camera).then((function(e){return r._getNodeRef(r.cameraCache,i.camera,e)}))),r._invokeAll((function(t){return t.createNodeAttachment&&t.createNodeAttachment(e)})).forEach((function(e){t.push(e)})),Promise.all(t)}().then((function(t){let a;if(a=!0===i.isBone?new n.Bone:t.length>1?new n.Group:1===t.length?t[0]:new n.Object3D,a!==t[0])for(let e=0,s=t.length;e<s;e++)a.add(t[e]);if(i.name&&(a.userData.name=i.name,a.name=o),X(a,i),i.extensions&&V(s,a,i),void 0!==i.matrix){const e=new n.Matrix4;e.fromArray(i.matrix),a.applyMatrix4(e)}else void 0!==i.translation&&a.position.fromArray(i.translation),void 0!==i.rotation&&a.quaternion.fromArray(i.rotation),void 0!==i.scale&&a.scale.fromArray(i.scale);return r.associations.has(a)||r.associations.set(a,{}),r.associations.get(a).nodes=e,a}))}loadScene(e){const t=this.json,s=this.extensions,r=this.json.scenes[e],i=this,o=new n.Group;r.name&&(o.name=i.createUniqueName(r.name)),X(o,r),r.extensions&&V(s,o,r);const a=r.nodes||[],c=[];for(let e=0,s=a.length;e<s;e++)c.push(J(a[e],o,t,i));return Promise.all(c).then((function(){return i.associations=(e=>{const t=new Map;for(const[e,s]of i.associations)(e instanceof n.Material||e instanceof n.Texture)&&t.set(e,s);return e.traverse((e=>{const s=i.associations.get(e);null!=s&&t.set(e,s)})),t})(o),o}))}}function J(e,t,s,r){const i=s.nodes[e];return r.getDependency("node",e).then((function(e){if(void 0===i.skin)return e;let t;return r.getDependency("skin",i.skin).then((function(e){t=e;const s=[];for(let e=0,n=t.joints.length;e<n;e++)s.push(r.getDependency("node",t.joints[e]));return Promise.all(s)})).then((function(s){return e.traverse((function(e){if(!e.isMesh)return;const r=[],i=[];for(let e=0,o=s.length;e<o;e++){const o=s[e];if(o){r.push(o);const s=new n.Matrix4;void 0!==t.inverseBindMatrices&&s.fromArray(t.inverseBindMatrices.array,16*e),i.push(s)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',t.joints[e])}e.bind(new n.Skeleton(r,i),e.matrixWorld)})),e}))})).then((function(e){t.add(e);const n=[];if(i.children){const t=i.children;for(let i=0,o=t.length;i<o;i++){const o=t[i];n.push(J(o,e,s,r))}}return Promise.all(n)}))}function Z(e,t,s){const r=t.attributes,i=[];function o(t,n){return s.getDependency("accessor",t).then((function(t){e.setAttribute(n,t)}))}for(const t in r){const s=k[t]||t.toLowerCase();s in e.attributes||i.push(o(r[t],s))}if(void 0!==t.indices&&!e.index){const n=s.getDependency("accessor",t.indices).then((function(t){e.setIndex(t)}));i.push(n)}return X(e,t),function(e,t,s){const r=t.attributes,i=new n.Box3;if(void 0===r.POSITION)return;{const e=s.json.accessors[r.POSITION],t=e.min,o=e.max;if(void 0===t||void 0===o)return void console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");if(i.set(new n.Vector3(t[0],t[1],t[2]),new n.Vector3(o[0],o[1],o[2])),e.normalized){const t=Q(O[e.componentType]);i.min.multiplyScalar(t),i.max.multiplyScalar(t)}}const o=t.targets;if(void 0!==o){const e=new n.Vector3,t=new n.Vector3;for(let n=0,r=o.length;n<r;n++){const r=o[n];if(void 0!==r.POSITION){const n=s.json.accessors[r.POSITION],i=n.min,o=n.max;if(void 0!==i&&void 0!==o){if(t.setX(Math.max(Math.abs(i[0]),Math.abs(o[0]))),t.setY(Math.max(Math.abs(i[1]),Math.abs(o[1]))),t.setZ(Math.max(Math.abs(i[2]),Math.abs(o[2]))),n.normalized){const e=Q(O[n.componentType]);t.multiplyScalar(e)}e.max(t)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}i.expandByVector(e)}e.boundingBox=i;const a=new n.Sphere;i.getCenter(a.center),a.radius=i.min.distanceTo(i.max)/2,e.boundingSphere=a}(e,t,s),Promise.all(i).then((function(){return void 0!==t.targets?function(e,t,s){let n=!1,r=!1,i=!1;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(void 0!==s.POSITION&&(n=!0),void 0!==s.NORMAL&&(r=!0),void 0!==s.COLOR_0&&(i=!0),n&&r&&i)break}if(!n&&!r&&!i)return Promise.resolve(e);const o=[],a=[],c=[];for(let l=0,u=t.length;l<u;l++){const u=t[l];if(n){const t=void 0!==u.POSITION?s.getDependency("accessor",u.POSITION):e.attributes.position;o.push(t)}if(r){const t=void 0!==u.NORMAL?s.getDependency("accessor",u.NORMAL):e.attributes.normal;a.push(t)}if(i){const t=void 0!==u.COLOR_0?s.getDependency("accessor",u.COLOR_0):e.attributes.color;c.push(t)}}return Promise.all([Promise.all(o),Promise.all(a),Promise.all(c)]).then((function(t){const s=t[0],o=t[1],a=t[2];return n&&(e.morphAttributes.position=s),r&&(e.morphAttributes.normal=o),i&&(e.morphAttributes.color=a),e.morphTargetsRelative=!0,e}))}(e,t.targets,s):e}))}function $(e,t){let s=e.getIndex();if(null===s){const t=[],n=e.getAttribute("position");if(void 0===n)return console.error("THREE.GLTFLoader.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),e;for(let e=0;e<n.count;e++)t.push(e);e.setIndex(t),s=e.getIndex()}const r=s.count-2,i=[];if(t===n.TriangleFanDrawMode)for(let e=1;e<=r;e++)i.push(s.getX(0)),i.push(s.getX(e)),i.push(s.getX(e+1));else for(let e=0;e<r;e++)e%2==0?(i.push(s.getX(e)),i.push(s.getX(e+1)),i.push(s.getX(e+2))):(i.push(s.getX(e+2)),i.push(s.getX(e+1)),i.push(s.getX(e)));i.length/3!==r&&console.error("THREE.GLTFLoader.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const o=e.clone();return o.setIndex(i),o}}}]);
@@ -0,0 +1,20 @@
1
+ /*!
2
+ * Matterport Showcase SDK
3
+ *
4
+ * © 2022 Matterport, Inc. All rights reserved.
5
+ *
6
+ * Matterport Showcase SDK ("Showcase SDK") must be used according to
7
+ * the Matterport Terms of Service located at https://matterport.com/terms-of-use, the Platform Subscription Agreement ("PSA") available at https://matterport.com/legal/platform-subscription-agreement and the SDK License terms included in the PSA ("SDK License"). Any use of the Showcase SDK requires a current active Matterport account and associated developer key.
8
+ *
9
+ * -------------------------------------------------------------------------------
10
+ *
11
+ * Redistribution and use in source and binary forms, without modification, is permitted in accordance with the SDK License provided that the following conditions are met:
12
+ *
13
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
14
+ * * Neither the name of Matterport nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
15
+ *
16
+ * THE SHOWCASE SDK IS PROVIDED BY MATTERPORT AS THE COPYRIGHT HOLDER AND, IF APPLICABLE, ITS CONTRIBUTORS "AS IS" AND WITHOUT WARRANTIES OF ANY KIND. TO THE FULLEST EXTENT PERMISSIBLE PURSUANT TO APPLICABLE LAW, MATTERPORT DISCLAIMS, ON BEHALF OF ITSELF AND ITS AFFILIATES AND LICENSORS, ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. MATTERPORT DOES NOT WARRANT THAT THE AVAILABILITY OF THE SHOWCASE SDK WILL BE UNINTERRUPTED OR ERROR-FREE, THAT DEFECTS WILL BE CORRECTED, OR THAT THE SHOWCASE SDK WILL BE FREE OF VIRUSES OR OTHER HARMFUL COMPONENTS. MATTERPORT DOES NOT MAKE ANY REPRESENTATIONS OR WARRANTIES REGARDING THE USE OR THE RESULTS OF THE USE OF THE SHOWCASE SDK OR FUNCTIONS ON THE SHOWCASE SDK IN TERMS OF THEIR CORRECTNESS, ACCURACY, RELIABILITY, RESULTS TO BE ACHIEVED, OR OTHERWISE. APPLICABLE LAW MAY NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SOME OR ALL OF THE FOREGOING DISCLAIMERS MAY NOT APPLY TO YOU.
17
+ *
18
+ * TO THE EXTENT PERMITTED UNDER APPLICABLE LAW UNDER NO CIRCUMSTANCES, INCLUDING, BUT NOT LIMITED TO, NEGLIGENCE, SHALL MATTERPORT OR ITS AFFILIATES OR LICENSORS BE LIABLE FOR ANY CONSEQUENTIAL, EXEMPLARY, PUNITIVE, SPECIAL, INCIDENTAL OR OTHER INDIRECT DAMAGES, EVEN IF MATTERPORT OR A MATTERPORT AUTHORIZED REPRESENTATIVE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. APPLICABLE LAW MAY NOT ALLOW SOME OR ALL OF THIS LIMITATION OF LIABILITY, SO IT MAY NOT APPLY TO YOU.
19
+ *
20
+ */
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 313.js.LICENSE.txt */
2
+ (self.webpackChunkmp_webgl=self.webpackChunkmp_webgl||[]).push([[313],{14766:(t,e,i)=>{"use strict";i.d(e,{m:()=>a});var s=i(88977),n=i(7689);const o={0:s.Z.GL_TEXTURE_CUBE_MAP_POSITIVE_Y,1:s.Z.GL_TEXTURE_CUBE_MAP_POSITIVE_Z,2:s.Z.GL_TEXTURE_CUBE_MAP_POSITIVE_X,3:s.Z.GL_TEXTURE_CUBE_MAP_NEGATIVE_Z,4:s.Z.GL_TEXTURE_CUBE_MAP_NEGATIVE_X,5:s.Z.GL_TEXTURE_CUBE_MAP_NEGATIVE_Y},a=t=>{if(t<0||t>5)throw new n.Z("mapFaceToCubemapFace() -> face must be in the range [0, 5]");return o[t]}},48786:(t,e,i)=>{"use strict";i.d(e,{c:()=>f});var s=i(81396),n=i(54702);class o extends s.Mesh{constructor(t,e){super(),this.type="Line",this.part=n.B.line,this.computeLineDistances=(()=>{const t=new s.Vector3,e=new s.Vector3;return()=>{const i=this.geometry,n=i.attributes.instanceStart,o=i.attributes.instanceEnd,a=new Float32Array(2*n.data.count);for(let i=0,s=0,r=n.data.count;i<r;i++,s+=2)t.fromBufferAttribute(n,i),e.fromBufferAttribute(o,i),a[s]=0===s?0:a[s-1],a[s+1]=a[s]+t.distanceTo(e);return this.instanceDistanceBuffer?(this.instanceDistanceBuffer.set(a,0),this.instanceDistanceBuffer.needsUpdate=!0):(this.instanceDistanceBuffer=new s.InstancedInterleavedBuffer(a,2,1),i.setAttribute("instanceDistanceStart",new s.InterleavedBufferAttribute(this.instanceDistanceBuffer,1,0,!1)),i.setAttribute("instanceDistanceEnd",new s.InterleavedBufferAttribute(this.instanceDistanceBuffer,1,1,!1))),this}})(),this.geometry=t,this.material=e}copy(t){throw Error("not implemented")}}class a extends s.InstancedBufferGeometry{constructor(){super(),this.type="LineSegmentsGeometry";this.setIndex([0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5]),this.setAttribute("position",new s.Float32BufferAttribute([-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],3)),this.setAttribute("uv",new s.Float32BufferAttribute([0,1,.5,1,0,.5,.5,.5,0,0,.5,0,0,1,.5,1],2))}applyMatrix(t){const e=this.attributes.instanceStart,i=this.attributes.instanceEnd;return void 0!==e&&(e.applyMatrix4(t),i.applyMatrix4(t),this.positionBuffer.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}setPositions(t){let e;return t instanceof Float32Array?e=t:Array.isArray(t)&&(e=new Float32Array(t)),e&&(this.positionBuffer?(this.positionBuffer.set(e,0),this.positionBuffer.needsUpdate=!0):(this.positionBuffer=new s.InstancedInterleavedBuffer(e,6,1),this.setAttribute("instanceStart",new s.InterleavedBufferAttribute(this.positionBuffer,3,0,!1)),this.setAttribute("instanceEnd",new s.InterleavedBufferAttribute(this.positionBuffer,3,3,!1))),this.computeBoundingBox(),this.computeBoundingSphere()),this}setColors(t){let e;return t instanceof Float32Array?e=t:Array.isArray(t)&&(e=new Float32Array(t)),e&&(this.colorBuffer?(this.colorBuffer.set(e,0),this.colorBuffer.needsUpdate=!0):(this.colorBuffer=new s.InstancedInterleavedBuffer(e,6,1),this.setAttribute("instanceColorStart",new s.InterleavedBufferAttribute(this.colorBuffer,3,0,!1)),this.setAttribute("instanceColorEnd",new s.InterleavedBufferAttribute(this.colorBuffer,3,3,!1)))),this}fromWireframeGeometry(t){return this.setPositions(t.attributes.position.array),this}fromEdgesGeometry(t){return this.setPositions(t.attributes.position.array),this}fromMesh(t){return this.fromWireframeGeometry(new s.WireframeGeometry(t.geometry)),this}fromLineSegements(t){const e=t.geometry;return e instanceof s.BufferGeometry&&this.setPositions(e.position.array),this}computeBoundingBox(){this.boundingBox||(this.boundingBox=new s.Box3),this.box||(this.box=new s.Box3);const t=this.attributes.instanceStart,e=this.attributes.instanceEnd;void 0!==t&&void 0!==e&&(this.boundingBox.setFromBufferAttribute(t),this.box.setFromBufferAttribute(e),this.boundingBox.union(this.box))}computeBoundingSphere(){this.tempVector||(this.tempVector=new s.Vector3),this.boundingSphere||(this.boundingSphere=new s.Sphere),this.boundingBox||this.computeBoundingBox();const t=this.attributes.instanceStart,e=this.attributes.instanceEnd;if(void 0!==t&&void 0!==e){const i=this.boundingSphere.center;this.boundingBox.getCenter(i);let s=0;for(let n=0,o=t.count;n<o;n++)this.tempVector.fromBufferAttribute(t,n),s=Math.max(s,i.distanceToSquared(this.tempVector)),this.tempVector.fromBufferAttribute(e,n),s=Math.max(s,i.distanceToSquared(this.tempVector));this.boundingSphere.radius=Math.sqrt(s),isNaN(this.boundingSphere.radius)&&console.error("computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.",this)}}}class r extends a{constructor(){super(),this.type="LineGeometry",this.isLineGeometry=!0}setPositions(t){const e=t.length-3,i=new Float32Array(2*e);for(let s=0;s<e;s+=3)i[2*s]=t[s],i[2*s+1]=t[s+1],i[2*s+2]=t[s+2],i[2*s+3]=t[s+3],i[2*s+4]=t[s+4],i[2*s+5]=t[s+5];return a.prototype.setPositions.call(this,i),this}setColors(t){const e=t.length-3,i=new Float32Array(2*e);for(let s=0;s<e;s+=3)i[2*s]=t[s],i[2*s+1]=t[s+1],i[2*s+2]=t[s+2],i[2*s+3]=t[s+3],i[2*s+4]=t[s+4],i[2*s+5]=t[s+5];return a.prototype.setColors.call(this,i),this}fromLine(t){throw new Error("LineGeometry.fromLine not converted to TS yet")}copy(t){return this}}var h=i(67944),c=i(66990);class l extends s.Mesh{constructor(t,e,i=c.V9.endpointSelected,s=c.V9.endpointDefault){super(t,e),this.selectedSize=i,this.defaultSize=s,this.currentSize=c.V9.endpointDefault,this.currentSize=this.defaultSize,this.scale.set(c.Ey,c.Ey,c.Ey)}dispose(){this.material.dispose(),this.geometry.dispose()}billboardScale(t,e,i){const s=(0,h.mY)(e,t,this.position,i,.5),n=Math.max(Math.min(1/s*this.currentSize,c.g4),c.Ey);this.scale.set(n,n,n)}updateSelected(t){this.currentSize=t?this.selectedSize:this.defaultSize}}var d=i(12529),u=i(56512);class f{constructor(t,e,i,a,c){this.lineMaterial=i,this.options=a,this.endpointMaterial=c,this.startPosition=new s.Vector3,this.endPosition=new s.Vector3,this.endpoints=!1,this.isVisible=!0,this.meshToLinePartMap={},this.opacity=t=>(this.endpointMaterial&&this.endpointMaterial.setOpacity(t),this.lineMesh.material.setOpacity(t),this),this.updatePositions=(t,e)=>(this.startPosition.copy(t),this.endPosition.copy(e),this.options.beforeUpdatePositions&&(t=this.options.beforeUpdatePositions(t),e=this.options.beforeUpdatePositions(e)),this.lineMesh.geometry.setPositions([t.x,t.y,t.z,e.x,e.y,e.z]),this.endpoints&&(this.endMesh.position.copy(e),this.startMesh.position.copy(t),this.lastBillboardOptions&&this.updateBillboard(this.lastBillboardOptions)),this.lineMesh.material.dashed&&this.lineMesh.computeLineDistances(),this),this.updateBillboard=t=>{if(this.endpoints&&(t.rotation&&(this.endMesh.quaternion.copy(t.rotation),this.startMesh.quaternion.copy(t.rotation)),t.position&&t.projection&&!(0,h.s1)(t.projection))){const e=this.lineMesh.material.resolution.y;this.endMesh.billboardScale(t.position,t.projection,e),this.startMesh.billboardScale(t.position,t.projection,e)}return this.lastBillboardOptions=t,this},this.updateSelected=t=>(this.lineMesh.material.updateSelected(t),this.endpoints&&(this.endMesh.material.updateHovered(t),this.endMesh.updateSelected(t),this.startMesh.updateSelected(t)),this),this.setRenderLayer=t=>{this.children.forEach((e=>e.layers.mask=t.mask))},this.setRenderOrder=t=>{this.children.forEach((e=>e.renderOrder=t))},this.updateResolution=(t,e)=>(this.lineMesh.material.resolution.set(t,e),this),this.hide=()=>{this.options.onHide&&this.options.onHide(),this.isVisible=!1},this.show=()=>{this.options.onShow&&this.options.onShow(),this.isVisible=!0},this.toggle=t=>(t?this.show():this.hide(),this),this.dispose=()=>{this.options.onHide&&this.options.onHide(),this.lineMesh.geometry.dispose(),this.lineMesh.material.dispose(),this.endMesh&&this.endMesh.dispose(),this.startMesh&&this.startMesh.dispose(),this.meshToLinePartMap={}},this.overrideLineMaterial=t=>{this.lineMesh.material=t},this.restoreLineMaterial=()=>{this.lineMesh.material=this.lineMaterial},this.startPosition.copy(t),this.endPosition.copy(e),this.lineMesh=new o(new r,i),this.lineMesh.matrixAutoUpdate=!1,this.lineMesh.part=n.B.line,this.lineMesh.renderOrder=d.z.lines,this.meshToLinePartMap[n.B.line]=this.lineMesh,c&&(this.endpoints=!0,this.endMesh=new l((0,u.fc)(),c),this.endMesh.part=n.B.end,this.endMesh.renderOrder=d.z.endpoints,this.meshToLinePartMap[n.B.end]=this.endMesh,this.startMesh=new l((0,u.fc)(),c),this.startMesh.part=n.B.start,this.startMesh.renderOrder=d.z.endpoints,this.meshToLinePartMap[n.B.start]=this.startMesh),this.updatePositions(this.startPosition,this.endPosition),this.updateSelected(!1)}get currentOpacity(){return this.lineMesh.material.getOpacity()}getMesh(t){return this.meshToLinePartMap[t]}get children(){return Object.keys(this.meshToLinePartMap).map((t=>this.meshToLinePartMap[t]))}get visible(){return this.isVisible}}},54702:(t,e,i)=>{"use strict";var s;i.d(e,{B:()=>s}),function(t){t.line="line",t.start="start",t.end="end"}(s||(s={}))},85255:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>P,makeEndpointMaterial:()=>_,makeLineMaterial:()=>U});var s=i(97542),n=i(69170),o=i(81396),a=i(48786),r=i(87926);var h;!function(t){t[t.LINE_DEFAULT=0]="LINE_DEFAULT",t[t.LINE_HOVER=1]="LINE_HOVER",t[t.END_DEFAULT=2]="END_DEFAULT",t[t.END_HOVER=3]="END_HOVER"}(h||(h={}));class c{constructor(){const t=(0,r.p)("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgBAMAAACBVGfHAAAAJ1BMVEUAAAD///////////////////////////////////////////////+uPUo5AAAADHRSTlMA4ZNBI+fLwLSGYE5aqgIgAAAAlUlEQVQoz2MAAy91mYNFSxjgwEjmDBAcVIbxPWPOgMHRKRA+c88ZKDhhABbYdgYOssEKchACx0BKPM4ggRagwBxkgZNAHTHIAkcNGJjOoAAFBkdUARGGNagCpxh0UAUOMdSgChxnkEEVOMhwBg1gCGBowTAUw1oMh2E4HcNzGN5HDyCMIMQIZPRowIgozKjEjGyM5AAACSg5ooJJElsAAAAASUVORK5CYII="),e=(0,r.p)("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAPFBMVEUAAAD/AVL/AVL/AVL/AVL/AVL/AVL/AVL/AVL/AVL/AVL/AVL/////+fr/5er/0tv/ytX/iaH/dJL/cpA84uD/AAAAC3RSTlMA45NBI8vAtIZgTrS8MGcAAAC5SURBVDjLhVPtDoQgDBuICPKpvP+7Xs4t6LlL2j9GWtYCG91w0XqTkvE2OtJYrEkTxi4v2gWhpyS4n+1bUtgeRfY1/cG6z/3Ma8Ui/rP+6LWU2sd04RxBfs+WBe2UpXAZSP4jP3DIWb4m9ua1whI5w/XzC+xiHEWWtreg8XoUh5EVhnj469u1oF+EJ45QtaByCGKrogWFGSiAFjAkPCa8KHjV6LHgc6OGgS2Hmha2PR4cPHp4eOH4fwAGdiPh+RS0GAAAAABJRU5ErkJggg=="),i=(0,r.p)("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAIBAMAAABqq+CcAAAAD1BMVEUAAAD///////////////+PQt5oAAAABHRSTlMAy4AzqjrmZgAAABRJREFUCNdjAAMjERcXR2Uwc4AEAIn2CZHn9cAcAAAAAElFTkSuQmCC"),s=(0,r.p)("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAIBAMAAABqq+CcAAAAGFBMVEUAAAD/AVL/AVL/AVL/////AVL/r7//OWiicYg+AAAABHRSTlMAy4AzqjrmZgAAABlJREFUCNdjYGBgVgwtcwGC9FAhAyB3YAQAVg4X6a0jaXAAAAAASUVORK5CYII=");this.textures={[h.LINE_DEFAULT]:i,[h.LINE_HOVER]:s,[h.END_DEFAULT]:t,[h.END_HOVER]:e},i.minFilter=o.LinearFilter,s.minFilter=o.LinearFilter,t.minFilter=o.LinearFilter,e.minFilter=o.LinearFilter}get(t){return this.textures[t]}dispose(){for(const t in this.textures){const e=Number(t);this.get(e).dispose()}}}var l=i(11677),d=i(44724),u=i.n(d),f=i(7188),p=i.n(f),m=i(52059),g=i.n(m),A=i(75215),v=i.n(A),S=i(56449),x=i.n(S);const w={endpoint:{uniforms:{opacity:{type:"f",value:1},color:{type:"c",value:new o.Color},bg:{type:"t",value:null}},vertexShader:l.Z.basicTextured.vertexShader,fragmentShader:u()},line:{uniforms:o.UniformsUtils.merge([o.UniformsLib.common,o.UniformsLib.fog,{linewidth:{value:4},resolution:{value:new o.Vector2(0,0)},dashScale:{value:1},dashSize:{value:.025},gapSize:{value:.05},mask:{value:null}}]),vertexShader:p(),fragmentShader:g()},screenline:{uniforms:{lineWidth:{value:1},screenSize:{value:new o.Vector2(0,0)},dashed:{value:0},dashSize:{value:1},gapSize:{value:1},antialiasWidth:{value:1},color:{value:new o.Color(1,0,0)},start:{value:new o.Vector3},end:{value:new o.Vector3}},vertexShader:v(),fragmentShader:x()}};class M extends o.RawShaderMaterial{constructor(t,e,i){const s=o.UniformsUtils.clone(w.endpoint.uniforms);super({fragmentShader:w.endpoint.fragmentShader,vertexShader:w.endpoint.vertexShader,uniforms:s,name:"LineEndpointMaterial",transparent:!0,depthWrite:!1,depthTest:!0}),this.color=t,this.defaultTex=e,this.hoverTex=i,this.uniforms.bg.value=e,this.uniforms.color.value.copy(this.color)}clone(){return new M(this.color,this.defaultTex,this.hoverTex).copy(this)}setOpacity(t){this.uniforms&&t!==this.uniforms.opacity.value&&(this.uniforms.opacity.value=t)}getOpacity(){return this.uniforms.opacity.value}updateHovered(t){const e=t?this.hoverTex:this.defaultTex;this.uniforms.bg.value!==e&&(this.uniforms.bg.value=e)}}var y=i(66990);class E extends o.RawShaderMaterial{constructor(t,e,i,s=y.V9.lineSelected){super(),this.parameters=t,this.hoverTexture=e,this.defaultTexture=i,this.selectedWidth=s,this.type="LineMaterial",this.isLineMaterial=!0,this.defaultWidth=y.V9.lineDefault,this.setValues({uniforms:o.UniformsUtils.clone(w.line.uniforms),vertexShader:w.line.vertexShader,fragmentShader:w.line.fragmentShader,transparent:!0,depthWrite:!1,depthTest:!0,opacity:1}),this.setValues(t),i&&(this.mask=i),this.defaultWidth=t&&t.linewidth?t.linewidth:y.V9.lineDefault}updateSelected(t){const e=t?this.hoverTexture:this.defaultTexture;e&&this.mask!==e&&(this.mask=e,t?this.setLinewidth(this.selectedWidth):this.setLinewidth(this.defaultWidth))}setLinewidth(t){this.uniforms.linewidth||(this.uniforms=o.UniformsUtils.clone(w.line.uniforms)),this.getLinewidth()!==t&&(this.uniforms.linewidth.value=t)}getLinewidth(){return this.uniforms.linewidth.value}get color(){return this.uniforms.diffuse.value}set color(t){this.uniforms.diffuse.value=t}getOpacity(){return this.uniforms.opacity.value}setOpacity(t){this.uniforms||(this.uniforms=o.UniformsUtils.clone(w.line.uniforms)),this.getOpacity()!==t&&(this.uniforms.opacity.value=t)}get dashScale(){return this.uniforms.dashScale.value}set dashScale(t){this.uniforms.dashScale.value=t}set dashed(t){t?this.defines.USE_DASH="":delete this.defines.USE_DASH,this.needsUpdate=!0}get dashed(){return"USE_DASH"in this.defines}get dashSize(){return this.uniforms.dashSize.value}set dashSize(t){this.uniforms.dashSize.value=t}get gapSize(){return this.uniforms.gapSize.value}set gapSize(t){this.uniforms.gapSize.value=t}get resolution(){return this.uniforms.resolution.value}set resolution(t){this.uniforms.resolution.value=t}set mask(t){this.uniforms.mask.value!==t&&(t?this.defines.USE_MASK="":delete this.defines.USE_MASK,this.uniforms.mask.value=t,this.needsUpdate=!0)}get mask(){return this.uniforms.mask.value}copy(t){return o.RawShaderMaterial.prototype.copy.call(this,t),this.parameters=t.parameters,this.color.copy(t.color),this.defaultWidth=t.defaultWidth,this.setLinewidth(t.getLinewidth()),this.resolution.copy(t.resolution),this.defaultTexture=t.defaultTexture,this.hoverTexture=t.hoverTexture,this.mask=t.mask,this.setOpacity(t.getOpacity()),this.dashed=t.dashed,this.dashScale=t.dashScale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this}}var b=i(9037),T=i(29537),L=i(5332);let C=null;function B(){return C||(C=new c),C}class P extends s.Y{constructor(){super(...arguments),this.name="lines"}async init(t,e){const i=await e.getModuleBySymbol(n.y.WEBGL_RENDERER);this.scene=i.getScene(),this.canvas=await e.market.waitForData(L.W),this.cameraData=await e.market.waitForData(b.M),this.bindings.push(this.canvas.onChanged(this.onCanvasChange.bind(this))),this.cameraPosition=new o.Vector3,this.segments=[]}onUpdate(){this.cameraPosition.copy(this.cameraData.pose.position)}dispose(t){super.dispose(t),this.segments.forEach((t=>t.dispose()))}makeLine(t,e,i,s,n=(()=>!1)){const o=n()?y.iV.OFFSET_TOWARDS_CAMERA:0,r=n()?t=>this.cameraPosition.clone().sub(t).setLength(o).add(t):t=>t,h=new a.c(t,e,i,{beforeUpdatePositions:r,onShow:()=>h.children.forEach((t=>this.scene.addChild(T.a.Root,t))),onHide:()=>h.children.forEach((t=>this.scene.removeChild(T.a.Root,t)))},s);return h.updateResolution(this.canvas.width,this.canvas.height),h.opacity(1),h.show(),h.updatePositions(t,e),this.segments.push(h),h}makeLineMaterial(t,e,i={},s,n){return U(t,e,i,s,n)}makeEndpointMaterial(t,e,i){return _(t,e,i)}onCanvasChange(t){for(const e of this.segments)e.updateResolution(t.width,t.height)}}function _(t,e,i){const s=i||B().get(h.END_HOVER),n=e||B().get(h.END_DEFAULT);return new M(new o.Color(t),n,s)}function U(t,e,i={},s,n){const a=n||B().get(h.LINE_HOVER),r=s||B().get(h.LINE_DEFAULT),c=new o.Vector2(window.innerWidth,window.innerHeight);return e?new E(Object.assign({color:new o.Color(t),resolution:c},i),a,r):new E(Object.assign({color:new o.Color(t)},i))}},66990:(t,e,i)=>{"use strict";i.d(e,{Ey:()=>o,V9:()=>n,g4:()=>a,iV:()=>s});const s={FADE_DURATION:300,LABEL_HIDDEN_OPACITY:.15,DEPTH_WRITE_THRESHOD:.15,ALIGN_LABELS:!1,LABEL_SIZING:.14,LABEL_NDC_SCALEFACTOR:.5,LABEL_ASPECT_SCALEFACTOR:.035,OFFSET_TOWARDS_CAMERA:.25,HIDE_LABELS:!1},n={dottedLineDefault:2,lineDefault:6,lineSelected:6,endpointDefault:2.5,endpointSelected:3.75},o=.01,a=5},94046:(t,e,i)=>{"use strict";i.d(e,{i:()=>n});var s=i(81396);class n extends s.Mesh{}},81248:(t,e,i)=>{"use strict";i.d(e,{Bv:()=>u,Dv:()=>h,TE:()=>c,l0:()=>d,o7:()=>l});var s=i(81396);const n=-1,o=10,a=5,r=-5,h=(t,e=n)=>i=>t.distanceToSquared(i.position)*e,c=(t,e=n)=>i=>t.distanceTo(i.position)*e,l=(t,e,i=o)=>{const n=new s.Vector3;return s=>n.copy(s.position).sub(t).normalize().dot(e)*i},d=(t,e=n)=>i=>t.distanceToSquared(i.floorPosition)*e,u=(t,e=a,i=r)=>s=>t===s.floorId?e:i},77382:(t,e,i)=>{"use strict";var s;i.d(e,{Z:()=>n}),function(t){t[t.Center=0]="Center",t[t.UpperLeft=1]="UpperLeft",t[t.UpperRight=2]="UpperRight",t[t.LowerRight=3]="LowerRight",t[t.LowerLeft=4]="LowerLeft"}(s||(s={}));const n=s},27646:(t,e,i)=>{"use strict";i.d(e,{S:()=>c,Z:()=>l});var s=i(76609),n=i(71239),o=i(54730),a=i(55084),r=i(46950);const h=new(i(97998).Z)("panoqualitymanager");var c;!function(t){t[t.Untested=0]="Untested",t[t.Testing=1]="Testing",t[t.Success=2]="Success",t[t.Fail=3]="Fail"}(c||(c={}));class l{constructor(t,e,i,s,a){this.urls=t,this.maxCubemapSize=e,this.maxNavPanoSize=i,this.maxZoomPanoSize=s,this.overrideWindow=!1,this.navPanoSize=-1,this.zoomPanoSize=-1,this.resolution=a,this.highQualityThreshold=n.Xd.windowHeightHighQualityThresholdOverride||n.Xd.windowHeightHighQualityThreshold,this.persistentStorage=new o.a,this.downloadTestResults={},this.updateMaximums()}setResolution(t){this.resolution=t,this.updateMaximums()}overrideWindowMaximums(t){this.overrideWindow=t,this.updateMaximums()}updateNavPanoSize(t){this.maxNavPanoSize=t,this.updateMaximums()}getTestResults(t,e){const i=this.downloadTestResults[t];if(i){const t=i[e];if(t)return t}return c.Untested}ultraHighQualityModeEnabled(t){const e=s.Qf[this.getZoomPanoSize()],i=this.downloadTestResults[t];return!(!i||!i[e])&&i[e]===c.Success}updateMaximums(){this.resolution<this.highQualityThreshold&&!this.overrideWindow?(this.navPanoSize=Math.min(l.getPanoSize(s.SL.STANDARD),this.maxNavPanoSize),this.zoomPanoSize=Math.min(l.getPanoSize(s.SL.HIGH),this.maxZoomPanoSize)):(this.navPanoSize=this.maxNavPanoSize,this.zoomPanoSize=this.maxZoomPanoSize),this.zoomPanoSize<this.navPanoSize&&(this.navPanoSize=this.zoomPanoSize),this.zoomPanoSize=Math.min(this.maxCubemapSize,this.zoomPanoSize),this.navPanoSize=Math.min(this.maxCubemapSize,this.navPanoSize)}static getPanoSize(t){if(t in s.eE)return s.eE[t];throw new Error(`Not a panoSizeClass: ${t}`)}static getPanoSizeClass(t){if(t in s.Qf)return s.Qf[t];throw new Error(`Not a valid pano resolution: ${t}`)}getMaxPossiblePanoSize(){return l.getPanoSize(s.SL.ULTRAHIGH)}getNavPanoSize(){return this.navPanoSize}getZoomPanoSize(){return this.zoomPanoSize}availableResolution(t,e){const i=new r.Q;if(!e)return i.reject(0);if(t.resolutions)return t.resolutions.includes(e)?i.resolve(e):this.availableResolution(t,this.getLowerResolution(e));switch(this.getTestResults(t.id,e)){case c.Success:i.resolve(e);break;case c.Fail:return this.availableResolution(t,this.getLowerResolution(e));case c.Untested:this.testDownload(t,e,a.I_).then((s=>{s?i.resolve(e):this.availableResolution(t,this.getLowerResolution(e)).then((t=>i.resolve(t)))}));break;case c.Testing:h.warn("resolution is already testing, do we need to handle this?")}return i}getLowerResolution(t){switch(t){case s.SL.ULTRAHIGH:return s.SL.HIGH;case s.SL.HIGH:return s.SL.STANDARD;case s.SL.STANDARD:return s.SL.BASE}return null}testDownload(t,e,i){if(!this.urls)throw new Error("Can't call testDownload without signed urls");const s=l.getPanoSize(e),n=new r.Q,o=t.id;this.downloadTestResults[o]||(this.downloadTestResults[o]={});const a=this.downloadTestResults[o]&&this.downloadTestResults[o][e];if(a)a===c.Success?n.resolve(!0):a===c.Fail&&n.resolve(!1);else{this.downloadTestResults[o][e]=c.Testing;const a=t=>{this.downloadTestResults[o][e]=c.Success,n.resolve(!0)},r=()=>{this.downloadTestResults[o][e]=c.Fail,n.resolve(!1)};this.getTileUrl(t,s,i,0).then((t=>{this.urls.getImage(t).then(a,r)}))}return n}getTileUrl(t,e,i,s){const n=this.persistentStorage.get("getTileUrl:locationInfo",(()=>({face:-1,faceTileIndex:-1,tileX:-1,tileY:-1})));a.Tp(e,s,n);const o=Math.floor(e/i),r=o*o,h=Math.floor(s/r),c=l.getPanoSizeClass(e);return t.getTileUrl(c,h,n.tileX,n.tileY)}}},55084:(t,e,i)=>{"use strict";i.d(e,{Hq:()=>c,I_:()=>h,P6:()=>l,R5:()=>d,Tp:()=>u,Tu:()=>f,eO:()=>A,oU:()=>m,ym:()=>p});var s=i(88977),n=i(81396),o=i(77382),a=i(14766),r=i(69505);const h=512,c=6,l=(t,e,i,n,a,r,h,c)=>{const l=t/e,d=2*(e/t),u=d/2;let f=2*(n/l)-1+u,p=2*((a=l-1-a)/l)-1+u;switch(r=r||o.Z.Center){case o.Z.UpperLeft:f-=u,p+=u,f+=h*d;break;case o.Z.UpperRight:f+=u,p+=u,p-=h*d;break;case o.Z.LowerRight:f+=u,p-=u,f-=h*d;break;case o.Z.LowerLeft:f-=u,p-=u,p+=h*d;break;case o.Z.Center:}switch(i){case s.Z.GL_TEXTURE_CUBE_MAP_POSITIVE_X:c.set(-1,p,-f);break;case s.Z.GL_TEXTURE_CUBE_MAP_NEGATIVE_X:c.set(1,p,f);break;case s.Z.GL_TEXTURE_CUBE_MAP_POSITIVE_Y:c.set(-f,1,-p);break;case s.Z.GL_TEXTURE_CUBE_MAP_NEGATIVE_Y:c.set(-f,-1,p);break;case s.Z.GL_TEXTURE_CUBE_MAP_POSITIVE_Z:c.set(-f,p,1);break;case s.Z.GL_TEXTURE_CUBE_MAP_NEGATIVE_Z:c.set(f,p,-1)}c.normalize()},d=(t,e)=>{let i=h;t<h&&(i=t);const s=Math.floor(t/i),n=s*s;return Math.floor(e/n)},u=(t,e,i)=>{let s=h;t<h&&(s=t);const n=d(t,e),o=Math.floor(t/s),a=e-n*(o*o);i.tileX=a%o,i.tileY=Math.floor(a/o),i.face=n,i.faceTileIndex=a},f=function(t){if(t<=h)return c;const e=Math.floor(t/h);return e*e*c},p=function(){const t=new n.Matrix4,e=new n.Quaternion;return(i,s)=>{e.copy(i),e.invert(),t.makeRotationFromQuaternion(e),s.applyMatrix4(t),s.normalize()}}(),m=function(){const t=new n.Vector3,e=new n.Vector3(0,0,-1),i=new n.Quaternion,s=function(t,e){t.push({face:e.face,faceTileIndex:e.faceTileIndex,tileX:e.tileX,tileY:e.tileY})},o=function(){const t={face:-1,faceTileIndex:-1,tileX:-1,tileY:-1};return(e,i,n)=>{const o=f(e);let a=0;for(let r=0;r<o;r++)u(e,r,t),i&&!i(t)||(a++,n&&s(n,t));return a}}();return(s,a,r,c,l=!1,d,u)=>{c.length=l?0:c.length;const f=a<h?a:h;if(!d&&!u)return o(a,null,c);const m=!!u;d=d||0,u=u||d,u=Math.max(0,Math.min(u,360)),d=Math.max(0,Math.min(d,360)),t.copy(r);const v=s.rotation||new n.Quaternion;if(p(v,t),m){i.setFromUnitVectors(t,e);return o(a,(function(t){return g(a,f,t.face,t.tileX,t.tileY,i,d||0,u||0)}),c)}return o(a,(function(e){return A(a,f,e.face,e.tileX,e.tileY,t,d||0)}),c)}}(),g=function(){const t=new n.Vector3;return(e,i,s,n,h,c,d,u)=>{const f=Math.tan(.5*u*r.Ue),p=-f,m=Math.tan(.5*d*r.Ue),g=-m,A=(0,a.m)(s);let v=0,S=0,x=0,w=0,M=0;for(let s=o.Z.Center;s<=o.Z.LowerLeft;s++){if(l(e,i,A,n,h,s,0,t),t.applyQuaternion(c),t.z>=-1e-5)continue;const o=-1/t.z,a=t.x*o,r=t.y*o;r>f?v++:r<p&&S++,a>m?x++:a<g&&w++,M++}return S!==M&&v!==M&&x!==M&&w!==M}}(),A=function(){const t=new n.Vector3,e=new n.Vector3(0,1,0),i=new n.Vector3(1,0,0);return(s,n,r,h,c,d,u)=>{const f=(0,a.m)(r);if(i.copy(d).cross(e),l(s,n,f,h,c,o.Z.Center,0,t),v(t,d,u))return!0;const p=u/360,m=Math.floor(1/p);let g=0;for(let e=0;e<m;e++){for(let e=o.Z.UpperLeft;e<=o.Z.LowerLeft;e++)if(l(s,n,f,h,c,e,g,t),v(t,d,u))return!0;g+=p}return!1}}(),v=function(){const t=new n.Vector3,e=new n.Vector3;return(i,s,n,o)=>{if(e.copy(i),o){t.copy(o),t.normalize();const s=t.dot(i);t.x*=s,t.y*=s,t.z*=s,e.sub(t)}const a=n/2*r.Ue,h=Math.cos(a);return e.dot(s)>=h}}()},20387:(t,e,i)=>{"use strict";var s;i.d(e,{v:()=>s}),function(t){t[t.CurrentView=0]="CurrentView",t[t.FullPanorama=1]="FullPanorama"}(s||(s={}))},54730:(t,e,i)=>{"use strict";i.d(e,{a:()=>n});class s{constructor(t){this._value=t}value(){return this._value}set(t){this._value=t}}class n{constructor(){this.storage={}}get(t,e){let i=this.storage[t];return i||(i=e(),this.storage[t]=i),i}getNumber(t){return this.get(t,(()=>new s(0)))}getString(t){return this.get(t,(()=>new s("")))}getArray(t){return this.get(t,(()=>[]))}getNumberMap(t){return this.get(t,(()=>({})))}getStringMap(t){return this.get(t,(()=>({})))}}},67557:(t,e,i)=>{"use strict";i.d(e,{Tz:()=>s,Ye:()=>E,Qi:()=>b});var s,n=i(97998);!function(t){t[t.NONE=0]="NONE",t[t.NUMERIC=1]="NUMERIC",t[t.ASCII=2]="ASCII"}(s||(s={}));const o={pages:[],chars:[],info:{face:"Loading",size:0,bold:0,italic:0,charset:[],unicode:1,stretchH:100,smooth:1,aa:1,padding:[0,0,0,0],spacing:[0,0],os2version:1},common:{lineHeight:0,base:0,scaleW:1,scaleH:1,pages:0,packed:0,alphaChnl:0,redChnl:0,greenChnl:0,blueChnl:0},kernings:[]};var a=i(59279),r=i(95912);const h=(()=>{let t=null;return function(){return t||(t=Promise.all([i.e(764),i.e(422),i.e(143)]).then(i.bind(i,44422)).then((t=>t.load))),t}})();var c=i(60668),l=i(81396);const d=function(){const t=document.createElement("a");return document.body.appendChild(t),t.style.display="none",(e,i)=>{const s=e.toDataURL();t.href=s,t.download=i,t.click()}}(),u=(t,e)=>{const i=document.createElement("a");i.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(t)),i.setAttribute("download",e),i.click()};var f=i(75287);class p extends f.T{constructor(t){super(),this.packer=t,this.fontData=o,this.textures=[]}update(t,e){this.fontData=e,this.textures.forEach((t=>t.dispose())),this.textures.length=0,this.textures.push(...t),this.commit()}addCharsIfNeeded(t){this.packer.addChars(t)}}const m=new n.Z("font-packer"),g=.2,A="1"===(0,a.eY)("exportfont","0"),v=!0,S=!0,x={log:!1,marks:{rebuild:"rebuild",kern:"kerning",metrics:"metrics",pack:"pack",texture:"texture",bmfont:"load-bmfont"}};function w(t){return Math.log(t)/Math.log(2)%1==0}class M{constructor(t,e){if(this.needsRebuild=!1,this._atlas=new p(this),this._codepointToTexCoord={},this._loading=!1,this._loaded=!1,this._addedChars=[],this.charSet=new Set,this.kerningsMap={},this.measureMap={},this.metricsMap={},this.scale=1,this.updateCanvas=(t,e)=>{try{this.canvas||(this.canvas=document.createElement("canvas")),this.canvas.height=t,this.canvas.width=e;const i=this.canvas&&this.canvas.getContext("2d");if(!i)throw Error("Unable to create canvas context for font-packer");this.ctx=i,this.ctx.fillStyle="white",this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left",this.ctx.font=this.contextFontFace}catch(t){m.error("Failed to create canvas rendering context",t)}},this.throttledRebuild=(0,r.P)((()=>{setTimeout((()=>this.rebuild()),0)}),1500),this.options=t,e&&(this.font=e),this.updateCanvas(this.options.height,this.options.width),this.packer=new c.cC(this.options.width,this.options.height,2*this.options.texturePadding),this.options.defaultCharset){(function(t=!1){const e=new Set(Array.from("m0123456789_-+'\"` \t")),i=[];t&&i.push([32,127]);for(const t of i)for(let i=t[0];i<t[1];i++)e.add(String.fromCharCode(i));return e})(this.options.defaultCharset===s.ASCII).forEach((t=>this.charSet.add(t)))}this.options.initialChars&&this.options.initialChars.forEach((t=>this.charSet.add(t))),this.options.squareSize&&!w(this.options.squareSize)&&m.error("font config squareSize must be a power of two")}get loaded(){return!this._loading&&this._loaded}async loadFont(){let t;x.log&&performance.mark(x.marks.bmfont);const e=`${this.options.fontFamily} for BitmapFontPacker`;if(!this.font){this._loading=!0;const i=await h(),s=await i(this.options.fontPath);this.font=s,t=new FontFace(e,`url("${this.options.fontPath}") format("woff")`,{style:`${this.options.fontStyle}`,weight:`${this.options.fontWeight}`}),await t.load();t.loaded;document.fonts.add(t)}return x.log&&performance.measure(x.marks.bmfont,x.marks.bmfont),this.scale=this.options.fontSize/this.font.unitsPerEm,this.contextFontFace=`${this.options.fontWeight} ${this.options.fontSize}px "${e}"`,this.ctx.font=this.contextFontFace,S&&m.debug({contextFontFace:this.contextFontFace,bmfont:this.font,charset:this.charSet}),this._loading=!1,this.fontFilename=`${this.options.fontFamily.toLowerCase()}-${this.options.fontWeight}-${this.options.fontSize}`+(this.options.outline?"-outline-"+this.options.outlineWidth:""),this.needsRebuild=!0,this.throttledRebuild(),{fontPath:this.options.fontPath,font:this.font,packer:this}}addChars(t){const e=this.charSet.size;return Array.from(t).forEach((t=>{this.charSet.has(t)||this._addedChars.push(t),this.charSet.add(t)})),e!==this.charSet.size&&this.loaded&&(this.needsRebuild=!0,this.throttledRebuild()),this.needsRebuild}atlas(){return this._atlas}codepointMap(){return this._codepointToTexCoord}rebuild(){if(!this.font)return;if(this.loaded&&this._addedChars.length<1)return void(this.needsRebuild=!1);v&&(m.debug(`Added ${this._addedChars.length} glyphs: \n${this._addedChars}`),this._addedChars.length=0),performance.mark(x.marks.rebuild),x.log&&performance.mark(x.marks.metrics);const t=this.getAllGlyphMetrics();x.log&&performance.measure(x.marks.metrics,x.marks.metrics),x.log&&performance.mark(x.marks.pack);const e=this.pack(t);x.log&&performance.measure(x.marks.pack,x.marks.pack),x.log&&performance.mark(x.marks.texture);const{chars:i,textures:s,codePointToTexCoord:n}=this.assembleTexture(e);x.log&&performance.measure(x.marks.texture,x.marks.texture),x.log&&performance.mark(x.marks.kern);const o=this.getKerningPairs();x.log&&performance.measure(x.marks.kern,x.marks.kern);const a=this.assembleFont(i,o,s);performance.measure(x.marks.rebuild,x.marks.rebuild),this._codepointToTexCoord=n,this._loaded=!0,this._atlas.update(s,a);const r=`Rebuilt atlas for ${this.charSet.size} chars with ${a.kernings.length} kerning pairs`;x.log?(m.debug(r,performance.getEntriesByName(x.marks.rebuild,"measure")[0],performance.getEntriesByType("measure").map((t=>({name:t.name,duration:t.duration}))),this.options),Object.values(x.marks).forEach((t=>{performance.clearMarks(t),performance.clearMeasures(t)}))):(m.debug(r,performance.getEntriesByName(x.marks.rebuild,"measure")[0]),performance.clearMarks(x.marks.rebuild),performance.clearMeasures(x.marks.rebuild))}pack(t){return this.packer.bins.length=0,this.packer.addArray(t),this.packer.bins.reverse()}assembleTexture(t){const e=[],i={},s=this.options.squareSize,n=t.map(((t,n)=>{const o=t.rects.length,{squareSize:a}=this.options,r=function(t){if(w(t))return t;let e=1;for(;e<t;)e<<=1;return e}(Math.ceil(Math.sqrt(o))),h=r*a,c=h,l=1/r;return s&&(h===this.canvas.width&&c===this.canvas.height||this.updateCanvas(c,h)),this.ctx.fillRect(0,0,this.canvas.width,this.canvas.height),this.options.transparent&&this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),t.rects.forEach(((t,o)=>{const d=t.data.charData;let u=t.x-d.xoffset,f=t.y+d.height+d.ymin-this.options.texturePadding;if(s){const t=o%r,e=Math.floor(o/r),s=t*a,p=e*a;u=s+a/2,f=p+a-(a-this.options.fontSize)/2,57344===d.id&&(f+=5),i[d.id]={x:s,y:p,u:s/h,v:1-(p+a)/c,page:n,uvScale:l},this.ctx.textAlign="center"}this.options.outline&&this.options.outlineWidth>0?function(t,e,i,s,n){const o=t.strokeStyle,a=t.fillStyle,r=t.lineJoin,h=t.miterLimit;t.lineJoin="miter",t.miterLimit=2,t.beginPath(),t.strokeStyle="black",t.lineWidth=n,t.strokeText(e,i,s),t.beginPath(),t.fillStyle="white",t.fillText(e,i,s),t.strokeStyle=o,t.fillStyle=a,t.lineJoin=r,t.miterLimit=h}(this.ctx,t.data.charData.char,u,f,this.options.outlineWidth):this.ctx.fillText(t.data.charData.char,u,f),d.x=t.x,d.y=t.y,d.page=n,e.push(t.data.charData)})),A&&d(this.ctx.canvas,`${this.fontFilename}_${n}.png`),this.makeCanvasTexture(n,!1)}));return{chars:e,textures:n,codePointToTexCoord:i}}getKerningPairs(){const t=[],e=[...this.charSet.values()].map((t=>this.font.charToGlyphIndex(t))).filter((t=>t>0));for(const i of e)for(const s of e){const e=`${i},${s}`;let n=this.kerningsMap[e];if(!n){n={first:i,second:s,amount:this.font.getKerningValue(i,s)*this.scale},this.kerningsMap[e]=n}n&&0!==n.amount&&t.push(n)}return t}assembleFont(t,e,i){const s=this.font.tables.os2,n=this.font.tables.name.fullName,o=n[Object.getOwnPropertyNames(n)[0]],a={pages:i.map(((t,e)=>`${this.fontFilename}_${e}.png`)),chars:t,info:{face:o,size:this.options.fontSize,bold:0,italic:0,charset:[...this.charSet.values()],unicode:1,stretchH:100,smooth:1,aa:1,padding:[0,0,0,0],spacing:[this.options.texturePadding,this.options.texturePadding],os2version:s.version},common:{lineHeight:(s.sTypoAscender-s.sTypoDescender+s.sTypoLineGap)*this.scale,base:this.font.ascender*this.scale,scaleW:this.options.width,scaleH:this.options.height,pages:this.packer.bins.length,packed:0,alphaChnl:0,redChnl:0,greenChnl:0,blueChnl:0},kernings:e};return S&&m.debug({bmFontOutput:a,kerningPairCount:e.length}),A&&(u(JSON.stringify(a),`${this.fontFilename}.json`),u(JSON.stringify(this.options,void 0,2),`${this.fontFilename}-pack-options.json`)),a}getMetrics(t){const e=2*this.options.texturePadding,i=this.scale;let s,n,o,a,r,h;const c=this.font.charToGlyph(t),l=0!==c.index;if(l){let e=this.measureMap[t];e||(e=c.getMetrics(),this.measureMap[t]=e),s=(e.xMax-e.xMin)*i,n=(e.yMax-e.yMin)*i,o=e.xMin*i,a=e.yMin*i,r=e.yMax*i,h=(c.advanceWidth||0)*i}else{const e=this.measureChar(t);s=e.width,n=e.height,o=e.xMin,a=e.yMin,r=e.yMax,h=s}return{char:t,width:s+e,height:n+e,xmin:o,ymin:a,ymax:r,xadvance:h+(this.options.outline?this.options.outlineWidth*g:0),supported:l}}measureText(t){if(!this.loaded)return;let e=0;for(const i of Array.from(t)){const{width:t}=this.measureChar(i);e+=t}return e}measureChar(t){let e=this.metricsMap[t];e||(e=this.ctx.measureText(t),this.metricsMap[t]=e);const i=e.actualBoundingBoxLeft+e.actualBoundingBoxRight;return{width:e.width||i,height:e.actualBoundingBoxAscent+e.actualBoundingBoxDescent,xMin:e.actualBoundingBoxLeft,xMax:e.actualBoundingBoxRight,yMin:-e.actualBoundingBoxDescent,yMax:e.actualBoundingBoxAscent}}getAllGlyphMetrics(){const t=[],e=this.font.ascender*this.scale,i=this.options.texturePadding;for(const s of this.charSet.values()){const n=this.getMetrics(s),o={data:{charData:{char:s,id:s.charCodeAt(0),width:n.width,height:n.height,xoffset:n.xmin-i,yoffset:e-n.ymax-i,xadvance:n.xadvance,chnl:15,ymin:n.ymin}},width:n.width,height:n.height};t.push(o)}return t}makeCanvasTexture(t,e){if(e){const t=new Uint8Array(this.ctx.getImageData(0,0,this.canvas.width,this.canvas.height).data),e=new l.DataTexture(t,this.canvas.width,this.canvas.height,l.RGBAFormat);return e.needsUpdate=!0,e.flipY=!0,e}const i=new l.Texture(this.ctx.canvas);return i.name=`${this.ctx.font}_${t}`,i.format=l.RGBAFormat,i.needsUpdate=!0,i}}const y=new n.Z("FontManager"),E={fontPath:"fonts/roboto-700.woff",fontWeight:700,fontFamily:"Roboto",fontStyle:"normal",fontSize:60,width:2048,height:2048,transparent:!0,defaultCharset:s.ASCII,outline:!1,outlineWidth:4,texturePadding:6};class b{constructor(){this.defaultFontOptions=E,this.packerMap=new Map,this.optionsMap=new Map,this.parsedFontMap=new Map}static get instance(){return b._instance||(b._instance=new b),b._instance}getFontId(t=this.defaultFontOptions){const e=Object.assign(Object.assign({},this.defaultFontOptions),t),i=JSON.stringify(e);return this.optionsMap.set(i,e),i}getPacker(t){let e=this.packerMap.get(t);if(!e){const i=this.optionsMap.get(t)||JSON.parse(t),s=this.parsedFontMap.get(i.fontPath);e=new M(i,s),this.packerMap.set(t,e),e.loadFont().then((e=>{y.debug("font loaded",t,e.fontPath),this.parsedFontMap.set(e.fontPath,e.font)}))}return e}getFont(t){return this.getPacker(t).atlas()}getFontAndCodepoints(t){const e=this.getPacker(t);return{font:e.atlas(),codepointMap:e.codepointMap()}}measureText(t,e){const i=this.packerMap.get(t);if(i)return i.measureText(e)}}},44724:t=>{t.exports="precision highp float;precision highp int;uniform mat4 viewMatrix;uniform vec3 cameraPosition;uniform float opacity;uniform vec3 color;uniform sampler2D bg;varying vec2 vUv;void main(){vec4 bgColor=texture2D(bg,vUv);gl_FragColor=vec4(bgColor.rgb,bgColor.a*opacity);}"},52059:t=>{t.exports="precision highp float;precision highp int;uniform mat4 viewMatrix;uniform vec3 cameraPosition;uniform vec3 diffuse;uniform float opacity;uniform sampler2D mask;\n#ifdef USE_DASH\nuniform float dashSize;uniform float gapSize;\n#endif\nvarying float vLineDistance;\n#include <common>\nvarying vec2 vUv;void main(){\n#ifdef USE_DASH\nif(vUv.y<-1.||vUv.y>1.)discard;if(mod(vLineDistance,dashSize+gapSize)>dashSize)discard;\n#endif\n#ifdef USE_MASK\nvec2 modUv=vec2(vUv);modUv*=2.;vec4 texelColor=texture2D(mask,modUv);gl_FragColor=vec4(texelColor.rgb,min(texelColor.a,opacity));\n#else\ngl_FragColor=vec4(diffuse,opacity);\n#endif\n}"},7188:t=>{t.exports="precision highp float;precision highp int;uniform mat4 modelMatrix;uniform mat4 modelViewMatrix;uniform mat4 projectionMatrix;uniform mat4 viewMatrix;uniform mat3 normalMatrix;uniform vec3 cameraPosition;attribute vec3 position;attribute vec3 normal;attribute vec2 uv;\n#include <common>\nuniform float linewidth;uniform vec2 resolution;attribute vec3 instanceStart;attribute vec3 instanceEnd;attribute vec3 instanceColorStart;attribute vec3 instanceColorEnd;varying vec2 vUv;\n#ifdef USE_DASH\nuniform float dashScale;attribute float instanceDistanceStart;attribute float instanceDistanceEnd;varying float vLineDistance;\n#endif\nvoid trimSegment(const in vec4 start,inout vec4 end){float a=projectionMatrix[2][2];float b=projectionMatrix[3][2];float nearEstimate=-0.5*b/a;float alpha=(nearEstimate-start.z)/(end.z-start.z);end.xyz=mix(start.xyz,end.xyz,alpha);}void main(){\n#ifdef USE_COLOR\nvColor.xyz=(position.y<0.5)?instanceColorStart:instanceColorEnd;\n#endif\n#ifdef USE_DASH\nvLineDistance=(position.y<0.5)?dashScale*instanceDistanceStart:dashScale*instanceDistanceEnd;\n#endif\nfloat aspect=resolution.x/resolution.y;vUv=uv;vec4 start=modelViewMatrix*vec4(instanceStart,1.);vec4 end=modelViewMatrix*vec4(instanceEnd,1.);bool perspective=(projectionMatrix[2][3]==-1.);if(perspective){if(start.z<0.&&end.z>=0.){trimSegment(start,end);}else if(end.z<0.&&start.z>=0.){trimSegment(end,start);}}vec4 clipStart=projectionMatrix*start;vec4 clipEnd=projectionMatrix*end;vec2 ndcStart=clipStart.xy/clipStart.w;vec2 ndcEnd=clipEnd.xy/clipEnd.w;vec2 dir=ndcEnd-ndcStart;dir.x*=aspect;dir=normalize(dir);vec2 offset=vec2(dir.y,-dir.x);dir.x/=aspect;offset.x/=aspect;if(position.x<0.)offset*=-1.;offset*=linewidth;offset/=resolution.y;vec4 clip=(position.y<0.5)?clipStart:clipEnd;\n#ifdef USE_MASK\noffset*=(clipEnd.w+clipStart.w)*0.5;\n#else\noffset*=clip.w;\n#endif\nclip.xy+=offset;gl_Position=clip;\n#include <worldpos_vertex>\n}"},56449:t=>{t.exports="precision highp float;uniform vec3 color;uniform float antialiasWidth;uniform float lineWidth;uniform float dashed;uniform float dashSize;uniform float gapSize;varying float vDistanceFromAxis;varying float vDistanceAlong;void main(){float halfWidth=lineWidth*0.5;float antialiasing=1.-smoothstep(halfWidth,halfWidth+antialiasWidth,vDistanceFromAxis);float dashOpacity=1.;if(dashed>0.){float dashAA=antialiasWidth*0.5;float dashT=mod(vDistanceAlong,dashSize+gapSize);dashOpacity=smoothstep(0.,dashAA,dashT)*(1.-smoothstep(dashSize-dashAA,dashSize,dashT));}gl_FragColor=vec4(color,dashOpacity*antialiasing);}"},75215:t=>{t.exports="precision highp float;uniform vec3 start;uniform vec3 end;uniform float lineWidth;uniform float antialiasWidth;uniform vec2 screenSize;uniform mat4 projectionMatrix;uniform mat4 modelViewMatrix;attribute float offsetDirection;attribute float t;varying float vDistanceFromAxis;varying float vDistanceAlong;vec2 rotate90(vec2 v){return vec2(-v.y,v.x);}vec4 ndcToScreen(vec4 pt){return(pt*vec4(1.,-1.,1.,1.)+vec4(1.,1.,0.,0.))*vec4(screenSize/2.,1.,1.);}vec4 screenToNdc(vec4 pt){return pt*vec4(2./screenSize.x,-2./screenSize.y,1.,1.)+vec4(-1.,1.,0.,0.);}void main(){vec4 startNdc=projectionMatrix*modelViewMatrix*vec4(start,1.);vec4 endNdc=projectionMatrix*modelViewMatrix*vec4(end,1.);startNdc*=1./startNdc.w;endNdc*=1./endNdc.w;vec4 startScreen=ndcToScreen(startNdc);vec4 endScreen=ndcToScreen(endNdc);float halfWidth=lineWidth*0.5+antialiasWidth;vec4 directionScreen=endScreen-startScreen;vec2 widthOffsetScreen=rotate90(normalize(directionScreen.xy))*offsetDirection*halfWidth;vec4 position=startScreen+directionScreen*t+vec4(widthOffsetScreen,0.,0.);vDistanceFromAxis=length(widthOffsetScreen);vDistanceAlong=length(directionScreen.xy*t);gl_Position=screenToNdc(position);}"}}]);
@@ -0,0 +1,20 @@
1
+ /*!
2
+ * Matterport Showcase SDK
3
+ *
4
+ * © 2022 Matterport, Inc. All rights reserved.
5
+ *
6
+ * Matterport Showcase SDK ("Showcase SDK") must be used according to
7
+ * the Matterport Terms of Service located at https://matterport.com/terms-of-use, the Platform Subscription Agreement ("PSA") available at https://matterport.com/legal/platform-subscription-agreement and the SDK License terms included in the PSA ("SDK License"). Any use of the Showcase SDK requires a current active Matterport account and associated developer key.
8
+ *
9
+ * -------------------------------------------------------------------------------
10
+ *
11
+ * Redistribution and use in source and binary forms, without modification, is permitted in accordance with the SDK License provided that the following conditions are met:
12
+ *
13
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
14
+ * * Neither the name of Matterport nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
15
+ *
16
+ * THE SHOWCASE SDK IS PROVIDED BY MATTERPORT AS THE COPYRIGHT HOLDER AND, IF APPLICABLE, ITS CONTRIBUTORS "AS IS" AND WITHOUT WARRANTIES OF ANY KIND. TO THE FULLEST EXTENT PERMISSIBLE PURSUANT TO APPLICABLE LAW, MATTERPORT DISCLAIMS, ON BEHALF OF ITSELF AND ITS AFFILIATES AND LICENSORS, ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. MATTERPORT DOES NOT WARRANT THAT THE AVAILABILITY OF THE SHOWCASE SDK WILL BE UNINTERRUPTED OR ERROR-FREE, THAT DEFECTS WILL BE CORRECTED, OR THAT THE SHOWCASE SDK WILL BE FREE OF VIRUSES OR OTHER HARMFUL COMPONENTS. MATTERPORT DOES NOT MAKE ANY REPRESENTATIONS OR WARRANTIES REGARDING THE USE OR THE RESULTS OF THE USE OF THE SHOWCASE SDK OR FUNCTIONS ON THE SHOWCASE SDK IN TERMS OF THEIR CORRECTNESS, ACCURACY, RELIABILITY, RESULTS TO BE ACHIEVED, OR OTHERWISE. APPLICABLE LAW MAY NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SOME OR ALL OF THE FOREGOING DISCLAIMERS MAY NOT APPLY TO YOU.
17
+ *
18
+ * TO THE EXTENT PERMITTED UNDER APPLICABLE LAW UNDER NO CIRCUMSTANCES, INCLUDING, BUT NOT LIMITED TO, NEGLIGENCE, SHALL MATTERPORT OR ITS AFFILIATES OR LICENSORS BE LIABLE FOR ANY CONSEQUENTIAL, EXEMPLARY, PUNITIVE, SPECIAL, INCIDENTAL OR OTHER INDIRECT DAMAGES, EVEN IF MATTERPORT OR A MATTERPORT AUTHORIZED REPRESENTATIVE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. APPLICABLE LAW MAY NOT ALLOW SOME OR ALL OF THIS LIMITATION OF LIABILITY, SO IT MAY NOT APPLY TO YOU.
19
+ *
20
+ */
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 316.js.LICENSE.txt */
2
+ (self.webpackChunkmp_webgl=self.webpackChunkmp_webgl||[]).push([[316],{34515:e=>{var t=Object.prototype.toString;e.exports=function(e){return e.BYTES_PER_ELEMENT&&"[object ArrayBuffer]"===t.call(e.buffer)||Array.isArray(e)}},14176:e=>{e.exports=function(e,t){return"number"==typeof e?e:"number"==typeof t?t:0}},2823:e=>{e.exports=function(e){switch(e){case"int8":return Int8Array;case"int16":return Int16Array;case"int32":return Int32Array;case"uint8":return Uint8Array;case"uint16":return Uint16Array;case"uint32":return Uint32Array;case"float32":return Float32Array;case"float64":return Float64Array;case"array":return Array;case"uint8_clamped":return Uint8ClampedArray}}},48738:e=>{function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(t(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&t(e.slice(0,0))}(e)||!!e._isBuffer)}},73134:(e,t,i)=>{var n=i(12739),s=i(47529),r=i(14176),o=["x","e","a","o","n","s","r","c","u","m","v","w","z"],a=["m","w"],h=["H","I","N","E","F","K","L","T","U","V","W","X","Y","Z"],c="\t".charCodeAt(0),l=" ".charCodeAt(0);function u(e){this.glyphs=[],this._measure=this.computeMetrics.bind(this),this.update(e)}function p(e){return function(){return this["_"+e]}}function d(e,t){if(!e.chars||0===e.chars.length)return null;var i=m(e.chars,t);return i>=0?e.chars[i]:null}function g(e,t,i){if(!e.kernings||0===e.kernings.length)return 0;for(var n=e.kernings,s=0;s<n.length;s++){var r=n[s];if(r.first===t&&r.second===i)return r.amount}return 0}function m(e,t,i){for(var n=i=i||0;n<e.length;n++)if(e[n].id===t)return n;return-1}e.exports=function(e){return new u(e)},u.prototype.update=function(e){if(e=s({measure:this._measure},e),this._opt=e,this._opt.tabSize=r(this._opt.tabSize,4),!e.font)throw new Error("must provide a valid bitmap font");var t=this.glyphs,i=e.text||"",a=e.font;this._setupSpaceGlyphs(a);var c=n.lines(i,e);t.length=0;var l=c.reduce((function(e,t){return Math.max(e,t.width,0)}),0),u=0,p=0,d=r(e.lineHeight,a.common.lineHeight),f=a.common.base,w=d-f,y=e.letterSpacing||0,b=d*c.length-w,v=function(e){if("center"===e)return 1;if("right"===e)return 2;return 0}(this._opt.align);p-=b,this._width=l,this._height=b,this._descender=d-f,this._baseline=f,this._xHeight=function(e){for(var t=0;t<o.length;t++){var i=o[t].charCodeAt(0),n=m(e.chars,i);if(n>=0)return e.chars[n].height}return 0}(a),this._capHeight=function(e){for(var t=0;t<h.length;t++){var i=h[t].charCodeAt(0),n=m(e.chars,i);if(n>=0)return e.chars[n].height}return 0}(a),this._lineHeight=d,this._ascender=d-w-this._xHeight;var S=this;c.forEach((function(e,n){for(var s,r=e.start,o=e.end,h=e.width,c=r;c<o;c++){var m=i.charCodeAt(c),f=S.getGlyph(a,m);if(f){s&&(u+=g(a,s.id,f.id));var w=u;1===v?w+=(l-h)/2:2===v&&(w+=l-h),t.push({position:[w,p],data:f,index:c,line:n}),u+=f.xadvance+y,s=f}}p+=d,u=0})),this._linesTotal=c.length},u.prototype._setupSpaceGlyphs=function(e){if(this._fallbackSpaceGlyph=null,this._fallbackTabGlyph=null,e.chars&&0!==e.chars.length){var t=d(e,l)||function(e){for(var t=0;t<a.length;t++){var i=a[t].charCodeAt(0),n=m(e.chars,i);if(n>=0)return e.chars[n]}return 0}(e)||e.chars[0],i=this._opt.tabSize*t.xadvance;this._fallbackSpaceGlyph=t,this._fallbackTabGlyph=s(t,{x:0,y:0,xadvance:i,id:c,xoffset:0,yoffset:0,width:0,height:0})}},u.prototype.getGlyph=function(e,t){var i=d(e,t);return i||(t===c?this._fallbackTabGlyph:t===l?this._fallbackSpaceGlyph:null)},u.prototype.computeMetrics=function(e,t,i,n){var s,r=this._opt.letterSpacing||0,o=this._opt.font,a=0,h=0,c=0;if(!o.chars||0===o.chars.length)return{start:t,end:t,width:0};i=Math.min(e.length,i);for(var l=t;l<i;l++){var u,p=e.charCodeAt(l);if(u=this.getGlyph(o,p)){u.xoffset;var d=(a+=s?g(o,s.id,u.id):0)+u.xadvance+r,m=a+u.width;if(m>=n||d>=n)break;a=d,h=m,s=u}c++}return s&&(h+=s.xoffset),{start:t,end:t+c,width:h}},["width","height","descender","ascender","xHeight","baseline","capHeight","lineHeight"].forEach((function(e){Object.defineProperty(u.prototype,e,{get:p(e),configurable:!0})}))},77824:(e,t,i)=>{var n=i(2823),s=i(34515),r=i(48738),o=[0,2,3],a=[2,1,3];e.exports=function(e,t){e&&(s(e)||r(e))||(t=e||{},e=null);for(var i="string"==typeof(t="number"==typeof t?{count:t}:t||{}).type?t.type:"uint16",h="number"==typeof t.count?t.count:1,c=t.start||0,l=!1!==t.clockwise?o:a,u=l[0],p=l[1],d=l[2],g=6*h,m=e||new(n(i))(g),f=0,w=0;f<g;f+=6,w+=4){var y=f+c;m[y+0]=w+0,m[y+1]=w+1,m[y+2]=w+2,m[y+3]=w+u,m[y+4]=w+p,m[y+5]=w+d}return m}},45837:(e,t,i)=>{"use strict";i.d(t,{Y:()=>l});var n=i(73134),s=i.n(n),r=i(77824),o=i.n(r);const a={min:[0,0],max:[0,0]};function h(e){const t=e.length/2;a.min[0]=e[0],a.min[1]=e[1],a.max[0]=e[0],a.max[1]=e[1];for(let i=0;i<t;i++){const t=e[2*i+0],n=e[2*i+1];a.min[0]=Math.min(t,a.min[0]),a.min[1]=Math.min(n,a.min[1]),a.max[0]=Math.max(t,a.max[0]),a.max[1]=Math.max(n,a.max[1])}}var c=i(81396);function l(e){return new u(e)}class u extends c.BufferGeometry{constructor(e){super(),this.type="TextGeometry","string"==typeof e&&(e={text:e}),this._opt=Object.assign({},e),e&&this.update(e)}update(e){if("string"==typeof e&&(e={text:e}),!(e=Object.assign({},this._opt,e)).font)throw new TypeError("must specify a { font } in options");this.layout=s()(e);const t=!1!==e.flipY,i=e.font,n=i.common.scaleW,r=i.common.scaleH,a=this.layout.glyphs.filter((function(e){const t=e.data;return t.width*t.height>0}));this.visibleGlyphs=a;const h=function(e){const t=new Float32Array(4*e.length*2);let i=0;return e.forEach((function(e){const n=e.data,s=e.position[0]+n.xoffset,r=e.position[1]+n.yoffset,o=n.width,a=n.height;t[i++]=s,t[i++]=r,t[i++]=s,t[i++]=r+a,t[i++]=s+o,t[i++]=r+a,t[i++]=s+o,t[i++]=r})),t}(a),l=function(e,t,i,n){const s=new Float32Array(4*e.length*2);let r=0;return e.forEach((function(e){const o=e.data,a=o.x+o.width,h=o.y+o.height,c=o.x/t;let l=o.y/i;const u=a/t;let p=h/i;n&&(l=(i-o.y)/i,p=(i-h)/i),s[r++]=c,s[r++]=l,s[r++]=c,s[r++]=p,s[r++]=u,s[r++]=p,s[r++]=u,s[r++]=l})),s}(a,n,r,t),u=o()([],{clockwise:!0,type:"uint16",count:a.length});this.setIndex(u),this.setAttribute("position",new c.BufferAttribute(h,2)),this.setAttribute("uv",new c.BufferAttribute(l,2)),!e.multipage&&"page"in this.attributes?this.deleteAttribute("page"):e.multipage&&this.setAttribute("page",new c.BufferAttribute(function(e){const t=new Float32Array(4*e.length*1);let i=0;return e.forEach((function(e){var n=e.data.page||0;t[i++]=n,t[i++]=n,t[i++]=n,t[i++]=n})),t}(a),1))}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new c.Sphere);const e=this.attributes.position.array,t=this.attributes.position.itemSize;if(!e||!t||e.length<2)return this.boundingSphere.radius=0,void this.boundingSphere.center.set(0,0,0);!function(e,t){h(e);const i=a.min[0],n=a.min[1],s=a.max[0]-i,r=a.max[1]-n,o=Math.sqrt(s*s+r*r);t.center.set(i+s/2,n+r/2,0),t.radius=o/2}(e,this.boundingSphere),isNaN(this.boundingSphere.radius)&&console.error('BufferGeometry.computeBoundingSphere():\nComputed radius is NaN. The\n"position" attribute is likely to have NaN values.')}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new c.Box3);const e=this.boundingBox,t=this.attributes.position.array,i=this.attributes.position.itemSize;!t||!i||t.length<2?e.makeEmpty():function(e,t){h(e),t.min.set(a.min[0],a.min[1],0),t.max.set(a.max[0],a.max[1],0)}(t,e)}}},76381:(e,t,i)=>{"use strict";i.r(t),i.d(t,{NavigationVisuals:()=>d,default:()=>f,visDollhouseNavigation:()=>m,visPanoNavigation:()=>g});var n=i(69170),s=i(17798),r=i(2569),o=i(20043),a=i(88338),h=i(9037),c=i(85992),l=i(53954),u=i(23254),p=i(34029);class d{constructor(e,t,i){this.engine=e,this.dynamicNumber=t,this.smoothWalk=i,this.active=!1,this.draw=new s.M,Promise.all([this.engine.getModuleBySymbol(n.y.WEBGL_RENDERER),this.engine.market.waitForData(c.P),this.engine.getModuleBySymbol(n.y.MESH_QUERY),this.engine.market.waitForData(p.e)]).then((([e,t,i,n])=>{var s;this.meshQuery=i,this.draw.setStyle({assetBasePath:null!==(s=n.getProperty("assetBasePath"))&&void 0!==s?s:""}),this.draw.addToScene(e.getScene()),this.subscription=t.onChanged((()=>this.update(this.draw,t))),this.subscription.cancel()})),this.engine.getModuleBySymbol(n.y.SETTINGS).then((e=>{const t="Navigation";[{header:t,setting:"navDebugEnabled",initialValue:()=>this.active,onChange:e=>this.toggle(e),urlParam:!0},{header:t,setting:"Max transition dist",initialValue:()=>a.E.longerTransitionMaxDist,range:[3,50],rangePrecision:1,onChange:e=>a.E.longerTransitionMaxDist=e},{header:t,setting:"accel",initialValue:()=>this.dynamicNumber.acceleration,range:[1,60],rangePrecision:.5,onChange:e=>{this.dynamicNumber.setAccel(e)}},{header:t,setting:"top speed",initialValue:()=>this.dynamicNumber.maxSpeed,range:[1,40],rangePrecision:.5,onChange:e=>this.dynamicNumber.setMaxSpeed(e)},{header:t,setting:"queue ms",initialValue:()=>this.smoothWalk.repeatedQueueDelayMS,range:[0,1e3],onChange:e=>this.smoothWalk.repeatedQueueDelayMS=e}].forEach((t=>e.registerMenuEntry(t)))}))}toggle(e){this.active!==e&&(e||this.draw.toggleAll(!1),e||this.subscription.cancel(),e&&this.subscription.renew(),this.active=e)}update(e,t){const i=this.engine.market.tryGetData(l.Z),n=this.engine.market.tryGetData(h.M),s=this.engine.market.tryGetData(u.O);e&&i&&n&&s&&(e.toggleAll(!1),t.hit&&this.meshQuery.floorIdFromObject(t.hit.object)&&(s.isInside()?g(e,i,n,t.hit.intersection):m(e,i,t.hit.intersection,this.meshQuery)))}}const g=(e,t,i,n)=>{let s=0;const a=n.point.clone().sub(i.pose.position),h=(0,o.Tq)(t,a),c=Math.max(...h.map((e=>e.score))),l=c-5;for(const{sweep:t,score:i}of h)if(t){const o=0===s?"cyan":"orange",a=(0,r.dS)(i,l,c,0,.6);e.line("panosphere"+s++,o).toggle(!0).updatePositions(n.point,t.position).opacity(a);const h=(0,r.dS)(a,0,.6,0,.1);e.sphere("panosphere"+s++,{color:o,opacity:.8}).toggle(!0).update(t.position,h)}},m=(e,t,i,n)=>{let s=0;const a=(0,o.bG)(t,!1,i,n),h=Math.max(...a.map((e=>e.score))),c=h-15;for(const{sweep:t,score:n}of a)if(t){const o=0===s?"cyan":"orange",a=(0,r.dS)(n,c,h,0,1);e.line("panosphere"+s++,o).toggle(!0).updatePositions(i.point,t.position).opacity(a);const l=(0,r.dS)(a,0,1,0,.3);e.sphere("panosphere"+s++,{color:o}).toggle(!0).update(t.position,l)}};function f(e){e.getModuleBySymbol(n.y.NAVIGATION).then((t=>{const i=t.navigationWalk,n=i.positionTracker;new d(e,n,i)}))}},83718:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>h});var n=i(69984),s=i(97998),r=i(69170);const o=new s.Z("raycaster-debug");class a{constructor(e){Promise.all([e.getModuleBySymbol(r.y.SETTINGS),e.getModuleBySymbol(r.y.WEBGL_RENDERER),e.getModuleBySymbol(r.y.RAYCASTER)]).then((([e,t,i])=>{const s=t.getScene(),r=[];let a=!1;const h=()=>{r&&r.forEach((e=>{e.geometry.dispose(),e.material.dispose(),s.remove(e)}))},c=(e,t,a)=>{o.info("draw",{from:e,to:t,faces:a});const h=i.getOctree().getDebugBoundsMesh((0,n.rn)().getHex(),e,t,a);h.frustumCulled=!1,h.updateMatrixWorld(!0),s.add(h),r.push(h)};e.registerMenuButton({header:"Raycaster",buttonName:"Add Octree Level Buttons",callback:()=>{if(!a){for(let t=0;t<=i.getOctree().depth;t++)e.registerMenuButton({header:"Octree Levels",buttonName:`Anything on Level: ${t}`,callback:()=>{h(),c(t,t,!1)}});for(let t=0;t<=i.getOctree().depth;t++)e.registerMenuButton({header:"Octree Faces",buttonName:`Faces on Level: ${t}`,callback:()=>{h(),c(t,t,!0)}});a=!0}}}),e.registerMenuButton({header:"Raycaster",buttonName:"Visualize Octree - All",callback:()=>{h();for(let e=0;e<=i.getOctree().depth;e++)c(e,e,!1)}}),e.registerMenuButton({header:"Raycaster",buttonName:"Visualize Octree - Faces",callback:()=>{h();for(let e=0;e<=i.getOctree().depth;e++)c(e,e,!0)}}),e.registerMenuButton({header:"Raycaster",buttonName:"Clear Octree Visuals",callback:h})}))}}function h(e){new a(e)}},68427:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>f});var n=i(69170),s=i(81396),r=i(17798),o=i(2569),a=i(56512),h=i(90304),c=i(9037),l=i(85992),u=i(94046);const p=new(i(97998).Z)("raycaster-debug");var d;!function(e){e.normal="normal",e.hitClass="hitClass",e.hitBounds="hitBounds"}(d||(d={}));const g={color:"yellow"};class m{constructor(e){this.engine=e,this.cached={v1:new s.Vector3,v2:new s.Vector3,quat:new s.Quaternion},this.showClass=!1,this.showName=!0,this.showNormal=!1,this.showBounds=!1,this.drawRaycastHitNormal=e=>{const t=this.draw.line(d.normal,"red",4);e&&t.updatePositions(e.point,this.cached.v1.copy(e.point).addScaledVector(e.normal,.2)),t.toggle(null!==e)},this.drawRaycastObjectInfo=(e,t,i,n)=>{const s=this.draw.label(d.hitClass,"X",this.cached.v1,1);if(s.visible=!1,e&&t&&(i||n)){const{position:r,rotation:a}=t.pose,{point:c,object:l}=e,u=i?l.__proto__.constructor.name:"",p=n?""!==l.name?l.name:l.id:"";s.text=`${u} - ${p}`,s.setPosition(c,(e=>t.isOrtho()?e.addScaledVector(h.f.UP,10):(0,o.Xe)(r,e,1,e))),s.scaleBillboard(r,a,t.pose.projection,t.zoom(),t.height,t.aspect(),.1),s.setOrientation(a),s.visible=!0}},this.drawRaycastHitBounds=e=>{const t=this.draw.boxWire(d.hitBounds,g).toggle(!1);if(e&&e.object&&!(e.object instanceof u.i)&&e.object instanceof s.Mesh){const i=(0,a.A5)(e.object.geometry),n=i.getCenter(this.cached.v1).applyMatrix4(e.object.matrixWorld),s=i.getSize(this.cached.v2).multiply(e.object.scale).multiplyScalar(.5);t.mesh.quaternion.copy(e.object.quaternion),t.toggle(!0).update(n,s)}},this.onPointerDown=()=>{const e=this.data.hit;e&&e.object&&p.warn(e.object,e)},Promise.all([e.getModuleBySymbol(n.y.SETTINGS),e.market.waitForData(l.P)]).then((([e,t])=>{this.data=t;const i=t.onChanged((()=>this.update(t)));i.cancel();const n=e=>{e?(window.addEventListener("pointerdown",this.onPointerDown),i.renew()):(window.removeEventListener("pointerdown",this.onPointerDown),i.cancel(),this.draw.toggleAll(!1))};e.registerMenuEntry({header:"Raycaster",setting:"raycasterHitDebugging",initialValue:()=>!1,onChange:e=>{n(e)},urlParam:!0}),e.registerMenuEntry({header:"Raycaster",setting:"raycasterHitClass",initialValue:()=>this.showClass,onChange:e=>{this.showClass=e},urlParam:!0}),e.registerMenuEntry({header:"Raycaster",setting:"raycasterHitName",initialValue:()=>this.showName,onChange:e=>{this.showName=e},urlParam:!0}),e.registerMenuEntry({header:"Raycaster",setting:"raycasterHitNormal",initialValue:()=>this.showNormal,onChange:e=>{this.showNormal=e},urlParam:!0}),e.registerMenuEntry({header:"Raycaster",setting:"raycasterHitBounds",initialValue:()=>this.showBounds,onChange:e=>{this.showBounds=e},urlParam:!0})}))}get draw(){return this._draw||(this._draw=new r.M({background:!1,color:"red"}),this.engine.getModuleBySymbol(n.y.WEBGL_RENDERER).then((e=>this._draw.addToScene(e.getScene())))),this._draw}update(e){const t=this.engine.market.tryGetData(c.M);this.showNormal&&this.drawRaycastHitNormal(e.hit),this.showBounds&&this.drawRaycastHitBounds(e.hit),this.drawRaycastObjectInfo(e.hit,t,this.showClass,this.showName)}}function f(e){new m(e)}},45053:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>c});var n=i(69170),s=i(81396),r=i(3968),o=i(96666),a=i(51524);const h="Snapping";async function c(e){const[t,i,c]=await Promise.all([e.getModuleBySymbol(n.y.SETTINGS),await e.getModuleBySymbol(n.y.RAYCASTER),e.getModuleBySymbol(n.y.WEBGL_RENDERER)]),l=i.snapping,u=c.getScene().scene;t.registerMenuEntry({header:h,setting:"snappingMaxLOD",initialValue:()=>a.t.snappingMaxLOD,onChange:e=>{a.t.snappingMaxLOD=e},urlParam:!0,rangePrecision:0,range:[0,3]}),function(e,t,i){const n=new s.BufferGeometry,o=new s.LineSegments(n,new s.LineBasicMaterial({vertexColors:!0}));o.frustumCulled=!1;const a=new s.SphereGeometry(.02,5,5);let c;const l=[16711680,65280,255,16777215],u=new s.Color,p=(new s.Matrix4).identity(),d=new s.Group;let g;function m(){const e=[],i=[],h=[],g=[];t.forEachSnapFeature((t=>{var n,s,o;if(u.setHex(l[(null===(o=null===(s=null===(n=t.meta)||void 0===n?void 0:n.tile)||void 0===s?void 0:s.extras)||void 0===o?void 0:o.level)||0]),t instanceof r.FM){const{start:n,end:s}=t;e.push(n.x,n.y,n.z,s.x,s.y,s.z),i.push(u.r,u.g,u.b,u.r,u.g,u.b)}else t instanceof r.UQ&&(h.push(t.x,t.y,t.z),g.push(u.r,u.g,u.b))}),!0),n.dispose(),n.setAttribute("position",new s.Float32BufferAttribute(e,3)),n.setAttribute("color",new s.Float32BufferAttribute(i,3)),c&&3*c.count===h.length||(c&&(d.remove(c),null==c||c.dispose()),c=new s.InstancedMesh(a,new s.MeshBasicMaterial,h.length/3));for(let e=0;e<h.length;e+=3)c.setMatrixAt(e/3,p.setPosition(h[e],h[e+1],h[e+2])),c.setColorAt(e/3,u.setRGB(g[e],g[e+1],g[e+2]));d.add(o,c)}e.registerMenuEntry({header:h,setting:"Show Snapping Features",initialValue:()=>!1,onChange(e){e?(i.add(d),g=setInterval(m,300)):(null==c||c.dispose(),a.dispose(),n.dispose(),i.remove(d),clearInterval(g))}})}(t,l,u),function(e,t,i,n){const r=[];let a,c;function l(){c||(c=new s.Mesh(new s.BufferGeometry,new s.MeshBasicMaterial({vertexColors:!0})),c.frustumCulled=!1,i.add(c));const e=[],t=[];for(const i of r){let n=0;for(const s of i.surfaces){const i=s.area>.1,r=Math.sin(n++)/2+.5,o=i?0:.2+.8*r,a=i?.2+.8*r:0,h=0;for(const i of s.faces){const n=i.va.vector,s=i.vb.vector,r=i.vc.vector;e.push(n.x,n.y,n.z),e.push(s.x,s.y,s.z),e.push(r.x,r.y,r.z),t.push(o,a,h,o,a,h,o,a,h)}}}c.geometry.dispose(),c.geometry.setAttribute("position",new s.Float32BufferAttribute(e,3)),c.geometry.setAttribute("color",new s.Float32BufferAttribute(t,3))}function u(e){r.push(e.edgeFinder)}[{header:h,setting:"Collect Snapping Surfaces",initialValue:()=>!1,onChange(e){e?n.subscribe(o.x,u):(n.unsubscribe(o.x,u),r.length=0)}},{header:"Snapping",setting:"Show Snapping Surfaces",initialValue:()=>!1,onChange(e){clearInterval(a),e?a=setInterval((()=>{t.preloadMeshSnapping(),l()}),1e3):c&&(c.geometry.dispose(),i.remove(c),c=null)}}].forEach((t=>e.registerMenuEntry(t)))}(t,l,u,e)}},41036:(e,t,i)=>{"use strict";i.r(t),i.d(t,{PanoPreloadVisualizer:()=>b,default:()=>v});var n=i(97998),s=i(69170),r=i(17798),o=i(48917),a=i(9037),h=i(85992),c=i(53954),l=i(48176),u=i(23254),p=i(63252),d=i(81396),g=i(90304),m=i(12039),f=i(67944),w=i(64918);const y=new n.Z("previs");class b{constructor(e,t,i){this.engine=e,this.downloadDescriptorGetter=t,this.prioritizer=i,this.allPreloadedSweeps=new Set,this.active=!1,this.freezeCameraRotation=!1,this.sweepIndex=50,this.useCurrentCriteria=!0,this.showPreloadIds=!0,this.visualTour=!1,this.showSweepLabels=!1,this.criteria=new l.I6(null,new d.Vector3,new d.Vector3),this.draw=new r.M,this.engine.getModuleBySymbol(s.y.WEBGL_RENDERER).then((e=>this.draw.addToScene(e.getScene()))),this.engine.market.waitForData(h.P).then((e=>{this.subscription=e.onChanged((()=>this.update(this.draw))),this.subscription.cancel()}));const n=this.engine.market.tryGetData(c.Z);if(n){this.sweepData=n;const e=n.getSweepList(),t=new o.Z((e=>e.id));for(let i of e)i.isObservableProxy&&(i=(new p.ZP).copy(i)),t.add(i);this.sweepMap=t}this.engine.getModuleBySymbol(s.y.SETTINGS).then((e=>{const t="Pano Preload",i=[{header:t,setting:"ShowVis",initialValue:()=>this.active,onChange:e=>this.toggle(e)},{header:t,setting:"Use Camera",initialValue:()=>this.useCurrentCriteria,onChange:e=>{this.useCurrentCriteria=e,this.update(this.draw)}},{header:t,setting:"Freeze Rotation",initialValue:()=>this.freezeCameraRotation,onChange:e=>{this.freezeCameraRotation=e,this.update(this.draw)}},{header:t,setting:"Show preload ids",initialValue:()=>this.showPreloadIds,onChange:e=>{this.showPreloadIds=e,this.update(this.draw)}},{header:t,setting:"Visual tour",initialValue:()=>this.visualTour,onChange:e=>{this.visualTour=e,this.update(this.draw)}},{header:t,setting:"Pano labels",initialValue:()=>this.showSweepLabels,onChange:e=>{this.showSweepLabels=e,this.update(this.draw)}},{header:t,setting:"Override Sweep",initialValue:()=>0,onChange:e=>this.updateSweepIndex(e),range:[0,this.sweepMap.count()]}];e.registerMenuButton({header:"Pano Preload tour",buttonName:"Tour",callback:()=>{this.activateTourMode()}}),i.forEach((t=>e.registerMenuEntry(t)))}))}updateSweepIndex(e){const t=Math.round(e);this.sweepIndex=t,this.update(this.draw)}toggle(e){this.active!==e&&(e&&this.subscription.renew(),e||(this.subscription.cancel(),this.draw.toggleAll(!1)),this.active=e)}update(e){const t=this.engine.market.tryGetData(c.Z),i=this.engine.market.tryGetData(a.M),n=this.engine.market.tryGetData(u.O);if(!(e&&t&&i&&n))return;if(!this.active||!this.sweepMap)return;if(this.tourMode&&!this.visualTour)return;const s=t.getSweepList(),r=this.useCurrentCriteria?this.prioritizer.priorityCriteria:Object.assign({},this.criteria);if(this.useCurrentCriteria){if(this.freezeCameraRotation){if(!r.sweep)return;r.cameraPosition.copy(r.sweep.position),r.cameraRot.copy(this.lastCriteria.cameraRot),r.cameraDir.copy(g.f.FORWARD).applyQuaternion(this.lastCriteria.cameraRot)}}else if(r.sweep=this.sweepData.getSweepByIndex(this.sweepIndex)||null,!this.freezeCameraRotation){if(!r.sweep)return;r.cameraPosition.copy(r.sweep.position),r.cameraRot.copy(i.pose.rotation),r.cameraDir.copy(g.f.FORWARD).applyQuaternion(r.cameraRot)}if(this.lastCriteria=Object.assign({},r),!r.sweep)return;this.tourMode||this.wipePreloadedData();const o=[];this.prioritizer.priorityCriteria=r,this.prioritizer.filterAndPrioritize(o,this.sweepMap,this.downloadDescriptorGetter);const h=new Set;let l="";for(const e of o)e&&e.sweep&&(h.has(e.sweep.id)||(h.add(e.sweep.id),l+=`${e.sweep.index}, `),this.allPreloadedSweeps.has(e.sweep.id)||this.allPreloadedSweeps.add(e.sweep.id));const p=new d.Vector3(0,0,-1.5).applyQuaternion(i.pose.rotation),m=(new d.Vector3).copy(i.pose.position).add(p),f=`Current Pano: ${r.sweep.index}\n ${this.showPreloadIds?`Panos: ${l}`:""}\n Preload Count (this pano): ${h.size}\n Total Preloaded: ${this.allPreloadedSweeps.size}`,w=e.label("infoLabel",f,m,.1);if(w.lookAt(i.pose.position),w.setPosition(m),w.text=f,this.drawSweepSpheres(h,r),this.showSweepLabels)for(const t of s){const n=`${t.index}`,s=e.label(t.id,n,t.position,.1);s.text=n,s.setColorHex(16711680),s.lookAt(i.pose.position)}}drawSweepSpheres(e,t){const i=t.sweep;if(!i)return;this.draw.toggleAll(!1);const n=(new d.Vector3).copy(i.position);n.y+=-.5;for(const t of e){const e=this.sweepData.getSweep(t),s=i===e,r=s?"green":"white",o=(new d.Vector3).copy(e.position);if(o.y+=-.5,this.draw.sphere(e.id+"sphere"+(s&&"source"),{color:r,opacity:1}).update(o,.2).toggle(!0),!s){const t=this.draw.line(`${e.id}-${i.id}`,"white",.05);t.updatePositions(o,n),t.toggle(!0)}}}activateTourMode(){this.tourMode=!0;const e={},t=Math.round(this.sweepIndex),i=this.sweepData.getSweepByIndex(t);i&&this.engine.commandBinder.issueCommand(new m.ju({sweep:i.id})).then((()=>{this.wipePreloadedData(),this.allPreloadedSweeps.clear();const t=this.sweepData.getSweepList(),n=Math.round(.05*t.length);i&&this.tourStep(i,e,n)}))}tourStep(e,t,i,n=0,s=""){const r=e,o=this.sweepData.getSweepList();let a=e;if(!r||r.neighbours.length<=0)return;t[r.id]=!0,s+=`Sweep: ${r.index} Loaded: ${this.allPreloadedSweeps.size}\n`;let h=0;for(;h<o.length;){const e=(r.index+1+h)%o.length,i=this.sweepData.getSweepByIndex(e);if(h++,i&&(a=i,!t[a.id]&&a.id!==r.id&&a))break}if(++n<=i)if(this.visualTour)this.engine.commandBinder.issueCommand(new m.ju({sweep:r.id,rotation:(0,f.n0)(r.position,a.position),transition:w.n.Interpolate})).then((()=>{setTimeout((()=>{this.tourStep(a,t,i,n,s)}),500)}));else{const e=(0,f.n0)(r.position,a.position),o=(new d.Vector3).copy(g.f.FORWARD).applyQuaternion(e),h=new l.I6(r,r.position,o),c=[];this.prioritizer.priorityCriteria=h,this.prioritizer.filterAndPrioritize(c,this.sweepMap,this.downloadDescriptorGetter);this.queueToPanoSet(c).forEach((e=>this.allPreloadedSweeps.add(e))),this.tourStep(a,t,i,n,s)}else y.info(`TOUR END\n Sweeps visited: ${n}\n Visual: ${this.visualTour}\n Sweeps preloaded: ${this.allPreloadedSweeps.size}`),y.info(`TOUR INFO\n ${s}`),this.tourMode=!1}queueToPanoSet(e){const t=new Set;for(const i of e)i&&i.sweep&&(t.has(i.sweep.id)||t.add(i.sweep.id));return t}wipePreloadedData(){const e=this.sweepData.getSweepList();for(const t of e)this.downloadDescriptorGetter.deleteAllTileDownloadDescriptors(t.id)}}function v(e){e.getModuleBySymbol(s.y.SWEEP_PANO).then((t=>{const i=t;"tileDownloader"in i&&new b(e,i.tileDownloader,i.tilePrioritizer)}))}},96769:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});var n=i(69170);async function s(e){const[t,i]=await Promise.all([e.getModuleBySymbol(n.y.SETTINGS),e.getModuleBySymbol(n.y.WEBGL_RENDERER)]),s="WebGL Renderer";let r=null;function o(e){i.threeRenderer.forceContextLoss(),setTimeout((()=>{i.threeRenderer.forceContextRestore()}),e)}t.registerMenuButton({header:s,buttonName:"Lose Context for 0.1 sec",callback:()=>{o(100)}}),t.registerMenuButton({header:s,buttonName:"Lose Context for 5 sec",callback:()=>{o(5e3)}}),t.registerMenuEntry({header:s,setting:"autoLoseContext",initialValue:()=>!1,urlParam:!0,onChange(e){if(e){const e=()=>o(100);e(),r=setInterval(e,1e4)}else clearInterval(r)}})}},17798:(e,t,i)=>{"use strict";i.d(t,{M:()=>x});var n=i(90304),s=i(81396);class r{constructor(e,t,i){return this.thisType=e,this.container=t,this.mesh=i(),this.mesh.name=`${e.name}`,this.material=this.mesh.material,this.geometry=this.mesh.geometry,this}opacity(e){return this.material.opacity=e,this}}function o(e,t){t.forEach((t=>{Object.getOwnPropertyNames(t.prototype).forEach((i=>{e.prototype[i]=t.prototype[i]}))}))}class a{constructor(){this.animationInit=!1}initAnimationMixin(e,t){this.animState={scale:t?t.clone():new s.Vector3(1,1,1),position:e?e.clone():new s.Vector3,target:{scale:t?t.clone():new s.Vector3(1,1,1),position:e?e.clone():new s.Vector3},temp:{pos:new s.Vector3,scale:new s.Vector3,makeScale:new s.Vector3}},this.animationInit=!0}update(e,t){if(!this.animationInit)throw Error(`${a.name} call this.initAnimationMixin() in ${this.style} constructor to enable update, because I said so.`);this.mesh.position.copy(e);const i=this.vector3From(t);return i.equals(this.mesh.scale)||this.mesh.scale.copy(i),this.animState.scale.copy(this.mesh.scale),this.animState.position.copy(this.mesh.position),this.mesh.updateMatrixWorld(!0),this}animate(e,t,i){if(!this.animationInit)throw Error(`${a.name} call this.initAnimationMixin() in ${this.style} constructor to enable animations, because I said so.`);const n=this.vector3From(i);this.animState.target.scale.copy(n),this.animState.target.position.copy(t);const s=this.animState.temp.pos.copy(this.mesh.position).lerp(t,e),r=this.animState.temp.scale.copy(this.mesh.scale).lerp(n,e);return this.update(s,r),this}vector3From(e){if(e instanceof s.Vector3)return this.animState.temp.makeScale.copy(e).clamp(c,l);if("number"==typeof e)return this.animState.temp.makeScale.set(e,e,e).clamp(c,l);throw Error("Unexpected scale input")}}const h=.01,c=new s.Vector3(h,h,h),l=new s.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE);class u{toggle(e){return e?this.container.add(this.mesh):this.container.remove(this.mesh),this.isVisible=e,this}}class p extends r{constructor(e,t){super(p,e,(()=>new s.Mesh(new s.BoxGeometry(1,1,1),new s.MeshBasicMaterial(t)))),this.container=e,this.style="Box",this.mesh.frustumCulled=!1,this.geometry.computeBoundingBox(),this.initAnimationMixin()}}o(p,[a,u]);class d extends r{constructor(e,t){super(d,e,(()=>{const e=new s.Box3Helper((new s.Box3).setFromCenterAndSize(new s.Vector3,new s.Vector3(1,1,1)));return new s.LineSegments(e.geometry,e.material)})),this.container=e,this.style="BoxWireframeMesh",t&&this.material.setValues(t),this.mesh.frustumCulled=!1,this.initAnimationMixin()}}o(d,[u,a]);class g extends r{constructor(e,t){super(g,e,(()=>new s.CameraHelper(t))),this.container=e,this.style="CameraHelper",this.updateCamera(t)}updateCamera(e){return this.mesh.camera.copy(this.camWithSaneFarDistance(e)),this.mesh.update(),this}camWithSaneFarDistance(e){const t=e.clone();return t.far=5,t}}o(g,[u]);class m extends r{constructor(e,t){super(m,e,(()=>new s.Mesh(new s.PlaneGeometry(1),new s.MeshBasicMaterial(t)))),this.container=e,this.style="PlaneMesh",this.radius=1;const i=new s.Matrix4;i.makeRotationFromEuler(new s.Euler(-Math.PI/2,0,0,"XYZ")),this.geometry.applyMatrix4(i),this.mesh.frustumCulled=!1,this.initAnimationMixin()}}o(m,[u,a]);class f extends r{constructor(e,t){super(f,e,(()=>new s.Mesh(new s.SphereGeometry(1),new s.MeshBasicMaterial(t)))),this.container=e,this.style="SphereMesh",this.radius=1,this.mesh.frustumCulled=!1,this.initAnimationMixin()}}o(f,[u,a]);var w=i(15462);class y extends r{constructor(e,t){return super(y,e,(()=>new s.Line(new s.BufferGeometry,new s.LineBasicMaterial(Object.assign({color:w.I.MP_BRAND,opacity:1,transparent:!0},t))))),this.container=e,this.positionsBuffer=new s.BufferAttribute(new Float32Array(150),3),this.point=new s.Vector3,this.points={start:new s.Vector3,control:new s.Vector3,end:new s.Vector3},this.updatePoints=(e,t,i)=>{this.points.start.copy(this.curve.v0.copy(e)),this.points.control.copy(this.curve.v1.copy(t)),this.points.end.copy(this.curve.v2.copy(i));for(let e=0;e<50;e++){const t=e/49;this.curve.getPoint(t,this.point),this.positionsBuffer.setXYZ(e,this.point.x,this.point.y,this.point.z)}return this.positionsBuffer.needsUpdate=!0,this},this.animatePoints=(e,t,i,n)=>{const{start:s,control:r,end:o}=this.points;return s.equals(r)&&s.equals(o)?(this.updatePoints(t,i,n),this):(s.lerp(t,e),r.lerp(i,e),o.lerp(n,e),this.updatePoints(s,r,o),this)},this.mesh.frustumCulled=!1,this.curve=new s.QuadraticBezierCurve3(new s.Vector3,new s.Vector3,new s.Vector3),this.geometry.setAttribute("position",this.positionsBuffer),this.geometry.computeBoundingBox(),this}}o(y,[u]);var b=i(78449),v=i(85255),S=i(48786);class x{constructor(e,t={}){this.cache={},this.helperCache={},this.style={},this.toggle=e=>(this.options.scene&&(e?this.options.scene.add(this.options.container):this.options.scene.remove(this.options.container)),this),this.box=(e,t)=>(this.cache[B.box][e]||(this.cache[B.box][e]=new p(this.options.container,t).toggle(!0)),this.cache[B.box][e]),this.boxWire=(e,t)=>(this.cache[B.boxWire][e]||(this.cache[B.boxWire][e]=new d(this.options.container,t).toggle(!0)),this.cache[B.boxWire][e]),this.cam=(e,t)=>(this.cache[B.cameraHelper][e]||(this.cache[B.cameraHelper][e]=new g(this.options.container,t).toggle(!0)),this.cache[B.cameraHelper][e]),this.label=(e,t,i,n=.25)=>{if(!this.labelCreator){const{color:e,backgroundColor:t,backgroundOpacity:i,background:n}=this.options;this.labelCreator=new b.uc(Object.assign({color:e,background:n,backgroundColor:t,backgroundOpacity:i,wordWrapWidth:650},this.style))}if(!this.cache[B.label][e]){const s=this.labelCreator.createLabel();this.cache[B.label][e]=s,s.position.copy(i),s.text=t,s.scaleFactor=n,this.options.container.add(s)}return this.cache[B.label][e]},this.line=(e,t=this.options.lineColor,i=this.options.linewidth)=>{if(!this.cache[B.line][e]){const r=(0,v.makeLineMaterial)("string"==typeof t?new s.Color(t).getHex():t.getHex(),!1,{linewidth:i}),o={onShow:()=>this.options.container.add(...a.children),onHide:()=>this.options.container.remove(...a.children)},a=new S.c(n.f.ZERO.clone(),n.f.ZERO.clone(),r,o);a.updateResolution(window.innerWidth,window.innerHeight).opacity(1).toggle(!0),this.cache[B.line][e]=a}return this.cache[B.line][e]},this.plane=(e,t)=>(this.cache[B.plane][e]||(this.cache[B.plane][e]=new m(this.options.container,t).toggle(!0)),this.cache[B.plane][e]),this.setStyle=e=>{this.style=e},this.sphere=(e,t)=>(this.cache[B.sphere][e]||(this.cache[B.sphere][e]=new f(this.options.container,t).toggle(!0)),this.cache[B.sphere][e]),this.triangle=(e,t,i,n,r)=>{if(!this.cache[B.triangle][e]){const o=new Float32Array(9);t.toArray(o,0),i.toArray(o,3),n.toArray(o,6);const a=new s.BufferGeometry;a.setAttribute("position",new s.BufferAttribute(o,3));const h=new s.Mesh(a,new s.MeshBasicMaterial(r));this.options.container.add(h),this.cache[B.triangle][e]=new f(this.options.container,r).toggle(!0)}return this.cache[B.triangle][e]},this.spline=(e,t)=>(this.cache[B.spline][e]||(this.cache[B.spline][e]=new y(this.options.container,t).toggle(!0)),this.cache[B.spline][e]),this.randomColor=e=>{if(void 0!==e){if(!this.helperCache[A.color][e]){const t=new s.Color(M(),M(),M());this.helperCache[A.color][e]=t}return this.helperCache[A.color][e]}return new s.Color(M(),M(),M())},this.randomVector3=e=>{if(void 0!==e){if(!this.helperCache[A.vector3][e]){const t=new s.Vector3(2*(.5-M()),2*(.5-M()),2*(.5-M()));this.helperCache[A.vector3][e]=t}return this.helperCache[A.vector3][e]}return new s.Vector3(2*(.5-M()),2*(.5-M()),2*(.5-M()))},this.toggleAll=e=>{for(const t of Object.values(B)){const i=Object.values(this.cache[t]);for(const t of i)"toggle"in t&&t.toggle(e)}return this},this.options=Object.assign(Object.assign({},C),e),this.style=t;for(const e of Object.values(B))this.cache[e]={};for(const e of Object.values(A))this.helperCache[e]={};this.options.scene&&this.toggle(!0)}async addToScene(e){return this.options.scene=e,this.toggle(!0),this}}const M=()=>Math.random(),C={lineColor:"white",linewidth:2,color:"white",background:!0,backgroundColor:"white",backgroundOpacity:.5,container:new s.Group};var B,A;!function(e){e.box="box",e.boxWire="boxWire",e.label="label",e.line="line",e.plane="plane",e.sphere="sphere",e.spline="spline",e.triangle="triangle",e.cameraHelper="cameraHelper"}(B||(B={})),function(e){e.color="color",e.vector3="vector3"}(A||(A={}))},69984:(e,t,i)=>{"use strict";i.d(t,{D5:()=>c,Ex:()=>l,G1:()=>a,rn:()=>h});var n=i(81396),s=i(39880);const r=()=>Math.random(),o={},a=(e,t=r())=>(o[t]||(o[t]=new n.Vector4(r(),r(),r(),e)),o[t]),h=()=>new n.Color(r(),r(),r()),c=e=>e instanceof Object&&"r"in e&&"g"in e&&"b"in e;function l(e){return`#${(0,s.Q_)(255*e.r,2,"0",16)}${(0,s.Q_)(255*e.g,2,"0",16)}${(0,s.Q_)(255*e.b,2,"0",16)}`}},12739:e=>{var t=/\n/,i="\n",n=/\s/;function s(e,t,i,n){var s=e.indexOf(t,i);return-1===s||s>n?n:s}function r(e){return n.test(e)}function o(e,t,i,n){return{start:t,end:t+Math.min(n,i-t)}}e.exports=function(t,i){return e.exports.lines(t,i).map((function(e){return t.substring(e.start,e.end)})).join("\n")},e.exports.lines=function(e,n){if(0===(n=n||{}).width&&"nowrap"!==n.mode)return[];e=e||"";var a="number"==typeof n.width?n.width:Number.MAX_VALUE,h=Math.max(0,n.start||0),c="number"==typeof n.end?n.end:e.length,l=n.mode,u=n.measure||o;return"pre"===l?function(e,i,n,s,r){for(var o=[],a=n,h=n;h<s&&h<i.length;h++){var c=i.charAt(h),l=t.test(c);if(l||h===s-1){var u=e(i,a,l?h:h+1,r);o.push(u),a=h+1}}return o}(u,e,h,c,a):function(e,t,n,o,a,h){var c=[],l=a;"nowrap"===h&&(l=Number.MAX_VALUE);for(;n<o&&n<t.length;){for(var u=s(t,i,n,o);n<u&&r(t.charAt(n));)n++;var p=e(t,n,u,l),d=n+(p.end-p.start),g=d+i.length;if(d<u){for(;d>n&&!r(t.charAt(d));)d--;if(d===n)g>n+i.length&&g--,d=g;else for(g=d;d>n&&r(t.charAt(d-i.length));)d--}if(d>=n){var m=e(t,n,d,l);c.push(m)}n=g}return c}(u,e,h,c,a,l)}},47529:e=>{e.exports=function(){for(var e={},i=0;i<arguments.length;i++){var n=arguments[i];for(var s in n)t.call(n,s)&&(e[s]=n[s])}return e};var t=Object.prototype.hasOwnProperty}}]);
@@ -0,0 +1,27 @@
1
+ /*!
2
+ * Determine if an object is a Buffer
3
+ *
4
+ * @author Feross Aboukhadijeh <https://feross.org>
5
+ * @license MIT
6
+ */
7
+
8
+ /*!
9
+ * Matterport Showcase SDK
10
+ *
11
+ * © 2022 Matterport, Inc. All rights reserved.
12
+ *
13
+ * Matterport Showcase SDK ("Showcase SDK") must be used according to
14
+ * the Matterport Terms of Service located at https://matterport.com/terms-of-use, the Platform Subscription Agreement ("PSA") available at https://matterport.com/legal/platform-subscription-agreement and the SDK License terms included in the PSA ("SDK License"). Any use of the Showcase SDK requires a current active Matterport account and associated developer key.
15
+ *
16
+ * -------------------------------------------------------------------------------
17
+ *
18
+ * Redistribution and use in source and binary forms, without modification, is permitted in accordance with the SDK License provided that the following conditions are met:
19
+ *
20
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
21
+ * * Neither the name of Matterport nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
22
+ *
23
+ * THE SHOWCASE SDK IS PROVIDED BY MATTERPORT AS THE COPYRIGHT HOLDER AND, IF APPLICABLE, ITS CONTRIBUTORS "AS IS" AND WITHOUT WARRANTIES OF ANY KIND. TO THE FULLEST EXTENT PERMISSIBLE PURSUANT TO APPLICABLE LAW, MATTERPORT DISCLAIMS, ON BEHALF OF ITSELF AND ITS AFFILIATES AND LICENSORS, ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. MATTERPORT DOES NOT WARRANT THAT THE AVAILABILITY OF THE SHOWCASE SDK WILL BE UNINTERRUPTED OR ERROR-FREE, THAT DEFECTS WILL BE CORRECTED, OR THAT THE SHOWCASE SDK WILL BE FREE OF VIRUSES OR OTHER HARMFUL COMPONENTS. MATTERPORT DOES NOT MAKE ANY REPRESENTATIONS OR WARRANTIES REGARDING THE USE OR THE RESULTS OF THE USE OF THE SHOWCASE SDK OR FUNCTIONS ON THE SHOWCASE SDK IN TERMS OF THEIR CORRECTNESS, ACCURACY, RELIABILITY, RESULTS TO BE ACHIEVED, OR OTHERWISE. APPLICABLE LAW MAY NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SOME OR ALL OF THE FOREGOING DISCLAIMERS MAY NOT APPLY TO YOU.
24
+ *
25
+ * TO THE EXTENT PERMITTED UNDER APPLICABLE LAW UNDER NO CIRCUMSTANCES, INCLUDING, BUT NOT LIMITED TO, NEGLIGENCE, SHALL MATTERPORT OR ITS AFFILIATES OR LICENSORS BE LIABLE FOR ANY CONSEQUENTIAL, EXEMPLARY, PUNITIVE, SPECIAL, INCIDENTAL OR OTHER INDIRECT DAMAGES, EVEN IF MATTERPORT OR A MATTERPORT AUTHORIZED REPRESENTATIVE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. APPLICABLE LAW MAY NOT ALLOW SOME OR ALL OF THIS LIMITATION OF LIABILITY, SO IT MAY NOT APPLY TO YOU.
26
+ *
27
+ */