@nulib/clover 4.5.8 → 4.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Canvas/CanvasView.mjs +19 -0
- package/dist/components/Canvas/Connected.mjs +5 -1
- package/dist/components/Canvas/FrameAnimation.mjs +4 -48
- package/dist/components/Items/Items.mjs +31 -2
- package/dist/components/Items/vertical/ItemsVertical.mjs +8 -0
- package/dist/components/Transcript/Transcript.mjs +17 -2
- package/dist/core/request.mjs +7 -0
- package/dist/core/save-file.mjs +5 -2
- package/dist/core/selectors.mjs +9 -1
- package/dist/core/vtt.mjs +6 -4
- package/dist/i18n/locales/en.json.mjs +1 -1
- package/dist/i18n/locales/es.json.mjs +1 -1
- package/dist/i18n/locales/fi.json.mjs +1 -1
- package/dist/i18n/locales/fr.json.mjs +1 -1
- package/dist/i18n/locales/it.json.mjs +1 -1
- package/dist/i18n/locales/ja.json.mjs +1 -1
- package/dist/i18n/locales/nb.json.mjs +1 -1
- package/dist/i18n/locales/nn.json.mjs +1 -1
- package/dist/i18n/locales/no.json.mjs +1 -1
- package/dist/i18n/locales/pt.json.mjs +1 -1
- package/dist/i18n/locales/zh-Hans.json.mjs +1 -1
- package/dist/i18n/locales/zh-Hant.json.mjs +1 -1
- package/dist/lib/gltf/load.mjs +5 -2
- package/dist/lib/renderer/CanvasRenderer.mjs +179 -42
- package/dist/lib/renderer/backends/webgl2/shaders.mjs +2 -1
- package/dist/lib/renderer/io/TileCache.mjs +1 -1
- package/dist/lib/renderer/io/decode.mjs +2 -1
- package/dist/lib/renderer/scene/planFrame.mjs +17 -0
- package/dist/lib/renderer/scene/sceneItem.mjs +9 -4
- package/dist/lib/renderer/sources/imageService.mjs +2 -1
- package/dist/lib/renderer/sources/tilePyramid.mjs +14 -3
- package/dist/styles/core.css +1 -1
- package/dist/styles/items-vertical.css +1 -0
- package/dist/styles/items.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/ui/Loading.mjs +9 -0
- package/dist/ui/loadingPass.mjs +52 -0
- package/dist/ui/sheets/items-vertical.mjs +5 -0
- package/dist/web-components/{About-CVX3WjIM.mjs → About-Brbhm22a.mjs} +1 -1
- package/dist/web-components/AnnotationItems-Dy4BNabL.mjs +1 -0
- package/dist/web-components/{AnnotationMenu-DS8hpHt_.mjs → AnnotationMenu-4PN2LNP-.mjs} +1 -1
- package/dist/web-components/{AnnotationState-C6XuLyjK.mjs → AnnotationState-3KHHmQhl.mjs} +1 -1
- package/dist/web-components/{Annotations-DZ0uCsSA.mjs → Annotations-BwKS6fG8.mjs} +1 -1
- package/dist/web-components/{Annotations-C6jdThgl.mjs → Annotations-CPUvoKJe.mjs} +1 -1
- package/dist/web-components/{Body-BSgaX-3F.mjs → Body-CTzmxY8R.mjs} +1 -1
- package/dist/web-components/{BodyAlert-B4aQaIUq.mjs → BodyAlert-CXOxbNBE.mjs} +1 -1
- package/dist/web-components/{Button-DjjrKoEn.mjs → Button-a59NBnOp.mjs} +1 -1
- package/dist/web-components/{Camera-BEeXRxzV.mjs → Camera-BlbXBgYZ.mjs} +1 -1
- package/dist/web-components/{Canvas2DBackend-nJRJutaS.mjs → Canvas2DBackend-DXCfms6g.mjs} +1 -1
- package/dist/web-components/CanvasView-CiP25Iqc.mjs +2 -0
- package/dist/web-components/{CaptionDetails-ljenvCyI.mjs → CaptionDetails-CCCTWTQP.mjs} +1 -1
- package/dist/web-components/{ChaptersMenu-DDgnLAtO.mjs → ChaptersMenu-Bne6N9cf.mjs} +1 -1
- package/dist/web-components/{Chevron-JoTeVk7K.mjs → Chevron-CH8yyEDi.mjs} +1 -1
- package/dist/web-components/{ChoiceMenu-82jUcgr6.mjs → ChoiceMenu-BQVTRzXj.mjs} +1 -1
- package/dist/web-components/{Collection-JI80uk-a.mjs → Collection-CbEMQWrO.mjs} +1 -1
- package/dist/web-components/{CollectionSelect-CxOlBjmO.mjs → CollectionSelect-BpvtCwSl.mjs} +1 -1
- package/dist/web-components/Connected-BWomgzfE.mjs +1 -0
- package/dist/web-components/{Connected-Bur9iAGb.mjs → Connected-C31vzWei.mjs} +1 -1
- package/dist/web-components/{Connected-DTYB8ubW.mjs → Connected-Dq0xux9o.mjs} +1 -1
- package/dist/web-components/{Contents-cwsn0zpJ.mjs → Contents-CGc6_Z5c.mjs} +1 -1
- package/dist/web-components/{ControlMenu-BBBRHutV.mjs → ControlMenu-ej-Kpb31.mjs} +1 -1
- package/dist/web-components/ControlsFade-CStkqANR.mjs +1 -0
- package/dist/web-components/{CountMenu-DFOUdzB0.mjs → CountMenu-D4M1roIh.mjs} +1 -1
- package/dist/web-components/Cue-BhXRUDe9.mjs +1 -0
- package/dist/web-components/{Document-CKJYtix1.mjs → Document-CPQELxSI.mjs} +1 -1
- package/dist/web-components/{DomLayers-vrvJUN5_.mjs → DomLayers-DwhkzPRS.mjs} +1 -1
- package/dist/web-components/{Download-CQX7fDub.mjs → Download-Dsei4KG3.mjs} +1 -1
- package/dist/web-components/{EntryBodies-BvHccb-L.mjs → EntryBodies-BI7V3B5i.mjs} +1 -1
- package/dist/web-components/{EntryThumbnail-YuRsScmh.mjs → EntryThumbnail-BnMLzy5M.mjs} +1 -1
- package/dist/web-components/{FieldPill-D8JBm03i.mjs → FieldPill-BOeOasUT.mjs} +1 -1
- package/dist/web-components/FrameAnimation-BcEfAQrI.mjs +1 -0
- package/dist/web-components/{Gallery-BH4b0bkJ.mjs → Gallery-BDGDzt0R.mjs} +1 -1
- package/dist/web-components/{GlobeGlyph-DU4HgIlU.mjs → GlobeGlyph-9zKXX7B6.mjs} +1 -1
- package/dist/web-components/{HideToggle-C5GjtOeD.mjs → HideToggle-CmwFnHcZ.mjs} +1 -1
- package/dist/web-components/{ImageControls-D4NriMaR.mjs → ImageControls-CSHxdUD1.mjs} +1 -1
- package/dist/web-components/Items-DCRr750U.mjs +1 -0
- package/dist/web-components/ItemsVertical-BeIiJ37B.mjs +1 -0
- package/dist/web-components/{Label-AzCladKz.mjs → Label-CVfL9bMO.mjs} +1 -1
- package/dist/web-components/{LanguageChoice-BjOVXoTc.mjs → LanguageChoice-D_vEiQp9.mjs} +1 -1
- package/dist/web-components/{LanguageMenu-DYKPJWTQ.mjs → LanguageMenu-ycNvnbOB.mjs} +1 -1
- package/dist/web-components/{LightboxView-BTtyMjPN.mjs → LightboxView-CsOAsZ3f.mjs} +1 -1
- package/dist/web-components/{ListEnd-Dp2ZLTtS.mjs → ListEnd-B6tyeK1B.mjs} +1 -1
- package/dist/web-components/{Loaded-B_afJf30.mjs → Loaded-CSYg8oIR.mjs} +1 -1
- package/dist/web-components/LoadedCanvas-W9sCFkdf.mjs +1 -0
- package/dist/web-components/LoadedMap-jx7uEeDg.mjs +1 -0
- package/dist/web-components/Loading-CAkF1fBT.mjs +1 -0
- package/dist/web-components/{Map-Sr8lEkIx.mjs → Map-BDsBYSp5.mjs} +1 -1
- package/dist/web-components/{MapView-Cyuq8ZjK.mjs → MapView-DO23FSrT.mjs} +2 -2
- package/dist/web-components/{Markup-D_j5vPvk.mjs → Markup-COA2t_y1.mjs} +1 -1
- package/dist/web-components/{MediaBody-DRkphCAw.mjs → MediaBody-CNk9fFfN.mjs} +1 -1
- package/dist/web-components/{MediaBody-BFkIoL-g.mjs → MediaBody-XsEObuYV.mjs} +1 -1
- package/dist/web-components/{NavDate-DWIV5F6P.mjs → NavDate-1LLiZ8Vq.mjs} +1 -1
- package/dist/web-components/{Navigator-R3SCVscB.mjs → Navigator-t1y35uj8.mjs} +1 -1
- package/dist/web-components/{Pager-D6slnuet.mjs → Pager-35N8_3lH.mjs} +1 -1
- package/dist/web-components/PagerLayout-SNT5cl4D.mjs +1 -0
- package/dist/web-components/{Panel-CuGSpuMG.mjs → Panel-D16u98YB.mjs} +1 -1
- package/dist/web-components/PanelPart-DfjlK_hB.mjs +1 -0
- package/dist/web-components/{PanelToggle-DGi2sN1Y.mjs → PanelToggle-BcUVIbQw.mjs} +1 -1
- package/dist/web-components/{PartOfManifest-dHMlHOeZ.mjs → PartOfManifest-BYyflVQI.mjs} +1 -1
- package/dist/web-components/{Pending-DqTfvy6z.mjs → Pending-bIYd0PwB.mjs} +1 -1
- package/dist/web-components/PlaceBox-D-pLIX5w.mjs +1 -0
- package/dist/web-components/{Placeholder-D2xzRHzw.mjs → Placeholder-Mq1Iaasr.mjs} +1 -1
- package/dist/web-components/{Position-CZxedOcV.mjs → Position-Bh1Iq4d6.mjs} +1 -1
- package/dist/web-components/{Primitives-DjUlp4ln.mjs → Primitives-DP2uwwcU.mjs} +1 -1
- package/dist/web-components/{Provider-BhDLDrIb.mjs → Provider-BUDzNTyJ.mjs} +1 -1
- package/dist/web-components/{ReadMore-l-ljjCbA.mjs → ReadMore-B6qft77s.mjs} +1 -1
- package/dist/web-components/Root-J9v7nQ6o.mjs +1 -0
- package/dist/web-components/Scene-CdqC1O-B.mjs +1 -0
- package/dist/web-components/{SceneView-C-5ZBOMj.mjs → SceneView-DykQJepG.mjs} +1 -1
- package/dist/web-components/{Search-DvSuOWsf.mjs → Search-DEoFdx2g.mjs} +1 -1
- package/dist/web-components/{Sections-WeQ6ifoH.mjs → Sections-B6j9eFao.mjs} +1 -1
- package/dist/web-components/{SeekMarks-CnV7psCC.mjs → SeekMarks-C3ZDOMbt.mjs} +1 -1
- package/dist/web-components/StandaloneItems-CtxMB090.mjs +1 -0
- package/dist/web-components/{Status-CjAX4ZcY.mjs → Status-C49DxNaY.mjs} +1 -1
- package/dist/web-components/{Steps-WGighDCr.mjs → Steps-BTAJ3lc6.mjs} +1 -1
- package/dist/web-components/{TargetItems-CHK11XsC.mjs → TargetItems-BZFSWVs6.mjs} +1 -1
- package/dist/web-components/Timeline-D5oL1UyW.mjs +1 -0
- package/dist/web-components/{Tip-MXBlEQhp.mjs → Tip-Dv-gYN8n.mjs} +1 -1
- package/dist/web-components/Transcript-FmC6HR0-.mjs +1 -0
- package/dist/web-components/{Transport-DkJkLd_9.mjs → Transport-BKFLjI45.mjs} +1 -1
- package/dist/web-components/{Transport-B4jS-QyR.mjs → Transport-pRWbs9M3.mjs} +1 -1
- package/dist/web-components/{annotation-collection-DgDTaqZJ.mjs → annotation-collection-Dc-peX7w.mjs} +1 -1
- package/dist/web-components/{annotation-name-BQPsnye0.mjs → annotation-name-BhbhOgES.mjs} +1 -1
- package/dist/web-components/{annotations-content-C2Ard-Wu.mjs → annotations-content-BJSUCNd1.mjs} +1 -1
- package/dist/web-components/{body-CsDqGyS1.mjs → body-BEZ3sYcR.mjs} +1 -1
- package/dist/web-components/{canvas-DYIiw-An.mjs → canvas-CfnKZqTU.mjs} +1 -1
- package/dist/web-components/{viewer/cloverEngine-SxAYyRtz.mjs → cloverEngine-BstElW9l.mjs} +3 -3
- package/dist/web-components/{content-state-reader-W2X5SbX2.mjs → content-state-reader-DGOg8oAH.mjs} +1 -1
- package/dist/web-components/{controlGlyphs-DO8zuBuP.mjs → controlGlyphs-Lxfq7zz4.mjs} +1 -1
- package/dist/web-components/{controls-B-kceETo.mjs → controls-BibZpBh1.mjs} +1 -1
- package/dist/web-components/{downloads-b2ula2rS.mjs → downloads-cYib41PV.mjs} +1 -1
- package/dist/web-components/{dragToClose-CyySNxZo.mjs → dragToClose-BpzjNnPx.mjs} +1 -1
- package/dist/web-components/{engine-BO2NyZbt.mjs → engine-Cl755NaO.mjs} +1 -1
- package/dist/web-components/{engines-ByJdQYM6.mjs → engines-fZzYf1dz.mjs} +1 -1
- package/dist/web-components/{es-Bn4XnLxy.mjs → es-Bx-zZBfZ.mjs} +1 -1
- package/dist/web-components/{fetchManifest-BJPcndui.mjs → fetchManifest-D31pEPrb.mjs} +1 -1
- package/dist/web-components/{fi-CjAXeLqH.mjs → fi-DsP1FhBy.mjs} +1 -1
- package/dist/web-components/{follow-content-Bta7Cphz.mjs → follow-content-Byosc3Ev.mjs} +1 -1
- package/dist/web-components/{fr-CeFhkxoi.mjs → fr-BuL_F9Jq.mjs} +1 -1
- package/dist/web-components/{fromManifest-toVz2G-X.mjs → fromManifest-DqCyZd2Q.mjs} +1 -1
- package/dist/web-components/{glyphs-C9dkvLmy.mjs → glyphs-8fjIPAtZ.mjs} +1 -1
- package/dist/web-components/{hooks-C1S0JZNP.mjs → hooks-Bo5GjPGX.mjs} +1 -1
- package/dist/web-components/{image-layers-hf965hJE.mjs → image-layers-CFarmTfZ.mjs} +1 -1
- package/dist/web-components/{image-service-content-kG5TIiB7.mjs → image-service-content-bUFBZCr1.mjs} +1 -1
- package/dist/web-components/imageService-CCKieCxo.mjs +1 -0
- package/dist/web-components/{index-BqgqqnqN.mjs → index-DhlRi3H9.mjs} +1 -1
- package/dist/web-components/index.mjs +1 -1
- package/dist/web-components/{it-DxtfVek2.mjs → it-DH3EtrgI.mjs} +1 -1
- package/dist/web-components/items-BXd02UN6.mjs +1 -0
- package/dist/web-components/{items-DNfIV4vN.mjs → items-CKMFXz0W.mjs} +1 -1
- package/dist/web-components/{ja-rsicBgWR.mjs → ja-BEHbDotv.mjs} +1 -1
- package/dist/web-components/label-DcF-YCIN.mjs +1 -0
- package/dist/web-components/{layout--P98JuFG.mjs → layout-DQtgCOJJ.mjs} +1 -1
- package/dist/web-components/{link-p71HL3dn.mjs → link-q4quIuuD.mjs} +1 -1
- package/dist/web-components/logo-DWI0N9FL.mjs +1 -0
- package/dist/web-components/{models-BnyeBKu_.mjs → models-Dw-cADIz.mjs} +1 -1
- package/dist/web-components/{no-BkyI1fhp.mjs → nb-Bdfn_mZs.mjs} +1 -1
- package/dist/web-components/{nn-n_xM6AGl.mjs → nn-BCWbSuK0.mjs} +1 -1
- package/dist/web-components/{nb-BkyI1fhp.mjs → no-Bdfn_mZs.mjs} +1 -1
- package/dist/web-components/{nodes-DZbVJvjk.mjs → nodes-nZmQ93ib.mjs} +1 -1
- package/dist/web-components/{overlayImage-D6TfbX70.mjs → overlayImage-B-ybt0wn.mjs} +1 -1
- package/dist/web-components/{panel-COA5_tL_.mjs → panel-C27fOmhT.mjs} +1 -1
- package/dist/web-components/part-B9t8Qe9D.mjs +1 -0
- package/dist/web-components/{playerSurface-Uc4JAuxZ.mjs → playerSurface-BLzwC0Ux.mjs} +1 -1
- package/dist/web-components/{pointer-BPJduQ1u.mjs → pointer-BYZjBehK.mjs} +1 -1
- package/dist/web-components/{provider-B4tq-84F.mjs → provider-Cs6sFr4G.mjs} +1 -1
- package/dist/web-components/{pt-COchUT7D.mjs → pt-Da5El49z.mjs} +1 -1
- package/dist/web-components/{range-regions-92kmJCAy.mjs → range-regions-DssQTTra.mjs} +1 -1
- package/dist/web-components/{read-more-BnhdOE8Y.mjs → read-more-Cp9CLzyd.mjs} +1 -1
- package/dist/web-components/{readingLanguages-Bf_HW2UJ.mjs → readingLanguages-D97yt-4s.mjs} +1 -1
- package/dist/web-components/rendererSurface-BuBm8Th_.mjs +22 -0
- package/dist/web-components/{renderers-CX9SrgrB.mjs → renderers-BL-b8snn.mjs} +1 -1
- package/dist/web-components/{resource-DF5HkAfv.mjs → resource-DwKOZbOZ.mjs} +1 -1
- package/dist/web-components/save-file-CcfAgDXf.mjs +1 -0
- package/dist/web-components/{search-BvpD-NWY.mjs → search-C45Jd7QH.mjs} +1 -1
- package/dist/web-components/shared-D2pvbPvF.mjs +1 -0
- package/dist/web-components/{show-link-DRCdG8ae.mjs → show-link-D9bByIzf.mjs} +1 -1
- package/dist/web-components/{sizedImage-BtyysLax.mjs → sizedImage-BFAry04f.mjs} +1 -1
- package/dist/web-components/{split-DFthztSD.mjs → split-CDZiE4rz.mjs} +1 -1
- package/dist/web-components/{status-BZuOJ0UE.mjs → status-BtCciELI.mjs} +1 -1
- package/dist/web-components/styles-Bf3qmdsh.mjs +1 -0
- package/dist/web-components/three.mjs +1 -1
- package/dist/web-components/thumbnail-By5wfGlE.mjs +1 -0
- package/dist/web-components/{tip-ukHtKmqe.mjs → tip-_XUeFMj4.mjs} +1 -1
- package/dist/web-components/{toggle-DX4vFKqT.mjs → toggle-DkPNS5eL.mjs} +1 -1
- package/dist/web-components/{useContainerName-CM_MIZu9.mjs → useContainerName-BfU0IozO.mjs} +1 -1
- package/dist/web-components/{useControlsVisibility-DZFyrqAJ.mjs → useControlsVisibility-pU1JVIpK.mjs} +1 -1
- package/dist/web-components/{useNearViewport-DHvgWl-0.mjs → useNearViewport-D1kQt-tS.mjs} +1 -1
- package/dist/web-components/{useScrollTrack-B0Nx9ZZ7.mjs → useScrollTrack-cQfG_zk_.mjs} +1 -1
- package/dist/web-components/viewer/{AnnotationItems-CLssRyMA.mjs → AnnotationItems-UHFS1uDO.mjs} +1 -1
- package/dist/web-components/viewer/{AnnotationMenu-i4ieWtOL.mjs → AnnotationMenu-0Ru0csCz.mjs} +1 -1
- package/dist/web-components/viewer/{AnnotationState-BmDac4UI.mjs → AnnotationState-hEds2Tpa.mjs} +1 -1
- package/dist/web-components/viewer/{Annotations-CEwycZ2M.mjs → Annotations-Oprg7015.mjs} +1 -1
- package/dist/web-components/viewer/{Annotations-C-zxQ4wJ.mjs → Annotations-vzP6-fS4.mjs} +1 -1
- package/dist/web-components/viewer/{Canvas2DBackend-BFb2tuhl.mjs → Canvas2DBackend-3b5xEKac.mjs} +1 -1
- package/dist/web-components/viewer/CaptionDetails-DDIjm-rC.mjs +1 -0
- package/dist/web-components/viewer/ChaptersMenu-DmJy-cfd.mjs +1 -0
- package/dist/web-components/viewer/{ChoiceMenu-Ccv0BI0G.mjs → ChoiceMenu-COUDRKGM.mjs} +1 -1
- package/dist/web-components/viewer/{Collection-86-r4tY9.mjs → Collection-kWUradiW.mjs} +1 -1
- package/dist/web-components/viewer/{Connected-D_7Zs7Hq.mjs → Connected-B2TrgX9-.mjs} +1 -1
- package/dist/web-components/viewer/{Connected-DbLzPNdX.mjs → Connected-FiJKHEv9.mjs} +1 -1
- package/dist/web-components/viewer/{Contents-DUjhQjnI.mjs → Contents-DHyzbjco.mjs} +1 -1
- package/dist/web-components/viewer/{ControlMenu-CKcTiPrh.mjs → ControlMenu-DWi6tgKb.mjs} +1 -1
- package/dist/web-components/viewer/ControlsFade-CuooJOpa.mjs +1 -0
- package/dist/web-components/viewer/{CountMenu-B1_cvbuR.mjs → CountMenu-BYU6T0Ou.mjs} +1 -1
- package/dist/web-components/viewer/Cue-Ct2isFl7.mjs +1 -0
- package/dist/web-components/viewer/{Document-BGRVcflJ.mjs → Document-BtN3vmsO.mjs} +1 -1
- package/dist/web-components/viewer/{DomLayers-wxV3sHPY.mjs → DomLayers-CEzVM7HQ.mjs} +1 -1
- package/dist/web-components/viewer/{Download-Cyfhran6.mjs → Download-5BsnDZLL.mjs} +1 -1
- package/dist/web-components/viewer/{EntryBodies-B2WCkj8y.mjs → EntryBodies-D9R-wouw.mjs} +1 -1
- package/dist/web-components/viewer/{EntryThumbnail-dUTxyqTj.mjs → EntryThumbnail-P6CmjmO9.mjs} +1 -1
- package/dist/web-components/viewer/{FieldPill-D8gW-r_p.mjs → FieldPill-CsyRt9Xh.mjs} +1 -1
- package/dist/web-components/viewer/FrameAnimation-f4RKtdpP.mjs +1 -0
- package/dist/web-components/viewer/{Gallery-OZ5ZiwmB.mjs → Gallery-DC4QY9lG.mjs} +1 -1
- package/dist/web-components/viewer/{GlobeGlyph-CXycpMBJ.mjs → GlobeGlyph-BwZm2Ffj.mjs} +1 -1
- package/dist/web-components/viewer/{HideToggle-BMddH3GA.mjs → HideToggle-BD6zlrz3.mjs} +1 -1
- package/dist/web-components/viewer/{ImageControls-Bu_6VlDO.mjs → ImageControls-Bw9a17cS.mjs} +1 -1
- package/dist/web-components/viewer/ItemsVertical-BftsRVJP.mjs +1 -0
- package/dist/web-components/viewer/{LanguageChoice-BUTtsHEi.mjs → LanguageChoice-CcDmpHnE.mjs} +1 -1
- package/dist/web-components/viewer/{LanguageMenu-DOYyHpdr.mjs → LanguageMenu-CRtM-mLy.mjs} +1 -1
- package/dist/web-components/viewer/{LightboxView-DP4_ElsL.mjs → LightboxView-DJoH23fL.mjs} +1 -1
- package/dist/web-components/viewer/{ListEnd-CEdhO0md.mjs → ListEnd-CSp0KGGZ.mjs} +1 -1
- package/dist/web-components/viewer/{MapView-qaaRmnM-.mjs → MapView-BO2ppZpW.mjs} +2 -2
- package/dist/web-components/viewer/{MediaBody-Cjl76Spk.mjs → MediaBody-CMddJWMF.mjs} +1 -1
- package/dist/web-components/viewer/{MediaBody-CvXptO7l.mjs → MediaBody-D-1SNnW2.mjs} +1 -1
- package/dist/web-components/viewer/{NavDate-OJND1QQD.mjs → NavDate-BJ_MF_t1.mjs} +1 -1
- package/dist/web-components/viewer/{Navigator-DRwnm5an.mjs → Navigator-Gt56cM6f.mjs} +1 -1
- package/dist/web-components/viewer/{PagerLayout-DN7ZEktF.mjs → PagerLayout-BMrlMLfO.mjs} +1 -1
- package/dist/web-components/viewer/PanelPart-CaxBca8z.mjs +1 -0
- package/dist/web-components/viewer/{PartOfManifest-3cK5il9_.mjs → PartOfManifest-BdZWbAQI.mjs} +1 -1
- package/dist/web-components/viewer/{PlaceBox-C9qj6wIy.mjs → PlaceBox-C27N2KG8.mjs} +1 -1
- package/dist/web-components/viewer/{Placeholder-DmX-oTRS.mjs → Placeholder-BX2y25Fo.mjs} +1 -1
- package/dist/web-components/viewer/{Search-DLRmliHy.mjs → Search-auUpOyeS.mjs} +1 -1
- package/dist/web-components/viewer/{SeekMarks-BsAVx2o9.mjs → SeekMarks-Bg0PLdp0.mjs} +1 -1
- package/dist/web-components/viewer/{StandaloneItems-BOXI-FO-.mjs → StandaloneItems-CBRWUCNf.mjs} +1 -1
- package/dist/web-components/viewer/{Steps-Dl85Vj2l.mjs → Steps-ABKs2V_m.mjs} +1 -1
- package/dist/web-components/viewer/{TargetItems-BVT2_Bey.mjs → TargetItems-BQVUKMAs.mjs} +1 -1
- package/dist/web-components/viewer/Transcript-DaShc1z-.mjs +1 -0
- package/dist/web-components/viewer/{Transport-DKUQM7Hn.mjs → Transport-6wRUIGiD.mjs} +1 -1
- package/dist/web-components/viewer/{Transport-Bu1B2DCX.mjs → Transport-ClkPaaOB.mjs} +1 -1
- package/dist/web-components/viewer/{annotation-collection-B7DNaCRe.mjs → annotation-collection-eyRpE2h4.mjs} +1 -1
- package/dist/web-components/viewer/{annotation-name-DCAh29x5.mjs → annotation-name-DdchUvJI.mjs} +1 -1
- package/dist/web-components/viewer/{annotations-content-BG992gjT.mjs → annotations-content-BZXlT3bR.mjs} +1 -1
- package/dist/web-components/{cloverEngine-BjfUbU7f.mjs → viewer/cloverEngine-CZWHXlyY.mjs} +3 -3
- package/dist/web-components/viewer/{content-state-reader-CRGjvYpM.mjs → content-state-reader-CDV0Igdx.mjs} +1 -1
- package/dist/web-components/viewer/{dragToClose-Di8WUOHC.mjs → dragToClose-CD-MJb-V.mjs} +1 -1
- package/dist/web-components/viewer/{fetchManifest-B3gCtveO.mjs → fetchManifest-C1IEIf45.mjs} +1 -1
- package/dist/web-components/viewer/{follow-content-2RmNmRMy.mjs → follow-content-IQqCbvbJ.mjs} +1 -1
- package/dist/web-components/viewer/{host-CM3zmrKp.mjs → host-BxQrzQnu.mjs} +1 -1
- package/dist/web-components/viewer/{image-layers-CmimeZYQ.mjs → image-layers-DurrQgfL.mjs} +1 -1
- package/dist/web-components/viewer/{image-service-content-DNYciFvo.mjs → image-service-content-ClAm_g0Y.mjs} +1 -1
- package/dist/web-components/viewer/index.mjs +1 -1
- package/dist/web-components/viewer/{link-CrW4CND2.mjs → link-Drdj-HcB.mjs} +1 -1
- package/dist/web-components/viewer/overlayImage-CDT5ohRo.mjs +1 -0
- package/dist/web-components/viewer/{range-regions-DwMexshz.mjs → range-regions-a5eVBfJy.mjs} +1 -1
- package/dist/web-components/viewer/{renderers-Cs9Wbr3d.mjs → renderers-CdXzZ9As.mjs} +1 -1
- package/dist/web-components/viewer/save-file-B2UBQRXz.mjs +1 -0
- package/dist/web-components/viewer/{search-CI1xScP1.mjs → search-BBZKUiMB.mjs} +1 -1
- package/dist/web-components/viewer/styles-XRfyRUPf.mjs +1 -0
- package/dist/web-components/viewer/{useControlsVisibility-CCTZH1aT.mjs → useControlsVisibility-BfTACzo_.mjs} +1 -1
- package/dist/web-components/viewer/viewer-BrkFZVo_.mjs +29 -0
- package/dist/web-components/viewer/vtt-CCkTp_f2.mjs +5 -0
- package/dist/web-components/{viewer-DD2bGSYe.mjs → viewer-D-AQ7mGw.mjs} +1 -1
- package/dist/web-components/vtt-BjXkNfI_.mjs +5 -0
- package/dist/web-components/{zh-Hans-Bfn3LUnq.mjs → zh-Hans-BhTHTZXT.mjs} +1 -1
- package/dist/web-components/{zh-Hant-DzmK541A.mjs → zh-Hant-_CJAOTzC.mjs} +1 -1
- package/package.json +1 -1
- package/dist/web-components/AnnotationItems-DKP8AOB9.mjs +0 -1
- package/dist/web-components/CanvasView-DK0lfyWR.mjs +0 -2
- package/dist/web-components/Connected-CC10s8oE.mjs +0 -1
- package/dist/web-components/ControlsFade-DNHDI2WA.mjs +0 -1
- package/dist/web-components/Cue-C2a4Pvi3.mjs +0 -1
- package/dist/web-components/FrameAnimation-DJRLNImC.mjs +0 -1
- package/dist/web-components/Items-V4WBXxYO.mjs +0 -1
- package/dist/web-components/LoadedCanvas-DisvEU6k.mjs +0 -1
- package/dist/web-components/LoadedMap-DCMWMk1e.mjs +0 -1
- package/dist/web-components/Loading-BXzghLiL.mjs +0 -1
- package/dist/web-components/PagerLayout-B-a-Bj7s.mjs +0 -1
- package/dist/web-components/PanelPart-C5T9XPgt.mjs +0 -1
- package/dist/web-components/PlaceBox-DW79A9P1.mjs +0 -1
- package/dist/web-components/Root-DdfxetNr.mjs +0 -1
- package/dist/web-components/Scene-CoKy2-jQ.mjs +0 -1
- package/dist/web-components/StandaloneItems-BrGYircX.mjs +0 -1
- package/dist/web-components/Timeline-CylMxHCg.mjs +0 -1
- package/dist/web-components/Transcript-BdmTrR_U.mjs +0 -1
- package/dist/web-components/imageService-DVoE9khh.mjs +0 -1
- package/dist/web-components/items-Di34gCGN.mjs +0 -1
- package/dist/web-components/label-Dt_ns3jW.mjs +0 -1
- package/dist/web-components/logo-QsMwaY8M.mjs +0 -1
- package/dist/web-components/part-DgEyWjer.mjs +0 -1
- package/dist/web-components/rendererSurface-BZa3x_Xh.mjs +0 -22
- package/dist/web-components/save-file-oScSwFhH.mjs +0 -1
- package/dist/web-components/shared-w6hjs-L1.mjs +0 -1
- package/dist/web-components/styles-BeCG47FS.mjs +0 -1
- package/dist/web-components/thumbnail-DhVhVkd8.mjs +0 -1
- package/dist/web-components/viewer/CaptionDetails-Et5z9c7X.mjs +0 -1
- package/dist/web-components/viewer/ChaptersMenu-CSFNWKY2.mjs +0 -1
- package/dist/web-components/viewer/ControlsFade-Bo9VWCLG.mjs +0 -1
- package/dist/web-components/viewer/Cue-DzOw4BLm.mjs +0 -1
- package/dist/web-components/viewer/FrameAnimation-ChG6Louz.mjs +0 -1
- package/dist/web-components/viewer/PanelPart-CF2Fw2b4.mjs +0 -1
- package/dist/web-components/viewer/Transcript-fRjfw6kB.mjs +0 -1
- package/dist/web-components/viewer/overlayImage-Bgl_ar2I.mjs +0 -1
- package/dist/web-components/viewer/save-file-CpREFWq3.mjs +0 -1
- package/dist/web-components/viewer/styles-nU97HodU.mjs +0 -1
- package/dist/web-components/viewer/viewer-BDXZbbZI.mjs +0 -29
- package/dist/web-components/viewer/vtt-DJjsoNz1.mjs +0 -5
- package/dist/web-components/vtt-D30pzLou.mjs +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
var T=Object.defineProperty;var x=(e,t,n)=>t in e?T(e,t,{enumerable:true,configurable:true,writable:true,value:n}):e[t]=n;var L=(e,t,n)=>x(e,typeof t!="symbol"?t+"":t,n);import{a as m,A as M,d as
|
|
1
|
+
var T=Object.defineProperty;var x=(e,t,n)=>t in e?T(e,t,{enumerable:true,configurable:true,writable:true,value:n}):e[t]=n;var L=(e,t,n)=>x(e,typeof t!="symbol"?t+"":t,n);import{a as m,A as M,d as v,ah as N,y as b,u as o,t as O,l as p,P as S,z as B,_ as I,q as P,C as H,R as A}from"./shared-D2pvbPvF.mjs";import{C as D}from"./glyphs-8fjIPAtZ.mjs";import{B as w}from"./Button-a59NBnOp.mjs";import"./styles-Bf3qmdsh.mjs";import{T as W}from"./Tip-Dv-gYN8n.mjs";import{e as _}from"./controlGlyphs-Lxfq7zz4.mjs";const q=B(()=>import("./CaptionDetails-CCCTWTQP.mjs"));function oe(e){var t;return!!e.summary||!!((t=e.metadata)!=null&&t.length)}const U=(e,t)=>`${e}-label-${t}`,ae=({id:e,canvases:t,comments:n,open:s,onClose:r,language:a})=>{const{t:u,langOf:c}=m(),i=M(null),[f,h]=v(s);return s&&!f&&h(true),N(s,()=>r(false)),b(()=>{var l;s&&((l=i.current)==null||l.focus())},[s]),o("figcaption",{className:"clover-canvas-caption","data-open":s,"data-testid":"clover-canvas-caption",id:e,onKeyDown:l=>{l.key!=="Escape"||l.defaultPrevented||(l.preventDefault(),l.stopPropagation(),r(true))},ref:i,tabIndex:-1,children:[o(w,{className:"clover-canvas-caption-close",id:`close-${e}`,label:u("commonClose"),lang:c("commonClose"),onClick:()=>r(true),children:o(D,{})}),t.map((l,E)=>{const d=O(l.label,a);return o("section",{className:"clover-canvas-caption-canvas",children:[d.text&&o("p",{className:"clover-canvas-caption-label",id:U(e,E),...p(d.lang),children:d.text}),f&&o(S,{fallback:null,children:o(q,{summary:l.summary,metadata:l.metadata,comments:n==null?void 0:n.get(l.id),language:a})})]},l.id)})]})},z=112,$=128;function j(e){I(()=>{const t=e==null?void 0:e.closest(".clover-canvas");if(!e||!t)return;const n=(a=false)=>{let u=e.offsetWidth,c=0;for(const d of a?[]:Array.from(e.children))!(d instanceof HTMLElement)||!d.offsetParent||(u=Math.min(u,d.offsetLeft),c=Math.max(c,d.offsetTop+d.offsetHeight));const i={width:e.offsetWidth-u,height:c};for(const[d,C]of Object.entries(i)){const y=`--clover-canvas-controls-${d}`;c?t.style.setProperty(y,`${C}px`):t.style.removeProperty(y)}const f=e.offsetTop,h=t.querySelector(":scope > .clover-canvas-media > .clover-canvas-transport"),l=t.clientHeight-2*f-i.height-((h==null?void 0:h.offsetHeight)??0),E=e.offsetLeft+u-f;c&&l<z&&E>=$?t.dataset.popups="beside":delete t.dataset.popups};n();const s=new ResizeObserver(()=>n());s.observe(e),s.observe(t);const r=new MutationObserver(()=>n());return r.observe(e,{childList:true}),r.observe(t,{childList:true}),()=>{s.disconnect(),r.disconnect(),n(true)}},[e])}const g=()=>{if(typeof document>"u")return null;const e=document;return e.fullscreenElement??e.webkitFullscreenElement??null},F=()=>{if(typeof document>"u")return false;const e=document;return!!(e.fullscreenEnabled??e.webkitFullscreenEnabled)},k=e=>{const t=e==null?void 0:e.closest(".clover-root"),n=e==null?void 0:e.closest("dialog");return t&&!(n&&t.contains(n))?t:(e==null?void 0:e.closest(".clover-canvas"))??null},K=(e,t)=>{if(typeof e.webkitEnterFullscreen!="function")return;const n=t.closest(".clover-canvas"),s=!e.isConnected&&!!n;if(s&&n){const a=e.getAttribute("style");e.style.cssText="position:absolute;inset:0;z-index:-1;width:100%;height:100%;object-fit:contain;pointer-events:none",n.prepend(e),e.addEventListener("webkitendfullscreen",()=>{e.remove(),a===null?e.removeAttribute("style"):e.setAttribute("style",a)},{once:true})}const r=()=>{var a;try{(a=e.webkitEnterFullscreen)==null||a.call(e)}catch{}};s?requestAnimationFrame(r):r()},Y=async(e,t)=>{var s,r,a,u;const n=k(e);if(n)try{if(g()){const i=document;await(((s=i.exitFullscreen)==null?void 0:s.call(i))??((r=i.webkitExitFullscreen)==null?void 0:r.call(i)));return}if(!F()){t&&e&&K(t,e);return}const c=n;await(((a=c.requestFullscreen)==null?void 0:a.call(c))??((u=c.webkitRequestFullscreen)==null?void 0:u.call(c)))}catch{}};function R(e){const[t,n]=v(false);return b(()=>{if(!e)return;const s=()=>{var r;return n(!!((r=g())!=null&&r.contains(e)))};return s(),document.addEventListener("fullscreenchange",s),document.addEventListener("webkitfullscreenchange",s),()=>{document.removeEventListener("fullscreenchange",s),document.removeEventListener("webkitfullscreenchange",s)}},[e]),t}function ce({key:e,id:t,label:n,glyph:s,onClick:r,expanded:a,controls:u,shortcut:c,lang:i,unavailable:f},h){const l=h==null?void 0:h[e];return l?o(l,{buttonProps:{id:t,type:"button","aria-label":n,...i&&{lang:i},...c&&{"aria-keyshortcuts":c.keys},onClick:f?void 0:r,...f&&{"aria-disabled":true},...a!==void 0&&{"aria-expanded":a,"aria-controls":u}},icon:o(_,{label:n,children:s}),label:n,tip:o(W,{label:n,shortcut:c})},e):o(w,{id:t,label:n,onClick:f?void 0:r,unavailable:f,expanded:a,controls:u,shortcut:c,lang:i,children:s},e)}const le=({fit:e=false,clusterRef:t,children:n})=>{const[s,r]=v(null),a=R(s);j(s);const u=P(c=>{r(c),t==null||t(c)},[t]);return o("div",{className:"clover-canvas-controls","data-fit":e||void 0,"data-fullscreen":a,"data-testid":"clover-canvas-controls",ref:u,children:n})},V=()=>()=>{};function ie(){return H(V,F)}const ue=({hidden:e})=>{const{t,langOf:n}=m(),s=t("imageExitFullScreen");return o("button",{"aria-label":s,...p(n("imageExitFullScreen")),className:"clover-canvas-exit-full-screen",hidden:e,onClick:r=>void Y(r.currentTarget),type:"button",children:[o("svg",{viewBox:"0 0 512 512",width:"20",height:"20","aria-hidden":"true",focusable:"false",children:o("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"45",d:"M244 400L100 256l144-144M120 256h292"})}),s]})};function de(e){const[t,n]=v(false);return b(()=>{if(!e)return;const s=()=>n(g()===e);return s(),document.addEventListener("fullscreenchange",s),document.addEventListener("webkitfullscreenchange",s),()=>{document.removeEventListener("fullscreenchange",s),document.removeEventListener("webkitfullscreenchange",s)}},[e]),t}function fe(e){const[t,n]=v(false);return b(()=>{if(!e)return;const s=()=>{const r=g();n(r===e||!!r&&k(e)===r&&(r==null?void 0:r.querySelector(".clover-canvas"))===e)};return s(),document.addEventListener("fullscreenchange",s),document.addEventListener("webkitfullscreenchange",s),()=>{document.removeEventListener("fullscreenchange",s),document.removeEventListener("webkitfullscreenchange",s)}},[e]),t}class he extends A.Component{constructor(){super(...arguments);L(this,"state",{error:null})}static getDerivedStateFromError(n){return{error:n}}render(){const{error:n}=this.state;return n?o(G,{error:n}):this.props.children}}function G({error:e}){const{t,langOf:n}=m();return o("div",{className:"clover-canvas-error",role:"alert",children:[o("p",{className:"clover-canvas-error-headline","data-testid":"headline",...p(n("statusError")),children:t("statusError")}),e.message&&o("span",{className:"clover-canvas-error-body",lang:"en",children:e.message})]})}const J={image:"bodyUnloadableImage",video:"bodyUnloadableVideo",audio:"bodyUnloadableAudio",model:"bodyUnloadableModel"};function ve({kind:e,shown:t,room:n=false}){const{t:s,langOf:r}=m(),a=J[e];return o("div",{className:"clover-body-unloadable","data-room":n||void 0,role:"status",children:t&&o("p",{...p(r(a)),children:s(a)})})}function pe({text:e,lang:t}){return o("div",{className:"clover-body-note","aria-hidden":"true",children:o("p",{...p(t),children:e})})}const Q=5,me=300,be=Q*4;function ge(e,t=false){return e==="touch"||e==="pen"&&!t}function Ee(e){return e.pointerType==="pen"&&e.buttons===0}function ye(e,t,n){for(let s=e;s&&s!==t;s=s.parentElement)if((n>0?s.scrollHeight-s.clientHeight-s.scrollTop:s.scrollTop)>=1&&/auto|scroll/.test(getComputedStyle(s).overflowY))return true;return false}function Le(e,t){var s;let n=e;for(;n&&n!==t;){if(n instanceof HTMLButtonElement||n instanceof HTMLAnchorElement||n instanceof HTMLInputElement||n instanceof HTMLLabelElement||n instanceof HTMLSelectElement||((s=n.dataset)==null?void 0:s.cloverCanvasInteractive)!==void 0)return true;n=n.parentElement}return false}export{ve as B,le as C,be as D,he as E,Q as T,Ee as a,me as b,ge as c,R as d,de as e,fe as f,U as g,oe as h,Le as i,ue as j,pe as k,ae as l,ce as r,ye as s,Y as t,ie as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as r}from"./shared-
|
|
1
|
+
import{u as r}from"./shared-D2pvbPvF.mjs";import{L as n,P as a}from"./Provider-BUDzNTyJ.mjs";import{u as i}from"./nodes-nZmQ93ib.mjs";const s=t=>[...t.children].filter(e=>e.localName==="clover-logo").map(e=>({element:e,alt:e.getAttribute("alt")??void 0})),c=(t,e)=>t.length===e.length&&t.every((l,o)=>l.element===e[o].element&&l.alt===e[o].alt);function u({hosted:t,props:e}){const l=i(t.element,()=>s(t.element),c);return r(a,{...e,children:l.length?l.map((o,m)=>r(n,{alt:o.alt},m)):void 0})}export{u as ProviderElement};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a=JSON.parse('{"commonClose":"Fechar","commonNext":"Seguinte","commonPrevious":"Anterior","commonSearch":"Pesquisar","commonViewAll":"Ver tudo","controlShortcut":"{{label}} ({{shortcut}})","contentSearchLoading":"A carregar...","contentSearchPlaceholder":"Pesquisar","contentSearchResultsNone":"Sem resultados","contentSearchResult":"1 resultado","contentSearchResults":"{{count}} resultados","contentSearchError":"N\xE3o foi poss\xEDvel concluir a pesquisa.","contentSearchPosition":"Resultado {{index}} de {{total}}","contentSearchClear":"Limpar a pesquisa","canvasPosition":"Item {{index}} de {{total}}","canvasImage":"Imagem","bodyUnloadableImage":"N\xE3o foi poss\xEDvel carregar esta imagem.","bodyUnloadableVideo":"N\xE3o foi poss\xEDvel carregar este v\xEDdeo.","bodyUnloadableAudio":"N\xE3o foi poss\xEDvel carregar este \xE1udio.","bodyUnloadableModel":"N\xE3o foi poss\xEDvel carregar este modelo.","canvasRoleDescription":"imagem ampli\xE1vel","canvasKeysImage":"Use as teclas de seta para deslocar a imagem, com Shift para ir mais longe, mais e menos para ampliar e reduzir, 0 para repor a vista, e R ou Shift+R para rodar.","canvasKeysMedia":"Prima Espa\xE7o ou K para reproduzir ou pausar, J ou L para recuar ou avan\xE7ar dez segundos, e M para silenciar ou ativar o som.","canvasKeysAnnotations":"Prima Esc para desmarcar a anota\xE7\xE3o.","sceneModel":"Modelo 3D","sceneRoleDescription":"modelo 3D rotativo","sceneKeys":"Use as teclas de seta para rodar o modelo, com Shift para ir mais longe, mais e menos para ampliar e reduzir, 0 para repor a vista, e R ou Shift+R para o rodar para a direita ou para a esquerda.","sceneRotateUp":"Rodar para cima","sceneRotateDown":"Rodar para baixo","sceneRotate":"Rodar","sceneResetView":"Repor a vista","statusLoading":"A carregar\u2026","statusError":"N\xE3o foi poss\xEDvel carregar este conte\xFAdo.","itemsLabel":"Itens","download":"Transferir","downloadPage":"Esta p\xE1gina","downloadAll":"Todas as p\xE1ginas","templateSidebar":"Itens","templateSidebarToggle":"Mostrar itens","templateBack":"Voltar","templateBackTo":"Voltar a {{label}}","collectionLabel":"Cole\xE7\xE3o","itemsScrollBack":"Mostrar itens anteriores","itemsScrollForward":"Mostrar mais itens","aboutRights":"Direitos","aboutDate":"Data","aboutHomepage":"P\xE1gina inicial","aboutSeeAlso":"Ver tamb\xE9m","aboutProvider":"Fornecedor","logo":"Log\xF3tipo","aboutManifest":"Manifesto IIIF","aboutCanvas":"Tela IIIF","aboutPartOf":"Parte de","aboutOpenManifest":"Abrir o manifesto completo","aboutCollection":"Cole\xE7\xE3o IIIF","readingLanguage":"Idioma","annotationsHide":"Ocultar anota\xE7\xF5es","annotationsHideTip":"Ocultar","readMore":"Ler mais","readLess":"Ler menos","annotationsShow":"Mostrar na imagem","annotationsShowTime":"Mostrar na grava\xE7\xE3o","annotationsImage":"Imagem","annotationsLanguage":"Idioma","annotationsOpenLink":"Abrir","transcriptLabel":"Transcri\xE7\xE3o","imageViewerOpen":"Abrir o visualizador de imagens","imageViewerClose":"Fechar o visualizador de imagens","canvasChoice":"Alternativas","canvasViewerControls":"Controlos do visualizador","canvasExpandControls":"Expandir os controlos do visualizador","canvasCollapseControls":"Recolher os controlos do visualizador","canvasScrollBack":"Mostrar controlos anteriores","canvasScrollForward":"Mostrar mais controlos","imageFullScreen":"Ecr\xE3 completo","imageExitFullScreen":"Sair do ecr\xE3 completo","imageResetZoom":"Repor o zoom","imageRotateLeft":"Rodar para a esquerda","imageRotateRight":"Rodar para a direita","imageZoomIn":"Ampliar","imageZoomOut":"Reduzir","informationPanelTabs":"Painel de informa\xE7\xF5es","sectionsScrollBack":"Mostrar separadores anteriores","sectionsScrollForward":"Mostrar mais separadores","informationPanelClose":"Fechar o painel de informa\xE7\xF5es","informationPanelTabsAbout":"Sobre","informationPanelTabsAnnotations":"Anota\xE7\xF5es","informationPanelTabsSearch":"Pesquisa","informationPanelTabsContents":"Conte\xFAdo","contentsSectionsIn":"Sec\xE7\xF5es de","informationPanelTabsMap":"Mapa","informationPanelTabsCollection":"Cole\xE7\xE3o","informationPanelTabsTargets":"Vistas","mapUnavailable":"N\xE3o foi poss\xEDvel mostrar o mapa.","mapLabel":"Mapa","mapAttribution":"Cr\xE9ditos do mapa","mapPlaceUntitled":"Local {{number}}","mapOverlay":"Imagem georreferenciada","mapPlacesListed":"Locais listados depois do mapa: {{count}}","informationPanelToggle":"Mais informa\xE7\xF5es","playerPlay":"Reproduzir","playerPause":"Pausar","playerMute":"Silenciar","playerUnmute":"Ativar o som","playerVolume":"Volume","playerSeek":"Posi\xE7\xE3o de reprodu\xE7\xE3o","playerCaptions":"Legendas","playerCaptionsOff":"Desativadas","playerChapters":"Cap\xEDtulos","playerFill":"Preencher o enquadramento","playerFit":"Ajustar ao enquadramento","
|
|
1
|
+
const a=JSON.parse('{"commonClose":"Fechar","commonNext":"Seguinte","commonPrevious":"Anterior","commonSearch":"Pesquisar","commonViewAll":"Ver tudo","controlShortcut":"{{label}} ({{shortcut}})","contentSearchLoading":"A carregar...","contentSearchPlaceholder":"Pesquisar","contentSearchResultsNone":"Sem resultados","contentSearchResult":"1 resultado","contentSearchResults":"{{count}} resultados","contentSearchError":"N\xE3o foi poss\xEDvel concluir a pesquisa.","contentSearchPosition":"Resultado {{index}} de {{total}}","contentSearchClear":"Limpar a pesquisa","canvasPosition":"Item {{index}} de {{total}}","canvasImage":"Imagem","bodyUnloadableImage":"N\xE3o foi poss\xEDvel carregar esta imagem.","bodyUnloadableVideo":"N\xE3o foi poss\xEDvel carregar este v\xEDdeo.","bodyUnloadableAudio":"N\xE3o foi poss\xEDvel carregar este \xE1udio.","bodyUnloadableModel":"N\xE3o foi poss\xEDvel carregar este modelo.","canvasRoleDescription":"imagem ampli\xE1vel","canvasKeysImage":"Use as teclas de seta para deslocar a imagem, com Shift para ir mais longe, mais e menos para ampliar e reduzir, 0 para repor a vista, e R ou Shift+R para rodar.","canvasKeysMedia":"Prima Espa\xE7o ou K para reproduzir ou pausar, J ou L para recuar ou avan\xE7ar dez segundos, e M para silenciar ou ativar o som.","canvasKeysAnnotations":"Prima Esc para desmarcar a anota\xE7\xE3o.","sceneModel":"Modelo 3D","sceneRoleDescription":"modelo 3D rotativo","sceneKeys":"Use as teclas de seta para rodar o modelo, com Shift para ir mais longe, mais e menos para ampliar e reduzir, 0 para repor a vista, e R ou Shift+R para o rodar para a direita ou para a esquerda.","sceneRotateUp":"Rodar para cima","sceneRotateDown":"Rodar para baixo","sceneRotate":"Rodar","sceneResetView":"Repor a vista","statusLoading":"A carregar\u2026","statusError":"N\xE3o foi poss\xEDvel carregar este conte\xFAdo.","itemsLabel":"Itens","download":"Transferir","downloadPage":"Esta p\xE1gina","downloadAll":"Todas as p\xE1ginas","templateSidebar":"Itens","templateSidebarToggle":"Mostrar itens","templateBack":"Voltar","templateBackTo":"Voltar a {{label}}","collectionLabel":"Cole\xE7\xE3o","itemsScrollBack":"Mostrar itens anteriores","itemsScrollForward":"Mostrar mais itens","aboutRights":"Direitos","aboutDate":"Data","aboutHomepage":"P\xE1gina inicial","aboutSeeAlso":"Ver tamb\xE9m","aboutProvider":"Fornecedor","logo":"Log\xF3tipo","aboutManifest":"Manifesto IIIF","aboutCanvas":"Tela IIIF","aboutPartOf":"Parte de","aboutOpenManifest":"Abrir o manifesto completo","aboutCollection":"Cole\xE7\xE3o IIIF","readingLanguage":"Idioma","annotationsHide":"Ocultar anota\xE7\xF5es","annotationsHideTip":"Ocultar","readMore":"Ler mais","readLess":"Ler menos","annotationsShow":"Mostrar na imagem","annotationsShowTime":"Mostrar na grava\xE7\xE3o","annotationsImage":"Imagem","annotationsLanguage":"Idioma","annotationsOpenLink":"Abrir","transcriptLabel":"Transcri\xE7\xE3o","imageViewerOpen":"Abrir o visualizador de imagens","imageViewerClose":"Fechar o visualizador de imagens","canvasChoice":"Alternativas","canvasViewerControls":"Controlos do visualizador","canvasExpandControls":"Expandir os controlos do visualizador","canvasCollapseControls":"Recolher os controlos do visualizador","canvasScrollBack":"Mostrar controlos anteriores","canvasScrollForward":"Mostrar mais controlos","imageFullScreen":"Ecr\xE3 completo","imageExitFullScreen":"Sair do ecr\xE3 completo","imageResetZoom":"Repor o zoom","imageRotateLeft":"Rodar para a esquerda","imageRotateRight":"Rodar para a direita","imageZoomIn":"Ampliar","imageZoomOut":"Reduzir","informationPanelTabs":"Painel de informa\xE7\xF5es","sectionsScrollBack":"Mostrar separadores anteriores","sectionsScrollForward":"Mostrar mais separadores","informationPanelClose":"Fechar o painel de informa\xE7\xF5es","informationPanelTabsAbout":"Sobre","informationPanelTabsAnnotations":"Anota\xE7\xF5es","informationPanelTabsSearch":"Pesquisa","informationPanelTabsContents":"Conte\xFAdo","contentsSectionsIn":"Sec\xE7\xF5es de","informationPanelTabsMap":"Mapa","informationPanelTabsCollection":"Cole\xE7\xE3o","informationPanelTabsTargets":"Vistas","mapUnavailable":"N\xE3o foi poss\xEDvel mostrar o mapa.","mapLabel":"Mapa","mapAttribution":"Cr\xE9ditos do mapa","mapPlaceUntitled":"Local {{number}}","mapOverlay":"Imagem georreferenciada","mapPlacesListed":"Locais listados depois do mapa: {{count}}","informationPanelToggle":"Mais informa\xE7\xF5es","playerPlay":"Reproduzir","playerPause":"Pausar","playerMute":"Silenciar","playerUnmute":"Ativar o som","playerVolume":"Volume","playerSeek":"Posi\xE7\xE3o de reprodu\xE7\xE3o","playerCaptions":"Legendas","playerCaptionsOff":"Desativadas","playerChapters":"Cap\xEDtulos","playerFill":"Preencher o enquadramento","playerFit":"Ajustar ao enquadramento","playerCurrentTime":"Tempo atual","playerDuration":"Dura\xE7\xE3o","splitHandle":"Redimensionar os pain\xE9is"}');export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{U as c,
|
|
1
|
+
import{U as c,aB as l,ae as g,aC as v,M as b}from"./shared-D2pvbPvF.mjs";const A=t=>t&&typeof t=="object"?Object.entries(t).flatMap(([i,r])=>c(r).filter(s=>typeof s=="string").map(s=>({value:s,...i!=="none"?{language:i}:{}}))):typeof t=="string"?[{value:t}]:[],a=new WeakMap;function O(t){if(!t)return null;if(a.has(t))return a.get(t);const i=[],r=new Set,s=n=>{if(!n||r.has(n.id??n))return;r.add(n.id??n);const w=typeof n.id=="string"&&!c(n.behavior).includes("no-nav"),d=A(n.label),h=c(n.items).filter(o=>(o==null?void 0:o.type)!=="Range"&&g(v(o)).id).length;let x=0;for(const o of c(n.items)){if((o==null?void 0:o.type)==="Range"){s(o);continue}const e=g(v(o));if(!e.id)continue;const f=x++;if(!w||!e.rect)continue;const{x:T,y:I,w:S,h:$}=e.rect,u=b(n.id,f);i.push({id:u,setId:l,canvasId:e.id,target:{id:e.id,rect:e.rect},motivation:["highlighting"],bodies:d,...h>1?{place:{index:f+1,total:h}}:{},annotation:{id:u,type:"Annotation",motivation:["highlighting"],...d.length&&{body:d.map(({value:E,language:y})=>({type:"TextualBody",value:E,...y?{language:y}:{}}))},target:`${e.id}#xywh=${T},${I},${S},${$}`}})}};c(t.structures).forEach(s);const p=i.length?{id:l,source:"contents",entries:i}:null;return a.set(t,p),p}export{O as contentsSet};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as m,
|
|
1
|
+
import{a as m,a6 as f,b,A as p,_ as n,u as v,l as g}from"./shared-D2pvbPvF.mjs";import{u as L}from"./ReadMore-B6qft77s.mjs";import{u as A}from"./nodes-nZmQ93ib.mjs";const M=o=>[...o.children].find(r=>!r.classList.contains("clover-read-more-button"))??null;function k({hosted:o}){const r=o.element,e=A(r,()=>M(r),Object.is),{t:s}=m(),i=f(),a=b(),l=p(null);l.current=e;const{open:t,cut:c,toggle:d}=L(l);return n(()=>(r.classList.add("clover-read-more"),()=>r.classList.remove("clover-read-more")),[r]),n(()=>{if(!e)return;const u=e.id;return u||(e.id=a),()=>{u||e.removeAttribute("id"),e.removeAttribute("data-read-more")}},[e,a]),n(()=>{e==null||e.setAttribute("data-read-more",t?"open":"")},[e,t]),!e||!(c||t)?null:v("button",{type:"button",className:"clover-read-more-button","aria-expanded":t,"aria-controls":e.id||a,onClick:d,ref:i.ref,...g(i.langOf(t?"readLess":"readMore")),children:s(t?"readLess":"readMore")})}export{k as ReadMoreElement};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as c,e as l,c as u,T as g,G as m,O as y}from"./shared-
|
|
1
|
+
import{t as c,e as l,c as u,T as g,G as m,O as y}from"./shared-D2pvbPvF.mjs";const i=e=>e&&typeof e=="object"&&!Array.isArray(e)?Object.keys(e).filter(n=>n!=="none"&&n!=="@none"&&c({[n]:e[n]}).text):[];function b(e){if(!e)return[];const n=[...Array.isArray(e.metadata)?e.metadata:[],e.requiredStatement].filter(Boolean),a=[e.label,e.summary,...n.flatMap(s=>[s==null?void 0:s.label,s==null?void 0:s.value])].map(i).filter(s=>s.length>1);return[...new Set(a.flat())]}function L(){const{language:e,chooseLanguage:n,toggleDrawn:t}=l("About"),a=u(r=>r.manifest),s=g(()=>b(a),[a]),o=m(s,e);return o&&n?{languages:s,chosen:o,onChange:n,drawn:t??false}:null}function h(e,n){return e!=null&&e.drawn?n.every(t=>!!t&&t!=="none"&&e.languages.some(a=>y(a,t))):false}export{h as c,L as u};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
var Bt=Object.defineProperty;var Ot=(n,t,e)=>t in n?Bt(n,t,{enumerable:true,configurable:true,writable:true,value:e}):n[t]=e;var h=(n,t,e)=>Ot(n,typeof t!="symbol"?t+"":t,e);import{c as Ct,r as et}from"./contexts-ByL3eA_T.mjs";import{c as A,s as I,t as S,a as Dt,u as D,i as zt,b as Et,d as kt,e as Ut,r as Wt,f as C,g as Ft}from"./CanvasView-CiP25Iqc.mjs";import{a as z,w as Nt,v as q,f as Ht,s as it,b as st,c as Zt}from"./Camera-BlbXBgYZ.mjs";import{i as nt,a as Gt,T as Xt,b as ot,c as rt,D as Kt,s as qt}from"./pointer-BYZjBehK.mjs";import{a3 as Vt,a4 as Yt,a5 as $t}from"./shared-D2pvbPvF.mjs";import{a as Qt,i as at,f as jt}from"./imageService-CCKieCxo.mjs";function Jt(n){return typeof HTMLImageElement<"u"&&n instanceof HTMLImageElement?n.complete&&n.naturalWidth>0:true}function te(n,t){if(!n.bleed)return{x:0,y:0};const e=n.transform,i=Math.hypot(e.a,e.b)*t,s=Math.hypot(e.c,e.d)*t;return{x:n.bleed.right&&i>0?1/i:0,y:n.bleed.bottom&&s>0?1/s:0}}const ee=`#version 300 es
|
|
2
|
+
in vec2 a_position;
|
|
3
|
+
uniform mat3 u_matrix;
|
|
4
|
+
uniform vec4 u_crop;
|
|
5
|
+
out vec2 v_uv;
|
|
6
|
+
|
|
7
|
+
void main() {
|
|
8
|
+
vec3 clip = u_matrix * vec3(a_position, 1.0);
|
|
9
|
+
gl_Position = vec4(clip.xy, 0.0, 1.0);
|
|
10
|
+
v_uv = u_crop.xy + a_position * u_crop.zw;
|
|
11
|
+
}
|
|
12
|
+
`,ie=-.5,se=`#version 300 es
|
|
13
|
+
precision highp float;
|
|
14
|
+
in vec2 v_uv;
|
|
15
|
+
uniform sampler2D u_texture;
|
|
16
|
+
uniform float u_opacity;
|
|
17
|
+
out vec4 outColor;
|
|
18
|
+
|
|
19
|
+
void main() {
|
|
20
|
+
outColor = texture(u_texture, v_uv, ${ie.toFixed(1)}) * u_opacity;
|
|
21
|
+
}
|
|
22
|
+
`;class U{constructor(t,e,i){h(this,"kind","webgl2");h(this,"canvas");h(this,"maxTextureSize");h(this,"gl");h(this,"program",null);h(this,"vao",null);h(this,"uniforms",{matrix:null,crop:null,opacity:null,texture:null});h(this,"textures",new Map);h(this,"cssWidth",1);h(this,"cssHeight",1);h(this,"pixelRatio",1);h(this,"matrixScratch",new Float32Array(9));h(this,"isLost",false);h(this,"callbacks");h(this,"handleLost",()=>{var t2,e2;this.isLost=true,this.textures.clear(),(e2=(t2=this.callbacks).onLost)==null||e2.call(t2)});this.canvas=t,this.gl=e,this.callbacks=i,this.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE)||4096;const s=ne(e,ee,se);this.program=s,this.uniforms={matrix:e.getUniformLocation(s,"u_matrix"),crop:e.getUniformLocation(s,"u_crop"),opacity:e.getUniformLocation(s,"u_opacity"),texture:e.getUniformLocation(s,"u_texture")};const o=e.createVertexArray();e.bindVertexArray(o);const r=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,r),e.bufferData(e.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,1,1]),e.STATIC_DRAW);const a=e.getAttribLocation(s,"a_position");e.enableVertexAttribArray(a),e.vertexAttribPointer(a,2,e.FLOAT,false,0,0),e.bindVertexArray(null),this.vao=o,e.enable(e.BLEND),e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,true),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,false),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,e.BROWSER_DEFAULT_WEBGL),t.addEventListener("webglcontextlost",this.handleLost)}static create(t,e={}){let i=null;try{i=t.getContext("webgl2",{alpha:true,premultipliedAlpha:true,antialias:false,depth:false,stencil:false,preserveDrawingBuffer:false})}catch{i=null}if(!i||typeof i.createShader!="function")return null;try{return new U(t,i,e)}catch{return null}}resize(t,e,i){this.cssWidth=Math.max(1,t),this.cssHeight=Math.max(1,e),this.pixelRatio=i;const s=Math.max(1,Math.round(t*i)),o=Math.max(1,Math.round(e*i));this.canvas.width!==s&&(this.canvas.width=s),this.canvas.height!==o&&(this.canvas.height=o)}begin(){if(this.isLost)return;const t=this.gl;t.viewport(0,0,this.canvas.width,this.canvas.height),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.useProgram(this.program),t.bindVertexArray(this.vao),t.activeTexture(t.TEXTURE0),t.uniform1i(this.uniforms.texture,0)}draw(t){if(this.isLost||!Jt(t.source))return"skipped";const e=this.gl,i=this.upload(t);if(i==="tainted")return"tainted";if(!i)return"skipped";const s=t.crop??{x:0,y:0,width:t.width,height:t.height},o=te(t,this.pixelRatio),r=A(t.transform,S(s.x,s.y),I(s.width+o.x,s.height+o.y));return e.uniformMatrix3fv(this.uniforms.matrix,false,Dt(r,this.cssWidth,this.cssHeight,this.matrixScratch)),e.uniform4f(this.uniforms.crop,s.x/t.width,s.y/t.height,s.width/t.width,s.height/t.height),e.uniform1f(this.uniforms.opacity,t.opacity),e.bindTexture(e.TEXTURE_2D,i.texture),e.drawArrays(e.TRIANGLE_STRIP,0,4),"drawn"}end(){this.isLost||this.gl.bindVertexArray(null)}has(t){return!this.isLost&&this.textures.has(t)}release(t){const e=this.textures.get(t);e&&(this.isLost||this.gl.deleteTexture(e.texture),this.textures.delete(t))}dispose(){var t;if(this.canvas.removeEventListener("webglcontextlost",this.handleLost),!this.isLost){for(const e of[...this.textures.keys()])this.release(e);this.program&&this.gl.deleteProgram(this.program),this.vao&&this.gl.deleteVertexArray(this.vao)}this.textures.clear(),(t=this.gl.getExtension("WEBGL_lose_context"))==null||t.loseContext(),this.isLost=true}upload(t){const e=this.gl,i=this.textures.get(t.key);if(i&&i.width===t.width&&i.height===t.height)return i;const s=(i==null?void 0:i.texture)??e.createTexture();if(!s)return null;e.bindTexture(e.TEXTURE_2D,s);try{e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t.source)}catch(r){if(i||e.deleteTexture(s),oe(r))return"tainted";throw r}e.generateMipmap(e.TEXTURE_2D),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR_MIPMAP_LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);const o={texture:s,width:t.width,height:t.height};return this.textures.set(t.key,o),o}}function ne(n,t,e){const i=ht(n,n.VERTEX_SHADER,t),s=ht(n,n.FRAGMENT_SHADER,e),o=n.createProgram();if(!o)throw new Error("Could not create WebGL program");if(n.attachShader(o,i),n.attachShader(o,s),n.linkProgram(o),n.deleteShader(i),n.deleteShader(s),!n.getProgramParameter(o,n.LINK_STATUS)){const r=n.getProgramInfoLog(o);throw n.deleteProgram(o),new Error(`Could not link WebGL program: ${r}`)}return o}function ht(n,t,e){const i=n.createShader(t);if(!i)throw new Error("Could not create WebGL shader");if(n.shaderSource(i,e),n.compileShader(i),!n.getShaderParameter(i,n.COMPILE_STATUS)){const s=n.getShaderInfoLog(i);throw n.deleteShader(i),new Error(`Could not compile WebGL shader: ${s}`)}return i}function oe(n){return typeof n=="object"&&n!==null&&n.name==="SecurityError"}const re=.09,ae=1e-4,ct=.05,he=1e-4;class ce{constructor(t,e=re,i){h(this,"current");h(this,"target",null);h(this,"timeConstant");h(this,"spring");h(this,"start");h(this,"elapsed",0);this.current={...t},this.start={...t},this.timeConstant=e,this.spring=i}get destination(){return this.target?{...this.target.state}:{...this.current}}set(t){this.current={...t},this.target=null}animateTo(t,e,i=false){const s=this.spring?this.spring.duration<=0:this.timeConstant===0;if(i||s){this.set(t.state);return}let o=t.anchor;if(o){const r=z(o.world,o.screen,t.state.zoom,t.state.rotation,e);Math.hypot(r.x-t.state.x,r.y-t.state.y)*t.state.zoom>ct&&(o=void 0)}this.start={...this.current},this.elapsed=0,this.target={state:{...t.state},anchor:o}}stop(){this.target=null}step(t,e){const i=this.target;if(!i)return false;const s=i.state;let o,r;if(this.spring){this.elapsed+=Math.max(t,0);const g=this.elapsed/this.spring.duration;if(g>=1)return this.current={...s},this.target=null,false;const p=this.spring.stiffness;o=this.start,r=(1-Math.exp(-p*g))/(1-Math.exp(-p))}else o=this.current,r=1-Math.exp(-Math.max(t,0)/this.timeConstant);const a=Math.exp(Math.log(o.zoom)+(Math.log(s.zoom)-Math.log(o.zoom))*r),u=o.rotation+(s.rotation-o.rotation)*r,c=i.anchor?z(i.anchor.world,i.anchor.screen,a,u,e):{x:o.x+(s.x-o.x)*r,y:o.y+(s.y-o.y)*r};return this.current={x:c.x,y:c.y,zoom:a,rotation:u},this.spring?true:Math.abs(Math.log(s.zoom/a))<ae&&Math.abs(s.rotation-u)<he&&Math.hypot(s.x-c.x,s.y-c.y)*a<ct?(this.current={...s},this.target=null,false):true}}const V={clickToZoom:true,dblClickToZoom:true,pinchToZoom:true,scrollToZoom:false,navigable:true,flickEnabled:true,flickMinSpeed:200,flickMomentum:.25},N=2,lt=1.5,dt=.1,le=100,de=.002,ue=.01;class fe{constructor(t,e,i=V){h(this,"pointers",new Map);h(this,"samples",[]);h(this,"down",null);h(this,"pinch",null);h(this,"lastTap",null);h(this,"lastPointerType","");h(this,"penHovers",false);h(this,"onPointerDown",t2=>{var i2,s;if(this.lastPointerType=t2.pointerType,t2.pointerType==="mouse"&&t2.button!==0||nt(t2.target,this.element))return;(s=(i2=this.element).setPointerCapture)==null||s.call(i2,t2.pointerId);const e2=this.local(t2);this.pointers.set(t2.pointerId,e2),this.pointers.size===1?(this.down={x:e2.x,y:e2.y,t:t2.timeStamp,moved:false},this.samples=[{x:e2.x,y:e2.y,t:t2.timeStamp}],this.target.setInteracting(true)):this.pointers.size===2&&(this.pinch=this.pinchState(),this.down&&(this.down.moved=true))});h(this,"onPointerMove",t2=>{var s;Gt(t2)&&(this.penHovers=true);const e2=this.pointers.get(t2.pointerId);if(!e2)return;const i2=this.local(t2);if(this.pointers.set(t2.pointerId,i2),this.pointers.size===1){const o=i2.x-e2.x,r=i2.y-e2.y;this.down&&Math.hypot(i2.x-this.down.x,i2.y-this.down.y)>Xt&&(this.down.moved=true),(s=this.down)!=null&&s.moved&&this.options.navigable&&this.target.panBy(o,r,!this.tracksPointer(t2.pointerType)),this.samples.push({x:i2.x,y:i2.y,t:t2.timeStamp});const a=t2.timeStamp-le;for(;this.samples.length>2&&this.samples[0].t<a;)this.samples.shift()}else if(this.pointers.size===2&&this.pinch&&this.options.navigable){const o=this.pinchState();this.options.pinchToZoom&&this.pinch.distance>0&&this.target.zoomBy(o.distance/this.pinch.distance,o.mid,false),this.target.panBy(o.mid.x-this.pinch.mid.x,o.mid.y-this.pinch.mid.y,false),this.pinch=o}});h(this,"onPointerUp",t2=>{var u,c,m,g,p,l;if(!this.pointers.has(t2.pointerId))return;if(this.pointers.delete(t2.pointerId),(c=(u=this.element).releasePointerCapture)==null||c.call(u,t2.pointerId),this.pointers.size===1){this.pinch=null;const[d]=this.pointers.values();this.samples=[{...d,t:t2.timeStamp}];return}if(this.pointers.size>0)return;const e2=this.down;if(this.down=null,this.pinch=null,this.target.setInteracting(false),!e2)return;const i2=this.local(t2);if(!e2.moved&&t2.type==="pointerup"&&t2.timeStamp-e2.t<ot){if((g=(m=this.target).dismiss)!=null&&g.call(m)){this.lastTap=null;return}if(rt(t2.pointerType,this.penHovers)){const d=this.lastTap;this.options.navigable&&(this.options.clickToZoom||this.options.dblClickToZoom)&&d&&t2.timeStamp-d.t<ot&&Math.hypot(i2.x-d.x,i2.y-d.y)<Kt?(this.lastTap=null,this.zoomIn(i2)):this.lastTap={x:i2.x,y:i2.y,t:t2.timeStamp};return}this.options.clickToZoom&&this.options.navigable?t2.shiftKey?this.target.zoomBy(1/N,i2,true):this.zoomIn(i2):(l=(p=this.target).tap)==null||l.call(p,i2);return}if(!this.options.navigable||!this.tracksPointer(t2.pointerType))return;const o=this.samples[0],r=this.samples[this.samples.length-1],a=((r==null?void 0:r.t)??0)-((o==null?void 0:o.t)??0);if(o&&r&&a>0&&t2.timeStamp-r.t<50){const d=(r.x-o.x)/a*1e3,w=(r.y-o.y)/a*1e3,f=this.options.flickMomentum;f>0&&Math.hypot(d,w)>this.options.flickMinSpeed&&this.target.panBy(d*f,w*f,true)}});h(this,"onDoubleClick",t2=>{this.options.navigable&&(this.options.clickToZoom||!this.options.dblClickToZoom||rt(this.lastPointerType,this.penHovers)||nt(t2.target,this.element)||(t2.shiftKey?this.target.zoomBy(1/N,this.local(t2),true):this.zoomIn(this.local(t2))))});h(this,"onWheel",t2=>{const e2=t2.ctrlKey;if(!this.options.navigable||!e2&&!this.options.scrollToZoom||!e2&&qt(t2.target,this.element,t2.deltaY))return;t2.preventDefault();const i2=me(t2),s=e2?ue:de;this.target.zoomBy(Math.exp(-i2*s),this.local(t2),!e2)});h(this,"onKeyDown",t2=>{if(t2.target!==this.element||!this.options.navigable||t2.altKey||t2.metaKey||t2.ctrlKey)return;const e2=this.element.getBoundingClientRect(),i2=e2.width*dt*(t2.shiftKey?3:1),s=e2.height*dt*(t2.shiftKey?3:1);switch(t2.key){case"ArrowLeft":this.target.panBy(i2,0,true);break;case"ArrowRight":this.target.panBy(-i2,0,true);break;case"ArrowUp":this.target.panBy(0,s,true);break;case"ArrowDown":this.target.panBy(0,-s,true);break;case"+":case"=":this.target.zoomBy(lt,void 0,true);break;case"-":case"_":this.target.zoomBy(1/lt,void 0,true);break;case"0":this.target.home();break;case"r":this.target.rotateBy(90);break;case"R":this.target.rotateBy(-90);break;default:return}t2.preventDefault()});this.element=t,this.target=e,this.options=i,t.addEventListener("pointerdown",this.onPointerDown),t.addEventListener("pointermove",this.onPointerMove),t.addEventListener("pointerup",this.onPointerUp),t.addEventListener("pointercancel",this.onPointerUp),t.addEventListener("dblclick",this.onDoubleClick),t.addEventListener("wheel",this.onWheel,{passive:false}),t.addEventListener("keydown",this.onKeyDown)}setOptions(t){this.options=t}dispose(){const t=this.element;t.removeEventListener("pointerdown",this.onPointerDown),t.removeEventListener("pointermove",this.onPointerMove),t.removeEventListener("pointerup",this.onPointerUp),t.removeEventListener("pointercancel",this.onPointerUp),t.removeEventListener("dblclick",this.onDoubleClick),t.removeEventListener("wheel",this.onWheel),t.removeEventListener("keydown",this.onKeyDown)}local(t){const e=this.element.getBoundingClientRect();return{x:t.clientX-e.left,y:t.clientY-e.top}}zoomIn(t){var e,i;(i=(e=this.target).atMaxZoom)!=null&&i.call(e)?this.target.home():this.target.zoomBy(N,t,true)}tracksPointer(t){return t==="touch"||this.options.flickEnabled}pinchState(){const[t,e]=[...this.pointers.values()];return{distance:Math.hypot(e.x-t.x,e.y-t.y),mid:{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}}}function me(n){return n.deltaMode===1?n.deltaY*16:n.deltaMode===2?n.deltaY*400:n.deltaY}class Lt extends Error{constructor(t,e,i){super(t),this.url=e,this.status=i,this.name="ImageLoadError"}}const ut=new Set;async function pe(n,t={}){const{signal:e,maxTextureSize:i,request:s}=t,o=Vt(s),r=we(n);if(typeof createImageBitmap!="function"||typeof fetch!="function")return H(n,{signal:e,cors:true,withCredentials:o});if(r&&ut.has(r))return H(n,{signal:e,cors:false,withCredentials:o});let a;try{a=await Yt(s,n,{mode:"cors",signal:e})}catch(p){if(ye(p,e))throw p;const l=await H(n,{signal:e,cors:false,withCredentials:o});return r&&ut.add(r),l}if(!a.ok)throw $t(a),new Lt(`Image request failed with ${a.status}`,n,a.status);const u=await a.blob();let c=await ge(u);const m=c.width,g=c.height;if(i&&(c.width>i||c.height>i)){const p=i/Math.max(c.width,c.height),l=await createImageBitmap(c,{resizeWidth:Math.max(1,Math.floor(c.width*p)),resizeHeight:Math.max(1,Math.floor(c.height*p)),resizeQuality:"high"});c.close(),c=l}if(e!=null&&e.aborted)throw c.close(),Y();return{kind:"bitmap",source:c,width:c.width,height:c.height,naturalWidth:m,naturalHeight:g,opaque:false}}async function ge(n){const t={imageOrientation:"from-image",premultiplyAlpha:"premultiply",colorSpaceConversion:"default"};try{return await createImageBitmap(n,t)}catch(e){if(e instanceof TypeError)return createImageBitmap(n);throw e}}function H(n,{signal:t,cors:e,withCredentials:i}){return new Promise((s,o)=>{if(t!=null&&t.aborted){o(Y());return}const r=new Image;r.decoding="async",e&&(r.crossOrigin=i?"use-credentials":"anonymous");const a=()=>{r.onload=null,r.onerror=null,t==null||t.removeEventListener("abort",u)},u=()=>{a(),r.src="",o(Y())};t==null||t.addEventListener("abort",u),r.onload=()=>{a();const c=()=>s({kind:"element",source:r,width:r.naturalWidth,height:r.naturalHeight,naturalWidth:r.naturalWidth,naturalHeight:r.naturalHeight,opaque:!e});typeof r.decode=="function"?r.decode().then(c,c):c()},r.onerror=()=>{a(),o(new Lt("Image failed to load",n))},r.src=n})}function we(n){var t;try{return new URL(n,(t=globalThis.location)==null?void 0:t.href).origin}catch{return null}}function ye(n,t){return!!(t!=null&&t.aborted)||typeof n=="object"&&n!==null&&n.name==="AbortError"}function Y(){const n=new Error("Aborted");return n.name="AbortError",n}function ft(n){n.kind==="bitmap"&&n.source.close()}const xe=192*1024*1024,ve=16,be=2;class Te{constructor(t){h(this,"entries",new Map);h(this,"inFlight",0);h(this,"frame",0);h(this,"bytes",0);h(this,"wanted",[]);h(this,"disposed",false);h(this,"budget");h(this,"maxInFlight");this.options=t,this.budget=t.byteBudget??xe,this.maxInFlight=t.maxInFlight??ve}get(t){const e=this.entries.get(t);if((e==null?void 0:e.state)==="ready")return e.lastUsed=this.frame,e.image}has(t){var e;return((e=this.entries.get(t))==null?void 0:e.state)==="ready"}failed(t){var e;return((e=this.entries.get(t))==null?void 0:e.state)==="failed"}get byteSize(){return this.bytes}get pending(){return this.inFlight}seed(t,e){var s;const i=this.entries.get(t);(i==null?void 0:i.state)!=="ready"&&((s=i==null?void 0:i.controller)==null||s.abort(),this.entries.set(t,{url:t,state:"ready",image:e,bytes:Z(e),lastUsed:this.frame,attempts:0,pinned:false,waiters:(i==null?void 0:i.waiters)??[]}),this.bytes+=Z(e),this.flushWaiters(t))}prefetch(t){return Promise.all(t.map(e=>new Promise(i=>{const s=this.entries.get(e.url);if(s&&s.state!=="loading")return i();if(s){s.waiters.push(i);return}this.start({...e,priority:-1},i)}))).then(()=>{})}update(t){if(this.disposed)return;this.frame++;const e=new Set(t.map(i=>i.url));this.wanted=[...t].sort((i,s)=>i.priority-s.priority);for(const i of this.entries.values())i.state==="loading"&&!i.pinned&&!e.has(i.url)&&i.controller&&(i.controller.abort(),this.entries.delete(i.url),this.inFlight--);for(const i of this.wanted){const s=this.entries.get(i.url);s&&(s.lastUsed=this.frame)}this.pump(),this.evict(e)}dispose(){var t;this.disposed=true;for(const e of this.entries.values())(t=e.controller)==null||t.abort(),this.flushWaiters(e.url);this.entries.clear(),this.bytes=0}forEachReady(t){for(const e of this.entries.values())e.state==="ready"&&e.image&&t(e.url,e.image)}pump(){for(const t of this.wanted){if(this.inFlight>=this.maxInFlight)break;this.entries.has(t.url)||this.start(t)}}start(t,e){const i=new AbortController,s={url:t.url,state:"loading",bytes:0,lastUsed:this.frame,attempts:0,controller:i,pinned:!!e,waiters:e?[e]:[]};this.entries.set(t.url,s),this.inFlight++,this.attempt(s,t,i,t.url)}attempt(t,e,i,s){t.attempts++,this.options.load(s,i.signal).then(o=>{if(this.disposed||this.entries.get(t.url)!==t){ft(o);return}t.state="ready",t.image=o,t.bytes=Z(o),t.controller=void 0,t.pinned=false,this.bytes+=t.bytes,this.settle(t)},o=>{if(!(i.signal.aborted||this.disposed)&&this.entries.get(t.url)===t){if(t.attempts<be&&!Me(o,e)){this.attempt(t,e,i,e.fallbackUrl??e.url);return}t.state="failed",t.controller=void 0,t.pinned=false,this.settle(t)}})}settle(t){this.inFlight--,this.flushWaiters(t.url),this.options.onSettled(),this.pump()}flushWaiters(t){const e=this.entries.get(t);if(!e)return;const i=e.waiters;e.waiters=[],i.forEach(s=>s())}evict(t){if(this.bytes<=this.budget)return;const e=[...this.entries.values()].filter(i=>i.state==="ready"&&!t.has(i.url)).sort((i,s)=>i.lastUsed-s.lastUsed);for(const i of e){if(this.bytes<=this.budget)break;this.entries.delete(i.url),this.bytes-=i.bytes,i.image&&ft(i.image),this.options.onEvict(i.url)}}}function Z(n){return n.width*n.height*4}function Me(n,t){if(t.fallbackUrl)return false;const e=n==null?void 0:n.status;return typeof e=="number"&&e>=400&&e<500&&e!==408&&e!==429}const Ee=.1;class ke{constructor(t,e=s=>requestAnimationFrame(s),i=s=>cancelAnimationFrame(s)){h(this,"handle",0);h(this,"last",0);h(this,"disposed",false);h(this,"frame",t2=>{if(this.handle=0,this.disposed)return;const e2=this.last?Math.min((t2-this.last)/1e3,Ee):1/60;this.last=t2,this.tick(e2,t2)?this.invalidate():this.last=0});this.tick=t,this.raf=e,this.caf=i}invalidate(){this.disposed||this.handle||(this.handle=this.raf(this.frame))}drawNow(){this.disposed||(this.handle&&this.caf(this.handle),this.frame(performance.now()))}dispose(){this.disposed=true,this.handle&&this.caf(this.handle),this.handle=0}}const Le=2*1024*1024;function _e(n,t,e=Le){const i=new Set;let s=e,o=false;return{get deferred(){return o},getTile(r){const a=n(r);if(!a||a.kind==="media"||a.opaque||i.has(r)||t(r))return a;const u=a.width*a.height*4;if(i.size>0&&u>s){o=true;return}return s-=u,i.add(r),a}}}function Pe(n){const t=/^(!)?(\d+(?:\.\d+)?)$/.exec((n==null?void 0:n.trim())??"");if(!t)return null;const e=Number(t[2]);if(e>360)return null;const i=e%360,s=!!t[1];return i||s?{degrees:i,mirror:s}:null}function Ae(n,t,e){if(!n)return null;let i=n.trim().replace(/^xywh=/,""),s=false;i.startsWith("pct:")?(s=true,i=i.slice(4)):i.startsWith("pixel:")&&(i=i.slice(6));const o=i.split(",").map(Number);if(o.length!==4||o.some(d=>!Number.isFinite(d)))return null;let[r,a,u,c]=o;s&&(r=r/100*t,a=a/100*e,u=u/100*t,c=c/100*e);const m=Math.max(0,r),g=Math.max(0,a),p=Math.min(t,r+u),l=Math.min(e,a+c);return p<=m||l<=g?null:{x:m,y:g,width:p-m,height:l-g}}const G=512,Ie=1024,Se=16e6;function _t(n,t,e){return{width:t,height:e,levels:[{scaleFactor:1,width:t,height:e,tileWidth:t,tileHeight:e,cols:1,rows:1}],tile:s=>({...s,url:n,region:{x:0,y:0,width:t,height:e}})}}function Re(n,t=Ie){const{width:e,height:i}=n,s=[],o=n.regionByPx&&n.sizeByW,r=(l,d,w)=>{const f=Math.ceil(e/l),x=Math.ceil(i/l);return{scaleFactor:l,width:f,height:x,tileWidth:d,tileHeight:w,cols:Math.ceil(f/d),rows:Math.ceil(x/w)}},a=(l,d)=>({scaleFactor:e/l,width:l,height:d,tileWidth:l,tileHeight:d,cols:1,rows:1,whole:true}),u=n.tiles[0];if(u){const{width:l,height:d}=o?Be(n,u,t):u;for(const w of u.scaleFactors)s.push(r(w,l,d))}else if(o){let l=Math.max(G,t);for(;l>G&&!$(n,l,l);)l/=2;for(let d=1;;d*=2){const w=r(d,l,l);if(s.push(w),w.cols===1&&w.rows===1)break}}const c=Math.max(0,...s.map(l=>l.scaleFactor));for(const l of n.sizes){const d=e/l.width;$(n,l.width,l.height)&&d>c+1e-9&&s.push(a(l.width,l.height))}const m=s.reduce((l,d)=>!l||d.scaleFactor>l.scaleFactor?d:l,null);if(m&&m.cols*m.rows>1&&n.sizeByW){const l=Math.max(e,i)/G;s.push(a(Math.ceil(e/l),Math.ceil(i/l)))}(!s.length||!u&&!o&&e*i<=Se)&&(s.some(l=>l.scaleFactor===1)||s.push(a(e,i)));const g=Oe(s).sort((l,d)=>d.scaleFactor-l.scaleFactor),p=Qt(n);return{width:e,height:i,levels:g,tile(l){const d=g[l.level],w=d.scaleFactor,f=d.cols===1&&d.rows===1;let x,v,b;if(f)x={x:0,y:0,width:e,height:i},v=d.width,b=d.height;else{const M=Math.round(l.col*d.tileWidth*w),E=Math.round(l.row*d.tileHeight*w);x={x:M,y:E,width:Math.min(Math.round(d.tileWidth*w),e-M),height:Math.min(Math.round(d.tileHeight*w),i-E)},v=Math.ceil(x.width/w),b=Math.ceil(x.height/w)}return{...l,region:x,url:at(n,x,v,b),fallbackUrl:p?at(n,x,v,b,p):void 0}}}}function Be(n,t,e){let i=Math.max(1,Math.floor(e/Math.max(t.width,t.height)));for(;i>1&&!$(n,t.width*i,t.height*i);)i--;return{width:t.width*i,height:t.height*i}}function $(n,t,e){return!(n.maxWidth&&t>n.maxWidth||n.maxHeight&&e>n.maxHeight||n.maxArea&&t*e>n.maxArea)}function Oe(n){const t=new Map;for(const e of n){const i=`${e.width}x${e.height}`,s=t.get(i);(!s||s.cols*s.rows<e.cols*e.rows)&&t.set(i,e)}return[...t.values()]}function Ce(n,t){const e=n.levels;for(let i=0;i<e.length;i++)if(e[i].scaleFactor<=t*(1+1e-6))return i;return e.length-1}function P(n,t,e){const i=n.levels[t],s=i.tileWidth*i.scaleFactor,o=i.tileHeight*i.scaleFactor,r=Math.max(0,e.x),a=Math.max(0,e.y),u=Math.min(n.width,e.x+e.width),c=Math.min(n.height,e.y+e.height);if(u<=r||c<=a)return[];const m=Math.max(0,Math.floor(r/s)),g=Math.min(i.cols-1,Math.floor((u-1e-9)/s)),p=Math.max(0,Math.floor(a/o)),l=Math.min(i.rows-1,Math.floor((c-1e-9)/o)),d=[];for(let w=p;w<=l;w++)for(let f=m;f<=g;f++)d.push({level:t,col:f,row:w});return d}async function mt(n,t){if(n.media)return ze(n,n.media);let e=null,i=null;if(n.service)try{e=Re(await jt(n.service,t.infoOptions))}catch(p){i=p}if(!e){if(!n.url)throw i??new Error("Image has no source");const p=await t.loadStatic(n.url);t.cache.seed(n.url,p),e=_t(n.url,p.naturalWidth,p.naturalHeight)}const s=n.width&&n.height&&n.width>0&&n.height>0?{width:n.width,height:n.height}:{width:e.width,height:e.height},o=Ae(n.region,s.width,s.height)??{x:0,y:0,width:s.width,height:s.height},r=e.width/s.width,a=e.height/s.height,u={x:o.x*r,y:o.y*a,width:o.width*r,height:o.height*a},c=Pe(n.rotation),m=c?Ue(u,c):void 0;return{id:n.id,spec:n,pyramid:e,size:s,clip:u,contentClip:o,rect:{x:0,y:0,width:o.width,height:o.height},...m?{turn:m}:{}}}function De(n,t){if(n.media)return Promise.resolve();const{pyramid:e,clip:i}=n;return t.prefetch(P(e,0,i).map(s=>{const o=e.tile(s);return{url:o.url,fallbackUrl:o.fallbackUrl}}))}const Pt="media:";function ze(n,t){var a,u;const e=n.width||((a=n.placement)==null?void 0:a.width)||t.element.videoWidth||1600,i=n.height||((u=n.placement)==null?void 0:u.height)||t.element.videoHeight||900,s=`${Pt}${n.id}`,o={width:e,height:i},r={x:0,y:0,width:e,height:i};return{id:n.id,spec:n,pyramid:_t(s,e,i),media:{kind:"media",source:t.element,width:e,height:i,naturalWidth:e,naturalHeight:i},size:o,clip:r,contentClip:r,rect:{...r}}}function Ue(n,{degrees:t,mirror:e}){const i=t*Math.PI/180,s=m=>Math.abs(m)<1e-12?0:m,o=s(Math.cos(i)),r=s(Math.sin(i)),a=Math.abs(n.width*o)+Math.abs(n.height*r),u=Math.abs(n.width*r)+Math.abs(n.height*o),c=A(S(a/2,u/2),{a:o,b:r,c:-r,d:o,e:0,f:0},I(e?-1:1,1),S(-(n.x+n.width/2),-(n.y+n.height/2)));return{orient:c,unorient:zt(c),width:a,height:u}}function At(n){var t;return((t=n.turn)==null?void 0:t.orient)??S(-n.clip.x,-n.clip.y)}function We(n,t){const{turn:e,clip:i}=n;if(!e)return{...t,x:i.x+t.x,y:i.y+t.y};const s=kt(e.unorient,t),o=Math.max(s.x,i.x),r=Math.max(s.y,i.y);return{x:o,y:r,width:Math.max(0,Math.min(s.x+s.width,i.x+i.width)-o),height:Math.max(0,Math.min(s.y+s.height,i.y+i.height)-r)}}function Fe(n,t){const{turn:e,clip:i}=n;return e?Et(e.unorient,t):{x:i.x+t.x,y:i.y+t.y}}function pt(n){const{turn:t,clip:e,contentClip:i}=n;return t?{width:t.width*i.width/e.width,height:t.height*i.height/e.height}:i}function gt(n){if(!n.length)return null;if(n.every(i=>i.spec.placement)){for(const i of n)i.rect={...i.spec.placement};return D(n.map(i=>i.rect))}const t=pt(n[0]).height;let e=0;for(const i of n){const s=pt(i),o=s.width*t/s.height;i.rect={x:e,y:0,width:o,height:t},e+=o}return{x:0,y:0,width:e,height:t}}function W(n){const t=n.turn??n.clip;return{x:n.rect.width/t.width,y:n.rect.height/t.height}}function Ne(n){const t=W(n);return A(S(n.rect.x,n.rect.y),I(t.x,t.y),At(n))}function He(n,t){var e,i;return n.service===t.service&&n.url===t.url&&n.width===t.width&&n.height===t.height&&n.region===t.region&&n.rotation===t.rotation&&((e=n.media)==null?void 0:e.element)===((i=t.media)==null?void 0:i.element)&&JSON.stringify(n.placement)===JSON.stringify(t.placement)}const Ze=5e6,It=1e7,Ge=15e6,Xe=2e7,wt=2;function yt(n){const{items:t,camera:e,viewport:i,pixelRatio:s,getTile:o,destination:r}=n,a=n.has??(l=>o(l)!==void 0),u=Nt(e,i),c=[],m=[],g=[],p=(l,d,w)=>{const f=l.tile(d);m.push({url:f.url,fallbackUrl:f.fallbackUrl,priority:w})};for(const l of t){const{pyramid:d,clip:w,rect:f}=l,x=W(l);if(n.wantOverview)for(const y of P(d,0,w))p(d,y,Xe);const v=xt(l,e,i,s),b=r?xt(l,r,i,s):v;if(g.push((v==null?void 0:v.target)??-1),!v&&!b)continue;const M=y=>T=>{const _=d.tile(T).region;return Math.hypot(_.x+_.width/2-y.x,_.y+_.height/2-y.y)};if(b){const y=M(b.center);for(const T of P(d,0,b.area))p(d,T,y(T)/1e3);if(b.target>0)for(const T of P(d,b.target,b.area))p(d,T,It+y(T))}if(!v)continue;const{area:E,target:k}=v,L=M(v.center),O=P(d,0,E),F=k===0?[]:P(d,k,E);if(b!==v){for(const T of O)p(d,T,L(T)/1e3);const y=k-wt;if(y>0)for(const T of P(d,y,E))p(d,T,Ge+L(T))}const j=k-wt;if(b===v&&j>0){const y=new Set;for(const T of F){const _=d.tile(T);if(!a(_.url))for(const R of P(d,j,_.region)){const B=`${R.col},${R.row}`;y.has(B)||(y.add(B),p(d,R,Ze+L(R)))}}}if(l.spec.hidden)continue;const St=(k===0?O:F).every(y=>o(d.tile(y).url)!==void 0)?[k]:Array.from({length:k+1},(y,T)=>T),Rt=A(u,S(f.x,f.y),I(x.x,x.y),At(l));for(const y of St){const T=y===0?O:y===k?F:P(d,y,E),_=d.levels[y].cols*d.levels[y].rows>1;for(const R of T){const B=d.tile(R),J=o(B.url);if(!J)continue;const tt=Ke(l,B.region,J,Rt,_);tt&&c.push({...tt,url:B.url})}}}return m.sort((l,d)=>l.priority-d.priority),{draws:c,wants:qe(m),levels:g}}function xt(n,t,e,i){const{pyramid:s,rect:o}=n,r=q(t,e);if(!Ut(r,o))return null;const a=W(n),u=Math.max(r.x,o.x),c=Math.max(r.y,o.y),m=Math.min(r.x+r.width,o.x+o.width),g=Math.min(r.y+r.height,o.y+o.height),p=1/(a.x*t.zoom*i);return{area:We(n,{x:(u-o.x)/a.x,y:(c-o.y)/a.y,width:(m-u)/a.x,height:(g-c)/a.y}),center:Fe(n,{x:(t.x-o.x)/a.x,y:(t.y-o.y)/a.y}),target:Ce(s,p)}}function Ke(n,t,e,i,s){const{clip:o}=n,r=Math.max(t.x,o.x),a=Math.max(t.y,o.y),u=Math.min(t.x+t.width,o.x+o.width),c=Math.min(t.y+t.height,o.y+o.height);if(u<=r||c<=a)return null;const m=e.width/t.width,g=e.height/t.height,p=1e-6;return{item:n,image:e,transform:A(i,S(t.x,t.y),I(1/m,1/g)),crop:{x:(r-t.x)*m,y:(a-t.y)*g,width:(u-r)*m,height:(c-a)*g},bleed:{right:s&&u<o.x+o.width-p,bottom:s&&c<o.y+o.height-p}}}function qe(n){const t=new Set;return n.filter(e=>t.has(e.url)?false:(t.add(e.url),true))}const Ve={maxZoomPixelRatio:1.1,minZoomImageRatio:.9,upscale:true,animationTime:.09,animationDuration:void 0,springStiffness:6.5,constrainDuringPan:true,request:void 0,byteBudget:192*1024*1024,maxInFlight:16,releaseAfterMs:2e3},Ye=2,$e=3,Qe=.1,X=1e-6,vt=1e8,je=6,Q={top:0,right:0,bottom:0,left:0};function bt(n,t="padding"){if(!n||typeof getComputedStyle!="function")return Q;const e=getComputedStyle(n),i=s=>parseFloat(e.getPropertyValue(`${t}-${s}`))||0;return{top:i("top"),right:i("right"),bottom:i("bottom"),left:i("left")}}const Je=(n,t)=>n.top===t.top&&n.right===t.right&&n.bottom===t.bottom&&n.left===t.left;let ti;class ei{constructor(t,e={}){h(this,"host");h(this,"overlays",null);h(this,"options");h(this,"backend",null);h(this,"backendPreference");h(this,"contextLosses",0);h(this,"holder",{hiddenSince:null,release:()=>this.giveBack()});h(this,"visible",true);h(this,"dom",null);h(this,"domAsked",false);h(this,"pending",null);h(this,"camera");h(this,"loop");h(this,"gestures");h(this,"gestureOptions",{});h(this,"cache");h(this,"navigator",null);h(this,"navigatorAsked",0);h(this,"viewport",{width:1,height:1});h(this,"inset",Q);h(this,"pixelRatio",1);h(this,"items",[]);h(this,"worldBounds",null);h(this,"contentVersion",0);h(this,"opaqueUrls",new Set);h(this,"mediaByKey",new Map);h(this,"detachMedia",[]);h(this,"opened",false);h(this,"atHome",true);h(this,"interacting",false);h(this,"lastEmitted",null);h(this,"generation",0);h(this,"landing",[]);h(this,"ahead",null);h(this,"listeners",new Map);h(this,"unloadable",false);h(this,"resizeObserver",null);h(this,"intersectionObserver",null);h(this,"releaseTimer",null);h(this,"dprQuery",null);h(this,"disposed",false);h(this,"dismisser",null);h(this,"tick",t2=>{var u,c;if(this.disposed)return false;const e2=this.camera.step(t2,this.viewport),i2=this.camera.current,s2=this.backend,o=_e(this.getTile,m=>s2?s2.has(m):true),r=yt({items:this.items,camera:i2,viewport:this.viewport,pixelRatio:this.pixelRatio,getTile:o.getTile,has:this.hasTile,wantOverview:!!this.navigator,destination:e2?this.camera.destination:void 0}),a=(this.landing.length?[...this.landing,...r.wants]:r.wants).filter(m=>!m.url.startsWith(Pt));if(this.cache.update(a),this.ahead&&!e2&&!this.cache.pending){const m=this.ahead;this.ahead=null,this.readAhead(m)}return r.draws.length?this.setUnloadable(false):a.length&&a.every(m=>this.cache.failed(m.url))&&this.setUnloadable(true),this.paint(r.draws),(u=this.overlays)==null||u.position(i2,this.viewport),(c=this.navigator)==null||c.render(this.items.filter(m=>!m.spec.hidden),this.worldBounds,q(i2,this.viewport),this.pixelRatio,this.getTile,this.contentVersion),(!this.lastEmitted||!st(this.lastEmitted,i2))&&(this.lastEmitted={...i2},this.opened&&this.emit("viewport")),e2||o.deferred});h(this,"getTile",t2=>this.mediaByKey.get(t2)??this.cache.get(t2));h(this,"hasTile",t2=>this.mediaByKey.has(t2)||this.cache.has(t2));h(this,"onContextLost",()=>{this.contextLosses+=1,this.releaseBackend(),this.visible?this.acquireBackend(false):this.host.dataset.backend="released"});h(this,"onPixelRatioChange",()=>{this.measure(),this.watchPixelRatio()});this.host=t,this.backendPreference=e.backend??"auto",this.options={...Ve,...K(e)},Mt()&&(this.options.animationTime=0,this.options.animationDuration!==void 0&&(this.options.animationDuration=0));const{animationDuration:i,springStiffness:s}=this.options;this.camera=new ce({x:0,y:0,zoom:1,rotation:0},this.options.animationTime,i===void 0?void 0:{duration:i,stiffness:s}),this.loop=new ke(this.tick),this.gestureOptions=K(e.gestures??{}),Mt()&&(this.gestureOptions.flickMomentum=0),this.gestures=new fe(t,this,{...V,...this.gestureOptions}),this.cache=new Te({load:(o,r)=>this.loadTile(o,r),onSettled:()=>{this.contentVersion++,this.invalidate()},onEvict:o=>{var r;return(r=this.backend)==null?void 0:r.release(o)},byteBudget:this.options.byteBudget,maxInFlight:this.options.maxInFlight}),this.visible=ii(t),this.visible?this.acquireBackend():this.holder.hiddenSince=Tt(),this.measure(),this.observe()}get backendKind(){var t;return((t=this.backend)==null?void 0:t.kind)??"none"}get isOpen(){return this.opened}get isAtHome(){return this.atHome}on(t,e){let i=this.listeners.get(t);return i||(i=new Set,this.listeners.set(t,i)),i.add(e),()=>i==null?void 0:i.delete(e)}async setImages(t,{world:e,fit:i=false}={}){const s=++this.generation,o=()=>s!==this.generation||this.disposed,r=new Map(this.items.map(f=>[f.id,f]));this.landing=[],this.ahead=null;const a=this.prepareContext(),u=[],c=t.map(f=>{const x=r.get(f.id);if(x&&He(x.spec,f))return x.spec=f,{item:Promise.resolve(x),ready:Promise.resolve()};let v,b,M;const E=new Promise((L,O)=>{v=L,b=O}),k=new Promise(L=>M=L);return u.push(()=>mt(f,a).then(L=>(v(L),De(L,this.cache)),b).then(M,M)),{item:E,ready:k}}),m=()=>{var f;return(f=u.shift())==null?void 0:f().then(m)};for(let f=0;f<je;f++)m();const g=t.flatMap(f=>f.placement?[f.placement]:[]);let p=false;if(!this.items.length&&t.length>1&&g.length===t.length){const f=D(e?[e,...g]:g),x=[];c.forEach(({item:v,ready:b},M)=>{Promise.all([v,b]).then(([E])=>{o()||(x[M]=E,this.place(x.filter(Boolean),f,i,!p,false),p=true)},()=>{})})}const l=await Promise.allSettled(c.map(({item:f})=>f));if(o()||(this.landing=this.landingWants(l.flatMap(f=>f.status==="fulfilled"?[f.value]:[]),e,i||!this.opened),this.invalidate(),await Promise.all(c.map(({ready:f})=>f)),o()))return;this.landing=[];const d=l.filter(f=>f.status==="fulfilled").map(f=>f.value),w=l.filter(f=>f.status==="rejected").map(f=>f.reason);w.length&&this.emit("error",w),this.setUnloadable(t.length>0&&!d.length&&w.length>0),this.place(d,e,i,!p,true)}place(t,e,i,s,o){this.items=t,this.watchMedia(t);const r=gt(t);this.worldBounds=e?r?D([e,r]):e:r,this.contentVersion++,this.worldBounds&&(this.opened?s?(i?this.home(true):this.camera.set(this.constrain(this.camera.current)),this.emit("change")):o&&this.emit("change"):(this.opened=true,this.home(true),this.emit("open"))),this.invalidate()}prefetch(t,{world:e}={}){const i=t.filter(s=>!s.media);this.ahead=i.length?{images:i,world:e}:null,this.ahead&&this.invalidate()}async readAhead({images:t,world:e}){const i=this.generation,s=this.prepareContext(),o=(await Promise.allSettled(t.map(a=>mt(a,s)))).flatMap(a=>a.status==="fulfilled"?[a.value]:[]);if(!o.length||i!==this.generation||this.disposed)return;const r=this.landingWants(o,e,true).filter(a=>a.priority<It-vt);await this.cache.prefetch(r)}prepareContext(){return{cache:this.cache,loadStatic:t=>this.loadTile(t),infoOptions:{request:this.options.request}}}clear(){this.setUnloadable(false),this.generation++,this.landing=[],this.ahead=null,this.items=[],this.watchMedia([]),this.worldBounds=null,this.contentVersion++,this.invalidate()}setHidden(t){const e=new Set(t);let i=false;for(const s of this.items){const o=e.has(s.id);!!s.spec.hidden!==o&&(s.spec={...s.spec,hidden:o},i=true)}i&&this.invalidate()}isReady(t){const e=this.items.find(s=>s.id===t);if(!e)return false;if(e.spec.media)return true;const i=e.pyramid.levels[0];if(!i)return false;for(let s=0;s<i.rows;s++)for(let o=0;o<i.cols;o++)if(!this.getTile(e.pyramid.tile({level:0,col:o,row:s}).url))return false;return true}fitBounds(t,e=false,i=Q){const s=this.fit(t,this.camera.destination.rotation,i);this.atHome=false,this.animateTo(this.constrain(s,{allowBeyondLimits:true}),e)}fit(t,e,{top:i,right:s,bottom:o,left:r},a=1/0){const{width:u,height:c}=this.viewport,m=Ht(t,{width:Math.max(1,u-r-s),height:Math.max(1,c-i-o)},e),g=Math.min(m.zoom,a);return{...z(Wt(t),{x:(u+r-s)/2,y:(c+i-o)/2},g,e,this.viewport),zoom:g,rotation:e}}fitItemRect(t,e,i=false){const s=this.itemRectToWorld(t,e);s&&this.fitAnnotation(s,i)}fitAnnotation(t,e=false){var o;const i=this.items[0];if(!i)return;const s=i.rect.width*Qe;this.fitBounds({x:t.x-s,y:t.y-s,width:t.width+s*2,height:t.height+s*2},e,bt((o=this.overlays)==null?void 0:o.container,"scroll-padding"))}getBounds(){return q(this.camera.current,this.viewport)}getHomeBounds(){return this.worldBounds?{...this.worldBounds}:null}getCamera(){return{...this.camera.current}}getZoomLimits(){var e;const t=((e=this.homeCamera())==null?void 0:e.zoom)??1;return{home:t,min:t*this.options.minZoomImageRatio,max:Math.max(t,this.closestZoom())}}closestZoom(t=this.items){const e=t.length?Math.min(...t.map(i=>W(i).x)):1;return this.options.maxZoomPixelRatio/e}home(t=false){const e=this.homeCamera();if(!e)return;const i=this.atHome;this.atHome=true,this.animateTo(e,t),!i&&this.opened&&this.emit("viewport")}atMaxZoom(){return this.camera.destination.zoom>=this.getZoomLimits().max*(1-X)}viewLimits(){const{zoom:t,x:e,y:i,rotation:s}=this.camera.destination,{min:o,max:r}=this.getZoomLimits(),a=this.atHome?this.homeCamera():null;return{atMax:t>=r*(1-X),atMin:t<=o*(1+X),atHome:this.atHome&&(!a||Math.abs(t/a.zoom-1)<.001&&Math.hypot(e-a.x,i-a.y)*t<.5&&Math.abs(s-a.rotation)<.001)}}zoomBy(t,e,i=true){const s=i?this.camera.destination:this.camera.current,o=e??{x:this.viewport.width/2,y:this.viewport.height/2},r=it(s,this.viewport,o),{min:a,max:u}=this.getZoomLimits(),c=C(s.zoom*t,a,u),m=z(r,o,c,s.rotation,this.viewport),g=this.constrain({...s,...m,zoom:c});this.atHome=false,i?this.camera.animateTo({state:g,anchor:{world:r,screen:o}},this.viewport):this.camera.set(g),this.invalidate()}panBy(t,e,i=false){const s=i?this.camera.destination:this.camera.current,o=Et(A(I(1/s.zoom),Ft(-s.rotation)),{x:t,y:e}),r=this.constrain({...s,x:s.x-o.x,y:s.y-o.y});this.atHome=false,i?this.camera.animateTo({state:r},this.viewport):this.camera.set(r),this.invalidate()}panTo(t,e=false){const i=e?this.camera.current:this.camera.destination;this.atHome=false,this.animateTo(this.constrain({...i,...t}),e)}rotateBy(t){const e=this.camera.destination;this.setRotation(e.rotation*180/Math.PI+t)}setRotation(t,e=false){const i=this.camera.destination,s=t*Math.PI/180;this.animateTo(this.constrain({...i,rotation:s}),e)}getRotation(){return this.camera.destination.rotation*180/Math.PI}tap(t){this.emit("tap",t)}setDismiss(t){this.dismisser=t}dismiss(){var t;return((t=this.dismisser)==null?void 0:t.call(this))??false}setGestures(t){this.gestures.setOptions({...V,...this.gestureOptions,...K(t)})}setInteracting(t){if(this.interacting=t,t){this.camera.stop();return}if(this.options.constrainDuringPan)return;const e=this.camera.destination,i=this.constrain(e);st(e,i)||this.animateTo(i,false)}worldToScreenPoint(t){return Zt(this.camera.current,this.viewport,t)}screenToWorldPoint(t){return it(this.camera.current,this.viewport,t)}itemRectToWorld(t,e){const i=this.items[t];if(!i)return null;const{contentClip:s,clip:o}=i;if(i.turn)return kt(A(Ne(i),I(o.width/s.width,o.height/s.height)),e);const r=i.rect.width/s.width,a=i.rect.height/s.height;return{x:i.rect.x+(e.x-s.x)*r,y:i.rect.y+(e.y-s.y)*a,width:e.width*r,height:e.height*a}}attachNavigator(t){var o;(o=this.navigator)==null||o.dispose(),this.navigator=null;const e=++this.navigatorAsked;let i=null,s=false;return import("./Navigator-t1y35uj8.mjs").then(r=>{s||this.disposed||e!==this.navigatorAsked||(i=new r.Navigator(t,(a,u)=>this.panTo(a,u)),this.navigator=i,this.invalidate())}),()=>{s=true,i==null||i.dispose(),i&&this.navigator===i&&(this.navigator=null)}}invalidate(){this.loop.invalidate()}dispose(){var t,e,i,s,o,r,a;this.disposed||(this.disposed=true,this.generation++,this.loop.dispose(),this.gestures.dispose(),(t=this.resizeObserver)==null||t.disconnect(),(e=this.intersectionObserver)==null||e.disconnect(),(s=(i=this.dprQuery)==null?void 0:i.removeEventListener)==null||s.call(i,"change",this.onPixelRatioChange),this.releaseTimer&&clearTimeout(this.releaseTimer),(o=this.navigator)==null||o.dispose(),this.navigator=null,this.releaseBackend(),this.cache.dispose(),(r=this.dom)==null||r.dispose(),(a=this.overlays)==null||a.dispose(),this.items=[],this.detachMedia.forEach(u=>u()),this.mediaByKey.clear(),this.listeners.clear(),delete this.host.dataset.backend)}landingWants(t,e,i){const s=t.map(c=>({...c,rect:{...c.rect}})),o=gt(s),r=e?o?D([e,o]):e:o;if(!r)return[];const a=i?this.homeCamera(r,s):this.camera.destination;if(!a)return[];const{wants:u}=yt({items:s,camera:a,viewport:this.viewport,pixelRatio:this.pixelRatio,getTile:c=>this.cache.get(c)});return u.map(c=>({...c,priority:c.priority-vt}))}watchMedia(t){this.detachMedia.forEach(e=>e()),this.detachMedia=[],this.mediaByKey.clear();for(const e of t){if(!e.media||e.media.kind!=="media")continue;const i=e.pyramid.tile({level:0,col:0,row:0}).url;this.mediaByKey.set(i,e.media);const s=e.media.source,o=()=>this.invalidate(),r=["play","seeked","loadeddata","resize"];r.forEach(a=>s.addEventListener(a,o)),this.detachMedia.push(()=>r.forEach(a=>s.removeEventListener(a,o)))}}paint(t){const e=this.backend,i=[],s=(e==null?void 0:e.kind)==="webgl2";e==null||e.begin();for(const o of t){const{image:r}=o;if(!(r.kind==="media"||r.kind==="element"&&s&&(r.opaque||this.opaqueUrls.has(o.url)))&&e){if(e.draw({key:o.url,source:r.source,width:r.width,height:r.height,transform:o.transform,crop:o.crop,opacity:1,bleed:o.bleed})!=="tainted"||r.kind==="bitmap")continue;this.opaqueUrls.add(o.url)}(r.kind==="element"||r.kind==="media")&&i.push({key:`${o.item.id}|${o.url}`,element:r.source,width:r.width,height:r.height,transform:o.transform,crop:o.crop,opacity:1})}e==null||e.end(),this.dom?this.dom.sync(i):i.length&&!this.domAsked&&(this.domAsked=true,import("./DomLayers-DwhkzPRS.mjs").then(({DomLayers:o})=>{if(this.disposed)return;const r=new o(this.host);this.overlays&&this.host.insertBefore(r.container,this.overlays.container),this.dom=r,this.invalidate()}))}loadTile(t,e){return pe(t,{signal:e,request:this.options.request,maxTextureSize:this.backend instanceof U?this.backend.maxTextureSize:void 0})}animateTo(t,e){this.camera.animateTo({state:t},this.viewport,e),this.invalidate()}homeCamera(t=this.worldBounds,e=this.items){if(!t)return null;const i=2*Math.PI,s=Math.round(this.camera.destination.rotation/i)*i||0;return this.fit(t,s,this.inset,this.options.upscale?1/0:this.closestZoom(e))}constrain(t,{allowBeyondLimits:e=false}={}){const i=this.worldBounds;if(!i)return t;const{min:s,max:o}=this.getZoomLimits(),r=e?C(t.zoom,s,Math.max(o,t.zoom)):C(t.zoom,s,o);return this.interacting&&!this.options.constrainDuringPan?{...t,zoom:r}:{...t,zoom:r,x:C(t.x,i.x,i.x+i.width),y:C(t.y,i.y,i.y+i.height)}}acquireBackend(t=true){var o,r;if(this.backend||this.pending||this.disposed)return;const e=document.createElement("canvas");e.className="clover-canvas-surface",e.setAttribute("aria-hidden","true"),Object.assign(e.style,{position:"absolute",inset:"0",width:"100%",height:"100%",display:"block",pointerEvents:"none"}),this.host.insertBefore(e,((o=this.dom)==null?void 0:o.container)??((r=this.overlays)==null?void 0:r.container)??null);const i=t&&(this.backendPreference==="webgl2"||this.backendPreference==="auto"&&this.contextLosses<$e);let s=null;i&&(Ct(this.holder)||this.backendPreference==="webgl2")&&(s=U.create(e,{onLost:this.onContextLost}),s||et(this.holder)),s?this.install(s):this.backendPreference==="webgl2"?this.none(e):(this.pending=e,(ti??(ti=import("./Canvas2DBackend-DXCfms6g.mjs"))).then(({Canvas2DBackend:a})=>{if(this.pending!==e)return;this.pending=null;const u=a.create(e);u?this.install(u):this.none(e)}))}none(t){t.remove(),this.host.dataset.backend="none"}install(t){this.backend=t,this.host.dataset.backend=t.kind,t.resize(this.viewport.width,this.viewport.height,this.pixelRatio),t.kind==="canvas2d"&&this.opaqueUrls.clear(),this.emit("backend",t.kind),this.invalidate()}releaseBackend(){var e;if(et(this.holder),(e=this.pending)==null||e.remove(),this.pending=null,!this.backend)return;const t=this.backend.canvas;this.backend.dispose(),t.remove(),this.backend=null}giveBack(){this.releaseTimer&&clearTimeout(this.releaseTimer),this.releaseTimer=null,this.releaseBackend(),this.host.dataset.backend="released"}observe(){typeof ResizeObserver<"u"&&(this.resizeObserver=new ResizeObserver(()=>this.measure(true)),this.resizeObserver.observe(this.host)),typeof IntersectionObserver<"u"&&(this.intersectionObserver=new IntersectionObserver(t=>{const e=t.some(i=>i.isIntersecting);this.setVisible(e)}),this.intersectionObserver.observe(this.host)),this.watchPixelRatio()}setVisible(t){var e;if(this.visible=t,t){this.holder.hiddenSince=null,this.releaseTimer&&clearTimeout(this.releaseTimer),this.releaseTimer=null,this.backend||this.acquireBackend();return}(e=this.holder).hiddenSince??(e.hiddenSince=Tt()),!(!this.backend||this.releaseTimer)&&(this.releaseTimer=setTimeout(()=>this.giveBack(),this.options.releaseAfterMs))}measure(t=false){var u;const e=this.host.getBoundingClientRect(),i=Math.max(1,e.width),s=Math.max(1,e.height),o=bt(this.host),r=Math.min(typeof window<"u"&&window.devicePixelRatio||1,Ye);if(i===this.viewport.width&&s===this.viewport.height&&r===this.pixelRatio&&Je(o,this.inset))return;const a=this.viewport;if(this.viewport={width:i,height:s},this.inset=o,this.pixelRatio=r,(u=this.backend)==null||u.resize(i,s,r),this.opened){if(this.atHome)this.home(true);else{const c=this.camera.current,m=i/Math.max(a.width,1);this.camera.set(this.constrain({...c,zoom:c.zoom*m}))}this.emit("viewport")}t?this.loop.drawNow():this.invalidate()}watchPixelRatio(){var t,e,i,s;typeof window>"u"||typeof window.matchMedia!="function"||((e=(t=this.dprQuery)==null?void 0:t.removeEventListener)==null||e.call(t,"change",this.onPixelRatioChange),this.dprQuery=window.matchMedia(`(resolution: ${window.devicePixelRatio||1}dppx)`),(s=(i=this.dprQuery).addEventListener)==null||s.call(i,"change",this.onPixelRatioChange))}setUnloadable(t){t!==this.unloadable&&(this.unloadable=t,this.emit("unloadable",t))}emit(t,e){var i;(i=this.listeners.get(t))==null||i.forEach(s=>s(e))}}const Tt=()=>typeof performance<"u"?performance.now():Date.now();function ii(n){if(typeof IntersectionObserver>"u"||typeof window>"u")return true;const{top:t,left:e,width:i,height:s}=n.getBoundingClientRect();return t+s>=0&&e+i>=0&&t<=window.innerHeight&&e<=window.innerWidth}function Mt(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function K(n){return Object.fromEntries(Object.entries(n).filter(([,t])=>t!==void 0))}const ui=(n,t)=>new ei(n,t);export{te as b,Jt as h,yt as p,ui as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as c,A as l,x as u,
|
|
1
|
+
import{u as c,A as l,x as u,aJ as p,_ as d,k as m}from"./shared-D2pvbPvF.mjs";import"./styles-Bf3qmdsh.mjs";const f=new WeakMap;function v(t){let n=f.get(t);if(!n){const{render:o}=t;n={canvasId:t.canvasId,format:t.format,match:t.match,component:r=>c(y,{...r,render:o})},f.set(t,n)}return n}function b(t){if(Array.isArray(t))return t.filter(n=>typeof n=="object"&&n!==null&&typeof n.render=="function").map(v)}function y({render:t,canvases:n,bodies:o,children:r}){const a=l(null),i=u(p);return d(()=>{const e=a.current;if(!e)return;const s=t(e,{canvases:n,bodies:o,clover:i});return()=>{typeof s=="function"&&s(),e.replaceChildren()}},[t,n,o,i]),c(m,{children:[c("div",{ref:a,className:"clover-body-renderer",style:{position:"absolute",inset:0}}),r&&c("div",{className:"clover-canvas-controls",children:r})]})}export{b as toRenderers};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{x as n,a2 as o,Q as r}from"./shared-
|
|
1
|
+
import{x as n,a2 as o,Q as r}from"./shared-D2pvbPvF.mjs";const t=(s,a)=>a==="canvas"?o(s.manifest,s.canvasId):s.manifest,e=r(null),i=()=>n(e);export{e as P,t as r,i as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a4 as a,a5 as c}from"./shared-D2pvbPvF.mjs";function l(t){try{const o=new URL(t).pathname.split("/").filter(Boolean).pop();return o?decodeURIComponent(o):"download"}catch{return"download"}}async function d(t,o){try{const r=await a(o,t,{referrerPolicy:"no-referrer"});if(!r.ok)return c(r),false;const n=URL.createObjectURL(await r.blob()),e=document.createElement("a");return e.href=n,e.download=l(t),document.body.append(e),e.click(),e.remove(),setTimeout(()=>URL.revokeObjectURL(n),1e4),true}catch{return false}}export{l as fileName,d as saveFile};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{aE as w,U as f,ae as x,W as S}from"./shared-D2pvbPvF.mjs";const A=10;async function R(r,t,s,o,e){var n,d;const i=(n=r.get().manifest)==null?void 0:n.id;try{const{hits:c,set:u}=await b(t,s,{request:o,signal:e});if(e.aborted||((d=r.get().manifest)==null?void 0:d.id)!==i)return;r.set({search:{query:s,status:"ready",hits:c,set:u}})}catch{if(e.aborted)return;r.set({search:{query:s,status:"error",hits:[],set:null}})}}async function b(r,t,{request:s,signal:o}={}){const e=new URL(r.id);e.searchParams.set("q",t);const i=[];let n=e.toString();const d=new Set;for(;n&&i.length<A&&!d.has(n);){d.add(n);const c=await w(s,n,o);i.push(c),n=T(c)}return $(i,t)}function E(r){var e;const t=f(r)[0];if(typeof t=="string"||!t)return t;const s=t.full??t["@id"],o=(e=f(t.selector)[0])==null?void 0:e.value;return typeof o=="string"&&typeof s=="string"?`${s}#${o}`:s}function T(r){var o;const t=r.next??((o=r.within)==null?void 0:o.next),s=typeof t=="string"?t:(t==null?void 0:t.id)??(t==null?void 0:t["@id"]);return typeof s=="string"?s:null}function $(r,t){var e,i;const s=[],o=[];for(const n of r){const d=Array.isArray(n.resources),c=d?n.resources:f(n.items),u=new Map;for(const a of c){const p=a.id??a["@id"],m=d?E(a.on):f(a.target)[0],v=x(m);if(!p||!v.id)continue;const y=d?(e=a.resource)==null?void 0:e.chars:f(a.body).map(l=>l==null?void 0:l.value).find(l=>typeof l=="string"),I={id:p,setId:S,canvasId:v.id,target:v,motivation:["highlighting"],bodies:[{value:String(y??t)}],annotation:{id:p,type:"Annotation",motivation:["highlighting"],body:{type:"TextualBody",value:String(y??t)},target:m}};u.set(p,I),s.push(I)}const g=d?H(n,u):M(n,u),h=new Set(g.flatMap(a=>a.entryIds));o.push(...g);for(const a of u.values())h.has(a.id)||o.push({id:a.id,canvasId:a.canvasId,entryIds:[a.id],match:((i=a.bodies[0])==null?void 0:i.value)??t})}return{query:t,hits:o,set:{id:S,label:{none:[t]},source:"search",entries:s}}}function H(r,t){var o;const s=[];for(const e of f(r.hits)){const i=f(e.annotations).filter(n=>t.has(n));i.length&&s.push({id:i.join(" "),canvasId:t.get(i[0]).canvasId,entryIds:i,before:e.before,match:String(e.match??((o=t.get(i[0]).bodies[0])==null?void 0:o.value)??""),after:e.after})}return s}function M(r,t){var o,e;const s=[];for(const i of f(r.annotations))for(const n of f(i==null?void 0:i.items))if(f(n==null?void 0:n.motivation).includes("contextualizing"))for(const c of f(n.target)){const u=typeof(c==null?void 0:c.source)=="string"?c.source:(o=c==null?void 0:c.source)==null?void 0:o.id,g=u?t.get(u):void 0;if(!g)continue;const h=f(c.selector).find(a=>(a==null?void 0:a.type)==="TextQuoteSelector");s.push({id:`${n.id??u}#${u}`,canvasId:g.canvasId,entryIds:[g.id],before:h==null?void 0:h.prefix,match:String((h==null?void 0:h.exact)??((e=g.bodies[0])==null?void 0:e.value)??""),after:h==null?void 0:h.suffix})}return s}export{$ as readResults,b as search,R as searchInto};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var lr=Object.defineProperty;var ur=(e,t,n)=>t in e?lr(e,t,{enumerable:true,configurable:true,writable:true,value:n}):e[t]=n;var se=(e,t,n)=>ur(e,typeof t!="symbol"?t+"":t,n);import{a as Oe}from"./index-DhlRi3H9.mjs";const fr=JSON.parse('{"commonClose":"Close","commonNext":"Next","commonPrevious":"Previous","commonSearch":"Search","commonViewAll":"View all","controlShortcut":"{{label}} ({{shortcut}})","contentSearchLoading":"Loading...","contentSearchPlaceholder":"Search","contentSearchResultsNone":"No results","contentSearchResult":"1 result","contentSearchResults":"{{count}} results","contentSearchError":"The search could not be completed.","contentSearchPosition":"Result {{index}} of {{total}}","contentSearchClear":"Clear search","canvasPosition":"Item {{index}} of {{total}}","canvasImage":"Image","bodyUnloadableImage":"This image could not be loaded.","bodyUnloadableVideo":"This video could not be loaded.","bodyUnloadableAudio":"This audio could not be loaded.","bodyUnloadableModel":"This model could not be loaded.","canvasRoleDescription":"zoomable image","canvasKeysImage":"Use the arrow keys to pan, with Shift for larger steps, plus and minus to zoom, 0 to reset the view, and R or Shift+R to rotate.","canvasKeysMedia":"Press Space or K to play or pause, J or L to skip ten seconds back or forward, and M to mute or unmute.","canvasKeysAnnotations":"Press Escape to clear the selected annotation.","sceneModel":"3D model","sceneRoleDescription":"rotatable 3D model","sceneKeys":"Use the arrow keys to rotate the model, with Shift for larger steps, plus and minus to zoom, 0 to reset the view, and R or Shift+R to rotate it right or left.","sceneRotateUp":"Rotate up","sceneRotateDown":"Rotate down","sceneRotate":"Rotate","sceneResetView":"Reset view","statusLoading":"Loading\u2026","statusError":"This could not be loaded.","itemsLabel":"Items","download":"Download","downloadPage":"This page","downloadAll":"All pages","templateSidebar":"Items","templateSidebarToggle":"Show items","templateBack":"Back","templateBackTo":"Back to {{label}}","collectionLabel":"Collection","itemsScrollBack":"Show previous items","itemsScrollForward":"Show more items","aboutRights":"Rights","aboutDate":"Date","aboutHomepage":"Homepage","aboutSeeAlso":"See also","aboutProvider":"Provider","logo":"Logo","aboutManifest":"IIIF Manifest","aboutCanvas":"IIIF Canvas","aboutPartOf":"Part of","aboutOpenManifest":"Open the full Manifest","aboutCollection":"IIIF Collection","readingLanguage":"Language","annotationsHide":"Hide annotations","annotationsHideTip":"Hide","readMore":"Read more","readLess":"Read less","annotationsShow":"Find on the image","annotationsShowTime":"Find in the recording","annotationsImage":"Image","annotationsLanguage":"Language","annotationsOpenLink":"Open","transcriptLabel":"Transcript","imageViewerOpen":"Open image viewer","imageViewerClose":"Close image viewer","canvasChoice":"Choice","canvasViewerControls":"Viewer controls","canvasExpandControls":"Expand viewer controls","canvasCollapseControls":"Collapse viewer controls","canvasScrollBack":"Show previous controls","canvasScrollForward":"Show more controls","imageFullScreen":"Full screen","imageExitFullScreen":"Exit full screen","imageResetZoom":"Reset zoom","imageRotateLeft":"Rotate left","imageRotateRight":"Rotate right","imageZoomIn":"Zoom in","imageZoomOut":"Zoom out","informationPanelTabs":"Information panel","sectionsScrollBack":"Show previous tabs","sectionsScrollForward":"Show more tabs","informationPanelClose":"Close information panel","informationPanelTabsAbout":"About","informationPanelTabsAnnotations":"Annotations","informationPanelTabsSearch":"Search","informationPanelTabsContents":"Contents","contentsSectionsIn":"Sections in","informationPanelTabsMap":"Map","informationPanelTabsCollection":"Collection","informationPanelTabsTargets":"Views","mapUnavailable":"The map could not be shown.","mapLabel":"Map","mapAttribution":"Map credits","mapPlaceUntitled":"Place {{number}}","mapOverlay":"Georeferenced image","mapPlacesListed":"Places listed after the map: {{count}}","informationPanelToggle":"More information","playerPlay":"Play","playerPause":"Pause","playerMute":"Mute","playerUnmute":"Unmute","playerVolume":"Volume","playerSeek":"Seek","playerCaptions":"Captions","playerCaptionsOff":"Off","playerChapters":"Chapters","playerFill":"Fill frame","playerFit":"Fit to frame","playerCurrentTime":"Current time","playerDuration":"Duration","splitHandle":"Resize panels"}'),Kn={es:()=>import("./es-Bx-zZBfZ.mjs"),fi:()=>import("./fi-DsP1FhBy.mjs"),fr:()=>import("./fr-BuL_F9Jq.mjs"),it:()=>import("./it-DH3EtrgI.mjs"),ja:()=>import("./ja-BEHbDotv.mjs"),nb:()=>import("./nb-Bdfn_mZs.mjs"),nn:()=>import("./nn-BCWbSuK0.mjs"),no:()=>import("./no-Bdfn_mZs.mjs"),pt:()=>import("./pt-Da5El49z.mjs"),"zh-Hans":()=>import("./zh-Hans-BhTHTZXT.mjs"),"zh-Hant":()=>import("./zh-Hant-_CJAOTzC.mjs")};function Mt(){return typeof navigator>"u"?[]:[...navigator.languages??[],navigator.language].filter(Boolean)}function Gn(){if(!(typeof document>"u"))return document.documentElement.lang||void 0}let Zn=()=>[];function dr(e){Zn=e}function _r(){const[e,...t]=Zn();return[...new Set([e,...Mt(),...t,Gn()].filter(n=>!!n))]}const Xe=e=>e.split("-")[0];function pr(e,t){return Xe(e).toLowerCase()===Xe(t).toLowerCase()}function vt(e){try{const{language:t,script:n}=new Intl.Locale(e).maximize();return n&&`${t}-${n}`}catch{return}}function vr(e,t){const n=vt(e);if(n)return t.find(o=>o!=="none"&&o!=="@none"&&vt(o)===n)}const it=e=>e.includes("-")?Xe(e):null;function hr(e,t,n=[]){if(!t.length)return;if(t.length===1)return t[0];const o=()=>t.includes("none")?"none":t.includes("@none")?"@none":t[0];if(!e)return t.includes("none")?"none":t[0];if(t.includes(e))return e;const r=it(e);if(r&&t.includes(r))return r;const s=vr(e,t);if(s)return s;const i=n.find(c=>t.includes(c));if(i)return i;const a=t.findIndex(c=>it(c)===e);if(a!==-1)return t[a];for(const c of n){const l=it(c);if(l&&t.includes(l))return l}return o()}function Yn(e,t){const[n,...o]=t?[t]:_r();return hr(n,e,o)??e[0]}function Bi(e,t,n){if(n&&e.includes(n))return n;if(!e.length)return;const o=Yn(e,t);return o==="none"?e[0]:o}const Y="clover",G={en:{[Y]:{...fr}}};let Me=[],J,Qe=[],Xn=[],Et=0;const ht=new Set;function Tt(){Et++,ht.forEach(e=>e())}function Qn(e){return[e,vt(e),Xe(e)].filter(t=>!!t)}const mr=e=>e==="en"||eo(e)||!!G[e],de=e=>Qn(e).find(mr),Qt=new Map,eo=e=>Object.prototype.hasOwnProperty.call(Kn,e);function gr(e){let t=Qt.get(e);return t||(t=Kn[e]().then(({default:n})=>{var o;G[e]={...G[e],[Y]:{...n,...(o=G[e])==null?void 0:o[Y]}},Tt()},()=>{}),Qt.set(e,t)),t}function mt(e){const t=e.find(n=>n==="en"||eo(n));return t&&t!=="en"?gr(t):Promise.resolve()}let qe=[],en="",Ne="en";function tt(){const e=Gn();return[...new Set([...Me,...e?[e]:[]])]}function fe(){const e=`${Et} ${typeof document<"u"?document.documentElement.lang:""} ${typeof navigator<"u"?navigator.languages:""}`;if(e===en)return qe;en=e;const t=tt();return Ne=Mt().map(de).find(Boolean)??t.map(de).find(Boolean)??"en",qe=[...new Set([J??Ne,...Xn,...t].filter(o=>!!o).flatMap(Qn).concat("en"))],mt(qe),qe}function yr(){return fe(),[...new Set([Ne,...tt().map(de),...Qe.map(de)].filter(e=>!!e))]}dr(()=>(fe(),[J,Ne,...tt()]));function to(e,t){if(e)return pr(e,t||L.resolvedLanguage)?void 0:e}const L={get language(){return J??fe().find(e=>G[e])??"en"},get chosenLanguage(){return J},stringsFor(e){return de(e)},interfaceLanguages(){return{languages:yr(),chosen:J&&de(J)||Ne}},chooseInterfaceLanguage(e){return J=e||void 0,Qe=J?[...new Set([...Qe,J])]:[],Tt(),mt(fe())},get resolvedLanguage(){return fe().find(e=>{var t;return Object.keys(((t=G[e])==null?void 0:t[Y])??{}).length>0})??"en"},changeLanguage(e){return L.chooseInterfaceLanguage(e)},resolve(e,t,n=Y){var r,s;let o={text:e};for(const i of fe()){const a=(s=(r=G[i])==null?void 0:r[n])==null?void 0:s[e];if(a!==void 0){o={text:a,lang:i};break}}return t?{...o,text:o.text.replace(/\{\{(\w+)\}\}/g,(i,a)=>a in t?String(t[a]):i)}:o},t(e,t,n=Y){return L.resolve(e,t,n).text},langOf(e,t,n=Y){return to(L.resolve(e,void 0,n).lang,t)},ready(){return mt(fe())},subscribe(e){return ht.add(e),()=>{ht.delete(e)}},getSnapshot(){return Et}};typeof document<"u"&&fe();function br(e={}){for(const[n,o]of Object.entries(e.resources??{}))for(const[r,s]of Object.entries(o??{}))G[n]??(G[n]={}),G[n][r]={...G[n][r],...s};e.fallbackLng!==void 0&&(Xn=e.fallbackLng===false?[]:[e.fallbackLng].flat());const t=Me.join();if(e.languages!==void 0?Me=[e.languages].flat().filter(Boolean):e.lng&&(Me=[e.lng]),Me.join()!==t){Qe=[];const n=[...Mt(),...tt()].map(de);J&&!n.includes(de(J))&&(J=void 0)}return Tt(),L}const Wi=Object.freeze(Object.defineProperty({__proto__:null,CLOVER_I18N_NAMESPACE:Y,cloverI18n:L,initCloverI18n:br,langWithin:to},Symbol.toStringTag,{value:"Module"}));var Ue,C,no,ve,tn,oo,ro,so,$t,gt,yt,io,Le={},ao=[],wr=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,He=Array.isArray;function ne(e,t){for(var n in t)e[n]=t[n];return e}function Nt(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function ae(e,t,n){var o,r,s,i={};for(s in t)s=="key"?o=t[s]:s=="ref"?r=t[s]:i[s]=t[s];if(arguments.length>2&&(i.children=arguments.length>3?Ue.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)i[s]===void 0&&(i[s]=e.defaultProps[s]);return Te(e,i,o,r,null)}function Te(e,t,n,o,r){var s={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:r??++no,__i:-1,__u:0};return r==null&&C.vnode!=null&&C.vnode(s),s}function Sr(){return{current:null}}function Q(e){return e.children}function X(e,t){this.props=e,this.context=t}function Ce(e,t){if(t==null)return e.__?Ce(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?Ce(e):null}function co(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return co(e)}}function bt(e){(!e.__d&&(e.__d=true)&&ve.push(e)&&!et.__r++||tn!=C.debounceRendering)&&((tn=C.debounceRendering)||oo)(et)}function et(){for(var e,t,n,o,r,s,i,a=1;ve.length;)ve.length>a&&ve.sort(ro),e=ve.shift(),a=ve.length,e.__d&&(n=void 0,o=void 0,r=(o=(t=e).__v).__e,s=[],i=[],t.__P&&((n=ne({},o)).__v=o.__v+1,C.vnode&&C.vnode(n),Lt(t.__P,n,o,t.__n,t.__P.namespaceURI,32&o.__u?[r]:null,s,r??Ce(o),!!(32&o.__u),i),n.__v=o.__v,n.__.__k[n.__i]=n,fo(s,n,i),o.__e=o.__=null,n.__e!=r&&co(n)));et.__r=0}function lo(e,t,n,o,r,s,i,a,c,l,d){var u,p,h,y,P,O,k,S=o&&o.__k||ao,b=t.length;for(c=Cr(n,t,S,c,b),u=0;u<b;u++)(h=n.__k[u])!=null&&(p=h.__i==-1?Le:S[h.__i]||Le,h.__i=u,O=Lt(e,h,p,r,s,i,a,c,l,d),y=h.__e,h.ref&&p.ref!=h.ref&&(p.ref&&Rt(p.ref,null,h),d.push(h.ref,h.__c||y,h)),P==null&&y!=null&&(P=y),(k=!!(4&h.__u))||p.__k===h.__k?c=uo(h,c,e,k):typeof h.type=="function"&&O!==void 0?c=O:y&&(c=y.nextSibling),h.__u&=-7);return n.__e=P,c}function Cr(e,t,n,o,r){var s,i,a,c,l,d=n.length,u=d,p=0;for(e.__k=new Array(r),s=0;s<r;s++)(i=t[s])!=null&&typeof i!="boolean"&&typeof i!="function"?(c=s+p,(i=e.__k[s]=typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?Te(null,i,null,null,null):He(i)?Te(Q,{children:i},null,null,null):i.constructor==null&&i.__b>0?Te(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=e,i.__b=e.__b+1,a=null,(l=i.__i=xr(i,n,c,u))!=-1&&(u--,(a=n[l])&&(a.__u|=2)),a==null||a.__v==null?(l==-1&&(r>d?p--:r<d&&p++),typeof i.type!="function"&&(i.__u|=4)):l!=c&&(l==c-1?p--:l==c+1?p++:(l>c?p--:p++,i.__u|=4))):e.__k[s]=null;if(u)for(s=0;s<d;s++)(a=n[s])!=null&&!(2&a.__u)&&(a.__e==o&&(o=Ce(a)),po(a,a));return o}function uo(e,t,n,o){var r,s;if(typeof e.type=="function"){for(r=e.__k,s=0;r&&s<r.length;s++)r[s]&&(r[s].__=e,t=uo(r[s],t,n,o));return t}e.__e!=t&&(o&&(t&&e.type&&!t.parentNode&&(t=Ce(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function ie(e,t){return t=t||[],e==null||typeof e=="boolean"||(He(e)?e.some(function(n){ie(n,t)}):t.push(e)),t}function xr(e,t,n,o){var r,s,i,a=e.key,c=e.type,l=t[n],d=l!=null&&(2&l.__u)==0;if(l===null&&e.key==null||d&&a==l.key&&c==l.type)return n;if(o>(d?1:0)){for(r=n-1,s=n+1;r>=0||s<t.length;)if((l=t[i=r>=0?r--:s++])!=null&&!(2&l.__u)&&a==l.key&&c==l.type)return i}return-1}function nn(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||wr.test(t)?n:n+"px"}function Je(e,t,n,o,r){var s,i;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof o=="string"&&(e.style.cssText=o=""),o)for(t in o)n&&t in n||nn(e.style,t,"");if(n)for(t in n)o&&n[t]==o[t]||nn(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")s=t!=(t=t.replace(so,"$1")),i=t.toLowerCase(),t=i in e||t=="onFocusOut"||t=="onFocusIn"?i.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=n,n?o?n.u=o.u:(n.u=$t,e.addEventListener(t,s?yt:gt,s)):e.removeEventListener(t,s?yt:gt,s);else{if(r=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===false&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function on(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=$t++;else if(t.t<n.u)return;return n(C.event?C.event(t):t)}}}function Lt(e,t,n,o,r,s,i,a,c,l){var d,u,p,h,y,P,O,k,S,b,A,E,j,W,V,ee,te,B=t.type;if(t.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),s=[a=t.__e=n.__e]),(d=C.__b)&&d(t);e:if(typeof B=="function")try{if(k=t.props,S="prototype"in B&&B.prototype.render,b=(d=B.contextType)&&o[d.__c],A=d?b?b.props.value:d.__:o,n.__c?O=(u=t.__c=n.__c).__=u.__E:(S?t.__c=u=new B(k,A):(t.__c=u=new X(k,A),u.constructor=B,u.render=Or),b&&b.sub(u),u.props=k,u.state||(u.state={}),u.context=A,u.__n=o,p=u.__d=true,u.__h=[],u._sb=[]),S&&u.__s==null&&(u.__s=u.state),S&&B.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=ne({},u.__s)),ne(u.__s,B.getDerivedStateFromProps(k,u.__s))),h=u.props,y=u.state,u.__v=t,p)S&&B.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),S&&u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(S&&B.getDerivedStateFromProps==null&&k!==h&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(k,A),!u.__e&&u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(k,u.__s,A)===false||t.__v==n.__v){for(t.__v!=n.__v&&(u.props=k,u.state=u.__s,u.__d=false),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(z){z&&(z.__=t)}),E=0;E<u._sb.length;E++)u.__h.push(u._sb[E]);u._sb=[],u.__h.length&&i.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(k,u.__s,A),S&&u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(h,y,P)})}if(u.context=A,u.props=k,u.__P=e,u.__e=false,j=C.__r,W=0,S){for(u.state=u.__s,u.__d=false,j&&j(t),d=u.render(u.props,u.state,u.context),V=0;V<u._sb.length;V++)u.__h.push(u._sb[V]);u._sb=[]}else do u.__d=false,j&&j(t),d=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++W<25);u.state=u.__s,u.getChildContext!=null&&(o=ne(ne({},o),u.getChildContext())),S&&!p&&u.getSnapshotBeforeUpdate!=null&&(P=u.getSnapshotBeforeUpdate(h,y)),ee=d,d!=null&&d.type===Q&&d.key==null&&(ee=_o(d.props.children)),a=lo(e,He(ee)?ee:[ee],t,n,o,r,s,i,a,c,l),u.base=t.__e,t.__u&=-161,u.__h.length&&i.push(u),O&&(u.__E=u.__=null)}catch(z){if(t.__v=null,c||s!=null)if(z.then){for(t.__u|=c?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;s[s.indexOf(a)]=null,t.__e=a}else{for(te=s.length;te--;)Nt(s[te]);wt(t)}else t.__e=n.__e,t.__k=n.__k,z.then||wt(t);C.__e(z,t,n)}else s==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=kr(n.__e,t,n,o,r,s,i,c,l);return(d=C.diffed)&&d(t),128&t.__u?void 0:a}function wt(e){e&&e.__c&&(e.__c.__e=true),e&&e.__k&&e.__k.forEach(wt)}function fo(e,t,n){for(var o=0;o<n.length;o++)Rt(n[o],n[++o],n[++o]);C.__c&&C.__c(t,e),e.some(function(r){try{e=r.__h,r.__h=[],e.some(function(s){s.call(r)})}catch(s){C.__e(s,r.__v)}})}function _o(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:He(e)?e.map(_o):ne({},e)}function kr(e,t,n,o,r,s,i,a,c){var l,d,u,p,h,y,P,O=n.props,k=t.props,S=t.type;if(S=="svg"?r="http://www.w3.org/2000/svg":S=="math"?r="http://www.w3.org/1998/Math/MathML":r||(r="http://www.w3.org/1999/xhtml"),s!=null){for(l=0;l<s.length;l++)if((h=s[l])&&"setAttribute"in h==!!S&&(S?h.localName==S:h.nodeType==3)){e=h,s[l]=null;break}}if(e==null){if(S==null)return document.createTextNode(k);e=document.createElementNS(r,S,k.is&&k),a&&(C.__m&&C.__m(t,s),a=false),s=null}if(S==null)O===k||a&&e.data==k||(e.data=k);else{if(s=s&&Ue.call(e.childNodes),O=n.props||Le,!a&&s!=null)for(O={},l=0;l<e.attributes.length;l++)O[(h=e.attributes[l]).name]=h.value;for(l in O)if(h=O[l],l!="children"){if(l=="dangerouslySetInnerHTML")u=h;else if(!(l in k)){if(l=="value"&&"defaultValue"in k||l=="checked"&&"defaultChecked"in k)continue;Je(e,l,null,h,r)}}for(l in k)h=k[l],l=="children"?p=h:l=="dangerouslySetInnerHTML"?d=h:l=="value"?y=h:l=="checked"?P=h:a&&typeof h!="function"||O[l]===h||Je(e,l,h,O[l],r);if(d)a||u&&(d.__html==u.__html||d.__html==e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(u&&(e.innerHTML=""),lo(t.type=="template"?e.content:e,He(p)?p:[p],t,n,o,S=="foreignObject"?"http://www.w3.org/1999/xhtml":r,s,i,s?s[0]:n.__k&&Ce(n,0),a,c),s!=null)for(l=s.length;l--;)Nt(s[l]);a||(l="value",S=="progress"&&y==null?e.removeAttribute("value"):y!=null&&(y!==e[l]||S=="progress"&&!y||S=="option"&&y!=O[l])&&Je(e,l,y,O[l],r),l="checked",P!=null&&P!=e[l]&&Je(e,l,P,O[l],r))}return e}function Rt(e,t,n){try{if(typeof e=="function"){var o=typeof e.__u=="function";o&&e.__u(),o&&t==null||(e.__u=e(t))}else e.current=t}catch(r){C.__e(r,n)}}function po(e,t,n){var o,r;if(C.unmount&&C.unmount(e),(o=e.ref)&&(o.current&&o.current!=e.__e||Rt(o,null,t)),(o=e.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(s){C.__e(s,t)}o.base=o.__P=null}if(o=e.__k)for(r=0;r<o.length;r++)o[r]&&po(o[r],t,n||typeof e.type!="function");n||Nt(e.__e),e.__c=e.__=e.__e=void 0}function Or(e,t,n){return this.constructor(e,n)}function Re(e,t,n){var o,r,s,i;t==document&&(t=document.documentElement),C.__&&C.__(e,t),r=(o=typeof n=="function")?null:n&&n.__k||t.__k,s=[],i=[],Lt(t,e=(!o&&n||t).__k=ae(Q,null,[e]),r||Le,Le,t.namespaceURI,!o&&n?[n]:r?null:t.firstChild?Ue.call(t.childNodes):null,s,!o&&n?n:r?r.__e:t.firstChild,o,i),fo(s,e,i)}function vo(e,t){Re(e,t,vo)}function Ir(e,t,n){var o,r,s,i,a=ne({},e.props);for(s in e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)s=="key"?o=t[s]:s=="ref"?r=t[s]:a[s]=t[s]===void 0&&i!=null?i[s]:t[s];return arguments.length>2&&(a.children=arguments.length>3?Ue.call(arguments,2):n),Te(e.type,a,o||e.key,r||e.ref,null)}function De(e){function t(n){var o,r;return this.getChildContext||(o=new Set,(r={})[t.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){o=null},this.shouldComponentUpdate=function(s){this.props.value!=s.value&&o.forEach(function(i){i.__e=true,bt(i)})},this.sub=function(s){o.add(s);var i=s.componentWillUnmount;s.componentWillUnmount=function(){o&&o.delete(s),i&&i.call(s)}}),n.children}return t.__c="__cC"+io++,t.__=e,t.Provider=t.__l=(t.Consumer=function(n,o){return n.children(o)}).contextType=t,t}Ue=ao.slice,C={__e:function(e,t,n,o){for(var r,s,i;t=t.__;)if((r=t.__c)&&!r.__)try{if((s=r.constructor)&&s.getDerivedStateFromError!=null&&(r.setState(s.getDerivedStateFromError(e)),i=r.__d),r.componentDidCatch!=null&&(r.componentDidCatch(e,o||{}),i=r.__d),i)return r.__E=r}catch(a){e=a}throw e}},no=0,X.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=ne({},this.state),typeof e=="function"&&(e=e(ne({},n),this.props)),e&&ne(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),bt(this))},X.prototype.forceUpdate=function(e){this.__v&&(this.__e=true,e&&this.__h.push(e),bt(this))},X.prototype.render=Q,ve=[],oo=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ro=function(e,t){return e.__v.__b-t.__v.__b},et.__r=0,so=/(PointerCapture)$|Capture$/i,$t=0,gt=on(false),yt=on(true),io=0;var Ar=0;function R(e,t,n,o,r,s){t||(t={});var i,a,c=t;if("ref"in c)for(a in c={},t)a=="ref"?i=t[a]:c[a]=t[a];var l={type:e,props:c,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Ar,__i:-1,__u:0,__source:r,__self:s};if(typeof e=="function"&&(i=e.defaultProps))for(a in i)c[a]===void 0&&(c[a]=i[a]);return C.vnode&&C.vnode(l),l}var _e,$,at,rn,xe=0,ho=[],N=C,sn=N.__b,an=N.__r,cn=N.diffed,ln=N.__c,un=N.unmount,fn=N.__;function Ie(e,t){N.__h&&N.__h($,e,xe||t),xe=0;var n=$.__H||($.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function K(e){return xe=1,Ft(yo,e)}function Ft(e,t,n){var o=Ie(_e++,2);if(o.t=e,!o.__c&&(o.__=[n?n(t):yo(void 0,t),function(a){var c=o.__N?o.__N[0]:o.__[0],l=o.t(c,a);c!==l&&(o.__N=[l,o.__[1]],o.__c.setState({}))}],o.__c=$,!$.__f)){var r=function(a,c,l){if(!o.__c.__H)return true;var d=o.__c.__H.__.filter(function(p){return!!p.__c});if(d.every(function(p){return!p.__N}))return!s||s.call(this,a,c,l);var u=o.__c.props!==a;return d.forEach(function(p){if(p.__N){var h=p.__[0];p.__=p.__N,p.__N=void 0,h!==p.__[0]&&(u=true)}}),s&&s.call(this,a,c,l)||u};$.__f=true;var s=$.shouldComponentUpdate,i=$.componentWillUpdate;$.componentWillUpdate=function(a,c,l){if(this.__e){var d=s;s=void 0,r(a,c,l),s=d}i&&i.call(this,a,c,l)},$.shouldComponentUpdate=r}return o.__N||o.__}function U(e,t){var n=Ie(_e++,3);!N.__s&&Ht(n.__H,t)&&(n.__=e,n.u=t,$.__H.__h.push(n))}function Z(e,t){var n=Ie(_e++,4);!N.__s&&Ht(n.__H,t)&&(n.__=e,n.u=t,$.__h.push(n))}function H(e){return xe=5,he(function(){return{current:e}},[])}function mo(e,t,n){xe=6,Z(function(){if(typeof e=="function"){var o=e(t());return function(){e(null),o&&typeof o=="function"&&o()}}if(e)return e.current=t(),function(){return e.current=null}},n==null?n:n.concat(e))}function he(e,t){var n=Ie(_e++,7);return Ht(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function ce(e,t){return xe=8,he(function(){return e},t)}function pe(e){var t=$.context[e.__c],n=Ie(_e++,9);return n.c=e,t?(n.__==null&&(n.__=true,t.sub($)),t.props.value):e.__}function go(e,t){N.useDebugValue&&N.useDebugValue(t?t(e):e)}function Ut(){var e=Ie(_e++,11);if(!e.__){for(var t=$.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function Pr(){for(var e;e=ho.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Ze),e.__H.__h.forEach(St),e.__H.__h=[]}catch(t){e.__H.__h=[],N.__e(t,e.__v)}}N.__b=function(e){$=null,sn&&sn(e)},N.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),fn&&fn(e,t)},N.__r=function(e){an&&an(e),_e=0;var t=($=e.__c).__H;t&&(at===$?(t.__h=[],$.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(Ze),t.__h.forEach(St),t.__h=[],_e=0)),at=$},N.diffed=function(e){cn&&cn(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(ho.push(t)!==1&&rn===N.requestAnimationFrame||((rn=N.requestAnimationFrame)||Mr)(Pr)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),at=$=null},N.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Ze),n.__h=n.__h.filter(function(o){return!o.__||St(o)})}catch(o){t.some(function(r){r.__h&&(r.__h=[])}),t=[],N.__e(o,n.__v)}}),ln&&ln(e,t)},N.unmount=function(e){un&&un(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(o){try{Ze(o)}catch(r){t=r}}),n.__H=void 0,t&&N.__e(t,n.__v))};var dn=typeof requestAnimationFrame=="function";function Mr(e){var t,n=function(){clearTimeout(o),dn&&cancelAnimationFrame(t),setTimeout(e)},o=setTimeout(n,35);dn&&(t=requestAnimationFrame(n))}function Ze(e){var t=$,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),$=t}function St(e){var t=$;e.__c=e.__(),$=t}function Ht(e,t){return!e||e.length!==t.length||t.some(function(n,o){return n!==e[o]})}function yo(e,t){return typeof t=="function"?t(e):t}function bo(e,t){for(var n in t)e[n]=t[n];return e}function Ct(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return true;for(var o in t)if(o!=="__source"&&e[o]!==t[o])return true;return false}function oe(e,t){var n=t(),o=K({t:{__:n,u:t}}),r=o[0].t,s=o[1];return Z(function(){r.__=n,r.u=t,ct(r)&&s({t:r})},[e,n,t]),U(function(){return ct(r)&&s({t:r}),e(function(){ct(r)&&s({t:r})})},[e]),n}function ct(e){var t,n,o=e.u,r=e.__;try{var s=o();return!((t=r)===(n=s)&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return true}}function wo(e){e()}function So(e){return e}function Co(){return[false,wo]}var xo=Z;function xt(e,t){this.props=e,this.context=t}function Dt(e,t){function n(r){var s=this.props.ref,i=s==r.ref;return!i&&s&&(s.call?s(null):s.current=null),t?!t(this.props,r)||!i:Ct(this.props,r)}function o(r){return this.shouldComponentUpdate=n,ae(e,r)}return o.displayName="Memo("+(e.displayName||e.name)+")",o.prototype.isReactComponent=true,o.__f=true,o.type=e,o}(xt.prototype=new X).isPureReactComponent=true,xt.prototype.shouldComponentUpdate=function(e,t){return Ct(this.props,e)||Ct(this.state,t)};var _n=C.__b;C.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),_n&&_n(e)};var Er=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Tr(e){function t(n){var o=bo({},n);return delete o.ref,e(o,n.ref||null)}return t.$$typeof=Er,t.render=e,t.prototype.isReactComponent=t.__f=true,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var pn=function(e,t){return e==null?null:ie(ie(e).map(t))},$r={map:pn,forEach:pn,count:function(e){return e?ie(e).length:0},only:function(e){var t=ie(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:ie},Nr=C.__e;C.__e=function(e,t,n,o){if(e.then){for(var r,s=t;s=s.__;)if((r=s.__c)&&r.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t)}Nr(e,t,n,o)};var vn=C.unmount;function ko(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(o){typeof o.__c=="function"&&o.__c()}),e.__c.__H=null),(e=bo({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=true,e.__c=null),e.__k=e.__k&&e.__k.map(function(o){return ko(o,t,n)})),e}function Oo(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(o){return Oo(o,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=true,e.__c.__P=n)),e}function Ye(){this.__u=0,this.o=null,this.__b=null}function Io(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Lr(e){var t,n,o;function r(s){if(t||(t=e()).then(function(i){n=i.default||i},function(i){o=i}),o)throw o;if(!n)throw t;return ae(n,s)}return r.displayName="Lazy",r.__f=true,r}function Ee(){this.i=null,this.l=null}C.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),vn&&vn(e)},(Ye.prototype=new X).__c=function(e,t){var n=t.__c,o=this;o.o==null&&(o.o=[]),o.o.push(n);var r=Io(o.__v),s=false,i=function(){s||(s=true,n.__R=null,r?r(a):a())};n.__R=i;var a=function(){if(!--o.__u){if(o.state.__a){var c=o.state.__a;o.__v.__k[0]=Oo(c,c.__c.__P,c.__c.__O)}var l;for(o.setState({__a:o.__b=null});l=o.o.pop();)l.forceUpdate()}};o.__u++||32&t.__u||o.setState({__a:o.__b=o.__v.__k[0]}),e.then(i,i)},Ye.prototype.componentWillUnmount=function(){this.o=[]},Ye.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=ko(this.__b,n,o.__O=o.__P)}this.__b=null}var r=t.__a&&ae(Q,null,e.fallback);return r&&(r.__u&=-33),[ae(Q,null,t.__a?null:e.children),r]};var hn=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};function Rr(e){return this.getChildContext=function(){return e.context},e.children}function Fr(e){var t=this,n=e.h;if(t.componentWillUnmount=function(){Re(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),!t.v){for(var o=t.__v;o!==null&&!o.__m&&o.__!==null;)o=o.__;t.h=n,t.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:o.__m},contains:function(){return true},insertBefore:function(r,s){this.childNodes.push(r),t.h.insertBefore(r,s)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.h.removeChild(r)}}}Re(ae(Rr,{context:t.context},e.__v),t.v)}function jt(e,t){var n=ae(Fr,{__v:e,h:t});return n.containerInfo=t,n}(Ee.prototype=new X).__a=function(e){var t=this,n=Io(t.__v),o=t.l.get(e);return o[0]++,function(r){var s=function(){t.props.revealOrder?(o.push(r),hn(t,e,o)):r()};n?n(s):s()}},Ee.prototype.render=function(e){this.i=null,this.l=new Map;var t=ie(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},Ee.prototype.componentDidUpdate=Ee.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){hn(e,n,t)})};var Ao=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Ur=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Hr=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Dr=/[A-Z0-9]/g,jr=typeof document<"u",Br=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Po(e,t,n){return t.__k==null&&(t.textContent=""),Re(e,t),typeof n=="function"&&n(),e?e.__c:null}function Wr(e,t,n){return vo(e,t),typeof n=="function"&&n(),e?e.__c:null}X.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(X.prototype,e,{configurable:true,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:true,writable:true,value:t})}})});var mn=C.event;function Vr(){}function zr(){return this.cancelBubble}function qr(){return this.defaultPrevented}C.event=function(e){return mn&&(e=mn(e)),e.persist=Vr,e.isPropagationStopped=zr,e.isDefaultPrevented=qr,e.nativeEvent=e};var Bt,Jr={enumerable:false,configurable:true,get:function(){return this.class}},gn=C.vnode;C.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,o=t.type,r={},s=o.indexOf("-")===-1;for(var i in n){var a=n[i];if(!(i==="value"&&"defaultValue"in n&&a==null||jr&&i==="children"&&o==="noscript"||i==="class"||i==="className")){var c=i.toLowerCase();i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&a===true?a="":c==="translate"&&a==="no"?a=false:c[0]==="o"&&c[1]==="n"?c==="ondoubleclick"?i="ondblclick":c!=="onchange"||o!=="input"&&o!=="textarea"||Br(n.type)?c==="onfocus"?i="onfocusin":c==="onblur"?i="onfocusout":Hr.test(i)&&(i=c):c=i="oninput":s&&Ur.test(i)?i=i.replace(Dr,"-$&").toLowerCase():a===null&&(a=void 0),c==="oninput"&&r[i=c]&&(i="oninputCapture"),r[i]=a}}o=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=ie(n.children).forEach(function(l){l.props.selected=r.value.indexOf(l.props.value)!=-1})),o=="select"&&r.defaultValue!=null&&(r.value=ie(n.children).forEach(function(l){l.props.selected=r.multiple?r.defaultValue.indexOf(l.props.value)!=-1:r.defaultValue==l.props.value})),n.class&&!n.className?(r.class=n.class,Object.defineProperty(r,"className",Jr)):(n.className&&!n.class||n.class&&n.className)&&(r.class=r.className=n.className),t.props=r}(e),e.$$typeof=Ao,gn&&gn(e)};var yn=C.__r;C.__r=function(e){yn&&yn(e),Bt=e.__c};var bn=C.diffed;C.diffed=function(e){bn&&bn(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),Bt=null};var Kr={ReactCurrentDispatcher:{current:{readContext:function(e){return Bt.__n[e.__c].props.value},useCallback:ce,useContext:pe,useDebugValue:go,useDeferredValue:So,useEffect:U,useId:Ut,useImperativeHandle:mo,useInsertionEffect:xo,useLayoutEffect:Z,useMemo:he,useReducer:Ft,useRef:H,useState:K,useSyncExternalStore:oe,useTransition:Co}}};function Gr(e){return ae.bind(null,e)}function nt(e){return!!e&&e.$$typeof===Ao}function Zr(e){return nt(e)&&e.type===Q}function Yr(e){return!!e&&!!e.displayName&&(typeof e.displayName=="string"||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function Xr(e){return nt(e)?Ir.apply(null,arguments):e}function Mo(e){return!!e.__k&&(Re(null,e),true)}function Qr(e){return e&&(e.base||e.nodeType===1&&e)||null}var es=function(e,t){return e(t)},ts=function(e,t){return e(t)},ns=Q,os=nt,Vi={useState:K,useId:Ut,useReducer:Ft,useEffect:U,useLayoutEffect:Z,useInsertionEffect:xo,useTransition:Co,useDeferredValue:So,useSyncExternalStore:oe,startTransition:wo,useRef:H,useImperativeHandle:mo,useMemo:he,useCallback:ce,useContext:pe,useDebugValue:go,version:"18.3.1",Children:$r,render:Po,hydrate:Wr,unmountComponentAtNode:Mo,createPortal:jt,createElement:ae,createContext:De,createFactory:Gr,cloneElement:Xr,createRef:Sr,Fragment:Q,isValidElement:nt,isElement:os,isFragment:Zr,isMemo:Yr,findDOMNode:Qr,Component:X,PureComponent:xt,memo:Dt,forwardRef:Tr,flushSync:ts,unstable_batchedUpdates:es,StrictMode:ns,Suspense:Ye,SuspenseList:Ee,lazy:Lr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Kr};function rs(e){return{render:function(t){Po(t,e)},unmount:function(){Mo(e)}}}const Wt=De("");function ss(){return pe(Wt)+Ut()}Oe(1,"styles/scale","@layer clover{:root{--clover-space-3xs: .146rem;--clover-space-2xs: .236rem;--clover-space-xs: .382rem;--clover-space-s: .618rem;--clover-space-m: 1rem;--clover-space-l: 1.618rem;--clover-space-xl: 2.618rem;--clover-space-2xl: 4.236rem;--clover-text-xs: .764rem;--clover-text-s: .854rem;--clover-text-m: 1.146rem;--clover-text-l: 1.236rem;--clover-control: calc(1rem + 2 * var(--clover-space-s));--clover-inset: var(--clover-space-l);--clover-picture: calc(4 * var(--clover-space-xl))}:where(.clover-title){margin:0;font-weight:var(--clover-title-weight, 400);line-height:1.25;overflow-wrap:anywhere}:where(.clover-root,.clover-canvas,.clover-items,.clover-geomap) :where(button,input,select,textarea){font:inherit}:where(.clover-field-pill-query,.clover-collection-select-control){box-sizing:border-box;padding:var(--clover-space-xs) var(--clover-space-s);border:1px solid var( --clover-field-edge, color-mix( in srgb, var(--clover-color-primary-muted, #26292b) 80%, var(--clover-color-secondary, #fff) ) );border-radius:var(--clover-radius, 3px);background-color:var(--clover-color-secondary, #fff);color:var(--clover-color-primary, #1a1d1e)}:where(.clover-field-pill-query,.clover-collection-select-control):focus-visible{outline:2px solid var(--clover-color-accent, #0065c3);outline-offset:1px}:where(.clover-field-pill-query)::placeholder{color:color-mix(in srgb,var(--clover-color-primary, #1a1d1e) 65%,var(--clover-color-secondary, #fff));opacity:1}}");Oe(2,"styles/contrast","@layer clover{:where([data-high-contrast]){--clover-accent-fill: var(--clover-color-control, #1a1d1e);--clover-accent-ring: 3px solid var(--clover-color-accent, #0065c3);--clover-accent-ring-hover: 3px solid color-mix(in srgb, var(--clover-color-accent, #0065c3) 50%, transparent);--clover-accent-text-fallback: var(--clover-color-primary, #1a1d1e);--clover-transition: none}}");const is="clover-root",Eo=Symbol("roots"),as=[];class To{constructor(t){se(this,"entries",new Map);se(this,"lists",new Map);se(this,"listeners",new Map);se(this,"languages",new cs(t2=>this.entries.has(t2)));this.count=t}list(t){return this.lists.get(t)??as}subscribe(t,n){let o=this.listeners.get(t);return o||this.listeners.set(t,o=new Set),o.add(n),()=>{o.delete(n)}}connect(t){var s;const n=t.kind==="part"?((s=t.element.parentElement)==null?void 0:s.closest(is))??null:null,o=this.entries.get(t.element);if(o&&o.root===n)return;const r={hosted:t,key:(o==null?void 0:o.key)??++this.count.made,root:n};this.entries.set(t.element,r),o&&this.change(lt(o),i=>i.filter(a=>a!==o)),this.change(lt(r),i=>[...i,r]),t.needsRoot&&!n&&console.warn(`<${t.element.localName}> shows a <clover-root>'s state: put it inside one.`),t.kind!=="root"&&this.languages.draws(t.element.localName),(t.kind!=="part"||!n)&&this.languages.watch(t.element)}disconnect(t){const n=this.entries.get(t);n&&(this.entries.delete(t),this.change(lt(n),o=>o.filter(r=>r!==n)))}change(t,n){var o;this.lists.set(t,n(this.list(t))),(o=this.listeners.get(t))==null||o.forEach(r=>r())}}const lt=e=>e.hosted.kind==="root"?Eo:e.root;class cs{constructor(t){se(this,"observer",null);se(this,"tags",new Set);this.isElement=t}draws(t){this.tags.add(t)}watch(t){this.observer??(this.observer=new MutationObserver(n=>{const o=[...this.tags,".clover-announcer"].join(",");for(const{target:r}of n){const s=r;s.getAttribute("lang")!==""||this.isElement(s)||s.closest(o)&&s.removeAttribute("lang")}})),this.observer.observe(t,{subtree:true,attributes:true,attributeFilter:["lang"]})}}function kt(e,t){const n=ce(r=>e.subscribe(t,r),[e,t]);return oe(n,()=>e.list(t))}function $o(e){return oe(e.subscribe,e.getProps,e.getProps)}function ls({registry:e}){const t=kt(e,Eo),n=kt(e,null);return R(Q,{children:[t.map(o=>R(us,{entry:o,registry:e},o.key)),n.map(o=>R(Lo,{entry:o},o.key))]})}const No=e=>`clover-${e.key}-`,us=Dt(function({entry:t,registry:n}){const{hosted:o}=t,r=kt(n,o.element),s=$o(o),i=o.Component;return R(Ro,{hosted:o,props:s,children:R(Wt.Provider,{value:No(t),children:R(i,{hosted:o,props:s,children:r.map(a=>R(Lo,{entry:a},a.key))})})})}),Lo=Dt(function({entry:t}){const{hosted:n}=t,o=$o(n);if(n.needsRoot&&!t.root)return null;const r=n.Component;return jt(R(Ro,{hosted:n,props:o,children:R(Wt.Provider,{value:No(t),children:R(r,{hosted:n,props:o})})}),n.element)});class Ro extends X{constructor(){super(...arguments);se(this,"state",{failed:false})}static getDerivedStateFromError(){return{failed:true}}componentDidCatch(n,o){console.error(`<${this.props.hosted.element.localName}>:`,n)}componentDidUpdate(n){this.state.failed&&n.props!==this.props.props&&this.setState({failed:false})}render(){return this.state.failed?null:this.props.children}}const wn=new WeakMap,Ke=Symbol.for("clover.elements");function fs(e){let t=wn.get(e);if(!t){const n=e;n[Ke]&&console.warn("Clover is loaded twice on this page: load one entry."),t=new To(n[Ke]??(n[Ke]={made:0})),wn.set(e,t),rs(e.createElement("div")).render(R(ls,{registry:t}))}return t}const zi=Object.freeze(Object.defineProperty({__proto__:null,Registry:To,hostOf:fs},Symbol.toStringTag,{value:"Module"})),Vt=De(void 0);function Fo(e=Y,t){const n=oe(L.subscribe,L.getSnapshot,L.getSnapshot),o=pe(Vt),r=t??o,s=ce((a,c)=>L.t(a,c,e),[e,n]),i=ce(a=>L.langOf(a,r,e),[e,n,r]);return{t:s,langOf:i,hostLanguage:r,i18n:L}}const ds=/^(ar|arc|ckb|dv|fa|he|iw|ks|ps|sd|syr|ug|ur|yi|ota|prs|azb|pnb|bal|glk|mzn|lrc|khw|nqo|rhg|jrb|jpr|sam|arz|ary|apc|acm|ajp|aeb|ars)$/,_s=/^(adlm|arab|hebr|nkoo|rohg|syrc|thaa)$/;function ps(e){if(!e)return;const[t,...n]=e.toLowerCase().split(/[-_]/),o=n.find(r=>/^[a-z]{4}$/.test(r));return(o?_s.test(o):ds.test(t))?"rtl":void 0}function Sn(e){return e?{lang:e,dir:ps(e)}:{}}function vs(e,t,n={}){return((e==null?void 0:e.fetch)??globalThis.fetch)(t,{credentials:(e==null?void 0:e.credentials)??"same-origin",...n,headers:{...n.headers,...e==null?void 0:e.headers}})}function hs(e){var t;(t=e.body)==null||t.cancel().catch(()=>{})}const qi=e=>(e==null?void 0:e.credentials)==="include",ms=e=>JSON.stringify([e==null?void 0:e.credentials,e==null?void 0:e.headers]);class gs extends Error{constructor(t,n,o){super(t),this.url=n,this.status=o,this.name="CloverRequestError"}}async function ke(e,t,n){const o=await vs(e,t,{signal:n,headers:{Accept:"application/ld+json, application/json"}});if(!o.ok)throw hs(o),new gs(`${t} answered ${o.status}`,t,o.status);return o.json()}const I=e=>Array.isArray(e)?e:e==null?[]:[e],Uo=["Independents","Composite","List"];function Ho(e){return I(e==null?void 0:e.body).flatMap(t=>Uo.includes(t==null?void 0:t.type)?I(t.items):[t])}function ys(e){const t=I(e==null?void 0:e.motivation);return!t.length||t.includes("painting")}function bs(e){const t=[];for(const n of I(e==null?void 0:e.items))for(const o of I(n==null?void 0:n.items))if(ys(o))for(let r of Ho(o))(r==null?void 0:r.type)==="Choice"&&(r=I(r.items)[0]),(r==null?void 0:r.type)==="SpecificResource"&&(r=typeof r.source=="string"?{id:r.source}:r.source),r&&t.push({body:r,annotation:o});return t}function Do(e,t,n=", "){if(!e)return{text:""};if(typeof e=="string")return{text:e};const o=Object.keys(e).filter(a=>{var c;return(c=e[a])==null?void 0:c.length});if(!o.length)return{text:""};const r=Yn(o,t),s=e[r];return{text:Array.isArray(s)?s.join(n):String(s),lang:r==="none"||r==="@none"?void 0:r}}const ws=/^[A-Za-z]{2,8}(-[A-Za-z0-9]{1,8})*$/;function Ji(e){const t=e==null?void 0:e.language,n=(Array.isArray(t)?t:[t]).filter(o=>typeof o=="string"&&ws.test(o));return n.length===1?n[0]:void 0}const ot=De(null);function Ki(){return pe(ot)}function Ss(e="This part"){const t=pe(ot);if(!t)throw new Error(`${e} must be rendered inside <Clover.Root>.`);return t}function Gi(e,t=Object.is,n){const{clover:o}=Ss(n),r=H(null),s=()=>{const i=e(o.store.get());return r.current&&t(r.current.value,i)?r.current.value:(r.current={value:i},i)};return oe(o.store.subscribe,s)}const Cs={subscribe:()=>()=>{}};function Zi(e,t){const n=pe(ot),o=n==null?void 0:n.clover.store,r=()=>o?e(o.get()):t;return oe(o?o.subscribe:Cs.subscribe,r)}function xs(e,t){const n=pe(Vt),o=H(null),[r,s]=K(""),i=ce(d=>{o.current=d,typeof e=="function"?e(d):e&&(e.current=d)},[e]);U(()=>{var u,p;const d=(u=o.current)==null?void 0:u.parentElement;t!==void 0||n!==void 0||!d||s(((p=d.closest("[lang]"))==null?void 0:p.getAttribute("lang"))??"")});const c=t??n??r,{langOf:l}=Fo(void 0,c);return{ref:i,hostLanguage:c,langOf:l}}Oe(23,"ui/ReadMore","@layer clover{.clover-read-more{display:flex;flex-direction:column;align-items:flex-start;gap:var(--clover-space-xs);min-width:0}button.clover-read-more-button{margin:0;padding:0;border:0;background:none;color:var( --clover-color-accent-text, var(--clover-accent-text-fallback, var(--clover-color-accent, #0065c3)) );font-size:var(--clover-text-s);text-decoration:underline 1px;text-decoration-color:color-mix(in srgb,currentColor 20%,transparent);text-underline-offset:var(--clover-space-3xs);cursor:pointer}button.clover-read-more-button:hover{text-decoration-color:currentColor}button.clover-read-more-button:focus-visible{outline:2px solid var(--clover-color-accent, #0065c3);outline-offset:2px;border-radius:var(--clover-radius, 3px)}}");const ks=["left-to-right","right-to-left","top-to-bottom","bottom-to-top"];function Os(e){return ks.includes(e)?e:"left-to-right"}const Is=["individuals","paged","continuous","unordered"];function As(e){return I(e).find(n=>Is.includes(n))??"individuals"}function Ps(e,t){if(!e.length)return[];if(t==="continuous")return[e.map((a,c)=>c)];if(t!=="paged")return e.map((a,c)=>[c]);const n=[];let o=[],r=0,s=false;const i=()=>{o.length&&n.push(o),o=[]};return e.forEach((a,c)=>{const l=I(a.behavior);if(l.includes("non-paged")){c===r&&r++,i(),n.push([c]);return}if(c===r||l.includes("facing-pages")){o.length&&(s=true),i(),n.push([c]);return}if(o.push(c),s){i(),s=false;return}o.length>1&&i()}),i(),n}function Ms(e,t){const n=e.findIndex(o=>o.includes(t));return n===-1?0:n}function jo(e,t){const n=/(?:^|[#&])t=([^&]+)/.exec(t),o=n&&{t:n[1]},r=/(?:^|[#&])xywh=(?:pixel:)?([^&]+)/.exec(t);if(r){const[s,i,a,c]=r[1].split(",").map(Number);if([s,i,a,c].every(Number.isFinite))return{id:e,rect:{x:s,y:i,w:a,h:c},...o}}return o&&{id:e,...o}}function Ge(e){const t=e.indexOf("#");if(t>=0){const o=e.slice(0,t);return jo(o,e.slice(t))??{id:o}}const n=e.indexOf("&t=");return n>=0?{id:e.slice(0,n),t:e.slice(n+3)}:{id:e}}const Ot=e=>{var t;return Array.isArray(e)?Ot(e[0]):Uo.includes(e==null?void 0:e.type)?Ot((t=e.items)==null?void 0:t[0]):e};function rt(e){return Es(Ot(e))}function Es(e){var n;if(typeof e=="string")return Ge(e);if(!e||typeof e!="object")return{id:""};if(e.type!=="SpecificResource"||e.source===void 0)return Ge(e.id??"");const t=typeof e.source=="string"?Ge(e.source):Ge(((n=e.source)==null?void 0:n.id)??"");for(const o of I(e.selector)){const r=o;if((r==null?void 0:r.type)==="PointSelector"){const[s,i,a]=[r.x,r.y,r.instant??r.t].map(Number),c=Number.isFinite(s)&&Number.isFinite(i);return{id:t.id,...c?{point:{x:s,y:i}}:{},...Number.isFinite(a)?{t:String(a)}:{}}}if((r==null?void 0:r.type)==="SvgSelector"&&r.value)return{id:t.id,svg:String(r.value)};if((r==null?void 0:r.type)==="FragmentSelector"&&r.value){const s=jo(t.id,String(r.value));if(s)return s}}return t}const Yi=e=>e==="Audio"||e==="Sound",Ts=e=>{const t=I(e);return t.length>0&&t.every(n=>n==="supplementing")},$s=(e,t)=>Ts(e)&&!!(t.rect||t.svg||t.point)&&!t.t,Cn=new WeakMap,Ns={canvases:[],views:[],direction:"left-to-right"};function D(e){if(!e)return Ns;let t=Cn.get(e);if(!t){const n=(e.items??[]).filter(o=>(o==null?void 0:o.type)==="Canvas"||(o==null?void 0:o.type)==="Timeline"||(o==null?void 0:o.type)==="Scene");t={canvases:n,views:Ps(n,As(e.behavior)),direction:Os(e.viewingDirection)},Cn.set(e,t)}return t}const xn=new WeakMap;function je(e,t){if(!t)return null;const n=D(e);let o=xn.get(n);if(!o){o=new Map;for(const r of n.canvases)o.has(r.id)||o.set(r.id,r);xn.set(n,o)}return o.get(t)??null}function Be(e,t){const{canvases:n,views:o}=D(e),r=n.findIndex(s=>s.id===t);return r===-1?0:Ms(o,r)}const kn=new WeakMap,It=[];function $e(e,t){return e?Bo(e,Be(e,t)):It}function Xi(e,t){if(!e)return It;const n=Be(e,t)+1;return n<D(e).views.length?Bo(e,n):It}function Bo(e,t){let n=kn.get(e);n||kn.set(e,n=new Map);let o=n.get(t);if(!o){const r=D(e);o=(r.views[t]??[]).map(s=>r.canvases[s]),n.set(t,o)}return o}function Ls(e,t){var s,i;const{canvases:n,views:o}=D(e),r=(s=o[t])==null?void 0:s[0];return r===void 0?null:((i=n[r])==null?void 0:i.id)??null}function Rs(e){const t=e==null?void 0:e.start;if(!t)return null;const n=rt(t);if(!n.id)return null;const o={canvasId:n.id};n.rect&&(o.region=n.rect);const r=n.t?Number(n.t.split(",")[0]):NaN;return Number.isFinite(r)&&(o.time=r),o}const Qi=(e,t)=>{const n=e==null?void 0:e.behavior;return Array.isArray(n)?n.includes(t):n===t},ea=e=>[(e==null?void 0:e.partOf)??[]].flat().find(t=>(t==null?void 0:t.id)&&t.type==="Collection");function ta(e,t,n,o){const r=e==null?void 0:e.items;if(!(r!=null&&r.length)||!n)return-1;const s=$e(n,o),i=a=>{const c=r[a];return((c==null?void 0:c.manifestId)===n.id||(c==null?void 0:c.manifestAs)===n.id)&&(!c.canvasId||s.some(l=>l.id===c.canvasId))};return t!==null&&i(t)?t:r.findIndex((a,c)=>i(c))}Oe(29,"components/Primitives/Primitives","@layer clover{.clover-summary:not([data-read-more=open]){display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:var(--clover-summary-lines, 5);overflow:hidden}:is(.clover-metadata,.clover-required-statement){display:flex;flex-direction:column;gap:var(--clover-space-s);margin:0}:is(.clover-metadata,.clover-required-statement) dt{margin:0;font-weight:500}:is(.clover-metadata,.clover-required-statement) dd{margin:0}.clover-summary,:is(.clover-metadata,.clover-required-statement) :is(dt,dd){overflow-wrap:anywhere}:is(.clover-about,.clover-canvas-caption,.clover-annotations-body,.clover-metadata,.clover-required-statement,.clover-summary) a:not([class]){text-decoration-line:underline;text-underline-offset:var(--clover-space-3xs)}:is(.clover-homepage,.clover-rendering,.clover-see-also,.clover-part-of)>li{min-block-size:24px}:is(.clover-homepage,.clover-rendering,.clover-see-also,.clover-part-of) a,a:is(.clover-id,.clover-rights){color:var( --clover-color-accent-text, var(--clover-accent-text-fallback, var(--clover-color-accent, #0065c3)) );overflow-wrap:anywhere;text-decoration-line:underline;text-underline-offset:var(--clover-space-3xs)}.clover-link-format{color:var(--clover-color-primary-muted, #26292b);font-size:var(--clover-text-s)}}");const Fs={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",whiteSpace:"nowrap",border:0},Us=e=>(e==null?void 0:e.format)==="text/vtt"||typeof(e==null?void 0:e.id)=="string"&&/\.vtt(\?|$)/i.test(e.id);function Hs(e){const t=[];let n=0;const o=(r,s)=>{var a;if(!r||Us(r))return;if(r.type==="SpecificResource"){r.source&&typeof r.source=="object"&&o(r.source,s);return}const i=s===void 0?{}:{choice:s};if(r.type==="TextualBody"||typeof r.value=="string")t.push({value:String(r.value??""),format:r.format,language:I(r.language)[0],...i});else if(r.type==="Image"&&r.id){const c=r.label??e.label;t.push({image:r.id,format:r.format,...c?{label:c}:{},...i})}else if(r.type==="Feature"){const c=((a=r.properties)==null?void 0:a.label)??e.label;c&&typeof c=="object"&&t.push({label:c,place:true,...i})}};for(const r of Ho(e))if((r==null?void 0:r.type)!=="Choice")o(r);else{const s=n++;for(const i of I(r.items))o(i,s)}return t}const Wo="content-search",Ds="contents",na=(e,t)=>`${e}#region-${t+1}`,js=e=>I(e==null?void 0:e.motivation).includes("linking");function Vo(e,t,n){const o=[];for(const r of I(e==null?void 0:e.items)){const s=I(r==null?void 0:r.motivation);if(s.includes("painting"))continue;const i=Hs(r);if(!i.length&&!js(r))continue;const a=rt(I(r.target)[0]),c=a.id||n;!c||!r.id||o.push({id:r.id,setId:t,canvasId:c,target:a,motivation:s,bodies:i,annotation:r})}return o}const Bs=e=>D(e).canvases.some(t=>I(t.items).some(n=>I(n==null?void 0:n.items).some(o=>I(o==null?void 0:o.body).some(r=>[r,...I(r==null?void 0:r.items)].some(s=>I(s==null?void 0:s.annotations).length>0)))));function Ws(e,t){for(const n of[e,t])if(n!=null&&n.label)return n.label;for(const n of[e,t]){const o=I(n==null?void 0:n.partOf).find(r=>/AnnotationCollection/.test(String((r==null?void 0:r.type)??(r==null?void 0:r["@type"])))&&r.label);if(o)return o.label}}const zo=e=>I(e==null?void 0:e.partOf).filter(t=>(t==null?void 0:t.id)&&/AnnotationCollection/.test(String((t==null?void 0:t.type)??(t==null?void 0:t["@type"])))),On=new WeakMap;function qo(e){var n;if(!e)return[];let t=On.get(e);if(!t){const o=new Map;for(const r of D(e).canvases)for(const s of I(r.annotations)){if(!Array.isArray(s==null?void 0:s.items))continue;const i=s.id??`${r.id}#annotations`;let a=o.get(i);if(!a){const c=(n=zo(s)[0])==null?void 0:n.id;a={id:i,label:Ws(s),source:"manifest",entries:[],...c?{collection:c}:{}},o.set(i,a)}a.entries.push(...Vo(s,i,r.id))}t=[...o.values()].filter(r=>r.entries.length),On.set(e,t)}return t}const In=new WeakMap,Jo=[];function oa(e){if(!e)return Jo;let t=In.get(e);return t||(t=D(e).canvases.flatMap(n=>I(n.annotations).filter(o=>o==null?void 0:o.id).map(o=>({id:String(o.id),canvasId:String(n.id),fetched:Array.isArray(o.items)}))),In.set(e,t)),t}const ut=new WeakMap,ft=new WeakMap;function Vs(e,t=zs){var n;if(!ft.has(t)){const o=t.filter(s=>s.content),r=(n=o[0])==null?void 0:n.content;ft.set(t,r?{id:r.id,type:r.type,...r.label?{label:r.label}:{},pages:Jo,entries:o.flatMap(s=>s.entries)}:null)}return ft.get(t)??qs(e)}const zs=[];function qs(e){var r;if(!e)return null;if(ut.has(e))return ut.get(e);const t=D(e).canvases.flatMap(s=>I(s.annotations).flatMap(i=>zo(i).map(a=>({part:a,page:i,canvas:s})))),n=(r=t[0])==null?void 0:r.part.id,o=n?(()=>{var l,d;const s=t.filter(({part:u})=>u.id===n),i=(l=s.find(({part:u})=>u.label))==null?void 0:l.part.label,a=Number((d=s.find(({part:u})=>u.total))==null?void 0:d.part.total),c=qo(e);return{id:n,type:"AnnotationCollection",...i?{label:i}:{},...a>0?{total:a}:{},pages:s.map(({page:u,canvas:p})=>({id:String(u.id),canvasId:String(p.id),fetched:Array.isArray(u.items)})),entries:s.flatMap(({page:u})=>{var p;return((p=c.find(h=>h.id===u.id))==null?void 0:p.entries)??[]})}})():null;return ut.set(e,o),o}const An=new WeakMap,Pn=[];function Fe(e,t){const n=qo(e);if(!t.length)return n.length?n:Pn;const o=e??Pn;let r=An.get(o);r||An.set(o,r=new Map);let s=r.get(t);if(!s){const i=new Set(n.map(a=>a.id));s=[...n,...t.filter(a=>!i.has(a.id)&&!!i.add(a.id))],r.set(t,s)}return s}const Mn=new WeakMap;function Js(e,t,n,o=null){const r=Fe(e,t),s=n!=null&&n.entries.length?n:null;if(!o&&!s)return r;let i=Mn.get(r);i||Mn.set(r,i=new Map);let a=i.get(o);a||i.set(o,a=new Map);let c=a.get(s);return c||(c=[...r,...o?[o]:[],...s?[s]:[]],a.set(s,c)),c}const Ks=e=>Number(e==null?void 0:e.duration)>0;function Ko(e,t){return e.source==="search"||!e.entries.length?false:e.entries.every(n=>$s(n.motivation,n.target)&&!Ks(t(n.canvasId)))}const En=new WeakMap;function ra(e,t){const n=Fe(e,t);let o=En.get(n);if(!o){const r=n.filter(s=>!Ko(s,i=>je(e,i)??void 0));o=r.length===n.length?n:r,En.set(n,o)}return o}const Tn=new WeakMap;function Go(e,t,n,o){const r=Fe(e,t),s=Tn.get(r);if(s&&s.hidden===n&&s.shown===o)return s.ids;const i=r.filter(c=>!n.includes(c.id)&&!o.includes(c.id)&&Ko(c,l=>je(e,l)??void 0)).map(c=>c.id),a=i.length?[...n,...i]:n;return Tn.set(r,{hidden:n,shown:o,ids:a}),a}const $n=new WeakMap,Nn=[Wo,Ds];function sa(e,t,n,o,r){if(!r)return Nn;const s=Go(e,t,n,o),i=$n.get(s);if(i&&i.hidden===n)return i.ids;const a=[...Nn,...s.filter(c=>!n.includes(c))];return $n.set(s,{hidden:n,ids:a}),a}function Gs(e){for(const t of I(e==null?void 0:e.target)){const n=(t==null?void 0:t.type)==="SpecificResource"?t.source:t,o=I(n==null?void 0:n.partOf).find(r=>(r==null?void 0:r.id)&&(!r.type||r.type==="Manifest"));if(o)return o.id}}function dt(e,t){if(!t)return null;for(const n of e){const o=n.entries.find(r=>r.id===t);if(o)return o}return null}function Zo(e){return btoa(encodeURIComponent(JSON.stringify(e))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function Yo({manifestId:e,canvasId:t,type:n="Canvas",region:o,time:r}){const s={id:t,type:n,...e&&e!==t?{partOf:[{id:e,type:"Manifest"}]}:{}},i=r!=null&&r>0?`t=${Math.round(r*100)/100}`:o?`xywh=${[o.x,o.y,o.w,o.h].map(Math.round).join(",")}`:null,a={"@context":`http://iiif.io/api/presentation/${n==="Canvas"?3:4}/context.json`,id:`${t}#content-state`,type:"Annotation",motivation:["contentState"],target:i?{type:"SpecificResource",source:s,selector:{type:"FragmentSelector",value:i}}:s};return{json:a,encoded:Zo(a)}}const ia=Object.freeze(Object.defineProperty({__proto__:null,buildContentState:Yo,encodeContentState:Zo},Symbol.toStringTag,{value:"Module"})),Zs=/iiif\.io\/api\/presentation\/4\/context\.json/;function Xo(e){const t=e==null?void 0:e["@context"];return(Array.isArray(t)?t:[t]).some(o=>typeof o=="string"&&Zs.test(o))}let Ln=null,Rn=null;function zt(){return Rn??(Rn=import("./upgrade-eNW0DPXq.mjs")),Ln??(Ln=import("./upgrader-BlbMUEH6.mjs").then(({upgradePresentation3To4:e})=>e)),Promise.all([Ln,Rn])}async function me(e){if(Xo(e))return e;const[t,{upgrade:n}]=await zt();return await n(e,t)}const Ys=()=>import("./content-state-reader-DGOg8oAH.mjs");function Xs(e){const t=e;return!t||typeof t!="object"?false:t.type==="Annotation"||t["@type"]==="oa:Annotation"||t.type==="SpecificResource"}const Qo=e=>!!e&&typeof e=="object"&&/ImageService[123]|iiif\.io\/api\/image/.test(JSON.stringify(["@context","type","@type","protocol"].map(t=>e[t])));async function Qs(e,t,n){try{return await ke(e,t,n)}catch(o){if(n!=null&&n.aborted||/\.json([?#]|$)/i.test(t))throw o;try{const r=await ke(e,`${t.replace(/\/+$/,"")}/info.json`,n);if(Qo(r))return r}catch{}throw o}}const ei=["summary","metadata","requiredStatement","rights","provider","homepage","seeAlso","rendering","thumbnail","navDate","partOf"];function ti(e){const t={"@context":oi,id:e.id,type:"Manifest",label:e.label??{none:[""]},items:[e]};for(const n of ei)e[n]!==void 0&&n!=="label"&&(t[n]=e[n]);return t}const aa=e=>{var t,n;return!!e&&((n=(t=e.items)==null?void 0:t[0])==null?void 0:n.id)===e.id},ca=e=>{var t,n;return!!e&&((t=e.items)==null?void 0:t.length)===1&&((n=e.items[0])==null?void 0:n.id)===`${e.id}/canvas`},ni=/^(oa:)?Annotation(Page|Collection)$/;class _t extends Error{constructor(){super(...arguments);se(this,"name","CloverContentError")}}const oi="http://iiif.io/api/presentation/4/context.json",ri=e=>/^https?:\/\//i.test(e);async function At(e,{request:t,signal:n}){return Array.isArray(e.items)&&e.items.length>0||!e.id?e:await ke(t,e.id,n)}const si=50;async function qt(e,t){const n=e;if(Array.isArray(n.items)&&n.items.length||!n.first)return e;const o=[],r=new Set;let s=n.first;for(let i=0;s&&i<si;i++){const a=typeof s=="string"?{id:s}:s;if(r.has(a.id??a))break;r.add(a.id??a);const c=a.items?a:await ke(t.request,a.id,t.signal),l=await me({"@context":c["@context"]??n["@context"],...c,type:"Collection"});o.push(...l.items??[]),s=c.next}return{...n,items:o}}async function er(e,t={}){return me(await At(e,t))}async function tr(e,t,n=0){for(const o of e.items??[]){if(o.type==="Manifest")return me(await At(o,t));if(o.type==="Collection"&&n<8){const r=await qt(await me(await At(o,t)),t),s=await tr(r,t,n+1);if(s)return s}}return null}async function ii(e,{request:t,signal:n}={}){zt();const o=typeof e=="string"?await ke(t,e.trim(),n):e,r=await me(o);return r.type==="Collection"?qt(r,{request:t,signal:n}):r}async function nr(e,t={}){var i;const{request:n,signal:o}=t;zt();let r=e;if(typeof e=="string"&&(r=ri(e.trim())?await Qs(n,e.trim(),o):(await Ys()).decodeContentState(e),!r))throw new _t("Unreadable iiifContent");if(Xs(r)&&(t.follows??0)<2){const{follow:a}=await import("./follow-content-Byosc3Ev.mjs");return a(r,t,nr)}if(ni.test(String((r==null?void 0:r.type)??""))){const{annotationsContent:a}=await import("./annotations-content-BJSUCNd1.mjs");return a(r,t)}if(Qo(r)){const{imageServiceContent:a}=await import("./image-service-content-bUFBZCr1.mjs");return a(r,typeof e=="string"?e.trim():void 0)}const s=await me(r);switch((i=o==null?void 0:o.throwIfAborted)==null||i.call(o),s.type){case"Manifest":return{manifest:s};case"Collection":{const a=await qt(s,t),c=t.manifestId,l=c?(a.items??[]).find(u=>u.id===c&&u.type==="Manifest"):void 0,d=l?await er(l,t):await tr(a,t);if(!d)throw new _t("The Collection holds no Manifest");return{manifest:d,collection:a}}case"Canvas":case"Timeline":case"Scene":return{manifest:ti(s),target:{canvasId:s.id}};default:throw new _t(`Cannot show a ${String(s.type??"resource without a type")}`)}}const or=e=>!!(e!=null&&e.id)&&e.type==="AnnotationPage"&&!e.items;function Fn(e){const t=[];for(const n of e)for(const o of["items","annotations"])for(const r of n[o]??[])or(r)&&t.push([n.id,o,r.id]);return t}async function ai(e,t,n,o){return ci(await ke(n,e,o),t)}async function ci(e,t="urn:clover:annotation-page"){var r;const n=e;return Xo(n)?n:((r=(await me({"@context":n["@context"]??"http://iiif.io/api/presentation/3/context.json",id:t,type:"Canvas",items:[{...n,"@context":void 0}]})).items)==null?void 0:r[0])??n}function li(e,t){const n=e,o=t,r=c=>Array.isArray(c)?c:c?[c]:[],s=r(n.partOf),i=r(o.partOf),a=[...s.map(c=>({...i.find(l=>l.id&&l.id===c.id),...c})),...i.filter(c=>!s.some(l=>l.id===c.id))];return{...e,...n.label===void 0&&o.label!==void 0&&{label:o.label},...a.length&&{partOf:a}}}function ui(e,t,n,o){let r=false;const s=(e.items??[]).map(i=>{if(i.id!==t||!Array.isArray(i[n]))return i;const a=i[n].map(c=>c.id!==o.id||!or(c)?c:(r=true,li(o,c)));return r?{...i,[n]:a}:i});return r?{...e,items:s}:e}const Un=/\/search\/([0-2])\//;function fi(e){if(!e)return null;let t=null;for(const n of I(e.service)){const o=(n==null?void 0:n.id)??(n==null?void 0:n["@id"]);if(typeof o!="string")continue;const r=String(n.type??n["@type"]??""),s=[n.profile,n["@context"]].flat().map(a=>String(a??"")).join(" "),i=r==="SearchService2"?2:r==="SearchService1"?1:Un.test(s)?Number(Un.exec(s)[1])>=2?2:1:null;if(i===2)return{id:o,version:i};i===1&&(t??(t={id:o,version:i}))}return t}function di(e){let t=e;const n=new Set;return{get:()=>t,set(o){const r=typeof o=="function"?o(t):o;Object.keys(r).some(i=>!Object.is(r[i],t[i]))&&(t={...t,...r},n.forEach(i=>i()))},subscribe(o){return n.add(o),()=>n.delete(o)}}}function Se(e){let t=e;const n=new Set;return{get:()=>t,emit(o){t=o,n.forEach(r=>r(o))},subscribe(o){return n.add(o),()=>n.delete(o)}}}function _i(e,t,n){return{position:t,total:n,hasPrevious:t>0,hasNext:t+1<n,previous:()=>e.previous(),next:()=>e.next(),first:()=>e.first(),last:()=>e.last(),goTo:o=>e.goTo(o)}}const Pt={query:"",status:"idle",hits:[],set:null},Hn={status:"idle",error:null,manifest:null,collection:null,throughCollection:false,canvasId:null,target:null,annotationId:null,hiddenSets:[],shownSets:[],addedSets:[],search:Pt,regions:null,targets:null,targetIndex:null};function pi(e={}){const t=di(Hn),n=Se(null),o=Se(null),r=Se(null),s=Se(null),i=Se(null),a=Se(null);let c=null,l=null,d=[],u=[],p=[],h=0,y=null,P=null,O=null;const k=(f,_)=>{!P||f===_||(P={...P,items:P.items.map(v=>v.manifestId===f&&v.manifestAs!==_?{...v,manifestAs:_}:v)})},S=f=>{var v;const _=(v=t.get().manifest)==null?void 0:v.id;return!!_&&(_===f.manifestId||_===f.manifestAs)},b=()=>d.length||u.length||p.length?[...d,...u,...p]:Hn.addedSets;let A=e.request,E=null;const j=new Set;let W="view",V=0;const ee=(f,_,v)=>{if(j.has(v))return;j.add(v);const m=E==null?void 0:E.signal;ai(v,f,A,m).then(g=>{m!=null&&m.aborted||t.set(x=>x.manifest?{manifest:ui(x.manifest,f,_,g)}:{})}).catch(()=>j.delete(v))},te=()=>{const{manifest:f,canvasId:_}=t.get();if(f)for(const[v,m,g]of Fn(W==="all"||V>0?D(f).canvases:$e(f,_)))ee(v,m,g)};t.subscribe(te);const B=(f,_,v,m,g)=>{var Zt,Yt,Xt;const{canvases:x}=D(f),T=we=>!!we&&x.some(cr=>cr.id===we),w=Rs(f),M=T(v==null?void 0:v.canvasId)?v:T(w==null?void 0:w.canvasId)?w:null,F=T(m.canvasId)?m.canvasId:(M==null?void 0:M.canvasId)??(T(m.defaultCanvasId)?m.defaultCanvasId:null)??((Zt=x[0])==null?void 0:Zt.id)??null;l==null||l.abort();const q=g&&((Yt=dt(p,g))==null?void 0:Yt.canvasId)===F?g:null,re=M&&q?{...M,region:void 0}:M,ze=++h;d=[],t.set({status:"ready",search:Pt,regions:null,manifest:f,collection:_,canvasId:F,target:re&&re.canvasId===F?re:null,addedSets:b(),annotationId:q,targets:P});const Gt=f==null?void 0:f.structures;Array.isArray(Gt)&&JSON.stringify(Gt).includes("xywh=")&&import("./range-regions-DssQTTra.mjs").then(({contentsSet:we})=>{h===ze&&t.set({regions:we(f)})}),Bs(f)&&import("./image-layers-CFarmTfZ.mjs").then(({imageLayers:we})=>{h===ze&&(d=we(f),t.set({addedSets:b()}))}),F&&F!==m.canvasId&&((Xt=e.onCanvasChange)==null||Xt.call(e,F))},z=(f,_)=>t.set(v=>{const m=v.hiddenSets.filter(x=>x!==f),g=v.shownSets.filter(x=>x!==f);return _?{hiddenSets:m,shownSets:[...g,f]}:{hiddenSets:[...m,f],shownSets:g}}),le=(f,_)=>{var m,g,x;if(!f)return;if((m=e.isControlled)!=null&&m.call(e)){_&&t.set({target:_}),(g=e.onCanvasChange)==null||g.call(e,f);return}const v=t.get().canvasId!==f;t.set({canvasId:f,target:_}),v&&((x=e.onCanvasChange)==null||x.call(e,f))},ue=(f,_=false)=>{const{manifest:v}=t.get(),m=Ls(v,f);le(m,m&&_?{canvasId:m,autoplay:_}:null)},Ae=()=>{const{manifest:f,canvasId:_}=t.get();return{at:Be(f,_),total:D(f).views.length}},ge=()=>{E==null||E.abort();const f=new AbortController;return E=f,j.clear(),t.set({status:"loading",error:null,annotationId:null}),f.signal},We=f=>t.set({status:"error",error:f instanceof Error?f:new Error(String(f))});async function Ve(f,_={}){var m;const v=ge();try{const g=await nr(f,{request:A,signal:v,manifestId:_.manifestId??void 0});if(v.aborted)return;const x=g.annotation,T=x?Vo({items:[x]},`${x.id}#content-state`):[];p=T.length?[{id:`${x.id}#content-state`,source:"added",entries:T}]:g.annotationSets??[];const w=y??((m=T[0])==null?void 0:m.id)??g.pick;y=null,t.set({throughCollection:!!g.collection}),P=g.targets??null,P&&k(P.items[0].manifestId,g.manifest.id),t.set({targetIndex:P?0:null}),B(g.manifest,g.collection??null,g.target,_,w)}catch(g){v.aborted||We(g)}}const ye=f=>{const{manifest:_,collection:v}=t.get();return(_==null?void 0:_.id)===f||(v==null?void 0:v.id)===f},Pe=f=>{var _;return(((_=t.get().collection)==null?void 0:_.items)??[]).find(v=>v.id===f)??{id:f,type:"Manifest"}},st=(f,_)=>{var v,m;if(y=_,(v=e.isManifestControlled)!=null&&v.call(e)){(m=e.onManifestChange)==null||m.call(e,f);return}be({id:f,type:"Manifest"}).then(g=>{var x;return g&&((x=e.onManifestChange)==null?void 0:x.call(e,f))})},be=async(f,_)=>{if(f.type==="Collection")return await Ve(f.id),t.get().status==="ready";const{collection:v}=t.get(),m=ge(),g=y;y=null;const x=g?dt(p,g):null,T=typeof _=="string"?{canvasId:_}:_??O;O=null;try{const w=await er(f,{request:A,signal:m});return m.aborted?false:(k(f.id,w.id),B(w,v,x?{canvasId:x.canvasId}:T??void 0,{},g),true)}catch(w){return m.aborted||We(w),false}};return{store:t,viewport:n,media:o,captions:r,highlight:s,chapter:i,found:a,get request(){return A},setRequest(f){A=f},load:Ve,async openCollection(f){var v;const _=t.get().manifest;if(!(!_||((v=t.get().collection)==null?void 0:v.id)===f))try{const m=await ii(f,{request:A});if(m.type!=="Collection"||t.get().manifest!==_)return;t.set({collection:m})}catch{}},async goToManifest(f,_){var m,g,x;if(ye(f))return;const v=Pe(f);if(v.type!=="Collection"&&((m=e.isManifestControlled)!=null&&m.call(e))){(g=e.onManifestChange)==null||g.call(e,f);return}await be(v,_)&&((x=e.onManifestChange)==null||x.call(e,t.get().manifest.id))},goToTarget(f){var m,g,x;const _=(m=t.get().targets)==null?void 0:m.items[f];if(!_)return;t.set({targetIndex:f});const v=_.canvasId?{canvasId:_.canvasId,..._.region&&{region:_.region},..._.time!==void 0&&{time:_.time}}:null;if(S(_)){v&&le(v.canvasId,v);return}if((g=e.isManifestControlled)!=null&&g.call(e)){O=v,(x=e.onManifestChange)==null||x.call(e,_.manifestId);return}be(Pe(_.manifestId),v??void 0).then(T=>{var w;return T&&((w=e.onManifestChange)==null?void 0:w.call(e,_.manifestId))})},async syncManifest(f){!f||ye(f)||t.get().status!=="ready"||await be(Pe(f))},goTo(f,_){le(f,_?{..._,canvasId:f}:null)},next({autoplay:f=false,wrap:_=false}={}){const{at:v,total:m}=Ae();v+1<m?ue(v+1,f):_&&m>1&&ue(0,f)},previous(){const{at:f}=Ae();f>0&&ue(f-1)},first(){ue(0)},last(){ue(Ae().total-1)},consumeTarget(){t.set({target:null})},syncCanvas(f){f&&t.set({canvasId:f})},selectAnnotation(f){const{manifest:_,addedSets:v,canvasId:m,search:g,regions:x}=t.get(),T=dt(Js(_,v,g.set,x),f);if(t.set({annotationId:T?f:null}),!T)return;a.emit(f);const{hiddenSets:w,shownSets:M}=t.get();T.setId!==Wo&&Go(_,v,w,M).includes(T.setId)&&z(T.setId,true);const F=$e(_,m).some(ze=>ze.id===T.canvasId),q=je(_,T.canvasId)!==null;!F&&q&&le(T.canvasId,null);const re=q?void 0:Gs(T.annotation);re&&st(re,T.id)},async search(f){l==null||l.abort();const _=fi(t.get().manifest),v=f.trim();if(!v||!_){l=null,t.set({search:Pt,annotationId:null});return}const m=new AbortController;l=m,t.set(g=>({search:{...g.search,query:v,status:"loading"}}));try{const{searchInto:g}=await import("./search-C45Jd7QH.mjs");await g(t,_,v,A,m.signal)}catch{t.set({search:{query:v,status:"error",hits:[],set:null}})}},setSetVisible(f,_){z(f,_)},async loadAnnotations(f){if(c==null||c.abort(),!f){u=[],t.set({addedSets:b()});return}const _=new AbortController;c=_;try{const{loadAnnotationSets:v}=await import("./annotation-collection-Dc-peX7w.mjs"),m=await v(f,{request:A,signal:_.signal});if(_.signal.aborted)return;u=m,t.set({addedSets:b()})}catch{}},getContentState(){var F;const{manifest:f,canvasId:_}=t.get();if(!f||!_)return null;const v=n.get(),m=o.get(),g=m&&m.currentTime>0?m.currentTime:null,x=$e(f,_),w=v&&x.some(q=>q.id===v.canvasId)&&!g?v:null,M=(w==null?void 0:w.canvasId)??_;return Yo({manifestId:f.id,canvasId:M,type:(F=x.find(q=>q.id===M))==null?void 0:F.type,region:w==null?void 0:w.region,time:g})},setAnnotationPages(f){f!==W&&(W=f,te())},fetchAnnotationPages(f){const{manifest:_}=t.get();if(!_||!f.length)return;const v=new Set(f);for(const[m,g,x]of Fn(D(_).canvases))v.has(x)&&ee(m,g,x)},holdAllAnnotationPages(){V++,te();let f=true;return()=>{f&&V--,f=false}},dispose(){E==null||E.abort(),c==null||c.abort(),l==null||l.abort()}}}function vi(e){const t=oe(mi,gi);return!!e||t}const la=e=>e?{"data-high-contrast":""}:{},hi="(prefers-contrast: more)",rr=()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia(hi):null;function mi(e){var n;const t=rr();return(n=t==null?void 0:t.addEventListener)==null||n.call(t,"change",e),()=>{var o;return(o=t==null?void 0:t.removeEventListener)==null?void 0:o.call(t,"change",e)}}const gi=()=>{var e;return!!((e=rr())!=null&&e.matches)};function yi({clover:e,language:t}){const{t:n,langOf:o}=Fo(),[r,s]=K(null),i=H(n);return i.current=n,U(()=>{let a=null;return e.store.subscribe(()=>{const{manifest:c,canvasId:l,status:d}=e.store.get();if(d!=="ready"||l===a)return;const u=a===null;if(a=l,u)return;const p=je(c,l),h=Do(p==null?void 0:p.label,t),y=i.current("canvasPosition",{index:Be(c,l)+1,total:D(c).views.length});s({label:h.text,lang:h.lang,position:y})})},[e,t]),R("div",{className:"clover-announcer",role:"status","aria-live":"polite","aria-atomic":"true",style:Fs,children:[r!=null&&r.label?R(Q,{children:[R("span",{...Sn(r.lang),children:r.label}),","," "]}):null,r&&R("span",{...Sn(o("canvasPosition")),children:r.position})]})}const bi=100;function wi(e,t){const n=H({read:e,onChange:t});n.current={read:e,onChange:t};const o=H(void 0),r=H("");return U(()=>()=>{clearTimeout(o.current),o.current=void 0},[]),ce(()=>{!n.current.onChange||o.current!==void 0||(o.current=setTimeout(()=>{var i,a;o.current=void 0;const s=n.current.read();!s||s.encoded===r.current||(r.current=s.encoded,(a=(i=n.current).onChange)==null||a.call(i,s))},bi))},[])}function Dn(e,t){return e==null||e.addEventListener("pause",t),e==null||e.addEventListener("seeked",t),()=>{e==null||e.removeEventListener("pause",t),e==null||e.removeEventListener("seeked",t)}}function Si(e,t){const n=wi(()=>e.getContentState(),t),o=!!t;U(()=>{if(!o)return;let r=e.store.get().canvasId;const s=e.store.subscribe(()=>{const l=e.store.get().canvasId;l!==r&&(r=l,n())}),i=e.viewport.subscribe(n);let a=Dn(e.media.get(),n);const c=e.media.subscribe(l=>{a(),a=Dn(l,n)});return n(),()=>{s(),i(),c(),a()}},[e,o,n])}function ua(e){return e.flatMap(t=>bs(t).map(({body:n})=>n))}function fa(e,t){if(!(e!=null&&e.length)||!t.canvases.length)return null;const n=t.canvases.map(r=>r.id),o=t.bodies.map(r=>r==null?void 0:r.format).filter(Boolean);return e.find(r=>{var s,i,a;return((s=r.canvasId)==null?void 0:s.some(c=>n.includes(c)))||((i=r.format)==null?void 0:i.some(c=>o.includes(c)))||!!((a=r.match)!=null&&a.call(r,t))})??null}function Ci(e,t){return e===t?true:!e||!t||e.length!==t.length?false:e.every((n,o)=>n.component===t[o].component&&n.match===t[o].match&&JSON.stringify([n.canvasId,n.format])===JSON.stringify([t[o].canvasId,t[o].format]))}function xi({iiifContent:e,canvasId:t,defaultCanvasId:n,onCanvasChange:o,onStatusChange:r,manifestId:s,defaultManifestId:i,onManifestChange:a,searchQuery:c,request:l,language:d,renderers:u,annotations:p,annotationPages:h="view",onContentStateChange:y,...P}){const O=t!==void 0,k=s!==void 0,S=H({controlled:O,manifestControlled:k,onCanvasChange:o,onStatusChange:r,onManifestChange:a});S.current={controlled:O,manifestControlled:k,onCanvasChange:o,onStatusChange:r,onManifestChange:a};const[b]=K(()=>pi({request:l,onCanvasChange:w=>{var M,F;return(F=(M=S.current).onCanvasChange)==null?void 0:F.call(M,w)},onManifestChange:w=>{var M,F;return(F=(M=S.current).onManifestChange)==null?void 0:F.call(M,w)},isControlled:()=>S.current.controlled,isManifestControlled:()=>S.current.manifestControlled}));b.setRequest(l);const A=H({});A.current={canvasId:t,defaultCanvasId:n,manifestId:s??i};const E=ms(l),j=H(e);j.current=e;const W=Ii(e);U(()=>(b.load(j.current,A.current),()=>b.dispose()),[b,W,E]),U(()=>{O&&b.syncCanvas(t??null)},[b,O,t]);const[V,ee]=K(b.store.get().status);U(()=>{let w=b.store.get().status;return b.store.subscribe(()=>{var q,re;const{status:M,error:F}=b.store.get();M!==w&&(w=M,ee(M),(re=(q=S.current).onStatusChange)==null||re.call(q,M,F))})},[b]);const te=H(p);te.current=p;const B=Oi(p);U(()=>{b.loadAnnotations(te.current??null)},[b,B,E]),U(()=>{b.setAnnotationPages(h)},[b,h]),Si(b,y),U(()=>{k&&V==="ready"&&b.syncManifest(s??null)},[b,k,s,V]);const z=ki(b,w=>{var M;return w.status==="ready"?((M=w.manifest)==null?void 0:M.id)??null:null});U(()=>{c&&z&&b.search(c)},[b,c,z]);const le=H(u);Ci(le.current,u)||(le.current=u);const ue=le.current,[Ae,ge]=K(),[We,Ve]=K(d);We!==d&&(Ve(d),ge(void 0));const ye=H(void 0),[Pe,st]=K(W);Pe!==W&&(st(W),ge(void 0)),U(()=>()=>{const w=ye.current;ye.current=void 0,w&&L.chosenLanguage===w&&L.chooseInterfaceLanguage()},[W]);const be=oe(L.subscribe,()=>L.chosenLanguage),f=Ae??d??be,_=ce(w=>{ge(w);const M=L.stringsFor(w);ye.current=M,M&&L.chooseInterfaceLanguage(M)},[]),[v,m]=K(0),g=ce(()=>(m(w=>w+1),()=>m(w=>w-1)),[]),x=v>0;return[he(()=>({clover:b,language:f,renderers:ue,chooseLanguage:_,toggleDrawn:x,drawsToggle:g}),[b,f,ue,_,x,g]),V,P]}function ki(e,t){return oe(e.store.subscribe,()=>t(e.store.get()))}function Oi(e){const t=Array.isArray(e)?e:e?[e]:[];return JSON.stringify(t.map(n=>typeof n=="string"?n:(n==null?void 0:n.id)??"object"))}function Ii(e){return typeof e=="string"?e:e.id??e["@id"]??e}const pt=new Map;function da(e,t){const n=ss(),o=H(t);o.current=t,U(()=>e?sr(n,o):void 0,[e,n])}function sr(e,t){for(const[n,o]of[...pt])n!==e&&o.current();return pt.set(e,t),()=>{pt.delete(e)}}let Ai=0;const Pi=e=>sr(`page-${Ai+=1}`,{current:e}),jn=new WeakMap;function Mi(e,t){const[n,o]=K(()=>jn.get(e)??null);return U(()=>{if(!t||n)return;let r=true;return e().then(s=>{jn.set(e,s),r&&o(()=>s)},()=>{}),()=>{r=false}},[e,t,n]),n}function _a(e){const t=Math.max(0,Math.floor(e||0)),n=Math.floor(t/3600),o=Math.floor(t%3600/60),r=String(t%60).padStart(2,"0");return n?`${n}:${String(o).padStart(2,"0")}:${r}`:`${o}:${r}`}function pa(e,t){var n;if(e.currentTime=t,!!e.paused)try{(n=e.play())==null||n.catch(()=>{})}catch{}}function Jt(e){if(!e)return;const[t,n]=e.split(","),o=Number(t);if(t===""||Number.isNaN(o))return;if(n===void 0||n==="")return{start:o};const r=Number(n);return Number.isNaN(r)?{start:o}:{start:o,end:r}}function Kt(e){if(typeof e=="string")return Bn(e);const t=e;return(t==null?void 0:t.type)==="SpecificResource"?t:typeof(t==null?void 0:t.id)=="string"?Bn(t.id):t}const Bn=e=>e.replace(/\/((?:t|xywh)=[^/#]*)$/,"#$1");function ir(e){const t=I(e.thumbnail)[0];return t&&typeof t=="object"?{thumbnail:t}:{}}const Wn=new WeakMap,Vn=[];function Ei(e,t,n){if(!e||!t)return Vn;let o=Wn.get(e);o||Wn.set(e,o=new Map);const r=`${t}|${n??""}`,s=o.get(r);if(s)return s;const i=[],a=new Set,c=d=>{if(!d||a.has(d.id??d))return;a.add(d.id??d);const u=!I(d.behavior).includes("no-nav");for(const p of I(d.items)){if((p==null?void 0:p.type)==="Range"){c(p);continue}if(!u)continue;const h=rt(Kt(p));if(h.id.split("#")[0]!==t)continue;const y=Jt(h.t);y&&i.push({...d.id?{id:d.id}:{},label:d.label,...y,...ir(d)})}};for(const d of I(e.structures))c(d);i.sort((d,u)=>d.start-u.start);const l=i.length?i.map((d,u)=>{var p;return{...d,end:d.end??((p=i[u+1])==null?void 0:p.start)??n}}):Vn;return o.set(r,l),l}const zn=new WeakMap,qn=[];function ar(e){if(!e)return qn;const t=zn.get(e);if(t)return t;const n=new Map(I(e.items).map((c,l)=>[c==null?void 0:c.id,l])),o=new Set,r=c=>{var S,b;if(!c||o.has(c.id??c))return[];o.add(c.id??c);const l=[],d=[],u=[];let p;for(const A of I(c.items))if((A==null?void 0:A.type)==="Range"){const E=r(A);l.push(...E),E.forEach(j=>d.push(...j.canvasIds))}else{const E=rt(Kt(A));if(!E.id)continue;p??(p=E),d.push(E.id),u.push(E)}const h=I(c.behavior);if(h.includes("no-nav"))return l;const y=p??void 0,P={id:c.id??`range-${o.size}`,label:c.label,canvasId:(y==null?void 0:y.id)??((S=l[0])==null?void 0:S.canvasId),canvasIds:[...new Set(d)],...h.includes("sequence")?{sequence:true}:{},...ir(c),children:l},O=Jt(y==null?void 0:y.t);return O?P.time=O:!y&&((b=l[0])!=null&&b.time)&&(P.time=l[0].time),y!=null&&y.rect&&(P.region=y.rect),(h.includes("sequence")&&u.length>1&&!u.some(A=>A.t)||Ti(u,n))&&(P.parts=u.map(A=>({canvasId:A.id,...A.rect?{region:A.rect}:{}}))),[P]},s=I(e.structures).flatMap(r),i=s.length===1&&s[0].children.length?s[0].children:s,a=i.length?i:qn;return zn.set(e,a),a}function Ti(e,t){return!e.length||e.some(n=>n.t)?false:e.some(n=>n.rect)?true:e.some((n,o)=>o>0&&t.get(n.id)!==(t.get(e[o-1].id)??NaN)+1)}function $i(e,t,n,o){let r=null,s=null;const i=(l,d,u)=>!l||u>l.depth||u===l.depth&&!(l.sequence&&d.sequence),a=(l,d,u)=>{const p=u||l.id===o;if(t&&l.canvasIds.includes(t)&&(!l.time||n!==void 0&&n>=l.time.start&&(l.time.end===void 0||n<l.time.end))){const y={id:l.id,depth:d,...l.sequence?{sequence:true}:{}};i(r,l,d)&&(r=y),p&&i(s,l,d)&&(s=y)}l.children.forEach(h=>a(h,d+1,p))};e.forEach(l=>a(l,0,false));const c=s??r;return c?c.id:null}const va=Object.freeze(Object.defineProperty({__proto__:null,chaptersOf:Ei,currentContents:$i,parseTime:Jt,rangeItemTarget:Kt,tableOfContents:ar},Symbol.toStringTag,{value:"Module"}));Oe(31,"components/Label/Label","@layer clover{.clover-label{text-wrap:balance}}");Oe(32,"components/Status/Status","@layer clover{.clover-status{margin:0;padding:var(--clover-space-m);color:var(--clover-color-primary-muted, #26292b)}.clover-status[data-status=loading]{display:flex}.clover-status[data-status=error] p{margin:0}.clover-status-detail{font-size:var(--clover-text-s)}}");const ha=()=>import("./controls-BibZpBh1.mjs"),Ni=()=>import("./renderers-BL-b8snn.mjs");function ma(e){Z(()=>()=>e==null?void 0:e(null),[e])}function Li(e,t,n){const o=()=>e.store.get();return{get state(){return o()},subscribe(r){return e.store.subscribe(()=>r(o()))},get language(){return t()},status(){const{status:r,error:s}=o();return{status:r,error:s}},manifest(){return o().manifest},sequence(){return D(o().manifest)},visibleCanvases(){return $e(o().manifest,o().canvasId)},activeCanvas(){return je(o().manifest,o().canvasId)},navigation(){const{manifest:r,canvasId:s}=o();return _i(e,Be(r,s),D(r).views.length)},annotationPages(){return Fe(o().manifest,o().addedSets)},annotationSets(){return Fe(o().manifest,o().addedSets)},annotationCollection(){return Vs(o().manifest,o().addedSets)},contents(){return ar(o().manifest)},localize(r){return Do(r,t())},t(r,s){return L.t(r,s,Y)},langOf(r){return L.langOf(r,n(),Y)},oneOpen(r){return Pi(r)}}}function Ri(e,t,n){return Object.defineProperties(Object.create(e),Object.getOwnPropertyDescriptors(Li(e,t,n)))}const Fi=De(null);function Ui({hosted:e,props:t,children:n}){const o=Mi(Ni,!!t.renderers);return!t.iiifContent||t.renderers&&!o?null:R(Hi,{element:e.element,props:t,toRenderers:o==null?void 0:o.toRenderers,children:n})}function Hi({element:e,props:t,toRenderers:n,children:o}){const{canvasId:r,manifestId:s,lang:i,highContrast:a,onReady:c,renderers:l,...d}=t,u=vi(a),p=xs(void 0,i);p.ref(e);const h=he(()=>n==null?void 0:n(l),[n,l]),[y,P]=xi({...d,defaultCanvasId:r,defaultManifestId:s,renderers:h}),{clover:O,language:k}=y,S=H({language:k,host:p.hostLanguage});S.current={language:k,host:p.hostLanguage};const b=he(()=>Ri(O,()=>S.current.language,()=>S.current.host),[O]);return Z(()=>(c==null||c(b),()=>c==null?void 0:c(null)),[b,c]),Jn(O,r,A=>O.goTo(A)),Jn(O,s,A=>void O.goToManifest(A)),Z(()=>(e.classList.add("clover-root"),()=>e.classList.remove("clover-root")),[e]),Z(()=>{e.setAttribute("data-status",P)},[e,P]),Z(()=>(e.toggleAttribute("data-high-contrast",u),()=>e.removeAttribute("data-high-contrast")),[e,u]),Z(()=>()=>e.removeAttribute("data-status"),[e]),R(ot.Provider,{value:y,children:R(Vt.Provider,{value:p.hostLanguage,children:R(Fi.Provider,{value:b,children:[o,jt(R(yi,{clover:O,language:k}),e)]})})})}function Jn(e,t,n){const o=H(t);U(()=>{t&&t!==o.current&&n(t),o.current=t},[e,t])}const ga=Object.freeze(Object.defineProperty({__proto__:null,RootElement:Ui},Symbol.toStringTag,{value:"Module"}));export{jt as $,H as A,Jt as B,oe as C,Tr as D,pa as E,D as F,Bi as G,Gs as H,to as I,ea as J,ar as K,$i as L,na as M,fi as N,pr as O,Ye as P,De as Q,Vi as R,Ki as S,he as T,I as U,ca as V,Wo as W,Yn as X,L as Y,aa as Z,Z as _,Fo as a,Zi as a0,Ji as a1,je as a2,qi as a3,vs as a4,hs as a5,xs as a6,vi as a7,Os as a8,wi as a9,ms as aA,Ds as aB,Kt as aC,Vo as aD,ke as aE,ci as aF,Ws as aG,_t as aH,me as aI,Fi as aJ,ii as aK,$s as aL,Uo as aM,Hs as aN,nr as aO,Wi as aP,zi as aQ,ia as aR,va as aS,ga as aT,Dn as aa,la as ab,Vt as ac,ys as ad,rt as ae,Ho as af,Yi as ag,da as ah,bs as ai,ta as aj,_i as ak,Vs as al,Be as am,_a as an,xi as ao,yi as ap,ot as aq,Qi as ar,Js as as,Ei as at,sa as au,Xi as av,qo as aw,er as ax,ps as ay,Yo as az,ss as b,Gi as c,K as d,Ss as e,Mi as f,Ni as g,ma as h,ha as i,Si as j,Q as k,Sn as l,fa as m,$e as n,Go as o,ua as p,ce as q,oa as r,ra as s,Do as t,R as u,Fs as v,dt as w,pe as x,U as y,Lr as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{F as n}from"./shared-
|
|
1
|
+
import{F as n}from"./shared-D2pvbPvF.mjs";function f(a,e){const s=a.store.get().manifest;if(e.canvasId&&n(s).canvases.some(t=>t.id===e.canvasId))a.goTo(e.canvasId);else if(e.manifestId&&e.manifestId!==(s==null?void 0:s.id))a.goToManifest(e.manifestId,e.canvasId);else return false;return true}export{f as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as l}from"./imageService-
|
|
1
|
+
import{i as l}from"./imageService-CCKieCxo.mjs";function s(t,g,e){const a=(h,d)=>Math.min(Math.max(Math.round(h),0),d),m=e?a(e.x*t.width,t.width-1):0,w=e?a(e.y*t.height,t.height-1):0,i={x:m,y:w,width:e?Math.max(1,a(e.width*t.width,t.width-m)):t.width,height:e?Math.max(1,a(e.height*t.height,t.height-w)):t.height},x=i.width===t.width&&i.height===t.height;if(!x&&!t.regionByPx)return null;if(t.sizeByW){let h=Math.min(1,g/Math.max(i.width,i.height));return t.maxWidth&&(h=Math.min(h,t.maxWidth/i.width)),t.maxHeight&&(h=Math.min(h,t.maxHeight/i.height)),t.maxArea&&(h=Math.min(h,Math.sqrt(t.maxArea/(i.width*i.height)))),l(t,i,Math.max(1,Math.floor(i.width*h)),Math.max(1,Math.floor(i.height*h)))}if(!x)return null;const M=[...t.sizes].sort((h,d)=>h.width-d.width),r=M.find(h=>Math.max(h.width,h.height)>=g)??M.at(-1)??{width:t.width,height:t.height};return l(t,i,r.width,r.height)}export{s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var R=Object.defineProperty;var C=(n,e,t)=>e in n?R(n,e,{enumerable:true,configurable:true,writable:true,value:t}):n[e]=t;var w=(n,e,t)=>C(n,typeof e!="symbol"?e+"":e,t);import{_ as p,C as H,a as B,d as F,A as Z,u as _}from"./shared-
|
|
1
|
+
var R=Object.defineProperty;var C=(n,e,t)=>e in n?R(n,e,{enumerable:true,configurable:true,writable:true,value:t}):n[e]=t;var w=(n,e,t)=>C(n,typeof e!="symbol"?e+"":e,t);import{_ as p,C as H,a as B,d as F,A as Z,u as _}from"./shared-D2pvbPvF.mjs";import{r as M,w as $,c as A,l as q,t as G,n as j,h as D,a as J}from"./splitting-BnQUxxgH.mjs";import{T as Q}from"./Tip-Dv-gYN8n.mjs";import"./styles-Bf3qmdsh.mjs";class U{constructor(e){w(this,"sizes");w(this,"listeners",new Set);w(this,"subscribe",e2=>(this.listeners.add(e2),()=>{this.listeners.delete(e2)}));this.storageKey=e,this.sizes=M(e)}keyed(e){e!==this.storageKey&&(this.storageKey=e,this.sizes=M(e),this.listeners.forEach(t=>t()))}set(e,t){const o={...this.sizes};t===void 0?delete o[e]:o[e]=Math.round(t),this.sizes=o,$(this.storageKey,o),this.listeners.forEach(l=>l())}}const P=new WeakMap;function S(n){let e=P.get(n);return e||(e=new U(n.getAttribute("storage-key")??void 0),P.set(n,e)),e}const V={},X=()=>()=>{},N=n=>{var e;return((e=n.parentElement)==null?void 0:e.localName)==="clover-split"?n.parentElement:null},v=n=>n==null||n.trim()===""?void 0:/^\d+(\.\d+)?$/.test(n.trim())?Number(n):n.trim();function W(n){const e={};for(const t of T(n))e[t.dataset.splitKey??""]={size:v(t.getAttribute("size")),min:v(t.getAttribute("min")),max:v(t.getAttribute("max"))};return e}const T=n=>[...n.children].filter(e=>e.localName==="clover-split-pane");function ie({hosted:n,props:e}){const t=n.element;return p(()=>(t.classList.add("clover-split"),()=>t.classList.remove("clover-split")),[t]),p(()=>{S(t).keyed(e.storageKey)},[t,e.storageKey]),null}function re({hosted:n,props:e}){const t=n.element,o=N(t),l=o?S(o):null,f=H((l==null?void 0:l.subscribe)??X,()=>(l==null?void 0:l.sizes)??V),h=v(e.size),i=v(e.min),c=v(e.max),u=e.name||String(o?T(o).indexOf(t):0),a=f[u];return p(()=>(t.classList.add("clover-split-pane"),()=>t.classList.remove("clover-split-pane")),[t]),p(()=>{t.dataset.splitKey=u,t.toggleAttribute("data-sized",h!==void 0),t.style.minWidth=A(i)??"0";const g=a!==void 0?`${a}px`:A(h);g?t.style.setProperty("--clover-split-size",g):t.style.removeProperty("--clover-split-size");const d=A(c);d?t.style.setProperty("--clover-split-max",d):t.style.removeProperty("--clover-split-max")},[t,u,h,i,c,a]),null}const K=new WeakMap;function oe({hosted:n}){const e=n.element,{t,langOf:o}=B(),[l]=F(()=>{const i=e.getAttribute("aria-label");return i!==null&&i!==K.get(e)?i:null}),f=l??t("splitHandle");p(()=>(e.classList.add("clover-split-handle"),e.setAttribute("role","separator"),e.setAttribute("aria-orientation","vertical"),e.hasAttribute("tabindex")||(e.tabIndex=0),()=>e.classList.remove("clover-split-handle")),[e]),p(()=>{if(l)return;e.setAttribute("aria-label",f),K.set(e,f);const i=o("splitHandle");i?e.setAttribute("lang",i):e.removeAttribute("lang")},[e,l,f,o]);const h=Z(null);return p(()=>{const i=N(e);if(!i)return;const c=S(i),y=s=>Math.round(s/(i.clientWidth||1)*100),u=(s,r)=>{e.setAttribute("aria-valuenow",String(y(s))),e.setAttribute("aria-valuemin",String(y(r.min))),e.setAttribute("aria-valuemax",String(y(r.max)))},a=()=>q(e,i,W(i)),g=s=>{const r=a();if(!r)return;const z=Math.min(r.max,Math.max(r.min,s));c.set(r.key,z),u(z,r)};h.current={limits:a,resize:g,step:()=>{var L;const s=a();if(!s)return;const r=G((L=W(i)[s.key])==null?void 0:L.size,i.clientWidth),z=j(s,r,c.sizes[s.key]);if(!z.own)return g(z.to);c.set(s.key,void 0),u(r,s)}};const d=()=>{const s=a();s&&u(s.sized.getBoundingClientRect().width,s)};d();const b=typeof ResizeObserver>"u"?null:new ResizeObserver(d);b==null||b.observe(i);const I=c.subscribe(()=>requestAnimationFrame(d));let x=false;const k=()=>{var r;const s=!!((r=J(e).sized)!=null&&r.hidden);s&&!e.hidden?e.hidden=x=true:!s&&x&&(x=false,e.hidden=false)};k();const E=new MutationObserver(()=>{k(),d()});E.observe(i,{attributes:true,subtree:true,attributeFilter:["hidden","data-sized"]});const m=D(()=>e,()=>h.current),O=[["pointerdown",s=>m.down(s)],["pointermove",s=>m.move(s)],["pointerup",s=>m.up(s)],["pointercancel",s=>m.up(s)],["click",s=>m.click(s)],["keydown",s=>m.key(s)]];for(const[s,r]of O)e.addEventListener(s,r);return()=>{for(const[s,r]of O)e.removeEventListener(s,r);m.dispose(),b==null||b.disconnect(),E.disconnect(),I()}},[e]),_(Q,{label:f})}export{ie as SplitElement,oe as SplitHandleElement,re as SplitPaneElement};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as o}from"./shared-
|
|
1
|
+
import{u as o}from"./shared-D2pvbPvF.mjs";import{S as m}from"./Status-C49DxNaY.mjs";import{a,C as i}from"./nodes-nZmQ93ib.mjs";function u({hosted:r,props:t}){const e=a(r.element,"loading"),n=a(r.element,"error");return o(m,{...t,loading:e?o(i,{of:e}):t.loading,error:n?()=>o(i,{of:n}):void 0})}export{u as StatusElement};
|