@nulib/clover 4.4.1 → 4.5.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.
- package/README.md +4 -3
- package/dist/components/Annotations/Annotations.mjs +11 -5
- package/dist/components/Body/Caption.mjs +1 -1
- package/dist/components/Canvas/AnnotationMenu.mjs +16 -2
- package/dist/components/Canvas/AnnotationState.mjs +27 -23
- package/dist/components/Canvas/ControlMenu.mjs +9 -0
- package/dist/components/Canvas/PlaceBox.mjs +8 -0
- package/dist/components/Canvas/media/Transport.mjs +32 -18
- package/dist/components/Items/CountMenu.mjs +13 -1
- package/dist/components/Items/Items.mjs +24 -7
- package/dist/components/Items/PagerLayout.mjs +1 -0
- package/dist/components/Map/MapView.mjs +31 -19
- package/dist/components/Panel/About.mjs +16 -5
- package/dist/components/Panel/AboutActions.mjs +10 -16
- package/dist/components/Panel/LanguageToggle.mjs +69 -0
- package/dist/components/Panel/Panel.mjs +9 -1
- package/dist/components/Panel/ReadingLanguages.mjs +2 -16
- package/dist/components/Panel/sections.mjs +6 -1
- package/dist/components/Root/useRootState.mjs +43 -4
- package/dist/components/Search/Search.mjs +10 -7
- package/dist/components/Transcript/Transcript.mjs +42 -33
- package/dist/core/image-service-content.mjs +108 -0
- package/dist/core/load.mjs +38 -1
- package/dist/core/value.mjs +1 -1
- package/dist/i18n/config.mjs +88 -14
- package/dist/i18n/direction.mjs +2 -2
- package/dist/i18n/languages.mjs +42 -8
- package/dist/i18n/locales/index.mjs +4 -1
- package/dist/i18n/locales/ja.json.mjs +5 -0
- package/dist/i18n/locales/zh-Hans.json.mjs +5 -0
- package/dist/i18n/locales/zh-Hant.json.mjs +5 -0
- package/dist/index.d.mts +109 -24
- package/dist/lib/renderer/CanvasRenderer.mjs +20 -5
- package/dist/map/index.d.mts +3 -2
- package/dist/react/readingLanguages.mjs +15 -2
- package/dist/styles/core.css +1 -1
- package/dist/styles/default.css +1 -1
- package/dist/styles/items.css +1 -1
- package/dist/styles/map.css +1 -1
- package/dist/styles/media.css +1 -1
- package/dist/styles/panel.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/templates/default/Default.mjs +3 -0
- package/dist/templates/document/Document.mjs +6 -1
- package/dist/templates/gallery/Gallery.mjs +2 -0
- package/dist/templates/index.d.mts +56 -11
- package/dist/templates/shared/LightboxView.mjs +3 -0
- package/dist/templates/shared/useDrawer.mjs +14 -2
- package/dist/ui/ErrorBoundary.mjs +19 -5
- package/dist/ui/FieldPill.mjs +2 -0
- package/dist/ui/GlobeGlyph.mjs +26 -0
- package/dist/ui/LanguageChoice.mjs +87 -20
- package/dist/ui/LanguageMenu.mjs +94 -0
- package/dist/ui/Sections.mjs +18 -5
- package/dist/ui/Tip.mjs +4 -2
- package/dist/ui/sheets/map.mjs +1 -1
- package/dist/ui/sheets/media.mjs +1 -1
- package/dist/ui/useScrollTrack.mjs +34 -19
- package/dist/web-components/About-BklM8JA9.mjs +1 -0
- package/dist/web-components/AnnotationItems-4mbvOrhN.mjs +1 -0
- package/dist/web-components/AnnotationMenu-DtMaxXf5.mjs +1 -0
- package/dist/web-components/AnnotationState-BuEpq99k.mjs +1 -0
- package/dist/web-components/Annotations-Dyg-RAdd.mjs +2 -0
- package/dist/web-components/{Annotations-oXpa3fvs.mjs → Annotations-oPabBO7j.mjs} +1 -1
- package/dist/web-components/{Body-BNLhtQi3.mjs → Body-CD7AtOPv.mjs} +1 -1
- package/dist/web-components/{BodyAlert-B0AblEtp.mjs → BodyAlert-DzW4__bK.mjs} +1 -1
- package/dist/web-components/{Button-0dU8Owcz.mjs → Button-1To2Pwuz.mjs} +1 -1
- package/dist/web-components/{Camera-BS8iIH74.mjs → Camera-B82ZMekU.mjs} +1 -1
- package/dist/web-components/{Canvas2DBackend-U4BLi8EN.mjs → Canvas2DBackend-Ds-qoQ0W.mjs} +1 -1
- package/dist/web-components/CanvasView-B4fnYim4.mjs +2 -0
- package/dist/web-components/{CaptionDetails-CtRzBSwh.mjs → CaptionDetails-TTAEPH02.mjs} +1 -1
- package/dist/web-components/{ChaptersMenu-DJRfJSwC.mjs → ChaptersMenu-DhbAktrS.mjs} +1 -1
- package/dist/web-components/{Chevron-BJFhP5wm.mjs → Chevron-Br3zRRMX.mjs} +1 -1
- package/dist/web-components/{ChoiceMenu-Cfjnk3NG.mjs → ChoiceMenu-B4_doj7b.mjs} +1 -1
- package/dist/web-components/{Collection-C2ji8AVd.mjs → Collection-DrMfq53r.mjs} +1 -1
- package/dist/web-components/{CollectionSelect-CSTSqjG3.mjs → CollectionSelect-PP7IEcwu.mjs} +1 -1
- package/dist/web-components/{Connected-B42WdjMx.mjs → Connected-BOPNEv3j.mjs} +1 -1
- package/dist/web-components/{Connected-D2y_qBDh.mjs → Connected-BguZSgy4.mjs} +1 -1
- package/dist/web-components/{Connected-C-Ars8eC.mjs → Connected-CN94wOYw.mjs} +1 -1
- package/dist/web-components/{Contents-BLbU9Qvc.mjs → Contents-Dn7MutL9.mjs} +1 -1
- package/dist/web-components/ControlMenu-DlP3JsqV.mjs +1 -0
- package/dist/web-components/ControlsFade-Cuh5Mqe7.mjs +1 -0
- package/dist/web-components/CountMenu-Aoott7Hu.mjs +1 -0
- package/dist/web-components/Cue-BAj92VWz.mjs +1 -0
- package/dist/web-components/Document-BjTWX_7P.mjs +1 -0
- package/dist/web-components/{DomLayers-DDRNVemT.mjs → DomLayers-GnBlZ7yI.mjs} +1 -1
- package/dist/web-components/{Download-VPFf23Kw.mjs → Download-C1RNBLdn.mjs} +1 -1
- package/dist/web-components/{EntryBodies-CKgmBQCk.mjs → EntryBodies-BG4F8uub.mjs} +1 -1
- package/dist/web-components/{EntryThumbnail-CgukpUtr.mjs → EntryThumbnail-BJPQwkQw.mjs} +1 -1
- package/dist/web-components/FieldPill-CgMPW9BB.mjs +1 -0
- package/dist/web-components/{FrameAnimation-C2EFrQl0.mjs → FrameAnimation-DWd0yBuN.mjs} +1 -1
- package/dist/web-components/Gallery-DpJqgaft.mjs +1 -0
- package/dist/web-components/GlobeGlyph-CLM28n1E.mjs +1 -0
- package/dist/web-components/{HideToggle-HVrk9D6t.mjs → HideToggle-C4mW4-CK.mjs} +1 -1
- package/dist/web-components/{ImageControls-BsGWsB_S.mjs → ImageControls-B36Hng03.mjs} +1 -1
- package/dist/web-components/Items-BApzELFW.mjs +1 -0
- package/dist/web-components/Label-CRTQApU-.mjs +1 -0
- package/dist/web-components/LanguageChoice-B1941Wuu.mjs +1 -0
- package/dist/web-components/LanguageMenu-yWDzK3U0.mjs +1 -0
- package/dist/web-components/LightboxView-BLHI5EIj.mjs +1 -0
- package/dist/web-components/{ListEnd-BPSaqeEg.mjs → ListEnd-CIiLZZzc.mjs} +1 -1
- package/dist/web-components/{Loaded-vg9q9y73.mjs → Loaded-X_Pr53fq.mjs} +1 -1
- package/dist/web-components/{LoadedCanvas-BtNg_QnI.mjs → LoadedCanvas-1Bi6-QtF.mjs} +1 -1
- package/dist/web-components/LoadedMap-58bpxj_6.mjs +1 -0
- package/dist/web-components/{Loading-DnCFXiNy.mjs → Loading-CyoVEwax.mjs} +1 -1
- package/dist/web-components/{Map-CIGzy4XB.mjs → Map-2oeDIJzq.mjs} +1 -1
- package/dist/web-components/MapView-DX3ZLqmp.mjs +3 -0
- package/dist/web-components/{Markup-Csh1bNkq.mjs → Markup-B2GbrisO.mjs} +1 -1
- package/dist/web-components/{MediaBody-CRJFBpMk.mjs → MediaBody-DZ9JgkKF.mjs} +1 -1
- package/dist/web-components/{MediaBody-CeEWPIDp.mjs → MediaBody-eFAZIyGv.mjs} +1 -1
- package/dist/web-components/{NavDate-qoFXy3Ou.mjs → NavDate-BwV4kPl-.mjs} +1 -1
- package/dist/web-components/{Navigator-9n2yLQdc.mjs → Navigator-CTrfNuwj.mjs} +1 -1
- package/dist/web-components/{Pager-4rZjWBna.mjs → Pager-BGjj90LQ.mjs} +1 -1
- package/dist/web-components/PagerLayout-Ce7zW_yB.mjs +1 -0
- package/dist/web-components/Panel-77xi6y2C.mjs +1 -0
- package/dist/web-components/PanelPart-Cm9VykIu.mjs +1 -0
- package/dist/web-components/{PanelToggle-0K2YTp6k.mjs → PanelToggle-Cj_FjIgS.mjs} +1 -1
- package/dist/web-components/{PartOfManifest-ZUGZW86B.mjs → PartOfManifest-B0RwR4iy.mjs} +1 -1
- package/dist/web-components/{Pending-lpHOVvqE.mjs → Pending-s7yYnZzR.mjs} +1 -1
- package/dist/web-components/PlaceBox-pt7Vmrs1.mjs +1 -0
- package/dist/web-components/{Placeholder-ChFeaw7a.mjs → Placeholder-BK-eqSCl.mjs} +1 -1
- package/dist/web-components/{Position-C2Hm7tJZ.mjs → Position-CKsSKMgZ.mjs} +1 -1
- package/dist/web-components/Primitives-T7usOLie.mjs +1 -0
- package/dist/web-components/Provider-B2k1G-E0.mjs +1 -0
- package/dist/web-components/{ReadMore-DsthjUIZ.mjs → ReadMore-Cs2t9xkI.mjs} +1 -1
- package/dist/web-components/Root-D942bSXu.mjs +1 -0
- package/dist/web-components/Scene-Cwzisn4E.mjs +1 -0
- package/dist/web-components/SceneView-_CNm8cGL.mjs +1 -0
- package/dist/web-components/Search-u43mfzT8.mjs +1 -0
- package/dist/web-components/Sections-CPU5bGvk.mjs +2 -0
- package/dist/web-components/{SeekMarks-DNHLgUaX.mjs → SeekMarks-CnqVS-ym.mjs} +1 -1
- package/dist/web-components/StandaloneItems-D9Og9pdI.mjs +1 -0
- package/dist/web-components/{Status-DLZANUzF.mjs → Status-Cxev3WuC.mjs} +1 -1
- package/dist/web-components/{Steps-BigQvWNW.mjs → Steps-l7_NsIBr.mjs} +1 -1
- package/dist/web-components/{TargetItems-DzNzoEeh.mjs → TargetItems-nP3Oa9hh.mjs} +1 -1
- package/dist/web-components/Timeline-C1g1MXp5.mjs +1 -0
- package/dist/web-components/{Tip-CoSRaKjm.mjs → Tip-D2pR3HW4.mjs} +1 -1
- package/dist/web-components/Transcript-D_a9jio-.mjs +1 -0
- package/dist/web-components/Transport-CowDRPK7.mjs +1 -0
- package/dist/web-components/Transport-uqpqUIKE.mjs +1 -0
- package/dist/web-components/{annotation-collection-DwJ2R8tG.mjs → annotation-collection-d6JyHnML.mjs} +1 -1
- package/dist/web-components/{annotation-name-2rUtUYsN.mjs → annotation-name-BWTrB9nK.mjs} +1 -1
- package/dist/web-components/{annotations-content-fTNYRgN_.mjs → annotations-content-Bomfao_5.mjs} +1 -1
- package/dist/web-components/{body-qFClz6nF.mjs → body-Dfn0GJa2.mjs} +1 -1
- package/dist/web-components/{canvas-DqmG6v1g.mjs → canvas-DHIn2DIV.mjs} +1 -1
- package/dist/web-components/{cloverEngine-BBfVDNbE.mjs → cloverEngine-DDVOcZTv.mjs} +1 -1
- package/dist/web-components/{content-state-reader-DYXL5lFa.mjs → content-state-reader-CyNkhTZY.mjs} +1 -1
- package/dist/web-components/{controlGlyphs-DqZmaT9n.mjs → controlGlyphs-Dymy1PkA.mjs} +1 -1
- package/dist/web-components/{controls-BvC6zo32.mjs → controls-CIkf2UoE.mjs} +1 -1
- package/dist/web-components/custom-elements.json +35 -3
- package/dist/web-components/downloads-DCsDCcA8.mjs +1 -0
- package/dist/web-components/{dragToClose-wFiErDub.mjs → dragToClose-BKcu5guw.mjs} +1 -1
- package/dist/web-components/{engine-B0W3FXuQ.mjs → engine-BhdQsvOB.mjs} +1 -1
- package/dist/web-components/{engines-DVRUnyFv.mjs → engines-pnfVMoUH.mjs} +1 -1
- package/dist/web-components/{fetchManifest-f8gYlPDK.mjs → fetchManifest-QmVIeaHo.mjs} +1 -1
- package/dist/web-components/{fromManifest-BmpOsc5g.mjs → fromManifest-CvXwGGRI.mjs} +1 -1
- package/dist/web-components/{glyphs-oAgi4Au0.mjs → glyphs-BAh9Lia0.mjs} +1 -1
- package/dist/web-components/hooks-CTqjdpYl.mjs +1 -0
- package/dist/web-components/{image-layers-CndzdWOW.mjs → image-layers-Dp2qOSA5.mjs} +1 -1
- package/dist/web-components/image-service-content-B5ICMeIO.mjs +1 -0
- package/dist/web-components/{imageService-DTp1mc0F.mjs → imageService-XKWMYAcG.mjs} +1 -1
- package/dist/web-components/index-BuoWCrun.mjs +1 -0
- package/dist/web-components/index.mjs +1 -1
- package/dist/web-components/items-8ZEJCxWU.mjs +1 -0
- package/dist/web-components/items-DjpIYUxD.mjs +1 -0
- package/dist/web-components/ja-Cg1enUhM.mjs +1 -0
- package/dist/web-components/label-BWHRHAY2.mjs +1 -0
- package/dist/web-components/layout-B3HyDCsP.mjs +1 -0
- package/dist/web-components/{link-CEfxl5hU.mjs → link-Mnt5GrKM.mjs} +1 -1
- package/dist/web-components/logo-YR9jXUE4.mjs +1 -0
- package/dist/web-components/{models-B-kri8Ov.mjs → models-NfaX6B8u.mjs} +1 -1
- package/dist/web-components/{nodes-BKoxD-el.mjs → nodes-CRrc5Svn.mjs} +1 -1
- package/dist/web-components/{overlayImage-Dp8CjA_L.mjs → overlayImage-D7Knsh4X.mjs} +1 -1
- package/dist/web-components/{panel-ldBDfuIV.mjs → panel-DUMFdAc8.mjs} +1 -1
- package/dist/web-components/part-C_V28rvN.mjs +1 -0
- package/dist/web-components/{playerSurface-CLWTmyt1.mjs → playerSurface-CF5g-4Po.mjs} +1 -1
- package/dist/web-components/pointer-PJLHbbSD.mjs +1 -0
- package/dist/web-components/{provider-D24Pm3a1.mjs → provider-b4id5kCa.mjs} +1 -1
- package/dist/web-components/{range-regions-9vY5ikPm.mjs → range-regions-DCY76ydS.mjs} +1 -1
- package/dist/web-components/{read-more-CoOeWZOF.mjs → read-more-UM90-AEc.mjs} +1 -1
- package/dist/web-components/readingLanguages-Qdn21-7Q.mjs +1 -0
- package/dist/web-components/rendererSurface-PZlq-wa_.mjs +22 -0
- package/dist/web-components/{renderers-BXcv_AqV.mjs → renderers-DIHonXTq.mjs} +1 -1
- package/dist/web-components/resource-BlU2Ese6.mjs +1 -0
- package/dist/web-components/{save-file-Dj3MRR7Y.mjs → save-file-GI0ekTmd.mjs} +1 -1
- package/dist/web-components/{search-C9OyY1qk.mjs → search-CHjjiXkB.mjs} +1 -1
- package/dist/web-components/shared-DgJ0bXca.mjs +1 -0
- package/dist/web-components/{show-link-4mlfdoeo.mjs → show-link-BlLkTYtm.mjs} +1 -1
- package/dist/web-components/{sizedImage-COfCkv_8.mjs → sizedImage-BoGT1x5n.mjs} +1 -1
- package/dist/web-components/{split-Ci426kxC.mjs → split-OO6-WiG3.mjs} +1 -1
- package/dist/web-components/{status-CzasXLV8.mjs → status-CSenPCO4.mjs} +1 -1
- package/dist/web-components/styles-Bvw9LFU7.mjs +1 -0
- package/dist/web-components/three.mjs +1 -1
- package/dist/web-components/{thumbnail-ByuoouMG.mjs → thumbnail-DYJHCrW_.mjs} +1 -1
- package/dist/web-components/{tip-CQEGLOst.mjs → tip-Dr1mfd4o.mjs} +1 -1
- package/dist/web-components/{toggle-Dro_EmUU.mjs → toggle-86lqpaU9.mjs} +1 -1
- package/dist/web-components/{useContainerName-CUP-TlA5.mjs → useContainerName-BfNL6p3O.mjs} +1 -1
- package/dist/web-components/{useControlsVisibility-DeI3NHWp.mjs → useControlsVisibility-C3LCnrb7.mjs} +1 -1
- package/dist/web-components/useNearViewport-Dk5q1rzk.mjs +1 -0
- package/dist/web-components/useScrollTrack-B_yYmQDS.mjs +1 -0
- package/dist/web-components/viewer/{AnnotationItems-ByWBkMRd.mjs → AnnotationItems-BbPnS9EE.mjs} +1 -1
- package/dist/web-components/viewer/AnnotationMenu-BGv-HimF.mjs +1 -0
- package/dist/web-components/viewer/AnnotationState-uRm7bEwg.mjs +1 -0
- package/dist/web-components/viewer/{Annotations-CJRF_IwO.mjs → Annotations-_2PMmUfu.mjs} +1 -1
- package/dist/web-components/viewer/Annotations-reaO1ILe.mjs +2 -0
- package/dist/web-components/viewer/{Canvas2DBackend-DPDF0a8D.mjs → Canvas2DBackend-Dru1ImJh.mjs} +1 -1
- package/dist/web-components/viewer/CaptionDetails-3OlEaKmX.mjs +1 -0
- package/dist/web-components/viewer/{ChaptersMenu-D7b9t6bm.mjs → ChaptersMenu-kchuXDZy.mjs} +1 -1
- package/dist/web-components/viewer/{ChoiceMenu-f2774ZaY.mjs → ChoiceMenu-C8pEoSC6.mjs} +1 -1
- package/dist/web-components/viewer/{Collection-D1E6A8es.mjs → Collection-B4LN_80C.mjs} +1 -1
- package/dist/web-components/viewer/{Connected-BLeqNIOf.mjs → Connected-80hCJuhg.mjs} +1 -1
- package/dist/web-components/viewer/{Connected-DfqFYcTn.mjs → Connected-CzPY2rgu.mjs} +1 -1
- package/dist/web-components/viewer/{Contents-DvmP8OGy.mjs → Contents-D4jw_lGe.mjs} +1 -1
- package/dist/web-components/viewer/ControlMenu-C3Jh10iR.mjs +1 -0
- package/dist/web-components/viewer/ControlsFade-BKkJ95B5.mjs +1 -0
- package/dist/web-components/viewer/CountMenu-Blz1oHgs.mjs +1 -0
- package/dist/web-components/viewer/Cue-BnC9XuZp.mjs +1 -0
- package/dist/web-components/viewer/Document-BG0F97nL.mjs +1 -0
- package/dist/web-components/viewer/{DomLayers-CD56oMcR.mjs → DomLayers-BL6vNcmI.mjs} +1 -1
- package/dist/web-components/viewer/{Download-DAOzY3Nu.mjs → Download-B0BD_SzR.mjs} +1 -1
- package/dist/web-components/viewer/{EntryBodies-0A0uyEwC.mjs → EntryBodies-Cbmr-Eg4.mjs} +1 -1
- package/dist/web-components/viewer/{EntryThumbnail-fBaBZJGd.mjs → EntryThumbnail-DAdEyIuL.mjs} +1 -1
- package/dist/web-components/viewer/FieldPill-DNL96sDW.mjs +1 -0
- package/dist/web-components/viewer/{FrameAnimation-kba5V4Vk.mjs → FrameAnimation-BO3QVSUw.mjs} +1 -1
- package/dist/web-components/viewer/Gallery-DN7ajF4i.mjs +1 -0
- package/dist/web-components/viewer/GlobeGlyph-B-Wd0AkW.mjs +1 -0
- package/dist/web-components/viewer/{HideToggle-D8c_7URN.mjs → HideToggle-DH0u1wFC.mjs} +1 -1
- package/dist/web-components/viewer/{ImageControls-C_C0LSj7.mjs → ImageControls-Lz-ESk1X.mjs} +1 -1
- package/dist/web-components/viewer/LanguageChoice-BkQkSsPE.mjs +1 -0
- package/dist/web-components/viewer/LanguageMenu-gIJHQiBc.mjs +1 -0
- package/dist/web-components/viewer/LightboxView-D066VR5m.mjs +1 -0
- package/dist/web-components/viewer/{ListEnd-B2hnHrcl.mjs → ListEnd-D4nNouKZ.mjs} +1 -1
- package/dist/web-components/viewer/{MapView-Cr3RiB1K.mjs → MapView-C_8iciAK.mjs} +3 -3
- package/dist/web-components/viewer/{MediaBody-4ZFKNnr3.mjs → MediaBody-BgBDbfHg.mjs} +1 -1
- package/dist/web-components/viewer/{MediaBody-xjpo27Vw.mjs → MediaBody-D4hiLqhm.mjs} +1 -1
- package/dist/web-components/viewer/{NavDate-Dz5eW2XY.mjs → NavDate-BMVT6UwB.mjs} +1 -1
- package/dist/web-components/viewer/{Navigator-DNZcaADs.mjs → Navigator-DbBBbDZn.mjs} +1 -1
- package/dist/web-components/viewer/PagerLayout-D771pC5E.mjs +1 -0
- package/dist/web-components/viewer/PanelPart-2H7jd6PS.mjs +1 -0
- package/dist/web-components/viewer/{PartOfManifest-BHpVLJOn.mjs → PartOfManifest-BMaH_tsn.mjs} +1 -1
- package/dist/web-components/viewer/PlaceBox-OytRM9_s.mjs +1 -0
- package/dist/web-components/viewer/{Placeholder-CLITKdu6.mjs → Placeholder-BWuq47Sw.mjs} +1 -1
- package/dist/web-components/viewer/Search-Bmz7mUbA.mjs +1 -0
- package/dist/web-components/viewer/{SeekMarks-B8cuyVgz.mjs → SeekMarks-CAsMUj2N.mjs} +1 -1
- package/dist/web-components/viewer/{StandaloneItems-Cu0aBqAo.mjs → StandaloneItems-BCHhR9sF.mjs} +1 -1
- package/dist/web-components/viewer/{Steps-DqszSHcR.mjs → Steps-BDT2W9QN.mjs} +1 -1
- package/dist/web-components/viewer/{TargetItems-DN8ebfbK.mjs → TargetItems-CkZbD8GE.mjs} +1 -1
- package/dist/web-components/viewer/Transcript-BbFXEJSc.mjs +1 -0
- package/dist/web-components/viewer/Transport-CI5UkA3K.mjs +1 -0
- package/dist/web-components/viewer/Transport-PgBpf33S.mjs +1 -0
- package/dist/web-components/viewer/{annotation-collection-Drwfws4R.mjs → annotation-collection-l4zuf56A.mjs} +1 -1
- package/dist/web-components/viewer/{annotation-name-Bp2GHdpi.mjs → annotation-name-CRl0w7NR.mjs} +1 -1
- package/dist/web-components/viewer/annotations-content-CYjPRTZn.mjs +1 -0
- package/dist/web-components/viewer/{cloverEngine-BmUppb5Y.mjs → cloverEngine-2b_guC4P.mjs} +2 -2
- package/dist/web-components/viewer/{content-state-reader-B9u1vc3t.mjs → content-state-reader-Cm-rvusT.mjs} +1 -1
- package/dist/web-components/viewer/{dragToClose-C9KwbQpA.mjs → dragToClose-DXXIWV62.mjs} +1 -1
- package/dist/web-components/viewer/{fetchManifest-gl9fyg7D.mjs → fetchManifest-DorkDXGC.mjs} +1 -1
- package/dist/web-components/viewer/{host-D3tVEhAD.mjs → host-DscGC2S0.mjs} +1 -1
- package/dist/web-components/viewer/{image-layers-DSehEFmU.mjs → image-layers-CZ9-efD2.mjs} +1 -1
- package/dist/web-components/viewer/image-service-content-C60w8IZm.mjs +1 -0
- package/dist/web-components/viewer/index.mjs +1 -1
- package/dist/web-components/viewer/{link-BYKFtAno.mjs → link-CysSctMX.mjs} +1 -1
- package/dist/web-components/viewer/overlayImage-CwPnVnIi.mjs +1 -0
- package/dist/web-components/viewer/{range-regions-CEM4sQKi.mjs → range-regions-C7ZBtSyb.mjs} +1 -1
- package/dist/web-components/viewer/{renderers-BiDrFLxn.mjs → renderers-D4wJiQYv.mjs} +1 -1
- package/dist/web-components/viewer/{save-file-CzYUFJNg.mjs → save-file-uqsNOVPU.mjs} +1 -1
- package/dist/web-components/viewer/{search-Dr6AQ3Lb.mjs → search-CWuD5EZA.mjs} +1 -1
- package/dist/web-components/viewer/styles-BjjJM8OS.mjs +1 -0
- package/dist/web-components/viewer/{useControlsVisibility-CP5m7oBd.mjs → useControlsVisibility-KTxa_3yJ.mjs} +1 -1
- package/dist/web-components/viewer/viewer-C3d_TgAI.mjs +29 -0
- package/dist/web-components/viewer/{vtt-CDqR3lHn.mjs → vtt-DqtJ20x0.mjs} +1 -1
- package/dist/web-components/viewer-BoyWG64n.mjs +1 -0
- package/dist/web-components/{vtt-DHZRkZ_P.mjs → vtt-BNuRzGap.mjs} +1 -1
- package/dist/web-components/zh-Hans-DnYm6PWu.mjs +1 -0
- package/dist/web-components/zh-Hant-DsxnuLPZ.mjs +1 -0
- package/package.json +1 -1
- package/dist/web-components/About-DgBOPS3N.mjs +0 -1
- package/dist/web-components/AnnotationItems-CBEb7Cew.mjs +0 -1
- package/dist/web-components/AnnotationMenu-DiQyu45i.mjs +0 -1
- package/dist/web-components/AnnotationState-DemGGP7N.mjs +0 -1
- package/dist/web-components/Annotations-CDVyd69_.mjs +0 -2
- package/dist/web-components/CanvasView-DeM04pm-.mjs +0 -2
- package/dist/web-components/ControlMenu-CJtszzgx.mjs +0 -1
- package/dist/web-components/ControlsFade-Pye8AyCz.mjs +0 -1
- package/dist/web-components/CountMenu-3-t8974M.mjs +0 -1
- package/dist/web-components/Cue-eTms5gbr.mjs +0 -1
- package/dist/web-components/Document-CkKoLQ51.mjs +0 -1
- package/dist/web-components/FieldPill-M9u0eLtz.mjs +0 -1
- package/dist/web-components/Gallery-mqXXjGtK.mjs +0 -1
- package/dist/web-components/Items-BoFm0Hlx.mjs +0 -1
- package/dist/web-components/Label-GTBsGDCC.mjs +0 -1
- package/dist/web-components/LanguageChoice-BEiskuVG.mjs +0 -1
- package/dist/web-components/LightboxView-Daz0RCee.mjs +0 -1
- package/dist/web-components/LoadedMap-D9Z3zl12.mjs +0 -1
- package/dist/web-components/MapView-CExlNO5E.mjs +0 -3
- package/dist/web-components/PagerLayout-l6UNSoQ1.mjs +0 -1
- package/dist/web-components/Panel-ikILE92M.mjs +0 -1
- package/dist/web-components/PanelPart-VPAwSoQZ.mjs +0 -1
- package/dist/web-components/PlaceBox-D73C--SU.mjs +0 -1
- package/dist/web-components/Primitives-CBRreXtS.mjs +0 -1
- package/dist/web-components/Provider-HPVBNZPr.mjs +0 -1
- package/dist/web-components/Root-BJwk-F1e.mjs +0 -1
- package/dist/web-components/Scene-DC7ofvsK.mjs +0 -1
- package/dist/web-components/SceneView-C53yZtMZ.mjs +0 -1
- package/dist/web-components/Search-Cd0xLU3y.mjs +0 -1
- package/dist/web-components/Sections-Cf3JDxnz.mjs +0 -2
- package/dist/web-components/StandaloneItems-DEchYe7Y.mjs +0 -1
- package/dist/web-components/Timeline--uq4-_TD.mjs +0 -1
- package/dist/web-components/Transcript-Dex719tP.mjs +0 -1
- package/dist/web-components/Transport-BV0Rg5Ym.mjs +0 -1
- package/dist/web-components/Transport-CHkvmPbN.mjs +0 -1
- package/dist/web-components/downloads-CFz0RnMz.mjs +0 -1
- package/dist/web-components/hooks-uer3ZRx7.mjs +0 -1
- package/dist/web-components/index-BkADsP3U.mjs +0 -1
- package/dist/web-components/items-BWG13qDG.mjs +0 -1
- package/dist/web-components/items-SD92pRMN.mjs +0 -1
- package/dist/web-components/label-Bw9SwLh8.mjs +0 -1
- package/dist/web-components/layout-DrVnUBcm.mjs +0 -1
- package/dist/web-components/logo-Dzr2M4F7.mjs +0 -1
- package/dist/web-components/part-dr-d1XPo.mjs +0 -1
- package/dist/web-components/pointer-IZcH8rZy.mjs +0 -1
- package/dist/web-components/readingLanguages-Bd4MD2DP.mjs +0 -1
- package/dist/web-components/rendererSurface-Ox625xUL.mjs +0 -22
- package/dist/web-components/resource-DmK-8hJ-.mjs +0 -1
- package/dist/web-components/shared-BmkV0s_d.mjs +0 -1
- package/dist/web-components/styles-On1ck1Ob.mjs +0 -1
- package/dist/web-components/useNearViewport-yyUYq47j.mjs +0 -1
- package/dist/web-components/useScrollTrack-CcFLYR4o.mjs +0 -1
- package/dist/web-components/viewer/AnnotationMenu-C-9tbH4G.mjs +0 -1
- package/dist/web-components/viewer/AnnotationState-CV4g-WUB.mjs +0 -1
- package/dist/web-components/viewer/Annotations-t1K8U5Kp.mjs +0 -2
- package/dist/web-components/viewer/CaptionDetails-xzvdqP5N.mjs +0 -1
- package/dist/web-components/viewer/ControlMenu-DIfN3xYJ.mjs +0 -1
- package/dist/web-components/viewer/ControlsFade-sckPhZ4x.mjs +0 -1
- package/dist/web-components/viewer/CountMenu-BQVCtVfu.mjs +0 -1
- package/dist/web-components/viewer/Cue-DQ8q-fgb.mjs +0 -1
- package/dist/web-components/viewer/Document-B-nJpfDh.mjs +0 -1
- package/dist/web-components/viewer/FieldPill-BQcDb4xM.mjs +0 -1
- package/dist/web-components/viewer/Gallery-_0dEBq2w.mjs +0 -1
- package/dist/web-components/viewer/LanguageChoice-0UWQ5V-y.mjs +0 -1
- package/dist/web-components/viewer/LightboxView-Dnlf7m8l.mjs +0 -1
- package/dist/web-components/viewer/PagerLayout-PYWFPFSJ.mjs +0 -1
- package/dist/web-components/viewer/PanelPart-Bd0JqUwF.mjs +0 -1
- package/dist/web-components/viewer/PlaceBox-Bh9V3RLS.mjs +0 -1
- package/dist/web-components/viewer/Search-C0B5Jh9V.mjs +0 -1
- package/dist/web-components/viewer/Transcript-D3mKmdQY.mjs +0 -1
- package/dist/web-components/viewer/Transport-9f_lhebG.mjs +0 -1
- package/dist/web-components/viewer/Transport-BudReE7Y.mjs +0 -1
- package/dist/web-components/viewer/annotations-content-Ci-orrao.mjs +0 -1
- package/dist/web-components/viewer/overlayImage-CdgpMutd.mjs +0 -1
- package/dist/web-components/viewer/styles-DvZTMHkr.mjs +0 -1
- package/dist/web-components/viewer/viewer-DaG51iO3.mjs +0 -29
- package/dist/web-components/viewer-DeAUI9Fi.mjs +0 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
var Yl=Object.defineProperty;var Jl=(t,e,n)=>e in t?Yl(t,e,{enumerable:true,configurable:true,writable:true,value:n}):t[e]=n;var L=(t,e,n)=>Jl(t,typeof e!="symbol"?e+"":e,n);import{s as Ca}from"./styles-BjjJM8OS.mjs";function Ql(t={}){return Promise.resolve().then(()=>sd).then(e=>e.initCloverI18n(t))}const Ea="@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 tu=null,xn=null;const eu=()=>tu??(tu=import("./host-DscGC2S0.mjs").then(t=>xn=t)),nu=t=>t.trim().toLowerCase()==="false";function ou(t,{type:e,min:n},o){if(t===null)return;if(e==="string")return t;if(e==="boolean")return!nu(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 ru=(t,e)=>{const n=Object.keys(t);return n.length===Object.keys(e).length&&n.every(o=>Object.is(t[o],e[o]))};function su(t){class e extends HTMLElement{constructor(){super(...arguments);L(this,"kind",t.kind)}static get observedAttributes(){return Object.keys(t.attributes)}connectedCallback(){Ca(this.ownerDocument).inject("elements",Ea)}}customElements.define(t.tag,e)}function iu(t,e){if(typeof customElements>"u"||customElements.get(t.tag))return;if(t.kind==="config"||!e)return su(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),eu()]));class c extends HTMLElement{constructor(){super(...arguments);L(this,"kind",n);L(this,"needsRoot",!!t.needsRoot);L(this,"values",{});L(this,"kept",{});L(this,"props",{});L(this,"listeners",new Set);L(this,"warned",new Set);L(this,"handlers",Object.fromEntries(r.map(([u,p])=>[p.prop,(...h)=>{var w;if(p.keeps&&(this.kept[p.keeps]=h[0]??null,h[0]==null))return true;const m=p.detail==="first"?h[0]:Object.fromEntries(p.detail.map((S,v)=>[S,h[v]])),g=new CustomEvent(u,{detail:m,bubbles:!p.keeps,composed:!p.keeps,cancelable:!!p.cancelable}),y=this.dispatchEvent(g);if(!y&&p.cancelable){const S=h[h.length-1];(w=S==null?void 0:S.preventDefault)==null||w.call(S)}return y}])));L(this,"getProps",()=>this.props);L(this,"subscribe",u=>(this.listeners.add(u),()=>{this.listeners.delete(u)}))}static get observedAttributes(){return Object.keys(t.attributes)}get element(){return this}get Component(){return s}connectedCallback(){for(const u of o){if(!Object.prototype.hasOwnProperty.call(this,u))continue;const p=this[u];delete this[u],p!=null&&(this.values[u]=p)}this.update(),this.warnOfAria(),Ca(this.ownerDocument).inject("elements",Ea),a().then(()=>{this.isConnected&&xn.hostOf(this.ownerDocument).connect(this)})}disconnectedCallback(){queueMicrotask(()=>{this.isConnected||xn==null||xn.hostOf(this.ownerDocument).disconnect(this)})}attributeChangedCallback(){this.update()}warnOfAria(){if(!t.native)for(const u of["aria-label","aria-labelledby","role"])!this.hasAttribute(u)||this.warned.has(u)||(this.warned.add(u),console.warn(`<${t.tag}>: ${u} names the element, a box no reader is told of; Clover names what it draws itself.`))}update(){const u={...this.handlers,...this.values};for(const[p,h]of Object.entries(t.attributes)){if(h.prop in this.values)continue;const m=this.getAttribute(p),g=ou(m,h,y=>{const w=`${p}=${m}`;this.warned.has(w)||(this.warned.add(w),console.warn(`<${t.tag}>: ${p}="${m}" ${y}; ignored.`))});g!==void 0&&(u[h.prop]=g)}ru(u,this.props)||(this.props=u,this.listeners.forEach(p=>p()))}}L(c,"initCloverI18n",Ql);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(d){d==null?delete this.values[l]:this.values[l]=d,this.update()}});for(const[,l]of r){if(!l.keeps)continue;const d=l.keeps;Object.defineProperty(c.prototype,d,{configurable:true,enumerable:true,get(){return this.kept[d]??null}})}customElements.define(t.tag,c)}var An,it,Ma,ze,ti,Ta,Ia,La,jr,yr,br,Pa,Mn={},Aa=[],au=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,On=Array.isArray;function ce(t,e){for(var n in e)t[n]=e[n];return t}function Vr(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function xe(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?An.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 Cn(t,i,o,r,null)}function Cn(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??++Ma,__i:-1,__u:0};return r==null&&it.vnode!=null&&it.vnode(s),s}function cu(){return{current:null}}function Ct(t){return t.children}function le(t,e){this.props=t,this.context=e}function ln(t,e){if(e==null)return t.__?ln(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"?ln(t):null}function Oa(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 Oa(t)}}function _r(t){(!t.__d&&(t.__d=true)&&ze.push(t)&&!uo.__r++||ti!=it.debounceRendering)&&((ti=it.debounceRendering)||Ta)(uo)}function uo(){for(var t,e,n,o,r,s,i,a=1;ze.length;)ze.length>a&&ze.sort(Ia),t=ze.shift(),a=ze.length,t.__d&&(n=void 0,o=void 0,r=(o=(e=t).__v).__e,s=[],i=[],e.__P&&((n=ce({},o)).__v=o.__v+1,it.vnode&&it.vnode(n),qr(e.__P,n,o,e.__n,e.__P.namespaceURI,32&o.__u?[r]:null,s,r??ln(o),!!(32&o.__u),i),n.__v=o.__v,n.__.__k[n.__i]=n,Ba(s,n,i),o.__e=o.__=null,n.__e!=r&&Oa(n)));uo.__r=0}function Na(t,e,n,o,r,s,i,a,c,l,d){var u,p,h,m,g,y,w,S=o&&o.__k||Aa,v=e.length;for(c=lu(n,e,S,c,v),u=0;u<v;u++)(h=n.__k[u])!=null&&(p=h.__i==-1?Mn:S[h.__i]||Mn,h.__i=u,y=qr(t,h,p,r,s,i,a,c,l,d),m=h.__e,h.ref&&p.ref!=h.ref&&(p.ref&&Kr(p.ref,null,h),d.push(h.ref,h.__c||m,h)),g==null&&m!=null&&(g=m),(w=!!(4&h.__u))||p.__k===h.__k?c=Ra(h,c,t,w):typeof h.type=="function"&&y!==void 0?c=y:m&&(c=m.nextSibling),h.__u&=-7);return n.__e=g,c}function lu(t,e,n,o,r){var s,i,a,c,l,d=n.length,u=d,p=0;for(t.__k=new Array(r),s=0;s<r;s++)(i=e[s])!=null&&typeof i!="boolean"&&typeof i!="function"?(c=s+p,(i=t.__k[s]=typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?Cn(null,i,null,null,null):On(i)?Cn(Ct,{children:i},null,null,null):i.constructor==null&&i.__b>0?Cn(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=uu(i,n,c,u))!=-1&&(u--,(a=n[l])&&(a.__u|=2)),a==null||a.__v==null?(l==-1&&(r>d?p--:r<d&&p++),typeof i.type!="function"&&(i.__u|=4)):l!=c&&(l==c-1?p--:l==c+1?p++:(l>c?p--:p++,i.__u|=4))):t.__k[s]=null;if(u)for(s=0;s<d;s++)(a=n[s])!=null&&!(2&a.__u)&&(a.__e==o&&(o=ln(a)),Fa(a,a));return o}function Ra(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=Ra(r[s],e,n,o));return e}t.__e!=e&&(o&&(e&&t.type&&!e.parentNode&&(e=ln(t)),n.insertBefore(t.__e,e||null)),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function we(t,e){return e=e||[],t==null||typeof t=="boolean"||(On(t)?t.some(function(n){we(n,e)}):e.push(t)),e}function uu(t,e,n,o){var r,s,i,a=t.key,c=t.type,l=e[n],d=l!=null&&(2&l.__u)==0;if(l===null&&t.key==null||d&&a==l.key&&c==l.type)return n;if(o>(d?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 ei(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||au.test(e)?n:n+"px"}function no(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||ei(t.style,e,"");if(n)for(e in n)o&&n[e]==o[e]||ei(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")s=e!=(e=e.replace(La,"$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=jr,t.addEventListener(e,s?br:yr,s)):t.removeEventListener(e,s?br:yr,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 ni(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=jr++;else if(e.t<n.u)return;return n(it.event?it.event(e):e)}}}function qr(t,e,n,o,r,s,i,a,c,l){var d,u,p,h,m,g,y,w,S,v,b,x,k,N,D,j,et,V=e.type;if(e.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),s=[a=e.__e=n.__e]),(d=it.__b)&&d(e);t:if(typeof V=="function")try{if(w=e.props,S="prototype"in V&&V.prototype.render,v=(d=V.contextType)&&o[d.__c],b=d?v?v.props.value:d.__:o,n.__c?y=(u=e.__c=n.__c).__=u.__E:(S?e.__c=u=new V(w,b):(e.__c=u=new le(w,b),u.constructor=V,u.render=fu),v&&v.sub(u),u.props=w,u.state||(u.state={}),u.context=b,u.__n=o,p=u.__d=true,u.__h=[],u._sb=[]),S&&u.__s==null&&(u.__s=u.state),S&&V.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=ce({},u.__s)),ce(u.__s,V.getDerivedStateFromProps(w,u.__s))),h=u.props,m=u.state,u.__v=e,p)S&&V.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),S&&u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(S&&V.getDerivedStateFromProps==null&&w!==h&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(w,b),!u.__e&&u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(w,u.__s,b)===false||e.__v==n.__v){for(e.__v!=n.__v&&(u.props=w,u.state=u.__s,u.__d=false),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(nt){nt&&(nt.__=e)}),x=0;x<u._sb.length;x++)u.__h.push(u._sb[x]);u._sb=[],u.__h.length&&i.push(u);break t}u.componentWillUpdate!=null&&u.componentWillUpdate(w,u.__s,b),S&&u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(h,m,g)})}if(u.context=b,u.props=w,u.__P=t,u.__e=false,k=it.__r,N=0,S){for(u.state=u.__s,u.__d=false,k&&k(e),d=u.render(u.props,u.state,u.context),D=0;D<u._sb.length;D++)u.__h.push(u._sb[D]);u._sb=[]}else do u.__d=false,k&&k(e),d=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++N<25);u.state=u.__s,u.getChildContext!=null&&(o=ce(ce({},o),u.getChildContext())),S&&!p&&u.getSnapshotBeforeUpdate!=null&&(g=u.getSnapshotBeforeUpdate(h,m)),j=d,d!=null&&d.type===Ct&&d.key==null&&(j=$a(d.props.children)),a=Na(t,On(j)?j:[j],e,n,o,r,s,i,a,c,l),u.base=e.__e,e.__u&=-161,u.__h.length&&i.push(u),y&&(u.__E=u.__=null)}catch(nt){if(e.__v=null,c||s!=null)if(nt.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--;)Vr(s[et]);wr(e)}else e.__e=n.__e,e.__k=n.__k,nt.then||wr(e);it.__e(nt,e,n)}else s==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):a=e.__e=du(n.__e,e,n,o,r,s,i,c,l);return(d=it.diffed)&&d(e),128&e.__u?void 0:a}function wr(t){t&&t.__c&&(t.__c.__e=true),t&&t.__k&&t.__k.forEach(wr)}function Ba(t,e,n){for(var o=0;o<n.length;o++)Kr(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 $a(t){return typeof t!="object"||t==null||t.__b&&t.__b>0?t:On(t)?t.map($a):ce({},t)}function du(t,e,n,o,r,s,i,a,c){var l,d,u,p,h,m,g,y=n.props,w=e.props,S=e.type;if(S=="svg"?r="http://www.w3.org/2000/svg":S=="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((h=s[l])&&"setAttribute"in h==!!S&&(S?h.localName==S:h.nodeType==3)){t=h,s[l]=null;break}}if(t==null){if(S==null)return document.createTextNode(w);t=document.createElementNS(r,S,w.is&&w),a&&(it.__m&&it.__m(e,s),a=false),s=null}if(S==null)y===w||a&&t.data==w||(t.data=w);else{if(s=s&&An.call(t.childNodes),y=n.props||Mn,!a&&s!=null)for(y={},l=0;l<t.attributes.length;l++)y[(h=t.attributes[l]).name]=h.value;for(l in y)if(h=y[l],l!="children"){if(l=="dangerouslySetInnerHTML")u=h;else if(!(l in w)){if(l=="value"&&"defaultValue"in w||l=="checked"&&"defaultChecked"in w)continue;no(t,l,null,h,r)}}for(l in w)h=w[l],l=="children"?p=h:l=="dangerouslySetInnerHTML"?d=h:l=="value"?m=h:l=="checked"?g=h:a&&typeof h!="function"||y[l]===h||no(t,l,h,y[l],r);if(d)a||u&&(d.__html==u.__html||d.__html==t.innerHTML)||(t.innerHTML=d.__html),e.__k=[];else if(u&&(t.innerHTML=""),Na(e.type=="template"?t.content:t,On(p)?p:[p],e,n,o,S=="foreignObject"?"http://www.w3.org/1999/xhtml":r,s,i,s?s[0]:n.__k&&ln(n,0),a,c),s!=null)for(l=s.length;l--;)Vr(s[l]);a||(l="value",S=="progress"&&m==null?t.removeAttribute("value"):m!=null&&(m!==t[l]||S=="progress"&&!m||S=="option"&&m!=y[l])&&no(t,l,m,y[l],r),l="checked",g!=null&&g!=t[l]&&no(t,l,g,y[l],r))}return t}function Kr(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 Fa(t,e,n){var o,r;if(it.unmount&&it.unmount(t),(o=t.ref)&&(o.current&&o.current!=t.__e||Kr(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]&&Fa(o[r],e,n||typeof t.type!="function");n||Vr(t.__e),t.__c=t.__=t.__e=void 0}function fu(t,e,n){return this.constructor(t,n)}function Tn(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=[],qr(e,t=(!o&&n||e).__k=xe(Ct,null,[t]),r||Mn,Mn,e.namespaceURI,!o&&n?[n]:r?null:e.firstChild?An.call(e.childNodes):null,s,!o&&n?n:r?r.__e:e.firstChild,o,i),Ba(s,t,i)}function Da(t,e){Tn(t,e,Da)}function hu(t,e,n){var o,r,s,i,a=ce({},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?An.call(arguments,2):n),Cn(t.type,a,o||t.key,r||t.ref,null)}function he(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,_r(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"+Pa++,e.__=t,e.Provider=e.__l=(e.Consumer=function(n,o){return n.children(o)}).contextType=e,e}An=Aa.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}},Ma=0,le.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=ce({},this.state),typeof t=="function"&&(t=t(ce({},n),this.props)),t&&ce(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),_r(this))},le.prototype.forceUpdate=function(t){this.__v&&(this.__e=true,t&&this.__h.push(t),_r(this))},le.prototype.render=Ct,ze=[],Ta=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ia=function(t,e){return t.__v.__b-e.__v.__b},uo.__r=0,La=/(PointerCapture)$|Capture$/i,jr=0,yr=ni(false),br=ni(true),Pa=0;var pu=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:--pu,__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 Ae,kt,Jo,oi,un=0,za=[],Mt=it,ri=Mt.__b,si=Mt.__r,ii=Mt.diffed,ai=Mt.__c,ci=Mt.unmount,li=Mt.__;function fn(t,e){Mt.__h&&Mt.__h(kt,t,un||e),un=0;var n=kt.__H||(kt.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function H(t){return un=1,Zr(Ua,t)}function Zr(t,e,n){var o=fn(Ae++,2);if(o.t=t,!o.__c&&(o.__=[n?n(e):Ua(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=kt,!kt.__f)){var r=function(a,c,l){if(!o.__c.__H)return true;var d=o.__c.__H.__.filter(function(p){return!!p.__c});if(d.every(function(p){return!p.__N}))return!s||s.call(this,a,c,l);var u=o.__c.props!==a;return d.forEach(function(p){if(p.__N){var h=p.__[0];p.__=p.__N,p.__N=void 0,h!==p.__[0]&&(u=true)}}),s&&s.call(this,a,c,l)||u};kt.__f=true;var s=kt.shouldComponentUpdate,i=kt.componentWillUpdate;kt.componentWillUpdate=function(a,c,l){if(this.__e){var d=s;s=void 0,r(a,c,l),s=d}i&&i.call(this,a,c,l)},kt.shouldComponentUpdate=r}return o.__N||o.__}function F(t,e){var n=fn(Ae++,3);!Mt.__s&&Xr(n.__H,e)&&(n.__=t,n.u=e,kt.__H.__h.push(n))}function Ut(t,e){var n=fn(Ae++,4);!Mt.__s&&Xr(n.__H,e)&&(n.__=t,n.u=e,kt.__h.push(n))}function R(t){return un=5,bt(function(){return{current:t}},[])}function Ha(t,e,n){un=6,Ut(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 bt(t,e){var n=fn(Ae++,7);return Xr(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function ut(t,e){return un=8,bt(function(){return t},e)}function jt(t){var e=kt.context[t.__c],n=fn(Ae++,9);return n.c=t,e?(n.__==null&&(n.__=true,e.sub(kt)),e.props.value):t.__}function Wa(t,e){Mt.useDebugValue&&Mt.useDebugValue(e?e(t):t)}function Gr(){var t=fn(Ae++,11);if(!t.__){for(var e=kt.__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 mu(){for(var t;t=za.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(ao),t.__H.__h.forEach(xr),t.__H.__h=[]}catch(e){t.__H.__h=[],Mt.__e(e,t.__v)}}Mt.__b=function(t){kt=null,ri&&ri(t)},Mt.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),li&&li(t,e)},Mt.__r=function(t){si&&si(t),Ae=0;var e=(kt=t.__c).__H;e&&(Jo===kt?(e.__h=[],kt.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.forEach(ao),e.__h.forEach(xr),e.__h=[],Ae=0)),Jo=kt},Mt.diffed=function(t){ii&&ii(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(za.push(e)!==1&&oi===Mt.requestAnimationFrame||((oi=Mt.requestAnimationFrame)||gu)(mu)),e.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Jo=kt=null},Mt.__c=function(t,e){e.some(function(n){try{n.__h.forEach(ao),n.__h=n.__h.filter(function(o){return!o.__||xr(o)})}catch(o){e.some(function(r){r.__h&&(r.__h=[])}),e=[],Mt.__e(o,n.__v)}}),ai&&ai(t,e)},Mt.unmount=function(t){ci&&ci(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(o){try{ao(o)}catch(r){e=r}}),n.__H=void 0,e&&Mt.__e(e,n.__v))};var ui=typeof requestAnimationFrame=="function";function gu(t){var e,n=function(){clearTimeout(o),ui&&cancelAnimationFrame(e),setTimeout(t)},o=setTimeout(n,35);ui&&(e=requestAnimationFrame(n))}function ao(t){var e=kt,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),kt=e}function xr(t){var e=kt;t.__c=t.__(),kt=e}function Xr(t,e){return!t||t.length!==e.length||e.some(function(n,o){return n!==t[o]})}function Ua(t,e){return typeof e=="function"?e(t):e}function ja(t,e){for(var n in e)t[n]=e[n];return t}function Sr(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 ee(t,e){var n=e(),o=H({t:{__:n,u:e}}),r=o[0].t,s=o[1];return Ut(function(){r.__=n,r.u=e,Qo(r)&&s({t:r})},[t,n,e]),F(function(){return Qo(r)&&s({t:r}),t(function(){Qo(r)&&s({t:r})})},[t]),n}function Qo(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 Va(t){t()}function qa(t){return t}function Ka(){return[false,Va]}var Za=Ut;function kr(t,e){this.props=t,this.context=e}function vu(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:Sr(this.props,r)}function o(r){return this.shouldComponentUpdate=n,xe(t,r)}return o.displayName="Memo("+(t.displayName||t.name)+")",o.prototype.isReactComponent=true,o.__f=true,o.type=t,o}(kr.prototype=new le).isPureReactComponent=true,kr.prototype.shouldComponentUpdate=function(t,e){return Sr(this.props,t)||Sr(this.state,e)};var di=it.__b;it.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),di&&di(t)};var yu=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ie(t){function e(n){var o=ja({},n);return delete o.ref,t(o,n.ref||null)}return e.$$typeof=yu,e.render=t,e.prototype.isReactComponent=e.__f=true,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var fi=function(t,e){return t==null?null:we(we(t).map(e))},bu={map:fi,forEach:fi,count:function(t){return t?we(t).length:0},only:function(t){var e=we(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:we},_u=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)}_u(t,e,n,o)};var hi=it.unmount;function Ga(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=ja({},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 Ga(o,e,n)})),t}function Xa(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(o){return Xa(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 St(){this.__u=0,this.o=null,this.__b=null}function Ya(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function vt(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 xe(n,s)}return r.displayName="Lazy",r.__f=true,r}function Sn(){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),hi&&hi(t)},(St.prototype=new le).__c=function(t,e){var n=e.__c,o=this;o.o==null&&(o.o=[]),o.o.push(n);var r=Ya(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]=Xa(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)},St.prototype.componentWillUnmount=function(){this.o=[]},St.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]=Ga(this.__b,n,o.__O=o.__P)}this.__b=null}var r=e.__a&&xe(Ct,null,t.fallback);return r&&(r.__u&=-33),[xe(Ct,null,e.__a?null:t.children),r]};var pi=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 wu(t){return this.getChildContext=function(){return t.context},t.children}function xu(t){var e=this,n=t.h;if(e.componentWillUnmount=function(){Tn(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)}}}Tn(xe(wu,{context:e.context},t.__v),e.v)}function Su(t,e){var n=xe(xu,{__v:t,h:e});return n.containerInfo=e,n}(Sn.prototype=new le).__a=function(t){var e=this,n=Ya(e.__v),o=e.l.get(t);return o[0]++,function(r){var s=function(){e.props.revealOrder?(o.push(r),pi(e,t,o)):r()};n?n(s):s()}},Sn.prototype.render=function(t){this.i=null,this.l=new Map;var e=we(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},Sn.prototype.componentDidUpdate=Sn.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){pi(t,n,e)})};var Ja=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,ku=/^(?: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]/,Cu=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Eu=/[A-Z0-9]/g,Mu=typeof document<"u",Tu=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function Iu(t,e,n){return e.__k==null&&(e.textContent=""),Tn(t,e),typeof n=="function"&&n(),t?t.__c:null}function Lu(t,e,n){return Da(t,e),typeof n=="function"&&n(),t?t.__c:null}le.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(le.prototype,t,{configurable:true,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:true,writable:true,value:e})}})});var mi=it.event;function Pu(){}function Au(){return this.cancelBubble}function Ou(){return this.defaultPrevented}it.event=function(t){return mi&&(t=mi(t)),t.persist=Pu,t.isPropagationStopped=Au,t.isDefaultPrevented=Ou,t.nativeEvent=t};var Yr,Nu={enumerable:false,configurable:true,get:function(){return this.class}},gi=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||Mu&&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"||Tu(n.type)?c==="onfocus"?i="onfocusin":c==="onblur"?i="onfocusout":Cu.test(i)&&(i=c):c=i="oninput":s&&ku.test(i)?i=i.replace(Eu,"-$&").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=we(n.children).forEach(function(l){l.props.selected=r.value.indexOf(l.props.value)!=-1})),o=="select"&&r.defaultValue!=null&&(r.value=we(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",Nu)):(n.className&&!n.class||n.class&&n.className)&&(r.class=r.className=n.className),e.props=r}(t),t.$$typeof=Ja,gi&&gi(t)};var vi=it.__r;it.__r=function(t){vi&&vi(t),Yr=t.__c};var yi=it.diffed;it.diffed=function(t){yi&&yi(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),Yr=null};var Ru={ReactCurrentDispatcher:{current:{readContext:function(t){return Yr.__n[t.__c].props.value},useCallback:ut,useContext:jt,useDebugValue:Wa,useDeferredValue:qa,useEffect:F,useId:Gr,useImperativeHandle:Ha,useInsertionEffect:Za,useLayoutEffect:Ut,useMemo:bt,useReducer:Zr,useRef:R,useState:H,useSyncExternalStore:ee,useTransition:Ka}}};function Bu(t){return xe.bind(null,t)}function xo(t){return!!t&&t.$$typeof===Ja}function $u(t){return xo(t)&&t.type===Ct}function Fu(t){return!!t&&!!t.displayName&&(typeof t.displayName=="string"||t.displayName instanceof String)&&t.displayName.startsWith("Memo(")}function Du(t){return xo(t)?hu.apply(null,arguments):t}function zu(t){return!!t.__k&&(Tn(null,t),true)}function Hu(t){return t&&(t.base||t.nodeType===1&&t)||null}var Wu=function(t,e){return t(e)},Uu=function(t,e){return t(e)},ju=Ct,Vu=xo,ue={useState:H,useId:Gr,useReducer:Zr,useEffect:F,useLayoutEffect:Ut,useInsertionEffect:Za,useTransition:Ka,useDeferredValue:qa,useSyncExternalStore:ee,startTransition:Va,useRef:R,useImperativeHandle:Ha,useMemo:bt,useCallback:ut,useContext:jt,useDebugValue:Wa,version:"18.3.1",Children:bu,render:Iu,hydrate:Lu,unmountComponentAtNode:zu,createPortal:Su,createElement:xe,createContext:he,createFactory:Bu,cloneElement:Du,createRef:cu,Fragment:Ct,isValidElement:xo,isElement:Vu,isFragment:$u,isMemo:Fu,findDOMNode:Hu,Component:le,PureComponent:kr,memo:vu,forwardRef:ie,flushSync:Uu,unstable_batchedUpdates:Wu,StrictMode:ju,Suspense:St,SuspenseList:Sn,lazy:vt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ru};function Jr(t){const e=ee(Ku,Zu);return!!t||e}const Qr=t=>t?{"data-high-contrast":""}:{},qu="(prefers-contrast: more)",Qa=()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia(qu):null;function Ku(t){var n;const e=Qa();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 Zu=()=>{var t;return!!((t=Qa())!=null&&t.matches)},Nn=he(void 0),It=(...t)=>t.filter(Boolean).join(" "),So=he(null);function Ne(){return jt(So)}function ae(t="This part"){const e=jt(So);if(!e)throw new Error(`${t} must be rendered inside <Clover.Root>.`);return e}function st(t,e=Object.is,n){const{clover:o}=ae(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 ee(o.store.subscribe,s)}const Gu={subscribe:()=>()=>{}};function Rn(t,e){const n=jt(So),o=n==null?void 0:n.clover.store,r=()=>o?t(o.get()):e;return ee(o?o.subscribe:Gu.subscribe,r)}const Xu=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"}'),tc={es:()=>import("../es-B1NvdYp-.mjs"),fi:()=>import("../fi-BjtYZNLo.mjs"),fr:()=>import("../fr-Cd22Lziw.mjs"),ja:()=>import("../ja-Cg1enUhM.mjs"),nb:()=>import("../nb-CEwZDBiR.mjs"),nn:()=>import("../nn-jYQhr9RI.mjs"),no:()=>import("../no-CEwZDBiR.mjs"),pt:()=>import("../pt-CWR30SzS.mjs"),"zh-Hans":()=>import("../zh-Hans-DnYm6PWu.mjs"),"zh-Hant":()=>import("../zh-Hant-DsxnuLPZ.mjs")};function ts(){return typeof navigator>"u"?[]:[...navigator.languages??[],navigator.language].filter(Boolean)}function ec(){if(!(typeof document>"u"))return document.documentElement.lang||void 0}let nc=()=>[];function Yu(t){nc=t}function Ju(){const[t,...e]=nc();return[...new Set([t,...ts(),...e,ec()].filter(n=>!!n))]}const fo=t=>t.split("-")[0];function es(t,e){return fo(t).toLowerCase()===fo(e).toLowerCase()}function Cr(t){try{const{language:e,script:n}=new Intl.Locale(t).maximize();return n&&`${e}-${n}`}catch{return}}function Qu(t,e){const n=Cr(t);if(n)return e.find(o=>o!=="none"&&o!=="@none"&&Cr(o)===n)}const tr=t=>t.includes("-")?fo(t):null;function td(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=tr(t);if(r&&e.includes(r))return r;const s=Qu(t,e);if(s)return s;const i=n.find(c=>e.includes(c));if(i)return i;const a=e.findIndex(c=>tr(c)===t);if(a!==-1)return e[a];for(const c of n){const l=tr(c);if(l&&e.includes(l))return l}return o()}function ns(t,e){const[n,...o]=e?[e]:Ju();return td(n,t,o)??t[0]}const ye="clover",Qt={en:{[ye]:{...Xu}}};let kn=[],Jt,ho=[],oc=[],os=0;const Er=new Set;function rs(){os++,Er.forEach(t=>t())}function rc(t){return[t,Cr(t),fo(t)].filter(e=>!!e)}const ed=t=>t==="en"||sc(t)||!!Qt[t],Oe=t=>rc(t).find(ed),bi=new Map,sc=t=>Object.prototype.hasOwnProperty.call(tc,t);function nd(t){let e=bi.get(t);return e||(e=tc[t]().then(({default:n})=>{var o;Qt[t]={...Qt[t],[ye]:{...n,...(o=Qt[t])==null?void 0:o[ye]}},rs()},()=>{}),bi.set(t,e)),e}function Mr(t){const e=t.find(n=>n==="en"||sc(n));return e&&e!=="en"?nd(e):Promise.resolve()}let oo=[],_i="",In="en";function ko(){const t=ec();return[...new Set([...kn,...t?[t]:[]])]}function Pe(){const t=`${os} ${typeof document<"u"?document.documentElement.lang:""} ${typeof navigator<"u"?navigator.languages:""}`;if(t===_i)return oo;_i=t;const e=ko();return In=ts().map(Oe).find(Boolean)??e.map(Oe).find(Boolean)??"en",oo=[...new Set([Jt??In,...oc,...e].filter(o=>!!o).flatMap(rc).concat("en"))],Mr(oo),oo}function od(){return Pe(),[...new Set([In,...ko().map(Oe),...ho.map(Oe)].filter(t=>!!t))]}Yu(()=>(Pe(),[Jt,In,...ko()]));function Co(t,e){if(t)return es(t,e||Tt.resolvedLanguage)?void 0:t}const Tt={get language(){return Jt??Pe().find(t=>Qt[t])??"en"},get chosenLanguage(){return Jt},stringsFor(t){return Oe(t)},interfaceLanguages(){return{languages:od(),chosen:Jt&&Oe(Jt)||In}},chooseInterfaceLanguage(t){return Jt=t||void 0,ho=Jt?[...new Set([...ho,Jt])]:[],rs(),Mr(Pe())},get resolvedLanguage(){return Pe().find(t=>{var e;return Object.keys(((e=Qt[t])==null?void 0:e[ye])??{}).length>0})??"en"},changeLanguage(t){return Tt.chooseInterfaceLanguage(t)},resolve(t,e,n=ye){var r,s;let o={text:t};for(const i of Pe()){const a=(s=(r=Qt[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=ye){return Tt.resolve(t,e,n).text},langOf(t,e,n=ye){return Co(Tt.resolve(t,void 0,n).lang,e)},ready(){return Mr(Pe())},subscribe(t){return Er.add(t),()=>{Er.delete(t)}},getSnapshot(){return os}};typeof document<"u"&&Pe();function rd(t={}){for(const[n,o]of Object.entries(t.resources??{}))for(const[r,s]of Object.entries(o??{}))Qt[n]??(Qt[n]={}),Qt[n][r]={...Qt[n][r],...s};t.fallbackLng!==void 0&&(oc=t.fallbackLng===false?[]:[t.fallbackLng].flat());const e=kn.join();if(t.languages!==void 0?kn=[t.languages].flat().filter(Boolean):t.lng&&(kn=[t.lng]),kn.join()!==e){ho=[];const n=[...ts(),...ko()].map(Oe);Jt&&!n.includes(Oe(Jt))&&(Jt=void 0)}return rs(),Tt}const sd=Object.freeze(Object.defineProperty({__proto__:null,CLOVER_I18N_NAMESPACE:ye,cloverI18n:Tt,initCloverI18n:rd,langWithin:Co},Symbol.toStringTag,{value:"Module"}));function Et(t=ye,e){const n=ee(Tt.subscribe,Tt.getSnapshot,Tt.getSnapshot),o=jt(Nn),r=e??o,s=ut((a,c)=>Tt.t(a,c,t),[t,n]),i=ut(a=>Tt.langOf(a,r,t),[t,n,r]);return{t:s,langOf:i,hostLanguage:r,i18n:Tt}}function Eo(t,e){const n=jt(Nn),o=R(null),[r,s]=H(""),i=ut(d=>{o.current=d,typeof t=="function"?t(d):t&&(t.current=d)},[t]);F(()=>{var u,p;const d=(u=o.current)==null?void 0:u.parentElement;e!==void 0||n!==void 0||!d||s(((p=d.closest("[lang]"))==null?void 0:p.getAttribute("lang"))??"")});const c=e??n??r,{langOf:l}=Et(void 0,c);return{ref:i,hostLanguage:c,langOf:l}}const W=t=>Array.isArray(t)?t:t==null?[]:[t],id=["left-to-right","right-to-left","top-to-bottom","bottom-to-top"];function ss(t){return id.includes(t)?t:"left-to-right"}const ad=["individuals","paged","continuous","unordered"];function cd(t){return W(t).find(n=>ad.includes(n))??"individuals"}function ld(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=W(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 ud(t,e){const n=t.findIndex(o=>o.includes(e));return n===-1?0:n}const ic=["Independents","Composite","List"];function Mo(t){return W(t==null?void 0:t.body).flatMap(e=>ic.includes(e==null?void 0:e.type)?W(e.items):[e])}function is(t){const e=W(t==null?void 0:t.motivation);return!e.length||e.includes("painting")}function ac(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 ro(t){const e=t.indexOf("#");if(e>=0){const o=t.slice(0,e);return ac(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 Tr=t=>{var e;return Array.isArray(t)?Tr(t[0]):ic.includes(t==null?void 0:t.type)?Tr((e=t.items)==null?void 0:e[0]):t};function hn(t){return dd(Tr(t))}function dd(t){var n;if(typeof t=="string")return ro(t);if(!t||typeof t!="object")return{id:""};if(t.type!=="SpecificResource"||t.source===void 0)return ro(t.id??"");const e=typeof t.source=="string"?ro(t.source):ro(((n=t.source)==null?void 0:n.id)??"");for(const o of W(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=ac(e.id,String(r.value));if(s)return s}}return e}const Bn=t=>t==="Audio"||t==="Sound",fd=t=>{const e=W(t);return e.length>0&&e.every(n=>n==="supplementing")},hd=(t,e)=>fd(t)&&!!(e.rect||e.svg||e.point)&&!e.t,wi=new WeakMap,pd={canvases:[],views:[],direction:"left-to-right"};function Bt(t){if(!t)return pd;let e=wi.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:ld(n,cd(t.behavior)),direction:ss(t.viewingDirection)},wi.set(t,e)}return e}const xi=new WeakMap;function qe(t,e){if(!e)return null;const n=Bt(t);let o=xi.get(n);if(!o){o=new Map;for(const r of n.canvases)o.has(r.id)||o.set(r.id,r);xi.set(n,o)}return o.get(e)??null}function $n(t,e){const{canvases:n,views:o}=Bt(t),r=n.findIndex(s=>s.id===e);return r===-1?0:ud(o,r)}const Si=new WeakMap,md=[];function We(t,e){if(!t)return md;const n=$n(t,e);let o=Si.get(t);o||Si.set(t,o=new Map);let r=o.get(n);if(!r){const s=Bt(t);r=(s.views[n]??[]).map(i=>s.canvases[i]),o.set(n,r)}return r}function gd(t,e){var s,i;const{canvases:n,views:o}=Bt(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 vd(t){const e=t==null?void 0:t.start;if(!e)return null;const n=hn(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 Fe=(t,e)=>{const n=t==null?void 0:t.behavior;return Array.isArray(n)?n.includes(e):n===e},yd=t=>[(t==null?void 0:t.partOf)??[]].flat().find(e=>(e==null?void 0:e.id)&&e.type==="Collection");function bd(t,e,n,o){const r=t==null?void 0:t.items;if(!(r!=null&&r.length)||!n)return-1;const s=We(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 wt(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=ns(o,e),s=t[r];return{text:Array.isArray(s)?s.join(n):String(s),lang:r==="none"||r==="@none"?void 0:r}}const _d=/^[A-Za-z]{2,8}(-[A-Za-z0-9]{1,8})*$/;function Ln(t){const e=t==null?void 0:t.language,n=(Array.isArray(e)?e:[e]).filter(o=>typeof o=="string"&&_d.test(o));return n.length===1?n[0]:void 0}const Ue={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",whiteSpace:"nowrap",border:0},wd=/^(ar|arc|ckb|dv|fa|he|iw|ks|ps|sd|syr|ug|ur|yi|ota|prs|azb|pnb|bal|glk|mzn|lrc|khw|nqo|rhg|jrb|jpr|sam|arz|ary|apc|acm|ajp|aeb|ars)$/,xd=/^(adlm|arab|hebr|nkoo|rohg|syrc|thaa)$/;function Sd(t){if(!t)return;const[e,...n]=t.toLowerCase().split(/[-_]/),o=n.find(r=>/^[a-z]{4}$/.test(r));return(o?xd.test(o):wd.test(e))?"rtl":void 0}function dt(t){return t?{lang:t,dir:Sd(t)}:{}}function kd({clover:t,language:e}){const{t:n,langOf:o}=Et(),[r,s]=H(null),i=R(n);return i.current=n,F(()=>{let a=null;return t.store.subscribe(()=>{const{manifest:c,canvasId:l,status:d}=t.store.get();if(d!=="ready"||l===a)return;const u=a===null;if(a=l,u)return;const p=qe(c,l),h=wt(p==null?void 0:p.label,e),m=i.current("canvasPosition",{index:$n(c,l)+1,total:Bt(c).views.length});s({label:h.text,lang:h.lang,position:m})})},[t,e]),f("div",{className:"clover-announcer",role:"status","aria-live":"polite","aria-atomic":"true",style:Ue,children:[r!=null&&r.label?f(Ct,{children:[f("span",{...dt(r.lang),children:r.label}),","," "]}):null,r&&f("span",{...dt(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 Ed(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:W(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 Mo(t))if((r==null?void 0:r.type)!=="Choice")o(r);else{const s=n++;for(const i of W(r.items))o(i,s)}return e}const as="content-search",ki=/\/search\/([0-2])\//;function cc(t){if(!t)return null;let e=null;for(const n of W(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:ki.test(s)?Number(ki.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 Md="contents",uy=(t,e)=>`${t}#region-${e+1}`,Td=t=>W(t==null?void 0:t.motivation).includes("linking");function lc(t,e,n){const o=[];for(const r of W(t==null?void 0:t.items)){const s=W(r==null?void 0:r.motivation);if(s.includes("painting"))continue;const i=Ed(r);if(!i.length&&!Td(r))continue;const a=hn(W(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 Id=t=>Bt(t).canvases.some(e=>W(e.items).some(n=>W(n==null?void 0:n.items).some(o=>W(o==null?void 0:o.body).some(r=>[r,...W(r==null?void 0:r.items)].some(s=>W(s==null?void 0:s.annotations).length>0)))));function Ld(t,e){for(const n of[t,e])if(n!=null&&n.label)return n.label;for(const n of[t,e]){const o=W(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 uc=t=>W(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"])))),Ci=new WeakMap;function dc(t){var n;if(!t)return[];let e=Ci.get(t);if(!e){const o=new Map;for(const r of Bt(t).canvases)for(const s of W(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=uc(s)[0])==null?void 0:n.id;a={id:i,label:Ld(s),source:"manifest",entries:[],...c?{collection:c}:{}},o.set(i,a)}a.entries.push(...lc(s,i,r.id))}e=[...o.values()].filter(r=>r.entries.length),Ci.set(t,e)}return e}const Ei=new WeakMap,fc=[];function dy(t){if(!t)return fc;let e=Ei.get(t);return e||(e=Bt(t).canvases.flatMap(n=>W(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)}))),Ei.set(t,e)),e}const er=new WeakMap,nr=new WeakMap;function hc(t,e=Pd){var n;if(!nr.has(e)){const o=e.filter(s=>s.content),r=(n=o[0])==null?void 0:n.content;nr.set(e,r?{id:r.id,type:r.type,...r.label?{label:r.label}:{},pages:fc,entries:o.flatMap(s=>s.entries)}:null)}return nr.get(e)??Ad(t)}const Pd=[];function Ad(t){var r;if(!t)return null;if(er.has(t))return er.get(t);const e=Bt(t).canvases.flatMap(s=>W(s.annotations).flatMap(i=>uc(i).map(a=>({part:a,page:i,canvas:s})))),n=(r=e[0])==null?void 0:r.part.id,o=n?(()=>{var l,d;const s=e.filter(({part:u})=>u.id===n),i=(l=s.find(({part:u})=>u.label))==null?void 0:l.part.label,a=Number((d=s.find(({part:u})=>u.total))==null?void 0:d.part.total),c=dc(t);return{id:n,type:"AnnotationCollection",...i?{label:i}:{},...a>0?{total:a}:{},pages:s.map(({page:u,canvas:p})=>({id:String(u.id),canvasId:String(p.id),fetched:Array.isArray(u.items)})),entries:s.flatMap(({page:u})=>{var p;return((p=c.find(h=>h.id===u.id))==null?void 0:p.entries)??[]})}})():null;return er.set(t,o),o}const Mi=new WeakMap,Ti=[];function cs(t,e){const n=dc(t);if(!e.length)return n.length?n:Ti;const o=t??Ti;let r=Mi.get(o);r||Mi.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 Ii=new WeakMap;function pc(t,e,n,o=null){const r=cs(t,e),s=n!=null&&n.entries.length?n:null;if(!o&&!s)return r;let i=Ii.get(r);i||Ii.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 Od=t=>Number(t==null?void 0:t.duration)>0;function mc(t,e){return t.source==="search"||!t.entries.length?false:t.entries.every(n=>hd(n.motivation,n.target)&&!Od(e(n.canvasId)))}const Li=new WeakMap;function Nd(t,e){const n=cs(t,e);let o=Li.get(n);if(!o){const r=n.filter(s=>!mc(s,i=>qe(t,i)??void 0));o=r.length===n.length?n:r,Li.set(n,o)}return o}const Pi=new WeakMap;function ls(t,e,n,o){const r=cs(t,e),s=Pi.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)&&mc(c,l=>qe(t,l)??void 0)).map(c=>c.id),a=i.length?[...n,...i]:n;return Pi.set(r,{hidden:n,shown:o,ids:a}),a}const Ai=new WeakMap;function Rd(t,e,n,o){const r=ls(t,e,n,o),s=Ai.get(r);if(s&&s.hidden===n)return s.ids;const i=[as,Md,...r.filter(a=>!n.includes(a))];return Ai.set(r,{hidden:n,ids:i}),i}function Bd(t){for(const e of W(t==null?void 0:t.target)){const n=(e==null?void 0:e.type)==="SpecificResource"?e.source:e,o=W(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 or(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 gc(t){return btoa(encodeURIComponent(JSON.stringify(t))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function vc({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:gc(a)}}const $d=Object.freeze(Object.defineProperty({__proto__:null,buildContentState:vc,encodeContentState:gc},Symbol.toStringTag,{value:"Module"})),Fd=/iiif\.io\/api\/presentation\/4\/context\.json/;function yc(t){const e=t==null?void 0:t["@context"];return(Array.isArray(e)?e:[e]).some(o=>typeof o=="string"&&Fd.test(o))}let Oi=null,Ni=null;function us(){return Ni??(Ni=import("../upgrade-eNW0DPXq.mjs")),Oi??(Oi=import("../upgrader-BlbMUEH6.mjs").then(({upgradePresentation3To4:t})=>t)),Promise.all([Oi,Ni])}async function je(t){if(yc(t))return t;const[e,{upgrade:n}]=await us();return await n(t,e)}function ds(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 Dd=t=>(t==null?void 0:t.credentials)==="include",zd=t=>JSON.stringify([t==null?void 0:t.credentials,t==null?void 0:t.headers]);class Hd extends Error{constructor(e,n,o){super(e),this.url=n,this.status=o,this.name="CloverRequestError"}}async function Ve(t,e,n){const o=await ds(t,e,{signal:n,headers:{Accept:"application/ld+json, application/json"}});if(!o.ok)throw new Hd(`${e} answered ${o.status}`,e,o.status);return o.json()}const Ri=()=>import("./content-state-reader-Cm-rvusT.mjs");function Bi(t){const e=t;return!e||typeof e!="object"?false:e.type==="Annotation"?W(e.motivation).includes("contentState"):e.type==="SpecificResource"}const bc=t=>!!t&&typeof t=="object"&&/ImageService[123]|iiif\.io\/api\/image/.test(JSON.stringify(["@context","type","@type","protocol"].map(e=>t[e])));async function Wd(t,e,n){try{return await Ve(t,e,n)}catch(o){if(n!=null&&n.aborted||/\.json([?#]|$)/i.test(e))throw o;try{const r=await Ve(t,`${e.replace(/\/+$/,"")}/info.json`,n);if(bc(r))return r}catch{}throw o}}const Ud=["summary","metadata","requiredStatement","rights","provider","homepage","seeAlso","rendering","thumbnail","navDate","partOf"];function jd(t){const e={"@context":qd,id:t.id,type:"Manifest",label:t.label??{none:[""]},items:[t]};for(const n of Ud)t[n]!==void 0&&n!=="label"&&(e[n]=t[n]);return e}const $i=t=>{var e,n;return!!t&&((n=(e=t.items)==null?void 0:e[0])==null?void 0:n.id)===t.id},_c=t=>{var e,n;return!!t&&((e=t.items)==null?void 0:e.length)===1&&((n=t.items[0])==null?void 0:n.id)===`${t.id}/canvas`},Vd=/^(oa:)?Annotation(Page|Collection)$/;class so extends Error{constructor(){super(...arguments);L(this,"name","CloverContentError")}}const qd="http://iiif.io/api/presentation/4/context.json",Kd=t=>/^https?:\/\//i.test(t);async function Ir(t,{request:e,signal:n}){return Array.isArray(t.items)&&t.items.length>0||!t.id?t:await Ve(e,t.id,n)}const Zd=50;async function fs(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<Zd;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 Ve(e.request,a.id,e.signal),l=await je({"@context":c["@context"]??n["@context"],...c,type:"Collection"});o.push(...l.items??[]),s=c.next}return{...n,items:o}}async function wc(t,e={}){return je(await Ir(t,e))}async function xc(t,e,n=0){for(const o of t.items??[]){if(o.type==="Manifest")return je(await Ir(o,e));if(o.type==="Collection"&&n<8){const r=await fs(await je(await Ir(o,e)),e),s=await xc(r,e,n+1);if(s)return s}}return null}async function Gd(t,{request:e,signal:n}={}){us();const o=typeof t=="string"?await Ve(e,t.trim(),n):t,r=await je(o);return r.type==="Collection"?fs(r,{request:e,signal:n}):r}async function Xd(t,e={}){var u;const{request:n,signal:o}=e;us();let r,s,i,a,c;const l=async p=>{const{resolveContentState:h}=await Ri(),m=h(p);if(!m)throw new so("Unreadable content state");return r=m.target??r,s=m.manifestId??s,i=m.annotation??i,a=m.targets??a,Ve(n,m.id,o)};if(typeof t=="string")if(Kd(t.trim()))c=await Wd(n,t.trim(),o);else{const{decodeContentState:p}=await Ri(),h=p(t);if(!h)throw new so("Unreadable iiifContent");c=Bi(h)?await l(h):h}else c=t;if(Bi(c)&&(c=await l(c)),Vd.test(String((c==null?void 0:c.type)??""))){const{annotationsContent:p}=await import("./annotations-content-CYjPRTZn.mjs");return p(c,e)}if(bc(c)){const{imageServiceContent:p}=await import("./image-service-content-C60w8IZm.mjs");return p(c,typeof t=="string"?t.trim():void 0)}const d=await je(c);switch((u=o==null?void 0:o.throwIfAborted)==null||u.call(o),d.type){case"Manifest":return{manifest:d,target:r,annotation:i,targets:a};case"Collection":{const p=await fs(d,e),h=e.manifestId??s,m=h?(p.items??[]).find(y=>y.id===h&&y.type==="Manifest"):void 0,g=m?await wc(m,e):await xc(p,e);if(!g)throw new so("The Collection holds no Manifest");return{manifest:g,collection:p,target:r,annotation:i,targets:a}}case"Canvas":case"Timeline":case"Scene":{const p=d;return r??(r={canvasId:p.id}),{manifest:jd(p),target:r,annotation:i}}default:throw new so(`Cannot show a ${String(d.type??"resource without a type")}`)}}const Sc=t=>!!(t!=null&&t.id)&&t.type==="AnnotationPage"&&!t.items;function Fi(t){const e=[];for(const n of t)for(const o of["items","annotations"])for(const r of n[o]??[])Sc(r)&&e.push([n.id,o,r.id]);return e}async function Yd(t,e,n,o){return Jd(await Ve(n,t,o),e)}async function Jd(t,e="urn:clover:annotation-page"){var r;const n=t;return yc(n)?n:((r=(await je({"@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 Qd(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 tf(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||!Sc(c)?c:(r=true,Qd(o,c)));return r?{...i,[n]:a}:i});return r?{...t,items:s}:t}function ef(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 nn(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 nf(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 Lr={query:"",status:"idle",hits:[],set:null},Di={status:"idle",error:null,manifest:null,collection:null,throughCollection:false,canvasId:null,target:null,annotationId:null,hiddenSets:[],shownSets:[],addedSets:[],search:Lr,regions:null,targets:null,targetIndex:null};function of(t={}){const e=ef(Di),n=nn(null),o=nn(null),r=nn(null),s=nn(null),i=nn(null),a=nn(null);let c=null,l=null,d=[],u=[],p=[],h=0,m=null,g=null,y=null;const w=(_,I)=>{!g||_===I||(g={...g,items:g.items.map(P=>P.manifestId===_&&P.manifestAs!==I?{...P,manifestAs:I}:P)})},S=_=>{var P;const I=(P=e.get().manifest)==null?void 0:P.id;return!!I&&(I===_.manifestId||I===_.manifestAs)},v=()=>d.length||u.length||p.length?[...d,...u,...p]:Di.addedSets;let b=t.request,x=null;const k=new Set;let N="view",D=0;const j=(_,I,P)=>{if(k.has(P))return;k.add(P);const A=x==null?void 0:x.signal;Yd(P,_,b,A).then(B=>{A!=null&&A.aborted||e.set(Z=>Z.manifest?{manifest:tf(Z.manifest,_,I,B)}:{})}).catch(()=>k.delete(P))},et=()=>{const{manifest:_,canvasId:I}=e.get();if(_)for(const[P,A,B]of Fi(N==="all"||D>0?Bt(_).canvases:We(_,I)))j(P,A,B)};e.subscribe(et);const V=(_,I,P,A,B)=>{var zt,Ht,gt;const{canvases:Z}=Bt(_),E=q=>!!q&&Z.some(ot=>ot.id===q),z=vd(_),K=E(P==null?void 0:P.canvasId)?P:E(z==null?void 0:z.canvasId)?z:null,G=E(A.canvasId)?A.canvasId:(K==null?void 0:K.canvasId)??(E(A.defaultCanvasId)?A.defaultCanvasId:null)??((zt=Z[0])==null?void 0:zt.id)??null;l==null||l.abort();const ht=B&&((Ht=or(p,B))==null?void 0:Ht.canvasId)===G?B:null,ft=K&&ht?{...K,region:void 0}:K,Rt=++h;d=[],e.set({status:"ready",search:Lr,regions:null,manifest:_,collection:I,canvasId:G,target:ft&&ft.canvasId===G?ft:null,addedSets:v(),annotationId:ht,targets:g});const At=_==null?void 0:_.structures;Array.isArray(At)&&JSON.stringify(At).includes("xywh=")&&import("./range-regions-C7ZBtSyb.mjs").then(({contentsSet:q})=>{h===Rt&&e.set({regions:q(_)})}),Id(_)&&import("./image-layers-CZ9-efD2.mjs").then(({imageLayers:q})=>{h===Rt&&(d=q(_),e.set({addedSets:v()}))}),G&&G!==A.canvasId&&((gt=t.onCanvasChange)==null||gt.call(t,G))},nt=(_,I)=>e.set(P=>{const A=P.hiddenSets.filter(Z=>Z!==_),B=P.shownSets.filter(Z=>Z!==_);return I?{hiddenSets:A,shownSets:[...B,_]}:{hiddenSets:[...A,_],shownSets:B}}),Y=(_,I)=>{var A,B,Z;if(!_)return;if((A=t.isControlled)!=null&&A.call(t)){I&&e.set({target:I}),(B=t.onCanvasChange)==null||B.call(t,_);return}const P=e.get().canvasId!==_;e.set({canvasId:_,target:I}),P&&((Z=t.onCanvasChange)==null||Z.call(t,_))},J=(_,I=false)=>{const{manifest:P}=e.get(),A=gd(P,_);Y(A,A&&I?{canvasId:A,autoplay:I}:null)},M=()=>{const{manifest:_,canvasId:I}=e.get();return{at:$n(_,I),total:Bt(_).views.length}},T=()=>{x==null||x.abort();const _=new AbortController;return x=_,k.clear(),e.set({status:"loading",error:null,annotationId:null}),_.signal},O=_=>e.set({status:"error",error:_ instanceof Error?_:new Error(String(_))});async function U(_,I={}){var A;const P=T();try{const B=await Xd(_,{request:b,signal:P,manifestId:I.manifestId??void 0});if(P.aborted)return;const Z=B.annotation,E=Z?lc({items:[Z]},`${Z.id}#content-state`):[];p=E.length?[{id:`${Z.id}#content-state`,source:"added",entries:E}]:B.annotationSets??[];const z=m??((A=E[0])==null?void 0:A.id)??B.pick;m=null,e.set({throughCollection:!!B.collection}),g=B.targets??null,g&&w(g.items[0].manifestId,B.manifest.id),e.set({targetIndex:g?0:null}),V(B.manifest,B.collection??null,B.target,I,z)}catch(B){P.aborted||O(B)}}const Q=_=>{const{manifest:I,collection:P}=e.get();return(I==null?void 0:I.id)===_||(P==null?void 0:P.id)===_},at=_=>{var I;return(((I=e.get().collection)==null?void 0:I.items)??[]).find(P=>P.id===_)??{id:_,type:"Manifest"}},ct=(_,I)=>{var P,A;if(m=I,(P=t.isManifestControlled)!=null&&P.call(t)){(A=t.onManifestChange)==null||A.call(t,_);return}mt({id:_,type:"Manifest"}).then(B=>{var Z;return B&&((Z=t.onManifestChange)==null?void 0:Z.call(t,_))})},mt=async(_,I)=>{if(_.type==="Collection")return await U(_.id),e.get().status==="ready";const{collection:P}=e.get(),A=T(),B=m;m=null;const Z=B?or(p,B):null,E=typeof I=="string"?{canvasId:I}:I??y;y=null;try{const z=await wc(_,{request:b,signal:A});return A.aborted?false:(w(_.id,z.id),V(z,P,Z?{canvasId:Z.canvasId}:E??void 0,{},B),true)}catch(z){return A.aborted||O(z),false}};return{store:e,viewport:n,media:o,captions:r,highlight:s,chapter:i,found:a,get request(){return b},setRequest(_){b=_},load:U,async openCollection(_){var P;const I=e.get().manifest;if(!(!I||((P=e.get().collection)==null?void 0:P.id)===_))try{const A=await Gd(_,{request:b});if(A.type!=="Collection"||e.get().manifest!==I)return;e.set({collection:A})}catch{}},async goToManifest(_,I){var A,B,Z;if(Q(_))return;const P=at(_);if(P.type!=="Collection"&&((A=t.isManifestControlled)!=null&&A.call(t))){(B=t.onManifestChange)==null||B.call(t,_);return}await mt(P,I)&&((Z=t.onManifestChange)==null||Z.call(t,e.get().manifest.id))},goToTarget(_){var A,B,Z;const I=(A=e.get().targets)==null?void 0:A.items[_];if(!I)return;e.set({targetIndex:_});const P=I.canvasId?{canvasId:I.canvasId,...I.region&&{region:I.region},...I.time!==void 0&&{time:I.time}}:null;if(S(I)){P&&Y(P.canvasId,P);return}if((B=t.isManifestControlled)!=null&&B.call(t)){y=P,(Z=t.onManifestChange)==null||Z.call(t,I.manifestId);return}mt(at(I.manifestId),P??void 0).then(E=>{var z;return E&&((z=t.onManifestChange)==null?void 0:z.call(t,I.manifestId))})},async syncManifest(_){!_||Q(_)||e.get().status!=="ready"||await mt(at(_))},goTo(_,I){Y(_,I?{...I,canvasId:_}:null)},next({autoplay:_=false,wrap:I=false}={}){const{at:P,total:A}=M();P+1<A?J(P+1,_):I&&A>1&&J(0,_)},previous(){const{at:_}=M();_>0&&J(_-1)},first(){J(0)},last(){J(M().total-1)},consumeTarget(){e.set({target:null})},syncCanvas(_){_&&e.set({canvasId:_})},selectAnnotation(_){const{manifest:I,addedSets:P,canvasId:A,search:B,regions:Z}=e.get(),E=or(pc(I,P,B.set,Z),_);if(e.set({annotationId:E?_:null}),!E)return;a.emit(_);const{hiddenSets:z,shownSets:K}=e.get();E.setId!==as&&ls(I,P,z,K).includes(E.setId)&&nt(E.setId,true);const G=We(I,A).some(Rt=>Rt.id===E.canvasId),ht=qe(I,E.canvasId)!==null;!G&&ht&&Y(E.canvasId,null);const ft=ht?void 0:Bd(E.annotation);ft&&ct(ft,E.id)},async search(_){l==null||l.abort();const I=cc(e.get().manifest),P=_.trim();if(!P||!I){l=null,e.set({search:Lr,annotationId:null});return}const A=new AbortController;l=A,e.set(B=>({search:{...B.search,query:P,status:"loading"}}));try{const{searchInto:B}=await import("./search-CWuD5EZA.mjs");await B(e,I,P,b,A.signal)}catch{e.set({search:{query:P,status:"error",hits:[],set:null}})}},setSetVisible(_,I){nt(_,I)},async loadAnnotations(_){if(c==null||c.abort(),!_){u=[],e.set({addedSets:v()});return}const I=new AbortController;c=I;try{const{loadAnnotationSets:P}=await import("./annotation-collection-l4zuf56A.mjs"),A=await P(_,{request:b,signal:I.signal});if(I.signal.aborted)return;u=A,e.set({addedSets:v()})}catch{}},getContentState(){var G;const{manifest:_,canvasId:I}=e.get();if(!_||!I)return null;const P=n.get(),A=o.get(),B=A&&A.currentTime>0?A.currentTime:null,Z=We(_,I),z=P&&Z.some(ht=>ht.id===P.canvasId)&&!B?P:null,K=(z==null?void 0:z.canvasId)??I;return vc({manifestId:_.id,canvasId:K,type:(G=Z.find(ht=>ht.id===K))==null?void 0:G.type,region:z==null?void 0:z.region,time:B})},setAnnotationPages(_){_!==N&&(N=_,et())},fetchAnnotationPages(_){const{manifest:I}=e.get();if(!I||!_.length)return;const P=new Set(_);for(const[A,B,Z]of Fi(Bt(I).canvases))P.has(Z)&&j(A,B,Z)},holdAllAnnotationPages(){D++,et();let _=true;return()=>{_&&D--,_=false}},dispose(){x==null||x.abort(),c==null||c.abort(),l==null||l.abort()}}}const rf=100;function kc(t,e){const n=R({read:t,onChange:e});n.current={read:t,onChange:e};const o=R(void 0),r=R("");return F(()=>()=>{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))},rf))},[])}function Pr(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 Cc(t,e){const n=kc(()=>t.getContentState(),e),o=!!e;F(()=>{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=Pr(t.media.get(),n);const c=t.media.subscribe(l=>{a(),a=Pr(l,n)});return n(),()=>{s(),i(),c(),a()}},[t,o,n])}function hs(t){const e=[];for(const n of W(t==null?void 0:t.items))for(const o of W(n==null?void 0:n.items))if(is(o))for(let r of Mo(o))(r==null?void 0:r.type)==="Choice"&&(r=W(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 sf(t){return t.flatMap(e=>hs(e).map(({body:n})=>n))}function af(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 cf(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 lf({iiifContent:t,canvasId:e,defaultCanvasId:n,onCanvasChange:o,onStatusChange:r,manifestId:s,defaultManifestId:i,onManifestChange:a,searchQuery:c,request:l,language:d,renderers:u,annotations:p,annotationPages:h="view",onContentStateChange:m,...g}){const y=e!==void 0,w=s!==void 0,S=R({controlled:y,manifestControlled:w,onCanvasChange:o,onStatusChange:r,onManifestChange:a});S.current={controlled:y,manifestControlled:w,onCanvasChange:o,onStatusChange:r,onManifestChange:a};const[v]=H(()=>of({request:l,onCanvasChange:z=>{var K,G;return(G=(K=S.current).onCanvasChange)==null?void 0:G.call(K,z)},onManifestChange:z=>{var K,G;return(G=(K=S.current).onManifestChange)==null?void 0:G.call(K,z)},isControlled:()=>S.current.controlled,isManifestControlled:()=>S.current.manifestControlled}));v.setRequest(l);const b=R({});b.current={canvasId:e,defaultCanvasId:n,manifestId:s??i};const x=zd(l),k=R(t);k.current=t;const N=ff(t);F(()=>(v.load(k.current,b.current),()=>v.dispose()),[v,N,x]),F(()=>{y&&v.syncCanvas(e??null)},[v,y,e]);const[D,j]=H(v.store.get().status);F(()=>{let z=v.store.get().status;return v.store.subscribe(()=>{var ht,ft;const{status:K,error:G}=v.store.get();K!==z&&(z=K,j(K),(ft=(ht=S.current).onStatusChange)==null||ft.call(ht,K,G))})},[v]);const et=R(p);et.current=p;const V=df(p);F(()=>{v.loadAnnotations(et.current??null)},[v,V,x]),F(()=>{v.setAnnotationPages(h)},[v,h]),Cc(v,m),F(()=>{w&&D==="ready"&&v.syncManifest(s??null)},[v,w,s,D]);const nt=uf(v,z=>{var K;return z.status==="ready"?((K=z.manifest)==null?void 0:K.id)??null:null});F(()=>{c&&nt&&v.search(c)},[v,c,nt]);const Y=R(u);cf(Y.current,u)||(Y.current=u);const J=Y.current,[M,T]=H(),[O,U]=H(d);O!==d&&(U(d),T(void 0));const Q=R(void 0),[at,ct]=H(N);at!==N&&(ct(N),T(void 0)),F(()=>{const z=Q.current;Q.current=void 0,z&&Tt.chosenLanguage===z&&Tt.chooseInterfaceLanguage()},[N]);const mt=ee(Tt.subscribe,()=>Tt.chosenLanguage),_=M??d??mt,I=ut(z=>{T(z);const K=Tt.stringsFor(z);Q.current=K,K&&Tt.chooseInterfaceLanguage(K)},[]),[P,A]=H(0),B=ut(()=>(A(z=>z+1),()=>A(z=>z-1)),[]),Z=P>0;return[bt(()=>({clover:v,language:_,renderers:J,chooseLanguage:I,toggleDrawn:Z,drawsToggle:B}),[v,_,J,I,Z,B]),D,g]}function uf(t,e){return ee(t.store.subscribe,()=>e(t.store.get()))}function df(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 ff(t){return typeof t=="string"?t:t.id??t["@id"]??t}const hf=ie(function({as:e="div",className:n,children:o,highContrast:r,...s},i){const[a,c,l]=lf(s),d=Eo(i,l.lang),u=Jr(r);return f(So.Provider,{value:a,children:f(Nn.Provider,{value:d.hostLanguage,children:f(e,{ref:d.ref,className:It("clover-root",n),"data-status":c,...Qr(u),...l,children:[o,f(kd,{clover:a.clover,language:a.language})]})})})}),pf=()=>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"}),mf=()=>f(Ct,{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"})]}),gf=()=>f("path",{stroke:"none",d:"M256 72A48 48 0 1 1 256 168A48 48 0 1 1 256 72Z M192 216H296V384H328V432H184V384H216V264H192Z"}),vf=()=>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"}),fy=()=>f("path",{strokeLinejoin:"round",strokeWidth:"40",d:"M184 128V384L392 256Z"}),Ec=()=>f("path",{strokeLinecap:"round",strokeWidth:"45",d:"M154 154L358 358M358 154L154 358"}),hy=()=>f(Ct,{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"})]}),py=()=>f(Ct,{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"})]}),te={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"}},yf=new Set(["+","=","-","_","0","r","R","k","K","m","M","j","J","l","L"]);function Ke({label:t,lang:e,shortcut:n,scrolls:o=false,image:r,lead:s,after:i}){const{t:a}=Et(),c=R(null),l=n?a("controlShortcut",{label:t,shortcut:n.glyph}):t;return _f(),F(()=>{const d=c.current;d&&Ar(d)&&po(d)},[l,s]),f("span",{ref:c,className:"clover-tip","aria-hidden":"true",...dt(e),...o&&{tabIndex:-1,onMouseDown:d=>{var u;d.preventDefault(),(u=d.currentTarget.parentElement)==null||u.focus({preventScroll:true})}},children:[r&&f("img",{className:"clover-tip-image",src:r,alt:"",loading:"lazy",onLoad:()=>{const d=c.current;d&&Ar(d)&&po(d)}}),s&&f("span",{className:"clover-tip-lead",children:s}),l,i!=null&&i!==false&&f("span",{className:"clover-tip-after",children:i})]})}function io(t){const e=t.target instanceof Element&&ps(t.target),n=e&&To(e);n&&po(n)}function my(t){const e=To(ps(t));e&&Ar(e)&&po(e)}function To(t){return Array.from(t.children).find(e=>e.classList.contains("clover-tip"))}function ps(t){const e=t.matches("input")?t.parentElement:null;return e&&To(e)?e:t}function Ar(t){var e;try{return!!((e=t.parentElement)!=null&&e.matches(":hover, :focus-visible, :has(> input:focus-visible)"))}catch{return false}}function po(t){const e=t.parentElement;if(!e)return;t.style.removeProperty("--clover-tip-room"),t.style.removeProperty("--clover-tip-shift");const n=bf(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 bf(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 zi=0;function Hi(t){if(t.key!=="Escape"||t.defaultPrevented)return;const e=new Set;document.querySelectorAll(":hover > .clover-tip").forEach(r=>r.parentElement&&e.add(r.parentElement));const n=document.activeElement,o=n&&ps(n);o&&To(o)&&e.add(o),e.forEach(r=>Mc(r,"tipHidden",["pointerenter","focusout"]))}function Mc(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 _f(){F(()=>(zi++===0&&(document.addEventListener("keydown",Hi,true),document.addEventListener("pointerenter",io,true),document.addEventListener("focus",io,true)),()=>{--zi||(document.removeEventListener("keydown",Hi,true),document.removeEventListener("pointerenter",io,true),document.removeEventListener("focus",io,true))}),[])}function wf(t,e){const n=t.target;!e||n===e||e.contains(n)&&!n.closest(".clover-canvas-overlays")||yf.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 He=({className:t,id:e,label:n,children:o,onClick:r,expanded:s,controls:i,shortcut:a,lang:c,unavailable:l,side:d})=>{const p=e.split("-")[0].replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^-/,"");return f("button",{id:e,className:It("clover-canvas-button",t),"data-testid":"clover-canvas-button","data-button":p,"data-side":d,onClick:r,"aria-disabled":l||void 0,"aria-expanded":s,"aria-controls":i,"aria-label":n,"aria-keyshortcuts":a==null?void 0:a.keys,...dt(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(Ke,{label:n,shortcut:a})]})},xf=he("");function pe(){return jt(xf)+Gr()}const rr=new Map;function Sf(t,e){const n=pe(),o=R(e);o.current=e,F(()=>t?kf(n,o):void 0,[t,n])}function kf(t,e){for(const[n,o]of[...rr])n!==t&&o.current();return rr.set(t,e),()=>{rr.delete(t)}}const Cf=vt(()=>import("./CaptionDetails-3OlEaKmX.mjs"));function Ef(t){var e;return!!t.summary||!!((e=t.metadata)!=null&&e.length)}const Tc=(t,e)=>`${t}-label-${e}`,Mf=({id:t,canvases:e,comments:n,open:o,onClose:r,language:s})=>{const{t:i,langOf:a}=Et(),c=R(null),[l,d]=H(o);return o&&!l&&d(true),Sf(o,()=>r(false)),F(()=>{var u;o&&((u=c.current)==null||u.focus())},[o]),f("figcaption",{className:"clover-canvas-caption","data-open":o,"data-testid":"clover-canvas-caption",id:t,onKeyDown:u=>{u.key!=="Escape"||u.defaultPrevented||(u.preventDefault(),u.stopPropagation(),r(true))},ref:c,tabIndex:-1,children:[f(He,{className:"clover-canvas-caption-close",id:`close-${t}`,label:i("commonClose"),lang:a("commonClose"),onClick:()=>r(true),children:f(Ec,{})}),e.map((u,p)=>{const h=wt(u.label,s);return f("section",{className:"clover-canvas-caption-canvas",children:[h.text&&f("p",{className:"clover-canvas-caption-label",id:Tc(t,p),...dt(h.lang),children:h.text}),l&&f(St,{fallback:null,children:f(Cf,{summary:u.summary,metadata:u.metadata,comments:n==null?void 0:n.get(u.id),language:s})})]},u.id)})]})},Tf=()=>f("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M256 112v288M400 256H112"}),If=()=>f("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M400 256H112"}),Lf=()=>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"}),Pf=()=>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"}),Af=()=>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"}),Wi=()=>f(Ct,{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"})]}),Of=()=>f(Ct,{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"})]}),Nf=({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}),Rf=112,Bf=128;function $f(t){Ut(()=>{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 h of s?[]:Array.from(t.children))!(h instanceof HTMLElement)||!h.offsetParent||(i=Math.min(i,h.offsetLeft),a=Math.max(a,h.offsetTop+h.offsetHeight));const c={width:t.offsetWidth-i,height:a};for(const[h,m]of Object.entries(c)){const g=`--clover-canvas-controls-${h}`;a?e.style.setProperty(g,`${m}px`):e.style.removeProperty(g)}const l=t.offsetTop,d=e.querySelector(":scope > .clover-canvas-media > .clover-canvas-transport"),u=e.clientHeight-2*l-c.height-((d==null?void 0:d.offsetHeight)??0),p=t.offsetLeft+i-l;a&&u<Rf&&p>=Bf?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 Io=()=>{if(typeof document>"u")return null;const t=document;return t.fullscreenElement??t.webkitFullscreenElement??null},Ic=()=>{if(typeof document>"u")return false;const t=document;return!!(t.fullscreenEnabled??t.webkitFullscreenEnabled)},Lc=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},Ff=(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()},Pc=async(t,e)=>{var o,r,s,i;const n=Lc(t);if(n)try{if(Io()){const c=document;await(((o=c.exitFullscreen)==null?void 0:o.call(c))??((r=c.webkitExitFullscreen)==null?void 0:r.call(c)));return}if(!Ic()){e&&t&&Ff(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 ms(t){const[e,n]=H(false);return F(()=>{if(!t)return;const o=()=>{var r;return n(!!((r=Io())!=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 Df({key:t,id:e,label:n,glyph:o,onClick:r,expanded:s,controls:i,shortcut:a,lang:c,unavailable:l},d){const u=d==null?void 0:d[t];return u?f(u,{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(Nf,{label:n,children:o}),label:n,tip:f(Ke,{label:n,shortcut:a})},t):f(He,{id:e,label:n,onClick:l?void 0:r,unavailable:l,expanded:s,controls:i,shortcut:a,lang:c,children:o},t)}const zf=({fit:t=false,clusterRef:e,children:n})=>{const[o,r]=H(null),s=ms(o);$f(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})},Hf=()=>()=>{};function Wf(){return ee(Hf,Ic)}const Ui=new WeakMap;function rn(t,e){const[n,o]=H(()=>Ui.get(t)??null);return F(()=>{if(!e||n)return;let r=true;return t().then(s=>{Ui.set(t,s),r&&o(()=>s)},()=>{}),()=>{r=false}},[t,e,n]),n}function Uf(t,e,n){return t.reduce((o,r)=>o+r+n,-n)<=e}function jf(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 Vf({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 d=R(null),u=e.join(" ");return Ut(()=>{const p=t.ownerDocument,h=()=>{var N;const y=l.current,w=getComputedStyle(t),S=parseFloat(w.columnGap)||0;let v=t.clientWidth-(parseFloat(w.paddingLeft)||0)-(parseFloat(w.paddingRight)||0),b=0;for(const D of y){const j=(N=p.getElementById(D))==null?void 0:N.offsetWidth;j&&c.current.set(D,j),b=Math.max(b,c.current.get(D)??0)}for(const D of Array.from(t.children))!(D instanceof HTMLElement)||y.includes(D.id)||D.id===n||D.classList.contains("clover-canvas-more")||!D.offsetWidth||getComputedStyle(D).position==="absolute"||(v-=D.offsetWidth+S);const x=Uf(y.map(D=>c.current.get(D)??b),v,S);if(x===i.current)return;const k=p.activeElement;d.current=k instanceof HTMLElement&&t.contains(k)?k.id:null,i.current=x,a.current(x)};h();const m=new ResizeObserver(()=>h());m.observe(t);const g=new MutationObserver(()=>h());return g.observe(t,{childList:true}),()=>{m.disconnect(),g.disconnect()}},[t,u,n]),Ut(()=>{if(!r)return;const p=d.current;if(d.current=null,p===null)return;const h=t.ownerDocument.activeElement;(!h||!t.contains(h)||h.closest("[hidden]"))&&jf(t,p,n)},[o,r,t,n]),null}const qf=()=>import("./AnnotationMenu-BGv-HimF.mjs"),Kf=()=>import("./ChaptersMenu-kchuXDZy.mjs"),Zf=()=>import("./ChoiceMenu-C8pEoSC6.mjs"),Gf=()=>import("./ImageControls-Lz-ESk1X.mjs"),ji=2,Xf=new Set(["zoomIn","zoomOut","rotateRight","rotateLeft","reset","fullPage"]),Ac={atMax:false,atMin:false,atHome:false},Yf=({renderer:t,instance:e,config:n,controlButtons:o,limits:r=Ac,placeholder:s,placeholderIsMore:i=false,choices:a=[],selections:c={},onSelect:l,annotations:d=[],chapters:u=[],mediaElement:p=null,onChapter:h,overStill:m,request:g,hiddenPages:y,onPageVisibilityChange:w,selectedAnnotation:S=null,onAnnotationSelect:v,onAnnotationActivate:b,captionId:x,captionOpen:k=false,onCaptionToggle:N,placeId:D,placeOpen:j=false,onPlaceToggle:et,language:V,fit:nt=true,more:Y="auto",children:J})=>{var Vn,qn,$e,yn;const{t:M,langOf:T}=Et(),[O,U]=H(false),[Q,at]=H(false),ct=`annotations-${e}`,mt=`${ct}-menu`,_=M("informationPanelTabsAnnotations"),I=T("informationPanelTabsAnnotations"),P=ut(X=>{var pt;at(false),b==null||b(null),X&&((pt=document.getElementById(ct))==null||pt.focus())},[ct,b]),A=n.annotations&&d.length>0&&v,[B,Z]=H(false),E=`chapters-${e}`,z=`${E}-menu`,K=u.length>0&&!!h,G=R(false),ht=R(null);F(()=>{const X=()=>{var pt;G.current=((pt=document.activeElement)==null?void 0:pt.id)===E};return document.addEventListener("focusin",X),()=>document.removeEventListener("focusin",X)},[E]);const ft=ut(()=>{var pt,ke;if(!G.current)return;G.current=false;const X=document.activeElement;X&&X!==document.body||(ke=(pt=ht.current)==null?void 0:pt.querySelector('.clover-canvas-transport :is([data-button="play"], [data-button="pause"])'))==null||ke.focus()},[]);F(()=>{K||ft()},[K,ft]),F(()=>()=>ft(),[ft]);const Rt=ut(X=>{var pt;Z(false),X&&((pt=document.getElementById(E))==null||pt.focus())},[E]),At=n.information&&x&&N,zt=n.map&&D&&et,Ht=`choice-${e}`,gt=a.length===1?wt(a[0].label,V):null,q=(gt==null?void 0:gt.text)||M("canvasChoice"),ot=gt!=null&>.text?gt.lang:T("canvasChoice"),_t=`${Ht}-menu`,Ft=(Vn=rn(qf,!!A))==null?void 0:Vn.default,$=(qn=rn(Kf,K))==null?void 0:qn.default,lt=($e=rn(Zf,a.length>0&&!!l))==null?void 0:$e.default,Ot=ut(X=>{var pt;U(false),X&&((pt=document.getElementById(Ht))==null||pt.focus())},[Ht]),Ze=Wf(),[Gt,Ge]=H(null);F(()=>{ht.current=(Gt==null?void 0:Gt.closest(".clover-canvas"))??null},[Gt]);const Xe=ms(Gt),[me,Re]=H(false),Hn=X=>f(He,{className:X,id:ct,label:_,lang:I,onClick:()=>at(pt=>!pt),expanded:Q,controls:mt,children:f(pf,{})},"annotations"),Wn=(()=>{const X=[],pt=t;return n.zoom&&pt&&X.push({key:"zoomIn",id:`zoomIn-${e}`,shortcut:te.zoomIn,label:M("imageZoomIn"),lang:T("imageZoomIn"),glyph:f(Tf,{}),unavailable:r.atMax,onClick:()=>pt.zoomBy(ji)},{key:"zoomOut",id:`zoomOut-${e}`,shortcut:te.zoomOut,label:M("imageZoomOut"),lang:T("imageZoomOut"),glyph:f(If,{}),unavailable:r.atMin,onClick:()=>pt.zoomBy(1/ji)}),n.fullPage&&Ze&&X.push({key:"fullPage",id:`fullPage-${e}`,label:M(Xe?"imageExitFullScreen":"imageFullScreen"),lang:T(Xe?"imageExitFullScreen":"imageFullScreen"),glyph:Xe?f(Pf,{}):f(Lf,{}),onClick:ke=>void Pc(ke.currentTarget)}),n.rotation&&pt&&X.push({key:"rotateRight",id:`rotateRight-${e}`,shortcut:te.rotateRight,label:M("imageRotateRight"),lang:T("imageRotateRight"),glyph:f(Wi,{}),onClick:()=>pt.rotateBy(90)},{key:"rotateLeft",id:`rotateLeft-${e}`,shortcut:te.rotateLeft,label:M("imageRotateLeft"),lang:T("imageRotateLeft"),glyph:f(Wi,{}),onClick:()=>pt.rotateBy(-90)}),n.reset&&pt&&X.push({key:"reset",id:`reset-${e}`,shortcut:te.reset,label:M("imageResetZoom"),lang:T("imageResetZoom"),glyph:f(Af,{}),unavailable:r.atHome,onClick:()=>pt.home()}),a.length&&X.push({key:"choice",id:Ht,label:q,lang:ot,glyph:f(Of,{}),onClick:()=>U(ke=>!ke),expanded:O,controls:_t}),X})(),ne=[...Wn.filter(X=>X.key!=="fullPage"),...Wn.filter(X=>X.key==="fullPage")].map(X=>({id:X.id,view:Xf.has(X.key),node:Df(X,o)})),mn=[zt&&{id:`place-${e}`,view:false,node:f(He,{id:`place-${e}`,label:M("mapLabel"),lang:T("mapLabel"),onClick:et,expanded:j,controls:D,children:f(vf,{})},"place")},K&&{id:E,view:false,node:f(He,{id:E,label:M("playerChapters"),lang:T("playerChapters"),onClick:()=>Z(X=>!X),expanded:B,controls:z,children:f(mf,{})},"chapters")},A&&{id:ct,view:false,node:Hn()},At&&{id:`information-${e}`,view:false,node:f(He,{id:`information-${e}`,label:M("informationPanelTabsAbout"),lang:T("informationPanelTabsAbout"),onClick:N,expanded:k,controls:x,children:f(gf,{})},"information")},!!s&&{id:`placeholder-${e}`,view:false,node:f(ue.Fragment,{children:s},"placeholder")}].filter(X=>!!X),Un=mn.filter(X=>X.id===`placeholder-${e}`),Vt=[...ne.filter(X=>X.view),...Un],gn=[...ne.filter(X=>!X.view),...mn.filter(X=>!Un.includes(X))],oe=[...Vt,...gn],[Be,Bo]=H(true),vn=Y==="always"||i,Lt=(yn=rn(Gf,nt&&(i||(vn||!Be)&&oe.some(X=>X.view))))==null?void 0:yn.ImageControls,qt=Be&&!vn||!Lt?[]:oe.filter(X=>X.view),Se=i&&!!s&&!!Lt;F(()=>{qt.length||Re(false)},[qt.length]);const jn=X=>X.filter(pt=>!qt.includes(pt)&&!(Se&&pt.id===`placeholder-${e}`)).map(({node:pt})=>pt);return f(Ct,{children:[f(zf,{fit:nt,clusterRef:Ge,children:[jn(Vt),Lt&&(qt.length>0||Se)&&f(Lt,{instance:e,open:Se?qt.length>0:me,onOpenChange:Re,toggle:Se?s:void 0,children:qt.map(({node:X})=>X)}),jn(gn),J]}),nt&&!vn&&Gt&&f(Vf,{cluster:Gt,ids:oe.map(({id:X})=>X),more:`more-${e}`,fits:Be,settled:Be||qt.length>0||!oe.some(X=>X.view),onFits:Bo}),$&&B&&K&&f($,{id:z,triggerId:E,label:M("playerChapters"),labelLang:T("playerChapters"),chapters:u,element:p,onChapter:h,overStill:m,request:g,onClose:Rt}),Ft&&Q&&A&&f(Ft,{id:mt,triggerId:ct,label:_,labelLang:I,annotations:d,hiddenPages:y,onPageVisibilityChange:w,selected:S,onSelect:v,onActivate:X=>b==null?void 0:b(X),onClose:P}),lt&&O&&a.length>0&&l&&f(lt,{id:_t,triggerId:Ht,label:q,labelLang:ot,language:V,choices:a,selections:c,onSelect:l,onClose:Ot})]})},Jf=["jpg","png","webp","gif"];class Or extends Error{constructor(e,n,o){super(e),this.url=n,this.status=o,this.name="ImageServiceError"}}function gs(t){return t.replace(/\/info\.json$/,"").replace(/\/+$/,"")}function Lo(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 gs(a)}}function Qf(t,e){if(!t||typeof t!="object")throw new Or("info.json is not an object",e??"");const n=t,o=th(n),r=o===3?n.id??n["@id"]:n["@id"]??n.id,s=gs(r??e??""),i=Number(n.width),a=Number(n.height);if(!s||!(i>0)||!(a>0))throw new Or("info.json is missing id, width or height",e??s);const c=Array.isArray(n.profile)?n.profile:[n.profile],l=c.find(S=>typeof S=="string"),d=c.filter(S=>!!S&&typeof S=="object"),u=eh(l),p=new Set([...Array.isArray(n.extraFeatures)?n.extraFeatures:[],...d.flatMap(S=>Array.isArray(S.supports)?S.supports:[])]),m=[...Array.isArray(n.preferredFormats)?n.preferredFormats:[]].map(S=>String(S).toLowerCase()).find(S=>Jf.includes(S))??"jpg",g=S=>{var b;const v=n[S]??((b=d.find(x=>x[S]!==void 0))==null?void 0:b[S]);return Number(v)>0?Number(v):void 0};let y=g("maxWidth"),w=g("maxHeight");return y&&!w&&(w=y),w&&!y&&(y=void 0),{id:s,version:o,level:u,width:i,height:a,tiles:nh(n.tiles),sizes:oh(n.sizes),maxWidth:y,maxHeight:w,maxArea:g("maxArea"),regionByPx:u>=1||p.has("regionByPx"),sizeByW:u>=1||p.has("sizeByW")||p.has("sizeByWh"),format:m,quality:"default"}}function th(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 eh(t){const e=t==null?void 0:t.match(/level([012])/);return e?Number(e[1]):0}function nh(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 oh(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 mo(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 rh(t){return t.version===2&&t.level===0?"native":void 0}const sr=new Map;function vs(t,{request:e}={}){const n=gs(t),o=sr.get(n);if(o)return o;const r=`${n}/info.json`,s=ds(e,r,{headers:{Accept:"application/ld+json, application/json"}}).then(async i=>{if(!i.ok)throw new Or(`info.json request failed with ${i.status}`,r,i.status);return Qf(await i.json(),n)}).catch(i=>{throw sr.delete(n),i});return sr.set(n,s),s}function sh(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 gy(t,e){var n;if(t.currentTime=e,!!t.paused)try{(n=t.play())==null||n.catch(()=>{})}catch{}}function ys(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 ih=(t,e,n,o,r)=>`${t}|${e??`${n}:${o}`}|${r}`,ah=/^((application|audio|video)\/)?(vnd\.apple\.|x-)?mpegurl$/i,ch=(t,e)=>!!(t&&/\.m3u8$/i.test(t.split(/[?#]/)[0]))||!!(e&&ah.test(e)),lh={width:1600,height:900};function uh(t,e){const n=new Array(t.length);if(!t.length)return n;const o=t.map(dn),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,d)=>d);s&&a.reverse();let c=0;for(const l of a){const d=o[l],u=i/(r?d.height:d.width),p=d.width*u,h=d.height*u;n[l]=r?{x:c,y:0,width:p,height:h}:{x:0,y:c,width:p,height:h},c+=r?p:h}return n}function dn(t){var s,i;if(t.width&&t.height)return{width:t.width,height:t.height};const e=Oc(t);if(e!=null&&e.width&&e.height)return{width:e.width,height:e.height};const n=((s=go(t)[0])==null?void 0:s.body)??((i=vo(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}:lh}function Oc(t){return t.accompanyingContainer??t.placeholderContainer}function dh(t,e,n,o,r){return ih(t.id,e.id,n,o,r)}function fh(t){const e=[];for(const n of t)Nc(n,(o,r)=>{const s=o;if((s==null?void 0:s.type)!=="Choice")return;const i=W(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 ir={};function hh(t){if(t.type!=="Video"&&!Bn(t.type)||!t.format||ch(t.id,t.format)||typeof document>"u")return true;const e=t.type==="Video"?"video":"audio",n=ir[e]??(ir[e]=document.createElement(e));return typeof n.canPlayType!="function"?true:n.canPlayType(t.format)!==""}function ph(t){const e={};for(const n of t){const o=n.items.findIndex(hh);o>0&&(e[n.key]=o)}return e}const ar=new WeakMap,cr=[];function mh(t){return Mo(t).some(e=>((e==null?void 0:e.type)==="Choice"?W(e.items):[e]).some(o=>(o==null?void 0:o.type)==="Video"||Bn(o==null?void 0:o.type)))}function Nr(t){var i;const e=ar.get(t);if(e)return e;const n=[];for(const a of t.items??[])for(const c of a.items??[]){if(!is(c))continue;const l=c.target?(i=hn(c.target))==null?void 0:i.t:void 0;if(!l)continue;const[d,u]=l.split(",").map(Number);Number.isFinite(d)&&n.push({annotation:c,start:d,end:Number.isFinite(u)?u:NaN})}if(n.every(a=>mh(a.annotation)))return ar.set(t,cr),cr;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 d;const l=(d=n[c+1])==null?void 0:d.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:cr;return ar.set(t,s),s}const Pn=t=>`frame:${t.id}`;function Nc(t,e){(t.items??[]).forEach((n,o)=>{(n.items??[]).forEach((r,s)=>{is(r)&&Mo(r).forEach((i,a)=>e(i,dh(t,r,o,s,a),r))})})}function go(t,e={},{allFrames:n=false}={}){const o=[];return bs(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 gh(t,e={}){for(const n of t){let o;if(bs(n,e,r=>{o??(o=r.body.type)}),typeof o=="string")return o.toLowerCase()}}function vo(t,e={}){const n=[];return bs(t,e,(o,r,s,i)=>{const a=o.body.type;if(a!=="Video"&&!Bn(a))return;const c=ys(i);n.push({kind:a==="Video"?"video":"audio",body:o.body,target:r,...c?{time:c}:{}})}),n}function vh(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 bs(t,e,n,o=false){const r=t.width??0,s=t.height??0,i=Nr(t),a=Math.min(e[Pn(t)]??0,Math.max(0,i.length-1));Nc(t,(c,l,d)=>{const u=i.findIndex(g=>g.annotation===d);if(!o&&u>=0&&u!==a)return;const p=Rr(c,e[l]??0);if(!p)return;const h=d.target?hn(d.target):void 0,m=h==null?void 0:h.rect;n(p,m?{x:m.x,y:m.y,width:m.w,height:m.h}:{x:0,y:0,width:r||Number(p.body.width)||0,height:s||Number(p.body.height)||0},u,h==null?void 0:h.t)})}function Rc(t){return Bc(t).filter(e=>e.kind!=="transcript")}function yh(t){const e=W(t.provides);return e.includes("closedCaptions")?"captions":e.includes("subtitles")||e.includes("translation")?"subtitles":e.includes("transcript")?"transcript":"captions"}function Bc(t){const e=[],n=[...t.annotations??[],...t.items??[]];for(const o of n)for(const r of o.items??[])if(W(r.motivation).includes("supplementing"))for(const s of W(r.body)){const i=s,a=(i==null?void 0:i.type)==="Choice"?W(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:W(c.language)[0],kind:yh(r)})}}return e}function bh(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:W(s==null?void 0:s.language)[0]})},o=[...t.annotations??[],...t.items??[]];for(const r of o)for(const s of r.items??[])if(W(s.motivation).includes("supplementing"))for(const i of W(s.body)){const a=i;((a==null?void 0:a.type)==="Choice"?W(a.items):[a]).forEach(n)}return W(t.rendering).forEach(n),e}function Rr(t,e=0){if(!t||typeof t!="object")return null;const n=t;if(n.type==="Choice"){const o=W(n.items);return Rr(o[e]??o[0])}if(n.type==="SpecificResource"&&n.source){const o=typeof n.source=="string"?{id:n.source}:n.source,r=W(n.selector).find(a=>(a==null?void 0:a.type)==="ImageApiSelector"),s=Rr({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"&&!Bn(n.type)?null:{body:n,region:typeof n.region=="string"?n.region:void 0}}function _h(t,e,n={},{standIns:o=true}={}){const r=uh(t,e),s=[],i=[],a={};return t.forEach((c,l)=>{const d=r[l],u=dn(c),p=d.width/u.width,h=d.height/u.height,m=b=>({x:d.x+b.x*p,y:d.y+b.y*h,width:b.width*p,height:b.height*h}),g=vo(c,n),y=go(c,n,{allFrames:true}).map(b=>({...b,canvas:c})),w=Oc(c);if(o&&!y.length&&g.some(b=>b.kind==="audio")&&w){const b=dn(w);for(const x of go(w))y.push({...x,canvas:w,target:{x:x.target.x/b.width*u.width,y:x.target.y/b.height*u.height,width:x.target.width/b.width*u.width,height:x.target.height/b.height*u.height}})}const S=n[Pn(c)]??0;y.forEach(({body:b,target:x,region:k,rotation:N,frame:D,canvas:j},et)=>{var J;const V=Lo(b.service);if(!V&&!b.id)return;const nt=`${j.id}|${et}|${b.id??V}|${k??""}|${N??""}`,Y=!(V&&k);if(s.push({id:nt,service:V,url:b.id,width:Y&&Number(b.width)||void 0,height:Y&&Number(b.height)||void 0,region:k,...N?{rotation:N}:{},placement:m(x),...D!=null&&D!==S?{hidden:true}:{}}),D!=null){const M=a[J=Pn(c)]??(a[J]=[]);(M[D]??(M[D]=[])).push(nt)}});const[v]=g;if(v!=null&&v.body.id){const b=vh(g),x=b?b[0]:void 0;i.push({id:`${c.id}|media|${v.body.id}`,kind:v.kind,src:(x==null?void 0:x.src)??v.body.id,format:x?x.format:v.body.format,placement:m(v.target),duration:b?Number(c.duration)||void 0:Number(v.body.duration??c.duration)||void 0,...b?{segments:b}:{},poster:wh(c),captions:Rc(c)})}}),{images:s,media:i,placements:r,frames:a}}function wh(t){var e;return(e=$c(t))==null?void 0:e.source}const vy=1280;function $c(t){var c;const e=t.placeholderContainer;if(!e)return;const n=(c=go(e)[0])==null?void 0:c.body;if(!n)return;const o=Lo(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}=dn(e);return{source:s,width:i,height:a}}function xh(t,e,n){const o=dn(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}=Et(),o=e("imageExitFullScreen");return f("button",{"aria-label":o,...dt(n("imageExitFullScreen")),className:"clover-canvas-exit-full-screen",hidden:t,onClick:r=>void Pc(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]})},Fc="50%";function Dc(t,e=Fc,n=null){const[o,r]=H(()=>typeof IntersectionObserver>"u");return F(()=>{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 kh(t){const[e,n]=H(false);return F(()=>{if(!t)return;const o=()=>n(Io()===t);return o(),document.addEventListener("fullscreenchange",o),document.addEventListener("webkitfullscreenchange",o),()=>{document.removeEventListener("fullscreenchange",o),document.removeEventListener("webkitfullscreenchange",o)}},[t]),e}function Ch(t){const[e,n]=H(false);return F(()=>{if(!t)return;const o=()=>{const r=Io();n(r===t||!!r&&Lc(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 Eh extends ue.Component{constructor(){super(...arguments);L(this,"state",{error:null})}static getDerivedStateFromError(n){return{error:n}}render(){const{error:n}=this.state;return n?f(Mh,{error:n}):this.props.children}}function Mh({error:t}){const{t:e,langOf:n}=Et();return f("div",{className:"clover-canvas-error",role:"alert",children:[f("p",{className:"clover-canvas-error-headline","data-testid":"headline",...dt(n("statusError")),children:e("statusError")}),t.message&&f("span",{className:"clover-canvas-error-body",lang:"en",children:t.message})]})}function En({overlay:t=false,className:e}){return f("span",{"aria-hidden":"true",className:It("clover-loading",e),"data-overlay":t||void 0,children:f("span",{})})}const Th={image:"bodyUnloadableImage",video:"bodyUnloadableVideo",audio:"bodyUnloadableAudio",model:"bodyUnloadableModel"};function Ih({kind:t,shown:e,room:n=false}){const{t:o,langOf:r}=Et(),s=Th[t];return f("div",{className:"clover-body-unloadable","data-room":n||void 0,role:"status",children:e&&f("p",{...dt(r(s)),children:o(s)})})}function Lh({text:t,lang:e}){return f("div",{className:"clover-body-note","aria-hidden":"true",children:f("p",{...dt(e),children:t})})}function Po(t,e,n=false,o){const r=pe(),{hostLanguage:s}=Et(void 0,o);if(n)return{props:{},node:null};const i=Co(e,s);return i===void 0?{props:{"aria-label":t},node:null}:{props:{"aria-labelledby":r},node:f("span",{hidden:true,id:r,...dt(i),children:t})}}const Ph=Object.freeze({a:1,b:0,c:0,d:1,e:0,f:0});function se(t,e){return{a:1,b:0,c:0,d:1,e:t,f:e}}function de(t,e=t){return{a:t,b:0,c:0,d:e,e:0,f:0}}function Fn(t){const e=Math.cos(t),n=Math.sin(t);return{a:e,b:n,c:-n,d:e,e:0,f:0}}function Ah(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 fe(...t){return t.reduce((e,n)=>Ah(e,n),Ph)}function Oh(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 be(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 yy(t){return`matrix(${[t.a,t.b,t.c,t.d,t.e,t.f].map(Rh).join(",")})`}function Nh(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 Rh(t){const e=Math.round(t*1e6)/1e6;return Object.is(e,-0)?"0":String(e)}function zc(t){return{x:t.x+t.width/2,y:t.y+t.height/2}}function _s(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 Bh(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 Ao(t,e){const n=[be(t,{x:e.x,y:e.y}),be(t,{x:e.x+e.width,y:e.y}),be(t,{x:e.x,y:e.y+e.height}),be(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 wn(t,e,n){return Math.min(Math.max(t,e),n)}const lr=t=>!!(t&&"overlays"in t);let Br;const $h=()=>Promise.resolve().then(()=>$d).then(t=>{Br=t.buildContentState}),Fh=vt(()=>import("./MediaBody-D4hiLqhm.mjs")),Dh=()=>import("./AnnotationState-uRm7bEwg.mjs"),zh=new Map,Hh={menu:[],placed:[],timed:[],hiddenPages:[],setPagesVisible:()=>{},listedCount:0,comments:zh,selected:null,select:()=>{},activate:()=>{},release:()=>false,quietlyOpened:null},Wh=vt(()=>import("./FrameAnimation-BO3QVSUw.mjs")),Vi=vt(()=>import("./PlaceBox-OytRM9_s.mjs")),Uh=vt(()=>import("./Placeholder-BWuq47Sw.mjs")),jh=vt(()=>import("./ControlsFade-BKkJ95B5.mjs")),Vh=()=>true,qh=vt(()=>import("./Placeholder-BWuq47Sw.mjs").then(({PlaceholderToggle:t})=>({default:t}))),qi={zoom:true,fullPage:true,rotation:true,reset:true,annotations:true,information:true,map:true},Kh={zoom:false,fullPage:false,rotation:false,reset:false,annotations:false,information:false,map:false},Zh={description:"canvasKeysImage",keys:["ArrowLeft ArrowRight ArrowUp ArrowDown",te.zoomIn.keys,te.zoomOut.keys,te.reset.keys,te.rotateRight.keys,te.rotateLeft.keys].join(" ")},Gh={description:"canvasKeysMedia",keys:[te.play.keys,"J L",te.mute.keys].join(" ")},Xh={description:"canvasKeysAnnotations",keys:"Escape"},Yh=t=>{var n;return!!((n=t.canvases)!=null&&n.length)||Hc(t.body,t.src).length>0?f(Eh,{children:f(Jh,{...t})}):null},Jh=t=>{var Vs,qs,Ks,Zs,Gs,Xs;const{surface:e,manifestId:n,canvases:o,viewingDirection:r,body:s,src:i,isTiledImage:a=false,label:c,partOf:l,language:d,highContrast:u,instanceId:p,className:h,options:m,navigator:g=false,controls:y=true,collapseControls:w="auto",controlButtons:S,annotations:v,onReady:b,onViewportChange:x,onContentStateChange:k,onMediaElement:N,onCaptionChange:D,caption:j,onEnded:et,chapters:V,highlightedChapter:nt,onChapterHighlight:Y,placeholder:J=true,children:M}=t,{t:T}=Et(),O=R(null),[U,Q]=H(null),at=kh(U),ct=ms(U),mt=Ch(U),_=Eo(Q),I=Jr(u),P=!!e.controlsVisibility,B=(e.controlsVisibility??Vh)(P?U:null,m==null?void 0:m.hideDelay,O),[Z,E]=H(false),z=Dc(U),K=pe(),[G]=H(()=>p??`clover-canvas-${K}`),ht=R(null),[ft,Rt]=H(null),At=lr(ft)?ft:null,[zt,Ht]=H(null),gt=y===false?null:y===true?qi:{...qi,...y},[q,ot]=H("loading"),[_t,Ft]=H(false),[$,lt]=H(0),[Ot,Ze]=H(Ac),Gt=R(b),Ge=R(x),Xe=R(m);Gt.current=b,Ge.current=x,Xe.current=m;const me=ss(r),Re=bt(()=>fh(o??[]),[o]),Hn=bt(()=>ph(Re),[Re]),[Ro,Wn]=H({}),ne=bt(()=>({...Hn,...Ro}),[Hn,Ro]),mn=(C,tt)=>Wn(yt=>({...yt,[C]:tt})),Un=bt(()=>v==null?void 0:v.filter(C=>!C.layer||(ne[C.layer.key]??0)===C.layer.item),[v,ne]),Vt=(Vs=v==null?void 0:v.find(C=>C.layer&&C.annotation.id===t.selectedAnnotation))==null?void 0:Vs.layer;F(()=>{Vt&&(ne[Vt.key]??0)!==Vt.item&&mn(Vt.key,Vt.item)},[Vt==null?void 0:Vt.key,Vt==null?void 0:Vt.item,t.selectedAnnotation]);const gn=!!(gt!=null&>.information),oe=!!(v!=null&&v.length),Be=rn(Dh,oe),[Bo,vn]=H(null),Lt=oe&&Bo||Hh,qt=bt(()=>{var yt,Nt;const C=(yt=v==null?void 0:v.find(Kt=>Kt.annotation.id===Lt.selected))==null?void 0:yt.annotation,tt=(Array.isArray(C==null?void 0:C.body)?C==null?void 0:C.body:[C==null?void 0:C.body]).find(Kt=>(Kt==null?void 0:Kt.type)==="Feature");return C&&tt?{id:String(C.id),feature:tt,name:((Nt=tt.properties)==null?void 0:Nt.label)??C.label}:null},[v,Lt.selected]),Se=qt?`${qt.id}:${t.refind??0}`:null,[jn,Vn]=H(null),qn=Se!==null&&jn!==Se,$e=bt(()=>{var Kt,en;const C=(o??[]).map(Yt=>Yt.navPlace).filter(Boolean),tt=C.length?C:t.navPlace?[t.navPlace]:[];if(!tt.length)return null;const yt=tt.flatMap(Yt=>(Yt==null?void 0:Yt.type)==="FeatureCollection"?Yt.features??[]:(Yt==null?void 0:Yt.type)==="Feature"?[Yt]:[]);if(!yt.length)return null;const Nt=yt.length===1?(en=(Kt=yt[0])==null?void 0:Kt.properties)==null?void 0:en.label:void 0;return{feature:{type:"FeatureCollection",features:yt},name:Nt??t.label}},[o,t.navPlace,t.label]),yn=`place-box-${G}`,[X,pt]=H(false),[ke,Tl]=H(false),Kn=R(Lt);Kn.current=Lt;const Zn=ut(()=>Kn.current.release(),[]),{comments:$o,listedCount:Ls}=Lt,Ye=bt(()=>gn?(o??[]).filter(C=>Ef(C)||$o.has(C.id)):[],[o,gn,$o]),Fo=`caption-${G}`,[Il,Ps]=H(false),Do=Il&&Ye.length>0,As=ut(C=>{var tt;Ps(false),C&&((tt=document.getElementById(`information-${G}`))==null||tt.focus())},[G]),Xt=bt(()=>(o??[]).find(C=>Nr(C).length)??null,[o]),Ll=Xt?Nr(Xt):tp,Wt=bt(()=>o!=null&&o.length?_h(o,me,ne,{standIns:o.length>1}):null,[o,me,ne]),Pl=bt(()=>Hc(s,i,a),[s,i,a]),rt=(Wt==null?void 0:Wt.media[0])??null,Os=!P&&(rt==null?void 0:rt.kind)==="video",Al=P||Os,Ol=P?B:Z,Nl=bt(()=>{if(o!=null&&o.length)return gh(o,ne);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,ne,s,i]),[Dt,Rl]=H(null),Gn=R(N);Gn.current=N;const Bl=ut(C=>{var tt;Rl(C),(tt=Gn.current)==null||tt.call(Gn,C)},[]),Ce=Wt?Wt.images:Pl,Ee=!!rt&&(o==null?void 0:o.length)===1,Me=Ee&&(rt==null?void 0:rt.kind)==="audio",$l=Ee&&(rt==null?void 0:rt.kind)==="video",Je=(o==null?void 0:o.length)===1&&!rt&&!Xt&&Ce.length===0,Xn=!Ee&&!Je&&((qs=m==null?void 0:m.gestures)==null?void 0:qs.navigable)!==false,ge=o?`${n??""}
|
|
2
|
+
${o.map(C=>C.id).join("|")}`:null,Te=bt(()=>{if(!o||!J)return[];const C=o.flatMap(tt=>{const yt=$c(tt),Nt=wt(tt.label,d);return yt?[{...yt,alt:Nt.text,lang:Nt.lang}]:[]});return me==="right-to-left"||me==="bottom-to-top"?C.reverse():C},[o,me,J,d]),[Fl,Ns]=H(false),[Dl,Rs]=H(null),xt=!Me&&Te.length>0&&(rt?Dl!==ge:!Fl),Bs=m==null?void 0:m.request;F(()=>{if(xt){Promise.resolve().then(()=>Bm);for(const{source:C}of Te)C.service&&vs(C.service,{request:Bs}).catch(()=>{})}},[xt,Te,Bs]);const $s=(C,{annotations:tt=false,fullPage:yt=false}={})=>({...C,zoom:false,rotation:false,reset:false,fullPage:yt&&C.fullPage,annotations:tt&&C.annotations}),bn=Je&&ct,Fs=ue.Children.count(M)>0,zo=Te.length>0&&!Me&&!rt,_n=gt?xt?Ye.length||Fs||Ls||rt&&(V!=null&&V.length)?$s(gt,{annotations:true}):null:Ee||Je?Re.length||Ye.length||Fs||Ls||rt&&(V!=null&&V.length)||bn&>.fullPage?$s(gt,{annotations:true,fullPage:bn}):null:gt:null,Ho=g&&!xt&&(rt?rt.kind==="audio"&&!Ee&&Ce.length>0:true),[Wo,zl]=H(null),Qe=rt?Wo??rt.placement:null,[Yn,Hl]=H(ep),Uo=bt(()=>{const C=(rt==null?void 0:rt.kind)==="video"&&Dt&&Qe?[...Ce,{id:rt.id,placement:Qe,width:Qe.width,height:Qe.height,media:{element:Dt}}]:Ce;return Yn.length?[...C,...Yn]:C},[Ce,rt,Dt,Qe,Yn]),Ds=Ee&&(rt==null?void 0:rt.kind)==="video"&&Wo?Wo:Wt?_s(Wt.placements):null,Wl=JSON.stringify([Ce,Ds,Uo.length!==Ce.length&&[rt==null?void 0:rt.id,Qe],Yn.map(C=>C.id)]),Jn=R(null),jo=R(false),Vo=()=>{rt?Rs(xt?ge:null):Ns(xt),xt||Zn()},Qn=R(null),Ul=C=>{if(Dt&&!xt){Dt.currentTime=C;return}Qn.current=C,xt&&Vo()};F(()=>{!Dt||Qn.current===null||(Dt.currentTime=Qn.current,Qn.current=null)},[Dt]);const qo=Array.isArray(s)?s[0]:s,Pt=[c,(Ks=o==null?void 0:o[0])==null?void 0:Ks.label,qo==null?void 0:qo.label].map(C=>wt(C,d)).find(C=>C.text),jl=bt(()=>{const C=wt(l,d);return C.text&&C.text!==(Pt==null?void 0:Pt.text)?C:void 0},[l,d,Pt==null?void 0:Pt.text]),zs=Po((Pt==null?void 0:Pt.text)||T("canvasImage"),Pt?Pt.lang:_.langOf("canvasImage"),false,_.hostLanguage),to=xt?[]:[...Xn?[Zh]:[],...rt?[Gh]:[],...oe?[Xh]:[]],Hs=`keys-${G}`,Vl=Xn&&!xt&&!_.langOf("canvasRoleDescription")?T("canvasRoleDescription"):void 0,Ko=!!_n&&Ye.length>0,ql=Ko&&Ye.map((C,tt)=>wt(C.label,d).text?Tc(Fo,tt):null).filter(Boolean).join(" ")||void 0,Ws=R({canvases:o,scene:Wt,canvasKey:ge});Ws.current={canvases:o,scene:Wt,canvasKey:ge};const eo=R(null),Zo=ut(()=>{const{canvases:C,scene:tt,canvasKey:yt}=Ws.current;eo.current=C&&tt&&Jn.current===yt?{key:yt,canvases:C,placements:tt.placements}:null},[]),Kl=!o||((Zs=eo.current)==null?void 0:Zs.key)===ge,tn=kc(()=>{const C=eo.current,tt=ht.current;if(!C||n==="loading")return null;const yt=Dt&&Dt.currentTime>0?Dt.currentTime:null,Nt=!yt&&tt&&lr(tt)?Wc(tt.getBounds(),C.canvases,C.placements):null,Kt=C.canvases.find(en=>en.id===(Nt==null?void 0:Nt.canvasId))??C.canvases[0];return Kt?Br?Br({manifestId:n,canvasId:Kt.id,type:Kt.type,region:Nt&&{x:Nt.rect.x,y:Nt.rect.y,w:Nt.rect.width,h:Nt.rect.height},time:yt}):($h().then(()=>tn()),null):null},k);F(()=>Pr(Dt,tn),[Dt,tn]),F(()=>{const C=O.current;if(!C)return;const tt=e(C,Xe.current),yt=lr(tt)?tt:null;ht.current=tt,Rt(tt),tt.setDismiss(Zn);const Nt=()=>{if(!yt)return;const Zt=yt.viewLimits();Ze(ve=>ve.atMax===Zt.atMax&&ve.atMin===Zt.atMin&&ve.atHome===Zt.atHome?ve:Zt)},Kt=tt.on("open",()=>{var Zt;Nt(),Xo(false),Zo(),tn(),ot("ready"),lt(ve=>ve+1),yt&&((Zt=Gt.current)==null||Zt.call(Gt,Qh(yt,()=>eo.current,ve=>{var Js,Qs;const Ys=Kn.current.placed.find(Yo=>Yo.id===ve);return Ys?(Kn.current.select(Ys),(Qs=Array.from(((Js=yt.overlays)==null?void 0:Js.container.querySelectorAll("[id]"))??[]).find(Yo=>Yo.id===ve))==null||Qs.focus({preventScroll:true}),true):false})))}),en=tt.on("change",()=>{Nt(),Xo(false),Zo(),tn(),ot("ready"),lt(Zt=>Zt+1)}),Yt=tt.on("error",()=>{tt.isOpen||ot("error")}),Gl=tt.on("unloadable",Zt=>Ft(!!Zt)),Xl=tt.on("viewport",()=>{var Zt;Nt(),yt&&((Zt=Ge.current)==null||Zt.call(Ge,yt.getBounds())),tn()});return()=>{Kt(),en(),Yt(),Gl(),Xl(),tt.dispose(),ht.current=null,Rt(null)}},[p,e,Zn,Zo]),F(()=>{if(!(!At||!zt))return At.attachNavigator(zt)},[At,zt]),F(()=>{if(!(!ft||!Je))return ft.setGestures({navigable:false}),()=>ft.setGestures({})},[ft,Je]);const Go=R(false);F(()=>{var tt;if(bn)return;const C=!document.activeElement||document.activeElement===document.body;Go.current&&C&&((tt=O.current)==null||tt.focus()),Go.current=false},[bn]),F(()=>{const C=ht.current;if(xt&&(jo.current=true),!C||!z||xt)return;const tt=Jn.current!==null&&Jn.current!==ge;(!C.isOpen||tt)&&ot("loading");const yt=Ee||jo.current&&C.isOpen||tt;Jn.current=ge,jo.current=false,C.setImages(Uo,{world:Ds??void 0,fit:yt})},[Wl,p,Dt,z,xt]);const Us=R(n),[Zl,Xo]=H(false);Ut(()=>{var C;n!==Us.current&&(Us.current=n,(C=ht.current)==null||C.clear(),Xo(true),ot("loading"))},[n]);const js=q==="loading"&&Uo.length>0&&z&&!xt;return f(Nn.Provider,{value:_.hostLanguage,children:f("figure",{"aria-labelledby":ql,className:It("clover-canvas",h),"data-testid":"clover-canvas","data-status":q,...Qr(I),"data-unloadable":_t||void 0,"data-has-navigator":Ho,"data-fullscreen":at,"data-exit":mt||void 0,"data-controls":Al?Ol?"visible":"hidden":void 0,"data-media":Nl,"data-recording":rt?"":void 0,"data-player":Me?"":void 0,"data-animated":Xt?"":void 0,"data-navigable":Xn,"data-placeholder":Te.length&&!Me?xt:void 0,ref:_.ref,onFocus:C=>{Go.current=bn&&C.target.id===`fullPage-${G}`},onKeyDown:C=>{if(C.key==="Escape"&&Do&&!C.defaultPrevented){C.preventDefault(),As(false);return}if(C.key==="Escape"&&!C.defaultPrevented&&!C.currentTarget.querySelector(".clover-canvas-menu")&&Zn()){C.preventDefault();return}wf(C,O.current)},style:{position:"relative",width:"100%",height:"100%",margin:0,overflow:"hidden",isolation:"isolate"},children:[(_n||Ho)&&rt&&f("div",{className:"clover-canvas-scrim","aria-hidden":"true"}),Os&&f(St,{fallback:null,children:f(jh,{element:U,hideDelay:m==null?void 0:m.hideDelay,picture:O,onChange:E})}),f(Sh,{hidden:!mt}),ft&&(_n||zo)&&f(Yf,{renderer:At,instance:G,config:_n??Kh,controlButtons:S,limits:Ot,placeholderIsMore:zo&&!rt,chapters:rt?V:void 0,mediaElement:Dt,onChapter:Ul,overStill:!!rt&&xt,request:m==null?void 0:m.request,placeholder:zo&&f(St,{fallback:null,children:f(qh,{instance:G,media:!!rt,active:xt,onToggle:Vo,more:!!gt&&(gt.zoom||gt.rotation||gt.reset||gt.fullPage)})}),fit:!P,more:w,choices:xt?[]:Re,selections:ne,onSelect:mn,annotations:Lt.menu,hiddenPages:Lt.hiddenPages,onPageVisibilityChange:Lt.setPagesVisible,selectedAnnotation:Lt.selected,onAnnotationSelect:Lt.select,onAnnotationActivate:Lt.activate,captionId:Ko?Fo:void 0,captionOpen:Do,onCaptionToggle:()=>Ps(C=>!C),placeId:$e?yn:void 0,placeOpen:X,onPlaceToggle:()=>{Tl(true),pt(C=>!C)},language:d,children:_n&&M}),Ho&&f("div",{ref:Ht,className:"clover-canvas-navigator","data-testid":"clover-canvas-navigator","aria-hidden":"true"}),f("div",{ref:O,className:"clover-canvas-viewport",style:{position:"absolute",inset:0,overflow:"hidden",zIndex:-1},"data-testid":"clover-canvas-viewport",role:oe?"group":"img","aria-roledescription":Vl,...zs.props,"aria-describedby":to.length?Hs:void 0,"aria-keyshortcuts":to.map(({keys:C})=>C).join(" ")||void 0,"aria-busy":js,tabIndex:0}),zs.node,to.length>0&&f("span",{id:Hs,style:Ue,children:to.map(({description:C},tt)=>f(ue.Fragment,{children:[tt>0&&" ",f("span",{...dt(_.langOf(C)),children:T(C)})]},C))}),f(Ih,{kind:"image",shown:_t&&!xt}),Je&&!xt&&(Pt==null?void 0:Pt.text)&&f(Lh,{text:Pt.text,lang:Pt.lang||void 0}),(rt==null?void 0:rt.kind)==="audio"&&!Me&&Ce.length===0&&!xt&&(Pt==null?void 0:Pt.text)&&f("p",{className:"clover-canvas-sound-label","aria-hidden":"true",...dt(Pt.lang||void 0),children:Pt.text}),Te.length>0&&!Me&&f(St,{fallback:null,children:f(Uh,{instance:G,stills:Te,vertical:me==="top-to-bottom"||me==="bottom-to-top",media:!!rt,active:xt,lingering:q==="loading"&&!Zl,onToggle:Vo,request:m==null?void 0:m.request})}),ft&&rt&&z&&!xt&&f(St,{fallback:null,children:f(Fh,{media:rt,request:m==null?void 0:m.request,fillable:$l,surface:ft,instance:G,onElement:Bl,onFit:zl,onCaptionChange:D,caption:j,navigable:Xn,fullscreen:Ee&&!!(gt!=null&>.fullPage),isFullscreen:ct,onEnded:et,chapters:V,highlightedChapter:nt,onChapterHighlight:Y,autoPlay:!Me&&Te.length>0&&Lt.quietlyOpened!==ge,language:d,notes:Lt.timed,marked:Lt.placed,selectedAnnotation:Lt.selected,onAnnotationSelect:oe?Lt.select:void 0,onAnnotationActivate:Lt.activate,player:Me&&o?{canvas:o[0],title:Pt,partOf:jl}:void 0})}),At&&Xt&&(Wt==null?void 0:Wt.frames[Pn(Xt)])&&!xt&&f(St,{fallback:null,children:f(Wh,{renderer:At,frames:Ll,byFrame:Wt.frames[Pn(Xt)],animationKey:Xt.id,sceneVersion:$,autoplay:(Gs=m==null?void 0:m.animation)==null?void 0:Gs.autoplay,loop:(Xs=m==null?void 0:m.animation)==null?void 0:Xs.loop,onEnded:et,language:d,duration:Number(Xt.duration),canvas:Xt,place:Wt.placements[o.indexOf(Xt)],onItems:Hl},Xt.id)}),Be&&oe&&v&&f(Be.AnnotationState,{given:t,annotations:Un??v,scene:Wt,renderer:At,sceneVersion:$,drawn:Kl,media:rt,mediaElement:Dt,showPlaceholder:xt,canvasKey:ge,openImages:Ns,openMedia:Rs,host:O,onModel:vn,refind:t.refind??0}),js&&f(En,{overlay:true}),qt&&f(St,{fallback:null,children:f(Vi,{id:`place-of-${G}`,open:qn,onClose:C=>{var tt;Vn(Se),C&&((tt=document.getElementById(qt.id))==null||tt.focus())},feature:qt.feature,name:qt.name,language:d})}),$e&&ke&&f(St,{fallback:null,children:f(Vi,{id:yn,open:X,onClose:C=>{var tt;pt(false),C&&((tt=document.getElementById(`place-${G}`))==null||tt.focus())},feature:$e.feature,name:$e.name,language:d})}),Ko&&f(Mf,{id:Fo,canvases:Ye,comments:$o,open:Do,onClose:As,language:d})]})})};function Qh(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(xh(i.canvases[a],i.placements[a],r),s),true)},getCanvasRegion(){const o=e();return o?Wc(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 tp=[],ep=[];function Hc(t,e,n=false){const o=Array.isArray(t)?t:t?[t]:[];return o.length?o.map((s,i)=>{const a=Lo(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 Wc(t,e,n){let o=null;if(n.forEach((u,p)=>{const h=Math.max(t.x,u.x),m=Math.max(t.y,u.y),g=Math.min(t.x+t.width,u.x+u.width)-h,y=Math.min(t.y+t.height,u.y+u.height)-m;if(g<=0||y<=0)return;const w=g*y;(!o||w>o.area)&&(o={index:p,area:w,clip:{x:h,y:m,width:g,height:y}})}),!o)return null;const{index:r,clip:s}=o,i=e[r],a=n[r],c=dn(i),l=c.width/a.width,d=c.height/a.height;return{canvasId:i.id,rect:{x:Math.round((s.x-a.x)*l),y:Math.round((s.y-a.y)*d),width:Math.round(s.width*l),height:Math.round(s.height*d)}}}function np(t,e,n,o){return bt(()=>((o==null?void 0:o(t??null,(e==null?void 0:e.id)??null,e==null?void 0:e.duration))??[]).map(r=>{const s=wt(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 op(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 rp(t,e){const n=t.store.get().manifest;if(e.canvasId&&Bt(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 Uc(t){if(typeof t=="string")return Ki(t);const e=t;return(e==null?void 0:e.type)==="SpecificResource"?e:typeof(e==null?void 0:e.id)=="string"?Ki(e.id):e}const Ki=t=>t.replace(/\/((?:t|xywh)=[^/#]*)$/,"#$1");function jc(t){const e=W(t.thumbnail)[0];return e&&typeof e=="object"?{thumbnail:e}:{}}const Zi=new WeakMap,Gi=[];function sp(t,e,n){if(!t||!e)return Gi;let o=Zi.get(t);o||Zi.set(t,o=new Map);const r=`${e}|${n??""}`,s=o.get(r);if(s)return s;const i=[],a=new Set,c=d=>{if(!d||a.has(d.id??d))return;a.add(d.id??d);const u=!W(d.behavior).includes("no-nav");for(const p of W(d.items)){if((p==null?void 0:p.type)==="Range"){c(p);continue}if(!u)continue;const h=hn(Uc(p));if(h.id.split("#")[0]!==e)continue;const m=ys(h.t);m&&i.push({...d.id?{id:d.id}:{},label:d.label,...m,...jc(d)})}};for(const d of W(t.structures))c(d);i.sort((d,u)=>d.start-u.start);const l=i.length?i.map((d,u)=>{var p;return{...d,end:d.end??((p=i[u+1])==null?void 0:p.start)??n}}):Gi;return o.set(r,l),l}const Xi=new WeakMap,Yi=[];function ip(t){if(!t)return Yi;const e=Xi.get(t);if(e)return e;const n=new Map(W(t.items).map((c,l)=>[c==null?void 0:c.id,l])),o=new Set,r=c=>{var S,v;if(!c||o.has(c.id??c))return[];o.add(c.id??c);const l=[],d=[],u=[];let p;for(const b of W(c.items))if((b==null?void 0:b.type)==="Range"){const x=r(b);l.push(...x),x.forEach(k=>d.push(...k.canvasIds))}else{const x=hn(Uc(b));if(!x.id)continue;p??(p=x),d.push(x.id),u.push(x)}const h=W(c.behavior);if(h.includes("no-nav"))return l;const m=p??void 0,g={id:c.id??`range-${o.size}`,label:c.label,canvasId:(m==null?void 0:m.id)??((S=l[0])==null?void 0:S.canvasId),canvasIds:[...new Set(d)],...h.includes("sequence")?{sequence:true}:{},...jc(c),children:l},y=ys(m==null?void 0:m.t);return y?g.time=y:!m&&((v=l[0])!=null&&v.time)&&(g.time=l[0].time),m!=null&&m.rect&&(g.region=m.rect),(h.includes("sequence")&&u.length>1&&!u.some(b=>b.t)||ap(u,n))&&(g.parts=u.map(b=>({canvasId:b.id,...b.rect?{region:b.rect}:{}}))),[g]},s=W(t.structures).flatMap(r),i=s.length===1&&s[0].children.length?s[0].children:s,a=i.length?i:Yi;return Xi.set(t,a),a}function ap(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 by(t,e,n,o){let r=null,s=null;const i=(l,d,u)=>!l||u>l.depth||u===l.depth&&!(l.sequence&&d.sequence),a=(l,d,u)=>{const p=u||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:d,...l.sequence?{sequence:true}:{}};i(r,l,d)&&(r=m),p&&i(s,l,d)&&(s=m)}l.children.forEach(h=>a(h,d+1,p))};t.forEach(l=>a(l,0,false));const c=s??r;return c?c.id:null}function cp(){const t=st(n=>n.status),e=st(n=>n.error);return bt(()=>({status:t,error:e}),[t,e])}function lp(){return st(t=>t.manifest)}function Vc(){return st(t=>Bt(t.manifest))}function ws(){return st(t=>We(t.manifest,t.canvasId))}function up(){return st(t=>qe(t.manifest,t.canvasId))}function dp(){const{clover:t}=ae("useNavigation"),e=st(o=>$n(o.manifest,o.canvasId)),n=st(o=>Bt(o.manifest).views.length);return bt(()=>nf(t,e,n),[t,e,n])}function fp(){return st(t=>hc(t.manifest,t.addedSets))}function _y(t){const{language:e}=ae("useLocalized");return bt(()=>wt(t,e),[t,e])}function wy(){return Et().t}function xy(){return Et().langOf}const hp=({options:t,onReady:e,onViewportChange:n,onMediaElement:o,onCaptionChange:r,caption:s,onEnded:i,placeholder:a=true,label:c,partOf:l,language:d,annotations:u,chapters:p,...h})=>{const m=ae("Canvas"),{clover:g}=m,y=ee(g.captions.subscribe,g.captions.get,g.captions.get),w=s??y,S=d??m.language,v=ws(),{direction:b}=Vc(),x=lp(),k=up(),N=st($=>{var lt;return $.status==="loading"?"loading":((lt=$.manifest)==null?void 0:lt.id)??""}),D=st($=>$.target),j=st($=>pc($.manifest,$.addedSets,$.search.set,$.regions)),et=st($=>Rd($.manifest,$.addedSets,$.hiddenSets,$.shownSets)),V=st($=>ls($.manifest,$.addedSets,$.hiddenSets,$.shownSets)),nt=st($=>$.annotationId),Y=R(nt);Y.current=nt;const[J,M]=H(0);F(()=>g.found.subscribe($=>{$&&$===Y.current&&M(lt=>lt+1)}),[g]);const T=ee(g.highlight.subscribe,g.highlight.get,g.highlight.get),O=ee(g.chapter.subscribe,g.chapter.get,g.chapter.get),U=v.map($=>$.id).join("|"),Q=bt(()=>{if(u)return u;const $=v.map(lt=>lt.id);return j.flatMap(lt=>lt.entries.filter(Ot=>$.includes(Ot.canvasId)).map(Ot=>({annotation:Ot.annotation,targetIndex:$.indexOf(Ot.canvasId),pageId:lt.id,...lt.label?{pageLabel:lt.label}:{},...Ot.place?{place:Ot.place}:{},...Ot.layer?{layer:{key:Ot.layer.key,item:Ot.layer.item}}:{}})))},[u,j,v]),ct=D?($=>!!$&&v.some(lt=>lt.id===$))(D.canvasId):false,mt=R(null);ct&&(mt.current=U);const _=a&&mt.current!==U,I=R(null),P=R(null),A=bt(()=>v.some($=>vo($).length>0),[v]),B=A?v.find($=>vo($).length>0):void 0,Z=np(x,B,S,sp),E=R(A);E.current=A;const z=s===void 0?m.language:void 0,K=B==null?void 0:B.id;F(()=>{if(!z||!B)return;const $=Rc(B).find(lt=>lt.language&&es(lt.language,z));$&&g.captions.get()!==$.id&&g.captions.emit($.id)},[z,K,g]);const G=ut(()=>{const $=g.store.get().target;!$||!g.store.get().canvasId||op($,I.current,P.current,E.current)&&g.consumeTarget()},[g]),ht=R(U);F(()=>{ht.current!==U&&(ht.current=U,P.current=null),D&&G()},[D,U,G]);const ft=R(e);ft.current=e;const Rt=ut($=>{var lt;I.current=$,$.on("change",G),G(),(lt=ft.current)==null||lt.call(ft,$)},[G]),At=ut($=>{var Ot;const lt=(Ot=I.current)==null?void 0:Ot.getCanvasRegion();g.viewport.emit(lt?{canvasId:lt.canvasId,region:{x:lt.rect.x,y:lt.rect.y,w:lt.rect.width,h:lt.rect.height}}:null),n==null||n($)},[g,n]),zt=ut($=>{P.current=$,g.media.emit($),$&&G(),o==null||o($)},[g,G,o]),Ht=ut(()=>{i==null||i(),(Fe(x,"auto-advance")||Fe(k,"auto-advance"))&&g.next({autoplay:true,wrap:Fe(x,"repeat")})},[g,x,k,i]),gt=ut($=>void rp(g,$),[g]),q=(t==null?void 0:t.request)??g.request,ot=Fe(k,"auto-advance")||Fe(x,"auto-advance"),_t=Fe(k,"repeat")||Fe(x,"repeat"),Ft=bt(()=>({...t,request:q,animation:(t==null?void 0:t.animation)??{autoplay:ot,loop:_t}}),[t,q,ot,_t]);return v.length?f(Yh,{...h,manifestId:N,navPlace:x==null?void 0:x.navPlace,canvases:v,viewingDirection:b,language:S,label:c??(k==null?void 0:k.label)??(x==null?void 0:x.label),partOf:l??(x==null?void 0:x.label),options:Ft,placeholder:_,onReady:Rt,onViewportChange:At,onMediaElement:zt,caption:w,onCaptionChange:$=>{g.captions.emit(($==null?void 0:$.id)??null),r==null||r($)},onEnded:Ht,annotations:Q,hiddenPages:V,unlistedPages:et,onPageVisibilityChange:($,lt)=>$.forEach(Ot=>g.setSetVisible(Ot,lt)),chapters:p??Z,highlightedChapter:O,onChapterHighlight:$=>g.chapter.emit($),selectedAnnotation:nt,refind:J,highlightedAnnotation:T,onAnnotationSelect:$=>g.selectAnnotation($),onAnnotationLink:h.onAnnotationLink??gt,onAnnotationActive:$=>{var lt;g.highlight.emit($),(lt=h.onAnnotationActive)==null||lt.call(h,$)}}):null},pp=6,on=new Set;function mp(t){if(on.has(t))return true;for(;on.size>=pp;){let e;for(const n of on)n.hiddenSince!==null&&(!e||n.hiddenSince<e.hiddenSince)&&(e=n);if(!e)return false;on.delete(e),e.release()}return on.add(t),true}function Ji(t){on.delete(t)}function gp(t){return typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement?t.complete&&t.naturalWidth>0:true}function vp(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 yp=`#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
|
+
`,bp=`#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 yo{constructor(e,n,o){L(this,"kind","webgl2");L(this,"canvas");L(this,"maxTextureSize");L(this,"gl");L(this,"program",null);L(this,"vao",null);L(this,"uniforms",{matrix:null,crop:null,opacity:null,texture:null});L(this,"textures",new Map);L(this,"cssWidth",1);L(this,"cssHeight",1);L(this,"pixelRatio",1);L(this,"matrixScratch",new Float32Array(9));L(this,"isLost",false);L(this,"callbacks");L(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=_p(n,yp,bp);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 yo(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||!gp(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=vp(e,this.pixelRatio),i=fe(e.transform,se(r.x,r.y),de(r.width+s.x,r.height+s.y));return n.uniformMatrix3fv(this.uniforms.matrix,false,Nh(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),wp(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 _p(t,e,n){const o=Qi(t,t.VERTEX_SHADER,e),r=Qi(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 Qi(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 wp(t){return typeof t=="object"&&t!==null&&t.name==="SecurityError"}function qc(t,e){return fe(se(e.width/2,e.height/2),Fn(t.rotation),de(t.zoom),se(-t.x,-t.y))}function Kc(t,e){return fe(se(t.x,t.y),de(1/t.zoom),Fn(-t.rotation),se(-e.width/2,-e.height/2))}function ta(t,e,n){return be(Kc(t,e),n)}function xp(t,e,n){return be(qc(t,e),n)}function $r(t,e){return Ao(Kc(t,e),{x:0,y:0,width:e.width,height:e.height})}function Sp(t,e,n=0,o=0){const r=Ao(Fn(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=zc(t);return{x:c.x,y:c.y,zoom:a,rotation:n}}function bo(t,e,n,o,r){const s=be(fe(de(1/n),Fn(-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 ea(t,e){return t.x===e.x&&t.y===e.y&&t.zoom===e.zoom&&t.rotation===e.rotation}const kp=.09,Cp=1e-4,na=.05,Ep=1e-4;class Mp{constructor(e,n=kp,o){L(this,"current");L(this,"target",null);L(this,"timeConstant");L(this,"spring");L(this,"start");L(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=bo(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>na&&(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 u=this.elapsed/this.spring.duration;if(u>=1)return this.current={...r},this.target=null,false;const p=this.spring.stiffness;s=this.start,i=(1-Math.exp(-p*u))/(1-Math.exp(-p))}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?bo(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))<Cp&&Math.abs(r.rotation-c)<Ep&&Math.hypot(r.x-l.x,r.y-l.y)*a<na?(this.current={...r},this.target=null,false):true}}const Zc=5,oa=300,Tp=Zc*4;function ra(t,e=false){return t==="touch"||t==="pen"&&!e}function Ip(t){return t.pointerType==="pen"&&t.buttons===0}function Lp(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 sa(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 Fr={clickToZoom:true,dblClickToZoom:true,pinchToZoom:true,scrollToZoom:false,navigable:true,flickEnabled:true,flickMinSpeed:200,flickMomentum:.25},ur=2,ia=1.5,aa=.1,Pp=100,Ap=.002,Op=.01;class Np{constructor(e,n,o=Fr){L(this,"pointers",new Map);L(this,"samples",[]);L(this,"down",null);L(this,"pinch",null);L(this,"lastTap",null);L(this,"lastPointerType","");L(this,"penHovers",false);L(this,"onPointerDown",e2=>{var o2,r;if(this.lastPointerType=e2.pointerType,e2.pointerType==="mouse"&&e2.button!==0||sa(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))});L(this,"onPointerMove",e2=>{var r;Ip(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)>Zc&&(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-Pp;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}});L(this,"onPointerUp",e2=>{var c,l,d,u,p,h;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<oa){if((u=(d=this.target).dismiss)!=null&&u.call(d)){this.lastTap=null;return}if(ra(e2.pointerType,this.penHovers)){const m=this.lastTap;this.options.navigable&&(this.options.clickToZoom||this.options.dblClickToZoom)&&m&&e2.timeStamp-m.t<oa&&Math.hypot(o2.x-m.x,o2.y-m.y)<Tp?(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/ur,o2,true):this.zoomIn(o2):(h=(p=this.target).tap)==null||h.call(p,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)}});L(this,"onDoubleClick",e2=>{this.options.navigable&&(this.options.clickToZoom||!this.options.dblClickToZoom||ra(this.lastPointerType,this.penHovers)||sa(e2.target,this.element)||(e2.shiftKey?this.target.zoomBy(1/ur,this.local(e2),true):this.zoomIn(this.local(e2))))});L(this,"onWheel",e2=>{const n2=e2.ctrlKey;if(!this.options.navigable||!n2&&!this.options.scrollToZoom||!n2&&Lp(e2.target,this.element,e2.deltaY))return;e2.preventDefault();const o2=Rp(e2),r=n2?Op:Ap;this.target.zoomBy(Math.exp(-o2*r),this.local(e2),!n2)});L(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*aa*(e2.shiftKey?3:1),r=n2.height*aa*(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(ia,void 0,true);break;case"-":case"_":this.target.zoomBy(1/ia,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(ur,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 Rp(t){return t.deltaMode===1?t.deltaY*16:t.deltaMode===2?t.deltaY*400:t.deltaY}class Gc extends Error{constructor(e,n,o){super(e),this.url=n,this.status=o,this.name="ImageLoadError"}}const ca=new Set;async function Bp(t,e={}){const{signal:n,maxTextureSize:o,request:r}=e,s=Dd(r),i=Fp(t);if(typeof createImageBitmap!="function"||typeof fetch!="function")return dr(t,{signal:n,cors:true,withCredentials:s});if(i&&ca.has(i))return dr(t,{signal:n,cors:false,withCredentials:s});let a;try{a=await ds(r,t,{mode:"cors",signal:n})}catch(p){if(Dp(p,n))throw p;const h=await dr(t,{signal:n,cors:false,withCredentials:s});return i&&ca.add(i),h}if(!a.ok)throw new Gc(`Image request failed with ${a.status}`,t,a.status);const c=await a.blob();let l=await $p(c);const d=l.width,u=l.height;if(o&&(l.width>o||l.height>o)){const p=o/Math.max(l.width,l.height),h=await createImageBitmap(l,{resizeWidth:Math.max(1,Math.floor(l.width*p)),resizeHeight:Math.max(1,Math.floor(l.height*p)),resizeQuality:"high"});l.close(),l=h}if(n!=null&&n.aborted)throw l.close(),Dr();return{kind:"bitmap",source:l,width:l.width,height:l.height,naturalWidth:d,naturalHeight:u,opaque:false}}async function $p(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 dr(t,{signal:e,cors:n,withCredentials:o}){return new Promise((r,s)=>{if(e!=null&&e.aborted){s(Dr());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(Dr())};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 Gc("Image failed to load",t))},i.src=t})}function Fp(t){var e;try{return new URL(t,(e=globalThis.location)==null?void 0:e.href).origin}catch{return null}}function Dp(t,e){return!!(e!=null&&e.aborted)||typeof t=="object"&&t!==null&&t.name==="AbortError"}function Dr(){const t=new Error("Aborted");return t.name="AbortError",t}function la(t){t.kind==="bitmap"&&t.source.close()}const zp=192*1024*1024,Hp=6,Wp=2;class Up{constructor(e){L(this,"entries",new Map);L(this,"inFlight",0);L(this,"frame",0);L(this,"bytes",0);L(this,"wanted",[]);L(this,"disposed",false);L(this,"budget");L(this,"maxInFlight");this.options=e,this.budget=e.byteBudget??zp,this.maxInFlight=e.maxInFlight??Hp}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:fr(n),lastUsed:this.frame,attempts:0,pinned:false,waiters:(o==null?void 0:o.waiters)??[]}),this.bytes+=fr(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){la(s);return}e.state="ready",e.image=s,e.bytes=fr(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<Wp&&!jp(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&&la(o.image),this.options.onEvict(o.url)}}}function fr(t){return t.width*t.height*4}function jp(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 Vp=.1;class qp{constructor(e,n=r=>requestAnimationFrame(r),o=r=>cancelAnimationFrame(r)){L(this,"handle",0);L(this,"last",0);L(this,"disposed",false);L(this,"frame",e2=>{if(this.handle=0,this.disposed)return;const n2=this.last?Math.min((e2-this.last)/1e3,Vp):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 Kp=2*1024*1024;function Zp(t,e,n=Kp){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 Gp(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 Xp(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 d=Math.max(0,i),u=Math.max(0,a),p=Math.min(e,i+c),h=Math.min(n,a+l);return p<=d||h<=u?null:{x:d,y:u,width:p-d,height:h-u}}const hr=512,Yp=16e6;function Xc(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 Jp(t){const{width:e,height:n}=t,o=[],r=t.regionByPx&&t.sizeByW,s=(p,h,m)=>{const g=Math.ceil(e/p),y=Math.ceil(n/p);return{scaleFactor:p,width:g,height:y,tileWidth:h,tileHeight:m,cols:Math.ceil(g/h),rows:Math.ceil(y/m)}},i=(p,h)=>({scaleFactor:e/p,width:p,height:h,tileWidth:p,tileHeight:h,cols:1,rows:1,whole:true}),a=t.tiles[0];if(a)for(const p of a.scaleFactors)o.push(s(p,a.width,a.height));else if(r)for(let p=1;;p*=2){const h=s(p,hr,hr);if(o.push(h),h.cols===1&&h.rows===1)break}const c=Math.max(0,...o.map(p=>p.scaleFactor));for(const p of t.sizes){const h=e/p.width;Qp(t,p.width,p.height)&&h>c+1e-9&&o.push(i(p.width,p.height))}const l=o.reduce((p,h)=>!p||h.scaleFactor>p.scaleFactor?h:p,null);if(l&&l.cols*l.rows>1&&t.sizeByW){const p=Math.max(e,n)/hr;o.push(i(Math.ceil(e/p),Math.ceil(n/p)))}(!o.length||!a&&!r&&e*n<=Yp)&&(o.some(p=>p.scaleFactor===1)||o.push(i(e,n)));const d=tm(o).sort((p,h)=>h.scaleFactor-p.scaleFactor),u=rh(t);return{width:e,height:n,levels:d,tile(p){const h=d[p.level],m=h.scaleFactor,g=h.cols===1&&h.rows===1;let y,w,S;if(g)y={x:0,y:0,width:e,height:n},w=h.width,S=h.height;else{const v=Math.round(p.col*h.tileWidth*m),b=Math.round(p.row*h.tileHeight*m);y={x:v,y:b,width:Math.min(Math.round(h.tileWidth*m),e-v),height:Math.min(Math.round(h.tileHeight*m),n-b)},w=Math.ceil(y.width/m),S=Math.ceil(y.height/m)}return{...p,region:y,url:mo(t,y,w,S),fallbackUrl:u?mo(t,y,w,S,u):void 0}}}}function Qp(t,e,n){return!(t.maxWidth&&e>t.maxWidth||t.maxHeight&&n>t.maxHeight||t.maxArea&&e*n>t.maxArea)}function tm(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 em(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 Le(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 d=Math.max(0,Math.floor(i/r)),u=Math.min(o.cols-1,Math.floor((c-1e-9)/r)),p=Math.max(0,Math.floor(a/s)),h=Math.min(o.rows-1,Math.floor((l-1e-9)/s)),m=[];for(let g=p;g<=h;g++)for(let y=d;y<=u;y++)m.push({level:e,col:y,row:g});return m}async function nm(t,e){if(t.media)return om(t,t.media);let n=null,o=null;if(t.service)try{n=Jp(await vs(t.service,e.infoOptions))}catch(p){o=p}if(!n){if(!t.url)throw o??new Error("Image has no source");const p=await e.loadStatic(t.url);e.cache.seed(t.url,p),n=Xc(t.url,p.naturalWidth,p.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=Xp(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=Gp(t.rotation),d=l?rm(c,l):void 0,u={id:t.id,spec:t,pyramid:n,size:r,clip:c,contentClip:s,rect:{x:0,y:0,width:s.width,height:s.height},...d?{turn:d}:{}};return await e.cache.prefetch(Le(n,0,c).map(p=>{const h=n.tile(p);return{url:h.url,fallbackUrl:h.fallbackUrl}})),u}const Yc="media:";function om(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=`${Yc}${t.id}`,s={width:n,height:o},i={x:0,y:0,width:n,height:o};return{id:t.id,spec:t,pyramid:Xc(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 rm(t,{degrees:e,mirror:n}){const o=e*Math.PI/180,r=d=>Math.abs(d)<1e-12?0:d,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=fe(se(a/2,c/2),{a:s,b:i,c:-i,d:s,e:0,f:0},de(n?-1:1,1),se(-(t.x+t.width/2),-(t.y+t.height/2)));return{orient:l,unorient:Oh(l),width:a,height:c}}function Jc(t){var e;return((e=t.turn)==null?void 0:e.orient)??se(-t.clip.x,-t.clip.y)}function sm(t,e){const{turn:n,clip:o}=t;if(!n)return{...e,x:o.x+e.x,y:o.y+e.y};const r=Ao(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 im(t,e){const{turn:n,clip:o}=t;return n?be(n.unorient,e):{x:o.x+e.x,y:o.y+e.y}}function ua(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 am(t){if(!t.length)return null;if(t.every(o=>o.spec.placement)){for(const o of t)o.rect={...o.spec.placement};return _s(t.map(o=>o.rect))}const e=ua(t[0]).height;let n=0;for(const o of t){const r=ua(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 Oo(t){const e=t.turn??t.clip;return{x:t.rect.width/e.width,y:t.rect.height/e.height}}function cm(t){const e=Oo(t);return fe(se(t.rect.x,t.rect.y),de(e.x,e.y),Jc(t))}function lm(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 um=1e7,dm=15e6,fm=2e7,hm=2;function pm(t){const{items:e,camera:n,viewport:o,pixelRatio:r,getTile:s,destination:i}=t,a=qc(n,o),c=[],l=[],d=[],u=(p,h,m)=>{const g=p.tile(h);l.push({url:g.url,fallbackUrl:g.fallbackUrl,priority:m})};for(const p of e){const{pyramid:h,clip:m,rect:g}=p,y=Oo(p);if(t.wantOverview)for(const Y of Le(h,0,m))u(h,Y,fm);const w=da(p,n,o,r),S=i?da(p,i,o,r):w;if(d.push((w==null?void 0:w.target)??-1),!w&&!S)continue;const v=Y=>J=>{const M=h.tile(J).region;return Math.hypot(M.x+M.width/2-Y.x,M.y+M.height/2-Y.y)};if(S){const Y=v(S.center);for(const J of Le(h,0,S.area))u(h,J,Y(J)/1e3);if(S.target>0)for(const J of Le(h,S.target,S.area))u(h,J,um+Y(J))}if(!w)continue;const{area:b,target:x}=w,k=v(w.center),N=Le(h,0,b),D=x===0?[]:Le(h,x,b);if(S!==w){for(const J of N)u(h,J,k(J)/1e3);const Y=x-hm;if(Y>0)for(const J of Le(h,Y,b))u(h,J,dm+k(J))}if(p.spec.hidden)continue;const V=(x===0?N:D).every(Y=>s(h.tile(Y).url)!==void 0)?[x]:Array.from({length:x+1},(Y,J)=>J),nt=fe(a,se(g.x,g.y),de(y.x,y.y),Jc(p));for(const Y of V){const J=Y===0?N:Y===x?D:Le(h,Y,b),M=h.levels[Y].cols*h.levels[Y].rows>1;for(const T of J){const O=h.tile(T),U=s(O.url);if(!U)continue;const Q=mm(p,O.region,U,nt,M);Q&&c.push({...Q,url:O.url})}}}return l.sort((p,h)=>p.priority-h.priority),{draws:c,wants:gm(l),levels:d}}function da(t,e,n,o){const{pyramid:r,rect:s}=t,i=$r(e,n);if(!Bh(i,s))return null;const a=Oo(t),c=Math.max(i.x,s.x),l=Math.max(i.y,s.y),d=Math.min(i.x+i.width,s.x+s.width),u=Math.min(i.y+i.height,s.y+s.height),p=1/(a.x*e.zoom*o);return{area:sm(t,{x:(c-s.x)/a.x,y:(l-s.y)/a.y,width:(d-c)/a.x,height:(u-l)/a.y}),center:im(t,{x:(e.x-s.x)/a.x,y:(e.y-s.y)/a.y}),target:em(r,p)}}function mm(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 d=n.width/e.width,u=n.height/e.height,p=1e-6;return{item:t,image:n,transform:fe(o,se(e.x,e.y),de(1/d,1/u)),crop:{x:(i-e.x)*d,y:(a-e.y)*u,width:(c-i)*d,height:(l-a)*u},bleed:{right:r&&c<s.x+s.width-p,bottom:r&&l<s.y+s.height-p}}}function gm(t){const e=new Set;return t.filter(n=>e.has(n.url)?false:(e.add(n.url),true))}const vm={maxZoomPixelRatio:1.1,minZoomImageRatio:.9,upscale:true,animationTime:.09,animationDuration:void 0,springStiffness:6.5,constrainDuringPan:true,request:void 0,byteBudget:192*1024*1024,maxInFlight:6,releaseAfterMs:2e3},ym=2,bm=3,_m=.1,pr=1e-6,zr={top:0,right:0,bottom:0,left:0};function fa(t,e="padding"){if(!t||typeof getComputedStyle!="function")return zr;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 wm=(t,e)=>t.top===e.top&&t.right===e.right&&t.bottom===e.bottom&&t.left===e.left;let xm;class Sm{constructor(e,n={}){L(this,"host");L(this,"overlays",null);L(this,"options");L(this,"backend",null);L(this,"backendPreference");L(this,"contextLosses",0);L(this,"holder",{hiddenSince:null,release:()=>this.giveBack()});L(this,"visible",true);L(this,"dom",null);L(this,"domAsked",false);L(this,"pending",null);L(this,"camera");L(this,"loop");L(this,"gestures");L(this,"gestureOptions",{});L(this,"cache");L(this,"navigator",null);L(this,"navigatorAsked",0);L(this,"viewport",{width:1,height:1});L(this,"inset",zr);L(this,"pixelRatio",1);L(this,"items",[]);L(this,"worldBounds",null);L(this,"contentVersion",0);L(this,"opaqueUrls",new Set);L(this,"mediaByKey",new Map);L(this,"detachMedia",[]);L(this,"opened",false);L(this,"atHome",true);L(this,"interacting",false);L(this,"lastEmitted",null);L(this,"generation",0);L(this,"listeners",new Map);L(this,"unloadable",false);L(this,"resizeObserver",null);L(this,"intersectionObserver",null);L(this,"releaseTimer",null);L(this,"dprQuery",null);L(this,"disposed",false);L(this,"dismisser",null);L(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=Zp(this.getTile,d=>r2?r2.has(d):true),i=pm({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(d=>!d.url.startsWith(Yc));return this.cache.update(a),i.draws.length?this.setUnloadable(false):a.length&&a.every(d=>this.cache.failed(d.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(d=>!d.spec.hidden),this.worldBounds,$r(o2,this.viewport),this.pixelRatio,this.getTile,this.contentVersion),(!this.lastEmitted||!ea(this.lastEmitted,o2))&&(this.lastEmitted={...o2},this.opened&&this.emit("viewport")),n2||s.deferred});L(this,"getTile",e2=>this.mediaByKey.get(e2)??this.cache.get(e2));L(this,"onContextLost",()=>{this.contextLosses+=1,this.releaseBackend(),this.visible?this.acquireBackend(false):this.host.dataset.backend="released"});L(this,"onPixelRatioChange",()=>{this.measure(),this.watchPixelRatio()});this.host=e,this.backendPreference=n.backend??"auto",this.options={...vm,...mr(n)},pa()&&(this.options.animationTime=0,this.options.animationDuration!==void 0&&(this.options.animationDuration=0));const{animationDuration:o,springStiffness:r}=this.options;this.camera=new Mp({x:0,y:0,zoom:1,rotation:0},this.options.animationTime,o===void 0?void 0:{duration:o,stiffness:r}),this.loop=new qp(this.tick),this.gestureOptions=mr(n.gestures??{}),pa()&&(this.gestureOptions.flickMomentum=0),this.gestures=new Np(e,this,{...Fr,...this.gestureOptions}),this.cache=new Up({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=km(e),this.visible?this.acquireBackend():this.holder.hiddenSince=ha(),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(d=>[d.id,d])),i=await Promise.allSettled(e.map(d=>{const u=s.get(d.id);return u&&lm(u.spec,d)?(u.spec=d,Promise.resolve(u)):nm(d,{cache:this.cache,loadStatic:p=>this.loadTile(p),infoOptions:{request:this.options.request}})}));if(r!==this.generation||this.disposed)return;const a=i.filter(d=>d.status==="fulfilled").map(d=>d.value),c=i.filter(d=>d.status==="rejected").map(d=>d.reason);this.items=a,this.watchMedia(a);const l=am(a);if(this.worldBounds=n?l?_s([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=zr){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},a=1/0){const{width:c,height:l}=this.viewport,d=Sp(e,{width:Math.max(1,c-i-r),height:Math.max(1,l-o-s)},n),u=Math.min(d.zoom,a);return{...bo(zc(e),{x:(c+i-r)/2,y:(l+o-s)/2},u,n,this.viewport),zoom:u,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*_m;this.fitBounds({x:e.x-r,y:e.y-r,width:e.width+r*2,height:e.height+r*2},n,fa((s=this.overlays)==null?void 0:s.container,"scroll-padding"))}getBounds(){return $r(this.camera.current,this.viewport)}getHomeBounds(){return this.worldBounds?{...this.worldBounds}:null}getCamera(){return{...this.camera.current}}getZoomLimits(){var n;const e=((n=this.homeCamera())==null?void 0:n.zoom)??1;return{home:e,min:e*this.options.minZoomImageRatio,max:Math.max(e,this.closestZoom())}}closestZoom(){const e=this.items.length?Math.min(...this.items.map(n=>Oo(n).x)):1;return this.options.maxZoomPixelRatio/e}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-pr)}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-pr),atMin:e<=s*(1+pr),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=ta(r,this.viewport,s),{min:a,max:c}=this.getZoomLimits(),l=wn(r.zoom*e,a,c),d=bo(i,s,l,r.rotation,this.viewport),u=this.constrain({...r,...d,zoom:l});this.atHome=false,o?this.camera.animateTo({state:u,anchor:{world:i,screen:s}},this.viewport):this.camera.set(u),this.invalidate()}panBy(e,n,o=false){const r=o?this.camera.destination:this.camera.current,s=be(fe(de(1/r.zoom),Fn(-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({...Fr,...this.gestureOptions,...mr(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);ea(n,o)||this.animateTo(o,false)}worldToScreenPoint(e){return xp(this.camera.current,this.viewport,e)}screenToWorldPoint(e){return ta(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 Ao(fe(cm(o),de(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-DbBBbDZn.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-BL6vNcmI.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 Bp(e,{signal:n,request:this.options.request,maxTextureSize:this.backend instanceof yo?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,this.options.upscale?1/0:this.closestZoom())}constrain(e,{allowBeyondLimits:n=false}={}){const o=this.worldBounds;if(!o)return e;const{min:r,max:s}=this.getZoomLimits(),i=n?wn(e.zoom,r,Math.max(s,e.zoom)):wn(e.zoom,r,s);return this.interacting&&!this.options.constrainDuringPan?{...e,zoom:i}:{...e,zoom:i,x:wn(e.x,o.x,o.x+o.width),y:wn(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<bm);let r=null;o&&(mp(this.holder)||this.backendPreference==="webgl2")&&(r=yo.create(n,{onLost:this.onContextLost}),r||Ji(this.holder)),r?this.install(r):this.backendPreference==="webgl2"?this.none(n):(this.pending=n,(xm??(xm=import("./Canvas2DBackend-Dru1ImJh.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(Ji(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=ha()),!(!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=fa(this.host),i=Math.min(typeof window<"u"&&window.devicePixelRatio||1,ym);if(o===this.viewport.width&&r===this.viewport.height&&i===this.pixelRatio&&wm(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,d=o/Math.max(a.width,1);this.camera.set(this.constrain({...l,zoom:l.zoom*d}))}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 ha=()=>typeof performance<"u"?performance.now():Date.now();function km(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 pa(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function mr(t){return Object.fromEntries(Object.entries(t).filter(([,e])=>e!==void 0))}const Cm=(t,e)=>new Sm(t,e),Em=vt(()=>import("./Connected-80hCJuhg.mjs")),Mm=vt(()=>import("./Connected-CzPY2rgu.mjs").then(t=>t.C));function Tm({className:t,style:e,renderers:n,collapseControls:o,onContentStateChange:r,children:s,...i}){var m;const a=ae("Body");Cc(a.clover,r);const c=ws(),l=bt(()=>sf(c),[c]),d=af(n??a.renderers,{canvases:c,bodies:l}),u=d==null?void 0:d.component,p=((m=c.find(({type:g})=>g==="Scene"||g==="Timeline"))==null?void 0:m.type)??"Canvas",h=st(g=>g.status==="loading");return f("div",{"aria-busy":h,className:It("clover-body",t),"data-renderer":u?"custom":p.toLowerCase(),style:{position:"relative",height:"var(--clover-body-height, 60vh)",...e},children:[u?f(u,{canvases:c,bodies:l,children:s}):p==="Scene"?f(St,{fallback:f(En,{overlay:true}),children:f(Mm,{...i,children:s})}):p==="Timeline"?f(St,{fallback:f(En,{overlay:true}),children:f(Em,{...i,children:s})}):f(hp,{...i,collapseControls:o,surface:Cm,children:s}),h&&f(En,{overlay:true})]})}const Im={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:"\xA0"};function Dn(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 Im[n.toLowerCase()]??e})}const Lm=t=>/<[a-z!/]|&(#x?[0-9a-f]+|[a-z]+);/i.test(t);function Pm(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 Am(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 No=(t,e)=>e==="canvas"?qe(t.manifest,t.canvasId):t.manifest,Qc=he(null),xs=()=>jt(Qc),an=ie(function({of:e="manifest",label:n,as:o="span",className:r,...s},i){var p;const a=Rn(h=>{var m,g;return e==="canvas"?(m=qe(h.manifest,h.canvasId))==null?void 0:m.label:(g=h.manifest)==null?void 0:g.label},void 0),c=xs(),l=(p=Ne())==null?void 0:p.language,{text:d,lang:u}=wt(n??(c?c.label:a),l);return d?f(o,{ref:i,className:It("clover-label",r),...dt(u),...s,children:Dn(d)}):null});function Om(t,e,n){const o=(d,u)=>Math.min(Math.max(Math.round(d),0),u),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 d=Math.min(1,e/Math.max(i.width,i.height));return t.maxWidth&&(d=Math.min(d,t.maxWidth/i.width)),t.maxHeight&&(d=Math.min(d,t.maxHeight/i.height)),t.maxArea&&(d=Math.min(d,Math.sqrt(t.maxArea/(i.width*i.height)))),mo(t,i,Math.max(1,Math.floor(i.width*d)),Math.max(1,Math.floor(i.height*d)))}if(!a)return null;const c=[...t.sizes].sort((d,u)=>d.width-u.width),l=c.find(d=>Math.max(d.width,d.height)>=e)??c.at(-1)??{width:t.width,height:t.height};return mo(t,i,l.width,l.height)}function cn(t){var e;return(e=hs(t).find(({body:n})=>n.type==="Image"||n.id&&!n.type))==null?void 0:e.body}function Nm(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 _e(t,e="full",n=false){if(!t)return null;const o=Lo(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 Ss(t){const e=t;return e?_e(W(e.thumbnail)[0],"full",true)??_e(cn(e))??_e(cn(e.placeholderContainer))??_e(cn(e.accompanyingContainer)):null}function Rm(t){const e=t;return e?_e(cn(e))??_e(cn(e.placeholderContainer))??_e(cn(e.accompanyingContainer))??_e(W(e.thumbnail)[0],"full",true):null}async function ks(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 vs(t.service,{request:n}),s=typeof t.region=="string"?Nm(t.region,r):t.region;return s===null?t.fallback:Om(r,e,s)??t.fallback}catch{return t.fallback}}const Bm=Object.freeze(Object.defineProperty({__proto__:null,imageSource:_e,resolveThumbnail:ks,stillSource:Rm,thumbnailSource:Ss},Symbol.toStringTag,{value:"Module"})),ma='.clover-items-item[role="option"], .clover-items-link',sn=new Map;let $t=null,re=null,Hr=0;function Cs(t){const e=sn.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 Wr(){cancelAnimationFrame(Hr),Hr=requestAnimationFrame(()=>sn.forEach((t,e)=>Cs(e)))}function tl(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,ma);n&&e.add(n);try{document.querySelectorAll(`:is(${ma}):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=>Mc(i,"fullHidden",["pointerenter",i===n?"blur":"focus"])))}function $m(){var t,e;$t=typeof ResizeObserver>"u"?null:new ResizeObserver(n=>n.forEach(o=>Cs(o.target))),re=typeof MutationObserver>"u"?null:new MutationObserver(Wr),re==null||re.observe(document.head,{childList:true,subtree:true,characterData:true}),re==null||re.observe(document.documentElement,{attributes:true,attributeFilter:["style","class"]}),(e=(t=document.fonts)==null?void 0:t.addEventListener)==null||e.call(t,"loadingdone",Wr),document.addEventListener("keydown",tl,true)}function Fm(){var t,e,n;cancelAnimationFrame(Hr),(t=$t==null?void 0:$t.disconnect)==null||t.call($t),re==null||re.disconnect(),$t=re=null,(n=(e=document.fonts)==null?void 0:e.removeEventListener)==null||n.call(e,"loadingdone",Wr),document.removeEventListener("keydown",tl,true)}function Dm(t,e){var n;return sn.size||$m(),sn.set(t,{change:e}),(n=$t==null?void 0:$t.observe)==null||n.call($t,t),Cs(t),()=>{var o;sn.delete(t),(o=$t==null?void 0:$t.unobserve)==null||o.call($t,t),sn.size||Fm()}}const zm=/^(-?\d{4,})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?)?/;function el(t,e){if(typeof t!="string")return null;const n=zm.exec(t.trim());if(!n)return null;const[o,r,s,i=0,a=0,c=0]=n.slice(1,7).map(u=>u===void 0?void 0:Number(u)),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 d=!i&&!a&&!c&&!Number(n[7]??0);return{at:l,precision:e??(d?s!==1?"day":r!==1?"month":"year":"time")}}const Hm=vt(()=>import("./NavDate-BMVT6UwB.mjs").then(t=>t.a).then(({NavDate:t})=>({default:t})));function Wm(t,e,n,o){const r=t.source!==void 0?t.source:Ss(t.resource),[s,i]=H(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 F(()=>{if(!r)return i(void 0);if(r.src)return i(r.src);if(!o)return;let c=true;return ks(r,e,n).then(l=>{c&&i(l)}),()=>{c=false}},[a,e,o]),{src:s,none:!r}}const Um=()=>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 jm({part:t,size:e,request:n,alt:o,altLang:r}){const[s,i]=H(null),a=Dc(s,Fc,s==null?void 0:s.closest('[data-layout="slider"] .clover-items-viewport')),{src:c,none:l}=Wm(t,e,n,a),[d,u]=H(false),{width:p,height:h}=t.resource??{},m=p&&h?p/h:1;return f("span",{ref:i,className:"clover-items-picture","data-loaded":d,"data-empty":c?void 0:true,style:c&&!(p&&h)?void 0:{"--clover-items-ratio":m},children:[!c&&l&&Bn(t.media)&&f(Um,{}),c&&f("img",{src:c,alt:o,...dt(o?r:void 0),width:e,height:Math.round(e/m),loading:"lazy",decoding:"async",draggable:false,onLoad:()=>u(true),onError:()=>u(true)}),t.duration?f("span",{className:"clover-items-duration",children:sh(t.duration)}):null]})}function Vm({text:t,lang:e,first:n}){const o=R(null),[r,s]=H(false);return F(()=>{const i=o.current;if(!(!i||!t))return Dm(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",...dt(t?e:void 0),children:t}),r&&f("span",{className:"clover-items-label-full",...dt(e),"aria-hidden":"true",hidden:true,children:t})]})}function qm({item:t,size:e,language:n,request:o,showSummary:r=false,secondary:s="summary",labels:i=true}){var u,p;const a=t.parts.map(h=>wt(t.parts.length===1?t.label:h.label,n)),c=r&&s==="summary"?wt(t.summary,n):null,l=r&&s==="navDate"?el(t.navDate):null,d=a.some(h=>h.text);return f("figure",{role:"none",className:"clover-items-figure","data-parts":t.parts.length,"data-media":(p=(u=t.parts[0])==null?void 0:u.media)==null?void 0:p.toLowerCase(),style:{"--parts":t.parts.length},children:[f("span",{className:"clover-items-pictures",children:t.parts.map((h,m)=>{const g=a[m].text?{text:""}:wt(h.label,n);return f(jm,{part:h,size:e,request:o,alt:g.text,altLang:g.lang},h.id)})}),(d||l||(c==null?void 0:c.text))&&f("figcaption",{className:"clover-items-caption",style:i?void 0:Ue,children:[a.map((h,m)=>f(Vm,{text:h.text,lang:h.lang,first:m===0},t.parts[m].id)),l&&f(St,{fallback:null,children:f(Hm,{value:t.navDate,className:"clover-items-date"})}),(c==null?void 0:c.text)&&f("span",{className:"clover-items-summary",...dt(c.lang),children:c.text.replace(/<[^>]*>/g,"")})]})]})}function Km(t){var e;return(e=hs(t).find(({body:n})=>n.type))==null?void 0:e.body.type}function nl(t){const e=Km(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 ga=new WeakMap;function ol(t){if(!t)return[];let e=ga.get(t);if(!e){const{canvases:n,views:o}=Bt(t);e=o.map(r=>{const s=r.map(i=>nl(n[i]));return{id:s[0].id,parts:s,label:s.length===1?s[0].label:{none:[s.map(i=>wt(i.label).text).filter(Boolean).join(" \u2013 ")]}}}),ga.set(t,e)}return e}const va=new WeakMap;function _o(t){if(!t)return[];let e=va.get(t);return e||(e=W(t.items).filter(n=>n==null?void 0:n.id).map(n=>{var o;return{id:n.id,parts:[nl(n)],label:n.label,summary:n.summary,...typeof n.navDate=="string"?{navDate:n.navDate}:{},href:((o=W(n.homepage)[0])==null?void 0:o.id)??n.id,...Ln(W(n.homepage)[0])?{hrefLang:Ln(W(n.homepage)[0])}:{}}}),va.set(t,e)),e}function Sy(t){return t?Array.isArray(t)?_o({items:t}):t.type==="Collection"?_o(t):ol(t):[]}function rl(t){const e=Math.max(1,Math.round(t));return e<=6?`h${e}`:null}const Es=(t,e="p")=>rl(t)??e;function sl(t,e,n="p"){const o=rl(t);return o?{as:o,title:{},group:{}}:{as:n,title:{id:e},group:{role:"group","aria-labelledby":e}}}function Zm(t,e,{orientation:n="both",rtl:o=false,onActivate:r,onMove:s}={}){const[i,a]=H(Math.max(0,e)),c=R([]),l=R(r);l.current=r;const d=R(s);d.current=s,F(()=>{e>=0&&a(e)},[e]);const u=Math.min(i,Math.max(0,t-1)),p=ut(g=>{var y;a(g),(y=c.current[g])==null||y.focus()},[]),h=ut((g,y)=>{var k,N;const w=o?"ArrowLeft":"ArrowRight",S=o?"ArrowRight":"ArrowLeft",v=n!=="vertical",b=n!=="horizontal";let x=null;if(v&&g.key===w||b&&g.key==="ArrowDown")x=Math.min(t-1,y+1);else if(v&&g.key===S||b&&g.key==="ArrowUp")x=Math.max(0,y-1);else if(g.key==="Home")x=0;else if(g.key==="End")x=t-1;else if(g.key==="Enter"||g.key===" "){(k=l.current)==null||k.call(l,y,g),g.preventDefault();return}x!==null&&(g.preventDefault(),p(x),x!==y&&((N=d.current)==null||N.call(d,x,g)))},[t,n,o,p]);return{focused:u,itemProps:g=>({ref:y=>{c.current[g]=y},tabIndex:g===u?0:-1,onKeyDown:y=>h(y,g),onFocus:()=>a(g)})}}const Gm=5,Xm=()=>{var t;return typeof window<"u"&&!!((t=window.matchMedia)!=null&&t.call(window,"(prefers-reduced-motion: reduce)").matches)};function il({align:t="start",dragFree:e=false,itemCount:n=0,axis:o="x"}={}){const r=o==="y",[s,i]=H(null),[a,c]=H(false),[l,d]=H(false),u=R(t);u.current=t;const p=e?"none":`${o} mandatory`,h=ut(()=>{if(!s)return;const v=Math.abs(r?s.scrollTop:s.scrollLeft),b=r?s.scrollHeight-s.clientHeight:s.scrollWidth-s.clientWidth;c(v>1),d(v<b-1)},[s,r]);F(()=>{if(!s)return;const v=s.style;v.overflowX=r?"hidden":"auto",v.overflowY=r?"auto":"hidden",v.scrollSnapType=p,v.setProperty("--clover-track-align",t),r?v.overscrollBehaviorY="contain":v.overscrollBehaviorX="contain"},[s,p,t,r]),F(()=>{if(!s)return;let v=0;const b=()=>{cancelAnimationFrame(v),v=requestAnimationFrame(h)};h(),s.addEventListener("scroll",b,{passive:true});const x=typeof ResizeObserver<"u"?new ResizeObserver(b):null;return x==null||x.observe(s),s.firstElementChild&&(x==null||x.observe(s.firstElementChild)),()=>{cancelAnimationFrame(v),s.removeEventListener("scroll",b),x==null||x.disconnect()}},[s,h,n]);const m=ut((v,b=false)=>{if(!s||!v)return;const x=b||Xm()?"auto":"smooth";s.scrollBy({[r?"top":"left"]:v,behavior:x})},[s,r]),g=ut((v,{instant:b=false}={})=>{const x=s==null?void 0:s.querySelector(`[data-track-index="${v}"]`);if(!s||!x)return false;const k=s.getBoundingClientRect(),N=x.getBoundingClientRect(),D=getComputedStyle(s).direction==="rtl";return r?(m(u.current==="center"?N.top+N.height/2-(k.top+k.height/2):N.top-k.top,b),true):(m(u.current==="center"?N.left+N.width/2-(k.left+k.width/2):D?N.right-k.right:N.left-k.left,b),true)},[s,m,r]),y=ut(v=>{if(!s)return;const b=!r&&getComputedStyle(s).direction==="rtl",x=r?s.clientHeight:s.clientWidth;m(v*x*.9*(b?-1:1))},[s,m,r]),w=ut(()=>y(1),[y]),S=ut(()=>y(-1),[y]);return F(()=>{if(!s)return;let v=null,b=false;const x=j=>{j.pointerType!=="mouse"||j.button!==0||(v={x:r?j.clientY:j.clientX,scroll:r?s.scrollTop:s.scrollLeft},b=false)},k=j=>{var V;if(!v)return;const et=(r?j.clientY:j.clientX)-v.x;!b&&Math.abs(et)<Gm||(b||(b=true,(V=s.setPointerCapture)==null||V.call(s,j.pointerId),s.style.scrollSnapType="none",s.dataset.dragging="true"),r?s.scrollTop=v.scroll-et:s.scrollLeft=v.scroll-et)},N=j=>{var et;v&&(v=null,b&&((et=s.releasePointerCapture)==null||et.call(s,j.pointerId),delete s.dataset.dragging,s.style.scrollSnapType=p))},D=j=>{b&&(b=false,j.preventDefault(),j.stopPropagation())};return s.addEventListener("pointerdown",x),s.addEventListener("pointermove",k),s.addEventListener("pointerup",N),s.addEventListener("pointercancel",N),s.addEventListener("click",D,true),()=>{s.removeEventListener("pointerdown",x),s.removeEventListener("pointermove",k),s.removeEventListener("pointerup",N),s.removeEventListener("pointercancel",N),s.removeEventListener("click",D,true)}},[s,p,r]),{ref:i,canScrollPrev:a,canScrollNext:l,scrollPrev:S,scrollNext:w,scrollToIndex:g,measure:h}}const wo=ie(function(e,n){return!Ne()||e.iiifContent!==void 0||e.items!==void 0?f(St,{fallback:null,children:f(Ym,{...e,forwardedRef:n})}):f(Jm,{...e,forwardedRef:n})}),Ym=vt(()=>import("./StandaloneItems-BCHhR9sF.mjs"));function Jm({of:t="views",...e}){return t==="targets"?f(tg,{...e}):t==="annotations"?f(ng,{...e}):t==="members"?f(al,{...e}):f(og,{...e})}const Qm=vt(()=>import("./TargetItems-CkZbD8GE.mjs"));function tg(t){return st(n=>{var o;return(((o=n.targets)==null?void 0:o.items.length)??0)>1})?f(St,{fallback:null,children:f(Qm,{...t})}):null}const eg=vt(()=>import("./AnnotationItems-BbPnS9EE.mjs"));function ng(t){return st(n=>!!hc(n.manifest,n.addedSets))?f(St,{fallback:null,children:f(eg,{...t})}):null}function al({onSelect:t,forwardedRef:e,...n}){const{clover:o,language:r}=Ne(),s=st(d=>d.collection),i=st(d=>{var u;return((u=d.manifest)==null?void 0:u.id)??null}),a=_o(s),c=ss(s==null?void 0:s.viewingDirection);if(!a.length)return null;const l=(d,u)=>{t==null||t(d,u),o.goToManifest(d.id)};if(n.layout==="pager"){const d=a.findIndex(u=>u.id===i);return f(ll,{...n,forwardedRef:e,steps:cl(a,d,c,l),nameKey:"informationPanelTabsCollection",position:f(sg,{position:d,total:a.length,list:u=>f(al,{layout:"list",forwardedRef:null,onSelect:u})})})}return f(ul,{...n,forwardedRef:e,items:a,selected:a.findIndex(d=>d.id===i),navigation:"id",rtl:c==="right-to-left",language:r,request:o.request,showSummary:true,onActivate:l})}function og({onSelect:t,forwardedRef:e,singleItem:n=false,...o}){const{clover:r,language:s}=Ne(),i=st(u=>u.manifest),a=st(u=>$n(u.manifest,u.canvasId)),c=st(u=>Bt(u.manifest).direction),l=ol(i);if(l.length<(n?1:2))return null;const d=u=>r.goTo(u.id);return o.layout==="pager"?f(ll,{...o,forwardedRef:e,steps:cl(l,a,c,d)}):f(ul,{...o,forwardedRef:e,items:l,selected:a,navigation:"id",rtl:c==="right-to-left",language:s,request:r.request,onActivate:(u,p)=>{t==null||t(u,p),r.goTo(u.id)},followFocus:d})}function cl(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 rg=vt(()=>import("./PagerLayout-D771pC5E.mjs")),sg=vt(()=>import("./PagerLayout-D771pC5E.mjs").then(({CountMenu:t})=>({default:t})));function ll(t){return f(St,{fallback:null,children:f(rg,{...t})})}function ul({forwardedRef:t,items:e,selected:n,navigation:o,rtl:r=false,layout:s="slider",orientation:i="horizontal",thumbnailSize:a=200,request:c,language:l,showSummary:d=false,secondary:u="summary",labels:p=true,heading:h,headingLevel:m=2,renderItem:g,onActivate:y,followFocus:w,as:S="section",className:v,"aria-label":b,size:x,singleItem:k,highContrast:N,...D}){var gt;const{t:j}=Et(),et=pe(),V=Eo(t,D.lang),{langOf:nt}=V,Y=Jr(N),J=s==="slider",M=J&&i==="vertical",T=o==="id",O=R(null),U=s==="masonry";F(()=>{const q=O.current;if(!U||!q)return;let ot,_t=true;return import("../masonry-BZCdA3bV.mjs").then(({attachMasonry:Ft})=>{_t&&(ot=Ft(q))}),()=>{_t=false,ot==null||ot()}},[U]);const Q=il({align:T?"center":"start",itemCount:e.length,axis:M?"y":"x"}),at=R(void 0);F(()=>()=>window.clearTimeout(at.current),[]);const ct=Zm(e.length,n,{orientation:M?"vertical":s==="slider"?"horizontal":s==="list"?"vertical":"both",rtl:r,onActivate:(q,ot)=>y(e[q],ot),onMove:w?(q,ot)=>{window.clearTimeout(at.current);const _t=()=>w(e[q]);ot.repeat?at.current=window.setTimeout(_t,150):_t()}:void 0}),mt=R(null),_=R(false);_.current=!!((gt=mt.current)!=null&>.contains(mt.current.ownerDocument.activeElement)),F(()=>{var Ft;const q=mt.current;if(!q||!_.current)return;const{activeElement:ot,body:_t}=q.ownerDocument;ot&&ot!==_t||(Ft=q.querySelector(`[data-track-index="${Math.max(0,n)}"]`))==null||Ft.focus()},[e]);const I=R(false);F(()=>{var _t;if(n<0)return;const q=!I.current;if(J){Q.scrollToIndex(n,{instant:q})&&(I.current=true);return}I.current=true;const ot=(_t=mt.current)==null?void 0:_t.querySelector(`[data-track-index="${n}"]`);ot&&ig(ot,q)},[J,n,Q.scrollToIndex]);const P=Es(m),A=h?wt(h.label,l):null,B=h?wt(h.summary,l):null,Z=b===void 0&&!!(A!=null&&A.text),E=Po(j("itemsLabel"),nt("itemsLabel"),b!==void 0||Z,V.hostLanguage),z=Z?{"aria-labelledby":`${et}-title`}:b!==void 0?{"aria-label":b}:E.props,K=(q,ot)=>g?g(q,{selected:ot}):f(qm,{item:q,size:a,language:l,request:c,showSummary:d,secondary:u,labels:p}),G=q=>!(g||wt(q.label,l).text||d&&u==="summary"&&wt(q.summary,l).text),ht=(q,ot)=>G(q)?j("canvasPosition",{index:ot+1,total:e.length}):void 0,ft=q=>G(q)?nt("canvasPosition"):void 0,Rt=J?{display:"flex",flexDirection:M?"column":void 0,margin:0,padding:0,listStyle:"none"}:void 0,At=J?{flex:"0 0 auto",scrollSnapAlign:T?"center":"start"}:void 0,zt=T&&n>=0,Ht=q=>{const ot=n+(q==="prev"?-1:1),_t=zt?ot>=0&&ot<e.length:q==="prev"?Q.canScrollPrev:Q.canScrollNext,Ft=zt?q==="prev"?"commonPrevious":"commonNext":q==="prev"?"itemsScrollBack":"itemsScrollForward",$=j(Ft),lt=Ot=>{if(!_t)return;if(!zt)return(q==="prev"?Q.scrollPrev:Q.scrollNext)();const Ze=e[ot];w?w(Ze):y(Ze,Ot)};return f("button",{type:"button",className:`clover-items-scroll-${q}`,"aria-controls":zt?void 0:`${et}-viewport`,...dt(nt(Ft)),"aria-disabled":!_t||void 0,tabIndex:_t?void 0:-1,onClick:lt,children:[f("svg",{"aria-hidden":"true",focusable:"false",width:"16",height:"16",viewBox:"0 0 16 16",children:f("path",{d:M?q==="next"?"M3 6l5 5 5-5":"M3 10l5-5 5 5":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:Ue,children:$}),f(Ke,{label:$})]})};return f(Nn.Provider,{value:V.hostLanguage,children:f(S,{ref:V.ref,className:It("clover-items",v),"data-layout":s,"data-orientation":M?"vertical":void 0,"data-navigation":o,...Qr(Y),...D,children:[h&&((A==null?void 0:A.text)||(B==null?void 0:B.text))&&f("header",{className:"clover-items-header",children:[(A==null?void 0:A.text)&&f(P,{className:"clover-items-title clover-title",id:`${et}-title`,...dt(A.lang),children:A.text}),(B==null?void 0:B.text)&&f("p",{className:"clover-items-description",...dt(B.lang),children:B.text.replace(/<[^>]*>/g,"")}),h.homepage&&f("a",{className:"clover-items-homepage",href:h.homepage,hrefLang:h.homepageLang,...dt(nt("commonViewAll")),children:j("commonViewAll")})]}),f("div",{className:"clover-items-frame",style:{position:"relative"},dir:r?"rtl":void 0,children:[J&&Ht("prev"),f("div",{id:`${et}-viewport`,className:"clover-items-viewport",ref:J?Q.ref:O,children:T?f("div",{ref:mt,role:"listbox",...z,"aria-orientation":M?"vertical":J?"horizontal":s==="list"?"vertical":void 0,className:"clover-items-track",style:Rt,children:e.map((q,ot)=>{const _t=ot===n;return f("div",{id:`${et}-${ot}`,role:"option","aria-selected":_t,"aria-label":ht(q,ot),...dt(ft(q)),className:"clover-items-item","data-track-index":ot,style:At,...ct.itemProps(ot),onClick:Ft=>y(q,Ft),children:K(q,_t)},q.id)})}):f("ul",{...z,className:"clover-items-track",style:Rt,children:e.map((q,ot)=>f("li",{className:"clover-items-item","data-track-index":ot,style:At,children:f("a",{className:"clover-items-link",href:q.href,hrefLang:q.hrefLang,"aria-label":ht(q,ot),...dt(ft(q)),draggable:false,onClick:_t=>y(q,_t),children:K(q,false)})},q.id))})}),J&&Ht("next")]}),E.node]})})}function ig(t,e){var i,a;let n=t.parentElement;for(;n&&n!==document.body;){const{overflowY:c}=getComputedStyle(n);if(/(auto|scroll)/.test(c)&&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;if(s){const c=(i=window.matchMedia)==null?void 0:i.call(window,"(prefers-reduced-motion: reduce)").matches;(a=n.scrollBy)==null||a.call(n,{top:s,behavior:e||c?"auto":"smooth"})}}function ag(t,e){const{clover:n}=ae(e),o=dp(),{direction:r}=Vc(),s=st(l=>l.collection),i=st(l=>{var d;return((d=l.manifest)==null?void 0:d.id)??null}),a=st(l=>{var d;return((d=l.targets)==null?void 0:d.items.length)??0}),c=st(l=>bd(l.targets,l.targetIndex,l.manifest,l.canvasId));if(t==="targets")return{position:c,total:a,direction:"left-to-right",step:l=>{const d=c+l;d>=0&&d<a&&n.goToTarget(d)}};if(t==="members"){const l=_o(s),d=l.findIndex(u=>u.id===i);return{position:d,total:l.length,direction:"left-to-right",step:u=>{const p=l[d+u];p&&n.goToManifest(p.id)}}}return{position:o.position,total:o.total,direction:r,step:l=>l<0?o.previous():o.next()}}const cg=ie(function({steps:e,as:n="span",className:o,...r},s){const{t:i,langOf:a}=Et(),{position:c,total:l}=e;if(l<2||c<0)return null;const d=c+1;return f(n,{ref:s,className:It("clover-pager-position",o),...r,children:[f("span",{"aria-hidden":"true",children:[d," / ",l]}),f("span",{className:"clover-pager-room","aria-hidden":"true",hidden:true,children:[l," / ",l]}),f("span",{style:Ue,...dt(a("canvasPosition")),children:i("canvasPosition",{index:d,total:l})})]})}),lg=ie(function({of:e="views",...n},o){const r=ag(e,"Position");return f(cg,{ref:o,...n,steps:r})});function ug({className:t,loading:e,error:n}){const{t:o,langOf:r}=Et(),{status:s,error:i}=cp(),a=s==="loading",c=e!==void 0&&e!==false;return f(Ct,{children:[f("p",{className:It("clover-status",t),"data-status":a?s:void 0,role:"status",style:a&&e!==false?void 0:Ue,children:[a&&(c?e:e===void 0&&f(En,{})),a&&!c&&f("span",{style:Ue,...dt(r("statusLoading")),children:o("statusLoading")})]}),s==="error"&&i&&f("div",{className:It("clover-status",t),"data-status":s,role:"alert",children:n?n(i):f(Ct,{children:[f("p",{...dt(r("statusError")),children:o("statusError")}),f("p",{className:"clover-status-detail",lang:"en",children:i.message})]})})]})}function dg(t,e=false,n=3){const o=e||Lm(t),r=e?`${n}
|
|
28
|
+
${t}`:t,[s,i]=H(null);return F(()=>{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},d])=>{const u=d?d.markdownToHtml(t,{headingLevel:n}):t,p=c(u,{markdown:!!d});a&&i({for:r,html:p,inner:l(p)})}),()=>{a=false}},[t,r,o,e,n]),o&&(s==null?void 0:s.for)===r?s:null}const fg=new Set(["p","span","h1","h2","h3","h4","h5","h6","a","b","i","em","strong","small","sub","sup","label"]),dl=ie(function({as:e="span",markup:n,language:o,format:r,headingLevel:s,...i},a){const{text:c,lang:l}=wt(n,o),d=dt(l),u=Pm(r,c),p=u==="markdown",h=dg(u==="plain"?"":c,p,s),m=(h==null?void 0:h.html)??null;if(!c)return null;if(u==="plain")return f(e,{ref:a,...i,...d,children:c.split(/\r?\n/).map((y,w)=>f(ue.Fragment,{children:[w>0&&f("br",{}),y]},w))});const g=typeof e=="string"&&fg.has(e)&&m&&/<(p|ul|ol|div)[\s>]/i.test(m)?"div":e;return h?f(g,{ref:a,...i,...d,dangerouslySetInnerHTML:{__html:h.inner}}):f(e,{ref:a,...i,...d,children:p?Am(c):Dn(c)})}),fl=({metadata:t,language:e,renderValue:n,...o})=>t!=null&&t.length?f("dl",{...o,children:t.map((r,s)=>{const i=wt(r.label,e),a=n==null?void 0:n(r);return f("div",{"data-label":wt(r.label,"none").text.replace(/\s+/g,"-").toLowerCase(),children:[f("dt",{...dt(i.lang),children:i.text}),a!==void 0?f("dd",{children:a}):f(dl,{as:"dd",markup:r.value,language:e})]},s)})}):null,hg=typeof window>"u"?F:Ut;function pg({children:t}){const{t:e}=Et(),n=Eo(),o=R(null),r=pe(),s=ue.Children.only(t),i=s.props.id??r,{open:a,cut:c,toggle:l}=mg(o);return f("div",{className:"clover-read-more",children:[ue.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,...dt(n.langOf(a?"readLess":"readMore")),children:e(a?"readLess":"readMore")})]})}function mg(t){const[e,n]=H(false),[o,r]=H(false),s=()=>{const i=t.current;i&&!e&&r(i.scrollHeight>i.clientHeight+1)};return hg(s),F(()=>{var u,p;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 d=typeof MutationObserver>"u"?null:new MutationObserver(c);return d==null||d.observe(document.head,{childList:true,subtree:true,characterData:true}),d==null||d.observe(document.documentElement,{attributes:true,attributeFilter:["style","class"]}),d==null||d.observe(i,{attributes:true,attributeFilter:["style"]}),(p=(u=document.fonts)==null?void 0:u.addEventListener)==null||p.call(u,"loadingdone",c),()=>{var h,m;cancelAnimationFrame(a),l==null||l.disconnect(),d==null||d.disconnect(),(m=(h=document.fonts)==null?void 0:h.removeEventListener)==null||m.call(h,"loadingdone",c)}},[e,t.current]),{open:e,cut:o,toggle:()=>n(i=>!i)}}function pn(t,e,n){const o=xs(),r=Rn(s=>{var i;return(i=No(s,t))==null?void 0:i[e]},void 0);return n!==void 0?n:o?o[e]:r}const zn=()=>{var t;return(t=Ne())==null?void 0:t.language};function ya({of:t="manifest",as:e="p",value:n,className:o,...r}){const s=pn(t,"summary",n),i=zn();return wt(s,i).text?f(pg,{children:f(dl,{as:e,markup:s,language:i,className:It("clover-summary",o),...r})}):null}function gg({of:t="manifest",value:e,className:n,renderValue:o,...r}){const s=pn(t,"metadata",e),i=zn();return f(fl,{metadata:s,language:i,renderValue:o,className:It("clover-metadata",n),...r})}function vg({of:t="manifest",value:e,className:n,...o}){const r=pn(t,"requiredStatement",e),s=zn();return f(fl,{metadata:r?[r]:null,language:s,className:It("clover-required-statement",n),...o})}function yg({of:t="manifest",value:e,className:n,...o}){const r=pn(t,"rights",e);return r?f("a",{href:r,className:It("clover-rights",n),...o,children:r}):null}function bg({of:t="manifest",value:e,className:n,...o}){const r=pn(t,"id",e);return r?f("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:It("clover-id",n),...o,children:r}):null}function hl({property:t,className:e,of:n="manifest",value:o,...r}){const s=W(pn(n,t,o)),i=zn(),a=s.filter(c=>c==null?void 0:c.id);return a.length?f("ul",{className:e,...r,children:a.map(c=>{const l=wt(c.label,i);return f("li",{children:[f("a",{href:c.id,target:"_blank",rel:"noopener noreferrer",hrefLang:Ln(c),...dt(l.text?l.lang:void 0),children:l.text?Dn(l.text):c.id}),c.format&&f("span",{className:"clover-link-format",children:[" (",c.format,")"]})]},c.id)})}):null}const _g=({className:t,...e})=>f(hl,{property:"homepage",className:It("clover-homepage",t),...e}),wg=({className:t,...e})=>f(hl,{property:"seeAlso",className:It("clover-see-also",t),...e});function xg({of:t="manifest",value:e,size:n=400,className:o,...r}){var m;const s=Rn(g=>No(g,t),null),i=e??s,a=zn(),c=i?Ss(i):null,l=(c==null?void 0:c.src)??(c==null?void 0:c.service)??(c==null?void 0:c.fallback),[d,u]=H(c==null?void 0:c.src),p=(m=Ne())==null?void 0:m.clover.request;if(F(()=>{if(!c)return u(void 0);if(c.src)return u(c.src);let g=true;return ks(c,n,p).then(y=>g&&u(y)),()=>{g=false}},[l,n]),!d)return null;const h=wt(i==null?void 0:i.label,a);return f("img",{src:d,alt:Dn(h.text),...dt(r.alt===void 0&&h.text?h.lang:void 0),width:n,loading:"lazy",decoding:"async",className:It("clover-thumbnail",o),...r})}const Sg=typeof window>"u"?F:Ut,pl=he(null),kg=t=>{var e;return!!((e=t.textContent)!=null&&e.trim())||t.querySelector("img, svg, picture, video, canvas, object")!==null},Cg=t=>!!t&&typeof t=="object"&&["label","logo","homepage"].some(e=>W(t[e]).length>0),Ur=t=>!!t&&typeof t.id=="string",Eg=t=>{const e=W(t.homepage).find(Ur);return e?{id:e.id,hrefLang:Ln(e)}:void 0},Mg=(t,e)=>{var n;if(!t)return null;for(const o of[t.label,(n=W(t.homepage).find(r=>r==null?void 0:r.label))==null?void 0:n.label]){const r=wt(o,e);if(r.text)return{text:Dn(r.text),lang:r.lang}}return null};function ml({of:t="manifest",value:e,link:n=true,children:o,className:r,...s}){var l;const i=Rn(d=>{var u;return(u=No(d,t))==null?void 0:u.provider},void 0),a=(l=Ne())==null?void 0:l.language,c=W(e!==void 0?e:i).filter(Cg);return c.length?f("ul",{className:It("clover-provider",r),...s,children:c.map((d,u)=>{const p=n?Eg(d):void 0,h=!!wt(d.label,a).text;return f(Tg,{agent:d,homepage:p,children:o??f(Ct,{children:[f(gl,{alt:h?"":void 0}),f(an,{className:"clover-provider-label"})]})},d.id??u)})}):null}function Tg({agent:t,homepage:e,children:n}){const o=R(null),[r,s]=H(null),i=ut(()=>{o.current&&!kg(o.current)&&s(t)},[t]);return r===t?null:f("li",{className:"clover-provider-agent",children:f(Qc.Provider,{value:t,children:f(pl.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 gl({of:t="manifest",value:e,alt:n,className:o,...r}){var p;const{t:s,langOf:i}=Et(),a=xs(),c=Rn(h=>{var m;return(m=No(h,t))==null?void 0:m.provider},void 0),l=(p=Ne())==null?void 0:p.language,u=(e!==void 0?W(e):a?[a]:W(c)).flatMap(h=>{if(!h||typeof h!="object")return[];const m=h;if(m.type!=="Agent"&&Ur(m)&&!m.logo)return[{image:m,agent:null}];const g=W(m.logo).find(Ur);return g?[{image:g,agent:m}]:[]});return u.length?f(Ct,{children:u.map(({image:h,agent:m},g)=>{const y=Mg(m,l);return f(Ig,{src:h.id,alt:n??(y==null?void 0:y.text)??s("logo"),...dt(n!==void 0?void 0:y?y.lang:i("logo")),width:h.width,height:h.height,loading:"lazy",decoding:"async",className:It("clover-logo",o),...r},`${h.id}-${g}`)})}):null}function Ig({alt:t,onError:e,...n}){const o=jt(pl),[r,s]=H(false),i=ut(()=>s(true),[]);Sg(()=>{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 Lg(t,e,n){if(n&&t.includes(n))return n;if(!t.length)return;const o=ns(t,e);return o==="none"?t[0]:o}const Pg=t=>t&&typeof t=="object"&&!Array.isArray(t)?Object.keys(t).filter(e=>e!=="none"&&e!=="@none"&&wt({[e]:t[e]}).text):[];function Ag(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(Pg).filter(r=>r.length>1);return[...new Set(o.flat())]}function Og(){const{language:t,chooseLanguage:e,toggleDrawn:n}=ae("About"),o=st(i=>i.manifest),r=bt(()=>Ag(o),[o]),s=Lg(r,t);return s&&e?{languages:r,chosen:s,onChange:e,drawn:n??false}:null}function ky(t,e){return t!=null&&t.drawn?e.every(n=>!!n&&n!=="none"&&t.languages.some(o=>es(o,n))):false}const Ng=vt(()=>import("./LanguageChoice-BkQkSsPE.mjs").then(t=>t.b).then(t=>({default:t.LanguageChoice}))),Rg=t=>{var o;const e=t.closest(".clover-sections-actions"),n=(o=e==null?void 0:e.closest(".clover-sections-item"))==null?void 0:o.querySelector(".clover-sections-heading .clover-sections-label");return e&&n?{box:e,label:n}:null},Bg=t=>void Tt.chooseInterfaceLanguage(t);function $g(){Et();const{languages:t,chosen:e}=Tt.interfaceLanguages();return t.length>1?{languages:t,chosen:e}:null}function vl({values:t=true,interfaceLanguages:e=true}={}){const n=Og(),o=$g(),r=t?(n==null?void 0:n.languages)??[]:[],s=u=>r.some(p=>p===u||Tt.stringsFor(p)===u),i=[...r,...(e?(o==null?void 0:o.languages)??[]:[]).filter(u=>!s(u))];if(i.length<2)return null;const a=Tt.chosenLanguage,c=a&&Tt.stringsFor(a),l=c&&i.includes(c)&&!s(c)?c:t&&n?n.chosen:(o==null?void 0:o.chosen)??i[0];return{languages:i,chosen:l,onChange:u=>r.includes(u)&&n?n.onChange(u):Bg(u)}}function yl({values:t,interfaceLanguages:e}){const n=vl({values:t,interfaceLanguages:e}),{drawsToggle:o}=ae("About"),r=!!n;return F(()=>r?o==null?void 0:o():void 0,[r,o]),n?f(St,{fallback:null,children:f(Ng,{...n,nameKey:"readingLanguage",part:"clover-about",fit:Rg})}):null}const bl=he(false);function ba(t,e){const n=new Set,o=[];for(const r of t)for(const s of W(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=wt(s.label,e);o.push({id:i,label:a.text||s.format||i,lang:a.text?a.lang:void 0,format:s.format,hrefLang:Ln(s)})}return o}function _l(){const{language:t}=ae("Download"),e=st(o=>o.manifest),n=st(o=>We(o.manifest,o.canvasId));return{page:ba(n,t),all:ba([e],t)}}const Fg=vt(()=>import("./Download-B0BD_SzR.mjs").then(({DownloadGroups:t})=>({default:t}))),Dg=vt(()=>import("./NavDate-BMVT6UwB.mjs").then(t=>t.a).then(({NavDate:t})=>({default:t}))),zg=vt(()=>import("./PartOfManifest-BMaH_tsn.mjs"));function Hg({languages:t=true,interfaceLanguages:e=true,...n}){const o=jt(bl);return f(Wg,{...n,download:!o&&n.download!==false,choice:o?null:f(yl,{values:t,interfaceLanguages:e})})}function Wg({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}=Et(),d=_l(),u=st(w=>w.manifest,Object.is,"About"),p=R(null);F(()=>{const w=p.current,S=w==null?void 0:w.querySelector(".clover-about-head");if(!w||!S||typeof ResizeObserver>"u")return;const v=new Set,b=()=>{const N=S.querySelector(".clover-about-thumbnail"),D=S.querySelector(".clover-about-label");for(const nt of[N,D])nt&&!v.has(nt)&&(v.add(nt),k.observe(nt));const j=w.style;if(!N){j.removeProperty("--clover-about-label-height"),j.removeProperty("--clover-about-thumbnail-width");return}const et=`${(D==null?void 0:D.offsetHeight)??0}px`,V=`${N.offsetWidth}px`;j.getPropertyValue("--clover-about-label-height")!==et&&j.setProperty("--clover-about-label-height",et),j.getPropertyValue("--clover-about-thumbnail-width")!==V&&j.setProperty("--clover-about-thumbnail-width",V)};let x=0;const k=new ResizeObserver(()=>{cancelAnimationFrame(x),x=requestAnimationFrame(b)});return k.observe(S),b(),()=>{cancelAnimationFrame(x),k.disconnect(),w.style.removeProperty("--clover-about-label-height"),w.style.removeProperty("--clover-about-thumbnail-width")}},[s,r,u]);const h=pe(),m=()=>{var v,b;const w=p.current;(b=((v=w==null?void 0:w.closest(".clover-sections-item"))==null?void 0:v.querySelector(".clover-sections-button"))??w)==null||b.focus({preventScroll:true})};if(!u)return null;const g=(w,S,v)=>{if(!S)return null;const{as:b,title:x,group:k}=sl(n,`${h}-${w}`);return f("section",{className:"clover-about-section",...k,children:[f(b,{className:"clover-about-heading",...dt(l(w)),...x,children:c(w)}),v]})},y=w=>Array.isArray(u[w])?u[w].length>0:!!u[w];return f("div",{ref:p,className:It("clover-about",i),tabIndex:-1,...a,children:[t,(r||s)&&f("div",{className:"clover-about-head",children:[r&&f(xg,{className:"clover-about-thumbnail",size:256,alt:s?"":void 0}),s&&f(an,{as:Es(n),className:"clover-about-label clover-title"})]}),e&&f(ya,{of:"canvas",className:"clover-about-summary"}),$i(u)&&u.partOf&&f(St,{fallback:null,children:f(zg,{manifest:u,headingLevel:n,onOpened:m})}),f(ya,{className:"clover-about-summary"}),f(gg,{className:"clover-about-metadata"}),f(vg,{className:"clover-about-metadata"}),g("aboutDate",el(u.navDate),f(St,{fallback:null,children:f(Dg,{value:u.navDate,className:"clover-about-date"})})),g("aboutProvider",y("provider"),f(ml,{})),g("aboutRights",u.rights,f(yg,{})),g("aboutHomepage",y("homepage"),f(_g,{})),g("aboutSeeAlso",y("seeAlso"),f(wg,{})),g("download",o&&d.page.length+d.all.length>0,f(St,{fallback:null,children:f(Fg,{page:d.page,all:d.all,headingLevel:n+1})})),g($i(u)?"aboutCanvas":"aboutManifest",!_c(u)&&u.id,f(bg,{}))]})}const Ug=vt(()=>import("./ControlMenu-C3Jh10iR.mjs")),jg=vt(()=>import("./Download-B0BD_SzR.mjs").then(({DownloadGroups:t})=>({default:t})));function Vg({languages:t=true,interfaceLanguages:e=true,download:n=true}){const o=vl({values:t,interfaceLanguages:e}),{page:r,all:s}=_l(),i=n&&r.length+s.length>0;return!o&&!i?null:f("div",{className:"clover-about-actions",children:[i&&f(qg,{page:r,all:s}),o&&f(yl,{values:t,interfaceLanguages:e})]})}function qg({page:t,all:e}){const{t:n,langOf:o}=Et(),[r,s]=H(false),a=`${pe()}-download`,c=ut(l=>{var d;s(false),l&&((d=document.getElementById(a))==null||d.focus())},[a]);return f("span",{className:"clover-about-download",onBlur:l=>{const d=l.relatedTarget;r&&d&&!l.currentTarget.contains(d)&&s(false)},children:[f("button",{type:"button",id:a,className:"clover-about-download-button","aria-label":n("download"),...dt(o("download")),"aria-expanded":r,"aria-controls":r?`${a}-menu`:void 0,onClick:()=>s(l=>!l),children:[f(Kg,{}),f(Ke,{label:n("download")})]}),r&&f(St,{fallback:null,children:f(Ug,{id:`${a}-menu`,triggerId:a,onClose:c,className:"clover-about-download-menu",children:f(jg,{page:t,all:e,inPopover:true})})})]})}function Kg(){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 Zg(t,e=null){if(!t)return false;if(e!=null&&e.navPlace||t.navPlace)return true;for(const n of Bt(t).canvases){if(n.navPlace)return true;for(const o of W(n.annotations))for(const r of W(o==null?void 0:o.items))if(r!=null&&r.navPlace||W(r==null?void 0:r.motivation).includes("georeferencing")||W(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 Gg=["about","targets","collection","contents","search","map","transcript","annotations"],Ie={about:t=>{var e,n;return!_c(t.manifest)||!!((e=t.manifest)!=null&&e.rights||(n=t.manifest)!=null&&n.requiredStatement)},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||!!yd(t.manifest)},contents:t=>ip(t.manifest).length>0,search:t=>!!cc(t.manifest),map:t=>Zg(t.manifest,t.collection),transcript:t=>We(t.manifest,t.canvasId).some(e=>Bc(e).length>0||bh(e).length>0),annotations:t=>Nd(t.manifest,t.addedSets).length>0},Xg=(t,e)=>{const n=Array.isArray(e)?new Set(e):void 0;return Gg.filter(o=>t[o]&&(!n||n.has(o)))};function Ms(t){const e={about:st(Ie.about),targets:st(Ie.targets),collection:st(Ie.collection),contents:st(Ie.contents),search:st(Ie.search),map:st(Ie.map),transcript:st(Ie.transcript),annotations:st(Ie.annotations)};return Xg(e,t)}function Yg({open:t=false,className:e}){return f("svg",{"aria-hidden":"true",focusable:"false",width:"12",height:"12",viewBox:"0 0 12 12",className:It("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 wl=typeof window>"u"?F:Ut,xl=he(null);function Cy(){return jt(xl)}const Sl=he(0);function Ey(){return jt(Sl)}function Jg({items:t,layout:e="tabs",value:n,onValueChange:o,label:r,labelLang:s,headingLevel:i=3}){var Y,J;const a=pe(),c=Po(r??"",s,r===void 0),l=R([]),d=e==="tabs",{t:u,langOf:p}=Et(),h=il({dragFree:true,itemCount:t.length}),m=t.some(M=>M.value===n)?n:((Y=t[0])==null?void 0:Y.value)??null,g=R(new Set);m&&g.current.add(m);const y=R(null),[w,S]=H({value:null,count:0});F(()=>{var at;if(d||!m||y.current!==m)return;y.current=null;const M=t.findIndex(ct=>ct.value===m),T=document.getElementById(`${a}-panel-${M}`),O=(at=l.current[M])==null?void 0:at.parentElement;if(!T||!O)return;const U=O.getBoundingClientRect().bottom-T.getBoundingClientRect().top;if(U<=0)return;const Q=gr(T);Q&&(Q.scrollTop-=U)},[m,d,t,a]);const v=M=>{var I,P,A,B;const T=t.findIndex(Z=>Z.value===m),O=document.getElementById(`${a}-panel-${T}`),U=M.target;if(!O||U===O||!O.contains(U)||!tv(U))return;const Q=(P=(I=l.current[T])==null?void 0:I.parentElement)==null?void 0:P.getBoundingClientRect(),at=T+1<t.length?(B=(A=l.current[T+1])==null?void 0:A.parentElement)==null?void 0:B.getBoundingClientRect():void 0;if(!Q)return;const ct=U.getBoundingClientRect(),mt=ct.top<Q.bottom?Math.floor(ct.top-Q.bottom):at&&ct.bottom>at.top?Math.ceil(Math.min(ct.bottom-at.top,ct.top-Q.bottom)):0,_=mt?gr(O):null;_&&(_.scrollTop+=mt)},b=R(null),x=t.map(M=>M.value).join(`
|
|
29
|
+
`),k=R(false);k.current=!!((J=b.current)!=null&&J.contains(b.current.ownerDocument.activeElement)),F(()=>{var Q;const M=b.current;if(!M||!k.current)return;const{activeElement:T,body:O}=M.ownerDocument;if(T&&T!==O)return;const U=t.findIndex(at=>at.value===m);(Q=l.current[U])==null||Q.focus()},[x]),wl(()=>{const M=b.current;if(d||!M||typeof ResizeObserver>"u")return;const T=[...M.querySelectorAll(":scope > .clover-sections-item")],O=T.map(E=>E.firstElementChild),U=O[0],Q=O[O.length-1],at=new Map,ct=E=>(E&&at.get(E))??0,mt=document.scrollingElement;let _=null,I=0;const P=()=>{const E=O.reduce((Rt,At)=>Rt+ct(At),0);let z=0;T.forEach((Rt,At)=>{Rt.style.setProperty("--clover-sections-before",`${z}px`),z+=ct(O[At]),Rt.style.setProperty("--clover-sections-after",`${E-z}px`)}),M.style.setProperty("--clover-sections-total",`${E}px`);const K=U&&getComputedStyle(U);(K==null?void 0:K.position)==="sticky"&&Q&&(I=parseFloat(K.top)+parseFloat(getComputedStyle(Q).bottom)||0);const G=getComputedStyle(M),ht=parseFloat(G.lineHeight)||1.2*parseFloat(G.fontSize),ft=(_==null?void 0:_.clientHeight)??0;ft>0&&ft-I-E<2*ht?M.dataset.stacks="off":delete M.dataset.stacks},A=new ResizeObserver(E=>{var z,K;for(const G of E)O.includes(G.target)&&at.set(G.target,((K=(z=G.borderBoxSize)==null?void 0:z[0])==null?void 0:K.blockSize)??G.target.getBoundingClientRect().height);P()}),B=()=>{const E=gr(M);E!==_&&(_&&_!==mt&&A.unobserve(_),E&&E!==mt&&A.observe(E),_=E)},Z=()=>{B(),P()};B();for(const E of O)E&&A.observe(E,{box:"border-box"});return window.addEventListener("resize",Z),()=>{A.disconnect(),window.removeEventListener("resize",Z);for(const E of T)E.style.removeProperty("--clover-sections-before"),E.style.removeProperty("--clover-sections-after");M.style.removeProperty("--clover-sections-total"),delete M.dataset.stacks}},[d,x,i]),F(()=>{if(d)return;const M=l.current.map(O=>O==null?void 0:O.parentElement).filter(O=>!!O),T=O=>{var ct;if(O.ctrlKey)return;const U=O.currentTarget,Q=_a(U);if(!Q||Q===document.scrollingElement)return;O.preventDefault();const at=O.deltaMode===1?parseFloat(getComputedStyle(U).lineHeight)||16:O.deltaMode===2?Q.clientHeight:1;(ct=_a(Q)??document.scrollingElement)==null||ct.scrollBy({left:O.deltaX*at,top:O.deltaY*at,behavior:"instant"})};for(const O of M)O.addEventListener("wheel",T,{passive:false});return()=>{for(const O of M)O.removeEventListener("wheel",T)}},[d,x]);const N=M=>{M!==m&&(y.current=M,d||S(T=>({value:M,count:T.count+1})),o==null||o(M))},D=(M,T)=>{var ct;const O=t.length-1,[U,Q]=d?["ArrowLeft","ArrowRight"]:["ArrowUp","ArrowDown"],at=M.key===Q?(T+1)%t.length:M.key===U?(T-1+t.length)%t.length:M.key==="Home"?0:M.key==="End"?O:null;at!==null&&(M.preventDefault(),(ct=l.current[at])==null||ct.focus(),d&&N(t[at].value))},j=R(false);F(()=>{if(!d)return;const M=t.findIndex(_=>_.value===m),T=l.current[M],O=T==null?void 0:T.parentElement;if(!T||!O)return;const U=getComputedStyle(O),Q=O.getBoundingClientRect(),at=T.getBoundingClientRect(),ct=Q.left+(parseFloat(U.scrollPaddingLeft)||0),mt=Q.right-(parseFloat(U.scrollPaddingRight)||0);(at.left<ct-1||at.right>mt+1)&&h.scrollToIndex(M,{instant:!j.current}),j.current=true},[m,d,t.length,h.scrollToIndex]);const et=M=>{const T=M==="prev"?h.canScrollPrev:h.canScrollNext,O=M==="prev"?"sectionsScrollBack":"sectionsScrollForward";return f("button",{type:"button",className:`clover-steps-step clover-sections-scroll-${M}`,"aria-hidden":"true",tabIndex:-1,hidden:!T,...dt(p(O)),onMouseDown:U=>U.preventDefault(),onClick:M==="prev"?h.scrollPrev:h.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(Ke,{label:u(O)})]})},V=Es(i,"div"),nt=(M,T)=>{const O=M.value===m;return f("button",{ref:U=>{l.current[T]=U},type:"button",id:`${a}-button-${T}`,className:"clover-sections-button","data-value":M.value,"data-track-index":d?T:void 0,"aria-controls":`${a}-panel-${T}`,...d?{role:"tab","aria-selected":O,tabIndex:O?0:-1}:{"aria-expanded":O,"aria-disabled":O||void 0},onClick:()=>N(M.value),onKeyDown:U=>D(U,T),children:[f("span",{className:"clover-sections-label",children:M.label}),!d&&f(Yg,{open:O,className:"clover-sections-chevron"})]},M.value)};return f("div",{ref:b,className:"clover-sections","data-layout":e,onFocus:d?void 0:v,style:d?void 0:{"--clover-sections-count":t.length},children:[d&&f("div",{className:"clover-sections-tabs","data-more":[h.canScrollPrev&&"start",h.canScrollNext&&"end"].filter(Boolean).join(" ")||void 0,children:f("div",{className:"clover-sections-row",children:[f("div",{role:"tablist",ref:h.ref,...c.props,className:"clover-sections-list",children:t.map(nt)}),et("prev"),et("next")]})}),d&&c.node,t.map((M,T)=>{const O=M.value===m;return f("section",{className:"clover-sections-item","data-value":M.value,"data-open":O,style:d?void 0:{"--clover-sections-index":T},children:[!d&&f(V,{className:"clover-sections-heading",children:[nt(M,T),f("span",{className:"clover-sections-reach","aria-hidden":"true"})]}),f(Sl.Provider,{value:w.value===M.value?w.count:0,children:f(Qg,{id:`${a}-panel-${T}`,tabs:d,labelledBy:`${a}-button-${T}`,hidden:!O,actions:M.actions,children:g.current.has(M.value)?M.content:null})})]},M.value)})]})}function Qg({id:t,tabs:e,labelledBy:n,hidden:o,actions:r,children:s}){const[i,a]=H(null),c=!o||!!r;return wl(()=>{const l=i==null?void 0:i.parentElement;if(!c||!i||!l||typeof ResizeObserver>"u")return;const d=new ResizeObserver(()=>{const u=i.offsetWidth;u?(l.style.setProperty("--clover-sections-actions",`${u}px`),l.setAttribute("data-actions","")):(l.style.removeProperty("--clover-sections-actions"),l.removeAttribute("data-actions"))});return d.observe(i),()=>{d.disconnect(),l.style.removeProperty("--clover-sections-actions"),l.removeAttribute("data-actions")}},[i,c]),f(Ct,{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(xl.Provider,{value:e?null:i,children:[e&&r,s]})})]})}function gr(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 _a(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 tv(t){try{return t.matches(":focus-visible")}catch{return true}}const ev=vt(()=>import("./MapView-C_8iciAK.mjs").then(t=>({default:t.RootMap}))),nv=vt(()=>import("./Collection-B4LN_80C.mjs").then(t=>({default:t.Collection}))),ov=vt(()=>import("./TargetItems-CkZbD8GE.mjs").then(t=>({default:t.TargetsSection}))),rv=vt(()=>import("./Contents-D4jw_lGe.mjs").then(t=>({default:t.Contents}))),sv=vt(()=>import("./Search-Bmz7mUbA.mjs").then(t=>({default:t.Search}))),iv=vt(()=>import("./Transcript-BbFXEJSc.mjs").then(t=>({default:t.Transcript}))),av=vt(()=>import("./Annotations-reaO1ILe.mjs").then(t=>({default:t.Annotations}))),De=t=>f(St,{fallback:null,children:t}),cv=()=>null,lv=ie(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:d=true,interfaceLanguages:u=true,sections:p,labels:h,className:m,children:g,onKeyDown:y,...w},S){var Z;const{clover:v}=ae("Panel"),b=R(null),{t:x,langOf:k,hostLanguage:N,i18n:D}=Et(),j=Po(x("informationPanelTabs"),k("informationPanelTabs"),!!(w["aria-label"]||w["aria-labelledby"])||!(["aside","section","nav"].includes(c)||w.role)),et=E=>{const z=k(E);return z?f("span",{...dt(z),children:x(E)}):x(E)},V=(E,z)=>{const K=h==null?void 0:h[E];if(K===void 0)return et(z);if(typeof K=="string")return K;const G=Object.keys(K),ht=ns(G,D.language);if(!ht)return et(z);const ft=Co(ht,N);return ft?f("span",{...dt(ft),children:K[ht]}):K[ht]},nt=Ms(p),Y=E=>nt.includes(E),J=ue.Children.toArray(g).filter(E=>ue.isValidElement(E)&&E.type===cv),M=e==="accordion"?a+1:a,T=d||u||l?f(Vg,{languages:d,interfaceLanguages:u,download:l}):void 0,O=J.length?J.map(({props:E})=>({value:E.value,label:E.label,content:E.children,...E.value==="about"&&{actions:T}})):[...Y("about")?[{value:"about",label:V("about","informationPanelTabsAbout"),content:f(Hg,{headingLevel:M,download:l}),actions:T}]:[],...Y("targets")?[{value:"targets",label:V("targets","informationPanelTabsTargets"),content:De(f(ov,{headingLevel:M}))}]:[],...Y("collection")?[{value:"collection",label:V("collection","informationPanelTabsCollection"),content:De(f(nv,{headingLevel:M}))}]:[],...Y("contents")?[{value:"contents",label:V("contents","informationPanelTabsContents"),content:De(f(rv,{}))}]:[],...Y("search")?[{value:"search",label:V("search","informationPanelTabsSearch"),content:De(f(sv,{headingLevel:M,sticky:true,size:"small"}))}]:[],...Y("map")?[{value:"map",label:V("map","informationPanelTabsMap"),content:De(f(ev,{}))}]:[],...Y("transcript")?[{value:"transcript",label:V("transcript","transcriptLabel"),content:De(f(iv,{sticky:true,size:"small"}))}]:[],...Y("annotations")?[{value:"annotations",label:V("annotations","informationPanelTabsAnnotations"),content:De(f(av,{headingLevel:M}))}]:[]],U=st(E=>E.search.query),Q=O.some(E=>E.value==="search"),[at,ct]=H(()=>U&&Q?"search":o??null),mt=R(U&&Q?U:"");F(()=>{Q&&(U&&U!==mt.current&&n===void 0&&ct("search"),mt.current=U)},[U,Q,n]);const _=st(E=>{var z;return E.annotationId&&((z=E.regions)!=null&&z.entries.some(K=>K.id===E.annotationId))?E.annotationId:null}),I=O.some(E=>E.value==="contents");F(()=>{_&&I&&n===void 0&&ct("contents")},[_,I,n]);const P=n!==void 0?n:at,A=(O.some(E=>E.value===P)?P:(Z=O[0])==null?void 0:Z.value)==="search";if(F(()=>{Q&&v.setSetVisible(as,A)},[v,Q,A]),!O.length)return null;const B=()=>{var z;const E=b.current;E!=null&&E.contains(document.activeElement)&&((z=uv(E))==null||z.focus()),s==null||s()};return f(c,{ref:E=>{b.current=E,typeof S=="function"?S(E):S&&(S.current=E)},className:It("clover-panel",m),"data-layout":e,"data-closable":s?"":void 0,"data-floating":i?"":void 0,...j.props,onKeyDown:E=>{y==null||y(E),i&&s&&E.key==="Escape"&&!E.defaultPrevented&&(E.preventDefault(),B())},...w,children:[j.node,s&&f("button",{type:"button",className:"clover-panel-close","aria-label":x("informationPanelClose"),...dt(k("informationPanelClose")),onClick:B,children:[f("svg",{"aria-hidden":"true",focusable:"false",viewBox:"0 0 512 512",fill:"none",stroke:"currentColor",children:f(Ec,{})}),f(Ke,{label:x("informationPanelClose")})]}),f(bl.Provider,{value:O.some(E=>E.value==="about"),children:f(Jg,{items:O,layout:e,value:n!==void 0?n:at,onValueChange:E=>{n===void 0&&ct(E),r==null||r(E)},label:x("informationPanelTabs"),labelLang:k("informationPanelTabs"),headingLevel:a})})]})});function uv(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 dv=1,fv=4,hv=8,pv=500,mv=4,wa=["pointerdown","mousedown","pointerup","mouseup","click","dblclick"],kl=()=>typeof document>"u"?16:parseFloat(getComputedStyle(document.documentElement).fontSize)||16;function co(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*kl():t.endsWith("%")?n/100*e:n}const vr=t=>typeof t=="number"?`${t}px`:t,gv=t=>{if(!t||typeof localStorage>"u")return{};try{const e=JSON.parse(localStorage.getItem(t)??"{}");return e&&typeof e=="object"?e:{}}catch{return{}}},vv=(t,e)=>{if(t)try{localStorage.setItem(t,JSON.stringify(e))}catch{}},yv=t=>t?Array.from(t.children).filter(e=>e.classList.contains("clover-split-pane")):[];function bv(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 _v(t,e,n){const{sized:o,other:r}=bv(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=co(a.min,s)??0,u=o.getBoundingClientRect().width+((r==null?void 0:r.getBoundingClientRect().width)??0)-(co(c.min,s)??0),p=Math.max(l,Math.min(co(a.max,s)??u,u)),h=o.getBoundingClientRect().left>=t.getBoundingClientRect().left-1;return{sized:o,key:i,min:l,max:p,after:h}}function wv(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 xv(t,e){const n=e.sized.getBoundingClientRect().width,o=dv*kl()*(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 xa(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 Sv(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 d=g=>Math.hypot(g.clientX-a.x,g.clientY-a.y)>a.reach,u=()=>{wa.forEach(g=>l.removeEventListener(g,p,true)),l.removeEventListener("pointermove",h,true),clearTimeout(m),s=null},p=g=>{if(!c.contains(g.target)){if(g.type==="pointerdown"&&d(g))return u();g.preventDefault(),g.stopPropagation()}},h=g=>d(g)&&u();wa.forEach(g=>l.addEventListener(g,p,true)),l.addEventListener("pointermove",h,true);const m=setTimeout(u,pv);s=u};return{down(a){var d;if(o=false,r=null,a.defaultPrevented||a.button!==0||xa(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"?hv:fv,moved:false};const l=a.currentTarget;l.dataset.dragging="",(d=l.setPointerCapture)==null||d.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*mv}:null,n=null,delete a.currentTarget.dataset.dragging},click(a){const c=o,l=r;o=false,r=null,!(a.defaultPrevented||c||xa(a))&&(e().step(),l&&i(l))},key(a){if(a.defaultPrevented)return;const c=e().limits();if(!c)return;const l=xv(a,c);l!==void 0&&(e().resize(l),a.preventDefault())},dispose(){s==null||s()}}}const Ts=he(null);function Is(t,e){typeof t=="function"?t(e):t&&(t.current=e)}const kv=ie(function({as:e="div",storageKey:n,className:o,style:r,children:s,...i},a){const c=R(null),l=R({}),[d,u]=H({});F(()=>u(gv(n)),[n]);const p=ut((m,g)=>u(y=>{const w={...y};return g===void 0?delete w[m]:w[m]=Math.round(g),vv(n,w),w}),[n]),h=bt(()=>({sizes:d,setSize:p,specs:l,element:c}),[d,p]);return f(Ts.Provider,{value:h,children:f(e,{ref:m=>{c.current=m,Is(a,m)},className:["clover-split",o].filter(Boolean).join(" "),style:{display:"flex",...r},...i,children:s})})}),Cl=ie(function({as:e="div",size:n,min:o,max:r,name:s,className:i,style:a,children:c,...l},d){const u=jt(Ts),p=R(null),[h,m]=H(s??"");F(()=>{if(s)return m(s);const y=yv(u==null?void 0:u.element.current);m(String(y.indexOf(p.current)))},[s,u]),u&&h&&(u.specs.current[h]={min:o,max:r,size:n});const g=u&&h?u.sizes[h]:void 0;return f(e,{ref:y=>{p.current=y,Is(d,y)},className:["clover-split-pane",i].filter(Boolean).join(" "),"data-split-key":h||void 0,"data-sized":n!==void 0?"":void 0,style:{minWidth:vr(o)??0,"--clover-split-size":g!==void 0?`${g}px`:vr(n),"--clover-split-max":vr(r),...a},...l,children:c})}),Cv=ie(function({className:e,children:n,onPointerDown:o,onClick:r,onKeyDown:s,...i},a){const c=jt(Ts),{t:l,langOf:d}=Et(),u=R(null),[p,h]=H(),m=ut(()=>{const k=u.current,N=c==null?void 0:c.element.current;return!k||!N||!c?null:_v(k,N,c.specs.current)},[c]),g=ut(k=>{const N=m();if(!N||!c)return;const D=Math.min(N.max,Math.max(N.min,k));c.setSize(N.key,D),h({now:D,min:N.min,max:N.max})},[m,c]),y=ut(()=>{const k=m();k&&h({now:k.sized.getBoundingClientRect().width,min:k.min,max:k.max})},[m]);F(()=>{const k=c==null?void 0:c.element.current;if(y(),!k||typeof ResizeObserver>"u")return;let N=0;const D=new ResizeObserver(()=>{cancelAnimationFrame(N),N=requestAnimationFrame(y)});return D.observe(k),()=>{cancelAnimationFrame(N),D.disconnect()}},[y,c,c==null?void 0:c.sizes]);const w=k=>{var N;return Math.round(k/(((N=c==null?void 0:c.element.current)==null?void 0:N.clientWidth)||1)*100)},S=()=>{var et,V;const k=m();if(!k||!c)return;const N=((et=c.element.current)==null?void 0:et.clientWidth)??0,D=co((V=c.specs.current[k.key])==null?void 0:V.size,N),j=wv(k,D,c.sizes[k.key]);if(!j.own)return g(j.to);c.setSize(k.key,void 0),h({now:D,min:k.min,max:k.max})},v=R({limits:m,resize:g,step:S});v.current={limits:m,resize:g,step:S};const[b]=H(()=>Sv(()=>u.current,()=>v.current));F(()=>()=>b.dispose(),[b]);const x=i["aria-label"]??l("splitHandle");return f("div",{ref:k=>{u.current=k,Is(a,k)},role:"separator","aria-orientation":"vertical","aria-label":x,...dt(i["aria-label"]===void 0?d("splitHandle"):void 0),"aria-valuenow":p?w(p.now):void 0,"aria-valuemin":p?w(p.min):void 0,"aria-valuemax":p?w(p.max):void 0,tabIndex:0,className:["clover-split-handle",e].filter(Boolean).join(" "),onPointerDown:k=>{o==null||o(k),b.down(k)},onPointerMove:k=>b.move(k),onPointerUp:k=>b.up(k),onPointerCancel:k=>b.up(k),onClick:k=>{r==null||r(k),b.click(k)},onKeyDown:k=>{s==null||s(k),b.key(k)},...i,children:[n,f(Ke,{label:x})]})});let El;function Ev(t){El=t}function My(){return El}function Mv({open:t,onOpenChange:e,controls:n,side:o}){const{t:r,langOf:s}=Et(),i=pe().replace(/:/g,"");return f(He,{id:`panel-${i}`,label:r("informationPanelToggle"),lang:s("informationPanelToggle"),expanded:t,controls:n,side:o==="start"?o:void 0,onClick:()=>e(!t),children:f(Ct,{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 Tv,lo;const Ml=()=>Tv??(Tv=import("./dragToClose-DXXIWV62.mjs").then(t=>lo=t));function Iv(){Ml()}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},F(()=>{const c=t.current;if(!c||(lo==null||lo.reset(c,a),!e))return;let l=true,d;return Ml().then(u=>{l&&(d=u.attach(c,a))}),()=>{l=false,d==null||d()}},[t,e])}const Pv=240,Av="16rem",Ov="14rem",Nv=31;function Rv(t){const[e,n]=H(t),[o,r]=H(t);return F(()=>{if(t){n(true);const i=requestAnimationFrame(()=>requestAnimationFrame(()=>r(true)));return()=>cancelAnimationFrame(i)}r(false);const s=setTimeout(()=>n(false),Pv);return()=>clearTimeout(s)},[t]),{mounted:e,open:t&&o}}function Bv(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 $v=typeof window>"u"?F:Ut;function Fv(t,e){const[n,o]=H();return $v(()=>{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 Sa=typeof window>"u"?F:Ut;function Dv({id:t,beside:e,defaultOpen:n,side:o,focus:r=Bv,slides:s=true,alongside:i,followFocus:a}){var J,M;const c=R(null),l=R(null),d=R(null),u=e===false,[p,h]=H(n),[m,g]=H(false),y=u?m:p,w=()=>document.querySelector(`button[aria-controls~="${t}"]`),S=()=>a(w),v=()=>{var T,O,U;(T=c.current)!=null&&T.contains(document.activeElement)&&((O=d.current)==null||O.removeAttribute("inert"),(U=w())==null||U.focus(),S())},b=R(0),x=T=>{b.current=u&&T?3:0,b.current||S(),u&&g(T),h(T)},k=()=>{v(),x(false)},N=R(e),D=R(false);if(N.current===true&&e===false){const T=document.activeElement;D.current=!!(T&&((J=c.current)!=null&&J.contains(T)||(M=w())!=null&&M.contains(T)))}Sa(()=>{var T;D.current&&(D.current=false,(T=w())==null||T.focus(),S()),e===true&&g(false),N.current=e},[e]);const j=Rv(s&&u&&y),et=s&&u,V=et?j.mounted:y,nt=et?j.open:y,Y=u&&nt;return Sa(()=>{const T=d.current;if(T)return Y?T.setAttribute("inert",""):T.removeAttribute("inert"),()=>T.removeAttribute("inert")},[Y]),F(()=>{if(!b.current||!c.current)return;b.current-=1;const T=r(c.current);T==null||T.focus({preventScroll:true}),T&&document.activeElement===T&&(b.current=0)}),Lv(c,{enabled:u&&nt,side:o,onClose:k,scrim:l,alongside:i,exits:!s}),{pane:c,main:d,over:u,open:y,shown:V,opened:nt,setOpen:x,close:k,onKeyDown:T=>{u&&y&&T.key==="Escape"&&!T.defaultPrevented&&(T.preventDefault(),k())},scrim:u&&V&&{ref:l,"data-open":nt,"aria-hidden":true,onMouseDown:T=>T.preventDefault(),onClick:k}}}const zv=typeof window>"u"?F:Ut;function Hv(t,e,n){zv(()=>{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 Wv=()=>import("./PanelPart-2H7jd6PS.mjs");function Uv({id:t,beside:e,defaultOpen:n,side:o="end",followFocus:r,body:s,sections:i,panel:a}){const c=Dv({id:t,beside:e,defaultOpen:n,side:o,followFocus:r}),l=!c.over&&c.open,d=R(null),[u,p]=H(),h=a??u,m=()=>Wv().then(w=>p(()=>w.default));F(()=>{c.open&&!h&&m()},[c.open]),Hv(d,()=>s==null?void 0:s(),l&&!!s);const g=w=>{var S,v;(v=(S=w.target).closest)!=null&&v.call(S,`[aria-controls~="${t}"]`)&&(h||m(),c.over&&Iv())},y=f(jv,{sections:i,open:c.open,onOpenChange:w=>w&&!h?m().then(()=>c.setOpen(true)):c.setOpen(w),controls:t,side:o});return{...c,id:t,side:o,docked:l,spine:d,toggle:y,Part:h,splitProps:{"data-panel":c.over?"over":"beside",onKeyDown:c.onKeyDown,onPointerOver:g,onFocus:g}}}function jv({sections:t,...e}){return Ms(t).length?f(Mv,{...e}):null}function Vv({pane:t,className:e,...n}){const{id:o,over:r,docked:s,side:i,Part:a}=t,c=Ms(n.sections);if(!c.length)return null;const l=s&&f(Ct,{children:[f(Cv,{className:"clover-template-panel-handle","aria-controls":o}),f("div",{ref:t.spine,className:"clover-template-spine",children:t.toggle})]});return f(Ct,{children:[i==="end"&&l,f(Cl,{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:Ov,"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 qv=30;function Kv(){const t=R(0);return F(()=>()=>cancelAnimationFrame(t.current),[]),e=>{cancelAnimationFrame(t.current);let n=0;const o=()=>{const r=e();r&&Zv()?r.focus():++n<qv&&(t.current=requestAnimationFrame(o))};t.current=requestAnimationFrame(o)}}function Zv(){const t=document.activeElement;return!t||t===document.body||!t.isConnected||t.closest("[hidden], [inert]")!==null}function Gv({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,interfaceLanguages:d=true,items:u="slider",singleItem:p=false,storageKey:h="clover-template-default",fill:m=false,collapseControls:g,canvasOptions:y,...w}){const S=R(null),v=pe().replace(/:/g,""),b=`${v}-panel`,x=sl(n,`${v}-title`),k=Uv({id:b,beside:Fv(S,Nv),defaultOpen:r??true,followFocus:Kv(),sections:i,body:()=>{var j;return(j=S.current)==null?void 0:j.querySelector(".clover-template-default-body")},panel:lv}),N=k.over,D=o&&k.docked;return f(hf,{className:["clover-template-default",t].filter(Boolean).join(" "),"data-fill":m||void 0,...e?x.group:null,...w,children:f(kv,{ref:S,className:"clover-template-default-panes clover-template-panes",storageKey:h||void 0,...o?k.splitProps:{"data-panel":"beside"},children:[f(Cl,{ref:k.main,className:"clover-template-default-main",min:N?void 0:Av,children:[e&&f("header",{className:"clover-template-default-header",children:[f(Xv,{title:x}),f(wo,{of:"targets",layout:"pager",size:"small",className:"clover-template-default-pager"}),f(ml,{className:"clover-template-default-provider",children:f(gl,{})})]}),f(ug,{loading:false}),f(Tm,{className:"clover-template-default-body",collapseControls:g,options:y,children:o&&!D&&k.toggle}),f("div",{className:"clover-template-default-rail",children:[f("div",{className:"clover-template-default-rail-header",children:[f(Qv,{}),f(lg,{})]}),u&&f(wo,{layout:u,singleItem:p})]})]}),o&&f(Vv,{pane:k,className:"clover-template-default-panel",layout:s,sections:i,labels:a,download:c,languages:l,interfaceLanguages:d,headingLevel:e?Jv(n):n})]})})}function Xv({title:t}){const e=st(o=>{var r;return o.throughCollection?(r=o.collection)==null?void 0:r.label:void 0}),n=fp();return Yv(n==null?void 0:n.entries[0]),f(Ct,{children:[f(an,{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(an,{as:"p",label:e,className:"clover-template-default-collection"}),f(wo,{of:"members",layout:"pager",size:"small",className:"clover-template-default-pager"})]}),n&&f("div",{className:"clover-template-default-collection-row",children:[n.label&&f(an,{as:"p",label:n.label,className:"clover-template-default-collection"}),f(wo,{of:"annotations",layout:"pager",size:"small",className:"clover-template-default-pager"})]})]})}function Yv(t){const{clover:e}=ae(),n=st(r=>{var s;return(s=r.manifest)==null?void 0:s.id}),o=R(null);F(()=>{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 Jv=t=>t+1;function Qv(){const t=ws();return f("p",{className:"clover-template-default-titles",children:t.map((e,n)=>f(ue.Fragment,{children:[n>0&&f("span",{className:"clover-template-default-titles-dot","aria-hidden":"true",children:"\xB7"}),f(an,{label:e.label})]},e.id))})}const ty=()=>import("./renderers-D4wJiQYv.mjs"),ey=vt(()=>import("./Document-BG0F97nL.mjs").then(t=>({default:t.Document}))),ny=vt(()=>import("./Gallery-DN7ajF4i.mjs").then(t=>({default:t.Gallery}))),ka={default:Gv,document:ey,gallery:ny},oy={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 ry({props:t}){const e=typeof t.template=="string"&&t.template in ka?t.template:"default",n=Object.fromEntries(Object.entries(t).filter(([i])=>{var a;return i!=="template"&&(((a=oy[i])==null?void 0:a.includes(e))??true)})),o=rn(ty,!!t.renderers),r=bt(()=>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=ka[e];return f(St,{fallback:null,children:f(s,{...n,iiifContent:t.iiifContent})})}const sy=""+new URL("../assets/maplibre-gl-worker-kTz9OPxr.js",import.meta.url).href,iy={mapWorkerUrl:sy},ay={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"},"interface-languages":{prop:"interfaceLanguages",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"}}};Ev(iy.mapWorkerUrl);iu(ay,()=>Promise.resolve(ry));export{Su as $,R as A,Tm as B,ee as C,kv as D,Cl as E,wo as F,Cv as G,Av as H,xf as I,Vv as J,Iv as K,an as L,vu as M,st as N,fp as O,lg as P,_y as Q,hf as R,ug as S,bt as T,lp as U,St as V,vt as W,ya as X,he as Y,jt as Z,Ut as _,ae as a,Pc as a$,lv as a0,Gd as a1,Sy as a2,ss as a3,cl as a4,ll as a5,Ln as a6,ul as a7,bd as a8,wt as a9,ue as aA,Df as aB,Eh as aC,kc as aD,vc as aE,kh as aF,Ch as aG,Wf as aH,Dc as aI,zd as aJ,ms as aK,mp as aL,Ji as aM,Ef as aN,Tc as aO,te as aP,Af as aQ,Sh as aR,zf as aS,He as aT,gf as aU,Ih as aV,En as aW,Mf as aX,wf as aY,Tf as aZ,If as a_,Es as aa,dt as ab,Bt as ac,hc as ad,Bd as ae,qe as af,Et as ag,Po as ah,It as ai,cg as aj,ie as ak,ag as al,Eo as am,Jr as an,Qr as ao,Nn as ap,Ip as aq,ra as ar,oa as as,Zc as at,ws as au,hp as av,sa as aw,is as ax,Mo as ay,W as az,zu as b,Sf as b$,Pf as b0,Lf as b1,yd as b2,bg as b3,_g as b4,ip as b5,_e as b6,Yg as b7,by as b8,gy as b9,Md as bA,Uc as bB,ih as bC,lc as bD,Ve as bE,as as bF,so as bG,Jd as bH,Ld as bI,Qf as bJ,je as bK,mo as bL,Dn as bM,Pm as bN,Am as bO,ns as bP,Tp as bQ,Ne as bR,Rn as bS,My as bT,el as bU,Tt as bV,Sd as bW,Dd as bX,sh as bY,ds as bZ,dl as b_,uy as ba,cc as bb,Ey as bc,We as bd,Bc as be,bh as bf,Og as bg,es as bh,Cy as bi,ky as bj,Nd as bk,ls as bl,dy as bm,or as bn,ys as bo,Lg as bp,Co as bq,rn as br,rp as bs,dc as bt,Lo as bu,hn as bv,wc as bw,Pv as bx,_l as by,$i as bz,Vc as c,Ss as c0,vy as c1,ch as c2,lr as c3,hd as c4,xh as c5,ic as c6,xp as c7,Ed as c8,dn as c9,Bn as ca,Rr as cb,hh as cc,Ec as cd,fy as ce,hy as cf,py as cg,Sp as ch,pm as ci,ta as cj,gp as ck,vp as cl,yy as cm,fe as cn,se as co,pg as cp,fl as cq,my as cr,vs as cs,Om as ct,Mc as cu,Ql as cv,Bm as cw,dp as d,H as e,pe as f,wy as g,xy as h,Kv as i,Dv as j,Ct as k,Fv as l,Uv as m,Iu as n,Nv as o,Ke as p,ut as q,ks as r,Rm as s,sl as t,f as u,Ue as v,ml as w,le as x,F as y,gl as z};
|