@nulib/clover 4.4.2 → 4.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/components/Annotations/Annotations.mjs +11 -5
- package/dist/components/Items/Items.mjs +15 -5
- package/dist/components/Items/PagerLayout.mjs +1 -0
- package/dist/components/Map/MapView.mjs +1 -1
- 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 +46 -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/i18n/config.mjs +88 -14
- 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/default.css +1 -1
- package/dist/styles/items.css +1 -1
- package/dist/styles/panel.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/templates/default/Default.mjs +2 -0
- package/dist/templates/document/Document.mjs +5 -1
- package/dist/templates/gallery/Gallery.mjs +2 -0
- package/dist/templates/index.d.mts +53 -11
- package/dist/templates/shared/LightboxView.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/useScrollTrack.mjs +34 -19
- package/dist/web-components/About-BMlEaTqj.mjs +1 -0
- package/dist/web-components/AnnotationItems-DNur2mn_.mjs +1 -0
- package/dist/web-components/{AnnotationMenu-BiM0n-6H.mjs → AnnotationMenu-9pQOKEMb.mjs} +1 -1
- package/dist/web-components/AnnotationState-BVDRV-1B.mjs +1 -0
- package/dist/web-components/{Annotations-x5H_Vls9.mjs → Annotations-B5WD596p.mjs} +1 -1
- package/dist/web-components/Annotations-BmETEgUn.mjs +2 -0
- package/dist/web-components/{Body-BWOsHKU1.mjs → Body-BgCsKpGr.mjs} +1 -1
- package/dist/web-components/{BodyAlert-DYfrepDo.mjs → BodyAlert-Dt_medBN.mjs} +1 -1
- package/dist/web-components/{Button-Ch0E6GVj.mjs → Button-DW1Y9SI4.mjs} +1 -1
- package/dist/web-components/{Camera-CY4adJpn.mjs → Camera-Cj_vOD9V.mjs} +1 -1
- package/dist/web-components/{Canvas2DBackend-eFcDTxq6.mjs → Canvas2DBackend-BjCgV8Gn.mjs} +1 -1
- package/dist/web-components/{CanvasView-BqsXUI8n.mjs → CanvasView-fCOQzA_R.mjs} +2 -2
- package/dist/web-components/{CaptionDetails-CuYSbD70.mjs → CaptionDetails-Z5FFvEp8.mjs} +1 -1
- package/dist/web-components/{ChaptersMenu-IlAt1pp2.mjs → ChaptersMenu-b80HFV28.mjs} +1 -1
- package/dist/web-components/{Chevron-uZe3N2Pt.mjs → Chevron-D9HTNAaC.mjs} +1 -1
- package/dist/web-components/{ChoiceMenu-DBJynLGl.mjs → ChoiceMenu-CXtI293_.mjs} +1 -1
- package/dist/web-components/{Collection-C1sRlJK1.mjs → Collection-CASEkwgi.mjs} +1 -1
- package/dist/web-components/{CollectionSelect-BYMQaanx.mjs → CollectionSelect-Boc7wy9j.mjs} +1 -1
- package/dist/web-components/{Connected-Bd2T2EUc.mjs → Connected-Biw2I6Po.mjs} +1 -1
- package/dist/web-components/{Connected-Ckar86TI.mjs → Connected-CNlmumRT.mjs} +1 -1
- package/dist/web-components/{Connected-Dpp3iO3D.mjs → Connected-DXm_z3q9.mjs} +1 -1
- package/dist/web-components/{Contents-DjtD3iKA.mjs → Contents-N3FNf9QU.mjs} +1 -1
- package/dist/web-components/{ControlMenu-CaD8Frag.mjs → ControlMenu-DLJsVZnm.mjs} +1 -1
- package/dist/web-components/ControlsFade-DcPvrXFf.mjs +1 -0
- package/dist/web-components/{CountMenu-DBiLd3X6.mjs → CountMenu-DyBK1e4z.mjs} +1 -1
- package/dist/web-components/Cue-CrnTNjnn.mjs +1 -0
- package/dist/web-components/Document-CZ3qHszc.mjs +1 -0
- package/dist/web-components/{DomLayers-DXbbsOVO.mjs → DomLayers-BwlLZSRc.mjs} +1 -1
- package/dist/web-components/{Download-CgRv1Jio.mjs → Download-WldBPDxr.mjs} +1 -1
- package/dist/web-components/{EntryBodies-DnXLIVR-.mjs → EntryBodies-BwWEgZ1_.mjs} +1 -1
- package/dist/web-components/{EntryThumbnail-BtRvqME5.mjs → EntryThumbnail-C56uAnMQ.mjs} +1 -1
- package/dist/web-components/{FieldPill-CmagfxvU.mjs → FieldPill-C1UAftNo.mjs} +1 -1
- package/dist/web-components/{FrameAnimation-DmqYAi-M.mjs → FrameAnimation-BpHvVjI3.mjs} +1 -1
- package/dist/web-components/Gallery-h9AR15s0.mjs +1 -0
- package/dist/web-components/GlobeGlyph-CnvS-FYu.mjs +1 -0
- package/dist/web-components/{HideToggle-aDBXi6F0.mjs → HideToggle-D-r79OIC.mjs} +1 -1
- package/dist/web-components/{ImageControls-CdEwkNkw.mjs → ImageControls-CdcicjR7.mjs} +1 -1
- package/dist/web-components/Items-CVvtjq7r.mjs +1 -0
- package/dist/web-components/Label-CvbxytPx.mjs +1 -0
- package/dist/web-components/LanguageChoice-BJd_RsYq.mjs +1 -0
- package/dist/web-components/LanguageMenu-BsnzmKwN.mjs +1 -0
- package/dist/web-components/LightboxView-DReKv-Dd.mjs +1 -0
- package/dist/web-components/{ListEnd-D1Y0rzNK.mjs → ListEnd-DwtNoi_1.mjs} +1 -1
- package/dist/web-components/{Loaded-Bebqgt6V.mjs → Loaded-BPOKsLbO.mjs} +1 -1
- package/dist/web-components/LoadedCanvas-HQwMz-9o.mjs +1 -0
- package/dist/web-components/LoadedMap-Totn9tyS.mjs +1 -0
- package/dist/web-components/{Loading-B5lpxt7E.mjs → Loading-C5mJstXv.mjs} +1 -1
- package/dist/web-components/{Map-DsHQLS6G.mjs → Map-Drj3FcfB.mjs} +1 -1
- package/dist/web-components/MapView-Bf4alyhB.mjs +3 -0
- package/dist/web-components/{Markup-CQb91uB6.mjs → Markup-DgJRP5fa.mjs} +1 -1
- package/dist/web-components/{MediaBody-BbipyE0n.mjs → MediaBody-1FBP2j7l.mjs} +1 -1
- package/dist/web-components/{MediaBody-CuCVF-N7.mjs → MediaBody-BEWLYzRU.mjs} +1 -1
- package/dist/web-components/{NavDate-CjJTuBbs.mjs → NavDate-rtQNHF_X.mjs} +1 -1
- package/dist/web-components/{Navigator-BKVI3csP.mjs → Navigator-Byl5hEjY.mjs} +1 -1
- package/dist/web-components/{Pager-CTvxvbel.mjs → Pager-DkTHvyHN.mjs} +1 -1
- package/dist/web-components/PagerLayout-C6kl1hk2.mjs +1 -0
- package/dist/web-components/Panel-C6gKilND.mjs +1 -0
- package/dist/web-components/PanelPart-B_2EB7jQ.mjs +1 -0
- package/dist/web-components/{PanelToggle-Dsp3JD1s.mjs → PanelToggle-DqoE9niZ.mjs} +1 -1
- package/dist/web-components/{PartOfManifest-Bu5XTdcH.mjs → PartOfManifest-ydDwjNTt.mjs} +1 -1
- package/dist/web-components/{Pending-C7ZSt2eL.mjs → Pending-DWJWng2S.mjs} +1 -1
- package/dist/web-components/{PlaceBox-PwpqCwOS.mjs → PlaceBox-DB54T8Pe.mjs} +1 -1
- package/dist/web-components/{Placeholder-B_DxAE6y.mjs → Placeholder-DJg1rjuD.mjs} +1 -1
- package/dist/web-components/{Position-CQ7FBqd0.mjs → Position-BHc5qoff.mjs} +1 -1
- package/dist/web-components/Primitives-Ea4kfG9I.mjs +1 -0
- package/dist/web-components/Provider-D9_x7agY.mjs +1 -0
- package/dist/web-components/{ReadMore-0vMRgzA8.mjs → ReadMore-Dv-gInr5.mjs} +1 -1
- package/dist/web-components/Root-Cju5jUFL.mjs +1 -0
- package/dist/web-components/Scene-B6doLHT0.mjs +1 -0
- package/dist/web-components/{SceneView-DSUVfGQR.mjs → SceneView-CekvA-s4.mjs} +1 -1
- package/dist/web-components/Search-Dp2mguRJ.mjs +1 -0
- package/dist/web-components/{Sections-BdEZZD0J.mjs → Sections-DURsiaS-.mjs} +1 -1
- package/dist/web-components/{SeekMarks-ByDBrurH.mjs → SeekMarks-DT6hra-w.mjs} +1 -1
- package/dist/web-components/StandaloneItems-aPSHNgk2.mjs +1 -0
- package/dist/web-components/{Status-CK2v5LdZ.mjs → Status-pDPG5ab1.mjs} +1 -1
- package/dist/web-components/{Steps-DlYRgYiS.mjs → Steps-DCyGkbOP.mjs} +1 -1
- package/dist/web-components/{TargetItems-B0ZkDWAH.mjs → TargetItems-Be6A1gcy.mjs} +1 -1
- package/dist/web-components/Timeline-Cj9cCYCA.mjs +1 -0
- package/dist/web-components/{Tip-BPxXnFcb.mjs → Tip-Bsd8bCx9.mjs} +1 -1
- package/dist/web-components/Transcript-bQaRVoI_.mjs +1 -0
- package/dist/web-components/{Transport-nQ1ytZeY.mjs → Transport-DOzVY_IU.mjs} +1 -1
- package/dist/web-components/{Transport-Cc1VnGe1.mjs → Transport-DUGGwa-G.mjs} +1 -1
- package/dist/web-components/{annotation-collection-JrLc_Org.mjs → annotation-collection-DGCbF6YN.mjs} +1 -1
- package/dist/web-components/{annotation-name-WwXE5c2m.mjs → annotation-name-DFdgSllS.mjs} +1 -1
- package/dist/web-components/{annotations-content-G5YUyhp2.mjs → annotations-content-CwUfqHPh.mjs} +1 -1
- package/dist/web-components/{body-BvY3Vpf_.mjs → body-C3LAo8pl.mjs} +1 -1
- package/dist/web-components/{canvas-CaNpS96c.mjs → canvas-BUmbx6sa.mjs} +1 -1
- package/dist/web-components/{cloverEngine-Cpp8BjZa.mjs → cloverEngine-gT8L7Xi7.mjs} +1 -1
- package/dist/web-components/{content-state-reader-DakKAf36.mjs → content-state-reader-B3GmJui6.mjs} +1 -1
- package/dist/web-components/{controlGlyphs-bqWNGQ1-.mjs → controlGlyphs-BC2tLOYb.mjs} +1 -1
- package/dist/web-components/{controls-Db0929rf.mjs → controls-n8BSf19H.mjs} +1 -1
- package/dist/web-components/custom-elements.json +35 -3
- package/dist/web-components/downloads-CurHNK9M.mjs +1 -0
- package/dist/web-components/{dragToClose-D5AN98l4.mjs → dragToClose-Cbxkgv9j.mjs} +1 -1
- package/dist/web-components/{engine-B1m2m56g.mjs → engine-C51pr0Wa.mjs} +1 -1
- package/dist/web-components/{engines-CBm3cDwx.mjs → engines-CZzpPjXO.mjs} +1 -1
- package/dist/web-components/{fetchManifest-lvHWlQYu.mjs → fetchManifest-Crn4VJ56.mjs} +1 -1
- package/dist/web-components/{fromManifest-ZbH8cYoN.mjs → fromManifest-Ci0vEX5i.mjs} +1 -1
- package/dist/web-components/{glyphs-BtnJwbd5.mjs → glyphs-BcLY9GG7.mjs} +1 -1
- package/dist/web-components/hooks-C9BeaqLZ.mjs +1 -0
- package/dist/web-components/{image-layers-DjUA6eWF.mjs → image-layers-zWauwKEw.mjs} +1 -1
- package/dist/web-components/image-service-content-BAmoCFAH.mjs +1 -0
- package/dist/web-components/{imageService-B9yNXMcD.mjs → imageService-DXS2KuSL.mjs} +1 -1
- package/dist/web-components/index-BxhBBH2G.mjs +1 -0
- package/dist/web-components/index.mjs +1 -1
- package/dist/web-components/items-CPW7LZpT.mjs +1 -0
- package/dist/web-components/items-DUZSfcSf.mjs +1 -0
- package/dist/web-components/ja-Cg1enUhM.mjs +1 -0
- package/dist/web-components/label-BswVRwfJ.mjs +1 -0
- package/dist/web-components/layout-NPxKIp1S.mjs +1 -0
- package/dist/web-components/{link-BhvZNgtv.mjs → link-DI1Gv9P_.mjs} +1 -1
- package/dist/web-components/logo-Ccv2scvi.mjs +1 -0
- package/dist/web-components/{models-CIHL07o7.mjs → models-DtSFB57l.mjs} +1 -1
- package/dist/web-components/{nodes-TS4tB7cC.mjs → nodes-BEUmRfuQ.mjs} +1 -1
- package/dist/web-components/{overlayImage-B3ItMjXk.mjs → overlayImage-BOqTHR8E.mjs} +1 -1
- package/dist/web-components/{panel-M3PpVN7f.mjs → panel-Cd5S9Ezy.mjs} +1 -1
- package/dist/web-components/part-C7WLTw20.mjs +1 -0
- package/dist/web-components/{playerSurface-BGgYHT2u.mjs → playerSurface-QGjBv9Yq.mjs} +1 -1
- package/dist/web-components/{pointer-J2gT4W9m.mjs → pointer-BLFSppkR.mjs} +1 -1
- package/dist/web-components/{provider-CdJfEMUj.mjs → provider-BMZpItBJ.mjs} +1 -1
- package/dist/web-components/{range-regions-DxSIpIVo.mjs → range-regions-DX9sTrBU.mjs} +1 -1
- package/dist/web-components/{read-more-wCGc6ELt.mjs → read-more-DSnuyAMI.mjs} +1 -1
- package/dist/web-components/readingLanguages-C83aK9na.mjs +1 -0
- package/dist/web-components/rendererSurface-Clg0MuAj.mjs +22 -0
- package/dist/web-components/{renderers-zAtpns1S.mjs → renderers-DnnMGnA9.mjs} +1 -1
- package/dist/web-components/resource-BxbCXGtG.mjs +1 -0
- package/dist/web-components/{save-file-DquBqxrS.mjs → save-file-CuRpXpO7.mjs} +1 -1
- package/dist/web-components/{search-ChOKTYz9.mjs → search-B8ycnAKR.mjs} +1 -1
- package/dist/web-components/shared-CzlxExGR.mjs +1 -0
- package/dist/web-components/{show-link-Dry4M5w1.mjs → show-link-BOEKHpcs.mjs} +1 -1
- package/dist/web-components/{sizedImage-CjFqzhUE.mjs → sizedImage-BNlShxVG.mjs} +1 -1
- package/dist/web-components/{split-88HcOLCm.mjs → split-BwdAJ7v3.mjs} +1 -1
- package/dist/web-components/{status-BNrkhMe7.mjs → status-DwwUoyYG.mjs} +1 -1
- package/dist/web-components/styles-C51FhQQr.mjs +1 -0
- package/dist/web-components/three.mjs +1 -1
- package/dist/web-components/{thumbnail-CoFd2duc.mjs → thumbnail-Bx8UP6ak.mjs} +1 -1
- package/dist/web-components/{tip-BCClTo0G.mjs → tip-DNLMHjGA.mjs} +1 -1
- package/dist/web-components/{toggle-DavvlVdF.mjs → toggle-D-vRsWQx.mjs} +1 -1
- package/dist/web-components/{useContainerName-B_Kzx2Wp.mjs → useContainerName-CAlWJohz.mjs} +1 -1
- package/dist/web-components/{useControlsVisibility-BdD2byHj.mjs → useControlsVisibility-IAlNQKAy.mjs} +1 -1
- package/dist/web-components/{useNearViewport-Bj8qJEA0.mjs → useNearViewport-B8E_rit4.mjs} +1 -1
- package/dist/web-components/useScrollTrack-D7S-3b7o.mjs +1 -0
- package/dist/web-components/viewer/{AnnotationItems-3Sf8MxRQ.mjs → AnnotationItems-DLBXufXN.mjs} +1 -1
- package/dist/web-components/viewer/{AnnotationMenu-_xBnZtm1.mjs → AnnotationMenu-VQICxqCw.mjs} +1 -1
- package/dist/web-components/viewer/AnnotationState-Blwq33RX.mjs +1 -0
- package/dist/web-components/viewer/Annotations-DE9evpU8.mjs +2 -0
- package/dist/web-components/viewer/{Annotations-24ComVk9.mjs → Annotations-DHKvpN_g.mjs} +1 -1
- package/dist/web-components/viewer/{Canvas2DBackend-DPWYD9ST.mjs → Canvas2DBackend-CRMajv3c.mjs} +1 -1
- package/dist/web-components/viewer/CaptionDetails-B13rxFZq.mjs +1 -0
- package/dist/web-components/viewer/{ChaptersMenu-C5J0d8Ck.mjs → ChaptersMenu-IAVcnwMF.mjs} +1 -1
- package/dist/web-components/viewer/{ChoiceMenu-B8iukYiR.mjs → ChoiceMenu-CORn4IQ7.mjs} +1 -1
- package/dist/web-components/viewer/{Collection-CPVQ3JtI.mjs → Collection-CefKVGoo.mjs} +1 -1
- package/dist/web-components/viewer/{Connected-x3v9xr7x.mjs → Connected-BwhumfiG.mjs} +1 -1
- package/dist/web-components/viewer/{Connected-D5_bZzr5.mjs → Connected-KiqCyCyf.mjs} +1 -1
- package/dist/web-components/viewer/{Contents-Ma7oDW1R.mjs → Contents-DLGRh2XL.mjs} +1 -1
- package/dist/web-components/viewer/{ControlMenu-D2HokCqd.mjs → ControlMenu-DBSEW19Y.mjs} +1 -1
- package/dist/web-components/viewer/ControlsFade-CQ-g8cVb.mjs +1 -0
- package/dist/web-components/viewer/{CountMenu-BnDN2b0n.mjs → CountMenu-C8_qWHK5.mjs} +1 -1
- package/dist/web-components/viewer/Cue-BwJDU9Vs.mjs +1 -0
- package/dist/web-components/viewer/Document-CbMXbIZ9.mjs +1 -0
- package/dist/web-components/viewer/{DomLayers-BW2A4z82.mjs → DomLayers-ByxbcmL1.mjs} +1 -1
- package/dist/web-components/viewer/{Download-Cc_NA7QN.mjs → Download-3rtn7gLF.mjs} +1 -1
- package/dist/web-components/viewer/{EntryBodies-Bz69SWZh.mjs → EntryBodies-BP12ovq7.mjs} +1 -1
- package/dist/web-components/viewer/{EntryThumbnail-C8cUA5qc.mjs → EntryThumbnail-DpP82iU_.mjs} +1 -1
- package/dist/web-components/viewer/{FieldPill-BzKvMF-K.mjs → FieldPill-BSdPIm-Q.mjs} +1 -1
- package/dist/web-components/viewer/{FrameAnimation-DiQgfgri.mjs → FrameAnimation-DpoTQ3xX.mjs} +1 -1
- package/dist/web-components/viewer/Gallery-BtJZKRID.mjs +1 -0
- package/dist/web-components/viewer/GlobeGlyph-CI64v0-v.mjs +1 -0
- package/dist/web-components/viewer/{HideToggle-jg311sUK.mjs → HideToggle-CmpZYjui.mjs} +1 -1
- package/dist/web-components/viewer/{ImageControls-8ZIWLAkf.mjs → ImageControls-Da6YHXjJ.mjs} +1 -1
- package/dist/web-components/viewer/LanguageChoice-CbS8ksEM.mjs +1 -0
- package/dist/web-components/viewer/LanguageMenu-l2Me1RBQ.mjs +1 -0
- package/dist/web-components/viewer/LightboxView-BCDkk6yf.mjs +1 -0
- package/dist/web-components/viewer/{ListEnd-JjGQ_q6c.mjs → ListEnd-DFpeNm-y.mjs} +1 -1
- package/dist/web-components/viewer/{MapView-tAZ4vINr.mjs → MapView-DG-ZUI7R.mjs} +2 -2
- package/dist/web-components/viewer/{MediaBody-Da60tZIj.mjs → MediaBody-BgBDbfHg.mjs} +1 -1
- package/dist/web-components/viewer/{MediaBody-CQAJJpuz.mjs → MediaBody-byvlUB_B.mjs} +1 -1
- package/dist/web-components/viewer/{NavDate-B7T2iPfP.mjs → NavDate-DpToOfYG.mjs} +1 -1
- package/dist/web-components/viewer/{Navigator-sEfTvK-l.mjs → Navigator-UVu84RyI.mjs} +1 -1
- package/dist/web-components/viewer/PagerLayout-C3HEM9Ev.mjs +1 -0
- package/dist/web-components/viewer/PanelPart-7DmaKxVo.mjs +1 -0
- package/dist/web-components/viewer/{PartOfManifest-BYgk9r1j.mjs → PartOfManifest-CAG-54_j.mjs} +1 -1
- package/dist/web-components/viewer/{PlaceBox-BBtsMTsl.mjs → PlaceBox-4kYT5bX0.mjs} +1 -1
- package/dist/web-components/viewer/{Placeholder-5focqckW.mjs → Placeholder-BGtNqkT3.mjs} +1 -1
- package/dist/web-components/viewer/Search-lYKOtFBO.mjs +1 -0
- package/dist/web-components/viewer/{SeekMarks-CUyvbMfC.mjs → SeekMarks-By4ZSK6u.mjs} +1 -1
- package/dist/web-components/viewer/{StandaloneItems-DsoMdwWS.mjs → StandaloneItems-NfsSxROI.mjs} +1 -1
- package/dist/web-components/viewer/{Steps-zpuoH0K0.mjs → Steps-BOB1n3WM.mjs} +1 -1
- package/dist/web-components/viewer/{TargetItems-DIKBor9X.mjs → TargetItems-vP03hWU8.mjs} +1 -1
- package/dist/web-components/viewer/Transcript-CCn5yqeZ.mjs +1 -0
- package/dist/web-components/viewer/{Transport-DMnPpTsQ.mjs → Transport-B-GTF-rz.mjs} +1 -1
- package/dist/web-components/viewer/{Transport-BM3IMXDW.mjs → Transport-Qi3YTaFs.mjs} +1 -1
- package/dist/web-components/viewer/{annotation-collection-C_9c9NPs.mjs → annotation-collection-CqFki-7M.mjs} +1 -1
- package/dist/web-components/viewer/{annotation-name-jt1y3erg.mjs → annotation-name-z-zyEc1-.mjs} +1 -1
- package/dist/web-components/viewer/annotations-content-xp-O7sy-.mjs +1 -0
- package/dist/web-components/viewer/{cloverEngine-CVyaltw7.mjs → cloverEngine-BSk-sfvP.mjs} +2 -2
- package/dist/web-components/viewer/{content-state-reader-DIcY4zWj.mjs → content-state-reader-DL-mMGZi.mjs} +1 -1
- package/dist/web-components/viewer/{dragToClose-D2h8gIpa.mjs → dragToClose-vevhuGlo.mjs} +1 -1
- package/dist/web-components/viewer/{fetchManifest-C66Fk39V.mjs → fetchManifest-C-_la_Ym.mjs} +1 -1
- package/dist/web-components/viewer/{host-Fl21T-Pt.mjs → host-DHOefZ2L.mjs} +1 -1
- package/dist/web-components/viewer/{image-layers-CpDOoRh9.mjs → image-layers-qNcOTmq3.mjs} +1 -1
- package/dist/web-components/viewer/image-service-content-D63obMOY.mjs +1 -0
- package/dist/web-components/viewer/index.mjs +1 -1
- package/dist/web-components/viewer/{link-DlX6OdhG.mjs → link-BZAbKwFF.mjs} +1 -1
- package/dist/web-components/viewer/overlayImage-oEpv2EvC.mjs +1 -0
- package/dist/web-components/viewer/{range-regions--YB9ll1N.mjs → range-regions-YtOKXMW8.mjs} +1 -1
- package/dist/web-components/viewer/{renderers-zvRp3xYJ.mjs → renderers-BdXu40PJ.mjs} +1 -1
- package/dist/web-components/viewer/{save-file-83yWcPHX.mjs → save-file-Cktvr4HF.mjs} +1 -1
- package/dist/web-components/viewer/{search-DDXsrZz3.mjs → search-CSjEe4Yv.mjs} +1 -1
- package/dist/web-components/viewer/styles-BjjJM8OS.mjs +1 -0
- package/dist/web-components/viewer/{useControlsVisibility-CudUJBCj.mjs → useControlsVisibility-CBeiyfcO.mjs} +1 -1
- package/dist/web-components/viewer/viewer-B7xAOtQD.mjs +29 -0
- package/dist/web-components/viewer/{vtt-D1xyC48J.mjs → vtt-BRwEspJw.mjs} +1 -1
- package/dist/web-components/viewer-BomG9B8d.mjs +1 -0
- package/dist/web-components/{vtt-ChAUl4lm.mjs → vtt-Cx6_Tym1.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-rhhglI1Z.mjs +0 -1
- package/dist/web-components/AnnotationItems-9o4vZn9M.mjs +0 -1
- package/dist/web-components/AnnotationState-BCfjI6kC.mjs +0 -1
- package/dist/web-components/Annotations-bAuL-Vo6.mjs +0 -2
- package/dist/web-components/ControlsFade-qs_zu-DZ.mjs +0 -1
- package/dist/web-components/Cue-CrlByfoX.mjs +0 -1
- package/dist/web-components/Document-C3K-CXHu.mjs +0 -1
- package/dist/web-components/Gallery-DMNATgzf.mjs +0 -1
- package/dist/web-components/Items-xeEzg7uu.mjs +0 -1
- package/dist/web-components/Label-7SZqCiYh.mjs +0 -1
- package/dist/web-components/LanguageChoice-DrIQjsPP.mjs +0 -1
- package/dist/web-components/LightboxView-BzxRQK6r.mjs +0 -1
- package/dist/web-components/LoadedCanvas-8To8LkUE.mjs +0 -1
- package/dist/web-components/LoadedMap-BmF3Gmnw.mjs +0 -1
- package/dist/web-components/MapView-DcLIazmJ.mjs +0 -3
- package/dist/web-components/PagerLayout-DR6V9wwv.mjs +0 -1
- package/dist/web-components/Panel-BBRkfdof.mjs +0 -1
- package/dist/web-components/PanelPart-Cdbsnr8P.mjs +0 -1
- package/dist/web-components/Primitives-D5lVsBs8.mjs +0 -1
- package/dist/web-components/Provider-B9X74RHz.mjs +0 -1
- package/dist/web-components/Root-COIMTFHh.mjs +0 -1
- package/dist/web-components/Scene-DjUgqzXR.mjs +0 -1
- package/dist/web-components/Search-DOitIwis.mjs +0 -1
- package/dist/web-components/StandaloneItems-DATV9XoT.mjs +0 -1
- package/dist/web-components/Timeline-D-FevrUe.mjs +0 -1
- package/dist/web-components/Transcript-BLm9tljk.mjs +0 -1
- package/dist/web-components/downloads-CGkM4OSO.mjs +0 -1
- package/dist/web-components/hooks-BLpTDu28.mjs +0 -1
- package/dist/web-components/index-2F1l5TLi.mjs +0 -1
- package/dist/web-components/items-C56FfpBX.mjs +0 -1
- package/dist/web-components/items-DlG6IYqm.mjs +0 -1
- package/dist/web-components/label-DJ-Udq1e.mjs +0 -1
- package/dist/web-components/layout-Dh0myod-.mjs +0 -1
- package/dist/web-components/logo-k93ZgyqF.mjs +0 -1
- package/dist/web-components/part-Df1Vr2Ss.mjs +0 -1
- package/dist/web-components/readingLanguages-DmZ8CHoc.mjs +0 -1
- package/dist/web-components/rendererSurface-Bk7SHYws.mjs +0 -22
- package/dist/web-components/resource-Cb3AnAXL.mjs +0 -1
- package/dist/web-components/shared-D4j4IirO.mjs +0 -1
- package/dist/web-components/styles-Ca564vB9.mjs +0 -1
- package/dist/web-components/useScrollTrack-DBIW4pCJ.mjs +0 -1
- package/dist/web-components/viewer/AnnotationState-o4goI6T-.mjs +0 -1
- package/dist/web-components/viewer/Annotations-CJamLUnL.mjs +0 -2
- package/dist/web-components/viewer/CaptionDetails-DNPq32gk.mjs +0 -1
- package/dist/web-components/viewer/ControlsFade-JoRgQt8U.mjs +0 -1
- package/dist/web-components/viewer/Cue-FHw5d8zO.mjs +0 -1
- package/dist/web-components/viewer/Document-DiXiOkPn.mjs +0 -1
- package/dist/web-components/viewer/Gallery-BYmzAEuZ.mjs +0 -1
- package/dist/web-components/viewer/LanguageChoice-BXXMBe-A.mjs +0 -1
- package/dist/web-components/viewer/LightboxView-DnN0fkeg.mjs +0 -1
- package/dist/web-components/viewer/PagerLayout-B4C72jTV.mjs +0 -1
- package/dist/web-components/viewer/PanelPart-Di406l-a.mjs +0 -1
- package/dist/web-components/viewer/Search-DbHlUxOS.mjs +0 -1
- package/dist/web-components/viewer/Transcript-B_puRtfb.mjs +0 -1
- package/dist/web-components/viewer/annotations-content-Dg8h7vJX.mjs +0 -1
- package/dist/web-components/viewer/overlayImage-yGXMVHgX.mjs +0 -1
- package/dist/web-components/viewer/styles-04jB_4IT.mjs +0 -1
- package/dist/web-components/viewer/viewer-0aUYzmQj.mjs +0 -29
- package/dist/web-components/viewer-B_5rFgy5.mjs +0 -1
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
var Fl=Object.defineProperty;var Dl=(t,e,n)=>e in t?Fl(t,e,{enumerable:true,configurable:true,writable:true,value:n}):t[e]=n;var P=(t,e,n)=>Dl(t,typeof e!="symbol"?e+"":e,n);import{s as ga}from"./styles-04jB_4IT.mjs";function zl(t={}){return Promise.resolve().then(()=>Uu).then(e=>e.initCloverI18n(t))}const va="@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 Hl=null,bn=null;const Wl=()=>Hl??(Hl=import("./host-Fl21T-Pt.mjs").then(t=>bn=t)),Ul=t=>t.trim().toLowerCase()==="false";function jl(t,{type:e,min:n},o){if(t===null)return;if(e==="string")return t;if(e==="boolean")return!Ul(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 Vl=(t,e)=>{const n=Object.keys(t);return n.length===Object.keys(e).length&&n.every(o=>Object.is(t[o],e[o]))};function ql(t){class e extends HTMLElement{constructor(){super(...arguments);P(this,"kind",t.kind)}static get observedAttributes(){return Object.keys(t.attributes)}connectedCallback(){ga(this.ownerDocument).inject("elements",va)}}customElements.define(t.tag,e)}function Kl(t,e){if(typeof customElements>"u"||customElements.get(t.tag))return;if(t.kind==="config"||!e)return ql(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),Wl()]));class c extends HTMLElement{constructor(){super(...arguments);P(this,"kind",n);P(this,"needsRoot",!!t.needsRoot);P(this,"values",{});P(this,"kept",{});P(this,"props",{});P(this,"listeners",new Set);P(this,"warned",new Set);P(this,"handlers",Object.fromEntries(r.map(([u,h])=>[h.prop,(...p)=>{var v;if(h.keeps&&(this.kept[h.keeps]=p[0]??null,p[0]==null))return true;const m=h.detail==="first"?p[0]:Object.fromEntries(h.detail.map((w,_)=>[w,p[_]])),g=new CustomEvent(u,{detail:m,bubbles:!h.keeps,composed:!h.keeps,cancelable:!!h.cancelable}),b=this.dispatchEvent(g);if(!b&&h.cancelable){const w=p[p.length-1];(v=w==null?void 0:w.preventDefault)==null||v.call(w)}return b}])));P(this,"getProps",()=>this.props);P(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 h=this[u];delete this[u],h!=null&&(this.values[u]=h)}this.update(),this.warnOfAria(),ga(this.ownerDocument).inject("elements",va),a().then(()=>{this.isConnected&&bn.hostOf(this.ownerDocument).connect(this)})}disconnectedCallback(){queueMicrotask(()=>{this.isConnected||bn==null||bn.hostOf(this.ownerDocument).disconnect(this)})}attributeChangedCallback(){this.update()}warnOfAria(){if(!t.native)for(const 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[h,p]of Object.entries(t.attributes)){if(p.prop in this.values)continue;const m=this.getAttribute(h),g=jl(m,p,b=>{const v=`${h}=${m}`;this.warned.has(v)||(this.warned.add(v),console.warn(`<${t.tag}>: ${h}="${m}" ${b}; ignored.`))});g!==void 0&&(u[p.prop]=g)}Vl(u,this.props)||(this.props=u,this.listeners.forEach(h=>h()))}}P(c,"initCloverI18n",zl);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 Tn,lt,ya,$e,Vs,ba,_a,wa,Fr,pr,mr,xa,kn={},Sa=[],Zl=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Pn=Array.isArray;function se(t,e){for(var n in e)t[n]=e[n];return t}function Dr(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function _e(t,e,n){var o,r,s,i={};for(s in e)s=="key"?o=e[s]:s=="ref"?r=e[s]:i[s]=e[s];if(arguments.length>2&&(i.children=arguments.length>3?Tn.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(s in t.defaultProps)i[s]===void 0&&(i[s]=t.defaultProps[s]);return xn(t,i,o,r,null)}function xn(t,e,n,o,r){var s={type:t,props:e,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:r??++ya,__i:-1,__u:0};return r==null&<.vnode!=null&<.vnode(s),s}function Gl(){return{current:null}}function kt(t){return t.children}function ie(t,e){this.props=t,this.context=e}function rn(t,e){if(e==null)return t.__?rn(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?rn(t):null}function ka(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 ka(t)}}function gr(t){(!t.__d&&(t.__d=true)&&$e.push(t)&&!io.__r++||Vs!=lt.debounceRendering)&&((Vs=lt.debounceRendering)||ba)(io)}function io(){for(var t,e,n,o,r,s,i,a=1;$e.length;)$e.length>a&&$e.sort(_a),t=$e.shift(),a=$e.length,t.__d&&(n=void 0,o=void 0,r=(o=(e=t).__v).__e,s=[],i=[],e.__P&&((n=se({},o)).__v=o.__v+1,lt.vnode&<.vnode(n),zr(e.__P,n,o,e.__n,e.__P.namespaceURI,32&o.__u?[r]:null,s,r??rn(o),!!(32&o.__u),i),n.__v=o.__v,n.__.__k[n.__i]=n,Ma(s,n,i),o.__e=o.__=null,n.__e!=r&&ka(n)));io.__r=0}function Ca(t,e,n,o,r,s,i,a,c,l,d){var u,h,p,m,g,b,v,w=o&&o.__k||Sa,_=e.length;for(c=Xl(n,e,w,c,_),u=0;u<_;u++)(p=n.__k[u])!=null&&(h=p.__i==-1?kn:w[p.__i]||kn,p.__i=u,b=zr(t,p,h,r,s,i,a,c,l,d),m=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&Hr(h.ref,null,p),d.push(p.ref,p.__c||m,p)),g==null&&m!=null&&(g=m),(v=!!(4&p.__u))||h.__k===p.__k?c=Ea(p,c,t,v):typeof p.type=="function"&&b!==void 0?c=b:m&&(c=m.nextSibling),p.__u&=-7);return n.__e=g,c}function Xl(t,e,n,o,r){var s,i,a,c,l,d=n.length,u=d,h=0;for(t.__k=new Array(r),s=0;s<r;s++)(i=e[s])!=null&&typeof i!="boolean"&&typeof i!="function"?(c=s+h,(i=t.__k[s]=typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?xn(null,i,null,null,null):Pn(i)?xn(kt,{children:i},null,null,null):i.constructor==null&&i.__b>0?xn(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=t,i.__b=t.__b+1,a=null,(l=i.__i=Yl(i,n,c,u))!=-1&&(u--,(a=n[l])&&(a.__u|=2)),a==null||a.__v==null?(l==-1&&(r>d?h--:r<d&&h++),typeof i.type!="function"&&(i.__u|=4)):l!=c&&(l==c-1?h--:l==c+1?h++:(l>c?h--:h++,i.__u|=4))):t.__k[s]=null;if(u)for(s=0;s<d;s++)(a=n[s])!=null&&!(2&a.__u)&&(a.__e==o&&(o=rn(a)),Pa(a,a));return o}function Ea(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=Ea(r[s],e,n,o));return e}t.__e!=e&&(o&&(e&&t.type&&!e.parentNode&&(e=rn(t)),n.insertBefore(t.__e,e||null)),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function be(t,e){return e=e||[],t==null||typeof t=="boolean"||(Pn(t)?t.some(function(n){be(n,e)}):e.push(t)),e}function Yl(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 qs(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||Zl.test(e)?n:n+"px"}function Jn(t,e,n,o,r){var s,i;t:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof o=="string"&&(t.style.cssText=o=""),o)for(e in o)n&&e in n||qs(t.style,e,"");if(n)for(e in n)o&&n[e]==o[e]||qs(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")s=e!=(e=e.replace(wa,"$1")),i=e.toLowerCase(),e=i in t||e=="onFocusOut"||e=="onFocusIn"?i.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+s]=n,n?o?n.u=o.u:(n.u=Fr,t.addEventListener(e,s?mr:pr,s)):t.removeEventListener(e,s?mr:pr,s);else{if(r=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break t}catch{}typeof n=="function"||(n==null||n===false&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function Ks(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=Fr++;else if(e.t<n.u)return;return n(lt.event?lt.event(e):e)}}}function zr(t,e,n,o,r,s,i,a,c,l){var d,u,h,p,m,g,b,v,w,_,x,S,M,B,O,Q,nt,G=e.type;if(e.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),s=[a=e.__e=n.__e]),(d=lt.__b)&&d(e);t:if(typeof G=="function")try{if(v=e.props,w="prototype"in G&&G.prototype.render,_=(d=G.contextType)&&o[d.__c],x=d?_?_.props.value:d.__:o,n.__c?b=(u=e.__c=n.__c).__=u.__E:(w?e.__c=u=new G(v,x):(e.__c=u=new ie(v,x),u.constructor=G,u.render=Ql),_&&_.sub(u),u.props=v,u.state||(u.state={}),u.context=x,u.__n=o,h=u.__d=true,u.__h=[],u._sb=[]),w&&u.__s==null&&(u.__s=u.state),w&&G.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=se({},u.__s)),se(u.__s,G.getDerivedStateFromProps(v,u.__s))),p=u.props,m=u.state,u.__v=e,h)w&&G.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),w&&u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(w&&G.getDerivedStateFromProps==null&&v!==p&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(v,x),!u.__e&&u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(v,u.__s,x)===false||e.__v==n.__v){for(e.__v!=n.__v&&(u.props=v,u.state=u.__s,u.__d=false),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(tt){tt&&(tt.__=e)}),S=0;S<u._sb.length;S++)u.__h.push(u._sb[S]);u._sb=[],u.__h.length&&i.push(u);break t}u.componentWillUpdate!=null&&u.componentWillUpdate(v,u.__s,x),w&&u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(p,m,g)})}if(u.context=x,u.props=v,u.__P=t,u.__e=false,M=lt.__r,B=0,w){for(u.state=u.__s,u.__d=false,M&&M(e),d=u.render(u.props,u.state,u.context),O=0;O<u._sb.length;O++)u.__h.push(u._sb[O]);u._sb=[]}else do u.__d=false,M&&M(e),d=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++B<25);u.state=u.__s,u.getChildContext!=null&&(o=se(se({},o),u.getChildContext())),w&&!h&&u.getSnapshotBeforeUpdate!=null&&(g=u.getSnapshotBeforeUpdate(p,m)),Q=d,d!=null&&d.type===kt&&d.key==null&&(Q=Ta(d.props.children)),a=Ca(t,Pn(Q)?Q:[Q],e,n,o,r,s,i,a,c,l),u.base=e.__e,e.__u&=-161,u.__h.length&&i.push(u),b&&(u.__E=u.__=null)}catch(tt){if(e.__v=null,c||s!=null)if(tt.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(nt=s.length;nt--;)Dr(s[nt]);vr(e)}else e.__e=n.__e,e.__k=n.__k,tt.then||vr(e);lt.__e(tt,e,n)}else s==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):a=e.__e=Jl(n.__e,e,n,o,r,s,i,c,l);return(d=lt.diffed)&&d(e),128&e.__u?void 0:a}function vr(t){t&&t.__c&&(t.__c.__e=true),t&&t.__k&&t.__k.forEach(vr)}function Ma(t,e,n){for(var o=0;o<n.length;o++)Hr(n[o],n[++o],n[++o]);lt.__c&<.__c(e,t),t.some(function(r){try{t=r.__h,r.__h=[],t.some(function(s){s.call(r)})}catch(s){lt.__e(s,r.__v)}})}function Ta(t){return typeof t!="object"||t==null||t.__b&&t.__b>0?t:Pn(t)?t.map(Ta):se({},t)}function Jl(t,e,n,o,r,s,i,a,c){var l,d,u,h,p,m,g,b=n.props,v=e.props,w=e.type;if(w=="svg"?r="http://www.w3.org/2000/svg":w=="math"?r="http://www.w3.org/1998/Math/MathML":r||(r="http://www.w3.org/1999/xhtml"),s!=null){for(l=0;l<s.length;l++)if((p=s[l])&&"setAttribute"in p==!!w&&(w?p.localName==w:p.nodeType==3)){t=p,s[l]=null;break}}if(t==null){if(w==null)return document.createTextNode(v);t=document.createElementNS(r,w,v.is&&v),a&&(lt.__m&<.__m(e,s),a=false),s=null}if(w==null)b===v||a&&t.data==v||(t.data=v);else{if(s=s&&Tn.call(t.childNodes),b=n.props||kn,!a&&s!=null)for(b={},l=0;l<t.attributes.length;l++)b[(p=t.attributes[l]).name]=p.value;for(l in b)if(p=b[l],l!="children"){if(l=="dangerouslySetInnerHTML")u=p;else if(!(l in v)){if(l=="value"&&"defaultValue"in v||l=="checked"&&"defaultChecked"in v)continue;Jn(t,l,null,p,r)}}for(l in v)p=v[l],l=="children"?h=p:l=="dangerouslySetInnerHTML"?d=p:l=="value"?m=p:l=="checked"?g=p:a&&typeof p!="function"||b[l]===p||Jn(t,l,p,b[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=""),Ca(e.type=="template"?t.content:t,Pn(h)?h:[h],e,n,o,w=="foreignObject"?"http://www.w3.org/1999/xhtml":r,s,i,s?s[0]:n.__k&&rn(n,0),a,c),s!=null)for(l=s.length;l--;)Dr(s[l]);a||(l="value",w=="progress"&&m==null?t.removeAttribute("value"):m!=null&&(m!==t[l]||w=="progress"&&!m||w=="option"&&m!=b[l])&&Jn(t,l,m,b[l],r),l="checked",g!=null&&g!=t[l]&&Jn(t,l,g,b[l],r))}return t}function Hr(t,e,n){try{if(typeof t=="function"){var o=typeof t.__u=="function";o&&t.__u(),o&&e==null||(t.__u=t(e))}else t.current=e}catch(r){lt.__e(r,n)}}function Pa(t,e,n){var o,r;if(lt.unmount&<.unmount(t),(o=t.ref)&&(o.current&&o.current!=t.__e||Hr(o,null,e)),(o=t.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(s){lt.__e(s,e)}o.base=o.__P=null}if(o=t.__k)for(r=0;r<o.length;r++)o[r]&&Pa(o[r],e,n||typeof t.type!="function");n||Dr(t.__e),t.__c=t.__=t.__e=void 0}function Ql(t,e,n){return this.constructor(t,n)}function Cn(t,e,n){var o,r,s,i;e==document&&(e=document.documentElement),lt.__&<.__(t,e),r=(o=typeof n=="function")?null:n&&n.__k||e.__k,s=[],i=[],zr(e,t=(!o&&n||e).__k=_e(kt,null,[t]),r||kn,kn,e.namespaceURI,!o&&n?[n]:r?null:e.firstChild?Tn.call(e.childNodes):null,s,!o&&n?n:r?r.__e:e.firstChild,o,i),Ma(s,t,i)}function Ia(t,e){Cn(t,e,Ia)}function tu(t,e,n){var o,r,s,i,a=se({},t.props);for(s in t.type&&t.type.defaultProps&&(i=t.type.defaultProps),e)s=="key"?o=e[s]:s=="ref"?r=e[s]:a[s]=e[s]===void 0&&i!=null?i[s]:e[s];return arguments.length>2&&(a.children=arguments.length>3?Tn.call(arguments,2):n),xn(t.type,a,o||t.key,r||t.ref,null)}function ue(t){function e(n){var o,r;return this.getChildContext||(o=new Set,(r={})[e.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){o=null},this.shouldComponentUpdate=function(s){this.props.value!=s.value&&o.forEach(function(i){i.__e=true,gr(i)})},this.sub=function(s){o.add(s);var i=s.componentWillUnmount;s.componentWillUnmount=function(){o&&o.delete(s),i&&i.call(s)}}),n.children}return e.__c="__cC"+xa++,e.__=t,e.Provider=e.__l=(e.Consumer=function(n,o){return n.children(o)}).contextType=e,e}Tn=Sa.slice,lt={__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}},ya=0,ie.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=se({},this.state),typeof t=="function"&&(t=t(se({},n),this.props)),t&&se(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),gr(this))},ie.prototype.forceUpdate=function(t){this.__v&&(this.__e=true,t&&this.__h.push(t),gr(this))},ie.prototype.render=kt,$e=[],ba=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,_a=function(t,e){return t.__v.__b-e.__v.__b},io.__r=0,wa=/(PointerCapture)$|Capture$/i,Fr=0,pr=Ks(false),mr=Ks(true),xa=0;var eu=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:--eu,__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 lt.vnode&<.vnode(l),l}var Pe,St,Zo,Zs,sn=0,La=[],Et=lt,Gs=Et.__b,Xs=Et.__r,Ys=Et.diffed,Js=Et.__c,Qs=Et.unmount,ti=Et.__;function ln(t,e){Et.__h&&Et.__h(St,t,sn||e),sn=0;var n=St.__H||(St.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function H(t){return sn=1,Wr(Na,t)}function Wr(t,e,n){var o=ln(Pe++,2);if(o.t=t,!o.__c&&(o.__=[n?n(e):Na(void 0,e),function(a){var c=o.__N?o.__N[0]:o.__[0],l=o.t(c,a);c!==l&&(o.__N=[l,o.__[1]],o.__c.setState({}))}],o.__c=St,!St.__f)){var r=function(a,c,l){if(!o.__c.__H)return true;var d=o.__c.__H.__.filter(function(h){return!!h.__c});if(d.every(function(h){return!h.__N}))return!s||s.call(this,a,c,l);var u=o.__c.props!==a;return d.forEach(function(h){if(h.__N){var p=h.__[0];h.__=h.__N,h.__N=void 0,p!==h.__[0]&&(u=true)}}),s&&s.call(this,a,c,l)||u};St.__f=true;var s=St.shouldComponentUpdate,i=St.componentWillUpdate;St.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)},St.shouldComponentUpdate=r}return o.__N||o.__}function F(t,e){var n=ln(Pe++,3);!Et.__s&&jr(n.__H,e)&&(n.__=t,n.u=e,St.__H.__h.push(n))}function Dt(t,e){var n=ln(Pe++,4);!Et.__s&&jr(n.__H,e)&&(n.__=t,n.u=e,St.__h.push(n))}function N(t){return sn=5,yt(function(){return{current:t}},[])}function Aa(t,e,n){sn=6,Dt(function(){if(typeof t=="function"){var o=t(e());return function(){t(null),o&&typeof o=="function"&&o()}}if(t)return t.current=e(),function(){return t.current=null}},n==null?n:n.concat(t))}function yt(t,e){var n=ln(Pe++,7);return jr(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function dt(t,e){return sn=8,yt(function(){return t},e)}function zt(t){var e=St.context[t.__c],n=ln(Pe++,9);return n.c=t,e?(n.__==null&&(n.__=true,e.sub(St)),e.props.value):t.__}function Oa(t,e){Et.useDebugValue&&Et.useDebugValue(e?e(t):t)}function Ur(){var t=ln(Pe++,11);if(!t.__){for(var e=St.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function nu(){for(var t;t=La.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(oo),t.__H.__h.forEach(yr),t.__H.__h=[]}catch(e){t.__H.__h=[],Et.__e(e,t.__v)}}Et.__b=function(t){St=null,Gs&&Gs(t)},Et.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),ti&&ti(t,e)},Et.__r=function(t){Xs&&Xs(t),Pe=0;var e=(St=t.__c).__H;e&&(Zo===St?(e.__h=[],St.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.forEach(oo),e.__h.forEach(yr),e.__h=[],Pe=0)),Zo=St},Et.diffed=function(t){Ys&&Ys(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(La.push(e)!==1&&Zs===Et.requestAnimationFrame||((Zs=Et.requestAnimationFrame)||ou)(nu)),e.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Zo=St=null},Et.__c=function(t,e){e.some(function(n){try{n.__h.forEach(oo),n.__h=n.__h.filter(function(o){return!o.__||yr(o)})}catch(o){e.some(function(r){r.__h&&(r.__h=[])}),e=[],Et.__e(o,n.__v)}}),Js&&Js(t,e)},Et.unmount=function(t){Qs&&Qs(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(o){try{oo(o)}catch(r){e=r}}),n.__H=void 0,e&&Et.__e(e,n.__v))};var ei=typeof requestAnimationFrame=="function";function ou(t){var e,n=function(){clearTimeout(o),ei&&cancelAnimationFrame(e),setTimeout(t)},o=setTimeout(n,35);ei&&(e=requestAnimationFrame(n))}function oo(t){var e=St,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),St=e}function yr(t){var e=St;t.__c=t.__(),St=e}function jr(t,e){return!t||t.length!==e.length||e.some(function(n,o){return n!==t[o]})}function Na(t,e){return typeof e=="function"?e(t):e}function Ra(t,e){for(var n in e)t[n]=e[n];return t}function br(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return true;for(var o in e)if(o!=="__source"&&t[o]!==e[o])return true;return false}function ne(t,e){var n=e(),o=H({t:{__:n,u:e}}),r=o[0].t,s=o[1];return Dt(function(){r.__=n,r.u=e,Go(r)&&s({t:r})},[t,n,e]),F(function(){return Go(r)&&s({t:r}),t(function(){Go(r)&&s({t:r})})},[t]),n}function Go(t){var e,n,o=t.u,r=t.__;try{var s=o();return!((e=r)===(n=s)&&(e!==0||1/e==1/n)||e!=e&&n!=n)}catch{return true}}function Ba(t){t()}function $a(t){return t}function Fa(){return[false,Ba]}var Da=Dt;function _r(t,e){this.props=t,this.context=e}function ru(t,e){function n(r){var s=this.props.ref,i=s==r.ref;return!i&&s&&(s.call?s(null):s.current=null),e?!e(this.props,r)||!i:br(this.props,r)}function o(r){return this.shouldComponentUpdate=n,_e(t,r)}return o.displayName="Memo("+(t.displayName||t.name)+")",o.prototype.isReactComponent=true,o.__f=true,o.type=t,o}(_r.prototype=new ie).isPureReactComponent=true,_r.prototype.shouldComponentUpdate=function(t,e){return br(this.props,t)||br(this.state,e)};var ni=lt.__b;lt.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),ni&&ni(t)};var su=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function re(t){function e(n){var o=Ra({},n);return delete o.ref,t(o,n.ref||null)}return e.$$typeof=su,e.render=t,e.prototype.isReactComponent=e.__f=true,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var oi=function(t,e){return t==null?null:be(be(t).map(e))},iu={map:oi,forEach:oi,count:function(t){return t?be(t).length:0},only:function(t){var e=be(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:be},au=lt.__e;lt.__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)}au(t,e,n,o)};var ri=lt.unmount;function za(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=Ra({},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 za(o,e,n)})),t}function Ha(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(o){return Ha(o,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=true,t.__c.__P=n)),t}function wt(){this.__u=0,this.o=null,this.__b=null}function Wa(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function gt(t){var e,n,o;function r(s){if(e||(e=t()).then(function(i){n=i.default||i},function(i){o=i}),o)throw o;if(!n)throw e;return _e(n,s)}return r.displayName="Lazy",r.__f=true,r}function _n(){this.i=null,this.l=null}lt.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),ri&&ri(t)},(wt.prototype=new ie).__c=function(t,e){var n=e.__c,o=this;o.o==null&&(o.o=[]),o.o.push(n);var r=Wa(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]=Ha(c,c.__c.__P,c.__c.__O)}var l;for(o.setState({__a:o.__b=null});l=o.o.pop();)l.forceUpdate()}};o.__u++||32&e.__u||o.setState({__a:o.__b=o.__v.__k[0]}),t.then(i,i)},wt.prototype.componentWillUnmount=function(){this.o=[]},wt.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=za(this.__b,n,o.__O=o.__P)}this.__b=null}var r=e.__a&&_e(kt,null,t.fallback);return r&&(r.__u&=-33),[_e(kt,null,e.__a?null:t.children),r]};var si=function(t,e,n){if(++n[1]===n[0]&&t.l.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.l.size))for(n=t.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.i=n=n[2]}};function cu(t){return this.getChildContext=function(){return t.context},t.children}function lu(t){var e=this,n=t.h;if(e.componentWillUnmount=function(){Cn(null,e.v),e.v=null,e.h=null},e.h&&e.h!==n&&e.componentWillUnmount(),!e.v){for(var o=e.__v;o!==null&&!o.__m&&o.__!==null;)o=o.__;e.h=n,e.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:o.__m},contains:function(){return true},insertBefore:function(r,s){this.childNodes.push(r),e.h.insertBefore(r,s)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),e.h.removeChild(r)}}}Cn(_e(cu,{context:e.context},t.__v),e.v)}function uu(t,e){var n=_e(lu,{__v:t,h:e});return n.containerInfo=e,n}(_n.prototype=new ie).__a=function(t){var e=this,n=Wa(e.__v),o=e.l.get(t);return o[0]++,function(r){var s=function(){e.props.revealOrder?(o.push(r),si(e,t,o)):r()};n?n(s):s()}},_n.prototype.render=function(t){this.i=null,this.l=new Map;var e=be(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var n=e.length;n--;)this.l.set(e[n],this.i=[1,0,this.i]);return t.children},_n.prototype.componentDidUpdate=_n.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){si(t,n,e)})};var Ua=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,du=/^(?: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]/,fu=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,hu=/[A-Z0-9]/g,pu=typeof document<"u",mu=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function gu(t,e,n){return e.__k==null&&(e.textContent=""),Cn(t,e),typeof n=="function"&&n(),t?t.__c:null}function vu(t,e,n){return Ia(t,e),typeof n=="function"&&n(),t?t.__c:null}ie.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(ie.prototype,t,{configurable:true,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:true,writable:true,value:e})}})});var ii=lt.event;function yu(){}function bu(){return this.cancelBubble}function _u(){return this.defaultPrevented}lt.event=function(t){return ii&&(t=ii(t)),t.persist=yu,t.isPropagationStopped=bu,t.isDefaultPrevented=_u,t.nativeEvent=t};var Vr,wu={enumerable:false,configurable:true,get:function(){return this.class}},ai=lt.vnode;lt.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||pu&&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"||mu(n.type)?c==="onfocus"?i="onfocusin":c==="onblur"?i="onfocusout":fu.test(i)&&(i=c):c=i="oninput":s&&du.test(i)?i=i.replace(hu,"-$&").toLowerCase():a===null&&(a=void 0),c==="oninput"&&r[i=c]&&(i="oninputCapture"),r[i]=a}}o=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=be(n.children).forEach(function(l){l.props.selected=r.value.indexOf(l.props.value)!=-1})),o=="select"&&r.defaultValue!=null&&(r.value=be(n.children).forEach(function(l){l.props.selected=r.multiple?r.defaultValue.indexOf(l.props.value)!=-1:r.defaultValue==l.props.value})),n.class&&!n.className?(r.class=n.class,Object.defineProperty(r,"className",wu)):(n.className&&!n.class||n.class&&n.className)&&(r.class=r.className=n.className),e.props=r}(t),t.$$typeof=Ua,ai&&ai(t)};var ci=lt.__r;lt.__r=function(t){ci&&ci(t),Vr=t.__c};var li=lt.diffed;lt.diffed=function(t){li&&li(t);var e=t.props,n=t.__e;n!=null&&t.type==="textarea"&&"value"in e&&e.value!==n.value&&(n.value=e.value==null?"":e.value),Vr=null};var xu={ReactCurrentDispatcher:{current:{readContext:function(t){return Vr.__n[t.__c].props.value},useCallback:dt,useContext:zt,useDebugValue:Oa,useDeferredValue:$a,useEffect:F,useId:Ur,useImperativeHandle:Aa,useInsertionEffect:Da,useLayoutEffect:Dt,useMemo:yt,useReducer:Wr,useRef:N,useState:H,useSyncExternalStore:ne,useTransition:Fa}}};function Su(t){return _e.bind(null,t)}function yo(t){return!!t&&t.$$typeof===Ua}function ku(t){return yo(t)&&t.type===kt}function Cu(t){return!!t&&!!t.displayName&&(typeof t.displayName=="string"||t.displayName instanceof String)&&t.displayName.startsWith("Memo(")}function Eu(t){return yo(t)?tu.apply(null,arguments):t}function Mu(t){return!!t.__k&&(Cn(null,t),true)}function Tu(t){return t&&(t.base||t.nodeType===1&&t)||null}var Pu=function(t,e){return t(e)},Iu=function(t,e){return t(e)},Lu=kt,Au=yo,ae={useState:H,useId:Ur,useReducer:Wr,useEffect:F,useLayoutEffect:Dt,useInsertionEffect:Da,useTransition:Fa,useDeferredValue:$a,useSyncExternalStore:ne,startTransition:Ba,useRef:N,useImperativeHandle:Aa,useMemo:yt,useCallback:dt,useContext:zt,useDebugValue:Oa,version:"18.3.1",Children:iu,render:gu,hydrate:vu,unmountComponentAtNode:Mu,createPortal:uu,createElement:_e,createContext:ue,createFactory:Su,cloneElement:Eu,createRef:Gl,Fragment:kt,isValidElement:yo,isElement:Au,isFragment:ku,isMemo:Cu,findDOMNode:Tu,Component:ie,PureComponent:_r,memo:ru,forwardRef:re,flushSync:Iu,unstable_batchedUpdates:Pu,StrictMode:Lu,Suspense:wt,SuspenseList:_n,lazy:gt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:xu};function qr(t){const e=ne(Nu,Ru);return!!t||e}const Kr=t=>t?{"data-high-contrast":""}:{},Ou="(prefers-contrast: more)",ja=()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia(Ou):null;function Nu(t){var n;const e=ja();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 Ru=()=>{var t;return!!((t=ja())!=null&&t.matches)},In=ue(void 0),Mt=(...t)=>t.filter(Boolean).join(" "),bo=ue(null);function Ie(){return zt(bo)}function de(t="This part"){const e=zt(bo);if(!e)throw new Error(`${t} must be rendered inside <Clover.Root>.`);return e}function at(t,e=Object.is,n){const{clover:o}=de(n),r=N(null),s=()=>{const i=t(o.store.get());return r.current&&e(r.current.value,i)?r.current.value:(r.current={value:i},i)};return ne(o.store.subscribe,s)}const Bu={subscribe:()=>()=>{}};function Ln(t,e){const n=zt(bo),o=n==null?void 0:n.clover.store,r=()=>o?t(o.get()):e;return ne(o?o.subscribe:Bu.subscribe,r)}const $u=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"}'),Va={es:()=>import("../es-B1NvdYp-.mjs"),fi:()=>import("../fi-BjtYZNLo.mjs"),fr:()=>import("../fr-Cd22Lziw.mjs"),nb:()=>import("../nb-CEwZDBiR.mjs"),nn:()=>import("../nn-jYQhr9RI.mjs"),no:()=>import("../no-CEwZDBiR.mjs"),pt:()=>import("../pt-CWR30SzS.mjs")};function qa(){const t=[];return typeof document<"u"&&t.push(document.documentElement.lang),typeof navigator<"u"&&t.push(...navigator.languages??[],navigator.language),t.filter(Boolean)}const ao=t=>t.split("-")[0];function Ka(t,e){return ao(t).toLowerCase()===ao(e).toLowerCase()}const Xo=t=>t.includes("-")?ao(t):null;function Fu(t,e,n=[]){if(!e.length)return;if(e.length===1)return e[0];const o=()=>e.includes("none")?"none":e.includes("@none")?"@none":e[0];if(!t)return e.includes("none")?"none":e[0];if(e.includes(t))return t;const r=Xo(t);if(r&&e.includes(r))return r;const s=n.find(a=>e.includes(a));if(s)return s;const i=e.findIndex(a=>Xo(a)===t);if(i!==-1)return e[i];for(const a of n){const c=Xo(a);if(c&&e.includes(c))return c}return o()}function Zr(t,e){const[n,...o]=e?[e]:qa();return Fu(n,t,o)??t[0]}const ge="clover",ee={en:{[ge]:{...$u}}};let en,Za=[],co=0;const wr=new Set;function Gr(){co++,wr.forEach(t=>t())}function Du(t){const e=ao(t);return e&&e!==t?[t,e]:[t]}const ui=new Map,zu=t=>Object.prototype.hasOwnProperty.call(Va,t);function Hu(t){let e=ui.get(t);return e||(e=Va[t]().then(({default:n})=>{var o;ee[t]={...ee[t],[ge]:{...n,...(o=ee[t])==null?void 0:o[ge]}},Gr()},()=>{}),ui.set(t,e)),e}function Ga(t){const e=t.find(n=>n==="en"||zu(n));return e&&e!=="en"?Hu(e):Promise.resolve()}let Qn=[],di="";function wn(){const t=en?`${co}`:`${co} ${typeof document<"u"?document.documentElement.lang:""} ${typeof navigator<"u"?navigator.languages:""}`;if(t===di)return Qn;di=t;const e=en?[en]:qa();return Qn=[...new Set([...e,...Za].flatMap(Du).concat("en"))],Ga(Qn),Qn}function _o(t,e){if(t)return Ka(t,e||te.resolvedLanguage)?void 0:t}const te={get language(){return en??wn().find(t=>ee[t])??"en"},get resolvedLanguage(){return wn().find(t=>{var e;return Object.keys(((e=ee[t])==null?void 0:e[ge])??{}).length>0})??"en"},changeLanguage(t){en=t,Gr()},resolve(t,e,n=ge){var r,s;let o={text:t};for(const i of wn()){const a=(s=(r=ee[i])==null?void 0:r[n])==null?void 0:s[t];if(a!==void 0){o={text:a,lang:i};break}}return e?{...o,text:o.text.replace(/\{\{(\w+)\}\}/g,(i,a)=>a in e?String(e[a]):i)}:o},t(t,e,n=ge){return te.resolve(t,e,n).text},langOf(t,e,n=ge){return _o(te.resolve(t,void 0,n).lang,e)},ready(){return Ga(wn())},subscribe(t){return wr.add(t),()=>{wr.delete(t)}},getSnapshot(){return co}};typeof document<"u"&&wn();function Wu(t={}){for(const[e,n]of Object.entries(t.resources??{}))for(const[o,r]of Object.entries(n??{}))ee[e]??(ee[e]={}),ee[e][o]={...ee[e][o],...r};return t.fallbackLng!==void 0&&(Za=t.fallbackLng===false?[]:[t.fallbackLng].flat()),t.lng&&(en=t.lng),Gr(),te}const Uu=Object.freeze(Object.defineProperty({__proto__:null,CLOVER_I18N_NAMESPACE:ge,cloverI18n:te,initCloverI18n:Wu,langWithin:_o},Symbol.toStringTag,{value:"Module"}));function Tt(t=ge,e){const n=ne(te.subscribe,te.getSnapshot,te.getSnapshot),o=zt(In),r=e??o,s=dt((a,c)=>te.t(a,c,t),[t,n]),i=dt(a=>te.langOf(a,r,t),[t,n,r]);return{t:s,langOf:i,hostLanguage:r,i18n:te}}function wo(t,e){const n=zt(In),o=N(null),[r,s]=H(""),i=dt(d=>{o.current=d,typeof t=="function"?t(d):t&&(t.current=d)},[t]);F(()=>{var u,h;const d=(u=o.current)==null?void 0:u.parentElement;e!==void 0||n!==void 0||!d||s(((h=d.closest("[lang]"))==null?void 0:h.getAttribute("lang"))??"")});const c=e??n??r,{langOf:l}=Tt(void 0,c);return{ref:i,hostLanguage:c,langOf:l}}const W=t=>Array.isArray(t)?t:t==null?[]:[t],ju=["left-to-right","right-to-left","top-to-bottom","bottom-to-top"];function Xr(t){return ju.includes(t)?t:"left-to-right"}const Vu=["individuals","paged","continuous","unordered"];function qu(t){return W(t).find(n=>Vu.includes(n))??"individuals"}function Ku(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 Zu(t,e){const n=t.findIndex(o=>o.includes(e));return n===-1?0:n}const Xa=["Independents","Composite","List"];function xo(t){return W(t==null?void 0:t.body).flatMap(e=>Xa.includes(e==null?void 0:e.type)?W(e.items):[e])}function Yr(t){const e=W(t==null?void 0:t.motivation);return!e.length||e.includes("painting")}function Ya(t,e){const n=/(?:^|[#&])t=([^&]+)/.exec(e),o=n&&{t:n[1]},r=/(?:^|[#&])xywh=(?:pixel:)?([^&]+)/.exec(e);if(r){const[s,i,a,c]=r[1].split(",").map(Number);if([s,i,a,c].every(Number.isFinite))return{id:t,rect:{x:s,y:i,w:a,h:c},...o}}return o&&{id:t,...o}}function to(t){const e=t.indexOf("#");if(e>=0){const o=t.slice(0,e);return Ya(o,t.slice(e))??{id:o}}const n=t.indexOf("&t=");return n>=0?{id:t.slice(0,n),t:t.slice(n+3)}:{id:t}}const xr=t=>{var e;return Array.isArray(t)?xr(t[0]):Xa.includes(t==null?void 0:t.type)?xr((e=t.items)==null?void 0:e[0]):t};function un(t){return Gu(xr(t))}function Gu(t){var n;if(typeof t=="string")return to(t);if(!t||typeof t!="object")return{id:""};if(t.type!=="SpecificResource"||t.source===void 0)return to(t.id??"");const e=typeof t.source=="string"?to(t.source):to(((n=t.source)==null?void 0:n.id)??"");for(const o of 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=Ya(e.id,String(r.value));if(s)return s}}return e}const An=t=>t==="Audio"||t==="Sound",Xu=t=>{const e=W(t);return e.length>0&&e.every(n=>n==="supplementing")},Yu=(t,e)=>Xu(t)&&!!(e.rect||e.svg||e.point)&&!e.t,fi=new WeakMap,Ju={canvases:[],views:[],direction:"left-to-right"};function Nt(t){if(!t)return Ju;let e=fi.get(t);if(!e){const n=(t.items??[]).filter(o=>(o==null?void 0:o.type)==="Canvas"||(o==null?void 0:o.type)==="Timeline"||(o==null?void 0:o.type)==="Scene");e={canvases:n,views:Ku(n,qu(t.behavior)),direction:Xr(t.viewingDirection)},fi.set(t,e)}return e}const hi=new WeakMap;function We(t,e){if(!e)return null;const n=Nt(t);let o=hi.get(n);if(!o){o=new Map;for(const r of n.canvases)o.has(r.id)||o.set(r.id,r);hi.set(n,o)}return o.get(e)??null}function On(t,e){const{canvases:n,views:o}=Nt(t),r=n.findIndex(s=>s.id===e);return r===-1?0:Zu(o,r)}const pi=new WeakMap,Qu=[];function De(t,e){if(!t)return Qu;const n=On(t,e);let o=pi.get(t);o||pi.set(t,o=new Map);let r=o.get(n);if(!r){const s=Nt(t);r=(s.views[n]??[]).map(i=>s.canvases[i]),o.set(n,r)}return r}function td(t,e){var s,i;const{canvases:n,views:o}=Nt(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 ed(t){const e=t==null?void 0:t.start;if(!e)return null;const n=un(e);if(!n.id)return null;const o={canvasId:n.id};n.rect&&(o.region=n.rect);const r=n.t?Number(n.t.split(",")[0]):NaN;return Number.isFinite(r)&&(o.time=r),o}const Ne=(t,e)=>{const n=t==null?void 0:t.behavior;return Array.isArray(n)?n.includes(e):n===e},nd=t=>[(t==null?void 0:t.partOf)??[]].flat().find(e=>(e==null?void 0:e.id)&&e.type==="Collection");function od(t,e,n,o){const r=t==null?void 0:t.items;if(!(r!=null&&r.length)||!n)return-1;const s=De(n,o),i=a=>{const c=r[a];return((c==null?void 0:c.manifestId)===n.id||(c==null?void 0:c.manifestAs)===n.id)&&(!c.canvasId||s.some(l=>l.id===c.canvasId))};return e!==null&&i(e)?e:r.findIndex((a,c)=>i(c))}function _t(t,e,n=", "){if(!t)return{text:""};if(typeof t=="string")return{text:t};const o=Object.keys(t).filter(a=>{var c;return(c=t[a])==null?void 0:c.length});if(!o.length)return{text:""};const r=Zr(o,e),s=t[r];return{text:Array.isArray(s)?s.join(n):String(s),lang:r==="none"||r==="@none"?void 0:r}}const rd=/^[A-Za-z]{2,8}(-[A-Za-z0-9]{1,8})*$/;function En(t){const e=t==null?void 0:t.language,n=(Array.isArray(e)?e:[e]).filter(o=>typeof o=="string"&&rd.test(o));return n.length===1?n[0]:void 0}const ze={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",whiteSpace:"nowrap",border:0},sd=/^(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)$/,id=/^(adlm|arab|hebr|nkoo|rohg|syrc|thaa)$/;function ad(t){if(!t)return;const[e,...n]=t.toLowerCase().split(/[-_]/),o=n.find(r=>/^[a-z]{4}$/.test(r));return(o?id.test(o):sd.test(e))?"rtl":void 0}function ut(t){return t?{lang:t,dir:ad(t)}:{}}function cd({clover:t,language:e}){const{t:n,langOf:o}=Tt(),[r,s]=H(null),i=N(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 h=We(c,l),p=_t(h==null?void 0:h.label,e),m=i.current("canvasPosition",{index:On(c,l)+1,total:Nt(c).views.length});s({label:p.text,lang:p.lang,position:m})})},[t,e]),f("div",{className:"clover-announcer",role:"status","aria-live":"polite","aria-atomic":"true",style:ze,children:[r!=null&&r.label?f(kt,{children:[f("span",{...ut(r.lang),children:r.label}),","," "]}):null,r&&f("span",{...ut(o("canvasPosition")),children:r.position})]})}const ld=t=>(t==null?void 0:t.format)==="text/vtt"||typeof(t==null?void 0:t.id)=="string"&&/\.vtt(\?|$)/i.test(t.id);function ud(t){const e=[];let n=0;const o=(r,s)=>{var a;if(!r||ld(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 xo(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 Jr="content-search",mi=/\/search\/([0-2])\//;function Ja(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:mi.test(s)?Number(mi.exec(s)[1])>=2?2:1:null;if(i===2)return{id:o,version:i};i===1&&(e??(e={id:o,version:i}))}return e}const dd="contents",Vv=(t,e)=>`${t}#region-${e+1}`,fd=t=>W(t==null?void 0:t.motivation).includes("linking");function Qa(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=ud(r);if(!i.length&&!fd(r))continue;const a=un(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 hd=t=>Nt(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 pd(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 tc=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"])))),gi=new WeakMap;function ec(t){var n;if(!t)return[];let e=gi.get(t);if(!e){const o=new Map;for(const r of Nt(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=tc(s)[0])==null?void 0:n.id;a={id:i,label:pd(s),source:"manifest",entries:[],...c?{collection:c}:{}},o.set(i,a)}a.entries.push(...Qa(s,i,r.id))}e=[...o.values()].filter(r=>r.entries.length),gi.set(t,e)}return e}const vi=new WeakMap,nc=[];function qv(t){if(!t)return nc;let e=vi.get(t);return e||(e=Nt(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)}))),vi.set(t,e)),e}const Yo=new WeakMap,Jo=new WeakMap;function oc(t,e=md){var n;if(!Jo.has(e)){const o=e.filter(s=>s.content),r=(n=o[0])==null?void 0:n.content;Jo.set(e,r?{id:r.id,type:r.type,...r.label?{label:r.label}:{},pages:nc,entries:o.flatMap(s=>s.entries)}:null)}return Jo.get(e)??gd(t)}const md=[];function gd(t){var r;if(!t)return null;if(Yo.has(t))return Yo.get(t);const e=Nt(t).canvases.flatMap(s=>W(s.annotations).flatMap(i=>tc(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=ec(t);return{id:n,type:"AnnotationCollection",...i?{label:i}:{},...a>0?{total:a}:{},pages:s.map(({page:u,canvas:h})=>({id:String(u.id),canvasId:String(h.id),fetched:Array.isArray(u.items)})),entries:s.flatMap(({page:u})=>{var h;return((h=c.find(p=>p.id===u.id))==null?void 0:h.entries)??[]})}})():null;return Yo.set(t,o),o}const yi=new WeakMap,bi=[];function Qr(t,e){const n=ec(t);if(!e.length)return n.length?n:bi;const o=t??bi;let r=yi.get(o);r||yi.set(o,r=new Map);let s=r.get(e);if(!s){const i=new Set(n.map(a=>a.id));s=[...n,...e.filter(a=>!i.has(a.id)&&!!i.add(a.id))],r.set(e,s)}return s}const _i=new WeakMap;function rc(t,e,n,o=null){const r=Qr(t,e),s=n!=null&&n.entries.length?n:null;if(!o&&!s)return r;let i=_i.get(r);i||_i.set(r,i=new Map);let a=i.get(o);a||i.set(o,a=new Map);let c=a.get(s);return c||(c=[...r,...o?[o]:[],...s?[s]:[]],a.set(s,c)),c}const vd=t=>Number(t==null?void 0:t.duration)>0;function sc(t,e){return t.source==="search"||!t.entries.length?false:t.entries.every(n=>Yu(n.motivation,n.target)&&!vd(e(n.canvasId)))}const wi=new WeakMap;function yd(t,e){const n=Qr(t,e);let o=wi.get(n);if(!o){const r=n.filter(s=>!sc(s,i=>We(t,i)??void 0));o=r.length===n.length?n:r,wi.set(n,o)}return o}const xi=new WeakMap;function ts(t,e,n,o){const r=Qr(t,e),s=xi.get(r);if(s&&s.hidden===n&&s.shown===o)return s.ids;const i=r.filter(c=>!n.includes(c.id)&&!o.includes(c.id)&&sc(c,l=>We(t,l)??void 0)).map(c=>c.id),a=i.length?[...n,...i]:n;return xi.set(r,{hidden:n,shown:o,ids:a}),a}const Si=new WeakMap;function bd(t,e,n,o){const r=ts(t,e,n,o),s=Si.get(r);if(s&&s.hidden===n)return s.ids;const i=[Jr,dd,...r.filter(a=>!n.includes(a))];return Si.set(r,{hidden:n,ids:i}),i}function _d(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 Qo(t,e){if(!e)return null;for(const n of t){const o=n.entries.find(r=>r.id===e);if(o)return o}return null}function ic(t){return btoa(encodeURIComponent(JSON.stringify(t))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function ac({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:ic(a)}}const wd=Object.freeze(Object.defineProperty({__proto__:null,buildContentState:ac,encodeContentState:ic},Symbol.toStringTag,{value:"Module"})),xd=/iiif\.io\/api\/presentation\/4\/context\.json/;function cc(t){const e=t==null?void 0:t["@context"];return(Array.isArray(e)?e:[e]).some(o=>typeof o=="string"&&xd.test(o))}let ki=null,Ci=null;function es(){return Ci??(Ci=import("../upgrade-eNW0DPXq.mjs")),ki??(ki=import("../upgrader-BlbMUEH6.mjs").then(({upgradePresentation3To4:t})=>t)),Promise.all([ki,Ci])}async function He(t){if(cc(t))return t;const[e,{upgrade:n}]=await es();return await n(t,e)}function ns(t,e,n={}){return((t==null?void 0:t.fetch)??globalThis.fetch)(e,{credentials:(t==null?void 0:t.credentials)??"same-origin",...n,headers:{...n.headers,...t==null?void 0:t.headers}})}const Sd=t=>(t==null?void 0:t.credentials)==="include",kd=t=>JSON.stringify([t==null?void 0:t.credentials,t==null?void 0:t.headers]);class Cd extends Error{constructor(e,n,o){super(e),this.url=n,this.status=o,this.name="CloverRequestError"}}async function an(t,e,n){const o=await ns(t,e,{signal:n,headers:{Accept:"application/ld+json, application/json"}});if(!o.ok)throw new Cd(`${e} answered ${o.status}`,e,o.status);return o.json()}const Ei=()=>import("./content-state-reader-DIcY4zWj.mjs");function Mi(t){const e=t;return!e||typeof e!="object"?false:e.type==="Annotation"?W(e.motivation).includes("contentState"):e.type==="SpecificResource"}const Ed=["summary","metadata","requiredStatement","rights","provider","homepage","seeAlso","rendering","thumbnail","navDate","partOf"];function Md(t){const e={"@context":Pd,id:t.id,type:"Manifest",label:t.label??{none:[""]},items:[t]};for(const n of Ed)t[n]!==void 0&&n!=="label"&&(e[n]=t[n]);return e}const Ti=t=>{var e,n;return!!t&&((n=(e=t.items)==null?void 0:e[0])==null?void 0:n.id)===t.id},Td=/^(oa:)?Annotation(Page|Collection)$/;class eo extends Error{constructor(){super(...arguments);P(this,"name","CloverContentError")}}const Pd="http://iiif.io/api/presentation/4/context.json",Id=t=>/^https?:\/\//i.test(t);async function Sr(t,{request:e,signal:n}){return Array.isArray(t.items)&&t.items.length>0||!t.id?t:await an(e,t.id,n)}const Ld=50;async function os(t,e){const n=t;if(Array.isArray(n.items)&&n.items.length||!n.first)return t;const o=[],r=new Set;let s=n.first;for(let i=0;s&&i<Ld;i++){const a=typeof s=="string"?{id:s}:s;if(r.has(a.id??a))break;r.add(a.id??a);const c=a.items?a:await an(e.request,a.id,e.signal),l=await He({"@context":c["@context"]??n["@context"],...c,type:"Collection"});o.push(...l.items??[]),s=c.next}return{...n,items:o}}async function lc(t,e={}){return He(await Sr(t,e))}async function uc(t,e,n=0){for(const o of t.items??[]){if(o.type==="Manifest")return He(await Sr(o,e));if(o.type==="Collection"&&n<8){const r=await os(await He(await Sr(o,e)),e),s=await uc(r,e,n+1);if(s)return s}}return null}async function Ad(t,{request:e,signal:n}={}){es();const o=typeof t=="string"?await an(e,t.trim(),n):t,r=await He(o);return r.type==="Collection"?os(r,{request:e,signal:n}):r}async function Od(t,e={}){var u;const{request:n,signal:o}=e;es();let r,s,i,a,c;const l=async h=>{const{resolveContentState:p}=await Ei(),m=p(h);if(!m)throw new eo("Unreadable content state");return r=m.target??r,s=m.manifestId??s,i=m.annotation??i,a=m.targets??a,an(n,m.id,o)};if(typeof t=="string")if(Id(t.trim()))c=await an(n,t.trim(),o);else{const{decodeContentState:h}=await Ei(),p=h(t);if(!p)throw new eo("Unreadable iiifContent");c=Mi(p)?await l(p):p}else c=t;if(Mi(c)&&(c=await l(c)),Td.test(String((c==null?void 0:c.type)??""))){const{annotationsContent:h}=await import("./annotations-content-Dg8h7vJX.mjs");return h(c,e)}const d=await He(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 h=await os(d,e),p=e.manifestId??s,m=p?(h.items??[]).find(b=>b.id===p&&b.type==="Manifest"):void 0,g=m?await lc(m,e):await uc(h,e);if(!g)throw new eo("The Collection holds no Manifest");return{manifest:g,collection:h,target:r,annotation:i,targets:a}}case"Canvas":case"Timeline":case"Scene":{const h=d;return r??(r={canvasId:h.id}),{manifest:Md(h),target:r,annotation:i}}default:throw new eo(`Cannot show a ${String(d.type??"resource without a type")}`)}}const dc=t=>!!(t!=null&&t.id)&&t.type==="AnnotationPage"&&!t.items;function Pi(t){const e=[];for(const n of t)for(const o of["items","annotations"])for(const r of n[o]??[])dc(r)&&e.push([n.id,o,r.id]);return e}async function Nd(t,e,n,o){return Rd(await an(n,t,o),e)}async function Rd(t,e="urn:clover:annotation-page"){var r;const n=t;return cc(n)?n:((r=(await He({"@context":n["@context"]??"http://iiif.io/api/presentation/3/context.json",id:e,type:"Canvas",items:[{...n,"@context":void 0}]})).items)==null?void 0:r[0])??n}function Bd(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 $d(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||!dc(c)?c:(r=true,Bd(o,c)));return r?{...i,[n]:a}:i});return r?{...t,items:s}:t}function Fd(t){let e=t;const n=new Set;return{get:()=>e,set(o){const r=typeof o=="function"?o(e):o;Object.keys(r).some(i=>!Object.is(r[i],e[i]))&&(e={...e,...r},n.forEach(i=>i()))},subscribe(o){return n.add(o),()=>n.delete(o)}}}function Ye(t){let e=t;const n=new Set;return{get:()=>e,emit(o){e=o,n.forEach(r=>r(o))},subscribe(o){return n.add(o),()=>n.delete(o)}}}function Dd(t,e,n){return{position:e,total:n,hasPrevious:e>0,hasNext:e+1<n,previous:()=>t.previous(),next:()=>t.next(),first:()=>t.first(),last:()=>t.last(),goTo:o=>t.goTo(o)}}const kr={query:"",status:"idle",hits:[],set:null},Ii={status:"idle",error:null,manifest:null,collection:null,throughCollection:false,canvasId:null,target:null,annotationId:null,hiddenSets:[],shownSets:[],addedSets:[],search:kr,regions:null,targets:null,targetIndex:null};function zd(t={}){const e=Fd(Ii),n=Ye(null),o=Ye(null),r=Ye(null),s=Ye(null),i=Ye(null),a=Ye(null);let c=null,l=null,d=[],u=[],h=[],p=0,m=null,g=null,b=null;const v=(y,k)=>{!g||y===k||(g={...g,items:g.items.map(T=>T.manifestId===y&&T.manifestAs!==k?{...T,manifestAs:k}:T)})},w=y=>{var T;const k=(T=e.get().manifest)==null?void 0:T.id;return!!k&&(k===y.manifestId||k===y.manifestAs)},_=()=>d.length||u.length||h.length?[...d,...u,...h]:Ii.addedSets;let x=t.request,S=null;const M=new Set;let B="view",O=0;const Q=(y,k,T)=>{if(M.has(T))return;M.add(T);const R=S==null?void 0:S.signal;Nd(T,y,x,R).then(z=>{R!=null&&R.aborted||e.set(L=>L.manifest?{manifest:$d(L.manifest,y,k,z)}:{})}).catch(()=>M.delete(T))},nt=()=>{const{manifest:y,canvasId:k}=e.get();if(y)for(const[T,R,z]of Pi(B==="all"||O>0?Nt(y).canvases:De(y,k)))Q(T,R,z)};e.subscribe(nt);const G=(y,k,T,R,z)=>{var Vt,V,j;const{canvases:L}=Nt(y),D=ft=>!!ft&&L.some(Ct=>Ct.id===ft),X=ed(y),ht=D(T==null?void 0:T.canvasId)?T:D(X==null?void 0:X.canvasId)?X:null,J=D(R.canvasId)?R.canvasId:(ht==null?void 0:ht.canvasId)??(D(R.defaultCanvasId)?R.defaultCanvasId:null)??((Vt=L[0])==null?void 0:Vt.id)??null;l==null||l.abort();const bt=z&&((V=Qo(h,z))==null?void 0:V.canvasId)===J?z:null,mt=ht&&bt?{...ht,region:void 0}:ht,Lt=++p;d=[],e.set({status:"ready",search:kr,regions:null,manifest:y,collection:k,canvasId:J,target:mt&&mt.canvasId===J?mt:null,addedSets:_(),annotationId:bt,targets:g});const At=y==null?void 0:y.structures;Array.isArray(At)&&JSON.stringify(At).includes("xywh=")&&import("./range-regions--YB9ll1N.mjs").then(({contentsSet:ft})=>{p===Lt&&e.set({regions:ft(y)})}),hd(y)&&import("./image-layers-CpDOoRh9.mjs").then(({imageLayers:ft})=>{p===Lt&&(d=ft(y),e.set({addedSets:_()}))}),J&&J!==R.canvasId&&((j=t.onCanvasChange)==null||j.call(t,J))},tt=(y,k)=>e.set(T=>{const R=T.hiddenSets.filter(L=>L!==y),z=T.shownSets.filter(L=>L!==y);return k?{hiddenSets:R,shownSets:[...z,y]}:{hiddenSets:[...R,y],shownSets:z}}),K=(y,k)=>{var R,z,L;if(!y)return;if((R=t.isControlled)!=null&&R.call(t)){k&&e.set({target:k}),(z=t.onCanvasChange)==null||z.call(t,y);return}const T=e.get().canvasId!==y;e.set({canvasId:y,target:k}),T&&((L=t.onCanvasChange)==null||L.call(t,y))},Y=(y,k=false)=>{const{manifest:T}=e.get(),R=td(T,y);K(R,R&&k?{canvasId:R,autoplay:k}:null)},I=()=>{const{manifest:y,canvasId:k}=e.get();return{at:On(y,k),total:Nt(y).views.length}},E=()=>{S==null||S.abort();const y=new AbortController;return S=y,M.clear(),e.set({status:"loading",error:null,annotationId:null}),y.signal},A=y=>e.set({status:"error",error:y instanceof Error?y:new Error(String(y))});async function U(y,k={}){var R;const T=E();try{const z=await Od(y,{request:x,signal:T,manifestId:k.manifestId??void 0});if(T.aborted)return;const L=z.annotation,D=L?Qa({items:[L]},`${L.id}#content-state`):[];h=D.length?[{id:`${L.id}#content-state`,source:"added",entries:D}]:z.annotationSets??[];const X=m??((R=D[0])==null?void 0:R.id)??z.pick;m=null,e.set({throughCollection:!!z.collection}),g=z.targets??null,g&&v(g.items[0].manifestId,z.manifest.id),e.set({targetIndex:g?0:null}),G(z.manifest,z.collection??null,z.target,k,X)}catch(z){T.aborted||A(z)}}const rt=y=>{const{manifest:k,collection:T}=e.get();return(k==null?void 0:k.id)===y||(T==null?void 0:T.id)===y},st=y=>{var k;return(((k=e.get().collection)==null?void 0:k.items)??[]).find(T=>T.id===y)??{id:y,type:"Manifest"}},et=(y,k)=>{var T,R;if(m=k,(T=t.isManifestControlled)!=null&&T.call(t)){(R=t.onManifestChange)==null||R.call(t,y);return}it({id:y,type:"Manifest"}).then(z=>{var L;return z&&((L=t.onManifestChange)==null?void 0:L.call(t,y))})},it=async(y,k)=>{if(y.type==="Collection")return await U(y.id),e.get().status==="ready";const{collection:T}=e.get(),R=E(),z=m;m=null;const L=z?Qo(h,z):null,D=typeof k=="string"?{canvasId:k}:k??b;b=null;try{const X=await lc(y,{request:x,signal:R});return R.aborted?false:(v(y.id,X.id),G(X,T,L?{canvasId:L.canvasId}:D??void 0,{},z),true)}catch(X){return R.aborted||A(X),false}};return{store:e,viewport:n,media:o,captions:r,highlight:s,chapter:i,found:a,get request(){return x},setRequest(y){x=y},load:U,async openCollection(y){var T;const k=e.get().manifest;if(!(!k||((T=e.get().collection)==null?void 0:T.id)===y))try{const R=await Ad(y,{request:x});if(R.type!=="Collection"||e.get().manifest!==k)return;e.set({collection:R})}catch{}},async goToManifest(y,k){var R,z,L;if(rt(y))return;const T=st(y);if(T.type!=="Collection"&&((R=t.isManifestControlled)!=null&&R.call(t))){(z=t.onManifestChange)==null||z.call(t,y);return}await it(T,k)&&((L=t.onManifestChange)==null||L.call(t,e.get().manifest.id))},goToTarget(y){var R,z,L;const k=(R=e.get().targets)==null?void 0:R.items[y];if(!k)return;e.set({targetIndex:y});const T=k.canvasId?{canvasId:k.canvasId,...k.region&&{region:k.region},...k.time!==void 0&&{time:k.time}}:null;if(w(k)){T&&K(T.canvasId,T);return}if((z=t.isManifestControlled)!=null&&z.call(t)){b=T,(L=t.onManifestChange)==null||L.call(t,k.manifestId);return}it(st(k.manifestId),T??void 0).then(D=>{var X;return D&&((X=t.onManifestChange)==null?void 0:X.call(t,k.manifestId))})},async syncManifest(y){!y||rt(y)||e.get().status!=="ready"||await it(st(y))},goTo(y,k){K(y,k?{...k,canvasId:y}:null)},next({autoplay:y=false,wrap:k=false}={}){const{at:T,total:R}=I();T+1<R?Y(T+1,y):k&&R>1&&Y(0,y)},previous(){const{at:y}=I();y>0&&Y(y-1)},first(){Y(0)},last(){Y(I().total-1)},consumeTarget(){e.set({target:null})},syncCanvas(y){y&&e.set({canvasId:y})},selectAnnotation(y){const{manifest:k,addedSets:T,canvasId:R,search:z,regions:L}=e.get(),D=Qo(rc(k,T,z.set,L),y);if(e.set({annotationId:D?y:null}),!D)return;a.emit(y);const{hiddenSets:X,shownSets:ht}=e.get();D.setId!==Jr&&ts(k,T,X,ht).includes(D.setId)&&tt(D.setId,true);const J=De(k,R).some(Lt=>Lt.id===D.canvasId),bt=We(k,D.canvasId)!==null;!J&&bt&&K(D.canvasId,null);const mt=bt?void 0:_d(D.annotation);mt&&et(mt,D.id)},async search(y){l==null||l.abort();const k=Ja(e.get().manifest),T=y.trim();if(!T||!k){l=null,e.set({search:kr,annotationId:null});return}const R=new AbortController;l=R,e.set(z=>({search:{...z.search,query:T,status:"loading"}}));try{const{searchInto:z}=await import("./search-DDXsrZz3.mjs");await z(e,k,T,x,R.signal)}catch{e.set({search:{query:T,status:"error",hits:[],set:null}})}},setSetVisible(y,k){tt(y,k)},async loadAnnotations(y){if(c==null||c.abort(),!y){u=[],e.set({addedSets:_()});return}const k=new AbortController;c=k;try{const{loadAnnotationSets:T}=await import("./annotation-collection-C_9c9NPs.mjs"),R=await T(y,{request:x,signal:k.signal});if(k.signal.aborted)return;u=R,e.set({addedSets:_()})}catch{}},getContentState(){var J;const{manifest:y,canvasId:k}=e.get();if(!y||!k)return null;const T=n.get(),R=o.get(),z=R&&R.currentTime>0?R.currentTime:null,L=De(y,k),X=T&&L.some(bt=>bt.id===T.canvasId)&&!z?T:null,ht=(X==null?void 0:X.canvasId)??k;return ac({manifestId:y.id,canvasId:ht,type:(J=L.find(bt=>bt.id===ht))==null?void 0:J.type,region:X==null?void 0:X.region,time:z})},setAnnotationPages(y){y!==B&&(B=y,nt())},fetchAnnotationPages(y){const{manifest:k}=e.get();if(!k||!y.length)return;const T=new Set(y);for(const[R,z,L]of Pi(Nt(k).canvases))T.has(L)&&Q(R,z,L)},holdAllAnnotationPages(){O++,nt();let y=true;return()=>{y&&O--,y=false}},dispose(){S==null||S.abort(),c==null||c.abort(),l==null||l.abort()}}}const Hd=100;function fc(t,e){const n=N({read:t,onChange:e});n.current={read:t,onChange:e};const o=N(void 0),r=N("");return F(()=>()=>{clearTimeout(o.current),o.current=void 0},[]),dt(()=>{!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))},Hd))},[])}function Cr(t,e){return t==null||t.addEventListener("pause",e),t==null||t.addEventListener("seeked",e),()=>{t==null||t.removeEventListener("pause",e),t==null||t.removeEventListener("seeked",e)}}function hc(t,e){const n=fc(()=>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=Cr(t.media.get(),n);const c=t.media.subscribe(l=>{a(),a=Cr(l,n)});return n(),()=>{s(),i(),c(),a()}},[t,o,n])}function rs(t){const e=[];for(const n of W(t==null?void 0:t.items))for(const o of W(n==null?void 0:n.items))if(Yr(o))for(let r of xo(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 Wd(t){return t.flatMap(e=>rs(e).map(({body:n})=>n))}function Ud(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 jd(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 Vd({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:h,annotationPages:p="view",onContentStateChange:m,...g}){const b=e!==void 0,v=s!==void 0,w=N({controlled:b,manifestControlled:v,onCanvasChange:o,onStatusChange:r,onManifestChange:a});w.current={controlled:b,manifestControlled:v,onCanvasChange:o,onStatusChange:r,onManifestChange:a};const[_]=H(()=>zd({request:l,onCanvasChange:et=>{var it,y;return(y=(it=w.current).onCanvasChange)==null?void 0:y.call(it,et)},onManifestChange:et=>{var it,y;return(y=(it=w.current).onManifestChange)==null?void 0:y.call(it,et)},isControlled:()=>w.current.controlled,isManifestControlled:()=>w.current.manifestControlled}));_.setRequest(l);const x=N({});x.current={canvasId:e,defaultCanvasId:n,manifestId:s??i};const S=kd(l),M=N(t);M.current=t;const B=Zd(t);F(()=>(_.load(M.current,x.current),()=>_.dispose()),[_,B,S]),F(()=>{b&&_.syncCanvas(e??null)},[_,b,e]);const[O,Q]=H(_.store.get().status);F(()=>{let et=_.store.get().status;return _.store.subscribe(()=>{var k,T;const{status:it,error:y}=_.store.get();it!==et&&(et=it,Q(it),(T=(k=w.current).onStatusChange)==null||T.call(k,it,y))})},[_]);const nt=N(h);nt.current=h;const G=Kd(h);F(()=>{_.loadAnnotations(nt.current??null)},[_,G,S]),F(()=>{_.setAnnotationPages(p)},[_,p]),hc(_,m),F(()=>{v&&O==="ready"&&_.syncManifest(s??null)},[_,v,s,O]);const tt=qd(_,et=>{var it;return et.status==="ready"?((it=et.manifest)==null?void 0:it.id)??null:null});F(()=>{c&&tt&&_.search(c)},[_,c,tt]);const K=N(u);jd(K.current,u)||(K.current=u);const Y=K.current,[I,E]=H(),[A,U]=H(d);A!==d&&(U(d),E(void 0));const rt=I??d;return[yt(()=>({clover:_,language:rt,renderers:Y,chooseLanguage:E}),[_,rt,Y]),O,g]}function qd(t,e){return ne(t.store.subscribe,()=>e(t.store.get()))}function Kd(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 Zd(t){return typeof t=="string"?t:t.id??t["@id"]??t}const Gd=re(function({as:e="div",className:n,children:o,highContrast:r,...s},i){const[a,c,l]=Vd(s),d=wo(i,l.lang),u=qr(r);return f(bo.Provider,{value:a,children:f(In.Provider,{value:d.hostLanguage,children:f(e,{ref:d.ref,className:Mt("clover-root",n),"data-status":c,...Kr(u),...l,children:[o,f(cd,{clover:a.clover,language:a.language})]})})})}),Xd=()=>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"}),Yd=()=>f(kt,{children:[f("path",{d:"M160 144h288M160 256h288M160 368h288",fill:"none",strokeLinecap:"round",strokeWidth:"32"}),f("circle",{cx:"80",cy:"144",r:"20",stroke:"none"}),f("circle",{cx:"80",cy:"256",r:"20",stroke:"none"}),f("circle",{cx:"80",cy:"368",r:"20",stroke:"none"})]}),Jd=()=>f("path",{stroke:"none",d:"M256 72A48 48 0 1 1 256 168A48 48 0 1 1 256 72Z M192 216H296V384H328V432H184V384H216V264H192Z"}),Qd=()=>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"}),Kv=()=>f("path",{strokeLinejoin:"round",strokeWidth:"40",d:"M184 128V384L392 256Z"}),pc=()=>f("path",{strokeLinecap:"round",strokeWidth:"45",d:"M154 154L358 358M358 154L154 358"}),Zv=()=>f(kt,{children:[f("path",{stroke:"none",d:"m456.69,421.39l-94.09-94.09c22.65-30.16,34.88-66.86,34.84-104.58,0-96.34-78.38-174.72-174.72-174.72S48,126.38,48,222.72s78.38,174.72,174.72,174.72c37.72.04,74.42-12.19,104.58-34.84l94.09,94.09c10.29,9.2,26.1,8.32,35.3-1.98,8.48-9.49,8.48-23.83,0-33.32Zm-233.97-73.87c-68.89-.08-124.72-55.91-124.8-124.8h0c0-68.93,55.87-124.8,124.8-124.8s124.8,55.87,124.8,124.8-55.87,124.8-124.8,124.8Z"}),f("path",{stroke:"none",d:"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"})]}),Gv=()=>f(kt,{children:[f("path",{stroke:"none",d:"m456.69,421.39l-94.09-94.09c22.65-30.16,34.88-66.86,34.84-104.58,0-96.34-78.38-174.72-174.72-174.72S48,126.38,48,222.72s78.38,174.72,174.72,174.72c37.72.04,74.42-12.19,104.58-34.84l94.09,94.09c10.29,9.2,26.1,8.32,35.3-1.98,8.48-9.49,8.48-23.83,0-33.32Zm-233.97-73.87c-68.89-.08-124.72-55.91-124.8-124.8h0c0-68.93,55.87-124.8,124.8-124.8s124.8,55.87,124.8,124.8-55.87,124.8-124.8,124.8Z"}),f("path",{stroke:"none",d:"M167.26 197.76H278.1a24.96 24.96 0 0 1 0 49.92H167.26a24.96 24.96 0 0 1 0-49.92Z"})]}),Gt={zoomIn:{keys:"Plus",glyph:"+"},zoomOut:{keys:"-",glyph:"\u2212"},reset:{keys:"0",glyph:"0"},rotateRight:{keys:"R",glyph:"R"},rotateLeft:{keys:"Shift+R",glyph:"\u21E7R"},play:{keys:"K Space",glyph:"K"},mute:{keys:"M",glyph:"M"}},tf=new Set(["+","=","-","_","0","r","R","k","K","m","M","j","J","l","L"]);function Ue({label:t,lang:e,shortcut:n,scrolls:o=false,image:r,lead:s,after:i}){const{t:a}=Tt(),c=N(null),l=n?a("controlShortcut",{label:t,shortcut:n.glyph}):t;return nf(),F(()=>{const d=c.current;d&&Er(d)&&lo(d)},[l,s]),f("span",{ref:c,className:"clover-tip","aria-hidden":"true",...ut(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&&Er(d)&&lo(d)}}),s&&f("span",{className:"clover-tip-lead",children:s}),l,i!=null&&i!==false&&f("span",{className:"clover-tip-after",children:i})]})}function no(t){const e=t.target instanceof Element&&ss(t.target),n=e&&So(e);n&&lo(n)}function Xv(t){const e=So(ss(t));e&&Er(e)&&lo(e)}function So(t){return Array.from(t.children).find(e=>e.classList.contains("clover-tip"))}function ss(t){const e=t.matches("input")?t.parentElement:null;return e&&So(e)?e:t}function Er(t){var e;try{return!!((e=t.parentElement)!=null&&e.matches(":hover, :focus-visible, :has(> input:focus-visible)"))}catch{return false}}function lo(t){const e=t.parentElement;if(!e)return;t.style.removeProperty("--clover-tip-room"),t.style.removeProperty("--clover-tip-shift");const n=ef(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 ef(t){let e=0,n=document.documentElement.clientWidth||window.innerWidth;for(let o=t.parentElement;o&&o!==document.documentElement;o=o.parentElement){const{display:r,overflow:s,overflowX:i}=getComputedStyle(o);if(r==="inline"||r==="contents")continue;const a=i||s;if(!a||a==="visible")continue;const c=o.getBoundingClientRect();e=Math.max(e,c.left+o.clientLeft),n=Math.min(n,c.left+o.clientLeft+o.clientWidth)}return{left:e,right:n}}let Li=0;function Ai(t){if(t.key!=="Escape"||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&&ss(n);o&&So(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 nf(){F(()=>(Li++===0&&(document.addEventListener("keydown",Ai,true),document.addEventListener("pointerenter",no,true),document.addEventListener("focus",no,true)),()=>{--Li||(document.removeEventListener("keydown",Ai,true),document.removeEventListener("pointerenter",no,true),document.removeEventListener("focus",no,true))}),[])}function of(t,e){const n=t.target;!e||n===e||e.contains(n)&&!n.closest(".clover-canvas-overlays")||tf.has(t.key)&&(t.altKey||t.metaKey||t.ctrlKey||n.closest("input, select, textarea, [contenteditable]")||(t.preventDefault(),e.dispatchEvent(new KeyboardEvent("keydown",{key:t.key,shiftKey:t.shiftKey,bubbles:true,cancelable:true}))))}const Fe=({className:t,id:e,label:n,children:o,onClick:r,expanded:s,controls:i,shortcut:a,lang:c,unavailable:l,side:d})=>{const h=e.split("-")[0].replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^-/,"");return f("button",{id:e,className:Mt("clover-canvas-button",t),"data-testid":"clover-canvas-button","data-button":h,"data-side":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,...ut(c),type:"button",children:[f("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true","data-testid":"clover-canvas-button-svg",focusable:"false",width:"16",height:"16",viewBox:"0 0 512 512",children:o}),f(Ue,{label:n,shortcut:a})]})},rf=ue("");function fe(){return zt(rf)+Ur()}const tr=new Map;function sf(t,e){const n=fe(),o=N(e);o.current=e,F(()=>t?af(n,o):void 0,[t,n])}function af(t,e){for(const[n,o]of[...tr])n!==t&&o.current();return tr.set(t,e),()=>{tr.delete(t)}}const cf=gt(()=>import("./CaptionDetails-DNPq32gk.mjs"));function lf(t){var e;return!!t.summary||!!((e=t.metadata)!=null&&e.length)}const gc=(t,e)=>`${t}-label-${e}`,uf=({id:t,canvases:e,comments:n,open:o,onClose:r,language:s})=>{const{t:i,langOf:a}=Tt(),c=N(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(Fe,{className:"clover-canvas-caption-close",id:`close-${t}`,label:i("commonClose"),lang:a("commonClose"),onClick:()=>r(true),children:f(pc,{})}),e.map((u,h)=>{const p=_t(u.label,s);return f("section",{className:"clover-canvas-caption-canvas",children:[p.text&&f("p",{className:"clover-canvas-caption-label",id:gc(t,h),...ut(p.lang),children:p.text}),l&&f(wt,{fallback:null,children:f(cf,{summary:u.summary,metadata:u.metadata,comments:n==null?void 0:n.get(u.id),language:s})})]},u.id)})]})},df=()=>f("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M256 112v288M400 256H112"}),ff=()=>f("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M400 256H112"}),hf=()=>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"}),mf=()=>f("path",{d:"M448 440a16 16 0 01-12.61-6.15c-22.86-29.27-44.07-51.86-73.32-67C335 352.88 301 345.59 256 344.23V424a16 16 0 01-27 11.57l-176-168a16 16 0 010-23.14l176-168A16 16 0 01256 88v80.36c74.14 3.41 129.38 30.91 164.35 81.87C449.32 292.44 464 350.9 464 424a16 16 0 01-16 16z"}),Oi=()=>f(kt,{children:[f("path",{fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M400 148l-21.12-24.57A191.43 191.43 0 00240 64C134 64 48 150 48 256s86 192 192 192a192.09 192.09 0 00181.07-128"}),f("path",{d:"M464 97.42V208a16 16 0 01-16 16H337.42c-14.26 0-21.4-17.23-11.32-27.31L436.69 86.1C446.77 76 464 83.16 464 97.42z"})]}),gf=()=>f(kt,{children:[f("path",{fill:"none",strokeLinecap:"round",strokeWidth:"64",d:"M112 144h0M112 256h0M112 368h0"}),f("path",{fill:"none",strokeLinecap:"round",strokeWidth:"40",d:"M208 144h208M208 256h208M208 368h208"})]}),vf=({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}),yf=112,bf=128;function _f(t){Dt(()=>{const e=t==null?void 0:t.closest(".clover-canvas");if(!t||!e)return;const n=(s=false)=>{let i=t.offsetWidth,a=0;for(const p of s?[]:Array.from(t.children))!(p instanceof HTMLElement)||!p.offsetParent||(i=Math.min(i,p.offsetLeft),a=Math.max(a,p.offsetTop+p.offsetHeight));const c={width:t.offsetWidth-i,height:a};for(const[p,m]of Object.entries(c)){const g=`--clover-canvas-controls-${p}`;a?e.style.setProperty(g,`${m}px`):e.style.removeProperty(g)}const l=t.offsetTop,d=e.querySelector(":scope > .clover-canvas-media > .clover-canvas-transport"),u=e.clientHeight-2*l-c.height-((d==null?void 0:d.offsetHeight)??0),h=t.offsetLeft+i-l;a&&u<yf&&h>=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 ko=()=>{if(typeof document>"u")return null;const t=document;return t.fullscreenElement??t.webkitFullscreenElement??null},vc=()=>{if(typeof document>"u")return false;const t=document;return!!(t.fullscreenEnabled??t.webkitFullscreenEnabled)},yc=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},wf=(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()},bc=async(t,e)=>{var o,r,s,i;const n=yc(t);if(n)try{if(ko()){const c=document;await(((o=c.exitFullscreen)==null?void 0:o.call(c))??((r=c.webkitExitFullscreen)==null?void 0:r.call(c)));return}if(!vc()){e&&t&&wf(e,t);return}const a=n;await(((s=a.requestFullscreen)==null?void 0:s.call(a))??((i=a.webkitRequestFullscreen)==null?void 0:i.call(a)))}catch{}};function is(t){const[e,n]=H(false);return F(()=>{if(!t)return;const o=()=>{var r;return n(!!((r=ko())!=null&&r.contains(t)))};return o(),document.addEventListener("fullscreenchange",o),document.addEventListener("webkitfullscreenchange",o),()=>{document.removeEventListener("fullscreenchange",o),document.removeEventListener("webkitfullscreenchange",o)}},[t]),e}function xf({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(vf,{label:n,children:o}),label:n,tip:f(Ue,{label:n,shortcut:a})},t):f(Fe,{id:e,label:n,onClick:l?void 0:r,unavailable:l,expanded:s,controls:i,shortcut:a,lang:c,children:o},t)}const Sf=({fit:t=false,clusterRef:e,children:n})=>{const[o,r]=H(null),s=is(o);_f(o);const i=dt(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})},kf=()=>()=>{};function Cf(){return ne(kf,vc)}const Ni=new WeakMap;function Qe(t,e){const[n,o]=H(()=>Ni.get(t)??null);return F(()=>{if(!e||n)return;let r=true;return t().then(s=>{Ni.set(t,s),r&&o(()=>s)},()=>{}),()=>{r=false}},[t,e,n]),n}function Ef(t,e,n){return t.reduce((o,r)=>o+r+n,-n)<=e}function Mf(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 Tf({cluster:t,ids:e,more:n,fits:o,settled:r,onFits:s}){const i=N(o);i.current=o;const a=N(s);a.current=s;const c=N(new Map),l=N(e);l.current=e;const d=N(null),u=e.join(" ");return Dt(()=>{const h=t.ownerDocument,p=()=>{var B;const b=l.current,v=getComputedStyle(t),w=parseFloat(v.columnGap)||0;let _=t.clientWidth-(parseFloat(v.paddingLeft)||0)-(parseFloat(v.paddingRight)||0),x=0;for(const O of b){const Q=(B=h.getElementById(O))==null?void 0:B.offsetWidth;Q&&c.current.set(O,Q),x=Math.max(x,c.current.get(O)??0)}for(const O of Array.from(t.children))!(O instanceof HTMLElement)||b.includes(O.id)||O.id===n||O.classList.contains("clover-canvas-more")||!O.offsetWidth||getComputedStyle(O).position==="absolute"||(_-=O.offsetWidth+w);const S=Ef(b.map(O=>c.current.get(O)??x),_,w);if(S===i.current)return;const M=h.activeElement;d.current=M instanceof HTMLElement&&t.contains(M)?M.id:null,i.current=S,a.current(S)};p();const m=new ResizeObserver(()=>p());m.observe(t);const g=new MutationObserver(()=>p());return g.observe(t,{childList:true}),()=>{m.disconnect(),g.disconnect()}},[t,u,n]),Dt(()=>{if(!r)return;const h=d.current;if(d.current=null,h===null)return;const p=t.ownerDocument.activeElement;(!p||!t.contains(p)||p.closest("[hidden]"))&&Mf(t,h,n)},[o,r,t,n]),null}const Pf=()=>import("./AnnotationMenu-_xBnZtm1.mjs"),If=()=>import("./ChaptersMenu-C5J0d8Ck.mjs"),Lf=()=>import("./ChoiceMenu-B8iukYiR.mjs"),Af=()=>import("./ImageControls-8ZIWLAkf.mjs"),Ri=2,Of=new Set(["zoomIn","zoomOut","rotateRight","rotateLeft","reset","fullPage"]),_c={atMax:false,atMin:false,atHome:false},Nf=({renderer:t,instance:e,config:n,controlButtons:o,limits:r=_c,placeholder:s,placeholderIsMore:i=false,choices:a=[],selections:c={},onSelect:l,annotations:d=[],chapters:u=[],mediaElement:h=null,onChapter:p,overStill:m,request:g,hiddenPages:b,onPageVisibilityChange:v,selectedAnnotation:w=null,onAnnotationSelect:_,onAnnotationActivate:x,captionId:S,captionOpen:M=false,onCaptionToggle:B,placeId:O,placeOpen:Q=false,onPlaceToggle:nt,language:G,fit:tt=true,more:K="auto",children:Y})=>{var Hn,Wn,Oe,mn;const{t:I,langOf:E}=Tt(),[A,U]=H(false),[rt,st]=H(false),et=`annotations-${e}`,it=`${et}-menu`,y=I("informationPanelTabsAnnotations"),k=E("informationPanelTabsAnnotations"),T=dt(q=>{var pt;st(false),x==null||x(null),q&&((pt=document.getElementById(et))==null||pt.focus())},[et,x]),R=n.annotations&&d.length>0&&_,[z,L]=H(false),D=`chapters-${e}`,X=`${D}-menu`,ht=u.length>0&&!!p,J=N(false),bt=N(null);F(()=>{const q=()=>{var pt;J.current=((pt=document.activeElement)==null?void 0:pt.id)===D};return document.addEventListener("focusin",q),()=>document.removeEventListener("focusin",q)},[D]);const mt=dt(()=>{var pt,Se;if(!J.current)return;J.current=false;const q=document.activeElement;q&&q!==document.body||(Se=(pt=bt.current)==null?void 0:pt.querySelector('.clover-canvas-transport :is([data-button="play"], [data-button="pause"])'))==null||Se.focus()},[]);F(()=>{ht||mt()},[ht,mt]),F(()=>()=>mt(),[mt]);const Lt=dt(q=>{var pt;L(false),q&&((pt=document.getElementById(D))==null||pt.focus())},[D]),At=n.information&&S&&B,Vt=n.map&&O&&nt,V=`choice-${e}`,j=a.length===1?_t(a[0].label,G):null,ft=(j==null?void 0:j.text)||I("canvasChoice"),Ct=j!=null&&j.text?j.lang:E("canvasChoice"),Xt=`${V}-menu`,we=(Hn=Qe(Pf,!!R))==null?void 0:Hn.default,$=(Wn=Qe(If,ht))==null?void 0:Wn.default,ct=(Oe=Qe(Lf,a.length>0&&!!l))==null?void 0:Oe.default,Rt=dt(q=>{var pt;U(false),q&&((pt=document.getElementById(V))==null||pt.focus())},[V]),Io=Cf(),[qt,je]=H(null);F(()=>{bt.current=(qt==null?void 0:qt.closest(".clover-canvas"))??null},[qt]);const Ve=is(qt),[he,Le]=H(false),$n=q=>f(Fe,{className:q,id:et,label:y,lang:k,onClick:()=>st(pt=>!pt),expanded:rt,controls:it,children:f(Xd,{})},"annotations"),Fn=(()=>{const q=[],pt=t;return n.zoom&&pt&&q.push({key:"zoomIn",id:`zoomIn-${e}`,shortcut:Gt.zoomIn,label:I("imageZoomIn"),lang:E("imageZoomIn"),glyph:f(df,{}),unavailable:r.atMax,onClick:()=>pt.zoomBy(Ri)},{key:"zoomOut",id:`zoomOut-${e}`,shortcut:Gt.zoomOut,label:I("imageZoomOut"),lang:E("imageZoomOut"),glyph:f(ff,{}),unavailable:r.atMin,onClick:()=>pt.zoomBy(1/Ri)}),n.fullPage&&Io&&q.push({key:"fullPage",id:`fullPage-${e}`,label:I(Ve?"imageExitFullScreen":"imageFullScreen"),lang:E(Ve?"imageExitFullScreen":"imageFullScreen"),glyph:Ve?f(pf,{}):f(hf,{}),onClick:Se=>void bc(Se.currentTarget)}),n.rotation&&pt&&q.push({key:"rotateRight",id:`rotateRight-${e}`,shortcut:Gt.rotateRight,label:I("imageRotateRight"),lang:E("imageRotateRight"),glyph:f(Oi,{}),onClick:()=>pt.rotateBy(90)},{key:"rotateLeft",id:`rotateLeft-${e}`,shortcut:Gt.rotateLeft,label:I("imageRotateLeft"),lang:E("imageRotateLeft"),glyph:f(Oi,{}),onClick:()=>pt.rotateBy(-90)}),n.reset&&pt&&q.push({key:"reset",id:`reset-${e}`,shortcut:Gt.reset,label:I("imageResetZoom"),lang:E("imageResetZoom"),glyph:f(mf,{}),unavailable:r.atHome,onClick:()=>pt.home()}),a.length&&q.push({key:"choice",id:V,label:ft,lang:Ct,glyph:f(gf,{}),onClick:()=>U(Se=>!Se),expanded:A,controls:Xt}),q})(),Yt=[...Fn.filter(q=>q.key!=="fullPage"),...Fn.filter(q=>q.key==="fullPage")].map(q=>({id:q.id,view:Of.has(q.key),node:xf(q,o)})),fn=[Vt&&{id:`place-${e}`,view:false,node:f(Fe,{id:`place-${e}`,label:I("mapLabel"),lang:E("mapLabel"),onClick:nt,expanded:Q,controls:O,children:f(Qd,{})},"place")},ht&&{id:D,view:false,node:f(Fe,{id:D,label:I("playerChapters"),lang:E("playerChapters"),onClick:()=>L(q=>!q),expanded:z,controls:X,children:f(Yd,{})},"chapters")},R&&{id:et,view:false,node:$n()},At&&{id:`information-${e}`,view:false,node:f(Fe,{id:`information-${e}`,label:I("informationPanelTabsAbout"),lang:E("informationPanelTabsAbout"),onClick:B,expanded:M,controls:S,children:f(Jd,{})},"information")},!!s&&{id:`placeholder-${e}`,view:false,node:f(ae.Fragment,{children:s},"placeholder")}].filter(q=>!!q),Dn=fn.filter(q=>q.id===`placeholder-${e}`),Ht=[...Yt.filter(q=>q.view),...Dn],hn=[...Yt.filter(q=>!q.view),...fn.filter(q=>!Dn.includes(q))],Jt=[...Ht,...hn],[Ae,Ao]=H(true),pn=K==="always"||i,Pt=(mn=Qe(Af,tt&&(i||(pn||!Ae)&&Jt.some(q=>q.view))))==null?void 0:mn.ImageControls,Wt=Ae&&!pn||!Pt?[]:Jt.filter(q=>q.view),xe=i&&!!s&&!!Pt;F(()=>{Wt.length||Le(false)},[Wt.length]);const zn=q=>q.filter(pt=>!Wt.includes(pt)&&!(xe&&pt.id===`placeholder-${e}`)).map(({node:pt})=>pt);return f(kt,{children:[f(Sf,{fit:tt,clusterRef:je,children:[zn(Ht),Pt&&(Wt.length>0||xe)&&f(Pt,{instance:e,open:xe?Wt.length>0:he,onOpenChange:Le,toggle:xe?s:void 0,children:Wt.map(({node:q})=>q)}),zn(hn),Y]}),tt&&!pn&&qt&&f(Tf,{cluster:qt,ids:Jt.map(({id:q})=>q),more:`more-${e}`,fits:Ae,settled:Ae||Wt.length>0||!Jt.some(q=>q.view),onFits:Ao}),$&&z&&ht&&f($,{id:X,triggerId:D,label:I("playerChapters"),labelLang:E("playerChapters"),chapters:u,element:h,onChapter:p,overStill:m,request:g,onClose:Lt}),we&&rt&&R&&f(we,{id:it,triggerId:et,label:y,labelLang:k,annotations:d,hiddenPages:b,onPageVisibilityChange:v,selected:w,onSelect:_,onActivate:q=>x==null?void 0:x(q),onClose:T}),ct&&A&&a.length>0&&l&&f(ct,{id:Xt,triggerId:V,label:ft,labelLang:Ct,language:G,choices:a,selections:c,onSelect:l,onClose:Rt})]})},Rf=["jpg","png","webp","gif"];class Mr extends Error{constructor(e,n,o){super(e),this.url=n,this.status=o,this.name="ImageServiceError"}}function as(t){return t.replace(/\/info\.json$/,"").replace(/\/+$/,"")}function Co(t){const e=Array.isArray(t)?t:t?[t]:[];for(const n of e){if(!n||typeof n!="object")continue;const o=n,r=String(o.type??o["@type"]??""),s=JSON.stringify(o.profile??""),i=/ImageService/i.test(r)||/iiif\.io\/api\/image/.test(s)||/^"level[012]"$/.test(s)||!r&&!o.profile,a=o["@id"]??o.id;if(i&&typeof a=="string")return as(a)}}function Bf(t,e){if(!t||typeof t!="object")throw new Mr("info.json is not an object",e??"");const n=t,o=$f(n),r=o===3?n.id??n["@id"]:n["@id"]??n.id,s=as(r??e??""),i=Number(n.width),a=Number(n.height);if(!s||!(i>0)||!(a>0))throw new Mr("info.json is missing id, width or height",e??s);const c=Array.isArray(n.profile)?n.profile:[n.profile],l=c.find(w=>typeof w=="string"),d=c.filter(w=>!!w&&typeof w=="object"),u=Ff(l),h=new Set([...Array.isArray(n.extraFeatures)?n.extraFeatures:[],...d.flatMap(w=>Array.isArray(w.supports)?w.supports:[])]),m=[...Array.isArray(n.preferredFormats)?n.preferredFormats:[]].map(w=>String(w).toLowerCase()).find(w=>Rf.includes(w))??"jpg",g=w=>{var x;const _=n[w]??((x=d.find(S=>S[w]!==void 0))==null?void 0:x[w]);return Number(_)>0?Number(_):void 0};let b=g("maxWidth"),v=g("maxHeight");return b&&!v&&(v=b),v&&!b&&(b=void 0),{id:s,version:o,level:u,width:i,height:a,tiles:Df(n.tiles),sizes:zf(n.sizes),maxWidth:b,maxHeight:v,maxArea:g("maxArea"),regionByPx:u>=1||h.has("regionByPx"),sizeByW:u>=1||h.has("sizeByW")||h.has("sizeByWh"),format:m,quality:"default"}}function $f(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 Ff(t){const e=t==null?void 0:t.match(/level([012])/);return e?Number(e[1]):0}function Df(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 zf(t){return Array.isArray(t)?t.map(e=>({width:Number(e==null?void 0:e.width),height:Number(e==null?void 0:e.height)})).filter(e=>e.width>0&&e.height>0).sort((e,n)=>e.width-n.width):[]}function uo(t,e,n,o,r=t.quality){const s=e.x===0&&e.y===0&&e.width===t.width&&e.height===t.height,i=s?"full":`${e.x},${e.y},${e.width},${e.height}`,a=s&&n===t.width&&o===t.height;let c;return t.version===3?c=a?"max":`${n},${o}`:c=a?"full":`${n},`,`${t.id}/${i}/${c}/0/${r}.${t.format}`}function Hf(t){return t.version===2&&t.level===0?"native":void 0}const er=new Map;function cs(t,{request:e}={}){const n=as(t),o=er.get(n);if(o)return o;const r=`${n}/info.json`,s=ns(e,r,{headers:{Accept:"application/ld+json, application/json"}}).then(async i=>{if(!i.ok)throw new Mr(`info.json request failed with ${i.status}`,r,i.status);return Bf(await i.json(),n)}).catch(i=>{throw er.delete(n),i});return er.set(n,s),s}function Wf(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 Yv(t,e){var n;if(t.currentTime=e,!!t.paused)try{(n=t.play())==null||n.catch(()=>{})}catch{}}function ls(t){if(!t)return;const[e,n]=t.split(","),o=Number(e);if(e===""||Number.isNaN(o))return;if(n===void 0||n==="")return{start:o};const r=Number(n);return Number.isNaN(r)?{start:o}:{start:o,end:r}}const Uf=(t,e,n,o,r)=>`${t}|${e??`${n}:${o}`}|${r}`,jf=/^((application|audio|video)\/)?(vnd\.apple\.|x-)?mpegurl$/i,Vf=(t,e)=>!!(t&&/\.m3u8$/i.test(t.split(/[?#]/)[0]))||!!(e&&jf.test(e)),qf={width:1600,height:900};function Kf(t,e){const n=new Array(t.length);if(!t.length)return n;const o=t.map(cn),r=e==="left-to-right"||e==="right-to-left",s=e==="right-to-left"||e==="bottom-to-top",i=r?o[0].height:o[0].width,a=t.map((l,d)=>d);s&&a.reverse();let c=0;for(const l of a){const d=o[l],u=i/(r?d.height:d.width),h=d.width*u,p=d.height*u;n[l]=r?{x:c,y:0,width:h,height:p}:{x:0,y:c,width:h,height:p},c+=r?h:p}return n}function cn(t){var s,i;if(t.width&&t.height)return{width:t.width,height:t.height};const e=wc(t);if(e!=null&&e.width&&e.height)return{width:e.width,height:e.height};const n=((s=fo(t)[0])==null?void 0:s.body)??((i=ho(t)[0])==null?void 0:i.body),o=Number(n==null?void 0:n.width),r=Number(n==null?void 0:n.height);return o>0&&r>0?{width:o,height:r}:qf}function wc(t){return t.accompanyingContainer??t.placeholderContainer}function Zf(t,e,n,o,r){return Uf(t.id,e.id,n,o,r)}function Gf(t){const e=[];for(const n of t)xc(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 nr={};function Xf(t){if(t.type!=="Video"&&!An(t.type)||!t.format||Vf(t.id,t.format)||typeof document>"u")return true;const e=t.type==="Video"?"video":"audio",n=nr[e]??(nr[e]=document.createElement(e));return typeof n.canPlayType!="function"?true:n.canPlayType(t.format)!==""}function Yf(t){const e={};for(const n of t){const o=n.items.findIndex(Xf);o>0&&(e[n.key]=o)}return e}const or=new WeakMap,rr=[];function Jf(t){return xo(t).some(e=>((e==null?void 0:e.type)==="Choice"?W(e.items):[e]).some(o=>(o==null?void 0:o.type)==="Video"||An(o==null?void 0:o.type)))}function Tr(t){var i;const e=or.get(t);if(e)return e;const n=[];for(const a of t.items??[])for(const c of a.items??[]){if(!Yr(c))continue;const l=c.target?(i=un(c.target))==null?void 0:i.t:void 0;if(!l)continue;const[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=>Jf(a.annotation)))return or.set(t,rr),rr;n.sort((a,c)=>a.start-c.start);const o=Number(t.duration),r=Number.isFinite(o)&&o/n.length||.5;n.forEach((a,c)=>{var 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:rr;return or.set(t,s),s}const Mn=t=>`frame:${t.id}`;function xc(t,e){(t.items??[]).forEach((n,o)=>{(n.items??[]).forEach((r,s)=>{Yr(r)&&xo(r).forEach((i,a)=>e(i,Zf(t,r,o,s,a),r))})})}function fo(t,e={},{allFrames:n=false}={}){const o=[];return us(t,e,(r,s,i)=>{r.body.type==="Image"&&o.push({body:r.body,region:r.region,...r.rotation?{rotation:r.rotation}:{},target:s,...i>=0?{frame:i}:{}})},n),o}function Qf(t,e={}){for(const n of t){let o;if(us(n,e,r=>{o??(o=r.body.type)}),typeof o=="string")return o.toLowerCase()}}function ho(t,e={}){const n=[];return us(t,e,(o,r,s,i)=>{const a=o.body.type;if(a!=="Video"&&!An(a))return;const c=ls(i);n.push({kind:a==="Video"?"video":"audio",body:o.body,target:r,...c?{time:c}:{}})}),n}function th(t){const e=t.filter(o=>o.time&&typeof o.body.id=="string"),n=new Set(e.map(o=>o.time.start));if(!(e.length<2||n.size!==e.length))return e.sort((o,r)=>o.time.start-r.time.start).map(o=>{const r=Number(o.body.duration)||(o.time.end!==void 0?o.time.end-o.time.start:void 0);return{src:o.body.id,...o.body.format?{format:o.body.format}:{},start:o.time.start,...r?{duration:r}:{}}})}function us(t,e,n,o=false){const r=t.width??0,s=t.height??0,i=Tr(t),a=Math.min(e[Mn(t)]??0,Math.max(0,i.length-1));xc(t,(c,l,d)=>{const u=i.findIndex(g=>g.annotation===d);if(!o&&u>=0&&u!==a)return;const h=Pr(c,e[l]??0);if(!h)return;const p=d.target?un(d.target):void 0,m=p==null?void 0:p.rect;n(h,m?{x:m.x,y:m.y,width:m.w,height:m.h}:{x:0,y:0,width:r||Number(h.body.width)||0,height:s||Number(h.body.height)||0},u,p==null?void 0:p.t)})}function Sc(t){return kc(t).filter(e=>e.kind!=="transcript")}function eh(t){const e=W(t.provides);return e.includes("closedCaptions")?"captions":e.includes("subtitles")||e.includes("translation")?"subtitles":e.includes("transcript")?"transcript":"captions"}function kc(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:eh(r)})}}return e}function nh(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 Pr(t,e=0){if(!t||typeof t!="object")return null;const n=t;if(n.type==="Choice"){const o=W(n.items);return Pr(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=Pr({type:"Image",...o});if(!s)return null;const i=(r==null?void 0:r.rotation)!=null?String(r.rotation):void 0;return{...s,region:(r==null?void 0:r.region)||s.region,...i?{rotation:i}:{}}}return n.type!=="Image"&&n.type!=="Video"&&!An(n.type)?null:{body:n,region:typeof n.region=="string"?n.region:void 0}}function oh(t,e,n={},{standIns:o=true}={}){const r=Kf(t,e),s=[],i=[],a={};return t.forEach((c,l)=>{const d=r[l],u=cn(c),h=d.width/u.width,p=d.height/u.height,m=x=>({x:d.x+x.x*h,y:d.y+x.y*p,width:x.width*h,height:x.height*p}),g=ho(c,n),b=fo(c,n,{allFrames:true}).map(x=>({...x,canvas:c})),v=wc(c);if(o&&!b.length&&g.some(x=>x.kind==="audio")&&v){const x=cn(v);for(const S of fo(v))b.push({...S,canvas:v,target:{x:S.target.x/x.width*u.width,y:S.target.y/x.height*u.height,width:S.target.width/x.width*u.width,height:S.target.height/x.height*u.height}})}const w=n[Mn(c)]??0;b.forEach(({body:x,target:S,region:M,rotation:B,frame:O,canvas:Q},nt)=>{var Y;const G=Co(x.service);if(!G&&!x.id)return;const tt=`${Q.id}|${nt}|${x.id??G}|${M??""}|${B??""}`,K=!(G&&M);if(s.push({id:tt,service:G,url:x.id,width:K&&Number(x.width)||void 0,height:K&&Number(x.height)||void 0,region:M,...B?{rotation:B}:{},placement:m(S),...O!=null&&O!==w?{hidden:true}:{}}),O!=null){const I=a[Y=Mn(c)]??(a[Y]=[]);(I[O]??(I[O]=[])).push(tt)}});const[_]=g;if(_!=null&&_.body.id){const x=th(g),S=x?x[0]:void 0;i.push({id:`${c.id}|media|${_.body.id}`,kind:_.kind,src:(S==null?void 0:S.src)??_.body.id,format:S?S.format:_.body.format,placement:m(_.target),duration:x?Number(c.duration)||void 0:Number(_.body.duration??c.duration)||void 0,...x?{segments:x}:{},poster:rh(c),captions:Sc(c)})}}),{images:s,media:i,placements:r,frames:a}}function rh(t){var e;return(e=Cc(t))==null?void 0:e.source}const Jv=1280;function Cc(t){var c;const e=t.placeholderContainer;if(!e)return;const n=(c=fo(e)[0])==null?void 0:c.body;if(!n)return;const o=Co(n.service),r=typeof n.id=="string"?n.id:void 0,s=o?{service:o,fallback:r}:r?{src:r}:void 0;if(!s)return;const{width:i,height:a}=cn(e);return{source:s,width:i,height:a}}function sh(t,e,n){const o=cn(t),r=e.width/o.width,s=e.height/o.height;return{x:e.x+n.x*r,y:e.y+n.y*s,width:n.width*r,height:n.height*s}}const ih=({hidden:t})=>{const{t:e,langOf:n}=Tt(),o=e("imageExitFullScreen");return f("button",{"aria-label":o,...ut(n("imageExitFullScreen")),className:"clover-canvas-exit-full-screen",hidden:t,onClick:r=>void bc(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]})},Ec="50%";function Mc(t,e=Ec,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 ah(t){const[e,n]=H(false);return F(()=>{if(!t)return;const o=()=>n(ko()===t);return o(),document.addEventListener("fullscreenchange",o),document.addEventListener("webkitfullscreenchange",o),()=>{document.removeEventListener("fullscreenchange",o),document.removeEventListener("webkitfullscreenchange",o)}},[t]),e}function ch(t){const[e,n]=H(false);return F(()=>{if(!t)return;const o=()=>{const r=ko();n(r===t||!!r&&yc(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 lh extends ae.Component{constructor(){super(...arguments);P(this,"state",{error:null})}static getDerivedStateFromError(n){return{error:n}}render(){const{error:n}=this.state;return n?f(uh,{error:n}):this.props.children}}function uh({error:t}){const{t:e,langOf:n}=Tt();return f("div",{className:"clover-canvas-error",role:"alert",children:[f("p",{className:"clover-canvas-error-headline","data-testid":"headline",...ut(n("statusError")),children:e("statusError")}),t.message&&f("span",{className:"clover-canvas-error-body",lang:"en",children:t.message})]})}function Sn({overlay:t=false,className:e}){return f("span",{"aria-hidden":"true",className:Mt("clover-loading",e),"data-overlay":t||void 0,children:f("span",{})})}const dh={image:"bodyUnloadableImage",video:"bodyUnloadableVideo",audio:"bodyUnloadableAudio",model:"bodyUnloadableModel"};function fh({kind:t,shown:e,room:n=false}){const{t:o,langOf:r}=Tt(),s=dh[t];return f("div",{className:"clover-body-unloadable","data-room":n||void 0,role:"status",children:e&&f("p",{...ut(r(s)),children:o(s)})})}function hh({text:t,lang:e}){return f("div",{className:"clover-body-note","aria-hidden":"true",children:f("p",{...ut(e),children:t})})}function Eo(t,e,n=false,o){const r=fe(),{hostLanguage:s}=Tt(void 0,o);if(n)return{props:{},node:null};const i=_o(e,s);return i===void 0?{props:{"aria-label":t},node:null}:{props:{"aria-labelledby":r},node:f("span",{hidden:true,id:r,...ut(i),children:t})}}const ph=Object.freeze({a:1,b:0,c:0,d:1,e:0,f:0});function oe(t,e){return{a:1,b:0,c:0,d:1,e:t,f:e}}function ce(t,e=t){return{a:t,b:0,c:0,d:e,e:0,f:0}}function Nn(t){const e=Math.cos(t),n=Math.sin(t);return{a:e,b:n,c:-n,d:e,e:0,f:0}}function mh(t,e){return{a:t.a*e.a+t.c*e.b,b:t.b*e.a+t.d*e.b,c:t.a*e.c+t.c*e.d,d:t.b*e.c+t.d*e.d,e:t.a*e.e+t.c*e.f+t.e,f:t.b*e.e+t.d*e.f+t.f}}function le(...t){return t.reduce((e,n)=>mh(e,n),ph)}function gh(t){const e=t.a*t.d-t.b*t.c;if(!e||!Number.isFinite(e))return null;const n=1/e;return{a:t.d*n,b:-t.b*n,c:-t.c*n,d:t.a*n,e:(t.c*t.f-t.d*t.e)*n,f:(t.b*t.e-t.a*t.f)*n}}function ve(t,e){return{x:t.a*e.x+t.c*e.y+t.e,y:t.b*e.x+t.d*e.y+t.f}}function Qv(t){return`matrix(${[t.a,t.b,t.c,t.d,t.e,t.f].map(yh).join(",")})`}function vh(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 yh(t){const e=Math.round(t*1e6)/1e6;return Object.is(e,-0)?"0":String(e)}function Tc(t){return{x:t.x+t.width/2,y:t.y+t.height/2}}function ds(t){if(!t.length)return null;let e=1/0,n=1/0,o=-1/0,r=-1/0;for(const s of t)e=Math.min(e,s.x),n=Math.min(n,s.y),o=Math.max(o,s.x+s.width),r=Math.max(r,s.y+s.height);return{x:e,y:n,width:o-e,height:r-n}}function 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 Mo(t,e){const n=[ve(t,{x:e.x,y:e.y}),ve(t,{x:e.x+e.width,y:e.y}),ve(t,{x:e.x,y:e.y+e.height}),ve(t,{x:e.x+e.width,y:e.y+e.height})],o=n.map(a=>a.x),r=n.map(a=>a.y),s=Math.min(...o),i=Math.min(...r);return{x:s,y:i,width:Math.max(...o)-s,height:Math.max(...r)-i}}function yn(t,e,n){return Math.min(Math.max(t,e),n)}const sr=t=>!!(t&&"overlays"in t);let Ir;const _h=()=>Promise.resolve().then(()=>wd).then(t=>{Ir=t.buildContentState}),wh=gt(()=>import("./MediaBody-CQAJJpuz.mjs")),xh=()=>import("./AnnotationState-o4goI6T-.mjs"),Sh=new Map,kh={menu:[],placed:[],timed:[],hiddenPages:[],setPagesVisible:()=>{},listedCount:0,comments:Sh,selected:null,select:()=>{},activate:()=>{},release:()=>false,quietlyOpened:null},Ch=gt(()=>import("./FrameAnimation-DiQgfgri.mjs")),Bi=gt(()=>import("./PlaceBox-BBtsMTsl.mjs")),Eh=gt(()=>import("./Placeholder-5focqckW.mjs")),Mh=gt(()=>import("./ControlsFade-JoRgQt8U.mjs")),Th=()=>true,Ph=gt(()=>import("./Placeholder-5focqckW.mjs").then(({PlaceholderToggle:t})=>({default:t}))),$i={zoom:true,fullPage:true,rotation:true,reset:true,annotations:true,information:true,map:true},Ih={zoom:false,fullPage:false,rotation:false,reset:false,annotations:false,information:false,map:false},Lh={description:"canvasKeysImage",keys:["ArrowLeft ArrowRight ArrowUp ArrowDown",Gt.zoomIn.keys,Gt.zoomOut.keys,Gt.reset.keys,Gt.rotateRight.keys,Gt.rotateLeft.keys].join(" ")},Ah={description:"canvasKeysMedia",keys:[Gt.play.keys,"J L",Gt.mute.keys].join(" ")},Oh={description:"canvasKeysAnnotations",keys:"Escape"},Nh=t=>{var n;return!!((n=t.canvases)!=null&&n.length)||Pc(t.body,t.src).length>0?f(lh,{children:f(Rh,{...t})}):null},Rh=t=>{var Bs,$s,Fs,Ds,zs,Hs;const{surface:e,manifestId:n,canvases:o,viewingDirection:r,body:s,src:i,isTiledImage:a=false,label:c,partOf:l,language:d,highContrast:u,instanceId:h,className:p,options:m,navigator:g=false,controls:b=true,collapseControls:v="auto",controlButtons:w,annotations:_,onReady:x,onViewportChange:S,onContentStateChange:M,onMediaElement:B,onCaptionChange:O,caption:Q,onEnded:nt,chapters:G,highlightedChapter:tt,onChapterHighlight:K,placeholder:Y=true,children:I}=t,{t:E}=Tt(),A=N(null),[U,rt]=H(null),st=ah(U),et=is(U),it=ch(U),y=wo(rt),k=qr(u),T=!!e.controlsVisibility,z=(e.controlsVisibility??Th)(T?U:null,m==null?void 0:m.hideDelay,A),[L,D]=H(false),X=Mc(U),ht=fe(),[J]=H(()=>h??`clover-canvas-${ht}`),bt=N(null),[mt,Lt]=H(null),At=sr(mt)?mt:null,[Vt,V]=H(null),j=b===false?null:b===true?$i:{...$i,...b},[ft,Ct]=H("loading"),[Xt,we]=H(false),[$,ct]=H(0),[Rt,Io]=H(_c),qt=N(x),je=N(S),Ve=N(m);qt.current=x,je.current=S,Ve.current=m;const he=Xr(r),Le=yt(()=>Gf(o??[]),[o]),$n=yt(()=>Yf(Le),[Le]),[Lo,Fn]=H({}),Yt=yt(()=>({...$n,...Lo}),[$n,Lo]),fn=(C,Z)=>Fn(vt=>({...vt,[C]:Z})),Dn=yt(()=>_==null?void 0:_.filter(C=>!C.layer||(Yt[C.layer.key]??0)===C.layer.item),[_,Yt]),Ht=(Bs=_==null?void 0:_.find(C=>C.layer&&C.annotation.id===t.selectedAnnotation))==null?void 0:Bs.layer;F(()=>{Ht&&(Yt[Ht.key]??0)!==Ht.item&&fn(Ht.key,Ht.item)},[Ht==null?void 0:Ht.key,Ht==null?void 0:Ht.item,t.selectedAnnotation]);const hn=!!(j!=null&&j.information),Jt=!!(_!=null&&_.length),Ae=Qe(xh,Jt),[Ao,pn]=H(null),Pt=Jt&&Ao||kh,Wt=yt(()=>{var vt,Ot;const C=(vt=_==null?void 0:_.find(Ut=>Ut.annotation.id===Pt.selected))==null?void 0:vt.annotation,Z=(Array.isArray(C==null?void 0:C.body)?C==null?void 0:C.body:[C==null?void 0:C.body]).find(Ut=>(Ut==null?void 0:Ut.type)==="Feature");return C&&Z?{id:String(C.id),feature:Z,name:((Ot=Z.properties)==null?void 0:Ot.label)??C.label}:null},[_,Pt.selected]),xe=Wt?`${Wt.id}:${t.refind??0}`:null,[zn,Hn]=H(null),Wn=xe!==null&&zn!==xe,Oe=yt(()=>{var Ut,Xe;const C=(o??[]).map(Zt=>Zt.navPlace).filter(Boolean),Z=C.length?C:t.navPlace?[t.navPlace]:[];if(!Z.length)return null;const vt=Z.flatMap(Zt=>(Zt==null?void 0:Zt.type)==="FeatureCollection"?Zt.features??[]:(Zt==null?void 0:Zt.type)==="Feature"?[Zt]:[]);if(!vt.length)return null;const Ot=vt.length===1?(Xe=(Ut=vt[0])==null?void 0:Ut.properties)==null?void 0:Xe.label:void 0;return{feature:{type:"FeatureCollection",features:vt},name:Ot??t.label}},[o,t.navPlace,t.label]),mn=`place-box-${J}`,[q,pt]=H(false),[Se,ml]=H(false),Un=N(Pt);Un.current=Pt;const jn=dt(()=>Un.current.release(),[]),{comments:Oo,listedCount:ws}=Pt,qe=yt(()=>hn?(o??[]).filter(C=>lf(C)||Oo.has(C.id)):[],[o,hn,Oo]),No=`caption-${J}`,[gl,xs]=H(false),Ro=gl&&qe.length>0,Ss=dt(C=>{var Z;xs(false),C&&((Z=document.getElementById(`information-${J}`))==null||Z.focus())},[J]),Kt=yt(()=>(o??[]).find(C=>Tr(C).length)??null,[o]),vl=Kt?Tr(Kt):$h,Ft=yt(()=>o!=null&&o.length?oh(o,he,Yt,{standIns:o.length>1}):null,[o,he,Yt]),yl=yt(()=>Pc(s,i,a),[s,i,a]),ot=(Ft==null?void 0:Ft.media[0])??null,ks=!T&&(ot==null?void 0:ot.kind)==="video",bl=T||ks,_l=T?z:L,wl=yt(()=>{if(o!=null&&o.length)return Qf(o,Yt);const C=(Array.isArray(s)?s:s?[s]:[])[0];return typeof(C==null?void 0:C.type)=="string"?C.type.toLowerCase():i?"image":void 0},[o,Yt,s,i]),[$t,xl]=H(null),Vn=N(B);Vn.current=B;const Sl=dt(C=>{var Z;xl(C),(Z=Vn.current)==null||Z.call(Vn,C)},[]),ke=Ft?Ft.images:yl,Ce=!!ot&&(o==null?void 0:o.length)===1,Ee=Ce&&(ot==null?void 0:ot.kind)==="audio",kl=Ce&&(ot==null?void 0:ot.kind)==="video",Ke=(o==null?void 0:o.length)===1&&!ot&&!Kt&&ke.length===0,qn=!Ce&&!Ke&&(($s=m==null?void 0:m.gestures)==null?void 0:$s.navigable)!==false,pe=o?`${n??""}
|
|
2
|
-
${o.map(C=>C.id).join("|")}`:null,Me=yt(()=>{if(!o||!Y)return[];const C=o.flatMap(Z=>{const vt=Cc(Z),Ot=_t(Z.label,d);return vt?[{...vt,alt:Ot.text,lang:Ot.lang}]:[]});return he==="right-to-left"||he==="bottom-to-top"?C.reverse():C},[o,he,Y,d]),[Cl,Cs]=H(false),[El,Es]=H(null),xt=!Ee&&Me.length>0&&(ot?El!==pe:!Cl),Ms=m==null?void 0:m.request;F(()=>{if(xt){Promise.resolve().then(()=>bm);for(const{source:C}of Me)C.service&&cs(C.service,{request:Ms}).catch(()=>{})}},[xt,Me,Ms]);const Ts=(C,{annotations:Z=false,fullPage:vt=false}={})=>({...C,zoom:false,rotation:false,reset:false,fullPage:vt&&C.fullPage,annotations:Z&&C.annotations}),gn=Ke&&et,Ps=ae.Children.count(I)>0,Bo=Me.length>0&&!Ee&&!ot,vn=j?xt?qe.length||Ps||ws||ot&&(G!=null&&G.length)?Ts(j,{annotations:true}):null:Ce||Ke?Le.length||qe.length||Ps||ws||ot&&(G!=null&&G.length)||gn&&j.fullPage?Ts(j,{annotations:true,fullPage:gn}):null:j:null,$o=g&&!xt&&(ot?ot.kind==="audio"&&!Ce&&ke.length>0:true),[Fo,Ml]=H(null),Ze=ot?Fo??ot.placement:null,[Kn,Tl]=H(Fh),Do=yt(()=>{const C=(ot==null?void 0:ot.kind)==="video"&&$t&&Ze?[...ke,{id:ot.id,placement:Ze,width:Ze.width,height:Ze.height,media:{element:$t}}]:ke;return Kn.length?[...C,...Kn]:C},[ke,ot,$t,Ze,Kn]),Is=Ce&&(ot==null?void 0:ot.kind)==="video"&&Fo?Fo:Ft?ds(Ft.placements):null,Pl=JSON.stringify([ke,Is,Do.length!==ke.length&&[ot==null?void 0:ot.id,Ze],Kn.map(C=>C.id)]),Zn=N(null),zo=N(false),Ho=()=>{ot?Es(xt?pe:null):Cs(xt),xt||jn()},Gn=N(null),Il=C=>{if($t&&!xt){$t.currentTime=C;return}Gn.current=C,xt&&Ho()};F(()=>{!$t||Gn.current===null||($t.currentTime=Gn.current,Gn.current=null)},[$t]);const Wo=Array.isArray(s)?s[0]:s,It=[c,(Fs=o==null?void 0:o[0])==null?void 0:Fs.label,Wo==null?void 0:Wo.label].map(C=>_t(C,d)).find(C=>C.text),Ll=yt(()=>{const C=_t(l,d);return C.text&&C.text!==(It==null?void 0:It.text)?C:void 0},[l,d,It==null?void 0:It.text]),Ls=Eo((It==null?void 0:It.text)||E("canvasImage"),It?It.lang:y.langOf("canvasImage"),false,y.hostLanguage),Xn=xt?[]:[...qn?[Lh]:[],...ot?[Ah]:[],...Jt?[Oh]:[]],As=`keys-${J}`,Al=qn&&!xt&&!y.langOf("canvasRoleDescription")?E("canvasRoleDescription"):void 0,Uo=!!vn&&qe.length>0,Ol=Uo&&qe.map((C,Z)=>_t(C.label,d).text?gc(No,Z):null).filter(Boolean).join(" ")||void 0,Os=N({canvases:o,scene:Ft,canvasKey:pe});Os.current={canvases:o,scene:Ft,canvasKey:pe};const Yn=N(null),jo=dt(()=>{const{canvases:C,scene:Z,canvasKey:vt}=Os.current;Yn.current=C&&Z&&Zn.current===vt?{key:vt,canvases:C,placements:Z.placements}:null},[]),Nl=!o||((Ds=Yn.current)==null?void 0:Ds.key)===pe,Ge=fc(()=>{const C=Yn.current,Z=bt.current;if(!C||n==="loading")return null;const vt=$t&&$t.currentTime>0?$t.currentTime:null,Ot=!vt&&Z&&sr(Z)?Ic(Z.getBounds(),C.canvases,C.placements):null,Ut=C.canvases.find(Xe=>Xe.id===(Ot==null?void 0:Ot.canvasId))??C.canvases[0];return Ut?Ir?Ir({manifestId:n,canvasId:Ut.id,type:Ut.type,region:Ot&&{x:Ot.rect.x,y:Ot.rect.y,w:Ot.rect.width,h:Ot.rect.height},time:vt}):(_h().then(()=>Ge()),null):null},M);F(()=>Cr($t,Ge),[$t,Ge]),F(()=>{const C=A.current;if(!C)return;const Z=e(C,Ve.current),vt=sr(Z)?Z:null;bt.current=Z,Lt(Z),Z.setDismiss(jn);const Ot=()=>{if(!vt)return;const jt=vt.viewLimits();Io(me=>me.atMax===jt.atMax&&me.atMin===jt.atMin&&me.atHome===jt.atHome?me:jt)},Ut=Z.on("open",()=>{var jt;Ot(),qo(false),jo(),Ge(),Ct("ready"),ct(me=>me+1),vt&&((jt=qt.current)==null||jt.call(qt,Bh(vt,()=>Yn.current,me=>{var Us,js;const Ws=Un.current.placed.find(Ko=>Ko.id===me);return Ws?(Un.current.select(Ws),(js=Array.from(((Us=vt.overlays)==null?void 0:Us.container.querySelectorAll("[id]"))??[]).find(Ko=>Ko.id===me))==null||js.focus({preventScroll:true}),true):false})))}),Xe=Z.on("change",()=>{Ot(),qo(false),jo(),Ge(),Ct("ready"),ct(jt=>jt+1)}),Zt=Z.on("error",()=>{Z.isOpen||Ct("error")}),Bl=Z.on("unloadable",jt=>we(!!jt)),$l=Z.on("viewport",()=>{var jt;Ot(),vt&&((jt=je.current)==null||jt.call(je,vt.getBounds())),Ge()});return()=>{Ut(),Xe(),Zt(),Bl(),$l(),Z.dispose(),bt.current=null,Lt(null)}},[h,e,jn,jo]),F(()=>{if(!(!At||!Vt))return At.attachNavigator(Vt)},[At,Vt]),F(()=>{if(!(!mt||!Ke))return mt.setGestures({navigable:false}),()=>mt.setGestures({})},[mt,Ke]);const Vo=N(false);F(()=>{var Z;if(gn)return;const C=!document.activeElement||document.activeElement===document.body;Vo.current&&C&&((Z=A.current)==null||Z.focus()),Vo.current=false},[gn]),F(()=>{const C=bt.current;if(xt&&(zo.current=true),!C||!X||xt)return;const Z=Zn.current!==null&&Zn.current!==pe;(!C.isOpen||Z)&&Ct("loading");const vt=Ce||zo.current&&C.isOpen||Z;Zn.current=pe,zo.current=false,C.setImages(Do,{world:Is??void 0,fit:vt})},[Pl,h,$t,X,xt]);const Ns=N(n),[Rl,qo]=H(false);Dt(()=>{var C;n!==Ns.current&&(Ns.current=n,(C=bt.current)==null||C.clear(),qo(true),Ct("loading"))},[n]);const Rs=ft==="loading"&&Do.length>0&&X&&!xt;return f(In.Provider,{value:y.hostLanguage,children:f("figure",{"aria-labelledby":Ol,className:Mt("clover-canvas",p),"data-testid":"clover-canvas","data-status":ft,...Kr(k),"data-unloadable":Xt||void 0,"data-has-navigator":$o,"data-fullscreen":st,"data-exit":it||void 0,"data-controls":bl?_l?"visible":"hidden":void 0,"data-media":wl,"data-recording":ot?"":void 0,"data-player":Ee?"":void 0,"data-animated":Kt?"":void 0,"data-navigable":qn,"data-placeholder":Me.length&&!Ee?xt:void 0,ref:y.ref,onFocus:C=>{Vo.current=gn&&C.target.id===`fullPage-${J}`},onKeyDown:C=>{if(C.key==="Escape"&&Ro&&!C.defaultPrevented){C.preventDefault(),Ss(false);return}if(C.key==="Escape"&&!C.defaultPrevented&&!C.currentTarget.querySelector(".clover-canvas-menu")&&jn()){C.preventDefault();return}of(C,A.current)},style:{position:"relative",width:"100%",height:"100%",margin:0,overflow:"hidden",isolation:"isolate"},children:[(vn||$o)&&ot&&f("div",{className:"clover-canvas-scrim","aria-hidden":"true"}),ks&&f(wt,{fallback:null,children:f(Mh,{element:U,hideDelay:m==null?void 0:m.hideDelay,picture:A,onChange:D})}),f(ih,{hidden:!it}),mt&&(vn||Bo)&&f(Nf,{renderer:At,instance:J,config:vn??Ih,controlButtons:w,limits:Rt,placeholderIsMore:Bo&&!ot,chapters:ot?G:void 0,mediaElement:$t,onChapter:Il,overStill:!!ot&&xt,request:m==null?void 0:m.request,placeholder:Bo&&f(wt,{fallback:null,children:f(Ph,{instance:J,media:!!ot,active:xt,onToggle:Ho,more:!!j&&(j.zoom||j.rotation||j.reset||j.fullPage)})}),fit:!T,more:v,choices:xt?[]:Le,selections:Yt,onSelect:fn,annotations:Pt.menu,hiddenPages:Pt.hiddenPages,onPageVisibilityChange:Pt.setPagesVisible,selectedAnnotation:Pt.selected,onAnnotationSelect:Pt.select,onAnnotationActivate:Pt.activate,captionId:Uo?No:void 0,captionOpen:Ro,onCaptionToggle:()=>xs(C=>!C),placeId:Oe?mn:void 0,placeOpen:q,onPlaceToggle:()=>{ml(true),pt(C=>!C)},language:d,children:vn&&I}),$o&&f("div",{ref:V,className:"clover-canvas-navigator","data-testid":"clover-canvas-navigator","aria-hidden":"true"}),f("div",{ref:A,className:"clover-canvas-viewport",style:{position:"absolute",inset:0,overflow:"hidden",zIndex:-1},"data-testid":"clover-canvas-viewport",role:Jt?"group":"img","aria-roledescription":Al,...Ls.props,"aria-describedby":Xn.length?As:void 0,"aria-keyshortcuts":Xn.map(({keys:C})=>C).join(" ")||void 0,"aria-busy":Rs,tabIndex:0}),Ls.node,Xn.length>0&&f("span",{id:As,style:ze,children:Xn.map(({description:C},Z)=>f(ae.Fragment,{children:[Z>0&&" ",f("span",{...ut(y.langOf(C)),children:E(C)})]},C))}),f(fh,{kind:"image",shown:Xt&&!xt}),Ke&&!xt&&(It==null?void 0:It.text)&&f(hh,{text:It.text,lang:It.lang||void 0}),(ot==null?void 0:ot.kind)==="audio"&&!Ee&&ke.length===0&&!xt&&(It==null?void 0:It.text)&&f("p",{className:"clover-canvas-sound-label","aria-hidden":"true",...ut(It.lang||void 0),children:It.text}),Me.length>0&&!Ee&&f(wt,{fallback:null,children:f(Eh,{instance:J,stills:Me,vertical:he==="top-to-bottom"||he==="bottom-to-top",media:!!ot,active:xt,lingering:ft==="loading"&&!Rl,onToggle:Ho,request:m==null?void 0:m.request})}),mt&&ot&&X&&!xt&&f(wt,{fallback:null,children:f(wh,{media:ot,request:m==null?void 0:m.request,fillable:kl,surface:mt,instance:J,onElement:Sl,onFit:Ml,onCaptionChange:O,caption:Q,navigable:qn,fullscreen:Ce&&!!(j!=null&&j.fullPage),isFullscreen:et,onEnded:nt,chapters:G,highlightedChapter:tt,onChapterHighlight:K,autoPlay:!Ee&&Me.length>0&&Pt.quietlyOpened!==pe,language:d,notes:Pt.timed,marked:Pt.placed,selectedAnnotation:Pt.selected,onAnnotationSelect:Jt?Pt.select:void 0,onAnnotationActivate:Pt.activate,player:Ee&&o?{canvas:o[0],title:It,partOf:Ll}:void 0})}),At&&Kt&&(Ft==null?void 0:Ft.frames[Mn(Kt)])&&!xt&&f(wt,{fallback:null,children:f(Ch,{renderer:At,frames:vl,byFrame:Ft.frames[Mn(Kt)],animationKey:Kt.id,sceneVersion:$,autoplay:(zs=m==null?void 0:m.animation)==null?void 0:zs.autoplay,loop:(Hs=m==null?void 0:m.animation)==null?void 0:Hs.loop,onEnded:nt,language:d,duration:Number(Kt.duration),canvas:Kt,place:Ft.placements[o.indexOf(Kt)],onItems:Tl},Kt.id)}),Ae&&Jt&&_&&f(Ae.AnnotationState,{given:t,annotations:Dn??_,scene:Ft,renderer:At,sceneVersion:$,drawn:Nl,media:ot,mediaElement:$t,showPlaceholder:xt,canvasKey:pe,openImages:Cs,openMedia:Es,host:A,onModel:pn,refind:t.refind??0}),Rs&&f(Sn,{overlay:true}),Wt&&f(wt,{fallback:null,children:f(Bi,{id:`place-of-${J}`,open:Wn,onClose:C=>{var Z;Hn(xe),C&&((Z=document.getElementById(Wt.id))==null||Z.focus())},feature:Wt.feature,name:Wt.name,language:d})}),Oe&&Se&&f(wt,{fallback:null,children:f(Bi,{id:mn,open:q,onClose:C=>{var Z;pt(false),C&&((Z=document.getElementById(`place-${J}`))==null||Z.focus())},feature:Oe.feature,name:Oe.name,language:d})}),Uo&&f(uf,{id:No,canvases:qe,comments:Oo,open:Ro,onClose:Ss,language:d})]})})};function Bh(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(sh(i.canvases[a],i.placements[a],r),s),true)},getCanvasRegion(){const o=e();return o?Ic(t.getBounds(),o.canvases,o.placements):null},get backendKind(){return t.backendKind},get atHome(){return t.isAtHome},fitBounds:(o,r)=>t.fitBounds(o,r),fitItemRect:(o,r,s)=>t.fitItemRect(o,r,s),itemRectToWorld:(o,r)=>t.itemRectToWorld(o,r),getBounds:()=>t.getBounds(),getHomeBounds:()=>t.getHomeBounds(),getCamera:()=>t.getCamera(),home:o=>t.home(o),zoomBy:(o,r,s)=>t.zoomBy(o,r,s),panBy:(o,r,s)=>t.panBy(o,r,s),setRotation:(o,r)=>t.setRotation(o,r),getRotation:()=>t.getRotation(),rotateBy:o=>t.rotateBy(o),worldToScreenPoint:o=>t.worldToScreenPoint(o),screenToWorldPoint:o=>t.screenToWorldPoint(o),on:(o,r)=>t.on(o,r),zoomToAnnotation:n}}const $h=[],Fh=[];function Pc(t,e,n=false){const o=Array.isArray(t)?t:t?[t]:[];return o.length?o.map((s,i)=>{const a=Co(s.service);return!a&&!s.id?null:{id:`${i}:${s.id??a}|${s.region??""}`,service:a,url:s.id,width:s.width,height:s.height,region:s.region}}).filter(s=>s!==null):(Array.isArray(e)?e:e?[e]:[]).filter(Boolean).map((s,i)=>({id:`${i}:${s}`,...n?{service:s}:{url:s}}))}function Ic(t,e,n){let o=null;if(n.forEach((u,h)=>{const p=Math.max(t.x,u.x),m=Math.max(t.y,u.y),g=Math.min(t.x+t.width,u.x+u.width)-p,b=Math.min(t.y+t.height,u.y+u.height)-m;if(g<=0||b<=0)return;const v=g*b;(!o||v>o.area)&&(o={index:h,area:v,clip:{x:p,y:m,width:g,height:b}})}),!o)return null;const{index:r,clip:s}=o,i=e[r],a=n[r],c=cn(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 Dh(t,e,n,o){return yt(()=>((o==null?void 0:o(t??null,(e==null?void 0:e.id)??null,e==null?void 0:e.duration))??[]).map(r=>{const s=_t(r.label,n);return{...r.id?{id:r.id}:{},label:s.text,lang:s.lang,start:r.start,end:r.end,...r.thumbnail?{thumbnail:r.thumbnail}:{}}}),[t,e,n,o])}function zh(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 Hh(t,e){const n=t.store.get().manifest;if(e.canvasId&&Nt(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 Lc(t){if(typeof t=="string")return Fi(t);const e=t;return(e==null?void 0:e.type)==="SpecificResource"?e:typeof(e==null?void 0:e.id)=="string"?Fi(e.id):e}const Fi=t=>t.replace(/\/((?:t|xywh)=[^/#]*)$/,"#$1");function Ac(t){const e=W(t.thumbnail)[0];return e&&typeof e=="object"?{thumbnail:e}:{}}const Di=new WeakMap,zi=[];function Wh(t,e,n){if(!t||!e)return zi;let o=Di.get(t);o||Di.set(t,o=new Map);const r=`${e}|${n??""}`,s=o.get(r);if(s)return s;const i=[],a=new Set,c=d=>{if(!d||a.has(d.id??d))return;a.add(d.id??d);const u=!W(d.behavior).includes("no-nav");for(const h of W(d.items)){if((h==null?void 0:h.type)==="Range"){c(h);continue}if(!u)continue;const p=un(Lc(h));if(p.id.split("#")[0]!==e)continue;const m=ls(p.t);m&&i.push({...d.id?{id:d.id}:{},label:d.label,...m,...Ac(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 h;return{...d,end:d.end??((h=i[u+1])==null?void 0:h.start)??n}}):zi;return o.set(r,l),l}const Hi=new WeakMap,Wi=[];function Uh(t){if(!t)return Wi;const e=Hi.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 w,_;if(!c||o.has(c.id??c))return[];o.add(c.id??c);const l=[],d=[],u=[];let h;for(const x of W(c.items))if((x==null?void 0:x.type)==="Range"){const S=r(x);l.push(...S),S.forEach(M=>d.push(...M.canvasIds))}else{const S=un(Lc(x));if(!S.id)continue;h??(h=S),d.push(S.id),u.push(S)}const p=W(c.behavior);if(p.includes("no-nav"))return l;const m=h??void 0,g={id:c.id??`range-${o.size}`,label:c.label,canvasId:(m==null?void 0:m.id)??((w=l[0])==null?void 0:w.canvasId),canvasIds:[...new Set(d)],...p.includes("sequence")?{sequence:true}:{},...Ac(c),children:l},b=ls(m==null?void 0:m.t);return b?g.time=b:!m&&((_=l[0])!=null&&_.time)&&(g.time=l[0].time),m!=null&&m.rect&&(g.region=m.rect),(p.includes("sequence")&&u.length>1&&!u.some(x=>x.t)||jh(u,n))&&(g.parts=u.map(x=>({canvasId:x.id,...x.rect?{region:x.rect}:{}}))),[g]},s=W(t.structures).flatMap(r),i=s.length===1&&s[0].children.length?s[0].children:s,a=i.length?i:Wi;return Hi.set(t,a),a}function jh(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 ty(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 h=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),h&&i(s,l,d)&&(s=m)}l.children.forEach(p=>a(p,d+1,h))};t.forEach(l=>a(l,0,false));const c=s??r;return c?c.id:null}function Vh(){const t=at(n=>n.status),e=at(n=>n.error);return yt(()=>({status:t,error:e}),[t,e])}function qh(){return at(t=>t.manifest)}function Oc(){return at(t=>Nt(t.manifest))}function fs(){return at(t=>De(t.manifest,t.canvasId))}function Kh(){return at(t=>We(t.manifest,t.canvasId))}function Zh(){const{clover:t}=de("useNavigation"),e=at(o=>On(o.manifest,o.canvasId)),n=at(o=>Nt(o.manifest).views.length);return yt(()=>Dd(t,e,n),[t,e,n])}function Gh(){return at(t=>oc(t.manifest,t.addedSets))}function ey(t){const{language:e}=de("useLocalized");return yt(()=>_t(t,e),[t,e])}function ny(){return Tt().t}function oy(){return Tt().langOf}const Xh=({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:h,...p})=>{const m=de("Canvas"),{clover:g}=m,b=ne(g.captions.subscribe,g.captions.get,g.captions.get),v=s??b,w=d??m.language,_=fs(),{direction:x}=Oc(),S=qh(),M=Kh(),B=at($=>{var ct;return $.status==="loading"?"loading":((ct=$.manifest)==null?void 0:ct.id)??""}),O=at($=>$.target),Q=at($=>rc($.manifest,$.addedSets,$.search.set,$.regions)),nt=at($=>bd($.manifest,$.addedSets,$.hiddenSets,$.shownSets)),G=at($=>ts($.manifest,$.addedSets,$.hiddenSets,$.shownSets)),tt=at($=>$.annotationId),K=N(tt);K.current=tt;const[Y,I]=H(0);F(()=>g.found.subscribe($=>{$&&$===K.current&&I(ct=>ct+1)}),[g]);const E=ne(g.highlight.subscribe,g.highlight.get,g.highlight.get),A=ne(g.chapter.subscribe,g.chapter.get,g.chapter.get),U=_.map($=>$.id).join("|"),rt=yt(()=>{if(u)return u;const $=_.map(ct=>ct.id);return Q.flatMap(ct=>ct.entries.filter(Rt=>$.includes(Rt.canvasId)).map(Rt=>({annotation:Rt.annotation,targetIndex:$.indexOf(Rt.canvasId),pageId:ct.id,...ct.label?{pageLabel:ct.label}:{},...Rt.place?{place:Rt.place}:{},...Rt.layer?{layer:{key:Rt.layer.key,item:Rt.layer.item}}:{}})))},[u,Q,_]),et=O?($=>!!$&&_.some(ct=>ct.id===$))(O.canvasId):false,it=N(null);et&&(it.current=U);const y=a&&it.current!==U,k=N(null),T=N(null),R=yt(()=>_.some($=>ho($).length>0),[_]),z=R?_.find($=>ho($).length>0):void 0,L=Dh(S,z,w,Wh),D=N(R);D.current=R;const X=s===void 0?m.language:void 0,ht=z==null?void 0:z.id;F(()=>{if(!X||!z)return;const $=Sc(z).find(ct=>ct.language&&Ka(ct.language,X));$&&g.captions.get()!==$.id&&g.captions.emit($.id)},[X,ht,g]);const J=dt(()=>{const $=g.store.get().target;!$||!g.store.get().canvasId||zh($,k.current,T.current,D.current)&&g.consumeTarget()},[g]),bt=N(U);F(()=>{bt.current!==U&&(bt.current=U,T.current=null),O&&J()},[O,U,J]);const mt=N(e);mt.current=e;const Lt=dt($=>{var ct;k.current=$,$.on("change",J),J(),(ct=mt.current)==null||ct.call(mt,$)},[J]),At=dt($=>{var Rt;const ct=(Rt=k.current)==null?void 0:Rt.getCanvasRegion();g.viewport.emit(ct?{canvasId:ct.canvasId,region:{x:ct.rect.x,y:ct.rect.y,w:ct.rect.width,h:ct.rect.height}}:null),n==null||n($)},[g,n]),Vt=dt($=>{T.current=$,g.media.emit($),$&&J(),o==null||o($)},[g,J,o]),V=dt(()=>{i==null||i(),(Ne(S,"auto-advance")||Ne(M,"auto-advance"))&&g.next({autoplay:true,wrap:Ne(S,"repeat")})},[g,S,M,i]),j=dt($=>void Hh(g,$),[g]),ft=(t==null?void 0:t.request)??g.request,Ct=Ne(M,"auto-advance")||Ne(S,"auto-advance"),Xt=Ne(M,"repeat")||Ne(S,"repeat"),we=yt(()=>({...t,request:ft,animation:(t==null?void 0:t.animation)??{autoplay:Ct,loop:Xt}}),[t,ft,Ct,Xt]);return _.length?f(Nh,{...p,manifestId:B,navPlace:S==null?void 0:S.navPlace,canvases:_,viewingDirection:x,language:w,label:c??(M==null?void 0:M.label)??(S==null?void 0:S.label),partOf:l??(S==null?void 0:S.label),options:we,placeholder:y,onReady:Lt,onViewportChange:At,onMediaElement:Vt,caption:v,onCaptionChange:$=>{g.captions.emit(($==null?void 0:$.id)??null),r==null||r($)},onEnded:V,annotations:rt,hiddenPages:G,unlistedPages:nt,onPageVisibilityChange:($,ct)=>$.forEach(Rt=>g.setSetVisible(Rt,ct)),chapters:h??L,highlightedChapter:A,onChapterHighlight:$=>g.chapter.emit($),selectedAnnotation:tt,refind:Y,highlightedAnnotation:E,onAnnotationSelect:$=>g.selectAnnotation($),onAnnotationLink:p.onAnnotationLink??j,onAnnotationActive:$=>{var ct;g.highlight.emit($),(ct=p.onAnnotationActive)==null||ct.call(p,$)}}):null},Yh=6,Je=new Set;function Jh(t){if(Je.has(t))return true;for(;Je.size>=Yh;){let e;for(const n of Je)n.hiddenSince!==null&&(!e||n.hiddenSince<e.hiddenSince)&&(e=n);if(!e)return false;Je.delete(e),e.release()}return Je.add(t),true}function Ui(t){Je.delete(t)}function Qh(t){return typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement?t.complete&&t.naturalWidth>0:true}function tp(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 ep=`#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
|
-
`,np=`#version 300 es
|
|
14
|
-
precision highp float;
|
|
15
|
-
in vec2 v_uv;
|
|
16
|
-
uniform sampler2D u_texture;
|
|
17
|
-
uniform float u_opacity;
|
|
18
|
-
out vec4 outColor;
|
|
19
|
-
|
|
20
|
-
void main() {
|
|
21
|
-
outColor = texture(u_texture, v_uv) * u_opacity;
|
|
22
|
-
}
|
|
23
|
-
`;class po{constructor(e,n,o){P(this,"kind","webgl2");P(this,"canvas");P(this,"maxTextureSize");P(this,"gl");P(this,"program",null);P(this,"vao",null);P(this,"uniforms",{matrix:null,crop:null,opacity:null,texture:null});P(this,"textures",new Map);P(this,"cssWidth",1);P(this,"cssHeight",1);P(this,"pixelRatio",1);P(this,"matrixScratch",new Float32Array(9));P(this,"isLost",false);P(this,"callbacks");P(this,"handleLost",()=>{var e2,n2;this.isLost=true,this.textures.clear(),(n2=(e2=this.callbacks).onLost)==null||n2.call(e2)});this.canvas=e,this.gl=n,this.callbacks=o,this.maxTextureSize=n.getParameter(n.MAX_TEXTURE_SIZE)||4096;const r=op(n,ep,np);this.program=r,this.uniforms={matrix:n.getUniformLocation(r,"u_matrix"),crop:n.getUniformLocation(r,"u_crop"),opacity:n.getUniformLocation(r,"u_opacity"),texture:n.getUniformLocation(r,"u_texture")};const s=n.createVertexArray();n.bindVertexArray(s);const i=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,i),n.bufferData(n.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,1,1]),n.STATIC_DRAW);const a=n.getAttribLocation(r,"a_position");n.enableVertexAttribArray(a),n.vertexAttribPointer(a,2,n.FLOAT,false,0,0),n.bindVertexArray(null),this.vao=s,n.enable(n.BLEND),n.blendFunc(n.ONE,n.ONE_MINUS_SRC_ALPHA),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,true),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,false),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,n.BROWSER_DEFAULT_WEBGL),e.addEventListener("webglcontextlost",this.handleLost)}static create(e,n={}){let o=null;try{o=e.getContext("webgl2",{alpha:true,premultipliedAlpha:true,antialias:false,depth:false,stencil:false,preserveDrawingBuffer:false})}catch{o=null}if(!o||typeof o.createShader!="function")return null;try{return new po(e,o,n)}catch{return null}}resize(e,n,o){this.cssWidth=Math.max(1,e),this.cssHeight=Math.max(1,n),this.pixelRatio=o;const r=Math.max(1,Math.round(e*o)),s=Math.max(1,Math.round(n*o));this.canvas.width!==r&&(this.canvas.width=r),this.canvas.height!==s&&(this.canvas.height=s)}begin(){if(this.isLost)return;const e=this.gl;e.viewport(0,0,this.canvas.width,this.canvas.height),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.useProgram(this.program),e.bindVertexArray(this.vao),e.activeTexture(e.TEXTURE0),e.uniform1i(this.uniforms.texture,0)}draw(e){if(this.isLost||!Qh(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=tp(e,this.pixelRatio),i=le(e.transform,oe(r.x,r.y),ce(r.width+s.x,r.height+s.y));return n.uniformMatrix3fv(this.uniforms.matrix,false,vh(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),rp(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 op(t,e,n){const o=ji(t,t.VERTEX_SHADER,e),r=ji(t,t.FRAGMENT_SHADER,n),s=t.createProgram();if(!s)throw new Error("Could not create WebGL program");if(t.attachShader(s,o),t.attachShader(s,r),t.linkProgram(s),t.deleteShader(o),t.deleteShader(r),!t.getProgramParameter(s,t.LINK_STATUS)){const i=t.getProgramInfoLog(s);throw t.deleteProgram(s),new Error(`Could not link WebGL program: ${i}`)}return s}function ji(t,e,n){const o=t.createShader(e);if(!o)throw new Error("Could not create WebGL shader");if(t.shaderSource(o,n),t.compileShader(o),!t.getShaderParameter(o,t.COMPILE_STATUS)){const r=t.getShaderInfoLog(o);throw t.deleteShader(o),new Error(`Could not compile WebGL shader: ${r}`)}return o}function rp(t){return typeof t=="object"&&t!==null&&t.name==="SecurityError"}function Nc(t,e){return le(oe(e.width/2,e.height/2),Nn(t.rotation),ce(t.zoom),oe(-t.x,-t.y))}function Rc(t,e){return le(oe(t.x,t.y),ce(1/t.zoom),Nn(-t.rotation),oe(-e.width/2,-e.height/2))}function Vi(t,e,n){return ve(Rc(t,e),n)}function sp(t,e,n){return ve(Nc(t,e),n)}function Lr(t,e){return Mo(Rc(t,e),{x:0,y:0,width:e.width,height:e.height})}function ip(t,e,n=0,o=0){const r=Mo(Nn(n),t),s=Math.max(1,e.width*(1-o*2)),i=Math.max(1,e.height*(1-o*2)),a=Math.min(s/Math.max(r.width,Number.EPSILON),i/Math.max(r.height,Number.EPSILON)),c=Tc(t);return{x:c.x,y:c.y,zoom:a,rotation:n}}function mo(t,e,n,o,r){const s=ve(le(ce(1/n),Nn(-o)),{x:e.x-r.width/2,y:e.y-r.height/2});return{x:t.x-s.x,y:t.y-s.y}}function qi(t,e){return t.x===e.x&&t.y===e.y&&t.zoom===e.zoom&&t.rotation===e.rotation}const ap=.09,cp=1e-4,Ki=.05,lp=1e-4;class up{constructor(e,n=ap,o){P(this,"current");P(this,"target",null);P(this,"timeConstant");P(this,"spring");P(this,"start");P(this,"elapsed",0);this.current={...e},this.start={...e},this.timeConstant=n,this.spring=o}get destination(){return this.target?{...this.target.state}:{...this.current}}set(e){this.current={...e},this.target=null}animateTo(e,n,o=false){const r=this.spring?this.spring.duration<=0:this.timeConstant===0;if(o||r){this.set(e.state);return}let s=e.anchor;if(s){const i=mo(s.world,s.screen,e.state.zoom,e.state.rotation,n);Math.hypot(i.x-e.state.x,i.y-e.state.y)*e.state.zoom>Ki&&(s=void 0)}this.start={...this.current},this.elapsed=0,this.target={state:{...e.state},anchor:s}}stop(){this.target=null}step(e,n){const o=this.target;if(!o)return false;const r=o.state;let s,i;if(this.spring){this.elapsed+=Math.max(e,0);const u=this.elapsed/this.spring.duration;if(u>=1)return this.current={...r},this.target=null,false;const h=this.spring.stiffness;s=this.start,i=(1-Math.exp(-h*u))/(1-Math.exp(-h))}else s=this.current,i=1-Math.exp(-Math.max(e,0)/this.timeConstant);const a=Math.exp(Math.log(s.zoom)+(Math.log(r.zoom)-Math.log(s.zoom))*i),c=s.rotation+(r.rotation-s.rotation)*i,l=o.anchor?mo(o.anchor.world,o.anchor.screen,a,c,n):{x:s.x+(r.x-s.x)*i,y:s.y+(r.y-s.y)*i};return this.current={x:l.x,y:l.y,zoom:a,rotation:c},this.spring?true:Math.abs(Math.log(r.zoom/a))<cp&&Math.abs(r.rotation-c)<lp&&Math.hypot(r.x-l.x,r.y-l.y)*a<Ki?(this.current={...r},this.target=null,false):true}}const Bc=5,Zi=300,dp=Bc*4;function Gi(t,e=false){return t==="touch"||t==="pen"&&!e}function fp(t){return t.pointerType==="pen"&&t.buttons===0}function hp(t,e,n){for(let o=t;o&&o!==e;o=o.parentElement)if((n>0?o.scrollHeight-o.clientHeight-o.scrollTop:o.scrollTop)>=1&&/auto|scroll/.test(getComputedStyle(o).overflowY))return true;return false}function Xi(t,e){var o;let n=t;for(;n&&n!==e;){if(n instanceof HTMLButtonElement||n instanceof HTMLAnchorElement||n instanceof HTMLInputElement||n instanceof HTMLLabelElement||n instanceof HTMLSelectElement||((o=n.dataset)==null?void 0:o.cloverCanvasInteractive)!==void 0)return true;n=n.parentElement}return false}const Ar={clickToZoom:true,dblClickToZoom:true,pinchToZoom:true,scrollToZoom:false,navigable:true,flickEnabled:true,flickMinSpeed:200,flickMomentum:.25},ir=2,Yi=1.5,Ji=.1,pp=100,mp=.002,gp=.01;class vp{constructor(e,n,o=Ar){P(this,"pointers",new Map);P(this,"samples",[]);P(this,"down",null);P(this,"pinch",null);P(this,"lastTap",null);P(this,"lastPointerType","");P(this,"penHovers",false);P(this,"onPointerDown",e2=>{var o2,r;if(this.lastPointerType=e2.pointerType,e2.pointerType==="mouse"&&e2.button!==0||Xi(e2.target,this.element))return;(r=(o2=this.element).setPointerCapture)==null||r.call(o2,e2.pointerId);const n2=this.local(e2);this.pointers.set(e2.pointerId,n2),this.pointers.size===1?(this.down={x:n2.x,y:n2.y,t:e2.timeStamp,moved:false},this.samples=[{x:n2.x,y:n2.y,t:e2.timeStamp}],this.target.setInteracting(true)):this.pointers.size===2&&(this.pinch=this.pinchState(),this.down&&(this.down.moved=true))});P(this,"onPointerMove",e2=>{var r;fp(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)>Bc&&(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}});P(this,"onPointerUp",e2=>{var c,l,d,u,h,p;if(!this.pointers.has(e2.pointerId))return;if(this.pointers.delete(e2.pointerId),(l=(c=this.element).releasePointerCapture)==null||l.call(c,e2.pointerId),this.pointers.size===1){this.pinch=null;const[m]=this.pointers.values();this.samples=[{...m,t:e2.timeStamp}];return}if(this.pointers.size>0)return;const n2=this.down;if(this.down=null,this.pinch=null,this.target.setInteracting(false),!n2)return;const o2=this.local(e2);if(!n2.moved&&e2.type==="pointerup"&&e2.timeStamp-n2.t<Zi){if((u=(d=this.target).dismiss)!=null&&u.call(d)){this.lastTap=null;return}if(Gi(e2.pointerType,this.penHovers)){const m=this.lastTap;this.options.navigable&&(this.options.clickToZoom||this.options.dblClickToZoom)&&m&&e2.timeStamp-m.t<Zi&&Math.hypot(o2.x-m.x,o2.y-m.y)<dp?(this.lastTap=null,this.zoomIn(o2)):this.lastTap={x:o2.x,y:o2.y,t:e2.timeStamp};return}this.options.clickToZoom&&this.options.navigable?e2.shiftKey?this.target.zoomBy(1/ir,o2,true):this.zoomIn(o2):(p=(h=this.target).tap)==null||p.call(h,o2);return}if(!this.options.navigable||!this.tracksPointer(e2.pointerType))return;const s=this.samples[0],i=this.samples[this.samples.length-1],a=((i==null?void 0:i.t)??0)-((s==null?void 0:s.t)??0);if(s&&i&&a>0&&e2.timeStamp-i.t<50){const m=(i.x-s.x)/a*1e3,g=(i.y-s.y)/a*1e3,b=this.options.flickMomentum;b>0&&Math.hypot(m,g)>this.options.flickMinSpeed&&this.target.panBy(m*b,g*b,true)}});P(this,"onDoubleClick",e2=>{this.options.navigable&&(this.options.clickToZoom||!this.options.dblClickToZoom||Gi(this.lastPointerType,this.penHovers)||Xi(e2.target,this.element)||(e2.shiftKey?this.target.zoomBy(1/ir,this.local(e2),true):this.zoomIn(this.local(e2))))});P(this,"onWheel",e2=>{const n2=e2.ctrlKey;if(!this.options.navigable||!n2&&!this.options.scrollToZoom||!n2&&hp(e2.target,this.element,e2.deltaY))return;e2.preventDefault();const o2=yp(e2),r=n2?gp:mp;this.target.zoomBy(Math.exp(-o2*r),this.local(e2),!n2)});P(this,"onKeyDown",e2=>{if(e2.target!==this.element||!this.options.navigable||e2.altKey||e2.metaKey||e2.ctrlKey)return;const n2=this.element.getBoundingClientRect(),o2=n2.width*Ji*(e2.shiftKey?3:1),r=n2.height*Ji*(e2.shiftKey?3:1);switch(e2.key){case"ArrowLeft":this.target.panBy(o2,0,true);break;case"ArrowRight":this.target.panBy(-o2,0,true);break;case"ArrowUp":this.target.panBy(0,r,true);break;case"ArrowDown":this.target.panBy(0,-r,true);break;case"+":case"=":this.target.zoomBy(Yi,void 0,true);break;case"-":case"_":this.target.zoomBy(1/Yi,void 0,true);break;case"0":this.target.home();break;case"r":this.target.rotateBy(90);break;case"R":this.target.rotateBy(-90);break;default:return}e2.preventDefault()});this.element=e,this.target=n,this.options=o,e.addEventListener("pointerdown",this.onPointerDown),e.addEventListener("pointermove",this.onPointerMove),e.addEventListener("pointerup",this.onPointerUp),e.addEventListener("pointercancel",this.onPointerUp),e.addEventListener("dblclick",this.onDoubleClick),e.addEventListener("wheel",this.onWheel,{passive:false}),e.addEventListener("keydown",this.onKeyDown)}setOptions(e){this.options=e}dispose(){const e=this.element;e.removeEventListener("pointerdown",this.onPointerDown),e.removeEventListener("pointermove",this.onPointerMove),e.removeEventListener("pointerup",this.onPointerUp),e.removeEventListener("pointercancel",this.onPointerUp),e.removeEventListener("dblclick",this.onDoubleClick),e.removeEventListener("wheel",this.onWheel),e.removeEventListener("keydown",this.onKeyDown)}local(e){const n=this.element.getBoundingClientRect();return{x:e.clientX-n.left,y:e.clientY-n.top}}zoomIn(e){var n,o;(o=(n=this.target).atMaxZoom)!=null&&o.call(n)?this.target.home():this.target.zoomBy(ir,e,true)}tracksPointer(e){return e==="touch"||this.options.flickEnabled}pinchState(){const[e,n]=[...this.pointers.values()];return{distance:Math.hypot(n.x-e.x,n.y-e.y),mid:{x:(e.x+n.x)/2,y:(e.y+n.y)/2}}}}function yp(t){return t.deltaMode===1?t.deltaY*16:t.deltaMode===2?t.deltaY*400:t.deltaY}class $c extends Error{constructor(e,n,o){super(e),this.url=n,this.status=o,this.name="ImageLoadError"}}const Qi=new Set;async function bp(t,e={}){const{signal:n,maxTextureSize:o,request:r}=e,s=Sd(r),i=wp(t);if(typeof createImageBitmap!="function"||typeof fetch!="function")return ar(t,{signal:n,cors:true,withCredentials:s});if(i&&Qi.has(i))return ar(t,{signal:n,cors:false,withCredentials:s});let a;try{a=await ns(r,t,{mode:"cors",signal:n})}catch(h){if(xp(h,n))throw h;const p=await ar(t,{signal:n,cors:false,withCredentials:s});return i&&Qi.add(i),p}if(!a.ok)throw new $c(`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 h=o/Math.max(l.width,l.height),p=await createImageBitmap(l,{resizeWidth:Math.max(1,Math.floor(l.width*h)),resizeHeight:Math.max(1,Math.floor(l.height*h)),resizeQuality:"high"});l.close(),l=p}if(n!=null&&n.aborted)throw l.close(),Or();return{kind:"bitmap",source:l,width:l.width,height:l.height,naturalWidth: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 ar(t,{signal:e,cors:n,withCredentials:o}){return new Promise((r,s)=>{if(e!=null&&e.aborted){s(Or());return}const i=new Image;i.decoding="async",n&&(i.crossOrigin=o?"use-credentials":"anonymous");const a=()=>{i.onload=null,i.onerror=null,e==null||e.removeEventListener("abort",c)},c=()=>{a(),i.src="",s(Or())};e==null||e.addEventListener("abort",c),i.onload=()=>{a();const l=()=>r({kind:"element",source:i,width:i.naturalWidth,height:i.naturalHeight,naturalWidth:i.naturalWidth,naturalHeight:i.naturalHeight,opaque:!n});typeof i.decode=="function"?i.decode().then(l,l):l()},i.onerror=()=>{a(),s(new $c("Image failed to load",t))},i.src=t})}function wp(t){var e;try{return new URL(t,(e=globalThis.location)==null?void 0:e.href).origin}catch{return null}}function xp(t,e){return!!(e!=null&&e.aborted)||typeof t=="object"&&t!==null&&t.name==="AbortError"}function Or(){const t=new Error("Aborted");return t.name="AbortError",t}function ta(t){t.kind==="bitmap"&&t.source.close()}const Sp=192*1024*1024,kp=6,Cp=2;class Ep{constructor(e){P(this,"entries",new Map);P(this,"inFlight",0);P(this,"frame",0);P(this,"bytes",0);P(this,"wanted",[]);P(this,"disposed",false);P(this,"budget");P(this,"maxInFlight");this.options=e,this.budget=e.byteBudget??Sp,this.maxInFlight=e.maxInFlight??kp}get(e){const n=this.entries.get(e);if((n==null?void 0:n.state)==="ready")return n.lastUsed=this.frame,n.image}has(e){var n;return((n=this.entries.get(e))==null?void 0:n.state)==="ready"}failed(e){var n;return((n=this.entries.get(e))==null?void 0:n.state)==="failed"}get byteSize(){return this.bytes}get pending(){return this.inFlight}seed(e,n){var r;const o=this.entries.get(e);(o==null?void 0:o.state)!=="ready"&&((r=o==null?void 0:o.controller)==null||r.abort(),this.entries.set(e,{url:e,state:"ready",image:n,bytes:cr(n),lastUsed:this.frame,attempts:0,pinned:false,waiters:(o==null?void 0:o.waiters)??[]}),this.bytes+=cr(n),this.flushWaiters(e))}prefetch(e){return Promise.all(e.map(n=>new Promise(o=>{const r=this.entries.get(n.url);if(r&&r.state!=="loading")return o();if(r){r.waiters.push(o);return}this.start({...n,priority:-1},o)}))).then(()=>{})}update(e){if(this.disposed)return;this.frame++;const n=new Set(e.map(o=>o.url));this.wanted=[...e].sort((o,r)=>o.priority-r.priority);for(const o of this.entries.values())o.state==="loading"&&!o.pinned&&!n.has(o.url)&&o.controller&&(o.controller.abort(),this.entries.delete(o.url),this.inFlight--);for(const o of this.wanted){const r=this.entries.get(o.url);r&&(r.lastUsed=this.frame)}this.pump(),this.evict(n)}dispose(){var e;this.disposed=true;for(const n of this.entries.values())(e=n.controller)==null||e.abort(),this.flushWaiters(n.url);this.entries.clear(),this.bytes=0}forEachReady(e){for(const n of this.entries.values())n.state==="ready"&&n.image&&e(n.url,n.image)}pump(){for(const e of this.wanted){if(this.inFlight>=this.maxInFlight)break;this.entries.has(e.url)||this.start(e)}}start(e,n){const o=new AbortController,r={url:e.url,state:"loading",bytes:0,lastUsed:this.frame,attempts:0,controller:o,pinned:!!n,waiters:n?[n]:[]};this.entries.set(e.url,r),this.inFlight++,this.attempt(r,e,o,e.url)}attempt(e,n,o,r){e.attempts++,this.options.load(r,o.signal).then(s=>{if(this.disposed||this.entries.get(e.url)!==e){ta(s);return}e.state="ready",e.image=s,e.bytes=cr(s),e.controller=void 0,e.pinned=false,this.bytes+=e.bytes,this.settle(e)},s=>{if(!(o.signal.aborted||this.disposed)&&this.entries.get(e.url)===e){if(e.attempts<Cp&&!Mp(s,n)){this.attempt(e,n,o,n.fallbackUrl??n.url);return}e.state="failed",e.controller=void 0,e.pinned=false,this.settle(e)}})}settle(e){this.inFlight--,this.flushWaiters(e.url),this.options.onSettled(),this.pump()}flushWaiters(e){const n=this.entries.get(e);if(!n)return;const o=n.waiters;n.waiters=[],o.forEach(r=>r())}evict(e){if(this.bytes<=this.budget)return;const n=[...this.entries.values()].filter(o=>o.state==="ready"&&!e.has(o.url)).sort((o,r)=>o.lastUsed-r.lastUsed);for(const o of n){if(this.bytes<=this.budget)break;this.entries.delete(o.url),this.bytes-=o.bytes,o.image&&ta(o.image),this.options.onEvict(o.url)}}}function cr(t){return t.width*t.height*4}function Mp(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 Tp=.1;class Pp{constructor(e,n=r=>requestAnimationFrame(r),o=r=>cancelAnimationFrame(r)){P(this,"handle",0);P(this,"last",0);P(this,"disposed",false);P(this,"frame",e2=>{if(this.handle=0,this.disposed)return;const n2=this.last?Math.min((e2-this.last)/1e3,Tp):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 Ip=2*1024*1024;function Lp(t,e,n=Ip){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 Ap(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 Op(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),h=Math.min(e,i+c),p=Math.min(n,a+l);return h<=d||p<=u?null:{x:d,y:u,width:h-d,height:p-u}}const lr=512,Np=16e6;function Fc(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 Rp(t){const{width:e,height:n}=t,o=[],r=t.regionByPx&&t.sizeByW,s=(h,p,m)=>{const g=Math.ceil(e/h),b=Math.ceil(n/h);return{scaleFactor:h,width:g,height:b,tileWidth:p,tileHeight:m,cols:Math.ceil(g/p),rows:Math.ceil(b/m)}},i=(h,p)=>({scaleFactor:e/h,width:h,height:p,tileWidth:h,tileHeight:p,cols:1,rows:1,whole:true}),a=t.tiles[0];if(a)for(const h of a.scaleFactors)o.push(s(h,a.width,a.height));else if(r)for(let h=1;;h*=2){const p=s(h,lr,lr);if(o.push(p),p.cols===1&&p.rows===1)break}const c=Math.max(0,...o.map(h=>h.scaleFactor));for(const h of t.sizes){const p=e/h.width;Bp(t,h.width,h.height)&&p>c+1e-9&&o.push(i(h.width,h.height))}const l=o.reduce((h,p)=>!h||p.scaleFactor>h.scaleFactor?p:h,null);if(l&&l.cols*l.rows>1&&t.sizeByW){const h=Math.max(e,n)/lr;o.push(i(Math.ceil(e/h),Math.ceil(n/h)))}(!o.length||!a&&!r&&e*n<=Np)&&(o.some(h=>h.scaleFactor===1)||o.push(i(e,n)));const d=$p(o).sort((h,p)=>p.scaleFactor-h.scaleFactor),u=Hf(t);return{width:e,height:n,levels:d,tile(h){const p=d[h.level],m=p.scaleFactor,g=p.cols===1&&p.rows===1;let b,v,w;if(g)b={x:0,y:0,width:e,height:n},v=p.width,w=p.height;else{const _=Math.round(h.col*p.tileWidth*m),x=Math.round(h.row*p.tileHeight*m);b={x:_,y:x,width:Math.min(Math.round(p.tileWidth*m),e-_),height:Math.min(Math.round(p.tileHeight*m),n-x)},v=Math.ceil(b.width/m),w=Math.ceil(b.height/m)}return{...h,region:b,url:uo(t,b,v,w),fallbackUrl:u?uo(t,b,v,w,u):void 0}}}}function Bp(t,e,n){return!(t.maxWidth&&e>t.maxWidth||t.maxHeight&&n>t.maxHeight||t.maxArea&&e*n>t.maxArea)}function $p(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 Fp(t,e){const n=t.levels;for(let o=0;o<n.length;o++)if(n[o].scaleFactor<=e*(1+1e-6))return o;return n.length-1}function Te(t,e,n){const o=t.levels[e],r=o.tileWidth*o.scaleFactor,s=o.tileHeight*o.scaleFactor,i=Math.max(0,n.x),a=Math.max(0,n.y),c=Math.min(t.width,n.x+n.width),l=Math.min(t.height,n.y+n.height);if(c<=i||l<=a)return[];const d=Math.max(0,Math.floor(i/r)),u=Math.min(o.cols-1,Math.floor((c-1e-9)/r)),h=Math.max(0,Math.floor(a/s)),p=Math.min(o.rows-1,Math.floor((l-1e-9)/s)),m=[];for(let g=h;g<=p;g++)for(let b=d;b<=u;b++)m.push({level:e,col:b,row:g});return m}async function Dp(t,e){if(t.media)return zp(t,t.media);let n=null,o=null;if(t.service)try{n=Rp(await cs(t.service,e.infoOptions))}catch(h){o=h}if(!n){if(!t.url)throw o??new Error("Image has no source");const h=await e.loadStatic(t.url);e.cache.seed(t.url,h),n=Fc(t.url,h.naturalWidth,h.naturalHeight)}const r=t.width&&t.height&&t.width>0&&t.height>0?{width:t.width,height:t.height}:{width:n.width,height:n.height},s=Op(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=Ap(t.rotation),d=l?Hp(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(Te(n,0,c).map(h=>{const p=n.tile(h);return{url:p.url,fallbackUrl:p.fallbackUrl}})),u}const Dc="media:";function zp(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=`${Dc}${t.id}`,s={width:n,height:o},i={x:0,y:0,width:n,height:o};return{id:t.id,spec:t,pyramid:Fc(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 Hp(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=le(oe(a/2,c/2),{a:s,b:i,c:-i,d:s,e:0,f:0},ce(n?-1:1,1),oe(-(t.x+t.width/2),-(t.y+t.height/2)));return{orient:l,unorient:gh(l),width:a,height:c}}function zc(t){var e;return((e=t.turn)==null?void 0:e.orient)??oe(-t.clip.x,-t.clip.y)}function Wp(t,e){const{turn:n,clip:o}=t;if(!n)return{...e,x:o.x+e.x,y:o.y+e.y};const r=Mo(n.unorient,e),s=Math.max(r.x,o.x),i=Math.max(r.y,o.y);return{x:s,y:i,width:Math.max(0,Math.min(r.x+r.width,o.x+o.width)-s),height:Math.max(0,Math.min(r.y+r.height,o.y+o.height)-i)}}function Up(t,e){const{turn:n,clip:o}=t;return n?ve(n.unorient,e):{x:o.x+e.x,y:o.y+e.y}}function ea(t){const{turn:e,clip:n,contentClip:o}=t;return e?{width:e.width*o.width/n.width,height:e.height*o.height/n.height}:o}function jp(t){if(!t.length)return null;if(t.every(o=>o.spec.placement)){for(const o of t)o.rect={...o.spec.placement};return ds(t.map(o=>o.rect))}const e=ea(t[0]).height;let n=0;for(const o of t){const r=ea(o),s=r.width*e/r.height;o.rect={x:n,y:0,width:s,height:e},n+=s}return{x:0,y:0,width:n,height:e}}function To(t){const e=t.turn??t.clip;return{x:t.rect.width/e.width,y:t.rect.height/e.height}}function Vp(t){const e=To(t);return le(oe(t.rect.x,t.rect.y),ce(e.x,e.y),zc(t))}function qp(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 Kp=1e7,Zp=15e6,Gp=2e7,Xp=2;function Yp(t){const{items:e,camera:n,viewport:o,pixelRatio:r,getTile:s,destination:i}=t,a=Nc(n,o),c=[],l=[],d=[],u=(h,p,m)=>{const g=h.tile(p);l.push({url:g.url,fallbackUrl:g.fallbackUrl,priority:m})};for(const h of e){const{pyramid:p,clip:m,rect:g}=h,b=To(h);if(t.wantOverview)for(const K of Te(p,0,m))u(p,K,Gp);const v=na(h,n,o,r),w=i?na(h,i,o,r):v;if(d.push((v==null?void 0:v.target)??-1),!v&&!w)continue;const _=K=>Y=>{const I=p.tile(Y).region;return Math.hypot(I.x+I.width/2-K.x,I.y+I.height/2-K.y)};if(w){const K=_(w.center);for(const Y of Te(p,0,w.area))u(p,Y,K(Y)/1e3);if(w.target>0)for(const Y of Te(p,w.target,w.area))u(p,Y,Kp+K(Y))}if(!v)continue;const{area:x,target:S}=v,M=_(v.center),B=Te(p,0,x),O=S===0?[]:Te(p,S,x);if(w!==v){for(const Y of B)u(p,Y,M(Y)/1e3);const K=S-Xp;if(K>0)for(const Y of Te(p,K,x))u(p,Y,Zp+M(Y))}if(h.spec.hidden)continue;const G=(S===0?B:O).every(K=>s(p.tile(K).url)!==void 0)?[S]:Array.from({length:S+1},(K,Y)=>Y),tt=le(a,oe(g.x,g.y),ce(b.x,b.y),zc(h));for(const K of G){const Y=K===0?B:K===S?O:Te(p,K,x),I=p.levels[K].cols*p.levels[K].rows>1;for(const E of Y){const A=p.tile(E),U=s(A.url);if(!U)continue;const rt=Jp(h,A.region,U,tt,I);rt&&c.push({...rt,url:A.url})}}}return l.sort((h,p)=>h.priority-p.priority),{draws:c,wants:Qp(l),levels:d}}function na(t,e,n,o){const{pyramid:r,rect:s}=t,i=Lr(e,n);if(!bh(i,s))return null;const a=To(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),h=1/(a.x*e.zoom*o);return{area:Wp(t,{x:(c-s.x)/a.x,y:(l-s.y)/a.y,width:(d-c)/a.x,height:(u-l)/a.y}),center:Up(t,{x:(e.x-s.x)/a.x,y:(e.y-s.y)/a.y}),target:Fp(r,h)}}function Jp(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,h=1e-6;return{item:t,image:n,transform:le(o,oe(e.x,e.y),ce(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-h,bottom:r&&l<s.y+s.height-h}}}function Qp(t){const e=new Set;return t.filter(n=>e.has(n.url)?false:(e.add(n.url),true))}const tm={maxZoomPixelRatio:1.1,minZoomImageRatio:.9,animationTime:.09,animationDuration:void 0,springStiffness:6.5,constrainDuringPan:true,request:void 0,byteBudget:192*1024*1024,maxInFlight:6,releaseAfterMs:2e3},em=2,nm=3,om=.1,ur=1e-6,Nr={top:0,right:0,bottom:0,left:0};function oa(t,e="padding"){if(!t||typeof getComputedStyle!="function")return Nr;const n=getComputedStyle(t),o=r=>parseFloat(n.getPropertyValue(`${e}-${r}`))||0;return{top:o("top"),right:o("right"),bottom:o("bottom"),left:o("left")}}const rm=(t,e)=>t.top===e.top&&t.right===e.right&&t.bottom===e.bottom&&t.left===e.left;let sm;class im{constructor(e,n={}){P(this,"host");P(this,"overlays",null);P(this,"options");P(this,"backend",null);P(this,"backendPreference");P(this,"contextLosses",0);P(this,"holder",{hiddenSince:null,release:()=>this.giveBack()});P(this,"visible",true);P(this,"dom",null);P(this,"domAsked",false);P(this,"pending",null);P(this,"camera");P(this,"loop");P(this,"gestures");P(this,"gestureOptions",{});P(this,"cache");P(this,"navigator",null);P(this,"navigatorAsked",0);P(this,"viewport",{width:1,height:1});P(this,"inset",Nr);P(this,"pixelRatio",1);P(this,"items",[]);P(this,"worldBounds",null);P(this,"contentVersion",0);P(this,"opaqueUrls",new Set);P(this,"mediaByKey",new Map);P(this,"detachMedia",[]);P(this,"opened",false);P(this,"atHome",true);P(this,"interacting",false);P(this,"lastEmitted",null);P(this,"generation",0);P(this,"listeners",new Map);P(this,"unloadable",false);P(this,"resizeObserver",null);P(this,"intersectionObserver",null);P(this,"releaseTimer",null);P(this,"dprQuery",null);P(this,"disposed",false);P(this,"dismisser",null);P(this,"tick",e2=>{var c,l;if(this.disposed)return false;const n2=this.camera.step(e2,this.viewport),o2=this.camera.current,r2=this.backend,s=Lp(this.getTile,d=>r2?r2.has(d):true),i=Yp({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(Dc));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,Lr(o2,this.viewport),this.pixelRatio,this.getTile,this.contentVersion),(!this.lastEmitted||!qi(this.lastEmitted,o2))&&(this.lastEmitted={...o2},this.opened&&this.emit("viewport")),n2||s.deferred});P(this,"getTile",e2=>this.mediaByKey.get(e2)??this.cache.get(e2));P(this,"onContextLost",()=>{this.contextLosses+=1,this.releaseBackend(),this.visible?this.acquireBackend(false):this.host.dataset.backend="released"});P(this,"onPixelRatioChange",()=>{this.measure(),this.watchPixelRatio()});this.host=e,this.backendPreference=n.backend??"auto",this.options={...tm,...dr(n)},sa()&&(this.options.animationTime=0,this.options.animationDuration!==void 0&&(this.options.animationDuration=0));const{animationDuration:o,springStiffness:r}=this.options;this.camera=new up({x:0,y:0,zoom:1,rotation:0},this.options.animationTime,o===void 0?void 0:{duration:o,stiffness:r}),this.loop=new Pp(this.tick),this.gestureOptions=dr(n.gestures??{}),sa()&&(this.gestureOptions.flickMomentum=0),this.gestures=new vp(e,this,{...Ar,...this.gestureOptions}),this.cache=new Ep({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=am(e),this.visible?this.acquireBackend():this.holder.hiddenSince=ra(),this.measure(),this.observe()}get backendKind(){var e;return((e=this.backend)==null?void 0:e.kind)??"none"}get isOpen(){return this.opened}get isAtHome(){return this.atHome}on(e,n){let o=this.listeners.get(e);return o||(o=new Set,this.listeners.set(e,o)),o.add(n),()=>o==null?void 0:o.delete(n)}async setImages(e,{world:n,fit:o=false}={}){const r=++this.generation,s=new Map(this.items.map(d=>[d.id,d])),i=await Promise.allSettled(e.map(d=>{const u=s.get(d.id);return u&&qp(u.spec,d)?(u.spec=d,Promise.resolve(u)):Dp(d,{cache:this.cache,loadStatic:h=>this.loadTile(h),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=jp(a);if(this.worldBounds=n?l?ds([n,l]):n:l,this.contentVersion++,c.length&&this.emit("error",c),this.setUnloadable(e.length>0&&!a.length&&c.length>0),!this.worldBounds){this.invalidate();return}this.opened?o?(this.home(true),this.emit("change")):(this.camera.set(this.constrain(this.camera.current)),this.emit("change")):(this.opened=true,this.home(true),this.emit("open")),this.invalidate()}clear(){this.setUnloadable(false),this.generation++,this.items=[],this.watchMedia([]),this.worldBounds=null,this.contentVersion++,this.invalidate()}setHidden(e){const n=new Set(e);let o=false;for(const r of this.items){const s=n.has(r.id);!!r.spec.hidden!==s&&(r.spec={...r.spec,hidden:s},o=true)}o&&this.invalidate()}isReady(e){const n=this.items.find(r=>r.id===e);if(!n)return false;if(n.spec.media)return true;const o=n.pyramid.levels[0];if(!o)return false;for(let r=0;r<o.rows;r++)for(let s=0;s<o.cols;s++)if(!this.getTile(n.pyramid.tile({level:0,col:s,row:r}).url))return false;return true}fitBounds(e,n=false,o=Nr){const r=this.fit(e,this.camera.destination.rotation,o);this.atHome=false,this.animateTo(this.constrain(r,{allowBeyondLimits:true}),n)}fit(e,n,{top:o,right:r,bottom:s,left:i}){const{width:a,height:c}=this.viewport,{zoom:l}=ip(e,{width:Math.max(1,a-i-r),height:Math.max(1,c-o-s)},n);return{...mo(Tc(e),{x:(a+i-r)/2,y:(c+o-s)/2},l,n,this.viewport),zoom:l,rotation:n}}fitItemRect(e,n,o=false){const r=this.itemRectToWorld(e,n);r&&this.fitAnnotation(r,o)}fitAnnotation(e,n=false){var s;const o=this.items[0];if(!o)return;const r=o.rect.width*om;this.fitBounds({x:e.x-r,y:e.y-r,width:e.width+r*2,height:e.height+r*2},n,oa((s=this.overlays)==null?void 0:s.container,"scroll-padding"))}getBounds(){return Lr(this.camera.current,this.viewport)}getHomeBounds(){return this.worldBounds?{...this.worldBounds}:null}getCamera(){return{...this.camera.current}}getZoomLimits(){var o;const e=((o=this.homeCamera())==null?void 0:o.zoom)??1,n=this.items.length?Math.min(...this.items.map(r=>To(r).x)):1;return{home:e,min:e*this.options.minZoomImageRatio,max:Math.max(e,this.options.maxZoomPixelRatio/n)}}home(e=false){const n=this.homeCamera();if(!n)return;const o=this.atHome;this.atHome=true,this.animateTo(n,e),!o&&this.opened&&this.emit("viewport")}atMaxZoom(){return this.camera.destination.zoom>=this.getZoomLimits().max*(1-ur)}viewLimits(){const{zoom:e,x:n,y:o,rotation:r}=this.camera.destination,{min:s,max:i}=this.getZoomLimits(),a=this.atHome?this.homeCamera():null;return{atMax:e>=i*(1-ur),atMin:e<=s*(1+ur),atHome:this.atHome&&(!a||Math.abs(e/a.zoom-1)<.001&&Math.hypot(n-a.x,o-a.y)*e<.5&&Math.abs(r-a.rotation)<.001)}}zoomBy(e,n,o=true){const r=o?this.camera.destination:this.camera.current,s=n??{x:this.viewport.width/2,y:this.viewport.height/2},i=Vi(r,this.viewport,s),{min:a,max:c}=this.getZoomLimits(),l=yn(r.zoom*e,a,c),d=mo(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=ve(le(ce(1/r.zoom),Nn(-r.rotation)),{x:e,y:n}),i=this.constrain({...r,x:r.x-s.x,y:r.y-s.y});this.atHome=false,o?this.camera.animateTo({state:i},this.viewport):this.camera.set(i),this.invalidate()}panTo(e,n=false){const o=n?this.camera.current:this.camera.destination;this.atHome=false,this.animateTo(this.constrain({...o,...e}),n)}rotateBy(e){const n=this.camera.destination;this.setRotation(n.rotation*180/Math.PI+e)}setRotation(e,n=false){const o=this.camera.destination,r=e*Math.PI/180;this.animateTo(this.constrain({...o,rotation:r}),n)}getRotation(){return this.camera.destination.rotation*180/Math.PI}tap(e){this.emit("tap",e)}setDismiss(e){this.dismisser=e}dismiss(){var e;return((e=this.dismisser)==null?void 0:e.call(this))??false}setGestures(e){this.gestures.setOptions({...Ar,...this.gestureOptions,...dr(e)})}setInteracting(e){if(this.interacting=e,e){this.camera.stop();return}if(this.options.constrainDuringPan)return;const n=this.camera.destination,o=this.constrain(n);qi(n,o)||this.animateTo(o,false)}worldToScreenPoint(e){return sp(this.camera.current,this.viewport,e)}screenToWorldPoint(e){return Vi(this.camera.current,this.viewport,e)}itemRectToWorld(e,n){const o=this.items[e];if(!o)return null;const{contentClip:r,clip:s}=o;if(o.turn)return Mo(le(Vp(o),ce(s.width/r.width,s.height/r.height)),n);const i=o.rect.width/r.width,a=o.rect.height/r.height;return{x:o.rect.x+(n.x-r.x)*i,y:o.rect.y+(n.y-r.y)*a,width:n.width*i,height:n.height*a}}attachNavigator(e){var s;(s=this.navigator)==null||s.dispose(),this.navigator=null;const n=++this.navigatorAsked;let o=null,r=false;return import("./Navigator-sEfTvK-l.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-BW2A4z82.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 po?this.backend.maxTextureSize:void 0})}animateTo(e,n){this.camera.animateTo({state:e},this.viewport,n),this.invalidate()}homeCamera(){if(!this.worldBounds)return null;const e=2*Math.PI,n=Math.round(this.camera.destination.rotation/e)*e||0;return this.fit(this.worldBounds,n,this.inset)}constrain(e,{allowBeyondLimits:n=false}={}){const o=this.worldBounds;if(!o)return e;const{min:r,max:s}=this.getZoomLimits(),i=n?yn(e.zoom,r,Math.max(s,e.zoom)):yn(e.zoom,r,s);return this.interacting&&!this.options.constrainDuringPan?{...e,zoom:i}:{...e,zoom:i,x:yn(e.x,o.x,o.x+o.width),y:yn(e.y,o.y,o.y+o.height)}}acquireBackend(e=true){var s,i;if(this.backend||this.pending||this.disposed)return;const n=document.createElement("canvas");n.className="clover-canvas-surface",n.setAttribute("aria-hidden","true"),Object.assign(n.style,{position:"absolute",inset:"0",width:"100%",height:"100%",display:"block",pointerEvents:"none"}),this.host.insertBefore(n,((s=this.dom)==null?void 0:s.container)??((i=this.overlays)==null?void 0:i.container)??null);const o=e&&(this.backendPreference==="webgl2"||this.backendPreference==="auto"&&this.contextLosses<nm);let r=null;o&&(Jh(this.holder)||this.backendPreference==="webgl2")&&(r=po.create(n,{onLost:this.onContextLost}),r||Ui(this.holder)),r?this.install(r):this.backendPreference==="webgl2"?this.none(n):(this.pending=n,(sm??(sm=import("./Canvas2DBackend-DPWYD9ST.mjs"))).then(({Canvas2DBackend:a})=>{if(this.pending!==n)return;this.pending=null;const c=a.create(n);c?this.install(c):this.none(n)}))}none(e){e.remove(),this.host.dataset.backend="none"}install(e){this.backend=e,this.host.dataset.backend=e.kind,e.resize(this.viewport.width,this.viewport.height,this.pixelRatio),e.kind==="canvas2d"&&this.opaqueUrls.clear(),this.emit("backend",e.kind),this.invalidate()}releaseBackend(){var n;if(Ui(this.holder),(n=this.pending)==null||n.remove(),this.pending=null,!this.backend)return;const e=this.backend.canvas;this.backend.dispose(),e.remove(),this.backend=null}giveBack(){this.releaseTimer&&clearTimeout(this.releaseTimer),this.releaseTimer=null,this.releaseBackend(),this.host.dataset.backend="released"}observe(){typeof ResizeObserver<"u"&&(this.resizeObserver=new ResizeObserver(()=>this.measure(true)),this.resizeObserver.observe(this.host)),typeof IntersectionObserver<"u"&&(this.intersectionObserver=new IntersectionObserver(e=>{const n=e.some(o=>o.isIntersecting);this.setVisible(n)}),this.intersectionObserver.observe(this.host)),this.watchPixelRatio()}setVisible(e){var n;if(this.visible=e,e){this.holder.hiddenSince=null,this.releaseTimer&&clearTimeout(this.releaseTimer),this.releaseTimer=null,this.backend||this.acquireBackend();return}(n=this.holder).hiddenSince??(n.hiddenSince=ra()),!(!this.backend||this.releaseTimer)&&(this.releaseTimer=setTimeout(()=>this.giveBack(),this.options.releaseAfterMs))}measure(e=false){var c;const n=this.host.getBoundingClientRect(),o=Math.max(1,n.width),r=Math.max(1,n.height),s=oa(this.host),i=Math.min(typeof window<"u"&&window.devicePixelRatio||1,em);if(o===this.viewport.width&&r===this.viewport.height&&i===this.pixelRatio&&rm(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 ra=()=>typeof performance<"u"?performance.now():Date.now();function am(t){if(typeof IntersectionObserver>"u"||typeof window>"u")return true;const{top:e,left:n,width:o,height:r}=t.getBoundingClientRect();return e+r>=0&&n+o>=0&&e<=window.innerHeight&&n<=window.innerWidth}function sa(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function dr(t){return Object.fromEntries(Object.entries(t).filter(([,e])=>e!==void 0))}const cm=(t,e)=>new im(t,e),lm=gt(()=>import("./Connected-x3v9xr7x.mjs")),um=gt(()=>import("./Connected-D5_bZzr5.mjs").then(t=>t.C));function dm({className:t,style:e,renderers:n,collapseControls:o,onContentStateChange:r,children:s,...i}){var m;const a=de("Body");hc(a.clover,r);const c=fs(),l=yt(()=>Wd(c),[c]),d=Ud(n??a.renderers,{canvases:c,bodies:l}),u=d==null?void 0:d.component,h=((m=c.find(({type:g})=>g==="Scene"||g==="Timeline"))==null?void 0:m.type)??"Canvas",p=at(g=>g.status==="loading");return f("div",{"aria-busy":p,className:Mt("clover-body",t),"data-renderer":u?"custom":h.toLowerCase(),style:{position:"relative",height:"var(--clover-body-height, 60vh)",...e},children:[u?f(u,{canvases:c,bodies:l,children:s}):h==="Scene"?f(wt,{fallback:f(Sn,{overlay:true}),children:f(um,{...i,children:s})}):h==="Timeline"?f(wt,{fallback:f(Sn,{overlay:true}),children:f(lm,{...i,children:s})}):f(Xh,{...i,collapseControls:o,surface:cm,children:s}),p&&f(Sn,{overlay:true})]})}const fm={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:"\xA0"};function Rn(t){return t.replace(/<br\s*\/?>/gi,`
|
|
24
|
-
`).replace(/<[^>]*>/g,"").replace(/&(#x[0-9a-f]+|#\d+|[a-z]+);/gi,(e,n)=>{if(n[0]==="#"){const o=n[1]==="x"||n[1]==="X"?parseInt(n.slice(2),16):parseInt(n.slice(1),10);return o>0&&o<=1114111?String.fromCodePoint(o):e}return fm[n.toLowerCase()]??e})}const hm=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 mm(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 Po=(t,e)=>e==="canvas"?We(t.manifest,t.canvasId):t.manifest,Hc=ue(null),hs=()=>zt(Hc),nn=re(function({of:e="manifest",label:n,as:o="span",className:r,...s},i){var h;const a=Ln(p=>{var m,g;return e==="canvas"?(m=We(p.manifest,p.canvasId))==null?void 0:m.label:(g=p.manifest)==null?void 0:g.label},void 0),c=hs(),l=(h=Ie())==null?void 0:h.language,{text:d,lang:u}=_t(n??(c?c.label:a),l);return d?f(o,{ref:i,className:Mt("clover-label",r),...ut(u),...s,children:Rn(d)}):null});function gm(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)))),uo(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 uo(t,i,l.width,l.height)}function on(t){var e;return(e=rs(t).find(({body:n})=>n.type==="Image"||n.id&&!n.type))==null?void 0:e.body}function vm(t,{width:e,height:n}){if(t==="full")return{x:0,y:0,width:1,height:1};const o=/^(pct:)?([\d.]+),([\d.]+),([\d.]+),([\d.]+)$/.exec(t);if(!o)return null;const[r,s,i,a]=o.slice(2).map(Number),[c,l]=o[1]?[100,100]:[e,n];return{x:r/c,y:s/l,width:i/c,height:a/l}}function ye(t,e="full",n=false){if(!t)return null;const o=Co(t.service);if(o){if(e!=="full")return{service:o,region:e,fallback:t.id};const{width:r,height:s}=t;return n&&t.id&&r>0&&s>0?{service:o,fallback:t.id,fallbackSize:{width:r,height:s}}:{service:o,fallback:t.id}}return t.id?{src:t.id}:null}function ps(t){const e=t;return e?ye(W(e.thumbnail)[0],"full",true)??ye(on(e))??ye(on(e.placeholderContainer))??ye(on(e.accompanyingContainer)):null}function ym(t){const e=t;return e?ye(on(e))??ye(on(e.placeholderContainer))??ye(on(e.accompanyingContainer))??ye(W(e.thumbnail)[0],"full",true):null}async function ms(t,e=200,n){if(t.src)return t.src;if(!t.service)return t.fallback;const o=t.fallbackSize;if(o&&t.fallback&&t.region===void 0){const r=Math.max(o.width,o.height);if(r>=e&&r<=e*2)return t.fallback}try{const r=await cs(t.service,{request:n}),s=typeof t.region=="string"?vm(t.region,r):t.region;return s===null?t.fallback:gm(r,e,s)??t.fallback}catch{return t.fallback}}const bm=Object.freeze(Object.defineProperty({__proto__:null,imageSource:ye,resolveThumbnail:ms,stillSource:ym,thumbnailSource:ps},Symbol.toStringTag,{value:"Module"})),ia='.clover-items-item[role="option"], .clover-items-link',tn=new Map;let Bt=null,Qt=null,Rr=0;function gs(t){const e=tn.get(t);if(!e)return;const n=t.clientHeight>0&&t.scrollHeight>t.clientHeight+1;n!==e.cut&&(e.cut=n,e.change(n))}function Br(){cancelAnimationFrame(Rr),Rr=requestAnimationFrame(()=>tn.forEach((t,e)=>gs(e)))}function Wc(t){var r,s;if(t.key!=="Escape")return;const e=new Set,n=(s=(r=document.activeElement)==null?void 0:r.closest)==null?void 0:s.call(r,ia);n&&e.add(n);try{document.querySelectorAll(`:is(${ia}):hover`).forEach(i=>e.add(i))}catch{}const o=[...e].filter(i=>i.dataset.fullHidden===void 0&&i.querySelector(".clover-items-label-full"));o.length&&(t.preventDefault(),t.stopPropagation(),o.forEach(i=>mc(i,"fullHidden",["pointerenter",i===n?"blur":"focus"])))}function _m(){var t,e;Bt=typeof ResizeObserver>"u"?null:new ResizeObserver(n=>n.forEach(o=>gs(o.target))),Qt=typeof MutationObserver>"u"?null:new MutationObserver(Br),Qt==null||Qt.observe(document.head,{childList:true,subtree:true,characterData:true}),Qt==null||Qt.observe(document.documentElement,{attributes:true,attributeFilter:["style","class"]}),(e=(t=document.fonts)==null?void 0:t.addEventListener)==null||e.call(t,"loadingdone",Br),document.addEventListener("keydown",Wc,true)}function wm(){var t,e,n;cancelAnimationFrame(Rr),(t=Bt==null?void 0:Bt.disconnect)==null||t.call(Bt),Qt==null||Qt.disconnect(),Bt=Qt=null,(n=(e=document.fonts)==null?void 0:e.removeEventListener)==null||n.call(e,"loadingdone",Br),document.removeEventListener("keydown",Wc,true)}function xm(t,e){var n;return tn.size||_m(),tn.set(t,{change:e}),(n=Bt==null?void 0:Bt.observe)==null||n.call(Bt,t),gs(t),()=>{var o;tn.delete(t),(o=Bt==null?void 0:Bt.unobserve)==null||o.call(Bt,t),tn.size||wm()}}const Sm=/^(-?\d{4,})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?)?/;function Uc(t,e){if(typeof t!="string")return null;const n=Sm.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 km=gt(()=>import("./NavDate-B7T2iPfP.mjs").then(t=>t.a).then(({NavDate:t})=>({default:t})));function Cm(t,e,n,o){const r=t.source!==void 0?t.source:ps(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 ms(r,e,n).then(l=>{c&&i(l)}),()=>{c=false}},[a,e,o]),{src:s,none:!r}}const Em=()=>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 Mm({part:t,size:e,request:n,alt:o,altLang:r}){const[s,i]=H(null),a=Mc(s,Ec,s==null?void 0:s.closest('[data-layout="slider"] .clover-items-viewport')),{src:c,none:l}=Cm(t,e,n,a),[d,u]=H(false),{width:h,height:p}=t.resource??{},m=h&&p?h/p:1;return f("span",{ref:i,className:"clover-items-picture","data-loaded":d,"data-empty":c?void 0:true,style:c&&!(h&&p)?void 0:{"--clover-items-ratio":m},children:[!c&&l&&An(t.media)&&f(Em,{}),c&&f("img",{src:c,alt:o,...ut(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:Wf(t.duration)}):null]})}function Tm({text:t,lang:e,first:n}){const o=N(null),[r,s]=H(false);return F(()=>{const i=o.current;if(!(!i||!t))return xm(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",...ut(t?e:void 0),children:t}),r&&f("span",{className:"clover-items-label-full",...ut(e),"aria-hidden":"true",hidden:true,children:t})]})}function Pm({item:t,size:e,language:n,request:o,showSummary:r=false,secondary:s="summary",labels:i=true}){var u,h;const a=t.parts.map(p=>_t(t.parts.length===1?t.label:p.label,n)),c=r&&s==="summary"?_t(t.summary,n):null,l=r&&s==="navDate"?Uc(t.navDate):null,d=a.some(p=>p.text);return f("figure",{role:"none",className:"clover-items-figure","data-parts":t.parts.length,"data-media":(h=(u=t.parts[0])==null?void 0:u.media)==null?void 0:h.toLowerCase(),style:{"--parts":t.parts.length},children:[f("span",{className:"clover-items-pictures",children:t.parts.map((p,m)=>{const g=a[m].text?{text:""}:_t(p.label,n);return f(Mm,{part:p,size:e,request:o,alt:g.text,altLang:g.lang},p.id)})}),(d||l||(c==null?void 0:c.text))&&f("figcaption",{className:"clover-items-caption",style:i?void 0:ze,children:[a.map((p,m)=>f(Tm,{text:p.text,lang:p.lang,first:m===0},t.parts[m].id)),l&&f(wt,{fallback:null,children:f(km,{value:t.navDate,className:"clover-items-date"})}),(c==null?void 0:c.text)&&f("span",{className:"clover-items-summary",...ut(c.lang),children:c.text.replace(/<[^>]*>/g,"")})]})]})}function Im(t){var e;return(e=rs(t).find(({body:n})=>n.type))==null?void 0:e.body.type}function jc(t){const e=Im(t)??(t.type==="Timeline"?"Sound":void 0);return{id:t.id,type:t.type,label:t.label,resource:t,duration:Number(t.duration)||void 0,media:e}}const aa=new WeakMap;function Vc(t){if(!t)return[];let e=aa.get(t);if(!e){const{canvases:n,views:o}=Nt(t);e=o.map(r=>{const s=r.map(i=>jc(n[i]));return{id:s[0].id,parts:s,label:s.length===1?s[0].label:{none:[s.map(i=>_t(i.label).text).filter(Boolean).join(" \u2013 ")]}}}),aa.set(t,e)}return e}const ca=new WeakMap;function go(t){if(!t)return[];let e=ca.get(t);return e||(e=W(t.items).filter(n=>n==null?void 0:n.id).map(n=>{var o;return{id:n.id,parts:[jc(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,...En(W(n.homepage)[0])?{hrefLang:En(W(n.homepage)[0])}:{}}}),ca.set(t,e)),e}function ry(t){return t?Array.isArray(t)?go({items:t}):t.type==="Collection"?go(t):Vc(t):[]}function qc(t){const e=Math.max(1,Math.round(t));return e<=6?`h${e}`:null}const vs=(t,e="p")=>qc(t)??e;function Kc(t,e,n="p"){const o=qc(t);return o?{as:o,title:{},group:{}}:{as:n,title:{id:e},group:{role:"group","aria-labelledby":e}}}function Lm(t,e,{orientation:n="both",rtl:o=false,onActivate:r,onMove:s}={}){const[i,a]=H(Math.max(0,e)),c=N([]),l=N(r);l.current=r;const d=N(s);d.current=s,F(()=>{e>=0&&a(e)},[e]);const u=Math.min(i,Math.max(0,t-1)),h=dt(g=>{var b;a(g),(b=c.current[g])==null||b.focus()},[]),p=dt((g,b)=>{var M,B;const v=o?"ArrowLeft":"ArrowRight",w=o?"ArrowRight":"ArrowLeft",_=n!=="vertical",x=n!=="horizontal";let S=null;if(_&&g.key===v||x&&g.key==="ArrowDown")S=Math.min(t-1,b+1);else if(_&&g.key===w||x&&g.key==="ArrowUp")S=Math.max(0,b-1);else if(g.key==="Home")S=0;else if(g.key==="End")S=t-1;else if(g.key==="Enter"||g.key===" "){(M=l.current)==null||M.call(l,b,g),g.preventDefault();return}S!==null&&(g.preventDefault(),h(S),S!==b&&((B=d.current)==null||B.call(d,S,g)))},[t,n,o,h]);return{focused:u,itemProps:g=>({ref:b=>{c.current[g]=b},tabIndex:g===u?0:-1,onKeyDown:b=>p(b,g),onFocus:()=>a(g)})}}const Am=5,Om=()=>{var t;return typeof window<"u"&&!!((t=window.matchMedia)!=null&&t.call(window,"(prefers-reduced-motion: reduce)").matches)};function Zc({align:t="start",dragFree:e=false,itemCount:n=0}={}){const[o,r]=H(null),[s,i]=H(false),[a,c]=H(false),l=N(t);l.current=t;const d=e?"none":"x mandatory",u=dt(()=>{if(!o)return;const v=Math.abs(o.scrollLeft),w=o.scrollWidth-o.clientWidth;i(v>1),c(v<w-1)},[o]);F(()=>{if(!o)return;const v=o.style;v.overflowX="auto",v.overflowY="hidden",v.scrollSnapType=d,v.setProperty("--clover-track-align",t),v.overscrollBehaviorX="contain"},[o,d,t]),F(()=>{if(!o)return;let v=0;const w=()=>{cancelAnimationFrame(v),v=requestAnimationFrame(u)};u(),o.addEventListener("scroll",w,{passive:true});const _=typeof ResizeObserver<"u"?new ResizeObserver(w):null;return _==null||_.observe(o),o.firstElementChild&&(_==null||_.observe(o.firstElementChild)),()=>{cancelAnimationFrame(v),o.removeEventListener("scroll",w),_==null||_.disconnect()}},[o,u,n]);const h=dt((v,w=false)=>{if(!o||!v)return;const _=w||Om()?"auto":"smooth";o.scrollBy({left:v,behavior:_})},[o]),p=dt((v,{instant:w=false}={})=>{const _=o==null?void 0:o.querySelector(`[data-track-index="${v}"]`);if(!o||!_)return false;const x=o.getBoundingClientRect(),S=_.getBoundingClientRect(),M=getComputedStyle(o).direction==="rtl";return h(l.current==="center"?S.left+S.width/2-(x.left+x.width/2):M?S.right-x.right:S.left-x.left,w),true},[o,h]),m=dt(v=>{if(!o)return;const w=getComputedStyle(o).direction==="rtl";h(v*o.clientWidth*.9*(w?-1:1))},[o,h]),g=dt(()=>m(1),[m]),b=dt(()=>m(-1),[m]);return F(()=>{if(!o)return;let v=null,w=false;const _=B=>{B.pointerType!=="mouse"||B.button!==0||(v={x:B.clientX,scroll:o.scrollLeft},w=false)},x=B=>{var Q;if(!v)return;const O=B.clientX-v.x;!w&&Math.abs(O)<Am||(w||(w=true,(Q=o.setPointerCapture)==null||Q.call(o,B.pointerId),o.style.scrollSnapType="none",o.dataset.dragging="true"),o.scrollLeft=v.scroll-O)},S=B=>{var O;v&&(v=null,w&&((O=o.releasePointerCapture)==null||O.call(o,B.pointerId),delete o.dataset.dragging,o.style.scrollSnapType=d))},M=B=>{w&&(w=false,B.preventDefault(),B.stopPropagation())};return o.addEventListener("pointerdown",_),o.addEventListener("pointermove",x),o.addEventListener("pointerup",S),o.addEventListener("pointercancel",S),o.addEventListener("click",M,true),()=>{o.removeEventListener("pointerdown",_),o.removeEventListener("pointermove",x),o.removeEventListener("pointerup",S),o.removeEventListener("pointercancel",S),o.removeEventListener("click",M,true)}},[o,d]),{ref:r,canScrollPrev:s,canScrollNext:a,scrollPrev:b,scrollNext:g,scrollToIndex:p,measure:u}}const vo=re(function(e,n){return!Ie()||e.iiifContent!==void 0||e.items!==void 0?f(wt,{fallback:null,children:f(Nm,{...e,forwardedRef:n})}):f(Rm,{...e,forwardedRef:n})}),Nm=gt(()=>import("./StandaloneItems-DsoMdwWS.mjs"));function Rm({of:t="views",...e}){return t==="targets"?f($m,{...e}):t==="annotations"?f(Dm,{...e}):t==="members"?f(Gc,{...e}):f(zm,{...e})}const Bm=gt(()=>import("./TargetItems-DIKBor9X.mjs"));function $m(t){return at(n=>{var o;return(((o=n.targets)==null?void 0:o.items.length)??0)>1})?f(wt,{fallback:null,children:f(Bm,{...t})}):null}const Fm=gt(()=>import("./AnnotationItems-3Sf8MxRQ.mjs"));function Dm(t){return at(n=>!!oc(n.manifest,n.addedSets))?f(wt,{fallback:null,children:f(Fm,{...t})}):null}function Gc({onSelect:t,forwardedRef:e,...n}){const{clover:o,language:r}=Ie(),s=at(d=>d.collection),i=at(d=>{var u;return((u=d.manifest)==null?void 0:u.id)??null}),a=go(s),c=Xr(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(Yc,{...n,forwardedRef:e,steps:Xc(a,d,c,l),nameKey:"informationPanelTabsCollection",position:f(Wm,{position:d,total:a.length,list:u=>f(Gc,{layout:"list",forwardedRef:null,onSelect:u})})})}return f(Jc,{...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 zm({onSelect:t,forwardedRef:e,singleItem:n=false,...o}){const{clover:r,language:s}=Ie(),i=at(u=>u.manifest),a=at(u=>On(u.manifest,u.canvasId)),c=at(u=>Nt(u.manifest).direction),l=Vc(i);if(l.length<(n?1:2))return null;const d=u=>r.goTo(u.id);return o.layout==="pager"?f(Yc,{...o,forwardedRef:e,steps:Xc(l,a,c,d)}):f(Jc,{...o,forwardedRef:e,items:l,selected:a,navigation:"id",rtl:c==="right-to-left",language:s,request:r.request,onActivate:(u,h)=>{t==null||t(u,h),r.goTo(u.id)},followFocus:d})}function Xc(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 Hm=gt(()=>import("./PagerLayout-B4C72jTV.mjs")),Wm=gt(()=>import("./PagerLayout-B4C72jTV.mjs").then(({CountMenu:t})=>({default:t})));function Yc(t){return f(wt,{fallback:null,children:f(Hm,{...t})})}function Jc({forwardedRef:t,items:e,selected:n,navigation:o,rtl:r=false,layout:s="slider",thumbnailSize:i=200,request:a,language:c,showSummary:l=false,secondary:d="summary",labels:u=true,heading:h,headingLevel:p=2,renderItem:m,onActivate:g,followFocus:b,as:v="section",className:w,"aria-label":_,size:x,singleItem:S,highContrast:M,...B}){var Vt;const{t:O}=Tt(),Q=fe(),nt=wo(t,B.lang),{langOf:G}=nt,tt=qr(M),K=s==="slider",Y=o==="id",I=N(null),E=s==="masonry";F(()=>{const V=I.current;if(!E||!V)return;let j,ft=true;return import("../masonry-BZCdA3bV.mjs").then(({attachMasonry:Ct})=>{ft&&(j=Ct(V))}),()=>{ft=false,j==null||j()}},[E]);const A=Zc({align:Y?"center":"start",itemCount:e.length}),U=N(void 0);F(()=>()=>window.clearTimeout(U.current),[]);const rt=Lm(e.length,n,{orientation:s==="slider"?"horizontal":s==="list"?"vertical":"both",rtl:r,onActivate:(V,j)=>g(e[V],j),onMove:b?(V,j)=>{window.clearTimeout(U.current);const ft=()=>b(e[V]);j.repeat?U.current=window.setTimeout(ft,150):ft()}:void 0}),st=N(null),et=N(false);et.current=!!((Vt=st.current)!=null&&Vt.contains(st.current.ownerDocument.activeElement)),F(()=>{var Ct;const V=st.current;if(!V||!et.current)return;const{activeElement:j,body:ft}=V.ownerDocument;j&&j!==ft||(Ct=V.querySelector(`[data-track-index="${Math.max(0,n)}"]`))==null||Ct.focus()},[e]);const it=N(false);F(()=>{var ft;if(n<0)return;const V=!it.current;if(K){A.scrollToIndex(n,{instant:V})&&(it.current=true);return}it.current=true;const j=(ft=st.current)==null?void 0:ft.querySelector(`[data-track-index="${n}"]`);j&&Um(j,V)},[K,n,A.scrollToIndex]);const y=vs(p),k=h?_t(h.label,c):null,T=h?_t(h.summary,c):null,R=_===void 0&&!!(k!=null&&k.text),z=Eo(O("itemsLabel"),G("itemsLabel"),_!==void 0||R,nt.hostLanguage),L=R?{"aria-labelledby":`${Q}-title`}:_!==void 0?{"aria-label":_}:z.props,D=(V,j)=>m?m(V,{selected:j}):f(Pm,{item:V,size:i,language:c,request:a,showSummary:l,secondary:d,labels:u}),X=V=>!(m||_t(V.label,c).text||l&&d==="summary"&&_t(V.summary,c).text),ht=(V,j)=>X(V)?O("canvasPosition",{index:j+1,total:e.length}):void 0,J=V=>X(V)?G("canvasPosition"):void 0,bt=K?{display:"flex",margin:0,padding:0,listStyle:"none"}:void 0,mt=K?{flex:"0 0 auto",scrollSnapAlign:Y?"center":"start"}:void 0,Lt=Y&&n>=0,At=V=>{const j=n+(V==="prev"?-1:1),ft=Lt?j>=0&&j<e.length:V==="prev"?A.canScrollPrev:A.canScrollNext,Ct=Lt?V==="prev"?"commonPrevious":"commonNext":V==="prev"?"itemsScrollBack":"itemsScrollForward",Xt=O(Ct),we=$=>{if(!ft)return;if(!Lt)return(V==="prev"?A.scrollPrev:A.scrollNext)();const ct=e[j];b?b(ct):g(ct,$)};return f("button",{type:"button",className:`clover-items-scroll-${V}`,"aria-controls":Lt?void 0:`${Q}-viewport`,...ut(G(Ct)),"aria-disabled":!ft||void 0,tabIndex:ft?void 0:-1,onClick:we,children:[f("svg",{"aria-hidden":"true",focusable:"false",width:"16",height:"16",viewBox:"0 0 16 16",children:f("path",{d:V==="next"!==r?"M6 3l5 5-5 5":"M10 3L5 8l5 5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),f("span",{style:ze,children:Xt}),f(Ue,{label:Xt})]})};return f(In.Provider,{value:nt.hostLanguage,children:f(v,{ref:nt.ref,className:Mt("clover-items",w),"data-layout":s,"data-navigation":o,...Kr(tt),...B,children:[h&&((k==null?void 0:k.text)||(T==null?void 0:T.text))&&f("header",{className:"clover-items-header",children:[(k==null?void 0:k.text)&&f(y,{className:"clover-items-title clover-title",id:`${Q}-title`,...ut(k.lang),children:k.text}),(T==null?void 0:T.text)&&f("p",{className:"clover-items-description",...ut(T.lang),children:T.text.replace(/<[^>]*>/g,"")}),h.homepage&&f("a",{className:"clover-items-homepage",href:h.homepage,hrefLang:h.homepageLang,...ut(G("commonViewAll")),children:O("commonViewAll")})]}),f("div",{className:"clover-items-frame",style:{position:"relative"},dir:r?"rtl":void 0,children:[K&&At("prev"),f("div",{id:`${Q}-viewport`,className:"clover-items-viewport",ref:K?A.ref:I,children:Y?f("div",{ref:st,role:"listbox",...L,"aria-orientation":K?"horizontal":s==="list"?"vertical":void 0,className:"clover-items-track",style:bt,children:e.map((V,j)=>{const ft=j===n;return f("div",{id:`${Q}-${j}`,role:"option","aria-selected":ft,"aria-label":ht(V,j),...ut(J(V)),className:"clover-items-item","data-track-index":j,style:mt,...rt.itemProps(j),onClick:Ct=>g(V,Ct),children:D(V,ft)},V.id)})}):f("ul",{...L,className:"clover-items-track",style:bt,children:e.map((V,j)=>f("li",{className:"clover-items-item","data-track-index":j,style:mt,children:f("a",{className:"clover-items-link",href:V.href,hrefLang:V.hrefLang,"aria-label":ht(V,j),...ut(J(V)),draggable:false,onClick:ft=>g(V,ft),children:D(V,false)})},V.id))})}),K&&At("next")]}),z.node]})})}function Um(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 jm(t,e){const{clover:n}=de(e),o=Zh(),{direction:r}=Oc(),s=at(l=>l.collection),i=at(l=>{var d;return((d=l.manifest)==null?void 0:d.id)??null}),a=at(l=>{var d;return((d=l.targets)==null?void 0:d.items.length)??0}),c=at(l=>od(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=go(s),d=l.findIndex(u=>u.id===i);return{position:d,total:l.length,direction:"left-to-right",step:u=>{const h=l[d+u];h&&n.goToManifest(h.id)}}}return{position:o.position,total:o.total,direction:r,step:l=>l<0?o.previous():o.next()}}const Vm=re(function({steps:e,as:n="span",className:o,...r},s){const{t:i,langOf:a}=Tt(),{position:c,total:l}=e;if(l<2||c<0)return null;const d=c+1;return f(n,{ref:s,className:Mt("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:ze,...ut(a("canvasPosition")),children:i("canvasPosition",{index:d,total:l})})]})}),qm=re(function({of:e="views",...n},o){const r=jm(e,"Position");return f(Vm,{ref:o,...n,steps:r})});function Km({className:t,loading:e,error:n}){const{t:o,langOf:r}=Tt(),{status:s,error:i}=Vh(),a=s==="loading",c=e!==void 0&&e!==false;return f(kt,{children:[f("p",{className:Mt("clover-status",t),"data-status":a?s:void 0,role:"status",style:a&&e!==false?void 0:ze,children:[a&&(c?e:e===void 0&&f(Sn,{})),a&&!c&&f("span",{style:ze,...ut(r("statusLoading")),children:o("statusLoading")})]}),s==="error"&&i&&f("div",{className:Mt("clover-status",t),"data-status":s,role:"alert",children:n?n(i):f(kt,{children:[f("p",{...ut(r("statusError")),children:o("statusError")}),f("p",{className:"clover-status-detail",lang:"en",children:i.message})]})})]})}function Zm(t,e=false,n=3){const o=e||hm(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,h=c(u,{markdown:!!d});a&&i({for:r,html:h,inner:l(h)})}),()=>{a=false}},[t,r,o,e,n]),o&&(s==null?void 0:s.for)===r?s:null}const Gm=new Set(["p","span","h1","h2","h3","h4","h5","h6","a","b","i","em","strong","small","sub","sup","label"]),Qc=re(function({as:e="span",markup:n,language:o,format:r,headingLevel:s,...i},a){const{text:c,lang:l}=_t(n,o),d=ut(l),u=pm(r,c),h=u==="markdown",p=Zm(u==="plain"?"":c,h,s),m=(p==null?void 0:p.html)??null;if(!c)return null;if(u==="plain")return f(e,{ref:a,...i,...d,children:c.split(/\r?\n/).map((b,v)=>f(ae.Fragment,{children:[v>0&&f("br",{}),b]},v))});const g=typeof e=="string"&&Gm.has(e)&&m&&/<(p|ul|ol|div)[\s>]/i.test(m)?"div":e;return p?f(g,{ref:a,...i,...d,dangerouslySetInnerHTML:{__html:p.inner}}):f(e,{ref:a,...i,...d,children:h?mm(c):Rn(c)})}),tl=({metadata:t,language:e,renderValue:n,...o})=>t!=null&&t.length?f("dl",{...o,children:t.map((r,s)=>{const i=_t(r.label,e),a=n==null?void 0:n(r);return f("div",{"data-label":_t(r.label,"none").text.replace(/\s+/g,"-").toLowerCase(),children:[f("dt",{...ut(i.lang),children:i.text}),a!==void 0?f("dd",{children:a}):f(Qc,{as:"dd",markup:r.value,language:e})]},s)})}):null,Xm=typeof window>"u"?F:Dt;function Ym({children:t}){const{t:e}=Tt(),n=wo(),o=N(null),r=fe(),s=ae.Children.only(t),i=s.props.id??r,{open:a,cut:c,toggle:l}=Jm(o);return f("div",{className:"clover-read-more",children:[ae.cloneElement(s,{ref:o,id:i,"data-read-more":a?"open":""}),(c||a)&&f("button",{type:"button",className:"clover-read-more-button","aria-expanded":a,"aria-controls":i,onClick:l,ref:n.ref,...ut(n.langOf(a?"readLess":"readMore")),children:e(a?"readLess":"readMore")})]})}function Jm(t){const[e,n]=H(false),[o,r]=H(false),s=()=>{const i=t.current;i&&!e&&r(i.scrollHeight>i.clientHeight+1)};return Xm(s),F(()=>{var u,h;const i=t.current;if(!i)return;let a=0;const c=()=>{cancelAnimationFrame(a),a=requestAnimationFrame(s)},l=typeof ResizeObserver>"u"?null:new ResizeObserver(c);l==null||l.observe(i);const 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"]}),(h=(u=document.fonts)==null?void 0:u.addEventListener)==null||h.call(u,"loadingdone",c),()=>{var p,m;cancelAnimationFrame(a),l==null||l.disconnect(),d==null||d.disconnect(),(m=(p=document.fonts)==null?void 0:p.removeEventListener)==null||m.call(p,"loadingdone",c)}},[e,t.current]),{open:e,cut:o,toggle:()=>n(i=>!i)}}function dn(t,e,n){const o=hs(),r=Ln(s=>{var i;return(i=Po(s,t))==null?void 0:i[e]},void 0);return n!==void 0?n:o?o[e]:r}const Bn=()=>{var t;return(t=Ie())==null?void 0:t.language};function la({of:t="manifest",as:e="p",value:n,className:o,...r}){const s=dn(t,"summary",n),i=Bn();return _t(s,i).text?f(Ym,{children:f(Qc,{as:e,markup:s,language:i,className:Mt("clover-summary",o),...r})}):null}function Qm({of:t="manifest",value:e,className:n,renderValue:o,...r}){const s=dn(t,"metadata",e),i=Bn();return f(tl,{metadata:s,language:i,renderValue:o,className:Mt("clover-metadata",n),...r})}function tg({of:t="manifest",value:e,className:n,...o}){const r=dn(t,"requiredStatement",e),s=Bn();return f(tl,{metadata:r?[r]:null,language:s,className:Mt("clover-required-statement",n),...o})}function eg({of:t="manifest",value:e,className:n,...o}){const r=dn(t,"rights",e);return r?f("a",{href:r,className:Mt("clover-rights",n),...o,children:r}):null}function ng({of:t="manifest",value:e,className:n,...o}){const r=dn(t,"id",e);return r?f("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:Mt("clover-id",n),...o,children:r}):null}function el({property:t,className:e,of:n="manifest",value:o,...r}){const s=W(dn(n,t,o)),i=Bn(),a=s.filter(c=>c==null?void 0:c.id);return a.length?f("ul",{className:e,...r,children:a.map(c=>{const l=_t(c.label,i);return f("li",{children:[f("a",{href:c.id,target:"_blank",rel:"noopener noreferrer",hrefLang:En(c),...ut(l.text?l.lang:void 0),children:l.text?Rn(l.text):c.id}),c.format&&f("span",{className:"clover-link-format",children:[" (",c.format,")"]})]},c.id)})}):null}const og=({className:t,...e})=>f(el,{property:"homepage",className:Mt("clover-homepage",t),...e}),rg=({className:t,...e})=>f(el,{property:"seeAlso",className:Mt("clover-see-also",t),...e});function sg({of:t="manifest",value:e,size:n=400,className:o,...r}){var m;const s=Ln(g=>Po(g,t),null),i=e??s,a=Bn(),c=i?ps(i):null,l=(c==null?void 0:c.src)??(c==null?void 0:c.service)??(c==null?void 0:c.fallback),[d,u]=H(c==null?void 0:c.src),h=(m=Ie())==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 ms(c,n,h).then(b=>g&&u(b)),()=>{g=false}},[l,n]),!d)return null;const p=_t(i==null?void 0:i.label,a);return f("img",{src:d,alt:Rn(p.text),...ut(r.alt===void 0&&p.text?p.lang:void 0),width:n,loading:"lazy",decoding:"async",className:Mt("clover-thumbnail",o),...r})}const ig=typeof window>"u"?F:Dt,nl=ue(null),ag=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),$r=t=>!!t&&typeof t.id=="string",lg=t=>{const e=W(t.homepage).find($r);return e?{id:e.id,hrefLang:En(e)}:void 0},ug=(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=_t(o,e);if(r.text)return{text:Rn(r.text),lang:r.lang}}return null};function ol({of:t="manifest",value:e,link:n=true,children:o,className:r,...s}){var l;const i=Ln(d=>{var u;return(u=Po(d,t))==null?void 0:u.provider},void 0),a=(l=Ie())==null?void 0:l.language,c=W(e!==void 0?e:i).filter(cg);return c.length?f("ul",{className:Mt("clover-provider",r),...s,children:c.map((d,u)=>{const h=n?lg(d):void 0,p=!!_t(d.label,a).text;return f(dg,{agent:d,homepage:h,children:o??f(kt,{children:[f(rl,{alt:p?"":void 0}),f(nn,{className:"clover-provider-label"})]})},d.id??u)})}):null}function dg({agent:t,homepage:e,children:n}){const o=N(null),[r,s]=H(null),i=dt(()=>{o.current&&!ag(o.current)&&s(t)},[t]);return r===t?null:f("li",{className:"clover-provider-agent",children:f(Hc.Provider,{value:t,children:f(nl.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 rl({of:t="manifest",value:e,alt:n,className:o,...r}){var h;const{t:s,langOf:i}=Tt(),a=hs(),c=Ln(p=>{var m;return(m=Po(p,t))==null?void 0:m.provider},void 0),l=(h=Ie())==null?void 0:h.language,u=(e!==void 0?W(e):a?[a]:W(c)).flatMap(p=>{if(!p||typeof p!="object")return[];const m=p;if(m.type!=="Agent"&&$r(m)&&!m.logo)return[{image:m,agent:null}];const g=W(m.logo).find($r);return g?[{image:g,agent:m}]:[]});return u.length?f(kt,{children:u.map(({image:p,agent:m},g)=>{const b=ug(m,l);return f(fg,{src:p.id,alt:n??(b==null?void 0:b.text)??s("logo"),...ut(n!==void 0?void 0:b?b.lang:i("logo")),width:p.width,height:p.height,loading:"lazy",decoding:"async",className:Mt("clover-logo",o),...r},`${p.id}-${g}`)})}):null}function fg({alt:t,onError:e,...n}){const o=zt(nl),[r,s]=H(false),i=dt(()=>s(true),[]);ig(()=>{r&&(o==null||o())},[r,o]);const a=dt(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 hg(t,e,n){if(n&&t.includes(n))return n;if(!t.length)return;const o=Zr(t,e);return o==="none"?t[0]:o}const pg=t=>t&&typeof t=="object"&&!Array.isArray(t)?Object.keys(t).filter(e=>e!=="none"&&e!=="@none"&&_t({[e]:t[e]}).text):[];function mg(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 sl(){const{language:t,chooseLanguage:e}=de("About"),n=at(s=>s.manifest),o=yt(()=>mg(n),[n]),r=hg(o,t);return r&&e?{languages:o,chosen:r,onChange:e}:null}const gg=gt(()=>import("./LanguageChoice-BXXMBe-A.mjs").then(t=>({default:t.LanguageChoice}))),il=ue(false);function vg({part:t}){const e=sl();return e?f(wt,{fallback:null,children:f(gg,{...e,nameKey:"readingLanguage",part:t})}):null}function ua(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=_t(s.label,e);o.push({id:i,label:a.text||s.format||i,lang:a.text?a.lang:void 0,format:s.format,hrefLang:En(s)})}return o}function al(){const{language:t}=de("Download"),e=at(o=>o.manifest),n=at(o=>De(o.manifest,o.canvasId));return{page:ua(n,t),all:ua([e],t)}}const yg=gt(()=>import("./Download-Cc_NA7QN.mjs").then(({DownloadGroups:t})=>({default:t}))),bg=gt(()=>import("./NavDate-B7T2iPfP.mjs").then(t=>t.a).then(({NavDate:t})=>({default:t}))),_g=gt(()=>import("./PartOfManifest-BYgk9r1j.mjs"));function wg({languages:t=true,...e}){const n=zt(il);return f(xg,{...e,download:!n&&e.download!==false,choice:n||!t?null:f(vg,{part:"clover-about"})})}function xg({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}=Tt(),d=al(),u=at(v=>v.manifest,Object.is,"About"),h=N(null);F(()=>{const v=h.current,w=v==null?void 0:v.querySelector(".clover-about-head");if(!v||!w||typeof ResizeObserver>"u")return;const _=new Set,x=()=>{const B=w.querySelector(".clover-about-thumbnail"),O=w.querySelector(".clover-about-label");for(const tt of[B,O])tt&&!_.has(tt)&&(_.add(tt),M.observe(tt));const Q=v.style;if(!B){Q.removeProperty("--clover-about-label-height"),Q.removeProperty("--clover-about-thumbnail-width");return}const nt=`${(O==null?void 0:O.offsetHeight)??0}px`,G=`${B.offsetWidth}px`;Q.getPropertyValue("--clover-about-label-height")!==nt&&Q.setProperty("--clover-about-label-height",nt),Q.getPropertyValue("--clover-about-thumbnail-width")!==G&&Q.setProperty("--clover-about-thumbnail-width",G)};let S=0;const M=new ResizeObserver(()=>{cancelAnimationFrame(S),S=requestAnimationFrame(x)});return M.observe(w),x(),()=>{cancelAnimationFrame(S),M.disconnect(),v.style.removeProperty("--clover-about-label-height"),v.style.removeProperty("--clover-about-thumbnail-width")}},[s,r,u]);const p=fe(),m=()=>{var _,x;const v=h.current;(x=((_=v==null?void 0:v.closest(".clover-sections-item"))==null?void 0:_.querySelector(".clover-sections-button"))??v)==null||x.focus({preventScroll:true})};if(!u)return null;const g=(v,w,_)=>{if(!w)return null;const{as:x,title:S,group:M}=Kc(n,`${p}-${v}`);return f("section",{className:"clover-about-section",...M,children:[f(x,{className:"clover-about-heading",...ut(l(v)),...S,children:c(v)}),_]})},b=v=>Array.isArray(u[v])?u[v].length>0:!!u[v];return f("div",{ref:h,className:Mt("clover-about",i),tabIndex:-1,...a,children:[t,(r||s)&&f("div",{className:"clover-about-head",children:[r&&f(sg,{className:"clover-about-thumbnail",size:256,alt:s?"":void 0}),s&&f(nn,{as:vs(n),className:"clover-about-label clover-title"})]}),e&&f(la,{of:"canvas",className:"clover-about-summary"}),Ti(u)&&u.partOf&&f(wt,{fallback:null,children:f(_g,{manifest:u,headingLevel:n,onOpened:m})}),f(la,{className:"clover-about-summary"}),f(Qm,{className:"clover-about-metadata"}),f(tg,{className:"clover-about-metadata"}),g("aboutDate",Uc(u.navDate),f(wt,{fallback:null,children:f(bg,{value:u.navDate,className:"clover-about-date"})})),g("aboutProvider",b("provider"),f(ol,{})),g("aboutRights",u.rights,f(eg,{})),g("aboutHomepage",b("homepage"),f(og,{})),g("aboutSeeAlso",b("seeAlso"),f(rg,{})),g("download",o&&d.page.length+d.all.length>0,f(wt,{fallback:null,children:f(yg,{page:d.page,all:d.all,headingLevel:n+1})})),g(Ti(u)?"aboutCanvas":"aboutManifest",u.id,f(ng,{}))]})}const Sg=gt(()=>import("./LanguageChoice-BXXMBe-A.mjs").then(t=>({default:t.LanguageChoice}))),kg=gt(()=>import("./ControlMenu-D2HokCqd.mjs")),Cg=gt(()=>import("./Download-Cc_NA7QN.mjs").then(({DownloadGroups:t})=>({default:t})));function Eg({languages:t=true,download:e=true}){const n=sl(),{page:o,all:r}=al(),s=e&&o.length+r.length>0;return!(t&&n)&&!s?null:f("div",{className:"clover-about-actions",children:[s&&f(Mg,{page:o,all:r}),t&&n&&f(wt,{fallback:null,children:f(Sg,{...n,nameKey:"readingLanguage",part:"clover-about"})})]})}function Mg({page:t,all:e}){const{t:n,langOf:o}=Tt(),[r,s]=H(false),a=`${fe()}-download`,c=dt(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"),...ut(o("download")),"aria-expanded":r,"aria-controls":r?`${a}-menu`:void 0,onClick:()=>s(l=>!l),children:[f(Tg,{}),f(Ue,{label:n("download")})]}),r&&f(wt,{fallback:null,children:f(kg,{id:`${a}-menu`,triggerId:a,onClose:c,className:"clover-about-download-menu",children:f(Cg,{page:t,all:e,inPopover:true})})})]})}function Tg(){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 Pg(t,e=null){if(!t)return false;if(e!=null&&e.navPlace||t.navPlace)return true;for(const n of Nt(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 Ig=["about","targets","collection","contents","search","map","transcript","annotations"],Re={targets:t=>{var e;return(((e=t.targets)==null?void 0:e.items.length)??0)>1},collection:t=>{var e,n;return(((n=(e=t.collection)==null?void 0:e.items)==null?void 0:n.length)??0)>0||!!nd(t.manifest)},contents:t=>Uh(t.manifest).length>0,search:t=>!!Ja(t.manifest),map:t=>Pg(t.manifest,t.collection),transcript:t=>De(t.manifest,t.canvasId).some(e=>kc(e).length>0||nh(e).length>0),annotations:t=>yd(t.manifest,t.addedSets).length>0},Lg=(t,e)=>{const n=Array.isArray(e)?new Set(e):void 0;return Ig.filter(o=>t[o]&&(!n||n.has(o)))};function ys(t){const e={about:true,targets:at(Re.targets),collection:at(Re.collection),contents:at(Re.contents),search:at(Re.search),map:at(Re.map),transcript:at(Re.transcript),annotations:at(Re.annotations)};return Lg(e,t)}function Ag({open:t=false,className:e}){return f("svg",{"aria-hidden":"true",focusable:"false",width:"12",height:"12",viewBox:"0 0 12 12",className:Mt("clover-chevron",e),"data-open":t||void 0,children:f("path",{d:"M3 4.5l3 3 3-3",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}const cl=typeof window>"u"?F:Dt,ll=ue(null);function sy(){return zt(ll)}const ul=ue(0);function iy(){return zt(ul)}function Og({items:t,layout:e="tabs",value:n,onValueChange:o,label:r,labelLang:s,headingLevel:i=3}){var K,Y;const a=fe(),c=Eo(r??"",s,r===void 0),l=N([]),d=e==="tabs",{t:u,langOf:h}=Tt(),p=Zc({dragFree:true,itemCount:t.length}),m=t.some(I=>I.value===n)?n:((K=t[0])==null?void 0:K.value)??null,g=N(new Set);m&&g.current.add(m);const b=N(null),[v,w]=H({value:null,count:0});F(()=>{var st;if(d||!m||b.current!==m)return;b.current=null;const I=t.findIndex(et=>et.value===m),E=document.getElementById(`${a}-panel-${I}`),A=(st=l.current[I])==null?void 0:st.parentElement;if(!E||!A)return;const U=A.getBoundingClientRect().bottom-E.getBoundingClientRect().top;if(U<=0)return;const rt=fr(E);rt&&(rt.scrollTop-=U)},[m,d,t,a]);const _=I=>{var k,T,R,z;const E=t.findIndex(L=>L.value===m),A=document.getElementById(`${a}-panel-${E}`),U=I.target;if(!A||U===A||!A.contains(U)||!Rg(U))return;const rt=(T=(k=l.current[E])==null?void 0:k.parentElement)==null?void 0:T.getBoundingClientRect(),st=E+1<t.length?(z=(R=l.current[E+1])==null?void 0:R.parentElement)==null?void 0:z.getBoundingClientRect():void 0;if(!rt)return;const et=U.getBoundingClientRect(),it=et.top<rt.bottom?Math.floor(et.top-rt.bottom):st&&et.bottom>st.top?Math.ceil(Math.min(et.bottom-st.top,et.top-rt.bottom)):0,y=it?fr(A):null;y&&(y.scrollTop+=it)},x=N(null),S=t.map(I=>I.value).join(`
|
|
29
|
-
`),M=N(false);M.current=!!((Y=x.current)!=null&&Y.contains(x.current.ownerDocument.activeElement)),F(()=>{var rt;const I=x.current;if(!I||!M.current)return;const{activeElement:E,body:A}=I.ownerDocument;if(E&&E!==A)return;const U=t.findIndex(st=>st.value===m);(rt=l.current[U])==null||rt.focus()},[S]),cl(()=>{const I=x.current;if(d||!I||typeof ResizeObserver>"u")return;const E=[...I.querySelectorAll(":scope > .clover-sections-item")],A=E.map(D=>D.firstElementChild),U=A[0],rt=A[A.length-1],st=new Map,et=D=>(D&&st.get(D))??0,it=document.scrollingElement;let y=null,k=0;const T=()=>{const D=A.reduce((Lt,At)=>Lt+et(At),0);let X=0;E.forEach((Lt,At)=>{Lt.style.setProperty("--clover-sections-before",`${X}px`),X+=et(A[At]),Lt.style.setProperty("--clover-sections-after",`${D-X}px`)}),I.style.setProperty("--clover-sections-total",`${D}px`);const ht=U&&getComputedStyle(U);(ht==null?void 0:ht.position)==="sticky"&&rt&&(k=parseFloat(ht.top)+parseFloat(getComputedStyle(rt).bottom)||0);const J=getComputedStyle(I),bt=parseFloat(J.lineHeight)||1.2*parseFloat(J.fontSize),mt=(y==null?void 0:y.clientHeight)??0;mt>0&&mt-k-D<2*bt?I.dataset.stacks="off":delete I.dataset.stacks},R=new ResizeObserver(D=>{var X,ht;for(const J of D)A.includes(J.target)&&st.set(J.target,((ht=(X=J.borderBoxSize)==null?void 0:X[0])==null?void 0:ht.blockSize)??J.target.getBoundingClientRect().height);T()}),z=()=>{const D=fr(I);D!==y&&(y&&y!==it&&R.unobserve(y),D&&D!==it&&R.observe(D),y=D)},L=()=>{z(),T()};z();for(const D of A)D&&R.observe(D,{box:"border-box"});return window.addEventListener("resize",L),()=>{R.disconnect(),window.removeEventListener("resize",L);for(const D of E)D.style.removeProperty("--clover-sections-before"),D.style.removeProperty("--clover-sections-after");I.style.removeProperty("--clover-sections-total"),delete I.dataset.stacks}},[d,S,i]),F(()=>{if(d)return;const I=l.current.map(A=>A==null?void 0:A.parentElement).filter(A=>!!A),E=A=>{var et;if(A.ctrlKey)return;const U=A.currentTarget,rt=da(U);if(!rt||rt===document.scrollingElement)return;A.preventDefault();const st=A.deltaMode===1?parseFloat(getComputedStyle(U).lineHeight)||16:A.deltaMode===2?rt.clientHeight:1;(et=da(rt)??document.scrollingElement)==null||et.scrollBy({left:A.deltaX*st,top:A.deltaY*st,behavior:"instant"})};for(const A of I)A.addEventListener("wheel",E,{passive:false});return()=>{for(const A of I)A.removeEventListener("wheel",E)}},[d,S]);const B=I=>{I!==m&&(b.current=I,d||w(E=>({value:I,count:E.count+1})),o==null||o(I))},O=(I,E)=>{var et;const A=t.length-1,[U,rt]=d?["ArrowLeft","ArrowRight"]:["ArrowUp","ArrowDown"],st=I.key===rt?(E+1)%t.length:I.key===U?(E-1+t.length)%t.length:I.key==="Home"?0:I.key==="End"?A:null;st!==null&&(I.preventDefault(),(et=l.current[st])==null||et.focus(),d&&B(t[st].value))},Q=N(false);F(()=>{if(!d)return;const I=t.findIndex(y=>y.value===m),E=l.current[I],A=E==null?void 0:E.parentElement;if(!E||!A)return;const U=getComputedStyle(A),rt=A.getBoundingClientRect(),st=E.getBoundingClientRect(),et=rt.left+(parseFloat(U.scrollPaddingLeft)||0),it=rt.right-(parseFloat(U.scrollPaddingRight)||0);(st.left<et-1||st.right>it+1)&&p.scrollToIndex(I,{instant:!Q.current}),Q.current=true},[m,d,t.length,p.scrollToIndex]);const nt=I=>{const E=I==="prev"?p.canScrollPrev:p.canScrollNext,A=I==="prev"?"sectionsScrollBack":"sectionsScrollForward";return f("button",{type:"button",className:`clover-steps-step clover-sections-scroll-${I}`,"aria-hidden":"true",tabIndex:-1,hidden:!E,...ut(h(A)),onMouseDown:U=>U.preventDefault(),onClick:I==="prev"?p.scrollPrev:p.scrollNext,children:[f("svg",{"aria-hidden":"true",focusable:"false",width:"12",height:"12",viewBox:"0 0 16 16",children:f("path",{d:I==="next"?"M6 3l5 5-5 5":"M10 3L5 8l5 5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),f(Ue,{label:u(A)})]})},G=vs(i,"div"),tt=(I,E)=>{const A=I.value===m;return f("button",{ref:U=>{l.current[E]=U},type:"button",id:`${a}-button-${E}`,className:"clover-sections-button","data-value":I.value,"data-track-index":d?E:void 0,"aria-controls":`${a}-panel-${E}`,...d?{role:"tab","aria-selected":A,tabIndex:A?0:-1}:{"aria-expanded":A,"aria-disabled":A||void 0},onClick:()=>B(I.value),onKeyDown:U=>O(U,E),children:[f("span",{className:"clover-sections-label",children:I.label}),!d&&f(Ag,{open:A,className:"clover-sections-chevron"})]},I.value)};return f("div",{ref:x,className:"clover-sections","data-layout":e,onFocus:d?void 0:_,style:d?void 0:{"--clover-sections-count":t.length},children:[d&&f("div",{className:"clover-sections-tabs","data-more":[p.canScrollPrev&&"start",p.canScrollNext&&"end"].filter(Boolean).join(" ")||void 0,children:f("div",{className:"clover-sections-row",children:[f("div",{role:"tablist",ref:p.ref,...c.props,className:"clover-sections-list",children:t.map(tt)}),nt("prev"),nt("next")]})}),d&&c.node,t.map((I,E)=>{const A=I.value===m;return f("section",{className:"clover-sections-item","data-value":I.value,"data-open":A,style:d?void 0:{"--clover-sections-index":E},children:[!d&&f(G,{className:"clover-sections-heading",children:[tt(I,E),f("span",{className:"clover-sections-reach","aria-hidden":"true"})]}),f(ul.Provider,{value:v.value===I.value?v.count:0,children:f(Ng,{id:`${a}-panel-${E}`,tabs:d,labelledBy:`${a}-button-${E}`,hidden:!A,actions:I.actions,children:g.current.has(I.value)?I.content:null})})]},I.value)})]})}function Ng({id:t,tabs:e,labelledBy:n,hidden:o,actions:r,children:s}){const[i,a]=H(null),c=!o||!!r;return cl(()=>{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(kt,{children:[!e&&f("div",{ref:a,className:"clover-sections-actions",hidden:!c,children:r}),f("div",{id:t,role:e?"tabpanel":"region","aria-labelledby":n,tabIndex:e?0:void 0,className:"clover-sections-panel",hidden:o,children:f(ll.Provider,{value:e?null:i,children:[e&&r,s]})})]})}function fr(t){for(let e=t.parentElement;e&&e!==document.body;e=e.parentElement)if(/auto|scroll|hidden/.test(getComputedStyle(e).overflowY))return e;return document.scrollingElement}function da(t){for(let e=t.parentElement;e&&e!==document.body;e=e.parentElement)if(/auto|scroll/.test(getComputedStyle(e).overflowY)&&e.scrollHeight>e.clientHeight)return e;return document.scrollingElement}function Rg(t){try{return t.matches(":focus-visible")}catch{return true}}const Bg=gt(()=>import("./MapView-tAZ4vINr.mjs").then(t=>({default:t.RootMap}))),$g=gt(()=>import("./Collection-CPVQ3JtI.mjs").then(t=>({default:t.Collection}))),Fg=gt(()=>import("./TargetItems-DIKBor9X.mjs").then(t=>({default:t.TargetsSection}))),Dg=gt(()=>import("./Contents-Ma7oDW1R.mjs").then(t=>({default:t.Contents}))),zg=gt(()=>import("./Search-DbHlUxOS.mjs").then(t=>({default:t.Search}))),Hg=gt(()=>import("./Transcript-B_puRtfb.mjs").then(t=>({default:t.Transcript}))),Wg=gt(()=>import("./Annotations-CJamLUnL.mjs").then(t=>({default:t.Annotations}))),Be=t=>f(wt,{fallback:null,children:t}),Ug=()=>null,jg=re(function({layout:e="tabs",value:n,defaultValue:o,onValueChange:r,onClose:s,closeOnEscape:i=false,headingLevel:a=3,as:c="aside",download:l=true,languages:d=true,sections:u,labels:h,className:p,children:m,onKeyDown:g,...b},v){var z;const{clover:w}=de("Panel"),_=N(null),{t:x,langOf:S,hostLanguage:M,i18n:B}=Tt(),O=Eo(x("informationPanelTabs"),S("informationPanelTabs"),!!(b["aria-label"]||b["aria-labelledby"])||!(["aside","section","nav"].includes(c)||b.role)),Q=L=>{const D=S(L);return D?f("span",{...ut(D),children:x(L)}):x(L)},nt=(L,D)=>{const X=h==null?void 0:h[L];if(X===void 0)return Q(D);if(typeof X=="string")return X;const ht=Object.keys(X),J=Zr(ht,B.language);if(!J)return Q(D);const bt=_o(J,M);return bt?f("span",{...ut(bt),children:X[J]}):X[J]},G=ys(u),tt=L=>G.includes(L),K=ae.Children.toArray(m).filter(L=>ae.isValidElement(L)&&L.type===Ug),Y=e==="accordion"?a+1:a,I=d||l?f(Eg,{languages:d,download:l}):void 0,E=K.length?K.map(({props:L})=>({value:L.value,label:L.label,content:L.children,...L.value==="about"&&{actions:I}})):[...tt("about")?[{value:"about",label:nt("about","informationPanelTabsAbout"),content:f(wg,{headingLevel:Y,download:l}),actions:I}]:[],...tt("targets")?[{value:"targets",label:nt("targets","informationPanelTabsTargets"),content:Be(f(Fg,{headingLevel:Y}))}]:[],...tt("collection")?[{value:"collection",label:nt("collection","informationPanelTabsCollection"),content:Be(f($g,{headingLevel:Y}))}]:[],...tt("contents")?[{value:"contents",label:nt("contents","informationPanelTabsContents"),content:Be(f(Dg,{}))}]:[],...tt("search")?[{value:"search",label:nt("search","informationPanelTabsSearch"),content:Be(f(zg,{headingLevel:Y,sticky:true,size:"small"}))}]:[],...tt("map")?[{value:"map",label:nt("map","informationPanelTabsMap"),content:Be(f(Bg,{}))}]:[],...tt("transcript")?[{value:"transcript",label:nt("transcript","transcriptLabel"),content:Be(f(Hg,{sticky:true,size:"small"}))}]:[],...tt("annotations")?[{value:"annotations",label:nt("annotations","informationPanelTabsAnnotations"),content:Be(f(Wg,{headingLevel:Y}))}]:[]],A=at(L=>L.search.query),U=E.some(L=>L.value==="search"),[rt,st]=H(()=>A&&U?"search":o??null),et=N(A&&U?A:"");F(()=>{U&&(A&&A!==et.current&&n===void 0&&st("search"),et.current=A)},[A,U,n]);const it=at(L=>{var D;return L.annotationId&&((D=L.regions)!=null&&D.entries.some(X=>X.id===L.annotationId))?L.annotationId:null}),y=E.some(L=>L.value==="contents");F(()=>{it&&y&&n===void 0&&st("contents")},[it,y,n]);const k=n!==void 0?n:rt,T=(E.some(L=>L.value===k)?k:(z=E[0])==null?void 0:z.value)==="search";if(F(()=>{U&&w.setSetVisible(Jr,T)},[w,U,T]),!E.length)return null;const R=()=>{var D;const L=_.current;L!=null&&L.contains(document.activeElement)&&((D=Vg(L))==null||D.focus()),s==null||s()};return f(c,{ref:L=>{_.current=L,typeof v=="function"?v(L):v&&(v.current=L)},className:Mt("clover-panel",p),"data-layout":e,"data-closable":s?"":void 0,"data-floating":i?"":void 0,...O.props,onKeyDown:L=>{g==null||g(L),i&&s&&L.key==="Escape"&&!L.defaultPrevented&&(L.preventDefault(),R())},...b,children:[O.node,s&&f("button",{type:"button",className:"clover-panel-close","aria-label":x("informationPanelClose"),...ut(S("informationPanelClose")),onClick:R,children:[f("svg",{"aria-hidden":"true",focusable:"false",viewBox:"0 0 512 512",fill:"none",stroke:"currentColor",children:f(pc,{})}),f(Ue,{label:x("informationPanelClose")})]}),f(il.Provider,{value:E.some(L=>L.value==="about"),children:f(Og,{items:E,layout:e,value:n!==void 0?n:rt,onValueChange:L=>{n===void 0&&st(L),r==null||r(L)},label:x("informationPanelTabs"),labelLang:S("informationPanelTabs"),headingLevel:a})})]})});function Vg(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 qg=1,Kg=4,Zg=8,Gg=500,Xg=4,fa=["pointerdown","mousedown","pointerup","mouseup","click","dblclick"],dl=()=>typeof document>"u"?16:parseFloat(getComputedStyle(document.documentElement).fontSize)||16;function ro(t,e){if(t===void 0)return;if(typeof t=="number")return t;const n=parseFloat(t);if(!Number.isNaN(n))return t.endsWith("rem")?n*dl():t.endsWith("%")?n/100*e:n}const hr=t=>typeof t=="number"?`${t}px`:t,Yg=t=>{if(!t||typeof localStorage>"u")return{};try{const e=JSON.parse(localStorage.getItem(t)??"{}");return e&&typeof e=="object"?e:{}}catch{return{}}},Jg=(t,e)=>{if(t)try{localStorage.setItem(t,JSON.stringify(e))}catch{}},Qg=t=>t?Array.from(t.children).filter(e=>e.classList.contains("clover-split-pane")):[];function tv(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 ev(t,e,n){const{sized:o,other:r}=tv(t);if(!o)return null;const s=e.clientWidth,i=o.dataset.splitKey??"",a=n[i]??{},c=n[(r==null?void 0:r.dataset.splitKey)??""]??{},l=ro(a.min,s)??0,u=o.getBoundingClientRect().width+((r==null?void 0:r.getBoundingClientRect().width)??0)-(ro(c.min,s)??0),h=Math.max(l,Math.min(ro(a.max,s)??u,u)),p=o.getBoundingClientRect().left>=t.getBoundingClientRect().left-1;return{sized:o,key:i,min:l,max:h,after:p}}function nv(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 ov(t,e){const n=e.sized.getBoundingClientRect().width,o=qg*dl()*(t.shiftKey?4:1),r=e.after?"ArrowLeft":"ArrowRight",s=e.after?"ArrowRight":"ArrowLeft";if(t.key===r)return n+o;if(t.key===s)return n-o;if(t.key==="Home")return e.min;if(t.key==="End")return e.max}function ha(t){var n,o,r;const e=(o=(n=t.target)==null?void 0:n.closest)==null?void 0:o.call(n,".clover-tip");return!!(e&&((r=t.currentTarget)!=null&&r.contains(e)))}function rv(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=()=>{fa.forEach(g=>l.removeEventListener(g,h,true)),l.removeEventListener("pointermove",p,true),clearTimeout(m),s=null},h=g=>{if(!c.contains(g.target)){if(g.type==="pointerdown"&&d(g))return u();g.preventDefault(),g.stopPropagation()}},p=g=>d(g)&&u();fa.forEach(g=>l.addEventListener(g,h,true)),l.addEventListener("pointermove",p,true);const m=setTimeout(u,Gg);s=u};return{down(a){var d;if(o=false,r=null,a.defaultPrevented||a.button!==0||ha(a))return;const c=e().limits();if(!c)return;a.preventDefault(),n={found:c,x:a.clientX,from:c.sized.getBoundingClientRect().width,slop:a.pointerType==="touch"?Zg:Kg,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*Xg}:null,n=null,delete a.currentTarget.dataset.dragging},click(a){const c=o,l=r;o=false,r=null,!(a.defaultPrevented||c||ha(a))&&(e().step(),l&&i(l))},key(a){if(a.defaultPrevented)return;const c=e().limits();if(!c)return;const l=ov(a,c);l!==void 0&&(e().resize(l),a.preventDefault())},dispose(){s==null||s()}}}const bs=ue(null);function _s(t,e){typeof t=="function"?t(e):t&&(t.current=e)}const sv=re(function({as:e="div",storageKey:n,className:o,style:r,children:s,...i},a){const c=N(null),l=N({}),[d,u]=H({});F(()=>u(Yg(n)),[n]);const h=dt((m,g)=>u(b=>{const v={...b};return g===void 0?delete v[m]:v[m]=Math.round(g),Jg(n,v),v}),[n]),p=yt(()=>({sizes:d,setSize:h,specs:l,element:c}),[d,h]);return f(bs.Provider,{value:p,children:f(e,{ref:m=>{c.current=m,_s(a,m)},className:["clover-split",o].filter(Boolean).join(" "),style:{display:"flex",...r},...i,children:s})})}),fl=re(function({as:e="div",size:n,min:o,max:r,name:s,className:i,style:a,children:c,...l},d){const u=zt(bs),h=N(null),[p,m]=H(s??"");F(()=>{if(s)return m(s);const b=Qg(u==null?void 0:u.element.current);m(String(b.indexOf(h.current)))},[s,u]),u&&p&&(u.specs.current[p]={min:o,max:r,size:n});const g=u&&p?u.sizes[p]:void 0;return f(e,{ref:b=>{h.current=b,_s(d,b)},className:["clover-split-pane",i].filter(Boolean).join(" "),"data-split-key":p||void 0,"data-sized":n!==void 0?"":void 0,style:{minWidth:hr(o)??0,"--clover-split-size":g!==void 0?`${g}px`:hr(n),"--clover-split-max":hr(r),...a},...l,children:c})}),iv=re(function({className:e,children:n,onPointerDown:o,onClick:r,onKeyDown:s,...i},a){const c=zt(bs),{t:l,langOf:d}=Tt(),u=N(null),[h,p]=H(),m=dt(()=>{const M=u.current,B=c==null?void 0:c.element.current;return!M||!B||!c?null:ev(M,B,c.specs.current)},[c]),g=dt(M=>{const B=m();if(!B||!c)return;const O=Math.min(B.max,Math.max(B.min,M));c.setSize(B.key,O),p({now:O,min:B.min,max:B.max})},[m,c]),b=dt(()=>{const M=m();M&&p({now:M.sized.getBoundingClientRect().width,min:M.min,max:M.max})},[m]);F(()=>{const M=c==null?void 0:c.element.current;if(b(),!M||typeof ResizeObserver>"u")return;let B=0;const O=new ResizeObserver(()=>{cancelAnimationFrame(B),B=requestAnimationFrame(b)});return O.observe(M),()=>{cancelAnimationFrame(B),O.disconnect()}},[b,c,c==null?void 0:c.sizes]);const v=M=>{var B;return Math.round(M/(((B=c==null?void 0:c.element.current)==null?void 0:B.clientWidth)||1)*100)},w=()=>{var nt,G;const M=m();if(!M||!c)return;const B=((nt=c.element.current)==null?void 0:nt.clientWidth)??0,O=ro((G=c.specs.current[M.key])==null?void 0:G.size,B),Q=nv(M,O,c.sizes[M.key]);if(!Q.own)return g(Q.to);c.setSize(M.key,void 0),p({now:O,min:M.min,max:M.max})},_=N({limits:m,resize:g,step:w});_.current={limits:m,resize:g,step:w};const[x]=H(()=>rv(()=>u.current,()=>_.current));F(()=>()=>x.dispose(),[x]);const S=i["aria-label"]??l("splitHandle");return f("div",{ref:M=>{u.current=M,_s(a,M)},role:"separator","aria-orientation":"vertical","aria-label":S,...ut(i["aria-label"]===void 0?d("splitHandle"):void 0),"aria-valuenow":h?v(h.now):void 0,"aria-valuemin":h?v(h.min):void 0,"aria-valuemax":h?v(h.max):void 0,tabIndex:0,className:["clover-split-handle",e].filter(Boolean).join(" "),onPointerDown:M=>{o==null||o(M),x.down(M)},onPointerMove:M=>x.move(M),onPointerUp:M=>x.up(M),onPointerCancel:M=>x.up(M),onClick:M=>{r==null||r(M),x.click(M)},onKeyDown:M=>{s==null||s(M),x.key(M)},...i,children:[n,f(Ue,{label:S})]})});let hl;function av(t){hl=t}function ay(){return hl}function cv({open:t,onOpenChange:e,controls:n,side:o}){const{t:r,langOf:s}=Tt(),i=fe().replace(/:/g,"");return f(Fe,{id:`panel-${i}`,label:r("informationPanelToggle"),lang:s("informationPanelToggle"),expanded:t,controls:n,side:o==="start"?o:void 0,onClick:()=>e(!t),children:f(kt,{children:[f("rect",{x:"64",y:"96",width:"384",height:"320",rx:"40",fill:"none",strokeWidth:"36"}),f("path",{d:"M320 96v320",fill:"none",strokeWidth:"36"}),t&&f("path",{d:"M320 96h88a40 40 0 0 1 40 40v240a40 40 0 0 1-40 40h-88z"})]})})}let lv,so;const pl=()=>lv??(lv=import("./dragToClose-D2h8gIpa.mjs").then(t=>so=t));function uv(){pl()}function dv(t,{enabled:e,side:n,onClose:o,scrim:r,alongside:s,exits:i=false}){const a=N({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||(so==null||so.reset(c,a),!e))return;let l=true,d;return pl().then(u=>{l&&(d=u.attach(c,a))}),()=>{l=false,d==null||d()}},[t,e])}const fv=240,hv="16rem",pv="14rem",mv=31;function gv(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),fv);return()=>clearTimeout(s)},[t]),{mounted:e,open:t&&o}}function vv(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 yv=typeof window>"u"?F:Dt;function bv(t,e){const[n,o]=H();return yv(()=>{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 pa=typeof window>"u"?F:Dt;function _v({id:t,beside:e,defaultOpen:n,side:o,focus:r=vv,slides:s=true,alongside:i,followFocus:a}){var Y,I;const c=N(null),l=N(null),d=N(null),u=e===false,[h,p]=H(n),[m,g]=H(false),b=u?m:h,v=()=>document.querySelector(`button[aria-controls~="${t}"]`),w=()=>a(v),_=()=>{var E,A,U;(E=c.current)!=null&&E.contains(document.activeElement)&&((A=d.current)==null||A.removeAttribute("inert"),(U=v())==null||U.focus(),w())},x=N(0),S=E=>{x.current=u&&E?3:0,x.current||w(),u&&g(E),p(E)},M=()=>{_(),S(false)},B=N(e),O=N(false);if(B.current===true&&e===false){const E=document.activeElement;O.current=!!(E&&((Y=c.current)!=null&&Y.contains(E)||(I=v())!=null&&I.contains(E)))}pa(()=>{var E;O.current&&(O.current=false,(E=v())==null||E.focus(),w()),e===true&&g(false),B.current=e},[e]);const Q=gv(s&&u&&b),nt=s&&u,G=nt?Q.mounted:b,tt=nt?Q.open:b,K=u&&tt;return pa(()=>{const E=d.current;if(E)return K?E.setAttribute("inert",""):E.removeAttribute("inert"),()=>E.removeAttribute("inert")},[K]),F(()=>{if(!x.current||!c.current)return;x.current-=1;const E=r(c.current);E==null||E.focus({preventScroll:true}),E&&document.activeElement===E&&(x.current=0)}),dv(c,{enabled:u&&tt,side:o,onClose:M,scrim:l,alongside:i,exits:!s}),{pane:c,main:d,over:u,open:b,shown:G,opened:tt,setOpen:S,close:M,onKeyDown:E=>{u&&b&&E.key==="Escape"&&!E.defaultPrevented&&(E.preventDefault(),M())},scrim:u&&G&&{ref:l,"data-open":tt,"aria-hidden":true,onMouseDown:E=>E.preventDefault(),onClick:M}}}const wv=typeof window>"u"?F:Dt;function xv(t,e,n){wv(()=>{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 Sv=()=>import("./PanelPart-Di406l-a.mjs");function kv({id:t,beside:e,defaultOpen:n,side:o="end",followFocus:r,body:s,sections:i,panel:a}){const c=_v({id:t,beside:e,defaultOpen:n,side:o,followFocus:r}),l=!c.over&&c.open,d=N(null),[u,h]=H(),p=a??u,m=()=>Sv().then(v=>h(()=>v.default));F(()=>{c.open&&!p&&m()},[c.open]),xv(d,()=>s==null?void 0:s(),l&&!!s);const g=v=>{var w,_;(_=(w=v.target).closest)!=null&&_.call(w,`[aria-controls~="${t}"]`)&&(p||m(),c.over&&uv())},b=f(Cv,{sections:i,open:c.open,onOpenChange:v=>v&&!p?m().then(()=>c.setOpen(true)):c.setOpen(v),controls:t,side:o});return{...c,id:t,side:o,docked:l,spine:d,toggle:b,Part:p,splitProps:{"data-panel":c.over?"over":"beside",onKeyDown:c.onKeyDown,onPointerOver:g,onFocus:g}}}function Cv({sections:t,...e}){return ys(t).length?f(cv,{...e}):null}function Ev({pane:t,className:e,...n}){const{id:o,over:r,docked:s,side:i,Part:a}=t,c=ys(n.sections);if(!c.length)return null;const l=s&&f(kt,{children:[f(iv,{className:"clover-template-panel-handle","aria-controls":o}),f("div",{ref:t.spine,className:"clover-template-spine",children:t.toggle})]});return f(kt,{children:[i==="end"&&l,f(fl,{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:pv,"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 Mv=30;function Tv(){const t=N(0);return F(()=>()=>cancelAnimationFrame(t.current),[]),e=>{cancelAnimationFrame(t.current);let n=0;const o=()=>{const r=e();r&&Pv()?r.focus():++n<Mv&&(t.current=requestAnimationFrame(o))};t.current=requestAnimationFrame(o)}}function Pv(){const t=document.activeElement;return!t||t===document.body||!t.isConnected||t.closest("[hidden], [inert]")!==null}function Iv({className:t,header:e=true,headingLevel:n=2,panel:o=true,defaultPanelOpen:r,panelLayout:s="accordion",panelSections:i,panelLabels:a,download:c=true,languages:l=true,items:d="slider",singleItem:u=false,storageKey:h="clover-template-default",fill:p=false,collapseControls:m,canvasOptions:g,...b}){const v=N(null),w=fe().replace(/:/g,""),_=`${w}-panel`,x=Kc(n,`${w}-title`),S=kv({id:_,beside:bv(v,mv),defaultOpen:r??true,followFocus:Tv(),sections:i,body:()=>{var O;return(O=v.current)==null?void 0:O.querySelector(".clover-template-default-body")},panel:jg}),M=S.over,B=o&&S.docked;return f(Gd,{className:["clover-template-default",t].filter(Boolean).join(" "),"data-fill":p||void 0,...e?x.group:null,...b,children:f(sv,{ref:v,className:"clover-template-default-panes clover-template-panes",storageKey:h||void 0,...o?S.splitProps:{"data-panel":"beside"},children:[f(fl,{ref:S.main,className:"clover-template-default-main",min:M?void 0:hv,children:[e&&f("header",{className:"clover-template-default-header",children:[f(Lv,{title:x}),f(vo,{of:"targets",layout:"pager",size:"small",className:"clover-template-default-pager"}),f(ol,{className:"clover-template-default-provider",children:f(rl,{})})]}),f(Km,{loading:false}),f(dm,{className:"clover-template-default-body",collapseControls:m,options:g,children:o&&!B&&S.toggle}),f("div",{className:"clover-template-default-rail",children:[f("div",{className:"clover-template-default-rail-header",children:[f(Nv,{}),f(qm,{})]}),d&&f(vo,{layout:d,singleItem:u})]})]}),o&&f(Ev,{pane:S,className:"clover-template-default-panel",layout:s,sections:i,labels:a,download:c,languages:l,headingLevel:e?Ov(n):n})]})})}function Lv({title:t}){const e=at(o=>{var r;return o.throughCollection?(r=o.collection)==null?void 0:r.label:void 0}),n=Gh();return Av(n==null?void 0:n.entries[0]),f(kt,{children:[f(nn,{as:t.as,className:"clover-template-default-title clover-template-title clover-title",...t.title}),e&&f("div",{className:"clover-template-default-collection-row",children:[f(nn,{as:"p",label:e,className:"clover-template-default-collection"}),f(vo,{of:"members",layout:"pager",size:"small",className:"clover-template-default-pager"})]}),n&&f("div",{className:"clover-template-default-collection-row",children:[n.label&&f(nn,{as:"p",label:n.label,className:"clover-template-default-collection"}),f(vo,{of:"annotations",layout:"pager",size:"small",className:"clover-template-default-pager"})]})]})}function Av(t){const{clover:e}=de(),n=at(r=>{var s;return(s=r.manifest)==null?void 0:s.id}),o=N(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 Ov=t=>t+1;function Nv(){const t=fs();return f("p",{className:"clover-template-default-titles",children:t.map((e,n)=>f(ae.Fragment,{children:[n>0&&f("span",{className:"clover-template-default-titles-dot","aria-hidden":"true",children:"\xB7"}),f(nn,{label:e.label})]},e.id))})}const Rv=()=>import("./renderers-zvRp3xYJ.mjs"),Bv=gt(()=>import("./Document-DiXiOkPn.mjs").then(t=>({default:t.Document}))),$v=gt(()=>import("./Gallery-BYmzAEuZ.mjs").then(t=>({default:t.Gallery}))),ma={default:Iv,document:Bv,gallery:$v},Fv={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 Dv({props:t}){const e=typeof t.template=="string"&&t.template in ma?t.template:"default",n=Object.fromEntries(Object.entries(t).filter(([i])=>{var a;return i!=="template"&&(((a=Fv[i])==null?void 0:a.includes(e))??true)})),o=Qe(Rv,!!t.renderers),r=yt(()=>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=ma[e];return f(wt,{fallback:null,children:f(s,{...n,iiifContent:t.iiifContent})})}const zv=""+new URL("../assets/maplibre-gl-worker-kTz9OPxr.js",import.meta.url).href,Hv={mapWorkerUrl:zv},Wv={tag:"clover-viewer",kind:"alone",attributes:{template:{prop:"template",type:["default","document","gallery"]},"iiif-content":{prop:"iiifContent",type:"string"},"canvas-id":{prop:"defaultCanvasId",type:"string"},"manifest-id":{prop:"defaultManifestId",type:"string"},language:{prop:"language",type:"string"},"high-contrast":{prop:"highContrast",type:"boolean"},"search-query":{prop:"searchQuery",type:"string"},annotations:{prop:"annotations",type:"data"},"heading-level":{prop:"headingLevel",type:"number",min:2},items:{prop:"items",type:["slider","list","grid","masonry","false"]},"single-item":{prop:"singleItem",type:"boolean"},header:{prop:"header",type:"boolean"},panel:{prop:"panel",type:"boolean"},download:{prop:"download",type:"boolean"},languages:{prop:"languages",type:"boolean"},"panel-open":{prop:"defaultPanelOpen",type:"boolean"},"panel-layout":{prop:"panelLayout",type:["accordion","tabs"]},"panel-sections":{prop:"panelSections",type:"data"},"panel-labels":{prop:"panelLabels",type:"data"},"sidebar-open":{prop:"defaultSidebarOpen",type:"boolean"},"storage-key":{prop:"storageKey",type:"string"},fill:{prop:"fill",type:"boolean"},"collapse-controls":{prop:"collapseControls",type:["auto","always"]},size:{prop:"size",type:"string"},height:{prop:"height",type:"string"},gap:{prop:"gap",type:"string"},secondary:{prop:"secondary",type:["summary","navDate","none"]},summary:{prop:"summary",type:"boolean"},"lightbox-items":{prop:"lightboxItems",type:["slider","pager"]}},properties:["iiifContent","annotations","request","renderers","canvasOptions"],events:{"clover-canvas-change":{prop:"onCanvasChange",detail:["canvasId"]},"clover-manifest-change":{prop:"onManifestChange",detail:["manifestId"]},"clover-status-change":{prop:"onStatusChange",detail:["status","error"]},"clover-content-state-change":{prop:"onContentStateChange",detail:"first"}}};av(Hv.mapWorkerUrl);Kl(Wv,()=>Promise.resolve(Dv));export{uu as $,N as A,dm as B,ne as C,sv as D,fl as E,vo as F,iv as G,hv as H,rf as I,Ev as J,uv as K,nn as L,ru as M,at as N,Gh as O,qm as P,ey as Q,Gd as R,Km as S,yt as T,qh as U,wt as V,gt as W,la as X,ue as Y,zt as Z,Dt as _,de as a,bc as a$,jg as a0,Ad as a1,ry as a2,Xr as a3,Xc as a4,Yc as a5,En as a6,Jc as a7,od as a8,_t as a9,ae as aA,xf as aB,lh as aC,fc as aD,ac as aE,ah as aF,ch as aG,Cf as aH,Mc as aI,kd as aJ,is as aK,Jh as aL,Ui as aM,lf as aN,gc as aO,Gt as aP,mf as aQ,ih as aR,Sf as aS,Fe as aT,Jd as aU,fh as aV,Sn as aW,uf as aX,of as aY,df as aZ,ff as a_,vs as aa,ut as ab,Nt as ac,oc as ad,_d as ae,We as af,Tt as ag,Eo as ah,Mt as ai,Vm as aj,re as ak,jm as al,wo as am,qr as an,Kr as ao,In as ap,fp as aq,Gi as ar,Zi as as,Bc as at,fs as au,Xh as av,Xi as aw,Yr as ax,xo as ay,W as az,Mu as b,Yu as b$,pf as b0,hf as b1,nd as b2,ng as b3,og as b4,Uh as b5,ye as b6,Ag as b7,ty as b8,Yv as b9,Lc as bA,Uf as bB,Qa as bC,an as bD,Jr as bE,ps as bF,Sd as bG,Jv as bH,Vf as bI,Ie as bJ,sr as bK,ns as bL,Rn as bM,pm as bN,mm as bO,Zr as bP,dp as bQ,Ln as bR,ay as bS,Uc as bT,te as bU,ad as bV,Wf as bW,Qc as bX,sf as bY,Rd as bZ,pd as b_,Vv as ba,Ja as bb,iy as bc,De as bd,kc as be,nh as bf,sl as bg,Ka as bh,sy as bi,yd as bj,ts as bk,qv as bl,Qo as bm,ls as bn,hg as bo,_o as bp,Qe as bq,Hh as br,ec as bs,Co as bt,un as bu,lc as bv,fv as bw,al as bx,Ti as by,dd as bz,Oc as c,sh as c0,Xa as c1,sp as c2,ud as c3,cn as c4,An as c5,Pr as c6,Xf as c7,pc as c8,Kv as c9,Zv as ca,Gv as cb,ip as cc,Yp as cd,Vi as ce,Qh as cf,tp as cg,Qv as ch,le as ci,oe as cj,eo as ck,Ym as cl,tl as cm,Xv as cn,cs as co,gm as cp,mc as cq,zl as cr,bm as cs,Zh as d,H as e,fe as f,ny as g,oy as h,Tv as i,_v as j,kt as k,bv as l,kv as m,gu as n,mv as o,Ue as p,dt as q,ms as r,ym as s,Kc as t,f as u,ze as v,ol as w,ie as x,F as y,rl as z};
|