@nulib/clover 4.2.0 → 4.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/components/Canvas/CanvasView.mjs +37 -4
- package/dist/components/Canvas/ChaptersMenu.mjs +6 -1
- package/dist/components/Canvas/ControlMenu.mjs +9 -2
- package/dist/components/Canvas/Controls.mjs +17 -4
- package/dist/components/Canvas/FrameAnimation.mjs +3 -0
- package/dist/components/Canvas/ImageControls.mjs +8 -3
- package/dist/components/Canvas/Placeholder.mjs +5 -2
- package/dist/components/Canvas/RowFits.mjs +3 -1
- package/dist/components/Canvas/media/MediaBody.mjs +41 -10
- package/dist/components/Canvas/media/Player.mjs +3 -0
- package/dist/components/Canvas/media/SeekMarks.mjs +236 -0
- package/dist/components/Canvas/media/Transport.mjs +29 -3
- package/dist/components/Canvas/media/useMediaElement.mjs +54 -19
- package/dist/components/Items/masonry.mjs +2 -0
- package/dist/components/Map/MapView.mjs +42 -2
- package/dist/components/Map/maplibre-sheet.mjs +5 -0
- package/dist/components/Map/sheet.mjs +19 -0
- package/dist/components/Map/worker.mjs +28 -1
- package/dist/components/Scene/SceneView.mjs +3 -0
- package/dist/core/content-state.mjs +1 -11
- package/dist/core/load.mjs +9 -1
- package/dist/core/presentation.mjs +4 -5
- package/dist/core/sanitize.mjs +15 -3
- package/dist/core/svg-shape.mjs +2 -1
- package/dist/core/thumbnail.mjs +15 -4
- package/dist/core/trusted.mjs +26 -0
- package/dist/core/vtt.mjs +20 -9
- package/dist/index.d.mts +200 -1
- package/dist/index.mjs +11 -0
- package/dist/lib/renderer/CanvasRenderer.mjs +48 -7
- package/dist/lib/renderer/camera/CameraAnimator.mjs +39 -20
- package/dist/lib/renderer/input/GestureController.mjs +15 -5
- package/dist/map/index.d.mts +6 -1
- package/dist/styles/collection-select.css +1 -0
- package/dist/styles/core.css +1 -0
- package/dist/styles/default.css +1 -0
- package/dist/styles/items.css +1 -0
- package/dist/styles/map.css +1 -0
- package/dist/styles/media.css +1 -0
- package/dist/styles/panel.css +1 -0
- package/dist/styles/scene.css +1 -0
- package/dist/styles/split.css +1 -0
- package/dist/styles.css +1 -1
- package/dist/templates/default/Default.mjs +2 -0
- package/dist/templates/document/Document.mjs +12 -2
- package/dist/templates/document/Sheets.mjs +2 -0
- package/dist/templates/gallery/Gallery.mjs +3 -1
- package/dist/templates/index.d.mts +102 -6
- package/dist/templates/shared/Lightbox.mjs +50 -3
- package/dist/templates/shared/LightboxView.mjs +3 -1
- package/dist/templates.css +1 -1
- package/dist/ui/Button.mjs +3 -1
- package/dist/ui/ControlCluster.mjs +6 -3
- package/dist/ui/Markup.mjs +8 -7
- package/dist/ui/Tip.mjs +6 -1
- package/dist/ui/adoptSheet.mjs +19 -0
- package/dist/ui/sheets/map.mjs +5 -0
- package/dist/ui/sheets/media.mjs +5 -0
- package/dist/ui/sheets/scene.mjs +5 -0
- package/dist/web-components/{About-D1TBGGPL.mjs → About-j3O9cA3r.mjs} +1 -1
- package/dist/web-components/{AnnotationItems-DTacmRA9.mjs → AnnotationItems-U0WmWGOh.mjs} +1 -1
- package/dist/web-components/{AnnotationMenu-DYc9ekWS.mjs → AnnotationMenu-C1fAWWYy.mjs} +1 -1
- package/dist/web-components/{AnnotationState--5ghW0C2.mjs → AnnotationState-C9UhGpsr.mjs} +1 -1
- package/dist/web-components/{Annotations-Bvc_FmJ5.mjs → Annotations-BtJ4IVmy.mjs} +2 -2
- package/dist/web-components/{Annotations-BG8lPjk1.mjs → Annotations-YcFbQRJx.mjs} +1 -1
- package/dist/web-components/{Body-QQ1DmnbP.mjs → Body-Ccxmucbr.mjs} +1 -1
- package/dist/web-components/{BodyAlert-A4xRjOKr.mjs → BodyAlert-BBSStCpI.mjs} +1 -1
- package/dist/web-components/Button-Bphsp8rv.mjs +1 -0
- package/dist/web-components/{Camera-DqT_1MgD.mjs → Camera-DSk-YFpW.mjs} +1 -1
- package/dist/web-components/{Canvas2DBackend-TZtR3zHf.mjs → Canvas2DBackend-CYAJ-W6-.mjs} +1 -1
- package/dist/web-components/CanvasView-BAJ6OYvn.mjs +2 -0
- package/dist/web-components/{CaptionDetails-DMRWmtaY.mjs → CaptionDetails-Dg9Y11o_.mjs} +1 -1
- package/dist/web-components/ChaptersMenu-i4bFwR8c.mjs +1 -0
- package/dist/web-components/{Chevron-DFGbSGPI.mjs → Chevron-BnlK9F4K.mjs} +1 -1
- package/dist/web-components/{ChoiceMenu-C80kdxvq.mjs → ChoiceMenu-YXA7Ku8M.mjs} +1 -1
- package/dist/web-components/{Collection-B4CxBsFL.mjs → Collection-DgSFQbN-.mjs} +1 -1
- package/dist/web-components/{CollectionSelect-DO8YO2p7.mjs → CollectionSelect-PUcTh3Uv.mjs} +1 -1
- package/dist/web-components/{Connected-sYBn_9MK.mjs → Connected-B_caNIrW.mjs} +1 -1
- package/dist/web-components/{Connected-CcbVqzmj.mjs → Connected-XhRc6yaA.mjs} +1 -1
- package/dist/web-components/{Connected-DthCPaHl.mjs → Connected-YgL5BWf5.mjs} +1 -1
- package/dist/web-components/{Contents-AVPYYXht.mjs → Contents-CoC4TK6G.mjs} +1 -1
- package/dist/web-components/ControlMenu-CYfLg3Ok.mjs +1 -0
- package/dist/web-components/ControlsFade-BcGL7yUH.mjs +1 -0
- package/dist/web-components/CountMenu-C7XawAoa.mjs +1 -0
- package/dist/web-components/Cue-DZJ5TBKU.mjs +1 -0
- package/dist/web-components/Document-DZDYR2Tk.mjs +1 -0
- package/dist/web-components/{DomLayers-DlRapZ1u.mjs → DomLayers-Bbrulm6v.mjs} +1 -1
- package/dist/web-components/{Download-Ci_JUTVd.mjs → Download-CfRPt74Y.mjs} +1 -1
- package/dist/web-components/{EntryBodies-C0ICfS2R.mjs → EntryBodies-Bz8hyAUW.mjs} +1 -1
- package/dist/web-components/{EntryThumbnail-DxHhfRo_.mjs → EntryThumbnail-R9h0AXcu.mjs} +1 -1
- package/dist/web-components/{FieldPill-CVfeeafm.mjs → FieldPill-DFIdy-hn.mjs} +1 -1
- package/dist/web-components/{FrameAnimation-AZpVvu0R.mjs → FrameAnimation-DFDuFwwt.mjs} +1 -1
- package/dist/web-components/Gallery-BrYWLufL.mjs +1 -0
- package/dist/web-components/{HideToggle-0nlIo-f8.mjs → HideToggle-geO9QfFR.mjs} +1 -1
- package/dist/web-components/ImageControls-B9PhCHqi.mjs +1 -0
- package/dist/web-components/{Items-Drd82_Jj.mjs → Items-C7wjylgH.mjs} +1 -1
- package/dist/web-components/{Label-BIjqJ-_T.mjs → Label-S7o8PlWU.mjs} +1 -1
- package/dist/web-components/{LanguageChoice-DkSc-n6g.mjs → LanguageChoice-URJJAdah.mjs} +1 -1
- package/dist/web-components/LightboxView-65ROPr0_.mjs +1 -0
- package/dist/web-components/{ListEnd-pq-BgaDI.mjs → ListEnd-B0wGr87o.mjs} +1 -1
- package/dist/web-components/{Loaded-CSO5NFhm.mjs → Loaded-Do53YvYw.mjs} +1 -1
- package/dist/web-components/{LoadedCanvas-DK6xMmM1.mjs → LoadedCanvas-BrtGPpSm.mjs} +1 -1
- package/dist/web-components/LoadedMap-C06TIgvf.mjs +1 -0
- package/dist/web-components/{Loading-CoJLSRkv.mjs → Loading-Du3wn1EM.mjs} +1 -1
- package/dist/web-components/{Map-BEVtD52O.mjs → Map-B6LVO0gx.mjs} +1 -1
- package/dist/web-components/MapView-CzV3y5iI.mjs +3 -0
- package/dist/web-components/Markup-DACv7sRg.mjs +2 -0
- package/dist/web-components/MediaBody-CcuO5IZT.mjs +1 -0
- package/dist/web-components/MediaBody-DGd2uFfK.mjs +1 -0
- package/dist/web-components/{NavDate-CYNK0Qmp.mjs → NavDate-DRKmjc54.mjs} +1 -1
- package/dist/web-components/{Navigator-DrYPepzN.mjs → Navigator-CA8zB6CU.mjs} +1 -1
- package/dist/web-components/{Pager-CN4lHURv.mjs → Pager-DWp6u3iv.mjs} +1 -1
- package/dist/web-components/{PagerLayout-DeqnSQcF.mjs → PagerLayout-DHRpcI8x.mjs} +1 -1
- package/dist/web-components/{Panel-CFYUlXup.mjs → Panel-CzUDNn8M.mjs} +1 -1
- package/dist/web-components/PanelPart-DKb9dXm6.mjs +1 -0
- package/dist/web-components/{PanelToggle-9ud55NNI.mjs → PanelToggle-D5sx5FP9.mjs} +1 -1
- package/dist/web-components/{PartOfManifest-KUHUq-6q.mjs → PartOfManifest-Ct-I8Ofm.mjs} +1 -1
- package/dist/web-components/{Pending-mcmdyZPA.mjs → Pending-f1heQNo7.mjs} +1 -1
- package/dist/web-components/{PlaceBox-DX4ZLDat.mjs → PlaceBox-_an9ya_W.mjs} +1 -1
- package/dist/web-components/Placeholder-D4-VCxeD.mjs +1 -0
- package/dist/web-components/{Position-DO5qg5Sp.mjs → Position-DA4rzRiy.mjs} +1 -1
- package/dist/web-components/{Primitives-c9sIz0oQ.mjs → Primitives-DU_VhdO2.mjs} +1 -1
- package/dist/web-components/{Provider-a3xY016W.mjs → Provider-Dl_t_qEC.mjs} +1 -1
- package/dist/web-components/{ReadMore-D_WmmKEP.mjs → ReadMore-BpA8Dex8.mjs} +1 -1
- package/dist/web-components/Root-DixSZV9Y.mjs +1 -0
- package/dist/web-components/Scene-CSaXgBNr.mjs +1 -0
- package/dist/web-components/SceneView-BJNlboix.mjs +1 -0
- package/dist/web-components/{Search-BgxEW1UT.mjs → Search-CvpKzlYP.mjs} +1 -1
- package/dist/web-components/{Sections-DZVrhoAC.mjs → Sections-BhfcUyaf.mjs} +1 -1
- package/dist/web-components/SeekMarks-BfOrFnvQ.mjs +1 -0
- package/dist/web-components/{StandaloneItems-6cSw7nbF.mjs → StandaloneItems-CoiceHd8.mjs} +1 -1
- package/dist/web-components/{Status-DHTzuTkh.mjs → Status-B4327UOL.mjs} +1 -1
- package/dist/web-components/{Steps-Dkpy9KiJ.mjs → Steps-ACdXJZrV.mjs} +1 -1
- package/dist/web-components/TargetItems-D1bLKA_B.mjs +1 -0
- package/dist/web-components/Timeline-DY8LpnOG.mjs +1 -0
- package/dist/web-components/Tip-BatwzZZo.mjs +1 -0
- package/dist/web-components/{Transcript-WvFFAJQM.mjs → Transcript-B1nh9UJK.mjs} +1 -1
- package/dist/web-components/Transport-BsjGGbFJ.mjs +1 -0
- package/dist/web-components/Transport-DKb3XTMA.mjs +1 -0
- package/dist/web-components/{annotation-collection-BkC3nBPA.mjs → annotation-collection-CtxYL-V3.mjs} +1 -1
- package/dist/web-components/{annotation-name-Du2KAWoD.mjs → annotation-name-KQ4wAi8-.mjs} +1 -1
- package/dist/web-components/{annotations-content-CEzAS-P2.mjs → annotations-content-XVgQ5me7.mjs} +1 -1
- package/dist/web-components/{body-DPlfbLt3.mjs → body-CbYkzpmQ.mjs} +1 -1
- package/dist/web-components/{canvas-BUwBftJW.mjs → canvas-Du31_Dru.mjs} +1 -1
- package/dist/web-components/{cloverEngine-UNw5K4Xg.mjs → cloverEngine-CuRCXZNZ.mjs} +1 -1
- package/dist/web-components/{content-state-reader-GgQF2MvJ.mjs → content-state-reader-DLlBY4Ox.mjs} +1 -1
- package/dist/web-components/controlGlyphs-ClH59vLg.mjs +1 -0
- package/dist/web-components/{controls-CC9G5LxK.mjs → controls-smixEi0i.mjs} +1 -1
- package/dist/web-components/custom-elements.json +10 -2
- package/dist/web-components/{downloads-CmAYeEIz.mjs → downloads-BqkNwsM0.mjs} +1 -1
- package/dist/web-components/{dragToClose-DK-eM097.mjs → dragToClose-2joCF413.mjs} +1 -1
- package/dist/web-components/{engine-Dok0z8WP.mjs → engine-DNTgJBST.mjs} +1 -1
- package/dist/web-components/{engines-BD2IfwQF.mjs → engines-BpFZX2dO.mjs} +1 -1
- package/dist/web-components/{fetchManifest-tQXcfFiz.mjs → fetchManifest-B-poGgag.mjs} +1 -1
- package/dist/web-components/{fromManifest-BwQdeAuL.mjs → fromManifest-Dw3BwjHM.mjs} +1 -1
- package/dist/web-components/{glyphs-dp_HK3Ja.mjs → glyphs-VoJVEqLE.mjs} +1 -1
- package/dist/web-components/hooks-Syt1XLVX.mjs +1 -0
- package/dist/web-components/{image-layers-xcBsiad9.mjs → image-layers-ryUJ_0bq.mjs} +1 -1
- package/dist/web-components/{imageService-4sFnmAFX.mjs → imageService-DBU_Xks1.mjs} +1 -1
- package/dist/web-components/index-DGXCFoHu.mjs +1 -0
- package/dist/web-components/index.d.mts +4 -2
- package/dist/web-components/index.mjs +1 -1
- package/dist/web-components/{items-BUmOy2QY.mjs → items-BQPvL5D6.mjs} +1 -1
- package/dist/web-components/items-TIbaHoB8.mjs +1 -0
- package/dist/web-components/label-Bd-QYEXn.mjs +1 -0
- package/dist/web-components/{layout-B29v2RKK.mjs → layout-MzMKFa5I.mjs} +1 -1
- package/dist/web-components/{link-Ct5PpHEY.mjs → link-BUQQE9P2.mjs} +1 -1
- package/dist/web-components/logo-Cn820OoX.mjs +1 -0
- package/dist/web-components/maplibre-sheet-CfiZ6JFk.mjs +1 -0
- package/dist/web-components/masonry-BZCdA3bV.mjs +1 -0
- package/dist/web-components/{models-BXcT4ijX.mjs → models-wl-5vW2i.mjs} +1 -1
- package/dist/web-components/{nodes-BleXuYE6.mjs → nodes-CmOpA3s7.mjs} +1 -1
- package/dist/web-components/{overlayImage-BJtfot4Y.mjs → overlayImage-tb9-Md51.mjs} +1 -1
- package/dist/web-components/{panel-BxxV_JkD.mjs → panel-BPVyAugu.mjs} +1 -1
- package/dist/web-components/part-DeZI8Hmp.mjs +1 -0
- package/dist/web-components/{playerSurface-BXNLaFk0.mjs → playerSurface-BxxMV-va.mjs} +1 -1
- package/dist/web-components/pointer-BqgxBJ82.mjs +1 -0
- package/dist/web-components/{provider-CPp0Sgr_.mjs → provider-B9oAQG-u.mjs} +1 -1
- package/dist/web-components/{range-regions-DAaOu0IS.mjs → range-regions-BFB1374L.mjs} +1 -1
- package/dist/web-components/{read-more-lcqGslUd.mjs → read-more-oWPk0OLi.mjs} +1 -1
- package/dist/web-components/{readingLanguages-FyVsSWJ8.mjs → readingLanguages-BigCi6rZ.mjs} +1 -1
- package/dist/web-components/rendererSurface-B_OOhxzA.mjs +22 -0
- package/dist/web-components/{renderers-BFS7hFVU.mjs → renderers-CBupZj8Z.mjs} +1 -1
- package/dist/web-components/{resource-Bufu7lAr.mjs → resource-B6uUsU6D.mjs} +1 -1
- package/dist/web-components/{sanitize-qIOeyIww.mjs → sanitize-BedC_UE5.mjs} +3 -3
- package/dist/web-components/{save-file-CoknKOPz.mjs → save-file-BaIrLp1V.mjs} +1 -1
- package/dist/web-components/{search-5ocrsYmT.mjs → search-DaGpvTki.mjs} +1 -1
- package/dist/web-components/shared-D2RadIoz.mjs +1 -0
- package/dist/web-components/{show-link-DBaJj4s_.mjs → show-link-Cxylys81.mjs} +1 -1
- package/dist/web-components/{sizedImage-jnOGcIIZ.mjs → sizedImage-DchqGFdt.mjs} +1 -1
- package/dist/web-components/{split-P6J0qqf5.mjs → split-oaEIep3T.mjs} +1 -1
- package/dist/web-components/{status-honoOMNx.mjs → status-CfCgO5OB.mjs} +1 -1
- package/dist/web-components/styles-DZIDbHxL.mjs +1 -0
- package/dist/web-components/svg-shape-D1K-WNrY.mjs +1 -0
- package/dist/web-components/three.mjs +1 -1
- package/dist/web-components/thumbnail-D83GaQ8C.mjs +1 -0
- package/dist/web-components/{tip-BhNI83aT.mjs → tip-CMEBtCil.mjs} +1 -1
- package/dist/web-components/{toggle-CJKdi5KH.mjs → toggle-3NncfBSZ.mjs} +1 -1
- package/dist/web-components/trusted-Bvpx307M.mjs +1 -0
- package/dist/web-components/{useContainerName-_48Cdi0m.mjs → useContainerName-fp0-n_9x.mjs} +1 -1
- package/dist/web-components/{useControlsVisibility-CieBxGnK.mjs → useControlsVisibility-BYZlgiAt.mjs} +1 -1
- package/dist/web-components/useLazyPanelPane-DXYGGS7f.mjs +1 -0
- package/dist/web-components/{useNearViewport-B34ebmIW.mjs → useNearViewport-DMqMdvue.mjs} +1 -1
- package/dist/web-components/{useScrollTrack-DgRGFeP5.mjs → useScrollTrack-BHuPAWxB.mjs} +1 -1
- package/dist/web-components/viewer/{AnnotationItems-BNA_92Dv.mjs → AnnotationItems-B5Vs0dYi.mjs} +1 -1
- package/dist/web-components/viewer/{AnnotationMenu-BIQYVR4N.mjs → AnnotationMenu-BO18q_Ze.mjs} +1 -1
- package/dist/web-components/viewer/{AnnotationState-BbwQqA1U.mjs → AnnotationState-ZPmnCpbZ.mjs} +1 -1
- package/dist/web-components/viewer/{Annotations-P4XzAlNc.mjs → Annotations-C46kSUA6.mjs} +1 -1
- package/dist/web-components/viewer/{Annotations-CZzOZAFP.mjs → Annotations-DEKa_9xz.mjs} +2 -2
- package/dist/web-components/viewer/{Canvas2DBackend-DFfCzyjL.mjs → Canvas2DBackend-DHSI3dKr.mjs} +1 -1
- package/dist/web-components/viewer/{CaptionDetails-DPtE-RQQ.mjs → CaptionDetails-BVCqV9NT.mjs} +1 -1
- package/dist/web-components/viewer/ChaptersMenu-CIwIM2Pb.mjs +1 -0
- package/dist/web-components/viewer/{ChoiceMenu-GkqyTQRQ.mjs → ChoiceMenu-Ww7lcPnq.mjs} +1 -1
- package/dist/web-components/viewer/{Collection-DjY_6qa6.mjs → Collection-DCYM9eE6.mjs} +1 -1
- package/dist/web-components/viewer/{Connected-D5T-mtiy.mjs → Connected-Bbk8M5rE.mjs} +1 -1
- package/dist/web-components/viewer/{Connected-DIOuI3Mv.mjs → Connected-DAOMKtJR.mjs} +1 -1
- package/dist/web-components/viewer/{Contents-DV-VxXuf.mjs → Contents-BnRBx3rc.mjs} +1 -1
- package/dist/web-components/viewer/ControlMenu-Co6yBttc.mjs +1 -0
- package/dist/web-components/viewer/ControlsFade-pOQ5VQ5i.mjs +1 -0
- package/dist/web-components/viewer/CountMenu-lu21fO_7.mjs +1 -0
- package/dist/web-components/viewer/Cue-oaiVO9ZO.mjs +1 -0
- package/dist/web-components/viewer/Document-ByBRhL68.mjs +1 -0
- package/dist/web-components/viewer/{DomLayers-BCwCxPDU.mjs → DomLayers-BjxGaZkt.mjs} +1 -1
- package/dist/web-components/viewer/{Download-CL4IClAD.mjs → Download-DhMD4AJt.mjs} +1 -1
- package/dist/web-components/viewer/{EntryBodies-e40y47bl.mjs → EntryBodies-DL5UolEz.mjs} +1 -1
- package/dist/web-components/viewer/{EntryThumbnail-B_dP3w4o.mjs → EntryThumbnail-CJisDcni.mjs} +1 -1
- package/dist/web-components/viewer/{FieldPill-Hse1cDBE.mjs → FieldPill-DAk6zxxD.mjs} +1 -1
- package/dist/web-components/viewer/{FrameAnimation-CE218DCr.mjs → FrameAnimation-DGMuFNdW.mjs} +1 -1
- package/dist/web-components/viewer/Gallery-CbHhyWlF.mjs +1 -0
- package/dist/web-components/viewer/{HideToggle-CYoqe_ez.mjs → HideToggle-C6B9B2Bo.mjs} +1 -1
- package/dist/web-components/viewer/ImageControls-BDx7C1q5.mjs +1 -0
- package/dist/web-components/viewer/{LanguageChoice-BmO-322r.mjs → LanguageChoice-BM9xZr_D.mjs} +1 -1
- package/dist/web-components/viewer/LightboxView-RrioB0CN.mjs +1 -0
- package/dist/web-components/viewer/{ListEnd-DX1jsvJk.mjs → ListEnd-8vdKw6Py.mjs} +1 -1
- package/dist/web-components/viewer/MapView-G3yj-Bjd.mjs +3 -0
- package/dist/web-components/viewer/MediaBody-BokgnTO-.mjs +1 -0
- package/dist/web-components/viewer/MediaBody-DPOcyiYH.mjs +1 -0
- package/dist/web-components/viewer/{NavDate-BZgeaMG9.mjs → NavDate-B6rCV-Cd.mjs} +1 -1
- package/dist/web-components/viewer/{Navigator-Co76p-1n.mjs → Navigator-CjgUcgKY.mjs} +1 -1
- package/dist/web-components/viewer/{PagerLayout-tUkN1-FV.mjs → PagerLayout-LZmC6VpV.mjs} +1 -1
- package/dist/web-components/viewer/PanelPart-Cw1G5W4b.mjs +1 -0
- package/dist/web-components/viewer/{PartOfManifest-DXnbEPzS.mjs → PartOfManifest-B0TYADTv.mjs} +1 -1
- package/dist/web-components/viewer/{PlaceBox-xrJ4CGdN.mjs → PlaceBox-Cjdjg-_9.mjs} +1 -1
- package/dist/web-components/viewer/Placeholder-MYLjXbiF.mjs +1 -0
- package/dist/web-components/viewer/{Search-DTg1cHZ3.mjs → Search-CyRrBHsr.mjs} +1 -1
- package/dist/web-components/viewer/SeekMarks-1WSjARP5.mjs +1 -0
- package/dist/web-components/viewer/{StandaloneItems-BpBEQG8i.mjs → StandaloneItems-CQrzTSPC.mjs} +1 -1
- package/dist/web-components/viewer/{Steps-SpwMQdCL.mjs → Steps-Bd42-eq7.mjs} +1 -1
- package/dist/web-components/viewer/TargetItems-BpmZEVMS.mjs +1 -0
- package/dist/web-components/viewer/{Transcript-rTAhuXCF.mjs → Transcript-CE4BsnWd.mjs} +1 -1
- package/dist/web-components/viewer/Transport-1ROUkfsf.mjs +1 -0
- package/dist/web-components/viewer/Transport-g0_Cjy0f.mjs +1 -0
- package/dist/web-components/viewer/{annotation-collection-B7pZiLVk.mjs → annotation-collection-vM0aeJgP.mjs} +1 -1
- package/dist/web-components/viewer/annotation-name-kjUrGbhg.mjs +1 -0
- package/dist/web-components/viewer/{annotations-content-9AtLlPNn.mjs → annotations-content-CysDLy4t.mjs} +1 -1
- package/dist/web-components/viewer/{cloverEngine-jRrYLrWa.mjs → cloverEngine-S8GEd-YZ.mjs} +1 -1
- package/dist/web-components/viewer/{content-state-reader-CPvkju6Q.mjs → content-state-reader-BTZKS9Hq.mjs} +1 -1
- package/dist/web-components/viewer/{dragToClose-Co9kGk9q.mjs → dragToClose-Bt4QtVSO.mjs} +1 -1
- package/dist/web-components/viewer/{fetchManifest-D7N9WhhF.mjs → fetchManifest-D4aIqcDV.mjs} +1 -1
- package/dist/web-components/viewer/{host-DMD9LE4H.mjs → host-ClJe-BX1.mjs} +1 -1
- package/dist/web-components/viewer/{image-layers-x_shzPvu.mjs → image-layers-DGa5HJt8.mjs} +1 -1
- package/dist/web-components/viewer/index.mjs +1 -1
- package/dist/web-components/viewer/{link-DikPGzNO.mjs → link-CU71f0wU.mjs} +1 -1
- package/dist/web-components/viewer/{overlayImage-33kKKB0T.mjs → overlayImage-D9GHzMmm.mjs} +1 -1
- package/dist/web-components/viewer/{range-regions-TH6WWGTT.mjs → range-regions-CiceyEuu.mjs} +1 -1
- package/dist/web-components/viewer/{renderers-BxePmixF.mjs → renderers-2BgvLkI0.mjs} +1 -1
- package/dist/web-components/viewer/{save-file-QXKiPlST.mjs → save-file-BW7D7oYG.mjs} +1 -1
- package/dist/web-components/viewer/{search-B_NePyas.mjs → search-DBMO82DV.mjs} +1 -1
- package/dist/web-components/viewer/styles-DogZyfVz.mjs +1 -0
- package/dist/web-components/viewer/{useControlsVisibility-Cu-jTDzs.mjs → useControlsVisibility-DSSIzst5.mjs} +1 -1
- package/dist/web-components/viewer/useLazyPanelPane-_6IY7cV5.mjs +1 -0
- package/dist/web-components/viewer/viewer-ClQD1LNQ.mjs +29 -0
- package/dist/web-components/viewer/vtt-Dk5bwDVQ.mjs +5 -0
- package/dist/web-components/viewer-DLfZQmZs.mjs +1 -0
- package/dist/web-components/vtt-9Ui3h60h.mjs +5 -0
- package/dist/web-components/worker-C9aVbya_.mjs +1 -0
- package/package.json +2 -1
- package/dist/web-components/Button-Cx6VE_UW.mjs +0 -1
- package/dist/web-components/CanvasView-DxZASM9E.mjs +0 -2
- package/dist/web-components/ChaptersMenu-BAZVVDrK.mjs +0 -1
- package/dist/web-components/ControlMenu-BjJsWnuZ.mjs +0 -1
- package/dist/web-components/ControlsFade-C-6WhSxB.mjs +0 -1
- package/dist/web-components/CountMenu-Dx8D_RJZ.mjs +0 -1
- package/dist/web-components/Cue-xuo5dgKE.mjs +0 -1
- package/dist/web-components/Document-BWdafeEi.mjs +0 -1
- package/dist/web-components/Gallery-C2PTJmvN.mjs +0 -1
- package/dist/web-components/ImageControls-tKVAMpaj.mjs +0 -1
- package/dist/web-components/LightboxView-Cuqx2H1m.mjs +0 -1
- package/dist/web-components/LoadedMap-DmPH-LKY.mjs +0 -1
- package/dist/web-components/MapView-DHJcn9gW.mjs +0 -3
- package/dist/web-components/Markup-Hm6bWOjm.mjs +0 -2
- package/dist/web-components/MediaBody-BpgNtpKZ.mjs +0 -1
- package/dist/web-components/MediaBody-Co23JjUJ.mjs +0 -1
- package/dist/web-components/PanelPart-CpUIRbxr.mjs +0 -1
- package/dist/web-components/Placeholder-0hE8q-SY.mjs +0 -1
- package/dist/web-components/Root-CU1o0wje.mjs +0 -1
- package/dist/web-components/Scene-CboEeptc.mjs +0 -1
- package/dist/web-components/SceneView-hcc78jQT.mjs +0 -1
- package/dist/web-components/TargetItems-CyOI9_Z4.mjs +0 -1
- package/dist/web-components/Timeline-B9tD3Rar.mjs +0 -1
- package/dist/web-components/Tip-nJSTYquc.mjs +0 -1
- package/dist/web-components/Transport-FxLp_bdW.mjs +0 -1
- package/dist/web-components/Transport-VUxSEIQO.mjs +0 -1
- package/dist/web-components/hooks-C4dJ5K_D.mjs +0 -1
- package/dist/web-components/index-DspT4wUm.mjs +0 -1
- package/dist/web-components/items-CWMI53aN.mjs +0 -1
- package/dist/web-components/label-BGjL7I4b.mjs +0 -1
- package/dist/web-components/logo-BFstM-0a.mjs +0 -1
- package/dist/web-components/masonry-0QfzOgbB.mjs +0 -1
- package/dist/web-components/part-D4gjnYmT.mjs +0 -1
- package/dist/web-components/pointer-CJELU3gI.mjs +0 -1
- package/dist/web-components/rendererSurface-nh6-EfuZ.mjs +0 -22
- package/dist/web-components/shared-DFAX0n3B.mjs +0 -1
- package/dist/web-components/styles-BwkYiCLC.mjs +0 -1
- package/dist/web-components/svg-shape-DLY3g7oq.mjs +0 -1
- package/dist/web-components/thumbnail-EbURh-UM.mjs +0 -1
- package/dist/web-components/useLazyPanelPane-Da3kJiOt.mjs +0 -1
- package/dist/web-components/viewer/ChaptersMenu-D6Jmujag.mjs +0 -1
- package/dist/web-components/viewer/ControlMenu-BsEpff6N.mjs +0 -1
- package/dist/web-components/viewer/ControlsFade-BowtN96W.mjs +0 -1
- package/dist/web-components/viewer/CountMenu-DCmA6HdK.mjs +0 -1
- package/dist/web-components/viewer/Cue-BjbVzrpl.mjs +0 -1
- package/dist/web-components/viewer/Document-4ZQd3W3o.mjs +0 -1
- package/dist/web-components/viewer/Gallery-F2sVj4ph.mjs +0 -1
- package/dist/web-components/viewer/ImageControls-C2G4x2Es.mjs +0 -1
- package/dist/web-components/viewer/LightboxView-DKR8dXcg.mjs +0 -1
- package/dist/web-components/viewer/MapView-Df0wZjCh.mjs +0 -3
- package/dist/web-components/viewer/MediaBody-CataNonO.mjs +0 -1
- package/dist/web-components/viewer/MediaBody-SkIgrEMj.mjs +0 -1
- package/dist/web-components/viewer/PanelPart-Cl4Sst60.mjs +0 -1
- package/dist/web-components/viewer/Placeholder-B1AcizHL.mjs +0 -1
- package/dist/web-components/viewer/TargetItems-B6Icep5k.mjs +0 -1
- package/dist/web-components/viewer/Transport-vKIDALE-.mjs +0 -1
- package/dist/web-components/viewer/Transport-z_kdVisw.mjs +0 -1
- package/dist/web-components/viewer/annotation-name-BKj1O9lA.mjs +0 -1
- package/dist/web-components/viewer/styles-Bedyz7_l.mjs +0 -1
- package/dist/web-components/viewer/useLazyPanelPane-BhLtRixT.mjs +0 -1
- package/dist/web-components/viewer/viewer-nfPJPwwt.mjs +0 -29
- package/dist/web-components/viewer/vtt-CUn4h5JB.mjs +0 -5
- package/dist/web-components/viewer-DN2Mo3vc.mjs +0 -1
- package/dist/web-components/vtt-C5M5WPSG.mjs +0 -5
- package/dist/web-components/worker-CjXN0dku.mjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as m,a2 as f,b,A as p,_ as n,u as v,l as g}from"./shared-
|
|
1
|
+
import{a as m,a2 as f,b,A as p,_ as n,u as v,l as g}from"./shared-D2RadIoz.mjs";import{u as L}from"./ReadMore-BpA8Dex8.mjs";import{u as A}from"./nodes-CmOpA3s7.mjs";const M=o=>[...o.children].find(r=>!r.classList.contains("clover-read-more-button"))??null;function k({hosted:o}){const r=o.element,e=A(r,()=>M(r),Object.is),{t:s}=m(),i=f(),a=b(),l=p(null);l.current=e;const{open:t,cut:c,toggle:d}=L(l);return n(()=>(r.classList.add("clover-read-more"),()=>r.classList.remove("clover-read-more")),[r]),n(()=>{if(!e)return;const u=e.id;return u||(e.id=a),()=>{u||e.removeAttribute("id"),e.removeAttribute("data-read-more")}},[e,a]),n(()=>{e==null||e.setAttribute("data-read-more",t?"open":"")},[e,t]),!e||!(c||t)?null:v("button",{type:"button",className:"clover-read-more-button","aria-expanded":t,"aria-controls":e.id||a,onClick:d,ref:i.ref,...g(i.langOf(t?"readLess":"readMore")),children:s(t?"readLess":"readMore")})}export{k as ReadMoreElement};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{V as a,t as c,e as u,c as l,T as g}from"./shared-
|
|
1
|
+
import{V as a,t as c,e as u,c as l,T as g}from"./shared-D2RadIoz.mjs";function f(e,t,o){if(o&&e.includes(o))return o;if(!e.length)return;const s=a(e,t);return s==="none"?e[0]:s}const y=e=>e&&typeof e=="object"&&!Array.isArray(e)?Object.keys(e).filter(t=>t!=="none"&&t!=="@none"&&c({[t]:e[t]}).text):[];function i(e){if(!e)return[];const t=[...Array.isArray(e.metadata)?e.metadata:[],e.requiredStatement].filter(Boolean),s=[e.label,e.summary,...t.flatMap(n=>[n==null?void 0:n.label,n==null?void 0:n.value])].map(y).filter(n=>n.length>1);return[...new Set(s.flat())]}function d(){const{language:e,chooseLanguage:t}=u("About"),o=l(r=>r.manifest),s=g(()=>i(o),[o]),n=f(s,e);return n&&t?{languages:s,chosen:n,onChange:t}:null}export{f as s,d as u};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
var Et=Object.defineProperty;var kt=(n,t,e)=>t in n?Et(n,t,{enumerable:true,configurable:true,writable:true,value:e}):n[t]=e;var h=(n,t,e)=>kt(n,typeof t!="symbol"?t+"":t,e);import{c as Lt,r as $}from"./contexts-ByL3eA_T.mjs";import{c as k,s as L,t as _,a as _t,u as mt,i as Pt,b as pt,d as gt,e as At,r as It,f as I,g as St}from"./CanvasView-BAJ6OYvn.mjs";import{a as S,w as Rt,v as N,f as Bt,s as Q,b as j,c as Ot}from"./Camera-DSk-YFpW.mjs";import{i as J,a as Ct,T as zt,b as tt,c as et,D as Ut,s as Dt}from"./pointer-BqgxBJ82.mjs";import{a0 as Wt,a1 as Ft}from"./shared-D2RadIoz.mjs";import{a as Ht,i as it,f as Nt}from"./imageService-DBU_Xks1.mjs";function Gt(n){return typeof HTMLImageElement<"u"&&n instanceof HTMLImageElement?n.complete&&n.naturalWidth>0:true}function Xt(n,t){if(!n.bleed)return{x:0,y:0};const e=n.transform,i=Math.hypot(e.a,e.b)*t,s=Math.hypot(e.c,e.d)*t;return{x:n.bleed.right&&i>0?1/i:0,y:n.bleed.bottom&&s>0?1/s:0}}const Zt=`#version 300 es
|
|
2
|
+
in vec2 a_position;
|
|
3
|
+
uniform mat3 u_matrix;
|
|
4
|
+
uniform vec4 u_crop;
|
|
5
|
+
out vec2 v_uv;
|
|
6
|
+
|
|
7
|
+
void main() {
|
|
8
|
+
vec3 clip = u_matrix * vec3(a_position, 1.0);
|
|
9
|
+
gl_Position = vec4(clip.xy, 0.0, 1.0);
|
|
10
|
+
v_uv = u_crop.xy + a_position * u_crop.zw;
|
|
11
|
+
}
|
|
12
|
+
`,Kt=`#version 300 es
|
|
13
|
+
precision highp float;
|
|
14
|
+
in vec2 v_uv;
|
|
15
|
+
uniform sampler2D u_texture;
|
|
16
|
+
uniform float u_opacity;
|
|
17
|
+
out vec4 outColor;
|
|
18
|
+
|
|
19
|
+
void main() {
|
|
20
|
+
outColor = texture(u_texture, v_uv) * u_opacity;
|
|
21
|
+
}
|
|
22
|
+
`;class R{constructor(t,e,i){h(this,"kind","webgl2");h(this,"canvas");h(this,"maxTextureSize");h(this,"gl");h(this,"program",null);h(this,"vao",null);h(this,"uniforms",{matrix:null,crop:null,opacity:null,texture:null});h(this,"textures",new Map);h(this,"cssWidth",1);h(this,"cssHeight",1);h(this,"pixelRatio",1);h(this,"matrixScratch",new Float32Array(9));h(this,"isLost",false);h(this,"callbacks");h(this,"handleLost",()=>{var t2,e2;this.isLost=true,this.textures.clear(),(e2=(t2=this.callbacks).onLost)==null||e2.call(t2)});this.canvas=t,this.gl=e,this.callbacks=i,this.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE)||4096;const s=Vt(e,Zt,Kt);this.program=s,this.uniforms={matrix:e.getUniformLocation(s,"u_matrix"),crop:e.getUniformLocation(s,"u_crop"),opacity:e.getUniformLocation(s,"u_opacity"),texture:e.getUniformLocation(s,"u_texture")};const r=e.createVertexArray();e.bindVertexArray(r);const o=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,o),e.bufferData(e.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,1,1]),e.STATIC_DRAW);const a=e.getAttribLocation(s,"a_position");e.enableVertexAttribArray(a),e.vertexAttribPointer(a,2,e.FLOAT,false,0,0),e.bindVertexArray(null),this.vao=r,e.enable(e.BLEND),e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,true),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,false),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,e.BROWSER_DEFAULT_WEBGL),t.addEventListener("webglcontextlost",this.handleLost)}static create(t,e={}){let i=null;try{i=t.getContext("webgl2",{alpha:true,premultipliedAlpha:true,antialias:false,depth:false,stencil:false,preserveDrawingBuffer:false})}catch{i=null}if(!i||typeof i.createShader!="function")return null;try{return new R(t,i,e)}catch{return null}}resize(t,e,i){this.cssWidth=Math.max(1,t),this.cssHeight=Math.max(1,e),this.pixelRatio=i;const s=Math.max(1,Math.round(t*i)),r=Math.max(1,Math.round(e*i));this.canvas.width!==s&&(this.canvas.width=s),this.canvas.height!==r&&(this.canvas.height=r)}begin(){if(this.isLost)return;const t=this.gl;t.viewport(0,0,this.canvas.width,this.canvas.height),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.useProgram(this.program),t.bindVertexArray(this.vao),t.activeTexture(t.TEXTURE0),t.uniform1i(this.uniforms.texture,0)}draw(t){if(this.isLost||!Gt(t.source))return"skipped";const e=this.gl,i=this.upload(t);if(i==="tainted")return"tainted";if(!i)return"skipped";const s=t.crop??{x:0,y:0,width:t.width,height:t.height},r=Xt(t,this.pixelRatio),o=k(t.transform,_(s.x,s.y),L(s.width+r.x,s.height+r.y));return e.uniformMatrix3fv(this.uniforms.matrix,false,_t(o,this.cssWidth,this.cssHeight,this.matrixScratch)),e.uniform4f(this.uniforms.crop,s.x/t.width,s.y/t.height,s.width/t.width,s.height/t.height),e.uniform1f(this.uniforms.opacity,t.opacity),e.bindTexture(e.TEXTURE_2D,i.texture),e.drawArrays(e.TRIANGLE_STRIP,0,4),"drawn"}end(){this.isLost||this.gl.bindVertexArray(null)}has(t){return!this.isLost&&this.textures.has(t)}release(t){const e=this.textures.get(t);e&&(this.isLost||this.gl.deleteTexture(e.texture),this.textures.delete(t))}dispose(){var t;if(this.canvas.removeEventListener("webglcontextlost",this.handleLost),!this.isLost){for(const e of[...this.textures.keys()])this.release(e);this.program&&this.gl.deleteProgram(this.program),this.vao&&this.gl.deleteVertexArray(this.vao)}this.textures.clear(),(t=this.gl.getExtension("WEBGL_lose_context"))==null||t.loseContext(),this.isLost=true}upload(t){const e=this.gl,i=this.textures.get(t.key);if(i&&i.width===t.width&&i.height===t.height)return i;const s=(i==null?void 0:i.texture)??e.createTexture();if(!s)return null;e.bindTexture(e.TEXTURE_2D,s);try{e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t.source)}catch(o){if(i||e.deleteTexture(s),qt(o))return"tainted";throw o}e.generateMipmap(e.TEXTURE_2D),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR_MIPMAP_LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);const r={texture:s,width:t.width,height:t.height};return this.textures.set(t.key,r),r}}function Vt(n,t,e){const i=st(n,n.VERTEX_SHADER,t),s=st(n,n.FRAGMENT_SHADER,e),r=n.createProgram();if(!r)throw new Error("Could not create WebGL program");if(n.attachShader(r,i),n.attachShader(r,s),n.linkProgram(r),n.deleteShader(i),n.deleteShader(s),!n.getProgramParameter(r,n.LINK_STATUS)){const o=n.getProgramInfoLog(r);throw n.deleteProgram(r),new Error(`Could not link WebGL program: ${o}`)}return r}function st(n,t,e){const i=n.createShader(t);if(!i)throw new Error("Could not create WebGL shader");if(n.shaderSource(i,e),n.compileShader(i),!n.getShaderParameter(i,n.COMPILE_STATUS)){const s=n.getShaderInfoLog(i);throw n.deleteShader(i),new Error(`Could not compile WebGL shader: ${s}`)}return i}function qt(n){return typeof n=="object"&&n!==null&&n.name==="SecurityError"}const Yt=.09,$t=1e-4,nt=.05,Qt=1e-4;class jt{constructor(t,e=Yt,i){h(this,"current");h(this,"target",null);h(this,"timeConstant");h(this,"spring");h(this,"start");h(this,"elapsed",0);this.current={...t},this.start={...t},this.timeConstant=e,this.spring=i}get destination(){return this.target?{...this.target.state}:{...this.current}}set(t){this.current={...t},this.target=null}animateTo(t,e,i=false){const s=this.spring?this.spring.duration<=0:this.timeConstant===0;if(i||s){this.set(t.state);return}let r=t.anchor;if(r){const o=S(r.world,r.screen,t.state.zoom,t.state.rotation,e);Math.hypot(o.x-t.state.x,o.y-t.state.y)*t.state.zoom>nt&&(r=void 0)}this.start={...this.current},this.elapsed=0,this.target={state:{...t.state},anchor:r}}stop(){this.target=null}step(t,e){const i=this.target;if(!i)return false;const s=i.state;let r,o;if(this.spring){this.elapsed+=Math.max(t,0);const m=this.elapsed/this.spring.duration;if(m>=1)return this.current={...s},this.target=null,false;const c=this.spring.stiffness;r=this.start,o=(1-Math.exp(-c*m))/(1-Math.exp(-c))}else r=this.current,o=1-Math.exp(-Math.max(t,0)/this.timeConstant);const a=Math.exp(Math.log(r.zoom)+(Math.log(s.zoom)-Math.log(r.zoom))*o),d=r.rotation+(s.rotation-r.rotation)*o,l=i.anchor?S(i.anchor.world,i.anchor.screen,a,d,e):{x:r.x+(s.x-r.x)*o,y:r.y+(s.y-r.y)*o};return this.current={x:l.x,y:l.y,zoom:a,rotation:d},this.spring?true:Math.abs(Math.log(s.zoom/a))<$t&&Math.abs(s.rotation-d)<Qt&&Math.hypot(s.x-l.x,s.y-l.y)*a<nt?(this.current={...s},this.target=null,false):true}}const G={clickToZoom:true,dblClickToZoom:true,pinchToZoom:true,scrollToZoom:false,navigable:true,flickEnabled:true,flickMinSpeed:200,flickMomentum:.25},z=2,rt=1.5,ot=.1,Jt=100,te=.002,ee=.01;class ie{constructor(t,e,i=G){h(this,"pointers",new Map);h(this,"samples",[]);h(this,"down",null);h(this,"pinch",null);h(this,"lastTap",null);h(this,"lastPointerType","");h(this,"penHovers",false);h(this,"onPointerDown",t2=>{var i2,s;if(this.lastPointerType=t2.pointerType,t2.pointerType==="mouse"&&t2.button!==0||J(t2.target,this.element))return;(s=(i2=this.element).setPointerCapture)==null||s.call(i2,t2.pointerId);const e2=this.local(t2);this.pointers.set(t2.pointerId,e2),this.pointers.size===1?(this.down={x:e2.x,y:e2.y,t:t2.timeStamp,moved:false},this.samples=[{x:e2.x,y:e2.y,t:t2.timeStamp}],this.target.setInteracting(true)):this.pointers.size===2&&(this.pinch=this.pinchState(),this.down&&(this.down.moved=true))});h(this,"onPointerMove",t2=>{var s;Ct(t2)&&(this.penHovers=true);const e2=this.pointers.get(t2.pointerId);if(!e2)return;const i2=this.local(t2);if(this.pointers.set(t2.pointerId,i2),this.pointers.size===1){const r=i2.x-e2.x,o=i2.y-e2.y;this.down&&Math.hypot(i2.x-this.down.x,i2.y-this.down.y)>zt&&(this.down.moved=true),(s=this.down)!=null&&s.moved&&this.options.navigable&&this.target.panBy(r,o,!this.tracksPointer(t2.pointerType)),this.samples.push({x:i2.x,y:i2.y,t:t2.timeStamp});const a=t2.timeStamp-Jt;for(;this.samples.length>2&&this.samples[0].t<a;)this.samples.shift()}else if(this.pointers.size===2&&this.pinch&&this.options.navigable){const r=this.pinchState();this.options.pinchToZoom&&this.pinch.distance>0&&this.target.zoomBy(r.distance/this.pinch.distance,r.mid,false),this.target.panBy(r.mid.x-this.pinch.mid.x,r.mid.y-this.pinch.mid.y,false),this.pinch=r}});h(this,"onPointerUp",t2=>{var d,l,f,m,c,u;if(!this.pointers.has(t2.pointerId))return;if(this.pointers.delete(t2.pointerId),(l=(d=this.element).releasePointerCapture)==null||l.call(d,t2.pointerId),this.pointers.size===1){this.pinch=null;const[p]=this.pointers.values();this.samples=[{...p,t:t2.timeStamp}];return}if(this.pointers.size>0)return;const e2=this.down;if(this.down=null,this.pinch=null,this.target.setInteracting(false),!e2)return;const i2=this.local(t2);if(!e2.moved&&t2.type==="pointerup"&&t2.timeStamp-e2.t<tt){if((m=(f=this.target).dismiss)!=null&&m.call(f)){this.lastTap=null;return}if(et(t2.pointerType,this.penHovers)){const p=this.lastTap;this.options.navigable&&(this.options.clickToZoom||this.options.dblClickToZoom)&&p&&t2.timeStamp-p.t<tt&&Math.hypot(i2.x-p.x,i2.y-p.y)<Ut?(this.lastTap=null,this.zoomIn(i2)):this.lastTap={x:i2.x,y:i2.y,t:t2.timeStamp};return}this.options.clickToZoom&&this.options.navigable?t2.shiftKey?this.target.zoomBy(1/z,i2,true):this.zoomIn(i2):(u=(c=this.target).tap)==null||u.call(c,i2);return}if(!this.options.navigable||!this.tracksPointer(t2.pointerType))return;const r=this.samples[0],o=this.samples[this.samples.length-1],a=((o==null?void 0:o.t)??0)-((r==null?void 0:r.t)??0);if(r&&o&&a>0&&t2.timeStamp-o.t<50){const p=(o.x-r.x)/a*1e3,y=(o.y-r.y)/a*1e3,g=this.options.flickMomentum;g>0&&Math.hypot(p,y)>this.options.flickMinSpeed&&this.target.panBy(p*g,y*g,true)}});h(this,"onDoubleClick",t2=>{this.options.navigable&&(this.options.clickToZoom||!this.options.dblClickToZoom||et(this.lastPointerType,this.penHovers)||J(t2.target,this.element)||(t2.shiftKey?this.target.zoomBy(1/z,this.local(t2),true):this.zoomIn(this.local(t2))))});h(this,"onWheel",t2=>{const e2=t2.ctrlKey;if(!this.options.navigable||!e2&&!this.options.scrollToZoom||!e2&&Dt(t2.target,this.element,t2.deltaY))return;t2.preventDefault();const i2=se(t2),s=e2?ee:te;this.target.zoomBy(Math.exp(-i2*s),this.local(t2),!e2)});h(this,"onKeyDown",t2=>{if(t2.target!==this.element||!this.options.navigable||t2.altKey||t2.metaKey||t2.ctrlKey)return;const e2=this.element.getBoundingClientRect(),i2=e2.width*ot*(t2.shiftKey?3:1),s=e2.height*ot*(t2.shiftKey?3:1);switch(t2.key){case"ArrowLeft":this.target.panBy(i2,0,true);break;case"ArrowRight":this.target.panBy(-i2,0,true);break;case"ArrowUp":this.target.panBy(0,s,true);break;case"ArrowDown":this.target.panBy(0,-s,true);break;case"+":case"=":this.target.zoomBy(rt,void 0,true);break;case"-":case"_":this.target.zoomBy(1/rt,void 0,true);break;case"0":this.target.home();break;case"r":this.target.rotateBy(90);break;case"R":this.target.rotateBy(-90);break;default:return}t2.preventDefault()});this.element=t,this.target=e,this.options=i,t.addEventListener("pointerdown",this.onPointerDown),t.addEventListener("pointermove",this.onPointerMove),t.addEventListener("pointerup",this.onPointerUp),t.addEventListener("pointercancel",this.onPointerUp),t.addEventListener("dblclick",this.onDoubleClick),t.addEventListener("wheel",this.onWheel,{passive:false}),t.addEventListener("keydown",this.onKeyDown)}setOptions(t){this.options=t}dispose(){const t=this.element;t.removeEventListener("pointerdown",this.onPointerDown),t.removeEventListener("pointermove",this.onPointerMove),t.removeEventListener("pointerup",this.onPointerUp),t.removeEventListener("pointercancel",this.onPointerUp),t.removeEventListener("dblclick",this.onDoubleClick),t.removeEventListener("wheel",this.onWheel),t.removeEventListener("keydown",this.onKeyDown)}local(t){const e=this.element.getBoundingClientRect();return{x:t.clientX-e.left,y:t.clientY-e.top}}zoomIn(t){var e,i;(i=(e=this.target).atMaxZoom)!=null&&i.call(e)?this.target.home():this.target.zoomBy(z,t,true)}tracksPointer(t){return t==="touch"||this.options.flickEnabled}pinchState(){const[t,e]=[...this.pointers.values()];return{distance:Math.hypot(e.x-t.x,e.y-t.y),mid:{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}}}function se(n){return n.deltaMode===1?n.deltaY*16:n.deltaMode===2?n.deltaY*400:n.deltaY}class wt extends Error{constructor(t,e,i){super(t),this.url=e,this.status=i,this.name="ImageLoadError"}}const at=new Set;async function ne(n,t={}){const{signal:e,maxTextureSize:i,request:s}=t,r=Wt(s),o=oe(n);if(typeof createImageBitmap!="function"||typeof fetch!="function")return U(n,{signal:e,cors:true,withCredentials:r});if(o&&at.has(o))return U(n,{signal:e,cors:false,withCredentials:r});let a;try{a=await Ft(s,n,{mode:"cors",signal:e})}catch(c){if(ae(c,e))throw c;const u=await U(n,{signal:e,cors:false,withCredentials:r});return o&&at.add(o),u}if(!a.ok)throw new wt(`Image request failed with ${a.status}`,n,a.status);const d=await a.blob();let l=await re(d);const f=l.width,m=l.height;if(i&&(l.width>i||l.height>i)){const c=i/Math.max(l.width,l.height),u=await createImageBitmap(l,{resizeWidth:Math.max(1,Math.floor(l.width*c)),resizeHeight:Math.max(1,Math.floor(l.height*c)),resizeQuality:"high"});l.close(),l=u}if(e!=null&&e.aborted)throw l.close(),X();return{kind:"bitmap",source:l,width:l.width,height:l.height,naturalWidth:f,naturalHeight:m,opaque:false}}async function re(n){const t={imageOrientation:"from-image",premultiplyAlpha:"premultiply",colorSpaceConversion:"default"};try{return await createImageBitmap(n,t)}catch(e){if(e instanceof TypeError)return createImageBitmap(n);throw e}}function U(n,{signal:t,cors:e,withCredentials:i}){return new Promise((s,r)=>{if(t!=null&&t.aborted){r(X());return}const o=new Image;o.decoding="async",e&&(o.crossOrigin=i?"use-credentials":"anonymous");const a=()=>{o.onload=null,o.onerror=null,t==null||t.removeEventListener("abort",d)},d=()=>{a(),o.src="",r(X())};t==null||t.addEventListener("abort",d),o.onload=()=>{a();const l=()=>s({kind:"element",source:o,width:o.naturalWidth,height:o.naturalHeight,naturalWidth:o.naturalWidth,naturalHeight:o.naturalHeight,opaque:!e});typeof o.decode=="function"?o.decode().then(l,l):l()},o.onerror=()=>{a(),r(new wt("Image failed to load",n))},o.src=n})}function oe(n){var t;try{return new URL(n,(t=globalThis.location)==null?void 0:t.href).origin}catch{return null}}function ae(n,t){return!!(t!=null&&t.aborted)||typeof n=="object"&&n!==null&&n.name==="AbortError"}function X(){const n=new Error("Aborted");return n.name="AbortError",n}function ht(n){n.kind==="bitmap"&&n.source.close()}const he=192*1024*1024,ce=6,le=2;class de{constructor(t){h(this,"entries",new Map);h(this,"inFlight",0);h(this,"frame",0);h(this,"bytes",0);h(this,"wanted",[]);h(this,"disposed",false);h(this,"budget");h(this,"maxInFlight");this.options=t,this.budget=t.byteBudget??he,this.maxInFlight=t.maxInFlight??ce}get(t){const e=this.entries.get(t);if((e==null?void 0:e.state)==="ready")return e.lastUsed=this.frame,e.image}has(t){var e;return((e=this.entries.get(t))==null?void 0:e.state)==="ready"}failed(t){var e;return((e=this.entries.get(t))==null?void 0:e.state)==="failed"}get byteSize(){return this.bytes}get pending(){return this.inFlight}seed(t,e){var s;const i=this.entries.get(t);(i==null?void 0:i.state)!=="ready"&&((s=i==null?void 0:i.controller)==null||s.abort(),this.entries.set(t,{url:t,state:"ready",image:e,bytes:D(e),lastUsed:this.frame,attempts:0,pinned:false,waiters:(i==null?void 0:i.waiters)??[]}),this.bytes+=D(e),this.flushWaiters(t))}prefetch(t){return Promise.all(t.map(e=>new Promise(i=>{const s=this.entries.get(e.url);if(s&&s.state!=="loading")return i();if(s){s.waiters.push(i);return}this.start({...e,priority:-1},i)}))).then(()=>{})}update(t){if(this.disposed)return;this.frame++;const e=new Set(t.map(i=>i.url));this.wanted=[...t].sort((i,s)=>i.priority-s.priority);for(const i of this.entries.values())i.state==="loading"&&!i.pinned&&!e.has(i.url)&&i.controller&&(i.controller.abort(),this.entries.delete(i.url),this.inFlight--);for(const i of this.wanted){const s=this.entries.get(i.url);s&&(s.lastUsed=this.frame)}this.pump(),this.evict(e)}dispose(){var t;this.disposed=true;for(const e of this.entries.values())(t=e.controller)==null||t.abort(),this.flushWaiters(e.url);this.entries.clear(),this.bytes=0}forEachReady(t){for(const e of this.entries.values())e.state==="ready"&&e.image&&t(e.url,e.image)}pump(){for(const t of this.wanted){if(this.inFlight>=this.maxInFlight)break;this.entries.has(t.url)||this.start(t)}}start(t,e){const i=new AbortController,s={url:t.url,state:"loading",bytes:0,lastUsed:this.frame,attempts:0,controller:i,pinned:!!e,waiters:e?[e]:[]};this.entries.set(t.url,s),this.inFlight++,this.attempt(s,t,i,t.url)}attempt(t,e,i,s){t.attempts++,this.options.load(s,i.signal).then(r=>{if(this.disposed||this.entries.get(t.url)!==t){ht(r);return}t.state="ready",t.image=r,t.bytes=D(r),t.controller=void 0,t.pinned=false,this.bytes+=t.bytes,this.settle(t)},r=>{if(!(i.signal.aborted||this.disposed)&&this.entries.get(t.url)===t){if(t.attempts<le&&!ue(r,e)){this.attempt(t,e,i,e.fallbackUrl??e.url);return}t.state="failed",t.controller=void 0,t.pinned=false,this.settle(t)}})}settle(t){this.inFlight--,this.flushWaiters(t.url),this.options.onSettled(),this.pump()}flushWaiters(t){const e=this.entries.get(t);if(!e)return;const i=e.waiters;e.waiters=[],i.forEach(s=>s())}evict(t){if(this.bytes<=this.budget)return;const e=[...this.entries.values()].filter(i=>i.state==="ready"&&!t.has(i.url)).sort((i,s)=>i.lastUsed-s.lastUsed);for(const i of e){if(this.bytes<=this.budget)break;this.entries.delete(i.url),this.bytes-=i.bytes,i.image&&ht(i.image),this.options.onEvict(i.url)}}}function D(n){return n.width*n.height*4}function ue(n,t){if(t.fallbackUrl)return false;const e=n==null?void 0:n.status;return typeof e=="number"&&e>=400&&e<500&&e!==408&&e!==429}const fe=.1;class me{constructor(t,e=s=>requestAnimationFrame(s),i=s=>cancelAnimationFrame(s)){h(this,"handle",0);h(this,"last",0);h(this,"disposed",false);h(this,"frame",t2=>{if(this.handle=0,this.disposed)return;const e2=this.last?Math.min((t2-this.last)/1e3,fe):1/60;this.last=t2,this.tick(e2,t2)?this.invalidate():this.last=0});this.tick=t,this.raf=e,this.caf=i}invalidate(){this.disposed||this.handle||(this.handle=this.raf(this.frame))}drawNow(){this.disposed||(this.handle&&this.caf(this.handle),this.frame(performance.now()))}dispose(){this.disposed=true,this.handle&&this.caf(this.handle),this.handle=0}}const pe=2*1024*1024;function ge(n,t,e=pe){const i=new Set;let s=e,r=false;return{get deferred(){return r},getTile(o){const a=n(o);if(!a||a.kind==="media"||a.opaque||i.has(o)||t(o))return a;const d=a.width*a.height*4;if(i.size>0&&d>s){r=true;return}return s-=d,i.add(o),a}}}function we(n){const t=/^(!)?(\d+(?:\.\d+)?)$/.exec((n==null?void 0:n.trim())??"");if(!t)return null;const e=Number(t[2]);if(e>360)return null;const i=e%360,s=!!t[1];return i||s?{degrees:i,mirror:s}:null}function ye(n,t,e){if(!n)return null;let i=n.trim().replace(/^xywh=/,""),s=false;i.startsWith("pct:")?(s=true,i=i.slice(4)):i.startsWith("pixel:")&&(i=i.slice(6));const r=i.split(",").map(Number);if(r.length!==4||r.some(p=>!Number.isFinite(p)))return null;let[o,a,d,l]=r;s&&(o=o/100*t,a=a/100*e,d=d/100*t,l=l/100*e);const f=Math.max(0,o),m=Math.max(0,a),c=Math.min(t,o+d),u=Math.min(e,a+l);return c<=f||u<=m?null:{x:f,y:m,width:c-f,height:u-m}}const W=512,xe=16e6;function yt(n,t,e){return{width:t,height:e,levels:[{scaleFactor:1,width:t,height:e,tileWidth:t,tileHeight:e,cols:1,rows:1}],tile:s=>({...s,url:n,region:{x:0,y:0,width:t,height:e}})}}function ve(n){const{width:t,height:e}=n,i=[],s=n.regionByPx&&n.sizeByW,r=(c,u,p)=>{const y=Math.ceil(t/c),g=Math.ceil(e/c);return{scaleFactor:c,width:y,height:g,tileWidth:u,tileHeight:p,cols:Math.ceil(y/u),rows:Math.ceil(g/p)}},o=(c,u)=>({scaleFactor:t/c,width:c,height:u,tileWidth:c,tileHeight:u,cols:1,rows:1,whole:true}),a=n.tiles[0];if(a)for(const c of a.scaleFactors)i.push(r(c,a.width,a.height));else if(s)for(let c=1;;c*=2){const u=r(c,W,W);if(i.push(u),u.cols===1&&u.rows===1)break}const d=Math.max(0,...i.map(c=>c.scaleFactor));for(const c of n.sizes){const u=t/c.width;be(n,c.width,c.height)&&u>d+1e-9&&i.push(o(c.width,c.height))}const l=i.reduce((c,u)=>!c||u.scaleFactor>c.scaleFactor?u:c,null);if(l&&l.cols*l.rows>1&&n.sizeByW){const c=Math.max(t,e)/W;i.push(o(Math.ceil(t/c),Math.ceil(e/c)))}(!i.length||!a&&!s&&t*e<=xe)&&(i.some(c=>c.scaleFactor===1)||i.push(o(t,e)));const f=Te(i).sort((c,u)=>u.scaleFactor-c.scaleFactor),m=Ht(n);return{width:t,height:e,levels:f,tile(c){const u=f[c.level],p=u.scaleFactor,y=u.cols===1&&u.rows===1;let g,v,b;if(y)g={x:0,y:0,width:t,height:e},v=u.width,b=u.height;else{const A=Math.round(c.col*u.tileWidth*p),M=Math.round(c.row*u.tileHeight*p);g={x:A,y:M,width:Math.min(Math.round(u.tileWidth*p),t-A),height:Math.min(Math.round(u.tileHeight*p),e-M)},v=Math.ceil(g.width/p),b=Math.ceil(g.height/p)}return{...c,region:g,url:it(n,g,v,b),fallbackUrl:m?it(n,g,v,b,m):void 0}}}}function be(n,t,e){return!(n.maxWidth&&t>n.maxWidth||n.maxHeight&&e>n.maxHeight||n.maxArea&&t*e>n.maxArea)}function Te(n){const t=new Map;for(const e of n){const i=`${e.width}x${e.height}`,s=t.get(i);(!s||s.cols*s.rows<e.cols*e.rows)&&t.set(i,e)}return[...t.values()]}function Me(n,t){const e=n.levels;for(let i=0;i<e.length;i++)if(e[i].scaleFactor<=t*(1+1e-6))return i;return e.length-1}function T(n,t,e){const i=n.levels[t],s=i.tileWidth*i.scaleFactor,r=i.tileHeight*i.scaleFactor,o=Math.max(0,e.x),a=Math.max(0,e.y),d=Math.min(n.width,e.x+e.width),l=Math.min(n.height,e.y+e.height);if(d<=o||l<=a)return[];const f=Math.max(0,Math.floor(o/s)),m=Math.min(i.cols-1,Math.floor((d-1e-9)/s)),c=Math.max(0,Math.floor(a/r)),u=Math.min(i.rows-1,Math.floor((l-1e-9)/r)),p=[];for(let y=c;y<=u;y++)for(let g=f;g<=m;g++)p.push({level:t,col:g,row:y});return p}async function Ee(n,t){if(n.media)return ke(n,n.media);let e=null,i=null;if(n.service)try{e=ve(await Nt(n.service,t.infoOptions))}catch(c){i=c}if(!e){if(!n.url)throw i??new Error("Image has no source");const c=await t.loadStatic(n.url);t.cache.seed(n.url,c),e=yt(n.url,c.naturalWidth,c.naturalHeight)}const s=n.width&&n.height&&n.width>0&&n.height>0?{width:n.width,height:n.height}:{width:e.width,height:e.height},r=ye(n.region,s.width,s.height)??{x:0,y:0,width:s.width,height:s.height},o=e.width/s.width,a=e.height/s.height,d={x:r.x*o,y:r.y*a,width:r.width*o,height:r.height*a},l=we(n.rotation),f=l?Le(d,l):void 0,m={id:n.id,spec:n,pyramid:e,size:s,clip:d,contentClip:r,rect:{x:0,y:0,width:r.width,height:r.height},...f?{turn:f}:{}};return await t.cache.prefetch(T(e,0,d).map(c=>{const u=e.tile(c);return{url:u.url,fallbackUrl:u.fallbackUrl}})),m}const xt="media:";function ke(n,t){var a,d;const e=n.width||((a=n.placement)==null?void 0:a.width)||t.element.videoWidth||1600,i=n.height||((d=n.placement)==null?void 0:d.height)||t.element.videoHeight||900,s=`${xt}${n.id}`,r={width:e,height:i},o={x:0,y:0,width:e,height:i};return{id:n.id,spec:n,pyramid:yt(s,e,i),media:{kind:"media",source:t.element,width:e,height:i,naturalWidth:e,naturalHeight:i},size:r,clip:o,contentClip:o,rect:{...o}}}function Le(n,{degrees:t,mirror:e}){const i=t*Math.PI/180,s=f=>Math.abs(f)<1e-12?0:f,r=s(Math.cos(i)),o=s(Math.sin(i)),a=Math.abs(n.width*r)+Math.abs(n.height*o),d=Math.abs(n.width*o)+Math.abs(n.height*r),l=k(_(a/2,d/2),{a:r,b:o,c:-o,d:r,e:0,f:0},L(e?-1:1,1),_(-(n.x+n.width/2),-(n.y+n.height/2)));return{orient:l,unorient:Pt(l),width:a,height:d}}function vt(n){var t;return((t=n.turn)==null?void 0:t.orient)??_(-n.clip.x,-n.clip.y)}function _e(n,t){const{turn:e,clip:i}=n;if(!e)return{...t,x:i.x+t.x,y:i.y+t.y};const s=gt(e.unorient,t),r=Math.max(s.x,i.x),o=Math.max(s.y,i.y);return{x:r,y:o,width:Math.max(0,Math.min(s.x+s.width,i.x+i.width)-r),height:Math.max(0,Math.min(s.y+s.height,i.y+i.height)-o)}}function Pe(n,t){const{turn:e,clip:i}=n;return e?pt(e.unorient,t):{x:i.x+t.x,y:i.y+t.y}}function ct(n){const{turn:t,clip:e,contentClip:i}=n;return t?{width:t.width*i.width/e.width,height:t.height*i.height/e.height}:i}function Ae(n){if(!n.length)return null;if(n.every(i=>i.spec.placement)){for(const i of n)i.rect={...i.spec.placement};return mt(n.map(i=>i.rect))}const t=ct(n[0]).height;let e=0;for(const i of n){const s=ct(i),r=s.width*t/s.height;i.rect={x:e,y:0,width:r,height:t},e+=r}return{x:0,y:0,width:e,height:t}}function B(n){const t=n.turn??n.clip;return{x:n.rect.width/t.width,y:n.rect.height/t.height}}function Ie(n){const t=B(n);return k(_(n.rect.x,n.rect.y),L(t.x,t.y),vt(n))}function Se(n,t){var e,i;return n.service===t.service&&n.url===t.url&&n.width===t.width&&n.height===t.height&&n.region===t.region&&n.rotation===t.rotation&&((e=n.media)==null?void 0:e.element)===((i=t.media)==null?void 0:i.element)&&JSON.stringify(n.placement)===JSON.stringify(t.placement)}const Re=1e7,Be=15e6,Oe=2e7,Ce=2;function ze(n){const{items:t,camera:e,viewport:i,pixelRatio:s,getTile:r,destination:o}=n,a=Rt(e,i),d=[],l=[],f=[],m=(c,u,p)=>{const y=c.tile(u);l.push({url:y.url,fallbackUrl:y.fallbackUrl,priority:p})};for(const c of t){const{pyramid:u,clip:p,rect:y}=c,g=B(c);if(n.wantOverview)for(const w of T(u,0,p))m(u,w,Oe);const v=lt(c,e,i,s),b=o?lt(c,o,i,s):v;if(f.push((v==null?void 0:v.target)??-1),!v&&!b)continue;const A=w=>x=>{const P=u.tile(x).region;return Math.hypot(P.x+P.width/2-w.x,P.y+P.height/2-w.y)};if(b){const w=A(b.center);for(const x of T(u,0,b.area))m(u,x,w(x)/1e3);if(b.target>0)for(const x of T(u,b.target,b.area))m(u,x,Re+w(x))}if(!v)continue;const{area:M,target:E}=v,K=A(v.center),O=T(u,0,M),V=E===0?[]:T(u,E,M);if(b!==v){for(const x of O)m(u,x,K(x)/1e3);const w=E-Ce;if(w>0)for(const x of T(u,w,M))m(u,x,Be+K(x))}if(c.spec.hidden)continue;const bt=(E===0?O:V).every(w=>r(u.tile(w).url)!==void 0)?[E]:Array.from({length:E+1},(w,x)=>x),Tt=k(a,_(y.x,y.y),L(g.x,g.y),vt(c));for(const w of bt){const x=w===0?O:w===E?V:T(u,w,M),P=u.levels[w].cols*u.levels[w].rows>1;for(const Mt of x){const C=u.tile(Mt),q=r(C.url);if(!q)continue;const Y=Ue(c,C.region,q,Tt,P);Y&&d.push({...Y,url:C.url})}}}return l.sort((c,u)=>c.priority-u.priority),{draws:d,wants:De(l),levels:f}}function lt(n,t,e,i){const{pyramid:s,rect:r}=n,o=N(t,e);if(!At(o,r))return null;const a=B(n),d=Math.max(o.x,r.x),l=Math.max(o.y,r.y),f=Math.min(o.x+o.width,r.x+r.width),m=Math.min(o.y+o.height,r.y+r.height),c=1/(a.x*t.zoom*i);return{area:_e(n,{x:(d-r.x)/a.x,y:(l-r.y)/a.y,width:(f-d)/a.x,height:(m-l)/a.y}),center:Pe(n,{x:(t.x-r.x)/a.x,y:(t.y-r.y)/a.y}),target:Me(s,c)}}function Ue(n,t,e,i,s){const{clip:r}=n,o=Math.max(t.x,r.x),a=Math.max(t.y,r.y),d=Math.min(t.x+t.width,r.x+r.width),l=Math.min(t.y+t.height,r.y+r.height);if(d<=o||l<=a)return null;const f=e.width/t.width,m=e.height/t.height,c=1e-6;return{item:n,image:e,transform:k(i,_(t.x,t.y),L(1/f,1/m)),crop:{x:(o-t.x)*f,y:(a-t.y)*m,width:(d-o)*f,height:(l-a)*m},bleed:{right:s&&d<r.x+r.width-c,bottom:s&&l<r.y+r.height-c}}}function De(n){const t=new Set;return n.filter(e=>t.has(e.url)?false:(t.add(e.url),true))}const We={maxZoomPixelRatio:1.1,minZoomImageRatio:.9,animationTime:.09,animationDuration:void 0,springStiffness:6.5,constrainDuringPan:true,request:void 0,byteBudget:192*1024*1024,maxInFlight:6,releaseAfterMs:2e3},Fe=2,He=3,Ne=.1,F=1e-6,Z={top:0,right:0,bottom:0,left:0};function dt(n,t="padding"){if(!n||typeof getComputedStyle!="function")return Z;const e=getComputedStyle(n),i=s=>parseFloat(e.getPropertyValue(`${t}-${s}`))||0;return{top:i("top"),right:i("right"),bottom:i("bottom"),left:i("left")}}const Ge=(n,t)=>n.top===t.top&&n.right===t.right&&n.bottom===t.bottom&&n.left===t.left;let Xe;class Ze{constructor(t,e={}){h(this,"host");h(this,"overlays",null);h(this,"options");h(this,"backend",null);h(this,"backendPreference");h(this,"contextLosses",0);h(this,"holder",{hiddenSince:null,release:()=>this.giveBack()});h(this,"visible",true);h(this,"dom",null);h(this,"domAsked",false);h(this,"pending",null);h(this,"camera");h(this,"loop");h(this,"gestures");h(this,"gestureOptions",{});h(this,"cache");h(this,"navigator",null);h(this,"navigatorAsked",0);h(this,"viewport",{width:1,height:1});h(this,"inset",Z);h(this,"pixelRatio",1);h(this,"items",[]);h(this,"worldBounds",null);h(this,"contentVersion",0);h(this,"opaqueUrls",new Set);h(this,"mediaByKey",new Map);h(this,"detachMedia",[]);h(this,"opened",false);h(this,"atHome",true);h(this,"interacting",false);h(this,"lastEmitted",null);h(this,"generation",0);h(this,"listeners",new Map);h(this,"unloadable",false);h(this,"resizeObserver",null);h(this,"intersectionObserver",null);h(this,"releaseTimer",null);h(this,"dprQuery",null);h(this,"disposed",false);h(this,"dismisser",null);h(this,"tick",t2=>{var d,l;if(this.disposed)return false;const e2=this.camera.step(t2,this.viewport),i2=this.camera.current,s2=this.backend,r=ge(this.getTile,f=>s2?s2.has(f):true),o=ze({items:this.items,camera:i2,viewport:this.viewport,pixelRatio:this.pixelRatio,getTile:r.getTile,wantOverview:!!this.navigator,destination:e2?this.camera.destination:void 0}),a=o.wants.filter(f=>!f.url.startsWith(xt));return this.cache.update(a),o.draws.length?this.setUnloadable(false):a.length&&a.every(f=>this.cache.failed(f.url))&&this.setUnloadable(true),this.paint(o.draws),(d=this.overlays)==null||d.position(i2,this.viewport),(l=this.navigator)==null||l.render(this.items.filter(f=>!f.spec.hidden),this.worldBounds,N(i2,this.viewport),this.pixelRatio,this.getTile,this.contentVersion),(!this.lastEmitted||!j(this.lastEmitted,i2))&&(this.lastEmitted={...i2},this.opened&&this.emit("viewport")),e2||r.deferred});h(this,"getTile",t2=>this.mediaByKey.get(t2)??this.cache.get(t2));h(this,"onContextLost",()=>{this.contextLosses+=1,this.releaseBackend(),this.visible?this.acquireBackend(false):this.host.dataset.backend="released"});h(this,"onPixelRatioChange",()=>{this.measure(),this.watchPixelRatio()});this.host=t,this.backendPreference=e.backend??"auto",this.options={...We,...H(e)},ft()&&(this.options.animationTime=0,this.options.animationDuration!==void 0&&(this.options.animationDuration=0));const{animationDuration:i,springStiffness:s}=this.options;this.camera=new jt({x:0,y:0,zoom:1,rotation:0},this.options.animationTime,i===void 0?void 0:{duration:i,stiffness:s}),this.loop=new me(this.tick),this.gestureOptions=H(e.gestures??{}),ft()&&(this.gestureOptions.flickMomentum=0),this.gestures=new ie(t,this,{...G,...this.gestureOptions}),this.cache=new de({load:(r,o)=>this.loadTile(r,o),onSettled:()=>{this.contentVersion++,this.invalidate()},onEvict:r=>{var o;return(o=this.backend)==null?void 0:o.release(r)},byteBudget:this.options.byteBudget,maxInFlight:this.options.maxInFlight}),this.visible=Ke(t),this.visible?this.acquireBackend():this.holder.hiddenSince=ut(),this.measure(),this.observe()}get backendKind(){var t;return((t=this.backend)==null?void 0:t.kind)??"none"}get isOpen(){return this.opened}get isAtHome(){return this.atHome}on(t,e){let i=this.listeners.get(t);return i||(i=new Set,this.listeners.set(t,i)),i.add(e),()=>i==null?void 0:i.delete(e)}async setImages(t,{world:e,fit:i=false}={}){const s=++this.generation,r=new Map(this.items.map(f=>[f.id,f])),o=await Promise.allSettled(t.map(f=>{const m=r.get(f.id);return m&&Se(m.spec,f)?(m.spec=f,Promise.resolve(m)):Ee(f,{cache:this.cache,loadStatic:c=>this.loadTile(c),infoOptions:{request:this.options.request}})}));if(s!==this.generation||this.disposed)return;const a=o.filter(f=>f.status==="fulfilled").map(f=>f.value),d=o.filter(f=>f.status==="rejected").map(f=>f.reason);this.items=a,this.watchMedia(a);const l=Ae(a);if(this.worldBounds=e?l?mt([e,l]):e:l,this.contentVersion++,d.length&&this.emit("error",d),this.setUnloadable(t.length>0&&!a.length&&d.length>0),!this.worldBounds){this.invalidate();return}this.opened?i?(this.home(true),this.emit("change")):(this.camera.set(this.constrain(this.camera.current)),this.emit("change")):(this.opened=true,this.home(true),this.emit("open")),this.invalidate()}clear(){this.setUnloadable(false),this.generation++,this.items=[],this.watchMedia([]),this.worldBounds=null,this.contentVersion++,this.invalidate()}setHidden(t){const e=new Set(t);let i=false;for(const s of this.items){const r=e.has(s.id);!!s.spec.hidden!==r&&(s.spec={...s.spec,hidden:r},i=true)}i&&this.invalidate()}isReady(t){const e=this.items.find(s=>s.id===t);if(!e)return false;if(e.spec.media)return true;const i=e.pyramid.levels[0];if(!i)return false;for(let s=0;s<i.rows;s++)for(let r=0;r<i.cols;r++)if(!this.getTile(e.pyramid.tile({level:0,col:r,row:s}).url))return false;return true}fitBounds(t,e=false,i=Z){const s=this.fit(t,this.camera.destination.rotation,i);this.atHome=false,this.animateTo(this.constrain(s,{allowBeyondLimits:true}),e)}fit(t,e,{top:i,right:s,bottom:r,left:o}){const{width:a,height:d}=this.viewport,{zoom:l}=Bt(t,{width:Math.max(1,a-o-s),height:Math.max(1,d-i-r)},e);return{...S(It(t),{x:(a+o-s)/2,y:(d+i-r)/2},l,e,this.viewport),zoom:l,rotation:e}}fitItemRect(t,e,i=false){const s=this.itemRectToWorld(t,e);s&&this.fitAnnotation(s,i)}fitAnnotation(t,e=false){var r;const i=this.items[0];if(!i)return;const s=i.rect.width*Ne;this.fitBounds({x:t.x-s,y:t.y-s,width:t.width+s*2,height:t.height+s*2},e,dt((r=this.overlays)==null?void 0:r.container,"scroll-padding"))}getBounds(){return N(this.camera.current,this.viewport)}getHomeBounds(){return this.worldBounds?{...this.worldBounds}:null}getCamera(){return{...this.camera.current}}getZoomLimits(){var i;const t=((i=this.homeCamera())==null?void 0:i.zoom)??1,e=this.items.length?Math.min(...this.items.map(s=>B(s).x)):1;return{home:t,min:t*this.options.minZoomImageRatio,max:Math.max(t,this.options.maxZoomPixelRatio/e)}}home(t=false){const e=this.homeCamera();if(!e)return;const i=this.atHome;this.atHome=true,this.animateTo(e,t),!i&&this.opened&&this.emit("viewport")}atMaxZoom(){return this.camera.destination.zoom>=this.getZoomLimits().max*(1-F)}viewLimits(){const{zoom:t,x:e,y:i,rotation:s}=this.camera.destination,{min:r,max:o}=this.getZoomLimits(),a=this.atHome?this.homeCamera():null;return{atMax:t>=o*(1-F),atMin:t<=r*(1+F),atHome:this.atHome&&(!a||Math.abs(t/a.zoom-1)<.001&&Math.hypot(e-a.x,i-a.y)*t<.5&&Math.abs(s-a.rotation)<.001)}}zoomBy(t,e,i=true){const s=i?this.camera.destination:this.camera.current,r=e??{x:this.viewport.width/2,y:this.viewport.height/2},o=Q(s,this.viewport,r),{min:a,max:d}=this.getZoomLimits(),l=I(s.zoom*t,a,d),f=S(o,r,l,s.rotation,this.viewport),m=this.constrain({...s,...f,zoom:l});this.atHome=false,i?this.camera.animateTo({state:m,anchor:{world:o,screen:r}},this.viewport):this.camera.set(m),this.invalidate()}panBy(t,e,i=false){const s=i?this.camera.destination:this.camera.current,r=pt(k(L(1/s.zoom),St(-s.rotation)),{x:t,y:e}),o=this.constrain({...s,x:s.x-r.x,y:s.y-r.y});this.atHome=false,i?this.camera.animateTo({state:o},this.viewport):this.camera.set(o),this.invalidate()}panTo(t,e=false){const i=e?this.camera.current:this.camera.destination;this.atHome=false,this.animateTo(this.constrain({...i,...t}),e)}rotateBy(t){const e=this.camera.destination;this.setRotation(e.rotation*180/Math.PI+t)}setRotation(t,e=false){const i=this.camera.destination,s=t*Math.PI/180;this.animateTo(this.constrain({...i,rotation:s}),e)}getRotation(){return this.camera.destination.rotation*180/Math.PI}tap(t){this.emit("tap",t)}setDismiss(t){this.dismisser=t}dismiss(){var t;return((t=this.dismisser)==null?void 0:t.call(this))??false}setGestures(t){this.gestures.setOptions({...G,...this.gestureOptions,...H(t)})}setInteracting(t){if(this.interacting=t,t){this.camera.stop();return}if(this.options.constrainDuringPan)return;const e=this.camera.destination,i=this.constrain(e);j(e,i)||this.animateTo(i,false)}worldToScreenPoint(t){return Ot(this.camera.current,this.viewport,t)}screenToWorldPoint(t){return Q(this.camera.current,this.viewport,t)}itemRectToWorld(t,e){const i=this.items[t];if(!i)return null;const{contentClip:s,clip:r}=i;if(i.turn)return gt(k(Ie(i),L(r.width/s.width,r.height/s.height)),e);const o=i.rect.width/s.width,a=i.rect.height/s.height;return{x:i.rect.x+(e.x-s.x)*o,y:i.rect.y+(e.y-s.y)*a,width:e.width*o,height:e.height*a}}attachNavigator(t){var r;(r=this.navigator)==null||r.dispose(),this.navigator=null;const e=++this.navigatorAsked;let i=null,s=false;return import("./Navigator-CA8zB6CU.mjs").then(o=>{s||this.disposed||e!==this.navigatorAsked||(i=new o.Navigator(t,(a,d)=>this.panTo(a,d)),this.navigator=i,this.invalidate())}),()=>{s=true,i==null||i.dispose(),i&&this.navigator===i&&(this.navigator=null)}}invalidate(){this.loop.invalidate()}dispose(){var t,e,i,s,r,o,a;this.disposed||(this.disposed=true,this.generation++,this.loop.dispose(),this.gestures.dispose(),(t=this.resizeObserver)==null||t.disconnect(),(e=this.intersectionObserver)==null||e.disconnect(),(s=(i=this.dprQuery)==null?void 0:i.removeEventListener)==null||s.call(i,"change",this.onPixelRatioChange),this.releaseTimer&&clearTimeout(this.releaseTimer),(r=this.navigator)==null||r.dispose(),this.navigator=null,this.releaseBackend(),this.cache.dispose(),(o=this.dom)==null||o.dispose(),(a=this.overlays)==null||a.dispose(),this.items=[],this.detachMedia.forEach(d=>d()),this.mediaByKey.clear(),this.listeners.clear(),delete this.host.dataset.backend)}watchMedia(t){this.detachMedia.forEach(e=>e()),this.detachMedia=[],this.mediaByKey.clear();for(const e of t){if(!e.media||e.media.kind!=="media")continue;const i=e.pyramid.tile({level:0,col:0,row:0}).url;this.mediaByKey.set(i,e.media);const s=e.media.source,r=()=>this.invalidate(),o=["play","seeked","loadeddata","resize"];o.forEach(a=>s.addEventListener(a,r)),this.detachMedia.push(()=>o.forEach(a=>s.removeEventListener(a,r)))}}paint(t){const e=this.backend,i=[],s=(e==null?void 0:e.kind)==="webgl2";e==null||e.begin();for(const r of t){const{image:o}=r;if(!(o.kind==="media"||o.kind==="element"&&s&&(o.opaque||this.opaqueUrls.has(r.url)))&&e){if(e.draw({key:r.url,source:o.source,width:o.width,height:o.height,transform:r.transform,crop:r.crop,opacity:1,bleed:r.bleed})!=="tainted"||o.kind==="bitmap")continue;this.opaqueUrls.add(r.url)}(o.kind==="element"||o.kind==="media")&&i.push({key:`${r.item.id}|${r.url}`,element:o.source,width:o.width,height:o.height,transform:r.transform,crop:r.crop,opacity:1})}e==null||e.end(),this.dom?this.dom.sync(i):i.length&&!this.domAsked&&(this.domAsked=true,import("./DomLayers-Bbrulm6v.mjs").then(({DomLayers:r})=>{if(this.disposed)return;const o=new r(this.host);this.overlays&&this.host.insertBefore(o.container,this.overlays.container),this.dom=o,this.invalidate()}))}loadTile(t,e){return ne(t,{signal:e,request:this.options.request,maxTextureSize:this.backend instanceof R?this.backend.maxTextureSize:void 0})}animateTo(t,e){this.camera.animateTo({state:t},this.viewport,e),this.invalidate()}homeCamera(){if(!this.worldBounds)return null;const t=2*Math.PI,e=Math.round(this.camera.destination.rotation/t)*t||0;return this.fit(this.worldBounds,e,this.inset)}constrain(t,{allowBeyondLimits:e=false}={}){const i=this.worldBounds;if(!i)return t;const{min:s,max:r}=this.getZoomLimits(),o=e?I(t.zoom,s,Math.max(r,t.zoom)):I(t.zoom,s,r);return this.interacting&&!this.options.constrainDuringPan?{...t,zoom:o}:{...t,zoom:o,x:I(t.x,i.x,i.x+i.width),y:I(t.y,i.y,i.y+i.height)}}acquireBackend(t=true){var r,o;if(this.backend||this.pending||this.disposed)return;const e=document.createElement("canvas");e.className="clover-canvas-surface",e.setAttribute("aria-hidden","true"),Object.assign(e.style,{position:"absolute",inset:"0",width:"100%",height:"100%",display:"block",pointerEvents:"none"}),this.host.insertBefore(e,((r=this.dom)==null?void 0:r.container)??((o=this.overlays)==null?void 0:o.container)??null);const i=t&&(this.backendPreference==="webgl2"||this.backendPreference==="auto"&&this.contextLosses<He);let s=null;i&&(Lt(this.holder)||this.backendPreference==="webgl2")&&(s=R.create(e,{onLost:this.onContextLost}),s||$(this.holder)),s?this.install(s):this.backendPreference==="webgl2"?this.none(e):(this.pending=e,(Xe??(Xe=import("./Canvas2DBackend-CYAJ-W6-.mjs"))).then(({Canvas2DBackend:a})=>{if(this.pending!==e)return;this.pending=null;const d=a.create(e);d?this.install(d):this.none(e)}))}none(t){t.remove(),this.host.dataset.backend="none"}install(t){this.backend=t,this.host.dataset.backend=t.kind,t.resize(this.viewport.width,this.viewport.height,this.pixelRatio),t.kind==="canvas2d"&&this.opaqueUrls.clear(),this.emit("backend",t.kind),this.invalidate()}releaseBackend(){var e;if($(this.holder),(e=this.pending)==null||e.remove(),this.pending=null,!this.backend)return;const t=this.backend.canvas;this.backend.dispose(),t.remove(),this.backend=null}giveBack(){this.releaseTimer&&clearTimeout(this.releaseTimer),this.releaseTimer=null,this.releaseBackend(),this.host.dataset.backend="released"}observe(){typeof ResizeObserver<"u"&&(this.resizeObserver=new ResizeObserver(()=>this.measure(true)),this.resizeObserver.observe(this.host)),typeof IntersectionObserver<"u"&&(this.intersectionObserver=new IntersectionObserver(t=>{const e=t.some(i=>i.isIntersecting);this.setVisible(e)}),this.intersectionObserver.observe(this.host)),this.watchPixelRatio()}setVisible(t){var e;if(this.visible=t,t){this.holder.hiddenSince=null,this.releaseTimer&&clearTimeout(this.releaseTimer),this.releaseTimer=null,this.backend||this.acquireBackend();return}(e=this.holder).hiddenSince??(e.hiddenSince=ut()),!(!this.backend||this.releaseTimer)&&(this.releaseTimer=setTimeout(()=>this.giveBack(),this.options.releaseAfterMs))}measure(t=false){var d;const e=this.host.getBoundingClientRect(),i=Math.max(1,e.width),s=Math.max(1,e.height),r=dt(this.host),o=Math.min(typeof window<"u"&&window.devicePixelRatio||1,Fe);if(i===this.viewport.width&&s===this.viewport.height&&o===this.pixelRatio&&Ge(r,this.inset))return;const a=this.viewport;if(this.viewport={width:i,height:s},this.inset=r,this.pixelRatio=o,(d=this.backend)==null||d.resize(i,s,o),this.opened){if(this.atHome)this.home(true);else{const l=this.camera.current,f=i/Math.max(a.width,1);this.camera.set(this.constrain({...l,zoom:l.zoom*f}))}this.emit("viewport")}t?this.loop.drawNow():this.invalidate()}watchPixelRatio(){var t,e,i,s;typeof window>"u"||typeof window.matchMedia!="function"||((e=(t=this.dprQuery)==null?void 0:t.removeEventListener)==null||e.call(t,"change",this.onPixelRatioChange),this.dprQuery=window.matchMedia(`(resolution: ${window.devicePixelRatio||1}dppx)`),(s=(i=this.dprQuery).addEventListener)==null||s.call(i,"change",this.onPixelRatioChange))}setUnloadable(t){t!==this.unloadable&&(this.unloadable=t,this.emit("unloadable",t))}emit(t,e){var i;(i=this.listeners.get(t))==null||i.forEach(s=>s(e))}}const ut=()=>typeof performance<"u"?performance.now():Date.now();function Ke(n){if(typeof IntersectionObserver>"u"||typeof window>"u")return true;const{top:t,left:e,width:i,height:s}=n.getBoundingClientRect();return t+s>=0&&e+i>=0&&t<=window.innerHeight&&e<=window.innerWidth}function ft(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function H(n){return Object.fromEntries(Object.entries(n).filter(([,t])=>t!==void 0))}const ii=(n,t)=>new Ze(n,t);export{Xt as b,Gt as h,ze as p,ii as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as c,A as l,x as u,aC as p,_ as d,k as m}from"./shared-
|
|
1
|
+
import{u as c,A as l,x as u,aC as p,_ as d,k as m}from"./shared-D2RadIoz.mjs";import"./styles-DZIDbHxL.mjs";const f=new WeakMap;function v(t){let n=f.get(t);if(!n){const{render:o}=t;n={canvasId:t.canvasId,format:t.format,match:t.match,component:r=>c(y,{...r,render:o})},f.set(t,n)}return n}function C(t){if(Array.isArray(t))return t.filter(n=>typeof n=="object"&&n!==null&&typeof n.render=="function").map(v)}function y({render:t,canvases:n,bodies:o,children:r}){const a=l(null),i=u(p);return d(()=>{const e=a.current;if(!e)return;const s=t(e,{canvases:n,bodies:o,clover:i});return()=>{typeof s=="function"&&s(),e.replaceChildren()}},[t,n,o,i]),c(m,{children:[c("div",{ref:a,className:"clover-body-renderer",style:{position:"absolute",inset:0}}),r&&c("div",{className:"clover-canvas-controls",children:r})]})}export{C as toRenderers};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{x as n,Z as o,Q as r}from"./shared-
|
|
1
|
+
import{x as n,Z as o,Q as r}from"./shared-D2RadIoz.mjs";const t=(s,a)=>a==="canvas"?o(s.manifest,s.canvasId):s.manifest,e=r(null),i=()=>n(e);export{e as P,t as r,i as u};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
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 _o(n,o){return mo(n)||ho(n,o)||go(n,o)||To()}function go(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,Ao=Object.isFrozen,bn=Object.getPrototypeOf,yn=Object.getOwnPropertyDescriptor;let y=Object.freeze,R=Object.seal,mt=Object.create,On=typeof Reflect<"u"&&Reflect,be=On.apply,ye=On.construct;y||(y=function(o){return o});R||(R=function(o){return o});be||(be=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)});ye||(ye=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),Eo=g(Array.prototype.lastIndexOf),sn=g(Array.prototype.pop),bt=g(Array.prototype.push),So=g(Array.prototype.slice),bo=g(Array.prototype.splice),dt=Array.isArray,me=Rn(Set),de=g(Set.prototype.add),yt=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),yo=g(String.prototype.trim),Oo=g(Number.prototype.toString),Ro=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 be(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 ye(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&&(Ao(o)||(o[l]=m),c=m)}n[c]=true}return n}function Do(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=_o(l,2);const c=s[0],m=s[1];N(n,c)&&(dt(m)?o[c]=Do(m):m&&typeof m=="object"&&m.constructor===Object?o[c]=M(m):o[c]=m)}return o}function Lo(n){switch(typeof n){case"string":return n;case"number":return Oo(n);case"boolean":return Ro(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=yn(n,o);if(l){if(l.get)return g(l.get);if(typeof l.value=="function")return g(l.value)}n=bn(n)}function s(){return null}return s}function wo(n,o){for(;n!==null;){const s=yn(n,o);if(s)return s.get?g(s.get):null;n=bn(n)}return null}function Io(n){try{return O(n,""),true}catch{return false}}const pn=y(["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=y(["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=y(["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"]),No=y(["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=y(["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"]),Co=y(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),mn=y(["#text"]),dn=y(["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=y(["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=y(["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=y(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Mo=R(/{{[\w\W]*|^[\w\W]*}}/g),vo=R(/<%[\w\W]*|^[\w\W]*%>/g),Po=R(/\${[\w\W]*/g),xo=R(/^data-[\-\w.\u00B7-\uFFFF]+$/),ko=R(/^aria-[\-\w]+$/),Tn=R(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Uo=R(/^(?:\w+script|data):/i),zo=R(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Fo=R(/^html$/i),Ho=R(/^[a-z][.\w]*(-[.\w]+)+$/i),Ee=R(/<[/\w!]/g),_n=R(/<[/\w]/g),Wo=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},Go=y(d({},["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"])),Bo=function(){return typeof window>"u"?null:window},Yo=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]:Bo();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=wo(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=Yo(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=Mo,Wn=vo,Gn=Po,Bn=xo,Yn=ko,Vn=Uo,Ie=zo,jn=Ho;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=y(["mi","mo","mn","ms","mtext"]);let ee=d({},Ge);const Be=y(["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=Io(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("")));y&&y(t),ct=t},Ve=d({},[...Te,..._e,...No]),je=d({},[...ge,...Co]),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){bt(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(So(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}bt(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&&!yt(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),b=[t];let z=false;if(W(p,D=>{v(D)===S.documentFragment?bt(b,D):!z&&!yt(r,D)&&(z=yt(u(),D))}),!z)return;if(f>=oo)throw G("the tree kept changing during in-place sanitization; refusing to return it");W(b,(D,w)=>{io(D,w>0,t,u())})}},io=function(t,e,r,i){const u=le(t);let f;for(;f=u.nextNode();)!yt(i,f)||yt(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&&Go[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 b=t===r?vn(u[p],true):u[p];i.insertBefore(b,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(Wo,t.innerHTML))return Y(t),true;if(H&&t.nodeType===S.text){const i=xt(t.textContent);t.textContent!==i&&(bt(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],b=p.name,z=p.namespaceURI,D=p.value,w=A(b),pt=D;let I=b==="value"?pt:yo(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(b,t,p),I=ke+I,on=true),nn(b,I)){ut(b,t,p);continue}if(!i.forceKeepAttr){if(!i.keepAttr){ut(b,t,p);continue}if(!Xt&&O(gn,I)){ut(b,t,p);continue}if(H&&(I=xt(I)),!tn(f,w,I)){ut(b,t,p);continue}I=fo(f,w,z,I),I!==pt&&po(t,b,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 b=i.content;V(b)&&e.push({node:b,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=Lo(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 b=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=b}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(Fo,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)&&
|
|
1
|
+
import{t as mo,a as ho}from"./trusted-Bvpx307M.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{a1 as a}from"./shared-
|
|
1
|
+
import{a1 as a}from"./shared-D2RadIoz.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{ay as w,S as f,
|
|
1
|
+
import{ay as w,S as f,a8 as x,U as S}from"./shared-D2RadIoz.mjs";const A=10;async function R(r,t,s,o,e){var n,d;const i=(n=r.get().manifest)==null?void 0:n.id;try{const{hits:c,set:u}=await b(t,s,{request:o,signal:e});if(e.aborted||((d=r.get().manifest)==null?void 0:d.id)!==i)return;r.set({search:{query:s,status:"ready",hits:c,set:u}})}catch{if(e.aborted)return;r.set({search:{query:s,status:"error",hits:[],set:null}})}}async function b(r,t,{request:s,signal:o}={}){const e=new URL(r.id);e.searchParams.set("q",t);const i=[];let n=e.toString();const d=new Set;for(;n&&i.length<A&&!d.has(n);){d.add(n);const c=await w(s,n,o);i.push(c),n=$(c)}return E(i,t)}function T(r){var e;const t=f(r)[0];if(typeof t=="string"||!t)return t;const s=t.full??t["@id"],o=(e=f(t.selector)[0])==null?void 0:e.value;return typeof o=="string"&&typeof s=="string"?`${s}#${o}`:s}function $(r){var o;const t=r.next??((o=r.within)==null?void 0:o.next),s=typeof t=="string"?t:(t==null?void 0:t.id)??(t==null?void 0:t["@id"]);return typeof s=="string"?s:null}function E(r,t){var e,i;const s=[],o=[];for(const n of r){const d=Array.isArray(n.resources),c=d?n.resources:f(n.items),u=new Map;for(const a of c){const p=a.id??a["@id"],m=d?T(a.on):f(a.target)[0],v=x(m);if(!p||!v.id)continue;const y=d?(e=a.resource)==null?void 0:e.chars:f(a.body).map(l=>l==null?void 0:l.value).find(l=>typeof l=="string"),I={id:p,setId:S,canvasId:v.id,target:v,motivation:["highlighting"],bodies:[{value:String(y??t)}],annotation:{id:p,type:"Annotation",motivation:["highlighting"],body:{type:"TextualBody",value:String(y??t)},target:m}};u.set(p,I),s.push(I)}const g=d?H(n,u):M(n,u),h=new Set(g.flatMap(a=>a.entryIds));o.push(...g);for(const a of u.values())h.has(a.id)||o.push({id:a.id,canvasId:a.canvasId,entryIds:[a.id],match:((i=a.bodies[0])==null?void 0:i.value)??t})}return{query:t,hits:o,set:{id:S,label:{none:[t]},source:"search",entries:s}}}function H(r,t){var o;const s=[];for(const e of f(r.hits)){const i=f(e.annotations).filter(n=>t.has(n));i.length&&s.push({id:i.join(" "),canvasId:t.get(i[0]).canvasId,entryIds:i,before:e.before,match:String(e.match??((o=t.get(i[0]).bodies[0])==null?void 0:o.value)??""),after:e.after})}return s}function M(r,t){var o,e;const s=[];for(const i of f(r.annotations))for(const n of f(i==null?void 0:i.items))if(f(n==null?void 0:n.motivation).includes("contextualizing"))for(const c of f(n.target)){const u=typeof(c==null?void 0:c.source)=="string"?c.source:(o=c==null?void 0:c.source)==null?void 0:o.id,g=u?t.get(u):void 0;if(!g)continue;const h=f(c.selector).find(a=>(a==null?void 0:a.type)==="TextQuoteSelector");s.push({id:`${n.id??u}#${u}`,canvasId:g.canvasId,entryIds:[g.id],before:h==null?void 0:h.prefix,match:String((h==null?void 0:h.exact)??((e=g.bodies[0])==null?void 0:e.value)??""),after:h==null?void 0:h.suffix})}return s}export{E as readResults,b as search,R as searchInto};
|