@nulib/clover 4.6.0 → 4.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (274) hide show
  1. package/dist/components/Canvas/CanvasView.mjs +18 -4
  2. package/dist/components/Canvas/Connected.mjs +1 -1
  3. package/dist/components/Canvas/LoadedCanvas.mjs +26 -6
  4. package/dist/components/Canvas/Placeholder.mjs +1 -1
  5. package/dist/components/Canvas/media/Player.mjs +2 -2
  6. package/dist/components/CollectionSelect/CollectionSelect.mjs +6 -4
  7. package/dist/components/Items/Items.mjs +2 -5
  8. package/dist/components/Items/Position.mjs +2 -5
  9. package/dist/components/Items/StandaloneItems.mjs +6 -0
  10. package/dist/components/Map/MapView.mjs +2 -8
  11. package/dist/components/Root/useRootState.mjs +15 -14
  12. package/dist/components/Scene/Loaded.mjs +5 -1
  13. package/dist/core/clover.mjs +38 -10
  14. package/dist/core/geo.mjs +5 -4
  15. package/dist/core/selectors.mjs +7 -1
  16. package/dist/index.d.mts +14 -2
  17. package/dist/lib/renderer/CanvasRenderer.mjs +4 -3
  18. package/dist/map/index.d.mts +2 -1
  19. package/dist/ui/EntryThumbnail.mjs +6 -3
  20. package/dist/web-components/About-I4h1cfup.mjs +1 -0
  21. package/dist/web-components/AnnotationItems-BfQm1YRD.mjs +1 -0
  22. package/dist/web-components/{AnnotationMenu-4PN2LNP-.mjs → AnnotationMenu-guk9SbaL.mjs} +1 -1
  23. package/dist/web-components/{AnnotationState-3KHHmQhl.mjs → AnnotationState-BX7xh-bd.mjs} +1 -1
  24. package/dist/web-components/{Annotations-BwKS6fG8.mjs → Annotations-BJrje3Ey.mjs} +1 -1
  25. package/dist/web-components/{Annotations-CPUvoKJe.mjs → Annotations-DBxLDLDf.mjs} +1 -1
  26. package/dist/web-components/{Body-CTzmxY8R.mjs → Body-CQuiRv9p.mjs} +1 -1
  27. package/dist/web-components/{BodyAlert-CXOxbNBE.mjs → BodyAlert-DF9rnG5o.mjs} +1 -1
  28. package/dist/web-components/{Button-a59NBnOp.mjs → Button-qhI73GCI.mjs} +1 -1
  29. package/dist/web-components/{Camera-BlbXBgYZ.mjs → Camera-D2MnETlC.mjs} +1 -1
  30. package/dist/web-components/{Canvas2DBackend-DXCfms6g.mjs → Canvas2DBackend-kJpOk_Pb.mjs} +1 -1
  31. package/dist/web-components/CanvasView-B752g1bm.mjs +2 -0
  32. package/dist/web-components/{CaptionDetails-CCCTWTQP.mjs → CaptionDetails-Cl3fLJfr.mjs} +1 -1
  33. package/dist/web-components/ChaptersMenu-CB4zdVOh.mjs +1 -0
  34. package/dist/web-components/{Chevron-CH8yyEDi.mjs → Chevron-CT1ntI6B.mjs} +1 -1
  35. package/dist/web-components/{ChoiceMenu-BQVTRzXj.mjs → ChoiceMenu-DoXMSLjk.mjs} +1 -1
  36. package/dist/web-components/{Collection-CbEMQWrO.mjs → Collection-B8ipKdPl.mjs} +1 -1
  37. package/dist/web-components/CollectionSelect-C0Tunk6c.mjs +1 -0
  38. package/dist/web-components/{Connected-Dq0xux9o.mjs → Connected-DaP_DgGw.mjs} +1 -1
  39. package/dist/web-components/{Connected-C31vzWei.mjs → Connected-L47VwCva.mjs} +1 -1
  40. package/dist/web-components/Connected-shq2_tc-.mjs +1 -0
  41. package/dist/web-components/{Contents-CGc6_Z5c.mjs → Contents-_u13TaBJ.mjs} +1 -1
  42. package/dist/web-components/{ControlMenu-ej-Kpb31.mjs → ControlMenu-BW39OjKC.mjs} +1 -1
  43. package/dist/web-components/ControlsFade-LFHufW32.mjs +1 -0
  44. package/dist/web-components/{CountMenu-D4M1roIh.mjs → CountMenu-CQ7ThPWJ.mjs} +1 -1
  45. package/dist/web-components/Cue-B1IlY4Ae.mjs +1 -0
  46. package/dist/web-components/{Document-CPQELxSI.mjs → Document-BChOw20c.mjs} +1 -1
  47. package/dist/web-components/{DomLayers-DwhkzPRS.mjs → DomLayers-BIFA6J56.mjs} +1 -1
  48. package/dist/web-components/{Download-Dsei4KG3.mjs → Download-BfZJVu-O.mjs} +1 -1
  49. package/dist/web-components/{EntryBodies-BI7V3B5i.mjs → EntryBodies-Bld2RXeE.mjs} +1 -1
  50. package/dist/web-components/EntryThumbnail-C5df3CaH.mjs +1 -0
  51. package/dist/web-components/{FieldPill-BOeOasUT.mjs → FieldPill-Dx--yBoK.mjs} +1 -1
  52. package/dist/web-components/FrameAnimation-CpniJMTK.mjs +1 -0
  53. package/dist/web-components/{Gallery-BDGDzt0R.mjs → Gallery-CkaSdVAP.mjs} +1 -1
  54. package/dist/web-components/{GlobeGlyph-9zKXX7B6.mjs → GlobeGlyph-CCi1sZgm.mjs} +1 -1
  55. package/dist/web-components/{HideToggle-CmwFnHcZ.mjs → HideToggle-nvJtMFOZ.mjs} +1 -1
  56. package/dist/web-components/{ImageControls-CSHxdUD1.mjs → ImageControls-Df-M7F2R.mjs} +1 -1
  57. package/dist/web-components/Items-BsKByN_b.mjs +1 -0
  58. package/dist/web-components/{ItemsVertical-BeIiJ37B.mjs → ItemsVertical-Dmhm1DBy.mjs} +1 -1
  59. package/dist/web-components/Label-DElSTYS5.mjs +1 -0
  60. package/dist/web-components/{LanguageChoice-D_vEiQp9.mjs → LanguageChoice-t55qbd8x.mjs} +1 -1
  61. package/dist/web-components/{LanguageMenu-ycNvnbOB.mjs → LanguageMenu-BlFBWRSO.mjs} +1 -1
  62. package/dist/web-components/{LightboxView-CsOAsZ3f.mjs → LightboxView-BhPao9ao.mjs} +1 -1
  63. package/dist/web-components/{ListEnd-B6tyeK1B.mjs → ListEnd-KSoUQrsM.mjs} +1 -1
  64. package/dist/web-components/Loaded-uGqT3xyD.mjs +1 -0
  65. package/dist/web-components/LoadedCanvas-fqjWHH0H.mjs +3 -0
  66. package/dist/web-components/LoadedMap-BpRHQPoU.mjs +1 -0
  67. package/dist/web-components/{Loading-CAkF1fBT.mjs → Loading-DSaV1vxb.mjs} +1 -1
  68. package/dist/web-components/{Map-BDsBYSp5.mjs → Map-CUY8HEgh.mjs} +1 -1
  69. package/dist/web-components/MapView-DIVMYZZ1.mjs +3 -0
  70. package/dist/web-components/{Markup-COA2t_y1.mjs → Markup-DzUsOaNC.mjs} +1 -1
  71. package/dist/web-components/{MediaBody-CNk9fFfN.mjs → MediaBody-CJELKAWJ.mjs} +1 -1
  72. package/dist/web-components/{MediaBody-XsEObuYV.mjs → MediaBody-CN2ZTxK0.mjs} +1 -1
  73. package/dist/web-components/{NavDate-1LLiZ8Vq.mjs → NavDate-CD3sFxZJ.mjs} +1 -1
  74. package/dist/web-components/{Navigator-t1y35uj8.mjs → Navigator-CVDhe8R_.mjs} +1 -1
  75. package/dist/web-components/{Pager-35N8_3lH.mjs → Pager-BmZaB--9.mjs} +1 -1
  76. package/dist/web-components/PagerLayout-DhIz3hKA.mjs +1 -0
  77. package/dist/web-components/{Panel-D16u98YB.mjs → Panel-CdJyJVBh.mjs} +1 -1
  78. package/dist/web-components/PanelPart-m2QWHh_4.mjs +1 -0
  79. package/dist/web-components/{PanelToggle-BcUVIbQw.mjs → PanelToggle-BqVj7sX0.mjs} +1 -1
  80. package/dist/web-components/PartOfManifest-Dgw1shMM.mjs +1 -0
  81. package/dist/web-components/{Pending-bIYd0PwB.mjs → Pending-CDXsIk5O.mjs} +1 -1
  82. package/dist/web-components/{PlaceBox-D-pLIX5w.mjs → PlaceBox-DNnl9coD.mjs} +1 -1
  83. package/dist/web-components/Placeholder-D8Sabput.mjs +1 -0
  84. package/dist/web-components/Position-oFMJoo4P.mjs +1 -0
  85. package/dist/web-components/{Primitives-DP2uwwcU.mjs → Primitives-BdXIEpYW.mjs} +1 -1
  86. package/dist/web-components/{Provider-BUDzNTyJ.mjs → Provider-DWIlPOzR.mjs} +1 -1
  87. package/dist/web-components/{ReadMore-B6qft77s.mjs → ReadMore-f34RbHMm.mjs} +1 -1
  88. package/dist/web-components/{Root-J9v7nQ6o.mjs → Root-CEtLCE4Y.mjs} +1 -1
  89. package/dist/web-components/Scene-BJE8miZL.mjs +1 -0
  90. package/dist/web-components/{SceneView-DykQJepG.mjs → SceneView-D635_fRV.mjs} +1 -1
  91. package/dist/web-components/{Search-DEoFdx2g.mjs → Search-219u7M8o.mjs} +1 -1
  92. package/dist/web-components/{Sections-B6j9eFao.mjs → Sections-C3fPhGNx.mjs} +1 -1
  93. package/dist/web-components/{SeekMarks-C3ZDOMbt.mjs → SeekMarks-Ds8v3SaW.mjs} +1 -1
  94. package/dist/web-components/StandaloneItems-Mdh-k3w9.mjs +1 -0
  95. package/dist/web-components/{Status-C49DxNaY.mjs → Status-CEkhPlDF.mjs} +1 -1
  96. package/dist/web-components/{Steps-BTAJ3lc6.mjs → Steps-BoNd47eB.mjs} +1 -1
  97. package/dist/web-components/{TargetItems-BZFSWVs6.mjs → TargetItems-dFjJs-VP.mjs} +1 -1
  98. package/dist/web-components/Timeline-DPdS6bYG.mjs +1 -0
  99. package/dist/web-components/{Tip-Dv-gYN8n.mjs → Tip-mcI7IRQh.mjs} +1 -1
  100. package/dist/web-components/{Transcript-FmC6HR0-.mjs → Transcript-5wVgmZmU.mjs} +1 -1
  101. package/dist/web-components/{Transport-BKFLjI45.mjs → Transport-DYjd2GnA.mjs} +1 -1
  102. package/dist/web-components/{Transport-pRWbs9M3.mjs → Transport-DdNRlSa0.mjs} +1 -1
  103. package/dist/web-components/{annotation-collection-Dc-peX7w.mjs → annotation-collection-C3UpNV1K.mjs} +1 -1
  104. package/dist/web-components/{annotation-name-BhbhOgES.mjs → annotation-name-DhMF4ZHj.mjs} +1 -1
  105. package/dist/web-components/{annotations-content-BJSUCNd1.mjs → annotations-content-CuWJZr4t.mjs} +1 -1
  106. package/dist/web-components/{body-BEZ3sYcR.mjs → body-Bym9Uvav.mjs} +1 -1
  107. package/dist/web-components/canvas-BIXBggVo.mjs +1 -0
  108. package/dist/web-components/{cloverEngine-BstElW9l.mjs → cloverEngine-BEdb3g52.mjs} +1 -1
  109. package/dist/web-components/{content-state-reader-DGOg8oAH.mjs → content-state-reader-BGZEChSM.mjs} +1 -1
  110. package/dist/web-components/{controlGlyphs-Lxfq7zz4.mjs → controlGlyphs-DMQCxKaT.mjs} +1 -1
  111. package/dist/web-components/{controls-BibZpBh1.mjs → controls-B1pIwRgH.mjs} +1 -1
  112. package/dist/web-components/{downloads-cYib41PV.mjs → downloads-DwzBIS-9.mjs} +1 -1
  113. package/dist/web-components/{dragToClose-BpzjNnPx.mjs → dragToClose-BYUJ9qgo.mjs} +1 -1
  114. package/dist/web-components/{engine-Cl755NaO.mjs → engine-DUv-Syum.mjs} +1 -1
  115. package/dist/web-components/{engines-fZzYf1dz.mjs → engines-BzM_oBU_.mjs} +1 -1
  116. package/dist/web-components/{fetchManifest-D31pEPrb.mjs → fetchManifest-Cp7c8vs5.mjs} +1 -1
  117. package/dist/web-components/{follow-content-Byosc3Ev.mjs → follow-content-CmXq05TW.mjs} +1 -1
  118. package/dist/web-components/{fromManifest-DqCyZd2Q.mjs → fromManifest-DbgwTeBo.mjs} +1 -1
  119. package/dist/web-components/{glyphs-8fjIPAtZ.mjs → glyphs-atKuagcd.mjs} +1 -1
  120. package/dist/web-components/{hooks-Bo5GjPGX.mjs → hooks-DhTYPPVG.mjs} +1 -1
  121. package/dist/web-components/image-layers-CoBPhMZw.mjs +1 -0
  122. package/dist/web-components/{image-service-content-bUFBZCr1.mjs → image-service-content-CL_EZugL.mjs} +1 -1
  123. package/dist/web-components/{imageService-CCKieCxo.mjs → imageService-BoQQvo1U.mjs} +1 -1
  124. package/dist/web-components/{index-DhlRi3H9.mjs → index-Ciz5x8Tt.mjs} +1 -1
  125. package/dist/web-components/index.mjs +1 -1
  126. package/dist/web-components/{items-CKMFXz0W.mjs → items-CjtUJjSU.mjs} +1 -1
  127. package/dist/web-components/items-DiQ3K5TV.mjs +1 -0
  128. package/dist/web-components/label-CKgFcOzZ.mjs +1 -0
  129. package/dist/web-components/{layout-DQtgCOJJ.mjs → layout-zjkkOHIj.mjs} +1 -1
  130. package/dist/web-components/{link-q4quIuuD.mjs → link-CrNaByf-.mjs} +1 -1
  131. package/dist/web-components/logo-C2xm9WAL.mjs +1 -0
  132. package/dist/web-components/{models-Dw-cADIz.mjs → models-BFKa5v_H.mjs} +1 -1
  133. package/dist/web-components/{nodes-nZmQ93ib.mjs → nodes-BDyXzQhk.mjs} +1 -1
  134. package/dist/web-components/{overlayImage-B-ybt0wn.mjs → overlayImage-BGxovfPN.mjs} +1 -1
  135. package/dist/web-components/{panel-C27fOmhT.mjs → panel-rEGhe5fL.mjs} +1 -1
  136. package/dist/web-components/part-PF-s_vD-.mjs +1 -0
  137. package/dist/web-components/{playerSurface-BLzwC0Ux.mjs → playerSurface-BthXi9l2.mjs} +1 -1
  138. package/dist/web-components/{pointer-BYZjBehK.mjs → pointer-C22ufJ5w.mjs} +1 -1
  139. package/dist/web-components/{provider-Cs6sFr4G.mjs → provider-B2C3eH9p.mjs} +1 -1
  140. package/dist/web-components/{range-regions-DssQTTra.mjs → range-regions-Ytq4QkMX.mjs} +1 -1
  141. package/dist/web-components/{read-more-Cp9CLzyd.mjs → read-more-B7LHzF4-.mjs} +1 -1
  142. package/dist/web-components/{readingLanguages-D97yt-4s.mjs → readingLanguages-B20n_dkw.mjs} +1 -1
  143. package/dist/web-components/{rendererSurface-BuBm8Th_.mjs → rendererSurface-BfZP5clN.mjs} +2 -2
  144. package/dist/web-components/{renderers-BL-b8snn.mjs → renderers-C569MeQB.mjs} +1 -1
  145. package/dist/web-components/{resource-DwKOZbOZ.mjs → resource-C5cMic8z.mjs} +1 -1
  146. package/dist/web-components/{save-file-CcfAgDXf.mjs → save-file-DsYdCZpi.mjs} +1 -1
  147. package/dist/web-components/{search-C45Jd7QH.mjs → search-kJ_71fbN.mjs} +1 -1
  148. package/dist/web-components/shared-ByrLMUQa.mjs +1 -0
  149. package/dist/web-components/{show-link-D9bByIzf.mjs → show-link-BqrJDDMV.mjs} +1 -1
  150. package/dist/web-components/{sizedImage-BFAry04f.mjs → sizedImage-CyCf0GtL.mjs} +1 -1
  151. package/dist/web-components/{split-CDZiE4rz.mjs → split-BZRKCI3g.mjs} +1 -1
  152. package/dist/web-components/{status-BtCciELI.mjs → status-CwO2mygB.mjs} +1 -1
  153. package/dist/web-components/{styles-Bf3qmdsh.mjs → styles-BOXm_R8o.mjs} +1 -1
  154. package/dist/web-components/three.mjs +1 -1
  155. package/dist/web-components/thumbnail-Np4ftjUo.mjs +1 -0
  156. package/dist/web-components/{tip-_XUeFMj4.mjs → tip-CNyxI6xd.mjs} +1 -1
  157. package/dist/web-components/{toggle-DkPNS5eL.mjs → toggle-lop2se80.mjs} +1 -1
  158. package/dist/web-components/{useContainerName-BfU0IozO.mjs → useContainerName-DR_6TyDU.mjs} +1 -1
  159. package/dist/web-components/{useControlsVisibility-pU1JVIpK.mjs → useControlsVisibility-Dig_1-0T.mjs} +1 -1
  160. package/dist/web-components/{useNearViewport-D1kQt-tS.mjs → useNearViewport-B_kjW0WB.mjs} +1 -1
  161. package/dist/web-components/{useScrollTrack-cQfG_zk_.mjs → useScrollTrack-6BV6IizZ.mjs} +1 -1
  162. package/dist/web-components/viewer/{AnnotationItems-UHFS1uDO.mjs → AnnotationItems-BDFH_6F_.mjs} +1 -1
  163. package/dist/web-components/viewer/{AnnotationMenu-0Ru0csCz.mjs → AnnotationMenu-BHCrJoNx.mjs} +1 -1
  164. package/dist/web-components/viewer/{AnnotationState-hEds2Tpa.mjs → AnnotationState-BV0fzlj8.mjs} +1 -1
  165. package/dist/web-components/viewer/{Annotations-Oprg7015.mjs → Annotations-BhA_Bbyj.mjs} +1 -1
  166. package/dist/web-components/viewer/{Annotations-vzP6-fS4.mjs → Annotations-DEqkGlE1.mjs} +1 -1
  167. package/dist/web-components/viewer/{Canvas2DBackend-3b5xEKac.mjs → Canvas2DBackend-Bq_bo1mL.mjs} +1 -1
  168. package/dist/web-components/viewer/{CaptionDetails-DDIjm-rC.mjs → CaptionDetails-D6Gd_EGS.mjs} +1 -1
  169. package/dist/web-components/viewer/ChaptersMenu-DE2TFesS.mjs +1 -0
  170. package/dist/web-components/viewer/{ChoiceMenu-COUDRKGM.mjs → ChoiceMenu-BVlpPUhr.mjs} +1 -1
  171. package/dist/web-components/viewer/{Collection-kWUradiW.mjs → Collection-DIgmeOCD.mjs} +1 -1
  172. package/dist/web-components/viewer/{Connected-B2TrgX9-.mjs → Connected-7TgFouaR.mjs} +1 -1
  173. package/dist/web-components/viewer/{Connected-FiJKHEv9.mjs → Connected-D9dz_v1p.mjs} +1 -1
  174. package/dist/web-components/viewer/{Contents-DHyzbjco.mjs → Contents-ROI1iuuR.mjs} +1 -1
  175. package/dist/web-components/viewer/{ControlMenu-DWi6tgKb.mjs → ControlMenu-CZlN7x0D.mjs} +1 -1
  176. package/dist/web-components/viewer/ControlsFade-QEgqI3wY.mjs +1 -0
  177. package/dist/web-components/viewer/{CountMenu-BYU6T0Ou.mjs → CountMenu-CCEH_rEu.mjs} +1 -1
  178. package/dist/web-components/viewer/{Cue-Ct2isFl7.mjs → Cue-CLbO9g2X.mjs} +1 -1
  179. package/dist/web-components/viewer/{Document-BtN3vmsO.mjs → Document-8ADB98RM.mjs} +1 -1
  180. package/dist/web-components/viewer/{DomLayers-CEzVM7HQ.mjs → DomLayers-BXPbPq1a.mjs} +1 -1
  181. package/dist/web-components/viewer/{Download-5BsnDZLL.mjs → Download-YfjzAcAF.mjs} +1 -1
  182. package/dist/web-components/viewer/{EntryBodies-D9R-wouw.mjs → EntryBodies-B2DBmUYl.mjs} +1 -1
  183. package/dist/web-components/viewer/EntryThumbnail-B2cRaP5D.mjs +1 -0
  184. package/dist/web-components/viewer/{FieldPill-CsyRt9Xh.mjs → FieldPill-C7o8586T.mjs} +1 -1
  185. package/dist/web-components/viewer/{FrameAnimation-f4RKtdpP.mjs → FrameAnimation-CytZC2Lx.mjs} +1 -1
  186. package/dist/web-components/viewer/{Gallery-DC4QY9lG.mjs → Gallery-CQma5dBZ.mjs} +1 -1
  187. package/dist/web-components/viewer/{GlobeGlyph-BwZm2Ffj.mjs → GlobeGlyph-UxhwZJy1.mjs} +1 -1
  188. package/dist/web-components/viewer/{HideToggle-BD6zlrz3.mjs → HideToggle-DZMCACLG.mjs} +1 -1
  189. package/dist/web-components/viewer/{ImageControls-Bw9a17cS.mjs → ImageControls-fzFWqFVh.mjs} +1 -1
  190. package/dist/web-components/viewer/{LanguageChoice-CcDmpHnE.mjs → LanguageChoice-B8F2WhUM.mjs} +1 -1
  191. package/dist/web-components/viewer/{LanguageMenu-CRtM-mLy.mjs → LanguageMenu-BIpATvd4.mjs} +1 -1
  192. package/dist/web-components/viewer/{LightboxView-DJoH23fL.mjs → LightboxView-D-6yYXCc.mjs} +1 -1
  193. package/dist/web-components/viewer/{ListEnd-CSp0KGGZ.mjs → ListEnd-DhrDIRKM.mjs} +1 -1
  194. package/dist/web-components/viewer/MapView-XFUp4DVX.mjs +3 -0
  195. package/dist/web-components/viewer/{MediaBody-CMddJWMF.mjs → MediaBody-C3fVbzuD.mjs} +1 -1
  196. package/dist/web-components/viewer/{NavDate-BJ_MF_t1.mjs → NavDate-B47wyKdc.mjs} +1 -1
  197. package/dist/web-components/viewer/{Navigator-Gt56cM6f.mjs → Navigator-BqNBxE5l.mjs} +1 -1
  198. package/dist/web-components/viewer/{PagerLayout-BMrlMLfO.mjs → PagerLayout-DKdFxLZ1.mjs} +1 -1
  199. package/dist/web-components/viewer/PanelPart-CuddftmQ.mjs +1 -0
  200. package/dist/web-components/viewer/{PartOfManifest-BdZWbAQI.mjs → PartOfManifest-DF40jLNB.mjs} +1 -1
  201. package/dist/web-components/viewer/{PlaceBox-C27N2KG8.mjs → PlaceBox-Bi1inmQv.mjs} +1 -1
  202. package/dist/web-components/viewer/{Placeholder-BX2y25Fo.mjs → Placeholder-BhAzmG0d.mjs} +1 -1
  203. package/dist/web-components/viewer/{Search-auUpOyeS.mjs → Search-CTkCx-SZ.mjs} +1 -1
  204. package/dist/web-components/viewer/{SeekMarks-Bg0PLdp0.mjs → SeekMarks-8NvVfr4F.mjs} +1 -1
  205. package/dist/web-components/viewer/StandaloneItems-P1ygiZtX.mjs +1 -0
  206. package/dist/web-components/viewer/{Steps-ABKs2V_m.mjs → Steps-DwqiM7sH.mjs} +1 -1
  207. package/dist/web-components/viewer/{TargetItems-BQVUKMAs.mjs → TargetItems-B873PbFR.mjs} +1 -1
  208. package/dist/web-components/viewer/{Transcript-DaShc1z-.mjs → Transcript-D7cFMWGk.mjs} +1 -1
  209. package/dist/web-components/viewer/{Transport-ClkPaaOB.mjs → Transport-DPURF464.mjs} +1 -1
  210. package/dist/web-components/viewer/{Transport-6wRUIGiD.mjs → Transport-TvkdinN-.mjs} +1 -1
  211. package/dist/web-components/viewer/{annotation-collection-eyRpE2h4.mjs → annotation-collection-BwY8uYqa.mjs} +1 -1
  212. package/dist/web-components/viewer/{annotation-name-DdchUvJI.mjs → annotation-name-DQMCd2DB.mjs} +1 -1
  213. package/dist/web-components/viewer/{annotations-content-BZXlT3bR.mjs → annotations-content-q11OcPdT.mjs} +1 -1
  214. package/dist/web-components/viewer/{cloverEngine-CZWHXlyY.mjs → cloverEngine-K2HNl3W1.mjs} +1 -1
  215. package/dist/web-components/viewer/{content-state-reader-CDV0Igdx.mjs → content-state-reader-BhDMcVmC.mjs} +1 -1
  216. package/dist/web-components/viewer/{dragToClose-CD-MJb-V.mjs → dragToClose-BFhEkxmf.mjs} +1 -1
  217. package/dist/web-components/viewer/{fetchManifest-C1IEIf45.mjs → fetchManifest-aJRqlL7Q.mjs} +1 -1
  218. package/dist/web-components/viewer/{follow-content-IQqCbvbJ.mjs → follow-content-Cy0flRSN.mjs} +1 -1
  219. package/dist/web-components/viewer/{host-BxQrzQnu.mjs → host-C4OSSUrc.mjs} +1 -1
  220. package/dist/web-components/viewer/{image-layers-DurrQgfL.mjs → image-layers-BmOyugIr.mjs} +1 -1
  221. package/dist/web-components/viewer/{image-service-content-ClAm_g0Y.mjs → image-service-content-BuqFuXBZ.mjs} +1 -1
  222. package/dist/web-components/viewer/index.mjs +1 -1
  223. package/dist/web-components/viewer/{link-Drdj-HcB.mjs → link-BtdcvLLg.mjs} +1 -1
  224. package/dist/web-components/viewer/overlayImage-BOilakHT.mjs +1 -0
  225. package/dist/web-components/viewer/{range-regions-a5eVBfJy.mjs → range-regions-S1HcVfpb.mjs} +1 -1
  226. package/dist/web-components/viewer/{renderers-CdXzZ9As.mjs → renderers-CetbXlHH.mjs} +1 -1
  227. package/dist/web-components/viewer/{save-file-B2UBQRXz.mjs → save-file-BohgaD35.mjs} +1 -1
  228. package/dist/web-components/viewer/{search-BBZKUiMB.mjs → search-C0ZHXQW-.mjs} +1 -1
  229. package/dist/web-components/viewer/{useControlsVisibility-BfTACzo_.mjs → useControlsVisibility-CmA6PMfv.mjs} +1 -1
  230. package/dist/web-components/viewer/viewer-BXbkj7DJ.mjs +29 -0
  231. package/dist/web-components/viewer/{vtt-CCkTp_f2.mjs → vtt-BIJk7HEl.mjs} +1 -1
  232. package/dist/web-components/{viewer-D-AQ7mGw.mjs → viewer-f_6tefcG.mjs} +1 -1
  233. package/dist/web-components/{vtt-BjXkNfI_.mjs → vtt-BRwnCWbJ.mjs} +1 -1
  234. package/package.json +1 -1
  235. package/dist/web-components/About-Brbhm22a.mjs +0 -1
  236. package/dist/web-components/AnnotationItems-Dy4BNabL.mjs +0 -1
  237. package/dist/web-components/CanvasView-CiP25Iqc.mjs +0 -2
  238. package/dist/web-components/ChaptersMenu-Bne6N9cf.mjs +0 -1
  239. package/dist/web-components/CollectionSelect-BpvtCwSl.mjs +0 -1
  240. package/dist/web-components/Connected-BWomgzfE.mjs +0 -1
  241. package/dist/web-components/ControlsFade-CStkqANR.mjs +0 -1
  242. package/dist/web-components/Cue-BhXRUDe9.mjs +0 -1
  243. package/dist/web-components/EntryThumbnail-BnMLzy5M.mjs +0 -1
  244. package/dist/web-components/FrameAnimation-BcEfAQrI.mjs +0 -1
  245. package/dist/web-components/Items-DCRr750U.mjs +0 -1
  246. package/dist/web-components/Label-CVfL9bMO.mjs +0 -1
  247. package/dist/web-components/Loaded-CSYg8oIR.mjs +0 -1
  248. package/dist/web-components/LoadedCanvas-W9sCFkdf.mjs +0 -1
  249. package/dist/web-components/LoadedMap-jx7uEeDg.mjs +0 -1
  250. package/dist/web-components/MapView-DO23FSrT.mjs +0 -3
  251. package/dist/web-components/PagerLayout-SNT5cl4D.mjs +0 -1
  252. package/dist/web-components/PanelPart-DfjlK_hB.mjs +0 -1
  253. package/dist/web-components/PartOfManifest-BYyflVQI.mjs +0 -1
  254. package/dist/web-components/Placeholder-Mq1Iaasr.mjs +0 -1
  255. package/dist/web-components/Position-Bh1Iq4d6.mjs +0 -1
  256. package/dist/web-components/Scene-CdqC1O-B.mjs +0 -1
  257. package/dist/web-components/StandaloneItems-CtxMB090.mjs +0 -1
  258. package/dist/web-components/Timeline-D5oL1UyW.mjs +0 -1
  259. package/dist/web-components/canvas-CfnKZqTU.mjs +0 -1
  260. package/dist/web-components/image-layers-CFarmTfZ.mjs +0 -1
  261. package/dist/web-components/items-BXd02UN6.mjs +0 -1
  262. package/dist/web-components/label-DcF-YCIN.mjs +0 -1
  263. package/dist/web-components/logo-DWI0N9FL.mjs +0 -1
  264. package/dist/web-components/part-B9t8Qe9D.mjs +0 -1
  265. package/dist/web-components/shared-D2pvbPvF.mjs +0 -1
  266. package/dist/web-components/thumbnail-By5wfGlE.mjs +0 -1
  267. package/dist/web-components/viewer/ChaptersMenu-DmJy-cfd.mjs +0 -1
  268. package/dist/web-components/viewer/ControlsFade-CuooJOpa.mjs +0 -1
  269. package/dist/web-components/viewer/EntryThumbnail-P6CmjmO9.mjs +0 -1
  270. package/dist/web-components/viewer/MapView-BO2ppZpW.mjs +0 -3
  271. package/dist/web-components/viewer/PanelPart-CaxBca8z.mjs +0 -1
  272. package/dist/web-components/viewer/StandaloneItems-CBRWUCNf.mjs +0 -1
  273. package/dist/web-components/viewer/overlayImage-CDT5ohRo.mjs +0 -1
  274. package/dist/web-components/viewer/viewer-BrkFZVo_.mjs +0 -29
