@nulib/clover 4.5.4 → 4.5.6
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/Annotations/Annotations.mjs +6 -2
- package/dist/core/content-state-reader.mjs +1 -1
- package/dist/core/follow-content.mjs +170 -0
- package/dist/core/link.mjs +13 -10
- package/dist/core/load.mjs +14 -38
- package/dist/i18n/locales/en.json.mjs +1 -1
- package/dist/i18n/locales/es.json.mjs +1 -1
- package/dist/i18n/locales/fi.json.mjs +1 -1
- package/dist/i18n/locales/fr.json.mjs +1 -1
- package/dist/i18n/locales/it.json.mjs +1 -1
- package/dist/i18n/locales/ja.json.mjs +1 -1
- package/dist/i18n/locales/nb.json.mjs +1 -1
- package/dist/i18n/locales/nn.json.mjs +1 -1
- package/dist/i18n/locales/no.json.mjs +1 -1
- package/dist/i18n/locales/pt.json.mjs +1 -1
- package/dist/i18n/locales/zh-Hans.json.mjs +1 -1
- package/dist/i18n/locales/zh-Hant.json.mjs +1 -1
- package/dist/index.d.mts +8 -5
- package/dist/map/index.d.mts +5 -3
- package/dist/styles/core.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/templates/index.d.mts +5 -3
- package/dist/ui/ExternalGlyph.mjs +22 -0
- package/dist/web-components/{About-DCeIMPXs.mjs → About-C-o1MARK.mjs} +1 -1
- package/dist/web-components/{AnnotationItems-vokjqFpJ.mjs → AnnotationItems-BtX1-AkD.mjs} +1 -1
- package/dist/web-components/{AnnotationMenu-n8wZulkI.mjs → AnnotationMenu-eXo5QJ9p.mjs} +1 -1
- package/dist/web-components/{AnnotationState-DJSkyiw0.mjs → AnnotationState-B4-vsjYK.mjs} +1 -1
- package/dist/web-components/Annotations-BMMp4TzW.mjs +2 -0
- package/dist/web-components/{Annotations-CgPEcwft.mjs → Annotations-KJI1g3JX.mjs} +1 -1
- package/dist/web-components/{Body-h5ykt3jO.mjs → Body-Bx9aZhz_.mjs} +1 -1
- package/dist/web-components/{BodyAlert-COFJjxVV.mjs → BodyAlert-01XtjU91.mjs} +1 -1
- package/dist/web-components/{Button-CgTdpmNf.mjs → Button-DmqdooHe.mjs} +1 -1
- package/dist/web-components/{Camera-i2fafLIh.mjs → Camera-ZgGejDUV.mjs} +1 -1
- package/dist/web-components/{Canvas2DBackend-C2AYDVCI.mjs → Canvas2DBackend-B1YLZdY_.mjs} +1 -1
- package/dist/web-components/{CanvasView-uvJ5kDYN.mjs → CanvasView-BRtiqo9o.mjs} +2 -2
- package/dist/web-components/{CaptionDetails-m7amd8MS.mjs → CaptionDetails-JtN_s8Vd.mjs} +1 -1
- package/dist/web-components/{ChaptersMenu-6dDzuI0m.mjs → ChaptersMenu-nW6su_V2.mjs} +1 -1
- package/dist/web-components/{Chevron-DVax9RTn.mjs → Chevron-C6B1ERz3.mjs} +1 -1
- package/dist/web-components/{ChoiceMenu-DH4n5jdL.mjs → ChoiceMenu-Ep3PVmNU.mjs} +1 -1
- package/dist/web-components/{Collection-CCjFTuVG.mjs → Collection-IHIeRtAZ.mjs} +1 -1
- package/dist/web-components/{CollectionSelect-0wNC970P.mjs → CollectionSelect-CFak4aY5.mjs} +1 -1
- package/dist/web-components/{Connected-Cr4h-tHh.mjs → Connected-CNWHy7Nf.mjs} +1 -1
- package/dist/web-components/{Connected-CssvezHA.mjs → Connected-CVQI5ppY.mjs} +1 -1
- package/dist/web-components/{Connected-CGF0cSzv.mjs → Connected-DBFLtGSX.mjs} +1 -1
- package/dist/web-components/{Contents-Cs7_X8jD.mjs → Contents-H1p0ziCX.mjs} +1 -1
- package/dist/web-components/{ControlMenu-J-gMDza-.mjs → ControlMenu-Dzc3r70f.mjs} +1 -1
- package/dist/web-components/ControlsFade-COi8-AZI.mjs +1 -0
- package/dist/web-components/{CountMenu--Z7rGivu.mjs → CountMenu-CVXxogQn.mjs} +1 -1
- package/dist/web-components/Cue-CQFnHV1R.mjs +1 -0
- package/dist/web-components/{Document-D5r6QJ9F.mjs → Document-Bq69tdp9.mjs} +1 -1
- package/dist/web-components/{DomLayers-6wCUT5ap.mjs → DomLayers-BNFCWPIf.mjs} +1 -1
- package/dist/web-components/{Download-Cff-mZmi.mjs → Download-8s_1j0hn.mjs} +1 -1
- package/dist/web-components/{EntryBodies-D2OorCCX.mjs → EntryBodies-CuH57Wdm.mjs} +1 -1
- package/dist/web-components/{EntryThumbnail-iY1cnsAP.mjs → EntryThumbnail-BBn3c02-.mjs} +1 -1
- package/dist/web-components/{FieldPill-Swznzuhd.mjs → FieldPill-CDDBQn83.mjs} +1 -1
- package/dist/web-components/{FrameAnimation-CjHUil6t.mjs → FrameAnimation-OBaRI-rP.mjs} +1 -1
- package/dist/web-components/{Gallery-CCKnJzQY.mjs → Gallery-BY4cH76P.mjs} +1 -1
- package/dist/web-components/{GlobeGlyph-D_ZaGUO8.mjs → GlobeGlyph-DgNI--BA.mjs} +1 -1
- package/dist/web-components/{HideToggle-D_n5lwkp.mjs → HideToggle-CQcp5w_t.mjs} +1 -1
- package/dist/web-components/{ImageControls-Dk8F5lUA.mjs → ImageControls-DREK-1SC.mjs} +1 -1
- package/dist/web-components/{Items-CbO0GqAH.mjs → Items-eaCz7ufI.mjs} +1 -1
- package/dist/web-components/{Label-jKQGRD5d.mjs → Label-Cur5KZAJ.mjs} +1 -1
- package/dist/web-components/{LanguageChoice-e7MGPRCd.mjs → LanguageChoice-BWmkORxS.mjs} +1 -1
- package/dist/web-components/{LanguageMenu-BsWzKg__.mjs → LanguageMenu-CW1_hI1x.mjs} +1 -1
- package/dist/web-components/{LightboxView-BjJ20ylQ.mjs → LightboxView-Cd92FAYV.mjs} +1 -1
- package/dist/web-components/{ListEnd-BXjH6six.mjs → ListEnd-CefIIerg.mjs} +1 -1
- package/dist/web-components/{Loaded-CL-mpRHG.mjs → Loaded-DtzpCxju.mjs} +1 -1
- package/dist/web-components/{LoadedCanvas-juLvz5vu.mjs → LoadedCanvas-CUrQv2k_.mjs} +1 -1
- package/dist/web-components/LoadedMap-BVkNlBeH.mjs +1 -0
- package/dist/web-components/{Loading-DGPqbYw2.mjs → Loading-DhTFaFBg.mjs} +1 -1
- package/dist/web-components/{Map-0ImX0W-q.mjs → Map-eb1aK0Z9.mjs} +1 -1
- package/dist/web-components/{MapView-B-etTZqp.mjs → MapView-3j8gkLYi.mjs} +2 -2
- package/dist/web-components/{Markup-D5v_pfK-.mjs → Markup-Dy6leTBV.mjs} +1 -1
- package/dist/web-components/{MediaBody-BBu6nfi8.mjs → MediaBody-DMrJQG34.mjs} +1 -1
- package/dist/web-components/{MediaBody-CU6BHhYo.mjs → MediaBody-Dg0-LWYL.mjs} +1 -1
- package/dist/web-components/{NavDate-CJkis3CR.mjs → NavDate-Ck30M1Ve.mjs} +1 -1
- package/dist/web-components/{Navigator-CHoyJlHU.mjs → Navigator-B9rs7wKo.mjs} +1 -1
- package/dist/web-components/{Pager-CObS0xYo.mjs → Pager-BV2GC__-.mjs} +1 -1
- package/dist/web-components/{PagerLayout-DEwXb6TF.mjs → PagerLayout-Cd08Alpt.mjs} +1 -1
- package/dist/web-components/{Panel-CyP3eeQ5.mjs → Panel-DR6ycHyX.mjs} +1 -1
- package/dist/web-components/PanelPart-BJwA1Z3f.mjs +1 -0
- package/dist/web-components/{PanelToggle-CxkqIgxi.mjs → PanelToggle-gAffLvlc.mjs} +1 -1
- package/dist/web-components/{PartOfManifest-Cn_HgJ7I.mjs → PartOfManifest-nziNto_q.mjs} +1 -1
- package/dist/web-components/{Pending-DI4VIePO.mjs → Pending-D1rYOP_R.mjs} +1 -1
- package/dist/web-components/{PlaceBox-CHl0X25c.mjs → PlaceBox-C2JMFQV0.mjs} +1 -1
- package/dist/web-components/{Placeholder-Cg3ByN0S.mjs → Placeholder-BDMLULRp.mjs} +1 -1
- package/dist/web-components/{Position-DMsgzBqP.mjs → Position-IRJVIQdA.mjs} +1 -1
- package/dist/web-components/{Primitives-7dLlwNwr.mjs → Primitives-DqRNtE60.mjs} +1 -1
- package/dist/web-components/{Provider-YGHeWGVP.mjs → Provider-DPSj538n.mjs} +1 -1
- package/dist/web-components/{ReadMore-D80et8BG.mjs → ReadMore-B2DB6MuP.mjs} +1 -1
- package/dist/web-components/{Root-CUaKZDXj.mjs → Root-DCA1d0D7.mjs} +1 -1
- package/dist/web-components/Scene-CS2xqRNL.mjs +1 -0
- package/dist/web-components/{SceneView-CunAaAoN.mjs → SceneView-YtkAJ2zP.mjs} +1 -1
- package/dist/web-components/{Search-C3LFmKil.mjs → Search-FWPa5UNO.mjs} +1 -1
- package/dist/web-components/{Sections-BT3WtluQ.mjs → Sections-73lsQFnt.mjs} +1 -1
- package/dist/web-components/{SeekMarks-DazilTox.mjs → SeekMarks-DLT93mL0.mjs} +1 -1
- package/dist/web-components/{StandaloneItems-8zvqQ2eQ.mjs → StandaloneItems-5d_3l6hK.mjs} +1 -1
- package/dist/web-components/{Status-CvunwdwM.mjs → Status-6tfWoLV_.mjs} +1 -1
- package/dist/web-components/{Steps-Cw27EFcs.mjs → Steps-DINk164Y.mjs} +1 -1
- package/dist/web-components/{TargetItems-_jmvEEEp.mjs → TargetItems-CouPOIsE.mjs} +1 -1
- package/dist/web-components/Timeline-j4BWRpk4.mjs +1 -0
- package/dist/web-components/{Tip-DxvfQm-l.mjs → Tip-CmrY2ZoP.mjs} +1 -1
- package/dist/web-components/{Transcript-C7pTS92q.mjs → Transcript-D-J5T_7K.mjs} +1 -1
- package/dist/web-components/{Transport-K0u9YhmA.mjs → Transport-BBGTe9TR.mjs} +1 -1
- package/dist/web-components/{Transport-hORVpyCc.mjs → Transport-Cy7wwjA5.mjs} +1 -1
- package/dist/web-components/{annotation-collection-y13MLLGX.mjs → annotation-collection-OX2RwxfU.mjs} +1 -1
- package/dist/web-components/{annotation-name-U_Yiz_CP.mjs → annotation-name-Cqw8uzpW.mjs} +1 -1
- package/dist/web-components/{annotations-content-B6PtnG5P.mjs → annotations-content-D8U3ZjMP.mjs} +1 -1
- package/dist/web-components/{body-Eiq36Gou.mjs → body-B7mRbGgu.mjs} +1 -1
- package/dist/web-components/{canvas-CDjBaQ75.mjs → canvas-BNnp_JHf.mjs} +1 -1
- package/dist/web-components/{cloverEngine-65MawacL.mjs → cloverEngine-9q7PRtb-.mjs} +1 -1
- package/dist/web-components/content-state-reader-DKXoVOui.mjs +1 -0
- package/dist/web-components/{controlGlyphs-BI3qUN6D.mjs → controlGlyphs-Bsm42pMw.mjs} +1 -1
- package/dist/web-components/{controls-Cc5LuT8p.mjs → controls-DO27swab.mjs} +1 -1
- package/dist/web-components/{downloads-Pq5Aedpe.mjs → downloads-BTKk4gk-.mjs} +1 -1
- package/dist/web-components/{dragToClose-DBlTMmyC.mjs → dragToClose-Dno8cLqV.mjs} +1 -1
- package/dist/web-components/{engine-BHQWLVxn.mjs → engine-yxhv49UX.mjs} +1 -1
- package/dist/web-components/{engines-BnPu5Ggs.mjs → engines-BT170pvZ.mjs} +1 -1
- package/dist/web-components/{es-B1NvdYp-.mjs → es-Bn4XnLxy.mjs} +1 -1
- package/dist/web-components/{fetchManifest-BKGaZzDw.mjs → fetchManifest-CV61siyX.mjs} +1 -1
- package/dist/web-components/{fi-BjtYZNLo.mjs → fi-CjAXeLqH.mjs} +1 -1
- package/dist/web-components/follow-content-1bNP_6Yi.mjs +1 -0
- package/dist/web-components/{fr-Cd22Lziw.mjs → fr-CeFhkxoi.mjs} +1 -1
- package/dist/web-components/{fromManifest-qxJrEfn6.mjs → fromManifest-ypX5N9bQ.mjs} +1 -1
- package/dist/web-components/{glyphs-PlEEwLrB.mjs → glyphs-1YNgPYCb.mjs} +1 -1
- package/dist/web-components/{hooks--n9dMuHb.mjs → hooks-Bj5sYuBM.mjs} +1 -1
- package/dist/web-components/{image-layers-BLqN0BKU.mjs → image-layers-CdogbVZE.mjs} +1 -1
- package/dist/web-components/{image-service-content-DHDgPYBV.mjs → image-service-content-j8IL6mb0.mjs} +1 -1
- package/dist/web-components/{imageService-DfXP25SW.mjs → imageService-D4p3HE1q.mjs} +1 -1
- package/dist/web-components/{index-BjpZQ9J-.mjs → index-D13DzX3i.mjs} +1 -1
- package/dist/web-components/index.mjs +1 -1
- package/dist/web-components/{it-UWaPOPDN.mjs → it-DxtfVek2.mjs} +1 -1
- package/dist/web-components/items-CLwd-kOq.mjs +1 -0
- package/dist/web-components/{items-BwKkJEOS.mjs → items-XHM03spJ.mjs} +1 -1
- package/dist/web-components/{ja-Cg1enUhM.mjs → ja-rsicBgWR.mjs} +1 -1
- package/dist/web-components/label-DOqlHvhq.mjs +1 -0
- package/dist/web-components/{layout-DbMbjpx4.mjs → layout-D6H3uuwu.mjs} +1 -1
- package/dist/web-components/link-D9hsGxQp.mjs +1 -0
- package/dist/web-components/logo-DpAvbwvh.mjs +1 -0
- package/dist/web-components/{models-BXBEOLKe.mjs → models-DaDtM_UM.mjs} +1 -1
- package/dist/web-components/{nb-CEwZDBiR.mjs → nb-BkyI1fhp.mjs} +1 -1
- package/dist/web-components/{nn-jYQhr9RI.mjs → nn-n_xM6AGl.mjs} +1 -1
- package/dist/web-components/{no-CEwZDBiR.mjs → no-BkyI1fhp.mjs} +1 -1
- package/dist/web-components/{nodes-BWN5jzoG.mjs → nodes-B-e9mbx0.mjs} +1 -1
- package/dist/web-components/{overlayImage-jvgcflf8.mjs → overlayImage-CSW7jSWt.mjs} +1 -1
- package/dist/web-components/{panel-BW39vvfB.mjs → panel-C5jcVkr6.mjs} +1 -1
- package/dist/web-components/part-Du5hBwFZ.mjs +1 -0
- package/dist/web-components/{playerSurface-PBbBGoj5.mjs → playerSurface-pHccePJd.mjs} +1 -1
- package/dist/web-components/{pointer-DsqyiOIC.mjs → pointer-rqjpl5E4.mjs} +1 -1
- package/dist/web-components/{provider-Dg6Gi5Ft.mjs → provider-B9QvZ_Y9.mjs} +1 -1
- package/dist/web-components/{pt-CWR30SzS.mjs → pt-COchUT7D.mjs} +1 -1
- package/dist/web-components/{range-regions-BmSXWBAS.mjs → range-regions-BQ8bqNTs.mjs} +1 -1
- package/dist/web-components/{read-more-BstyFDUC.mjs → read-more-BT_3kkHZ.mjs} +1 -1
- package/dist/web-components/{readingLanguages-BY2NUfQE.mjs → readingLanguages-B_k-QfX6.mjs} +1 -1
- package/dist/web-components/{rendererSurface-AGFetq7k.mjs → rendererSurface-CLbNE-t_.mjs} +2 -2
- package/dist/web-components/{renderers-BjtPgVnV.mjs → renderers-DHgTVdtM.mjs} +1 -1
- package/dist/web-components/{resource-i359_a15.mjs → resource-xQiWQSb9.mjs} +1 -1
- package/dist/web-components/{save-file-nlQm0Sup.mjs → save-file-Dp3LOhHi.mjs} +1 -1
- package/dist/web-components/{search-BPTt1eUz.mjs → search-DRZzJ0qo.mjs} +1 -1
- package/dist/web-components/shared-BTZk52xk.mjs +1 -0
- package/dist/web-components/{show-link-DwefC5LJ.mjs → show-link-CljTxYbA.mjs} +1 -1
- package/dist/web-components/{sizedImage-BBoqi5ZU.mjs → sizedImage-Cv3QSASL.mjs} +1 -1
- package/dist/web-components/{split-DqzkMVr3.mjs → split-CrTZjLVF.mjs} +1 -1
- package/dist/web-components/{status-BSpwZ8rO.mjs → status-DCmJGFlF.mjs} +1 -1
- package/dist/web-components/{styles-C9QeBpjd.mjs → styles-BdBFz9SS.mjs} +1 -1
- package/dist/web-components/three.mjs +1 -1
- package/dist/web-components/{thumbnail-Ckf6EotT.mjs → thumbnail-BezXZOSj.mjs} +1 -1
- package/dist/web-components/{tip-DTTyG5KI.mjs → tip-3wRL05_i.mjs} +1 -1
- package/dist/web-components/{toggle-DAC1XODI.mjs → toggle-CyRtVTRf.mjs} +1 -1
- package/dist/web-components/{useContainerName-D_XCWIWP.mjs → useContainerName-Dcg9-lIU.mjs} +1 -1
- package/dist/web-components/{useControlsVisibility-CIjHTnaa.mjs → useControlsVisibility-DJGzcs6D.mjs} +1 -1
- package/dist/web-components/{useNearViewport-B5E-oZb_.mjs → useNearViewport-C8lmKYws.mjs} +1 -1
- package/dist/web-components/{useScrollTrack-C2xSfGF6.mjs → useScrollTrack-D6TRdz7f.mjs} +1 -1
- package/dist/web-components/viewer/{AnnotationItems-B16qAKiN.mjs → AnnotationItems-DJVaxdsI.mjs} +1 -1
- package/dist/web-components/viewer/{AnnotationMenu-DgJSq4fy.mjs → AnnotationMenu-C0d0lTcC.mjs} +1 -1
- package/dist/web-components/viewer/AnnotationState-B4T0TkvH.mjs +1 -0
- package/dist/web-components/viewer/{Annotations-Cq5fXZrj.mjs → Annotations-CcvLU7jz.mjs} +1 -1
- package/dist/web-components/viewer/Annotations-WWqn_FbM.mjs +2 -0
- package/dist/web-components/viewer/{Canvas2DBackend-DvKFoHuh.mjs → Canvas2DBackend-B5QR4dhT.mjs} +1 -1
- package/dist/web-components/viewer/{CaptionDetails-DxTKPbOM.mjs → CaptionDetails-B_fCdkw6.mjs} +1 -1
- package/dist/web-components/viewer/{ChaptersMenu-BC3qFrhN.mjs → ChaptersMenu-BB97eRTx.mjs} +1 -1
- package/dist/web-components/viewer/{ChoiceMenu-DXBx-fGv.mjs → ChoiceMenu-BtDTvEbQ.mjs} +1 -1
- package/dist/web-components/viewer/{Collection-CeCEHMv-.mjs → Collection-Bz89v2FT.mjs} +1 -1
- package/dist/web-components/viewer/{Connected-CEraiqd1.mjs → Connected-CjKNxIxy.mjs} +1 -1
- package/dist/web-components/viewer/{Connected-DakTdEny.mjs → Connected-Dt8bLgZK.mjs} +1 -1
- package/dist/web-components/viewer/{Contents-DOuB3pTB.mjs → Contents-jBpCiUSe.mjs} +1 -1
- package/dist/web-components/viewer/{ControlMenu-CBb7ZoP6.mjs → ControlMenu-l4F81Jg8.mjs} +1 -1
- package/dist/web-components/viewer/ControlsFade-BPFSCV0a.mjs +1 -0
- package/dist/web-components/viewer/{CountMenu-WadMuI5T.mjs → CountMenu-DU_EJGFs.mjs} +1 -1
- package/dist/web-components/viewer/Cue-D4-as926.mjs +1 -0
- package/dist/web-components/viewer/{Document-DfRQ7S0l.mjs → Document-BldAeNoK.mjs} +1 -1
- package/dist/web-components/viewer/{DomLayers-uwjfbBsp.mjs → DomLayers-Bo7DQUIZ.mjs} +1 -1
- package/dist/web-components/viewer/{Download-C1nPhWlq.mjs → Download-HDlM1brf.mjs} +1 -1
- package/dist/web-components/viewer/{EntryBodies-EWZ8rnB_.mjs → EntryBodies-k9Kf71ll.mjs} +1 -1
- package/dist/web-components/viewer/{EntryThumbnail-BGpml8t4.mjs → EntryThumbnail-DEXlu64w.mjs} +1 -1
- package/dist/web-components/viewer/{FieldPill-KWuDZTXX.mjs → FieldPill-BTuiYb55.mjs} +1 -1
- package/dist/web-components/viewer/{FrameAnimation-ChvHbIgp.mjs → FrameAnimation-DXJvvX_O.mjs} +1 -1
- package/dist/web-components/viewer/{Gallery-DAal6sgL.mjs → Gallery-BR4uUPRO.mjs} +1 -1
- package/dist/web-components/viewer/{GlobeGlyph-ByDERN9z.mjs → GlobeGlyph-BFChlnAW.mjs} +1 -1
- package/dist/web-components/viewer/{HideToggle-C-gM8Mk8.mjs → HideToggle-Cl2mlgJh.mjs} +1 -1
- package/dist/web-components/viewer/{ImageControls-B2aR8D82.mjs → ImageControls-rNkvWCA9.mjs} +1 -1
- package/dist/web-components/viewer/{LanguageChoice-CbcBytbo.mjs → LanguageChoice-Bel5VdoV.mjs} +1 -1
- package/dist/web-components/viewer/{LanguageMenu-D_tV0uO9.mjs → LanguageMenu-Bj0g79QR.mjs} +1 -1
- package/dist/web-components/viewer/{LightboxView-C_Ofd0zk.mjs → LightboxView-DO8edg2H.mjs} +1 -1
- package/dist/web-components/viewer/{ListEnd-DN2oUjyx.mjs → ListEnd-D63rV7LR.mjs} +1 -1
- package/dist/web-components/viewer/{MapView-C0qrLqaP.mjs → MapView-ahuj5gKJ.mjs} +2 -2
- package/dist/web-components/viewer/{MediaBody-CnKOjrdE.mjs → MediaBody-DJE41Ggr.mjs} +1 -1
- package/dist/web-components/viewer/{MediaBody-CfnBYVg-.mjs → MediaBody-DhSdnEui.mjs} +1 -1
- package/dist/web-components/viewer/{NavDate-NJcjaWOv.mjs → NavDate-C5fftA6E.mjs} +1 -1
- package/dist/web-components/viewer/{Navigator-DRRodGLA.mjs → Navigator-BVkHzfLs.mjs} +1 -1
- package/dist/web-components/viewer/{PagerLayout-Dgbs71Hu.mjs → PagerLayout-CKN0Llkn.mjs} +1 -1
- package/dist/web-components/viewer/PanelPart-Z12fMdZh.mjs +1 -0
- package/dist/web-components/viewer/{PartOfManifest-f8ZMHngG.mjs → PartOfManifest-Brc4z7df.mjs} +1 -1
- package/dist/web-components/viewer/{PlaceBox-CamClgeV.mjs → PlaceBox-ByWy7e9J.mjs} +1 -1
- package/dist/web-components/viewer/{Placeholder-D7t4rsFp.mjs → Placeholder-CmKEgeqP.mjs} +1 -1
- package/dist/web-components/viewer/{Search-CednujgR.mjs → Search-COUo-BuO.mjs} +1 -1
- package/dist/web-components/viewer/{SeekMarks-gvJ2UZoh.mjs → SeekMarks-BWHqY1g-.mjs} +1 -1
- package/dist/web-components/viewer/{StandaloneItems-DkquLq5p.mjs → StandaloneItems-87W1Mih3.mjs} +1 -1
- package/dist/web-components/viewer/{Steps-CFmYNpo3.mjs → Steps-CUzjymlQ.mjs} +1 -1
- package/dist/web-components/viewer/{TargetItems-CfLAMuj8.mjs → TargetItems-Bms6M3cB.mjs} +1 -1
- package/dist/web-components/viewer/{Transcript-_eA-Dm0M.mjs → Transcript-DigEuuAR.mjs} +1 -1
- package/dist/web-components/viewer/{Transport-B4K4XAF-.mjs → Transport-BZcrgDpa.mjs} +1 -1
- package/dist/web-components/viewer/{Transport-5jVVRct0.mjs → Transport-DFpiEGiY.mjs} +1 -1
- package/dist/web-components/viewer/{annotation-collection-DBuApZiI.mjs → annotation-collection-JyxEZk8B.mjs} +1 -1
- package/dist/web-components/viewer/{annotation-name-C-CMfd6g.mjs → annotation-name-BJTap0Us.mjs} +1 -1
- package/dist/web-components/viewer/{annotations-content-D8UWdcFt.mjs → annotations-content-yT8J4zoX.mjs} +1 -1
- package/dist/web-components/viewer/{cloverEngine-CKfaQ-Wc.mjs → cloverEngine-DZDKElxt.mjs} +2 -2
- package/dist/web-components/viewer/content-state-reader-RmqJu8gE.mjs +1 -0
- package/dist/web-components/viewer/{dragToClose-DDJ3XwRu.mjs → dragToClose-C995dPad.mjs} +1 -1
- package/dist/web-components/viewer/{fetchManifest-pVcLruTs.mjs → fetchManifest-CS577eE5.mjs} +1 -1
- package/dist/web-components/viewer/follow-content-DLMLz7-u.mjs +1 -0
- package/dist/web-components/viewer/{host-BbYrtAtM.mjs → host-C79mYkpB.mjs} +1 -1
- package/dist/web-components/viewer/{image-layers-D0QWXFeZ.mjs → image-layers-zMvi4pmw.mjs} +1 -1
- package/dist/web-components/viewer/{image-service-content-ClTuuZ5p.mjs → image-service-content-CjRd-2iP.mjs} +1 -1
- package/dist/web-components/viewer/index.mjs +1 -1
- package/dist/web-components/viewer/link-DaJErMnE.mjs +1 -0
- package/dist/web-components/viewer/{overlayImage-ykHbPvnH.mjs → overlayImage-DCBpb4lw.mjs} +1 -1
- package/dist/web-components/viewer/{range-regions-DD-NwcwE.mjs → range-regions-BY9UB0kS.mjs} +1 -1
- package/dist/web-components/viewer/{renderers-N8qGiR4Q.mjs → renderers-BsrSfP28.mjs} +1 -1
- package/dist/web-components/viewer/sanitize-DETRcc_c.mjs +3 -0
- package/dist/web-components/viewer/{save-file-Bczd1gGN.mjs → save-file-CwXaCAyi.mjs} +1 -1
- package/dist/web-components/viewer/{search--UfJW1mN.mjs → search-CmWgigDq.mjs} +1 -1
- package/dist/web-components/viewer/{styles-LW5XsRcK.mjs → styles-ihp-vncb.mjs} +1 -1
- package/dist/web-components/viewer/svg-shape-CTjogIds.mjs +1 -0
- package/dist/web-components/viewer/trusted-Dj6-eE4L.mjs +1 -0
- package/dist/web-components/viewer/{useControlsVisibility-B1Ag1zm_.mjs → useControlsVisibility-DbCeSjAK.mjs} +1 -1
- package/dist/web-components/viewer/viewer-Ds1v3IFN.mjs +29 -0
- package/dist/web-components/viewer/{vtt-U7j7H25c.mjs → vtt-CkDv-L8Y.mjs} +1 -1
- package/dist/web-components/{viewer-CkXVnqu5.mjs → viewer-B2HVSNC2.mjs} +1 -1
- package/dist/web-components/{vtt-Di31JcWg.mjs → vtt-CylghmBS.mjs} +1 -1
- package/dist/web-components/{zh-Hans-DnYm6PWu.mjs → zh-Hans-Bfn3LUnq.mjs} +1 -1
- package/dist/web-components/{zh-Hant-DsxnuLPZ.mjs → zh-Hant-DzmK541A.mjs} +1 -1
- package/package.json +1 -1
- package/dist/web-components/Annotations-D2Iy6k3X.mjs +0 -2
- package/dist/web-components/ControlsFade-BDjMo25i.mjs +0 -1
- package/dist/web-components/Cue-BzhK_KTz.mjs +0 -1
- package/dist/web-components/LoadedMap-CowAds3f.mjs +0 -1
- package/dist/web-components/PanelPart-DzeT8Atv.mjs +0 -1
- package/dist/web-components/Scene-B9X0CUW5.mjs +0 -1
- package/dist/web-components/Timeline-CKGsgOW4.mjs +0 -1
- package/dist/web-components/content-state-reader-CY-uQUXA.mjs +0 -1
- package/dist/web-components/items-Hk3_LJmo.mjs +0 -1
- package/dist/web-components/label-CGhzU3ki.mjs +0 -1
- package/dist/web-components/link-BIc77IY3.mjs +0 -1
- package/dist/web-components/logo-BV7vGA6L.mjs +0 -1
- package/dist/web-components/part-C9K_lQE1.mjs +0 -1
- package/dist/web-components/shared-Cqxks7jF.mjs +0 -1
- package/dist/web-components/viewer/AnnotationState-YuVCBM29.mjs +0 -1
- package/dist/web-components/viewer/Annotations-DYkHWOeR.mjs +0 -2
- package/dist/web-components/viewer/ControlsFade-WJ98Wqju.mjs +0 -1
- package/dist/web-components/viewer/Cue-BF5ZjVa8.mjs +0 -1
- package/dist/web-components/viewer/PanelPart-BibD4mAY.mjs +0 -1
- package/dist/web-components/viewer/content-state-reader-BvfAdXET.mjs +0 -1
- package/dist/web-components/viewer/link-CE5biAiK.mjs +0 -1
- package/dist/web-components/viewer/viewer-DL8dyfj_.mjs +0 -29
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as ne,F as ae,i as se,M as ie}from"./Connected-
|
|
1
|
+
import{c as ne,F as ae,i as se,M as ie}from"./Connected-Dt8bLgZK.mjs";import{aJ as ce,bW as ue}from"./viewer-Ds1v3IFN.mjs";const le=["KHR_materials_unlit","KHR_materials_ior","KHR_materials_specular","KHR_mesh_quantization"],Z=1179937895,fe=1313821514,de=5130562;function me(e){const s=new DataView(e);if(s.getUint32(0,true)!==Z)throw new Error("This is not a GLB.");if(s.getUint32(4,true)!==2)throw new Error("Only glTF 2.0 is drawn.");let o,t;const n=Math.min(s.getUint32(8,true),e.byteLength);for(let a=12;a+8<=n;){const i=s.getUint32(a,true),l=s.getUint32(a+4,true),c=a+8;l===fe?o=JSON.parse(new TextDecoder().decode(new Uint8Array(e,c,i))):l===de&&(t=e.slice(c,c+i)),a=c+i}if(!o)throw new Error("The GLB has no JSON chunk.");return{json:o,bin:t}}async function z(e,s,o){const t=new URL(e,s).href,n=t.startsWith("data:")?await fetch(t):await ue(o,t);if(!n.ok)throw new Error(`${t} answered ${n.status}`);return n.arrayBuffer()}const $=new WeakMap;function ve(e,s,o){const t=(s==null?void 0:s.fetch)??globalThis.fetch,n=$.get(t)??new Map;$.set(t,n);const a=`${ce(s)} ${o??""} ${e}`;let i=n.get(a);return i||(i=he(e,s,o).finally(()=>n.delete(a)),n.set(a,i)),i}async function he(e,s,o){const t=await z(e,location.href,s),n=new DataView(t).getUint32(0,true)===Z,{json:a,bin:i}=n?me(t):{json:JSON.parse(new TextDecoder().decode(t))},l=(a.extensionsRequired??[]).filter(f=>!le.includes(f));if(l.length)throw new Error(`Clover's renderer cannot draw this model: it requires ${l.join(", ")}.`);const c=await Promise.all((a.buffers??[]).map((f,r)=>{if(f.uri!==void 0)return z(f.uri,e,s);if(r===0&&i)return i;throw new Error("A buffer of the model has no data.")})),u=await Promise.all((a.images??[]).map(async f=>{try{let r;if(f.bufferView!==void 0){const d=a.bufferViews[f.bufferView];r=new Blob([new Uint8Array(c[d.buffer],d.byteOffset??0,d.byteLength)],{type:f.mimeType})}else if(f.uri!==void 0)r=new Blob([await z(f.uri,e,s)],{type:f.mimeType});else return null;const m={premultiplyAlpha:"none",colorSpaceConversion:"none"};return await pe(await createImageBitmap(r,m),o,m)}catch{return null}}));return{json:a,buffers:c,images:u}}async function pe(e,s,o){const t=Math.max(e.width,e.height);if(!s||t<=s)return e;const n=s/t,a=await createImageBitmap(e,{...o,resizeWidth:Math.max(1,Math.floor(e.width*n)),resizeHeight:Math.max(1,Math.floor(e.height*n)),resizeQuality:"high"});return e.close(),a}const we={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Ee={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},q=e=>we[e];function Te(e,s){const o=e.json.accessors[s],t=q(o.type),n=new Float32Array(o.count*t);if(o.bufferView===void 0)return n;const a=e.json.bufferViews[o.bufferView],i=Ee[o.componentType],l=a.byteStride||i*t,c=new DataView(e.buffers[a.buffer],(a.byteOffset??0)+(o.byteOffset??0)),u={5120:r=>c.getInt8(r),5121:r=>c.getUint8(r),5122:r=>c.getInt16(r,true),5123:r=>c.getUint16(r,true),5125:r=>c.getUint32(r,true),5126:r=>c.getFloat32(r,true)}[o.componentType]??(()=>0),f=o.normalized?{5120:127,5121:255,5122:32767,5123:65535}[o.componentType]:void 0;for(let r=0;r<o.count;r++)for(let m=0;m<t;m++){const d=u(r*l+m*i);n[r*t+m]=f?Math.max(d/f,-1):d}return n}const ee=()=>new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function I(e,s){const o=new Float32Array(16);for(let t=0;t<4;t++)for(let n=0;n<4;n++){let a=0;for(let i=0;i<4;i++)a+=e[i*4+n]*s[t*4+i];o[t*4+n]=a}return o}function X([e,s,o],[t,n,a,i],[l,c,u]){const f=t+t,r=n+n,m=a+a,d=t*f,M=t*r,p=t*m,w=n*r,S=n*m,y=a*m,k=i*f,L=i*r,O=i*m;return new Float32Array([(1-(w+y))*l,(M+O)*l,(p-L)*l,0,(M-O)*c,(1-(d+y))*c,(S+k)*c,0,(p+L)*u,(S-k)*u,(1-(d+w))*u,0,e,s,o,1])}const K=e=>X(e,[0,0,0,1],[1,1,1]),xe=e=>X([0,0,0],[0,0,0,1],e);function be([e,s,o]){const t=(n,a)=>{const i=a*Math.PI/180,l=Math.cos(i),c=Math.sin(i),u=ee(),[f,r]=n===0?[1,2]:n===1?[2,0]:[0,1];return u[f*4+f]=l,u[f*4+r]=c,u[r*4+f]=-c,u[r*4+r]=l,u};return I(t(2,o),I(t(1,s),t(0,e)))}function ye(e,s,o,t){const n=1/Math.tan(e/2),a=1/(o-t);return new Float32Array([n/s,0,0,0,0,n,0,0,0,0,(t+o)*a,-1,0,0,2*t*o*a,0])}function Ae(e,s){const o=c=>{const u=Math.hypot(...c)||1;return[c[0]/u,c[1]/u,c[2]/u]},t=(c,u)=>[c[1]*u[2]-c[2]*u[1],c[2]*u[0]-c[0]*u[2],c[0]*u[1]-c[1]*u[0]],n=(c,u)=>c[0]*u[0]+c[1]*u[1]+c[2]*u[2],a=o([e[0]-s[0],e[1]-s[1],e[2]-s[2]]),i=o(t([0,1,0],a)),l=t(a,i);return new Float32Array([i[0],l[0],a[0],0,i[1],l[1],a[1],0,i[2],l[2],a[2],0,-n(i,e),-n(l,e),-n(a,e),1])}function Re(e){const[s,o,t,,n,a,i,,l,c,u]=e,f=a*u-i*c,r=i*l-n*u,m=n*c-a*l,d=s*f+o*r+t*m||1;return new Float32Array([f/d,r/d,m/d,(t*c-o*u)/d,(s*u-t*l)/d,(o*l-s*c)/d,(o*i-t*a)/d,(t*n-s*i)/d,(s*a-o*n)/d])}const Me=()=>({min:[1/0,1/0,1/0],max:[-1/0,-1/0,-1/0]});function _e(e){for(let s=0;s<3;s++){let o=0;for(let t=0;t<3;t++)Math.abs(e[s*4+t])>1e-6&&o++;if(o>1)return false}return true}function Ne(e,s,o,t){const n=s.json.accessors[o];let a;if(_e(t)&&n.min&&n.max&&!n.normalized){const[l,c]=[n.min,n.max];a=Array.from({length:8},(u,f)=>[f&1?c[0]:l[0],f&2?c[1]:l[1],f&4?c[2]:l[2]]).flat()}else a=Te(s,o);const i=t;for(let l=0;l+2<a.length;l+=3){const c=a[l],u=a[l+1],f=a[l+2];for(let r=0;r<3;r++){const m=i[r]*c+i[4+r]*u+i[8+r]*f+i[12+r];m<e.min[r]&&(e.min[r]=m),m>e.max[r]&&(e.max[r]=m)}}return e}const C={normals:1,normalMap:2,unlit:4,mask:8},Y={POSITION:0,NORMAL:1,TEXCOORD_0:2,COLOR_0:3},J=["uBaseTexture","uMetalRoughTexture","uNormalTexture","uOcclusionTexture","uEmissiveTexture"],Se=`#version 300 es
|
|
2
2
|
layout(location = 0) in vec3 aPosition;
|
|
3
3
|
layout(location = 1) in vec3 aNormal;
|
|
4
4
|
layout(location = 2) in vec2 aUv;
|
|
@@ -161,4 +161,4 @@ void main() {
|
|
|
161
161
|
color += (diffuse * room(n) + (f0 * ab.x + ab.y) * reflected(reflect(-v, n), roughness)) * occlusion;
|
|
162
162
|
color += uEmissive * texture(uEmissiveTexture, vUv).rgb;
|
|
163
163
|
outColor = vec4(srgb(neutral(color)) * base.a, base.a);
|
|
164
|
-
}`,
|
|
164
|
+
}`,Q=10497,Fe=9729,Ce=new Set([9984,9985,9986,9987]);function Pe(e){const s=e.createProgram();for(const[o,t]of[[e.VERTEX_SHADER,Se],[e.FRAGMENT_SHADER,Ue]]){const n=e.createShader(o);e.shaderSource(n,t),e.compileShader(n),e.attachShader(s,n),e.deleteShader(n)}if(e.linkProgram(s),!e.getProgramParameter(s,e.LINK_STATUS))throw new Error(`The 3D view's shaders would not build: ${e.getProgramInfoLog(s)}`);return s}function Ie(e){const s=Pe(e),o=r=>e.getUniformLocation(s,r),t=Object.fromEntries(["uModel","uViewProjection","uNormalMatrix","uCamera","uBaseColor","uSpecular","uMetallic","uRoughness","uNormalScale","uOcclusionStrength","uEmissive","uAlphaCutoff","uFlags",...J].map(r=>[r,o(r)]));e.useProgram(s),J.forEach((r,m)=>e.uniform1i(t[r],m));const n=[],a=[],i=[],l=Me(),c=e.createTexture();e.bindTexture(e.TEXTURE_2D,c),e.texImage2D(e.TEXTURE_2D,0,e.RGBA8,1,1,0,e.RGBA,e.UNSIGNED_BYTE,new Uint8Array([255,255,255,255])),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),a.push(c),e.vertexAttrib4f(Y.COLOR_0,1,1,1,1);function u(r,m){var G;const{json:d}=r,M=new Map,p=new Map,w=new Map,S=(E,T)=>{const v=`${E}|${T}`;let h=M.get(v);if(!h){const b=d.bufferViews[E];h=e.createBuffer(),e.bindBuffer(T,h),e.bufferData(T,new Uint8Array(r.buffers[b.buffer],b.byteOffset??0,b.byteLength),e.STATIC_DRAW),M.set(v,h),n.push(h)}return h},y=(E,T)=>{var F,N;const v=E?(F=d.textures)==null?void 0:F[E.index]:void 0,h=(v==null?void 0:v.source)!==void 0?r.images[v.source]:null;if(!E||!h)return null;const b=`${E.index}|${T}`;let _=p.get(b);if(!_){_=e.createTexture(),e.bindTexture(e.TEXTURE_2D,_),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,e.NONE),e.texImage2D(e.TEXTURE_2D,0,T?e.SRGB8_ALPHA8:e.RGBA8,e.RGBA,e.UNSIGNED_BYTE,h);const x=(v==null?void 0:v.sampler)!==void 0?(N=d.samplers)==null?void 0:N[v.sampler]:void 0,A=(x==null?void 0:x.minFilter)??e.LINEAR_MIPMAP_LINEAR;e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,A),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,(x==null?void 0:x.magFilter)??Fe),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,(x==null?void 0:x.wrapS)??Q),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,(x==null?void 0:x.wrapT)??Q),Ce.has(A)&&e.generateMipmap(e.TEXTURE_2D),p.set(b,_),a.push(_)}return _},k=E=>{var A,B,D,V,R,P;const T=E??-1;let v=w.get(T);if(v)return v;const h=E!==void 0?((A=d.materials)==null?void 0:A[E])??{}:{},b=h.pbrMetallicRoughness??{},_=y(h.normalTexture,false),F=Number(((D=(B=h.extensions)==null?void 0:B.KHR_materials_ior)==null?void 0:D.ior)??1.5),N=(V=h.extensions)==null?void 0:V.KHR_materials_specular,x=((F-1)/(F+1))**2;return v={base:b.baseColorFactor??[1,1,1,1],specular:((N==null?void 0:N.specularColorFactor)??[1,1,1]).map(g=>Math.min(x*g,1)*((N==null?void 0:N.specularFactor)??1)),metallic:b.metallicFactor??1,roughness:b.roughnessFactor??1,normalScale:((R=h.normalTexture)==null?void 0:R.scale)??1,occlusion:h.occlusionTexture?h.occlusionTexture.strength??1:0,emissive:h.emissiveFactor??[0,0,0],cutoff:h.alphaCutoff??.5,flags:(_?C.normalMap:0)|((P=h.extensions)!=null&&P.KHR_materials_unlit?C.unlit:0)|(h.alphaMode==="MASK"?C.mask:0),doubleSided:!!h.doubleSided,blend:h.alphaMode==="BLEND",textures:[y(b.baseColorTexture,true),y(b.metallicRoughnessTexture,false),_,y(h.occlusionTexture,false),y(h.emissiveTexture,true)]},w.set(T,v),v},L=(E,T)=>{var _,F,N,x;const v=(_=d.nodes)==null?void 0:_[E];if(!v)return;const h=I(T,v.matrix?new Float32Array(v.matrix):X(v.translation??[0,0,0],v.rotation??[0,0,0,1],v.scale??[1,1,1])),b=v.mesh!==void 0?(F=d.meshes)==null?void 0:F[v.mesh]:void 0;for(const A of(b==null?void 0:b.primitives)??[]){const B=A.attributes.POSITION;if(B===void 0)continue;const D=e.createVertexArray();e.bindVertexArray(D);let V=0;for(const[W,H]of Object.entries(Y)){const j=A.attributes[W],U=j!==void 0?(N=d.accessors)==null?void 0:N[j]:void 0;if(!U||U.bufferView===void 0||U.sparse)continue;const re=d.bufferViews[U.bufferView];e.bindBuffer(e.ARRAY_BUFFER,S(U.bufferView,e.ARRAY_BUFFER)),e.enableVertexAttribArray(H),e.vertexAttribPointer(H,q(U.type),U.componentType,!!U.normalized,re.byteStride??0,U.byteOffset??0),W==="NORMAL"&&(V|=C.normals)}const R=A.indices!==void 0?(x=d.accessors)==null?void 0:x[A.indices]:void 0;(R==null?void 0:R.bufferView)!==void 0&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,S(R.bufferView,e.ELEMENT_ARRAY_BUFFER)),e.bindVertexArray(null);const P=I(m,h),g=k(A.material);i.push({vao:D,mode:A.mode??e.TRIANGLES,count:R?R.count:d.accessors[B].count,...(R==null?void 0:R.bufferView)!==void 0?{index:{type:R.componentType,offset:R.byteOffset??0}}:{},model:P,normal:Re(P),mirrored:Oe(P)<0,material:{...g,flags:g.flags|V}}),Ne(l,r,B,P)}for(const A of v.children??[])L(A,h)},O=(G=d.scenes)==null?void 0:G[d.scene??0],te=(O==null?void 0:O.nodes)??(d.nodes??[]).map((E,T)=>T).filter(E=>!d.nodes.some(T=>{var v;return(v=T.children)==null?void 0:v.includes(E)})),oe=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);te.forEach(E=>L(E,oe)),i.sort((E,T)=>Number(E.material.blend)-Number(T.material.blend))}function f(r,m,d,M){e.viewport(0,0,d,M),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT),e.enable(e.DEPTH_TEST),e.useProgram(s),e.uniformMatrix4fv(t.uViewProjection,false,r),e.uniform3fv(t.uCamera,m);for(const p of i){const{material:w}=p;w.doubleSided?e.disable(e.CULL_FACE):e.enable(e.CULL_FACE),e.frontFace(p.mirrored?e.CW:e.CCW),w.blend?(e.enable(e.BLEND),e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA),e.depthMask(false)):(e.disable(e.BLEND),e.depthMask(true)),w.textures.forEach((S,y)=>{e.activeTexture(e.TEXTURE0+y),e.bindTexture(e.TEXTURE_2D,S??c)}),e.uniformMatrix4fv(t.uModel,false,p.model),e.uniformMatrix3fv(t.uNormalMatrix,false,p.normal),e.uniform4fv(t.uBaseColor,w.base),e.uniform3fv(t.uSpecular,w.specular),e.uniform1f(t.uMetallic,w.metallic),e.uniform1f(t.uRoughness,w.roughness),e.uniform1f(t.uNormalScale,w.normalScale),e.uniform1f(t.uOcclusionStrength,w.occlusion),e.uniform3fv(t.uEmissive,w.emissive),e.uniform1f(t.uAlphaCutoff,w.cutoff),e.uniform1i(t.uFlags,w.flags),e.bindVertexArray(p.vao),p.index?e.drawElements(p.mode,p.count,p.index.type,p.index.offset):e.drawArrays(p.mode,0,p.count)}e.bindVertexArray(null),e.depthMask(true)}return{add:u,bounds:()=>i.length?l:null,draw:f,dispose(){i.forEach(r=>e.deleteVertexArray(r.vao)),n.forEach(r=>e.deleteBuffer(r)),a.forEach(r=>e.deleteTexture(r)),e.deleteProgram(s),i.length=0}}}function Oe(e){return e[0]*(e[5]*e[10]-e[6]*e[9])-e[4]*(e[1]*e[10]-e[2]*e[9])+e[8]*(e[1]*e[6]-e[2]*e[5])}const Be=2;function Le({position:e,transforms:s}){let o=ee();for(const{type:t,x:n,y:a,z:i}of s){const l=t==="scale"?xe([n,a,i]):t==="translate"?K([n,a,i]):be([n,a,i]);o=I(l,o)}return I(K(e),o)}function ke(e,{onLost:s}){const o=document.createElement("canvas");o.className="clover-canvas-surface",o.setAttribute("aria-hidden","true"),o.style.cssText="position:absolute;inset:0;width:100%;height:100%;display:block;pointer-events:none";const t=o.getContext("webgl2",{antialias:true,alpha:true});if(!t)throw new Error("This browser cannot draw 3D: it offers no WebGL2.");const n=u=>{u.preventDefault(),s()};o.addEventListener("webglcontextlost",n),e.prepend(o);const a=Ie(t);let i={center:[0,0,0],radius:1},l=false;const c=()=>{const u=Math.min(globalThis.devicePixelRatio||1,Be),f=Math.round(e.clientWidth*u),r=Math.round(e.clientHeight*u);!f||!r||(o.width=f,o.height=r)};return c(),{async load(u,f){const r=u.filter(se);if(!r.length){const p=[...new Set(u.map(w=>w.format??w.src))];throw new Error(u.length?`Clover draws glTF models (${ie.join(", ")}), not ${p.join(", ")}.`:"The Scene paints no model.")}const m=t.getParameter(t.MAX_TEXTURE_SIZE),d=await Promise.all(r.map(p=>ve(p.src,f,m)));if(l)return i;d.forEach((p,w)=>a.add(p,Le(r[w])));const M=a.bounds();if(M){const p=M.min.map((S,y)=>(S+M.max[y])/2),w=Math.hypot(...M.max.map((S,y)=>S-M.min[y]))/2;i={center:p,radius:w||1}}return i},draw(u){if(l||!o.width||!o.height)return;const f=ne(u,i.center),r=Math.max(i.radius/1e3,u.distance-i.radius*2),m=u.distance+i.radius*4,d=ye(ae*Math.PI/180,o.width/o.height,r,m);a.draw(I(d,Ae(f,i.center)),f,o.width,o.height)},resize:c,dispose(){var u;l||(l=true,o.removeEventListener("webglcontextlost",n),a.dispose(),(u=t.getExtension("WEBGL_lose_context"))==null||u.loseContext(),o.remove())}}}export{ke as createEngine,Le as placement};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{az as l,bv as g}from"./viewer-Ds1v3IFN.mjs";function b(t){const e=t.replace(/-/g,"+").replace(/_/g,"/"),n=e+"=".repeat((4-e.length%4)%4),a=atob(n);try{return decodeURIComponent(a)}catch{const c=Uint8Array.from(a,s=>s.charCodeAt(0));return new TextDecoder().decode(c)}}function I(t){const e=t.trim();for(const n of[()=>JSON.parse(e),()=>JSON.parse(b(e))])try{const a=n();if(a&&typeof a=="object")return a}catch{}return null}function v(t){if(!t)return;const e=Number(t.split(",")[0]);return Number.isFinite(e)?e:void 0}const u=t=>l(t==null?void 0:t.partOf).find(e=>(e==null?void 0:e.id)&&e.type==="Collection");function A(t){const e=t.type==="Annotation"?l(t.target):[t],n=e[0]?m(e[0],t):null;if(!n||e.length<2)return n;const a=typeof t.id=="string"?t.id:"content-state",c=e.flatMap((s,d)=>{var y,p,f;const i=d===0?n:m(s,t),r=(i==null?void 0:i.type)==="Manifest"?i.id:i==null?void 0:i.manifestId;return!i||!r?[]:[{id:`${a}#target-${d+1}`,manifestId:r,...((y=i.target)==null?void 0:y.canvasId)&&{canvasId:i.target.canvasId},...((p=i.target)==null?void 0:p.region)&&{region:i.target.region},...((f=i.target)==null?void 0:f.time)!==void 0&&{time:i.target.time}}]});return c.length>1?{...n,targets:{id:a,...t.label&&typeof t.label=="object"?{label:t.label}:{},items:c}}:n}function m(t,e){const n=g(t),a=typeof t=="string"?{id:n.id}:t.type==="SpecificResource"?typeof t.source=="string"?{id:t.source}:t.source??{}:t,c=a.type;if(c==="Manifest"||c==="Collection"){const o=c==="Manifest"?u(a):void 0;return o?{id:o.id,type:"Collection",manifestId:n.id}:{id:n.id,type:c}}const s=l(t.selector).find(o=>(o==null?void 0:o.type)==="PointSelector"&&o.t!=null),d={canvasId:n.id};n.rect&&(d.region=n.rect);const i=(s==null?void 0:s.t)??v(n.t);i!==void 0&&(d.time=Number(i));const r=[a,t].flatMap(o=>l(o==null?void 0:o.partOf)).find(o=>(o==null?void 0:o.id)&&(!o.type||o.type==="Manifest")),y=u(r),p=e.type==="Annotation"&&l(e.body).length?{id:e.id??`${n.id}#content-state`,type:"Annotation",motivation:l(e.motivation),body:e.body,target:t}:void 0,f=p?{annotation:p}:{};return y&&r?{id:y.id,type:"Collection",manifestId:r.id,target:d,...f}:r?{id:r.id,type:"Manifest",target:d,...f}:{id:n.id,type:c??"Canvas",target:d,...f}}export{I as decodeContentState,A as resolveContentState};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bx as _}from"./viewer-
|
|
1
|
+
import{bx as _}from"./viewer-Ds1v3IFN.mjs";const k=1/3,Y=.5,P=8,z="translate 240ms cubic-bezier(0.16, 1, 0.3, 1)",D=[120,_],A="cubic-bezier(0.33, 0.67, 0.67, 1)",E=new WeakMap;function O(t,n){let o=null,i="idle",a=0,S=0,s=0,d=1,e=1,c=[];const f=()=>{var r;return[t,(r=n.current.alongside)==null?void 0:r.current]},M=r=>{if(r.pointerType==="mouse"||!r.isPrimary||!n.current.enabled)return;o=r.pointerId,i="pending",a=r.clientX,S=r.clientY,s=0,d=t.getBoundingClientRect().width||1;const p=getComputedStyle(t).direction==="rtl";e=n.current.side==="end"!==p?1:-1,c=[[r.timeStamp,0]]},$=r=>{var g,v;if(r.pointerId!==o||i==="idle"||i==="scroll")return;const p=(r.clientX-a)*e,y=r.clientY-S;if(i==="pending"){if(Math.abs(y)>P&&Math.abs(y)>Math.abs(p)){i="scroll";return}if(p<P)return;i="drag",a=r.clientX,c=[[r.timeStamp,0]];try{(g=t.setPointerCapture)==null||g.call(t,r.pointerId)}catch{}u(f(),void 0,"none")}s=Math.max(0,(r.clientX-a)*e),u(f(),`${s*e}px 0`);const h=(v=n.current.scrim)==null?void 0:v.current;h&&(h.style.transition="none",h.style.opacity=String(1-s/d)),c.push([r.timeStamp,s]),c.length>5&&c.shift(),r.preventDefault()},m=r=>{var X,C,T;if(r.pointerId!==o)return;const p=i==="drag";if(i="idle",o=null,!p)return;t.addEventListener("click",b,{capture:true,once:true}),setTimeout(()=>t.removeEventListener("click",b,true),0);const[y,h]=c[0],[g,v]=c[c.length-1],I=g>y?(v-h)/(g-y):0,l=(X=n.current.scrim)==null?void 0:X.current,x=(C=window.matchMedia)==null?void 0:C.call(window,"(prefers-reduced-motion: reduce)").matches;if(s>d*k||I>Y){const L=x?0:Math.min(D[1],Math.max(D[0],2*(d-s)/Math.max(I,.001))),w=`${L}ms ${A}`;if(l&&(l.style.transition=`opacity ${w}`,l.style.opacity="0"),n.current.exits){u(f(),`${d*e}px 0`,`translate ${w}`),setTimeout(()=>n.current.onClose(),L);return}t.style.transition="none",t.style.translate="",t.style.transform=`translateX(${s*e}px)`,t.getBoundingClientRect(),t.style.transition=`transform ${w}`,t.style.transform=`var(--clover-template-out, translateX(${e*100}%))`,u([(T=n.current.alongside)==null?void 0:T.current],`${d*e}px 0`,`translate ${w}`),E.set(t,setTimeout(()=>R(t,n),L)),n.current.onClose();return}u(f(),"",x?"none":z),l&&(l.style.transition=x?"none":"opacity 240ms ease",l.style.opacity=""),setTimeout(()=>{i==="idle"&&!E.has(t)&&u(f(),void 0,"")},240)},b=r=>{r.stopPropagation(),r.preventDefault()};return t.addEventListener("pointerdown",M),t.addEventListener("pointermove",$,{passive:false}),t.addEventListener("pointerup",m),t.addEventListener("pointercancel",m),()=>{t.removeEventListener("pointerdown",M),t.removeEventListener("pointermove",$),t.removeEventListener("pointerup",m),t.removeEventListener("pointercancel",m)}}function F(t,n){E.has(t)&&!n.current.enabled||R(t,n)}function R(t,n){var i,a;clearTimeout(E.get(t)),E.delete(t),u([t,(i=n.current.alongside)==null?void 0:i.current],"",""),t.style.transform="";const o=(a=n.current.scrim)==null?void 0:a.current;o&&(o.style.opacity="",o.style.transition="")}function u(t,n,o){for(const i of t)i&&(o!==void 0&&(i.style.transition=o),n!==void 0&&(i.style.translate=n))}export{O as attach,F as reset};
|
package/dist/web-components/viewer/{fetchManifest-pVcLruTs.mjs → fetchManifest-CS577eE5.mjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{az as h,ax as x,bu as m,bv as I,bw as q}from"./viewer-
|
|
1
|
+
import{az as h,ax as x,bu as m,bv as I,bw as q}from"./viewer-Ds1v3IFN.mjs";function S(e,i,n){for(const s of h(e==null?void 0:e.items))for(const o of h(s==null?void 0:s.items)){if(!x(o))continue;const l=h(o==null?void 0:o.body).flatMap(t=>(t==null?void 0:t.type)==="Choice"?h(t.items).filter((r,f)=>n?(r==null?void 0:r.id)===n:f===0):n&&(t==null?void 0:t.id)!==n?[]:[t]);for(const t of l){if((t==null?void 0:t.type)!=="Image"||!t.width||!t.height)continue;const r=m(t.service);if(!r)continue;const f=I(h(o.target)[0]).rect??{x:0,y:0,w:e.width,h:e.height},a=(i.x-f.x)/f.w,c=(i.y-f.y)/f.h,u=Math.max(0,a),w=Math.max(0,c),M=Math.min(1,a+i.w/f.w)-u,g=Math.min(1,c+i.h/f.h)-w;if(M>0&&g>0)return{service:r,region:{x:u,y:w,width:M,height:g}}}}return null}const p=new WeakMap;function k(e,i){let n=p.get(e);n||p.set(e,n=new Map);let s=n.get(i);return s||(s=q({id:i,type:"Manifest"},{request:e.request}).catch(()=>null),n.set(i,s)),s}export{k as f,S as r};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{bG as w,az as f,bv as l}from"./viewer-Ds1v3IFN.mjs";import{resolveContentState as b}from"./content-state-reader-RmqJu8gE.mjs";import{readSvgShape as S}from"./svg-shape-CTjogIds.mjs";const m="http://iiif.io/api/presentation/2/context.json",x=t=>(t==null?void 0:t["@type"])==="oa:Annotation"||(t==null?void 0:t["@id"])!==void 0&&f(t==null?void 0:t["@context"]).includes(m),y=t=>typeof t=="string"?t:(t==null?void 0:t["@id"])??(t==null?void 0:t.id);async function I(t){if(!x(t))return t;const{convertPresentation2:n}=await import("../presentation-2-C-U79S_T.mjs"),r=n({"@context":m,...JSON.parse(JSON.stringify(t))}),a=f(t.on).map(e=>y(f(e==null?void 0:e.within)[0])),s=f(r.target).map((e,c)=>{const o=a[c];if(!o)return e;const d=[{id:o,type:"Manifest"}],g=(e==null?void 0:e.type)==="SpecificResource",u=y(g?e.source:e);return u?g?{...e,source:{id:u,type:"Canvas",partOf:d}}:{id:u,type:"Canvas",partOf:d}:e}),i=f(r.body).map(e=>typeof(e==null?void 0:e.chars)=="string"?{type:"TextualBody",value:e.chars,...e.format?{format:e.format}:{},...e.language?{language:e.language}:{}}:e);return{...r,"@context":void 0,type:"Annotation",target:s.length===1?s[0]:s,...i.length?{body:i.length===1?i[0]:i}:{}}}async function $(t,n,r){const a=await A(t);if(!a)throw new w("Unreadable content state");const s=await r(a.id,{...n,manifestId:n.manifestId??a.manifestId,follows:(n.follows??0)+1}),{target:i}=a;return O({...s,target:i&&(!s.target||s.target.canvasId===i.canvasId)?{...s.target,...i}:s.target??i,annotation:s.annotation??a.annotation,targets:s.targets??a.targets})}async function A(t){const n=await I(t),r=b(n);if(!r)return null;const a=n.type==="Annotation"?f(n.target)[0]:n,s=C(l(a).svg),i=r.annotation;return{...r,...r.target&&!r.target.region&&s?{target:{...r.target,region:s}}:{},...i?{annotation:{...i,motivation:f(i.motivation).filter(e=>e!=="painting"),...n.label?{label:n.label}:{}}}:{}}}function N(t){const n=t?Number(t.split(",")[0]):NaN;return Number.isFinite(n)?n:void 0}function C(t){var r;const n=t?(r=S(t))==null?void 0:r.box:void 0;return n&&n.width>0&&n.height>0?{x:n.x,y:n.y,w:n.width,h:n.height}:void 0}function R(t,n){const r=new Set,a=e=>{for(const c of e){if(!c||r.has(c))continue;if(r.add(c),c.type==="Range"&&c.id===n)return c;const o=a(f(c.items));if(o)return o}},s=(e,c=0)=>{for(const o of f(e.items)){if((o==null?void 0:o.type)==="Range"){const p=c<16?s(o,c+1):null;if(p)return p;continue}const d=typeof o=="string"?o:o==null?void 0:o.id,g=l((o==null?void 0:o.type)==="SpecificResource"?o:String(d??"").replace(/\/((?:t|xywh)=[^/#]*)$/,"#$1"));if(!g.id)continue;const u=N(g.t);return{canvasId:g.id,...g.rect?{region:g.rect}:{},...u!==void 0?{time:u}:{}}}return null},i=a(f(t.structures));return i?s(i):null}function v(t,n){if(typeof t=="string"){const a=t.indexOf("#");return a<0?n:n+t.slice(a)}const r=t;return(r==null?void 0:r.type)==="SpecificResource"?{...r,source:typeof r.source=="object"?{...r.source,id:n,type:"Canvas"}:{id:n,type:"Canvas"}}:v(String((r==null?void 0:r.id)??""),n)}function O(t){var c;const{manifest:n,target:r}=t;if(!r)return t;const a=f(n.items);if(a.some(o=>(o==null?void 0:o.id)===r.canvasId))return t;const i=(a.length===1&&((c=a[0])==null?void 0:c.id)===`${n.id}/canvas`?{canvasId:a[0].id}:null)??R(n,r.canvasId);if(!i)return t;const e=t.annotation&&{...t.annotation,target:v(t.annotation.target,i.canvasId)};return{...t,target:{...r,canvasId:i.canvasId,...r.region?{}:i.region?{region:i.region}:{},...r.time!==void 0?{}:i.time!==void 0?{time:i.time}:{}},...e?{annotation:e}:{}}}export{$ as follow,O as placeTarget,I as readAnnotation,A as resolve};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var R=Object.defineProperty;var k=(s,t,e)=>t in s?R(s,t,{enumerable:true,configurable:true,writable:true,value:e}):s[t]=e;var l=(s,t,e)=>k(s,typeof t!="symbol"?t+"":t,e);import{b as x,n as E,u as r,M as p,k as O,q as M,C as m,I as g,$ as C,x as D}from"./viewer-
|
|
1
|
+
var R=Object.defineProperty;var k=(s,t,e)=>t in s?R(s,t,{enumerable:true,configurable:true,writable:true,value:e}):s[t]=e;var l=(s,t,e)=>k(s,typeof t!="symbol"?t+"":t,e);import{b as x,n as E,u as r,M as p,k as O,q as M,C as m,I as g,$ as C,x as D}from"./viewer-Ds1v3IFN.mjs";import"./styles-ihp-vncb.mjs";function N(s){return{render:function(t){E(t,s)},unmount:function(){x(s)}}}const $="clover-root",b=Symbol("roots"),A=[];class F{constructor(t){l(this,"entries",new Map);l(this,"lists",new Map);l(this,"listeners",new Map);l(this,"languages",new I(t2=>this.entries.has(t2)));this.count=t}list(t){return this.lists.get(t)??A}subscribe(t,e){let n=this.listeners.get(t);return n||this.listeners.set(t,n=new Set),n.add(e),()=>{n.delete(e)}}connect(t){var i;const e=t.kind==="part"?((i=t.element.parentElement)==null?void 0:i.closest($))??null:null,n=this.entries.get(t.element);if(n&&n.root===e)return;const o={hosted:t,key:(n==null?void 0:n.key)??++this.count.made,root:e};this.entries.set(t.element,o),n&&this.change(h(n),a=>a.filter(c=>c!==n)),this.change(h(o),a=>[...a,o]),t.needsRoot&&!e&&console.warn(`<${t.element.localName}> shows a <clover-root>'s state: put it inside one.`),t.kind!=="root"&&this.languages.draws(t.element.localName),(t.kind!=="part"||!e)&&this.languages.watch(t.element)}disconnect(t){const e=this.entries.get(t);e&&(this.entries.delete(t),this.change(h(e),n=>n.filter(o=>o!==e)))}change(t,e){var n;this.lists.set(t,e(this.list(t))),(n=this.listeners.get(t))==null||n.forEach(o=>o())}}const h=s=>s.hosted.kind==="root"?b:s.root;class I{constructor(t){l(this,"observer",null);l(this,"tags",new Set);this.isElement=t}draws(t){this.tags.add(t)}watch(t){this.observer??(this.observer=new MutationObserver(e=>{const n=[...this.tags,".clover-announcer"].join(",");for(const{target:o}of e){const i=o;i.getAttribute("lang")!==""||this.isElement(i)||i.closest(n)&&i.removeAttribute("lang")}})),this.observer.observe(t,{subtree:true,attributes:true,attributeFilter:["lang"]})}}function d(s,t){const e=M(o=>s.subscribe(t,o),[s,t]);return m(e,()=>s.list(t))}function w(s){return m(s.subscribe,s.getProps,s.getProps)}function L({registry:s}){const t=d(s,b),e=d(s,null);return r(O,{children:[t.map(n=>r(W,{entry:n,registry:s},n.key)),e.map(n=>r(S,{entry:n},n.key))]})}const v=s=>`clover-${s.key}-`,W=p(function({entry:t,registry:e}){const{hosted:n}=t,o=d(e,n.element),i=w(n),a=n.Component;return r(P,{hosted:n,props:i,children:r(g.Provider,{value:v(t),children:r(a,{hosted:n,props:i,children:o.map(c=>r(S,{entry:c},c.key))})})})}),S=p(function({entry:t}){const{hosted:e}=t,n=w(e);if(e.needsRoot&&!t.root)return null;const o=e.Component;return C(r(P,{hosted:e,props:n,children:r(g.Provider,{value:v(t),children:r(o,{hosted:e,props:n})})}),e.element)});class P extends D{constructor(){super(...arguments);l(this,"state",{failed:false})}static getDerivedStateFromError(){return{failed:true}}componentDidCatch(e,n){console.error(`<${this.props.hosted.element.localName}>:`,e)}componentDidUpdate(e){this.state.failed&&e.props!==this.props.props&&this.setState({failed:false})}render(){return this.state.failed?null:this.props.children}}const f=new WeakMap,u=Symbol.for("clover.elements");function H(s){let t=f.get(s);if(!t){const e=s;e[u]&&console.warn("Clover is loaded twice on this page: load one entry."),t=new F(e[u]??(e[u]={made:0})),f.set(s,t),N(s.createElement("div")).render(r(L,{registry:t}))}return t}export{F as Registry,H as hostOf};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ac as C,az as u,ax as I,bv as $,bC as L,bD as P}from"./viewer-
|
|
1
|
+
import{ac as C,az as u,ax as I,bv as $,bC as L,bD as P}from"./viewer-Ds1v3IFN.mjs";function q(t){const c=new Map;for(const e of C(t).canvases)S(e,c);return[...c.values()]}function S(t,c){u(t.items).forEach((e,r)=>u(e==null?void 0:e.items).forEach((d,f)=>{if(!I(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((s,y)=>{const w=(s==null?void 0:s.type)==="Choice";(w?u(s.items):[s]).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`,p=w?{key:L(t.id,d.id,r,f,y),item:x,image:o.id}:void 0,A=P(n,l,t.id).map(b=>{const h=j(b.annotation,o),N=Math.round(a.x+h.x*(a.w/h.width)),E=Math.round(a.y+h.y*(a.h/h.height)),g=Math.round(h.w*(a.w/h.width)),v=Math.round(h.h*(a.h/h.height)),M=`${t.id}#xywh=${N},${E},${g},${v}`;return{...b,canvasId:t.id,target:$(M),annotation:{...b.annotation,target:M},...p?{layer:p}:{}}});if(!A.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(...A)}})})}))}function j(t,c){const e=Number(c.width)||1,r=Number(c.height)||1,d={x:0,y:0,w:e,h:r,width:e,height:r},f=u(t==null?void 0:t.target)[0],s=(typeof f=="object"?u(f==null?void 0:f.selector):[]).find(i=>(i==null?void 0:i.type)==="ImageApiSelector"),y=typeof(s==null?void 0:s.region)=="string"?s.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*r,w:n/100*e,h:l/100*r,width:e,height:r}:{x:o,y:x,w:n,h:l,width:e,height:r}}const w=$(f).rect;return w?{...w,width:e,height:r}:d}export{q as imageLayers};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{bZ as c,b_ as d,b$ as l}from"./viewer-Ds1v3IFN.mjs";function m(i){const{width:e,height:t,maxWidth:n,maxHeight:r,maxArea:o}=i,g=(s,p)=>(!n||s<=n)&&(!r||p<=r)&&(!o||s*p<=o);if(g(e,t))return{width:e,height:t};const h=i.sizes.filter(s=>g(s.width,s.height));if(h.length)return h[h.length-1];if(!i.sizeByW)return{width:e,height:t};const a=Math.min(n?n/e:1,r?r/t:1,o?Math.sqrt(o/(e*t)):1);return{width:Math.max(1,Math.floor(e*a)),height:Math.max(1,Math.floor(t*a))}}function u(i,e=200){return i.sizes.find(t=>Math.max(t.width,t.height)>=e)??m(i)}const y={jpg:"image/jpeg",png:"image/png",webp:"image/webp",gif:"image/gif"};function f(i,e,t){const n={x:0,y:0,width:i.width,height:i.height};return{id:l(i,n,t.width,t.height),type:"Image",format:y[i.format]??"image/jpeg",width:t.width,height:t.height,service:[e]}}function w(i,e){if(e.version===3)return{id:e.id,type:"ImageService3",profile:typeof i.profile=="string"?i.profile:"level0"};const t=[].concat(i.profile??[]).find(n=>typeof n=="string");return{"@id":e.id,"@type":"ImageService2",profile:t??"http://iiif.io/api/image/2/level0.json"}}async function x(i,e){const t=c(i,e),n=w(i,t),r=`${t.id}/canvas`,o=[i.rights,i.license].flat().find(a=>typeof a=="string"),g=i.attribution,h={"@context":"http://iiif.io/api/presentation/3/context.json",id:t.id,type:"Manifest",label:{none:[""]},thumbnail:[f(t,n,u(t))],items:[{id:r,type:"Canvas",width:t.width,height:t.height,items:[{id:`${r}/page`,type:"AnnotationPage",items:[{id:`${r}/page/image`,type:"Annotation",motivation:"painting",body:f(t,n,m(t)),target:r}]}]}]};return o&&(h.rights=o),g&&(h.requiredStatement={label:{en:["Attribution"]},value:{none:[].concat(g).map(a=>typeof a=="string"?a:String((a==null?void 0:a["@value"])??"")).filter(Boolean)}}),{manifest:await d(h)}}export{m as fittedSize,x as imageServiceContent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cv as e}from"./viewer-
|
|
1
|
+
import{cv as e}from"./viewer-Ds1v3IFN.mjs";export{e as initCloverI18n};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{az as d,ay as o,bv as c}from"./viewer-Ds1v3IFN.mjs";function g(i){if(d(i==null?void 0:i.motivation).includes("linking"))for(const t of o(i)){const f=u(t);if(!f)continue;const{id:r,source:e}=f;if((e==null?void 0:e.type)==="Canvas"){const n=d(e.partOf).find(s=>(s==null?void 0:s.id)&&(!s.type||s.type==="Manifest")),p=c(r).id;return{id:r,canvasId:p,...n?{manifestId:n.id}:{}}}if((e==null?void 0:e.type)==="Manifest"||(e==null?void 0:e.type)==="Collection")return{id:r,manifestId:r};if(/^https?:\/\//i.test(r))return{id:r}}}function y(i){const t=d(i==null?void 0:i.motivation);if(!(!t.includes("tagging")&&!t.includes("identifying")))for(const f of o(i)){const r=u(f);if(r&&/^https?:\/\//i.test(r.id))return{id:r.id}}}function u(i){if((i==null?void 0:i.type)!=="SpecificResource")return;const t=i.source;if(typeof t=="string")return t?{id:t,source:void 0}:void 0;const f=t==null?void 0:t.id;return typeof f=="string"&&f?{id:f,source:t}:void 0}export{y as a,g as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bu as o,cs as s,ct as a}from"./viewer-
|
|
1
|
+
import{bu as o,cs as s,ct as a}from"./viewer-Ds1v3IFN.mjs";async function d(r,c,n){const t=typeof r.id=="string"?r.id:void 0,e=o(r.service);if(!e)return t;try{const i=await s(e,{request:n});return a(i,c)??t}catch{return t}}export{d as overlayImageUrl};
|
package/dist/web-components/viewer/{range-regions-DD-NwcwE.mjs → range-regions-BY9UB0kS.mjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{az as c,bA as l,bv as g,bB as v,ba as A}from"./viewer-
|
|
1
|
+
import{az as c,bA as l,bv as g,bB as v,ba as A}from"./viewer-Ds1v3IFN.mjs";const E=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 b=typeof n.id=="string"&&!c(n.behavior).includes("no-nav"),d=E(n.label),h=c(n.items).filter(o=>(o==null?void 0:o.type)!=="Range"&&g(v(o)).id).length;let w=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=w++;if(!b||!e.rect)continue;const{x,y:T,w:I,h:S}=e.rect,u=A(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:$,language:y})=>({type:"TextualBody",value:$,...y?{language:y}:{}}))},target:`${e.id}#xywh=${x},${T},${I},${S}`}})}};c(t.structures).forEach(s);const p=i.length?{id:l,source:"contents",entries:i}:null;return a.set(t,p),p}export{j as contentsSet};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Y as f,u as r,A as u,Z as p,_ as d,k as m}from"./viewer-
|
|
1
|
+
import{Y as f,u as r,A as u,Z as p,_ as d,k as m}from"./viewer-Ds1v3IFN.mjs";import"./styles-ihp-vncb.mjs";const v=f(null),l=new WeakMap;function y(t){let n=l.get(t);if(!n){const{render:o}=t;n={canvasId:t.canvasId,format:t.format,match:t.match,component:c=>r(A,{...c,render:o})},l.set(t,n)}return n}function h(t){if(Array.isArray(t))return t.filter(n=>typeof n=="object"&&n!==null&&typeof n.render=="function").map(y)}function A({render:t,canvases:n,bodies:o,children:c}){const a=u(null),s=p(v);return d(()=>{const e=a.current;if(!e)return;const i=t(e,{canvases:n,bodies:o,clover:s});return()=>{typeof i=="function"&&i(),e.replaceChildren()}},[t,n,o,s]),r(m,{children:[r("div",{ref:a,className:"clover-body-renderer",style:{position:"absolute",inset:0}}),c&&r("div",{className:"clover-canvas-controls",children:c})]})}export{h as toRenderers};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{a as mo,t as ho}from"./trusted-Dj6-eE4L.mjs";/*! @license DOMPurify 3.4.17 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.17/LICENSE */function rn(n,o){(o==null||o>n.length)&&(o=n.length);for(var s=0,l=Array(o);s<o;s++)l[s]=n[s];return l}function To(n){if(Array.isArray(n))return n}function _o(n,o){var s=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(s!=null){var l,c,m,E,$=[],C=true,Dt=false;try{if(m=(s=s.call(n)).next,o!==0)for(;!(C=(l=m.call(s)).done)&&($.push(l.value),$.length!==o);C=true);}catch(nt){Dt=true,c=nt}finally{try{if(!C&&s.return!=null&&(E=s.return(),Object(E)!==E))return}finally{if(Dt)throw c}}return $}}function go(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */function Ao(n,o){return To(n)||_o(n,o)||Eo(n,o)||go()}function Eo(n,o){if(n){if(typeof n=="string")return rn(n,o);var s={}.toString.call(n).slice(8,-1);return s==="Object"&&n.constructor&&(s=n.constructor.name),s==="Map"||s==="Set"?Array.from(n):s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?rn(n,o):void 0}}const Sn=Object.entries,an=Object.setPrototypeOf,So=Object.isFrozen,yn=Object.getPrototypeOf,bn=Object.getOwnPropertyDescriptor;let b=Object.freeze,R=Object.seal,mt=Object.create,On=typeof Reflect<"u"&&Reflect,ye=On.apply,be=On.construct;b||(b=function(o){return o});R||(R=function(o){return o});ye||(ye=function(o,s){for(var l=arguments.length,c=new Array(l>2?l-2:0),m=2;m<l;m++)c[m-2]=arguments[m];return o.apply(s,c)});be||(be=function(o){for(var s=arguments.length,l=new Array(s>1?s-1:0),c=1;c<s;c++)l[c-1]=arguments[c];return new o(...l)});const W=g(Array.prototype.forEach),yo=g(Array.prototype.lastIndexOf),sn=g(Array.prototype.pop),yt=g(Array.prototype.push),bo=g(Array.prototype.slice),Oo=g(Array.prototype.splice),dt=Array.isArray,me=Rn(Set),de=g(Set.prototype.add),bt=g(Set.prototype.has),et=g(String.prototype.toLowerCase),he=g(String.prototype.toString),ln=g(String.prototype.match),Ot=g(String.prototype.replace),cn=g(String.prototype.indexOf),Ro=g(String.prototype.trim),Do=g(Number.prototype.toString),Lo=g(Boolean.prototype.toString),un=typeof BigInt>"u"?null:g(BigInt.prototype.toString),fn=typeof Symbol>"u"?null:g(Symbol.prototype.toString),N=g(Object.prototype.hasOwnProperty),Rt=g(Object.prototype.toString),O=g(RegExp.prototype.test),G=Rn(TypeError);function g(n){return function(o){o instanceof RegExp&&(o.lastIndex=0);for(var s=arguments.length,l=new Array(s>1?s-1:0),c=1;c<s;c++)l[c-1]=arguments[c];return ye(n,o,l)}}function Rn(n){return function(){for(var o=arguments.length,s=new Array(o),l=0;l<o;l++)s[l]=arguments[l];return be(n,s)}}function d(n,o){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:et;if(an&&an(n,null),!dt(o))return n;let l=o.length;for(;l--;){let c=o[l];if(typeof c=="string"){const m=s(c);m!==c&&(So(o)||(o[l]=m),c=m)}n[c]=true}return n}function wo(n){for(let o=0;o<n.length;o++)N(n,o)||(n[o]=null);return n}function M(n){const o=mt(null);for(const l of Sn(n)){var s=Ao(l,2);const c=s[0],m=s[1];N(n,c)&&(dt(m)?o[c]=wo(m):m&&typeof m=="object"&&m.constructor===Object?o[c]=M(m):o[c]=m)}return o}function Io(n){switch(typeof n){case"string":return n;case"number":return Do(n);case"boolean":return Lo(n);case"bigint":return un?un(n):"0";case"symbol":return fn?fn(n):"Symbol()";case"undefined":return Rt(n);case"function":case"object":{if(n===null)return Rt(n);const o=n,s=P(o,"toString");if(typeof s=="function"){const l=s(o);return typeof l=="string"?l:Rt(l)}return Rt(n)}default:return Rt(n)}}function P(n,o){for(;n!==null;){const l=bn(n,o);if(l){if(l.get)return g(l.get);if(typeof l.value=="function")return g(l.value)}n=yn(n)}function s(){return null}return s}function No(n,o){for(;n!==null;){const s=bn(n,o);if(s)return s.get?g(s.get):null;n=yn(n)}return null}function Co(n){try{return O(n,""),true}catch{return false}}const pn=b(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Te=b(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),_e=b(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Mo=b(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ge=b(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),vo=b(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),mn=b(["#text"]),dn=b(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Ae=b(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),hn=b(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),zt=b(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Po=R(/{{[\w\W]*|^[\w\W]*}}/g),xo=R(/<%[\w\W]*|^[\w\W]*%>/g),ko=R(/\${[\w\W]*/g),Uo=R(/^data-[\-\w.\u00B7-\uFFFF]+$/),zo=R(/^aria-[\-\w]+$/),Tn=R(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Fo=R(/^(?:\w+script|data):/i),Ho=R(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Wo=R(/^html$/i),Go=R(/^[a-z][.\w]*(-[.\w]+)+$/i),Ee=R(/<[/\w!]/g),_n=R(/<[/\w]/g),Bo=R(/<\/no(script|embed|frames)/i),gn=R(/\/>/i),S={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Yo=b(d({},["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"])),Vo=function(){return typeof window>"u"?null:window},jo=function(o,s){if(typeof o!="object"||typeof o.createPolicy!="function")return null;let l=null;const c="data-tt-policy-suffix";s&&s.hasAttribute(c)&&(l=s.getAttribute(c));const m="dompurify"+(l?"#"+l:"");try{return o.createPolicy(m,{createHTML(E){return E},createScriptURL(E){return E}})}catch{return console.warn("TrustedTypes policy "+m+" could not be created."),null}},An=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},j=function(o,s,l,c){return N(o,s)&&dt(o[s])?d(c.base?M(c.base):{},o[s],c.transform):l},Se=function(o,s,l){const c=N(o,s)?o[s]:void 0;return c&&typeof c=="object"?M(c):l()};function Dn(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Vo();const o=a=>Dn(a);if(o.version="3.4.17",o.removed=[],!n||!n.document||n.document.nodeType!==S.document||!n.Element)return o.isSupported=false,o;let s=n.document;const l=s,c=l.currentScript;n.DocumentFragment;const m=n.HTMLTemplateElement,E=n.Node,$=n.Element,C=n.NodeFilter;n.NamedNodeMap===void 0&&(n.NamedNodeMap||n.MozNamedAttrMap),n.HTMLFormElement;const Dt=n.DOMParser,nt=n.trustedTypes,F=$.prototype,vn=P(F,"cloneNode"),Ft=P(F,"remove"),Oe=P(F,"removeAttributeNode"),Pn=P(F,"nextSibling"),ht=P(F,"childNodes"),ot=P(F,"parentNode"),Ht=P(F,"shadowRoot"),Wt=P(F,"attributes"),X=E&&E.prototype?P(E.prototype,"nodeType"):null,rt=E&&E.prototype?P(E.prototype,"nodeName"):null,Lt=E&&E.prototype?P(E.prototype,"ownerDocument"):null,v=function(t){return X?X(t):t.nodeType},Tt=function(t){return rt?rt(t):t.nodeName},Re=No(F,"namespaceURI"),Gt=function(t){return Re?Re(t):t.namespaceURI};if(typeof m=="function"){const a=s.createElement("template");a.content&&a.content.ownerDocument&&(s=a.content.ownerDocument)}let L,q="",Bt,De=false,_t=0;const Le=function(){if(_t>0)throw G('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},it=function(t){Le(),_t++;try{return L.createHTML(t)}finally{_t--}},xn=function(t){Le(),_t++;try{return L.createScriptURL(t)}finally{_t--}},kn=function(){return De||(Bt=jo(nt,c),De=true),Bt},wt=s,Yt=wt.implementation,we=wt.createNodeIterator,Un=wt.createDocumentFragment,zn=wt.getElementsByTagName,Fn=l.importNode;let h=An();o.isSupported=typeof Sn=="function"&&typeof ot=="function"&&Yt&&Yt.createHTMLDocument!==void 0;const Hn=Po,Wn=xo,Gn=ko,Bn=Uo,Yn=zo,Vn=Fo,Ie=Ho,jn=Go;let Ne=Tn,T=null;const Vt=d({},[...pn,...Te,..._e,...ge,...mn]);let _=null;const jt=d({},[...dn,...Ae,...hn,...zt]);let k=Object.seal(mt(null,{tagNameCheck:{writable:true,configurable:false,enumerable:true,value:null},attributeNameCheck:{writable:true,configurable:false,enumerable:true,value:null},allowCustomizedBuiltInElements:{writable:true,configurable:false,enumerable:true,value:false}})),gt=null,Ce=null;const B=Object.seal(mt(null,{tagCheck:{writable:true,configurable:false,enumerable:true,value:null},attributeCheck:{writable:true,configurable:false,enumerable:true,value:null}}));let Me=true,$t=true,ve=false,Xt=true,H=false,K=true,Z=false,qt=false,It=null,Nt=null,Kt=false,at=false,Ct=false,Mt=false,Pe=true,xe=false;const ke="user-content-";let Zt=true,Jt=false,J=null,st={},Q=null;const Ue=d({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let ze=null;const Fe=d({},["audio","video","img","source","image","track"]);let He=null;const We=d({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),vt="http://www.w3.org/1998/Math/MathML",Pt="http://www.w3.org/2000/svg",U="http://www.w3.org/1999/xhtml";let lt=U,Qt=false,te=null;const $n=d({},[vt,Pt,U],he),Ge=b(["mi","mo","mn","ms","mtext"]);let ee=d({},Ge);const Be=b(["annotation-xml"]);let ne=d({},Be);const Xn=d({},["title","style","font","a","script"]);let At=null;const qn=["application/xhtml+xml","text/html"],Kn="text/html";let A=null,ct=null;const Zn=s.createElement("form"),Ye=function(t){return t instanceof RegExp||t instanceof Function},oe=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ct&&ct===t)return;(!t||typeof t!="object")&&(t={}),t=M(t),At=qn.indexOf(t.PARSER_MEDIA_TYPE)===-1?Kn:t.PARSER_MEDIA_TYPE,A=At==="application/xhtml+xml"?he:et,T=j(t,"ALLOWED_TAGS",Vt,{transform:A}),_=j(t,"ALLOWED_ATTR",jt,{transform:A}),te=j(t,"ALLOWED_NAMESPACES",$n,{transform:he}),He=j(t,"ADD_URI_SAFE_ATTR",We,{transform:A,base:We}),ze=j(t,"ADD_DATA_URI_TAGS",Fe,{transform:A,base:Fe}),Q=j(t,"FORBID_CONTENTS",Ue,{transform:A}),gt=j(t,"FORBID_TAGS",M({}),{transform:A}),Ce=j(t,"FORBID_ATTR",M({}),{transform:A}),st=N(t,"USE_PROFILES")?t.USE_PROFILES&&typeof t.USE_PROFILES=="object"?M(t.USE_PROFILES):t.USE_PROFILES:false,Me=t.ALLOW_ARIA_ATTR!==false,$t=t.ALLOW_DATA_ATTR!==false,ve=t.ALLOW_UNKNOWN_PROTOCOLS||false,Xt=t.ALLOW_SELF_CLOSE_IN_ATTR!==false,H=t.SAFE_FOR_TEMPLATES||false,K=t.SAFE_FOR_XML!==false,Z=t.WHOLE_DOCUMENT||false,at=t.RETURN_DOM||false,Ct=t.RETURN_DOM_FRAGMENT||false,Mt=t.RETURN_TRUSTED_TYPE||false,Kt=t.FORCE_BODY||false,Pe=t.SANITIZE_DOM!==false,xe=t.SANITIZE_NAMED_PROPS||false,Zt=t.KEEP_CONTENT!==false,Jt=t.IN_PLACE||false,Ne=Co(t.ALLOWED_URI_REGEXP)?t.ALLOWED_URI_REGEXP:Tn,lt=typeof t.NAMESPACE=="string"?t.NAMESPACE:U,ee=Se(t,"MATHML_TEXT_INTEGRATION_POINTS",()=>d({},Ge)),ne=Se(t,"HTML_INTEGRATION_POINTS",()=>d({},Be));const e=Se(t,"CUSTOM_ELEMENT_HANDLING",()=>mt(null));if(k=mt(null),N(e,"tagNameCheck")&&Ye(e.tagNameCheck)&&(k.tagNameCheck=e.tagNameCheck),N(e,"attributeNameCheck")&&Ye(e.attributeNameCheck)&&(k.attributeNameCheck=e.attributeNameCheck),N(e,"allowCustomizedBuiltInElements")&&typeof e.allowCustomizedBuiltInElements=="boolean"&&(k.allowCustomizedBuiltInElements=e.allowCustomizedBuiltInElements),R(k),H&&($t=false),Ct&&(at=true),st&&(T=d({},mn),_=mt(null),st.html===true&&(d(T,pn),d(_,dn)),st.svg===true&&(d(T,Te),d(_,Ae),d(_,zt)),st.svgFilters===true&&(d(T,_e),d(_,Ae),d(_,zt)),st.mathMl===true&&(d(T,ge),d(_,hn),d(_,zt))),B.tagCheck=null,B.attributeCheck=null,N(t,"ADD_TAGS")&&(typeof t.ADD_TAGS=="function"?B.tagCheck=t.ADD_TAGS:dt(t.ADD_TAGS)&&(T===Vt&&(T=M(T)),d(T,t.ADD_TAGS,A))),N(t,"ADD_ATTR")&&(typeof t.ADD_ATTR=="function"?B.attributeCheck=t.ADD_ATTR:dt(t.ADD_ATTR)&&(_===jt&&(_=M(_)),d(_,t.ADD_ATTR,A))),N(t,"ADD_FORBID_CONTENTS")&&dt(t.ADD_FORBID_CONTENTS)&&(Q===Ue&&(Q=M(Q)),d(Q,t.ADD_FORBID_CONTENTS,A)),Zt&&(T["#text"]=true),Z&&d(T,["html","head","body"]),T.table&&(d(T,["tbody"]),delete gt.tbody),t.TRUSTED_TYPES_POLICY){if(typeof t.TRUSTED_TYPES_POLICY.createHTML!="function")throw G('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof t.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw G('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const r=L;L=t.TRUSTED_TYPES_POLICY;try{q=it("")}catch(i){throw L=r,i}}else t.TRUSTED_TYPES_POLICY===null?(L=void 0,q=""):(L===void 0&&(L=kn()),L&&typeof q=="string"&&(q=it("")));b&&b(t),ct=t},Ve=d({},[...Te,..._e,...Mo]),je=d({},[...ge,...vo]),Jn=function(t,e,r){return e.namespaceURI===U?t==="svg":e.namespaceURI===vt?t==="svg"&&(r==="annotation-xml"||ee[r]):!!Ve[t]},Qn=function(t,e,r){return e.namespaceURI===U?t==="math":e.namespaceURI===Pt?t==="math"&&ne[r]:!!je[t]},to=function(t,e,r){return e.namespaceURI===Pt&&!ne[r]||e.namespaceURI===vt&&!ee[r]?false:!je[t]&&(Xn[t]||!Ve[t])},eo=function(t){const e=Gt(t),r=et(Tt(t)),i=ot(t);let u,f;return i&&v(i)===S.element?(u={namespaceURI:Gt(i)},f=et(Tt(i))):(u={namespaceURI:lt},f="template"),te[e]?e===Pt?Jn(r,u,f):e===vt?Qn(r,u,f):e===U?to(r,u,f):!!(At==="application/xhtml+xml"&&te[e]):false},Y=function(t){yt(o.removed,{element:t});try{ot(t).removeChild(t)}catch{if(Ft(t),!ot(t))throw G("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},$e=function(t,e,r){try{Oe(t,e)}catch{try{t.removeAttribute(r)}catch{}}},re=function(t){ae(t);const e=ht(t);e&&W(bo(e),i=>{try{Ft(i)}catch{}});const r=v(t)===S.element?Wt(t):null;if(r)for(let i=r.length-1;i>=0;--i){const u=r[i],f=u&&u.name;typeof f=="string"&&$e(t,u,f)}},ut=function(t,e,r){if(!r)try{r=e.getAttributeNode(t)}catch{r=null}yt(o.removed,{attribute:r||null,from:e});try{r?Oe(e,r):e.removeAttribute(t)}catch{try{e.removeAttribute(t)}catch{}}if(t==="is")if(at||Ct)try{Y(e)}catch{}else try{e.setAttribute(t,"")}catch{}},Xe=function(t){const e=Wt(t);if(e)for(let r=e.length-1;r>=0;--r){const i=e[r],u=i&&i.name;typeof u!="string"||_[A(u)]||$e(t,i,u)}},ie=function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:false;const i=[t];for(;i.length>0;){const u=i.pop();if(e(u)===false)continue;if(r&&v(u)===S.element){const p=Ht(u);V(p)&&i.push(p)}const f=ht(u);if(f)for(let p=f.length-1;p>=0;--p)i.push(f[p])}},ae=function(t){ie(t,e=>{v(e)===S.element&&Xe(e)})},se=function(t){const e=[];return ie(t,r=>{e.push(r)},true),e},no=function(t,e){const r=me();W(se(t),i=>{v(i)===S.element&&de(r,i)}),W(e,i=>{v(i)===S.element&&!bt(r,i)&&Xe(i)})},qe=function(t,e){let r=false;return W(o.removed,i=>{i.element&&(r=r||i.element===t,ae(i.element))}),no(t,e),r},oo=8,ro=function(t,e){const r=J;let i=null;const u=()=>(i||(i=me(),W(e,f=>{de(i,f)})),i);for(let f=0;;f++){const p=se(t),y=[t];let z=false;if(W(p,D=>{v(D)===S.documentFragment?yt(y,D):!z&&!bt(r,D)&&(z=bt(u(),D))}),!z)return;if(f>=oo)throw G("the tree kept changing during in-place sanitization; refusing to return it");W(y,(D,w)=>{io(D,w>0,t,u())})}},io=function(t,e,r,i){const u=le(t);let f;for(;f=u.nextNode();)!bt(i,f)||bt(J,f)||(e&&x(h.uponSanitizeShadowNode,f,null),ue(f,r),fe(f,r),V(f.content)&&St(f.content))},ao=function(t){J&&de(J,t)},Ke=function(t,e){return K?t==="patchsrc"?true:t==="for"&&e!=="label"&&e!=="output":false},so=function(t){K&&ie(t,e=>{const r=v(e);if(r===S.processingInstruction||r===S.comment&&O(_n,e.data)){try{Ft(e)}catch{}return false}if(r===S.element){const i=e,u=A(Tt(e));try{i.hasAttribute&&i.hasAttribute("patchsrc")&&i.removeAttribute("patchsrc"),i.hasAttribute&&i.hasAttribute("for")&&Ke("for",u)&&i.removeAttribute("for")}catch{}}return true})},Ze=function(t){let e=null,r=null;if(Kt)t="<remove></remove>"+t;else{const f=ln(t,/^[\r\n\t ]+/);r=f&&f[0]}At==="application/xhtml+xml"&<===U&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const i=L?it(t):t;if(lt===U)try{e=new Dt().parseFromString(i,At)}catch{}if(!e||!e.documentElement){e=Yt.createDocument(lt,"template",null);try{e.documentElement.innerHTML=Qt?q:i}catch{}}const u=e.body||e.documentElement;return t&&r&&u.insertBefore(s.createTextNode(r),u.childNodes[0]||null),lt===U?zn.call(e,Z?"html":"body")[0]:Z?e.documentElement:u},le=function(t){const e=Lt?Lt(t):t.ownerDocument;return we.call(e||t,t,C.SHOW_ELEMENT|C.SHOW_COMMENT|C.SHOW_TEXT|C.SHOW_PROCESSING_INSTRUCTION|C.SHOW_CDATA_SECTION,null)},xt=function(t){return t=Ot(t,Hn," "),t=Ot(t,Wn," "),t=Ot(t,Gn," "),t},ce=function(t){var e;Je(t);const r=(e=t.querySelectorAll)===null||e===void 0?void 0:e.call(t,"template");r&&W(r,i=>{V(i.content)&&ce(i.content)})},Je=function(t){t.normalize();const e=Lt?Lt(t):t.ownerDocument,r=we.call(e||t,t,C.SHOW_TEXT|C.SHOW_COMMENT|C.SHOW_CDATA_SECTION|C.SHOW_PROCESSING_INSTRUCTION,null);let i=r.nextNode();for(;i;)i.data=xt(i.data),i=r.nextNode()},kt=function(t){const e=rt?rt(t):null;return typeof e!="string"||A(e)!=="form"?false:typeof t.nodeName!="string"||typeof t.textContent!="string"||typeof t.removeChild!="function"||t.attributes!==Wt(t)||typeof t.removeAttribute!="function"||typeof t.removeAttributeNode!="function"||typeof t.getAttributeNode!="function"||typeof t.setAttribute!="function"||typeof t.namespaceURI!="string"||typeof t.insertBefore!="function"||typeof t.hasChildNodes!="function"||t.nodeType!==X(t)||t.childNodes!==ht(t)},V=function(t){if(!X||typeof t!="object"||t===null)return false;try{return X(t)===S.documentFragment}catch{return false}},Et=function(t){if(!X||typeof t!="object"||t===null)return false;try{return typeof X(t)=="number"}catch{return false}};function x(a,t,e){a.length!==0&&W(a,r=>{r.call(o,t,e,ct)})}const lo=function(t,e){return!!(K&&t.hasChildNodes()&&!Et(t.firstElementChild)&&O(Ee,t.textContent)&&O(Ee,t.innerHTML)||K&&Yo[e]&&v(t)===S.element&&Gt(t)===U&&(Et(t.firstElementChild)||typeof t.textContent=="string"&&O(Ee,t.textContent))||t.nodeType===S.processingInstruction||K&&t.nodeType===S.comment&&O(_n,t.data))},Ut=function(t,e){if(t instanceof RegExp)return O(t,e);if(t instanceof Function){for(var r=arguments.length,i=new Array(r>2?r-2:0),u=2;u<r;u++)i[u-2]=arguments[u];return!!t(e,...i)}return false},co=function(t,e,r){if(!gt[e]&&en(e)&&Ut(k.tagNameCheck,e))return false;if(Zt&&!Q[e]&&!Q[et(e)]){const i=ot(t),u=ht(t);if(u&&i){const f=u.length;for(let p=f-1;p>=0;--p){const y=t===r?vn(u[p],true):u[p];i.insertBefore(y,Pn(t))}}}return Y(t),true},Qe=function(t,e,r,i){return t.length===0?e:e===r||e===i?M(e):e},ft=function(t,e){return t===e||ot(t)!==null?false:(Jt&&ae(t),true)},ue=function(t,e){if(ao(t),x(h.beforeSanitizeElements,t,null),ft(t,e))return true;if(kt(t))return Y(t),true;const r=A(Tt(t));if(T=Qe(h.uponSanitizeElement,T,Vt,It),x(h.uponSanitizeElement,t,{tagName:r,allowedTags:T}),ft(t,e))return true;if(lo(t,r))return Y(t),true;if(gt[r]||!(B.tagCheck instanceof Function&&B.tagCheck(r))&&!T[r]){const i=co(t,r,e);return i===false&&(x(h.afterSanitizeElements,t,null),ft(t,e))?true:i}if(v(t)===S.element&&!eo(t)||(r==="noscript"||r==="noembed"||r==="noframes")&&O(Bo,t.innerHTML))return Y(t),true;if(H&&t.nodeType===S.text){const i=xt(t.textContent);t.textContent!==i&&(yt(o.removed,{element:t.cloneNode()}),t.textContent=i)}return x(h.afterSanitizeElements,t,null),ft(t,e)},tn=function(t,e,r){if(Ce[e]||Ke(e,t)||Pe&&(e==="id"||e==="name")&&(r in s||r in Zn))return false;const i=_[e]||B.attributeCheck instanceof Function&&B.attributeCheck(e,t);return $t&&O(Bn,e)||Me&&O(Yn,e)?true:i?He[e]||O(Ne,Ot(r,Ie,""))||(e==="src"||e==="xlink:href"||e==="href")&&t!=="script"&&cn(r,"data:")===0&&ze[t]||ve&&!O(Vn,Ot(r,Ie,""))?true:!r:en(t)&&Ut(k.tagNameCheck,t)&&Ut(k.attributeNameCheck,e,t)||e==="is"&&k.allowCustomizedBuiltInElements&&Ut(k.tagNameCheck,r)},uo=d({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),en=function(t){return!uo[et(t)]&&O(jn,t)},fo=function(t,e,r,i){if(L&&typeof nt=="object"&&typeof nt.getAttributeType=="function"&&!r)switch(nt.getAttributeType(t,e)){case"TrustedHTML":return it(i);case"TrustedScriptURL":return xn(i)}return i},po=function(t,e,r,i){try{return r?t.setAttributeNS(r,e,i):t.setAttribute(e,i),kt(t)?(Y(t),false):true}catch{return ut(e,t),false}},nn=function(t,e){return K&&O(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,e)?true:et(t)==="attributename"&&ln(e,"href")!==null},fe=function(t,e){if(x(h.beforeSanitizeAttributes,t,null),ft(t,e))return;const r=t.attributes;if(!r||kt(t))return;_=Qe(h.uponSanitizeAttribute,_,jt,Nt);const i={attrName:"",attrValue:"",keepAttr:true,allowedAttributes:_,forceKeepAttr:void 0};let u=r.length;const f=A(t.nodeName);for(;u--;){const p=r[u],y=p.name,z=p.namespaceURI,D=p.value,w=A(y),pt=D;let I=y==="value"?pt:Ro(pt),on=false;if(i.attrName=w,i.attrValue=I,i.keepAttr=true,i.forceKeepAttr=void 0,x(h.uponSanitizeAttribute,t,i),I=i.attrValue,xe&&(w==="id"||w==="name")&&cn(I,ke)!==0&&(ut(y,t,p),I=ke+I,on=true),nn(y,I)){ut(y,t,p);continue}if(!i.forceKeepAttr){if(!i.keepAttr){ut(y,t,p);continue}if(!Xt&&O(gn,I)){ut(y,t,p);continue}if(H&&(I=xt(I)),!tn(f,w,I)){ut(y,t,p);continue}I=fo(f,w,z,I),I!==pt&&po(t,y,z,I)&&on&&sn(o.removed)}}x(h.afterSanitizeAttributes,t,null),ft(t,e)},St=function(t){let e=null;const r=le(t);for(x(h.beforeSanitizeShadowDOM,t,null);e=r.nextNode();)if(x(h.uponSanitizeShadowNode,e,null),ue(e,t),fe(e,t),V(e.content)&&St(e.content),v(e)===S.element){const i=Ht(e);V(i)&&(pe(i),St(i))}H&&Je(t),x(h.afterSanitizeShadowDOM,t,null)},pe=function(t){const e=[{node:t,shadow:null}];for(;e.length>0;){const r=e.pop();if(r.shadow){St(r.shadow);continue}const i=r.node,u=v(i)===S.element,f=ht(i);if(f)for(let p=f.length-1;p>=0;--p)e.push({node:f[p],shadow:null});if(u){const p=rt?rt(i):null;if(typeof p=="string"&&A(p)==="template"){const y=i.content;V(y)&&e.push({node:y,shadow:null})}}if(u){const p=Ht(i);V(p)&&e.push({node:null,shadow:p},{node:p,shadow:null})}}};return o.sanitize=function(a){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=null,r=null,i=null,u=null;if(Qt=!a,Qt&&(a="<!-->"),typeof a!="string"&&!Et(a)&&(a=Io(a),typeof a!="string"))throw G("dirty is not a string, aborting");if(!o.isSupported)return a;qt?(T=It,_=Nt):oe(t),(h.uponSanitizeElement.length>0||h.uponSanitizeAttribute.length>0)&&(T=M(T)),h.uponSanitizeAttribute.length>0&&(_=M(_)),o.removed=[];const f=Jt&&typeof a!="string"&&Et(a);let p=[];const y=J;if(f){so(a);const w=Tt(a);if(typeof w=="string"){const pt=A(w);if(!T[pt]||gt[pt])throw re(a),G("root node is forbidden and cannot be sanitized in-place")}if(kt(a))throw re(a),G("root node is clobbered and cannot be sanitized in-place");p=se(a),J=me()}else if(Et(a))e=Ze("<!---->"),r=e.ownerDocument.importNode(a,true),r.nodeType===S.element&&r.nodeName==="BODY"||r.nodeName==="HTML"?e=r:e.appendChild(r),pe(e);else{if(!at&&!H&&!Z&&a.indexOf("<")===-1)return L&&Mt?it(a):a;if(e=Ze(a),!e)return at?null:Mt?q:""}e&&Kt&&Y(e.firstChild);const z=f?a:e;try{f&&pe(a);const w=le(z);for(;i=w.nextNode();)ue(i,z),fe(i,z),V(i.content)&&St(i.content);f&&ro(a,p)}catch(w){throw f&&(re(a),qe(a,p)),w}finally{J=y}if(f){if(qe(a,p))throw G("a node selected for removal could not be safely returned; refusing to sanitize in place");return H&&ce(a),a}if(at){if(H&&ce(e),Ct)for(u=Un.call(e.ownerDocument);e.firstChild;)u.appendChild(e.firstChild);else u=e;return(_.shadowroot||_.shadowrootmode)&&(u=Fn.call(l,u,true)),u}let D=Z?e.outerHTML:e.innerHTML;return Z&&T["!doctype"]&&e.ownerDocument&&e.ownerDocument.doctype&&e.ownerDocument.doctype.name&&O(Wo,e.ownerDocument.doctype.name)&&(D="<!DOCTYPE "+e.ownerDocument.doctype.name+`>
|
|
3
|
+
`+D),H&&(D=xt(D)),L&&Mt?it(D):D},o.setConfig=function(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};oe(a),qt=true,It=T,Nt=_},o.clearConfig=function(){ct=null,qt=false,It=null,Nt=null,L=Bt,q=""},o.isValidAttribute=function(a,t,e){ct||oe({});const r=A(a),i=A(t);return typeof e=="string"&&(nn(t,e)||!Xt&&O(gn,e))?false:tn(r,i,e)},o.addHook=function(a,t){typeof t=="function"&&N(h,a)&&yt(h[a],t)},o.removeHook=function(a,t){if(N(h,a)){if(t!==void 0){const e=yo(h[a],t);return e===-1?void 0:Oo(h[a],e,1)[0]}return sn(h[a])}},o.removeHooks=function(a){N(h,a)&&(h[a]=[])},o.removeAllHooks=function(){h=An()},o}var $o=Dn();const Ln=["a","b","br","i","img","p","small","span","sub","sup"],wn=["href","alt","src","height","width","lang","dir"],In=["height","width","lang","dir"],Nn=/^(?:https?|mailto):/i,Cn={ALLOWED_TAGS:Ln,ALLOWED_ATTR:wn,ADD_URI_SAFE_ATTR:In,ALLOWED_URI_REGEXP:Nn,ALLOW_ARIA_ATTR:false,ALLOW_DATA_ATTR:false},Xo={...Cn,ALLOWED_TAGS:[...Ln,"ul","ol","li","div"],ALLOWED_ATTR:[...wn,"role","aria-level","start","id","aria-labelledby"],ADD_URI_SAFE_ATTR:[...In,"aria-level","start","id","aria-labelledby"]},En=/^clover-md-\d+$/,qo={role:[["P",/^heading$/],["DIV",/^group$/]],"aria-level":[["P",/^[1-6]$/]],start:[["OL",/^\d+$/]],id:[["P",En]],"aria-labelledby":[["DIV",En]]},Ko=new Set(["address","article","aside","blockquote","dd","details","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","li","main","nav","ol","p","pre","section","summary","table","tbody","td","tfoot","th","thead","tr","ul"]);function Zo(n){var l;if(!n)return n;const o=document.createElement("template");o.innerHTML=ho(n);for(const c of o.content.querySelectorAll("img:not([src])"))c.remove();for(const c of o.content.querySelectorAll("p"))!((l=c.textContent)!=null&&l.trim())&&!c.querySelector("img, br")&&c.remove();const s=document.createTreeWalker(o.content,NodeFilter.SHOW_TEXT);for(let c=s.nextNode();c;c=s.nextNode())c.nodeValue=c.nodeValue.replace(/[ \t\n\r\f]{2,}/g," ");return o.innerHTML.replace(/^[ \t\n\r\f]+|[ \t\n\r\f]+$/g,"")}let tt=null;const Mn=new WeakMap;function Jo(n){var c;const o=n.closest("a");if(!(o!=null&&o.getAttribute("href"))||((c=o.textContent)==null?void 0:c.trim())||[...o.querySelectorAll("img")].some(m=>m.getAttribute("alt")))return;const l=Mn.get(o);if(l)return l;try{const m=new URL(o.getAttribute("href"));return(m.protocol==="mailto:"?m.pathname:m.host)||void 0}catch{return}}function Qo(){return tt||(tt=$o(window),tt.addHook("uponSanitizeAttribute",(n,o)=>{n.nodeName==="A"&&o.attrName==="title"&&o.attrValue.trim()&&Mn.set(n,o.attrValue.trim())}),tt.addHook("uponSanitizeElement",(n,o)=>{o.allowedTags[o.tagName]||!Ko.has(o.tagName)||n.nodeType===1&&(n.prepend(" "),n.append(" "))}),tt.addHook("afterSanitizeAttributes",n=>{var o,s;n.nodeName==="IMG"&&!n.hasAttribute("alt")&&n.setAttribute("alt",Jo(n)??"");for(const l of["src","href"]){const c=(o=n.getAttribute)==null?void 0:o.call(n,l);c&&!Nn.test(c.trim())&&n.removeAttribute(l)}for(const[l,c]of Object.entries(qo)){const m=(s=n.getAttribute)==null?void 0:s.call(n,l);m!=null&&!c.some(([E,$])=>n.nodeName===E&&$.test(m))&&n.removeAttribute(l)}}),tt)}function er(n,{markdown:o=false}={}){if(typeof window>"u")return n;const s=o?Xo:Cn,l=mo();return Zo(Qo().sanitize(n,l?{...s,TRUSTED_TYPES_POLICY:l}:s))}export{er as sanitizeHTML,ho as trusted};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{bW as a}from"./viewer-Ds1v3IFN.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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bE as b,az as f,bv as w,bF as S}from"./viewer-
|
|
1
|
+
import{bE as b,az as f,bv as w,bF as S}from"./viewer-Ds1v3IFN.mjs";const x=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 A(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 A(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<x&&!d.has(n);){d.add(n);const c=await b(s,n,o);i.push(c),n=T(c)}return $(i,t)}function E(r){var e;const t=f(r)[0];if(typeof t=="string"||!t)return t;const s=t.full??t["@id"],o=(e=f(t.selector)[0])==null?void 0:e.value;return typeof o=="string"&&typeof s=="string"?`${s}#${o}`:s}function T(r){var o;const t=r.next??((o=r.within)==null?void 0:o.next),s=typeof t=="string"?t:(t==null?void 0:t.id)??(t==null?void 0:t["@id"]);return typeof s=="string"?s:null}function $(r,t){var e,i;const s=[],o=[];for(const n of r){const d=Array.isArray(n.resources),c=d?n.resources:f(n.items),u=new Map;for(const a of c){const p=a.id??a["@id"],m=d?E(a.on):f(a.target)[0],v=w(m);if(!p||!v.id)continue;const y=d?(e=a.resource)==null?void 0:e.chars:f(a.body).map(l=>l==null?void 0:l.value).find(l=>typeof l=="string"),I={id:p,setId:S,canvasId:v.id,target:v,motivation:["highlighting"],bodies:[{value:String(y??t)}],annotation:{id:p,type:"Annotation",motivation:["highlighting"],body:{type:"TextualBody",value:String(y??t)},target:m}};u.set(p,I),s.push(I)}const g=d?H(n,u):M(n,u),h=new Set(g.flatMap(a=>a.entryIds));o.push(...g);for(const a of u.values())h.has(a.id)||o.push({id:a.id,canvasId:a.canvasId,entryIds:[a.id],match:((i=a.bodies[0])==null?void 0:i.value)??t})}return{query:t,hits:o,set:{id:S,label:{none:[t]},source:"search",entries:s}}}function H(r,t){var o;const s=[];for(const e of f(r.hits)){const i=f(e.annotations).filter(n=>t.has(n));i.length&&s.push({id:i.join(" "),canvasId:t.get(i[0]).canvasId,entryIds:i,before:e.before,match:String(e.match??((o=t.get(i[0]).bodies[0])==null?void 0:o.value)??""),after:e.after})}return s}function M(r,t){var o,e;const s=[];for(const i of f(r.annotations))for(const n of f(i==null?void 0:i.items))if(f(n==null?void 0:n.motivation).includes("contextualizing"))for(const c of f(n.target)){const u=typeof(c==null?void 0:c.source)=="string"?c.source:(o=c==null?void 0:c.source)==null?void 0:o.id,g=u?t.get(u):void 0;if(!g)continue;const h=f(c.selector).find(a=>(a==null?void 0:a.type)==="TextQuoteSelector");s.push({id:`${n.id??u}#${u}`,canvasId:g.canvasId,entryIds:[g.id],before:h==null?void 0:h.prefix,match:String((h==null?void 0:h.exact)??((e=g.bodies[0])==null?void 0:e.value)??""),after:h==null?void 0:h.suffix})}return s}export{$ as readResults,A as search,R as searchInto};
|