@nulib/clover 4.3.0 → 4.4.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 (289) hide show
  1. package/dist/components/Canvas/CanvasView.mjs +4 -0
  2. package/dist/components/Canvas/media/MediaBody.mjs +38 -10
  3. package/dist/components/Canvas/media/SeekMarks.mjs +236 -0
  4. package/dist/components/Canvas/media/Transport.mjs +26 -3
  5. package/dist/components/Canvas/media/useMediaElement.mjs +23 -11
  6. package/dist/components/Items/Item.mjs +30 -21
  7. package/dist/components/Items/Items.mjs +3 -1
  8. package/dist/components/Items/PagerLayout.mjs +1 -0
  9. package/dist/components/Map/MapView.mjs +7 -6
  10. package/dist/components/Panel/PanelToggle.mjs +3 -1
  11. package/dist/index.d.mts +26 -3
  12. package/dist/index.mjs +2 -1
  13. package/dist/map/index.d.mts +6 -0
  14. package/dist/react/hooks.mjs +3 -1
  15. package/dist/styles/core.css +1 -1
  16. package/dist/styles/default.css +1 -1
  17. package/dist/styles/media.css +1 -1
  18. package/dist/styles.css +1 -1
  19. package/dist/templates/document/Document.mjs +2 -3
  20. package/dist/templates/index.d.mts +433 -0
  21. package/dist/templates/index.mjs +19 -2
  22. package/dist/templates/shared/LightboxView.mjs +7 -5
  23. package/dist/templates/shared/PanelPane.mjs +27 -13
  24. package/dist/ui/Button.mjs +3 -1
  25. package/dist/ui/sheets/media.mjs +1 -1
  26. package/dist/web-components/{About-uNCjvWgs.mjs → About-BtaFd4AF.mjs} +1 -1
  27. package/dist/web-components/{AnnotationItems-JwlcCvPo.mjs → AnnotationItems-CowjcNUd.mjs} +1 -1
  28. package/dist/web-components/{AnnotationMenu-BWyKEyvW.mjs → AnnotationMenu-CuR-ZArp.mjs} +1 -1
  29. package/dist/web-components/{AnnotationState-Bhqs75Br.mjs → AnnotationState-DYkjbBGk.mjs} +1 -1
  30. package/dist/web-components/{Annotations-ZwcRh2UE.mjs → Annotations-BbSg10Oz.mjs} +1 -1
  31. package/dist/web-components/{Annotations-C7y0N8Lj.mjs → Annotations-CzeyfbPR.mjs} +1 -1
  32. package/dist/web-components/{Body-DyrvRDkt.mjs → Body-Bh8Nu8Fo.mjs} +1 -1
  33. package/dist/web-components/{BodyAlert-XV88XjL8.mjs → BodyAlert-Cra_XvnG.mjs} +1 -1
  34. package/dist/web-components/Button-CE-5ew-f.mjs +1 -0
  35. package/dist/web-components/{Camera-7SlnmGtb.mjs → Camera-Cr2RIqCs.mjs} +1 -1
  36. package/dist/web-components/{Canvas2DBackend-DBGZRGid.mjs → Canvas2DBackend-CH8h2VnH.mjs} +1 -1
  37. package/dist/web-components/CanvasView-DcrhjwpU.mjs +2 -0
  38. package/dist/web-components/{CaptionDetails-Bxz8AXMz.mjs → CaptionDetails-BgsrrXAm.mjs} +1 -1
  39. package/dist/web-components/{ChaptersMenu-CMQiBqvx.mjs → ChaptersMenu-Bl6PPqt2.mjs} +1 -1
  40. package/dist/web-components/{Chevron-B3XaClVT.mjs → Chevron-CePM9HdR.mjs} +1 -1
  41. package/dist/web-components/{ChoiceMenu-pugo5zxI.mjs → ChoiceMenu-ClsLiaxQ.mjs} +1 -1
  42. package/dist/web-components/{Collection-Ch_FeSKp.mjs → Collection-a_DaYUM4.mjs} +1 -1
  43. package/dist/web-components/{CollectionSelect-2jDEkOcK.mjs → CollectionSelect-XLruVPnQ.mjs} +1 -1
  44. package/dist/web-components/{Connected-3hnIPSWM.mjs → Connected-BqaysSD7.mjs} +1 -1
  45. package/dist/web-components/{Connected-Bne3I5E1.mjs → Connected-D30kPwoX.mjs} +1 -1
  46. package/dist/web-components/{Connected-DuANHN93.mjs → Connected-D_Y8fBZk.mjs} +1 -1
  47. package/dist/web-components/{Contents-DIQrin_-.mjs → Contents-CA6CnTu3.mjs} +1 -1
  48. package/dist/web-components/{ControlMenu-BydnCTTQ.mjs → ControlMenu-BTGCnS_-.mjs} +1 -1
  49. package/dist/web-components/ControlsFade-D-SexeLX.mjs +1 -0
  50. package/dist/web-components/{CountMenu-CReBYVwu.mjs → CountMenu-CpM-FXwx.mjs} +1 -1
  51. package/dist/web-components/Cue-DghSvEx4.mjs +1 -0
  52. package/dist/web-components/Document-FFVXMPwT.mjs +1 -0
  53. package/dist/web-components/{DomLayers-D9X_FPto.mjs → DomLayers-mS4hhHRF.mjs} +1 -1
  54. package/dist/web-components/{Download-B8MpVqgk.mjs → Download-CqYuifok.mjs} +1 -1
  55. package/dist/web-components/{EntryBodies-DdpRfU5U.mjs → EntryBodies-3IO45Orn.mjs} +1 -1
  56. package/dist/web-components/{EntryThumbnail-DM7Zjj1z.mjs → EntryThumbnail-Anfv7mFZ.mjs} +1 -1
  57. package/dist/web-components/{FieldPill-BAql8_6s.mjs → FieldPill-pocIy1LB.mjs} +1 -1
  58. package/dist/web-components/{FrameAnimation-Dj46RxuL.mjs → FrameAnimation-R4MeMOFu.mjs} +1 -1
  59. package/dist/web-components/{Gallery-B9FNA02Z.mjs → Gallery-DvS3b7CP.mjs} +1 -1
  60. package/dist/web-components/{HideToggle-duXvDvDw.mjs → HideToggle-29T-__gd.mjs} +1 -1
  61. package/dist/web-components/{ImageControls-DODKjC0d.mjs → ImageControls-1LGEiMZc.mjs} +1 -1
  62. package/dist/web-components/Items-GF8INTZw.mjs +1 -0
  63. package/dist/web-components/{Label-D4dlrtpH.mjs → Label-CMEDN1xd.mjs} +1 -1
  64. package/dist/web-components/{LanguageChoice-DR3X-dtJ.mjs → LanguageChoice-E8VCduh-.mjs} +1 -1
  65. package/dist/web-components/LightboxView-CKK5mjZc.mjs +1 -0
  66. package/dist/web-components/{ListEnd-CQ4vX-NW.mjs → ListEnd-YjSPUw9O.mjs} +1 -1
  67. package/dist/web-components/{Loaded-DsNSPXWf.mjs → Loaded-CTi6A9VS.mjs} +1 -1
  68. package/dist/web-components/{LoadedCanvas-Cq7_O2bw.mjs → LoadedCanvas-Bdqqh01C.mjs} +1 -1
  69. package/dist/web-components/LoadedMap-DN3MdhcJ.mjs +1 -0
  70. package/dist/web-components/{Loading-4PmhMeZ-.mjs → Loading-tVzMiUqD.mjs} +1 -1
  71. package/dist/web-components/{Map-B29Ba50b.mjs → Map-X1sSxMhL.mjs} +1 -1
  72. package/dist/web-components/MapView-nkpoN7X_.mjs +3 -0
  73. package/dist/web-components/{Markup-BZ7l5GbG.mjs → Markup-Bowjvwik.mjs} +1 -1
  74. package/dist/web-components/MediaBody-B-sQOihV.mjs +1 -0
  75. package/dist/web-components/MediaBody-DZZrA-DM.mjs +1 -0
  76. package/dist/web-components/{NavDate-0MsHRjBW.mjs → NavDate-Cc5i7OTE.mjs} +1 -1
  77. package/dist/web-components/{Navigator-qJ79A8Nk.mjs → Navigator-BAlMH9x3.mjs} +1 -1
  78. package/dist/web-components/{Pager-SPd_u0qz.mjs → Pager-DmIPop9E.mjs} +1 -1
  79. package/dist/web-components/PagerLayout-DPIiFt_i.mjs +1 -0
  80. package/dist/web-components/{Panel-C8r3EsWn.mjs → Panel-COAOFI-u.mjs} +1 -1
  81. package/dist/web-components/PanelPart-DGYFBVl7.mjs +1 -0
  82. package/dist/web-components/PanelToggle-C4B6UY5p.mjs +1 -0
  83. package/dist/web-components/{PartOfManifest-BdDSxK4k.mjs → PartOfManifest-DpZTyo9I.mjs} +1 -1
  84. package/dist/web-components/{Pending-CmgVU1kF.mjs → Pending-Ci8Pe6Ip.mjs} +1 -1
  85. package/dist/web-components/{PlaceBox-D7HLNGxE.mjs → PlaceBox-vlZhTMoG.mjs} +1 -1
  86. package/dist/web-components/{Placeholder-DVAlXejQ.mjs → Placeholder-DrJKiL3N.mjs} +1 -1
  87. package/dist/web-components/{Position-C6KUAceQ.mjs → Position-D46qbQob.mjs} +1 -1
  88. package/dist/web-components/{Primitives-ClQVjY6x.mjs → Primitives-CijKEUFK.mjs} +1 -1
  89. package/dist/web-components/{Provider-C0IUdU6v.mjs → Provider-hKagyo0v.mjs} +1 -1
  90. package/dist/web-components/{ReadMore-BiEJA4yO.mjs → ReadMore-B-l-lJxV.mjs} +1 -1
  91. package/dist/web-components/{Root-Drt5N4_s.mjs → Root-3orKkAAl.mjs} +1 -1
  92. package/dist/web-components/Scene-CQmIsctH.mjs +1 -0
  93. package/dist/web-components/{SceneView-BHg37-rs.mjs → SceneView-B8_AOroA.mjs} +1 -1
  94. package/dist/web-components/{Search-Bpd_lGzH.mjs → Search-BQhTX9cc.mjs} +1 -1
  95. package/dist/web-components/{Sections-D_bS5IQH.mjs → Sections-DK04V31W.mjs} +1 -1
  96. package/dist/web-components/SeekMarks-tjdJi7bR.mjs +1 -0
  97. package/dist/web-components/{StandaloneItems-YV9O9M8F.mjs → StandaloneItems-3l4YBXUu.mjs} +1 -1
  98. package/dist/web-components/{Status-BCG7AN9B.mjs → Status-ZeDFIe5P.mjs} +1 -1
  99. package/dist/web-components/{Steps-Dnn8Ajqf.mjs → Steps-Dw4i3bYY.mjs} +1 -1
  100. package/dist/web-components/{TargetItems-xxbtePln.mjs → TargetItems-DkNwteSd.mjs} +1 -1
  101. package/dist/web-components/Timeline-wqnaRrC1.mjs +1 -0
  102. package/dist/web-components/{Tip-DPFWlNLu.mjs → Tip-Dd_jhbIx.mjs} +1 -1
  103. package/dist/web-components/{Transcript-C-_DbUO5.mjs → Transcript-CVfpxNjD.mjs} +1 -1
  104. package/dist/web-components/Transport-DGXTdsId.mjs +1 -0
  105. package/dist/web-components/Transport-DJB0UXR1.mjs +1 -0
  106. package/dist/web-components/{annotation-collection-nmxzo_hO.mjs → annotation-collection-BTpPigqD.mjs} +1 -1
  107. package/dist/web-components/{annotation-name-DoUUo-8D.mjs → annotation-name-CFvHyKti.mjs} +1 -1
  108. package/dist/web-components/{annotations-content-Cl1upbdd.mjs → annotations-content-GrkrBVh0.mjs} +1 -1
  109. package/dist/web-components/{body-DC8Oq8rY.mjs → body-fIGeqGQD.mjs} +1 -1
  110. package/dist/web-components/{canvas-gzoTnBxw.mjs → canvas-BS2SLLKS.mjs} +1 -1
  111. package/dist/web-components/{cloverEngine-CFL1Bd7n.mjs → cloverEngine-CQIuzG6M.mjs} +1 -1
  112. package/dist/web-components/{content-state-reader-DYbmXxCp.mjs → content-state-reader-CYaSfkCN.mjs} +1 -1
  113. package/dist/web-components/{controlGlyphs-d7KUIUwi.mjs → controlGlyphs-DbocsVHI.mjs} +1 -1
  114. package/dist/web-components/{controls-VC9D1mwr.mjs → controls-wzIEvR64.mjs} +1 -1
  115. package/dist/web-components/custom-elements.json +22 -0
  116. package/dist/web-components/{downloads-D2cnWDbs.mjs → downloads-7EkgG29z.mjs} +1 -1
  117. package/dist/web-components/{dragToClose-CzYeh_12.mjs → dragToClose-Bop25BOK.mjs} +1 -1
  118. package/dist/web-components/{engine-Dcfyp2DV.mjs → engine-cAKeOT-F.mjs} +1 -1
  119. package/dist/web-components/{engines-BMr7naGM.mjs → engines-DJ3NJG7R.mjs} +1 -1
  120. package/dist/web-components/{fetchManifest-DxptUh4u.mjs → fetchManifest-BchmTYKJ.mjs} +1 -1
  121. package/dist/web-components/{fromManifest-BpPFLVyZ.mjs → fromManifest-IctmL1Dl.mjs} +1 -1
  122. package/dist/web-components/{glyphs-BCnJl8py.mjs → glyphs-BO-1m6-c.mjs} +1 -1
  123. package/dist/web-components/{hooks-Dz_5UXXp.mjs → hooks-Dl6ZSn_E.mjs} +1 -1
  124. package/dist/web-components/{image-layers-BPnq7jk1.mjs → image-layers-BWmHzoSJ.mjs} +1 -1
  125. package/dist/web-components/{imageService-DFPkPNfe.mjs → imageService-Dhb-E5rq.mjs} +1 -1
  126. package/dist/web-components/index-BAkCMEQf.mjs +1 -0
  127. package/dist/web-components/index.d.mts +3 -0
  128. package/dist/web-components/index.mjs +1 -1
  129. package/dist/web-components/{items-D03KhDg6.mjs → items-CDbMZvPN.mjs} +1 -1
  130. package/dist/web-components/items-Z6uMtKSM.mjs +1 -0
  131. package/dist/web-components/label-B32XGxUM.mjs +1 -0
  132. package/dist/web-components/{layout-DVa_DnGH.mjs → layout-BixQWLYR.mjs} +1 -1
  133. package/dist/web-components/{link-DxXxMXiw.mjs → link-DoDZrIK7.mjs} +1 -1
  134. package/dist/web-components/logo-DFdob1X0.mjs +1 -0
  135. package/dist/web-components/{models-pO77sm3z.mjs → models-qg8TrXAe.mjs} +1 -1
  136. package/dist/web-components/{nodes-CmL3eoRE.mjs → nodes-C_TYa0cJ.mjs} +1 -1
  137. package/dist/web-components/{overlayImage-DFGetjMh.mjs → overlayImage-utUhUeIp.mjs} +1 -1
  138. package/dist/web-components/{panel-B1vzUm6_.mjs → panel-Do2CIE4L.mjs} +1 -1
  139. package/dist/web-components/part-1MCSi0Gx.mjs +1 -0
  140. package/dist/web-components/{playerSurface-CQ1wrIAQ.mjs → playerSurface-D3T1sYp4.mjs} +1 -1
  141. package/dist/web-components/{pointer-DWnCT3D3.mjs → pointer-CAZRjvDP.mjs} +1 -1
  142. package/dist/web-components/{provider-U7xzX_0T.mjs → provider-CTvn2JYS.mjs} +1 -1
  143. package/dist/web-components/{range-regions-Di_lmVqZ.mjs → range-regions-Bn6iZRLa.mjs} +1 -1
  144. package/dist/web-components/{read-more-BtA1sriO.mjs → read-more-sUL-TwGp.mjs} +1 -1
  145. package/dist/web-components/{readingLanguages-Ptho-Co9.mjs → readingLanguages-JQPbnrhL.mjs} +1 -1
  146. package/dist/web-components/{rendererSurface-BgZPnAwj.mjs → rendererSurface-CE09-Vp6.mjs} +2 -2
  147. package/dist/web-components/{renderers-hoD3WKYA.mjs → renderers-J_Go4mqn.mjs} +1 -1
  148. package/dist/web-components/{resource-DuTMsPEj.mjs → resource-DU94ocC-.mjs} +1 -1
  149. package/dist/web-components/{save-file-CLB5IM4a.mjs → save-file-CYFtT-_E.mjs} +1 -1
  150. package/dist/web-components/{search-Dd2Y1dsZ.mjs → search-BhcYrsRY.mjs} +1 -1
  151. package/dist/web-components/{shared-CCg1Iag8.mjs → shared-BtCBrxx9.mjs} +1 -1
  152. package/dist/web-components/{show-link-NjacLIdz.mjs → show-link-21y7MiKT.mjs} +1 -1
  153. package/dist/web-components/{sizedImage-CKOGmqhN.mjs → sizedImage-C4pD0cZa.mjs} +1 -1
  154. package/dist/web-components/{split-CcoXZcGX.mjs → split-w6D-xEIb.mjs} +1 -1
  155. package/dist/web-components/{status-B4a3Izph.mjs → status-Yo7BOr8p.mjs} +1 -1
  156. package/dist/web-components/styles-CAv9WP3T.mjs +1 -0
  157. package/dist/web-components/three.mjs +1 -1
  158. package/dist/web-components/{thumbnail-ez20ssEY.mjs → thumbnail-BdKVLxxw.mjs} +1 -1
  159. package/dist/web-components/{tip-DeFPN33O.mjs → tip-D1BgXKQ-.mjs} +1 -1
  160. package/dist/web-components/toggle-Cqtdko9H.mjs +1 -0
  161. package/dist/web-components/{useContainerName-BfyeBf6_.mjs → useContainerName-C2L1lj9-.mjs} +1 -1
  162. package/dist/web-components/{useControlsVisibility-oRiMiQhD.mjs → useControlsVisibility-B4X3mKyY.mjs} +1 -1
  163. package/dist/web-components/{useNearViewport-BADiMpLi.mjs → useNearViewport-DWtnayYx.mjs} +1 -1
  164. package/dist/web-components/{useScrollTrack-9QsMaHSx.mjs → useScrollTrack-D-Yh7v0Q.mjs} +1 -1
  165. package/dist/web-components/viewer/AnnotationItems-DJxYDDLY.mjs +1 -0
  166. package/dist/web-components/viewer/{AnnotationMenu-d5PT7q8D.mjs → AnnotationMenu-CBQft8tP.mjs} +1 -1
  167. package/dist/web-components/viewer/AnnotationState-D-pYs13c.mjs +1 -0
  168. package/dist/web-components/viewer/{Annotations-D_wg4O99.mjs → Annotations-KDQunny2.mjs} +1 -1
  169. package/dist/web-components/viewer/{Annotations-DKWYJOo2.mjs → Annotations-yD1LhlP3.mjs} +2 -2
  170. package/dist/web-components/viewer/{Canvas2DBackend-B4IXvdsN.mjs → Canvas2DBackend-M6vNWI1j.mjs} +1 -1
  171. package/dist/web-components/viewer/CaptionDetails-BhXwMQyX.mjs +1 -0
  172. package/dist/web-components/viewer/{ChaptersMenu-CaAIaRZN.mjs → ChaptersMenu-CQoZerOz.mjs} +1 -1
  173. package/dist/web-components/viewer/ChoiceMenu-zk7-RWGR.mjs +1 -0
  174. package/dist/web-components/viewer/Collection-CMHNssor.mjs +1 -0
  175. package/dist/web-components/viewer/{Connected-9VGl2Xnx.mjs → Connected-CWTe22Y4.mjs} +1 -1
  176. package/dist/web-components/viewer/{Connected-Cd2qwuuo.mjs → Connected-o-wFtqr5.mjs} +1 -1
  177. package/dist/web-components/viewer/{Contents-CsG9e7v2.mjs → Contents-6XNd1KtI.mjs} +1 -1
  178. package/dist/web-components/viewer/{ControlMenu-q_u_UC8q.mjs → ControlMenu-D5LwsByV.mjs} +1 -1
  179. package/dist/web-components/viewer/ControlsFade-C164aYHv.mjs +1 -0
  180. package/dist/web-components/viewer/{CountMenu-Dn0-z5A9.mjs → CountMenu-DGWnbRTj.mjs} +1 -1
  181. package/dist/web-components/viewer/Cue-RCMyZKdq.mjs +1 -0
  182. package/dist/web-components/viewer/Document-XCWKzfno.mjs +1 -0
  183. package/dist/web-components/viewer/{DomLayers-CwHg1jZg.mjs → DomLayers-D5F-HKU-.mjs} +1 -1
  184. package/dist/web-components/viewer/{Download-Clx_e2ga.mjs → Download-D9sTED6x.mjs} +1 -1
  185. package/dist/web-components/viewer/{EntryBodies-B4SnV6NJ.mjs → EntryBodies-D9GDp-K4.mjs} +1 -1
  186. package/dist/web-components/viewer/{EntryThumbnail-CsAqKh38.mjs → EntryThumbnail-FgoJmUgn.mjs} +1 -1
  187. package/dist/web-components/viewer/{FieldPill-NQfq8SXA.mjs → FieldPill-BRzwSwLf.mjs} +1 -1
  188. package/dist/web-components/viewer/{FrameAnimation-wN2VNW7D.mjs → FrameAnimation-BfqvPgd9.mjs} +1 -1
  189. package/dist/web-components/viewer/{Gallery-nX9kQlft.mjs → Gallery-71gebgEA.mjs} +1 -1
  190. package/dist/web-components/viewer/HideToggle-rX4vxm05.mjs +1 -0
  191. package/dist/web-components/viewer/{ImageControls--qeUY5kg.mjs → ImageControls-XEFV3Uq0.mjs} +1 -1
  192. package/dist/web-components/viewer/{LanguageChoice-CZ6K3Mhv.mjs → LanguageChoice-DXFfN1n1.mjs} +1 -1
  193. package/dist/web-components/viewer/LightboxView-CF4mcC0I.mjs +1 -0
  194. package/dist/web-components/viewer/ListEnd-BlsK9wx6.mjs +1 -0
  195. package/dist/web-components/viewer/MapView-DCxcUkUC.mjs +3 -0
  196. package/dist/web-components/viewer/MediaBody-4ZFKNnr3.mjs +1 -0
  197. package/dist/web-components/viewer/MediaBody-B_T8alBZ.mjs +1 -0
  198. package/dist/web-components/viewer/{NavDate-Clj6OMa6.mjs → NavDate-DtMXkvCo.mjs} +1 -1
  199. package/dist/web-components/viewer/{Navigator-DPdR3SYX.mjs → Navigator-B4RQiJXK.mjs} +1 -1
  200. package/dist/web-components/viewer/PagerLayout-CAk2XDZs.mjs +1 -0
  201. package/dist/web-components/viewer/PanelPart-DyxYm0ly.mjs +1 -0
  202. package/dist/web-components/viewer/{PartOfManifest-NAXs2DYd.mjs → PartOfManifest-Cu4fmoxn.mjs} +1 -1
  203. package/dist/web-components/viewer/{PlaceBox-C2k5Fsfo.mjs → PlaceBox-CSYpxMgb.mjs} +1 -1
  204. package/dist/web-components/viewer/{Placeholder-DF6dRMjt.mjs → Placeholder-DLJ6qaSl.mjs} +1 -1
  205. package/dist/web-components/viewer/{Search-DoUc8tWu.mjs → Search-BOI3sJa2.mjs} +1 -1
  206. package/dist/web-components/viewer/SeekMarks-DfTSWZph.mjs +1 -0
  207. package/dist/web-components/viewer/StandaloneItems-B1Ul8G2q.mjs +1 -0
  208. package/dist/web-components/viewer/Steps-5eg2Dbfd.mjs +1 -0
  209. package/dist/web-components/viewer/{TargetItems-DOFSQtYR.mjs → TargetItems-5JGXJ5e4.mjs} +1 -1
  210. package/dist/web-components/viewer/{Transcript-Dy-FHWMo.mjs → Transcript-jk8NyuUI.mjs} +1 -1
  211. package/dist/web-components/viewer/Transport-BbvsG9Qr.mjs +1 -0
  212. package/dist/web-components/viewer/Transport-D0-7mRrT.mjs +1 -0
  213. package/dist/web-components/viewer/{annotation-collection-A0PNdPhI.mjs → annotation-collection-C_5hyuvw.mjs} +1 -1
  214. package/dist/web-components/viewer/{annotation-name-CfQs7Mb2.mjs → annotation-name-Bb6Dgo3i.mjs} +1 -1
  215. package/dist/web-components/viewer/{annotations-content-B52-zM99.mjs → annotations-content-Jts8hjGT.mjs} +1 -1
  216. package/dist/web-components/viewer/{cloverEngine-4sgpB7Rz.mjs → cloverEngine-rvO-m6rC.mjs} +2 -2
  217. package/dist/web-components/viewer/{content-state-reader-vtATl-W3.mjs → content-state-reader-CP0H4Gnm.mjs} +1 -1
  218. package/dist/web-components/viewer/{dragToClose-B4rj1D3r.mjs → dragToClose-CfijwC7H.mjs} +1 -1
  219. package/dist/web-components/viewer/{fetchManifest-gAj8phm4.mjs → fetchManifest-CI3k9v0b.mjs} +1 -1
  220. package/dist/web-components/viewer/{host-Hv8WXfiF.mjs → host-CTbjXNd9.mjs} +1 -1
  221. package/dist/web-components/viewer/image-layers-C3YwnNvq.mjs +1 -0
  222. package/dist/web-components/viewer/index.mjs +1 -1
  223. package/dist/web-components/viewer/{link-DIh6ysyo.mjs → link-CUm6T-7L.mjs} +1 -1
  224. package/dist/web-components/viewer/overlayImage-JHIugjA0.mjs +1 -0
  225. package/dist/web-components/viewer/range-regions-ulWKWvhS.mjs +1 -0
  226. package/dist/web-components/viewer/{renderers-C5EfPrd7.mjs → renderers-Hs9tzSPp.mjs} +1 -1
  227. package/dist/web-components/viewer/{save-file-dIa0LCAn.mjs → save-file-CWKAFvNb.mjs} +1 -1
  228. package/dist/web-components/viewer/{search-Bbv9dCNq.mjs → search-HCPnXtXW.mjs} +1 -1
  229. package/dist/web-components/viewer/styles-DvZTMHkr.mjs +1 -0
  230. package/dist/web-components/viewer/{useControlsVisibility-jopIdHZi.mjs → useControlsVisibility-ClvKjBYI.mjs} +1 -1
  231. package/dist/web-components/viewer/viewer-BFDNip3h.mjs +29 -0
  232. package/dist/web-components/viewer/{vtt-DpgB_K8v.mjs → vtt-B3wqH_vT.mjs} +1 -1
  233. package/dist/web-components/viewer-C-eGBKAn.mjs +1 -0
  234. package/dist/web-components/{vtt-KUQbi4PK.mjs → vtt-BYJ_dF4L.mjs} +1 -1
  235. package/package.json +1 -1
  236. package/dist/templates/shared/useLazyPanelPane.mjs +0 -16
  237. package/dist/web-components/Button-BIaw5k1q.mjs +0 -1
  238. package/dist/web-components/CanvasView-CmDxczm9.mjs +0 -2
  239. package/dist/web-components/ControlsFade-CleBsk-W.mjs +0 -1
  240. package/dist/web-components/Cue-2zGQuUOC.mjs +0 -1
  241. package/dist/web-components/Document-pjc2qOX4.mjs +0 -1
  242. package/dist/web-components/Items-BHTQJU7T.mjs +0 -1
  243. package/dist/web-components/LightboxView-D-aBaKfB.mjs +0 -1
  244. package/dist/web-components/LoadedMap-0_prxuA4.mjs +0 -1
  245. package/dist/web-components/MapView-nHeg39Kz.mjs +0 -3
  246. package/dist/web-components/MediaBody-DH-rr_0N.mjs +0 -1
  247. package/dist/web-components/MediaBody-eSThjFzH.mjs +0 -1
  248. package/dist/web-components/PagerLayout-CkSwDAnp.mjs +0 -1
  249. package/dist/web-components/PanelPart-BA1NoeLA.mjs +0 -1
  250. package/dist/web-components/PanelToggle-CrKP8BqE.mjs +0 -1
  251. package/dist/web-components/Scene-C7t16NjC.mjs +0 -1
  252. package/dist/web-components/Timeline-Danuk_Nn.mjs +0 -1
  253. package/dist/web-components/Transport-BKona8RD.mjs +0 -1
  254. package/dist/web-components/Transport-Bonmu77-.mjs +0 -1
  255. package/dist/web-components/index-ClM6Kq8w.mjs +0 -1
  256. package/dist/web-components/items-BHporT5i.mjs +0 -1
  257. package/dist/web-components/label-r0ki6r1U.mjs +0 -1
  258. package/dist/web-components/logo-Br42Vlsk.mjs +0 -1
  259. package/dist/web-components/part-DmRBh4pf.mjs +0 -1
  260. package/dist/web-components/styles-C7PVxtkQ.mjs +0 -1
  261. package/dist/web-components/toggle-CGSnnjW-.mjs +0 -1
  262. package/dist/web-components/useLazyPanelPane-CReKsr8z.mjs +0 -1
  263. package/dist/web-components/viewer/AnnotationItems-Cvh3jfmf.mjs +0 -1
  264. package/dist/web-components/viewer/AnnotationState-DbtYTHMy.mjs +0 -1
  265. package/dist/web-components/viewer/CaptionDetails-Bxh9VD7n.mjs +0 -1
  266. package/dist/web-components/viewer/ChoiceMenu-Clp4Zeog.mjs +0 -1
  267. package/dist/web-components/viewer/Collection-C5BfoUOH.mjs +0 -1
  268. package/dist/web-components/viewer/ControlsFade-Db3IWArv.mjs +0 -1
  269. package/dist/web-components/viewer/Cue-slOJQhPI.mjs +0 -1
  270. package/dist/web-components/viewer/Document-r3Sz3RfH.mjs +0 -1
  271. package/dist/web-components/viewer/HideToggle-B843JuKU.mjs +0 -1
  272. package/dist/web-components/viewer/LightboxView-BcbP3cJD.mjs +0 -1
  273. package/dist/web-components/viewer/ListEnd-DbYDv46a.mjs +0 -1
  274. package/dist/web-components/viewer/MapView-Dj7Iq7P2.mjs +0 -3
  275. package/dist/web-components/viewer/MediaBody-TN4XsCm7.mjs +0 -1
  276. package/dist/web-components/viewer/MediaBody-iAxGgXNy.mjs +0 -1
  277. package/dist/web-components/viewer/PagerLayout-CtlmDRjI.mjs +0 -1
  278. package/dist/web-components/viewer/PanelPart-DzZWRlK1.mjs +0 -1
  279. package/dist/web-components/viewer/StandaloneItems-DuXasJO0.mjs +0 -1
  280. package/dist/web-components/viewer/Steps-B3MrG4Cv.mjs +0 -1
  281. package/dist/web-components/viewer/Transport-C5wkxVOF.mjs +0 -1
  282. package/dist/web-components/viewer/Transport-CUXmY_jW.mjs +0 -1
  283. package/dist/web-components/viewer/image-layers-gFEDKVkV.mjs +0 -1
  284. package/dist/web-components/viewer/overlayImage-BRjcH40Q.mjs +0 -1
  285. package/dist/web-components/viewer/range-regions-uPqjKIER.mjs +0 -1
  286. package/dist/web-components/viewer/styles-L1HpSoL2.mjs +0 -1
  287. package/dist/web-components/viewer/useLazyPanelPane-CoPgtYkx.mjs +0 -1
  288. package/dist/web-components/viewer/viewer-DqpSyvH-.mjs +0 -29
  289. package/dist/web-components/viewer-D2lGdifc.mjs +0 -1