@@ -1 +1 @@
1
- import{bx as _}from"./viewer-BrkFZVo_.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 g,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{(g=t.setPointerCapture)==null||g.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 h=(v=n.current.scrim)==null?void 0:v.current;h&&(h.style.transition="none",h.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,h]=c[0],[g,v]=c[c.length-1],I=g>y?(v-h)/(g-y):0,l=(X=n.current.scrim)==null?void 0:X.current,x=(C=window.matchMedia)==null?void 0:C.call(window,"(prefers-reduced-motion: reduce)").matches;if(s>d*k||I>Y){const L=x?0:Math.min(D[1],Math.max(D[0],2*(d-s)/Math.max(I,.001))),w=`${L}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(),L);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),L)),n.current.onClose();return}u(f(),"",x?"none":z),l&&(l.style.transition=x?"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{bx as _}from"./viewer-BXbkj7DJ.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 g,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{(g=t.setPointerCapture)==null||g.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 h=(v=n.current.scrim)==null?void 0:v.current;h&&(h.style.transition="none",h.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,h]=c[0],[g,v]=c[c.length-1],I=g>y?(v-h)/(g-y):0,l=(X=n.current.scrim)==null?void 0:X.current,x=(C=window.matchMedia)==null?void 0:C.call(window,"(prefers-reduced-motion: reduce)").matches;if(s>d*k||I>Y){const L=x?0:Math.min(D[1],Math.max(D[0],2*(d-s)/Math.max(I,.001))),w=`${L}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(),L);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),L)),n.current.onClose();return}u(f(),"",x?"none":z),l&&(l.style.transition=x?"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 +1 @@
1
- import{az as h,ax as x,bu as m,bv as I,bw as q}from"./viewer-BrkFZVo_.mjs";function S(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(!x(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=m(t.service);if(!r)continue;const f=I(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),w=Math.max(0,c),M=Math.min(1,a+i.w/f.w)-u,g=Math.min(1,c+i.h/f.h)-w;if(M>0&&g>0)return{service:r,region:{x:u,y:w,width:M,height:g}}}}return null}const p=new WeakMap;function k(e,i){let n=p.get(e);n||p.set(e,n=new Map);let s=n.get(i);return s||(s=q({id:i,type:"Manifest"},{request:e.request}).catch(()=>null),n.set(i,s)),s}export{k as f,S as r};
1
+ import{az as h,ax as x,bu as m,bv as I,bw as q}from"./viewer-BXbkj7DJ.mjs";function S(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(!x(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=m(t.service);if(!r)continue;const f=I(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),w=Math.max(0,c),M=Math.min(1,a+i.w/f.w)-u,g=Math.min(1,c+i.h/f.h)-w;if(M>0&&g>0)return{service:r,region:{x:u,y:w,width:M,height:g}}}}return null}const p=new WeakMap;function k(e,i){let n=p.get(e);n||p.set(e,n=new Map);let s=n.get(i);return s||(s=q({id:i,type:"Manifest"},{request:e.request}).catch(()=>null),n.set(i,s)),s}export{k as f,S as r};
@@ -1 +1 @@
1
- import{bG as w,az as f,bv as l}from"./viewer-BrkFZVo_.mjs";import{resolveContentState as b}from"./content-state-reader-CDV0Igdx.mjs";import{readSvgShape as S}from"./svg-shape-CTjogIds.mjs";const m="http://iiif.io/api/presentation/2/context.json",x=t=>(t==null?void 0:t["@type"])==="oa:Annotation"||(t==null?void 0:t["@id"])!==void 0&&f(t==null?void 0:t["@context"]).includes(m),y=t=>typeof t=="string"?t:(t==null?void 0:t["@id"])??(t==null?void 0:t.id);async function I(t){if(!x(t))return t;const{convertPresentation2:n}=await import("../presentation-2-C-U79S_T.mjs"),r=n({"@context":m,...JSON.parse(JSON.stringify(t))}),a=f(t.on).map(e=>y(f(e==null?void 0:e.within)[0])),s=f(r.target).map((e,c)=>{const o=a[c];if(!o)return e;const d=[{id:o,type:"Manifest"}],g=(e==null?void 0:e.type)==="SpecificResource",u=y(g?e.source:e);return u?g?{...e,source:{id:u,type:"Canvas",partOf:d}}:{id:u,type:"Canvas",partOf:d}:e}),i=f(r.body).map(e=>typeof(e==null?void 0:e.chars)=="string"?{type:"TextualBody",value:e.chars,...e.format?{format:e.format}:{},...e.language?{language:e.language}:{}}:e);return{...r,"@context":void 0,type:"Annotation",target:s.length===1?s[0]:s,...i.length?{body:i.length===1?i[0]:i}:{}}}async function $(t,n,r){const a=await A(t);if(!a)throw new w("Unreadable content state");const s=await r(a.id,{...n,manifestId:n.manifestId??a.manifestId,follows:(n.follows??0)+1}),{target:i}=a;return O({...s,target:i&&(!s.target||s.target.canvasId===i.canvasId)?{...s.target,...i}:s.target??i,annotation:s.annotation??a.annotation,targets:s.targets??a.targets})}async function A(t){const n=await I(t),r=b(n);if(!r)return null;const a=n.type==="Annotation"?f(n.target)[0]:n,s=C(l(a).svg),i=r.annotation;return{...r,...r.target&&!r.target.region&&s?{target:{...r.target,region:s}}:{},...i?{annotation:{...i,motivation:f(i.motivation).filter(e=>e!=="painting"),...n.label?{label:n.label}:{}}}:{}}}function N(t){const n=t?Number(t.split(",")[0]):NaN;return Number.isFinite(n)?n:void 0}function C(t){var r;const n=t?(r=S(t))==null?void 0:r.box:void 0;return n&&n.width>0&&n.height>0?{x:n.x,y:n.y,w:n.width,h:n.height}:void 0}function R(t,n){const r=new Set,a=e=>{for(const c of e){if(!c||r.has(c))continue;if(r.add(c),c.type==="Range"&&c.id===n)return c;const o=a(f(c.items));if(o)return o}},s=(e,c=0)=>{for(const o of f(e.items)){if((o==null?void 0:o.type)==="Range"){const p=c<16?s(o,c+1):null;if(p)return p;continue}const d=typeof o=="string"?o:o==null?void 0:o.id,g=l((o==null?void 0:o.type)==="SpecificResource"?o:String(d??"").replace(/\/((?:t|xywh)=[^/#]*)$/,"#$1"));if(!g.id)continue;const u=N(g.t);return{canvasId:g.id,...g.rect?{region:g.rect}:{},...u!==void 0?{time:u}:{}}}return null},i=a(f(t.structures));return i?s(i):null}function v(t,n){if(typeof t=="string"){const a=t.indexOf("#");return a<0?n:n+t.slice(a)}const r=t;return(r==null?void 0:r.type)==="SpecificResource"?{...r,source:typeof r.source=="object"?{...r.source,id:n,type:"Canvas"}:{id:n,type:"Canvas"}}:v(String((r==null?void 0:r.id)??""),n)}function O(t){var c;const{manifest:n,target:r}=t;if(!r)return t;const a=f(n.items);if(a.some(o=>(o==null?void 0:o.id)===r.canvasId))return t;const i=(a.length===1&&((c=a[0])==null?void 0:c.id)===`${n.id}/canvas`?{canvasId:a[0].id}:null)??R(n,r.canvasId);if(!i)return t;const e=t.annotation&&{...t.annotation,target:v(t.annotation.target,i.canvasId)};return{...t,target:{...r,canvasId:i.canvasId,...r.region?{}:i.region?{region:i.region}:{},...r.time!==void 0?{}:i.time!==void 0?{time:i.time}:{}},...e?{annotation:e}:{}}}export{$ as follow,O as placeTarget,I as readAnnotation,A as resolve};
1
+ import{bG as w,az as f,bv as l}from"./viewer-BXbkj7DJ.mjs";import{resolveContentState as b}from"./content-state-reader-BhDMcVmC.mjs";import{readSvgShape as S}from"./svg-shape-CTjogIds.mjs";const m="http://iiif.io/api/presentation/2/context.json",x=t=>(t==null?void 0:t["@type"])==="oa:Annotation"||(t==null?void 0:t["@id"])!==void 0&&f(t==null?void 0:t["@context"]).includes(m),y=t=>typeof t=="string"?t:(t==null?void 0:t["@id"])??(t==null?void 0:t.id);async function I(t){if(!x(t))return t;const{convertPresentation2:n}=await import("../presentation-2-C-U79S_T.mjs"),r=n({"@context":m,...JSON.parse(JSON.stringify(t))}),a=f(t.on).map(e=>y(f(e==null?void 0:e.within)[0])),s=f(r.target).map((e,c)=>{const o=a[c];if(!o)return e;const d=[{id:o,type:"Manifest"}],g=(e==null?void 0:e.type)==="SpecificResource",u=y(g?e.source:e);return u?g?{...e,source:{id:u,type:"Canvas",partOf:d}}:{id:u,type:"Canvas",partOf:d}:e}),i=f(r.body).map(e=>typeof(e==null?void 0:e.chars)=="string"?{type:"TextualBody",value:e.chars,...e.format?{format:e.format}:{},...e.language?{language:e.language}:{}}:e);return{...r,"@context":void 0,type:"Annotation",target:s.length===1?s[0]:s,...i.length?{body:i.length===1?i[0]:i}:{}}}async function $(t,n,r){const a=await A(t);if(!a)throw new w("Unreadable content state");const s=await r(a.id,{...n,manifestId:n.manifestId??a.manifestId,follows:(n.follows??0)+1}),{target:i}=a;return O({...s,target:i&&(!s.target||s.target.canvasId===i.canvasId)?{...s.target,...i}:s.target??i,annotation:s.annotation??a.annotation,targets:s.targets??a.targets})}async function A(t){const n=await I(t),r=b(n);if(!r)return null;const a=n.type==="Annotation"?f(n.target)[0]:n,s=C(l(a).svg),i=r.annotation;return{...r,...r.target&&!r.target.region&&s?{target:{...r.target,region:s}}:{},...i?{annotation:{...i,motivation:f(i.motivation).filter(e=>e!=="painting"),...n.label?{label:n.label}:{}}}:{}}}function N(t){const n=t?Number(t.split(",")[0]):NaN;return Number.isFinite(n)?n:void 0}function C(t){var r;const n=t?(r=S(t))==null?void 0:r.box:void 0;return n&&n.width>0&&n.height>0?{x:n.x,y:n.y,w:n.width,h:n.height}:void 0}function R(t,n){const r=new Set,a=e=>{for(const c of e){if(!c||r.has(c))continue;if(r.add(c),c.type==="Range"&&c.id===n)return c;const o=a(f(c.items));if(o)return o}},s=(e,c=0)=>{for(const o of f(e.items)){if((o==null?void 0:o.type)==="Range"){const p=c<16?s(o,c+1):null;if(p)return p;continue}const d=typeof o=="string"?o:o==null?void 0:o.id,g=l((o==null?void 0:o.type)==="SpecificResource"?o:String(d??"").replace(/\/((?:t|xywh)=[^/#]*)$/,"#$1"));if(!g.id)continue;const u=N(g.t);return{canvasId:g.id,...g.rect?{region:g.rect}:{},...u!==void 0?{time:u}:{}}}return null},i=a(f(t.structures));return i?s(i):null}function v(t,n){if(typeof t=="string"){const a=t.indexOf("#");return a<0?n:n+t.slice(a)}const r=t;return(r==null?void 0:r.type)==="SpecificResource"?{...r,source:typeof r.source=="object"?{...r.source,id:n,type:"Canvas"}:{id:n,type:"Canvas"}}:v(String((r==null?void 0:r.id)??""),n)}function O(t){var c;const{manifest:n,target:r}=t;if(!r)return t;const a=f(n.items);if(a.some(o=>(o==null?void 0:o.id)===r.canvasId))return t;const i=(a.length===1&&((c=a[0])==null?void 0:c.id)===`${n.id}/canvas`?{canvasId:a[0].id}:null)??R(n,r.canvasId);if(!i)return t;const e=t.annotation&&{...t.annotation,target:v(t.annotation.target,i.canvasId)};return{...t,target:{...r,canvasId:i.canvasId,...r.region?{}:i.region?{region:i.region}:{},...r.time!==void 0?{}:i.time!==void 0?{time:i.time}:{}},...e?{annotation:e}:{}}}export{$ as follow,O as placeTarget,I as readAnnotation,A as resolve};
@@ -1 +1 @@
1
- var R=Object.defineProperty;var k=(s,t,e)=>t in s?R(s,t,{enumerable:true,configurable:true,writable:true,value:e}):s[t]=e;var l=(s,t,e)=>k(s,typeof t!="symbol"?t+"":t,e);import{b as x,n as E,u as r,M as p,k as O,q as M,C as m,I as g,$ as C,x as D}from"./viewer-BrkFZVo_.mjs";import"./styles-XRfyRUPf.mjs";function N(s){return{render:function(t){E(t,s)},unmount:function(){x(s)}}}const $="clover-root",b=Symbol("roots"),A=[];class F{constructor(t){l(this,"entries",new Map);l(this,"lists",new Map);l(this,"listeners",new Map);l(this,"languages",new I(t2=>this.entries.has(t2)));this.count=t}list(t){return this.lists.get(t)??A}subscribe(t,e){let n=this.listeners.get(t);return n||this.listeners.set(t,n=new Set),n.add(e),()=>{n.delete(e)}}connect(t){var i;const e=t.kind==="part"?((i=t.element.parentElement)==null?void 0:i.closest($))??null:null,n=this.entries.get(t.element);if(n&&n.root===e)return;const o={hosted:t,key:(n==null?void 0:n.key)??++this.count.made,root:e};this.entries.set(t.element,o),n&&this.change(h(n),a=>a.filter(c=>c!==n)),this.change(h(o),a=>[...a,o]),t.needsRoot&&!e&&console.warn(`<${t.element.localName}> shows a <clover-root>'s state: put it inside one.`),t.kind!=="root"&&this.languages.draws(t.element.localName),(t.kind!=="part"||!e)&&this.languages.watch(t.element)}disconnect(t){const e=this.entries.get(t);e&&(this.entries.delete(t),this.change(h(e),n=>n.filter(o=>o!==e)))}change(t,e){var n;this.lists.set(t,e(this.list(t))),(n=this.listeners.get(t))==null||n.forEach(o=>o())}}const h=s=>s.hosted.kind==="root"?b:s.root;class I{constructor(t){l(this,"observer",null);l(this,"tags",new Set);this.isElement=t}draws(t){this.tags.add(t)}watch(t){this.observer??(this.observer=new MutationObserver(e=>{const n=[...this.tags,".clover-announcer"].join(",");for(const{target:o}of e){const i=o;i.getAttribute("lang")!==""||this.isElement(i)||i.closest(n)&&i.removeAttribute("lang")}})),this.observer.observe(t,{subtree:true,attributes:true,attributeFilter:["lang"]})}}function d(s,t){const e=M(o=>s.subscribe(t,o),[s,t]);return m(e,()=>s.list(t))}function w(s){return m(s.subscribe,s.getProps,s.getProps)}function L({registry:s}){const t=d(s,b),e=d(s,null);return r(O,{children:[t.map(n=>r(W,{entry:n,registry:s},n.key)),e.map(n=>r(S,{entry:n},n.key))]})}const v=s=>`clover-${s.key}-`,W=p(function({entry:t,registry:e}){const{hosted:n}=t,o=d(e,n.element),i=w(n),a=n.Component;return r(P,{hosted:n,props:i,children:r(g.Provider,{value:v(t),children:r(a,{hosted:n,props:i,children:o.map(c=>r(S,{entry:c},c.key))})})})}),S=p(function({entry:t}){const{hosted:e}=t,n=w(e);if(e.needsRoot&&!t.root)return null;const o=e.Component;return C(r(P,{hosted:e,props:n,children:r(g.Provider,{value:v(t),children:r(o,{hosted:e,props:n})})}),e.element)});class P extends D{constructor(){super(...arguments);l(this,"state",{failed:false})}static getDerivedStateFromError(){return{failed:true}}componentDidCatch(e,n){console.error(`<${this.props.hosted.element.localName}>:`,e)}componentDidUpdate(e){this.state.failed&&e.props!==this.props.props&&this.setState({failed:false})}render(){return this.state.failed?null:this.props.children}}const f=new WeakMap,u=Symbol.for("clover.elements");function H(s){let t=f.get(s);if(!t){const e=s;e[u]&&console.warn("Clover is loaded twice on this page: load one entry."),t=new F(e[u]??(e[u]={made:0})),f.set(s,t),N(s.createElement("div")).render(r(L,{registry:t}))}return t}export{F as Registry,H as hostOf};
1
+ var R=Object.defineProperty;var k=(s,t,e)=>t in s?R(s,t,{enumerable:true,configurable:true,writable:true,value:e}):s[t]=e;var l=(s,t,e)=>k(s,typeof t!="symbol"?t+"":t,e);import{b as x,n as E,u as r,M as p,k as O,q as M,C as m,I as g,$ as C,x as D}from"./viewer-BXbkj7DJ.mjs";import"./styles-XRfyRUPf.mjs";function N(s){return{render:function(t){E(t,s)},unmount:function(){x(s)}}}const $="clover-root",b=Symbol("roots"),A=[];class F{constructor(t){l(this,"entries",new Map);l(this,"lists",new Map);l(this,"listeners",new Map);l(this,"languages",new I(t2=>this.entries.has(t2)));this.count=t}list(t){return this.lists.get(t)??A}subscribe(t,e){let n=this.listeners.get(t);return n||this.listeners.set(t,n=new Set),n.add(e),()=>{n.delete(e)}}connect(t){var i;const e=t.kind==="part"?((i=t.element.parentElement)==null?void 0:i.closest($))??null:null,n=this.entries.get(t.element);if(n&&n.root===e)return;const o={hosted:t,key:(n==null?void 0:n.key)??++this.count.made,root:e};this.entries.set(t.element,o),n&&this.change(h(n),a=>a.filter(c=>c!==n)),this.change(h(o),a=>[...a,o]),t.needsRoot&&!e&&console.warn(`<${t.element.localName}> shows a <clover-root>'s state: put it inside one.`),t.kind!=="root"&&this.languages.draws(t.element.localName),(t.kind!=="part"||!e)&&this.languages.watch(t.element)}disconnect(t){const e=this.entries.get(t);e&&(this.entries.delete(t),this.change(h(e),n=>n.filter(o=>o!==e)))}change(t,e){var n;this.lists.set(t,e(this.list(t))),(n=this.listeners.get(t))==null||n.forEach(o=>o())}}const h=s=>s.hosted.kind==="root"?b:s.root;class I{constructor(t){l(this,"observer",null);l(this,"tags",new Set);this.isElement=t}draws(t){this.tags.add(t)}watch(t){this.observer??(this.observer=new MutationObserver(e=>{const n=[...this.tags,".clover-announcer"].join(",");for(const{target:o}of e){const i=o;i.getAttribute("lang")!==""||this.isElement(i)||i.closest(n)&&i.removeAttribute("lang")}})),this.observer.observe(t,{subtree:true,attributes:true,attributeFilter:["lang"]})}}function d(s,t){const e=M(o=>s.subscribe(t,o),[s,t]);return m(e,()=>s.list(t))}function w(s){return m(s.subscribe,s.getProps,s.getProps)}function L({registry:s}){const t=d(s,b),e=d(s,null);return r(O,{children:[t.map(n=>r(W,{entry:n,registry:s},n.key)),e.map(n=>r(S,{entry:n},n.key))]})}const v=s=>`clover-${s.key}-`,W=p(function({entry:t,registry:e}){const{hosted:n}=t,o=d(e,n.element),i=w(n),a=n.Component;return r(P,{hosted:n,props:i,children:r(g.Provider,{value:v(t),children:r(a,{hosted:n,props:i,children:o.map(c=>r(S,{entry:c},c.key))})})})}),S=p(function({entry:t}){const{hosted:e}=t,n=w(e);if(e.needsRoot&&!t.root)return null;const o=e.Component;return C(r(P,{hosted:e,props:n,children:r(g.Provider,{value:v(t),children:r(o,{hosted:e,props:n})})}),e.element)});class P extends D{constructor(){super(...arguments);l(this,"state",{failed:false})}static getDerivedStateFromError(){return{failed:true}}componentDidCatch(e,n){console.error(`<${this.props.hosted.element.localName}>:`,e)}componentDidUpdate(e){this.state.failed&&e.props!==this.props.props&&this.setState({failed:false})}render(){return this.state.failed?null:this.props.children}}const f=new WeakMap,u=Symbol.for("clover.elements");function H(s){let t=f.get(s);if(!t){const e=s;e[u]&&console.warn("Clover is loaded twice on this page: load one entry."),t=new F(e[u]??(e[u]={made:0})),f.set(s,t),N(s.createElement("div")).render(r(L,{registry:t}))}return t}export{F as Registry,H as hostOf};
@@ -1 +1 @@
1
- import{ac as C,az as u,ax as I,bv as $,bC as L,bD as P}from"./viewer-BrkFZVo_.mjs";function q(t){const c=new Map;for(const e of C(t).canvases)S(e,c);return[...c.values()]}function S(t,c){u(t.items).forEach((e,r)=>u(e==null?void 0:e.items).forEach((d,f)=>{if(!I(d))return;const a=$(u(d.target)[0]).rect??{x:0,y:0,w:Number(t.width)||0,h:Number(t.height)||0};u(d.body).forEach((s,y)=>{const w=(s==null?void 0:s.type)==="Choice";(w?u(s.items):[s]).forEach((o,x)=>{for(const n of u(o==null?void 0:o.annotations)){if(!Array.isArray(n==null?void 0:n.items)||typeof(o==null?void 0:o.id)!="string")continue;const l=n.id??`${o.id}#annotations`,p=w?{key:L(t.id,d.id,r,f,y),item:x,image:o.id}:void 0,A=P(n,l,t.id).map(b=>{const h=j(b.annotation,o),N=Math.round(a.x+h.x*(a.w/h.width)),E=Math.round(a.y+h.y*(a.h/h.height)),g=Math.round(h.w*(a.w/h.width)),v=Math.round(h.h*(a.h/h.height)),M=`${t.id}#xywh=${N},${E},${g},${v}`;return{...b,canvasId:t.id,target:$(M),annotation:{...b.annotation,target:M},...p?{layer:p}:{}}});if(!A.length)continue;let m=c.get(l);m||(m={id:l,label:n.label??o.label,source:"manifest",entries:[]},c.set(l,m)),m.entries.push(...A)}})})}))}function j(t,c){const e=Number(c.width)||1,r=Number(c.height)||1,d={x:0,y:0,w:e,h:r,width:e,height:r},f=u(t==null?void 0:t.target)[0],s=(typeof f=="object"?u(f==null?void 0:f.selector):[]).find(i=>(i==null?void 0:i.type)==="ImageApiSelector"),y=typeof(s==null?void 0:s.region)=="string"?s.region:void 0;if(y){const i=/^(pct:)?([\d.]+),([\d.]+),([\d.]+),([\d.]+)$/.exec(y);if(!i)return d;const[o,x,n,l]=i.slice(2).map(Number);return i[1]?{x:o/100*e,y:x/100*r,w:n/100*e,h:l/100*r,width:e,height:r}:{x:o,y:x,w:n,h:l,width:e,height:r}}const w=$(f).rect;return w?{...w,width:e,height:r}:d}export{q as imageLayers};
1
+ import{ac as C,az as u,ax as I,bv as $,bC as L,bD as P}from"./viewer-BXbkj7DJ.mjs";function q(t){const c=new Map;for(const e of C(t).canvases)S(e,c);return[...c.values()]}function S(t,c){u(t.items).forEach((e,r)=>u(e==null?void 0:e.items).forEach((d,f)=>{if(!I(d))return;const a=$(u(d.target)[0]).rect??{x:0,y:0,w:Number(t.width)||0,h:Number(t.height)||0};u(d.body).forEach((s,y)=>{const w=(s==null?void 0:s.type)==="Choice";(w?u(s.items):[s]).forEach((o,x)=>{for(const n of u(o==null?void 0:o.annotations)){if(!Array.isArray(n==null?void 0:n.items)||typeof(o==null?void 0:o.id)!="string")continue;const l=n.id??`${o.id}#annotations`,p=w?{key:L(t.id,d.id,r,f,y),item:x,image:o.id}:void 0,A=P(n,l,t.id).map(b=>{const h=j(b.annotation,o),N=Math.round(a.x+h.x*(a.w/h.width)),E=Math.round(a.y+h.y*(a.h/h.height)),g=Math.round(h.w*(a.w/h.width)),v=Math.round(h.h*(a.h/h.height)),M=`${t.id}#xywh=${N},${E},${g},${v}`;return{...b,canvasId:t.id,target:$(M),annotation:{...b.annotation,target:M},...p?{layer:p}:{}}});if(!A.length)continue;let m=c.get(l);m||(m={id:l,label:n.label??o.label,source:"manifest",entries:[]},c.set(l,m)),m.entries.push(...A)}})})}))}function j(t,c){const e=Number(c.width)||1,r=Number(c.height)||1,d={x:0,y:0,w:e,h:r,width:e,height:r},f=u(t==null?void 0:t.target)[0],s=(typeof f=="object"?u(f==null?void 0:f.selector):[]).find(i=>(i==null?void 0:i.type)==="ImageApiSelector"),y=typeof(s==null?void 0:s.region)=="string"?s.region:void 0;if(y){const i=/^(pct:)?([\d.]+),([\d.]+),([\d.]+),([\d.]+)$/.exec(y);if(!i)return d;const[o,x,n,l]=i.slice(2).map(Number);return i[1]?{x:o/100*e,y:x/100*r,w:n/100*e,h:l/100*r,width:e,height:r}:{x:o,y:x,w:n,h:l,width:e,height:r}}const w=$(f).rect;return w?{...w,width:e,height:r}:d}export{q as imageLayers};
@@ -1 +1 @@
1
- import{b_ as m,b$ as d,c0 as l}from"./viewer-BrkFZVo_.mjs";function c(i){const{width:e,height:t,maxWidth:n,maxHeight:r,maxArea:o}=i,g=(s,p)=>(!n||s<=n)&&(!r||p<=r)&&(!o||s*p<=o);if(g(e,t))return{width:e,height:t};const h=i.sizes.filter(s=>g(s.width,s.height));if(h.length)return h[h.length-1];if(!i.sizeByW)return{width:e,height:t};const a=Math.min(n?n/e:1,r?r/t:1,o?Math.sqrt(o/(e*t)):1);return{width:Math.max(1,Math.floor(e*a)),height:Math.max(1,Math.floor(t*a))}}function u(i,e=200){return i.sizes.find(t=>Math.max(t.width,t.height)>=e)??c(i)}const y={jpg:"image/jpeg",png:"image/png",webp:"image/webp",gif:"image/gif"};function f(i,e,t){const n={x:0,y:0,width:i.width,height:i.height};return{id:l(i,n,t.width,t.height),type:"Image",format:y[i.format]??"image/jpeg",width:t.width,height:t.height,service:[e]}}function w(i,e){if(e.version===3)return{id:e.id,type:"ImageService3",profile:typeof i.profile=="string"?i.profile:"level0"};const t=[].concat(i.profile??[]).find(n=>typeof n=="string");return{"@id":e.id,"@type":"ImageService2",profile:t??"http://iiif.io/api/image/2/level0.json"}}async function x(i,e){const t=m(i,e),n=w(i,t),r=`${t.id}/canvas`,o=[i.rights,i.license].flat().find(a=>typeof a=="string"),g=i.attribution,h={"@context":"http://iiif.io/api/presentation/3/context.json",id:t.id,type:"Manifest",label:{none:[""]},thumbnail:[f(t,n,u(t))],items:[{id:r,type:"Canvas",width:t.width,height:t.height,items:[{id:`${r}/page`,type:"AnnotationPage",items:[{id:`${r}/page/image`,type:"Annotation",motivation:"painting",body:f(t,n,c(t)),target:r}]}]}]};return o&&(h.rights=o),g&&(h.requiredStatement={label:{en:["Attribution"]},value:{none:[].concat(g).map(a=>typeof a=="string"?a:String((a==null?void 0:a["@value"])??"")).filter(Boolean)}}),{manifest:await d(h)}}export{c as fittedSize,x as imageServiceContent};
1
+ import{b$ as m,c0 as d,c1 as l}from"./viewer-BXbkj7DJ.mjs";function f(i){const{width:e,height:t,maxWidth:n,maxHeight:r,maxArea:o}=i,g=(s,p)=>(!n||s<=n)&&(!r||p<=r)&&(!o||s*p<=o);if(g(e,t))return{width:e,height:t};const h=i.sizes.filter(s=>g(s.width,s.height));if(h.length)return h[h.length-1];if(!i.sizeByW)return{width:e,height:t};const a=Math.min(n?n/e:1,r?r/t:1,o?Math.sqrt(o/(e*t)):1);return{width:Math.max(1,Math.floor(e*a)),height:Math.max(1,Math.floor(t*a))}}function u(i,e=200){return i.sizes.find(t=>Math.max(t.width,t.height)>=e)??f(i)}const y={jpg:"image/jpeg",png:"image/png",webp:"image/webp",gif:"image/gif"};function c(i,e,t){const n={x:0,y:0,width:i.width,height:i.height};return{id:l(i,n,t.width,t.height),type:"Image",format:y[i.format]??"image/jpeg",width:t.width,height:t.height,service:[e]}}function w(i,e){if(e.version===3)return{id:e.id,type:"ImageService3",profile:typeof i.profile=="string"?i.profile:"level0"};const t=[].concat(i.profile??[]).find(n=>typeof n=="string");return{"@id":e.id,"@type":"ImageService2",profile:t??"http://iiif.io/api/image/2/level0.json"}}async function x(i,e){const t=m(i,e),n=w(i,t),r=`${t.id}/canvas`,o=[i.rights,i.license].flat().find(a=>typeof a=="string"),g=i.attribution,h={"@context":"http://iiif.io/api/presentation/3/context.json",id:t.id,type:"Manifest",label:{none:[""]},thumbnail:[c(t,n,u(t))],items:[{id:r,type:"Canvas",width:t.width,height:t.height,items:[{id:`${r}/page`,type:"AnnotationPage",items:[{id:`${r}/page/image`,type:"Annotation",motivation:"painting",body:c(t,n,f(t)),target:r}]}]}]};return o&&(h.rights=o),g&&(h.requiredStatement={label:{en:["Attribution"]},value:{none:[].concat(g).map(a=>typeof a=="string"?a:String((a==null?void 0:a["@value"])??"")).filter(Boolean)}}),{manifest:await d(h)}}export{f as fittedSize,x as imageServiceContent};
@@ -1 +1 @@
1
- import{cw as e}from"./viewer-BrkFZVo_.mjs";export{e as initCloverI18n};
1
+ import{cx as e}from"./viewer-BXbkj7DJ.mjs";export{e as initCloverI18n};
@@ -1 +1 @@
1
- import{az as d,ay as o,bv as c}from"./viewer-BrkFZVo_.mjs";function g(i){if(d(i==null?void 0:i.motivation).includes("linking"))for(const t of o(i)){const f=u(t);if(!f)continue;const{id:r,source:e}=f;if((e==null?void 0:e.type)==="Canvas"){const n=d(e.partOf).find(s=>(s==null?void 0:s.id)&&(!s.type||s.type==="Manifest")),p=c(r).id;return{id:r,canvasId:p,...n?{manifestId:n.id}:{}}}if((e==null?void 0:e.type)==="Manifest"||(e==null?void 0:e.type)==="Collection")return{id:r,manifestId:r};if(/^https?:\/\//i.test(r))return{id:r}}}function y(i){const t=d(i==null?void 0:i.motivation);if(!(!t.includes("tagging")&&!t.includes("identifying")))for(const f of o(i)){const r=u(f);if(r&&/^https?:\/\//i.test(r.id))return{id:r.id}}}function u(i){if((i==null?void 0:i.type)!=="SpecificResource")return;const t=i.source;if(typeof t=="string")return t?{id:t,source:void 0}:void 0;const f=t==null?void 0:t.id;return typeof f=="string"&&f?{id:f,source:t}:void 0}export{y as a,g as r};
1
+ import{az as d,ay as o,bv as c}from"./viewer-BXbkj7DJ.mjs";function g(i){if(d(i==null?void 0:i.motivation).includes("linking"))for(const t of o(i)){const f=u(t);if(!f)continue;const{id:r,source:e}=f;if((e==null?void 0:e.type)==="Canvas"){const n=d(e.partOf).find(s=>(s==null?void 0:s.id)&&(!s.type||s.type==="Manifest")),p=c(r).id;return{id:r,canvasId:p,...n?{manifestId:n.id}:{}}}if((e==null?void 0:e.type)==="Manifest"||(e==null?void 0:e.type)==="Collection")return{id:r,manifestId:r};if(/^https?:\/\//i.test(r))return{id:r}}}function y(i){const t=d(i==null?void 0:i.motivation);if(!(!t.includes("tagging")&&!t.includes("identifying")))for(const f of o(i)){const r=u(f);if(r&&/^https?:\/\//i.test(r.id))return{id:r.id}}}function u(i){if((i==null?void 0:i.type)!=="SpecificResource")return;const t=i.source;if(typeof t=="string")return t?{id:t,source:void 0}:void 0;const f=t==null?void 0:t.id;return typeof f=="string"&&f?{id:f,source:t}:void 0}export{y as a,g as r};
@@ -0,0 +1 @@
1
+ import{bu as o,cu as a,cv as s}from"./viewer-BXbkj7DJ.mjs";async function d(r,c,n){const e=typeof r.id=="string"?r.id:void 0,t=o(r.service);if(!t)return e;try{const i=await a(t,{request:n});return s(i,c)??e}catch{return e}}export{d as overlayImageUrl};
@@ -1 +1 @@
1
- import{az as c,bA as l,bv as g,bB as v,ba as A}from"./viewer-BrkFZVo_.mjs";const E=t=>t&&typeof t=="object"?Object.entries(t).flatMap(([i,r])=>c(r).filter(s=>typeof s=="string").map(s=>({value:s,...i!=="none"?{language:i}:{}}))):typeof t=="string"?[{value:t}]:[],a=new WeakMap;function j(t){if(!t)return null;if(a.has(t))return a.get(t);const i=[],r=new Set,s=n=>{if(!n||r.has(n.id??n))return;r.add(n.id??n);const b=typeof n.id=="string"&&!c(n.behavior).includes("no-nav"),d=E(n.label),h=c(n.items).filter(o=>(o==null?void 0:o.type)!=="Range"&&g(v(o)).id).length;let w=0;for(const o of c(n.items)){if((o==null?void 0:o.type)==="Range"){s(o);continue}const e=g(v(o));if(!e.id)continue;const f=w++;if(!b||!e.rect)continue;const{x,y:T,w:I,h:S}=e.rect,u=A(n.id,f);i.push({id:u,setId:l,canvasId:e.id,target:{id:e.id,rect:e.rect},motivation:["highlighting"],bodies:d,...h>1?{place:{index:f+1,total:h}}:{},annotation:{id:u,type:"Annotation",motivation:["highlighting"],...d.length&&{body:d.map(({value:$,language:y})=>({type:"TextualBody",value:$,...y?{language:y}:{}}))},target:`${e.id}#xywh=${x},${T},${I},${S}`}})}};c(t.structures).forEach(s);const p=i.length?{id:l,source:"contents",entries:i}:null;return a.set(t,p),p}export{j as contentsSet};
1
+ import{az as c,bA as l,bv as g,bB as v,ba as A}from"./viewer-BXbkj7DJ.mjs";const E=t=>t&&typeof t=="object"?Object.entries(t).flatMap(([i,r])=>c(r).filter(s=>typeof s=="string").map(s=>({value:s,...i!=="none"?{language:i}:{}}))):typeof t=="string"?[{value:t}]:[],a=new WeakMap;function j(t){if(!t)return null;if(a.has(t))return a.get(t);const i=[],r=new Set,s=n=>{if(!n||r.has(n.id??n))return;r.add(n.id??n);const b=typeof n.id=="string"&&!c(n.behavior).includes("no-nav"),d=E(n.label),h=c(n.items).filter(o=>(o==null?void 0:o.type)!=="Range"&&g(v(o)).id).length;let w=0;for(const o of c(n.items)){if((o==null?void 0:o.type)==="Range"){s(o);continue}const e=g(v(o));if(!e.id)continue;const f=w++;if(!b||!e.rect)continue;const{x,y:T,w:I,h:S}=e.rect,u=A(n.id,f);i.push({id:u,setId:l,canvasId:e.id,target:{id:e.id,rect:e.rect},motivation:["highlighting"],bodies:d,...h>1?{place:{index:f+1,total:h}}:{},annotation:{id:u,type:"Annotation",motivation:["highlighting"],...d.length&&{body:d.map(({value:$,language:y})=>({type:"TextualBody",value:$,...y?{language:y}:{}}))},target:`${e.id}#xywh=${x},${T},${I},${S}`}})}};c(t.structures).forEach(s);const p=i.length?{id:l,source:"contents",entries:i}:null;return a.set(t,p),p}export{j as contentsSet};
@@ -1 +1 @@
1
- import{Y as f,u as r,A as u,Z as p,_ as d,k as m}from"./viewer-BrkFZVo_.mjs";import"./styles-XRfyRUPf.mjs";const v=f(null),l=new WeakMap;function y(t){let n=l.get(t);if(!n){const{render:o}=t;n={canvasId:t.canvasId,format:t.format,match:t.match,component:c=>r(A,{...c,render:o})},l.set(t,n)}return n}function h(t){if(Array.isArray(t))return t.filter(n=>typeof n=="object"&&n!==null&&typeof n.render=="function").map(y)}function A({render:t,canvases:n,bodies:o,children:c}){const a=u(null),s=p(v);return d(()=>{const e=a.current;if(!e)return;const i=t(e,{canvases:n,bodies:o,clover:s});return()=>{typeof i=="function"&&i(),e.replaceChildren()}},[t,n,o,s]),r(m,{children:[r("div",{ref:a,className:"clover-body-renderer",style:{position:"absolute",inset:0}}),c&&r("div",{className:"clover-canvas-controls",children:c})]})}export{h as toRenderers};
1
+ import{Y as f,u as r,A as u,Z as p,_ as d,k as m}from"./viewer-BXbkj7DJ.mjs";import"./styles-XRfyRUPf.mjs";const v=f(null),l=new WeakMap;function y(t){let n=l.get(t);if(!n){const{render:o}=t;n={canvasId:t.canvasId,format:t.format,match:t.match,component:c=>r(A,{...c,render:o})},l.set(t,n)}return n}function h(t){if(Array.isArray(t))return t.filter(n=>typeof n=="object"&&n!==null&&typeof n.render=="function").map(y)}function A({render:t,canvases:n,bodies:o,children:c}){const a=u(null),s=p(v);return d(()=>{const e=a.current;if(!e)return;const i=t(e,{canvases:n,bodies:o,clover:s});return()=>{typeof i=="function"&&i(),e.replaceChildren()}},[t,n,o,s]),r(m,{children:[r("div",{ref:a,className:"clover-body-renderer",style:{position:"absolute",inset:0}}),c&&r("div",{className:"clover-canvas-controls",children:c})]})}export{h as toRenderers};
@@ -1 +1 @@
1
- import{bU as a,bV as c}from"./viewer-BrkFZVo_.mjs";function l(t){try{const o=new URL(t).pathname.split("/").filter(Boolean).pop();return o?decodeURIComponent(o):"download"}catch{return"download"}}async function d(t,o){try{const r=await a(o,t,{referrerPolicy:"no-referrer"});if(!r.ok)return c(r),false;const n=URL.createObjectURL(await r.blob()),e=document.createElement("a");return e.href=n,e.download=l(t),document.body.append(e),e.click(),e.remove(),setTimeout(()=>URL.revokeObjectURL(n),1e4),true}catch{return false}}export{l as fileName,d as saveFile};
1
+ import{bV as a,bW as c}from"./viewer-BXbkj7DJ.mjs";function l(t){try{const o=new URL(t).pathname.split("/").filter(Boolean).pop();return o?decodeURIComponent(o):"download"}catch{return"download"}}async function d(t,o){try{const r=await a(o,t,{referrerPolicy:"no-referrer"});if(!r.ok)return c(r),false;const n=URL.createObjectURL(await r.blob()),e=document.createElement("a");return e.href=n,e.download=l(t),document.body.append(e),e.click(),e.remove(),setTimeout(()=>URL.revokeObjectURL(n),1e4),true}catch{return false}}export{l as fileName,d as saveFile};
@@ -1 +1 @@
1
- import{bE as b,az as f,bv as w,bF as S}from"./viewer-BrkFZVo_.mjs";const x=10;async function R(r,t,s,o,e){var n,d;const i=(n=r.get().manifest)==null?void 0:n.id;try{const{hits:c,set:u}=await A(t,s,{request:o,signal:e});if(e.aborted||((d=r.get().manifest)==null?void 0:d.id)!==i)return;r.set({search:{query:s,status:"ready",hits:c,set:u}})}catch{if(e.aborted)return;r.set({search:{query:s,status:"error",hits:[],set:null}})}}async function A(r,t,{request:s,signal:o}={}){const e=new URL(r.id);e.searchParams.set("q",t);const i=[];let n=e.toString();const d=new Set;for(;n&&i.length<x&&!d.has(n);){d.add(n);const c=await b(s,n,o);i.push(c),n=T(c)}return $(i,t)}function E(r){var e;const t=f(r)[0];if(typeof t=="string"||!t)return t;const s=t.full??t["@id"],o=(e=f(t.selector)[0])==null?void 0:e.value;return typeof o=="string"&&typeof s=="string"?`${s}#${o}`:s}function T(r){var o;const t=r.next??((o=r.within)==null?void 0:o.next),s=typeof t=="string"?t:(t==null?void 0:t.id)??(t==null?void 0:t["@id"]);return typeof s=="string"?s:null}function $(r,t){var e,i;const s=[],o=[];for(const n of r){const d=Array.isArray(n.resources),c=d?n.resources:f(n.items),u=new Map;for(const a of c){const p=a.id??a["@id"],m=d?E(a.on):f(a.target)[0],v=w(m);if(!p||!v.id)continue;const y=d?(e=a.resource)==null?void 0:e.chars:f(a.body).map(l=>l==null?void 0:l.value).find(l=>typeof l=="string"),I={id:p,setId:S,canvasId:v.id,target:v,motivation:["highlighting"],bodies:[{value:String(y??t)}],annotation:{id:p,type:"Annotation",motivation:["highlighting"],body:{type:"TextualBody",value:String(y??t)},target:m}};u.set(p,I),s.push(I)}const g=d?H(n,u):M(n,u),h=new Set(g.flatMap(a=>a.entryIds));o.push(...g);for(const a of u.values())h.has(a.id)||o.push({id:a.id,canvasId:a.canvasId,entryIds:[a.id],match:((i=a.bodies[0])==null?void 0:i.value)??t})}return{query:t,hits:o,set:{id:S,label:{none:[t]},source:"search",entries:s}}}function H(r,t){var o;const s=[];for(const e of f(r.hits)){const i=f(e.annotations).filter(n=>t.has(n));i.length&&s.push({id:i.join(" "),canvasId:t.get(i[0]).canvasId,entryIds:i,before:e.before,match:String(e.match??((o=t.get(i[0]).bodies[0])==null?void 0:o.value)??""),after:e.after})}return s}function M(r,t){var o,e;const s=[];for(const i of f(r.annotations))for(const n of f(i==null?void 0:i.items))if(f(n==null?void 0:n.motivation).includes("contextualizing"))for(const c of f(n.target)){const u=typeof(c==null?void 0:c.source)=="string"?c.source:(o=c==null?void 0:c.source)==null?void 0:o.id,g=u?t.get(u):void 0;if(!g)continue;const h=f(c.selector).find(a=>(a==null?void 0:a.type)==="TextQuoteSelector");s.push({id:`${n.id??u}#${u}`,canvasId:g.canvasId,entryIds:[g.id],before:h==null?void 0:h.prefix,match:String((h==null?void 0:h.exact)??((e=g.bodies[0])==null?void 0:e.value)??""),after:h==null?void 0:h.suffix})}return s}export{$ as readResults,A as search,R as searchInto};
1
+ import{bE as b,az as f,bv as w,bF as S}from"./viewer-BXbkj7DJ.mjs";const x=10;async function R(r,t,s,o,e){var n,d;const i=(n=r.get().manifest)==null?void 0:n.id;try{const{hits:c,set:u}=await A(t,s,{request:o,signal:e});if(e.aborted||((d=r.get().manifest)==null?void 0:d.id)!==i)return;r.set({search:{query:s,status:"ready",hits:c,set:u}})}catch{if(e.aborted)return;r.set({search:{query:s,status:"error",hits:[],set:null}})}}async function A(r,t,{request:s,signal:o}={}){const e=new URL(r.id);e.searchParams.set("q",t);const i=[];let n=e.toString();const d=new Set;for(;n&&i.length<x&&!d.has(n);){d.add(n);const c=await b(s,n,o);i.push(c),n=T(c)}return $(i,t)}function E(r){var e;const t=f(r)[0];if(typeof t=="string"||!t)return t;const s=t.full??t["@id"],o=(e=f(t.selector)[0])==null?void 0:e.value;return typeof o=="string"&&typeof s=="string"?`${s}#${o}`:s}function T(r){var o;const t=r.next??((o=r.within)==null?void 0:o.next),s=typeof t=="string"?t:(t==null?void 0:t.id)??(t==null?void 0:t["@id"]);return typeof s=="string"?s:null}function $(r,t){var e,i;const s=[],o=[];for(const n of r){const d=Array.isArray(n.resources),c=d?n.resources:f(n.items),u=new Map;for(const a of c){const p=a.id??a["@id"],m=d?E(a.on):f(a.target)[0],v=w(m);if(!p||!v.id)continue;const y=d?(e=a.resource)==null?void 0:e.chars:f(a.body).map(l=>l==null?void 0:l.value).find(l=>typeof l=="string"),I={id:p,setId:S,canvasId:v.id,target:v,motivation:["highlighting"],bodies:[{value:String(y??t)}],annotation:{id:p,type:"Annotation",motivation:["highlighting"],body:{type:"TextualBody",value:String(y??t)},target:m}};u.set(p,I),s.push(I)}const g=d?H(n,u):M(n,u),h=new Set(g.flatMap(a=>a.entryIds));o.push(...g);for(const a of u.values())h.has(a.id)||o.push({id:a.id,canvasId:a.canvasId,entryIds:[a.id],match:((i=a.bodies[0])==null?void 0:i.value)??t})}return{query:t,hits:o,set:{id:S,label:{none:[t]},source:"search",entries:s}}}function H(r,t){var o;const s=[];for(const e of f(r.hits)){const i=f(e.annotations).filter(n=>t.has(n));i.length&&s.push({id:i.join(" "),canvasId:t.get(i[0]).canvasId,entryIds:i,before:e.before,match:String(e.match??((o=t.get(i[0]).bodies[0])==null?void 0:o.value)??""),after:e.after})}return s}function M(r,t){var o,e;const s=[];for(const i of f(r.annotations))for(const n of f(i==null?void 0:i.items))if(f(n==null?void 0:n.motivation).includes("contextualizing"))for(const c of f(n.target)){const u=typeof(c==null?void 0:c.source)=="string"?c.source:(o=c==null?void 0:c.source)==null?void 0:o.id,g=u?t.get(u):void 0;if(!g)continue;const h=f(c.selector).find(a=>(a==null?void 0:a.type)==="TextQuoteSelector");s.push({id:`${n.id??u}#${u}`,canvasId:g.canvasId,entryIds:[g.id],before:h==null?void 0:h.prefix,match:String((h==null?void 0:h.exact)??((e=g.bodies[0])==null?void 0:e.value)??""),after:h==null?void 0:h.suffix})}return s}export{$ as readResults,A as search,R as searchInto};
@@ -1 +1 @@
1
- import{e as j,y as G,aq as z,ar as J,at as K,aw as M,bL as Q,as as V}from"./viewer-BrkFZVo_.mjs";const W=3e3,Z=1e3,B=1e3,$=[":scope > .clover-canvas-controls > *",":scope > .clover-canvas-navigator",":scope > .clover-canvas-media > .clover-canvas-transport > *"].join(", ");function rt(r,d=W,y){const[R,U]=j(false);return G(()=>{if(!r)return;const v=r.ownerDocument;let c,l=false,E=false,g=false,D=false,I=-1/0,Y=false,L=null,u=false,T,e=null,s=null,o=null;const f=t=>{l=t,U(t)},A=()=>{g||f(false)},n=()=>{c&&clearTimeout(c),c=void 0},m=()=>{o&&clearTimeout(o.timer),o=null},b=()=>{f(true),n(),Number.isFinite(d)&&(c=setTimeout(A,d))},p=t=>J(t.pointerType,D),w=t=>{E=t.type==="keydown",!E&&(f(true),n(),Number.isFinite(d)&&(c=setTimeout(A,d)))},k=()=>{f(true),n(),c=setTimeout(A,Z)},x=t=>{m(),o={...t,timer:setTimeout(()=>{o=null,t.onPicture&&l?(n(),f(false)):b()},V)}},C=t=>{if(z(t)&&(D=true),!p(t))return w(t);(e==null?void 0:e.id)===t.pointerId&&Math.hypot(t.clientX-e.x,t.clientY-e.y)>K&&(e=null)},_=t=>{const a=y==null?void 0:y.current;return!!(a&&t instanceof Node&&a.contains(t))},X=t=>{if(!p(t))return w(t);E=false,n(),s=M(t.target,r)&&!_(t.target)?{id:t.pointerId,inSight:l||getComputedStyle(r).getPropertyValue("--clover-controls-shown").trim()==="1"}:null,s&&m(),e=t.isPrimary===false?null:{id:t.pointerId,x:t.clientX,y:t.clientY,target:t.target}},P=t=>{if(!p(t)||((s==null?void 0:s.id)===t.pointerId?(s.inSight&&b(),s=null):l&&t.isPrimary!==false&&b(),(e==null?void 0:e.id)!==t.pointerId))return;const{target:a}=e;if(e=null,t.type!=="pointerup"||M(a,r))return;const i=_(a);if(i&&(o!=null&&o.onPicture)&&Math.hypot(t.clientX-o.x,t.clientY-o.y)<Q){m();return}x({x:t.clientX,y:t.clientY,onPicture:i})},q=t=>_(t.target)?Array.from(r.querySelectorAll($)).some(a=>{const i=a.getBoundingClientRect();return i.width>0&&i.height>0&&t.clientX>=i.left&&t.clientX<=i.right&&t.clientY>=i.top&&t.clientY<=i.bottom}):false,h=t=>{if(t.type==="pointerdown"){if(L!==null||(clearTimeout(T),u=false,!q(t)))return;L=t.pointerId,u=true,p(t)?(E=false,n()):w(t)}else if(t.pointerId!==L)return;t.stopPropagation(),t.preventDefault(),t.type==="pointercancel"?(L=null,u=false):t.type==="pointerup"&&(L=null,p(t)&&x({x:t.clientX,y:t.clientY,onPicture:false}),clearTimeout(T),T=setTimeout(()=>u=false,V))},F=t=>{u&&(u=false,t.stopPropagation(),t.preventDefault())},S=t=>{I=Date.now(),Y=r.contains(t.target),t.type==="pointerdown"&&(g=false)},O=()=>{Date.now()-I<B||(g=true,n(),f(true))},N=t=>{p(t)||l&&k()},H=t=>{r.contains(t.relatedTarget)||(g=false,!(Y&&Date.now()-I<B)&&(l||E)&&k())};v.addEventListener("pointerdown",S,true),v.addEventListener("pointerup",S,true);for(const t of["pointerdown","pointermove","pointerup"])r.addEventListener(t,h,true);return r.addEventListener("pointercancel",h,true),r.addEventListener("click",F,true),r.addEventListener("pointermove",C),r.addEventListener("pointerdown",X),r.addEventListener("pointerup",P),r.addEventListener("pointercancel",P),r.addEventListener("pointerleave",N),r.addEventListener("focusin",O),r.addEventListener("focusout",H),r.addEventListener("keydown",w),()=>{n(),m(),clearTimeout(T),v.removeEventListener("pointerdown",S,true),v.removeEventListener("pointerup",S,true);for(const t of["pointerdown","pointermove","pointerup"])r.removeEventListener(t,h,true);r.removeEventListener("pointercancel",h,true),r.removeEventListener("click",F,true),r.removeEventListener("pointermove",C),r.removeEventListener("pointerdown",X),r.removeEventListener("pointerup",P),r.removeEventListener("pointercancel",P),r.removeEventListener("pointerleave",N),r.removeEventListener("focusin",O),r.removeEventListener("focusout",H),r.removeEventListener("keydown",w)}},[r,d,y]),R}export{rt as u};
1
+ import{e as j,y as G,aq as z,ar as J,at as K,aw as M,bL as Q,as as V}from"./viewer-BXbkj7DJ.mjs";const W=3e3,Z=1e3,B=1e3,$=[":scope > .clover-canvas-controls > *",":scope > .clover-canvas-navigator",":scope > .clover-canvas-media > .clover-canvas-transport > *"].join(", ");function rt(r,d=W,y){const[R,U]=j(false);return G(()=>{if(!r)return;const v=r.ownerDocument;let c,l=false,E=false,g=false,D=false,I=-1/0,Y=false,L=null,u=false,T,e=null,s=null,o=null;const f=t=>{l=t,U(t)},A=()=>{g||f(false)},n=()=>{c&&clearTimeout(c),c=void 0},m=()=>{o&&clearTimeout(o.timer),o=null},b=()=>{f(true),n(),Number.isFinite(d)&&(c=setTimeout(A,d))},p=t=>J(t.pointerType,D),w=t=>{E=t.type==="keydown",!E&&(f(true),n(),Number.isFinite(d)&&(c=setTimeout(A,d)))},k=()=>{f(true),n(),c=setTimeout(A,Z)},x=t=>{m(),o={...t,timer:setTimeout(()=>{o=null,t.onPicture&&l?(n(),f(false)):b()},V)}},C=t=>{if(z(t)&&(D=true),!p(t))return w(t);(e==null?void 0:e.id)===t.pointerId&&Math.hypot(t.clientX-e.x,t.clientY-e.y)>K&&(e=null)},_=t=>{const a=y==null?void 0:y.current;return!!(a&&t instanceof Node&&a.contains(t))},X=t=>{if(!p(t))return w(t);E=false,n(),s=M(t.target,r)&&!_(t.target)?{id:t.pointerId,inSight:l||getComputedStyle(r).getPropertyValue("--clover-controls-shown").trim()==="1"}:null,s&&m(),e=t.isPrimary===false?null:{id:t.pointerId,x:t.clientX,y:t.clientY,target:t.target}},P=t=>{if(!p(t)||((s==null?void 0:s.id)===t.pointerId?(s.inSight&&b(),s=null):l&&t.isPrimary!==false&&b(),(e==null?void 0:e.id)!==t.pointerId))return;const{target:a}=e;if(e=null,t.type!=="pointerup"||M(a,r))return;const i=_(a);if(i&&(o!=null&&o.onPicture)&&Math.hypot(t.clientX-o.x,t.clientY-o.y)<Q){m();return}x({x:t.clientX,y:t.clientY,onPicture:i})},q=t=>_(t.target)?Array.from(r.querySelectorAll($)).some(a=>{const i=a.getBoundingClientRect();return i.width>0&&i.height>0&&t.clientX>=i.left&&t.clientX<=i.right&&t.clientY>=i.top&&t.clientY<=i.bottom}):false,h=t=>{if(t.type==="pointerdown"){if(L!==null||(clearTimeout(T),u=false,!q(t)))return;L=t.pointerId,u=true,p(t)?(E=false,n()):w(t)}else if(t.pointerId!==L)return;t.stopPropagation(),t.preventDefault(),t.type==="pointercancel"?(L=null,u=false):t.type==="pointerup"&&(L=null,p(t)&&x({x:t.clientX,y:t.clientY,onPicture:false}),clearTimeout(T),T=setTimeout(()=>u=false,V))},F=t=>{u&&(u=false,t.stopPropagation(),t.preventDefault())},S=t=>{I=Date.now(),Y=r.contains(t.target),t.type==="pointerdown"&&(g=false)},O=()=>{Date.now()-I<B||(g=true,n(),f(true))},N=t=>{p(t)||l&&k()},H=t=>{r.contains(t.relatedTarget)||(g=false,!(Y&&Date.now()-I<B)&&(l||E)&&k())};v.addEventListener("pointerdown",S,true),v.addEventListener("pointerup",S,true);for(const t of["pointerdown","pointermove","pointerup"])r.addEventListener(t,h,true);return r.addEventListener("pointercancel",h,true),r.addEventListener("click",F,true),r.addEventListener("pointermove",C),r.addEventListener("pointerdown",X),r.addEventListener("pointerup",P),r.addEventListener("pointercancel",P),r.addEventListener("pointerleave",N),r.addEventListener("focusin",O),r.addEventListener("focusout",H),r.addEventListener("keydown",w),()=>{n(),m(),clearTimeout(T),v.removeEventListener("pointerdown",S,true),v.removeEventListener("pointerup",S,true);for(const t of["pointerdown","pointermove","pointerup"])r.removeEventListener(t,h,true);r.removeEventListener("pointercancel",h,true),r.removeEventListener("click",F,true),r.removeEventListener("pointermove",C),r.removeEventListener("pointerdown",X),r.removeEventListener("pointerup",P),r.removeEventListener("pointercancel",P),r.removeEventListener("pointerleave",N),r.removeEventListener("focusin",O),r.removeEventListener("focusout",H),r.removeEventListener("keydown",w)}},[r,d,y]),R}export{rt as u};