@nulib/clover 4.0.0 → 4.1.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/Body/Body.mjs +16 -1
- package/dist/components/Body/glyphs.mjs +15 -0
- package/dist/components/Canvas/CanvasView.mjs +116 -12
- package/dist/components/Canvas/ChaptersMenu.mjs +105 -0
- package/dist/components/Canvas/ControlMenu.mjs +23 -4
- package/dist/components/Canvas/Controls.mjs +223 -60
- package/dist/components/Canvas/ControlsFade.mjs +16 -0
- package/dist/components/Canvas/ImageControls.mjs +209 -0
- package/dist/components/Canvas/Placeholder.mjs +44 -12
- package/dist/components/Canvas/RowFits.mjs +85 -0
- package/dist/components/Canvas/layout.mjs +11 -0
- package/dist/components/Canvas/media/MediaBody.mjs +105 -46
- package/dist/components/Canvas/media/Player.mjs +0 -55
- package/dist/components/Canvas/media/Transport.mjs +14 -23
- package/dist/components/Canvas/panClearOfControls.mjs +1 -1
- package/dist/components/Collection/Collection.mjs +1 -1
- package/dist/components/Items/CountMenu.mjs +1 -0
- package/dist/components/Items/Item.mjs +4 -3
- package/dist/components/Items/Items.mjs +30 -10
- package/dist/components/Items/PagerLayout.mjs +2 -0
- package/dist/components/Items/TargetItems.mjs +1 -1
- package/dist/components/Items/masonry.mjs +35 -0
- package/dist/components/Panel/About.mjs +25 -8
- package/dist/components/Root/useRootState.mjs +2 -49
- package/dist/components/Scene/SceneView.mjs +13 -2
- package/dist/components/Scene/cloverEngine.mjs +2 -1
- package/dist/components/Timeline/playerSurface.mjs +2 -0
- package/dist/core/clover.mjs +7 -4
- package/dist/core/content-state.mjs +5 -3
- 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/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/index.d.mts +109 -51
- package/dist/lib/gltf/load.mjs +26 -6
- package/dist/lib/renderer/CanvasRenderer.mjs +44 -32
- package/dist/lib/renderer/camera/Camera.mjs +1 -1
- package/dist/react/useContentStateOutput.mjs +71 -0
- package/dist/styles.css +1 -1
- package/dist/templates/default/Default.mjs +37 -128
- package/dist/templates/document/Document.mjs +41 -64
- package/dist/templates/document/Sheets.mjs +13 -5
- package/dist/templates/gallery/Gallery.mjs +90 -18
- package/dist/templates/index.d.mts +299 -17
- package/dist/templates/shared/Lightbox.mjs +161 -69
- package/dist/templates/shared/LightboxView.mjs +118 -0
- package/dist/templates/shared/PanelPane.mjs +104 -0
- package/dist/templates/{document/DocumentPanel.mjs → shared/PanelPart.mjs} +2 -2
- package/dist/templates/shared/dragToClose.mjs +51 -8
- package/dist/templates/shared/givenAnnotations.mjs +13 -0
- package/dist/templates/shared/useDragToClose.mjs +6 -3
- package/dist/templates/shared/useLazyPanelPane.mjs +16 -0
- package/dist/templates/shared/useSlide.mjs +6 -0
- package/dist/templates.css +1 -1
- package/dist/ui/ControlCluster.mjs +15 -17
- package/dist/ui/Sections.mjs +3 -3
- package/dist/ui/mediaIcons.mjs +35 -8
- package/dist/ui/useScrollTrack.mjs +2 -1
- package/dist/web-components/About-DvyvVUK5.mjs +1 -0
- package/dist/web-components/AnnotationItems-BpRcSrOM.mjs +1 -0
- package/dist/web-components/{AnnotationMenu-BCwwwfbb.mjs → AnnotationMenu-BDPec3iI.mjs} +1 -1
- package/dist/web-components/{AnnotationState-CavxnAAq.mjs → AnnotationState-Chs_37Kk.mjs} +1 -1
- package/dist/web-components/{Annotations-DDjSrBL5.mjs → Annotations-6E-oD_wg.mjs} +1 -1
- package/dist/web-components/{Annotations-rBmeI5sR.mjs → Annotations-CLPEq7Ro.mjs} +1 -1
- package/dist/web-components/Body-Ct61yxI7.mjs +1 -0
- package/dist/web-components/{BodyAlert-COKp19lq.mjs → BodyAlert-C_Qh3Up_.mjs} +1 -1
- package/dist/web-components/{Button-DLFYqtz9.mjs → Button-L8ZMy5lY.mjs} +1 -1
- package/dist/web-components/{Camera-Cp5ma-6C.mjs → Camera-BPyLzZjP.mjs} +1 -1
- package/dist/web-components/{Canvas2DBackend-3PToh87Z.mjs → Canvas2DBackend-8wFavYdl.mjs} +1 -1
- package/dist/web-components/CanvasView-2Fj9nT06.mjs +2 -0
- package/dist/web-components/CaptionDetails-DuwS-grE.mjs +1 -0
- package/dist/web-components/ChaptersMenu-Bj2EqtVJ.mjs +1 -0
- package/dist/web-components/{Chevron-r-_hUPn8.mjs → Chevron-Cyr_cc9X.mjs} +1 -1
- package/dist/web-components/ChoiceMenu-ConzybVH.mjs +1 -0
- package/dist/web-components/Collection-CLayN8sv.mjs +1 -0
- package/dist/web-components/{CollectionSelect-CBWUbqQi.mjs → CollectionSelect-D2d8dGJ4.mjs} +1 -1
- package/dist/web-components/{Connected-B2d6EoFl.mjs → Connected-CBQ6xyhr.mjs} +1 -1
- package/dist/web-components/{Connected-BSRM9FJY.mjs → Connected-DMXG3imZ.mjs} +1 -1
- package/dist/web-components/{Connected-BnpxYeJN.mjs → Connected-pyd0EBD3.mjs} +1 -1
- package/dist/web-components/{Contents-D7FPxSH-.mjs → Contents-tCMXBYDK.mjs} +1 -1
- package/dist/web-components/ControlMenu-D1zkB0qX.mjs +1 -0
- package/dist/web-components/ControlsFade-BNXVTL_Q.mjs +1 -0
- package/dist/web-components/{CountMenu-DyTp_J4k.mjs → CountMenu-Dnzb7lKo.mjs} +1 -1
- package/dist/web-components/Cue-CUGmPS3k.mjs +1 -0
- package/dist/web-components/Document-D-8nalCX.mjs +1 -0
- package/dist/web-components/{DomLayers-CTGub6wo.mjs → DomLayers-BxPU05-D.mjs} +1 -1
- package/dist/web-components/{Download-BOYNIb7C.mjs → Download-Bku9Vptk.mjs} +1 -1
- package/dist/web-components/{EntryBodies-Bfd2Z42z.mjs → EntryBodies-77vDudCb.mjs} +1 -1
- package/dist/web-components/{EntryThumbnail-DQE8ajI9.mjs → EntryThumbnail-BxQWKW6e.mjs} +1 -1
- package/dist/web-components/{FieldPill-D5DNJWLy.mjs → FieldPill-nFGsaru9.mjs} +1 -1
- package/dist/web-components/FrameAnimation-BvKiSXcm.mjs +1 -0
- package/dist/web-components/Gallery-4Hd58afA.mjs +1 -0
- package/dist/web-components/{HideToggle-DL911R1Z.mjs → HideToggle-TEhY4TS4.mjs} +1 -1
- package/dist/web-components/ImageControls-CZO7WoPb.mjs +1 -0
- package/dist/web-components/Items-CudZ4Lnb.mjs +1 -0
- package/dist/web-components/Label-f07N5Fld.mjs +1 -0
- package/dist/web-components/{LanguageChoice-DT1UPiDn.mjs → LanguageChoice-B5VM21DV.mjs} +1 -1
- package/dist/web-components/LightboxView-C4OASmkg.mjs +1 -0
- package/dist/web-components/ListEnd-M39M62Cl.mjs +1 -0
- package/dist/web-components/{Loaded-BWfEBJyg.mjs → Loaded-oGFyBuos.mjs} +1 -1
- package/dist/web-components/LoadedCanvas-IvpSzPO6.mjs +1 -0
- package/dist/web-components/LoadedMap-WATGNLxl.mjs +1 -0
- package/dist/web-components/{Loading-zw74TdAz.mjs → Loading-YxuKrDAM.mjs} +1 -1
- package/dist/web-components/{Map--dJhk0_0.mjs → Map-Cw9j3gi3.mjs} +1 -1
- package/dist/web-components/MapView-3OxoCr5l.mjs +3 -0
- package/dist/web-components/Markup-DW75Jx3j.mjs +2 -0
- package/dist/web-components/MediaBody-CLtd0bf0.mjs +1 -0
- package/dist/web-components/MediaBody-JnKnoIqY.mjs +1 -0
- package/dist/web-components/{NavDate-BQHuyLOC.mjs → NavDate-BCCOyycx.mjs} +1 -1
- package/dist/web-components/{Navigator-B3U21_ti.mjs → Navigator-Bx4zS0Yr.mjs} +1 -1
- package/dist/web-components/{Pager-DnJknq92.mjs → Pager-B9GvQ64b.mjs} +1 -1
- package/dist/web-components/PagerLayout-BF33VZL_.mjs +1 -0
- package/dist/web-components/Panel-BvDpCn6K.mjs +1 -0
- package/dist/web-components/PanelPart-Bd4lSUrP.mjs +1 -0
- package/dist/web-components/{PanelToggle-CFtWIeWv.mjs → PanelToggle-bPcIULGZ.mjs} +1 -1
- package/dist/web-components/{PartOfManifest-F87jIrf9.mjs → PartOfManifest-HLg-r00O.mjs} +1 -1
- package/dist/web-components/{Pending-CYAQajKu.mjs → Pending-BxGjjnqq.mjs} +1 -1
- package/dist/web-components/PlaceBox-D-Zhe9-U.mjs +1 -0
- package/dist/web-components/Placeholder-DzY5hcbk.mjs +1 -0
- package/dist/web-components/{Position-BkWBRBfW.mjs → Position-TYnzcm8e.mjs} +1 -1
- package/dist/web-components/{Primitives-BmODPlnK.mjs → Primitives-C6VJXxZD.mjs} +1 -1
- package/dist/web-components/Provider-DyB0wpeO.mjs +1 -0
- package/dist/web-components/{ReadMore-BwGFsLS2.mjs → ReadMore-De_0T7lc.mjs} +1 -1
- package/dist/web-components/Root-Bt3NNBFb.mjs +1 -0
- package/dist/web-components/Scene-DrOM9YlD.mjs +1 -0
- package/dist/web-components/SceneView-DA7Yg20p.mjs +1 -0
- package/dist/web-components/{Search-CbmK9vLp.mjs → Search-DgT8OPsK.mjs} +1 -1
- package/dist/web-components/{Sections-Dy5_pkyQ.mjs → Sections-d1acn7qm.mjs} +2 -2
- package/dist/web-components/{StandaloneItems-BmUnBp0H.mjs → StandaloneItems-DUb4YKCB.mjs} +1 -1
- package/dist/web-components/{Status-Dww3Pyf4.mjs → Status-CcU3u6P4.mjs} +1 -1
- package/dist/web-components/{Steps-o_UprQfZ.mjs → Steps-nlSCzbDQ.mjs} +1 -1
- package/dist/web-components/{TargetItems-BBOGDubv.mjs → TargetItems-BDJM3Ar-.mjs} +1 -1
- package/dist/web-components/Timeline-BfdN3lIv.mjs +1 -0
- package/dist/web-components/{Tip-BbexILXs.mjs → Tip-OCB88zwY.mjs} +1 -1
- package/dist/web-components/{Transcript-ZVXM3ZDA.mjs → Transcript-bSA3cx_K.mjs} +1 -1
- package/dist/web-components/Transport-DaIhfZqC.mjs +1 -0
- package/dist/web-components/Transport-DjOYI-fR.mjs +1 -0
- package/dist/web-components/{annotation-collection-7SS1ELcO.mjs → annotation-collection-D8emkElk.mjs} +1 -1
- package/dist/web-components/{annotation-name-CYkZopdd.mjs → annotation-name-DbWjhgra.mjs} +1 -1
- package/dist/web-components/{annotations-content-Bdtn50sf.mjs → annotations-content-Bg6aVAGC.mjs} +1 -1
- package/dist/web-components/{body-CkOBHlJ0.mjs → body-Ct8dmQdW.mjs} +1 -1
- package/dist/web-components/canvas-goEZLqEd.mjs +1 -0
- package/dist/web-components/cloverEngine-Df7cMwOP.mjs +164 -0
- package/dist/web-components/{content-state-reader-Ahh6artg.mjs → content-state-reader-CNmBpG1L.mjs} +1 -1
- package/dist/web-components/{controls-BJrZVQkS.mjs → controls-BZr16sYQ.mjs} +1 -1
- package/dist/web-components/custom-elements.json +160 -44
- package/dist/web-components/{downloads-CqVWo-yn.mjs → downloads-EjJ6Hpip.mjs} +1 -1
- package/dist/web-components/dragToClose-X9NbZOhA.mjs +1 -0
- package/dist/web-components/{engine-B-sscpLa.mjs → engine-DMoc0tff.mjs} +1 -1
- package/dist/web-components/{engines-DfCHjbt3.mjs → engines-BmB81VXR.mjs} +1 -1
- package/dist/web-components/es-B1NvdYp-.mjs +1 -0
- package/dist/web-components/{fetchManifest-BIzne1Pj.mjs → fetchManifest-CwQC6cCh.mjs} +1 -1
- package/dist/web-components/fi-BjtYZNLo.mjs +1 -0
- package/dist/web-components/fr-Cd22Lziw.mjs +1 -0
- package/dist/web-components/fromManifest-DrAmY1lB.mjs +1 -0
- package/dist/web-components/glyphs-BFK_hvJJ.mjs +1 -0
- package/dist/web-components/hooks-BhtNDs_1.mjs +1 -0
- package/dist/web-components/image-layers-D2nQC4R-.mjs +1 -0
- package/dist/web-components/{imageService-0eTvQ-3h.mjs → imageService-iFElsopt.mjs} +1 -1
- package/dist/web-components/index-FJEpXukG.mjs +1 -0
- package/dist/web-components/index.d.mts +4 -4
- package/dist/web-components/index.mjs +1 -1
- package/dist/web-components/items-BPPrqbeh.mjs +1 -0
- package/dist/web-components/items-BnEnc5ot.mjs +1 -0
- package/dist/web-components/label-DauFa5sg.mjs +1 -0
- package/dist/web-components/layout-Djwu8f4R.mjs +1 -0
- package/dist/web-components/{link-GEdiEwlR.mjs → link-0lUlTZlw.mjs} +1 -1
- package/dist/web-components/logo-DWPxaZaG.mjs +1 -0
- package/dist/web-components/masonry-0QfzOgbB.mjs +1 -0
- package/dist/web-components/{models-59cEeiAA.mjs → models-BF2pqufA.mjs} +1 -1
- package/dist/web-components/nb-CEwZDBiR.mjs +1 -0
- package/dist/web-components/nn-jYQhr9RI.mjs +1 -0
- package/dist/web-components/no-CEwZDBiR.mjs +1 -0
- package/dist/web-components/{nodes-CTw9OqlA.mjs → nodes-ChQRLDGU.mjs} +1 -1
- package/dist/web-components/{overlayImage-BMt4UTlR.mjs → overlayImage-MKrcgDep.mjs} +1 -1
- package/dist/web-components/panClearOfControls-Cn2ZXsZi.mjs +1 -0
- package/dist/web-components/{panel-C17Rl9Ya.mjs → panel-C13V6w6E.mjs} +1 -1
- package/dist/web-components/part-CekFWrtz.mjs +1 -0
- package/dist/web-components/playerSurface-DG1XipTq.mjs +1 -0
- package/dist/web-components/pointer-YQppt0at.mjs +1 -0
- package/dist/web-components/{provider-BpxorEiq.mjs → provider-DiUkZYiW.mjs} +1 -1
- package/dist/web-components/pt-CWR30SzS.mjs +1 -0
- package/dist/web-components/{range-regions-BGQy4E9U.mjs → range-regions-CqGjyM76.mjs} +1 -1
- package/dist/web-components/{read-more-BDM_6CVc.mjs → read-more-D8RJYdtQ.mjs} +1 -1
- package/dist/web-components/readingLanguages-BWOLZK2k.mjs +1 -0
- package/dist/web-components/rendererSurface-BkbGDL_Z.mjs +22 -0
- package/dist/web-components/{renderers-CiB74bQh.mjs → renderers-LtRX5pT0.mjs} +1 -1
- package/dist/web-components/{resource-CRbpf9pX.mjs → resource-Cfydiy4m.mjs} +1 -1
- package/dist/web-components/{save-file-CCuZEuQr.mjs → save-file-dZyOpXgY.mjs} +1 -1
- package/dist/web-components/search-BfUZJM3a.mjs +1 -0
- package/dist/web-components/shared-DkY2a89G.mjs +1 -0
- package/dist/web-components/{show-link-BXm7SNIC.mjs → show-link-DgLJzG7k.mjs} +1 -1
- package/dist/web-components/{sizedImage-k4Q-eyOB.mjs → sizedImage-NHzhcBYk.mjs} +1 -1
- package/dist/web-components/{split-Hp6z-v4h.mjs → split-CuFiKjin.mjs} +1 -1
- package/dist/web-components/{status-BmtuKfAG.mjs → status-C3etlkhY.mjs} +1 -1
- package/dist/web-components/styles-DkkVOSUQ.mjs +1 -0
- package/dist/web-components/three.mjs +1 -1
- package/dist/web-components/{thumbnail-Dp7a8oom.mjs → thumbnail-DecrVnpj.mjs} +1 -1
- package/dist/web-components/{tip-C-oovDZK.mjs → tip-D5YgaIWW.mjs} +1 -1
- package/dist/web-components/{toggle-C7ODWDEZ.mjs → toggle-CZGB65VZ.mjs} +1 -1
- package/dist/web-components/{useContainerName-CrOmY-km.mjs → useContainerName-hKQjEt7a.mjs} +1 -1
- package/dist/web-components/useControlsVisibility-DPg8uAkW.mjs +1 -0
- package/dist/web-components/useLazyPanelPane-eby-OI1V.mjs +1 -0
- package/dist/web-components/{useNearViewport-BqXi9Gn4.mjs → useNearViewport-CDbHQUBk.mjs} +1 -1
- package/dist/web-components/useScrollTrack-D9l_P3_B.mjs +1 -0
- package/dist/web-components/viewer/AnnotationItems-DtsnDXPM.mjs +1 -0
- package/dist/web-components/viewer/{AnnotationMenu-DPOSehBo.mjs → AnnotationMenu-C-Mz6CCn.mjs} +1 -1
- package/dist/web-components/viewer/AnnotationState-5pim5K72.mjs +1 -0
- package/dist/web-components/viewer/Annotations-Cqn1TkzD.mjs +2 -0
- package/dist/web-components/viewer/Annotations-CxwN9FkB.mjs +1 -0
- package/dist/web-components/viewer/{Canvas2DBackend-BTK6ZJh0.mjs → Canvas2DBackend-C-ZMSCak.mjs} +1 -1
- package/dist/web-components/viewer/CaptionDetails-CRD-gSZP.mjs +1 -0
- package/dist/web-components/viewer/ChaptersMenu-Brcq3yJv.mjs +1 -0
- package/dist/web-components/viewer/{ChoiceMenu-DQ1x572Y.mjs → ChoiceMenu-ByGzQQx1.mjs} +1 -1
- package/dist/web-components/viewer/Collection-m0GCcsfQ.mjs +1 -0
- package/dist/web-components/viewer/Connected-Bmc_CdUD.mjs +1 -0
- package/dist/web-components/viewer/Connected-Dvx7wtot.mjs +1 -0
- package/dist/web-components/viewer/Contents-CwDpfiJY.mjs +1 -0
- package/dist/web-components/viewer/ControlMenu-TcO85hDf.mjs +1 -0
- package/dist/web-components/viewer/ControlsFade-BoZ4ABAE.mjs +1 -0
- package/dist/web-components/viewer/{CountMenu-4u6U6yqb.mjs → CountMenu-0-ie8kIZ.mjs} +1 -1
- package/dist/web-components/viewer/Cue-DxmAS9Gx.mjs +1 -0
- package/dist/web-components/viewer/Document-BsryuYJ1.mjs +1 -0
- package/dist/web-components/viewer/{DomLayers-CGkDtemL.mjs → DomLayers-hc0qARQc.mjs} +1 -1
- package/dist/web-components/viewer/Download-MO-1Rik4.mjs +1 -0
- package/dist/web-components/viewer/EntryBodies-g-OEwEsk.mjs +1 -0
- package/dist/web-components/viewer/EntryThumbnail-DcIDYATi.mjs +1 -0
- package/dist/web-components/viewer/{FieldPill-DFXGWrvB.mjs → FieldPill-B9S21lxw.mjs} +1 -1
- package/dist/web-components/viewer/FrameAnimation-qI9cZPEs.mjs +1 -0
- package/dist/web-components/viewer/Gallery-BOgUqfqw.mjs +1 -0
- package/dist/web-components/viewer/{HideToggle-DP5kHzWM.mjs → HideToggle-D8wH49mq.mjs} +1 -1
- package/dist/web-components/viewer/ImageControls-ZoEC9jWd.mjs +1 -0
- package/dist/web-components/viewer/LanguageChoice-CRqsCBAp.mjs +1 -0
- package/dist/web-components/viewer/LightboxView-BB-GcbYr.mjs +1 -0
- package/dist/web-components/viewer/ListEnd-D9Obxie4.mjs +1 -0
- package/dist/web-components/viewer/{MapView-BN9wXQKV.mjs → MapView-DQSwUzd7.mjs} +2 -2
- package/dist/web-components/viewer/MediaBody-CIw2nTlj.mjs +1 -0
- package/dist/web-components/viewer/MediaBody-D5ff6xy-.mjs +1 -0
- package/dist/web-components/viewer/{NavDate-C2-wwLuB.mjs → NavDate-BnfDG57h.mjs} +1 -1
- package/dist/web-components/viewer/{Navigator-C3jghOd3.mjs → Navigator-BNwjmkXY.mjs} +1 -1
- package/dist/web-components/viewer/PagerLayout-C8jraHqs.mjs +1 -0
- package/dist/web-components/viewer/PanelPart-YNbBI9SQ.mjs +1 -0
- package/dist/web-components/viewer/{PartOfManifest-D22yMgCf.mjs → PartOfManifest-DX7H0V4g.mjs} +1 -1
- package/dist/web-components/viewer/PlaceBox-CCWfzsNU.mjs +1 -0
- package/dist/web-components/viewer/Placeholder-CsEkLhz7.mjs +1 -0
- package/dist/web-components/viewer/Search-CsdYzdq1.mjs +1 -0
- package/dist/web-components/viewer/StandaloneItems-BfvBxbUm.mjs +1 -0
- package/dist/web-components/viewer/{Steps-Bw32X5xO.mjs → Steps-BH8ZApS4.mjs} +1 -1
- package/dist/web-components/viewer/{TargetItems-DLhUH1Gq.mjs → TargetItems-BebPFr-c.mjs} +1 -1
- package/dist/web-components/viewer/Transcript-DXLv5WR9.mjs +1 -0
- package/dist/web-components/viewer/Transport-C-fh7Kx2.mjs +1 -0
- package/dist/web-components/viewer/Transport-CY6BWfMi.mjs +1 -0
- package/dist/web-components/viewer/annotation-collection-Cjd8Dgyl.mjs +1 -0
- package/dist/web-components/viewer/annotation-name-CwmgQFia.mjs +1 -0
- package/dist/web-components/viewer/{annotations-content-CbA3eOIC.mjs → annotations-content-BARXoAz-.mjs} +1 -1
- package/dist/web-components/viewer/cloverEngine-CumnJPKO.mjs +164 -0
- package/dist/web-components/viewer/{content-state-reader-C7UBMOq3.mjs → content-state-reader-DuvyLThu.mjs} +1 -1
- package/dist/web-components/viewer/dragToClose-CFCxhUxn.mjs +1 -0
- package/dist/web-components/viewer/{fetchManifest-C2Yxg3x9.mjs → fetchManifest-qNB_KgxL.mjs} +1 -1
- package/dist/web-components/viewer/{host-CZeyjCKR.mjs → host-GTHX2fPK.mjs} +1 -1
- package/dist/web-components/viewer/image-layers-DKOuaRTj.mjs +1 -0
- package/dist/web-components/viewer/index.mjs +1 -1
- package/dist/web-components/viewer/{link-DssZ0Z2N.mjs → link-BlaM0tCa.mjs} +1 -1
- package/dist/web-components/viewer/overlayImage-RVpv69R5.mjs +1 -0
- package/dist/web-components/viewer/range-regions-CIZiAHOp.mjs +1 -0
- package/dist/web-components/viewer/{renderers-DLoqv3QO.mjs → renderers-Dw1klwlx.mjs} +1 -1
- package/dist/web-components/viewer/{save-file-CJT5p5Hg.mjs → save-file-EvzaBEJN.mjs} +1 -1
- package/dist/web-components/viewer/{search-PhOwMKHi.mjs → search-x1QL_bth.mjs} +1 -1
- package/dist/web-components/viewer/styles-I7_LWFGj.mjs +1 -0
- package/dist/web-components/viewer/useControlsVisibility-C_SQHIVR.mjs +1 -0
- package/dist/web-components/viewer/useLazyPanelPane-UuGDJrf_.mjs +1 -0
- package/dist/web-components/viewer/viewer-DJrQuNs1.mjs +29 -0
- package/dist/web-components/viewer/{vtt-1Pk7Dhsj.mjs → vtt-C2G89SWH.mjs} +1 -1
- package/dist/web-components/viewer-Br44EEba.mjs +1 -0
- package/dist/web-components/{vtt-CacHieeN.mjs → vtt-Dd0c7psH.mjs} +1 -1
- package/package.json +1 -1
- package/dist/templates/shared/LightboxBody.mjs +0 -9
- package/dist/web-components/About-DhOGPFaI.mjs +0 -1
- package/dist/web-components/AnnotationItems-CNP4CJiT.mjs +0 -1
- package/dist/web-components/Body-DaY1UJIy.mjs +0 -1
- package/dist/web-components/BodyUnloadable-DcTM7hHF.mjs +0 -1
- package/dist/web-components/CanvasView-BWQ4SK2b.mjs +0 -2
- package/dist/web-components/CaptionDetails-DSziiuQV.mjs +0 -1
- package/dist/web-components/ChoiceMenu-DTuEEUeM.mjs +0 -1
- package/dist/web-components/Collection-B9swJtPW.mjs +0 -1
- package/dist/web-components/ControlMenu-Crtho2cs.mjs +0 -1
- package/dist/web-components/Cue-CbZaGwZh.mjs +0 -1
- package/dist/web-components/Document-BfltLWZZ.mjs +0 -1
- package/dist/web-components/DocumentPanel-ZSe40cV4.mjs +0 -1
- package/dist/web-components/FrameAnimation-IfR1czfc.mjs +0 -1
- package/dist/web-components/Gallery-DD06BDQo.mjs +0 -1
- package/dist/web-components/Items-BHzT9A73.mjs +0 -1
- package/dist/web-components/Label-KabnxuMN.mjs +0 -1
- package/dist/web-components/LightboxBody-BhRhdXo6.mjs +0 -1
- package/dist/web-components/ListEnd-CbwNlty-.mjs +0 -1
- package/dist/web-components/LoadedCanvas-CdZ5WOWz.mjs +0 -1
- package/dist/web-components/LoadedMap-DQyQVRVQ.mjs +0 -1
- package/dist/web-components/MapView-duA5WGsu.mjs +0 -3
- package/dist/web-components/Markup-D-kioDf9.mjs +0 -2
- package/dist/web-components/MediaBody-CoOiVXcv.mjs +0 -1
- package/dist/web-components/MediaBody-d8ErTuwT.mjs +0 -1
- package/dist/web-components/PagerLayout-CvOmKtSW.mjs +0 -1
- package/dist/web-components/Panel-CIdjOznL.mjs +0 -1
- package/dist/web-components/PlaceBox-BtIbIotm.mjs +0 -1
- package/dist/web-components/Placeholder-TIyj4ZjR.mjs +0 -1
- package/dist/web-components/Provider-C8se8i4I.mjs +0 -1
- package/dist/web-components/Root-CAJB0-Mh.mjs +0 -1
- package/dist/web-components/Scene-Ctcdt7CD.mjs +0 -1
- package/dist/web-components/SceneView-B6bEx_7x.mjs +0 -1
- package/dist/web-components/Timeline-CfIF4APc.mjs +0 -1
- package/dist/web-components/canvas-CWf_Fag8.mjs +0 -1
- package/dist/web-components/cloverEngine-6djEHNCD.mjs +0 -164
- package/dist/web-components/dragToClose-C-Pf1IeO.mjs +0 -1
- package/dist/web-components/es-BYfHUZ7P.mjs +0 -1
- package/dist/web-components/fi-B5y2qr8T.mjs +0 -1
- package/dist/web-components/fr-ChezCx6V.mjs +0 -1
- package/dist/web-components/fromManifest-gg5Wx14y.mjs +0 -1
- package/dist/web-components/glyphs-JYl2STEr.mjs +0 -1
- package/dist/web-components/hooks-x7rO95CS.mjs +0 -1
- package/dist/web-components/image-layers-BjbeyHBS.mjs +0 -1
- package/dist/web-components/index-BZ7b9k0N.mjs +0 -1
- package/dist/web-components/items-CnAIl9fS.mjs +0 -1
- package/dist/web-components/items-F6hJgdAS.mjs +0 -1
- package/dist/web-components/label-CI88KH2_.mjs +0 -1
- package/dist/web-components/layout-De1MOSYe.mjs +0 -1
- package/dist/web-components/logo-Ckwj7FlP.mjs +0 -1
- package/dist/web-components/nb-8J22f9Td.mjs +0 -1
- package/dist/web-components/nn-Dv1EvzI1.mjs +0 -1
- package/dist/web-components/no-8J22f9Td.mjs +0 -1
- package/dist/web-components/panClearOfControls-ac9uf-Qs.mjs +0 -1
- package/dist/web-components/part-CXts97_M.mjs +0 -1
- package/dist/web-components/playerSurface-HYwEwPK6.mjs +0 -1
- package/dist/web-components/pt-DWYQkATt.mjs +0 -1
- package/dist/web-components/readingLanguages-fs_HqvqQ.mjs +0 -1
- package/dist/web-components/rendererSurface-C0aKlE0v.mjs +0 -22
- package/dist/web-components/search-CkM0O0Z1.mjs +0 -1
- package/dist/web-components/shared-MTsMddHx.mjs +0 -1
- package/dist/web-components/styles-CZV1nbBQ.mjs +0 -1
- package/dist/web-components/useScrollTrack-CEsOU2yT.mjs +0 -1
- package/dist/web-components/viewer/AnnotationItems-CyhVcRFc.mjs +0 -1
- package/dist/web-components/viewer/AnnotationState-Bjztkobn.mjs +0 -1
- package/dist/web-components/viewer/Annotations-Dh_8Tzi0.mjs +0 -2
- package/dist/web-components/viewer/Annotations-wwuOCxzI.mjs +0 -1
- package/dist/web-components/viewer/CaptionDetails-BwCTovy_.mjs +0 -1
- package/dist/web-components/viewer/Collection-DSBxCmXw.mjs +0 -1
- package/dist/web-components/viewer/Connected-CL3N8F2J.mjs +0 -1
- package/dist/web-components/viewer/Connected-DTk1jlyI.mjs +0 -1
- package/dist/web-components/viewer/Contents-DrXckx7d.mjs +0 -1
- package/dist/web-components/viewer/ControlMenu-Bp91s-g_.mjs +0 -1
- package/dist/web-components/viewer/Cue-C-aF8peC.mjs +0 -1
- package/dist/web-components/viewer/Document-BN1rICu3.mjs +0 -1
- package/dist/web-components/viewer/DocumentPanel-CEesxdeY.mjs +0 -1
- package/dist/web-components/viewer/Download-CawEl9MN.mjs +0 -1
- package/dist/web-components/viewer/EntryBodies-nYHMwSSM.mjs +0 -1
- package/dist/web-components/viewer/EntryThumbnail-DrO_0SzR.mjs +0 -1
- package/dist/web-components/viewer/FrameAnimation-CZfzpxaD.mjs +0 -1
- package/dist/web-components/viewer/Gallery-MWHtvjti.mjs +0 -1
- package/dist/web-components/viewer/LanguageChoice-C50T7dPI.mjs +0 -1
- package/dist/web-components/viewer/LightboxBody-C2T7IC29.mjs +0 -1
- package/dist/web-components/viewer/ListEnd-BDuOx__m.mjs +0 -1
- package/dist/web-components/viewer/MediaBody-CEyswliX.mjs +0 -1
- package/dist/web-components/viewer/MediaBody-Dw3DWDjc.mjs +0 -1
- package/dist/web-components/viewer/PagerLayout-Cg2NpqoD.mjs +0 -1
- package/dist/web-components/viewer/PlaceBox-Dckw4Sfk.mjs +0 -1
- package/dist/web-components/viewer/Placeholder-NYVWYg5Q.mjs +0 -1
- package/dist/web-components/viewer/Search-DC259m4f.mjs +0 -1
- package/dist/web-components/viewer/StandaloneItems-E4kpMne9.mjs +0 -1
- package/dist/web-components/viewer/Transcript-D_VGJQxn.mjs +0 -1
- package/dist/web-components/viewer/annotation-collection-DZHa18ir.mjs +0 -1
- package/dist/web-components/viewer/annotation-name-BaNdW2Xk.mjs +0 -1
- package/dist/web-components/viewer/cloverEngine-C04bCSFR.mjs +0 -164
- package/dist/web-components/viewer/image-layers-B09fporZ.mjs +0 -1
- package/dist/web-components/viewer/overlayImage-BR3eJCKq.mjs +0 -1
- package/dist/web-components/viewer/range-regions-By6L5JOK.mjs +0 -1
- package/dist/web-components/viewer/styles-NZLnZPAC.mjs +0 -1
- package/dist/web-components/viewer/viewer-D30YHqyF.mjs +0 -29
- package/dist/web-components/viewer-CH7re5OO.mjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{T as f,t as d}from"./shared-DkY2a89G.mjs";function c(e,u,n,o){return f(()=>((o==null?void 0:o(e??null,(u==null?void 0:u.id)??null,u==null?void 0:u.duration))??[]).map(t=>{const i=d(t.label,n);return{...t.id?{id:t.id}:{},label:i.text,lang:i.lang,start:t.start,end:t.end,...t.thumbnail?{thumbnail:t.thumbnail}:{}}}),[e,u,n,o])}function m(e,u,n,o){if(e.region){if(!u)return false;const{x:t,y:i,w:l,h:s}=e.region;if(!u.fitCanvasRect(e.canvasId,{x:t,y:i,width:l,height:s},true))return false}if(o&&(e.time!==void 0||e.autoplay)){if(!n)return false;const t=()=>{e.time!==void 0&&(n.currentTime=e.time),e.autoplay&&n.play().catch(()=>{})};n.readyState>=HTMLMediaElement.HAVE_METADATA?t():n.addEventListener("loadedmetadata",t,{once:true})}return true}export{m as a,c as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as e,k as o}from"./shared-DkY2a89G.mjs";const t=()=>e("path",{fillRule:"evenodd",stroke:"none",d:"M144 72H368A96 96 0 0 1 464 168V296A96 96 0 0 1 368 392H200L104 460L144 392A96 96 0 0 1 48 296V168A96 96 0 0 1 144 72Z M168 184H344A16 16 0 0 1 344 216H168A16 16 0 0 1 168 184Z M168 264H280A16 16 0 0 1 280 296H168A16 16 0 0 1 168 264Z"}),c=()=>e(o,{children:[e("path",{d:"M160 144h288M160 256h288M160 368h288",fill:"none",strokeLinecap:"round",strokeWidth:"32"}),e("circle",{cx:"80",cy:"144",r:"20",stroke:"none"}),e("circle",{cx:"80",cy:"256",r:"20",stroke:"none"}),e("circle",{cx:"80",cy:"368",r:"20",stroke:"none"})]}),s=()=>e("path",{stroke:"none",d:"M256 72A48 48 0 1 1 256 168A48 48 0 1 1 256 72Z M192 216H296V384H328V432H184V384H216V264H192Z"}),r=()=>e("path",{fillRule:"evenodd",stroke:"none",d:"M256 40C166 40 100 108 100 196C100 300 216 420 246 452A14 14 0 0 0 266 452C296 420 412 300 412 196C412 108 346 40 256 40Z M256 136A60 60 0 1 1 256 256A60 60 0 1 1 256 136Z"}),h=()=>e("path",{strokeLinejoin:"round",strokeWidth:"40",d:"M184 128V384L392 256Z"}),a=()=>e("path",{strokeLinecap:"round",strokeWidth:"45",d:"M154 154L358 358M358 154L154 358"}),d=()=>e(o,{children:[e("path",{stroke:"none",d:"m456.69,421.39l-94.09-94.09c22.65-30.16,34.88-66.86,34.84-104.58,0-96.34-78.38-174.72-174.72-174.72S48,126.38,48,222.72s78.38,174.72,174.72,174.72c37.72.04,74.42-12.19,104.58-34.84l94.09,94.09c10.29,9.2,26.1,8.32,35.3-1.98,8.48-9.49,8.48-23.83,0-33.32Zm-233.97-73.87c-68.89-.08-124.72-55.91-124.8-124.8h0c0-68.93,55.87-124.8,124.8-124.8s124.8,55.87,124.8,124.8-55.87,124.8-124.8,124.8Z"}),e("path",{stroke:"none",d:"m279.5,197.76h-3.35s-28.47,0-28.47,0v-31.82c-.77-13.79-12.57-24.33-26.36-23.56-12.71.71-22.85,10.86-23.56,23.56v3.35h0v28.47h-31.82c-13.79.77-24.33,12.57-23.56,26.36.71,12.71,10.86,22.85,23.56,23.56h3.35s28.47,0,28.47,0v31.82c.77,13.79,12.57,24.33,26.36,23.56,12.71-.71,22.85-10.86,23.56-23.56v-3.35h0v-28.47h31.82c13.79-.77,24.33-12.57,23.56-26.36-.71-12.71-10.86-22.85-23.56-23.56Z"})]}),l=()=>e(o,{children:[e("path",{stroke:"none",d:"m456.69,421.39l-94.09-94.09c22.65-30.16,34.88-66.86,34.84-104.58,0-96.34-78.38-174.72-174.72-174.72S48,126.38,48,222.72s78.38,174.72,174.72,174.72c37.72.04,74.42-12.19,104.58-34.84l94.09,94.09c10.29,9.2,26.1,8.32,35.3-1.98,8.48-9.49,8.48-23.83,0-33.32Zm-233.97-73.87c-68.89-.08-124.72-55.91-124.8-124.8h0c0-68.93,55.87-124.8,124.8-124.8s124.8,55.87,124.8,124.8-55.87,124.8-124.8,124.8Z"}),e("path",{stroke:"none",d:"M167.26 197.76H278.1a24.96 24.96 0 0 1 0 49.92H167.26a24.96 24.96 0 0 1 0-49.92Z"})]});export{a as C,s as I,d as O,r as P,c as a,t as b,h as c,l as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as s,T as o,e as i,af as r,Y as f,ag as l,ah as v,F as u,n as g,a as c,t as d}from"./shared-DkY2a89G.mjs";function C(){const n=s(a=>a.status),e=s(a=>a.error);return o(()=>({status:n,error:e}),[n,e])}function S(){return s(n=>n.manifest)}function b(){return s(n=>u(n.manifest))}function h(){return s(n=>g(n.manifest,n.canvasId))}function p(){return s(n=>f(n.manifest,n.canvasId))}function z(){const{clover:n}=i("useNavigation"),e=s(t=>v(t.manifest,t.canvasId)),a=s(t=>u(t.manifest).views.length);return o(()=>r(n,e,a),[n,e,a])}function A(){return s(n=>l(n.manifest,n.addedSets))}function I(n){const{language:e}=i("useLocalized");return o(()=>d(n,e),[n,e])}function L(){return c().t}function O(){return c().langOf}export{h as a,C as b,z as c,b as d,S as e,p as f,L as g,O as h,I as i,A as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{F as I,S as u,a8 as L,a9 as $,ax as P}from"./shared-DkY2a89G.mjs";import{c as j}from"./choice-key-BUNebLKe.mjs";function F(t){const c=new Map;for(const e of I(t).canvases)k(e,c);return[...c.values()]}function k(t,c){u(t.items).forEach((e,s)=>u(e==null?void 0:e.items).forEach((d,f)=>{if(!L(d))return;const a=$(u(d.target)[0]).rect??{x:0,y:0,w:Number(t.width)||0,h:Number(t.height)||0};u(d.body).forEach((r,y)=>{const w=(r==null?void 0:r.type)==="Choice";(w?u(r.items):[r]).forEach((o,x)=>{for(const n of u(o==null?void 0:o.annotations)){if(!Array.isArray(n==null?void 0:n.items)||typeof(o==null?void 0:o.id)!="string")continue;const l=n.id??`${o.id}#annotations`,A=w?{key:j(t.id,d.id,s,f,y),item:x,image:o.id}:void 0,M=P(n,l,t.id).map(p=>{const h=q(p.annotation,o),b=Math.round(a.x+h.x*(a.w/h.width)),E=Math.round(a.y+h.y*(a.h/h.height)),S=Math.round(h.w*(a.w/h.width)),g=Math.round(h.h*(a.h/h.height)),N=`${t.id}#xywh=${b},${E},${S},${g}`;return{...p,canvasId:t.id,target:$(N),annotation:{...p.annotation,target:N},...A?{layer:A}:{}}});if(!M.length)continue;let m=c.get(l);m||(m={id:l,label:n.label??o.label,source:"manifest",entries:[]},c.set(l,m)),m.entries.push(...M)}})})}))}function q(t,c){const e=Number(c.width)||1,s=Number(c.height)||1,d={x:0,y:0,w:e,h:s,width:e,height:s},f=u(t==null?void 0:t.target)[0],r=(typeof f=="object"?u(f==null?void 0:f.selector):[]).find(i=>(i==null?void 0:i.type)==="ImageApiSelector"),y=typeof(r==null?void 0:r.region)=="string"?r.region:void 0;if(y){const i=/^(pct:)?([\d.]+),([\d.]+),([\d.]+),([\d.]+)$/.exec(y);if(!i)return d;const[o,x,n,l]=i.slice(2).map(Number);return i[1]?{x:o/100*e,y:x/100*s,w:n/100*e,h:l/100*s,width:e,height:s}:{x:o,y:x,w:n,h:l,width:e,height:s}}const w=$(f).rect;return w?{...w,width:e,height:s}:d}export{F as imageLayers};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a1 as j}from"./shared-DkY2a89G.mjs";const S=["jpg","png","webp","gif"];class y extends Error{constructor(t,e,i){super(t),this.url=e,this.status=i,this.name="ImageServiceError"}}function g(r){return r.replace(/\/info\.json$/,"").replace(/\/+$/,"")}function O(r){const t=Array.isArray(r)?r:r?[r]:[];for(const e of t){if(!e||typeof e!="object")continue;const i=e,o=String(i.type??i["@type"]??""),s=JSON.stringify(i.profile??""),n=/ImageService/i.test(o)||/iiif\.io\/api\/image/.test(s)||/^"level[012]"$/.test(s)||!o&&!i.profile,c=i["@id"]??i.id;if(n&&typeof c=="string")return g(c)}}function F(r,t){if(!r||typeof r!="object")throw new y("info.json is not an object",t??"");const e=r,i=N(e),o=i===3?e.id??e["@id"]:e["@id"]??e.id,s=g(o??t??""),n=Number(e.width),c=Number(e.height);if(!s||!(n>0)||!(c>0))throw new y("info.json is missing id, width or height",t??s);const f=Array.isArray(e.profile)?e.profile:[e.profile],b=f.find(a=>typeof a=="string"),w=f.filter(a=>!!a&&typeof a=="object"),l=I(b),d=new Set([...Array.isArray(e.extraFeatures)?e.extraFeatures:[],...w.flatMap(a=>Array.isArray(a.supports)?a.supports:[])]),x=[...Array.isArray(e.preferredFormats)?e.preferredFormats:[]].map(a=>String(a).toLowerCase()).find(a=>S.includes(a))??"jpg",m=a=>{var A;const v=e[a]??((A=w.find($=>$[a]!==void 0))==null?void 0:A[a]);return Number(v)>0?Number(v):void 0};let u=m("maxWidth"),h=m("maxHeight");return u&&!h&&(h=u),h&&!u&&(u=void 0),{id:s,version:i,level:l,width:n,height:c,tiles:z(e.tiles),sizes:B(e.sizes),maxWidth:u,maxHeight:h,maxArea:m("maxArea"),regionByPx:l>=1||d.has("regionByPx"),sizeByW:l>=1||d.has("sizeByW")||d.has("sizeByWh"),format:x,quality:"default"}}function N(r){const t=[].concat(r["@context"]??[]).map(String);return t.some(e=>e.includes("/image/3"))?3:t.some(e=>e.includes("/image/2"))?2:r.type==="ImageService3"?3:r["@id"]?2:3}function I(r){const t=r==null?void 0:r.match(/level([012])/);return t?Number(t[1]):0}function z(r){return Array.isArray(r)?r.map(t=>{const e=Number(t==null?void 0:t.width),i=Number((t==null?void 0:t.height)??(t==null?void 0:t.width)),o=(Array.isArray(t==null?void 0:t.scaleFactors)?t.scaleFactors:[1]).map(Number).filter(s=>s>0).sort((s,n)=>s-n);return{width:e,height:i,scaleFactors:o}}).filter(t=>t.width>0&&t.height>0&&t.scaleFactors.length):[]}function B(r){return Array.isArray(r)?r.map(t=>({width:Number(t==null?void 0:t.width),height:Number(t==null?void 0:t.height)})).filter(t=>t.width>0&&t.height>0).sort((t,e)=>t.width-e.width):[]}function P(r,t,e,i,o=r.quality){const s=t.x===0&&t.y===0&&t.width===r.width&&t.height===r.height,n=s?"full":`${t.x},${t.y},${t.width},${t.height}`,c=s&&e===r.width&&i===r.height;let f;return r.version===3?f=c?"max":`${e},${i}`:f=c?"full":`${e},`,`${r.id}/${n}/${f}/0/${o}.${r.format}`}function C(r){return r.version===2&&r.level===0?"native":void 0}const p=new Map;function L(r,{request:t}={}){const e=g(r),i=p.get(e);if(i)return i;const o=`${e}/info.json`,s=j(t,o,{headers:{Accept:"application/ld+json, application/json"}}).then(async n=>{if(!n.ok)throw new y(`info.json request failed with ${n.status}`,o,n.status);return F(await n.json(),e)}).catch(n=>{throw p.delete(e),n});return p.set(e,s),s}export{C as a,O as b,L as f,P as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var $=Object.defineProperty;var U=(e,t,o)=>t in e?$(e,t,{enumerable:true,configurable:true,writable:true,value:o}):e[t]=o;var p=(e,t,o)=>U(e,typeof t!="symbol"?t+"":t,o);let L;function H(e){L=e}function Je(){return L}function V(e={}){return import("./shared-DkY2a89G.mjs").then(t=>t.aI).then(t=>t.initCloverI18n(e))}const A=new Map,T=new Set;function _e(e,t,o){if(!A.has(t)){A.set(t,{index:e,css:o});for(const n of T)n.place(t,e,o)}}class W{constructor(t){p(this,"injected",new Set);this.doc=t,T.add(this),A.forEach(({index:o,css:n},i)=>this.place(i,o,n))}inject(t,o){this.injected.has(t)||(this.injected.add(t),this.doc.head.prepend(this.style(t,o)))}place(t,o,n){if(this.injected.has(t))return;this.injected.add(t);const i=this.style(t,n);i.dataset.cloverIndex=String(o);const c=[...this.doc.head.querySelectorAll("style[data-clover-index]")],k=c.filter(s=>Number(s.dataset.cloverIndex)<o).at(-1),w=c.find(s=>Number(s.dataset.cloverIndex)>o),v=this.doc.head.querySelectorAll("style[data-clover]");k?k.after(i):w?w.before(i):v.length?v[v.length-1].after(i):this.doc.head.prepend(i)}style(t,o){const n=this.doc.createElement("style");return n.dataset.clover=t,n.textContent=o,n}}const P=new WeakMap;function z(e){let t=P.get(e);return t||P.set(e,t=new W(e)),t}const M="@layer clover{:is(clover-root,clover-items,clover-viewer,clover-panel,clover-read-more):not([hidden]){display:block}:is(clover-body,clover-canvas,clover-timeline,clover-scene):not([hidden]){display:block;height:var(--clover-body-height,60vh)}clover-split:not([hidden]){display:flex}:is(clover-label,clover-panel-toggle):not([hidden]){display:contents}clover-tab,clover-tip,clover-status>[slot]{display:none}}";let B=null,f=null;const F=()=>B??(B=import("./shared-DkY2a89G.mjs").then(e=>e.aJ).then(e=>f=e)),J=e=>e.trim().toLowerCase()==="false";function _(e,{type:t,min:o},n){if(e===null)return;if(t==="string")return e;if(t==="boolean")return!J(e);if(t==="number"){const c=Number(e);if(e.trim()===""||!Number.isFinite(c)){n("is not a number");return}if(o!==void 0&&c<o){n(`is less than ${o}`);return}return c}if(t==="data"){const c=e.trim();if(!/^[[{"]/.test(c))return e;try{return JSON.parse(c)}catch{n("is not JSON");return}}const i=e.trim().toLowerCase();if(t.includes(i))return i==="false"?false:i;n(`is not ${t.join(", ")}`)}const K=(e,t)=>{const o=Object.keys(e);return o.length===Object.keys(t).length&&o.every(n=>Object.is(e[n],t[n]))};function Q(e){class t extends HTMLElement{constructor(){super(...arguments);p(this,"kind",e.kind)}static get observedAttributes(){return Object.keys(e.attributes)}connectedCallback(){z(this.ownerDocument).inject("elements",M)}}customElements.define(e.tag,t)}function G(e,t){if(typeof customElements>"u"||customElements.get(e.tag))return;if(e.kind==="config"||!t)return Q(e);const o=e.kind,n=e.properties??[],i=Object.entries(e.events??{});let c=null,k=null;const w=()=>k??(k=Promise.all([t().then(s=>c=s),F()]));class v extends HTMLElement{constructor(){super(...arguments);p(this,"kind",o);p(this,"needsRoot",!!e.needsRoot);p(this,"values",{});p(this,"kept",{});p(this,"props",{});p(this,"listeners",new Set);p(this,"warned",new Set);p(this,"handlers",Object.fromEntries(i.map(([r,a])=>[a.prop,(...g)=>{var b;if(a.keeps&&(this.kept[a.keeps]=g[0]??null,g[0]==null))return true;const y=a.detail==="first"?g[0]:Object.fromEntries(a.detail.map((h,N)=>[h,g[N]])),E=new CustomEvent(r,{detail:y,bubbles:!a.keeps,composed:!a.keeps,cancelable:!!a.cancelable}),S=this.dispatchEvent(E);if(!S&&a.cancelable){const h=g[g.length-1];(b=h==null?void 0:h.preventDefault)==null||b.call(h)}return S}])));p(this,"getProps",()=>this.props);p(this,"subscribe",r=>(this.listeners.add(r),()=>{this.listeners.delete(r)}))}static get observedAttributes(){return Object.keys(e.attributes)}get element(){return this}get Component(){return c}connectedCallback(){for(const r of n){if(!Object.prototype.hasOwnProperty.call(this,r))continue;const a=this[r];delete this[r],a!=null&&(this.values[r]=a)}this.update(),this.warnOfAria(),z(this.ownerDocument).inject("elements",M),w().then(()=>{this.isConnected&&f.hostOf(this.ownerDocument).connect(this)})}disconnectedCallback(){queueMicrotask(()=>{this.isConnected||f==null||f.hostOf(this.ownerDocument).disconnect(this)})}attributeChangedCallback(){this.update()}warnOfAria(){if(!e.native)for(const r of["aria-label","aria-labelledby","role"])!this.hasAttribute(r)||this.warned.has(r)||(this.warned.add(r),console.warn(`<${e.tag}>: ${r} names the element, a box no reader is told of; Clover names what it draws itself.`))}update(){const r={...this.handlers,...this.values};for(const[a,g]of Object.entries(e.attributes)){if(g.prop in this.values)continue;const y=this.getAttribute(a),E=_(y,g,S=>{const b=`${a}=${y}`;this.warned.has(b)||(this.warned.add(b),console.warn(`<${e.tag}>: ${a}="${y}" ${S}; ignored.`))});E!==void 0&&(r[g.prop]=E)}K(r,this.props)||(this.props=r,this.listeners.forEach(a=>a()))}}p(v,"initCloverI18n",V);for(const s of n)Object.defineProperty(v.prototype,s,{configurable:true,enumerable:true,get(){return s in this.values?this.values[s]:this.getProps()[s]},set(m){m==null?delete this.values[s]:this.values[s]=m,this.update()}});for(const[,s]of i){if(!s.keeps)continue;const m=s.keeps;Object.defineProperty(v.prototype,m,{configurable:true,enumerable:true,get(){return this.kept[m]??null}})}customElements.define(e.tag,v)}const Y={tag:"clover-panel",kind:"part",needsRoot:true,attributes:{layout:{prop:"layout",type:["tabs","accordion"]},value:{prop:"value",type:"string"},"heading-level":{prop:"headingLevel",type:"number",min:1},download:{prop:"download",type:"boolean"},languages:{prop:"languages",type:"boolean"},closable:{prop:"closable",type:"boolean"},"close-on-escape":{prop:"closeOnEscape",type:"boolean"},as:{prop:"as",type:["aside","div"]}},events:{"clover-value-change":{prop:"onValueChange",detail:["value"]},"clover-close":{prop:"onClose",detail:[],cancelable:true}}},Z={tag:"clover-tab",kind:"config",attributes:{value:{prop:"value",type:"string"},label:{prop:"label",type:"string"}},slots:["label"]},X={tag:"clover-panel-toggle",kind:"part",attributes:{controls:{prop:"controls",type:"string"}},events:{"clover-open-change":{prop:"onOpenChange",detail:["open"],cancelable:true}}},ee={tag:"clover-split",kind:"part",native:true,attributes:{"storage-key":{prop:"storageKey",type:"string"}}},te={tag:"clover-split-pane",kind:"part",native:true,attributes:{size:{prop:"size",type:"string"},min:{prop:"min",type:"string"},max:{prop:"max",type:"string"},name:{prop:"name",type:"string"}}},oe={tag:"clover-split-handle",kind:"part",native:true,attributes:{}},q={"clover-ready":{prop:"onReady",detail:["handle"],keeps:"handle"}},O={"clover-content-state-change":{prop:"onContentStateChange",detail:"first"}},ne={tag:"clover-canvas",kind:"part",attributes:{"iiif-content":{prop:"iiifContent",type:"string"},src:{prop:"src",type:"string"},tiled:{prop:"isTiledImage",type:"boolean"},label:{prop:"label",type:"string"},language:{prop:"language",type:"string"},"high-contrast":{prop:"highContrast",type:"boolean"},controls:{prop:"controls",type:"boolean"},"collapse-controls":{prop:"collapseControls",type:["auto","always"]},navigator:{prop:"navigator",type:"boolean"},placeholder:{prop:"placeholder",type:"boolean"},"viewing-direction":{prop:"viewingDirection",type:["left-to-right","right-to-left","top-to-bottom","bottom-to-top"]},"animate-annotations":{prop:"animateAnnotations",type:"boolean"}},properties:["iiifContent","canvases","src","annotations","options","controlButtons","controls"],events:{...q,...O,"clover-annotation-select":{prop:"onAnnotationSelect",detail:["id"]},"clover-annotation-active":{prop:"onAnnotationActive",detail:["id"]},"clover-caption-change":{prop:"onCaptionChange",detail:["caption"]},"clover-ended":{prop:"onEnded",detail:[]}}},re={tag:"clover-timeline",kind:"part",attributes:{"iiif-content":{prop:"iiifContent",type:"string"},label:{prop:"label",type:"string"},language:{prop:"language",type:"string"},"high-contrast":{prop:"highContrast",type:"boolean"},controls:{prop:"controls",type:"boolean"},placeholder:{prop:"placeholder",type:"boolean"}},properties:["iiifContent","timeline","annotations","options","controls"],events:{...O,"clover-caption-change":{prop:"onCaptionChange",detail:["caption"]},"clover-ended":{prop:"onEnded",detail:[]}}},ae={tag:"clover-scene",kind:"part",attributes:{"iiif-content":{prop:"iiifContent",type:"string"},label:{prop:"label",type:"string"},language:{prop:"language",type:"string"},"high-contrast":{prop:"highContrast",type:"boolean"},controls:{prop:"controls",type:"boolean"},engine:{prop:"engine",type:["clover","three"]}},properties:["iiifContent","scene","options","controls"],events:{...O}},ie={tag:"clover-body",kind:"part",needsRoot:true,attributes:{controls:{prop:"controls",type:"boolean"},"collapse-controls":{prop:"collapseControls",type:["auto","always"]},navigator:{prop:"navigator",type:"boolean"},placeholder:{prop:"placeholder",type:"boolean"},"animate-annotations":{prop:"animateAnnotations",type:"boolean"}},properties:["controls","options","controlButtons","renderers"],events:{...q,...O,"clover-annotation-active":{prop:"onAnnotationActive",detail:["id"]},"clover-caption-change":{prop:"onCaptionChange",detail:["caption"]},"clover-ended":{prop:"onEnded",detail:[]}}},se={tag:"clover-items",kind:"part",attributes:{layout:{prop:"layout",type:["slider","list","grid","masonry","pager"]},secondary:{prop:"secondary",type:["summary","navDate","none"]},size:{prop:"size",type:["large","small"]},of:{prop:"of",type:["views","members","targets","annotations"]},navigation:{prop:"navigation",type:["id","homepage"]},"iiif-content":{prop:"iiifContent",type:"string"},header:{prop:"header",type:"boolean"},"heading-level":{prop:"headingLevel",type:"number",min:2},"thumbnail-size":{prop:"thumbnailSize",type:"number",min:1},"single-item":{prop:"singleItem",type:"boolean"},language:{prop:"language",type:"string"},"high-contrast":{prop:"highContrast",type:"boolean"}},properties:["iiifContent","items","request","renderItem"],events:{"clover-select":{prop:"onSelect",detail:["item"],cancelable:true}}},le=["h1","h2","h3","h4","h5","h6","span","label","figcaption","p","strong","em","div"],pe={tag:"clover-label",kind:"part",attributes:{of:{prop:"of",type:["manifest","canvas"]},as:{prop:"as",type:le},label:{prop:"label",type:"data"}},properties:["label"]},ce={prop:"of",type:["manifest","canvas"]},D={prop:"value",type:"data"},d=(e,t={})=>({tag:e,kind:"part",attributes:{of:ce,value:D,...t},properties:["value"]}),de=d("clover-summary",{as:{prop:"as",type:["p","div","span"]}}),ge={...d("clover-metadata"),properties:["value","renderValue"]},ue=d("clover-required-statement"),ve=d("clover-rights"),he=d("clover-id"),me=d("clover-homepage"),ye=d("clover-rendering"),be=d("clover-see-also"),fe=d("clover-part-of"),Ce=d("clover-thumbnail",{size:{prop:"size",type:"number",min:1},alt:{prop:"alt",type:"string"}}),ke=d("clover-provider",{link:{prop:"link",type:["false"]}}),we=d("clover-logo",{alt:{prop:"alt",type:"string"}}),Ee={tag:"clover-value",kind:"part",attributes:{value:D,format:{prop:"format",type:"string"},"heading-level":{prop:"headingLevel",type:"number",min:1},as:{prop:"as",type:["span","p","div"]}},properties:["value"]},Se={tag:"clover-root",kind:"root",attributes:{"iiif-content":{prop:"iiifContent",type:"string"},"canvas-id":{prop:"canvasId",type:"string"},"manifest-id":{prop:"manifestId",type:"string"},language:{prop:"language",type:"string"},"high-contrast":{prop:"highContrast",type:"boolean"},"search-query":{prop:"searchQuery",type:"string"},annotations:{prop:"annotations",type:"data"},"annotation-pages":{prop:"annotationPages",type:["view","all"]},lang:{prop:"lang",type:"string"}},properties:["iiifContent","annotations","request","renderers"],events:{"clover-ready":{prop:"onReady",detail:["clover"],keeps:"clover"},"clover-canvas-change":{prop:"onCanvasChange",detail:["canvasId"]},"clover-manifest-change":{prop:"onManifestChange",detail:["manifestId"]},"clover-status-change":{prop:"onStatusChange",detail:["status","error"]},"clover-content-state-change":{prop:"onContentStateChange",detail:"first"}}},C={"heading-level":{prop:"headingLevel",type:"number",min:1}},I={of:{prop:"of",type:["views","members","targets"]}},Oe={tag:"clover-status",kind:"part",needsRoot:true,attributes:{loading:{prop:"loading",type:["false"]}},slots:["loading","error"]},Re={tag:"clover-position",kind:"part",needsRoot:true,attributes:{...I,as:{prop:"as",type:["span","p","div"]}}},Ae={tag:"clover-next",kind:"part",needsRoot:true,attributes:I},Ie={tag:"clover-previous",kind:"part",needsRoot:true,attributes:I},Pe={tag:"clover-download",kind:"part",needsRoot:true,attributes:C},je={tag:"clover-search",kind:"part",needsRoot:true,attributes:{...C,sticky:{prop:"sticky",type:"boolean"},size:{prop:"size",type:["large","small"]}}},xe={tag:"clover-contents",kind:"part",needsRoot:true,attributes:{}},Le={tag:"clover-transcript",kind:"part",needsRoot:true,attributes:{follow:{prop:"follow",type:"boolean"},find:{prop:"find",type:"boolean"},sticky:{prop:"sticky",type:"boolean"},size:{prop:"size",type:["large","small"]}}},Te={tag:"clover-annotations",kind:"part",needsRoot:true,attributes:{scope:{prop:"scope",type:["view","all"]},...C},properties:["renderEntry"]},ze={tag:"clover-collection",kind:"part",needsRoot:true,attributes:C},Me={tag:"clover-collection-select",kind:"part",needsRoot:true,attributes:{},events:{"clover-change":{prop:"onChange",detail:["manifestId"]}}},qe={tag:"clover-about",kind:"part",needsRoot:true,attributes:{"canvas-summary":{prop:"canvasSummary",type:"boolean"},download:{prop:"download",type:"boolean"},languages:{prop:"languages",type:"boolean"},thumbnail:{prop:"thumbnail",type:"boolean"},label:{prop:"label",type:"boolean"},...C}},De={tag:"clover-map",kind:"part",attributes:{"iiif-content":{prop:"iiifContent",type:"string"},overlay:{prop:"overlay",type:"boolean"},"overlay-opacity":{prop:"overlayOpacity",type:"number",min:0},"style-url":{prop:"styleUrl",type:"string"},"scroll-zoom":{prop:"scrollZoom",type:"boolean"},credits:{prop:"credits",type:"boolean"},language:{prop:"language",type:"string"},"high-contrast":{prop:"highContrast",type:"boolean"}},properties:["iiifContent","navPlace","georeferences","request"],events:{"clover-select":{prop:"onSelect",detail:["feature"]}}},Ne={tag:"clover-read-more",kind:"part",attributes:{}},$e={tag:"clover-tip",kind:"part",attributes:{label:{prop:"label",type:"string"},lang:{prop:"lang",type:"string"},keys:{prop:"keys",type:"string"},glyph:{prop:"glyph",type:"string"}},properties:["shortcut"]},Ue={tag:"clover-viewer",kind:"alone",attributes:{template:{prop:"template",type:["default","document","gallery"]},"iiif-content":{prop:"iiifContent",type:"string"},"canvas-id":{prop:"defaultCanvasId",type:"string"},"manifest-id":{prop:"defaultManifestId",type:"string"},language:{prop:"language",type:"string"},"high-contrast":{prop:"highContrast",type:"boolean"},"search-query":{prop:"searchQuery",type:"string"},annotations:{prop:"annotations",type:"data"},"heading-level":{prop:"headingLevel",type:"number",min:2},items:{prop:"items",type:["slider","list","grid","masonry","false"]},"single-item":{prop:"singleItem",type:"boolean"},header:{prop:"header",type:"boolean"},panel:{prop:"panel",type:"boolean"},download:{prop:"download",type:"boolean"},languages:{prop:"languages",type:"boolean"},"panel-open":{prop:"defaultPanelOpen",type:"boolean"},"panel-layout":{prop:"panelLayout",type:["accordion","tabs"]},"sidebar-open":{prop:"defaultSidebarOpen",type:"boolean"},"storage-key":{prop:"storageKey",type:"string"},fill:{prop:"fill",type:"boolean"},"collapse-controls":{prop:"collapseControls",type:["auto","always"]},size:{prop:"size",type:"string"},height:{prop:"height",type:"string"},gap:{prop:"gap",type:"string"},secondary:{prop:"secondary",type:["summary","navDate","none"]},summary:{prop:"summary",type:"boolean"},"lightbox-items":{prop:"lightboxItems",type:["slider","pager"]}},properties:["iiifContent","annotations","request","renderers"],events:{"clover-canvas-change":{prop:"onCanvasChange",detail:["canvasId"]},"clover-manifest-change":{prop:"onManifestChange",detail:["manifestId"]},"clover-status-change":{prop:"onStatusChange",detail:["status","error"]},"clover-content-state-change":{prop:"onContentStateChange",detail:"first"}}},j=[Ue,Se,ie,pe,se,Re,Ie,Ae,Oe,Ce,de,ge,ue,ve,me,be,ye,fe,he,ke,we,Ee,qe,Te,ze,Me,xe,je,Le,Pe,De,Y,Z,X,ee,te,oe,ne,re,ae,$e,Ne],l=(e,t,o)=>()=>Promise.all([e(),import("./part-CekFWrtz.mjs")]).then(([n,{drawn:i}])=>i(n[t],o)),R=e=>()=>import("./split-CuFiKjin.mjs").then(t=>t[e]),u=e=>l(()=>import("./Primitives-C6VJXxZD.mjs"),e),x=e=>l(()=>import("./Pager-B9GvQ64b.mjs"),e),He={"clover-viewer":()=>import("./viewer-Br44EEba.mjs").then(e=>e.v).then(e=>e.ViewerElement),"clover-root":()=>import("./shared-DkY2a89G.mjs").then(e=>e.aL).then(e=>e.RootElement),"clover-label":()=>import("./label-DauFa5sg.mjs").then(e=>e.LabelElement),"clover-body":()=>import("./body-Ct8dmQdW.mjs").then(e=>e.BodyElement),"clover-items":()=>import("./items-BPPrqbeh.mjs").then(e=>e.ItemsElement),"clover-position":l(()=>import("./Position-TYnzcm8e.mjs"),"Position"),"clover-previous":x("Previous"),"clover-next":x("Next"),"clover-status":()=>import("./status-C3etlkhY.mjs").then(e=>e.StatusElement),"clover-thumbnail":u("Thumbnail"),"clover-summary":u("Summary"),"clover-metadata":l(()=>import("./Primitives-C6VJXxZD.mjs"),"Metadata",["renderValue"]),"clover-required-statement":u("RequiredStatement"),"clover-rights":u("Rights"),"clover-homepage":u("Homepage"),"clover-see-also":u("SeeAlso"),"clover-rendering":u("Rendering"),"clover-part-of":u("PartOf"),"clover-id":u("Id"),"clover-provider":()=>import("./provider-DiUkZYiW.mjs").then(e=>e.ProviderElement),"clover-logo":()=>import("./logo-DWPxaZaG.mjs").then(e=>e.LogoElement),"clover-value":u("Value"),"clover-about":l(()=>import("./About-DvyvVUK5.mjs").then(e=>e.a),"About"),"clover-annotations":l(()=>import("./Annotations-6E-oD_wg.mjs"),"Annotations",["renderEntry"]),"clover-collection":l(()=>import("./Collection-CLayN8sv.mjs"),"Collection"),"clover-collection-select":l(()=>import("./CollectionSelect-D2d8dGJ4.mjs"),"CollectionSelect"),"clover-contents":l(()=>import("./Contents-tCMXBYDK.mjs"),"Contents"),"clover-search":l(()=>import("./Search-DgT8OPsK.mjs"),"Search"),"clover-transcript":l(()=>import("./Transcript-bSA3cx_K.mjs"),"Transcript"),"clover-download":l(()=>import("./Download-Bku9Vptk.mjs"),"Download"),"clover-map":l(()=>import("./Map-Cw9j3gi3.mjs"),"CloverMap"),"clover-panel":()=>import("./panel-C13V6w6E.mjs").then(e=>e.PanelElement),"clover-panel-toggle":()=>import("./toggle-CZGB65VZ.mjs").then(e=>e.PanelToggleElement),"clover-split":R("SplitElement"),"clover-split-pane":R("SplitPaneElement"),"clover-split-handle":R("SplitHandleElement"),"clover-canvas":()=>import("./canvas-goEZLqEd.mjs").then(e=>e.CanvasElement),"clover-timeline":l(()=>import("./Timeline-BfdN3lIv.mjs"),"Timeline"),"clover-scene":l(()=>import("./Scene-DrOM9YlD.mjs"),"Scene"),"clover-tip":()=>import("./tip-D5YgaIWW.mjs").then(e=>e.TipElement),"clover-read-more":()=>import("./read-more-D8RJYdtQ.mjs").then(e=>e.ReadMoreElement)};function Ve(e,t=j.map(({tag:o})=>o)){e.mapWorkerUrl&&H(e.mapWorkerUrl);for(const o of j)t.includes(o.tag)&&G(o,He[o.tag])}const We=""+new URL("assets/maplibre-gl-worker-kTz9OPxr.js",import.meta.url).href,Be={mapWorkerUrl:We};Ve(Be);export{_e as a,Ve as d,Je as g,V as i};
|
|
@@ -357,7 +357,7 @@ export interface CloverViewerElement extends HTMLElement {
|
|
|
357
357
|
renderers: CloverRenderer[] | null;
|
|
358
358
|
}
|
|
359
359
|
|
|
360
|
-
/** The root of a layout of your own: it loads what it is given, holds
|
|
360
|
+
/** The root of a layout of your own: it loads what it is given, holds the current view, and gives every part inside it the same state. The page's markup inside it stays as written. */
|
|
361
361
|
export interface CloverRootElement extends HTMLElement {
|
|
362
362
|
/** Its Clover, for a part of your own, once it has loaded (clover-ready): what React's hooks read, as methods of the same name (navigation(), visibleCanvases()…), the table of contents (contents()), its state and subscribe, its actions and channels, and its language. Null before. */
|
|
363
363
|
readonly clover: CloverRootApi | null;
|
|
@@ -403,7 +403,7 @@ export interface CloverItemsElement extends HTMLElement {
|
|
|
403
403
|
renderItem: ((item: { id: string; label?: string | Record<string, string[]>; summary?: string | Record<string, string[]>; href?: string }, state: { selected: boolean }) => Node | string | null | undefined) | null;
|
|
404
404
|
}
|
|
405
405
|
|
|
406
|
-
/**
|
|
406
|
+
/** The current position, as a count: Item 3 of 12. It keeps the room of its widest count, so nothing beside it moves. */
|
|
407
407
|
export interface CloverPositionElement extends HTMLElement {
|
|
408
408
|
}
|
|
409
409
|
|
|
@@ -493,7 +493,7 @@ export interface CloverLogoElement extends HTMLElement {
|
|
|
493
493
|
value: Record<string, unknown> | Array<Record<string, unknown>> | null;
|
|
494
494
|
}
|
|
495
495
|
|
|
496
|
-
/** Any IIIF language map in the
|
|
496
|
+
/** Any IIIF language map in the defined language, read strictly by its format: text/html as sanitized HTML, text/plain as written, text/markdown as Markdown. */
|
|
497
497
|
export interface CloverValueElement extends HTMLElement {
|
|
498
498
|
/** What to show. */
|
|
499
499
|
value: string | Record<string, string[]> | null;
|
|
@@ -557,7 +557,7 @@ export interface CloverTabElement extends HTMLElement {
|
|
|
557
557
|
export interface CloverPanelToggleElement extends HTMLElement {
|
|
558
558
|
}
|
|
559
559
|
|
|
560
|
-
/** Panes side by side, its clover-split-pane children, divided by clover-split-handle bars the
|
|
560
|
+
/** Panes side by side, its clover-split-pane children, divided by clover-split-handle bars that share the width, dragged, clicked or moved by keyboard. */
|
|
561
561
|
export interface CloverSplitElement extends HTMLElement {
|
|
562
562
|
}
|
|
563
563
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as n,i as o}from"./index-
|
|
1
|
+
import{d as n,i as o}from"./index-FJEpXukG.mjs";export{n as defineCloverElements,o as initCloverI18n};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{T as m,u as r}from"./shared-DkY2a89G.mjs";import{I as o}from"./Items-CudZ4Lnb.mjs";import{w as n}from"./nodes-ChQRLDGU.mjs";function I({props:t}){const e=m(()=>n(t,["renderItem"]),[t]);return r(o,{...e})}export{I as ItemsElement};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{S as p,X as l,F as g,t as r,ad as v}from"./shared-DkY2a89G.mjs";function h(t){var i;return(i=v(t).find(({body:a})=>a.type))==null?void 0:i.body.type}function y(t){const i=h(t)??(t.type==="Timeline"?"Sound":void 0);return{id:t.id,type:t.type,label:t.label,resource:t,duration:Number(t.duration)||void 0,media:i}}const d=new WeakMap;function w(t){if(!t)return[];let i=d.get(t);if(!i){const{canvases:a,views:e}=g(t);i=e.map(u=>{const n=u.map(s=>y(a[s]));return{id:n[0].id,parts:n,label:n.length===1?n[0].label:{none:[n.map(s=>r(s.label).text).filter(Boolean).join(" \u2013 ")]}}}),d.set(t,i)}return i}const f=new WeakMap;function o(t){if(!t)return[];let i=f.get(t);return i||(i=p(t.items).filter(a=>a==null?void 0:a.id).map(a=>{var e;return{id:a.id,parts:[y(a)],label:a.label,summary:a.summary,...typeof a.navDate=="string"?{navDate:a.navDate}:{},href:((e=p(a.homepage)[0])==null?void 0:e.id)??a.id,...l(p(a.homepage)[0])?{hrefLang:l(p(a.homepage)[0])}:{}}}),f.set(t,i)),i}function A(t){return t?Array.isArray(t)?o({items:t}):t.type==="Collection"?o(t):w(t):[]}export{w as a,A as b,o as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as e}from"./shared-DkY2a89G.mjs";import{L as o}from"./Label-f07N5Fld.mjs";function n({props:r}){return e(o,{...r})}export{n as LabelElement};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a8 as L,a9 as j,S as p,aa as H,ab as E,B as G}from"./shared-DkY2a89G.mjs";import{b as O}from"./imageService-iFElsopt.mjs";import{c as J}from"./choice-key-BUNebLKe.mjs";const Q=/^((application|audio|video)\/)?(vnd\.apple\.|x-)?mpegurl$/i,U=(t,o)=>!!(t&&/\.m3u8$/i.test(t.split(/[?#]/)[0]))||!!(o&&Q.test(o)),X={width:1600,height:900};function tt(t,o){const e=new Array(t.length);if(!t.length)return e;const n=t.map(N),i=o==="left-to-right"||o==="right-to-left",s=o==="right-to-left"||o==="bottom-to-top",u=i?n[0].height:n[0].width,r=t.map((a,h)=>h);s&&r.reverse();let c=0;for(const a of r){const h=n[a],f=u/(i?h.height:h.width),y=h.width*f,g=h.height*f;e[a]=i?{x:c,y:0,width:y,height:g}:{x:0,y:c,width:y,height:g},c+=i?y:g}return e}function N(t){var s,u;if(t.width&&t.height)return{width:t.width,height:t.height};const o=R(t);if(o!=null&&o.width&&o.height)return{width:o.width,height:o.height};const e=((s=k(t)[0])==null?void 0:s.body)??((u=D(t)[0])==null?void 0:u.body),n=Number(e==null?void 0:e.width),i=Number(e==null?void 0:e.height);return n>0&&i>0?{width:n,height:i}:X}function R(t){return t.accompanyingContainer??t.placeholderContainer}function ot(t,o,e,n,i){return J(t.id,o.id,e,n,i)}function gt(t){const o=[];for(const e of t)W(e,(n,i)=>{const s=n;if((s==null?void 0:s.type)!=="Choice")return;const u=p(s.items).filter(r=>!!r&&typeof r=="object");u.length>1&&o.push({key:i,canvasId:e.id,label:s.label,items:u.map(r=>({label:r.label,id:r.id,...typeof r.type=="string"?{type:r.type}:{},...typeof r.format=="string"?{format:r.format}:{}}))})});return o}const F={};function et(t){if(t.type!=="Video"&&!E(t.type)||!t.format||U(t.id,t.format)||typeof document>"u")return true;const o=t.type==="Video"?"video":"audio",e=F[o]??(F[o]=document.createElement(o));return typeof e.canPlayType!="function"?true:e.canPlayType(t.format)!==""}function lt(t){const o={};for(const e of t){const n=e.items.findIndex(et);n>0&&(o[e.key]=n)}return o}const V=new WeakMap,z=[];function nt(t){return H(t).some(o=>((o==null?void 0:o.type)==="Choice"?p(o.items):[o]).some(n=>(n==null?void 0:n.type)==="Video"||E(n==null?void 0:n.type)))}function it(t){var u;const o=V.get(t);if(o)return o;const e=[];for(const r of t.items??[])for(const c of r.items??[]){if(!L(c))continue;const a=c.target?(u=j(c.target))==null?void 0:u.t:void 0;if(!a)continue;const[h,f]=a.split(",").map(Number);Number.isFinite(h)&&e.push({annotation:c,start:h,end:Number.isFinite(f)?f:NaN})}if(e.every(r=>nt(r.annotation)))return V.set(t,z),z;e.sort((r,c)=>r.start-c.start);const n=Number(t.duration),i=Number.isFinite(n)&&n/e.length||.5;e.forEach((r,c)=>{var h;const a=(h=e[c+1])==null?void 0:h.start;r.end>r.start||(a!=null?r.end=a>r.start?a:r.start+i:Number.isFinite(n)&&n>r.start?r.end=n:r.end>r.start||(r.end=r.start+i))});const s=e.length>1?e:z;return V.set(t,s),s}const A=t=>`frame:${t.id}`;function W(t,o){(t.items??[]).forEach((e,n)=>{(e.items??[]).forEach((i,s)=>{L(i)&&H(i).forEach((u,r)=>o(u,ot(t,i,n,s,r),i))})})}function k(t,o={},{allFrames:e=false}={}){const n=[];return M(t,o,(i,s,u)=>{i.body.type==="Image"&&n.push({body:i.body,region:i.region,...i.rotation?{rotation:i.rotation}:{},target:s,...u>=0?{frame:u}:{}})},e),n}function yt(t,o={}){for(const e of t){let n;if(M(e,o,i=>{n??(n=i.body.type)}),typeof n=="string")return n.toLowerCase()}}function D(t,o={}){const e=[];return M(t,o,(n,i,s,u)=>{const r=n.body.type;if(r!=="Video"&&!E(r))return;const c=G(u);e.push({kind:r==="Video"?"video":"audio",body:n.body,target:i,...c?{time:c}:{}})}),e}function rt(t){const o=t.filter(n=>n.time&&typeof n.body.id=="string"),e=new Set(o.map(n=>n.time.start));if(!(o.length<2||e.size!==o.length))return o.sort((n,i)=>n.time.start-i.time.start).map(n=>{const i=Number(n.body.duration)||(n.time.end!==void 0?n.time.end-n.time.start:void 0);return{src:n.body.id,...n.body.format?{format:n.body.format}:{},start:n.time.start,...i?{duration:i}:{}}})}function M(t,o,e,n=false){const i=t.width??0,s=t.height??0,u=it(t),r=Math.min(o[A(t)]??0,Math.max(0,u.length-1));W(t,(c,a,h)=>{const f=u.findIndex(x=>x.annotation===h);if(!n&&f>=0&&f!==r)return;const y=B(c,o[a]??0);if(!y)return;const g=h.target?j(h.target):void 0,b=g==null?void 0:g.rect;e(y,b?{x:b.x,y:b.y,width:b.w,height:b.h}:{x:0,y:0,width:i||Number(y.body.width)||0,height:s||Number(y.body.height)||0},f,g==null?void 0:g.t)})}function st(t){return ut(t).filter(o=>o.kind!=="transcript")}function ct(t){const o=p(t.provides);return o.includes("closedCaptions")?"captions":o.includes("subtitles")||o.includes("translation")?"subtitles":o.includes("transcript")?"transcript":"captions"}function ut(t){const o=[],e=[...t.annotations??[],...t.items??[]];for(const n of e)for(const i of n.items??[])if(p(i.motivation).includes("supplementing"))for(const s of p(i.body)){const u=s,r=(u==null?void 0:u.type)==="Choice"?p(u.items):[u];for(const c of r){const a=c==null?void 0:c.id;!((c==null?void 0:c.format)==="text/vtt"||typeof a=="string"&&/\.vtt(\?|$)/i.test(a))||typeof a!="string"||o.push({id:a,label:c.label,language:p(c.language)[0],kind:ct(i)})}}return o}function mt(t){const o=[],e=i=>{const s=i,u=s==null?void 0:s.id;if(typeof u!="string"||o.some(c=>c.id===u))return;const r=s==null?void 0:s.format;(r?r!=="text/plain":!/\.txt(\?|$)/i.test(u))||o.push({id:u,label:s==null?void 0:s.label,language:p(s==null?void 0:s.language)[0]})},n=[...t.annotations??[],...t.items??[]];for(const i of n)for(const s of i.items??[])if(p(s.motivation).includes("supplementing"))for(const u of p(s.body)){const r=u;((r==null?void 0:r.type)==="Choice"?p(r.items):[r]).forEach(e)}return p(t.rendering).forEach(e),o}function B(t,o=0){if(!t||typeof t!="object")return null;const e=t;if(e.type==="Choice"){const n=p(e.items);return B(n[o]??n[0])}if(e.type==="SpecificResource"&&e.source){const n=typeof e.source=="string"?{id:e.source}:e.source,i=p(e.selector).find(r=>(r==null?void 0:r.type)==="ImageApiSelector"),s=B({type:"Image",...n});if(!s)return null;const u=(i==null?void 0:i.rotation)!=null?String(i.rotation):void 0;return{...s,region:(i==null?void 0:i.region)||s.region,...u?{rotation:u}:{}}}return e.type!=="Image"&&e.type!=="Video"&&!E(e.type)?null:{body:e,region:typeof e.region=="string"?e.region:void 0}}function bt(t,o,e={},{standIns:n=true}={}){const i=tt(t,o),s=[],u=[],r={};return t.forEach((c,a)=>{const h=i[a],f=N(c),y=h.width/f.width,g=h.height/f.height,b=d=>({x:h.x+d.x*y,y:h.y+d.y*g,width:d.width*y,height:d.height*g}),x=D(c,e),T=k(c,e,{allFrames:true}).map(d=>({...d,canvas:c})),S=R(c);if(n&&!T.length&&x.some(d=>d.kind==="audio")&&S){const d=N(S);for(const l of k(S))T.push({...l,canvas:S,target:{x:l.target.x/d.width*f.width,y:l.target.y/d.height*f.height,width:l.target.width/d.width*f.width,height:l.target.height/d.height*f.height}})}const Y=e[A(c)]??0;T.forEach(({body:d,target:l,region:I,rotation:$,frame:w,canvas:Z},q)=>{var K;const C=O(d.service);if(!C&&!d.id)return;const _=`${Z.id}|${q}|${d.id??C}|${I??""}|${$??""}`,P=!(C&&I);if(s.push({id:_,service:C,url:d.id,width:P&&Number(d.width)||void 0,height:P&&Number(d.height)||void 0,region:I,...$?{rotation:$}:{},placement:b(l),...w!=null&&w!==Y?{hidden:true}:{}}),w!=null){const v=r[K=A(c)]??(r[K]=[]);(v[w]??(v[w]=[])).push(_)}});const[m]=x;if(m!=null&&m.body.id){const d=rt(x),l=d?d[0]:void 0;u.push({id:`${c.id}|media|${m.body.id}`,kind:m.kind,src:(l==null?void 0:l.src)??m.body.id,format:l?l.format:m.body.format,placement:b(m.target),duration:d?Number(c.duration)||void 0:Number(m.body.duration??c.duration)||void 0,...d?{segments:d}:{},poster:dt(c),captions:st(c)})}}),{images:s,media:u,placements:i,frames:r}}function dt(t){var o;return(o=ht(t))==null?void 0:o.source}const wt=1280;function ht(t){var c;const o=t.placeholderContainer;if(!o)return;const e=(c=k(o)[0])==null?void 0:c.body;if(!e)return;const n=O(e.service),i=typeof e.id=="string"?e.id:void 0,s=n?{service:n,fallback:i}:i?{src:i}:void 0;if(!s)return;const{width:u,height:r}=N(o);return{source:s,width:u,height:r}}function xt(t,o,e){const n=N(t),i=o.width/n.width,s=o.height/n.height;return{x:o.x+e.x*i,y:o.y+e.y*s,width:e.width*i,height:e.height*s}}export{wt as S,mt as a,it as b,ut as c,bt as d,ht as e,gt as f,A as g,xt as h,N as i,D as j,st as k,U as l,et as m,yt as p,B as r,lt as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{S as n,aa as p,a9 as c}from"./shared-DkY2a89G.mjs";function g(r){if(n(r==null?void 0:r.motivation).includes("linking"))for(const i of p(r)){if((i==null?void 0:i.type)==="TextualBody"||typeof(i==null?void 0:i.value)=="string")continue;const t=(i==null?void 0:i.type)==="SpecificResource"?i.source:i,e=typeof t=="string"?t:t==null?void 0:t.id;if(!(typeof e!="string"||!e)){if((t==null?void 0:t.type)==="Canvas"){const f=n(t.partOf).find(s=>(s==null?void 0:s.id)&&(!s.type||s.type==="Manifest")),u=c(e).id;return{id:e,canvasId:u,...f?{manifestId:f.id}:{}}}if((t==null?void 0:t.type)==="Manifest"||(t==null?void 0:t.type)==="Collection")return{id:e,manifestId:e};if(/^https?:\/\//i.test(e))return{id:e}}}}function o(r){const i=n(r==null?void 0:r.motivation);if(!(!i.includes("tagging")&&!i.includes("identifying")))for(const t of p(r)){if((t==null?void 0:t.type)==="TextualBody"||typeof(t==null?void 0:t.value)=="string")continue;const e=(t==null?void 0:t.type)==="SpecificResource"?t.source:t,f=typeof e=="string"?e:e==null?void 0:e.id;if(typeof f=="string"&&/^https?:\/\//i.test(f))return{id:f}}}export{o as a,g as r};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as t}from"./shared-DkY2a89G.mjs";import{L as n}from"./Provider-DyB0wpeO.mjs";function i({hosted:o,props:r}){var e;return((e=o.element.parentElement)==null?void 0:e.localName)==="clover-provider"?null:t(n,{...r})}export{i as LogoElement};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function h(o){const n=()=>Array.from(o.querySelectorAll(".clover-items-track > .clover-items-item")),c=e=>{const r=e.parentElement;if(!r)return;const l=getComputedStyle(r),i=parseFloat(l.gridAutoRows)||1,d=parseFloat(l.columnGap)||0,u=e.getBoundingClientRect().height;e.style.gridRowEnd=`span ${Math.max(1,Math.ceil((u+d)/i))}`},t=typeof ResizeObserver>"u"?null:new ResizeObserver(e=>e.forEach(r=>c(r.target))),s=()=>n().forEach(e=>{t==null||t.observe(e),c(e)}),a=new MutationObserver(s);return a.observe(o,{childList:true,subtree:true}),s(),()=>{a.disconnect(),t==null||t.disconnect(),n().forEach(e=>e.style.removeProperty("grid-row-end"))}}export{h as attachMasonry};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a8 as M,aa as l,S as f}from"./shared-DkY2a89G.mjs";const m=45,d=75*Math.PI/180,h=5*Math.PI/180,p=Math.PI-h,y=1.1,g=.35,I=4;function P(n,a=1){const t=m*Math.PI/180,o=2*Math.atan(Math.tan(t/2)*a),s=Math.min(t,o);return Math.max(n,1e-6)/Math.sin(s/2)*y}function x(n,a=1){return{theta:0,phi:d,distance:P(n.radius,a)}}function E(n,a,t){return{...n,theta:n.theta+a,phi:Math.min(p,Math.max(h,n.phi+t))}}function R(n,a,t){const o=n.distance/a;return{...n,distance:Math.min(t.distance*I,Math.max(t.distance*g,o))}}function z(n,a){const{theta:t,phi:o,distance:s}=n;return[a[0]+s*Math.sin(o)*Math.sin(t),a[1]+s*Math.cos(o),a[2]+s*Math.sin(o)*Math.cos(t)]}function A(n,a){const t=(s,i)=>Math.abs(s-i)<1e-6,o=(n.theta-a.theta)%(2*Math.PI);return(t(o,0)||t(Math.abs(o),2*Math.PI))&&t(n.phi,a.phi)&&t(n.distance,a.distance)}const O=["model/gltf-binary","model/gltf+json"],c=(n,a)=>{const t=Number(n);return Number.isFinite(t)?t:a};function F(n){return n.format?O.includes(n.format.toLowerCase()):/\.(glb|gltf)(\?|#|$)/i.test(n.src)}function S(n){return f(n.transform).flatMap(a=>{const t=a,o=(t==null?void 0:t.type)==="ScaleTransform"?"scale":(t==null?void 0:t.type)==="RotateTransform"?"rotate":(t==null?void 0:t.type)==="TranslateTransform"?"translate":null;if(!o||!t)return[];const s=o==="scale"?1:0;return[{type:o,x:c(t.x,s),y:c(t.y,s),z:c(t.z,s)}]})}function b(n){for(const a of f(n)){const t=a;if((t==null?void 0:t.type)!=="SpecificResource")continue;const o=f(t.selector).find(s=>(s==null?void 0:s.type)==="PointSelector");if(o)return[c(o.x,0),c(o.y,0),c(o.z,0)]}return[0,0,0]}const u=new WeakMap;function _(n){const a=u.get(n);if(a)return a;const t=[];for(const o of n.items??[])for(const s of(o==null?void 0:o.items)??[])if(M(s))for(let i of l(s)){(i==null?void 0:i.type)==="Choice"&&(i=f(i.items)[0]);const r=(i==null?void 0:i.type)==="SpecificResource"?i:null,e=r?typeof r.source=="string"?{id:r.source,type:"Model"}:r.source:i;(e==null?void 0:e.type)!=="Model"||typeof e.id!="string"||t.push({id:String(s.id??e.id),src:e.id,...typeof e.format=="string"?{format:e.format}:{},...e.label?{label:e.label}:{},position:b(s.target),transforms:r?S(r):[]})}return u.set(n,t),t}function w(n){const a=n.backgroundColor;return typeof a=="string"&&/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.test(a)?a:void 0}export{m as F,O as M,w as a,A as b,z as c,x as h,F as i,_ as s,E as t,R as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=JSON.parse('{"commonClose":"Lukk","commonNext":"Neste","commonPrevious":"Forrige","commonSearch":"S\xF8k","commonViewAll":"Se alle","controlShortcut":"{{label}} ({{shortcut}})","contentSearchLoading":"Laster inn...","contentSearchPlaceholder":"S\xF8k","contentSearchResultsNone":"Ingen resultat","contentSearchResult":"1 resultat","contentSearchResults":"{{count}} resultater","contentSearchError":"S\xF8ket kunne ikke fullf\xF8res.","contentSearchPosition":"Resultat {{index}} av {{total}}","contentSearchClear":"T\xF8m s\xF8ket","canvasPosition":"Element {{index}} av {{total}}","canvasImage":"Bilde","bodyUnloadableImage":"Dette bildet kunne ikke lastes inn.","bodyUnloadableVideo":"Denne videoen kunne ikke lastes inn.","bodyUnloadableAudio":"Denne lyden kunne ikke lastes inn.","bodyUnloadableModel":"Denne modellen kunne ikke lastes inn.","canvasRoleDescription":"zoombart bilde","canvasKeysImage":"Bruk piltastene for \xE5 flytte bildet, med Shift for lengre steg, pluss og minus for \xE5 zoome, 0 for \xE5 tilbakestille visningen, og R eller Shift+R for \xE5 rotere.","canvasKeysMedia":"Trykk mellomrom eller K for \xE5 spille av eller pause, J eller L for \xE5 spole ti sekunder bakover eller fremover, og M for \xE5 sl\xE5 lyden av eller p\xE5.","canvasKeysAnnotations":"Trykk Esc for \xE5 fjerne valget av annoteringen.","sceneModel":"3D-modell","sceneRoleDescription":"roterbar 3D-modell","sceneKeys":"Bruk piltastene for \xE5 rotere modellen, med Shift for lengre steg, pluss og minus for \xE5 zoome, 0 for \xE5 tilbakestille visningen, og R eller Shift+R for \xE5 rotere den mot h\xF8yre eller venstre.","sceneRotateUp":"Roter oppover","sceneRotateDown":"Roter nedover","sceneRotate":"Roter","sceneResetView":"Tilbakestill visningen","statusLoading":"Laster inn\u2026","statusError":"Dette kunne ikke lastes inn.","itemsLabel":"Elementer","download":"Last ned","downloadPage":"Denne siden","downloadAll":"Alle sider","templateSidebar":"Elementer","templateSidebarToggle":"Vis elementer","templateBack":"Tilbake","templateBackTo":"Tilbake til {{label}}","collectionLabel":"Samling","itemsScrollBack":"Vis forrige elementer","itemsScrollForward":"Vis flere elementer","aboutRights":"Rettigheter","aboutDate":"Dato","aboutHomepage":"Hjemmeside","aboutSeeAlso":"Se ogs\xE5","aboutProvider":"Leverand\xF8r","logo":"Logo","aboutManifest":"IIIF-manifest","aboutCanvas":"IIIF-lerret","aboutPartOf":"Del av","aboutOpenManifest":"\xC5pne hele manifestet","aboutCollection":"IIIF-samling","readingLanguage":"Spr\xE5k","annotationsHide":"Skjul annoteringer","annotationsHideTip":"Skjul","readMore":"Les mer","readLess":"Les mindre","annotationsShow":"Vis p\xE5 bildet","annotationsShowTime":"Vis i opptaket","annotationsImage":"Bilde","annotationsLanguage":"Spr\xE5k","annotationsOpenLink":"\xC5pne lenken","transcriptLabel":"Transkripsjon","imageViewerOpen":"\xC5pne bildeviseren","imageViewerClose":"Lukk bildeviseren","canvasChoice":"Valg","canvasViewerControls":"Viserkontroller","canvasExpandControls":"Utvid viserkontrollene","canvasCollapseControls":"Sl\xE5 sammen viserkontrollene","canvasScrollBack":"Vis forrige kontroller","canvasScrollForward":"Vis flere kontroller","imageFullScreen":"Fullskjerm","imageExitFullScreen":"Avslutt fullskjerm","imageResetZoom":"Tilbakestill zoom","imageRotateLeft":"Roter mot venstre","imageRotateRight":"Roter mot h\xF8yre","imageZoomIn":"Zoom inn","imageZoomOut":"Zoom ut","informationPanelTabs":"Informasjonspanel","sectionsScrollBack":"Vis forrige faner","sectionsScrollForward":"Vis flere faner","informationPanelClose":"Lukk informasjonspanelet","informationPanelTabsAbout":"Om","informationPanelTabsAnnotations":"Annoteringer","informationPanelTabsSearch":"S\xF8k","informationPanelTabsContents":"Innhold","contentsSectionsIn":"Deler av","informationPanelTabsMap":"Kart","informationPanelTabsCollection":"Samling","informationPanelTabsTargets":"Visninger","mapUnavailable":"Kartet kunne ikke vises.","mapLabel":"Kart","mapAttribution":"Kartkreditering","mapPlaceUntitled":"Sted {{number}}","mapOverlay":"Georeferert bilde","mapPlacesListed":"Steder oppf\xF8rt etter kartet: {{count}}","informationPanelToggle":"Mer informasjon","playerPlay":"Spill av","playerPause":"Pause","playerMute":"Demp","playerUnmute":"Sl\xE5 p\xE5 lyd","playerVolume":"Volum","playerSeek":"Avspillingsposisjon","playerCaptions":"Teksting","playerCaptionsOff":"Av","playerChapters":"Kapitler","playerFill":"Fyll rammen","playerFit":"Tilpass til rammen","frameRepeat":"Gjenta","playerCurrentTime":"N\xE5v\xE6rende tid","playerDuration":"Varighet","splitHandle":"Endre st\xF8rrelse p\xE5 panelene"}');export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=JSON.parse('{"commonClose":"Lukk","commonNext":"Neste","commonPrevious":"F\xF8rre","commonSearch":"S\xF8k","commonViewAll":"Sj\xE5 alle","controlShortcut":"{{label}} ({{shortcut}})","contentSearchLoading":"Lastar inn...","contentSearchPlaceholder":"S\xF8k","contentSearchResultsNone":"Ingen resultat","contentSearchResult":"1 resultat","contentSearchResults":"{{count}} resultat","contentSearchError":"S\xF8ket kunne ikkje fullf\xF8rast.","contentSearchPosition":"Resultat {{index}} av {{total}}","contentSearchClear":"T\xF8m s\xF8ket","canvasPosition":"Element {{index}} av {{total}}","canvasImage":"Bilete","bodyUnloadableImage":"Dette biletet kunne ikkje lastast inn.","bodyUnloadableVideo":"Denne videoen kunne ikkje lastast inn.","bodyUnloadableAudio":"Denne lyden kunne ikkje lastast inn.","bodyUnloadableModel":"Denne modellen kunne ikkje lastast inn.","canvasRoleDescription":"zoombart bilete","canvasKeysImage":"Bruk piltastane for \xE5 flytte biletet, med Shift for lengre steg, pluss og minus for \xE5 zoome, 0 for \xE5 tilbakestille visinga, og R eller Shift+R for \xE5 rotere.","canvasKeysMedia":"Trykk mellomrom eller K for \xE5 spele av eller pause, J eller L for \xE5 spole ti sekund bakover eller framover, og M for \xE5 sl\xE5 lyden av eller p\xE5.","canvasKeysAnnotations":"Trykk Esc for \xE5 fjerne valet av annoteringa.","sceneModel":"3D-modell","sceneRoleDescription":"roterbar 3D-modell","sceneKeys":"Bruk piltastane for \xE5 rotere modellen, med Shift for lengre steg, pluss og minus for \xE5 zoome, 0 for \xE5 tilbakestille visinga, og R eller Shift+R for \xE5 rotere han mot h\xF8gre eller venstre.","sceneRotateUp":"Roter oppover","sceneRotateDown":"Roter nedover","sceneRotate":"Roter","sceneResetView":"Tilbakestill visinga","statusLoading":"Lastar inn\u2026","statusError":"Dette kunne ikkje lastast inn.","itemsLabel":"Element","download":"Last ned","downloadPage":"Denne sida","downloadAll":"Alle sider","templateSidebar":"Element","templateSidebarToggle":"Vis element","templateBack":"Tilbake","templateBackTo":"Tilbake til {{label}}","collectionLabel":"Samling","itemsScrollBack":"Vis f\xF8rre element","itemsScrollForward":"Vis fleire element","aboutRights":"Rettigheiter","aboutDate":"Dato","aboutHomepage":"Heimeside","aboutSeeAlso":"Sj\xE5 ogs\xE5","aboutProvider":"Leverand\xF8r","logo":"Logo","aboutManifest":"IIIF-manifest","aboutCanvas":"IIIF-lerret","aboutPartOf":"Del av","aboutOpenManifest":"Opne heile manifestet","aboutCollection":"IIIF-samling","readingLanguage":"Spr\xE5k","annotationsHide":"Skjul annoteringar","annotationsHideTip":"Skjul","readMore":"Les meir","readLess":"Les mindre","annotationsShow":"Vis p\xE5 biletet","annotationsShowTime":"Vis i opptaket","annotationsImage":"Bilete","annotationsLanguage":"Spr\xE5k","annotationsOpenLink":"Opne lenkja","transcriptLabel":"Transkripsjon","imageViewerOpen":"Opne biletvisaren","imageViewerClose":"Lukk biletvisaren","canvasChoice":"Val","canvasViewerControls":"Visarkontrollar","canvasExpandControls":"Utvid visarkontrollane","canvasCollapseControls":"Sl\xE5 saman visarkontrollane","canvasScrollBack":"Vis f\xF8rre kontrollar","canvasScrollForward":"Vis fleire kontrollar","imageFullScreen":"Fullskjerm","imageExitFullScreen":"Avslutt fullskjerm","imageResetZoom":"Tilbakestill zoom","imageRotateLeft":"Roter mot venstre","imageRotateRight":"Roter mot h\xF8gre","imageZoomIn":"Zoom inn","imageZoomOut":"Zoom ut","informationPanelTabs":"Informasjonspanel","sectionsScrollBack":"Vis f\xF8rre faner","sectionsScrollForward":"Vis fleire faner","informationPanelClose":"Lukk informasjonspanelet","informationPanelTabsAbout":"Om","informationPanelTabsAnnotations":"Annoteringar","informationPanelTabsSearch":"S\xF8k","informationPanelTabsContents":"Innhald","contentsSectionsIn":"Delar av","informationPanelTabsMap":"Kart","informationPanelTabsCollection":"Samling","informationPanelTabsTargets":"Visingar","mapUnavailable":"Kartet kunne ikkje visast.","mapLabel":"Kart","mapAttribution":"Kartkreditering","mapPlaceUntitled":"Stad {{number}}","mapOverlay":"Georeferert bilete","mapPlacesListed":"Stader lista opp etter kartet: {{count}}","informationPanelToggle":"Meir informasjon","playerPlay":"Spel av","playerPause":"Pause","playerMute":"Demp","playerUnmute":"Sl\xE5 p\xE5 lyd","playerVolume":"Volum","playerSeek":"Avspelingsposisjon","playerCaptions":"Teksting","playerCaptionsOff":"Av","playerChapters":"Kapittel","playerFill":"Fyll ramma","playerFit":"Tilpass til ramma","frameRepeat":"Gjenta","playerCurrentTime":"Noverande tid","playerDuration":"Varigheit","splitHandle":"Endre storleiken p\xE5 panela"}');export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=JSON.parse('{"commonClose":"Lukk","commonNext":"Neste","commonPrevious":"Forrige","commonSearch":"S\xF8k","commonViewAll":"Se alle","controlShortcut":"{{label}} ({{shortcut}})","contentSearchLoading":"Laster inn...","contentSearchPlaceholder":"S\xF8k","contentSearchResultsNone":"Ingen resultat","contentSearchResult":"1 resultat","contentSearchResults":"{{count}} resultater","contentSearchError":"S\xF8ket kunne ikke fullf\xF8res.","contentSearchPosition":"Resultat {{index}} av {{total}}","contentSearchClear":"T\xF8m s\xF8ket","canvasPosition":"Element {{index}} av {{total}}","canvasImage":"Bilde","bodyUnloadableImage":"Dette bildet kunne ikke lastes inn.","bodyUnloadableVideo":"Denne videoen kunne ikke lastes inn.","bodyUnloadableAudio":"Denne lyden kunne ikke lastes inn.","bodyUnloadableModel":"Denne modellen kunne ikke lastes inn.","canvasRoleDescription":"zoombart bilde","canvasKeysImage":"Bruk piltastene for \xE5 flytte bildet, med Shift for lengre steg, pluss og minus for \xE5 zoome, 0 for \xE5 tilbakestille visningen, og R eller Shift+R for \xE5 rotere.","canvasKeysMedia":"Trykk mellomrom eller K for \xE5 spille av eller pause, J eller L for \xE5 spole ti sekunder bakover eller fremover, og M for \xE5 sl\xE5 lyden av eller p\xE5.","canvasKeysAnnotations":"Trykk Esc for \xE5 fjerne valget av annoteringen.","sceneModel":"3D-modell","sceneRoleDescription":"roterbar 3D-modell","sceneKeys":"Bruk piltastene for \xE5 rotere modellen, med Shift for lengre steg, pluss og minus for \xE5 zoome, 0 for \xE5 tilbakestille visningen, og R eller Shift+R for \xE5 rotere den mot h\xF8yre eller venstre.","sceneRotateUp":"Roter oppover","sceneRotateDown":"Roter nedover","sceneRotate":"Roter","sceneResetView":"Tilbakestill visningen","statusLoading":"Laster inn\u2026","statusError":"Dette kunne ikke lastes inn.","itemsLabel":"Elementer","download":"Last ned","downloadPage":"Denne siden","downloadAll":"Alle sider","templateSidebar":"Elementer","templateSidebarToggle":"Vis elementer","templateBack":"Tilbake","templateBackTo":"Tilbake til {{label}}","collectionLabel":"Samling","itemsScrollBack":"Vis forrige elementer","itemsScrollForward":"Vis flere elementer","aboutRights":"Rettigheter","aboutDate":"Dato","aboutHomepage":"Hjemmeside","aboutSeeAlso":"Se ogs\xE5","aboutProvider":"Leverand\xF8r","logo":"Logo","aboutManifest":"IIIF-manifest","aboutCanvas":"IIIF-lerret","aboutPartOf":"Del av","aboutOpenManifest":"\xC5pne hele manifestet","aboutCollection":"IIIF-samling","readingLanguage":"Spr\xE5k","annotationsHide":"Skjul annoteringer","annotationsHideTip":"Skjul","readMore":"Les mer","readLess":"Les mindre","annotationsShow":"Vis p\xE5 bildet","annotationsShowTime":"Vis i opptaket","annotationsImage":"Bilde","annotationsLanguage":"Spr\xE5k","annotationsOpenLink":"\xC5pne lenken","transcriptLabel":"Transkripsjon","imageViewerOpen":"\xC5pne bildeviseren","imageViewerClose":"Lukk bildeviseren","canvasChoice":"Valg","canvasViewerControls":"Viserkontroller","canvasExpandControls":"Utvid viserkontrollene","canvasCollapseControls":"Sl\xE5 sammen viserkontrollene","canvasScrollBack":"Vis forrige kontroller","canvasScrollForward":"Vis flere kontroller","imageFullScreen":"Fullskjerm","imageExitFullScreen":"Avslutt fullskjerm","imageResetZoom":"Tilbakestill zoom","imageRotateLeft":"Roter mot venstre","imageRotateRight":"Roter mot h\xF8yre","imageZoomIn":"Zoom inn","imageZoomOut":"Zoom ut","informationPanelTabs":"Informasjonspanel","sectionsScrollBack":"Vis forrige faner","sectionsScrollForward":"Vis flere faner","informationPanelClose":"Lukk informasjonspanelet","informationPanelTabsAbout":"Om","informationPanelTabsAnnotations":"Annoteringer","informationPanelTabsSearch":"S\xF8k","informationPanelTabsContents":"Innhold","contentsSectionsIn":"Deler av","informationPanelTabsMap":"Kart","informationPanelTabsCollection":"Samling","informationPanelTabsTargets":"Visninger","mapUnavailable":"Kartet kunne ikke vises.","mapLabel":"Kart","mapAttribution":"Kartkreditering","mapPlaceUntitled":"Sted {{number}}","mapOverlay":"Georeferert bilde","mapPlacesListed":"Steder oppf\xF8rt etter kartet: {{count}}","informationPanelToggle":"Mer informasjon","playerPlay":"Spill av","playerPause":"Pause","playerMute":"Demp","playerUnmute":"Sl\xE5 p\xE5 lyd","playerVolume":"Volum","playerSeek":"Avspillingsposisjon","playerCaptions":"Teksting","playerCaptionsOff":"Av","playerChapters":"Kapitler","playerFill":"Fyll rammen","playerFit":"Tilpass til rammen","frameRepeat":"Gjenta","playerCurrentTime":"N\xE5v\xE6rende tid","playerDuration":"Varighet","splitHandle":"Endre st\xF8rrelse p\xE5 panelene"}');export{e as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as i,q as f,C as p,_ as l,u as a}from"./shared-
|
|
1
|
+
import{A as i,q as f,C as p,_ as l,u as a}from"./shared-DkY2a89G.mjs";const b={childList:true,subtree:true,attributes:true,attributeFilter:["value","label","slot","controls"]};function h(t,e,n){const r=i(null),o=f(s=>{const u=new MutationObserver(s);return u.observe(t,b),()=>u.disconnect()},[t]);return p(o,()=>{const s=e();return r.current&&n(r.current.value,s)?r.current.value:(r.current={value:s},s)})}const v=(t,e)=>[...t.children].find(n=>n.getAttribute("slot")===e)??null;function y(t,e){return h(t,()=>v(t,e),Object.is)}function C({of:t}){const e=i(null);return l(()=>{const n=e.current;if(!n)return;const r=()=>n.replaceChildren(...[...t.childNodes].map(c=>c.cloneNode(true)));r();const o=new MutationObserver(r);return o.observe(t,{childList:true,subtree:true,characterData:true,attributes:true}),()=>o.disconnect()},[t]),a("span",{ref:e,style:{display:"contents"}})}function M({from:t,stays:e}){const n=i(null);return l(()=>{const r=n.current;if(!r)return;const o=()=>{for(const s of[...t.childNodes])e(s)||r.append(s)};o();const c=new MutationObserver(o);return c.observe(t,{childList:true}),()=>{c.disconnect(),t.append(...r.childNodes)}},[t,e]),a("div",{ref:n,style:{display:"contents"}})}function O({from:t,picks:e}){const n=i(null);return l(()=>{const r=n.current;if(!r)return;let o=[];const c=()=>{const u=[...t.childNodes].filter(e);u.length&&(o=o.filter(d=>d.parentNode===r.parentNode),(o.at(-1)??r).after(...u),o.push(...u))};c();const s=new MutationObserver(c);return s.observe(t,{childList:true}),()=>{s.disconnect();for(const u of o)u.parentNode===r.parentNode&&t.append(u)}},[t,e]),a("span",{ref:n,hidden:true})}function N({value:t}){const e=i(null);return l(()=>{var n;(n=e.current)==null||n.replaceChildren(t instanceof Node?t:String(t))},[t]),a("span",{ref:e,style:{display:"contents"}})}function g(t,e){let n=t;for(const r of e){const o=t[r];typeof o=="function"&&(n={...n,[r]:(...c)=>{const s=o(...c);return s==null?s:a(N,{value:s})}})}return n}export{C,M,O as P,y as a,v as s,h as u,g as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as c,f as s}from"./imageService-
|
|
1
|
+
import{b as c,f as s}from"./imageService-iFElsopt.mjs";import{s as a}from"./sizedImage-NHzhcBYk.mjs";async function l(r,o,i){const t=typeof r.id=="string"?r.id:void 0,e=c(r.service);if(!e)return t;try{const n=await s(e,{request:i});return a(n,o)??t}catch{return t}}export{l as overlayImageUrl};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const T=[".clover-canvas-controls > *",".clover-canvas-navigator",".clover-canvas-transport",'.clover-canvas-caption[data-open="true"]',".clover-canvas-menu",".clover-canvas-placeholder-toggle",".clover-canvas-exit-full-screen"].join(", "),v=(r,i,a,e)=>r<e&&a<i;function A(r,i){var C;const a=(C=r.overlays)==null?void 0:C.container;if(!a)return;const e=a.closest(".clover-canvas");if((e==null?void 0:e.getAttribute("data-navigable"))==="false")return;const n=a.getBoundingClientRect();if(!n.width||!n.height)return;const l={top:n.top,right:n.right,bottom:n.bottom,left:n.left};let b=Array.from((e==null?void 0:e.querySelectorAll(T))??[]).flatMap(o=>{if(o.closest(".clover-canvas")!==e)return[];const[s=0,t=0]=(getComputedStyle(o).translate||"").split(" ").map(p=>parseFloat(p)||0),f=o.getBoundingClientRect(),u=f.top-t,d=f.right-s,y=f.bottom-t,M=f.left-s;if(!f.width||!f.height||!v(M,d,n.left,n.right)||!v(u,y,n.top,n.bottom))return[];const w=[["top",y-n.top],["bottom",n.bottom-u],["left",d-n.left],["right",n.right-M]],[B]=w.reduce((p,R)=>R[1]<p[1]?R:p);return[{side:B,top:u,right:d,bottom:y,left:M}]});const m=[i,i.querySelector(".clover-canvas-annotation-point")].filter(o=>!!o).map(o=>o.getBoundingClientRect()),c={top:Math.min(...m.map(o=>o.top)),right:Math.max(...m.map(o=>o.right)),bottom:Math.max(...m.map(o=>o.bottom)),left:Math.min(...m.map(o=>o.left))};let h=0,g=0;for(let o=true;o;){const s=b.filter(t=>t.side==="top"||t.side==="bottom"?v(t.left,t.right,c.left+h,c.right+h):v(t.top,t.bottom,c.top+g,c.bottom+g));b=b.filter(t=>!s.includes(t)),o=s.length>0;for(const t of s)t.side==="top"&&(l.top=Math.max(l.top,t.bottom)),t.side==="bottom"&&(l.bottom=Math.min(l.bottom,t.top)),t.side==="left"&&(l.left=Math.max(l.left,t.right)),t.side==="right"&&(l.right=Math.min(l.right,t.left));h=S(c.left,c.right,l.left,l.right),g=S(c.top,c.bottom,l.top,l.bottom)}if(!h&&!g)return;const x=r.worldToScreenPoint(r.getCamera());r.panTo(r.screenToWorldPoint({x:x.x-h,y:x.y-g}))}function S(r,i,a,e){return i-r>e-a?(a+e-r-i)/2:r<a?a-r:i>e?e-i:0}export{A as panClearOfControls};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as v,A as g,y as p,u as s}from"./shared-
|
|
1
|
+
import{d as v,A as g,y as p,u as s}from"./shared-DkY2a89G.mjs";import{T as y,P as S}from"./Panel-BvDpCn6K.mjs";import{u as b,M as C,C as w,s as A}from"./nodes-ChQRLDGU.mjs";const k=l=>[...l.children].filter(t=>t.localName==="clover-tab").map((t,e)=>{const n=t.getAttribute("value")||String(e);return{element:t,value:n,label:t.getAttribute("label")||n,labelSlot:A(t,"label")}}),E=(l,t)=>l.length===t.length&&l.every((e,n)=>e.element===t[n].element&&e.value===t[n].value&&e.label===t[n].label&&e.labelSlot===t[n].labelSlot),M=l=>l instanceof Element&&l.getAttribute("slot")==="label",a=new WeakMap;let O=0;const P=l=>(a.has(l)||a.set(l,++O),a.get(l));function T(l){const t=l.ownerDocument;for(let e=l;e&&e!==t.body;e=e.parentElement){if(!e.id)continue;const n=e.id.replace(/["\\]/g,"\\$&");if(t.querySelector(`[aria-controls~="${n}"]`)){e.hidden=true;return}}l.hidden=true}function q({hosted:l,props:t}){const e=l.element,n=b(e,()=>k(e),E),{value:r,closable:i,onValueChange:m,onClose:f,...d}=t,[h,c]=v(r),u=g(r);return p(()=>{r!==u.current&&(u.current=r,r&&c(r))},[r]),s(S,{...d,value:h,onValueChange:o=>{c(o),m(o)},onClose:i?()=>{f()&&T(e)}:void 0,children:n.length?n.map(o=>s(y,{value:o.value,label:o.labelSlot?s(w,{of:o.labelSlot}):o.label,children:s(C,{from:o.element,stays:M})},P(o.element))):null})}export{q as PanelElement};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{T as i,u as e}from"./shared-DkY2a89G.mjs";import{w as u}from"./nodes-ChQRLDGU.mjs";function a(r,t=[]){return function({props:n}){const o=i(()=>u(n,t),[n]);return e(r,{...o})}}export{a as drawn};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as w,c as E,b,T as v}from"./pointer-YQppt0at.mjs";import{u as S}from"./useControlsVisibility-DPg8uAkW.mjs";const M=i=>{const s=new Map,p=e=>{var t;return(t=s.get(e))==null?void 0:t.forEach(r=>r())};let l=false,o=null,n=null,u=false,a=null;const d=e=>{w(e)&&(u=true)},m=e=>{a=e.isPrimary&&e.button===0&&(e.target===i||e.target===n)?{x:e.clientX,y:e.clientY,t:e.timeStamp,direct:E(e.pointerType,u)}:null},f=e=>{const t=a;a=null,!(!t||e.timeStamp-t.t>=b||Math.hypot(e.clientX-t.x,e.clientY-t.y)>v)&&!(o!=null&&o())&&!t.direct&&p("tap")},c=e=>{e!==n&&(n==null||n.remove(),n=e,n&&(Object.assign(n.style,{position:"absolute",inset:"0",width:"100%",height:"100%",objectFit:"contain"}),n.classList.add("clover-canvas-dom-media"),i.append(n)))};return i.addEventListener("pointermove",d),i.addEventListener("pointerdown",m),i.addEventListener("pointerup",f),{host:i,get isOpen(){return l},on(e,t){const r=s.get(e)??new Set;return s.set(e,r.add(t)),()=>r.delete(t)},async setImages(e,{world:t}={}){var g,y;const r=(y=(g=e.find(L=>L.media))==null?void 0:g.media)==null?void 0:y.element;c(r instanceof HTMLVideoElement?r:null),!(!t&&!e.length)&&(p(l?"change":"open"),l=true)},clear:()=>c(null),setDismiss(e){o=e},setGestures(){},dispose(){c(null),s.clear(),i.removeEventListener("pointermove",d),i.removeEventListener("pointerdown",m),i.removeEventListener("pointerup",f)}}};M.controlsVisibility=S;export{M as p};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var x=Object.defineProperty;var H=(e,t,n)=>t in e?x(e,t,{enumerable:true,configurable:true,writable:true,value:n}):e[t]=n;var M=(e,t,n)=>H(e,typeof t!="symbol"?t+"":t,n);import{a as L,A as T,d as p,ac as S,y as v,u as o,t as N,l as m,P as O,z as W,k as E,_ as B,q as I,C as A,R as P}from"./shared-DkY2a89G.mjs";import{C as D}from"./glyphs-BFK_hvJJ.mjs";import{B as y}from"./Button-L8ZMy5lY.mjs";import"./styles-DkkVOSUQ.mjs";import{T as q}from"./Tip-OCB88zwY.mjs";const z=W(()=>import("./CaptionDetails-DuwS-grE.mjs"));function oe(e){var t;return!!e.summary||!!((t=e.metadata)!=null&&t.length)}const _=(e,t)=>`${e}-label-${t}`,se=({id:e,canvases:t,comments:n,open:r,onClose:s,language:a})=>{const{t:i,langOf:c}=L(),l=T(null),[f,h]=p(r);return r&&!f&&h(true),S(r,()=>s(false)),v(()=>{var u;r&&((u=l.current)==null||u.focus())},[r]),o("figcaption",{className:"clover-canvas-caption","data-open":r,"data-testid":"clover-canvas-caption",id:e,onKeyDown:u=>{u.key==="Escape"&&(u.preventDefault(),u.stopPropagation(),s(true))},ref:l,tabIndex:-1,children:[o(y,{className:"clover-canvas-caption-close",id:`close-${e}`,label:i("commonClose"),lang:c("commonClose"),onClick:()=>s(true),children:o(D,{})}),t.map((u,g)=>{const d=N(u.label,a);return o("section",{className:"clover-canvas-caption-canvas",children:[d.text&&o("p",{className:"clover-canvas-caption-label",id:_(e,g),...m(d.lang),children:d.text}),f&&o(O,{fallback:null,children:o(z,{summary:u.summary,metadata:u.metadata,comments:n==null?void 0:n.get(u.id),language:a})})]},u.id)})]})},ae=()=>o("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M256 112v288M400 256H112"}),ce=()=>o("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M400 256H112"}),le=()=>o("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M432 320v112H320M421.8 421.77L304 304M80 192V80h112M90.2 90.23L208 208M320 80h112v112M421.77 90.2L304 208M192 432H80V320M90.23 421.8L208 304"}),ie=()=>o("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M304 416v-112h112M405.77 405.77L304 304M208 96v112H96M106.23 106.23L208 208M416 208H304V96M405.77 106.23L304 208M96 304h112v112M106.23 405.77L208 304"}),ue=()=>o("path",{d:"M448 440a16 16 0 01-12.61-6.15c-22.86-29.27-44.07-51.86-73.32-67C335 352.88 301 345.59 256 344.23V424a16 16 0 01-27 11.57l-176-168a16 16 0 010-23.14l176-168A16 16 0 01256 88v80.36c74.14 3.41 129.38 30.91 164.35 81.87C449.32 292.44 464 350.9 464 424a16 16 0 01-16 16z"}),de=()=>o(E,{children:[o("path",{fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M400 148l-21.12-24.57A191.43 191.43 0 00240 64C134 64 48 150 48 256s86 192 192 192a192.09 192.09 0 00181.07-128"}),o("path",{d:"M464 97.42V208a16 16 0 01-16 16H337.42c-14.26 0-21.4-17.23-11.32-27.31L436.69 86.1C446.77 76 464 83.16 464 97.42z"})]}),fe=()=>o(E,{children:[o("path",{fill:"none",strokeLinecap:"round",strokeWidth:"64",d:"M112 144h0M112 256h0M112 368h0"}),o("path",{fill:"none",strokeLinecap:"round",strokeWidth:"40",d:"M208 144h208M208 256h208M208 368h208"})]}),j=({children:e,label:t})=>o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 512 512",fill:"currentColor",stroke:"currentColor",focusable:"false","aria-hidden":"true",role:"presentation","data-testid":"clover-canvas-button-svg","data-label":t,children:e}),U=112,V=128;function $(e){B(()=>{const t=e==null?void 0:e.closest(".clover-canvas");if(!e||!t)return;const n=(a=false)=>{let i=e.offsetWidth,c=0;for(const d of a?[]:Array.from(e.children))!(d instanceof HTMLElement)||!d.offsetParent||(i=Math.min(i,d.offsetLeft),c=Math.max(c,d.offsetTop+d.offsetHeight));const l={width:e.offsetWidth-i,height:c};for(const[d,F]of Object.entries(l)){const k=`--clover-canvas-controls-${d}`;c?t.style.setProperty(k,`${F}px`):t.style.removeProperty(k)}const f=e.offsetTop,h=t.querySelector(":scope > .clover-canvas-media > .clover-canvas-transport"),u=t.clientHeight-2*f-l.height-((h==null?void 0:h.offsetHeight)??0),g=e.offsetLeft+i-f;c&&u<U&&g>=V?t.dataset.popups="beside":delete t.dataset.popups};n();const r=new ResizeObserver(()=>n());r.observe(e),r.observe(t);const s=new MutationObserver(()=>n());return s.observe(e,{childList:true}),s.observe(t,{childList:true}),()=>{r.disconnect(),s.disconnect(),n(true)}},[e])}const b=()=>{if(typeof document>"u")return null;const e=document;return e.fullscreenElement??e.webkitFullscreenElement??null},w=()=>{if(typeof document>"u")return false;const e=document;return!!(e.fullscreenEnabled??e.webkitFullscreenEnabled)},C=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},Z=(e,t)=>{if(typeof e.webkitEnterFullscreen!="function")return;const n=t.closest(".clover-canvas"),r=!e.isConnected&&!!n;if(r&&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 s=()=>{var a;try{(a=e.webkitEnterFullscreen)==null||a.call(e)}catch{}};r?requestAnimationFrame(s):s()},R=async(e,t)=>{var r,s,a,i;const n=C(e);if(n)try{if(b()){const l=document;await(((r=l.exitFullscreen)==null?void 0:r.call(l))??((s=l.webkitExitFullscreen)==null?void 0:s.call(l)));return}if(!w()){t&&e&&Z(t,e);return}const c=n;await(((a=c.requestFullscreen)==null?void 0:a.call(c))??((i=c.webkitRequestFullscreen)==null?void 0:i.call(c)))}catch{}};function K(e){const[t,n]=p(false);return v(()=>{if(!e)return;const r=()=>{var s;return n(!!((s=b())!=null&&s.contains(e)))};return r(),document.addEventListener("fullscreenchange",r),document.addEventListener("webkitfullscreenchange",r),()=>{document.removeEventListener("fullscreenchange",r),document.removeEventListener("webkitfullscreenchange",r)}},[e]),t}function he({key:e,id:t,label:n,glyph:r,onClick:s,expanded:a,controls:i,shortcut:c,lang:l},f){const h=f==null?void 0:f[e];return h?o(h,{buttonProps:{id:t,type:"button","aria-label":n,...l&&{lang:l},...c&&{"aria-keyshortcuts":c.keys},onClick:s,...a!==void 0&&{"aria-expanded":a,"aria-controls":i}},icon:o(j,{label:n,children:r}),label:n,tip:o(q,{label:n,shortcut:c})},e):o(y,{id:t,label:n,onClick:s,expanded:a,controls:i,shortcut:c,lang:l,children:r},e)}const pe=({fit:e=false,clusterRef:t,children:n})=>{const[r,s]=p(null),a=K(r);$(r);const i=I(c=>{s(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:i,children:n})},Y=()=>()=>{};function ve(){return A(Y,w)}const me=({hidden:e})=>{const{t,langOf:n}=L(),r=t("imageExitFullScreen");return o("button",{"aria-label":r,...m(n("imageExitFullScreen")),className:"clover-canvas-exit-full-screen",hidden:e,onClick:s=>void R(s.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"})}),r]})};function be(e){const[t,n]=p(false);return v(()=>{if(!e)return;const r=()=>n(b()===e);return r(),document.addEventListener("fullscreenchange",r),document.addEventListener("webkitfullscreenchange",r),()=>{document.removeEventListener("fullscreenchange",r),document.removeEventListener("webkitfullscreenchange",r)}},[e]),t}function ge(e){const[t,n]=p(false);return v(()=>{if(!e)return;const r=()=>{const s=b();n(s===e||!!s&&C(e)===s&&(s==null?void 0:s.querySelector(".clover-canvas"))===e)};return r(),document.addEventListener("fullscreenchange",r),document.addEventListener("webkitfullscreenchange",r),()=>{document.removeEventListener("fullscreenchange",r),document.removeEventListener("webkitfullscreenchange",r)}},[e]),t}class Le extends P.Component{constructor(){super(...arguments);M(this,"state",{error:null})}static getDerivedStateFromError(n){return{error:n}}render(){const{error:n}=this.state;return n?o("div",{className:"clover-canvas-error",role:"alert",lang:"en",children:[o("p",{className:"clover-canvas-error-headline","data-testid":"headline",children:"Something went wrong"}),n.message&&o("span",{className:"clover-canvas-error-body",children:`Error message: ${n.message}`})]}):this.props.children}}const G={image:"bodyUnloadableImage",video:"bodyUnloadableVideo",audio:"bodyUnloadableAudio",model:"bodyUnloadableModel"};function ke({kind:e,shown:t,room:n=false}){const{t:r,langOf:s}=L(),a=G[e];return o("div",{className:"clover-body-unloadable","data-room":n||void 0,role:"status",children:t&&o("p",{...m(s(a)),children:r(a)})})}function Me({text:e,lang:t}){return o("div",{className:"clover-body-note","aria-hidden":"true",children:o("p",{...m(t),children:e})})}const J=5,Ee=300,ye=J*4;function we(e,t=false){return e==="touch"||e==="pen"&&!t}function Ce(e){return e.pointerType==="pen"&&e.buttons===0}function Fe(e,t,n){for(let r=e;r&&r!==t;r=r.parentElement)if((n>0?r.scrollHeight-r.clientHeight-r.scrollTop:r.scrollTop)>=1&&/auto|scroll/.test(getComputedStyle(r).overflowY))return true;return false}function xe(e,t){var r;let n=e;for(;n&&n!==t;){if(n instanceof HTMLButtonElement||n instanceof HTMLAnchorElement||n instanceof HTMLInputElement||n instanceof HTMLSelectElement||((r=n.dataset)==null?void 0:r.cloverCanvasInteractive)!==void 0)return true;n=n.parentElement}return false}export{ke as B,pe as C,ye as D,Le as E,de as R,J as T,ae as Z,Ce as a,Ee as b,we as c,K as d,ce as e,ie as f,le as g,ue as h,xe as i,fe as j,be as k,ge as l,oe as m,_ as n,me as o,Me as p,se as q,he as r,Fe as s,R as t,ve as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as r}from"./shared-
|
|
1
|
+
import{u as r}from"./shared-DkY2a89G.mjs";import{L as n,P as a}from"./Provider-DyB0wpeO.mjs";import{u as i}from"./nodes-ChQRLDGU.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};
|
|
@@ -0,0 +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 a liga\xE7\xE3o","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","frameRepeat":"Repetir","playerCurrentTime":"Tempo atual","playerDuration":"Dura\xE7\xE3o","splitHandle":"Redimensionar os pain\xE9is"}');export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{S as c,av as l,a9 as g,aw as v,L as b}from"./shared-DkY2a89G.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 j(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:S,y:T,w:I,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=${S},${T},${I},${$}`}})}};c(t.structures).forEach(s);const p=i.length?{id:l,source:"contents",entries:i}:null;return a.set(t,p),p}export{j as contentsSet};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as m,
|
|
1
|
+
import{a as m,a2 as f,b,A as p,_ as n,u as v,l as g}from"./shared-DkY2a89G.mjs";import{u as L}from"./ReadMore-De_0T7lc.mjs";import{u as A}from"./nodes-ChQRLDGU.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Z as a,t as c,e as u,c as l,T as g}from"./shared-DkY2a89G.mjs";function f(e,t,o){if(o&&e.includes(o))return o;if(!e.length)return;const s=a(e,t);return s==="none"?e[0]:s}const y=e=>e&&typeof e=="object"&&!Array.isArray(e)?Object.keys(e).filter(t=>t!=="none"&&t!=="@none"&&c({[t]:e[t]}).text):[];function i(e){if(!e)return[];const t=[...Array.isArray(e.metadata)?e.metadata:[],e.requiredStatement].filter(Boolean),s=[e.label,e.summary,...t.flatMap(n=>[n==null?void 0:n.label,n==null?void 0:n.value])].map(y).filter(n=>n.length>1);return[...new Set(s.flat())]}function d(){const{language:e,chooseLanguage:t}=u("About"),o=l(r=>r.manifest),s=g(()=>i(o),[o]),n=f(s,e);return n&&t?{languages:s,chosen:n,onChange:t}:null}export{f as s,d as u};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
var bt=Object.defineProperty;var Tt=(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)=>Tt(n,typeof t!="symbol"?t+"":t,e);import{c as Et,r as Y}from"./contexts-ByL3eA_T.mjs";import{c as k,s as _,t as L,a as Mt,u as dt,i as kt,b as ut,d as ft,e as _t,r as Lt,f as A,g as Pt}from"./CanvasView-2Fj9nT06.mjs";import{a as S,w as It,v as N,f as At,s as $,b as St,c as Rt}from"./Camera-BPyLzZjP.mjs";import{i as Q,a as Bt,T as Ot,b as j,c as J,D as Ct,s as Ut}from"./pointer-YQppt0at.mjs";import{a0 as zt,a1 as Wt}from"./shared-DkY2a89G.mjs";import{a as Ft,i as tt,f as Dt}from"./imageService-iFElsopt.mjs";function Nt(n){return typeof HTMLImageElement<"u"&&n instanceof HTMLImageElement?n.complete&&n.naturalWidth>0:true}function Ht(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 Gt=`#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
|
+
`,Xt=`#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) * u_opacity;
|
|
21
|
+
}
|
|
22
|
+
`;class R{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=Zt(e,Gt,Xt);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 r=e.createVertexArray();e.bindVertexArray(r);const o=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,o),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=r,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 R(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)),r=Math.max(1,Math.round(e*i));this.canvas.width!==s&&(this.canvas.width=s),this.canvas.height!==r&&(this.canvas.height=r)}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||!Nt(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},r=Ht(t,this.pixelRatio),o=k(t.transform,L(s.x,s.y),_(s.width+r.x,s.height+r.y));return e.uniformMatrix3fv(this.uniforms.matrix,false,Mt(o,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(o){if(i||e.deleteTexture(s),Kt(o))return"tainted";throw o}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 r={texture:s,width:t.width,height:t.height};return this.textures.set(t.key,r),r}}function Zt(n,t,e){const i=et(n,n.VERTEX_SHADER,t),s=et(n,n.FRAGMENT_SHADER,e),r=n.createProgram();if(!r)throw new Error("Could not create WebGL program");if(n.attachShader(r,i),n.attachShader(r,s),n.linkProgram(r),n.deleteShader(i),n.deleteShader(s),!n.getProgramParameter(r,n.LINK_STATUS)){const o=n.getProgramInfoLog(r);throw n.deleteProgram(r),new Error(`Could not link WebGL program: ${o}`)}return r}function et(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 Kt(n){return typeof n=="object"&&n!==null&&n.name==="SecurityError"}const Vt=.09,qt=1e-4,it=.05,Yt=1e-4;class $t{constructor(t,e=Vt){h(this,"current");h(this,"target",null);h(this,"timeConstant");this.current={...t},this.timeConstant=e}get destination(){return this.target?{...this.target.state}:{...this.current}}set(t){this.current={...t},this.target=null}animateTo(t,e,i=false){if(i||this.timeConstant===0){this.set(t.state);return}let s=t.anchor;if(s){const r=S(s.world,s.screen,t.state.zoom,t.state.rotation,e);Math.hypot(r.x-t.state.x,r.y-t.state.y)*t.state.zoom>it&&(s=void 0)}this.target={state:{...t.state},anchor:s}}stop(){this.target=null}step(t,e){const i=this.target;if(!i)return false;const s=1-Math.exp(-Math.max(t,0)/this.timeConstant),r=this.current,o=i.state,a=Math.exp(Math.log(r.zoom)+(Math.log(o.zoom)-Math.log(r.zoom))*s),d=r.rotation+(o.rotation-r.rotation)*s;let l;return i.anchor?l=S(i.anchor.world,i.anchor.screen,a,d,e):l={x:r.x+(o.x-r.x)*s,y:r.y+(o.y-r.y)*s},this.current={x:l.x,y:l.y,zoom:a,rotation:d},Math.abs(Math.log(o.zoom/a))<qt&&Math.abs(o.rotation-d)<Yt&&Math.hypot(o.x-l.x,o.y-l.y)*a<it?(this.current={...o},this.target=null,false):true}}const H={clickToZoom:true,dblClickToZoom:true,pinchToZoom:true,scrollToZoom:false,navigable:true},U=2,st=1.5,nt=.1,Qt=100,jt=200,Jt=.002,te=.01;class ee{constructor(t,e,i=H){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||Q(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;Bt(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 r=i2.x-e2.x,o=i2.y-e2.y;this.down&&Math.hypot(i2.x-this.down.x,i2.y-this.down.y)>Ot&&(this.down.moved=true),(s=this.down)!=null&&s.moved&&this.options.navigable&&this.target.panBy(r,o,false),this.samples.push({x:i2.x,y:i2.y,t:t2.timeStamp});const a=t2.timeStamp-Qt;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 r=this.pinchState();this.options.pinchToZoom&&this.pinch.distance>0&&this.target.zoomBy(r.distance/this.pinch.distance,r.mid,false),this.target.panBy(r.mid.x-this.pinch.mid.x,r.mid.y-this.pinch.mid.y,false),this.pinch=r}});h(this,"onPointerUp",t2=>{var d,l,f,m,c,u;if(!this.pointers.has(t2.pointerId))return;if(this.pointers.delete(t2.pointerId),(l=(d=this.element).releasePointerCapture)==null||l.call(d,t2.pointerId),this.pointers.size===1){this.pinch=null;const[p]=this.pointers.values();this.samples=[{...p,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<j){if((m=(f=this.target).dismiss)!=null&&m.call(f)){this.lastTap=null;return}if(J(t2.pointerType,this.penHovers)){const p=this.lastTap;this.options.navigable&&(this.options.clickToZoom||this.options.dblClickToZoom)&&p&&t2.timeStamp-p.t<j&&Math.hypot(i2.x-p.x,i2.y-p.y)<Ct?(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/U,i2,true):this.zoomIn(i2):(u=(c=this.target).tap)==null||u.call(c,i2);return}if(!this.options.navigable)return;const r=this.samples[0],o=this.samples[this.samples.length-1],a=((o==null?void 0:o.t)??0)-((r==null?void 0:r.t)??0);if(r&&o&&a>0&&t2.timeStamp-o.t<50){const p=(o.x-r.x)/a*1e3,w=(o.y-r.y)/a*1e3;Math.hypot(p,w)>jt&&this.target.flick(p,w)}});h(this,"onDoubleClick",t2=>{this.options.navigable&&(this.options.clickToZoom||!this.options.dblClickToZoom||J(this.lastPointerType,this.penHovers)||Q(t2.target,this.element)||(t2.shiftKey?this.target.zoomBy(1/U,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&&Ut(t2.target,this.element,t2.deltaY))return;t2.preventDefault();const i2=ie(t2),s=e2?te:Jt;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*nt*(t2.shiftKey?3:1),s=e2.height*nt*(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(st,void 0,true);break;case"-":case"_":this.target.zoomBy(1/st,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(U,t,true)}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 ie(n){return n.deltaMode===1?n.deltaY*16:n.deltaMode===2?n.deltaY*400:n.deltaY}class mt extends Error{constructor(t,e,i){super(t),this.url=e,this.status=i,this.name="ImageLoadError"}}const rt=new Set;async function se(n,t={}){const{signal:e,maxTextureSize:i,request:s}=t,r=zt(s),o=re(n);if(typeof createImageBitmap!="function"||typeof fetch!="function")return z(n,{signal:e,cors:true,withCredentials:r});if(o&&rt.has(o))return z(n,{signal:e,cors:false,withCredentials:r});let a;try{a=await Wt(s,n,{mode:"cors",signal:e})}catch(c){if(oe(c,e))throw c;const u=await z(n,{signal:e,cors:false,withCredentials:r});return o&&rt.add(o),u}if(!a.ok)throw new mt(`Image request failed with ${a.status}`,n,a.status);const d=await a.blob();let l=await ne(d);const f=l.width,m=l.height;if(i&&(l.width>i||l.height>i)){const c=i/Math.max(l.width,l.height),u=await createImageBitmap(l,{resizeWidth:Math.max(1,Math.floor(l.width*c)),resizeHeight:Math.max(1,Math.floor(l.height*c)),resizeQuality:"high"});l.close(),l=u}if(e!=null&&e.aborted)throw l.close(),G();return{kind:"bitmap",source:l,width:l.width,height:l.height,naturalWidth:f,naturalHeight:m,opaque:false}}async function ne(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 z(n,{signal:t,cors:e,withCredentials:i}){return new Promise((s,r)=>{if(t!=null&&t.aborted){r(G());return}const o=new Image;o.decoding="async",e&&(o.crossOrigin=i?"use-credentials":"anonymous");const a=()=>{o.onload=null,o.onerror=null,t==null||t.removeEventListener("abort",d)},d=()=>{a(),o.src="",r(G())};t==null||t.addEventListener("abort",d),o.onload=()=>{a();const l=()=>s({kind:"element",source:o,width:o.naturalWidth,height:o.naturalHeight,naturalWidth:o.naturalWidth,naturalHeight:o.naturalHeight,opaque:!e});typeof o.decode=="function"?o.decode().then(l,l):l()},o.onerror=()=>{a(),r(new mt("Image failed to load",n))},o.src=n})}function re(n){var t;try{return new URL(n,(t=globalThis.location)==null?void 0:t.href).origin}catch{return null}}function oe(n,t){return!!(t!=null&&t.aborted)||typeof n=="object"&&n!==null&&n.name==="AbortError"}function G(){const n=new Error("Aborted");return n.name="AbortError",n}function ot(n){n.kind==="bitmap"&&n.source.close()}const ae=192*1024*1024,he=6,ce=2;class le{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??ae,this.maxInFlight=t.maxInFlight??he}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:W(e),lastUsed:this.frame,attempts:0,pinned:false,waiters:(i==null?void 0:i.waiters)??[]}),this.bytes+=W(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(r=>{if(this.disposed||this.entries.get(t.url)!==t){ot(r);return}t.state="ready",t.image=r,t.bytes=W(r),t.controller=void 0,t.pinned=false,this.bytes+=t.bytes,this.settle(t)},r=>{if(!(i.signal.aborted||this.disposed)&&this.entries.get(t.url)===t){if(t.attempts<ce&&!de(r,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&&ot(i.image),this.options.onEvict(i.url)}}}function W(n){return n.width*n.height*4}function de(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 ue=.1;class fe{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,ue):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 me=2*1024*1024;function pe(n,t,e=me){const i=new Set;let s=e,r=false;return{get deferred(){return r},getTile(o){const a=n(o);if(!a||a.kind==="media"||a.opaque||i.has(o)||t(o))return a;const d=a.width*a.height*4;if(i.size>0&&d>s){r=true;return}return s-=d,i.add(o),a}}}function ge(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 we(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 r=i.split(",").map(Number);if(r.length!==4||r.some(p=>!Number.isFinite(p)))return null;let[o,a,d,l]=r;s&&(o=o/100*t,a=a/100*e,d=d/100*t,l=l/100*e);const f=Math.max(0,o),m=Math.max(0,a),c=Math.min(t,o+d),u=Math.min(e,a+l);return c<=f||u<=m?null:{x:f,y:m,width:c-f,height:u-m}}const F=512,ye=16e6;function pt(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 xe(n){const{width:t,height:e}=n,i=[],s=n.regionByPx&&n.sizeByW,r=(c,u,p)=>{const w=Math.ceil(t/c),y=Math.ceil(e/c);return{scaleFactor:c,width:w,height:y,tileWidth:u,tileHeight:p,cols:Math.ceil(w/u),rows:Math.ceil(y/p)}},o=(c,u)=>({scaleFactor:t/c,width:c,height:u,tileWidth:c,tileHeight:u,cols:1,rows:1,whole:true}),a=n.tiles[0];if(a)for(const c of a.scaleFactors)i.push(r(c,a.width,a.height));else if(s)for(let c=1;;c*=2){const u=r(c,F,F);if(i.push(u),u.cols===1&&u.rows===1)break}const d=Math.max(0,...i.map(c=>c.scaleFactor));for(const c of n.sizes){const u=t/c.width;ve(n,c.width,c.height)&&u>d+1e-9&&i.push(o(c.width,c.height))}const l=i.reduce((c,u)=>!c||u.scaleFactor>c.scaleFactor?u:c,null);if(l&&l.cols*l.rows>1&&n.sizeByW){const c=Math.max(t,e)/F;i.push(o(Math.ceil(t/c),Math.ceil(e/c)))}(!i.length||!a&&!s&&t*e<=ye)&&(i.some(c=>c.scaleFactor===1)||i.push(o(t,e)));const f=be(i).sort((c,u)=>u.scaleFactor-c.scaleFactor),m=Ft(n);return{width:t,height:e,levels:f,tile(c){const u=f[c.level],p=u.scaleFactor,w=u.cols===1&&u.rows===1;let y,v,b;if(w)y={x:0,y:0,width:t,height:e},v=u.width,b=u.height;else{const I=Math.round(c.col*u.tileWidth*p),E=Math.round(c.row*u.tileHeight*p);y={x:I,y:E,width:Math.min(Math.round(u.tileWidth*p),t-I),height:Math.min(Math.round(u.tileHeight*p),e-E)},v=Math.ceil(y.width/p),b=Math.ceil(y.height/p)}return{...c,region:y,url:tt(n,y,v,b),fallbackUrl:m?tt(n,y,v,b,m):void 0}}}}function ve(n,t,e){return!(n.maxWidth&&t>n.maxWidth||n.maxHeight&&e>n.maxHeight||n.maxArea&&t*e>n.maxArea)}function be(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 Te(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 T(n,t,e){const i=n.levels[t],s=i.tileWidth*i.scaleFactor,r=i.tileHeight*i.scaleFactor,o=Math.max(0,e.x),a=Math.max(0,e.y),d=Math.min(n.width,e.x+e.width),l=Math.min(n.height,e.y+e.height);if(d<=o||l<=a)return[];const f=Math.max(0,Math.floor(o/s)),m=Math.min(i.cols-1,Math.floor((d-1e-9)/s)),c=Math.max(0,Math.floor(a/r)),u=Math.min(i.rows-1,Math.floor((l-1e-9)/r)),p=[];for(let w=c;w<=u;w++)for(let y=f;y<=m;y++)p.push({level:t,col:y,row:w});return p}async function Ee(n,t){if(n.media)return Me(n,n.media);let e=null,i=null;if(n.service)try{e=xe(await Dt(n.service,t.infoOptions))}catch(c){i=c}if(!e){if(!n.url)throw i??new Error("Image has no source");const c=await t.loadStatic(n.url);t.cache.seed(n.url,c),e=pt(n.url,c.naturalWidth,c.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},r=we(n.region,s.width,s.height)??{x:0,y:0,width:s.width,height:s.height},o=e.width/s.width,a=e.height/s.height,d={x:r.x*o,y:r.y*a,width:r.width*o,height:r.height*a},l=ge(n.rotation),f=l?ke(d,l):void 0,m={id:n.id,spec:n,pyramid:e,size:s,clip:d,contentClip:r,rect:{x:0,y:0,width:r.width,height:r.height},...f?{turn:f}:{}};return await t.cache.prefetch(T(e,0,d).map(c=>{const u=e.tile(c);return{url:u.url,fallbackUrl:u.fallbackUrl}})),m}const gt="media:";function Me(n,t){var a,d;const e=n.width||((a=n.placement)==null?void 0:a.width)||t.element.videoWidth||1600,i=n.height||((d=n.placement)==null?void 0:d.height)||t.element.videoHeight||900,s=`${gt}${n.id}`,r={width:e,height:i},o={x:0,y:0,width:e,height:i};return{id:n.id,spec:n,pyramid:pt(s,e,i),media:{kind:"media",source:t.element,width:e,height:i,naturalWidth:e,naturalHeight:i},size:r,clip:o,contentClip:o,rect:{...o}}}function ke(n,{degrees:t,mirror:e}){const i=t*Math.PI/180,s=f=>Math.abs(f)<1e-12?0:f,r=s(Math.cos(i)),o=s(Math.sin(i)),a=Math.abs(n.width*r)+Math.abs(n.height*o),d=Math.abs(n.width*o)+Math.abs(n.height*r),l=k(L(a/2,d/2),{a:r,b:o,c:-o,d:r,e:0,f:0},_(e?-1:1,1),L(-(n.x+n.width/2),-(n.y+n.height/2)));return{orient:l,unorient:kt(l),width:a,height:d}}function wt(n){var t;return((t=n.turn)==null?void 0:t.orient)??L(-n.clip.x,-n.clip.y)}function _e(n,t){const{turn:e,clip:i}=n;if(!e)return{...t,x:i.x+t.x,y:i.y+t.y};const s=ft(e.unorient,t),r=Math.max(s.x,i.x),o=Math.max(s.y,i.y);return{x:r,y:o,width:Math.max(0,Math.min(s.x+s.width,i.x+i.width)-r),height:Math.max(0,Math.min(s.y+s.height,i.y+i.height)-o)}}function Le(n,t){const{turn:e,clip:i}=n;return e?ut(e.unorient,t):{x:i.x+t.x,y:i.y+t.y}}function at(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 Pe(n){if(!n.length)return null;if(n.every(i=>i.spec.placement)){for(const i of n)i.rect={...i.spec.placement};return dt(n.map(i=>i.rect))}const t=at(n[0]).height;let e=0;for(const i of n){const s=at(i),r=s.width*t/s.height;i.rect={x:e,y:0,width:r,height:t},e+=r}return{x:0,y:0,width:e,height:t}}function B(n){const t=n.turn??n.clip;return{x:n.rect.width/t.width,y:n.rect.height/t.height}}function Ie(n){const t=B(n);return k(L(n.rect.x,n.rect.y),_(t.x,t.y),wt(n))}function Ae(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 Se=1e7,Re=15e6,Be=2e7,Oe=2;function Ce(n){const{items:t,camera:e,viewport:i,pixelRatio:s,getTile:r,destination:o}=n,a=It(e,i),d=[],l=[],f=[],m=(c,u,p)=>{const w=c.tile(u);l.push({url:w.url,fallbackUrl:w.fallbackUrl,priority:p})};for(const c of t){const{pyramid:u,clip:p,rect:w}=c,y=B(c);if(n.wantOverview)for(const g of T(u,0,p))m(u,g,Be);const v=ht(c,e,i,s),b=o?ht(c,o,i,s):v;if(f.push((v==null?void 0:v.target)??-1),!v&&!b)continue;const I=g=>x=>{const P=u.tile(x).region;return Math.hypot(P.x+P.width/2-g.x,P.y+P.height/2-g.y)};if(b){const g=I(b.center);for(const x of T(u,0,b.area))m(u,x,g(x)/1e3);if(b.target>0)for(const x of T(u,b.target,b.area))m(u,x,Se+g(x))}if(!v)continue;const{area:E,target:M}=v,Z=I(v.center),O=T(u,0,E),K=M===0?[]:T(u,M,E);if(b!==v){for(const x of O)m(u,x,Z(x)/1e3);const g=M-Oe;if(g>0)for(const x of T(u,g,E))m(u,x,Re+Z(x))}if(c.spec.hidden)continue;const yt=(M===0?O:K).every(g=>r(u.tile(g).url)!==void 0)?[M]:Array.from({length:M+1},(g,x)=>x),xt=k(a,L(w.x,w.y),_(y.x,y.y),wt(c));for(const g of yt){const x=g===0?O:g===M?K:T(u,g,E),P=u.levels[g].cols*u.levels[g].rows>1;for(const vt of x){const C=u.tile(vt),V=r(C.url);if(!V)continue;const q=Ue(c,C.region,V,xt,P);q&&d.push({...q,url:C.url})}}}return l.sort((c,u)=>c.priority-u.priority),{draws:d,wants:ze(l),levels:f}}function ht(n,t,e,i){const{pyramid:s,rect:r}=n,o=N(t,e);if(!_t(o,r))return null;const a=B(n),d=Math.max(o.x,r.x),l=Math.max(o.y,r.y),f=Math.min(o.x+o.width,r.x+r.width),m=Math.min(o.y+o.height,r.y+r.height),c=1/(a.x*t.zoom*i);return{area:_e(n,{x:(d-r.x)/a.x,y:(l-r.y)/a.y,width:(f-d)/a.x,height:(m-l)/a.y}),center:Le(n,{x:(t.x-r.x)/a.x,y:(t.y-r.y)/a.y}),target:Te(s,c)}}function Ue(n,t,e,i,s){const{clip:r}=n,o=Math.max(t.x,r.x),a=Math.max(t.y,r.y),d=Math.min(t.x+t.width,r.x+r.width),l=Math.min(t.y+t.height,r.y+r.height);if(d<=o||l<=a)return null;const f=e.width/t.width,m=e.height/t.height,c=1e-6;return{item:n,image:e,transform:k(i,L(t.x,t.y),_(1/f,1/m)),crop:{x:(o-t.x)*f,y:(a-t.y)*m,width:(d-o)*f,height:(l-a)*m},bleed:{right:s&&d<r.x+r.width-c,bottom:s&&l<r.y+r.height-c}}}function ze(n){const t=new Set;return n.filter(e=>t.has(e.url)?false:(t.add(e.url),true))}const We={maxZoomPixelRatio:1.1,minZoomImageRatio:.9,animationTime:.09,request:void 0,byteBudget:192*1024*1024,maxInFlight:6,releaseAfterMs:2e3},Fe=2,De=3,Ne=.1,He=1e-6,X={top:0,right:0,bottom:0,left:0};function ct(n,t="padding"){if(!n||typeof getComputedStyle!="function")return X;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 Ge=(n,t)=>n.top===t.top&&n.right===t.right&&n.bottom===t.bottom&&n.left===t.left;let Xe;class Ze{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",X);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,"lastEmitted",null);h(this,"generation",0);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 d,l;if(this.disposed)return false;const e2=this.camera.step(t2,this.viewport),i=this.camera.current,s=this.backend,r=pe(this.getTile,f=>s?s.has(f):true),o=Ce({items:this.items,camera:i,viewport:this.viewport,pixelRatio:this.pixelRatio,getTile:r.getTile,wantOverview:!!this.navigator,destination:e2?this.camera.destination:void 0}),a=o.wants.filter(f=>!f.url.startsWith(gt));return this.cache.update(a),o.draws.length?this.setUnloadable(false):a.length&&a.every(f=>this.cache.failed(f.url))&&this.setUnloadable(true),this.paint(o.draws),(d=this.overlays)==null||d.position(i,this.viewport),(l=this.navigator)==null||l.render(this.items.filter(f=>!f.spec.hidden),this.worldBounds,N(i,this.viewport),this.pixelRatio,this.getTile,this.contentVersion),(!this.lastEmitted||!Rt(this.lastEmitted,i))&&(this.lastEmitted={...i},this.opened&&this.emit("viewport")),e2||r.deferred});h(this,"getTile",t2=>this.mediaByKey.get(t2)??this.cache.get(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={...We,...D(e)},Ve()&&(this.options.animationTime=0),this.camera=new $t({x:0,y:0,zoom:1,rotation:0},this.options.animationTime),this.loop=new fe(this.tick),this.gestureOptions=D(e.gestures??{}),this.gestures=new ee(t,this,{...H,...this.gestureOptions}),this.cache=new le({load:(i,s)=>this.loadTile(i,s),onSettled:()=>{this.contentVersion++,this.invalidate()},onEvict:i=>{var s;return(s=this.backend)==null?void 0:s.release(i)},byteBudget:this.options.byteBudget,maxInFlight:this.options.maxInFlight}),this.visible=Ke(t),this.visible?this.acquireBackend():this.holder.hiddenSince=lt(),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,r=new Map(this.items.map(f=>[f.id,f])),o=await Promise.allSettled(t.map(f=>{const m=r.get(f.id);return m&&Ae(m.spec,f)?(m.spec=f,Promise.resolve(m)):Ee(f,{cache:this.cache,loadStatic:c=>this.loadTile(c),infoOptions:{request:this.options.request}})}));if(s!==this.generation||this.disposed)return;const a=o.filter(f=>f.status==="fulfilled").map(f=>f.value),d=o.filter(f=>f.status==="rejected").map(f=>f.reason);this.items=a,this.watchMedia(a);const l=Pe(a);if(this.worldBounds=e?l?dt([e,l]):e:l,this.contentVersion++,d.length&&this.emit("error",d),this.setUnloadable(t.length>0&&!a.length&&d.length>0),!this.worldBounds){this.invalidate();return}this.opened?i?(this.home(true),this.emit("change")):(this.camera.set(this.constrain(this.camera.current)),this.emit("change")):(this.opened=true,this.home(true),this.emit("open")),this.invalidate()}clear(){this.setUnloadable(false),this.generation++,this.items=[],this.watchMedia([]),this.worldBounds=null,this.contentVersion++,this.invalidate()}setHidden(t){const e=new Set(t);let i=false;for(const s of this.items){const r=e.has(s.id);!!s.spec.hidden!==r&&(s.spec={...s.spec,hidden:r},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 r=0;r<i.cols;r++)if(!this.getTile(e.pyramid.tile({level:0,col:r,row:s}).url))return false;return true}fitBounds(t,e=false,i=X){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:r,left:o}){const{width:a,height:d}=this.viewport,{zoom:l}=At(t,{width:Math.max(1,a-o-s),height:Math.max(1,d-i-r)},e);return{...S(Lt(t),{x:(a+o-s)/2,y:(d+i-r)/2},l,e,this.viewport),zoom:l,rotation:e}}fitItemRect(t,e,i=false){const s=this.itemRectToWorld(t,e);s&&this.fitAnnotation(s,i)}fitAnnotation(t,e=false){var r;const i=this.items[0];if(!i)return;const s=i.rect.width*Ne;this.fitBounds({x:t.x-s,y:t.y-s,width:t.width+s*2,height:t.height+s*2},e,ct((r=this.overlays)==null?void 0:r.container,"scroll-padding"))}getBounds(){return N(this.camera.current,this.viewport)}getHomeBounds(){return this.worldBounds?{...this.worldBounds}:null}getCamera(){return{...this.camera.current}}getZoomLimits(){var i;const t=((i=this.homeCamera())==null?void 0:i.zoom)??1,e=this.items.length?Math.min(...this.items.map(s=>B(s).x)):1;return{home:t,min:t*this.options.minZoomImageRatio,max:Math.max(t,this.options.maxZoomPixelRatio/e)}}home(t=false){const e=this.homeCamera();e&&(this.atHome=true,this.animateTo(e,t))}atMaxZoom(){return this.camera.destination.zoom>=this.getZoomLimits().max*(1-He)}zoomBy(t,e,i=true){const s=i?this.camera.destination:this.camera.current,r=e??{x:this.viewport.width/2,y:this.viewport.height/2},o=$(s,this.viewport,r),{min:a,max:d}=this.getZoomLimits(),l=A(s.zoom*t,a,d),f=S(o,r,l,s.rotation,this.viewport),m=this.constrain({...s,...f,zoom:l});this.atHome=false,i?this.camera.animateTo({state:m,anchor:{world:o,screen:r}},this.viewport):this.camera.set(m),this.invalidate()}panBy(t,e,i=false){const s=i?this.camera.destination:this.camera.current,r=ut(k(_(1/s.zoom),Pt(-s.rotation)),{x:t,y:e}),o=this.constrain({...s,x:s.x-r.x,y:s.y-r.y});this.atHome=false,i?this.camera.animateTo({state:o},this.viewport):this.camera.set(o),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)}flick(t,e){this.panBy(t*.25,e*.25,true)}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({...H,...this.gestureOptions,...D(t)})}setInteracting(t){t&&this.camera.stop()}worldToScreenPoint(t){return St(this.camera.current,this.viewport,t)}screenToWorldPoint(t){return $(this.camera.current,this.viewport,t)}itemRectToWorld(t,e){const i=this.items[t];if(!i)return null;const{contentClip:s,clip:r}=i;if(i.turn)return ft(k(Ie(i),_(r.width/s.width,r.height/s.height)),e);const o=i.rect.width/s.width,a=i.rect.height/s.height;return{x:i.rect.x+(e.x-s.x)*o,y:i.rect.y+(e.y-s.y)*a,width:e.width*o,height:e.height*a}}attachNavigator(t){var r;(r=this.navigator)==null||r.dispose(),this.navigator=null;const e=++this.navigatorAsked;let i=null,s=false;return import("./Navigator-Bx4zS0Yr.mjs").then(o=>{s||this.disposed||e!==this.navigatorAsked||(i=new o.Navigator(t,(a,d)=>this.panTo(a,d)),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,r,o,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),(r=this.navigator)==null||r.dispose(),this.navigator=null,this.releaseBackend(),this.cache.dispose(),(o=this.dom)==null||o.dispose(),(a=this.overlays)==null||a.dispose(),this.items=[],this.detachMedia.forEach(d=>d()),this.mediaByKey.clear(),this.listeners.clear(),delete this.host.dataset.backend)}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,r=()=>this.invalidate(),o=["play","seeked","loadeddata","resize"];o.forEach(a=>s.addEventListener(a,r)),this.detachMedia.push(()=>o.forEach(a=>s.removeEventListener(a,r)))}}paint(t){const e=this.backend,i=[],s=(e==null?void 0:e.kind)==="webgl2";e==null||e.begin();for(const r of t){const{image:o}=r;if(!(o.kind==="media"||o.kind==="element"&&s&&(o.opaque||this.opaqueUrls.has(r.url)))&&e){if(e.draw({key:r.url,source:o.source,width:o.width,height:o.height,transform:r.transform,crop:r.crop,opacity:1,bleed:r.bleed})!=="tainted"||o.kind==="bitmap")continue;this.opaqueUrls.add(r.url)}(o.kind==="element"||o.kind==="media")&&i.push({key:`${r.item.id}|${r.url}`,element:o.source,width:o.width,height:o.height,transform:r.transform,crop:r.crop,opacity:1})}e==null||e.end(),this.dom?this.dom.sync(i):i.length&&!this.domAsked&&(this.domAsked=true,import("./DomLayers-BxPU05-D.mjs").then(({DomLayers:r})=>{if(this.disposed)return;const o=new r(this.host);this.overlays&&this.host.insertBefore(o.container,this.overlays.container),this.dom=o,this.invalidate()}))}loadTile(t,e){return se(t,{signal:e,request:this.options.request,maxTextureSize:this.backend instanceof R?this.backend.maxTextureSize:void 0})}animateTo(t,e){this.camera.animateTo({state:t},this.viewport,e),this.invalidate()}homeCamera(){if(!this.worldBounds)return null;const t=2*Math.PI,e=Math.round(this.camera.destination.rotation/t)*t||0;return this.fit(this.worldBounds,e,this.inset)}constrain(t,{allowBeyondLimits:e=false}={}){const i=this.worldBounds;if(!i)return t;const{min:s,max:r}=this.getZoomLimits(),o=e?A(t.zoom,s,Math.max(r,t.zoom)):A(t.zoom,s,r);return{...t,zoom:o,x:A(t.x,i.x,i.x+i.width),y:A(t.y,i.y,i.y+i.height)}}acquireBackend(t=true){var r,o;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,((r=this.dom)==null?void 0:r.container)??((o=this.overlays)==null?void 0:o.container)??null);const i=t&&(this.backendPreference==="webgl2"||this.backendPreference==="auto"&&this.contextLosses<De);let s=null;i&&(Et(this.holder)||this.backendPreference==="webgl2")&&(s=R.create(e,{onLost:this.onContextLost}),s||Y(this.holder)),s?this.install(s):this.backendPreference==="webgl2"?this.none(e):(this.pending=e,(Xe??(Xe=import("./Canvas2DBackend-8wFavYdl.mjs"))).then(({Canvas2DBackend:a})=>{if(this.pending!==e)return;this.pending=null;const d=a.create(e);d?this.install(d):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(Y(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=lt()),!(!this.backend||this.releaseTimer)&&(this.releaseTimer=setTimeout(()=>this.giveBack(),this.options.releaseAfterMs))}measure(t=false){var d;const e=this.host.getBoundingClientRect(),i=Math.max(1,e.width),s=Math.max(1,e.height),r=ct(this.host),o=Math.min(typeof window<"u"&&window.devicePixelRatio||1,Fe);if(i===this.viewport.width&&s===this.viewport.height&&o===this.pixelRatio&&Ge(r,this.inset))return;const a=this.viewport;if(this.viewport={width:i,height:s},this.inset=r,this.pixelRatio=o,(d=this.backend)==null||d.resize(i,s,o),this.opened)if(this.atHome)this.home(true);else{const l=this.camera.current,f=i/Math.max(a.width,1);this.camera.set(this.constrain({...l,zoom:l.zoom*f}))}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 lt=()=>typeof performance<"u"?performance.now():Date.now();function Ke(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 Ve(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function D(n){return Object.fromEntries(Object.entries(n).filter(([,t])=>t!==void 0))}const si=(n,t)=>new Ze(n,t);export{Ht as b,Nt as h,Ce as p,si 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,aC as p,_ as d,k as m}from"./shared-DkY2a89G.mjs";import"./styles-DkkVOSUQ.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 C(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{C as toRenderers};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{x as n,
|
|
1
|
+
import{x as n,Y as o,Q as r}from"./shared-DkY2a89G.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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a1 as a}from"./shared-DkY2a89G.mjs";function c(t){try{const o=new URL(t).pathname.split("/").filter(Boolean).pop();return o?decodeURIComponent(o):"download"}catch{return"download"}}async function i(t,o){try{const r=await a(o,t,{referrerPolicy:"no-referrer"});if(!r.ok)return false;const n=URL.createObjectURL(await r.blob()),e=document.createElement("a");return e.href=n,e.download=c(t),document.body.append(e),e.click(),e.remove(),setTimeout(()=>URL.revokeObjectURL(n),1e4),true}catch{return false}}export{c as fileName,i as saveFile};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ay as w,S as f,a9 as x,U as S}from"./shared-DkY2a89G.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=$(c)}return E(i,t)}function T(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 $(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 E(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?T(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{E as readResults,b as search,R as searchInto};
|