solid-panes 5.0.0-1 → 5.1.0-0

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 (497) hide show
  1. package/README.md +67 -2
  2. package/dist/RDFXMLPane2.cjs.js.map +1 -1
  3. package/dist/RDFXMLPane2.esm.js.map +1 -1
  4. package/dist/_virtual/~icons/lucide/arrow-left.cjs.js.map +1 -1
  5. package/dist/_virtual/~icons/lucide/arrow-left.esm.js.map +1 -1
  6. package/dist/_virtual/~icons/lucide/cake.cjs.js +2 -0
  7. package/dist/_virtual/~icons/lucide/cake.cjs.js.map +1 -0
  8. package/dist/_virtual/~icons/lucide/cake.esm.js +11 -0
  9. package/dist/_virtual/~icons/lucide/cake.esm.js.map +1 -0
  10. package/dist/_virtual/~icons/lucide/camera.cjs.js +2 -0
  11. package/dist/_virtual/~icons/lucide/camera.cjs.js.map +1 -0
  12. package/dist/_virtual/~icons/lucide/camera.esm.js +11 -0
  13. package/dist/_virtual/~icons/lucide/camera.esm.js.map +1 -0
  14. package/dist/_virtual/~icons/lucide/circle-user-round.cjs.js +2 -0
  15. package/dist/_virtual/~icons/lucide/circle-user-round.cjs.js.map +1 -0
  16. package/dist/_virtual/~icons/lucide/circle-user-round.esm.js +11 -0
  17. package/dist/_virtual/~icons/lucide/circle-user-round.esm.js.map +1 -0
  18. package/dist/_virtual/~icons/lucide/ellipsis-vertical.cjs.js.map +1 -1
  19. package/dist/_virtual/~icons/lucide/ellipsis-vertical.esm.js.map +1 -1
  20. package/dist/_virtual/~icons/lucide/folder-open.cjs.js.map +1 -1
  21. package/dist/_virtual/~icons/lucide/folder-open.esm.js.map +1 -1
  22. package/dist/_virtual/~icons/lucide/folder.cjs.js.map +1 -1
  23. package/dist/_virtual/~icons/lucide/folder.esm.js.map +1 -1
  24. package/dist/_virtual/~icons/lucide/globe.cjs.js.map +1 -1
  25. package/dist/_virtual/~icons/lucide/globe.esm.js.map +1 -1
  26. package/dist/_virtual/~icons/lucide/help-circle.cjs.js.map +1 -1
  27. package/dist/_virtual/~icons/lucide/help-circle.esm.js.map +1 -1
  28. package/dist/_virtual/~icons/lucide/layout-dashboard.cjs.js.map +1 -1
  29. package/dist/_virtual/~icons/lucide/layout-dashboard.esm.js.map +1 -1
  30. package/dist/_virtual/~icons/lucide/lock-keyhole.cjs.js.map +1 -1
  31. package/dist/_virtual/~icons/lucide/lock-keyhole.esm.js.map +1 -1
  32. package/dist/_virtual/~icons/lucide/mail.cjs.js +2 -0
  33. package/dist/_virtual/~icons/lucide/mail.cjs.js.map +1 -0
  34. package/dist/_virtual/~icons/lucide/mail.esm.js +11 -0
  35. package/dist/_virtual/~icons/lucide/mail.esm.js.map +1 -0
  36. package/dist/_virtual/~icons/lucide/map-pin.cjs.js +2 -0
  37. package/dist/_virtual/~icons/lucide/map-pin.cjs.js.map +1 -0
  38. package/dist/_virtual/~icons/lucide/map-pin.esm.js +11 -0
  39. package/dist/_virtual/~icons/lucide/map-pin.esm.js.map +1 -0
  40. package/dist/_virtual/~icons/lucide/pencil.cjs.js.map +1 -1
  41. package/dist/_virtual/~icons/lucide/pencil.esm.js.map +1 -1
  42. package/dist/_virtual/~icons/lucide/phone.cjs.js +2 -0
  43. package/dist/_virtual/~icons/lucide/phone.cjs.js.map +1 -0
  44. package/dist/_virtual/~icons/lucide/phone.esm.js +11 -0
  45. package/dist/_virtual/~icons/lucide/phone.esm.js.map +1 -0
  46. package/dist/_virtual/~icons/lucide/settings-2.cjs.js.map +1 -1
  47. package/dist/_virtual/~icons/lucide/settings-2.esm.js.map +1 -1
  48. package/dist/_virtual/~icons/lucide/share-2.cjs.js.map +1 -1
  49. package/dist/_virtual/~icons/lucide/share-2.esm.js.map +1 -1
  50. package/dist/_virtual/~icons/lucide/user-round-cog.cjs.js.map +1 -1
  51. package/dist/_virtual/~icons/lucide/user-round-cog.esm.js.map +1 -1
  52. package/dist/_virtual/~icons/lucide/user-round-plus.cjs.js +2 -0
  53. package/dist/_virtual/~icons/lucide/user-round-plus.cjs.js.map +1 -0
  54. package/dist/_virtual/~icons/lucide/user-round-plus.esm.js +11 -0
  55. package/dist/_virtual/~icons/lucide/user-round-plus.esm.js.map +1 -0
  56. package/dist/_virtual/~icons/lucide/user.cjs.js.map +1 -1
  57. package/dist/_virtual/~icons/lucide/user.esm.js.map +1 -1
  58. package/dist/_virtual/~icons/lucide/users.cjs.js.map +1 -1
  59. package/dist/_virtual/~icons/lucide/users.esm.js.map +1 -1
  60. package/dist/_virtual/~icons/lucide/x.cjs.js +2 -0
  61. package/dist/_virtual/~icons/lucide/x.cjs.js.map +1 -0
  62. package/dist/_virtual/~icons/lucide/x.esm.js +11 -0
  63. package/dist/_virtual/~icons/lucide/x.esm.js.map +1 -0
  64. package/dist/audio/audioPane.cjs.js +1 -1
  65. package/dist/audio/audioPane.cjs.js.map +1 -1
  66. package/dist/audio/audioPane.esm.js +1 -5
  67. package/dist/audio/audioPane.esm.js.map +1 -1
  68. package/dist/classInstancePane.cjs.js.map +1 -1
  69. package/dist/classInstancePane.esm.js.map +1 -1
  70. package/dist/components/editor-card/EditorCard.cjs.js +1 -1
  71. package/dist/components/editor-card/EditorCard.cjs.js.map +1 -1
  72. package/dist/components/editor-card/EditorCard.esm.js +4 -7
  73. package/dist/components/editor-card/EditorCard.esm.js.map +1 -1
  74. package/dist/components/editor-card/EditorCard.styles.cjs.js.map +1 -1
  75. package/dist/components/editor-card/EditorCard.styles.esm.js.map +1 -1
  76. package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js +1 -1
  77. package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js.map +1 -1
  78. package/dist/components/file-explorer-header/FileExplorerHeader.esm.js +2 -2
  79. package/dist/components/file-explorer-header/FileExplorerHeader.esm.js.map +1 -1
  80. package/dist/components/file-explorer-header/FileExplorerHeader.styles.cjs.js.map +1 -1
  81. package/dist/components/file-explorer-header/FileExplorerHeader.styles.esm.js.map +1 -1
  82. package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js +1 -1
  83. package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js.map +1 -1
  84. package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js +3 -3
  85. package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js.map +1 -1
  86. package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.cjs.js.map +1 -1
  87. package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.esm.js.map +1 -1
  88. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js +1 -1
  89. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js.map +1 -1
  90. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js +2 -2
  91. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js.map +1 -1
  92. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.cjs.js.map +1 -1
  93. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.esm.js.map +1 -1
  94. package/dist/components/file-explorer-header/FileExplorerProvider.cjs.js +5 -5
  95. package/dist/components/file-explorer-header/FileExplorerProvider.cjs.js.map +1 -1
  96. package/dist/components/file-explorer-header/FileExplorerProvider.d.ts.map +1 -1
  97. package/dist/components/file-explorer-header/FileExplorerProvider.esm.js +97 -96
  98. package/dist/components/file-explorer-header/FileExplorerProvider.esm.js.map +1 -1
  99. package/dist/components/file-explorer-header/FileExplorerProvider.styles.cjs.js.map +1 -1
  100. package/dist/components/file-explorer-header/FileExplorerProvider.styles.esm.js.map +1 -1
  101. package/dist/components/header/Header.cjs.js +1 -1
  102. package/dist/components/header/Header.cjs.js.map +1 -1
  103. package/dist/components/header/Header.esm.js +2 -2
  104. package/dist/components/header/Header.esm.js.map +1 -1
  105. package/dist/components/header/Header.styles.cjs.js +1 -1
  106. package/dist/components/header/Header.styles.cjs.js.map +1 -1
  107. package/dist/components/header/Header.styles.esm.js +1 -1
  108. package/dist/components/header/Header.styles.esm.js.map +1 -1
  109. package/dist/components/navbar/Navbar.cjs.js +1 -1
  110. package/dist/components/navbar/Navbar.cjs.js.map +1 -1
  111. package/dist/components/navbar/Navbar.d.ts +2 -0
  112. package/dist/components/navbar/Navbar.d.ts.map +1 -1
  113. package/dist/components/navbar/Navbar.esm.js +2 -2
  114. package/dist/components/navbar/Navbar.esm.js.map +1 -1
  115. package/dist/components/navbar/Navbar.styles.cjs.js +1 -1
  116. package/dist/components/navbar/Navbar.styles.cjs.js.map +1 -1
  117. package/dist/components/navbar/Navbar.styles.esm.js +1 -1
  118. package/dist/components/navbar/Navbar.styles.esm.js.map +1 -1
  119. package/dist/components/profile-heading/ProfileHeading.cjs.js +95 -0
  120. package/dist/components/profile-heading/ProfileHeading.cjs.js.map +1 -0
  121. package/dist/components/profile-heading/ProfileHeading.d.ts +45 -0
  122. package/dist/components/profile-heading/ProfileHeading.d.ts.map +1 -0
  123. package/dist/components/profile-heading/ProfileHeading.esm.js +480 -0
  124. package/dist/components/profile-heading/ProfileHeading.esm.js.map +1 -0
  125. package/dist/components/profile-heading/ProfileHeading.styles.cjs.js +2 -0
  126. package/dist/components/profile-heading/ProfileHeading.styles.cjs.js.map +1 -0
  127. package/dist/components/profile-heading/ProfileHeading.styles.esm.js +7 -0
  128. package/dist/components/profile-heading/ProfileHeading.styles.esm.js.map +1 -0
  129. package/dist/components/profile-heading/editor/index.d.ts +3 -0
  130. package/dist/components/profile-heading/editor/index.d.ts.map +1 -0
  131. package/dist/components/profile-heading/editor/sections/contactInfo/types.d.ts +44 -0
  132. package/dist/components/profile-heading/editor/sections/contactInfo/types.d.ts.map +1 -0
  133. package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.cjs.js +297 -0
  134. package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.cjs.js.map +1 -0
  135. package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.d.ts +5 -0
  136. package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.d.ts.map +1 -0
  137. package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.esm.js +642 -0
  138. package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.esm.js.map +1 -0
  139. package/dist/components/profile-heading/editor/sections/heading/dateHelpers.cjs.js +2 -0
  140. package/dist/components/profile-heading/editor/sections/heading/dateHelpers.cjs.js.map +1 -0
  141. package/dist/components/profile-heading/editor/sections/heading/dateHelpers.d.ts +4 -0
  142. package/dist/components/profile-heading/editor/sections/heading/dateHelpers.d.ts.map +1 -0
  143. package/dist/components/profile-heading/editor/sections/heading/dateHelpers.esm.js +16 -0
  144. package/dist/components/profile-heading/editor/sections/heading/dateHelpers.esm.js.map +1 -0
  145. package/dist/components/profile-heading/editor/sections/heading/imageHelpers.cjs.js +2 -0
  146. package/dist/components/profile-heading/editor/sections/heading/imageHelpers.cjs.js.map +1 -0
  147. package/dist/components/profile-heading/editor/sections/heading/imageHelpers.d.ts +5 -0
  148. package/dist/components/profile-heading/editor/sections/heading/imageHelpers.d.ts.map +1 -0
  149. package/dist/components/profile-heading/editor/sections/heading/imageHelpers.esm.js +76 -0
  150. package/dist/components/profile-heading/editor/sections/heading/imageHelpers.esm.js.map +1 -0
  151. package/dist/components/profile-heading/editor/sections/heading/imagePreview.cjs.js +19 -0
  152. package/dist/components/profile-heading/editor/sections/heading/imagePreview.cjs.js.map +1 -0
  153. package/dist/components/profile-heading/editor/sections/heading/imagePreview.d.ts +2 -0
  154. package/dist/components/profile-heading/editor/sections/heading/imagePreview.d.ts.map +1 -0
  155. package/dist/components/profile-heading/editor/sections/heading/imagePreview.esm.js +28 -0
  156. package/dist/components/profile-heading/editor/sections/heading/imagePreview.esm.js.map +1 -0
  157. package/dist/components/profile-heading/editor/sections/heading/mutations.cjs.js +2 -0
  158. package/dist/components/profile-heading/editor/sections/heading/mutations.cjs.js.map +1 -0
  159. package/dist/components/profile-heading/editor/sections/heading/mutations.d.ts +4 -0
  160. package/dist/components/profile-heading/editor/sections/heading/mutations.d.ts.map +1 -0
  161. package/dist/components/profile-heading/editor/sections/heading/mutations.esm.js +151 -0
  162. package/dist/components/profile-heading/editor/sections/heading/mutations.esm.js.map +1 -0
  163. package/dist/components/profile-heading/editor/sections/heading/types.d.ts +34 -0
  164. package/dist/components/profile-heading/editor/sections/heading/types.d.ts.map +1 -0
  165. package/dist/components/profile-heading/editor/sections/shared/contactTypeUtils.cjs.js +2 -0
  166. package/dist/components/profile-heading/editor/sections/shared/contactTypeUtils.cjs.js.map +1 -0
  167. package/dist/components/profile-heading/editor/sections/shared/contactTypeUtils.d.ts +7 -0
  168. package/dist/components/profile-heading/editor/sections/shared/contactTypeUtils.d.ts.map +1 -0
  169. package/dist/components/profile-heading/editor/sections/shared/contactTypeUtils.esm.js +20 -0
  170. package/dist/components/profile-heading/editor/sections/shared/contactTypeUtils.esm.js.map +1 -0
  171. package/dist/components/profile-heading/editor/sections/shared/idNodeFactory.cjs.js +2 -0
  172. package/dist/components/profile-heading/editor/sections/shared/idNodeFactory.cjs.js.map +1 -0
  173. package/dist/components/profile-heading/editor/sections/shared/idNodeFactory.d.ts +3 -0
  174. package/dist/components/profile-heading/editor/sections/shared/idNodeFactory.d.ts.map +1 -0
  175. package/dist/components/profile-heading/editor/sections/shared/idNodeFactory.esm.js +11 -0
  176. package/dist/components/profile-heading/editor/sections/shared/idNodeFactory.esm.js.map +1 -0
  177. package/dist/components/profile-heading/editor/sections/shared/phoneCountries.cjs.js +2 -0
  178. package/dist/components/profile-heading/editor/sections/shared/phoneCountries.cjs.js.map +1 -0
  179. package/dist/components/profile-heading/editor/sections/shared/phoneCountries.d.ts +20 -0
  180. package/dist/components/profile-heading/editor/sections/shared/phoneCountries.d.ts.map +1 -0
  181. package/dist/components/profile-heading/editor/sections/shared/phoneCountries.esm.js +1291 -0
  182. package/dist/components/profile-heading/editor/sections/shared/phoneCountries.esm.js.map +1 -0
  183. package/dist/components/profile-heading/editor/sections/shared/rdfMutationHelpers.cjs.js +2 -0
  184. package/dist/components/profile-heading/editor/sections/shared/rdfMutationHelpers.cjs.js.map +1 -0
  185. package/dist/components/profile-heading/editor/sections/shared/rdfMutationHelpers.d.ts +45 -0
  186. package/dist/components/profile-heading/editor/sections/shared/rdfMutationHelpers.d.ts.map +1 -0
  187. package/dist/components/profile-heading/editor/sections/shared/rdfMutationHelpers.esm.js +211 -0
  188. package/dist/components/profile-heading/editor/sections/shared/rdfMutationHelpers.esm.js.map +1 -0
  189. package/dist/components/profile-heading/editor/sections/shared/rowState.cjs.js +2 -0
  190. package/dist/components/profile-heading/editor/sections/shared/rowState.cjs.js.map +1 -0
  191. package/dist/components/profile-heading/editor/sections/shared/rowState.d.ts +21 -0
  192. package/dist/components/profile-heading/editor/sections/shared/rowState.d.ts.map +1 -0
  193. package/dist/components/profile-heading/editor/sections/shared/rowState.esm.js +18 -0
  194. package/dist/components/profile-heading/editor/sections/shared/rowState.esm.js.map +1 -0
  195. package/dist/components/profile-heading/editor/sections/shared/sanitizeUtils.cjs.js +2 -0
  196. package/dist/components/profile-heading/editor/sections/shared/sanitizeUtils.cjs.js.map +1 -0
  197. package/dist/components/profile-heading/editor/sections/shared/sanitizeUtils.d.ts +5 -0
  198. package/dist/components/profile-heading/editor/sections/shared/sanitizeUtils.d.ts.map +1 -0
  199. package/dist/components/profile-heading/editor/sections/shared/sanitizeUtils.esm.js +18 -0
  200. package/dist/components/profile-heading/editor/sections/shared/sanitizeUtils.esm.js.map +1 -0
  201. package/dist/components/profile-heading/editor/sections/shared/types.d.ts +31 -0
  202. package/dist/components/profile-heading/editor/sections/shared/types.d.ts.map +1 -0
  203. package/dist/components/profile-heading/editor/textUtils.cjs.js +2 -0
  204. package/dist/components/profile-heading/editor/textUtils.cjs.js.map +1 -0
  205. package/dist/components/profile-heading/editor/textUtils.d.ts +6 -0
  206. package/dist/components/profile-heading/editor/textUtils.d.ts.map +1 -0
  207. package/dist/components/profile-heading/editor/textUtils.esm.js +26 -0
  208. package/dist/components/profile-heading/editor/textUtils.esm.js.map +1 -0
  209. package/dist/components/profile-heading/editor/texts/buttonTexts.d.ts +9 -0
  210. package/dist/components/profile-heading/editor/texts/buttonTexts.d.ts.map +1 -0
  211. package/dist/components/profile-heading/editor/texts/dialogTexts.cjs.js +2 -0
  212. package/dist/components/profile-heading/editor/texts/dialogTexts.cjs.js.map +1 -0
  213. package/dist/components/profile-heading/editor/texts/dialogTexts.d.ts +14 -0
  214. package/dist/components/profile-heading/editor/texts/dialogTexts.d.ts.map +1 -0
  215. package/dist/components/profile-heading/editor/texts/dialogTexts.esm.js +6 -0
  216. package/dist/components/profile-heading/editor/texts/dialogTexts.esm.js.map +1 -0
  217. package/dist/components/profile-heading/editor/texts/messageTexts.cjs.js +2 -0
  218. package/dist/components/profile-heading/editor/texts/messageTexts.cjs.js.map +1 -0
  219. package/dist/components/profile-heading/editor/texts/messageTexts.d.ts +42 -0
  220. package/dist/components/profile-heading/editor/texts/messageTexts.d.ts.map +1 -0
  221. package/dist/components/profile-heading/editor/texts/messageTexts.esm.js +6 -0
  222. package/dist/components/profile-heading/editor/texts/messageTexts.esm.js.map +1 -0
  223. package/dist/components/profile-heading/editor/texts/profileTexts.d.ts +14 -0
  224. package/dist/components/profile-heading/editor/texts/profileTexts.d.ts.map +1 -0
  225. package/dist/components/profile-heading/editor/texts/qrCodeTexts.d.ts +2 -0
  226. package/dist/components/profile-heading/editor/texts/qrCodeTexts.d.ts.map +1 -0
  227. package/dist/components/profile-heading/editor/texts.d.ts +6 -0
  228. package/dist/components/profile-heading/editor/texts.d.ts.map +1 -0
  229. package/dist/components/profile-heading/editor/ui/dialog.d.ts +41 -0
  230. package/dist/components/profile-heading/editor/ui/dialog.d.ts.map +1 -0
  231. package/dist/components/profile-heading/editor/ui/dialog2.cjs.js +17 -0
  232. package/dist/components/profile-heading/editor/ui/dialog2.cjs.js.map +1 -0
  233. package/dist/components/profile-heading/editor/ui/dialog2.esm.js +263 -0
  234. package/dist/components/profile-heading/editor/ui/dialog2.esm.js.map +1 -0
  235. package/dist/components/profile-heading/editor/ui/spinner.cjs.js +5 -0
  236. package/dist/components/profile-heading/editor/ui/spinner.cjs.js.map +1 -0
  237. package/dist/components/profile-heading/editor/ui/spinner.d.ts +3 -0
  238. package/dist/components/profile-heading/editor/ui/spinner.d.ts.map +1 -0
  239. package/dist/components/profile-heading/editor/ui/spinner.esm.js +12 -0
  240. package/dist/components/profile-heading/editor/ui/spinner.esm.js.map +1 -0
  241. package/dist/components/profile-heading/editor/utils/errorDisplay.cjs.js +2 -0
  242. package/dist/components/profile-heading/editor/utils/errorDisplay.cjs.js.map +1 -0
  243. package/dist/components/profile-heading/editor/utils/errorDisplay.d.ts +2 -0
  244. package/dist/components/profile-heading/editor/utils/errorDisplay.d.ts.map +1 -0
  245. package/dist/components/profile-heading/editor/utils/errorDisplay.esm.js +18 -0
  246. package/dist/components/profile-heading/editor/utils/errorDisplay.esm.js.map +1 -0
  247. package/dist/components/profile-heading/friendActions.cjs.js +2 -0
  248. package/dist/components/profile-heading/friendActions.cjs.js.map +1 -0
  249. package/dist/components/profile-heading/friendActions.d.ts +11 -0
  250. package/dist/components/profile-heading/friendActions.d.ts.map +1 -0
  251. package/dist/components/profile-heading/friendActions.esm.js +32 -0
  252. package/dist/components/profile-heading/friendActions.esm.js.map +1 -0
  253. package/dist/components/profile-heading/index.cjs.js +1 -0
  254. package/dist/components/profile-heading/index.d.ts +5 -0
  255. package/dist/components/profile-heading/index.d.ts.map +1 -0
  256. package/dist/components/profile-heading/index.esm.js +1 -0
  257. package/dist/components/profile-heading/profileHeadingData.cjs.js +2 -0
  258. package/dist/components/profile-heading/profileHeadingData.cjs.js.map +1 -0
  259. package/dist/components/profile-heading/profileHeadingData.d.ts +6 -0
  260. package/dist/components/profile-heading/profileHeadingData.d.ts.map +1 -0
  261. package/dist/components/profile-heading/profileHeadingData.esm.js +81 -0
  262. package/dist/components/profile-heading/profileHeadingData.esm.js.map +1 -0
  263. package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js +1 -1
  264. package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js.map +1 -1
  265. package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js +2 -2
  266. package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js.map +1 -1
  267. package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.cjs.js.map +1 -1
  268. package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.esm.js.map +1 -1
  269. package/dist/dashboard/basicPreferences.cjs.js.map +1 -1
  270. package/dist/dashboard/basicPreferences.esm.js.map +1 -1
  271. package/dist/dashboard/dashboardPane.cjs.js.map +1 -1
  272. package/dist/dashboard/dashboardPane.esm.js.map +1 -1
  273. package/dist/dashboard/homepage.cjs.js.map +1 -1
  274. package/dist/dashboard/homepage.esm.js.map +1 -1
  275. package/dist/dashboard/ontologyData.cjs.js.map +1 -1
  276. package/dist/dashboard/ontologyData.esm.js.map +1 -1
  277. package/dist/dashboard/preferencesFormText.cjs.js.map +1 -1
  278. package/dist/dashboard/preferencesFormText.esm.js.map +1 -1
  279. package/dist/dataContentPane2.cjs.js.map +1 -1
  280. package/dist/dataContentPane2.esm.js.map +1 -1
  281. package/dist/defaultPane2.cjs.js.map +1 -1
  282. package/dist/defaultPane2.esm.js.map +1 -1
  283. package/dist/dokieli/dokieliPane.cjs.js.map +1 -1
  284. package/dist/dokieli/dokieliPane.esm.js.map +1 -1
  285. package/dist/dokieli/new.cjs.js.map +1 -1
  286. package/dist/dokieli/new.esm.js.map +1 -1
  287. package/dist/form/pane.cjs.js.map +1 -1
  288. package/dist/form/pane.esm.js.map +1 -1
  289. package/dist/home/homePane.cjs.js.map +1 -1
  290. package/dist/home/homePane.esm.js.map +1 -1
  291. package/dist/humanReadablePane2.cjs.js.map +1 -1
  292. package/dist/humanReadablePane2.esm.js.map +1 -1
  293. package/dist/icons/folder.cjs.js.map +1 -1
  294. package/dist/icons/folder.esm.js.map +1 -1
  295. package/dist/icons/friends.cjs.js.map +1 -1
  296. package/dist/icons/friends.esm.js.map +1 -1
  297. package/dist/icons/person.cjs.js.map +1 -1
  298. package/dist/icons/person.esm.js.map +1 -1
  299. package/dist/imagePane2.cjs.js.map +1 -1
  300. package/dist/imagePane2.esm.js.map +1 -1
  301. package/dist/index.cjs.js +1 -1
  302. package/dist/index.cjs.js.map +1 -1
  303. package/dist/index.d.ts +2 -1
  304. package/dist/index.d.ts.map +1 -1
  305. package/dist/index.esm.js +15 -14
  306. package/dist/index.esm.js.map +1 -1
  307. package/dist/internal/internalPane2.cjs.js +1 -1
  308. package/dist/internal/internalPane2.cjs.js.map +1 -1
  309. package/dist/internal/internalPane2.esm.js +2 -5
  310. package/dist/internal/internalPane2.esm.js.map +1 -1
  311. package/dist/mainPage/header.cjs.js +1 -1
  312. package/dist/mainPage/header.cjs.js.map +1 -1
  313. package/dist/mainPage/header.d.ts +2 -2
  314. package/dist/mainPage/header.d.ts.map +1 -1
  315. package/dist/mainPage/header.esm.js +48 -44
  316. package/dist/mainPage/header.esm.js.map +1 -1
  317. package/dist/mainPage/index.cjs.js +1 -1
  318. package/dist/mainPage/index.cjs.js.map +1 -1
  319. package/dist/mainPage/index.d.ts.map +1 -1
  320. package/dist/mainPage/index.esm.js +27 -21
  321. package/dist/mainPage/index.esm.js.map +1 -1
  322. package/dist/mainPage/navbar.cjs.js +1 -1
  323. package/dist/mainPage/navbar.cjs.js.map +1 -1
  324. package/dist/mainPage/navbar.d.ts +3 -2
  325. package/dist/mainPage/navbar.d.ts.map +1 -1
  326. package/dist/mainPage/navbar.esm.js +77 -42
  327. package/dist/mainPage/navbar.esm.js.map +1 -1
  328. package/dist/mainPage/navigation.cjs.js +2 -0
  329. package/dist/mainPage/navigation.cjs.js.map +1 -0
  330. package/dist/mainPage/navigation.d.ts +6 -0
  331. package/dist/mainPage/navigation.d.ts.map +1 -0
  332. package/dist/mainPage/navigation.esm.js +22 -0
  333. package/dist/mainPage/navigation.esm.js.map +1 -0
  334. package/dist/mainPage/profileHeading.d.ts +5 -0
  335. package/dist/mainPage/profileHeading.d.ts.map +1 -0
  336. package/dist/mainPage/profileHeading2.cjs.js +2 -0
  337. package/dist/mainPage/profileHeading2.cjs.js.map +1 -0
  338. package/dist/mainPage/profileHeading2.esm.js +158 -0
  339. package/dist/mainPage/profileHeading2.esm.js.map +1 -0
  340. package/dist/n3Pane2.cjs.js.map +1 -1
  341. package/dist/n3Pane2.esm.js.map +1 -1
  342. package/dist/navigation/browserEvents.cjs.js +2 -0
  343. package/dist/navigation/browserEvents.cjs.js.map +1 -0
  344. package/dist/navigation/browserEvents.d.ts +15 -0
  345. package/dist/navigation/browserEvents.d.ts.map +1 -0
  346. package/dist/navigation/browserEvents.esm.js +32 -0
  347. package/dist/navigation/browserEvents.esm.js.map +1 -0
  348. package/dist/navigation/chrome.cjs.js +2 -0
  349. package/dist/navigation/chrome.cjs.js.map +1 -0
  350. package/dist/navigation/chrome.d.ts +69 -0
  351. package/dist/navigation/chrome.d.ts.map +1 -0
  352. package/dist/navigation/chrome.esm.js +43 -0
  353. package/dist/navigation/chrome.esm.js.map +1 -0
  354. package/dist/navigation/controller.cjs.js +2 -0
  355. package/dist/navigation/controller.cjs.js.map +1 -0
  356. package/dist/navigation/controller.d.ts +51 -0
  357. package/dist/navigation/controller.d.ts.map +1 -0
  358. package/dist/navigation/controller.esm.js +45 -0
  359. package/dist/navigation/controller.esm.js.map +1 -0
  360. package/dist/navigation/events.cjs.js +2 -0
  361. package/dist/navigation/events.cjs.js.map +1 -0
  362. package/dist/navigation/events.d.ts +17 -0
  363. package/dist/navigation/events.d.ts.map +1 -0
  364. package/dist/navigation/events.esm.js +18 -0
  365. package/dist/navigation/events.esm.js.map +1 -0
  366. package/dist/navigation/navbarVisibility.cjs.js +2 -0
  367. package/dist/navigation/navbarVisibility.cjs.js.map +1 -0
  368. package/dist/navigation/navbarVisibility.d.ts +5 -0
  369. package/dist/navigation/navbarVisibility.d.ts.map +1 -0
  370. package/dist/navigation/navbarVisibility.esm.js +26 -0
  371. package/dist/navigation/navbarVisibility.esm.js.map +1 -0
  372. package/dist/navigation/options.cjs.js +2 -0
  373. package/dist/navigation/options.cjs.js.map +1 -0
  374. package/dist/navigation/options.d.ts +16 -0
  375. package/dist/navigation/options.d.ts.map +1 -0
  376. package/dist/navigation/options.esm.js +8 -0
  377. package/dist/navigation/options.esm.js.map +1 -0
  378. package/dist/navigation/podContext.cjs.js +2 -0
  379. package/dist/navigation/podContext.cjs.js.map +1 -0
  380. package/dist/navigation/podContext.d.ts +21 -0
  381. package/dist/navigation/podContext.d.ts.map +1 -0
  382. package/dist/navigation/podContext.esm.js +62 -0
  383. package/dist/navigation/podContext.esm.js.map +1 -0
  384. package/dist/navigation/state.cjs.js +2 -0
  385. package/dist/navigation/state.cjs.js.map +1 -0
  386. package/dist/navigation/state.d.ts +40 -0
  387. package/dist/navigation/state.d.ts.map +1 -0
  388. package/dist/navigation/state.esm.js +41 -0
  389. package/dist/navigation/state.esm.js.map +1 -0
  390. package/dist/outline/context.cjs.js.map +1 -1
  391. package/dist/outline/context.esm.js.map +1 -1
  392. package/dist/outline/manager2.cjs.js +1 -1
  393. package/dist/outline/manager2.cjs.js.map +1 -1
  394. package/dist/outline/manager2.esm.js +388 -354
  395. package/dist/outline/manager2.esm.js.map +1 -1
  396. package/dist/outline/outlineIcons.cjs.js.map +1 -1
  397. package/dist/outline/outlineIcons.esm.js.map +1 -1
  398. package/dist/outline/propertyViews.cjs.js.map +1 -1
  399. package/dist/outline/propertyViews.esm.js.map +1 -1
  400. package/dist/outline/queryByExample.cjs.js.map +1 -1
  401. package/dist/outline/queryByExample.esm.js.map +1 -1
  402. package/dist/outline/userInput.cjs.js +1 -1
  403. package/dist/outline/userInput.cjs.js.map +1 -1
  404. package/dist/outline/userInput.esm.js +12 -13
  405. package/dist/outline/userInput.esm.js.map +1 -1
  406. package/dist/outline/viewAsImage.cjs.js.map +1 -1
  407. package/dist/outline/viewAsImage.esm.js.map +1 -1
  408. package/dist/outline/viewAsMbox.cjs.js.map +1 -1
  409. package/dist/outline/viewAsMbox.esm.js.map +1 -1
  410. package/dist/pad/padPane2.cjs.js +1 -1
  411. package/dist/pad/padPane2.cjs.js.map +1 -1
  412. package/dist/pad/padPane2.esm.js +2 -6
  413. package/dist/pad/padPane2.esm.js.map +1 -1
  414. package/dist/playlist/playlistPane.cjs.js.map +1 -1
  415. package/dist/playlist/playlistPane.esm.js.map +1 -1
  416. package/dist/registerPanes.cjs.js.map +1 -1
  417. package/dist/registerPanes.esm.js.map +1 -1
  418. package/dist/schedule/formsForSchedule.cjs.js.map +1 -1
  419. package/dist/schedule/formsForSchedule.esm.js.map +1 -1
  420. package/dist/schedule/schedulePane2.cjs.js +1 -1
  421. package/dist/schedule/schedulePane2.cjs.js.map +1 -1
  422. package/dist/schedule/schedulePane2.esm.js +1 -5
  423. package/dist/schedule/schedulePane2.esm.js.map +1 -1
  424. package/dist/sharing/sharingPane.cjs.js.map +1 -1
  425. package/dist/sharing/sharingPane.esm.js.map +1 -1
  426. package/dist/slideshow/slideshowPane.cjs.js.map +1 -1
  427. package/dist/slideshow/slideshowPane.esm.js.map +1 -1
  428. package/dist/social/editProfileDetails.cjs.js +1 -1
  429. package/dist/social/editProfileDetails.cjs.js.map +1 -1
  430. package/dist/social/editProfileDetails.esm.js +0 -2
  431. package/dist/social/editProfileDetails.esm.js.map +1 -1
  432. package/dist/social/icons.cjs.js +4 -4
  433. package/dist/social/icons.cjs.js.map +1 -1
  434. package/dist/social/icons.esm.js +5 -5
  435. package/dist/social/icons.esm.js.map +1 -1
  436. package/dist/social/socialPane.d.ts +0 -1
  437. package/dist/social/socialPane.d.ts.map +1 -1
  438. package/dist/social/socialPane2.cjs.js +3 -3
  439. package/dist/social/socialPane2.cjs.js.map +1 -1
  440. package/dist/social/socialPane2.esm.js +97 -154
  441. package/dist/social/socialPane2.esm.js.map +1 -1
  442. package/dist/social/socialSections.cjs.js +1 -1
  443. package/dist/social/socialSections.cjs.js.map +1 -1
  444. package/dist/social/socialSections.d.ts +2 -1
  445. package/dist/social/socialSections.d.ts.map +1 -1
  446. package/dist/social/socialSections.esm.js +54 -129
  447. package/dist/social/socialSections.esm.js.map +1 -1
  448. package/dist/social/triage.cjs.js.map +1 -1
  449. package/dist/social/triage.esm.js.map +1 -1
  450. package/dist/tabbed/tabbedPane.cjs.js.map +1 -1
  451. package/dist/tabbed/tabbedPane.esm.js.map +1 -1
  452. package/dist/tableViewPane.cjs.js.map +1 -1
  453. package/dist/tableViewPane.esm.js.map +1 -1
  454. package/dist/transaction/pane.cjs.js.map +1 -1
  455. package/dist/transaction/pane.esm.js +1 -1
  456. package/dist/transaction/pane.esm.js.map +1 -1
  457. package/dist/transaction/period.cjs.js.map +1 -1
  458. package/dist/transaction/period.esm.js.map +1 -1
  459. package/dist/trip/tripPane.cjs.js.map +1 -1
  460. package/dist/trip/tripPane.esm.js.map +1 -1
  461. package/dist/trustedApplications/trustedApplications.dom.cjs.js.map +1 -1
  462. package/dist/trustedApplications/trustedApplications.dom.esm.js.map +1 -1
  463. package/dist/trustedApplications/trustedApplications.utils.cjs.js.map +1 -1
  464. package/dist/trustedApplications/trustedApplications.utils.esm.js.map +1 -1
  465. package/dist/trustedApplications/trustedApplications.view.cjs.js.map +1 -1
  466. package/dist/trustedApplications/trustedApplications.view.esm.js.map +1 -1
  467. package/dist/types.d.ts +3 -0
  468. package/dist/types.d.ts.map +1 -0
  469. package/dist/ui/pane.cjs.js +1 -1
  470. package/dist/ui/pane.cjs.js.map +1 -1
  471. package/dist/ui/pane.esm.js +2 -5
  472. package/dist/ui/pane.esm.js.map +1 -1
  473. package/dist/utils/paneUtils.cjs.js +1 -1
  474. package/dist/utils/paneUtils.cjs.js.map +1 -1
  475. package/dist/utils/paneUtils.esm.js +4 -4
  476. package/dist/utils/paneUtils.esm.js.map +1 -1
  477. package/dist/utils/podUtils.cjs.js.map +1 -1
  478. package/dist/utils/podUtils.esm.js.map +1 -1
  479. package/dist/utils/viewerUtils.cjs.js +2 -0
  480. package/dist/utils/viewerUtils.cjs.js.map +1 -0
  481. package/dist/utils/viewerUtils.d.ts +5 -0
  482. package/dist/utils/viewerUtils.d.ts.map +1 -0
  483. package/dist/utils/viewerUtils.esm.js +13 -0
  484. package/dist/utils/viewerUtils.esm.js.map +1 -0
  485. package/dist/utils/webIdUtils.cjs.js +1 -1
  486. package/dist/utils/webIdUtils.cjs.js.map +1 -1
  487. package/dist/utils/webIdUtils.d.ts +1 -0
  488. package/dist/utils/webIdUtils.d.ts.map +1 -1
  489. package/dist/utils/webIdUtils.esm.js +23 -19
  490. package/dist/utils/webIdUtils.esm.js.map +1 -1
  491. package/dist/versionInfo.cjs.js +1 -1
  492. package/dist/versionInfo.cjs.js.map +1 -1
  493. package/dist/versionInfo.esm.js +11 -11
  494. package/dist/versionInfo.esm.js.map +1 -1
  495. package/dist/video/videoPane.cjs.js.map +1 -1
  496. package/dist/video/videoPane.esm.js.map +1 -1
  497. package/package.json +15 -14
