@nulib/clover 4.6.1 → 4.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/base.css +1 -0
- package/dist/components/Canvas/ControlMenu.mjs +1 -1
- package/dist/components/Canvas/PlaceBox.mjs +1 -1
- package/dist/components/Canvas/media/Transport.mjs +1 -1
- package/dist/components/CollectionSelect/CollectionSelect.mjs +1 -1
- package/dist/components/Contents/Contents.mjs +9 -1
- package/dist/components/Items/clamped.mjs +1 -1
- package/dist/i18n/locales/en.json.mjs +1 -1
- package/dist/i18n/locales/es.json.mjs +1 -1
- package/dist/i18n/locales/fi.json.mjs +1 -1
- package/dist/i18n/locales/fr.json.mjs +1 -1
- package/dist/i18n/locales/it.json.mjs +1 -1
- package/dist/i18n/locales/ja.json.mjs +1 -1
- package/dist/i18n/locales/nb.json.mjs +1 -1
- package/dist/i18n/locales/nn.json.mjs +1 -1
- package/dist/i18n/locales/no.json.mjs +1 -1
- package/dist/i18n/locales/pt.json.mjs +1 -1
- package/dist/i18n/locales/zh-Hans.json.mjs +1 -1
- package/dist/i18n/locales/zh-Hant.json.mjs +1 -1
- package/dist/spacing.css +1 -0
- package/dist/styles/core.css +1 -1
- package/dist/styles/items.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/ui/Tip.mjs +16 -10
- package/dist/ui/adoptSheet.mjs +6 -0
- package/dist/web-components/{About-I4h1cfup.mjs → About-Cb0IP45J.mjs} +1 -1
- package/dist/web-components/{AnnotationItems-BfQm1YRD.mjs → AnnotationItems-vwOrc2LC.mjs} +1 -1
- package/dist/web-components/{AnnotationMenu-guk9SbaL.mjs → AnnotationMenu-DEbZR6u5.mjs} +1 -1
- package/dist/web-components/{AnnotationState-BX7xh-bd.mjs → AnnotationState-CHI2fYVb.mjs} +1 -1
- package/dist/web-components/{Annotations-BJrje3Ey.mjs → Annotations-DelBDbuL.mjs} +1 -1
- package/dist/web-components/{Annotations-DBxLDLDf.mjs → Annotations-DvLurCSg.mjs} +1 -1
- package/dist/web-components/{Body-CQuiRv9p.mjs → Body-eYyY_zlC.mjs} +1 -1
- package/dist/web-components/{BodyAlert-DF9rnG5o.mjs → BodyAlert-DeoEp76n.mjs} +1 -1
- package/dist/web-components/{Button-qhI73GCI.mjs → Button-M-Lskr_F.mjs} +1 -1
- package/dist/web-components/{Camera-D2MnETlC.mjs → Camera-Z7dN1HO1.mjs} +1 -1
- package/dist/web-components/{Canvas2DBackend-kJpOk_Pb.mjs → Canvas2DBackend-BqkQkUat.mjs} +1 -1
- package/dist/web-components/{CanvasView-B752g1bm.mjs → CanvasView-DC9Zf7Tn.mjs} +2 -2
- package/dist/web-components/{CaptionDetails-Cl3fLJfr.mjs → CaptionDetails-D9OrUqvi.mjs} +1 -1
- package/dist/web-components/{ChaptersMenu-CB4zdVOh.mjs → ChaptersMenu-PjHy5-zS.mjs} +1 -1
- package/dist/web-components/{Chevron-CT1ntI6B.mjs → Chevron-lIH5boXF.mjs} +1 -1
- package/dist/web-components/{ChoiceMenu-DoXMSLjk.mjs → ChoiceMenu-Coknxzkh.mjs} +1 -1
- package/dist/web-components/{Collection-B8ipKdPl.mjs → Collection-DfWwFkgY.mjs} +1 -1
- package/dist/web-components/CollectionSelect-CYa0N09G.mjs +1 -0
- package/dist/web-components/{Connected-shq2_tc-.mjs → Connected-CkrBE4v-.mjs} +1 -1
- package/dist/web-components/{Connected-L47VwCva.mjs → Connected-Dy4Fjp_-.mjs} +1 -1
- package/dist/web-components/{Connected-DaP_DgGw.mjs → Connected-tpnive3y.mjs} +1 -1
- package/dist/web-components/Contents-JgQb97do.mjs +1 -0
- package/dist/web-components/ControlMenu-DARWTFzU.mjs +1 -0
- package/dist/web-components/ControlsFade-DXN4_Kcr.mjs +1 -0
- package/dist/web-components/{CountMenu-CQ7ThPWJ.mjs → CountMenu-DNkuen7t.mjs} +1 -1
- package/dist/web-components/Cue-CcxumEor.mjs +1 -0
- package/dist/web-components/{Document-BChOw20c.mjs → Document-74sHCl40.mjs} +1 -1
- package/dist/web-components/{DomLayers-BIFA6J56.mjs → DomLayers-B0tKZUWz.mjs} +1 -1
- package/dist/web-components/{Download-BfZJVu-O.mjs → Download-CVmsdUyH.mjs} +1 -1
- package/dist/web-components/{EntryBodies-Bld2RXeE.mjs → EntryBodies-BrGtXUx4.mjs} +1 -1
- package/dist/web-components/{EntryThumbnail-C5df3CaH.mjs → EntryThumbnail-DZPp7vk8.mjs} +1 -1
- package/dist/web-components/{FieldPill-Dx--yBoK.mjs → FieldPill-Dr-7bigM.mjs} +1 -1
- package/dist/web-components/{FrameAnimation-CpniJMTK.mjs → FrameAnimation-Dr4lStqa.mjs} +1 -1
- package/dist/web-components/{Gallery-CkaSdVAP.mjs → Gallery-BI_p4a2m.mjs} +1 -1
- package/dist/web-components/{GlobeGlyph-CCi1sZgm.mjs → GlobeGlyph-Bo56m375.mjs} +1 -1
- package/dist/web-components/{HideToggle-nvJtMFOZ.mjs → HideToggle-COFq37Jg.mjs} +1 -1
- package/dist/web-components/{ImageControls-Df-M7F2R.mjs → ImageControls-DQwLWsTL.mjs} +1 -1
- package/dist/web-components/Items-Co-0SKPW.mjs +1 -0
- package/dist/web-components/{ItemsVertical-Dmhm1DBy.mjs → ItemsVertical-Dv3gKZJ2.mjs} +1 -1
- package/dist/web-components/{Label-DElSTYS5.mjs → Label-BGPmD5NF.mjs} +1 -1
- package/dist/web-components/{LanguageChoice-t55qbd8x.mjs → LanguageChoice-DTNAjTpR.mjs} +1 -1
- package/dist/web-components/{LanguageMenu-BlFBWRSO.mjs → LanguageMenu-DViT7hCI.mjs} +1 -1
- package/dist/web-components/{LightboxView-BhPao9ao.mjs → LightboxView-DUEAuXcS.mjs} +1 -1
- package/dist/web-components/{ListEnd-KSoUQrsM.mjs → ListEnd-Ccc_v93N.mjs} +1 -1
- package/dist/web-components/{Loaded-uGqT3xyD.mjs → Loaded-DlWNFC49.mjs} +1 -1
- package/dist/web-components/{LoadedCanvas-fqjWHH0H.mjs → LoadedCanvas-BU03onyH.mjs} +1 -1
- package/dist/web-components/LoadedMap-Qernkf9V.mjs +1 -0
- package/dist/web-components/{Loading-DSaV1vxb.mjs → Loading-1cRP8fn5.mjs} +1 -1
- package/dist/web-components/{Map-CUY8HEgh.mjs → Map-DdcDYjzX.mjs} +1 -1
- package/dist/web-components/{MapView-DIVMYZZ1.mjs → MapView-BW4dD40Q.mjs} +2 -2
- package/dist/web-components/{Markup-DzUsOaNC.mjs → Markup-23-Aibht.mjs} +1 -1
- package/dist/web-components/{MediaBody-CN2ZTxK0.mjs → MediaBody-C37X6xTP.mjs} +1 -1
- package/dist/web-components/{MediaBody-CJELKAWJ.mjs → MediaBody-dXy6NIcq.mjs} +1 -1
- package/dist/web-components/{NavDate-CD3sFxZJ.mjs → NavDate-DT_7gQEE.mjs} +1 -1
- package/dist/web-components/{Navigator-CVDhe8R_.mjs → Navigator-COqGN-K4.mjs} +1 -1
- package/dist/web-components/{Pager-BmZaB--9.mjs → Pager-DY6QIfJo.mjs} +1 -1
- package/dist/web-components/{PagerLayout-DhIz3hKA.mjs → PagerLayout-CXSF9P8N.mjs} +1 -1
- package/dist/web-components/{Panel-CdJyJVBh.mjs → Panel-Dj_tQ89q.mjs} +1 -1
- package/dist/web-components/PanelPart-BPWf5byV.mjs +1 -0
- package/dist/web-components/{PanelToggle-BqVj7sX0.mjs → PanelToggle-D9JBD6t1.mjs} +1 -1
- package/dist/web-components/{PartOfManifest-Dgw1shMM.mjs → PartOfManifest-14dPnF-N.mjs} +1 -1
- package/dist/web-components/{Pending-CDXsIk5O.mjs → Pending-BsqpZMEF.mjs} +1 -1
- package/dist/web-components/PlaceBox-B_OXZC8S.mjs +1 -0
- package/dist/web-components/{Placeholder-D8Sabput.mjs → Placeholder-BBjY81nx.mjs} +1 -1
- package/dist/web-components/{Position-oFMJoo4P.mjs → Position-qHH_2RQA.mjs} +1 -1
- package/dist/web-components/{Primitives-BdXIEpYW.mjs → Primitives-3boP2HT0.mjs} +1 -1
- package/dist/web-components/{Provider-DWIlPOzR.mjs → Provider-laA0MWws.mjs} +1 -1
- package/dist/web-components/{ReadMore-f34RbHMm.mjs → ReadMore-Trj9tAw5.mjs} +1 -1
- package/dist/web-components/{Root-CEtLCE4Y.mjs → Root-DIfyZZ9O.mjs} +1 -1
- package/dist/web-components/Scene-DGLalXcX.mjs +1 -0
- package/dist/web-components/{SceneView-D635_fRV.mjs → SceneView-B7Zrpafx.mjs} +1 -1
- package/dist/web-components/{Search-219u7M8o.mjs → Search-DhsZJhFF.mjs} +1 -1
- package/dist/web-components/{Sections-C3fPhGNx.mjs → Sections-EpYlUFGL.mjs} +1 -1
- package/dist/web-components/{SeekMarks-Ds8v3SaW.mjs → SeekMarks-C0NHUzE_.mjs} +1 -1
- package/dist/web-components/{StandaloneItems-Mdh-k3w9.mjs → StandaloneItems-cmPpspAM.mjs} +1 -1
- package/dist/web-components/{Status-CEkhPlDF.mjs → Status-BeDk5zEi.mjs} +1 -1
- package/dist/web-components/{Steps-BoNd47eB.mjs → Steps-BDB0OPKa.mjs} +1 -1
- package/dist/web-components/{TargetItems-dFjJs-VP.mjs → TargetItems-DHcGeFqU.mjs} +1 -1
- package/dist/web-components/Timeline-DWhKhdYb.mjs +1 -0
- package/dist/web-components/Tip-PBxp-ONQ.mjs +1 -0
- package/dist/web-components/{Transcript-5wVgmZmU.mjs → Transcript-DbhV6Vxo.mjs} +1 -1
- package/dist/web-components/Transport-BtIKsYml.mjs +1 -0
- package/dist/web-components/{Transport-DdNRlSa0.mjs → Transport-wJNLFRXZ.mjs} +1 -1
- package/dist/web-components/{annotation-collection-C3UpNV1K.mjs → annotation-collection-DA_XNrVM.mjs} +1 -1
- package/dist/web-components/{annotation-name-DhMF4ZHj.mjs → annotation-name-DCHYfYjG.mjs} +1 -1
- package/dist/web-components/{annotations-content-CuWJZr4t.mjs → annotations-content-CLVJE9-j.mjs} +1 -1
- package/dist/web-components/{body-Bym9Uvav.mjs → body-DY6_Kb7A.mjs} +1 -1
- package/dist/web-components/{canvas-BIXBggVo.mjs → canvas-BsmSDfXr.mjs} +1 -1
- package/dist/web-components/{cloverEngine-BEdb3g52.mjs → cloverEngine-xAanVNmS.mjs} +1 -1
- package/dist/web-components/{content-state-reader-BGZEChSM.mjs → content-state-reader-CHLSQAIO.mjs} +1 -1
- package/dist/web-components/{controlGlyphs-DMQCxKaT.mjs → controlGlyphs-LR_viOPR.mjs} +1 -1
- package/dist/web-components/{controls-B1pIwRgH.mjs → controls-CSwaU0O6.mjs} +1 -1
- package/dist/web-components/{downloads-DwzBIS-9.mjs → downloads-UWzv4fZU.mjs} +1 -1
- package/dist/web-components/{dragToClose-BYUJ9qgo.mjs → dragToClose-BXoYlfWj.mjs} +1 -1
- package/dist/web-components/{engine-DUv-Syum.mjs → engine-Codq0RYR.mjs} +1 -1
- package/dist/web-components/{engines-BzM_oBU_.mjs → engines-kj0OVyAK.mjs} +1 -1
- package/dist/web-components/{es-Bx-zZBfZ.mjs → es-Czdt8By_.mjs} +1 -1
- package/dist/web-components/{fetchManifest-Cp7c8vs5.mjs → fetchManifest-Cw6_bmlS.mjs} +1 -1
- package/dist/web-components/{fi-DsP1FhBy.mjs → fi-RWtClOWA.mjs} +1 -1
- package/dist/web-components/{follow-content-CmXq05TW.mjs → follow-content-DcFvV4qy.mjs} +1 -1
- package/dist/web-components/{fr-BuL_F9Jq.mjs → fr-CFRY9P3c.mjs} +1 -1
- package/dist/web-components/{fromManifest-DbgwTeBo.mjs → fromManifest-Bzpc1R9t.mjs} +1 -1
- package/dist/web-components/{glyphs-atKuagcd.mjs → glyphs-BuGNvvP-.mjs} +1 -1
- package/dist/web-components/{hooks-DhTYPPVG.mjs → hooks-CAA2UpX_.mjs} +1 -1
- package/dist/web-components/{image-layers-CoBPhMZw.mjs → image-layers-DhYm73Ju.mjs} +1 -1
- package/dist/web-components/{image-service-content-CL_EZugL.mjs → image-service-content-Rn8Tl4Hk.mjs} +1 -1
- package/dist/web-components/{imageService-BoQQvo1U.mjs → imageService-BBwzg9uY.mjs} +1 -1
- package/dist/web-components/index-BujnlXi0.mjs +1 -0
- package/dist/web-components/index.mjs +1 -1
- package/dist/web-components/{it-DH3EtrgI.mjs → it-D_Hb0t9G.mjs} +1 -1
- package/dist/web-components/items-CD8kE1Gd.mjs +1 -0
- package/dist/web-components/{items-CjtUJjSU.mjs → items-DjWXCG9C.mjs} +1 -1
- package/dist/web-components/{ja-BEHbDotv.mjs → ja-BoJ9dFmn.mjs} +1 -1
- package/dist/web-components/label-CssXf-do.mjs +1 -0
- package/dist/web-components/{layout-zjkkOHIj.mjs → layout-CwH0NLMY.mjs} +1 -1
- package/dist/web-components/{link-CrNaByf-.mjs → link-Ujj3Xhp2.mjs} +1 -1
- package/dist/web-components/logo-Bd8fSMYN.mjs +1 -0
- package/dist/web-components/{models-BFKa5v_H.mjs → models-CxmIV7Mb.mjs} +1 -1
- package/dist/web-components/{nb-Bdfn_mZs.mjs → nb-B43QGinl.mjs} +1 -1
- package/dist/web-components/{nn-BCWbSuK0.mjs → nn-BmkkC79H.mjs} +1 -1
- package/dist/web-components/{no-Bdfn_mZs.mjs → no-B43QGinl.mjs} +1 -1
- package/dist/web-components/{nodes-BDyXzQhk.mjs → nodes-CDVV_37U.mjs} +1 -1
- package/dist/web-components/{overlayImage-BGxovfPN.mjs → overlayImage-T6FKPFQJ.mjs} +1 -1
- package/dist/web-components/{panel-rEGhe5fL.mjs → panel-DhzvJaxa.mjs} +1 -1
- package/dist/web-components/part-D1ZpOfJ5.mjs +1 -0
- package/dist/web-components/{playerSurface-BthXi9l2.mjs → playerSurface-BxtfijMA.mjs} +1 -1
- package/dist/web-components/{pointer-C22ufJ5w.mjs → pointer-DWmL4uP7.mjs} +1 -1
- package/dist/web-components/{provider-B2C3eH9p.mjs → provider-BziMOPSN.mjs} +1 -1
- package/dist/web-components/{pt-Da5El49z.mjs → pt-BbtIGupi.mjs} +1 -1
- package/dist/web-components/{range-regions-Ytq4QkMX.mjs → range-regions-V0yKxXzo.mjs} +1 -1
- package/dist/web-components/{read-more-B7LHzF4-.mjs → read-more-DdhUDS2g.mjs} +1 -1
- package/dist/web-components/{readingLanguages-B20n_dkw.mjs → readingLanguages-CtdxDxbb.mjs} +1 -1
- package/dist/web-components/{rendererSurface-BfZP5clN.mjs → rendererSurface-B6BzhEeK.mjs} +2 -2
- package/dist/web-components/{renderers-C569MeQB.mjs → renderers-BmoCXuIv.mjs} +1 -1
- package/dist/web-components/{resource-C5cMic8z.mjs → resource-BjumsIsL.mjs} +1 -1
- package/dist/web-components/{save-file-DsYdCZpi.mjs → save-file-BCXU9sr5.mjs} +1 -1
- package/dist/web-components/{search-kJ_71fbN.mjs → search-Bn5kscQv.mjs} +1 -1
- package/dist/web-components/shared-pIVPxZLY.mjs +1 -0
- package/dist/web-components/{show-link-BqrJDDMV.mjs → show-link-DG3TQzXI.mjs} +1 -1
- package/dist/web-components/{sizedImage-CyCf0GtL.mjs → sizedImage-CagzYSJ_.mjs} +1 -1
- package/dist/web-components/{split-BZRKCI3g.mjs → split-C_xPhLhD.mjs} +1 -1
- package/dist/web-components/{status-CwO2mygB.mjs → status-BesMKiXg.mjs} +1 -1
- package/dist/web-components/styles-BU6g0i7W.mjs +1 -0
- package/dist/web-components/three.mjs +1 -1
- package/dist/web-components/{thumbnail-Np4ftjUo.mjs → thumbnail-bCaBWTkt.mjs} +1 -1
- package/dist/web-components/{tip-CNyxI6xd.mjs → tip-UheLXik6.mjs} +1 -1
- package/dist/web-components/{toggle-lop2se80.mjs → toggle-Bl0NKbUx.mjs} +1 -1
- package/dist/web-components/{useContainerName-DR_6TyDU.mjs → useContainerName-CDABwGvV.mjs} +1 -1
- package/dist/web-components/{useControlsVisibility-Dig_1-0T.mjs → useControlsVisibility-Dpl7D0m0.mjs} +1 -1
- package/dist/web-components/{useNearViewport-B_kjW0WB.mjs → useNearViewport-C_3U4CAr.mjs} +1 -1
- package/dist/web-components/{useScrollTrack-6BV6IizZ.mjs → useScrollTrack-QFtFpyV3.mjs} +1 -1
- package/dist/web-components/viewer/{AnnotationItems-BDFH_6F_.mjs → AnnotationItems-FXIoYk9T.mjs} +1 -1
- package/dist/web-components/viewer/{AnnotationMenu-BHCrJoNx.mjs → AnnotationMenu-nlFTIjg6.mjs} +1 -1
- package/dist/web-components/viewer/{AnnotationState-BV0fzlj8.mjs → AnnotationState-Diacn0Xk.mjs} +1 -1
- package/dist/web-components/viewer/{Annotations-DEqkGlE1.mjs → Annotations-Bs94MQmn.mjs} +1 -1
- package/dist/web-components/viewer/{Annotations-BhA_Bbyj.mjs → Annotations-CAmFWoUj.mjs} +1 -1
- package/dist/web-components/viewer/{Canvas2DBackend-Bq_bo1mL.mjs → Canvas2DBackend-BztBm6yM.mjs} +1 -1
- package/dist/web-components/viewer/{CaptionDetails-D6Gd_EGS.mjs → CaptionDetails-lhSoA0rU.mjs} +1 -1
- package/dist/web-components/viewer/{ChaptersMenu-DE2TFesS.mjs → ChaptersMenu-hOyR7aOL.mjs} +1 -1
- package/dist/web-components/viewer/{ChoiceMenu-BVlpPUhr.mjs → ChoiceMenu-Dq4FBYhi.mjs} +1 -1
- package/dist/web-components/viewer/{Collection-DIgmeOCD.mjs → Collection-XZzrypzP.mjs} +1 -1
- package/dist/web-components/viewer/{Connected-7TgFouaR.mjs → Connected-BKk80iCZ.mjs} +1 -1
- package/dist/web-components/viewer/{Connected-D9dz_v1p.mjs → Connected-nHyQM-64.mjs} +1 -1
- package/dist/web-components/viewer/Contents-0FL0Dr2p.mjs +1 -0
- package/dist/web-components/viewer/ControlMenu-BRUWyNEi.mjs +1 -0
- package/dist/web-components/viewer/ControlsFade-9CrQlxNq.mjs +1 -0
- package/dist/web-components/viewer/{CountMenu-CCEH_rEu.mjs → CountMenu-BxdPpin6.mjs} +1 -1
- package/dist/web-components/viewer/Cue-B75D4FgX.mjs +1 -0
- package/dist/web-components/viewer/{Document-8ADB98RM.mjs → Document-CN5l-m01.mjs} +1 -1
- package/dist/web-components/viewer/{DomLayers-BXPbPq1a.mjs → DomLayers-CvZPZjNg.mjs} +1 -1
- package/dist/web-components/viewer/{Download-YfjzAcAF.mjs → Download-B9UuJ9wY.mjs} +1 -1
- package/dist/web-components/viewer/{EntryBodies-B2DBmUYl.mjs → EntryBodies-BNtItsOn.mjs} +1 -1
- package/dist/web-components/viewer/{EntryThumbnail-B2cRaP5D.mjs → EntryThumbnail-BQepnfmY.mjs} +1 -1
- package/dist/web-components/viewer/{FieldPill-C7o8586T.mjs → FieldPill-D0efaqWg.mjs} +1 -1
- package/dist/web-components/viewer/{FrameAnimation-CytZC2Lx.mjs → FrameAnimation-C5bLeZc9.mjs} +1 -1
- package/dist/web-components/viewer/{Gallery-CQma5dBZ.mjs → Gallery-BuhT4BOj.mjs} +1 -1
- package/dist/web-components/viewer/{GlobeGlyph-UxhwZJy1.mjs → GlobeGlyph-B1Q5TIaT.mjs} +1 -1
- package/dist/web-components/viewer/{HideToggle-DZMCACLG.mjs → HideToggle-Dh4AUuX3.mjs} +1 -1
- package/dist/web-components/viewer/{ImageControls-fzFWqFVh.mjs → ImageControls-ClVI428k.mjs} +1 -1
- package/dist/web-components/viewer/{ItemsVertical-BftsRVJP.mjs → ItemsVertical-BRiKuRL-.mjs} +1 -1
- package/dist/web-components/viewer/{LanguageChoice-B8F2WhUM.mjs → LanguageChoice-BTUONm8l.mjs} +1 -1
- package/dist/web-components/viewer/{LanguageMenu-BIpATvd4.mjs → LanguageMenu-NDTTmazt.mjs} +1 -1
- package/dist/web-components/viewer/{LightboxView-D-6yYXCc.mjs → LightboxView-DMTkdJB6.mjs} +1 -1
- package/dist/web-components/viewer/{ListEnd-DhrDIRKM.mjs → ListEnd-D2sYRngp.mjs} +1 -1
- package/dist/web-components/viewer/{MapView-XFUp4DVX.mjs → MapView-WwJmyeZr.mjs} +2 -2
- package/dist/web-components/viewer/{MediaBody-D-1SNnW2.mjs → MediaBody-CepsC09h.mjs} +1 -1
- package/dist/web-components/viewer/{MediaBody-C3fVbzuD.mjs → MediaBody-qOIVDdNm.mjs} +1 -1
- package/dist/web-components/viewer/{NavDate-B47wyKdc.mjs → NavDate-Co0A4bkP.mjs} +1 -1
- package/dist/web-components/viewer/{Navigator-BqNBxE5l.mjs → Navigator-Dyf2F7fU.mjs} +1 -1
- package/dist/web-components/viewer/{PagerLayout-DKdFxLZ1.mjs → PagerLayout-nnWJump4.mjs} +1 -1
- package/dist/web-components/viewer/PanelPart-D479R8OK.mjs +1 -0
- package/dist/web-components/viewer/{PartOfManifest-DF40jLNB.mjs → PartOfManifest-7z0GBIsk.mjs} +1 -1
- package/dist/web-components/viewer/PlaceBox-Icavvsim.mjs +1 -0
- package/dist/web-components/viewer/{Placeholder-BhAzmG0d.mjs → Placeholder-DF1FFSpC.mjs} +1 -1
- package/dist/web-components/viewer/{Search-CTkCx-SZ.mjs → Search-BSK3yFqw.mjs} +1 -1
- package/dist/web-components/viewer/{SeekMarks-8NvVfr4F.mjs → SeekMarks-267Lxpeb.mjs} +1 -1
- package/dist/web-components/viewer/{StandaloneItems-P1ygiZtX.mjs → StandaloneItems-Cv4dGiJh.mjs} +1 -1
- package/dist/web-components/viewer/{Steps-DwqiM7sH.mjs → Steps-C1BHjJsE.mjs} +1 -1
- package/dist/web-components/viewer/{TargetItems-B873PbFR.mjs → TargetItems-CBsfkmeg.mjs} +1 -1
- package/dist/web-components/viewer/{Transcript-D7cFMWGk.mjs → Transcript-BBtNC39n.mjs} +1 -1
- package/dist/web-components/viewer/Transport-BZB1ZAvP.mjs +1 -0
- package/dist/web-components/viewer/{Transport-DPURF464.mjs → Transport-DXFW6beP.mjs} +1 -1
- package/dist/web-components/viewer/{annotation-collection-BwY8uYqa.mjs → annotation-collection-BcDJ7GZv.mjs} +1 -1
- package/dist/web-components/viewer/{annotation-name-DQMCd2DB.mjs → annotation-name-CPXHHlGo.mjs} +1 -1
- package/dist/web-components/viewer/{annotations-content-q11OcPdT.mjs → annotations-content-Cb7_aoII.mjs} +1 -1
- package/dist/web-components/viewer/{cloverEngine-K2HNl3W1.mjs → cloverEngine-CX9s9-Uu.mjs} +1 -1
- package/dist/web-components/viewer/{content-state-reader-BhDMcVmC.mjs → content-state-reader-CIVUq8ar.mjs} +1 -1
- package/dist/web-components/viewer/{dragToClose-BFhEkxmf.mjs → dragToClose-BGb6fAd6.mjs} +1 -1
- package/dist/web-components/viewer/{fetchManifest-aJRqlL7Q.mjs → fetchManifest-D8zizfoi.mjs} +1 -1
- package/dist/web-components/viewer/{follow-content-Cy0flRSN.mjs → follow-content-BOcIhHhz.mjs} +1 -1
- package/dist/web-components/viewer/{host-C4OSSUrc.mjs → host-CNGrorb7.mjs} +1 -1
- package/dist/web-components/viewer/{image-layers-BmOyugIr.mjs → image-layers-DGdl54CF.mjs} +1 -1
- package/dist/web-components/viewer/{image-service-content-BuqFuXBZ.mjs → image-service-content-DpXbrUuI.mjs} +1 -1
- package/dist/web-components/viewer/index.mjs +1 -1
- package/dist/web-components/viewer/{link-BtdcvLLg.mjs → link-CwQzXqUe.mjs} +1 -1
- package/dist/web-components/viewer/{overlayImage-BOilakHT.mjs → overlayImage-DtyovrNi.mjs} +1 -1
- package/dist/web-components/viewer/{range-regions-S1HcVfpb.mjs → range-regions-iACwlawo.mjs} +1 -1
- package/dist/web-components/viewer/{renderers-CetbXlHH.mjs → renderers-DUD0Xleg.mjs} +1 -1
- package/dist/web-components/viewer/{save-file-BohgaD35.mjs → save-file-Z6klARC7.mjs} +1 -1
- package/dist/web-components/viewer/{search-C0ZHXQW-.mjs → search-TNACVRnK.mjs} +1 -1
- package/dist/web-components/viewer/styles-CLp9tx_B.mjs +1 -0
- package/dist/web-components/viewer/{useControlsVisibility-CmA6PMfv.mjs → useControlsVisibility-C-Af-o1n.mjs} +1 -1
- package/dist/web-components/viewer/viewer-7dcL5wmD.mjs +29 -0
- package/dist/web-components/viewer/{vtt-BIJk7HEl.mjs → vtt-DLGuRf3w.mjs} +1 -1
- package/dist/web-components/{viewer-f_6tefcG.mjs → viewer-Br37L21l.mjs} +1 -1
- package/dist/web-components/{vtt-BRwnCWbJ.mjs → vtt-DnFNzhne.mjs} +1 -1
- package/dist/web-components/{zh-Hans-BhTHTZXT.mjs → zh-Hans-BAFQ7Pft.mjs} +1 -1
- package/dist/web-components/{zh-Hant-_CJAOTzC.mjs → zh-Hant-DS7iN4iO.mjs} +1 -1
- package/package.json +3 -1
- package/dist/web-components/CollectionSelect-C0Tunk6c.mjs +0 -1
- package/dist/web-components/Contents-_u13TaBJ.mjs +0 -1
- package/dist/web-components/ControlMenu-BW39OjKC.mjs +0 -1
- package/dist/web-components/ControlsFade-LFHufW32.mjs +0 -1
- package/dist/web-components/Cue-B1IlY4Ae.mjs +0 -1
- package/dist/web-components/Items-BsKByN_b.mjs +0 -1
- package/dist/web-components/LoadedMap-BpRHQPoU.mjs +0 -1
- package/dist/web-components/PanelPart-m2QWHh_4.mjs +0 -1
- package/dist/web-components/PlaceBox-DNnl9coD.mjs +0 -1
- package/dist/web-components/Scene-BJE8miZL.mjs +0 -1
- package/dist/web-components/Timeline-DPdS6bYG.mjs +0 -1
- package/dist/web-components/Tip-mcI7IRQh.mjs +0 -1
- package/dist/web-components/Transport-DYjd2GnA.mjs +0 -1
- package/dist/web-components/index-Ciz5x8Tt.mjs +0 -1
- package/dist/web-components/items-DiQ3K5TV.mjs +0 -1
- package/dist/web-components/label-CKgFcOzZ.mjs +0 -1
- package/dist/web-components/logo-C2xm9WAL.mjs +0 -1
- package/dist/web-components/part-PF-s_vD-.mjs +0 -1
- package/dist/web-components/shared-ByrLMUQa.mjs +0 -1
- package/dist/web-components/styles-BOXm_R8o.mjs +0 -1
- package/dist/web-components/viewer/Contents-ROI1iuuR.mjs +0 -1
- package/dist/web-components/viewer/ControlMenu-CZlN7x0D.mjs +0 -1
- package/dist/web-components/viewer/ControlsFade-QEgqI3wY.mjs +0 -1
- package/dist/web-components/viewer/Cue-CLbO9g2X.mjs +0 -1
- package/dist/web-components/viewer/PanelPart-CuddftmQ.mjs +0 -1
- package/dist/web-components/viewer/PlaceBox-Bi1inmQv.mjs +0 -1
- package/dist/web-components/viewer/Transport-TvkdinN-.mjs +0 -1
- package/dist/web-components/viewer/styles-XRfyRUPf.mjs +0 -1
- package/dist/web-components/viewer/viewer-BXbkj7DJ.mjs +0 -29
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
var Su=Object.defineProperty;var ku=(t,e,n)=>e in t?Su(t,e,{enumerable:true,configurable:true,writable:true,value:n}):t[e]=n;var L=(t,e,n)=>ku(t,typeof e!="symbol"?e+"":e,n);import{s as Ka}from"./styles-CLp9tx_B.mjs";function Cu(t={}){return Promise.resolve().then(()=>Pd).then(e=>e.initCloverI18n(t))}const Za="@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 Eu=null,En=null;const Mu=()=>Eu??(Eu=import("./host-CNGrorb7.mjs").then(t=>En=t)),Tu=t=>t.trim().toLowerCase()==="false";function Iu(t,{type:e,min:n},o){if(t===null)return;if(e==="string")return t;if(e==="boolean")return!Tu(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 Lu=(t,e)=>{const n=Object.keys(t);return n.length===Object.keys(e).length&&n.every(o=>Object.is(t[o],e[o]))};function Pu(t){class e extends HTMLElement{constructor(){super(...arguments);L(this,"kind",t.kind)}static get observedAttributes(){return Object.keys(t.attributes)}connectedCallback(){Ka(this.ownerDocument).inject("elements",Za)}}customElements.define(t.tag,e)}function Au(t,e){if(typeof customElements>"u"||customElements.get(t.tag))return;if(t.kind==="config"||!e)return Pu(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),Mu()]));class c extends HTMLElement{constructor(){super(...arguments);L(this,"kind",n);L(this,"needsRoot",!!t.needsRoot);L(this,"values",{});L(this,"kept",{});L(this,"props",{});L(this,"listeners",new Set);L(this,"warned",new Set);L(this,"handlers",Object.fromEntries(r.map(([u,m])=>[m.prop,(...h)=>{var y;if(m.keeps&&(this.kept[m.keeps]=h[0]??null,h[0]==null))return true;const p=m.detail==="first"?h[0]:Object.fromEntries(m.detail.map((k,x)=>[k,h[x]])),g=new CustomEvent(u,{detail:p,bubbles:!m.keeps,composed:!m.keeps,cancelable:!!m.cancelable}),v=this.dispatchEvent(g);if(!v&&m.cancelable){const k=h[h.length-1];(y=k==null?void 0:k.preventDefault)==null||y.call(k)}return v}])));L(this,"getProps",()=>this.props);L(this,"subscribe",u=>(this.listeners.add(u),()=>{this.listeners.delete(u)}))}static get observedAttributes(){return Object.keys(t.attributes)}get element(){return this}get Component(){return s}connectedCallback(){for(const u of o){if(!Object.prototype.hasOwnProperty.call(this,u))continue;const m=this[u];delete this[u],m!=null&&(this.values[u]=m)}this.update(),this.warnOfAria(),Ka(this.ownerDocument).inject("elements",Za),a().then(()=>{this.isConnected&&En.hostOf(this.ownerDocument).connect(this)})}disconnectedCallback(){queueMicrotask(()=>{this.isConnected||En==null||En.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[m,h]of Object.entries(t.attributes)){if(h.prop in this.values)continue;const p=this.getAttribute(m),g=Iu(p,h,v=>{const y=`${m}=${p}`;this.warned.has(y)||(this.warned.add(y),console.warn(`<${t.tag}>: ${m}="${p}" ${v}; ignored.`))});g!==void 0&&(u[h.prop]=g)}Lu(u,this.props)||(this.props=u,this.listeners.forEach(m=>m()))}}L(c,"initCloverI18n",Cu);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 $n,it,Ga,He,fi,Xa,Ya,Ja,ts,Er,Mr,Qa,Pn={},tc=[],Ou=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Fn=Array.isArray;function de(t,e){for(var n in e)t[n]=e[n];return t}function es(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function Ee(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?$n.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 In(t,i,o,r,null)}function In(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??++Ga,__i:-1,__u:0};return r==null&&it.vnode!=null&&it.vnode(s),s}function Nu(){return{current:null}}function Mt(t){return t.children}function fe(t,e){this.props=t,this.context=e}function dn(t,e){if(e==null)return t.__?dn(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"?dn(t):null}function ec(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 ec(t)}}function Tr(t){(!t.__d&&(t.__d=true)&&He.push(t)&&!mo.__r++||fi!=it.debounceRendering)&&((fi=it.debounceRendering)||Xa)(mo)}function mo(){for(var t,e,n,o,r,s,i,a=1;He.length;)He.length>a&&He.sort(Ya),t=He.shift(),a=He.length,t.__d&&(n=void 0,o=void 0,r=(o=(e=t).__v).__e,s=[],i=[],e.__P&&((n=de({},o)).__v=o.__v+1,it.vnode&&it.vnode(n),ns(e.__P,n,o,e.__n,e.__P.namespaceURI,32&o.__u?[r]:null,s,r??dn(o),!!(32&o.__u),i),n.__v=o.__v,n.__.__k[n.__i]=n,rc(s,n,i),o.__e=o.__=null,n.__e!=r&&ec(n)));mo.__r=0}function nc(t,e,n,o,r,s,i,a,c,l,d){var u,m,h,p,g,v,y,k=o&&o.__k||tc,x=e.length;for(c=Ru(n,e,k,c,x),u=0;u<x;u++)(h=n.__k[u])!=null&&(m=h.__i==-1?Pn:k[h.__i]||Pn,h.__i=u,v=ns(t,h,m,r,s,i,a,c,l,d),p=h.__e,h.ref&&m.ref!=h.ref&&(m.ref&&os(m.ref,null,h),d.push(h.ref,h.__c||p,h)),g==null&&p!=null&&(g=p),(y=!!(4&h.__u))||m.__k===h.__k?c=oc(h,c,t,y):typeof h.type=="function"&&v!==void 0?c=v:p&&(c=p.nextSibling),h.__u&=-7);return n.__e=g,c}function Ru(t,e,n,o,r){var s,i,a,c,l,d=n.length,u=d,m=0;for(t.__k=new Array(r),s=0;s<r;s++)(i=e[s])!=null&&typeof i!="boolean"&&typeof i!="function"?(c=s+m,(i=t.__k[s]=typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?In(null,i,null,null,null):Fn(i)?In(Mt,{children:i},null,null,null):i.constructor==null&&i.__b>0?In(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=Bu(i,n,c,u))!=-1&&(u--,(a=n[l])&&(a.__u|=2)),a==null||a.__v==null?(l==-1&&(r>d?m--:r<d&&m++),typeof i.type!="function"&&(i.__u|=4)):l!=c&&(l==c-1?m--:l==c+1?m++:(l>c?m--:m++,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=dn(a)),ic(a,a));return o}function oc(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=oc(r[s],e,n,o));return e}t.__e!=e&&(o&&(e&&t.type&&!e.parentNode&&(e=dn(t)),n.insertBefore(t.__e,e||null)),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function Ce(t,e){return e=e||[],t==null||typeof t=="boolean"||(Fn(t)?t.some(function(n){Ce(n,e)}):e.push(t)),e}function Bu(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 hi(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||Ou.test(e)?n:n+"px"}function io(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||hi(t.style,e,"");if(n)for(e in n)o&&n[e]==o[e]||hi(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")s=e!=(e=e.replace(Ja,"$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=ts,t.addEventListener(e,s?Mr:Er,s)):t.removeEventListener(e,s?Mr:Er,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 pi(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=ts++;else if(e.t<n.u)return;return n(it.event?it.event(e):e)}}}function ns(t,e,n,o,r,s,i,a,c,l){var d,u,m,h,p,g,v,y,k,x,b,M,w,B,A,q,G,U=e.type;if(e.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),s=[a=e.__e=n.__e]),(d=it.__b)&&d(e);t:if(typeof U=="function")try{if(y=e.props,k="prototype"in U&&U.prototype.render,x=(d=U.contextType)&&o[d.__c],b=d?x?x.props.value:d.__:o,n.__c?v=(u=e.__c=n.__c).__=u.__E:(k?e.__c=u=new U(y,b):(e.__c=u=new fe(y,b),u.constructor=U,u.render=Fu),x&&x.sub(u),u.props=y,u.state||(u.state={}),u.context=b,u.__n=o,m=u.__d=true,u.__h=[],u._sb=[]),k&&u.__s==null&&(u.__s=u.state),k&&U.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=de({},u.__s)),de(u.__s,U.getDerivedStateFromProps(y,u.__s))),h=u.props,p=u.state,u.__v=e,m)k&&U.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),k&&u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(k&&U.getDerivedStateFromProps==null&&y!==h&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(y,b),!u.__e&&u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(y,u.__s,b)===false||e.__v==n.__v){for(e.__v!=n.__v&&(u.props=y,u.state=u.__s,u.__d=false),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(Q){Q&&(Q.__=e)}),M=0;M<u._sb.length;M++)u.__h.push(u._sb[M]);u._sb=[],u.__h.length&&i.push(u);break t}u.componentWillUpdate!=null&&u.componentWillUpdate(y,u.__s,b),k&&u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(h,p,g)})}if(u.context=b,u.props=y,u.__P=t,u.__e=false,w=it.__r,B=0,k){for(u.state=u.__s,u.__d=false,w&&w(e),d=u.render(u.props,u.state,u.context),A=0;A<u._sb.length;A++)u.__h.push(u._sb[A]);u._sb=[]}else do u.__d=false,w&&w(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=de(de({},o),u.getChildContext())),k&&!m&&u.getSnapshotBeforeUpdate!=null&&(g=u.getSnapshotBeforeUpdate(h,p)),q=d,d!=null&&d.type===Mt&&d.key==null&&(q=sc(d.props.children)),a=nc(t,Fn(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),v&&(u.__E=u.__=null)}catch(Q){if(e.__v=null,c||s!=null)if(Q.then){for(e.__u|=c?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;s[s.indexOf(a)]=null,e.__e=a}else{for(G=s.length;G--;)es(s[G]);Ir(e)}else e.__e=n.__e,e.__k=n.__k,Q.then||Ir(e);it.__e(Q,e,n)}else s==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):a=e.__e=$u(n.__e,e,n,o,r,s,i,c,l);return(d=it.diffed)&&d(e),128&e.__u?void 0:a}function Ir(t){t&&t.__c&&(t.__c.__e=true),t&&t.__k&&t.__k.forEach(Ir)}function rc(t,e,n){for(var o=0;o<n.length;o++)os(n[o],n[++o],n[++o]);it.__c&&it.__c(e,t),t.some(function(r){try{t=r.__h,r.__h=[],t.some(function(s){s.call(r)})}catch(s){it.__e(s,r.__v)}})}function sc(t){return typeof t!="object"||t==null||t.__b&&t.__b>0?t:Fn(t)?t.map(sc):de({},t)}function $u(t,e,n,o,r,s,i,a,c){var l,d,u,m,h,p,g,v=n.props,y=e.props,k=e.type;if(k=="svg"?r="http://www.w3.org/2000/svg":k=="math"?r="http://www.w3.org/1998/Math/MathML":r||(r="http://www.w3.org/1999/xhtml"),s!=null){for(l=0;l<s.length;l++)if((h=s[l])&&"setAttribute"in h==!!k&&(k?h.localName==k:h.nodeType==3)){t=h,s[l]=null;break}}if(t==null){if(k==null)return document.createTextNode(y);t=document.createElementNS(r,k,y.is&&y),a&&(it.__m&&it.__m(e,s),a=false),s=null}if(k==null)v===y||a&&t.data==y||(t.data=y);else{if(s=s&&$n.call(t.childNodes),v=n.props||Pn,!a&&s!=null)for(v={},l=0;l<t.attributes.length;l++)v[(h=t.attributes[l]).name]=h.value;for(l in v)if(h=v[l],l!="children"){if(l=="dangerouslySetInnerHTML")u=h;else if(!(l in y)){if(l=="value"&&"defaultValue"in y||l=="checked"&&"defaultChecked"in y)continue;io(t,l,null,h,r)}}for(l in y)h=y[l],l=="children"?m=h:l=="dangerouslySetInnerHTML"?d=h:l=="value"?p=h:l=="checked"?g=h:a&&typeof h!="function"||v[l]===h||io(t,l,h,v[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=""),nc(e.type=="template"?t.content:t,Fn(m)?m:[m],e,n,o,k=="foreignObject"?"http://www.w3.org/1999/xhtml":r,s,i,s?s[0]:n.__k&&dn(n,0),a,c),s!=null)for(l=s.length;l--;)es(s[l]);a||(l="value",k=="progress"&&p==null?t.removeAttribute("value"):p!=null&&(p!==t[l]||k=="progress"&&!p||k=="option"&&p!=v[l])&&io(t,l,p,v[l],r),l="checked",g!=null&&g!=t[l]&&io(t,l,g,v[l],r))}return t}function os(t,e,n){try{if(typeof t=="function"){var o=typeof t.__u=="function";o&&t.__u(),o&&e==null||(t.__u=t(e))}else t.current=e}catch(r){it.__e(r,n)}}function ic(t,e,n){var o,r;if(it.unmount&&it.unmount(t),(o=t.ref)&&(o.current&&o.current!=t.__e||os(o,null,e)),(o=t.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(s){it.__e(s,e)}o.base=o.__P=null}if(o=t.__k)for(r=0;r<o.length;r++)o[r]&&ic(o[r],e,n||typeof t.type!="function");n||es(t.__e),t.__c=t.__=t.__e=void 0}function Fu(t,e,n){return this.constructor(t,n)}function An(t,e,n){var o,r,s,i;e==document&&(e=document.documentElement),it.__&&it.__(t,e),r=(o=typeof n=="function")?null:n&&n.__k||e.__k,s=[],i=[],ns(e,t=(!o&&n||e).__k=Ee(Mt,null,[t]),r||Pn,Pn,e.namespaceURI,!o&&n?[n]:r?null:e.firstChild?$n.call(e.childNodes):null,s,!o&&n?n:r?r.__e:e.firstChild,o,i),rc(s,t,i)}function ac(t,e){An(t,e,ac)}function Du(t,e,n){var o,r,s,i,a=de({},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?$n.call(arguments,2):n),In(t.type,a,o||t.key,r||t.ref,null)}function ge(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,Tr(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"+Qa++,e.__=t,e.Provider=e.__l=(e.Consumer=function(n,o){return n.children(o)}).contextType=e,e}$n=tc.slice,it={__e:function(t,e,n,o){for(var r,s,i;e=e.__;)if((r=e.__c)&&!r.__)try{if((s=r.constructor)&&s.getDerivedStateFromError!=null&&(r.setState(s.getDerivedStateFromError(t)),i=r.__d),r.componentDidCatch!=null&&(r.componentDidCatch(t,o||{}),i=r.__d),i)return r.__E=r}catch(a){t=a}throw t}},Ga=0,fe.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=de({},this.state),typeof t=="function"&&(t=t(de({},n),this.props)),t&&de(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),Tr(this))},fe.prototype.forceUpdate=function(t){this.__v&&(this.__e=true,t&&this.__h.push(t),Tr(this))},fe.prototype.render=Mt,He=[],Xa=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ya=function(t,e){return t.__v.__b-e.__v.__b},mo.__r=0,Ja=/(PointerCapture)$|Capture$/i,ts=0,Er=pi(false),Mr=pi(true),Qa=0;var zu=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:--zu,__i:-1,__u:0,__source:r,__self:s};if(typeof t=="function"&&(i=t.defaultProps))for(a in i)c[a]===void 0&&(c[a]=i[a]);return it.vnode&&it.vnode(l),l}var Ne,Et,or,mi,fn=0,cc=[],It=it,gi=It.__b,vi=It.__r,yi=It.diffed,bi=It.__c,_i=It.unmount,wi=It.__;function mn(t,e){It.__h&&It.__h(Et,t,fn||e),fn=0;var n=Et.__H||(Et.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function z(t){return fn=1,rs(dc,t)}function rs(t,e,n){var o=mn(Ne++,2);if(o.t=t,!o.__c&&(o.__=[n?n(e):dc(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=Et,!Et.__f)){var r=function(a,c,l){if(!o.__c.__H)return true;var d=o.__c.__H.__.filter(function(m){return!!m.__c});if(d.every(function(m){return!m.__N}))return!s||s.call(this,a,c,l);var u=o.__c.props!==a;return d.forEach(function(m){if(m.__N){var h=m.__[0];m.__=m.__N,m.__N=void 0,h!==m.__[0]&&(u=true)}}),s&&s.call(this,a,c,l)||u};Et.__f=true;var s=Et.shouldComponentUpdate,i=Et.componentWillUpdate;Et.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)},Et.shouldComponentUpdate=r}return o.__N||o.__}function F(t,e){var n=mn(Ne++,3);!It.__s&&is(n.__H,e)&&(n.__=t,n.u=e,Et.__H.__h.push(n))}function $t(t,e){var n=mn(Ne++,4);!It.__s&&is(n.__H,e)&&(n.__=t,n.u=e,Et.__h.push(n))}function $(t){return fn=5,yt(function(){return{current:t}},[])}function lc(t,e,n){fn=6,$t(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=mn(Ne++,7);return is(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function ut(t,e){return fn=8,yt(function(){return t},e)}function Vt(t){var e=Et.context[t.__c],n=mn(Ne++,9);return n.c=t,e?(n.__==null&&(n.__=true,e.sub(Et)),e.props.value):t.__}function uc(t,e){It.useDebugValue&&It.useDebugValue(e?e(t):t)}function ss(){var t=mn(Ne++,11);if(!t.__){for(var e=Et.__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 Hu(){for(var t;t=cc.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(uo),t.__H.__h.forEach(Lr),t.__H.__h=[]}catch(e){t.__H.__h=[],It.__e(e,t.__v)}}It.__b=function(t){Et=null,gi&&gi(t)},It.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),wi&&wi(t,e)},It.__r=function(t){vi&&vi(t),Ne=0;var e=(Et=t.__c).__H;e&&(or===Et?(e.__h=[],Et.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.forEach(uo),e.__h.forEach(Lr),e.__h=[],Ne=0)),or=Et},It.diffed=function(t){yi&&yi(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(cc.push(e)!==1&&mi===It.requestAnimationFrame||((mi=It.requestAnimationFrame)||Wu)(Hu)),e.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),or=Et=null},It.__c=function(t,e){e.some(function(n){try{n.__h.forEach(uo),n.__h=n.__h.filter(function(o){return!o.__||Lr(o)})}catch(o){e.some(function(r){r.__h&&(r.__h=[])}),e=[],It.__e(o,n.__v)}}),bi&&bi(t,e)},It.unmount=function(t){_i&&_i(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(o){try{uo(o)}catch(r){e=r}}),n.__H=void 0,e&&It.__e(e,n.__v))};var xi=typeof requestAnimationFrame=="function";function Wu(t){var e,n=function(){clearTimeout(o),xi&&cancelAnimationFrame(e),setTimeout(t)},o=setTimeout(n,35);xi&&(e=requestAnimationFrame(n))}function uo(t){var e=Et,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),Et=e}function Lr(t){var e=Et;t.__c=t.__(),Et=e}function is(t,e){return!t||t.length!==e.length||e.some(function(n,o){return n!==t[o]})}function dc(t,e){return typeof e=="function"?e(t):e}function fc(t,e){for(var n in e)t[n]=e[n];return t}function Pr(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return true;for(var o in e)if(o!=="__source"&&t[o]!==e[o])return true;return false}function ne(t,e){var n=e(),o=z({t:{__:n,u:e}}),r=o[0].t,s=o[1];return $t(function(){r.__=n,r.u=e,rr(r)&&s({t:r})},[t,n,e]),F(function(){return rr(r)&&s({t:r}),t(function(){rr(r)&&s({t:r})})},[t]),n}function rr(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 hc(t){t()}function pc(t){return t}function mc(){return[false,hc]}var gc=$t;function Ar(t,e){this.props=t,this.context=e}function Uu(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:Pr(this.props,r)}function o(r){return this.shouldComponentUpdate=n,Ee(t,r)}return o.displayName="Memo("+(t.displayName||t.name)+")",o.prototype.isReactComponent=true,o.__f=true,o.type=t,o}(Ar.prototype=new fe).isPureReactComponent=true,Ar.prototype.shouldComponentUpdate=function(t,e){return Pr(this.props,t)||Pr(this.state,e)};var Si=it.__b;it.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),Si&&Si(t)};var ju=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function le(t){function e(n){var o=fc({},n);return delete o.ref,t(o,n.ref||null)}return e.$$typeof=ju,e.render=t,e.prototype.isReactComponent=e.__f=true,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var ki=function(t,e){return t==null?null:Ce(Ce(t).map(e))},Vu={map:ki,forEach:ki,count:function(t){return t?Ce(t).length:0},only:function(t){var e=Ce(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:Ce},qu=it.__e;it.__e=function(t,e,n,o){if(t.then){for(var r,s=e;s=s.__;)if((r=s.__c)&&r.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),r.__c(t,e)}qu(t,e,n,o)};var Ci=it.unmount;function vc(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=fc({},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 vc(o,e,n)})),t}function yc(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(o){return yc(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 kt(){this.__u=0,this.o=null,this.__b=null}function bc(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function bt(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 Ee(n,s)}return r.displayName="Lazy",r.__f=true,r}function Mn(){this.i=null,this.l=null}it.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),Ci&&Ci(t)},(kt.prototype=new fe).__c=function(t,e){var n=e.__c,o=this;o.o==null&&(o.o=[]),o.o.push(n);var r=bc(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]=yc(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)},kt.prototype.componentWillUnmount=function(){this.o=[]},kt.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]=vc(this.__b,n,o.__O=o.__P)}this.__b=null}var r=e.__a&&Ee(Mt,null,t.fallback);return r&&(r.__u&=-33),[Ee(Mt,null,e.__a?null:t.children),r]};var Ei=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 Ku(t){return this.getChildContext=function(){return t.context},t.children}function Zu(t){var e=this,n=t.h;if(e.componentWillUnmount=function(){An(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)}}}An(Ee(Ku,{context:e.context},t.__v),e.v)}function Gu(t,e){var n=Ee(Zu,{__v:t,h:e});return n.containerInfo=e,n}(Mn.prototype=new fe).__a=function(t){var e=this,n=bc(e.__v),o=e.l.get(t);return o[0]++,function(r){var s=function(){e.props.revealOrder?(o.push(r),Ei(e,t,o)):r()};n?n(s):s()}},Mn.prototype.render=function(t){this.i=null,this.l=new Map;var e=Ce(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},Mn.prototype.componentDidUpdate=Mn.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){Ei(t,n,e)})};var _c=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Xu=/^(?: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]/,Yu=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Ju=/[A-Z0-9]/g,Qu=typeof document<"u",td=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function ed(t,e,n){return e.__k==null&&(e.textContent=""),An(t,e),typeof n=="function"&&n(),t?t.__c:null}function nd(t,e,n){return ac(t,e),typeof n=="function"&&n(),t?t.__c:null}fe.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(fe.prototype,t,{configurable:true,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:true,writable:true,value:e})}})});var Mi=it.event;function od(){}function rd(){return this.cancelBubble}function sd(){return this.defaultPrevented}it.event=function(t){return Mi&&(t=Mi(t)),t.persist=od,t.isPropagationStopped=rd,t.isDefaultPrevented=sd,t.nativeEvent=t};var as,id={enumerable:false,configurable:true,get:function(){return this.class}},Ti=it.vnode;it.vnode=function(t){typeof t.type=="string"&&function(e){var n=e.props,o=e.type,r={},s=o.indexOf("-")===-1;for(var i in n){var a=n[i];if(!(i==="value"&&"defaultValue"in n&&a==null||Qu&&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"||td(n.type)?c==="onfocus"?i="onfocusin":c==="onblur"?i="onfocusout":Yu.test(i)&&(i=c):c=i="oninput":s&&Xu.test(i)?i=i.replace(Ju,"-$&").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=Ce(n.children).forEach(function(l){l.props.selected=r.value.indexOf(l.props.value)!=-1})),o=="select"&&r.defaultValue!=null&&(r.value=Ce(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",id)):(n.className&&!n.class||n.class&&n.className)&&(r.class=r.className=n.className),e.props=r}(t),t.$$typeof=_c,Ti&&Ti(t)};var Ii=it.__r;it.__r=function(t){Ii&&Ii(t),as=t.__c};var Li=it.diffed;it.diffed=function(t){Li&&Li(t);var e=t.props,n=t.__e;n!=null&&t.type==="textarea"&&"value"in e&&e.value!==n.value&&(n.value=e.value==null?"":e.value),as=null};var ad={ReactCurrentDispatcher:{current:{readContext:function(t){return as.__n[t.__c].props.value},useCallback:ut,useContext:Vt,useDebugValue:uc,useDeferredValue:pc,useEffect:F,useId:ss,useImperativeHandle:lc,useInsertionEffect:gc,useLayoutEffect:$t,useMemo:yt,useReducer:rs,useRef:$,useState:z,useSyncExternalStore:ne,useTransition:mc}}};function cd(t){return Ee.bind(null,t)}function Mo(t){return!!t&&t.$$typeof===_c}function ld(t){return Mo(t)&&t.type===Mt}function ud(t){return!!t&&!!t.displayName&&(typeof t.displayName=="string"||t.displayName instanceof String)&&t.displayName.startsWith("Memo(")}function dd(t){return Mo(t)?Du.apply(null,arguments):t}function fd(t){return!!t.__k&&(An(null,t),true)}function hd(t){return t&&(t.base||t.nodeType===1&&t)||null}var pd=function(t,e){return t(e)},md=function(t,e){return t(e)},gd=Mt,vd=Mo,he={useState:z,useId:ss,useReducer:rs,useEffect:F,useLayoutEffect:$t,useInsertionEffect:gc,useTransition:mc,useDeferredValue:pc,useSyncExternalStore:ne,startTransition:hc,useRef:$,useImperativeHandle:lc,useMemo:yt,useCallback:ut,useContext:Vt,useDebugValue:uc,version:"18.3.1",Children:Vu,render:ed,hydrate:nd,unmountComponentAtNode:fd,createPortal:Gu,createElement:Ee,createContext:ge,createFactory:cd,cloneElement:dd,createRef:Nu,Fragment:Mt,isValidElement:Mo,isElement:vd,isFragment:ld,isMemo:ud,findDOMNode:hd,Component:fe,PureComponent:Ar,memo:Uu,forwardRef:le,flushSync:md,unstable_batchedUpdates:pd,StrictMode:gd,Suspense:kt,SuspenseList:Mn,lazy:bt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ad};function cs(t){const e=ne(bd,_d);return!!t||e}const ls=t=>t?{"data-high-contrast":""}:{},yd="(prefers-contrast: more)",wc=()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia(yd):null;function bd(t){var n;const e=wc();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 _d=()=>{var t;return!!((t=wc())!=null&&t.matches)},Dn=ge(void 0),Pt=(...t)=>t.filter(Boolean).join(" "),To=ge(null);function Be(){return Vt(To)}function ue(t="This part"){const e=Vt(To);if(!e)throw new Error(`${t} must be rendered inside <Clover.Root>.`);return e}function ot(t,e=Object.is,n){const{clover:o}=ue(n),r=$(null),s=()=>{const i=t(o.store.get());return r.current&&e(r.current.value,i)?r.current.value:(r.current={value:i},i)};return ne(o.store.subscribe,s)}const wd={subscribe:()=>()=>{}};function zn(t,e){const n=Vt(To),o=n==null?void 0:n.clover.store,r=()=>o?t(o.get()):e;return ne(o?o.subscribe:wd.subscribe,r)}const xd=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","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","contentsSectionsTip":"Sections","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","playerCurrentTime":"Current time","playerDuration":"Duration","splitHandle":"Resize panels"}'),xc={es:()=>import("../es-Czdt8By_.mjs"),fi:()=>import("../fi-RWtClOWA.mjs"),fr:()=>import("../fr-CFRY9P3c.mjs"),it:()=>import("../it-D_Hb0t9G.mjs"),ja:()=>import("../ja-BoJ9dFmn.mjs"),nb:()=>import("../nb-B43QGinl.mjs"),nn:()=>import("../nn-BmkkC79H.mjs"),no:()=>import("../no-B43QGinl.mjs"),pt:()=>import("../pt-BbtIGupi.mjs"),"zh-Hans":()=>import("../zh-Hans-BAFQ7Pft.mjs"),"zh-Hant":()=>import("../zh-Hant-DS7iN4iO.mjs")};function us(){return typeof navigator>"u"?[]:[...navigator.languages??[],navigator.language].filter(Boolean)}function Sc(){if(!(typeof document>"u"))return document.documentElement.lang||void 0}let kc=()=>[];function Sd(t){kc=t}function kd(){const[t,...e]=kc();return[...new Set([t,...us(),...e,Sc()].filter(n=>!!n))]}const go=t=>t.split("-")[0];function ds(t,e){return go(t).toLowerCase()===go(e).toLowerCase()}function Or(t){try{const{language:e,script:n}=new Intl.Locale(t).maximize();return n&&`${e}-${n}`}catch{return}}function Cd(t,e){const n=Or(t);if(n)return e.find(o=>o!=="none"&&o!=="@none"&&Or(o)===n)}const sr=t=>t.includes("-")?go(t):null;function Ed(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=sr(t);if(r&&e.includes(r))return r;const s=Cd(t,e);if(s)return s;const i=n.find(c=>e.includes(c));if(i)return i;const a=e.findIndex(c=>sr(c)===t);if(a!==-1)return e[a];for(const c of n){const l=sr(c);if(l&&e.includes(l))return l}return o()}function fs(t,e){const[n,...o]=e?[e]:kd();return Ed(n,t,o)??t[0]}function Cc(t,e,n){if(n&&t.includes(n))return n;if(!t.length)return;const o=fs(t,e);return o==="none"?t[0]:o}const xe="clover",te={en:{[xe]:{...xd}}};let Tn=[],Qt,vo=[],Ec=[],hs=0;const Nr=new Set;function ps(){hs++,Nr.forEach(t=>t())}function Mc(t){return[t,Or(t),go(t)].filter(e=>!!e)}const Md=t=>t==="en"||Tc(t)||!!te[t],Re=t=>Mc(t).find(Md),Pi=new Map,Tc=t=>Object.prototype.hasOwnProperty.call(xc,t);function Td(t){let e=Pi.get(t);return e||(e=xc[t]().then(({default:n})=>{var o;te[t]={...te[t],[xe]:{...n,...(o=te[t])==null?void 0:o[xe]}},ps()},()=>{}),Pi.set(t,e)),e}function Rr(t){const e=t.find(n=>n==="en"||Tc(n));return e&&e!=="en"?Td(e):Promise.resolve()}let ao=[],Ai="",On="en";function Io(){const t=Sc();return[...new Set([...Tn,...t?[t]:[]])]}function Oe(){const t=`${hs} ${typeof document<"u"?document.documentElement.lang:""} ${typeof navigator<"u"?navigator.languages:""}`;if(t===Ai)return ao;Ai=t;const e=Io();return On=us().map(Re).find(Boolean)??e.map(Re).find(Boolean)??"en",ao=[...new Set([Qt??On,...Ec,...e].filter(o=>!!o).flatMap(Mc).concat("en"))],Rr(ao),ao}function Id(){return Oe(),[...new Set([On,...Io().map(Re),...vo.map(Re)].filter(t=>!!t))]}Sd(()=>(Oe(),[Qt,On,...Io()]));function Lo(t,e){if(t)return ds(t,e||Lt.resolvedLanguage)?void 0:t}const Lt={get language(){return Qt??Oe().find(t=>te[t])??"en"},get chosenLanguage(){return Qt},stringsFor(t){return Re(t)},interfaceLanguages(){return{languages:Id(),chosen:Qt&&Re(Qt)||On}},chooseInterfaceLanguage(t){return Qt=t||void 0,vo=Qt?[...new Set([...vo,Qt])]:[],ps(),Rr(Oe())},get resolvedLanguage(){return Oe().find(t=>{var e;return Object.keys(((e=te[t])==null?void 0:e[xe])??{}).length>0})??"en"},changeLanguage(t){return Lt.chooseInterfaceLanguage(t)},resolve(t,e,n=xe){var r,s;let o={text:t};for(const i of Oe()){const a=(s=(r=te[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=xe){return Lt.resolve(t,e,n).text},langOf(t,e,n=xe){return Lo(Lt.resolve(t,void 0,n).lang,e)},ready(){return Rr(Oe())},subscribe(t){return Nr.add(t),()=>{Nr.delete(t)}},getSnapshot(){return hs}};typeof document<"u"&&Oe();function Ld(t={}){for(const[n,o]of Object.entries(t.resources??{}))for(const[r,s]of Object.entries(o??{}))te[n]??(te[n]={}),te[n][r]={...te[n][r],...s};t.fallbackLng!==void 0&&(Ec=t.fallbackLng===false?[]:[t.fallbackLng].flat());const e=Tn.join();if(t.languages!==void 0?Tn=[t.languages].flat().filter(Boolean):t.lng&&(Tn=[t.lng]),Tn.join()!==e){vo=[];const n=[...us(),...Io()].map(Re);Qt&&!n.includes(Re(Qt))&&(Qt=void 0)}return ps(),Lt}const Pd=Object.freeze(Object.defineProperty({__proto__:null,CLOVER_I18N_NAMESPACE:xe,cloverI18n:Lt,initCloverI18n:Ld,langWithin:Lo},Symbol.toStringTag,{value:"Module"}));function Tt(t=xe,e){const n=ne(Lt.subscribe,Lt.getSnapshot,Lt.getSnapshot),o=Vt(Dn),r=e??o,s=ut((a,c)=>Lt.t(a,c,t),[t,n]),i=ut(a=>Lt.langOf(a,r,t),[t,n,r]);return{t:s,langOf:i,hostLanguage:r,i18n:Lt}}function Po(t,e){const n=Vt(Dn),o=$(null),[r,s]=z(""),i=ut(d=>{o.current=d,typeof t=="function"?t(d):t&&(t.current=d)},[t]);F(()=>{var u,m;const d=(u=o.current)==null?void 0:u.parentElement;e!==void 0||n!==void 0||!d||s(((m=d.closest("[lang]"))==null?void 0:m.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],Ad=["left-to-right","right-to-left","top-to-bottom","bottom-to-top"];function ms(t){return Ad.includes(t)?t:"left-to-right"}const Od=["individuals","paged","continuous","unordered"];function Nd(t){return W(t).find(n=>Od.includes(n))??"individuals"}function Rd(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 Bd(t,e){const n=t.findIndex(o=>o.includes(e));return n===-1?0:n}const Ic=["Independents","Composite","List"];function Ao(t){return W(t==null?void 0:t.body).flatMap(e=>Ic.includes(e==null?void 0:e.type)?W(e.items):[e])}function gs(t){const e=W(t==null?void 0:t.motivation);return!e.length||e.includes("painting")}function Lc(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 co(t){const e=t.indexOf("#");if(e>=0){const o=t.slice(0,e);return Lc(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 Br=t=>{var e;return Array.isArray(t)?Br(t[0]):Ic.includes(t==null?void 0:t.type)?Br((e=t.items)==null?void 0:e[0]):t};function gn(t){return $d(Br(t))}function $d(t){var n;if(typeof t=="string")return co(t);if(!t||typeof t!="object")return{id:""};if(t.type!=="SpecificResource"||t.source===void 0)return co(t.id??"");const e=typeof t.source=="string"?co(t.source):co(((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=Lc(e.id,String(r.value));if(s)return s}}return e}const Hn=t=>t==="Audio"||t==="Sound",Fd=t=>{const e=W(t);return e.length>0&&e.every(n=>n==="supplementing")},Dd=(t,e)=>Fd(t)&&!!(e.rect||e.svg||e.point)&&!e.t,Oi=new WeakMap,zd={canvases:[],views:[],direction:"left-to-right"};function Rt(t){if(!t)return zd;let e=Oi.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:Rd(n,Nd(t.behavior)),direction:ms(t.viewingDirection)},Oi.set(t,e)}return e}const Ni=new WeakMap;function qe(t,e){if(!e)return null;const n=Rt(t);let o=Ni.get(n);if(!o){o=new Map;for(const r of n.canvases)o.has(r.id)||o.set(r.id,r);Ni.set(n,o)}return o.get(e)??null}function vn(t,e){const{canvases:n,views:o}=Rt(t),r=n.findIndex(s=>s.id===e);return r===-1?0:Bd(o,r)}const Ri=new WeakMap,$r=[];function Ue(t,e){return t?Pc(t,vn(t,e)):$r}function Hd(t,e){if(!t)return $r;const n=vn(t,e)+1;return n<Rt(t).views.length?Pc(t,n):$r}function Pc(t,e){let n=Ri.get(t);n||Ri.set(t,n=new Map);let o=n.get(e);if(!o){const r=Rt(t);o=(r.views[e]??[]).map(s=>r.canvases[s]),n.set(e,o)}return o}function Wd(t,e){var s,i;const{canvases:n,views:o}=Rt(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 Ud(t){const e=t==null?void 0:t.start;if(!e)return null;const n=gn(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 De=(t,e)=>{const n=t==null?void 0:t.behavior;return Array.isArray(n)?n.includes(e):n===e},jd=t=>[(t==null?void 0:t.partOf)??[]].flat().find(e=>(e==null?void 0:e.id)&&e.type==="Collection");function Ac(t){var e;return((e=t.manifest)==null?void 0:e.id)??t.opening}function Vd(t,e,n,o){const r=t==null?void 0:t.items;if(!(r!=null&&r.length))return-1;if(!n)return e??-1;const s=Ue(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 xt(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=fs(o,e),s=t[r];return{text:Array.isArray(s)?s.join(n):String(s),lang:r==="none"||r==="@none"?void 0:r}}const qd=/^[A-Za-z]{2,8}(-[A-Za-z0-9]{1,8})*$/;function Nn(t){const e=t==null?void 0:t.language,n=(Array.isArray(e)?e:[e]).filter(o=>typeof o=="string"&&qd.test(o));return n.length===1?n[0]:void 0}const je={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",whiteSpace:"nowrap",border:0},Kd=/^(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)$/,Zd=/^(adlm|arab|hebr|nkoo|rohg|syrc|thaa)$/;function Gd(t){if(!t)return;const[e,...n]=t.toLowerCase().split(/[-_]/),o=n.find(r=>/^[a-z]{4}$/.test(r));return(o?Zd.test(o):Kd.test(e))?"rtl":void 0}function dt(t){return t?{lang:t,dir:Gd(t)}:{}}function Xd({clover:t,language:e}){const{t:n,langOf:o}=Tt(),[r,s]=z(null),i=$(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 m=qe(c,l),h=xt(m==null?void 0:m.label,e),p=i.current("canvasPosition",{index:vn(c,l)+1,total:Rt(c).views.length});s({label:h.text,lang:h.lang,position:p})})},[t,e]),f("div",{className:"clover-announcer",role:"status","aria-live":"polite","aria-atomic":"true",style:je,children:[r!=null&&r.label?f(Mt,{children:[f("span",{...dt(r.lang),children:r.label}),","," "]}):null,r&&f("span",{...dt(o("canvasPosition")),children:r.position})]})}const Yd=t=>(t==null?void 0:t.format)==="text/vtt"||typeof(t==null?void 0:t.id)=="string"&&/\.vtt(\?|$)/i.test(t.id);function Jd(t){const e=[];let n=0;const o=(r,s)=>{var a;if(!r||Yd(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 Ao(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 vs="content-search",Qd="contents",Hy=(t,e)=>`${t}#region-${e+1}`,tf=t=>W(t==null?void 0:t.motivation).includes("linking");function Oc(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=Jd(r);if(!i.length&&!tf(r))continue;const a=gn(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 ef=t=>Rt(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 nf(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 Nc=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"])))),Bi=new WeakMap;function Rc(t){var n;if(!t)return[];let e=Bi.get(t);if(!e){const o=new Map;for(const r of Rt(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=Nc(s)[0])==null?void 0:n.id;a={id:i,label:nf(s),source:"manifest",entries:[],...c?{collection:c}:{}},o.set(i,a)}a.entries.push(...Oc(s,i,r.id))}e=[...o.values()].filter(r=>r.entries.length),Bi.set(t,e)}return e}const $i=new WeakMap,Bc=[];function Wy(t){if(!t)return Bc;let e=$i.get(t);return e||(e=Rt(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)}))),$i.set(t,e)),e}const ir=new WeakMap,ar=new WeakMap;function $c(t,e=of){var n;if(!ar.has(e)){const o=e.filter(s=>s.content),r=(n=o[0])==null?void 0:n.content;ar.set(e,r?{id:r.id,type:r.type,...r.label?{label:r.label}:{},pages:Bc,entries:o.flatMap(s=>s.entries)}:null)}return ar.get(e)??rf(t)}const of=[];function rf(t){var r;if(!t)return null;if(ir.has(t))return ir.get(t);const e=Rt(t).canvases.flatMap(s=>W(s.annotations).flatMap(i=>Nc(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=Rc(t);return{id:n,type:"AnnotationCollection",...i?{label:i}:{},...a>0?{total:a}:{},pages:s.map(({page:u,canvas:m})=>({id:String(u.id),canvasId:String(m.id),fetched:Array.isArray(u.items)})),entries:s.flatMap(({page:u})=>{var m;return((m=c.find(h=>h.id===u.id))==null?void 0:m.entries)??[]})}})():null;return ir.set(t,o),o}const Fi=new WeakMap,Di=[];function ys(t,e){const n=Rc(t);if(!e.length)return n.length?n:Di;const o=t??Di;let r=Fi.get(o);r||Fi.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 zi=new WeakMap;function Fc(t,e,n,o=null){const r=ys(t,e),s=n!=null&&n.entries.length?n:null;if(!o&&!s)return r;let i=zi.get(r);i||zi.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 sf=t=>Number(t==null?void 0:t.duration)>0;function Dc(t,e){return t.source==="search"||!t.entries.length?false:t.entries.every(n=>Dd(n.motivation,n.target)&&!sf(e(n.canvasId)))}const Hi=new WeakMap;function af(t,e){const n=ys(t,e);let o=Hi.get(n);if(!o){const r=n.filter(s=>!Dc(s,i=>qe(t,i)??void 0));o=r.length===n.length?n:r,Hi.set(n,o)}return o}const Wi=new WeakMap;function bs(t,e,n,o){const r=ys(t,e),s=Wi.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)&&Dc(c,l=>qe(t,l)??void 0)).map(c=>c.id),a=i.length?[...n,...i]:n;return Wi.set(r,{hidden:n,shown:o,ids:a}),a}const Ui=new WeakMap,ji=[vs,Qd];function cf(t,e,n,o,r){if(!r)return ji;const s=bs(t,e,n,o),i=Ui.get(s);if(i&&i.hidden===n)return i.ids;const a=[...ji,...s.filter(c=>!n.includes(c))];return Ui.set(s,{hidden:n,ids:a}),a}function lf(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 cr(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 zc(t){return btoa(encodeURIComponent(JSON.stringify(t))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function Hc({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:zc(a)}}const uf=Object.freeze(Object.defineProperty({__proto__:null,buildContentState:Hc,encodeContentState:zc},Symbol.toStringTag,{value:"Module"})),df=/iiif\.io\/api\/presentation\/4\/context\.json/;function Wc(t){const e=t==null?void 0:t["@context"];return(Array.isArray(e)?e:[e]).some(o=>typeof o=="string"&&df.test(o))}let Vi=null,qi=null;function _s(){return qi??(qi=import("../upgrade-eNW0DPXq.mjs")),Vi??(Vi=import("../upgrader-BlbMUEH6.mjs").then(({upgradePresentation3To4:t})=>t)),Promise.all([Vi,qi])}async function Ve(t){if(Wc(t))return t;const[e,{upgrade:n}]=await _s();return await n(t,e)}function ws(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}})}function xs(t){var e;(e=t.body)==null||e.cancel().catch(()=>{})}const ff=t=>(t==null?void 0:t.credentials)==="include",hf=t=>JSON.stringify([t==null?void 0:t.credentials,t==null?void 0:t.headers]);class pf extends Error{constructor(e,n,o){super(e),this.url=n,this.status=o,this.name="CloverRequestError"}}async function hn(t,e,n){const o=await ws(t,e,{signal:n,headers:{Accept:"application/ld+json, application/json"}});if(!o.ok)throw xs(o),new pf(`${e} answered ${o.status}`,e,o.status);return o.json()}const mf=()=>import("./content-state-reader-CIVUq8ar.mjs");function gf(t){const e=t;return!e||typeof e!="object"?false:e.type==="Annotation"||e["@type"]==="oa:Annotation"||e.type==="SpecificResource"}const Uc=t=>!!t&&typeof t=="object"&&/ImageService[123]|iiif\.io\/api\/image/.test(JSON.stringify(["@context","type","@type","protocol"].map(e=>t[e])));async function vf(t,e,n){try{return await hn(t,e,n)}catch(o){if(n!=null&&n.aborted||/\.json([?#]|$)/i.test(e))throw o;try{const r=await hn(t,`${e.replace(/\/+$/,"")}/info.json`,n);if(Uc(r))return r}catch{}throw o}}const yf=["summary","metadata","requiredStatement","rights","provider","homepage","seeAlso","rendering","thumbnail","navDate","partOf"];function bf(t){const e={"@context":wf,id:t.id,type:"Manifest",label:t.label??{none:[""]},items:[t]};for(const n of yf)t[n]!==void 0&&n!=="label"&&(e[n]=t[n]);return e}const Ki=t=>{var e,n;return!!t&&((n=(e=t.items)==null?void 0:e[0])==null?void 0:n.id)===t.id},jc=t=>{var e,n;return!!t&&((e=t.items)==null?void 0:e.length)===1&&((n=t.items[0])==null?void 0:n.id)===`${t.id}/canvas`},_f=/^(oa:)?Annotation(Page|Collection)$/;class lr extends Error{constructor(){super(...arguments);L(this,"name","CloverContentError")}}const wf="http://iiif.io/api/presentation/4/context.json",xf=t=>/^https?:\/\//i.test(t);async function Fr(t,{request:e,signal:n}){return Array.isArray(t.items)&&t.items.length>0||!t.id?t:await hn(e,t.id,n)}const Sf=50;async function Ss(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<Sf;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 hn(e.request,a.id,e.signal),l=await Ve({"@context":c["@context"]??n["@context"],...c,type:"Collection"});o.push(...l.items??[]),s=c.next}return{...n,items:o}}async function Vc(t,e={}){return Ve(await Fr(t,e))}async function qc(t,e,n=0){for(const o of t.items??[]){if(o.type==="Manifest")return Ve(await Fr(o,e));if(o.type==="Collection"&&n<8){const r=await Ss(await Ve(await Fr(o,e)),e),s=await qc(r,e,n+1);if(s)return s}}return null}async function kf(t,{request:e,signal:n}={}){_s();const o=typeof t=="string"?await hn(e,t.trim(),n):t,r=await Ve(o);return r.type==="Collection"?Ss(r,{request:e,signal:n}):r}async function Kc(t,e={}){var i;const{request:n,signal:o}=e;_s();let r=t;if(typeof t=="string"&&(r=xf(t.trim())?await vf(n,t.trim(),o):(await mf()).decodeContentState(t),!r))throw new lr("Unreadable iiifContent");if(gf(r)&&(e.follows??0)<2){const{follow:a}=await import("./follow-content-BOcIhHhz.mjs");return a(r,e,Kc)}if(_f.test(String((r==null?void 0:r.type)??""))){const{annotationsContent:a}=await import("./annotations-content-Cb7_aoII.mjs");return a(r,e)}if(Uc(r)){const{imageServiceContent:a}=await import("./image-service-content-DpXbrUuI.mjs");return a(r,typeof t=="string"?t.trim():void 0)}const s=await Ve(r);switch((i=o==null?void 0:o.throwIfAborted)==null||i.call(o),s.type){case"Manifest":return{manifest:s};case"Collection":{const a=await Ss(s,e),c=e.manifestId,l=c?(a.items??[]).find(u=>u.id===c&&u.type==="Manifest"):void 0,d=l?await Vc(l,e):await qc(a,e);if(!d)throw new lr("The Collection holds no Manifest");return{manifest:d,collection:a}}case"Canvas":case"Timeline":case"Scene":return{manifest:bf(s),target:{canvasId:s.id}};default:throw new lr(`Cannot show a ${String(s.type??"resource without a type")}`)}}const Zc=t=>!!(t!=null&&t.id)&&t.type==="AnnotationPage"&&!t.items;function Zi(t){const e=[];for(const n of t)for(const o of["items","annotations"])for(const r of n[o]??[])Zc(r)&&e.push([n.id,o,r.id]);return e}async function Cf(t,e,n,o){return Ef(await hn(n,t,o),e)}async function Ef(t,e="urn:clover:annotation-page"){var r;const n=t;return Wc(n)?n:((r=(await Ve({"@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 Mf(t,e){const n=t,o=e,r=c=>Array.isArray(c)?c:c?[c]:[],s=r(n.partOf),i=r(o.partOf),a=[...s.map(c=>({...i.find(l=>l.id&&l.id===c.id),...c})),...i.filter(c=>!s.some(l=>l.id===c.id))];return{...t,...n.label===void 0&&o.label!==void 0&&{label:o.label},...a.length&&{partOf:a}}}function Tf(t,e,n,o){let r=false;const s=(t.items??[]).map(i=>{if(i.id!==e||!Array.isArray(i[n]))return i;const a=i[n].map(c=>c.id!==o.id||!Zc(c)?c:(r=true,Mf(o,c)));return r?{...i,[n]:a}:i});return r?{...t,items:s}:t}const Gi=/\/search\/([0-2])\//;function ks(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:Gi.test(s)?Number(Gi.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}function If(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 on(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 Lf(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 fo={query:"",status:"idle",hits:[],set:null},Xi={status:"idle",error:null,manifest:null,opening:null,collection:null,throughCollection:false,canvasId:null,target:null,annotationId:null,hiddenSets:[],shownSets:[],addedSets:[],search:fo,regions:null,targets:null,targetIndex:null};function Pf(t={}){const e=If(Xi),n=on(null),o=on(null),r=on(null),s=on(null),i=on(null),a=on(null);let c=null,l=null,d=[],u=[],m=[],h=0,p=null,g=null,v=null;const y=(_,I)=>{!g||_===I||(g={...g,items:g.items.map(P=>P.manifestId===_&&P.manifestAs!==I?{...P,manifestAs:I}:P)})},k=_=>{var P;const I=(P=e.get().manifest)==null?void 0:P.id;return!!I&&(I===_.manifestId||I===_.manifestAs)},x=()=>d.length||u.length||m.length?[...d,...u,...m]:Xi.addedSets;let b=t.request,M=null;const w=new Set;let B="view",A=0;const q=(_,I,P)=>{if(w.has(P))return;w.add(P);const N=M==null?void 0:M.signal;Cf(P,_,b,N).then(Z=>{N!=null&&N.aborted||e.set(D=>D.manifest?{manifest:Tf(D.manifest,_,I,Z)}:{})}).catch(()=>w.delete(P))},G=()=>{const{manifest:_,canvasId:I}=e.get();if(_)for(const[P,N,Z]of Zi(B==="all"||A>0?Rt(_).canvases:Ue(_,I)))q(P,N,Z)};e.subscribe(G);const U=(_,I,P,N,Z)=>{var Ft,Dt,Bt;const{canvases:D}=Rt(_),T=vt=>!!vt&&D.some(Wt=>Wt.id===vt),H=Ud(_),V=T(P==null?void 0:P.canvasId)?P:T(H==null?void 0:H.canvasId)?H:null,at=T(N.canvasId)?N.canvasId:(V==null?void 0:V.canvasId)??(T(N.defaultCanvasId)?N.defaultCanvasId:null)??((Ft=D[0])==null?void 0:Ft.id)??null,et=Z&&((Dt=cr(m,Z))==null?void 0:Dt.canvasId)===at?Z:null,mt=V&&et?{...V,region:void 0}:V,ft=++h;d=[],e.set({status:"ready",search:fo,regions:null,manifest:_,opening:null,collection:I,canvasId:at,target:mt&&mt.canvasId===at?mt:null,addedSets:x(),annotationId:et,targets:g});const Ht=_==null?void 0:_.structures;Array.isArray(Ht)&&JSON.stringify(Ht).includes("xywh=")&&import("./range-regions-iACwlawo.mjs").then(({contentsSet:vt})=>{h===ft&&e.set({regions:vt(_)})}),ef(_)&&import("./image-layers-DGdl54CF.mjs").then(({imageLayers:vt})=>{h===ft&&(d=vt(_),e.set({addedSets:x()}))}),at&&at!==N.canvasId&&((Bt=t.onCanvasChange)==null||Bt.call(t,at))},Q=(_,I)=>e.set(P=>{const N=P.hiddenSets.filter(D=>D!==_),Z=P.shownSets.filter(D=>D!==_);return I?{hiddenSets:N,shownSets:[...Z,_]}:{hiddenSets:[...N,_],shownSets:Z}}),st=(_,I)=>{var N,Z,D;if(!_)return;if((N=t.isControlled)!=null&&N.call(t)){I&&e.set({target:I}),(Z=t.onCanvasChange)==null||Z.call(t,_);return}const P=e.get().canvasId!==_;e.set({canvasId:_,target:I}),P&&((D=t.onCanvasChange)==null||D.call(t,_))},pt=(_,I=false)=>{const{manifest:P}=e.get(),N=Wd(P,_);st(N,N&&I?{canvasId:N,autoplay:I}:null)},S=()=>{const{manifest:_,canvasId:I}=e.get();return{at:vn(_,I),total:Rt(_).views.length}},C=(_,I)=>{M==null||M.abort(),l==null||l.abort();const P=new AbortController;return M=P,w.clear(),h++,d=[],I||(m=[],g=null),e.set({status:"loading",error:null,manifest:null,opening:_,canvasId:null,target:null,annotationId:null,search:fo,regions:null,addedSets:x(),...!I&&{collection:null,throughCollection:false,targets:null,targetIndex:null}}),P.signal},O=_=>e.set({status:"error",error:_ instanceof Error?_:new Error(String(_))});async function j(_,I={},P=false){var Z;const N=C(P&&typeof _=="string"?_:null,P);try{const D=await Kc(_,{request:b,signal:N,manifestId:I.manifestId??void 0});if(N.aborted)return;const T=D.annotation,H=T?Oc({items:[T]},`${T.id}#content-state`):[];m=H.length?[{id:`${T.id}#content-state`,source:"added",entries:H}]:D.annotationSets??[];const V=p??((Z=H[0])==null?void 0:Z.id)??D.pick;p=null,e.set({throughCollection:!!D.collection}),g=D.targets??null,g&&y(g.items[0].manifestId,D.manifest.id),e.set({targetIndex:g?0:null}),U(D.manifest,D.collection??null,D.target,I,V)}catch(D){N.aborted||O(D)}}const K=_=>{const{manifest:I,collection:P,opening:N,status:Z}=e.get();return(I==null?void 0:I.id)===_||(P==null?void 0:P.id)===_||N===_&&Z==="loading"},rt=_=>{var I;return(((I=e.get().collection)==null?void 0:I.items)??[]).find(P=>P.id===_)??{id:_,type:"Manifest"}},tt=(_,I)=>{var P,N;if(p=I,(P=t.isManifestControlled)!=null&&P.call(t)){(N=t.onManifestChange)==null||N.call(t,_);return}_t({id:_,type:"Manifest"}).then(Z=>{var D;return Z&&((D=t.onManifestChange)==null?void 0:D.call(t,_))})},_t=async(_,I)=>{if(_.type==="Collection")return await j(_.id,{},true),e.get().status==="ready";const{collection:P}=e.get(),N=C(_.id,true),Z=p;p=null;const D=Z?cr(m,Z):null,T=typeof I=="string"?{canvasId:I}:I??v;v=null;try{const H=await Vc(_,{request:b,signal:N});return N.aborted?false:(y(_.id,H.id),U(H,P,D?{canvasId:D.canvasId}:T??void 0,{},Z),true)}catch(H){return N.aborted||O(H),false}};return{store:e,viewport:n,media:o,captions:r,highlight:s,chapter:i,found:a,get request(){return b},setRequest(_){b=_},load:j,async openCollection(_){var P;const I=e.get().manifest;if(!(!I||((P=e.get().collection)==null?void 0:P.id)===_))try{const N=await kf(_,{request:b});if(N.type!=="Collection"||e.get().manifest!==I)return;e.set({collection:N})}catch{}},async goToManifest(_,I){var N,Z,D;if(K(_))return;const P=rt(_);if(P.type!=="Collection"&&((N=t.isManifestControlled)!=null&&N.call(t))){(Z=t.onManifestChange)==null||Z.call(t,_);return}await _t(P,I)&&((D=t.onManifestChange)==null||D.call(t,e.get().manifest.id))},goToTarget(_){var N,Z,D;const I=(N=e.get().targets)==null?void 0:N.items[_];if(!I)return;e.set({targetIndex:_});const P=I.canvasId?{canvasId:I.canvasId,...I.region&&{region:I.region},...I.time!==void 0&&{time:I.time}}:null;if(k(I)){P&&st(P.canvasId,P);return}if((Z=t.isManifestControlled)!=null&&Z.call(t)){v=P,(D=t.onManifestChange)==null||D.call(t,I.manifestId);return}_t(rt(I.manifestId),P??void 0).then(T=>{var H;return T&&((H=t.onManifestChange)==null?void 0:H.call(t,I.manifestId))})},async syncManifest(_){!_||K(_)||e.get().status!=="ready"||await _t(rt(_))},goTo(_,I){st(_,I?{...I,canvasId:_}:null)},next({autoplay:_=false,wrap:I=false}={}){const{at:P,total:N}=S();P+1<N?pt(P+1,_):I&&N>1&&pt(0,_)},previous(){const{at:_}=S();_>0&&pt(_-1)},first(){pt(0)},last(){pt(S().total-1)},consumeTarget(){e.set({target:null})},syncCanvas(_){_&&e.set({canvasId:_})},selectAnnotation(_){const{manifest:I,addedSets:P,canvasId:N,search:Z,regions:D}=e.get(),T=cr(Fc(I,P,Z.set,D),_);if(e.set({annotationId:T?_:null}),!T)return;a.emit(_);const{hiddenSets:H,shownSets:V}=e.get();T.setId!==vs&&bs(I,P,H,V).includes(T.setId)&&Q(T.setId,true);const at=Ue(I,N).some(ft=>ft.id===T.canvasId),et=qe(I,T.canvasId)!==null;!at&&et&&st(T.canvasId,null);const mt=et?void 0:lf(T.annotation);mt&&tt(mt,T.id)},async search(_){l==null||l.abort();const I=ks(e.get().manifest),P=_.trim();if(!P||!I){l=null,e.set({search:fo,annotationId:null});return}const N=new AbortController;l=N,e.set(Z=>({search:{...Z.search,query:P,status:"loading"}}));try{const{searchInto:Z}=await import("./search-TNACVRnK.mjs");await Z(e,I,P,b,N.signal)}catch{e.set({search:{query:P,status:"error",hits:[],set:null}})}},setSetVisible(_,I){Q(_,I)},async loadAnnotations(_){if(c==null||c.abort(),!_){u=[],e.set({addedSets:x()});return}const I=new AbortController;c=I;try{const{loadAnnotationSets:P}=await import("./annotation-collection-BcDJ7GZv.mjs"),N=await P(_,{request:b,signal:I.signal});if(I.signal.aborted)return;u=N,e.set({addedSets:x()})}catch{}},getContentState(){var at;const{manifest:_,canvasId:I}=e.get();if(!_||!I)return null;const P=n.get(),N=o.get(),Z=N&&N.currentTime>0?N.currentTime:null,D=Ue(_,I),H=P&&D.some(et=>et.id===P.canvasId)&&!Z?P:null,V=(H==null?void 0:H.canvasId)??I;return Hc({manifestId:_.id,canvasId:V,type:(at=D.find(et=>et.id===V))==null?void 0:at.type,region:H==null?void 0:H.region,time:Z})},setAnnotationPages(_){_!==B&&(B=_,G())},fetchAnnotationPages(_){const{manifest:I}=e.get();if(!I||!_.length)return;const P=new Set(_);for(const[N,Z,D]of Zi(Rt(I).canvases))P.has(D)&&q(N,Z,D)},holdAllAnnotationPages(){A++,G();let _=true;return()=>{_&&A--,_=false}},dispose(){M==null||M.abort(),c==null||c.abort(),l==null||l.abort()}}}const Af=100;function Gc(t,e){const n=$({read:t,onChange:e});n.current={read:t,onChange:e};const o=$(void 0),r=$("");return F(()=>()=>{clearTimeout(o.current),o.current=void 0},[]),ut(()=>{!n.current.onChange||o.current!==void 0||(o.current=setTimeout(()=>{var i,a;o.current=void 0;const s=n.current.read();!s||s.encoded===r.current||(r.current=s.encoded,(a=(i=n.current).onChange)==null||a.call(i,s))},Af))},[])}function Dr(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 Xc(t,e){const n=Gc(()=>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=Dr(t.media.get(),n);const c=t.media.subscribe(l=>{a(),a=Dr(l,n)});return n(),()=>{s(),i(),c(),a()}},[t,o,n])}function Cs(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(gs(o))for(let r of Ao(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 Of(t){return t.flatMap(e=>Cs(e).map(({body:n})=>n))}function Nf(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 Rf(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]))}const Yi=typeof window<"u"?$t:F;function Bf({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:m,annotationPages:h="view",onContentStateChange:p,...g}){const v=e!==void 0,y=s!==void 0,k=$({controlled:v,manifestControlled:y,onCanvasChange:o,onStatusChange:r,onManifestChange:a});k.current={controlled:v,manifestControlled:y,onCanvasChange:o,onStatusChange:r,onManifestChange:a};const[x]=z(()=>Pf({request:l,onCanvasChange:H=>{var V,at;return(at=(V=k.current).onCanvasChange)==null?void 0:at.call(V,H)},onManifestChange:H=>{var V,at;return(at=(V=k.current).onManifestChange)==null?void 0:at.call(V,H)},isControlled:()=>k.current.controlled,isManifestControlled:()=>k.current.manifestControlled}));x.setRequest(l);const[b,M]=z(x.store.get().status);Yi(()=>{let H=x.store.get().status;return x.store.subscribe(()=>{var et,mt;const{status:V,error:at}=x.store.get();V!==H&&(H=V,M(V),(mt=(et=k.current).onStatusChange)==null||mt.call(et,V,at))})},[x]);const w=$({});w.current={canvasId:e,defaultCanvasId:n,manifestId:s??i};const B=hf(l),A=$(t);A.current=t;const q=Df(t);Yi(()=>(x.load(A.current,w.current),()=>x.dispose()),[x,q,B]),F(()=>{v&&x.syncCanvas(e??null)},[x,v,e]);const G=$(m);G.current=m;const U=Ff(m);F(()=>{x.loadAnnotations(G.current??null)},[x,U,B]),F(()=>{x.setAnnotationPages(h)},[x,h]),Xc(x,p),F(()=>{y&&b==="ready"&&x.syncManifest(s??null)},[x,y,s,b]);const Q=$f(x,H=>{var V;return H.status==="ready"?((V=H.manifest)==null?void 0:V.id)??null:null});F(()=>{c&&Q&&x.search(c)},[x,c,Q]);const st=$(u);Rf(st.current,u)||(st.current=u);const pt=st.current,[S,C]=z(),[O,j]=z(d);O!==d&&(j(d),C(void 0));const K=$(void 0),[rt,tt]=z(q);rt!==q&&(tt(q),C(void 0)),F(()=>()=>{const H=K.current;K.current=void 0,H&&Lt.chosenLanguage===H&&Lt.chooseInterfaceLanguage()},[q]);const _t=ne(Lt.subscribe,()=>Lt.chosenLanguage),_=S??d??_t,I=ut(H=>{C(H);const V=Lt.stringsFor(H);K.current=V,V&&Lt.chooseInterfaceLanguage(V)},[]),[P,N]=z(0),Z=ut(()=>(N(H=>H+1),()=>N(H=>H-1)),[]),D=P>0;return[yt(()=>({clover:x,language:_,renderers:pt,chooseLanguage:I,toggleDrawn:D,drawsToggle:Z}),[x,_,pt,I,D,Z]),b,g]}function $f(t,e){return ne(t.store.subscribe,()=>e(t.store.get()))}function Ff(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 Df(t){return typeof t=="string"?t:t.id??t["@id"]??t}const zf=le(function({as:e="div",className:n,children:o,highContrast:r,...s},i){const[a,c,l]=Bf(s),d=Po(i,l.lang),u=cs(r);return f(To.Provider,{value:a,children:f(Dn.Provider,{value:d.hostLanguage,children:f(e,{ref:d.ref,className:Pt("clover-root",n),"data-status":c,...ls(u),...l,children:[o,f(Xd,{clover:a.clover,language:a.language})]})})})}),Hf=()=>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"}),Wf=()=>f(Mt,{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"})]}),Uf=()=>f("path",{stroke:"none",d:"M256 72A48 48 0 1 1 256 168A48 48 0 1 1 256 72Z M192 216H296V384H328V432H184V384H216V264H192Z"}),jf=()=>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"}),Uy=()=>f("path",{strokeLinejoin:"round",strokeWidth:"40",d:"M184 128V384L392 256Z"}),Yc=()=>f("path",{strokeLinecap:"round",strokeWidth:"45",d:"M154 154L358 358M358 154L154 358"}),jy=()=>f(Mt,{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"})]}),Vy=()=>f(Mt,{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"})]}),ee={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"}},Vf=new Set(["+","=","-","_","0","r","R","k","K","m","M","j","J","l","L"]);function Ke({label:t,lang:e,shortcut:n,scrolls:o=false,image:r,lead:s,after:i}){const{t:a}=Tt(),c=$(null),l=n?a("controlShortcut",{label:t,shortcut:n.glyph}):t;return Kf(),F(()=>{const d=c.current;d&&zr(d)&&yo(d)},[l,s]),f("span",{ref:c,className:"clover-tip","aria-hidden":"true",...dt(e),...o&&{tabIndex:-1,onMouseDown:d=>{var u;d.preventDefault(),(u=d.currentTarget.parentElement)==null||u.focus({preventScroll:true})}},children:[r&&f("img",{className:"clover-tip-image",src:r,alt:"",loading:"lazy",onLoad:()=>{const d=c.current;d&&zr(d)&&yo(d)}}),s&&f("span",{className:"clover-tip-lead",children:s}),l,i!=null&&i!==false&&f("span",{className:"clover-tip-after",children:i})]})}function lo(t){const e=t.target instanceof Element&&Es(t.target),n=e&&Rn(e);n&&yo(n)}function qy(t){const e=Rn(Es(t));e&&zr(e)&&yo(e)}function Rn(t){return Array.from(t.children).find(e=>e.classList.contains("clover-tip"))}function Es(t){const e=t.matches("input")?t.parentElement:null;return e&&Rn(e)?e:t}const Jc=(t,...e)=>e.some(n=>{try{return t.matches(n)}catch{return false}}),Qc=[":focus-visible",":has(> input:focus-visible)"];function zr(t){const e=t.parentElement;return!!(e&&Jc(e,":hover",...Qc))}function yo(t){const e=t.parentElement;if(!e)return;t.style.removeProperty("--clover-tip-room"),t.style.removeProperty("--clover-tip-shift");const n=qf(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 qf(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 Ji=0;function Qi(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&&Es(n);o&&Rn(o)&&e.add(o),e.forEach(r=>{if("tipHidden"in r.dataset)return;const s=Rn(r);s&&r.getAttribute("aria-expanded")!=="true"&&(Jc(r,...Qc)||getComputedStyle(s).visibility!=="hidden")&&t.preventDefault(),tl(r,"tipHidden",["pointerenter","focusout"])})}function tl(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 Kf(){F(()=>(Ji++===0&&(document.addEventListener("keydown",Qi,true),document.addEventListener("pointerenter",lo,true),document.addEventListener("focus",lo,true)),()=>{--Ji||(document.removeEventListener("keydown",Qi,true),document.removeEventListener("pointerenter",lo,true),document.removeEventListener("focus",lo,true))}),[])}function Zf(t,e){const n=t.target;!e||n===e||e.contains(n)&&!n.closest(".clover-canvas-overlays")||Vf.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 We=({className:t,id:e,label:n,children:o,onClick:r,expanded:s,controls:i,shortcut:a,lang:c,unavailable:l,side:d})=>{const m=e.split("-")[0].replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^-/,"");return f("button",{id:e,className:Pt("clover-canvas-button",t),"data-testid":"clover-canvas-button","data-button":m,"data-side":d,onClick:r,"aria-disabled":l||void 0,"aria-expanded":s,"aria-controls":i,"aria-label":n,"aria-keyshortcuts":a==null?void 0:a.keys,...dt(c),type:"button",children:[f("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true","data-testid":"clover-canvas-button-svg",focusable:"false",width:"16",height:"16",viewBox:"0 0 512 512",children:o}),f(Ke,{label:n,shortcut:a})]})},Gf=ge("");function ve(){return Vt(Gf)+ss()}const ur=new Map;function Xf(t,e){const n=ve(),o=$(e);o.current=e,F(()=>t?Yf(n,o):void 0,[t,n])}function Yf(t,e){for(const[n,o]of[...ur])n!==t&&o.current();return ur.set(t,e),()=>{ur.delete(t)}}const Jf=bt(()=>import("./CaptionDetails-lhSoA0rU.mjs"));function Qf(t){var e;return!!t.summary||!!((e=t.metadata)!=null&&e.length)}const el=(t,e)=>`${t}-label-${e}`,th=({id:t,canvases:e,comments:n,open:o,onClose:r,language:s})=>{const{t:i,langOf:a}=Tt(),c=$(null),[l,d]=z(o);return o&&!l&&d(true),Xf(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(We,{className:"clover-canvas-caption-close",id:`close-${t}`,label:i("commonClose"),lang:a("commonClose"),onClick:()=>r(true),children:f(Yc,{})}),e.map((u,m)=>{const h=xt(u.label,s);return f("section",{className:"clover-canvas-caption-canvas",children:[h.text&&f("p",{className:"clover-canvas-caption-label",id:el(t,m),...dt(h.lang),children:h.text}),l&&f(kt,{fallback:null,children:f(Jf,{summary:u.summary,metadata:u.metadata,comments:n==null?void 0:n.get(u.id),language:s})})]},u.id)})]})},eh=()=>f("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M256 112v288M400 256H112"}),nh=()=>f("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M400 256H112"}),oh=()=>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"}),rh=()=>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"}),sh=()=>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"}),ta=()=>f(Mt,{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"})]}),ih=()=>f(Mt,{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"})]}),ah=({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}),ch=112,lh=128;function uh(t){$t(()=>{const e=t==null?void 0:t.closest(".clover-canvas");if(!t||!e)return;const n=(s=false)=>{let i=t.offsetWidth,a=0;for(const h of s?[]:Array.from(t.children))!(h instanceof HTMLElement)||!h.offsetParent||(i=Math.min(i,h.offsetLeft),a=Math.max(a,h.offsetTop+h.offsetHeight));const c={width:t.offsetWidth-i,height:a};for(const[h,p]of Object.entries(c)){const g=`--clover-canvas-controls-${h}`;a?e.style.setProperty(g,`${p}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),m=t.offsetLeft+i-l;a&&u<ch&&m>=lh?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 Oo=()=>{if(typeof document>"u")return null;const t=document;return t.fullscreenElement??t.webkitFullscreenElement??null},nl=()=>{if(typeof document>"u")return false;const t=document;return!!(t.fullscreenEnabled??t.webkitFullscreenEnabled)},ol=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},dh=(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()},rl=async(t,e)=>{var o,r,s,i;const n=ol(t);if(n)try{if(Oo()){const c=document;await(((o=c.exitFullscreen)==null?void 0:o.call(c))??((r=c.webkitExitFullscreen)==null?void 0:r.call(c)));return}if(!nl()){e&&t&&dh(e,t);return}const a=n;await(((s=a.requestFullscreen)==null?void 0:s.call(a))??((i=a.webkitRequestFullscreen)==null?void 0:i.call(a)))}catch{}};function Ms(t){const[e,n]=z(false);return F(()=>{if(!t)return;const o=()=>{var r;return n(!!((r=Oo())!=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 fh({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(ah,{label:n,children:o}),label:n,tip:f(Ke,{label:n,shortcut:a})},t):f(We,{id:e,label:n,onClick:l?void 0:r,unavailable:l,expanded:s,controls:i,shortcut:a,lang:c,children:o},t)}const hh=({fit:t=false,clusterRef:e,children:n})=>{const[o,r]=z(null),s=Ms(o);uh(o);const i=ut(a=>{r(a),e==null||e(a)},[e]);return f("div",{className:"clover-canvas-controls","data-fit":t||void 0,"data-fullscreen":s,"data-testid":"clover-canvas-controls",ref:i,children:n})},ph=()=>()=>{};function mh(){return ne(ph,nl)}const ea=new WeakMap;function sn(t,e){const[n,o]=z(()=>ea.get(t)??null);return F(()=>{if(!e||n)return;let r=true;return t().then(s=>{ea.set(t,s),r&&o(()=>s)},()=>{}),()=>{r=false}},[t,e,n]),n}function gh(t,e,n){return t.reduce((o,r)=>o+r+n,-n)<=e}function vh(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 yh({cluster:t,ids:e,more:n,fits:o,settled:r,onFits:s}){const i=$(o);i.current=o;const a=$(s);a.current=s;const c=$(new Map),l=$(e);l.current=e;const d=$(null),u=e.join(" ");return $t(()=>{const m=t.ownerDocument,h=()=>{var B;const v=l.current,y=getComputedStyle(t),k=parseFloat(y.columnGap)||0;let x=t.clientWidth-(parseFloat(y.paddingLeft)||0)-(parseFloat(y.paddingRight)||0),b=0;for(const A of v){const q=(B=m.getElementById(A))==null?void 0:B.offsetWidth;q&&c.current.set(A,q),b=Math.max(b,c.current.get(A)??0)}for(const A of Array.from(t.children))!(A instanceof HTMLElement)||v.includes(A.id)||A.id===n||A.classList.contains("clover-canvas-more")||!A.offsetWidth||getComputedStyle(A).position==="absolute"||(x-=A.offsetWidth+k);const M=gh(v.map(A=>c.current.get(A)??b),x,k);if(M===i.current)return;const w=m.activeElement;d.current=w instanceof HTMLElement&&t.contains(w)?w.id:null,i.current=M,a.current(M)};h();const p=new ResizeObserver(()=>h());p.observe(t);const g=new MutationObserver(()=>h());return g.observe(t,{childList:true}),()=>{p.disconnect(),g.disconnect()}},[t,u,n]),$t(()=>{if(!r)return;const m=d.current;if(d.current=null,m===null)return;const h=t.ownerDocument.activeElement;(!h||!t.contains(h)||h.closest("[hidden]"))&&vh(t,m,n)},[o,r,t,n]),null}const bh=()=>import("./AnnotationMenu-nlFTIjg6.mjs"),_h=()=>import("./ChaptersMenu-hOyR7aOL.mjs"),wh=()=>import("./ChoiceMenu-Dq4FBYhi.mjs"),xh=()=>import("./ImageControls-ClVI428k.mjs"),na=2,Sh=new Set(["zoomIn","zoomOut","rotateRight","rotateLeft","reset","fullPage"]),sl={atMax:false,atMin:false,atHome:false},kh=({renderer:t,instance:e,config:n,controlButtons:o,limits:r=sl,placeholder:s,placeholderIsMore:i=false,choices:a=[],selections:c={},onSelect:l,annotations:d=[],chapters:u=[],mediaElement:m=null,onChapter:h,overStill:p,request:g,hiddenPages:v,onPageVisibilityChange:y,selectedAnnotation:k=null,onAnnotationSelect:x,onAnnotationActivate:b,captionId:M,captionOpen:w=false,onCaptionToggle:B,placeId:A,placeOpen:q=false,onPlaceToggle:G,language:U,fit:Q=true,more:st="auto",children:pt})=>{var Gn,Xn,Yn,Fe;const{t:S,langOf:C}=Tt(),[O,j]=z(false),[K,rt]=z(false),tt=`annotations-${e}`,_t=`${tt}-menu`,_=S("informationPanelTabsAnnotations"),I=C("informationPanelTabsAnnotations"),P=ut(J=>{var gt;rt(false),b==null||b(null),J&&((gt=document.getElementById(tt))==null||gt.focus())},[tt,b]),N=n.annotations&&d.length>0&&x,[Z,D]=z(false),T=`chapters-${e}`,H=`${T}-menu`,V=u.length>0&&!!h,at=$(false),et=$(null);F(()=>{const J=()=>{var gt;at.current=((gt=document.activeElement)==null?void 0:gt.id)===T};return document.addEventListener("focusin",J),()=>document.removeEventListener("focusin",J)},[T]);const mt=ut(()=>{var gt,be;if(!at.current)return;at.current=false;const J=document.activeElement;J&&J!==document.body||(be=(gt=et.current)==null?void 0:gt.querySelector('.clover-canvas-transport :is([data-button="play"], [data-button="pause"])'))==null||be.focus()},[]);F(()=>{V||mt()},[V,mt]),F(()=>()=>mt(),[mt]);const ft=ut(J=>{var gt;D(false),J&&((gt=document.getElementById(T))==null||gt.focus())},[T]),Ht=n.information&&M&&B,Ft=n.map&&A&&G,Dt=`choice-${e}`,Bt=a.length===1?xt(a[0].label,U):null,vt=(Bt==null?void 0:Bt.text)||S("canvasChoice"),Wt=Bt!=null&&Bt.text?Bt.lang:C("canvasChoice"),X=`${Dt}-menu`,ct=(Gn=sn(bh,!!N))==null?void 0:Gn.default,St=(Xn=sn(_h,V))==null?void 0:Xn.default,R=(Yn=sn(wh,a.length>0&&!!l))==null?void 0:Yn.default,lt=ut(J=>{var gt;j(false),J&&((gt=document.getElementById(Dt))==null||gt.focus())},[Dt]),Ot=mh(),[oe,ye]=z(null);F(()=>{et.current=(oe==null?void 0:oe.closest(".clover-canvas"))??null},[oe]);const Me=Ms(oe),[Vn,Xt]=z(false),Ze=J=>f(We,{className:J,id:tt,label:_,lang:I,onClick:()=>rt(gt=>!gt),expanded:K,controls:_t,children:f(Hf,{})},"annotations"),bn=(()=>{const J=[],gt=t;return n.zoom&>&&J.push({key:"zoomIn",id:`zoomIn-${e}`,shortcut:ee.zoomIn,label:S("imageZoomIn"),lang:C("imageZoomIn"),glyph:f(eh,{}),unavailable:r.atMax,onClick:()=>gt.zoomBy(na)},{key:"zoomOut",id:`zoomOut-${e}`,shortcut:ee.zoomOut,label:S("imageZoomOut"),lang:C("imageZoomOut"),glyph:f(nh,{}),unavailable:r.atMin,onClick:()=>gt.zoomBy(1/na)}),n.fullPage&&Ot&&J.push({key:"fullPage",id:`fullPage-${e}`,label:S(Me?"imageExitFullScreen":"imageFullScreen"),lang:C(Me?"imageExitFullScreen":"imageFullScreen"),glyph:Me?f(rh,{}):f(oh,{}),onClick:be=>void rl(be.currentTarget)}),n.rotation&>&&J.push({key:"rotateRight",id:`rotateRight-${e}`,shortcut:ee.rotateRight,label:S("imageRotateRight"),lang:C("imageRotateRight"),glyph:f(ta,{}),onClick:()=>gt.rotateBy(90)},{key:"rotateLeft",id:`rotateLeft-${e}`,shortcut:ee.rotateLeft,label:S("imageRotateLeft"),lang:C("imageRotateLeft"),glyph:f(ta,{}),onClick:()=>gt.rotateBy(-90)}),n.reset&>&&J.push({key:"reset",id:`reset-${e}`,shortcut:ee.reset,label:S("imageResetZoom"),lang:C("imageResetZoom"),glyph:f(sh,{}),unavailable:r.atHome,onClick:()=>gt.home()}),a.length&&J.push({key:"choice",id:Dt,label:vt,lang:Wt,glyph:f(ih,{}),onClick:()=>j(be=>!be),expanded:O,controls:X}),J})(),qn=[...bn.filter(J=>J.key!=="fullPage"),...bn.filter(J=>J.key==="fullPage")].map(J=>({id:J.id,view:Sh.has(J.key),node:fh(J,o)})),Gt=[Ft&&{id:`place-${e}`,view:false,node:f(We,{id:`place-${e}`,label:S("mapLabel"),lang:C("mapLabel"),onClick:G,expanded:q,controls:A,children:f(jf,{})},"place")},V&&{id:T,view:false,node:f(We,{id:T,label:S("playerChapters"),lang:C("playerChapters"),onClick:()=>D(J=>!J),expanded:Z,controls:H,children:f(Wf,{})},"chapters")},N&&{id:tt,view:false,node:Ze()},Ht&&{id:`information-${e}`,view:false,node:f(We,{id:`information-${e}`,label:S("informationPanelTabsAbout"),lang:C("informationPanelTabsAbout"),onClick:B,expanded:w,controls:M,children:f(Uf,{})},"information")},!!s&&{id:`placeholder-${e}`,view:false,node:f(he.Fragment,{children:s},"placeholder")}].filter(J=>!!J),_n=Gt.filter(J=>J.id===`placeholder-${e}`),Kn=[...qn.filter(J=>J.view),..._n],qt=[...qn.filter(J=>!J.view),...Gt.filter(J=>!_n.includes(J))],$e=[...Kn,...qt],[re,Zn]=z(true),wn=st==="always"||i,Ge=(Fe=sn(xh,Q&&(i||(wn||!re)&&$e.some(J=>J.view))))==null?void 0:Fe.ImageControls,Ct=re&&!wn||!Ge?[]:$e.filter(J=>J.view),se=i&&!!s&&!!Ge;F(()=>{Ct.length||Xt(false)},[Ct.length]);const Xe=J=>J.filter(gt=>!Ct.includes(gt)&&!(se&>.id===`placeholder-${e}`)).map(({node:gt})=>gt);return f(Mt,{children:[f(hh,{fit:Q,clusterRef:ye,children:[Xe(Kn),Ge&&(Ct.length>0||se)&&f(Ge,{instance:e,open:se?Ct.length>0:Vn,onOpenChange:Xt,toggle:se?s:void 0,children:Ct.map(({node:J})=>J)}),Xe(qt),pt]}),Q&&!wn&&oe&&f(yh,{cluster:oe,ids:$e.map(({id:J})=>J),more:`more-${e}`,fits:re,settled:re||Ct.length>0||!$e.some(J=>J.view),onFits:Zn}),St&&Z&&V&&f(St,{id:H,triggerId:T,label:S("playerChapters"),labelLang:C("playerChapters"),chapters:u,element:m,onChapter:h,overStill:p,request:g,onClose:ft}),ct&&K&&N&&f(ct,{id:_t,triggerId:tt,label:_,labelLang:I,annotations:d,hiddenPages:v,onPageVisibilityChange:y,selected:k,onSelect:x,onActivate:J=>b==null?void 0:b(J),onClose:P}),R&&O&&a.length>0&&l&&f(R,{id:X,triggerId:Dt,label:vt,labelLang:Wt,language:U,choices:a,selections:c,onSelect:l,onClose:lt})]})},Ch=["jpg","png","webp","gif"];class Hr extends Error{constructor(e,n,o){super(e),this.url=n,this.status=o,this.name="ImageServiceError"}}function Ts(t){return t.replace(/\/info\.json$/,"").replace(/\/+$/,"")}function No(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 Ts(a)}}function Eh(t,e){if(!t||typeof t!="object")throw new Hr("info.json is not an object",e??"");const n=t,o=Mh(n),r=o===3?n.id??n["@id"]:n["@id"]??n.id,s=Ts(r??e??""),i=Number(n.width),a=Number(n.height);if(!s||!(i>0)||!(a>0))throw new Hr("info.json is missing id, width or height",e??s);const c=Array.isArray(n.profile)?n.profile:[n.profile],l=c.find(k=>typeof k=="string"),d=c.filter(k=>!!k&&typeof k=="object"),u=Th(l),m=new Set([...Array.isArray(n.extraFeatures)?n.extraFeatures:[],...d.flatMap(k=>Array.isArray(k.supports)?k.supports:[])]),p=[...Array.isArray(n.preferredFormats)?n.preferredFormats:[]].map(k=>String(k).toLowerCase()).find(k=>Ch.includes(k))??"jpg",g=k=>{var b;const x=n[k]??((b=d.find(M=>M[k]!==void 0))==null?void 0:b[k]);return Number(x)>0?Number(x):void 0};let v=g("maxWidth"),y=g("maxHeight");return v&&!y&&(y=v),y&&!v&&(v=void 0),{id:s,version:o,level:u,width:i,height:a,tiles:Ih(n.tiles),sizes:Lh(n.sizes),maxWidth:v,maxHeight:y,maxArea:g("maxArea"),regionByPx:u>=1||m.has("regionByPx"),sizeByW:u>=1||m.has("sizeByW")||m.has("sizeByWh"),format:p,quality:"default"}}function Mh(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 Th(t){const e=t==null?void 0:t.match(/level([012])/);return e?Number(e[1]):0}function Ih(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 Lh(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 bo(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 Ph(t){return t.version===2&&t.level===0?"native":void 0}const dr=new Map;function Is(t,{request:e}={}){const n=Ts(t),o=dr.get(n);if(o)return o;const r=`${n}/info.json`,s=ws(e,r,{headers:{Accept:"application/ld+json, application/json"}}).then(async i=>{if(!i.ok)throw xs(i),new Hr(`info.json request failed with ${i.status}`,r,i.status);return Eh(await i.json(),n)}).catch(i=>{throw dr.delete(n),i});return dr.set(n,s),s}function Ah(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 Ky(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 Oh=(t,e,n,o,r)=>`${t}|${e??`${n}:${o}`}|${r}`,Nh=/^((application|audio|video)\/)?(vnd\.apple\.|x-)?mpegurl$/i,Rh=(t,e)=>!!(t&&/\.m3u8$/i.test(t.split(/[?#]/)[0]))||!!(e&&Nh.test(e)),Bh={width:1600,height:900};function $h(t,e){const n=new Array(t.length);if(!t.length)return n;const o=t.map(pn),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),m=d.width*u,h=d.height*u;n[l]=r?{x:c,y:0,width:m,height:h}:{x:0,y:c,width:m,height:h},c+=r?m:h}return n}function pn(t){var s,i;if(t.width&&t.height)return{width:t.width,height:t.height};const e=il(t);if(e!=null&&e.width&&e.height)return{width:e.width,height:e.height};const n=((s=_o(t)[0])==null?void 0:s.body)??((i=wo(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}:Bh}function il(t){return t.accompanyingContainer??t.placeholderContainer}function Fh(t,e,n,o,r){return Oh(t.id,e.id,n,o,r)}function Dh(t){const e=[];for(const n of t)al(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}:{},...typeof W(a.language)[0]=="string"?{language:W(a.language)[0]}:{}}))})});return e}const fr={};function oa(t){if(t.type!=="Video"&&!Hn(t.type)||!t.format||Rh(t.id,t.format)||typeof document>"u")return true;const e=t.type==="Video"?"video":"audio",n=fr[e]??(fr[e]=document.createElement(e));return typeof n.canPlayType!="function"?true:n.canPlayType(t.format)!==""}function zh(t,e){const n={};for(const o of t){const r=o.items.filter(oa),s=[...new Set(r.flatMap(c=>c.language??[]))],i=s.length>1?Cc(s,e):void 0,a=o.items.findIndex(c=>oa(c)&&(!i||c.language===i));a>0&&(n[o.key]=a)}return n}const hr=new WeakMap,pr=[];function Hh(t){return Ao(t).some(e=>((e==null?void 0:e.type)==="Choice"?W(e.items):[e]).some(o=>(o==null?void 0:o.type)==="Video"||Hn(o==null?void 0:o.type)))}function Wr(t){var i;const e=hr.get(t);if(e)return e;const n=[];for(const a of t.items??[])for(const c of a.items??[]){if(!gs(c))continue;const l=c.target?(i=gn(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=>Hh(a.annotation)))return hr.set(t,pr),pr;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:pr;return hr.set(t,s),s}const Bn=t=>`frame:${t.id}`;function al(t,e){(t.items??[]).forEach((n,o)=>{(n.items??[]).forEach((r,s)=>{gs(r)&&Ao(r).forEach((i,a)=>e(i,Fh(t,r,o,s,a),r))})})}function _o(t,e={},{allFrames:n=false}={}){const o=[];return Ps(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 Wh(t,e={}){for(const n of t){let o;if(Ps(n,e,r=>{o??(o=r.body.type)}),typeof o=="string")return o.toLowerCase()}}function wo(t,e={}){const n=[];return Ps(t,e,(o,r,s,i)=>{const a=o.body.type;if(a!=="Video"&&!Hn(a))return;const c=Ls(i);n.push({kind:a==="Video"?"video":"audio",body:o.body,target:r,...c?{time:c}:{}})}),n}function Uh(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 Ps(t,e,n,o=false){const r=t.width??0,s=t.height??0,i=Wr(t),a=Math.min(e[Bn(t)]??0,Math.max(0,i.length-1));al(t,(c,l,d)=>{const u=i.findIndex(g=>g.annotation===d);if(!o&&u>=0&&u!==a)return;const m=Ur(c,e[l]??0);if(!m)return;const h=d.target?gn(d.target):void 0,p=h==null?void 0:h.rect;n(m,p?{x:p.x,y:p.y,width:p.w,height:p.h}:{x:0,y:0,width:r||Number(m.body.width)||0,height:s||Number(m.body.height)||0},u,h==null?void 0:h.t)})}function cl(t){return ll(t).filter(e=>e.kind!=="transcript")}function jh(t){const e=W(t.provides);return e.includes("closedCaptions")?"captions":e.includes("subtitles")||e.includes("translation")?"subtitles":e.includes("transcript")?"transcript":"captions"}function ll(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:jh(r)})}}return e}function Vh(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 Ur(t,e=0){if(!t||typeof t!="object")return null;const n=t;if(n.type==="Choice"){const o=W(n.items);return Ur(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=Ur({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"&&!Hn(n.type)?null:{body:n,region:typeof n.region=="string"?n.region:void 0}}function ra(t,e,n={},{standIns:o=true}={}){const r=$h(t,e),s=[],i=[],a={};return t.forEach((c,l)=>{const d=r[l],u=pn(c),m=d.width/u.width,h=d.height/u.height,p=b=>({x:d.x+b.x*m,y:d.y+b.y*h,width:b.width*m,height:b.height*h}),g=wo(c,n),v=_o(c,n,{allFrames:true}).map(b=>({...b,canvas:c})),y=il(c);if(o&&!v.length&&g.some(b=>b.kind==="audio")&&y){const b=pn(y);for(const M of _o(y))v.push({...M,canvas:y,target:{x:M.target.x/b.width*u.width,y:M.target.y/b.height*u.height,width:M.target.width/b.width*u.width,height:M.target.height/b.height*u.height}})}const k=n[Bn(c)]??0;v.forEach(({body:b,target:M,region:w,rotation:B,frame:A,canvas:q},G)=>{var pt;const U=No(b.service);if(!U&&!b.id)return;const Q=`${q.id}|${G}|${b.id??U}|${w??""}|${B??""}`,st=!(U&&w);if(s.push({id:Q,service:U,url:b.id,width:st&&Number(b.width)||void 0,height:st&&Number(b.height)||void 0,region:w,...B?{rotation:B}:{},placement:p(M),...A!=null&&A!==k?{hidden:true}:{}}),A!=null){const S=a[pt=Bn(c)]??(a[pt]=[]);(S[A]??(S[A]=[])).push(Q)}});const[x]=g;if(x!=null&&x.body.id){const b=Uh(g),M=b?b[0]:void 0;i.push({id:`${c.id}|media|${x.body.id}`,kind:x.kind,src:(M==null?void 0:M.src)??x.body.id,format:M?M.format:x.body.format,placement:p(x.target),duration:b?Number(c.duration)||void 0:Number(x.body.duration??c.duration)||void 0,...b?{segments:b}:{},poster:qh(c),captions:cl(c)})}}),{images:s,media:i,placements:r,frames:a}}function qh(t){var e;return(e=jr(t))==null?void 0:e.source}const Zy=1280;function jr(t){var c;const e=t.placeholderContainer;if(!e)return;const n=(c=_o(e)[0])==null?void 0:c.body;if(!n)return;const o=No(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}=pn(e);return{source:s,width:i,height:a}}function Kh(t,e,n){const o=pn(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 Zh=({hidden:t})=>{const{t:e,langOf:n}=Tt(),o=e("imageExitFullScreen");return f("button",{"aria-label":o,...dt(n("imageExitFullScreen")),className:"clover-canvas-exit-full-screen",hidden:t,onClick:r=>void rl(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]})},ul="50%";function dl(t,e=ul,n=null){const[o,r]=z(()=>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 Gh(t){const[e,n]=z(false);return F(()=>{if(!t)return;const o=()=>n(Oo()===t);return o(),document.addEventListener("fullscreenchange",o),document.addEventListener("webkitfullscreenchange",o),()=>{document.removeEventListener("fullscreenchange",o),document.removeEventListener("webkitfullscreenchange",o)}},[t]),e}function Xh(t){const[e,n]=z(false);return F(()=>{if(!t)return;const o=()=>{const r=Oo();n(r===t||!!r&&ol(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 Yh extends he.Component{constructor(){super(...arguments);L(this,"state",{error:null})}static getDerivedStateFromError(n){return{error:n}}render(){const{error:n}=this.state;return n?f(Jh,{error:n}):this.props.children}}function Jh({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",...dt(n("statusError")),children:e("statusError")}),t.message&&f("span",{className:"clover-canvas-error-body",lang:"en",children:t.message})]})}const Qh=250,sa=100,tp=330,mr=new WeakMap;let gr;const ia=(t,e)=>t.style.setProperty("--clover-loading-elapsed",`${Math.round(e)}ms`);function ep(t){var i;const e=t.closest(".clover-body")??t.parentElement,n=t.parentElement;if(!e||!n)return()=>{};const o=performance.now();let r=mr.get(e);if(!r){const a=gr,c=a&&o>=a.at&&o-a.at<sa&&!a.host.isConnected;r={start:c?a.start:o,marks:0},c&&(gr=void 0),mr.set(e,r)}clearTimeout(r.timer),(i=r.ghost)==null||i.remove(),r.ghost=void 0,r.marks++,ia(t,o-r.start);const s=r;return()=>{if(--s.marks)return;const a=performance.now(),c=a-s.start;gr={start:s.start,at:a,host:e};const l=t.firstElementChild,d=c>=Qh&&n.isConnected&&l&&getComputedStyle(l).animationName.startsWith("clover-loading")?t.cloneNode(true):void 0;d&&(ia(d,c),n.appendChild(d)),s.ghost=d,s.timer=setTimeout(()=>{if(mr.delete(e),!d)return;const u=d.firstElementChild;u&&(u.style.transform=getComputedStyle(u).transform),d.dataset.done="",setTimeout(()=>d.remove(),tp)},sa)}}const np=typeof window>"u"?F:$t;function Ln({overlay:t=false,className:e}){const n=$(null);return np(()=>{const o=n.current;return o?ep(o):void 0},[]),f("span",{ref:n,"aria-hidden":"true",className:Pt("clover-loading",e),"data-overlay":t||void 0,children:f("span",{})})}const op={image:"bodyUnloadableImage",video:"bodyUnloadableVideo",audio:"bodyUnloadableAudio",model:"bodyUnloadableModel"};function rp({kind:t,shown:e,room:n=false}){const{t:o,langOf:r}=Tt(),s=op[t];return f("div",{className:"clover-body-unloadable","data-room":n||void 0,role:"status",children:e&&f("p",{...dt(r(s)),children:o(s)})})}function sp({text:t,lang:e}){return f("div",{className:"clover-body-note","aria-hidden":"true",children:f("p",{...dt(e),children:t})})}function Ro(t,e,n=false,o){const r=ve(),{hostLanguage:s}=Tt(void 0,o);if(n)return{props:{},node:null};const i=Lo(e,s);return i===void 0?{props:{"aria-label":t},node:null}:{props:{"aria-labelledby":r},node:f("span",{hidden:true,id:r,...dt(i),children:t})}}const ip=Object.freeze({a:1,b:0,c:0,d:1,e:0,f:0});function ce(t,e){return{a:1,b:0,c:0,d:1,e:t,f:e}}function pe(t,e=t){return{a:t,b:0,c:0,d:e,e:0,f:0}}function Wn(t){const e=Math.cos(t),n=Math.sin(t);return{a:e,b:n,c:-n,d:e,e:0,f:0}}function ap(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 me(...t){return t.reduce((e,n)=>ap(e,n),ip)}function cp(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 Se(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 Gy(t){return`matrix(${[t.a,t.b,t.c,t.d,t.e,t.f].map(up).join(",")})`}function lp(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 up(t){const e=Math.round(t*1e6)/1e6;return Object.is(e,-0)?"0":String(e)}function fl(t){return{x:t.x+t.width/2,y:t.y+t.height/2}}function cn(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 dp(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 Bo(t,e){const n=[Se(t,{x:e.x,y:e.y}),Se(t,{x:e.x+e.width,y:e.y}),Se(t,{x:e.x,y:e.y+e.height}),Se(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 Cn(t,e,n){return Math.min(Math.max(t,e),n)}const vr=t=>!!(t&&"overlays"in t);let Vr;const fp=()=>Promise.resolve().then(()=>uf).then(t=>{Vr=t.buildContentState}),hp=bt(()=>import("./MediaBody-qOIVDdNm.mjs")),pp=()=>import("./AnnotationState-Diacn0Xk.mjs"),mp=new Map,gp={menu:[],placed:[],timed:[],hiddenPages:[],setPagesVisible:()=>{},listedCount:0,comments:mp,selected:null,select:()=>{},activate:()=>{},release:()=>false,quietlyOpened:null},vp=bt(()=>import("./FrameAnimation-C5bLeZc9.mjs")),aa=bt(()=>import("./PlaceBox-Icavvsim.mjs")),yp=bt(()=>import("./Placeholder-DF1FFSpC.mjs")),bp=bt(()=>import("./ControlsFade-9CrQlxNq.mjs")),_p=()=>true,wp=bt(()=>import("./Placeholder-DF1FFSpC.mjs").then(({PlaceholderToggle:t})=>({default:t}))),ca={zoom:true,fullPage:true,rotation:true,reset:true,annotations:true,information:true,map:true},xp={zoom:false,fullPage:false,rotation:false,reset:false,annotations:false,information:false,map:false},Sp={description:"canvasKeysImage",keys:["ArrowLeft ArrowRight ArrowUp ArrowDown",ee.zoomIn.keys,ee.zoomOut.keys,ee.reset.keys,ee.rotateRight.keys,ee.rotateLeft.keys].join(" ")},kp={description:"canvasKeysMedia",keys:[ee.play.keys,"J L",ee.mute.keys].join(" ")},Cp={description:"canvasKeysAnnotations",keys:"Escape"},Ep=t=>{var s;const e=!!((s=t.canvases)!=null&&s.length)||hl(t.body,t.src).length>0,[n,o]=z(false),r=e||n&&t.manifestId==="loading";return r!==n&&o(r),r?f(Yh,{children:f(Mp,{...t})}):null},Mp=t=>{var oi,ri,si,ii,ai,ci;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:m,className:h,options:p,navigator:g=false,controls:v=true,collapseControls:y="auto",controlButtons:k,annotations:x,onReady:b,onViewportChange:M,onContentStateChange:w,onMediaElement:B,onCaptionChange:A,caption:q,onEnded:G,chapters:U,highlightedChapter:Q,onChapterHighlight:st,placeholder:pt=true,ahead:S,children:C}=t,{t:O}=Tt(),j=$(null),[K,rt]=z(null),tt=Gh(K),_t=Ms(K),_=Xh(K),I=Po(rt),P=cs(u),N=!!e.controlsVisibility,D=(e.controlsVisibility??_p)(N?K:null,p==null?void 0:p.hideDelay,j),[T,H]=z(false),V=dl(K),at=ve(),[et]=z(()=>m??`clover-canvas-${at}`),mt=$(null),[ft,Ht]=z(null),Ft=vr(ft)?ft:null,[Dt,Bt]=z(null),vt=v===false?null:v===true?ca:{...ca,...v},[Wt,X]=z("loading"),[ct,St]=z(false),[R,lt]=z(0),[Ot,oe]=z(sl),ye=$(b),Me=$(M),Vn=$(p);ye.current=b,Me.current=M,Vn.current=p;const Xt=ms(r),Ze=yt(()=>Dh(o??[]),[o]),Do=yt(()=>zh(Ze,d),[Ze,d]),[bn,qn]=z({}),Gt=yt(()=>({...Do,...bn}),[Do,bn]),_n=(E,Y)=>qn(ht=>({...ht,[E]:Y})),Kn=yt(()=>x==null?void 0:x.filter(E=>!E.layer||(Gt[E.layer.key]??0)===E.layer.item),[x,Gt]),qt=(oi=x==null?void 0:x.find(E=>E.layer&&E.annotation.id===t.selectedAnnotation))==null?void 0:oi.layer;F(()=>{qt&&(Gt[qt.key]??0)!==qt.item&&_n(qt.key,qt.item)},[qt==null?void 0:qt.key,qt==null?void 0:qt.item,t.selectedAnnotation]);const $e=!!(vt!=null&&vt.information),re=!!(x!=null&&x.length),Zn=sn(pp,re),[wn,Ge]=z(null),Ct=re&&wn||gp,se=yt(()=>{var ht,Nt;const E=(ht=x==null?void 0:x.find(Kt=>Kt.annotation.id===Ct.selected))==null?void 0:ht.annotation,Y=(Array.isArray(E==null?void 0:E.body)?E==null?void 0:E.body:[E==null?void 0:E.body]).find(Kt=>(Kt==null?void 0:Kt.type)==="Feature");return E&&Y?{id:String(E.id),feature:Y,name:((Nt=Y.properties)==null?void 0:Nt.label)??E.label}:null},[x,Ct.selected]),Xe=se?`${se.id}:${t.refind??0}`:null,[Gn,Xn]=z(null),Yn=Xe!==null&&Gn!==Xe,Fe=yt(()=>{var Kt,nn;const E=(o??[]).map(Jt=>Jt.navPlace).filter(Boolean),Y=E.length?E:t.navPlace?[t.navPlace]:[];if(!Y.length)return null;const ht=Y.flatMap(Jt=>(Jt==null?void 0:Jt.type)==="FeatureCollection"?Jt.features??[]:(Jt==null?void 0:Jt.type)==="Feature"?[Jt]:[]);if(!ht.length)return null;const Nt=ht.length===1?(nn=(Kt=ht[0])==null?void 0:Kt.properties)==null?void 0:nn.label:void 0;return{feature:{type:"FeatureCollection",features:ht},name:Nt??t.label}},[o,t.navPlace,t.label]),J=`place-box-${et}`,[gt,be]=z(false),[tu,eu]=z(false),Jn=$(Ct);Jn.current=Ct;const Qn=ut(()=>Jn.current.release(),[]),{comments:zo,listedCount:Ws}=Ct,Ye=yt(()=>$e?(o??[]).filter(E=>Qf(E)||zo.has(E.id)):[],[o,$e,zo]),Ho=`caption-${et}`,[nu,Us]=z(false),Wo=nu&&Ye.length>0,js=ut(E=>{var Y;Us(false),E&&((Y=document.getElementById(`information-${et}`))==null||Y.focus())},[et]),Yt=yt(()=>(o??[]).find(E=>Wr(E).length)??null,[o]),ou=Yt?Wr(Yt):Ip,jt=yt(()=>o!=null&&o.length?ra(o,Xt,Gt,{standIns:o.length>1}):null,[o,Xt,Gt]),ru=yt(()=>hl(s,i,a),[s,i,a]),nt=(jt==null?void 0:jt.media[0])??null,Vs=!N&&(nt==null?void 0:nt.kind)==="video",su=N||Vs,iu=N?D:T,au=yt(()=>{if(o!=null&&o.length)return Wh(o,Gt);const E=(Array.isArray(s)?s:s?[s]:[])[0];return typeof(E==null?void 0:E.type)=="string"?E.type.toLowerCase():i?"image":void 0},[o,Gt,s,i]),[Ut,cu]=z(null),to=$(B);to.current=B;const lu=ut(E=>{var Y;cu(E),(Y=to.current)==null||Y.call(to,E)},[]),Te=jt?jt.images:ru,Ie=!!nt&&(o==null?void 0:o.length)===1,Le=Ie&&(nt==null?void 0:nt.kind)==="audio",uu=Ie&&(nt==null?void 0:nt.kind)==="video",Je=(o==null?void 0:o.length)===1&&!nt&&!Yt&&Te.length===0,eo=!Ie&&!Je&&((ri=p==null?void 0:p.gestures)==null?void 0:ri.navigable)!==false,ie=o?`${n??""}
|
|
2
|
+
${o.map(E=>E.id).join("|")}`:null,Pe=yt(()=>{if(!o||!pt)return[];const E=o.flatMap(Y=>{const ht=jr(Y),Nt=xt(Y.label,d);return ht?[{...ht,alt:Nt.text,lang:Nt.lang}]:[]});return Xt==="right-to-left"||Xt==="bottom-to-top"?E.reverse():E},[o,Xt,pt,d]),[Uo,qs]=z(false),[du,Ks]=z(null),wt=!Le&&Pe.length>0&&(nt?du!==ie:!Uo),Zs=p==null?void 0:p.request;F(()=>{if(wt){Promise.resolve().then(()=>dg);for(const{source:E}of Pe)E.service&&Is(E.service,{request:Zs}).catch(()=>{})}},[wt,Pe,Zs]);const no=yt(()=>{if(!(S!=null&&S.length)||pt&&!Uo&&S.some(ht=>jr(ht)))return null;const E=ra(S,Xt,Gt,{standIns:false});if(E.media.length)return null;const Y=E.images.filter(ht=>ht.service&&!ht.hidden);return Y.length?{images:Y,world:cn(E.placements)??void 0}:null},[S,Xt,Gt,pt,Uo]);F(()=>{var E;Wt!=="ready"||wt||!no||(E=ft==null?void 0:ft.prefetch)==null||E.call(ft,no.images,{world:no.world})},[ft,Wt,wt,no]);const Gs=(E,{annotations:Y=false,fullPage:ht=false}={})=>({...E,zoom:false,rotation:false,reset:false,fullPage:ht&&E.fullPage,annotations:Y&&E.annotations}),xn=Je&&_t,Xs=he.Children.count(C)>0,jo=Pe.length>0&&!Le&&!nt,Sn=vt?wt?Ye.length||Xs||Ws||nt&&(U!=null&&U.length)?Gs(vt,{annotations:true}):null:Ie||Je?Ze.length||Ye.length||Xs||Ws||nt&&(U!=null&&U.length)||xn&&vt.fullPage?Gs(vt,{annotations:true,fullPage:xn}):null:vt:null,Vo=g&&!wt&&(nt?nt.kind==="audio"&&!Ie&&Te.length>0:true),[qo,fu]=z(null),Qe=nt?qo??nt.placement:null,[oo,hu]=z(Lp),Ko=yt(()=>{const E=(nt==null?void 0:nt.kind)==="video"&&Ut&&Qe?[...Te,{id:nt.id,placement:Qe,width:Qe.width,height:Qe.height,media:{element:Ut}}]:Te;return oo.length?[...E,...oo]:E},[Te,nt,Ut,Qe,oo]),Ys=Ie&&(nt==null?void 0:nt.kind)==="video"&&qo?qo:jt?cn(jt.placements):null,pu=JSON.stringify([Te,Ys,Ko.length!==Te.length&&[nt==null?void 0:nt.id,Qe],oo.map(E=>E.id)]),tn=$(null),Zo=$(false),Go=()=>{nt?Ks(wt?ie:null):qs(wt),wt||Qn()},ro=$(null),mu=E=>{if(Ut&&!wt){Ut.currentTime=E;return}ro.current=E,wt&&Go()};F(()=>{!Ut||ro.current===null||(Ut.currentTime=ro.current,ro.current=null)},[Ut]);const Xo=Array.isArray(s)?s[0]:s,At=[c,(si=o==null?void 0:o[0])==null?void 0:si.label,Xo==null?void 0:Xo.label].map(E=>xt(E,d)).find(E=>E.text),gu=yt(()=>{const E=xt(l,d);return E.text&&E.text!==(At==null?void 0:At.text)?E:void 0},[l,d,At==null?void 0:At.text]),Js=Ro((At==null?void 0:At.text)||O("canvasImage"),At?At.lang:I.langOf("canvasImage"),false,I.hostLanguage),so=wt?[]:[...eo?[Sp]:[],...nt?[kp]:[],...re?[Cp]:[]],Qs=`keys-${et}`,vu=eo&&!wt&&!I.langOf("canvasRoleDescription")?O("canvasRoleDescription"):void 0,Yo=!!Sn&&Ye.length>0,yu=Yo&&Ye.map((E,Y)=>xt(E.label,d).text?el(Ho,Y):null).filter(Boolean).join(" ")||void 0,ti=$({canvases:o,scene:jt,canvasKey:ie});ti.current={canvases:o,scene:jt,canvasKey:ie};const kn=$(null),Jo=ut(()=>{const{canvases:E,scene:Y,canvasKey:ht}=ti.current;kn.current=E&&Y&&tn.current===ht?{key:ht,canvases:E,placements:Y.placements}:null},[]),bu=!o||((ii=kn.current)==null?void 0:ii.key)===ie,en=Gc(()=>{const E=kn.current,Y=mt.current;if(!E||n==="loading")return null;const ht=Ut&&Ut.currentTime>0?Ut.currentTime:null,Nt=!ht&&Y&&vr(Y)?pl(Y.getBounds(),E.canvases,E.placements):null,Kt=E.canvases.find(nn=>nn.id===(Nt==null?void 0:Nt.canvasId))??E.canvases[0];return Kt?Vr?Vr({manifestId:n,canvasId:Kt.id,type:Kt.type,region:Nt&&{x:Nt.rect.x,y:Nt.rect.y,w:Nt.rect.width,h:Nt.rect.height},time:ht}):(fp().then(()=>en()),null):null},w);F(()=>Dr(Ut,en),[Ut,en]),F(()=>{const E=j.current;if(!E)return;const Y=e(E,Vn.current),ht=vr(Y)?Y:null;mt.current=Y,Ht(Y),Y.setDismiss(Qn);const Nt=()=>{if(!ht)return;const Zt=ht.viewLimits();oe(_e=>_e.atMax===Zt.atMax&&_e.atMin===Zt.atMin&&_e.atHome===Zt.atHome?_e:Zt)},Kt=Y.on("open",()=>{var Zt;Nt(),er(false),Jo(),en(),X("ready"),lt(_e=>_e+1),ht&&((Zt=ye.current)==null||Zt.call(ye,Tp(ht,()=>kn.current,_e=>{var ui,di;const li=Jn.current.placed.find(nr=>nr.id===_e);return li?(Jn.current.select(li),(di=Array.from(((ui=ht.overlays)==null?void 0:ui.container.querySelectorAll("[id]"))??[]).find(nr=>nr.id===_e))==null||di.focus({preventScroll:true}),true):false})))}),nn=Y.on("change",()=>{Nt(),er(false),Jo(),en(),X("ready"),lt(Zt=>Zt+1)}),Jt=Y.on("error",()=>{Y.isOpen||X("error")}),wu=Y.on("unloadable",Zt=>St(!!Zt)),xu=Y.on("viewport",()=>{var Zt;Nt(),ht&&((Zt=Me.current)==null||Zt.call(Me,ht.getBounds())),en()});return()=>{Kt(),nn(),Jt(),wu(),xu(),Y.dispose(),mt.current=null,Ht(null)}},[m,e,Qn,Jo]),F(()=>{if(!(!Ft||!Dt))return Ft.attachNavigator(Dt)},[Ft,Dt]),F(()=>{if(!(!ft||!Je))return ft.setGestures({navigable:false}),()=>ft.setGestures({})},[ft,Je]);const Qo=$(false);F(()=>{var Y;if(xn)return;const E=!document.activeElement||document.activeElement===document.body;Qo.current&&E&&((Y=j.current)==null||Y.focus()),Qo.current=false},[xn]);const tr=$(false);$t(()=>{var E;tn.current===null||tn.current===ie||((E=mt.current)==null||E.clear(),kn.current=null,tr.current=true,X("loading"))},[ie]),F(()=>{const E=mt.current;if(wt&&(Zo.current=true),!E||!V||wt)return;const Y=tr.current||tn.current!==null&&tn.current!==ie;(!E.isOpen||Y)&&X("loading");const ht=Ie||Zo.current&&E.isOpen||Y;tn.current=ie,Zo.current=false,tr.current=false,E.setImages(Ko,{world:Ys??void 0,fit:ht})},[pu,m,Ut,V,wt]);const ei=$(n),[_u,er]=z(false);$t(()=>{var E;n!==ei.current&&(ei.current=n,(E=mt.current)==null||E.clear(),er(true),X("loading"))},[n]);const ni=Wt==="loading"&&(Ko.length>0||n==="loading")&&V&&!wt;return f(Dn.Provider,{value:I.hostLanguage,children:f("figure",{"aria-labelledby":yu,className:Pt("clover-canvas",h),"data-testid":"clover-canvas","data-status":Wt,...ls(P),"data-unloadable":ct||void 0,"data-has-navigator":Vo,"data-fullscreen":tt,"data-exit":_||void 0,"data-controls":su?iu?"visible":"hidden":void 0,"data-media":au,"data-recording":nt?"":void 0,"data-player":Le?"":void 0,"data-animated":Yt?"":void 0,"data-navigable":eo,"data-placeholder":Pe.length&&!Le?wt:void 0,ref:I.ref,onFocus:E=>{Qo.current=xn&&E.target.id===`fullPage-${et}`},onKeyDown:E=>{if(E.key==="Escape"&&Wo&&!E.defaultPrevented){E.preventDefault(),js(false);return}if(E.key==="Escape"&&!E.defaultPrevented&&!E.currentTarget.querySelector(".clover-canvas-menu")&&Qn()){E.preventDefault();return}Zf(E,j.current)},style:{position:"relative",width:"100%",height:"100%",margin:0,overflow:"hidden",isolation:"isolate"},children:[(Sn||Vo)&&nt&&f("div",{className:"clover-canvas-scrim","aria-hidden":"true"}),Vs&&f(kt,{fallback:null,children:f(bp,{element:K,hideDelay:p==null?void 0:p.hideDelay,picture:j,onChange:H})}),f(Zh,{hidden:!_}),ft&&(Sn||jo)&&f(kh,{renderer:Ft,instance:et,config:Sn??xp,controlButtons:k,limits:Ot,placeholderIsMore:jo&&!nt,chapters:nt?U:void 0,mediaElement:Ut,onChapter:mu,overStill:!!nt&&wt,request:p==null?void 0:p.request,placeholder:jo&&f(kt,{fallback:null,children:f(wp,{instance:et,media:!!nt,active:wt,onToggle:Go,more:!!vt&&(vt.zoom||vt.rotation||vt.reset||vt.fullPage)})}),fit:!N,more:y,choices:wt?[]:Ze,selections:Gt,onSelect:_n,annotations:Ct.menu,hiddenPages:Ct.hiddenPages,onPageVisibilityChange:Ct.setPagesVisible,selectedAnnotation:Ct.selected,onAnnotationSelect:Ct.select,onAnnotationActivate:Ct.activate,captionId:Yo?Ho:void 0,captionOpen:Wo,onCaptionToggle:()=>Us(E=>!E),placeId:Fe?J:void 0,placeOpen:gt,onPlaceToggle:()=>{eu(true),be(E=>!E)},language:d,children:Sn&&C}),Vo&&f("div",{ref:Bt,className:"clover-canvas-navigator","data-testid":"clover-canvas-navigator","aria-hidden":"true"}),f("div",{ref:j,className:"clover-canvas-viewport",style:{position:"absolute",inset:0,overflow:"hidden",zIndex:-1},"data-testid":"clover-canvas-viewport",role:re?"group":"img","aria-roledescription":vu,...Js.props,"aria-describedby":so.length?Qs:void 0,"aria-keyshortcuts":so.map(({keys:E})=>E).join(" ")||void 0,"aria-busy":ni,tabIndex:0}),Js.node,so.length>0&&f("span",{id:Qs,style:je,children:so.map(({description:E},Y)=>f(he.Fragment,{children:[Y>0&&" ",f("span",{...dt(I.langOf(E)),children:O(E)})]},E))}),f(rp,{kind:"image",shown:ct&&!wt}),Je&&!wt&&(At==null?void 0:At.text)&&f(sp,{text:At.text,lang:At.lang||void 0}),(nt==null?void 0:nt.kind)==="audio"&&!Le&&Te.length===0&&!wt&&(At==null?void 0:At.text)&&f("p",{className:"clover-canvas-sound-label","aria-hidden":"true",...dt(At.lang||void 0),children:At.text}),Pe.length>0&&!Le&&f(kt,{fallback:null,children:f(yp,{instance:et,stills:Pe,vertical:Xt==="top-to-bottom"||Xt==="bottom-to-top",media:!!nt,active:wt,lingering:Wt==="loading"&&!_u,onToggle:Go,request:p==null?void 0:p.request})}),ft&&nt&&V&&!wt&&f(kt,{fallback:null,children:f(hp,{media:nt,request:p==null?void 0:p.request,fillable:uu,surface:ft,instance:et,onElement:lu,onFit:fu,onCaptionChange:A,caption:q,navigable:eo,fullscreen:Ie&&!!(vt!=null&&vt.fullPage),isFullscreen:_t,onEnded:G,chapters:U,highlightedChapter:Q,onChapterHighlight:st,autoPlay:!Le&&Pe.length>0&&Ct.quietlyOpened!==ie,language:d,notes:Ct.timed,marked:Ct.placed,selectedAnnotation:Ct.selected,onAnnotationSelect:re?Ct.select:void 0,onAnnotationActivate:Ct.activate,player:Le&&o?{canvas:o[0],title:At,partOf:gu}:void 0})}),Ft&&Yt&&(jt==null?void 0:jt.frames[Bn(Yt)])&&!wt&&f(kt,{fallback:null,children:f(vp,{renderer:Ft,frames:ou,byFrame:jt.frames[Bn(Yt)],animationKey:Yt.id,sceneVersion:R,autoplay:(ai=p==null?void 0:p.animation)==null?void 0:ai.autoplay,loop:(ci=p==null?void 0:p.animation)==null?void 0:ci.loop,onEnded:G,language:d,duration:Number(Yt.duration),canvas:Yt,place:jt.placements[o.indexOf(Yt)],onItems:hu},Yt.id)}),Zn&&re&&x&&f(Zn.AnnotationState,{given:t,annotations:Kn??x,scene:jt,renderer:Ft,sceneVersion:R,drawn:bu,media:nt,mediaElement:Ut,showPlaceholder:wt,canvasKey:ie,openImages:qs,openMedia:Ks,host:j,onModel:Ge,refind:t.refind??0}),ni&&f(Ln,{overlay:true}),se&&f(kt,{fallback:null,children:f(aa,{id:`place-of-${et}`,open:Yn,onClose:E=>{var Y;Xn(Xe),E&&((Y=document.getElementById(se.id))==null||Y.focus())},feature:se.feature,name:se.name,language:d})}),Fe&&tu&&f(kt,{fallback:null,children:f(aa,{id:J,open:gt,onClose:E=>{var Y;be(false),E&&((Y=document.getElementById(`place-${et}`))==null||Y.focus())},feature:Fe.feature,name:Fe.name,language:d})}),Yo&&f(th,{id:Ho,canvases:Ye,comments:zo,open:Wo,onClose:js,language:d})]})})};function Tp(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(Kh(i.canvases[a],i.placements[a],r),s),true)},getCanvasRegion(){const o=e();return o?pl(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 Ip=[],Lp=[];function hl(t,e,n=false){const o=Array.isArray(t)?t:t?[t]:[];return o.length?o.map((s,i)=>{const a=No(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 pl(t,e,n){let o=null;if(n.forEach((u,m)=>{const h=Math.max(t.x,u.x),p=Math.max(t.y,u.y),g=Math.min(t.x+t.width,u.x+u.width)-h,v=Math.min(t.y+t.height,u.y+u.height)-p;if(g<=0||v<=0)return;const y=g*v;(!o||y>o.area)&&(o={index:m,area:y,clip:{x:h,y:p,width:g,height:v}})}),!o)return null;const{index:r,clip:s}=o,i=e[r],a=n[r],c=pn(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 Pp(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=xt(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 Ap(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 Op(t,e){const n=t.store.get().manifest;if(e.canvasId&&Rt(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 ml(t){if(typeof t=="string")return la(t);const e=t;return(e==null?void 0:e.type)==="SpecificResource"?e:typeof(e==null?void 0:e.id)=="string"?la(e.id):e}const la=t=>t.replace(/\/((?:t|xywh)=[^/#]*)$/,"#$1");function gl(t){const e=W(t.thumbnail)[0];return e&&typeof e=="object"?{thumbnail:e}:{}}const ua=new WeakMap,da=[];function Np(t,e,n){if(!t||!e)return da;let o=ua.get(t);o||ua.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 m of W(d.items)){if((m==null?void 0:m.type)==="Range"){c(m);continue}if(!u)continue;const h=gn(ml(m));if(h.id.split("#")[0]!==e)continue;const p=Ls(h.t);p&&i.push({...d.id?{id:d.id}:{},label:d.label,...p,...gl(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 m;return{...d,end:d.end??((m=i[u+1])==null?void 0:m.start)??n}}):da;return o.set(r,l),l}const fa=new WeakMap,ha=[];function Rp(t){if(!t)return ha;const e=fa.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 k,x;if(!c||o.has(c.id??c))return[];o.add(c.id??c);const l=[],d=[],u=[];let m;for(const b of W(c.items))if((b==null?void 0:b.type)==="Range"){const M=r(b);l.push(...M),M.forEach(w=>d.push(...w.canvasIds))}else{const M=gn(ml(b));if(!M.id)continue;m??(m=M),d.push(M.id),u.push(M)}const h=W(c.behavior);if(h.includes("no-nav"))return l;const p=m??void 0,g={id:c.id??`range-${o.size}`,label:c.label,canvasId:(p==null?void 0:p.id)??((k=l[0])==null?void 0:k.canvasId),canvasIds:[...new Set(d)],...h.includes("sequence")?{sequence:true}:{},...gl(c),children:l},v=Ls(p==null?void 0:p.t);return v?g.time=v:!p&&((x=l[0])!=null&&x.time)&&(g.time=l[0].time),p!=null&&p.rect&&(g.region=p.rect),(h.includes("sequence")&&u.length>1&&!u.some(b=>b.t)||Bp(u,n))&&(g.parts=u.map(b=>({canvasId:b.id,...b.rect?{region:b.rect}:{}}))),[g]},s=W(t.structures).flatMap(r),i=s.length===1&&s[0].children.length?s[0].children:s,a=i.length?i:ha;return fa.set(t,a),a}function Bp(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 Xy(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 m=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 p={id:l.id,depth:d,...l.sequence?{sequence:true}:{}};i(r,l,d)&&(r=p),m&&i(s,l,d)&&(s=p)}l.children.forEach(h=>a(h,d+1,m))};t.forEach(l=>a(l,0,false));const c=s??r;return c?c.id:null}function $p(){const t=ot(n=>n.status),e=ot(n=>n.error);return yt(()=>({status:t,error:e}),[t,e])}function Fp(){return ot(t=>t.manifest)}function As(){return ot(t=>Rt(t.manifest))}function Os(){return ot(t=>Ue(t.manifest,t.canvasId))}function Dp(){return ot(t=>qe(t.manifest,t.canvasId))}function zp(){const{clover:t}=ue("useNavigation"),e=ot(o=>vn(o.manifest,o.canvasId)),n=ot(o=>Rt(o.manifest).views.length);return yt(()=>Lf(t,e,n),[t,e,n])}function Hp(){return ot(t=>$c(t.manifest,t.addedSets))}function Yy(t){const{language:e}=ue("useLocalized");return yt(()=>xt(t,e),[t,e])}function Jy(){return Tt().t}function Qy(){return Tt().langOf}const Wp=({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:m,...h})=>{const p=ue("Canvas"),{clover:g}=p,v=ne(g.captions.subscribe,g.captions.get,g.captions.get),y=s??v,k=d??p.language,x=Os(),b=ot(R=>Hd(R.manifest,R.canvasId)),{direction:M}=As(),w=Fp(),B=Dp(),A=ot(R=>{var lt;return R.status==="loading"?"loading":((lt=R.manifest)==null?void 0:lt.id)??""}),q=ot(R=>R.target),G=ot(R=>Fc(R.manifest,R.addedSets,R.search.set,R.regions)),U=ot(R=>cf(R.manifest,R.addedSets,R.hiddenSets,R.shownSets,!!ks(R.manifest))),Q=ot(R=>bs(R.manifest,R.addedSets,R.hiddenSets,R.shownSets)),st=ot(R=>R.annotationId),pt=$(st);pt.current=st;const[S,C]=z(0);F(()=>g.found.subscribe(R=>{R&&R===pt.current&&C(lt=>lt+1)}),[g]);const O=ne(g.highlight.subscribe,g.highlight.get,g.highlight.get),j=ne(g.chapter.subscribe,g.chapter.get,g.chapter.get),K=x.map(R=>R.id).join("|"),rt=yt(()=>{if(u)return u;const R=x.map(lt=>lt.id);return G.flatMap(lt=>lt.entries.filter(Ot=>R.includes(Ot.canvasId)).map(Ot=>({annotation:Ot.annotation,targetIndex:R.indexOf(Ot.canvasId),pageId:lt.id,...lt.label?{pageLabel:lt.label}:{},...Ot.place?{place:Ot.place}:{},...Ot.layer?{layer:{key:Ot.layer.key,item:Ot.layer.item}}:{}})))},[u,G,x]),_t=q?(R=>!!R&&x.some(lt=>lt.id===R))(q.canvasId):false,_=$(null);_t&&(_.current=K);const I=a&&_.current!==K,P=$(null),N=$(null),Z=yt(()=>x.some(R=>wo(R).length>0),[x]),D=Z?x.find(R=>wo(R).length>0):void 0,T=Pp(w,D,k,Np),H=$(Z);H.current=Z;const V=s===void 0?p.language:void 0,at=D==null?void 0:D.id;F(()=>{if(!V||!D)return;const R=cl(D).find(lt=>lt.language&&ds(lt.language,V));R&&g.captions.get()!==R.id&&g.captions.emit(R.id)},[V,at,g]);const et=ut(()=>{const R=g.store.get().target;!R||!g.store.get().canvasId||Ap(R,P.current,N.current,H.current)&&g.consumeTarget()},[g]),mt=$(K);F(()=>{mt.current!==K&&(mt.current=K,N.current=null),q&&et()},[q,K,et]);const ft=$(e);ft.current=e;const Ht=ut(R=>{var lt;P.current=R,R.on("change",et),et(),(lt=ft.current)==null||lt.call(ft,R)},[et]),Ft=ut(R=>{var Ot;const lt=(Ot=P.current)==null?void 0:Ot.getCanvasRegion();g.viewport.emit(lt?{canvasId:lt.canvasId,region:{x:lt.rect.x,y:lt.rect.y,w:lt.rect.width,h:lt.rect.height}}:null),n==null||n(R)},[g,n]),Dt=ut(R=>{N.current=R,g.media.emit(R),R&&et(),o==null||o(R)},[g,et,o]),Bt=ut(()=>{i==null||i(),(De(w,"auto-advance")||De(B,"auto-advance"))&&g.next({autoplay:true,wrap:De(w,"repeat")})},[g,w,B,i]),vt=ut(R=>void Op(g,R),[g]),Wt=(t==null?void 0:t.request)??g.request,X=De(B,"auto-advance")||De(w,"auto-advance"),ct=De(B,"repeat")||De(w,"repeat"),St=yt(()=>({...t,request:Wt,animation:(t==null?void 0:t.animation)??{autoplay:X,loop:ct}}),[t,Wt,X,ct]);return!x.length&&A!=="loading"?null:f(Ep,{...h,manifestId:A,navPlace:w==null?void 0:w.navPlace,canvases:x,ahead:b,viewingDirection:M,language:k,label:c??(B==null?void 0:B.label)??(w==null?void 0:w.label),partOf:l??(w==null?void 0:w.label),options:St,placeholder:I,onReady:Ht,onViewportChange:Ft,onMediaElement:Dt,caption:y,onCaptionChange:R=>{g.captions.emit((R==null?void 0:R.id)??null),r==null||r(R)},onEnded:Bt,annotations:rt,hiddenPages:Q,unlistedPages:U,onPageVisibilityChange:(R,lt)=>R.forEach(Ot=>g.setSetVisible(Ot,lt)),chapters:m??T,highlightedChapter:j,onChapterHighlight:R=>g.chapter.emit(R),selectedAnnotation:st,refind:S,highlightedAnnotation:O,onAnnotationSelect:R=>g.selectAnnotation(R),onAnnotationLink:h.onAnnotationLink??vt,onAnnotationActive:R=>{var lt;g.highlight.emit(R),(lt=h.onAnnotationActive)==null||lt.call(h,R)}})},Up=6,rn=new Set;function jp(t){if(rn.has(t))return true;for(;rn.size>=Up;){let e;for(const n of rn)n.hiddenSince!==null&&(!e||n.hiddenSince<e.hiddenSince)&&(e=n);if(!e)return false;rn.delete(e),e.release()}return rn.add(t),true}function pa(t){rn.delete(t)}function Vp(t){return typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement?t.complete&&t.naturalWidth>0:true}function qp(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 Kp=`#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
|
+
`,Zp=-.5,Gp=`#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, ${Zp.toFixed(1)}) * u_opacity;
|
|
22
|
+
}
|
|
23
|
+
`;class xo{constructor(e,n,o){L(this,"kind","webgl2");L(this,"canvas");L(this,"maxTextureSize");L(this,"gl");L(this,"program",null);L(this,"vao",null);L(this,"uniforms",{matrix:null,crop:null,opacity:null,texture:null});L(this,"textures",new Map);L(this,"cssWidth",1);L(this,"cssHeight",1);L(this,"pixelRatio",1);L(this,"matrixScratch",new Float32Array(9));L(this,"isLost",false);L(this,"callbacks");L(this,"handleLost",()=>{var e2,n2;this.isLost=true,this.textures.clear(),(n2=(e2=this.callbacks).onLost)==null||n2.call(e2)});this.canvas=e,this.gl=n,this.callbacks=o,this.maxTextureSize=n.getParameter(n.MAX_TEXTURE_SIZE)||4096;const r=Xp(n,Kp,Gp);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 xo(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||!Vp(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=qp(e,this.pixelRatio),i=me(e.transform,ce(r.x,r.y),pe(r.width+s.x,r.height+s.y));return n.uniformMatrix3fv(this.uniforms.matrix,false,lp(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),Yp(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 Xp(t,e,n){const o=ma(t,t.VERTEX_SHADER,e),r=ma(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 ma(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 Yp(t){return typeof t=="object"&&t!==null&&t.name==="SecurityError"}function vl(t,e){return me(ce(e.width/2,e.height/2),Wn(t.rotation),pe(t.zoom),ce(-t.x,-t.y))}function yl(t,e){return me(ce(t.x,t.y),pe(1/t.zoom),Wn(-t.rotation),ce(-e.width/2,-e.height/2))}function ga(t,e,n){return Se(yl(t,e),n)}function Jp(t,e,n){return Se(vl(t,e),n)}function qr(t,e){return Bo(yl(t,e),{x:0,y:0,width:e.width,height:e.height})}function Qp(t,e,n=0,o=0){const r=Bo(Wn(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=fl(t);return{x:c.x,y:c.y,zoom:a,rotation:n}}function So(t,e,n,o,r){const s=Se(me(pe(1/n),Wn(-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 va(t,e){return t.x===e.x&&t.y===e.y&&t.zoom===e.zoom&&t.rotation===e.rotation}const tm=.09,em=1e-4,ya=.05,nm=1e-4;class om{constructor(e,n=tm,o){L(this,"current");L(this,"target",null);L(this,"timeConstant");L(this,"spring");L(this,"start");L(this,"elapsed",0);this.current={...e},this.start={...e},this.timeConstant=n,this.spring=o}get destination(){return this.target?{...this.target.state}:{...this.current}}set(e){this.current={...e},this.target=null}animateTo(e,n,o=false){const r=this.spring?this.spring.duration<=0:this.timeConstant===0;if(o||r){this.set(e.state);return}let s=e.anchor;if(s){const i=So(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>ya&&(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 m=this.spring.stiffness;s=this.start,i=(1-Math.exp(-m*u))/(1-Math.exp(-m))}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?So(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))<em&&Math.abs(r.rotation-c)<nm&&Math.hypot(r.x-l.x,r.y-l.y)*a<ya?(this.current={...r},this.target=null,false):true}}const bl=5,ba=300,rm=bl*4;function _a(t,e=false){return t==="touch"||t==="pen"&&!e}function sm(t){return t.pointerType==="pen"&&t.buttons===0}function im(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 wa(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 Kr={clickToZoom:true,dblClickToZoom:true,pinchToZoom:true,scrollToZoom:false,navigable:true,flickEnabled:true,flickMinSpeed:200,flickMomentum:.25},yr=2,xa=1.5,Sa=.1,am=100,cm=.002,lm=.01;class um{constructor(e,n,o=Kr){L(this,"pointers",new Map);L(this,"samples",[]);L(this,"down",null);L(this,"pinch",null);L(this,"lastTap",null);L(this,"lastPointerType","");L(this,"penHovers",false);L(this,"onPointerDown",e2=>{var o2,r;if(this.lastPointerType=e2.pointerType,e2.pointerType==="mouse"&&e2.button!==0||wa(e2.target,this.element))return;(r=(o2=this.element).setPointerCapture)==null||r.call(o2,e2.pointerId);const n2=this.local(e2);this.pointers.set(e2.pointerId,n2),this.pointers.size===1?(this.down={x:n2.x,y:n2.y,t:e2.timeStamp,moved:false},this.samples=[{x:n2.x,y:n2.y,t:e2.timeStamp}],this.target.setInteracting(true)):this.pointers.size===2&&(this.pinch=this.pinchState(),this.down&&(this.down.moved=true))});L(this,"onPointerMove",e2=>{var r;sm(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)>bl&&(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-am;for(;this.samples.length>2&&this.samples[0].t<a;)this.samples.shift()}else if(this.pointers.size===2&&this.pinch&&this.options.navigable){const s=this.pinchState();this.options.pinchToZoom&&this.pinch.distance>0&&this.target.zoomBy(s.distance/this.pinch.distance,s.mid,false),this.target.panBy(s.mid.x-this.pinch.mid.x,s.mid.y-this.pinch.mid.y,false),this.pinch=s}});L(this,"onPointerUp",e2=>{var c,l,d,u,m,h;if(!this.pointers.has(e2.pointerId))return;if(this.pointers.delete(e2.pointerId),(l=(c=this.element).releasePointerCapture)==null||l.call(c,e2.pointerId),this.pointers.size===1){this.pinch=null;const[p]=this.pointers.values();this.samples=[{...p,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<ba){if((u=(d=this.target).dismiss)!=null&&u.call(d)){this.lastTap=null;return}if(_a(e2.pointerType,this.penHovers)){const p=this.lastTap;this.options.navigable&&(this.options.clickToZoom||this.options.dblClickToZoom)&&p&&e2.timeStamp-p.t<ba&&Math.hypot(o2.x-p.x,o2.y-p.y)<rm?(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/yr,o2,true):this.zoomIn(o2):(h=(m=this.target).tap)==null||h.call(m,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 p=(i.x-s.x)/a*1e3,g=(i.y-s.y)/a*1e3,v=this.options.flickMomentum;v>0&&Math.hypot(p,g)>this.options.flickMinSpeed&&this.target.panBy(p*v,g*v,true)}});L(this,"onDoubleClick",e2=>{this.options.navigable&&(this.options.clickToZoom||!this.options.dblClickToZoom||_a(this.lastPointerType,this.penHovers)||wa(e2.target,this.element)||(e2.shiftKey?this.target.zoomBy(1/yr,this.local(e2),true):this.zoomIn(this.local(e2))))});L(this,"onWheel",e2=>{const n2=e2.ctrlKey;if(!this.options.navigable||!n2&&!this.options.scrollToZoom||!n2&&im(e2.target,this.element,e2.deltaY))return;e2.preventDefault();const o2=dm(e2),r=n2?lm:cm;this.target.zoomBy(Math.exp(-o2*r),this.local(e2),!n2)});L(this,"onKeyDown",e2=>{if(e2.target!==this.element||!this.options.navigable||e2.altKey||e2.metaKey||e2.ctrlKey)return;const n2=this.element.getBoundingClientRect(),o2=n2.width*Sa*(e2.shiftKey?3:1),r=n2.height*Sa*(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(xa,void 0,true);break;case"-":case"_":this.target.zoomBy(1/xa,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(yr,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 dm(t){return t.deltaMode===1?t.deltaY*16:t.deltaMode===2?t.deltaY*400:t.deltaY}class _l extends Error{constructor(e,n,o){super(e),this.url=n,this.status=o,this.name="ImageLoadError"}}const ka=new Set;async function fm(t,e={}){const{signal:n,maxTextureSize:o,request:r}=e,s=ff(r),i=pm(t);if(typeof createImageBitmap!="function"||typeof fetch!="function")return br(t,{signal:n,cors:true,withCredentials:s});if(i&&ka.has(i))return br(t,{signal:n,cors:false,withCredentials:s});let a;try{a=await ws(r,t,{mode:"cors",signal:n})}catch(m){if(mm(m,n))throw m;const h=await br(t,{signal:n,cors:false,withCredentials:s});return i&&ka.add(i),h}if(!a.ok)throw xs(a),new _l(`Image request failed with ${a.status}`,t,a.status);const c=await a.blob();let l=await hm(c);const d=l.width,u=l.height;if(o&&(l.width>o||l.height>o)){const m=o/Math.max(l.width,l.height),h=await createImageBitmap(l,{resizeWidth:Math.max(1,Math.floor(l.width*m)),resizeHeight:Math.max(1,Math.floor(l.height*m)),resizeQuality:"high"});l.close(),l=h}if(n!=null&&n.aborted)throw l.close(),Zr();return{kind:"bitmap",source:l,width:l.width,height:l.height,naturalWidth:d,naturalHeight:u,opaque:false}}async function hm(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 br(t,{signal:e,cors:n,withCredentials:o}){return new Promise((r,s)=>{if(e!=null&&e.aborted){s(Zr());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(Zr())};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 _l("Image failed to load",t))},i.src=t})}function pm(t){var e;try{return new URL(t,(e=globalThis.location)==null?void 0:e.href).origin}catch{return null}}function mm(t,e){return!!(e!=null&&e.aborted)||typeof t=="object"&&t!==null&&t.name==="AbortError"}function Zr(){const t=new Error("Aborted");return t.name="AbortError",t}function Ca(t){t.kind==="bitmap"&&t.source.close()}const gm=192*1024*1024,vm=16,ym=2;class bm{constructor(e){L(this,"entries",new Map);L(this,"inFlight",0);L(this,"frame",0);L(this,"bytes",0);L(this,"wanted",[]);L(this,"disposed",false);L(this,"budget");L(this,"maxInFlight");this.options=e,this.budget=e.byteBudget??gm,this.maxInFlight=e.maxInFlight??vm}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:_r(n),lastUsed:this.frame,attempts:0,pinned:false,waiters:(o==null?void 0:o.waiters)??[]}),this.bytes+=_r(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){Ca(s);return}e.state="ready",e.image=s,e.bytes=_r(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<ym&&!_m(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&&Ca(o.image),this.options.onEvict(o.url)}}}function _r(t){return t.width*t.height*4}function _m(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 wm=.1;class xm{constructor(e,n=r=>requestAnimationFrame(r),o=r=>cancelAnimationFrame(r)){L(this,"handle",0);L(this,"last",0);L(this,"disposed",false);L(this,"frame",e2=>{if(this.handle=0,this.disposed)return;const n2=this.last?Math.min((e2-this.last)/1e3,wm):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 Sm=2*1024*1024;function km(t,e,n=Sm){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 Cm(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 Em(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(p=>!Number.isFinite(p)))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),m=Math.min(e,i+c),h=Math.min(n,a+l);return m<=d||h<=u?null:{x:d,y:u,width:m-d,height:h-u}}const wr=512,Mm=1024,Tm=16e6;function wl(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 Im(t,e=Mm){const{width:n,height:o}=t,r=[],s=t.regionByPx&&t.sizeByW,i=(h,p,g)=>{const v=Math.ceil(n/h),y=Math.ceil(o/h);return{scaleFactor:h,width:v,height:y,tileWidth:p,tileHeight:g,cols:Math.ceil(v/p),rows:Math.ceil(y/g)}},a=(h,p)=>({scaleFactor:n/h,width:h,height:p,tileWidth:h,tileHeight:p,cols:1,rows:1,whole:true}),c=t.tiles[0];if(c){const{width:h,height:p}=s?Lm(t,c,e):c;for(const g of c.scaleFactors)r.push(i(g,h,p))}else if(s){let h=Math.max(wr,e);for(;h>wr&&!Gr(t,h,h);)h/=2;for(let p=1;;p*=2){const g=i(p,h,h);if(r.push(g),g.cols===1&&g.rows===1)break}}const l=Math.max(0,...r.map(h=>h.scaleFactor));for(const h of t.sizes){const p=n/h.width;Gr(t,h.width,h.height)&&p>l+1e-9&&r.push(a(h.width,h.height))}const d=r.reduce((h,p)=>!h||p.scaleFactor>h.scaleFactor?p:h,null);if(d&&d.cols*d.rows>1&&t.sizeByW){const h=Math.max(n,o)/wr;r.push(a(Math.ceil(n/h),Math.ceil(o/h)))}(!r.length||!c&&!s&&n*o<=Tm)&&(r.some(h=>h.scaleFactor===1)||r.push(a(n,o)));const u=Pm(r).sort((h,p)=>p.scaleFactor-h.scaleFactor),m=Ph(t);return{width:n,height:o,levels:u,tile(h){const p=u[h.level],g=p.scaleFactor,v=p.cols===1&&p.rows===1;let y,k,x;if(v)y={x:0,y:0,width:n,height:o},k=p.width,x=p.height;else{const b=Math.round(h.col*p.tileWidth*g),M=Math.round(h.row*p.tileHeight*g);y={x:b,y:M,width:Math.min(Math.round(p.tileWidth*g),n-b),height:Math.min(Math.round(p.tileHeight*g),o-M)},k=Math.ceil(y.width/g),x=Math.ceil(y.height/g)}return{...h,region:y,url:bo(t,y,k,x),fallbackUrl:m?bo(t,y,k,x,m):void 0}}}}function Lm(t,e,n){let o=Math.max(1,Math.floor(n/Math.max(e.width,e.height)));for(;o>1&&!Gr(t,e.width*o,e.height*o);)o--;return{width:e.width*o,height:e.height*o}}function Gr(t,e,n){return!(t.maxWidth&&e>t.maxWidth||t.maxHeight&&n>t.maxHeight||t.maxArea&&e*n>t.maxArea)}function Pm(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 Am(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 we(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)),m=Math.max(0,Math.floor(a/s)),h=Math.min(o.rows-1,Math.floor((l-1e-9)/s)),p=[];for(let g=m;g<=h;g++)for(let v=d;v<=u;v++)p.push({level:e,col:v,row:g});return p}async function Ea(t,e){if(t.media)return Nm(t,t.media);let n=null,o=null;if(t.service)try{n=Im(await Is(t.service,e.infoOptions))}catch(m){o=m}if(!n){if(!t.url)throw o??new Error("Image has no source");const m=await e.loadStatic(t.url);e.cache.seed(t.url,m),n=wl(t.url,m.naturalWidth,m.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=Em(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=Cm(t.rotation),d=l?Rm(c,l):void 0;return{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}:{}}}function Om(t,e){if(t.media)return Promise.resolve();const{pyramid:n,clip:o}=t;return e.prefetch(we(n,0,o).map(r=>{const s=n.tile(r);return{url:s.url,fallbackUrl:s.fallbackUrl}}))}const xl="media:";function Nm(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=`${xl}${t.id}`,s={width:n,height:o},i={x:0,y:0,width:n,height:o};return{id:t.id,spec:t,pyramid:wl(r,n,o),media:{kind:"media",source:e.element,width:n,height:o,naturalWidth:n,naturalHeight:o},size:s,clip:i,contentClip:i,rect:{...i}}}function Rm(t,{degrees:e,mirror:n}){const o=e*Math.PI/180,r=d=>Math.abs(d)<1e-12?0:d,s=r(Math.cos(o)),i=r(Math.sin(o)),a=Math.abs(t.width*s)+Math.abs(t.height*i),c=Math.abs(t.width*i)+Math.abs(t.height*s),l=me(ce(a/2,c/2),{a:s,b:i,c:-i,d:s,e:0,f:0},pe(n?-1:1,1),ce(-(t.x+t.width/2),-(t.y+t.height/2)));return{orient:l,unorient:cp(l),width:a,height:c}}function Sl(t){var e;return((e=t.turn)==null?void 0:e.orient)??ce(-t.clip.x,-t.clip.y)}function Bm(t,e){const{turn:n,clip:o}=t;if(!n)return{...e,x:o.x+e.x,y:o.y+e.y};const r=Bo(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 $m(t,e){const{turn:n,clip:o}=t;return n?Se(n.unorient,e):{x:o.x+e.x,y:o.y+e.y}}function Ma(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 Ta(t){if(!t.length)return null;if(t.every(o=>o.spec.placement)){for(const o of t)o.rect={...o.spec.placement};return cn(t.map(o=>o.rect))}const e=Ma(t[0]).height;let n=0;for(const o of t){const r=Ma(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 $o(t){const e=t.turn??t.clip;return{x:t.rect.width/e.width,y:t.rect.height/e.height}}function Fm(t){const e=$o(t);return me(ce(t.rect.x,t.rect.y),pe(e.x,e.y),Sl(t))}function Dm(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 zm=5e6,kl=1e7,Hm=15e6,Wm=2e7,Ia=2;function La(t){const{items:e,camera:n,viewport:o,pixelRatio:r,getTile:s,destination:i}=t,a=t.has??(h=>s(h)!==void 0),c=vl(n,o),l=[],d=[],u=[],m=(h,p,g)=>{const v=h.tile(p);d.push({url:v.url,fallbackUrl:v.fallbackUrl,priority:g})};for(const h of e){const{pyramid:p,clip:g,rect:v}=h,y=$o(h);if(t.wantOverview)for(const S of we(p,0,g))m(p,S,Wm);const k=Pa(h,n,o,r),x=i?Pa(h,i,o,r):k;if(u.push((k==null?void 0:k.target)??-1),!k&&!x)continue;const b=S=>C=>{const O=p.tile(C).region;return Math.hypot(O.x+O.width/2-S.x,O.y+O.height/2-S.y)};if(x){const S=b(x.center);for(const C of we(p,0,x.area))m(p,C,S(C)/1e3);if(x.target>0)for(const C of we(p,x.target,x.area))m(p,C,kl+S(C))}if(!k)continue;const{area:M,target:w}=k,B=b(k.center),A=we(p,0,M),q=w===0?[]:we(p,w,M);if(x!==k){for(const C of A)m(p,C,B(C)/1e3);const S=w-Ia;if(S>0)for(const C of we(p,S,M))m(p,C,Hm+B(C))}const G=w-Ia;if(x===k&&G>0){const S=new Set;for(const C of q){const O=p.tile(C);if(!a(O.url))for(const j of we(p,G,O.region)){const K=`${j.col},${j.row}`;S.has(K)||(S.add(K),m(p,j,zm+B(j)))}}}if(h.spec.hidden)continue;const st=(w===0?A:q).every(S=>s(p.tile(S).url)!==void 0)?[w]:Array.from({length:w+1},(S,C)=>C),pt=me(c,ce(v.x,v.y),pe(y.x,y.y),Sl(h));for(const S of st){const C=S===0?A:S===w?q:we(p,S,M),O=p.levels[S].cols*p.levels[S].rows>1;for(const j of C){const K=p.tile(j),rt=s(K.url);if(!rt)continue;const tt=Um(h,K.region,rt,pt,O);tt&&l.push({...tt,url:K.url})}}}return d.sort((h,p)=>h.priority-p.priority),{draws:l,wants:jm(d),levels:u}}function Pa(t,e,n,o){const{pyramid:r,rect:s}=t,i=qr(e,n);if(!dp(i,s))return null;const a=$o(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),m=1/(a.x*e.zoom*o);return{area:Bm(t,{x:(c-s.x)/a.x,y:(l-s.y)/a.y,width:(d-c)/a.x,height:(u-l)/a.y}),center:$m(t,{x:(e.x-s.x)/a.x,y:(e.y-s.y)/a.y}),target:Am(r,m)}}function Um(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,m=1e-6;return{item:t,image:n,transform:me(o,ce(e.x,e.y),pe(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-m,bottom:r&&l<s.y+s.height-m}}}function jm(t){const e=new Set;return t.filter(n=>e.has(n.url)?false:(e.add(n.url),true))}const Vm={maxZoomPixelRatio:1.1,minZoomImageRatio:.9,upscale:true,animationTime:.09,animationDuration:void 0,springStiffness:6.5,constrainDuringPan:true,request:void 0,byteBudget:192*1024*1024,maxInFlight:16,releaseAfterMs:2e3},qm=2,Km=3,Zm=.1,xr=1e-6,Aa=1e8,Gm=6,Xr={top:0,right:0,bottom:0,left:0};function Oa(t,e="padding"){if(!t||typeof getComputedStyle!="function")return Xr;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 Xm=(t,e)=>t.top===e.top&&t.right===e.right&&t.bottom===e.bottom&&t.left===e.left;let Ym;class Jm{constructor(e,n={}){L(this,"host");L(this,"overlays",null);L(this,"options");L(this,"backend",null);L(this,"backendPreference");L(this,"contextLosses",0);L(this,"holder",{hiddenSince:null,release:()=>this.giveBack()});L(this,"visible",true);L(this,"dom",null);L(this,"domAsked",false);L(this,"pending",null);L(this,"camera");L(this,"loop");L(this,"gestures");L(this,"gestureOptions",{});L(this,"cache");L(this,"navigator",null);L(this,"navigatorAsked",0);L(this,"viewport",{width:1,height:1});L(this,"inset",Xr);L(this,"pixelRatio",1);L(this,"items",[]);L(this,"worldBounds",null);L(this,"contentVersion",0);L(this,"opaqueUrls",new Set);L(this,"mediaByKey",new Map);L(this,"detachMedia",[]);L(this,"opened",false);L(this,"atHome",true);L(this,"interacting",false);L(this,"lastEmitted",null);L(this,"generation",0);L(this,"landing",[]);L(this,"ahead",null);L(this,"listeners",new Map);L(this,"unloadable",false);L(this,"resizeObserver",null);L(this,"intersectionObserver",null);L(this,"releaseTimer",null);L(this,"dprQuery",null);L(this,"disposed",false);L(this,"dismisser",null);L(this,"tick",e2=>{var c,l;if(this.disposed)return false;const n2=this.camera.step(e2,this.viewport),o2=this.camera.current,r2=this.backend,s=km(this.getTile,d=>r2?r2.has(d):true),i=La({items:this.items,camera:o2,viewport:this.viewport,pixelRatio:this.pixelRatio,getTile:s.getTile,has:this.hasTile,wantOverview:!!this.navigator,destination:n2?this.camera.destination:void 0}),a=(this.landing.length?[...this.landing,...i.wants]:i.wants).filter(d=>!d.url.startsWith(xl));if(this.cache.update(a),this.ahead&&!n2&&!this.cache.pending){const d=this.ahead;this.ahead=null,this.readAhead(d)}return 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,qr(o2,this.viewport),this.pixelRatio,this.getTile,this.contentVersion),(!this.lastEmitted||!va(this.lastEmitted,o2))&&(this.lastEmitted={...o2},this.opened&&this.emit("viewport")),n2||s.deferred});L(this,"getTile",e2=>this.mediaByKey.get(e2)??this.cache.get(e2));L(this,"hasTile",e2=>this.mediaByKey.has(e2)||this.cache.has(e2));L(this,"onContextLost",()=>{this.contextLosses+=1,this.releaseBackend(),this.visible?this.acquireBackend(false):this.host.dataset.backend="released"});L(this,"onPixelRatioChange",()=>{this.measure(),this.watchPixelRatio()});this.host=e,this.backendPreference=n.backend??"auto",this.options={...Vm,...Sr(n)},Ra()&&(this.options.animationTime=0,this.options.animationDuration!==void 0&&(this.options.animationDuration=0));const{animationDuration:o,springStiffness:r}=this.options;this.camera=new om({x:0,y:0,zoom:1,rotation:0},this.options.animationTime,o===void 0?void 0:{duration:o,stiffness:r}),this.loop=new xm(this.tick),this.gestureOptions=Sr(n.gestures??{}),Ra()&&(this.gestureOptions.flickMomentum=0),this.gestures=new um(e,this,{...Kr,...this.gestureOptions}),this.cache=new bm({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=Qm(e),this.visible?this.acquireBackend():this.holder.hiddenSince=Na(),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=()=>r!==this.generation||this.disposed,i=new Map(this.items.map(v=>[v.id,v]));this.landing=[],this.ahead=null;const a=this.prepareContext(),c=[],l=e.map(v=>{const y=i.get(v.id);if(y&&Dm(y.spec,v))return y.spec=v,{item:Promise.resolve(y),ready:Promise.resolve()};let k,x,b;const M=new Promise((B,A)=>{k=B,x=A}),w=new Promise(B=>b=B);return c.push(()=>Ea(v,a).then(B=>(k(B),Om(B,this.cache)),x).then(b,b)),{item:M,ready:w}}),d=()=>{var v;return(v=c.shift())==null?void 0:v().then(d)};for(let v=0;v<Gm;v++)d();const u=e.flatMap(v=>v.placement?[v.placement]:[]);let m=false;if(!this.items.length&&e.length>1&&u.length===e.length){const v=cn(n?[n,...u]:u),y=[];l.forEach(({item:k,ready:x},b)=>{Promise.all([k,x]).then(([M])=>{s()||(y[b]=M,this.place(y.filter(Boolean),v,o,!m,false),m=true)},()=>{})})}const h=await Promise.allSettled(l.map(({item:v})=>v));if(s()||(this.landing=this.landingWants(h.flatMap(v=>v.status==="fulfilled"?[v.value]:[]),n,o||!this.opened),this.invalidate(),await Promise.all(l.map(({ready:v})=>v)),s()))return;this.landing=[];const p=h.filter(v=>v.status==="fulfilled").map(v=>v.value),g=h.filter(v=>v.status==="rejected").map(v=>v.reason);g.length&&this.emit("error",g),this.setUnloadable(e.length>0&&!p.length&&g.length>0),this.place(p,n,o,!m,true)}place(e,n,o,r,s){this.items=e,this.watchMedia(e);const i=Ta(e);this.worldBounds=n?i?cn([n,i]):n:i,this.contentVersion++,this.worldBounds&&(this.opened?r?(o?this.home(true):this.camera.set(this.constrain(this.camera.current)),this.emit("change")):s&&this.emit("change"):(this.opened=true,this.home(true),this.emit("open"))),this.invalidate()}prefetch(e,{world:n}={}){const o=e.filter(r=>!r.media);this.ahead=o.length?{images:o,world:n}:null,this.ahead&&this.invalidate()}async readAhead({images:e,world:n}){const o=this.generation,r=this.prepareContext(),s=(await Promise.allSettled(e.map(a=>Ea(a,r)))).flatMap(a=>a.status==="fulfilled"?[a.value]:[]);if(!s.length||o!==this.generation||this.disposed)return;const i=this.landingWants(s,n,true).filter(a=>a.priority<kl-Aa);await this.cache.prefetch(i)}prepareContext(){return{cache:this.cache,loadStatic:e=>this.loadTile(e),infoOptions:{request:this.options.request}}}clear(){this.setUnloadable(false),this.generation++,this.landing=[],this.ahead=null,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=Xr){const r=this.fit(e,this.camera.destination.rotation,o);this.atHome=false,this.animateTo(this.constrain(r,{allowBeyondLimits:true}),n)}fit(e,n,{top:o,right:r,bottom:s,left:i},a=1/0){const{width:c,height:l}=this.viewport,d=Qp(e,{width:Math.max(1,c-i-r),height:Math.max(1,l-o-s)},n),u=Math.min(d.zoom,a);return{...So(fl(e),{x:(c+i-r)/2,y:(l+o-s)/2},u,n,this.viewport),zoom:u,rotation:n}}fitItemRect(e,n,o=false){const r=this.itemRectToWorld(e,n);r&&this.fitAnnotation(r,o)}fitAnnotation(e,n=false){var s;const o=this.items[0];if(!o)return;const r=o.rect.width*Zm;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 qr(this.camera.current,this.viewport)}getHomeBounds(){return this.worldBounds?{...this.worldBounds}:null}getCamera(){return{...this.camera.current}}getZoomLimits(){var n;const e=((n=this.homeCamera())==null?void 0:n.zoom)??1;return{home:e,min:e*this.options.minZoomImageRatio,max:Math.max(e,this.closestZoom())}}closestZoom(e=this.items){const n=e.length?Math.min(...e.map(o=>$o(o).x)):1;return 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-xr)}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-xr),atMin:e<=s*(1+xr),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=ga(r,this.viewport,s),{min:a,max:c}=this.getZoomLimits(),l=Cn(r.zoom*e,a,c),d=So(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=Se(me(pe(1/r.zoom),Wn(-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({...Kr,...this.gestureOptions,...Sr(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);va(n,o)||this.animateTo(o,false)}worldToScreenPoint(e){return Jp(this.camera.current,this.viewport,e)}screenToWorldPoint(e){return ga(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 Bo(me(Fm(o),pe(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-Dyf2F7fU.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)}landingWants(e,n,o){const r=e.map(l=>({...l,rect:{...l.rect}})),s=Ta(r),i=n?s?cn([n,s]):n:s;if(!i)return[];const a=o?this.homeCamera(i,r):this.camera.destination;if(!a)return[];const{wants:c}=La({items:r,camera:a,viewport:this.viewport,pixelRatio:this.pixelRatio,getTile:l=>this.cache.get(l)});return c.map(l=>({...l,priority:l.priority-Aa}))}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-CvZPZjNg.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 fm(e,{signal:n,request:this.options.request,maxTextureSize:this.backend instanceof xo?this.backend.maxTextureSize:void 0})}animateTo(e,n){this.camera.animateTo({state:e},this.viewport,n),this.invalidate()}homeCamera(e=this.worldBounds,n=this.items){if(!e)return null;const o=2*Math.PI,r=Math.round(this.camera.destination.rotation/o)*o||0;return this.fit(e,r,this.inset,this.options.upscale?1/0:this.closestZoom(n))}constrain(e,{allowBeyondLimits:n=false}={}){const o=this.worldBounds;if(!o)return e;const{min:r,max:s}=this.getZoomLimits(),i=n?Cn(e.zoom,r,Math.max(s,e.zoom)):Cn(e.zoom,r,s);return this.interacting&&!this.options.constrainDuringPan?{...e,zoom:i}:{...e,zoom:i,x:Cn(e.x,o.x,o.x+o.width),y:Cn(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<Km);let r=null;o&&(jp(this.holder)||this.backendPreference==="webgl2")&&(r=xo.create(n,{onLost:this.onContextLost}),r||pa(this.holder)),r?this.install(r):this.backendPreference==="webgl2"?this.none(n):(this.pending=n,(Ym??(Ym=import("./Canvas2DBackend-BztBm6yM.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(pa(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=Na()),!(!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,qm);if(o===this.viewport.width&&r===this.viewport.height&&i===this.pixelRatio&&Xm(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 Na=()=>typeof performance<"u"?performance.now():Date.now();function Qm(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 Ra(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function Sr(t){return Object.fromEntries(Object.entries(t).filter(([,e])=>e!==void 0))}const tg=(t,e)=>new Jm(t,e),eg=bt(()=>import("./Connected-nHyQM-64.mjs")),ng=bt(()=>import("./Connected-BKk80iCZ.mjs").then(t=>t.C));function og({className:t,style:e,renderers:n,collapseControls:o,onContentStateChange:r,children:s,...i}){var p;const a=ue("Body");Xc(a.clover,r);const c=Os(),l=yt(()=>Of(c),[c]),d=Nf(n??a.renderers,{canvases:c,bodies:l}),u=d==null?void 0:d.component,m=((p=c.find(({type:g})=>g==="Scene"||g==="Timeline"))==null?void 0:p.type)??"Canvas",h=ot(g=>g.status==="loading");return f("div",{"aria-busy":h,className:Pt("clover-body",t),"data-renderer":u?"custom":m.toLowerCase(),style:{position:"relative",height:"var(--clover-body-height, 60vh)",...e},children:[u?f(u,{canvases:c,bodies:l,children:s}):m==="Scene"?f(kt,{fallback:f(Ln,{overlay:true}),children:f(ng,{...i,children:s})}):m==="Timeline"?f(kt,{fallback:f(Ln,{overlay:true}),children:f(eg,{...i,children:s})}):f(Wp,{...i,collapseControls:o,surface:tg,children:s}),h&&f(Ln,{overlay:true})]})}const rg={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:"\xA0"};function Un(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 rg[n.toLowerCase()]??e})}const sg=t=>/<[a-z!/]|&(#x?[0-9a-f]+|[a-z]+);/i.test(t);function ig(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 ag(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 Fo=(t,e)=>e==="canvas"?qe(t.manifest,t.canvasId):t.manifest,Cl=ge(null),Ns=()=>Vt(Cl),ln=le(function({of:e="manifest",label:n,as:o="span",className:r,...s},i){var m;const a=zn(h=>{var p,g;return e==="canvas"?(p=qe(h.manifest,h.canvasId))==null?void 0:p.label:(g=h.manifest)==null?void 0:g.label},void 0),c=Ns(),l=(m=Be())==null?void 0:m.language,{text:d,lang:u}=xt(n??(c?c.label:a),l);return d?f(o,{ref:i,className:Pt("clover-label",r),...dt(u),...s,children:Un(d)}):null});function cg(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)))),bo(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 bo(t,i,l.width,l.height)}function un(t){var e;return(e=Cs(t).find(({body:n})=>n.type==="Image"||n.id&&!n.type))==null?void 0:e.body}function lg(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 ke(t,e="full",n=false){if(!t)return null;const o=No(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 Rs(t){const e=t;return e?ke(W(e.thumbnail)[0],"full",true)??ke(un(e))??ke(un(e.placeholderContainer))??ke(un(e.accompanyingContainer)):null}function ug(t){const e=t;return e?ke(un(e))??ke(un(e.placeholderContainer))??ke(un(e.accompanyingContainer))??ke(W(e.thumbnail)[0],"full",true):null}async function Bs(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 Is(t.service,{request:n}),s=typeof t.region=="string"?lg(t.region,r):t.region;return s===null?t.fallback:cg(r,e,s)??t.fallback}catch{return t.fallback}}const dg=Object.freeze(Object.defineProperty({__proto__:null,imageSource:ke,resolveThumbnail:Bs,stillSource:ug,thumbnailSource:Rs},Symbol.toStringTag,{value:"Module"})),Ba='.clover-items-item[role="option"], .clover-items-link',an=new Map;let zt=null,ae=null,Yr=0;function $s(t){const e=an.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 Jr(){cancelAnimationFrame(Yr),Yr=requestAnimationFrame(()=>an.forEach((t,e)=>$s(e)))}function El(t){var r,s;if(t.key!=="Escape"||t.defaultPrevented)return;const e=new Set,n=(s=(r=document.activeElement)==null?void 0:r.closest)==null?void 0:s.call(r,Ba);n&&e.add(n);try{document.querySelectorAll(`:is(${Ba}):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=>tl(i,"fullHidden",["pointerenter",i===n?"blur":"focus"])))}function fg(){var t,e;zt=typeof ResizeObserver>"u"?null:new ResizeObserver(n=>n.forEach(o=>$s(o.target))),ae=typeof MutationObserver>"u"?null:new MutationObserver(Jr),ae==null||ae.observe(document.head,{childList:true,subtree:true,characterData:true}),ae==null||ae.observe(document.documentElement,{attributes:true,attributeFilter:["style","class"]}),(e=(t=document.fonts)==null?void 0:t.addEventListener)==null||e.call(t,"loadingdone",Jr),document.addEventListener("keydown",El,true)}function hg(){var t,e,n;cancelAnimationFrame(Yr),(t=zt==null?void 0:zt.disconnect)==null||t.call(zt),ae==null||ae.disconnect(),zt=ae=null,(n=(e=document.fonts)==null?void 0:e.removeEventListener)==null||n.call(e,"loadingdone",Jr),document.removeEventListener("keydown",El,true)}function pg(t,e){var n;return an.size||fg(),an.set(t,{change:e}),(n=zt==null?void 0:zt.observe)==null||n.call(zt,t),$s(t),()=>{var o;an.delete(t),(o=zt==null?void 0:zt.unobserve)==null||o.call(zt,t),an.size||hg()}}const mg=/^(-?\d{4,})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?)?/;function Ml(t,e){if(typeof t!="string")return null;const n=mg.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 gg=bt(()=>import("./NavDate-Co0A4bkP.mjs").then(t=>t.a).then(({NavDate:t})=>({default:t})));function vg(t,e,n,o){const r=t.source!==void 0?t.source:Rs(t.resource),[s,i]=z(r==null?void 0:r.src),a=(r==null?void 0:r.src)??(r==null?void 0:r.service)??(r==null?void 0:r.fallback);return F(()=>{if(!r)return i(void 0);if(r.src)return i(r.src);if(!o)return;let c=true;return Bs(r,e,n).then(l=>{c&&i(l)}),()=>{c=false}},[a,e,o]),{src:s,none:!r}}const yg=()=>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 bg({part:t,size:e,request:n,alt:o,altLang:r}){const[s,i]=z(null),a=dl(s,ul,s==null?void 0:s.closest('[data-layout="slider"] .clover-items-viewport')),{src:c,none:l}=vg(t,e,n,a),[d,u]=z(false),{width:m,height:h}=t.resource??{},p=m&&h?m/h:1;return f("span",{ref:i,className:"clover-items-picture","data-loaded":d,"data-empty":c?void 0:true,style:c&&!(m&&h)?void 0:{"--clover-items-ratio":p},children:[!c&&l&&Hn(t.media)&&f(yg,{}),c&&f("img",{src:c,alt:o,...dt(o?r:void 0),width:e,height:Math.round(e/p),loading:"lazy",decoding:"async",draggable:false,onLoad:()=>u(true),onError:()=>u(true)}),t.duration?f("span",{className:"clover-items-duration",children:Ah(t.duration)}):null]})}function _g({text:t,lang:e,first:n}){const o=$(null),[r,s]=z(false);return F(()=>{const i=o.current;if(!(!i||!t))return pg(i,s)},[t]),f("span",{className:"clover-items-label","data-clamped":r||void 0,children:[!n&&" ",f("span",{ref:o,className:"clover-items-label-text",...dt(t?e:void 0),children:t}),r&&f("span",{className:"clover-items-label-full",...dt(e),"aria-hidden":"true",hidden:true,children:t})]})}function wg({item:t,size:e,language:n,request:o,showSummary:r=false,secondary:s="summary",labels:i=true}){var u,m;const a=t.parts.map(h=>xt(t.parts.length===1?t.label:h.label,n)),c=r&&s==="summary"?xt(t.summary,n):null,l=r&&s==="navDate"?Ml(t.navDate):null,d=a.some(h=>h.text);return f("figure",{role:"none",className:"clover-items-figure","data-parts":t.parts.length,"data-media":(m=(u=t.parts[0])==null?void 0:u.media)==null?void 0:m.toLowerCase(),style:{"--parts":t.parts.length},children:[f("span",{className:"clover-items-pictures",children:t.parts.map((h,p)=>{const g=a[p].text?{text:""}:xt(h.label,n);return f(bg,{part:h,size:e,request:o,alt:g.text,altLang:g.lang},h.id)})}),(d||l||(c==null?void 0:c.text))&&f("figcaption",{className:"clover-items-caption",style:i?void 0:je,children:[a.map((h,p)=>f(_g,{text:h.text,lang:h.lang,first:p===0},t.parts[p].id)),l&&f(kt,{fallback:null,children:f(gg,{value:t.navDate,className:"clover-items-date"})}),(c==null?void 0:c.text)&&f("span",{className:"clover-items-summary",...dt(c.lang),children:c.text.replace(/<[^>]*>/g,"")})]})]})}function xg(t){var e;return(e=Cs(t).find(({body:n})=>n.type))==null?void 0:e.body.type}function Tl(t){const e=xg(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 $a=new WeakMap;function Il(t){if(!t)return[];let e=$a.get(t);if(!e){const{canvases:n,views:o}=Rt(t);e=o.map(r=>{const s=r.map(i=>Tl(n[i]));return{id:s[0].id,parts:s,label:s.length===1?s[0].label:{none:[s.map(i=>xt(i.label).text).filter(Boolean).join(" \u2013 ")]}}}),$a.set(t,e)}return e}const Fa=new WeakMap;function ko(t){if(!t)return[];let e=Fa.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:[Tl(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,...Nn(W(n.homepage)[0])?{hrefLang:Nn(W(n.homepage)[0])}:{}}}),Fa.set(t,e)),e}function tb(t){return t?Array.isArray(t)?ko({items:t}):t.type==="Collection"?ko(t):Il(t):[]}function Ll(t){const e=Math.max(1,Math.round(t));return e<=6?`h${e}`:null}const Fs=(t,e="p")=>Ll(t)??e;function Pl(t,e,n="p"){const o=Ll(t);return o?{as:o,title:{},group:{}}:{as:n,title:{id:e},group:{role:"group","aria-labelledby":e}}}function Sg(t,e,{orientation:n="both",rtl:o=false,upward:r=false,onActivate:s,onMove:i}={}){const[a,c]=z(Math.max(0,e)),l=$([]),d=$(s);d.current=s;const u=$(i);u.current=i,F(()=>{e>=0&&c(e)},[e]);const m=Math.min(a,Math.max(0,t-1)),h=ut(v=>{var y;c(v),(y=l.current[v])==null||y.focus()},[]),p=ut((v,y)=>{var q,G;const k=o?"ArrowLeft":"ArrowRight",x=o?"ArrowRight":"ArrowLeft",b=r?"ArrowUp":"ArrowDown",M=r?"ArrowDown":"ArrowUp",w=n!=="vertical",B=n!=="horizontal";let A=null;if(w&&v.key===k||B&&v.key===b)A=Math.min(t-1,y+1);else if(w&&v.key===x||B&&v.key===M)A=Math.max(0,y-1);else if(v.key==="Home")A=0;else if(v.key==="End")A=t-1;else if(v.key==="Enter"||v.key===" "){(q=d.current)==null||q.call(d,y,v),v.preventDefault();return}A!==null&&(v.preventDefault(),h(A),A!==y&&((G=u.current)==null||G.call(u,A,v)))},[t,n,o,r,h]);return{focused:m,itemProps:v=>({ref:y=>{l.current[v]=y},tabIndex:v===m?0:-1,onKeyDown:y=>p(y,v),onFocus:()=>c(v)})}}const kg=5,Cg=()=>{var t;return typeof window<"u"&&!!((t=window.matchMedia)!=null&&t.call(window,"(prefers-reduced-motion: reduce)").matches)};function Al({align:t="start",dragFree:e=false,itemCount:n=0,axis:o="x",upward:r=false}={}){const s=o==="y",[i,a]=z(null),[c,l]=z(false),[d,u]=z(false),m=$(t);m.current=t;const h=e?"none":`${o} mandatory`,p=ut(()=>{if(!i)return;const b=Math.abs(s?i.scrollTop:i.scrollLeft),M=s?i.scrollHeight-i.clientHeight:i.scrollWidth-i.clientWidth;l(r?b<M-1:b>1),u(r?b>1:b<M-1)},[i,s,r]);F(()=>{if(!i)return;const b=i.style;b.overflowX=s?"hidden":"auto",b.overflowY=s?"auto":"hidden",b.scrollSnapType=h,b.setProperty("--clover-track-align",t),b.overscrollBehaviorX=s?"":"contain"},[i,h,t,s]),F(()=>{if(!i)return;let b=0;const M=()=>{cancelAnimationFrame(b),b=requestAnimationFrame(p)};p(),i.addEventListener("scroll",M,{passive:true});const w=typeof ResizeObserver<"u"?new ResizeObserver(M):null;return w==null||w.observe(i),i.firstElementChild&&(w==null||w.observe(i.firstElementChild)),()=>{cancelAnimationFrame(b),i.removeEventListener("scroll",M),w==null||w.disconnect()}},[i,p,n]);const g=ut((b,M=false)=>{if(!i||!b)return;const w=M||Cg()?"auto":"smooth";i.scrollBy({[s?"top":"left"]:b,behavior:w})},[i,s]),v=ut((b,{instant:M=false}={})=>{const w=i==null?void 0:i.querySelector(`[data-track-index="${b}"]`);if(!i||!w)return false;const B=i.getBoundingClientRect(),A=w.getBoundingClientRect(),q=getComputedStyle(i).direction==="rtl";return s?(g(m.current==="center"?A.top+A.height/2-(B.top+B.height/2):A.top-B.top,M),true):(g(m.current==="center"?A.left+A.width/2-(B.left+B.width/2):q?A.right-B.right:A.left-B.left,M),true)},[i,g,s]),y=ut(b=>{if(!i)return;const M=s?r:getComputedStyle(i).direction==="rtl",w=s?i.clientHeight:i.clientWidth;g(b*w*.9*(M?-1:1))},[i,g,s,r]),k=ut(()=>y(1),[y]),x=ut(()=>y(-1),[y]);return F(()=>{if(!i)return;let b=null,M=false;const w=G=>{G.pointerType!=="mouse"||G.button!==0||(b={x:s?G.clientY:G.clientX,scroll:s?i.scrollTop:i.scrollLeft},M=false)},B=G=>{var Q;if(!b)return;const U=(s?G.clientY:G.clientX)-b.x;!M&&Math.abs(U)<kg||(M||(M=true,(Q=i.setPointerCapture)==null||Q.call(i,G.pointerId),i.style.scrollSnapType="none",i.dataset.dragging="true"),s?i.scrollTop=b.scroll-U:i.scrollLeft=b.scroll-U)},A=G=>{var U;b&&(b=null,M&&((U=i.releasePointerCapture)==null||U.call(i,G.pointerId),delete i.dataset.dragging,i.style.scrollSnapType=h))},q=G=>{M&&(M=false,G.preventDefault(),G.stopPropagation())};return i.addEventListener("pointerdown",w),i.addEventListener("pointermove",B),i.addEventListener("pointerup",A),i.addEventListener("pointercancel",A),i.addEventListener("click",q,true),()=>{i.removeEventListener("pointerdown",w),i.removeEventListener("pointermove",B),i.removeEventListener("pointerup",A),i.removeEventListener("pointercancel",A),i.removeEventListener("click",q,true)}},[i,h,s]),{ref:a,canScrollPrev:c,canScrollNext:d,scrollPrev:x,scrollNext:k,scrollToIndex:v,measure:p}}const Co=le(function(e,n){return!Be()||e.iiifContent!==void 0||e.items!==void 0?f(kt,{fallback:null,children:f(Eg,{...e,forwardedRef:n})}):f(Mg,{...e,forwardedRef:n})}),Eg=bt(()=>import("./StandaloneItems-Cv4dGiJh.mjs"));function Mg({of:t="views",...e}){return t==="targets"?f(Ig,{...e}):t==="annotations"?f(Pg,{...e}):t==="members"?f(Ol,{...e}):f(Ag,{...e})}const Tg=bt(()=>import("./TargetItems-CBsfkmeg.mjs"));function Ig(t){return ot(n=>{var o;return(((o=n.targets)==null?void 0:o.items.length)??0)>1})?f(kt,{fallback:null,children:f(Tg,{...t})}):null}const Lg=bt(()=>import("./AnnotationItems-FXIoYk9T.mjs"));function Pg(t){return ot(n=>!!$c(n.manifest,n.addedSets))?f(kt,{fallback:null,children:f(Lg,{...t})}):null}function Ol({onSelect:t,forwardedRef:e,...n}){const{clover:o,language:r}=Be(),s=ot(d=>d.collection),i=ot(Ac),a=ko(s),c=ms(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(Rl,{...n,forwardedRef:e,steps:Nl(a,d,c,l),nameKey:"informationPanelTabsCollection",position:f(Ng,{position:d,total:a.length,list:u=>f(Ol,{layout:"list",forwardedRef:null,onSelect:u})})})}return f(Bl,{...n,forwardedRef:e,items:a,selected:a.findIndex(d=>d.id===i),navigation:"id",rtl:c==="right-to-left",upward:c==="bottom-to-top",language:r,request:o.request,showSummary:true,onActivate:l})}function Ag({onSelect:t,forwardedRef:e,singleItem:n=false,...o}){const{clover:r,language:s}=Be(),i=ot(u=>u.manifest),a=ot(u=>vn(u.manifest,u.canvasId)),c=ot(u=>Rt(u.manifest).direction),l=Il(i);if(l.length<(n?1:2))return null;const d=u=>r.goTo(u.id);return o.layout==="pager"?f(Rl,{...o,forwardedRef:e,steps:Nl(l,a,c,d)}):f(Bl,{...o,forwardedRef:e,items:l,selected:a,navigation:"id",rtl:c==="right-to-left",upward:c==="bottom-to-top",language:s,request:r.request,onActivate:(u,m)=>{t==null||t(u,m),r.goTo(u.id)},followFocus:d})}function Nl(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 Og=bt(()=>import("./PagerLayout-nnWJump4.mjs")),Ng=bt(()=>import("./PagerLayout-nnWJump4.mjs").then(({CountMenu:t})=>({default:t})));function Rl(t){return f(kt,{fallback:null,children:f(Og,{...t})})}let Eo,Rg;const Da=()=>Rg??(Rg=import("./ItemsVertical-BRiKuRL-.mjs").then(()=>Eo=true,()=>Eo=false));function Bl(t){const e=(t.layout??"slider")==="slider"&&t.orientation==="vertical"&&Eo===void 0,[,n]=z();return F(()=>{if(!e)return;let o=true;return Da().then(r=>o&&n(r)),()=>{o=false}},[e]),e?(typeof document<"u"&&Da(),null):f(Bg,{...t,orientation:Eo===false?"horizontal":t.orientation})}function Bg({forwardedRef:t,items:e,selected:n,navigation:o,rtl:r=false,upward:s=false,layout:i="slider",orientation:a="horizontal",thumbnailSize:c=200,request:l,language:d,showSummary:u=false,secondary:m="summary",labels:h=true,heading:p,headingLevel:g=2,renderItem:v,onActivate:y,followFocus:k,as:x="section",className:b,"aria-label":M,size:w,singleItem:B,highContrast:A,...q}){var Wt;const{t:G}=Tt(),U=ve(),Q=Po(t,q.lang),{langOf:st}=Q,pt=cs(A),S=i==="slider",C=S&&a==="vertical",O=C&&s,j=o==="id",K=$(null),rt=i==="masonry";F(()=>{const X=K.current;if(!rt||!X)return;let ct,St=true;return import("../masonry-BZCdA3bV.mjs").then(({attachMasonry:R})=>{St&&(ct=R(X))}),()=>{St=false,ct==null||ct()}},[rt]);const tt=Al({align:j?"center":"start",itemCount:e.length,axis:C?"y":"x",upward:O}),_t=$(void 0);F(()=>()=>window.clearTimeout(_t.current),[]);const _=Sg(e.length,n,{orientation:C?"vertical":i==="slider"?"horizontal":i==="list"?"vertical":"both",rtl:r,upward:O,onActivate:(X,ct)=>y(e[X],ct),onMove:k?(X,ct)=>{window.clearTimeout(_t.current);const St=()=>k(e[X]);ct.repeat?_t.current=window.setTimeout(St,150):St()}:void 0}),I=$(null),P=$(false);P.current=!!((Wt=I.current)!=null&&Wt.contains(I.current.ownerDocument.activeElement)),F(()=>{var R;const X=I.current;if(!X||!P.current)return;const{activeElement:ct,body:St}=X.ownerDocument;ct&&ct!==St||(R=X.querySelector(`[data-track-index="${Math.max(0,n)}"]`))==null||R.focus()},[e]);const N=$(false);F(()=>{var St;if(n<0)return;const X=!N.current;if(S){tt.scrollToIndex(n,{instant:X})&&(N.current=true);return}N.current=true;const ct=(St=I.current)==null?void 0:St.querySelector(`[data-track-index="${n}"]`);ct&&$g(ct,X)},[S,n,tt.scrollToIndex]);const Z=Fs(g),D=p?xt(p.label,d):null,T=p?xt(p.summary,d):null,H=M===void 0&&!!(D!=null&&D.text),V=Ro(G("itemsLabel"),st("itemsLabel"),M!==void 0||H,Q.hostLanguage),at=H?{"aria-labelledby":`${U}-title`}:M!==void 0?{"aria-label":M}:V.props,et=(X,ct)=>v?v(X,{selected:ct}):f(wg,{item:X,size:c,language:d,request:l,showSummary:u,secondary:m,labels:h}),mt=X=>!(v||xt(X.label,d).text||u&&m==="summary"&&xt(X.summary,d).text),ft=(X,ct)=>mt(X)?G("canvasPosition",{index:ct+1,total:e.length}):void 0,Ht=X=>mt(X)?st("canvasPosition"):void 0,Ft=S?{display:"flex",flexDirection:O?"column-reverse":C?"column":void 0,margin:0,padding:0,listStyle:"none"}:void 0,Dt=S?{flex:"0 0 auto",scrollSnapAlign:j?"center":"start"}:void 0,Bt=j&&n>=0,vt=X=>{const ct=n+(X==="prev"?-1:1),St=Bt?ct>=0&&ct<e.length:X==="prev"?tt.canScrollPrev:tt.canScrollNext,R=Bt?X==="prev"?"commonPrevious":"commonNext":X==="prev"?"itemsScrollBack":"itemsScrollForward",lt=G(R),Ot=oe=>{if(!St)return;if(!Bt)return(X==="prev"?tt.scrollPrev:tt.scrollNext)();const ye=e[ct];k?k(ye):y(ye,oe)};return f("button",{type:"button",className:`clover-items-scroll-${X}`,"aria-controls":Bt?void 0:`${U}-viewport`,...dt(st(R)),"aria-disabled":!St||void 0,tabIndex:St?void 0:-1,onClick:Ot,children:[f("svg",{"aria-hidden":"true",focusable:"false",width:"16",height:"16",viewBox:"0 0 16 16",children:f("path",{d:C?X==="next"!==O?"M3 6l5 5 5-5":"M3 10l5-5 5 5":X==="next"!==r?"M6 3l5 5-5 5":"M10 3L5 8l5 5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),f("span",{style:je,children:lt}),f(Ke,{label:lt})]})};return f(Dn.Provider,{value:Q.hostLanguage,children:f(x,{ref:Q.ref,className:Pt("clover-items",b),"data-layout":i,"data-orientation":C?"vertical":void 0,"data-upward":O||void 0,"data-navigation":o,...ls(pt),...q,children:[p&&((D==null?void 0:D.text)||(T==null?void 0:T.text))&&f("header",{className:"clover-items-header",children:[(D==null?void 0:D.text)&&f(Z,{className:"clover-items-title clover-title",id:`${U}-title`,...dt(D.lang),children:D.text}),(T==null?void 0:T.text)&&f("p",{className:"clover-items-description",...dt(T.lang),children:T.text.replace(/<[^>]*>/g,"")}),p.homepage&&f("a",{className:"clover-items-homepage",href:p.homepage,hrefLang:p.homepageLang,...dt(st("commonViewAll")),children:G("commonViewAll")})]}),f("div",{className:"clover-items-frame",style:{position:"relative"},dir:r?"rtl":void 0,children:[S&&vt("prev"),f("div",{id:`${U}-viewport`,className:"clover-items-viewport",ref:S?tt.ref:K,children:j?f("div",{ref:I,role:"listbox",...at,"aria-orientation":C?"vertical":S?"horizontal":i==="list"?"vertical":void 0,className:"clover-items-track",style:Ft,children:e.map((X,ct)=>{const St=ct===n;return f("div",{id:`${U}-${ct}`,role:"option","aria-selected":St,"aria-label":ft(X,ct),...dt(Ht(X)),className:"clover-items-item","data-track-index":ct,style:Dt,..._.itemProps(ct),onClick:R=>y(X,R),children:et(X,St)},X.id)})}):f("ul",{...at,className:"clover-items-track",style:Ft,children:e.map((X,ct)=>f("li",{className:"clover-items-item","data-track-index":ct,style:Dt,children:f("a",{className:"clover-items-link",href:X.href,hrefLang:X.hrefLang,"aria-label":ft(X,ct),...dt(Ht(X)),draggable:false,onClick:St=>y(X,St),children:et(X,false)})},X.id))})}),S&&vt("next")]}),V.node]})})}function $g(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 Fg(t,e){const{clover:n}=ue(e),o=zp(),{direction:r}=As(),s=ot(l=>l.collection),i=ot(Ac),a=ot(l=>{var d;return((d=l.targets)==null?void 0:d.items.length)??0}),c=ot(l=>Vd(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=ko(s),d=l.findIndex(u=>u.id===i);return{position:d,total:l.length,direction:"left-to-right",step:u=>{const m=l[d+u];m&&n.goToManifest(m.id)}}}return{position:o.position,total:o.total,direction:r,step:l=>l<0?o.previous():o.next()}}const Dg=le(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:Pt("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:je,...dt(a("canvasPosition")),children:i("canvasPosition",{index:d,total:l})})]})}),zg=le(function({of:e="views",...n},o){const r=Fg(e,"Position");return f(Dg,{ref:o,...n,steps:r})});function Hg({className:t,loading:e,error:n}){const{t:o,langOf:r}=Tt(),{status:s,error:i}=$p(),a=s==="loading",c=e!==void 0&&e!==false;return f(Mt,{children:[f("p",{className:Pt("clover-status",t),"data-status":a?s:void 0,role:"status",style:a&&e!==false?void 0:je,children:[a&&(c?e:e===void 0&&f(Ln,{})),a&&!c&&f("span",{style:je,...dt(r("statusLoading")),children:o("statusLoading")})]}),s==="error"&&i&&f("div",{className:Pt("clover-status",t),"data-status":s,role:"alert",children:n?n(i):f(Mt,{children:[f("p",{...dt(r("statusError")),children:o("statusError")}),f("p",{className:"clover-status-detail",lang:"en",children:i.message})]})})]})}function Wg(t,e=false,n=3){const o=e||sg(t),r=e?`${n}
|
|
28
|
+
${t}`:t,[s,i]=z(null);return F(()=>{if(!o)return;let a=true;return Promise.all([import("./sanitize-DETRcc_c.mjs"),e?import("../markdown-CCYJwzFn.mjs"):null]).then(([{sanitizeHTML:c,trusted:l},d])=>{const u=d?d.markdownToHtml(t,{headingLevel:n}):t,m=c(u,{markdown:!!d});a&&i({for:r,html:m,inner:l(m)})}),()=>{a=false}},[t,r,o,e,n]),o&&(s==null?void 0:s.for)===r?s:null}const Ug=new Set(["p","span","h1","h2","h3","h4","h5","h6","a","b","i","em","strong","small","sub","sup","label"]),$l=le(function({as:e="span",markup:n,language:o,format:r,headingLevel:s,...i},a){const{text:c,lang:l}=xt(n,o),d=dt(l),u=ig(r,c),m=u==="markdown",h=Wg(u==="plain"?"":c,m,s),p=(h==null?void 0:h.html)??null;if(!c)return null;if(u==="plain")return f(e,{ref:a,...i,...d,children:c.split(/\r?\n/).map((v,y)=>f(he.Fragment,{children:[y>0&&f("br",{}),v]},y))});const g=typeof e=="string"&&Ug.has(e)&&p&&/<(p|ul|ol|div)[\s>]/i.test(p)?"div":e;return h?f(g,{ref:a,...i,...d,dangerouslySetInnerHTML:{__html:h.inner}}):f(e,{ref:a,...i,...d,children:m?ag(c):Un(c)})}),Fl=({metadata:t,language:e,renderValue:n,...o})=>t!=null&&t.length?f("dl",{...o,children:t.map((r,s)=>{const i=xt(r.label,e),a=n==null?void 0:n(r);return f("div",{"data-label":xt(r.label,"none").text.replace(/\s+/g,"-").toLowerCase(),children:[f("dt",{...dt(i.lang),children:i.text}),a!==void 0?f("dd",{children:a}):f($l,{as:"dd",markup:r.value,language:e})]},s)})}):null,jg=typeof window>"u"?F:$t;function Vg({children:t}){const{t:e}=Tt(),n=Po(),o=$(null),r=ve(),s=he.Children.only(t),i=s.props.id??r,{open:a,cut:c,toggle:l}=qg(o);return f("div",{className:"clover-read-more",children:[he.cloneElement(s,{ref:o,id:i,"data-read-more":a?"open":""}),(c||a)&&f("button",{type:"button",className:"clover-read-more-button","aria-expanded":a,"aria-controls":i,onClick:l,ref:n.ref,...dt(n.langOf(a?"readLess":"readMore")),children:e(a?"readLess":"readMore")})]})}function qg(t){const[e,n]=z(false),[o,r]=z(false),s=()=>{const i=t.current;i&&!e&&r(i.scrollHeight>i.clientHeight+1)};return jg(s),F(()=>{var u,m;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"]}),(m=(u=document.fonts)==null?void 0:u.addEventListener)==null||m.call(u,"loadingdone",c),()=>{var h,p;cancelAnimationFrame(a),l==null||l.disconnect(),d==null||d.disconnect(),(p=(h=document.fonts)==null?void 0:h.removeEventListener)==null||p.call(h,"loadingdone",c)}},[e,t.current]),{open:e,cut:o,toggle:()=>n(i=>!i)}}function yn(t,e,n){const o=Ns(),r=zn(s=>{var i;return(i=Fo(s,t))==null?void 0:i[e]},void 0);return n!==void 0?n:o?o[e]:r}const jn=()=>{var t;return(t=Be())==null?void 0:t.language};function za({of:t="manifest",as:e="p",value:n,className:o,...r}){const s=yn(t,"summary",n),i=jn();return xt(s,i).text?f(Vg,{children:f($l,{as:e,markup:s,language:i,className:Pt("clover-summary",o),...r})}):null}function Kg({of:t="manifest",value:e,className:n,renderValue:o,...r}){const s=yn(t,"metadata",e),i=jn();return f(Fl,{metadata:s,language:i,renderValue:o,className:Pt("clover-metadata",n),...r})}function Zg({of:t="manifest",value:e,className:n,...o}){const r=yn(t,"requiredStatement",e),s=jn();return f(Fl,{metadata:r?[r]:null,language:s,className:Pt("clover-required-statement",n),...o})}function Gg({of:t="manifest",value:e,className:n,...o}){const r=yn(t,"rights",e);return r?f("a",{href:r,className:Pt("clover-rights",n),...o,children:r}):null}function Xg({of:t="manifest",value:e,className:n,...o}){const r=yn(t,"id",e);return r?f("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:Pt("clover-id",n),...o,children:r}):null}function Dl({property:t,className:e,of:n="manifest",value:o,...r}){const s=W(yn(n,t,o)),i=jn(),a=s.filter(c=>c==null?void 0:c.id);return a.length?f("ul",{className:e,...r,children:a.map(c=>{const l=xt(c.label,i);return f("li",{children:[f("a",{href:c.id,target:"_blank",rel:"noopener noreferrer",hrefLang:Nn(c),...dt(l.text?l.lang:void 0),children:l.text?Un(l.text):c.id}),c.format&&f("span",{className:"clover-link-format",children:[" (",c.format,")"]})]},c.id)})}):null}const Yg=({className:t,...e})=>f(Dl,{property:"homepage",className:Pt("clover-homepage",t),...e}),Jg=({className:t,...e})=>f(Dl,{property:"seeAlso",className:Pt("clover-see-also",t),...e});function Qg({of:t="manifest",value:e,size:n=400,className:o,...r}){var p;const s=zn(g=>Fo(g,t),null),i=e??s,a=jn(),c=i?Rs(i):null,l=(c==null?void 0:c.src)??(c==null?void 0:c.service)??(c==null?void 0:c.fallback),[d,u]=z(c==null?void 0:c.src),m=(p=Be())==null?void 0:p.clover.request;if(F(()=>{if(!c)return u(void 0);if(c.src)return u(c.src);let g=true;return Bs(c,n,m).then(v=>g&&u(v)),()=>{g=false}},[l,n]),!d)return null;const h=xt(i==null?void 0:i.label,a);return f("img",{src:d,alt:Un(h.text),...dt(r.alt===void 0&&h.text?h.lang:void 0),width:n,loading:"lazy",decoding:"async",className:Pt("clover-thumbnail",o),...r})}const tv=typeof window>"u"?F:$t,zl=ge(null),ev=t=>{var e;return!!((e=t.textContent)!=null&&e.trim())||t.querySelector("img, svg, picture, video, canvas, object")!==null},nv=t=>!!t&&typeof t=="object"&&["label","logo","homepage"].some(e=>W(t[e]).length>0),Qr=t=>!!t&&typeof t.id=="string",ov=t=>{const e=W(t.homepage).find(Qr);return e?{id:e.id,hrefLang:Nn(e)}:void 0},rv=(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=xt(o,e);if(r.text)return{text:Un(r.text),lang:r.lang}}return null};function Hl({of:t="manifest",value:e,link:n=true,children:o,className:r,...s}){var l;const i=zn(d=>{var u;return(u=Fo(d,t))==null?void 0:u.provider},void 0),a=(l=Be())==null?void 0:l.language,c=W(e!==void 0?e:i).filter(nv);return c.length?f("ul",{className:Pt("clover-provider",r),...s,children:c.map((d,u)=>{const m=n?ov(d):void 0,h=!!xt(d.label,a).text;return f(sv,{agent:d,homepage:m,children:o??f(Mt,{children:[f(Wl,{alt:h?"":void 0}),f(ln,{className:"clover-provider-label"})]})},d.id??u)})}):null}function sv({agent:t,homepage:e,children:n}){const o=$(null),[r,s]=z(null),i=ut(()=>{o.current&&!ev(o.current)&&s(t)},[t]);return r===t?null:f("li",{className:"clover-provider-agent",children:f(Cl.Provider,{value:t,children:f(zl.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 Wl({of:t="manifest",value:e,alt:n,className:o,...r}){var m;const{t:s,langOf:i}=Tt(),a=Ns(),c=zn(h=>{var p;return(p=Fo(h,t))==null?void 0:p.provider},void 0),l=(m=Be())==null?void 0:m.language,u=(e!==void 0?W(e):a?[a]:W(c)).flatMap(h=>{if(!h||typeof h!="object")return[];const p=h;if(p.type!=="Agent"&&Qr(p)&&!p.logo)return[{image:p,agent:null}];const g=W(p.logo).find(Qr);return g?[{image:g,agent:p}]:[]});return u.length?f(Mt,{children:u.map(({image:h,agent:p},g)=>{const v=rv(p,l);return f(iv,{src:h.id,alt:n??(v==null?void 0:v.text)??s("logo"),...dt(n!==void 0?void 0:v?v.lang:i("logo")),width:h.width,height:h.height,loading:"lazy",decoding:"async",className:Pt("clover-logo",o),...r},`${h.id}-${g}`)})}):null}function iv({alt:t,onError:e,...n}){const o=Vt(zl),[r,s]=z(false),i=ut(()=>s(true),[]);tv(()=>{r&&(o==null||o())},[r,o]);const a=ut(c=>{var l;c!=null&&c.complete&&!c.naturalWidth&&((l=c.decode)==null||l.call(c).catch(i))},[i]);return r?null:f("img",{ref:a,alt:t,onError:c=>{e==null||e(c),i()},...n})}const av=t=>t&&typeof t=="object"&&!Array.isArray(t)?Object.keys(t).filter(e=>e!=="none"&&e!=="@none"&&xt({[e]:t[e]}).text):[];function cv(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(av).filter(r=>r.length>1);return[...new Set(o.flat())]}function lv(){const{language:t,chooseLanguage:e,toggleDrawn:n}=ue("About"),o=ot(i=>i.manifest),r=yt(()=>cv(o),[o]),s=Cc(r,t);return s&&e?{languages:r,chosen:s,onChange:e,drawn:n??false}:null}function eb(t,e){return t!=null&&t.drawn?e.every(n=>!!n&&n!=="none"&&t.languages.some(o=>ds(o,n))):false}const uv=bt(()=>import("./LanguageChoice-BTUONm8l.mjs").then(t=>t.b).then(t=>({default:t.LanguageChoice}))),dv=t=>{var o;const e=t.closest(".clover-sections-actions"),n=(o=e==null?void 0:e.closest(".clover-sections-item"))==null?void 0:o.querySelector(".clover-sections-heading .clover-sections-label");return e&&n?{box:e,label:n}:null},fv=t=>void Lt.chooseInterfaceLanguage(t);function hv(){Tt();const{languages:t,chosen:e}=Lt.interfaceLanguages();return t.length>1?{languages:t,chosen:e}:null}function Ul({values:t=true,interfaceLanguages:e=true}={}){const n=lv(),o=hv(),r=t?(n==null?void 0:n.languages)??[]:[],s=u=>r.some(m=>m===u||Lt.stringsFor(m)===u),i=[...r,...(e?(o==null?void 0:o.languages)??[]:[]).filter(u=>!s(u))];if(i.length<2)return null;const a=Lt.chosenLanguage,c=a&&Lt.stringsFor(a),l=c&&i.includes(c)&&!s(c)?c:t&&n?n.chosen:(o==null?void 0:o.chosen)??i[0];return{languages:i,chosen:l,onChange:u=>r.includes(u)&&n?n.onChange(u):fv(u)}}function jl({values:t,interfaceLanguages:e}){const n=Ul({values:t,interfaceLanguages:e}),{drawsToggle:o}=ue("About"),r=!!n;return F(()=>r?o==null?void 0:o():void 0,[r,o]),n?f(kt,{fallback:null,children:f(uv,{...n,nameKey:"readingLanguage",part:"clover-about",fit:dv})}):null}const Vl=ge(false);function Ha(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=xt(s.label,e);o.push({id:i,label:a.text||s.format||i,lang:a.text?a.lang:void 0,format:s.format,hrefLang:Nn(s)})}return o}function ql(){const{language:t}=ue("Download"),e=ot(o=>o.manifest),n=ot(o=>Ue(o.manifest,o.canvasId));return{page:Ha(n,t),all:Ha([e],t)}}const pv=bt(()=>import("./Download-B9UuJ9wY.mjs").then(({DownloadGroups:t})=>({default:t}))),mv=bt(()=>import("./NavDate-Co0A4bkP.mjs").then(t=>t.a).then(({NavDate:t})=>({default:t}))),gv=bt(()=>import("./PartOfManifest-7z0GBIsk.mjs"));function vv({languages:t=true,interfaceLanguages:e=true,...n}){const o=Vt(Vl);return f(yv,{...n,download:!o&&n.download!==false,choice:o?null:f(jl,{values:t,interfaceLanguages:e})})}function yv({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=ql(),u=ot(y=>y.manifest,Object.is,"About"),m=$(null);F(()=>{const y=m.current,k=y==null?void 0:y.querySelector(".clover-about-head");if(!y||!k||typeof ResizeObserver>"u")return;const x=new Set,b=()=>{const B=k.querySelector(".clover-about-thumbnail"),A=k.querySelector(".clover-about-label");for(const Q of[B,A])Q&&!x.has(Q)&&(x.add(Q),w.observe(Q));const q=y.style;if(!B){q.removeProperty("--clover-about-label-height"),q.removeProperty("--clover-about-thumbnail-width");return}const G=`${(A==null?void 0:A.offsetHeight)??0}px`,U=`${B.offsetWidth}px`;q.getPropertyValue("--clover-about-label-height")!==G&&q.setProperty("--clover-about-label-height",G),q.getPropertyValue("--clover-about-thumbnail-width")!==U&&q.setProperty("--clover-about-thumbnail-width",U)};let M=0;const w=new ResizeObserver(()=>{cancelAnimationFrame(M),M=requestAnimationFrame(b)});return w.observe(k),b(),()=>{cancelAnimationFrame(M),w.disconnect(),y.style.removeProperty("--clover-about-label-height"),y.style.removeProperty("--clover-about-thumbnail-width")}},[s,r,u]);const h=ve(),p=()=>{var x,b;const y=m.current;(b=((x=y==null?void 0:y.closest(".clover-sections-item"))==null?void 0:x.querySelector(".clover-sections-button"))??y)==null||b.focus({preventScroll:true})};if(!u)return null;const g=(y,k,x)=>{if(!k)return null;const{as:b,title:M,group:w}=Pl(n,`${h}-${y}`);return f("section",{className:"clover-about-section",...w,children:[f(b,{className:"clover-about-heading",...dt(l(y)),...M,children:c(y)}),x]})},v=y=>Array.isArray(u[y])?u[y].length>0:!!u[y];return f("div",{ref:m,className:Pt("clover-about",i),tabIndex:-1,...a,children:[t,(r||s)&&f("div",{className:"clover-about-head",children:[r&&f(Qg,{className:"clover-about-thumbnail",size:256,alt:s?"":void 0}),s&&f(ln,{as:Fs(n),className:"clover-about-label clover-title"})]}),e&&f(za,{of:"canvas",className:"clover-about-summary"}),Ki(u)&&u.partOf&&f(kt,{fallback:null,children:f(gv,{manifest:u,headingLevel:n,onOpened:p})}),f(za,{className:"clover-about-summary"}),f(Kg,{className:"clover-about-metadata"}),f(Zg,{className:"clover-about-metadata"}),g("aboutDate",Ml(u.navDate),f(kt,{fallback:null,children:f(mv,{value:u.navDate,className:"clover-about-date"})})),g("aboutProvider",v("provider"),f(Hl,{})),g("aboutRights",u.rights,f(Gg,{})),g("aboutHomepage",v("homepage"),f(Yg,{})),g("aboutSeeAlso",v("seeAlso"),f(Jg,{})),g("download",o&&d.page.length+d.all.length>0,f(kt,{fallback:null,children:f(pv,{page:d.page,all:d.all,headingLevel:n+1})})),g(Ki(u)?"aboutCanvas":"aboutManifest",!jc(u)&&u.id,f(Xg,{}))]})}const bv=bt(()=>import("./ControlMenu-BRUWyNEi.mjs")),_v=bt(()=>import("./Download-B9UuJ9wY.mjs").then(({DownloadGroups:t})=>({default:t})));function wv({languages:t=true,interfaceLanguages:e=true,download:n=true}){const o=Ul({values:t,interfaceLanguages:e}),{page:r,all:s}=ql(),i=n&&r.length+s.length>0;return!o&&!i?null:f("div",{className:"clover-about-actions",children:[i&&f(xv,{page:r,all:s}),o&&f(jl,{values:t,interfaceLanguages:e})]})}function xv({page:t,all:e}){const{t:n,langOf:o}=Tt(),[r,s]=z(false),a=`${ve()}-download`,c=ut(l=>{var d;s(false),l&&((d=document.getElementById(a))==null||d.focus())},[a]);return f("span",{className:"clover-about-download",onBlur:l=>{const d=l.relatedTarget;r&&d&&!l.currentTarget.contains(d)&&s(false)},children:[f("button",{type:"button",id:a,className:"clover-about-download-button","aria-label":n("download"),...dt(o("download")),"aria-expanded":r,"aria-controls":r?`${a}-menu`:void 0,onClick:()=>s(l=>!l),children:[f(Sv,{}),f(Ke,{label:n("download")})]}),r&&f(kt,{fallback:null,children:f(bv,{id:`${a}-menu`,triggerId:a,onClose:c,className:"clover-about-download-menu",children:f(_v,{page:t,all:e,inPopover:true})})})]})}function Sv(){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 kv(t,e=null){if(!t)return false;if(e!=null&&e.navPlace||t.navPlace)return true;for(const n of Rt(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 Cv=["about","targets","collection","contents","search","map","transcript","annotations"],Ae={about:t=>{var e,n;return!jc(t.manifest)||!!((e=t.manifest)!=null&&e.rights||(n=t.manifest)!=null&&n.requiredStatement)},targets:t=>{var e;return(((e=t.targets)==null?void 0:e.items.length)??0)>1},collection:t=>{var e,n;return(((n=(e=t.collection)==null?void 0:e.items)==null?void 0:n.length)??0)>0||!!jd(t.manifest)},contents:t=>Rp(t.manifest).length>0,search:t=>!!ks(t.manifest),map:t=>kv(t.manifest,t.collection),transcript:t=>Ue(t.manifest,t.canvasId).some(e=>ll(e).length>0||Vh(e).length>0),annotations:t=>af(t.manifest,t.addedSets).length>0},Ev=(t,e)=>{const n=Array.isArray(e)?new Set(e):void 0;return Cv.filter(o=>t[o]&&(!n||n.has(o)))};function Ds(t){const e={about:ot(Ae.about),targets:ot(Ae.targets),collection:ot(Ae.collection),contents:ot(Ae.contents),search:ot(Ae.search),map:ot(Ae.map),transcript:ot(Ae.transcript),annotations:ot(Ae.annotations)};return Ev(e,t)}function Mv({open:t=false,className:e}){return f("svg",{"aria-hidden":"true",focusable:"false",width:"12",height:"12",viewBox:"0 0 12 12",className:Pt("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 Kl=typeof window>"u"?F:$t,Zl=ge(null);function nb(){return Vt(Zl)}const Gl=ge(0);function ob(){return Vt(Gl)}function Tv({items:t,layout:e="tabs",value:n,onValueChange:o,label:r,labelLang:s,headingLevel:i=3}){var st,pt;const a=ve(),c=Ro(r??"",s,r===void 0),l=$([]),d=e==="tabs",{t:u,langOf:m}=Tt(),h=Al({dragFree:true,itemCount:t.length}),p=t.some(S=>S.value===n)?n:((st=t[0])==null?void 0:st.value)??null,g=$(new Set);p&&g.current.add(p);const v=$(null),[y,k]=z({value:null,count:0});F(()=>{var rt;if(d||!p||v.current!==p)return;v.current=null;const S=t.findIndex(tt=>tt.value===p),C=document.getElementById(`${a}-panel-${S}`),O=(rt=l.current[S])==null?void 0:rt.parentElement;if(!C||!O)return;const j=O.getBoundingClientRect().bottom-C.getBoundingClientRect().top;if(j<=0)return;const K=kr(C);K&&(K.scrollTop-=j)},[p,d,t,a]);const x=S=>{var I,P,N,Z;const C=t.findIndex(D=>D.value===p),O=document.getElementById(`${a}-panel-${C}`),j=S.target;if(!O||j===O||!O.contains(j)||!Lv(j))return;const K=(P=(I=l.current[C])==null?void 0:I.parentElement)==null?void 0:P.getBoundingClientRect(),rt=C+1<t.length?(Z=(N=l.current[C+1])==null?void 0:N.parentElement)==null?void 0:Z.getBoundingClientRect():void 0;if(!K)return;const tt=j.getBoundingClientRect(),_t=tt.top<K.bottom?Math.floor(tt.top-K.bottom):rt&&tt.bottom>rt.top?Math.ceil(Math.min(tt.bottom-rt.top,tt.top-K.bottom)):0,_=_t?kr(O):null;_&&(_.scrollTop+=_t)},b=$(null),M=t.map(S=>S.value).join(`
|
|
29
|
+
`),w=$(false);w.current=!!((pt=b.current)!=null&&pt.contains(b.current.ownerDocument.activeElement)),F(()=>{var K;const S=b.current;if(!S||!w.current)return;const{activeElement:C,body:O}=S.ownerDocument;if(C&&C!==O)return;const j=t.findIndex(rt=>rt.value===p);(K=l.current[j])==null||K.focus()},[M]),Kl(()=>{const S=b.current;if(d||!S||typeof ResizeObserver>"u")return;const C=[...S.querySelectorAll(":scope > .clover-sections-item")],O=C.map(T=>T.firstElementChild),j=O[0],K=O[O.length-1],rt=new Map,tt=T=>(T&&rt.get(T))??0,_t=document.scrollingElement;let _=null,I=0;const P=()=>{const T=O.reduce((ft,Ht)=>ft+tt(Ht),0);let H=0;C.forEach((ft,Ht)=>{ft.style.setProperty("--clover-sections-before",`${H}px`),H+=tt(O[Ht]),ft.style.setProperty("--clover-sections-after",`${T-H}px`)}),S.style.setProperty("--clover-sections-total",`${T}px`);const V=j&&getComputedStyle(j);(V==null?void 0:V.position)==="sticky"&&K&&(I=parseFloat(V.top)+parseFloat(getComputedStyle(K).bottom)||0);const at=getComputedStyle(S),et=parseFloat(at.lineHeight)||1.2*parseFloat(at.fontSize),mt=(_==null?void 0:_.clientHeight)??0;mt>0&&mt-I-T<2*et?S.dataset.stacks="off":delete S.dataset.stacks},N=new ResizeObserver(T=>{var H,V;for(const at of T)O.includes(at.target)&&rt.set(at.target,((V=(H=at.borderBoxSize)==null?void 0:H[0])==null?void 0:V.blockSize)??at.target.getBoundingClientRect().height);P()}),Z=()=>{const T=kr(S);T!==_&&(_&&_!==_t&&N.unobserve(_),T&&T!==_t&&N.observe(T),_=T)},D=()=>{Z(),P()};Z();for(const T of O)T&&N.observe(T,{box:"border-box"});return window.addEventListener("resize",D),()=>{N.disconnect(),window.removeEventListener("resize",D);for(const T of C)T.style.removeProperty("--clover-sections-before"),T.style.removeProperty("--clover-sections-after");S.style.removeProperty("--clover-sections-total"),delete S.dataset.stacks}},[d,M,i]),F(()=>{if(d)return;const S=l.current.map(O=>O==null?void 0:O.parentElement).filter(O=>!!O),C=O=>{var tt;if(O.ctrlKey)return;const j=O.currentTarget,K=Wa(j);if(!K||K===document.scrollingElement)return;O.preventDefault();const rt=O.deltaMode===1?parseFloat(getComputedStyle(j).lineHeight)||16:O.deltaMode===2?K.clientHeight:1;(tt=Wa(K)??document.scrollingElement)==null||tt.scrollBy({left:O.deltaX*rt,top:O.deltaY*rt,behavior:"instant"})};for(const O of S)O.addEventListener("wheel",C,{passive:false});return()=>{for(const O of S)O.removeEventListener("wheel",C)}},[d,M]);const B=S=>{S!==p&&(v.current=S,d||k(C=>({value:S,count:C.count+1})),o==null||o(S))},A=(S,C)=>{var tt;const O=t.length-1,[j,K]=d?["ArrowLeft","ArrowRight"]:["ArrowUp","ArrowDown"],rt=S.key===K?(C+1)%t.length:S.key===j?(C-1+t.length)%t.length:S.key==="Home"?0:S.key==="End"?O:null;rt!==null&&(S.preventDefault(),(tt=l.current[rt])==null||tt.focus(),d&&B(t[rt].value))},q=$(false);F(()=>{if(!d)return;const S=t.findIndex(_=>_.value===p),C=l.current[S],O=C==null?void 0:C.parentElement;if(!C||!O)return;const j=getComputedStyle(O),K=O.getBoundingClientRect(),rt=C.getBoundingClientRect(),tt=K.left+(parseFloat(j.scrollPaddingLeft)||0),_t=K.right-(parseFloat(j.scrollPaddingRight)||0);(rt.left<tt-1||rt.right>_t+1)&&h.scrollToIndex(S,{instant:!q.current}),q.current=true},[p,d,t.length,h.scrollToIndex]);const G=S=>{const C=S==="prev"?h.canScrollPrev:h.canScrollNext,O=S==="prev"?"sectionsScrollBack":"sectionsScrollForward";return f("button",{type:"button",className:`clover-steps-step clover-sections-scroll-${S}`,"aria-hidden":"true",tabIndex:-1,hidden:!C,...dt(m(O)),onMouseDown:j=>j.preventDefault(),onClick:S==="prev"?h.scrollPrev:h.scrollNext,children:[f("svg",{"aria-hidden":"true",focusable:"false",width:"12",height:"12",viewBox:"0 0 16 16",children:f("path",{d:S==="next"?"M6 3l5 5-5 5":"M10 3L5 8l5 5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),f(Ke,{label:u(O)})]})},U=Fs(i,"div"),Q=(S,C)=>{const O=S.value===p;return f("button",{ref:j=>{l.current[C]=j},type:"button",id:`${a}-button-${C}`,className:"clover-sections-button","data-value":S.value,"data-track-index":d?C:void 0,"aria-controls":`${a}-panel-${C}`,...d?{role:"tab","aria-selected":O,tabIndex:O?0:-1}:{"aria-expanded":O,"aria-disabled":O||void 0},onClick:()=>B(S.value),onKeyDown:j=>A(j,C),children:[f("span",{className:"clover-sections-label",children:S.label}),!d&&f(Mv,{open:O,className:"clover-sections-chevron"})]},S.value)};return f("div",{ref:b,className:"clover-sections","data-layout":e,onFocus:d?void 0:x,style:d?void 0:{"--clover-sections-count":t.length},children:[d&&f("div",{className:"clover-sections-tabs","data-more":[h.canScrollPrev&&"start",h.canScrollNext&&"end"].filter(Boolean).join(" ")||void 0,children:f("div",{className:"clover-sections-row",children:[f("div",{role:"tablist",ref:h.ref,...c.props,className:"clover-sections-list",children:t.map(Q)}),G("prev"),G("next")]})}),d&&c.node,t.map((S,C)=>{const O=S.value===p;return f("section",{className:"clover-sections-item","data-value":S.value,"data-open":O,style:d?void 0:{"--clover-sections-index":C},children:[!d&&f(U,{className:"clover-sections-heading",children:[Q(S,C),f("span",{className:"clover-sections-reach","aria-hidden":"true"})]}),f(Gl.Provider,{value:y.value===S.value?y.count:0,children:f(Iv,{id:`${a}-panel-${C}`,tabs:d,labelledBy:`${a}-button-${C}`,hidden:!O,actions:S.actions,children:g.current.has(S.value)?S.content:null})})]},S.value)})]})}function Iv({id:t,tabs:e,labelledBy:n,hidden:o,actions:r,children:s}){const[i,a]=z(null),c=!o||!!r;return Kl(()=>{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(Mt,{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(Zl.Provider,{value:e?null:i,children:[e&&r,s]})})]})}function kr(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 Wa(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 Lv(t){try{return t.matches(":focus-visible")}catch{return true}}const Pv=bt(()=>import("./MapView-WwJmyeZr.mjs").then(t=>({default:t.RootMap}))),Av=bt(()=>import("./Collection-XZzrypzP.mjs").then(t=>({default:t.Collection}))),Ov=bt(()=>import("./TargetItems-CBsfkmeg.mjs").then(t=>({default:t.TargetsSection}))),Nv=bt(()=>import("./Contents-0FL0Dr2p.mjs").then(t=>({default:t.Contents}))),Rv=bt(()=>import("./Search-BSK3yFqw.mjs").then(t=>({default:t.Search}))),Bv=bt(()=>import("./Transcript-BBtNC39n.mjs").then(t=>({default:t.Transcript}))),$v=bt(()=>import("./Annotations-Bs94MQmn.mjs").then(t=>({default:t.Annotations}))),ze=t=>f(kt,{fallback:null,children:t}),Fv=()=>null,Dv=le(function({layout:e="tabs",value:n,defaultValue:o,onValueChange:r,onClose:s,closeOnEscape:i=false,headingLevel:a=3,as:c="aside",download:l=true,languages:d=true,interfaceLanguages:u=true,sections:m,labels:h,className:p,children:g,onKeyDown:v,...y},k){var D;const{clover:x}=ue("Panel"),b=$(null),{t:M,langOf:w,hostLanguage:B,i18n:A}=Tt(),q=Ro(M("informationPanelTabs"),w("informationPanelTabs"),!!(y["aria-label"]||y["aria-labelledby"])||!(["aside","section","nav"].includes(c)||y.role)),G=T=>{const H=w(T);return H?f("span",{...dt(H),children:M(T)}):M(T)},U=(T,H)=>{const V=h==null?void 0:h[T];if(V===void 0)return G(H);if(typeof V=="string")return V;const at=Object.keys(V),et=fs(at,A.language);if(!et)return G(H);const mt=Lo(et,B);return mt?f("span",{...dt(mt),children:V[et]}):V[et]},Q=Ds(m),st=T=>Q.includes(T),pt=he.Children.toArray(g).filter(T=>he.isValidElement(T)&&T.type===Fv),S=e==="accordion"?a+1:a,C=d||u||l?f(wv,{languages:d,interfaceLanguages:u,download:l}):void 0,O=pt.length?pt.map(({props:T})=>({value:T.value,label:T.label,content:T.children,...T.value==="about"&&{actions:C}})):[...st("about")?[{value:"about",label:U("about","informationPanelTabsAbout"),content:f(vv,{headingLevel:S,download:l}),actions:C}]:[],...st("targets")?[{value:"targets",label:U("targets","informationPanelTabsTargets"),content:ze(f(Ov,{headingLevel:S}))}]:[],...st("collection")?[{value:"collection",label:U("collection","informationPanelTabsCollection"),content:ze(f(Av,{headingLevel:S}))}]:[],...st("contents")?[{value:"contents",label:U("contents","informationPanelTabsContents"),content:ze(f(Nv,{}))}]:[],...st("search")?[{value:"search",label:U("search","informationPanelTabsSearch"),content:ze(f(Rv,{headingLevel:S,sticky:true,size:"small"}))}]:[],...st("map")?[{value:"map",label:U("map","informationPanelTabsMap"),content:ze(f(Pv,{}))}]:[],...st("transcript")?[{value:"transcript",label:U("transcript","transcriptLabel"),content:ze(f(Bv,{sticky:true,size:"small"}))}]:[],...st("annotations")?[{value:"annotations",label:U("annotations","informationPanelTabsAnnotations"),content:ze(f($v,{headingLevel:S}))}]:[]],j=ot(T=>T.search.query),K=O.some(T=>T.value==="search"),[rt,tt]=z(()=>j&&K?"search":o??null),_t=$(j&&K?j:"");F(()=>{K&&(j&&j!==_t.current&&n===void 0&&tt("search"),_t.current=j)},[j,K,n]);const _=ot(T=>{var H;return T.annotationId&&((H=T.regions)!=null&&H.entries.some(V=>V.id===T.annotationId))?T.annotationId:null}),I=O.some(T=>T.value==="contents");F(()=>{_&&I&&n===void 0&&tt("contents")},[_,I,n]);const P=n!==void 0?n:rt,N=(O.some(T=>T.value===P)?P:(D=O[0])==null?void 0:D.value)==="search";if(F(()=>{K&&x.setSetVisible(vs,N)},[x,K,N]),!O.length)return null;const Z=()=>{var H;const T=b.current;T!=null&&T.contains(document.activeElement)&&((H=zv(T))==null||H.focus()),s==null||s()};return f(c,{ref:T=>{b.current=T,typeof k=="function"?k(T):k&&(k.current=T)},className:Pt("clover-panel",p),"data-layout":e,"data-closable":s?"":void 0,"data-floating":i?"":void 0,...q.props,onKeyDown:T=>{v==null||v(T),i&&s&&T.key==="Escape"&&!T.defaultPrevented&&(T.preventDefault(),Z())},...y,children:[q.node,s&&f("button",{type:"button",className:"clover-panel-close","aria-label":M("informationPanelClose"),...dt(w("informationPanelClose")),onClick:Z,children:[f("svg",{"aria-hidden":"true",focusable:"false",viewBox:"0 0 512 512",fill:"none",stroke:"currentColor",children:f(Yc,{})}),f(Ke,{label:M("informationPanelClose")})]}),f(Vl.Provider,{value:O.some(T=>T.value==="about"),children:f(Tv,{items:O,layout:e,value:n!==void 0?n:rt,onValueChange:T=>{n===void 0&&tt(T),r==null||r(T)},label:M("informationPanelTabs"),labelLang:w("informationPanelTabs"),headingLevel:a})})]})});function zv(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 Hv=1,Wv=4,Uv=8,jv=500,Vv=4,Ua=["pointerdown","mousedown","pointerup","mouseup","click","dblclick"],Xl=()=>typeof document>"u"?16:parseFloat(getComputedStyle(document.documentElement).fontSize)||16;function ho(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*Xl():t.endsWith("%")?n/100*e:n}const Cr=t=>typeof t=="number"?`${t}px`:t,qv=t=>{if(!t||typeof localStorage>"u")return{};try{const e=JSON.parse(localStorage.getItem(t)??"{}");return e&&typeof e=="object"?e:{}}catch{return{}}},Kv=(t,e)=>{if(t)try{localStorage.setItem(t,JSON.stringify(e))}catch{}},Zv=t=>t?Array.from(t.children).filter(e=>e.classList.contains("clover-split-pane")):[];function Gv(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 Xv(t,e,n){const{sized:o,other:r}=Gv(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=ho(a.min,s)??0,u=o.getBoundingClientRect().width+((r==null?void 0:r.getBoundingClientRect().width)??0)-(ho(c.min,s)??0),m=Math.max(l,Math.min(ho(a.max,s)??u,u)),h=o.getBoundingClientRect().left>=t.getBoundingClientRect().left-1;return{sized:o,key:i,min:l,max:m,after:h}}function Yv(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 Jv(t,e){const n=e.sized.getBoundingClientRect().width,o=Hv*Xl()*(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 ja(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 Qv(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=()=>{Ua.forEach(g=>l.removeEventListener(g,m,true)),l.removeEventListener("pointermove",h,true),clearTimeout(p),s=null},m=g=>{if(!c.contains(g.target)){if(g.type==="pointerdown"&&d(g))return u();g.preventDefault(),g.stopPropagation()}},h=g=>d(g)&&u();Ua.forEach(g=>l.addEventListener(g,m,true)),l.addEventListener("pointermove",h,true);const p=setTimeout(u,jv);s=u};return{down(a){var d;if(o=false,r=null,a.defaultPrevented||a.button!==0||ja(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"?Uv:Wv,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*Vv}:null,n=null,delete a.currentTarget.dataset.dragging},click(a){const c=o,l=r;o=false,r=null,!(a.defaultPrevented||c||ja(a))&&(e().step(),l&&i(l))},key(a){if(a.defaultPrevented)return;const c=e().limits();if(!c)return;const l=Jv(a,c);l!==void 0&&(e().resize(l),a.preventDefault())},dispose(){s==null||s()}}}const zs=ge(null);function Hs(t,e){typeof t=="function"?t(e):t&&(t.current=e)}const ty=le(function({as:e="div",storageKey:n,className:o,style:r,children:s,...i},a){const c=$(null),l=$({}),[d,u]=z({});F(()=>u(qv(n)),[n]);const m=ut((p,g)=>u(v=>{const y={...v};return g===void 0?delete y[p]:y[p]=Math.round(g),Kv(n,y),y}),[n]),h=yt(()=>({sizes:d,setSize:m,specs:l,element:c}),[d,m]);return f(zs.Provider,{value:h,children:f(e,{ref:p=>{c.current=p,Hs(a,p)},className:["clover-split",o].filter(Boolean).join(" "),style:{display:"flex",...r},...i,children:s})})}),Yl=le(function({as:e="div",size:n,min:o,max:r,name:s,className:i,style:a,children:c,...l},d){const u=Vt(zs),m=$(null),[h,p]=z(s??"");F(()=>{if(s)return p(s);const v=Zv(u==null?void 0:u.element.current);p(String(v.indexOf(m.current)))},[s,u]),u&&h&&(u.specs.current[h]={min:o,max:r,size:n});const g=u&&h?u.sizes[h]:void 0;return f(e,{ref:v=>{m.current=v,Hs(d,v)},className:["clover-split-pane",i].filter(Boolean).join(" "),"data-split-key":h||void 0,"data-sized":n!==void 0?"":void 0,style:{minWidth:Cr(o)??0,"--clover-split-size":g!==void 0?`${g}px`:Cr(n),"--clover-split-max":Cr(r),...a},...l,children:c})}),ey=le(function({className:e,children:n,onPointerDown:o,onClick:r,onKeyDown:s,...i},a){const c=Vt(zs),{t:l,langOf:d}=Tt(),u=$(null),[m,h]=z(),p=ut(()=>{const w=u.current,B=c==null?void 0:c.element.current;return!w||!B||!c?null:Xv(w,B,c.specs.current)},[c]),g=ut(w=>{const B=p();if(!B||!c)return;const A=Math.min(B.max,Math.max(B.min,w));c.setSize(B.key,A),h({now:A,min:B.min,max:B.max})},[p,c]),v=ut(()=>{const w=p();w&&h({now:w.sized.getBoundingClientRect().width,min:w.min,max:w.max})},[p]);F(()=>{const w=c==null?void 0:c.element.current;if(v(),!w||typeof ResizeObserver>"u")return;let B=0;const A=new ResizeObserver(()=>{cancelAnimationFrame(B),B=requestAnimationFrame(v)});return A.observe(w),()=>{cancelAnimationFrame(B),A.disconnect()}},[v,c,c==null?void 0:c.sizes]);const y=w=>{var B;return Math.round(w/(((B=c==null?void 0:c.element.current)==null?void 0:B.clientWidth)||1)*100)},k=()=>{var G,U;const w=p();if(!w||!c)return;const B=((G=c.element.current)==null?void 0:G.clientWidth)??0,A=ho((U=c.specs.current[w.key])==null?void 0:U.size,B),q=Yv(w,A,c.sizes[w.key]);if(!q.own)return g(q.to);c.setSize(w.key,void 0),h({now:A,min:w.min,max:w.max})},x=$({limits:p,resize:g,step:k});x.current={limits:p,resize:g,step:k};const[b]=z(()=>Qv(()=>u.current,()=>x.current));F(()=>()=>b.dispose(),[b]);const M=i["aria-label"]??l("splitHandle");return f("div",{ref:w=>{u.current=w,Hs(a,w)},role:"separator","aria-orientation":"vertical","aria-label":M,...dt(i["aria-label"]===void 0?d("splitHandle"):void 0),"aria-valuenow":m?y(m.now):void 0,"aria-valuemin":m?y(m.min):void 0,"aria-valuemax":m?y(m.max):void 0,tabIndex:0,className:["clover-split-handle",e].filter(Boolean).join(" "),onPointerDown:w=>{o==null||o(w),b.down(w)},onPointerMove:w=>b.move(w),onPointerUp:w=>b.up(w),onPointerCancel:w=>b.up(w),onClick:w=>{r==null||r(w),b.click(w)},onKeyDown:w=>{s==null||s(w),b.key(w)},...i,children:[n,f(Ke,{label:M})]})});let Jl;function ny(t){Jl=t}function rb(){return Jl}function oy({open:t,onOpenChange:e,controls:n,side:o}){const{t:r,langOf:s}=Tt(),i=ve().replace(/:/g,"");return f(We,{id:`panel-${i}`,label:r("informationPanelToggle"),lang:s("informationPanelToggle"),expanded:t,controls:n,side:o==="start"?o:void 0,onClick:()=>e(!t),children:f(Mt,{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 ry,po;const Ql=()=>ry??(ry=import("./dragToClose-BGb6fAd6.mjs").then(t=>po=t));function sy(){Ql()}function iy(t,{enabled:e,side:n,onClose:o,scrim:r,alongside:s,exits:i=false}){const a=$({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||(po==null||po.reset(c,a),!e))return;let l=true,d;return Ql().then(u=>{l&&(d=u.attach(c,a))}),()=>{l=false,d==null||d()}},[t,e])}const ay=240,cy="16rem",ly="14rem",uy=31;function dy(t){const[e,n]=z(t),[o,r]=z(t);return F(()=>{if(t){n(true);const i=requestAnimationFrame(()=>requestAnimationFrame(()=>r(true)));return()=>cancelAnimationFrame(i)}r(false);const s=setTimeout(()=>n(false),ay);return()=>clearTimeout(s)},[t]),{mounted:e,open:t&&o}}function fy(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 hy=typeof window>"u"?F:$t;function py(t,e){const[n,o]=z();return hy(()=>{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 Va=typeof window>"u"?F:$t;function my({id:t,beside:e,defaultOpen:n,side:o,focus:r=fy,slides:s=true,alongside:i,followFocus:a}){var pt,S;const c=$(null),l=$(null),d=$(null),u=e===false,[m,h]=z(n),[p,g]=z(false),v=u?p:m,y=()=>document.querySelector(`button[aria-controls~="${t}"]`),k=()=>a(y),x=()=>{var C,O,j;(C=c.current)!=null&&C.contains(document.activeElement)&&((O=d.current)==null||O.removeAttribute("inert"),(j=y())==null||j.focus(),k())},b=$(0),M=C=>{b.current=u&&C?3:0,b.current||k(),u&&g(C),h(C)},w=()=>{x(),M(false)},B=$(e),A=$(false);if(B.current===true&&e===false){const C=document.activeElement;A.current=!!(C&&((pt=c.current)!=null&&pt.contains(C)||(S=y())!=null&&S.contains(C)))}Va(()=>{var C;A.current&&(A.current=false,(C=y())==null||C.focus(),k()),e===true&&g(false),B.current=e},[e]);const q=dy(s&&u&&v),G=s&&u,U=G?q.mounted:v,Q=G?q.open:v,st=u&&Q;return Va(()=>{const C=d.current;if(C)return st?C.setAttribute("inert",""):C.removeAttribute("inert"),()=>C.removeAttribute("inert")},[st]),F(()=>{if(!b.current||!c.current)return;b.current-=1;const C=r(c.current);C==null||C.focus({preventScroll:true}),C&&document.activeElement===C&&(b.current=0)}),iy(c,{enabled:u&&Q,side:o,onClose:w,scrim:l,alongside:i,exits:!s}),{pane:c,main:d,over:u,open:v,shown:U,opened:Q,setOpen:M,close:w,onKeyDown:C=>{u&&v&&C.key==="Escape"&&!C.defaultPrevented&&(C.preventDefault(),w())},scrim:u&&U&&{ref:l,"data-open":Q,"aria-hidden":true,onMouseDown:C=>C.preventDefault(),onClick:w}}}const gy=typeof window>"u"?F:$t;function vy(t,e,n){gy(()=>{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 yy=()=>import("./PanelPart-D479R8OK.mjs");function by({id:t,beside:e,defaultOpen:n,side:o="end",followFocus:r,body:s,sections:i,panel:a}){const c=my({id:t,beside:e,defaultOpen:n,side:o,followFocus:r}),l=!c.over&&c.open,d=$(null),[u,m]=z(),h=a??u,p=()=>yy().then(y=>m(()=>y.default));F(()=>{c.open&&!h&&p()},[c.open]),vy(d,()=>s==null?void 0:s(),l&&!!s);const g=y=>{var k,x;(x=(k=y.target).closest)!=null&&x.call(k,`[aria-controls~="${t}"]`)&&(h||p(),c.over&&sy())},v=f(_y,{sections:i,open:c.open,onOpenChange:y=>y&&!h?p().then(()=>c.setOpen(true)):c.setOpen(y),controls:t,side:o});return{...c,id:t,side:o,docked:l,spine:d,toggle:v,Part:h,splitProps:{"data-panel":c.over?"over":"beside",onKeyDown:c.onKeyDown,onPointerOver:g,onFocus:g}}}function _y({sections:t,...e}){return Ds(t).length?f(oy,{...e}):null}function wy({pane:t,className:e,...n}){const{id:o,over:r,docked:s,side:i,Part:a}=t,c=Ds(n.sections);if(!c.length)return null;const l=s&&f(Mt,{children:[f(ey,{className:"clover-template-panel-handle","aria-controls":o}),f("div",{ref:t.spine,className:"clover-template-spine",children:t.toggle})]});return f(Mt,{children:[i==="end"&&l,f(Yl,{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:ly,"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 xy=30;function Sy(){const t=$(0);return F(()=>()=>cancelAnimationFrame(t.current),[]),e=>{cancelAnimationFrame(t.current);let n=0;const o=()=>{const r=e();r&&ky()?r.focus():++n<xy&&(t.current=requestAnimationFrame(o))};t.current=requestAnimationFrame(o)}}function ky(){const t=document.activeElement;return!t||t===document.body||!t.isConnected||t.closest("[hidden], [inert]")!==null}function Cy({className:t,header:e=true,headingLevel:n=2,panel:o=true,defaultPanelOpen:r,panelLayout:s="accordion",panelSections:i,panelLabels:a,download:c=true,languages:l=true,interfaceLanguages:d=true,items:u="slider",singleItem:m=false,storageKey:h="clover-template-default",fill:p=false,collapseControls:g,canvasOptions:v,...y}){const k=$(null),x=ve().replace(/:/g,""),b=`${x}-panel`,M=Pl(n,`${x}-title`),w=by({id:b,beside:py(k,uy),defaultOpen:r??true,followFocus:Sy(),sections:i,body:()=>{var q;return(q=k.current)==null?void 0:q.querySelector(".clover-template-default-body")},panel:Dv}),B=w.over,A=o&&w.docked;return f(zf,{className:["clover-template-default",t].filter(Boolean).join(" "),"data-fill":p||void 0,...e?M.group:null,...y,children:f(ty,{ref:k,className:"clover-template-default-panes clover-template-panes",storageKey:h||void 0,...o?w.splitProps:{"data-panel":"beside"},children:[f(Yl,{ref:w.main,className:"clover-template-default-main",min:B?void 0:cy,children:[e&&f("header",{className:"clover-template-default-header",children:[f(Ey,{title:M}),f(Co,{of:"targets",layout:"pager",size:"small",className:"clover-template-default-pager"}),f(Hl,{className:"clover-template-default-provider",children:f(Wl,{})})]}),f(Hg,{loading:false}),f(Ty,{items:u,singleItem:m,body:f(og,{className:"clover-template-default-body",collapseControls:g,options:v,children:o&&!A&&w.toggle},"body")})]}),o&&f(wy,{pane:w,className:"clover-template-default-panel",layout:s,sections:i,labels:a,download:c,languages:l,interfaceLanguages:d,headingLevel:e?Iy(n):n})]})})}function Ey({title:t}){const e=ot(o=>{var r;return o.throughCollection?(r=o.collection)==null?void 0:r.label:void 0}),n=Hp();return My(n==null?void 0:n.entries[0]),f(Mt,{children:[f(ln,{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(ln,{as:"p",label:e,className:"clover-template-default-collection"}),f(Co,{of:"members",layout:"pager",size:"small",className:"clover-template-default-pager"})]}),n&&f("div",{className:"clover-template-default-collection-row",children:[n.label&&f(ln,{as:"p",label:n.label,className:"clover-template-default-collection"}),f(Co,{of:"annotations",layout:"pager",size:"small",className:"clover-template-default-pager"})]})]})}function My(t){const{clover:e}=ue(),n=ot(r=>{var s;return(s=r.manifest)==null?void 0:s.id}),o=$(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])}function Ty({body:t,items:e,singleItem:n}){const{direction:o}=As(),r=e==="slider"&&(o==="top-to-bottom"||o==="bottom-to-top"),s=f("div",{className:"clover-template-default-rail-header",children:[f(Ly,{}),f(zg,{})]},"header"),i=e&&f(Co,{layout:e,orientation:r?"vertical":void 0,singleItem:n});return f("div",{className:"clover-template-default-views","data-orientation":r?"vertical":void 0,children:r?[f("div",{className:"clover-template-default-rail","data-orientation":"vertical",children:i},"rail"),t,s]:[t,f("div",{className:"clover-template-default-rail",children:[s,i]},"rail")]})}const Iy=t=>t+1;function Ly(){const t=Os();return f("p",{className:"clover-template-default-titles",children:t.map((e,n)=>f(he.Fragment,{children:[n>0&&f("span",{className:"clover-template-default-titles-dot","aria-hidden":"true",children:"\xB7"}),f(ln,{label:e.label})]},e.id))})}const Py=()=>import("./renderers-DUD0Xleg.mjs"),Ay=bt(()=>import("./Document-CN5l-m01.mjs").then(t=>({default:t.Document}))),Oy=bt(()=>import("./Gallery-BuhT4BOj.mjs").then(t=>({default:t.Gallery}))),qa={default:Cy,document:Ay,gallery:Oy},Ny={header:["default"],panel:["default","gallery"],items:["default","gallery"],singleItem:["default","document"],fill:["default"],defaultPanelOpen:["default","document","gallery"],panelLayout:["default","document","gallery"],panelSections:["default","document","gallery"],panelLabels:["default","document","gallery"],download:["default","document","gallery"],languages:["default","document","gallery"],storageKey:["default","document","gallery"],defaultSidebarOpen:["document"],size:["gallery"],height:["gallery"],gap:["gallery"],secondary:["gallery"],summary:["gallery"],lightboxItems:["gallery"]};function Ry({props:t}){const e=typeof t.template=="string"&&t.template in qa?t.template:"default",n=Object.fromEntries(Object.entries(t).filter(([i])=>{var a;return i!=="template"&&(((a=Ny[i])==null?void 0:a.includes(e))??true)})),o=sn(Py,!!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=qa[e];return f(kt,{fallback:null,children:f(s,{...n,iiifContent:t.iiifContent})})}const By=""+new URL("../assets/maplibre-gl-worker-kTz9OPxr.js",import.meta.url).href,$y={mapWorkerUrl:By},Fy={tag:"clover-viewer",kind:"alone",attributes:{template:{prop:"template",type:["default","document","gallery"]},"iiif-content":{prop:"iiifContent",type:"string"},"canvas-id":{prop:"defaultCanvasId",type:"string"},"manifest-id":{prop:"defaultManifestId",type:"string"},language:{prop:"language",type:"string"},"high-contrast":{prop:"highContrast",type:"boolean"},"search-query":{prop:"searchQuery",type:"string"},annotations:{prop:"annotations",type:"data"},"heading-level":{prop:"headingLevel",type:"number",min:2},items:{prop:"items",type:["slider","list","grid","masonry","false"]},"single-item":{prop:"singleItem",type:"boolean"},header:{prop:"header",type:"boolean"},panel:{prop:"panel",type:"boolean"},download:{prop:"download",type:"boolean"},languages:{prop:"languages",type:"boolean"},"interface-languages":{prop:"interfaceLanguages",type:"boolean"},"panel-open":{prop:"defaultPanelOpen",type:"boolean"},"panel-layout":{prop:"panelLayout",type:["accordion","tabs"]},"panel-sections":{prop:"panelSections",type:"data"},"panel-labels":{prop:"panelLabels",type:"data"},"sidebar-open":{prop:"defaultSidebarOpen",type:"boolean"},"storage-key":{prop:"storageKey",type:"string"},fill:{prop:"fill",type:"boolean"},"collapse-controls":{prop:"collapseControls",type:["auto","always"]},size:{prop:"size",type:"string"},height:{prop:"height",type:"string"},gap:{prop:"gap",type:"string"},secondary:{prop:"secondary",type:["summary","navDate","none"]},summary:{prop:"summary",type:"boolean"},"lightbox-items":{prop:"lightboxItems",type:["slider","pager"]}},properties:["iiifContent","annotations","request","renderers","canvasOptions"],events:{"clover-canvas-change":{prop:"onCanvasChange",detail:["canvasId"]},"clover-manifest-change":{prop:"onManifestChange",detail:["manifestId"]},"clover-status-change":{prop:"onStatusChange",detail:["status","error"]},"clover-content-state-change":{prop:"onContentStateChange",detail:"first"}}};ny($y.mapWorkerUrl);Au(Fy,()=>Promise.resolve(Ry));export{Gu as $,$ as A,og as B,ne as C,ty as D,Yl as E,Co as F,ey as G,cy as H,Gf as I,wy as J,sy as K,ln as L,Uu as M,ot as N,Hp as O,zg as P,Yy as Q,zf as R,Hg as S,yt as T,Fp as U,kt as V,bt as W,za as X,ge as Y,Vt as Z,$t as _,ue as a,rl as a$,Dv as a0,kf as a1,tb as a2,ms as a3,Nl as a4,Rl as a5,Nn as a6,Bl as a7,Vd as a8,xt as a9,he as aA,fh as aB,Yh as aC,Gc as aD,Hc as aE,Gh as aF,Xh as aG,mh as aH,dl as aI,hf as aJ,Ms as aK,jp as aL,pa as aM,Qf as aN,el as aO,ee as aP,sh as aQ,Zh as aR,hh as aS,We as aT,Uf as aU,rp as aV,Ln as aW,th as aX,Zf as aY,eh as aZ,nh as a_,Fs as aa,dt as ab,Rt as ac,$c as ad,lf as ae,qe as af,Tt as ag,Ro as ah,Pt as ai,Dg as aj,le as ak,Fg as al,Po as am,cs as an,ls as ao,Dn as ap,sm as aq,_a as ar,ba as as,bl as at,Os as au,Wp as av,wa as aw,gs as ax,Ao as ay,W as az,fd as b,Eh as b$,rh as b0,oh as b1,jd as b2,Xg as b3,Yg as b4,Rp as b5,ke as b6,Mv as b7,Xy as b8,Ky as b9,Qd as bA,ml as bB,Oh as bC,Oc as bD,hn as bE,vs as bF,lr as bG,Un as bH,ig as bI,ag as bJ,fs as bK,rm as bL,Be as bM,zn as bN,Ac as bO,rb as bP,Ml as bQ,Lt as bR,Gd as bS,ff as bT,Ah as bU,ws as bV,xs as bW,$l as bX,Xf as bY,Ef as bZ,nf as b_,Hy as ba,ks as bb,ob as bc,Ue as bd,ll as be,Vh as bf,lv as bg,Cc as bh,ds as bi,nb as bj,eb as bk,af as bl,bs as bm,Wy as bn,cr as bo,Ls as bp,Lo as bq,sn as br,Op as bs,Rc as bt,No as bu,gn as bv,Vc as bw,ay as bx,ql as by,Ki as bz,As as c,Ve as c0,bo as c1,Rs as c2,Zy as c3,Rh as c4,vr as c5,Dd as c6,Kh as c7,Ic as c8,Jp as c9,Jd as ca,pn as cb,Hn as cc,Ur as cd,oa as ce,Yc as cf,Uy as cg,jy as ch,Vy as ci,Qp as cj,La as ck,ga as cl,Vp as cm,qp as cn,Gy as co,me as cp,ce as cq,Vg as cr,Fl as cs,qy as ct,Is as cu,cg as cv,tl as cw,Cu as cx,dg as cy,zp as d,z as e,ve as f,Jy as g,Qy as h,Sy as i,my as j,Mt as k,py as l,by as m,ed as n,uy as o,Ke as p,ut as q,Bs as r,ug as s,Pl as t,f as u,je as v,Hl as w,fe as x,F as y,Wl as z};
|