solid-panes 4.4.2-5 → 4.4.2-7

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 (156) hide show
  1. package/dist/RDFXMLPane2.cjs.js +1 -1
  2. package/dist/RDFXMLPane2.esm.js +1 -1
  3. package/dist/_virtual/~icons/lucide/arrow-left.cjs.js +2 -0
  4. package/dist/_virtual/~icons/lucide/arrow-left.cjs.js.map +1 -0
  5. package/dist/_virtual/~icons/lucide/arrow-left.esm.js +11 -0
  6. package/dist/_virtual/~icons/lucide/arrow-left.esm.js.map +1 -0
  7. package/dist/_virtual/~icons/lucide/ellipsis-vertical.cjs.js +2 -0
  8. package/dist/_virtual/~icons/lucide/ellipsis-vertical.cjs.js.map +1 -0
  9. package/dist/_virtual/~icons/lucide/ellipsis-vertical.esm.js +11 -0
  10. package/dist/_virtual/~icons/lucide/ellipsis-vertical.esm.js.map +1 -0
  11. package/dist/_virtual/~icons/lucide/globe.cjs.js +2 -0
  12. package/dist/_virtual/~icons/lucide/globe.cjs.js.map +1 -0
  13. package/dist/_virtual/~icons/lucide/globe.esm.js +11 -0
  14. package/dist/_virtual/~icons/lucide/globe.esm.js.map +1 -0
  15. package/dist/_virtual/~icons/lucide/lock-keyhole.cjs.js +2 -0
  16. package/dist/_virtual/~icons/lucide/lock-keyhole.cjs.js.map +1 -0
  17. package/dist/_virtual/~icons/lucide/lock-keyhole.esm.js +11 -0
  18. package/dist/_virtual/~icons/lucide/lock-keyhole.esm.js.map +1 -0
  19. package/dist/_virtual/~icons/lucide/pencil.cjs.js +2 -0
  20. package/dist/_virtual/~icons/lucide/pencil.cjs.js.map +1 -0
  21. package/dist/_virtual/~icons/lucide/pencil.esm.js +11 -0
  22. package/dist/_virtual/~icons/lucide/pencil.esm.js.map +1 -0
  23. package/dist/_virtual/~icons/lucide/share-2.cjs.js +2 -0
  24. package/dist/_virtual/~icons/lucide/share-2.cjs.js.map +1 -0
  25. package/dist/_virtual/~icons/lucide/share-2.esm.js +11 -0
  26. package/dist/_virtual/~icons/lucide/share-2.esm.js.map +1 -0
  27. package/dist/_virtual/~icons/lucide/trash-2.cjs.js +2 -0
  28. package/dist/_virtual/~icons/lucide/trash-2.cjs.js.map +1 -0
  29. package/dist/_virtual/~icons/lucide/trash-2.esm.js +11 -0
  30. package/dist/_virtual/~icons/lucide/trash-2.esm.js.map +1 -0
  31. package/dist/audio/audioPane.cjs.js +1 -1
  32. package/dist/audio/audioPane.cjs.js.map +1 -1
  33. package/dist/audio/audioPane.esm.js +13 -10
  34. package/dist/audio/audioPane.esm.js.map +1 -1
  35. package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js +14 -0
  36. package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js.map +1 -0
  37. package/dist/components/file-explorer-header/FileExplorerHeader.d.ts +19 -0
  38. package/dist/components/file-explorer-header/FileExplorerHeader.d.ts.map +1 -0
  39. package/dist/components/file-explorer-header/FileExplorerHeader.esm.js +292 -0
  40. package/dist/components/file-explorer-header/FileExplorerHeader.esm.js.map +1 -0
  41. package/dist/components/file-explorer-header/FileExplorerHeader.styles.cjs.js +2 -0
  42. package/dist/components/file-explorer-header/FileExplorerHeader.styles.cjs.js.map +1 -0
  43. package/dist/components/file-explorer-header/FileExplorerHeader.styles.esm.js +7 -0
  44. package/dist/components/file-explorer-header/FileExplorerHeader.styles.esm.js.map +1 -0
  45. package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js +22 -0
  46. package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js.map +1 -0
  47. package/dist/components/file-explorer-header/FileExplorerHeaderControls.d.ts +15 -0
  48. package/dist/components/file-explorer-header/FileExplorerHeaderControls.d.ts.map +1 -0
  49. package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js +266 -0
  50. package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js.map +1 -0
  51. package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.cjs.js +2 -0
  52. package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.cjs.js.map +1 -0
  53. package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.esm.js +7 -0
  54. package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.esm.js.map +1 -0
  55. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js +19 -0
  56. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js.map +1 -0
  57. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.d.ts +19 -0
  58. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.d.ts.map +1 -0
  59. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js +321 -0
  60. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js.map +1 -0
  61. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.cjs.js +2 -0
  62. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.cjs.js.map +1 -0
  63. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.esm.js +7 -0
  64. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.esm.js.map +1 -0
  65. package/dist/components/file-explorer-header/FileExplorerProvider.cjs.js +13 -0
  66. package/dist/components/file-explorer-header/FileExplorerProvider.cjs.js.map +1 -0
  67. package/dist/components/file-explorer-header/FileExplorerProvider.d.ts +36 -0
  68. package/dist/components/file-explorer-header/FileExplorerProvider.d.ts.map +1 -0
  69. package/dist/components/file-explorer-header/FileExplorerProvider.esm.js +468 -0
  70. package/dist/components/file-explorer-header/FileExplorerProvider.esm.js.map +1 -0
  71. package/dist/components/file-explorer-header/FileExplorerProvider.styles.cjs.js +2 -0
  72. package/dist/components/file-explorer-header/FileExplorerProvider.styles.cjs.js.map +1 -0
  73. package/dist/components/file-explorer-header/FileExplorerProvider.styles.esm.js +7 -0
  74. package/dist/components/file-explorer-header/FileExplorerProvider.styles.esm.js.map +1 -0
  75. package/dist/components/file-explorer-header/helper.cjs.js +2 -0
  76. package/dist/components/file-explorer-header/helper.cjs.js.map +1 -0
  77. package/dist/components/file-explorer-header/helper.d.ts +15 -0
  78. package/dist/components/file-explorer-header/helper.d.ts.map +1 -0
  79. package/dist/components/file-explorer-header/helper.esm.js +64 -0
  80. package/dist/components/file-explorer-header/helper.esm.js.map +1 -0
  81. package/dist/components/file-explorer-header/types.d.ts +2 -0
  82. package/dist/components/file-explorer-header/types.d.ts.map +1 -0
  83. package/dist/components/header/Header.cjs.js +1 -1
  84. package/dist/components/header/Header.cjs.js.map +1 -1
  85. package/dist/components/header/Header.esm.js +3 -3
  86. package/dist/components/navbar/Navbar.cjs.js +1 -1
  87. package/dist/components/navbar/Navbar.cjs.js.map +1 -1
  88. package/dist/components/navbar/Navbar.esm.js +3 -3
  89. package/dist/components/resource-actions-menu/DeleteResourceDialog.cjs.js +16 -0
  90. package/dist/components/resource-actions-menu/DeleteResourceDialog.cjs.js.map +1 -0
  91. package/dist/components/resource-actions-menu/DeleteResourceDialog.d.ts +8 -0
  92. package/dist/components/resource-actions-menu/DeleteResourceDialog.d.ts.map +1 -0
  93. package/dist/components/resource-actions-menu/DeleteResourceDialog.esm.js +215 -0
  94. package/dist/components/resource-actions-menu/DeleteResourceDialog.esm.js.map +1 -0
  95. package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js +18 -0
  96. package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js.map +1 -0
  97. package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts +16 -0
  98. package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts.map +1 -0
  99. package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js +260 -0
  100. package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js.map +1 -0
  101. package/dist/dashboard/basicPreferences.cjs.js +1 -1
  102. package/dist/dashboard/basicPreferences.cjs.js.map +1 -1
  103. package/dist/dashboard/dashboardPane.cjs.js +1 -1
  104. package/dist/dashboard/dashboardPane.cjs.js.map +1 -1
  105. package/dist/home/homePane.cjs.js +1 -1
  106. package/dist/home/homePane.cjs.js.map +1 -1
  107. package/dist/internal/internalPane2.cjs.js +1 -1
  108. package/dist/internal/internalPane2.cjs.js.map +1 -1
  109. package/dist/mainPage/header.cjs.js +1 -1
  110. package/dist/mainPage/header.cjs.js.map +1 -1
  111. package/dist/n3Pane2.cjs.js +1 -1
  112. package/dist/n3Pane2.esm.js +1 -1
  113. package/dist/outline/manager2.cjs.js +1 -2
  114. package/dist/outline/manager2.cjs.js.map +1 -1
  115. package/dist/outline/manager2.esm.js +356 -397
  116. package/dist/outline/manager2.esm.js.map +1 -1
  117. package/dist/outline/propertyViews.cjs.js +1 -1
  118. package/dist/outline/propertyViews.cjs.js.map +1 -1
  119. package/dist/outline/sourcePaneIcon.d.ts +2 -0
  120. package/dist/outline/sourcePaneIcon.d.ts.map +1 -0
  121. package/dist/outline/userInput.cjs.js +1 -1
  122. package/dist/outline/userInput.cjs.js.map +1 -1
  123. package/dist/outline/userInput.esm.js +6 -4
  124. package/dist/outline/userInput.esm.js.map +1 -1
  125. package/dist/pad/padPane2.cjs.js +1 -1
  126. package/dist/pad/padPane2.cjs.js.map +1 -1
  127. package/dist/sharing/sharingPane.cjs.js +1 -1
  128. package/dist/sharing/sharingPane.cjs.js.map +1 -1
  129. package/dist/social/editProfileDetails.cjs.js +1 -1
  130. package/dist/social/editProfileDetails.cjs.js.map +1 -1
  131. package/dist/social/editProfileDetails.esm.js +1 -1
  132. package/dist/social/socialPane2.cjs.js +1 -1
  133. package/dist/social/socialPane2.cjs.js.map +1 -1
  134. package/dist/social/socialSections.cjs.js +1 -1
  135. package/dist/social/socialSections.cjs.js.map +1 -1
  136. package/dist/social/socialSections.esm.js +7 -6
  137. package/dist/social/socialSections.esm.js.map +1 -1
  138. package/dist/social/triage.cjs.js +1 -1
  139. package/dist/social/triage.cjs.js.map +1 -1
  140. package/dist/tabbed/tabbedPane.cjs.js +1 -1
  141. package/dist/tabbed/tabbedPane.cjs.js.map +1 -1
  142. package/dist/trustedApplications/trustedApplications.dom.cjs.js +1 -1
  143. package/dist/trustedApplications/trustedApplications.dom.cjs.js.map +1 -1
  144. package/dist/trustedApplications/trustedApplications.utils.cjs.js +1 -1
  145. package/dist/trustedApplications/trustedApplications.utils.cjs.js.map +1 -1
  146. package/dist/trustedApplications/trustedApplications.view.cjs.js +1 -1
  147. package/dist/trustedApplications/trustedApplications.view.cjs.js.map +1 -1
  148. package/dist/utils/podUtils.cjs.js +1 -1
  149. package/dist/utils/podUtils.cjs.js.map +1 -1
  150. package/dist/utils/webIdUtils.cjs.js +1 -1
  151. package/dist/utils/webIdUtils.cjs.js.map +1 -1
  152. package/dist/versionInfo.cjs.js +1 -1
  153. package/dist/versionInfo.cjs.js.map +1 -1
  154. package/dist/versionInfo.esm.js +3 -3
  155. package/dist/versionInfo.esm.js.map +1 -1
  156. package/package.json +4 -4