@@ -0,0 +1,62 @@
1
+ import { isWebIdUri as e, loadProfileFromURI as t } from "../utils/webIdUtils.esm.js";
2
+ import { getPodStorages as n } from "../utils/podUtils.esm.js";
3
+ import { getFolderPanesFromURI as r } from "../utils/paneUtils.esm.js";
4
+ import { authn as i } from "solid-logic";
5
+ import { sym as a } from "rdflib";
6
+ //#region src/navigation/podContext.ts
7
+ var o = 500, s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map();
8
+ function u(e) {
9
+ try {
10
+ let t = new URL(e), [n = ""] = t.pathname.split("/").filter(Boolean);
11
+ return `${t.origin}|${n}`;
12
+ } catch {
13
+ return e;
14
+ }
15
+ }
16
+ function d(e) {
17
+ return a(e).doc().uri;
18
+ }
19
+ function f(e, t, n, r, i) {
20
+ let a = e.get(t);
21
+ if (a) return a;
22
+ let s = r().catch((r) => (console.warn(`Could not load the ${n} for ${t}`, r), e.get(t) === s && e.delete(t), i));
23
+ return e.set(t, s), e.size > o && e.delete(e.keys().next().value), s;
24
+ }
25
+ function p(n) {
26
+ return f(s, d(n), "owner of the pod", async () => {
27
+ let r = a(n), i = await t(r);
28
+ return i.uri === r.uri && !e(r) ? void 0 : i.value;
29
+ }, void 0);
30
+ }
31
+ function m(e) {
32
+ return f(c, u(e), "storages of the pod", () => r(a(e)), []);
33
+ }
34
+ function h(e) {
35
+ return e ? f(l, e, "storages of the viewer", async () => (await n(a(e))).map((e) => e.uri), []) : Promise.resolve([]);
36
+ }
37
+ async function g(e = window.location.href) {
38
+ let t = i.currentUser()?.value, [n, r, a] = await Promise.all([
39
+ p(e),
40
+ m(e),
41
+ h(t)
42
+ ]);
43
+ return {
44
+ viewer: t,
45
+ owner: n,
46
+ storagePanes: r,
47
+ viewerStorages: a
48
+ };
49
+ }
50
+ function _(e, t) {
51
+ return e.owner === t.owner && e.viewer === t.viewer && e.storagePanes.map((e) => e.subject.value).join() === t.storagePanes.map((e) => e.subject.value).join();
52
+ }
53
+ function v(e, t) {
54
+ return e.viewerStorages.some((e) => t.startsWith(e));
55
+ }
56
+ async function y(e) {
57
+ return v(await g(e), e);
58
+ }
59
+ //#endregion
60
+ export { g as getPodContext, v as isInViewerPod, y as isPageInViewerPod, _ as isSamePod };
61
+
62
+ //# sourceMappingURL=podContext.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"podContext.esm.js","names":["MAX_REMEMBERED","owners","storages","viewerStorages","podKey","url","pageUrl","first","documentKey","sym","remember","existing","cache","key","created","load","what","error","fallback","ownerOf","subject","webId","loadProfileFromURI","isWebIdUri","storagesOf","getFolderPanesFromURI","storagesOfViewer","viewer","getPodStorages","storage","getPodContext","authn","owner","storagePanes","ownStorages","isSamePod","a","b","pane","isInViewerPod","context","isPageInViewerPod"],"sources":["../../src/navigation/podContext.ts"],"sourcesContent":["/*\n * Whose pod the page is in, and which storages the viewer owns.\n *\n * Several parts of the page need this: the navbar builds its items from it, the profile heading\n * shows the owner, and the outline decides whether the file explorer header fits. Each part is\n * looked up once and cached, so they no longer each look it up, or read it back from each\n * other's DOM.\n */\n\nimport { authn } from 'solid-logic'\nimport { sym } from 'rdflib'\nimport { isWebIdUri, loadProfileFromURI } from '../utils/webIdUtils'\nimport { getFolderPanesFromURI, type PaneItem } from '../utils/paneUtils'\nimport { getPodStorages } from '../utils/podUtils'\n\nexport interface PodContext {\n /** WebID of the logged-in user. */\n viewer?: string\n /** WebID of the person whose pod the page is in; unknown when no profile could be found. */\n owner?: string\n /** The storages of that pod, as panes the navbar can open. */\n storagePanes: PaneItem[]\n /** The storages the viewer owns. */\n viewerStorages: string[]\n}\n\nconst MAX_REMEMBERED = 500\n\n// What was found depends on different parts of the URL, so each part is remembered on its own:\n// - the owner depends on the document: the profile lookup can end with that document's own\n// foaf:primaryTopic, so two pages of one pod may not share an owner\n// - the storages depend on the pod, derived from the origin and the first path segment\n// - the viewer's storages depend only on who the viewer is\nconst owners = new Map<string, Promise<string | undefined>>()\nconst storages = new Map<string, Promise<PaneItem[]>>()\nconst viewerStorages = new Map<string, Promise<string[]>>()\n\nfunction podKey (pageUrl: string): string {\n try {\n const url = new URL(pageUrl)\n const [first = ''] = url.pathname.split('/').filter(Boolean)\n return `${url.origin}|${first}`\n } catch {\n return pageUrl\n }\n}\n\nfunction documentKey (pageUrl: string): string {\n return sym(pageUrl).doc().uri\n}\n\n/**\n * Remembers a lookup, unless it failed: a failure is not kept, so that the next request asks again.\n */\nfunction remember<T> (\n cache: Map<string, Promise<T>>,\n key: string,\n what: string,\n load: () => Promise<T>,\n fallback: T\n): Promise<T> {\n const existing = cache.get(key)\n if (existing) return existing\n\n const created: Promise<T> = load().catch(error => {\n console.warn(`Could not load the ${what} for ${key}`, error)\n if (cache.get(key) === created) cache.delete(key)\n return fallback\n })\n cache.set(key, created)\n if (cache.size > MAX_REMEMBERED) cache.delete(cache.keys().next().value as string)\n return created\n}\n\nfunction ownerOf (pageUrl: string): Promise<string | undefined> {\n return remember(owners, documentKey(pageUrl), 'owner of the pod', async () => {\n const subject = sym(pageUrl)\n const webId = await loadProfileFromURI(subject)\n // The lookup falls back to the URL itself when it finds no profile\n return webId.uri === subject.uri && !isWebIdUri(subject) ? undefined : webId.value\n }, undefined)\n}\n\nfunction storagesOf (pageUrl: string): Promise<PaneItem[]> {\n return remember(storages, podKey(pageUrl), 'storages of the pod', () => getFolderPanesFromURI(sym(pageUrl)), [])\n}\n\nfunction storagesOfViewer (viewer: string | undefined): Promise<string[]> {\n if (!viewer) return Promise.resolve([])\n return remember(viewerStorages, viewer, 'storages of the viewer', async () => {\n return (await getPodStorages(sym(viewer))).map(storage => storage.uri)\n }, [])\n}\n\n/** The context for the pod a URL is in; the page's own URL by default. */\nexport async function getPodContext (pageUrl: string = window.location.href): Promise<PodContext> {\n const viewer = authn.currentUser()?.value\n const [owner, storagePanes, ownStorages] = await Promise.all([\n ownerOf(pageUrl), storagesOf(pageUrl), storagesOfViewer(viewer)\n ])\n return { viewer, owner, storagePanes, viewerStorages: ownStorages }\n}\n\n/** Forget what was loaded, for example when tests start over. */\nexport function resetPodContexts (): void {\n owners.clear()\n storages.clear()\n viewerStorages.clear()\n}\n\n/** Whether two contexts describe the same pod, so that a navbar built from one fits the other. */\nexport function isSamePod (a: PodContext, b: PodContext): boolean {\n return a.owner === b.owner && a.viewer === b.viewer &&\n a.storagePanes.map(pane => pane.subject.value).join() === b.storagePanes.map(pane => pane.subject.value).join()\n}\n\nexport function isInViewerPod (context: PodContext, url: string): boolean {\n return context.viewerStorages.some(storage => url.startsWith(storage))\n}\n\n/** Whether the URL lies within one of the viewer's own storages. */\nexport async function isPageInViewerPod (url: string): Promise<boolean> {\n return isInViewerPod(await getPodContext(url), url)\n}\n"],"mappings":";;;;;;AA0BA,IAAMA,IAAiB,KAOjBC,oBAAS,IAAI,IAAyC,GACtDC,oBAAW,IAAI,IAAiC,GAChDC,oBAAiB,IAAI,IAA+B;AAE1D,SAASC,EAAQ,GAAyB;CACxC,IAAI;EACF,IAAMC,IAAM,IAAI,IAAIC,CAAO,GACrB,CAACC,IAAQ,MAAMF,EAAI,SAAS,MAAM,GAAG,CAAC,CAAC,OAAO,OAAO;EAC3D,OAAO,GAAGA,EAAI,OAAO,GAAGE;CAC1B,QAAQ;EACN,OAAOD;CACT;AACF;AAEA,SAASE,EAAa,GAAyB;CAC7C,OAAOC,EAAIH,CAAO,CAAC,CAAC,IAAI,CAAC,CAAC;AAC5B;AAKA,SAASI,EACP,GACA,GACA,GACA,GACA,GACY;CACZ,IAAMC,IAAWC,EAAM,IAAIC,CAAG;CAC9B,IAAIF,GAAU,OAAOA;CAErB,IAAMG,IAAsBC,EAAK,CAAC,CAAC,OAAM,OACvC,QAAQ,KAAK,sBAAsBC,EAAK,OAAOH,KAAOI,CAAK,GACvDL,EAAM,IAAIC,CAAG,MAAMC,KAASF,EAAM,OAAOC,CAAG,GACzCK,EACR;CAGD,OAFAN,EAAM,IAAIC,GAAKC,CAAO,GAClBF,EAAM,OAAOZ,KAAgBY,EAAM,OAAOA,EAAM,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,KAAe,GAC1EE;AACT;AAEA,SAASK,EAAS,GAA8C;CAC9D,OAAOT,EAAST,GAAQO,EAAYF,CAAO,GAAG,oBAAoB,YAAY;EAC5E,IAAMc,IAAUX,EAAIH,CAAO,GACrBe,IAAQ,MAAMC,EAAmBF,CAAO;EAE9C,OAAOC,EAAM,QAAQD,EAAQ,OAAO,CAACG,EAAWH,CAAO,IAAI,KAAA,IAAYC,EAAM;CAC/E,GAAG,KAAA,CAAS;AACd;AAEA,SAASG,EAAY,GAAsC;CACzD,OAAOd,EAASR,GAAUE,EAAOE,CAAO,GAAG,6BAA6BmB,EAAsBhB,EAAIH,CAAO,CAAC,GAAG,CAAC,CAAC;AACjH;AAEA,SAASoB,EAAkB,GAA+C;CAExE,OADKC,IACEjB,EAASP,GAAgBwB,GAAQ,0BAA0B,aACxD,MAAMC,EAAenB,EAAIkB,CAAM,CAAC,EAAA,CAAG,KAAI,MAAWE,EAAQ,GAAG,GACpE,CAAC,CAAC,IAHe,QAAQ,QAAQ,CAAC,CAAC;AAIxC;AAGA,eAAsBC,EAAe,IAAkB,OAAO,SAAS,MAA2B;CAChG,IAAMH,IAASI,EAAM,YAAY,CAAC,EAAE,OAC9B,CAACC,GAAOC,GAAcC,KAAe,MAAM,QAAQ,IAAI;EAC3Df,EAAQb,CAAO;EAAGkB,EAAWlB,CAAO;EAAGoB,EAAiBC,CAAM;CAChE,CAAC;CACD,OAAO;EAAE;EAAQ;EAAO;EAAc,gBAAgBO;CAAY;AACpE;AAUA,SAAgBC,EAAW,GAAe,GAAwB;CAChE,OAAOC,EAAE,UAAUC,EAAE,SAASD,EAAE,WAAWC,EAAE,UAC3CD,EAAE,aAAa,KAAI,MAAQE,EAAK,QAAQ,KAAK,CAAC,CAAC,KAAK,MAAMD,EAAE,aAAa,KAAI,MAAQC,EAAK,QAAQ,KAAK,CAAC,CAAC,KAAK;AAClH;AAEA,SAAgBC,EAAe,GAAqB,GAAsB;CACxE,OAAOC,EAAQ,eAAe,MAAK,MAAWnC,EAAI,WAAWwB,CAAO,CAAC;AACvE;AAGA,eAAsBY,EAAmB,GAA+B;CACtE,OAAOF,EAAc,MAAMT,EAAczB,CAAG,GAAGA,CAAG;AACpD"}
@@ -0,0 +1,2 @@
1
+ var e={profile:`profile`,social:`friends`,folder:`storage`};function t(e){return typeof e==`object`&&e?e:{}}function n(t,n){return t?{kind:e[t]??`pane`,pane:t,...n?{subject:n}:{}}:{kind:`default`}}function r(e){let{paneName:r,paneUri:i,viaAccountMenu:a}=t(e);return{view:n(typeof r==`string`&&r?r:void 0,typeof i==`string`&&i?i:void 0),viaAccountMenu:a===!0}}function i(){return r(window.history.state)}function a(e,n){let r={...t(e)};return n.pane&&(r.paneName=n.pane.name,typeof n.pane.subject==`string`&&(r.paneUri=n.pane.subject)),n.leavingPage&&!n.pane&&delete r.paneName,(n.leavingPage&&!n.pane||n.pane&&!n.pane.subject)&&delete r.paneUri,n.viaAccountMenu?r.viaAccountMenu=!0:delete r.viaAccountMenu,r}function o(e){let{paneName:n,paneUri:r,viaAccountMenu:i,...a}=t(e);return a}function s(){window.history.replaceState(o(window.history.state),``,window.location.href)}exports.clearPaneState=s,exports.nextHistoryState=a,exports.parseNavigationState=r,exports.readNavigationState=i,exports.viewFromPane=n,exports.withoutPaneState=o;
2
+ //# sourceMappingURL=state.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.cjs.js","names":["KIND_BY_PANE","asRecord","raw","viewFromPane","pane","subject","parseNavigationState","paneName","paneUri","viaAccountMenu","readNavigationState","nextHistoryState","next","current","change","withoutPaneState","rest","clearPaneState"],"sources":["../../src/navigation/state.ts"],"sourcesContent":["/*\n * What a history entry records about the view that was displayed.\n *\n * This is the only module that knows how that is stored in `history.state`; everything\n * else works with `NavigationState`. The stored fields are `paneName`, `paneUri` and\n * `viaAccountMenu`, next to whatever other keys the entry carries.\n */\n\nexport type ViewKind = 'default' | 'profile' | 'friends' | 'storage' | 'pane'\n\nexport interface NavigationView {\n kind: ViewKind\n /** Registry name of the displayed pane. Always set unless the kind is `default`. */\n pane?: string\n /** What the pane displays when that is not the page URL (a profile, friends list or storage). */\n subject?: string\n}\n\nexport interface NavigationState {\n view: NavigationView\n /** The account menu opened the view: it shows the viewer's own content under the page URL. */\n viaAccountMenu: boolean\n}\n\nconst KIND_BY_PANE: Record<string, ViewKind> = {\n profile: 'profile',\n social: 'friends',\n folder: 'storage'\n}\n\nfunction asRecord (raw: unknown): Record<string, unknown> {\n return raw !== null && typeof raw === 'object' ? raw as Record<string, unknown> : {}\n}\n\nexport function viewFromPane (pane?: string, subject?: string): NavigationView {\n if (!pane) return { kind: 'default' }\n return { kind: KIND_BY_PANE[pane] ?? 'pane', pane, ...(subject ? { subject } : {}) }\n}\n\nexport function parseNavigationState (raw: unknown): NavigationState {\n const { paneName, paneUri, viaAccountMenu } = asRecord(raw)\n return {\n view: viewFromPane(\n typeof paneName === 'string' && paneName ? paneName : undefined,\n typeof paneUri === 'string' && paneUri ? paneUri : undefined\n ),\n viaAccountMenu: viaAccountMenu === true\n }\n}\n\nexport function readNavigationState (): NavigationState {\n return parseNavigationState(window.history.state)\n}\n\nexport interface HistoryStateChange {\n /** The pane that is being displayed, and its own subject if it has one. */\n pane?: { name: string, subject?: string }\n /** The entry is for a different URL than the current one. */\n leavingPage: boolean\n /** The account menu is displaying it. */\n viaAccountMenu: boolean\n}\n\n/**\n * The state to store for an entry after displaying something.\n *\n * Pane details describe what was displayed, so they must not leak into the entry of\n * another URL, nor outlive the pane they were saved for. The account-menu marker\n * keeps a later page load from restoring the viewer's content over the URL's subject.\n */\nexport function nextHistoryState (current: unknown, change: HistoryStateChange): Record<string, unknown> {\n const next: Record<string, unknown> = { ...asRecord(current) }\n\n if (change.pane) {\n next.paneName = change.pane.name\n if (typeof change.pane.subject === 'string') next.paneUri = change.pane.subject\n }\n if (change.leavingPage && !change.pane) delete next.paneName\n if ((change.leavingPage && !change.pane) || (change.pane && !change.pane.subject)) delete next.paneUri\n\n if (change.viaAccountMenu) next.viaAccountMenu = true\n else delete next.viaAccountMenu\n\n return next\n}\n\n/** The state without anything about the displayed pane. */\nexport function withoutPaneState (raw: unknown): Record<string, unknown> {\n const { paneName, paneUri, viaAccountMenu, ...rest } = asRecord(raw)\n return rest\n}\n\n/** Forget what the current entry displayed, so the URL alone decides what to show. */\nexport function clearPaneState (): void {\n window.history.replaceState(withoutPaneState(window.history.state), '', window.location.href)\n}\n"],"mappings":"AAwBA,IAAMA,EAAyC,CAC7C,QAAS,UACT,OAAQ,UACR,OAAQ,SACV,EAEA,SAASC,EAAU,EAAuC,CACxD,OAAuB,OAAOC,GAAQ,UAA/BA,EAA0CA,EAAiC,CAAC,CACrF,CAEA,SAAgBC,EAAc,EAAe,EAAkC,CAE7E,OADKC,EACE,CAAE,KAAMJ,EAAaI,IAAS,OAAQ,OAAM,GAAIC,EAAU,CAAE,SAAQ,EAAI,CAAC,CAAG,EADjE,CAAE,KAAM,SAAU,CAEtC,CAEA,SAAgBC,EAAsB,EAA+B,CACnE,GAAM,CAAE,WAAU,UAAS,kBAAmBL,EAASC,CAAG,EAC1D,MAAO,CACL,KAAMC,EACJ,OAAOI,GAAa,UAAYA,EAAWA,EAAW,IAAA,GACtD,OAAOC,GAAY,UAAYA,EAAUA,EAAU,IAAA,EACrD,EACA,eAAgBC,IAAmB,EACrC,CACF,CAEA,SAAgBC,GAAwC,CACtD,OAAOJ,EAAqB,OAAO,QAAQ,KAAK,CAClD,CAkBA,SAAgBK,EAAkB,EAAkB,EAAqD,CACvG,IAAMC,EAAgC,CAAE,GAAGX,EAASY,CAAO,CAAE,EAY7D,OAVIC,EAAO,OACT,EAAK,SAAWA,EAAO,KAAK,KACxB,OAAOA,EAAO,KAAK,SAAY,WAAU,EAAK,QAAUA,EAAO,KAAK,UAEtEA,EAAO,aAAe,CAACA,EAAO,MAAM,OAAOF,EAAK,UAC/CE,EAAO,aAAe,CAACA,EAAO,MAAUA,EAAO,MAAQ,CAACA,EAAO,KAAK,UAAU,OAAOF,EAAK,QAE3FE,EAAO,eAAgB,EAAK,eAAiB,GAC5C,OAAOF,EAAK,eAEVA,CACT,CAGA,SAAgBG,EAAkB,EAAuC,CACvE,GAAM,CAAE,WAAU,UAAS,iBAAgB,GAAGC,GAASf,EAASC,CAAG,EACnE,OAAOc,CACT,CAGA,SAAgBC,GAAwB,CACtC,OAAO,QAAQ,aAAaF,EAAiB,OAAO,QAAQ,KAAK,EAAG,GAAI,OAAO,SAAS,IAAI,CAC9F,C"}
@@ -0,0 +1,40 @@
1
+ export type ViewKind = 'default' | 'profile' | 'friends' | 'storage' | 'pane';
2
+ export interface NavigationView {
3
+ kind: ViewKind;
4
+ /** Registry name of the displayed pane. Always set unless the kind is `default`. */
5
+ pane?: string;
6
+ /** What the pane displays when that is not the page URL (a profile, friends list or storage). */
7
+ subject?: string;
8
+ }
9
+ export interface NavigationState {
10
+ view: NavigationView;
11
+ /** The account menu opened the view: it shows the viewer's own content under the page URL. */
12
+ viaAccountMenu: boolean;
13
+ }
14
+ export declare function viewFromPane(pane?: string, subject?: string): NavigationView;
15
+ export declare function parseNavigationState(raw: unknown): NavigationState;
16
+ export declare function readNavigationState(): NavigationState;
17
+ export interface HistoryStateChange {
18
+ /** The pane that is being displayed, and its own subject if it has one. */
19
+ pane?: {
20
+ name: string;
21
+ subject?: string;
22
+ };
23
+ /** The entry is for a different URL than the current one. */
24
+ leavingPage: boolean;
25
+ /** The account menu is displaying it. */
26
+ viaAccountMenu: boolean;
27
+ }
28
+ /**
29
+ * The state to store for an entry after displaying something.
30
+ *
31
+ * Pane details describe what was displayed, so they must not leak into the entry of
32
+ * another URL, nor outlive the pane they were saved for. The account-menu marker
33
+ * keeps a later page load from restoring the viewer's content over the URL's subject.
34
+ */
35
+ export declare function nextHistoryState(current: unknown, change: HistoryStateChange): Record<string, unknown>;
36
+ /** The state without anything about the displayed pane. */
37
+ export declare function withoutPaneState(raw: unknown): Record<string, unknown>;
38
+ /** Forget what the current entry displayed, so the URL alone decides what to show. */
39
+ export declare function clearPaneState(): void;
40
+ //# sourceMappingURL=state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../src/navigation/state.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,CAAA;AAE7E,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,QAAQ,CAAA;IACd,oFAAoF;IACpF,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,iGAAiG;IACjG,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,cAAc,CAAA;IACpB,8FAA8F;IAC9F,cAAc,EAAE,OAAO,CAAA;CACxB;AAYD,wBAAgB,YAAY,CAAE,IAAI,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,cAAc,CAG7E;AAED,wBAAgB,oBAAoB,CAAE,GAAG,EAAE,OAAO,GAAG,eAAe,CASnE;AAED,wBAAgB,mBAAmB,IAAK,eAAe,CAEtD;AAED,MAAM,WAAW,kBAAkB;IACjC,2EAA2E;IAC3E,IAAI,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IACzC,6DAA6D;IAC7D,WAAW,EAAE,OAAO,CAAA;IACpB,yCAAyC;IACzC,cAAc,EAAE,OAAO,CAAA;CACxB;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAcvG;AAED,2DAA2D;AAC3D,wBAAgB,gBAAgB,CAAE,GAAG,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAGvE;AAED,sFAAsF;AACtF,wBAAgB,cAAc,IAAK,IAAI,CAEtC"}
@@ -0,0 +1,41 @@
1
+ //#region src/navigation/state.ts
2
+ var e = {
3
+ profile: "profile",
4
+ social: "friends",
5
+ folder: "storage"
6
+ };
7
+ function t(e) {
8
+ return typeof e == "object" && e ? e : {};
9
+ }
10
+ function n(t, n) {
11
+ return t ? {
12
+ kind: e[t] ?? "pane",
13
+ pane: t,
14
+ ...n ? { subject: n } : {}
15
+ } : { kind: "default" };
16
+ }
17
+ function r(e) {
18
+ let { paneName: r, paneUri: i, viaAccountMenu: a } = t(e);
19
+ return {
20
+ view: n(typeof r == "string" && r ? r : void 0, typeof i == "string" && i ? i : void 0),
21
+ viaAccountMenu: a === !0
22
+ };
23
+ }
24
+ function i() {
25
+ return r(window.history.state);
26
+ }
27
+ function a(e, n) {
28
+ let r = { ...t(e) };
29
+ return n.pane && (r.paneName = n.pane.name, typeof n.pane.subject == "string" && (r.paneUri = n.pane.subject)), n.leavingPage && !n.pane && delete r.paneName, (n.leavingPage && !n.pane || n.pane && !n.pane.subject) && delete r.paneUri, n.viaAccountMenu ? r.viaAccountMenu = !0 : delete r.viaAccountMenu, r;
30
+ }
31
+ function o(e) {
32
+ let { paneName: n, paneUri: r, viaAccountMenu: i, ...a } = t(e);
33
+ return a;
34
+ }
35
+ function s() {
36
+ window.history.replaceState(o(window.history.state), "", window.location.href);
37
+ }
38
+ //#endregion
39
+ export { s as clearPaneState, a as nextHistoryState, r as parseNavigationState, i as readNavigationState, n as viewFromPane, o as withoutPaneState };
40
+
41
+ //# sourceMappingURL=state.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.esm.js","names":["KIND_BY_PANE","asRecord","raw","viewFromPane","pane","subject","parseNavigationState","paneName","paneUri","viaAccountMenu","readNavigationState","nextHistoryState","next","current","change","withoutPaneState","rest","clearPaneState"],"sources":["../../src/navigation/state.ts"],"sourcesContent":["/*\n * What a history entry records about the view that was displayed.\n *\n * This is the only module that knows how that is stored in `history.state`; everything\n * else works with `NavigationState`. The stored fields are `paneName`, `paneUri` and\n * `viaAccountMenu`, next to whatever other keys the entry carries.\n */\n\nexport type ViewKind = 'default' | 'profile' | 'friends' | 'storage' | 'pane'\n\nexport interface NavigationView {\n kind: ViewKind\n /** Registry name of the displayed pane. Always set unless the kind is `default`. */\n pane?: string\n /** What the pane displays when that is not the page URL (a profile, friends list or storage). */\n subject?: string\n}\n\nexport interface NavigationState {\n view: NavigationView\n /** The account menu opened the view: it shows the viewer's own content under the page URL. */\n viaAccountMenu: boolean\n}\n\nconst KIND_BY_PANE: Record<string, ViewKind> = {\n profile: 'profile',\n social: 'friends',\n folder: 'storage'\n}\n\nfunction asRecord (raw: unknown): Record<string, unknown> {\n return raw !== null && typeof raw === 'object' ? raw as Record<string, unknown> : {}\n}\n\nexport function viewFromPane (pane?: string, subject?: string): NavigationView {\n if (!pane) return { kind: 'default' }\n return { kind: KIND_BY_PANE[pane] ?? 'pane', pane, ...(subject ? { subject } : {}) }\n}\n\nexport function parseNavigationState (raw: unknown): NavigationState {\n const { paneName, paneUri, viaAccountMenu } = asRecord(raw)\n return {\n view: viewFromPane(\n typeof paneName === 'string' && paneName ? paneName : undefined,\n typeof paneUri === 'string' && paneUri ? paneUri : undefined\n ),\n viaAccountMenu: viaAccountMenu === true\n }\n}\n\nexport function readNavigationState (): NavigationState {\n return parseNavigationState(window.history.state)\n}\n\nexport interface HistoryStateChange {\n /** The pane that is being displayed, and its own subject if it has one. */\n pane?: { name: string, subject?: string }\n /** The entry is for a different URL than the current one. */\n leavingPage: boolean\n /** The account menu is displaying it. */\n viaAccountMenu: boolean\n}\n\n/**\n * The state to store for an entry after displaying something.\n *\n * Pane details describe what was displayed, so they must not leak into the entry of\n * another URL, nor outlive the pane they were saved for. The account-menu marker\n * keeps a later page load from restoring the viewer's content over the URL's subject.\n */\nexport function nextHistoryState (current: unknown, change: HistoryStateChange): Record<string, unknown> {\n const next: Record<string, unknown> = { ...asRecord(current) }\n\n if (change.pane) {\n next.paneName = change.pane.name\n if (typeof change.pane.subject === 'string') next.paneUri = change.pane.subject\n }\n if (change.leavingPage && !change.pane) delete next.paneName\n if ((change.leavingPage && !change.pane) || (change.pane && !change.pane.subject)) delete next.paneUri\n\n if (change.viaAccountMenu) next.viaAccountMenu = true\n else delete next.viaAccountMenu\n\n return next\n}\n\n/** The state without anything about the displayed pane. */\nexport function withoutPaneState (raw: unknown): Record<string, unknown> {\n const { paneName, paneUri, viaAccountMenu, ...rest } = asRecord(raw)\n return rest\n}\n\n/** Forget what the current entry displayed, so the URL alone decides what to show. */\nexport function clearPaneState (): void {\n window.history.replaceState(withoutPaneState(window.history.state), '', window.location.href)\n}\n"],"mappings":";AAwBA,IAAMA,IAAyC;CAC7C,SAAS;CACT,QAAQ;CACR,QAAQ;AACV;AAEA,SAASC,EAAU,GAAuC;CACxD,OAAuB,OAAOC,KAAQ,YAA/BA,IAA0CA,IAAiC,CAAC;AACrF;AAEA,SAAgBC,EAAc,GAAe,GAAkC;CAE7E,OADKC,IACE;EAAE,MAAMJ,EAAaI,MAAS;EAAQ;EAAM,GAAIC,IAAU,EAAE,WAAQ,IAAI,CAAC;CAAG,IADjE,EAAE,MAAM,UAAU;AAEtC;AAEA,SAAgBC,EAAsB,GAA+B;CACnE,IAAM,EAAE,aAAU,YAAS,sBAAmBL,EAASC,CAAG;CAC1D,OAAO;EACL,MAAMC,EACJ,OAAOI,KAAa,YAAYA,IAAWA,IAAW,KAAA,GACtD,OAAOC,KAAY,YAAYA,IAAUA,IAAU,KAAA,CACrD;EACA,gBAAgBC,MAAmB;CACrC;AACF;AAEA,SAAgBC,IAAwC;CACtD,OAAOJ,EAAqB,OAAO,QAAQ,KAAK;AAClD;AAkBA,SAAgBK,EAAkB,GAAkB,GAAqD;CACvG,IAAMC,IAAgC,EAAE,GAAGX,EAASY,CAAO,EAAE;CAY7D,OAVIC,EAAO,SACT,EAAK,WAAWA,EAAO,KAAK,MACxB,OAAOA,EAAO,KAAK,WAAY,aAAU,EAAK,UAAUA,EAAO,KAAK,WAEtEA,EAAO,eAAe,CAACA,EAAO,QAAM,OAAOF,EAAK,WAC/CE,EAAO,eAAe,CAACA,EAAO,QAAUA,EAAO,QAAQ,CAACA,EAAO,KAAK,YAAU,OAAOF,EAAK,SAE3FE,EAAO,iBAAgB,EAAK,iBAAiB,KAC5C,OAAOF,EAAK,gBAEVA;AACT;AAGA,SAAgBG,EAAkB,GAAuC;CACvE,IAAM,EAAE,aAAU,YAAS,mBAAgB,GAAGC,MAASf,EAASC,CAAG;CACnE,OAAOc;AACT;AAGA,SAAgBC,IAAwB;CACtC,OAAO,QAAQ,aAAaF,EAAiB,OAAO,QAAQ,KAAK,GAAG,IAAI,OAAO,SAAS,IAAI;AAC9F"}
@@ -1 +1 @@
1
- {"version":3,"file":"context.cjs.js","names":[],"sources":["../../src/outline/context.ts"],"sourcesContent":["import { DataBrowserContext, PaneRegistry, RenderEnvironment } from 'pane-registry'\nimport { getOutliner } from '../index'\nimport { SolidLogic } from 'solid-logic'\nimport { LiveStore } from 'rdflib'\n\nexport function createContext (\n dom: HTMLDocument,\n paneRegistry: PaneRegistry,\n store: LiveStore,\n logic: SolidLogic,\n environment?: RenderEnvironment\n): DataBrowserContext {\n return {\n dom,\n getOutliner,\n session: {\n paneRegistry,\n // @ts-ignore\n store,\n // @ts-ignore\n logic\n },\n environment\n }\n}\n"],"mappings":"mCAKA,SAAgB,EACd,EACA,EACA,EACA,EACA,EACoB,CACpB,MAAO,CACL,MACA,YAAA,EAAA,YACA,QAAS,CACP,eAEA,QAEA,OACF,EACA,aACF,CACF"}
1
+ {"version":3,"file":"context.cjs.js","names":["require_index","createContext"],"sources":["../../src/outline/context.ts"],"sourcesContent":["import { DataBrowserContext, PaneRegistry, RenderEnvironment } from 'pane-registry'\nimport { getOutliner } from '../index'\nimport { SolidLogic } from 'solid-logic'\nimport { LiveStore } from 'rdflib'\n\nexport function createContext (\n dom: HTMLDocument,\n paneRegistry: PaneRegistry,\n store: LiveStore,\n logic: SolidLogic,\n environment?: RenderEnvironment\n): DataBrowserContext {\n return {\n dom,\n getOutliner,\n session: {\n paneRegistry,\n // @ts-ignore\n store,\n // @ts-ignore\n logic\n },\n environment\n }\n}\n"],"mappings":"A,mCAKA,SAAgBC,EACd,EACA,EACA,EACA,EACA,EACoB,CACpB,MAAO,CACL,MACA,YAAAD,EAAA,YACA,QAAS,CACP,eAEA,QAEA,OACF,EACA,aACF,CACF,C"}
@@ -1 +1 @@
1
- {"version":3,"file":"context.esm.js","names":[],"sources":["../../src/outline/context.ts"],"sourcesContent":["import { DataBrowserContext, PaneRegistry, RenderEnvironment } from 'pane-registry'\nimport { getOutliner } from '../index'\nimport { SolidLogic } from 'solid-logic'\nimport { LiveStore } from 'rdflib'\n\nexport function createContext (\n dom: HTMLDocument,\n paneRegistry: PaneRegistry,\n store: LiveStore,\n logic: SolidLogic,\n environment?: RenderEnvironment\n): DataBrowserContext {\n return {\n dom,\n getOutliner,\n session: {\n paneRegistry,\n // @ts-ignore\n store,\n // @ts-ignore\n logic\n },\n environment\n }\n}\n"],"mappings":";;AAKA,SAAgB,EACd,GACA,GACA,GACA,GACA,GACoB;CACpB,OAAO;EACL;EACA;EACA,SAAS;GACP;GAEA;GAEA;EACF;EACA;CACF;AACF"}
1
+ {"version":3,"file":"context.esm.js","names":["createContext"],"sources":["../../src/outline/context.ts"],"sourcesContent":["import { DataBrowserContext, PaneRegistry, RenderEnvironment } from 'pane-registry'\nimport { getOutliner } from '../index'\nimport { SolidLogic } from 'solid-logic'\nimport { LiveStore } from 'rdflib'\n\nexport function createContext (\n dom: HTMLDocument,\n paneRegistry: PaneRegistry,\n store: LiveStore,\n logic: SolidLogic,\n environment?: RenderEnvironment\n): DataBrowserContext {\n return {\n dom,\n getOutliner,\n session: {\n paneRegistry,\n // @ts-ignore\n store,\n // @ts-ignore\n logic\n },\n environment\n }\n}\n"],"mappings":";;AAKA,SAAgBA,EACd,GACA,GACA,GACA,GACA,GACoB;CACpB,OAAO;EACL;EACA;EACA,SAAS;GACP;GAEA;GAEA;EACF;EACA;CACF;AACF"}
@@ -1,2 +1,2 @@
1
- (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.obj{vertical-align:top;border:none;margin:.2em;padding:0 0 5px}.iconTD{vertical-align:top;border:none;width:0;margin:.2em;padding:0}.labelTD{width:100%}.file-explorer-header{flex-wrap:wrap;justify-content:flex-start;align-items:center;display:flex}.strongHeader{margin:0 .6rem 0 0;padding:.1rem .4rem;font-size:150%}.tableFullWidth{width:100%;background:var(--color-background,#f8f9fb)!important}.placeholderTable{width:100%}.tdFlex{vertical-align:top;border-radius:5px;flex-direction:row;justify-content:space-between;display:flex;overflow:hidden}.paneDiv,.exceptionPane{box-sizing:border-box;width:100%;min-width:0;max-width:100%;display:block;overflow-x:hidden}.objectValue--literal{white-space:pre-wrap}.objectValue--integer,.objectValue--decimal,.objectValue--double{text-align:right;display:block}.objectValueAccessIcon,.objectValueLinkIcon,.phoneIcon{vertical-align:middle;display:inline-block}.objectValueLinkIcon,.phoneIcon{width:12px;height:12px}@media (width<=600px){.obj,.iconTD{vertical-align:top;font-size:100%;margin:0!important}}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();const e=require("../_virtual/_rolldown/runtime.cjs.js");;const t=require("./propertyViews.cjs.js"),n=require("./outlineIcons.cjs.js"),r=require("./userInput.cjs.js"),i=require("./queryByExample.cjs.js"),a=require("../utils/webIdUtils.cjs.js"),o=require("../utils/podUtils.cjs.js");require("../components/file-explorer-header/index.cjs.js");let s=require("solid-ui");s=e.__toESM(s);let c=require("solid-logic"),l=require("pane-registry");l=e.__toESM(l);let u=require("rdflib");u=e.__toESM(u);function d(e){let d=e.dom;this.document=e.dom,this.context=e,this.outlineIcons=n.outlineIcons,this.labeller=this.labeller||{},this.labeller.LanguagePreference=``;let f=this,p=this,m=[];this.selection=m,this.ancestor=s.utils.ancestor,this.sparql=u.UpdateManager,this.kb=c.store;let h=c.store,g=c.store.fetcher;d.outline=this,this.qs=new i.QuerySource,this.UserInput=new r.UserInput(this),this.clipboardAddress=`tabulator:clipboard`,this.UserInput.clipboardInit(this.clipboardAddress);let _=this.outlineElement;this.init=function(){let e=b();e.outline=this},this.getLayoutMode=function(){let e=this.context?.environment?.layout;if(e===`mobile`||e===`desktop`)return e;if(typeof window<`u`&&window.matchMedia){let e=Math.round(Math.min(window.innerWidth,window.visualViewport?.width||window.innerWidth)),t=window.matchMedia(`(pointer: coarse)`).matches||navigator.maxTouchPoints>0;return e<=768||t&&e<=1024?`mobile`:`desktop`}return`desktop`},v.lastkbsize=0;function v(e){let t=[];for(let e=arguments.length-1;e>0;e--)t[e-1]=arguments[e];let n=new Date().getTime(),r=e.apply(e,t),i=new Date().getTime();return s.log.info(`BENCHMARK: kb delta: `+(h.statements.length-v.lastkbsize)+`, time elapsed for `+e+` was `+(i-n)+`ms`),v.lastkbsize=h.statements.length,r}function y(e,t,r){let i=s.utils.AJARImage(n.outlineIcons.src.icon_remove_node,`remove`,void 0,d);return i.addEventListener(`click`,K),i.node=r,i.setAttribute(`about`,t.toNT()),i.style.marginLeft=`5px`,i.style.marginRight=`10px`,e.appendChild(i),i}this.appendAccessIcons=function(e,t,n){if(n.termType!==`NamedNode`)return;let r=e.uris(n);r.sort();let i=null;for(let e=0;e<r.length;e++)r[e]!==i&&(i=r[e],p.appendAccessIcon(t,i))},this.appendAccessIcon=function(e,t){if(!t)return``;let r=u.uri.docpart(t);if(r.slice(0,5)!==`http:`)return``;let i=g.getState(r),a,o,c;switch(i){case`unrequested`:a=n.outlineIcons.src.icon_unrequested,o=`fetch`,c=G;break;case`requested`:a=n.outlineIcons.src.icon_requested,o=`fetching`,c=U;break;case`fetched`:a=n.outlineIcons.src.icon_fetched,c=W,o=`loaded`;break;case`failed`:a=n.outlineIcons.src.icon_failed,o=`failed`,c=U;break;case`unpermitted`:a=n.outlineIcons.src.icon_failed,c=U,o=`no perm`;break;case`unfetchable`:a=n.outlineIcons.src.icon_failed,c=U,o=`cannot fetch`;break;default:s.log.error(`?? state = `+i)}let l=s.utils.AJARImage(a,o,n.outlineIcons.tooltips[a].replace(/[Tt]his resource/,r),d);return l.classList.add(`objectValueAccessIcon`),l.setAttribute(`uri`,t),l.addEventListener(`click`,c),P(l,r),e.appendChild(l),l},this.outlineObjectTD=function(e,t,n,r){let i=d.createElement(`td`);return i.classList.add(`obj`),i.setAttribute(`notSelectable`,`false`),e?((e.termType===`NamedNode`||e.termType===`BlankNode`||e.termType===`Literal`&&e.value.slice&&(e.value.slice(0,6)===`ftp://`||e.value.slice(0,8)===`https://`||e.value.slice(0,7)===`http://`))&&(i.setAttribute(`about`,e.toNT()),i.appendChild(s.utils.AJARImage(s.icons.originalIconBase+`tbl-expand-trans.png`,`expand`,void 0,d)).addEventListener(`click`,V)),i.setAttribute(`class`,`obj`),h.whether(e,s.ns.rdf(`type`),s.ns.link(`Request`))&&(i.className=`undetermined`),t||=ne,i.appendChild(t(e)),n&&y(i,e,n),i.tabulatorSelect=function(){z(this,!0)},i.tabulatorDeselect=function(){z(this,!1)},i.addEventListener(`click`,q),i):(i.textContent=`No object available.`,i)},this.outlinePredicateTD=function(e,t,r,i){let a=d.createElement(`TD`);a.setAttribute(`about`,e.toNT()),a.setAttribute(`class`,i?`pred internal`:`pred`);let o;switch(e.termType){case`BlankNode`:a.className=`undetermined`;break;case`NamedNode`:o=s.utils.predicateLabelForXML(e,r);break;case`Collection`:o=s.utils.predicateLabelForXML(e.elements[0],r)}o=o?o.slice(0,1).toUpperCase()+o.slice(1):`...`;let c=d.createElement(`TD`);c.classList.add(`labelTD`),c.setAttribute(`notSelectable`,`true`),c.appendChild(d.createTextNode(o)),a.appendChild(c),c.style.width=`100%`,a.appendChild(N.construct(d));for(let e in n.outlineIcons.termWidgets){if(!t||!t.AJAR_statement)break;n.outlineIcons.termWidgets[e].filter&&n.outlineIcons.termWidgets[e].filter(t.AJAR_statement,`pred`,r)&&N.addIcon(a,n.outlineIcons.termWidgets[e])}return a.tabulatorSelect=function(){z(this,!0)},a.tabulatorDeselect=function(){z(this,!1)},a.addEventListener(`click`,q),a};function b(){return C(`OutlineView`,`Resource browser`)}function x(){return document.querySelector(`solid-panes-navbar`)}function S(){let e=x();e&&e.classList.remove(`navbar--hidden`)}function C(e){if(document.getElementById(`MainContent`)||document.body,e===`OutlineView`){let e=document.getElementById(`OutlineView`);if(e)return e;let t=document.getElementById(`MainContent`)||document.body;if(t){let e=document.createElement(`table`);return e.id=`OutlineView`,e.classList.add(`outline-view`),e.setAttribute(`aria-label`,`Resource browser`),t.appendChild(e),e}}}async function w(e,t){e.uri.endsWith(`/`)&&await o.loadContainerRepresentation(e);let n=t.session.paneRegistry,r=n.list.filter(n=>n.label(e,t)&&!n.global&&n.name!==`sharing`);if(r.length===0)return[n.byName(`internal`)];let i=await s.login.filterAvailablePanes(r);return i.length===0?[r[0]]:n.list.indexOf(r[0])<n.list.indexOf(i[0])?[r[0]].concat(i):i}function T(e,t){return e.find(e=>e.shouldGetFocus&&e.shouldGetFocus(t))||e[0]}function E(e){let t=d.getElementById(`queryButton`);t&&(e?t.removeAttribute(`style`):t.setAttribute(`style`,`display:none;`))}function D(t,n,r,i){if(!t||!r)return;let a;try{s.log.info(`outline: Rendering pane (menu): `+r.name),a=r.render(n,e,i)}catch(e){a=d.createElement(`div`),a.setAttribute(`class`,`exceptionPane`);let t=d.createElement(`pre`);a.appendChild(t),t.appendChild(d.createTextNode(s.utils.stackString(e)))}a.classList.add(`paneDiv`);let o=t.querySelector(`.paneDiv`);o?o.replaceWith(a):t.appendChild(a)}function O(e,t){let n=d.getElementById(`OutlineView`);if(!n)return;let r=e.toNT(),i=n.querySelector(`td.paneView[about="`+r+`"]`);if(!i)return;let a=i.querySelector(`file-explorer-provider`);if(a){if(!t){s.log.warn(`outline: Unable to open pane in place: pane is undefined.`);return}E(!!t.requireQueryButton),a.openSelectedPane?.(t),D(a,e,t,a.paneRenderOptions)}}async function ee(t,n,r){r||={};let i=d.createElement(`tr`);r.hover&&i.classList.add(`hoverControl`);let o=i.appendChild(d.createElement(`td`));o.classList.add(`paneView`,`tdFlex`),o.setAttribute(`notSelectable`,`true`),o.setAttribute(`about`,t.toNT()),o.setAttribute(`colspan`,`2`);let s=o.appendChild(d.createElement(`file-explorer-provider`));s.context=e,s.subjectUri=t.uri,s.onBack=()=>H({target:s});let c=r.hideList?[]:await w(t,e);return s.relevantPanes=c,s.pane=n||T(c,t),s.showHeader=!(t&&t.uri&&t.site&&t.site().uri===t.uri)&&!a.isWebIdUri(t),s.paneRenderOptions=r,s.soloPane=r.solo,s.openPane=(e,t)=>O(e,l.byName(t)),s.handleAccessClick=()=>O(t,l.byName(`sharing`)),s.pane&&(i.classList.add(`outlinePaneRow`),D(s,t,s.pane,r)),i}function k(e){let t=e.parentNode,n=t.parentNode,r=d.createElement(`table`);r.classList.add(`placeholderTable`),n.replaceChild(r,t),t.removeChild(e),n.replaceChild(t,r)}let A=this.propertyTable=function(e,t,n,r){return s.log.debug(`Property table for: `+e),e=h.canon(e),t?(s.log.info(`Re-expand: `+t),t):(t=d.createElement(`table`),t.classList.add(`tableFullWidth`),ee(e,n,r).then(e=>{t.appendChild(e)}),t)};function j(e,t,n){let r=e.createElement(`TR`);r.AJAR_statement=t,r.AJAR_inverse=n,r.setAttribute(`predTR`,`true`);let i=p.outlinePredicateTD(t.predicate,r,n);return r.appendChild(i),r}this.propertyTR=j;function M(e,t,n,r){if(s.log.debug(`Property list length = `+t.length),t.length===0)return``;let i,a,o;n?(i=function(e){return e.subject},t=t.sort(s.utils.RDFComparePredicateSubject)):(i=function(e){return e.object},t=t.sort(s.utils.RDFComparePredicateObject));let c=t.length;for(a=0;a<c;a++){let l=t[a];if(r&&!r(l.predicate,n))continue;let u=j(d,l,n);e.appendChild(u);let m=u.firstChild,g=$.defaults[l.predicate.uri],_=0,v=0,y=0;for(o=0;o+a<c&&t[a+o].predicate.sameTerm(l.predicate);o++)o>0&&i(t[a+o]).sameTerm(i(t[a+o-1]))&&_++,i(t[a+o]).lang&&f.labeller.LanguagePreference&&(v+=1,i(t[a+o]).lang.indexOf(f.labeller.LanguagePreference)>=0&&y++);if(y>0&&v===_+1){for(let e=a;e<=a+_;e++)if(f.labeller.LanguagePreference&&i(t[e]).lang.indexOf(f.labeller.LanguagePreference)>=0){u.appendChild(p.outlineObjectTD(i(t[e]),g,void 0,l));break}a+=_;continue}u.appendChild(p.outlineObjectTD(i(l),g,void 0,l)),u.showNobj=function(r){let c=o-_,u=2*r<c?r:c,f=[];if(c!==1){m.setAttribute(`rowspan`,u===c?c:r+1);let _;u<c&&u===1&&m.setAttribute(`rowspan`,2);let v=0;for(_=1;_<o;_++)if(h.canon(i(t[a+_])).sameTerm(h.canon(i(t[a+_-1]))))s.log.info(`there are duplicates here: %s`,t[a+_-1]);else{v++,l=t[a+_],g=$.defaults[l.predicate.uri];let r=d.createElement(`tr`);r.style.colspan=`1`,r.appendChild(p.outlineObjectTD(i(t[a+_]),g,void 0,l)),r.AJAR_statement=l,r.AJAR_inverse=n,e.appendChild(r),v>=u&&(r.style.display=`none`,f.push(r))}u===c&&m.setAttribute(`rowspan`,v+1)}if(u<c){let t=d.createElement(`tr`),n=t.appendChild(d.createElement(`td`));if(n.classList.add(`obj`),n.setAttribute(`notSelectable`,`false`),c>r){let e=d.createElement(`a`);n.appendChild(e);let t=(function(e){return e(m,o,_,r)})(function(t,n,r,i){return function(n){e.innerHTML=``,n===`none`?(e.appendChild(s.utils.AJARImage(s.icons.originalIconBase+`tbl-more-trans.png`,`more`,`See all`,d)),e.appendChild(d.createTextNode(c-i+` more...`)),t.setAttribute(`rowspan`,i+1)):(e.appendChild(s.utils.AJARImage(s.icons.originalIconBase+`tbl-shrink.png`,`(less)`,void 0,d)),t.setAttribute(`rowspan`,c+1));for(let e=0;e<f.length;e++){let t=f[e];t.style.display=n}}}),i=`none`,a=function(e){return t(i),i=i===`none`?``:`none`,e&&e.stopPropagation(),!1};a(),e.addEventListener(`click`,a,!1)}e.appendChild(t)}},u.showAllobj=function(){u.showNobj(o-_)},u.showNobj(10),a+=o-1}}this.appendPropertyTRs=M;let N={};globalThis.termWidget=N,N.construct=function(e){e||=document;let t=e.createElement(`TD`);return t.setAttribute(`class`,`iconTD`),t.setAttribute(`notSelectable`,`true`),t},N.addIcon=function(e,t,n){let r=e.childNodes[1];if(!r)return;let i=s.utils.AJARImage(t.src,t.alt,t.tooltip,d);r.appendChild(i),n&&i.addEventListener(`click`,n)},N.removeIcon=function(e,t){let n=e.childNodes[1],r;if(n)for(let e=0;e<n.childNodes.length;e++){let i=n.childNodes[e],a=i.src;try{r=d.location.href.split(`?`)[0]}catch{r=``}a===u.uri.join(t.src,r)&&n.removeChild(i)}},N.replaceIcon=function(e,t,n,r){N.removeIcon(e,t),N.addIcon(e,n,r)};function P(e,t){s.log.debug(`Button callbacks for `+t+` added`);let r=function(r){return function(i){return i.indexOf(`#`),!e||!f.ancestor(e,`DIV`)?!1:(i===t&&(e.src=r,e.title=n.outlineIcons.tooltips[r]),!0)}};g.addCallback(`request`,r(n.outlineIcons.src.icon_requested)),g.addCallback(`done`,r(n.outlineIcons.src.icon_fetched)),g.addCallback(`fail`,r(n.outlineIcons.src.icon_failed))}function F(e){let t=e.getAttribute(`class`);return!!(t&&t.indexOf(`selected`)>=0)}function I(e){let t=p.targetOf(e).parentNode;N.replaceIcon(t.parentNode,n.outlineIcons.termWidgets.optOn,n.outlineIcons.termWidgets.optOff,L),t.parentNode.parentNode.removeAttribute(`optional`)}function L(e){let t=p.targetOf(e).parentNode;N.replaceIcon(t.parentNode,n.outlineIcons.termWidgets.optOff,n.outlineIcons.termWidgets.optOn,I),t.parentNode.parentNode.setAttribute(`optional`,`true`)}function R(e,t){let r=n.outlineIcons.termWidgets.optOn,i=n.outlineIcons.termWidgets.optOff;for(let n=e;n.parentNode;n=n.parentNode)for(;;)if(n.getAttribute(`predTR`)){let e=n.getAttribute(`parentOfSelected`);e=e?parseInt(e):0,e===0&&t>0&&N.addIcon(n.childNodes[0],n.getAttribute(`optional`)?r:i,n.getAttribute(`optional`)?I:L),e+=t,n.setAttribute(`parentOfSelected`,e),e===0&&(n.removeAttribute(`parentOfSelected`),N.removeIcon(n.childNodes[0],n.getAttribute(`optional`)?r:i));break}else if(n.previousSibling&&n.previousSibling.nodeName===`TR`)n=n.previousSibling;else break}this.statusBarClick=function(e){let t=s.utils.getTarget(e);t.label&&(window.content.location=t.label)},this.showURI=function(e){e&&d.getElementById(`UserURI`)&&(d.getElementById(`UserURI`).value=e.termType===`NamedNode`?e.uri:``)},this.showSource=function(){if(!(typeof sourceWidget>`u`)){for(let e in sourceWidget.sources)sourceWidget.sources[e].setAttribute(`class`,``);for(let e=0;e<m.length;e++){if(!m[e].parentNode)continue;let t=m[e].parentNode.AJAR_statement;if(!t)continue;let n=t.why;n&&n.uri&&sourceWidget.highlight(n,!0)}}},this.getSelection=function(){return m};function z(e,t){if(e.nodeName!==`TD`)throw s.log.debug(`down`+e.nodeName),Error(`Expected TD in setSelected: `+e.nodeName+` : `+e.textContent);s.log.debug(`pass`);let r=e.getAttribute(`class`);if(r||=``,t){r+=` selected`,(r.indexOf(`pred`)>=0||r.indexOf(`obj`)>=0)&&R(e,1),m.push(e);let t=s.utils.getTerm(e);p.showURI(t);let i=e.AJAR_statement;if(i===void 0&&e.parentNode&&(i=e.parentNode.AJAR_statement),i){let t=i.why;c.store.updater.editable(t.uri,h)&&r.indexOf(`pred`)>=0&&N.addIcon(e,n.outlineIcons.termWidgets.addTri)}}else s.log.debug(`cla=$`+r+`$`),r===`selected`&&(r=``),r=r.replace(` selected`,``),(r.indexOf(`pred`)>=0||r.indexOf(`obj`)>=0)&&R(e,-1),r.indexOf(`pred`)>=0&&N.removeIcon(e,n.outlineIcons.termWidgets.addTri),m=m.filter(function(t){return t===e}),s.log.info(`Deselecting `+e.textContent);typeof sourceWidget<`u`&&p.showSource(),e.setAttribute(`class`,r)}function B(){let e=m.length;for(let t=e-1;t>=0;t--)z(m[t],!1);m=[]}this.targetOf=function(e){let t;if(e||=window.event,e.target)t=e.target;else if(e.srcElement)t=e.srcElement;else return s.log.error(`can't get target for event `+e),!1;return t.nodeType===3&&(t=t.parentNode),t},this.walk=function(e,t){let n=t||m[0],r;switch(e){case`down`:try{r=n.parentNode.nextSibling.lastChild}catch{this.walk(`up`);return}B(),z(r,!0);break;case`up`:try{r=n.parentNode.previousSibling.lastChild}catch{return}B(),z(r,!0);break;case`right`:if(B(),n.nextSibling||n.lastChild.tagName===`strong`)z(n.nextSibling,!0);else{let e=d.evaluate(`table/div/tr/td[2]`,n,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue;z(e,!0)}break;case`left`:if(B(),n.previousSibling&&n.previousSibling.className===`undetermined`)return z(n.previousSibling,!0),!0;z(s.utils.ancestor(n.parentNode,`TD`),!0);break;case`moveTo`:B(),z(t,!0)}(e===`down`||e===`up`)&&(r.tabulatorSelect||this.walk(e))},this.OutlinerKeypressPanel=function(e){s.log.info(`Key `+e.keyCode+` pressed`);function t(e){e&&d.getElementById(`UserURI`)&&(d.getElementById(`UserURI`).value=e.termType===`NamedNode`?e.uri:``)}function n(e){return arguments[3]?!0:(o(`right`,a),t(s.utils.getAbout(h,m[0])),!0)}let r,i;if(s.utils.getTarget(e).tagName===`TEXTAREA`||s.utils.getTarget(e).id===`UserURI`||m.length>1)return;if(m.length===0){(e.keyCode===13||e.keyCode===38||e.keyCode===40||e.keyCode===37||e.keyCode===39)&&(this.walk(`right`,p.focusTd),t(s.utils.getAbout(h,m[0])));return}let a=m[0];switch(g.removeCallback(`done`,`setSelectedAfterward`),g.removeCallback(`fail`,`setSelectedAfterward`),e.keyCode){case 13:if(s.utils.getTarget(e).tagName===`HTML`){let e=s.utils.getAbout(h,a);r=a.parentNode.AJAR_statement.why,i=c.store.updater.editable(r.uri,h),e?f.GotoSubject(e,!0):i&&p.UserInput.Enter(a)}else this.UserInput.Keypress(e),this.walk(`down`),e.stopPropagation();return;case 38:this.walk(`up`),e.stopPropagation(),e.preventDefault();break;case 40:this.walk(`down`),e.stopPropagation(),e.preventDefault()}if(s.utils.getTarget(e).tagName===`INPUT`)return;let o;switch(e.keyCode){case 46:case 8:r=a.parentNode.AJAR_statement.why,i=c.store.updater.editable(r.uri,h),i&&(e.preventDefault(),this.UserInput.Delete(a));break;case 37:{if(this.walk(`left`))return;let e=s.utils.ancestor(a.parentNode,`TD`);Z(a,s.utils.getAbout(h,e));break}case 39:{let e=s.utils.getAbout(h,a);if(e){if(o=this.walk,a.nextSibling){this.walk(`right`);return}a.firstChild.tagName!==`TABLE`&&(g.addCallback(`done`,n),g.addCallback(`fail`,n),X(a,e,{pane:l.byName(`defaultPane`)})),n()}}break;case 38:case 40:break;default:switch(e.charCode){case 99:if(e.ctrlKey){p.UserInput.copyToClipboard(p.clipboardAddress,a);break}break;case 118:case 112:if(e.ctrlKey){p.UserInput.pasteFromClipboard(p.clipboardAddress,a);break}break;default:s.utils.getTarget(e).tagName}}t(s.utils.getAbout(h,m[0]))},this.OutlinerMouseclickPanel=function(e){switch(p.UserInput._tabulatorMode){case 0:J(e);break;case 1:p.UserInput.Click(e)}};function V(e){let t=p.targetOf(e),n=t.parentNode,r=s.utils.getAbout(h,t),i=e.altKey?l.byName(`internal`):void 0;e.shiftKey?Q(n,r,i):e.altKey?X(n,r,{pane:l.byName(`internal`),immediate:!0}):X(n,r)}function H(e){let t=p.targetOf(e),n=s.utils.getAbout(h,t),r=e.altKey?l.byName(`internal`):void 0,i=t.parentNode.parentNode;Z(i,n,r)}function U(e){let t=p.targetOf(e).getAttribute(`uri`);e.altKey?g.fetch(u.uri.docpart(t),{force:!0}):g.refresh(h.sym(u.uri.docpart(t)))}function W(e){let t=p.targetOf(e).getAttribute(`uri`);e.altKey?g.fetch(u.uri.docpart(t),{force:!0}):g.refresh(h.sym(u.uri.docpart(t)))}function G(e){let t=p.targetOf(e).getAttribute(`uri`);g.fetch(u.uri.docpart(t))}function K(e){let t=p.targetOf(e),n=t.node;n.childNodes.length>1&&(n=t.parentNode),k(n)}function q(e){if(p.UserInput._tabulatorMode)return p.UserInput.Click(e);let t=p.targetOf(e),n;for(n=s.utils.ancestor(t,`TD`);n&&n.getAttribute(`notSelectable`)!==`false`;n=s.utils.ancestor(n.parentNode,`TD`));if(!n)return;let r=F(n);if(s.log.debug(`Was node selected before: `+r),e.altKey)z(n,!F(n));else if(e.shiftKey)z(n,!0);else{if(B(),p.UserInput.clearInputAndSave(e),z(n,!0),e.detail===2){e.stopPropagation();return}let t;if(n.parentNode&&(t=n.parentNode.AJAR_statement),!t)return;let i=t.why,a=c.store.updater.editable(i.uri,h);r&&a&&p.UserInput.Click(e,m[0])}s.log.debug(`Was node selected after: `+F(n)+`, count=`+m.length),e.stopPropagation()}function J(e){s.log.info(`@TabulatorMousedown, dom.location is now `+d.location);let t=p.targetOf(e);if(!t)return;let r=t.tagName;r!==`INPUT`&&r!==`TEXTAREA`&&(p.UserInput.clearMenu(),p.UserInput.lastModified&&p.UserInput.lastModified.parentNode.nextSibling&&p.UserInput.backOut(),(!t.src||t.src.slice(t.src.indexOf(`/icons/`)+1)!==n.outlineIcons.src.icon_show_choices&&t.src.slice(t.src.indexOf(`/icons/`)+1)!==n.outlineIcons.src.icon_add_triple)&&p.UserInput.clearInputAndSave(e),(!t.src||t.src.slice(t.src.indexOf(`/icons/`)+1)!==n.outlineIcons.src.icon_show_choices)&&p.UserInput.clearMenu(),e&&e.stopPropagation())}function Y(e){d.title=s.utils.label(e),d.location.href.startsWith(e.site().uri)}function X(e,t,n){n||={};let r=n.pane,i=!!n.already,a=n.immediate;s.log.info(`@outlineExpand, dom is now `+d.location),g.removeCallback(`done`,`expand`),g.removeCallback(`fail`,`expand`);let o=h.canon(t);function c(){if(o=h.canon(o),!e||!e.parentNode||!e.parentNode.parentNode)return!1;let t;if(s.log.info(`@@ REPAINTING `),!i)t=A(o,void 0,r,n);else{for(s.log.info(` ... p is `+e),t=e.firstChild;t.nextSibling&&(s.log.info(` ... checking node `+t),t.nodeName!==`table`);t=t.nextSibling);t=A(o,t,r,n)}i=!0,s.utils.ancestor(e,`TABLE`)&&s.utils.ancestor(e,`TABLE`).style.backgroundColor===`white`?t.style.backgroundColor=`#eee`:t.style.backgroundColor=`white`,s.utils.emptyNode(e).appendChild(t),p.focusTd=e,s.log.debug(`expand: Node for `+o+` expanded`);let a=h.each(o,s.ns.rdfs(`seeAlso`));for(let e=0;e<a.length;e++)e===25&&s.log.warn(`expand: Warning: many (`+a.length+`) seeAlso links for `+o),g.lookUpThing(a[e],o)}function l(e){if(arguments[3])return!0;let t=h.canon(o);s.log.info(`@@ expand: relevant subject=`+t+`, uri=`+e+`, already=`+i);let n=h.sym(u.uri.docpart(e));if(e.indexOf(`#`)>=0)throw Error(`Internal error: hash in `+e);return!function(){if(!t.uri)return!0;let r=h.uris(t);if(!r)return!1;for(let t=0;t<r.length;t++)for(let n=u.uri.docpart(r[t]);n;n=h.HTTPRedirects[n])if(e===n)return!0;return!!h.anyStatementMatching(t,void 0,void 0,n)}()||(s.log.success(`@@ expand OK: relevant subject=`+t+`, uri=`+e+`, source=`+i),c(),!1)}n.solo&&Y(o),s.log.debug(`outlineExpand: dereferencing `+o);let f=d.createElement(`span`);e.appendChild(f),g.addCallback(`done`,l),g.addCallback(`fail`,l);let m=[];if(o.uri&&o.uri.split(`:`)[0]===`rdf`){c();return}for(let e=0;e<m.length;e++){let t;if(t===m[e](o)){c(),s.log.debug(`outline 1815`),t[1]&&_.removeChild(_.lastChild);return}}if(o.uri&&!a&&!s.widgets.isAudio(o)&&!s.widgets.isVideo(o)){let t=o.doc()&&o.doc().uri?o.doc().uri:``+o.doc(),r=function(e){let t=!!(o&&o.uri&&o.site&&o.site().uri===o.uri);return e===403?t?`This root resource is not accessible with your current permissions. Try logging in with an authorized account or opening a public profile document.`:`This resource is not accessible with your current permissions.`:t?`This root resource is not publicly readable. Try logging in or opening a profile document.`:`This resource is not publicly readable. Try logging in or opening a different public resource.`},i=function(e,t){let n=typeof e==`string`?e:String(e||``),r=t?.status||t?.response?.status;return r===401||r===403?r:n.includes(`status: 403`)||n.includes(`status 403`)?403:n.includes(`status: 401`)||n.includes(`status 401`)?401:null},a=function(n,a){if(e.querySelector&&t&&e.querySelector(`[data-outline-error-for="`+t+`"]`))return;let o=i(n,a),c=o?r(o):n,l=s.widgets.errorMessageBlock(d,c,`#fee`,a instanceof Error?a:void 0);t&&l.setAttribute(`data-outline-error-for`,t),e.appendChild(l)},l=!1,u=g.nowOrWhenFetched(o.doc(),void 0,function(e,t){e?(g.lookUpThing(o),c(),n.solo&&Y(o)):(l=!0,a(t,void 0))});u&&typeof u.catch==`function`&&u.catch(function(e){l||(l=!0,a(e,e))})}else c()}function Z(e,t){let n=s.utils.ancestor(e,`TR`);n=s.utils.ancestor(n.parentNode,`TR`);let r;n&&(r=n.AJAR_statement);let i;for(i=e.parentNode;i.tagName!==`TD`;i=i.parentNode)if(i===void 0){alert(`Not enclosed in TD!`);return}s.log.debug(`Collapsing subject `+t);let a;r&&(s.log.debug(`looking up pred `+r.predicate.uri+`in defaults`),a=$.defaults[r.predicate.uri]),s.log.debug(`view= `+a);let o;i.parentNode.parentNode.id===`outline`&&(o=i.parentNode),p.replaceTD(p.outlineObjectTD(t,a,o,r),i)}this.replaceTD=function(e,t){let n;F(t)&&(n=!0);for(let e=m.length-1;e>-1;e--)for(let n=m[e];n.parentNode;n=n.parentNode)n===t&&z(m[e],!1);t.parentNode.replaceChild(e,t),n&&z(e,!0)};function Q(e,t){let n=null;for(let t=e.parentNode;t;t=t.parentNode)s.log.debug(`level `+t.tagName),t.tagName===`TD`&&(n=t);s.utils.emptyNode(n).appendChild(A(t)),Y(t),n.setAttribute(`about`,t.toNT())}f.outlineRefocus=Q,this.GotoFormURI_enterKey=function(e){e.keyCode===13&&f.GotoFormURI(e)},this.GotoFormURI=function(e){te(d.getElementById(`UserURI`).value)};function te(e){let t=h.sym(e);this.GotoSubject(t,!0)}this.GotoURIinit=function(e){let t=h.sym(e);this.GotoSubject(t)},this.GotoSubject=function(e,t,n,r,i,a,o=!0){let c=b();o&&(!a||a===c)&&S(),a||=c,r&&(s.utils.emptyNode(a),a.style.width=`100%`);function l(){let t=d.createElement(`tr`);t.classList.add(`outlineRow1`),t.style.verticalAlign=`top`,a.appendChild(t);let n=p.outlineObjectTD(e,void 0,t);return t.appendChild(n),n}let u=l();if(r&&Y(e),t&&X(u,e,{pane:n,solo:r}),r&&d&&d.defaultView&&d.defaultView.history){let t=d.defaultView.history.state||{},r=n?{paneName:n.name}:{};n&&n.subject&&typeof n.subject.uri==`string`&&(r.paneUri=n.subject.uri);let i={...t,...r};try{let n=new URL(document.location.href),r=new URL(e.uri,document.location.href);n.origin===r.origin&&(document.location.href===e.uri?JSON.stringify(t)!==JSON.stringify(i)&&d.defaultView.history.replaceState(i,e.uri,e.uri):d.defaultView.history.pushState(i,e.uri,e.uri))}catch{}}return e};let $=t.propertyViews(d);function ne(t){let r;if(t.termType===`Literal`){if(r=d.createElement(`span`),r.classList.add(`objectValue`,`objectValue--literal`),r.textContent=t.value,t.datatype&&t.datatype.uri){let e=s.ns.xsd(``).uri;t.datatype.uri.slice(0,e.length)===e&&r.classList.add(`objectValue--`+t.datatype.uri.slice(e.length))}}else if(t.termType===`NamedNode`||t.termType===`BlankNode`){if(r=d.createElement(`span`),r.classList.add(`objectValue`,`objectValue--resource`),r.setAttribute(`about`,t.toNT()),p.appendAccessIcons(h,r,t),t.termType===`NamedNode`){if(t.uri.slice(0,4)===`tel:`){let e=t.uri.slice(4),i=d.createElement(`a`);r.appendChild(d.createTextNode(e)),i.setAttribute(`href`,t.uri),i.appendChild(s.utils.AJARImage(n.outlineIcons.src.icon_telephone,`phone`,`phone `+e,d)),r.appendChild(i),i.firstChild.setAttribute(`class`,`phoneIcon`),i.firstChild.classList.add(`objectValueLinkIcon`)}else{r.appendChild(d.createTextNode(s.utils.label(t)));let e=s.widgets.linkIcon(d,t);e.firstChild&&e.firstChild.classList.add(`objectValueLinkIcon`),r.appendChild(e),s.widgets.makeDraggable(r,t)}}else r.appendChild(d.createTextNode(s.utils.label(t)))}else if(t.termType===`Collection`){r=d.createElement(`table`),r.classList.add(`tableFullWidth`),r.setAttribute(`about`,t.toNT());for(let e=0;e<t.elements.length;e++){let n=t.elements[e],i=r.appendChild(d.createElement(`tr`)),a=i.appendChild(d.createElement(`td`));a.classList.add(`obj`),a.setAttribute(`notSelectable`,`false`),a.setAttribute(`about`,t.toNT()),a.innerHTML=e+1+`)`,i.appendChild(p.outlineObjectTD(n))}}else t.termType===`Graph`?(r=l.byName(`dataContentPane`).statementsAsTables(t.statements,e),r.setAttribute(`class`,`nestedFormula`)):(s.log.error(`Object `+t+` has unknown term type: `+t.termType),r=d.createTextNode(`[unknownTermType:`+t.termType+`]`));return s.log.debug(`contents: `+r.innerHTML),r}return this.createTabURI=function(){d.getElementById(`UserURI`).value=d.URL+`?uri=`+d.getElementById(`UserURI`).value},this.UserInput.setSelected=z,this.UserInput.deselectAll=B,this.UserInput.views=$,this.outlineExpand=X,this}exports.default=d;
1
+ (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.obj{vertical-align:top;border:none;margin:.2em;padding:0 0 5px}.iconTD{vertical-align:top;border:none;width:0;margin:.2em;padding:0}.labelTD{width:100%}.file-explorer-header{flex-wrap:wrap;justify-content:flex-start;align-items:center;display:flex}.strongHeader{margin:0 .6rem 0 0;padding:.1rem .4rem;font-size:150%}.tableFullWidth{width:100%;background:var(--color-background,#f8f9fb)!important}.placeholderTable{width:100%}.tdFlex{vertical-align:top;border-radius:5px;flex-direction:row;justify-content:space-between;display:flex;overflow:hidden}.paneDiv,.exceptionPane{box-sizing:border-box;width:100%;min-width:0;max-width:100%;display:block;overflow-x:hidden}.objectValue--literal{white-space:pre-wrap}.objectValue--integer,.objectValue--decimal,.objectValue--double{text-align:right;display:block}.objectValueAccessIcon,.objectValueLinkIcon,.phoneIcon{vertical-align:middle;display:inline-block}.objectValueLinkIcon,.phoneIcon{width:12px;height:12px}@media (width<=600px){.obj,.iconTD{vertical-align:top;font-size:100%;margin:0!important}}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();const e=require("../_virtual/_rolldown/runtime.cjs.js");;const t=require("./propertyViews.cjs.js"),n=require("./outlineIcons.cjs.js"),r=require("./userInput.cjs.js"),i=require("./queryByExample.cjs.js"),a=require("../utils/webIdUtils.cjs.js"),o=require("../utils/podUtils.cjs.js"),s=require("../navigation/chrome.cjs.js"),c=require("../navigation/podContext.cjs.js"),l=require("../navigation/state.cjs.js"),u=require("../navigation/events.cjs.js"),d=require("../navigation/options.cjs.js"),f=require("../navigation/navbarVisibility.cjs.js");require("../components/file-explorer-header/index.cjs.js");let p=require("solid-ui");p=e.__toESM(p);let m=require("solid-logic"),h=require("pane-registry");h=e.__toESM(h);let g=require("rdflib");g=e.__toESM(g);function _(e){let _=e.dom;this.document=e.dom,this.context=e,this.outlineIcons=n.outlineIcons,this.labeller=this.labeller||{},this.labeller.LanguagePreference=``;let v=this,y=this,b=[];this.selection=b,this.ancestor=p.utils.ancestor,this.sparql=g.UpdateManager,this.kb=m.store;let x=m.store,S=m.store.fetcher;_.outline=this,this.qs=new i.QuerySource,this.UserInput=new r.UserInput(this),this.clipboardAddress=`tabulator:clipboard`,this.UserInput.clipboardInit(this.clipboardAddress);let C=this.outlineElement;this.init=function(){let e=E();e.outline=this},this.getLayoutMode=function(){let e=this.context?.environment?.layout;if(e===`mobile`||e===`desktop`)return e;if(typeof window<`u`&&window.matchMedia){let e=Math.round(Math.min(window.innerWidth,window.visualViewport?.width||window.innerWidth)),t=window.matchMedia(`(pointer: coarse)`).matches||navigator.maxTouchPoints>0;return e<=768||t&&e<=1024?`mobile`:`desktop`}return`desktop`},w.lastkbsize=0;function w(e){let t=[];for(let e=arguments.length-1;e>0;e--)t[e-1]=arguments[e];let n=new Date().getTime(),r=e.apply(e,t),i=new Date().getTime();return p.log.info(`BENCHMARK: kb delta: `+(x.statements.length-w.lastkbsize)+`, time elapsed for `+e+` was `+(i-n)+`ms`),w.lastkbsize=x.statements.length,r}function T(e,t,r){let i=p.utils.AJARImage(n.outlineIcons.src.icon_remove_node,`remove`,void 0,_);return i.addEventListener(`click`,ae),i.node=r,i.setAttribute(`about`,t.toNT()),i.style.marginLeft=`5px`,i.style.marginRight=`10px`,e.appendChild(i),i}this.appendAccessIcons=function(e,t,n){if(n.termType!==`NamedNode`)return;let r=e.uris(n);r.sort();let i=null;for(let e=0;e<r.length;e++)r[e]!==i&&(i=r[e],y.appendAccessIcon(t,i))},this.appendAccessIcon=function(e,t){if(!t)return``;let r=g.uri.docpart(t);if(r.slice(0,5)!==`http:`)return``;let i=S.getState(r),a,o,s;switch(i){case`unrequested`:a=n.outlineIcons.src.icon_unrequested,o=`fetch`,s=ie;break;case`requested`:a=n.outlineIcons.src.icon_requested,o=`fetching`,s=G;break;case`fetched`:a=n.outlineIcons.src.icon_fetched,s=K,o=`loaded`;break;case`failed`:a=n.outlineIcons.src.icon_failed,o=`failed`,s=G;break;case`unpermitted`:a=n.outlineIcons.src.icon_failed,s=G,o=`no perm`;break;case`unfetchable`:a=n.outlineIcons.src.icon_failed,s=G,o=`cannot fetch`;break;default:p.log.error(`?? state = `+i)}let c=p.utils.AJARImage(a,o,n.outlineIcons.tooltips[a].replace(/[Tt]his resource/,r),_);return c.classList.add(`objectValueAccessIcon`),c.setAttribute(`uri`,t),c.addEventListener(`click`,s),I(c,r),e.appendChild(c),c},this.outlineObjectTD=function(e,t,n,r){let i=_.createElement(`td`);return i.classList.add(`obj`),i.setAttribute(`notSelectable`,`false`),e?((e.termType===`NamedNode`||e.termType===`BlankNode`||e.termType===`Literal`&&e.value.slice&&(e.value.slice(0,6)===`ftp://`||e.value.slice(0,8)===`https://`||e.value.slice(0,7)===`http://`))&&(i.setAttribute(`about`,e.toNT()),i.appendChild(p.utils.AJARImage(p.icons.originalIconBase+`tbl-expand-trans.png`,`expand`,void 0,_)).addEventListener(`click`,U)),i.setAttribute(`class`,`obj`),x.whether(e,p.ns.rdf(`type`),p.ns.link(`Request`))&&(i.className=`undetermined`),t||=le,i.appendChild(t(e)),n&&T(i,e,n),i.tabulatorSelect=function(){V(this,!0)},i.tabulatorDeselect=function(){V(this,!1)},i.addEventListener(`click`,q),i):(i.textContent=`No object available.`,i)},this.outlinePredicateTD=function(e,t,r,i){let a=_.createElement(`TD`);a.setAttribute(`about`,e.toNT()),a.setAttribute(`class`,i?`pred internal`:`pred`);let o;switch(e.termType){case`BlankNode`:a.className=`undetermined`;break;case`NamedNode`:o=p.utils.predicateLabelForXML(e,r);break;case`Collection`:o=p.utils.predicateLabelForXML(e.elements[0],r)}o=o?o.slice(0,1).toUpperCase()+o.slice(1):`...`;let s=_.createElement(`TD`);s.classList.add(`labelTD`),s.setAttribute(`notSelectable`,`true`),s.appendChild(_.createTextNode(o)),a.appendChild(s),s.style.width=`100%`,a.appendChild(F.construct(_));for(let e in n.outlineIcons.termWidgets){if(!t||!t.AJAR_statement)break;n.outlineIcons.termWidgets[e].filter&&n.outlineIcons.termWidgets[e].filter(t.AJAR_statement,`pred`,r)&&F.addIcon(a,n.outlineIcons.termWidgets[e])}return a.tabulatorSelect=function(){V(this,!0)},a.tabulatorDeselect=function(){V(this,!1)},a.addEventListener(`click`,q),a};function E(){return ee(`OutlineView`,`Resource browser`)}function D(e){f.refreshNavbarVisibility(e.uri).catch(e=>p.log.error(`Failed to update navbar visibility: `+e))}function ee(e){if(document.getElementById(`MainContent`)||document.body,e===`OutlineView`){let e=document.getElementById(`OutlineView`);if(e)return e;let t=document.getElementById(`MainContent`)||document.body;if(t){let e=document.createElement(`table`);return e.id=`OutlineView`,e.classList.add(`outline-view`),e.setAttribute(`aria-label`,`Resource browser`),t.appendChild(e),e}}}async function te(e,t){e.uri.endsWith(`/`)&&await o.loadContainerRepresentation(e);let n=t.session.paneRegistry,r=n.list.filter(n=>n.label(e,t)&&!n.global&&n.name!==`sharing`);if(r.length===0)return[n.byName(`internal`)];let i=await p.login.filterAvailablePanes(r);return i.length===0?[r[0]]:n.list.indexOf(r[0])<n.list.indexOf(i[0])?[r[0]].concat(i):i}function ne(e,t){return e.find(e=>e.shouldGetFocus&&e.shouldGetFocus(t))||e[0]}function re(e){let t=_.getElementById(`queryButton`);t&&(e?t.removeAttribute(`style`):t.setAttribute(`style`,`display:none;`))}function O(t,n,r,i){if(!t||!r)return;let a;try{p.log.info(`outline: Rendering pane (menu): `+r.name),a=r.render(n,e,i)}catch(e){a=_.createElement(`div`),a.setAttribute(`class`,`exceptionPane`);let t=_.createElement(`pre`);a.appendChild(t),t.appendChild(_.createTextNode(p.utils.stackString(e)))}a.classList.add(`paneDiv`);let o=t.querySelector(`.paneDiv`);o?o.replaceWith(a):t.appendChild(a)}function k(e,t){let n=_.getElementById(`OutlineView`);if(!n)return;let r=e.toNT(),i=n.querySelector(`td.paneView[about="`+r+`"]`);if(!i)return;let a=i.querySelector(`file-explorer-provider`);a&&(t?(re(!!t.requireQueryButton),a.openSelectedPane?.(t),O(a,e,t,a.paneRenderOptions)):p.log.warn(`outline: Unable to open pane in place: pane is undefined.`))}async function A(t,n,r){r||={};let i=_.createElement(`tr`);r.hover&&i.classList.add(`hoverControl`);let o=i.appendChild(_.createElement(`td`));o.classList.add(`paneView`,`tdFlex`),o.setAttribute(`notSelectable`,`true`),o.setAttribute(`about`,t.toNT()),o.setAttribute(`colspan`,`2`);let l=o.appendChild(_.createElement(`file-explorer-provider`));l.context=e,l.subjectUri=t.uri,l.onBack=()=>W({target:l});let u=r.hideList?[]:await te(t,e);l.relevantPanes=u,l.pane=n||ne(u,t);let d=!!(t&&t.uri&&t.site&&t.site().uri===t.uri),f=!!r.headerOnlyInViewerPod;return l.showHeader=s.deriveExplorerHeader({isRootResource:d,isWebId:a.isWebIdUri(t),viewerPodOnly:f,inViewerPod:!f||await c.isPageInViewerPod(document.location.href)}),l.paneRenderOptions=r,l.soloPane=r.solo,l.openPane=(e,t)=>k(e,h.byName(t)),l.handleAccessClick=()=>k(t,h.byName(`sharing`)),l.pane&&(i.classList.add(`outlinePaneRow`),O(l,t,l.pane,r)),i}function j(e){let t=e.parentNode,n=t.parentNode,r=_.createElement(`table`);r.classList.add(`placeholderTable`),n.replaceChild(r,t),t.removeChild(e),n.replaceChild(t,r)}let M=this.propertyTable=function(e,t,n,r){return p.log.debug(`Property table for: `+e),e=x.canon(e),t?(p.log.info(`Re-expand: `+t),t):(t=_.createElement(`table`),t.classList.add(`tableFullWidth`),A(e,n,r).then(e=>{t.appendChild(e)}),t)};function N(e,t,n){let r=e.createElement(`TR`);r.AJAR_statement=t,r.AJAR_inverse=n,r.setAttribute(`predTR`,`true`);let i=y.outlinePredicateTD(t.predicate,r,n);return r.appendChild(i),r}this.propertyTR=N;function P(e,t,n,r){if(p.log.debug(`Property list length = `+t.length),t.length===0)return``;let i,a,o;n?(i=function(e){return e.subject},t=t.sort(p.utils.RDFComparePredicateSubject)):(i=function(e){return e.object},t=t.sort(p.utils.RDFComparePredicateObject));let s=t.length;for(a=0;a<s;a++){let c=t[a];if(r&&!r(c.predicate,n))continue;let l=N(_,c,n);e.appendChild(l);let u=l.firstChild,d=$.defaults[c.predicate.uri],f=0,m=0,h=0;for(o=0;o+a<s&&t[a+o].predicate.sameTerm(c.predicate);o++)o>0&&i(t[a+o]).sameTerm(i(t[a+o-1]))&&f++,i(t[a+o]).lang&&v.labeller.LanguagePreference&&(m+=1,i(t[a+o]).lang.indexOf(v.labeller.LanguagePreference)>=0&&h++);if(h>0&&m===f+1){for(let e=a;e<=a+f;e++)if(v.labeller.LanguagePreference&&i(t[e]).lang.indexOf(v.labeller.LanguagePreference)>=0){l.appendChild(y.outlineObjectTD(i(t[e]),d,void 0,c));break}a+=f}else l.appendChild(y.outlineObjectTD(i(c),d,void 0,c)),l.showNobj=function(r){let s=o-f,l=2*r<s?r:s,m=[];if(s!==1){u.setAttribute(`rowspan`,l===s?s:r+1);let f;l<s&&l===1&&u.setAttribute(`rowspan`,2);let h=0;for(f=1;f<o;f++)if(x.canon(i(t[a+f])).sameTerm(x.canon(i(t[a+f-1]))))p.log.info(`there are duplicates here: %s`,t[a+f-1]);else{h++,c=t[a+f],d=$.defaults[c.predicate.uri];let r=_.createElement(`tr`);r.style.colspan=`1`,r.appendChild(y.outlineObjectTD(i(t[a+f]),d,void 0,c)),r.AJAR_statement=c,r.AJAR_inverse=n,e.appendChild(r),h>=l&&(r.style.display=`none`,m.push(r))}l===s&&u.setAttribute(`rowspan`,h+1)}if(l<s){let t=_.createElement(`tr`),n=t.appendChild(_.createElement(`td`));if(n.classList.add(`obj`),n.setAttribute(`notSelectable`,`false`),s>r){let e=_.createElement(`a`);n.appendChild(e);let t=(function(e){return e(u,o,f,r)})(function(t,n,r,i){return function(n){e.innerHTML=``,n===`none`?(e.appendChild(p.utils.AJARImage(p.icons.originalIconBase+`tbl-more-trans.png`,`more`,`See all`,_)),e.appendChild(_.createTextNode(s-i+` more...`)),t.setAttribute(`rowspan`,i+1)):(e.appendChild(p.utils.AJARImage(p.icons.originalIconBase+`tbl-shrink.png`,`(less)`,void 0,_)),t.setAttribute(`rowspan`,s+1));for(let e=0;e<m.length;e++){let t=m[e];t.style.display=n}}}),i=`none`,a=function(e){return t(i),i=i===`none`?``:`none`,e&&e.stopPropagation(),!1};a(),e.addEventListener(`click`,a,!1)}e.appendChild(t)}},l.showAllobj=function(){l.showNobj(o-f)},l.showNobj(10),a+=o-1}}this.appendPropertyTRs=P;let F={};globalThis.termWidget=F,F.construct=function(e){e||=document;let t=e.createElement(`TD`);return t.setAttribute(`class`,`iconTD`),t.setAttribute(`notSelectable`,`true`),t},F.addIcon=function(e,t,n){let r=e.childNodes[1];if(!r)return;let i=p.utils.AJARImage(t.src,t.alt,t.tooltip,_);r.appendChild(i),n&&i.addEventListener(`click`,n)},F.removeIcon=function(e,t){let n=e.childNodes[1],r;if(n)for(let e=0;e<n.childNodes.length;e++){let i=n.childNodes[e],a=i.src;try{r=_.location.href.split(`?`)[0]}catch{r=``}a===g.uri.join(t.src,r)&&n.removeChild(i)}},F.replaceIcon=function(e,t,n,r){F.removeIcon(e,t),F.addIcon(e,n,r)};function I(e,t){p.log.debug(`Button callbacks for `+t+` added`);let r=function(r){return function(i){return i.indexOf(`#`),!e||!v.ancestor(e,`DIV`)?!1:(i===t&&(e.src=r,e.title=n.outlineIcons.tooltips[r]),!0)}};S.addCallback(`request`,r(n.outlineIcons.src.icon_requested)),S.addCallback(`done`,r(n.outlineIcons.src.icon_fetched)),S.addCallback(`fail`,r(n.outlineIcons.src.icon_failed))}function L(e){let t=e.getAttribute(`class`);return!!(t&&t.indexOf(`selected`)>=0)}function R(e){let t=y.targetOf(e).parentNode;F.replaceIcon(t.parentNode,n.outlineIcons.termWidgets.optOn,n.outlineIcons.termWidgets.optOff,z),t.parentNode.parentNode.removeAttribute(`optional`)}function z(e){let t=y.targetOf(e).parentNode;F.replaceIcon(t.parentNode,n.outlineIcons.termWidgets.optOff,n.outlineIcons.termWidgets.optOn,R),t.parentNode.parentNode.setAttribute(`optional`,`true`)}function B(e,t){let r=n.outlineIcons.termWidgets.optOn,i=n.outlineIcons.termWidgets.optOff;for(let n=e;n.parentNode;n=n.parentNode)for(;;)if(n.getAttribute(`predTR`)){let e=n.getAttribute(`parentOfSelected`);e=e?parseInt(e):0,e===0&&t>0&&F.addIcon(n.childNodes[0],n.getAttribute(`optional`)?r:i,n.getAttribute(`optional`)?R:z),e+=t,n.setAttribute(`parentOfSelected`,e),e===0&&(n.removeAttribute(`parentOfSelected`),F.removeIcon(n.childNodes[0],n.getAttribute(`optional`)?r:i));break}else if(n.previousSibling&&n.previousSibling.nodeName===`TR`)n=n.previousSibling;else break}this.statusBarClick=function(e){let t=p.utils.getTarget(e);t.label&&(window.content.location=t.label)},this.showURI=function(e){e&&_.getElementById(`UserURI`)&&(_.getElementById(`UserURI`).value=e.termType===`NamedNode`?e.uri:``)},this.showSource=function(){if(typeof sourceWidget<`u`){for(let e in sourceWidget.sources)sourceWidget.sources[e].setAttribute(`class`,``);for(let e=0;e<b.length;e++){if(!b[e].parentNode)continue;let t=b[e].parentNode.AJAR_statement;if(!t)continue;let n=t.why;n&&n.uri&&sourceWidget.highlight(n,!0)}}},this.getSelection=function(){return b};function V(e,t){if(e.nodeName!==`TD`)throw p.log.debug(`down`+e.nodeName),Error(`Expected TD in setSelected: `+e.nodeName+` : `+e.textContent);p.log.debug(`pass`);let r=e.getAttribute(`class`);if(r||=``,t){r+=` selected`,(r.indexOf(`pred`)>=0||r.indexOf(`obj`)>=0)&&B(e,1),b.push(e);let t=p.utils.getTerm(e);y.showURI(t);let i=e.AJAR_statement;if(i===void 0&&e.parentNode&&(i=e.parentNode.AJAR_statement),i){let t=i.why;m.store.updater.editable(t.uri,x)&&r.indexOf(`pred`)>=0&&F.addIcon(e,n.outlineIcons.termWidgets.addTri)}}else p.log.debug(`cla=$`+r+`$`),r===`selected`&&(r=``),r=r.replace(` selected`,``),(r.indexOf(`pred`)>=0||r.indexOf(`obj`)>=0)&&B(e,-1),r.indexOf(`pred`)>=0&&F.removeIcon(e,n.outlineIcons.termWidgets.addTri),b=b.filter(function(t){return t===e}),p.log.info(`Deselecting `+e.textContent);typeof sourceWidget<`u`&&y.showSource(),e.setAttribute(`class`,r)}function H(){let e=b.length;for(let t=e-1;t>=0;t--)V(b[t],!1);b=[]}this.targetOf=function(e){let t;if(e||=window.event,e.target)t=e.target;else if(e.srcElement)t=e.srcElement;else return p.log.error(`can't get target for event `+e),!1;return t.nodeType===3&&(t=t.parentNode),t},this.walk=function(e,t){let n=t||b[0],r;switch(e){case`down`:try{r=n.parentNode.nextSibling.lastChild}catch{this.walk(`up`);return}H(),V(r,!0);break;case`up`:try{r=n.parentNode.previousSibling.lastChild}catch{return}H(),V(r,!0);break;case`right`:if(H(),n.nextSibling||n.lastChild.tagName===`strong`)V(n.nextSibling,!0);else{let e=_.evaluate(`table/div/tr/td[2]`,n,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue;V(e,!0)}break;case`left`:if(H(),n.previousSibling&&n.previousSibling.className===`undetermined`)return V(n.previousSibling,!0),!0;V(p.utils.ancestor(n.parentNode,`TD`),!0);break;case`moveTo`:H(),V(t,!0)}(e===`down`||e===`up`)&&(r.tabulatorSelect||this.walk(e))},this.OutlinerKeypressPanel=function(e){p.log.info(`Key `+e.keyCode+` pressed`);function t(e){e&&_.getElementById(`UserURI`)&&(_.getElementById(`UserURI`).value=e.termType===`NamedNode`?e.uri:``)}function n(e){return arguments[3]||(o(`right`,a),t(p.utils.getAbout(x,b[0]))),!0}let r,i;if(p.utils.getTarget(e).tagName===`TEXTAREA`||p.utils.getTarget(e).id===`UserURI`||b.length>1)return;if(b.length===0){(e.keyCode===13||e.keyCode===38||e.keyCode===40||e.keyCode===37||e.keyCode===39)&&(this.walk(`right`,y.focusTd),t(p.utils.getAbout(x,b[0])));return}let a=b[0];switch(S.removeCallback(`done`,`setSelectedAfterward`),S.removeCallback(`fail`,`setSelectedAfterward`),e.keyCode){case 13:if(p.utils.getTarget(e).tagName===`HTML`){let e=p.utils.getAbout(x,a);r=a.parentNode.AJAR_statement.why,i=m.store.updater.editable(r.uri,x),e?v.GotoSubject(e,!0):i&&y.UserInput.Enter(a)}else this.UserInput.Keypress(e),this.walk(`down`),e.stopPropagation();return;case 38:this.walk(`up`),e.stopPropagation(),e.preventDefault();break;case 40:this.walk(`down`),e.stopPropagation(),e.preventDefault()}if(p.utils.getTarget(e).tagName===`INPUT`)return;let o;switch(e.keyCode){case 46:case 8:r=a.parentNode.AJAR_statement.why,i=m.store.updater.editable(r.uri,x),i&&(e.preventDefault(),this.UserInput.Delete(a));break;case 37:{if(this.walk(`left`))return;let e=p.utils.ancestor(a.parentNode,`TD`);X(a,p.utils.getAbout(x,e));break}case 39:{let e=p.utils.getAbout(x,a);if(e){if(o=this.walk,a.nextSibling){this.walk(`right`);return}a.firstChild.tagName!==`TABLE`&&(S.addCallback(`done`,n),S.addCallback(`fail`,n),Y(a,e,{pane:h.byName(`defaultPane`)})),n()}}break;case 38:case 40:break;default:switch(e.charCode){case 99:if(e.ctrlKey){y.UserInput.copyToClipboard(y.clipboardAddress,a);break}break;case 118:case 112:if(e.ctrlKey){y.UserInput.pasteFromClipboard(y.clipboardAddress,a);break}break;default:p.utils.getTarget(e).tagName}}t(p.utils.getAbout(x,b[0]))},this.OutlinerMouseclickPanel=function(e){switch(y.UserInput._tabulatorMode){case 0:oe(e);break;case 1:y.UserInput.Click(e)}};function U(e){let t=y.targetOf(e),n=t.parentNode,r=p.utils.getAbout(x,t),i=e.altKey?h.byName(`internal`):void 0;e.shiftKey?Z(n,r,i):e.altKey?Y(n,r,{pane:h.byName(`internal`),immediate:!0}):Y(n,r)}function W(e){let t=y.targetOf(e),n=p.utils.getAbout(x,t),r=e.altKey?h.byName(`internal`):void 0,i=t.parentNode.parentNode;X(i,n,r)}function G(e){let t=y.targetOf(e).getAttribute(`uri`);e.altKey?S.fetch(g.uri.docpart(t),{force:!0}):S.refresh(x.sym(g.uri.docpart(t)))}function K(e){let t=y.targetOf(e).getAttribute(`uri`);e.altKey?S.fetch(g.uri.docpart(t),{force:!0}):S.refresh(x.sym(g.uri.docpart(t)))}function ie(e){let t=y.targetOf(e).getAttribute(`uri`);S.fetch(g.uri.docpart(t))}function ae(e){let t=y.targetOf(e),n=t.node;n.childNodes.length>1&&(n=t.parentNode),j(n)}function q(e){if(y.UserInput._tabulatorMode)return y.UserInput.Click(e);let t=y.targetOf(e),n;for(n=p.utils.ancestor(t,`TD`);n&&n.getAttribute(`notSelectable`)!==`false`;n=p.utils.ancestor(n.parentNode,`TD`));if(!n)return;let r=L(n);if(p.log.debug(`Was node selected before: `+r),e.altKey)V(n,!L(n));else if(e.shiftKey)V(n,!0);else{if(H(),y.UserInput.clearInputAndSave(e),V(n,!0),e.detail===2){e.stopPropagation();return}let t;if(n.parentNode&&(t=n.parentNode.AJAR_statement),!t)return;let i=t.why,a=m.store.updater.editable(i.uri,x);r&&a&&y.UserInput.Click(e,b[0])}p.log.debug(`Was node selected after: `+L(n)+`, count=`+b.length),e.stopPropagation()}function oe(e){p.log.info(`@TabulatorMousedown, dom.location is now `+_.location);let t=y.targetOf(e);if(!t)return;let r=t.tagName;r!==`INPUT`&&r!==`TEXTAREA`&&(y.UserInput.clearMenu(),y.UserInput.lastModified&&y.UserInput.lastModified.parentNode.nextSibling&&y.UserInput.backOut(),(!t.src||t.src.slice(t.src.indexOf(`/icons/`)+1)!==n.outlineIcons.src.icon_show_choices&&t.src.slice(t.src.indexOf(`/icons/`)+1)!==n.outlineIcons.src.icon_add_triple)&&y.UserInput.clearInputAndSave(e),(!t.src||t.src.slice(t.src.indexOf(`/icons/`)+1)!==n.outlineIcons.src.icon_show_choices)&&y.UserInput.clearMenu(),e&&e.stopPropagation())}function J(e){_.title=p.utils.label(e),_.location.href.startsWith(e.site().uri)}function Y(e,t,n){n||={};let r=n.pane,i=!!n.already,a=n.immediate;p.log.info(`@outlineExpand, dom is now `+_.location),S.removeCallback(`done`,`expand`),S.removeCallback(`fail`,`expand`);let o=x.canon(t);function s(){if(o=x.canon(o),!e||!e.parentNode||!e.parentNode.parentNode)return!1;let t;if(p.log.info(`@@ REPAINTING `),!i)t=M(o,void 0,r,n);else{for(p.log.info(` ... p is `+e),t=e.firstChild;t.nextSibling&&(p.log.info(` ... checking node `+t),t.nodeName!==`table`);t=t.nextSibling);t=M(o,t,r,n)}i=!0,p.utils.ancestor(e,`TABLE`)&&p.utils.ancestor(e,`TABLE`).style.backgroundColor===`white`?t.style.backgroundColor=`#eee`:t.style.backgroundColor=`white`,p.utils.emptyNode(e).appendChild(t),y.focusTd=e,p.log.debug(`expand: Node for `+o+` expanded`);let a=x.each(o,p.ns.rdfs(`seeAlso`));for(let e=0;e<a.length;e++)e===25&&p.log.warn(`expand: Warning: many (`+a.length+`) seeAlso links for `+o),S.lookUpThing(a[e],o)}function c(e){if(arguments[3])return!0;let t=x.canon(o);p.log.info(`@@ expand: relevant subject=`+t+`, uri=`+e+`, already=`+i);let n=x.sym(g.uri.docpart(e));if(e.indexOf(`#`)>=0)throw Error(`Internal error: hash in `+e);return!function(){if(!t.uri)return!0;let r=x.uris(t);if(!r)return!1;for(let t=0;t<r.length;t++)for(let n=g.uri.docpart(r[t]);n;n=x.HTTPRedirects[n])if(e===n)return!0;return!!x.anyStatementMatching(t,void 0,void 0,n)}()||(p.log.success(`@@ expand OK: relevant subject=`+t+`, uri=`+e+`, source=`+i),s(),!1)}n.solo&&J(o),p.log.debug(`outlineExpand: dereferencing `+o);let l=_.createElement(`span`);e.appendChild(l),S.addCallback(`done`,c),S.addCallback(`fail`,c);let u=[];if(o.uri&&o.uri.split(`:`)[0]===`rdf`)s();else{for(let e=0;e<u.length;e++){let t;if(t===u[e](o)){s(),p.log.debug(`outline 1815`),t[1]&&C.removeChild(C.lastChild);return}}if(o.uri&&!a&&!p.widgets.isAudio(o)&&!p.widgets.isVideo(o)){let t=o.doc()&&o.doc().uri?o.doc().uri:``+o.doc(),r=function(e){let t=!!(o&&o.uri&&o.site&&o.site().uri===o.uri);return e===403?t?`This root resource is not accessible with your current permissions. Try logging in with an authorized account or opening a public profile document.`:`This resource is not accessible with your current permissions.`:t?`This root resource is not publicly readable. Try logging in or opening a profile document.`:`This resource is not publicly readable. Try logging in or opening a different public resource.`},i=function(e,t){let n=typeof e==`string`?e:String(e||``),r=t?.status||t?.response?.status;return r===401||r===403?r:n.includes(`status: 403`)||n.includes(`status 403`)?403:n.includes(`status: 401`)||n.includes(`status 401`)?401:null},a=function(n,a){if(e.querySelector&&t&&e.querySelector(`[data-outline-error-for="`+t+`"]`))return;let o=i(n,a),s=o?r(o):n,c=p.widgets.errorMessageBlock(_,s,`#fee`,a instanceof Error?a:void 0);t&&c.setAttribute(`data-outline-error-for`,t),e.appendChild(c)},c=!1,l=S.nowOrWhenFetched(o.doc(),void 0,function(e,t){e?(S.lookUpThing(o),s(),n.solo&&J(o)):(c=!0,a(t,void 0))});l&&typeof l.catch==`function`&&l.catch(function(e){c||(c=!0,a(e,e))})}else s()}}function X(e,t){let n=p.utils.ancestor(e,`TR`);n=p.utils.ancestor(n.parentNode,`TR`);let r;n&&(r=n.AJAR_statement);let i;for(i=e.parentNode;i.tagName!==`TD`;i=i.parentNode)if(i===void 0){alert(`Not enclosed in TD!`);return}p.log.debug(`Collapsing subject `+t);let a;r&&(p.log.debug(`looking up pred `+r.predicate.uri+`in defaults`),a=$.defaults[r.predicate.uri]),p.log.debug(`view= `+a);let o;i.parentNode.parentNode.id===`outline`&&(o=i.parentNode),y.replaceTD(y.outlineObjectTD(t,a,o,r),i)}this.replaceTD=function(e,t){let n;L(t)&&(n=!0);for(let e=b.length-1;e>-1;e--)for(let n=b[e];n.parentNode;n=n.parentNode)n===t&&V(b[e],!1);t.parentNode.replaceChild(e,t),n&&V(e,!0)};function Z(e,t){let n=null;for(let t=e.parentNode;t;t=t.parentNode)p.log.debug(`level `+t.tagName),t.tagName===`TD`&&(n=t);p.utils.emptyNode(n).appendChild(M(t)),J(t),n.setAttribute(`about`,t.toNT())}v.outlineRefocus=Z,this.GotoFormURI_enterKey=function(e){e.keyCode===13&&v.GotoFormURI(e)},this.GotoFormURI=function(e){se(_.getElementById(`UserURI`).value)};function se(e){let t=x.sym(e);this.GotoSubject(t,!0)}let Q=0;function ce(e,t,n){let r=++Q,i=t.uri,a=n.uri.split(`#`)[0];if(!i.endsWith(`/`)||!a.startsWith(i)||a===i)return;let o=[],s=a.slice(i.length).split(`/`),c=i;s.forEach((e,t)=>{e&&(c+=t<s.length-1?e+`/`:e,o.push(c))});let l=t=>Array.from(e.querySelectorAll(`td.obj[about]`)).find(e=>e.getAttribute(`about`)===x.sym(t).toNT()),u=t=>new Promise(n=>{let i=l(t);if(i)return n(i);let a=setTimeout(()=>{o.disconnect(),n(null)},1e4),o=new MutationObserver(()=>{let e=l(t);(e||r!==Q)&&(clearTimeout(a),o.disconnect(),n(e))});o.observe(e,{childList:!0,subtree:!0})});(async()=>{for(let e of o){let t=await u(e);if(!t||r!==Q)return;(!t.firstChild||t.firstChild.nodeName!==`TABLE`)&&Y(t,x.sym(e)),e===o[o.length-1]&&typeof t.scrollIntoView==`function`&&t.scrollIntoView({block:`nearest`})}})().catch(e=>p.log.warn(`outline: could not open `+n.uri+` inside `+i+`: `+e))}this.GotoURIinit=function(e){let t=x.sym(e);this.GotoSubject(t)},this.GotoSubject=function(e,t,n,r,i,a,o){let s=d.resolveSource(o)!==`accountMenu`,c=E();s&&(!a||a===c)&&D(e),a||=c,r&&(p.utils.emptyNode(a),a.style.width=`100%`);let f=n&&n.subject&&n.subject.uri?n.subject:e;function m(){let e=_.createElement(`tr`);e.classList.add(`outlineRow1`),e.style.verticalAlign=`top`,a.appendChild(e);let t=y.outlineObjectTD(f,void 0,e);return e.appendChild(t),t}let h=m();if(r&&J(f),t&&(Y(h,f,{pane:n,solo:r,headerOnlyInViewerPod:!s||!!(n&&n.subject&&n.subject.uri)}),r&&f!==e&&ce(a,f,e)),r&&_&&_.defaultView&&_.defaultView.history){let t=_.defaultView.history.state||{},r=document.location.href!==e.uri,i=l.nextHistoryState(t,{pane:n?{name:n.name,subject:n.subject&&typeof n.subject.uri==`string`?n.subject.uri:void 0}:void 0,leavingPage:r,viaAccountMenu:!s});try{let n=new URL(document.location.href),a=new URL(e.uri,document.location.href);n.origin===a.origin&&(r?_.defaultView.history.pushState(i,e.uri,e.uri):JSON.stringify(t)!==JSON.stringify(i)&&_.defaultView.history.replaceState(i,e.uri,e.uri))}catch{}}return r&&u.announceNavigation(_),e};let $=t.propertyViews(_);function le(t){let r;if(t.termType===`Literal`){if(r=_.createElement(`span`),r.classList.add(`objectValue`,`objectValue--literal`),r.textContent=t.value,t.datatype&&t.datatype.uri){let e=p.ns.xsd(``).uri;t.datatype.uri.slice(0,e.length)===e&&r.classList.add(`objectValue--`+t.datatype.uri.slice(e.length))}}else if(t.termType===`NamedNode`||t.termType===`BlankNode`){if(r=_.createElement(`span`),r.classList.add(`objectValue`,`objectValue--resource`),r.setAttribute(`about`,t.toNT()),y.appendAccessIcons(x,r,t),t.termType===`NamedNode`){if(t.uri.slice(0,4)===`tel:`){let e=t.uri.slice(4),i=_.createElement(`a`);r.appendChild(_.createTextNode(e)),i.setAttribute(`href`,t.uri),i.appendChild(p.utils.AJARImage(n.outlineIcons.src.icon_telephone,`phone`,`phone `+e,_)),r.appendChild(i),i.firstChild.setAttribute(`class`,`phoneIcon`),i.firstChild.classList.add(`objectValueLinkIcon`)}else{r.appendChild(_.createTextNode(p.utils.label(t)));let e=p.widgets.linkIcon(_,t);e.firstChild&&e.firstChild.classList.add(`objectValueLinkIcon`),r.appendChild(e),p.widgets.makeDraggable(r,t)}}else r.appendChild(_.createTextNode(p.utils.label(t)))}else if(t.termType===`Collection`){r=_.createElement(`table`),r.classList.add(`tableFullWidth`),r.setAttribute(`about`,t.toNT());for(let e=0;e<t.elements.length;e++){let n=t.elements[e],i=r.appendChild(_.createElement(`tr`)),a=i.appendChild(_.createElement(`td`));a.classList.add(`obj`),a.setAttribute(`notSelectable`,`false`),a.setAttribute(`about`,t.toNT()),a.innerHTML=e+1+`)`,i.appendChild(y.outlineObjectTD(n))}}else t.termType===`Graph`?(r=h.byName(`dataContentPane`).statementsAsTables(t.statements,e),r.setAttribute(`class`,`nestedFormula`)):(p.log.error(`Object `+t+` has unknown term type: `+t.termType),r=_.createTextNode(`[unknownTermType:`+t.termType+`]`));return p.log.debug(`contents: `+r.innerHTML),r}return this.createTabURI=function(){_.getElementById(`UserURI`).value=_.URL+`?uri=`+_.getElementById(`UserURI`).value},this.UserInput.setSelected=V,this.UserInput.deselectAll=H,this.UserInput.views=$,this.outlineExpand=Y,this}exports.default=_;
2
2
  //# sourceMappingURL=manager2.cjs.js.map