@plurid/plurid-react 0.0.0-21 → 0.0.0-24

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 (284) hide show
  1. package/distribution/components/links/Link/components/Preview/index.d.ts +4 -1
  2. package/distribution/components/links/Link/index.d.ts +9 -7
  3. package/distribution/components/links/RouterLink/index.d.ts +3 -0
  4. package/distribution/components/links/RouterLink/styled.d.ts +6 -2
  5. package/distribution/components/structural/Plane/components/PlaneBridge/index.d.ts +1 -0
  6. package/distribution/components/structural/Plane/components/PlaneBridge/styled.d.ts +2 -0
  7. package/distribution/components/structural/Plane/components/PlaneContent/index.d.ts +1 -1
  8. package/distribution/components/structural/Plane/components/PlaneControls/components/ControlIsolate/index.d.ts +9 -0
  9. package/distribution/components/structural/Plane/components/PlaneControls/components/ControlRefresh/index.d.ts +9 -0
  10. package/distribution/components/structural/Plane/components/PlaneControls/index.d.ts +14 -4
  11. package/distribution/components/structural/Plane/components/PlaneControls/styled.d.ts +1 -0
  12. package/distribution/components/structural/Plane/index.d.ts +8 -4
  13. package/distribution/components/structural/Plane/styled.d.ts +1 -0
  14. package/distribution/components/structural/Root/index.d.ts +2 -1
  15. package/distribution/components/structural/Roots/index.d.ts +1 -1
  16. package/distribution/components/utilities/ApplicationConfigurator/index.d.ts +2 -1
  17. package/distribution/components/utilities/Toolbar/General/components/MenuMore/components/Global/index.d.ts +6 -5
  18. package/distribution/components/utilities/Toolbar/General/components/MenuMore/components/Space/index.d.ts +6 -5
  19. package/distribution/components/utilities/Toolbar/General/components/MenuMore/components/Technical/index.d.ts +2 -1
  20. package/distribution/components/utilities/Toolbar/General/components/MenuMore/components/Toolbar/index.d.ts +6 -5
  21. package/distribution/components/utilities/Toolbar/General/components/MenuMore/components/Transform/index.d.ts +4 -3
  22. package/distribution/components/utilities/Toolbar/General/components/MenuMore/components/Viewcube/index.d.ts +5 -4
  23. package/distribution/components/utilities/Toolbar/General/components/MenuMore/index.d.ts +3 -2
  24. package/distribution/components/utilities/Toolbar/General/components/MenuUniverses/index.d.ts +2 -1
  25. package/distribution/components/utilities/Toolbar/General/components/ToolbarRotate/index.d.ts +6 -5
  26. package/distribution/components/utilities/Toolbar/General/components/ToolbarScale/index.d.ts +4 -3
  27. package/distribution/components/utilities/Toolbar/General/components/ToolbarTranslate/index.d.ts +8 -5
  28. package/distribution/components/utilities/Toolbar/General/components/TransformArrow/data.d.ts +7 -0
  29. package/distribution/components/utilities/Toolbar/General/components/TransformArrow/index.d.ts +3 -1
  30. package/distribution/components/utilities/Toolbar/General/index.d.ts +4 -4
  31. package/distribution/components/utilities/UniverseExplorer/index.d.ts +1 -1
  32. package/distribution/components/utilities/Viewcube/components/ViewcubeFace/data.d.ts +391 -0
  33. package/distribution/components/utilities/Viewcube/components/ViewcubeFace/index.d.ts +5 -4
  34. package/distribution/components/utilities/Viewcube/components/ViewcubeTransformAreas/TransformArea/data.d.ts +5 -0
  35. package/distribution/components/utilities/Viewcube/components/ViewcubeTransformAreas/TransformArea/index.d.ts +11 -0
  36. package/distribution/components/utilities/Viewcube/components/ViewcubeTransformAreas/TransformArea/styled.d.ts +17 -0
  37. package/distribution/components/utilities/Viewcube/components/ViewcubeTransformAreas/index.d.ts +13 -0
  38. package/distribution/components/utilities/Viewcube/components/ViewcubeTransformAreas/styled.d.ts +13 -0
  39. package/distribution/components/utilities/Viewcube/index.d.ts +6 -5
  40. package/distribution/components/virtuals/List/index.d.ts +1 -1
  41. package/distribution/containers/Application/View/Container/index.d.ts +5 -0
  42. package/distribution/containers/Application/View/index.d.ts +33 -29
  43. package/distribution/containers/Application/View/styled.d.ts +6 -1
  44. package/distribution/containers/RouterBrowser/index.d.ts +3 -1
  45. package/distribution/containers/RouterStatic/index.d.ts +1 -1
  46. package/distribution/data/interfaces/index.d.ts +1 -0
  47. package/distribution/data/interfaces/utility.d.ts +3 -0
  48. package/distribution/index.d.ts +42 -6
  49. package/distribution/index.es.js +1769 -2432
  50. package/distribution/index.es.js.map +1 -1
  51. package/distribution/index.js +1816 -2481
  52. package/distribution/index.js.map +1 -1
  53. package/distribution/index.min.js +558 -526
  54. package/distribution/index.min.js.map +1 -1
  55. package/distribution/services/engine/index.d.ts +22 -0
  56. package/distribution/services/logic/animation/index.d.ts +16 -0
  57. package/distribution/services/logic/computing/index.d.ts +14 -7
  58. package/distribution/services/logic/router/index.d.ts +6 -17
  59. package/distribution/services/logic/shortcuts/index.d.ts +14 -9
  60. package/distribution/services/logic/shortcuts/logic.d.ts +6 -0
  61. package/distribution/services/logic/state/index.d.ts +3 -0
  62. package/distribution/services/logic/transform/index.d.ts +2 -1
  63. package/distribution/services/state/actions/index.d.ts +223 -6
  64. package/distribution/services/state/hooks/index.d.ts +4 -0
  65. package/distribution/services/state/modules/configuration/index.d.ts +66 -7
  66. package/distribution/services/state/modules/general/index.d.ts +10 -7
  67. package/distribution/services/state/modules/index.d.ts +1 -0
  68. package/distribution/services/state/modules/shortcuts/index.d.ts +16 -7
  69. package/distribution/services/state/modules/space/index.d.ts +126 -7
  70. package/distribution/services/state/modules/space/selectors.d.ts +29 -0
  71. package/distribution/services/state/modules/space/types.d.ts +42 -0
  72. package/distribution/services/state/modules/themes/index.d.ts +22 -7
  73. package/distribution/services/state/modules/ui/index.d.ts +16 -7
  74. package/distribution/services/state/selectors/index.d.ts +47 -182
  75. package/distribution/services/state/store/development/index.d.ts +3 -3
  76. package/distribution/services/state/store/index.d.ts +22 -18
  77. package/distribution/services/state/store/production/index.d.ts +3 -3
  78. package/distribution/services/state/store/reducer/index.d.ts +10 -0
  79. package/package.json +32 -33
  80. package/distribution/containers/Application/View/ErrorView/index.d.ts +0 -6
  81. package/distribution/containers/Application/View/ErrorView/styled.d.ts +0 -1
  82. package/distribution/containers/Application/View/PlanesView/index.d.ts +0 -10
  83. package/distribution/containers/Application/View/index-old.d.ts +0 -1
  84. package/distribution/containers/Application/View/logic.d.ts +0 -4
  85. package/distribution/distribution/components/links/Link/components/Preview/index.d.ts +0 -16
  86. package/distribution/distribution/components/links/Link/components/Preview/styled.d.ts +0 -7
  87. package/distribution/distribution/components/links/Link/index.d.ts +0 -22
  88. package/distribution/distribution/components/links/Link/styled.d.ts +0 -7
  89. package/distribution/distribution/components/links/RouterLink/index.d.ts +0 -17
  90. package/distribution/distribution/components/links/RouterLink/styled.d.ts +0 -2
  91. package/distribution/distribution/components/planes/ExternalPlane/index.d.ts +0 -14
  92. package/distribution/distribution/components/planes/ExternalPlane/styled.d.ts +0 -5
  93. package/distribution/distribution/components/planes/IframePlane/index.d.ts +0 -14
  94. package/distribution/distribution/components/planes/IframePlane/styled.d.ts +0 -5
  95. package/distribution/distribution/components/structural/Plane/components/PlaneBridge/index.d.ts +0 -16
  96. package/distribution/distribution/components/structural/Plane/components/PlaneBridge/styled.d.ts +0 -7
  97. package/distribution/distribution/components/structural/Plane/components/PlaneContent/index.d.ts +0 -6
  98. package/distribution/distribution/components/structural/Plane/components/PlaneContent/styled.d.ts +0 -1
  99. package/distribution/distribution/components/structural/Plane/components/PlaneControls/components/SearchItem/index.d.ts +0 -19
  100. package/distribution/distribution/components/structural/Plane/components/PlaneControls/components/SearchItem/styled.d.ts +0 -1
  101. package/distribution/distribution/components/structural/Plane/components/PlaneControls/components/SearchList/index.d.ts +0 -18
  102. package/distribution/distribution/components/structural/Plane/components/PlaneControls/components/SearchList/styled.d.ts +0 -2
  103. package/distribution/distribution/components/structural/Plane/components/PlaneControls/index.d.ts +0 -19
  104. package/distribution/distribution/components/structural/Plane/components/PlaneControls/styled.d.ts +0 -10
  105. package/distribution/distribution/components/structural/Plane/components/PlaneDebugger/index.d.ts +0 -13
  106. package/distribution/distribution/components/structural/Plane/components/PlaneDebugger/styled.d.ts +0 -1
  107. package/distribution/distribution/components/structural/Plane/index.d.ts +0 -23
  108. package/distribution/distribution/components/structural/Plane/styled.d.ts +0 -10
  109. package/distribution/distribution/components/structural/Root/index.d.ts +0 -14
  110. package/distribution/distribution/components/structural/Root/styled.d.ts +0 -1
  111. package/distribution/distribution/components/structural/Roots/index.d.ts +0 -18
  112. package/distribution/distribution/components/structural/Roots/styled.d.ts +0 -3
  113. package/distribution/distribution/components/structural/Space/components/SpaceDebugger/index.d.ts +0 -13
  114. package/distribution/distribution/components/structural/Space/components/SpaceDebugger/styled.d.ts +0 -1
  115. package/distribution/distribution/components/structural/Space/index.d.ts +0 -14
  116. package/distribution/distribution/components/structural/Space/styled.d.ts +0 -8
  117. package/distribution/distribution/components/utilities/ApplicationConfigurator/index.d.ts +0 -17
  118. package/distribution/distribution/components/utilities/ApplicationConfigurator/styled.d.ts +0 -1
  119. package/distribution/distribution/components/utilities/ErrorBoundary/index.d.ts +0 -18
  120. package/distribution/distribution/components/utilities/NotFound/index.d.ts +0 -13
  121. package/distribution/distribution/components/utilities/NotFound/styled.d.ts +0 -1
  122. package/distribution/distribution/components/utilities/Origin/index.d.ts +0 -15
  123. package/distribution/distribution/components/utilities/Origin/styled.d.ts +0 -7
  124. package/distribution/distribution/components/utilities/PlaneConfigurator/index.d.ts +0 -13
  125. package/distribution/distribution/components/utilities/PlaneConfigurator/styled.d.ts +0 -1
  126. package/distribution/distribution/components/utilities/Portal/index.d.ts +0 -15
  127. package/distribution/distribution/components/utilities/Toolbar/Button/index.d.ts +0 -15
  128. package/distribution/distribution/components/utilities/Toolbar/Button/styled.d.ts +0 -13
  129. package/distribution/distribution/components/utilities/Toolbar/General/components/Drawer/index.d.ts +0 -18
  130. package/distribution/distribution/components/utilities/Toolbar/General/components/Drawer/styled.d.ts +0 -3
  131. package/distribution/distribution/components/utilities/Toolbar/General/components/MenuMore/components/Global/index.d.ts +0 -21
  132. package/distribution/distribution/components/utilities/Toolbar/General/components/MenuMore/components/Shortcuts/index.d.ts +0 -14
  133. package/distribution/distribution/components/utilities/Toolbar/General/components/MenuMore/components/Space/index.d.ts +0 -20
  134. package/distribution/distribution/components/utilities/Toolbar/General/components/MenuMore/components/Technical/index.d.ts +0 -17
  135. package/distribution/distribution/components/utilities/Toolbar/General/components/MenuMore/components/Toolbar/index.d.ts +0 -22
  136. package/distribution/distribution/components/utilities/Toolbar/General/components/MenuMore/components/Transform/index.d.ts +0 -19
  137. package/distribution/distribution/components/utilities/Toolbar/General/components/MenuMore/components/Viewcube/index.d.ts +0 -20
  138. package/distribution/distribution/components/utilities/Toolbar/General/components/MenuMore/data.d.ts +0 -9
  139. package/distribution/distribution/components/utilities/Toolbar/General/components/MenuMore/index.d.ts +0 -21
  140. package/distribution/distribution/components/utilities/Toolbar/General/components/MenuMore/styled.d.ts +0 -3
  141. package/distribution/distribution/components/utilities/Toolbar/General/components/MenuUniverses/index.d.ts +0 -15
  142. package/distribution/distribution/components/utilities/Toolbar/General/components/MenuUniverses/styled.d.ts +0 -4
  143. package/distribution/distribution/components/utilities/Toolbar/General/components/ToolbarRotate/index.d.ts +0 -23
  144. package/distribution/distribution/components/utilities/Toolbar/General/components/ToolbarRotate/styled.d.ts +0 -1
  145. package/distribution/distribution/components/utilities/Toolbar/General/components/ToolbarScale/index.d.ts +0 -21
  146. package/distribution/distribution/components/utilities/Toolbar/General/components/ToolbarScale/styled.d.ts +0 -1
  147. package/distribution/distribution/components/utilities/Toolbar/General/components/ToolbarTranslate/index.d.ts +0 -23
  148. package/distribution/distribution/components/utilities/Toolbar/General/components/ToolbarTranslate/styled.d.ts +0 -1
  149. package/distribution/distribution/components/utilities/Toolbar/General/components/TransformArrow/index.d.ts +0 -14
  150. package/distribution/distribution/components/utilities/Toolbar/General/components/TransformArrow/styled.d.ts +0 -6
  151. package/distribution/distribution/components/utilities/Toolbar/General/data.d.ts +0 -6
  152. package/distribution/distribution/components/utilities/Toolbar/General/index.d.ts +0 -21
  153. package/distribution/distribution/components/utilities/Toolbar/General/styled.d.ts +0 -29
  154. package/distribution/distribution/components/utilities/UniverseExplorer/index.d.ts +0 -16
  155. package/distribution/distribution/components/utilities/UniverseExplorer/styled.d.ts +0 -2
  156. package/distribution/distribution/components/utilities/Viewcube/components/ViewcubeFace/index.d.ts +0 -26
  157. package/distribution/distribution/components/utilities/Viewcube/components/ViewcubeFace/styled.d.ts +0 -16
  158. package/distribution/distribution/components/utilities/Viewcube/components/ViewcubeModel/index.d.ts +0 -17
  159. package/distribution/distribution/components/utilities/Viewcube/components/ViewcubeModel/styled.d.ts +0 -3
  160. package/distribution/distribution/components/utilities/Viewcube/index.d.ts +0 -22
  161. package/distribution/distribution/components/utilities/Viewcube/styled.d.ts +0 -19
  162. package/distribution/distribution/components/virtuals/List/components/ListItem/index.d.ts +0 -9
  163. package/distribution/distribution/components/virtuals/List/index.d.ts +0 -15
  164. package/distribution/distribution/components/virtuals/List/styled.d.ts +0 -1
  165. package/distribution/distribution/containers/Application/View/ErrorView/index.d.ts +0 -6
  166. package/distribution/distribution/containers/Application/View/ErrorView/styled.d.ts +0 -1
  167. package/distribution/distribution/containers/Application/View/PlanesView/index.d.ts +0 -10
  168. package/distribution/distribution/containers/Application/View/index-old.d.ts +0 -1
  169. package/distribution/distribution/containers/Application/View/index.d.ts +0 -44
  170. package/distribution/distribution/containers/Application/View/logic.d.ts +0 -4
  171. package/distribution/distribution/containers/Application/View/styled.d.ts +0 -3
  172. package/distribution/distribution/containers/Application/index.d.ts +0 -18
  173. package/distribution/distribution/containers/Provider/context.d.ts +0 -4
  174. package/distribution/distribution/containers/Provider/index.d.ts +0 -12
  175. package/distribution/distribution/containers/RouterBrowser/index.d.ts +0 -5
  176. package/distribution/distribution/containers/RouterStatic/index.d.ts +0 -18
  177. package/distribution/distribution/data/constants/index.d.ts +0 -3
  178. package/distribution/distribution/data/interfaces/index.d.ts +0 -19
  179. package/distribution/distribution/index.d.ts +0 -81
  180. package/distribution/distribution/services/context/index.d.ts +0 -5
  181. package/distribution/distribution/services/hooks/event/index.d.ts +0 -4
  182. package/distribution/distribution/services/hooks/index.d.ts +0 -2
  183. package/distribution/distribution/services/hooks/router/index.d.ts +0 -1
  184. package/distribution/distribution/services/logic/computing/index.d.ts +0 -10
  185. package/distribution/distribution/services/logic/router/index.d.ts +0 -51
  186. package/distribution/distribution/services/logic/router/styled.d.ts +0 -5
  187. package/distribution/distribution/services/logic/server/index.d.ts +0 -3
  188. package/distribution/distribution/services/logic/shortcuts/index.d.ts +0 -10
  189. package/distribution/distribution/services/logic/transform/index.d.ts +0 -2
  190. package/distribution/distribution/services/state/actions/index.d.ts +0 -9
  191. package/distribution/distribution/services/state/context/index.d.ts +0 -3
  192. package/distribution/distribution/services/state/global/index.d.ts +0 -6
  193. package/distribution/distribution/services/state/modules/configuration/actions/index.d.ts +0 -28
  194. package/distribution/distribution/services/state/modules/configuration/index.d.ts +0 -7
  195. package/distribution/distribution/services/state/modules/configuration/initial/index.d.ts +0 -3
  196. package/distribution/distribution/services/state/modules/configuration/reducer/index.d.ts +0 -3
  197. package/distribution/distribution/services/state/modules/configuration/resolvers/index.d.ts +0 -27
  198. package/distribution/distribution/services/state/modules/configuration/selectors/index.d.ts +0 -11
  199. package/distribution/distribution/services/state/modules/configuration/types/index.d.ts +0 -136
  200. package/distribution/distribution/services/state/modules/general/actions/index.d.ts +0 -2
  201. package/distribution/distribution/services/state/modules/general/index.d.ts +0 -7
  202. package/distribution/distribution/services/state/modules/general/initial/index.d.ts +0 -3
  203. package/distribution/distribution/services/state/modules/general/reducer/index.d.ts +0 -3
  204. package/distribution/distribution/services/state/modules/general/resolvers/index.d.ts +0 -1
  205. package/distribution/distribution/services/state/modules/general/selectors/index.d.ts +0 -2
  206. package/distribution/distribution/services/state/modules/general/types/index.d.ts +0 -3
  207. package/distribution/distribution/services/state/modules/index.d.ts +0 -15
  208. package/distribution/distribution/services/state/modules/shortcuts/actions/index.d.ts +0 -3
  209. package/distribution/distribution/services/state/modules/shortcuts/index.d.ts +0 -7
  210. package/distribution/distribution/services/state/modules/shortcuts/initial/index.d.ts +0 -3
  211. package/distribution/distribution/services/state/modules/shortcuts/reducer/index.d.ts +0 -3
  212. package/distribution/distribution/services/state/modules/shortcuts/resolvers/index.d.ts +0 -3
  213. package/distribution/distribution/services/state/modules/shortcuts/selectors/index.d.ts +0 -11
  214. package/distribution/distribution/services/state/modules/shortcuts/types/index.d.ts +0 -13
  215. package/distribution/distribution/services/state/modules/space/actions/index.d.ts +0 -48
  216. package/distribution/distribution/services/state/modules/space/index.d.ts +0 -7
  217. package/distribution/distribution/services/state/modules/space/initial/index.d.ts +0 -3
  218. package/distribution/distribution/services/state/modules/space/reducer/index.d.ts +0 -3
  219. package/distribution/distribution/services/state/modules/space/resolvers/index.d.ts +0 -47
  220. package/distribution/distribution/services/state/modules/space/selectors/index.d.ts +0 -147
  221. package/distribution/distribution/services/state/modules/space/types/index.d.ts +0 -257
  222. package/distribution/distribution/services/state/modules/themes/actions/index.d.ts +0 -4
  223. package/distribution/distribution/services/state/modules/themes/index.d.ts +0 -7
  224. package/distribution/distribution/services/state/modules/themes/initial/index.d.ts +0 -3
  225. package/distribution/distribution/services/state/modules/themes/reducer/index.d.ts +0 -3
  226. package/distribution/distribution/services/state/modules/themes/resolvers/index.d.ts +0 -3
  227. package/distribution/distribution/services/state/modules/themes/selectors/index.d.ts +0 -19
  228. package/distribution/distribution/services/state/modules/themes/types/index.d.ts +0 -17
  229. package/distribution/distribution/services/state/modules/ui/actions/index.d.ts +0 -2
  230. package/distribution/distribution/services/state/modules/ui/index.d.ts +0 -7
  231. package/distribution/distribution/services/state/modules/ui/initial/index.d.ts +0 -3
  232. package/distribution/distribution/services/state/modules/ui/reducer/index.d.ts +0 -3
  233. package/distribution/distribution/services/state/modules/ui/resolvers/index.d.ts +0 -2
  234. package/distribution/distribution/services/state/modules/ui/selectors/index.d.ts +0 -11
  235. package/distribution/distribution/services/state/modules/ui/types/index.d.ts +0 -10
  236. package/distribution/distribution/services/state/selectors/index.d.ts +0 -197
  237. package/distribution/distribution/services/state/store/development/index.d.ts +0 -5
  238. package/distribution/distribution/services/state/store/index.d.ts +0 -19
  239. package/distribution/distribution/services/state/store/production/index.d.ts +0 -5
  240. package/distribution/distribution/services/state/store/reducers/index.d.ts +0 -9
  241. package/distribution/distribution/services/state/types/space.d.ts +0 -3
  242. package/distribution/distribution/services/styled/index.d.ts +0 -2
  243. package/distribution/distribution/services/utilities/environment/index.d.ts +0 -7
  244. package/distribution/distribution/services/utilities/imports/index.d.ts +0 -49
  245. package/distribution/distribution/services/utilities/react/index.d.ts +0 -3
  246. package/distribution/services/state/global/index.d.ts +0 -6
  247. package/distribution/services/state/modules/configuration/actions/index.d.ts +0 -28
  248. package/distribution/services/state/modules/configuration/initial/index.d.ts +0 -3
  249. package/distribution/services/state/modules/configuration/reducer/index.d.ts +0 -3
  250. package/distribution/services/state/modules/configuration/resolvers/index.d.ts +0 -27
  251. package/distribution/services/state/modules/configuration/selectors/index.d.ts +0 -11
  252. package/distribution/services/state/modules/configuration/types/index.d.ts +0 -136
  253. package/distribution/services/state/modules/general/actions/index.d.ts +0 -2
  254. package/distribution/services/state/modules/general/initial/index.d.ts +0 -3
  255. package/distribution/services/state/modules/general/reducer/index.d.ts +0 -3
  256. package/distribution/services/state/modules/general/resolvers/index.d.ts +0 -1
  257. package/distribution/services/state/modules/general/selectors/index.d.ts +0 -2
  258. package/distribution/services/state/modules/general/types/index.d.ts +0 -3
  259. package/distribution/services/state/modules/shortcuts/actions/index.d.ts +0 -3
  260. package/distribution/services/state/modules/shortcuts/initial/index.d.ts +0 -3
  261. package/distribution/services/state/modules/shortcuts/reducer/index.d.ts +0 -3
  262. package/distribution/services/state/modules/shortcuts/resolvers/index.d.ts +0 -3
  263. package/distribution/services/state/modules/shortcuts/selectors/index.d.ts +0 -11
  264. package/distribution/services/state/modules/shortcuts/types/index.d.ts +0 -13
  265. package/distribution/services/state/modules/space/actions/index.d.ts +0 -48
  266. package/distribution/services/state/modules/space/initial/index.d.ts +0 -3
  267. package/distribution/services/state/modules/space/reducer/index.d.ts +0 -3
  268. package/distribution/services/state/modules/space/resolvers/index.d.ts +0 -47
  269. package/distribution/services/state/modules/space/selectors/index.d.ts +0 -147
  270. package/distribution/services/state/modules/space/types/index.d.ts +0 -257
  271. package/distribution/services/state/modules/themes/actions/index.d.ts +0 -4
  272. package/distribution/services/state/modules/themes/initial/index.d.ts +0 -3
  273. package/distribution/services/state/modules/themes/reducer/index.d.ts +0 -3
  274. package/distribution/services/state/modules/themes/resolvers/index.d.ts +0 -3
  275. package/distribution/services/state/modules/themes/selectors/index.d.ts +0 -19
  276. package/distribution/services/state/modules/themes/types/index.d.ts +0 -17
  277. package/distribution/services/state/modules/ui/actions/index.d.ts +0 -2
  278. package/distribution/services/state/modules/ui/initial/index.d.ts +0 -3
  279. package/distribution/services/state/modules/ui/reducer/index.d.ts +0 -3
  280. package/distribution/services/state/modules/ui/resolvers/index.d.ts +0 -2
  281. package/distribution/services/state/modules/ui/selectors/index.d.ts +0 -11
  282. package/distribution/services/state/modules/ui/types/index.d.ts +0 -10
  283. package/distribution/services/state/store/reducers/index.d.ts +0 -9
  284. package/distribution/services/state/types/space.d.ts +0 -3
@@ -1,527 +1,559 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@plurid/plurid-data"),t=require("@plurid/plurid-engine"),a=require("@plurid/plurid-pubsub"),n=require("react"),r=require("react-redux"),o=require("redux"),i=require("redux-thunk"),l=require("@plurid/plurid-functions"),s=require("@plurid/plurid-themes"),c=require("styled-components"),u=require("@plurid/plurid-ui-components-react"),d=require("@plurid/plurid-icons-react"),f=require("@plurid/plurid-functions-react"),p=require("react-dom"),m=require("cross-fetch"),g=require("@plurid/elementql-client-react"),T=require("hammerjs");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var E=h(e),_=h(t),O=h(a),S=h(n),R=h(r),A=h(o),b=h(i),C=h(l),I=h(s),v=h(c),P=h(u),L=h(d),y=h(f),U=h(p),w=h(m),N=h(g),D=h(T);var M={};!function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=E.default,a=_.default,n=O.default,r=S.default,o=R.default,i=A.default,l=b.default,s=C.default,c=I.default,u=v.default,d=P.default,f=L.default,p=y.default,m=U.default,g=w.default,T=N.default;function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var M=h(n),x=h(r),F=h(l),j=h(c),k=h(u),G=h(g);const Y=x.default.createContext(void 0),B="SET_CONFIGURATION",V="SET_CONFIGURATION_MICRO",X="SET_CONFIGURATION_PLANE_CONTROLS",$="SET_CONFIGURATION_PLANE_OPACITY",W="SET_CONFIGURATION_THEME_GENERAL",z="SET_CONFIGURATION_THEME_INTERACTION",H="SET_CONFIGURATION_LANGUAGE",Z="TOGGLE_CONFIGURATION_VIEWCUBE_HIDE",K="TOGGLE_CONFIGURATION_VIEWCUBE_BUTTONS",q="TOGGLE_CONFIGURATION_VIEWCUBE_OPAQUE",Q="TOGGLE_CONFIGURATION_VIEWCUBE_CONCEAL",J="TOGGLE_CONFIGURATION_TOOLBAR_CONCEAL",ee="TOGGLE_CONFIGURATION_TOOLBAR_TRANSFORM_ICONS",te="TOGGLE_CONFIGURATION_TOOLBAR_TRANSFORM_BUTTONS",ae="TOGGLE_CONFIGURATION_TOOLBAR_OPAQUE",ne="TOGGLE_CONFIGURATION_TOOLBAR_TOGGLE_DRAWER",re="TOGGLE_CONFIGURATION_SPACE_TRANSPARENT_UI",oe="TOGGLE_CONFIGURATION_SPACE_SHOW_TRANSFORM_ORIGIN",ie="SET_CONFIGURATION_SPACE_TRANSFORM_ORIGIN_SIZE",le="SET_CONFIGURATION_SPACE_TRANSFORM_MODE",se="TOGGLE_CONFIGURATION_SPACE_TRANSFORM_MULTIMODE",ce="SET_CONFIGURATION_SPACE_TRANSFORM_TOUCH",ue="TOGGLE_CONFIGURATION_SPACE_FIRST_PERSON",de="SET_CONFIGURATION_SPACE_TRANSFORM_LOCKS",fe="SET_CONFIGURATION_SPACE_LAYOUT_TYPE",pe="SET_CONFIGURATION_SPACE_CULLING_DISTANCE";var me=Object.freeze({__proto__:null,SET_CONFIGURATION:B,SET_CONFIGURATION_MICRO:V,SET_CONFIGURATION_PLANE_CONTROLS:X,SET_CONFIGURATION_PLANE_OPACITY:$,SET_CONFIGURATION_THEME_GENERAL:W,SET_CONFIGURATION_THEME_INTERACTION:z,SET_CONFIGURATION_LANGUAGE:H,TOGGLE_CONFIGURATION_VIEWCUBE_HIDE:Z,TOGGLE_CONFIGURATION_VIEWCUBE_BUTTONS:K,TOGGLE_CONFIGURATION_VIEWCUBE_OPAQUE:q,TOGGLE_CONFIGURATION_VIEWCUBE_CONCEAL:Q,TOGGLE_CONFIGURATION_TOOLBAR_CONCEAL:J,TOGGLE_CONFIGURATION_TOOLBAR_TRANSFORM_ICONS:ee,TOGGLE_CONFIGURATION_TOOLBAR_TRANSFORM_BUTTONS:te,TOGGLE_CONFIGURATION_TOOLBAR_OPAQUE:ae,TOGGLE_CONFIGURATION_TOOLBAR_TOGGLE_DRAWER:ne,TOGGLE_CONFIGURATION_SPACE_TRANSPARENT_UI:re,TOGGLE_CONFIGURATION_SPACE_SHOW_TRANSFORM_ORIGIN:oe,SET_CONFIGURATION_SPACE_TRANSFORM_ORIGIN_SIZE:ie,SET_CONFIGURATION_SPACE_TRANSFORM_MODE:le,TOGGLE_CONFIGURATION_SPACE_TRANSFORM_MULTIMODE:se,SET_CONFIGURATION_SPACE_TRANSFORM_TOUCH:ce,TOGGLE_CONFIGURATION_SPACE_FIRST_PERSON:ue,SET_CONFIGURATION_SPACE_TRANSFORM_LOCKS:de,SET_CONFIGURATION_SPACE_LAYOUT_TYPE:fe,SET_CONFIGURATION_SPACE_CULLING_DISTANCE:pe});var ge=Object.freeze({__proto__:null,setConfiguration:e=>({type:B,payload:e}),setConfigurationMicro:()=>({type:V}),setConfigurationPlaneControls:e=>({type:X,payload:e}),setConfigurationPlaneOpacity:e=>({type:$,payload:e}),setConfigurationThemeGeneralAction:e=>({type:W,payload:e}),setConfigurationThemeInteractionAction:e=>({type:z,payload:e}),setConfigurationLanguageAction:e=>({type:H,payload:e}),toggleConfigurationViewcubeHide:e=>({type:Z,payload:e}),toggleConfigurationViewcubeButtons:e=>({type:K,payload:e}),toggleConfigurationViewcubeOpaque:e=>({type:q,payload:e}),toggleConfigurationViewcubeConceal:()=>({type:Q}),toggleConfigurationToolbarConceal:()=>({type:J}),toggleConfigurationToolbarTransformIcons:()=>({type:ee}),toggleConfigurationToolbarTransformButtons:()=>({type:te}),toggleConfigurationSpaceTransparentUI:()=>({type:re}),toggleConfigurationSpaceShowTransformOrigin:()=>({type:oe}),toggleConfigurationToolbarOpaque:()=>({type:ae}),toggleConfigurationToolbarToggleDrawer:e=>({type:ne,payload:e}),setConfigurationSpaceTransformOriginSize:e=>({type:ie,payload:e}),setConfigurationSpaceTransformMode:e=>({type:le,payload:e}),toggleConfigurationSpaceTransformMultimode:e=>({type:se,payload:e}),setConfigurationSpaceTransformTouch:e=>({type:ce,payload:e}),toggleConfigurationSpaceFirstPerson:()=>({type:ue}),setConfigurationSpaceTransformLocks:e=>({type:de,payload:e}),setConfigurationSpaceLayoutType:e=>({type:fe,payload:e}),setConfigurationSpaceCullingDistance:e=>({type:pe,payload:e})});const Te=Object.assign({},t.defaultConfiguration),he=(e,t)=>Object.assign(Object.assign({},e),t.payload),Ee=e=>{const t=Object.assign({},e);return t.elements.toolbar.show=!1,t.elements.plane.controls.show=!1,t.elements.viewcube.show=!1,Object.assign({},t)},_e=(e,t)=>{const a=Object.assign({},e);return a.elements.plane.controls.show=t.payload,Object.assign({},a)},Oe=(e,t)=>{const a=Object.assign({},e);return a.elements.plane.opacity=t.payload,Object.assign({},a)},Se=(e,t)=>{const a=Object.assign({},e),n={general:t.payload,interaction:"object"==typeof a.global.theme?a.global.theme.interaction:"plurid"};return Object.assign(Object.assign({},a),{global:Object.assign(Object.assign({},a.global),{theme:n})})},Re=(e,t)=>{const a=Object.assign({},e),n={general:"object"==typeof a.global.theme?a.global.theme.general:"plurid",interaction:t.payload};return Object.assign(Object.assign({},a),{global:Object.assign(Object.assign({},a.global),{theme:n})})},Ae=(e,t)=>Object.assign(Object.assign({},e),{global:Object.assign(Object.assign({},e.global),{language:t.payload})}),be=(e,t)=>{const a=Object.assign({},e);return a.elements.viewcube.show=t.payload,Object.assign({},a)},Ce=(e,t)=>{const a=Object.assign({},e);return a.elements.viewcube.buttons=t.payload,Object.assign({},a)},Ie=(e,t)=>{const a=Object.assign({},e);return a.elements.viewcube.opaque=t.payload,Object.assign({},a)},ve=e=>{const{conceal:t}=e.elements.viewcube,a=Object.assign({},e);return a.elements.viewcube.conceal=!t,Object.assign({},a)},Pe=e=>{const{conceal:t}=e.elements.toolbar,a=Object.assign({},e);return a.elements.toolbar.conceal=!t,Object.assign({},a)},Le=e=>{const{transformIcons:t}=e.elements.toolbar,a=Object.assign({},e);return a.elements.toolbar.transformIcons=!t,Object.assign({},a)},ye=e=>{const{transformButtons:t}=e.elements.toolbar,a=Object.assign({},e);return a.elements.toolbar.transformButtons=!t,Object.assign({},a)},Ue=e=>{const{show:t}=e.space.transformOrigin,a=Object.assign({},e);return a.space.transformOrigin.show=!t,Object.assign({},a)},we=e=>{const{opaque:t}=e.elements.toolbar,a=Object.assign({},e);return a.elements.toolbar.opaque=!t,Object.assign({},a)},Ne=e=>{const t=Object.assign({},e);return t.global.transparentUI=!e.global.transparentUI,Object.assign({},t)},De=(e,t)=>{const a=Object.assign({},e);return a.space.transformOrigin.size=t.payload,Object.assign({},a)},Me=(e,a)=>{const n=Object.assign({},e);return n.space.transformMode!==a.payload?n.space.transformMode=a.payload:n.space.transformMode=t.TRANSFORM_MODES.ALL,Object.assign({},n)},xe=(e,t)=>{const a=Object.assign({},e);return a.space.transformMultimode=t.payload,Object.assign({},a)},Fe=(e,t)=>{const a=Object.assign({},e);return a.space.transformTouch=t.payload,Object.assign({},a)},je=e=>{const{firstPerson:t}=e.space,a=Object.assign({},e);return a.space.firstPerson=!t,Object.assign({},a)},ke=(e,t)=>{const{toggledDrawers:a}=e.elements.toolbar,n=Object.assign({},e);if(a.includes(t.payload)){const e=a.filter((e=>e!==t.payload));n.elements.toolbar.toggledDrawers=[...e]}else n.elements.toolbar.toggledDrawers=[...a,t.payload];return Object.assign({},n)},Ge=(e,t)=>{const{transformLocks:a}=e.space,n=Object.assign({},e),r=Object.assign({},a);return r[t.payload]=!a[t.payload],n.space.transformLocks=Object.assign({},r),Object.assign({},n)},Ye=(e,a)=>{const n=Object.assign({},e),r={type:t.LAYOUT_TYPES[a.payload]};return n.space.layout=Object.assign({},r),Object.assign({},n)},Be=(e,t)=>{const a=Object.assign({},e);return a.space.cullingDistance=t.payload,Object.assign({},a)};var Ve=Object.freeze({__proto__:null,setConfiguration:he,setConfigurationMicro:Ee,setConfigurationPlaneControls:_e,setConfigurationPlaneOpacity:Oe,setConfigurationThemeGeneral:Se,setConfigurationThemeInteraction:Re,setConfigurationLanguage:Ae,toggleConfigurationViewcubeHide:be,toggleConfigurationViewcubeButtons:Ce,toggleConfigurationViewcubeOpaque:Ie,toggleConfigurationViewcubeConceal:ve,toggleConfigurationToolbarConceal:Pe,toggleConfigurationToolbarTransformIcons:Le,toggleConfigurationToolbarTransformButtons:ye,toggleConfigurationShowTransformOrigin:Ue,toggleConfigurationToolbarOpaque:we,toggleConfigurationSpaceTransparentUI:Ne,setConfigurationSpaceTransformOriginSize:De,setConfigurationSpaceTransformMode:Me,toggleConfigurationSpaceTransformMultimode:xe,setConfigurationSpaceTransformTouch:Fe,toggleConfigurationSpaceFirstPerson:je,toggleConfigurationToolbarToggleDrawer:ke,setConfigurationSpaceTransformLocks:Ge,setConfigurationSpaceLayout:Ye,setConfigurationSpaceCullingDistance:Be});const Xe="SET_STATE";var $e={getConfiguration:e=>e.configuration},We=Object.freeze({__proto__:null,actions:ge,initialState:Te,reducer:(e=Te,t)=>{switch(t.type){case Xe:return Object.assign(Object.assign({},e),t.payload.configuration);case B:return he(e,t);case V:return Ee(e);case X:return _e(e,t);case $:return Oe(e,t);case W:return Se(e,t);case z:return Re(e,t);case H:return Ae(e,t);case Z:return be(e,t);case K:return Ce(e,t);case q:return Ie(e,t);case Q:return ve(e);case J:return Pe(e);case ee:return Le(e);case te:return ye(e);case ne:return ke(e,t);case ae:return we(e);case re:return Ne(e);case oe:return Ue(e);case ie:return De(e,t);case le:return Me(e,t);case se:return xe(e,t);case ce:return Fe(e,t);case ue:return je(e);case de:return Ge(e,t);case fe:return Ye(e,t);case pe:return Be(e,t);default:return Object.assign({},e)}},resolvers:Ve,selectors:$e,Types:me}),ze=Object.freeze({__proto__:null,default:{}});const He={};var Ze=Object.freeze({__proto__:null}),Ke=Object.freeze({__proto__:null}),qe=Object.freeze({__proto__:null,actions:ze,initialState:He,reducer:(e=He,t)=>Object.assign({},e),resolvers:Ze,selectors:{},Types:Ke});const Qe="SHORTCUTS_SET_GLOBAL_SHORTCUTS",Je="SHORTCUTS_UNSET_GLOBAL_SHORTCUTS";var et=Object.freeze({__proto__:null,SHORTCUTS_SET_GLOBAL_SHORTCUTS:Qe,SHORTCUTS_UNSET_GLOBAL_SHORTCUTS:Je});var tt=Object.freeze({__proto__:null,setGlobalShortcuts:()=>({type:Qe}),unsetGlobalShortcuts:()=>({type:Je})});const at={global:!0},nt=e=>Object.assign(Object.assign({},e),{global:!0}),rt=e=>Object.assign(Object.assign({},e),{global:!1});var ot=Object.freeze({__proto__:null,setGlobalShortcuts:nt,unsetGlobalShortcuts:rt});var it={getGlobal:e=>e.shortcuts.global},lt=Object.freeze({__proto__:null,actions:tt,initialState:at,reducer:(e=at,t)=>{switch(t.type){case Xe:return Object.assign(Object.assign({},e),t.payload.shortcuts);case Qe:return nt(e);case Je:return rt(e);default:return Object.assign({},e)}},resolvers:ot,selectors:it,Types:et});const st="SET_SPACE_FIELD",ct="SET_SPACE_LOADING",ut="SET_TRANSFORM",dt="SET_ANIMATED_TRANSFORM",ft="SET_TRANSFORM_TIME",pt="SET_SPACE_LOCATION",mt="VIEW_CAMERA_MOVE_FORWARD",gt="VIEW_CAMERA_MOVE_BACKWARD",Tt="VIEW_CAMERA_MOVE_LEFT",ht="VIEW_CAMERA_MOVE_RIGHT",Et="VIEW_CAMERA_MOVE_UP",_t="VIEW_CAMERA_MOVE_DOWN",Ot="VIEW_CAMERA_TURN_UP",St="VIEW_CAMERA_TURN_DOWN",Rt="VIEW_CAMERA_TURN_LEFT",At="VIEW_CAMERA_TURN_RIGHT",bt="ROTATE_UP",Ct="ROTATE_DOWN",It="ROTATE_LEFT",vt="ROTATE_X",Pt="ROTATE_X_WITH",Lt="ROTATE_RIGHT",yt="ROTATE_Y",Ut="ROTATE_Y_WITH",wt="TRANSLATE_UP",Nt="TRANSLATE_DOWN",Dt="TRANSLATE_LEFT",Mt="TRANSLATE_RIGHT",xt="TRANSLATE_IN",Ft="TRANSLATE_OUT",jt="TRANSLATE_X_WITH",kt="TRANSLATE_Y_WITH",Gt="SCALE_UP",Yt="SCALE_DOWN",Bt="SCALE_UP_WITH",Vt="SCALE_DOWN_WITH",Xt="SET_INITIAL_TREE",$t="SET_TREE",Wt="SET_ACTIVE_UNIVERSE",zt="SPACE_RESET_TRANSFORM",Ht="SET_VIEW_SIZE",Zt="SET_SPACE_SIZE",Kt="UPDATE_SPACE_TREE_PLANE",qt="UPDATE_SPACE_LINK_COORDINATES",Qt="SPACE_SET_VIEW",Jt="SPACE_SET_CULLED_VIEW";var ea=Object.freeze({__proto__:null,SET_SPACE_FIELD:st,SET_SPACE_LOADING:ct,SET_TRANSFORM:ut,SET_ANIMATED_TRANSFORM:dt,SET_TRANSFORM_TIME:ft,SET_SPACE_LOCATION:pt,VIEW_CAMERA_MOVE_FORWARD:mt,VIEW_CAMERA_MOVE_BACKWARD:gt,VIEW_CAMERA_MOVE_LEFT:Tt,VIEW_CAMERA_MOVE_RIGHT:ht,VIEW_CAMERA_MOVE_UP:Et,VIEW_CAMERA_MOVE_DOWN:_t,VIEW_CAMERA_TURN_UP:Ot,VIEW_CAMERA_TURN_DOWN:St,VIEW_CAMERA_TURN_LEFT:Rt,VIEW_CAMERA_TURN_RIGHT:At,ROTATE_UP:bt,ROTATE_DOWN:Ct,ROTATE_LEFT:It,ROTATE_X:vt,ROTATE_X_WITH:Pt,ROTATE_RIGHT:Lt,ROTATE_Y:yt,ROTATE_Y_WITH:Ut,TRANSLATE_UP:wt,TRANSLATE_DOWN:Nt,TRANSLATE_LEFT:Dt,TRANSLATE_RIGHT:Mt,TRANSLATE_IN:xt,TRANSLATE_OUT:Ft,TRANSLATE_X_WITH:jt,TRANSLATE_Y_WITH:kt,SCALE_UP:Gt,SCALE_DOWN:Yt,SCALE_UP_WITH:Bt,SCALE_DOWN_WITH:Vt,SET_INITIAL_TREE:Xt,SET_TREE:$t,SET_ACTIVE_UNIVERSE:Wt,SPACE_RESET_TRANSFORM:zt,SET_VIEW_SIZE:Ht,SET_SPACE_SIZE:Zt,UPDATE_SPACE_TREE_PLANE:Kt,UPDATE_SPACE_LINK_COORDINATES:qt,SPACE_SET_VIEW:Qt,SPACE_SET_CULLED_VIEW:Jt});var ta=Object.freeze({__proto__:null,setSpaceField:e=>({type:st,payload:e}),setSpaceLoading:e=>({type:ct,payload:e}),setTransform:e=>({type:ut,payload:e}),setAnimatedTransform:e=>({type:dt,payload:e}),setTransformTime:e=>({type:ft,payload:e}),setSpaceLocation:e=>({type:pt,payload:e}),viewCameraMoveForward:()=>({type:mt}),viewCameraMoveBackward:()=>({type:gt}),viewCameraMoveLeft:()=>({type:Tt}),viewCameraMoveRight:()=>({type:ht}),viewCameraMoveUp:()=>({type:Et}),viewCameraMoveDown:()=>({type:_t}),viewCameraTurnUp:()=>({type:Ot}),viewCameraTurnDown:()=>({type:St}),viewCameraTurnLeft:()=>({type:Rt}),viewCameraTurnRight:()=>({type:At}),rotateUp:()=>({type:bt}),rotateDown:()=>({type:Ct}),rotateX:e=>({type:vt,payload:e}),rotateXWith:e=>({type:Pt,payload:e}),rotateLeft:()=>({type:It}),rotateRight:()=>({type:Lt}),rotateY:e=>({type:yt,payload:e}),rotateYWith:e=>({type:Ut,payload:e}),translateUp:()=>({type:wt}),translateDown:()=>({type:Nt}),translateLeft:()=>({type:Dt}),translateRight:()=>({type:Mt}),translateIn:()=>({type:xt}),translateOut:()=>({type:Ft}),translateXWith:e=>({type:jt,payload:e}),translateYWith:e=>({type:kt,payload:e}),scaleUp:()=>({type:Gt}),scaleDown:()=>({type:Yt}),scaleUpWith:e=>({type:Bt,payload:e}),scaleDownWith:e=>({type:Vt,payload:e}),setInitialTree:e=>({type:Xt,payload:e}),setTree:e=>({type:$t,payload:e}),setActiveUniverse:e=>({type:Wt,payload:e}),spaceResetTransform:()=>({type:zt}),setViewSize:e=>({type:Ht,payload:e}),setSpaceSize:e=>({type:Zt,payload:e}),updateSpaceTreePlane:e=>({type:Kt,payload:e}),updateSpaceLinkCoordinates:e=>({type:qt,payload:e}),spaceSetView:e=>({type:Qt,payload:e}),spaceSetCulledView:e=>({type:Jt,payload:e})});const aa={loading:!0,transform:"matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)",animatedTransform:!1,transformTime:450,scale:1,rotationX:0,rotationY:0,translationX:0,translationY:0,translationZ:0,initialTree:[],tree:[],activeUniverseID:"",camera:{x:0,y:0,z:0},viewSize:{width:"undefined"==typeof window?1440:window.innerWidth,height:"undefined"==typeof window?821:window.innerHeight},spaceSize:{width:"undefined"==typeof window?1440:window.innerWidth,height:"undefined"==typeof window?821:window.innerHeight,depth:0,topCorner:{x:0,y:0,z:0}},view:[],culledView:[]},{quaternion:na,matrix:ra}=a.interaction,{matrixArrayToCSSMatrix:oa,rotateMatrix:ia,multiplyArrayOfMatrices:la,scaleMatrix:sa,translateMatrix:ca}=ra,{degToRad:ua}=na,da=e=>{const{translationX:t,translationY:a,translationZ:n,rotationX:r,rotationY:o,scale:i}=e,l=-1*t+("undefined"==typeof window?720:window.innerWidth/2),s=-1*a+("undefined"==typeof window?400:window.innerHeight/2),c=-1*n,u=ia(ua(-r),ua(-o)),d=ca(t,a,n),f=sa(i),p=la([d,la([ca(l,s,c),u,ca(-l,-s,-c)]),f]);return oa(p)},{toRadians:fa}=s.mathematics.geometry,pa=e=>s.objects.clone(e,"any"),ma=(e,t)=>{const{field:a,value:n}=t.payload,r=pa(e);return r[a]=n,Object.assign({},r)},ga=(e,t)=>{const a=pa(e);return Object.assign(Object.assign({},a),{loading:t.payload})},Ta=(e,t)=>{const{translationX:a,translationY:n,translationZ:r,rotationX:o,rotationY:i,scale:l}=t.payload,s=null!=a?a:e.translationX,c=null!=n?n:e.translationY,u=null!=r?r:e.translationZ,d=null!=o?o:e.rotationX,f=null!=i?i:e.rotationY,p=null!=l?l:e.scale,m=pa(e);return Object.assign(Object.assign({},m),{translationX:s,translationY:c,translationZ:u,rotationX:d,rotationY:f,scale:p})},ha=(e,t)=>{const a=pa(e);return Object.assign(Object.assign({},a),{animatedTransform:t.payload})},Ea=(e,t)=>{const a=pa(e);return Object.assign(Object.assign({},a),{transformTime:t.payload})},_a=(e,t)=>{const a=pa(e);return Object.assign(Object.assign({},a),t.payload)},Oa=e=>{const a=pa(e);return a.translationZ=e.translationZ+6*t.TRANSLATION_STEP*Math.cos(fa(-e.rotationY)),a.translationX=e.translationX+6*t.TRANSLATION_STEP*Math.sin(fa(-e.rotationY)),a.transform=da(a),Object.assign({},a)},Sa=e=>{const a=pa(e);return a.translationZ=e.translationZ-6*t.TRANSLATION_STEP*Math.cos(fa(-e.rotationY)),a.translationX=e.translationX-6*t.TRANSLATION_STEP*Math.sin(fa(-e.rotationY)),a.transform=da(a),Object.assign({},a)},Ra=e=>{const a=pa(e);return a.translationX=e.translationX+3*t.TRANSLATION_STEP*Math.cos(fa(e.rotationY)),a.translationZ=e.translationZ+3*t.TRANSLATION_STEP*Math.sin(fa(e.rotationY)),a.transform=da(a),Object.assign({},a)},Aa=e=>{const a=pa(e);return a.translationX=e.translationX-3*t.TRANSLATION_STEP*Math.cos(fa(e.rotationY)),a.translationZ=e.translationZ-3*t.TRANSLATION_STEP*Math.sin(fa(e.rotationY)),a.transform=da(a),Object.assign({},a)},ba=e=>{const a=pa(e);return a.translationY=e.translationY+3*t.TRANSLATION_STEP,a.transform=da(a),Object.assign({},a)},Ca=e=>{const a=pa(e);return a.translationY=e.translationY-3*t.TRANSLATION_STEP,a.transform=da(a),Object.assign({},a)},Ia=e=>{const a=pa(e);return a.rotationX=(e.rotationX+t.ROTATION_STEP)%360,a.transform=da(a),Object.assign({},a)},va=e=>{const a=pa(e);return a.rotationX=(e.rotationX-t.ROTATION_STEP)%360,a.transform=da(a),Object.assign({},a)},Pa=e=>{const a=pa(e);return a.rotationY=(e.rotationY-t.ROTATION_STEP)%360,a.transform=da(a),Object.assign({},a)},La=e=>{const a=pa(e);return a.rotationY=(e.rotationY+t.ROTATION_STEP)%360,a.transform=da(a),Object.assign({},a)},ya=e=>{const a=pa(e);return a.rotationX=(e.rotationX+t.ROTATION_STEP)%360,a.transform=da(a),Object.assign({},a)},Ua=e=>{const a=pa(e);return a.rotationX=(e.rotationX-t.ROTATION_STEP)%360,a.transform=da(a),Object.assign({},a)},wa=(e,t)=>{const a=pa(e);return a.rotationX=t.payload,a.transform=da(a),Object.assign({},a)},Na=(e,t)=>{const a=pa(e);return a.rotationX=e.rotationX+t.payload,a.transform=da(a),Object.assign({},a)},Da=e=>{const a=pa(e);return a.rotationY=(e.rotationY+t.ROTATION_STEP)%360,a.transform=da(a),Object.assign({},a)},Ma=e=>{const a=pa(e);return a.rotationY=(e.rotationY-t.ROTATION_STEP)%360,a.transform=da(a),Object.assign({},a)},xa=(e,t)=>{const a=pa(e);return a.rotationY=t.payload,a.transform=da(a),Object.assign({},a)},Fa=(e,t)=>{const a=pa(e);return a.rotationY=e.rotationY+t.payload,a.transform=da(a),Object.assign({},a)},ja=e=>{const a=pa(e);return a.translationY=e.translationY-t.TRANSLATION_STEP,a.transform=da(a),Object.assign({},a)},ka=e=>{const a=pa(e);return a.translationY=e.translationY+t.TRANSLATION_STEP,a.transform=da(a),Object.assign({},a)},Ga=e=>{const a=pa(e);return a.translationX=e.translationX-t.TRANSLATION_STEP*Math.cos(fa(e.rotationY)),a.translationZ=e.translationZ-t.TRANSLATION_STEP*Math.sin(fa(e.rotationY)),a.transform=da(a),Object.assign({},a)},Ya=e=>{const a=pa(e);return a.translationX=e.translationX+t.TRANSLATION_STEP*Math.cos(fa(e.rotationY)),a.translationZ=e.translationZ+t.TRANSLATION_STEP*Math.sin(fa(e.rotationY)),a.transform=da(a),Object.assign({},a)},Ba=e=>{const a=pa(e);return a.translationZ=e.translationZ-3*t.TRANSLATION_STEP*Math.cos(fa(-e.rotationY)),a.translationX=e.translationX-3*t.TRANSLATION_STEP*Math.sin(fa(-e.rotationY)),a.transform=da(a),Object.assign({},a)},Va=e=>{const a=pa(e);return a.translationZ=e.translationZ+3*t.TRANSLATION_STEP*Math.cos(fa(-e.rotationY)),a.translationX=e.translationX+3*t.TRANSLATION_STEP*Math.sin(fa(-e.rotationY)),a.transform=da(a),Object.assign({},a)},Xa=(e,t)=>{const a=pa(e);return a.translationX=e.translationX+t.payload*Math.cos(fa(e.rotationY)),a.translationZ=e.translationZ+t.payload*Math.sin(fa(e.rotationY)),a.transform=da(a),Object.assign({},a)},$a=(e,t)=>{const a=pa(e);return a.translationY=e.translationY+t.payload,a.transform=da(a),Object.assign({},a)},Wa=e=>{const a=e.scale+t.SCALE_STEP,n=a<t.SCALE_UPPER_LIMIT?a:t.SCALE_UPPER_LIMIT,r=pa(e);return r.scale=n,r.transform=da(r),Object.assign({},r)},za=e=>{const a=e.scale-t.SCALE_STEP,n=a>t.SCALE_LOWER_LIMIT?a:t.SCALE_LOWER_LIMIT,r=pa(e);return r.scale=n,r.transform=da(r),Object.assign({},r)},Ha=(e,a)=>{const n=e.scale+Math.abs(a.payload),r=n<t.SCALE_UPPER_LIMIT?n:t.SCALE_UPPER_LIMIT,o=pa(e);return o.scale=r,o.transform=da(o),Object.assign({},o)},Za=(e,a)=>{const n=e.scale-Math.abs(a.payload),r=n>t.SCALE_LOWER_LIMIT?n:t.SCALE_LOWER_LIMIT,o=pa(e);return o.scale=r,o.transform=da(o),Object.assign({},o)},Ka=(e,t)=>{const a=pa(e);return Object.assign(Object.assign({},a),{initialTree:[...t.payload]})},qa=(e,t)=>{const a=pa(e);return Object.assign(Object.assign({},a),{tree:[...t.payload]})},Qa=(e,t)=>{const a=pa(e);return Object.assign(Object.assign({},a),{activeUniverseID:t.payload})},Ja=e=>{const t=pa(e);return t.scale=1,t.rotationX=0,t.rotationY=0,t.translationX=0,t.translationY=0,t.translationZ=0,t.transform=da(t),Object.assign({},t)},en=(e,t)=>{const a=pa(e);return Object.assign(Object.assign({},a),{viewSize:Object.assign({},t.payload)})},tn=(e,t)=>{const a=pa(e);return Object.assign(Object.assign({},a),{spaceSize:Object.assign({},t.payload)})},an=(e,t)=>{const n=pa(e),r=a.general.tree.updateTreePlane(n.tree,t.payload);return Object.assign(Object.assign({},n),{tree:r})},nn=(e,t)=>{const{planeID:n,linkCoordinates:r}=t.payload,o=pa(e),i=a.general.tree.updateTreeByPlaneIDWithLinkCoordinates(o.tree,n,r);return Object.assign(Object.assign({},o),{tree:i})},rn=(e,t)=>{const a=pa(e);return Object.assign(Object.assign({},a),{view:t.payload})},on=(e,t)=>{const a=pa(e);return Object.assign(Object.assign({},a),{culledView:t.payload})};var ln=Object.freeze({__proto__:null,setSpaceField:ma,setSpaceLoading:ga,setTransform:Ta,setAnimatedTransform:ha,setTransformTime:Ea,setSpaceLocation:_a,viewCameraMoveForward:Oa,viewCameraMoveBackward:Sa,viewCameraMoveLeft:Ra,viewCameraMoveRight:Aa,viewCameraMoveUp:ba,viewCameraMoveDown:Ca,viewCameraTurnUp:Ia,viewCameraTurnDown:va,viewCameraTurnLeft:Pa,viewCameraTurnRight:La,rotateUp:ya,rotateDown:Ua,rotateX:wa,rotateXWith:Na,rotateLeft:Da,rotateRight:Ma,rotateY:xa,rotateYWith:Fa,translateUp:ja,translateDown:ka,translateLeft:Ga,translateRight:Ya,translateIn:Ba,translateOut:Va,translateXWith:Xa,translateYWith:$a,scaleUp:Wa,scaleDown:za,scaleUpWith:Ha,scaleDownWith:Za,setInitialTree:Ka,setTree:qa,setActiveUniverse:Qa,spaceResetTransform:Ja,setViewSize:en,setSpaceSize:tn,updateSpaceTreePlane:an,updateSpaceLinkCoordinates:nn,spaceSetView:rn,spaceSetCulledView:on});var sn={getLoading:e=>e.space.loading,getTransformMatrix:e=>e.space.transform,getAnimatedTransform:e=>e.space.animatedTransform,getTransformTime:e=>e.space.transformTime,getRotationX:e=>e.space.rotationX,getRotationY:e=>e.space.rotationY,getTranslationX:e=>e.space.translationX,getTranslationY:e=>e.space.translationY,getTranslationZ:e=>e.space.translationZ,getScale:e=>e.space.scale,getTransform:e=>({rotationX:e.space.rotationX,rotationY:e.space.rotationY,translationX:e.space.translationX,translationY:e.space.translationY,translationZ:e.space.translationZ,scale:e.space.scale}),getInitialTree:e=>e.space.initialTree,getTree:e=>e.space.tree,getActiveUniverseID:e=>e.space.activeUniverseID,getView:e=>e.space.view,getViewSize:e=>e.space.viewSize,getCulledView:e=>e.space.culledView},cn=Object.freeze({__proto__:null,actions:ta,initialState:aa,reducer:(e=aa,t)=>{switch(t.type){case Xe:return Object.assign(Object.assign({},e),t.payload.space);case st:return ma(e,t);case ct:return ga(e,t);case ut:return Ta(e,t);case dt:return ha(e,t);case ft:return Ea(e,t);case pt:return _a(e,t);case mt:return Oa(e);case gt:return Sa(e);case Tt:return Ra(e);case ht:return Aa(e);case Et:return ba(e);case _t:return Ca(e);case Ot:return Ia(e);case St:return va(e);case Rt:return Pa(e);case At:return La(e);case bt:return ya(e);case Ct:return Ua(e);case vt:return wa(e,t);case Pt:return Na(e,t);case It:return Da(e);case Lt:return Ma(e);case yt:return xa(e,t);case Ut:return Fa(e,t);case wt:return ja(e);case Nt:return ka(e);case Dt:return Ga(e);case Mt:return Ya(e);case xt:return Ba(e);case Ft:return Va(e);case jt:return Xa(e,t);case kt:return $a(e,t);case Gt:return Wa(e);case Yt:return za(e);case Bt:return Ha(e,t);case Vt:return Za(e,t);case Xt:return Ka(e,t);case $t:return qa(e,t);case Wt:return Qa(e,t);case zt:return Ja(e);case Ht:return en(e,t);case Zt:return tn(e,t);case Kt:return an(e,t);case qt:return nn(e,t);case Qt:return rn(e,t);case Jt:return on(e,t);default:return Object.assign({},e)}},resolvers:ln,selectors:sn,Types:ea});const un="THEMES_SET_GENERAL_THEME",dn="THEMES_SET_INTERACTION_THEME";var fn=Object.freeze({__proto__:null,THEMES_SET_GENERAL_THEME:un,THEMES_SET_INTERACTION_THEME:dn});var pn=Object.freeze({__proto__:null,setGeneralTheme:e=>({type:un,payload:e}),setInteractionTheme:e=>({type:dn,payload:e})});const mn={general:c.plurid,interaction:c.plurid},gn=(e,t)=>Object.assign(Object.assign({},e),{general:Object.assign({},t.payload)}),Tn=(e,t)=>Object.assign(Object.assign({},e),{interaction:Object.assign({},t.payload)});var hn=Object.freeze({__proto__:null,setGeneralTheme:gn,setInteractionTheme:Tn});var En={getGeneralTheme:e=>e.themes.general,getInteractionTheme:e=>e.themes.interaction},_n=Object.freeze({__proto__:null,actions:pn,initialState:mn,reducer:(e=mn,t)=>{switch(t.type){case Xe:return Object.assign(Object.assign({},e),t.payload.themes);case un:return gn(e,t);case dn:return Tn(e,t);default:return Object.assign({},e)}},resolvers:hn,selectors:En,Types:fn});const On="SET_UI_TOOLBAR_SCROLL_POSITION";var Sn=Object.freeze({__proto__:null,SET_UI_TOOLBAR_SCROLL_POSITION:On});var Rn=Object.freeze({__proto__:null,setUIToolbarScrollPosition:e=>({type:On,payload:e})});const An={toolbarScrollPosition:0},bn=(e,t)=>Object.assign(Object.assign({},e),{toolbarScrollPosition:t.payload});var Cn=Object.freeze({__proto__:null,setUIToolbarScrollPosition:bn});var In={getToolbarScrollPosition:e=>e.ui.toolbarScrollPosition},vn={configuration:We,general:qe,shortcuts:lt,space:cn,themes:_n,ui:Object.freeze({__proto__:null,actions:Rn,initialState:An,reducer:(e=An,t)=>{switch(t.type){case Xe:return Object.assign(Object.assign({},e),t.payload.ui);case On:return bn(e,t);default:return Object.assign({},e)}},resolvers:Cn,selectors:In,Types:Sn})};const Pn=i.combineReducers({configuration:vn.configuration.reducer,general:vn.general.reducer,shortcuts:vn.shortcuts.reducer,space:vn.space.reducer,themes:vn.themes.reducer,ui:vn.ui.reducer}),Ln=e=>i.createStore(Pn,e,i.applyMiddleware(F.default)),yn=x.default.createContext({});function Un(e,t,a,n){return new(a||(a=Promise))((function(r,o){function i(e){try{s(n.next(e))}catch(e){o(e)}}function l(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(i,l)}s((n=n.apply(e,t||[])).next())}))}const wn=x.default.createContext(null);var Nn={configuration:vn.configuration.actions,general:vn.general.actions,shortcuts:vn.shortcuts.actions,space:vn.space.actions,themes:vn.themes.actions,ui:vn.ui.actions};const{direction:Dn}=a.interaction,Mn=()=>Un(void 0,void 0,void 0,(function*(){return yield Promise.resolve().then((function(){return function(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}(D.default)}))}));var xn={configuration:vn.configuration.selectors,general:vn.general.selectors,shortcuts:vn.shortcuts.selectors,space:vn.space.selectors,themes:vn.themes.selectors,ui:vn.ui.selectors};!function(e,t){void 0===t&&(t={});var a=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===a&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}("@import url('https://fonts.googleapis.com/css?family=Ubuntu&display=swap');\n");const Fn=u.createGlobalStyle`
2
- *,
3
- *:after,
4
- *:before {
5
- box-sizing: border-box;
6
- font-kerning: auto;
7
- text-rendering: optimizeLegibility;
8
- }
9
-
10
- html, body {
11
- margin: 0;
12
- height: 100%;
13
- width: 100%;
14
- }
15
-
16
- html {
17
- overflow: hidden;
18
- background: black;
19
- color: white;
20
- font-family: Ubuntu, -apple-system, BlinkMacSystemFont, Roboto,
21
- 'Open Sans', 'Helvetica Neue', 'Lucida Sans', sans-serif;
22
-
23
- /*
24
- * HACK
25
- * Prevents Chrome from going backward/forward in page history on wheel event.
26
- *
27
- * TODO
28
- * Apply it dinamically.
29
- */
30
- overscroll-behavior-x: contain;
31
- }
32
- `,jn=k.default.div`
33
- height: 100%;
34
- min-height: ${e=>e.fullHeight?"100vh":"100%"};
35
- min-height: ${e=>e.fullHeight?"-webkit-fill-available":"100%"};
36
-
37
- width: 100%;
38
- position: relative;
39
- scroll-snap-align: start;
40
- outline: none;
41
- overflow: hidden;
42
-
43
- cursor: ${e=>e.transformMode===t.TRANSFORM_MODES.TRANSLATION||e.transformMode===t.TRANSFORM_MODES.ROTATION?"all-scroll":e.transformMode===t.TRANSFORM_MODES.SCALE?"ns-resize":"initial"};
44
- user-select: ${e=>"ALL"!==e.transformMode?"none":"initial !important"};
45
- touch-action: ${e=>"ALL"!==e.transformMode?"none !important":"initial !important"};
46
- -webkit-user-drag: ${e=>"ALL"!==e.transformMode?"none":"initial !important"};
47
- -webkit-tap-highlight-color: ${e=>"ALL"!==e.transformMode?"rgba(0, 0, 0, 0)":"initial !important"};
48
- `;k.default.div`
49
- outline: none;
50
- background: ${e=>{if(e.opaque){return`radial-gradient(\n ellipse at center,\n ${"dark"===e.theme.type?e.theme.backgroundColorTertiary:e.theme.backgroundColorPrimary} 0%,\n ${"dark"===e.theme.type?e.theme.backgroundColorPrimary:e.theme.backgroundColorTertiary} 100%)\n `}return"transparent"}};
51
- `;class kn extends x.default.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e,t){}render(){return this.state.hasError?this.props.renderError?this.props.renderError:x.default.createElement("h1",null,"Something went wrong."):this.props.children}}const Gn=k.default.div`
52
- background-color: ${({transparentUI:e,mouseOver:t,theme:a,planeOpacity:n})=>{if(e&&!t)return a.backgroundColorPrimaryAlpha;if(1!==n){const e=c.decomposeColor(a.backgroundColorPrimary);if(e){return`hsla(${e.hue}, ${e.saturation}%, ${e.lightness}%, ${n})`}return"transparent"}return a.backgroundColorPrimary}};
53
- box-shadow: ${({planeOpacity:e,theme:t})=>0===e?"none":t.boxShadowUmbra};
54
- color: ${({theme:e})=>e.colorPrimary};
55
- opacity: ${({show:e})=>e?"1":"0"};
56
- user-select: ${({show:e})=>e?"auto":"none"};
57
-
58
- position: absolute;
59
- height: auto;
60
- width: 100%;
61
- font-size: 0.9rem;
62
- font-family: ${({theme:e})=>e.fontFamilySansSerif};
63
- transition: background-color 300ms linear;
64
-
65
- display: grid;
66
- grid-template-columns: 1fr;
67
- grid-template-rows: ${({planeControls:e})=>e?"56px auto":"auto"};
68
-
69
- transform-origin: 0 0 0;
70
- `,Yn=k.default.div`
71
- background-color: ${({planeOpacity:e,planeControls:t,theme:a})=>0===e?"transparent":t?a.backgroundColorDark:a.backgroundColorPrimary};
72
-
73
- position: absolute;
74
- top: 0;
75
- left: -100px;
76
- height: 30px;
77
- width: 100px;
78
- opacity: 0.5;
79
- `,Bn=o.connect((e=>({stateGeneralTheme:xn.themes.getGeneralTheme(e),stateConfiguration:xn.configuration.getConfiguration(e)})),(e=>({})),null,{context:yn})((e=>{const{stateGeneralTheme:a,stateConfiguration:n}=e,{controls:r,opacity:o}=n.elements.plane;return x.default.createElement(Yn,{theme:a,planeControls:r.show,planeOpacity:o,"data-plurid-entity":t.PLURID_ENTITY_PLANE_BRIDGE})})),Vn=k.default.div`
80
- background-color: ${({transparentUI:e,mouseOver:t,theme:a})=>e&&!t?"transparent":a.backgroundColorDark};
81
- box-shadow: ${({theme:e})=>e.boxShadowUmbraInset};
82
-
83
- width: 100%;
84
- display: grid;
85
- align-items: center;
86
- justify-content: center;
87
- grid-template-rows: 1fr;
88
- grid-template-columns: 1fr 2fr 1fr;
89
- transition: background-color 300ms linear;
90
-
91
- @media (max-width: 800px) {
92
- grid-template-columns: 1fr 3fr 1fr;
93
- }
94
- `,Xn=k.default.div`
95
- `,$n=k.default.div`
96
- width: 100%;
97
- height: 38px;
98
- position: relative;
99
- `,Wn=k.default.div`
100
- display: grid;
101
- grid-template-columns: repeat(4, 30px);
102
- padding: 0 1rem;
103
- `,{inputs:{Textline:zn}}=d.universal,Hn=o.connect((e=>({configuration:xn.configuration.getConfiguration(e),generalTheme:xn.themes.getGeneralTheme(e),interactionTheme:xn.themes.getInteractionTheme(e)})),(e=>({})),null,{context:yn})((e=>{const{plane:a,treePlane:n,mouseOver:o,configuration:i,generalTheme:l,interactionTheme:s}=e,{global:c,elements:u}=i,{transparentUI:d}=c,{pathbar:f}=u.plane.controls,{route:p,routeDivisions:m}=n,{protocol:g,host:T}=m;T.value,encodeURIComponent(p);const[h,E]=r.useState(n.route);r.useState(!1);const[_,O]=r.useState(!1);return x.default.createElement(Vn,{theme:l,mouseOver:o,transparentUI:d,"data-plurid-entity":t.PLURID_ENTITY_PLANE_CONTROLS},x.default.createElement(Xn,null),x.default.createElement($n,null,x.default.createElement(zn,{theme:s,text:h,atChange:e=>{if(E(e.target.value),f.onChange){const t=a.route.absolute;f.onChange(e,t)}},atKeyDown:e=>{if(_||O(!0),"Escape"===e.key&&O(!1),f.onKeyDown){const t=a.route.absolute;f.onKeyDown(e,t)}},ariaLabel:"Plurid Pathbar"})),x.default.createElement(Wn,null))})),Zn=k.default.div`
104
- position: relative;
105
- `,Kn=e=>{const{children:a}=e,n=r.useRef(null);return x.default.createElement(Zn,{ref:n,"data-plurid-entity":t.PLURID_ENTITY_PLANE_CONTENT},a)},qn=o.connect((e=>({stateViewSize:xn.space.getViewSize(e),stateGeneralTheme:xn.themes.getGeneralTheme(e),stateConfiguration:xn.configuration.getConfiguration(e)})),(e=>({dispatchUpdateSpaceTreePlane:t=>e(Nn.space.updateSpaceTreePlane(t))})),null,{context:yn})((e=>{const{planeID:n,plane:o,treePlane:i,children:l,stateViewSize:c,stateGeneralTheme:u,stateConfiguration:d,dispatchUpdateSpaceTreePlane:f}=e,{global:p,elements:m}=d,{transparentUI:g}=p,{controls:T,width:h,opacity:E}=m.plane,_=T.show;s.mathematics.numbers.checkIntegerNonUnit(h)||c.width;const O=r.useContext(wn);if(!O)return x.default.createElement(x.default.Fragment,null);const{planeRenderError:S}=O,[R,A]=r.useState(!1),b={};return x.default.createElement(Gn,{suppressHydrationWarning:!0,theme:u,planeControls:_,planeOpacity:E,show:i.show,id:n,style:{width:"100%",transform:a.cleanTemplate(`\n translateX(${i.location.translateX}px)\n translateY(${i.location.translateY}px)\n translateZ(${i.location.translateZ}px)\n rotateX(${i.location.rotateX}deg)\n rotateY(${i.location.rotateY}deg)\n `)},onMouseEnter:()=>A(!0),onMouseLeave:()=>A(!1),transparentUI:g,mouseOver:R,"data-plurid-plane":n,"data-plurid-entity":t.PLURID_ENTITY_PLANE},i.show&&x.default.createElement(x.default.Fragment,null,i.parentPlaneID&&x.default.createElement(Bn,null),_&&x.default.createElement(Hn,{plane:o,treePlane:i,mouseOver:R}),S?x.default.createElement(kn,{renderError:"boolean"!=typeof S?S:void 0},x.default.createElement(Kn,Object.assign({},b),l)):x.default.createElement(Kn,Object.assign({},b),l)))})),Qn=e=>!!e&&("string"!=typeof e&&!e.url),Jn=k.default.div`
106
- transform-style: preserve-3d;
107
- `,{getPlanesRegistrar:er,getRegisteredPlane:tr}=a.planes,ar=o.connect((e=>({})),(e=>({})),null,{context:yn})((e=>{const{plane:a}=e,{location:n}=a,o=r.useContext(wn);if(!o)return x.default.createElement(x.default.Fragment,null);const{planesRegistrar:i,planeContext:l,planeContextValue:s,customPlane:c,matchedRoute:u}=o,d=c,[f,p]=r.useState([]),m=e=>{if(!e.children)return;const t=er(i);e.children.map((e=>{if(!t)return;const a=e.sourceID,n=t.get(a);let r=x.default.createElement(x.default.Fragment,null);if(n){const t=n.component,a={plane:{value:n.route.absolute,planeID:e.planeID,parentPlaneID:e.parentPlaneID,fragments:n.route.fragments,parameters:n.route.parameters,query:n.route.query},route:{value:(null==u?void 0:u.match.value)||"",parameters:(null==u?void 0:u.match.parameters)||{},query:(null==u?void 0:u.match.query)||{}}},o={plurid:Object.assign({},a)},i=Qn(t),c=Qn(d);r=d?c?x.default.createElement(d,{key:e.planeID,plane:n,treePlane:e,planeID:e.planeID,location:e.location}):x.default.createElement(x.default.Fragment,null):i?x.default.createElement(qn,{key:e.planeID,plane:n,treePlane:e,planeID:e.planeID,location:e.location},l?x.default.createElement(l.Provider,{value:s},x.default.createElement(t,Object.assign({},o))):x.default.createElement(t,Object.assign({},o))):x.default.createElement(x.default.Fragment,null),p((e=>[...e,r]))}e.children&&m(e)}))};r.useEffect((()=>{p([]),m(a)}),[JSON.stringify(a)]);const g=a.sourceID;if(!g)return x.default.createElement(x.default.Fragment,null);const T=tr(g,i);if(!T)return x.default.createElement(x.default.Fragment,null);const h=T.component,E={plane:{value:T.route.absolute,planeID:a.planeID,parentPlaneID:a.parentPlaneID,fragments:T.route.fragments,parameters:T.route.parameters,query:T.route.query},route:{value:(null==u?void 0:u.match.value)||"",parameters:(null==u?void 0:u.match.parameters)||{},query:(null==u?void 0:u.match.query)||{}}},_={plurid:Object.assign({},E)};return d?"function"!=typeof d?x.default.createElement(x.default.Fragment,null):x.default.createElement(Jn,{"data-plurid-entity":t.PLURID_ENTITY_ROOT},x.default.createElement(d,{plane:T,treePlane:a,planeID:a.planeID,location:n}),f):x.default.createElement(Jn,{"data-plurid-entity":t.PLURID_ENTITY_ROOT},x.default.createElement(qn,{plane:T,treePlane:a,planeID:a.planeID,location:n},l?x.default.createElement(l.Provider,{value:s},x.default.createElement(h,Object.assign({},_))):x.default.createElement(h,Object.assign({},_))),f)})),nr=k.default.div`
108
- transform-style: preserve-3d;
109
- transform-origin: 0 0 0;
110
- `,rr=o.connect((e=>({stateConfiguration:xn.configuration.getConfiguration(e),spaceTransformMatrix:xn.space.getTransformMatrix(e),spaceAnimatedTransform:xn.space.getAnimatedTransform(e),spaceTransformTime:xn.space.getTransformTime(e),stateTree:xn.space.getTree(e)})),(e=>({})),null,{context:yn})((e=>{const{spaceTransformMatrix:a,spaceAnimatedTransform:n,spaceTransformTime:r,stateTree:o}=e;return x.default.createElement(nr,{suppressHydrationWarning:!0,style:{width:"100%",height:"undefined"!=typeof window?window.innerHeight+"px":"821px",transform:a,transition:n?`transform ${r}ms ease-in-out`:"initial"},"data-plurid-entity":t.PLURID_ENTITY_ROOTS},o.map((e=>x.default.createElement(ar,{key:e.planeID,plane:e}))))})),or=u.keyframes`
111
- from {
112
- opacity: 0%;
113
- }
114
-
115
- to {
116
- opacity: 100%;
117
- }
118
- `,ir=e=>u.css`${or} ${e}ms linear 100ms forwards`,lr=k.default.div`
119
- position: relative;
120
- height: 100%;
121
- overflow: hidden;
122
- perspective: 2000px;
123
- outline: none;
124
-
125
- background: ${({opaque:e,theme:t})=>{if(e){return`radial-gradient(\n ellipse at center,\n ${"dark"===t.type?t.backgroundColorTertiary:t.backgroundColorPrimary} 0%,\n ${"dark"===t.type?t.backgroundColorPrimary:t.backgroundColorTertiary} 100%)\n `}return"transparent"}};
126
-
127
- /* TOFIX */
128
- /* opacity: ${({fadeInTime:e})=>e?"0":"1"};
129
- animation: ${({isMounted:e,fadeInTime:t})=>e&&t?ir(t):""}; */
130
- `,sr=o.connect((e=>({stateConfiguration:xn.configuration.getConfiguration(e),stateGeneralTheme:xn.themes.getGeneralTheme(e)})),(e=>({})),null,{context:yn})((e=>{const{stateConfiguration:a,stateGeneralTheme:n}=e,{space:o}=a,{opaque:i,fadeInTime:l}=o,[s,c]=r.useState(!1);return r.useEffect((()=>{c(!0)}),[]),x.default.createElement(lr,{theme:n,opaque:i,isMounted:s,fadeInTime:l,"data-plurid-entity":t.PLURID_ENTITY_SPACE},x.default.createElement(rr,null))})),cr=({size:e})=>{switch(e){case t.SIZES.SMALL:return"5px";case t.SIZES.NORMAL:return"10px";case t.SIZES.LARGE:return"15px";default:return"10px"}},ur=k.default.div`
131
- background-color: ${({theme:e})=>e.backgroundColorTertiaryAlpha};
132
- height: ${cr};
133
- width: ${cr};
134
-
135
- position: absolute;
136
- top: 50%;
137
- left: 50%;
138
- transform: translateX(-50%) translateY(-50%);
139
- z-index: 99999;
140
- border-radius: 100px;
141
- user-select: none;
142
- pointer-events: none;
143
- touch-action: none;
144
- `,dr=o.connect((e=>({stateGeneralTheme:xn.themes.getGeneralTheme(e),stateInteractionTheme:xn.themes.getInteractionTheme(e),stateConfiguration:xn.configuration.getConfiguration(e)})),(e=>({})),null,{context:yn})((e=>{const{stateGeneralTheme:a,stateConfiguration:n}=e,{space:r}=n,{transformOrigin:o}=r,{show:i,size:l}=o;return i?x.default.createElement(ur,{theme:a,size:l,"data-plurid-entity":t.PLURID_ENTITY_TRANSFORM_ORIGIN}):x.default.createElement(x.default.Fragment,null)}));var fr;!function(e){e.NONE="NONE",e.UNIVERSES="UNIVERSES",e.MORE="MORE"}(fr||(fr={}));const pr=k.default.div`
145
- bottom: ${({conceal:e,mouseIn:t})=>e?t?"-5px":"-55px":"-5px"};
146
- pointer-events: ${({showMenu:e})=>e!==fr.NONE?"all":"none"};
147
- opacity: ${({fadeInTime:e})=>e?"0":"1"};
148
- animation: ${({fadeInTime:e,isMounted:t})=>t&&e?ir(e):""};
149
-
150
- display: grid;
151
- position: absolute;
152
- left: 0;
153
- right: 0;
154
- height: 75px;
155
- z-index: 9999;
156
- transition: bottom 300ms ease-in-out;
157
- `,mr=k.default.div`
158
- color: ${({theme:e})=>e.colorPrimary};
159
- background-color: ${({theme:e,transparentUI:t})=>t?e.backgroundColorPrimaryAlpha:e.backgroundColorSecondary};
160
- box-shadow: ${({theme:e})=>e.boxShadowUmbra};
161
- grid-template-columns: ${({showIcons:e,showTransformButtons:t,documentsBased:a})=>e&&!t?a?"repeat(6, minmax(min-content, 40px))":"repeat(5, minmax(min-content, 40px))":t?a?"40px 200px 200px 200px 40px 40px":"40px 200px 200px 200px 40px":a?"repeat(6, minmax(min-content, 40px))":"repeat(5, minmax(min-content, 40px))"};
162
- opacity: ${({opaque:e,mouseIn:t})=>e||t?"1":"0.4"};
163
-
164
- z-index: 9999;
165
- user-select: none;
166
- /* height: 75px; */
167
- display: grid;
168
- pointer-events: all;
169
- display: grid;
170
- align-items: center;
171
- justify-content: center;
172
- justify-items: center;
173
- border-radius: 22.5px;
174
- margin: 0 auto;
175
- margin-top: 10px;
176
- margin-bottom: 20px;
177
- padding: 0 22.5px;
178
- font-size: 12px;
179
- height: 45px;
180
- transition: opacity 300ms ease-in-out;
181
-
182
- :after {
183
- content: '';
184
- position: absolute;
185
- top: 55px;
186
- left: 0;
187
- right: 0;
188
- height: 20px;
189
- }
190
- `,gr=k.default.div`
191
- padding: ${({button:e,showIcons:t,showTransformButtons:a})=>e||t&&!a?"0":"0 7px"};
192
- background-color: ${({active:e,theme:t})=>e?t.backgroundColorTertiary:"transparent"};
193
- min-width: ${({button:e})=>e?"40px":"70px"};
194
-
195
- height: 45px;
196
- display: grid;
197
- align-items: center;
198
- justify-content: center;
199
- cursor: pointer;
200
- user-select: none;
201
-
202
- :hover {
203
- background: ${({theme:e})=>e.backgroundColorTertiary};
204
- }
205
- `,Tr=k.default.div`
206
- width: 40px;
207
- display: grid;
208
- place-content: center;
209
-
210
- /* svg {
211
- height: 15px;
212
- width: 15px;
213
- fill: white;
214
- } */
215
- `,hr=k.default.div`
216
- position: absolute;
217
- bottom: 75px;
218
- max-height: 250px;
219
- width: 380px;
220
- left: 50%;
221
- transform: translateX(-50%);
222
- border-radius: 22.5px;
223
- padding: 22px;
224
- font-size: 0.8rem;
225
- overflow: hidden;
226
-
227
- background-color: ${e=>e.theme.backgroundColorSecondary};
228
- box-shadow: ${e=>e.theme.boxShadowUmbra};
229
-
230
- ul {
231
- padding: 0;
232
- list-style: none;
233
- }
234
- `;k.default.div`
235
- display: flex;
236
- justify-content: space-between;
237
- align-items: center;
238
- position: relative;
239
-
240
- margin-bottom: ${e=>e.afterline?"30px":"10px"};
241
-
242
- ${e=>e.afterline?"\n ::after {\n position: absolute;\n content: '';\n left: 0;\n right: 0;\n bottom: -15px;\n height: 1px;\n background-color: white;\n }\n ":""};
243
- `;const Er=k.default.div`
244
- max-height: 210px;
245
- overflow: scroll;
246
- padding: 0 5px;
247
-
248
- /* Hide Scrollbar */
249
- scrollbar-width: none; /* Firefox 64 */
250
- -ms-overflow-style: none; /* Internet Explorer 11 */
251
- ::-webkit-scrollbar { /** WebKit */
252
- display: none;
253
- }
254
-
255
- h5::first-child {
256
- margin-top: 0;
257
- }
258
- `;k.default.li`
259
- margin: 10px 0;
260
- padding: 10px 20px;
261
- border-radius: 100px;
262
-
263
- cursor: ${e=>e.active?"initial":"pointer"};
264
- background-color: ${e=>e.active?e.theme.backgroundColorTertiary:""};
265
- box-shadow: ${e=>e.active?"inset 0px -1px 6px 0px "+e.theme.boxShadowUmbraColor:""};
266
-
267
- :hover {
268
- background-color: ${e=>e.theme.backgroundColorTertiary};
269
- box-shadow: ${e=>e.active?"inset 0px -1px 6px 0px "+e.theme.boxShadowUmbraColor:e.theme.boxShadowUmbra};
270
- }
271
- `;const _r=o.connect((e=>({interactionTheme:xn.themes.getInteractionTheme(e),activeUniverseID:xn.space.getActiveUniverseID(e)})),(e=>({dispatchSetActiveUniverse:t=>e(Nn.space.setActiveUniverse(t))})),null,{context:yn})((e=>{const{interactionTheme:t,activeUniverseID:a,dispatchSetActiveUniverse:n}=e;return x.default.createElement(hr,{theme:t},x.default.createElement(Er,null))})),Or=k.default.div`
272
- h5 {
273
- font-size: 1rem;
274
- margin: 0;
275
- }
276
-
277
- margin-bottom: 2rem;
278
- border-top-left-radius: 15px;
279
- border-top-right-radius: 15px;
280
-
281
- padding-bottom: ${e=>e.transparentUI&&e.toggled?"0.5rem":"0"};
282
- background-color: ${e=>e.transparentUI&&e.mouseOver?e.theme.backgroundColorSecondary:"transparent"};
283
- box-shadow: ${e=>e.transparentUI&&e.mouseOver?e.theme.boxShadowUmbra:"none"};
284
- color: ${e=>e.theme.colorPrimary};
285
- `,Sr=k.default.div`
286
- user-select: none;
287
- cursor: pointer;
288
- padding: 0.5rem;
289
- margin-bottom: 0.5rem;
290
- border-bottom: 1px solid transparent;
291
- text-align: left;
292
-
293
- :hover {
294
- border-bottom: 1px solid ${e=>e.theme.colorPrimary};
295
- }
296
- `,Rr=k.default.div`
297
- `,{typography:{Heading:Ar}}=d.universal,br=o.connect((e=>({interactionTheme:xn.themes.getInteractionTheme(e),configuration:xn.configuration.getConfiguration(e)})),(e=>({})),null,{context:yn})((e=>{const{heading:t,items:a,toggled:n,toggle:o,interactionTheme:i,configuration:l}=e,{global:s}=l,{transparentUI:c}=s,[u,d]=r.useState(!1);return x.default.createElement(Or,{theme:i,onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),transparentUI:c,mouseOver:u,toggled:n},x.default.createElement(Sr,{theme:i,onClick:()=>o()},x.default.createElement(Ar,{theme:i,type:"h5"},t)),n&&x.default.createElement(Rr,null,a))})),Cr=k.default.div`
298
- position: absolute;
299
- bottom: 75px;
300
- height: 280px;
301
- width: 380px;
302
- left: 50%;
303
- transform: translateX(-50%);
304
- border-radius: 22.5px;
305
- padding: 22px;
306
- font-size: 0.8rem;
307
- overflow: hidden;
308
-
309
- background-color: ${e=>e.transparentUI?e.theme.backgroundColorPrimaryAlpha:e.theme.backgroundColorSecondary};
310
- box-shadow: ${e=>e.theme.boxShadowUmbra};
311
- `,Ir=k.default.div`
312
- display: flex;
313
- justify-content: space-between;
314
- align-items: center;
315
- position: relative;
316
- min-height: 30px;
317
- padding: 0 0.5rem;
318
-
319
- margin-bottom: ${e=>e.last?"0":e.afterline?"30px":"10px"};
320
-
321
- ${e=>e.afterline?`\n ::after {\n position: absolute;\n content: '';\n left: 0;\n right: 0;\n bottom: -15px;\n height: 1px;\n background-color: ${e.theme?e.theme.colorPrimary:"white"};\n }\n `:""};
322
- `,vr=k.default.div`
323
- height: 240px;
324
- overflow: scroll;
325
- padding: 0 5px;
326
-
327
- /* Hide Scrollbar */
328
- scrollbar-width: none; /* Firefox 64 */
329
- -ms-overflow-style: none; /* Internet Explorer 11 */
330
- ::-webkit-scrollbar { /** WebKit */
331
- display: none;
332
- }
333
-
334
- h5::first-child {
335
- margin-top: 0;
336
- }
337
- `,{inputs:{Dropdown:Pr}}=d.universal,Lr=o.connect((e=>({stateLanguage:xn.configuration.getConfiguration(e).global.language,interactionTheme:xn.themes.getInteractionTheme(e),configuration:xn.configuration.getConfiguration(e)})),(e=>({dispatchSetConfigurationThemeGeneralAction:t=>e(Nn.configuration.setConfigurationThemeGeneralAction(t)),dispatchSetConfigurationThemeInteractionAction:t=>e(Nn.configuration.setConfigurationThemeInteractionAction(t)),dispatchSetConfigurationLanguage:t=>e(Nn.configuration.setConfigurationLanguageAction(t)),dispatchSetGeneralTheme:t=>e(Nn.themes.setGeneralTheme(t)),dispatchSetInteractionTheme:t=>e(Nn.themes.setInteractionTheme(t))})),null,{context:yn})((e=>{const{stateLanguage:n,interactionTheme:o,configuration:i,dispatchSetGeneralTheme:l,dispatchSetInteractionTheme:s,dispatchSetConfigurationThemeGeneralAction:c,dispatchSetConfigurationThemeInteractionAction:u,dispatchSetConfigurationLanguage:d}=e,f=i.global.theme,[p,m]=r.useState("object"==typeof f?f.general:f),[g,T]=r.useState("object"==typeof f?f.interaction:f);return r.useEffect((()=>{"object"==typeof f?(m(f.general),T(f.interaction)):(m(f),T(f))}),[f]),x.default.createElement(x.default.Fragment,null,x.default.createElement(Ir,null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerGlobalGeneralTheme),x.default.createElement(Pr,{selectables:Object.keys(j.default),selected:"string"==typeof p?p:"",atSelect:e=>(e=>{l(j.default[e]),c(e)})(e),theme:o,filterable:!0,heightItems:3,width:90,style:{fontSize:"0.8rem"}})),x.default.createElement(Ir,null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerGlobalInteractionTheme),x.default.createElement(Pr,{selectables:Object.keys(j.default),selected:"string"==typeof g?g:"",atSelect:e=>(e=>{s(j.default[e]),u(e)})(e),theme:o,heightItems:3,filterable:!0,width:90,style:{fontSize:"0.8rem"}})),x.default.createElement(Ir,{last:!0},a.internatiolate(n,t.internationalization.fields.toolbarDrawerGlobalLanguage),x.default.createElement(Pr,{selectables:t.internationalization.languages,selected:n,atSelect:e=>{d(e)},theme:o,heightItems:3,width:90,style:{fontSize:"0.8rem"}})))})),{inputs:{Switch:yr}}=d.universal,Ur=o.connect((e=>({stateLanguage:xn.configuration.getConfiguration(e).global.language,interactionTheme:xn.themes.getInteractionTheme(e),configuration:xn.configuration.getConfiguration(e)})),(e=>({dispatchToggleConfigurationSpaceTransformMultimode:t=>e(Nn.configuration.toggleConfigurationSpaceTransformMultimode(t)),dispatchSetConfigurationSpaceTransformTouch:t=>e(Nn.configuration.setConfigurationSpaceTransformTouch(t)),dispatchSetConfigurationSpaceTransformLocks:t=>e(Nn.configuration.setConfigurationSpaceTransformLocks(t))})),null,{context:yn})((e=>{const{stateLanguage:n,interactionTheme:r,configuration:o,dispatchToggleConfigurationSpaceTransformMultimode:i,dispatchSetConfigurationSpaceTransformTouch:l,dispatchSetConfigurationSpaceTransformLocks:s}=e,{transformMultimode:c,transformLocks:u,transformTouch:d}=o.space;return x.default.createElement(x.default.Fragment,null,x.default.createElement(Ir,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerTransformMultiModeTransform)),x.default.createElement(yr,{theme:r,checked:c,atChange:()=>i(!c),exclusive:!0,level:2})),x.default.createElement(Ir,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerTransformAllowRotationX)),x.default.createElement(yr,{theme:r,checked:u.rotationX,atChange:()=>s("rotationX"),exclusive:!0,level:2})),x.default.createElement(Ir,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerTransformAllowRotationY)),x.default.createElement(yr,{theme:r,checked:u.rotationY,atChange:()=>s("rotationY"),exclusive:!0,level:2})),x.default.createElement(Ir,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerTransformAllowTranslationX)),x.default.createElement(yr,{theme:r,checked:u.translationX,atChange:()=>s("translationX"),exclusive:!0,level:2})),x.default.createElement(Ir,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerTransformAllowTranslationY)),x.default.createElement(yr,{theme:r,checked:u.translationY,atChange:()=>s("translationY"),exclusive:!0,level:2})),x.default.createElement(Ir,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerTransformAllowTranslationZ)),x.default.createElement(yr,{theme:r,checked:u.translationZ,atChange:()=>s("translationZ"),exclusive:!0,level:2})),x.default.createElement(Ir,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerTransformAllowScale)),x.default.createElement(yr,{theme:r,checked:u.scale,atChange:()=>s("scale"),exclusive:!0,level:2})),x.default.createElement(Ir,{last:!0},x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerTransformTouchTransform),": ",d===t.TRANSFORM_TOUCHES.PAN?"pan":"swipe"),x.default.createElement(yr,{theme:r,checked:d===t.TRANSFORM_TOUCHES.PAN,atChange:()=>d===t.TRANSFORM_TOUCHES.PAN?l(t.TRANSFORM_TOUCHES.SWIPE):l(t.TRANSFORM_TOUCHES.PAN),level:2})))})),{inputs:{Dropdown:wr,Switch:Nr,Slider:Dr}}=d.universal,Mr=o.connect((e=>({interactionTheme:xn.themes.getInteractionTheme(e),configuration:xn.configuration.getConfiguration(e)})),(e=>({dispatchSetConfigurationPlaneOpacity:t=>e(Nn.configuration.setConfigurationPlaneOpacity(t)),dispatchToggleConfigurationSpaceTransparentUI:()=>e(Nn.configuration.toggleConfigurationSpaceTransparentUI()),dispatchToggleConfigurationSpaceShowTransformOrigin:()=>e(Nn.configuration.toggleConfigurationSpaceShowTransformOrigin()),dispatchSetConfigurationSpaceTransformOriginSize:t=>e(Nn.configuration.setConfigurationSpaceTransformOriginSize(t)),dispatchSetConfigurationSpaceLayoutType:t=>e(Nn.configuration.setConfigurationSpaceLayoutType(t))})),null,{context:yn})((e=>{const{interactionTheme:n,configuration:r,dispatchSetConfigurationPlaneOpacity:o,dispatchToggleConfigurationSpaceTransparentUI:i,dispatchToggleConfigurationSpaceShowTransformOrigin:l,dispatchSetConfigurationSpaceTransformOriginSize:s,dispatchSetConfigurationSpaceLayoutType:c}=e,{global:u,space:d,elements:f}=r,{transparentUI:p,language:m}=u,{layout:g,transformOrigin:T}=d,h=t.layoutNames[g.type],{show:E,size:_}=T,O=f.plane.opacity;return x.default.createElement(x.default.Fragment,null,x.default.createElement(Ir,null,a.internatiolate(m,t.internationalization.fields.toolbarDrawerSpaceTransparentUserInterface),x.default.createElement(Nr,{checked:p,atChange:()=>i(),exclusive:!0,level:2,theme:n})),x.default.createElement(Ir,null,a.internatiolate(m,t.internationalization.fields.toolbarDrawerSpaceShowTransformOrigin),x.default.createElement(Nr,{checked:E,atChange:()=>l(),exclusive:!0,level:2,theme:n})),x.default.createElement(Ir,null,a.internatiolate(m,t.internationalization.fields.toolbarDrawerSpaceTransformOriginSize),x.default.createElement(wr,{selectables:["small","normal","large"],selected:_.toLowerCase(),atSelect:e=>{const a=e.toUpperCase();a!==t.SIZES.SMALL&&a!==t.SIZES.NORMAL&&a!==t.SIZES.LARGE||s(a)},heightItems:3,theme:n})),x.default.createElement(Ir,null,a.internatiolate(m,t.internationalization.fields.toolbarDrawerSpacePlaneOpacity),x.default.createElement(Dr,{value:O,max:1,min:0,step:.1,defaultValue:100,atChange:e=>o(e),thumbSize:"large",level:2,theme:n})),x.default.createElement(Ir,{last:!0},a.internatiolate(m,t.internationalization.fields.toolbarDrawerSpaceLayoutType),x.default.createElement(wr,{selectables:[...Object.values(t.layoutNames)],selected:h,atSelect:e=>{const t=e.toUpperCase().replace(/\s/g,"_");c(t)},heightItems:3,theme:n,width:100})))})),{inputs:{Switch:xr}}=d.universal,Fr=o.connect((e=>({stateLanguage:xn.configuration.getConfiguration(e).global.language,interactionTheme:xn.themes.getInteractionTheme(e),configuration:xn.configuration.getConfiguration(e),viewSize:xn.space.getViewSize(e)})),(e=>({dispatchToggleConfigurationToolbarConceal:()=>e(Nn.configuration.toggleConfigurationToolbarConceal()),dispatchToggleConfigurationToolbarTransformIcons:()=>e(Nn.configuration.toggleConfigurationToolbarTransformIcons()),dispatchToggleConfigurationToolbarTransformButtons:()=>e(Nn.configuration.toggleConfigurationToolbarTransformButtons()),dispatchToggleConfigurationToolbarOpaque:()=>e(Nn.configuration.toggleConfigurationToolbarOpaque())})),null,{context:yn})((e=>{const{stateLanguage:n,interactionTheme:o,configuration:i,viewSize:l,dispatchToggleConfigurationToolbarConceal:s,dispatchToggleConfigurationToolbarTransformIcons:c,dispatchToggleConfigurationToolbarTransformButtons:u,dispatchToggleConfigurationToolbarOpaque:d}=e,{toolbar:f}=i.elements,{conceal:p,opaque:m,transformIcons:g,transformButtons:T}=f,[h,E]=r.useState(!1);return r.useEffect((()=>{l.width<800?E(!0):E(!1)}),[l.width]),x.default.createElement(x.default.Fragment,null,x.default.createElement(Ir,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerToolbarAlwaysOpaque)),x.default.createElement(xr,{theme:o,checked:m,atChange:()=>d(),exclusive:!0,level:2})),x.default.createElement(Ir,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerToolbarShowTransformIcons)),x.default.createElement(xr,{theme:o,checked:g,atChange:()=>c(),exclusive:!0,level:2})),!h&&x.default.createElement(Ir,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerToolbarShowTransformArrows)),x.default.createElement(xr,{theme:o,checked:T,atChange:()=>u(),exclusive:!0,level:2})),x.default.createElement(Ir,{last:!0},x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerToolbarConcealToolbar)),x.default.createElement(xr,{theme:o,checked:p,atChange:()=>s(),exclusive:!0,level:2})))})),{inputs:{Switch:jr}}=d.universal,kr=o.connect((e=>({stateLanguage:xn.configuration.getConfiguration(e).global.language,interactionTheme:xn.themes.getInteractionTheme(e),configuration:xn.configuration.getConfiguration(e)})),(e=>({dispatchToggleConfigurationViewcubeHide:t=>e(Nn.configuration.toggleConfigurationViewcubeHide(t)),dispatchToggleConfigurationViewcubeButtons:t=>e(Nn.configuration.toggleConfigurationViewcubeButtons(t)),dispatchToggleConfigurationViewcubeOpaque:t=>e(Nn.configuration.toggleConfigurationViewcubeOpaque(t)),dispatchToggleConfigurationViewcubeConceal:()=>e(Nn.configuration.toggleConfigurationViewcubeConceal())})),null,{context:yn})((e=>{const{stateLanguage:n,interactionTheme:r,configuration:o,dispatchToggleConfigurationViewcubeHide:i,dispatchToggleConfigurationViewcubeButtons:l,dispatchToggleConfigurationViewcubeOpaque:s,dispatchToggleConfigurationViewcubeConceal:c}=e,{viewcube:u}=o.elements,{show:d,buttons:f,opaque:p,conceal:m}=u;return x.default.createElement(x.default.Fragment,null,x.default.createElement(Ir,{last:!d},x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerViewcubeShowViewcube)),x.default.createElement(jr,{theme:r,checked:d,atChange:()=>i(!d),exclusive:!0,level:2})),d&&x.default.createElement(x.default.Fragment,null,x.default.createElement(Ir,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerViewcubeShowTransformButtons)),x.default.createElement(jr,{theme:r,checked:f,atChange:()=>l(!f),exclusive:!0,level:2})),x.default.createElement(Ir,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerViewcubeAlwaysOpaque)),x.default.createElement(jr,{theme:r,checked:p,atChange:()=>s(!p),exclusive:!0,level:2})),x.default.createElement(Ir,{last:!0},x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerViewcubeConcealViewcube)),x.default.createElement(jr,{theme:r,checked:m,atChange:()=>c(),exclusive:!0,level:2}))))})),{inputs:{Slider:Gr}}=d.universal,Yr=o.connect((e=>({stateLanguage:xn.configuration.getConfiguration(e).global.language,stateConfiguration:xn.configuration.getConfiguration(e),stateInteractionTheme:xn.themes.getInteractionTheme(e)})),(e=>({dispatchSetConfigurationSpaceCullingDistance:t=>e(Nn.configuration.setConfigurationSpaceCullingDistance(t))})),null,{context:yn})((e=>{const{stateLanguage:n,stateConfiguration:o,stateInteractionTheme:i,dispatchSetConfigurationSpaceCullingDistance:l}=e,{cullingDistance:s}=o.space,[c,u]=r.useState(s),d=p.useDebouncedCallback((e=>{l(e)}),300);return x.default.createElement(x.default.Fragment,null,x.default.createElement(Ir,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerTechnicalCullingDistance)),x.default.createElement(Gr,{theme:i,value:c,atChange:e=>{u(e),d(e)},min:1e3,max:5e3,defaultValue:1500})))})),Br=o.connect((e=>({interactionTheme:xn.themes.getInteractionTheme(e),configuration:xn.configuration.getConfiguration(e)})),(e=>({})),null,{context:yn})((e=>{const{interactionTheme:n,configuration:r}=e,{global:o}=r,{language:i}=o;return x.default.createElement(x.default.Fragment,null,t.defaultShortcuts.map(((e,r)=>{const{type:o}=e,l=t.shortcutsNames[o],{name:s,internationalizedKey:c,key:u,modifier:d}=l,f=Array.isArray(d)?d.reduce(((e,t)=>e+" + "+t))+" +":"string"==typeof d?d+" +":"",p=a.internatiolate(i,s),m=u,g=c?a.internatiolate(i,m):u;return x.default.createElement(Ir,{key:s,theme:n,afterline:"TURN_DOWN"===o||"TOGGLE_ROTATE"===o||"TOGGLE_TRANSLATE"===o,last:r===t.defaultShortcuts.length-1},x.default.createElement("div",null,p),x.default.createElement("div",null,f," ",g))})))})),Vr={GLOBAL:{name:t.internationalization.fields.toolbarDrawerGlobalTitle,drawer:t.TOOLBAR_DRAWERS.GLOBAL,component:x.default.createElement(Lr,null)},TRANSFORM:{name:t.internationalization.fields.toolbarDrawerTransformTitle,drawer:t.TOOLBAR_DRAWERS.TRANSFORM,component:x.default.createElement(Ur,null)},SPACE:{name:t.internationalization.fields.toolbarDrawerSpaceTitle,drawer:t.TOOLBAR_DRAWERS.SPACE,component:x.default.createElement(Mr,null)},TOOLBAR:{name:t.internationalization.fields.toolbarDrawerToolbarTitle,drawer:t.TOOLBAR_DRAWERS.TOOLBAR,component:x.default.createElement(Fr,null)},VIEWCUBE:{name:t.internationalization.fields.toolbarDrawerViewcubeTitle,drawer:t.TOOLBAR_DRAWERS.VIEWCUBE,component:x.default.createElement(kr,null)},TECHNICAL:{name:t.internationalization.fields.toolbarDrawerTechnicalTitle,drawer:t.TOOLBAR_DRAWERS.TECHNICAL,component:x.default.createElement(Yr,null)},SHORTCUTS:{name:t.internationalization.fields.toolbarDrawerShortcutsTitle,drawer:t.TOOLBAR_DRAWERS.SHORTCUTS,component:x.default.createElement(Br,null)}},Xr=Object.values(Vr),$r=o.connect((e=>({stateLanguage:xn.configuration.getConfiguration(e).global.language,stateInteractionTheme:xn.themes.getInteractionTheme(e),stateConfiguration:xn.configuration.getConfiguration(e),stateToolbarMenuScrollPosition:xn.ui.getToolbarScrollPosition(e)})),(e=>({dispatchToggleConfigurationToolbarToggleDrawer:t=>e(Nn.configuration.toggleConfigurationToolbarToggleDrawer(t)),dispatchSetUIToolbarScrollPosition:t=>e(Nn.ui.setUIToolbarScrollPosition(t))})),null,{context:yn})((e=>{const{stateLanguage:t,stateInteractionTheme:n,stateConfiguration:o,stateToolbarMenuScrollPosition:i,dispatchToggleConfigurationToolbarToggleDrawer:l,dispatchSetUIToolbarScrollPosition:s}=e,{global:c,elements:u}=o,{transparentUI:d}=c,{toolbar:f}=u,{drawers:m,toggledDrawers:g}=f,T=(e=>{if(0===e.length||e.includes("ALL"))return Xr;const t=[];for(const a of e){const e=Vr[a];t.push(e)}return t})(m),h=r.useRef(null),E=p.useDebouncedCallback((e=>{if(h.current){const e=h.current.scrollTop;s(e)}}),100);return r.useEffect((()=>(h.current&&h.current.addEventListener("wheel",E),()=>{h.current&&h.current.removeEventListener("wheel",E)})),[h.current]),r.useEffect((()=>{h.current&&(h.current.scrollTop=i)}),[i,h.current]),x.default.createElement(Cr,{theme:n,transparentUI:d},x.default.createElement(vr,{ref:h},T.map((e=>{const{name:n,drawer:r,component:o}=e,i=a.internatiolate(t,n);return x.default.createElement(br,{key:n,heading:i,items:x.default.createElement(x.default.Fragment,null,o),toggled:g.includes("ALL")||g.includes(r),toggle:()=>l(r)})}))))})),Wr=k.default.div`
338
- display: grid;
339
- align-items: center;
340
- justify-items: center;
341
- grid-template-columns: ${e=>e.showTransformButtons?"30px 30px 60px 30px 30px":"1fr"};
342
- `,zr=k.default.div`
343
- user-select: none;
344
- cursor: pointer;
345
- border-radius: 50px;
346
- width: 25px;
347
- height: 25px;
348
- display: grid;
349
- place-content: center;
350
- padding: 2px;
351
-
352
- background-color: ${({pressed:e,theme:t})=>e?t.backgroundColorTertiary:"initial"};
353
-
354
- :hover {
355
- background-color: ${({theme:e})=>e.backgroundColorTertiary};
356
- }
357
- `,Hr={left:"◀",right:"▶",up:"▲",down:"▼"},Zr=o.connect((e=>({interactionTheme:xn.themes.getInteractionTheme(e)})),(e=>({})),null,{context:yn})((e=>{const{direction:t,transform:a,interactionTheme:n}=e,o=Hr[t],i=r.useRef(null),l=r.useRef(null),[s,c]=r.useState(!1),u=e=>{switch(e.type){case"tap":a(),i.current&&(c(!1),clearInterval(i.current));break;case"press":c(!0),i.current=setInterval((()=>{a()}),30);break;case"pressup":c(!1),i.current&&clearInterval(i.current)}};return r.useEffect((()=>{if("undefined"==typeof window)return;let e;return Un(void 0,void 0,void 0,(function*(){const t=(yield Mn()).default;e=new t(l.current),e.on("tap press pressup",u)})),()=>{e&&e.off("tap press pressup",u)}}),[l.current]),x.default.createElement(zr,{ref:l,theme:n,pressed:s,onMouseLeave:()=>{i.current&&(c(!1),clearInterval(i.current))}},o)})),Kr=o.connect((e=>({stateLanguage:xn.configuration.getConfiguration(e).global.language,interactionTheme:xn.themes.getInteractionTheme(e)})),(e=>({rotateUp:()=>e(Nn.space.rotateUp()),rotateDown:()=>e(Nn.space.rotateDown()),rotateLeft:()=>e(Nn.space.rotateLeft()),rotateRight:()=>e(Nn.space.rotateRight())})),null,{context:yn})((e=>{const{showTransformButtons:n,showIcons:r,transformMode:o,toggleTransform:i,stateLanguage:l,interactionTheme:s,rotateUp:c,rotateDown:u,rotateLeft:d,rotateRight:p}=e;return x.default.createElement(Wr,{showTransformButtons:n},n&&x.default.createElement(x.default.Fragment,null,x.default.createElement(Zr,{direction:"left",transform:()=>p()}),x.default.createElement(Zr,{direction:"up",transform:()=>c()})),x.default.createElement(gr,{theme:s,onClick:()=>i(t.TRANSFORM_MODES.ROTATION),active:o===t.TRANSFORM_MODES.ROTATION,showIcons:r,showTransformButtons:n,button:r},r?x.default.createElement(Tr,null,x.default.createElement(f.PluridIconRotate,null)):x.default.createElement(x.default.Fragment,null,a.internatiolate(l,t.internationalization.fields.toolbarTransformRotate))),n&&x.default.createElement(x.default.Fragment,null,x.default.createElement(Zr,{direction:"down",transform:()=>u()}),x.default.createElement(Zr,{direction:"right",transform:()=>d()})))})),qr=k.default.div`
358
- display: grid;
359
- align-items: center;
360
- justify-items: center;
361
- grid-template-columns: ${e=>e.showTransformButtons?"30px 60px 30px":"1fr"};
362
- `,Qr=o.connect((e=>({stateLanguage:xn.configuration.getConfiguration(e).global.language,interactionTheme:xn.themes.getInteractionTheme(e)})),(e=>({scaleUp:()=>e(Nn.space.scaleUp()),scaleDown:()=>e(Nn.space.scaleDown())})),null,{context:yn})((e=>{const{showTransformButtons:n,showIcons:r,transformMode:o,toggleTransform:i,stateLanguage:l,interactionTheme:s,scaleUp:c,scaleDown:u}=e;return x.default.createElement(qr,{showTransformButtons:n},n&&x.default.createElement(Zr,{direction:"up",transform:()=>c()}),x.default.createElement(gr,{theme:s,onClick:()=>i(t.TRANSFORM_MODES.SCALE),active:o===t.TRANSFORM_MODES.SCALE,showIcons:r,showTransformButtons:n,button:r},r?x.default.createElement(Tr,null,x.default.createElement(f.PluridIconScale,null)):x.default.createElement(x.default.Fragment,null,a.internatiolate(l,t.internationalization.fields.toolbarTransformScale))),n&&x.default.createElement(Zr,{direction:"down",transform:()=>u()}))})),Jr=k.default.div`
363
- display: grid;
364
- align-items: center;
365
- justify-items: center;
366
- grid-template-columns: ${e=>e.showTransformButtons?"30px 30px 60px 30px 30px":"1fr"};
367
- `,eo=o.connect((e=>({stateLanguage:xn.configuration.getConfiguration(e).global.language,interactionTheme:xn.themes.getInteractionTheme(e)})),(e=>({translateUp:()=>e(Nn.space.translateUp()),translateDown:()=>e(Nn.space.translateDown()),translateLeft:()=>e(Nn.space.translateLeft()),translateRight:()=>e(Nn.space.translateRight())})),null,{context:yn})((e=>{const{showTransformButtons:n,showIcons:r,transformMode:o,toggleTransform:i,stateLanguage:l,interactionTheme:s,translateUp:c,translateDown:u,translateLeft:d,translateRight:p}=e;return x.default.createElement(Jr,{showTransformButtons:n},n&&x.default.createElement(x.default.Fragment,null,x.default.createElement(Zr,{direction:"left",transform:()=>d()}),x.default.createElement(Zr,{direction:"up",transform:()=>c()})),x.default.createElement(gr,{theme:s,onClick:()=>i(t.TRANSFORM_MODES.TRANSLATION),active:o===t.TRANSFORM_MODES.TRANSLATION,showIcons:r,showTransformButtons:n,button:r},r?x.default.createElement(Tr,null,x.default.createElement(f.PluridIconTranslate,null)):x.default.createElement(x.default.Fragment,null,a.internatiolate(l,t.internationalization.fields.toolbarTransformTranslate))),n&&x.default.createElement(x.default.Fragment,null,x.default.createElement(Zr,{direction:"down",transform:()=>u()}),x.default.createElement(Zr,{direction:"right",transform:()=>p()})))})),to=o.connect((e=>({configuration:xn.configuration.getConfiguration(e),theme:xn.themes.getInteractionTheme(e),viewSize:xn.space.getViewSize(e)})),(e=>({dispatchToggleConfigurationSpaceFirstPerson:()=>e(Nn.configuration.toggleConfigurationSpaceFirstPerson()),dispatchSetConfigurationSpaceTransformMode:t=>e(Nn.configuration.setConfigurationSpaceTransformMode(t))})),null,{context:yn})((e=>{const{theme:a,configuration:n,viewSize:o,dispatchToggleConfigurationSpaceFirstPerson:i,dispatchSetConfigurationSpaceTransformMode:l}=e,{global:s,elements:c,space:u}=n,{transparentUI:d}=s,{firstPerson:p,transformMode:m,fadeInTime:g}=u,{toolbar:T}=c,{conceal:h,opaque:E,transformIcons:_,transformButtons:O}=T,S=T.show,R=r.useRef(null),[A,b]=r.useState(!1),[C,I]=r.useState(fr.NONE),[v,P]=r.useState(_),[L,y]=r.useState(O),[U,w]=r.useState(!1),N=e=>{C!==fr.NONE&&I(fr.NONE),l(e)};return r.useEffect((()=>{w(!0)}),[]),r.useEffect((()=>{o.width<800&&O&&y(!1),o.width>800&&y(O)}),[o.width]),r.useEffect((()=>{P(_),y(O)}),[_,O]),r.useEffect((()=>(A&&R.current&&clearTimeout(R.current),A||(R.current=setTimeout((()=>{I(fr.NONE)}),400)),()=>{R.current&&clearTimeout(R.current)})),[A]),S?x.default.createElement(pr,{onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),mouseIn:A,conceal:h,showMenu:C,isMounted:U,fadeInTime:g,"data-plurid-entity":t.PLURID_ENTITY_TOOLBAR},x.default.createElement(mr,{theme:a,showIcons:v,showTransformButtons:L,documentsBased:!1,mouseIn:A,opaque:E,transparentUI:d},x.default.createElement(gr,{theme:a,onClick:()=>i(),active:p,button:!0,showIcons:v,showTransformButtons:L},x.default.createElement(Tr,null,x.default.createElement(f.PluridIconFirstPerson,null))),x.default.createElement(Kr,{showTransformButtons:L,showIcons:v,transformMode:m,toggleTransform:N}),x.default.createElement(Qr,{showTransformButtons:L,showIcons:v,transformMode:m,toggleTransform:N}),x.default.createElement(eo,{showTransformButtons:L,showIcons:v,transformMode:m,toggleTransform:N}),x.default.createElement(gr,{theme:a,onClick:()=>{return e=fr.MORE,void(C===e?I(fr.NONE):(l(t.TRANSFORM_MODES.ALL),I(e)));var e},active:C===fr.MORE,button:!0,showIcons:v,showTransformButtons:L},x.default.createElement(Tr,null,x.default.createElement(f.PluridIconMore,null)))),C===fr.UNIVERSES&&x.default.createElement(_r,null),C===fr.MORE&&x.default.createElement($r,null)):x.default.createElement(x.default.Fragment,null)})),ao=k.default.div`
368
- position: absolute;
369
- @media (max-width: 800px) {
370
- top: ${({conceal:e,mouseOver:t})=>e&&!t?"-90px":"0"};
371
- }
372
- bottom: ${({conceal:e,mouseOver:t})=>e&&!t?"-90px":"0"};
373
- right: ${({conceal:e,mouseOver:t})=>e&&!t?"-100px":"0"};
374
- position: absolute;
375
- user-select: none;
376
- transition: all 300ms ease-in-out;
377
- z-index: 9998;
378
- height: 165px;
379
- display: grid;
380
- grid-template-areas: "PVScale PVScale PVScale PVScale"
381
- "PVEmptyOne PVRotateUp PVEmptyTwo PVTranslateY"
382
- "PVRotateLeft PVModel PVRotateRight PVTranslateY"
383
- "PVEmptyThree PVRotateDown PVFitview PVTranslateY"
384
- "PVTranslateX PVTranslateX PVTranslateX PVTranslateX";
385
- grid-template-rows: 20px 15px 95px 15px 20px;
386
- grid-template-columns: 15px 115px 15px 20px;
387
-
388
- opacity: ${({fadeInTime:e})=>e?"0":"1"};
389
- animation: ${({fadeInTime:e,isMounted:t})=>t&&e?ir(e):""};
390
-
391
- :hover {
392
- opacity: 1;
393
- }
394
- `,no=k.default.div`
395
- display: grid;
396
- place-content: center;
397
-
398
- /* TODO
399
- * Themed color
400
- */
401
- color: white;
402
- `,ro=k.default.div`
403
- user-select: none;
404
- font-size: 0.6rem;
405
- width: 1.2rem;
406
- height: 1.2rem;
407
- border-radius: 0.6rem;
408
- display: grid;
409
- place-content: center;
410
- cursor: pointer;
411
-
412
- :hover {
413
- background-color: ${({theme:e})=>e.backgroundColorTertiary};
414
- }
415
- `,oo=k.default.div`
416
- grid-area: PVFitview;
417
- display: grid;
418
- place-content: center;
419
- cursor: pointer;
420
- user-select: none;
421
-
422
- svg {
423
- height: 0.8rem;
424
- width: 0.8rem;
425
- fill: white;
426
- }
427
- `,io=k.default.div`
428
- font-size: 0.6rem;
429
- position: absolute;
430
- height: 50px;
431
- width: 50px;
432
- pointer-events: none;
433
- display: grid;
434
- transform-style: preserve-3d;
435
- grid-template-areas: "PVFTopLeft PVFTopCenter PVFTopRight"
436
- "PVFMiddleLeft PVFMiddleCenter PVFMiddleRight"
437
- "PVFBottomLeft PVFBottomCenter PVFBottomRight";
438
- grid-template-rows: 10px 30px 10px;
439
- grid-template-columns: 10px 30px 10px;
440
- box-sizing: content-box;
441
- transition: all 300ms linear;
442
-
443
- border: 1px solid ${({mouseOver:e,theme:t})=>e?t.colorTertiary:t.backgroundColorSecondary};
444
- box-shadow: ${({face:e,theme:t})=>"base"===e?"0px 0px 12px 2px "+t.boxShadowPenumbraColor:""};
445
- opacity: ${({opaque:e,mouseOver:t})=>{if(!e){if(t)return"0.8";if(!t)return"0.4"}return"1"}};
446
- transform: ${({face:e})=>{switch(e){case"front":return"translateZ(25px) rotateY(0deg)";case"back":return"translateZ(-25px) rotateY(-180deg)";case"left":return"translateX(-25px) rotateY(-90deg)";case"right":return"translateX(25px) rotateY(90deg)";case"top":return"translateY(-25px) rotateX(90deg)";case"base":return"translateY(25px) rotateX(-90deg)"}return""}};
447
- `,lo=k.default.div`
448
- display: grid;
449
- place-content: center;
450
- cursor: pointer;
451
- pointer-events: all;
452
-
453
- grid-area: ${({type:e})=>`PVF${e}`};
454
- color: ${({theme:e,hovered:t})=>t?e.colorPrimary:e.colorSecondary};
455
- background-color: ${({theme:e,transparentUI:t,hovered:a,active:n})=>t&&!a?e.backgroundColorPrimaryAlpha:n||a?e.backgroundColorTertiary:e.backgroundColorSecondary};
456
- border: 1px solid ${({theme:e,transparentUI:t,hovered:a})=>t&&!a?"transparent":a?e.colorTertiary:e.backgroundColorSecondary};
457
-
458
- :hover {
459
- background-color: ${({theme:e})=>e.backgroundColorTertiary};
460
- }
461
- `,so="TopLeft",co="TopCenter",uo="TopRight",fo="MiddleLeft",po="MiddleCenter",mo="MiddleRight",go="BottomLeft",To="BottomCenter",ho="BottomRight",Eo={frontTopLeft:"A1",frontTopCenter:"A2",frontTopRight:"A3",frontMiddleLeft:"B1",frontMiddleCenter:"B2",frontMiddleRight:"B3",frontBottomLeft:"C1",frontBottomCenter:"C2",frontBottomRight:"C3",rightTopLeft:"A3",rightTopCenter:"A4",rightTopRight:"A5",rightMiddleLeft:"B3",rightMiddleCenter:"B4",rightMiddleRight:"B5",rightBottomLeft:"C3",rightBottomCenter:"C4",rightBottomRight:"C5",backTopLeft:"A5",backTopCenter:"A6",backTopRight:"A7",backMiddleLeft:"B5",backMiddleCenter:"B6",backMiddleRight:"B7",backBottomLeft:"C5",backBottomCenter:"C6",backBottomRight:"C7",leftTopLeft:"A7",leftTopCenter:"A8",leftTopRight:"A1",leftMiddleLeft:"B7",leftMiddleCenter:"B8",leftMiddleRight:"B1",leftBottomLeft:"C7",leftBottomCenter:"C8",leftBottomRight:"C1",topTopLeft:"A7",topTopCenter:"A6",topTopRight:"A5",topMiddleLeft:"A8",topMiddleCenter:"D1",topMiddleRight:"A4",topBottomLeft:"A1",topBottomCenter:"A2",topBottomRight:"A3",baseTopLeft:"C1",baseTopCenter:"C2",baseTopRight:"C3",baseMiddleLeft:"C8",baseMiddleCenter:"E1",baseMiddleRight:"C4",baseBottomLeft:"C7",baseBottomCenter:"C6",baseBottomRight:"C5"},_o={A1:{rotateX:-45,rotateY:45},A2:{rotateX:-45,rotateY:0},A3:{rotateX:-45,rotateY:-45},B1:{rotateX:0,rotateY:45},B2:{rotateX:0,rotateY:0},B3:{rotateX:0,rotateY:-45},C1:{rotateX:45,rotateY:45},C2:{rotateX:45,rotateY:0},C3:{rotateX:45,rotateY:-45},A4:{rotateX:-45,rotateY:270.1},A5:{rotateX:-45,rotateY:225},B4:{rotateX:0,rotateY:270.1},B5:{rotateX:0,rotateY:225},C4:{rotateX:45,rotateY:270.1},C5:{rotateX:45,rotateY:225},A6:{rotateX:-45,rotateY:180},A7:{rotateX:-45,rotateY:135},B6:{rotateX:0,rotateY:180.1},B7:{rotateX:0,rotateY:135},C6:{rotateX:45,rotateY:180.1},C7:{rotateX:45,rotateY:135},A8:{rotateX:-45,rotateY:90.1},B8:{rotateX:0,rotateY:90.1},C8:{rotateX:45,rotateY:90.1},D1:{rotateX:-90.1,rotateY:0},E1:{rotateX:90.1,rotateY:0}},Oo=o.connect((e=>({generalTheme:xn.themes.getGeneralTheme(e),interactionTheme:xn.themes.getInteractionTheme(e),configuration:xn.configuration.getConfiguration(e)})),(e=>({dispatchRotateX:t=>e(Nn.space.rotateX(t)),dispatchRotateY:t=>e(Nn.space.rotateY(t)),dispatchSetAnimatedTransform:t=>e(Nn.space.setAnimatedTransform(t))})),null,{context:yn})((e=>{const{face:t,faceText:a,mouseOver:n,hoveredZone:r,setHoveredZone:o,activeZone:i,setActiveZone:l,generalTheme:s,interactionTheme:c,configuration:u,dispatchRotateX:d,dispatchRotateY:f,dispatchSetAnimatedTransform:p}=e,{global:m,elements:g}=u,{transparentUI:T}=m,h=g.viewcube.opaque,E=e=>{const a=Eo[`${t}${e}`],n=_o[a];l(a),p(!0),d(n.rotateX),f(n.rotateY),setTimeout((()=>{p(!1)}),450)};return x.default.createElement(io,{theme:s,face:t,opaque:h,mouseOver:n},x.default.createElement(lo,{theme:c,type:so,active:i===Eo[`${t}${so}`],hovered:r===Eo[`${t}${so}`],onClick:()=>E(so),onMouseEnter:()=>o(Eo[`${t}${so}`]),transparentUI:T}),x.default.createElement(lo,{theme:c,type:co,active:i===Eo[`${t}${co}`],hovered:r===Eo[`${t}${co}`],onClick:()=>E(co),onMouseEnter:()=>o(Eo[`${t}${co}`]),transparentUI:T}),x.default.createElement(lo,{theme:c,type:uo,active:i===Eo[`${t}${uo}`],hovered:r===Eo[`${t}${uo}`],onClick:()=>E(uo),onMouseEnter:()=>o(Eo[`${t}${uo}`]),transparentUI:T}),x.default.createElement(lo,{theme:c,type:fo,active:i===Eo[`${t}${fo}`],hovered:r===Eo[`${t}${fo}`],onClick:()=>E(fo),onMouseEnter:()=>o(Eo[`${t}${fo}`]),transparentUI:T}),x.default.createElement(lo,{theme:c,type:po,active:i===Eo[`${t}${po}`],hovered:r===Eo[`${t}${po}`],onClick:()=>E(po),onMouseEnter:()=>o(Eo[`${t}${po}`]),transparentUI:T},a),x.default.createElement(lo,{theme:c,type:mo,active:i===Eo[`${t}${mo}`],hovered:r===Eo[`${t}${mo}`],onClick:()=>E(mo),onMouseEnter:()=>o(Eo[`${t}${mo}`]),transparentUI:T}),x.default.createElement(lo,{theme:c,type:go,active:i===Eo[`${t}${go}`],hovered:r===Eo[`${t}${go}`],onClick:()=>E(go),onMouseEnter:()=>o(Eo[`${t}${go}`]),transparentUI:T}),x.default.createElement(lo,{theme:c,type:To,active:i===Eo[`${t}${To}`],hovered:r===Eo[`${t}${To}`],onClick:()=>E(To),onMouseEnter:()=>o(Eo[`${t}${To}`]),transparentUI:T}),x.default.createElement(lo,{theme:c,type:ho,active:i===Eo[`${t}${ho}`],hovered:r===Eo[`${t}${ho}`],onClick:()=>E(ho),onMouseEnter:()=>o(Eo[`${t}${ho}`]),transparentUI:T}))})),So=k.default.div`
462
- grid-area: PVModel;
463
- `,Ro=k.default.div`
464
- perspective: 2000px;
465
- perspective-origin: 50% 50%;
466
- `,Ao=k.default.div`
467
- transform-style: preserve-3d;
468
- width: 50px;
469
- height: 50px;
470
- `,{matrixArrayToCSSMatrix:bo,rotateMatrix:Co,multiplyArrayOfMatrices:Io,scaleMatrix:vo,translateMatrix:Po}=a.interaction.matrix,{degToRad:Lo}=a.interaction.quaternion,yo=o.connect((e=>({stateLanguage:xn.configuration.getConfiguration(e).global.language,spaceRotationX:xn.space.getRotationX(e),spaceRotationY:xn.space.getRotationY(e),stateAnimatedTransform:xn.space.getAnimatedTransform(e),stateTransformTime:xn.space.getTransformTime(e)})),(e=>({})),null,{context:yn})((e=>{const{mouseOver:n,stateLanguage:o,spaceRotationX:i,spaceRotationY:l,stateAnimatedTransform:s,stateTransformTime:c}=e,[u,d]=r.useState(""),[f,p]=r.useState("");r.useEffect((()=>{u||p("")}),[i,l]);const m=(()=>{const e=32,t=23,a=0,n=0,r=0,o=0,s=Co(Lo(-i),Lo(-l)),c=Po(e,t,a),u=vo(1),d=Io([c,Io([Po(n,r,o),s,Po(-n,-r,-o)]),u]);return bo(d)})();return x.default.createElement(So,null,x.default.createElement(Ro,null,x.default.createElement(Ao,{suppressHydrationWarning:!0,style:{transform:m,transition:n||s?`transform ${c}ms ease-in-out`:""},onMouseLeave:()=>{d("")}},x.default.createElement(Oo,{face:"front",faceText:a.internatiolate(o,t.internationalization.fields.viewcubeFront),mouseOver:n,hoveredZone:u,setHoveredZone:d,activeZone:f,setActiveZone:p}),x.default.createElement(Oo,{face:"back",faceText:a.internatiolate(o,t.internationalization.fields.viewcubeBack),mouseOver:n,hoveredZone:u,setHoveredZone:d,activeZone:f,setActiveZone:p}),x.default.createElement(Oo,{face:"left",faceText:a.internatiolate(o,t.internationalization.fields.viewcubeLeft),mouseOver:n,hoveredZone:u,setHoveredZone:d,activeZone:f,setActiveZone:p}),x.default.createElement(Oo,{face:"right",faceText:a.internatiolate(o,t.internationalization.fields.viewcubeRight),mouseOver:n,hoveredZone:u,setHoveredZone:d,activeZone:f,setActiveZone:p}),x.default.createElement(Oo,{face:"top",faceText:a.internatiolate(o,t.internationalization.fields.viewcubeTop),mouseOver:n,hoveredZone:u,setHoveredZone:d,activeZone:f,setActiveZone:p}),x.default.createElement(Oo,{face:"base",faceText:a.internatiolate(o,t.internationalization.fields.viewcubeBase),mouseOver:n,hoveredZone:u,setHoveredZone:d,activeZone:f,setActiveZone:p}))))})),Uo=o.connect((e=>({stateConfiguration:xn.configuration.getConfiguration(e),stateInteractionTheme:xn.themes.getInteractionTheme(e),stateTransformTime:xn.space.getTransformTime(e)})),(e=>({dispatchRotateXWith:t=>e(Nn.space.rotateXWith(t)),dispatchRotateYWith:t=>e(Nn.space.rotateYWith(t)),dispatchSetAnimatedTransform:t=>e(Nn.space.setAnimatedTransform(t)),dispatchSpaceResetTransform:()=>e(Nn.space.spaceResetTransform())})),null,{context:yn})((e=>{const{stateConfiguration:a,stateInteractionTheme:n,stateTransformTime:o,dispatchRotateXWith:i,dispatchRotateYWith:l,dispatchSetAnimatedTransform:s,dispatchSpaceResetTransform:c}=e,{elements:u,space:d}=a,{viewcube:p}=u,{buttons:m,conceal:g}=p,{fadeInTime:T}=d,h=p.show,[E,_]=r.useState(!1),[O,S]=r.useState(!1),R=(e,t)=>{switch(s(!0),e){case"rotateX":i(t);break;case"rotateY":l(t)}setTimeout((()=>{s(!1)}),o)};return r.useEffect((()=>{S(!0)}),[]),h?x.default.createElement(ao,{onMouseEnter:()=>_(!0),onMouseLeave:()=>_(!1),onMouseMove:()=>E?null:_(!0),conceal:g,mouseOver:E,isMounted:O,fadeInTime:T,"data-plurid-entity":t.PLURID_ENTITY_VIEWCUBE},x.default.createElement(yo,{mouseOver:E}),E&&m&&x.default.createElement(x.default.Fragment,null,x.default.createElement(no,{style:{gridArea:"PVRotateUp"}},x.default.createElement(ro,{theme:n,onClick:()=>R("rotateX",-90.1)},"▲")),x.default.createElement(no,{theme:n,style:{gridArea:"PVRotateDown"}},x.default.createElement(ro,{theme:n,onClick:()=>R("rotateX",90.1)},"▼")),x.default.createElement(no,{theme:n,style:{gridArea:"PVRotateLeft"}},x.default.createElement(ro,{theme:n,onClick:()=>R("rotateY",90.1)},"◀")),x.default.createElement(no,{theme:n,style:{gridArea:"PVRotateRight"}},x.default.createElement(ro,{theme:n,onClick:()=>R("rotateY",-90.1)},"▶")),x.default.createElement(oo,{onClick:e=>{e.ctrlKey||e.metaKey||(s(!0),c(),setTimeout((()=>{s(!1)}),o))}},x.default.createElement(f.PluridIconGlobal,null)))):x.default.createElement(x.default.Fragment,null)})),wo=o.connect((e=>({})),(e=>({})),null,{context:yn})((e=>x.default.createElement(x.default.Fragment,null,x.default.createElement(sr,null),x.default.createElement(dr,null),x.default.createElement(to,null),x.default.createElement(Uo,null)))),{getRegisteredPlanes:No}=a.planes,Do=o.connect((e=>({stateConfiguration:xn.configuration.getConfiguration(e),stateTransform:xn.space.getTransform(e),stateTree:xn.space.getTree(e),stateSpaceLoading:xn.space.getLoading(e),stateSpaceView:xn.space.getView(e)})),(e=>({dispatch:e,dispatchSetConfiguration:t=>e(Nn.configuration.setConfiguration(t)),dispatchSetConfigurationMicro:()=>e(Nn.configuration.setConfigurationMicro()),dispatchSpaceSetViewSize:t=>e(Nn.space.setViewSize(t)),dispatchSetSpaceLoading:t=>e(Nn.space.setSpaceLoading(t)),dispatchSetAnimatedTransform:t=>e(Nn.space.setAnimatedTransform(t)),dispatchSetTransformTime:t=>e(Nn.space.setTransformTime(t)),dispatchSetSpaceLocation:t=>e(Nn.space.setSpaceLocation(t)),dispatchSetInitialTree:t=>e(Nn.space.setInitialTree(t)),dispatchSetTree:t=>e(Nn.space.setTree(t)),dispatchSetGeneralTheme:t=>e(Nn.themes.setGeneralTheme(t)),dispatchSetInteractionTheme:t=>e(Nn.themes.setInteractionTheme(t)),dispatchRotateX:t=>e(Nn.space.rotateX(t)),dispatchRotateXWith:t=>e(Nn.space.rotateXWith(t)),dispatchRotateY:t=>e(Nn.space.rotateY(t)),dispatchRotateYWith:t=>e(Nn.space.rotateYWith(t)),dispatchTranslateXWith:t=>e(Nn.space.translateXWith(t)),dispatchTranslateYWith:t=>e(Nn.space.translateYWith(t)),dispatchScaleUpWith:t=>e(Nn.space.scaleUpWith(t)),dispatchScaleDownWith:t=>e(Nn.space.scaleDownWith(t)),dispatchSpaceSetView:t=>e(Nn.space.spaceSetView(t))})),null,{context:yn})((e=>{const{planesRegistrar:n,customPlane:o,planeContext:i,planeContextValue:l,pubsub:c,planeNotFound:u,planeRenderError:d,matchedRoute:f,stateConfiguration:p,stateTransform:m,stateSpaceView:g,stateTree:T,dispatch:h,dispatchSetConfiguration:E,dispatchSetGeneralTheme:_,dispatchSetInteractionTheme:O,dispatchSetSpaceLocation:S,dispatchSetAnimatedTransform:R,dispatchSetTransformTime:A,dispatchSetTree:b,dispatchRotateXWith:C,dispatchRotateX:I,dispatchRotateYWith:v,dispatchRotateY:P,dispatchTranslateXWith:L,dispatchTranslateYWith:y,dispatchScaleUpWith:U,dispatchScaleDownWith:w,dispatchSpaceSetViewSize:N,dispatchSpaceSetView:D}=e,M=r.useRef(null),[F,k]=r.useState(c?[c]:[]),G=r.useCallback((e=>{const{transformLocks:a}=p.space;((e,a,n,r)=>{if(a.defaultPrevented)return;if(s.dom.verifyPathInputElement(a.path))return;const o=!(a.shiftKey||a.altKey||a.ctrlKey||a.metaKey);if("KeyF"===a.code&&o)return e(Nn.configuration.toggleConfigurationSpaceFirstPerson());if(n){if("KeyW"===a.code&&o&&r.translationZ)return e(Nn.space.viewCameraMoveForward());if("KeyS"===a.code&&o&&r.translationZ)return e(Nn.space.viewCameraMoveBackward());if("KeyA"===a.code&&o&&r.translationX)return e(Nn.space.viewCameraMoveLeft());if("KeyA"===a.code&&a.shiftKey&&r.rotationY)return e(Nn.space.viewCameraTurnLeft());if("KeyD"===a.code&&o&&r.translationX)return e(Nn.space.viewCameraMoveRight());if("KeyD"===a.code&&a.shiftKey&&r.rotationY)return e(Nn.space.viewCameraTurnRight());if("KeyQ"===a.code&&o&&r.rotationX)return e(Nn.space.viewCameraTurnUp());if("KeyZ"===a.code&&o&&r.rotationX)return e(Nn.space.viewCameraTurnDown());if("KeyE"===a.code&&o&&r.translationY)return e(Nn.space.viewCameraMoveUp());if("KeyC"===a.code&&o&&r.translationY)return e(Nn.space.viewCameraMoveDown())}if("KeyR"===a.code&&o)return e(Nn.configuration.setConfigurationSpaceTransformMode(t.TRANSFORM_MODES.ROTATION));if("KeyT"===a.code&&o)return e(Nn.configuration.setConfigurationSpaceTransformMode(t.TRANSFORM_MODES.TRANSLATION));if("KeyS"===a.code&&o&&!n)return e(Nn.configuration.setConfigurationSpaceTransformMode(t.TRANSFORM_MODES.SCALE));if("ArrowRight"===a.key){if(a.shiftKey&&r.rotationY)return e(Nn.space.rotateLeft());if(a.altKey&&r.translationX)return e(Nn.space.translateRight())}if("ArrowLeft"===a.key){if(a.shiftKey&&r.rotationY)return e(Nn.space.rotateRight());if(a.altKey&&r.translationX)return e(Nn.space.translateLeft())}if("ArrowUp"===a.key){if(a.shiftKey&&a.altKey&&r.translationZ)return e(Nn.space.translateIn());if(a.shiftKey&&!a.altKey&&r.rotationX)return e(Nn.space.rotateUp());if(a.altKey&&!a.shiftKey&&r.translationY)return e(Nn.space.translateUp());if(a.metaKey||a.ctrlKey&&r.scale)return e(Nn.space.scaleUp())}if("ArrowDown"===a.key){if(a.shiftKey&&a.altKey&&r.translationZ)return e(Nn.space.translateOut());if(a.shiftKey&&!a.altKey&&r.rotationX)return e(Nn.space.rotateDown());if(a.altKey&&!a.shiftKey&&r.translationY)return e(Nn.space.translateDown());if(a.metaKey||a.ctrlKey&&r.scale)e(Nn.space.scaleDown())}})(h,e,p.space.firstPerson,a)}),[p.space.firstPerson,p.space.transformLocks,h]),Y=r.useCallback((e=>{const{transformMode:a,transformLocks:n}=p.space,r={rotation:a===t.TRANSFORM_MODES.ROTATION,translation:a===t.TRANSFORM_MODES.TRANSLATION,scale:a===t.TRANSFORM_MODES.SCALE};((e,t,a,n)=>{(t.shiftKey||t.metaKey||t.altKey||t.ctrlKey||a.rotation||a.translation||a.scale)&&t.preventDefault();const r={deltaX:t.deltaX,deltaY:t.deltaY},o=Dn.getWheelDirection(r);a.rotation&&("left"===o&&n.rotationY&&e(Nn.space.rotateLeft()),"right"===o&&n.rotationY&&e(Nn.space.rotateRight()),"up"===o&&n.rotationX&&e(Nn.space.rotateUp()),"down"===o&&n.rotationX&&e(Nn.space.rotateDown())),t.shiftKey&&!t.altKey&&("up"===o&&n.rotationX&&e(Nn.space.rotateUp()),"down"===o&&n.rotationX&&e(Nn.space.rotateDown()),"left"===o&&n.rotationY&&e(Nn.space.rotateLeft()),"right"===o&&n.rotationY&&e(Nn.space.rotateRight())),a.translation&&("up"===o&&n.translationY&&e(Nn.space.translateDown()),"down"===o&&n.translationY&&e(Nn.space.translateUp()),"left"===o&&n.translationX&&e(Nn.space.translateRight()),"right"===o&&n.translationX&&e(Nn.space.translateLeft())),t.altKey&&t.shiftKey&&("up"===o&&n.translationZ&&e(Nn.space.translateIn()),"down"===o&&n.translationZ&&e(Nn.space.translateOut())),t.altKey&&!t.shiftKey&&("up"===o&&n.translationY&&e(Nn.space.translateDown()),"down"===o&&n.translationY&&e(Nn.space.translateUp()),"left"===o&&n.translationX&&e(Nn.space.translateRight()),"right"===o&&n.translationX&&e(Nn.space.translateLeft())),a.scale&&("down"===o&&n.scale&&e(Nn.space.scaleUp()),"up"===o&&n.scale&&e(Nn.space.scaleDown())),(t.metaKey||t.ctrlKey)&&("down"===o&&n.scale&&e(Nn.space.scaleUp()),"up"===o&&n.scale&&e(Nn.space.scaleDown()))})(h,e,r,n)}),[h,p.space.transformMode,p.space.transformLocks]),B=(e,t=p)=>{const r=No(n),o=new a.space.tree.Tree({planes:r,configuration:t,view:e}).compute();for(const e of T)for(const[t,a]of o.entries())e.route===a.route&&e.children&&(o[t].children=e.children);b(o)},V=r.useCallback((()=>{B(g)}),[g,p]),X=e=>{const n=e.subscribe({topic:t.PLURID_PUBSUB_TOPIC.CONFIGURATION,callback:e=>{if(e.internal)return;const t=a.general.configuration.merge(e,p);"object"==typeof t.global.theme?("string"==typeof t.global.theme.general?_(j.default[t.global.theme.general]):_(t.global.theme.general),"string"==typeof t.global.theme.interaction?O(j.default[t.global.theme.interaction]):O(t.global.theme.interaction)):"string"==typeof t.global.theme&&(_(j.default[t.global.theme]),O(j.default[t.global.theme])),E(t)}}),r=e.subscribe({topic:t.PLURID_PUBSUB_TOPIC.SPACE_TRANSFORM,callback:e=>{const{value:t,internal:a}=e;a||S(t)}}),o=e.subscribe({topic:t.PLURID_PUBSUB_TOPIC.SPACE_ANIMATED_TRANSFORM,callback:e=>{const{value:t}=e;R(t.active),t.time?A(t.time):A(450)}}),i=e.subscribe({topic:t.PLURID_PUBSUB_TOPIC.SPACE_ROTATE_X_WITH,callback:e=>{const{value:t}=e;C(t)}}),l=e.subscribe({topic:t.PLURID_PUBSUB_TOPIC.SPACE_ROTATE_X_TO,callback:e=>{const{value:t}=e;I(t)}}),s=e.subscribe({topic:t.PLURID_PUBSUB_TOPIC.SPACE_ROTATE_Y_WITH,callback:e=>{const{value:t}=e;v(t)}}),c=e.subscribe({topic:t.PLURID_PUBSUB_TOPIC.SPACE_ROTATE_Y_TO,callback:e=>{const{value:t}=e;P(t)}}),u=e.subscribe({topic:t.PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_X_WITH,callback:e=>{const{value:t}=e;L(t)}}),d=e.subscribe({topic:t.PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_Y_WITH,callback:e=>{const{value:t}=e;y(t)}}),f=e.subscribe({topic:t.PLURID_PUBSUB_TOPIC.VIEW_ADD_PLANE,callback:e=>{const{plane:t}=e,a=[...g,t];D(a),B(a)}}),m=e.subscribe({topic:t.PLURID_PUBSUB_TOPIC.VIEW_SET_PLANES,callback:e=>{const{view:t}=e;D([...t]),B(t)}}),T=e.subscribe({topic:t.PLURID_PUBSUB_TOPIC.VIEW_REMOVE_PLANE,callback:e=>{const{plane:t}=e,a=g.filter((e=>"string"!=typeof e||e===t));D(a),B(a)}});return()=>{e.unsubscribe(n,t.PLURID_PUBSUB_TOPIC.CONFIGURATION),e.unsubscribe(r,t.PLURID_PUBSUB_TOPIC.SPACE_TRANSFORM),e.unsubscribe(o,t.PLURID_PUBSUB_TOPIC.SPACE_ANIMATED_TRANSFORM),e.unsubscribe(i,t.PLURID_PUBSUB_TOPIC.SPACE_ROTATE_X_WITH),e.unsubscribe(l,t.PLURID_PUBSUB_TOPIC.SPACE_ROTATE_X_TO),e.unsubscribe(s,t.PLURID_PUBSUB_TOPIC.SPACE_ROTATE_Y_WITH),e.unsubscribe(c,t.PLURID_PUBSUB_TOPIC.SPACE_ROTATE_Y_TO),e.unsubscribe(u,t.PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_X_WITH),e.unsubscribe(d,t.PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_Y_WITH),e.unsubscribe(f,t.PLURID_PUBSUB_TOPIC.VIEW_ADD_PLANE),e.unsubscribe(m,t.PLURID_PUBSUB_TOPIC.VIEW_SET_PLANES),e.unsubscribe(T,t.PLURID_PUBSUB_TOPIC.VIEW_REMOVE_PLANE)}},$=e=>{const a={value:Object.assign({},m),internal:!0};e.publish({topic:t.PLURID_PUBSUB_TOPIC.SPACE_TRANSFORM,data:a}),e.publish({topic:t.PLURID_PUBSUB_TOPIC.CONFIGURATION,data:Object.assign(Object.assign({},p),{internal:!0})})},W=e=>{const{transformMode:a}=p.space;if(a===t.TRANSFORM_MODES.ALL)return;const{velocity:n,distance:r,direction:o}=e,i=a===t.TRANSFORM_MODES.ROTATION,l=a===t.TRANSFORM_MODES.TRANSLATION,s=a===t.TRANSFORM_MODES.SCALE;switch(R(!0),o){case 2:i&&v(60*n),l&&L(-1*r);break;case 4:i&&v(60*n),l&&L(r);break;case 8:i&&C(60*n),l&&y(-1*r),s&&U(n);break;case 16:i&&C(60*n),l&&y(r),s&&w(n)}setTimeout((()=>{R(!1)}),450)},z=e=>{const{transformMode:a}=p.space;if(a===t.TRANSFORM_MODES.ALL)return;const{velocity:n,distance:r,direction:o}=e,i=a===t.TRANSFORM_MODES.ROTATION,l=a===t.TRANSFORM_MODES.TRANSLATION,s=a===t.TRANSFORM_MODES.SCALE,c=20*n,u=r/5,d=n/4;switch(o){case 2:i&&v(c),l&&L(-1*u);break;case 4:i&&v(c),l&&L(u);break;case 8:i&&C(c),l&&y(-1*u),s&&U(d);break;case 16:i&&C(c),l&&y(u),s&&w(d)}};r.useEffect((()=>(M.current&&(M.current.addEventListener("keydown",G,{passive:!1}),M.current.addEventListener("wheel",Y,{passive:!1})),()=>{M.current&&(M.current.removeEventListener("keydown",G),M.current.removeEventListener("wheel",Y))})),[M.current,p.space.transformMode,p.space.firstPerson]),r.useEffect((()=>{const e=s.meta.debounce((()=>{if(M&&M.current){const e=M.current.offsetWidth,t=M.current.offsetHeight;N({width:e,height:t})}}),150);return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]),r.useEffect((()=>(window.addEventListener("resize",V),()=>{window.removeEventListener("resize",V)})),[g,p]),r.useEffect((()=>{if("undefined"==typeof window)return;let e;return Un(void 0,void 0,void 0,(function*(){const a=(yield Mn()).default,{transformTouch:n}=p.space;delete a.defaults.cssProps.userSelect,delete a.defaults.cssProps.userDrag,delete a.defaults.cssProps.tapHighlightColor,delete a.defaults.cssProps.touchSelect,M.current&&(e=new a(M.current),e.get("pan").set({direction:a.DIRECTION_ALL}),e.get("swipe").set({direction:a.DIRECTION_ALL}),n===t.TRANSFORM_TOUCHES.PAN?e.on("pan",z):e.on("swipe",W))})),()=>{if(!e)return;const{transformTouch:a}=p.space;a===t.TRANSFORM_TOUCHES.PAN?e.off("pan",z):e.off("swipe",W)}}),[M.current,p.space.transformTouch,p.space.transformMode]),r.useEffect((()=>{const e=e=>{navigator.getGamepads()[e.gamepad.index]},t=e=>{navigator.getGamepads()[e.gamepad.index]};return window.addEventListener("gamepadconnected",e),window.addEventListener("gamepaddisconnected",t),()=>{window.removeEventListener("gamepadconnected",e),window.removeEventListener("gamepaddisconnected",t)}}),[]),r.useEffect((()=>{const e=[];for(const t of F){const a=X(t);e.push(a)}return()=>{for(const t of e)t()}}),[F.length]),r.useEffect((()=>{for(const e of F)$(e)}),[F.length,p,m]),r.useEffect((()=>{V()}),[]);const H={planesRegistrar:n,planeContext:i,planeContextValue:l,customPlane:o,planeNotFound:u,planeRenderError:d,matchedRoute:f,registerPubSub:e=>{const t=[...F,e];k(t)}},Z=0===g.length?x.default.createElement(x.default.Fragment,null):x.default.createElement(wo,null);return x.default.createElement(jn,{ref:M,tabIndex:0,transformMode:p.space.transformMode,"data-plurid-entity":t.PLURID_ENTITY_VIEW},x.default.createElement(Fn,null),x.default.createElement(wn.Provider,{value:H},Z))})),{registerPlanes:Mo}=a.planes;class xo extends r.Component{constructor(e,t){super(e),this.storeID=e.id||"default",this.context=t;const a=this.computeStore();this.store=Ln(a),this.subscribeStore()}componentDidUpdate(){const e=this.computeStore();this.store.dispatch({type:"SET_STATE",payload:e})}componentWillUnmount(){this.storeUnubscriber&&this.storeUnubscriber()}render(){return x.default.createElement(o.Provider,{store:this.store,context:yn},x.default.createElement(Do,Object.assign({},this.props)))}computeStore(){const{view:e,planes:t,configuration:n,precomputedState:r,planesRegistrar:o,id:i,useLocalStorage:l}=this.props;Mo(t,o);const s=this.store?this.store.getState():void 0,c=a.state.local.load(this.storeID,l),u=i&&this.context&&this.context.states[i]?this.context.states[i]:void 0;return a.state.compute(e,n,o,s,c,r,u)}subscribeStore(){this.store&&"undefined"!=typeof localStorage&&this.props.useLocalStorage&&(this.storeUnubscriber=this.store.subscribe((()=>{const e=this.store.getState(),t=JSON.stringify(e);localStorage.setItem("pluridState-"+this.storeID,t)})))}}xo.contextType=Y;const Fo=k.default.div`
471
- scroll-snap-type: ${e=>{const{alignment:t,snapType:a}=e;return"none"===a?"none":t+" "+a}};
472
-
473
- flex-direction: ${e=>{const{alignment:t}=e;return"x"===t?"row":"column"}};
474
-
475
- outline: none;
476
- overflow: auto;
477
- /* display: flex; */
478
- height: 100vh;
479
- height: -webkit-fill-available;
480
- width: 100vw;
481
- `,{resolvePluridRoutePlaneData:jo,Registrar:ko}=a.planes,Go=(e,n,r,o)=>{if(o||"RoutePlane"===(null==e?void 0:e.kind)){const t=o||e;if(!t)return()=>()=>x.default.createElement(x.default.Fragment,null);return Yo(t,n)}if(!e){const e=r.match("/not-found","route");if(e&&"Route"===e.kind){return Go(e,n,r)}return()=>()=>x.default.createElement(x.default.Fragment,null)}const{exterior:i,view:l,planes:c,spaces:u,defaultConfiguration:d,slotted:f,resolver:p}=e.data;p&&p(void 0);const m={value:e.match.value,parameters:e.match.parameters,query:e.match.query};let g;return Qn(i)&&(g=i,g&&(g.displayName="PluridRouteExterior")),!i||!g||l||c||u?l?()=>{const t=new M.default,a=x.default.createElement(xo,{view:l,planesRegistrar:n,configuration:d,pubsub:t,matchedRoute:e});return()=>x.default.createElement(x.default.Fragment,null,g&&x.default.createElement(g,{plurid:m,pubsub:t,spaces:f?[a]:void 0}),!f&&x.default.createElement(x.default.Fragment,null,a))}:(e=>{var n,r,o,i,l,c;if("Route"!==e.kind)return()=>()=>x.default.createElement(x.default.Fragment,null);const u="http",d="localhost:63000",{match:f,data:p}=e,{parameters:m,query:g}=f,T={value:f.value,parameters:m,query:g},{exterior:h,planes:E,spaces:_,slotted:O}=e.data,S=(null===(n=p.multispace)||void 0===n?void 0:n.alignment)||"y",R=(null===(r=p.multispace)||void 0===r?void 0:r.snapType)||"mandatory";let A=()=>x.default.createElement(x.default.Fragment,null);Qn(h)&&(A=h);let b=()=>x.default.createElement(x.default.Fragment,null);const C=[];if(_)for(const e of _){const n=[],r=[];if(e.planes)for(const o of e.planes){const i=jo(o),{component:l}=i,s=[u,d,p.value===t.PLURID_ROUTE_DEFAULT_PATH_VALUE?t.PLURID_ROUTE_DEFAULT_PATH:a.utilities.cleanPathElement(p.value),e.value===t.PLURID_ROUTE_DEFAULT_SPACE_VALUE?t.PLURID_ROUTE_DEFAULT_SPACE:a.utilities.cleanPathElement(e.value),t.PLURID_ROUTE_DEFAULT_UNIVERSE,t.PLURID_ROUTE_DEFAULT_CLUSTER,a.utilities.cleanPathElement(i.value)].join(t.PLURID_ROUTE_SEPARATOR),c={component:l,route:s};n.push(c),r.push(s)}if(e.universes)for(const o of e.universes){if(o.clusters)for(const i of o.clusters)for(const l of i.planes){const s=jo(l),{component:c}=s,f=[u,d,p.value===t.PLURID_ROUTE_DEFAULT_PATH_VALUE?t.PLURID_ROUTE_DEFAULT_PATH:a.utilities.cleanPathElement(p.value),e.value===t.PLURID_ROUTE_DEFAULT_SPACE_VALUE?t.PLURID_ROUTE_DEFAULT_SPACE:a.utilities.cleanPathElement(e.value),o.value===t.PLURID_ROUTE_DEFAULT_UNIVERSE_VALUE?t.PLURID_ROUTE_DEFAULT_UNIVERSE:a.utilities.cleanPathElement(o.value),i.value===t.PLURID_ROUTE_DEFAULT_CLUSTER_VALUE?t.PLURID_ROUTE_DEFAULT_CLUSTER:a.utilities.cleanPathElement(i.value),a.utilities.cleanPathElement(s.value)].join(t.PLURID_ROUTE_SEPARATOR),m={component:c,route:f};n.push(m),p.view?p.view.includes(s.value)&&r.push(f):r.push(f)}if(o.planes)for(const i of o.planes){const l=jo(i),{component:s}=l,c=[u,d,p.value===t.PLURID_ROUTE_DEFAULT_PATH_VALUE?t.PLURID_ROUTE_DEFAULT_PATH:a.utilities.cleanPathElement(p.value),e.value===t.PLURID_ROUTE_DEFAULT_SPACE_VALUE?t.PLURID_ROUTE_DEFAULT_SPACE:a.utilities.cleanPathElement(e.value),o.value===t.PLURID_ROUTE_DEFAULT_UNIVERSE_VALUE?t.PLURID_ROUTE_DEFAULT_UNIVERSE:a.utilities.cleanPathElement(o.value),t.PLURID_ROUTE_DEFAULT_CLUSTER,a.utilities.cleanPathElement(l.value)].join(t.PLURID_ROUTE_SEPARATOR),f={component:s,route:c};n.push(f),r.push(c)}}const o=new ko,i=x.default.createElement(xo,{key:s.uuid.generate(),id:p.value,planes:n,view:r,configuration:e.configuration,planesRegistrar:o});C.push(i)}if(E){const e=[],n=[];for(const r of E){const o=jo(r),{component:i}=o,l=[u,d,p.value===t.PLURID_ROUTE_DEFAULT_PATH_VALUE?t.PLURID_ROUTE_DEFAULT_PATH:a.utilities.cleanPathElement(p.value),t.PLURID_ROUTE_DEFAULT_SPACE,t.PLURID_ROUTE_DEFAULT_UNIVERSE,t.PLURID_ROUTE_DEFAULT_CLUSTER,a.utilities.cleanPathElement(o.value)].join(t.PLURID_ROUTE_SEPARATOR),s={component:i,route:l};e.push(s),p.view?p.view.includes(o.value)&&n.push(l):n.push(l)}const r=x.default.createElement(xo,{key:s.uuid.generate(),id:p.value,planes:e,view:n,configuration:p.defaultConfiguration});C.push(r)}let I,v;return Qn(null===(o=p.multispace)||void 0===o?void 0:o.header)&&(I=null===(i=p.multispace)||void 0===i?void 0:i.header),Qn(null===(l=p.multispace)||void 0===l?void 0:l.footer)&&(v=null===(c=p.multispace)||void 0===c?void 0:c.footer),b=()=>x.default.createElement(Fo,{alignment:S,snapType:R,"data-plurid-entity":t.PLURID_ENTITY_MULTISPACE},I&&x.default.createElement(I,{plurid:T}),C,v&&x.default.createElement(v,{plurid:T})),()=>()=>x.default.createElement(x.default.Fragment,null,h&&x.default.createElement(A,{spaces:O?C:void 0,plurid:T}),(_||E)&&!O&&x.default.createElement(b,null))})(e):()=>()=>x.default.createElement(x.default.Fragment,null,g&&x.default.createElement(g,{plurid:m}))},Yo=(e,t)=>{if(e.match.query.flat){const a=e.match.query.flat.toLowerCase();if("true"===a||"1"===a){const a=t.get(e.match.value);if(a){const e=a.component;if("function"!=typeof e)return()=>()=>x.default.createElement(x.default.Fragment,null);return()=>()=>x.default.createElement(x.default.Fragment,null,x.default.createElement(e,null))}}}const{defaultConfiguration:a}=null==e?void 0:e.data;return()=>()=>x.default.createElement(x.default.Fragment,null,x.default.createElement(xo,{view:[e.match.value],planesRegistrar:t,configuration:a}))},{Registrar:Bo}=a.planes,{IsoMatcher:Vo}=a.routing,Xo=e=>{const{routes:a,planes:n,exterior:o,shell:i,static:l,view:c,cleanNavigation:u,notFoundPath:d}=e,f=d||"/not-found",m=((e,t)=>{const a=[];for(const t of e){if(t.planes)for(const e of t.planes){const n=jo(e),r={route:n.link?n.link:n.value.startsWith("/")?n.value:t.value+"/"+n.value,component:n.component};a.push(r)}t.spaces}if(t)for(const e of t){const t=jo(e),n={route:t.value,component:t.component};a.push(n)}return a})(a,n),g=r.useRef(new Bo(m)),T=r.useRef(new Vo({routes:a,routePlanes:n})),h=p.useMounted(),[E,_]=r.useState((e=>e?e.path:"undefined"!=typeof window?window.location.pathname+window.location.search:"/")(l)),[O,S]=r.useState(T.current.match(E,"route")),[R,A]=r.useState(Go(O,g.current,T.current,l&&l.directPlane?T.current.match(l.directPlane,"route"):void 0)),b=e=>{let t;e&&e.detail&&e.detail.path&&!t&&(t=e.detail.path),u&&c&&!t&&(t=c);const a=window.location.pathname;t||(t=a+window.location.search),_(t)};let C;r.useEffect((()=>(window.addEventListener("popstate",b),window.addEventListener(t.PLURID_ROUTER_LOCATION_CHANGED,b),()=>{window.removeEventListener("popstate",b),window.removeEventListener(t.PLURID_ROUTER_LOCATION_CHANGED,b)})),[]),r.useEffect((()=>{if(!h)return;u||location.pathname!==E&&history.pushState(null,"",E);let e=T.current.match(E,"route");if(e&&"RoutePlane"===e.kind){const t=Yo(e,g.current);return S(e),void A(t)}e||(e=T.current.match(f,"route")),S(e),A(Go(e,g.current,T.current))}),[h,E]),r.useEffect((()=>{if(!O)return;if("Route"!==O.kind)return;const e=O.match.value;s.storage.saveState(e,t.PLURID_ROUTER_STORAGE);const a=new CustomEvent(t.PLURID_ROUTER_LOCATION_STORED,{detail:{path:e}});window.dispatchEvent(a)}),[u,O]),Qn(o)&&(C=o,C&&(C.displayName="PluridRouterExterior"));let I=({children:e})=>x.default.createElement(x.default.Fragment,null,e);return Qn(i)&&(I=i,I&&(I.displayName="PluridRouterShell")),x.default.createElement(x.default.Fragment,null,C&&x.default.createElement(C,{matchedRoute:O}),x.default.createElement(I,{matchedRoute:O},x.default.createElement(R,null)))},$o=e=>{const{path:t,directPlane:a,routes:n,planes:r,exterior:o,shell:i,protocol:l,host:s,gateway:c,gatewayQuery:u,gatewayEndpoint:d}=e,f=l||"http",p=s||"localhost:63000";return x.default.createElement(Xo,{routes:n,planes:r,exterior:o,shell:i,static:{path:t,directPlane:a},protocol:f,host:p})};class Wo extends r.Component{constructor(e){super(e),this.properties=e}render(){const{metastate:e,children:t}=this.properties;return x.default.createElement(Y.Provider,{value:e},t)}}Wo.displayName="PluridProvider";const zo={x:0,y:0},Ho=e=>{const{elementID:t,rootID:a,children:n}=e,r=p.usePortal(t,a);return m.createPortal(n,r)},Zo=k.default.div`
482
- position: absolute;
483
- min-width: 600px;
484
- min-height: 300px;
485
- z-index: 99999;
486
-
487
- top: ${({linkCoordinates:e})=>e.y+"px"};
488
- left: ${({linkCoordinates:e})=>e.x+5+"px"};
489
- background-color: ${({theme:e})=>e.backgroundColorSecondary};
490
- box-shadow: ${({theme:e})=>e.boxShadowUmbra};
491
- `,{getPlanesRegistrar:Ko}=a.planes,qo=o.connect((e=>({stateGeneralTheme:xn.themes.getGeneralTheme(e),stateInteractionTheme:xn.themes.getInteractionTheme(e)})),(e=>({})),null,{context:yn})((e=>{const{planeID:t,linkCoordinates:a,stateGeneralTheme:n}=e,o=r.useContext(wn);if(!o)return x.default.createElement(x.default.Fragment,null);const{planesRegistrar:i}=o,l=Ko(i);if(!l)return x.default.createElement(x.default.Fragment,null);const s=l.get(t);if(!s)return x.default.createElement(x.default.Fragment,null);const c=s.component;return"function"!=typeof c?x.default.createElement(x.default.Fragment,null):x.default.createElement(Zo,{theme:n,linkCoordinates:a},x.default.createElement(c,null))})),Qo=k.default.a`
492
- /**
493
- * Forces element to go to the second row if inlined.
494
- */
495
- display: inline-block;
496
-
497
- cursor: pointer;
498
- color: ${({theme:e})=>e.colorTertiary};
499
-
500
- :hover {
501
- color: ${({theme:e})=>e.colorPrimary};
502
- }
503
-
504
- ::after {
505
- content: "${({devisible:e,suffix:t})=>e?"":t||"'"}";
506
- }
507
- `,{resolveRoute:Jo,computePlaneAddress:ei}=a.routing,{getPlanesRegistrar:ti,getPluridPlaneIDByData:ai}=a.planes,{degToRad:ni,radToDeg:ri}=a.interaction.quaternion,{multiplyMatrices:oi,translateMatrix:ii,rotateYMatrix:li}=a.interaction.transform.general,{getTransformRotate:si,getTransformTranslate:ci,getTransformScale:ui}=a.interaction.transform.matrix3d;var di=o.connect((e=>({stateTree:xn.space.getTree(e),stateGeneralTheme:xn.themes.getGeneralTheme(e),stateConfiguration:xn.configuration.getConfiguration(e),stateViewSize:xn.space.getViewSize(e)})),(e=>({dispatchSetTree:t=>e(Nn.space.setTree(t)),dispatchSetAnimatedTransform:t=>e(Nn.space.setAnimatedTransform(t)),dispatchSetTransform:t=>e(Nn.space.setTransform(t)),dispatchSetSpaceField:t=>e(Nn.space.setSpaceField(t)),dispatchUpdateSpaceLinkCoordinates:t=>e(Nn.space.updateSpaceLinkCoordinates(t))})),null,{context:yn})((e=>{const{children:n,route:o,devisible:i,suffix:l,atClick:s,style:c,className:u,stateTree:d,stateGeneralTheme:f,stateConfiguration:p,stateViewSize:m,dispatchSetTree:g,dispatchSetAnimatedTransform:T,dispatchSetTransform:h,dispatchSetSpaceField:E,dispatchUpdateSpaceLinkCoordinates:_}=e,O=p.elements.plane.controls.show,S=t.PLURID_DEFAULT_CONFIGURATION_LINK_PREVIEW_FADE_IN,R=t.PLURID_DEFAULT_CONFIGURATION_LINK_PREVIEW_FADE_OUT,A=ei(o),b=Jo(A,p.network.protocol,p.network.host),C=null!=l?l:t.PLURID_DEFAULT_CONFIGURATION_LINK_SUFFIX,I=null!=i&&i,v=r.useContext(wn);if(!v)return x.default.createElement(x.default.Fragment,null,n);const{planesRegistrar:P}=v,L=ti(P);if(!L)return x.default.createElement(x.default.Fragment,null,n);const y=r.useRef(null),U=r.useRef(null),w=r.useRef(null),[N,D]=r.useState(!1),[M,F]=r.useState(!1),[j,k]=r.useState(!1),[G,Y]=r.useState(""),[B,V]=r.useState(""),[X,$]=r.useState(ai(y.current)),[W,z]=r.useState(zo),H=()=>{const e=y.current;if(!e)return Object.assign({},zo);let t=0,a=0,n=!1,r=e,o=!0,i=0,l=0;for(;o;)if("static"!==window.getComputedStyle(r).position||n||(t+=r.offsetTop,a+=r.offsetLeft,n=!0),"relative"===window.getComputedStyle(r).position&&(i+=t,l+=a,t=0,a=0,n=!1),r.scrollLeft&&(l+=-r.scrollLeft),r.scrollTop&&(i+=-r.scrollTop),r.parentElement){"PluridPlane"===r.parentElement.dataset.pluridEntity&&(o=!1),r=r.parentElement}else o=!1;const s=O?56:0;return{x:l+e.offsetWidth,y:i+s}},Z=(e,t)=>{if(!t)return;if(j)return;if(e.altKey||e.metaKey)return;const{location:a}=t,{translateX:n,translateY:r,translateZ:o,rotateY:i}=a,l=i<100?1:-1,s=i<100?-1:1,c=i<100?200:0,u=`matrix3d(${oi(oi(oi(ii(-n,-r,l*o),li(ni(i))),ii(n,r,s*o)),ii(-(n+c),-r,l*o)).flat().join(",")})`,d=si(u),f=ci(u),p=ui(u);T(!0),E({field:"transform",value:u}),h({translationX:f.translateX,translationY:f.translateY,translationZ:f.translateZ,rotationX:ri(d.rotateX),rotationY:-1*ri(d.rotateY),scale:p.scale}),setTimeout((()=>{T(!1)}),500)},K=e=>{j||B?(e=>{const{updatedTree:t,updatedPlane:n}=a.space.tree.logic.togglePlaneFromTree(d,B);Z(e,n),g(t),k((e=>!e)),F(!1)})(e):(e=>{if(!X||!b)return;const{route:t}=b,n=H(),{pluridPlaneID:r,updatedTree:o,updatedTreePlane:i}=a.space.tree.logic.updateTreeWithNewPlane(t,X,n,d,L.getAll(),p);r&&(Z(e,i),g(o),k(!0),V(r))})(e)},q=r.useCallback((e=>{e.preventDefault(),void 0!==s&&s(e),K(e)}),[y.current,d]);return r.useEffect((()=>{const e=ai(y.current);$(e);const t=H();z(t)}),[]),r.useEffect((()=>(N&&w.current&&(U.current=setTimeout((()=>{F(!0)}),S),clearTimeout(w.current)),N||(w.current=setTimeout((()=>{F(!1),U.current&&clearTimeout(U.current)}),R)),()=>{w.current&&clearTimeout(w.current),U.current&&clearTimeout(U.current)})),[N]),r.useEffect((()=>{}),[]),x.default.createElement(Qo,{ref:y,onClick:e=>q(e),onMouseEnter:()=>D(!0),onMouseLeave:()=>D(!1),theme:f,suffix:C,devisible:I,style:Object.assign({},c),className:u,"data-plurid-entity":t.PLURID_ENTITY_LINK},n,M&&!j&&x.default.createElement(Ho,{elementID:`preview-${X}`,rootID:X},x.default.createElement(qo,{planeID:G,linkCoordinates:W})))}));const fi=k.default.a`
508
- `,pi=k.default.div`
509
- cursor: pointer;
510
- `,mi=e=>{const{route:t,children:n,asAnchor:r,style:o,className:i,atClick:l}=e,s={onClick:e=>{if(l){if(l(e))return}e.preventDefault(),a.pluridRouterNavigate(t)},style:o,className:i};return null==r||r?x.default.createElement(fi,Object.assign({href:t},s),n):x.default.createElement(pi,Object.assign({},s),n)},gi=k.default.div`
511
- position: absolute;
512
- height: 0;
513
- width: 0;
514
- user-select: none;
515
- pointer-events: none;
516
- `,Ti=o.connect((e=>({stateConfiguration:xn.configuration.getConfiguration(e)})),(e=>({dispatchSetConfiguration:t=>e(Nn.configuration.setConfiguration(t))})),null,{context:yn})((e=>{const n=r.useContext(wn);if(!n)return x.default.createElement(x.default.Fragment,null);const{registerPubSub:o}=n,{configuration:i,pubsub:l,stateConfiguration:s,dispatchSetConfiguration:c}=e,u=r.useRef(null);return r.useEffect((()=>{const e=a.general.configuration.merge(i,s);c(e)}),[i]),r.useEffect((()=>{l&&o(l)}),[l]),x.default.createElement(gi,{ref:u,"data-plurid-entity":t.PLURID_ENTITY_APPLICATION_CONFIGURATOR})})),hi=k.default.div`
517
- position: absolute;
518
- height: 0;
519
- width: 0;
520
- user-select: none;
521
- pointer-events: none;
522
- `,{getPluridPlaneIDByData:Ei}=a.planes,_i=o.connect((e=>({})),(e=>({})),null,{context:yn})((e=>{const a=r.useRef(null),[n,o]=r.useState("");return r.useEffect((()=>{const e=Ei(a.current);o(e)}),[]),x.default.createElement(hi,{ref:a,"data-plurid-entity":t.PLURID_ENTITY_PLANE_CONFIGURATOR})})),Oi=k.default.div`
523
- `,Si=o.connect((e=>({stateGeneralTheme:xn.themes.getGeneralTheme(e),stateInteractionTheme:xn.themes.getInteractionTheme(e)})),(e=>({})),null,{context:yn})((e=>{const{plurid:t}=e,a=t.value,n=r.useRef(!1),[o,i]=r.useState();return r.useEffect((()=>(n.current=!0,()=>{n.current=!1}))),r.useEffect((()=>{let e=!1;Un(void 0,void 0,void 0,(function*(){if(!e){e=!0;try{const{domain:e,url:t}=(e=>{const t=e.match(/^pttp:\/\/(\w+(\.|:)\w+)\/?/);if(!t)return{domain:"",url:""};const a=t[1];return{domain:a,url:`http://${a}/pttp`}})(a),r=((e,t)=>{if(e)return t.replace(`pttp://${e}`,"")})(e,a);if(!t||!r)return;const o=yield((e,t)=>Un(void 0,void 0,void 0,(function*(){try{const a=yield G.default(e,{method:"post",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({path:t}),credentials:"include"}),n=yield a.json();if(!n.element)return;const{element:r}=n,o=new T.ElementQLClient({url:r.url}),{status:i,Elements:l}=yield o.get(r.json,"json");if(!i)return;const s=l[r.name];return()=>s}catch(e){return}})))(t,r);if(!n.current)return;o&&i(o)}catch(e){return}}}))}),[]),x.default.createElement(Oi,null,o&&x.default.createElement(o,null))})),Ri=k.default.div`
524
- `,Ai=o.connect((e=>({stateGeneralTheme:xn.themes.getGeneralTheme(e),stateInteractionTheme:xn.themes.getInteractionTheme(e)})),(e=>({})),null,{context:yn})((e=>{const{plurid:t}=e,a=t.value;return x.default.createElement(Ri,null,x.default.createElement("iframe",{src:a}))})),bi=e=>{const{top:t,index:a,element:n,setHeight:o}=e,i=r.useRef(null);return r.useEffect((()=>{i.current&&o(i.current.offsetHeight,a)}),[i.current]),x.default.createElement("div",{ref:i,style:{position:"absolute",top:t+"px"}},n)},{markers:{Spinner:Ci}}=d.universal,Ii=o.connect((e=>({translationY:xn.space.getTranslationY(e),viewSize:xn.space.getViewSize(e)})),(e=>({})),null,{context:yn})((e=>{const{items:t,generalHeight:a,translationY:n,viewSize:o}=e,i=a||100,l=r.useRef(null),c=r.useRef([]),u=r.useRef(Array(t.length).fill(i)),[d,f]=r.useState(0),[p,m]=r.useState(Math.floor(1e3/i)),[g,T]=r.useState(i*(p-d)),[h,E]=r.useState(!1),_=(e,t)=>{u.current[t]=e};return r.useEffect((()=>{if(u.current){const e=s.mathematics.arithmetic.sum(u.current,u.current.length);T(e)}}),[d,p,u.current]),r.useEffect((()=>{let e=0;for(const[t,a]of u.current.entries())e+=a,n<0?(e<Math.abs(n)&&f(t),e>Math.abs(n)+o.height&&e<Math.abs(n)+o.height+400&&m(t)):(f(0),m(10))}),[o.height,n]),r.useEffect((()=>{E(!0),setTimeout((()=>{const e=s.mathematics.arithmetic.sum(u.current,u.current.length);T(e),E(!1)}),400)}),[o]),x.default.createElement("div",{style:{height:g},ref:l},h&&x.default.createElement(x.default.Fragment,null,x.default.createElement(Ci,null)),!h&&x.default.createElement(x.default.Fragment,null,(()=>{c.current=[];for(let e=d;e<=p;e++){const a=t[e];c.current.push(x.default.createElement(bi,{key:e+Math.random(),index:e,top:s.mathematics.arithmetic.sum(u.current,e),element:a,setHeight:_}))}return c.current})()))})),vi=k.default.div`
525
- `,Pi=o.connect((e=>({stateGeneralTheme:xn.themes.getGeneralTheme(e),stateInteractionTheme:xn.themes.getInteractionTheme(e)})),(e=>({})),null,{context:yn})((e=>x.default.createElement(vi,null,"PluridPlaneDebugger"))),Li=k.default.div`
526
- `,yi=o.connect((e=>({stateGeneralTheme:xn.themes.getGeneralTheme(e),stateInteractionTheme:xn.themes.getInteractionTheme(e)})),(e=>({})),null,{context:yn})((e=>x.default.createElement(Li,null,"PluridSpaceDebugger"))),{resolvePluridPlaneData:Ui}=a.planes,wi=(e,t,n,r)=>{const o=new Map,i=new Map(e||new Map),l=a.general.configuration.merge(n);if(t)for(const e of t){const t=Ui(e),n=a.routing.resolveRoute(t.route);if(!n)continue;const{protocol:r,host:o,path:l,space:s,universe:c,cluster:u,plane:d,route:f}=n,p={protocol:r,host:"",path:"",space:"",universe:"",cluster:"",plane:"",route:f,component:t.component},m=f;i.set(m,p)}const s=new Map(i),c={};for(const[e,t]of i)c[t.route]=e;for(const[e,t]of i);const u=r||[],d=[];for(const e of u)if("string"==typeof e){const t=a.routing.resolveRoute(e);if(!t)continue;d.push(t.route)}return{computedTree:[],indexedPlanesReference:s,planesPropertiesReference:o,appConfiguration:l}},Ni=(e,n,r)=>Un(void 0,void 0,void 0,(function*(){const o="http",i="localhost:63000",l=((e,t,n)=>{const r=new Map;for(const o of e){if(o.planes)for(const e of o.planes){const i=jo(e),l="/"===o.value?"p":a.utilities.cleanPathElement(o.value),s="s",c="u",u="c",d=a.utilities.cleanPathElement(i.value),f=[t,n,l,s,c,u,d].join("://"),p={protocol:t,host:n,path:l,space:s,universe:c,cluster:u,plane:d,component:i.component,route:f};r.set(f,p)}if(o.spaces){for(const e of o.spaces)if(e.universes)for(const i of e.universes)if(i.clusters)for(const l of i.clusters)for(const s of l.planes){const c=jo(s),u="/"===o.value?"p":a.utilities.cleanPathElement(o.value),d="default"===e.value?"s":a.utilities.cleanPathElement(e.value),f="default"===i.value?"u":a.utilities.cleanPathElement(i.value),p="default"===l.value?"c":a.utilities.cleanPathElement(l.value),m=a.utilities.cleanPathElement(c.value),g=[t,n,u,d,f,p,m].join("://"),T={protocol:t,host:n,path:u,space:d,universe:f,cluster:p,plane:m,component:c.component,route:g};r.set(g,T)}}else{const e="/"===o.value?"p":a.utilities.cleanPathElement(o.value),i=[t,n,e].join("://"),l={protocol:t,host:n,path:e,space:"",universe:"",cluster:"",plane:"",component:o.exterior||(()=>x.default.createElement(x.default.Fragment,null)),route:i};r.set(i,l)}}return r})(n,o,i),s=yield((e,n,r,o)=>Un(void 0,void 0,void 0,(function*(){const n={planes:[],spaces:[],view:[],value:""};if("Route"===e.kind){let t=e.data;e.data.resolver&&(t=yield e.data.resolver(o)),n.planes=t.planes||[],n.spaces=t.spaces||[],n.view=t.view||[],n.value=e.data.value||""}const{planes:r,spaces:i,view:l}=n,s=[];if(i)for(const e of i){const r=[],o=[];if(e.planes)for(const r of e.planes){const o=jo(r);n.value===t.PLURID_ROUTE_DEFAULT_PATH_VALUE?t.PLURID_ROUTE_DEFAULT_PATH:a.utilities.cleanPathElement(n.value),e.value===t.PLURID_ROUTE_DEFAULT_SPACE_VALUE?t.PLURID_ROUTE_DEFAULT_SPACE:a.utilities.cleanPathElement(e.value),a.utilities.cleanPathElement(o.value)}if(e.universes)for(const r of e.universes){if(r.clusters)for(const o of r.clusters)for(const i of o.planes){const l=jo(i);n.value===t.PLURID_ROUTE_DEFAULT_PATH_VALUE?t.PLURID_ROUTE_DEFAULT_PATH:a.utilities.cleanPathElement(n.value),e.value===t.PLURID_ROUTE_DEFAULT_SPACE_VALUE?t.PLURID_ROUTE_DEFAULT_SPACE:a.utilities.cleanPathElement(e.value),r.value===t.PLURID_ROUTE_DEFAULT_UNIVERSE_VALUE?t.PLURID_ROUTE_DEFAULT_UNIVERSE:a.utilities.cleanPathElement(r.value),o.value===t.PLURID_ROUTE_DEFAULT_CLUSTER_VALUE?t.PLURID_ROUTE_DEFAULT_CLUSTER:a.utilities.cleanPathElement(o.value),a.utilities.cleanPathElement(l.value)}if(r.planes)for(const o of r.planes){const i=jo(o);n.value===t.PLURID_ROUTE_DEFAULT_PATH_VALUE?t.PLURID_ROUTE_DEFAULT_PATH:a.utilities.cleanPathElement(n.value),e.value===t.PLURID_ROUTE_DEFAULT_SPACE_VALUE?t.PLURID_ROUTE_DEFAULT_SPACE:a.utilities.cleanPathElement(e.value),r.value===t.PLURID_ROUTE_DEFAULT_UNIVERSE_VALUE?t.PLURID_ROUTE_DEFAULT_UNIVERSE:a.utilities.cleanPathElement(r.value),a.utilities.cleanPathElement(i.value)}}const i={planes:r,view:o};s.push(i)}if(r){const e=[];for(const e of r){const r=jo(e);n.value===t.PLURID_ROUTE_DEFAULT_PATH_VALUE?t.PLURID_ROUTE_DEFAULT_PATH:a.utilities.cleanPathElement(n.value),a.utilities.cleanPathElement(r.value)}const o={planes:e,view:l||[]};s.push(o)}return s})))(e,0,0,r),c={};for(const t of s){const{planes:a,view:n}=t,{computedTree:r,appConfiguration:o}=wi(l,a,void 0,n),i={configuration:Object.assign({},o),shortcuts:{global:!0},themes:{general:j.default.plurid,interaction:j.default.plurid},ui:{toolbarScrollPosition:50},space:{loading:!1,animatedTransform:!1,scale:1,rotationX:0,rotationY:0,translationX:0,translationY:0,translationZ:0,initialTree:r,tree:r,activeUniverseID:"",camera:{x:0,y:0,z:0},viewSize:{width:1440,height:821},spaceSize:{width:1440,height:821,depth:0,topCorner:{x:0,y:0,z:0}},view:n,culledView:[]}};c[e.data.value]=i}return{states:c}})),{IsoMatcher:Di,RouteParser:Mi}=a.routing,xi={PluridPlaneBridge:Bn,PluridPlaneContent:Kn,PluridPlaneControls:Hn,PluridPlaneDebugger:Pi,PluridSpaceDebugger:yi},Fi={Application:xo,RouterStatic:$o,RouterBrowser:Xo,Provider:Wo,Link:di,RouterLink:mi,ApplicationConfigurator:Ti,PlaneConfigurator:_i,ExternalPlane:Si,IframePlane:Ai,VirtualList:Ii,SPACE_LAYOUT:t.LAYOUT_TYPES,SIZES:t.SIZES,TRANSFORM_MODES:t.TRANSFORM_MODES,TRANSFORM_TOUCHES:t.TRANSFORM_TOUCHES,PubSub:M.default,PUBSUB_TOPIC:t.PLURID_PUBSUB_TOPIC,serverComputeMetastate:Ni,IsoMatcher:Di,routerNavigate:a.pluridRouterNavigate,internals:xi};Object.defineProperty(e,"PLURID_PUBSUB_TOPIC",{enumerable:!0,get:function(){return t.PLURID_PUBSUB_TOPIC}}),Object.defineProperty(e,"PLURID_ROUTER_LOCATION_CHANGED",{enumerable:!0,get:function(){return t.PLURID_ROUTER_LOCATION_CHANGED}}),Object.defineProperty(e,"PLURID_ROUTER_LOCATION_STORED",{enumerable:!0,get:function(){return t.PLURID_ROUTER_LOCATION_STORED}}),Object.defineProperty(e,"SIZES",{enumerable:!0,get:function(){return t.SIZES}}),Object.defineProperty(e,"SPACE_LAYOUT",{enumerable:!0,get:function(){return t.LAYOUT_TYPES}}),Object.defineProperty(e,"TRANSFORM_MODES",{enumerable:!0,get:function(){return t.TRANSFORM_MODES}}),Object.defineProperty(e,"TRANSFORM_TOUCHES",{enumerable:!0,get:function(){return t.TRANSFORM_TOUCHES}}),Object.defineProperty(e,"pluridRouterNavigate",{enumerable:!0,get:function(){return a.pluridRouterNavigate}}),Object.defineProperty(e,"PluridPubSub",{enumerable:!0,get:function(){return M.default}}),e.PluridApplication=xo,e.PluridApplicationConfigurator=Ti,e.PluridExternalPlane=Si,e.PluridIframePlane=Ai,e.PluridIsoMatcher=Di,e.PluridLink=di,e.PluridPlaneConfigurator=_i,e.PluridProvider=Wo,e.PluridRouteParser=Mi,e.PluridRouterBrowser=Xo,e.PluridRouterLink=mi,e.PluridRouterStatic=$o,e.PluridVirtualList=Ii,e.default=Fi,e.getDirectPlaneMatch=(e,t,a)=>{let n,r,o;for(const a of t){if(a.planes)for(const t of a.planes){const n=jo(t),i="/"===a.value?n.value:a.value+n.value;if(o=i,e===i){r=t;break}}if(r){n=a;break}}if(a)for(const t of a){if(e===jo(t).value){r=t;break}}return{matchRoute:n,matchPlane:r,matchPath:o}},e.internals=xi,e.pluridStateModules=vn,e.serverComputeMetastate=Ni,e.usePluridRouter=()=>{const[e,a]=r.useState("");return r.useEffect((()=>{const e=()=>{const e=s.storage.loadState(t.PLURID_ROUTER_STORAGE);e&&a(e)};return e(),window.addEventListener(t.PLURID_ROUTER_LOCATION_STORED,e),()=>{window.removeEventListener(t.PLURID_ROUTER_LOCATION_STORED,e)}}),[]),e}}(M);var x,F=(x=M)&&x.__esModule&&Object.prototype.hasOwnProperty.call(x,"default")?x.default:x;exports.default=F;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@plurid/plurid-data"),t=require("@plurid/plurid-engine"),a=require("@plurid/plurid-pubsub"),n=require("react"),r=require("react-redux"),o=require("@reduxjs/toolkit"),i=require("@plurid/plurid-functions"),l=require("@plurid/plurid-themes"),s=require("styled-components"),c=require("@plurid/plurid-functions-react"),u=require("@plurid/plurid-icons-react"),d=require("@plurid/plurid-ui-components-react"),f=require("react-dom"),p=require("cross-fetch"),m=require("@plurid/elementql-client-react"),g=require("hammerjs");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var T=h(e),E=h(t),S=h(a),v=h(n),P=h(r),b=h(o),R=h(i),I=h(l),C=h(s),w=h(c),O=h(u),_=h(d),y=h(f),L=h(p),A=h(m),U=h(g);var D={};!function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=T.default,a=E.default,n=S.default,r=v.default,o=P.default,i=b.default,l=R.default,s=I.default,c=C.default,u=w.default,d=O.default,f=_.default,p=y.default,m=L.default,g=A.default;function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var D=h(n),x=h(r),N=h(s),M=h(c),k=h(m);const F=x.default.createContext(void 0),B=Object.assign({},t.defaultConfiguration),Y=i.createSlice({name:"configuration",initialState:B,reducers:{setConfiguration:(e,t)=>{e=Object.assign(Object.assign({},e),t.payload)},setConfigurationMicro:e=>{e.elements.toolbar.show=!1,e.elements.plane.controls.show=!1,e.elements.viewcube.show=!1},setConfigurationPlaneControls:(e,t)=>{e.elements.plane.controls.show=t.payload},setConfigurationPlaneOpacity:(e,t)=>{e.elements.plane.opacity=t.payload},setConfigurationThemeGeneral:(e,t)=>{const a={general:t.payload,interaction:"object"==typeof e.global.theme?e.global.theme.interaction:"plurid"};e.global.theme=a},setConfigurationThemeInteraction:(e,t)=>{const a={general:"object"==typeof e.global.theme?e.global.theme.general:"plurid",interaction:t.payload};e.global.theme=a},setConfigurationLanguage:(e,t)=>{e.global.language=t.payload},toggleConfigurationViewcubeHide:(e,t)=>{e.elements.viewcube.show=t.payload},toggleConfigurationViewcubeButtons:(e,t)=>{e.elements.viewcube.buttons=t.payload},toggleConfigurationViewcubeOpaque:(e,t)=>{e.elements.viewcube.opaque=t.payload},toggleConfigurationViewcubeConceal:e=>{const{conceal:t}=e.elements.viewcube;e.elements.viewcube.conceal=!t},toggleConfigurationToolbarConceal:e=>{const{conceal:t}=e.elements.toolbar;e.elements.toolbar.conceal=!t},toggleConfigurationToolbarTransformIcons:e=>{const{transformIcons:t}=e.elements.toolbar;e.elements.toolbar.transformIcons=!t},toggleConfigurationToolbarTransformButtons:e=>{const{transformButtons:t}=e.elements.toolbar;e.elements.toolbar.transformButtons=!t},toggleConfigurationShowTransformOrigin:e=>{const{show:t}=e.space.transformOrigin;e.space.transformOrigin.show=!t},toggleConfigurationToolbarOpaque:e=>{const{opaque:t}=e.elements.toolbar;e.elements.toolbar.opaque=!t},toggleConfigurationSpaceTransparentUI:e=>{e.global.transparentUI=!e.global.transparentUI},setConfigurationSpaceTransformOriginSize:(e,t)=>{e.space.transformOrigin.size=t.payload},setConfigurationSpaceTransformMode:(e,a)=>{e.space.transformMode!==a.payload?e.space.transformMode=a.payload:e.space.transformMode=t.TRANSFORM_MODES.ALL},toggleConfigurationSpaceTransformMultimode:(e,t)=>{e.space.transformMultimode=t.payload},setConfigurationSpaceTransformTouch:(e,t)=>{e.space.transformTouch=t.payload},toggleConfigurationSpaceFirstPerson:e=>{const{firstPerson:t}=e.space;e.space.firstPerson=!t},toggleConfigurationToolbarToggleDrawer:(e,t)=>{const{toggledDrawers:a}=e.elements.toolbar;if(a.includes(t.payload)){const n=a.filter((e=>e!==t.payload));e.elements.toolbar.toggledDrawers=[...n]}else e.elements.toolbar.toggledDrawers=[...a,t.payload]},setConfigurationSpaceTransformLocks:(e,t)=>{const{transformLocks:a}=e.space,n=Object.assign({},a);n[t.payload]=!a[t.payload],e.space.transformLocks=Object.assign({},n)},setConfigurationSpaceLayout:(e,a)=>{const n={type:t.LAYOUT_TYPES[a.payload]};e.space.layout=Object.assign({},n)},setConfigurationSpaceCullingDistance:(e,t)=>{e.space.cullingDistance=t.payload}}}),$=Y.actions,X=e=>e.configuration,V={getConfiguration:X},z=Y.reducer;var K=Object.freeze({__proto__:null,configuration:Y,actions:$,getConfiguration:X,selectors:V,reducer:z});const Z=i.createSlice({name:"general",initialState:{},reducers:{}}),j=Z.actions,G=e=>e.general,W={getGeneral:G},H=Z.reducer;var q=Object.freeze({__proto__:null,general:Z,actions:j,getGeneral:G,selectors:W,reducer:H});const J=i.createSlice({name:"shortcuts",initialState:{global:!0},reducers:{setGlobalShortcuts:(e,t)=>{e.global=t.payload}}}),Q=J.actions,ee=e=>e.shortcuts.global,te={getGlobal:ee},ae=J.reducer;var ne=Object.freeze({__proto__:null,shortcuts:J,actions:Q,getGlobal:ee,selectors:te,reducer:ae});const{registerPlanes:re,getRegisteredPlanes:oe,getPlanesRegistrar:ie,getPluridPlaneIDByData:le,getRegisteredPlane:se,resolvePluridRoutePlaneData:ce,resolvePluridPlaneData:ue,Registrar:de}=a.planes,{IsoMatcher:fe,resolveRoute:pe,computePlaneAddress:me}=a.routing,{quaternion:ge,matrix:he}=a.interaction,{degToRad:Te}=ge,{matrixArrayToCSSMatrix:Ee,rotateMatrix:Se,multiplyArrayOfMatrices:ve,scaleMatrix:Pe,translateMatrix:be}=he,Re=e=>{const{translationX:t,translationY:a,translationZ:n,rotationX:r,rotationY:o,scale:i}=e,l=-1*t+("undefined"==typeof window?720:window.innerWidth/2),s=-1*a+("undefined"==typeof window?400:window.innerHeight/2),c=-1*n,u=Se(Te(-r),Te(-o)),d=be(t,a,n),f=Pe(i),p=ve([d,be(l,s,c),u,be(-l,-s,-c),f]);return Ee(p)};var Ie=Object.freeze({__proto__:null,getSpace:e=>e.space,getLoading:e=>e.space.loading,getTransformMatrix:e=>e.space.transform,getAnimatedTransform:e=>e.space.animatedTransform,getTransformTime:e=>e.space.transformTime,getRotationX:e=>e.space.rotationX,getRotationY:e=>e.space.rotationY,getTranslationX:e=>e.space.translationX,getTranslationY:e=>e.space.translationY,getTranslationZ:e=>e.space.translationZ,getScale:e=>e.space.scale,getTree:e=>e.space.tree,getTransform:e=>({rotationX:e.space.rotationX,rotationY:e.space.rotationY,translationX:e.space.translationX,translationY:e.space.translationY,translationZ:e.space.translationZ,scale:e.space.scale}),getActiveUniverseID:e=>e.space.activeUniverseID,getView:e=>e.space.view,getViewSize:e=>e.space.viewSize,getCulledView:e=>e.space.culledView,getActivePlaneID:e=>e.space.activePlaneID,getIsolatePlane:e=>e.space.isolatePlane,getLastClosedPlane:e=>e.space.lastClosedPlane});const{toRadians:Ce}=l.mathematics.geometry,we={loading:!0,transform:"matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)",animatedTransform:!1,transformTime:450,scale:1,rotationX:0,rotationY:0,translationX:0,translationY:0,translationZ:0,tree:[],activeUniverseID:"",camera:{x:0,y:0,z:0},viewSize:{width:"undefined"==typeof window?1440:window.innerWidth,height:"undefined"==typeof window?821:window.innerHeight},spaceSize:{width:"undefined"==typeof window?1440:window.innerWidth,height:"undefined"==typeof window?821:window.innerHeight,depth:0,topCorner:{x:0,y:0,z:0}},view:[],culledView:[],activePlaneID:"",isolatePlane:"",lastClosedPlane:""},Oe=i.createSlice({name:"space,",initialState:we,reducers:{setSpaceField:(e,t)=>{const{field:a,value:n}=t.payload;e[a]=n},setSpaceLoading:(e,t)=>{e.loading=t.payload},changeTransform:(e,t)=>{},setTransform:(e,t)=>{const{translationX:a,translationY:n,translationZ:r,rotationX:o,rotationY:i,scale:l}=t.payload,s=null!=a?a:e.translationX,c=null!=n?n:e.translationY,u=null!=r?r:e.translationZ,d=null!=o?o:e.rotationX,f=null!=i?i:e.rotationY,p=null!=l?l:e.scale;e.translationX=s,e.translationY=c,e.translationZ=u,e.rotationX=d,e.rotationY=f,e.scale=p},setAnimatedTransform:(e,t)=>{e.animatedTransform=t.payload},setTransformTime:(e,t)=>{e.transformTime=t.payload},setSpaceLocation:(e,t)=>{e=Object.assign(Object.assign({},e),t.payload)},viewCameraMoveForward:e=>{e.translationZ=e.translationZ+6*t.TRANSLATION_STEP*Math.cos(Ce(-e.rotationY)),e.translationX=e.translationX+6*t.TRANSLATION_STEP*Math.sin(Ce(-e.rotationY)),e.transform=Re(e)},viewCameraMoveBackward:e=>{e.translationZ=e.translationZ-6*t.TRANSLATION_STEP*Math.cos(Ce(-e.rotationY)),e.translationX=e.translationX-6*t.TRANSLATION_STEP*Math.sin(Ce(-e.rotationY)),e.transform=Re(e)},viewCameraMoveLeft:e=>{e.translationX=e.translationX+3*t.TRANSLATION_STEP*Math.cos(Ce(e.rotationY)),e.translationZ=e.translationZ+3*t.TRANSLATION_STEP*Math.sin(Ce(e.rotationY)),e.transform=Re(e)},viewCameraMoveRight:e=>{e.translationX=e.translationX-3*t.TRANSLATION_STEP*Math.cos(Ce(e.rotationY)),e.translationZ=e.translationZ-3*t.TRANSLATION_STEP*Math.sin(Ce(e.rotationY)),e.transform=Re(e)},viewCameraMoveUp:e=>{e.translationY=e.translationY+3*t.TRANSLATION_STEP,e.transform=Re(e)},viewCameraMoveDown:e=>{e.translationY=e.translationY-3*t.TRANSLATION_STEP,e.transform=Re(e)},viewCameraTurnUp:e=>{e.rotationX=(e.rotationX+t.ROTATION_STEP)%360,e.transform=Re(e)},viewCameraTurnDown:e=>{e.rotationX=(e.rotationX-t.ROTATION_STEP)%360,e.transform=Re(e)},viewCameraTurnLeft:e=>{e.rotationY=(e.rotationY-t.ROTATION_STEP)%360,e.transform=Re(e)},viewCameraTurnRight:e=>{e.rotationY=(e.rotationY+t.ROTATION_STEP)%360,e.transform=Re(e)},rotateUp:e=>{e.rotationX=(e.rotationX+t.ROTATION_STEP)%360,e.transform=Re(e)},rotateDown:e=>{e.rotationX=(e.rotationX-t.ROTATION_STEP)%360,e.transform=Re(e)},rotateX:(e,t)=>{e.rotationX=t.payload,e.transform=Re(e)},rotateXWith:(e,t)=>{e.rotationX=e.rotationX+t.payload,e.transform=Re(e)},rotateLeft:e=>{e.rotationY=(e.rotationY+t.ROTATION_STEP)%360,e.transform=Re(e)},rotateRight:e=>{e.rotationY=(e.rotationY-t.ROTATION_STEP)%360,e.transform=Re(e)},rotateY:(e,t)=>{e.rotationY=t.payload,e.transform=Re(e)},rotateYWith:(e,t)=>{e.rotationY=e.rotationY+t.payload,e.transform=Re(e)},translateUp:e=>{e.translationY=e.translationY-t.TRANSLATION_STEP,e.transform=Re(e)},translateDown:e=>{e.translationY=e.translationY+t.TRANSLATION_STEP,e.transform=Re(e)},translateLeft:e=>{e.translationX=e.translationX-t.TRANSLATION_STEP*Math.cos(Ce(e.rotationY)),e.translationZ=e.translationZ-t.TRANSLATION_STEP*Math.sin(Ce(e.rotationY)),e.transform=Re(e)},translateRight:e=>{e.translationX=e.translationX+t.TRANSLATION_STEP*Math.cos(Ce(e.rotationY)),e.translationZ=e.translationZ+t.TRANSLATION_STEP*Math.sin(Ce(e.rotationY)),e.transform=Re(e)},translateIn:e=>{e.translationZ=e.translationZ-3*t.TRANSLATION_STEP*Math.cos(Ce(-e.rotationY)),e.translationX=e.translationX-3*t.TRANSLATION_STEP*Math.sin(Ce(-e.rotationY)),e.transform=Re(e)},translateOut:e=>{e.translationZ=e.translationZ+3*t.TRANSLATION_STEP*Math.cos(Ce(-e.rotationY)),e.translationX=e.translationX+3*t.TRANSLATION_STEP*Math.sin(Ce(-e.rotationY)),e.transform=Re(e)},translateXWith:(e,t)=>{e.translationX=e.translationX+t.payload*Math.cos(Ce(e.rotationY)),e.translationZ=e.translationZ+t.payload*Math.sin(Ce(e.rotationY)),e.transform=Re(e)},translateYWith:(e,t)=>{e.translationY=e.translationY+t.payload,e.transform=Re(e)},translateZWith:(e,t)=>{e.translationZ=e.translationZ+t.payload,e.transform=Re(e)},scaleUp:e=>{const a=e.scale+t.SCALE_STEP,n=a<t.SCALE_UPPER_LIMIT?a:t.SCALE_UPPER_LIMIT;e.scale=n,e.transform=Re(e)},scaleDown:e=>{const a=e.scale-t.SCALE_STEP,n=a>t.SCALE_LOWER_LIMIT?a:t.SCALE_LOWER_LIMIT;e.scale=n,e.transform=Re(e)},scaleUpWith:(e,a)=>{const n=e.scale+Math.abs(a.payload),r=n<t.SCALE_UPPER_LIMIT?n:t.SCALE_UPPER_LIMIT;e.scale=r,e.transform=Re(e)},scaleDownWith:(e,a)=>{const n=e.scale-Math.abs(a.payload),r=n>t.SCALE_LOWER_LIMIT?n:t.SCALE_LOWER_LIMIT;e.scale=r,e.transform=Re(e)},setTree:(e,t)=>{e.tree=[...t.payload]},setActiveUniverse:(e,t)=>{e.activeUniverseID=t.payload},spaceResetTransform:e=>{e.scale=1,e.rotationX=0,e.rotationY=0,e.translationX=0,e.translationY=0,e.translationZ=0,e.transform=Re(e)},setViewSize:(e,t)=>{e.viewSize=t.payload},setSpaceSize:(e,t)=>{e.spaceSize=t.payload},updateSpaceTreePlane:(e,t)=>{const n=a.general.tree.updateTreePlane(e.tree,t.payload);e.tree=n},updateSpaceLinkCoordinates:(e,t)=>{const{planeID:n,linkCoordinates:r}=t.payload,o=a.general.tree.updateTreeByPlaneIDWithLinkCoordinates(e.tree,n,r);e.tree=o},spaceSetView:(e,t)=>{e.view=t.payload},spaceSetCulledView:(e,t)=>{e.culledView=t.payload}}}),_e=Oe.actions,ye=Oe.reducer;var Le=Object.freeze({__proto__:null,space:Oe,actions:_e,selectors:Ie,reducer:ye});const Ae={general:s.plurid,interaction:s.plurid},Ue=i.createSlice({name:"themes",initialState:Ae,reducers:{setGeneralTheme:(e,t)=>{e.general=t.payload},setInteractionTheme:(e,t)=>{e.interaction=t.payload}}}),De=Ue.actions,xe=e=>e.themes.general,Ne=e=>e.themes.general,Me={getGeneralTheme:xe,getInteractionTheme:Ne},ke=Ue.reducer;var Fe=Object.freeze({__proto__:null,themes:Ue,actions:De,getGeneralTheme:xe,getInteractionTheme:Ne,selectors:Me,reducer:ke});const Be=i.createSlice({name:"ui",initialState:{toolbarScrollPosition:0},reducers:{setUIToolbarScrollPosition:(e,t)=>{e.toolbarScrollPosition=t.payload}}}),Ye=Be.actions,$e=e=>e.ui.toolbarScrollPosition,Xe={getToolbarScrollPosition:$e},Ve=Be.reducer;var ze={configuration:K,general:q,shortcuts:ne,space:Le,themes:Fe,ui:Object.freeze({__proto__:null,ui:Be,actions:Ye,getToolbarScrollPosition:$e,selectors:Xe,reducer:Ve})};const Ke=i.combineReducers({configuration:ze.configuration.reducer,general:ze.general.reducer,shortcuts:ze.shortcuts.reducer,space:ze.space.reducer,themes:ze.themes.reducer,ui:ze.ui.reducer}),Ze=e=>i.configureStore({preloadedState:e,reducer:Ke,devTools:!1}),je=x.default.createContext({});function Ge(e,t,a,n){return new(a||(a=Promise))((function(r,o){function i(e){try{s(n.next(e))}catch(e){o(e)}}function l(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(i,l)}s((n=n.apply(e,t||[])).next())}))}const We=x.default.createContext(null);var He={configuration:ze.configuration.actions,general:ze.general.actions,shortcuts:ze.shortcuts.actions,space:ze.space.actions,themes:ze.themes.actions,ui:ze.ui.actions};const{quaternion:qe,transform:Je,matrix:Qe}=a.interaction,{degToRad:et,radToDeg:tt}=qe,{multiplyMatricesArray:at,translateMatrix:nt,rotateYMatrix:rt,matrixToCSSMatrix:ot,arrayToMatrix:it,inverseMatrix:lt}=Je.general,{getTransformRotate:st,getTransformTranslate:ct,getTransformScale:ut}=Je.matrix3d,{rotateMatrix:dt,translateMatrix:ft,scaleMatrix:pt,multiplyArrayOfMatrices:mt}=Qe,gt=(e,t,n)=>{const r=a.general.configuration.merge(t);if(e)for(const t of e){const e=ue(t);a.routing.resolveRoute(e.route)}const o=n||[],i=[];for(const e of o)if("string"==typeof e){const t=a.routing.resolveRoute(e);if(!t)continue;i.push(t.route)}const l="localhost:63000",s=new de(e,l).getAll();return{computedTree:new a.space.tree.Tree({planes:s,configuration:r,view:i},l).compute(),appConfiguration:r}},ht=(()=>{let e;return a=>{const n=e=>a(He.space.setAnimatedTransform(e));n(!0),e&&clearTimeout(e),e=setTimeout((()=>{n(!1)}),t.PLURID_DEFAULT_ANIMATED_TRANSFORM_TIMEOUT)}})(),Tt=(e,a,n,r=!0)=>{if(n&&(n.ctrlKey||n.metaKey))return;if(!a)return;const o=t=>e(He.space.setSpaceField(t)),{matrix3d:i,transform:l}=(e=>{const{location:t}=e,{translateX:a,translateY:n,translateZ:r,rotateY:o}=t;return{transform:(()=>{const e="undefined"==typeof window?720:window.innerWidth/2,t="undefined"==typeof window?400:window.innerHeight/2,i=-1*a+e,l=-1*n+t,s=-1*r,c=dt(0,et(o)),u=ft(a,n,r),d=pt(1),f=mt([u,ft(i,l,s),c,ft(-i,-l,-s),d]),p=lt(it(f)),m=ot(p),g=st(m),h=ct(m),T=ut(m);return{translationX:h.translateX,translationY:h.translateY,translationZ:h.translateZ,rotationX:tt(g.rotateX),rotationY:tt(g.rotateY),scale:T.scale}})(),matrix3d:(()=>{const t=o<100?1:-1,i=o<100?-1:1,l=o<100&&e.parentPlaneID?200:0,s=at([nt(-a,-n,t*r),rt(et(o)),nt(a,n,i*r),nt(-(a+l),-n,t*r)]);return ot(s)})()}})(a);var s;ht(e),o({field:"transform",value:i}),s=Object.assign({},l),e(He.space.setTransform(s)),r&&o({field:"isolatePlane",value:""}),setTimeout((()=>{(e=>{const a=`[id='${e+t.FOCUS_ANCHOR_SUFFIX}']`,n=document.querySelector(a);n&&n.focus()})(a.planeID),o({field:"activePlaneID",value:a.planeID})}),t.PLURID_DEFAULT_ANIMATED_TRANSFORM_TIMEOUT)},Et=e=>{const{activePlaneID:t,tree:n}=e.space;if(!t)return;return a.space.tree.logic.getTreePlaneByID(n,t)},St=(e,t,a)=>{for(const[n,r]of e.entries()){if(r.planeID===t)return null!=a?a:n;if(r.children){const e=St(r.children,t,n);if("number"==typeof e)return e}}},vt=(e,t,a)=>{const{activePlaneID:n,tree:r}=t.space,o=St(r,n);if("number"!=typeof o)return;const i=r["previous"===a?o-1||0:o+1];i&&Tt(e,i,void 0,!0)},Pt=(e,t)=>{vt(e,t,"previous")},bt=(e,t)=>{vt(e,t,"next")},Rt=(e,t,a)=>{const{tree:n}=t.space,r=n[a];r&&Tt(e,r,void 0,!0)},{direction:It}=a.interaction,Ct=(e,n,r,o,i,s)=>{if(o.defaultPrevented)return;if(l.dom.verifyPathInputElement(l.dom.getEventPath(o)))return;const c=!(o.shiftKey||o.altKey||o.ctrlKey||o.metaKey);if("KeyF"===o.code&&c)return e(He.configuration.toggleConfigurationSpaceFirstPerson());if(i){if("KeyW"===o.code&&c&&s.translationZ)return e(He.space.viewCameraMoveForward());if("KeyS"===o.code&&c&&s.translationZ)return e(He.space.viewCameraMoveBackward());if("KeyA"===o.code&&c&&s.translationX)return e(He.space.viewCameraMoveLeft());if("KeyA"===o.code&&o.shiftKey&&s.rotationY)return e(He.space.viewCameraTurnLeft());if("KeyD"===o.code&&c&&s.translationX)return e(He.space.viewCameraMoveRight());if("KeyD"===o.code&&o.shiftKey&&s.rotationY)return e(He.space.viewCameraTurnRight());if("KeyQ"===o.code&&c&&s.rotationX)return e(He.space.viewCameraTurnUp());if("KeyZ"===o.code&&c&&s.rotationX)return e(He.space.viewCameraTurnDown());if("KeyE"===o.code&&c&&s.translationY)return e(He.space.viewCameraMoveUp());if("KeyC"===o.code&&c&&s.translationY)return e(He.space.viewCameraMoveDown())}if("KeyR"===o.code&&c)return e(He.configuration.setConfigurationSpaceTransformMode(t.TRANSFORM_MODES.ROTATION));if("KeyT"===o.code&&c)return e(He.configuration.setConfigurationSpaceTransformMode(t.TRANSFORM_MODES.TRANSLATION));if("KeyS"===o.code&&c&&!i)return e(He.configuration.setConfigurationSpaceTransformMode(t.TRANSFORM_MODES.SCALE));if("ArrowRight"===o.key){if(o.shiftKey&&s.rotationY)return e(He.space.rotateLeft());if(o.altKey&&s.translationX)return e(He.space.translateRight())}if("ArrowLeft"===o.key){if(o.shiftKey&&s.rotationY)return e(He.space.rotateRight());if(o.altKey&&s.translationX)return e(He.space.translateLeft())}if("ArrowUp"===o.key){if(o.shiftKey&&o.altKey&&s.translationZ)return e(He.space.translateIn());if(o.shiftKey&&!o.altKey&&s.rotationX)return e(He.space.rotateUp());if(o.altKey&&!o.shiftKey&&s.translationY)return e(He.space.translateUp());if(o.metaKey||o.ctrlKey&&s.scale)return e(He.space.scaleUp())}if("ArrowDown"===o.key){if(o.shiftKey&&o.altKey&&s.translationZ)return e(He.space.translateOut());if(o.shiftKey&&!o.altKey&&s.rotationX)return e(He.space.rotateDown());if(o.altKey&&!o.shiftKey&&s.translationY)return e(He.space.translateDown());if(o.metaKey||o.ctrlKey&&s.scale)return e(He.space.scaleDown())}if(o.altKey&&"KeyF"===o.code)((e,t)=>{const a=Et(t);if(!a)return;Tt(e,a,void 0,!1)})(e,n);else if(o.altKey&&"KeyB"===o.code)((e,t)=>{const n=Et(t);if(!n||!n.parentPlaneID)return;const r=a.space.tree.logic.getTreePlaneByID(t.space.tree,n.parentPlaneID);r&&Tt(e,r)})(e,n);else if(o.altKey&&"KeyR"===o.code)((e,a)=>{const{activePlaneID:n}=e.space;n&&a.publish({topic:t.PLURID_PUBSUB_TOPIC.REFRESH_PLANE,data:{id:n}})})(n,r);else if(o.altKey&&"KeyE"===o.code)((e,a)=>{const{activePlaneID:n,isolatePlane:r}=e.space;r?a.publish({topic:t.PLURID_PUBSUB_TOPIC.ISOLATE_PLANE,data:{id:""}}):n&&a.publish({topic:t.PLURID_PUBSUB_TOPIC.ISOLATE_PLANE,data:{id:n}})})(n,r);else if(o.altKey&&o.shiftKey&&"KeyT"===o.code)(e=>{e.publish({topic:t.PLURID_PUBSUB_TOPIC.OPEN_CLOSED_PLANE})})(r);else if(o.altKey&&"KeyW"===o.code)((e,a)=>{const{activePlaneID:n}=e.space;n&&a.publish({topic:t.PLURID_PUBSUB_TOPIC.CLOSE_PLANE,data:{id:n}})})(n,r);else if(o.altKey&&"KeyA"===o.code)Pt(e,n);else if(o.altKey&&"KeyD"===o.code)bt(e,n);else if(o.altKey&&o.code.startsWith("Digit")){const t=parseInt(o.code.replace("Digit",""))-1;Rt(e,n,t)}else;},wt=()=>Ge(void 0,void 0,void 0,(function*(){return yield Promise.resolve().then((function(){return function(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}(U.default)}))}));var Ot={configuration:ze.configuration.selectors,general:ze.general.selectors,shortcuts:ze.shortcuts.selectors,space:ze.space.selectors,themes:ze.themes.selectors,ui:ze.ui.selectors};const _t=c.createGlobalStyle`
2
+ *,
3
+ *:after,
4
+ *:before {
5
+ box-sizing: border-box;
6
+ font-kerning: auto;
7
+ text-rendering: optimizeLegibility;
8
+ }
9
+
10
+ html, body {
11
+ margin: 0;
12
+ height: 100%;
13
+ width: 100%;
14
+ overscroll-behavior-x: ${({preventOverscroll:e})=>e?"none":"auto"};
15
+ }
16
+
17
+ html {
18
+ overflow: hidden;
19
+ background: black;
20
+ color: white;
21
+ font-family: ${({theme:e})=>e.fontFamilySansSerif}
22
+ }
23
+ `,yt=M.default.div`
24
+ height: 100%;
25
+ min-height: ${e=>e.fullHeight?"100vh":"100%"};
26
+ min-height: ${e=>e.fullHeight?"-webkit-fill-available":"100%"};
27
+
28
+ width: 100%;
29
+ position: relative;
30
+ scroll-snap-align: start;
31
+ outline: none;
32
+ overflow: hidden;
33
+
34
+ cursor: ${e=>e.transformMode===t.TRANSFORM_MODES.TRANSLATION||e.transformMode===t.TRANSFORM_MODES.ROTATION?"all-scroll":e.transformMode===t.TRANSFORM_MODES.SCALE?"ns-resize":"initial"};
35
+ user-select: ${e=>"ALL"!==e.transformMode?"none":"initial !important"};
36
+ touch-action: ${e=>"ALL"!==e.transformMode?"none !important":"initial !important"};
37
+ -webkit-user-drag: ${e=>"ALL"!==e.transformMode?"none":"initial !important"};
38
+ -webkit-tap-highlight-color: ${e=>"ALL"!==e.transformMode?"rgba(0, 0, 0, 0)":"initial !important"};
39
+ `;M.default.div`
40
+ outline: none;
41
+ background: ${e=>{if(e.opaque){return`radial-gradient(\n ellipse at center,\n ${"dark"===e.theme.type?e.theme.backgroundColorTertiary:e.theme.backgroundColorPrimary} 0%,\n ${"dark"===e.theme.type?e.theme.backgroundColorPrimary:e.theme.backgroundColorTertiary} 100%)\n `}return"transparent"}};
42
+ `;class Lt extends x.default.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e,t){}render(){return this.state.hasError?this.props.renderError?this.props.renderError:x.default.createElement("h1",null,"Something went wrong."):this.props.children}}const At=M.default.div`
43
+ background-color: ${({transparentUI:e,mouseOver:t,theme:a,planeOpacity:n})=>{if(e&&!t)return a.backgroundColorPrimaryAlpha;if(1!==n){const e=s.decomposeColor(a.backgroundColorPrimary);if(e){return`hsla(${e.hue}, ${e.saturation}%, ${e.lightness}%, ${n})`}return"transparent"}return a.backgroundColorPrimary}};
44
+ box-shadow: ${({planeOpacity:e,theme:t})=>0===e?"none":t.boxShadowUmbra};
45
+ color: ${({theme:e})=>e.colorPrimary};
46
+ opacity: ${({show:e})=>e?"1":"0"};
47
+ user-select: ${({show:e})=>e?"auto":"none"};
48
+
49
+ position: absolute;
50
+ height: auto;
51
+ width: 100%;
52
+ font-size: 0.9rem;
53
+ font-family: ${({theme:e})=>e.fontFamilySansSerif};
54
+ transition: background-color 300ms linear;
55
+
56
+ display: grid;
57
+ grid-template-columns: 1fr;
58
+ grid-template-rows: ${({planeControls:e})=>e?"56px auto":"auto"};
59
+
60
+ transform-origin: 0 0 0;
61
+ `,Ut=M.default.a`
62
+ position: absolute;
63
+ top: 0;
64
+ left: 0;
65
+ height: 0;
66
+ width: 0;
67
+ pointer-events: none;
68
+ user-select: none;
69
+ `,Dt=M.default.div`
70
+ background-color: ${({theme:e,planeControls:t,planeOpacity:a,transparentUI:n,mouseOver:r})=>n&&!r?e.backgroundColorPrimaryAlpha:0===a?"transparent":t?e.backgroundColorDark:e.backgroundColorPrimary};
71
+
72
+ position: absolute;
73
+ top: 0;
74
+ left: -100px;
75
+ height: 30px;
76
+ width: 100px;
77
+ opacity: 0.5;
78
+
79
+ display: flex;
80
+ align-items: center;
81
+ justify-content: center;
82
+ `,xt=o.connect((e=>({stateGeneralTheme:Ot.themes.getGeneralTheme(e),stateConfiguration:Ot.configuration.getConfiguration(e)})),(e=>({})),null,{context:je})((e=>{const{mouseOver:a,stateGeneralTheme:n,stateConfiguration:r}=e,{controls:o,opacity:i}=r.elements.plane,{transparentUI:l}=r.global;return x.default.createElement(Dt,{theme:n,planeControls:o.show,planeOpacity:i,transparentUI:l,mouseOver:a,"data-plurid-entity":t.PLURID_ENTITY_PLANE_BRIDGE})})),Nt=e=>{const{theme:t,refreshing:a,refreshPlane:n}=e;return x.default.createElement(d.PluridIconReset,{atClick:()=>{n()},theme:t,title:"refresh",style:{opacity:a?"0":"1",pointerEvents:a?"none":void 0}})},Mt=e=>{const{theme:t,isolated:a,isolatePlane:n}=e,r=a?"isolated":"isolate",o=!!a;return x.default.createElement(d.PluridIconRectangle,{atClick:()=>{n()},theme:t,title:r,fill:o})},kt=M.default.div`
83
+ background-color: ${({transparentUI:e,mouseOver:t,theme:a})=>e&&!t?"transparent":a.backgroundColorDark};
84
+ box-shadow: ${({theme:e})=>e.boxShadowUmbraInset};
85
+
86
+ width: 100%;
87
+ display: grid;
88
+ align-items: center;
89
+ justify-content: center;
90
+ grid-template-rows: 1fr;
91
+ grid-template-columns: 1fr 2fr 1fr;
92
+ transition: background-color 300ms linear;
93
+
94
+ @media (max-width: 800px) {
95
+ grid-template-columns: 1fr 3fr 1fr;
96
+ }
97
+ `,Ft=c.css`
98
+ margin: 0 1rem;
99
+ display: flex;
100
+ align-items: center;
101
+ gap: 1rem;
102
+ `,Bt=M.default.div`
103
+ ${Ft}
104
+ `,Yt=M.default.div`
105
+ width: 100%;
106
+ position: relative;
107
+ display: flex;
108
+ align-items: center;
109
+ justify-content: center;
110
+ word-break: break-all;
111
+ `,$t=M.default.div`
112
+ ${Ft}
113
+ justify-content: right;
114
+ `,Xt=o.connect((e=>({configuration:Ot.configuration.getConfiguration(e),stateGeneralTheme:Ot.themes.getGeneralTheme(e),stateInteractionTheme:Ot.themes.getInteractionTheme(e),stateIsolatePlane:Ot.space.getIsolatePlane(e)})),(e=>({dispatch:e})),null,{context:je})((e=>{const{plane:a,treePlane:n,parentTreePlane:o,mouseOver:i,refreshing:l,refreshPlane:s,isolatePlane:c,closePlane:u,configuration:f,stateGeneralTheme:p,stateIsolatePlane:m,dispatch:g}=e,{global:h,elements:T}=f,{transparentUI:E}=h,{title:S,pathbar:v}=T.plane.controls,{planeID:P,route:b,routeDivisions:R}=n,{protocol:I,host:C}=R;C.value,encodeURIComponent(b);const w=m===P,[O,_]=r.useState(n.route);return r.useState(!1),r.useState(!1),x.default.createElement(kt,{theme:p,mouseOver:i,transparentUI:E,"data-plurid-entity":t.PLURID_ENTITY_PLANE_CONTROLS},x.default.createElement(Bt,null,o&&x.default.createElement(d.PluridIconArrowLeft,{atClick:e=>{Tt(g,o,e)},theme:p,title:"back"}),x.default.createElement(d.PluridIconFrame,{atClick:e=>{Tt(g,n,e,!1)},theme:p,title:"focus"}),x.default.createElement(Nt,{theme:p,refreshing:l,refreshPlane:s}),x.default.createElement(Mt,{theme:p,isolated:w,isolatePlane:c})),x.default.createElement(Yt,null,S&&x.default.createElement(x.default.Fragment,null,O)),x.default.createElement($t,null,x.default.createElement(d.PluridIconDelete,{atClick:()=>{u()},theme:p,title:"close"})))})),Vt=M.default.div`
115
+ position: relative;
116
+ `,zt=e=>{const{children:a}=e,n=r.useRef(null);return x.default.createElement(Vt,{ref:n,"data-plurid-entity":t.PLURID_ENTITY_PLANE_CONTENT},a)},Kt=o.connect((e=>({stateTree:Ot.space.getTree(e),stateViewSize:Ot.space.getViewSize(e),stateActivePlaneID:Ot.space.getActivePlaneID(e),stateIsolatePlane:Ot.space.getIsolatePlane(e),stateGeneralTheme:Ot.themes.getGeneralTheme(e),stateConfiguration:Ot.configuration.getConfiguration(e)})),(e=>({dispatchSetSpaceField:t=>e(He.space.setSpaceField(t)),dispatchUpdateSpaceTreePlane:t=>e(He.space.updateSpaceTreePlane(t))})),null,{context:je})((e=>{const n=r.useContext(We);if(!n)return x.default.createElement(x.default.Fragment,null);const{planeRenderError:o,defaultPubSub:i}=n,{planeID:s,plane:c,treePlane:d,children:f,stateTree:p,stateViewSize:m,stateActivePlaneID:g,stateIsolatePlane:h,stateGeneralTheme:T,stateConfiguration:E,dispatchSetSpaceField:S,dispatchUpdateSpaceTreePlane:v}=e,{global:P,elements:b}=E,{transparentUI:R}=P,{controls:I,width:C,opacity:w}=b.plane,O=I.show;l.mathematics.numbers.checkIntegerNonUnit(C)||m.width;const _=a.space.tree.logic.getTreePlaneByID(p,d.parentPlaneID),y=r.useRef(null),[L,A]=r.useState(0),[U,D]=r.useState(!1),[N,M]=r.useState(!1),k=()=>{D(!0),setTimeout((()=>{A((e=>++e)),D(!1)}),250)},F=u.useDebouncedCallback((()=>{if(g===s)return;S({field:"activePlaneID",value:s})}),500);r.useEffect((()=>{S({field:"activePlaneID",value:N?s:""})}),[s,N]),r.useEffect((()=>{const e=i.subscribe({topic:t.PLURID_PUBSUB_TOPIC.REFRESH_PLANE,callback:e=>{const{id:t}=e;t===s&&k()}});return()=>{i.unsubscribe(e)}}),[L,s]);const B=s+"-"+L,Y=s+t.FOCUS_ANCHOR_SUFFIX,$=(()=>{if(d.show&&h)return h===s?"1":"0"})(),X=(()=>{if(d.show&&h&&h!==s)return"none"})(),V=a.cleanTemplate(`\n translateX(${d.location.translateX}px)\n translateY(${d.location.translateY}px)\n translateZ(${d.location.translateZ}px)\n rotateX(${d.location.rotateX}deg)\n rotateY(${d.location.rotateY}deg)\n `),z={};return x.default.createElement(At,{key:B,ref:y,theme:T,planeControls:O,planeOpacity:w,show:d.show,id:s,style:{width:"100%",transform:V,opacity:$,pointerEvents:X},onMouseEnter:()=>M(!0),onMouseLeave:()=>M(!1),onMouseOver:()=>F(),onMouseMove:()=>F(),transparentUI:R,mouseOver:N,"data-plurid-plane":s,"data-plurid-entity":t.PLURID_ENTITY_PLANE},x.default.createElement(Ut,{tabIndex:0,id:Y}),d.show&&x.default.createElement(x.default.Fragment,null,d.parentPlaneID&&x.default.createElement(xt,{mouseOver:N}),O&&x.default.createElement(Xt,{plane:c,treePlane:d,parentTreePlane:_,mouseOver:N,refreshing:U,refreshPlane:k,isolatePlane:()=>{const e=h!==s?s:"";i.publish({topic:t.PLURID_PUBSUB_TOPIC.ISOLATE_PLANE,data:{id:e}})},closePlane:()=>{i.publish({topic:t.PLURID_PUBSUB_TOPIC.CLOSE_PLANE,data:{id:s}})}}),o?x.default.createElement(Lt,{renderError:"boolean"!=typeof o?o:void 0},x.default.createElement(zt,Object.assign({},z),f)):x.default.createElement(zt,Object.assign({},z),f)))})),Zt=e=>!!e&&("string"!=typeof e&&!e.url),jt=M.default.div`
117
+ transform-style: preserve-3d;
118
+ `,Gt=o.connect((e=>({stateTree:Ot.space.getTree(e)})),(e=>({})),null,{context:je})((e=>{const{plane:a,stateTree:n}=e,{location:o}=a,i=r.useContext(We);if(!i)return x.default.createElement(x.default.Fragment,null);const{planesRegistrar:l,planeContext:s,planeContextValue:c,customPlane:u,matchedRoute:d,defaultPubSub:f}=i,p=u,m=e=>{if(!e.children||0===e.children.length)return[];const t=[],a=ie(l);return e.children.forEach((e=>{if(!a)return;const n=e.sourceID,r=a.get(n);if(r){const a=()=>{const t=r.component,a={plane:{value:r.route.absolute,planeID:e.planeID,parentPlaneID:e.parentPlaneID,fragments:r.route.fragments,parameters:r.route.parameters,query:r.route.query},route:{value:(null==d?void 0:d.match.value)||"",parameters:(null==d?void 0:d.match.parameters)||{},query:(null==d?void 0:d.match.query)||{}},pubSub:f},n={plurid:Object.assign({},a),key:"plurid-plane-"+e.planeID},o=Zt(t),i=Zt(p),l={key:"plurid-plane-child-"+e.planeID,plane:r,treePlane:e,planeID:e.planeID,location:e.location};return p&&i?x.default.createElement(p,Object.assign({},l)):o?x.default.createElement(Kt,Object.assign({},l),s?x.default.createElement(s.Provider,{value:c},x.default.createElement(t,Object.assign({},n))):x.default.createElement(t,Object.assign({},n))):x.default.createElement(x.default.Fragment,null)},n=a();t.push(n)}if(e.children){const a=m(e);a&&t.push(...a)}})),t},g=r.useMemo((()=>m(a)),[JSON.stringify(a),JSON.stringify(n)]),h=a.sourceID;if(!h)return x.default.createElement(x.default.Fragment,null);const T=se(h,l);if(!T)return x.default.createElement(x.default.Fragment,null);const E=T.component,S={plane:{value:T.route.absolute,planeID:a.planeID,parentPlaneID:a.parentPlaneID,fragments:T.route.fragments,parameters:T.route.parameters,query:T.route.query},route:{value:(null==d?void 0:d.match.value)||"",parameters:(null==d?void 0:d.match.parameters)||{},query:(null==d?void 0:d.match.query)||{}},pubSub:f},v={plurid:Object.assign({},S),key:"plurid-plane-"+a.planeID};return p?"function"!=typeof p?x.default.createElement(x.default.Fragment,null):x.default.createElement(jt,{"data-plurid-entity":t.PLURID_ENTITY_ROOT},x.default.createElement(p,{plane:T,treePlane:a,planeID:a.planeID,location:o}),g):x.default.createElement(jt,{"data-plurid-entity":t.PLURID_ENTITY_ROOT},x.default.createElement(Kt,{plane:T,treePlane:a,planeID:a.planeID,location:o},s?x.default.createElement(s.Provider,{value:c},x.default.createElement(E,Object.assign({},v))):x.default.createElement(E,Object.assign({},v))),g)})),Wt=M.default.div`
119
+ transform-style: preserve-3d;
120
+ transform-origin: 0 0 0;
121
+ `,Ht=o.connect((e=>({stateConfiguration:Ot.configuration.getConfiguration(e),spaceTransformMatrix:Ot.space.getTransformMatrix(e),spaceAnimatedTransform:Ot.space.getAnimatedTransform(e),spaceTransformTime:Ot.space.getTransformTime(e),stateTree:Ot.space.getTree(e)})),(e=>({})),null,{context:je})((e=>{const{spaceTransformMatrix:a,spaceAnimatedTransform:n,spaceTransformTime:r,stateTree:o}=e;return x.default.createElement(Wt,{style:{width:"100%",height:"undefined"!=typeof window?window.innerHeight+"px":"821px",transform:a,transition:n?`transform ${r}ms ease-in-out`:"initial"},"data-plurid-entity":t.PLURID_ENTITY_ROOTS},o.map((e=>x.default.createElement(Gt,{key:e.planeID,plane:e}))))})),qt=c.keyframes`
122
+ from {
123
+ opacity: 0%;
124
+ }
125
+
126
+ to {
127
+ opacity: 100%;
128
+ }
129
+ `,Jt=e=>c.css`${qt} ${e}ms linear 100ms forwards`,Qt=M.default.div`
130
+ position: relative;
131
+ height: 100%;
132
+ overflow: hidden;
133
+ perspective: 2000px;
134
+ outline: none;
135
+
136
+ background: ${({opaque:e,theme:t})=>{if(e){return`radial-gradient(\n ellipse at center,\n ${"dark"===t.type?t.backgroundColorTertiary:t.backgroundColorPrimary} 0%,\n ${"dark"===t.type?t.backgroundColorPrimary:t.backgroundColorTertiary} 100%)\n `}return"transparent"}};
137
+
138
+ /* TOFIX */
139
+ /* opacity: ${({fadeInTime:e})=>e?"0":"1"};
140
+ animation: ${({isMounted:e,fadeInTime:t})=>e&&t?Jt(t):""}; */
141
+ `,ea=o.connect((e=>({stateConfiguration:Ot.configuration.getConfiguration(e),stateGeneralTheme:Ot.themes.getGeneralTheme(e)})),(e=>({})),null,{context:je})((e=>{const{stateConfiguration:a,stateGeneralTheme:n}=e,{space:o}=a,{opaque:i,fadeInTime:l}=o,[s,c]=r.useState(!1);return r.useEffect((()=>{c(!0)}),[]),x.default.createElement(Qt,{theme:n,opaque:i,isMounted:s,fadeInTime:l,"data-plurid-entity":t.PLURID_ENTITY_SPACE},x.default.createElement(Ht,null))})),ta=({size:e})=>{switch(e){case t.SIZES.SMALL:return"5px";case t.SIZES.NORMAL:return"10px";case t.SIZES.LARGE:return"15px";default:return"10px"}},aa=M.default.div`
142
+ background-color: ${({theme:e})=>e.backgroundColorTertiaryAlpha};
143
+ height: ${ta};
144
+ width: ${ta};
145
+
146
+ position: absolute;
147
+ top: 50%;
148
+ left: 50%;
149
+ transform: translateX(-50%) translateY(-50%);
150
+ z-index: 99999;
151
+ border-radius: 100px;
152
+ user-select: none;
153
+ pointer-events: none;
154
+ touch-action: none;
155
+ `,na=o.connect((e=>({stateGeneralTheme:Ot.themes.getGeneralTheme(e),stateInteractionTheme:Ot.themes.getInteractionTheme(e),stateConfiguration:Ot.configuration.getConfiguration(e)})),(e=>({})),null,{context:je})((e=>{const{stateGeneralTheme:a,stateConfiguration:n}=e,{space:r}=n,{transformOrigin:o}=r,{show:i,size:l}=o;return i?x.default.createElement(aa,{theme:a,size:l,"data-plurid-entity":t.PLURID_ENTITY_TRANSFORM_ORIGIN}):x.default.createElement(x.default.Fragment,null)}));var ra;!function(e){e.NONE="NONE",e.UNIVERSES="UNIVERSES",e.MORE="MORE"}(ra||(ra={}));const oa=M.default.div`
156
+ bottom: ${({conceal:e,mouseIn:t})=>e?t?"-5px":"-55px":"-5px"};
157
+ pointer-events: ${({showMenu:e})=>e!==ra.NONE?"all":"none"};
158
+ opacity: ${({fadeInTime:e})=>e?"0":"1"};
159
+ animation: ${({fadeInTime:e,isMounted:t})=>t&&e?Jt(e):""};
160
+
161
+ display: grid;
162
+ position: absolute;
163
+ left: 0;
164
+ right: 0;
165
+ height: 75px;
166
+ z-index: 9999;
167
+ transition: bottom 300ms ease-in-out;
168
+ `,ia=M.default.div`
169
+ color: ${({theme:e})=>e.colorPrimary};
170
+ background-color: ${({theme:e,transparentUI:t})=>t?e.backgroundColorPrimaryAlpha:e.backgroundColorSecondary};
171
+ box-shadow: ${({theme:e})=>e.boxShadowUmbra};
172
+ grid-template-columns: ${({showIcons:e,showTransformButtons:t,documentsBased:a})=>e&&!t?a?"repeat(6, minmax(min-content, 40px))":"repeat(5, minmax(min-content, 40px))":t?a?"40px 200px 200px 200px 40px 40px":"40px 200px 200px 200px 40px":a?"repeat(6, minmax(min-content, 40px))":"repeat(5, minmax(min-content, 40px))"};
173
+ opacity: ${({opaque:e,mouseIn:t})=>e||t?"1":"0.4"};
174
+
175
+ z-index: 9999;
176
+ user-select: none;
177
+ /* height: 75px; */
178
+ display: grid;
179
+ pointer-events: all;
180
+ display: grid;
181
+ align-items: center;
182
+ justify-content: center;
183
+ justify-items: center;
184
+ border-radius: 22.5px;
185
+ margin: 0 auto;
186
+ margin-top: 10px;
187
+ margin-bottom: 20px;
188
+ padding: 0 22.5px;
189
+ font-size: 12px;
190
+ height: 45px;
191
+ transition: opacity 300ms ease-in-out;
192
+
193
+ :after {
194
+ content: '';
195
+ position: absolute;
196
+ top: 55px;
197
+ height: 20px;
198
+ left: 0;
199
+ right: 20%;
200
+ }
201
+
202
+ @media (max-width: 900px) {
203
+ :after {
204
+ right: 0;
205
+ }
206
+ }
207
+ `,la=M.default.div`
208
+ padding: ${({button:e,showIcons:t,showTransformButtons:a})=>e||t&&!a?"0":"0 7px"};
209
+ background-color: ${({active:e,theme:t})=>e?t.backgroundColorTertiary:"transparent"};
210
+ min-width: ${({button:e})=>e?"40px":"70px"};
211
+
212
+ height: 45px;
213
+ display: grid;
214
+ align-items: center;
215
+ justify-content: center;
216
+ cursor: pointer;
217
+ user-select: none;
218
+
219
+ @media (hover: hover) {
220
+ :hover {
221
+ background: ${({theme:e})=>e.backgroundColorTertiary};
222
+ }
223
+ }
224
+ `,sa=M.default.div`
225
+ width: 40px;
226
+ display: grid;
227
+ place-content: center;
228
+
229
+ /* svg {
230
+ height: 15px;
231
+ width: 15px;
232
+ fill: white;
233
+ } */
234
+ `,ca=M.default.div`
235
+ position: absolute;
236
+ bottom: 75px;
237
+ max-height: 250px;
238
+ width: 380px;
239
+ left: 50%;
240
+ transform: translateX(-50%);
241
+ border-radius: 22.5px;
242
+ padding: 22px;
243
+ font-size: 0.8rem;
244
+ overflow: hidden;
245
+
246
+ background-color: ${e=>e.theme.backgroundColorSecondary};
247
+ box-shadow: ${e=>e.theme.boxShadowUmbra};
248
+
249
+ ul {
250
+ padding: 0;
251
+ list-style: none;
252
+ }
253
+ `;M.default.div`
254
+ display: flex;
255
+ justify-content: space-between;
256
+ align-items: center;
257
+ position: relative;
258
+
259
+ margin-bottom: ${e=>e.afterline?"30px":"10px"};
260
+
261
+ ${e=>e.afterline?"\n ::after {\n position: absolute;\n content: '';\n left: 0;\n right: 0;\n bottom: -15px;\n height: 1px;\n background-color: white;\n }\n ":""};
262
+ `;const ua=M.default.div`
263
+ max-height: 210px;
264
+ overflow: scroll;
265
+ padding: 0 5px;
266
+
267
+ /* Hide Scrollbar */
268
+ scrollbar-width: none; /* Firefox 64 */
269
+ -ms-overflow-style: none; /* Internet Explorer 11 */
270
+ ::-webkit-scrollbar { /** WebKit */
271
+ display: none;
272
+ }
273
+
274
+ h5::first-child {
275
+ margin-top: 0;
276
+ }
277
+ `;M.default.li`
278
+ margin: 10px 0;
279
+ padding: 10px 20px;
280
+ border-radius: 100px;
281
+
282
+ cursor: ${e=>e.active?"initial":"pointer"};
283
+ background-color: ${e=>e.active?e.theme.backgroundColorTertiary:""};
284
+ box-shadow: ${e=>e.active?"inset 0px -1px 6px 0px "+e.theme.boxShadowUmbraColor:""};
285
+
286
+ :hover {
287
+ background-color: ${e=>e.theme.backgroundColorTertiary};
288
+ box-shadow: ${e=>e.active?"inset 0px -1px 6px 0px "+e.theme.boxShadowUmbraColor:e.theme.boxShadowUmbra};
289
+ }
290
+ `;const da=o.connect((e=>({interactionTheme:Ot.themes.getInteractionTheme(e),activeUniverseID:Ot.space.getActiveUniverseID(e)})),(e=>({dispatchSetActiveUniverse:t=>e(He.space.setActiveUniverse(t))})),null,{context:je})((e=>{const{interactionTheme:t,activeUniverseID:a,dispatchSetActiveUniverse:n}=e;return x.default.createElement(ca,{theme:t},x.default.createElement(ua,null))})),fa=M.default.div`
291
+ h5 {
292
+ font-size: 1rem;
293
+ margin: 0;
294
+ }
295
+
296
+ margin-bottom: 2rem;
297
+ border-top-left-radius: 15px;
298
+ border-top-right-radius: 15px;
299
+
300
+ padding-bottom: ${e=>e.transparentUI&&e.toggled?"0.5rem":"0"};
301
+ background-color: ${e=>e.transparentUI&&e.mouseOver?e.theme.backgroundColorSecondary:"transparent"};
302
+ box-shadow: ${e=>e.transparentUI&&e.mouseOver?e.theme.boxShadowUmbra:"none"};
303
+ color: ${e=>e.theme.colorPrimary};
304
+ `,pa=M.default.div`
305
+ user-select: none;
306
+ cursor: pointer;
307
+ padding: 0.5rem;
308
+ margin-bottom: 0.5rem;
309
+ border-bottom: 1px solid transparent;
310
+ text-align: left;
311
+
312
+ :hover {
313
+ border-bottom: 1px solid ${e=>e.theme.colorPrimary};
314
+ }
315
+ `,ma=M.default.div`
316
+ `,{typography:{Heading:ga}}=f.universal,ha=o.connect((e=>({interactionTheme:Ot.themes.getInteractionTheme(e),configuration:Ot.configuration.getConfiguration(e)})),(e=>({})),null,{context:je})((e=>{const{heading:t,items:a,toggled:n,toggle:o,interactionTheme:i,configuration:l}=e,{global:s}=l,{transparentUI:c}=s,[u,d]=r.useState(!1);return x.default.createElement(fa,{theme:i,onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),transparentUI:c,mouseOver:u,toggled:n},x.default.createElement(pa,{theme:i,onClick:()=>o()},x.default.createElement(ga,{theme:i,type:"h5"},t)),n&&x.default.createElement(ma,null,a))})),Ta=M.default.div`
317
+ position: absolute;
318
+ bottom: 75px;
319
+ height: 280px;
320
+ width: 380px;
321
+ left: 50%;
322
+ transform: translateX(-50%);
323
+ border-radius: 22.5px;
324
+ padding: 22px;
325
+ font-size: 0.8rem;
326
+ overflow: hidden;
327
+
328
+ background-color: ${e=>e.transparentUI?e.theme.backgroundColorPrimaryAlpha:e.theme.backgroundColorSecondary};
329
+ box-shadow: ${e=>e.theme.boxShadowUmbra};
330
+ `,Ea=M.default.div`
331
+ display: flex;
332
+ justify-content: space-between;
333
+ align-items: center;
334
+ position: relative;
335
+ min-height: 30px;
336
+ padding: 0 0.5rem;
337
+
338
+ margin-bottom: ${e=>e.last?"0":e.afterline?"30px":"10px"};
339
+
340
+ ${e=>e.afterline?`\n ::after {\n position: absolute;\n content: '';\n left: 0;\n right: 0;\n bottom: -15px;\n height: 1px;\n background-color: ${e.theme?e.theme.colorPrimary:"white"};\n }\n `:""};
341
+ `,Sa=M.default.div`
342
+ height: 240px;
343
+ overflow: scroll;
344
+ padding: 0 5px;
345
+
346
+ /* Hide Scrollbar */
347
+ scrollbar-width: none; /* Firefox 64 */
348
+ -ms-overflow-style: none; /* Internet Explorer 11 */
349
+ ::-webkit-scrollbar { /** WebKit */
350
+ display: none;
351
+ }
352
+
353
+ h5::first-child {
354
+ margin-top: 0;
355
+ }
356
+ `,{inputs:{Dropdown:va}}=f.universal,Pa=o.connect((e=>({stateLanguage:Ot.configuration.getConfiguration(e).global.language,interactionTheme:Ot.themes.getInteractionTheme(e),configuration:Ot.configuration.getConfiguration(e)})),(e=>({dispatchSetConfigurationThemeGeneralAction:t=>e(He.configuration.setConfigurationThemeGeneral(t)),dispatchSetConfigurationThemeInteractionAction:t=>e(He.configuration.setConfigurationThemeInteraction(t)),dispatchSetConfigurationLanguage:t=>e(He.configuration.setConfigurationLanguage(t)),dispatchSetGeneralTheme:t=>e(He.themes.setGeneralTheme(t)),dispatchSetInteractionTheme:t=>e(He.themes.setInteractionTheme(t))})),null,{context:je})((e=>{const{stateLanguage:n,interactionTheme:o,configuration:i,dispatchSetGeneralTheme:l,dispatchSetInteractionTheme:s,dispatchSetConfigurationThemeGeneralAction:c,dispatchSetConfigurationThemeInteractionAction:u,dispatchSetConfigurationLanguage:d}=e,f=i.global.theme,[p,m]=r.useState("object"==typeof f?f.general:f),[g,h]=r.useState("object"==typeof f?f.interaction:f);return r.useEffect((()=>{"object"==typeof f?(m(f.general),h(f.interaction)):(m(f),h(f))}),[f]),x.default.createElement(x.default.Fragment,null,x.default.createElement(Ea,null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerGlobalGeneralTheme),x.default.createElement(va,{selectables:Object.keys(N.default),selected:"string"==typeof p?p:"",atSelect:e=>(e=>{l(N.default[e]),c(e)})(e),theme:o,filterable:!0,heightItems:3,width:90,style:{fontSize:"0.8rem"}})),x.default.createElement(Ea,null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerGlobalInteractionTheme),x.default.createElement(va,{selectables:Object.keys(N.default),selected:"string"==typeof g?g:"",atSelect:e=>(e=>{s(N.default[e]),u(e)})(e),theme:o,heightItems:3,filterable:!0,width:90,style:{fontSize:"0.8rem"}})),x.default.createElement(Ea,{last:!0},a.internatiolate(n,t.internationalization.fields.toolbarDrawerGlobalLanguage),x.default.createElement(va,{selectables:t.internationalization.languages,selected:n,atSelect:e=>{d(e)},theme:o,heightItems:3,width:90,style:{fontSize:"0.8rem"}})))})),{inputs:{Switch:ba}}=f.universal,Ra=o.connect((e=>({stateLanguage:Ot.configuration.getConfiguration(e).global.language,interactionTheme:Ot.themes.getInteractionTheme(e),configuration:Ot.configuration.getConfiguration(e)})),(e=>({dispatchToggleConfigurationSpaceTransformMultimode:t=>e(He.configuration.toggleConfigurationSpaceTransformMultimode(t)),dispatchSetConfigurationSpaceTransformTouch:t=>e(He.configuration.setConfigurationSpaceTransformTouch(t)),dispatchSetConfigurationSpaceTransformLocks:t=>e(He.configuration.setConfigurationSpaceTransformLocks(t))})),null,{context:je})((e=>{const{stateLanguage:n,interactionTheme:r,configuration:o,dispatchToggleConfigurationSpaceTransformMultimode:i,dispatchSetConfigurationSpaceTransformTouch:l,dispatchSetConfigurationSpaceTransformLocks:s}=e,{transformMultimode:c,transformLocks:u,transformTouch:d}=o.space;return x.default.createElement(x.default.Fragment,null,x.default.createElement(Ea,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerTransformMultiModeTransform)),x.default.createElement(ba,{theme:r,checked:c,atChange:()=>i(!c),exclusive:!0,level:2})),x.default.createElement(Ea,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerTransformAllowRotationX)),x.default.createElement(ba,{theme:r,checked:u.rotationX,atChange:()=>s("rotationX"),exclusive:!0,level:2})),x.default.createElement(Ea,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerTransformAllowRotationY)),x.default.createElement(ba,{theme:r,checked:u.rotationY,atChange:()=>s("rotationY"),exclusive:!0,level:2})),x.default.createElement(Ea,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerTransformAllowTranslationX)),x.default.createElement(ba,{theme:r,checked:u.translationX,atChange:()=>s("translationX"),exclusive:!0,level:2})),x.default.createElement(Ea,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerTransformAllowTranslationY)),x.default.createElement(ba,{theme:r,checked:u.translationY,atChange:()=>s("translationY"),exclusive:!0,level:2})),x.default.createElement(Ea,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerTransformAllowTranslationZ)),x.default.createElement(ba,{theme:r,checked:u.translationZ,atChange:()=>s("translationZ"),exclusive:!0,level:2})),x.default.createElement(Ea,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerTransformAllowScale)),x.default.createElement(ba,{theme:r,checked:u.scale,atChange:()=>s("scale"),exclusive:!0,level:2})),x.default.createElement(Ea,{last:!0},x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerTransformTouchTransform),": ",d===t.TRANSFORM_TOUCHES.PAN?"pan":"swipe"),x.default.createElement(ba,{theme:r,checked:d===t.TRANSFORM_TOUCHES.PAN,atChange:()=>d===t.TRANSFORM_TOUCHES.PAN?l(t.TRANSFORM_TOUCHES.SWIPE):l(t.TRANSFORM_TOUCHES.PAN),level:2})))})),{inputs:{Dropdown:Ia,Switch:Ca,Slider:wa}}=f.universal,Oa=o.connect((e=>({interactionTheme:Ot.themes.getInteractionTheme(e),configuration:Ot.configuration.getConfiguration(e)})),(e=>({dispatchSetConfigurationPlaneOpacity:t=>e(He.configuration.setConfigurationPlaneOpacity(t)),dispatchToggleConfigurationSpaceTransparentUI:()=>e(He.configuration.toggleConfigurationSpaceTransparentUI()),dispatchToggleConfigurationSpaceShowTransformOrigin:()=>e(He.configuration.toggleConfigurationShowTransformOrigin()),dispatchSetConfigurationSpaceTransformOriginSize:t=>e(He.configuration.setConfigurationSpaceTransformOriginSize(t)),dispatchSetConfigurationSpaceLayoutType:t=>e(He.configuration.setConfigurationSpaceLayout(t))})),null,{context:je})((e=>{const{interactionTheme:n,configuration:r,dispatchSetConfigurationPlaneOpacity:o,dispatchToggleConfigurationSpaceTransparentUI:i,dispatchToggleConfigurationSpaceShowTransformOrigin:l,dispatchSetConfigurationSpaceTransformOriginSize:s,dispatchSetConfigurationSpaceLayoutType:c}=e,{global:u,space:d,elements:f}=r,{transparentUI:p,language:m}=u,{layout:g,transformOrigin:h}=d,T=t.layoutNames[g.type],{show:E,size:S}=h,v=f.plane.opacity;return x.default.createElement(x.default.Fragment,null,x.default.createElement(Ea,null,a.internatiolate(m,t.internationalization.fields.toolbarDrawerSpaceTransparentUserInterface),x.default.createElement(Ca,{checked:p,atChange:()=>i(),exclusive:!0,level:2,theme:n})),x.default.createElement(Ea,null,a.internatiolate(m,t.internationalization.fields.toolbarDrawerSpaceShowTransformOrigin),x.default.createElement(Ca,{checked:E,atChange:()=>l(),exclusive:!0,level:2,theme:n})),x.default.createElement(Ea,null,a.internatiolate(m,t.internationalization.fields.toolbarDrawerSpaceTransformOriginSize),x.default.createElement(Ia,{selectables:["small","normal","large"],selected:S.toLowerCase(),atSelect:e=>{const a=e.toUpperCase();a!==t.SIZES.SMALL&&a!==t.SIZES.NORMAL&&a!==t.SIZES.LARGE||s(a)},heightItems:3,theme:n})),x.default.createElement(Ea,null,a.internatiolate(m,t.internationalization.fields.toolbarDrawerSpacePlaneOpacity),x.default.createElement(wa,{value:v,max:1,min:0,step:.1,defaultValue:100,atChange:e=>o(e),thumbSize:"large",level:2,theme:n})),x.default.createElement(Ea,{last:!0},a.internatiolate(m,t.internationalization.fields.toolbarDrawerSpaceLayoutType),x.default.createElement(Ia,{selectables:[...Object.values(t.layoutNames)],selected:T,atSelect:e=>{const t=e.toUpperCase().replace(/\s/g,"_");c(t)},heightItems:3,theme:n,width:100})))})),{inputs:{Switch:_a}}=f.universal,ya=o.connect((e=>({stateLanguage:Ot.configuration.getConfiguration(e).global.language,interactionTheme:Ot.themes.getInteractionTheme(e),configuration:Ot.configuration.getConfiguration(e),viewSize:Ot.space.getViewSize(e)})),(e=>({dispatchToggleConfigurationToolbarConceal:()=>e(He.configuration.toggleConfigurationToolbarConceal()),dispatchToggleConfigurationToolbarTransformIcons:()=>e(He.configuration.toggleConfigurationToolbarTransformIcons()),dispatchToggleConfigurationToolbarTransformButtons:()=>e(He.configuration.toggleConfigurationToolbarTransformButtons()),dispatchToggleConfigurationToolbarOpaque:()=>e(He.configuration.toggleConfigurationToolbarOpaque())})),null,{context:je})((e=>{const{stateLanguage:n,interactionTheme:o,configuration:i,viewSize:l,dispatchToggleConfigurationToolbarConceal:s,dispatchToggleConfigurationToolbarTransformIcons:c,dispatchToggleConfigurationToolbarTransformButtons:u,dispatchToggleConfigurationToolbarOpaque:d}=e,{toolbar:f}=i.elements,{conceal:p,opaque:m,transformIcons:g,transformButtons:h}=f,[T,E]=r.useState(!1);return r.useEffect((()=>{l.width<800?E(!0):E(!1)}),[l.width]),x.default.createElement(x.default.Fragment,null,x.default.createElement(Ea,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerToolbarAlwaysOpaque)),x.default.createElement(_a,{theme:o,checked:m,atChange:()=>d(),exclusive:!0,level:2})),x.default.createElement(Ea,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerToolbarShowTransformIcons)),x.default.createElement(_a,{theme:o,checked:g,atChange:()=>c(),exclusive:!0,level:2})),!T&&x.default.createElement(Ea,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerToolbarShowTransformArrows)),x.default.createElement(_a,{theme:o,checked:h,atChange:()=>u(),exclusive:!0,level:2})),x.default.createElement(Ea,{last:!0},x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerToolbarConcealToolbar)),x.default.createElement(_a,{theme:o,checked:p,atChange:()=>s(),exclusive:!0,level:2})))})),{inputs:{Switch:La}}=f.universal,Aa=o.connect((e=>({stateLanguage:Ot.configuration.getConfiguration(e).global.language,interactionTheme:Ot.themes.getInteractionTheme(e),configuration:Ot.configuration.getConfiguration(e)})),(e=>({dispatchToggleConfigurationViewcubeHide:t=>e(He.configuration.toggleConfigurationViewcubeHide(t)),dispatchToggleConfigurationViewcubeButtons:t=>e(He.configuration.toggleConfigurationViewcubeButtons(t)),dispatchToggleConfigurationViewcubeOpaque:t=>e(He.configuration.toggleConfigurationViewcubeOpaque(t)),dispatchToggleConfigurationViewcubeConceal:()=>e(He.configuration.toggleConfigurationViewcubeConceal())})),null,{context:je})((e=>{const{stateLanguage:n,interactionTheme:r,configuration:o,dispatchToggleConfigurationViewcubeHide:i,dispatchToggleConfigurationViewcubeButtons:l,dispatchToggleConfigurationViewcubeOpaque:s,dispatchToggleConfigurationViewcubeConceal:c}=e,{viewcube:u}=o.elements,{show:d,buttons:f,opaque:p,conceal:m}=u;return x.default.createElement(x.default.Fragment,null,x.default.createElement(Ea,{last:!d},x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerViewcubeShowViewcube)),x.default.createElement(La,{theme:r,checked:d,atChange:()=>i(!d),exclusive:!0,level:2})),d&&x.default.createElement(x.default.Fragment,null,x.default.createElement(Ea,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerViewcubeShowTransformButtons)),x.default.createElement(La,{theme:r,checked:f,atChange:()=>l(!f),exclusive:!0,level:2})),x.default.createElement(Ea,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerViewcubeAlwaysOpaque)),x.default.createElement(La,{theme:r,checked:p,atChange:()=>s(!p),exclusive:!0,level:2})),x.default.createElement(Ea,{last:!0},x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerViewcubeConcealViewcube)),x.default.createElement(La,{theme:r,checked:m,atChange:()=>c(),exclusive:!0,level:2}))))})),{inputs:{Slider:Ua}}=f.universal,Da=o.connect((e=>({stateLanguage:Ot.configuration.getConfiguration(e).global.language,stateConfiguration:Ot.configuration.getConfiguration(e),stateInteractionTheme:Ot.themes.getInteractionTheme(e)})),(e=>({dispatchSetConfigurationSpaceCullingDistance:t=>e(He.configuration.setConfigurationSpaceCullingDistance(t))})),null,{context:je})((e=>{const{stateLanguage:n,stateConfiguration:o,stateInteractionTheme:i,dispatchSetConfigurationSpaceCullingDistance:l}=e,{cullingDistance:s}=o.space,[c,d]=r.useState(s),f=u.useDebouncedCallback((e=>{l(e)}),300);return x.default.createElement(x.default.Fragment,null,x.default.createElement(Ea,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerTechnicalCullingDistance)),x.default.createElement(Ua,{theme:i,value:c,atChange:e=>{d(e),f(e)},min:1e3,max:5e3,defaultValue:1500})))})),xa=o.connect((e=>({interactionTheme:Ot.themes.getInteractionTheme(e),configuration:Ot.configuration.getConfiguration(e)})),(e=>({})),null,{context:je})((e=>{const{interactionTheme:n,configuration:r}=e,{global:o}=r,{language:i}=o;return x.default.createElement(x.default.Fragment,null,t.defaultShortcuts.map(((e,r)=>{const{type:o}=e,l=t.shortcutsNames[o],{name:s,internationalizedKey:c,key:u,modifier:d}=l,f=Array.isArray(d)?d.reduce(((e,t)=>e+" + "+t))+" +":"string"==typeof d?d+" +":"",p=a.internatiolate(i,s),m=u,g=c?a.internatiolate(i,m):u,h="TURN_DOWN"===o||"TOGGLE_ROTATE"===o||"TOGGLE_TRANSLATE"===o||"TOGGLE_SCALE"===o;return x.default.createElement(Ea,{key:s,theme:n,afterline:h,last:r===t.defaultShortcuts.length-1},x.default.createElement("div",null,p),x.default.createElement("div",null,f," ",g))})))})),Na={GLOBAL:{name:t.internationalization.fields.toolbarDrawerGlobalTitle,drawer:t.TOOLBAR_DRAWERS.GLOBAL,component:x.default.createElement(Pa,null)},TRANSFORM:{name:t.internationalization.fields.toolbarDrawerTransformTitle,drawer:t.TOOLBAR_DRAWERS.TRANSFORM,component:x.default.createElement(Ra,null)},SPACE:{name:t.internationalization.fields.toolbarDrawerSpaceTitle,drawer:t.TOOLBAR_DRAWERS.SPACE,component:x.default.createElement(Oa,null)},TOOLBAR:{name:t.internationalization.fields.toolbarDrawerToolbarTitle,drawer:t.TOOLBAR_DRAWERS.TOOLBAR,component:x.default.createElement(ya,null)},VIEWCUBE:{name:t.internationalization.fields.toolbarDrawerViewcubeTitle,drawer:t.TOOLBAR_DRAWERS.VIEWCUBE,component:x.default.createElement(Aa,null)},TECHNICAL:{name:t.internationalization.fields.toolbarDrawerTechnicalTitle,drawer:t.TOOLBAR_DRAWERS.TECHNICAL,component:x.default.createElement(Da,null)},SHORTCUTS:{name:t.internationalization.fields.toolbarDrawerShortcutsTitle,drawer:t.TOOLBAR_DRAWERS.SHORTCUTS,component:x.default.createElement(xa,null)}},Ma=Object.values(Na),ka=o.connect((e=>({stateLanguage:Ot.configuration.getConfiguration(e).global.language,stateInteractionTheme:Ot.themes.getInteractionTheme(e),stateConfiguration:Ot.configuration.getConfiguration(e),stateToolbarMenuScrollPosition:Ot.ui.getToolbarScrollPosition(e)})),(e=>({dispatchToggleConfigurationToolbarToggleDrawer:t=>e(He.configuration.toggleConfigurationToolbarToggleDrawer(t)),dispatchSetUIToolbarScrollPosition:t=>e(He.ui.setUIToolbarScrollPosition(t))})),null,{context:je})((e=>{const{stateLanguage:t,stateInteractionTheme:n,stateConfiguration:o,stateToolbarMenuScrollPosition:i,dispatchToggleConfigurationToolbarToggleDrawer:l,dispatchSetUIToolbarScrollPosition:s}=e,{global:c,elements:d}=o,{transparentUI:f}=c,{toolbar:p}=d,{drawers:m,toggledDrawers:g}=p,h=(e=>{if(0===e.length||e.includes("ALL"))return Ma;const t=[];for(const a of e){const e=Na[a];t.push(e)}return t})(m),T=r.useRef(null),E=u.useDebouncedCallback((e=>{if(T.current){const e=T.current.scrollTop;s(e)}}),100);return r.useEffect((()=>(T.current&&T.current.addEventListener("wheel",E),()=>{T.current&&T.current.removeEventListener("wheel",E)})),[T.current]),r.useEffect((()=>{T.current&&(T.current.scrollTop=i)}),[i,T.current]),x.default.createElement(Ta,{theme:n,transparentUI:f},x.default.createElement(Sa,{ref:T},h.map((e=>{const{name:n,drawer:r,component:o}=e,i=a.internatiolate(t,n);return x.default.createElement(ha,{key:n,heading:i,items:x.default.createElement(x.default.Fragment,null,o),toggled:g.includes("ALL")||g.includes(r),toggle:()=>l(r)})}))))})),Fa=M.default.div`
357
+ display: grid;
358
+ align-items: center;
359
+ justify-items: center;
360
+ grid-template-columns: ${e=>e.showTransformButtons?"30px 30px 60px 30px 30px":"1fr"};
361
+ `,Ba=M.default.div`
362
+ user-select: none;
363
+ cursor: pointer;
364
+ border-radius: 50px;
365
+ width: 25px;
366
+ height: 25px;
367
+ display: grid;
368
+ place-content: center;
369
+ padding: 2px;
370
+
371
+ background-color: ${({pressed:e,theme:t})=>e?t.backgroundColorTertiary:"initial"};
372
+
373
+ :hover {
374
+ background-color: ${({theme:e})=>e.backgroundColorTertiary};
375
+ }
376
+ `,Ya={left:"◀",right:"▶",up:"▲",down:"▼"},$a="tap press pressup",Xa=o.connect((e=>({interactionTheme:Ot.themes.getInteractionTheme(e)})),(e=>({})),null,{context:je})((e=>{const{direction:t,transform:a,interactionTheme:n}=e,o=Ya[t]||"",i=r.useRef(null),l=r.useRef(null),[s,c]=r.useState(!1),u=e=>{const t={altKey:e.srcEvent.altKey};switch(e.type){case"tap":a(t),i.current&&(c(!1),clearInterval(i.current));break;case"press":c(!0),i.current=setInterval((()=>{a(t)}),30);break;case"pressup":c(!1),i.current&&clearInterval(i.current)}};return r.useEffect((()=>{if("undefined"==typeof window)return;let e;return Ge(void 0,void 0,void 0,(function*(){const t=(yield wt()).default;e=new t(l.current),e.on($a,u)})),()=>{e&&e.off($a,u)}}),[l.current]),x.default.createElement(Ba,{ref:l,theme:n,pressed:s,onMouseLeave:()=>{i.current&&(c(!1),clearInterval(i.current))}},o)})),Va=o.connect((e=>({stateLanguage:Ot.configuration.getConfiguration(e).global.language,interactionTheme:Ot.themes.getInteractionTheme(e)})),(e=>({rotateUp:()=>e(He.space.rotateUp()),rotateDown:()=>e(He.space.rotateDown()),rotateLeft:()=>e(He.space.rotateLeft()),rotateRight:()=>e(He.space.rotateRight())})),null,{context:je})((e=>{const{showTransformButtons:n,showIcons:r,transformMode:o,toggleTransform:i,stateLanguage:l,interactionTheme:s,rotateUp:c,rotateDown:u,rotateLeft:f,rotateRight:p}=e;return x.default.createElement(Fa,{showTransformButtons:n},n&&x.default.createElement(x.default.Fragment,null,x.default.createElement(Xa,{direction:"left",transform:()=>p()}),x.default.createElement(Xa,{direction:"up",transform:()=>c()})),x.default.createElement(la,{theme:s,onClick:()=>i(t.TRANSFORM_MODES.ROTATION),active:o===t.TRANSFORM_MODES.ROTATION,showIcons:r,showTransformButtons:n,button:r},r?x.default.createElement(sa,null,x.default.createElement(d.PluridIconRotate,null)):x.default.createElement(x.default.Fragment,null,a.internatiolate(l,t.internationalization.fields.toolbarTransformRotate))),n&&x.default.createElement(x.default.Fragment,null,x.default.createElement(Xa,{direction:"down",transform:()=>u()}),x.default.createElement(Xa,{direction:"right",transform:()=>f()})))})),za=M.default.div`
377
+ display: grid;
378
+ align-items: center;
379
+ justify-items: center;
380
+ grid-template-columns: ${e=>e.showTransformButtons?"30px 60px 30px":"1fr"};
381
+ `,Ka=o.connect((e=>({stateLanguage:Ot.configuration.getConfiguration(e).global.language,interactionTheme:Ot.themes.getInteractionTheme(e)})),(e=>({scaleUp:()=>e(He.space.scaleUp()),scaleDown:()=>e(He.space.scaleDown())})),null,{context:je})((e=>{const{showTransformButtons:n,showIcons:r,transformMode:o,toggleTransform:i,stateLanguage:l,interactionTheme:s,scaleUp:c,scaleDown:u}=e;return x.default.createElement(za,{showTransformButtons:n},n&&x.default.createElement(Xa,{direction:"up",transform:()=>c()}),x.default.createElement(la,{theme:s,onClick:()=>i(t.TRANSFORM_MODES.SCALE),active:o===t.TRANSFORM_MODES.SCALE,showIcons:r,showTransformButtons:n,button:r},r?x.default.createElement(sa,null,x.default.createElement(d.PluridIconScale,null)):x.default.createElement(x.default.Fragment,null,a.internatiolate(l,t.internationalization.fields.toolbarTransformScale))),n&&x.default.createElement(Xa,{direction:"down",transform:()=>u()}))})),Za=M.default.div`
382
+ display: grid;
383
+ align-items: center;
384
+ justify-items: center;
385
+ grid-template-columns: ${e=>e.showTransformButtons?"30px 30px 60px 30px 30px":"1fr"};
386
+ `,ja=o.connect((e=>({stateLanguage:Ot.configuration.getConfiguration(e).global.language,interactionTheme:Ot.themes.getInteractionTheme(e)})),(e=>({translateUp:()=>e(He.space.translateUp()),translateDown:()=>e(He.space.translateDown()),translateLeft:()=>e(He.space.translateLeft()),translateRight:()=>e(He.space.translateRight()),translateIn:()=>e(He.space.translateIn()),translateOut:()=>e(He.space.translateOut())})),null,{context:je})((e=>{const{showTransformButtons:n,showIcons:r,transformMode:o,toggleTransform:i,stateLanguage:l,interactionTheme:s,translateUp:c,translateDown:u,translateLeft:f,translateRight:p,translateIn:m,translateOut:g}=e;return x.default.createElement(Za,{showTransformButtons:n},n&&x.default.createElement(x.default.Fragment,null,x.default.createElement(Xa,{direction:"left",transform:()=>f()}),x.default.createElement(Xa,{direction:"up",transform:e=>{e.altKey?g():c()}})),x.default.createElement(la,{theme:s,onClick:()=>i(t.TRANSFORM_MODES.TRANSLATION),active:o===t.TRANSFORM_MODES.TRANSLATION,showIcons:r,showTransformButtons:n,button:r},r?x.default.createElement(sa,null,x.default.createElement(d.PluridIconTranslate,null)):x.default.createElement(x.default.Fragment,null,a.internatiolate(l,t.internationalization.fields.toolbarTransformTranslate))),n&&x.default.createElement(x.default.Fragment,null,x.default.createElement(Xa,{direction:"down",transform:e=>{e.altKey?m():u()}}),x.default.createElement(Xa,{direction:"right",transform:()=>p()})))})),Ga=o.connect((e=>({configuration:Ot.configuration.getConfiguration(e),theme:Ot.themes.getInteractionTheme(e),viewSize:Ot.space.getViewSize(e)})),(e=>({dispatchToggleConfigurationSpaceFirstPerson:()=>e(He.configuration.toggleConfigurationSpaceFirstPerson()),dispatchSetConfigurationSpaceTransformMode:t=>e(He.configuration.setConfigurationSpaceTransformMode(t))})),null,{context:je})((e=>{const{theme:a,configuration:n,viewSize:o,dispatchToggleConfigurationSpaceFirstPerson:i,dispatchSetConfigurationSpaceTransformMode:l}=e,{global:s,elements:c,space:u}=n,{transparentUI:f}=s,{firstPerson:p,transformMode:m,fadeInTime:g}=u,{toolbar:h}=c,{conceal:T,opaque:E,transformIcons:S,transformButtons:v}=h,P=h.show,b=r.useRef(null),[R,I]=r.useState(!1),[C,w]=r.useState(ra.NONE),[O,_]=r.useState(S),[y,L]=r.useState(v),[A,U]=r.useState(!1),D=e=>{C!==ra.NONE&&w(ra.NONE),l(e)};return r.useEffect((()=>{U(!0)}),[]),r.useEffect((()=>{o.width<800&&v&&L(!1),o.width>800&&L(v)}),[o.width]),r.useEffect((()=>{_(S),L(v)}),[S,v]),r.useEffect((()=>(R&&b.current&&clearTimeout(b.current),R||(b.current=setTimeout((()=>{w(ra.NONE)}),400)),()=>{b.current&&clearTimeout(b.current)})),[R]),P?x.default.createElement(oa,{onMouseEnter:()=>I(!0),onMouseLeave:()=>I(!1),mouseIn:R,conceal:T,showMenu:C,isMounted:A,fadeInTime:g,"data-plurid-entity":t.PLURID_ENTITY_TOOLBAR},x.default.createElement(ia,{theme:a,showIcons:O,showTransformButtons:y,documentsBased:!1,mouseIn:R,opaque:E,transparentUI:f},x.default.createElement(la,{theme:a,onClick:()=>i(void 0),active:p,button:!0,showIcons:O,showTransformButtons:y},x.default.createElement(sa,null,x.default.createElement(d.PluridIconFirstPerson,null))),x.default.createElement(Va,{showTransformButtons:y,showIcons:O,transformMode:m,toggleTransform:D}),x.default.createElement(Ka,{showTransformButtons:y,showIcons:O,transformMode:m,toggleTransform:D}),x.default.createElement(ja,{showTransformButtons:y,showIcons:O,transformMode:m,toggleTransform:D}),x.default.createElement(la,{theme:a,onClick:()=>{return e=ra.MORE,void(C===e?w(ra.NONE):(l(t.TRANSFORM_MODES.ALL),w(e)));var e},active:C===ra.MORE,button:!0,showIcons:O,showTransformButtons:y},x.default.createElement(sa,null,x.default.createElement(d.PluridIconMore,null)))),C===ra.UNIVERSES&&x.default.createElement(da,null),C===ra.MORE&&x.default.createElement(ka,null)):x.default.createElement(x.default.Fragment,null)})),Wa=M.default.div`
387
+ position: absolute;
388
+ @media (max-width: 800px) {
389
+ top: ${({conceal:e,mouseOver:t})=>e&&!t?"-90px":"0"};
390
+ }
391
+ bottom: ${({conceal:e,mouseOver:t})=>e&&!t?"-90px":"0"};
392
+ right: ${({conceal:e,mouseOver:t})=>e&&!t?"-100px":"0"};
393
+ position: absolute;
394
+ user-select: none;
395
+ transition: all 300ms ease-in-out;
396
+ z-index: 9998;
397
+ height: 175px;
398
+ display: grid;
399
+ grid-template-areas: "PVScale PVScale PVScale PVScale"
400
+ "PVEmptyOne PVRotateUp PVEmptyTwo PVTranslateY"
401
+ "PVRotateLeft PVModel PVRotateRight PVTranslateY"
402
+ "PVEmptyThree PVRotateDown PVFitview PVTranslateY"
403
+ "PVTranslateX PVTranslateX PVTranslateX PVTranslateX";
404
+ grid-template-rows: 20px 15px 105px 15px 20px;
405
+ grid-template-columns: 15px 100px 15px 20px;
406
+
407
+ opacity: ${({fadeInTime:e})=>e?"0":"1"};
408
+ animation: ${({fadeInTime:e,isMounted:t})=>t&&e?Jt(e):""};
409
+
410
+ :hover {
411
+ opacity: 1;
412
+ }
413
+ `,Ha=M.default.div`
414
+ display: grid;
415
+ place-content: center;
416
+
417
+ /* TODO
418
+ * Themed color
419
+ */
420
+ color: white;
421
+ `,qa=M.default.div`
422
+ user-select: none;
423
+ font-size: 0.6rem;
424
+ width: 1.2rem;
425
+ height: 1.2rem;
426
+ border-radius: 0.6rem;
427
+ display: grid;
428
+ place-content: center;
429
+ cursor: pointer;
430
+
431
+ :hover {
432
+ background-color: ${({theme:e})=>e.backgroundColorTertiary};
433
+ }
434
+ `,Ja=M.default.div`
435
+ grid-area: PVFitview;
436
+ display: grid;
437
+ place-content: center;
438
+ cursor: pointer;
439
+ user-select: none;
440
+
441
+ svg {
442
+ height: 0.8rem;
443
+ width: 0.8rem;
444
+ fill: white;
445
+ }
446
+ `,Qa=M.default.div`
447
+ font-size: 0.6rem;
448
+ position: absolute;
449
+ height: 50px;
450
+ width: 50px;
451
+ pointer-events: none;
452
+ display: grid;
453
+ transform-style: preserve-3d;
454
+ grid-template-areas: "PVFTopLeft PVFTopCenter PVFTopRight"
455
+ "PVFMiddleLeft PVFMiddleCenter PVFMiddleRight"
456
+ "PVFBottomLeft PVFBottomCenter PVFBottomRight";
457
+ grid-template-rows: 10px 30px 10px;
458
+ grid-template-columns: 10px 30px 10px;
459
+ box-sizing: content-box;
460
+ transition: all 300ms linear;
461
+
462
+ border: 1px solid ${({mouseOver:e,theme:t})=>e?t.colorTertiary:t.backgroundColorSecondary};
463
+ box-shadow: ${({face:e,theme:t})=>"base"===e?"0px 0px 12px 2px "+t.boxShadowPenumbraColor:""};
464
+ opacity: ${({opaque:e,mouseOver:t})=>{if(!e){if(t)return"0.8";if(!t)return"0.4"}return"1"}};
465
+ transform: ${({face:e})=>{switch(e){case"front":return"translateZ(25px) rotateY(0deg)";case"back":return"translateZ(-25px) rotateY(-180deg)";case"left":return"translateX(-25px) rotateY(-90deg)";case"right":return"translateX(25px) rotateY(90deg)";case"top":return"translateY(-25px) rotateX(90deg)";case"base":return"translateY(25px) rotateX(-90deg)"}return""}};
466
+ `,en=M.default.div`
467
+ display: grid;
468
+ place-content: center;
469
+ cursor: pointer;
470
+ pointer-events: all;
471
+
472
+ grid-area: ${({type:e})=>`PVF${e}`};
473
+ color: ${({theme:e,hovered:t})=>t?e.colorPrimary:e.colorSecondary};
474
+ background-color: ${({theme:e,transparentUI:t,hovered:a,active:n})=>t&&!a?e.backgroundColorPrimaryAlpha:n||a?e.backgroundColorTertiary:e.backgroundColorSecondary};
475
+ border: 1px solid ${({theme:e,transparentUI:t,hovered:a})=>t&&!a?"transparent":a?e.colorTertiary:e.backgroundColorSecondary};
476
+
477
+ :hover {
478
+ background-color: ${({theme:e})=>e.backgroundColorTertiary};
479
+ }
480
+ `,tn="TopLeft",an="TopCenter",nn="TopRight",rn="MiddleLeft",on="MiddleCenter",ln="MiddleRight",sn="BottomLeft",cn="BottomCenter",un="BottomRight",dn={frontTopLeft:"A1",frontTopCenter:"A2",frontTopRight:"A3",frontMiddleLeft:"B1",frontMiddleCenter:"B2",frontMiddleRight:"B3",frontBottomLeft:"C1",frontBottomCenter:"C2",frontBottomRight:"C3",rightTopLeft:"A3",rightTopCenter:"A4",rightTopRight:"A5",rightMiddleLeft:"B3",rightMiddleCenter:"B4",rightMiddleRight:"B5",rightBottomLeft:"C3",rightBottomCenter:"C4",rightBottomRight:"C5",backTopLeft:"A5",backTopCenter:"A6",backTopRight:"A7",backMiddleLeft:"B5",backMiddleCenter:"B6",backMiddleRight:"B7",backBottomLeft:"C5",backBottomCenter:"C6",backBottomRight:"C7",leftTopLeft:"A7",leftTopCenter:"A8",leftTopRight:"A1",leftMiddleLeft:"B7",leftMiddleCenter:"B8",leftMiddleRight:"B1",leftBottomLeft:"C7",leftBottomCenter:"C8",leftBottomRight:"C1",topTopLeft:"A7",topTopCenter:"A6",topTopRight:"A5",topMiddleLeft:"A8",topMiddleCenter:"D1",topMiddleRight:"A4",topBottomLeft:"A1",topBottomCenter:"A2",topBottomRight:"A3",baseTopLeft:"C1",baseTopCenter:"C2",baseTopRight:"C3",baseMiddleLeft:"C8",baseMiddleCenter:"E1",baseMiddleRight:"C4",baseBottomLeft:"C7",baseBottomCenter:"C6",baseBottomRight:"C5"},fn={A1:{rotateX:-45,rotateY:45},A2:{rotateX:-45,rotateY:0},A3:{rotateX:-45,rotateY:-45},B1:{rotateX:0,rotateY:45},B2:{rotateX:0,rotateY:0},B3:{rotateX:0,rotateY:-45},C1:{rotateX:45,rotateY:45},C2:{rotateX:45,rotateY:0},C3:{rotateX:45,rotateY:-45},A4:{rotateX:-45,rotateY:270.1},A5:{rotateX:-45,rotateY:225},B4:{rotateX:0,rotateY:270.1},B5:{rotateX:0,rotateY:225},C4:{rotateX:45,rotateY:270.1},C5:{rotateX:45,rotateY:225},A6:{rotateX:-45,rotateY:180},A7:{rotateX:-45,rotateY:135},B6:{rotateX:0,rotateY:180.1},B7:{rotateX:0,rotateY:135},C6:{rotateX:45,rotateY:180.1},C7:{rotateX:45,rotateY:135},A8:{rotateX:-45,rotateY:90.1},B8:{rotateX:0,rotateY:90.1},C8:{rotateX:45,rotateY:90.1},D1:{rotateX:-90.1,rotateY:0},E1:{rotateX:90.1,rotateY:0}},pn=o.connect((e=>({generalTheme:Ot.themes.getGeneralTheme(e),interactionTheme:Ot.themes.getInteractionTheme(e),configuration:Ot.configuration.getConfiguration(e)})),(e=>({dispatchRotateX:t=>e(He.space.rotateX(t)),dispatchRotateY:t=>e(He.space.rotateY(t)),dispatchSetAnimatedTransform:t=>e(He.space.setAnimatedTransform(t))})),null,{context:je})((e=>{const{face:t,faceText:a,mouseOver:n,hoveredZone:r,setHoveredZone:o,activeZone:i,setActiveZone:l,generalTheme:s,interactionTheme:c,configuration:u,dispatchRotateX:d,dispatchRotateY:f,dispatchSetAnimatedTransform:p}=e,{global:m,elements:g}=u,{transparentUI:h}=m,T=g.viewcube.opaque,E=e=>{const a=dn[`${t}${e}`],n=fn[a];l(a),p(!0),d(n.rotateX),f(n.rotateY),setTimeout((()=>{p(!1)}),450)};return x.default.createElement(Qa,{theme:s,face:t,opaque:T,mouseOver:n},x.default.createElement(en,{theme:c,type:tn,active:i===dn[`${t}${tn}`],hovered:r===dn[`${t}${tn}`],onClick:()=>E(tn),onMouseEnter:()=>o(dn[`${t}${tn}`]),transparentUI:h}),x.default.createElement(en,{theme:c,type:an,active:i===dn[`${t}${an}`],hovered:r===dn[`${t}${an}`],onClick:()=>E(an),onMouseEnter:()=>o(dn[`${t}${an}`]),transparentUI:h}),x.default.createElement(en,{theme:c,type:nn,active:i===dn[`${t}${nn}`],hovered:r===dn[`${t}${nn}`],onClick:()=>E(nn),onMouseEnter:()=>o(dn[`${t}${nn}`]),transparentUI:h}),x.default.createElement(en,{theme:c,type:rn,active:i===dn[`${t}${rn}`],hovered:r===dn[`${t}${rn}`],onClick:()=>E(rn),onMouseEnter:()=>o(dn[`${t}${rn}`]),transparentUI:h}),x.default.createElement(en,{theme:c,type:on,active:i===dn[`${t}${on}`],hovered:r===dn[`${t}${on}`],onClick:()=>E(on),onMouseEnter:()=>o(dn[`${t}${on}`]),transparentUI:h},a),x.default.createElement(en,{theme:c,type:ln,active:i===dn[`${t}${ln}`],hovered:r===dn[`${t}${ln}`],onClick:()=>E(ln),onMouseEnter:()=>o(dn[`${t}${ln}`]),transparentUI:h}),x.default.createElement(en,{theme:c,type:sn,active:i===dn[`${t}${sn}`],hovered:r===dn[`${t}${sn}`],onClick:()=>E(sn),onMouseEnter:()=>o(dn[`${t}${sn}`]),transparentUI:h}),x.default.createElement(en,{theme:c,type:cn,active:i===dn[`${t}${cn}`],hovered:r===dn[`${t}${cn}`],onClick:()=>E(cn),onMouseEnter:()=>o(dn[`${t}${cn}`]),transparentUI:h}),x.default.createElement(en,{theme:c,type:un,active:i===dn[`${t}${un}`],hovered:r===dn[`${t}${un}`],onClick:()=>E(un),onMouseEnter:()=>o(dn[`${t}${un}`]),transparentUI:h}))})),mn=M.default.div`
481
+ grid-area: PVModel;
482
+ margin-left: -7px;
483
+ margin-top: 5px;
484
+ `,gn=M.default.div`
485
+ perspective: 2000px;
486
+ perspective-origin: 50% 50%;
487
+ `,hn=M.default.div`
488
+ transform-style: preserve-3d;
489
+ width: 50px;
490
+ height: 50px;
491
+ `,{matrixArrayToCSSMatrix:Tn,rotateMatrix:En,multiplyArrayOfMatrices:Sn,scaleMatrix:vn,translateMatrix:Pn}=a.interaction.matrix,{degToRad:bn}=a.interaction.quaternion,Rn=o.connect((e=>({stateLanguage:Ot.configuration.getConfiguration(e).global.language,spaceRotationX:Ot.space.getRotationX(e),spaceRotationY:Ot.space.getRotationY(e),stateAnimatedTransform:Ot.space.getAnimatedTransform(e),stateTransformTime:Ot.space.getTransformTime(e)})),(e=>({})),null,{context:je})((e=>{const{mouseOver:n,stateLanguage:o,spaceRotationX:i,spaceRotationY:l,stateAnimatedTransform:s,stateTransformTime:c}=e,[u,d]=r.useState(""),[f,p]=r.useState("");r.useEffect((()=>{u||p("")}),[i,l]);const m=(()=>{const e=32,t=23,a=0,n=0,r=0,o=0,s=En(bn(-i),bn(-l)),c=Pn(e,t,a),u=vn(1),d=Sn([c,Sn([Pn(n,r,o),s,Pn(-n,-r,-o)]),u]);return Tn(d)})();return x.default.createElement(mn,null,x.default.createElement(gn,null,x.default.createElement(hn,{suppressHydrationWarning:!0,style:{transform:m,transition:n||s?`transform ${c}ms ease-in-out`:""},onMouseLeave:()=>{d("")}},x.default.createElement(pn,{face:"front",faceText:a.internatiolate(o,t.internationalization.fields.viewcubeFront),mouseOver:n,hoveredZone:u,setHoveredZone:d,activeZone:f,setActiveZone:p}),x.default.createElement(pn,{face:"back",faceText:a.internatiolate(o,t.internationalization.fields.viewcubeBack),mouseOver:n,hoveredZone:u,setHoveredZone:d,activeZone:f,setActiveZone:p}),x.default.createElement(pn,{face:"left",faceText:a.internatiolate(o,t.internationalization.fields.viewcubeLeft),mouseOver:n,hoveredZone:u,setHoveredZone:d,activeZone:f,setActiveZone:p}),x.default.createElement(pn,{face:"right",faceText:a.internatiolate(o,t.internationalization.fields.viewcubeRight),mouseOver:n,hoveredZone:u,setHoveredZone:d,activeZone:f,setActiveZone:p}),x.default.createElement(pn,{face:"top",faceText:a.internatiolate(o,t.internationalization.fields.viewcubeTop),mouseOver:n,hoveredZone:u,setHoveredZone:d,activeZone:f,setActiveZone:p}),x.default.createElement(pn,{face:"base",faceText:a.internatiolate(o,t.internationalization.fields.viewcubeBase),mouseOver:n,hoveredZone:u,setHoveredZone:d,activeZone:f,setActiveZone:p}))))})),In=o.connect((e=>({stateConfiguration:Ot.configuration.getConfiguration(e),stateInteractionTheme:Ot.themes.getInteractionTheme(e),stateTransformTime:Ot.space.getTransformTime(e)})),(e=>({dispatchRotateXWith:t=>e(He.space.rotateXWith(t)),dispatchRotateYWith:t=>e(He.space.rotateYWith(t)),dispatchSetAnimatedTransform:t=>e(He.space.setAnimatedTransform(t)),dispatchSpaceResetTransform:()=>e(He.space.spaceResetTransform())})),null,{context:je})((e=>{const{stateConfiguration:a,stateInteractionTheme:n,stateTransformTime:o,dispatchRotateXWith:i,dispatchRotateYWith:l,dispatchSetAnimatedTransform:s,dispatchSpaceResetTransform:c}=e,{elements:u,space:f}=a,{viewcube:p}=u,{buttons:m,conceal:g}=p,{fadeInTime:h}=f,T=p.show,[E,S]=r.useState(!1),[v,P]=r.useState(!1),b=(e,t)=>{switch(s(!0),e){case"rotateX":i(t);break;case"rotateY":l(t)}setTimeout((()=>{s(!1)}),o)};return r.useEffect((()=>{P(!0)}),[]),T?x.default.createElement(Wa,{onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),onMouseMove:()=>E?null:S(!0),conceal:g,mouseOver:E,isMounted:v,fadeInTime:h,"data-plurid-entity":t.PLURID_ENTITY_VIEWCUBE},x.default.createElement(Rn,{mouseOver:E}),E&&m&&x.default.createElement(x.default.Fragment,null,x.default.createElement(Ha,{style:{gridArea:"PVRotateUp"}},x.default.createElement(qa,{theme:n,onClick:()=>b("rotateX",-90.1)},"▲")),x.default.createElement(Ha,{theme:n,style:{gridArea:"PVRotateDown"}},x.default.createElement(qa,{theme:n,onClick:()=>b("rotateX",90.1)},"▼")),x.default.createElement(Ha,{theme:n,style:{gridArea:"PVRotateLeft"}},x.default.createElement(qa,{theme:n,onClick:()=>b("rotateY",90.1)},"◀")),x.default.createElement(Ha,{theme:n,style:{gridArea:"PVRotateRight"}},x.default.createElement(qa,{theme:n,onClick:()=>b("rotateY",-90.1)},"▶")),x.default.createElement(Ja,{onClick:e=>{e.ctrlKey||e.metaKey||(s(!0),c(),setTimeout((()=>{s(!1)}),o))}},x.default.createElement(d.PluridIconGlobal,null)))):x.default.createElement(x.default.Fragment,null)})),Cn=e=>x.default.createElement(x.default.Fragment,null,x.default.createElement(ea,null),x.default.createElement(na,null),x.default.createElement(Ga,null),x.default.createElement(In,null)),wn=o.connect((e=>({state:e,stateConfiguration:Ot.configuration.getConfiguration(e),stateTransform:Ot.space.getTransform(e),stateTree:Ot.space.getTree(e),stateSpaceLoading:Ot.space.getLoading(e),stateSpaceView:Ot.space.getView(e),stateGeneralTheme:Ot.themes.getGeneralTheme(e)})),(e=>({dispatch:e,dispatchSetConfiguration:t=>e(He.configuration.setConfiguration(t)),dispatchSetConfigurationMicro:()=>e(He.configuration.setConfigurationMicro()),dispatchSetSpaceField:t=>e(He.space.setSpaceField(t)),dispatchSpaceSetViewSize:t=>e(He.space.setViewSize(t)),dispatchSetSpaceLoading:t=>e(He.space.setSpaceLoading(t)),dispatchSetAnimatedTransform:t=>e(He.space.setAnimatedTransform(t)),dispatchSetTransformTime:t=>e(He.space.setTransformTime(t)),dispatchSetSpaceLocation:t=>e(He.space.setSpaceLocation(t)),dispatchSetTree:t=>e(He.space.setTree(t)),dispatchSetGeneralTheme:t=>e(He.themes.setGeneralTheme(t)),dispatchSetInteractionTheme:t=>e(He.themes.setInteractionTheme(t)),dispatchRotateX:t=>e(He.space.rotateX(t)),dispatchRotateXWith:t=>e(He.space.rotateXWith(t)),dispatchRotateY:t=>e(He.space.rotateY(t)),dispatchRotateYWith:t=>e(He.space.rotateYWith(t)),dispatchTranslateXWith:t=>e(He.space.translateXWith(t)),dispatchTranslateYWith:t=>e(He.space.translateYWith(t)),dispatchTranslateZWith:t=>e(He.space.translateZWith(t)),dispatchScaleUpWith:t=>e(He.space.scaleUpWith(t)),dispatchScaleDownWith:t=>e(He.space.scaleDownWith(t)),dispatchSpaceSetView:t=>e(He.space.spaceSetView(t))})),null,{context:je})((e=>{const{planesRegistrar:n,customPlane:o,planeContext:i,planeContextValue:s,pubsub:c,planeNotFound:u,planeRenderError:d,matchedRoute:f,hostname:p,state:m,stateConfiguration:g,stateTransform:h,stateSpaceView:T,stateTree:E,stateGeneralTheme:S,dispatch:v,dispatchSetConfiguration:P,dispatchSetGeneralTheme:b,dispatchSetInteractionTheme:R,dispatchSetSpaceField:I,dispatchSetSpaceLocation:C,dispatchSetAnimatedTransform:w,dispatchSetTransformTime:O,dispatchSetTree:_,dispatchRotateXWith:y,dispatchRotateX:L,dispatchRotateYWith:A,dispatchRotateY:U,dispatchTranslateXWith:M,dispatchTranslateYWith:k,dispatchTranslateZWith:F,dispatchScaleUpWith:B,dispatchScaleDownWith:Y,dispatchSpaceSetViewSize:$,dispatchSpaceSetView:X}=e,V=r.useRef(null),z=r.useRef(),[K,Z]=r.useState(c?[c]:[new D.default]),[j,G]=r.useState(!1),W=r.useCallback((e=>{const{transformLocks:t}=g.space;Ct(v,m,K[0],e,g.space.firstPerson,t)}),[JSON.stringify(m),g.space.firstPerson,g.space.transformLocks,v]),H=r.useCallback((e=>{(e=>{(e.shiftKey||e.altKey||e.metaKey||e.ctrlKey)&&G(!0),clearTimeout(z.current),z.current=setTimeout((()=>{G(!1)}),t.PLURID_DEFAULT_PREVENT_OVERSCROLL_TIMEOUT)})(e);const{transformMode:a,transformLocks:n}=g.space,r={rotation:a===t.TRANSFORM_MODES.ROTATION,translation:a===t.TRANSFORM_MODES.TRANSLATION,scale:a===t.TRANSFORM_MODES.SCALE};((e,a,n,r)=>{(a.shiftKey||a.metaKey||a.altKey||a.ctrlKey||n.rotation||n.translation||n.scale)&&a.preventDefault();const o={deltaX:a.deltaX,deltaY:a.deltaY},i=It.getWheelDirection(o,100);if(n.rotation){if(i===t.directions.left&&r.rotationY)return e(He.space.rotateLeft());if(i===t.directions.right&&r.rotationY)return e(He.space.rotateRight());if(i===t.directions.up&&r.rotationX)return e(He.space.rotateUp());if(i===t.directions.down&&r.rotationX)return e(He.space.rotateDown())}if(a.shiftKey&&!a.altKey){if(i===t.directions.up&&r.rotationX)return e(He.space.rotateUp());if(i===t.directions.down&&r.rotationX)return e(He.space.rotateDown());if(i===t.directions.left&&r.rotationY)return e(He.space.rotateLeft());if(i===t.directions.right&&r.rotationY)return e(He.space.rotateRight())}if(n.translation){if(a.metaKey||a.ctrlKey)return i===t.directions.up?e(He.space.translateDown()):i===t.directions.down?e(He.space.translateUp()):void 0;if(a.altKey){if(i===t.directions.up&&r.translationZ)return e(He.space.translateIn());if(i===t.directions.down&&r.translationZ)return e(He.space.translateOut())}if(i===t.directions.up&&r.translationY)return e(He.space.translateDown());if(i===t.directions.down&&r.translationY)return e(He.space.translateUp());if(i===t.directions.left&&r.translationX)return e(He.space.translateRight());if(i===t.directions.right&&r.translationX)return e(He.space.translateLeft())}if(a.altKey&&a.shiftKey){if(i===t.directions.up&&r.translationZ)return e(He.space.translateIn());if(i===t.directions.down&&r.translationZ)return e(He.space.translateOut())}if(a.altKey&&!a.shiftKey){if(a.metaKey||a.ctrlKey)return i===t.directions.up?e(He.space.translateDown()):i===t.directions.down?e(He.space.translateUp()):void 0;if(i===t.directions.up&&r.translationY)return e(He.space.translateDown());if(i===t.directions.down&&r.translationY)return e(He.space.translateUp());if(i===t.directions.left&&r.translationX)return e(He.space.translateRight());if(i===t.directions.right&&r.translationX)return e(He.space.translateLeft())}if(n.scale){if(i===t.directions.down&&r.scale)return e(He.space.scaleUp());if(i===t.directions.up&&r.scale)return e(He.space.scaleDown())}if(a.metaKey||a.ctrlKey){if(i===t.directions.down&&r.scale)return e(He.space.scaleUp());if(i===t.directions.up&&r.scale)e(He.space.scaleDown())}})(v,e,r,n)}),[v,g.space.transformMode,g.space.transformLocks]),q=(e,t=g)=>{const r=oe(n),o=new a.space.tree.Tree({planes:r,configuration:t,view:e},p).compute();for(const e of E)for(const[t,a]of o.entries())e.route===a.route&&l.objects.equals(e.location,a.location)&&(a.planeID=e.planeID,e.children&&(o[t].children=e.children));_(o)},J=r.useCallback((()=>{q(T)}),[p,T,g]),Q=e=>{const n=[{topic:t.PLURID_PUBSUB_TOPIC.CONFIGURATION,callback:e=>{if(e.internal)return;const t=a.general.configuration.merge(e,g);"object"==typeof t.global.theme?("string"==typeof t.global.theme.general?b(N.default[t.global.theme.general]):b(t.global.theme.general),"string"==typeof t.global.theme.interaction?R(N.default[t.global.theme.interaction]):R(t.global.theme.interaction)):"string"==typeof t.global.theme&&(b(N.default[t.global.theme]),R(N.default[t.global.theme])),P(t)}},{topic:t.PLURID_PUBSUB_TOPIC.SPACE_TRANSFORM,callback:e=>{const{value:t,internal:a}=e;a||C(t)}},{topic:t.PLURID_PUBSUB_TOPIC.SPACE_ANIMATED_TRANSFORM,callback:e=>{const{value:t}=e;w(t.active),t.time?O(t.time):O(450)}},{topic:t.PLURID_PUBSUB_TOPIC.SPACE_ROTATE_X_WITH,callback:e=>{const{value:t}=e;y(t)}},{topic:t.PLURID_PUBSUB_TOPIC.SPACE_ROTATE_X_TO,callback:e=>{const{value:t}=e;L(t)}},{topic:t.PLURID_PUBSUB_TOPIC.SPACE_ROTATE_Y_WITH,callback:e=>{const{value:t}=e;A(t)}},{topic:t.PLURID_PUBSUB_TOPIC.SPACE_ROTATE_Y_TO,callback:e=>{const{value:t}=e;U(t)}},{topic:t.PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_X_WITH,callback:e=>{const{value:t}=e;M(t)}},{topic:t.PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_X_TO,callback:e=>{}},{topic:t.PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_Y_WITH,callback:e=>{const{value:t}=e;k(t)}},{topic:t.PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_Y_TO,callback:e=>{}},{topic:t.PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_Z_WITH,callback:e=>{const{value:t}=e;F(t)}},{topic:t.PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_Z_TO,callback:e=>{}},{topic:t.PLURID_PUBSUB_TOPIC.VIEW_ADD_PLANE,callback:e=>{const{plane:t}=e,a=[...T,t];X(a),q(a)}},{topic:t.PLURID_PUBSUB_TOPIC.VIEW_SET_PLANES,callback:e=>{const{view:t}=e;X([...t]),q(t)}},{topic:t.PLURID_PUBSUB_TOPIC.VIEW_REMOVE_PLANE,callback:e=>{const{plane:t}=e,a=T.filter((e=>"string"!=typeof e||e===t));X(a),q(a)}},{topic:t.PLURID_PUBSUB_TOPIC.NAVIGATE_TO_PLANE,callback:e=>{const{id:t}=e,n=a.space.tree.logic.getTreePlaneByID(E,t);Tt(v,n)}},{topic:t.PLURID_PUBSUB_TOPIC.ISOLATE_PLANE,callback:e=>{const{id:t}=e;"string"==typeof t&&I({field:"isolatePlane",value:t})}},{topic:t.PLURID_PUBSUB_TOPIC.OPEN_CLOSED_PLANE,callback:()=>{const e=E.find((e=>e.planeID===m.space.lastClosedPlane));if(e){const t=!0,{updatedTree:n}=a.space.tree.logic.togglePlaneFromTree(E,e.planeID,t);_(n),I({field:"lastClosedPlane",value:""})}}},{topic:t.PLURID_PUBSUB_TOPIC.CLOSE_PLANE,callback:e=>{const{id:t}=e,n=E.find((e=>e.planeID===t));if(n){const e=!1,{updatedTree:r}=a.space.tree.logic.togglePlaneFromTree(E,n.planeID,e);_(r),setTimeout((()=>{_(r)}),50),I({field:"lastClosedPlane",value:t})}}},{topic:t.PLURID_PUBSUB_TOPIC.PREVIOUS_ROOT,callback:()=>{Pt(v,m)}},{topic:t.PLURID_PUBSUB_TOPIC.NEXT_ROOT,callback:()=>{bt(v,m)}},{topic:t.PLURID_PUBSUB_TOPIC.NAVIGATE_TO_ROOT,callback:e=>{const t=e.index;if(void 0!==t)return void Rt(v,m,t);const a=e.id;((e,t,a)=>{const{tree:n}=t.space,r=n.find((e=>e.planeID===a));r&&Tt(e,r,void 0,!0)})(v,m,a)}}],r=[];for(const t of n){const a=e.subscribe(t);r.push(a)}return()=>{for(const t of r)e.unsubscribe(t)}},ee=e=>{const a={value:Object.assign({},h),internal:!0};e.publish({topic:t.PLURID_PUBSUB_TOPIC.SPACE_TRANSFORM,data:a}),e.publish({topic:t.PLURID_PUBSUB_TOPIC.CONFIGURATION,data:Object.assign(Object.assign({},g),{internal:!0})})},te=e=>{const{transformMode:a}=g.space;if(a===t.TRANSFORM_MODES.ALL)return;const{velocity:n,distance:r,direction:o}=e,{altKey:i}=e.srcEvent,l=a===t.TRANSFORM_MODES.ROTATION,s=a===t.TRANSFORM_MODES.TRANSLATION,c=a===t.TRANSFORM_MODES.SCALE;switch(ht(v),o){case 2:l&&A(60*n),s&&M(-1*r);break;case 4:l&&A(60*n),s&&M(r);break;case 8:l&&y(60*n),s&&(i?F(-1*r):k(-1*r)),c&&B(n);break;case 16:l&&y(60*n),s&&(i?F(r):k(r)),c&&Y(n)}},ae=e=>{const{transformMode:a}=g.space;if(a===t.TRANSFORM_MODES.ALL)return;const{velocity:n,distance:r,direction:o}=e,{altKey:i}=e.srcEvent,l=a===t.TRANSFORM_MODES.ROTATION,s=a===t.TRANSFORM_MODES.TRANSLATION,c=a===t.TRANSFORM_MODES.SCALE,u=20*n,d=r/5,f=n/4;switch(o){case 2:l&&A(u),s&&M(-1*d);break;case 4:l&&A(u),s&&M(d);break;case 8:l&&y(u),s&&(i?F(-1*d):k(-1*d)),c&&B(f);break;case 16:l&&y(u),s&&(i?F(d):k(d)),c&&Y(f)}},ne=(e,t)=>{const{transformMode:a}=g.space;if("TRANSLATION"!==a)return;F(20*("in"===t?1:-1))},re=e=>{ne(0,"in")},ie=e=>{ne(0,"out")};r.useEffect((()=>(V.current&&(V.current.addEventListener("keydown",W,{passive:!1}),V.current.addEventListener("wheel",H,{passive:!1})),()=>{V.current&&(V.current.removeEventListener("keydown",W),V.current.removeEventListener("wheel",H))})),[JSON.stringify(m),V.current,g.space.transformMode,g.space.firstPerson]),r.useEffect((()=>{const e=l.meta.debounce((()=>{if(V&&V.current){const e=V.current.offsetWidth,t=V.current.offsetHeight;$({width:e,height:t})}}),t.PLURID_DEFAULT_RESIZE_DEBOUNCE_TIME);return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]),r.useEffect((()=>(window.addEventListener("resize",J),()=>{window.removeEventListener("resize",J)})),[T,g]),r.useEffect((()=>{if("undefined"==typeof window)return;let e;return Ge(void 0,void 0,void 0,(function*(){const a=(yield wt()).default,{transformTouch:n}=g.space;delete a.defaults.cssProps.userSelect,delete a.defaults.cssProps.userDrag,delete a.defaults.cssProps.tapHighlightColor,delete a.defaults.cssProps.touchSelect,V.current&&(e=new a(V.current),e.get("pan").set({direction:a.DIRECTION_ALL}),e.get("swipe").set({direction:a.DIRECTION_ALL}),e.get("pinch").set({enable:!0}),n===t.TRANSFORM_TOUCHES.PAN?e.on("pan",ae):e.on("swipe",te),e.on("pinchin",re),e.on("pinchout",ie))})),()=>{if(!e)return;const{transformTouch:a}=g.space;a===t.TRANSFORM_TOUCHES.PAN?e.off("pan",ae):e.off("swipe",te),e.off("pinchin",re),e.off("pinchout",ie)}}),[V.current,g.space.transformTouch,g.space.transformMode]),r.useEffect((()=>{const e=e=>{navigator.getGamepads()[e.gamepad.index]},t=e=>{navigator.getGamepads()[e.gamepad.index]};return window.addEventListener("gamepadconnected",e),window.addEventListener("gamepaddisconnected",t),()=>{window.removeEventListener("gamepadconnected",e),window.removeEventListener("gamepaddisconnected",t)}}),[]),r.useEffect((()=>{const e=[];for(const t of K){const a=Q(t);e.push(a)}return()=>{for(const t of e)t()}}),[m.space.lastClosedPlane,K.length,JSON.stringify(E)]),r.useEffect((()=>{for(const e of K)ee(e)}),[K.length,g,h]),r.useEffect((()=>{J()}),[]);const le={planesRegistrar:n,planeContext:i,planeContextValue:s,customPlane:o,planeNotFound:u,planeRenderError:d,matchedRoute:f,hostname:p,defaultPubSub:K[0],registerPubSub:e=>{const t=[...K,e];Z(t)}};return x.default.createElement(yt,{ref:V,tabIndex:0,transformMode:g.space.transformMode,"data-plurid-entity":t.PLURID_ENTITY_VIEW},x.default.createElement(_t,{theme:S,preventOverscroll:j}),x.default.createElement(We.Provider,{value:le},0!==T.length?x.default.createElement(Cn,null):x.default.createElement(x.default.Fragment,null)))}));class On extends r.Component{constructor(e,t){super(e),this.storeID=e.id||"default",this.context=t;const a=this.computeStore();this.store=Ze(a),this.subscribeStore()}componentDidUpdate(){const e=this.computeStore();this.store.dispatch({type:"SET_STATE",payload:e})}componentWillUnmount(){this.storeUnubscriber&&this.storeUnubscriber()}render(){return x.default.createElement(o.Provider,{store:this.store,context:je},x.default.createElement(wn,Object.assign({},this.props)))}computeStore(){const{view:e,planes:t,configuration:n,precomputedState:r,planesRegistrar:o,useLocalStorage:i,hostname:l,space:s}=this.props;re(t,o,l);const c=this.store?this.store.getState():void 0,u=a.state.local.load(this.storeID,i),d=((e,t)=>{if(e){if(!t){if("undefined"==typeof window)return;return e.states[window.location.pathname]}return e.states[t]}})(this.context,s);return a.state.compute(e,n,o,c,u,r,d,l)}subscribeStore(){this.store&&"undefined"!=typeof localStorage&&this.props.useLocalStorage&&(this.storeUnubscriber=this.store.subscribe((()=>{const e=this.store.getState(),t=JSON.stringify(e);localStorage.setItem("pluridState-"+this.storeID,t)})))}}On.contextType=F;const _n=M.default.div`
492
+ scroll-snap-type: ${e=>{const{alignment:t,snapType:a}=e;return"none"===a?"none":t+" "+a}};
493
+
494
+ flex-direction: ${e=>{const{alignment:t}=e;return"x"===t?"row":"column"}};
495
+
496
+ outline: none;
497
+ overflow: auto;
498
+ /* display: flex; */
499
+ height: 100vh;
500
+ height: -webkit-fill-available;
501
+ width: 100vw;
502
+ `,yn=(e,n,r,o,i="origin")=>{if(o||"RoutePlane"===(null==e?void 0:e.kind)){const t=o||e;if(!t)return()=>()=>x.default.createElement(x.default.Fragment,null);return Ln(t,n,i)}if(!e){const e=r.match("/not-found","route");if(e&&"Route"===e.kind){return yn(e,n,r,void 0,i)}return()=>()=>x.default.createElement(x.default.Fragment,null)}const{exterior:s,view:c,planes:u,spaces:d,defaultConfiguration:f,slotted:p,resolver:m}=e.data;m&&m(void 0);const g={value:e.match.value,parameters:e.match.parameters,query:e.match.query};let h;return Zt(s)&&(h=s,h&&(h.displayName="PluridRouteExterior")),!s||!h||c||u||d?c?()=>{const t=new D.default,a=e.data.value,r=x.default.createElement(On,{view:c,planesRegistrar:n,configuration:f,pubsub:t,matchedRoute:e,hostname:i,space:a});return()=>x.default.createElement(x.default.Fragment,null,h&&x.default.createElement(h,{plurid:g,pubsub:t,spaces:p?[r]:void 0}),!p&&x.default.createElement(x.default.Fragment,null,r))}:((e,n="origin")=>{var r,o,i,s,c,u;if("Route"!==e.kind)return()=>()=>x.default.createElement(x.default.Fragment,null);const d="http",f=n,{match:p,data:m}=e,{parameters:g,query:h}=p,T={value:p.value,parameters:g,query:h},{exterior:E,planes:S,spaces:v,slotted:P}=e.data,b=(null===(r=m.multispace)||void 0===r?void 0:r.alignment)||"y",R=(null===(o=m.multispace)||void 0===o?void 0:o.snapType)||"mandatory";let I=()=>x.default.createElement(x.default.Fragment,null);Zt(E)&&(I=E);let C=()=>x.default.createElement(x.default.Fragment,null);const w=[];if(v)for(const e of v){const r=[],o=[];if(e.planes)for(const n of e.planes){const i=ce(n),{component:l}=i,s=[d,f,m.value===t.PLURID_ROUTE_DEFAULT_PATH_VALUE?t.PLURID_ROUTE_DEFAULT_PATH:a.utilities.cleanPathElement(m.value),e.value===t.PLURID_ROUTE_DEFAULT_SPACE_VALUE?t.PLURID_ROUTE_DEFAULT_SPACE:a.utilities.cleanPathElement(e.value),t.PLURID_ROUTE_DEFAULT_UNIVERSE,t.PLURID_ROUTE_DEFAULT_CLUSTER,a.utilities.cleanPathElement(i.value)].join(t.PLURID_ROUTE_SEPARATOR),c={component:l,route:s};r.push(c),o.push(s)}if(e.universes)for(const n of e.universes)if(n.planes)for(const i of n.planes){const l=ce(i),{component:s}=l,c=[d,f,m.value===t.PLURID_ROUTE_DEFAULT_PATH_VALUE?t.PLURID_ROUTE_DEFAULT_PATH:a.utilities.cleanPathElement(m.value),e.value===t.PLURID_ROUTE_DEFAULT_SPACE_VALUE?t.PLURID_ROUTE_DEFAULT_SPACE:a.utilities.cleanPathElement(e.value),n.value===t.PLURID_ROUTE_DEFAULT_UNIVERSE_VALUE?t.PLURID_ROUTE_DEFAULT_UNIVERSE:a.utilities.cleanPathElement(n.value),t.PLURID_ROUTE_DEFAULT_CLUSTER,a.utilities.cleanPathElement(l.value)].join(t.PLURID_ROUTE_SEPARATOR),u={component:s,route:c};r.push(u),o.push(c)}const i=new de([],"localhost:63000"),s=x.default.createElement(On,{key:l.uuid.generate(),id:m.value,planes:r,view:o,configuration:e.configuration,planesRegistrar:i,hostname:n});w.push(s)}if(S){const e=[],r=[];for(const n of S){const o=ce(n),{component:i}=o,l=[d,f,m.value===t.PLURID_ROUTE_DEFAULT_PATH_VALUE?t.PLURID_ROUTE_DEFAULT_PATH:a.utilities.cleanPathElement(m.value),t.PLURID_ROUTE_DEFAULT_SPACE,t.PLURID_ROUTE_DEFAULT_UNIVERSE,t.PLURID_ROUTE_DEFAULT_CLUSTER,a.utilities.cleanPathElement(o.value)].join(t.PLURID_ROUTE_SEPARATOR),s={component:i,route:l};e.push(s),m.view?m.view.includes(o.value)&&r.push(l):r.push(l)}const o=x.default.createElement(On,{key:l.uuid.generate(),id:m.value,planes:e,view:r,configuration:m.defaultConfiguration,hostname:n});w.push(o)}let O,_;return Zt(null===(i=m.multispace)||void 0===i?void 0:i.header)&&(O=null===(s=m.multispace)||void 0===s?void 0:s.header),Zt(null===(c=m.multispace)||void 0===c?void 0:c.footer)&&(_=null===(u=m.multispace)||void 0===u?void 0:u.footer),C=()=>x.default.createElement(_n,{alignment:b,snapType:R,"data-plurid-entity":t.PLURID_ENTITY_MULTISPACE},O&&x.default.createElement(O,{plurid:T}),w,_&&x.default.createElement(_,{plurid:T})),()=>()=>x.default.createElement(x.default.Fragment,null,E&&x.default.createElement(I,{spaces:P?w:void 0,plurid:T}),(v||S)&&!P&&x.default.createElement(C,null))})(e):()=>()=>x.default.createElement(x.default.Fragment,null,h&&x.default.createElement(h,{plurid:g}))},Ln=(e,t,a="origin")=>{if(e.match.query.flat){const a=e.match.query.flat.toLowerCase();if("true"===a||"1"===a){const a=t.get(e.match.value);if(a){const e=a.component;if("function"!=typeof e)return()=>()=>x.default.createElement(x.default.Fragment,null);return()=>()=>x.default.createElement(x.default.Fragment,null,x.default.createElement(e,null))}}}const{defaultConfiguration:n}=null==e?void 0:e.data;return()=>()=>x.default.createElement(x.default.Fragment,null,x.default.createElement(On,{view:[e.match.value],planesRegistrar:t,configuration:n,hostname:a}))},An=e=>{const{routes:a,planes:n,exterior:o,shell:i,hostname:s,static:c,view:d,cleanNavigation:f,notFoundPath:p}=e,m=p||"/not-found",g=((e,t)=>{const a=[];for(const t of e){if(t.planes)for(const e of t.planes){const n=ce(e),r={route:n.link?n.link:n.value.startsWith("/")?n.value:t.value+"/"+n.value,component:n.component};a.push(r)}t.spaces}if(t)for(const e of t){const t=ce(e),n={route:t.value,component:t.component};a.push(n)}return a})(a,n),h=r.useRef(new de(g,s)),T=r.useRef(new fe({routes:a,routePlanes:n},s)),E=u.useMounted(),[S,v]=r.useState((e=>e?e.path:"undefined"!=typeof window?window.location.pathname+window.location.search:"/")(c)),[P,b]=r.useState(T.current.match(S,"route")),[R,I]=r.useState(yn(P,h.current,T.current,c&&c.directPlane?T.current.match(c.directPlane,"route"):void 0,s)),C=e=>{let t;e&&e.detail&&e.detail.path&&!t&&(t=e.detail.path),f&&d&&!t&&(t=d);const a=window.location.pathname;t||(t=a+window.location.search),v(t)};let w;r.useEffect((()=>(window.addEventListener("popstate",C),window.addEventListener(t.PLURID_ROUTER_LOCATION_CHANGED,C),()=>{window.removeEventListener("popstate",C),window.removeEventListener(t.PLURID_ROUTER_LOCATION_CHANGED,C)})),[]),r.useEffect((()=>{if(!E)return;f||location.pathname!==S&&history.pushState(null,"",S);let e=T.current.match(S,"route");if(e&&"RoutePlane"===e.kind){const t=Ln(e,h.current,s);return b(e),void I(t)}e||(e=T.current.match(m,"route")),b(e),I(yn(e,h.current,T.current,void 0,s))}),[E,S]),r.useEffect((()=>{if(!P)return;if("Route"!==P.kind)return;const e=P.match.value;l.storage.saveState(e,t.PLURID_ROUTER_STORAGE);const a=new CustomEvent(t.PLURID_ROUTER_LOCATION_STORED,{detail:{path:e}});window.dispatchEvent(a)}),[f,P]),Zt(o)&&(w=o,w&&(w.displayName="PluridRouterExterior"));let O=({children:e})=>x.default.createElement(x.default.Fragment,null,e);return Zt(i)&&(O=i,O&&(O.displayName="PluridRouterShell")),x.default.createElement(x.default.Fragment,null,w&&x.default.createElement(w,{matchedRoute:P}),x.default.createElement(O,{matchedRoute:P},x.default.createElement(R,null)))},Un=e=>{const{path:t,directPlane:a,routes:n,planes:r,exterior:o,shell:i,protocol:l,hostname:s,gateway:c,gatewayQuery:u,gatewayEndpoint:d}=e,f=l||"http",p=s||"origin";return x.default.createElement(An,{routes:n,planes:r,exterior:o,shell:i,static:{path:t,directPlane:a},protocol:f,hostname:p})};class Dn extends r.Component{constructor(e){super(e),this.properties=e}render(){const{metastate:e,children:t}=this.properties;return x.default.createElement(F.Provider,{value:e},t)}}Dn.displayName="PluridProvider";const xn={x:0,y:0},Nn=e=>{const{elementID:t,rootID:a,children:n}=e,r=u.usePortal(t,a);return p.createPortal(n,r)},Mn=M.default.div`
503
+ position: absolute;
504
+ min-width: 600px;
505
+ min-height: 300px;
506
+ z-index: 99999;
507
+
508
+ top: ${({linkCoordinates:e})=>e.y+"px"};
509
+ left: ${({linkCoordinates:e})=>e.x+5+"px"};
510
+ background-color: ${({theme:e})=>e.backgroundColorSecondary};
511
+ box-shadow: ${({theme:e})=>e.boxShadowUmbra};
512
+ `,kn=o.connect((e=>({stateGeneralTheme:Ot.themes.getGeneralTheme(e),stateInteractionTheme:Ot.themes.getInteractionTheme(e)})),(e=>({})),null,{context:je})((e=>{const{planeRoute:t,linkCoordinates:a,previewComponent:n,previewOffsetX:o,previewOffsetY:i,stateGeneralTheme:l}=e,s={x:a.x+(null!=o?o:0),y:a.y+(null!=i?i:0)},c=r.useContext(We);if(!c)return x.default.createElement(x.default.Fragment,null);const{planesRegistrar:u}=c,d=ie(u);if(!d)return x.default.createElement(x.default.Fragment,null);const f=d.get(t);if(!f)return x.default.createElement(x.default.Fragment,null);const p=null!=n?n:f.component;return"function"!=typeof p?x.default.createElement(x.default.Fragment,null):x.default.createElement(Mn,{theme:l,linkCoordinates:s},x.default.createElement(p,null))})),Fn=M.default.a`
513
+ /**
514
+ * Forces element to go to the second row if inlined.
515
+ */
516
+ display: inline-block;
517
+
518
+ cursor: pointer;
519
+ color: ${({theme:e})=>e.colorTertiary};
520
+
521
+ :hover {
522
+ color: ${({theme:e})=>e.colorPrimary};
523
+ }
524
+
525
+ ::after {
526
+ content: "${({devisible:e,suffix:t})=>e?"":t||"'"}";
527
+ }
528
+ `,Bn=o.connect((e=>({stateTree:Ot.space.getTree(e),stateLastClosedPlane:Ot.space.getLastClosedPlane(e),stateGeneralTheme:Ot.themes.getGeneralTheme(e),stateConfiguration:Ot.configuration.getConfiguration(e),stateViewSize:Ot.space.getViewSize(e)})),(e=>({dispatch:e,dispatchSetTree:t=>e(He.space.setTree(t)),dispatchSetSpaceField:t=>e(He.space.setSpaceField(t)),dispatchUpdateSpaceLinkCoordinates:t=>e(He.space.updateSpaceLinkCoordinates(t))})),null,{context:je})((e=>{const n=r.useContext(We);if(!n)return x.default.createElement(x.default.Fragment,null,e.children);const{hostname:o,planesRegistrar:i,defaultPubSub:s}=n,c=ie(i);if(!c)return x.default.createElement(x.default.Fragment,null,e.children);const{children:d,route:f,devisible:p,suffix:m,atClick:g,style:h,className:T,preview:E,previewComponent:S,previewFadeIn:v,previewFadeOut:P,previewOffsetX:b,previewOffsetY:R,stateTree:I,stateLastClosedPlane:C,stateGeneralTheme:w,stateConfiguration:O,stateViewSize:_,dispatch:y,dispatchSetTree:L,dispatchSetSpaceField:A,dispatchUpdateSpaceLinkCoordinates:U}=e,D=O.elements.plane.controls.show,N=v||t.PLURID_DEFAULT_CONFIGURATION_LINK_PREVIEW_FADE_IN,M=P||t.PLURID_DEFAULT_CONFIGURATION_LINK_PREVIEW_FADE_OUT,k=me(f),F=pe(k,O.network.protocol,o||O.network.host),B=null!=m?m:t.PLURID_DEFAULT_CONFIGURATION_LINK_SUFFIX,Y=null!=p&&p,$=r.useRef(null),X=r.useRef(null),V=r.useRef(null),[z,K]=r.useState(!1),[Z,j]=r.useState(!1),[G,W]=r.useState(!1),[H,q]=r.useState(""),[J,Q]=r.useState(le($.current)),[ee,te]=r.useState(xn),ae=()=>{const e=$.current;if(!e)return Object.assign({},xn);let t=0,a=0,n=!1,r=e,o=!0,i=0,l=0;for(;o;)if("static"!==window.getComputedStyle(r).position||n||(t+=r.offsetTop,a+=r.offsetLeft,n=!0),"relative"===window.getComputedStyle(r).position&&(i+=t,l+=a,t=0,a=0,n=!1),r.scrollLeft&&(l+=-r.scrollLeft),r.scrollTop&&(i+=-r.scrollTop),r.parentElement){"PluridPlane"===r.parentElement.dataset.pluridEntity&&(o=!1),r=r.parentElement}else o=!1;const s=D?56:0;return{x:l+e.offsetWidth,y:i+s}},ne=u.useDebouncedCallback((()=>{(()=>{const e=ae();U({planeID:H,linkCoordinates:e});const t=a.space.tree.logic.updatePlaneLocation(l.objects.clone(I),J,H,l.objects.clone(e));L(t)})()}),t.PLURID_DEFAULT_RESIZE_DEBOUNCE_TIME),re=e=>{const{updatedTree:t,updatedPlane:n}=a.space.tree.logic.togglePlaneFromTree(l.objects.clone(I),H,e);return L(t),W((e=>!e)),j(!1),{updatedPlane:n}},oe=(e,t)=>{t&&(G||(A({field:"isolatePlane",value:""}),Tt(y,t,e)))},se=e=>{if(e.altKey&&G&&H){const t=a.space.tree.logic.getTreePlaneByID(I,H);Tt(y,t,e)}else G||H?(e=>{const{updatedPlane:t}=re();oe(e,t)})(e):(e=>{if(!J||!F)return;const{route:t}=F,n=ae(),{pluridPlaneID:r,updatedTree:i,updatedTreePlane:s}=a.space.tree.logic.updateTreeWithNewPlane(t,J,n,l.objects.clone(I),c.getAll(),O,o);r&&(oe(e,s),L(i),W(!0),q(r))})(e)},ce=()=>{$.current&&$.current.blur()},ue=r.useCallback((e=>{e.preventDefault(),void 0!==g&&g(e),se(e),ce()}),[J,JSON.stringify(I),$.current]);return r.useEffect((()=>{const e=le($.current);Q(e);const t=ae();te(t)}),[]),r.useEffect((()=>{G&&ne()}),[G,JSON.stringify(_),JSON.stringify(I)]),r.useEffect((()=>{if(E)return z&&V.current&&(X.current=setTimeout((()=>{j(!0)}),N),clearTimeout(V.current)),z||(V.current=setTimeout((()=>{j(!1),X.current&&clearTimeout(X.current)}),M)),()=>{V.current&&clearTimeout(V.current),X.current&&clearTimeout(X.current)}}),[E,z]),r.useEffect((()=>{}),[]),r.useEffect((()=>{const e=s.subscribe({topic:t.PLURID_PUBSUB_TOPIC.OPEN_CLOSED_PLANE,callback:()=>{C===H&&(re(),A({field:"lastClosedPlane",value:""}))}});return()=>{s.unsubscribe(e)}}),[G,H,JSON.stringify(I)]),r.useEffect((()=>{const e=s.subscribe({topic:t.PLURID_PUBSUB_TOPIC.CLOSE_PLANE,callback:e=>{const{id:t}=e;if(t===H&&G){re(!1),A({field:"lastClosedPlane",value:t})}}});return()=>{s.unsubscribe(e)}}),[G,H,JSON.stringify(I)]),r.useEffect((()=>()=>{G&&null===$.current&&(()=>{const e=a.space.tree.logic.removePlaneFromTree(l.objects.clone(I),H);L(e),W((e=>!e)),j(!1)})()}),[G,Z,H,J,JSON.stringify(I)]),x.default.createElement(Fn,{ref:$,onClick:e=>ue(e),onMouseEnter:()=>K(!0),onMouseLeave:()=>K(!1),onKeyUp:e=>(e=>{if("Enter"===e.code)return ue(e),void ce()})(e),theme:w,suffix:B,devisible:Y,style:Object.assign({},h),className:T,"data-plurid-entity":t.PLURID_ENTITY_LINK,tabIndex:0},d,Z&&!G&&x.default.createElement(Nn,{elementID:`preview-${J}`,rootID:J},x.default.createElement(kn,{planeRoute:k,linkCoordinates:ee,previewComponent:S,previewOffsetX:b,previewOffsetY:R})))})),Yn=c.css`
529
+ color: ${({theme:e})=>e.colorTertiary};
530
+
531
+ @media (hover:hover) {
532
+ :hover {
533
+ color: ${({theme:e})=>e.colorPrimary};
534
+ }
535
+ }
536
+ `,$n=M.default.a`
537
+ ${Yn}
538
+ `,Xn=M.default.div`
539
+ cursor: pointer;
540
+
541
+ ${Yn}
542
+ `,Vn=e=>{const{route:t,children:n,asAnchor:r,target:o,theme:i,style:l,className:c,atClick:u}=e,d=null==r||r,f=i||s.plurid,p=e=>{if(u){if(u(e))return}e.preventDefault(),"_blank"!==o?a.pluridRouterNavigate(t):window.open(t)},m={tabIndex:0,theme:f,style:l,className:c,onClick:p,onKeyUp:e=>{"Enter"!==e.code||p(e)}};return d?x.default.createElement($n,Object.assign({href:t},m),n):x.default.createElement(Xn,Object.assign({},m),n)},zn=M.default.div`
543
+ position: absolute;
544
+ height: 0;
545
+ width: 0;
546
+ user-select: none;
547
+ pointer-events: none;
548
+ `,Kn=o.connect((e=>({stateConfiguration:Ot.configuration.getConfiguration(e)})),(e=>({dispatchSetConfiguration:t=>e(He.configuration.setConfiguration(t))})),null,{context:je})((e=>{const n=r.useContext(We);if(!n)return x.default.createElement(x.default.Fragment,null);const{registerPubSub:o}=n,{configuration:i,pubsub:l,stateConfiguration:s,dispatchSetConfiguration:c}=e,u=r.useRef(null);return r.useEffect((()=>{const e=a.general.configuration.merge(i,s);c(e)}),[i]),r.useEffect((()=>{l&&o(l)}),[l]),x.default.createElement(zn,{ref:u,"data-plurid-entity":t.PLURID_ENTITY_APPLICATION_CONFIGURATOR})})),Zn=M.default.div`
549
+ position: absolute;
550
+ height: 0;
551
+ width: 0;
552
+ user-select: none;
553
+ pointer-events: none;
554
+ `,{getPluridPlaneIDByData:jn}=a.planes,Gn=o.connect((e=>({})),(e=>({})),null,{context:je})((e=>{const a=r.useRef(null),[n,o]=r.useState("");return r.useEffect((()=>{const e=jn(a.current);o(e)}),[]),x.default.createElement(Zn,{ref:a,"data-plurid-entity":t.PLURID_ENTITY_PLANE_CONFIGURATOR})})),Wn=M.default.div`
555
+ `,Hn=o.connect((e=>({stateGeneralTheme:Ot.themes.getGeneralTheme(e),stateInteractionTheme:Ot.themes.getInteractionTheme(e)})),(e=>({})),null,{context:je})((e=>{const{plurid:t}=e,a=t.value,n=r.useRef(!1),[o,i]=r.useState();return r.useEffect((()=>(n.current=!0,()=>{n.current=!1}))),r.useEffect((()=>{let e=!1;Ge(void 0,void 0,void 0,(function*(){if(!e){e=!0;try{const{domain:e,url:t}=(e=>{const t=e.match(/^pttp:\/\/(\w+(\.|:)\w+)\/?/);if(!t)return{domain:"",url:""};const a=t[1];return{domain:a,url:`http://${a}/pttp`}})(a),r=((e,t)=>{if(e)return t.replace(`pttp://${e}`,"")})(e,a);if(!t||!r)return;const o=yield((e,t)=>Ge(void 0,void 0,void 0,(function*(){try{const a=yield k.default(e,{method:"post",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({path:t}),credentials:"include"}),n=yield a.json();if(!n.element)return;const{element:r}=n,o=new g.ElementQLClient({url:r.url}),{status:i,Elements:l}=yield o.get(r.json,"json");if(!i)return;const s=l[r.name];return()=>s}catch(e){return}})))(t,r);if(!n.current)return;o&&i(o)}catch(e){return}}}))}),[]),x.default.createElement(Wn,null,o&&x.default.createElement(o,null))})),qn=M.default.div`
556
+ `,Jn=o.connect((e=>({stateGeneralTheme:Ot.themes.getGeneralTheme(e),stateInteractionTheme:Ot.themes.getInteractionTheme(e)})),(e=>({})),null,{context:je})((e=>{const{plurid:t}=e,a=t.value;return x.default.createElement(qn,null,x.default.createElement("iframe",{src:a}))})),Qn=e=>{const{top:t,index:a,element:n,setHeight:o}=e,i=r.useRef(null);return r.useEffect((()=>{i.current&&o(i.current.offsetHeight,a)}),[i.current]),x.default.createElement("div",{ref:i,style:{position:"absolute",top:t+"px"}},n)},{markers:{Spinner:er}}=f.universal,tr=o.connect((e=>({translationY:Ot.space.getTranslationY(e),viewSize:Ot.space.getViewSize(e)})),(e=>({})),null,{context:je})((e=>{const{items:t,generalHeight:a,translationY:n,viewSize:o}=e,i=a||100,s=r.useRef(null),c=r.useRef([]),u=r.useRef(Array(t.length).fill(i)),[d,f]=r.useState(0),[p,m]=r.useState(Math.floor(1e3/i)),[g,h]=r.useState(i*(p-d)),[T,E]=r.useState(!1),S=(e,t)=>{u.current[t]=e};return r.useEffect((()=>{if(u.current){const e=l.mathematics.arithmetic.sum(u.current,u.current.length);h(e)}}),[d,p,u.current]),r.useEffect((()=>{let e=0;for(const[t,a]of u.current.entries())e+=a,n<0?(e<Math.abs(n)&&f(t),e>Math.abs(n)+o.height&&e<Math.abs(n)+o.height+400&&m(t)):(f(0),m(10))}),[o.height,n]),r.useEffect((()=>{E(!0),setTimeout((()=>{const e=l.mathematics.arithmetic.sum(u.current,u.current.length);h(e),E(!1)}),400)}),[o]),x.default.createElement("div",{style:{height:g},ref:s},T&&x.default.createElement(x.default.Fragment,null,x.default.createElement(er,null)),!T&&x.default.createElement(x.default.Fragment,null,(()=>{c.current=[];for(let e=d;e<=p;e++){const a=t[e];c.current.push(x.default.createElement(Qn,{key:e+Math.random(),index:e,top:l.mathematics.arithmetic.sum(u.current,e),element:a,setHeight:S}))}return c.current})()))})),ar=M.default.div`
557
+ `,nr=o.connect((e=>({stateGeneralTheme:Ot.themes.getGeneralTheme(e),stateInteractionTheme:Ot.themes.getInteractionTheme(e)})),(e=>({})),null,{context:je})((e=>x.default.createElement(ar,null,"PluridPlaneDebugger"))),rr=M.default.div`
558
+ `,or=o.connect((e=>({stateGeneralTheme:Ot.themes.getGeneralTheme(e),stateInteractionTheme:Ot.themes.getInteractionTheme(e)})),(e=>({})),null,{context:je})((e=>x.default.createElement(rr,null,"PluridSpaceDebugger"))),ir=(e,n,r)=>Ge(void 0,void 0,void 0,(function*(){const n=yield((e,n,r,o)=>Ge(void 0,void 0,void 0,(function*(){const n={planes:[],spaces:[],view:[],value:""};let r;if("Route"===e.kind){let t=e.data;r=t.defaultConfiguration,e.data.resolver&&(t=yield e.data.resolver(o)),n.planes=t.planes||[],n.spaces=t.spaces||[],n.view=t.view||[],n.value=e.data.value||""}const{planes:i,spaces:l,view:s}=n,c=[];if(l)for(const e of l){const o=[],i=[];if(e.planes)for(const r of e.planes){const o=ce(r);n.value===t.PLURID_ROUTE_DEFAULT_PATH_VALUE?t.PLURID_ROUTE_DEFAULT_PATH:a.utilities.cleanPathElement(n.value),e.value===t.PLURID_ROUTE_DEFAULT_SPACE_VALUE?t.PLURID_ROUTE_DEFAULT_SPACE:a.utilities.cleanPathElement(e.value),a.utilities.cleanPathElement(o.value)}if(e.universes)for(const r of e.universes){if(r.clusters)for(const o of r.clusters)for(const i of o.planes){const l=ce(i);n.value===t.PLURID_ROUTE_DEFAULT_PATH_VALUE?t.PLURID_ROUTE_DEFAULT_PATH:a.utilities.cleanPathElement(n.value),e.value===t.PLURID_ROUTE_DEFAULT_SPACE_VALUE?t.PLURID_ROUTE_DEFAULT_SPACE:a.utilities.cleanPathElement(e.value),r.value===t.PLURID_ROUTE_DEFAULT_UNIVERSE_VALUE?t.PLURID_ROUTE_DEFAULT_UNIVERSE:a.utilities.cleanPathElement(r.value),o.value===t.PLURID_ROUTE_DEFAULT_CLUSTER_VALUE?t.PLURID_ROUTE_DEFAULT_CLUSTER:a.utilities.cleanPathElement(o.value),a.utilities.cleanPathElement(l.value)}if(r.planes)for(const o of r.planes){const i=ce(o);n.value===t.PLURID_ROUTE_DEFAULT_PATH_VALUE?t.PLURID_ROUTE_DEFAULT_PATH:a.utilities.cleanPathElement(n.value),e.value===t.PLURID_ROUTE_DEFAULT_SPACE_VALUE?t.PLURID_ROUTE_DEFAULT_SPACE:a.utilities.cleanPathElement(e.value),r.value===t.PLURID_ROUTE_DEFAULT_UNIVERSE_VALUE?t.PLURID_ROUTE_DEFAULT_UNIVERSE:a.utilities.cleanPathElement(r.value),a.utilities.cleanPathElement(i.value)}}const l={planes:o,view:i,configuration:r};c.push(l)}if(i){const e=[];for(const r of i){const o=ce(r),{value:i,component:l}=o;n.value===t.PLURID_ROUTE_DEFAULT_PATH_VALUE?t.PLURID_ROUTE_DEFAULT_PATH:a.utilities.cleanPathElement(n.value),a.utilities.cleanPathElement(o.value);const s={component:l,route:i};e.push(s)}const o={planes:e,view:s,configuration:r};c.push(o)}return c})))(e,0,0,r),o={};for(const t of n){const{planes:a,view:n,configuration:r}=t,{computedTree:i,appConfiguration:l}=gt(a,e.data.defaultConfiguration,n),s={configuration:Object.assign({},l),shortcuts:{global:!0},themes:{general:N.default.plurid,interaction:N.default.plurid},ui:{toolbarScrollPosition:50},space:{loading:!1,animatedTransform:!1,scale:1,rotationX:0,rotationY:0,translationX:0,translationY:0,translationZ:0,tree:i,activeUniverseID:"",camera:{x:0,y:0,z:0},viewSize:{width:1440,height:821},spaceSize:{width:1440,height:821,depth:0,topCorner:{x:0,y:0,z:0}},view:n,culledView:[]}};o[e.data.value]=s}return{states:o}})),{IsoMatcher:lr,RouteParser:sr}=a.routing,cr={PluridPlaneBridge:xt,PluridPlaneContent:zt,PluridPlaneControls:Xt,PluridPlaneDebugger:nr,PluridSpaceDebugger:or},ur={Application:On,RouterStatic:Un,RouterBrowser:An,Provider:Dn,Link:Bn,RouterLink:Vn,ApplicationConfigurator:Kn,PlaneConfigurator:Gn,ExternalPlane:Hn,IframePlane:Jn,VirtualList:tr,SPACE_LAYOUT:t.LAYOUT_TYPES,SIZES:t.SIZES,TRANSFORM_MODES:t.TRANSFORM_MODES,TRANSFORM_TOUCHES:t.TRANSFORM_TOUCHES,PubSub:D.default,PUBSUB_TOPIC:t.PLURID_PUBSUB_TOPIC,serverComputeMetastate:ir,IsoMatcher:lr,routerNavigate:a.pluridRouterNavigate,internals:cr};Object.defineProperty(e,"PLURID_PUBSUB_TOPIC",{enumerable:!0,get:function(){return t.PLURID_PUBSUB_TOPIC}}),Object.defineProperty(e,"PLURID_ROUTER_LOCATION_CHANGED",{enumerable:!0,get:function(){return t.PLURID_ROUTER_LOCATION_CHANGED}}),Object.defineProperty(e,"PLURID_ROUTER_LOCATION_STORED",{enumerable:!0,get:function(){return t.PLURID_ROUTER_LOCATION_STORED}}),Object.defineProperty(e,"SIZES",{enumerable:!0,get:function(){return t.SIZES}}),Object.defineProperty(e,"SPACE_LAYOUT",{enumerable:!0,get:function(){return t.LAYOUT_TYPES}}),Object.defineProperty(e,"TRANSFORM_MODES",{enumerable:!0,get:function(){return t.TRANSFORM_MODES}}),Object.defineProperty(e,"TRANSFORM_TOUCHES",{enumerable:!0,get:function(){return t.TRANSFORM_TOUCHES}}),Object.defineProperty(e,"pluridRouterNavigate",{enumerable:!0,get:function(){return a.pluridRouterNavigate}}),Object.defineProperty(e,"PluridPubSub",{enumerable:!0,get:function(){return D.default}}),e.PluridApplication=On,e.PluridApplicationConfigurator=Kn,e.PluridExternalPlane=Hn,e.PluridIframePlane=Jn,e.PluridIsoMatcher=lr,e.PluridLink=Bn,e.PluridPlaneConfigurator=Gn,e.PluridProvider=Dn,e.PluridRouteParser=sr,e.PluridRouterBrowser=An,e.PluridRouterLink=Vn,e.PluridRouterStatic=Un,e.PluridVirtualList=tr,e.default=ur,e.getDirectPlaneMatch=(e,t,a)=>{let n,r,o;for(const a of t){if(a.planes)for(const t of a.planes){const n=ce(t),i="/"===a.value?n.value:a.value+n.value;if(o=i,e===i){r=t;break}}if(r){n=a;break}}if(a)for(const t of a){if(e===ce(t).value){r=t;break}}return{matchRoute:n,matchPlane:r,matchPath:o}},e.internals=cr,e.pluridStateModules=ze,e.serverComputeMetastate=ir,e.usePluridRouter=()=>{const[e,a]=r.useState("");return r.useEffect((()=>{const e=()=>{const e=l.storage.loadState(t.PLURID_ROUTER_STORAGE);e&&a(e)};return e(),window.addEventListener(t.PLURID_ROUTER_LOCATION_STORED,e),()=>{window.removeEventListener(t.PLURID_ROUTER_LOCATION_STORED,e)}}),[]),e}}(D);var x,N=(x=D)&&x.__esModule&&Object.prototype.hasOwnProperty.call(x,"default")?x.default:x;exports.default=N;
527
559
  //# sourceMappingURL=index.min.js.map