@@ -1,3 +1,3 @@
1
- (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.rdfxml-pane{border-top:solid 2px var(--color-data-pane-border-top,black);border-left:solid 2px var(--color-data-pane-border-top,black);border-bottom:solid 2px var(--color-data-pane-border-side,#777);border-right:solid 2px var(--color-data-pane-border-side,#777);color:var(--color-text-brown,#440);box-sizing:border-box;padding:1rem}.rdfxml-pane__source{box-sizing:border-box;white-space:pre;max-width:100%;margin:0;font-family:monospace;font-size:120%;overflow-x:auto}.rdfxml-pane__line{grid-template-columns:var(--rdfxml-indent,0) minmax(max-content, auto);align-items:start;display:grid}.rdfxml-pane__line-indent{width:var(--rdfxml-indent,0);display:block}.rdfxml-pane__line-content{white-space:pre}.rdfxml-pane[data-layout=mobile] .rdfxml-pane__source{overflow-wrap:anywhere;word-break:break-word;white-space:normal}.rdfxml-pane[data-layout=mobile] .rdfxml-pane__line{grid-template-columns:var(--rdfxml-indent,0) minmax(0, 1fr)}.rdfxml-pane[data-layout=mobile] .rdfxml-pane__line-content{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;min-width:0}@media (width<=576px){.rdfxml-pane__source{overflow-wrap:anywhere;word-break:break-word;white-space:normal}.rdfxml-pane__line{grid-template-columns:var(--rdfxml-indent,0) minmax(0, 1fr)}.rdfxml-pane__line-content{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;min-width:0}}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();const e=require("./_virtual/_rolldown/runtime.cjs.js");;let t=require("solid-ui");t=e.__toESM(t);let n=require("rdflib");n=e.__toESM(n);var r=t.ns;function i(e){if(e.trim().length===0)return 0;let t=0;for(let n of e){if(n===` `){t+=1;continue}if(n===` `){t+=2;continue}break}return Math.max(t,2)}function a(e){return e.replace(/^[ \t]+/,``)}var o={icon:t.icons.originalIconBase+`22-text-xml4.png`,name:`RDFXML`,audience:[r.solid(`Developer`)],label:function(e,t){let n=t.session.store;if(`http://www.w3.org/2007/ont/link#ProtocolEvent`in n.findTypeURIs(e))return null;let r=n.statementsMatching(void 0,void 0,void 0,e).length;return r===0?null:`As RDF/XML (`+r+`)`},render:function(e,t){let r=t.dom,o=t.session.store;function s(e){let n=t.environment??{};e.dataset.layout=n.layout??`desktop`}let c=r.createElement(`div`);c.setAttribute(`class`,`rdfxml-pane`),s(c);let l=o.statementsMatching(void 0,void 0,void 0,e),u=n.Serializer(o);u.suggestNamespaces(o.namespaces),u.setBase(e.uri);let d=u.statementsToXML(l),f=r.createElement(`div`);return f.classList.add(`rdfxml-pane__source`),d.split(`
1
+ (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.rdfxml-pane{border-top:solid 2px var(--color-data-pane-border-top,black);border-left:solid 2px var(--color-data-pane-border-top,black);border-bottom:solid 2px var(--color-data-pane-border-side,#777);border-right:solid 2px var(--color-data-pane-border-side,#777);width:100%;min-width:0;color:var(--color-text-brown,#440);box-sizing:border-box;padding:1rem}.rdfxml-pane__source{box-sizing:border-box;white-space:pre;min-width:0;max-width:100%;margin:0;font-family:monospace;font-size:120%;overflow-x:auto}.rdfxml-pane__line{grid-template-columns:var(--rdfxml-indent,0) minmax(0, 1fr);align-items:start;min-width:0;display:grid}.rdfxml-pane__line-indent{width:var(--rdfxml-indent,0);display:block}.rdfxml-pane__line-content{white-space:pre}.rdfxml-pane[data-layout=mobile] .rdfxml-pane__source{overflow-wrap:anywhere;word-break:break-word;white-space:normal}.rdfxml-pane[data-layout=mobile] .rdfxml-pane__line{grid-template-columns:var(--rdfxml-indent,0) minmax(0, 1fr)}.rdfxml-pane[data-layout=mobile] .rdfxml-pane__line-content{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;min-width:0}@media (width<=576px){.rdfxml-pane__source{overflow-wrap:anywhere;word-break:break-word;white-space:normal}.rdfxml-pane__line{grid-template-columns:var(--rdfxml-indent,0) minmax(0, 1fr)}.rdfxml-pane__line-content{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;min-width:0}}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();const e=require("./_virtual/_rolldown/runtime.cjs.js");;let t=require("solid-ui");t=e.__toESM(t);let n=require("rdflib");n=e.__toESM(n);var r=t.ns;function i(e){if(e.trim().length===0)return 0;let t=0;for(let n of e){if(n===` `){t+=1;continue}if(n===` `){t+=2;continue}break}return Math.max(t,2)}function a(e){return e.replace(/^[ \t]+/,``)}var o={icon:t.icons.originalIconBase+`22-text-xml4.png`,name:`RDFXML`,audience:[r.solid(`Developer`)],label:function(e,t){let n=t.session.store;if(`http://www.w3.org/2007/ont/link#ProtocolEvent`in n.findTypeURIs(e))return null;let r=n.statementsMatching(void 0,void 0,void 0,e).length;return r===0?null:`As RDF/XML (`+r+`)`},render:function(e,t){let r=t.dom,o=t.session.store;function s(e){let n=t.environment??{};e.dataset.layout=n.layout??`desktop`}let c=r.createElement(`div`);c.setAttribute(`class`,`rdfxml-pane`),s(c);let l=o.statementsMatching(void 0,void 0,void 0,e),u=n.Serializer(o);u.suggestNamespaces(o.namespaces),u.setBase(e.uri);let d=u.statementsToXML(l),f=r.createElement(`div`);return f.classList.add(`rdfxml-pane__source`),d.split(`
2
2
  `).forEach(e=>{let t=r.createElement(`div`),n=r.createElement(`span`),o=r.createElement(`span`),s=i(e);t.classList.add(`rdfxml-pane__line`),t.style.setProperty(`--rdfxml-indent`,`${s}ch`),n.classList.add(`rdfxml-pane__line-indent`),n.setAttribute(`aria-hidden`,`true`),o.classList.add(`rdfxml-pane__line-content`),o.textContent=e.length>0?a(e):` `,t.appendChild(n),t.appendChild(o),f.appendChild(t)}),c.appendChild(f),c}};exports.RDFXMLPane=o;
3
3
  //# sourceMappingURL=RDFXMLPane2.cjs.js.map
@@ -1,4 +1,4 @@
1
- (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.rdfxml-pane{border-top:solid 2px var(--color-data-pane-border-top,black);border-left:solid 2px var(--color-data-pane-border-top,black);border-bottom:solid 2px var(--color-data-pane-border-side,#777);border-right:solid 2px var(--color-data-pane-border-side,#777);color:var(--color-text-brown,#440);box-sizing:border-box;padding:1rem}.rdfxml-pane__source{box-sizing:border-box;white-space:pre;max-width:100%;margin:0;font-family:monospace;font-size:120%;overflow-x:auto}.rdfxml-pane__line{grid-template-columns:var(--rdfxml-indent,0) minmax(max-content, auto);align-items:start;display:grid}.rdfxml-pane__line-indent{width:var(--rdfxml-indent,0);display:block}.rdfxml-pane__line-content{white-space:pre}.rdfxml-pane[data-layout=mobile] .rdfxml-pane__source{overflow-wrap:anywhere;word-break:break-word;white-space:normal}.rdfxml-pane[data-layout=mobile] .rdfxml-pane__line{grid-template-columns:var(--rdfxml-indent,0) minmax(0, 1fr)}.rdfxml-pane[data-layout=mobile] .rdfxml-pane__line-content{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;min-width:0}@media (width<=576px){.rdfxml-pane__source{overflow-wrap:anywhere;word-break:break-word;white-space:normal}.rdfxml-pane__line{grid-template-columns:var(--rdfxml-indent,0) minmax(0, 1fr)}.rdfxml-pane__line-content{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;min-width:0}}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
1
+ (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.rdfxml-pane{border-top:solid 2px var(--color-data-pane-border-top,black);border-left:solid 2px var(--color-data-pane-border-top,black);border-bottom:solid 2px var(--color-data-pane-border-side,#777);border-right:solid 2px var(--color-data-pane-border-side,#777);width:100%;min-width:0;color:var(--color-text-brown,#440);box-sizing:border-box;padding:1rem}.rdfxml-pane__source{box-sizing:border-box;white-space:pre;min-width:0;max-width:100%;margin:0;font-family:monospace;font-size:120%;overflow-x:auto}.rdfxml-pane__line{grid-template-columns:var(--rdfxml-indent,0) minmax(0, 1fr);align-items:start;min-width:0;display:grid}.rdfxml-pane__line-indent{width:var(--rdfxml-indent,0);display:block}.rdfxml-pane__line-content{white-space:pre}.rdfxml-pane[data-layout=mobile] .rdfxml-pane__source{overflow-wrap:anywhere;word-break:break-word;white-space:normal}.rdfxml-pane[data-layout=mobile] .rdfxml-pane__line{grid-template-columns:var(--rdfxml-indent,0) minmax(0, 1fr)}.rdfxml-pane[data-layout=mobile] .rdfxml-pane__line-content{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;min-width:0}@media (width<=576px){.rdfxml-pane__source{overflow-wrap:anywhere;word-break:break-word;white-space:normal}.rdfxml-pane__line{grid-template-columns:var(--rdfxml-indent,0) minmax(0, 1fr)}.rdfxml-pane__line-content{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;min-width:0}}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
2
2
  import * as e from "solid-ui";
3
3
  import * as t from "rdflib";
4
4
  //#region src/RDFXMLPane.ts
@@ -0,0 +1,2 @@
1
+ var e=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:`open`}).innerHTML=`<style>:host { display: inline-flex; }</style><svg viewBox="0 0 24 24" width="100%" height="100%" ><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m12 19l-7-7l7-7m7 7H5"/></svg>`}};customElements.get(`icon-lucide-arrow-left`)||customElements.define(`icon-lucide-arrow-left`,e),exports.default=e;
2
+ //# sourceMappingURL=arrow-left.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arrow-left.cjs.js","names":[],"sources":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ //#region ~icons/lucide/arrow-left
2
+ var e = class extends HTMLElement {
3
+ constructor() {
4
+ super(), this.attachShadow({ mode: "open" }).innerHTML = "<style>:host { display: inline-flex; }</style><svg viewBox=\"0 0 24 24\" width=\"100%\" height=\"100%\" ><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m12 19l-7-7l7-7m7 7H5\"/></svg>";
5
+ }
6
+ };
7
+ customElements.get("icon-lucide-arrow-left") || customElements.define("icon-lucide-arrow-left", e);
8
+ //#endregion
9
+ export { e as default };
10
+
11
+ //# sourceMappingURL=arrow-left.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arrow-left.esm.js","names":[],"sources":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ var e=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:`open`}).innerHTML=`<style>:host { display: inline-flex; }</style><svg viewBox="0 0 24 24" width="100%" height="100%" ><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><circle cx="12" cy="12" r="1"/><circle cx="12" cy="5" r="1"/><circle cx="12" cy="19" r="1"/></g></svg>`}};customElements.get(`icon-lucide-ellipsis-vertical`)||customElements.define(`icon-lucide-ellipsis-vertical`,e),exports.default=e;
2
+ //# sourceMappingURL=ellipsis-vertical.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ellipsis-vertical.cjs.js","names":[],"sources":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ //#region ~icons/lucide/ellipsis-vertical
2
+ var e = class extends HTMLElement {
3
+ constructor() {
4
+ super(), this.attachShadow({ mode: "open" }).innerHTML = "<style>:host { display: inline-flex; }</style><svg viewBox=\"0 0 24 24\" width=\"100%\" height=\"100%\" ><g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><circle cx=\"12\" cy=\"12\" r=\"1\"/><circle cx=\"12\" cy=\"5\" r=\"1\"/><circle cx=\"12\" cy=\"19\" r=\"1\"/></g></svg>";
5
+ }
6
+ };
7
+ customElements.get("icon-lucide-ellipsis-vertical") || customElements.define("icon-lucide-ellipsis-vertical", e);
8
+ //#endregion
9
+ export { e as default };
10
+
11
+ //# sourceMappingURL=ellipsis-vertical.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ellipsis-vertical.esm.js","names":[],"sources":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ var e=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:`open`}).innerHTML=`<style>:host { display: inline-flex; }</style><svg viewBox="0 0 24 24" width="100%" height="100%" ><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="M12 2a14.5 14.5 0 0 0 0 20a14.5 14.5 0 0 0 0-20M2 12h20"/></g></svg>`}};customElements.get(`icon-lucide-globe`)||customElements.define(`icon-lucide-globe`,e),exports.default=e;
2
+ //# sourceMappingURL=globe.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"globe.cjs.js","names":[],"sources":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ //#region ~icons/lucide/globe
2
+ var e = class extends HTMLElement {
3
+ constructor() {
4
+ super(), this.attachShadow({ mode: "open" }).innerHTML = "<style>:host { display: inline-flex; }</style><svg viewBox=\"0 0 24 24\" width=\"100%\" height=\"100%\" ><g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M12 2a14.5 14.5 0 0 0 0 20a14.5 14.5 0 0 0 0-20M2 12h20\"/></g></svg>";
5
+ }
6
+ };
7
+ customElements.get("icon-lucide-globe") || customElements.define("icon-lucide-globe", e);
8
+ //#endregion
9
+ export { e as default };
10
+
11
+ //# sourceMappingURL=globe.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"globe.esm.js","names":[],"sources":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ var e=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:`open`}).innerHTML=`<style>:host { display: inline-flex; }</style><svg viewBox="0 0 24 24" width="100%" height="100%" ><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><circle cx="12" cy="16" r="1"/><rect width="18" height="12" x="3" y="10" rx="2"/><path d="M7 10V7a5 5 0 0 1 10 0v3"/></g></svg>`}};customElements.get(`icon-lucide-lock-keyhole`)||customElements.define(`icon-lucide-lock-keyhole`,e),exports.default=e;
2
+ //# sourceMappingURL=lock-keyhole.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lock-keyhole.cjs.js","names":[],"sources":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ //#region ~icons/lucide/lock-keyhole
2
+ var e = class extends HTMLElement {
3
+ constructor() {
4
+ super(), this.attachShadow({ mode: "open" }).innerHTML = "<style>:host { display: inline-flex; }</style><svg viewBox=\"0 0 24 24\" width=\"100%\" height=\"100%\" ><g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><circle cx=\"12\" cy=\"16\" r=\"1\"/><rect width=\"18\" height=\"12\" x=\"3\" y=\"10\" rx=\"2\"/><path d=\"M7 10V7a5 5 0 0 1 10 0v3\"/></g></svg>";
5
+ }
6
+ };
7
+ customElements.get("icon-lucide-lock-keyhole") || customElements.define("icon-lucide-lock-keyhole", e);
8
+ //#endregion
9
+ export { e as default };
10
+
11
+ //# sourceMappingURL=lock-keyhole.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lock-keyhole.esm.js","names":[],"sources":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ var e=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:`open`}).innerHTML=`<style>:host { display: inline-flex; }</style><svg viewBox="0 0 24 24" width="100%" height="100%" ><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497zM15 5l4 4"/></svg>`}};customElements.get(`icon-lucide-pencil`)||customElements.define(`icon-lucide-pencil`,e),exports.default=e;
2
+ //# sourceMappingURL=pencil.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pencil.cjs.js","names":[],"sources":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ //#region ~icons/lucide/pencil
2
+ var e = class extends HTMLElement {
3
+ constructor() {
4
+ super(), this.attachShadow({ mode: "open" }).innerHTML = "<style>:host { display: inline-flex; }</style><svg viewBox=\"0 0 24 24\" width=\"100%\" height=\"100%\" ><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497zM15 5l4 4\"/></svg>";
5
+ }
6
+ };
7
+ customElements.get("icon-lucide-pencil") || customElements.define("icon-lucide-pencil", e);
8
+ //#endregion
9
+ export { e as default };
10
+
11
+ //# sourceMappingURL=pencil.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pencil.esm.js","names":[],"sources":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ var e=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:`open`}).innerHTML=`<style>:host { display: inline-flex; }</style><svg viewBox="0 0 24 24" width="100%" height="100%" ><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><circle cx="18" cy="5" r="3"/><circle cx="6" cy="12" r="3"/><circle cx="18" cy="19" r="3"/><path d="m8.59 13.51l6.83 3.98m-.01-10.98l-6.82 3.98"/></g></svg>`}};customElements.get(`icon-lucide-share-2`)||customElements.define(`icon-lucide-share-2`,e),exports.default=e;
2
+ //# sourceMappingURL=share-2.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"share-2.cjs.js","names":[],"sources":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ //#region ~icons/lucide/share-2
2
+ var e = class extends HTMLElement {
3
+ constructor() {
4
+ super(), this.attachShadow({ mode: "open" }).innerHTML = "<style>:host { display: inline-flex; }</style><svg viewBox=\"0 0 24 24\" width=\"100%\" height=\"100%\" ><g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><circle cx=\"18\" cy=\"5\" r=\"3\"/><circle cx=\"6\" cy=\"12\" r=\"3\"/><circle cx=\"18\" cy=\"19\" r=\"3\"/><path d=\"m8.59 13.51l6.83 3.98m-.01-10.98l-6.82 3.98\"/></g></svg>";
5
+ }
6
+ };
7
+ customElements.get("icon-lucide-share-2") || customElements.define("icon-lucide-share-2", e);
8
+ //#endregion
9
+ export { e as default };
10
+
11
+ //# sourceMappingURL=share-2.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"share-2.esm.js","names":[],"sources":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ var e=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:`open`}).innerHTML=`<style>:host { display: inline-flex; }</style><svg viewBox="0 0 24 24" width="100%" height="100%" ><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 11v6m4-6v6m5-11v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/></svg>`}};customElements.get(`icon-lucide-trash-2`)||customElements.define(`icon-lucide-trash-2`,e),exports.default=e;
2
+ //# sourceMappingURL=trash-2.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trash-2.cjs.js","names":[],"sources":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ //#region ~icons/lucide/trash-2
2
+ var e = class extends HTMLElement {
3
+ constructor() {
4
+ super(), this.attachShadow({ mode: "open" }).innerHTML = "<style>:host { display: inline-flex; }</style><svg viewBox=\"0 0 24 24\" width=\"100%\" height=\"100%\" ><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M10 11v6m4-6v6m5-11v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2\"/></svg>";
5
+ }
6
+ };
7
+ customElements.get("icon-lucide-trash-2") || customElements.define("icon-lucide-trash-2", e);
8
+ //#endregion
9
+ export { e as default };
10
+
11
+ //# sourceMappingURL=trash-2.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trash-2.esm.js","names":[],"sources":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- const e=require("../_virtual/_rolldown/runtime.cjs.js");let t=require("solid-ui");t=e.__toESM(t);let n=require("rdflib");n=e.__toESM(n);var r=t.ns,i={icon:t.icons.iconBase+`noun_534313.svg`,name:`audio`,label:function(e,t){let r=t.session.store.findTypeURIs(e),i=n.Util.mediaTypeClass(`audio/*`).uri.split(`*`)[0];for(let e in r)if(e.startsWith(i))return`Play audio`;return null},render:function(e,t){let n=t.session.store,i=t.dom,a={autoplay:!1,chain:!0,chainAlbums:!0,loop:!1},o=function(e){let t=e.lastIndexOf(`.`);return t<0||t<e.lastIndexOf(`/`)?e:e.slice(0,t)},s=function(e){let t=n.any(void 0,r.ldp(`contains`),e);if(!t)return!1;let i=n.each(t,r.ldp(`contains`));if(i.length<2)return!1;let a=e.uri;for(let e=0;e<i.length;e++){let t=i[e].uri;if(a.length>t.length&&a.startsWith(o(t))||a.endsWith(`.m4a`)&&t.endsWith(`.mp3`)&&o(a)===o(t))return!0}return!1},c=function(e){let t=e.uri.split(`/`).slice(-3),n=function(e){try{return decodeURIComponent(e)}catch{return e}};h.textContent=n(t[0]),g.textContent=n(t[1]),_.textContent=n(o(t[2]))},l=function(e,t){return new Promise(function(i){if(t||=0,!a.chain)return i(null);let o=n.any(void 0,r.ldp(`contains`),e)||e.dir();if(!o)return i(null);n.fetcher.load(o).then(function(s){let c=n.each(o,r.ldp(`contains`)),u;c.sort();for(let s=0;s<c.length;s++)if(e.uri===c[s].uri)if(u=(s+1)%c.length,u===0)if(a.chainAlbums){if(t===1||!a.chainAlbums)return i(null);l(o,t+1).then(function(e){e&&n.fetcher.load(e).then(function(t){let a=n.each(e,r.ldp(`contains`));return a.length===0?i(null):(a.sort(),console.log(`New Album: `+e),i(a[0]))})})}else return a.loop?i(c[u]):i(null);else return i(c[u])})})},u=function(e){let t=n.sym(e.target.getAttribute(`src`));if(!a.chain)return;let r=function(t){let n=t;l(n).then(function(t){if(!t){console.log(`No successor to `+n);return}s(t)?(console.log(`Ignoring redundant `+t),r(t)):(console.log(`Moving on to `+t),c(t),v.appendChild(d(t,!0)),v.removeChild(e.target))})};r(t)},d=function(e,t){let r=i.createElement(`audio`);return r.setAttribute(`controls`,`yes`),n.fetcher._fetch(e.uri).then(function(e){return e.blob()}).then(function(e){let t=URL.createObjectURL(e);r.setAttribute(`src`,t)}),t&&r.setAttribute(`autoplay`,`autoplay`),r.addEventListener(`ended`,u,!1),r},f=i.createElement(`div`),p=f.appendChild(i.createElement(`table`)),m=`padding: 0.3em; color:white; background-color: black;`,h=p.appendChild(i.createElement(`tr`));h.style.cssText=m;let g=p.appendChild(i.createElement(`tr`));g.style.cssText=m;let _=p.appendChild(i.createElement(`tr`));_.style.cssText=m;let v=p.appendChild(i.createElement(`tr`));return c(e),v.appendChild(d(e,a.autoplay)),!n.holds(void 0,r.ldp(`contains`),e)&&e.dir()&&n.fetcher.load(e.dir()),f}};exports.default=i;
1
+ const e=require("../_virtual/_rolldown/runtime.cjs.js");let t=require("solid-ui");t=e.__toESM(t);let n=require("rdflib");n=e.__toESM(n);var r=t.ns,i={icon:t.icons.iconBase+`noun_534313.svg`,name:`audio`,label:function(e,t){let r=t.session.store.findTypeURIs(e),i=n.Util.mediaTypeClass(`audio/*`).uri.split(`*`)[0];for(let e in r)if(e.startsWith(i))return`Play audio`;return null},render:function(e,t){let n=t.session.store,i=t.dom,a={autoplay:!1,chain:!0,chainAlbums:!0,loop:!1},o=function(e){let t=e.lastIndexOf(`.`);return t<0||t<e.lastIndexOf(`/`)?e:e.slice(0,t)},s=function(e){let t=n.any(void 0,r.ldp(`contains`),e);if(!t)return!1;let i=n.each(t,r.ldp(`contains`));if(i.length<2)return!1;let a=e.uri;for(let e=0;e<i.length;e++){let t=i[e].uri;if(a.length>t.length&&a.startsWith(o(t))||a.endsWith(`.m4a`)&&t.endsWith(`.mp3`)&&o(a)===o(t))return!0}return!1},c=function(e){let t=e.uri.split(`/`).slice(-3),n=function(e){try{return decodeURIComponent(e)}catch{return e}};h.textContent=n(t[0]),g.textContent=n(t[1]),_.textContent=n(o(t[2]))},l=function(e,t){return new Promise(function(i){if(t||=0,!a.chain)return i(null);let o=n.any(void 0,r.ldp(`contains`),e)||e.dir();if(!o)return i(null);n.fetcher.load(o).then(function(s){let c=n.each(o,r.ldp(`contains`)),u;c.sort();for(let s=0;s<c.length;s++)if(e.uri===c[s].uri){if(u=(s+1)%c.length,u===0){if(a.chainAlbums){if(t===1||!a.chainAlbums)return i(null);l(o,t+1).then(function(e){e&&n.fetcher.load(e).then(function(t){let a=n.each(e,r.ldp(`contains`));return a.length===0?i(null):(a.sort(),console.log(`New Album: `+e),i(a[0]))})})}else return a.loop?i(c[u]):i(null)}else return i(c[u])}})})},u=function(e){let t=n.sym(e.target.getAttribute(`src`));if(!a.chain)return;let r=function(t){let n=t;l(n).then(function(t){if(!t){console.log(`No successor to `+n);return}s(t)?(console.log(`Ignoring redundant `+t),r(t)):(console.log(`Moving on to `+t),c(t),v.appendChild(d(t,!0)),v.removeChild(e.target))})};r(t)},d=function(e,t){let r=i.createElement(`audio`);return r.setAttribute(`controls`,`yes`),n.fetcher._fetch(e.uri).then(function(e){return e.blob()}).then(function(e){let t=URL.createObjectURL(e);r.setAttribute(`src`,t)}),t&&r.setAttribute(`autoplay`,`autoplay`),r.addEventListener(`ended`,u,!1),r},f=i.createElement(`div`),p=f.appendChild(i.createElement(`table`)),m=`padding: 0.3em; color:white; background-color: black;`,h=p.appendChild(i.createElement(`tr`));h.style.cssText=m;let g=p.appendChild(i.createElement(`tr`));g.style.cssText=m;let _=p.appendChild(i.createElement(`tr`));_.style.cssText=m;let v=p.appendChild(i.createElement(`tr`));return c(e),v.appendChild(d(e,a.autoplay)),!n.holds(void 0,r.ldp(`contains`),e)&&e.dir()&&n.fetcher.load(e.dir()),f}};exports.default=i;
2
2
  //# sourceMappingURL=audioPane.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"audioPane.cjs.js","names":["UI","$rdf"],"sources":["../../src/audio/audioPane.js"],"sourcesContent":["/* Single audio play Pane\n **\n */\nimport * as UI from 'solid-ui'\nimport * as $rdf from 'rdflib'\nconst ns = UI.ns\n\nexport default {\n icon: UI.icons.iconBase + 'noun_534313.svg',\n\n name: 'audio',\n\n // Does the subject deserve an audio play pane?\n label: function (subject, context) {\n const kb = context.session.store\n const typeURIs = kb.findTypeURIs(subject)\n\n const prefix = $rdf.Util.mediaTypeClass('audio/*').uri.split('*')[0]\n for (const t in typeURIs) {\n if (t.startsWith(prefix)) return 'Play audio'\n }\n return null\n },\n\n render: function (subject, context) {\n const kb = context.session.store\n const dom = context.dom\n const options = {\n autoplay: false,\n chain: true,\n chainAlbums: true,\n loop: false\n }\n\n const removeExtension = function (str) {\n const dot = str.lastIndexOf('.')\n if (dot < 0) return str // if any\n const slash = str.lastIndexOf('/')\n if (dot < slash) return str\n return str.slice(0, dot)\n }\n\n // True if there is another file like song.mp3 when this is \"song 1.mp3\"\n // or this is song.m4a\n //\n const looksRedundant = function (x) {\n const folder = kb.any(undefined, ns.ldp('contains'), x)\n if (!folder) return false\n const contents = kb.each(folder, ns.ldp('contains'))\n if (contents.length < 2) return false\n const thisName = x.uri\n for (let k = 0; k < contents.length; k++) {\n const otherName = contents[k].uri\n if (\n thisName.length > otherName.length &&\n thisName.startsWith(removeExtension(otherName))\n ) {\n return true\n }\n if (\n thisName.endsWith('.m4a') &&\n otherName.endsWith('.mp3') &&\n removeExtension(thisName) === removeExtension(otherName)\n ) {\n return true\n }\n }\n return false\n }\n\n // Alternative methods could include:\n // Accesing metadata in the audio contol, or paring the audio file\n const guessNames = function (x) {\n const a = x.uri.split('/').slice(-3) // Hope artist, album, track\n const decode = function (str) {\n try {\n return decodeURIComponent(str)\n } catch (e) {\n return str\n }\n }\n artistRow.textContent = decode(a[0])\n albumRow.textContent = decode(a[1])\n trackRow.textContent = decode(removeExtension(a[2]))\n }\n\n const moveOn = function (current, level) {\n return new Promise(function (resolve) {\n level = level || 0\n if (!options.chain) return resolve(null)\n // Ideally navigate graph else cheat with URI munging:\n const folder =\n kb.any(undefined, ns.ldp('contains'), current) || current.dir()\n if (!folder) return resolve(null)\n kb.fetcher.load(folder).then(function (_xhr) {\n const contents = kb.each(folder, ns.ldp('contains')) // @@ load if not loaded\n // if (contents.length < 2) return resolve(null) NO might move on from 1-track album\n let j\n contents.sort() // sort by URI which hopefully will get tracks in order\n for (let i = 0; i < contents.length; i++) {\n if (current.uri === contents[i].uri) {\n j = (i + 1) % contents.length\n if (j === 0) {\n if (!options.chainAlbums) {\n if (options.loop) {\n return resolve(contents[j])\n }\n return resolve(null) // No more music needed\n } else {\n // chain albums\n if (level === 1 || !options.chainAlbums) return resolve(null) // limit of navigating treee\n moveOn(folder, level + 1).then(function (folder2) {\n if (folder2) {\n kb.fetcher.load(folder2).then(function (_xhr) {\n const contents = kb.each(folder2, ns.ldp('contains'))\n if (contents.length === 0) return resolve(null)\n contents.sort()\n console.log('New Album: ' + folder2)\n return resolve(contents[0]) // Start off new album\n })\n }\n })\n }\n } else {\n return resolve(contents[j])\n }\n }\n } // for\n })\n })\n }\n const endedListener = function (event) {\n const current = kb.sym(event.target.getAttribute('src'))\n if (!options.chain) return\n const tryNext = function (cur) {\n const current = cur\n moveOn(current).then(function (next) {\n if (!next) {\n console.log('No successor to ' + current)\n return\n }\n if (!looksRedundant(next)) {\n console.log('Moving on to ' + next)\n guessNames(next)\n controlRow.appendChild(audioControl(next, true)) // Force autoplay\n controlRow.removeChild(event.target)\n } else {\n console.log('Ignoring redundant ' + next)\n tryNext(next)\n }\n })\n }\n tryNext(current)\n }\n\n const audioControl = function (song, autoplay) {\n const audio = dom.createElement('audio')\n audio.setAttribute('controls', 'yes')\n // get audio with authenticated fetch\n kb.fetcher._fetch(song.uri)\n .then(function (response) {\n return response.blob()\n })\n .then(function (myBlob) {\n const objectURL = URL.createObjectURL(myBlob)\n audio.setAttribute('src', objectURL) // w640 h480 //\n })\n\n if (autoplay) {\n audio.setAttribute('autoplay', 'autoplay') // Make this a personal preference\n }\n audio.addEventListener('ended', endedListener, false)\n return audio\n }\n\n const div = dom.createElement('div')\n const table = div.appendChild(dom.createElement('table'))\n const labelStyle = 'padding: 0.3em; color:white; background-color: black;'\n const artistRow = table.appendChild(dom.createElement('tr'))\n artistRow.style.cssText = labelStyle\n const albumRow = table.appendChild(dom.createElement('tr'))\n albumRow.style.cssText = labelStyle\n const trackRow = table.appendChild(dom.createElement('tr'))\n trackRow.style.cssText = labelStyle\n const controlRow = table.appendChild(dom.createElement('tr'))\n guessNames(subject)\n controlRow.appendChild(audioControl(subject, options.autoplay))\n\n if (!kb.holds(undefined, ns.ldp('contains'), subject) && subject.dir()) {\n kb.fetcher.load(subject.dir()) // Prefetch enclosing @@ or playlist\n }\n\n return div\n }\n}\n\n// ends\n"],"mappings":"wIAKA,IAAM,EAAKA,EAAG,GAEd,EAAe,CACb,KAAMA,EAAG,MAAM,SAAW,kBAE1B,KAAM,QAGN,MAAO,SAAU,EAAS,EAAS,CAEjC,IAAM,EADK,EAAQ,QAAQ,MACP,aAAa,CAAO,EAElC,EAASC,EAAK,KAAK,eAAe,SAAS,CAAC,CAAC,IAAI,MAAM,GAAG,CAAC,CAAC,GAClE,IAAK,IAAM,KAAK,EACd,GAAI,EAAE,WAAW,CAAM,EAAG,MAAO,aAEnC,OAAO,IACT,EAEA,OAAQ,SAAU,EAAS,EAAS,CAClC,IAAM,EAAK,EAAQ,QAAQ,MACrB,EAAM,EAAQ,IACd,EAAU,CACd,SAAU,GACV,MAAO,GACP,YAAa,GACb,KAAM,EACR,EAEM,EAAkB,SAAU,EAAK,CACrC,IAAM,EAAM,EAAI,YAAY,GAAG,EAI/B,OAHI,EAAM,GAEN,EADU,EAAI,YAAY,GAChB,EAAU,EACjB,EAAI,MAAM,EAAG,CAAG,CACzB,EAKM,EAAiB,SAAU,EAAG,CAClC,IAAM,EAAS,EAAG,IAAI,IAAA,GAAW,EAAG,IAAI,UAAU,EAAG,CAAC,EACtD,GAAI,CAAC,EAAQ,MAAO,GACpB,IAAM,EAAW,EAAG,KAAK,EAAQ,EAAG,IAAI,UAAU,CAAC,EACnD,GAAI,EAAS,OAAS,EAAG,MAAO,GAChC,IAAM,EAAW,EAAE,IACnB,IAAK,IAAI,EAAI,EAAG,EAAI,EAAS,OAAQ,IAAK,CACxC,IAAM,EAAY,EAAS,EAAE,CAAC,IAO9B,GALE,EAAS,OAAS,EAAU,QAC5B,EAAS,WAAW,EAAgB,CAAS,CAAC,GAK9C,EAAS,SAAS,MAAM,GACxB,EAAU,SAAS,MAAM,GACzB,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AQ,EAAI,YAAY,EAAI,cAAc,OAAO,CAAC,EAClD,EAAa,wDACb,EAAY,EAAM,YAAY,EAAI,cAAc,IAAI,CAAC,EAC3D,EAAU,MAAM,QAAU,EAC1B,IAAM,EAAW,EAAM,YAAY,EAAI,cAAc,IAAI,CAAC,EAC1D,EAAS,MAAM,QAAU,EACzB,IAAM,EAAW,EAAM,YAAY,EAAI,cAAc,IAAI,CAAC,EAC1D,EAAS,MAAM,QAAU,EACzB,IAAM,EAAa,EAAM,YAAY,EAAI,cAAc,IAAI,CAAC,EAQ5D,OAPA,EAAW,CAAO,EAClB,EAAW,YAAY,EAAa,EAAS,EAAQ,QAAQ,CAAC,EAE1D,CAAC,EAAG,MAAM,IAAA,GAAW,EAAG,IAAI,UAAU,EAAG,CAAO,GAAK,EAAQ,IAAI,GACnE,EAAG,QAAQ,KAAK,EAAQ,IAAI,CAAC,EAGxB,CACT,CACF"}
1
+ {"version":3,"file":"audioPane.cjs.js","names":["UI","$rdf"],"sources":["../../src/audio/audioPane.js"],"sourcesContent":["/* Single audio play Pane\n **\n */\nimport * as UI from 'solid-ui'\nimport * as $rdf from 'rdflib'\nconst ns = UI.ns\n\nexport default {\n icon: UI.icons.iconBase + 'noun_534313.svg',\n\n name: 'audio',\n\n // Does the subject deserve an audio play pane?\n label: function (subject, context) {\n const kb = context.session.store\n const typeURIs = kb.findTypeURIs(subject)\n\n const prefix = $rdf.Util.mediaTypeClass('audio/*').uri.split('*')[0]\n for (const t in typeURIs) {\n if (t.startsWith(prefix)) return 'Play audio'\n }\n return null\n },\n\n render: function (subject, context) {\n const kb = context.session.store\n const dom = context.dom\n const options = {\n autoplay: false,\n chain: true,\n chainAlbums: true,\n loop: false\n }\n\n const removeExtension = function (str) {\n const dot = str.lastIndexOf('.')\n if (dot < 0) return str // if any\n const slash = str.lastIndexOf('/')\n if (dot < slash) return str\n return str.slice(0, dot)\n }\n\n // True if there is another file like song.mp3 when this is \"song 1.mp3\"\n // or this is song.m4a\n //\n const looksRedundant = function (x) {\n const folder = kb.any(undefined, ns.ldp('contains'), x)\n if (!folder) return false\n const contents = kb.each(folder, ns.ldp('contains'))\n if (contents.length < 2) return false\n const thisName = x.uri\n for (let k = 0; k < contents.length; k++) {\n const otherName = contents[k].uri\n if (\n thisName.length > otherName.length &&\n thisName.startsWith(removeExtension(otherName))\n ) {\n return true\n }\n if (\n thisName.endsWith('.m4a') &&\n otherName.endsWith('.mp3') &&\n removeExtension(thisName) === removeExtension(otherName)\n ) {\n return true\n }\n }\n return false\n }\n\n // Alternative methods could include:\n // Accesing metadata in the audio contol, or paring the audio file\n const guessNames = function (x) {\n const a = x.uri.split('/').slice(-3) // Hope artist, album, track\n const decode = function (str) {\n try {\n return decodeURIComponent(str)\n } catch (e) {\n return str\n }\n }\n artistRow.textContent = decode(a[0])\n albumRow.textContent = decode(a[1])\n trackRow.textContent = decode(removeExtension(a[2]))\n }\n\n const moveOn = function (current, level) {\n return new Promise(function (resolve) {\n level = level || 0\n if (!options.chain) return resolve(null)\n // Ideally navigate graph else cheat with URI munging:\n const folder =\n kb.any(undefined, ns.ldp('contains'), current) || current.dir()\n if (!folder) return resolve(null)\n kb.fetcher.load(folder).then(function (_xhr) {\n const contents = kb.each(folder, ns.ldp('contains')) // @@ load if not loaded\n // if (contents.length < 2) return resolve(null) NO might move on from 1-track album\n let j\n contents.sort() // sort by URI which hopefully will get tracks in order\n for (let i = 0; i < contents.length; i++) {\n if (current.uri === contents[i].uri) {\n j = (i + 1) % contents.length\n if (j === 0) {\n if (!options.chainAlbums) {\n if (options.loop) {\n return resolve(contents[j])\n }\n return resolve(null) // No more music needed\n } else {\n // chain albums\n if (level === 1 || !options.chainAlbums) return resolve(null) // limit of navigating treee\n moveOn(folder, level + 1).then(function (folder2) {\n if (folder2) {\n kb.fetcher.load(folder2).then(function (_xhr) {\n const contents = kb.each(folder2, ns.ldp('contains'))\n if (contents.length === 0) return resolve(null)\n contents.sort()\n console.log('New Album: ' + folder2)\n return resolve(contents[0]) // Start off new album\n })\n }\n })\n }\n } else {\n return resolve(contents[j])\n }\n }\n } // for\n })\n })\n }\n const endedListener = function (event) {\n const current = kb.sym(event.target.getAttribute('src'))\n if (!options.chain) return\n const tryNext = function (cur) {\n const current = cur\n moveOn(current).then(function (next) {\n if (!next) {\n console.log('No successor to ' + current)\n return\n }\n if (!looksRedundant(next)) {\n console.log('Moving on to ' + next)\n guessNames(next)\n controlRow.appendChild(audioControl(next, true)) // Force autoplay\n controlRow.removeChild(event.target)\n } else {\n console.log('Ignoring redundant ' + next)\n tryNext(next)\n }\n })\n }\n tryNext(current)\n }\n\n const audioControl = function (song, autoplay) {\n const audio = dom.createElement('audio')\n audio.setAttribute('controls', 'yes')\n // get audio with authenticated fetch\n kb.fetcher._fetch(song.uri)\n .then(function (response) {\n return response.blob()\n })\n .then(function (myBlob) {\n const objectURL = URL.createObjectURL(myBlob)\n audio.setAttribute('src', objectURL) // w640 h480 //\n })\n\n if (autoplay) {\n audio.setAttribute('autoplay', 'autoplay') // Make this a personal preference\n }\n audio.addEventListener('ended', endedListener, false)\n return audio\n }\n\n const div = dom.createElement('div')\n const table = div.appendChild(dom.createElement('table'))\n const labelStyle = 'padding: 0.3em; color:white; background-color: black;'\n const artistRow = table.appendChild(dom.createElement('tr'))\n artistRow.style.cssText = labelStyle\n const albumRow = table.appendChild(dom.createElement('tr'))\n albumRow.style.cssText = labelStyle\n const trackRow = table.appendChild(dom.createElement('tr'))\n trackRow.style.cssText = labelStyle\n const controlRow = table.appendChild(dom.createElement('tr'))\n guessNames(subject)\n controlRow.appendChild(audioControl(subject, options.autoplay))\n\n if (!kb.holds(undefined, ns.ldp('contains'), subject) && subject.dir()) {\n kb.fetcher.load(subject.dir()) // Prefetch enclosing @@ or playlist\n }\n\n return div\n }\n}\n\n// ends\n"],"mappings":"wIAKA,IAAM,EAAKA,EAAG,GAEd,EAAe,CACb,KAAMA,EAAG,MAAM,SAAW,kBAE1B,KAAM,QAGN,MAAO,SAAU,EAAS,EAAS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EAAI,cAAc,IAAI,CAAC,EAC1D,EAAS,MAAM,QAAU,EACzB,IAAM,EAAa,EAAM,YAAY,EAAI,cAAc,IAAI,CAAC,EAQ5D,OAPA,EAAW,CAAO,EAClB,EAAW,YAAY,EAAa,EAAS,EAAQ,QAAQ,CAAC,EAE1D,CAAC,EAAG,MAAM,IAAA,GAAW,EAAG,IAAI,UAAU,EAAG,CAAO,GAAK,EAAQ,IAAI,GACnE,EAAG,QAAQ,KAAK,EAAQ,IAAI,CAAC,EAGxB,CACT,CACF"}
@@ -46,16 +46,19 @@ var n = e.ns, r = {
46
46
  r.fetcher.load(o).then(function(s) {
47
47
  let c = r.each(o, n.ldp("contains")), u;
48
48
  c.sort();
49
- for (let s = 0; s < c.length; s++) if (e.uri === c[s].uri) if (u = (s + 1) % c.length, u === 0) if (a.chainAlbums) {
50
- if (t === 1 || !a.chainAlbums) return i(null);
51
- l(o, t + 1).then(function(e) {
52
- e && r.fetcher.load(e).then(function(t) {
53
- let a = r.each(e, n.ldp("contains"));
54
- return a.length === 0 ? i(null) : (a.sort(), console.log("New Album: " + e), i(a[0]));
55
- });
56
- });
57
- } else return a.loop ? i(c[u]) : i(null);
58
- else return i(c[u]);
49
+ for (let s = 0; s < c.length; s++) if (e.uri === c[s].uri) {
50
+ if (u = (s + 1) % c.length, u === 0) {
51
+ if (a.chainAlbums) {
52
+ if (t === 1 || !a.chainAlbums) return i(null);
53
+ l(o, t + 1).then(function(e) {
54
+ e && r.fetcher.load(e).then(function(t) {
55
+ let a = r.each(e, n.ldp("contains"));
56
+ return a.length === 0 ? i(null) : (a.sort(), console.log("New Album: " + e), i(a[0]));
57
+ });
58
+ });
59
+ } else return a.loop ? i(c[u]) : i(null);
60
+ } else return i(c[u]);
61
+ }
59
62
  });
60
63
  });
61
64
  }, u = function(e) {
@@ -1 +1 @@
1
- {"version":3,"file":"audioPane.esm.js","names":["ns"],"sources":["../../src/audio/audioPane.js"],"sourcesContent":["/* Single audio play Pane\n **\n */\nimport * as UI from 'solid-ui'\nimport * as $rdf from 'rdflib'\nconst ns = UI.ns\n\nexport default {\n icon: UI.icons.iconBase + 'noun_534313.svg',\n\n name: 'audio',\n\n // Does the subject deserve an audio play pane?\n label: function (subject, context) {\n const kb = context.session.store\n const typeURIs = kb.findTypeURIs(subject)\n\n const prefix = $rdf.Util.mediaTypeClass('audio/*').uri.split('*')[0]\n for (const t in typeURIs) {\n if (t.startsWith(prefix)) return 'Play audio'\n }\n return null\n },\n\n render: function (subject, context) {\n const kb = context.session.store\n const dom = context.dom\n const options = {\n autoplay: false,\n chain: true,\n chainAlbums: true,\n loop: false\n }\n\n const removeExtension = function (str) {\n const dot = str.lastIndexOf('.')\n if (dot < 0) return str // if any\n const slash = str.lastIndexOf('/')\n if (dot < slash) return str\n return str.slice(0, dot)\n }\n\n // True if there is another file like song.mp3 when this is \"song 1.mp3\"\n // or this is song.m4a\n //\n const looksRedundant = function (x) {\n const folder = kb.any(undefined, ns.ldp('contains'), x)\n if (!folder) return false\n const contents = kb.each(folder, ns.ldp('contains'))\n if (contents.length < 2) return false\n const thisName = x.uri\n for (let k = 0; k < contents.length; k++) {\n const otherName = contents[k].uri\n if (\n thisName.length > otherName.length &&\n thisName.startsWith(removeExtension(otherName))\n ) {\n return true\n }\n if (\n thisName.endsWith('.m4a') &&\n otherName.endsWith('.mp3') &&\n removeExtension(thisName) === removeExtension(otherName)\n ) {\n return true\n }\n }\n return false\n }\n\n // Alternative methods could include:\n // Accesing metadata in the audio contol, or paring the audio file\n const guessNames = function (x) {\n const a = x.uri.split('/').slice(-3) // Hope artist, album, track\n const decode = function (str) {\n try {\n return decodeURIComponent(str)\n } catch (e) {\n return str\n }\n }\n artistRow.textContent = decode(a[0])\n albumRow.textContent = decode(a[1])\n trackRow.textContent = decode(removeExtension(a[2]))\n }\n\n const moveOn = function (current, level) {\n return new Promise(function (resolve) {\n level = level || 0\n if (!options.chain) return resolve(null)\n // Ideally navigate graph else cheat with URI munging:\n const folder =\n kb.any(undefined, ns.ldp('contains'), current) || current.dir()\n if (!folder) return resolve(null)\n kb.fetcher.load(folder).then(function (_xhr) {\n const contents = kb.each(folder, ns.ldp('contains')) // @@ load if not loaded\n // if (contents.length < 2) return resolve(null) NO might move on from 1-track album\n let j\n contents.sort() // sort by URI which hopefully will get tracks in order\n for (let i = 0; i < contents.length; i++) {\n if (current.uri === contents[i].uri) {\n j = (i + 1) % contents.length\n if (j === 0) {\n if (!options.chainAlbums) {\n if (options.loop) {\n return resolve(contents[j])\n }\n return resolve(null) // No more music needed\n } else {\n // chain albums\n if (level === 1 || !options.chainAlbums) return resolve(null) // limit of navigating treee\n moveOn(folder, level + 1).then(function (folder2) {\n if (folder2) {\n kb.fetcher.load(folder2).then(function (_xhr) {\n const contents = kb.each(folder2, ns.ldp('contains'))\n if (contents.length === 0) return resolve(null)\n contents.sort()\n console.log('New Album: ' + folder2)\n return resolve(contents[0]) // Start off new album\n })\n }\n })\n }\n } else {\n return resolve(contents[j])\n }\n }\n } // for\n })\n })\n }\n const endedListener = function (event) {\n const current = kb.sym(event.target.getAttribute('src'))\n if (!options.chain) return\n const tryNext = function (cur) {\n const current = cur\n moveOn(current).then(function (next) {\n if (!next) {\n console.log('No successor to ' + current)\n return\n }\n if (!looksRedundant(next)) {\n console.log('Moving on to ' + next)\n guessNames(next)\n controlRow.appendChild(audioControl(next, true)) // Force autoplay\n controlRow.removeChild(event.target)\n } else {\n console.log('Ignoring redundant ' + next)\n tryNext(next)\n }\n })\n }\n tryNext(current)\n }\n\n const audioControl = function (song, autoplay) {\n const audio = dom.createElement('audio')\n audio.setAttribute('controls', 'yes')\n // get audio with authenticated fetch\n kb.fetcher._fetch(song.uri)\n .then(function (response) {\n return response.blob()\n })\n .then(function (myBlob) {\n const objectURL = URL.createObjectURL(myBlob)\n audio.setAttribute('src', objectURL) // w640 h480 //\n })\n\n if (autoplay) {\n audio.setAttribute('autoplay', 'autoplay') // Make this a personal preference\n }\n audio.addEventListener('ended', endedListener, false)\n return audio\n }\n\n const div = dom.createElement('div')\n const table = div.appendChild(dom.createElement('table'))\n const labelStyle = 'padding: 0.3em; color:white; background-color: black;'\n const artistRow = table.appendChild(dom.createElement('tr'))\n artistRow.style.cssText = labelStyle\n const albumRow = table.appendChild(dom.createElement('tr'))\n albumRow.style.cssText = labelStyle\n const trackRow = table.appendChild(dom.createElement('tr'))\n trackRow.style.cssText = labelStyle\n const controlRow = table.appendChild(dom.createElement('tr'))\n guessNames(subject)\n controlRow.appendChild(audioControl(subject, options.autoplay))\n\n if (!kb.holds(undefined, ns.ldp('contains'), subject) && subject.dir()) {\n kb.fetcher.load(subject.dir()) // Prefetch enclosing @@ or playlist\n }\n\n return div\n }\n}\n\n// ends\n"],"mappings":";;;AAKA,IAAMA,IAAK,EAAG,IAEd,IAAe;CACb,MAAM,EAAG,MAAM,WAAW;CAE1B,MAAM;CAGN,OAAO,SAAU,GAAS,GAAS;EAEjC,IAAM,IADK,EAAQ,QAAQ,MACP,aAAa,CAAO,GAElC,IAAS,EAAK,KAAK,eAAe,SAAS,CAAC,CAAC,IAAI,MAAM,GAAG,CAAC,CAAC;EAClE,KAAK,IAAM,KAAK,GACd,IAAI,EAAE,WAAW,CAAM,GAAG,OAAO;EAEnC,OAAO;CACT;CAEA,QAAQ,SAAU,GAAS,GAAS;EAClC,IAAM,IAAK,EAAQ,QAAQ,OACrB,IAAM,EAAQ,KACd,IAAU;GACd,UAAU;GACV,OAAO;GACP,aAAa;GACb,MAAM;EACR,GAEM,IAAkB,SAAU,GAAK;GACrC,IAAM,IAAM,EAAI,YAAY,GAAG;GAI/B,OAHI,IAAM,KAEN,IADU,EAAI,YAAY,GAChB,IAAU,IACjB,EAAI,MAAM,GAAG,CAAG;EACzB,GAKM,IAAiB,SAAU,GAAG;GAClC,IAAM,IAAS,EAAG,IAAI,KAAA,GAAWA,EAAG,IAAI,UAAU,GAAG,CAAC;GACtD,IAAI,CAAC,GAAQ,OAAO;GACpB,IAAM,IAAW,EAAG,KAAK,GAAQA,EA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,EAAK,GAAG,CAAC,CACxB,KAAK,SAAU,GAAU;IACxB,OAAO,EAAS,KAAK;GACvB,CAAC,CAAC,CACD,KAAK,SAAU,GAAQ;IACtB,IAAM,IAAY,IAAI,gBAAgB,CAAM;IAC5C,EAAM,aAAa,OAAO,CAAS;GACrC,CAAC,GAEC,KACF,EAAM,aAAa,YAAY,UAAU,GAE3C,EAAM,iBAAiB,SAAS,GAAe,EAAK,GAC7C;EACT,GAEM,IAAM,EAAI,cAAc,KAAK,GAC7B,IAAQ,EAAI,YAAY,EAAI,cAAc,OAAO,CAAC,GAClD,IAAa,yDACb,IAAY,EAAM,YAAY,EAAI,cAAc,IAAI,CAAC;EAC3D,EAAU,MAAM,UAAU;EAC1B,IAAM,IAAW,EAAM,YAAY,EAAI,cAAc,IAAI,CAAC;EAC1D,EAAS,MAAM,UAAU;EACzB,IAAM,IAAW,EAAM,YAAY,EAAI,cAAc,IAAI,CAAC;EAC1D,EAAS,MAAM,UAAU;EACzB,IAAM,IAAa,EAAM,YAAY,EAAI,cAAc,IAAI,CAAC;EAQ5D,OAPA,EAAW,CAAO,GAClB,EAAW,YAAY,EAAa,GAAS,EAAQ,QAAQ,CAAC,GAE1D,CAAC,EAAG,MAAM,KAAA,GAAWA,EAAG,IAAI,UAAU,GAAG,CAAO,KAAK,EAAQ,IAAI,KACnE,EAAG,QAAQ,KAAK,EAAQ,IAAI,CAAC,GAGxB;CACT;AACF"}
1
+ {"version":3,"file":"audioPane.esm.js","names":["ns"],"sources":["../../src/audio/audioPane.js"],"sourcesContent":["/* Single audio play Pane\n **\n */\nimport * as UI from 'solid-ui'\nimport * as $rdf from 'rdflib'\nconst ns = UI.ns\n\nexport default {\n icon: UI.icons.iconBase + 'noun_534313.svg',\n\n name: 'audio',\n\n // Does the subject deserve an audio play pane?\n label: function (subject, context) {\n const kb = context.session.store\n const typeURIs = kb.findTypeURIs(subject)\n\n const prefix = $rdf.Util.mediaTypeClass('audio/*').uri.split('*')[0]\n for (const t in typeURIs) {\n if (t.startsWith(prefix)) return 'Play audio'\n }\n return null\n },\n\n render: function (subject, context) {\n const kb = context.session.store\n const dom = context.dom\n const options = {\n autoplay: false,\n chain: true,\n chainAlbums: true,\n loop: false\n }\n\n const removeExtension = function (str) {\n const dot = str.lastIndexOf('.')\n if (dot < 0) return str // if any\n const slash = str.lastIndexOf('/')\n if (dot < slash) return str\n return str.slice(0, dot)\n }\n\n // True if there is another file like song.mp3 when this is \"song 1.mp3\"\n // or this is song.m4a\n //\n const looksRedundant = function (x) {\n const folder = kb.any(undefined, ns.ldp('contains'), x)\n if (!folder) return false\n const contents = kb.each(folder, ns.ldp('contains'))\n if (contents.length < 2) return false\n const thisName = x.uri\n for (let k = 0; k < contents.length; k++) {\n const otherName = contents[k].uri\n if (\n thisName.length > otherName.length &&\n thisName.startsWith(removeExtension(otherName))\n ) {\n return true\n }\n if (\n thisName.endsWith('.m4a') &&\n otherName.endsWith('.mp3') &&\n removeExtension(thisName) === removeExtension(otherName)\n ) {\n return true\n }\n }\n return false\n }\n\n // Alternative methods could include:\n // Accesing metadata in the audio contol, or paring the audio file\n const guessNames = function (x) {\n const a = x.uri.split('/').slice(-3) // Hope artist, album, track\n const decode = function (str) {\n try {\n return decodeURIComponent(str)\n } catch (e) {\n return str\n }\n }\n artistRow.textContent = decode(a[0])\n albumRow.textContent = decode(a[1])\n trackRow.textContent = decode(removeExtension(a[2]))\n }\n\n const moveOn = function (current, level) {\n return new Promise(function (resolve) {\n level = level || 0\n if (!options.chain) return resolve(null)\n // Ideally navigate graph else cheat with URI munging:\n const folder =\n kb.any(undefined, ns.ldp('contains'), current) || current.dir()\n if (!folder) return resolve(null)\n kb.fetcher.load(folder).then(function (_xhr) {\n const contents = kb.each(folder, ns.ldp('contains')) // @@ load if not loaded\n // if (contents.length < 2) return resolve(null) NO might move on from 1-track album\n let j\n contents.sort() // sort by URI which hopefully will get tracks in order\n for (let i = 0; i < contents.length; i++) {\n if (current.uri === contents[i].uri) {\n j = (i + 1) % contents.length\n if (j === 0) {\n if (!options.chainAlbums) {\n if (options.loop) {\n return resolve(contents[j])\n }\n return resolve(null) // No more music needed\n } else {\n // chain albums\n if (level === 1 || !options.chainAlbums) return resolve(null) // limit of navigating treee\n moveOn(folder, level + 1).then(function (folder2) {\n if (folder2) {\n kb.fetcher.load(folder2).then(function (_xhr) {\n const contents = kb.each(folder2, ns.ldp('contains'))\n if (contents.length === 0) return resolve(null)\n contents.sort()\n console.log('New Album: ' + folder2)\n return resolve(contents[0]) // Start off new album\n })\n }\n })\n }\n } else {\n return resolve(contents[j])\n }\n }\n } // for\n })\n })\n }\n const endedListener = function (event) {\n const current = kb.sym(event.target.getAttribute('src'))\n if (!options.chain) return\n const tryNext = function (cur) {\n const current = cur\n moveOn(current).then(function (next) {\n if (!next) {\n console.log('No successor to ' + current)\n return\n }\n if (!looksRedundant(next)) {\n console.log('Moving on to ' + next)\n guessNames(next)\n controlRow.appendChild(audioControl(next, true)) // Force autoplay\n controlRow.removeChild(event.target)\n } else {\n console.log('Ignoring redundant ' + next)\n tryNext(next)\n }\n })\n }\n tryNext(current)\n }\n\n const audioControl = function (song, autoplay) {\n const audio = dom.createElement('audio')\n audio.setAttribute('controls', 'yes')\n // get audio with authenticated fetch\n kb.fetcher._fetch(song.uri)\n .then(function (response) {\n return response.blob()\n })\n .then(function (myBlob) {\n const objectURL = URL.createObjectURL(myBlob)\n audio.setAttribute('src', objectURL) // w640 h480 //\n })\n\n if (autoplay) {\n audio.setAttribute('autoplay', 'autoplay') // Make this a personal preference\n }\n audio.addEventListener('ended', endedListener, false)\n return audio\n }\n\n const div = dom.createElement('div')\n const table = div.appendChild(dom.createElement('table'))\n const labelStyle = 'padding: 0.3em; color:white; background-color: black;'\n const artistRow = table.appendChild(dom.createElement('tr'))\n artistRow.style.cssText = labelStyle\n const albumRow = table.appendChild(dom.createElement('tr'))\n albumRow.style.cssText = labelStyle\n const trackRow = table.appendChild(dom.createElement('tr'))\n trackRow.style.cssText = labelStyle\n const controlRow = table.appendChild(dom.createElement('tr'))\n guessNames(subject)\n controlRow.appendChild(audioControl(subject, options.autoplay))\n\n if (!kb.holds(undefined, ns.ldp('contains'), subject) && subject.dir()) {\n kb.fetcher.load(subject.dir()) // Prefetch enclosing @@ or playlist\n }\n\n return div\n }\n}\n\n// ends\n"],"mappings":";;;AAKA,IAAMA,IAAK,EAAG,IAEd,IAAe;CACb,MAAM,EAAG,MAAM,WAAW;CAE1B,MAAM;CAGN,OAAO,SAAU,GAAS,GAAS;EAEjC,IAAM,IADK,EAAQ,QAAQ,MACP,aAAa,CAAO,GAElC,IAAS,EAAK,KAAK,eAAe,SAAS,CAAC,CAAC,IAAI,MAAM,GAAG,CAAC,CAAC;EAClE,KAAK,IAAM,KAAK,GACd,IAAI,EAAE,WAAW,CAAM,GAAG,OAAO;EAEnC,OAAO;CACT;CAEA,QAAQ,SAAU,GAAS,GAAS;EAClC,IAAM,IAAK,EAAQ,QAAQ,OACrB,IAAM,EAAQ,KACd,IAAU;GACd,UAAU;GACV,OAAO;GACP,aAAa;GACb,MAAM;EACR,GAEM,IAAkB,SAAU,GAAK;GACrC,IAAM,IAAM,EAAI,YAAY,GAAG;GAI/B,OAHI,IAAM,KAEN,IADU,EAAI,YAAY,GAChB,IAAU,IACjB,EAAI,MAAM,GAAG,CAAG;EACzB,GAKM,IAAiB,SAAU,GAAG;GAClC,IAAM,IAAS,EAAG,IAAI,KAAA,GAAWA,EAAG,IAAI,UAAU,GAAG,CAAC;GACtD,IAAI,CAAC,GAAQ,OAAO;GACpB,IAAM,IAAW,EAAG,KAAK,GAAQA,EAAG,IAAI,UAAU,CAAC;GACnD,IAAI,EAAS,SAAS,GAAG,OAAO;GAChC,IAAM,IAAW,EAAE;GACnB,KAAK,IAAI,IAAI,GAAG,IAAI,EAAS,QAAQ,KAAK;IACxC,IAAM,IAAY,EAAS,EAAE,CAAC;IAO9B,IALE,EAAS,SAAS,EAAU,UAC5B,EAAS,WAAW,EAAgB,CAAS,CAAC,KAK9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AU,GAE3C,EAAM,iBAAiB,SAAS,GAAe,EAAK,GAC7C;EACT,GAEM,IAAM,EAAI,cAAc,KAAK,GAC7B,IAAQ,EAAI,YAAY,EAAI,cAAc,OAAO,CAAC,GAClD,IAAa,yDACb,IAAY,EAAM,YAAY,EAAI,cAAc,IAAI,CAAC;EAC3D,EAAU,MAAM,UAAU;EAC1B,IAAM,IAAW,EAAM,YAAY,EAAI,cAAc,IAAI,CAAC;EAC1D,EAAS,MAAM,UAAU;EACzB,IAAM,IAAW,EAAM,YAAY,EAAI,cAAc,IAAI,CAAC;EAC1D,EAAS,MAAM,UAAU;EACzB,IAAM,IAAa,EAAM,YAAY,EAAI,cAAc,IAAI,CAAC;EAQ5D,OAPA,EAAW,CAAO,GAClB,EAAW,YAAY,EAAa,GAAS,EAAQ,QAAQ,CAAC,GAE1D,CAAC,EAAG,MAAM,KAAA,GAAWA,EAAG,IAAI,UAAU,GAAG,CAAO,KAAK,EAAQ,IAAI,KACnE,EAAG,QAAQ,KAAK,EAAQ,IAAI,CAAC,GAGxB;CACT;AACF"}
@@ -0,0 +1,14 @@
1
+ require("../../_virtual/~icons/lucide/share-2.cjs.js"),require("../../_virtual/~icons/lucide/pencil.cjs.js"),require("../../_virtual/~icons/lucide/ellipsis-vertical.cjs.js");const e=require("./FileExplorerHeader.styles.cjs.js");require("./FileExplorerHeaderSummary.cjs.js"),require("./FileExplorerHeaderControls.cjs.js");const t=require("./helper.cjs.js");let n=require("solid-ui"),r=require("rdflib"),i=require("lit"),a=require("@lit/context"),o=require("lit/decorators.js");var s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T;function E(e,t,n){D(e,t),t.set(e,n)}function D(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function O(e,t,n){return e.set(A(e,t),n),n}function k(e,t){return e.get(A(e,t))}function A(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function j(e,t,n){return(t=N(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M(e,t,n,r,i,a){function o(e,t,n){return function(r,i){return n&&n(r),e[t].call(r,i)}}function s(e,t){for(var n=0;n<e.length;n++)e[n].call(t);return t}function c(e,t,n,r){if(typeof e!=`function`&&(r||e!==void 0))throw TypeError(t+` must `+(n||`be`)+` a function`+(r?``:` or undefined`));return e}function l(e,t,n,r,i,a,s,l,u,d,f,p,m){function h(e){if(!m(e))throw TypeError(`Attempted to access private element on non-instance`)}var g,_=t[0],v=t[3],y=!l;if(!y){n||Array.isArray(_)||(_=[_]);var b={},x=[],S=i===3?`get`:i===4||p?`set`:`value`;d?(f||p?b={get:F(function(){return v(this)},r,`get`),set:function(e){t[4](this,e)}}:b[S]=v,f||F(b[S],r,i===2?``:S)):f||(b=Object.getOwnPropertyDescriptor(e,r))}for(var C=e,w=_.length-1;w>=0;w-=n?2:1){var T=_[w],E=n?_[w-1]:void 0,D={},O={kind:[`field`,`accessor`,`method`,`getter`,`setter`,`class`][i],name:r,metadata:a,addInitializer:function(e,t){if(e.v)throw Error(`attempted to call addInitializer after decoration was finished`);c(t,`An initializer`,`be`,!0),s.push(t)}.bind(null,D)};try{if(y)(g=c(T.call(E,C,O),`class decorators`,`return`))&&(C=g);else{var k,A;O.static=u,O.private=d,d?i===2?k=function(e){return h(e),b.value}:(i<4&&(k=o(b,`get`,h)),i!==3&&(A=o(b,`set`,h))):(k=function(e){return e[r]},(i<2||i===4)&&(A=function(e,t){e[r]=t}));var j=O.access={has:d?m.bind():function(e){return r in e}};if(k&&(j.get=k),A&&(j.set=A),C=T.call(E,p?{get:b.get,set:b.set}:b[S],O),p){if(typeof C==`object`&&C)(g=c(C.get,`accessor.get`))&&(b.get=g),(g=c(C.set,`accessor.set`))&&(b.set=g),(g=c(C.init,`accessor.init`))&&x.push(g);else if(C!==void 0)throw TypeError(`accessor decorators must return an object with get, set, or init properties or void 0`)}else c(C,(f?`field`:`method`)+` decorators`,`return`)&&(f?x.push(C):b[S]=C)}}finally{D.v=!0}}return(f||p)&&l.push(function(e,t){for(var n=x.length-1;n>=0;n--)t=x[n].call(e,t);return t}),f||y||(d?p?l.push(o(b,`get`),o(b,`set`)):l.push(i===2?b[S]:o.call.bind(b[S])):Object.defineProperty(e,r,b)),C}function u(e,t){return Object.defineProperty(e,Symbol.metadata||Symbol.for(`Symbol.metadata`),{configurable:!0,enumerable:!0,value:t})}if(arguments.length>=6)var d=a[Symbol.metadata||Symbol.for(`Symbol.metadata`)];var f=Object.create(d??null),p=function(e,t,n,r){var i,a,o=[],c=function(t){return I(t)===e},u=new Map;function d(e){e&&o.push(s.bind(null,e))}for(var f=0;f<t.length;f++){var p=t[f];if(Array.isArray(p)){var m=p[1],h=p[2],g=p.length>3,_=16&m,v=!!(8&m),y=(m&=7)==0,b=h+`/`+v;if(!y&&!g){var x=u.get(b);if(!0===x||x===3&&m!==4||x===4&&m!==3)throw Error(`Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: `+h);u.set(b,!(m>2)||m)}l(v?e:e.prototype,p,_,g?`#`+h:N(h),m,r,v?a||=[]:i||=[],o,v,g,y,m===1,v&&g?c:n)}}return d(i),d(a),o}(e,t,i,f);return n.length||u(e,f),{e:p,get c(){var t=[];return n.length&&[u(l(e,[n],r,e.name,5,f,t),f),s.bind(null,t,e)]}}}function N(e){var t=P(e,`string`);return typeof t==`symbol`?t:t+``}function P(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function F(e,t,n){typeof t==`symbol`&&(t=(t=t.description)?`[`+t+`]`:``);try{Object.defineProperty(e,"name",{configurable:!0,value:n?n+` `+t:t})}catch{}return e}function I(e){if(Object(e)!==e)throw TypeError(`right-hand side of 'in' should be an object, got `+(e===null?`null`:typeof e));return e}function L(e){return e}h=[(0,o.customElement)(`file-explorer-header`)];var R;new(w=(l=new WeakMap,u=new WeakMap,d=new WeakMap,f=new WeakMap,T=(g=(0,a.consume)({context:n.fileExplorerContext,subscribe:!0}),v=(0,o.property)({attribute:!1}),b=(0,o.property)({attribute:!1}),S=(0,o.state)(),`_loadedMetadataForUri`),c=class extends n.WebComponent{constructor(...e){super(...e),j(this,T,void p(this)),E(this,l,_(this,void 0)),E(this,u,y(this,[])),E(this,d,x(this,void 0)),E(this,f,C(this,{modified:void 0,isPublic:!1,canEdit:!1,aclUri:void 0}))}get fileExplorerContext(){return k(l,this)}set fileExplorerContext(e){O(l,this,e)}get menuItems(){return k(u,this)}set menuItems(e){O(u,this,e)}get paneIcon(){return k(d,this)}set paneIcon(e){O(d,this,e)}get responseMetadata(){return k(f,this)}set responseMetadata(e){O(f,this,e)}getDefaultResponseMetadata(){return{modified:void 0,isPublic:!1,canEdit:!1,aclUri:void 0}}updated(){this.fileExplorerContext?.store&&this.fileExplorerContext.subjectUri&&this._loadedMetadataForUri!==this.fileExplorerContext.subjectUri&&(this._loadedMetadataForUri=this.fileExplorerContext.subjectUri,this.loadResponseMetadata())}async loadResponseMetadata(){if(!(!this.fileExplorerContext?.store||!this.fileExplorerContext.subjectUri))try{let{metadata:e}=await t.fetchContentAndMetadata(this.fileExplorerContext.store,(0,r.sym)(this.fileExplorerContext.subjectUri));this.responseMetadata={modified:e.modified,isPublic:e.isPublic,canEdit:e.canEdit,aclUri:e.aclUri}}catch(e){this.responseMetadata=this.getDefaultResponseMetadata(),console.warn(`Failed to load response metadata`,e)}}render(){return i.html`
2
+ <header>
3
+ <file-explorer-header-summary
4
+ .paneIcon=${this.paneIcon}
5
+ .onBackClick=${this.fileExplorerContext?.onBack}
6
+ .responseMetadata=${this.responseMetadata}
7
+ ></file-explorer-header-summary>
8
+ <file-explorer-header-controls
9
+ .menuItems=${this.menuItems}
10
+ .canEdit=${this.responseMetadata.canEdit}
11
+ ></file-explorer-header-controls>
12
+ </header>
13
+ `}},{e:[_,y,x,C,p],c:[R,m]}=M(c,[[g,1,`fileExplorerContext`],[v,1,`menuItems`],[b,1,`paneIcon`],[S,1,`responseMetadata`]],h,0,void 0,n.WebComponent),c),s=class extends L{constructor(){super(R),j(this,`styles`,e.default),m()}},j(s,w,void 0),s),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return R}});
14
+ //# sourceMappingURL=FileExplorerHeader.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileExplorerHeader.cjs.js","names":["sym","WebComponent","fileExplorerContext","customElement","property","state","consume","html","styles","fetchContentAndMetadata","_classDecs","_FileExplorerHeader","_FileExplorerHeader2","_A","WeakMap","_B","_C","_D","_ref","_fileExplorerContextDecs","context","subscribe","_menuItemsDecs","attribute","_paneIconDecs","_responseMetadataDecs","_FileExplorerHeader3","FileExplorerHeader","constructor","args","_defineProperty","_initProto","_classPrivateFieldInitSpec","_init_fileExplorerContext","undefined","_init_menuItems","_init_paneIcon","_init_responseMetadata","modified","isPublic","canEdit","aclUri","_classPrivateFieldGet","v","_classPrivateFieldSet","menuItems","paneIcon","responseMetadata","getDefaultResponseMetadata","updated","store","subjectUri","_loadedMetadataForUri","loadResponseMetadata","metadata","error","console","warn","render","onBack","e","c","_initClass","_applyDecs","_Class","_identity","default"],"sources":["../../../src/components/file-explorer-header/FileExplorerHeader.ts"],"sourcesContent":["import { sym } from 'rdflib'\nimport { WebComponent, type FileExplorerContext, fileExplorerContext } from 'solid-ui'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { consume } from '@lit/context'\nimport { html } from 'lit'\nimport '~icons/lucide/share-2'\nimport '~icons/lucide/pencil'\nimport '~icons/lucide/ellipsis-vertical'\nimport styles from './FileExplorerHeader.styles.css'\nimport './FileExplorerHeaderSummary'\nimport './FileExplorerHeaderControls'\nimport { PaneIcon } from './types'\nimport { fetchContentAndMetadata, type FileExplorerResourceMetadata } from './helper'\n\n@customElement('file-explorer-header')\nexport default class FileExplorerHeader extends WebComponent {\n static styles = styles\n\n private _loadedMetadataForUri: string | undefined\n\n @consume({ context: fileExplorerContext, subscribe: true })\n accessor fileExplorerContext: FileExplorerContext = undefined as unknown as FileExplorerContext\n\n @property({ attribute: false })\n accessor menuItems: Array<{ label: string, action: (event: Event) => void }> = []\n\n @property({ attribute: false })\n accessor paneIcon: PaneIcon = undefined as unknown as PaneIcon\n\n @state()\n accessor responseMetadata: Pick<FileExplorerResourceMetadata, 'modified' | 'isPublic' | 'canEdit' | 'aclUri'> = {\n modified: undefined,\n isPublic: false,\n canEdit: false,\n aclUri: undefined\n }\n\n private getDefaultResponseMetadata (): Pick<FileExplorerResourceMetadata, 'modified' | 'isPublic' | 'canEdit' | 'aclUri'> {\n return {\n modified: undefined,\n isPublic: false,\n canEdit: false,\n aclUri: undefined\n }\n }\n\n protected updated () {\n if (this.fileExplorerContext?.store && this.fileExplorerContext.subjectUri && this._loadedMetadataForUri !== this.fileExplorerContext.subjectUri) {\n this._loadedMetadataForUri = this.fileExplorerContext.subjectUri\n this.loadResponseMetadata()\n }\n }\n\n private async loadResponseMetadata () {\n if (!this.fileExplorerContext?.store || !this.fileExplorerContext.subjectUri) return\n\n try {\n const { metadata } = await fetchContentAndMetadata(this.fileExplorerContext.store, sym(this.fileExplorerContext.subjectUri))\n this.responseMetadata = {\n modified: metadata.modified,\n isPublic: metadata.isPublic,\n canEdit: metadata.canEdit,\n aclUri: metadata.aclUri\n }\n } catch (error) {\n this.responseMetadata = this.getDefaultResponseMetadata()\n console.warn('Failed to load response metadata', error)\n }\n }\n\n render () {\n return html`\n <header>\n <file-explorer-header-summary\n .paneIcon=${this.paneIcon}\n .onBackClick=${this.fileExplorerContext?.onBack}\n .responseMetadata=${this.responseMetadata}\n ></file-explorer-header-summary>\n <file-explorer-header-controls\n .menuItems=${this.menuItems}\n .canEdit=${this.responseMetadata.canEdit}\n ></file-explorer-header-controls>\n </header>\n `\n }\n}\n"],"mappings":"0jJAYq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AArC,EAAA,CAAA,CAAAP,EAAA,EAAA,qBAAA,EAAA,CAAAG,EAAA,EAAA,WAAA,EAAA,CAAAE,EAAA,EAAA,UAAA,EAAA,CAAAC,EAAA,EAAA,kBAAA,CAAA,EAAAf,EAAA,EAAA,IAAA,GAtE+CT,EAAAA,YAAY,EAAAyB,GAAAsC,EAAA,cAAAC,CAAA,CAAArC,aAAA,CAAA,MAAAjB,CAAA,EAAAmB,EAAA,KAAA,SAC1CtB,EAAAA,OAAM,EAAAsD,EAAA,CAAA,CAAA,EAAAhC,EAAAkC,EAAApD,EAAA,IAAA,EAAA,EAAAoD"}
@@ -0,0 +1,19 @@
1
+ import { WebComponent, FileExplorerContext } from 'solid-ui';
2
+ import { PaneIcon } from './types';
3
+ import { FileExplorerResourceMetadata } from './helper';
4
+ export default class FileExplorerHeader extends WebComponent {
5
+ static styles: any;
6
+ private _loadedMetadataForUri;
7
+ accessor fileExplorerContext: FileExplorerContext;
8
+ accessor menuItems: Array<{
9
+ label: string;
10
+ action: (event: Event) => void;
11
+ }>;
12
+ accessor paneIcon: PaneIcon;
13
+ accessor responseMetadata: Pick<FileExplorerResourceMetadata, 'modified' | 'isPublic' | 'canEdit' | 'aclUri'>;
14
+ private getDefaultResponseMetadata;
15
+ protected updated(): void;
16
+ private loadResponseMetadata;
17
+ render(): import('lit-html').TemplateResult<1>;
18
+ }
19
+ //# sourceMappingURL=FileExplorerHeader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileExplorerHeader.d.ts","sourceRoot":"","sources":["../../../src/components/file-explorer-header/FileExplorerHeader.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,KAAK,mBAAmB,EAAuB,MAAM,UAAU,CAAA;AAItF,OAAO,uBAAuB,CAAA;AAC9B,OAAO,sBAAsB,CAAA;AAC7B,OAAO,iCAAiC,CAAA;AAExC,OAAO,6BAA6B,CAAA;AACpC,OAAO,8BAA8B,CAAA;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAClC,OAAO,EAA2B,KAAK,4BAA4B,EAAE,MAAM,UAAU,CAAA;AAGrF,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,YAAY;IAC1D,MAAM,CAAC,MAAM,MAAS;IAEtB,OAAO,CAAC,qBAAqB,CAAoB;IAGjD,QAAQ,CAAC,mBAAmB,EAAE,mBAAmB,CAA8C;IAG/F,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;KAAE,CAAC,CAAK;IAGjF,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAmC;IAG9D,QAAQ,CAAC,gBAAgB,EAAE,IAAI,CAAC,4BAA4B,EAAE,UAAU,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,CAAC,CAK5G;IAED,OAAO,CAAC,0BAA0B;IASlC,SAAS,CAAC,OAAO;YAOH,oBAAoB;IAiBlC,MAAM;CAeP"}