@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
@@ -0,0 +1,29 @@
1
+ var $l=Object.defineProperty;var Fl=(t,e,n)=>e in t?$l(t,e,{enumerable:true,configurable:true,writable:true,value:n}):t[e]=n;var P=(t,e,n)=>Fl(t,typeof e!="symbol"?e+"":e,n);import{s as ma}from"./styles-DvZTMHkr.mjs";function Dl(t={}){return Promise.resolve().then(()=>Wu).then(e=>e.initCloverI18n(t))}const ga="@layer clover{:is(clover-root,clover-items,clover-viewer,clover-panel,clover-read-more):not([hidden]){display:block}:is(clover-body,clover-canvas,clover-timeline,clover-scene):not([hidden]){display:block;height:var(--clover-body-height,60vh)}clover-split:not([hidden]){display:flex}:is(clover-label,clover-panel-toggle):not([hidden]){display:contents}clover-tab,clover-tip,clover-status>[slot]{display:none}}";let zl=null,bn=null;const Hl=()=>zl??(zl=import("./host-CTbjXNd9.mjs").then(t=>bn=t)),Wl=t=>t.trim().toLowerCase()==="false";function Ul(t,{type:e,min:n},o){if(t===null)return;if(e==="string")return t;if(e==="boolean")return!Wl(t);if(e==="number"){const s=Number(t);if(t.trim()===""||!Number.isFinite(s)){o("is not a number");return}if(n!==void 0&&s<n){o(`is less than ${n}`);return}return s}if(e==="data"){const s=t.trim();if(!/^[[{"]/.test(s))return t;try{return JSON.parse(s)}catch{o("is not JSON");return}}const r=t.trim().toLowerCase();if(e.includes(r))return r==="false"?false:r;o(`is not ${e.join(", ")}`)}const jl=(t,e)=>{const n=Object.keys(t);return n.length===Object.keys(e).length&&n.every(o=>Object.is(t[o],e[o]))};function Vl(t){class e extends HTMLElement{constructor(){super(...arguments);P(this,"kind",t.kind)}static get observedAttributes(){return Object.keys(t.attributes)}connectedCallback(){ma(this.ownerDocument).inject("elements",ga)}}customElements.define(t.tag,e)}function ql(t,e){if(typeof customElements>"u"||customElements.get(t.tag))return;if(t.kind==="config"||!e)return Vl(t);const n=t.kind,o=t.properties??[],r=Object.entries(t.events??{});let s=null,i=null;const a=()=>i??(i=Promise.all([e().then(l=>s=l),Hl()]));class c extends HTMLElement{constructor(){super(...arguments);P(this,"kind",n);P(this,"needsRoot",!!t.needsRoot);P(this,"values",{});P(this,"kept",{});P(this,"props",{});P(this,"listeners",new Set);P(this,"warned",new Set);P(this,"handlers",Object.fromEntries(r.map(([d,h])=>[h.prop,(...p)=>{var v;if(h.keeps&&(this.kept[h.keeps]=p[0]??null,p[0]==null))return true;const m=h.detail==="first"?p[0]:Object.fromEntries(h.detail.map((w,b)=>[w,p[b]])),g=new CustomEvent(d,{detail:m,bubbles:!h.keeps,composed:!h.keeps,cancelable:!!h.cancelable}),y=this.dispatchEvent(g);if(!y&&h.cancelable){const w=p[p.length-1];(v=w==null?void 0:w.preventDefault)==null||v.call(w)}return y}])));P(this,"getProps",()=>this.props);P(this,"subscribe",d=>(this.listeners.add(d),()=>{this.listeners.delete(d)}))}static get observedAttributes(){return Object.keys(t.attributes)}get element(){return this}get Component(){return s}connectedCallback(){for(const d of o){if(!Object.prototype.hasOwnProperty.call(this,d))continue;const h=this[d];delete this[d],h!=null&&(this.values[d]=h)}this.update(),this.warnOfAria(),ma(this.ownerDocument).inject("elements",ga),a().then(()=>{this.isConnected&&bn.hostOf(this.ownerDocument).connect(this)})}disconnectedCallback(){queueMicrotask(()=>{this.isConnected||bn==null||bn.hostOf(this.ownerDocument).disconnect(this)})}attributeChangedCallback(){this.update()}warnOfAria(){if(!t.native)for(const d of["aria-label","aria-labelledby","role"])!this.hasAttribute(d)||this.warned.has(d)||(this.warned.add(d),console.warn(`<${t.tag}>: ${d} names the element, a box no reader is told of; Clover names what it draws itself.`))}update(){const d={...this.handlers,...this.values};for(const[h,p]of Object.entries(t.attributes)){if(p.prop in this.values)continue;const m=this.getAttribute(h),g=Ul(m,p,y=>{const v=`${h}=${m}`;this.warned.has(v)||(this.warned.add(v),console.warn(`<${t.tag}>: ${h}="${m}" ${y}; ignored.`))});g!==void 0&&(d[p.prop]=g)}jl(d,this.props)||(this.props=d,this.listeners.forEach(h=>h()))}}P(c,"initCloverI18n",Dl);for(const l of o)Object.defineProperty(c.prototype,l,{configurable:true,enumerable:true,get(){return l in this.values?this.values[l]:this.getProps()[l]},set(u){u==null?delete this.values[l]:this.values[l]=u,this.update()}});for(const[,l]of r){if(!l.keeps)continue;const u=l.keeps;Object.defineProperty(c.prototype,u,{configurable:true,enumerable:true,get(){return this.kept[u]??null}})}customElements.define(t.tag,c)}var Tn,it,va,$e,Vs,ya,ba,_a,Fr,pr,mr,wa,kn={},xa=[],Kl=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,In=Array.isArray;function se(t,e){for(var n in e)t[n]=e[n];return t}function Dr(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function _e(t,e,n){var o,r,s,i={};for(s in e)s=="key"?o=e[s]:s=="ref"?r=e[s]:i[s]=e[s];if(arguments.length>2&&(i.children=arguments.length>3?Tn.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(s in t.defaultProps)i[s]===void 0&&(i[s]=t.defaultProps[s]);return xn(t,i,o,r,null)}function xn(t,e,n,o,r){var s={type:t,props:e,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:r??++va,__i:-1,__u:0};return r==null&&it.vnode!=null&&it.vnode(s),s}function Zl(){return{current:null}}function kt(t){return t.children}function ie(t,e){this.props=t,this.context=e}function rn(t,e){if(e==null)return t.__?rn(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?rn(t):null}function Sa(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return Sa(t)}}function gr(t){(!t.__d&&(t.__d=true)&&$e.push(t)&&!io.__r++||Vs!=it.debounceRendering)&&((Vs=it.debounceRendering)||ya)(io)}function io(){for(var t,e,n,o,r,s,i,a=1;$e.length;)$e.length>a&&$e.sort(ba),t=$e.shift(),a=$e.length,t.__d&&(n=void 0,o=void 0,r=(o=(e=t).__v).__e,s=[],i=[],e.__P&&((n=se({},o)).__v=o.__v+1,it.vnode&&it.vnode(n),zr(e.__P,n,o,e.__n,e.__P.namespaceURI,32&o.__u?[r]:null,s,r??rn(o),!!(32&o.__u),i),n.__v=o.__v,n.__.__k[n.__i]=n,Ea(s,n,i),o.__e=o.__=null,n.__e!=r&&Sa(n)));io.__r=0}function ka(t,e,n,o,r,s,i,a,c,l,u){var d,h,p,m,g,y,v,w=o&&o.__k||xa,b=e.length;for(c=Gl(n,e,w,c,b),d=0;d<b;d++)(p=n.__k[d])!=null&&(h=p.__i==-1?kn:w[p.__i]||kn,p.__i=d,y=zr(t,p,h,r,s,i,a,c,l,u),m=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&Hr(h.ref,null,p),u.push(p.ref,p.__c||m,p)),g==null&&m!=null&&(g=m),(v=!!(4&p.__u))||h.__k===p.__k?c=Ca(p,c,t,v):typeof p.type=="function"&&y!==void 0?c=y:m&&(c=m.nextSibling),p.__u&=-7);return n.__e=g,c}function Gl(t,e,n,o,r){var s,i,a,c,l,u=n.length,d=u,h=0;for(t.__k=new Array(r),s=0;s<r;s++)(i=e[s])!=null&&typeof i!="boolean"&&typeof i!="function"?(c=s+h,(i=t.__k[s]=typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?xn(null,i,null,null,null):In(i)?xn(kt,{children:i},null,null,null):i.constructor==null&&i.__b>0?xn(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=t,i.__b=t.__b+1,a=null,(l=i.__i=Xl(i,n,c,d))!=-1&&(d--,(a=n[l])&&(a.__u|=2)),a==null||a.__v==null?(l==-1&&(r>u?h--:r<u&&h++),typeof i.type!="function"&&(i.__u|=4)):l!=c&&(l==c-1?h--:l==c+1?h++:(l>c?h--:h++,i.__u|=4))):t.__k[s]=null;if(d)for(s=0;s<u;s++)(a=n[s])!=null&&!(2&a.__u)&&(a.__e==o&&(o=rn(a)),Ta(a,a));return o}function Ca(t,e,n,o){var r,s;if(typeof t.type=="function"){for(r=t.__k,s=0;r&&s<r.length;s++)r[s]&&(r[s].__=t,e=Ca(r[s],e,n,o));return e}t.__e!=e&&(o&&(e&&t.type&&!e.parentNode&&(e=rn(t)),n.insertBefore(t.__e,e||null)),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function be(t,e){return e=e||[],t==null||typeof t=="boolean"||(In(t)?t.some(function(n){be(n,e)}):e.push(t)),e}function Xl(t,e,n,o){var r,s,i,a=t.key,c=t.type,l=e[n],u=l!=null&&(2&l.__u)==0;if(l===null&&t.key==null||u&&a==l.key&&c==l.type)return n;if(o>(u?1:0)){for(r=n-1,s=n+1;r>=0||s<e.length;)if((l=e[i=r>=0?r--:s++])!=null&&!(2&l.__u)&&a==l.key&&c==l.type)return i}return-1}function qs(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||Kl.test(e)?n:n+"px"}function Jn(t,e,n,o,r){var s,i;t:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof o=="string"&&(t.style.cssText=o=""),o)for(e in o)n&&e in n||qs(t.style,e,"");if(n)for(e in n)o&&n[e]==o[e]||qs(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")s=e!=(e=e.replace(_a,"$1")),i=e.toLowerCase(),e=i in t||e=="onFocusOut"||e=="onFocusIn"?i.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+s]=n,n?o?n.u=o.u:(n.u=Fr,t.addEventListener(e,s?mr:pr,s)):t.removeEventListener(e,s?mr:pr,s);else{if(r=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break t}catch{}typeof n=="function"||(n==null||n===false&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function Ks(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=Fr++;else if(e.t<n.u)return;return n(it.event?it.event(e):e)}}}function zr(t,e,n,o,r,s,i,a,c,l){var u,d,h,p,m,g,y,v,w,b,x,S,T,B,N,J,et,Z=e.type;if(e.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),s=[a=e.__e=n.__e]),(u=it.__b)&&u(e);t:if(typeof Z=="function")try{if(v=e.props,w="prototype"in Z&&Z.prototype.render,b=(u=Z.contextType)&&o[u.__c],x=u?b?b.props.value:u.__:o,n.__c?y=(d=e.__c=n.__c).__=d.__E:(w?e.__c=d=new Z(v,x):(e.__c=d=new ie(v,x),d.constructor=Z,d.render=Jl),b&&b.sub(d),d.props=v,d.state||(d.state={}),d.context=x,d.__n=o,h=d.__d=true,d.__h=[],d._sb=[]),w&&d.__s==null&&(d.__s=d.state),w&&Z.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=se({},d.__s)),se(d.__s,Z.getDerivedStateFromProps(v,d.__s))),p=d.props,m=d.state,d.__v=e,h)w&&Z.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),w&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(w&&Z.getDerivedStateFromProps==null&&v!==p&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(v,x),!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(v,d.__s,x)===false||e.__v==n.__v){for(e.__v!=n.__v&&(d.props=v,d.state=d.__s,d.__d=false),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(Q){Q&&(Q.__=e)}),S=0;S<d._sb.length;S++)d.__h.push(d._sb[S]);d._sb=[],d.__h.length&&i.push(d);break t}d.componentWillUpdate!=null&&d.componentWillUpdate(v,d.__s,x),w&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(p,m,g)})}if(d.context=x,d.props=v,d.__P=t,d.__e=false,T=it.__r,B=0,w){for(d.state=d.__s,d.__d=false,T&&T(e),u=d.render(d.props,d.state,d.context),N=0;N<d._sb.length;N++)d.__h.push(d._sb[N]);d._sb=[]}else do d.__d=false,T&&T(e),u=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++B<25);d.state=d.__s,d.getChildContext!=null&&(o=se(se({},o),d.getChildContext())),w&&!h&&d.getSnapshotBeforeUpdate!=null&&(g=d.getSnapshotBeforeUpdate(p,m)),J=u,u!=null&&u.type===kt&&u.key==null&&(J=Ma(u.props.children)),a=ka(t,In(J)?J:[J],e,n,o,r,s,i,a,c,l),d.base=e.__e,e.__u&=-161,d.__h.length&&i.push(d),y&&(d.__E=d.__=null)}catch(Q){if(e.__v=null,c||s!=null)if(Q.then){for(e.__u|=c?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;s[s.indexOf(a)]=null,e.__e=a}else{for(et=s.length;et--;)Dr(s[et]);vr(e)}else e.__e=n.__e,e.__k=n.__k,Q.then||vr(e);it.__e(Q,e,n)}else s==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):a=e.__e=Yl(n.__e,e,n,o,r,s,i,c,l);return(u=it.diffed)&&u(e),128&e.__u?void 0:a}function vr(t){t&&t.__c&&(t.__c.__e=true),t&&t.__k&&t.__k.forEach(vr)}function Ea(t,e,n){for(var o=0;o<n.length;o++)Hr(n[o],n[++o],n[++o]);it.__c&&it.__c(e,t),t.some(function(r){try{t=r.__h,r.__h=[],t.some(function(s){s.call(r)})}catch(s){it.__e(s,r.__v)}})}function Ma(t){return typeof t!="object"||t==null||t.__b&&t.__b>0?t:In(t)?t.map(Ma):se({},t)}function Yl(t,e,n,o,r,s,i,a,c){var l,u,d,h,p,m,g,y=n.props,v=e.props,w=e.type;if(w=="svg"?r="http://www.w3.org/2000/svg":w=="math"?r="http://www.w3.org/1998/Math/MathML":r||(r="http://www.w3.org/1999/xhtml"),s!=null){for(l=0;l<s.length;l++)if((p=s[l])&&"setAttribute"in p==!!w&&(w?p.localName==w:p.nodeType==3)){t=p,s[l]=null;break}}if(t==null){if(w==null)return document.createTextNode(v);t=document.createElementNS(r,w,v.is&&v),a&&(it.__m&&it.__m(e,s),a=false),s=null}if(w==null)y===v||a&&t.data==v||(t.data=v);else{if(s=s&&Tn.call(t.childNodes),y=n.props||kn,!a&&s!=null)for(y={},l=0;l<t.attributes.length;l++)y[(p=t.attributes[l]).name]=p.value;for(l in y)if(p=y[l],l!="children"){if(l=="dangerouslySetInnerHTML")d=p;else if(!(l in v)){if(l=="value"&&"defaultValue"in v||l=="checked"&&"defaultChecked"in v)continue;Jn(t,l,null,p,r)}}for(l in v)p=v[l],l=="children"?h=p:l=="dangerouslySetInnerHTML"?u=p:l=="value"?m=p:l=="checked"?g=p:a&&typeof p!="function"||y[l]===p||Jn(t,l,p,y[l],r);if(u)a||d&&(u.__html==d.__html||u.__html==t.innerHTML)||(t.innerHTML=u.__html),e.__k=[];else if(d&&(t.innerHTML=""),ka(e.type=="template"?t.content:t,In(h)?h:[h],e,n,o,w=="foreignObject"?"http://www.w3.org/1999/xhtml":r,s,i,s?s[0]:n.__k&&rn(n,0),a,c),s!=null)for(l=s.length;l--;)Dr(s[l]);a||(l="value",w=="progress"&&m==null?t.removeAttribute("value"):m!=null&&(m!==t[l]||w=="progress"&&!m||w=="option"&&m!=y[l])&&Jn(t,l,m,y[l],r),l="checked",g!=null&&g!=t[l]&&Jn(t,l,g,y[l],r))}return t}function Hr(t,e,n){try{if(typeof t=="function"){var o=typeof t.__u=="function";o&&t.__u(),o&&e==null||(t.__u=t(e))}else t.current=e}catch(r){it.__e(r,n)}}function Ta(t,e,n){var o,r;if(it.unmount&&it.unmount(t),(o=t.ref)&&(o.current&&o.current!=t.__e||Hr(o,null,e)),(o=t.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(s){it.__e(s,e)}o.base=o.__P=null}if(o=t.__k)for(r=0;r<o.length;r++)o[r]&&Ta(o[r],e,n||typeof t.type!="function");n||Dr(t.__e),t.__c=t.__=t.__e=void 0}function Jl(t,e,n){return this.constructor(t,n)}function Cn(t,e,n){var o,r,s,i;e==document&&(e=document.documentElement),it.__&&it.__(t,e),r=(o=typeof n=="function")?null:n&&n.__k||e.__k,s=[],i=[],zr(e,t=(!o&&n||e).__k=_e(kt,null,[t]),r||kn,kn,e.namespaceURI,!o&&n?[n]:r?null:e.firstChild?Tn.call(e.childNodes):null,s,!o&&n?n:r?r.__e:e.firstChild,o,i),Ea(s,t,i)}function Ia(t,e){Cn(t,e,Ia)}function Ql(t,e,n){var o,r,s,i,a=se({},t.props);for(s in t.type&&t.type.defaultProps&&(i=t.type.defaultProps),e)s=="key"?o=e[s]:s=="ref"?r=e[s]:a[s]=e[s]===void 0&&i!=null?i[s]:e[s];return arguments.length>2&&(a.children=arguments.length>3?Tn.call(arguments,2):n),xn(t.type,a,o||t.key,r||t.ref,null)}function ue(t){function e(n){var o,r;return this.getChildContext||(o=new Set,(r={})[e.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){o=null},this.shouldComponentUpdate=function(s){this.props.value!=s.value&&o.forEach(function(i){i.__e=true,gr(i)})},this.sub=function(s){o.add(s);var i=s.componentWillUnmount;s.componentWillUnmount=function(){o&&o.delete(s),i&&i.call(s)}}),n.children}return e.__c="__cC"+wa++,e.__=t,e.Provider=e.__l=(e.Consumer=function(n,o){return n.children(o)}).contextType=e,e}Tn=xa.slice,it={__e:function(t,e,n,o){for(var r,s,i;e=e.__;)if((r=e.__c)&&!r.__)try{if((s=r.constructor)&&s.getDerivedStateFromError!=null&&(r.setState(s.getDerivedStateFromError(t)),i=r.__d),r.componentDidCatch!=null&&(r.componentDidCatch(t,o||{}),i=r.__d),i)return r.__E=r}catch(a){t=a}throw t}},va=0,ie.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=se({},this.state),typeof t=="function"&&(t=t(se({},n),this.props)),t&&se(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),gr(this))},ie.prototype.forceUpdate=function(t){this.__v&&(this.__e=true,t&&this.__h.push(t),gr(this))},ie.prototype.render=kt,$e=[],ya=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ba=function(t,e){return t.__v.__b-e.__v.__b},io.__r=0,_a=/(PointerCapture)$|Capture$/i,Fr=0,pr=Ks(false),mr=Ks(true),wa=0;var tu=0;function f(t,e,n,o,r,s){e||(e={});var i,a,c=e;if("ref"in c)for(a in c={},e)a=="ref"?i=e[a]:c[a]=e[a];var l={type:t,props:c,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--tu,__i:-1,__u:0,__source:r,__self:s};if(typeof t=="function"&&(i=t.defaultProps))for(a in i)c[a]===void 0&&(c[a]=i[a]);return it.vnode&&it.vnode(l),l}var Ie,St,Zo,Zs,sn=0,Pa=[],Et=it,Gs=Et.__b,Xs=Et.__r,Ys=Et.diffed,Js=Et.__c,Qs=Et.unmount,ti=Et.__;function ln(t,e){Et.__h&&Et.__h(St,t,sn||e),sn=0;var n=St.__H||(St.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function z(t){return sn=1,Wr(Oa,t)}function Wr(t,e,n){var o=ln(Ie++,2);if(o.t=t,!o.__c&&(o.__=[n?n(e):Oa(void 0,e),function(a){var c=o.__N?o.__N[0]:o.__[0],l=o.t(c,a);c!==l&&(o.__N=[l,o.__[1]],o.__c.setState({}))}],o.__c=St,!St.__f)){var r=function(a,c,l){if(!o.__c.__H)return true;var u=o.__c.__H.__.filter(function(h){return!!h.__c});if(u.every(function(h){return!h.__N}))return!s||s.call(this,a,c,l);var d=o.__c.props!==a;return u.forEach(function(h){if(h.__N){var p=h.__[0];h.__=h.__N,h.__N=void 0,p!==h.__[0]&&(d=true)}}),s&&s.call(this,a,c,l)||d};St.__f=true;var s=St.shouldComponentUpdate,i=St.componentWillUpdate;St.componentWillUpdate=function(a,c,l){if(this.__e){var u=s;s=void 0,r(a,c,l),s=u}i&&i.call(this,a,c,l)},St.shouldComponentUpdate=r}return o.__N||o.__}function D(t,e){var n=ln(Ie++,3);!Et.__s&&jr(n.__H,e)&&(n.__=t,n.u=e,St.__H.__h.push(n))}function Dt(t,e){var n=ln(Ie++,4);!Et.__s&&jr(n.__H,e)&&(n.__=t,n.u=e,St.__h.push(n))}function R(t){return sn=5,vt(function(){return{current:t}},[])}function La(t,e,n){sn=6,Dt(function(){if(typeof t=="function"){var o=t(e());return function(){t(null),o&&typeof o=="function"&&o()}}if(t)return t.current=e(),function(){return t.current=null}},n==null?n:n.concat(t))}function vt(t,e){var n=ln(Ie++,7);return jr(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function ut(t,e){return sn=8,vt(function(){return t},e)}function zt(t){var e=St.context[t.__c],n=ln(Ie++,9);return n.c=t,e?(n.__==null&&(n.__=true,e.sub(St)),e.props.value):t.__}function Aa(t,e){Et.useDebugValue&&Et.useDebugValue(e?e(t):t)}function Ur(){var t=ln(Ie++,11);if(!t.__){for(var e=St.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function eu(){for(var t;t=Pa.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(oo),t.__H.__h.forEach(yr),t.__H.__h=[]}catch(e){t.__H.__h=[],Et.__e(e,t.__v)}}Et.__b=function(t){St=null,Gs&&Gs(t)},Et.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),ti&&ti(t,e)},Et.__r=function(t){Xs&&Xs(t),Ie=0;var e=(St=t.__c).__H;e&&(Zo===St?(e.__h=[],St.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.forEach(oo),e.__h.forEach(yr),e.__h=[],Ie=0)),Zo=St},Et.diffed=function(t){Ys&&Ys(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Pa.push(e)!==1&&Zs===Et.requestAnimationFrame||((Zs=Et.requestAnimationFrame)||nu)(eu)),e.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Zo=St=null},Et.__c=function(t,e){e.some(function(n){try{n.__h.forEach(oo),n.__h=n.__h.filter(function(o){return!o.__||yr(o)})}catch(o){e.some(function(r){r.__h&&(r.__h=[])}),e=[],Et.__e(o,n.__v)}}),Js&&Js(t,e)},Et.unmount=function(t){Qs&&Qs(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(o){try{oo(o)}catch(r){e=r}}),n.__H=void 0,e&&Et.__e(e,n.__v))};var ei=typeof requestAnimationFrame=="function";function nu(t){var e,n=function(){clearTimeout(o),ei&&cancelAnimationFrame(e),setTimeout(t)},o=setTimeout(n,35);ei&&(e=requestAnimationFrame(n))}function oo(t){var e=St,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),St=e}function yr(t){var e=St;t.__c=t.__(),St=e}function jr(t,e){return!t||t.length!==e.length||e.some(function(n,o){return n!==t[o]})}function Oa(t,e){return typeof e=="function"?e(t):e}function Na(t,e){for(var n in e)t[n]=e[n];return t}function br(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return true;for(var o in e)if(o!=="__source"&&t[o]!==e[o])return true;return false}function ne(t,e){var n=e(),o=z({t:{__:n,u:e}}),r=o[0].t,s=o[1];return Dt(function(){r.__=n,r.u=e,Go(r)&&s({t:r})},[t,n,e]),D(function(){return Go(r)&&s({t:r}),t(function(){Go(r)&&s({t:r})})},[t]),n}function Go(t){var e,n,o=t.u,r=t.__;try{var s=o();return!((e=r)===(n=s)&&(e!==0||1/e==1/n)||e!=e&&n!=n)}catch{return true}}function Ra(t){t()}function Ba(t){return t}function $a(){return[false,Ra]}var Fa=Dt;function _r(t,e){this.props=t,this.context=e}function ou(t,e){function n(r){var s=this.props.ref,i=s==r.ref;return!i&&s&&(s.call?s(null):s.current=null),e?!e(this.props,r)||!i:br(this.props,r)}function o(r){return this.shouldComponentUpdate=n,_e(t,r)}return o.displayName="Memo("+(t.displayName||t.name)+")",o.prototype.isReactComponent=true,o.__f=true,o.type=t,o}(_r.prototype=new ie).isPureReactComponent=true,_r.prototype.shouldComponentUpdate=function(t,e){return br(this.props,t)||br(this.state,e)};var ni=it.__b;it.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),ni&&ni(t)};var ru=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function re(t){function e(n){var o=Na({},n);return delete o.ref,t(o,n.ref||null)}return e.$$typeof=ru,e.render=t,e.prototype.isReactComponent=e.__f=true,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var oi=function(t,e){return t==null?null:be(be(t).map(e))},su={map:oi,forEach:oi,count:function(t){return t?be(t).length:0},only:function(t){var e=be(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:be},iu=it.__e;it.__e=function(t,e,n,o){if(t.then){for(var r,s=e;s=s.__;)if((r=s.__c)&&r.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),r.__c(t,e)}iu(t,e,n,o)};var ri=it.unmount;function Da(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(o){typeof o.__c=="function"&&o.__c()}),t.__c.__H=null),(t=Na({},t)).__c!=null&&(t.__c.__P===n&&(t.__c.__P=e),t.__c.__e=true,t.__c=null),t.__k=t.__k&&t.__k.map(function(o){return Da(o,e,n)})),t}function za(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(o){return za(o,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=true,t.__c.__P=n)),t}function wt(){this.__u=0,this.o=null,this.__b=null}function Ha(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function mt(t){var e,n,o;function r(s){if(e||(e=t()).then(function(i){n=i.default||i},function(i){o=i}),o)throw o;if(!n)throw e;return _e(n,s)}return r.displayName="Lazy",r.__f=true,r}function _n(){this.i=null,this.l=null}it.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),ri&&ri(t)},(wt.prototype=new ie).__c=function(t,e){var n=e.__c,o=this;o.o==null&&(o.o=[]),o.o.push(n);var r=Ha(o.__v),s=false,i=function(){s||(s=true,n.__R=null,r?r(a):a())};n.__R=i;var a=function(){if(!--o.__u){if(o.state.__a){var c=o.state.__a;o.__v.__k[0]=za(c,c.__c.__P,c.__c.__O)}var l;for(o.setState({__a:o.__b=null});l=o.o.pop();)l.forceUpdate()}};o.__u++||32&e.__u||o.setState({__a:o.__b=o.__v.__k[0]}),t.then(i,i)},wt.prototype.componentWillUnmount=function(){this.o=[]},wt.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=Da(this.__b,n,o.__O=o.__P)}this.__b=null}var r=e.__a&&_e(kt,null,t.fallback);return r&&(r.__u&=-33),[_e(kt,null,e.__a?null:t.children),r]};var si=function(t,e,n){if(++n[1]===n[0]&&t.l.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.l.size))for(n=t.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.i=n=n[2]}};function au(t){return this.getChildContext=function(){return t.context},t.children}function cu(t){var e=this,n=t.h;if(e.componentWillUnmount=function(){Cn(null,e.v),e.v=null,e.h=null},e.h&&e.h!==n&&e.componentWillUnmount(),!e.v){for(var o=e.__v;o!==null&&!o.__m&&o.__!==null;)o=o.__;e.h=n,e.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:o.__m},contains:function(){return true},insertBefore:function(r,s){this.childNodes.push(r),e.h.insertBefore(r,s)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),e.h.removeChild(r)}}}Cn(_e(au,{context:e.context},t.__v),e.v)}function lu(t,e){var n=_e(cu,{__v:t,h:e});return n.containerInfo=e,n}(_n.prototype=new ie).__a=function(t){var e=this,n=Ha(e.__v),o=e.l.get(t);return o[0]++,function(r){var s=function(){e.props.revealOrder?(o.push(r),si(e,t,o)):r()};n?n(s):s()}},_n.prototype.render=function(t){this.i=null,this.l=new Map;var e=be(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var n=e.length;n--;)this.l.set(e[n],this.i=[1,0,this.i]);return t.children},_n.prototype.componentDidUpdate=_n.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){si(t,n,e)})};var Wa=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,uu=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,du=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,fu=/[A-Z0-9]/g,hu=typeof document<"u",pu=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function mu(t,e,n){return e.__k==null&&(e.textContent=""),Cn(t,e),typeof n=="function"&&n(),t?t.__c:null}function gu(t,e,n){return Ia(t,e),typeof n=="function"&&n(),t?t.__c:null}ie.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(ie.prototype,t,{configurable:true,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:true,writable:true,value:e})}})});var ii=it.event;function vu(){}function yu(){return this.cancelBubble}function bu(){return this.defaultPrevented}it.event=function(t){return ii&&(t=ii(t)),t.persist=vu,t.isPropagationStopped=yu,t.isDefaultPrevented=bu,t.nativeEvent=t};var Vr,_u={enumerable:false,configurable:true,get:function(){return this.class}},ai=it.vnode;it.vnode=function(t){typeof t.type=="string"&&function(e){var n=e.props,o=e.type,r={},s=o.indexOf("-")===-1;for(var i in n){var a=n[i];if(!(i==="value"&&"defaultValue"in n&&a==null||hu&&i==="children"&&o==="noscript"||i==="class"||i==="className")){var c=i.toLowerCase();i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&a===true?a="":c==="translate"&&a==="no"?a=false:c[0]==="o"&&c[1]==="n"?c==="ondoubleclick"?i="ondblclick":c!=="onchange"||o!=="input"&&o!=="textarea"||pu(n.type)?c==="onfocus"?i="onfocusin":c==="onblur"?i="onfocusout":du.test(i)&&(i=c):c=i="oninput":s&&uu.test(i)?i=i.replace(fu,"-$&").toLowerCase():a===null&&(a=void 0),c==="oninput"&&r[i=c]&&(i="oninputCapture"),r[i]=a}}o=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=be(n.children).forEach(function(l){l.props.selected=r.value.indexOf(l.props.value)!=-1})),o=="select"&&r.defaultValue!=null&&(r.value=be(n.children).forEach(function(l){l.props.selected=r.multiple?r.defaultValue.indexOf(l.props.value)!=-1:r.defaultValue==l.props.value})),n.class&&!n.className?(r.class=n.class,Object.defineProperty(r,"className",_u)):(n.className&&!n.class||n.class&&n.className)&&(r.class=r.className=n.className),e.props=r}(t),t.$$typeof=Wa,ai&&ai(t)};var ci=it.__r;it.__r=function(t){ci&&ci(t),Vr=t.__c};var li=it.diffed;it.diffed=function(t){li&&li(t);var e=t.props,n=t.__e;n!=null&&t.type==="textarea"&&"value"in e&&e.value!==n.value&&(n.value=e.value==null?"":e.value),Vr=null};var wu={ReactCurrentDispatcher:{current:{readContext:function(t){return Vr.__n[t.__c].props.value},useCallback:ut,useContext:zt,useDebugValue:Aa,useDeferredValue:Ba,useEffect:D,useId:Ur,useImperativeHandle:La,useInsertionEffect:Fa,useLayoutEffect:Dt,useMemo:vt,useReducer:Wr,useRef:R,useState:z,useSyncExternalStore:ne,useTransition:$a}}};function xu(t){return _e.bind(null,t)}function yo(t){return!!t&&t.$$typeof===Wa}function Su(t){return yo(t)&&t.type===kt}function ku(t){return!!t&&!!t.displayName&&(typeof t.displayName=="string"||t.displayName instanceof String)&&t.displayName.startsWith("Memo(")}function Cu(t){return yo(t)?Ql.apply(null,arguments):t}function Eu(t){return!!t.__k&&(Cn(null,t),true)}function Mu(t){return t&&(t.base||t.nodeType===1&&t)||null}var Tu=function(t,e){return t(e)},Iu=function(t,e){return t(e)},Pu=kt,Lu=yo,ae={useState:z,useId:Ur,useReducer:Wr,useEffect:D,useLayoutEffect:Dt,useInsertionEffect:Fa,useTransition:$a,useDeferredValue:Ba,useSyncExternalStore:ne,startTransition:Ra,useRef:R,useImperativeHandle:La,useMemo:vt,useCallback:ut,useContext:zt,useDebugValue:Aa,version:"18.3.1",Children:su,render:mu,hydrate:gu,unmountComponentAtNode:Eu,createPortal:lu,createElement:_e,createContext:ue,createFactory:xu,cloneElement:Cu,createRef:Zl,Fragment:kt,isValidElement:yo,isElement:Lu,isFragment:Su,isMemo:ku,findDOMNode:Mu,Component:ie,PureComponent:_r,memo:ou,forwardRef:re,flushSync:Iu,unstable_batchedUpdates:Tu,StrictMode:Pu,Suspense:wt,SuspenseList:_n,lazy:mt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:wu};function qr(t){const e=ne(Ou,Nu);return!!t||e}const Kr=t=>t?{"data-high-contrast":""}:{},Au="(prefers-contrast: more)",Ua=()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia(Au):null;function Ou(t){var n;const e=Ua();return(n=e==null?void 0:e.addEventListener)==null||n.call(e,"change",t),()=>{var o;return(o=e==null?void 0:e.removeEventListener)==null?void 0:o.call(e,"change",t)}}const Nu=()=>{var t;return!!((t=Ua())!=null&&t.matches)},Pn=ue(void 0),Mt=(...t)=>t.filter(Boolean).join(" "),bo=ue(null);function Pe(){return zt(bo)}function de(t="This part"){const e=zt(bo);if(!e)throw new Error(`${t} must be rendered inside <Clover.Root>.`);return e}function rt(t,e=Object.is,n){const{clover:o}=de(n),r=R(null),s=()=>{const i=t(o.store.get());return r.current&&e(r.current.value,i)?r.current.value:(r.current={value:i},i)};return ne(o.store.subscribe,s)}const Ru={subscribe:()=>()=>{}};function Ln(t,e){const n=zt(bo),o=n==null?void 0:n.clover.store,r=()=>o?t(o.get()):e;return ne(o?o.subscribe:Ru.subscribe,r)}const Bu=JSON.parse('{"commonClose":"Close","commonNext":"Next","commonPrevious":"Previous","commonSearch":"Search","commonViewAll":"View all","controlShortcut":"{{label}} ({{shortcut}})","contentSearchLoading":"Loading...","contentSearchPlaceholder":"Search","contentSearchResultsNone":"No results","contentSearchResult":"1 result","contentSearchResults":"{{count}} results","contentSearchError":"The search could not be completed.","contentSearchPosition":"Result {{index}} of {{total}}","contentSearchClear":"Clear search","canvasPosition":"Item {{index}} of {{total}}","canvasImage":"Image","bodyUnloadableImage":"This image could not be loaded.","bodyUnloadableVideo":"This video could not be loaded.","bodyUnloadableAudio":"This audio could not be loaded.","bodyUnloadableModel":"This model could not be loaded.","canvasRoleDescription":"zoomable image","canvasKeysImage":"Use the arrow keys to pan, with Shift for larger steps, plus and minus to zoom, 0 to reset the view, and R or Shift+R to rotate.","canvasKeysMedia":"Press Space or K to play or pause, J or L to skip ten seconds back or forward, and M to mute or unmute.","canvasKeysAnnotations":"Press Escape to clear the selected annotation.","sceneModel":"3D model","sceneRoleDescription":"rotatable 3D model","sceneKeys":"Use the arrow keys to rotate the model, with Shift for larger steps, plus and minus to zoom, 0 to reset the view, and R or Shift+R to rotate it right or left.","sceneRotateUp":"Rotate up","sceneRotateDown":"Rotate down","sceneRotate":"Rotate","sceneResetView":"Reset view","statusLoading":"Loading\u2026","statusError":"This could not be loaded.","itemsLabel":"Items","download":"Download","downloadPage":"This page","downloadAll":"All pages","templateSidebar":"Items","templateSidebarToggle":"Show items","templateBack":"Back","templateBackTo":"Back to {{label}}","collectionLabel":"Collection","itemsScrollBack":"Show previous items","itemsScrollForward":"Show more items","aboutRights":"Rights","aboutDate":"Date","aboutHomepage":"Homepage","aboutSeeAlso":"See also","aboutProvider":"Provider","logo":"Logo","aboutManifest":"IIIF Manifest","aboutCanvas":"IIIF Canvas","aboutPartOf":"Part of","aboutOpenManifest":"Open the full Manifest","aboutCollection":"IIIF Collection","readingLanguage":"Language","annotationsHide":"Hide annotations","annotationsHideTip":"Hide","readMore":"Read more","readLess":"Read less","annotationsShow":"Find on the image","annotationsShowTime":"Find in the recording","annotationsImage":"Image","annotationsLanguage":"Language","annotationsOpenLink":"Open the link","transcriptLabel":"Transcript","imageViewerOpen":"Open image viewer","imageViewerClose":"Close image viewer","canvasChoice":"Choice","canvasViewerControls":"Viewer controls","canvasExpandControls":"Expand viewer controls","canvasCollapseControls":"Collapse viewer controls","canvasScrollBack":"Show previous controls","canvasScrollForward":"Show more controls","imageFullScreen":"Full screen","imageExitFullScreen":"Exit full screen","imageResetZoom":"Reset zoom","imageRotateLeft":"Rotate left","imageRotateRight":"Rotate right","imageZoomIn":"Zoom in","imageZoomOut":"Zoom out","informationPanelTabs":"Information panel","sectionsScrollBack":"Show previous tabs","sectionsScrollForward":"Show more tabs","informationPanelClose":"Close information panel","informationPanelTabsAbout":"About","informationPanelTabsAnnotations":"Annotations","informationPanelTabsSearch":"Search","informationPanelTabsContents":"Contents","contentsSectionsIn":"Sections in","informationPanelTabsMap":"Map","informationPanelTabsCollection":"Collection","informationPanelTabsTargets":"Views","mapUnavailable":"The map could not be shown.","mapLabel":"Map","mapAttribution":"Map credits","mapPlaceUntitled":"Place {{number}}","mapOverlay":"Georeferenced image","mapPlacesListed":"Places listed after the map: {{count}}","informationPanelToggle":"More information","playerPlay":"Play","playerPause":"Pause","playerMute":"Mute","playerUnmute":"Unmute","playerVolume":"Volume","playerSeek":"Seek","playerCaptions":"Captions","playerCaptionsOff":"Off","playerChapters":"Chapters","playerFill":"Fill frame","playerFit":"Fit to frame","frameRepeat":"Repeat","playerCurrentTime":"Current time","playerDuration":"Duration","splitHandle":"Resize panels"}'),ja={es:()=>import("../es-B1NvdYp-.mjs"),fi:()=>import("../fi-BjtYZNLo.mjs"),fr:()=>import("../fr-Cd22Lziw.mjs"),nb:()=>import("../nb-CEwZDBiR.mjs"),nn:()=>import("../nn-jYQhr9RI.mjs"),no:()=>import("../no-CEwZDBiR.mjs"),pt:()=>import("../pt-CWR30SzS.mjs")};function Va(){const t=[];return typeof document<"u"&&t.push(document.documentElement.lang),typeof navigator<"u"&&t.push(...navigator.languages??[],navigator.language),t.filter(Boolean)}const ao=t=>t.split("-")[0];function qa(t,e){return ao(t).toLowerCase()===ao(e).toLowerCase()}const Xo=t=>t.includes("-")?ao(t):null;function $u(t,e,n=[]){if(!e.length)return;if(e.length===1)return e[0];const o=()=>e.includes("none")?"none":e.includes("@none")?"@none":e[0];if(!t)return e.includes("none")?"none":e[0];if(e.includes(t))return t;const r=Xo(t);if(r&&e.includes(r))return r;const s=n.find(a=>e.includes(a));if(s)return s;const i=e.findIndex(a=>Xo(a)===t);if(i!==-1)return e[i];for(const a of n){const c=Xo(a);if(c&&e.includes(c))return c}return o()}function Zr(t,e){const[n,...o]=e?[e]:Va();return $u(n,t,o)??t[0]}const ge="clover",ee={en:{[ge]:{...Bu}}};let en,Ka=[],co=0;const wr=new Set;function Gr(){co++,wr.forEach(t=>t())}function Fu(t){const e=ao(t);return e&&e!==t?[t,e]:[t]}const ui=new Map,Du=t=>Object.prototype.hasOwnProperty.call(ja,t);function zu(t){let e=ui.get(t);return e||(e=ja[t]().then(({default:n})=>{var o;ee[t]={...ee[t],[ge]:{...n,...(o=ee[t])==null?void 0:o[ge]}},Gr()},()=>{}),ui.set(t,e)),e}function Za(t){const e=t.find(n=>n==="en"||Du(n));return e&&e!=="en"?zu(e):Promise.resolve()}let Qn=[],di="";function wn(){const t=en?`${co}`:`${co} ${typeof document<"u"?document.documentElement.lang:""} ${typeof navigator<"u"?navigator.languages:""}`;if(t===di)return Qn;di=t;const e=en?[en]:Va();return Qn=[...new Set([...e,...Ka].flatMap(Fu).concat("en"))],Za(Qn),Qn}function _o(t,e){if(t)return qa(t,e||te.resolvedLanguage)?void 0:t}const te={get language(){return en??wn().find(t=>ee[t])??"en"},get resolvedLanguage(){return wn().find(t=>{var e;return Object.keys(((e=ee[t])==null?void 0:e[ge])??{}).length>0})??"en"},changeLanguage(t){en=t,Gr()},resolve(t,e,n=ge){var r,s;let o={text:t};for(const i of wn()){const a=(s=(r=ee[i])==null?void 0:r[n])==null?void 0:s[t];if(a!==void 0){o={text:a,lang:i};break}}return e?{...o,text:o.text.replace(/\{\{(\w+)\}\}/g,(i,a)=>a in e?String(e[a]):i)}:o},t(t,e,n=ge){return te.resolve(t,e,n).text},langOf(t,e,n=ge){return _o(te.resolve(t,void 0,n).lang,e)},ready(){return Za(wn())},subscribe(t){return wr.add(t),()=>{wr.delete(t)}},getSnapshot(){return co}};typeof document<"u"&&wn();function Hu(t={}){for(const[e,n]of Object.entries(t.resources??{}))for(const[o,r]of Object.entries(n??{}))ee[e]??(ee[e]={}),ee[e][o]={...ee[e][o],...r};return t.fallbackLng!==void 0&&(Ka=t.fallbackLng===false?[]:[t.fallbackLng].flat()),t.lng&&(en=t.lng),Gr(),te}const Wu=Object.freeze(Object.defineProperty({__proto__:null,CLOVER_I18N_NAMESPACE:ge,cloverI18n:te,initCloverI18n:Hu,langWithin:_o},Symbol.toStringTag,{value:"Module"}));function Pt(t=ge,e){const n=ne(te.subscribe,te.getSnapshot,te.getSnapshot),o=zt(Pn),r=e??o,s=ut((a,c)=>te.t(a,c,t),[t,n]),i=ut(a=>te.langOf(a,r,t),[t,n,r]);return{t:s,langOf:i,hostLanguage:r,i18n:te}}function wo(t,e){const n=zt(Pn),o=R(null),[r,s]=z(""),i=ut(u=>{o.current=u,typeof t=="function"?t(u):t&&(t.current=u)},[t]);D(()=>{var d,h;const u=(d=o.current)==null?void 0:d.parentElement;e!==void 0||n!==void 0||!u||s(((h=u.closest("[lang]"))==null?void 0:h.getAttribute("lang"))??"")});const c=e??n??r,{langOf:l}=Pt(void 0,c);return{ref:i,hostLanguage:c,langOf:l}}const H=t=>Array.isArray(t)?t:t==null?[]:[t],Uu=["left-to-right","right-to-left","top-to-bottom","bottom-to-top"];function Xr(t){return Uu.includes(t)?t:"left-to-right"}const ju=["individuals","paged","continuous","unordered"];function Vu(t){return H(t).find(n=>ju.includes(n))??"individuals"}function qu(t,e){if(!t.length)return[];if(e==="continuous")return[t.map((a,c)=>c)];if(e!=="paged")return t.map((a,c)=>[c]);const n=[];let o=[],r=0,s=false;const i=()=>{o.length&&n.push(o),o=[]};return t.forEach((a,c)=>{const l=H(a.behavior);if(l.includes("non-paged")){c===r&&r++,i(),n.push([c]);return}if(c===r||l.includes("facing-pages")){o.length&&(s=true),i(),n.push([c]);return}if(o.push(c),s){i(),s=false;return}o.length>1&&i()}),i(),n}function Ku(t,e){const n=t.findIndex(o=>o.includes(e));return n===-1?0:n}const Ga=["Independents","Composite","List"];function xo(t){return H(t==null?void 0:t.body).flatMap(e=>Ga.includes(e==null?void 0:e.type)?H(e.items):[e])}function Yr(t){const e=H(t==null?void 0:t.motivation);return!e.length||e.includes("painting")}function Xa(t,e){const n=/(?:^|[#&])t=([^&]+)/.exec(e),o=n&&{t:n[1]},r=/(?:^|[#&])xywh=(?:pixel:)?([^&]+)/.exec(e);if(r){const[s,i,a,c]=r[1].split(",").map(Number);if([s,i,a,c].every(Number.isFinite))return{id:t,rect:{x:s,y:i,w:a,h:c},...o}}return o&&{id:t,...o}}function to(t){const e=t.indexOf("#");if(e>=0){const o=t.slice(0,e);return Xa(o,t.slice(e))??{id:o}}const n=t.indexOf("&t=");return n>=0?{id:t.slice(0,n),t:t.slice(n+3)}:{id:t}}const xr=t=>{var e;return Array.isArray(t)?xr(t[0]):Ga.includes(t==null?void 0:t.type)?xr((e=t.items)==null?void 0:e[0]):t};function un(t){return Zu(xr(t))}function Zu(t){var n;if(typeof t=="string")return to(t);if(!t||typeof t!="object")return{id:""};if(t.type!=="SpecificResource"||t.source===void 0)return to(t.id??"");const e=typeof t.source=="string"?to(t.source):to(((n=t.source)==null?void 0:n.id)??"");for(const o of H(t.selector)){const r=o;if((r==null?void 0:r.type)==="PointSelector"){const[s,i,a]=[r.x,r.y,r.instant??r.t].map(Number),c=Number.isFinite(s)&&Number.isFinite(i);return{id:e.id,...c?{point:{x:s,y:i}}:{},...Number.isFinite(a)?{t:String(a)}:{}}}if((r==null?void 0:r.type)==="SvgSelector"&&r.value)return{id:e.id,svg:String(r.value)};if((r==null?void 0:r.type)==="FragmentSelector"&&r.value){const s=Xa(e.id,String(r.value));if(s)return s}}return e}const An=t=>t==="Audio"||t==="Sound",Gu=t=>{const e=H(t);return e.length>0&&e.every(n=>n==="supplementing")},Xu=(t,e)=>Gu(t)&&!!(e.rect||e.svg||e.point)&&!e.t,fi=new WeakMap,Yu={canvases:[],views:[],direction:"left-to-right"};function At(t){if(!t)return Yu;let e=fi.get(t);if(!e){const n=(t.items??[]).filter(o=>(o==null?void 0:o.type)==="Canvas"||(o==null?void 0:o.type)==="Timeline"||(o==null?void 0:o.type)==="Scene");e={canvases:n,views:qu(n,Vu(t.behavior)),direction:Xr(t.viewingDirection)},fi.set(t,e)}return e}const hi=new WeakMap;function We(t,e){if(!e)return null;const n=At(t);let o=hi.get(n);if(!o){o=new Map;for(const r of n.canvases)o.has(r.id)||o.set(r.id,r);hi.set(n,o)}return o.get(e)??null}function On(t,e){const{canvases:n,views:o}=At(t),r=n.findIndex(s=>s.id===e);return r===-1?0:Ku(o,r)}const pi=new WeakMap,Ju=[];function De(t,e){if(!t)return Ju;const n=On(t,e);let o=pi.get(t);o||pi.set(t,o=new Map);let r=o.get(n);if(!r){const s=At(t);r=(s.views[n]??[]).map(i=>s.canvases[i]),o.set(n,r)}return r}function Qu(t,e){var s,i;const{canvases:n,views:o}=At(t),r=(s=o[e])==null?void 0:s[0];return r===void 0?null:((i=n[r])==null?void 0:i.id)??null}function td(t){const e=t==null?void 0:t.start;if(!e)return null;const n=un(e);if(!n.id)return null;const o={canvasId:n.id};n.rect&&(o.region=n.rect);const r=n.t?Number(n.t.split(",")[0]):NaN;return Number.isFinite(r)&&(o.time=r),o}const Ne=(t,e)=>{const n=t==null?void 0:t.behavior;return Array.isArray(n)?n.includes(e):n===e},ed=t=>[(t==null?void 0:t.partOf)??[]].flat().find(e=>(e==null?void 0:e.id)&&e.type==="Collection");function nd(t,e,n,o){const r=t==null?void 0:t.items;if(!(r!=null&&r.length)||!n)return-1;const s=De(n,o),i=a=>{const c=r[a];return((c==null?void 0:c.manifestId)===n.id||(c==null?void 0:c.manifestAs)===n.id)&&(!c.canvasId||s.some(l=>l.id===c.canvasId))};return e!==null&&i(e)?e:r.findIndex((a,c)=>i(c))}function _t(t,e,n=", "){if(!t)return{text:""};if(typeof t=="string")return{text:t};const o=Object.keys(t).filter(a=>{var c;return(c=t[a])==null?void 0:c.length});if(!o.length)return{text:""};const r=Zr(o,e),s=t[r];return{text:Array.isArray(s)?s.join(n):String(s),lang:r==="none"?void 0:r}}const od=/^[A-Za-z]{2,8}(-[A-Za-z0-9]{1,8})*$/;function En(t){const e=t==null?void 0:t.language,n=(Array.isArray(e)?e:[e]).filter(o=>typeof o=="string"&&od.test(o));return n.length===1?n[0]:void 0}const ze={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",whiteSpace:"nowrap",border:0},rd=/^(ar|arc|ckb|dv|fa|he|iw|ks|ps|sd|syr|ug|ur|yi)$/,sd=/^(adlm|arab|hebr|nkoo|rohg|syrc|thaa)$/;function id(t){if(!t)return;const[e,...n]=t.toLowerCase().split(/[-_]/),o=n.find(r=>r.length===4);return(o?sd.test(o):rd.test(e))?"rtl":void 0}function lt(t){return t?{lang:t,dir:id(t)}:{}}function ad({clover:t,language:e}){const{t:n,langOf:o}=Pt(),[r,s]=z(null),i=R(n);return i.current=n,D(()=>{let a=null;return t.store.subscribe(()=>{const{manifest:c,canvasId:l,status:u}=t.store.get();if(u!=="ready"||l===a)return;const d=a===null;if(a=l,d)return;const h=We(c,l),p=_t(h==null?void 0:h.label,e),m=i.current("canvasPosition",{index:On(c,l)+1,total:At(c).views.length});s({label:p.text,lang:p.lang,position:m})})},[t,e]),f("div",{className:"clover-announcer",role:"status","aria-live":"polite","aria-atomic":"true",style:ze,children:[r!=null&&r.label?f(kt,{children:[f("span",{...lt(r.lang),children:r.label}),","," "]}):null,r&&f("span",{...lt(o("canvasPosition")),children:r.position})]})}const cd=t=>(t==null?void 0:t.format)==="text/vtt"||typeof(t==null?void 0:t.id)=="string"&&/\.vtt(\?|$)/i.test(t.id);function ld(t){const e=[];let n=0;const o=(r,s)=>{var a;if(!r||cd(r))return;if(r.type==="SpecificResource"){r.source&&typeof r.source=="object"&&o(r.source,s);return}const i=s===void 0?{}:{choice:s};if(r.type==="TextualBody"||typeof r.value=="string")e.push({value:String(r.value??""),format:r.format,language:H(r.language)[0],...i});else if(r.type==="Image"&&r.id){const c=r.label??t.label;e.push({image:r.id,format:r.format,...c?{label:c}:{},...i})}else if(r.type==="Feature"){const c=((a=r.properties)==null?void 0:a.label)??t.label;c&&typeof c=="object"&&e.push({label:c,place:true,...i})}};for(const r of xo(t))if((r==null?void 0:r.type)!=="Choice")o(r);else{const s=n++;for(const i of H(r.items))o(i,s)}return e}const Jr="content-search",mi=/\/search\/([0-2])\//;function Ya(t){if(!t)return null;let e=null;for(const n of H(t.service)){const o=(n==null?void 0:n.id)??(n==null?void 0:n["@id"]);if(typeof o!="string")continue;const r=String(n.type??n["@type"]??""),s=[n.profile,n["@context"]].flat().map(a=>String(a??"")).join(" "),i=r==="SearchService2"?2:r==="SearchService1"?1:mi.test(s)?Number(mi.exec(s)[1])>=2?2:1:null;if(i===2)return{id:o,version:i};i===1&&(e??(e={id:o,version:i}))}return e}const ud="contents",jv=(t,e)=>`${t}#region-${e+1}`,dd=t=>H(t==null?void 0:t.motivation).includes("linking");function Ja(t,e,n){const o=[];for(const r of H(t==null?void 0:t.items)){const s=H(r==null?void 0:r.motivation);if(s.includes("painting"))continue;const i=ld(r);if(!i.length&&!dd(r))continue;const a=un(H(r.target)[0]),c=a.id||n;!c||!r.id||o.push({id:r.id,setId:e,canvasId:c,target:a,motivation:s,bodies:i,annotation:r})}return o}const fd=t=>At(t).canvases.some(e=>H(e.items).some(n=>H(n==null?void 0:n.items).some(o=>H(o==null?void 0:o.body).some(r=>[r,...H(r==null?void 0:r.items)].some(s=>H(s==null?void 0:s.annotations).length>0)))));function hd(t,e){for(const n of[t,e])if(n!=null&&n.label)return n.label;for(const n of[t,e]){const o=H(n==null?void 0:n.partOf).find(r=>/AnnotationCollection/.test(String((r==null?void 0:r.type)??(r==null?void 0:r["@type"])))&&r.label);if(o)return o.label}}const Qa=t=>H(t==null?void 0:t.partOf).filter(e=>(e==null?void 0:e.id)&&/AnnotationCollection/.test(String((e==null?void 0:e.type)??(e==null?void 0:e["@type"])))),gi=new WeakMap;function tc(t){var n;if(!t)return[];let e=gi.get(t);if(!e){const o=new Map;for(const r of At(t).canvases)for(const s of H(r.annotations)){if(!Array.isArray(s==null?void 0:s.items))continue;const i=s.id??`${r.id}#annotations`;let a=o.get(i);if(!a){const c=(n=Qa(s)[0])==null?void 0:n.id;a={id:i,label:hd(s),source:"manifest",entries:[],...c?{collection:c}:{}},o.set(i,a)}a.entries.push(...Ja(s,i,r.id))}e=[...o.values()].filter(r=>r.entries.length),gi.set(t,e)}return e}const vi=new WeakMap,ec=[];function Vv(t){if(!t)return ec;let e=vi.get(t);return e||(e=At(t).canvases.flatMap(n=>H(n.annotations).filter(o=>o==null?void 0:o.id).map(o=>({id:String(o.id),canvasId:String(n.id),fetched:Array.isArray(o.items)}))),vi.set(t,e)),e}const Yo=new WeakMap,Jo=new WeakMap;function nc(t,e=pd){var n;if(!Jo.has(e)){const o=e.filter(s=>s.content),r=(n=o[0])==null?void 0:n.content;Jo.set(e,r?{id:r.id,type:r.type,...r.label?{label:r.label}:{},pages:ec,entries:o.flatMap(s=>s.entries)}:null)}return Jo.get(e)??md(t)}const pd=[];function md(t){var r;if(!t)return null;if(Yo.has(t))return Yo.get(t);const e=At(t).canvases.flatMap(s=>H(s.annotations).flatMap(i=>Qa(i).map(a=>({part:a,page:i,canvas:s})))),n=(r=e[0])==null?void 0:r.part.id,o=n?(()=>{var l,u;const s=e.filter(({part:d})=>d.id===n),i=(l=s.find(({part:d})=>d.label))==null?void 0:l.part.label,a=Number((u=s.find(({part:d})=>d.total))==null?void 0:u.part.total),c=tc(t);return{id:n,type:"AnnotationCollection",...i?{label:i}:{},...a>0?{total:a}:{},pages:s.map(({page:d,canvas:h})=>({id:String(d.id),canvasId:String(h.id),fetched:Array.isArray(d.items)})),entries:s.flatMap(({page:d})=>{var h;return((h=c.find(p=>p.id===d.id))==null?void 0:h.entries)??[]})}})():null;return Yo.set(t,o),o}const yi=new WeakMap,bi=[];function Qr(t,e){const n=tc(t);if(!e.length)return n.length?n:bi;const o=t??bi;let r=yi.get(o);r||yi.set(o,r=new Map);let s=r.get(e);if(!s){const i=new Set(n.map(a=>a.id));s=[...n,...e.filter(a=>!i.has(a.id)&&!!i.add(a.id))],r.set(e,s)}return s}const _i=new WeakMap;function oc(t,e,n,o=null){const r=Qr(t,e),s=n!=null&&n.entries.length?n:null;if(!o&&!s)return r;let i=_i.get(r);i||_i.set(r,i=new Map);let a=i.get(o);a||i.set(o,a=new Map);let c=a.get(s);return c||(c=[...r,...o?[o]:[],...s?[s]:[]],a.set(s,c)),c}const gd=t=>Number(t==null?void 0:t.duration)>0;function rc(t,e){return t.source==="search"||!t.entries.length?false:t.entries.every(n=>Xu(n.motivation,n.target)&&!gd(e(n.canvasId)))}const wi=new WeakMap;function vd(t,e){const n=Qr(t,e);let o=wi.get(n);if(!o){const r=n.filter(s=>!rc(s,i=>We(t,i)??void 0));o=r.length===n.length?n:r,wi.set(n,o)}return o}const xi=new WeakMap;function ts(t,e,n,o){const r=Qr(t,e),s=xi.get(r);if(s&&s.hidden===n&&s.shown===o)return s.ids;const i=r.filter(c=>!n.includes(c.id)&&!o.includes(c.id)&&rc(c,l=>We(t,l)??void 0)).map(c=>c.id),a=i.length?[...n,...i]:n;return xi.set(r,{hidden:n,shown:o,ids:a}),a}const Si=new WeakMap;function yd(t,e,n,o){const r=ts(t,e,n,o),s=Si.get(r);if(s&&s.hidden===n)return s.ids;const i=[Jr,ud,...r.filter(a=>!n.includes(a))];return Si.set(r,{hidden:n,ids:i}),i}function bd(t){for(const e of H(t==null?void 0:t.target)){const n=(e==null?void 0:e.type)==="SpecificResource"?e.source:e,o=H(n==null?void 0:n.partOf).find(r=>(r==null?void 0:r.id)&&(!r.type||r.type==="Manifest"));if(o)return o.id}}function Qo(t,e){if(!e)return null;for(const n of t){const o=n.entries.find(r=>r.id===e);if(o)return o}return null}function sc(t){return btoa(encodeURIComponent(JSON.stringify(t))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function ic({manifestId:t,canvasId:e,type:n="Canvas",region:o,time:r}){const s={id:e,type:n,...t&&t!==e?{partOf:[{id:t,type:"Manifest"}]}:{}},i=r!=null&&r>0?`t=${Math.round(r*100)/100}`:o?`xywh=${[o.x,o.y,o.w,o.h].map(Math.round).join(",")}`:null,a={"@context":`http://iiif.io/api/presentation/${n==="Canvas"?3:4}/context.json`,id:`${e}#content-state`,type:"Annotation",motivation:["contentState"],target:i?{type:"SpecificResource",source:s,selector:{type:"FragmentSelector",value:i}}:s};return{json:a,encoded:sc(a)}}const _d=Object.freeze(Object.defineProperty({__proto__:null,buildContentState:ic,encodeContentState:sc},Symbol.toStringTag,{value:"Module"})),wd=/iiif\.io\/api\/presentation\/4\/context\.json/;function ac(t){const e=t==null?void 0:t["@context"];return(Array.isArray(e)?e:[e]).some(o=>typeof o=="string"&&wd.test(o))}let ki=null,Ci=null;function es(){return Ci??(Ci=import("../upgrade-eNW0DPXq.mjs")),ki??(ki=import("../upgrader-BlbMUEH6.mjs").then(({upgradePresentation3To4:t})=>t)),Promise.all([ki,Ci])}async function He(t){if(ac(t))return t;const[e,{upgrade:n}]=await es();return await n(t,e)}function ns(t,e,n={}){return((t==null?void 0:t.fetch)??globalThis.fetch)(e,{credentials:(t==null?void 0:t.credentials)??"same-origin",...n,headers:{...n.headers,...t==null?void 0:t.headers}})}const xd=t=>(t==null?void 0:t.credentials)==="include",Sd=t=>JSON.stringify([t==null?void 0:t.credentials,t==null?void 0:t.headers]);class kd extends Error{constructor(e,n,o){super(e),this.url=n,this.status=o,this.name="CloverRequestError"}}async function an(t,e,n){const o=await ns(t,e,{signal:n,headers:{Accept:"application/ld+json, application/json"}});if(!o.ok)throw new kd(`${e} answered ${o.status}`,e,o.status);return o.json()}const Ei=()=>import("./content-state-reader-CP0H4Gnm.mjs");function Mi(t){const e=t;return!e||typeof e!="object"?false:e.type==="Annotation"?H(e.motivation).includes("contentState"):e.type==="SpecificResource"}const Cd=["summary","metadata","requiredStatement","rights","provider","homepage","seeAlso","rendering","thumbnail","navDate","partOf"];function Ed(t){const e={"@context":Td,id:t.id,type:"Manifest",label:t.label??{none:[""]},items:[t]};for(const n of Cd)t[n]!==void 0&&n!=="label"&&(e[n]=t[n]);return e}const Ti=t=>{var e,n;return!!t&&((n=(e=t.items)==null?void 0:e[0])==null?void 0:n.id)===t.id},Md=/^(oa:)?Annotation(Page|Collection)$/;class eo extends Error{constructor(){super(...arguments);P(this,"name","CloverContentError")}}const Td="http://iiif.io/api/presentation/4/context.json",Id=t=>/^https?:\/\//i.test(t);async function Sr(t,{request:e,signal:n}){return Array.isArray(t.items)&&t.items.length>0||!t.id?t:await an(e,t.id,n)}const Pd=50;async function os(t,e){const n=t;if(Array.isArray(n.items)&&n.items.length||!n.first)return t;const o=[],r=new Set;let s=n.first;for(let i=0;s&&i<Pd;i++){const a=typeof s=="string"?{id:s}:s;if(r.has(a.id??a))break;r.add(a.id??a);const c=a.items?a:await an(e.request,a.id,e.signal),l=await He({"@context":c["@context"]??n["@context"],...c,type:"Collection"});o.push(...l.items??[]),s=c.next}return{...n,items:o}}async function cc(t,e={}){return He(await Sr(t,e))}async function lc(t,e,n=0){for(const o of t.items??[]){if(o.type==="Manifest")return He(await Sr(o,e));if(o.type==="Collection"&&n<8){const r=await os(await He(await Sr(o,e)),e),s=await lc(r,e,n+1);if(s)return s}}return null}async function Ld(t,{request:e,signal:n}={}){es();const o=typeof t=="string"?await an(e,t.trim(),n):t,r=await He(o);return r.type==="Collection"?os(r,{request:e,signal:n}):r}async function Ad(t,e={}){var d;const{request:n,signal:o}=e;es();let r,s,i,a,c;const l=async h=>{const{resolveContentState:p}=await Ei(),m=p(h);if(!m)throw new eo("Unreadable content state");return r=m.target??r,s=m.manifestId??s,i=m.annotation??i,a=m.targets??a,an(n,m.id,o)};if(typeof t=="string")if(Id(t.trim()))c=await an(n,t.trim(),o);else{const{decodeContentState:h}=await Ei(),p=h(t);if(!p)throw new eo("Unreadable iiifContent");c=Mi(p)?await l(p):p}else c=t;if(Mi(c)&&(c=await l(c)),Md.test(String((c==null?void 0:c.type)??""))){const{annotationsContent:h}=await import("./annotations-content-Jts8hjGT.mjs");return h(c,e)}const u=await He(c);switch((d=o==null?void 0:o.throwIfAborted)==null||d.call(o),u.type){case"Manifest":return{manifest:u,target:r,annotation:i,targets:a};case"Collection":{const h=await os(u,e),p=e.manifestId??s,m=p?(h.items??[]).find(y=>y.id===p&&y.type==="Manifest"):void 0,g=m?await cc(m,e):await lc(h,e);if(!g)throw new eo("The Collection holds no Manifest");return{manifest:g,collection:h,target:r,annotation:i,targets:a}}case"Canvas":case"Timeline":case"Scene":{const h=u;return r??(r={canvasId:h.id}),{manifest:Ed(h),target:r,annotation:i}}default:throw new eo(`Cannot show a ${String(u.type??"resource without a type")}`)}}const uc=t=>!!(t!=null&&t.id)&&t.type==="AnnotationPage"&&!t.items;function Ii(t){const e=[];for(const n of t)for(const o of["items","annotations"])for(const r of n[o]??[])uc(r)&&e.push([n.id,o,r.id]);return e}async function Od(t,e,n,o){return Nd(await an(n,t,o),e)}async function Nd(t,e="urn:clover:annotation-page"){var r;const n=t;return ac(n)?n:((r=(await He({"@context":n["@context"]??"http://iiif.io/api/presentation/3/context.json",id:e,type:"Canvas",items:[{...n,"@context":void 0}]})).items)==null?void 0:r[0])??n}function Rd(t,e){const n=t,o=e,r=c=>Array.isArray(c)?c:c?[c]:[],s=r(n.partOf),i=r(o.partOf),a=[...s.map(c=>({...i.find(l=>l.id&&l.id===c.id),...c})),...i.filter(c=>!s.some(l=>l.id===c.id))];return{...t,...n.label===void 0&&o.label!==void 0&&{label:o.label},...a.length&&{partOf:a}}}function Bd(t,e,n,o){let r=false;const s=(t.items??[]).map(i=>{if(i.id!==e||!Array.isArray(i[n]))return i;const a=i[n].map(c=>c.id!==o.id||!uc(c)?c:(r=true,Rd(o,c)));return r?{...i,[n]:a}:i});return r?{...t,items:s}:t}function $d(t){let e=t;const n=new Set;return{get:()=>e,set(o){const r=typeof o=="function"?o(e):o;Object.keys(r).some(i=>!Object.is(r[i],e[i]))&&(e={...e,...r},n.forEach(i=>i()))},subscribe(o){return n.add(o),()=>n.delete(o)}}}function Ye(t){let e=t;const n=new Set;return{get:()=>e,emit(o){e=o,n.forEach(r=>r(o))},subscribe(o){return n.add(o),()=>n.delete(o)}}}function Fd(t,e,n){return{position:e,total:n,hasPrevious:e>0,hasNext:e+1<n,previous:()=>t.previous(),next:()=>t.next(),first:()=>t.first(),last:()=>t.last(),goTo:o=>t.goTo(o)}}const kr={query:"",status:"idle",hits:[],set:null},Pi={status:"idle",error:null,manifest:null,collection:null,throughCollection:false,canvasId:null,target:null,annotationId:null,hiddenSets:[],shownSets:[],addedSets:[],search:kr,regions:null,targets:null,targetIndex:null};function Dd(t={}){const e=$d(Pi),n=Ye(null),o=Ye(null),r=Ye(null),s=Ye(null),i=Ye(null),a=Ye(null);let c=null,l=null,u=[],d=[],h=[],p=0,m=null,g=null,y=null;const v=(_,k)=>{!g||_===k||(g={...g,items:g.items.map(I=>I.manifestId===_&&I.manifestAs!==k?{...I,manifestAs:k}:I)})},w=_=>{var I;const k=(I=e.get().manifest)==null?void 0:I.id;return!!k&&(k===_.manifestId||k===_.manifestAs)},b=()=>u.length||d.length||h.length?[...u,...d,...h]:Pi.addedSets;let x=t.request,S=null;const T=new Set;let B="view",N=0;const J=(_,k,I)=>{if(T.has(I))return;T.add(I);const F=S==null?void 0:S.signal;Od(I,_,x,F).then(O=>{F!=null&&F.aborted||e.set(L=>L.manifest?{manifest:Bd(L.manifest,_,k,O)}:{})}).catch(()=>T.delete(I))},et=()=>{const{manifest:_,canvasId:k}=e.get();if(_)for(const[I,F,O]of Ii(B==="all"||N>0?At(_).canvases:De(_,k)))J(I,F,O)};e.subscribe(et);const Z=(_,k,I,F,O)=>{var Vt,q,j;const{canvases:L}=At(_),U=dt=>!!dt&&L.some(Ct=>Ct.id===dt),X=td(_),bt=U(I==null?void 0:I.canvasId)?I:U(X==null?void 0:X.canvasId)?X:null,tt=U(F.canvasId)?F.canvasId:(bt==null?void 0:bt.canvasId)??(U(F.defaultCanvasId)?F.defaultCanvasId:null)??((Vt=L[0])==null?void 0:Vt.id)??null;l==null||l.abort();const pt=O&&((q=Qo(h,O))==null?void 0:q.canvasId)===tt?O:null,ft=bt&&pt?{...bt,region:void 0}:bt,Bt=++p;u=[],e.set({status:"ready",search:kr,regions:null,manifest:_,collection:k,canvasId:tt,target:ft&&ft.canvasId===tt?ft:null,addedSets:b(),annotationId:pt,targets:g});const Nt=_==null?void 0:_.structures;Array.isArray(Nt)&&JSON.stringify(Nt).includes("xywh=")&&import("./range-regions-ulWKWvhS.mjs").then(({contentsSet:dt})=>{p===Bt&&e.set({regions:dt(_)})}),fd(_)&&import("./image-layers-C3YwnNvq.mjs").then(({imageLayers:dt})=>{p===Bt&&(u=dt(_),e.set({addedSets:b()}))}),tt&&tt!==F.canvasId&&((j=t.onCanvasChange)==null||j.call(t,tt))},Q=(_,k)=>e.set(I=>{const F=I.hiddenSets.filter(L=>L!==_),O=I.shownSets.filter(L=>L!==_);return k?{hiddenSets:F,shownSets:[...O,_]}:{hiddenSets:[...F,_],shownSets:O}}),M=(_,k)=>{var F,O,L;if(!_)return;if((F=t.isControlled)!=null&&F.call(t)){k&&e.set({target:k}),(O=t.onCanvasChange)==null||O.call(t,_);return}const I=e.get().canvasId!==_;e.set({canvasId:_,target:k}),I&&((L=t.onCanvasChange)==null||L.call(t,_))},E=(_,k=false)=>{const{manifest:I}=e.get(),F=Qu(I,_);M(F,F&&k?{canvasId:F,autoplay:k}:null)},A=()=>{const{manifest:_,canvasId:k}=e.get();return{at:On(_,k),total:At(_).views.length}},W=()=>{S==null||S.abort();const _=new AbortController;return S=_,T.clear(),e.set({status:"loading",error:null,annotationId:null}),_.signal},V=_=>e.set({status:"error",error:_ instanceof Error?_:new Error(String(_))});async function G(_,k={}){var F;const I=W();try{const O=await Ad(_,{request:x,signal:I,manifestId:k.manifestId??void 0});if(I.aborted)return;const L=O.annotation,U=L?Ja({items:[L]},`${L.id}#content-state`):[];h=U.length?[{id:`${L.id}#content-state`,source:"added",entries:U}]:O.annotationSets??[];const X=m??((F=U[0])==null?void 0:F.id)??O.pick;m=null,e.set({throughCollection:!!O.collection}),g=O.targets??null,g&&v(g.items[0].manifestId,O.manifest.id),e.set({targetIndex:g?0:null}),Z(O.manifest,O.collection??null,O.target,k,X)}catch(O){I.aborted||V(O)}}const ct=_=>{const{manifest:k,collection:I}=e.get();return(k==null?void 0:k.id)===_||(I==null?void 0:I.id)===_},yt=_=>{var k;return(((k=e.get().collection)==null?void 0:k.items)??[]).find(I=>I.id===_)??{id:_,type:"Manifest"}},ot=(_,k)=>{var I,F;if(m=k,(I=t.isManifestControlled)!=null&&I.call(t)){(F=t.onManifestChange)==null||F.call(t,_);return}at({id:_,type:"Manifest"}).then(O=>{var L;return O&&((L=t.onManifestChange)==null?void 0:L.call(t,_))})},at=async(_,k)=>{if(_.type==="Collection")return await G(_.id),e.get().status==="ready";const{collection:I}=e.get(),F=W(),O=m;m=null;const L=O?Qo(h,O):null,U=typeof k=="string"?{canvasId:k}:k??y;y=null;try{const X=await cc(_,{request:x,signal:F});return F.aborted?false:(v(_.id,X.id),Z(X,I,L?{canvasId:L.canvasId}:U??void 0,{},O),true)}catch(X){return F.aborted||V(X),false}};return{store:e,viewport:n,media:o,captions:r,highlight:s,chapter:i,found:a,get request(){return x},setRequest(_){x=_},load:G,async openCollection(_){var I;const k=e.get().manifest;if(!(!k||((I=e.get().collection)==null?void 0:I.id)===_))try{const F=await Ld(_,{request:x});if(F.type!=="Collection"||e.get().manifest!==k)return;e.set({collection:F})}catch{}},async goToManifest(_,k){var F,O,L;if(ct(_))return;const I=yt(_);if(I.type!=="Collection"&&((F=t.isManifestControlled)!=null&&F.call(t))){(O=t.onManifestChange)==null||O.call(t,_);return}await at(I,k)&&((L=t.onManifestChange)==null||L.call(t,e.get().manifest.id))},goToTarget(_){var F,O,L;const k=(F=e.get().targets)==null?void 0:F.items[_];if(!k)return;e.set({targetIndex:_});const I=k.canvasId?{canvasId:k.canvasId,...k.region&&{region:k.region},...k.time!==void 0&&{time:k.time}}:null;if(w(k)){I&&M(I.canvasId,I);return}if((O=t.isManifestControlled)!=null&&O.call(t)){y=I,(L=t.onManifestChange)==null||L.call(t,k.manifestId);return}at(yt(k.manifestId),I??void 0).then(U=>{var X;return U&&((X=t.onManifestChange)==null?void 0:X.call(t,k.manifestId))})},async syncManifest(_){!_||ct(_)||e.get().status!=="ready"||await at(yt(_))},goTo(_,k){M(_,k?{...k,canvasId:_}:null)},next({autoplay:_=false,wrap:k=false}={}){const{at:I,total:F}=A();I+1<F?E(I+1,_):k&&F>1&&E(0,_)},previous(){const{at:_}=A();_>0&&E(_-1)},first(){E(0)},last(){E(A().total-1)},consumeTarget(){e.set({target:null})},syncCanvas(_){_&&e.set({canvasId:_})},selectAnnotation(_){const{manifest:k,addedSets:I,canvasId:F,search:O,regions:L}=e.get(),U=Qo(oc(k,I,O.set,L),_);if(e.set({annotationId:U?_:null}),!U)return;a.emit(_);const{hiddenSets:X,shownSets:bt}=e.get();U.setId!==Jr&&ts(k,I,X,bt).includes(U.setId)&&Q(U.setId,true);const tt=De(k,F).some(Bt=>Bt.id===U.canvasId),pt=We(k,U.canvasId)!==null;!tt&&pt&&M(U.canvasId,null);const ft=pt?void 0:bd(U.annotation);ft&&ot(ft,U.id)},async search(_){l==null||l.abort();const k=Ya(e.get().manifest),I=_.trim();if(!I||!k){l=null,e.set({search:kr,annotationId:null});return}const F=new AbortController;l=F,e.set(O=>({search:{...O.search,query:I,status:"loading"}}));try{const{searchInto:O}=await import("./search-HCPnXtXW.mjs");await O(e,k,I,x,F.signal)}catch{e.set({search:{query:I,status:"error",hits:[],set:null}})}},setSetVisible(_,k){Q(_,k)},async loadAnnotations(_){if(c==null||c.abort(),!_){d=[],e.set({addedSets:b()});return}const k=new AbortController;c=k;try{const{loadAnnotationSets:I}=await import("./annotation-collection-C_5hyuvw.mjs"),F=await I(_,{request:x,signal:k.signal});if(k.signal.aborted)return;d=F,e.set({addedSets:b()})}catch{}},getContentState(){var tt;const{manifest:_,canvasId:k}=e.get();if(!_||!k)return null;const I=n.get(),F=o.get(),O=F&&F.currentTime>0?F.currentTime:null,L=De(_,k),X=I&&L.some(pt=>pt.id===I.canvasId)&&!O?I:null,bt=(X==null?void 0:X.canvasId)??k;return ic({manifestId:_.id,canvasId:bt,type:(tt=L.find(pt=>pt.id===bt))==null?void 0:tt.type,region:X==null?void 0:X.region,time:O})},setAnnotationPages(_){_!==B&&(B=_,et())},fetchAnnotationPages(_){const{manifest:k}=e.get();if(!k||!_.length)return;const I=new Set(_);for(const[F,O,L]of Ii(At(k).canvases))I.has(L)&&J(F,O,L)},holdAllAnnotationPages(){N++,et();let _=true;return()=>{_&&N--,_=false}},dispose(){S==null||S.abort(),c==null||c.abort(),l==null||l.abort()}}}const zd=100;function dc(t,e){const n=R({read:t,onChange:e});n.current={read:t,onChange:e};const o=R(void 0),r=R("");return D(()=>()=>{clearTimeout(o.current),o.current=void 0},[]),ut(()=>{!n.current.onChange||o.current!==void 0||(o.current=setTimeout(()=>{var i,a;o.current=void 0;const s=n.current.read();!s||s.encoded===r.current||(r.current=s.encoded,(a=(i=n.current).onChange)==null||a.call(i,s))},zd))},[])}function Cr(t,e){return t==null||t.addEventListener("pause",e),t==null||t.addEventListener("seeked",e),()=>{t==null||t.removeEventListener("pause",e),t==null||t.removeEventListener("seeked",e)}}function fc(t,e){const n=dc(()=>t.getContentState(),e),o=!!e;D(()=>{if(!o)return;let r=t.store.get().canvasId;const s=t.store.subscribe(()=>{const l=t.store.get().canvasId;l!==r&&(r=l,n())}),i=t.viewport.subscribe(n);let a=Cr(t.media.get(),n);const c=t.media.subscribe(l=>{a(),a=Cr(l,n)});return n(),()=>{s(),i(),c(),a()}},[t,o,n])}function rs(t){const e=[];for(const n of H(t==null?void 0:t.items))for(const o of H(n==null?void 0:n.items))if(Yr(o))for(let r of xo(o))(r==null?void 0:r.type)==="Choice"&&(r=H(r.items)[0]),(r==null?void 0:r.type)==="SpecificResource"&&(r=typeof r.source=="string"?{id:r.source}:r.source),r&&e.push({body:r,annotation:o});return e}function Hd(t){return t.flatMap(e=>rs(e).map(({body:n})=>n))}function Wd(t,e){if(!(t!=null&&t.length)||!e.canvases.length)return null;const n=e.canvases.map(r=>r.id),o=e.bodies.map(r=>r==null?void 0:r.format).filter(Boolean);return t.find(r=>{var s,i,a;return((s=r.canvasId)==null?void 0:s.some(c=>n.includes(c)))||((i=r.format)==null?void 0:i.some(c=>o.includes(c)))||!!((a=r.match)!=null&&a.call(r,e))})??null}function Ud(t,e){return t===e?true:!t||!e||t.length!==e.length?false:t.every((n,o)=>n.component===e[o].component&&n.match===e[o].match&&JSON.stringify([n.canvasId,n.format])===JSON.stringify([e[o].canvasId,e[o].format]))}function jd({iiifContent:t,canvasId:e,defaultCanvasId:n,onCanvasChange:o,onStatusChange:r,manifestId:s,defaultManifestId:i,onManifestChange:a,searchQuery:c,request:l,language:u,renderers:d,annotations:h,annotationPages:p="view",onContentStateChange:m,...g}){const y=e!==void 0,v=s!==void 0,w=R({controlled:y,manifestControlled:v,onCanvasChange:o,onStatusChange:r,onManifestChange:a});w.current={controlled:y,manifestControlled:v,onCanvasChange:o,onStatusChange:r,onManifestChange:a};const[b]=z(()=>Dd({request:l,onCanvasChange:ot=>{var at,_;return(_=(at=w.current).onCanvasChange)==null?void 0:_.call(at,ot)},onManifestChange:ot=>{var at,_;return(_=(at=w.current).onManifestChange)==null?void 0:_.call(at,ot)},isControlled:()=>w.current.controlled,isManifestControlled:()=>w.current.manifestControlled}));b.setRequest(l);const x=R({});x.current={canvasId:e,defaultCanvasId:n,manifestId:s??i};const S=Sd(l),T=R(t);T.current=t;const B=Kd(t);D(()=>(b.load(T.current,x.current),()=>b.dispose()),[b,B,S]),D(()=>{y&&b.syncCanvas(e??null)},[b,y,e]);const[N,J]=z(b.store.get().status);D(()=>{let ot=b.store.get().status;return b.store.subscribe(()=>{var k,I;const{status:at,error:_}=b.store.get();at!==ot&&(ot=at,J(at),(I=(k=w.current).onStatusChange)==null||I.call(k,at,_))})},[b]);const et=R(h);et.current=h;const Z=qd(h);D(()=>{b.loadAnnotations(et.current??null)},[b,Z,S]),D(()=>{b.setAnnotationPages(p)},[b,p]),fc(b,m),D(()=>{v&&N==="ready"&&b.syncManifest(s??null)},[b,v,s,N]);const Q=Vd(b,ot=>{var at;return ot.status==="ready"?((at=ot.manifest)==null?void 0:at.id)??null:null});D(()=>{c&&Q&&b.search(c)},[b,c,Q]);const M=R(d);Ud(M.current,d)||(M.current=d);const E=M.current,[A,W]=z(),[V,G]=z(u);V!==u&&(G(u),W(void 0));const ct=A??u;return[vt(()=>({clover:b,language:ct,renderers:E,chooseLanguage:W}),[b,ct,E]),N,g]}function Vd(t,e){return ne(t.store.subscribe,()=>e(t.store.get()))}function qd(t){const e=Array.isArray(t)?t:t?[t]:[];return JSON.stringify(e.map(n=>typeof n=="string"?n:(n==null?void 0:n.id)??"object"))}function Kd(t){return typeof t=="string"?t:t.id??t["@id"]??t}const Zd=re(function({as:e="div",className:n,children:o,highContrast:r,...s},i){const[a,c,l]=jd(s),u=wo(i,l.lang),d=qr(r);return f(bo.Provider,{value:a,children:f(Pn.Provider,{value:u.hostLanguage,children:f(e,{ref:u.ref,className:Mt("clover-root",n),"data-status":c,...Kr(d),...l,children:[o,f(ad,{clover:a.clover,language:a.language})]})})})}),Gd=()=>f("path",{fillRule:"evenodd",stroke:"none",d:"M144 72H368A96 96 0 0 1 464 168V296A96 96 0 0 1 368 392H200L104 460L144 392A96 96 0 0 1 48 296V168A96 96 0 0 1 144 72Z M168 184H344A16 16 0 0 1 344 216H168A16 16 0 0 1 168 184Z M168 264H280A16 16 0 0 1 280 296H168A16 16 0 0 1 168 264Z"}),Xd=()=>f(kt,{children:[f("path",{d:"M160 144h288M160 256h288M160 368h288",fill:"none",strokeLinecap:"round",strokeWidth:"32"}),f("circle",{cx:"80",cy:"144",r:"20",stroke:"none"}),f("circle",{cx:"80",cy:"256",r:"20",stroke:"none"}),f("circle",{cx:"80",cy:"368",r:"20",stroke:"none"})]}),Yd=()=>f("path",{stroke:"none",d:"M256 72A48 48 0 1 1 256 168A48 48 0 1 1 256 72Z M192 216H296V384H328V432H184V384H216V264H192Z"}),Jd=()=>f("path",{fillRule:"evenodd",stroke:"none",d:"M256 40C166 40 100 108 100 196C100 300 216 420 246 452A14 14 0 0 0 266 452C296 420 412 300 412 196C412 108 346 40 256 40Z M256 136A60 60 0 1 1 256 256A60 60 0 1 1 256 136Z"}),qv=()=>f("path",{strokeLinejoin:"round",strokeWidth:"40",d:"M184 128V384L392 256Z"}),hc=()=>f("path",{strokeLinecap:"round",strokeWidth:"45",d:"M154 154L358 358M358 154L154 358"}),Kv=()=>f(kt,{children:[f("path",{stroke:"none",d:"m456.69,421.39l-94.09-94.09c22.65-30.16,34.88-66.86,34.84-104.58,0-96.34-78.38-174.72-174.72-174.72S48,126.38,48,222.72s78.38,174.72,174.72,174.72c37.72.04,74.42-12.19,104.58-34.84l94.09,94.09c10.29,9.2,26.1,8.32,35.3-1.98,8.48-9.49,8.48-23.83,0-33.32Zm-233.97-73.87c-68.89-.08-124.72-55.91-124.8-124.8h0c0-68.93,55.87-124.8,124.8-124.8s124.8,55.87,124.8,124.8-55.87,124.8-124.8,124.8Z"}),f("path",{stroke:"none",d:"m279.5,197.76h-3.35s-28.47,0-28.47,0v-31.82c-.77-13.79-12.57-24.33-26.36-23.56-12.71.71-22.85,10.86-23.56,23.56v3.35h0v28.47h-31.82c-13.79.77-24.33,12.57-23.56,26.36.71,12.71,10.86,22.85,23.56,23.56h3.35s28.47,0,28.47,0v31.82c.77,13.79,12.57,24.33,26.36,23.56,12.71-.71,22.85-10.86,23.56-23.56v-3.35h0v-28.47h31.82c13.79-.77,24.33-12.57,23.56-26.36-.71-12.71-10.86-22.85-23.56-23.56Z"})]}),Zv=()=>f(kt,{children:[f("path",{stroke:"none",d:"m456.69,421.39l-94.09-94.09c22.65-30.16,34.88-66.86,34.84-104.58,0-96.34-78.38-174.72-174.72-174.72S48,126.38,48,222.72s78.38,174.72,174.72,174.72c37.72.04,74.42-12.19,104.58-34.84l94.09,94.09c10.29,9.2,26.1,8.32,35.3-1.98,8.48-9.49,8.48-23.83,0-33.32Zm-233.97-73.87c-68.89-.08-124.72-55.91-124.8-124.8h0c0-68.93,55.87-124.8,124.8-124.8s124.8,55.87,124.8,124.8-55.87,124.8-124.8,124.8Z"}),f("path",{stroke:"none",d:"M167.26 197.76H278.1a24.96 24.96 0 0 1 0 49.92H167.26a24.96 24.96 0 0 1 0-49.92Z"})]}),Gt={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"}},Qd=new Set(["+","=","-","_","0","r","R","k","K","m","M","j","J","l","L"]);function Ue({label:t,lang:e,shortcut:n,scrolls:o=false,image:r,lead:s,after:i}){const{t:a}=Pt(),c=R(null),l=n?a("controlShortcut",{label:t,shortcut:n.glyph}):t;return ef(),D(()=>{const u=c.current;u&&Er(u)&&lo(u)},[l,s]),f("span",{ref:c,className:"clover-tip","aria-hidden":"true",...lt(e),...o&&{tabIndex:-1,onMouseDown:u=>{var d;u.preventDefault(),(d=u.currentTarget.parentElement)==null||d.focus({preventScroll:true})}},children:[r&&f("img",{className:"clover-tip-image",src:r,alt:"",loading:"lazy",onLoad:()=>{const u=c.current;u&&Er(u)&&lo(u)}}),s&&f("span",{className:"clover-tip-lead",children:s}),l,i!=null&&i!==false&&f("span",{className:"clover-tip-after",children:i})]})}function no(t){const e=t.target instanceof Element&&ss(t.target),n=e&&So(e);n&&lo(n)}function Gv(t){const e=So(ss(t));e&&Er(e)&&lo(e)}function So(t){return Array.from(t.children).find(e=>e.classList.contains("clover-tip"))}function ss(t){const e=t.matches("input")?t.parentElement:null;return e&&So(e)?e:t}function Er(t){var e;try{return!!((e=t.parentElement)!=null&&e.matches(":hover, :focus-visible, :has(> input:focus-visible)"))}catch{return false}}function lo(t){const e=t.parentElement;if(!e)return;t.style.removeProperty("--clover-tip-room"),t.style.removeProperty("--clover-tip-shift");const n=tf(e),o=parseFloat(getComputedStyle(t).paddingLeft)||0,r=n.left+o,s=n.right-o,i=e.getBoundingClientRect();let a=t.getBoundingClientRect();const c=a.right<=i.left?a.right-r:a.left>=i.right?s-a.left:s-r;a.width>c&&(t.style.setProperty("--clover-tip-room",`${Math.max(c,0)}px`),a=t.getBoundingClientRect());const l=a.left<r?r-a.left:a.right>s?s-a.right:0;l&&t.style.setProperty("--clover-tip-shift",`${l}px`)}function tf(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:s,overflowX:i}=getComputedStyle(o);if(r==="inline"||r==="contents")continue;const a=i||s;if(!a||a==="visible")continue;const c=o.getBoundingClientRect();e=Math.max(e,c.left+o.clientLeft),n=Math.min(n,c.left+o.clientLeft+o.clientWidth)}return{left:e,right:n}}let Li=0;function Ai(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&&ss(n);o&&So(o)&&e.add(o),e.forEach(r=>pc(r,"tipHidden",["pointerenter","focusout"]))}function pc(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 ef(){D(()=>(Li++===0&&(document.addEventListener("keydown",Ai,true),document.addEventListener("pointerenter",no,true),document.addEventListener("focus",no,true)),()=>{--Li||(document.removeEventListener("keydown",Ai,true),document.removeEventListener("pointerenter",no,true),document.removeEventListener("focus",no,true))}),[])}function nf(t,e){const n=t.target;!e||n===e||e.contains(n)||Qd.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}))))}const Fe=({className:t,id:e,label:n,children:o,onClick:r,expanded:s,controls:i,shortcut:a,lang:c,unavailable:l,side:u})=>{const h=e.split("-")[0].replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^-/,"");return f("button",{id:e,className:Mt("clover-canvas-button",t),"data-testid":"clover-canvas-button","data-button":h,"data-side":u,onClick:r,"aria-disabled":l||void 0,"aria-expanded":s,"aria-controls":i,"aria-label":n,"aria-keyshortcuts":a==null?void 0:a.keys,...lt(c),type:"button",children:[f("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true","data-testid":"clover-canvas-button-svg",focusable:"false",width:"16",height:"16",viewBox:"0 0 512 512",children:o}),f(Ue,{label:n,shortcut:a})]})},of=ue("");function fe(){return zt(of)+Ur()}const tr=new Map;function rf(t,e){const n=fe(),o=R(e);o.current=e,D(()=>t?sf(n,o):void 0,[t,n])}function sf(t,e){for(const[n,o]of[...tr])n!==t&&o.current();return tr.set(t,e),()=>{tr.delete(t)}}const af=mt(()=>import("./CaptionDetails-BhXwMQyX.mjs"));function cf(t){var e;return!!t.summary||!!((e=t.metadata)!=null&&e.length)}const mc=(t,e)=>`${t}-label-${e}`,lf=({id:t,canvases:e,comments:n,open:o,onClose:r,language:s})=>{const{t:i,langOf:a}=Pt(),c=R(null),[l,u]=z(o);return o&&!l&&u(true),rf(o,()=>r(false)),D(()=>{var d;o&&((d=c.current)==null||d.focus())},[o]),f("figcaption",{className:"clover-canvas-caption","data-open":o,"data-testid":"clover-canvas-caption",id:t,onKeyDown:d=>{d.key==="Escape"&&(d.preventDefault(),d.stopPropagation(),r(true))},ref:c,tabIndex:-1,children:[f(Fe,{className:"clover-canvas-caption-close",id:`close-${t}`,label:i("commonClose"),lang:a("commonClose"),onClick:()=>r(true),children:f(hc,{})}),e.map((d,h)=>{const p=_t(d.label,s);return f("section",{className:"clover-canvas-caption-canvas",children:[p.text&&f("p",{className:"clover-canvas-caption-label",id:mc(t,h),...lt(p.lang),children:p.text}),l&&f(wt,{fallback:null,children:f(af,{summary:d.summary,metadata:d.metadata,comments:n==null?void 0:n.get(d.id),language:s})})]},d.id)})]})},uf=()=>f("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M256 112v288M400 256H112"}),df=()=>f("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M400 256H112"}),ff=()=>f("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"}),hf=()=>f("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"}),pf=()=>f("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"}),Oi=()=>f(kt,{children:[f("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"}),f("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"})]}),mf=()=>f(kt,{children:[f("path",{fill:"none",strokeLinecap:"round",strokeWidth:"64",d:"M112 144h0M112 256h0M112 368h0"}),f("path",{fill:"none",strokeLinecap:"round",strokeWidth:"40",d:"M208 144h208M208 256h208M208 368h208"})]}),gf=({children:t,label:e})=>f("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":e,children:t}),vf=112,yf=128;function bf(t){Dt(()=>{const e=t==null?void 0:t.closest(".clover-canvas");if(!t||!e)return;const n=(s=false)=>{let i=t.offsetWidth,a=0;for(const p of s?[]:Array.from(t.children))!(p instanceof HTMLElement)||!p.offsetParent||(i=Math.min(i,p.offsetLeft),a=Math.max(a,p.offsetTop+p.offsetHeight));const c={width:t.offsetWidth-i,height:a};for(const[p,m]of Object.entries(c)){const g=`--clover-canvas-controls-${p}`;a?e.style.setProperty(g,`${m}px`):e.style.removeProperty(g)}const l=t.offsetTop,u=e.querySelector(":scope > .clover-canvas-media > .clover-canvas-transport"),d=e.clientHeight-2*l-c.height-((u==null?void 0:u.offsetHeight)??0),h=t.offsetLeft+i-l;a&&d<vf&&h>=yf?e.dataset.popups="beside":delete e.dataset.popups};n();const o=new ResizeObserver(()=>n());o.observe(t),o.observe(e);const r=new MutationObserver(()=>n());return r.observe(t,{childList:true}),r.observe(e,{childList:true}),()=>{o.disconnect(),r.disconnect(),n(true)}},[t])}const ko=()=>{if(typeof document>"u")return null;const t=document;return t.fullscreenElement??t.webkitFullscreenElement??null},gc=()=>{if(typeof document>"u")return false;const t=document;return!!(t.fullscreenEnabled??t.webkitFullscreenEnabled)},vc=t=>{const e=t==null?void 0:t.closest(".clover-root"),n=t==null?void 0:t.closest("dialog");return e&&!(n&&e.contains(n))?e:(t==null?void 0:t.closest(".clover-canvas"))??null},_f=(t,e)=>{if(typeof t.webkitEnterFullscreen!="function")return;const n=e.closest(".clover-canvas"),o=!t.isConnected&&!!n;if(o&&n){const s=t.getAttribute("style");t.style.cssText="position:absolute;inset:0;z-index:-1;width:100%;height:100%;object-fit:contain;pointer-events:none",n.prepend(t),t.addEventListener("webkitendfullscreen",()=>{t.remove(),s===null?t.removeAttribute("style"):t.setAttribute("style",s)},{once:true})}const r=()=>{var s;try{(s=t.webkitEnterFullscreen)==null||s.call(t)}catch{}};o?requestAnimationFrame(r):r()},yc=async(t,e)=>{var o,r,s,i;const n=vc(t);if(n)try{if(ko()){const c=document;await(((o=c.exitFullscreen)==null?void 0:o.call(c))??((r=c.webkitExitFullscreen)==null?void 0:r.call(c)));return}if(!gc()){e&&t&&_f(e,t);return}const a=n;await(((s=a.requestFullscreen)==null?void 0:s.call(a))??((i=a.webkitRequestFullscreen)==null?void 0:i.call(a)))}catch{}};function is(t){const[e,n]=z(false);return D(()=>{if(!t)return;const o=()=>{var r;return n(!!((r=ko())!=null&&r.contains(t)))};return o(),document.addEventListener("fullscreenchange",o),document.addEventListener("webkitfullscreenchange",o),()=>{document.removeEventListener("fullscreenchange",o),document.removeEventListener("webkitfullscreenchange",o)}},[t]),e}function wf({key:t,id:e,label:n,glyph:o,onClick:r,expanded:s,controls:i,shortcut:a,lang:c,unavailable:l},u){const d=u==null?void 0:u[t];return d?f(d,{buttonProps:{id:e,type:"button","aria-label":n,...c&&{lang:c},...a&&{"aria-keyshortcuts":a.keys},onClick:l?void 0:r,...l&&{"aria-disabled":true},...s!==void 0&&{"aria-expanded":s,"aria-controls":i}},icon:f(gf,{label:n,children:o}),label:n,tip:f(Ue,{label:n,shortcut:a})},t):f(Fe,{id:e,label:n,onClick:l?void 0:r,unavailable:l,expanded:s,controls:i,shortcut:a,lang:c,children:o},t)}const xf=({fit:t=false,clusterRef:e,children:n})=>{const[o,r]=z(null),s=is(o);bf(o);const i=ut(a=>{r(a),e==null||e(a)},[e]);return f("div",{className:"clover-canvas-controls","data-fit":t||void 0,"data-fullscreen":s,"data-testid":"clover-canvas-controls",ref:i,children:n})},Sf=()=>()=>{};function kf(){return ne(Sf,gc)}const Ni=new WeakMap;function Qe(t,e){const[n,o]=z(()=>Ni.get(t)??null);return D(()=>{if(!e||n)return;let r=true;return t().then(s=>{Ni.set(t,s),r&&o(()=>s)},()=>{}),()=>{r=false}},[t,e,n]),n}function Cf(t,e,n){return t.reduce((o,r)=>o+r+n,-n)<=e}function Ef(t,e,n){const o=t.ownerDocument,r=i=>i instanceof HTMLElement&&t.contains(i)&&!i.closest("[hidden]"),s=[o.getElementById(e),o.getElementById(n),...Array.from(t.querySelectorAll("button"))].find(r);s==null||s.focus()}function Mf({cluster:t,ids:e,more:n,fits:o,settled:r,onFits:s}){const i=R(o);i.current=o;const a=R(s);a.current=s;const c=R(new Map),l=R(e);l.current=e;const u=R(null),d=e.join(" ");return Dt(()=>{const h=t.ownerDocument,p=()=>{var B;const y=l.current,v=getComputedStyle(t),w=parseFloat(v.columnGap)||0;let b=t.clientWidth-(parseFloat(v.paddingLeft)||0)-(parseFloat(v.paddingRight)||0),x=0;for(const N of y){const J=(B=h.getElementById(N))==null?void 0:B.offsetWidth;J&&c.current.set(N,J),x=Math.max(x,c.current.get(N)??0)}for(const N of Array.from(t.children))!(N instanceof HTMLElement)||y.includes(N.id)||N.id===n||N.classList.contains("clover-canvas-more")||!N.offsetWidth||getComputedStyle(N).position==="absolute"||(b-=N.offsetWidth+w);const S=Cf(y.map(N=>c.current.get(N)??x),b,w);if(S===i.current)return;const T=h.activeElement;u.current=T instanceof HTMLElement&&t.contains(T)?T.id:null,i.current=S,a.current(S)};p();const m=new ResizeObserver(()=>p());m.observe(t);const g=new MutationObserver(()=>p());return g.observe(t,{childList:true}),()=>{m.disconnect(),g.disconnect()}},[t,d,n]),Dt(()=>{if(!r)return;const h=u.current;if(u.current=null,h===null)return;const p=t.ownerDocument.activeElement;(!p||!t.contains(p)||p.closest("[hidden]"))&&Ef(t,h,n)},[o,r,t,n]),null}const Tf=()=>import("./AnnotationMenu-CBQft8tP.mjs"),If=()=>import("./ChaptersMenu-CQoZerOz.mjs"),Pf=()=>import("./ChoiceMenu-zk7-RWGR.mjs"),Lf=()=>import("./ImageControls-XEFV3Uq0.mjs"),Ri=2,Af=new Set(["zoomIn","zoomOut","rotateRight","rotateLeft","reset","fullPage"]),bc={atMax:false,atMin:false,atHome:false},Of=({renderer:t,instance:e,config:n,controlButtons:o,limits:r=bc,placeholder:s,placeholderIsMore:i=false,choices:a=[],selections:c={},onSelect:l,annotations:u=[],chapters:d=[],mediaElement:h=null,onChapter:p,overStill:m,request:g,hiddenPages:y,onPageVisibilityChange:v,selectedAnnotation:w=null,onAnnotationSelect:b,onAnnotationActivate:x,captionId:S,captionOpen:T=false,onCaptionToggle:B,placeId:N,placeOpen:J=false,onPlaceToggle:et,language:Z,fit:Q=true,more:M="auto",children:E})=>{var Hn,Wn,Oe,mn;const{t:A,langOf:W}=Pt(),[V,G]=z(false),[ct,yt]=z(false),ot=`annotations-${e}`,at=`${ot}-menu`,_=A("informationPanelTabsAnnotations"),k=W("informationPanelTabsAnnotations"),I=ut(K=>{var ht;yt(false),x==null||x(null),K&&((ht=document.getElementById(ot))==null||ht.focus())},[ot,x]),F=n.annotations&&u.length>0&&b,[O,L]=z(false),U=`chapters-${e}`,X=`${U}-menu`,bt=d.length>0&&!!p,tt=R(false),pt=R(null);D(()=>{const K=()=>{var ht;tt.current=((ht=document.activeElement)==null?void 0:ht.id)===U};return document.addEventListener("focusin",K),()=>document.removeEventListener("focusin",K)},[U]);const ft=ut(()=>{var ht,Se;if(!tt.current)return;tt.current=false;const K=document.activeElement;K&&K!==document.body||(Se=(ht=pt.current)==null?void 0:ht.querySelector('.clover-canvas-transport :is([data-button="play"], [data-button="pause"])'))==null||Se.focus()},[]);D(()=>{bt||ft()},[bt,ft]),D(()=>()=>ft(),[ft]);const Bt=ut(K=>{var ht;L(false),K&&((ht=document.getElementById(U))==null||ht.focus())},[U]),Nt=n.information&&S&&B,Vt=n.map&&N&&et,q=`choice-${e}`,j=a.length===1?_t(a[0].label,Z):null,dt=(j==null?void 0:j.text)||A("canvasChoice"),Ct=j!=null&&j.text?j.lang:W("canvasChoice"),Xt=`${q}-menu`,we=(Hn=Qe(Tf,!!F))==null?void 0:Hn.default,$=(Wn=Qe(If,bt))==null?void 0:Wn.default,st=(Oe=Qe(Pf,a.length>0&&!!l))==null?void 0:Oe.default,Ot=ut(K=>{var ht;G(false),K&&((ht=document.getElementById(q))==null||ht.focus())},[q]),Po=kf(),[qt,je]=z(null);D(()=>{pt.current=(qt==null?void 0:qt.closest(".clover-canvas"))??null},[qt]);const Ve=is(qt),[he,Le]=z(false),$n=K=>f(Fe,{className:K,id:ot,label:_,lang:k,onClick:()=>yt(ht=>!ht),expanded:ct,controls:at,children:f(Gd,{})},"annotations"),Fn=(()=>{const K=[],ht=t;return n.zoom&&ht&&K.push({key:"zoomIn",id:`zoomIn-${e}`,shortcut:Gt.zoomIn,label:A("imageZoomIn"),lang:W("imageZoomIn"),glyph:f(uf,{}),unavailable:r.atMax,onClick:()=>ht.zoomBy(Ri)},{key:"zoomOut",id:`zoomOut-${e}`,shortcut:Gt.zoomOut,label:A("imageZoomOut"),lang:W("imageZoomOut"),glyph:f(df,{}),unavailable:r.atMin,onClick:()=>ht.zoomBy(1/Ri)}),n.fullPage&&Po&&K.push({key:"fullPage",id:`fullPage-${e}`,label:A(Ve?"imageExitFullScreen":"imageFullScreen"),lang:W(Ve?"imageExitFullScreen":"imageFullScreen"),glyph:Ve?f(hf,{}):f(ff,{}),onClick:Se=>void yc(Se.currentTarget)}),n.rotation&&ht&&K.push({key:"rotateRight",id:`rotateRight-${e}`,shortcut:Gt.rotateRight,label:A("imageRotateRight"),lang:W("imageRotateRight"),glyph:f(Oi,{}),onClick:()=>ht.rotateBy(90)},{key:"rotateLeft",id:`rotateLeft-${e}`,shortcut:Gt.rotateLeft,label:A("imageRotateLeft"),lang:W("imageRotateLeft"),glyph:f(Oi,{}),onClick:()=>ht.rotateBy(-90)}),n.reset&&ht&&K.push({key:"reset",id:`reset-${e}`,shortcut:Gt.reset,label:A("imageResetZoom"),lang:W("imageResetZoom"),glyph:f(pf,{}),unavailable:r.atHome,onClick:()=>ht.home()}),a.length&&K.push({key:"choice",id:q,label:dt,lang:Ct,glyph:f(mf,{}),onClick:()=>G(Se=>!Se),expanded:V,controls:Xt}),K})(),Yt=[...Fn.filter(K=>K.key!=="fullPage"),...Fn.filter(K=>K.key==="fullPage")].map(K=>({id:K.id,view:Af.has(K.key),node:wf(K,o)})),fn=[Vt&&{id:`place-${e}`,view:false,node:f(Fe,{id:`place-${e}`,label:A("mapLabel"),lang:W("mapLabel"),onClick:et,expanded:J,controls:N,children:f(Jd,{})},"place")},bt&&{id:U,view:false,node:f(Fe,{id:U,label:A("playerChapters"),lang:W("playerChapters"),onClick:()=>L(K=>!K),expanded:O,controls:X,children:f(Xd,{})},"chapters")},F&&{id:ot,view:false,node:$n()},Nt&&{id:`information-${e}`,view:false,node:f(Fe,{id:`information-${e}`,label:A("informationPanelTabsAbout"),lang:W("informationPanelTabsAbout"),onClick:B,expanded:T,controls:S,children:f(Yd,{})},"information")},!!s&&{id:`placeholder-${e}`,view:false,node:f(ae.Fragment,{children:s},"placeholder")}].filter(K=>!!K),Dn=fn.filter(K=>K.id===`placeholder-${e}`),Ht=[...Yt.filter(K=>K.view),...Dn],hn=[...Yt.filter(K=>!K.view),...fn.filter(K=>!Dn.includes(K))],Jt=[...Ht,...hn],[Ae,Ao]=z(true),pn=M==="always"||i,Tt=(mn=Qe(Lf,Q&&(i||(pn||!Ae)&&Jt.some(K=>K.view))))==null?void 0:mn.ImageControls,Wt=Ae&&!pn||!Tt?[]:Jt.filter(K=>K.view),xe=i&&!!s&&!!Tt;D(()=>{Wt.length||Le(false)},[Wt.length]);const zn=K=>K.filter(ht=>!Wt.includes(ht)&&!(xe&&ht.id===`placeholder-${e}`)).map(({node:ht})=>ht);return f(kt,{children:[f(xf,{fit:Q,clusterRef:je,children:[zn(Ht),Tt&&(Wt.length>0||xe)&&f(Tt,{instance:e,open:xe?Wt.length>0:he,onOpenChange:Le,toggle:xe?s:void 0,children:Wt.map(({node:K})=>K)}),zn(hn),E]}),Q&&!pn&&qt&&f(Mf,{cluster:qt,ids:Jt.map(({id:K})=>K),more:`more-${e}`,fits:Ae,settled:Ae||Wt.length>0||!Jt.some(K=>K.view),onFits:Ao}),$&&O&&bt&&f($,{id:X,triggerId:U,label:A("playerChapters"),labelLang:W("playerChapters"),chapters:d,element:h,onChapter:p,overStill:m,request:g,onClose:Bt}),we&&ct&&F&&f(we,{id:at,triggerId:ot,label:_,labelLang:k,annotations:u,hiddenPages:y,onPageVisibilityChange:v,selected:w,onSelect:b,onActivate:K=>x==null?void 0:x(K),onClose:I}),st&&V&&a.length>0&&l&&f(st,{id:Xt,triggerId:q,label:dt,labelLang:Ct,language:Z,choices:a,selections:c,onSelect:l,onClose:Ot})]})},Nf=["jpg","png","webp","gif"];class Mr extends Error{constructor(e,n,o){super(e),this.url=n,this.status=o,this.name="ImageServiceError"}}function as(t){return t.replace(/\/info\.json$/,"").replace(/\/+$/,"")}function Co(t){const e=Array.isArray(t)?t:t?[t]:[];for(const n of e){if(!n||typeof n!="object")continue;const o=n,r=String(o.type??o["@type"]??""),s=JSON.stringify(o.profile??""),i=/ImageService/i.test(r)||/iiif\.io\/api\/image/.test(s)||/^"level[012]"$/.test(s)||!r&&!o.profile,a=o["@id"]??o.id;if(i&&typeof a=="string")return as(a)}}function Rf(t,e){if(!t||typeof t!="object")throw new Mr("info.json is not an object",e??"");const n=t,o=Bf(n),r=o===3?n.id??n["@id"]:n["@id"]??n.id,s=as(r??e??""),i=Number(n.width),a=Number(n.height);if(!s||!(i>0)||!(a>0))throw new Mr("info.json is missing id, width or height",e??s);const c=Array.isArray(n.profile)?n.profile:[n.profile],l=c.find(w=>typeof w=="string"),u=c.filter(w=>!!w&&typeof w=="object"),d=$f(l),h=new Set([...Array.isArray(n.extraFeatures)?n.extraFeatures:[],...u.flatMap(w=>Array.isArray(w.supports)?w.supports:[])]),m=[...Array.isArray(n.preferredFormats)?n.preferredFormats:[]].map(w=>String(w).toLowerCase()).find(w=>Nf.includes(w))??"jpg",g=w=>{var x;const b=n[w]??((x=u.find(S=>S[w]!==void 0))==null?void 0:x[w]);return Number(b)>0?Number(b):void 0};let y=g("maxWidth"),v=g("maxHeight");return y&&!v&&(v=y),v&&!y&&(y=void 0),{id:s,version:o,level:d,width:i,height:a,tiles:Ff(n.tiles),sizes:Df(n.sizes),maxWidth:y,maxHeight:v,maxArea:g("maxArea"),regionByPx:d>=1||h.has("regionByPx"),sizeByW:d>=1||h.has("sizeByW")||h.has("sizeByWh"),format:m,quality:"default"}}function Bf(t){const e=[].concat(t["@context"]??[]).map(String);return e.some(n=>n.includes("/image/3"))?3:e.some(n=>n.includes("/image/2"))?2:t.type==="ImageService3"?3:t["@id"]?2:3}function $f(t){const e=t==null?void 0:t.match(/level([012])/);return e?Number(e[1]):0}function Ff(t){return Array.isArray(t)?t.map(e=>{const n=Number(e==null?void 0:e.width),o=Number((e==null?void 0:e.height)??(e==null?void 0:e.width)),r=(Array.isArray(e==null?void 0:e.scaleFactors)?e.scaleFactors:[1]).map(Number).filter(s=>s>0).sort((s,i)=>s-i);return{width:n,height:o,scaleFactors:r}}).filter(e=>e.width>0&&e.height>0&&e.scaleFactors.length):[]}function Df(t){return Array.isArray(t)?t.map(e=>({width:Number(e==null?void 0:e.width),height:Number(e==null?void 0:e.height)})).filter(e=>e.width>0&&e.height>0).sort((e,n)=>e.width-n.width):[]}function uo(t,e,n,o,r=t.quality){const s=e.x===0&&e.y===0&&e.width===t.width&&e.height===t.height,i=s?"full":`${e.x},${e.y},${e.width},${e.height}`,a=s&&n===t.width&&o===t.height;let c;return t.version===3?c=a?"max":`${n},${o}`:c=a?"full":`${n},`,`${t.id}/${i}/${c}/0/${r}.${t.format}`}function zf(t){return t.version===2&&t.level===0?"native":void 0}const er=new Map;function cs(t,{request:e}={}){const n=as(t),o=er.get(n);if(o)return o;const r=`${n}/info.json`,s=ns(e,r,{headers:{Accept:"application/ld+json, application/json"}}).then(async i=>{if(!i.ok)throw new Mr(`info.json request failed with ${i.status}`,r,i.status);return Rf(await i.json(),n)}).catch(i=>{throw er.delete(n),i});return er.set(n,s),s}function Hf(t){const e=Math.max(0,Math.floor(t||0)),n=Math.floor(e/3600),o=Math.floor(e%3600/60),r=String(e%60).padStart(2,"0");return n?`${n}:${String(o).padStart(2,"0")}:${r}`:`${o}:${r}`}function Xv(t,e){var n;if(t.currentTime=e,!!t.paused)try{(n=t.play())==null||n.catch(()=>{})}catch{}}function ls(t){if(!t)return;const[e,n]=t.split(","),o=Number(e);if(e===""||Number.isNaN(o))return;if(n===void 0||n==="")return{start:o};const r=Number(n);return Number.isNaN(r)?{start:o}:{start:o,end:r}}const Wf=(t,e,n,o,r)=>`${t}|${e??`${n}:${o}`}|${r}`,Uf=/^((application|audio|video)\/)?(vnd\.apple\.|x-)?mpegurl$/i,jf=(t,e)=>!!(t&&/\.m3u8$/i.test(t.split(/[?#]/)[0]))||!!(e&&Uf.test(e)),Vf={width:1600,height:900};function qf(t,e){const n=new Array(t.length);if(!t.length)return n;const o=t.map(cn),r=e==="left-to-right"||e==="right-to-left",s=e==="right-to-left"||e==="bottom-to-top",i=r?o[0].height:o[0].width,a=t.map((l,u)=>u);s&&a.reverse();let c=0;for(const l of a){const u=o[l],d=i/(r?u.height:u.width),h=u.width*d,p=u.height*d;n[l]=r?{x:c,y:0,width:h,height:p}:{x:0,y:c,width:h,height:p},c+=r?h:p}return n}function cn(t){var s,i;if(t.width&&t.height)return{width:t.width,height:t.height};const e=_c(t);if(e!=null&&e.width&&e.height)return{width:e.width,height:e.height};const n=((s=fo(t)[0])==null?void 0:s.body)??((i=ho(t)[0])==null?void 0:i.body),o=Number(n==null?void 0:n.width),r=Number(n==null?void 0:n.height);return o>0&&r>0?{width:o,height:r}:Vf}function _c(t){return t.accompanyingContainer??t.placeholderContainer}function Kf(t,e,n,o,r){return Wf(t.id,e.id,n,o,r)}function Zf(t){const e=[];for(const n of t)wc(n,(o,r)=>{const s=o;if((s==null?void 0:s.type)!=="Choice")return;const i=H(s.items).filter(a=>!!a&&typeof a=="object");i.length>1&&e.push({key:r,canvasId:n.id,label:s.label,items:i.map(a=>({label:a.label,id:a.id,...typeof a.type=="string"?{type:a.type}:{},...typeof a.format=="string"?{format:a.format}:{}}))})});return e}const nr={};function Gf(t){if(t.type!=="Video"&&!An(t.type)||!t.format||jf(t.id,t.format)||typeof document>"u")return true;const e=t.type==="Video"?"video":"audio",n=nr[e]??(nr[e]=document.createElement(e));return typeof n.canPlayType!="function"?true:n.canPlayType(t.format)!==""}function Xf(t){const e={};for(const n of t){const o=n.items.findIndex(Gf);o>0&&(e[n.key]=o)}return e}const or=new WeakMap,rr=[];function Yf(t){return xo(t).some(e=>((e==null?void 0:e.type)==="Choice"?H(e.items):[e]).some(o=>(o==null?void 0:o.type)==="Video"||An(o==null?void 0:o.type)))}function Tr(t){var i;const e=or.get(t);if(e)return e;const n=[];for(const a of t.items??[])for(const c of a.items??[]){if(!Yr(c))continue;const l=c.target?(i=un(c.target))==null?void 0:i.t:void 0;if(!l)continue;const[u,d]=l.split(",").map(Number);Number.isFinite(u)&&n.push({annotation:c,start:u,end:Number.isFinite(d)?d:NaN})}if(n.every(a=>Yf(a.annotation)))return or.set(t,rr),rr;n.sort((a,c)=>a.start-c.start);const o=Number(t.duration),r=Number.isFinite(o)&&o/n.length||.5;n.forEach((a,c)=>{var u;const l=(u=n[c+1])==null?void 0:u.start;a.end>a.start||(l!=null?a.end=l>a.start?l:a.start+r:Number.isFinite(o)&&o>a.start?a.end=o:a.end>a.start||(a.end=a.start+r))});const s=n.length>1?n:rr;return or.set(t,s),s}const Mn=t=>`frame:${t.id}`;function wc(t,e){(t.items??[]).forEach((n,o)=>{(n.items??[]).forEach((r,s)=>{Yr(r)&&xo(r).forEach((i,a)=>e(i,Kf(t,r,o,s,a),r))})})}function fo(t,e={},{allFrames:n=false}={}){const o=[];return us(t,e,(r,s,i)=>{r.body.type==="Image"&&o.push({body:r.body,region:r.region,...r.rotation?{rotation:r.rotation}:{},target:s,...i>=0?{frame:i}:{}})},n),o}function Jf(t,e={}){for(const n of t){let o;if(us(n,e,r=>{o??(o=r.body.type)}),typeof o=="string")return o.toLowerCase()}}function ho(t,e={}){const n=[];return us(t,e,(o,r,s,i)=>{const a=o.body.type;if(a!=="Video"&&!An(a))return;const c=ls(i);n.push({kind:a==="Video"?"video":"audio",body:o.body,target:r,...c?{time:c}:{}})}),n}function Qf(t){const e=t.filter(o=>o.time&&typeof o.body.id=="string"),n=new Set(e.map(o=>o.time.start));if(!(e.length<2||n.size!==e.length))return e.sort((o,r)=>o.time.start-r.time.start).map(o=>{const r=Number(o.body.duration)||(o.time.end!==void 0?o.time.end-o.time.start:void 0);return{src:o.body.id,...o.body.format?{format:o.body.format}:{},start:o.time.start,...r?{duration:r}:{}}})}function us(t,e,n,o=false){const r=t.width??0,s=t.height??0,i=Tr(t),a=Math.min(e[Mn(t)]??0,Math.max(0,i.length-1));wc(t,(c,l,u)=>{const d=i.findIndex(g=>g.annotation===u);if(!o&&d>=0&&d!==a)return;const h=Ir(c,e[l]??0);if(!h)return;const p=u.target?un(u.target):void 0,m=p==null?void 0:p.rect;n(h,m?{x:m.x,y:m.y,width:m.w,height:m.h}:{x:0,y:0,width:r||Number(h.body.width)||0,height:s||Number(h.body.height)||0},d,p==null?void 0:p.t)})}function xc(t){return Sc(t).filter(e=>e.kind!=="transcript")}function th(t){const e=H(t.provides);return e.includes("closedCaptions")?"captions":e.includes("subtitles")||e.includes("translation")?"subtitles":e.includes("transcript")?"transcript":"captions"}function Sc(t){const e=[],n=[...t.annotations??[],...t.items??[]];for(const o of n)for(const r of o.items??[])if(H(r.motivation).includes("supplementing"))for(const s of H(r.body)){const i=s,a=(i==null?void 0:i.type)==="Choice"?H(i.items):[i];for(const c of a){const l=c==null?void 0:c.id;!((c==null?void 0:c.format)==="text/vtt"||typeof l=="string"&&/\.vtt(\?|$)/i.test(l))||typeof l!="string"||e.push({id:l,label:c.label,language:H(c.language)[0],kind:th(r)})}}return e}function eh(t){const e=[],n=r=>{const s=r,i=s==null?void 0:s.id;if(typeof i!="string"||e.some(c=>c.id===i))return;const a=s==null?void 0:s.format;(a?a!=="text/plain":!/\.txt(\?|$)/i.test(i))||e.push({id:i,label:s==null?void 0:s.label,language:H(s==null?void 0:s.language)[0]})},o=[...t.annotations??[],...t.items??[]];for(const r of o)for(const s of r.items??[])if(H(s.motivation).includes("supplementing"))for(const i of H(s.body)){const a=i;((a==null?void 0:a.type)==="Choice"?H(a.items):[a]).forEach(n)}return H(t.rendering).forEach(n),e}function Ir(t,e=0){if(!t||typeof t!="object")return null;const n=t;if(n.type==="Choice"){const o=H(n.items);return Ir(o[e]??o[0])}if(n.type==="SpecificResource"&&n.source){const o=typeof n.source=="string"?{id:n.source}:n.source,r=H(n.selector).find(a=>(a==null?void 0:a.type)==="ImageApiSelector"),s=Ir({type:"Image",...o});if(!s)return null;const i=(r==null?void 0:r.rotation)!=null?String(r.rotation):void 0;return{...s,region:(r==null?void 0:r.region)||s.region,...i?{rotation:i}:{}}}return n.type!=="Image"&&n.type!=="Video"&&!An(n.type)?null:{body:n,region:typeof n.region=="string"?n.region:void 0}}function nh(t,e,n={},{standIns:o=true}={}){const r=qf(t,e),s=[],i=[],a={};return t.forEach((c,l)=>{const u=r[l],d=cn(c),h=u.width/d.width,p=u.height/d.height,m=x=>({x:u.x+x.x*h,y:u.y+x.y*p,width:x.width*h,height:x.height*p}),g=ho(c,n),y=fo(c,n,{allFrames:true}).map(x=>({...x,canvas:c})),v=_c(c);if(o&&!y.length&&g.some(x=>x.kind==="audio")&&v){const x=cn(v);for(const S of fo(v))y.push({...S,canvas:v,target:{x:S.target.x/x.width*d.width,y:S.target.y/x.height*d.height,width:S.target.width/x.width*d.width,height:S.target.height/x.height*d.height}})}const w=n[Mn(c)]??0;y.forEach(({body:x,target:S,region:T,rotation:B,frame:N,canvas:J},et)=>{var E;const Z=Co(x.service);if(!Z&&!x.id)return;const Q=`${J.id}|${et}|${x.id??Z}|${T??""}|${B??""}`,M=!(Z&&T);if(s.push({id:Q,service:Z,url:x.id,width:M&&Number(x.width)||void 0,height:M&&Number(x.height)||void 0,region:T,...B?{rotation:B}:{},placement:m(S),...N!=null&&N!==w?{hidden:true}:{}}),N!=null){const A=a[E=Mn(c)]??(a[E]=[]);(A[N]??(A[N]=[])).push(Q)}});const[b]=g;if(b!=null&&b.body.id){const x=Qf(g),S=x?x[0]:void 0;i.push({id:`${c.id}|media|${b.body.id}`,kind:b.kind,src:(S==null?void 0:S.src)??b.body.id,format:S?S.format:b.body.format,placement:m(b.target),duration:x?Number(c.duration)||void 0:Number(b.body.duration??c.duration)||void 0,...x?{segments:x}:{},poster:oh(c),captions:xc(c)})}}),{images:s,media:i,placements:r,frames:a}}function oh(t){var e;return(e=kc(t))==null?void 0:e.source}const Yv=1280;function kc(t){var c;const e=t.placeholderContainer;if(!e)return;const n=(c=fo(e)[0])==null?void 0:c.body;if(!n)return;const o=Co(n.service),r=typeof n.id=="string"?n.id:void 0,s=o?{service:o,fallback:r}:r?{src:r}:void 0;if(!s)return;const{width:i,height:a}=cn(e);return{source:s,width:i,height:a}}function rh(t,e,n){const o=cn(t),r=e.width/o.width,s=e.height/o.height;return{x:e.x+n.x*r,y:e.y+n.y*s,width:n.width*r,height:n.height*s}}const sh=({hidden:t})=>{const{t:e,langOf:n}=Pt(),o=e("imageExitFullScreen");return f("button",{"aria-label":o,...lt(n("imageExitFullScreen")),className:"clover-canvas-exit-full-screen",hidden:t,onClick:r=>void yc(r.currentTarget),type:"button",children:[f("svg",{viewBox:"0 0 512 512",width:"20",height:"20","aria-hidden":"true",focusable:"false",children:f("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"45",d:"M244 400L100 256l144-144M120 256h292"})}),o]})},Cc="50%";function Ec(t,e=Cc,n=null){const[o,r]=z(()=>typeof IntersectionObserver>"u");return D(()=>{if(o||!t)return;const s=new IntersectionObserver(i=>{i.some(a=>a.isIntersecting)&&(r(true),s.disconnect())},{root:n,rootMargin:e});return s.observe(t),()=>s.disconnect()},[t,o,e,n]),o}function ih(t){const[e,n]=z(false);return D(()=>{if(!t)return;const o=()=>n(ko()===t);return o(),document.addEventListener("fullscreenchange",o),document.addEventListener("webkitfullscreenchange",o),()=>{document.removeEventListener("fullscreenchange",o),document.removeEventListener("webkitfullscreenchange",o)}},[t]),e}function ah(t){const[e,n]=z(false);return D(()=>{if(!t)return;const o=()=>{const r=ko();n(r===t||!!r&&vc(t)===r&&(r==null?void 0:r.querySelector(".clover-canvas"))===t)};return o(),document.addEventListener("fullscreenchange",o),document.addEventListener("webkitfullscreenchange",o),()=>{document.removeEventListener("fullscreenchange",o),document.removeEventListener("webkitfullscreenchange",o)}},[t]),e}class ch extends ae.Component{constructor(){super(...arguments);P(this,"state",{error:null})}static getDerivedStateFromError(n){return{error:n}}render(){const{error:n}=this.state;return n?f("div",{className:"clover-canvas-error",role:"alert",lang:"en",children:[f("p",{className:"clover-canvas-error-headline","data-testid":"headline",children:"Something went wrong"}),n.message&&f("span",{className:"clover-canvas-error-body",children:`Error message: ${n.message}`})]}):this.props.children}}function Sn({overlay:t=false,className:e}){return f("span",{"aria-hidden":"true",className:Mt("clover-loading",e),"data-overlay":t||void 0,children:f("span",{})})}const lh={image:"bodyUnloadableImage",video:"bodyUnloadableVideo",audio:"bodyUnloadableAudio",model:"bodyUnloadableModel"};function uh({kind:t,shown:e,room:n=false}){const{t:o,langOf:r}=Pt(),s=lh[t];return f("div",{className:"clover-body-unloadable","data-room":n||void 0,role:"status",children:e&&f("p",{...lt(r(s)),children:o(s)})})}function dh({text:t,lang:e}){return f("div",{className:"clover-body-note","aria-hidden":"true",children:f("p",{...lt(e),children:t})})}function Eo(t,e,n=false,o){const r=fe(),{hostLanguage:s}=Pt(void 0,o);if(n)return{props:{},node:null};const i=_o(e,s);return i===void 0?{props:{"aria-label":t},node:null}:{props:{"aria-labelledby":r},node:f("span",{hidden:true,id:r,...lt(i),children:t})}}const fh=Object.freeze({a:1,b:0,c:0,d:1,e:0,f:0});function oe(t,e){return{a:1,b:0,c:0,d:1,e:t,f:e}}function ce(t,e=t){return{a:t,b:0,c:0,d:e,e:0,f:0}}function Nn(t){const e=Math.cos(t),n=Math.sin(t);return{a:e,b:n,c:-n,d:e,e:0,f:0}}function hh(t,e){return{a:t.a*e.a+t.c*e.b,b:t.b*e.a+t.d*e.b,c:t.a*e.c+t.c*e.d,d:t.b*e.c+t.d*e.d,e:t.a*e.e+t.c*e.f+t.e,f:t.b*e.e+t.d*e.f+t.f}}function le(...t){return t.reduce((e,n)=>hh(e,n),fh)}function ph(t){const e=t.a*t.d-t.b*t.c;if(!e||!Number.isFinite(e))return null;const n=1/e;return{a:t.d*n,b:-t.b*n,c:-t.c*n,d:t.a*n,e:(t.c*t.f-t.d*t.e)*n,f:(t.b*t.e-t.a*t.f)*n}}function ve(t,e){return{x:t.a*e.x+t.c*e.y+t.e,y:t.b*e.x+t.d*e.y+t.f}}function Jv(t){return`matrix(${[t.a,t.b,t.c,t.d,t.e,t.f].map(gh).join(",")})`}function mh(t,e,n,o=new Float32Array(9)){const r=2/e,s=-2/n;return o[0]=t.a*r,o[1]=t.b*s,o[2]=0,o[3]=t.c*r,o[4]=t.d*s,o[5]=0,o[6]=t.e*r-1,o[7]=t.f*s+1,o[8]=1,o}function gh(t){const e=Math.round(t*1e6)/1e6;return Object.is(e,-0)?"0":String(e)}function Mc(t){return{x:t.x+t.width/2,y:t.y+t.height/2}}function ds(t){if(!t.length)return null;let e=1/0,n=1/0,o=-1/0,r=-1/0;for(const s of t)e=Math.min(e,s.x),n=Math.min(n,s.y),o=Math.max(o,s.x+s.width),r=Math.max(r,s.y+s.height);return{x:e,y:n,width:o-e,height:r-n}}function vh(t,e){return t.x<e.x+e.width&&e.x<t.x+t.width&&t.y<e.y+e.height&&e.y<t.y+t.height}function Mo(t,e){const n=[ve(t,{x:e.x,y:e.y}),ve(t,{x:e.x+e.width,y:e.y}),ve(t,{x:e.x,y:e.y+e.height}),ve(t,{x:e.x+e.width,y:e.y+e.height})],o=n.map(a=>a.x),r=n.map(a=>a.y),s=Math.min(...o),i=Math.min(...r);return{x:s,y:i,width:Math.max(...o)-s,height:Math.max(...r)-i}}function yn(t,e,n){return Math.min(Math.max(t,e),n)}const sr=t=>!!(t&&"overlays"in t);let Pr;const yh=()=>Promise.resolve().then(()=>_d).then(t=>{Pr=t.buildContentState}),bh=mt(()=>import("./MediaBody-B_T8alBZ.mjs")),_h=()=>import("./AnnotationState-D-pYs13c.mjs"),wh=new Map,xh={menu:[],placed:[],timed:[],hiddenPages:[],setPagesVisible:()=>{},listedCount:0,comments:wh,selected:null,select:()=>{},activate:()=>{},release:()=>false,quietlyOpened:null},Sh=mt(()=>import("./FrameAnimation-BfqvPgd9.mjs")),Bi=mt(()=>import("./PlaceBox-CSYpxMgb.mjs")),kh=mt(()=>import("./Placeholder-DLJ6qaSl.mjs")),Ch=mt(()=>import("./ControlsFade-C164aYHv.mjs")),Eh=()=>true,Mh=mt(()=>import("./Placeholder-DLJ6qaSl.mjs").then(({PlaceholderToggle:t})=>({default:t}))),$i={zoom:true,fullPage:true,rotation:true,reset:true,annotations:true,information:true,map:true},Th={zoom:false,fullPage:false,rotation:false,reset:false,annotations:false,information:false,map:false},Ih={description:"canvasKeysImage",keys:["ArrowLeft ArrowRight ArrowUp ArrowDown",Gt.zoomIn.keys,Gt.zoomOut.keys,Gt.reset.keys,Gt.rotateRight.keys,Gt.rotateLeft.keys].join(" ")},Ph={description:"canvasKeysMedia",keys:[Gt.play.keys,"J L",Gt.mute.keys].join(" ")},Lh={description:"canvasKeysAnnotations",keys:"Escape"},Ah=t=>{var n;return!!((n=t.canvases)!=null&&n.length)||Tc(t.body,t.src).length>0?f(ch,{children:f(Oh,{...t})}):null},Oh=t=>{var Bs,$s,Fs,Ds,zs,Hs;const{surface:e,manifestId:n,canvases:o,viewingDirection:r,body:s,src:i,isTiledImage:a=false,label:c,partOf:l,language:u,highContrast:d,instanceId:h,className:p,options:m,navigator:g=false,controls:y=true,collapseControls:v="auto",controlButtons:w,annotations:b,onReady:x,onViewportChange:S,onContentStateChange:T,onMediaElement:B,onCaptionChange:N,caption:J,onEnded:et,chapters:Z,highlightedChapter:Q,onChapterHighlight:M,placeholder:E=true,children:A}=t,{t:W}=Pt(),V=R(null),[G,ct]=z(null),yt=ih(G),ot=is(G),at=ah(G),_=wo(ct),k=qr(d),I=!!e.controlsVisibility,O=(e.controlsVisibility??Eh)(I?G:null,m==null?void 0:m.hideDelay,V),[L,U]=z(false),X=Ec(G),bt=fe(),[tt]=z(()=>h??`clover-canvas-${bt}`),pt=R(null),[ft,Bt]=z(null),Nt=sr(ft)?ft:null,[Vt,q]=z(null),j=y===false?null:y===true?$i:{...$i,...y},[dt,Ct]=z("loading"),[Xt,we]=z(false),[$,st]=z(0),[Ot,Po]=z(bc),qt=R(x),je=R(S),Ve=R(m);qt.current=x,je.current=S,Ve.current=m;const he=Xr(r),Le=vt(()=>Zf(o??[]),[o]),$n=vt(()=>Xf(Le),[Le]),[Lo,Fn]=z({}),Yt=vt(()=>({...$n,...Lo}),[$n,Lo]),fn=(C,Y)=>Fn(gt=>({...gt,[C]:Y})),Dn=vt(()=>b==null?void 0:b.filter(C=>!C.layer||(Yt[C.layer.key]??0)===C.layer.item),[b,Yt]),Ht=(Bs=b==null?void 0:b.find(C=>C.layer&&C.annotation.id===t.selectedAnnotation))==null?void 0:Bs.layer;D(()=>{Ht&&(Yt[Ht.key]??0)!==Ht.item&&fn(Ht.key,Ht.item)},[Ht==null?void 0:Ht.key,Ht==null?void 0:Ht.item,t.selectedAnnotation]);const hn=!!(j!=null&&j.information),Jt=!!(b!=null&&b.length),Ae=Qe(_h,Jt),[Ao,pn]=z(null),Tt=Jt&&Ao||xh,Wt=vt(()=>{var gt,Lt;const C=(gt=b==null?void 0:b.find(Ut=>Ut.annotation.id===Tt.selected))==null?void 0:gt.annotation,Y=(Array.isArray(C==null?void 0:C.body)?C==null?void 0:C.body:[C==null?void 0:C.body]).find(Ut=>(Ut==null?void 0:Ut.type)==="Feature");return C&&Y?{id:String(C.id),feature:Y,name:((Lt=Y.properties)==null?void 0:Lt.label)??C.label}:null},[b,Tt.selected]),xe=Wt?`${Wt.id}:${t.refind??0}`:null,[zn,Hn]=z(null),Wn=xe!==null&&zn!==xe,Oe=vt(()=>{var Ut,Xe;const C=(o??[]).map(Zt=>Zt.navPlace).filter(Boolean),Y=C.length?C:t.navPlace?[t.navPlace]:[];if(!Y.length)return null;const gt=Y.flatMap(Zt=>(Zt==null?void 0:Zt.type)==="FeatureCollection"?Zt.features??[]:(Zt==null?void 0:Zt.type)==="Feature"?[Zt]:[]);if(!gt.length)return null;const Lt=gt.length===1?(Xe=(Ut=gt[0])==null?void 0:Ut.properties)==null?void 0:Xe.label:void 0;return{feature:{type:"FeatureCollection",features:gt},name:Lt??t.label}},[o,t.navPlace,t.label]),mn=`place-box-${tt}`,[K,ht]=z(false),[Se,pl]=z(false),Un=R(Tt);Un.current=Tt;const jn=ut(()=>Un.current.release(),[]),{comments:Oo,listedCount:ws}=Tt,qe=vt(()=>hn?(o??[]).filter(C=>cf(C)||Oo.has(C.id)):[],[o,hn,Oo]),No=`caption-${tt}`,[ml,xs]=z(false),Ro=ml&&qe.length>0,Ss=ut(C=>{var Y;xs(false),C&&((Y=document.getElementById(`information-${tt}`))==null||Y.focus())},[tt]),Kt=vt(()=>(o??[]).find(C=>Tr(C).length)??null,[o]),gl=Kt?Tr(Kt):Rh,Ft=vt(()=>o!=null&&o.length?nh(o,he,Yt,{standIns:o.length>1}):null,[o,he,Yt]),vl=vt(()=>Tc(s,i,a),[s,i,a]),nt=(Ft==null?void 0:Ft.media[0])??null,ks=!I&&(nt==null?void 0:nt.kind)==="video",yl=I||ks,bl=I?O:L,_l=vt(()=>{if(o!=null&&o.length)return Jf(o,Yt);const C=(Array.isArray(s)?s:s?[s]:[])[0];return typeof(C==null?void 0:C.type)=="string"?C.type.toLowerCase():i?"image":void 0},[o,Yt,s,i]),[$t,wl]=z(null),Vn=R(B);Vn.current=B;const xl=ut(C=>{var Y;wl(C),(Y=Vn.current)==null||Y.call(Vn,C)},[]),ke=Ft?Ft.images:vl,Ce=!!nt&&(o==null?void 0:o.length)===1,Ee=Ce&&(nt==null?void 0:nt.kind)==="audio",Sl=Ce&&(nt==null?void 0:nt.kind)==="video",Ke=(o==null?void 0:o.length)===1&&!nt&&!Kt&&ke.length===0,qn=!Ce&&!Ke&&(($s=m==null?void 0:m.gestures)==null?void 0:$s.navigable)!==false,pe=o?`${n??""}
2
+ ${o.map(C=>C.id).join("|")}`:null,Me=vt(()=>{if(!o||!E)return[];const C=o.flatMap(Y=>{const gt=kc(Y),Lt=_t(Y.label,u);return gt?[{...gt,alt:Lt.text,lang:Lt.lang}]:[]});return he==="right-to-left"||he==="bottom-to-top"?C.reverse():C},[o,he,E,u]),[kl,Cs]=z(false),[Cl,Es]=z(null),xt=!Ee&&Me.length>0&&(nt?Cl!==pe:!kl),Ms=m==null?void 0:m.request;D(()=>{if(xt){Promise.resolve().then(()=>vm);for(const{source:C}of Me)C.service&&cs(C.service,{request:Ms}).catch(()=>{})}},[xt,Me,Ms]);const Ts=(C,{annotations:Y=false,fullPage:gt=false}={})=>({...C,zoom:false,rotation:false,reset:false,fullPage:gt&&C.fullPage,annotations:Y&&C.annotations}),gn=Ke&&ot,Is=ae.Children.count(A)>0,Bo=Me.length>0&&!Ee&&!nt,vn=j?xt?qe.length||Is||ws||nt&&(Z!=null&&Z.length)?Ts(j,{annotations:true}):null:Ce||Ke?Le.length||qe.length||Is||ws||nt&&(Z!=null&&Z.length)||gn&&j.fullPage?Ts(j,{annotations:true,fullPage:gn}):null:j:null,$o=g&&!xt&&(nt?nt.kind==="audio"&&!Ce&&ke.length>0:true),[Fo,El]=z(null),Ze=nt?Fo??nt.placement:null,[Kn,Ml]=z(Bh),Do=vt(()=>{const C=(nt==null?void 0:nt.kind)==="video"&&$t&&Ze?[...ke,{id:nt.id,placement:Ze,width:Ze.width,height:Ze.height,media:{element:$t}}]:ke;return Kn.length?[...C,...Kn]:C},[ke,nt,$t,Ze,Kn]),Ps=Ce&&(nt==null?void 0:nt.kind)==="video"&&Fo?Fo:Ft?ds(Ft.placements):null,Tl=JSON.stringify([ke,Ps,Do.length!==ke.length&&[nt==null?void 0:nt.id,Ze],Kn.map(C=>C.id)]),Zn=R(null),zo=R(false),Ho=()=>{nt?Es(xt?pe:null):Cs(xt),xt||jn()},Gn=R(null),Il=C=>{if($t&&!xt){$t.currentTime=C;return}Gn.current=C,xt&&Ho()};D(()=>{!$t||Gn.current===null||($t.currentTime=Gn.current,Gn.current=null)},[$t]);const Wo=Array.isArray(s)?s[0]:s,It=[c,(Fs=o==null?void 0:o[0])==null?void 0:Fs.label,Wo==null?void 0:Wo.label].map(C=>_t(C,u)).find(C=>C.text),Pl=vt(()=>{const C=_t(l,u);return C.text&&C.text!==(It==null?void 0:It.text)?C:void 0},[l,u,It==null?void 0:It.text]),Ls=Eo((It==null?void 0:It.text)||W("canvasImage"),It?It.lang:_.langOf("canvasImage"),false,_.hostLanguage),Xn=xt?[]:[...qn?[Ih]:[],...nt?[Ph]:[],...Jt?[Lh]:[]],As=`keys-${tt}`,Ll=qn&&!xt&&!_.langOf("canvasRoleDescription")?W("canvasRoleDescription"):void 0,Uo=!!vn&&qe.length>0,Al=Uo&&qe.map((C,Y)=>_t(C.label,u).text?mc(No,Y):null).filter(Boolean).join(" ")||void 0,Os=R({canvases:o,scene:Ft,canvasKey:pe});Os.current={canvases:o,scene:Ft,canvasKey:pe};const Yn=R(null),jo=ut(()=>{const{canvases:C,scene:Y,canvasKey:gt}=Os.current;Yn.current=C&&Y&&Zn.current===gt?{key:gt,canvases:C,placements:Y.placements}:null},[]),Ol=!o||((Ds=Yn.current)==null?void 0:Ds.key)===pe,Ge=dc(()=>{const C=Yn.current,Y=pt.current;if(!C||n==="loading")return null;const gt=$t&&$t.currentTime>0?$t.currentTime:null,Lt=!gt&&Y&&sr(Y)?Ic(Y.getBounds(),C.canvases,C.placements):null,Ut=C.canvases.find(Xe=>Xe.id===(Lt==null?void 0:Lt.canvasId))??C.canvases[0];return Ut?Pr?Pr({manifestId:n,canvasId:Ut.id,type:Ut.type,region:Lt&&{x:Lt.rect.x,y:Lt.rect.y,w:Lt.rect.width,h:Lt.rect.height},time:gt}):(yh().then(()=>Ge()),null):null},T);D(()=>Cr($t,Ge),[$t,Ge]),D(()=>{const C=V.current;if(!C)return;const Y=e(C,Ve.current),gt=sr(Y)?Y:null;pt.current=Y,Bt(Y),Y.setDismiss(jn);const Lt=()=>{if(!gt)return;const jt=gt.viewLimits();Po(me=>me.atMax===jt.atMax&&me.atMin===jt.atMin&&me.atHome===jt.atHome?me:jt)},Ut=Y.on("open",()=>{var jt;Lt(),qo(false),jo(),Ge(),Ct("ready"),st(me=>me+1),gt&&((jt=qt.current)==null||jt.call(qt,Nh(gt,()=>Yn.current,me=>{var Us,js;const Ws=Un.current.placed.find(Ko=>Ko.id===me);return Ws?(Un.current.select(Ws),(js=Array.from(((Us=gt.overlays)==null?void 0:Us.container.querySelectorAll("[id]"))??[]).find(Ko=>Ko.id===me))==null||js.focus({preventScroll:true}),true):false})))}),Xe=Y.on("change",()=>{Lt(),qo(false),jo(),Ge(),Ct("ready"),st(jt=>jt+1)}),Zt=Y.on("error",()=>{Y.isOpen||Ct("error")}),Rl=Y.on("unloadable",jt=>we(!!jt)),Bl=Y.on("viewport",()=>{var jt;Lt(),gt&&((jt=je.current)==null||jt.call(je,gt.getBounds())),Ge()});return()=>{Ut(),Xe(),Zt(),Rl(),Bl(),Y.dispose(),pt.current=null,Bt(null)}},[h,e,jn,jo]),D(()=>{if(!(!Nt||!Vt))return Nt.attachNavigator(Vt)},[Nt,Vt]),D(()=>{if(!(!ft||!Ke))return ft.setGestures({navigable:false}),()=>ft.setGestures({})},[ft,Ke]);const Vo=R(false);D(()=>{var Y;if(gn)return;const C=!document.activeElement||document.activeElement===document.body;Vo.current&&C&&((Y=V.current)==null||Y.focus()),Vo.current=false},[gn]),D(()=>{const C=pt.current;if(xt&&(zo.current=true),!C||!X||xt)return;const Y=Zn.current!==null&&Zn.current!==pe;(!C.isOpen||Y)&&Ct("loading");const gt=Ce||zo.current&&C.isOpen||Y;Zn.current=pe,zo.current=false,C.setImages(Do,{world:Ps??void 0,fit:gt})},[Tl,h,$t,X,xt]);const Ns=R(n),[Nl,qo]=z(false);Dt(()=>{var C;n!==Ns.current&&(Ns.current=n,(C=pt.current)==null||C.clear(),qo(true),Ct("loading"))},[n]);const Rs=dt==="loading"&&Do.length>0&&X&&!xt;return f(Pn.Provider,{value:_.hostLanguage,children:f("figure",{"aria-labelledby":Al,className:Mt("clover-canvas",p),"data-testid":"clover-canvas","data-status":dt,...Kr(k),"data-unloadable":Xt||void 0,"data-has-navigator":$o,"data-fullscreen":yt,"data-exit":at||void 0,"data-controls":yl?bl?"visible":"hidden":void 0,"data-media":_l,"data-recording":nt?"":void 0,"data-player":Ee?"":void 0,"data-animated":Kt?"":void 0,"data-navigable":qn,"data-placeholder":Me.length&&!Ee?xt:void 0,ref:_.ref,onFocus:C=>{Vo.current=gn&&C.target.id===`fullPage-${tt}`},onKeyDown:C=>{if(C.key==="Escape"&&Ro&&!C.defaultPrevented){C.preventDefault(),Ss(false);return}if(C.key==="Escape"&&!C.defaultPrevented&&!C.currentTarget.querySelector(".clover-canvas-menu")&&jn()){C.preventDefault();return}nf(C,V.current)},style:{position:"relative",width:"100%",height:"100%",margin:0,overflow:"hidden",isolation:"isolate"},children:[(vn||$o)&&nt&&f("div",{className:"clover-canvas-scrim","aria-hidden":"true"}),ks&&f(wt,{fallback:null,children:f(Ch,{element:G,hideDelay:m==null?void 0:m.hideDelay,picture:V,onChange:U})}),f(sh,{hidden:!at}),ft&&(vn||Bo)&&f(Of,{renderer:Nt,instance:tt,config:vn??Th,controlButtons:w,limits:Ot,placeholderIsMore:Bo&&!nt,chapters:nt?Z:void 0,mediaElement:$t,onChapter:Il,overStill:!!nt&&xt,request:m==null?void 0:m.request,placeholder:Bo&&f(wt,{fallback:null,children:f(Mh,{instance:tt,media:!!nt,active:xt,onToggle:Ho,more:!!j&&(j.zoom||j.rotation||j.reset||j.fullPage)})}),fit:!I,more:v,choices:xt?[]:Le,selections:Yt,onSelect:fn,annotations:Tt.menu,hiddenPages:Tt.hiddenPages,onPageVisibilityChange:Tt.setPagesVisible,selectedAnnotation:Tt.selected,onAnnotationSelect:Tt.select,onAnnotationActivate:Tt.activate,captionId:Uo?No:void 0,captionOpen:Ro,onCaptionToggle:()=>xs(C=>!C),placeId:Oe?mn:void 0,placeOpen:K,onPlaceToggle:()=>{pl(true),ht(C=>!C)},language:u,children:vn&&A}),$o&&f("div",{ref:q,className:"clover-canvas-navigator","data-testid":"clover-canvas-navigator","aria-hidden":"true"}),f("div",{ref:V,className:"clover-canvas-viewport",style:{position:"absolute",inset:0,overflow:"hidden",zIndex:-1},"data-testid":"clover-canvas-viewport",role:Jt?"group":"img","aria-roledescription":Ll,...Ls.props,"aria-describedby":Xn.length?As:void 0,"aria-keyshortcuts":Xn.map(({keys:C})=>C).join(" ")||void 0,"aria-busy":Rs,tabIndex:0}),Ls.node,Xn.length>0&&f("span",{id:As,style:ze,children:Xn.map(({description:C},Y)=>f(ae.Fragment,{children:[Y>0&&" ",f("span",{...lt(_.langOf(C)),children:W(C)})]},C))}),f(uh,{kind:"image",shown:Xt&&!xt}),Ke&&!xt&&(It==null?void 0:It.text)&&f(dh,{text:It.text,lang:It.lang||void 0}),(nt==null?void 0:nt.kind)==="audio"&&!Ee&&ke.length===0&&!xt&&(It==null?void 0:It.text)&&f("p",{className:"clover-canvas-sound-label","aria-hidden":"true",...lt(It.lang||void 0),children:It.text}),Me.length>0&&!Ee&&f(wt,{fallback:null,children:f(kh,{instance:tt,stills:Me,vertical:he==="top-to-bottom"||he==="bottom-to-top",media:!!nt,active:xt,lingering:dt==="loading"&&!Nl,onToggle:Ho,request:m==null?void 0:m.request})}),ft&&nt&&X&&!xt&&f(wt,{fallback:null,children:f(bh,{media:nt,request:m==null?void 0:m.request,fillable:Sl,surface:ft,instance:tt,onElement:xl,onFit:El,onCaptionChange:N,caption:J,navigable:qn,fullscreen:Ce&&!!(j!=null&&j.fullPage),isFullscreen:ot,onEnded:et,chapters:Z,highlightedChapter:Q,onChapterHighlight:M,autoPlay:!Ee&&Me.length>0&&Tt.quietlyOpened!==pe,language:u,notes:Tt.timed,marked:Tt.placed,selectedAnnotation:Tt.selected,onAnnotationSelect:Jt?Tt.select:void 0,onAnnotationActivate:Tt.activate,player:Ee&&o?{canvas:o[0],title:It,partOf:Pl}:void 0})}),Nt&&Kt&&(Ft==null?void 0:Ft.frames[Mn(Kt)])&&!xt&&f(wt,{fallback:null,children:f(Sh,{renderer:Nt,frames:gl,byFrame:Ft.frames[Mn(Kt)],animationKey:Kt.id,sceneVersion:$,autoplay:(zs=m==null?void 0:m.animation)==null?void 0:zs.autoplay,loop:(Hs=m==null?void 0:m.animation)==null?void 0:Hs.loop,onEnded:et,language:u,duration:Number(Kt.duration),canvas:Kt,place:Ft.placements[o.indexOf(Kt)],onItems:Ml},Kt.id)}),Ae&&Jt&&b&&f(Ae.AnnotationState,{given:t,annotations:Dn??b,scene:Ft,renderer:Nt,sceneVersion:$,drawn:Ol,media:nt,mediaElement:$t,showPlaceholder:xt,canvasKey:pe,openImages:Cs,openMedia:Es,host:V,onModel:pn,refind:t.refind??0}),Rs&&f(Sn,{overlay:true}),Wt&&f(wt,{fallback:null,children:f(Bi,{id:`place-of-${tt}`,open:Wn,onClose:C=>{var Y;Hn(xe),C&&((Y=document.getElementById(Wt.id))==null||Y.focus())},feature:Wt.feature,name:Wt.name,language:u})}),Oe&&Se&&f(wt,{fallback:null,children:f(Bi,{id:mn,open:K,onClose:C=>{var Y;ht(false),C&&((Y=document.getElementById(`place-${tt}`))==null||Y.focus())},feature:Oe.feature,name:Oe.name,language:u})}),Uo&&f(lf,{id:No,canvases:qe,comments:Oo,open:Ro,onClose:Ss,language:u})]})})};function Nh(t,e,n){return{fitCanvasRect(o,r,s){const i=e(),a=(i==null?void 0:i.canvases.findIndex(c=>c.id===o))??-1;return!i||a===-1?false:(t.fitBounds(rh(i.canvases[a],i.placements[a],r),s),true)},getCanvasRegion(){const o=e();return o?Ic(t.getBounds(),o.canvases,o.placements):null},get backendKind(){return t.backendKind},get atHome(){return t.isAtHome},fitBounds:(o,r)=>t.fitBounds(o,r),fitItemRect:(o,r,s)=>t.fitItemRect(o,r,s),itemRectToWorld:(o,r)=>t.itemRectToWorld(o,r),getBounds:()=>t.getBounds(),getHomeBounds:()=>t.getHomeBounds(),getCamera:()=>t.getCamera(),home:o=>t.home(o),zoomBy:(o,r,s)=>t.zoomBy(o,r,s),panBy:(o,r,s)=>t.panBy(o,r,s),setRotation:(o,r)=>t.setRotation(o,r),getRotation:()=>t.getRotation(),rotateBy:o=>t.rotateBy(o),worldToScreenPoint:o=>t.worldToScreenPoint(o),screenToWorldPoint:o=>t.screenToWorldPoint(o),on:(o,r)=>t.on(o,r),zoomToAnnotation:n}}const Rh=[],Bh=[];function Tc(t,e,n=false){const o=Array.isArray(t)?t:t?[t]:[];return o.length?o.map((s,i)=>{const a=Co(s.service);return!a&&!s.id?null:{id:`${i}:${s.id??a}|${s.region??""}`,service:a,url:s.id,width:s.width,height:s.height,region:s.region}}).filter(s=>s!==null):(Array.isArray(e)?e:e?[e]:[]).filter(Boolean).map((s,i)=>({id:`${i}:${s}`,...n?{service:s}:{url:s}}))}function Ic(t,e,n){let o=null;if(n.forEach((d,h)=>{const p=Math.max(t.x,d.x),m=Math.max(t.y,d.y),g=Math.min(t.x+t.width,d.x+d.width)-p,y=Math.min(t.y+t.height,d.y+d.height)-m;if(g<=0||y<=0)return;const v=g*y;(!o||v>o.area)&&(o={index:h,area:v,clip:{x:p,y:m,width:g,height:y}})}),!o)return null;const{index:r,clip:s}=o,i=e[r],a=n[r],c=cn(i),l=c.width/a.width,u=c.height/a.height;return{canvasId:i.id,rect:{x:Math.round((s.x-a.x)*l),y:Math.round((s.y-a.y)*u),width:Math.round(s.width*l),height:Math.round(s.height*u)}}}function $h(t,e,n,o){return vt(()=>((o==null?void 0:o(t??null,(e==null?void 0:e.id)??null,e==null?void 0:e.duration))??[]).map(r=>{const s=_t(r.label,n);return{...r.id?{id:r.id}:{},label:s.text,lang:s.lang,start:r.start,end:r.end,...r.thumbnail?{thumbnail:r.thumbnail}:{}}}),[t,e,n,o])}function Fh(t,e,n,o){if(t.region){if(!e)return false;const{x:r,y:s,w:i,h:a}=t.region;if(!e.fitCanvasRect(t.canvasId,{x:r,y:s,width:i,height:a},true))return false}if(o&&(t.time!==void 0||t.autoplay)){if(!n)return false;const r=()=>{t.time!==void 0&&(n.currentTime=t.time),t.autoplay&&n.play().catch(()=>{})};n.readyState>=HTMLMediaElement.HAVE_METADATA?r():n.addEventListener("loadedmetadata",r,{once:true})}return true}function Dh(t,e){const n=t.store.get().manifest;if(e.canvasId&&At(n).canvases.some(r=>r.id===e.canvasId))t.goTo(e.canvasId);else if(e.manifestId&&e.manifestId!==(n==null?void 0:n.id))t.goToManifest(e.manifestId,e.canvasId);else return false;return true}function Pc(t){if(typeof t=="string")return Fi(t);const e=t;return(e==null?void 0:e.type)==="SpecificResource"?e:typeof(e==null?void 0:e.id)=="string"?Fi(e.id):e}const Fi=t=>t.replace(/\/((?:t|xywh)=[^/#]*)$/,"#$1");function Lc(t){const e=H(t.thumbnail)[0];return e&&typeof e=="object"?{thumbnail:e}:{}}const Di=new WeakMap,zi=[];function zh(t,e,n){if(!t||!e)return zi;let o=Di.get(t);o||Di.set(t,o=new Map);const r=`${e}|${n??""}`,s=o.get(r);if(s)return s;const i=[],a=new Set,c=u=>{if(!u||a.has(u.id??u))return;a.add(u.id??u);const d=!H(u.behavior).includes("no-nav");for(const h of H(u.items)){if((h==null?void 0:h.type)==="Range"){c(h);continue}if(!d)continue;const p=un(Pc(h));if(p.id.split("#")[0]!==e)continue;const m=ls(p.t);m&&i.push({...u.id?{id:u.id}:{},label:u.label,...m,...Lc(u)})}};for(const u of H(t.structures))c(u);i.sort((u,d)=>u.start-d.start);const l=i.length?i.map((u,d)=>{var h;return{...u,end:u.end??((h=i[d+1])==null?void 0:h.start)??n}}):zi;return o.set(r,l),l}const Hi=new WeakMap,Wi=[];function Hh(t){if(!t)return Wi;const e=Hi.get(t);if(e)return e;const n=new Map(H(t.items).map((c,l)=>[c==null?void 0:c.id,l])),o=new Set,r=c=>{var w,b;if(!c||o.has(c.id??c))return[];o.add(c.id??c);const l=[],u=[],d=[];let h;for(const x of H(c.items))if((x==null?void 0:x.type)==="Range"){const S=r(x);l.push(...S),S.forEach(T=>u.push(...T.canvasIds))}else{const S=un(Pc(x));if(!S.id)continue;h??(h=S),u.push(S.id),d.push(S)}const p=H(c.behavior);if(p.includes("no-nav"))return l;const m=h??void 0,g={id:c.id??`range-${o.size}`,label:c.label,canvasId:(m==null?void 0:m.id)??((w=l[0])==null?void 0:w.canvasId),canvasIds:[...new Set(u)],...p.includes("sequence")?{sequence:true}:{},...Lc(c),children:l},y=ls(m==null?void 0:m.t);return y?g.time=y:!m&&((b=l[0])!=null&&b.time)&&(g.time=l[0].time),m!=null&&m.rect&&(g.region=m.rect),(p.includes("sequence")&&d.length>1&&!d.some(x=>x.t)||Wh(d,n))&&(g.parts=d.map(x=>({canvasId:x.id,...x.rect?{region:x.rect}:{}}))),[g]},s=H(t.structures).flatMap(r),i=s.length===1&&s[0].children.length?s[0].children:s,a=i.length?i:Wi;return Hi.set(t,a),a}function Wh(t,e){return!t.length||t.some(n=>n.t)?false:t.some(n=>n.rect)?true:t.some((n,o)=>o>0&&e.get(n.id)!==(e.get(t[o-1].id)??NaN)+1)}function Qv(t,e,n,o){let r=null,s=null;const i=(l,u,d)=>!l||d>l.depth||d===l.depth&&!(l.sequence&&u.sequence),a=(l,u,d)=>{const h=d||l.id===o;if(e&&l.canvasIds.includes(e)&&(!l.time||n!==void 0&&n>=l.time.start&&(l.time.end===void 0||n<l.time.end))){const m={id:l.id,depth:u,...l.sequence?{sequence:true}:{}};i(r,l,u)&&(r=m),h&&i(s,l,u)&&(s=m)}l.children.forEach(p=>a(p,u+1,h))};t.forEach(l=>a(l,0,false));const c=s??r;return c?c.id:null}function Uh(){const t=rt(n=>n.status),e=rt(n=>n.error);return vt(()=>({status:t,error:e}),[t,e])}function jh(){return rt(t=>t.manifest)}function Ac(){return rt(t=>At(t.manifest))}function fs(){return rt(t=>De(t.manifest,t.canvasId))}function Vh(){return rt(t=>We(t.manifest,t.canvasId))}function qh(){const{clover:t}=de("useNavigation"),e=rt(o=>On(o.manifest,o.canvasId)),n=rt(o=>At(o.manifest).views.length);return vt(()=>Fd(t,e,n),[t,e,n])}function Kh(){return rt(t=>nc(t.manifest,t.addedSets))}function ty(t){const{language:e}=de("useLocalized");return vt(()=>_t(t,e),[t,e])}function ey(){return Pt().t}function ny(){return Pt().langOf}const Zh=({options:t,onReady:e,onViewportChange:n,onMediaElement:o,onCaptionChange:r,caption:s,onEnded:i,placeholder:a=true,label:c,partOf:l,language:u,annotations:d,chapters:h,...p})=>{const m=de("Canvas"),{clover:g}=m,y=ne(g.captions.subscribe,g.captions.get,g.captions.get),v=s??y,w=u??m.language,b=fs(),{direction:x}=Ac(),S=jh(),T=Vh(),B=rt($=>{var st;return $.status==="loading"?"loading":((st=$.manifest)==null?void 0:st.id)??""}),N=rt($=>$.target),J=rt($=>oc($.manifest,$.addedSets,$.search.set,$.regions)),et=rt($=>yd($.manifest,$.addedSets,$.hiddenSets,$.shownSets)),Z=rt($=>ts($.manifest,$.addedSets,$.hiddenSets,$.shownSets)),Q=rt($=>$.annotationId),M=R(Q);M.current=Q;const[E,A]=z(0);D(()=>g.found.subscribe($=>{$&&$===M.current&&A(st=>st+1)}),[g]);const W=ne(g.highlight.subscribe,g.highlight.get,g.highlight.get),V=ne(g.chapter.subscribe,g.chapter.get,g.chapter.get),G=b.map($=>$.id).join("|"),ct=vt(()=>{if(d)return d;const $=b.map(st=>st.id);return J.flatMap(st=>st.entries.filter(Ot=>$.includes(Ot.canvasId)).map(Ot=>({annotation:Ot.annotation,targetIndex:$.indexOf(Ot.canvasId),pageId:st.id,...st.label?{pageLabel:st.label}:{},...Ot.place?{place:Ot.place}:{},...Ot.layer?{layer:{key:Ot.layer.key,item:Ot.layer.item}}:{}})))},[d,J,b]),ot=N?($=>!!$&&b.some(st=>st.id===$))(N.canvasId):false,at=R(null);ot&&(at.current=G);const _=a&&at.current!==G,k=R(null),I=R(null),F=vt(()=>b.some($=>ho($).length>0),[b]),O=F?b.find($=>ho($).length>0):void 0,L=$h(S,O,w,zh),U=R(F);U.current=F;const X=s===void 0?m.language:void 0,bt=O==null?void 0:O.id;D(()=>{if(!X||!O)return;const $=xc(O).find(st=>st.language&&qa(st.language,X));$&&g.captions.get()!==$.id&&g.captions.emit($.id)},[X,bt,g]);const tt=ut(()=>{const $=g.store.get().target;!$||!g.store.get().canvasId||Fh($,k.current,I.current,U.current)&&g.consumeTarget()},[g]),pt=R(G);D(()=>{pt.current!==G&&(pt.current=G,I.current=null),N&&tt()},[N,G,tt]);const ft=R(e);ft.current=e;const Bt=ut($=>{var st;k.current=$,$.on("change",tt),tt(),(st=ft.current)==null||st.call(ft,$)},[tt]),Nt=ut($=>{var Ot;const st=(Ot=k.current)==null?void 0:Ot.getCanvasRegion();g.viewport.emit(st?{canvasId:st.canvasId,region:{x:st.rect.x,y:st.rect.y,w:st.rect.width,h:st.rect.height}}:null),n==null||n($)},[g,n]),Vt=ut($=>{I.current=$,g.media.emit($),$&&tt(),o==null||o($)},[g,tt,o]),q=ut(()=>{i==null||i(),(Ne(S,"auto-advance")||Ne(T,"auto-advance"))&&g.next({autoplay:true,wrap:Ne(S,"repeat")})},[g,S,T,i]),j=ut($=>void Dh(g,$),[g]),dt=(t==null?void 0:t.request)??g.request,Ct=Ne(T,"auto-advance")||Ne(S,"auto-advance"),Xt=Ne(T,"repeat")||Ne(S,"repeat"),we=vt(()=>({...t,request:dt,animation:(t==null?void 0:t.animation)??{autoplay:Ct,loop:Xt}}),[t,dt,Ct,Xt]);return b.length?f(Ah,{...p,manifestId:B,navPlace:S==null?void 0:S.navPlace,canvases:b,viewingDirection:x,language:w,label:c??(T==null?void 0:T.label)??(S==null?void 0:S.label),partOf:l??(S==null?void 0:S.label),options:we,placeholder:_,onReady:Bt,onViewportChange:Nt,onMediaElement:Vt,caption:v,onCaptionChange:$=>{g.captions.emit(($==null?void 0:$.id)??null),r==null||r($)},onEnded:q,annotations:ct,hiddenPages:Z,unlistedPages:et,onPageVisibilityChange:($,st)=>$.forEach(Ot=>g.setSetVisible(Ot,st)),chapters:h??L,highlightedChapter:V,onChapterHighlight:$=>g.chapter.emit($),selectedAnnotation:Q,refind:E,highlightedAnnotation:W,onAnnotationSelect:$=>g.selectAnnotation($),onAnnotationLink:p.onAnnotationLink??j,onAnnotationActive:$=>{var st;g.highlight.emit($),(st=p.onAnnotationActive)==null||st.call(p,$)}}):null},Gh=6,Je=new Set;function Xh(t){if(Je.has(t))return true;for(;Je.size>=Gh;){let e;for(const n of Je)n.hiddenSince!==null&&(!e||n.hiddenSince<e.hiddenSince)&&(e=n);if(!e)return false;Je.delete(e),e.release()}return Je.add(t),true}function Ui(t){Je.delete(t)}function Yh(t){return typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement?t.complete&&t.naturalWidth>0:true}function Jh(t,e){if(!t.bleed)return{x:0,y:0};const n=t.transform,o=Math.hypot(n.a,n.b)*e,r=Math.hypot(n.c,n.d)*e;return{x:t.bleed.right&&o>0?1/o:0,y:t.bleed.bottom&&r>0?1/r:0}}const Qh=`#version 300 es
3
+ in vec2 a_position;
4
+ uniform mat3 u_matrix;
5
+ uniform vec4 u_crop;
6
+ out vec2 v_uv;
7
+
8
+ void main() {
9
+ vec3 clip = u_matrix * vec3(a_position, 1.0);
10
+ gl_Position = vec4(clip.xy, 0.0, 1.0);
11
+ v_uv = u_crop.xy + a_position * u_crop.zw;
12
+ }
13
+ `,tp=`#version 300 es
14
+ precision highp float;
15
+ in vec2 v_uv;
16
+ uniform sampler2D u_texture;
17
+ uniform float u_opacity;
18
+ out vec4 outColor;
19
+
20
+ void main() {
21
+ outColor = texture(u_texture, v_uv) * u_opacity;
22
+ }
23
+ `;class po{constructor(e,n,o){P(this,"kind","webgl2");P(this,"canvas");P(this,"maxTextureSize");P(this,"gl");P(this,"program",null);P(this,"vao",null);P(this,"uniforms",{matrix:null,crop:null,opacity:null,texture:null});P(this,"textures",new Map);P(this,"cssWidth",1);P(this,"cssHeight",1);P(this,"pixelRatio",1);P(this,"matrixScratch",new Float32Array(9));P(this,"isLost",false);P(this,"callbacks");P(this,"handleLost",()=>{var e2,n2;this.isLost=true,this.textures.clear(),(n2=(e2=this.callbacks).onLost)==null||n2.call(e2)});this.canvas=e,this.gl=n,this.callbacks=o,this.maxTextureSize=n.getParameter(n.MAX_TEXTURE_SIZE)||4096;const r=ep(n,Qh,tp);this.program=r,this.uniforms={matrix:n.getUniformLocation(r,"u_matrix"),crop:n.getUniformLocation(r,"u_crop"),opacity:n.getUniformLocation(r,"u_opacity"),texture:n.getUniformLocation(r,"u_texture")};const s=n.createVertexArray();n.bindVertexArray(s);const i=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,i),n.bufferData(n.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,1,1]),n.STATIC_DRAW);const a=n.getAttribLocation(r,"a_position");n.enableVertexAttribArray(a),n.vertexAttribPointer(a,2,n.FLOAT,false,0,0),n.bindVertexArray(null),this.vao=s,n.enable(n.BLEND),n.blendFunc(n.ONE,n.ONE_MINUS_SRC_ALPHA),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,true),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,false),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,n.BROWSER_DEFAULT_WEBGL),e.addEventListener("webglcontextlost",this.handleLost)}static create(e,n={}){let o=null;try{o=e.getContext("webgl2",{alpha:true,premultipliedAlpha:true,antialias:false,depth:false,stencil:false,preserveDrawingBuffer:false})}catch{o=null}if(!o||typeof o.createShader!="function")return null;try{return new po(e,o,n)}catch{return null}}resize(e,n,o){this.cssWidth=Math.max(1,e),this.cssHeight=Math.max(1,n),this.pixelRatio=o;const r=Math.max(1,Math.round(e*o)),s=Math.max(1,Math.round(n*o));this.canvas.width!==r&&(this.canvas.width=r),this.canvas.height!==s&&(this.canvas.height=s)}begin(){if(this.isLost)return;const e=this.gl;e.viewport(0,0,this.canvas.width,this.canvas.height),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.useProgram(this.program),e.bindVertexArray(this.vao),e.activeTexture(e.TEXTURE0),e.uniform1i(this.uniforms.texture,0)}draw(e){if(this.isLost||!Yh(e.source))return"skipped";const n=this.gl,o=this.upload(e);if(o==="tainted")return"tainted";if(!o)return"skipped";const r=e.crop??{x:0,y:0,width:e.width,height:e.height},s=Jh(e,this.pixelRatio),i=le(e.transform,oe(r.x,r.y),ce(r.width+s.x,r.height+s.y));return n.uniformMatrix3fv(this.uniforms.matrix,false,mh(i,this.cssWidth,this.cssHeight,this.matrixScratch)),n.uniform4f(this.uniforms.crop,r.x/e.width,r.y/e.height,r.width/e.width,r.height/e.height),n.uniform1f(this.uniforms.opacity,e.opacity),n.bindTexture(n.TEXTURE_2D,o.texture),n.drawArrays(n.TRIANGLE_STRIP,0,4),"drawn"}end(){this.isLost||this.gl.bindVertexArray(null)}has(e){return!this.isLost&&this.textures.has(e)}release(e){const n=this.textures.get(e);n&&(this.isLost||this.gl.deleteTexture(n.texture),this.textures.delete(e))}dispose(){var e;if(this.canvas.removeEventListener("webglcontextlost",this.handleLost),!this.isLost){for(const n of[...this.textures.keys()])this.release(n);this.program&&this.gl.deleteProgram(this.program),this.vao&&this.gl.deleteVertexArray(this.vao)}this.textures.clear(),(e=this.gl.getExtension("WEBGL_lose_context"))==null||e.loseContext(),this.isLost=true}upload(e){const n=this.gl,o=this.textures.get(e.key);if(o&&o.width===e.width&&o.height===e.height)return o;const r=(o==null?void 0:o.texture)??n.createTexture();if(!r)return null;n.bindTexture(n.TEXTURE_2D,r);try{n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,e.source)}catch(i){if(o||n.deleteTexture(r),np(i))return"tainted";throw i}n.generateMipmap(n.TEXTURE_2D),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR_MIPMAP_LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE);const s={texture:r,width:e.width,height:e.height};return this.textures.set(e.key,s),s}}function ep(t,e,n){const o=ji(t,t.VERTEX_SHADER,e),r=ji(t,t.FRAGMENT_SHADER,n),s=t.createProgram();if(!s)throw new Error("Could not create WebGL program");if(t.attachShader(s,o),t.attachShader(s,r),t.linkProgram(s),t.deleteShader(o),t.deleteShader(r),!t.getProgramParameter(s,t.LINK_STATUS)){const i=t.getProgramInfoLog(s);throw t.deleteProgram(s),new Error(`Could not link WebGL program: ${i}`)}return s}function ji(t,e,n){const o=t.createShader(e);if(!o)throw new Error("Could not create WebGL shader");if(t.shaderSource(o,n),t.compileShader(o),!t.getShaderParameter(o,t.COMPILE_STATUS)){const r=t.getShaderInfoLog(o);throw t.deleteShader(o),new Error(`Could not compile WebGL shader: ${r}`)}return o}function np(t){return typeof t=="object"&&t!==null&&t.name==="SecurityError"}function Oc(t,e){return le(oe(e.width/2,e.height/2),Nn(t.rotation),ce(t.zoom),oe(-t.x,-t.y))}function Nc(t,e){return le(oe(t.x,t.y),ce(1/t.zoom),Nn(-t.rotation),oe(-e.width/2,-e.height/2))}function Vi(t,e,n){return ve(Nc(t,e),n)}function op(t,e,n){return ve(Oc(t,e),n)}function Lr(t,e){return Mo(Nc(t,e),{x:0,y:0,width:e.width,height:e.height})}function rp(t,e,n=0,o=0){const r=Mo(Nn(n),t),s=Math.max(1,e.width*(1-o*2)),i=Math.max(1,e.height*(1-o*2)),a=Math.min(s/Math.max(r.width,Number.EPSILON),i/Math.max(r.height,Number.EPSILON)),c=Mc(t);return{x:c.x,y:c.y,zoom:a,rotation:n}}function mo(t,e,n,o,r){const s=ve(le(ce(1/n),Nn(-o)),{x:e.x-r.width/2,y:e.y-r.height/2});return{x:t.x-s.x,y:t.y-s.y}}function qi(t,e){return t.x===e.x&&t.y===e.y&&t.zoom===e.zoom&&t.rotation===e.rotation}const sp=.09,ip=1e-4,Ki=.05,ap=1e-4;class cp{constructor(e,n=sp,o){P(this,"current");P(this,"target",null);P(this,"timeConstant");P(this,"spring");P(this,"start");P(this,"elapsed",0);this.current={...e},this.start={...e},this.timeConstant=n,this.spring=o}get destination(){return this.target?{...this.target.state}:{...this.current}}set(e){this.current={...e},this.target=null}animateTo(e,n,o=false){const r=this.spring?this.spring.duration<=0:this.timeConstant===0;if(o||r){this.set(e.state);return}let s=e.anchor;if(s){const i=mo(s.world,s.screen,e.state.zoom,e.state.rotation,n);Math.hypot(i.x-e.state.x,i.y-e.state.y)*e.state.zoom>Ki&&(s=void 0)}this.start={...this.current},this.elapsed=0,this.target={state:{...e.state},anchor:s}}stop(){this.target=null}step(e,n){const o=this.target;if(!o)return false;const r=o.state;let s,i;if(this.spring){this.elapsed+=Math.max(e,0);const d=this.elapsed/this.spring.duration;if(d>=1)return this.current={...r},this.target=null,false;const h=this.spring.stiffness;s=this.start,i=(1-Math.exp(-h*d))/(1-Math.exp(-h))}else s=this.current,i=1-Math.exp(-Math.max(e,0)/this.timeConstant);const a=Math.exp(Math.log(s.zoom)+(Math.log(r.zoom)-Math.log(s.zoom))*i),c=s.rotation+(r.rotation-s.rotation)*i,l=o.anchor?mo(o.anchor.world,o.anchor.screen,a,c,n):{x:s.x+(r.x-s.x)*i,y:s.y+(r.y-s.y)*i};return this.current={x:l.x,y:l.y,zoom:a,rotation:c},this.spring?true:Math.abs(Math.log(r.zoom/a))<ip&&Math.abs(r.rotation-c)<ap&&Math.hypot(r.x-l.x,r.y-l.y)*a<Ki?(this.current={...r},this.target=null,false):true}}const Rc=5,Zi=300,lp=Rc*4;function Gi(t,e=false){return t==="touch"||t==="pen"&&!e}function up(t){return t.pointerType==="pen"&&t.buttons===0}function dp(t,e,n){for(let o=t;o&&o!==e;o=o.parentElement)if((n>0?o.scrollHeight-o.clientHeight-o.scrollTop:o.scrollTop)>=1&&/auto|scroll/.test(getComputedStyle(o).overflowY))return true;return false}function Xi(t,e){var o;let n=t;for(;n&&n!==e;){if(n instanceof HTMLButtonElement||n instanceof HTMLAnchorElement||n instanceof HTMLInputElement||n instanceof HTMLLabelElement||n instanceof HTMLSelectElement||((o=n.dataset)==null?void 0:o.cloverCanvasInteractive)!==void 0)return true;n=n.parentElement}return false}const Ar={clickToZoom:true,dblClickToZoom:true,pinchToZoom:true,scrollToZoom:false,navigable:true,flickEnabled:true,flickMinSpeed:200,flickMomentum:.25},ir=2,Yi=1.5,Ji=.1,fp=100,hp=.002,pp=.01;class mp{constructor(e,n,o=Ar){P(this,"pointers",new Map);P(this,"samples",[]);P(this,"down",null);P(this,"pinch",null);P(this,"lastTap",null);P(this,"lastPointerType","");P(this,"penHovers",false);P(this,"onPointerDown",e2=>{var o2,r;if(this.lastPointerType=e2.pointerType,e2.pointerType==="mouse"&&e2.button!==0||Xi(e2.target,this.element))return;(r=(o2=this.element).setPointerCapture)==null||r.call(o2,e2.pointerId);const n2=this.local(e2);this.pointers.set(e2.pointerId,n2),this.pointers.size===1?(this.down={x:n2.x,y:n2.y,t:e2.timeStamp,moved:false},this.samples=[{x:n2.x,y:n2.y,t:e2.timeStamp}],this.target.setInteracting(true)):this.pointers.size===2&&(this.pinch=this.pinchState(),this.down&&(this.down.moved=true))});P(this,"onPointerMove",e2=>{var r;up(e2)&&(this.penHovers=true);const n2=this.pointers.get(e2.pointerId);if(!n2)return;const o2=this.local(e2);if(this.pointers.set(e2.pointerId,o2),this.pointers.size===1){const s=o2.x-n2.x,i=o2.y-n2.y;this.down&&Math.hypot(o2.x-this.down.x,o2.y-this.down.y)>Rc&&(this.down.moved=true),(r=this.down)!=null&&r.moved&&this.options.navigable&&this.target.panBy(s,i,!this.tracksPointer(e2.pointerType)),this.samples.push({x:o2.x,y:o2.y,t:e2.timeStamp});const a=e2.timeStamp-fp;for(;this.samples.length>2&&this.samples[0].t<a;)this.samples.shift()}else if(this.pointers.size===2&&this.pinch&&this.options.navigable){const s=this.pinchState();this.options.pinchToZoom&&this.pinch.distance>0&&this.target.zoomBy(s.distance/this.pinch.distance,s.mid,false),this.target.panBy(s.mid.x-this.pinch.mid.x,s.mid.y-this.pinch.mid.y,false),this.pinch=s}});P(this,"onPointerUp",e2=>{var c,l,u,d,h,p;if(!this.pointers.has(e2.pointerId))return;if(this.pointers.delete(e2.pointerId),(l=(c=this.element).releasePointerCapture)==null||l.call(c,e2.pointerId),this.pointers.size===1){this.pinch=null;const[m]=this.pointers.values();this.samples=[{...m,t:e2.timeStamp}];return}if(this.pointers.size>0)return;const n2=this.down;if(this.down=null,this.pinch=null,this.target.setInteracting(false),!n2)return;const o2=this.local(e2);if(!n2.moved&&e2.type==="pointerup"&&e2.timeStamp-n2.t<Zi){if((d=(u=this.target).dismiss)!=null&&d.call(u)){this.lastTap=null;return}if(Gi(e2.pointerType,this.penHovers)){const m=this.lastTap;this.options.navigable&&(this.options.clickToZoom||this.options.dblClickToZoom)&&m&&e2.timeStamp-m.t<Zi&&Math.hypot(o2.x-m.x,o2.y-m.y)<lp?(this.lastTap=null,this.zoomIn(o2)):this.lastTap={x:o2.x,y:o2.y,t:e2.timeStamp};return}this.options.clickToZoom&&this.options.navigable?e2.shiftKey?this.target.zoomBy(1/ir,o2,true):this.zoomIn(o2):(p=(h=this.target).tap)==null||p.call(h,o2);return}if(!this.options.navigable||!this.tracksPointer(e2.pointerType))return;const s=this.samples[0],i=this.samples[this.samples.length-1],a=((i==null?void 0:i.t)??0)-((s==null?void 0:s.t)??0);if(s&&i&&a>0&&e2.timeStamp-i.t<50){const m=(i.x-s.x)/a*1e3,g=(i.y-s.y)/a*1e3,y=this.options.flickMomentum;y>0&&Math.hypot(m,g)>this.options.flickMinSpeed&&this.target.panBy(m*y,g*y,true)}});P(this,"onDoubleClick",e2=>{this.options.navigable&&(this.options.clickToZoom||!this.options.dblClickToZoom||Gi(this.lastPointerType,this.penHovers)||Xi(e2.target,this.element)||(e2.shiftKey?this.target.zoomBy(1/ir,this.local(e2),true):this.zoomIn(this.local(e2))))});P(this,"onWheel",e2=>{const n2=e2.ctrlKey;if(!this.options.navigable||!n2&&!this.options.scrollToZoom||!n2&&dp(e2.target,this.element,e2.deltaY))return;e2.preventDefault();const o2=gp(e2),r=n2?pp:hp;this.target.zoomBy(Math.exp(-o2*r),this.local(e2),!n2)});P(this,"onKeyDown",e2=>{if(e2.target!==this.element||!this.options.navigable||e2.altKey||e2.metaKey||e2.ctrlKey)return;const n2=this.element.getBoundingClientRect(),o2=n2.width*Ji*(e2.shiftKey?3:1),r=n2.height*Ji*(e2.shiftKey?3:1);switch(e2.key){case"ArrowLeft":this.target.panBy(o2,0,true);break;case"ArrowRight":this.target.panBy(-o2,0,true);break;case"ArrowUp":this.target.panBy(0,r,true);break;case"ArrowDown":this.target.panBy(0,-r,true);break;case"+":case"=":this.target.zoomBy(Yi,void 0,true);break;case"-":case"_":this.target.zoomBy(1/Yi,void 0,true);break;case"0":this.target.home();break;case"r":this.target.rotateBy(90);break;case"R":this.target.rotateBy(-90);break;default:return}e2.preventDefault()});this.element=e,this.target=n,this.options=o,e.addEventListener("pointerdown",this.onPointerDown),e.addEventListener("pointermove",this.onPointerMove),e.addEventListener("pointerup",this.onPointerUp),e.addEventListener("pointercancel",this.onPointerUp),e.addEventListener("dblclick",this.onDoubleClick),e.addEventListener("wheel",this.onWheel,{passive:false}),e.addEventListener("keydown",this.onKeyDown)}setOptions(e){this.options=e}dispose(){const e=this.element;e.removeEventListener("pointerdown",this.onPointerDown),e.removeEventListener("pointermove",this.onPointerMove),e.removeEventListener("pointerup",this.onPointerUp),e.removeEventListener("pointercancel",this.onPointerUp),e.removeEventListener("dblclick",this.onDoubleClick),e.removeEventListener("wheel",this.onWheel),e.removeEventListener("keydown",this.onKeyDown)}local(e){const n=this.element.getBoundingClientRect();return{x:e.clientX-n.left,y:e.clientY-n.top}}zoomIn(e){var n,o;(o=(n=this.target).atMaxZoom)!=null&&o.call(n)?this.target.home():this.target.zoomBy(ir,e,true)}tracksPointer(e){return e==="touch"||this.options.flickEnabled}pinchState(){const[e,n]=[...this.pointers.values()];return{distance:Math.hypot(n.x-e.x,n.y-e.y),mid:{x:(e.x+n.x)/2,y:(e.y+n.y)/2}}}}function gp(t){return t.deltaMode===1?t.deltaY*16:t.deltaMode===2?t.deltaY*400:t.deltaY}class Bc extends Error{constructor(e,n,o){super(e),this.url=n,this.status=o,this.name="ImageLoadError"}}const Qi=new Set;async function vp(t,e={}){const{signal:n,maxTextureSize:o,request:r}=e,s=xd(r),i=bp(t);if(typeof createImageBitmap!="function"||typeof fetch!="function")return ar(t,{signal:n,cors:true,withCredentials:s});if(i&&Qi.has(i))return ar(t,{signal:n,cors:false,withCredentials:s});let a;try{a=await ns(r,t,{mode:"cors",signal:n})}catch(h){if(_p(h,n))throw h;const p=await ar(t,{signal:n,cors:false,withCredentials:s});return i&&Qi.add(i),p}if(!a.ok)throw new Bc(`Image request failed with ${a.status}`,t,a.status);const c=await a.blob();let l=await yp(c);const u=l.width,d=l.height;if(o&&(l.width>o||l.height>o)){const h=o/Math.max(l.width,l.height),p=await createImageBitmap(l,{resizeWidth:Math.max(1,Math.floor(l.width*h)),resizeHeight:Math.max(1,Math.floor(l.height*h)),resizeQuality:"high"});l.close(),l=p}if(n!=null&&n.aborted)throw l.close(),Or();return{kind:"bitmap",source:l,width:l.width,height:l.height,naturalWidth:u,naturalHeight:d,opaque:false}}async function yp(t){const e={imageOrientation:"from-image",premultiplyAlpha:"premultiply",colorSpaceConversion:"default"};try{return await createImageBitmap(t,e)}catch(n){if(n instanceof TypeError)return createImageBitmap(t);throw n}}function ar(t,{signal:e,cors:n,withCredentials:o}){return new Promise((r,s)=>{if(e!=null&&e.aborted){s(Or());return}const i=new Image;i.decoding="async",n&&(i.crossOrigin=o?"use-credentials":"anonymous");const a=()=>{i.onload=null,i.onerror=null,e==null||e.removeEventListener("abort",c)},c=()=>{a(),i.src="",s(Or())};e==null||e.addEventListener("abort",c),i.onload=()=>{a();const l=()=>r({kind:"element",source:i,width:i.naturalWidth,height:i.naturalHeight,naturalWidth:i.naturalWidth,naturalHeight:i.naturalHeight,opaque:!n});typeof i.decode=="function"?i.decode().then(l,l):l()},i.onerror=()=>{a(),s(new Bc("Image failed to load",t))},i.src=t})}function bp(t){var e;try{return new URL(t,(e=globalThis.location)==null?void 0:e.href).origin}catch{return null}}function _p(t,e){return!!(e!=null&&e.aborted)||typeof t=="object"&&t!==null&&t.name==="AbortError"}function Or(){const t=new Error("Aborted");return t.name="AbortError",t}function ta(t){t.kind==="bitmap"&&t.source.close()}const wp=192*1024*1024,xp=6,Sp=2;class kp{constructor(e){P(this,"entries",new Map);P(this,"inFlight",0);P(this,"frame",0);P(this,"bytes",0);P(this,"wanted",[]);P(this,"disposed",false);P(this,"budget");P(this,"maxInFlight");this.options=e,this.budget=e.byteBudget??wp,this.maxInFlight=e.maxInFlight??xp}get(e){const n=this.entries.get(e);if((n==null?void 0:n.state)==="ready")return n.lastUsed=this.frame,n.image}has(e){var n;return((n=this.entries.get(e))==null?void 0:n.state)==="ready"}failed(e){var n;return((n=this.entries.get(e))==null?void 0:n.state)==="failed"}get byteSize(){return this.bytes}get pending(){return this.inFlight}seed(e,n){var r;const o=this.entries.get(e);(o==null?void 0:o.state)!=="ready"&&((r=o==null?void 0:o.controller)==null||r.abort(),this.entries.set(e,{url:e,state:"ready",image:n,bytes:cr(n),lastUsed:this.frame,attempts:0,pinned:false,waiters:(o==null?void 0:o.waiters)??[]}),this.bytes+=cr(n),this.flushWaiters(e))}prefetch(e){return Promise.all(e.map(n=>new Promise(o=>{const r=this.entries.get(n.url);if(r&&r.state!=="loading")return o();if(r){r.waiters.push(o);return}this.start({...n,priority:-1},o)}))).then(()=>{})}update(e){if(this.disposed)return;this.frame++;const n=new Set(e.map(o=>o.url));this.wanted=[...e].sort((o,r)=>o.priority-r.priority);for(const o of this.entries.values())o.state==="loading"&&!o.pinned&&!n.has(o.url)&&o.controller&&(o.controller.abort(),this.entries.delete(o.url),this.inFlight--);for(const o of this.wanted){const r=this.entries.get(o.url);r&&(r.lastUsed=this.frame)}this.pump(),this.evict(n)}dispose(){var e;this.disposed=true;for(const n of this.entries.values())(e=n.controller)==null||e.abort(),this.flushWaiters(n.url);this.entries.clear(),this.bytes=0}forEachReady(e){for(const n of this.entries.values())n.state==="ready"&&n.image&&e(n.url,n.image)}pump(){for(const e of this.wanted){if(this.inFlight>=this.maxInFlight)break;this.entries.has(e.url)||this.start(e)}}start(e,n){const o=new AbortController,r={url:e.url,state:"loading",bytes:0,lastUsed:this.frame,attempts:0,controller:o,pinned:!!n,waiters:n?[n]:[]};this.entries.set(e.url,r),this.inFlight++,this.attempt(r,e,o,e.url)}attempt(e,n,o,r){e.attempts++,this.options.load(r,o.signal).then(s=>{if(this.disposed||this.entries.get(e.url)!==e){ta(s);return}e.state="ready",e.image=s,e.bytes=cr(s),e.controller=void 0,e.pinned=false,this.bytes+=e.bytes,this.settle(e)},s=>{if(!(o.signal.aborted||this.disposed)&&this.entries.get(e.url)===e){if(e.attempts<Sp&&!Cp(s,n)){this.attempt(e,n,o,n.fallbackUrl??n.url);return}e.state="failed",e.controller=void 0,e.pinned=false,this.settle(e)}})}settle(e){this.inFlight--,this.flushWaiters(e.url),this.options.onSettled(),this.pump()}flushWaiters(e){const n=this.entries.get(e);if(!n)return;const o=n.waiters;n.waiters=[],o.forEach(r=>r())}evict(e){if(this.bytes<=this.budget)return;const n=[...this.entries.values()].filter(o=>o.state==="ready"&&!e.has(o.url)).sort((o,r)=>o.lastUsed-r.lastUsed);for(const o of n){if(this.bytes<=this.budget)break;this.entries.delete(o.url),this.bytes-=o.bytes,o.image&&ta(o.image),this.options.onEvict(o.url)}}}function cr(t){return t.width*t.height*4}function Cp(t,e){if(e.fallbackUrl)return false;const n=t==null?void 0:t.status;return typeof n=="number"&&n>=400&&n<500&&n!==408&&n!==429}const Ep=.1;class Mp{constructor(e,n=r=>requestAnimationFrame(r),o=r=>cancelAnimationFrame(r)){P(this,"handle",0);P(this,"last",0);P(this,"disposed",false);P(this,"frame",e2=>{if(this.handle=0,this.disposed)return;const n2=this.last?Math.min((e2-this.last)/1e3,Ep):1/60;this.last=e2,this.tick(n2,e2)?this.invalidate():this.last=0});this.tick=e,this.raf=n,this.caf=o}invalidate(){this.disposed||this.handle||(this.handle=this.raf(this.frame))}drawNow(){this.disposed||(this.handle&&this.caf(this.handle),this.frame(performance.now()))}dispose(){this.disposed=true,this.handle&&this.caf(this.handle),this.handle=0}}const Tp=2*1024*1024;function Ip(t,e,n=Tp){const o=new Set;let r=n,s=false;return{get deferred(){return s},getTile(i){const a=t(i);if(!a||a.kind==="media"||a.opaque||o.has(i)||e(i))return a;const c=a.width*a.height*4;if(o.size>0&&c>r){s=true;return}return r-=c,o.add(i),a}}}function Pp(t){const e=/^(!)?(\d+(?:\.\d+)?)$/.exec((t==null?void 0:t.trim())??"");if(!e)return null;const n=Number(e[2]);if(n>360)return null;const o=n%360,r=!!e[1];return o||r?{degrees:o,mirror:r}:null}function Lp(t,e,n){if(!t)return null;let o=t.trim().replace(/^xywh=/,""),r=false;o.startsWith("pct:")?(r=true,o=o.slice(4)):o.startsWith("pixel:")&&(o=o.slice(6));const s=o.split(",").map(Number);if(s.length!==4||s.some(m=>!Number.isFinite(m)))return null;let[i,a,c,l]=s;r&&(i=i/100*e,a=a/100*n,c=c/100*e,l=l/100*n);const u=Math.max(0,i),d=Math.max(0,a),h=Math.min(e,i+c),p=Math.min(n,a+l);return h<=u||p<=d?null:{x:u,y:d,width:h-u,height:p-d}}const lr=512,Ap=16e6;function $c(t,e,n){return{width:e,height:n,levels:[{scaleFactor:1,width:e,height:n,tileWidth:e,tileHeight:n,cols:1,rows:1}],tile:r=>({...r,url:t,region:{x:0,y:0,width:e,height:n}})}}function Op(t){const{width:e,height:n}=t,o=[],r=t.regionByPx&&t.sizeByW,s=(h,p,m)=>{const g=Math.ceil(e/h),y=Math.ceil(n/h);return{scaleFactor:h,width:g,height:y,tileWidth:p,tileHeight:m,cols:Math.ceil(g/p),rows:Math.ceil(y/m)}},i=(h,p)=>({scaleFactor:e/h,width:h,height:p,tileWidth:h,tileHeight:p,cols:1,rows:1,whole:true}),a=t.tiles[0];if(a)for(const h of a.scaleFactors)o.push(s(h,a.width,a.height));else if(r)for(let h=1;;h*=2){const p=s(h,lr,lr);if(o.push(p),p.cols===1&&p.rows===1)break}const c=Math.max(0,...o.map(h=>h.scaleFactor));for(const h of t.sizes){const p=e/h.width;Np(t,h.width,h.height)&&p>c+1e-9&&o.push(i(h.width,h.height))}const l=o.reduce((h,p)=>!h||p.scaleFactor>h.scaleFactor?p:h,null);if(l&&l.cols*l.rows>1&&t.sizeByW){const h=Math.max(e,n)/lr;o.push(i(Math.ceil(e/h),Math.ceil(n/h)))}(!o.length||!a&&!r&&e*n<=Ap)&&(o.some(h=>h.scaleFactor===1)||o.push(i(e,n)));const u=Rp(o).sort((h,p)=>p.scaleFactor-h.scaleFactor),d=zf(t);return{width:e,height:n,levels:u,tile(h){const p=u[h.level],m=p.scaleFactor,g=p.cols===1&&p.rows===1;let y,v,w;if(g)y={x:0,y:0,width:e,height:n},v=p.width,w=p.height;else{const b=Math.round(h.col*p.tileWidth*m),x=Math.round(h.row*p.tileHeight*m);y={x:b,y:x,width:Math.min(Math.round(p.tileWidth*m),e-b),height:Math.min(Math.round(p.tileHeight*m),n-x)},v=Math.ceil(y.width/m),w=Math.ceil(y.height/m)}return{...h,region:y,url:uo(t,y,v,w),fallbackUrl:d?uo(t,y,v,w,d):void 0}}}}function Np(t,e,n){return!(t.maxWidth&&e>t.maxWidth||t.maxHeight&&n>t.maxHeight||t.maxArea&&e*n>t.maxArea)}function Rp(t){const e=new Map;for(const n of t){const o=`${n.width}x${n.height}`,r=e.get(o);(!r||r.cols*r.rows<n.cols*n.rows)&&e.set(o,n)}return[...e.values()]}function Bp(t,e){const n=t.levels;for(let o=0;o<n.length;o++)if(n[o].scaleFactor<=e*(1+1e-6))return o;return n.length-1}function Te(t,e,n){const o=t.levels[e],r=o.tileWidth*o.scaleFactor,s=o.tileHeight*o.scaleFactor,i=Math.max(0,n.x),a=Math.max(0,n.y),c=Math.min(t.width,n.x+n.width),l=Math.min(t.height,n.y+n.height);if(c<=i||l<=a)return[];const u=Math.max(0,Math.floor(i/r)),d=Math.min(o.cols-1,Math.floor((c-1e-9)/r)),h=Math.max(0,Math.floor(a/s)),p=Math.min(o.rows-1,Math.floor((l-1e-9)/s)),m=[];for(let g=h;g<=p;g++)for(let y=u;y<=d;y++)m.push({level:e,col:y,row:g});return m}async function $p(t,e){if(t.media)return Fp(t,t.media);let n=null,o=null;if(t.service)try{n=Op(await cs(t.service,e.infoOptions))}catch(h){o=h}if(!n){if(!t.url)throw o??new Error("Image has no source");const h=await e.loadStatic(t.url);e.cache.seed(t.url,h),n=$c(t.url,h.naturalWidth,h.naturalHeight)}const r=t.width&&t.height&&t.width>0&&t.height>0?{width:t.width,height:t.height}:{width:n.width,height:n.height},s=Lp(t.region,r.width,r.height)??{x:0,y:0,width:r.width,height:r.height},i=n.width/r.width,a=n.height/r.height,c={x:s.x*i,y:s.y*a,width:s.width*i,height:s.height*a},l=Pp(t.rotation),u=l?Dp(c,l):void 0,d={id:t.id,spec:t,pyramid:n,size:r,clip:c,contentClip:s,rect:{x:0,y:0,width:s.width,height:s.height},...u?{turn:u}:{}};return await e.cache.prefetch(Te(n,0,c).map(h=>{const p=n.tile(h);return{url:p.url,fallbackUrl:p.fallbackUrl}})),d}const Fc="media:";function Fp(t,e){var a,c;const n=t.width||((a=t.placement)==null?void 0:a.width)||e.element.videoWidth||1600,o=t.height||((c=t.placement)==null?void 0:c.height)||e.element.videoHeight||900,r=`${Fc}${t.id}`,s={width:n,height:o},i={x:0,y:0,width:n,height:o};return{id:t.id,spec:t,pyramid:$c(r,n,o),media:{kind:"media",source:e.element,width:n,height:o,naturalWidth:n,naturalHeight:o},size:s,clip:i,contentClip:i,rect:{...i}}}function Dp(t,{degrees:e,mirror:n}){const o=e*Math.PI/180,r=u=>Math.abs(u)<1e-12?0:u,s=r(Math.cos(o)),i=r(Math.sin(o)),a=Math.abs(t.width*s)+Math.abs(t.height*i),c=Math.abs(t.width*i)+Math.abs(t.height*s),l=le(oe(a/2,c/2),{a:s,b:i,c:-i,d:s,e:0,f:0},ce(n?-1:1,1),oe(-(t.x+t.width/2),-(t.y+t.height/2)));return{orient:l,unorient:ph(l),width:a,height:c}}function Dc(t){var e;return((e=t.turn)==null?void 0:e.orient)??oe(-t.clip.x,-t.clip.y)}function zp(t,e){const{turn:n,clip:o}=t;if(!n)return{...e,x:o.x+e.x,y:o.y+e.y};const r=Mo(n.unorient,e),s=Math.max(r.x,o.x),i=Math.max(r.y,o.y);return{x:s,y:i,width:Math.max(0,Math.min(r.x+r.width,o.x+o.width)-s),height:Math.max(0,Math.min(r.y+r.height,o.y+o.height)-i)}}function Hp(t,e){const{turn:n,clip:o}=t;return n?ve(n.unorient,e):{x:o.x+e.x,y:o.y+e.y}}function ea(t){const{turn:e,clip:n,contentClip:o}=t;return e?{width:e.width*o.width/n.width,height:e.height*o.height/n.height}:o}function Wp(t){if(!t.length)return null;if(t.every(o=>o.spec.placement)){for(const o of t)o.rect={...o.spec.placement};return ds(t.map(o=>o.rect))}const e=ea(t[0]).height;let n=0;for(const o of t){const r=ea(o),s=r.width*e/r.height;o.rect={x:n,y:0,width:s,height:e},n+=s}return{x:0,y:0,width:n,height:e}}function To(t){const e=t.turn??t.clip;return{x:t.rect.width/e.width,y:t.rect.height/e.height}}function Up(t){const e=To(t);return le(oe(t.rect.x,t.rect.y),ce(e.x,e.y),Dc(t))}function jp(t,e){var n,o;return t.service===e.service&&t.url===e.url&&t.width===e.width&&t.height===e.height&&t.region===e.region&&t.rotation===e.rotation&&((n=t.media)==null?void 0:n.element)===((o=e.media)==null?void 0:o.element)&&JSON.stringify(t.placement)===JSON.stringify(e.placement)}const Vp=1e7,qp=15e6,Kp=2e7,Zp=2;function Gp(t){const{items:e,camera:n,viewport:o,pixelRatio:r,getTile:s,destination:i}=t,a=Oc(n,o),c=[],l=[],u=[],d=(h,p,m)=>{const g=h.tile(p);l.push({url:g.url,fallbackUrl:g.fallbackUrl,priority:m})};for(const h of e){const{pyramid:p,clip:m,rect:g}=h,y=To(h);if(t.wantOverview)for(const M of Te(p,0,m))d(p,M,Kp);const v=na(h,n,o,r),w=i?na(h,i,o,r):v;if(u.push((v==null?void 0:v.target)??-1),!v&&!w)continue;const b=M=>E=>{const A=p.tile(E).region;return Math.hypot(A.x+A.width/2-M.x,A.y+A.height/2-M.y)};if(w){const M=b(w.center);for(const E of Te(p,0,w.area))d(p,E,M(E)/1e3);if(w.target>0)for(const E of Te(p,w.target,w.area))d(p,E,Vp+M(E))}if(!v)continue;const{area:x,target:S}=v,T=b(v.center),B=Te(p,0,x),N=S===0?[]:Te(p,S,x);if(w!==v){for(const E of B)d(p,E,T(E)/1e3);const M=S-Zp;if(M>0)for(const E of Te(p,M,x))d(p,E,qp+T(E))}if(h.spec.hidden)continue;const Z=(S===0?B:N).every(M=>s(p.tile(M).url)!==void 0)?[S]:Array.from({length:S+1},(M,E)=>E),Q=le(a,oe(g.x,g.y),ce(y.x,y.y),Dc(h));for(const M of Z){const E=M===0?B:M===S?N:Te(p,M,x),A=p.levels[M].cols*p.levels[M].rows>1;for(const W of E){const V=p.tile(W),G=s(V.url);if(!G)continue;const ct=Xp(h,V.region,G,Q,A);ct&&c.push({...ct,url:V.url})}}}return l.sort((h,p)=>h.priority-p.priority),{draws:c,wants:Yp(l),levels:u}}function na(t,e,n,o){const{pyramid:r,rect:s}=t,i=Lr(e,n);if(!vh(i,s))return null;const a=To(t),c=Math.max(i.x,s.x),l=Math.max(i.y,s.y),u=Math.min(i.x+i.width,s.x+s.width),d=Math.min(i.y+i.height,s.y+s.height),h=1/(a.x*e.zoom*o);return{area:zp(t,{x:(c-s.x)/a.x,y:(l-s.y)/a.y,width:(u-c)/a.x,height:(d-l)/a.y}),center:Hp(t,{x:(e.x-s.x)/a.x,y:(e.y-s.y)/a.y}),target:Bp(r,h)}}function Xp(t,e,n,o,r){const{clip:s}=t,i=Math.max(e.x,s.x),a=Math.max(e.y,s.y),c=Math.min(e.x+e.width,s.x+s.width),l=Math.min(e.y+e.height,s.y+s.height);if(c<=i||l<=a)return null;const u=n.width/e.width,d=n.height/e.height,h=1e-6;return{item:t,image:n,transform:le(o,oe(e.x,e.y),ce(1/u,1/d)),crop:{x:(i-e.x)*u,y:(a-e.y)*d,width:(c-i)*u,height:(l-a)*d},bleed:{right:r&&c<s.x+s.width-h,bottom:r&&l<s.y+s.height-h}}}function Yp(t){const e=new Set;return t.filter(n=>e.has(n.url)?false:(e.add(n.url),true))}const Jp={maxZoomPixelRatio:1.1,minZoomImageRatio:.9,animationTime:.09,animationDuration:void 0,springStiffness:6.5,constrainDuringPan:true,request:void 0,byteBudget:192*1024*1024,maxInFlight:6,releaseAfterMs:2e3},Qp=2,tm=3,em=.1,ur=1e-6,Nr={top:0,right:0,bottom:0,left:0};function oa(t,e="padding"){if(!t||typeof getComputedStyle!="function")return Nr;const n=getComputedStyle(t),o=r=>parseFloat(n.getPropertyValue(`${e}-${r}`))||0;return{top:o("top"),right:o("right"),bottom:o("bottom"),left:o("left")}}const nm=(t,e)=>t.top===e.top&&t.right===e.right&&t.bottom===e.bottom&&t.left===e.left;let om;class rm{constructor(e,n={}){P(this,"host");P(this,"overlays",null);P(this,"options");P(this,"backend",null);P(this,"backendPreference");P(this,"contextLosses",0);P(this,"holder",{hiddenSince:null,release:()=>this.giveBack()});P(this,"visible",true);P(this,"dom",null);P(this,"domAsked",false);P(this,"pending",null);P(this,"camera");P(this,"loop");P(this,"gestures");P(this,"gestureOptions",{});P(this,"cache");P(this,"navigator",null);P(this,"navigatorAsked",0);P(this,"viewport",{width:1,height:1});P(this,"inset",Nr);P(this,"pixelRatio",1);P(this,"items",[]);P(this,"worldBounds",null);P(this,"contentVersion",0);P(this,"opaqueUrls",new Set);P(this,"mediaByKey",new Map);P(this,"detachMedia",[]);P(this,"opened",false);P(this,"atHome",true);P(this,"interacting",false);P(this,"lastEmitted",null);P(this,"generation",0);P(this,"listeners",new Map);P(this,"unloadable",false);P(this,"resizeObserver",null);P(this,"intersectionObserver",null);P(this,"releaseTimer",null);P(this,"dprQuery",null);P(this,"disposed",false);P(this,"dismisser",null);P(this,"tick",e2=>{var c,l;if(this.disposed)return false;const n2=this.camera.step(e2,this.viewport),o2=this.camera.current,r2=this.backend,s=Ip(this.getTile,u=>r2?r2.has(u):true),i=Gp({items:this.items,camera:o2,viewport:this.viewport,pixelRatio:this.pixelRatio,getTile:s.getTile,wantOverview:!!this.navigator,destination:n2?this.camera.destination:void 0}),a=i.wants.filter(u=>!u.url.startsWith(Fc));return this.cache.update(a),i.draws.length?this.setUnloadable(false):a.length&&a.every(u=>this.cache.failed(u.url))&&this.setUnloadable(true),this.paint(i.draws),(c=this.overlays)==null||c.position(o2,this.viewport),(l=this.navigator)==null||l.render(this.items.filter(u=>!u.spec.hidden),this.worldBounds,Lr(o2,this.viewport),this.pixelRatio,this.getTile,this.contentVersion),(!this.lastEmitted||!qi(this.lastEmitted,o2))&&(this.lastEmitted={...o2},this.opened&&this.emit("viewport")),n2||s.deferred});P(this,"getTile",e2=>this.mediaByKey.get(e2)??this.cache.get(e2));P(this,"onContextLost",()=>{this.contextLosses+=1,this.releaseBackend(),this.visible?this.acquireBackend(false):this.host.dataset.backend="released"});P(this,"onPixelRatioChange",()=>{this.measure(),this.watchPixelRatio()});this.host=e,this.backendPreference=n.backend??"auto",this.options={...Jp,...dr(n)},sa()&&(this.options.animationTime=0,this.options.animationDuration!==void 0&&(this.options.animationDuration=0));const{animationDuration:o,springStiffness:r}=this.options;this.camera=new cp({x:0,y:0,zoom:1,rotation:0},this.options.animationTime,o===void 0?void 0:{duration:o,stiffness:r}),this.loop=new Mp(this.tick),this.gestureOptions=dr(n.gestures??{}),sa()&&(this.gestureOptions.flickMomentum=0),this.gestures=new mp(e,this,{...Ar,...this.gestureOptions}),this.cache=new kp({load:(s,i)=>this.loadTile(s,i),onSettled:()=>{this.contentVersion++,this.invalidate()},onEvict:s=>{var i;return(i=this.backend)==null?void 0:i.release(s)},byteBudget:this.options.byteBudget,maxInFlight:this.options.maxInFlight}),this.visible=sm(e),this.visible?this.acquireBackend():this.holder.hiddenSince=ra(),this.measure(),this.observe()}get backendKind(){var e;return((e=this.backend)==null?void 0:e.kind)??"none"}get isOpen(){return this.opened}get isAtHome(){return this.atHome}on(e,n){let o=this.listeners.get(e);return o||(o=new Set,this.listeners.set(e,o)),o.add(n),()=>o==null?void 0:o.delete(n)}async setImages(e,{world:n,fit:o=false}={}){const r=++this.generation,s=new Map(this.items.map(u=>[u.id,u])),i=await Promise.allSettled(e.map(u=>{const d=s.get(u.id);return d&&jp(d.spec,u)?(d.spec=u,Promise.resolve(d)):$p(u,{cache:this.cache,loadStatic:h=>this.loadTile(h),infoOptions:{request:this.options.request}})}));if(r!==this.generation||this.disposed)return;const a=i.filter(u=>u.status==="fulfilled").map(u=>u.value),c=i.filter(u=>u.status==="rejected").map(u=>u.reason);this.items=a,this.watchMedia(a);const l=Wp(a);if(this.worldBounds=n?l?ds([n,l]):n:l,this.contentVersion++,c.length&&this.emit("error",c),this.setUnloadable(e.length>0&&!a.length&&c.length>0),!this.worldBounds){this.invalidate();return}this.opened?o?(this.home(true),this.emit("change")):(this.camera.set(this.constrain(this.camera.current)),this.emit("change")):(this.opened=true,this.home(true),this.emit("open")),this.invalidate()}clear(){this.setUnloadable(false),this.generation++,this.items=[],this.watchMedia([]),this.worldBounds=null,this.contentVersion++,this.invalidate()}setHidden(e){const n=new Set(e);let o=false;for(const r of this.items){const s=n.has(r.id);!!r.spec.hidden!==s&&(r.spec={...r.spec,hidden:s},o=true)}o&&this.invalidate()}isReady(e){const n=this.items.find(r=>r.id===e);if(!n)return false;if(n.spec.media)return true;const o=n.pyramid.levels[0];if(!o)return false;for(let r=0;r<o.rows;r++)for(let s=0;s<o.cols;s++)if(!this.getTile(n.pyramid.tile({level:0,col:s,row:r}).url))return false;return true}fitBounds(e,n=false,o=Nr){const r=this.fit(e,this.camera.destination.rotation,o);this.atHome=false,this.animateTo(this.constrain(r,{allowBeyondLimits:true}),n)}fit(e,n,{top:o,right:r,bottom:s,left:i}){const{width:a,height:c}=this.viewport,{zoom:l}=rp(e,{width:Math.max(1,a-i-r),height:Math.max(1,c-o-s)},n);return{...mo(Mc(e),{x:(a+i-r)/2,y:(c+o-s)/2},l,n,this.viewport),zoom:l,rotation:n}}fitItemRect(e,n,o=false){const r=this.itemRectToWorld(e,n);r&&this.fitAnnotation(r,o)}fitAnnotation(e,n=false){var s;const o=this.items[0];if(!o)return;const r=o.rect.width*em;this.fitBounds({x:e.x-r,y:e.y-r,width:e.width+r*2,height:e.height+r*2},n,oa((s=this.overlays)==null?void 0:s.container,"scroll-padding"))}getBounds(){return Lr(this.camera.current,this.viewport)}getHomeBounds(){return this.worldBounds?{...this.worldBounds}:null}getCamera(){return{...this.camera.current}}getZoomLimits(){var o;const e=((o=this.homeCamera())==null?void 0:o.zoom)??1,n=this.items.length?Math.min(...this.items.map(r=>To(r).x)):1;return{home:e,min:e*this.options.minZoomImageRatio,max:Math.max(e,this.options.maxZoomPixelRatio/n)}}home(e=false){const n=this.homeCamera();if(!n)return;const o=this.atHome;this.atHome=true,this.animateTo(n,e),!o&&this.opened&&this.emit("viewport")}atMaxZoom(){return this.camera.destination.zoom>=this.getZoomLimits().max*(1-ur)}viewLimits(){const{zoom:e,x:n,y:o,rotation:r}=this.camera.destination,{min:s,max:i}=this.getZoomLimits(),a=this.atHome?this.homeCamera():null;return{atMax:e>=i*(1-ur),atMin:e<=s*(1+ur),atHome:this.atHome&&(!a||Math.abs(e/a.zoom-1)<.001&&Math.hypot(n-a.x,o-a.y)*e<.5&&Math.abs(r-a.rotation)<.001)}}zoomBy(e,n,o=true){const r=o?this.camera.destination:this.camera.current,s=n??{x:this.viewport.width/2,y:this.viewport.height/2},i=Vi(r,this.viewport,s),{min:a,max:c}=this.getZoomLimits(),l=yn(r.zoom*e,a,c),u=mo(i,s,l,r.rotation,this.viewport),d=this.constrain({...r,...u,zoom:l});this.atHome=false,o?this.camera.animateTo({state:d,anchor:{world:i,screen:s}},this.viewport):this.camera.set(d),this.invalidate()}panBy(e,n,o=false){const r=o?this.camera.destination:this.camera.current,s=ve(le(ce(1/r.zoom),Nn(-r.rotation)),{x:e,y:n}),i=this.constrain({...r,x:r.x-s.x,y:r.y-s.y});this.atHome=false,o?this.camera.animateTo({state:i},this.viewport):this.camera.set(i),this.invalidate()}panTo(e,n=false){const o=n?this.camera.current:this.camera.destination;this.atHome=false,this.animateTo(this.constrain({...o,...e}),n)}rotateBy(e){const n=this.camera.destination;this.setRotation(n.rotation*180/Math.PI+e)}setRotation(e,n=false){const o=this.camera.destination,r=e*Math.PI/180;this.animateTo(this.constrain({...o,rotation:r}),n)}getRotation(){return this.camera.destination.rotation*180/Math.PI}tap(e){this.emit("tap",e)}setDismiss(e){this.dismisser=e}dismiss(){var e;return((e=this.dismisser)==null?void 0:e.call(this))??false}setGestures(e){this.gestures.setOptions({...Ar,...this.gestureOptions,...dr(e)})}setInteracting(e){if(this.interacting=e,e){this.camera.stop();return}if(this.options.constrainDuringPan)return;const n=this.camera.destination,o=this.constrain(n);qi(n,o)||this.animateTo(o,false)}worldToScreenPoint(e){return op(this.camera.current,this.viewport,e)}screenToWorldPoint(e){return Vi(this.camera.current,this.viewport,e)}itemRectToWorld(e,n){const o=this.items[e];if(!o)return null;const{contentClip:r,clip:s}=o;if(o.turn)return Mo(le(Up(o),ce(s.width/r.width,s.height/r.height)),n);const i=o.rect.width/r.width,a=o.rect.height/r.height;return{x:o.rect.x+(n.x-r.x)*i,y:o.rect.y+(n.y-r.y)*a,width:n.width*i,height:n.height*a}}attachNavigator(e){var s;(s=this.navigator)==null||s.dispose(),this.navigator=null;const n=++this.navigatorAsked;let o=null,r=false;return import("./Navigator-B4RQiJXK.mjs").then(i=>{r||this.disposed||n!==this.navigatorAsked||(o=new i.Navigator(e,(a,c)=>this.panTo(a,c)),this.navigator=o,this.invalidate())}),()=>{r=true,o==null||o.dispose(),o&&this.navigator===o&&(this.navigator=null)}}invalidate(){this.loop.invalidate()}dispose(){var e,n,o,r,s,i,a;this.disposed||(this.disposed=true,this.generation++,this.loop.dispose(),this.gestures.dispose(),(e=this.resizeObserver)==null||e.disconnect(),(n=this.intersectionObserver)==null||n.disconnect(),(r=(o=this.dprQuery)==null?void 0:o.removeEventListener)==null||r.call(o,"change",this.onPixelRatioChange),this.releaseTimer&&clearTimeout(this.releaseTimer),(s=this.navigator)==null||s.dispose(),this.navigator=null,this.releaseBackend(),this.cache.dispose(),(i=this.dom)==null||i.dispose(),(a=this.overlays)==null||a.dispose(),this.items=[],this.detachMedia.forEach(c=>c()),this.mediaByKey.clear(),this.listeners.clear(),delete this.host.dataset.backend)}watchMedia(e){this.detachMedia.forEach(n=>n()),this.detachMedia=[],this.mediaByKey.clear();for(const n of e){if(!n.media||n.media.kind!=="media")continue;const o=n.pyramid.tile({level:0,col:0,row:0}).url;this.mediaByKey.set(o,n.media);const r=n.media.source,s=()=>this.invalidate(),i=["play","seeked","loadeddata","resize"];i.forEach(a=>r.addEventListener(a,s)),this.detachMedia.push(()=>i.forEach(a=>r.removeEventListener(a,s)))}}paint(e){const n=this.backend,o=[],r=(n==null?void 0:n.kind)==="webgl2";n==null||n.begin();for(const s of e){const{image:i}=s;if(!(i.kind==="media"||i.kind==="element"&&r&&(i.opaque||this.opaqueUrls.has(s.url)))&&n){if(n.draw({key:s.url,source:i.source,width:i.width,height:i.height,transform:s.transform,crop:s.crop,opacity:1,bleed:s.bleed})!=="tainted"||i.kind==="bitmap")continue;this.opaqueUrls.add(s.url)}(i.kind==="element"||i.kind==="media")&&o.push({key:`${s.item.id}|${s.url}`,element:i.source,width:i.width,height:i.height,transform:s.transform,crop:s.crop,opacity:1})}n==null||n.end(),this.dom?this.dom.sync(o):o.length&&!this.domAsked&&(this.domAsked=true,import("./DomLayers-D5F-HKU-.mjs").then(({DomLayers:s})=>{if(this.disposed)return;const i=new s(this.host);this.overlays&&this.host.insertBefore(i.container,this.overlays.container),this.dom=i,this.invalidate()}))}loadTile(e,n){return vp(e,{signal:n,request:this.options.request,maxTextureSize:this.backend instanceof po?this.backend.maxTextureSize:void 0})}animateTo(e,n){this.camera.animateTo({state:e},this.viewport,n),this.invalidate()}homeCamera(){if(!this.worldBounds)return null;const e=2*Math.PI,n=Math.round(this.camera.destination.rotation/e)*e||0;return this.fit(this.worldBounds,n,this.inset)}constrain(e,{allowBeyondLimits:n=false}={}){const o=this.worldBounds;if(!o)return e;const{min:r,max:s}=this.getZoomLimits(),i=n?yn(e.zoom,r,Math.max(s,e.zoom)):yn(e.zoom,r,s);return this.interacting&&!this.options.constrainDuringPan?{...e,zoom:i}:{...e,zoom:i,x:yn(e.x,o.x,o.x+o.width),y:yn(e.y,o.y,o.y+o.height)}}acquireBackend(e=true){var s,i;if(this.backend||this.pending||this.disposed)return;const n=document.createElement("canvas");n.className="clover-canvas-surface",n.setAttribute("aria-hidden","true"),Object.assign(n.style,{position:"absolute",inset:"0",width:"100%",height:"100%",display:"block",pointerEvents:"none"}),this.host.insertBefore(n,((s=this.dom)==null?void 0:s.container)??((i=this.overlays)==null?void 0:i.container)??null);const o=e&&(this.backendPreference==="webgl2"||this.backendPreference==="auto"&&this.contextLosses<tm);let r=null;o&&(Xh(this.holder)||this.backendPreference==="webgl2")&&(r=po.create(n,{onLost:this.onContextLost}),r||Ui(this.holder)),r?this.install(r):this.backendPreference==="webgl2"?this.none(n):(this.pending=n,(om??(om=import("./Canvas2DBackend-M6vNWI1j.mjs"))).then(({Canvas2DBackend:a})=>{if(this.pending!==n)return;this.pending=null;const c=a.create(n);c?this.install(c):this.none(n)}))}none(e){e.remove(),this.host.dataset.backend="none"}install(e){this.backend=e,this.host.dataset.backend=e.kind,e.resize(this.viewport.width,this.viewport.height,this.pixelRatio),e.kind==="canvas2d"&&this.opaqueUrls.clear(),this.emit("backend",e.kind),this.invalidate()}releaseBackend(){var n;if(Ui(this.holder),(n=this.pending)==null||n.remove(),this.pending=null,!this.backend)return;const e=this.backend.canvas;this.backend.dispose(),e.remove(),this.backend=null}giveBack(){this.releaseTimer&&clearTimeout(this.releaseTimer),this.releaseTimer=null,this.releaseBackend(),this.host.dataset.backend="released"}observe(){typeof ResizeObserver<"u"&&(this.resizeObserver=new ResizeObserver(()=>this.measure(true)),this.resizeObserver.observe(this.host)),typeof IntersectionObserver<"u"&&(this.intersectionObserver=new IntersectionObserver(e=>{const n=e.some(o=>o.isIntersecting);this.setVisible(n)}),this.intersectionObserver.observe(this.host)),this.watchPixelRatio()}setVisible(e){var n;if(this.visible=e,e){this.holder.hiddenSince=null,this.releaseTimer&&clearTimeout(this.releaseTimer),this.releaseTimer=null,this.backend||this.acquireBackend();return}(n=this.holder).hiddenSince??(n.hiddenSince=ra()),!(!this.backend||this.releaseTimer)&&(this.releaseTimer=setTimeout(()=>this.giveBack(),this.options.releaseAfterMs))}measure(e=false){var c;const n=this.host.getBoundingClientRect(),o=Math.max(1,n.width),r=Math.max(1,n.height),s=oa(this.host),i=Math.min(typeof window<"u"&&window.devicePixelRatio||1,Qp);if(o===this.viewport.width&&r===this.viewport.height&&i===this.pixelRatio&&nm(s,this.inset))return;const a=this.viewport;if(this.viewport={width:o,height:r},this.inset=s,this.pixelRatio=i,(c=this.backend)==null||c.resize(o,r,i),this.opened){if(this.atHome)this.home(true);else{const l=this.camera.current,u=o/Math.max(a.width,1);this.camera.set(this.constrain({...l,zoom:l.zoom*u}))}this.emit("viewport")}e?this.loop.drawNow():this.invalidate()}watchPixelRatio(){var e,n,o,r;typeof window>"u"||typeof window.matchMedia!="function"||((n=(e=this.dprQuery)==null?void 0:e.removeEventListener)==null||n.call(e,"change",this.onPixelRatioChange),this.dprQuery=window.matchMedia(`(resolution: ${window.devicePixelRatio||1}dppx)`),(r=(o=this.dprQuery).addEventListener)==null||r.call(o,"change",this.onPixelRatioChange))}setUnloadable(e){e!==this.unloadable&&(this.unloadable=e,this.emit("unloadable",e))}emit(e,n){var o;(o=this.listeners.get(e))==null||o.forEach(r=>r(n))}}const ra=()=>typeof performance<"u"?performance.now():Date.now();function sm(t){if(typeof IntersectionObserver>"u"||typeof window>"u")return true;const{top:e,left:n,width:o,height:r}=t.getBoundingClientRect();return e+r>=0&&n+o>=0&&e<=window.innerHeight&&n<=window.innerWidth}function sa(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function dr(t){return Object.fromEntries(Object.entries(t).filter(([,e])=>e!==void 0))}const im=(t,e)=>new rm(t,e),am=mt(()=>import("./Connected-o-wFtqr5.mjs")),cm=mt(()=>import("./Connected-CWTe22Y4.mjs").then(t=>t.C));function lm({className:t,style:e,renderers:n,collapseControls:o,onContentStateChange:r,children:s,...i}){var m;const a=de("Body");fc(a.clover,r);const c=fs(),l=vt(()=>Hd(c),[c]),u=Wd(n??a.renderers,{canvases:c,bodies:l}),d=u==null?void 0:u.component,h=((m=c.find(({type:g})=>g==="Scene"||g==="Timeline"))==null?void 0:m.type)??"Canvas",p=rt(g=>g.status==="loading");return f("div",{"aria-busy":p,className:Mt("clover-body",t),"data-renderer":d?"custom":h.toLowerCase(),style:{position:"relative",height:"var(--clover-body-height, 60vh)",...e},children:[d?f(d,{canvases:c,bodies:l,children:s}):h==="Scene"?f(wt,{fallback:f(Sn,{overlay:true}),children:f(cm,{...i,children:s})}):h==="Timeline"?f(wt,{fallback:f(Sn,{overlay:true}),children:f(am,{...i,children:s})}):f(Zh,{...i,collapseControls:o,surface:im,children:s}),p&&f(Sn,{overlay:true})]})}const um={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:"\xA0"};function Rn(t){return t.replace(/<br\s*\/?>/gi,`
24
+ `).replace(/<[^>]*>/g,"").replace(/&(#x[0-9a-f]+|#\d+|[a-z]+);/gi,(e,n)=>{if(n[0]==="#"){const o=n[1]==="x"||n[1]==="X"?parseInt(n.slice(2),16):parseInt(n.slice(1),10);return o>0&&o<=1114111?String.fromCodePoint(o):e}return um[n.toLowerCase()]??e})}const dm=t=>/<[a-z!/]|&(#x?[0-9a-f]+|[a-z]+);/i.test(t);function fm(t,e=""){const n=t==null?void 0:t.split(";")[0].trim().toLowerCase();if(n)return n==="text/html"?"html":n==="text/markdown"?"markdown":"plain";const o=e.trim();return o.startsWith("<")&&o.endsWith(">")?"html":"plain"}function hm(t){return t.replace(/\r\n?/g,`
25
+ `).replace(/^\[\^[^\]]+\]:[ \t]*/gm,"").replace(/\[\^[^\]]+\]/g,"").replace(/^#{1,6}[ \t]+(\S.*?)(?:[ \t]+#+)?[ \t]*$/gm,"$1").replace(/^[ \t]*(?:[-*+]|\d+[.)])[ \t]+/gm,"").replace(/\[([^\]]+)\]\((?:https?:\/\/|mailto:)[^\s)]+\)/g,"$1").replace(/\*\*([^*]+)\*\*|__([^_]+)__/g,(e,n,o)=>n??o).replace(/\*([^*\s][^*]*)\*|_([^_\s][^_]*)_/g,(e,n,o)=>n??o).replace(/\\\n/g,`
26
+ `).replace(/\n\s*\n/g,`
27
+ `).trim()}const Io=(t,e)=>e==="canvas"?We(t.manifest,t.canvasId):t.manifest,zc=ue(null),hs=()=>zt(zc),nn=re(function({of:e="manifest",label:n,as:o="span",className:r,...s},i){var h;const a=Ln(p=>{var m,g;return e==="canvas"?(m=We(p.manifest,p.canvasId))==null?void 0:m.label:(g=p.manifest)==null?void 0:g.label},void 0),c=hs(),l=(h=Pe())==null?void 0:h.language,{text:u,lang:d}=_t(n??(c?c.label:a),l);return u?f(o,{ref:i,className:Mt("clover-label",r),...lt(d),...s,children:Rn(u)}):null});function pm(t,e,n){const o=(u,d)=>Math.min(Math.max(Math.round(u),0),d),r=n?o(n.x*t.width,t.width-1):0,s=n?o(n.y*t.height,t.height-1):0,i={x:r,y:s,width:n?Math.max(1,o(n.width*t.width,t.width-r)):t.width,height:n?Math.max(1,o(n.height*t.height,t.height-s)):t.height},a=i.width===t.width&&i.height===t.height;if(!a&&!t.regionByPx)return null;if(t.sizeByW){let u=Math.min(1,e/Math.max(i.width,i.height));return t.maxWidth&&(u=Math.min(u,t.maxWidth/i.width)),t.maxHeight&&(u=Math.min(u,t.maxHeight/i.height)),t.maxArea&&(u=Math.min(u,Math.sqrt(t.maxArea/(i.width*i.height)))),uo(t,i,Math.max(1,Math.floor(i.width*u)),Math.max(1,Math.floor(i.height*u)))}if(!a)return null;const c=[...t.sizes].sort((u,d)=>u.width-d.width),l=c.find(u=>Math.max(u.width,u.height)>=e)??c.at(-1)??{width:t.width,height:t.height};return uo(t,i,l.width,l.height)}function on(t){var e;return(e=rs(t).find(({body:n})=>n.type==="Image"||n.id&&!n.type))==null?void 0:e.body}function mm(t,{width:e,height:n}){if(t==="full")return{x:0,y:0,width:1,height:1};const o=/^(pct:)?([\d.]+),([\d.]+),([\d.]+),([\d.]+)$/.exec(t);if(!o)return null;const[r,s,i,a]=o.slice(2).map(Number),[c,l]=o[1]?[100,100]:[e,n];return{x:r/c,y:s/l,width:i/c,height:a/l}}function ye(t,e="full",n=false){if(!t)return null;const o=Co(t.service);if(o){if(e!=="full")return{service:o,region:e,fallback:t.id};const{width:r,height:s}=t;return n&&t.id&&r>0&&s>0?{service:o,fallback:t.id,fallbackSize:{width:r,height:s}}:{service:o,fallback:t.id}}return t.id?{src:t.id}:null}function ps(t){const e=t;return e?ye(H(e.thumbnail)[0],"full",true)??ye(on(e))??ye(on(e.placeholderContainer))??ye(on(e.accompanyingContainer)):null}function gm(t){const e=t;return e?ye(on(e))??ye(on(e.placeholderContainer))??ye(on(e.accompanyingContainer))??ye(H(e.thumbnail)[0],"full",true):null}async function ms(t,e=200,n){if(t.src)return t.src;if(!t.service)return t.fallback;const o=t.fallbackSize;if(o&&t.fallback&&t.region===void 0){const r=Math.max(o.width,o.height);if(r>=e&&r<=e*2)return t.fallback}try{const r=await cs(t.service,{request:n}),s=typeof t.region=="string"?mm(t.region,r):t.region;return s===null?t.fallback:pm(r,e,s)??t.fallback}catch{return t.fallback}}const vm=Object.freeze(Object.defineProperty({__proto__:null,imageSource:ye,resolveThumbnail:ms,stillSource:gm,thumbnailSource:ps},Symbol.toStringTag,{value:"Module"})),ia='.clover-items-item[role="option"], .clover-items-link',tn=new Map;let Rt=null,Qt=null,Rr=0;function gs(t){const e=tn.get(t);if(!e)return;const n=t.clientHeight>0&&t.scrollHeight>t.clientHeight+1;n!==e.cut&&(e.cut=n,e.change(n))}function Br(){cancelAnimationFrame(Rr),Rr=requestAnimationFrame(()=>tn.forEach((t,e)=>gs(e)))}function Hc(t){var r,s;if(t.key!=="Escape")return;const e=new Set,n=(s=(r=document.activeElement)==null?void 0:r.closest)==null?void 0:s.call(r,ia);n&&e.add(n);try{document.querySelectorAll(`:is(${ia}):hover`).forEach(i=>e.add(i))}catch{}const o=[...e].filter(i=>i.dataset.fullHidden===void 0&&i.querySelector(".clover-items-label-full"));o.length&&(t.preventDefault(),t.stopPropagation(),o.forEach(i=>pc(i,"fullHidden",["pointerenter",i===n?"blur":"focus"])))}function ym(){var t,e;Rt=typeof ResizeObserver>"u"?null:new ResizeObserver(n=>n.forEach(o=>gs(o.target))),Qt=typeof MutationObserver>"u"?null:new MutationObserver(Br),Qt==null||Qt.observe(document.head,{childList:true,subtree:true,characterData:true}),Qt==null||Qt.observe(document.documentElement,{attributes:true,attributeFilter:["style","class"]}),(e=(t=document.fonts)==null?void 0:t.addEventListener)==null||e.call(t,"loadingdone",Br),document.addEventListener("keydown",Hc,true)}function bm(){var t,e,n;cancelAnimationFrame(Rr),(t=Rt==null?void 0:Rt.disconnect)==null||t.call(Rt),Qt==null||Qt.disconnect(),Rt=Qt=null,(n=(e=document.fonts)==null?void 0:e.removeEventListener)==null||n.call(e,"loadingdone",Br),document.removeEventListener("keydown",Hc,true)}function _m(t,e){var n;return tn.size||ym(),tn.set(t,{change:e}),(n=Rt==null?void 0:Rt.observe)==null||n.call(Rt,t),gs(t),()=>{var o;tn.delete(t),(o=Rt==null?void 0:Rt.unobserve)==null||o.call(Rt,t),tn.size||bm()}}const wm=/^(-?\d{4,})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?)?/;function Wc(t,e){if(typeof t!="string")return null;const n=wm.exec(t.trim());if(!n)return null;const[o,r,s,i=0,a=0,c=0]=n.slice(1,7).map(d=>d===void 0?void 0:Number(d)),l=new Date(Date.UTC(2e3,r-1,s,i,a,c));if(l.setUTCFullYear(o),l.getUTCMonth()!==r-1||l.getUTCDate()!==s)return null;const u=!i&&!a&&!c&&!Number(n[7]??0);return{at:l,precision:e??(u?s!==1?"day":r!==1?"month":"year":"time")}}const xm=mt(()=>import("./NavDate-DtMXkvCo.mjs").then(t=>t.a).then(({NavDate:t})=>({default:t})));function Sm(t,e,n,o){const r=t.source!==void 0?t.source:ps(t.resource),[s,i]=z(r==null?void 0:r.src),a=(r==null?void 0:r.src)??(r==null?void 0:r.service)??(r==null?void 0:r.fallback);return D(()=>{if(!r)return i(void 0);if(r.src)return i(r.src);if(!o)return;let c=true;return ms(r,e,n).then(l=>{c&&i(l)}),()=>{c=false}},[a,e,o]),{src:s,none:!r}}const km=()=>f("svg",{"aria-hidden":"true",focusable:"false",viewBox:"0 0 512 512",children:[f("path",{d:"M232 416a24 24 0 01-14.9-5.2L125.8 336H56a24 24 0 01-24-24V200a24 24 0 0124-24h69.8l91.3-74.8A24 24 0 01256 120v272a24 24 0 01-24 24z"}),f("path",{d:"M336 176a112 112 0 010 160M384 128a176 176 0 010 256",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"32"})]});function Cm({part:t,size:e,request:n,alt:o,altLang:r}){const[s,i]=z(null),a=Ec(s,Cc,s==null?void 0:s.closest('[data-layout="slider"] .clover-items-viewport')),{src:c,none:l}=Sm(t,e,n,a),[u,d]=z(false),{width:h,height:p}=t.resource??{},m=h&&p?h/p:1;return f("span",{ref:i,className:"clover-items-picture","data-loaded":u,"data-empty":c?void 0:true,style:c&&!(h&&p)?void 0:{"--clover-items-ratio":m},children:[!c&&l&&An(t.media)&&f(km,{}),c&&f("img",{src:c,alt:o,...lt(o?r:void 0),width:e,height:Math.round(e/m),loading:"lazy",decoding:"async",draggable:false,onLoad:()=>d(true),onError:()=>d(true)}),t.duration?f("span",{className:"clover-items-duration",children:Hf(t.duration)}):null]})}function Em({text:t,lang:e,first:n}){const o=R(null),[r,s]=z(false);return D(()=>{const i=o.current;if(!(!i||!t))return _m(i,s)},[t]),f("span",{className:"clover-items-label","data-clamped":r||void 0,children:[!n&&" ",f("span",{ref:o,className:"clover-items-label-text",...lt(t?e:void 0),children:t}),r&&f("span",{className:"clover-items-label-full",...lt(e),"aria-hidden":"true",hidden:true,children:t})]})}function Mm({item:t,size:e,language:n,request:o,showSummary:r=false,secondary:s="summary",labels:i=true}){var d,h;const a=t.parts.map(p=>_t(t.parts.length===1?t.label:p.label,n)),c=r&&s==="summary"?_t(t.summary,n):null,l=r&&s==="navDate"?Wc(t.navDate):null,u=a.some(p=>p.text);return f("figure",{role:"none",className:"clover-items-figure","data-parts":t.parts.length,"data-media":(h=(d=t.parts[0])==null?void 0:d.media)==null?void 0:h.toLowerCase(),style:{"--parts":t.parts.length},children:[f("span",{className:"clover-items-pictures",children:t.parts.map((p,m)=>{const g=a[m].text?{text:""}:_t(p.label,n);return f(Cm,{part:p,size:e,request:o,alt:g.text,altLang:g.lang},p.id)})}),(u||l||(c==null?void 0:c.text))&&f("figcaption",{className:"clover-items-caption",style:i?void 0:ze,children:[a.map((p,m)=>f(Em,{text:p.text,lang:p.lang,first:m===0},t.parts[m].id)),l&&f(wt,{fallback:null,children:f(xm,{value:t.navDate,className:"clover-items-date"})}),(c==null?void 0:c.text)&&f("span",{className:"clover-items-summary",...lt(c.lang),children:c.text.replace(/<[^>]*>/g,"")})]})]})}function Tm(t){var e;return(e=rs(t).find(({body:n})=>n.type))==null?void 0:e.body.type}function Uc(t){const e=Tm(t)??(t.type==="Timeline"?"Sound":void 0);return{id:t.id,type:t.type,label:t.label,resource:t,duration:Number(t.duration)||void 0,media:e}}const aa=new WeakMap;function jc(t){if(!t)return[];let e=aa.get(t);if(!e){const{canvases:n,views:o}=At(t);e=o.map(r=>{const s=r.map(i=>Uc(n[i]));return{id:s[0].id,parts:s,label:s.length===1?s[0].label:{none:[s.map(i=>_t(i.label).text).filter(Boolean).join(" \u2013 ")]}}}),aa.set(t,e)}return e}const ca=new WeakMap;function go(t){if(!t)return[];let e=ca.get(t);return e||(e=H(t.items).filter(n=>n==null?void 0:n.id).map(n=>{var o;return{id:n.id,parts:[Uc(n)],label:n.label,summary:n.summary,...typeof n.navDate=="string"?{navDate:n.navDate}:{},href:((o=H(n.homepage)[0])==null?void 0:o.id)??n.id,...En(H(n.homepage)[0])?{hrefLang:En(H(n.homepage)[0])}:{}}}),ca.set(t,e)),e}function oy(t){return t?Array.isArray(t)?go({items:t}):t.type==="Collection"?go(t):jc(t):[]}function Vc(t){const e=Math.max(1,Math.round(t));return e<=6?`h${e}`:null}const vs=(t,e="p")=>Vc(t)??e;function qc(t,e,n="p"){const o=Vc(t);return o?{as:o,title:{},group:{}}:{as:n,title:{id:e},group:{role:"group","aria-labelledby":e}}}function Im(t,e,{orientation:n="both",rtl:o=false,onActivate:r,onMove:s}={}){const[i,a]=z(Math.max(0,e)),c=R([]),l=R(r);l.current=r;const u=R(s);u.current=s,D(()=>{e>=0&&a(e)},[e]);const d=Math.min(i,Math.max(0,t-1)),h=ut(g=>{var y;a(g),(y=c.current[g])==null||y.focus()},[]),p=ut((g,y)=>{var T,B;const v=o?"ArrowLeft":"ArrowRight",w=o?"ArrowRight":"ArrowLeft",b=n!=="vertical",x=n!=="horizontal";let S=null;if(b&&g.key===v||x&&g.key==="ArrowDown")S=Math.min(t-1,y+1);else if(b&&g.key===w||x&&g.key==="ArrowUp")S=Math.max(0,y-1);else if(g.key==="Home")S=0;else if(g.key==="End")S=t-1;else if(g.key==="Enter"||g.key===" "){(T=l.current)==null||T.call(l,y,g),g.preventDefault();return}S!==null&&(g.preventDefault(),h(S),S!==y&&((B=u.current)==null||B.call(u,S,g)))},[t,n,o,h]);return{focused:d,itemProps:g=>({ref:y=>{c.current[g]=y},tabIndex:g===d?0:-1,onKeyDown:y=>p(y,g),onFocus:()=>a(g)})}}const Pm=5,Lm=()=>{var t;return typeof window<"u"&&!!((t=window.matchMedia)!=null&&t.call(window,"(prefers-reduced-motion: reduce)").matches)};function Kc({align:t="start",dragFree:e=false,itemCount:n=0}={}){const[o,r]=z(null),[s,i]=z(false),[a,c]=z(false),l=R(t);l.current=t;const u=e?"none":"x mandatory",d=ut(()=>{if(!o)return;const v=Math.abs(o.scrollLeft),w=o.scrollWidth-o.clientWidth;i(v>1),c(v<w-1)},[o]);D(()=>{if(!o)return;const v=o.style;v.overflowX="auto",v.overflowY="hidden",v.scrollSnapType=u,v.setProperty("--clover-track-align",t),v.overscrollBehaviorX="contain"},[o,u,t]),D(()=>{if(!o)return;let v=0;const w=()=>{cancelAnimationFrame(v),v=requestAnimationFrame(d)};d(),o.addEventListener("scroll",w,{passive:true});const b=typeof ResizeObserver<"u"?new ResizeObserver(w):null;return b==null||b.observe(o),o.firstElementChild&&(b==null||b.observe(o.firstElementChild)),()=>{cancelAnimationFrame(v),o.removeEventListener("scroll",w),b==null||b.disconnect()}},[o,d,n]);const h=ut((v,w=false)=>{if(!o||!v)return;const b=w||Lm()?"auto":"smooth";o.scrollBy({left:v,behavior:b})},[o]),p=ut((v,{instant:w=false}={})=>{const b=o==null?void 0:o.querySelector(`[data-track-index="${v}"]`);if(!o||!b)return false;const x=o.getBoundingClientRect(),S=b.getBoundingClientRect(),T=getComputedStyle(o).direction==="rtl";return h(l.current==="center"?S.left+S.width/2-(x.left+x.width/2):T?S.right-x.right:S.left-x.left,w),true},[o,h]),m=ut(v=>{if(!o)return;const w=getComputedStyle(o).direction==="rtl";h(v*o.clientWidth*.9*(w?-1:1))},[o,h]),g=ut(()=>m(1),[m]),y=ut(()=>m(-1),[m]);return D(()=>{if(!o)return;let v=null,w=false;const b=B=>{B.pointerType!=="mouse"||B.button!==0||(v={x:B.clientX,scroll:o.scrollLeft},w=false)},x=B=>{var J;if(!v)return;const N=B.clientX-v.x;!w&&Math.abs(N)<Pm||(w||(w=true,(J=o.setPointerCapture)==null||J.call(o,B.pointerId),o.style.scrollSnapType="none",o.dataset.dragging="true"),o.scrollLeft=v.scroll-N)},S=B=>{var N;v&&(v=null,w&&((N=o.releasePointerCapture)==null||N.call(o,B.pointerId),delete o.dataset.dragging,o.style.scrollSnapType=u))},T=B=>{w&&(w=false,B.preventDefault(),B.stopPropagation())};return o.addEventListener("pointerdown",b),o.addEventListener("pointermove",x),o.addEventListener("pointerup",S),o.addEventListener("pointercancel",S),o.addEventListener("click",T,true),()=>{o.removeEventListener("pointerdown",b),o.removeEventListener("pointermove",x),o.removeEventListener("pointerup",S),o.removeEventListener("pointercancel",S),o.removeEventListener("click",T,true)}},[o,u]),{ref:r,canScrollPrev:s,canScrollNext:a,scrollPrev:y,scrollNext:g,scrollToIndex:p,measure:d}}const vo=re(function(e,n){return!Pe()||e.iiifContent!==void 0||e.items!==void 0?f(wt,{fallback:null,children:f(Am,{...e,forwardedRef:n})}):f(Om,{...e,forwardedRef:n})}),Am=mt(()=>import("./StandaloneItems-B1Ul8G2q.mjs"));function Om({of:t="views",...e}){return t==="targets"?f(Rm,{...e}):t==="annotations"?f($m,{...e}):t==="members"?f(Zc,{...e}):f(Fm,{...e})}const Nm=mt(()=>import("./TargetItems-5JGXJ5e4.mjs"));function Rm(t){return rt(n=>{var o;return(((o=n.targets)==null?void 0:o.items.length)??0)>1})?f(wt,{fallback:null,children:f(Nm,{...t})}):null}const Bm=mt(()=>import("./AnnotationItems-DJxYDDLY.mjs"));function $m(t){return rt(n=>!!nc(n.manifest,n.addedSets))?f(wt,{fallback:null,children:f(Bm,{...t})}):null}function Zc({onSelect:t,forwardedRef:e,...n}){const{clover:o,language:r}=Pe(),s=rt(u=>u.collection),i=rt(u=>{var d;return((d=u.manifest)==null?void 0:d.id)??null}),a=go(s),c=Xr(s==null?void 0:s.viewingDirection);if(!a.length)return null;const l=(u,d)=>{t==null||t(u,d),o.goToManifest(u.id)};if(n.layout==="pager"){const u=a.findIndex(d=>d.id===i);return f(Xc,{...n,forwardedRef:e,steps:Gc(a,u,c,l),nameKey:"informationPanelTabsCollection",position:f(zm,{position:u,total:a.length,list:d=>f(Zc,{layout:"list",forwardedRef:null,onSelect:d})})})}return f(Yc,{...n,forwardedRef:e,items:a,selected:a.findIndex(u=>u.id===i),navigation:"id",rtl:c==="right-to-left",language:r,request:o.request,showSummary:true,onActivate:l})}function Fm({onSelect:t,forwardedRef:e,singleItem:n=false,...o}){const{clover:r,language:s}=Pe(),i=rt(d=>d.manifest),a=rt(d=>On(d.manifest,d.canvasId)),c=rt(d=>At(d.manifest).direction),l=jc(i);if(l.length<(n?1:2))return null;const u=d=>r.goTo(d.id);return o.layout==="pager"?f(Xc,{...o,forwardedRef:e,steps:Gc(l,a,c,u)}):f(Yc,{...o,forwardedRef:e,items:l,selected:a,navigation:"id",rtl:c==="right-to-left",language:s,request:r.request,onActivate:(d,h)=>{t==null||t(d,h),r.goTo(d.id)},followFocus:u})}function Gc(t,e,n,o){return{position:e,total:t.length,direction:n,step:(r,s)=>{const i=t[e+r];i&&o(i,s)}}}const Dm=mt(()=>import("./PagerLayout-CAk2XDZs.mjs")),zm=mt(()=>import("./PagerLayout-CAk2XDZs.mjs").then(({CountMenu:t})=>({default:t})));function Xc(t){return f(wt,{fallback:null,children:f(Dm,{...t})})}function Yc({forwardedRef:t,items:e,selected:n,navigation:o,rtl:r=false,layout:s="slider",thumbnailSize:i=200,request:a,language:c,showSummary:l=false,secondary:u="summary",labels:d=true,heading:h,headingLevel:p=2,renderItem:m,onActivate:g,followFocus:y,as:v="section",className:w,"aria-label":b,size:x,singleItem:S,highContrast:T,...B}){var Vt;const{t:N}=Pt(),J=fe(),et=wo(t,B.lang),{langOf:Z}=et,Q=qr(T),M=s==="slider",E=o==="id",A=R(null),W=s==="masonry";D(()=>{const q=A.current;if(!W||!q)return;let j,dt=true;return import("../masonry-BZCdA3bV.mjs").then(({attachMasonry:Ct})=>{dt&&(j=Ct(q))}),()=>{dt=false,j==null||j()}},[W]);const V=Kc({align:E?"center":"start",itemCount:e.length}),G=R(void 0);D(()=>()=>window.clearTimeout(G.current),[]);const ct=Im(e.length,n,{orientation:s==="slider"?"horizontal":s==="list"?"vertical":"both",rtl:r,onActivate:(q,j)=>g(e[q],j),onMove:y?(q,j)=>{window.clearTimeout(G.current);const dt=()=>y(e[q]);j.repeat?G.current=window.setTimeout(dt,150):dt()}:void 0}),yt=R(null),ot=R(false);ot.current=!!((Vt=yt.current)!=null&&Vt.contains(yt.current.ownerDocument.activeElement)),D(()=>{var Ct;const q=yt.current;if(!q||!ot.current)return;const{activeElement:j,body:dt}=q.ownerDocument;j&&j!==dt||(Ct=q.querySelector(`[data-track-index="${Math.max(0,n)}"]`))==null||Ct.focus()},[e]);const at=R(false);D(()=>{var dt;if(n<0)return;const q=!at.current;if(M){V.scrollToIndex(n,{instant:q})&&(at.current=true);return}at.current=true;const j=(dt=yt.current)==null?void 0:dt.querySelector(`[data-track-index="${n}"]`);j&&Hm(j,q)},[M,n,V.scrollToIndex]);const _=vs(p),k=h?_t(h.label,c):null,I=h?_t(h.summary,c):null,F=b===void 0&&!!(k!=null&&k.text),O=Eo(N("itemsLabel"),Z("itemsLabel"),b!==void 0||F,et.hostLanguage),L=F?{"aria-labelledby":`${J}-title`}:b!==void 0?{"aria-label":b}:O.props,U=(q,j)=>m?m(q,{selected:j}):f(Mm,{item:q,size:i,language:c,request:a,showSummary:l,secondary:u,labels:d}),X=q=>!(m||_t(q.label,c).text||l&&u==="summary"&&_t(q.summary,c).text),bt=(q,j)=>X(q)?N("canvasPosition",{index:j+1,total:e.length}):void 0,tt=q=>X(q)?Z("canvasPosition"):void 0,pt=M?{display:"flex",margin:0,padding:0,listStyle:"none"}:void 0,ft=M?{flex:"0 0 auto",scrollSnapAlign:E?"center":"start"}:void 0,Bt=E&&n>=0,Nt=q=>{const j=n+(q==="prev"?-1:1),dt=Bt?j>=0&&j<e.length:q==="prev"?V.canScrollPrev:V.canScrollNext,Ct=Bt?q==="prev"?"commonPrevious":"commonNext":q==="prev"?"itemsScrollBack":"itemsScrollForward",Xt=N(Ct),we=$=>{if(!dt)return;if(!Bt)return(q==="prev"?V.scrollPrev:V.scrollNext)();const st=e[j];y?y(st):g(st,$)};return f("button",{type:"button",className:`clover-items-scroll-${q}`,"aria-controls":Bt?void 0:`${J}-viewport`,...lt(Z(Ct)),"aria-disabled":!dt||void 0,tabIndex:dt?void 0:-1,onClick:we,children:[f("svg",{"aria-hidden":"true",focusable:"false",width:"16",height:"16",viewBox:"0 0 16 16",children:f("path",{d:q==="next"!==r?"M6 3l5 5-5 5":"M10 3L5 8l5 5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),f("span",{style:ze,children:Xt}),f(Ue,{label:Xt})]})};return f(Pn.Provider,{value:et.hostLanguage,children:f(v,{ref:et.ref,className:Mt("clover-items",w),"data-layout":s,"data-navigation":o,...Kr(Q),...B,children:[h&&((k==null?void 0:k.text)||(I==null?void 0:I.text))&&f("header",{className:"clover-items-header",children:[(k==null?void 0:k.text)&&f(_,{className:"clover-items-title clover-title",id:`${J}-title`,...lt(k.lang),children:k.text}),(I==null?void 0:I.text)&&f("p",{className:"clover-items-description",...lt(I.lang),children:I.text.replace(/<[^>]*>/g,"")}),h.homepage&&f("a",{className:"clover-items-homepage",href:h.homepage,hrefLang:h.homepageLang,...lt(Z("commonViewAll")),children:N("commonViewAll")})]}),f("div",{className:"clover-items-frame",style:{position:"relative"},dir:r?"rtl":void 0,children:[M&&Nt("prev"),f("div",{id:`${J}-viewport`,className:"clover-items-viewport",ref:M?V.ref:A,children:E?f("div",{ref:yt,role:"listbox",...L,"aria-orientation":M?"horizontal":"vertical",className:"clover-items-track",style:pt,children:e.map((q,j)=>{const dt=j===n;return f("div",{id:`${J}-${j}`,role:"option","aria-selected":dt,"aria-label":bt(q,j),...lt(tt(q)),className:"clover-items-item","data-track-index":j,style:ft,...ct.itemProps(j),onClick:Ct=>g(q,Ct),children:U(q,dt)},q.id)})}):f("ul",{...L,className:"clover-items-track",style:pt,children:e.map((q,j)=>f("li",{className:"clover-items-item","data-track-index":j,style:ft,children:f("a",{className:"clover-items-link",href:q.href,hrefLang:q.hrefLang,"aria-label":bt(q,j),...lt(tt(q)),draggable:false,onClick:dt=>g(q,dt),children:U(q,false)})},q.id))})}),M&&Nt("next")]}),O.node]})})}function Hm(t,e){var i;let n=t.parentElement;for(;n&&n!==document.body;){const{overflowY:a}=getComputedStyle(n);if(/(auto|scroll)/.test(a)&&n.scrollHeight>n.clientHeight)break;n=n.parentElement}if(!n||n===document.body)return;const o=n.getBoundingClientRect(),r=t.getBoundingClientRect(),s=r.top<o.top?r.top-o.top:r.bottom>o.bottom?r.bottom-o.bottom:0;s&&((i=n.scrollBy)==null||i.call(n,{top:s,behavior:e?"auto":"smooth"}))}function Wm(t,e){const{clover:n}=de(e),o=qh(),{direction:r}=Ac(),s=rt(l=>l.collection),i=rt(l=>{var u;return((u=l.manifest)==null?void 0:u.id)??null}),a=rt(l=>{var u;return((u=l.targets)==null?void 0:u.items.length)??0}),c=rt(l=>nd(l.targets,l.targetIndex,l.manifest,l.canvasId));if(t==="targets")return{position:c,total:a,direction:"left-to-right",step:l=>{const u=c+l;u>=0&&u<a&&n.goToTarget(u)}};if(t==="members"){const l=go(s),u=l.findIndex(d=>d.id===i);return{position:u,total:l.length,direction:"left-to-right",step:d=>{const h=l[u+d];h&&n.goToManifest(h.id)}}}return{position:o.position,total:o.total,direction:r,step:l=>l<0?o.previous():o.next()}}const Um=re(function({steps:e,as:n="span",className:o,...r},s){const{t:i,langOf:a}=Pt(),{position:c,total:l}=e;if(l<2||c<0)return null;const u=c+1;return f(n,{ref:s,className:Mt("clover-pager-position",o),...r,children:[f("span",{"aria-hidden":"true",children:[u," / ",l]}),f("span",{className:"clover-pager-room","aria-hidden":"true",hidden:true,children:[l," / ",l]}),f("span",{style:ze,...lt(a("canvasPosition")),children:i("canvasPosition",{index:u,total:l})})]})}),jm=re(function({of:e="views",...n},o){const r=Wm(e,"Position");return f(Um,{ref:o,...n,steps:r})});function Vm({className:t,loading:e,error:n}){const{t:o,langOf:r}=Pt(),{status:s,error:i}=Uh(),a=s==="loading",c=e!==void 0&&e!==false;return f(kt,{children:[f("p",{className:Mt("clover-status",t),"data-status":a?s:void 0,role:"status",style:a&&e!==false?void 0:ze,children:[a&&(c?e:e===void 0&&f(Sn,{})),a&&!c&&f("span",{style:ze,...lt(r("statusLoading")),children:o("statusLoading")})]}),s==="error"&&i&&f("div",{className:Mt("clover-status",t),"data-status":s,role:"alert",children:n?n(i):f(kt,{children:[f("p",{...lt(r("statusError")),children:o("statusError")}),f("p",{className:"clover-status-detail",lang:"en",children:i.message})]})})]})}function qm(t,e=false,n=3){const o=e||dm(t),r=e?`${n}
28
+ ${t}`:t,[s,i]=z(null);return D(()=>{if(!o)return;let a=true;return Promise.all([import("../sanitize-BedC_UE5.mjs"),e?import("../markdown-CCYJwzFn.mjs"):null]).then(([{sanitizeHTML:c,trusted:l},u])=>{const d=u?u.markdownToHtml(t,{headingLevel:n}):t,h=c(d,{markdown:!!u});a&&i({for:r,html:h,inner:l(h)})}),()=>{a=false}},[t,r,o,e,n]),o&&(s==null?void 0:s.for)===r?s:null}const Km=new Set(["p","span","h1","h2","h3","h4","h5","h6","a","b","i","em","strong","small","sub","sup","label"]),Jc=re(function({as:e="span",markup:n,language:o,format:r,headingLevel:s,...i},a){const{text:c,lang:l}=_t(n,o),u=lt(l),d=fm(r,c),h=d==="markdown",p=qm(d==="plain"?"":c,h,s),m=(p==null?void 0:p.html)??null;if(!c)return null;if(d==="plain")return f(e,{ref:a,...i,...u,children:c.split(/\r?\n/).map((y,v)=>f(ae.Fragment,{children:[v>0&&f("br",{}),y]},v))});const g=typeof e=="string"&&Km.has(e)&&m&&/<(p|ul|ol|div)[\s>]/i.test(m)?"div":e;return p?f(g,{ref:a,...i,...u,dangerouslySetInnerHTML:{__html:p.inner}}):f(e,{ref:a,...i,...u,children:h?hm(c):Rn(c)})}),Qc=({metadata:t,language:e,renderValue:n,...o})=>t!=null&&t.length?f("dl",{...o,children:t.map((r,s)=>{const i=_t(r.label,e),a=n==null?void 0:n(r);return f("div",{"data-label":_t(r.label,"none").text.replace(/\s+/g,"-").toLowerCase(),children:[f("dt",{...lt(i.lang),children:i.text}),a!==void 0?f("dd",{children:a}):f(Jc,{as:"dd",markup:r.value,language:e})]},s)})}):null,Zm=typeof window>"u"?D:Dt;function Gm({children:t}){const{t:e}=Pt(),n=wo(),o=R(null),r=fe(),s=ae.Children.only(t),i=s.props.id??r,{open:a,cut:c,toggle:l}=Xm(o);return f("div",{className:"clover-read-more",children:[ae.cloneElement(s,{ref:o,id:i,"data-read-more":a?"open":""}),(c||a)&&f("button",{type:"button",className:"clover-read-more-button","aria-expanded":a,"aria-controls":i,onClick:l,ref:n.ref,...lt(n.langOf(a?"readLess":"readMore")),children:e(a?"readLess":"readMore")})]})}function Xm(t){const[e,n]=z(false),[o,r]=z(false),s=()=>{const i=t.current;i&&!e&&r(i.scrollHeight>i.clientHeight+1)};return Zm(s),D(()=>{var d,h;const i=t.current;if(!i)return;let a=0;const c=()=>{cancelAnimationFrame(a),a=requestAnimationFrame(s)},l=typeof ResizeObserver>"u"?null:new ResizeObserver(c);l==null||l.observe(i);const u=typeof MutationObserver>"u"?null:new MutationObserver(c);return u==null||u.observe(document.head,{childList:true,subtree:true,characterData:true}),u==null||u.observe(document.documentElement,{attributes:true,attributeFilter:["style","class"]}),u==null||u.observe(i,{attributes:true,attributeFilter:["style"]}),(h=(d=document.fonts)==null?void 0:d.addEventListener)==null||h.call(d,"loadingdone",c),()=>{var p,m;cancelAnimationFrame(a),l==null||l.disconnect(),u==null||u.disconnect(),(m=(p=document.fonts)==null?void 0:p.removeEventListener)==null||m.call(p,"loadingdone",c)}},[e,t.current]),{open:e,cut:o,toggle:()=>n(i=>!i)}}function dn(t,e,n){const o=hs(),r=Ln(s=>{var i;return(i=Io(s,t))==null?void 0:i[e]},void 0);return n!==void 0?n:o?o[e]:r}const Bn=()=>{var t;return(t=Pe())==null?void 0:t.language};function la({of:t="manifest",as:e="p",value:n,className:o,...r}){const s=dn(t,"summary",n),i=Bn();return _t(s,i).text?f(Gm,{children:f(Jc,{as:e,markup:s,language:i,className:Mt("clover-summary",o),...r})}):null}function Ym({of:t="manifest",value:e,className:n,renderValue:o,...r}){const s=dn(t,"metadata",e),i=Bn();return f(Qc,{metadata:s,language:i,renderValue:o,className:Mt("clover-metadata",n),...r})}function Jm({of:t="manifest",value:e,className:n,...o}){const r=dn(t,"requiredStatement",e),s=Bn();return f(Qc,{metadata:r?[r]:null,language:s,className:Mt("clover-required-statement",n),...o})}function Qm({of:t="manifest",value:e,className:n,...o}){const r=dn(t,"rights",e);return r?f("a",{href:r,className:Mt("clover-rights",n),...o,children:r}):null}function tg({of:t="manifest",value:e,className:n,...o}){const r=dn(t,"id",e);return r?f("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:Mt("clover-id",n),...o,children:r}):null}function tl({property:t,className:e,of:n="manifest",value:o,...r}){const s=H(dn(n,t,o)),i=Bn(),a=s.filter(c=>c==null?void 0:c.id);return a.length?f("ul",{className:e,...r,children:a.map(c=>{const l=_t(c.label,i);return f("li",{children:[f("a",{href:c.id,target:"_blank",rel:"noopener noreferrer",hrefLang:En(c),...lt(l.text?l.lang:void 0),children:l.text?Rn(l.text):c.id}),c.format&&f("span",{className:"clover-link-format",children:[" (",c.format,")"]})]},c.id)})}):null}const eg=({className:t,...e})=>f(tl,{property:"homepage",className:Mt("clover-homepage",t),...e}),ng=({className:t,...e})=>f(tl,{property:"seeAlso",className:Mt("clover-see-also",t),...e});function og({of:t="manifest",value:e,size:n=400,className:o,...r}){var m;const s=Ln(g=>Io(g,t),null),i=e??s,a=Bn(),c=i?ps(i):null,l=(c==null?void 0:c.src)??(c==null?void 0:c.service)??(c==null?void 0:c.fallback),[u,d]=z(c==null?void 0:c.src),h=(m=Pe())==null?void 0:m.clover.request;if(D(()=>{if(!c)return d(void 0);if(c.src)return d(c.src);let g=true;return ms(c,n,h).then(y=>g&&d(y)),()=>{g=false}},[l,n]),!u)return null;const p=_t(i==null?void 0:i.label,a);return f("img",{src:u,alt:Rn(p.text),...lt(r.alt===void 0&&p.text?p.lang:void 0),width:n,loading:"lazy",decoding:"async",className:Mt("clover-thumbnail",o),...r})}const rg=typeof window>"u"?D:Dt,el=ue(null),sg=t=>{var e;return!!((e=t.textContent)!=null&&e.trim())||t.querySelector("img, svg, picture, video, canvas, object")!==null},ig=t=>!!t&&typeof t=="object"&&["label","logo","homepage"].some(e=>H(t[e]).length>0),$r=t=>!!t&&typeof t.id=="string",ag=t=>{const e=H(t.homepage).find($r);return e?{id:e.id,hrefLang:En(e)}:void 0},cg=(t,e)=>{var n;if(!t)return null;for(const o of[t.label,(n=H(t.homepage).find(r=>r==null?void 0:r.label))==null?void 0:n.label]){const r=_t(o,e);if(r.text)return{text:Rn(r.text),lang:r.lang}}return null};function nl({of:t="manifest",value:e,link:n=true,children:o,className:r,...s}){var l;const i=Ln(u=>{var d;return(d=Io(u,t))==null?void 0:d.provider},void 0),a=(l=Pe())==null?void 0:l.language,c=H(e!==void 0?e:i).filter(ig);return c.length?f("ul",{className:Mt("clover-provider",r),...s,children:c.map((u,d)=>{const h=n?ag(u):void 0,p=!!_t(u.label,a).text;return f(lg,{agent:u,homepage:h,children:o??f(kt,{children:[f(ol,{alt:p?"":void 0}),f(nn,{className:"clover-provider-label"})]})},u.id??d)})}):null}function lg({agent:t,homepage:e,children:n}){const o=R(null),[r,s]=z(null),i=ut(()=>{o.current&&!sg(o.current)&&s(t)},[t]);return r===t?null:f("li",{className:"clover-provider-agent",children:f(zc.Provider,{value:t,children:f(el.Provider,{value:i,children:e?f("a",{ref:o,href:e.id,target:"_blank",rel:"noopener noreferrer",hrefLang:e.hrefLang,className:"clover-provider-link",children:n}):f("span",{ref:o,className:"clover-provider-content",children:n})})})})}function ol({of:t="manifest",value:e,alt:n,className:o,...r}){var h;const{t:s,langOf:i}=Pt(),a=hs(),c=Ln(p=>{var m;return(m=Io(p,t))==null?void 0:m.provider},void 0),l=(h=Pe())==null?void 0:h.language,d=(e!==void 0?H(e):a?[a]:H(c)).flatMap(p=>{if(!p||typeof p!="object")return[];const m=p;if(m.type!=="Agent"&&$r(m)&&!m.logo)return[{image:m,agent:null}];const g=H(m.logo).find($r);return g?[{image:g,agent:m}]:[]});return d.length?f(kt,{children:d.map(({image:p,agent:m},g)=>{const y=cg(m,l);return f(ug,{src:p.id,alt:n??(y==null?void 0:y.text)??s("logo"),...lt(n!==void 0?void 0:y?y.lang:i("logo")),width:p.width,height:p.height,loading:"lazy",decoding:"async",className:Mt("clover-logo",o),...r},`${p.id}-${g}`)})}):null}function ug({alt:t,onError:e,...n}){const o=zt(el),[r,s]=z(false),i=ut(()=>s(true),[]);rg(()=>{r&&(o==null||o())},[r,o]);const a=ut(c=>{var l;c!=null&&c.complete&&!c.naturalWidth&&((l=c.decode)==null||l.call(c).catch(i))},[i]);return r?null:f("img",{ref:a,alt:t,onError:c=>{e==null||e(c),i()},...n})}function dg(t,e,n){if(n&&t.includes(n))return n;if(!t.length)return;const o=Zr(t,e);return o==="none"?t[0]:o}const fg=t=>t&&typeof t=="object"&&!Array.isArray(t)?Object.keys(t).filter(e=>e!=="none"&&e!=="@none"&&_t({[e]:t[e]}).text):[];function hg(t){if(!t)return[];const e=[...Array.isArray(t.metadata)?t.metadata:[],t.requiredStatement].filter(Boolean),o=[t.label,t.summary,...e.flatMap(r=>[r==null?void 0:r.label,r==null?void 0:r.value])].map(fg).filter(r=>r.length>1);return[...new Set(o.flat())]}function rl(){const{language:t,chooseLanguage:e}=de("About"),n=rt(s=>s.manifest),o=vt(()=>hg(n),[n]),r=dg(o,t);return r&&e?{languages:o,chosen:r,onChange:e}:null}const pg=mt(()=>import("./LanguageChoice-DXFfN1n1.mjs").then(t=>({default:t.LanguageChoice}))),sl=ue(false);function mg({part:t}){const e=rl();return e?f(wt,{fallback:null,children:f(pg,{...e,nameKey:"readingLanguage",part:t})}):null}function ua(t,e){const n=new Set,o=[];for(const r of t)for(const s of H(r==null?void 0:r.rendering)){const i=(s==null?void 0:s.id)??(s==null?void 0:s["@id"]);if(typeof i!="string"||n.has(i))continue;n.add(i);const a=_t(s.label,e);o.push({id:i,label:a.text||s.format||i,lang:a.text?a.lang:void 0,format:s.format,hrefLang:En(s)})}return o}function il(){const{language:t}=de("Download"),e=rt(o=>o.manifest),n=rt(o=>De(o.manifest,o.canvasId));return{page:ua(n,t),all:ua([e],t)}}const gg=mt(()=>import("./Download-D9sTED6x.mjs").then(({DownloadGroups:t})=>({default:t}))),vg=mt(()=>import("./NavDate-DtMXkvCo.mjs").then(t=>t.a).then(({NavDate:t})=>({default:t}))),yg=mt(()=>import("./PartOfManifest-Cu4fmoxn.mjs"));function bg({languages:t=true,...e}){const n=zt(sl);return f(_g,{...e,download:!n&&e.download!==false,choice:n||!t?null:f(mg,{part:"clover-about"})})}function _g({choice:t,canvasSummary:e=false,headingLevel:n=3,download:o=true,thumbnail:r=true,label:s=true,className:i,...a}){const{t:c,langOf:l}=Pt(),u=il(),d=rt(v=>v.manifest,Object.is,"About"),h=R(null);D(()=>{const v=h.current,w=v==null?void 0:v.querySelector(".clover-about-head");if(!v||!w||typeof ResizeObserver>"u")return;const b=new Set,x=()=>{const B=w.querySelector(".clover-about-thumbnail"),N=w.querySelector(".clover-about-label");for(const Q of[B,N])Q&&!b.has(Q)&&(b.add(Q),T.observe(Q));const J=v.style;if(!B){J.removeProperty("--clover-about-label-height"),J.removeProperty("--clover-about-thumbnail-width");return}const et=`${(N==null?void 0:N.offsetHeight)??0}px`,Z=`${B.offsetWidth}px`;J.getPropertyValue("--clover-about-label-height")!==et&&J.setProperty("--clover-about-label-height",et),J.getPropertyValue("--clover-about-thumbnail-width")!==Z&&J.setProperty("--clover-about-thumbnail-width",Z)};let S=0;const T=new ResizeObserver(()=>{cancelAnimationFrame(S),S=requestAnimationFrame(x)});return T.observe(w),x(),()=>{cancelAnimationFrame(S),T.disconnect(),v.style.removeProperty("--clover-about-label-height"),v.style.removeProperty("--clover-about-thumbnail-width")}},[s,r,d]);const p=fe(),m=()=>{var b,x;const v=h.current;(x=((b=v==null?void 0:v.closest(".clover-sections-item"))==null?void 0:b.querySelector(".clover-sections-button"))??v)==null||x.focus({preventScroll:true})};if(!d)return null;const g=(v,w,b)=>{if(!w)return null;const{as:x,title:S,group:T}=qc(n,`${p}-${v}`);return f("section",{className:"clover-about-section",...T,children:[f(x,{className:"clover-about-heading",...lt(l(v)),...S,children:c(v)}),b]})},y=v=>Array.isArray(d[v])?d[v].length>0:!!d[v];return f("div",{ref:h,className:Mt("clover-about",i),tabIndex:-1,...a,children:[t,(r||s)&&f("div",{className:"clover-about-head",children:[r&&f(og,{className:"clover-about-thumbnail",size:256,alt:s?"":void 0}),s&&f(nn,{as:vs(n),className:"clover-about-label clover-title"})]}),e&&f(la,{of:"canvas",className:"clover-about-summary"}),Ti(d)&&d.partOf&&f(wt,{fallback:null,children:f(yg,{manifest:d,headingLevel:n,onOpened:m})}),f(la,{className:"clover-about-summary"}),f(Ym,{className:"clover-about-metadata"}),f(Jm,{className:"clover-about-metadata"}),g("aboutDate",Wc(d.navDate),f(wt,{fallback:null,children:f(vg,{value:d.navDate,className:"clover-about-date"})})),g("aboutProvider",y("provider"),f(nl,{})),g("aboutRights",d.rights,f(Qm,{})),g("aboutHomepage",y("homepage"),f(eg,{})),g("aboutSeeAlso",y("seeAlso"),f(ng,{})),g("download",o&&u.page.length+u.all.length>0,f(wt,{fallback:null,children:f(gg,{page:u.page,all:u.all,headingLevel:n+1})})),g(Ti(d)?"aboutCanvas":"aboutManifest",d.id,f(tg,{}))]})}const wg=mt(()=>import("./LanguageChoice-DXFfN1n1.mjs").then(t=>({default:t.LanguageChoice}))),xg=mt(()=>import("./ControlMenu-D5LwsByV.mjs")),Sg=mt(()=>import("./Download-D9sTED6x.mjs").then(({DownloadGroups:t})=>({default:t})));function kg({languages:t=true,download:e=true}){const n=rl(),{page:o,all:r}=il(),s=e&&o.length+r.length>0;return!(t&&n)&&!s?null:f("div",{className:"clover-about-actions",children:[s&&f(Cg,{page:o,all:r}),t&&n&&f(wt,{fallback:null,children:f(wg,{...n,nameKey:"readingLanguage",part:"clover-about"})})]})}function Cg({page:t,all:e}){const{t:n,langOf:o}=Pt(),[r,s]=z(false),a=`${fe()}-download`,c=ut(l=>{var u;s(false),l&&((u=document.getElementById(a))==null||u.focus())},[a]);return f("span",{className:"clover-about-download",onBlur:l=>{const u=l.relatedTarget;r&&u&&!l.currentTarget.contains(u)&&s(false)},children:[f("button",{type:"button",id:a,className:"clover-about-download-button","aria-label":n("download"),...lt(o("download")),"aria-expanded":r,"aria-controls":r?`${a}-menu`:void 0,onClick:()=>s(l=>!l),children:[f(Eg,{}),f(Ue,{label:n("download")})]}),r&&f(wt,{fallback:null,children:f(xg,{id:`${a}-menu`,triggerId:a,onClose:c,className:"clover-about-download-menu",children:f(Sg,{page:t,all:e,inPopover:true})})})]})}function Eg(){return f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512","aria-hidden":"true",focusable:"false",fill:"none",stroke:"currentColor",strokeWidth:"56",strokeLinecap:"round",strokeLinejoin:"round",children:f("path",{d:"M256 64v272M160 240l96 96 96-96M80 352v48a48 48 0 0 0 48 48h256a48 48 0 0 0 48-48v-48"})})}function Mg(t,e=null){if(!t)return false;if(e!=null&&e.navPlace||t.navPlace)return true;for(const n of At(t).canvases){if(n.navPlace)return true;for(const o of H(n.annotations))for(const r of H(o==null?void 0:o.items))if(r!=null&&r.navPlace||H(r==null?void 0:r.motivation).includes("georeferencing")||H(r==null?void 0:r.body).some(i=>(i==null?void 0:i.type)==="Feature"||(i==null?void 0:i.type)==="FeatureCollection"))return true}return false}const Tg=["about","targets","collection","contents","search","map","transcript","annotations"],Re={targets:t=>{var e;return(((e=t.targets)==null?void 0:e.items.length)??0)>1},collection:t=>{var e,n;return(((n=(e=t.collection)==null?void 0:e.items)==null?void 0:n.length)??0)>0||!!ed(t.manifest)},contents:t=>Hh(t.manifest).length>0,search:t=>!!Ya(t.manifest),map:t=>Mg(t.manifest,t.collection),transcript:t=>De(t.manifest,t.canvasId).some(e=>Sc(e).length>0||eh(e).length>0),annotations:t=>vd(t.manifest,t.addedSets).length>0},Ig=(t,e)=>{const n=Array.isArray(e)?new Set(e):void 0;return Tg.filter(o=>t[o]&&(!n||n.has(o)))};function ys(t){const e={about:true,targets:rt(Re.targets),collection:rt(Re.collection),contents:rt(Re.contents),search:rt(Re.search),map:rt(Re.map),transcript:rt(Re.transcript),annotations:rt(Re.annotations)};return Ig(e,t)}function Pg({open:t=false,className:e}){return f("svg",{"aria-hidden":"true",focusable:"false",width:"12",height:"12",viewBox:"0 0 12 12",className:Mt("clover-chevron",e),"data-open":t||void 0,children:f("path",{d:"M3 4.5l3 3 3-3",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}const al=typeof window>"u"?D:Dt,cl=ue(null);function ry(){return zt(cl)}const ll=ue(0);function sy(){return zt(ll)}function Lg({items:t,layout:e="tabs",value:n,onValueChange:o,label:r,labelLang:s,headingLevel:i=3}){var Q;const a=fe(),c=Eo(r??"",s,r===void 0),l=R([]),u=e==="tabs",{t:d,langOf:h}=Pt(),p=Kc({dragFree:true,itemCount:t.length}),m=t.some(M=>M.value===n)?n:((Q=t[0])==null?void 0:Q.value)??null,g=R(new Set);m&&g.current.add(m);const y=R(null),[v,w]=z({value:null,count:0});D(()=>{var G;if(u||!m||y.current!==m)return;y.current=null;const M=t.findIndex(ct=>ct.value===m),E=document.getElementById(`${a}-panel-${M}`),A=(G=l.current[M])==null?void 0:G.parentElement;if(!E||!A)return;const W=A.getBoundingClientRect().bottom-E.getBoundingClientRect().top;if(W<=0)return;const V=fr(E);V&&(V.scrollTop-=W)},[m,u,t,a]);const b=M=>{var at,_,k,I;const E=t.findIndex(F=>F.value===m),A=document.getElementById(`${a}-panel-${E}`),W=M.target;if(!A||W===A||!A.contains(W)||!Og(W))return;const V=(_=(at=l.current[E])==null?void 0:at.parentElement)==null?void 0:_.getBoundingClientRect(),G=E+1<t.length?(I=(k=l.current[E+1])==null?void 0:k.parentElement)==null?void 0:I.getBoundingClientRect():void 0;if(!V)return;const ct=W.getBoundingClientRect(),yt=ct.top<V.bottom?Math.floor(ct.top-V.bottom):G&&ct.bottom>G.top?Math.ceil(Math.min(ct.bottom-G.top,ct.top-V.bottom)):0,ot=yt?fr(A):null;ot&&(ot.scrollTop+=yt)},x=R(null),S=t.map(M=>M.value).join(`
29
+ `);al(()=>{const M=x.current;if(u||!M||typeof ResizeObserver>"u")return;const E=[...M.querySelectorAll(":scope > .clover-sections-item")],A=E.map(O=>O.firstElementChild),W=A[0],V=A[A.length-1],G=new Map,ct=O=>(O&&G.get(O))??0,yt=document.scrollingElement;let ot=null,at=0;const _=()=>{const O=A.reduce((pt,ft)=>pt+ct(ft),0);let L=0;E.forEach((pt,ft)=>{pt.style.setProperty("--clover-sections-before",`${L}px`),L+=ct(A[ft]),pt.style.setProperty("--clover-sections-after",`${O-L}px`)}),M.style.setProperty("--clover-sections-total",`${O}px`);const U=W&&getComputedStyle(W);(U==null?void 0:U.position)==="sticky"&&V&&(at=parseFloat(U.top)+parseFloat(getComputedStyle(V).bottom)||0);const X=getComputedStyle(M),bt=parseFloat(X.lineHeight)||1.2*parseFloat(X.fontSize),tt=(ot==null?void 0:ot.clientHeight)??0;tt>0&&tt-at-O<2*bt?M.dataset.stacks="off":delete M.dataset.stacks},k=new ResizeObserver(O=>{var L,U;for(const X of O)A.includes(X.target)&&G.set(X.target,((U=(L=X.borderBoxSize)==null?void 0:L[0])==null?void 0:U.blockSize)??X.target.getBoundingClientRect().height);_()}),I=()=>{const O=fr(M);O!==ot&&(ot&&ot!==yt&&k.unobserve(ot),O&&O!==yt&&k.observe(O),ot=O)},F=()=>{I(),_()};I();for(const O of A)O&&k.observe(O,{box:"border-box"});return window.addEventListener("resize",F),()=>{k.disconnect(),window.removeEventListener("resize",F);for(const O of E)O.style.removeProperty("--clover-sections-before"),O.style.removeProperty("--clover-sections-after");M.style.removeProperty("--clover-sections-total"),delete M.dataset.stacks}},[u,S,i]),D(()=>{if(u)return;const M=l.current.map(A=>A==null?void 0:A.parentElement).filter(A=>!!A),E=A=>{var ct;if(A.ctrlKey)return;const W=A.currentTarget,V=da(W);if(!V||V===document.scrollingElement)return;A.preventDefault();const G=A.deltaMode===1?parseFloat(getComputedStyle(W).lineHeight)||16:A.deltaMode===2?V.clientHeight:1;(ct=da(V)??document.scrollingElement)==null||ct.scrollBy({left:A.deltaX*G,top:A.deltaY*G,behavior:"instant"})};for(const A of M)A.addEventListener("wheel",E,{passive:false});return()=>{for(const A of M)A.removeEventListener("wheel",E)}},[u,S]);const T=M=>{M!==m&&(y.current=M,u||w(E=>({value:M,count:E.count+1})),o==null||o(M))},B=(M,E)=>{var ct;const A=t.length-1,[W,V]=u?["ArrowLeft","ArrowRight"]:["ArrowUp","ArrowDown"],G=M.key===V?(E+1)%t.length:M.key===W?(E-1+t.length)%t.length:M.key==="Home"?0:M.key==="End"?A:null;G!==null&&(M.preventDefault(),(ct=l.current[G])==null||ct.focus(),u&&T(t[G].value))},N=R(false);D(()=>{if(!u)return;const M=t.findIndex(ot=>ot.value===m),E=l.current[M],A=E==null?void 0:E.parentElement;if(!E||!A)return;const W=getComputedStyle(A),V=A.getBoundingClientRect(),G=E.getBoundingClientRect(),ct=V.left+(parseFloat(W.scrollPaddingLeft)||0),yt=V.right-(parseFloat(W.scrollPaddingRight)||0);(G.left<ct-1||G.right>yt+1)&&p.scrollToIndex(M,{instant:!N.current}),N.current=true},[m,u,t.length,p.scrollToIndex]);const J=M=>{const E=M==="prev"?p.canScrollPrev:p.canScrollNext,A=M==="prev"?"sectionsScrollBack":"sectionsScrollForward";return f("button",{type:"button",className:`clover-steps-step clover-sections-scroll-${M}`,"aria-hidden":"true",tabIndex:-1,hidden:!E,...lt(h(A)),onMouseDown:W=>W.preventDefault(),onClick:M==="prev"?p.scrollPrev:p.scrollNext,children:[f("svg",{"aria-hidden":"true",focusable:"false",width:"12",height:"12",viewBox:"0 0 16 16",children:f("path",{d:M==="next"?"M6 3l5 5-5 5":"M10 3L5 8l5 5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),f(Ue,{label:d(A)})]})},et=vs(i,"div"),Z=(M,E)=>{const A=M.value===m;return f("button",{ref:W=>{l.current[E]=W},type:"button",id:`${a}-button-${E}`,className:"clover-sections-button","data-value":M.value,"data-track-index":u?E:void 0,"aria-controls":`${a}-panel-${E}`,...u?{role:"tab","aria-selected":A,tabIndex:A?0:-1}:{"aria-expanded":A,"aria-disabled":A||void 0},onClick:()=>T(M.value),onKeyDown:W=>B(W,E),children:[f("span",{className:"clover-sections-label",children:M.label}),!u&&f(Pg,{open:A,className:"clover-sections-chevron"})]},M.value)};return f("div",{ref:x,className:"clover-sections","data-layout":e,onFocus:u?void 0:b,style:u?void 0:{"--clover-sections-count":t.length},children:[u&&f("div",{className:"clover-sections-tabs","data-more":[p.canScrollPrev&&"start",p.canScrollNext&&"end"].filter(Boolean).join(" ")||void 0,children:f("div",{className:"clover-sections-row",children:[f("div",{role:"tablist",ref:p.ref,...c.props,className:"clover-sections-list",children:t.map(Z)}),J("prev"),J("next")]})}),u&&c.node,t.map((M,E)=>{const A=M.value===m;return f("section",{className:"clover-sections-item","data-value":M.value,"data-open":A,style:u?void 0:{"--clover-sections-index":E},children:[!u&&f(et,{className:"clover-sections-heading",children:[Z(M,E),f("span",{className:"clover-sections-reach","aria-hidden":"true"})]}),f(ll.Provider,{value:v.value===M.value?v.count:0,children:f(Ag,{id:`${a}-panel-${E}`,tabs:u,labelledBy:`${a}-button-${E}`,hidden:!A,actions:M.actions,children:g.current.has(M.value)?M.content:null})})]},M.value)})]})}function Ag({id:t,tabs:e,labelledBy:n,hidden:o,actions:r,children:s}){const[i,a]=z(null),c=!o||!!r;return al(()=>{const l=i==null?void 0:i.parentElement;if(!c||!i||!l||typeof ResizeObserver>"u")return;const u=new ResizeObserver(()=>{const d=i.offsetWidth;d?(l.style.setProperty("--clover-sections-actions",`${d}px`),l.setAttribute("data-actions","")):(l.style.removeProperty("--clover-sections-actions"),l.removeAttribute("data-actions"))});return u.observe(i),()=>{u.disconnect(),l.style.removeProperty("--clover-sections-actions"),l.removeAttribute("data-actions")}},[i,c]),f(kt,{children:[!e&&f("div",{ref:a,className:"clover-sections-actions",hidden:!c,children:r}),f("div",{id:t,role:e?"tabpanel":"region","aria-labelledby":n,tabIndex:e?0:void 0,className:"clover-sections-panel",hidden:o,children:f(cl.Provider,{value:e?null:i,children:[e&&r,s]})})]})}function fr(t){for(let e=t.parentElement;e&&e!==document.body;e=e.parentElement)if(/auto|scroll|hidden/.test(getComputedStyle(e).overflowY))return e;return document.scrollingElement}function da(t){for(let e=t.parentElement;e&&e!==document.body;e=e.parentElement)if(/auto|scroll/.test(getComputedStyle(e).overflowY)&&e.scrollHeight>e.clientHeight)return e;return document.scrollingElement}function Og(t){try{return t.matches(":focus-visible")}catch{return true}}const Ng=mt(()=>import("./MapView-DCxcUkUC.mjs").then(t=>({default:t.RootMap}))),Rg=mt(()=>import("./Collection-CMHNssor.mjs").then(t=>({default:t.Collection}))),Bg=mt(()=>import("./TargetItems-5JGXJ5e4.mjs").then(t=>({default:t.TargetsSection}))),$g=mt(()=>import("./Contents-6XNd1KtI.mjs").then(t=>({default:t.Contents}))),Fg=mt(()=>import("./Search-BOI3sJa2.mjs").then(t=>({default:t.Search}))),Dg=mt(()=>import("./Transcript-jk8NyuUI.mjs").then(t=>({default:t.Transcript}))),zg=mt(()=>import("./Annotations-yD1LhlP3.mjs").then(t=>({default:t.Annotations}))),Be=t=>f(wt,{fallback:null,children:t}),Hg=()=>null,Wg=re(function({layout:e="tabs",value:n,defaultValue:o,onValueChange:r,onClose:s,closeOnEscape:i=false,headingLevel:a=3,as:c="aside",download:l=true,languages:u=true,sections:d,labels:h,className:p,children:m,onKeyDown:g,...y},v){var O;const{clover:w}=de("Panel"),b=R(null),{t:x,langOf:S,hostLanguage:T,i18n:B}=Pt(),N=Eo(x("informationPanelTabs"),S("informationPanelTabs"),!!(y["aria-label"]||y["aria-labelledby"])||!(["aside","section","nav"].includes(c)||y.role)),J=L=>{const U=S(L);return U?f("span",{...lt(U),children:x(L)}):x(L)},et=(L,U)=>{const X=h==null?void 0:h[L];if(X===void 0)return J(U);if(typeof X=="string")return X;const bt=Object.keys(X),tt=Zr(bt,B.language);if(!tt)return J(U);const pt=_o(tt,T);return pt?f("span",{...lt(pt),children:X[tt]}):X[tt]},Z=ys(d),Q=L=>Z.includes(L),M=ae.Children.toArray(m).filter(L=>ae.isValidElement(L)&&L.type===Hg),E=e==="accordion"?a+1:a,A=u||l?f(kg,{languages:u,download:l}):void 0,W=M.length?M.map(({props:L})=>({value:L.value,label:L.label,content:L.children,...L.value==="about"&&{actions:A}})):[...Q("about")?[{value:"about",label:et("about","informationPanelTabsAbout"),content:f(bg,{headingLevel:E,download:l}),actions:A}]:[],...Q("targets")?[{value:"targets",label:et("targets","informationPanelTabsTargets"),content:Be(f(Bg,{headingLevel:E}))}]:[],...Q("collection")?[{value:"collection",label:et("collection","informationPanelTabsCollection"),content:Be(f(Rg,{headingLevel:E}))}]:[],...Q("contents")?[{value:"contents",label:et("contents","informationPanelTabsContents"),content:Be(f($g,{}))}]:[],...Q("search")?[{value:"search",label:et("search","informationPanelTabsSearch"),content:Be(f(Fg,{headingLevel:E,sticky:true,size:"small"}))}]:[],...Q("map")?[{value:"map",label:et("map","informationPanelTabsMap"),content:Be(f(Ng,{}))}]:[],...Q("transcript")?[{value:"transcript",label:et("transcript","transcriptLabel"),content:Be(f(Dg,{sticky:true,size:"small"}))}]:[],...Q("annotations")?[{value:"annotations",label:et("annotations","informationPanelTabsAnnotations"),content:Be(f(zg,{headingLevel:E}))}]:[]],V=rt(L=>L.search.query),G=W.some(L=>L.value==="search"),[ct,yt]=z(()=>V&&G?"search":o??null),ot=R(V&&G?V:"");D(()=>{G&&(V&&V!==ot.current&&n===void 0&&yt("search"),ot.current=V)},[V,G,n]);const at=rt(L=>{var U;return L.annotationId&&((U=L.regions)!=null&&U.entries.some(X=>X.id===L.annotationId))?L.annotationId:null}),_=W.some(L=>L.value==="contents");D(()=>{at&&_&&n===void 0&&yt("contents")},[at,_,n]);const k=n!==void 0?n:ct,I=(W.some(L=>L.value===k)?k:(O=W[0])==null?void 0:O.value)==="search";if(D(()=>{G&&w.setSetVisible(Jr,I)},[w,G,I]),!W.length)return null;const F=()=>{var U;const L=b.current;L!=null&&L.contains(document.activeElement)&&((U=Ug(L))==null||U.focus()),s==null||s()};return f(c,{ref:L=>{b.current=L,typeof v=="function"?v(L):v&&(v.current=L)},className:Mt("clover-panel",p),"data-layout":e,"data-closable":s?"":void 0,"data-floating":i?"":void 0,...N.props,onKeyDown:L=>{g==null||g(L),i&&s&&L.key==="Escape"&&!L.defaultPrevented&&(L.preventDefault(),F())},...y,children:[N.node,s&&f("button",{type:"button",className:"clover-panel-close","aria-label":x("informationPanelClose"),...lt(S("informationPanelClose")),onClick:F,children:[f("svg",{"aria-hidden":"true",focusable:"false",viewBox:"0 0 512 512",fill:"none",stroke:"currentColor",children:f(hc,{})}),f(Ue,{label:x("informationPanelClose")})]}),f(sl.Provider,{value:W.some(L=>L.value==="about"),children:f(Lg,{items:W,layout:e,value:n!==void 0?n:ct,onValueChange:L=>{n===void 0&&yt(L),r==null||r(L)},label:x("informationPanelTabs"),labelLang:S("informationPanelTabs"),headingLevel:a})})]})});function Ug(t){for(let e=t;e&&e!==document.body;e=e.parentElement){if(!e.id)continue;const n=document.querySelector(`[aria-controls~="${e.id.replace(/["\\]/g,"\\$&")}"]`);if(n)return n}return null}const jg=1,Vg=4,qg=8,Kg=500,Zg=4,fa=["pointerdown","mousedown","pointerup","mouseup","click","dblclick"],ul=()=>typeof document>"u"?16:parseFloat(getComputedStyle(document.documentElement).fontSize)||16;function ro(t,e){if(t===void 0)return;if(typeof t=="number")return t;const n=parseFloat(t);if(!Number.isNaN(n))return t.endsWith("rem")?n*ul():t.endsWith("%")?n/100*e:n}const hr=t=>typeof t=="number"?`${t}px`:t,Gg=t=>{if(!t||typeof localStorage>"u")return{};try{const e=JSON.parse(localStorage.getItem(t)??"{}");return e&&typeof e=="object"?e:{}}catch{return{}}},Xg=(t,e)=>{if(t)try{localStorage.setItem(t,JSON.stringify(e))}catch{}},Yg=t=>t?Array.from(t.children).filter(e=>e.classList.contains("clover-split-pane")):[];function Jg(t){const e=i=>{let a=t[i];for(;a&&!a.classList.contains("clover-split-pane");)a=a[i];return a},n=e("previousElementSibling"),o=e("nextElementSibling"),r=o!=null&&o.hasAttribute("data-sized")?o:n!=null&&n.hasAttribute("data-sized")?n:null;return{sized:r,other:r===o?n:o}}function Qg(t,e,n){const{sized:o,other:r}=Jg(t);if(!o)return null;const s=e.clientWidth,i=o.dataset.splitKey??"",a=n[i]??{},c=n[(r==null?void 0:r.dataset.splitKey)??""]??{},l=ro(a.min,s)??0,d=o.getBoundingClientRect().width+((r==null?void 0:r.getBoundingClientRect().width)??0)-(ro(c.min,s)??0),h=Math.max(l,Math.min(ro(a.max,s)??d,d)),p=o.getBoundingClientRect().left>=t.getBoundingClientRect().left-1;return{sized:o,key:i,min:l,max:h,after:p}}function tv(t,e,n){const o=e!==void 0&&e>t.min+1&&e<t.max-1?[t.min,e,t.max]:[t.min,t.max],r=n??e??t.sized.getBoundingClientRect().width,s=o.find(i=>i>r+1)??o[0];return{to:s,own:e!==void 0&&Math.abs(s-e)<=1}}function ev(t,e){const n=e.sized.getBoundingClientRect().width,o=jg*ul()*(t.shiftKey?4:1),r=e.after?"ArrowLeft":"ArrowRight",s=e.after?"ArrowRight":"ArrowLeft";if(t.key===r)return n+o;if(t.key===s)return n-o;if(t.key==="Home")return e.min;if(t.key==="End")return e.max}function ha(t){var n,o,r;const e=(o=(n=t.target)==null?void 0:n.closest)==null?void 0:o.call(n,".clover-tip");return!!(e&&((r=t.currentTarget)!=null&&r.contains(e)))}function nv(t,e){let n=null,o=false,r=null,s=null;const i=a=>{s==null||s();const c=t(),l=c==null?void 0:c.ownerDocument.defaultView;if(!c||!l)return;const u=g=>Math.hypot(g.clientX-a.x,g.clientY-a.y)>a.reach,d=()=>{fa.forEach(g=>l.removeEventListener(g,h,true)),l.removeEventListener("pointermove",p,true),clearTimeout(m),s=null},h=g=>{if(!c.contains(g.target)){if(g.type==="pointerdown"&&u(g))return d();g.preventDefault(),g.stopPropagation()}},p=g=>u(g)&&d();fa.forEach(g=>l.addEventListener(g,h,true)),l.addEventListener("pointermove",p,true);const m=setTimeout(d,Kg);s=d};return{down(a){var u;if(o=false,r=null,a.defaultPrevented||a.button!==0||ha(a))return;const c=e().limits();if(!c)return;a.preventDefault(),n={found:c,x:a.clientX,from:c.sized.getBoundingClientRect().width,slop:a.pointerType==="touch"?qg:Vg,moved:false};const l=a.currentTarget;l.dataset.dragging="",(u=l.setPointerCapture)==null||u.call(l,a.pointerId)},move(a){const c=n;if(!c)return;const l=a.clientX-c.x;!c.moved&&Math.abs(l)<c.slop||(c.moved=true,e().resize(c.from+(c.found.after?-l:l)))},up(a){const c=n;o=(c==null?void 0:c.moved)??false,r=c&&!c.moved&&a.type==="pointerup"?{x:a.clientX,y:a.clientY,reach:c.slop*Zg}:null,n=null,delete a.currentTarget.dataset.dragging},click(a){const c=o,l=r;o=false,r=null,!(a.defaultPrevented||c||ha(a))&&(e().step(),l&&i(l))},key(a){if(a.defaultPrevented)return;const c=e().limits();if(!c)return;const l=ev(a,c);l!==void 0&&(e().resize(l),a.preventDefault())},dispose(){s==null||s()}}}const bs=ue(null);function _s(t,e){typeof t=="function"?t(e):t&&(t.current=e)}const ov=re(function({as:e="div",storageKey:n,className:o,style:r,children:s,...i},a){const c=R(null),l=R({}),[u,d]=z({});D(()=>d(Gg(n)),[n]);const h=ut((m,g)=>d(y=>{const v={...y};return g===void 0?delete v[m]:v[m]=Math.round(g),Xg(n,v),v}),[n]),p=vt(()=>({sizes:u,setSize:h,specs:l,element:c}),[u,h]);return f(bs.Provider,{value:p,children:f(e,{ref:m=>{c.current=m,_s(a,m)},className:["clover-split",o].filter(Boolean).join(" "),style:{display:"flex",...r},...i,children:s})})}),dl=re(function({as:e="div",size:n,min:o,max:r,name:s,className:i,style:a,children:c,...l},u){const d=zt(bs),h=R(null),[p,m]=z(s??"");D(()=>{if(s)return m(s);const y=Yg(d==null?void 0:d.element.current);m(String(y.indexOf(h.current)))},[s,d]),d&&p&&(d.specs.current[p]={min:o,max:r,size:n});const g=d&&p?d.sizes[p]:void 0;return f(e,{ref:y=>{h.current=y,_s(u,y)},className:["clover-split-pane",i].filter(Boolean).join(" "),"data-split-key":p||void 0,"data-sized":n!==void 0?"":void 0,style:{minWidth:hr(o)??0,"--clover-split-size":g!==void 0?`${g}px`:hr(n),"--clover-split-max":hr(r),...a},...l,children:c})}),rv=re(function({className:e,children:n,onPointerDown:o,onClick:r,onKeyDown:s,...i},a){const c=zt(bs),{t:l,langOf:u}=Pt(),d=R(null),[h,p]=z(),m=ut(()=>{const T=d.current,B=c==null?void 0:c.element.current;return!T||!B||!c?null:Qg(T,B,c.specs.current)},[c]),g=ut(T=>{const B=m();if(!B||!c)return;const N=Math.min(B.max,Math.max(B.min,T));c.setSize(B.key,N),p({now:N,min:B.min,max:B.max})},[m,c]),y=ut(()=>{const T=m();T&&p({now:T.sized.getBoundingClientRect().width,min:T.min,max:T.max})},[m]);D(()=>{const T=c==null?void 0:c.element.current;if(y(),!T||typeof ResizeObserver>"u")return;let B=0;const N=new ResizeObserver(()=>{cancelAnimationFrame(B),B=requestAnimationFrame(y)});return N.observe(T),()=>{cancelAnimationFrame(B),N.disconnect()}},[y,c,c==null?void 0:c.sizes]);const v=T=>{var B;return Math.round(T/(((B=c==null?void 0:c.element.current)==null?void 0:B.clientWidth)||1)*100)},w=()=>{var et,Z;const T=m();if(!T||!c)return;const B=((et=c.element.current)==null?void 0:et.clientWidth)??0,N=ro((Z=c.specs.current[T.key])==null?void 0:Z.size,B),J=tv(T,N,c.sizes[T.key]);if(!J.own)return g(J.to);c.setSize(T.key,void 0),p({now:N,min:T.min,max:T.max})},b=R({limits:m,resize:g,step:w});b.current={limits:m,resize:g,step:w};const[x]=z(()=>nv(()=>d.current,()=>b.current));D(()=>()=>x.dispose(),[x]);const S=i["aria-label"]??l("splitHandle");return f("div",{ref:T=>{d.current=T,_s(a,T)},role:"separator","aria-orientation":"vertical","aria-label":S,...lt(i["aria-label"]===void 0?u("splitHandle"):void 0),"aria-valuenow":h?v(h.now):void 0,"aria-valuemin":h?v(h.min):void 0,"aria-valuemax":h?v(h.max):void 0,tabIndex:0,className:["clover-split-handle",e].filter(Boolean).join(" "),onPointerDown:T=>{o==null||o(T),x.down(T)},onPointerMove:T=>x.move(T),onPointerUp:T=>x.up(T),onPointerCancel:T=>x.up(T),onClick:T=>{r==null||r(T),x.click(T)},onKeyDown:T=>{s==null||s(T),x.key(T)},...i,children:[n,f(Ue,{label:S})]})});let fl;function sv(t){fl=t}function iy(){return fl}function iv({open:t,onOpenChange:e,controls:n,side:o}){const{t:r,langOf:s}=Pt(),i=fe().replace(/:/g,"");return f(Fe,{id:`panel-${i}`,label:r("informationPanelToggle"),lang:s("informationPanelToggle"),expanded:t,controls:n,side:o==="start"?o:void 0,onClick:()=>e(!t),children:f(kt,{children:[f("rect",{x:"64",y:"96",width:"384",height:"320",rx:"40",fill:"none",strokeWidth:"36"}),f("path",{d:"M320 96v320",fill:"none",strokeWidth:"36"}),t&&f("path",{d:"M320 96h88a40 40 0 0 1 40 40v240a40 40 0 0 1-40 40h-88z"})]})})}let av,so;const hl=()=>av??(av=import("./dragToClose-CfijwC7H.mjs").then(t=>so=t));function cv(){hl()}function lv(t,{enabled:e,side:n,onClose:o,scrim:r,alongside:s,exits:i=false}){const a=R({enabled:e,side:n,onClose:o,scrim:r,alongside:s,exits:i});a.current={enabled:e,side:n,onClose:o,scrim:r,alongside:s,exits:i},D(()=>{const c=t.current;if(!c||(so==null||so.reset(c,a),!e))return;let l=true,u;return hl().then(d=>{l&&(u=d.attach(c,a))}),()=>{l=false,u==null||u()}},[t,e])}const uv=240,dv="16rem",fv="14rem",hv=31;function pv(t){const[e,n]=z(t),[o,r]=z(t);return D(()=>{if(t){n(true);const i=requestAnimationFrame(()=>requestAnimationFrame(()=>r(true)));return()=>cancelAnimationFrame(i)}r(false);const s=setTimeout(()=>n(false),uv);return()=>clearTimeout(s)},[t]),{mounted:e,open:t&&o}}function mv(t){const e=n=>t.querySelector(n);return e('[role="tab"][aria-selected="true"]')??e('.clover-sections-button[aria-expanded="true"]')??e(".clover-sections-button")}const gv=typeof window>"u"?D:Dt;function vv(t,e){const[n,o]=z();return gv(()=>{const r=t.current;if(!r)return;const s=()=>{const a=r.clientWidth;if(!a)return;const c=parseFloat(getComputedStyle(document.documentElement).fontSize);o(a>=e*(c||16))};if(s(),typeof ResizeObserver>"u")return;const i=new ResizeObserver(s);return i.observe(r),()=>i.disconnect()},[t,e]),n}const yv=typeof window>"u"?D:Dt;function bv({id:t,beside:e,defaultOpen:n,side:o,focus:r=mv,slides:s=true,alongside:i,followFocus:a}){var Q,M;const c=R(null),l=R(null),u=e===false,[d,h]=z(n),[p,m]=z(false),g=u?p:d,y=()=>document.querySelector(`button[aria-controls~="${t}"]`),v=()=>a(y),w=()=>{var E,A;(E=c.current)!=null&&E.contains(document.activeElement)&&((A=y())==null||A.focus(),v())},b=R(0),x=E=>{b.current=u&&E?3:0,b.current||v(),u&&m(E),h(E)},S=()=>{w(),x(false)},T=R(e),B=R(false);if(T.current===true&&e===false){const E=document.activeElement;B.current=!!(E&&((Q=c.current)!=null&&Q.contains(E)||(M=y())!=null&&M.contains(E)))}yv(()=>{var E;B.current&&(B.current=false,(E=y())==null||E.focus(),v()),e===true&&m(false),T.current=e},[e]);const N=pv(s&&u&&g),J=s&&u,et=J?N.mounted:g,Z=J?N.open:g;return D(()=>{if(!b.current||!c.current)return;b.current-=1;const E=r(c.current);E==null||E.focus({preventScroll:true}),E&&document.activeElement===E&&(b.current=0)}),lv(c,{enabled:u&&Z,side:o,onClose:S,scrim:l,alongside:i,exits:!s}),{pane:c,over:u,open:g,shown:et,opened:Z,setOpen:x,close:S,onKeyDown:E=>{u&&g&&E.key==="Escape"&&!E.defaultPrevented&&(E.preventDefault(),S())},scrim:u&&et&&{ref:l,"data-open":Z,"aria-hidden":true,onMouseDown:E=>E.preventDefault(),onClick:S}}}const _v=typeof window>"u"?D:Dt;function wv(t,e,n){_v(()=>{const o=t.current,r=o==null?void 0:o.parentElement;if(!n||!o||!r)return;const s=()=>{const c=e();o.style.setProperty("--clover-template-spine-top",`${c?c.getBoundingClientRect().top-r.getBoundingClientRect().top:0}px`)};s();const i=new ResizeObserver(s);for(const c of Array.from(r.children))i.observe(c);const a=e();return a&&i.observe(a),()=>i.disconnect()},[t,n])}const xv=()=>import("./PanelPart-DyxYm0ly.mjs");function Sv({id:t,beside:e,defaultOpen:n,side:o="end",followFocus:r,body:s,sections:i,panel:a}){const c=bv({id:t,beside:e,defaultOpen:n,side:o,followFocus:r}),l=!c.over&&c.open,u=R(null),[d,h]=z(),p=a??d,m=()=>xv().then(v=>h(()=>v.default));D(()=>{c.open&&!p&&m()},[c.open]),wv(u,()=>s==null?void 0:s(),l&&!!s);const g=v=>{var w,b;(b=(w=v.target).closest)!=null&&b.call(w,`[aria-controls~="${t}"]`)&&(p||m(),c.over&&cv())},y=f(kv,{sections:i,open:c.open,onOpenChange:v=>v&&!p?m().then(()=>c.setOpen(true)):c.setOpen(v),controls:t,side:o});return{...c,id:t,side:o,docked:l,spine:u,toggle:y,Part:p,splitProps:{"data-panel":c.over?"over":"beside",onKeyDown:c.onKeyDown,onPointerOver:g,onFocus:g}}}function kv({sections:t,...e}){return ys(t).length?f(iv,{...e}):null}function Cv({pane:t,className:e,...n}){const{id:o,over:r,docked:s,side:i,Part:a}=t,c=ys(n.sections);if(!c.length)return null;const l=s&&f(kt,{children:[f(rv,{className:"clover-template-panel-handle","aria-controls":o}),f("div",{ref:t.spine,className:"clover-template-spine",children:t.toggle})]});return f(kt,{children:[i==="end"&&l,f(dl,{ref:t.pane,id:o,"data-spine":r||void 0,"data-side":i,name:"panel","data-about":c.includes("about")||void 0,className:["clover-template-panel clover-template-drawer",e].filter(Boolean).join(" "),size:"24rem",min:r?void 0:fv,"data-open":t.opened,hidden:!t.shown,children:a&&f(a,{...n,onClose:r?t.close:void 0,closeOnEscape:r})}),i==="start"&&l,t.scrim&&f("div",{className:"clover-template-scrim",...t.scrim})]})}const Ev=30;function Mv(){const t=R(0);return D(()=>()=>cancelAnimationFrame(t.current),[]),e=>{cancelAnimationFrame(t.current);let n=0;const o=()=>{const r=e();r&&Tv()?r.focus():++n<Ev&&(t.current=requestAnimationFrame(o))};t.current=requestAnimationFrame(o)}}function Tv(){const t=document.activeElement;return!t||t===document.body||!t.isConnected||t.closest("[hidden], [inert]")!==null}function Iv({className:t,header:e=true,headingLevel:n=2,panel:o=true,defaultPanelOpen:r,panelLayout:s="accordion",panelSections:i,panelLabels:a,download:c=true,languages:l=true,items:u="slider",singleItem:d=false,storageKey:h="clover-template-default",fill:p=false,collapseControls:m,canvasOptions:g,...y}){const v=R(null),w=fe().replace(/:/g,""),b=`${w}-panel`,x=qc(n,`${w}-title`),S=Sv({id:b,beside:vv(v,hv),defaultOpen:r??true,followFocus:Mv(),sections:i,body:()=>{var N;return(N=v.current)==null?void 0:N.querySelector(".clover-template-default-body")},panel:Wg}),T=S.over,B=o&&S.docked;return f(Zd,{className:["clover-template-default",t].filter(Boolean).join(" "),"data-fill":p||void 0,...e?x.group:null,...y,children:f(ov,{ref:v,className:"clover-template-default-panes clover-template-panes",storageKey:h||void 0,...o?S.splitProps:{"data-panel":"beside"},children:[f(dl,{className:"clover-template-default-main",min:T?void 0:dv,children:[e&&f("header",{className:"clover-template-default-header",children:[f(Pv,{title:x}),f(vo,{of:"targets",layout:"pager",size:"small",className:"clover-template-default-pager"}),f(nl,{className:"clover-template-default-provider",children:f(ol,{})})]}),f(Vm,{loading:false}),f(lm,{className:"clover-template-default-body",collapseControls:m,options:g,children:o&&!B&&S.toggle}),f("div",{className:"clover-template-default-rail",children:[f("div",{className:"clover-template-default-rail-header",children:[f(Ov,{}),f(jm,{})]}),u&&f(vo,{layout:u,singleItem:d})]})]}),o&&f(Cv,{pane:S,className:"clover-template-default-panel",layout:s,sections:i,labels:a,download:c,languages:l,headingLevel:e?Av(n):n})]})})}function Pv({title:t}){const e=rt(o=>{var r;return o.throughCollection?(r=o.collection)==null?void 0:r.label:void 0}),n=Kh();return Lv(n==null?void 0:n.entries[0]),f(kt,{children:[f(nn,{as:t.as,className:"clover-template-default-title clover-template-title clover-title",...t.title}),e&&f("div",{className:"clover-template-default-collection-row",children:[f(nn,{as:"p",label:e,className:"clover-template-default-collection"}),f(vo,{of:"members",layout:"pager",size:"small",className:"clover-template-default-pager"})]}),n&&f("div",{className:"clover-template-default-collection-row",children:[n.label&&f(nn,{as:"p",label:n.label,className:"clover-template-default-collection"}),f(vo,{of:"annotations",layout:"pager",size:"small",className:"clover-template-default-pager"})]})]})}function Lv(t){const{clover:e}=de(),n=rt(r=>{var s;return(s=r.manifest)==null?void 0:s.id}),o=R(null);D(()=>{if(!t||!n||o.current===n)return;o.current=n;const{annotationId:r,canvasId:s}=e.store.get();!r&&s===t.canvasId&&e.selectAnnotation(t.id)},[e,t,n])}const Av=t=>t+1;function Ov(){const t=fs();return f("p",{className:"clover-template-default-titles",children:t.map((e,n)=>f(ae.Fragment,{children:[n>0&&f("span",{className:"clover-template-default-titles-dot","aria-hidden":"true",children:"\xB7"}),f(nn,{label:e.label})]},e.id))})}const Nv=()=>import("./renderers-Hs9tzSPp.mjs"),Rv=mt(()=>import("./Document-XCWKzfno.mjs").then(t=>({default:t.Document}))),Bv=mt(()=>import("./Gallery-71gebgEA.mjs").then(t=>({default:t.Gallery}))),pa={default:Iv,document:Rv,gallery:Bv},$v={header:["default"],panel:["default","gallery"],items:["default","gallery"],singleItem:["default","document"],fill:["default"],defaultPanelOpen:["default","document","gallery"],panelLayout:["default","document","gallery"],panelSections:["default","document","gallery"],panelLabels:["default","document","gallery"],download:["default","document","gallery"],languages:["default","document","gallery"],storageKey:["default","document","gallery"],defaultSidebarOpen:["document"],size:["gallery"],height:["gallery"],gap:["gallery"],secondary:["gallery"],summary:["gallery"],lightboxItems:["gallery"]};function Fv({props:t}){const e=typeof t.template=="string"&&t.template in pa?t.template:"default",n=Object.fromEntries(Object.entries(t).filter(([i])=>{var a;return i!=="template"&&(((a=$v[i])==null?void 0:a.includes(e))??true)})),o=Qe(Nv,!!t.renderers),r=vt(()=>o==null?void 0:o.toRenderers(t.renderers),[o,t.renderers]);if(t.renderers&&!o)return null;n.renderers=r,typeof n.storageKey=="string"&&(n.storageKey=n.storageKey.trim().toLowerCase()==="false"?false:n.storageKey);const s=pa[e];return f(wt,{fallback:null,children:f(s,{...n,iiifContent:t.iiifContent})})}const Dv=""+new URL("../assets/maplibre-gl-worker-kTz9OPxr.js",import.meta.url).href,zv={mapWorkerUrl:Dv},Hv={tag:"clover-viewer",kind:"alone",attributes:{template:{prop:"template",type:["default","document","gallery"]},"iiif-content":{prop:"iiifContent",type:"string"},"canvas-id":{prop:"defaultCanvasId",type:"string"},"manifest-id":{prop:"defaultManifestId",type:"string"},language:{prop:"language",type:"string"},"high-contrast":{prop:"highContrast",type:"boolean"},"search-query":{prop:"searchQuery",type:"string"},annotations:{prop:"annotations",type:"data"},"heading-level":{prop:"headingLevel",type:"number",min:2},items:{prop:"items",type:["slider","list","grid","masonry","false"]},"single-item":{prop:"singleItem",type:"boolean"},header:{prop:"header",type:"boolean"},panel:{prop:"panel",type:"boolean"},download:{prop:"download",type:"boolean"},languages:{prop:"languages",type:"boolean"},"panel-open":{prop:"defaultPanelOpen",type:"boolean"},"panel-layout":{prop:"panelLayout",type:["accordion","tabs"]},"panel-sections":{prop:"panelSections",type:"data"},"panel-labels":{prop:"panelLabels",type:"data"},"sidebar-open":{prop:"defaultSidebarOpen",type:"boolean"},"storage-key":{prop:"storageKey",type:"string"},fill:{prop:"fill",type:"boolean"},"collapse-controls":{prop:"collapseControls",type:["auto","always"]},size:{prop:"size",type:"string"},height:{prop:"height",type:"string"},gap:{prop:"gap",type:"string"},secondary:{prop:"secondary",type:["summary","navDate","none"]},summary:{prop:"summary",type:"boolean"},"lightbox-items":{prop:"lightboxItems",type:["slider","pager"]}},properties:["iiifContent","annotations","request","renderers","canvasOptions"],events:{"clover-canvas-change":{prop:"onCanvasChange",detail:["canvasId"]},"clover-manifest-change":{prop:"onManifestChange",detail:["manifestId"]},"clover-status-change":{prop:"onStatusChange",detail:["status","error"]},"clover-content-state-change":{prop:"onContentStateChange",detail:"first"}}};sv(zv.mapWorkerUrl);ql(Hv,()=>Promise.resolve(Fv));export{lu as $,R as A,lm as B,ne as C,ov as D,dl as E,vo as F,rv as G,dv as H,of as I,Cv as J,cv as K,nn as L,ou as M,rt as N,Kh as O,jm as P,ty as Q,Zd as R,Vm as S,vt as T,jh as U,wt as V,mt as W,la as X,ue as Y,zt as Z,Dt as _,de as a,yc as a$,Wg as a0,Ld as a1,oy as a2,Xr as a3,Gc as a4,Xc as a5,En as a6,Yc as a7,nd as a8,_t as a9,ae as aA,wf as aB,ch as aC,dc as aD,ic as aE,ih as aF,ah as aG,kf as aH,Ec as aI,Sd as aJ,is as aK,Xh as aL,Ui as aM,cf as aN,mc as aO,Gt as aP,pf as aQ,sh as aR,xf as aS,Fe as aT,Yd as aU,uh as aV,Sn as aW,lf as aX,nf as aY,uf as aZ,df as a_,vs as aa,lt as ab,At as ac,nc as ad,bd as ae,We as af,Pt as ag,Eo as ah,Mt as ai,Um as aj,re as ak,Wm as al,wo as am,qr as an,Kr as ao,Pn as ap,up as aq,Gi as ar,Zi as as,Rc as at,fs as au,Zh as av,Xi as aw,Yr as ax,xo as ay,H as az,Eu as b,Xu as b$,hf as b0,ff as b1,ed as b2,tg as b3,eg as b4,Hh as b5,ye as b6,Pg as b7,Qv as b8,Xv as b9,Pc as bA,Wf as bB,Ja as bC,an as bD,Jr as bE,ps as bF,xd as bG,Yv as bH,jf as bI,Pe as bJ,sr as bK,ns as bL,Rn as bM,fm as bN,hm as bO,Zr as bP,lp as bQ,Ln as bR,iy as bS,Wc as bT,te as bU,id as bV,Hf as bW,Jc as bX,rf as bY,Nd as bZ,hd as b_,jv as ba,Ya as bb,sy as bc,De as bd,Sc as be,eh as bf,rl as bg,qa as bh,ry as bi,vd as bj,ts as bk,Vv as bl,Qo as bm,ls as bn,dg as bo,_o as bp,Qe as bq,Dh as br,tc as bs,Co as bt,un as bu,cc as bv,uv as bw,il as bx,Ti as by,ud as bz,Ac as c,rh as c0,Ga as c1,op as c2,ld as c3,cn as c4,An as c5,Ir as c6,Gf as c7,hc as c8,qv as c9,Kv as ca,Zv as cb,rp as cc,Gp as cd,Vi as ce,Yh as cf,Jh as cg,Jv as ch,le as ci,oe as cj,eo as ck,Gm as cl,Qc as cm,Gv as cn,cs as co,pm as cp,pc as cq,Dl as cr,vm as cs,qh as d,z as e,fe as f,ey as g,ny as h,Mv as i,bv as j,kt as k,vv as l,Sv as m,mu as n,hv as o,Ue as p,ut as q,ms as r,gm as s,qc as t,f as u,ze as v,nl as w,ie as x,D as y,ol as z};