@@ -1 +1 @@
1
- import{u as r,A as m,y as F,R as ze,a as Ve,a4 as We,at as Ge,d as ee,a2 as Xe,b as Je,au as Qe,q as z,T as et,t as Se,l as tt,v as rt,a6 as ot}from"./shared-CCg1Iag8.mjs";import{i as nt,T as at,r as he,E as ct,e as st,f as it,u as lt,d as ut,h as dt,g as vt,j as ft,C as pt,B as ht,l as gt,t as mt}from"./pointer-DWnCT3D3.mjs";import{s as bt,a as wt,h as yt,t as xt,z as kt,b as Ot}from"./models-pO77sm3z.mjs";import{B as Lt}from"./BodyAlert-XV88XjL8.mjs";import{I as Ct}from"./glyphs-BCnJl8py.mjs";import{u as Rt}from"./useControlsVisibility-oRiMiQhD.mjs";import{u as It,a as St,h as Mt}from"./useNearViewport-BADiMpLi.mjs";import{j as At}from"./classnames-DukgfdpI.mjs";import{c as Et,r as Ft}from"./contexts-ByL3eA_T.mjs";import{B as Pt}from"./Button-BIaw5k1q.mjs";import{d as zt,Z as Tt,a as Dt,b as Nt,c as $t}from"./controlGlyphs-d7KUIUwi.mjs";import{L as Kt}from"./Loading-4PmhMeZ-.mjs";import{S as A,f as Bt}from"./Tip-DPFWlNLu.mjs";import{u as Me}from"./useContainerName-BfyeBf6_.mjs";import{e as Ht}from"./engines-BMr7naGM.mjs";import"./styles-C7PVxtkQ.mjs";import{a as Ut}from"./index-ClM6Kq8w.mjs";const Ae=2*Math.PI,qt=.01,Zt=t=>t.deltaMode===1?t.deltaY*16:t.deltaMode===2?t.deltaY*400:t.deltaY;function Te(t,u,d=()=>t.clientHeight){const a=new Map;let v=0,f=false,l={x:0,y:0};const p=()=>{const[o,g]=[...a.values()];return o&&g?Math.hypot(o.x-g.x,o.y-g.y):0},b=o=>{if(!(o.pointerType==="mouse"&&o.button!==0)&&!nt(o.target,t)){a.set(o.pointerId,{x:o.clientX,y:o.clientY});try{t.setPointerCapture(o.pointerId)}catch{}a.size===1&&(f=false,l={x:o.clientX,y:o.clientY}),a.size===2&&(v=p())}},L=o=>{const g=a.get(o.pointerId);if(!g)return;const y={x:o.clientX,y:o.clientY};if(a.set(o.pointerId,y),a.size===2){const s=p();v>0&&s>0&&u.zoom(s/v),v=s;return}if(!f){if(Math.hypot(y.x-l.x,y.y-l.y)<at)return;f=true}const E=d()||1;u.turn(-(y.x-g.x)/E*Ae,-(y.y-g.y)/E*Ae)},C=o=>{a.delete(o.pointerId),v=a.size===2?p():0},R=o=>{o.ctrlKey&&(o.preventDefault(),u.zoom(Math.exp(-Zt(o)*qt)))};return t.addEventListener("pointerdown",b),t.addEventListener("pointermove",L),t.addEventListener("pointerup",C),t.addEventListener("pointercancel",C),t.addEventListener("wheel",R,{passive:false}),()=>{t.removeEventListener("pointerdown",b),t.removeEventListener("pointermove",L),t.removeEventListener("pointerup",C),t.removeEventListener("pointercancel",C),t.removeEventListener("wheel",R)}}const Ee={rotateUp:{place:"up",rate:[0,Math.PI/6]},rotateLeft:{place:"left",rate:[Math.PI/2,0]},rotateRight:{place:"right",rate:[-Math.PI/2,0]},rotateDown:{place:"down",rate:[0,-Math.PI/6]}},_t=400,te=({rotate:t})=>r("path",{fill:"none",strokeWidth:"64",strokeLinecap:"round",strokeLinejoin:"round",d:"M192 96l160 160-160 160",transform:`rotate(${t} 256 256)`}),H=236,j=t=>t.toFixed(1);function re(t,u,d,a){const[v,f]=d?[`256 ${j(256-u)}`,`256 ${j(256+u)}`]:[`${j(256-t)} 256`,`${j(256+t)} 256`];return`M${v}A${j(t)} ${j(u)} 0 0 ${a} ${f}`}function De({theta:t,phi:u}){const d=Math.PI/2-u,a=Math.max(1,H*Math.abs(Math.sin(d))),v=Math.max(1,H*Math.abs(Math.sin(t))),f=d>=0,l=Math.sin(2*t)<0;return{equator:{front:re(H,a,false,f?0:1),back:re(H,a,false,f?1:0)},meridian:{front:re(v,H,true,l?1:0),back:re(v,H,true,l?0:1)},x:256-H*Math.sin(t),y:256+(f?1:-1)*a*Math.cos(t),facing:Math.cos(t)>0}}function Fe(t,u){const[d,a,v,f,l]=(t==null?void 0:t.children)??[];if(!l)return;const{equator:p,meridian:b,x:L,y:C,facing:R}=De(u);d.setAttribute("d",p.front),a.setAttribute("d",p.back),v.setAttribute("d",b.front),f.setAttribute("d",b.back),l.setAttribute("cx",L.toFixed(1)),l.setAttribute("cy",C.toFixed(1)),l.setAttribute("fill",R?"currentColor":"none"),l.setAttribute("opacity",R?"1":String(ge))}const ge=.3,jt=ze.forwardRef(function(u,d){const a=De({theta:0,phi:75*Math.PI/180});return r("g",{ref:d,fill:"none",strokeWidth:"14",strokeLinecap:"round",children:[r("path",{d:a.equator.front}),r("path",{d:a.equator.back,strokeOpacity:ge}),r("path",{d:a.meridian.front}),r("path",{d:a.meridian.back,strokeOpacity:ge}),r("circle",{cx:a.x.toFixed(1),cy:a.y.toFixed(1),r:"34",fill:"currentColor"})]})});function Yt({controls:t,controlButtons:u,turn:d,zoom:a,span:v,indicator:f,name:l}){const p=m(null),b=m(false),L=m(d);L.current=d;const C=m(a);C.current=a;const R=m(null),o=!!(t.rotateUp||t.rotateLeft||t.rotateRight||t.rotateDown);F(()=>{const s=R.current;if(s)return Te(s,{turn:(w,i)=>L.current(w,i),zoom:w=>C.current(w)},v)},[v,o]);const g=s=>{const w=p.current;w&&(window.clearTimeout(w.timer),cancelAnimationFrame(w.frame),p.current=null,w.held&&s&&(b.current=true))};F(()=>()=>g(false),[]);const y=(s,w)=>{if(s.button>0)return;g(false),b.current=false;const[i,ae]=Ee[w].rate,P={timer:0,frame:0,held:false};P.timer=window.setTimeout(()=>{P.held=true;let W=performance.now();const G=U=>{const ce=Math.min(.1,Math.max(0,U-W)/1e3);W=U,L.current(i*ce,ae*ce),P.frame=requestAnimationFrame(G)};P.frame=requestAnimationFrame(G)},_t),p.current=P},E=s=>{const w=t[s];return w?r("span",{className:"clover-scene-rotate-cell","data-place":Ee[s].place,onPointerDown:i=>y(i,s),onPointerUp:()=>g(true),onPointerLeave:()=>g(false),onPointerCancel:()=>g(false),onKeyDown:i=>{i.repeat&&i.key==="Enter"&&i.preventDefault()},onClickCapture:i=>{b.current&&i.detail>0&&(i.stopPropagation(),i.preventDefault()),b.current=false},children:he(w,u)},s):null};return r("div",{className:"clover-scene-rotate",role:"group",...l.props,"data-testid":"clover-scene-rotate",children:[l.node,o&&r("span",{ref:R,className:"clover-scene-rotate-disc","aria-hidden":"true","data-testid":"clover-scene-rotate-disc",children:r("svg",{viewBox:"0 0 512 512",width:"16",height:"16",focusable:"false",children:r(jt,{ref:f})})}),E("rotateUp"),E("rotateLeft"),E("rotateRight"),E("rotateDown"),t.reset&&r("span",{className:"clover-scene-rotate-cell","data-place":"corner",children:he(t.reset,u)})]})}Ut(16,"components/Scene/Scene",'@layer clover{.clover-scene>.clover-scene-navigation{position:absolute;right:var(--clover-canvas-controls-inset);bottom:var(--clover-canvas-controls-inset);z-index:3;display:flex;align-items:flex-end;pointer-events:none;touch-action:none;-webkit-touch-callout:none;user-select:none;-webkit-user-select:none;opacity:var(--clover-controls-shown);translate:0 calc((1 - var(--clover-controls-shown)) * var(--clover-controls-tuck));transition:all var(--clover-controls-timing)}.clover-scene-navigation :is(button,.clover-scene-rotate-disc){pointer-events:var(--clover-controls-events)}@media (hover: hover){.clover-scene:has(>.clover-scene-navigation :is(button,.clover-scene-rotate-disc):hover){--clover-controls-shown: 1;--clover-controls-events: auto;--clover-controls-timing: var(--clover-controls-enter)}}.clover-scene:has(>.clover-scene-navigation)>.clover-canvas-viewport:before{position:absolute;inset:auto 0 0;height:calc(3 * var(--clover-control) + 2 * var(--clover-space-s) + 2 * var(--clover-canvas-controls-inset));background:linear-gradient(to top,#00000073,#0003 45%,#0000);opacity:var(--clover-controls-shown);transition:opacity var(--clover-controls-timing);pointer-events:none;content:""}.clover-scene>.clover-scene-navigation[data-compact]{--clover-control: max(1.5rem, 24px)}.clover-scene-tools{display:flex;gap:var(--clover-space-s);margin-inline-end:calc(-1 * var(--clover-control))}.clover-scene-rotate{position:relative;display:grid;grid-template-columns:repeat(3,var(--clover-control));grid-template-rows:repeat(3,var(--clover-control));gap:var(--clover-space-s);--clover-scene-rotate-rim: calc( .756 * var(--clover-control) + .874 * var(--clover-space-s) )}.clover-scene-rotate-disc{position:absolute;top:50%;left:50%;width:calc(2 * var(--clover-scene-rotate-rim));height:calc(2 * var(--clover-scene-rotate-rim));translate:-50% -50%;display:flex;align-items:center;justify-content:center;border-radius:50%;--clover-scene-ball: var(--clover-color-accent, #0065c3);background-color:var(--clover-scene-ball);background-image:radial-gradient(circle at 34% 30%,#ffffff24 0,#fff0 24%),radial-gradient(circle at 34% 30%,color-mix(in srgb,var(--clover-scene-ball) 84%,#fff) 0,var(--clover-scene-ball) 48%,color-mix(in srgb,var(--clover-scene-ball) 62%,#000) 100%);box-shadow:0 .236rem .618rem #00000038;color:var(--clover-color-control-glyph, #fff);cursor:grab;isolation:isolate;transition:scale .2s ease}:where([data-high-contrast]) .clover-scene-rotate-disc{--clover-scene-ball: var(--clover-accent-fill);transition:none}:where([data-high-contrast]) .clover-scene-rotate-disc:hover{outline:var(--clover-accent-ring-hover);outline-offset:1px}:where([data-high-contrast]) .clover-scene-rotate-disc:active{outline:var(--clover-accent-ring);outline-offset:1px}.clover-scene-rotate-disc:active{cursor:grabbing}.clover-scene-rotate-disc:before{position:absolute;inset:0;z-index:-1;border-radius:inherit;background:color-mix(in srgb,#fff 16%,transparent);opacity:0;transition:opacity .2s ease;content:""}.clover-scene-rotate-disc:is(:hover,:active):before,.clover-scene-rotate:has(:focus-visible) .clover-scene-rotate-disc:before,.clover-scene-navigation[data-turning] .clover-scene-rotate-disc:before{opacity:1}.clover-scene-rotate-disc:is(:hover,:active),.clover-scene-rotate:has(:focus-visible) .clover-scene-rotate-disc,.clover-scene-navigation[data-turning] .clover-scene-rotate-disc{scale:1.06}@media (prefers-reduced-motion: reduce){.clover-scene-rotate-disc{transition:none}}@media (forced-colors: active){.clover-scene-rotate-disc{border:1px solid CanvasText}}.clover-scene-rotate-disc svg{width:100%;height:100%;fill:currentColor;stroke:currentColor;-webkit-mask-image:radial-gradient(circle closest-side,#000 45%,transparent 90%);mask-image:radial-gradient(circle closest-side,#000 45%,transparent 90%)}.clover-scene-rotate-cell{position:relative;z-index:1;display:flex}.clover-scene-rotate-cell[data-place=up]{grid-area:1 / 2}.clover-scene-rotate-cell[data-place=left]{grid-area:2 / 1}.clover-scene-rotate-cell[data-place=corner]{grid-area:3 / 3}.clover-scene-rotate-cell[data-place=right]{grid-area:2 / 3}.clover-scene-rotate-cell[data-place=down]{grid-area:3 / 2}.clover-scene .clover-scene-navigation .clover-scene-rotate-cell:not([data-place=corner]) button.clover-canvas-button svg{scale:none;rotate:none}.clover-scene>.clover-scene-error{position:absolute;inset:auto var(--clover-canvas-controls-inset) var(--clover-canvas-controls-inset);z-index:2;background-color:var(--clover-color-secondary, #fff);border-radius:var(--clover-radius, 3px)}}');const Pe={zoom:true,fullPage:true,rotation:true,reset:true,information:true},Y=Math.PI/4,oe=Math.PI/12,Vt=Y/2,ne=1.5,Wt=["ArrowLeft ArrowRight ArrowUp ArrowDown",A.rotateRight.keys,A.rotateLeft.keys,A.zoomIn.keys,A.zoomOut.keys,A.reset.keys].join(" ");function pr(t){return t.scene?r(ct,{children:r(Gt,{...t,scene:t.scene})}):null}function Gt({scene:t,label:u,language:d,highContrast:a,className:v,controls:f=true,controlButtons:l,options:p,manifestId:b,engine:L="clover",onContentStateChange:C,children:R}){const{t:o}=Ve(),g=We(()=>b==="loading"?null:Ge({manifestId:b,canvasId:t.id,type:"Scene"}),C);F(()=>g(),[t.id,b,g]);const[y,E]=ee(null),s=Xe(E),w=It(a),i=m(null),ae=st(y),P=it(y),W=lt(),G=Rt(y,p==null?void 0:p.hideDelay,i),U=St(y),T=`clover-scene-${Je()}`,k=f===false?null:f===true?Pe:{...Pe,...f},me=bt(t),be=wt(t),we=p==null?void 0:p.request,ye=JSON.stringify([t.id,me,Qe(we),L]),xe=b==="loading",[I,D]=ee({state:"waiting"}),N=m(null),se=m(null),M=m(null),h=m(null),$=m(0),[Ne,$e]=ee(0),X=m({hiddenSince:null,release:()=>{}}),J=m(false),ie=m(null),le=m(null),Ke=ut(y),q=z(()=>{$.current||!N.current||($.current=requestAnimationFrame(()=>{var e;$.current=0,h.current&&((e=N.current)==null||e.draw(h.current),Fe(le.current,h.current))}))},[]),Z=z(()=>{const e=i.current,n=e&&e.clientHeight?e.clientWidth/e.clientHeight:1;return se.current?yt(se.current,n):null},[]),Q=z(e=>{!h.current||!M.current||(h.current=e(h.current,M.current),q())},[q]),ue=m(0),x=z((e,n)=>{Q(O=>xt(O,e,n));const c=ie.current;c&&(c.setAttribute("data-turning",""),window.clearTimeout(ue.current),ue.current=window.setTimeout(()=>c.removeAttribute("data-turning"),400))},[Q]);F(()=>()=>window.clearTimeout(ue.current),[]);const K=z(e=>Q((n,c)=>kt(n,e,c)),[Q]),Be=z(()=>{var e;return((e=i.current)==null?void 0:e.clientHeight)??0},[]),ke=z(()=>{M.current=Z(),h.current=M.current,q()},[Z,q]);F(()=>{const e=i.current;if(!e||!U)return;if(xe){D({state:"loading"});return}let n=true,c=null;const O=()=>{cancelAnimationFrame($.current),$.current=0,c==null||c.dispose(),c=null,N.current=null,Ft(X.current)};return X.current.release=()=>{O(),J.current=true,n&&D({state:"waiting"})},J.current=false,Et(X.current)?(D({state:"loading"}),Ht(L)().then(({createEngine:S})=>{if(n)return c=S(e,{onLost:()=>{O(),n&&D({state:"error",error:new Error("The browser took back the 3D view's graphics.")})}}),N.current=c,c.load(me,we).then(Ye=>{n&&(se.current=Ye,M.current=Z(),h.current??(h.current=M.current),D({state:"ready"}),q())})}).catch(S=>{n&&(O(),D({state:"error",error:S instanceof Error?S:new Error(String(S)),load:true}))}),()=>{n=false,O()}):(J.current=true,D({state:"waiting"}),()=>{n=false})},[ye,xe,U,Ne,Z,q]),F(()=>{h.current=null},[ye]),F(()=>{const e=i.current;if(!e||typeof IntersectionObserver>"u")return;const n=new IntersectionObserver(([c])=>{X.current.hiddenSince=c!=null&&c.isIntersecting?null:performance.now(),c!=null&&c.isIntersecting&&J.current&&$e(O=>O+1)});return n.observe(e),()=>n.disconnect()},[]),F(()=>{const e=i.current;if(!e||typeof ResizeObserver>"u")return;const n=new ResizeObserver(()=>{var S;const c=parseFloat(getComputedStyle(document.documentElement).fontSize)||16;if((S=ie.current)==null||S.toggleAttribute("data-compact",e.clientWidth<32*c||e.clientHeight<24*c),!N.current)return;N.current.resize();const O=h.current&&M.current&&Ot(h.current,M.current);M.current=Z(),O&&(h.current=M.current),cancelAnimationFrame($.current),$.current=0,h.current&&(N.current.draw(h.current),Fe(le.current,h.current))});return n.observe(e),()=>n.disconnect()},[Z]),F(()=>{const e=i.current;if(!(!e||I.state!=="ready"))return Te(e,{turn:x,zoom:K})},[I.state,x,K]);const He=e=>{if(e.target!==e.currentTarget||e.altKey||e.metaKey||e.ctrlKey)return;const n=e.shiftKey?Y:Vt,c=e.shiftKey?2*oe:oe;switch(e.key){case"ArrowLeft":x(n,0);break;case"ArrowRight":x(-n,0);break;case"ArrowUp":x(0,c);break;case"ArrowDown":x(0,-c);break;case"r":x(-Y,0);break;case"R":x(Y,0);break;case"+":case"=":K(ne);break;case"-":case"_":K(1/ne);break;case"0":ke();break;default:return}e.preventDefault()},de=`caption-${T}`,_=et(()=>k!=null&&k.information&&dt(t)?[t]:[],[k==null?void 0:k.information,t]),[Ue,Oe]=ee(false),ve=Ue&&_.length>0,Le=z(e=>{var n;Oe(false),e&&((n=document.getElementById(`information-${T}`))==null||n.focus())},[T]),qe=_.length&&Se(t.label,d).text?vt(de,0):void 0,V=[u,t.label].map(e=>Se(e,d)).find(e=>e.text),Ce=Me((V==null?void 0:V.text)||o("sceneModel"),V?V.lang:s.langOf("sceneModel"),false,s.hostLanguage),Re=`keys-${T}`,Ze=s.langOf("sceneRoleDescription")?void 0:o("sceneRoleDescription"),B=(e,n,c,O,S)=>({key:e,id:`${e}-${T}`,label:o(n),lang:s.langOf(n),glyph:c,onClick:O,...S?{shortcut:S}:{}}),_e=e=>k?[...k.zoom?[B("zoomIn","imageZoomIn",r(Tt,{}),()=>K(ne),A.zoomIn),B("zoomOut","imageZoomOut",r(Dt,{}),()=>K(1/ne),A.zoomOut)]:[],...k.fullPage&&W?[{key:"fullPage",id:`fullPage-${T}`,label:o(e?"imageExitFullScreen":"imageFullScreen"),lang:s.langOf(e?"imageExitFullScreen":"imageFullScreen"),glyph:e?r(Nt,{}):r($t,{}),onClick:n=>void mt(n.currentTarget)}]:[]]:[],je=Me(o("sceneRotate"),s.langOf("sceneRotate"),false,s.hostLanguage),fe=k?{...k.rotation&&{rotateUp:B("rotateUp","sceneRotateUp",r(te,{rotate:-90}),()=>x(0,oe)),rotateLeft:B("rotateLeft","imageRotateLeft",r(te,{rotate:180}),()=>x(Y,0),A.rotateLeft),rotateRight:B("rotateRight","imageRotateRight",r(te,{rotate:0}),()=>x(-Y,0),A.rotateRight),rotateDown:B("rotateDown","sceneRotateDown",r(te,{rotate:90}),()=>x(0,-oe))},...k.reset&&{reset:B("reset","sceneResetView",r(zt,{}),ke,A.reset)}}:{},pe=_e(Ke),Ie=I.state==="loading"||I.state==="waiting"&&U;return r(ot.Provider,{value:s.hostLanguage,children:r("figure",{"aria-labelledby":qe,className:At("clover-canvas","clover-scene",v),"data-testid":"clover-scene",...Mt(w),"data-status":I.state==="ready"?"ready":I.state==="error"?"error":"loading","data-fullscreen":ae,"data-exit":P||void 0,"data-controls":G?"visible":"hidden","data-navigable":"true",ref:s.ref,onKeyDown:e=>{if(e.key==="Escape"&&ve&&!e.defaultPrevented){e.preventDefault(),Le(false);return}Bt(e,i.current)},style:{position:"relative",width:"100%",height:"100%",margin:0,overflow:"hidden",isolation:"isolate"},children:[r(ft,{hidden:!P}),(_.length>0||ze.Children.count(R)>0)&&r(pt,{children:[_.length>0&&r(Pt,{id:`information-${T}`,label:o("informationPanelTabsAbout"),lang:s.langOf("informationPanelTabsAbout"),onClick:()=>Oe(e=>!e),expanded:ve,controls:de,children:r(Ct,{})}),R]}),(pe.length>0||Object.keys(fe).length>0)&&r("div",{ref:ie,className:"clover-scene-navigation",children:[pe.length>0&&r("div",{className:"clover-scene-tools",children:pe.map(e=>he(e,l))}),Object.keys(fe).length>0&&r(Yt,{controls:fe,controlButtons:l,turn:x,zoom:K,span:Be,indicator:le,name:je})]}),r("div",{ref:i,className:"clover-canvas-viewport",style:{position:"absolute",inset:0,overflow:"hidden",zIndex:-1,...be?{backgroundColor:be}:{}},"data-testid":"clover-scene-viewport",role:"img","aria-roledescription":Ze,...Ce.props,"aria-describedby":Re,"aria-keyshortcuts":Wt,"aria-busy":Ie,tabIndex:0,onKeyDown:He}),Ce.node,r("span",{id:Re,style:rt,...tt(s.langOf("sceneKeys")),children:o("sceneKeys")}),r(ht,{kind:"model",shown:I.state==="error"&&!!I.load}),I.state==="error"&&!I.load&&r(Lt,{error:I.error,className:"clover-scene-error"}),Ie&&r(Kt,{overlay:true}),_.length>0&&r(gt,{id:de,canvases:_,open:ve,onClose:Le,language:d})]})})}export{pr as S};
1
+ import{u as r,A as m,y as F,R as ze,a as Ve,a4 as We,at as Ge,d as ee,a2 as Xe,b as Je,au as Qe,q as z,T as et,t as Se,l as tt,v as rt,a6 as ot}from"./shared-BtCBrxx9.mjs";import{i as nt,T as at,r as he,E as ct,e as st,f as it,u as lt,d as ut,h as dt,g as vt,j as ft,C as pt,B as ht,l as gt,t as mt}from"./pointer-CAZRjvDP.mjs";import{s as bt,a as wt,h as yt,t as xt,z as kt,b as Ot}from"./models-qg8TrXAe.mjs";import{B as Lt}from"./BodyAlert-Cra_XvnG.mjs";import{I as Ct}from"./glyphs-BO-1m6-c.mjs";import{u as Rt}from"./useControlsVisibility-B4X3mKyY.mjs";import{u as It,a as St,h as Mt}from"./useNearViewport-DWtnayYx.mjs";import{j as At}from"./classnames-DukgfdpI.mjs";import{c as Et,r as Ft}from"./contexts-ByL3eA_T.mjs";import{B as Pt}from"./Button-CE-5ew-f.mjs";import{d as zt,Z as Tt,a as Dt,b as Nt,c as $t}from"./controlGlyphs-DbocsVHI.mjs";import{L as Kt}from"./Loading-tVzMiUqD.mjs";import{S as A,f as Bt}from"./Tip-Dd_jhbIx.mjs";import{u as Me}from"./useContainerName-C2L1lj9-.mjs";import{e as Ht}from"./engines-DJ3NJG7R.mjs";import"./styles-CAv9WP3T.mjs";import{a as Ut}from"./index-BAkCMEQf.mjs";const Ae=2*Math.PI,qt=.01,Zt=t=>t.deltaMode===1?t.deltaY*16:t.deltaMode===2?t.deltaY*400:t.deltaY;function Te(t,u,d=()=>t.clientHeight){const a=new Map;let v=0,f=false,l={x:0,y:0};const p=()=>{const[o,g]=[...a.values()];return o&&g?Math.hypot(o.x-g.x,o.y-g.y):0},b=o=>{if(!(o.pointerType==="mouse"&&o.button!==0)&&!nt(o.target,t)){a.set(o.pointerId,{x:o.clientX,y:o.clientY});try{t.setPointerCapture(o.pointerId)}catch{}a.size===1&&(f=false,l={x:o.clientX,y:o.clientY}),a.size===2&&(v=p())}},L=o=>{const g=a.get(o.pointerId);if(!g)return;const y={x:o.clientX,y:o.clientY};if(a.set(o.pointerId,y),a.size===2){const s=p();v>0&&s>0&&u.zoom(s/v),v=s;return}if(!f){if(Math.hypot(y.x-l.x,y.y-l.y)<at)return;f=true}const E=d()||1;u.turn(-(y.x-g.x)/E*Ae,-(y.y-g.y)/E*Ae)},C=o=>{a.delete(o.pointerId),v=a.size===2?p():0},R=o=>{o.ctrlKey&&(o.preventDefault(),u.zoom(Math.exp(-Zt(o)*qt)))};return t.addEventListener("pointerdown",b),t.addEventListener("pointermove",L),t.addEventListener("pointerup",C),t.addEventListener("pointercancel",C),t.addEventListener("wheel",R,{passive:false}),()=>{t.removeEventListener("pointerdown",b),t.removeEventListener("pointermove",L),t.removeEventListener("pointerup",C),t.removeEventListener("pointercancel",C),t.removeEventListener("wheel",R)}}const Ee={rotateUp:{place:"up",rate:[0,Math.PI/6]},rotateLeft:{place:"left",rate:[Math.PI/2,0]},rotateRight:{place:"right",rate:[-Math.PI/2,0]},rotateDown:{place:"down",rate:[0,-Math.PI/6]}},_t=400,te=({rotate:t})=>r("path",{fill:"none",strokeWidth:"64",strokeLinecap:"round",strokeLinejoin:"round",d:"M192 96l160 160-160 160",transform:`rotate(${t} 256 256)`}),H=236,j=t=>t.toFixed(1);function re(t,u,d,a){const[v,f]=d?[`256 ${j(256-u)}`,`256 ${j(256+u)}`]:[`${j(256-t)} 256`,`${j(256+t)} 256`];return`M${v}A${j(t)} ${j(u)} 0 0 ${a} ${f}`}function De({theta:t,phi:u}){const d=Math.PI/2-u,a=Math.max(1,H*Math.abs(Math.sin(d))),v=Math.max(1,H*Math.abs(Math.sin(t))),f=d>=0,l=Math.sin(2*t)<0;return{equator:{front:re(H,a,false,f?0:1),back:re(H,a,false,f?1:0)},meridian:{front:re(v,H,true,l?1:0),back:re(v,H,true,l?0:1)},x:256-H*Math.sin(t),y:256+(f?1:-1)*a*Math.cos(t),facing:Math.cos(t)>0}}function Fe(t,u){const[d,a,v,f,l]=(t==null?void 0:t.children)??[];if(!l)return;const{equator:p,meridian:b,x:L,y:C,facing:R}=De(u);d.setAttribute("d",p.front),a.setAttribute("d",p.back),v.setAttribute("d",b.front),f.setAttribute("d",b.back),l.setAttribute("cx",L.toFixed(1)),l.setAttribute("cy",C.toFixed(1)),l.setAttribute("fill",R?"currentColor":"none"),l.setAttribute("opacity",R?"1":String(ge))}const ge=.3,jt=ze.forwardRef(function(u,d){const a=De({theta:0,phi:75*Math.PI/180});return r("g",{ref:d,fill:"none",strokeWidth:"14",strokeLinecap:"round",children:[r("path",{d:a.equator.front}),r("path",{d:a.equator.back,strokeOpacity:ge}),r("path",{d:a.meridian.front}),r("path",{d:a.meridian.back,strokeOpacity:ge}),r("circle",{cx:a.x.toFixed(1),cy:a.y.toFixed(1),r:"34",fill:"currentColor"})]})});function Yt({controls:t,controlButtons:u,turn:d,zoom:a,span:v,indicator:f,name:l}){const p=m(null),b=m(false),L=m(d);L.current=d;const C=m(a);C.current=a;const R=m(null),o=!!(t.rotateUp||t.rotateLeft||t.rotateRight||t.rotateDown);F(()=>{const s=R.current;if(s)return Te(s,{turn:(w,i)=>L.current(w,i),zoom:w=>C.current(w)},v)},[v,o]);const g=s=>{const w=p.current;w&&(window.clearTimeout(w.timer),cancelAnimationFrame(w.frame),p.current=null,w.held&&s&&(b.current=true))};F(()=>()=>g(false),[]);const y=(s,w)=>{if(s.button>0)return;g(false),b.current=false;const[i,ae]=Ee[w].rate,P={timer:0,frame:0,held:false};P.timer=window.setTimeout(()=>{P.held=true;let W=performance.now();const G=U=>{const ce=Math.min(.1,Math.max(0,U-W)/1e3);W=U,L.current(i*ce,ae*ce),P.frame=requestAnimationFrame(G)};P.frame=requestAnimationFrame(G)},_t),p.current=P},E=s=>{const w=t[s];return w?r("span",{className:"clover-scene-rotate-cell","data-place":Ee[s].place,onPointerDown:i=>y(i,s),onPointerUp:()=>g(true),onPointerLeave:()=>g(false),onPointerCancel:()=>g(false),onKeyDown:i=>{i.repeat&&i.key==="Enter"&&i.preventDefault()},onClickCapture:i=>{b.current&&i.detail>0&&(i.stopPropagation(),i.preventDefault()),b.current=false},children:he(w,u)},s):null};return r("div",{className:"clover-scene-rotate",role:"group",...l.props,"data-testid":"clover-scene-rotate",children:[l.node,o&&r("span",{ref:R,className:"clover-scene-rotate-disc","aria-hidden":"true","data-testid":"clover-scene-rotate-disc",children:r("svg",{viewBox:"0 0 512 512",width:"16",height:"16",focusable:"false",children:r(jt,{ref:f})})}),E("rotateUp"),E("rotateLeft"),E("rotateRight"),E("rotateDown"),t.reset&&r("span",{className:"clover-scene-rotate-cell","data-place":"corner",children:he(t.reset,u)})]})}Ut(16,"components/Scene/Scene",'@layer clover{.clover-scene>.clover-scene-navigation{position:absolute;right:var(--clover-canvas-controls-inset);bottom:var(--clover-canvas-controls-inset);z-index:3;display:flex;align-items:flex-end;pointer-events:none;touch-action:none;-webkit-touch-callout:none;user-select:none;-webkit-user-select:none;opacity:var(--clover-controls-shown);translate:0 calc((1 - var(--clover-controls-shown)) * var(--clover-controls-tuck));transition:all var(--clover-controls-timing)}.clover-scene-navigation :is(button,.clover-scene-rotate-disc){pointer-events:var(--clover-controls-events)}@media (hover: hover){.clover-scene:has(>.clover-scene-navigation :is(button,.clover-scene-rotate-disc):hover){--clover-controls-shown: 1;--clover-controls-events: auto;--clover-controls-timing: var(--clover-controls-enter)}}.clover-scene:has(>.clover-scene-navigation)>.clover-canvas-viewport:before{position:absolute;inset:auto 0 0;height:calc(3 * var(--clover-control) + 2 * var(--clover-space-s) + 2 * var(--clover-canvas-controls-inset));background:linear-gradient(to top,#00000073,#0003 45%,#0000);opacity:var(--clover-controls-shown);transition:opacity var(--clover-controls-timing);pointer-events:none;content:""}.clover-scene>.clover-scene-navigation[data-compact]{--clover-control: max(1.5rem, 24px)}.clover-scene-tools{display:flex;gap:var(--clover-space-s);margin-inline-end:calc(-1 * var(--clover-control))}.clover-scene-rotate{position:relative;display:grid;grid-template-columns:repeat(3,var(--clover-control));grid-template-rows:repeat(3,var(--clover-control));gap:var(--clover-space-s);--clover-scene-rotate-rim: calc( .756 * var(--clover-control) + .874 * var(--clover-space-s) )}.clover-scene-rotate-disc{position:absolute;top:50%;left:50%;width:calc(2 * var(--clover-scene-rotate-rim));height:calc(2 * var(--clover-scene-rotate-rim));translate:-50% -50%;display:flex;align-items:center;justify-content:center;border-radius:50%;--clover-scene-ball: var(--clover-color-accent, #0065c3);background-color:var(--clover-scene-ball);background-image:radial-gradient(circle at 34% 30%,#ffffff24 0,#fff0 24%),radial-gradient(circle at 34% 30%,color-mix(in srgb,var(--clover-scene-ball) 84%,#fff) 0,var(--clover-scene-ball) 48%,color-mix(in srgb,var(--clover-scene-ball) 62%,#000) 100%);box-shadow:0 .236rem .618rem #00000038;color:var(--clover-color-control-glyph, #fff);cursor:grab;isolation:isolate;transition:scale .2s ease}:where([data-high-contrast]) .clover-scene-rotate-disc{--clover-scene-ball: var(--clover-accent-fill);transition:none}:where([data-high-contrast]) .clover-scene-rotate-disc:hover{outline:var(--clover-accent-ring-hover);outline-offset:1px}:where([data-high-contrast]) .clover-scene-rotate-disc:active{outline:var(--clover-accent-ring);outline-offset:1px}.clover-scene-rotate-disc:active{cursor:grabbing}.clover-scene-rotate-disc:before{position:absolute;inset:0;z-index:-1;border-radius:inherit;background:color-mix(in srgb,#fff 16%,transparent);opacity:0;transition:opacity .2s ease;content:""}.clover-scene-rotate-disc:is(:hover,:active):before,.clover-scene-rotate:has(:focus-visible) .clover-scene-rotate-disc:before,.clover-scene-navigation[data-turning] .clover-scene-rotate-disc:before{opacity:1}.clover-scene-rotate-disc:is(:hover,:active),.clover-scene-rotate:has(:focus-visible) .clover-scene-rotate-disc,.clover-scene-navigation[data-turning] .clover-scene-rotate-disc{scale:1.06}@media (prefers-reduced-motion: reduce){.clover-scene-rotate-disc{transition:none}}@media (forced-colors: active){.clover-scene-rotate-disc{border:1px solid CanvasText}}.clover-scene-rotate-disc svg{width:100%;height:100%;fill:currentColor;stroke:currentColor;-webkit-mask-image:radial-gradient(circle closest-side,#000 45%,transparent 90%);mask-image:radial-gradient(circle closest-side,#000 45%,transparent 90%)}.clover-scene-rotate-cell{position:relative;z-index:1;display:flex}.clover-scene-rotate-cell[data-place=up]{grid-area:1 / 2}.clover-scene-rotate-cell[data-place=left]{grid-area:2 / 1}.clover-scene-rotate-cell[data-place=corner]{grid-area:3 / 3}.clover-scene-rotate-cell[data-place=right]{grid-area:2 / 3}.clover-scene-rotate-cell[data-place=down]{grid-area:3 / 2}.clover-scene .clover-scene-navigation .clover-scene-rotate-cell:not([data-place=corner]) button.clover-canvas-button svg{scale:none;rotate:none}.clover-scene>.clover-scene-error{position:absolute;inset:auto var(--clover-canvas-controls-inset) var(--clover-canvas-controls-inset);z-index:2;background-color:var(--clover-color-secondary, #fff);border-radius:var(--clover-radius, 3px)}}');const Pe={zoom:true,fullPage:true,rotation:true,reset:true,information:true},Y=Math.PI/4,oe=Math.PI/12,Vt=Y/2,ne=1.5,Wt=["ArrowLeft ArrowRight ArrowUp ArrowDown",A.rotateRight.keys,A.rotateLeft.keys,A.zoomIn.keys,A.zoomOut.keys,A.reset.keys].join(" ");function pr(t){return t.scene?r(ct,{children:r(Gt,{...t,scene:t.scene})}):null}function Gt({scene:t,label:u,language:d,highContrast:a,className:v,controls:f=true,controlButtons:l,options:p,manifestId:b,engine:L="clover",onContentStateChange:C,children:R}){const{t:o}=Ve(),g=We(()=>b==="loading"?null:Ge({manifestId:b,canvasId:t.id,type:"Scene"}),C);F(()=>g(),[t.id,b,g]);const[y,E]=ee(null),s=Xe(E),w=It(a),i=m(null),ae=st(y),P=it(y),W=lt(),G=Rt(y,p==null?void 0:p.hideDelay,i),U=St(y),T=`clover-scene-${Je()}`,k=f===false?null:f===true?Pe:{...Pe,...f},me=bt(t),be=wt(t),we=p==null?void 0:p.request,ye=JSON.stringify([t.id,me,Qe(we),L]),xe=b==="loading",[I,D]=ee({state:"waiting"}),N=m(null),se=m(null),M=m(null),h=m(null),$=m(0),[Ne,$e]=ee(0),X=m({hiddenSince:null,release:()=>{}}),J=m(false),ie=m(null),le=m(null),Ke=ut(y),q=z(()=>{$.current||!N.current||($.current=requestAnimationFrame(()=>{var e;$.current=0,h.current&&((e=N.current)==null||e.draw(h.current),Fe(le.current,h.current))}))},[]),Z=z(()=>{const e=i.current,n=e&&e.clientHeight?e.clientWidth/e.clientHeight:1;return se.current?yt(se.current,n):null},[]),Q=z(e=>{!h.current||!M.current||(h.current=e(h.current,M.current),q())},[q]),ue=m(0),x=z((e,n)=>{Q(O=>xt(O,e,n));const c=ie.current;c&&(c.setAttribute("data-turning",""),window.clearTimeout(ue.current),ue.current=window.setTimeout(()=>c.removeAttribute("data-turning"),400))},[Q]);F(()=>()=>window.clearTimeout(ue.current),[]);const K=z(e=>Q((n,c)=>kt(n,e,c)),[Q]),Be=z(()=>{var e;return((e=i.current)==null?void 0:e.clientHeight)??0},[]),ke=z(()=>{M.current=Z(),h.current=M.current,q()},[Z,q]);F(()=>{const e=i.current;if(!e||!U)return;if(xe){D({state:"loading"});return}let n=true,c=null;const O=()=>{cancelAnimationFrame($.current),$.current=0,c==null||c.dispose(),c=null,N.current=null,Ft(X.current)};return X.current.release=()=>{O(),J.current=true,n&&D({state:"waiting"})},J.current=false,Et(X.current)?(D({state:"loading"}),Ht(L)().then(({createEngine:S})=>{if(n)return c=S(e,{onLost:()=>{O(),n&&D({state:"error",error:new Error("The browser took back the 3D view's graphics.")})}}),N.current=c,c.load(me,we).then(Ye=>{n&&(se.current=Ye,M.current=Z(),h.current??(h.current=M.current),D({state:"ready"}),q())})}).catch(S=>{n&&(O(),D({state:"error",error:S instanceof Error?S:new Error(String(S)),load:true}))}),()=>{n=false,O()}):(J.current=true,D({state:"waiting"}),()=>{n=false})},[ye,xe,U,Ne,Z,q]),F(()=>{h.current=null},[ye]),F(()=>{const e=i.current;if(!e||typeof IntersectionObserver>"u")return;const n=new IntersectionObserver(([c])=>{X.current.hiddenSince=c!=null&&c.isIntersecting?null:performance.now(),c!=null&&c.isIntersecting&&J.current&&$e(O=>O+1)});return n.observe(e),()=>n.disconnect()},[]),F(()=>{const e=i.current;if(!e||typeof ResizeObserver>"u")return;const n=new ResizeObserver(()=>{var S;const c=parseFloat(getComputedStyle(document.documentElement).fontSize)||16;if((S=ie.current)==null||S.toggleAttribute("data-compact",e.clientWidth<32*c||e.clientHeight<24*c),!N.current)return;N.current.resize();const O=h.current&&M.current&&Ot(h.current,M.current);M.current=Z(),O&&(h.current=M.current),cancelAnimationFrame($.current),$.current=0,h.current&&(N.current.draw(h.current),Fe(le.current,h.current))});return n.observe(e),()=>n.disconnect()},[Z]),F(()=>{const e=i.current;if(!(!e||I.state!=="ready"))return Te(e,{turn:x,zoom:K})},[I.state,x,K]);const He=e=>{if(e.target!==e.currentTarget||e.altKey||e.metaKey||e.ctrlKey)return;const n=e.shiftKey?Y:Vt,c=e.shiftKey?2*oe:oe;switch(e.key){case"ArrowLeft":x(n,0);break;case"ArrowRight":x(-n,0);break;case"ArrowUp":x(0,c);break;case"ArrowDown":x(0,-c);break;case"r":x(-Y,0);break;case"R":x(Y,0);break;case"+":case"=":K(ne);break;case"-":case"_":K(1/ne);break;case"0":ke();break;default:return}e.preventDefault()},de=`caption-${T}`,_=et(()=>k!=null&&k.information&&dt(t)?[t]:[],[k==null?void 0:k.information,t]),[Ue,Oe]=ee(false),ve=Ue&&_.length>0,Le=z(e=>{var n;Oe(false),e&&((n=document.getElementById(`information-${T}`))==null||n.focus())},[T]),qe=_.length&&Se(t.label,d).text?vt(de,0):void 0,V=[u,t.label].map(e=>Se(e,d)).find(e=>e.text),Ce=Me((V==null?void 0:V.text)||o("sceneModel"),V?V.lang:s.langOf("sceneModel"),false,s.hostLanguage),Re=`keys-${T}`,Ze=s.langOf("sceneRoleDescription")?void 0:o("sceneRoleDescription"),B=(e,n,c,O,S)=>({key:e,id:`${e}-${T}`,label:o(n),lang:s.langOf(n),glyph:c,onClick:O,...S?{shortcut:S}:{}}),_e=e=>k?[...k.zoom?[B("zoomIn","imageZoomIn",r(Tt,{}),()=>K(ne),A.zoomIn),B("zoomOut","imageZoomOut",r(Dt,{}),()=>K(1/ne),A.zoomOut)]:[],...k.fullPage&&W?[{key:"fullPage",id:`fullPage-${T}`,label:o(e?"imageExitFullScreen":"imageFullScreen"),lang:s.langOf(e?"imageExitFullScreen":"imageFullScreen"),glyph:e?r(Nt,{}):r($t,{}),onClick:n=>void mt(n.currentTarget)}]:[]]:[],je=Me(o("sceneRotate"),s.langOf("sceneRotate"),false,s.hostLanguage),fe=k?{...k.rotation&&{rotateUp:B("rotateUp","sceneRotateUp",r(te,{rotate:-90}),()=>x(0,oe)),rotateLeft:B("rotateLeft","imageRotateLeft",r(te,{rotate:180}),()=>x(Y,0),A.rotateLeft),rotateRight:B("rotateRight","imageRotateRight",r(te,{rotate:0}),()=>x(-Y,0),A.rotateRight),rotateDown:B("rotateDown","sceneRotateDown",r(te,{rotate:90}),()=>x(0,-oe))},...k.reset&&{reset:B("reset","sceneResetView",r(zt,{}),ke,A.reset)}}:{},pe=_e(Ke),Ie=I.state==="loading"||I.state==="waiting"&&U;return r(ot.Provider,{value:s.hostLanguage,children:r("figure",{"aria-labelledby":qe,className:At("clover-canvas","clover-scene",v),"data-testid":"clover-scene",...Mt(w),"data-status":I.state==="ready"?"ready":I.state==="error"?"error":"loading","data-fullscreen":ae,"data-exit":P||void 0,"data-controls":G?"visible":"hidden","data-navigable":"true",ref:s.ref,onKeyDown:e=>{if(e.key==="Escape"&&ve&&!e.defaultPrevented){e.preventDefault(),Le(false);return}Bt(e,i.current)},style:{position:"relative",width:"100%",height:"100%",margin:0,overflow:"hidden",isolation:"isolate"},children:[r(ft,{hidden:!P}),(_.length>0||ze.Children.count(R)>0)&&r(pt,{children:[_.length>0&&r(Pt,{id:`information-${T}`,label:o("informationPanelTabsAbout"),lang:s.langOf("informationPanelTabsAbout"),onClick:()=>Oe(e=>!e),expanded:ve,controls:de,children:r(Ct,{})}),R]}),(pe.length>0||Object.keys(fe).length>0)&&r("div",{ref:ie,className:"clover-scene-navigation",children:[pe.length>0&&r("div",{className:"clover-scene-tools",children:pe.map(e=>he(e,l))}),Object.keys(fe).length>0&&r(Yt,{controls:fe,controlButtons:l,turn:x,zoom:K,span:Be,indicator:le,name:je})]}),r("div",{ref:i,className:"clover-canvas-viewport",style:{position:"absolute",inset:0,overflow:"hidden",zIndex:-1,...be?{backgroundColor:be}:{}},"data-testid":"clover-scene-viewport",role:"img","aria-roledescription":Ze,...Ce.props,"aria-describedby":Re,"aria-keyshortcuts":Wt,"aria-busy":Ie,tabIndex:0,onKeyDown:He}),Ce.node,r("span",{id:Re,style:rt,...tt(s.langOf("sceneKeys")),children:o("sceneKeys")}),r(ht,{kind:"model",shown:I.state==="error"&&!!I.load}),I.state==="error"&&!I.load&&r(Lt,{error:I.error,className:"clover-scene-error"}),Ie&&r(Kt,{overlay:true}),_.length>0&&r(gt,{id:de,canvases:_,open:ve,onClose:Le,language:d})]})})}export{pr as S};
@@ -1 +1 @@
1
- import{D as te,a as se,e as ne,c as p,M as re,F as ce,C as oe,b as ae,d as H,y as h,A as d,u as o,l as j,t as ie}from"./shared-CCg1Iag8.mjs";import{j as le}from"./classnames-DukgfdpI.mjs";import{b as ue,s as he}from"./bringIntoView-CQH5ZgMM.mjs";import{a as de}from"./heading-Cjt0f-Eu.mjs";import{u as fe}from"./Sections-D_bS5IQH.mjs";import{F as ve}from"./FieldPill-BAql8_6s.mjs";import"./styles-C7PVxtkQ.mjs";const O=40,xe=te(function({headingLevel:D=3,sticky:y=false,size:K="large",as:L="div",className:T,...U},k){const{t:B,langOf:V}=se(),{clover:r,language:G}=ne("Search"),b=p(e=>{var s;return((s=re(e.manifest))==null?void 0:s.id)??null}),t=p(e=>e.search),J=p(e=>ce(e.manifest).canvases),a=p(e=>e.annotationId),Q=oe(r.highlight.subscribe,r.highlight.get,r.highlight.get),I=ae(),[$,S]=H(t.query);h(()=>S(t.query),[t.query]);const l=d(null),v=fe(),P=d(0),q=d(false),R=d(null);h(()=>{if(t.status!=="ready"||!t.set||R.current===t.set)return;R.current=t.set;const e=t.hits[0],s=t.hits.some(n=>a&&n.entryIds.includes(a));e&&!s&&r.selectAnnotation(e.entryIds[0])},[r,t.status,t.set,t.hits,a]),h(()=>{var i;const e=(i=l.current)==null?void 0:i.closest(".clover-content-search-field"),s=e==null?void 0:e.parentElement;if(!y||!e||!s||typeof ResizeObserver>"u")return;const n=new ResizeObserver(()=>s.style.setProperty("--clover-content-search-field",`${e.offsetHeight}px`));return n.observe(e),()=>{n.disconnect(),s.style.removeProperty("--clover-content-search-field")}},[y,b]),h(()=>{var s,n;if(!q.current)return;q.current=false;const e=(n=(s=l.current)==null?void 0:s.closest(".clover-content-search"))==null?void 0:n.querySelector('.clover-content-search-hit[aria-current="true"]');e&&ue(e,"nearest")},[a]);const[M,W]=H({set:null,count:O}),w=M.set===t.set?M.count:O,x=()=>W({set:t.set,count:w+O}),z=d(null),A=a?t.hits.findIndex(e=>e.entryIds.includes(a)):-1,N=typeof IntersectionObserver<"u",u=N?Math.min(t.hits.length,Math.max(w,A+1)):t.hits.length,E=d(x);if(E.current=x,h(()=>{const e=z.current;if(!e||!N||u>=t.hits.length)return;const s=new IntersectionObserver(n=>{n.some(i=>i.isIntersecting)&&E.current()},{root:he(e),rootMargin:"0px 0px 400px 0px"});return s.observe(e),()=>s.disconnect()},[N,u,t.hits.length]),h(()=>{!v||v===P.current||!l.current||(P.current=v,l.current.focus())},[v,b]),!b)return null;const F={position:A,total:t.hits.length,step:e=>{const s=t.hits[F.position+e];s&&(q.current=true,r.selectAnnotation(s.entryIds[0]))}},g=[];t.hits.slice(0,u).forEach((e,s)=>{const n=g[g.length-1];(n==null?void 0:n.canvasId)===e.canvasId?n.hits.push({hit:e,index:s}):g.push({canvasId:e.canvasId,hits:[{hit:e,index:s}]})});const X=de(D),f=t.hits.length,m=t.status==="loading"?"contentSearchLoading":t.status==="error"?"contentSearchError":t.status==="ready"?f===0?"contentSearchResultsNone":f===1?"contentSearchResult":"contentSearchResults":null,Y=m?B(m,{count:f}):"",Z=t.status==="ready"?F:null,_=o("p",{className:"clover-content-search-status",role:"status","data-status":t.status,...j(m?V(m):void 0),children:Y});return o(L,{ref:k,className:le("clover-content-search",T),"data-status":t.status,"data-sticky":y||void 0,...U,children:[o("div",{className:"clover-content-search-field",children:o(ve,{ref:l,id:`${I}-query`,value:$,onChange:e=>{S(e),!e&&t.query&&r.search("")},onSubmit:()=>void r.search($),onClear:()=>{var e;S(""),t.query&&r.search(""),(e=l.current)==null||e.focus()},results:Z,size:K,classes:{form:"clover-content-search-form",query:"clover-content-search-query",clear:"clover-content-search-clear",submit:"clover-content-search-submit"}})}),_,g.map(({canvasId:e,hits:s},n)=>{const i=J.find(c=>c.id===e),C=ie(i==null?void 0:i.label,G);return o("section",{className:"clover-content-search-group","aria-labelledby":`${I}-${n}`,children:[o(X,{id:`${I}-${n}`,className:"clover-content-search-canvas",...j(C.text?C.lang:void 0),children:C.text||e}),o("ol",{className:"clover-content-search-hits",children:s.map(({hit:c,index:ee})=>o("li",{children:o("button",{type:"button",className:"clover-content-search-hit","aria-current":a&&c.entryIds.includes(a)?"true":void 0,"data-highlighted":c.entryIds.includes(Q??""),onClick:()=>r.selectAnnotation(c.entryIds[0]),onPointerEnter:()=>r.highlight.emit(c.entryIds[0]),onPointerLeave:()=>r.highlight.emit(null),onFocus:()=>{r.highlight.emit(c.entryIds[0]),u<f&&ee>=u-5&&x()},onBlur:()=>r.highlight.emit(null),children:[c.before,o("mark",{children:c.match}),c.after]})},c.id))})]},`${e}-${n}`)}),u<f&&o("div",{ref:z,className:"clover-content-search-more","aria-hidden":"true"})]})});export{xe as Search};
1
+ import{D as te,a as se,e as ne,c as p,M as re,F as ce,C as oe,b as ae,d as H,y as h,A as d,u as o,l as j,t as ie}from"./shared-BtCBrxx9.mjs";import{j as le}from"./classnames-DukgfdpI.mjs";import{b as ue,s as he}from"./bringIntoView-CQH5ZgMM.mjs";import{a as de}from"./heading-Cjt0f-Eu.mjs";import{u as fe}from"./Sections-DK04V31W.mjs";import{F as ve}from"./FieldPill-pocIy1LB.mjs";import"./styles-CAv9WP3T.mjs";const O=40,xe=te(function({headingLevel:D=3,sticky:y=false,size:K="large",as:L="div",className:T,...U},k){const{t:B,langOf:V}=se(),{clover:r,language:G}=ne("Search"),b=p(e=>{var s;return((s=re(e.manifest))==null?void 0:s.id)??null}),t=p(e=>e.search),J=p(e=>ce(e.manifest).canvases),a=p(e=>e.annotationId),Q=oe(r.highlight.subscribe,r.highlight.get,r.highlight.get),I=ae(),[$,S]=H(t.query);h(()=>S(t.query),[t.query]);const l=d(null),v=fe(),P=d(0),q=d(false),R=d(null);h(()=>{if(t.status!=="ready"||!t.set||R.current===t.set)return;R.current=t.set;const e=t.hits[0],s=t.hits.some(n=>a&&n.entryIds.includes(a));e&&!s&&r.selectAnnotation(e.entryIds[0])},[r,t.status,t.set,t.hits,a]),h(()=>{var i;const e=(i=l.current)==null?void 0:i.closest(".clover-content-search-field"),s=e==null?void 0:e.parentElement;if(!y||!e||!s||typeof ResizeObserver>"u")return;const n=new ResizeObserver(()=>s.style.setProperty("--clover-content-search-field",`${e.offsetHeight}px`));return n.observe(e),()=>{n.disconnect(),s.style.removeProperty("--clover-content-search-field")}},[y,b]),h(()=>{var s,n;if(!q.current)return;q.current=false;const e=(n=(s=l.current)==null?void 0:s.closest(".clover-content-search"))==null?void 0:n.querySelector('.clover-content-search-hit[aria-current="true"]');e&&ue(e,"nearest")},[a]);const[M,W]=H({set:null,count:O}),w=M.set===t.set?M.count:O,x=()=>W({set:t.set,count:w+O}),z=d(null),A=a?t.hits.findIndex(e=>e.entryIds.includes(a)):-1,N=typeof IntersectionObserver<"u",u=N?Math.min(t.hits.length,Math.max(w,A+1)):t.hits.length,E=d(x);if(E.current=x,h(()=>{const e=z.current;if(!e||!N||u>=t.hits.length)return;const s=new IntersectionObserver(n=>{n.some(i=>i.isIntersecting)&&E.current()},{root:he(e),rootMargin:"0px 0px 400px 0px"});return s.observe(e),()=>s.disconnect()},[N,u,t.hits.length]),h(()=>{!v||v===P.current||!l.current||(P.current=v,l.current.focus())},[v,b]),!b)return null;const F={position:A,total:t.hits.length,step:e=>{const s=t.hits[F.position+e];s&&(q.current=true,r.selectAnnotation(s.entryIds[0]))}},g=[];t.hits.slice(0,u).forEach((e,s)=>{const n=g[g.length-1];(n==null?void 0:n.canvasId)===e.canvasId?n.hits.push({hit:e,index:s}):g.push({canvasId:e.canvasId,hits:[{hit:e,index:s}]})});const X=de(D),f=t.hits.length,m=t.status==="loading"?"contentSearchLoading":t.status==="error"?"contentSearchError":t.status==="ready"?f===0?"contentSearchResultsNone":f===1?"contentSearchResult":"contentSearchResults":null,Y=m?B(m,{count:f}):"",Z=t.status==="ready"?F:null,_=o("p",{className:"clover-content-search-status",role:"status","data-status":t.status,...j(m?V(m):void 0),children:Y});return o(L,{ref:k,className:le("clover-content-search",T),"data-status":t.status,"data-sticky":y||void 0,...U,children:[o("div",{className:"clover-content-search-field",children:o(ve,{ref:l,id:`${I}-query`,value:$,onChange:e=>{S(e),!e&&t.query&&r.search("")},onSubmit:()=>void r.search($),onClear:()=>{var e;S(""),t.query&&r.search(""),(e=l.current)==null||e.focus()},results:Z,size:K,classes:{form:"clover-content-search-form",query:"clover-content-search-query",clear:"clover-content-search-clear",submit:"clover-content-search-submit"}})}),_,g.map(({canvasId:e,hits:s},n)=>{const i=J.find(c=>c.id===e),C=ie(i==null?void 0:i.label,G);return o("section",{className:"clover-content-search-group","aria-labelledby":`${I}-${n}`,children:[o(X,{id:`${I}-${n}`,className:"clover-content-search-canvas",...j(C.text?C.lang:void 0),children:C.text||e}),o("ol",{className:"clover-content-search-hits",children:s.map(({hit:c,index:ee})=>o("li",{children:o("button",{type:"button",className:"clover-content-search-hit","aria-current":a&&c.entryIds.includes(a)?"true":void 0,"data-highlighted":c.entryIds.includes(Q??""),onClick:()=>r.selectAnnotation(c.entryIds[0]),onPointerEnter:()=>r.highlight.emit(c.entryIds[0]),onPointerLeave:()=>r.highlight.emit(null),onFocus:()=>{r.highlight.emit(c.entryIds[0]),u<f&&ee>=u-5&&x()},onBlur:()=>r.highlight.emit(null),children:[c.before,o("mark",{children:c.match}),c.after]})},c.id))})]},`${e}-${n}`)}),u<f&&o("div",{ref:z,className:"clover-content-search-more","aria-hidden":"true"})]})});export{xe as Search};
@@ -1,2 +1,2 @@
1
- import{b as ae,A as $,a as ie,d as G,y as z,_ as de,u as i,Q as J,l as ue,k as fe,x as Z}from"./shared-CCg1Iag8.mjs";import{a as pe}from"./heading-Cjt0f-Eu.mjs";import{T as ve}from"./Tip-DPFWlNLu.mjs";import{u as he}from"./useContainerName-BfyeBf6_.mjs";import{u as ge}from"./useScrollTrack-9QsMaHSx.mjs";import{C as me}from"./Chevron-B3XaClVT.mjs";import"./styles-C7PVxtkQ.mjs";const V=typeof window>"u"?z:de,ee=J(null);function Pe(){return Z(ee)}const te=J(0);function Ne(){return Z(te)}function $e({items:n,layout:r="tabs",value:R,onValueChange:S,label:E,labelLang:F,headingLevel:h=3}){var Q;const g=ae(),k=he(E??"",F,E===void 0),f=$([]),s=r==="tabs",{t:I,langOf:oe}=ie(),m=ge({dragFree:true,itemCount:n.length}),v=n.some(e=>e.value===R)?R:((Q=n[0])==null?void 0:Q.value)??null,H=$(new Set);v&&H.current.add(v);const T=$(null),[D,ne]=G({value:null,count:0});z(()=>{var d;if(s||!v||T.current!==v)return;T.current=null;const e=n.findIndex(u=>u.value===v),o=document.getElementById(`${g}-panel-${e}`),t=(d=f.current[e])==null?void 0:d.parentElement;if(!o||!t)return;const l=t.getBoundingClientRect().bottom-o.getBoundingClientRect().top;if(l<=0)return;const a=M(o);a&&(a.scrollTop-=l)},[v,s,n,g]);const re=e=>{var B,P,y,N;const o=n.findIndex(A=>A.value===v),t=document.getElementById(`${g}-panel-${o}`),l=e.target;if(!t||l===t||!t.contains(l)||!ye(l))return;const a=(P=(B=f.current[o])==null?void 0:B.parentElement)==null?void 0:P.getBoundingClientRect(),d=o+1<n.length?(N=(y=f.current[o+1])==null?void 0:y.parentElement)==null?void 0:N.getBoundingClientRect():void 0;if(!a)return;const u=l.getBoundingClientRect(),b=u.top<a.bottom?Math.floor(u.top-a.bottom):d&&u.bottom>d.top?Math.ceil(Math.min(u.bottom-d.top,u.top-a.bottom)):0,p=b?M(t):null;p&&(p.scrollTop+=b)},j=$(null),K=n.map(e=>e.value).join(`
1
+ import{b as ae,A as $,a as ie,d as G,y as z,_ as de,u as i,Q as J,l as ue,k as fe,x as Z}from"./shared-BtCBrxx9.mjs";import{a as pe}from"./heading-Cjt0f-Eu.mjs";import{T as ve}from"./Tip-Dd_jhbIx.mjs";import{u as he}from"./useContainerName-C2L1lj9-.mjs";import{u as ge}from"./useScrollTrack-D-Yh7v0Q.mjs";import{C as me}from"./Chevron-CePM9HdR.mjs";import"./styles-CAv9WP3T.mjs";const V=typeof window>"u"?z:de,ee=J(null);function Pe(){return Z(ee)}const te=J(0);function Ne(){return Z(te)}function $e({items:n,layout:r="tabs",value:R,onValueChange:S,label:E,labelLang:F,headingLevel:h=3}){var Q;const g=ae(),k=he(E??"",F,E===void 0),f=$([]),s=r==="tabs",{t:I,langOf:oe}=ie(),m=ge({dragFree:true,itemCount:n.length}),v=n.some(e=>e.value===R)?R:((Q=n[0])==null?void 0:Q.value)??null,H=$(new Set);v&&H.current.add(v);const T=$(null),[D,ne]=G({value:null,count:0});z(()=>{var d;if(s||!v||T.current!==v)return;T.current=null;const e=n.findIndex(u=>u.value===v),o=document.getElementById(`${g}-panel-${e}`),t=(d=f.current[e])==null?void 0:d.parentElement;if(!o||!t)return;const l=t.getBoundingClientRect().bottom-o.getBoundingClientRect().top;if(l<=0)return;const a=M(o);a&&(a.scrollTop-=l)},[v,s,n,g]);const re=e=>{var B,P,y,N;const o=n.findIndex(A=>A.value===v),t=document.getElementById(`${g}-panel-${o}`),l=e.target;if(!t||l===t||!t.contains(l)||!ye(l))return;const a=(P=(B=f.current[o])==null?void 0:B.parentElement)==null?void 0:P.getBoundingClientRect(),d=o+1<n.length?(N=(y=f.current[o+1])==null?void 0:y.parentElement)==null?void 0:N.getBoundingClientRect():void 0;if(!a)return;const u=l.getBoundingClientRect(),b=u.top<a.bottom?Math.floor(u.top-a.bottom):d&&u.bottom>d.top?Math.ceil(Math.min(u.bottom-d.top,u.top-a.bottom)):0,p=b?M(t):null;p&&(p.scrollTop+=b)},j=$(null),K=n.map(e=>e.value).join(`
2
2
  `);V(()=>{const e=j.current;if(s||!e||typeof ResizeObserver>"u")return;const o=[...e.querySelectorAll(":scope > .clover-sections-item")],t=o.map(c=>c.firstElementChild),l=t[0],a=t[t.length-1],d=new Map,u=c=>(c&&d.get(c))??0,b=document.scrollingElement;let p=null,B=0;const P=()=>{const c=t.reduce((O,L)=>O+u(L),0);let C=0;o.forEach((O,L)=>{O.style.setProperty("--clover-sections-before",`${C}px`),C+=u(t[L]),O.style.setProperty("--clover-sections-after",`${c-C}px`)}),e.style.setProperty("--clover-sections-total",`${c}px`);const w=l&&getComputedStyle(l);(w==null?void 0:w.position)==="sticky"&&a&&(B=parseFloat(w.top)+parseFloat(getComputedStyle(a).bottom)||0);const x=getComputedStyle(e),ce=parseFloat(x.lineHeight)||1.2*parseFloat(x.fontSize),X=(p==null?void 0:p.clientHeight)??0;X>0&&X-B-c<2*ce?e.dataset.stacks="off":delete e.dataset.stacks},y=new ResizeObserver(c=>{var C,w;for(const x of c)t.includes(x.target)&&d.set(x.target,((w=(C=x.borderBoxSize)==null?void 0:C[0])==null?void 0:w.blockSize)??x.target.getBoundingClientRect().height);P()}),N=()=>{const c=M(e);c!==p&&(p&&p!==b&&y.unobserve(p),c&&c!==b&&y.observe(c),p=c)},A=()=>{N(),P()};N();for(const c of t)c&&y.observe(c,{box:"border-box"});return window.addEventListener("resize",A),()=>{y.disconnect(),window.removeEventListener("resize",A);for(const c of o)c.style.removeProperty("--clover-sections-before"),c.style.removeProperty("--clover-sections-after");e.style.removeProperty("--clover-sections-total"),delete e.dataset.stacks}},[s,K,h]),z(()=>{if(s)return;const e=f.current.map(t=>t==null?void 0:t.parentElement).filter(t=>!!t),o=t=>{var u;if(t.ctrlKey)return;const l=t.currentTarget,a=_(l);if(!a||a===document.scrollingElement)return;t.preventDefault();const d=t.deltaMode===1?parseFloat(getComputedStyle(l).lineHeight)||16:t.deltaMode===2?a.clientHeight:1;(u=_(a)??document.scrollingElement)==null||u.scrollBy({left:t.deltaX*d,top:t.deltaY*d,behavior:"instant"})};for(const t of e)t.addEventListener("wheel",o,{passive:false});return()=>{for(const t of e)t.removeEventListener("wheel",o)}},[s,K]);const W=e=>{e!==v&&(T.current=e,s||ne(o=>({value:e,count:o.count+1})),S==null||S(e))},se=(e,o)=>{var u;const t=n.length-1,[l,a]=s?["ArrowLeft","ArrowRight"]:["ArrowUp","ArrowDown"],d=e.key===a?(o+1)%n.length:e.key===l?(o-1+n.length)%n.length:e.key==="Home"?0:e.key==="End"?t:null;d!==null&&(e.preventDefault(),(u=f.current[d])==null||u.focus(),s&&W(n[d].value))},Y=$(false);z(()=>{if(!s)return;const e=n.findIndex(p=>p.value===v),o=f.current[e],t=o==null?void 0:o.parentElement;if(!o||!t)return;const l=getComputedStyle(t),a=t.getBoundingClientRect(),d=o.getBoundingClientRect(),u=a.left+(parseFloat(l.scrollPaddingLeft)||0),b=a.right-(parseFloat(l.scrollPaddingRight)||0);(d.left<u-1||d.right>b+1)&&m.scrollToIndex(e,{instant:!Y.current}),Y.current=true},[v,s,n.length,m.scrollToIndex]);const q=e=>{const o=e==="prev"?m.canScrollPrev:m.canScrollNext,t=e==="prev"?"sectionsScrollBack":"sectionsScrollForward";return i("button",{type:"button",className:`clover-steps-step clover-sections-scroll-${e}`,"aria-hidden":"true",tabIndex:-1,hidden:!o,...ue(oe(t)),onMouseDown:l=>l.preventDefault(),onClick:e==="prev"?m.scrollPrev:m.scrollNext,children:[i("svg",{"aria-hidden":"true",focusable:"false",width:"12",height:"12",viewBox:"0 0 16 16",children:i("path",{d:e==="next"?"M6 3l5 5-5 5":"M10 3L5 8l5 5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),i(ve,{label:I(t)})]})},le=pe(h,"div"),U=(e,o)=>{const t=e.value===v;return i("button",{ref:l=>{f.current[o]=l},type:"button",id:`${g}-button-${o}`,className:"clover-sections-button","data-value":e.value,"data-track-index":s?o:void 0,"aria-controls":`${g}-panel-${o}`,...s?{role:"tab","aria-selected":t,tabIndex:t?0:-1}:{"aria-expanded":t,"aria-disabled":t||void 0},onClick:()=>W(e.value),onKeyDown:l=>se(l,o),children:[i("span",{className:"clover-sections-label",children:e.label}),!s&&i(me,{open:t,className:"clover-sections-chevron"})]},e.value)};return i("div",{ref:j,className:"clover-sections","data-layout":r,onFocus:s?void 0:re,style:s?void 0:{"--clover-sections-count":n.length},children:[s&&i("div",{className:"clover-sections-tabs","data-more":[m.canScrollPrev&&"start",m.canScrollNext&&"end"].filter(Boolean).join(" ")||void 0,children:i("div",{className:"clover-sections-row",children:[i("div",{role:"tablist",ref:m.ref,...k.props,className:"clover-sections-list",children:n.map(U)}),q("prev"),q("next")]})}),s&&k.node,n.map((e,o)=>{const t=e.value===v;return i("section",{className:"clover-sections-item","data-value":e.value,"data-open":t,style:s?void 0:{"--clover-sections-index":o},children:[!s&&i(le,{className:"clover-sections-heading",children:[U(e,o),i("span",{className:"clover-sections-reach","aria-hidden":"true"})]}),i(te.Provider,{value:D.value===e.value?D.count:0,children:i(be,{id:`${g}-panel-${o}`,tabs:s,labelledBy:`${g}-button-${o}`,hidden:!t,actions:e.actions,children:H.current.has(e.value)?e.content:null})})]},e.value)})]})}function be({id:n,tabs:r,labelledBy:R,hidden:S,actions:E,children:F}){const[h,g]=G(null),k=!S||!!E;return V(()=>{const f=h==null?void 0:h.parentElement;if(!k||!h||!f||typeof ResizeObserver>"u")return;const s=new ResizeObserver(()=>{const I=h.offsetWidth;I?(f.style.setProperty("--clover-sections-actions",`${I}px`),f.setAttribute("data-actions","")):(f.style.removeProperty("--clover-sections-actions"),f.removeAttribute("data-actions"))});return s.observe(h),()=>{s.disconnect(),f.style.removeProperty("--clover-sections-actions"),f.removeAttribute("data-actions")}},[h,k]),i(fe,{children:[!r&&i("div",{ref:g,className:"clover-sections-actions",hidden:!k,children:E}),i("div",{id:n,role:r?"tabpanel":"region","aria-labelledby":R,tabIndex:r?0:void 0,className:"clover-sections-panel",hidden:S,children:i(ee.Provider,{value:r?null:h,children:[r&&E,F]})})]})}function M(n){for(let r=n.parentElement;r&&r!==document.body;r=r.parentElement)if(/auto|scroll|hidden/.test(getComputedStyle(r).overflowY))return r;return document.scrollingElement}function _(n){for(let r=n.parentElement;r&&r!==document.body;r=r.parentElement)if(/auto|scroll/.test(getComputedStyle(r).overflowY)&&r.scrollHeight>r.clientHeight)return r;return document.scrollingElement}function ye(n){try{return n.matches(":focus-visible")}catch{return true}}export{$e as S,Pe as a,Ne as u};
@@ -0,0 +1 @@
1
+ import{a as A,A as C,d as B,_ as O,T as W,u as c,ah as q,l as P,k as _}from"./shared-BtCBrxx9.mjs";import{b as z}from"./Transport-DGXTdsId.mjs";import{S as Y}from"./Steps-Dw4i3bYY.mjs";import{h as j}from"./Tip-Dd_jhbIx.mjs";const H=12;function G(e,s,l,d){const f=i=>H/2+(l-H)*(i.start/s),h=[];for(const i of e){const m=h[h.length-1];(m?l>0?f(i)-f(m[0])<d:i.start===m[0].start:false)?m.push(i):h.push([i])}return h}const J={ArrowDown:e=>parseFloat(getComputedStyle(e).lineHeight)||16,ArrowUp:e=>-(parseFloat(getComputedStyle(e).lineHeight)||16),PageDown:e=>e.clientHeight,PageUp:e=>-e.clientHeight};function Q(e){const s=e.currentTarget.querySelector(".clover-canvas-transport-mark-words"),l=J[e.key];if(!s||!l||e.altKey||e.ctrlKey||e.metaKey)return false;const d=l(s);return(d>0?s.scrollHeight-s.clientHeight-s.scrollTop:s.scrollTop)<1?false:(e.preventDefault(),s.scrollBy({top:d}),true)}function et({marks:e,duration:s,selected:l,onSelect:d,onActivate:f}){const{t:h,langOf:i}=A(),m=C(null),[u,D]=B({width:0,target:0,from:0});O(()=>{const t=m.current;if(!t)return;const n=t.closest(".clover-canvas-media"),r=()=>{const p=t.querySelector(".clover-canvas-transport-mark"),g={width:t.clientWidth,target:(p==null?void 0:p.offsetWidth)??0,from:n?t.getBoundingClientRect().left-n.getBoundingClientRect().left:0};D(v=>v.width===g.width&&v.target===g.target&&v.from===g.from?v:g)};r();const o=new ResizeObserver(r);return o.observe(t),n&&o.observe(n),()=>o.disconnect()},[]);const y=W(()=>G(e,s,u.width,u.target),[e,s,u]),[M,E]=B({}),K=t=>{const n=t.findIndex(r=>r.id===l);return n>=0?n:Math.min(M[t[0].id]??0,t.length-1)},[$,I]=B(null),[L,R]=B(null),k=t=>{R(t),f==null||f(t)},T=C([]),x=C(new Set);if(!e.length||!(s>0))return null;const b=(t,n)=>!!n&&t.some(r=>r.id===n),F=Math.max(0,y.findIndex(t=>b(t,$??l))),S=t=>{var r;const n=Math.min(y.length-1,Math.max(0,t));(r=T.current[n])==null||r.focus()},N=t=>z(t[0].start/s*100),U=t=>`${u.from+H/2+(u.width-H)*(t[0].start/s)}px`;return c(_,{children:[c("span",{className:"clover-canvas-transport-points","aria-hidden":"true",children:y.map(t=>c("span",{className:"clover-canvas-transport-mark-point","data-active":b(t,L)||b(t,l)?"true":void 0,style:{left:N(t)}},t[0].id))}),c("div",{ref:m,className:"clover-canvas-transport-marks",role:"toolbar","aria-label":h("informationPanelTabsAnnotations"),lang:i("informationPanelTabsAnnotations"),onKeyDown:t=>{const n=T.current.findIndex(o=>o===document.activeElement);if(n<0)return;const r=getComputedStyle(t.currentTarget).direction==="rtl"?-1:1;if(t.key==="ArrowRight")S(n+r);else if(t.key==="ArrowLeft")S(n-r);else if(t.key==="Home")S(0);else if(t.key==="End")S(y.length-1);else return;t.preventDefault()},children:y.map((t,n)=>{const r=K(t),o=t[r],p=q(o.start),g=t.length>1?` ${r+1} / ${t.length}`:"",v=a=>{E(w=>({...w,[t[0].id]:a})),k(t[a].id),d(t[a].id)};return c("div",{className:"clover-canvas-transport-mark-group",style:{left:N(t),...u.width>0&&{"--clover-mark-x":U(t)}},onPointerEnter:()=>{x.current.delete(t[0].id),k(o.id)},onPointerLeave:()=>k(null),onFocus:()=>{x.current.delete(t[0].id),I(o.id),k(o.id)},onBlur:a=>{a.currentTarget.contains(a.relatedTarget)||k(null)},onKeyDown:a=>{if(a.defaultPrevented||Q(a)||a.key!=="Escape"||x.current.has(t[0].id))return;a.preventDefault(),x.current.add(t[0].id);const w=T.current[n];w&&document.activeElement!==w&&w.focus(),j(a.currentTarget,"tipHidden",["pointerenter","focusin"])},children:[c("button",{ref:a=>{T.current[n]=a},type:"button",className:"clover-canvas-transport-mark",tabIndex:n===F?0:-1,"aria-label":`${p} ${o.label}${g}`,...P(o.lang),"aria-current":b(t,l)?"true":void 0,"data-active":b(t,l)?"true":void 0,onClick:()=>d(o.id)}),c("span",{className:"clover-tip clover-canvas-transport-mark-tip",children:[c("span",{className:"clover-canvas-transport-mark-words","aria-hidden":"true",...P(o.lang),children:[c("span",{className:"clover-tip-lead",children:p}),o.label]}),t.length>1&&c(Y,{steps:{position:r,total:t.length,step:a=>v(r+a)}})]})]},t[0].id)})})]})}export{et as SeekMarks,G as groupMarks};
@@ -1 +1 @@
1
- import{d as b,A as I,y as L,aD as P,T as V,a3 as k,u as O,Y as F}from"./shared-CCg1Iag8.mjs";import{s as M,P as R,a as T}from"./Items-BHTQJU7T.mjs";import{b as Y}from"./items-D03KhDg6.mjs";function B({iiifContent:a,items:e,navigation:w,onSelect:r,request:i,header:x=true,forwardedRef:g,...u}){var p;const[s,A]=b(null),[f,c]=b(0),D=typeof a=="string"?a:a==null?void 0:a.id,m=I({iiifContent:a,request:i});m.current={iiifContent:a,request:i},L(()=>{if(e||m.current.iiifContent===void 0)return;const t=new AbortController;return P(m.current.iiifContent,{request:m.current.request,signal:t.signal}).then(o=>{t.signal.aborted||A(o)}).catch(()=>{}),()=>t.abort()},[D,e]);const n=V(()=>Y(e||s),[e,s]);if(!n.length)return null;const h=!e&&(s==null?void 0:s.type)==="Manifest",d=k(s==null?void 0:s.viewingDirection),y=w??(h?"id":"homepage");if(u.layout==="pager")return O(R,{...u,forwardedRef:g,steps:M(n,f,d,(t,o)=>{r==null||r(t,o),c(n.indexOf(t))})});const l=(p=s==null?void 0:s.homepage)==null?void 0:p[0],v=l==null?void 0:l.id;return O(T,{...u,forwardedRef:g,items:n,selected:y==="id"?f:-1,navigation:y,rtl:d==="right-to-left",request:i,showSummary:!h,heading:x&&s?{label:s.label,summary:s.summary,homepage:v,homepageLang:F(l)}:void 0,onActivate:(t,o)=>{r==null||r(t,o),c(n.indexOf(t))},followFocus:t=>c(n.indexOf(t))})}export{B as default};
1
+ import{d as b,A as I,y as L,aD as P,T as V,a3 as k,u as O,Y as F}from"./shared-BtCBrxx9.mjs";import{s as M,P as R,a as T}from"./Items-GF8INTZw.mjs";import{b as Y}from"./items-CDbMZvPN.mjs";function B({iiifContent:a,items:e,navigation:w,onSelect:r,request:i,header:x=true,forwardedRef:g,...u}){var p;const[s,A]=b(null),[f,c]=b(0),D=typeof a=="string"?a:a==null?void 0:a.id,m=I({iiifContent:a,request:i});m.current={iiifContent:a,request:i},L(()=>{if(e||m.current.iiifContent===void 0)return;const t=new AbortController;return P(m.current.iiifContent,{request:m.current.request,signal:t.signal}).then(o=>{t.signal.aborted||A(o)}).catch(()=>{}),()=>t.abort()},[D,e]);const n=V(()=>Y(e||s),[e,s]);if(!n.length)return null;const h=!e&&(s==null?void 0:s.type)==="Manifest",d=k(s==null?void 0:s.viewingDirection),y=w??(h?"id":"homepage");if(u.layout==="pager")return O(R,{...u,forwardedRef:g,steps:M(n,f,d,(t,o)=>{r==null||r(t,o),c(n.indexOf(t))})});const l=(p=s==null?void 0:s.homepage)==null?void 0:p[0],v=l==null?void 0:l.id;return O(T,{...u,forwardedRef:g,items:n,selected:y==="id"?f:-1,navigation:y,rtl:d==="right-to-left",request:i,showSummary:!h,heading:x&&s?{label:s.label,summary:s.summary,homepage:v,homepageLang:F(l)}:void 0,onActivate:(t,o)=>{r==null||r(t,o),c(n.indexOf(t))},followFocus:t=>c(n.indexOf(t))})}export{B as default};
@@ -1 +1 @@
1
- import{a as p,u as s,v as c,l as d,k as m}from"./shared-CCg1Iag8.mjs";import{j as v}from"./classnames-DukgfdpI.mjs";import{b as f}from"./hooks-Dz_5UXXp.mjs";import{L as h}from"./Loading-4PmhMeZ-.mjs";function b({className:e,loading:t,error:l}){const{t:n,langOf:i}=p(),{status:a,error:o}=f(),r=a==="loading",u=t!==void 0&&t!==false;return s(m,{children:[s("p",{className:v("clover-status",e),"data-status":r?a:void 0,role:"status",style:r&&t!==false?void 0:c,children:[r&&(u?t:t===void 0&&s(h,{})),r&&!u&&s("span",{style:c,...d(i("statusLoading")),children:n("statusLoading")})]}),a==="error"&&o&&s("div",{className:v("clover-status",e),"data-status":a,role:"alert",children:l?l(o):s(m,{children:[s("p",{...d(i("statusError")),children:n("statusError")}),s("p",{className:"clover-status-detail",lang:"en",children:o.message})]})})]})}export{b as S};
1
+ import{a as p,u as s,v as c,l as d,k as m}from"./shared-BtCBrxx9.mjs";import{j as v}from"./classnames-DukgfdpI.mjs";import{b as f}from"./hooks-Dl6ZSn_E.mjs";import{L as h}from"./Loading-tVzMiUqD.mjs";function b({className:e,loading:t,error:l}){const{t:n,langOf:i}=p(),{status:a,error:o}=f(),r=a==="loading",u=t!==void 0&&t!==false;return s(m,{children:[s("p",{className:v("clover-status",e),"data-status":r?a:void 0,role:"status",style:r&&t!==false?void 0:c,children:[r&&(u?t:t===void 0&&s(h,{})),r&&!u&&s("span",{style:c,...d(i("statusLoading")),children:n("statusLoading")})]}),a==="error"&&o&&s("div",{className:v("clover-status",e),"data-status":a,role:"alert",children:l?l(o):s(m,{children:[s("p",{...d(i("statusError")),children:n("statusError")}),s("p",{className:"clover-status-detail",lang:"en",children:o.message})]})})]})}export{b as S};
@@ -1 +1 @@
1
- import{a as c,u as o,l as p,v as u}from"./shared-CCg1Iag8.mjs";import{j as h}from"./classnames-DukgfdpI.mjs";import{T as v}from"./Tip-DPFWlNLu.mjs";import"./styles-C7PVxtkQ.mjs";function g({steps:e,sentence:t,className:a}){const{t:l,langOf:n}=c(),{position:r,total:i}=e;if(i<1)return null;const s=r+1;return o("div",{className:h("clover-steps",a),children:[o("span",{"aria-live":"polite",className:"clover-steps-position",children:[o("span",{"aria-hidden":t?"true":void 0,children:[s>0?s:"\u2013"," / ",i]}),o("span",{className:"clover-steps-room","aria-hidden":"true",hidden:true,children:[i," / ",i]}),t&&s>0&&o("span",{style:u,...p(n(t)),children:l(t,{index:s,total:i})})]}),o(d,{steps:e,step:"previous"}),o(d,{steps:e,step:"next"})]})}function d({steps:e,step:t}){const{t:a,langOf:l}=c(),n=t==="next",r=n?e.position+1<e.total:e.position>0,i=n?"commonNext":"commonPrevious";return o("button",{type:"button",className:"clover-steps-step","data-step":t,...p(l(i)),"aria-disabled":!r||void 0,tabIndex:r?void 0:-1,onClick:()=>{r&&e.step(n?1:-1)},children:[o("svg",{"aria-hidden":"true",focusable:"false",width:"12",height:"12",viewBox:"0 0 16 16",children:o("path",{d:n?"M6 3l5 5-5 5":"M10 3L5 8l5 5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),o("span",{style:u,children:a(i)}),o(v,{label:a(i)})]})}export{g as S};
1
+ import{a as c,u as o,l as p,v as u}from"./shared-BtCBrxx9.mjs";import{j as h}from"./classnames-DukgfdpI.mjs";import{T as v}from"./Tip-Dd_jhbIx.mjs";import"./styles-CAv9WP3T.mjs";function g({steps:e,sentence:t,className:a}){const{t:l,langOf:n}=c(),{position:r,total:i}=e;if(i<1)return null;const s=r+1;return o("div",{className:h("clover-steps",a),children:[o("span",{"aria-live":"polite",className:"clover-steps-position",children:[o("span",{"aria-hidden":t?"true":void 0,children:[s>0?s:"\u2013"," / ",i]}),o("span",{className:"clover-steps-room","aria-hidden":"true",hidden:true,children:[i," / ",i]}),t&&s>0&&o("span",{style:u,...p(n(t)),children:l(t,{index:s,total:i})})]}),o(d,{steps:e,step:"previous"}),o(d,{steps:e,step:"next"})]})}function d({steps:e,step:t}){const{t:a,langOf:l}=c(),n=t==="next",r=n?e.position+1<e.total:e.position>0,i=n?"commonNext":"commonPrevious";return o("button",{type:"button",className:"clover-steps-step","data-step":t,...p(l(i)),"aria-disabled":!r||void 0,tabIndex:r?void 0:-1,onClick:()=>{r&&e.step(n?1:-1)},children:[o("svg",{"aria-hidden":"true",focusable:"false",width:"12",height:"12",viewBox:"0 0 16 16",children:o("path",{d:n?"M6 3l5 5-5 5":"M10 3L5 8l5 5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),o("span",{style:u,children:a(i)}),o(v,{label:a(i)})]})}export{g as S};
@@ -1 +1 @@
1
- import{e as p,c as m,ad as v,t as f,u as d,l as h,T as g,d as x,y,F as b}from"./shared-CCg1Iag8.mjs";import{s as w,P as M,a as C}from"./Items-BHTQJU7T.mjs";import{C as P}from"./CountMenu-CReBYVwu.mjs";import{f as S,r as N}from"./fetchManifest-DxptUh4u.mjs";import{S as q}from"./Steps-Dnn8Ajqf.mjs";import{a as A}from"./heading-Cjt0f-Eu.mjs";import"./styles-C7PVxtkQ.mjs";function I({onSelect:s,forwardedRef:t,...i}){const{clover:l,language:o}=p("Items"),{items:a,position:e}=F(),r=(n,c)=>{s==null||s(n,c);const u=a.findIndex(T=>T.id===n.id);u>=0&&l.goToTarget(u)};return i.layout==="pager"?d(M,{...i,forwardedRef:t,steps:w(a,e,"left-to-right",r),nameKey:"informationPanelTabsTargets",position:d(P,{position:e,total:a.length,list:n=>d(I,{layout:"list",forwardedRef:null,onSelect:n})})}):d(C,{...i,forwardedRef:t,items:a,selected:e,navigation:"id",language:o,request:l.request,showSummary:true,onActivate:r})}function F(){const{language:s}=p("Items"),t=m(e=>e.targets),i=m(e=>e.manifest),l=m(e=>v(e.targets,e.targetIndex,e.manifest,e.canvasId)),o=z(t==null?void 0:t.items,i);return{items:g(()=>((t==null?void 0:t.items)??[]).map(e=>B(e,o.get(e.manifestId)??(e.manifestAs?o.get(e.manifestAs):void 0),s)),[t,o,s]),position:l}}function z(s,t){const{clover:i}=p("Items"),l=g(()=>[...new Set((s??[]).map(e=>e.manifestId))],[s]),[o,a]=x(new Map);return y(()=>{let e=true;return Promise.all(l.map(async r=>[r,await S(i,r)])).then(r=>{e&&a(new Map(r.filter(n=>!!n[1])))}),()=>{e=false}},[i,l]),g(()=>{const e=new Map(o);return t&&e.set(t.id,t),e},[o,t])}function B(s,t,i){const l=t?b(t).canvases:[],o=l.find(u=>u.id===s.canvasId)??l[0],a=t==null?void 0:t.label,e=o==null?void 0:o.label,r=f(e,i).text?e:a,n=a&&r!==a&&f(a,i).text!==f(r,i).text?a:void 0,c=o&&s.region?N(o,s.region):void 0;return{id:s.id,label:r,summary:n,parts:[{id:s.id,type:"Canvas",label:r,resource:o??{id:s.canvasId??s.manifestId},...c?{source:c}:{}}]}}function E({headingLevel:s=3}){const{clover:t,language:i}=p("Items"),l=m(n=>{var c;return(c=n.targets)==null?void 0:c.label}),o=m(n=>{var c;return((c=n.targets)==null?void 0:c.items.length)??0}),a=m(n=>v(n.targets,n.targetIndex,n.manifest,n.canvasId));if(o<2)return null;const e=f(l,i),r=A(s);return d("div",{className:"clover-about clover-collection clover-targets",children:[d("div",{className:"clover-targets-head",children:[e.text&&d(r,{className:"clover-collection-title clover-title",...h(e.lang),children:e.text}),d(q,{className:"clover-targets-steps",steps:{position:a,total:o,step:n=>{const c=a+n;c>=0&&c<o&&t.goToTarget(c)}}})]}),d(I,{layout:"list",forwardedRef:null})]})}export{E as TargetsSection,I as default,F as useTargetItems};
1
+ import{e as p,c as m,ad as v,t as f,u as d,l as h,T as g,d as x,y,F as b}from"./shared-BtCBrxx9.mjs";import{s as w,P as M,a as C}from"./Items-GF8INTZw.mjs";import{C as P}from"./CountMenu-CpM-FXwx.mjs";import{f as S,r as N}from"./fetchManifest-BchmTYKJ.mjs";import{S as q}from"./Steps-Dw4i3bYY.mjs";import{a as A}from"./heading-Cjt0f-Eu.mjs";import"./styles-CAv9WP3T.mjs";function I({onSelect:s,forwardedRef:t,...i}){const{clover:l,language:o}=p("Items"),{items:a,position:e}=F(),r=(n,c)=>{s==null||s(n,c);const u=a.findIndex(T=>T.id===n.id);u>=0&&l.goToTarget(u)};return i.layout==="pager"?d(M,{...i,forwardedRef:t,steps:w(a,e,"left-to-right",r),nameKey:"informationPanelTabsTargets",position:d(P,{position:e,total:a.length,list:n=>d(I,{layout:"list",forwardedRef:null,onSelect:n})})}):d(C,{...i,forwardedRef:t,items:a,selected:e,navigation:"id",language:o,request:l.request,showSummary:true,onActivate:r})}function F(){const{language:s}=p("Items"),t=m(e=>e.targets),i=m(e=>e.manifest),l=m(e=>v(e.targets,e.targetIndex,e.manifest,e.canvasId)),o=z(t==null?void 0:t.items,i);return{items:g(()=>((t==null?void 0:t.items)??[]).map(e=>B(e,o.get(e.manifestId)??(e.manifestAs?o.get(e.manifestAs):void 0),s)),[t,o,s]),position:l}}function z(s,t){const{clover:i}=p("Items"),l=g(()=>[...new Set((s??[]).map(e=>e.manifestId))],[s]),[o,a]=x(new Map);return y(()=>{let e=true;return Promise.all(l.map(async r=>[r,await S(i,r)])).then(r=>{e&&a(new Map(r.filter(n=>!!n[1])))}),()=>{e=false}},[i,l]),g(()=>{const e=new Map(o);return t&&e.set(t.id,t),e},[o,t])}function B(s,t,i){const l=t?b(t).canvases:[],o=l.find(u=>u.id===s.canvasId)??l[0],a=t==null?void 0:t.label,e=o==null?void 0:o.label,r=f(e,i).text?e:a,n=a&&r!==a&&f(a,i).text!==f(r,i).text?a:void 0,c=o&&s.region?N(o,s.region):void 0;return{id:s.id,label:r,summary:n,parts:[{id:s.id,type:"Canvas",label:r,resource:o??{id:s.canvasId??s.manifestId},...c?{source:c}:{}}]}}function E({headingLevel:s=3}){const{clover:t,language:i}=p("Items"),l=m(n=>{var c;return(c=n.targets)==null?void 0:c.label}),o=m(n=>{var c;return((c=n.targets)==null?void 0:c.items.length)??0}),a=m(n=>v(n.targets,n.targetIndex,n.manifest,n.canvasId));if(o<2)return null;const e=f(l,i),r=A(s);return d("div",{className:"clover-about clover-collection clover-targets",children:[d("div",{className:"clover-targets-head",children:[e.text&&d(r,{className:"clover-collection-title clover-title",...h(e.lang),children:e.text}),d(q,{className:"clover-targets-steps",steps:{position:a,total:o,step:n=>{const c=a+n;c>=0&&c<o&&t.goToTarget(c)}}})]}),d(I,{layout:"list",forwardedRef:null})]})}export{E as TargetsSection,I as default,F as useTargetItems};
@@ -0,0 +1 @@
1
+ import{O as f,u as a,z as l,P as r}from"./shared-BtCBrxx9.mjs";import{C as m}from"./CanvasView-DcrhjwpU.mjs";import{p as t}from"./playerSurface-D3T1sYp4.mjs";import{C as s}from"./Pending-Ci8Pe6Ip.mjs";import{j as u}from"./classnames-DukgfdpI.mjs";const d=l(()=>import("./Connected-D_Y8fBZk.mjs")),v=l(()=>import("./LoadedCanvas-Bdqqh01C.mjs"));function h({timeline:o,className:n,...e}){const c=f(),i=u("clover-timeline",n);return e.iiifContent!==void 0&&o===void 0?a(r,{fallback:a(s,{}),children:a(v,{...e,className:i,of:"Timeline",surface:t})}):o?a(m,{...e,className:i,canvases:[o],navigator:false,surface:t}):c?a(r,{fallback:a(s,{}),children:a(d,{...e,className:n})}):null}export{h as Timeline,h as default};
@@ -1 +1 @@
1
- import{a as k,A as L,y as S,u as f,l as w}from"./shared-CCg1Iag8.mjs";import"./styles-C7PVxtkQ.mjs";const M={zoomIn:{keys:"Plus",glyph:"+"},zoomOut:{keys:"-",glyph:"\u2212"},reset:{keys:"0",glyph:"0"},rotateRight:{keys:"R",glyph:"R"},rotateLeft:{keys:"Shift+R",glyph:"\u21E7R"},play:{keys:"K Space",glyph:"K"},mute:{keys:"M",glyph:"M"}},R=new Set(["+","=","-","_","0","r","R","k","K","m","M","j","J","l","L"]);function B({label:t,lang:e,shortcut:n,scrolls:o=false,image:r,lead:i,after:a}){const{t:c}=k(),l=L(null),u=n?c("controlShortcut",{label:t,shortcut:n.glyph}):t;return K(),S(()=>{const s=l.current;s&&m(s)&&p(s)},[u,i]),f("span",{ref:l,className:"clover-tip","aria-hidden":"true",...w(e),...o&&{tabIndex:-1,onMouseDown:s=>{var g;s.preventDefault(),(g=s.currentTarget.parentElement)==null||g.focus({preventScroll:true})}},children:[r&&f("img",{className:"clover-tip-image",src:r,alt:"",loading:"lazy",onLoad:()=>{const s=l.current;s&&m(s)&&p(s)}}),i&&f("span",{className:"clover-tip-lead",children:i}),u,a!=null&&a!==false&&f("span",{className:"clover-tip-after",children:a})]})}function d(t){const e=t.target instanceof Element&&y(t.target),n=e&&h(e);n&&p(n)}function O(t){const e=h(y(t));e&&m(e)&&p(e)}function h(t){return Array.from(t.children).find(e=>e.classList.contains("clover-tip"))}function y(t){const e=t.matches("input")?t.parentElement:null;return e&&h(e)?e:t}function m(t){var e;try{return!!((e=t.parentElement)!=null&&e.matches(":hover, :focus-visible, :has(> input:focus-visible)"))}catch{return false}}function p(t){const e=t.parentElement;if(!e)return;t.style.removeProperty("--clover-tip-room"),t.style.removeProperty("--clover-tip-shift");const n=T(e),o=parseFloat(getComputedStyle(t).paddingLeft)||0,r=n.left+o,i=n.right-o,a=e.getBoundingClientRect();let c=t.getBoundingClientRect();const l=c.right<=a.left?c.right-r:c.left>=a.right?i-c.left:i-r;c.width>l&&(t.style.setProperty("--clover-tip-room",`${Math.max(l,0)}px`),c=t.getBoundingClientRect());const u=c.left<r?r-c.left:c.right>i?i-c.right:0;u&&t.style.setProperty("--clover-tip-shift",`${u}px`)}function T(t){let e=0,n=document.documentElement.clientWidth||window.innerWidth;for(let o=t.parentElement;o&&o!==document.documentElement;o=o.parentElement){const{display:r,overflow:i,overflowX:a}=getComputedStyle(o);if(r==="inline"||r==="contents")continue;const c=a||i;if(!c||c==="visible")continue;const l=o.getBoundingClientRect();e=Math.max(e,l.left+o.clientLeft),n=Math.min(n,l.left+o.clientLeft+o.clientWidth)}return{left:e,right:n}}let E=0;function v(t){if(t.key!=="Escape")return;const e=new Set;document.querySelectorAll(":hover > .clover-tip").forEach(r=>r.parentElement&&e.add(r.parentElement));const n=document.activeElement,o=n&&y(n);o&&h(o)&&e.add(o),e.forEach(r=>b(r,"tipHidden",["pointerenter","focusout"]))}function b(t,e,n){t.dataset[e]="";const o=()=>{delete t.dataset[e],n.forEach(r=>t.removeEventListener(r,o))};n.forEach(r=>t.addEventListener(r,o))}function K(){S(()=>(E++===0&&(document.addEventListener("keydown",v,true),document.addEventListener("pointerenter",d,true),document.addEventListener("focus",d,true)),()=>{--E||(document.removeEventListener("keydown",v,true),document.removeEventListener("pointerenter",d,true),document.removeEventListener("focus",d,true))}),[])}function P(t,e){const n=t.target;!e||n===e||e.contains(n)||R.has(t.key)&&(t.altKey||t.metaKey||t.ctrlKey||n.closest("input, select, textarea, [contenteditable]")||(t.preventDefault(),e.dispatchEvent(new KeyboardEvent("keydown",{key:t.key,shiftKey:t.shiftKey,bubbles:true,cancelable:true}))))}export{M as S,B as T,P as f,b as h,O as p};
1
+ import{a as k,A as L,y as S,u as f,l as w}from"./shared-BtCBrxx9.mjs";import"./styles-CAv9WP3T.mjs";const M={zoomIn:{keys:"Plus",glyph:"+"},zoomOut:{keys:"-",glyph:"\u2212"},reset:{keys:"0",glyph:"0"},rotateRight:{keys:"R",glyph:"R"},rotateLeft:{keys:"Shift+R",glyph:"\u21E7R"},play:{keys:"K Space",glyph:"K"},mute:{keys:"M",glyph:"M"}},R=new Set(["+","=","-","_","0","r","R","k","K","m","M","j","J","l","L"]);function B({label:t,lang:e,shortcut:n,scrolls:o=false,image:r,lead:i,after:a}){const{t:c}=k(),l=L(null),u=n?c("controlShortcut",{label:t,shortcut:n.glyph}):t;return K(),S(()=>{const s=l.current;s&&m(s)&&p(s)},[u,i]),f("span",{ref:l,className:"clover-tip","aria-hidden":"true",...w(e),...o&&{tabIndex:-1,onMouseDown:s=>{var g;s.preventDefault(),(g=s.currentTarget.parentElement)==null||g.focus({preventScroll:true})}},children:[r&&f("img",{className:"clover-tip-image",src:r,alt:"",loading:"lazy",onLoad:()=>{const s=l.current;s&&m(s)&&p(s)}}),i&&f("span",{className:"clover-tip-lead",children:i}),u,a!=null&&a!==false&&f("span",{className:"clover-tip-after",children:a})]})}function d(t){const e=t.target instanceof Element&&y(t.target),n=e&&h(e);n&&p(n)}function O(t){const e=h(y(t));e&&m(e)&&p(e)}function h(t){return Array.from(t.children).find(e=>e.classList.contains("clover-tip"))}function y(t){const e=t.matches("input")?t.parentElement:null;return e&&h(e)?e:t}function m(t){var e;try{return!!((e=t.parentElement)!=null&&e.matches(":hover, :focus-visible, :has(> input:focus-visible)"))}catch{return false}}function p(t){const e=t.parentElement;if(!e)return;t.style.removeProperty("--clover-tip-room"),t.style.removeProperty("--clover-tip-shift");const n=T(e),o=parseFloat(getComputedStyle(t).paddingLeft)||0,r=n.left+o,i=n.right-o,a=e.getBoundingClientRect();let c=t.getBoundingClientRect();const l=c.right<=a.left?c.right-r:c.left>=a.right?i-c.left:i-r;c.width>l&&(t.style.setProperty("--clover-tip-room",`${Math.max(l,0)}px`),c=t.getBoundingClientRect());const u=c.left<r?r-c.left:c.right>i?i-c.right:0;u&&t.style.setProperty("--clover-tip-shift",`${u}px`)}function T(t){let e=0,n=document.documentElement.clientWidth||window.innerWidth;for(let o=t.parentElement;o&&o!==document.documentElement;o=o.parentElement){const{display:r,overflow:i,overflowX:a}=getComputedStyle(o);if(r==="inline"||r==="contents")continue;const c=a||i;if(!c||c==="visible")continue;const l=o.getBoundingClientRect();e=Math.max(e,l.left+o.clientLeft),n=Math.min(n,l.left+o.clientLeft+o.clientWidth)}return{left:e,right:n}}let E=0;function v(t){if(t.key!=="Escape")return;const e=new Set;document.querySelectorAll(":hover > .clover-tip").forEach(r=>r.parentElement&&e.add(r.parentElement));const n=document.activeElement,o=n&&y(n);o&&h(o)&&e.add(o),e.forEach(r=>b(r,"tipHidden",["pointerenter","focusout"]))}function b(t,e,n){t.dataset[e]="";const o=()=>{delete t.dataset[e],n.forEach(r=>t.removeEventListener(r,o))};n.forEach(r=>t.addEventListener(r,o))}function K(){S(()=>(E++===0&&(document.addEventListener("keydown",v,true),document.addEventListener("pointerenter",d,true),document.addEventListener("focus",d,true)),()=>{--E||(document.removeEventListener("keydown",v,true),document.removeEventListener("pointerenter",d,true),document.removeEventListener("focus",d,true))}),[])}function P(t,e){const n=t.target;!e||n===e||e.contains(n)||R.has(t.key)&&(t.altKey||t.metaKey||t.ctrlKey||n.closest("input, select, textarea, [contenteditable]")||(t.preventDefault(),e.dispatchEvent(new KeyboardEvent("keydown",{key:t.key,shiftKey:t.shiftKey,bubbles:true,cancelable:true}))))}export{M as S,B as T,P as f,b as h,O as p};
@@ -1 +1 @@
1
- import{D as Le,a as Oe,e as Ie,c as $e,n as Me,T as ie,d as C,y as m,N as Re,C as Se,A as L,b as we,u as n,t as Ee,k as le,l as M,v as Ae,$ as Pe,E as ze}from"./shared-CCg1Iag8.mjs";import{c as ue,a as de}from"./layout-DVa_DnGH.mjs";import{l as Fe,a as Ve,p as He,b as Ke,c as je}from"./vtt-KUQbi4PK.mjs";import{j as qe}from"./classnames-DukgfdpI.mjs";import{u as De}from"./readingLanguages-Ptho-Co9.mjs";import{b as pe,s as Ue}from"./bringIntoView-CQH5ZgMM.mjs";import{C as Xe}from"./Cue-2zGQuUOC.mjs";import{F as Be}from"./FieldPill-BAql8_6s.mjs";import{l as Ge}from"./languageCode-cCpiU0b0.mjs";import{a as Je}from"./Sections-D_bS5IQH.mjs";import{T as Qe}from"./Tip-DPFWlNLu.mjs";import{u as We}from"./useContainerName-BfyeBf6_.mjs";import"./styles-C7PVxtkQ.mjs";const j=40,q=s=>s.toLocaleLowerCase();function Ye(s,i){if(!i)return s;const v=q(s),g=[];let a=0;for(let p=v.indexOf(i);p>=0;p=v.indexOf(i,p+i.length))p>a&&g.push(s.slice(a,p)),g.push(n("mark",{children:s.slice(p,p+i.length)},p)),a=p+i.length;return a<s.length&&g.push(s.slice(a)),g}const R=s=>s.read==="cues"&&s.kind!=="transcript",ft=Le(function({as:i="div",follow:v=true,find:g=true,sticky:a=false,size:p="large",className:fe,...ge},me){const{t:D,langOf:U}=Oe(),{clover:o,language:X}=Ie("Transcript"),T=$e(e=>Me(e.manifest,e.canvasId)).find(e=>ue(e).length>0||de(e).length>0),l=ie(()=>T?[...ue(T).map(e=>({...e,read:"cues"})),...de(T).map(e=>({...e,read:"text"}))]:[],[T]),[B,S]=C(0),u=l[B]??l[0],O=De(),w=(O==null?void 0:O.chosen)??X;m(()=>{if(!w)return;const e=l.findIndex(r=>r.language&&r.language!=="none"&&Re(r.language,w));if(e<0)return;S(e);const t=l[e];R(t)&&o.captions.get()!==t.id&&o.captions.emit(t.id)},[w,l,o]),m(()=>{const e=t=>{const r=l.findIndex(d=>R(d)&&d.id===t);r>=0&&S(r)};return e(o.captions.get()),o.captions.subscribe(e)},[o,l]);const[c,G]=C([]),[ve,J]=C([]);m(()=>{if(G([]),J([]),!u)return;let e=true;return(u.read==="cues"?Fe(u.id,o.request).then(t=>e&&G(He(t))):Ve(u.id,o.request).then(t=>e&&J(Ke(t)))).catch(()=>{}),()=>{e=false}},[u,o]);const h=Se(o.media.subscribe,o.media.get,o.media.get),y=Ze(h,c),E=L(null);m(()=>{var t;if(!v||y<0||!h||h.paused)return;const e=(t=E.current)==null?void 0:t.children[y];e&&pe(e,"nearest")},[y,v,h]);const[Q,W]=C(""),f=q(Q.trim()),b=ie(()=>f?c.flatMap((e,t)=>q(e.text).includes(f)?[t]:[]):[],[c,f]),[A,he]=C({query:"",at:0}),x=A.query===f?A.at:0,P=L(null),z=L(false),[Y,be]=C({cues:[],count:j}),Z=Y.cues===c?Y.count:j,F=()=>be({cues:c,count:Z+j}),_=L(F);_.current=F;const V=typeof IntersectionObserver<"u",N=V?Math.min(c.length,Math.max(Z,y+1,(b[x]??-1)+1)):c.length,ee=L(null);m(()=>{const e=ee.current;if(!e||!V||N>=c.length)return;const t=new IntersectionObserver(r=>{r.some(d=>d.isIntersecting)&&_.current()},{root:Ue(e),rootMargin:"0px 0px 400px 0px"});return t.observe(e),()=>t.disconnect()},[V,N,c.length]);const I=b[x];m(()=>{var t;if(I===void 0)return;const e=(t=E.current)==null?void 0:t.children[I];e&&pe(e,"nearest"),z.current=false},[I,f]);const Ce=c.length>0;m(()=>{var d;const e=(d=P.current)==null?void 0:d.closest(".clover-transcript-find"),t=e==null?void 0:e.parentElement;if(!a||!e||!t||typeof ResizeObserver>"u")return;const r=new ResizeObserver(()=>t.style.setProperty("--clover-transcript-find",`${e.offsetHeight}px`));return r.observe(e),()=>{r.disconnect(),t.style.removeProperty("--clover-transcript-find")}},[a,Ce,g]);const H=we(),te=Je(),ne=l.every(R)?"playerCaptions":"transcriptLabel",se=We(D(ne),U(ne));if(!T||!u)return null;const Te=l.filter(e=>e.read==="text").length,re=l.map(e=>{const t=Ge(e.language);return e.read==="cues"?t:Te>1&&t?`TXT ${t}`:"TXT"}),xe=re.map(e=>e&&re.filter(t=>t===e).length===1?e:void 0),ae=u.language&&u.language!=="none"?u.language:void 0,K=l.length>1&&!O&&n(le,{children:[se.node,n("fieldset",{...se.props,className:"clover-transcript-languages",children:l.map((e,t)=>{const r=Ee(e.label,X),d=xe[t],ke=r.text||e.language||String(t+1);return n("label",{className:"clover-transcript-language",children:[n("input",{type:"radio",name:`${H}-language`,checked:t===B,onChange:()=>{S(t),R(e)&&o.captions.emit(e.id)}}),d&&n(le,{children:[n("span",{className:"clover-transcript-code",children:d})," "]}),n("span",{style:d?Ae:void 0,...M(r.text?r.lang:void 0),children:ke}),d&&r.text&&n(Qe,{label:r.text,lang:r.lang})]},e.id)})})]}),ce=(e,t=true)=>{if(h){t?ze(h,e.start):h.currentTime=e.start;return}o.goTo(T.id,{time:e.start,...t&&{autoplay:true}})},oe=e=>{const t=c[b[e]];t&&(z.current=true,he({query:f,at:e}),ce(t,false))},Ne={position:b.length?x:-1,total:b.length,step:e=>oe(x+e)},k=b.length,$=f?k===0?"contentSearchResultsNone":k===1?"contentSearchResult":"contentSearchResults":null,ye=g&&u.read==="cues"&&c.length>0&&n("div",{className:"clover-transcript-find",children:[n(Be,{ref:P,id:`${H}-find`,value:Q,onChange:W,onSubmit:()=>{if(!k)return;const e=A.query===f&&z.current;oe(e?(x+1)%k:x)},onClear:()=>{var e;W(""),(e=P.current)==null||e.focus()},results:f?Ne:null,size:p,classes:{form:"clover-transcript-find-field"}}),n("p",{className:"clover-transcript-find-status",role:"status",...M($?U($):void 0),children:$?D($,{count:k}):""})]});return n(i,{ref:me,className:qe("clover-transcript",fe),"data-sticky":a||void 0,...ge,children:[K&&(te?Pe(K,te):K),ye,u.read==="text"?n("div",{className:"clover-transcript-body",...M(ae),children:ve.map((e,t)=>n("p",{children:e},t))}):n("ol",{ref:E,className:"clover-transcript-cues",id:`${H}-cues`,...M(ae),children:c.slice(0,N).map((e,t)=>n("li",{className:"clover-transcript-cue","aria-current":t===y?"true":void 0,"data-match":f&&b.includes(t)?t===I?"current":"true":void 0,children:n("button",{type:"button",onClick:()=>ce(e),onFocus:()=>{N<c.length&&t>=N-5&&F()},children:[n(Xe,{start:e.start,className:"clover-transcript-time"}),n("span",{className:"clover-transcript-text clover-cue-text",children:[e.voice&&n("span",{className:"clover-transcript-voice",children:[e.voice,":"," "]}),Ye(e.text,f)]})]})},`${e.start}-${t}`))}),u.read==="cues"&&N<c.length&&n("div",{ref:ee,className:"clover-transcript-more","aria-hidden":"true"})]})});function Ze(s,i){const[v,g]=C(-1);return m(()=>{if(!s||!i.length){g(-1);return}const a=()=>g(je(i,s.currentTime));return a(),s.addEventListener("timeupdate",a),s.addEventListener("seeked",a),()=>{s.removeEventListener("timeupdate",a),s.removeEventListener("seeked",a)}},[s,i]),v}export{ft as Transcript};
1
+ import{D as Le,a as Oe,e as Ie,c as $e,n as Me,T as ie,d as C,y as m,N as Re,C as Se,A as L,b as we,u as n,t as Ee,k as le,l as M,v as Ae,$ as Pe,E as ze}from"./shared-BtCBrxx9.mjs";import{c as ue,a as de}from"./layout-BixQWLYR.mjs";import{l as Fe,a as Ve,p as He,b as Ke,c as je}from"./vtt-BYJ_dF4L.mjs";import{j as qe}from"./classnames-DukgfdpI.mjs";import{u as De}from"./readingLanguages-JQPbnrhL.mjs";import{b as pe,s as Ue}from"./bringIntoView-CQH5ZgMM.mjs";import{C as Xe}from"./Cue-DghSvEx4.mjs";import{F as Be}from"./FieldPill-pocIy1LB.mjs";import{l as Ge}from"./languageCode-cCpiU0b0.mjs";import{a as Je}from"./Sections-DK04V31W.mjs";import{T as Qe}from"./Tip-Dd_jhbIx.mjs";import{u as We}from"./useContainerName-C2L1lj9-.mjs";import"./styles-CAv9WP3T.mjs";const j=40,q=s=>s.toLocaleLowerCase();function Ye(s,i){if(!i)return s;const v=q(s),g=[];let a=0;for(let p=v.indexOf(i);p>=0;p=v.indexOf(i,p+i.length))p>a&&g.push(s.slice(a,p)),g.push(n("mark",{children:s.slice(p,p+i.length)},p)),a=p+i.length;return a<s.length&&g.push(s.slice(a)),g}const R=s=>s.read==="cues"&&s.kind!=="transcript",ft=Le(function({as:i="div",follow:v=true,find:g=true,sticky:a=false,size:p="large",className:fe,...ge},me){const{t:D,langOf:U}=Oe(),{clover:o,language:X}=Ie("Transcript"),T=$e(e=>Me(e.manifest,e.canvasId)).find(e=>ue(e).length>0||de(e).length>0),l=ie(()=>T?[...ue(T).map(e=>({...e,read:"cues"})),...de(T).map(e=>({...e,read:"text"}))]:[],[T]),[B,S]=C(0),u=l[B]??l[0],O=De(),w=(O==null?void 0:O.chosen)??X;m(()=>{if(!w)return;const e=l.findIndex(r=>r.language&&r.language!=="none"&&Re(r.language,w));if(e<0)return;S(e);const t=l[e];R(t)&&o.captions.get()!==t.id&&o.captions.emit(t.id)},[w,l,o]),m(()=>{const e=t=>{const r=l.findIndex(d=>R(d)&&d.id===t);r>=0&&S(r)};return e(o.captions.get()),o.captions.subscribe(e)},[o,l]);const[c,G]=C([]),[ve,J]=C([]);m(()=>{if(G([]),J([]),!u)return;let e=true;return(u.read==="cues"?Fe(u.id,o.request).then(t=>e&&G(He(t))):Ve(u.id,o.request).then(t=>e&&J(Ke(t)))).catch(()=>{}),()=>{e=false}},[u,o]);const h=Se(o.media.subscribe,o.media.get,o.media.get),y=Ze(h,c),E=L(null);m(()=>{var t;if(!v||y<0||!h||h.paused)return;const e=(t=E.current)==null?void 0:t.children[y];e&&pe(e,"nearest")},[y,v,h]);const[Q,W]=C(""),f=q(Q.trim()),b=ie(()=>f?c.flatMap((e,t)=>q(e.text).includes(f)?[t]:[]):[],[c,f]),[A,he]=C({query:"",at:0}),x=A.query===f?A.at:0,P=L(null),z=L(false),[Y,be]=C({cues:[],count:j}),Z=Y.cues===c?Y.count:j,F=()=>be({cues:c,count:Z+j}),_=L(F);_.current=F;const V=typeof IntersectionObserver<"u",N=V?Math.min(c.length,Math.max(Z,y+1,(b[x]??-1)+1)):c.length,ee=L(null);m(()=>{const e=ee.current;if(!e||!V||N>=c.length)return;const t=new IntersectionObserver(r=>{r.some(d=>d.isIntersecting)&&_.current()},{root:Ue(e),rootMargin:"0px 0px 400px 0px"});return t.observe(e),()=>t.disconnect()},[V,N,c.length]);const I=b[x];m(()=>{var t;if(I===void 0)return;const e=(t=E.current)==null?void 0:t.children[I];e&&pe(e,"nearest"),z.current=false},[I,f]);const Ce=c.length>0;m(()=>{var d;const e=(d=P.current)==null?void 0:d.closest(".clover-transcript-find"),t=e==null?void 0:e.parentElement;if(!a||!e||!t||typeof ResizeObserver>"u")return;const r=new ResizeObserver(()=>t.style.setProperty("--clover-transcript-find",`${e.offsetHeight}px`));return r.observe(e),()=>{r.disconnect(),t.style.removeProperty("--clover-transcript-find")}},[a,Ce,g]);const H=we(),te=Je(),ne=l.every(R)?"playerCaptions":"transcriptLabel",se=We(D(ne),U(ne));if(!T||!u)return null;const Te=l.filter(e=>e.read==="text").length,re=l.map(e=>{const t=Ge(e.language);return e.read==="cues"?t:Te>1&&t?`TXT ${t}`:"TXT"}),xe=re.map(e=>e&&re.filter(t=>t===e).length===1?e:void 0),ae=u.language&&u.language!=="none"?u.language:void 0,K=l.length>1&&!O&&n(le,{children:[se.node,n("fieldset",{...se.props,className:"clover-transcript-languages",children:l.map((e,t)=>{const r=Ee(e.label,X),d=xe[t],ke=r.text||e.language||String(t+1);return n("label",{className:"clover-transcript-language",children:[n("input",{type:"radio",name:`${H}-language`,checked:t===B,onChange:()=>{S(t),R(e)&&o.captions.emit(e.id)}}),d&&n(le,{children:[n("span",{className:"clover-transcript-code",children:d})," "]}),n("span",{style:d?Ae:void 0,...M(r.text?r.lang:void 0),children:ke}),d&&r.text&&n(Qe,{label:r.text,lang:r.lang})]},e.id)})})]}),ce=(e,t=true)=>{if(h){t?ze(h,e.start):h.currentTime=e.start;return}o.goTo(T.id,{time:e.start,...t&&{autoplay:true}})},oe=e=>{const t=c[b[e]];t&&(z.current=true,he({query:f,at:e}),ce(t,false))},Ne={position:b.length?x:-1,total:b.length,step:e=>oe(x+e)},k=b.length,$=f?k===0?"contentSearchResultsNone":k===1?"contentSearchResult":"contentSearchResults":null,ye=g&&u.read==="cues"&&c.length>0&&n("div",{className:"clover-transcript-find",children:[n(Be,{ref:P,id:`${H}-find`,value:Q,onChange:W,onSubmit:()=>{if(!k)return;const e=A.query===f&&z.current;oe(e?(x+1)%k:x)},onClear:()=>{var e;W(""),(e=P.current)==null||e.focus()},results:f?Ne:null,size:p,classes:{form:"clover-transcript-find-field"}}),n("p",{className:"clover-transcript-find-status",role:"status",...M($?U($):void 0),children:$?D($,{count:k}):""})]});return n(i,{ref:me,className:qe("clover-transcript",fe),"data-sticky":a||void 0,...ge,children:[K&&(te?Pe(K,te):K),ye,u.read==="text"?n("div",{className:"clover-transcript-body",...M(ae),children:ve.map((e,t)=>n("p",{children:e},t))}):n("ol",{ref:E,className:"clover-transcript-cues",id:`${H}-cues`,...M(ae),children:c.slice(0,N).map((e,t)=>n("li",{className:"clover-transcript-cue","aria-current":t===y?"true":void 0,"data-match":f&&b.includes(t)?t===I?"current":"true":void 0,children:n("button",{type:"button",onClick:()=>ce(e),onFocus:()=>{N<c.length&&t>=N-5&&F()},children:[n(Xe,{start:e.start,className:"clover-transcript-time"}),n("span",{className:"clover-transcript-text clover-cue-text",children:[e.voice&&n("span",{className:"clover-transcript-voice",children:[e.voice,":"," "]}),Ye(e.text,f)]})]})},`${e.start}-${t}`))}),u.read==="cues"&&N<c.length&&n("div",{ref:ee,className:"clover-transcript-more","aria-hidden":"true"})]})});function Ze(s,i){const[v,g]=C(-1);return m(()=>{if(!s||!i.length){g(-1);return}const a=()=>g(je(i,s.currentTime));return a(),s.addEventListener("timeupdate",a),s.addEventListener("seeked",a),()=>{s.removeEventListener("timeupdate",a),s.removeEventListener("seeked",a)}},[s,i]),v}export{ft as Transcript};
@@ -0,0 +1 @@
1
+ import{a as g,u as o,l as b,_ as m}from"./shared-BtCBrxx9.mjs";import{T as x}from"./Tip-Dd_jhbIx.mjs";import{b as f,c as k}from"./controlGlyphs-DbocsVHI.mjs";import{a as y}from"./index-BAkCMEQf.mjs";function T({words:r,button:e,shortcut:t,disabled:n,pressed:c,onClick:a,buttonRef:s,children:v}){const{t:i,langOf:h}=g(),d=i(r);return o("button",{"aria-label":d,...b(h(r)),"aria-keyshortcuts":t==null?void 0:t.keys,"aria-disabled":n||void 0,"aria-pressed":c,className:"clover-canvas-transport-button","data-button":e,onClick:a,ref:s,type:"button",children:[v,o(x,{label:d,shortcut:t})]})}function q(r){m(()=>{const e=r.current,t=e==null?void 0:e.closest(".clover-canvas");if(!e||!t)return;const n=()=>{const a=e.offsetHeight;a&&t.style.setProperty("--clover-transport-bar-height",`${a}px`)};n();const c=new ResizeObserver(n);return c.observe(e),()=>{c.disconnect(),t.style.removeProperty("--clover-transport-bar-height")}},[r])}const p=r=>`var(--clover-transport-thumb) / 2 + (100% - var(--clover-transport-thumb)) * ${r/100}`,B=r=>`calc(${p(r)})`,F=r=>`calc((100% - var(--clover-transport-thumb)) * ${r/100})`;function H(r){const e="var(--clover-transport-gap) / 2";return`linear-gradient(to right, ${[...r.flatMap(n=>[`#000 0 calc(${p(n)} - ${e})`,`transparent 0 calc(${p(n)} + ${e})`]),"#000 0"].join(", ")})`}function P(r,e){if(!(e>0))return[];const t=(a,s)=>Math.abs(a-s)<.05,n=[],c=a=>{a>0&&a<e&&!n.some(s=>t(s,a))&&n.push(a)};for(const a of r)c(a.start);for(const a of r)a.end!==void 0&&Number.isFinite(a.end)&&!r.some(s=>t(s.start,a.end))&&c(a.end);return n.sort((a,s)=>a-s).map(a=>a/e*100)}function $(r,e){const t=r.querySelector("input")??r,n=t.getBoundingClientRect(),c=parseFloat(getComputedStyle(t).getPropertyValue("--clover-transport-thumb"))||0,a=n.width-c;return a>0?Math.min(1,Math.max(0,(e-n.left-c/2)/a)):0}function L(r,e,t,n){const c=n.getBoundingClientRect(),a=c.height-(t.getBoundingClientRect().bottom-e.getBoundingClientRect().top);r.style.setProperty("--clover-transport-menu-above",`${a}px`),r.style.removeProperty("--clover-transport-menu-shift");const s=r.getBoundingClientRect(),v=parseFloat(getComputedStyle(t).paddingRight)||0,i=Math.max(c.left+v-s.left,Math.min(0,c.right-v-s.right));i&&r.style.setProperty("--clover-transport-menu-shift",`${i}px`)}const l={xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 512 512","aria-hidden":true,focusable:false},I=()=>o("svg",{...l,children:o("path",{d:"M133 440a35.37 35.37 0 01-17.5-4.67c-12-6.8-19.46-20-19.46-34.33V111c0-14.37 7.46-27.53 19.46-34.33a35.13 35.13 0 0135.77.45l247.85 148.36a36 36 0 010 61.11L151.23 435a35.5 35.5 0 01-18.23 5z"})}),S=()=>o("svg",{...l,children:o("path",{d:"M224 432h-80V80h80zm144 0h-80V80h80z"})}),V=()=>o("svg",{...l,children:[o("path",{d:"M232 416a23.88 23.88 0 01-14.2-4.68 8.27 8.27 0 01-.66-.51L125.76 336H56a24 24 0 01-24-24V200a24 24 0 0124-24h69.75l91.37-74.81a8.27 8.27 0 01.66-.51A24 24 0 01256 120v272a24 24 0 01-24 24z"}),o("path",{d:"M320 336a16 16 0 01-14.29-23.16c8.34-16.63 12.29-34.5 12.29-56.84s-3.95-40.21-12.29-56.84a16 16 0 0128.58-14.32C345.06 205.86 350 228.13 350 256s-4.94 50.14-15.71 71.16A16 16 0 01320 336zM368 384a16 16 0 01-13.87-24C373.85 325.75 384 292.28 384 256c0-36.28-10.15-69.75-29.87-104a16 16 0 0127.74-16C404.19 174.71 416 214.17 416 256s-11.81 81.29-34.13 120A16 16 0 01368 384z",fillOpacity:"0.85"})]}),R=()=>o("svg",{...l,children:[o("path",{d:"M232 416a23.88 23.88 0 01-14.2-4.68 8.27 8.27 0 01-.66-.51L125.76 336H56a24 24 0 01-24-24V200a24 24 0 0124-24h69.75l91.37-74.81a8.27 8.27 0 01.66-.51A24 24 0 01256 120v272a24 24 0 01-24 24z"}),o("path",{d:"M320 196l128 120M448 196L320 316",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"32"})]}),j=({on:r=false})=>o("svg",{...l,"data-on":r||void 0,className:"clover-captions-icon",children:[r?o("rect",{x:"22",y:"86",width:"468",height:"340",rx:"74",fill:"currentColor"}):o("rect",{x:"40",y:"104",width:"432",height:"304",rx:"56",fill:"none",stroke:"currentColor",strokeWidth:"36"}),o("path",{className:"clover-captions-icon-letters",d:"M228 216a48 48 0 1 0 0 80M356 216a48 48 0 1 0 0 80",fill:"none",stroke:r?"var(--clover-color-control, #1a1d1e)":"currentColor",strokeLinecap:"round",strokeWidth:"36"})]}),u=()=>o("rect",{x:"40",y:"104",width:"432",height:"304",rx:"56",fill:"none",stroke:"currentColor",strokeWidth:"36"}),W=()=>o("svg",{...l,children:[o(u,{}),o("path",{d:"M204 208l-48 48 48 48M308 208l48 48-48 48",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"36"})]}),O=()=>o("svg",{...l,children:[o(u,{}),o("path",{d:"M140 208l48 48-48 48M372 208l-48 48 48 48",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"36"})]}),A=()=>o("svg",{...l,children:o(k,{})}),N=()=>o("svg",{...l,children:o(f,{})});y(14,"components/Canvas/media/Transport",'@layer clover{.clover-canvas-transport{position:absolute;inset:auto 0 0;z-index:2;display:flex;flex-direction:column;padding:var(--clover-space-xl) var(--clover-canvas-controls-inset) var(--clover-canvas-controls-inset);--clover-controls-edge: 1;--clover-transport-thumb: 12px;--clover-transport-track: var(--clover-space-xs);-webkit-user-select:none;user-select:none;--clover-transport-menu-room: calc( 100cqb - var(--clover-canvas-controls-inset) - var(--clover-control) - var(--clover-space-s) - var(--clover-space-xs) )}.clover-canvas-transport:before{position:absolute;inset:0;z-index:-1;background:linear-gradient(to top,#000000c7,#0009 calc(100% - var(--clover-space-xl)),#0000);pointer-events:none;content:""}.clover-canvas-transport:has([aria-expanded=true],:focus-visible,>.clover-canvas-transport-seek-area:hover){z-index:4}.clover-canvas-transport-bar{display:flex;flex-wrap:wrap;align-items:center;gap:var(--clover-space-xs) var(--clover-space-s);min-width:0}.clover-canvas-transport-bar>*{flex-shrink:0}.clover-canvas-transport-bar>:is(:hover,:active,:focus-within){z-index:1}.clover-canvas-transport-bar>.clover-canvas-transport-status{display:flex;flex:1 1 0;align-items:center;gap:var(--clover-space-s);min-width:min-content}.clover-canvas-transport-end{display:flex;gap:var(--clover-space-s);margin-inline-start:auto}@container (max-width: 37.5rem){.clover-canvas-transport-bar:has([data-button=chapters])>.clover-canvas-transport-status{order:-1;flex-basis:100%}}@container (max-width: 28rem){.clover-canvas-transport-bar>.clover-canvas-transport-status{order:-1;flex-basis:100%}}.clover-canvas-transport-button svg{fill:currentColor;stroke:none}.clover-canvas-transport-button svg [stroke]{fill:none}.clover-canvas-transport-button:hover,.clover-canvas-transport-button:focus-visible{background-color:var(--clover-color-accent, #0065c3)}:where([data-high-contrast]) .clover-canvas-transport-button:is(:hover,:focus-visible){background-color:var(--clover-accent-fill)}:where([data-high-contrast]) .clover-canvas-transport-button:hover:not(:focus-visible){outline:var(--clover-accent-ring-hover);outline-offset:1px}button.clover-canvas-transport-button[aria-pressed=true]:after{content:"";position:absolute;inset-inline:var(--clover-space-s);bottom:var(--clover-space-2xs);border-bottom:2px solid;border-radius:1px}.clover-canvas-transport-button:focus-visible{outline:none;box-shadow:0 0 0 2px var(--clover-color-secondary, #fff),0 0 0 4px var(--clover-color-accent, #0065c3)}.clover-canvas-transport-seek-area{position:relative;display:flex;margin-bottom:var(--clover-space-xs);--clover-transport-gap: var(--clover-space-2xs)}.clover-canvas-transport-points,.clover-canvas-transport-marks{--clover-transport-mark: var(--clover-space-s);position:absolute;inset:0;pointer-events:none}.clover-canvas-transport-points{z-index:0}.clover-canvas-transport-seek{position:relative;z-index:1}.clover-canvas-transport-marks{z-index:2}.clover-canvas-transport-mark-point{position:absolute;top:calc(50% - var(--clover-transport-track) / 2 - var(--clover-space-s) - (var(--clover-transport-mark) + 2 * 3px) / 2);box-sizing:content-box;width:var(--clover-transport-mark);height:var(--clover-transport-mark);border:2px solid var(--clover-color-secondary, #fff);border-radius:50%;background-color:var(--clover-color-accent, #0065c3);box-shadow:0 0 0 1px var(--clover-color-primary, #1a1d1e);translate:-50% -50%}.clover-canvas-transport-mark-point:after{position:absolute;top:calc(100% + 3px);left:50%;width:3px;height:calc(var(--clover-space-s) + var(--clover-transport-track));translate:-50% 0;background-color:color-mix(in srgb,var(--clover-color-accent, #0065c3) 38.2%,transparent);-webkit-mask-image:linear-gradient(#000,#0000);mask-image:linear-gradient(#000,#0000);content:""}.clover-canvas-transport-mark-point[data-active=true]{box-shadow:0 0 0 2px var(--clover-color-accent, #0065c3),0 0 0 3px var(--clover-color-primary, #1a1d1e)}.clover-canvas-transport-mark-group{position:absolute;top:calc(50% - var(--clover-transport-track) / 2 - var(--clover-space-l));width:var(--clover-space-l);height:var(--clover-space-l);translate:-50% 0;pointer-events:var(--clover-controls-events, auto)}.clover-canvas-transport-mark{display:block;width:100%;height:100%;margin:0;padding:0;border:none;border-radius:50%;background:none;cursor:pointer}.clover-canvas-transport-mark:focus-visible{outline:none}.clover-canvas-transport-mark-group:is(:hover,:focus-within){z-index:1}.clover-canvas-transport-mark-group>.clover-tip.clover-canvas-transport-mark-tip{text-align:start;--clover-tip-x: clamp( var(--clover-space-xs) - var(--clover-mark-x, 50cqw), -50%, 100cqw - var(--clover-space-xs) - var(--clover-mark-x, 50cqw) - 100% );display:flex;flex-direction:column;max-width:min(18rem,100cqw - 2 * var(--clover-space-xs));max-height:calc(100cqh - var(--clover-canvas-controls-inset) - var(--clover-transport-bar-height, var(--clover-control)) - var(--clover-space-xs) - var(--clover-space-l) / 2 - var(--clover-transport-track) / 2 - var(--clover-space-l) - 3 * var(--clover-space-xs));transform:translate(calc(var(--clover-tip-x) + 50%))}.clover-canvas-transport-mark-group:focus-within:not([data-tip-hidden])>.clover-tip.clover-canvas-transport-mark-tip{opacity:1;visibility:visible;pointer-events:auto;transition-delay:0s}.clover-canvas:has(.clover-canvas-transport-marks){--clover-transport-marks-room: calc( 2 * var(--clover-space-s) + 2 * 3px - (var(--clover-space-l) - var(--clover-space-xs)) / 2 )}.clover-canvas-transport-mark-words{min-height:0;overflow-y:auto}.clover-canvas-transport-mark-tip{--clover-color-primary-muted: var(--clover-color-secondary-alt, #c1c8cd);color:var(--clover-color-secondary-alt, #c1c8cd)}.clover-canvas-transport-mark-group .clover-canvas-transport-mark-tip>.clover-steps{flex:none;margin-top:var(--clover-space-xs)}.clover-canvas-transport input[type=range]{appearance:none;-webkit-appearance:none;width:100%;height:var(--clover-space-l);margin:0;background:transparent;cursor:pointer;touch-action:none}.clover-canvas-transport input.clover-canvas-transport-volume{width:var(--clover-space-2xl)}@container (max-width: 28rem){.clover-canvas-transport input.clover-canvas-transport-volume{width:var(--clover-space-xl)}.clover-canvas-transport-bar,.clover-canvas-transport-end{column-gap:var(--clover-space-xs)}}.clover-canvas-transport input[type=range]::-webkit-slider-runnable-track{height:var(--clover-transport-track);border-radius:var(--clover-radius, 3px);background:linear-gradient(to right,var(--clover-color-accent, #0065c3) var(--clover-transport-progress, 0%),rgb(255 255 255 / 90%) var(--clover-transport-progress, 0%),rgb(255 255 255 / 90%) var(--clover-transport-loaded, 0%),var(--clover-player-track, rgb(255 255 255 / 65%)) var(--clover-transport-loaded, 0%));box-shadow:var(--clover-player-track-shadow, none)}.clover-canvas-transport input[type=range]::-moz-range-track{height:var(--clover-transport-track);border-radius:var(--clover-radius, 3px);background:linear-gradient(to right,var(--clover-color-accent, #0065c3) var(--clover-transport-progress, 0%),rgb(255 255 255 / 90%) var(--clover-transport-progress, 0%),rgb(255 255 255 / 90%) var(--clover-transport-loaded, 0%),var(--clover-player-track, rgb(255 255 255 / 65%)) var(--clover-transport-loaded, 0%));box-shadow:var(--clover-player-track-shadow, none)}.clover-canvas-transport input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:var(--clover-transport-thumb);height:var(--clover-transport-thumb);margin-top:calc((var(--clover-transport-track) - var(--clover-transport-thumb)) / 2);border:none;border-radius:var(--clover-radius-pill, 2rem);background-color:var(--clover-player-text, #fff)}.clover-canvas-transport input[type=range]::-moz-range-thumb{width:var(--clover-transport-thumb);height:var(--clover-transport-thumb);border:none;border-radius:var(--clover-radius-pill, 2rem);background-color:var(--clover-player-text, #fff)}.clover-canvas-transport input[type=range]:focus-visible{outline:none}.clover-canvas-transport input[type=range]:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 2px var(--clover-color-accent, #0065c3),0 0 0 4px var(--clover-player-text, #fff),0 0 0 6px #0009}.clover-canvas-transport input[type=range]:focus-visible::-moz-range-thumb{box-shadow:0 0 0 2px var(--clover-color-accent, #0065c3),0 0 0 4px var(--clover-player-text, #fff),0 0 0 6px #0009}.clover-canvas-transport-time{display:flex;align-items:center;gap:var(--clover-space-xs);color:var(--clover-player-text, #fff);font-size:var(--clover-text-s);font-variant-numeric:tabular-nums;white-space:nowrap;text-shadow:0 1px 2px rgb(0 0 0 / 90%)}.clover-canvas-transport-frames{position:relative;display:flex}button.clover-canvas-transport-time{margin:0;padding:var(--clover-space-2xs) var(--clover-space-xs);border:0;border-radius:var(--clover-radius, 3px);background:none;font:inherit;font-size:var(--clover-text-s);cursor:pointer}button.clover-canvas-transport-time:is(:hover,[aria-expanded=true]){background-color:#0006}button.clover-canvas-transport-time:focus-visible{outline:2px solid var(--clover-player-text, #fff)}.clover-canvas-transport-place{display:inline-grid;justify-items:end;font-variant-numeric:tabular-nums}.clover-canvas-transport-place>*{grid-area:1 / 1}.clover-canvas-transport-place>.clover-canvas-transport-place-room[hidden]{display:block;visibility:hidden}.clover-canvas-transport-frames>.clover-canvas-menu{right:0;bottom:calc(100% + var(--clover-space-s));left:auto;max-width:min(20rem,100cqi - 2 * var(--clover-canvas-controls-inset));max-height:min(24rem,var(--clover-transport-menu-room),var(--clover-transport-menu-above, 100cqb) - var(--clover-space-s) - var(--clover-space-xs));translate:var(--clover-transport-menu-shift, 0px) 0}.clover-canvas-transport-menu{position:relative;display:flex}.clover-canvas-transport-options{position:absolute;right:0;bottom:calc(100% + var(--clover-space-s));display:flex;flex-direction:column;box-sizing:border-box;min-width:min(11rem,100cqi - 2 * var(--clover-canvas-controls-inset));max-width:calc(100cqi - 2 * var(--clover-canvas-controls-inset));max-height:min(16rem,var(--clover-transport-menu-room),var(--clover-transport-menu-above, 100cqb) - var(--clover-space-s) - var(--clover-space-xs));translate:var(--clover-transport-menu-shift, 0px) 0;margin:0;padding:var(--clover-space-xs);border:none;border-radius:var(--clover-radius, 3px);background-color:var(--clover-player-menu-surface, #151718);color:var(--clover-player-text, #fff);overflow-y:auto}.clover-canvas-transport-option{display:flex;flex:none;align-items:center;gap:var(--clover-space-xs);min-height:var(--clover-space-l);padding:var(--clover-space-xs) var(--clover-space-s);border-radius:var(--clover-radius, 3px);font-size:var(--clover-text-s);cursor:pointer}.clover-canvas-transport-option:hover{background-color:var(--clover-player-menu-hover, #26292b)}.clover-canvas-transport-option:has(input:checked){background-color:color-mix(in srgb,var(--clover-color-accent, #0065c3) 24%,transparent);font-weight:600}.clover-canvas-transport-option:has(input:focus-visible){box-shadow:inset 0 0 0 2px var(--clover-player-text, #fff)}.clover-canvas-transport-code{flex:none;min-width:var(--clover-space-l);color:color-mix(in srgb,currentColor 72%,transparent);font-size:var(--clover-text-xs);font-weight:600;line-height:1}.clover-canvas-transport-options:has(.clover-canvas-transport-code),.clover-canvas-transport-menu:has([data-button=chapters]) .clover-canvas-transport-options{min-width:min(16rem,100cqi - 2 * var(--clover-canvas-controls-inset))}.clover-canvas-transport-option:has(>.clover-entry-thumbnail){display:grid;grid-template-columns:auto minmax(0,1fr);justify-items:start;gap:var(--clover-space-2xs) var(--clover-space-s);padding-block-end:var(--clover-space-s)}.clover-canvas-transport-options.clover-canvas-menu{border-radius:var(--clover-radius, 6px);background-color:var(--clover-color-secondary, #fff);color:var(--clover-color-primary, #1a1d1e)}.clover-canvas-menu>.clover-canvas-transport-option{align-items:baseline;gap:var(--clover-space-s);font-size:inherit}.clover-canvas-menu>.clover-canvas-transport-option:hover{background-color:var(--clover-color-secondary-muted, #e6e8eb)}@media (forced-colors: none){.clover-canvas-menu>.clover-canvas-transport-option:has(input:checked){background-color:color-mix(in srgb,var(--clover-color-accent, #0065c3) 8%,transparent)}}.clover-canvas-menu>.clover-canvas-transport-option:has(input:focus-visible){box-shadow:none;outline:2px solid var(--clover-color-accent, #0065c3);outline-offset:-2px}.clover-canvas-transport-option input{position:absolute;opacity:0;pointer-events:none}@media (forced-colors: active){.clover-canvas-transport button.clover-canvas-transport-button{border:1px solid ButtonText}.clover-canvas-transport input[type=range]{forced-color-adjust:none}.clover-canvas-transport input[type=range]::-webkit-slider-runnable-track{border:1px solid CanvasText;background:linear-gradient(to right,Highlight var(--clover-transport-progress, 0%),Canvas var(--clover-transport-progress, 0%));box-shadow:none}.clover-canvas-transport input[type=range]::-moz-range-track{border:1px solid CanvasText;background:linear-gradient(to right,Highlight var(--clover-transport-progress, 0%),Canvas var(--clover-transport-progress, 0%));box-shadow:none}.clover-canvas-transport input[type=range]::-webkit-slider-thumb,.clover-canvas-transport input[type=range]:focus-visible::-webkit-slider-thumb{background-color:CanvasText;box-shadow:0 0 0 2px Canvas}.clover-canvas-transport input[type=range]::-moz-range-thumb,.clover-canvas-transport input[type=range]:focus-visible::-moz-range-thumb{background-color:CanvasText;box-shadow:0 0 0 2px Canvas}.clover-canvas-transport input[type=range]:focus-visible{outline:2px solid CanvasText;outline-offset:2px}.clover-canvas-transport-button:focus-visible{outline:3px solid CanvasText;outline-offset:2px;box-shadow:none}.clover-canvas-transport-button:is([data-active],[aria-pressed=true]),.clover-canvas-transport-option:has(input:checked){background-color:Highlight;color:HighlightText}.clover-captions-icon[data-on] .clover-captions-icon-letters{stroke:ButtonFace}.clover-canvas-transport-button[data-active] .clover-captions-icon[data-on] .clover-captions-icon-letters{stroke:Highlight}}@media (prefers-reduced-motion: reduce){.clover-canvas-transport,.clover-canvas-transport-button,.clover-canvas-transport-button svg{transition:none}}.clover-canvas-transport-seek[data-gaps]{--clover-transport-disk: calc(var(--clover-transport-thumb) / 2 + 1px);-webkit-mask-image:radial-gradient(circle at calc(var(--clover-transport-thumb) / 2 + (100% - var(--clover-transport-thumb)) * var(--clover-transport-at, 0)) 50%,#000 var(--clover-transport-disk),transparent var(--clover-transport-disk)),var(--clover-transport-gaps);mask-image:radial-gradient(circle at calc(var(--clover-transport-thumb) / 2 + (100% - var(--clover-transport-thumb)) * var(--clover-transport-at, 0)) 50%,#000 var(--clover-transport-disk),transparent var(--clover-transport-disk)),var(--clover-transport-gaps)}.clover-canvas-transport-seek[data-gaps]:focus-visible{--clover-transport-disk: calc(var(--clover-transport-thumb) / 2 + 6px)}.clover-canvas-transport-chapter-span{position:absolute;z-index:1;top:50%;box-sizing:border-box;border-inline:calc(var(--clover-transport-gap) / 2) solid transparent;background-clip:padding-box;height:var(--clover-space-s);translate:0 -50%;border-radius:var(--clover-radius, 3px);background-color:var(--clover-player-text, #fff);opacity:.5;pointer-events:none}.clover-canvas-transport-seek-area>.clover-tip{left:var(--clover-transport-preview, 50%)}.clover-canvas-transport-seek-area>.clover-tip:has(>.clover-tip-image){padding:var(--clover-space-s)}.clover-canvas-transport-seek-area>.clover-tip .clover-tip-image{width:var(--clover-picture);max-height:none;margin-block-end:var(--clover-space-xs)}.clover-canvas-transport-seek-area:is(:hover,:has(>input:focus-visible)):not([data-tip-hidden])>.clover-tip{opacity:1;visibility:visible;pointer-events:auto;transition-delay:0s}@media (forced-colors: active){.clover-canvas-transport-mark-point:after{position:absolute;top:calc(100% + 3px);left:50%;width:3px;height:calc(var(--clover-space-s) + var(--clover-transport-track));translate:-50% 0;background-color:color-mix(in srgb,var(--clover-color-accent, #0065c3) 38.2%,transparent);content:""}.clover-canvas-transport-mark-point[data-active=true]{outline:2px solid Highlight;outline-offset:1px}.clover-canvas-transport-chapter-span{background-color:Highlight;opacity:1}}.clover-canvas-transport-status>.clover-canvas-transport-chapter{flex:1 1 auto;overflow:hidden;width:0;min-width:0;color:color-mix(in srgb,var(--clover-player-text, #fff) 85%,transparent);font-size:var(--clover-text-s);text-overflow:ellipsis;white-space:nowrap;text-shadow:0 1px 2px rgb(0 0 0 / 90%)}}');export{j as C,N as E,O as F,I as P,T,R as V,H as a,B as b,S as c,V as d,W as e,A as f,P as g,F as l,L as p,$ as s,q as u};
@@ -0,0 +1 @@
1
+ import{a as Se,A as h,d as R,_ as J,T as Ee,u as e,P as Ce,z as we,ah as B,l as w,ab as Pe,y as Fe,k as ie}from"./shared-BtCBrxx9.mjs";import{u as Ie,g as Oe,a as Me,b as de,l as $e,s as Be,T as D,P as Re,c as Ve,V as Ae,d as Ke,C as xe,F as De,e as Le,E as ze,f as Ue,p as _e}from"./Transport-DGXTdsId.mjs";import{imageSource as je}from"./thumbnail-BdKVLxxw.mjs";import{u as qe,P as Xe,E as Ze}from"./EntryThumbnail-Anfv7mFZ.mjs";import{j as Ge}from"./classnames-DukgfdpI.mjs";import{l as pe}from"./languageCode-cCpiU0b0.mjs";import{T as fe,S as me}from"./Tip-Dd_jhbIx.mjs";import{u as Je}from"./useContainerName-C2L1lj9-.mjs";import{u as Qe,t as We}from"./pointer-CAZRjvDP.mjs";import"./styles-CAv9WP3T.mjs";const Ye=we(()=>import("./SeekMarks-tjdJi7bR.mjs").then(({SeekMarks:r})=>({default:r}))),He=".clover-canvas-transport-marks",en=r=>typeof(r==null?void 0:r.thumbnail)=="string"?{src:r.thumbnail}:je(r==null?void 0:r.thumbnail);function ve(r,i){var g;let f=-1;r.forEach((P,k)=>{P.start<=i&&(f=k)});const m=(g=r[f])==null?void 0:g.end;return m!==void 0&&i>=m?-1:f}let G;function nn(){if(G===void 0){if(typeof document>"u")return true;const r=document.createElement("video");r.volume=.5,G=r.volume===.5}return G}function tn({id:r,label:i,labelLang:f,button:m,icon:g,active:P,current:k,options:F,selected:V,onSelect:c,request:L,asMenu:I=false}){const[d,p]=R(false),T=h(null),O=h(null),M=h(null),$=h(false),y=Je(i,f),N=F.some(a=>pe(a.language));Pe(d,()=>p(false));const A=()=>{var a;p(false),(a=O.current)==null||a.focus()};return Fe(()=>{if(!d)return;const a=o=>{var s,t,S;if(o instanceof KeyboardEvent){if(o.key!=="Escape")return;(s=T.current)!=null&&s.contains(document.activeElement)&&(o.preventDefault(),(t=O.current)==null||t.focus())}else if((S=T.current)!=null&&S.contains(o.target))return;p(false)};return document.addEventListener("pointerdown",a),document.addEventListener("keydown",a,true),()=>{document.removeEventListener("pointerdown",a),document.removeEventListener("keydown",a,true)}},[d]),J(()=>{const a=M.current,o=T.current,s=o==null?void 0:o.closest(".clover-canvas-transport"),t=o==null?void 0:o.closest(".clover-canvas-media");if(!d||!a||!o||!s||!t)return;const S=()=>_e(a,o,s,t);S();const b=new ResizeObserver(S);return b.observe(t),b.observe(s),b.observe(a),()=>b.disconnect()},[d]),e("div",{className:"clover-canvas-transport-menu",ref:T,onBlur:a=>{var s;const o=a.relatedTarget;d&&o instanceof Node&&!((s=T.current)!=null&&s.contains(o))&&p(false)},children:[e("button",{"aria-controls":r,"aria-describedby":k?`${r}-current`:void 0,"aria-expanded":d,"aria-label":i,...w(f),className:"clover-canvas-transport-button","data-active":P?"":void 0,"data-button":m,onClick:()=>p(a=>!a),ref:O,type:"button",children:[g,e(fe,{label:i})]}),k&&e("span",{hidden:true,id:`${r}-current`,...w(k.lang),children:k.label}),d&&y.node,d&&e("fieldset",{...y.props,className:Ge("clover-canvas-transport-options",I&&"clover-canvas-menu"),id:r,ref:M,children:F.map((a,o)=>{const s=pe(a.language);return e("label",{className:"clover-canvas-transport-option",onPointerDown:()=>{$.current=true},children:[e("input",{checked:V===o,name:r,onChange:()=>c(o),onClick:()=>{$.current&&A()},onKeyDown:t=>{$.current=false,t.key==="Enter"&&(t.preventDefault(),c(o),A())},type:"radio"}),a.time&&e(ie,{children:[e("span",{className:"clover-cue-time",children:a.time})," "]}),N&&(s?e(ie,{children:[e("span",{className:"clover-canvas-transport-code",children:s})," "]}):e("span",{className:"clover-canvas-transport-code","aria-hidden":"true"})),e("span",{className:"clover-cue-text",...w(a.lang),children:a.label}),V===o&&e(Ze,{source:a.thumbnail,request:L,large:true})]},o)})})]})}const rn=r=>r.querySelector(":scope > .clover-tip"),an=r=>{try{return r.matches(":focus-visible")}catch{return false}},gn=({instance:r,controller:i,kind:f,captions:m,activeCaption:g,onCaptionChange:P,fullscreen:k=false,isFullscreen:F=false,video:V,chapters:c=[],highlightedChapter:L=null,onChapterHighlight:I,request:d,fill:p,marks:T=[],selectedMark:O,onMarkSelect:M,onMarkActivate:$})=>{var oe,se;const{t:y,langOf:N}=Se(),A=Qe()||f==="video",a=h(null);Ie(a);const{paused:o,currentTime:s,duration:t,buffered:S,muted:b,volume:z}=i,E=ve(c,s),[U,ge]=R(-1),[Q,ye]=R(0),W=h(-1),_=n=>{var l;W.current!==n&&(W.current=n,ge(n),I==null||I(((l=c[n])==null?void 0:l.id)??null))},[Y,H]=R(false),[K,j]=R(false),v=K?U:Y?E:-1,ee=(K||Y)&&t>0,be=qe(en(c[v]),Xe,d),q=U>=0?U:c.findIndex(n=>n.id!==void 0&&n.id===L),ne=h(null);J(()=>{const n=ne.current,l=n==null?void 0:n.closest(".clover-canvas"),u=n&&v>=0?rn(n):null;if(!l||!u)return;const le="--clover-transport-preview-top",ce=()=>l.style.setProperty(le,`${l.getBoundingClientRect().bottom-u.getBoundingClientRect().top}px`);ce();const ue=new ResizeObserver(ce);return ue.observe(u),()=>{ue.disconnect(),l.style.removeProperty(le)}},[v]);const x=n=>{const{start:l,end:u=t}=c[n];return{left:l/t*100,width:(u-l)/t*100}},he=o?"playerPlay":"playerPause",te={label:y("playerCaptionsOff"),lang:N("playerCaptionsOff")},ke=b?"playerUnmute":"playerMute",Te=F?"imageExitFullScreen":"imageFullScreen",re=t?s/t*100:0,X=Ee(()=>{const n=Oe(c,t);return n.length?Me(n):void 0},[c,t]),Ne=t?S/t*100:0,Z=k&&A,C=h(null),ae=h(null);return J(()=>{var u;const n=C.current;if(!n||n.isConnected)return;C.current=null;const l=document.activeElement;(!l||l===document.body)&&((u=ae.current)==null||u.focus())},[m.length,c.length,Z]),e("div",{className:"clover-canvas-transport","data-kind":f,"data-testid":"clover-canvas-transport",onFocus:n=>{C.current=n.target},onBlur:n=>{const l=n.target,u=n.relatedTarget;if(u instanceof Node){n.currentTarget.contains(u)||(C.current=null);return}queueMicrotask(()=>{C.current===l&&l.isConnected&&(C.current=null)})},children:[e("div",{ref:ne,className:"clover-canvas-transport-seek-area",onPointerMove:n=>{const l=n.target;if(l.closest(He)){j(false),_(-1);return}if(!t||l.closest(".clover-tip"))return;const u=Be(n.currentTarget,n.clientX)*t;j(true),ye(Math.floor(u)),_(ve(c,u))},onPointerLeave:()=>{j(false),_(-1)},style:ee?{"--clover-transport-preview":de(v>=0?x(v).left+x(v).width/2:(K?Q:s)/t*100)}:void 0,children:[M&&T.length>0&&e(Ce,{fallback:null,children:e(Ye,{marks:T,duration:t,selected:O,onSelect:M,onActivate:$})}),e("input",{"aria-label":y("playerSeek"),lang:N("playerSeek"),"aria-valuetext":`${B(s)} / ${B(t)}${E>=0?`, ${c[E].label}`:""}`,className:"clover-canvas-transport-seek",onFocus:n=>H(an(n.currentTarget)),onBlur:()=>H(false),max:t||0,min:0,onChange:n=>i.seek(Number(n.target.value)),step:"any","data-gaps":X?"":void 0,style:{"--clover-transport-progress":`${re}%`,"--clover-transport-loaded":`${Ne}%`,...X&&{"--clover-transport-gaps":X,"--clover-transport-at":re/100}},type:"range",value:s}),q>=0&&t>0&&e("span",{"aria-hidden":"true",className:"clover-canvas-transport-chapter-span",style:{left:de(x(q).left),width:$e(x(q).width)}}),ee&&e(fe,{lead:B(K?Q:s),label:((oe=c[v])==null?void 0:oe.label)??"",lang:(se=c[v])==null?void 0:se.lang,image:v>=0?be:void 0},v)]}),e("div",{className:"clover-canvas-transport-bar",ref:a,children:[e(D,{words:he,button:o?"play":"pause",shortcut:me.play,onClick:i.toggle,buttonRef:ae,children:o?e(Re,{}):e(Ve,{})}),e(D,{words:ke,button:"mute",shortcut:me.mute,onClick:i.toggleMute,children:b||z===0?e(Ae,{}):e(Ke,{})}),nn()&&e("input",{"aria-label":y("playerVolume"),lang:N("playerVolume"),className:"clover-canvas-transport-volume",max:1,min:0,onChange:n=>i.setVolume(Number(n.target.value)),step:.05,style:{"--clover-transport-progress":`${(b?0:z)*100}%`},type:"range",value:b?0:z}),e("span",{className:"clover-canvas-transport-status",children:[e("span",{className:"clover-canvas-transport-time",children:[e("span",{"aria-label":y("playerCurrentTime"),...w(N("playerCurrentTime")),children:B(s)}),e("span",{"aria-hidden":"true",children:" / "}),e("span",{"aria-label":y("playerDuration"),...w(N("playerDuration")),children:B(t)})]}),E>=0&&e("span",{className:"clover-canvas-transport-chapter",...w(c[E].lang),children:c[E].label})]}),(m.length>0||Z||p)&&e("div",{className:"clover-canvas-transport-end",children:[m.length>0&&e(tn,{id:`${r}-captions`,label:y("playerCaptions"),labelLang:N("playerCaptions"),button:"captions",icon:e(xe,{on:g>=0}),active:g>=0,current:m[g]??te,options:[te,...m],selected:g+1,onSelect:n=>P(n-1)}),p&&e(D,{words:p.filled?"playerFit":"playerFill",button:"fill",onClick:p.onToggle,children:p.filled?e(De,{}):e(Le,{})}),Z&&e(D,{words:Te,button:"fullscreen",onClick:n=>void We(n.currentTarget,V),children:F?e(ze,{}):e(Ue,{})})]})]})]})};export{gn as T,en as a,ve as c};
@@ -1 +1 @@
1
- import{S as l,az as g,ax as y,aA as u,ay as f}from"./shared-CCg1Iag8.mjs";const w=100;async function p(t,n,i){if(typeof t=="string")return await f(n,t,i);const a=t;return a!=null&&a.id&&a.type==="AnnotationPage"&&!a.items?await f(n,a.id,i):a}async function h(t,n,i){const a=String((t==null?void 0:t.type)??(t==null?void 0:t["@type"])??""),c=/AnnotationCollection/.test(a),o=c?[]:[t],r=new Set(c?[]:[t.id]);let e=c?t.first:t.next;for(;e&&o.length<w;){const s=typeof e=="string"?e:e.id;if(r.has(s??e))break;r.add(s??e);const d=await p(e,n,i);o.push(d),e=d.next}return o}async function x(t,{request:n,signal:i}={}){const a=[];for(const c of l(t)){const o=await p(c,n,i);for(const r of await h(o,n,i)){const e=await g(r),s=e.id??`added-${a.length}`,d=y(e,s);d.length&&a.push({id:s,label:u(e,r===o?c:void 0)??o.label,source:"added",entries:d})}}return a}export{x as loadAnnotationSets};
1
+ import{S as l,az as g,ax as y,aA as u,ay as f}from"./shared-BtCBrxx9.mjs";const w=100;async function p(t,n,i){if(typeof t=="string")return await f(n,t,i);const a=t;return a!=null&&a.id&&a.type==="AnnotationPage"&&!a.items?await f(n,a.id,i):a}async function h(t,n,i){const a=String((t==null?void 0:t.type)??(t==null?void 0:t["@type"])??""),c=/AnnotationCollection/.test(a),o=c?[]:[t],r=new Set(c?[]:[t.id]);let e=c?t.first:t.next;for(;e&&o.length<w;){const s=typeof e=="string"?e:e.id;if(r.has(s??e))break;r.add(s??e);const d=await p(e,n,i);o.push(d),e=d.next}return o}async function x(t,{request:n,signal:i}={}){const a=[];for(const c of l(t)){const o=await p(c,n,i);for(const r of await h(o,n,i)){const e=await g(r),s=e.id??`added-${a.length}`,d=y(e,s);d.length&&a.push({id:s,label:u(e,r===o?c:void 0)??o.label,source:"added",entries:d})}}return a}export{x as loadAnnotationSets};
@@ -1 +1 @@
1
- import{t as d,V as p}from"./shared-CCg1Iag8.mjs";import{t as u,r as v,m as T}from"./text-BTAkxEfQ.mjs";const m=t=>t.language&&t.language!=="none"?t.language:"none";function k(t,e){const o=p([...new Set(t.map(m))],e);return t.find(r=>m(r)===o)}function P(t,e){const o=(n,a)=>n?{text:n,...a?{lang:a}:{}}:{},r=t.filter(n=>{var a;return(a=n.value)==null?void 0:a.trim()});if(!r.length){const n=t.find(s=>(s.image||s.place)&&s.label);if(!n)return{};const{text:a,lang:x}=d(n.label,e);return o(u(a).trim(),x)}const l=k(r,e),i=l.value,c=v(l.format,i),f=c==="markdown"?T(i):c==="html"?u(i):i,g=m(l);return o(f.trim(),g==="none"?void 0:g)}export{P as a,k as b};
1
+ import{t as d,V as p}from"./shared-BtCBrxx9.mjs";import{t as u,r as v,m as T}from"./text-BTAkxEfQ.mjs";const m=t=>t.language&&t.language!=="none"?t.language:"none";function k(t,e){const o=p([...new Set(t.map(m))],e);return t.find(r=>m(r)===o)}function P(t,e){const o=(n,a)=>n?{text:n,...a?{lang:a}:{}}:{},r=t.filter(n=>{var a;return(a=n.value)==null?void 0:a.trim()});if(!r.length){const n=t.find(s=>(s.image||s.place)&&s.label);if(!n)return{};const{text:a,lang:x}=d(n.label,e);return o(u(a).trim(),x)}const l=k(r,e),i=l.value,c=v(l.format,i),f=c==="markdown"?T(i):c==="html"?u(i):i,g=m(l);return o(f.trim(),g==="none"?void 0:g)}export{P as a,k as b};
@@ -1 +1 @@
1
- import{loadAnnotationSets as f}from"./annotation-collection-nmxzo_hO.mjs";import{G as i,aB as l,aq as c}from"./shared-CCg1Iag8.mjs";async function y(n,a){const r={id:String(n.id??""),type:/Collection/.test(String(n.type??n["@type"]))?"AnnotationCollection":"AnnotationPage",...n.label?{label:n.label}:{}},o=(await f(n,a)).map(t=>({...t,content:r})),s=o.flatMap(t=>t.entries),e=s.find(t=>a.manifestId&&i(t.annotation)===a.manifestId)??s.find(t=>i(t.annotation));if(!e)throw new l("The annotations name no Manifest");return{manifest:await c({id:i(e.annotation),type:"Manifest"},a),target:{canvasId:e.canvasId},annotationSets:o,pick:e.id}}export{y as annotationsContent};
1
+ import{loadAnnotationSets as f}from"./annotation-collection-BTpPigqD.mjs";import{G as i,aB as l,aq as c}from"./shared-BtCBrxx9.mjs";async function y(n,a){const r={id:String(n.id??""),type:/Collection/.test(String(n.type??n["@type"]))?"AnnotationCollection":"AnnotationPage",...n.label?{label:n.label}:{}},o=(await f(n,a)).map(t=>({...t,content:r})),s=o.flatMap(t=>t.entries),e=s.find(t=>a.manifestId&&i(t.annotation)===a.manifestId)??s.find(t=>i(t.annotation));if(!e)throw new l("The annotations name no Manifest");return{manifest:await c({id:i(e.annotation),type:"Manifest"},a),target:{canvasId:e.canvasId},annotationSets:o,pick:e.id}}export{y as annotationsContent};
@@ -1 +1 @@
1
- import{f as m,T as u,h as g,u as r,i as B,g as p}from"./shared-CCg1Iag8.mjs";import{B as h}from"./Body-DyrvRDkt.mjs";import{u as y,P as L}from"./nodes-CmL3eoRE.mjs";import{Toggle as b}from"./toggle-CGSnnjW-.mjs";const R={height:"100%"},T=e=>[...e.children].find(s=>s.localName==="clover-panel-toggle")??null,C=e=>e instanceof HTMLElement&&e.localName==="button";function P({hosted:e,props:s}){const a=y(e.element,()=>T(e.element),Object.is),{controlButtons:n,renderers:l,onReady:c,...d}=s,o=m(B,!!n),t=m(p,!!l),i=u(()=>o==null?void 0:o.toControlButtons(n),[o,n]),f=u(()=>t==null?void 0:t.toRenderers(l),[t,l]);return g(c),n&&!o||l&&!t?null:r(h,{...d,onReady:c,controlButtons:i,renderers:f,style:R,children:[a&&r(b,{element:a}),r(L,{from:e.element,picks:C})]})}export{P as BodyElement};
1
+ import{f as m,T as u,h as g,u as r,i as B,g as p}from"./shared-BtCBrxx9.mjs";import{B as h}from"./Body-Bh8Nu8Fo.mjs";import{u as y,P as L}from"./nodes-C_TYa0cJ.mjs";import{Toggle as b}from"./toggle-Cqtdko9H.mjs";const R={height:"100%"},T=e=>[...e.children].find(s=>s.localName==="clover-panel-toggle")??null,C=e=>e instanceof HTMLElement&&e.localName==="button";function P({hosted:e,props:s}){const a=y(e.element,()=>T(e.element),Object.is),{controlButtons:n,renderers:l,onReady:c,...d}=s,o=m(B,!!n),t=m(p,!!l),i=u(()=>o==null?void 0:o.toControlButtons(n),[o,n]),f=u(()=>t==null?void 0:t.toRenderers(l),[t,l]);return g(c),n&&!o||l&&!t?null:r(h,{...d,onReady:c,controlButtons:i,renderers:f,style:R,children:[a&&r(b,{element:a}),r(L,{from:e.element,picks:C})]})}export{P as BodyElement};
@@ -1 +1 @@
1
- import{O as l,u as o,z as c,P as r,f,T as v,h as C,i as m}from"./shared-CCg1Iag8.mjs";import{C as b}from"./CanvasView-CmDxczm9.mjs";import{r as s}from"./rendererSurface-BgZPnAwj.mjs";import{C as i}from"./Pending-CmgVU1kF.mjs";const h=c(()=>import("./Connected-Bne3I5E1.mjs")),B=c(()=>import("./LoadedCanvas-Cq7_O2bw.mjs")),k=n=>{const a=l();if(n.iiifContent!==void 0&&n.canvases===void 0)return o(r,{fallback:o(i,{}),children:o(B,{...n,surface:s})});const e=n.canvases!==void 0||n.body!==void 0||n.src!==void 0;return a&&!e?o(r,{fallback:o(i,{}),children:o(h,{...n,surface:s})}):o(b,{...n,surface:s})};function g({props:n}){const{controlButtons:a,onReady:e,...d}=n,t=f(m,!!a),u=v(()=>t==null?void 0:t.toControlButtons(a),[t,a]);return C(e),a&&!t?null:o(k,{...d,onReady:e,controlButtons:u})}export{g as CanvasElement};
1
+ import{O as l,u as o,z as c,P as r,f,T as v,h as C,i as m}from"./shared-BtCBrxx9.mjs";import{C as b}from"./CanvasView-DcrhjwpU.mjs";import{r as s}from"./rendererSurface-CE09-Vp6.mjs";import{C as i}from"./Pending-Ci8Pe6Ip.mjs";const h=c(()=>import("./Connected-D30kPwoX.mjs")),B=c(()=>import("./LoadedCanvas-Bdqqh01C.mjs")),k=n=>{const a=l();if(n.iiifContent!==void 0&&n.canvases===void 0)return o(r,{fallback:o(i,{}),children:o(B,{...n,surface:s})});const e=n.canvases!==void 0||n.body!==void 0||n.src!==void 0;return a&&!e?o(r,{fallback:o(i,{}),children:o(h,{...n,surface:s})}):o(b,{...n,surface:s})};function g({props:n}){const{controlButtons:a,onReady:e,...d}=n,t=f(m,!!a),u=v(()=>t==null?void 0:t.toControlButtons(a),[t,a]);return C(e),a&&!t?null:o(k,{...d,onReady:e,controlButtons:u})}export{g as CanvasElement};
@@ -1,4 +1,4 @@
1
- import{c as ne,F as ae,i as se,M as ie}from"./models-pO77sm3z.mjs";import{au as ce,a1 as ue}from"./shared-CCg1Iag8.mjs";const le=["KHR_materials_unlit","KHR_materials_ior","KHR_materials_specular","KHR_mesh_quantization"],Z=1179937895,fe=1313821514,de=5130562;function me(e){const s=new DataView(e);if(s.getUint32(0,true)!==Z)throw new Error("This is not a GLB.");if(s.getUint32(4,true)!==2)throw new Error("Only glTF 2.0 is drawn.");let o,t;const n=Math.min(s.getUint32(8,true),e.byteLength);for(let a=12;a+8<=n;){const i=s.getUint32(a,true),l=s.getUint32(a+4,true),c=a+8;l===fe?o=JSON.parse(new TextDecoder().decode(new Uint8Array(e,c,i))):l===de&&(t=e.slice(c,c+i)),a=c+i}if(!o)throw new Error("The GLB has no JSON chunk.");return{json:o,bin:t}}async function z(e,s,o){const t=new URL(e,s).href,n=t.startsWith("data:")?await fetch(t):await ue(o,t);if(!n.ok)throw new Error(`${t} answered ${n.status}`);return n.arrayBuffer()}const $=new WeakMap;function ve(e,s,o){const t=(s==null?void 0:s.fetch)??globalThis.fetch,n=$.get(t)??new Map;$.set(t,n);const a=`${ce(s)} ${o??""} ${e}`;let i=n.get(a);return i||(i=he(e,s,o).finally(()=>n.delete(a)),n.set(a,i)),i}async function he(e,s,o){const t=await z(e,location.href,s),n=new DataView(t).getUint32(0,true)===Z,{json:a,bin:i}=n?me(t):{json:JSON.parse(new TextDecoder().decode(t))},l=(a.extensionsRequired??[]).filter(f=>!le.includes(f));if(l.length)throw new Error(`Clover's renderer cannot draw this model: it requires ${l.join(", ")}.`);const c=await Promise.all((a.buffers??[]).map((f,r)=>{if(f.uri!==void 0)return z(f.uri,e,s);if(r===0&&i)return i;throw new Error("A buffer of the model has no data.")})),u=await Promise.all((a.images??[]).map(async f=>{try{let r;if(f.bufferView!==void 0){const d=a.bufferViews[f.bufferView];r=new Blob([new Uint8Array(c[d.buffer],d.byteOffset??0,d.byteLength)],{type:f.mimeType})}else if(f.uri!==void 0)r=new Blob([await z(f.uri,e,s)],{type:f.mimeType});else return null;const m={premultiplyAlpha:"none",colorSpaceConversion:"none"};return await pe(await createImageBitmap(r,m),o,m)}catch{return null}}));return{json:a,buffers:c,images:u}}async function pe(e,s,o){const t=Math.max(e.width,e.height);if(!s||t<=s)return e;const n=s/t,a=await createImageBitmap(e,{...o,resizeWidth:Math.max(1,Math.floor(e.width*n)),resizeHeight:Math.max(1,Math.floor(e.height*n)),resizeQuality:"high"});return e.close(),a}const we={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Ee={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},q=e=>we[e];function Te(e,s){const o=e.json.accessors[s],t=q(o.type),n=new Float32Array(o.count*t);if(o.bufferView===void 0)return n;const a=e.json.bufferViews[o.bufferView],i=Ee[o.componentType],l=a.byteStride||i*t,c=new DataView(e.buffers[a.buffer],(a.byteOffset??0)+(o.byteOffset??0)),u={5120:r=>c.getInt8(r),5121:r=>c.getUint8(r),5122:r=>c.getInt16(r,true),5123:r=>c.getUint16(r,true),5125:r=>c.getUint32(r,true),5126:r=>c.getFloat32(r,true)}[o.componentType]??(()=>0),f=o.normalized?{5120:127,5121:255,5122:32767,5123:65535}[o.componentType]:void 0;for(let r=0;r<o.count;r++)for(let m=0;m<t;m++){const d=u(r*l+m*i);n[r*t+m]=f?Math.max(d/f,-1):d}return n}const ee=()=>new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function I(e,s){const o=new Float32Array(16);for(let t=0;t<4;t++)for(let n=0;n<4;n++){let a=0;for(let i=0;i<4;i++)a+=e[i*4+n]*s[t*4+i];o[t*4+n]=a}return o}function X([e,s,o],[t,n,a,i],[l,c,u]){const f=t+t,r=n+n,m=a+a,d=t*f,M=t*r,p=t*m,w=n*r,S=n*m,y=a*m,k=i*f,L=i*r,O=i*m;return new Float32Array([(1-(w+y))*l,(M+O)*l,(p-L)*l,0,(M-O)*c,(1-(d+y))*c,(S+k)*c,0,(p+L)*u,(S-k)*u,(1-(d+w))*u,0,e,s,o,1])}const K=e=>X(e,[0,0,0,1],[1,1,1]),xe=e=>X([0,0,0],[0,0,0,1],e);function be([e,s,o]){const t=(n,a)=>{const i=a*Math.PI/180,l=Math.cos(i),c=Math.sin(i),u=ee(),[f,r]=n===0?[1,2]:n===1?[2,0]:[0,1];return u[f*4+f]=l,u[f*4+r]=c,u[r*4+f]=-c,u[r*4+r]=l,u};return I(t(2,o),I(t(1,s),t(0,e)))}function ye(e,s,o,t){const n=1/Math.tan(e/2),a=1/(o-t);return new Float32Array([n/s,0,0,0,0,n,0,0,0,0,(t+o)*a,-1,0,0,2*t*o*a,0])}function Ae(e,s){const o=c=>{const u=Math.hypot(...c)||1;return[c[0]/u,c[1]/u,c[2]/u]},t=(c,u)=>[c[1]*u[2]-c[2]*u[1],c[2]*u[0]-c[0]*u[2],c[0]*u[1]-c[1]*u[0]],n=(c,u)=>c[0]*u[0]+c[1]*u[1]+c[2]*u[2],a=o([e[0]-s[0],e[1]-s[1],e[2]-s[2]]),i=o(t([0,1,0],a)),l=t(a,i);return new Float32Array([i[0],l[0],a[0],0,i[1],l[1],a[1],0,i[2],l[2],a[2],0,-n(i,e),-n(l,e),-n(a,e),1])}function Re(e){const[s,o,t,,n,a,i,,l,c,u]=e,f=a*u-i*c,r=i*l-n*u,m=n*c-a*l,d=s*f+o*r+t*m||1;return new Float32Array([f/d,r/d,m/d,(t*c-o*u)/d,(s*u-t*l)/d,(o*l-s*c)/d,(o*i-t*a)/d,(t*n-s*i)/d,(s*a-o*n)/d])}const Me=()=>({min:[1/0,1/0,1/0],max:[-1/0,-1/0,-1/0]});function _e(e){for(let s=0;s<3;s++){let o=0;for(let t=0;t<3;t++)Math.abs(e[s*4+t])>1e-6&&o++;if(o>1)return false}return true}function Ne(e,s,o,t){const n=s.json.accessors[o];let a;if(_e(t)&&n.min&&n.max&&!n.normalized){const[l,c]=[n.min,n.max];a=Array.from({length:8},(u,f)=>[f&1?c[0]:l[0],f&2?c[1]:l[1],f&4?c[2]:l[2]]).flat()}else a=Te(s,o);const i=t;for(let l=0;l+2<a.length;l+=3){const c=a[l],u=a[l+1],f=a[l+2];for(let r=0;r<3;r++){const m=i[r]*c+i[4+r]*u+i[8+r]*f+i[12+r];m<e.min[r]&&(e.min[r]=m),m>e.max[r]&&(e.max[r]=m)}}return e}const C={normals:1,normalMap:2,unlit:4,mask:8},Y={POSITION:0,NORMAL:1,TEXCOORD_0:2,COLOR_0:3},J=["uBaseTexture","uMetalRoughTexture","uNormalTexture","uOcclusionTexture","uEmissiveTexture"],Se=`#version 300 es
1
+ import{c as ne,F as ae,i as se,M as ie}from"./models-qg8TrXAe.mjs";import{au as ce,a1 as ue}from"./shared-BtCBrxx9.mjs";const le=["KHR_materials_unlit","KHR_materials_ior","KHR_materials_specular","KHR_mesh_quantization"],Z=1179937895,fe=1313821514,de=5130562;function me(e){const s=new DataView(e);if(s.getUint32(0,true)!==Z)throw new Error("This is not a GLB.");if(s.getUint32(4,true)!==2)throw new Error("Only glTF 2.0 is drawn.");let o,t;const n=Math.min(s.getUint32(8,true),e.byteLength);for(let a=12;a+8<=n;){const i=s.getUint32(a,true),l=s.getUint32(a+4,true),c=a+8;l===fe?o=JSON.parse(new TextDecoder().decode(new Uint8Array(e,c,i))):l===de&&(t=e.slice(c,c+i)),a=c+i}if(!o)throw new Error("The GLB has no JSON chunk.");return{json:o,bin:t}}async function z(e,s,o){const t=new URL(e,s).href,n=t.startsWith("data:")?await fetch(t):await ue(o,t);if(!n.ok)throw new Error(`${t} answered ${n.status}`);return n.arrayBuffer()}const $=new WeakMap;function ve(e,s,o){const t=(s==null?void 0:s.fetch)??globalThis.fetch,n=$.get(t)??new Map;$.set(t,n);const a=`${ce(s)} ${o??""} ${e}`;let i=n.get(a);return i||(i=he(e,s,o).finally(()=>n.delete(a)),n.set(a,i)),i}async function he(e,s,o){const t=await z(e,location.href,s),n=new DataView(t).getUint32(0,true)===Z,{json:a,bin:i}=n?me(t):{json:JSON.parse(new TextDecoder().decode(t))},l=(a.extensionsRequired??[]).filter(f=>!le.includes(f));if(l.length)throw new Error(`Clover's renderer cannot draw this model: it requires ${l.join(", ")}.`);const c=await Promise.all((a.buffers??[]).map((f,r)=>{if(f.uri!==void 0)return z(f.uri,e,s);if(r===0&&i)return i;throw new Error("A buffer of the model has no data.")})),u=await Promise.all((a.images??[]).map(async f=>{try{let r;if(f.bufferView!==void 0){const d=a.bufferViews[f.bufferView];r=new Blob([new Uint8Array(c[d.buffer],d.byteOffset??0,d.byteLength)],{type:f.mimeType})}else if(f.uri!==void 0)r=new Blob([await z(f.uri,e,s)],{type:f.mimeType});else return null;const m={premultiplyAlpha:"none",colorSpaceConversion:"none"};return await pe(await createImageBitmap(r,m),o,m)}catch{return null}}));return{json:a,buffers:c,images:u}}async function pe(e,s,o){const t=Math.max(e.width,e.height);if(!s||t<=s)return e;const n=s/t,a=await createImageBitmap(e,{...o,resizeWidth:Math.max(1,Math.floor(e.width*n)),resizeHeight:Math.max(1,Math.floor(e.height*n)),resizeQuality:"high"});return e.close(),a}const we={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Ee={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},q=e=>we[e];function Te(e,s){const o=e.json.accessors[s],t=q(o.type),n=new Float32Array(o.count*t);if(o.bufferView===void 0)return n;const a=e.json.bufferViews[o.bufferView],i=Ee[o.componentType],l=a.byteStride||i*t,c=new DataView(e.buffers[a.buffer],(a.byteOffset??0)+(o.byteOffset??0)),u={5120:r=>c.getInt8(r),5121:r=>c.getUint8(r),5122:r=>c.getInt16(r,true),5123:r=>c.getUint16(r,true),5125:r=>c.getUint32(r,true),5126:r=>c.getFloat32(r,true)}[o.componentType]??(()=>0),f=o.normalized?{5120:127,5121:255,5122:32767,5123:65535}[o.componentType]:void 0;for(let r=0;r<o.count;r++)for(let m=0;m<t;m++){const d=u(r*l+m*i);n[r*t+m]=f?Math.max(d/f,-1):d}return n}const ee=()=>new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function I(e,s){const o=new Float32Array(16);for(let t=0;t<4;t++)for(let n=0;n<4;n++){let a=0;for(let i=0;i<4;i++)a+=e[i*4+n]*s[t*4+i];o[t*4+n]=a}return o}function X([e,s,o],[t,n,a,i],[l,c,u]){const f=t+t,r=n+n,m=a+a,d=t*f,M=t*r,p=t*m,w=n*r,S=n*m,y=a*m,k=i*f,L=i*r,O=i*m;return new Float32Array([(1-(w+y))*l,(M+O)*l,(p-L)*l,0,(M-O)*c,(1-(d+y))*c,(S+k)*c,0,(p+L)*u,(S-k)*u,(1-(d+w))*u,0,e,s,o,1])}const K=e=>X(e,[0,0,0,1],[1,1,1]),xe=e=>X([0,0,0],[0,0,0,1],e);function be([e,s,o]){const t=(n,a)=>{const i=a*Math.PI/180,l=Math.cos(i),c=Math.sin(i),u=ee(),[f,r]=n===0?[1,2]:n===1?[2,0]:[0,1];return u[f*4+f]=l,u[f*4+r]=c,u[r*4+f]=-c,u[r*4+r]=l,u};return I(t(2,o),I(t(1,s),t(0,e)))}function ye(e,s,o,t){const n=1/Math.tan(e/2),a=1/(o-t);return new Float32Array([n/s,0,0,0,0,n,0,0,0,0,(t+o)*a,-1,0,0,2*t*o*a,0])}function Ae(e,s){const o=c=>{const u=Math.hypot(...c)||1;return[c[0]/u,c[1]/u,c[2]/u]},t=(c,u)=>[c[1]*u[2]-c[2]*u[1],c[2]*u[0]-c[0]*u[2],c[0]*u[1]-c[1]*u[0]],n=(c,u)=>c[0]*u[0]+c[1]*u[1]+c[2]*u[2],a=o([e[0]-s[0],e[1]-s[1],e[2]-s[2]]),i=o(t([0,1,0],a)),l=t(a,i);return new Float32Array([i[0],l[0],a[0],0,i[1],l[1],a[1],0,i[2],l[2],a[2],0,-n(i,e),-n(l,e),-n(a,e),1])}function Re(e){const[s,o,t,,n,a,i,,l,c,u]=e,f=a*u-i*c,r=i*l-n*u,m=n*c-a*l,d=s*f+o*r+t*m||1;return new Float32Array([f/d,r/d,m/d,(t*c-o*u)/d,(s*u-t*l)/d,(o*l-s*c)/d,(o*i-t*a)/d,(t*n-s*i)/d,(s*a-o*n)/d])}const Me=()=>({min:[1/0,1/0,1/0],max:[-1/0,-1/0,-1/0]});function _e(e){for(let s=0;s<3;s++){let o=0;for(let t=0;t<3;t++)Math.abs(e[s*4+t])>1e-6&&o++;if(o>1)return false}return true}function Ne(e,s,o,t){const n=s.json.accessors[o];let a;if(_e(t)&&n.min&&n.max&&!n.normalized){const[l,c]=[n.min,n.max];a=Array.from({length:8},(u,f)=>[f&1?c[0]:l[0],f&2?c[1]:l[1],f&4?c[2]:l[2]]).flat()}else a=Te(s,o);const i=t;for(let l=0;l+2<a.length;l+=3){const c=a[l],u=a[l+1],f=a[l+2];for(let r=0;r<3;r++){const m=i[r]*c+i[4+r]*u+i[8+r]*f+i[12+r];m<e.min[r]&&(e.min[r]=m),m>e.max[r]&&(e.max[r]=m)}}return e}const C={normals:1,normalMap:2,unlit:4,mask:8},Y={POSITION:0,NORMAL:1,TEXCOORD_0:2,COLOR_0:3},J=["uBaseTexture","uMetalRoughTexture","uNormalTexture","uOcclusionTexture","uEmissiveTexture"],Se=`#version 300 es
2
2
  layout(location = 0) in vec3 aPosition;
3
3
  layout(location = 1) in vec3 aNormal;
4
4
  layout(location = 2) in vec2 aUv;
@@ -1 +1 @@
1
- import{S as l,a8 as g}from"./shared-CCg1Iag8.mjs";function b(t){const e=t.replace(/-/g,"+").replace(/_/g,"/"),n=e+"=".repeat((4-e.length%4)%4),o=atob(n);try{return decodeURIComponent(o)}catch{const a=Uint8Array.from(o,s=>s.charCodeAt(0));return new TextDecoder().decode(a)}}function I(t){const e=t.trim();for(const n of[()=>JSON.parse(e),()=>JSON.parse(b(e))])try{const o=n();if(o&&typeof o=="object")return o}catch{}return null}function v(t){if(!t)return;const e=Number(t.split(",")[0]);return Number.isFinite(e)?e:void 0}const u=t=>l(t==null?void 0:t.partOf).find(e=>(e==null?void 0:e.id)&&e.type==="Collection");function h(t){const e=t.type==="Annotation"?l(t.target):[t],n=e[0]?m(e[0],t):null;if(!n||e.length<2)return n;const o=typeof t.id=="string"?t.id:"content-state",a=e.flatMap((s,d)=>{var y,p,f;const i=d===0?n:m(s,t),r=(i==null?void 0:i.type)==="Manifest"?i.id:i==null?void 0:i.manifestId;return!i||!r?[]:[{id:`${o}#target-${d+1}`,manifestId:r,...((y=i.target)==null?void 0:y.canvasId)&&{canvasId:i.target.canvasId},...((p=i.target)==null?void 0:p.region)&&{region:i.target.region},...((f=i.target)==null?void 0:f.time)!==void 0&&{time:i.target.time}}]});return a.length>1?{...n,targets:{id:o,...t.label&&typeof t.label=="object"?{label:t.label}:{},items:a}}:n}function m(t,e){const n=g(t),o=typeof t=="string"?{id:n.id}:t.type==="SpecificResource"?typeof t.source=="string"?{id:t.source}:t.source??{}:t,a=o.type;if(a==="Manifest"||a==="Collection"){const c=a==="Manifest"?u(o):void 0;return c?{id:c.id,type:"Collection",manifestId:n.id}:{id:n.id,type:a}}const s=l(t.selector).find(c=>(c==null?void 0:c.type)==="PointSelector"&&c.t!=null),d={canvasId:n.id};n.rect&&(d.region=n.rect);const i=(s==null?void 0:s.t)??v(n.t);i!==void 0&&(d.time=Number(i));const r=l(o.partOf).find(c=>(c==null?void 0:c.id)&&(!c.type||c.type==="Manifest")),y=u(r),p=e.type==="Annotation"&&l(e.body).length?{id:e.id??`${n.id}#content-state`,type:"Annotation",motivation:l(e.motivation),body:e.body,target:t}:void 0,f=p?{annotation:p}:{};return y&&r?{id:y.id,type:"Collection",manifestId:r.id,target:d,...f}:r?{id:r.id,type:"Manifest",target:d,...f}:{id:n.id,type:a??"Canvas",target:d,...f}}export{I as decodeContentState,h as resolveContentState};
1
+ import{S as l,a8 as g}from"./shared-BtCBrxx9.mjs";function b(t){const e=t.replace(/-/g,"+").replace(/_/g,"/"),n=e+"=".repeat((4-e.length%4)%4),o=atob(n);try{return decodeURIComponent(o)}catch{const a=Uint8Array.from(o,s=>s.charCodeAt(0));return new TextDecoder().decode(a)}}function I(t){const e=t.trim();for(const n of[()=>JSON.parse(e),()=>JSON.parse(b(e))])try{const o=n();if(o&&typeof o=="object")return o}catch{}return null}function v(t){if(!t)return;const e=Number(t.split(",")[0]);return Number.isFinite(e)?e:void 0}const u=t=>l(t==null?void 0:t.partOf).find(e=>(e==null?void 0:e.id)&&e.type==="Collection");function h(t){const e=t.type==="Annotation"?l(t.target):[t],n=e[0]?m(e[0],t):null;if(!n||e.length<2)return n;const o=typeof t.id=="string"?t.id:"content-state",a=e.flatMap((s,d)=>{var y,p,f;const i=d===0?n:m(s,t),r=(i==null?void 0:i.type)==="Manifest"?i.id:i==null?void 0:i.manifestId;return!i||!r?[]:[{id:`${o}#target-${d+1}`,manifestId:r,...((y=i.target)==null?void 0:y.canvasId)&&{canvasId:i.target.canvasId},...((p=i.target)==null?void 0:p.region)&&{region:i.target.region},...((f=i.target)==null?void 0:f.time)!==void 0&&{time:i.target.time}}]});return a.length>1?{...n,targets:{id:o,...t.label&&typeof t.label=="object"?{label:t.label}:{},items:a}}:n}function m(t,e){const n=g(t),o=typeof t=="string"?{id:n.id}:t.type==="SpecificResource"?typeof t.source=="string"?{id:t.source}:t.source??{}:t,a=o.type;if(a==="Manifest"||a==="Collection"){const c=a==="Manifest"?u(o):void 0;return c?{id:c.id,type:"Collection",manifestId:n.id}:{id:n.id,type:a}}const s=l(t.selector).find(c=>(c==null?void 0:c.type)==="PointSelector"&&c.t!=null),d={canvasId:n.id};n.rect&&(d.region=n.rect);const i=(s==null?void 0:s.t)??v(n.t);i!==void 0&&(d.time=Number(i));const r=l(o.partOf).find(c=>(c==null?void 0:c.id)&&(!c.type||c.type==="Manifest")),y=u(r),p=e.type==="Annotation"&&l(e.body).length?{id:e.id??`${n.id}#content-state`,type:"Annotation",motivation:l(e.motivation),body:e.body,target:t}:void 0,f=p?{annotation:p}:{};return y&&r?{id:y.id,type:"Collection",manifestId:r.id,target:d,...f}:r?{id:r.id,type:"Manifest",target:d,...f}:{id:n.id,type:a??"Canvas",target:d,...f}}export{I as decodeContentState,h as resolveContentState};
@@ -1 +1 @@
1
- import{u as t,k as o}from"./shared-CCg1Iag8.mjs";const s=()=>t("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M256 112v288M400 256H112"}),i=()=>t("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M400 256H112"}),a=()=>t("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M432 320v112H320M421.8 421.77L304 304M80 192V80h112M90.2 90.23L208 208M320 80h112v112M421.77 90.2L304 208M192 432H80V320M90.23 421.8L208 304"}),l=()=>t("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M304 416v-112h112M405.77 405.77L304 304M208 96v112H96M106.23 106.23L208 208M416 208H304V96M405.77 106.23L304 208M96 304h112v112M106.23 405.77L208 304"}),d=()=>t("path",{d:"M448 440a16 16 0 01-12.61-6.15c-22.86-29.27-44.07-51.86-73.32-67C335 352.88 301 345.59 256 344.23V424a16 16 0 01-27 11.57l-176-168a16 16 0 010-23.14l176-168A16 16 0 01256 88v80.36c74.14 3.41 129.38 30.91 164.35 81.87C449.32 292.44 464 350.9 464 424a16 16 0 01-16 16z"}),h=()=>t(o,{children:[t("path",{fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M400 148l-21.12-24.57A191.43 191.43 0 00240 64C134 64 48 150 48 256s86 192 192 192a192.09 192.09 0 00181.07-128"}),t("path",{d:"M464 97.42V208a16 16 0 01-16 16H337.42c-14.26 0-21.4-17.23-11.32-27.31L436.69 86.1C446.77 76 464 83.16 464 97.42z"})]}),c=()=>t(o,{children:[t("path",{fill:"none",strokeLinecap:"round",strokeWidth:"64",d:"M112 144h0M112 256h0M112 368h0"}),t("path",{fill:"none",strokeLinecap:"round",strokeWidth:"40",d:"M208 144h208M208 256h208M208 368h208"})]}),M=({children:e,label:r})=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 512 512",fill:"currentColor",stroke:"currentColor",focusable:"false","aria-hidden":"true",role:"presentation","data-testid":"clover-canvas-button-svg","data-label":r,children:e});export{c as C,h as R,s as Z,i as a,l as b,a as c,d,M as e};
1
+ import{u as t,k as o}from"./shared-BtCBrxx9.mjs";const s=()=>t("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M256 112v288M400 256H112"}),i=()=>t("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M400 256H112"}),a=()=>t("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M432 320v112H320M421.8 421.77L304 304M80 192V80h112M90.2 90.23L208 208M320 80h112v112M421.77 90.2L304 208M192 432H80V320M90.23 421.8L208 304"}),l=()=>t("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M304 416v-112h112M405.77 405.77L304 304M208 96v112H96M106.23 106.23L208 208M416 208H304V96M405.77 106.23L304 208M96 304h112v112M106.23 405.77L208 304"}),d=()=>t("path",{d:"M448 440a16 16 0 01-12.61-6.15c-22.86-29.27-44.07-51.86-73.32-67C335 352.88 301 345.59 256 344.23V424a16 16 0 01-27 11.57l-176-168a16 16 0 010-23.14l176-168A16 16 0 01256 88v80.36c74.14 3.41 129.38 30.91 164.35 81.87C449.32 292.44 464 350.9 464 424a16 16 0 01-16 16z"}),h=()=>t(o,{children:[t("path",{fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M400 148l-21.12-24.57A191.43 191.43 0 00240 64C134 64 48 150 48 256s86 192 192 192a192.09 192.09 0 00181.07-128"}),t("path",{d:"M464 97.42V208a16 16 0 01-16 16H337.42c-14.26 0-21.4-17.23-11.32-27.31L436.69 86.1C446.77 76 464 83.16 464 97.42z"})]}),c=()=>t(o,{children:[t("path",{fill:"none",strokeLinecap:"round",strokeWidth:"64",d:"M112 144h0M112 256h0M112 368h0"}),t("path",{fill:"none",strokeLinecap:"round",strokeWidth:"40",d:"M208 144h208M208 256h208M208 368h208"})]}),M=({children:e,label:r})=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 512 512",fill:"currentColor",stroke:"currentColor",focusable:"false","aria-hidden":"true",role:"presentation","data-testid":"clover-canvas-button-svg","data-label":r,children:e});export{c as C,h as R,s as Z,i as a,l as b,a as c,d,M as e};
@@ -1 +1 @@
1
- import{u as d,A as v,d as y,_ as g,$ as w,k as A}from"./shared-CCg1Iag8.mjs";const E=new Map;function D(o){if(!o||typeof o!="object")return;const s={};for(const[n,r]of Object.entries(o)){if(typeof r!="function")continue;const u=E.get(n)??new WeakMap;E.set(n,u);let c=u.get(r);c||(c=l=>d(x,{...l,name:n,make:r}),u.set(r,c)),s[n]=c}return s}const B=["id","type","aria-label","lang","aria-keyshortcuts","aria-expanded","aria-controls"];function x({name:o,make:s,buttonProps:n,icon:r,label:u,tip:c}){const l=v(null),[m]=y(()=>{const e=document.createElement("span");return e.style.display="contents",e}),[a,k]=y(null),f=v(n.onClick);return f.current=n.onClick,g(()=>{const e=l.current;if(!e)return;const t=s({name:o,label:u,icon:m});if(!(t instanceof HTMLElement)){console.warn(`controlButtons.${o} returned no element; Clover's own is not drawn either.`);return}const i=t.matches("button")?t:t.querySelector("button")??t,b=h=>{var p;return(p=f.current)==null?void 0:p.call(f,h)};return i.addEventListener("click",b),e.after(t),k(i),()=>{i.removeEventListener("click",b),t.remove(),k(null)}},[s]),g(()=>{if(!a)return;const e=n;for(const t of B){const i=e[t];i===void 0?a.removeAttribute(t):a.setAttribute(t,String(i))}}),d(A,{children:[d("span",{ref:l,hidden:true}),w(r,m),a&&w(c,a)]})}export{D as toControlButtons};
1
+ import{u as d,A as v,d as y,_ as g,$ as w,k as A}from"./shared-BtCBrxx9.mjs";const E=new Map;function D(o){if(!o||typeof o!="object")return;const s={};for(const[n,r]of Object.entries(o)){if(typeof r!="function")continue;const u=E.get(n)??new WeakMap;E.set(n,u);let c=u.get(r);c||(c=l=>d(x,{...l,name:n,make:r}),u.set(r,c)),s[n]=c}return s}const B=["id","type","aria-label","lang","aria-keyshortcuts","aria-expanded","aria-controls"];function x({name:o,make:s,buttonProps:n,icon:r,label:u,tip:c}){const l=v(null),[m]=y(()=>{const e=document.createElement("span");return e.style.display="contents",e}),[a,k]=y(null),f=v(n.onClick);return f.current=n.onClick,g(()=>{const e=l.current;if(!e)return;const t=s({name:o,label:u,icon:m});if(!(t instanceof HTMLElement)){console.warn(`controlButtons.${o} returned no element; Clover's own is not drawn either.`);return}const i=t.matches("button")?t:t.querySelector("button")??t,b=h=>{var p;return(p=f.current)==null?void 0:p.call(f,h)};return i.addEventListener("click",b),e.after(t),k(i),()=>{i.removeEventListener("click",b),t.remove(),k(null)}},[s]),g(()=>{if(!a)return;const e=n;for(const t of B){const i=e[t];i===void 0?a.removeAttribute(t):a.setAttribute(t,String(i))}}),d(A,{children:[d("span",{ref:l,hidden:true}),w(r,m),a&&w(c,a)]})}export{D as toControlButtons};
@@ -682,6 +682,14 @@
682
682
  "description": "The line under an item's label, where it has one (a Collection's members do): its summary, its navDate, or none.",
683
683
  "default": "summary"
684
684
  },
685
+ {
686
+ "name": "labels",
687
+ "type": {
688
+ "text": "boolean"
689
+ },
690
+ "description": "Show each item's label, and the line under it, beside its picture. false shows the pictures alone, the labels hidden from sight but kept as each item's name for assistive technology.",
691
+ "default": "true"
692
+ },
685
693
  {
686
694
  "name": "size",
687
695
  "type": {
@@ -1812,6 +1820,13 @@
1812
1820
  "description": "Zoom with the wheel or a trackpad, which can trap the page's scroll.",
1813
1821
  "default": "false"
1814
1822
  },
1823
+ {
1824
+ "name": "zoom",
1825
+ "type": {
1826
+ "text": "number"
1827
+ },
1828
+ "description": "How close it frames its places: a lone point at this zoom, several no closer. 8 for a point and 12 for several by default; 15 shows a point's streets."
1829
+ },
1815
1830
  {
1816
1831
  "name": "credits",
1817
1832
  "type": {
@@ -2039,6 +2054,13 @@
2039
2054
  "text": "string"
2040
2055
  },
2041
2056
  "description": "The id of what it shows and hides."
2057
+ },
2058
+ {
2059
+ "name": "side",
2060
+ "type": {
2061
+ "text": "\"start\" | \"end\""
2062
+ },
2063
+ "description": "The side of the Body the panel is on: end (the default) or start. Among the Body's controls it keeps that side's top corner, and its glyph draws the panel there."
2042
2064
  }
2043
2065
  ],
2044
2066
  "members": [],
@@ -1 +1 @@
1
- import{e as i,c as f,n as d,S as u,t as g,Y as h}from"./shared-CCg1Iag8.mjs";function c(s,t){const e=new Set,a=[];for(const r of s)for(const n of u(r==null?void 0:r.rendering)){const o=(n==null?void 0:n.id)??(n==null?void 0:n["@id"]);if(typeof o!="string"||e.has(o))continue;e.add(o);const l=g(n.label,t);a.push({id:o,label:l.text||n.format||o,lang:l.text?l.lang:void 0,format:n.format,hrefLang:h(n)})}return a}function p(){const{language:s}=i("Download"),t=f(a=>a.manifest),e=f(a=>d(a.manifest,a.canvasId));return{page:c(e,s),all:c([t],s)}}export{p as u};
1
+ import{e as i,c as f,n as d,S as u,t as g,Y as h}from"./shared-BtCBrxx9.mjs";function c(s,t){const e=new Set,a=[];for(const r of s)for(const n of u(r==null?void 0:r.rendering)){const o=(n==null?void 0:n.id)??(n==null?void 0:n["@id"]);if(typeof o!="string"||e.has(o))continue;e.add(o);const l=g(n.label,t);a.push({id:o,label:l.text||n.format||o,lang:l.text?l.lang:void 0,format:n.format,hrefLang:h(n)})}return a}function p(){const{language:s}=i("Download"),t=f(a=>a.manifest),e=f(a=>d(a.manifest,a.canvasId));return{page:c(e,s),all:c([t],s)}}export{p as u};
@@ -1 +1 @@
1
- import{g as _}from"./viewer-D2lGdifc.mjs";const k=1/3,Y=.5,P=8,z="translate 240ms cubic-bezier(0.16, 1, 0.3, 1)",D=[120,_],A="cubic-bezier(0.33, 0.67, 0.67, 1)",E=new WeakMap;function O(t,n){let o=null,i="idle",a=0,S=0,s=0,d=1,e=1,c=[];const f=()=>{var r;return[t,(r=n.current.alongside)==null?void 0:r.current]},M=r=>{if(r.pointerType==="mouse"||!r.isPrimary||!n.current.enabled)return;o=r.pointerId,i="pending",a=r.clientX,S=r.clientY,s=0,d=t.getBoundingClientRect().width||1;const p=getComputedStyle(t).direction==="rtl";e=n.current.side==="end"!==p?1:-1,c=[[r.timeStamp,0]]},$=r=>{var h,v;if(r.pointerId!==o||i==="idle"||i==="scroll")return;const p=(r.clientX-a)*e,y=r.clientY-S;if(i==="pending"){if(Math.abs(y)>P&&Math.abs(y)>Math.abs(p)){i="scroll";return}if(p<P)return;i="drag",a=r.clientX,c=[[r.timeStamp,0]];try{(h=t.setPointerCapture)==null||h.call(t,r.pointerId)}catch{}u(f(),void 0,"none")}s=Math.max(0,(r.clientX-a)*e),u(f(),`${s*e}px 0`);const g=(v=n.current.scrim)==null?void 0:v.current;g&&(g.style.transition="none",g.style.opacity=String(1-s/d)),c.push([r.timeStamp,s]),c.length>5&&c.shift(),r.preventDefault()},m=r=>{var X,C,T;if(r.pointerId!==o)return;const p=i==="drag";if(i="idle",o=null,!p)return;t.addEventListener("click",b,{capture:true,once:true}),setTimeout(()=>t.removeEventListener("click",b,true),0);const[y,g]=c[0],[h,v]=c[c.length-1],I=h>y?(v-g)/(h-y):0,l=(X=n.current.scrim)==null?void 0:X.current,L=(C=window.matchMedia)==null?void 0:C.call(window,"(prefers-reduced-motion: reduce)").matches;if(s>d*k||I>Y){const x=L?0:Math.min(D[1],Math.max(D[0],2*(d-s)/Math.max(I,.001))),w=`${x}ms ${A}`;if(l&&(l.style.transition=`opacity ${w}`,l.style.opacity="0"),n.current.exits){u(f(),`${d*e}px 0`,`translate ${w}`),setTimeout(()=>n.current.onClose(),x);return}t.style.transition="none",t.style.translate="",t.style.transform=`translateX(${s*e}px)`,t.getBoundingClientRect(),t.style.transition=`transform ${w}`,t.style.transform=`var(--clover-template-out, translateX(${e*100}%))`,u([(T=n.current.alongside)==null?void 0:T.current],`${d*e}px 0`,`translate ${w}`),E.set(t,setTimeout(()=>R(t,n),x)),n.current.onClose();return}u(f(),"",L?"none":z),l&&(l.style.transition=L?"none":"opacity 240ms ease",l.style.opacity=""),setTimeout(()=>{i==="idle"&&!E.has(t)&&u(f(),void 0,"")},240)},b=r=>{r.stopPropagation(),r.preventDefault()};return t.addEventListener("pointerdown",M),t.addEventListener("pointermove",$,{passive:false}),t.addEventListener("pointerup",m),t.addEventListener("pointercancel",m),()=>{t.removeEventListener("pointerdown",M),t.removeEventListener("pointermove",$),t.removeEventListener("pointerup",m),t.removeEventListener("pointercancel",m)}}function F(t,n){E.has(t)&&!n.current.enabled||R(t,n)}function R(t,n){var i,a;clearTimeout(E.get(t)),E.delete(t),u([t,(i=n.current.alongside)==null?void 0:i.current],"",""),t.style.transform="";const o=(a=n.current.scrim)==null?void 0:a.current;o&&(o.style.opacity="",o.style.transition="")}function u(t,n,o){for(const i of t)i&&(o!==void 0&&(i.style.transition=o),n!==void 0&&(i.style.translate=n))}export{O as attach,F as reset};
1
+ import{g as _}from"./viewer-C-eGBKAn.mjs";const k=1/3,Y=.5,P=8,z="translate 240ms cubic-bezier(0.16, 1, 0.3, 1)",D=[120,_],A="cubic-bezier(0.33, 0.67, 0.67, 1)",E=new WeakMap;function O(t,n){let o=null,i="idle",a=0,S=0,s=0,d=1,e=1,c=[];const f=()=>{var r;return[t,(r=n.current.alongside)==null?void 0:r.current]},M=r=>{if(r.pointerType==="mouse"||!r.isPrimary||!n.current.enabled)return;o=r.pointerId,i="pending",a=r.clientX,S=r.clientY,s=0,d=t.getBoundingClientRect().width||1;const p=getComputedStyle(t).direction==="rtl";e=n.current.side==="end"!==p?1:-1,c=[[r.timeStamp,0]]},$=r=>{var h,v;if(r.pointerId!==o||i==="idle"||i==="scroll")return;const p=(r.clientX-a)*e,y=r.clientY-S;if(i==="pending"){if(Math.abs(y)>P&&Math.abs(y)>Math.abs(p)){i="scroll";return}if(p<P)return;i="drag",a=r.clientX,c=[[r.timeStamp,0]];try{(h=t.setPointerCapture)==null||h.call(t,r.pointerId)}catch{}u(f(),void 0,"none")}s=Math.max(0,(r.clientX-a)*e),u(f(),`${s*e}px 0`);const g=(v=n.current.scrim)==null?void 0:v.current;g&&(g.style.transition="none",g.style.opacity=String(1-s/d)),c.push([r.timeStamp,s]),c.length>5&&c.shift(),r.preventDefault()},m=r=>{var X,C,T;if(r.pointerId!==o)return;const p=i==="drag";if(i="idle",o=null,!p)return;t.addEventListener("click",b,{capture:true,once:true}),setTimeout(()=>t.removeEventListener("click",b,true),0);const[y,g]=c[0],[h,v]=c[c.length-1],I=h>y?(v-g)/(h-y):0,l=(X=n.current.scrim)==null?void 0:X.current,L=(C=window.matchMedia)==null?void 0:C.call(window,"(prefers-reduced-motion: reduce)").matches;if(s>d*k||I>Y){const x=L?0:Math.min(D[1],Math.max(D[0],2*(d-s)/Math.max(I,.001))),w=`${x}ms ${A}`;if(l&&(l.style.transition=`opacity ${w}`,l.style.opacity="0"),n.current.exits){u(f(),`${d*e}px 0`,`translate ${w}`),setTimeout(()=>n.current.onClose(),x);return}t.style.transition="none",t.style.translate="",t.style.transform=`translateX(${s*e}px)`,t.getBoundingClientRect(),t.style.transition=`transform ${w}`,t.style.transform=`var(--clover-template-out, translateX(${e*100}%))`,u([(T=n.current.alongside)==null?void 0:T.current],`${d*e}px 0`,`translate ${w}`),E.set(t,setTimeout(()=>R(t,n),x)),n.current.onClose();return}u(f(),"",L?"none":z),l&&(l.style.transition=L?"none":"opacity 240ms ease",l.style.opacity=""),setTimeout(()=>{i==="idle"&&!E.has(t)&&u(f(),void 0,"")},240)},b=r=>{r.stopPropagation(),r.preventDefault()};return t.addEventListener("pointerdown",M),t.addEventListener("pointermove",$,{passive:false}),t.addEventListener("pointerup",m),t.addEventListener("pointercancel",m),()=>{t.removeEventListener("pointerdown",M),t.removeEventListener("pointermove",$),t.removeEventListener("pointerup",m),t.removeEventListener("pointercancel",m)}}function F(t,n){E.has(t)&&!n.current.enabled||R(t,n)}function R(t,n){var i,a;clearTimeout(E.get(t)),E.delete(t),u([t,(i=n.current.alongside)==null?void 0:i.current],"",""),t.style.transform="";const o=(a=n.current.scrim)==null?void 0:a.current;o&&(o.style.opacity="",o.style.transition="")}function u(t,n,o){for(const i of t)i&&(o!==void 0&&(i.style.transition=o),n!==void 0&&(i.style.translate=n))}export{O as attach,F as reset};
@@ -1,4 +1,4 @@
1
- import{a0 as jc}from"./shared-CCg1Iag8.mjs";import{F as eu,c as tu,i as nu,M as iu}from"./models-pO77sm3z.mjs";/**
1
+ import{a0 as jc}from"./shared-BtCBrxx9.mjs";import{F as eu,c as tu,i as nu,M as iu}from"./models-qg8TrXAe.mjs";/**
2
2
  * @license
3
3
  * Copyright 2010-2026 Three.js Authors
4
4
  * SPDX-License-Identifier: MIT
@@ -1 +1 @@
1
- const r=Symbol.for("@nulib/clover/scene-engines"),o=globalThis,c=o[r]??(o[r]=new Map);function s(e,n){c.set(e,n)}const t=()=>import("./cloverEngine-CFL1Bd7n.mjs");let i=false;function l(e="clover"){if(e==="clover")return t;const n=c.get(e);return n||(i||(i=true,console.warn(`Clover: no Scene engine "${e}"; drawing with Clover's.`)),t)}export{l as e,s as r};
1
+ const r=Symbol.for("@nulib/clover/scene-engines"),o=globalThis,c=o[r]??(o[r]=new Map);function s(e,n){c.set(e,n)}const t=()=>import("./cloverEngine-CQIuzG6M.mjs");let i=false;function l(e="clover"){if(e==="clover")return t;const n=c.get(e);return n||(i||(i=true,console.warn(`Clover: no Scene engine "${e}"; drawing with Clover's.`)),t)}export{l as e,s as r};
@@ -1 +1 @@
1
- import{S as h,a7 as m,a8 as x,aq as I}from"./shared-CCg1Iag8.mjs";import{b as q}from"./imageService-DFPkPNfe.mjs";function k(e,i,n){for(const s of h(e==null?void 0:e.items))for(const o of h(s==null?void 0:s.items)){if(!m(o))continue;const l=h(o==null?void 0:o.body).flatMap(t=>(t==null?void 0:t.type)==="Choice"?h(t.items).filter((r,f)=>n?(r==null?void 0:r.id)===n:f===0):n&&(t==null?void 0:t.id)!==n?[]:[t]);for(const t of l){if((t==null?void 0:t.type)!=="Image"||!t.width||!t.height)continue;const r=q(t.service);if(!r)continue;const f=x(h(o.target)[0]).rect??{x:0,y:0,w:e.width,h:e.height},a=(i.x-f.x)/f.w,c=(i.y-f.y)/f.h,u=Math.max(0,a),p=Math.max(0,c),M=Math.min(1,a+i.w/f.w)-u,g=Math.min(1,c+i.h/f.h)-p;if(M>0&&g>0)return{service:r,region:{x:u,y:p,width:M,height:g}}}}return null}const w=new WeakMap;function C(e,i){let n=w.get(e);n||w.set(e,n=new Map);let s=n.get(i);return s||(s=I({id:i,type:"Manifest"},{request:e.request}).catch(()=>null),n.set(i,s)),s}export{C as f,k as r};
1
+ import{S as h,a7 as m,a8 as x,aq as I}from"./shared-BtCBrxx9.mjs";import{b as q}from"./imageService-Dhb-E5rq.mjs";function k(e,i,n){for(const s of h(e==null?void 0:e.items))for(const o of h(s==null?void 0:s.items)){if(!m(o))continue;const l=h(o==null?void 0:o.body).flatMap(t=>(t==null?void 0:t.type)==="Choice"?h(t.items).filter((r,f)=>n?(r==null?void 0:r.id)===n:f===0):n&&(t==null?void 0:t.id)!==n?[]:[t]);for(const t of l){if((t==null?void 0:t.type)!=="Image"||!t.width||!t.height)continue;const r=q(t.service);if(!r)continue;const f=x(h(o.target)[0]).rect??{x:0,y:0,w:e.width,h:e.height},a=(i.x-f.x)/f.w,c=(i.y-f.y)/f.h,u=Math.max(0,a),p=Math.max(0,c),M=Math.min(1,a+i.w/f.w)-u,g=Math.min(1,c+i.h/f.h)-p;if(M>0&&g>0)return{service:r,region:{x:u,y:p,width:M,height:g}}}}return null}const w=new WeakMap;function C(e,i){let n=w.get(e);n||w.set(e,n=new Map);let s=n.get(i);return s||(s=I({id:i,type:"Manifest"},{request:e.request}).catch(()=>null),n.set(i,s)),s}export{C as f,k as r};