@nulib/clover 4.6.0 → 4.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Canvas/CanvasView.mjs +18 -4
- package/dist/components/Canvas/Connected.mjs +1 -1
- package/dist/components/Canvas/LoadedCanvas.mjs +26 -6
- package/dist/components/Canvas/Placeholder.mjs +1 -1
- package/dist/components/Canvas/media/Player.mjs +2 -2
- package/dist/components/CollectionSelect/CollectionSelect.mjs +6 -4
- package/dist/components/Items/Items.mjs +2 -5
- package/dist/components/Items/Position.mjs +2 -5
- package/dist/components/Items/StandaloneItems.mjs +6 -0
- package/dist/components/Map/MapView.mjs +2 -8
- package/dist/components/Root/useRootState.mjs +15 -14
- package/dist/components/Scene/Loaded.mjs +5 -1
- package/dist/core/clover.mjs +38 -10
- package/dist/core/geo.mjs +5 -4
- package/dist/core/selectors.mjs +7 -1
- package/dist/index.d.mts +14 -2
- package/dist/lib/renderer/CanvasRenderer.mjs +4 -3
- package/dist/map/index.d.mts +2 -1
- package/dist/ui/EntryThumbnail.mjs +6 -3
- package/dist/web-components/About-I4h1cfup.mjs +1 -0
- package/dist/web-components/AnnotationItems-BfQm1YRD.mjs +1 -0
- package/dist/web-components/{AnnotationMenu-4PN2LNP-.mjs → AnnotationMenu-guk9SbaL.mjs} +1 -1
- package/dist/web-components/{AnnotationState-3KHHmQhl.mjs → AnnotationState-BX7xh-bd.mjs} +1 -1
- package/dist/web-components/{Annotations-BwKS6fG8.mjs → Annotations-BJrje3Ey.mjs} +1 -1
- package/dist/web-components/{Annotations-CPUvoKJe.mjs → Annotations-DBxLDLDf.mjs} +1 -1
- package/dist/web-components/{Body-CTzmxY8R.mjs → Body-CQuiRv9p.mjs} +1 -1
- package/dist/web-components/{BodyAlert-CXOxbNBE.mjs → BodyAlert-DF9rnG5o.mjs} +1 -1
- package/dist/web-components/{Button-a59NBnOp.mjs → Button-qhI73GCI.mjs} +1 -1
- package/dist/web-components/{Camera-BlbXBgYZ.mjs → Camera-D2MnETlC.mjs} +1 -1
- package/dist/web-components/{Canvas2DBackend-DXCfms6g.mjs → Canvas2DBackend-kJpOk_Pb.mjs} +1 -1
- package/dist/web-components/CanvasView-B752g1bm.mjs +2 -0
- package/dist/web-components/{CaptionDetails-CCCTWTQP.mjs → CaptionDetails-Cl3fLJfr.mjs} +1 -1
- package/dist/web-components/ChaptersMenu-CB4zdVOh.mjs +1 -0
- package/dist/web-components/{Chevron-CH8yyEDi.mjs → Chevron-CT1ntI6B.mjs} +1 -1
- package/dist/web-components/{ChoiceMenu-BQVTRzXj.mjs → ChoiceMenu-DoXMSLjk.mjs} +1 -1
- package/dist/web-components/{Collection-CbEMQWrO.mjs → Collection-B8ipKdPl.mjs} +1 -1
- package/dist/web-components/CollectionSelect-C0Tunk6c.mjs +1 -0
- package/dist/web-components/{Connected-Dq0xux9o.mjs → Connected-DaP_DgGw.mjs} +1 -1
- package/dist/web-components/{Connected-C31vzWei.mjs → Connected-L47VwCva.mjs} +1 -1
- package/dist/web-components/Connected-shq2_tc-.mjs +1 -0
- package/dist/web-components/{Contents-CGc6_Z5c.mjs → Contents-_u13TaBJ.mjs} +1 -1
- package/dist/web-components/{ControlMenu-ej-Kpb31.mjs → ControlMenu-BW39OjKC.mjs} +1 -1
- package/dist/web-components/ControlsFade-LFHufW32.mjs +1 -0
- package/dist/web-components/{CountMenu-D4M1roIh.mjs → CountMenu-CQ7ThPWJ.mjs} +1 -1
- package/dist/web-components/Cue-B1IlY4Ae.mjs +1 -0
- package/dist/web-components/{Document-CPQELxSI.mjs → Document-BChOw20c.mjs} +1 -1
- package/dist/web-components/{DomLayers-DwhkzPRS.mjs → DomLayers-BIFA6J56.mjs} +1 -1
- package/dist/web-components/{Download-Dsei4KG3.mjs → Download-BfZJVu-O.mjs} +1 -1
- package/dist/web-components/{EntryBodies-BI7V3B5i.mjs → EntryBodies-Bld2RXeE.mjs} +1 -1
- package/dist/web-components/EntryThumbnail-C5df3CaH.mjs +1 -0
- package/dist/web-components/{FieldPill-BOeOasUT.mjs → FieldPill-Dx--yBoK.mjs} +1 -1
- package/dist/web-components/FrameAnimation-CpniJMTK.mjs +1 -0
- package/dist/web-components/{Gallery-BDGDzt0R.mjs → Gallery-CkaSdVAP.mjs} +1 -1
- package/dist/web-components/{GlobeGlyph-9zKXX7B6.mjs → GlobeGlyph-CCi1sZgm.mjs} +1 -1
- package/dist/web-components/{HideToggle-CmwFnHcZ.mjs → HideToggle-nvJtMFOZ.mjs} +1 -1
- package/dist/web-components/{ImageControls-CSHxdUD1.mjs → ImageControls-Df-M7F2R.mjs} +1 -1
- package/dist/web-components/Items-BsKByN_b.mjs +1 -0
- package/dist/web-components/{ItemsVertical-BeIiJ37B.mjs → ItemsVertical-Dmhm1DBy.mjs} +1 -1
- package/dist/web-components/Label-DElSTYS5.mjs +1 -0
- package/dist/web-components/{LanguageChoice-D_vEiQp9.mjs → LanguageChoice-t55qbd8x.mjs} +1 -1
- package/dist/web-components/{LanguageMenu-ycNvnbOB.mjs → LanguageMenu-BlFBWRSO.mjs} +1 -1
- package/dist/web-components/{LightboxView-CsOAsZ3f.mjs → LightboxView-BhPao9ao.mjs} +1 -1
- package/dist/web-components/{ListEnd-B6tyeK1B.mjs → ListEnd-KSoUQrsM.mjs} +1 -1
- package/dist/web-components/Loaded-uGqT3xyD.mjs +1 -0
- package/dist/web-components/LoadedCanvas-fqjWHH0H.mjs +3 -0
- package/dist/web-components/LoadedMap-BpRHQPoU.mjs +1 -0
- package/dist/web-components/{Loading-CAkF1fBT.mjs → Loading-DSaV1vxb.mjs} +1 -1
- package/dist/web-components/{Map-BDsBYSp5.mjs → Map-CUY8HEgh.mjs} +1 -1
- package/dist/web-components/MapView-DIVMYZZ1.mjs +3 -0
- package/dist/web-components/{Markup-COA2t_y1.mjs → Markup-DzUsOaNC.mjs} +1 -1
- package/dist/web-components/{MediaBody-CNk9fFfN.mjs → MediaBody-CJELKAWJ.mjs} +1 -1
- package/dist/web-components/{MediaBody-XsEObuYV.mjs → MediaBody-CN2ZTxK0.mjs} +1 -1
- package/dist/web-components/{NavDate-1LLiZ8Vq.mjs → NavDate-CD3sFxZJ.mjs} +1 -1
- package/dist/web-components/{Navigator-t1y35uj8.mjs → Navigator-CVDhe8R_.mjs} +1 -1
- package/dist/web-components/{Pager-35N8_3lH.mjs → Pager-BmZaB--9.mjs} +1 -1
- package/dist/web-components/PagerLayout-DhIz3hKA.mjs +1 -0
- package/dist/web-components/{Panel-D16u98YB.mjs → Panel-CdJyJVBh.mjs} +1 -1
- package/dist/web-components/PanelPart-m2QWHh_4.mjs +1 -0
- package/dist/web-components/{PanelToggle-BcUVIbQw.mjs → PanelToggle-BqVj7sX0.mjs} +1 -1
- package/dist/web-components/PartOfManifest-Dgw1shMM.mjs +1 -0
- package/dist/web-components/{Pending-bIYd0PwB.mjs → Pending-CDXsIk5O.mjs} +1 -1
- package/dist/web-components/{PlaceBox-D-pLIX5w.mjs → PlaceBox-DNnl9coD.mjs} +1 -1
- package/dist/web-components/Placeholder-D8Sabput.mjs +1 -0
- package/dist/web-components/Position-oFMJoo4P.mjs +1 -0
- package/dist/web-components/{Primitives-DP2uwwcU.mjs → Primitives-BdXIEpYW.mjs} +1 -1
- package/dist/web-components/{Provider-BUDzNTyJ.mjs → Provider-DWIlPOzR.mjs} +1 -1
- package/dist/web-components/{ReadMore-B6qft77s.mjs → ReadMore-f34RbHMm.mjs} +1 -1
- package/dist/web-components/{Root-J9v7nQ6o.mjs → Root-CEtLCE4Y.mjs} +1 -1
- package/dist/web-components/Scene-BJE8miZL.mjs +1 -0
- package/dist/web-components/{SceneView-DykQJepG.mjs → SceneView-D635_fRV.mjs} +1 -1
- package/dist/web-components/{Search-DEoFdx2g.mjs → Search-219u7M8o.mjs} +1 -1
- package/dist/web-components/{Sections-B6j9eFao.mjs → Sections-C3fPhGNx.mjs} +1 -1
- package/dist/web-components/{SeekMarks-C3ZDOMbt.mjs → SeekMarks-Ds8v3SaW.mjs} +1 -1
- package/dist/web-components/StandaloneItems-Mdh-k3w9.mjs +1 -0
- package/dist/web-components/{Status-C49DxNaY.mjs → Status-CEkhPlDF.mjs} +1 -1
- package/dist/web-components/{Steps-BTAJ3lc6.mjs → Steps-BoNd47eB.mjs} +1 -1
- package/dist/web-components/{TargetItems-BZFSWVs6.mjs → TargetItems-dFjJs-VP.mjs} +1 -1
- package/dist/web-components/Timeline-DPdS6bYG.mjs +1 -0
- package/dist/web-components/{Tip-Dv-gYN8n.mjs → Tip-mcI7IRQh.mjs} +1 -1
- package/dist/web-components/{Transcript-FmC6HR0-.mjs → Transcript-5wVgmZmU.mjs} +1 -1
- package/dist/web-components/{Transport-BKFLjI45.mjs → Transport-DYjd2GnA.mjs} +1 -1
- package/dist/web-components/{Transport-pRWbs9M3.mjs → Transport-DdNRlSa0.mjs} +1 -1
- package/dist/web-components/{annotation-collection-Dc-peX7w.mjs → annotation-collection-C3UpNV1K.mjs} +1 -1
- package/dist/web-components/{annotation-name-BhbhOgES.mjs → annotation-name-DhMF4ZHj.mjs} +1 -1
- package/dist/web-components/{annotations-content-BJSUCNd1.mjs → annotations-content-CuWJZr4t.mjs} +1 -1
- package/dist/web-components/{body-BEZ3sYcR.mjs → body-Bym9Uvav.mjs} +1 -1
- package/dist/web-components/canvas-BIXBggVo.mjs +1 -0
- package/dist/web-components/{cloverEngine-BstElW9l.mjs → cloverEngine-BEdb3g52.mjs} +1 -1
- package/dist/web-components/{content-state-reader-DGOg8oAH.mjs → content-state-reader-BGZEChSM.mjs} +1 -1
- package/dist/web-components/{controlGlyphs-Lxfq7zz4.mjs → controlGlyphs-DMQCxKaT.mjs} +1 -1
- package/dist/web-components/{controls-BibZpBh1.mjs → controls-B1pIwRgH.mjs} +1 -1
- package/dist/web-components/{downloads-cYib41PV.mjs → downloads-DwzBIS-9.mjs} +1 -1
- package/dist/web-components/{dragToClose-BpzjNnPx.mjs → dragToClose-BYUJ9qgo.mjs} +1 -1
- package/dist/web-components/{engine-Cl755NaO.mjs → engine-DUv-Syum.mjs} +1 -1
- package/dist/web-components/{engines-fZzYf1dz.mjs → engines-BzM_oBU_.mjs} +1 -1
- package/dist/web-components/{fetchManifest-D31pEPrb.mjs → fetchManifest-Cp7c8vs5.mjs} +1 -1
- package/dist/web-components/{follow-content-Byosc3Ev.mjs → follow-content-CmXq05TW.mjs} +1 -1
- package/dist/web-components/{fromManifest-DqCyZd2Q.mjs → fromManifest-DbgwTeBo.mjs} +1 -1
- package/dist/web-components/{glyphs-8fjIPAtZ.mjs → glyphs-atKuagcd.mjs} +1 -1
- package/dist/web-components/{hooks-Bo5GjPGX.mjs → hooks-DhTYPPVG.mjs} +1 -1
- package/dist/web-components/image-layers-CoBPhMZw.mjs +1 -0
- package/dist/web-components/{image-service-content-bUFBZCr1.mjs → image-service-content-CL_EZugL.mjs} +1 -1
- package/dist/web-components/{imageService-CCKieCxo.mjs → imageService-BoQQvo1U.mjs} +1 -1
- package/dist/web-components/{index-DhlRi3H9.mjs → index-Ciz5x8Tt.mjs} +1 -1
- package/dist/web-components/index.mjs +1 -1
- package/dist/web-components/{items-CKMFXz0W.mjs → items-CjtUJjSU.mjs} +1 -1
- package/dist/web-components/items-DiQ3K5TV.mjs +1 -0
- package/dist/web-components/label-CKgFcOzZ.mjs +1 -0
- package/dist/web-components/{layout-DQtgCOJJ.mjs → layout-zjkkOHIj.mjs} +1 -1
- package/dist/web-components/{link-q4quIuuD.mjs → link-CrNaByf-.mjs} +1 -1
- package/dist/web-components/logo-C2xm9WAL.mjs +1 -0
- package/dist/web-components/{models-Dw-cADIz.mjs → models-BFKa5v_H.mjs} +1 -1
- package/dist/web-components/{nodes-nZmQ93ib.mjs → nodes-BDyXzQhk.mjs} +1 -1
- package/dist/web-components/{overlayImage-B-ybt0wn.mjs → overlayImage-BGxovfPN.mjs} +1 -1
- package/dist/web-components/{panel-C27fOmhT.mjs → panel-rEGhe5fL.mjs} +1 -1
- package/dist/web-components/part-PF-s_vD-.mjs +1 -0
- package/dist/web-components/{playerSurface-BLzwC0Ux.mjs → playerSurface-BthXi9l2.mjs} +1 -1
- package/dist/web-components/{pointer-BYZjBehK.mjs → pointer-C22ufJ5w.mjs} +1 -1
- package/dist/web-components/{provider-Cs6sFr4G.mjs → provider-B2C3eH9p.mjs} +1 -1
- package/dist/web-components/{range-regions-DssQTTra.mjs → range-regions-Ytq4QkMX.mjs} +1 -1
- package/dist/web-components/{read-more-Cp9CLzyd.mjs → read-more-B7LHzF4-.mjs} +1 -1
- package/dist/web-components/{readingLanguages-D97yt-4s.mjs → readingLanguages-B20n_dkw.mjs} +1 -1
- package/dist/web-components/{rendererSurface-BuBm8Th_.mjs → rendererSurface-BfZP5clN.mjs} +2 -2
- package/dist/web-components/{renderers-BL-b8snn.mjs → renderers-C569MeQB.mjs} +1 -1
- package/dist/web-components/{resource-DwKOZbOZ.mjs → resource-C5cMic8z.mjs} +1 -1
- package/dist/web-components/{save-file-CcfAgDXf.mjs → save-file-DsYdCZpi.mjs} +1 -1
- package/dist/web-components/{search-C45Jd7QH.mjs → search-kJ_71fbN.mjs} +1 -1
- package/dist/web-components/shared-ByrLMUQa.mjs +1 -0
- package/dist/web-components/{show-link-D9bByIzf.mjs → show-link-BqrJDDMV.mjs} +1 -1
- package/dist/web-components/{sizedImage-BFAry04f.mjs → sizedImage-CyCf0GtL.mjs} +1 -1
- package/dist/web-components/{split-CDZiE4rz.mjs → split-BZRKCI3g.mjs} +1 -1
- package/dist/web-components/{status-BtCciELI.mjs → status-CwO2mygB.mjs} +1 -1
- package/dist/web-components/{styles-Bf3qmdsh.mjs → styles-BOXm_R8o.mjs} +1 -1
- package/dist/web-components/three.mjs +1 -1
- package/dist/web-components/thumbnail-Np4ftjUo.mjs +1 -0
- package/dist/web-components/{tip-_XUeFMj4.mjs → tip-CNyxI6xd.mjs} +1 -1
- package/dist/web-components/{toggle-DkPNS5eL.mjs → toggle-lop2se80.mjs} +1 -1
- package/dist/web-components/{useContainerName-BfU0IozO.mjs → useContainerName-DR_6TyDU.mjs} +1 -1
- package/dist/web-components/{useControlsVisibility-pU1JVIpK.mjs → useControlsVisibility-Dig_1-0T.mjs} +1 -1
- package/dist/web-components/{useNearViewport-D1kQt-tS.mjs → useNearViewport-B_kjW0WB.mjs} +1 -1
- package/dist/web-components/{useScrollTrack-cQfG_zk_.mjs → useScrollTrack-6BV6IizZ.mjs} +1 -1
- package/dist/web-components/viewer/{AnnotationItems-UHFS1uDO.mjs → AnnotationItems-BDFH_6F_.mjs} +1 -1
- package/dist/web-components/viewer/{AnnotationMenu-0Ru0csCz.mjs → AnnotationMenu-BHCrJoNx.mjs} +1 -1
- package/dist/web-components/viewer/{AnnotationState-hEds2Tpa.mjs → AnnotationState-BV0fzlj8.mjs} +1 -1
- package/dist/web-components/viewer/{Annotations-Oprg7015.mjs → Annotations-BhA_Bbyj.mjs} +1 -1
- package/dist/web-components/viewer/{Annotations-vzP6-fS4.mjs → Annotations-DEqkGlE1.mjs} +1 -1
- package/dist/web-components/viewer/{Canvas2DBackend-3b5xEKac.mjs → Canvas2DBackend-Bq_bo1mL.mjs} +1 -1
- package/dist/web-components/viewer/{CaptionDetails-DDIjm-rC.mjs → CaptionDetails-D6Gd_EGS.mjs} +1 -1
- package/dist/web-components/viewer/ChaptersMenu-DE2TFesS.mjs +1 -0
- package/dist/web-components/viewer/{ChoiceMenu-COUDRKGM.mjs → ChoiceMenu-BVlpPUhr.mjs} +1 -1
- package/dist/web-components/viewer/{Collection-kWUradiW.mjs → Collection-DIgmeOCD.mjs} +1 -1
- package/dist/web-components/viewer/{Connected-B2TrgX9-.mjs → Connected-7TgFouaR.mjs} +1 -1
- package/dist/web-components/viewer/{Connected-FiJKHEv9.mjs → Connected-D9dz_v1p.mjs} +1 -1
- package/dist/web-components/viewer/{Contents-DHyzbjco.mjs → Contents-ROI1iuuR.mjs} +1 -1
- package/dist/web-components/viewer/{ControlMenu-DWi6tgKb.mjs → ControlMenu-CZlN7x0D.mjs} +1 -1
- package/dist/web-components/viewer/ControlsFade-QEgqI3wY.mjs +1 -0
- package/dist/web-components/viewer/{CountMenu-BYU6T0Ou.mjs → CountMenu-CCEH_rEu.mjs} +1 -1
- package/dist/web-components/viewer/{Cue-Ct2isFl7.mjs → Cue-CLbO9g2X.mjs} +1 -1
- package/dist/web-components/viewer/{Document-BtN3vmsO.mjs → Document-8ADB98RM.mjs} +1 -1
- package/dist/web-components/viewer/{DomLayers-CEzVM7HQ.mjs → DomLayers-BXPbPq1a.mjs} +1 -1
- package/dist/web-components/viewer/{Download-5BsnDZLL.mjs → Download-YfjzAcAF.mjs} +1 -1
- package/dist/web-components/viewer/{EntryBodies-D9R-wouw.mjs → EntryBodies-B2DBmUYl.mjs} +1 -1
- package/dist/web-components/viewer/EntryThumbnail-B2cRaP5D.mjs +1 -0
- package/dist/web-components/viewer/{FieldPill-CsyRt9Xh.mjs → FieldPill-C7o8586T.mjs} +1 -1
- package/dist/web-components/viewer/{FrameAnimation-f4RKtdpP.mjs → FrameAnimation-CytZC2Lx.mjs} +1 -1
- package/dist/web-components/viewer/{Gallery-DC4QY9lG.mjs → Gallery-CQma5dBZ.mjs} +1 -1
- package/dist/web-components/viewer/{GlobeGlyph-BwZm2Ffj.mjs → GlobeGlyph-UxhwZJy1.mjs} +1 -1
- package/dist/web-components/viewer/{HideToggle-BD6zlrz3.mjs → HideToggle-DZMCACLG.mjs} +1 -1
- package/dist/web-components/viewer/{ImageControls-Bw9a17cS.mjs → ImageControls-fzFWqFVh.mjs} +1 -1
- package/dist/web-components/viewer/{LanguageChoice-CcDmpHnE.mjs → LanguageChoice-B8F2WhUM.mjs} +1 -1
- package/dist/web-components/viewer/{LanguageMenu-CRtM-mLy.mjs → LanguageMenu-BIpATvd4.mjs} +1 -1
- package/dist/web-components/viewer/{LightboxView-DJoH23fL.mjs → LightboxView-D-6yYXCc.mjs} +1 -1
- package/dist/web-components/viewer/{ListEnd-CSp0KGGZ.mjs → ListEnd-DhrDIRKM.mjs} +1 -1
- package/dist/web-components/viewer/MapView-XFUp4DVX.mjs +3 -0
- package/dist/web-components/viewer/{MediaBody-CMddJWMF.mjs → MediaBody-C3fVbzuD.mjs} +1 -1
- package/dist/web-components/viewer/{NavDate-BJ_MF_t1.mjs → NavDate-B47wyKdc.mjs} +1 -1
- package/dist/web-components/viewer/{Navigator-Gt56cM6f.mjs → Navigator-BqNBxE5l.mjs} +1 -1
- package/dist/web-components/viewer/{PagerLayout-BMrlMLfO.mjs → PagerLayout-DKdFxLZ1.mjs} +1 -1
- package/dist/web-components/viewer/PanelPart-CuddftmQ.mjs +1 -0
- package/dist/web-components/viewer/{PartOfManifest-BdZWbAQI.mjs → PartOfManifest-DF40jLNB.mjs} +1 -1
- package/dist/web-components/viewer/{PlaceBox-C27N2KG8.mjs → PlaceBox-Bi1inmQv.mjs} +1 -1
- package/dist/web-components/viewer/{Placeholder-BX2y25Fo.mjs → Placeholder-BhAzmG0d.mjs} +1 -1
- package/dist/web-components/viewer/{Search-auUpOyeS.mjs → Search-CTkCx-SZ.mjs} +1 -1
- package/dist/web-components/viewer/{SeekMarks-Bg0PLdp0.mjs → SeekMarks-8NvVfr4F.mjs} +1 -1
- package/dist/web-components/viewer/StandaloneItems-P1ygiZtX.mjs +1 -0
- package/dist/web-components/viewer/{Steps-ABKs2V_m.mjs → Steps-DwqiM7sH.mjs} +1 -1
- package/dist/web-components/viewer/{TargetItems-BQVUKMAs.mjs → TargetItems-B873PbFR.mjs} +1 -1
- package/dist/web-components/viewer/{Transcript-DaShc1z-.mjs → Transcript-D7cFMWGk.mjs} +1 -1
- package/dist/web-components/viewer/{Transport-ClkPaaOB.mjs → Transport-DPURF464.mjs} +1 -1
- package/dist/web-components/viewer/{Transport-6wRUIGiD.mjs → Transport-TvkdinN-.mjs} +1 -1
- package/dist/web-components/viewer/{annotation-collection-eyRpE2h4.mjs → annotation-collection-BwY8uYqa.mjs} +1 -1
- package/dist/web-components/viewer/{annotation-name-DdchUvJI.mjs → annotation-name-DQMCd2DB.mjs} +1 -1
- package/dist/web-components/viewer/{annotations-content-BZXlT3bR.mjs → annotations-content-q11OcPdT.mjs} +1 -1
- package/dist/web-components/viewer/{cloverEngine-CZWHXlyY.mjs → cloverEngine-K2HNl3W1.mjs} +1 -1
- package/dist/web-components/viewer/{content-state-reader-CDV0Igdx.mjs → content-state-reader-BhDMcVmC.mjs} +1 -1
- package/dist/web-components/viewer/{dragToClose-CD-MJb-V.mjs → dragToClose-BFhEkxmf.mjs} +1 -1
- package/dist/web-components/viewer/{fetchManifest-C1IEIf45.mjs → fetchManifest-aJRqlL7Q.mjs} +1 -1
- package/dist/web-components/viewer/{follow-content-IQqCbvbJ.mjs → follow-content-Cy0flRSN.mjs} +1 -1
- package/dist/web-components/viewer/{host-BxQrzQnu.mjs → host-C4OSSUrc.mjs} +1 -1
- package/dist/web-components/viewer/{image-layers-DurrQgfL.mjs → image-layers-BmOyugIr.mjs} +1 -1
- package/dist/web-components/viewer/{image-service-content-ClAm_g0Y.mjs → image-service-content-BuqFuXBZ.mjs} +1 -1
- package/dist/web-components/viewer/index.mjs +1 -1
- package/dist/web-components/viewer/{link-Drdj-HcB.mjs → link-BtdcvLLg.mjs} +1 -1
- package/dist/web-components/viewer/overlayImage-BOilakHT.mjs +1 -0
- package/dist/web-components/viewer/{range-regions-a5eVBfJy.mjs → range-regions-S1HcVfpb.mjs} +1 -1
- package/dist/web-components/viewer/{renderers-CdXzZ9As.mjs → renderers-CetbXlHH.mjs} +1 -1
- package/dist/web-components/viewer/{save-file-B2UBQRXz.mjs → save-file-BohgaD35.mjs} +1 -1
- package/dist/web-components/viewer/{search-BBZKUiMB.mjs → search-C0ZHXQW-.mjs} +1 -1
- package/dist/web-components/viewer/{useControlsVisibility-BfTACzo_.mjs → useControlsVisibility-CmA6PMfv.mjs} +1 -1
- package/dist/web-components/viewer/viewer-BXbkj7DJ.mjs +29 -0
- package/dist/web-components/viewer/{vtt-CCkTp_f2.mjs → vtt-BIJk7HEl.mjs} +1 -1
- package/dist/web-components/{viewer-D-AQ7mGw.mjs → viewer-f_6tefcG.mjs} +1 -1
- package/dist/web-components/{vtt-BjXkNfI_.mjs → vtt-BRwnCWbJ.mjs} +1 -1
- package/package.json +1 -1
- package/dist/web-components/About-Brbhm22a.mjs +0 -1
- package/dist/web-components/AnnotationItems-Dy4BNabL.mjs +0 -1
- package/dist/web-components/CanvasView-CiP25Iqc.mjs +0 -2
- package/dist/web-components/ChaptersMenu-Bne6N9cf.mjs +0 -1
- package/dist/web-components/CollectionSelect-BpvtCwSl.mjs +0 -1
- package/dist/web-components/Connected-BWomgzfE.mjs +0 -1
- package/dist/web-components/ControlsFade-CStkqANR.mjs +0 -1
- package/dist/web-components/Cue-BhXRUDe9.mjs +0 -1
- package/dist/web-components/EntryThumbnail-BnMLzy5M.mjs +0 -1
- package/dist/web-components/FrameAnimation-BcEfAQrI.mjs +0 -1
- package/dist/web-components/Items-DCRr750U.mjs +0 -1
- package/dist/web-components/Label-CVfL9bMO.mjs +0 -1
- package/dist/web-components/Loaded-CSYg8oIR.mjs +0 -1
- package/dist/web-components/LoadedCanvas-W9sCFkdf.mjs +0 -1
- package/dist/web-components/LoadedMap-jx7uEeDg.mjs +0 -1
- package/dist/web-components/MapView-DO23FSrT.mjs +0 -3
- package/dist/web-components/PagerLayout-SNT5cl4D.mjs +0 -1
- package/dist/web-components/PanelPart-DfjlK_hB.mjs +0 -1
- package/dist/web-components/PartOfManifest-BYyflVQI.mjs +0 -1
- package/dist/web-components/Placeholder-Mq1Iaasr.mjs +0 -1
- package/dist/web-components/Position-Bh1Iq4d6.mjs +0 -1
- package/dist/web-components/Scene-CdqC1O-B.mjs +0 -1
- package/dist/web-components/StandaloneItems-CtxMB090.mjs +0 -1
- package/dist/web-components/Timeline-D5oL1UyW.mjs +0 -1
- package/dist/web-components/canvas-CfnKZqTU.mjs +0 -1
- package/dist/web-components/image-layers-CFarmTfZ.mjs +0 -1
- package/dist/web-components/items-BXd02UN6.mjs +0 -1
- package/dist/web-components/label-DcF-YCIN.mjs +0 -1
- package/dist/web-components/logo-DWI0N9FL.mjs +0 -1
- package/dist/web-components/part-B9t8Qe9D.mjs +0 -1
- package/dist/web-components/shared-D2pvbPvF.mjs +0 -1
- package/dist/web-components/thumbnail-By5wfGlE.mjs +0 -1
- package/dist/web-components/viewer/ChaptersMenu-DmJy-cfd.mjs +0 -1
- package/dist/web-components/viewer/ControlsFade-CuooJOpa.mjs +0 -1
- package/dist/web-components/viewer/EntryThumbnail-P6CmjmO9.mjs +0 -1
- package/dist/web-components/viewer/MapView-BO2ppZpW.mjs +0 -3
- package/dist/web-components/viewer/PanelPart-CaxBca8z.mjs +0 -1
- package/dist/web-components/viewer/StandaloneItems-CBRWUCNf.mjs +0 -1
- package/dist/web-components/viewer/overlayImage-CDT5ohRo.mjs +0 -1
- package/dist/web-components/viewer/viewer-BrkFZVo_.mjs +0 -29
|
@@ -1 +1 @@
|
|
|
1
|
-
import{T as d,
|
|
1
|
+
import{T as d,af as qt,f as bt,d as C,aM as Gt,q as k,A as l,E as jt,y as z,_ as It,u as zt}from"./shared-ByrLMUQa.mjs";import{w as Dt,p as Ot,g as xt,t as Jt,A as Ut}from"./Annotations-DBxLDLDf.mjs";import{h as Xt}from"./layout-zjkkOHIj.mjs";const Yt=()=>import("./svg-shape-D1K-WNrY.mjs");function Zt(w){var S;const c=d(()=>!!(w!=null&&w.some(({annotation:s})=>{var p;return(p=qt(s==null?void 0:s.target))==null?void 0:p.svg})),[w]);return((S=bt(Yt,c))==null?void 0:S.readSvgShape)??null}const M=[];function Et({given:w,annotations:c,scene:S,renderer:s,sceneVersion:p,drawn:E,media:I,mediaElement:f,showPlaceholder:F,canvasKey:D,openImages:tt,openMedia:et,host:nt,onModel:H,refind:_=0}){const{canvases:g,language:v,hiddenPages:rt,unlistedPages:yt,onPageVisibilityChange:ct,onAnnotationActive:ut,selectedAnnotation:st,animateAnnotations:ot=false,highlightedAnnotation:Ct,onAnnotationSelect:lt,onAnnotationLink:J}=w,[B,Ft]=C([]),[it,Ht]=C([]),L=rt!==void 0,dt=d(()=>{var n;if(L)return M;const t=new Map;for(const r of c){if(!r.pageId)continue;const o=!(Number((n=g==null?void 0:g[r.targetIndex])==null?void 0:n.duration)>0)&&Gt(r.annotation.motivation,qt(Array.isArray(r.annotation.target)?r.annotation.target[0]:r.annotation.target));t.set(r.pageId,(t.get(r.pageId)??true)&&o)}const e=[...t].filter(([,r])=>r).map(([r])=>r);return e.length?e:M},[L,c,g]),_t=d(()=>{const t=dt.filter(e=>!it.includes(e)&&!B.includes(e));return t.length?[...B,...t]:B},[B,it,dt]),a=rt??_t,U=yt??M,N=k(t=>U.length?t.filter(e=>!e.pageId||!U.includes(e.pageId)):t,[U]),gt=d(()=>N(c).length,[c,N]),T=k(t=>a.length?t.filter(e=>!e.pageId||!a.includes(e.pageId)):t,[a]),Q=l(ct);Q.current=ct;const R=k((t,e)=>{var n;(n=Q.current)==null||n.call(Q,t,e),!L&&(Ft(r=>{const i=r.filter(o=>!t.includes(o));return e?i:[...i,...t]}),Ht(r=>{const i=r.filter(o=>!t.includes(o));return e?[...i,...t]:i}))},[L]),ft=d(()=>Dt(T(c),g),[c,T,g]),O=d(()=>{if(!(!S||!g))return(t,e,n)=>{const r=g.findIndex(Wt=>Wt.id===e),i=r===-1?n:r,o=S.placements[i];return o?Xt(g[i],o,t):null}},[S,g]),W=Zt(c),P=d(()=>s&&p>0&&E?Ot(c,O??((t,e,n)=>s.itemRectToWorld(n,t)),W,v):[],[s,c,p,E,O,W,v]),x=d(()=>T(P),[P,T]),X=d(()=>P.length||!O?P:Ot(c,O,W,v),[P,O,c,W,v]),[Bt,Lt]=C(null),[Nt,pt]=C(null),u=st!==void 0?st:Nt,A=l(null),h=l(ut);h.current=ut;const m=l(lt);m.current=lt;const Y=k(t=>{var e;Lt(t),(e=h.current)==null||e.call(h,t)},[]),Z=l(ot);Z.current=ot;const at=l(false);at.current=F;const $=l(f);$.current=f;const Pt=l(s);Pt.current=s;const q=l(null),ht=l(a);ht.current=a;const mt=l(R);mt.current=R;const V=k((t,e=true)=>{var n,r,i;if(t.pageId&&ht.current.includes(t.pageId)&&mt.current([t.pageId],true),pt(t.id),(n=h.current)==null||n.call(h,t.id),(r=m.current)==null||r.call(m,t.id),!at.current){if("start"in t){const o=$.current;if(!o)return;q.current=t.id,e?jt(o,t.start):o.currentTime=t.start;return}if(A.current=t.id,t.track){const o=$.current;o&&xt(t,o)&&(q.current=t.id);return}(i=Pt.current)==null||i.fitAnnotation(t.world,!Z.current)}},[]),wt=l(u);wt.current=u;const b=k(()=>{var t;return wt.current?(pt(null),A.current=null,(t=m.current)==null||t.call(m,null),true):false},[]),G=l(J);G.current=J;const St=!!J,Qt=d(()=>St?t=>{var e,n;(e=nt.current)==null||e.focus({preventScroll:true}),b(),t.link&&((n=G.current)==null||n.call(G,t.link))}:void 0,[St,b,nt]),vt=l(_);z(()=>{if(!u){A.current=null;return}if(vt.current!==_&&(vt.current=_,A.current=null),A.current===u)return;const t=r=>r.find(i=>i.id===u),e=t(x),n=e??t(P);if(n){if(A.current=n.id,n.track){!e&&f&&xt(n,f);return}s==null||s.fitAnnotation(n.world,!Z.current)}},[u,x,P,f,s,_]);const y=d(()=>I?Jt(c,v):[],[I,c,v]),j=d(()=>T(y),[y,T]),Tt=d(()=>N(y.length?[...X,...y]:X),[X,y,N]);z(()=>{if(!u){q.current=null;return}if(q.current===u||!f)return;const t=j.find(e=>e.id===u);t&&(q.current=t.id,f.currentTime=t.start)},[u,j,f]);const K=l(null),[At,Rt]=C(null);z(()=>{K.current=u??null},[u]),z(()=>{const t=K.current;if(!(!t||!c.some(e=>{var n;return((n=e.annotation)==null?void 0:n.id)===t}))&&(K.current=null,!!F)){if(!I){tt(true);return}et(D),Rt(D)}},[u,c,F,I,D,tt,et]);const kt=d(()=>({menu:Tt,placed:x,timed:j,hiddenPages:a,setPagesVisible:R,listedCount:gt,comments:ft,selected:u??null,select:V,activate:Y,release:b,quietlyOpened:At}),[Tt,x,j,a,R,gt,ft,u,V,Y,b,At]);return It(()=>H(kt),[kt,H]),It(()=>()=>H(null),[H]),s&&p>0&&!F?zt(Ut,{renderer:s,placed:x,sceneVersion:p,active:Bt??Ct??u,selected:u,onActivate:Y,onSelect:V,onFollow:Qt,media:I?f:void 0}):null}export{Et as AnnotationState};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{u as s,D as lt,a as Z,e as z,c as q,s as Ct,n as Nt,o as $t,R as rt,r as At,t as V,w as Mt,B as dt,E as Et,b as ut,F as ht,T,d as tt,A as Tt,y as X,G as _,l as O,H as Ot,I as Bt,v as qt,k as it,f as yt}from"./shared-
|
|
1
|
+
import{u as s,D as lt,a as Z,e as z,c as q,s as Ct,n as Nt,o as $t,R as rt,r as At,t as V,w as Mt,B as dt,E as Et,b as ut,F as ht,T,d as tt,A as Tt,y as X,G as _,l as O,H as Ot,I as Bt,v as qt,k as it,f as yt}from"./shared-ByrLMUQa.mjs";import{E as Pt}from"./EntryBodies-Bld2RXeE.mjs";import{u as Rt,L as Vt}from"./ListEnd-KSoUQrsM.mjs";import{a as Ft}from"./annotation-name-DhMF4ZHj.mjs";import{r as Ht,a as jt}from"./link-CrNaByf-.mjs";import{s as Gt}from"./show-link-BqrJDDMV.mjs";import{f as Kt,r as Wt}from"./fetchManifest-Cp7c8vs5.mjs";import{j as mt}from"./classnames-DukgfdpI.mjs";import{b as ct,s as _t}from"./bringIntoView-CQH5ZgMM.mjs";import{a as Y}from"./heading-Cjt0f-Eu.mjs";import{C as zt}from"./Cue-B1IlY4Ae.mjs";import{E as Dt}from"./EntryThumbnail-C5df3CaH.mjs";import{H as ft}from"./HideToggle-nvJtMFOZ.mjs";import{u as gt,c as vt}from"./readingLanguages-B20n_dkw.mjs";import{L as pt}from"./LanguageChoice-t55qbd8x.mjs";import"./styles-BOXm_R8o.mjs";function Ut(){return s("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512","aria-hidden":"true",focusable:"false",fill:"none",stroke:"currentColor",strokeWidth:"48",strokeLinecap:"round",strokeLinejoin:"round",children:s("path",{d:"M224 96h-96a48 48 0 0 0-48 48v240a48 48 0 0 0 48 48h240a48 48 0 0 0 48-48v-96M304 80h128v128M432 80 240 272"})})}function bt(n){const o=n.bodies.filter(e=>{var u;return!e.image&&((u=e.value)==null?void 0:u.trim())}).map(e=>e.language).filter(e=>!!e&&e!=="none");return[...new Set(o)]}function xt(n){const o=n.map(bt),e=[...new Set(o.flat())];return e.length<2?[]:o.some(a=>a.length&&e.some(c=>!a.includes(c)))?e:[]}function St(n,o){if(!o)return true;const e=bt(n);return!e.length||e.includes(o)}const Jt=[],kn=lt(function({scope:o="all",renderEntry:e,headingLevel:u=3,as:a="div",className:c,...h},l){const{t:r,langOf:m}=Z(),{clover:d,language:S}=z("Annotations"),L=q(t=>Ct(t.manifest,t.addedSets)),N=q(t=>Nt(t.manifest,t.canvasId)),M=q(t=>$t(t.manifest,t.addedSets,t.hiddenSets,t.shownSets)),b=q(t=>t.annotationId),$=rt.useSyncExternalStore(d.highlight.subscribe,d.highlight.get,d.highlight.get),f=t=>{const v=Mt(L,t),x=v&&dt(v.target.t),P=d.media.get();x&&P&&N.some(F=>F.id===v.canvasId)&&Et(P,x.start),d.selectAnnotation(t)},I=q(t=>o==="all"?At(t.manifest):Jt),w=Rt(I),k=t=>t.entries.filter(v=>N.some(x=>x.id===v.canvasId)),A=L.map(t=>({set:t,entries:k(t)})).filter(({entries:t})=>t.length),C=Y(u),y={text:r("annotationsShow"),lang:m("annotationsShow")};return o==="all"?s(tn,{ref:l,as:a,className:c,rest:h,sets:L,shown:N.map(t=>t.id),headingLevel:u,language:S,showLabel:y,hiddenSets:M,selected:b,highlighted:$,renderEntry:e,onSelect:f,onHighlight:t=>d.highlight.emit(t),onVisible:(t,v)=>t.forEach(x=>d.setSetVisible(x,v)),end:w.more&&s(Vt,{onReached:w.reachNext})}):A.length?s(a,{ref:l,className:mt("clover-annotations",c),...h,children:A.map(({set:t,entries:v})=>s(Qt,{set:t,entries:v,canvases:N,Heading:C,headingLevel:u,language:S,title:V(t.label,S),showLabel:y,hidden:M.includes(t.id),selected:b,highlighted:$,renderEntry:e,onSelect:f,onHighlight:x=>d.highlight.emit(x),onVisible:x=>d.setSetVisible(t.id,x)},t.id))}):null});function Qt({set:n,entries:o,canvases:e,Heading:u,headingLevel:a,title:c,language:h,showLabel:l,hidden:r,selected:m,highlighted:d,renderEntry:S,onSelect:L,onHighlight:N,onVisible:M}){const b=ut(),$=c.text?a+1:a,f=T(()=>xt(o),[o]),[I,w]=tt(),k=gt(),A=vt(k,f),C=A?_(f,k.chosen):_(f,(k==null?void 0:k.chosen)??h,I),y=o.filter(t=>St(t,C));return s("section",{className:"clover-annotations-set","aria-labelledby":c.text?`${b}-title`:void 0,"data-set":n.id,children:[s("div",{className:"clover-annotations-set-header",children:[c.text&&s(u,{className:"clover-annotations-title",id:`${b}-title`,...O(c.lang),children:c.text}),C&&!A&&s(pt,{languages:f,chosen:C,onChange:w,nameKey:"annotationsLanguage",part:"clover-annotations"}),s(ft,{hidden:r,onChange:t=>M(!t),of:c.text?`${b}-title`:void 0})]}),s("ol",{className:"clover-annotations-list",children:y.map((t,v)=>s(wt,{entry:t,canvas:e.find(x=>x.id===t.canvasId),index:v,headingLevel:$,language:h,showLabel:l,selected:t.id===m,highlighted:t.id===d,renderEntry:S,onSelect:L,onHighlight:N},t.id))})]})}function Xt(n,o,e){const u=new Map(o.map((c,h)=>[c.id,h])),a=new Map;for(const c of n){const h=V(c.label,e),l=h.text;let r=a.get(l);r||(r={title:h,setIds:[],byCanvas:new Map},a.set(l,r)),r.setIds.push(c.id);for(const m of c.entries){const d=r.byCanvas.get(m.canvasId)??[];d.push(m),r.byCanvas.set(m.canvasId,d)}}return[...a.entries()].map(([c,h])=>({key:c,title:h.title,setIds:h.setIds,canvases:Yt([...h.byCanvas.entries()],u).map(([l,r])=>{var m;return{canvasId:l,label:V((m=o.find(d=>d.id===l))==null?void 0:m.label,e),entries:r}})}))}function Yt(n,o){return n.every(([e])=>o.has(e))?n.sort(([e],[u])=>o.get(e)-o.get(u)):n}function Zt(n,o){const{clover:e,language:u}=z("Annotations"),a=T(()=>{const l=new Set;for(const r of n)for(const m of r.canvases){if(o.has(m.canvasId))continue;const d=Ot(m.entries[0].annotation);d&&l.add(d)}return[...l]},[n,o]),[c,h]=tt([]);return X(()=>{let l=true;return Promise.all(a.map(r=>Kt(e,r))).then(r=>l&&h(r.filter(m=>!!m))),()=>{l=false}},[e,a]),T(()=>{const l=new Map;for(const r of c){const{canvases:m}=ht(r),d=V(r.label,u);for(const S of m){const L=V(S.label,u);l.set(S.id,{canvas:S,label:m.length>1&&L.text?[d,L]:[d]})}}return{named:a.length>0,of:l}},[c,a,u])}const tn=lt(function({as:o,className:e,rest:u,sets:a,shown:c,headingLevel:h,language:l,showLabel:r,hiddenSets:m,selected:d,highlighted:S,renderEntry:L,onSelect:N,onHighlight:M,onVisible:b,end:$},f){const I=ut(),w=q(i=>ht(i.manifest).canvases),k=T(()=>Xt(a,w,l),[a,w,l]),A=T(()=>new Map(w.map(i=>[i.id,i])),[w]),C=Zt(k,A),[y,t]=tt({}),v=gt(),x=q(i=>{var g;return(g=i.manifest)==null?void 0:g.label}),P=T(()=>V(x,l),[x,l]),F=w.length>1||C.named,G=Tt(null),nt=()=>{const i=G.current;if(!i||!i.getClientRects().length)return true;const g=_t(i)??i;return g.matches(":hover")||g.contains(document.activeElement)},kt=c.join(`
|
|
2
2
|
`);return X(()=>{const i=G.current;if(!i||!F||nt())return;const g=c.map(D=>i.querySelector(`[data-canvas="${CSS.escape(D)}"]`)).find(Boolean);if(!g)return;const B=g.closest(".clover-annotations-set"),H=(B==null?void 0:B.querySelector("[data-canvas]"))===g;ct(H&&B?B:g,"start")},[kt]),X(()=>{const i=G.current;if(!i||!d||nt())return;const g=i.querySelector(`[data-entry="${CSS.escape(d)}"]`);g&&ct(g,"nearest")},[d]),k.length?s(o,{ref:i=>{G.current=i,typeof f=="function"?f(i):f&&(f.current=i)},className:mt("clover-annotations",e),"data-scope":"all",...u,children:[k.map((i,g)=>{const B=Y(h),H=i.title.text?h+1:h,D=Y(H),Lt=i.setIds.every(p=>m.includes(p)),K=xt(i.canvases.flatMap(p=>p.entries)),et=vt(v,K),U=et?_(K,v.chosen):_(K,(v==null?void 0:v.chosen)??l,y[i.key]);return s("section",{className:"clover-annotations-set","aria-labelledby":i.title.text?`${I}-${g}`:void 0,children:[s("div",{className:"clover-annotations-set-header",children:[i.title.text&&s(B,{className:"clover-annotations-title",id:`${I}-${g}`,...O(i.title.lang),children:i.title.text}),U&&!et&&s(pt,{languages:K,chosen:U,onChange:p=>t(J=>({...J,[i.key]:p})),nameKey:"annotationsLanguage",part:"clover-annotations"}),s(ft,{hidden:Lt,onChange:p=>b(i.setIds,!p),of:i.title.text?`${I}-${g}`:void 0})]}),i.canvases.map((p,J)=>{var at;const st=p.entries.filter(E=>St(E,U));if(!st.length)return null;const j=C.of.get(p.canvasId),R=j?j.label:C.named&&P.text?w.length>1&&p.label.text?[P,p.label]:[P]:[p.label],Q=F&&!!((at=R[0])!=null&&at.text),It=F&&c.includes(p.canvasId),ot=`${I}-${g}-${J}`;return s("section",{className:"clover-annotations-canvas","data-canvas":p.canvasId,"aria-labelledby":Q?ot:void 0,"aria-current":It?"true":void 0,children:[Q&&s(D,{className:"clover-annotations-canvas-label",id:ot,...O(R.length===1?R[0].lang:void 0),children:R.length===1?R[0].text:R.map((E,W)=>s(rt.Fragment,{children:[W>0&&", ",s("span",{...O(E.lang),children:E.text})]},W))}),s("ol",{className:"clover-annotations-list",children:st.map((E,W)=>s(wt,{entry:E,canvas:A.get(p.canvasId)??(j==null?void 0:j.canvas),index:W,headingLevel:Q?H+1:H,language:l,showLabel:r,selected:E.id===d,highlighted:E.id===S,renderEntry:L,onSelect:N,onHighlight:M},E.id))})]},p.canvasId)})]},i.key)}),$]}):null});function nn(n,o){const e=n.target.rect?void 0:n.target.svg,u=yt(en,!!e);return T(()=>{var h,l;const a=e?(h=u==null?void 0:u.readSvgShape(e))==null?void 0:h.box:void 0,c=n.target.rect??(a?{x:a.x,y:a.y,w:a.width,h:a.height}:void 0);return!c||!o||n.bodies.some(r=>r.image)?null:Wt(o,c,(l=n.layer)==null?void 0:l.image)},[n,o,e,u])}const en=()=>import("./svg-shape-D1K-WNrY.mjs");function wt({entry:n,canvas:o,index:e,headingLevel:u,language:a,showLabel:c,selected:h,highlighted:l,renderEntry:r,onSelect:m,onHighlight:d}){const{hostLanguage:S,t:L,langOf:N}=Z(),M=on(n,a),b=M.text?M:{text:String(e+1)},$=dt(n.target.t),f=$?{text:L("annotationsShowTime"),lang:N("annotationsShowTime")}:c,I=!f.lang&&!Bt(b.lang,S),w=b.text?`${f.text}: ${b.text}`:f.text,{clover:k}=z("Annotations"),A=nn(n,o);return s("li",{className:"clover-annotations-entry","data-entry":n.id,"data-selected":h,"data-highlighted":l,onMouseEnter:()=>d(n.id),onMouseLeave:()=>d(null),onFocus:()=>d(n.id),onBlur:()=>d(null),onClick:C=>{C.target.closest("a, button")||m(n.id)},children:[$&&s(zt,{start:$.start,className:"clover-annotations-time"}),s(Dt,{className:"clover-annotations-thumbnail",source:A,request:k.request}),s("div",{className:"clover-annotations-body clover-cue-text",children:[r?r(n):s(Pt,{bodies:n.bodies,language:a,headingLevel:u}),s(sn,{annotation:n.annotation})]}),s("button",{type:"button",className:"clover-annotations-show","aria-pressed":h,"aria-label":I?w:void 0,style:qt,onClick:()=>m(n.id),children:!I&&s(it,{children:[s("span",{...O(f.lang),children:[f.text,b.text&&":"]}),b.text&&s(it,{children:[" ",s("span",{...O(b.lang),children:b.text})]})]})})]})}function sn({annotation:n}){const{clover:o}=z("Annotations"),{t:e,langOf:u}=Z(),a=T(()=>Ht(n)??jt(n),[n]);if(!a)return null;const c=e("annotationsOpenLink"),h=u("annotationsOpenLink");return!a.canvasId&&!a.manifestId?s("a",{className:"clover-annotations-link",href:a.id,target:"_blank",rel:"noopener noreferrer",...O(h),children:[c,s(Ut,{})]}):s("button",{type:"button",className:"clover-annotations-link",...O(h),onClick:l=>{var m;const r=l.currentTarget.closest(".clover-root");Gt(o,a)&&((m=r==null?void 0:r.querySelector(".clover-canvas-viewport"))==null||m.focus({preventScroll:true}))},children:c})}function on(n,o){const{text:e="",lang:u}=Ft(n.bodies,o);return{text:e.slice(0,120),...u?{lang:u}:{}}}export{kn as Annotations};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var Q=Object.defineProperty;var tt=(t,o,e)=>o in t?Q(t,o,{enumerable:true,configurable:true,writable:true,value:e}):t[o]=e;var B=(t,o,e)=>tt(t,typeof o!="symbol"?o+"":o,e);import{ae as q,aM as ot,af as D,B as W,T as et,A as L,y as j,q as S,_ as nt,$ as st,u as C,k as it,aN as rt,t as at,d as Z,l as ct,R as lt}from"./shared-D2pvbPvF.mjs";import{a as ht}from"./annotation-name-BhbhOgES.mjs";import{r as ut}from"./link-q4quIuuD.mjs";import{T as dt}from"./Tip-Dv-gYN8n.mjs";import{c as pt}from"./Camera-BlbXBgYZ.mjs";import"./styles-Bf3qmdsh.mjs";const K=t=>Array.isArray(t)?t.flatMap(K):ot.includes(t==null?void 0:t.type)?K(t.items??[]):t==null?[]:[t],ft=t=>K(t).map(o=>q(o)),gt=(t,o)=>Math.abs(t.end-o.start)<.001,H=(t,o,e)=>t+(o-t)*e;function vt(t){const o=[...t].sort((e,n)=>e.start-n.start);return o.map((e,n)=>{const i=o[n+1];return e.end===1/0&&i?{...e,end:i.start}:e})}function U(t,o){let e=0,n=t.length-1,i=-1;for(;e<=n;){const d=e+n>>1;t[d].start<=o?(i=d,e=d+1):n=d-1}const r=t[i];if(!r||o>=r.end)return null;const c=t[i+1];if(!c||!gt(r,c)||!Number.isFinite(r.end))return r.world;const a=(o-r.start)/(r.end-r.start||1),[h,l]=[r.world,c.world];return{x:H(h.x,l.x,a),y:H(h.y,l.y,a),width:H(h.width,l.width,a),height:H(h.height,l.height,a)}}const G=t=>t.overlays??(t.overlays=new wt(t.host));class wt{constructor(o){B(this,"container");B(this,"overlays",new Map);B(this,"view");const e=document.createElement("div");e.className="clover-canvas-overlays",Object.assign(e.style,{position:"absolute",inset:"0",overflow:"clip",pointerEvents:"none"}),o.appendChild(e),this.container=e}add(o,e){return this.overlays.set(o,e),o.classList.add("clover-canvas-overlay"),Object.assign(o.style,{position:"absolute",top:"0",left:"0",pointerEvents:"auto"}),o.parentElement!==this.container&&this.container.appendChild(o),()=>{this.overlays.delete(o)}}move(o,e){this.overlays.has(o)&&(this.overlays.set(o,e),this.view&&this.position(...this.view,o))}position(o,e,n){this.view=[o,e];const i=o.rotation*180/Math.PI,r=Math.cos(o.rotation)>.9999,c=r?window.devicePixelRatio||1:0,a=h=>c?Math.round(h*c)/c:h;for(const[h,l]of this.overlays){if(n&&h!==n)continue;const d=pt(o,e,{x:l.x+l.width/2,y:l.y+l.height/2}),f=a(d.x-l.width*o.zoom/2),g=a(d.y-l.height*o.zoom/2),p=a(l.width*o.zoom),v=a(l.height*o.zoom);h.style.width=`${p}px`,h.style.height=`${v}px`,h.style.transform=`translate(${f}px, ${g}px)`+(i?` rotate(${i}deg)`:"");const{style:w,dataset:m}=h;if(r){w.setProperty("--clover-overlay-x",`${d.x}px`),w.setProperty("--clover-overlay-top",`${g}px`),w.setProperty("--clover-overlay-bottom",`${g+v}px`);const $=d.y>e.height/2?"above":"below";m.overlayRoom!==$&&(m.overlayRoom=$)}else w.removeProperty("--clover-overlay-x"),w.removeProperty("--clover-overlay-top"),w.removeProperty("--clover-overlay-bottom"),delete m.overlayRoom}}dispose(){this.overlays.clear(),this.container.remove()}}const mt=t=>"start"in t,Nt=t=>{var o,e;return mt(t)?t.start:(e=(o=t.track)==null?void 0:o[0])==null?void 0:e.start},xt=(t,o)=>!t.track||U(t.track,o)!==null;function $t(t,o){return xt(t,o.currentTime)?false:(o.currentTime=t.track[0].start,true)}function yt(t,o,e){var r,c,a;const n=ft(t==null?void 0:t.target);if(!((r=n[0])!=null&&r.rect)||!((c=n[0])!=null&&c.t))return null;const i=[];for(const h of n){const l=W((a=h.t)==null?void 0:a.replace(/^npt:/,""));if(!h.rect||!l)continue;const{x:d,y:f,w:g,h:p}=h.rect,v=o({x:d,y:f,width:g,height:p},h.id,e);v&&i.push({start:l.start,end:l.end??1/0,world:v})}return i.length?vt(i):null}function X(t,o){const{text:e,lang:n}=at(t,o);return e?{page:{text:e,...n?{lang:n}:{}}}:{}}function St(t,o){var n;const e=[];for(const{annotation:i,pageLabel:r,pageId:c}of t){const a=q([i==null?void 0:i.target].flat()[0]),h=W((n=a==null?void 0:a.t)==null?void 0:n.replace(/^npt:/,""));if(!h||a.rect||a.point||a.svg)continue;const{text:l,lang:d}=Y(i,o);e.push({id:i.id,...l?{label:l}:{},...d?{lang:d}:{},...h,...X(r,o),...c?{pageId:c}:{}})}return e}const N=40;function qt(t,o,e=null,n){var r;const i=[];for(const{annotation:c,targetIndex:a,pageLabel:h,pageId:l,place:d}of t){const f=q(c==null?void 0:c.target);if(!f)continue;let g=null,p;const v=yt(c,o,a);if(v){const{x:s,y:u,w:k,h:R}=f.rect;g={x:s,y:u,width:k,height:R}}else if(f.rect){const{x:s,y:u,w:k,h:R}=f.rect;g={x:s,y:u,width:k,height:R}}else if(f.point){const{x:s,y:u}=f.point;g={x:s-N/2,y:u-N/2,width:N,height:N},p={kind:"point"}}else if(f.svg&&e){const s=e(f.svg);s&&(g=s.box,p={kind:"svg",svg:s})}if(!g)continue;const w=v?v[0].world:o(g,f.id,a);if(!w)continue;const{text:m,lang:$}=Y(c,n),P=ut(c),T=(r=D(c).find(s=>(s==null?void 0:s.type)==="Image"&&/^https?:\/\//i.test(s.id??"")))==null?void 0:r.id;i.push({id:c.id,label:m,...$?{lang:$}:{},world:w,...p?{shape:p}:{},...v?{track:v}:{},...P?{link:P}:{},...T?{image:T}:{},...X(h,n),...l?{pageId:l}:{},...d?{place:d}:{}})}return i}const V=({world:t})=>t.width*t.height,kt=(t,o)=>t.x>=o.x&&t.y>=o.y&&t.x+t.width<=o.x+o.width&&t.y+t.height<=o.y+o.height,y=t=>String(Math.round(t*1e3)/1e3||0);function bt(t,o){var g,p;const e=t.world,n=o.world;if(((g=o.shape)==null?void 0:g.kind)==="point"||n.x>=e.x+e.width||n.x+n.width<=e.x||n.y>=e.y+e.height||n.y+n.height<=e.y)return null;const[i,r]=[e.width,e.height],[c,a]=[n.x-e.x,n.y-e.y],h=`${y(-i/10)} ${y(-r/10)} ${y(i*1.2)} ${y(r*1.2)}`,l=`M${y(-i/10)} ${y(-r/10)}h${y(i*1.2)}v${y(r*1.2)}h${y(-i*1.2)}Z`;let d;if(((p=o.shape)==null?void 0:p.kind)==="svg"){const{box:v,shapes:w}=o.shape.svg,m=w.map(({tag:$,attributes:P})=>`<${$} ${Object.entries(P).map(([T,s])=>`${T}="${s}"`).join(" ")}/>`).join("");d=`<mask id="m"><path fill="#fff" d="${l}"/><svg x="${y(c)}" y="${y(a)}" width="${y(n.width)}" height="${y(n.height)}" viewBox="${v.x} ${v.y} ${Math.max(v.width,1)} ${Math.max(v.height,1)}" preserveAspectRatio="none" overflow="visible"><g fill="#000">${m}</g></svg></mask><path d="${l}" mask="url(#m)"/>`}else d=`<path fill-rule="evenodd" d="${l}M${y(c)} ${y(a)}h${y(n.width)}v${y(n.height)}h${y(-n.width)}Z"/>`;const f=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="${h}" preserveAspectRatio="none">${d}</svg>`;return`url("data:image/svg+xml,${encodeURIComponent(f)}")`}const Kt=({renderer:t,placed:o,sceneVersion:e,active:n,selected:i,onActivate:r,onSelect:c,onFollow:a,media:h})=>{const l=et(()=>{const s=new Map;return[...o].sort((u,k)=>V(k)-V(u)).forEach((u,k)=>s.set(u,k)),s},[o]),d=o.find(s=>s.id===n),f=L(null);j(()=>{const s=o.find(u=>u.id===i&&u.track);i||(f.current=null),!(!s||!h||f.current===i)&&(f.current=i,$t(s,h))},[o,i,h]);const g=s=>{const u=l.get(s)??0;return d?s===d?o.length:u>(l.get(d)??0)&&!s.track&&!d.track&&kt(s.world,d.world)?o.length+1+u:u:u},p=L(new Map),v=L(new Map),w=L(new WeakMap),m=L({placed:o,current:d,depthOf:g});m.current={placed:o,current:d,depthOf:g};const $=S(s=>{const{placed:u,current:k,depthOf:R}=m.current,O=M=>v.current.get(M.id),x=k&&O(k)!==null?k:void 0,b=M=>{const A=p.current.get(M.id);if(!A)return;const F=O(M),I=x&&M!==x&&F!==null&&R(M)<u.length?bt({...M,world:F??M.world},{...x,world:O(x)??x.world}):null;(w.current.get(A)??"")!==(I??"")&&(w.current.set(A,I??""),I?A.style.setProperty("--clover-annotation-mask",I):A.style.removeProperty("--clover-annotation-mask"))};s&&s!==k?b(s):u.forEach(b)},[]);nt(()=>$());const P=S((s,u)=>{u?p.current.set(s,u):p.current.delete(s)},[]),T=S((s,u)=>{v.current.set(s.id,u),$(s)},[$]);return st(C(it,{children:o.map((s,u)=>C(Tt,{entry:s,name:s.label??String(u+1),lang:s.label?s.lang:void 0,depth:g(s),register:P,onMove:T,renderer:t,active:n===s.id,selected:i===s.id,onActivate:r,onSelect:c,onFollow:a,media:h},`${s.id}|${e}`))}),G(t).container)};let Mt;const _=()=>Mt??(Mt=import("./panClearOfControls-Cn2ZXsZi.mjs")),Tt=({entry:t,name:o,lang:e,depth:n,register:i,onMove:r,renderer:c,active:a,selected:h,onActivate:l,onSelect:d,onFollow:f,media:g})=>{var A,F,I;const[p,v]=Z(null),{id:w,place:m}=t,$=m&&`${m.index} / ${m.total}`,P=S(E=>{v(E),i(w,E)},[w,i]),{x:T,y:s,width:u,height:k}=t.world;j(()=>{if(!p)return;const E=G(c).add(p,{x:T,y:s,width:u,height:k});return c.invalidate(),E},[p,c,T,s,u,k]);const R=Et(p,t.track,c,g,()=>l(null),E=>r(t,E)),{link:O}=t,x=O&&!O.canvasId&&!O.manifestId?O.id:void 0,b=O&&!x&&f?()=>f(t):void 0;return C(x?"a":"button",{ref:P,...x?{href:x,target:"_blank",rel:"noopener noreferrer"}:{type:"button"},id:t.id,className:"clover-canvas-annotation",hidden:!R,"data-active":a?"true":"false","data-shape":((A=t.shape)==null?void 0:A.kind)??"rect","data-track":t.track?"":void 0,"data-link":x||b?"true":void 0,"aria-label":$?`${o} ${$}`:o,"aria-current":h?"true":void 0,...ct(e),style:{"--clover-annotation-depth":n},onMouseEnter:()=>l(t.id),onMouseLeave:()=>l(null),onFocus:()=>{l(t.id),_()},onKeyUp:E=>{if(E.key!=="Tab")return;const z=E.currentTarget;_().then(({panClearOfControls:J})=>{document.activeElement===z&&J(c,z)})},onBlur:()=>l(null),onKeyDown:At,onClick:E=>{E.stopPropagation(),!x&&(b?b():d(t))},children:[((F=t.shape)==null?void 0:F.kind)==="point"&&C("span",{className:"clover-canvas-annotation-point","aria-hidden":"true"}),((I=t.shape)==null?void 0:I.kind)==="svg"&&C(Ot,{svg:t.shape.svg}),C(dt,{label:o,scrolls:true,image:t.image,after:$})]})};function Et(t,o,e,n,i,r){const c=!!o&&n!==void 0,[a,h]=Z(()=>!c||(n?U(o,n.currentTime)!==null:false)),l=L(i);l.current=i;const d=L(r);return d.current=r,j(()=>{if(!o||n===void 0){h(true);return}if(!n){h(false);return}let f;const g=x=>{var A,F,I;const b=U(o,x);b&&t&&((A=e.overlays)==null||A.move(t,b)),d.current(b);const M=b!==null;if(M!==f){if(f=M,!M&&t){const E=t.matches(":hover");t.contains(document.activeElement)?(I=(F=e.overlays)==null?void 0:F.container.parentElement)==null||I.focus({preventScroll:true}):E&&l.current()}h(M)}},p=n,v=()=>typeof p.requestVideoFrameCallback=="function"&&p.videoWidth>0;let w=0,m=0;const $=(x,{mediaTime:b})=>{g(b),m=p.requestVideoFrameCallback($)},P=()=>{g(n.currentTime),w=requestAnimationFrame(P)},T=()=>{cancelAnimationFrame(w),m&&p.cancelVideoFrameCallback(m),w=m=0},s=()=>{T(),v()?m=p.requestVideoFrameCallback($):w=requestAnimationFrame(P)},u=()=>g(n.currentTime),k=()=>n.paused&&u(),R=()=>{T(),u()},O=[["play",s],["pause",R],["ended",R],["seeking",u],["seeked",u],["loadeddata",u],["timeupdate",k]];return O.forEach(([x,b])=>n.addEventListener(x,b)),u(),n.paused||s(),()=>{T(),O.forEach(([x,b])=>n.removeEventListener(x,b))}},[t,o,n,e]),a}const Ot=({svg:t})=>{const{x:o,y:e,width:n,height:i}=t.box,r=t.shapes.map(({tag:c,attributes:a},h)=>lt.createElement(c,{key:h,...a,vectorEffect:"non-scaling-stroke"}));return C("svg",{className:"clover-canvas-annotation-shape",viewBox:`${o} ${e} ${Math.max(n,1)} ${Math.max(i,1)}`,preserveAspectRatio:"none","aria-hidden":"true",focusable:"false",children:[C("g",{children:r}),C("g",{children:r}),C("g",{children:r})]})};function Y(t,o){return ht(rt(t),o)}const Pt={ArrowDown:()=>32,ArrowUp:()=>-32,PageDown:t=>t.clientHeight-32,PageUp:t=>32-t.clientHeight,End:t=>t.scrollHeight,Home:t=>-t.scrollHeight};function At(t){const o=t.currentTarget.querySelector(":scope > .clover-tip"),e=Pt[t.key];if(!o||!e||t.altKey||t.ctrlKey||t.metaKey)return false;const n=e(o);return(n>0?o.scrollHeight-o.clientHeight-o.scrollTop:o.scrollTop)<1?false:(t.preventDefault(),o.scrollBy({top:n}),true)}function Ut(t,o){const e=new Map;for(const{annotation:n,targetIndex:i}of t??[]){const r=q([n==null?void 0:n.target].flat()[0]);if(r.rect||r.point||r.svg||r.t||!D(n).some(a=>typeof(a==null?void 0:a.value)=="string"||(a==null?void 0:a.type)==="Image"))continue;const c=(o==null?void 0:o.find(a=>a.id===r.id))??(r.id||o==null?void 0:o[i]);c&&e.set(c.id,[...e.get(c.id)??[],n])}return e}export{Kt as A,$t as g,qt as p,Nt as s,St as t,Ut as w};
|
|
1
|
+
var Q=Object.defineProperty;var tt=(t,o,e)=>o in t?Q(t,o,{enumerable:true,configurable:true,writable:true,value:e}):t[o]=e;var B=(t,o,e)=>tt(t,typeof o!="symbol"?o+"":o,e);import{af as q,aN as ot,ag as D,B as W,T as et,A as L,y as j,q as S,_ as nt,$ as st,u as C,k as it,aO as rt,t as at,d as Z,l as ct,R as lt}from"./shared-ByrLMUQa.mjs";import{a as ht}from"./annotation-name-DhMF4ZHj.mjs";import{r as ut}from"./link-CrNaByf-.mjs";import{T as dt}from"./Tip-mcI7IRQh.mjs";import{c as pt}from"./Camera-D2MnETlC.mjs";import"./styles-BOXm_R8o.mjs";const K=t=>Array.isArray(t)?t.flatMap(K):ot.includes(t==null?void 0:t.type)?K(t.items??[]):t==null?[]:[t],ft=t=>K(t).map(o=>q(o)),gt=(t,o)=>Math.abs(t.end-o.start)<.001,H=(t,o,e)=>t+(o-t)*e;function vt(t){const o=[...t].sort((e,n)=>e.start-n.start);return o.map((e,n)=>{const i=o[n+1];return e.end===1/0&&i?{...e,end:i.start}:e})}function U(t,o){let e=0,n=t.length-1,i=-1;for(;e<=n;){const d=e+n>>1;t[d].start<=o?(i=d,e=d+1):n=d-1}const r=t[i];if(!r||o>=r.end)return null;const c=t[i+1];if(!c||!gt(r,c)||!Number.isFinite(r.end))return r.world;const a=(o-r.start)/(r.end-r.start||1),[h,l]=[r.world,c.world];return{x:H(h.x,l.x,a),y:H(h.y,l.y,a),width:H(h.width,l.width,a),height:H(h.height,l.height,a)}}const G=t=>t.overlays??(t.overlays=new wt(t.host));class wt{constructor(o){B(this,"container");B(this,"overlays",new Map);B(this,"view");const e=document.createElement("div");e.className="clover-canvas-overlays",Object.assign(e.style,{position:"absolute",inset:"0",overflow:"clip",pointerEvents:"none"}),o.appendChild(e),this.container=e}add(o,e){return this.overlays.set(o,e),o.classList.add("clover-canvas-overlay"),Object.assign(o.style,{position:"absolute",top:"0",left:"0",pointerEvents:"auto"}),o.parentElement!==this.container&&this.container.appendChild(o),()=>{this.overlays.delete(o)}}move(o,e){this.overlays.has(o)&&(this.overlays.set(o,e),this.view&&this.position(...this.view,o))}position(o,e,n){this.view=[o,e];const i=o.rotation*180/Math.PI,r=Math.cos(o.rotation)>.9999,c=r?window.devicePixelRatio||1:0,a=h=>c?Math.round(h*c)/c:h;for(const[h,l]of this.overlays){if(n&&h!==n)continue;const d=pt(o,e,{x:l.x+l.width/2,y:l.y+l.height/2}),f=a(d.x-l.width*o.zoom/2),g=a(d.y-l.height*o.zoom/2),p=a(l.width*o.zoom),v=a(l.height*o.zoom);h.style.width=`${p}px`,h.style.height=`${v}px`,h.style.transform=`translate(${f}px, ${g}px)`+(i?` rotate(${i}deg)`:"");const{style:w,dataset:m}=h;if(r){w.setProperty("--clover-overlay-x",`${d.x}px`),w.setProperty("--clover-overlay-top",`${g}px`),w.setProperty("--clover-overlay-bottom",`${g+v}px`);const $=d.y>e.height/2?"above":"below";m.overlayRoom!==$&&(m.overlayRoom=$)}else w.removeProperty("--clover-overlay-x"),w.removeProperty("--clover-overlay-top"),w.removeProperty("--clover-overlay-bottom"),delete m.overlayRoom}}dispose(){this.overlays.clear(),this.container.remove()}}const mt=t=>"start"in t,Nt=t=>{var o,e;return mt(t)?t.start:(e=(o=t.track)==null?void 0:o[0])==null?void 0:e.start},xt=(t,o)=>!t.track||U(t.track,o)!==null;function $t(t,o){return xt(t,o.currentTime)?false:(o.currentTime=t.track[0].start,true)}function yt(t,o,e){var r,c,a;const n=ft(t==null?void 0:t.target);if(!((r=n[0])!=null&&r.rect)||!((c=n[0])!=null&&c.t))return null;const i=[];for(const h of n){const l=W((a=h.t)==null?void 0:a.replace(/^npt:/,""));if(!h.rect||!l)continue;const{x:d,y:f,w:g,h:p}=h.rect,v=o({x:d,y:f,width:g,height:p},h.id,e);v&&i.push({start:l.start,end:l.end??1/0,world:v})}return i.length?vt(i):null}function X(t,o){const{text:e,lang:n}=at(t,o);return e?{page:{text:e,...n?{lang:n}:{}}}:{}}function St(t,o){var n;const e=[];for(const{annotation:i,pageLabel:r,pageId:c}of t){const a=q([i==null?void 0:i.target].flat()[0]),h=W((n=a==null?void 0:a.t)==null?void 0:n.replace(/^npt:/,""));if(!h||a.rect||a.point||a.svg)continue;const{text:l,lang:d}=Y(i,o);e.push({id:i.id,...l?{label:l}:{},...d?{lang:d}:{},...h,...X(r,o),...c?{pageId:c}:{}})}return e}const N=40;function qt(t,o,e=null,n){var r;const i=[];for(const{annotation:c,targetIndex:a,pageLabel:h,pageId:l,place:d}of t){const f=q(c==null?void 0:c.target);if(!f)continue;let g=null,p;const v=yt(c,o,a);if(v){const{x:s,y:u,w:k,h:R}=f.rect;g={x:s,y:u,width:k,height:R}}else if(f.rect){const{x:s,y:u,w:k,h:R}=f.rect;g={x:s,y:u,width:k,height:R}}else if(f.point){const{x:s,y:u}=f.point;g={x:s-N/2,y:u-N/2,width:N,height:N},p={kind:"point"}}else if(f.svg&&e){const s=e(f.svg);s&&(g=s.box,p={kind:"svg",svg:s})}if(!g)continue;const w=v?v[0].world:o(g,f.id,a);if(!w)continue;const{text:m,lang:$}=Y(c,n),P=ut(c),T=(r=D(c).find(s=>(s==null?void 0:s.type)==="Image"&&/^https?:\/\//i.test(s.id??"")))==null?void 0:r.id;i.push({id:c.id,label:m,...$?{lang:$}:{},world:w,...p?{shape:p}:{},...v?{track:v}:{},...P?{link:P}:{},...T?{image:T}:{},...X(h,n),...l?{pageId:l}:{},...d?{place:d}:{}})}return i}const V=({world:t})=>t.width*t.height,kt=(t,o)=>t.x>=o.x&&t.y>=o.y&&t.x+t.width<=o.x+o.width&&t.y+t.height<=o.y+o.height,y=t=>String(Math.round(t*1e3)/1e3||0);function bt(t,o){var g,p;const e=t.world,n=o.world;if(((g=o.shape)==null?void 0:g.kind)==="point"||n.x>=e.x+e.width||n.x+n.width<=e.x||n.y>=e.y+e.height||n.y+n.height<=e.y)return null;const[i,r]=[e.width,e.height],[c,a]=[n.x-e.x,n.y-e.y],h=`${y(-i/10)} ${y(-r/10)} ${y(i*1.2)} ${y(r*1.2)}`,l=`M${y(-i/10)} ${y(-r/10)}h${y(i*1.2)}v${y(r*1.2)}h${y(-i*1.2)}Z`;let d;if(((p=o.shape)==null?void 0:p.kind)==="svg"){const{box:v,shapes:w}=o.shape.svg,m=w.map(({tag:$,attributes:P})=>`<${$} ${Object.entries(P).map(([T,s])=>`${T}="${s}"`).join(" ")}/>`).join("");d=`<mask id="m"><path fill="#fff" d="${l}"/><svg x="${y(c)}" y="${y(a)}" width="${y(n.width)}" height="${y(n.height)}" viewBox="${v.x} ${v.y} ${Math.max(v.width,1)} ${Math.max(v.height,1)}" preserveAspectRatio="none" overflow="visible"><g fill="#000">${m}</g></svg></mask><path d="${l}" mask="url(#m)"/>`}else d=`<path fill-rule="evenodd" d="${l}M${y(c)} ${y(a)}h${y(n.width)}v${y(n.height)}h${y(-n.width)}Z"/>`;const f=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="${h}" preserveAspectRatio="none">${d}</svg>`;return`url("data:image/svg+xml,${encodeURIComponent(f)}")`}const Kt=({renderer:t,placed:o,sceneVersion:e,active:n,selected:i,onActivate:r,onSelect:c,onFollow:a,media:h})=>{const l=et(()=>{const s=new Map;return[...o].sort((u,k)=>V(k)-V(u)).forEach((u,k)=>s.set(u,k)),s},[o]),d=o.find(s=>s.id===n),f=L(null);j(()=>{const s=o.find(u=>u.id===i&&u.track);i||(f.current=null),!(!s||!h||f.current===i)&&(f.current=i,$t(s,h))},[o,i,h]);const g=s=>{const u=l.get(s)??0;return d?s===d?o.length:u>(l.get(d)??0)&&!s.track&&!d.track&&kt(s.world,d.world)?o.length+1+u:u:u},p=L(new Map),v=L(new Map),w=L(new WeakMap),m=L({placed:o,current:d,depthOf:g});m.current={placed:o,current:d,depthOf:g};const $=S(s=>{const{placed:u,current:k,depthOf:R}=m.current,E=M=>v.current.get(M.id),x=k&&E(k)!==null?k:void 0,b=M=>{const A=p.current.get(M.id);if(!A)return;const F=E(M),I=x&&M!==x&&F!==null&&R(M)<u.length?bt({...M,world:F??M.world},{...x,world:E(x)??x.world}):null;(w.current.get(A)??"")!==(I??"")&&(w.current.set(A,I??""),I?A.style.setProperty("--clover-annotation-mask",I):A.style.removeProperty("--clover-annotation-mask"))};s&&s!==k?b(s):u.forEach(b)},[]);nt(()=>$());const P=S((s,u)=>{u?p.current.set(s,u):p.current.delete(s)},[]),T=S((s,u)=>{v.current.set(s.id,u),$(s)},[$]);return st(C(it,{children:o.map((s,u)=>C(Tt,{entry:s,name:s.label??String(u+1),lang:s.label?s.lang:void 0,depth:g(s),register:P,onMove:T,renderer:t,active:n===s.id,selected:i===s.id,onActivate:r,onSelect:c,onFollow:a,media:h},`${s.id}|${e}`))}),G(t).container)};let Mt;const _=()=>Mt??(Mt=import("./panClearOfControls-Cn2ZXsZi.mjs")),Tt=({entry:t,name:o,lang:e,depth:n,register:i,onMove:r,renderer:c,active:a,selected:h,onActivate:l,onSelect:d,onFollow:f,media:g})=>{var A,F,I;const[p,v]=Z(null),{id:w,place:m}=t,$=m&&`${m.index} / ${m.total}`,P=S(O=>{v(O),i(w,O)},[w,i]),{x:T,y:s,width:u,height:k}=t.world;j(()=>{if(!p)return;const O=G(c).add(p,{x:T,y:s,width:u,height:k});return c.invalidate(),O},[p,c,T,s,u,k]);const R=Ot(p,t.track,c,g,()=>l(null),O=>r(t,O)),{link:E}=t,x=E&&!E.canvasId&&!E.manifestId?E.id:void 0,b=E&&!x&&f?()=>f(t):void 0;return C(x?"a":"button",{ref:P,...x?{href:x,target:"_blank",rel:"noopener noreferrer"}:{type:"button"},id:t.id,className:"clover-canvas-annotation",hidden:!R,"data-active":a?"true":"false","data-shape":((A=t.shape)==null?void 0:A.kind)??"rect","data-track":t.track?"":void 0,"data-link":x||b?"true":void 0,"aria-label":$?`${o} ${$}`:o,"aria-current":h?"true":void 0,...ct(e),style:{"--clover-annotation-depth":n},onMouseEnter:()=>l(t.id),onMouseLeave:()=>l(null),onFocus:()=>{l(t.id),_()},onKeyUp:O=>{if(O.key!=="Tab")return;const z=O.currentTarget;_().then(({panClearOfControls:J})=>{document.activeElement===z&&J(c,z)})},onBlur:()=>l(null),onKeyDown:At,onClick:O=>{O.stopPropagation(),!x&&(b?b():d(t))},children:[((F=t.shape)==null?void 0:F.kind)==="point"&&C("span",{className:"clover-canvas-annotation-point","aria-hidden":"true"}),((I=t.shape)==null?void 0:I.kind)==="svg"&&C(Et,{svg:t.shape.svg}),C(dt,{label:o,scrolls:true,image:t.image,after:$})]})};function Ot(t,o,e,n,i,r){const c=!!o&&n!==void 0,[a,h]=Z(()=>!c||(n?U(o,n.currentTime)!==null:false)),l=L(i);l.current=i;const d=L(r);return d.current=r,j(()=>{if(!o||n===void 0){h(true);return}if(!n){h(false);return}let f;const g=x=>{var A,F,I;const b=U(o,x);b&&t&&((A=e.overlays)==null||A.move(t,b)),d.current(b);const M=b!==null;if(M!==f){if(f=M,!M&&t){const O=t.matches(":hover");t.contains(document.activeElement)?(I=(F=e.overlays)==null?void 0:F.container.parentElement)==null||I.focus({preventScroll:true}):O&&l.current()}h(M)}},p=n,v=()=>typeof p.requestVideoFrameCallback=="function"&&p.videoWidth>0;let w=0,m=0;const $=(x,{mediaTime:b})=>{g(b),m=p.requestVideoFrameCallback($)},P=()=>{g(n.currentTime),w=requestAnimationFrame(P)},T=()=>{cancelAnimationFrame(w),m&&p.cancelVideoFrameCallback(m),w=m=0},s=()=>{T(),v()?m=p.requestVideoFrameCallback($):w=requestAnimationFrame(P)},u=()=>g(n.currentTime),k=()=>n.paused&&u(),R=()=>{T(),u()},E=[["play",s],["pause",R],["ended",R],["seeking",u],["seeked",u],["loadeddata",u],["timeupdate",k]];return E.forEach(([x,b])=>n.addEventListener(x,b)),u(),n.paused||s(),()=>{T(),E.forEach(([x,b])=>n.removeEventListener(x,b))}},[t,o,n,e]),a}const Et=({svg:t})=>{const{x:o,y:e,width:n,height:i}=t.box,r=t.shapes.map(({tag:c,attributes:a},h)=>lt.createElement(c,{key:h,...a,vectorEffect:"non-scaling-stroke"}));return C("svg",{className:"clover-canvas-annotation-shape",viewBox:`${o} ${e} ${Math.max(n,1)} ${Math.max(i,1)}`,preserveAspectRatio:"none","aria-hidden":"true",focusable:"false",children:[C("g",{children:r}),C("g",{children:r}),C("g",{children:r})]})};function Y(t,o){return ht(rt(t),o)}const Pt={ArrowDown:()=>32,ArrowUp:()=>-32,PageDown:t=>t.clientHeight-32,PageUp:t=>32-t.clientHeight,End:t=>t.scrollHeight,Home:t=>-t.scrollHeight};function At(t){const o=t.currentTarget.querySelector(":scope > .clover-tip"),e=Pt[t.key];if(!o||!e||t.altKey||t.ctrlKey||t.metaKey)return false;const n=e(o);return(n>0?o.scrollHeight-o.clientHeight-o.scrollTop:o.scrollTop)<1?false:(t.preventDefault(),o.scrollBy({top:n}),true)}function Ut(t,o){const e=new Map;for(const{annotation:n,targetIndex:i}of t??[]){const r=q([n==null?void 0:n.target].flat()[0]);if(r.rect||r.point||r.svg||r.t||!D(n).some(a=>typeof(a==null?void 0:a.value)=="string"||(a==null?void 0:a.type)==="Image"))continue;const c=(o==null?void 0:o.find(a=>a.id===r.id))??(r.id||o==null?void 0:o[i]);c&&e.set(c.id,[...e.get(c.id)??[],n])}return e}export{Kt as A,$t as g,qt as p,Nt as s,St as t,Ut as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as g,j as h,T as k,p as B,m as T,c as j,u as e,P as p,z as v}from"./shared-
|
|
1
|
+
import{e as g,j as h,T as k,p as B,m as T,c as j,u as e,P as p,z as v}from"./shared-ByrLMUQa.mjs";import L from"./Connected-shq2_tc-.mjs";import{r as R}from"./rendererSurface-BfZP5clN.mjs";import{j as w}from"./classnames-DukgfdpI.mjs";import{b as x}from"./hooks-DhTYPPVG.mjs";import{L as c}from"./Loading-DSaV1vxb.mjs";const z=v(()=>import("./Connected-DaP_DgGw.mjs")),N=v(()=>import("./Connected-L47VwCva.mjs"));function F({className:f,style:y,renderers:C,collapseControls:b,onContentStateChange:S,children:r,...n}){var u;const l=g("Body");h(l.clover,S);const o=x(),m=k(()=>B(o),[o]),s=T(C??l.renderers,{canvases:o,bodies:m}),a=s==null?void 0:s.component,i=((u=o.find(({type:t})=>t==="Scene"||t==="Timeline"))==null?void 0:u.type)??"Canvas",d=j(t=>t.status==="loading");return e("div",{"aria-busy":d,className:w("clover-body",f),"data-renderer":a?"custom":i.toLowerCase(),style:{position:"relative",height:"var(--clover-body-height, 60vh)",...y},children:[a?e(a,{canvases:o,bodies:m,children:r}):i==="Scene"?e(p,{fallback:e(c,{overlay:true}),children:e(N,{...n,children:r})}):i==="Timeline"?e(p,{fallback:e(c,{overlay:true}),children:e(z,{...n,children:r})}):e(L,{...n,collapseControls:b,surface:R,children:r}),d&&e(c,{overlay:true})]})}export{F as B};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as o,u as r,l}from"./shared-
|
|
1
|
+
import{a as o,u as r,l}from"./shared-ByrLMUQa.mjs";import{j as n}from"./classnames-DukgfdpI.mjs";function c({error:a,className:s}){const{t,langOf:e}=o();return r("div",{className:n("clover-status",s),"data-status":"error",role:"alert",children:[r("p",{...l(e("statusError")),children:t("statusError")}),r("p",{className:"clover-status-detail",lang:"en",children:a.message})]})}export{c as B};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as t,l as v}from"./shared-
|
|
1
|
+
import{u as t,l as v}from"./shared-ByrLMUQa.mjs";import{j as b}from"./classnames-DukgfdpI.mjs";import{T as m}from"./Tip-mcI7IRQh.mjs";import"./styles-BOXm_R8o.mjs";const B=({className:n,id:e,label:o,children:s,onClick:r,expanded:i,controls:d,shortcut:a,lang:l,unavailable:p,side:c})=>{const u=e.split("-")[0].replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^-/,"");return t("button",{id:e,className:b("clover-canvas-button",n),"data-testid":"clover-canvas-button","data-button":u,"data-side":c,onClick:r,"aria-disabled":p||void 0,"aria-expanded":i,"aria-controls":d,"aria-label":o,"aria-keyshortcuts":a==null?void 0:a.keys,...v(l),type:"button",children:[t("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:s}),t(m,{label:o,shortcut:a})]})};export{B};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as f,r as l,b as i,c,g as a,s as u,t as h}from"./CanvasView-
|
|
1
|
+
import{d as f,r as l,b as i,c,g as a,s as u,t as h}from"./CanvasView-B752g1bm.mjs";function g(t,o){return c(h(o.width/2,o.height/2),a(t.rotation),u(t.zoom),h(-t.x,-t.y))}function m(t,o){return c(h(t.x,t.y),u(1/t.zoom),a(-t.rotation),h(-o.width/2,-o.height/2))}function M(t,o,n){return i(m(t,o),n)}function w(t,o,n){return i(g(t,o),n)}function C(t,o){return f(m(t,o),{x:0,y:0,width:o.width,height:o.height})}function N(t,o,n=0,r=0){const e=f(a(n),t),s=Math.max(1,o.width*(1-r*2)),y=Math.max(1,o.height*(1-r*2)),d=Math.min(s/Math.max(e.width,Number.EPSILON),y/Math.max(e.height,Number.EPSILON)),x=l(t);return{x:x.x,y:x.y,zoom:d,rotation:n}}function P(t,o,n,r,e){const s=i(c(u(1/n),a(-r)),{x:o.x-e.width/2,y:o.y-e.height/2});return{x:t.x-s.x,y:t.y-s.y}}function S(t,o){return t.x===o.x&&t.y===o.y&&t.zoom===o.zoom&&t.rotation===o.rotation}export{P as a,S as b,w as c,N as f,M as s,C as v,g as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var l=Object.defineProperty;var o=(r,t,s)=>t in r?l(r,t,{enumerable:true,configurable:true,writable:true,value:s}):r[t]=s;var i=(r,t,s)=>o(r,typeof t!="symbol"?t+"":t,s);import{h as d,b as g}from"./rendererSurface-
|
|
1
|
+
var l=Object.defineProperty;var o=(r,t,s)=>t in r?l(r,t,{enumerable:true,configurable:true,writable:true,value:s}):r[t]=s;var i=(r,t,s)=>o(r,typeof t!="symbol"?t+"":t,s);import{h as d,b as g}from"./rendererSurface-BfZP5clN.mjs";class c{constructor(t,s){i(this,"kind","canvas2d");i(this,"canvas");i(this,"ctx");i(this,"pixelRatio",1);i(this,"drawn",new Set);this.canvas=t,this.ctx=s}static create(t){let s=null;try{s=t.getContext("2d",{alpha:true})}catch{s=null}return!s||typeof s.drawImage!="function"?null:new c(t,s)}resize(t,s,a){this.pixelRatio=a;const e=Math.max(1,Math.round(t*a)),h=Math.max(1,Math.round(s*a));this.canvas.width!==e&&(this.canvas.width=e),this.canvas.height!==h&&(this.canvas.height=h)}begin(){const t=this.ctx;t.setTransform(1,0,0,1,0,0),t.globalAlpha=1,t.clearRect(0,0,this.canvas.width,this.canvas.height),t.imageSmoothingEnabled=true,t.imageSmoothingQuality="high"}draw(t){if(!d(t.source))return"skipped";const s=this.ctx,a=t.transform,e=this.pixelRatio,h=t.crop??{x:0,y:0,width:t.width,height:t.height},n=g(t,e);return s.setTransform(e*a.a,e*a.b,e*a.c,e*a.d,e*a.e,e*a.f),s.globalAlpha=t.opacity,s.drawImage(t.source,h.x,h.y,h.width,h.height,h.x,h.y,h.width+n.x,h.height+n.y),this.drawn.add(t.key),"drawn"}end(){this.ctx.setTransform(1,0,0,1,0,0),this.ctx.globalAlpha=1}has(t){return this.drawn.has(t)}release(t){this.drawn.delete(t)}dispose(){this.drawn.clear(),this.canvas.width=0,this.canvas.height=0}}export{c as Canvas2DBackend};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{A as x,_ as Bt,a as $n,d as y,q as ke,y as T,t as ot,f as at,u as r,R as Xt,k as co,a7 as uo,a8 as fo,b as ho,T as L,a9 as go,aa as mo,ab as po,ac as yo,P as Be,z as qe,v as vo,l as Mn,ad as bo}from"./shared-ByrLMUQa.mjs";import{u as Co,d as zn,r as wo,C as xo,t as Io,E as ko,e as Mo,f as Oo,h as So,g as Bo,j as Po,B as Eo,k as Ro,l as Fo}from"./pointer-C22ufJ5w.mjs";import{P as Lo,a as To,I as $o,b as zo}from"./glyphs-atKuagcd.mjs";import{B as Ot}from"./Button-qhI73GCI.mjs";import{Z as Ao,a as No,b as Vo,c as Do,R as On,d as Ko,C as Ho}from"./controlGlyphs-DMQCxKaT.mjs";import{S as U,f as qo}from"./Tip-mcI7IRQh.mjs";import{f as jo,s as _o,b as Sn,d as Bn,p as Wo,e as Pn,g as En,h as Zo,i as Uo}from"./layout-zjkkOHIj.mjs";import{u as Yo}from"./useNearViewport-B_kjW0WB.mjs";import{L as Go}from"./Loading-DSaV1vxb.mjs";import{j as Jo}from"./classnames-DukgfdpI.mjs";import{u as Xo}from"./useContainerName-DR_6TyDU.mjs";import{b as Qo,f as ea}from"./imageService-BoQQvo1U.mjs";import"./styles-BOXm_R8o.mjs";function ta(e,o,s){return e.reduce((n,c)=>n+c+s,-s)<=o}function na(e,o,s){const n=e.ownerDocument,c=h=>h instanceof HTMLElement&&e.contains(h)&&!h.closest("[hidden]"),a=[n.getElementById(o),n.getElementById(s),...Array.from(e.querySelectorAll("button"))].find(c);a==null||a.focus()}function oa({cluster:e,ids:o,more:s,fits:n,settled:c,onFits:a}){const h=x(n);h.current=n;const m=x(a);m.current=a;const q=x(new Map),j=x(o);j.current=o;const b=x(null),V=o.join(" ");return Bt(()=>{const D=e.ownerDocument,P=()=>{var pe;const K=j.current,te=getComputedStyle(e),Pe=parseFloat(te.columnGap)||0;let C=e.clientWidth-(parseFloat(te.paddingLeft)||0)-(parseFloat(te.paddingRight)||0),$=0;for(const O of K){const Ee=(pe=D.getElementById(O))==null?void 0:pe.offsetWidth;Ee&&q.current.set(O,Ee),$=Math.max($,q.current.get(O)??0)}for(const O of Array.from(e.children))!(O instanceof HTMLElement)||K.includes(O.id)||O.id===s||O.classList.contains("clover-canvas-more")||!O.offsetWidth||getComputedStyle(O).position==="absolute"||(C-=O.offsetWidth+Pe);const se=ta(K.map(O=>q.current.get(O)??$),C,Pe);if(se===h.current)return;const Me=D.activeElement;b.current=Me instanceof HTMLElement&&e.contains(Me)?Me.id:null,h.current=se,m.current(se)};P();const d=new ResizeObserver(()=>P());d.observe(e);const ee=new MutationObserver(()=>P());return ee.observe(e,{childList:true}),()=>{d.disconnect(),ee.disconnect()}},[e,V,s]),Bt(()=>{if(!c)return;const D=b.current;if(b.current=null,D===null)return;const P=e.ownerDocument.activeElement;(!P||!e.contains(P)||P.closest("[hidden]"))&&na(e,D,s)},[n,c,e,s]),null}const aa=()=>import("./AnnotationMenu-guk9SbaL.mjs"),sa=()=>import("./ChaptersMenu-CB4zdVOh.mjs"),la=()=>import("./ChoiceMenu-DoXMSLjk.mjs"),ia=()=>import("./ImageControls-Df-M7F2R.mjs"),Rn=2,ra=new Set(["zoomIn","zoomOut","rotateRight","rotateLeft","reset","fullPage"]),An={atMax:false,atMin:false,atHome:false},ca=({renderer:e,instance:o,config:s,controlButtons:n,limits:c=An,placeholder:a,placeholderIsMore:h=false,choices:m=[],selections:q={},onSelect:j,annotations:b=[],chapters:V=[],mediaElement:D=null,onChapter:P,overStill:d,request:ee,hiddenPages:K,onPageVisibilityChange:te,selectedAnnotation:Pe=null,onAnnotationSelect:C,onAnnotationActivate:$,captionId:se,captionOpen:Me=false,onCaptionToggle:pe,placeId:O,placeOpen:Ee=false,onPlaceToggle:je,language:Y,fit:_e=true,more:Pt="auto",children:Re})=>{var mt,pt,yt,Se;const{t:I,langOf:E}=$n(),[Fe,ne]=y(false),[le,st]=y(false),ye=`annotations-${o}`,We=`${ye}-menu`,Ze=I("informationPanelTabsAnnotations"),ie=E("informationPanelTabsAnnotations"),Et=ke(i=>{var g;st(false),$==null||$(null),i&&((g=document.getElementById(ye))==null||g.focus())},[ye,$]),re=s.annotations&&b.length>0&&C,[Rt,lt]=y(false),oe=`chapters-${o}`,it=`${oe}-menu`,ae=V.length>0&&!!P,Ue=x(false),R=x(null);T(()=>{const i=()=>{var g;Ue.current=((g=document.activeElement)==null?void 0:g.id)===oe};return document.addEventListener("focusin",i),()=>document.removeEventListener("focusin",i)},[oe]);const G=ke(()=>{var g,ge;if(!Ue.current)return;Ue.current=false;const i=document.activeElement;i&&i!==document.body||(ge=(g=R.current)==null?void 0:g.querySelector('.clover-canvas-transport :is([data-button="play"], [data-button="pause"])'))==null||ge.focus()},[]);T(()=>{ae||G()},[ae,G]),T(()=>()=>G(),[G]);const S=ke(i=>{var g;lt(false),i&&((g=document.getElementById(oe))==null||g.focus())},[oe]),rt=s.information&&se&&pe,ce=s.map&&O&&je,ue=`choice-${o}`,de=m.length===1?ot(m[0].label,Y):null,M=(de==null?void 0:de.text)||I("canvasChoice"),ve=de!=null&&de.text?de.lang:E("canvasChoice"),fe=`${ue}-menu`,Ye=(mt=at(aa,!!re))==null?void 0:mt.default,ct=(pt=at(sa,ae))==null?void 0:pt.default,Ge=(yt=at(la,m.length>0&&!!j))==null?void 0:yt.default,ut=ke(i=>{var g;ne(false),i&&((g=document.getElementById(ue))==null||g.focus())},[ue]),Ft=Co(),[he,Le]=y(null);T(()=>{R.current=(he==null?void 0:he.closest(".clover-canvas"))??null},[he]);const be=zn(he),[dt,_]=y(false),Te=i=>r(Ot,{className:i,id:ye,label:Ze,lang:ie,onClick:()=>st(g=>!g),expanded:le,controls:We,children:r(zo,{})},"annotations"),Je=(()=>{const i=[],g=e;return s.zoom&&g&&i.push({key:"zoomIn",id:`zoomIn-${o}`,shortcut:U.zoomIn,label:I("imageZoomIn"),lang:E("imageZoomIn"),glyph:r(Ao,{}),unavailable:c.atMax,onClick:()=>g.zoomBy(Rn)},{key:"zoomOut",id:`zoomOut-${o}`,shortcut:U.zoomOut,label:I("imageZoomOut"),lang:E("imageZoomOut"),glyph:r(No,{}),unavailable:c.atMin,onClick:()=>g.zoomBy(1/Rn)}),s.fullPage&&Ft&&i.push({key:"fullPage",id:`fullPage-${o}`,label:I(be?"imageExitFullScreen":"imageFullScreen"),lang:E(be?"imageExitFullScreen":"imageFullScreen"),glyph:be?r(Vo,{}):r(Do,{}),onClick:ge=>void Io(ge.currentTarget)}),s.rotation&&g&&i.push({key:"rotateRight",id:`rotateRight-${o}`,shortcut:U.rotateRight,label:I("imageRotateRight"),lang:E("imageRotateRight"),glyph:r(On,{}),onClick:()=>g.rotateBy(90)},{key:"rotateLeft",id:`rotateLeft-${o}`,shortcut:U.rotateLeft,label:I("imageRotateLeft"),lang:E("imageRotateLeft"),glyph:r(On,{}),onClick:()=>g.rotateBy(-90)}),s.reset&&g&&i.push({key:"reset",id:`reset-${o}`,shortcut:U.reset,label:I("imageResetZoom"),lang:E("imageResetZoom"),glyph:r(Ko,{}),unavailable:c.atHome,onClick:()=>g.home()}),m.length&&i.push({key:"choice",id:ue,label:M,lang:ve,glyph:r(Ho,{}),onClick:()=>ne(ge=>!ge),expanded:Fe,controls:fe}),i})(),ft=[...Je.filter(i=>i.key!=="fullPage"),...Je.filter(i=>i.key==="fullPage")].map(i=>({id:i.id,view:ra.has(i.key),node:wo(i,n)})),H=[ce&&{id:`place-${o}`,view:false,node:r(Ot,{id:`place-${o}`,label:I("mapLabel"),lang:E("mapLabel"),onClick:je,expanded:Ee,controls:O,children:r(Lo,{})},"place")},ae&&{id:oe,view:false,node:r(Ot,{id:oe,label:I("playerChapters"),lang:E("playerChapters"),onClick:()=>lt(i=>!i),expanded:Rt,controls:it,children:r(To,{})},"chapters")},re&&{id:ye,view:false,node:Te()},rt&&{id:`information-${o}`,view:false,node:r(Ot,{id:`information-${o}`,label:I("informationPanelTabsAbout"),lang:E("informationPanelTabsAbout"),onClick:pe,expanded:Me,controls:se,children:r($o,{})},"information")},!!a&&{id:`placeholder-${o}`,view:false,node:r(Xt.Fragment,{children:a},"placeholder")}].filter(i=>!!i),Xe=H.filter(i=>i.id===`placeholder-${o}`),ht=[...ft.filter(i=>i.view),...Xe],z=[...ft.filter(i=>!i.view),...H.filter(i=>!Xe.includes(i))],Oe=[...ht,...z],[J,gt]=y(true),Qe=Pt==="always"||h,$e=(Se=at(ia,_e&&(h||(Qe||!J)&&Oe.some(i=>i.view))))==null?void 0:Se.ImageControls,v=J&&!Qe||!$e?[]:Oe.filter(i=>i.view),X=h&&!!a&&!!$e;T(()=>{v.length||_(false)},[v.length]);const ze=i=>i.filter(g=>!v.includes(g)&&!(X&&g.id===`placeholder-${o}`)).map(({node:g})=>g);return r(co,{children:[r(xo,{fit:_e,clusterRef:Le,children:[ze(ht),$e&&(v.length>0||X)&&r($e,{instance:o,open:X?v.length>0:dt,onOpenChange:_,toggle:X?a:void 0,children:v.map(({node:i})=>i)}),ze(z),Re]}),_e&&!Qe&&he&&r(oa,{cluster:he,ids:Oe.map(({id:i})=>i),more:`more-${o}`,fits:J,settled:J||v.length>0||!Oe.some(i=>i.view),onFits:gt}),ct&&Rt&&ae&&r(ct,{id:it,triggerId:oe,label:I("playerChapters"),labelLang:E("playerChapters"),chapters:V,element:D,onChapter:P,overStill:d,request:ee,onClose:S}),Ye&&le&&re&&r(Ye,{id:We,triggerId:ye,label:Ze,labelLang:ie,annotations:b,hiddenPages:K,onPageVisibilityChange:te,selected:Pe,onSelect:C,onActivate:i=>$==null?void 0:$(i),onClose:Et}),Ge&&Fe&&m.length>0&&j&&r(Ge,{id:fe,triggerId:ue,label:M,labelLang:ve,language:Y,choices:m,selections:q,onSelect:j,onClose:ut})]})},ua=Object.freeze({a:1,b:0,c:0,d:1,e:0,f:0});function ja(e,o){return{a:1,b:0,c:0,d:1,e,f:o}}function _a(e,o=e){return{a:e,b:0,c:0,d:o,e:0,f:0}}function Wa(e){const o=Math.cos(e),s=Math.sin(e);return{a:o,b:s,c:-s,d:o,e:0,f:0}}function da(e,o){return{a:e.a*o.a+e.c*o.b,b:e.b*o.a+e.d*o.b,c:e.a*o.c+e.c*o.d,d:e.b*o.c+e.d*o.d,e:e.a*o.e+e.c*o.f+e.e,f:e.b*o.e+e.d*o.f+e.f}}function Za(...e){return e.reduce((o,s)=>da(o,s),ua)}function Ua(e){const o=e.a*e.d-e.b*e.c;if(!o||!Number.isFinite(o))return null;const s=1/o;return{a:e.d*s,b:-e.b*s,c:-e.c*s,d:e.a*s,e:(e.c*e.f-e.d*e.e)*s,f:(e.b*e.e-e.a*e.f)*s}}function St(e,o){return{x:e.a*o.x+e.c*o.y+e.e,y:e.b*o.x+e.d*o.y+e.f}}function Ya(e){return`matrix(${[e.a,e.b,e.c,e.d,e.e,e.f].map(fa).join(",")})`}function Ga(e,o,s,n=new Float32Array(9)){const c=2/o,a=-2/s;return n[0]=e.a*c,n[1]=e.b*a,n[2]=0,n[3]=e.c*c,n[4]=e.d*a,n[5]=0,n[6]=e.e*c-1,n[7]=e.f*a+1,n[8]=1,n}function fa(e){const o=Math.round(e*1e6)/1e6;return Object.is(o,-0)?"0":String(o)}function Ja(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}function Fn(e){if(!e.length)return null;let o=1/0,s=1/0,n=-1/0,c=-1/0;for(const a of e)o=Math.min(o,a.x),s=Math.min(s,a.y),n=Math.max(n,a.x+a.width),c=Math.max(c,a.y+a.height);return{x:o,y:s,width:n-o,height:c-s}}function Xa(e,o){return e.x<o.x+o.width&&o.x<e.x+e.width&&e.y<o.y+o.height&&o.y<e.y+e.height}function Qa(e,o){const s=[St(e,{x:o.x,y:o.y}),St(e,{x:o.x+o.width,y:o.y}),St(e,{x:o.x,y:o.y+o.height}),St(e,{x:o.x+o.width,y:o.y+o.height})],n=s.map(m=>m.x),c=s.map(m=>m.y),a=Math.min(...n),h=Math.min(...c);return{x:a,y:h,width:Math.max(...n)-a,height:Math.max(...c)-h}}function es(e,o,s){return Math.min(Math.max(e,o),s)}const Jt=e=>!!(e&&"overlays"in e);let Qt;const ha=()=>import("./shared-ByrLMUQa.mjs").then(e=>e.aS).then(e=>{Qt=e.buildContentState}),ga=qe(()=>import("./MediaBody-CN2ZTxK0.mjs")),ma=()=>import("./AnnotationState-BX7xh-bd.mjs"),pa=new Map,ya={menu:[],placed:[],timed:[],hiddenPages:[],setPagesVisible:()=>{},listedCount:0,comments:pa,selected:null,select:()=>{},activate:()=>{},release:()=>false,quietlyOpened:null},va=qe(()=>import("./FrameAnimation-CpniJMTK.mjs")),Ln=qe(()=>import("./PlaceBox-DNnl9coD.mjs")),ba=qe(()=>import("./Placeholder-D8Sabput.mjs")),Ca=qe(()=>import("./ControlsFade-LFHufW32.mjs")),wa=()=>true,xa=qe(()=>import("./Placeholder-D8Sabput.mjs").then(({PlaceholderToggle:e})=>({default:e}))),Tn={zoom:true,fullPage:true,rotation:true,reset:true,annotations:true,information:true,map:true},Ia={zoom:false,fullPage:false,rotation:false,reset:false,annotations:false,information:false,map:false},ka={description:"canvasKeysImage",keys:["ArrowLeft ArrowRight ArrowUp ArrowDown",U.zoomIn.keys,U.zoomOut.keys,U.reset.keys,U.rotateRight.keys,U.rotateLeft.keys].join(" ")},Ma={description:"canvasKeysMedia",keys:[U.play.keys,"J L",U.mute.keys].join(" ")},Oa={description:"canvasKeysAnnotations",keys:"Escape"},ts=e=>{var a;const o=!!((a=e.canvases)!=null&&a.length)||Nn(e.body,e.src).length>0,[s,n]=y(false),c=o||s&&e.manifestId==="loading";return c!==s&&n(c),c?r(ko,{children:r(Sa,{...e})}):null},Sa=e=>{var pn,yn,vn,bn,Cn,wn;const{surface:o,manifestId:s,canvases:n,viewingDirection:c,body:a,src:h,isTiledImage:m=false,label:q,partOf:j,language:b,highContrast:V,instanceId:D,className:P,options:d,navigator:ee=false,controls:K=true,collapseControls:te="auto",controlButtons:Pe,annotations:C,onReady:$,onViewportChange:se,onContentStateChange:Me,onMediaElement:pe,onCaptionChange:O,caption:Ee,onEnded:je,chapters:Y,highlightedChapter:_e,onChapterHighlight:Pt,placeholder:Re=true,ahead:I,children:E}=e,{t:Fe}=$n(),ne=x(null),[le,st]=y(null),ye=Mo(le),We=zn(le),Ze=Oo(le),ie=uo(st),Et=fo(V),re=!!o.controlsVisibility,lt=(o.controlsVisibility??wa)(re?le:null,d==null?void 0:d.hideDelay,ne),[oe,it]=y(false),ae=Yo(le),Ue=ho(),[R]=y(()=>D??`clover-canvas-${Ue}`),G=x(null),[S,rt]=y(null),ce=Jt(S)?S:null,[ue,de]=y(null),M=K===false?null:K===true?Tn:{...Tn,...K},[ve,fe]=y("loading"),[Ye,ct]=y(false),[Ge,ut]=y(0),[Ft,he]=y(An),Le=x($),be=x(se),dt=x(d);Le.current=$,be.current=se,dt.current=d;const _=go(c),Te=L(()=>jo(n??[]),[n]),Lt=L(()=>_o(Te,b),[Te,b]),[Je,ft]=y({}),H=L(()=>({...Lt,...Je}),[Lt,Je]),Xe=(t,l)=>ft(f=>({...f,[t]:l})),ht=L(()=>C==null?void 0:C.filter(t=>!t.layer||(H[t.layer.key]??0)===t.layer.item),[C,H]),z=(pn=C==null?void 0:C.find(t=>t.layer&&t.annotation.id===e.selectedAnnotation))==null?void 0:pn.layer;T(()=>{z&&(H[z.key]??0)!==z.item&&Xe(z.key,z.item)},[z==null?void 0:z.key,z==null?void 0:z.item,e.selectedAnnotation]);const Oe=!!(M!=null&&M.information),J=!!(C!=null&&C.length),gt=at(ma,J),[Qe,$e]=y(null),v=J&&Qe||ya,X=L(()=>{var f,k;const t=(f=C==null?void 0:C.find(A=>A.annotation.id===v.selected))==null?void 0:f.annotation,l=(Array.isArray(t==null?void 0:t.body)?t==null?void 0:t.body:[t==null?void 0:t.body]).find(A=>(A==null?void 0:A.type)==="Feature");return t&&l?{id:String(t.id),feature:l,name:((k=l.properties)==null?void 0:k.label)??t.label}:null},[C,v.selected]),ze=X?`${X.id}:${e.refind??0}`:null,[mt,pt]=y(null),yt=ze!==null&&mt!==ze,Se=L(()=>{var A,He;const t=(n??[]).map(Z=>Z.navPlace).filter(Boolean),l=t.length?t:e.navPlace?[e.navPlace]:[];if(!l.length)return null;const f=l.flatMap(Z=>(Z==null?void 0:Z.type)==="FeatureCollection"?Z.features??[]:(Z==null?void 0:Z.type)==="Feature"?[Z]:[]);if(!f.length)return null;const k=f.length===1?(He=(A=f[0])==null?void 0:A.properties)==null?void 0:He.label:void 0;return{feature:{type:"FeatureCollection",features:f},name:k??e.label}},[n,e.navPlace,e.label]),i=`place-box-${R}`,[g,ge]=y(false),[Dn,Kn]=y(false),vt=x(v);vt.current=v;const bt=ke(()=>vt.current.release(),[]),{comments:Tt,listedCount:en}=v,Ae=L(()=>Oe?(n??[]).filter(t=>So(t)||Tt.has(t.id)):[],[n,Oe,Tt]),$t=`caption-${R}`,[Hn,tn]=y(false),zt=Hn&&Ae.length>0,nn=ke(t=>{var l;tn(false),t&&((l=document.getElementById(`information-${R}`))==null||l.focus())},[R]),W=L(()=>(n??[]).find(t=>Sn(t).length)??null,[n]),qn=W?Sn(W):Pa,F=L(()=>n!=null&&n.length?Bn(n,_,H,{standIns:n.length>1}):null,[n,_,H]),jn=L(()=>Nn(a,h,m),[a,h,m]),u=(F==null?void 0:F.media[0])??null,on=!re&&(u==null?void 0:u.kind)==="video",_n=re||on,Wn=re?lt:oe,Zn=L(()=>{if(n!=null&&n.length)return Wo(n,H);const t=(Array.isArray(a)?a:a?[a]:[])[0];return typeof(t==null?void 0:t.type)=="string"?t.type.toLowerCase():h?"image":void 0},[n,H,a,h]),[B,Un]=y(null),Ct=x(pe);Ct.current=pe;const Yn=ke(t=>{var l;Un(t),(l=Ct.current)==null||l.call(Ct,t)},[]),Ce=F?F.images:jn,we=!!u&&(n==null?void 0:n.length)===1,xe=we&&(u==null?void 0:u.kind)==="audio",Gn=we&&(u==null?void 0:u.kind)==="video",Ne=(n==null?void 0:n.length)===1&&!u&&!W&&Ce.length===0,wt=!we&&!Ne&&((yn=d==null?void 0:d.gestures)==null?void 0:yn.navigable)!==false,Q=n?`${s??""}
|
|
2
|
+
${n.map(t=>t.id).join("|")}`:null,Ie=L(()=>{if(!n||!Re)return[];const t=n.flatMap(l=>{const f=Pn(l),k=ot(l.label,b);return f?[{...f,alt:k.text,lang:k.lang}]:[]});return _==="right-to-left"||_==="bottom-to-top"?t.reverse():t},[n,_,Re,b]),[At,an]=y(false),[Jn,sn]=y(null),p=!xe&&Ie.length>0&&(u?Jn!==Q:!At),ln=d==null?void 0:d.request;T(()=>{if(p){import("./thumbnail-Np4ftjUo.mjs");for(const{source:t}of Ie)t.service&&ea(t.service,{request:ln}).catch(()=>{})}},[p,Ie,ln]);const xt=L(()=>{if(!(I!=null&&I.length)||Re&&!At&&I.some(f=>Pn(f)))return null;const t=Bn(I,_,H,{standIns:false});if(t.media.length)return null;const l=t.images.filter(f=>f.service&&!f.hidden);return l.length?{images:l,world:Fn(t.placements)??void 0}:null},[I,_,H,Re,At]);T(()=>{var t;ve!=="ready"||p||!xt||(t=S==null?void 0:S.prefetch)==null||t.call(S,xt.images,{world:xt.world})},[S,ve,p,xt]);const rn=(t,{annotations:l=false,fullPage:f=false}={})=>({...t,zoom:false,rotation:false,reset:false,fullPage:f&&t.fullPage,annotations:l&&t.annotations}),et=Ne&&We,cn=Xt.Children.count(E)>0,Nt=Ie.length>0&&!xe&&!u,tt=M?p?Ae.length||cn||en||u&&(Y!=null&&Y.length)?rn(M,{annotations:true}):null:we||Ne?Te.length||Ae.length||cn||en||u&&(Y!=null&&Y.length)||et&&M.fullPage?rn(M,{annotations:true,fullPage:et}):null:M:null,Vt=ee&&!p&&(u?u.kind==="audio"&&!we&&Ce.length>0:true),[Dt,Xn]=y(null),Ve=u?Dt??u.placement:null,[It,Qn]=y(Ea),Kt=L(()=>{const t=(u==null?void 0:u.kind)==="video"&&B&&Ve?[...Ce,{id:u.id,placement:Ve,width:Ve.width,height:Ve.height,media:{element:B}}]:Ce;return It.length?[...t,...It]:t},[Ce,u,B,Ve,It]),un=we&&(u==null?void 0:u.kind)==="video"&&Dt?Dt:F?Fn(F.placements):null,eo=JSON.stringify([Ce,un,Kt.length!==Ce.length&&[u==null?void 0:u.id,Ve],It.map(t=>t.id)]),De=x(null),Ht=x(false),qt=()=>{u?sn(p?Q:null):an(p),p||bt()},kt=x(null),to=t=>{if(B&&!p){B.currentTime=t;return}kt.current=t,p&&qt()};T(()=>{!B||kt.current===null||(B.currentTime=kt.current,kt.current=null)},[B]);const jt=Array.isArray(a)?a[0]:a,w=[q,(vn=n==null?void 0:n[0])==null?void 0:vn.label,jt==null?void 0:jt.label].map(t=>ot(t,b)).find(t=>t.text),no=L(()=>{const t=ot(j,b);return t.text&&t.text!==(w==null?void 0:w.text)?t:void 0},[j,b,w==null?void 0:w.text]),dn=Xo((w==null?void 0:w.text)||Fe("canvasImage"),w?w.lang:ie.langOf("canvasImage"),false,ie.hostLanguage),Mt=p?[]:[...wt?[ka]:[],...u?[Ma]:[],...J?[Oa]:[]],fn=`keys-${R}`,oo=wt&&!p&&!ie.langOf("canvasRoleDescription")?Fe("canvasRoleDescription"):void 0,_t=!!tt&&Ae.length>0,ao=_t&&Ae.map((t,l)=>ot(t.label,b).text?Bo($t,l):null).filter(Boolean).join(" ")||void 0,hn=x({canvases:n,scene:F,canvasKey:Q});hn.current={canvases:n,scene:F,canvasKey:Q};const nt=x(null),Wt=ke(()=>{const{canvases:t,scene:l,canvasKey:f}=hn.current;nt.current=t&&l&&De.current===f?{key:f,canvases:t,placements:l.placements}:null},[]),so=!n||((bn=nt.current)==null?void 0:bn.key)===Q,Ke=mo(()=>{const t=nt.current,l=G.current;if(!t||s==="loading")return null;const f=B&&B.currentTime>0?B.currentTime:null,k=!f&&l&&Jt(l)?Vn(l.getBounds(),t.canvases,t.placements):null,A=t.canvases.find(He=>He.id===(k==null?void 0:k.canvasId))??t.canvases[0];return A?Qt?Qt({manifestId:s,canvasId:A.id,type:A.type,region:k&&{x:k.rect.x,y:k.rect.y,w:k.rect.width,h:k.rect.height},time:f}):(ha().then(()=>Ke()),null):null},Me);T(()=>po(B,Ke),[B,Ke]),T(()=>{const t=ne.current;if(!t)return;const l=o(t,dt.current),f=Jt(l)?l:null;G.current=l,rt(l),l.setDismiss(bt);const k=()=>{if(!f)return;const N=f.viewLimits();he(me=>me.atMax===N.atMax&&me.atMin===N.atMin&&me.atHome===N.atHome?me:N)},A=l.on("open",()=>{var N;k(),Yt(false),Wt(),Ke(),fe("ready"),ut(me=>me+1),f&&((N=Le.current)==null||N.call(Le,Ba(f,()=>nt.current,me=>{var In,kn;const xn=vt.current.placed.find(Gt=>Gt.id===me);return xn?(vt.current.select(xn),(kn=Array.from(((In=f.overlays)==null?void 0:In.container.querySelectorAll("[id]"))??[]).find(Gt=>Gt.id===me))==null||kn.focus({preventScroll:true}),true):false})))}),He=l.on("change",()=>{k(),Yt(false),Wt(),Ke(),fe("ready"),ut(N=>N+1)}),Z=l.on("error",()=>{l.isOpen||fe("error")}),io=l.on("unloadable",N=>ct(!!N)),ro=l.on("viewport",()=>{var N;k(),f&&((N=be.current)==null||N.call(be,f.getBounds())),Ke()});return()=>{A(),He(),Z(),io(),ro(),l.dispose(),G.current=null,rt(null)}},[D,o,bt,Wt]),T(()=>{if(!(!ce||!ue))return ce.attachNavigator(ue)},[ce,ue]),T(()=>{if(!(!S||!Ne))return S.setGestures({navigable:false}),()=>S.setGestures({})},[S,Ne]);const Zt=x(false);T(()=>{var l;if(et)return;const t=!document.activeElement||document.activeElement===document.body;Zt.current&&t&&((l=ne.current)==null||l.focus()),Zt.current=false},[et]);const Ut=x(false);Bt(()=>{var t;De.current===null||De.current===Q||((t=G.current)==null||t.clear(),nt.current=null,Ut.current=true,fe("loading"))},[Q]),T(()=>{const t=G.current;if(p&&(Ht.current=true),!t||!ae||p)return;const l=Ut.current||De.current!==null&&De.current!==Q;(!t.isOpen||l)&&fe("loading");const f=we||Ht.current&&t.isOpen||l;De.current=Q,Ht.current=false,Ut.current=false,t.setImages(Kt,{world:un??void 0,fit:f})},[eo,D,B,ae,p]);const gn=x(s),[lo,Yt]=y(false);Bt(()=>{var t;s!==gn.current&&(gn.current=s,(t=G.current)==null||t.clear(),Yt(true),fe("loading"))},[s]);const mn=ve==="loading"&&(Kt.length>0||s==="loading")&&ae&&!p;return r(bo.Provider,{value:ie.hostLanguage,children:r("figure",{"aria-labelledby":ao,className:Jo("clover-canvas",P),"data-testid":"clover-canvas","data-status":ve,...yo(Et),"data-unloadable":Ye||void 0,"data-has-navigator":Vt,"data-fullscreen":ye,"data-exit":Ze||void 0,"data-controls":_n?Wn?"visible":"hidden":void 0,"data-media":Zn,"data-recording":u?"":void 0,"data-player":xe?"":void 0,"data-animated":W?"":void 0,"data-navigable":wt,"data-placeholder":Ie.length&&!xe?p:void 0,ref:ie.ref,onFocus:t=>{Zt.current=et&&t.target.id===`fullPage-${R}`},onKeyDown:t=>{if(t.key==="Escape"&&zt&&!t.defaultPrevented){t.preventDefault(),nn(false);return}if(t.key==="Escape"&&!t.defaultPrevented&&!t.currentTarget.querySelector(".clover-canvas-menu")&&bt()){t.preventDefault();return}qo(t,ne.current)},style:{position:"relative",width:"100%",height:"100%",margin:0,overflow:"hidden",isolation:"isolate"},children:[(tt||Vt)&&u&&r("div",{className:"clover-canvas-scrim","aria-hidden":"true"}),on&&r(Be,{fallback:null,children:r(Ca,{element:le,hideDelay:d==null?void 0:d.hideDelay,picture:ne,onChange:it})}),r(Po,{hidden:!Ze}),S&&(tt||Nt)&&r(ca,{renderer:ce,instance:R,config:tt??Ia,controlButtons:Pe,limits:Ft,placeholderIsMore:Nt&&!u,chapters:u?Y:void 0,mediaElement:B,onChapter:to,overStill:!!u&&p,request:d==null?void 0:d.request,placeholder:Nt&&r(Be,{fallback:null,children:r(xa,{instance:R,media:!!u,active:p,onToggle:qt,more:!!M&&(M.zoom||M.rotation||M.reset||M.fullPage)})}),fit:!re,more:te,choices:p?[]:Te,selections:H,onSelect:Xe,annotations:v.menu,hiddenPages:v.hiddenPages,onPageVisibilityChange:v.setPagesVisible,selectedAnnotation:v.selected,onAnnotationSelect:v.select,onAnnotationActivate:v.activate,captionId:_t?$t:void 0,captionOpen:zt,onCaptionToggle:()=>tn(t=>!t),placeId:Se?i:void 0,placeOpen:g,onPlaceToggle:()=>{Kn(true),ge(t=>!t)},language:b,children:tt&&E}),Vt&&r("div",{ref:de,className:"clover-canvas-navigator","data-testid":"clover-canvas-navigator","aria-hidden":"true"}),r("div",{ref:ne,className:"clover-canvas-viewport",style:{position:"absolute",inset:0,overflow:"hidden",zIndex:-1},"data-testid":"clover-canvas-viewport",role:J?"group":"img","aria-roledescription":oo,...dn.props,"aria-describedby":Mt.length?fn:void 0,"aria-keyshortcuts":Mt.map(({keys:t})=>t).join(" ")||void 0,"aria-busy":mn,tabIndex:0}),dn.node,Mt.length>0&&r("span",{id:fn,style:vo,children:Mt.map(({description:t},l)=>r(Xt.Fragment,{children:[l>0&&" ",r("span",{...Mn(ie.langOf(t)),children:Fe(t)})]},t))}),r(Eo,{kind:"image",shown:Ye&&!p}),Ne&&!p&&(w==null?void 0:w.text)&&r(Ro,{text:w.text,lang:w.lang||void 0}),(u==null?void 0:u.kind)==="audio"&&!xe&&Ce.length===0&&!p&&(w==null?void 0:w.text)&&r("p",{className:"clover-canvas-sound-label","aria-hidden":"true",...Mn(w.lang||void 0),children:w.text}),Ie.length>0&&!xe&&r(Be,{fallback:null,children:r(ba,{instance:R,stills:Ie,vertical:_==="top-to-bottom"||_==="bottom-to-top",media:!!u,active:p,lingering:ve==="loading"&&!lo,onToggle:qt,request:d==null?void 0:d.request})}),S&&u&&ae&&!p&&r(Be,{fallback:null,children:r(ga,{media:u,request:d==null?void 0:d.request,fillable:Gn,surface:S,instance:R,onElement:Yn,onFit:Xn,onCaptionChange:O,caption:Ee,navigable:wt,fullscreen:we&&!!(M!=null&&M.fullPage),isFullscreen:We,onEnded:je,chapters:Y,highlightedChapter:_e,onChapterHighlight:Pt,autoPlay:!xe&&Ie.length>0&&v.quietlyOpened!==Q,language:b,notes:v.timed,marked:v.placed,selectedAnnotation:v.selected,onAnnotationSelect:J?v.select:void 0,onAnnotationActivate:v.activate,player:xe&&n?{canvas:n[0],title:w,partOf:no}:void 0})}),ce&&W&&(F==null?void 0:F.frames[En(W)])&&!p&&r(Be,{fallback:null,children:r(va,{renderer:ce,frames:qn,byFrame:F.frames[En(W)],animationKey:W.id,sceneVersion:Ge,autoplay:(Cn=d==null?void 0:d.animation)==null?void 0:Cn.autoplay,loop:(wn=d==null?void 0:d.animation)==null?void 0:wn.loop,onEnded:je,language:b,duration:Number(W.duration),canvas:W,place:F.placements[n.indexOf(W)],onItems:Qn},W.id)}),gt&&J&&C&&r(gt.AnnotationState,{given:e,annotations:ht??C,scene:F,renderer:ce,sceneVersion:Ge,drawn:so,media:u,mediaElement:B,showPlaceholder:p,canvasKey:Q,openImages:an,openMedia:sn,host:ne,onModel:$e,refind:e.refind??0}),mn&&r(Go,{overlay:true}),X&&r(Be,{fallback:null,children:r(Ln,{id:`place-of-${R}`,open:yt,onClose:t=>{var l;pt(ze),t&&((l=document.getElementById(X.id))==null||l.focus())},feature:X.feature,name:X.name,language:b})}),Se&&Dn&&r(Be,{fallback:null,children:r(Ln,{id:i,open:g,onClose:t=>{var l;ge(false),t&&((l=document.getElementById(`place-${R}`))==null||l.focus())},feature:Se.feature,name:Se.name,language:b})}),_t&&r(Fo,{id:$t,canvases:Ae,comments:Tt,open:zt,onClose:nn,language:b})]})})};function Ba(e,o,s){return{fitCanvasRect(n,c,a){const h=o(),m=(h==null?void 0:h.canvases.findIndex(q=>q.id===n))??-1;return!h||m===-1?false:(e.fitBounds(Zo(h.canvases[m],h.placements[m],c),a),true)},getCanvasRegion(){const n=o();return n?Vn(e.getBounds(),n.canvases,n.placements):null},get backendKind(){return e.backendKind},get atHome(){return e.isAtHome},fitBounds:(n,c)=>e.fitBounds(n,c),fitItemRect:(n,c,a)=>e.fitItemRect(n,c,a),itemRectToWorld:(n,c)=>e.itemRectToWorld(n,c),getBounds:()=>e.getBounds(),getHomeBounds:()=>e.getHomeBounds(),getCamera:()=>e.getCamera(),home:n=>e.home(n),zoomBy:(n,c,a)=>e.zoomBy(n,c,a),panBy:(n,c,a)=>e.panBy(n,c,a),setRotation:(n,c)=>e.setRotation(n,c),getRotation:()=>e.getRotation(),rotateBy:n=>e.rotateBy(n),worldToScreenPoint:n=>e.worldToScreenPoint(n),screenToWorldPoint:n=>e.screenToWorldPoint(n),on:(n,c)=>e.on(n,c),zoomToAnnotation:s}}const Pa=[],Ea=[];function Nn(e,o,s=false){const n=Array.isArray(e)?e:e?[e]:[];return n.length?n.map((a,h)=>{const m=Qo(a.service);return!m&&!a.id?null:{id:`${h}:${a.id??m}|${a.region??""}`,service:m,url:a.id,width:a.width,height:a.height,region:a.region}}).filter(a=>a!==null):(Array.isArray(o)?o:o?[o]:[]).filter(Boolean).map((a,h)=>({id:`${h}:${a}`,...s?{service:a}:{url:a}}))}function Vn(e,o,s){let n=null;if(s.forEach((V,D)=>{const P=Math.max(e.x,V.x),d=Math.max(e.y,V.y),ee=Math.min(e.x+e.width,V.x+V.width)-P,K=Math.min(e.y+e.height,V.y+V.height)-d;if(ee<=0||K<=0)return;const te=ee*K;(!n||te>n.area)&&(n={index:D,area:te,clip:{x:P,y:d,width:ee,height:K}})}),!n)return null;const{index:c,clip:a}=n,h=o[c],m=s[c],q=Uo(h),j=q.width/m.width,b=q.height/m.height;return{canvasId:h.id,rect:{x:Math.round((a.x-m.x)*j),y:Math.round((a.y-m.y)*b),width:Math.round(a.width*j),height:Math.round(a.height*b)}}}export{ts as C,Ga as a,St as b,Za as c,Qa as d,Xa as e,es as f,Wa as g,Jt as h,Ua as i,Ya as j,Ja as r,_a as s,ja as t,Fn as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as c,u as a,t as d,l as p,
|
|
1
|
+
import{a as c,u as a,t as d,l as p,aO as v,k as m}from"./shared-ByrLMUQa.mjs";import{M as f,a as h}from"./Markup-DzUsOaNC.mjs";import{R as u}from"./ReadMore-f34RbHMm.mjs";import{E as b}from"./EntryBodies-Bld2RXeE.mjs";const T=({summary:s,metadata:n,comments:o,language:r})=>{const{t,langOf:l}=c();return a(m,{children:[d(s,r).text&&a(u,{children:a(f,{as:"p",markup:s,language:r,className:"clover-summary clover-canvas-caption-summary"})}),a(h,{metadata:n,language:r,className:"clover-metadata clover-canvas-caption-metadata"}),o!=null&&o.length?a("div",{className:"clover-canvas-caption-annotations",children:[a("p",{className:"clover-canvas-caption-annotations-label",...p(l("informationPanelTabsAnnotations")),children:t("informationPanelTabsAnnotations")}),a("ul",{children:o.map((i,e)=>a("li",{children:a(b,{bodies:v(i),language:r})},i.id??e))})]}):null]})};export{T as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as y,y as N,A as T,u as t,ao as L,l as b}from"./shared-ByrLMUQa.mjs";import C from"./ControlMenu-BW39OjKC.mjs";import{c as D,a as P}from"./Transport-DYjd2GnA.mjs";import{u as w}from"./useContainerName-DR_6TyDU.mjs";import{E as A}from"./EntryThumbnail-C5df3CaH.mjs";const B=({id:u,triggerId:p,label:v,labelLang:f,chapters:s,element:e,onChapter:g,overStill:E=false,request:h,onClose:n})=>{const i=w(v,f),[k,c]=y(()=>(e==null?void 0:e.currentTime)??0);N(()=>{if(!e)return;const r=()=>c(e.currentTime);return r(),e.addEventListener("timeupdate",r),e.addEventListener("seeked",r),()=>{e.removeEventListener("timeupdate",r),e.removeEventListener("seeked",r)}},[e]);const m=D(s,k),o=T(false),l=r=>{g(s[r].start),c(s[r].start)};return t(C,{"data-testid":"clover-canvas-chapters",id:u,onClose:n,triggerId:p,children:[t("fieldset",{className:"clover-canvas-menu-group",...i.props,children:s.map((r,a)=>t("label",{className:"clover-canvas-menu-item clover-canvas-chapters-item",onPointerDown:()=>{o.current=true},children:[t("input",{type:"radio",name:u,checked:a===m,onChange:()=>{E&&!o.current?c(s[a].start):l(a)},onClick:()=>{o.current&&n(true)},onKeyDown:d=>{o.current=false,d.key==="Enter"&&(d.preventDefault(),l(a),n(true))}}),t("span",{className:"clover-cue-time",children:L(r.start)})," ",t("span",{className:"clover-cue-text",...b(r.lang||void 0),children:r.label}),a===m&&t(A,{source:P(r),request:h,large:true})]},r.id??a))}),i.node]})};export{B as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as o}from"./shared-
|
|
1
|
+
import{u as o}from"./shared-ByrLMUQa.mjs";import{j as i}from"./classnames-DukgfdpI.mjs";import"./styles-BOXm_R8o.mjs";function s({open:e=false,className:r}){return o("svg",{"aria-hidden":"true",focusable:"false",width:"12",height:"12",viewBox:"0 0 12 12",className:i("clover-chevron",r),"data-open":e||void 0,children:o("path",{d:"M3 4.5l3 3 3-3",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}export{s as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as r,u as a,l as v}from"./shared-
|
|
1
|
+
import{t as r,u as a,l as v}from"./shared-ByrLMUQa.mjs";import x from"./ControlMenu-BW39OjKC.mjs";import{m as C}from"./layout-zjkkOHIj.mjs";import{u as z}from"./useContainerName-DR_6TyDU.mjs";import"./styles-BOXm_R8o.mjs";const P=({id:m,triggerId:u,label:b,labelLang:g,choices:i,selections:h,onSelect:y,onClose:f,language:s})=>{const d=z(b,g),N=i.some(e=>!r(e.label,s).text);return a(x,{"data-testid":"clover-canvas-choice",id:m,onClose:f,triggerId:u,children:[N&&d.node,i.map((e,k)=>{const t=r(e.label,s);return a("fieldset",{...t.text?{}:d.props,className:"clover-canvas-menu-group",children:[t.text&&a("legend",{className:"clover-canvas-menu-legend",...v(t.lang),children:t.text}),e.items.map((l,n)=>{const o=r(l.label,s),c=o.text||(l.image?"":String(n+1)),p=!C(l);return a("label",{className:"clover-canvas-menu-item","data-disabled":p||void 0,children:[a("input",{type:"radio",name:`${m}-${k}`,"aria-label":c?void 0:String(n+1),checked:(h[e.key]??0)===n,disabled:p,onChange:()=>y(e.key,n)}),l.image&&a("img",{alt:"",className:"clover-canvas-menu-image",decoding:"async",loading:"lazy",src:l.image}),c&&a("span",{...v(o.text?o.lang:void 0),children:c})]},n)})]},e.key)})]})};export{P as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as I,e as $,a as j,b as A,c as u,J as H,y as S,u as o,l as T}from"./shared-
|
|
1
|
+
import{D as I,e as $,a as j,b as A,c as u,J as H,y as S,u as o,l as T}from"./shared-ByrLMUQa.mjs";import{I as q}from"./Items-BsKByN_b.mjs";import{L as w}from"./Label-DElSTYS5.mjs";import{Summary as x,Id as D,Homepage as J}from"./Primitives-BdXIEpYW.mjs";import{j as L}from"./classnames-DukgfdpI.mjs";import{t as p}from"./heading-Cjt0f-Eu.mjs";import"./styles-BOXm_R8o.mjs";const G=I(function({headingLevel:r=3,className:v,...b},d){const{clover:n}=$("Collection"),{t:f,langOf:g}=j(),i=A(),a=u(e=>e.collection),l=u(e=>H(e.manifest));S(()=>{!a&&(l!=null&&l.id)&&n.openCollection(l.id)},[n,a,l]);const t=a??l;if(!t)return null;const s=t.homepage,c=p(r,`${i}-label`),m=(e,C)=>{const{as:h,title:y,group:N}=p(r,`${i}-${e}`);return o("section",{className:"clover-about-section",...N,children:[o(h,{className:"clover-about-heading",...T(g(e)),...y,children:f(e)}),C]})};return o("div",{ref:d,className:L("clover-about clover-collection",v),...t.label?c.group:null,...b,children:[o(w,{as:c.as,label:t.label,className:"clover-collection-title clover-title",...c.title}),o(x,{value:t.summary,className:"clover-about-summary"}),o(q,{of:"members",layout:"list"}),Array.isArray(s)&&s.length>0&&m("aboutHomepage",o(J,{value:s})),m("aboutCollection",o(D,{value:t.id}))]})});export{G as Collection};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{D as I,a as K,e as k,c as u,K as L,b as N,d as U,y as h,A as S,t as b,u as r,l as y}from"./shared-ByrLMUQa.mjs";import{i as j}from"./items-CjtUJjSU.mjs";import{j as B}from"./classnames-DukgfdpI.mjs";import"./styles-BOXm_R8o.mjs";const M=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End","PageUp","PageDown"]),O=100,H=I(function({onChange:s,className:A,...E},P){const{t:D,langOf:T}=K(),{clover:C,language:f}=k("CollectionSelect"),t=u(e=>e.collection),c=u(e=>L(e)??""),d=u(e=>{var l;return((l=e.manifest)==null?void 0:l.id)??""}),p=N(),[n,a]=U(null);h(()=>a(null),[c,t]);const m=S(-1/0),o=S(null);h(()=>{o.current=null},[d,t]);const g=e=>{!e||e===d||e===o.current||(o.current=e,s==null||s(e),C.goToManifest(e).finally(()=>{o.current===e&&(o.current=null)}))},w=()=>n===null||n===c||n===o.current?false:(a(null),true),v=j(t);if(v.length<2)return null;const i=b(t==null?void 0:t.label,f);return r("div",{ref:P,className:B("clover-collection-select",A),...E,children:[r("label",{htmlFor:`${p}-select`,className:"clover-collection-select-label",...y(i.text?i.lang:T("collectionLabel")),children:i.text||D("collectionLabel")}),r("select",{id:`${p}-select`,className:"clover-collection-select-control",value:n??c,onKeyDown:e=>{const{key:l}=e;l==="Enter"?g(n??c):l==="Escape"?w()&&e.preventDefault():(M.has(l)||l.length===1&&!e.ctrlKey&&!e.metaKey)&&(m.current=performance.now())},onBlur:w,onChange:e=>{const l=e.target.value;a(l),performance.now()-m.current>O&&g(l)},children:v.map(e=>{const l=b(e.label,f);return r("option",{value:e.id,...y(l.text?l.lang:void 0),children:l.text||e.id},e.id)})})]})});export{H as CollectionSelect};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as o}from"./shared-
|
|
1
|
+
import{u as o}from"./shared-ByrLMUQa.mjs";import{p as a}from"./playerSurface-BthXi9l2.mjs";import n from"./Connected-shq2_tc-.mjs";import{j as t}from"./classnames-DukgfdpI.mjs";import{b as m}from"./hooks-DhTYPPVG.mjs";function v({className:e,...r}){return m().some(i=>i.type==="Timeline")?o(n,{...r,className:t("clover-timeline",e),navigator:false,surface:a}):null}export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as v,c as u,y as S,T as b,u as C}from"./shared-
|
|
1
|
+
import{e as v,c as u,y as S,T as b,u as C}from"./shared-ByrLMUQa.mjs";import{S as q}from"./SceneView-D635_fRV.mjs";import{b as w,e as x}from"./hooks-DhTYPPVG.mjs";function M({label:i,language:d,options:t,...f}){const r=v("Scene"),{clover:s}=r,e=w().find(n=>n.type==="Scene"),a=x(),g=u(n=>{var o;return n.status==="loading"?"loading":((o=n.manifest)==null?void 0:o.id)??""}),c=u(n=>n.target);S(()=>{c&&e&&c.canvasId===e.id&&s.consumeTarget()},[c,e,s]);const l=(t==null?void 0:t.request)??s.request,m=b(()=>({...t,request:l}),[t,l]);return e?C(q,{...f,scene:e,manifestId:g,label:i??e.label??(a==null?void 0:a.label),language:d??r.language,options:m}):null}export{M as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as me,C as P,c as l,A as d,d as be,y as q,T as R,S as Se,q as f,as as u,u as we,at as Ie,au as Ae,av as Ce,O as xe,o as Le,aw as ke}from"./shared-ByrLMUQa.mjs";import{C as ye}from"./CanvasView-B752g1bm.mjs";import{u as Oe,a as Pe}from"./fromManifest-DbgwTeBo.mjs";import{j as F,k as qe}from"./layout-zjkkOHIj.mjs";import{s as Re}from"./show-link-BqrJDDMV.mjs";import{b as Te,a as Be,e as je,f as De}from"./hooks-DhTYPPVG.mjs";const ze=({options:i,onReady:T,onViewportChange:p,onMediaElement:m,onCaptionChange:I,caption:B,onEnded:b,placeholder:G=true,label:J,partOf:Q,language:W,annotations:A,chapters:X,...v})=>{const C=me("Canvas"),{clover:a}=C,Y=P(a.captions.subscribe,a.captions.get,a.captions.get),Z=B??Y,j=W??C.language,c=Te(),_=l(e=>ke(e.manifest,e.canvasId)),{direction:E}=Be(),n=je(),o=De(),D=l(e=>{var t;return e.status==="loading"?"loading":((t=e.manifest)==null?void 0:t.id)??""}),S=l(e=>e.target),H=l(e=>Ie(e.manifest,e.addedSets,e.search.set,e.regions)),ee=l(e=>Ce(e.manifest,e.addedSets,e.hiddenSets,e.shownSets,!!xe(e.manifest))),ae=l(e=>Le(e.manifest,e.addedSets,e.hiddenSets,e.shownSets)),x=l(e=>e.annotationId),M=d(x);M.current=x;const[te,ne]=be(0);q(()=>a.found.subscribe(e=>{e&&e===M.current&&ne(t=>t+1)}),[a]);const se=P(a.highlight.subscribe,a.highlight.get,a.highlight.get),ce=P(a.chapter.subscribe,a.chapter.get,a.chapter.get),h=c.map(e=>e.id).join("|"),ie=R(()=>{if(A)return A;const e=c.map(t=>t.id);return H.flatMap(t=>t.entries.filter(s=>e.includes(s.canvasId)).map(s=>({annotation:s.annotation,targetIndex:e.indexOf(s.canvasId),pageId:t.id,...t.label?{pageLabel:t.label}:{},...s.place?{place:s.place}:{},...s.layer?{layer:{key:s.layer.key,item:s.layer.item}}:{}})))},[A,H,c]),oe=S?(e=>!!e&&c.some(t=>t.id===e))(S.canvasId):false,K=d(null);oe&&(K.current=h);const re=G&&K.current!==h,L=d(null),k=d(null),y=R(()=>c.some(e=>F(e).length>0),[c]),g=y?c.find(e=>F(e).length>0):void 0,le=Oe(n,g,j,Ae),N=d(y);N.current=y;const O=B===void 0?C.language:void 0,de=g==null?void 0:g.id;q(()=>{if(!O||!g)return;const e=qe(g).find(t=>t.language&&Se(t.language,O));e&&a.captions.get()!==e.id&&a.captions.emit(e.id)},[O,de,a]);const r=f(()=>{const e=a.store.get().target;!e||!a.store.get().canvasId||Pe(e,L.current,k.current,N.current)&&a.consumeTarget()},[a]),U=d(h);q(()=>{U.current!==h&&(U.current=h,k.current=null),S&&r()},[S,h,r]);const w=d(T);w.current=T;const ue=f(e=>{var t;L.current=e,e.on("change",r),r(),(t=w.current)==null||t.call(w,e)},[r]),he=f(e=>{var s;const t=(s=L.current)==null?void 0:s.getCanvasRegion();a.viewport.emit(t?{canvasId:t.canvasId,region:{x:t.rect.x,y:t.rect.y,w:t.rect.width,h:t.rect.height}}:null),p==null||p(e)},[a,p]),ge=f(e=>{k.current=e,a.media.emit(e),e&&r(),m==null||m(e)},[a,r,m]),fe=f(()=>{b==null||b(),(u(n,"auto-advance")||u(o,"auto-advance"))&&a.next({autoplay:true,wrap:u(n,"repeat")})},[a,n,o,b]),ve=f(e=>void Re(a,e),[a]),V=(i==null?void 0:i.request)??a.request,$=u(o,"auto-advance")||u(n,"auto-advance"),z=u(o,"repeat")||u(n,"repeat"),pe=R(()=>({...i,request:V,animation:(i==null?void 0:i.animation)??{autoplay:$,loop:z}}),[i,V,$,z]);return!c.length&&D!=="loading"?null:we(ye,{...v,manifestId:D,navPlace:n==null?void 0:n.navPlace,canvases:c,ahead:_,viewingDirection:E,language:j,label:J??(o==null?void 0:o.label)??(n==null?void 0:n.label),partOf:Q??(n==null?void 0:n.label),options:pe,placeholder:re,onReady:ue,onViewportChange:he,onMediaElement:ge,caption:Z,onCaptionChange:e=>{a.captions.emit((e==null?void 0:e.id)??null),I==null||I(e)},onEnded:fe,annotations:ie,hiddenPages:ae,unlistedPages:ee,onPageVisibilityChange:(e,t)=>e.forEach(s=>a.setSetVisible(s,t)),chapters:X??le,highlightedChapter:ce,onChapterHighlight:e=>a.chapter.emit(e),selectedAnnotation:x,refind:te,highlightedAnnotation:se,onAnnotationSelect:e=>a.selectAnnotation(e),onAnnotationLink:v.onAnnotationLink??ve,onAnnotationActive:e=>{var t;a.highlight.emit(e),(t=v.onAnnotationActive)==null||t.call(v,e)}})};export{ze as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as W,a as X,e as Y,c as $,
|
|
1
|
+
import{D as W,a as X,e as Y,c as $,L as Z,C as O,d as E,b as _,T as tt,A as et,y as B,u as o,t as rt,l as k,k as st,v as nt,M as j,E as at,N as A}from"./shared-ByrLMUQa.mjs";import{imageSource as it}from"./thumbnail-Np4ftjUo.mjs";import{j as ot}from"./classnames-DukgfdpI.mjs";import{C as ct}from"./Chevron-CT1ntI6B.mjs";import{E as lt}from"./EntryThumbnail-C5df3CaH.mjs";import{S as ut}from"./Steps-BoNd47eB.mjs";import{C as dt}from"./Cue-B1IlY4Ae.mjs";import{u as mt}from"./useContainerName-DR_6TyDU.mjs";import"./styles-BOXm_R8o.mjs";const Et=W(function({as:d="nav",className:n,...u},h){const{t:p,langOf:c}=X(),{clover:s,language:F}=Y("Contents"),x=mt(p("informationPanelTabsContents"),c("informationPanelTabsContents"),u["aria-label"]!==void 0||u["aria-labelledby"]!==void 0),f=$(e=>Z(e.manifest)),T=$(e=>e.canvasId),z=$(e=>e.annotationId),S=O(s.media.subscribe,s.media.get,s.media.get),[D,w]=E(null),v=gt(f,T,S,D),H=O(s.chapter.subscribe,s.chapter.get,s.chapter.get),U=_(),C=tt(()=>pt(f,v),[f,v]),[G,L]=E(()=>new Map),M=et(new Set);B(()=>{const e=[...C].filter(r=>!M.current.has(r));M.current=C,L(r=>{if(!e.some(t=>r.has(t)))return r;const i=new Map(r);return e.forEach(t=>i.delete(t)),i})},[C]);const[b,J]=E();if(!f.length)return null;const K=e=>G.get(e.id)??C.has(e.id),P=(e,r)=>{var m,l;const i=(m=e.parts)==null?void 0:m[r];if(!i)return;J({node:e.id,index:r}),w(e.id);const t=A(e.id,r);i.region&&((l=s.store.get().regions)!=null&&l.entries.some(a=>a.id===t))?s.selectAnnotation(t):s.goTo(i.canvasId,i.region?{region:i.region}:{})},Q=e=>{if(e.canvasId){if(w(e.id),e.parts){P(e,0);return}if(e.canvasId===T&&e.time&&S){at(S,e.time.start);return}s.goTo(e.canvasId,{...e.time?{time:e.time.start,autoplay:true}:{},...e.region?{region:e.region}:{}})}},R=(e,r)=>{var l;const i=r.findIndex((a,y)=>!!a.region&&A(e.id,y)===z),t=(b==null?void 0:b.node)===e.id&&((l=r[b.index])==null?void 0:l.canvasId)===T?b.index:-1,m=i>=0?i:t>=0?t:r.findIndex(a=>a.canvasId===T);return{position:m,total:r.length,step:a=>P(e,m+a)}},q=(e,r,i=false)=>o("ol",{className:"clover-contents-list",id:r,hidden:i,children:e.map((t,m)=>{const l=rt(t.label,F),a=r?`${r}-${m}`:`${U}-${m}`,y=t.children.length>0,I=y&&K(t),N=t.id===v?it(t.thumbnail):null;return o("li",{className:"clover-contents-item",children:[o("div",{className:"clover-contents-row","data-current":t.id===v?"true":void 0,children:[o("button",{type:"button",id:`${a}-entry`,className:"clover-contents-button","data-trail":C.has(t.id)?"true":void 0,"aria-current":t.id===v?"true":void 0,"data-highlighted":t.id===H?"true":void 0,disabled:!t.canvasId,onMouseEnter:()=>s.chapter.emit(t.id),onMouseLeave:()=>s.chapter.emit(null),onFocus:()=>s.chapter.emit(t.id),onBlur:()=>s.chapter.emit(null),"data-timed":t.time?"true":void 0,"data-pictured":N?"true":void 0,...k(l.text&&!t.time&&!N?l.lang:void 0),onClick:()=>Q(t),children:t.time||N?o(st,{children:[t.time&&o(dt,{start:t.time.start,className:"clover-contents-time"}),o("span",{className:"clover-cue-text",...k(l.text?l.lang:void 0),children:l.text||t.id}),o(lt,{source:N,request:s.request,large:true})]}):l.text||t.id}),t.id===v&&t.parts&&t.parts.length>1&&o(ut,{className:"clover-contents-steps",steps:R(t,t.parts)}),y&&o("button",{type:"button",className:"clover-contents-toggle","aria-expanded":I,"aria-controls":`${a}-list`,"aria-labelledby":`${a}-toggle ${a}-entry`,onClick:()=>L(V=>new Map(V).set(t.id,!I)),children:[o("span",{id:`${a}-toggle`,style:nt,...k(c("contentsSectionsIn")),children:p("contentsSectionsIn")}),o(ct,{open:I,className:"clover-contents-chevron"})]})]}),y&&q(t.children,`${a}-list`,!I)]},t.id)})});return o(d,{ref:h,...x.props,className:ot("clover-contents",n),...u,children:[x.node,q(f)]})});function pt(g,d){const n=new Set;if(!d)return n;const u=(h,p)=>h.some(c=>c.id===d?(p.forEach(s=>n.add(s)),true):u(c.children,[...p,c.id]));return u(g,[]),n}function gt(g,d,n,u){const[h,p]=E(()=>j(g,d,void 0,u));return B(()=>{const c=()=>p(j(g,d,n==null?void 0:n.currentTime,u));if(c(),!!n)return n.addEventListener("timeupdate",c),n.addEventListener("seeked",c),()=>{n.removeEventListener("timeupdate",c),n.removeEventListener("seeked",c)}},[g,d,n,u]),h}export{Et as Contents};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as k,
|
|
1
|
+
import{A as k,ai as L,_ as T,y as x,u as S}from"./shared-ByrLMUQa.mjs";import{j as B}from"./classnames-DukgfdpI.mjs";import"./styles-BOXm_R8o.mjs";const j=({id:l,triggerId:c,onClose:o,"data-testid":u,className:m,holds:r,inside:f=false,children:b})=>{const i=k(null);return L(true,()=>o(false)),T(()=>{const t=i.current;t&&f&&M(t)},[f]),x(()=>{const t=i.current,s=(t==null?void 0:t.querySelector('input[type="radio"]:checked'))??(t==null?void 0:t.querySelector('input[type="radio"]:not(:disabled)'))??(t==null?void 0:t.querySelector("input"))??(t==null?void 0:t.querySelector('[role="option"][tabindex="0"]')),d=s==null?void 0:s.closest('label, [role="option"]');if(t&&d){const n=d.offsetTop+d.offsetHeight;n>t.scrollTop+t.clientHeight&&(t.scrollTop=n-t.clientHeight),d.offsetTop<t.scrollTop&&(t.scrollTop=d.offsetTop)}s==null||s.focus({preventScroll:true});const y=n=>{var a,v,p;const e=n.target;(a=i.current)!=null&&a.contains(e)||(v=document.getElementById(c))!=null&&v.contains(e)||e&&((p=r==null?void 0:r())!=null&&p.contains(e))||o(false)},E=n=>{var p,w;if(n.key!=="Escape")return;const e=document.activeElement;if(!!((p=i.current)!=null&&p.contains(e)||(w=document.getElementById(c))!=null&&w.contains(e))){n.preventDefault(),o(true);return}const v=h=>{h===n&&!n.defaultPrevented&&o(false)};document.addEventListener("keydown",v,{once:true})},g=n=>{var a;const e=n.target;e!=null&&e.closest(".clover-canvas-viewport")&&((a=i.current)!=null&&a.contains(e)||o(false))};return document.addEventListener("pointerdown",y),document.addEventListener("keydown",E,true),document.addEventListener("focusin",g),()=>{document.removeEventListener("pointerdown",y),document.removeEventListener("keydown",E,true),document.removeEventListener("focusin",g)}},[c,o,r]),S("div",{className:B("clover-canvas-menu",m),"data-testid":u,id:l,ref:i,children:b})};function M(l){const c=l.getBoundingClientRect();let o=0,u=document.documentElement.clientWidth;for(let r=l.parentElement;r;r=r.parentElement){if(getComputedStyle(r).overflowX==="visible")continue;const f=r.getBoundingClientRect();o=Math.max(o,f.left),u=Math.min(u,f.right);break}const m=Math.max(o-c.left,Math.min(0,u-c.right));m&&(l.style.translate=`${m}px 0`)}export{j as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{y as l}from"./shared-ByrLMUQa.mjs";import{u}from"./useControlsVisibility-Dig_1-0T.mjs";function f({element:i,hideDelay:r,picture:s,onChange:o}){const t=u(i,r,s);return l(()=>o(t),[t,o]),null}export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as m,b as f,d as C,A as b,q as u,u as e,l as k,v as N,P as x,z as y}from"./shared-
|
|
1
|
+
import{a as m,b as f,d as C,A as b,q as u,u as e,l as k,v as N,P as x,z as y}from"./shared-ByrLMUQa.mjs";import"./styles-BOXm_R8o.mjs";const I=y(()=>import("./ControlMenu-BW39OjKC.mjs"));function q({position:n,total:o,list:p}){const{t:h,langOf:v}=m(),r=`${f().replace(/:/g,"")}-count`,s=`${r}-menu`,[a,c]=C(false),i=b(null),g=u(()=>{var l;return(l=i.current)==null?void 0:l.closest(".clover-pager")},[]),t=u(l=>{var d;c(false),l&&((d=document.getElementById(r))==null||d.focus())},[r]);return e("span",{className:"clover-pager-count",ref:i,children:[e("button",{type:"button",id:r,className:"clover-pager-count-button","aria-controls":a?s:void 0,"aria-expanded":a,onClick:()=>c(!a),children:[e("span",{className:"clover-pager-position","aria-live":"polite",children:[e("span",{"aria-hidden":n>=0||void 0,children:[n>=0?n+1:"\u2013"," / ",o]}),n>=0&&e("span",{style:N,...k(v("canvasPosition")),children:h("canvasPosition",{index:n+1,total:o})}),e("span",{className:"clover-pager-room","aria-hidden":"true",hidden:true,children:[o," / ",o]})]}),e("svg",{"aria-hidden":"true",focusable:"false",width:"12",height:"12",viewBox:"0 0 12 12",children:e("path",{d:"M3 4.5l3 3 3-3",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]}),a&&e(x,{fallback:null,children:e(I,{id:s,triggerId:r,onClose:t,holds:g,inside:true,className:"clover-pager-menu",children:e("div",{className:"clover-collection clover-pager-list",children:p(()=>t(true))})})})]})}export{q as C};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as e,ao as m}from"./shared-ByrLMUQa.mjs";import{j as i}from"./classnames-DukgfdpI.mjs";import"./styles-BOXm_R8o.mjs";function s({start:o,className:r}){return e("span",{className:i("clover-cue-time",r),children:m(o)})}export{s as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as te,A as S,T as oe,y as F,_ as le,d as G,u as r,b as re,v as ce,k as ie}from"./shared-D2pvbPvF.mjs";import{u as se,a as de,b as J,c as me,B as ue,S as ve,d as Q,e as pe,P as he,f as fe,p as be}from"./viewer-D-AQ7mGw.mjs";import{a as ge,d as ne,g as we,h as ye}from"./hooks-Bo5GjPGX.mjs";import{B as xe}from"./Body-CTzmxY8R.mjs";import{stillSource as Se,resolveThumbnail as Ee}from"./thumbnail-By5wfGlE.mjs";import{a as Le}from"./index-DhlRi3H9.mjs";import{t as Te}from"./heading-Cjt0f-Eu.mjs";import{R as Ae}from"./Root-J9v7nQ6o.mjs";import{Position as ke}from"./Position-Bh1Iq4d6.mjs";import{T as Ne}from"./Tip-Dv-gYN8n.mjs";import{L as ze}from"./Label-CVfL9bMO.mjs";import{Download as De}from"./Download-Dsei4KG3.mjs";import{P as Me,L as Pe}from"./Provider-BUDzNTyJ.mjs";import{S as qe}from"./Status-C49DxNaY.mjs";import{I as Oe}from"./Items-DCRr750U.mjs";const Re=1600,Be=200,X=.25,Fe=1500,Y=typeof window>"u"?F:le,ae=n=>{const d=Number(n==null?void 0:n.width),l=Number(n==null?void 0:n.height);return d>0&&l>0?d/l:void 0};function Ie({collapseControls:n,canvasOptions:d,children:l}){const{clover:p}=te("Document"),b=ge(),h=ne(),s=S(null),E=S(null),g=S(null),T=b.direction==="right-to-left"||b.direction==="bottom-to-top",m=oe(()=>b.views.map(e=>{var c;const t=e.map(u=>b.canvases[u]),o=T?[...t].reverse():t,i=o.map(ae);return{key:t.map(u=>u.id).join("|"),first:(c=t[0])==null?void 0:c.id,canvases:o,ratio:i.every(Boolean)?i.reduce((u,I)=>u+I,0):void 0}}),[b,T]),w=Math.max(0,h.position),A=S({sheets:m,position:w});A.current={sheets:m,position:w};const k=S(null),f=S(null),D=S(0),N=S(()=>{}),x=S(false),V=e=>{var t;return(t=E.current)==null?void 0:t.children[e]},z=e=>{const t=s.current,o=V(e);return!t||!o||o===g.current?0:Math.min(o.offsetTop,t.scrollHeight-t.clientHeight)},K=()=>{const e=g.current,t=V(A.current.position);if(e){if(!t||t===e){e.style.top="0px",e.style.height="100%";return}e.style.top=`${t.offsetTop}px`,e.style.height=`${t.offsetHeight}px`}};function U(){const e=s.current;if(!e||e.hasAttribute("data-scrolling")||f.current!==null)return;const t=z(A.current.position);D.current=t,!(Math.abs(e.scrollTop-t)<=1)&&(x.current=true,e.scrollTop=t,requestAnimationFrame(()=>requestAnimationFrame(()=>x.current=false)))}Y(K),F(()=>{const e=new ResizeObserver(()=>{K(),U()});return E.current&&e.observe(E.current),s.current&&e.observe(s.current),()=>e.disconnect()},[]);const a=()=>{N.current();for(const[e,t]of[[s.current,"data-scrolling"],[g.current,"data-moved"]])e&&!e.hasAttribute(t)&&e.setAttribute(t,"")},O=()=>{const e=s.current,t=g.current;if(!e||!t)return;N.current(),D.current=e.scrollTop;const o=()=>{const _=t.querySelector(".clover-canvas");return!_||_.getAttribute("data-status")!=="loading"||_.getAttribute("data-placeholder")==="true"};let i=0;const c=new MutationObserver(()=>o()&&H()),u=setTimeout(()=>H(),Fe),I=()=>{cancelAnimationFrame(i),clearTimeout(u),c.disconnect()},H=()=>{I(),t.removeAttribute("data-moved"),e.removeAttribute("data-scrolling")};N.current=I,i=requestAnimationFrame(()=>{i=requestAnimationFrame(()=>{if(o())return H();c.observe(t,{attributes:true,subtree:true,attributeFilter:["data-status","data-placeholder"]})})})};F(()=>{const e=s.current,t=g.current;if(!e||!t)return;const o=()=>{const c=t.querySelector(".clover-canvas"),u=t.querySelector("video");e.toggleAttribute("data-covered",!!(c&&u&&u.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA&&c.getAttribute("data-media")==="video"&&c.getAttribute("data-placeholder")!=="true"&&!t.hasAttribute("data-moved")))};o();const i=new MutationObserver(o);i.observe(t,{attributes:true,childList:true,subtree:true,attributeFilter:["data-media","data-placeholder","data-moved"]});for(const c of["loadeddata","emptied"])t.addEventListener(c,o,true);return()=>{i.disconnect();for(const c of["loadeddata","emptied"])t.removeEventListener(c,o,true)}},[]);const M=(e,t=false)=>{var u;const o=s.current;if(!o)return;const i=z(e);if(Math.abs(o.scrollTop-i)<=1)return O();a(),f.current=e;const c=t||((u=window.matchMedia)==null?void 0:u.call(window,"(prefers-reduced-motion: reduce)").matches);o.scrollTo({top:i,behavior:c?"auto":"smooth"})},L=S(null);Y(()=>{const e=L.current!==m;if(L.current=m,B(false),k.current===w&&!e){k.current=null;return}k.current=null,M(w,e)},[w,m]),F(()=>{const e=s.current;if(!e)return;let t=0,o,i=false;const c=v=>{const P=A.current.sheets.length;if(P<2)return 0;let y=0;for(let W=0;W<P&&z(W)<=v+.5;W++)y=W;if(y>=P-1)return P-1;const C=z(y),q=(v-C)/Math.max(1,z(y+1)-C);return v>=D.current?q>X?y+1:y:q<1-X?y:y+1},u=()=>{if(t=0,f.current!==null)return;const v=c(e.scrollTop),{sheets:P,position:y}=A.current;v===y||!P[v]||(a(),B(false),k.current=v,p.goTo(P[v].first))},I=()=>{if(i)return;const{sheets:v,position:P}=A.current,y=e.scrollTop,C=f.current;f.current=null;const q=C!==null&&Math.abs(y-z(C))<=1?C:c(y);if(!v[q])return O();q!==P&&(a(),B(false),k.current=q,p.goTo(v[q].first)),M(q)},H=()=>{clearTimeout(o),o=setTimeout(I,Be)},_=()=>{x.current||(a(),H(),t||(t=requestAnimationFrame(u)))},$=v=>{f.current=null,(v.type==="touchstart"||v.type==="pointerdown"&&v.target===e)&&(i=true)},j=()=>{i&&(i=false,H())};return e.addEventListener("scroll",_,{passive:true}),e.addEventListener("wheel",$,{passive:true}),e.addEventListener("touchstart",$,{passive:true}),e.addEventListener("pointerdown",$),window.addEventListener("touchend",j),window.addEventListener("touchcancel",j),window.addEventListener("pointerup",j),()=>{cancelAnimationFrame(t),clearTimeout(o),N.current(),e.removeEventListener("scroll",_),e.removeEventListener("wheel",$),e.removeEventListener("touchstart",$),e.removeEventListener("pointerdown",$),window.removeEventListener("touchend",j),window.removeEventListener("touchcancel",j),window.removeEventListener("pointerup",j)}},[p]);const[R,Z]=G(null);function B(e){const t=s.current;!t||t.hasAttribute("data-zoomed")===e||(t.toggleAttribute("data-zoomed",e),e&&U())}return F(()=>{if(R)return R.on("viewport",()=>B(!R.atHome))},[R]),r("div",{ref:s,className:"clover-template-document-column",onKeyDown:e=>{if(!(e.defaultPrevented||e.altKey||e.ctrlKey)){if(e.key==="PageDown"&&h.hasNext)h.next();else if(e.key==="PageUp"&&h.hasPrevious)h.previous();else return;e.preventDefault()}},children:r("div",{ref:E,className:"clover-template-document-sheets","data-single":m.length<2||void 0,children:[m.map((e,t)=>r("div",{"aria-hidden":"true",className:"clover-template-document-sheet","data-active":t===w||void 0,"data-fill":e.ratio===void 0||void 0,onClick:()=>t!==w&&p.goTo(e.first),style:e.ratio===void 0?void 0:{"--ratio":e.ratio},children:e.canvases.map(o=>r(_e,{canvas:o},o.id))},e.key)),r("div",{ref:g,className:"clover-template-document-live",children:r(xe,{className:"clover-template-document-body",collapseControls:n,options:d,onReady:Z,children:l})})]})})}function He(n){const[d,l]=G(()=>typeof IntersectionObserver>"u");return F(()=>{if(d||!n)return;const p=new IntersectionObserver(b=>{b.some(h=>h.isIntersecting)&&(l(true),p.disconnect())},{root:n.closest(".clover-template-document-column"),rootMargin:"100% 0px"});return p.observe(n),()=>p.disconnect()},[n,d]),d}function _e({canvas:n}){const{clover:d}=te("Document"),l=oe(()=>Se(n),[n]),[p,b]=G(null),h=He(p),[s,E]=G(l==null?void 0:l.src);F(()=>{if(!l||l.src)return E(l==null?void 0:l.src);if(!h)return;let m=true;return Ee(l,Re,d.request).then(w=>m&&E(w)),()=>{m=false}},[l,d,h]);const g=ae(n),T=g?{aspectRatio:String(g)}:void 0;return s?r("img",{alt:"",decoding:"async",loading:"lazy",src:s,style:T}):r("span",{ref:b,style:T})}Le(48,"templates/document/Document","@layer clover{.clover-template-document{--clover-template-document-height: min(85vh, 56rem);display:flex;flex-direction:column;height:var(--clover-template-document-height);min-height:min-content;overflow:hidden;background-color:var(--clover-color-secondary, #fff);color:var(--clover-color-primary, #1a1d1e)}@supports (height: 1svh){.clover-template-document{--clover-template-document-height: min(85svh, 56rem)}}.clover-template-document-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:var(--clover-space-s);padding:var(--clover-space-m) var(--clover-inset);border-bottom:1px solid var(--clover-color-secondary-muted, #e6e8eb)}.clover-template-document-provider{max-width:100%;margin-inline-start:auto}.clover-template-document-toolbar .clover-download-groups{flex-direction:row;flex-wrap:wrap;column-gap:var(--clover-space-m)}.clover-template-document-toolbar .clover-download-group{display:flex;flex-wrap:wrap;align-items:baseline;column-gap:var(--clover-space-s)}.clover-template-document-toolbar .clover-download-title{margin:0}.clover-template-document-toolbar .clover-download-list{display:flex;flex-wrap:wrap;column-gap:var(--clover-space-s)}.clover-template-document-title{flex:1 1 6rem;min-width:0}button.clover-template-document-sidebar-toggle{display:inline-flex;flex:none;align-items:center;gap:var(--clover-space-xs);min-height:var(--clover-control);padding-block:0;padding-inline:var(--clover-space-s) calc(var(--clover-space-xs) + var(--clover-space-3xs));border:0;border-radius:var(--clover-radius-pill, 2rem);background-color:var(--clover-color-control, #1a1d1e);color:var(--clover-color-control-glyph, #fff);cursor:pointer;transition:var(--clover-transition, all .2s cubic-bezier(.16, 1, .3, 1))}button.clover-template-document-sidebar-toggle:is(:hover,:focus-visible){background-color:var(--clover-color-accent, #0065c3)}:where([data-high-contrast]) button.clover-template-document-sidebar-toggle:is(:hover,:focus-visible){background-color:var(--clover-accent-fill)}:where([data-high-contrast]) button.clover-template-document-sidebar-toggle:hover:not(:focus-visible){outline:var(--clover-accent-ring-hover);outline-offset:1px}button.clover-template-document-sidebar-toggle:focus-visible{outline:2px solid var(--clover-color-accent, #0065c3);outline-offset:2px}.clover-template-document-sidebar-toggle .clover-template-document-position{color:inherit;font-size:var(--clover-text-xs);white-space:nowrap}.clover-template-document-sidebar-toggle .clover-template-document-position>.clover-pager-room[hidden]{display:none}.clover-template-document-panes{position:relative;flex:1 1 auto;min-height:16rem}.clover-template-document-panes:is([data-panel=over],[data-narrow])>.clover-template-document-main{isolation:isolate}.clover-template-document-sidebar{contain:size;overflow-y:auto;padding:var(--clover-inset);scroll-padding-top:calc(2 * var(--clover-inset) + var(--clover-control));background-color:var(--clover-color-secondary, #fff)}.clover-template-document-sidebar-closed{position:absolute;top:var(--clover-inset);inset-inline-start:var(--clover-inset);z-index:3}@media (width < 31rem){.clover-template-document-toolbar,.clover-template-document-sidebar-closed,.clover-template-document-spine{--clover-inset: var(--clover-space-m)}}.clover-template-document-sidebar[hidden]{display:none}.clover-template-document-sidebar+.clover-split-handle:before{inset-inline-start:0;inset-inline-end:calc(3px - var(--clover-space-l))}.clover-template-document-sidebar .clover-items[data-layout] .clover-items-figure{grid-template-columns:repeat(var(--parts, 1),minmax(0,1fr));gap:var(--clover-space-xs) 0}.clover-template-document-sidebar .clover-items[data-layout] :is(.clover-items-pictures,.clover-items-caption){grid-column:1 / -1;grid-template-columns:subgrid}.clover-template-document-sidebar .clover-items[data-layout] .clover-items-label{contain:inline-size}.clover-template-document-sidebar .clover-items[data-layout] .clover-items-picture[data-empty],.clover-template-document-sidebar .clover-items[data-layout] .clover-items-picture img{width:100%;height:auto;max-height:20rem;aspect-ratio:var(--clover-items-ratio, auto);object-fit:contain}.clover-template-document-sidebar .clover-items[data-layout] .clover-items-caption{font-size:var(--clover-text-s)}.clover-template-document-main{position:relative;overflow:hidden;background-color:var(--clover-color-secondary-muted, #e6e8eb)}.clover-template-document-column{position:absolute;inset:0;overflow-x:hidden;overflow-y:auto;container-type:size}.clover-template-document-sheets{position:relative}.clover-template-document-sheet{--clover-template-document-tease: calc(2 * var(--clover-inset));display:flex;justify-content:center;box-sizing:border-box;height:min(100cqh - var(--clover-template-document-tease),(100cqw - 2 * var(--clover-inset)) / var(--ratio) + 2 * var(--clover-inset));padding:var(--clover-inset);transition:opacity .2s ease,height .24s cubic-bezier(.16,1,.3,1)}.clover-template-document-sheet[data-fill]{height:calc(100cqh - var(--clover-template-document-tease))}.clover-template-document-column[data-zoomed] .clover-template-document-sheet[data-active]{height:100cqh}.clover-template-document-column[data-zoomed] .clover-template-document-sheet[data-active]>*,.clover-template-document-column[data-covered] .clover-template-document-sheet[data-active]>*{visibility:hidden}.clover-template-document-column[data-zoomed] .clover-template-document-sheet:not([data-active]){--clover-template-document-muted: 0;pointer-events:none}.clover-template-document-sheet:not([data-active]){--clover-template-document-muted: .618;cursor:pointer;opacity:var(--clover-template-document-muted)}.clover-template-document-sheet:not([data-active]):hover{--clover-template-document-muted: .809}@media (prefers-reduced-motion: reduce){.clover-template-document-sheet{transition:none}}.clover-template-document-sheets[data-single]>.clover-template-document-sheet{--clover-template-document-tease: 0px}.clover-template-document-sheet>*{display:block;height:100%;min-width:0}.clover-template-document-sheet[data-fill]>*{object-fit:contain}.clover-template-document-live{--clover-body-height: 100%;position:absolute;inset-inline:0;top:0;height:100%;transition:opacity .16s ease}.clover-template-document-body .clover-canvas{--clover-canvas-inset: var(--clover-inset);background-color:transparent}.clover-template-document-live[data-moved]:not(:focus-within){opacity:0;pointer-events:none}.clover-template-document-column[data-scrolling] .clover-template-document-live:not(:focus-within) .clover-canvas-controls>*{--clover-controls-shown: 0;--clover-controls-events: none}.clover-template-document-column:not([data-zoomed]) :not(.clover-scene)>.clover-canvas-viewport{touch-action:pan-y}.clover-template-document-scrim[data-for=sidebar]{z-index:2}.clover-template-document-panes[data-narrow]{--clover-template-sidebar-width: min(14rem, 80%)}.clover-template-document-panes[data-narrow]>.clover-template-document-sidebar{position:absolute;inset-block:0;inset-inline-start:0;z-index:3;width:var(--clover-template-sidebar-width);border-inline-end:1px solid var(--clover-color-secondary-muted, #e6e8eb);--clover-template-inner: right;--clover-template-toward: 1}.clover-template-document-panes[data-narrow]>.clover-template-document-sidebar:dir(rtl){--clover-template-inner: left;--clover-template-toward: -1}.clover-template-document-spine{position:relative;z-index:4;flex:none;width:0}.clover-template-document-spine>*{position:absolute;top:var(--clover-inset);inset-inline-start:-1.5px;translate:-50%}.clover-template-document-spine:dir(rtl)>*{translate:50%}.clover-template-document-spine[data-for=sidebar]>*{inset-inline:auto calc(1.5px - var(--clover-control) / 2);translate:none}.clover-template-document-panes[data-narrow]>.clover-template-document-spine[data-for=sidebar]{inset-inline-start:var(--clover-template-sidebar-width)}.clover-template-document-panes[data-narrow]>.clover-template-document-spine[data-for=sidebar]>*{inset-inline-end:calc(var(--clover-control) / -2)}}");function at({className:n,defaultSidebarOpen:d,singleItem:l=false,defaultPanelOpen:p=false,panelLayout:b="accordion",panelSections:h,panelLabels:s,download:E=true,languages:g=true,interfaceLanguages:T=true,headingLevel:m=2,storageKey:w="clover-template-document",collapseControls:A,canvasOptions:k,...f}){const D=Te(m,`${re().replace(/:/g,"")}-title`);return r(Ae,{className:["clover-template-document",n].filter(Boolean).join(" "),...D.group,...f,children:r(Ce,{title:D,defaultSidebarOpen:d,singleItem:l,defaultPanelOpen:p,panelLayout:b,panelSections:h,panelLabels:s,download:E,languages:g,interfaceLanguages:T,headingLevel:m,storageKey:w,collapseControls:A,canvasOptions:k})})}const ee=n=>n+1,$e=9,je=40;function Ce({defaultSidebarOpen:n,singleItem:d,defaultPanelOpen:l,download:p,languages:b,interfaceLanguages:h,headingLevel:s=2,storageKey:E,panelLayout:g,panelSections:T,panelLabels:m,collapseControls:w,canvasOptions:A,title:k}){const f=we(),D=ye(),N=D("templateSidebar"),x=re().replace(/:/g,""),V=ne(),z=S(null),K=S(null),U=se(),a=de({id:`${x}-sidebar`,beside:J(z,je),defaultOpen:n??true,side:"start",focus:o=>o.querySelector('[role="option"][aria-selected="true"]'),slides:false,alongside:K,followFocus:U}),O=V.total>(d?0:1),M=O&&a.open,L=me({id:`${x}-panel`,beside:J(z,ue+(M?$e:0)),defaultOpen:!!l,followFocus:U,sections:T}),R=o=>{var i,c;a.over&&((c=(i=o.target).closest)!=null&&c.call(i,`[aria-controls~="${x}-sidebar"]`))&&be()},Z=()=>{a.over&&a.close()},B=L.docked,e=L.toggle,t=O&&r("button",{type:"button",className:"clover-template-document-sidebar-toggle","aria-expanded":a.open,"aria-controls":`${x}-sidebar`,lang:D("templateSidebarToggle"),onClick:()=>a.setOpen(!a.open),children:[r("svg",{"aria-hidden":"true",focusable:"false",width:"16",height:"16",viewBox:"0 0 16 16",fill:a.open?"currentColor":"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:[r("rect",{x:"1.5",y:"2",width:"5.5",height:"4.5",rx:"1"}),r("rect",{x:"1.5",y:"9.5",width:"5.5",height:"4.5",rx:"1"}),r("path",{d:"M9.5 4.25h5M9.5 11.75h5",fill:"none"})]}),r("span",{style:ce,children:f("templateSidebarToggle")}),r(ke,{className:"clover-template-document-position"}),r(Ne,{label:f("templateSidebarToggle")})]});return r(ie,{children:[r("header",{className:"clover-template-document-toolbar",children:[r(ze,{as:k.as,className:"clover-template-document-title clover-template-title clover-title",...k.title}),p&&r(De,{headingLevel:ee(s)}),r(Me,{className:"clover-template-document-provider",children:r(Pe,{})})]}),r(qe,{loading:false}),r(ve,{ref:z,className:"clover-template-document-panes clover-template-panes","data-sidebar":M?"open":"closed","data-narrow":a.over||void 0,"data-panel":L.splitProps["data-panel"],storageKey:E||void 0,onKeyDown:o=>{L.onKeyDown(o),a.onKeyDown(o)},onPointerOver:o=>{L.splitProps.onPointerOver(o),R(o)},onFocus:o=>{L.splitProps.onFocus(o),R(o)},children:[r(Q,{ref:a.pane,as:"aside",id:`${x}-sidebar`,name:"sidebar",className:["clover-template-document-sidebar",a.over&&"clover-template-float"].filter(Boolean).join(" "),"aria-label":N?void 0:f("templateSidebar"),"aria-labelledby":N?`${x}-sidebar-name`:void 0,size:"13rem",min:a.over?void 0:"8rem",max:"24rem",hidden:!M,children:[N&&r("span",{hidden:true,id:`${x}-sidebar-name`,lang:N,children:f("templateSidebar")}),r(Oe,{layout:"list",singleItem:d,"aria-label":N?void 0:f("templateSidebar"),thumbnailSize:320,onSelect:Z})]}),M&&!a.over&&r(pe,{"aria-controls":`${x}-sidebar`}),M&&r("div",{ref:K,className:"clover-template-document-spine","data-for":"sidebar",children:t}),r(Q,{ref:L.main,className:"clover-template-document-main",min:M&&!a.over||B?he:void 0,children:[O&&!a.open&&r("div",{className:"clover-template-document-sidebar-closed",children:t}),r(Ie,{collapseControls:w,canvasOptions:A,children:!B&&e})]}),r(fe,{pane:L,className:"clover-template-document-panel",layout:g,sections:T,labels:m,headingLevel:ee(s),download:false,languages:b,interfaceLanguages:h}),O&&a.scrim&&r("div",{className:"clover-template-document-scrim clover-template-scrim","data-for":"sidebar",...a.scrim})]})]})}export{at as Document};
|
|
1
|
+
import{e as te,A as S,T as oe,y as F,_ as le,d as G,u as r,b as re,v as ce,k as ie}from"./shared-ByrLMUQa.mjs";import{u as se,a as de,b as J,c as me,B as ue,S as ve,d as Q,e as pe,P as he,f as fe,p as be}from"./viewer-f_6tefcG.mjs";import{a as ge,d as ne,g as we,h as ye}from"./hooks-DhTYPPVG.mjs";import{B as xe}from"./Body-CQuiRv9p.mjs";import{stillSource as Se,resolveThumbnail as Ee}from"./thumbnail-Np4ftjUo.mjs";import{a as Le}from"./index-Ciz5x8Tt.mjs";import{t as Te}from"./heading-Cjt0f-Eu.mjs";import{R as Ae}from"./Root-CEtLCE4Y.mjs";import{Position as ke}from"./Position-oFMJoo4P.mjs";import{T as Ne}from"./Tip-mcI7IRQh.mjs";import{L as ze}from"./Label-DElSTYS5.mjs";import{Download as De}from"./Download-BfZJVu-O.mjs";import{P as Me,L as Pe}from"./Provider-DWIlPOzR.mjs";import{S as qe}from"./Status-CEkhPlDF.mjs";import{I as Oe}from"./Items-BsKByN_b.mjs";const Re=1600,Be=200,X=.25,Fe=1500,Y=typeof window>"u"?F:le,ae=n=>{const d=Number(n==null?void 0:n.width),l=Number(n==null?void 0:n.height);return d>0&&l>0?d/l:void 0};function Ie({collapseControls:n,canvasOptions:d,children:l}){const{clover:p}=te("Document"),b=ge(),h=ne(),s=S(null),E=S(null),g=S(null),T=b.direction==="right-to-left"||b.direction==="bottom-to-top",m=oe(()=>b.views.map(e=>{var c;const t=e.map(u=>b.canvases[u]),o=T?[...t].reverse():t,i=o.map(ae);return{key:t.map(u=>u.id).join("|"),first:(c=t[0])==null?void 0:c.id,canvases:o,ratio:i.every(Boolean)?i.reduce((u,I)=>u+I,0):void 0}}),[b,T]),w=Math.max(0,h.position),A=S({sheets:m,position:w});A.current={sheets:m,position:w};const k=S(null),f=S(null),D=S(0),N=S(()=>{}),x=S(false),V=e=>{var t;return(t=E.current)==null?void 0:t.children[e]},z=e=>{const t=s.current,o=V(e);return!t||!o||o===g.current?0:Math.min(o.offsetTop,t.scrollHeight-t.clientHeight)},K=()=>{const e=g.current,t=V(A.current.position);if(e){if(!t||t===e){e.style.top="0px",e.style.height="100%";return}e.style.top=`${t.offsetTop}px`,e.style.height=`${t.offsetHeight}px`}};function U(){const e=s.current;if(!e||e.hasAttribute("data-scrolling")||f.current!==null)return;const t=z(A.current.position);D.current=t,!(Math.abs(e.scrollTop-t)<=1)&&(x.current=true,e.scrollTop=t,requestAnimationFrame(()=>requestAnimationFrame(()=>x.current=false)))}Y(K),F(()=>{const e=new ResizeObserver(()=>{K(),U()});return E.current&&e.observe(E.current),s.current&&e.observe(s.current),()=>e.disconnect()},[]);const a=()=>{N.current();for(const[e,t]of[[s.current,"data-scrolling"],[g.current,"data-moved"]])e&&!e.hasAttribute(t)&&e.setAttribute(t,"")},O=()=>{const e=s.current,t=g.current;if(!e||!t)return;N.current(),D.current=e.scrollTop;const o=()=>{const _=t.querySelector(".clover-canvas");return!_||_.getAttribute("data-status")!=="loading"||_.getAttribute("data-placeholder")==="true"};let i=0;const c=new MutationObserver(()=>o()&&H()),u=setTimeout(()=>H(),Fe),I=()=>{cancelAnimationFrame(i),clearTimeout(u),c.disconnect()},H=()=>{I(),t.removeAttribute("data-moved"),e.removeAttribute("data-scrolling")};N.current=I,i=requestAnimationFrame(()=>{i=requestAnimationFrame(()=>{if(o())return H();c.observe(t,{attributes:true,subtree:true,attributeFilter:["data-status","data-placeholder"]})})})};F(()=>{const e=s.current,t=g.current;if(!e||!t)return;const o=()=>{const c=t.querySelector(".clover-canvas"),u=t.querySelector("video");e.toggleAttribute("data-covered",!!(c&&u&&u.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA&&c.getAttribute("data-media")==="video"&&c.getAttribute("data-placeholder")!=="true"&&!t.hasAttribute("data-moved")))};o();const i=new MutationObserver(o);i.observe(t,{attributes:true,childList:true,subtree:true,attributeFilter:["data-media","data-placeholder","data-moved"]});for(const c of["loadeddata","emptied"])t.addEventListener(c,o,true);return()=>{i.disconnect();for(const c of["loadeddata","emptied"])t.removeEventListener(c,o,true)}},[]);const M=(e,t=false)=>{var u;const o=s.current;if(!o)return;const i=z(e);if(Math.abs(o.scrollTop-i)<=1)return O();a(),f.current=e;const c=t||((u=window.matchMedia)==null?void 0:u.call(window,"(prefers-reduced-motion: reduce)").matches);o.scrollTo({top:i,behavior:c?"auto":"smooth"})},L=S(null);Y(()=>{const e=L.current!==m;if(L.current=m,B(false),k.current===w&&!e){k.current=null;return}k.current=null,M(w,e)},[w,m]),F(()=>{const e=s.current;if(!e)return;let t=0,o,i=false;const c=v=>{const P=A.current.sheets.length;if(P<2)return 0;let y=0;for(let W=0;W<P&&z(W)<=v+.5;W++)y=W;if(y>=P-1)return P-1;const C=z(y),q=(v-C)/Math.max(1,z(y+1)-C);return v>=D.current?q>X?y+1:y:q<1-X?y:y+1},u=()=>{if(t=0,f.current!==null)return;const v=c(e.scrollTop),{sheets:P,position:y}=A.current;v===y||!P[v]||(a(),B(false),k.current=v,p.goTo(P[v].first))},I=()=>{if(i)return;const{sheets:v,position:P}=A.current,y=e.scrollTop,C=f.current;f.current=null;const q=C!==null&&Math.abs(y-z(C))<=1?C:c(y);if(!v[q])return O();q!==P&&(a(),B(false),k.current=q,p.goTo(v[q].first)),M(q)},H=()=>{clearTimeout(o),o=setTimeout(I,Be)},_=()=>{x.current||(a(),H(),t||(t=requestAnimationFrame(u)))},$=v=>{f.current=null,(v.type==="touchstart"||v.type==="pointerdown"&&v.target===e)&&(i=true)},j=()=>{i&&(i=false,H())};return e.addEventListener("scroll",_,{passive:true}),e.addEventListener("wheel",$,{passive:true}),e.addEventListener("touchstart",$,{passive:true}),e.addEventListener("pointerdown",$),window.addEventListener("touchend",j),window.addEventListener("touchcancel",j),window.addEventListener("pointerup",j),()=>{cancelAnimationFrame(t),clearTimeout(o),N.current(),e.removeEventListener("scroll",_),e.removeEventListener("wheel",$),e.removeEventListener("touchstart",$),e.removeEventListener("pointerdown",$),window.removeEventListener("touchend",j),window.removeEventListener("touchcancel",j),window.removeEventListener("pointerup",j)}},[p]);const[R,Z]=G(null);function B(e){const t=s.current;!t||t.hasAttribute("data-zoomed")===e||(t.toggleAttribute("data-zoomed",e),e&&U())}return F(()=>{if(R)return R.on("viewport",()=>B(!R.atHome))},[R]),r("div",{ref:s,className:"clover-template-document-column",onKeyDown:e=>{if(!(e.defaultPrevented||e.altKey||e.ctrlKey)){if(e.key==="PageDown"&&h.hasNext)h.next();else if(e.key==="PageUp"&&h.hasPrevious)h.previous();else return;e.preventDefault()}},children:r("div",{ref:E,className:"clover-template-document-sheets","data-single":m.length<2||void 0,children:[m.map((e,t)=>r("div",{"aria-hidden":"true",className:"clover-template-document-sheet","data-active":t===w||void 0,"data-fill":e.ratio===void 0||void 0,onClick:()=>t!==w&&p.goTo(e.first),style:e.ratio===void 0?void 0:{"--ratio":e.ratio},children:e.canvases.map(o=>r(_e,{canvas:o},o.id))},e.key)),r("div",{ref:g,className:"clover-template-document-live",children:r(xe,{className:"clover-template-document-body",collapseControls:n,options:d,onReady:Z,children:l})})]})})}function He(n){const[d,l]=G(()=>typeof IntersectionObserver>"u");return F(()=>{if(d||!n)return;const p=new IntersectionObserver(b=>{b.some(h=>h.isIntersecting)&&(l(true),p.disconnect())},{root:n.closest(".clover-template-document-column"),rootMargin:"100% 0px"});return p.observe(n),()=>p.disconnect()},[n,d]),d}function _e({canvas:n}){const{clover:d}=te("Document"),l=oe(()=>Se(n),[n]),[p,b]=G(null),h=He(p),[s,E]=G(l==null?void 0:l.src);F(()=>{if(!l||l.src)return E(l==null?void 0:l.src);if(!h)return;let m=true;return Ee(l,Re,d.request).then(w=>m&&E(w)),()=>{m=false}},[l,d,h]);const g=ae(n),T=g?{aspectRatio:String(g)}:void 0;return s?r("img",{alt:"",decoding:"async",loading:"lazy",src:s,style:T}):r("span",{ref:b,style:T})}Le(48,"templates/document/Document","@layer clover{.clover-template-document{--clover-template-document-height: min(85vh, 56rem);display:flex;flex-direction:column;height:var(--clover-template-document-height);min-height:min-content;overflow:hidden;background-color:var(--clover-color-secondary, #fff);color:var(--clover-color-primary, #1a1d1e)}@supports (height: 1svh){.clover-template-document{--clover-template-document-height: min(85svh, 56rem)}}.clover-template-document-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:var(--clover-space-s);padding:var(--clover-space-m) var(--clover-inset);border-bottom:1px solid var(--clover-color-secondary-muted, #e6e8eb)}.clover-template-document-provider{max-width:100%;margin-inline-start:auto}.clover-template-document-toolbar .clover-download-groups{flex-direction:row;flex-wrap:wrap;column-gap:var(--clover-space-m)}.clover-template-document-toolbar .clover-download-group{display:flex;flex-wrap:wrap;align-items:baseline;column-gap:var(--clover-space-s)}.clover-template-document-toolbar .clover-download-title{margin:0}.clover-template-document-toolbar .clover-download-list{display:flex;flex-wrap:wrap;column-gap:var(--clover-space-s)}.clover-template-document-title{flex:1 1 6rem;min-width:0}button.clover-template-document-sidebar-toggle{display:inline-flex;flex:none;align-items:center;gap:var(--clover-space-xs);min-height:var(--clover-control);padding-block:0;padding-inline:var(--clover-space-s) calc(var(--clover-space-xs) + var(--clover-space-3xs));border:0;border-radius:var(--clover-radius-pill, 2rem);background-color:var(--clover-color-control, #1a1d1e);color:var(--clover-color-control-glyph, #fff);cursor:pointer;transition:var(--clover-transition, all .2s cubic-bezier(.16, 1, .3, 1))}button.clover-template-document-sidebar-toggle:is(:hover,:focus-visible){background-color:var(--clover-color-accent, #0065c3)}:where([data-high-contrast]) button.clover-template-document-sidebar-toggle:is(:hover,:focus-visible){background-color:var(--clover-accent-fill)}:where([data-high-contrast]) button.clover-template-document-sidebar-toggle:hover:not(:focus-visible){outline:var(--clover-accent-ring-hover);outline-offset:1px}button.clover-template-document-sidebar-toggle:focus-visible{outline:2px solid var(--clover-color-accent, #0065c3);outline-offset:2px}.clover-template-document-sidebar-toggle .clover-template-document-position{color:inherit;font-size:var(--clover-text-xs);white-space:nowrap}.clover-template-document-sidebar-toggle .clover-template-document-position>.clover-pager-room[hidden]{display:none}.clover-template-document-panes{position:relative;flex:1 1 auto;min-height:16rem}.clover-template-document-panes:is([data-panel=over],[data-narrow])>.clover-template-document-main{isolation:isolate}.clover-template-document-sidebar{contain:size;overflow-y:auto;padding:var(--clover-inset);scroll-padding-top:calc(2 * var(--clover-inset) + var(--clover-control));background-color:var(--clover-color-secondary, #fff)}.clover-template-document-sidebar-closed{position:absolute;top:var(--clover-inset);inset-inline-start:var(--clover-inset);z-index:3}@media (width < 31rem){.clover-template-document-toolbar,.clover-template-document-sidebar-closed,.clover-template-document-spine{--clover-inset: var(--clover-space-m)}}.clover-template-document-sidebar[hidden]{display:none}.clover-template-document-sidebar+.clover-split-handle:before{inset-inline-start:0;inset-inline-end:calc(3px - var(--clover-space-l))}.clover-template-document-sidebar .clover-items[data-layout] .clover-items-figure{grid-template-columns:repeat(var(--parts, 1),minmax(0,1fr));gap:var(--clover-space-xs) 0}.clover-template-document-sidebar .clover-items[data-layout] :is(.clover-items-pictures,.clover-items-caption){grid-column:1 / -1;grid-template-columns:subgrid}.clover-template-document-sidebar .clover-items[data-layout] .clover-items-label{contain:inline-size}.clover-template-document-sidebar .clover-items[data-layout] .clover-items-picture[data-empty],.clover-template-document-sidebar .clover-items[data-layout] .clover-items-picture img{width:100%;height:auto;max-height:20rem;aspect-ratio:var(--clover-items-ratio, auto);object-fit:contain}.clover-template-document-sidebar .clover-items[data-layout] .clover-items-caption{font-size:var(--clover-text-s)}.clover-template-document-main{position:relative;overflow:hidden;background-color:var(--clover-color-secondary-muted, #e6e8eb)}.clover-template-document-column{position:absolute;inset:0;overflow-x:hidden;overflow-y:auto;container-type:size}.clover-template-document-sheets{position:relative}.clover-template-document-sheet{--clover-template-document-tease: calc(2 * var(--clover-inset));display:flex;justify-content:center;box-sizing:border-box;height:min(100cqh - var(--clover-template-document-tease),(100cqw - 2 * var(--clover-inset)) / var(--ratio) + 2 * var(--clover-inset));padding:var(--clover-inset);transition:opacity .2s ease,height .24s cubic-bezier(.16,1,.3,1)}.clover-template-document-sheet[data-fill]{height:calc(100cqh - var(--clover-template-document-tease))}.clover-template-document-column[data-zoomed] .clover-template-document-sheet[data-active]{height:100cqh}.clover-template-document-column[data-zoomed] .clover-template-document-sheet[data-active]>*,.clover-template-document-column[data-covered] .clover-template-document-sheet[data-active]>*{visibility:hidden}.clover-template-document-column[data-zoomed] .clover-template-document-sheet:not([data-active]){--clover-template-document-muted: 0;pointer-events:none}.clover-template-document-sheet:not([data-active]){--clover-template-document-muted: .618;cursor:pointer;opacity:var(--clover-template-document-muted)}.clover-template-document-sheet:not([data-active]):hover{--clover-template-document-muted: .809}@media (prefers-reduced-motion: reduce){.clover-template-document-sheet{transition:none}}.clover-template-document-sheets[data-single]>.clover-template-document-sheet{--clover-template-document-tease: 0px}.clover-template-document-sheet>*{display:block;height:100%;min-width:0}.clover-template-document-sheet[data-fill]>*{object-fit:contain}.clover-template-document-live{--clover-body-height: 100%;position:absolute;inset-inline:0;top:0;height:100%;transition:opacity .16s ease}.clover-template-document-body .clover-canvas{--clover-canvas-inset: var(--clover-inset);background-color:transparent}.clover-template-document-live[data-moved]:not(:focus-within){opacity:0;pointer-events:none}.clover-template-document-column[data-scrolling] .clover-template-document-live:not(:focus-within) .clover-canvas-controls>*{--clover-controls-shown: 0;--clover-controls-events: none}.clover-template-document-column:not([data-zoomed]) :not(.clover-scene)>.clover-canvas-viewport{touch-action:pan-y}.clover-template-document-scrim[data-for=sidebar]{z-index:2}.clover-template-document-panes[data-narrow]{--clover-template-sidebar-width: min(14rem, 80%)}.clover-template-document-panes[data-narrow]>.clover-template-document-sidebar{position:absolute;inset-block:0;inset-inline-start:0;z-index:3;width:var(--clover-template-sidebar-width);border-inline-end:1px solid var(--clover-color-secondary-muted, #e6e8eb);--clover-template-inner: right;--clover-template-toward: 1}.clover-template-document-panes[data-narrow]>.clover-template-document-sidebar:dir(rtl){--clover-template-inner: left;--clover-template-toward: -1}.clover-template-document-spine{position:relative;z-index:4;flex:none;width:0}.clover-template-document-spine>*{position:absolute;top:var(--clover-inset);inset-inline-start:-1.5px;translate:-50%}.clover-template-document-spine:dir(rtl)>*{translate:50%}.clover-template-document-spine[data-for=sidebar]>*{inset-inline:auto calc(1.5px - var(--clover-control) / 2);translate:none}.clover-template-document-panes[data-narrow]>.clover-template-document-spine[data-for=sidebar]{inset-inline-start:var(--clover-template-sidebar-width)}.clover-template-document-panes[data-narrow]>.clover-template-document-spine[data-for=sidebar]>*{inset-inline-end:calc(var(--clover-control) / -2)}}");function at({className:n,defaultSidebarOpen:d,singleItem:l=false,defaultPanelOpen:p=false,panelLayout:b="accordion",panelSections:h,panelLabels:s,download:E=true,languages:g=true,interfaceLanguages:T=true,headingLevel:m=2,storageKey:w="clover-template-document",collapseControls:A,canvasOptions:k,...f}){const D=Te(m,`${re().replace(/:/g,"")}-title`);return r(Ae,{className:["clover-template-document",n].filter(Boolean).join(" "),...D.group,...f,children:r(Ce,{title:D,defaultSidebarOpen:d,singleItem:l,defaultPanelOpen:p,panelLayout:b,panelSections:h,panelLabels:s,download:E,languages:g,interfaceLanguages:T,headingLevel:m,storageKey:w,collapseControls:A,canvasOptions:k})})}const ee=n=>n+1,$e=9,je=40;function Ce({defaultSidebarOpen:n,singleItem:d,defaultPanelOpen:l,download:p,languages:b,interfaceLanguages:h,headingLevel:s=2,storageKey:E,panelLayout:g,panelSections:T,panelLabels:m,collapseControls:w,canvasOptions:A,title:k}){const f=we(),D=ye(),N=D("templateSidebar"),x=re().replace(/:/g,""),V=ne(),z=S(null),K=S(null),U=se(),a=de({id:`${x}-sidebar`,beside:J(z,je),defaultOpen:n??true,side:"start",focus:o=>o.querySelector('[role="option"][aria-selected="true"]'),slides:false,alongside:K,followFocus:U}),O=V.total>(d?0:1),M=O&&a.open,L=me({id:`${x}-panel`,beside:J(z,ue+(M?$e:0)),defaultOpen:!!l,followFocus:U,sections:T}),R=o=>{var i,c;a.over&&((c=(i=o.target).closest)!=null&&c.call(i,`[aria-controls~="${x}-sidebar"]`))&&be()},Z=()=>{a.over&&a.close()},B=L.docked,e=L.toggle,t=O&&r("button",{type:"button",className:"clover-template-document-sidebar-toggle","aria-expanded":a.open,"aria-controls":`${x}-sidebar`,lang:D("templateSidebarToggle"),onClick:()=>a.setOpen(!a.open),children:[r("svg",{"aria-hidden":"true",focusable:"false",width:"16",height:"16",viewBox:"0 0 16 16",fill:a.open?"currentColor":"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:[r("rect",{x:"1.5",y:"2",width:"5.5",height:"4.5",rx:"1"}),r("rect",{x:"1.5",y:"9.5",width:"5.5",height:"4.5",rx:"1"}),r("path",{d:"M9.5 4.25h5M9.5 11.75h5",fill:"none"})]}),r("span",{style:ce,children:f("templateSidebarToggle")}),r(ke,{className:"clover-template-document-position"}),r(Ne,{label:f("templateSidebarToggle")})]});return r(ie,{children:[r("header",{className:"clover-template-document-toolbar",children:[r(ze,{as:k.as,className:"clover-template-document-title clover-template-title clover-title",...k.title}),p&&r(De,{headingLevel:ee(s)}),r(Me,{className:"clover-template-document-provider",children:r(Pe,{})})]}),r(qe,{loading:false}),r(ve,{ref:z,className:"clover-template-document-panes clover-template-panes","data-sidebar":M?"open":"closed","data-narrow":a.over||void 0,"data-panel":L.splitProps["data-panel"],storageKey:E||void 0,onKeyDown:o=>{L.onKeyDown(o),a.onKeyDown(o)},onPointerOver:o=>{L.splitProps.onPointerOver(o),R(o)},onFocus:o=>{L.splitProps.onFocus(o),R(o)},children:[r(Q,{ref:a.pane,as:"aside",id:`${x}-sidebar`,name:"sidebar",className:["clover-template-document-sidebar",a.over&&"clover-template-float"].filter(Boolean).join(" "),"aria-label":N?void 0:f("templateSidebar"),"aria-labelledby":N?`${x}-sidebar-name`:void 0,size:"13rem",min:a.over?void 0:"8rem",max:"24rem",hidden:!M,children:[N&&r("span",{hidden:true,id:`${x}-sidebar-name`,lang:N,children:f("templateSidebar")}),r(Oe,{layout:"list",singleItem:d,"aria-label":N?void 0:f("templateSidebar"),thumbnailSize:320,onSelect:Z})]}),M&&!a.over&&r(pe,{"aria-controls":`${x}-sidebar`}),M&&r("div",{ref:K,className:"clover-template-document-spine","data-for":"sidebar",children:t}),r(Q,{ref:L.main,className:"clover-template-document-main",min:M&&!a.over||B?he:void 0,children:[O&&!a.open&&r("div",{className:"clover-template-document-sidebar-closed",children:t}),r(Ie,{collapseControls:w,canvasOptions:A,children:!B&&e})]}),r(fe,{pane:L,className:"clover-template-document-panel",layout:g,sections:T,labels:m,headingLevel:ee(s),download:false,languages:b,interfaceLanguages:h}),O&&a.scrim&&r("div",{className:"clover-template-document-scrim clover-template-scrim","data-for":"sidebar",...a.scrim})]})]})}export{at as Document};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var c=Object.defineProperty;var h=(o,t,e)=>t in o?c(o,t,{enumerable:true,configurable:true,writable:true,value:e}):o[t]=e;var l=(o,t,e)=>h(o,typeof t!="symbol"?t+"":t,e);import{j as d,c as p,t as x}from"./CanvasView-
|
|
1
|
+
var c=Object.defineProperty;var h=(o,t,e)=>t in o?c(o,t,{enumerable:true,configurable:true,writable:true,value:e}):o[t]=e;var l=(o,t,e)=>h(o,typeof t!="symbol"?t+"":t,e);import{j as d,c as p,t as x}from"./CanvasView-B752g1bm.mjs";class f{constructor(t){l(this,"container");l(this,"boxes",new Map);const e=document.createElement("div");e.className="clover-canvas-dom-layer",Object.assign(e.style,{position:"absolute",inset:"0",overflow:"hidden",pointerEvents:"none"}),t.appendChild(e),this.container=e}sync(t){const e=new Set;t.forEach((s,i)=>{e.add(s.key);const a=this.boxFor(s),n=s.crop??{x:0,y:0,width:s.width,height:s.height};a.style.width=`${n.width}px`,a.style.height=`${n.height}px`,a.style.transform=d(p(s.transform,x(n.x,n.y))),a.style.opacity=String(s.opacity),a.style.zIndex=String(i);const r=s.element;r.style.width=`${s.width}px`,r.style.height=`${s.height}px`,r.style.transform=`translate(${-n.x}px, ${-n.y}px)`});for(const[s,i]of this.boxes)e.has(s)||(i.remove(),this.boxes.delete(s))}dispose(){this.boxes.clear(),this.container.remove()}boxFor(t){let e=this.boxes.get(t.key);return e&&e.firstChild!==t.element&&(e.remove(),e=void 0),e||(e=document.createElement("div"),e.className="clover-canvas-dom-item",e.dataset.key=t.key,Object.assign(e.style,{position:"absolute",top:"0",left:"0",overflow:"hidden",transformOrigin:"0 0"}),t.element.classList.add("clover-canvas-dom-media"),Object.assign(t.element.style,{position:"absolute",top:"0",left:"0",maxWidth:"none",maxHeight:"none",transformOrigin:"0 0"}),e.appendChild(t.element),this.container.appendChild(e),this.boxes.set(t.key,e)),e}}export{f as DomLayers};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as N,e as D,b as y,u as l,l as h}from"./shared-
|
|
1
|
+
import{a as N,e as D,b as y,u as l,l as h}from"./shared-ByrLMUQa.mjs";import{j as $}from"./classnames-DukgfdpI.mjs";import{a as k}from"./heading-Cjt0f-Eu.mjs";import{u as C}from"./downloads-DwzBIS-9.mjs";import"./styles-BOXm_R8o.mjs";const g=new Set,p=a=>{var n;try{return new URL(a,(n=globalThis.location)==null?void 0:n.href).origin}catch{return a}};function K(a,n){import("./save-file-DsYdCZpi.mjs").then(({saveFile:r})=>r(a,n)).then(r=>{r||(g.add(p(a)),window.open(a,"_blank","noopener,noreferrer"))})}function L({page:a,all:n,headingLevel:r=3,inPopover:e=false}){const{t:s,langOf:w}=N(),{clover:m}=D("Download"),c=y(),b=e?"span":k(r),v=e?"div":"section",t=(i,f,u)=>f.length>0&&l(v,{className:"clover-download-group",role:e?"group":void 0,"aria-labelledby":`${c}-${u}`,children:[l(b,{className:"clover-download-title",id:`${c}-${u}`,...h(w(i)),children:s(i)}),l("ul",{className:"clover-download-list",children:f.map(o=>l("li",{children:l("a",{className:"clover-download-link",href:o.id,target:"_blank",rel:"noopener noreferrer",download:"",hrefLang:o.hrefLang,...h(o.lang),onClick:d=>{d.button!==0||d.metaKey||d.ctrlKey||d.shiftKey||d.altKey||g.has(p(o.id))||(d.preventDefault(),K(o.id,m.request))},children:[o.label,o.format&&o.format!==o.label&&l("span",{className:"clover-download-format",children:[" ","(",o.format,")"]})]})},o.id))})]});return l("div",{className:"clover-download-groups",children:[t("downloadPage",a,"page"),t("downloadAll",n,"all")]})}function U({className:a,headingLevel:n=3,...r}){const{page:e,all:s}=C();return!e.length&&!s.length?null:l("div",{...r,className:$("clover-download",a),children:l(L,{page:e,all:s,headingLevel:n})})}export{U as Download,L as DownloadGroups,C as useDownloads};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as u,u as r,l as h,k as p,t as v}from"./shared-
|
|
1
|
+
import{a as u,u as r,l as h,k as p,t as v}from"./shared-ByrLMUQa.mjs";import{b as g}from"./annotation-name-DhMF4ZHj.mjs";import{M as m}from"./Markup-DzUsOaNC.mjs";const x=o=>o.some(n=>{var e;return(e=n.value)==null?void 0:e.trim()}),w=(o,n)=>{const e=new Map;for(const t of o)t.choice!==void 0&&e.set(t.choice,[...e.get(t.choice)??[],t]);if(!e.size)return o;const i=new Set([...e.values()].map(t=>g(t,n)));return o.filter(t=>t.choice===void 0||i.has(t))};function M({bodies:o,language:n,headingLevel:e}){const{t:i,langOf:t}=u(),l=w(o,n),f=a=>{if(x(l))return{text:""};const s=v(a.label,n);return s.text?s:{text:i("annotationsImage"),lang:t("annotationsImage")}};return r(p,{children:l.map((a,s)=>{if(a.place)return r(m,{as:"div",markup:a.label,language:n,className:"clover-annotations-text"},s);if(!a.image)return r(m,{as:"div",markup:{[a.language??"none"]:[a.value??""]},format:a.format,headingLevel:e,language:n,className:"clover-annotations-text"},s);const c=f(a);return r("img",{src:a.image,alt:c.text,...h(c.text?c.lang:void 0),width:200,loading:"lazy",className:"clover-annotations-image"},s)})})}export{M as E};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as c,d as h,A as v,y}from"./shared-ByrLMUQa.mjs";import{resolveThumbnail as E}from"./thumbnail-Np4ftjUo.mjs";import{j as T}from"./classnames-DukgfdpI.mjs";import"./styles-BOXm_R8o.mjs";const m=52,p=336;function b(t,r,i,n){const[a,l]=h(t==null?void 0:t.src),o=t?JSON.stringify(t):"",f=v(n);return y(()=>{const s=n!==void 0&&f.current===n;if(f.current=n,!t||t.src)return l(t==null?void 0:t.src);s||l(void 0);let e=true;return E(t,r,i).then(d=>e&&l(d)),()=>{e=false}},[o,r]),a}function S({source:t,request:r,large:i=false,className:n}){const a=b(t,i?p:m,r);return a?c("img",{className:T("clover-entry-thumbnail",n),"data-large":i?"":void 0,src:a,alt:"",...!i&&{width:m/2,height:m/2},loading:"lazy",decoding:"async"}):null}export{S as E,p as P,b as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as g,a as y,u as e,l as o,v as s}from"./shared-
|
|
1
|
+
import{D as g,a as y,u as e,l as o,v as s}from"./shared-ByrLMUQa.mjs";import{j as n}from"./classnames-DukgfdpI.mjs";import{S as k}from"./Steps-BoNd47eB.mjs";import{T as m}from"./Tip-mcI7IRQh.mjs";import"./styles-BOXm_R8o.mjs";const F=g(function({id:t,value:h,onChange:u,onSubmit:f,onClear:b,results:i,size:S="large",classes:a={}},v){const{t:l,langOf:r}=y(),d=l("commonSearch"),p=l("contentSearchClear");return e("form",{role:"search","aria-labelledby":`${t}-label`,className:n("clover-field-pill",a.form),"data-size":S,onSubmit:c=>{c.preventDefault(),f()},children:[e("label",{htmlFor:t,id:`${t}-label`,style:s,...o(r("informationPanelTabsSearch")),children:l("informationPanelTabsSearch")}),e("input",{ref:v,id:t,type:"search",className:n("clover-field-pill-query",a.query),value:h,placeholder:l("contentSearchPlaceholder"),lang:r("contentSearchPlaceholder"),onChange:c=>u(c.target.value)}),i&&(i.total?e(k,{steps:i,sentence:"contentSearchPosition"}):e("span",{className:"clover-field-pill-note","aria-hidden":"true",...o(r("contentSearchResultsNone")),children:l("contentSearchResultsNone")})),h&&e("button",{type:"button",className:n("clover-field-pill-clear",a.clear),...o(r("contentSearchClear")),onClick:b,children:[e("svg",{"aria-hidden":"true",focusable:"false",width:"12",height:"12",viewBox:"0 0 16 16",children:e("path",{d:"M4 4l8 8M12 4l-8 8",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})}),e("span",{style:s,children:p}),e(m,{label:p})]}),e("button",{type:"submit",className:n("clover-field-pill-submit",a.submit),...o(r("commonSearch")),children:[e("svg",{"aria-hidden":"true",focusable:"false",width:"16",height:"16",viewBox:"0 0 16 16",children:[e("circle",{cx:"7",cy:"7",r:"4.5",fill:"none",stroke:"currentColor",strokeWidth:"2"}),e("path",{d:"M10.5 10.5L14 14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),e("span",{style:s,children:d}),e(m,{label:d})]})]})});export{F};
|