@nulib/clover 4.0.0-beta.0 → 4.0.0-beta.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.
Files changed (181) hide show
  1. package/dist/components/Map/MapView.mjs +9 -8
  2. package/dist/components/Map/maplibre-worker.mjs +7 -0
  3. package/dist/components/Map/worker.mjs +22 -0
  4. package/dist/components/Panel/About.mjs +14 -9
  5. package/dist/components/Split/Split.mjs +9 -2
  6. package/dist/core/items.mjs +3 -1
  7. package/dist/core/load.mjs +10 -3
  8. package/dist/index.d.mts +23 -12
  9. package/dist/map/index.d.mts +15 -4
  10. package/dist/templates/index.d.mts +5 -2
  11. package/dist/templates.css +1 -1
  12. package/dist/ui/ReadMore.mjs +1 -1
  13. package/dist/web-components/About-DbrFSVBm.mjs +1 -0
  14. package/dist/web-components/{AnnotationMenu-BGIYRXW6.mjs → AnnotationMenu-EBjIQpQl.mjs} +1 -1
  15. package/dist/web-components/{AnnotationState-D2UIgIEC.mjs → AnnotationState-DQTaO6Gz.mjs} +1 -1
  16. package/dist/web-components/{Annotations-C_tBJHo3.mjs → Annotations-Cb9U7HJ_.mjs} +1 -1
  17. package/dist/web-components/{Annotations-BhwAv3ah.mjs → Annotations-Dl0SgHBS.mjs} +1 -1
  18. package/dist/web-components/{Body-DMEERFuB.mjs → Body-DxSz3iST.mjs} +1 -1
  19. package/dist/web-components/{BodyAlert-BP8voSLv.mjs → BodyAlert-C8EOXz24.mjs} +1 -1
  20. package/dist/web-components/{Button-Cl02BFDd.mjs → Button-uWgfvqsL.mjs} +1 -1
  21. package/dist/web-components/{Camera-Dw51CAfF.mjs → Camera-cdCqKMup.mjs} +1 -1
  22. package/dist/web-components/{Canvas2DBackend-RRN2bEkc.mjs → Canvas2DBackend-CnLEHRs4.mjs} +1 -1
  23. package/dist/web-components/{CanvasView-B8lMMSou.mjs → CanvasView-BI3YzNdK.mjs} +1 -1
  24. package/dist/web-components/{CaptionDetails-KLMDv-ec.mjs → CaptionDetails-B80ZhZ7v.mjs} +1 -1
  25. package/dist/web-components/{ChoiceMenu-CXrVOmJl.mjs → ChoiceMenu-DCp7-co7.mjs} +1 -1
  26. package/dist/web-components/{Collection-DL4Ui4hF.mjs → Collection-B1Le2_TU.mjs} +1 -1
  27. package/dist/web-components/{CollectionSelect-DL-bbpwJ.mjs → CollectionSelect-BL_jQog-.mjs} +1 -1
  28. package/dist/web-components/{Connected-BcjRA5si.mjs → Connected-BxqaRL9o.mjs} +1 -1
  29. package/dist/web-components/{Connected-B0S1HXQb.mjs → Connected-DCBI-j9H.mjs} +1 -1
  30. package/dist/web-components/{Connected-Q7iizBb8.mjs → Connected-DkhfVWxd.mjs} +1 -1
  31. package/dist/web-components/{Contents-ZC8TiGaW.mjs → Contents-zYEGHLfe.mjs} +1 -1
  32. package/dist/web-components/{ControlMenu-DIoU797-.mjs → ControlMenu-CAHiLAtl.mjs} +1 -1
  33. package/dist/web-components/{Cue-CJxnDMEy.mjs → Cue-BT2V9VAq.mjs} +1 -1
  34. package/dist/web-components/Document-BdCjGnJN.mjs +1 -0
  35. package/dist/web-components/DocumentPanel-X_Rta0Wu.mjs +1 -0
  36. package/dist/web-components/{DomLayers-BsR2AOy-.mjs → DomLayers-BD4QPbl6.mjs} +1 -1
  37. package/dist/web-components/{Download-DBksL1C0.mjs → Download-DqU-goFi.mjs} +1 -1
  38. package/dist/web-components/{EntryBodies-VwEkTVrw.mjs → EntryBodies-DXAQH0vR.mjs} +1 -1
  39. package/dist/web-components/{ErrorBoundary-Cy9PGoZv.mjs → ErrorBoundary-chQaO-Up.mjs} +1 -1
  40. package/dist/web-components/{FieldPill-DCJBz6Vj.mjs → FieldPill-CyEssPVm.mjs} +1 -1
  41. package/dist/web-components/{FrameAnimation-DRbmgGpF.mjs → FrameAnimation-Bb0pOoRl.mjs} +1 -1
  42. package/dist/web-components/{Gallery-BM7-VJkB.mjs → Gallery-BXU3TcT3.mjs} +1 -1
  43. package/dist/web-components/{HideToggle-BdYgG7us.mjs → HideToggle-BwMrOBMu.mjs} +1 -1
  44. package/dist/web-components/{Items-_1Jz3FMs.mjs → Items-DRj1UEpC.mjs} +1 -1
  45. package/dist/web-components/{Label-CAiJ49eA.mjs → Label-D6aVJB9s.mjs} +1 -1
  46. package/dist/web-components/LightboxBody-BzXQGMDn.mjs +1 -0
  47. package/dist/web-components/{Loaded-wQurAeJz.mjs → Loaded-D5xmFRSo.mjs} +1 -1
  48. package/dist/web-components/{LoadedCanvas-DWz5IK5m.mjs → LoadedCanvas-DOjtxLSe.mjs} +1 -1
  49. package/dist/web-components/LoadedMap-DouDS2lO.mjs +1 -0
  50. package/dist/web-components/{Loading-BmA--pzr.mjs → Loading-CBKfwsML.mjs} +1 -1
  51. package/dist/web-components/{Map-DzVGblIS.mjs → Map-Bcgp_R8H.mjs} +1 -1
  52. package/dist/web-components/MapView-CD5zkTs8.mjs +1 -0
  53. package/dist/web-components/{Markup-D91DbxLk.mjs → Markup-C1hMA8wk.mjs} +1 -1
  54. package/dist/web-components/{MediaBody-BYcVPo2X.mjs → MediaBody-B_Gii4we.mjs} +1 -1
  55. package/dist/web-components/{MediaBody-FEzH8VVw.mjs → MediaBody-BfrKIPte.mjs} +1 -1
  56. package/dist/web-components/{Navigator-CIJFA3q1.mjs → Navigator-BSJbEbuJ.mjs} +1 -1
  57. package/dist/web-components/{Pager-BGwCurxE.mjs → Pager-Di_2hHM3.mjs} +1 -1
  58. package/dist/web-components/{Panel-B-GXOkzF.mjs → Panel-DbsC8A9V.mjs} +1 -1
  59. package/dist/web-components/{PanelToggle-BYjV2t1j.mjs → PanelToggle-mUDw73zI.mjs} +1 -1
  60. package/dist/web-components/{PartOfManifest-ClbGepVM.mjs → PartOfManifest-7eOwURrF.mjs} +1 -1
  61. package/dist/web-components/{Pending-BspZajh5.mjs → Pending-BPOQ2z1L.mjs} +1 -1
  62. package/dist/web-components/{Primitives-CTh59wvs.mjs → Primitives-XQO3m1wG.mjs} +1 -1
  63. package/dist/web-components/{Provider-C6rIiDXH.mjs → Provider-B61118lU.mjs} +1 -1
  64. package/dist/web-components/{ReadMore-BJ2i-0uN.mjs → ReadMore-BJH-qqte.mjs} +1 -1
  65. package/dist/web-components/{Root-DkkYDtur.mjs → Root-Dj277K6p.mjs} +1 -1
  66. package/dist/web-components/Scene-BTWpLeec.mjs +1 -0
  67. package/dist/web-components/{SceneView-qcW_sT3j.mjs → SceneView-BYo7WmPt.mjs} +1 -1
  68. package/dist/web-components/{Search-UOneIUcP.mjs → Search-ZV8FFN4p.mjs} +1 -1
  69. package/dist/web-components/{Sections-we9U9fXq.mjs → Sections-ejwu1_Sm.mjs} +1 -1
  70. package/dist/web-components/{StandaloneItems-DU8oCFc_.mjs → StandaloneItems-BYaiyCca.mjs} +1 -1
  71. package/dist/web-components/{Status-Cs5ZvFvL.mjs → Status-YbQK2KzY.mjs} +1 -1
  72. package/dist/web-components/Timeline-ByyVSd7B.mjs +1 -0
  73. package/dist/web-components/{Tip-C8J3qsIK.mjs → Tip-IO11xX4x.mjs} +1 -1
  74. package/dist/web-components/{Transcript-CRL2zToL.mjs → Transcript-D0gUxUoA.mjs} +1 -1
  75. package/dist/web-components/{annotation-collection-ZPyvpLFc.mjs → annotation-collection-Csv7WIlm.mjs} +1 -1
  76. package/dist/web-components/{annotations-content-BZChKhJZ.mjs → annotations-content-BS_OFz5Z.mjs} +1 -1
  77. package/dist/web-components/{body-UntgrmoV.mjs → body-CKjwwFep.mjs} +1 -1
  78. package/dist/web-components/{canvas-d_U4v_mh.mjs → canvas-CIzpp-Uz.mjs} +1 -1
  79. package/dist/web-components/{cloverEngine-Dbv-26NP.mjs → cloverEngine-B4LinbSt.mjs} +1 -1
  80. package/dist/web-components/{content-state-reader-DjdKWjit.mjs → content-state-reader-D1BkpICh.mjs} +1 -1
  81. package/dist/web-components/{controls-qRYf2jO2.mjs → controls-Dj2BybWb.mjs} +1 -1
  82. package/dist/web-components/{engine-D8JLgzqq.mjs → engine-BSt8LTso.mjs} +1 -1
  83. package/dist/web-components/{engines-BwVb9R_A.mjs → engines-CC0OEsVE.mjs} +1 -1
  84. package/dist/web-components/{fromManifest-UrMJgktp.mjs → fromManifest-BhemHaoA.mjs} +1 -1
  85. package/dist/web-components/{glyphs-BoX0a88P.mjs → glyphs-drROkef9.mjs} +1 -1
  86. package/dist/web-components/{hooks-Dp8pjU8l.mjs → hooks-BXzQSllm.mjs} +1 -1
  87. package/dist/web-components/{imageService-C3yg9DxB.mjs → imageService-dsdmcegU.mjs} +1 -1
  88. package/dist/web-components/{index-DWxMuwDL.mjs → index-B7nZdqLg.mjs} +1 -1
  89. package/dist/web-components/index.mjs +1 -1
  90. package/dist/web-components/{items--Tu7ZM3L.mjs → items-CB2Uk7ts.mjs} +1 -1
  91. package/dist/web-components/items-jfQ5XzEj.mjs +1 -0
  92. package/dist/web-components/label-Vbg_cMOJ.mjs +1 -0
  93. package/dist/web-components/{layout-KL0V-iJu.mjs → layout-mMHI0lsj.mjs} +1 -1
  94. package/dist/web-components/{link-DRRTY4lY.mjs → link-ZRnv5NFR.mjs} +1 -1
  95. package/dist/web-components/logo-Boy6u4m2.mjs +1 -0
  96. package/dist/web-components/{models-BP2qp9nT.mjs → models-D1EE_CmH.mjs} +1 -1
  97. package/dist/web-components/{nodes-Bf-Fb7e5.mjs → nodes-B7JRwBgl.mjs} +1 -1
  98. package/dist/web-components/{overlayImage-DdPs2EGY.mjs → overlayImage-0OgQl1TL.mjs} +1 -1
  99. package/dist/web-components/{panel-CiqEFDzv.mjs → panel-CjXfre-g.mjs} +1 -1
  100. package/dist/web-components/part-cUiPs2-y.mjs +1 -0
  101. package/dist/web-components/{playerSurface-i2TJz-F4.mjs → playerSurface-CU5XxI1j.mjs} +1 -1
  102. package/dist/web-components/{provider-LUmAQSoP.mjs → provider-C1wKfdjb.mjs} +1 -1
  103. package/dist/web-components/{read-more-BaaO77el.mjs → read-more-DNHNtG-a.mjs} +1 -1
  104. package/dist/web-components/{rendererSurface-DAvatpMF.mjs → rendererSurface-DhIlOjGT.mjs} +2 -2
  105. package/dist/web-components/{renderers-Bg4QqawN.mjs → renderers-BMSWEFUR.mjs} +1 -1
  106. package/dist/web-components/{resource-DzIvB_4m.mjs → resource-DLHocQ1C.mjs} +1 -1
  107. package/dist/web-components/{search-DgcgsI3I.mjs → search-CLy2Wj01.mjs} +1 -1
  108. package/dist/web-components/{shared-J3w3gnXD.mjs → shared-YUjOSBKO.mjs} +1 -1
  109. package/dist/web-components/{show-link-DWRRXSBy.mjs → show-link-CyzYE1eS.mjs} +1 -1
  110. package/dist/web-components/{sizedImage-DfjlV2-i.mjs → sizedImage-uv_NlE0l.mjs} +1 -1
  111. package/dist/web-components/{split-m-_XivaW.mjs → split-CYuMjp89.mjs} +1 -1
  112. package/dist/web-components/{status-DDS7jLNd.mjs → status-Ms5L0ghK.mjs} +1 -1
  113. package/dist/web-components/{styles-Ypl9KrSK.mjs → styles-CyuM_fB1.mjs} +1 -1
  114. package/dist/web-components/three.mjs +1 -1
  115. package/dist/web-components/{thumbnail-BZvLSwWW.mjs → thumbnail-c2K_iQsD.mjs} +1 -1
  116. package/dist/web-components/{tip-BXByhOJ9.mjs → tip-dWhupWSr.mjs} +1 -1
  117. package/dist/web-components/{toggle-AS72kq6v.mjs → toggle-BQTjR1I3.mjs} +1 -1
  118. package/dist/web-components/{useContainerName-DCbE5JXi.mjs → useContainerName-BpJ3IWY0.mjs} +1 -1
  119. package/dist/web-components/{useNearViewport-CyoK3l8W.mjs → useNearViewport-CtLyYg9n.mjs} +1 -1
  120. package/dist/web-components/{useScrollTrack-dLFWnT8N.mjs → useScrollTrack-WbG28FPD.mjs} +1 -1
  121. package/dist/web-components/viewer/{AnnotationMenu-Dd4tnzNV.mjs → AnnotationMenu-ZKyBeyUU.mjs} +1 -1
  122. package/dist/web-components/viewer/{AnnotationState-DZaSy5lH.mjs → AnnotationState-DO33zokc.mjs} +1 -1
  123. package/dist/web-components/viewer/{Annotations-D1h-Yi5J.mjs → Annotations-BOjhr5ks.mjs} +1 -1
  124. package/dist/web-components/viewer/{Annotations-sj79EMen.mjs → Annotations-DkLueFLK.mjs} +1 -1
  125. package/dist/web-components/viewer/{Canvas2DBackend-CkvI0wUT.mjs → Canvas2DBackend-CAmzJD5P.mjs} +1 -1
  126. package/dist/web-components/viewer/{CaptionDetails-B_JdNjJ7.mjs → CaptionDetails-DOJlUtOn.mjs} +1 -1
  127. package/dist/web-components/viewer/{ChoiceMenu-xa51a1DV.mjs → ChoiceMenu-BDq6H34G.mjs} +1 -1
  128. package/dist/web-components/viewer/{Collection-CxuLCspj.mjs → Collection-By3puO0V.mjs} +1 -1
  129. package/dist/web-components/viewer/{Connected-BSUBc3Ci.mjs → Connected-DZNO2CPf.mjs} +1 -1
  130. package/dist/web-components/viewer/{Connected-CPIxNjF2.mjs → Connected-ESg5y49m.mjs} +1 -1
  131. package/dist/web-components/viewer/{Contents-DNh9mnsF.mjs → Contents-B_FqDwTW.mjs} +1 -1
  132. package/dist/web-components/viewer/{ControlMenu-DdgIvBdf.mjs → ControlMenu-DdQl-dTf.mjs} +1 -1
  133. package/dist/web-components/viewer/{Cue-90H9_dXz.mjs → Cue-BTRHfiWQ.mjs} +1 -1
  134. package/dist/web-components/viewer/Document-B9_PyD2w.mjs +1 -0
  135. package/dist/web-components/viewer/DocumentPanel-CtEJVPoE.mjs +1 -0
  136. package/dist/web-components/viewer/{DomLayers-Dybz_aJv.mjs → DomLayers-DRdQSEtN.mjs} +1 -1
  137. package/dist/web-components/viewer/{EntryBodies-DGXjFP3N.mjs → EntryBodies-CJuTRcTq.mjs} +1 -1
  138. package/dist/web-components/viewer/{FieldPill-Icmd98OY.mjs → FieldPill-06uwrNwE.mjs} +1 -1
  139. package/dist/web-components/viewer/{FrameAnimation-DJZN3Rd4.mjs → FrameAnimation-3dcDHf5q.mjs} +1 -1
  140. package/dist/web-components/viewer/{Gallery-CEp3-bh2.mjs → Gallery-BYasTqZc.mjs} +1 -1
  141. package/dist/web-components/viewer/{HideToggle-DB6HTmAO.mjs → HideToggle-BxkNMX-T.mjs} +1 -1
  142. package/dist/web-components/viewer/{LightboxBody-ClQ4yrTh.mjs → LightboxBody-CXMc1xOH.mjs} +1 -1
  143. package/dist/web-components/{MapView-BJaN7VBI.mjs → viewer/MapView-DCerrRRV.mjs} +1 -1
  144. package/dist/web-components/viewer/{MediaBody-BzMXMHIF.mjs → MediaBody-BdkJcyGy.mjs} +1 -1
  145. package/dist/web-components/viewer/{MediaBody-BBbSMT1i.mjs → MediaBody-waF4KvHp.mjs} +1 -1
  146. package/dist/web-components/viewer/{Navigator-Duc69Yes.mjs → Navigator-CKwDgG2x.mjs} +1 -1
  147. package/dist/web-components/viewer/{PartOfManifest-X9_q-2t6.mjs → PartOfManifest-DalHJFwC.mjs} +1 -1
  148. package/dist/web-components/viewer/{Search-S4N5QU4R.mjs → Search-Di_QQfDb.mjs} +1 -1
  149. package/dist/web-components/viewer/{StandaloneItems-BO4VyWRW.mjs → StandaloneItems-B9J6nnWn.mjs} +1 -1
  150. package/dist/web-components/viewer/{Transcript-BbDaS064.mjs → Transcript-aHOixfna.mjs} +1 -1
  151. package/dist/web-components/viewer/{annotation-collection-BjZ1DAHq.mjs → annotation-collection-I2UkdobR.mjs} +1 -1
  152. package/dist/web-components/viewer/{annotations-content-jn3n5Y2-.mjs → annotations-content-D-i4j9pD.mjs} +1 -1
  153. package/dist/web-components/viewer/{cloverEngine-CjuYjUhI.mjs → cloverEngine-CynoKdta.mjs} +1 -1
  154. package/dist/web-components/viewer/{content-state-reader-CPiShIjP.mjs → content-state-reader-D7GIMcKK.mjs} +1 -1
  155. package/dist/web-components/viewer/{host-yWi4R1bP.mjs → host-DlCltI_c.mjs} +1 -1
  156. package/dist/web-components/viewer/index.mjs +1 -1
  157. package/dist/web-components/viewer/{link-CwE-fg5G.mjs → link-BX-wzj1u.mjs} +1 -1
  158. package/dist/web-components/viewer/{overlayImage-BpOgqsZ0.mjs → overlayImage-CHqn1fG8.mjs} +1 -1
  159. package/dist/web-components/viewer/{renderers-L-IlGI1r.mjs → renderers-C_wdmw9v.mjs} +1 -1
  160. package/dist/web-components/viewer/{search-DWkwRPo_.mjs → search-BHLyNxZ6.mjs} +1 -1
  161. package/dist/web-components/viewer/{viewer--TreVlJ_.mjs → viewer-ipqAA-xQ.mjs} +5 -5
  162. package/dist/web-components/viewer/{vtt-1ZJwtElI.mjs → vtt-XiS_-5Ao.mjs} +1 -1
  163. package/dist/web-components/viewer-DEHIsIHd.mjs +1 -0
  164. package/dist/web-components/{vtt-GFssZH8Y.mjs → vtt-DYAOuQoK.mjs} +1 -1
  165. package/dist/web-components/worker-CjXN0dku.mjs +1 -0
  166. package/package.json +3 -2
  167. package/dist/web-components/About-uKa1wfDr.mjs +0 -1
  168. package/dist/web-components/Document-DHBRAFEK.mjs +0 -1
  169. package/dist/web-components/DocumentPanel-CqvE2pu9.mjs +0 -1
  170. package/dist/web-components/LightboxBody-DyhUZiDf.mjs +0 -1
  171. package/dist/web-components/LoadedMap-DIeW313M.mjs +0 -1
  172. package/dist/web-components/Scene-B_PU_TiX.mjs +0 -1
  173. package/dist/web-components/Timeline-WtYZ1bIJ.mjs +0 -1
  174. package/dist/web-components/items-W2vrwArM.mjs +0 -1
  175. package/dist/web-components/label-CYQ7tVl6.mjs +0 -1
  176. package/dist/web-components/logo-CnQUCB3Y.mjs +0 -1
  177. package/dist/web-components/part-CUBY90_b.mjs +0 -1
  178. package/dist/web-components/viewer/Document-CNCpzkiN.mjs +0 -1
  179. package/dist/web-components/viewer/DocumentPanel-BdG4TVLE.mjs +0 -1
  180. package/dist/web-components/viewer/MapView-BVSdybIC.mjs +0 -1
  181. package/dist/web-components/viewer-DyV864Qe.mjs +0 -1
@@ -1 +1 @@
1
- import{a as m,g as p,b as O,X as M,u as e,o as $}from"./shared-J3w3gnXD.mjs";import{t as y}from"./heading-Cjt0f-Eu.mjs";import"./styles-Ypl9KrSK.mjs";function P({manifest:o,headingLevel:r,onOpened:u}){const{t:l,langOf:s}=m(),{clover:d,language:b}=p("About"),n=O(),i=[].concat(o.partOf??[]).filter(t=>(t==null?void 0:t.id)&&(!t.type||t.type==="Manifest"));if(!M(o)||!i.length)return null;const f=o.items[0].id,{as:g,title:v,group:h}=y(r,`${n}-title`);return e("section",{className:"clover-about-section",...h,children:[e(g,{className:"clover-about-heading",lang:s("aboutPartOf"),...v,children:l("aboutPartOf")}),e("ul",{className:"clover-about-part-of",children:i.map((t,c)=>{const a=$(t.label,b);return e("li",{children:[a.text&&e("span",{id:`${n}-${c}`,lang:a.lang,children:a.text}),e("button",{type:"button",className:"clover-about-open",lang:s("aboutOpenManifest"),"aria-describedby":a.text?`${n}-${c}`:void 0,onClick:()=>void d.goToManifest(t.id,f).then(u),children:l("aboutOpenManifest")})]},t.id)})})]})}export{P as default};
1
+ import{a as m,g as p,b as O,X as M,u as e,o as $}from"./shared-YUjOSBKO.mjs";import{t as y}from"./heading-Cjt0f-Eu.mjs";import"./styles-CyuM_fB1.mjs";function P({manifest:o,headingLevel:r,onOpened:u}){const{t:l,langOf:s}=m(),{clover:d,language:b}=p("About"),n=O(),i=[].concat(o.partOf??[]).filter(t=>(t==null?void 0:t.id)&&(!t.type||t.type==="Manifest"));if(!M(o)||!i.length)return null;const f=o.items[0].id,{as:g,title:v,group:h}=y(r,`${n}-title`);return e("section",{className:"clover-about-section",...h,children:[e(g,{className:"clover-about-heading",lang:s("aboutPartOf"),...v,children:l("aboutPartOf")}),e("ul",{className:"clover-about-part-of",children:i.map((t,c)=>{const a=$(t.label,b);return e("li",{children:[a.text&&e("span",{id:`${n}-${c}`,lang:a.lang,children:a.text}),e("button",{type:"button",className:"clover-about-open",lang:s("aboutOpenManifest"),"aria-describedby":a.text?`${n}-${c}`:void 0,onClick:()=>void d.goToManifest(t.id,f).then(u),children:l("aboutOpenManifest")})]},t.id)})})]})}export{P as default};
@@ -1 +1 @@
1
- import{u as a}from"./shared-J3w3gnXD.mjs";import{L as s}from"./Loading-BmA--pzr.mjs";import"./styles-Ypl9KrSK.mjs";function i({children:r}){return r?a("div",{className:"clover-canvas","data-status":"error",children:r}):a("div",{className:"clover-canvas","data-status":"loading","aria-busy":"true",children:a(s,{overlay:true})})}export{i as C};
1
+ import{u as a}from"./shared-YUjOSBKO.mjs";import{L as s}from"./Loading-CBKfwsML.mjs";import"./styles-CyuM_fB1.mjs";function i({children:r}){return r?a("div",{className:"clover-canvas","data-status":"error",children:r}):a("div",{className:"clover-canvas","data-status":"loading","aria-busy":"true",children:a(s,{overlay:true})})}export{i as C};
@@ -1 +1 @@
1
- import{u as s,K as x,o as y,Y as k,d as j,y as A,j as L}from"./shared-J3w3gnXD.mjs";import{thumbnailSource as T,resolveThumbnail as C}from"./thumbnail-BZvLSwWW.mjs";import{t as R}from"./text-BTAkxEfQ.mjs";import{j as c}from"./classnames-DukgfdpI.mjs";import{M as S,a as q}from"./Markup-D91DbxLk.mjs";import{R as w}from"./ReadMore-BJ2i-0uN.mjs";import{u as H,r as M}from"./resource-DzIvB_4m.mjs";function u(t,e,r){const l=H(),n=k(i=>{var o;return(o=M(i,t))==null?void 0:o[e]},void 0);return r!==void 0?r:l?l[e]:n}const f=()=>{var t;return(t=x())==null?void 0:t.language};function E({of:t="manifest",as:e="p",value:r,className:l,...n}){const i=u(t,"summary",r),o=f();return y(i,o).text?s(w,{children:s(S,{as:e,markup:i,language:o,className:c("clover-summary",l),...n})}):null}function F({value:t,format:e,headingLevel:r,as:l="span",className:n,...i}){const o=f();return s(S,{as:l,markup:t,format:e,headingLevel:r,language:o,className:c("clover-value",n),...i})}function G({of:t="manifest",value:e,className:r,renderValue:l,...n}){const i=u(t,"metadata",e),o=f();return s(q,{metadata:i,language:o,renderValue:l,className:c("clover-metadata",r),...n})}function J({of:t="manifest",value:e,className:r,...l}){const n=u(t,"requiredStatement",e),i=f();return s(q,{metadata:n?[n]:null,language:i,className:c("clover-required-statement",r),...l})}function Q({of:t="manifest",value:e,className:r,...l}){const n=u(t,"rights",e);return n?s("a",{href:n,className:c("clover-rights",r),...l,children:n}):null}function U({of:t="manifest",value:e,className:r,...l}){const n=u(t,"id",e);return n?s("a",{href:n,className:c("clover-id",r),...l,children:n}):null}function p({property:t,className:e,of:r="manifest",value:l,...n}){const i=L(u(r,t,l)),o=f(),d=i.filter(a=>a==null?void 0:a.id);return d.length?s("ul",{className:e,...n,children:d.map(a=>{const m=y(a.label,o);return s("li",{children:[s("a",{href:a.id,lang:m.text?m.lang:void 0,children:m.text?R(m.text):a.id}),a.format&&s("span",{className:"clover-link-format",children:[" (",a.format,")"]})]},a.id)})}):null}const W=({className:t,...e})=>s(p,{property:"homepage",className:c("clover-homepage",t),...e}),X=({className:t,...e})=>s(p,{property:"rendering",className:c("clover-rendering",t),...e}),Z=({className:t,...e})=>s(p,{property:"seeAlso",className:c("clover-see-also",t),...e}),_=({className:t,...e})=>s(p,{property:"partOf",className:c("clover-part-of",t),...e});function $({of:t="manifest",value:e,size:r=400,className:l,...n}){var b;const i=k(g=>M(g,t),null),o=e??i,d=f(),a=o?T(o):null,m=(a==null?void 0:a.src)??(a==null?void 0:a.service)??(a==null?void 0:a.fallback),[N,v]=j(a==null?void 0:a.src),O=(b=x())==null?void 0:b.clover.request;if(A(()=>{if(!a)return v(void 0);if(a.src)return v(a.src);let g=true;return C(a,r,O).then(P=>g&&v(P)),()=>{g=false}},[m,r]),!N)return null;const h=y(o==null?void 0:o.label,d);return s("img",{src:N,alt:R(h.text),lang:n.alt===void 0&&h.text?h.lang:void 0,width:r,loading:"lazy",decoding:"async",className:c("clover-thumbnail",l),...n})}export{W as Homepage,U as Id,G as Metadata,_ as PartOf,X as Rendering,J as RequiredStatement,Q as Rights,Z as SeeAlso,E as Summary,$ as Thumbnail,F as Value};
1
+ import{u as s,K as x,o as y,Y as k,d as j,y as A,j as L}from"./shared-YUjOSBKO.mjs";import{thumbnailSource as T,resolveThumbnail as C}from"./thumbnail-c2K_iQsD.mjs";import{t as R}from"./text-BTAkxEfQ.mjs";import{j as c}from"./classnames-DukgfdpI.mjs";import{M as S,a as q}from"./Markup-C1hMA8wk.mjs";import{R as w}from"./ReadMore-BJH-qqte.mjs";import{u as H,r as M}from"./resource-DLHocQ1C.mjs";function u(t,e,r){const l=H(),n=k(i=>{var o;return(o=M(i,t))==null?void 0:o[e]},void 0);return r!==void 0?r:l?l[e]:n}const f=()=>{var t;return(t=x())==null?void 0:t.language};function E({of:t="manifest",as:e="p",value:r,className:l,...n}){const i=u(t,"summary",r),o=f();return y(i,o).text?s(w,{children:s(S,{as:e,markup:i,language:o,className:c("clover-summary",l),...n})}):null}function F({value:t,format:e,headingLevel:r,as:l="span",className:n,...i}){const o=f();return s(S,{as:l,markup:t,format:e,headingLevel:r,language:o,className:c("clover-value",n),...i})}function G({of:t="manifest",value:e,className:r,renderValue:l,...n}){const i=u(t,"metadata",e),o=f();return s(q,{metadata:i,language:o,renderValue:l,className:c("clover-metadata",r),...n})}function J({of:t="manifest",value:e,className:r,...l}){const n=u(t,"requiredStatement",e),i=f();return s(q,{metadata:n?[n]:null,language:i,className:c("clover-required-statement",r),...l})}function Q({of:t="manifest",value:e,className:r,...l}){const n=u(t,"rights",e);return n?s("a",{href:n,className:c("clover-rights",r),...l,children:n}):null}function U({of:t="manifest",value:e,className:r,...l}){const n=u(t,"id",e);return n?s("a",{href:n,className:c("clover-id",r),...l,children:n}):null}function p({property:t,className:e,of:r="manifest",value:l,...n}){const i=L(u(r,t,l)),o=f(),d=i.filter(a=>a==null?void 0:a.id);return d.length?s("ul",{className:e,...n,children:d.map(a=>{const m=y(a.label,o);return s("li",{children:[s("a",{href:a.id,lang:m.text?m.lang:void 0,children:m.text?R(m.text):a.id}),a.format&&s("span",{className:"clover-link-format",children:[" (",a.format,")"]})]},a.id)})}):null}const W=({className:t,...e})=>s(p,{property:"homepage",className:c("clover-homepage",t),...e}),X=({className:t,...e})=>s(p,{property:"rendering",className:c("clover-rendering",t),...e}),Z=({className:t,...e})=>s(p,{property:"seeAlso",className:c("clover-see-also",t),...e}),_=({className:t,...e})=>s(p,{property:"partOf",className:c("clover-part-of",t),...e});function $({of:t="manifest",value:e,size:r=400,className:l,...n}){var b;const i=k(g=>M(g,t),null),o=e??i,d=f(),a=o?T(o):null,m=(a==null?void 0:a.src)??(a==null?void 0:a.service)??(a==null?void 0:a.fallback),[N,v]=j(a==null?void 0:a.src),O=(b=x())==null?void 0:b.clover.request;if(A(()=>{if(!a)return v(void 0);if(a.src)return v(a.src);let g=true;return C(a,r,O).then(P=>g&&v(P)),()=>{g=false}},[m,r]),!N)return null;const h=y(o==null?void 0:o.label,d);return s("img",{src:N,alt:R(h.text),lang:n.alt===void 0&&h.text?h.lang:void 0,width:r,loading:"lazy",decoding:"async",className:c("clover-thumbnail",l),...n})}export{W as Homepage,U as Id,G as Metadata,_ as PartOf,X as Rendering,J as RequiredStatement,Q as Rights,Z as SeeAlso,E as Summary,$ as Thumbnail,F as Value};
@@ -1 +1 @@
1
- import{a as B,Y as P,K as w,j as v,u as l,k as L,o as j,x as I,Q as k,d as N,q as b,y as q,_ as z,A as R}from"./shared-J3w3gnXD.mjs";import{t as S}from"./text-BTAkxEfQ.mjs";import{j as O}from"./classnames-DukgfdpI.mjs";import{L as T}from"./Label-CAiJ49eA.mjs";import{u as $,r as A,P as F}from"./resource-DzIvB_4m.mjs";import"./styles-Ypl9KrSK.mjs";const K=typeof window>"u"?q:z,C=k(null),M=o=>{var e;return!!((e=o.textContent)!=null&&e.trim())||o.querySelector("img, svg, picture, video, canvas, object")!==null},Q=o=>!!o&&typeof o=="object"&&["label","logo","homepage"].some(e=>v(o[e]).length>0),x=o=>!!o&&typeof o.id=="string",W=o=>{var e;return(e=v(o.homepage).find(x))==null?void 0:e.id},Y=(o,e)=>{var s;if(!o)return null;for(const n of[o.label,(s=v(o.homepage).find(t=>t==null?void 0:t.label))==null?void 0:s.label]){const t=j(n,e);if(t.text)return{text:S(t.text),lang:t.lang}}return null};function E({of:o="manifest",value:e,link:s=true,children:n,className:t,...d}){var u;const a=P(f=>{var p;return(p=A(f,o))==null?void 0:p.provider},void 0),m=(u=w())==null?void 0:u.language,r=v(e!==void 0?e:a).filter(Q);return r.length?l("ul",{className:O("clover-provider",t),...d,children:r.map((f,p)=>{const g=s?W(f):void 0,i=!!j(f.label,m).text;return l(_,{agent:f,homepage:g,children:n??l(L,{children:[l(D,{alt:i?"":void 0}),l(T,{className:"clover-provider-label"})]})},f.id??p)})}):null}function _({agent:o,homepage:e,children:s}){const n=R(null),[t,d]=N(null),a=b(()=>{n.current&&!M(n.current)&&d(o)},[o]);return t===o?null:l("li",{className:"clover-provider-agent",children:l(F.Provider,{value:o,children:l(C.Provider,{value:a,children:e?l("a",{ref:n,href:e,className:"clover-provider-link",children:s}):l("span",{ref:n,className:"clover-provider-content",children:s})})})})}function D({of:o="manifest",value:e,alt:s,className:n,...t}){var g;const{t:d,langOf:a}=B(),m=$(),r=P(i=>{var c;return(c=A(i,o))==null?void 0:c.provider},void 0),u=(g=w())==null?void 0:g.language,p=(e!==void 0?v(e):m?[m]:v(r)).flatMap(i=>{if(!i||typeof i!="object")return[];const c=i;if(c.type!=="Agent"&&x(c)&&!c.logo)return[{image:c,agent:null}];const y=v(c.logo).find(x);return y?[{image:y,agent:c}]:[]});return p.length?l(L,{children:p.map(({image:i,agent:c},y)=>{const h=Y(c,u);return l(G,{src:i.id,alt:s??(h==null?void 0:h.text)??d("logo"),lang:s!==void 0?void 0:h?h.lang:a("logo"),width:i.width,height:i.height,loading:"lazy",decoding:"async",className:O("clover-logo",n),...t},`${i.id}-${y}`)})}):null}function G({alt:o,onError:e,...s}){const n=I(C),[t,d]=N(false),a=b(()=>d(true),[]);K(()=>{t&&(n==null||n())},[t,n]);const m=b(r=>{var u;r!=null&&r.complete&&!r.naturalWidth&&((u=r.decode)==null||u.call(r).catch(a))},[a]);return t?null:l("img",{ref:m,alt:o,onError:r=>{e==null||e(r),a()},...s})}export{D as L,E as P};
1
+ import{a as B,Y as P,K as w,j as v,u as l,k as L,o as j,x as I,Q as k,d as N,q as b,y as q,_ as z,A as R}from"./shared-YUjOSBKO.mjs";import{t as S}from"./text-BTAkxEfQ.mjs";import{j as O}from"./classnames-DukgfdpI.mjs";import{L as T}from"./Label-D6aVJB9s.mjs";import{u as $,r as A,P as F}from"./resource-DLHocQ1C.mjs";import"./styles-CyuM_fB1.mjs";const K=typeof window>"u"?q:z,C=k(null),M=o=>{var e;return!!((e=o.textContent)!=null&&e.trim())||o.querySelector("img, svg, picture, video, canvas, object")!==null},Q=o=>!!o&&typeof o=="object"&&["label","logo","homepage"].some(e=>v(o[e]).length>0),x=o=>!!o&&typeof o.id=="string",W=o=>{var e;return(e=v(o.homepage).find(x))==null?void 0:e.id},Y=(o,e)=>{var s;if(!o)return null;for(const n of[o.label,(s=v(o.homepage).find(t=>t==null?void 0:t.label))==null?void 0:s.label]){const t=j(n,e);if(t.text)return{text:S(t.text),lang:t.lang}}return null};function E({of:o="manifest",value:e,link:s=true,children:n,className:t,...d}){var u;const a=P(f=>{var p;return(p=A(f,o))==null?void 0:p.provider},void 0),m=(u=w())==null?void 0:u.language,r=v(e!==void 0?e:a).filter(Q);return r.length?l("ul",{className:O("clover-provider",t),...d,children:r.map((f,p)=>{const g=s?W(f):void 0,i=!!j(f.label,m).text;return l(_,{agent:f,homepage:g,children:n??l(L,{children:[l(D,{alt:i?"":void 0}),l(T,{className:"clover-provider-label"})]})},f.id??p)})}):null}function _({agent:o,homepage:e,children:s}){const n=R(null),[t,d]=N(null),a=b(()=>{n.current&&!M(n.current)&&d(o)},[o]);return t===o?null:l("li",{className:"clover-provider-agent",children:l(F.Provider,{value:o,children:l(C.Provider,{value:a,children:e?l("a",{ref:n,href:e,className:"clover-provider-link",children:s}):l("span",{ref:n,className:"clover-provider-content",children:s})})})})}function D({of:o="manifest",value:e,alt:s,className:n,...t}){var g;const{t:d,langOf:a}=B(),m=$(),r=P(i=>{var c;return(c=A(i,o))==null?void 0:c.provider},void 0),u=(g=w())==null?void 0:g.language,p=(e!==void 0?v(e):m?[m]:v(r)).flatMap(i=>{if(!i||typeof i!="object")return[];const c=i;if(c.type!=="Agent"&&x(c)&&!c.logo)return[{image:c,agent:null}];const y=v(c.logo).find(x);return y?[{image:y,agent:c}]:[]});return p.length?l(L,{children:p.map(({image:i,agent:c},y)=>{const h=Y(c,u);return l(G,{src:i.id,alt:s??(h==null?void 0:h.text)??d("logo"),lang:s!==void 0?void 0:h?h.lang:a("logo"),width:i.width,height:i.height,loading:"lazy",decoding:"async",className:O("clover-logo",n),...t},`${i.id}-${y}`)})}):null}function G({alt:o,onError:e,...s}){const n=I(C),[t,d]=N(false),a=b(()=>d(true),[]);K(()=>{t&&(n==null||n())},[t,n]);const m=b(r=>{var u;r!=null&&r.complete&&!r.naturalWidth&&((u=r.decode)==null||u.call(r).catch(a))},[a]);return t?null:l("img",{ref:m,alt:o,onError:r=>{e==null||e(r),a()},...s})}export{D as L,E as P};
@@ -1 +1 @@
1
- import{d as v,y as h,_ as R,a as L,M,A as O,b as w,R as p,u as g}from"./shared-J3w3gnXD.mjs";const E=typeof window>"u"?h:R;function C({children:s}){const{t:r}=L(),u=M(),i=O(null),m=w(),a=p.Children.only(s),e=a.props.id??m,{open:t,cut:c,toggle:o}=F(i);return g("div",{className:"clover-read-more",children:[p.cloneElement(a,{ref:i,id:e,"data-read-more":t?"open":""}),(c||t)&&g("button",{type:"button",className:"clover-read-more-button","aria-expanded":t,"aria-controls":e,onClick:o,ref:u.ref,lang:u.langOf(t?"readLess":"readMore"),children:r(t?"readLess":"readMore")})]})}function F(s){const[r,u]=v(false),[i,m]=v(false),a=()=>{const e=s.current;e&&!r&&m(e.scrollHeight>e.clientHeight+1)};return E(a),h(()=>{var l,f;const e=s.current;if(!e)return;let t=0;const c=()=>{cancelAnimationFrame(t),t=requestAnimationFrame(a)},o=typeof ResizeObserver>"u"?null:new ResizeObserver(a);o==null||o.observe(e);const n=typeof MutationObserver>"u"?null:new MutationObserver(c);return n==null||n.observe(document.head,{childList:true,subtree:true,characterData:true}),n==null||n.observe(document.documentElement,{attributes:true,attributeFilter:["style","class"]}),n==null||n.observe(e,{attributes:true,attributeFilter:["style"]}),(f=(l=document.fonts)==null?void 0:l.addEventListener)==null||f.call(l,"loadingdone",c),()=>{var d,b;cancelAnimationFrame(t),o==null||o.disconnect(),n==null||n.disconnect(),(b=(d=document.fonts)==null?void 0:d.removeEventListener)==null||b.call(d,"loadingdone",c)}},[r,s.current]),{open:r,cut:i,toggle:()=>u(e=>!e)}}export{C as R,F as u};
1
+ import{d as v,y as h,_ as R,a as L,M,A as O,b as w,R as p,u as g}from"./shared-YUjOSBKO.mjs";const E=typeof window>"u"?h:R;function C({children:s}){const{t:r}=L(),u=M(),i=O(null),m=w(),c=p.Children.only(s),e=c.props.id??m,{open:t,cut:a,toggle:o}=F(i);return g("div",{className:"clover-read-more",children:[p.cloneElement(c,{ref:i,id:e,"data-read-more":t?"open":""}),(a||t)&&g("button",{type:"button",className:"clover-read-more-button","aria-expanded":t,"aria-controls":e,onClick:o,ref:u.ref,lang:u.langOf(t?"readLess":"readMore"),children:r(t?"readLess":"readMore")})]})}function F(s){const[r,u]=v(false),[i,m]=v(false),c=()=>{const e=s.current;e&&!r&&m(e.scrollHeight>e.clientHeight+1)};return E(c),h(()=>{var l,f;const e=s.current;if(!e)return;let t=0;const a=()=>{cancelAnimationFrame(t),t=requestAnimationFrame(c)},o=typeof ResizeObserver>"u"?null:new ResizeObserver(a);o==null||o.observe(e);const n=typeof MutationObserver>"u"?null:new MutationObserver(a);return n==null||n.observe(document.head,{childList:true,subtree:true,characterData:true}),n==null||n.observe(document.documentElement,{attributes:true,attributeFilter:["style","class"]}),n==null||n.observe(e,{attributes:true,attributeFilter:["style"]}),(f=(l=document.fonts)==null?void 0:l.addEventListener)==null||f.call(l,"loadingdone",a),()=>{var d,b;cancelAnimationFrame(t),o==null||o.disconnect(),n==null||n.disconnect(),(b=(d=document.fonts)==null?void 0:d.removeEventListener)==null||b.call(d,"loadingdone",a)}},[r,s.current]),{open:r,cut:i,toggle:()=>u(e=>!e)}}export{C as R,F as u};
@@ -1 +1 @@
1
- import{D as g,a6 as i,M as v,u as o,N as d,a7 as f,a8 as m}from"./shared-J3w3gnXD.mjs";import{j as R}from"./classnames-DukgfdpI.mjs";const C=g(function({as:r="div",className:n,children:s,...u},c){const[a,l,t]=i(u),e=v(c,t.lang);return o(m.Provider,{value:a,children:o(d.Provider,{value:e.hostLanguage,children:o(r,{ref:e.ref,className:R("clover-root",n),"data-status":l,...t,children:[s,o(f,{clover:a.clover,language:a.language})]})})})});export{C as R};
1
+ import{D as g,a6 as i,M as v,u as o,N as d,a7 as f,a8 as m}from"./shared-YUjOSBKO.mjs";import{j as R}from"./classnames-DukgfdpI.mjs";const C=g(function({as:r="div",className:n,children:s,...u},c){const[a,l,t]=i(u),e=v(c,t.lang);return o(m.Provider,{value:a,children:o(d.Provider,{value:e.hostLanguage,children:o(r,{ref:e.ref,className:R("clover-root",n),"data-status":l,...t,children:[s,o(f,{clover:a.clover,language:a.language})]})})})});export{C as R};
@@ -0,0 +1 @@
1
+ import{K as r,u as e,z as o,P as t}from"./shared-YUjOSBKO.mjs";import{S as a}from"./SceneView-BYo7WmPt.mjs";import{C as i}from"./Pending-BPOQ2z1L.mjs";const l=o(()=>import("./Connected-DkhfVWxd.mjs")),f=o(()=>import("./Loaded-D5xmFRSo.mjs"));function s(n){const c=r();return n.iiifContent!==void 0&&n.scene===void 0?e(t,{fallback:e(i,{}),children:e(f,{...n})}):n.scene?e(a,{...n}):c?e(t,{fallback:e(i,{}),children:e(l,{...n})}):null}export{s as Scene,s as default};
@@ -1 +1 @@
1
- import{u as r,A as b,y as z,R as Ae,a as Be,d as Q,M as Ze,b as _e,ad as je,q as P,T as Ye,o as Le,v as Ve,N as We}from"./shared-J3w3gnXD.mjs";import{i as Ge,T as Xe,r as fe,E as Je,j as Qe,u as et,k as tt,p as rt,l as ot,m as nt,g as at,n as ct,C as st,o as it,Z as lt,d as ut,t as dt,e as ft,f as vt}from"./ErrorBoundary-Cy9PGoZv.mjs";import{s as pt,a as mt,h as gt,t as ht,z as bt,b as wt}from"./models-BP2qp9nT.mjs";import{B as yt}from"./BodyAlert-BP8voSLv.mjs";import{I as kt}from"./glyphs-BoX0a88P.mjs";import{u as xt}from"./useNearViewport-CyoK3l8W.mjs";import{j as Lt}from"./classnames-DukgfdpI.mjs";import{c as Ot,r as It}from"./contexts-ByL3eA_T.mjs";import{B as Rt}from"./Button-Cl02BFDd.mjs";import{L as Mt}from"./Loading-BmA--pzr.mjs";import{S,f as Ct}from"./Tip-C8J3qsIK.mjs";import{u as Oe}from"./useContainerName-DCbE5JXi.mjs";import{e as At}from"./engines-BwVb9R_A.mjs";import"./styles-Ypl9KrSK.mjs";import{a as Et}from"./index-DWxMuwDL.mjs";const Ie=2*Math.PI,St=.01,Ft=t=>t.deltaMode===1?t.deltaY*16:t.deltaMode===2?t.deltaY*400:t.deltaY;function Ee(t,u,d=()=>t.clientHeight){const n=new Map;let l=0,f=false,i={x:0,y:0};const I=()=>{const[a,s]=[...n.values()];return a&&s?Math.hypot(a.x-s.x,a.y-s.y):0},k=a=>{if(!(a.pointerType==="mouse"&&a.button!==0)&&!Ge(a.target,t)){n.set(a.pointerId,{x:a.clientX,y:a.clientY});try{t.setPointerCapture(a.pointerId)}catch{}n.size===1&&(f=false,i={x:a.clientX,y:a.clientY}),n.size===2&&(l=I())}},M=a=>{const s=n.get(a.pointerId);if(!s)return;const p={x:a.clientX,y:a.clientY};if(n.set(a.pointerId,p),n.size===2){const m=I();l>0&&m>0&&u.zoom(m/l),l=m;return}if(!f){if(Math.hypot(p.x-i.x,p.y-i.y)<Xe)return;f=true}const A=d()||1;u.turn(-(p.x-s.x)/A*Ie,-(p.y-s.y)/A*Ie)},v=a=>{n.delete(a.pointerId),l=n.size===2?I():0},x=a=>{a.ctrlKey&&(a.preventDefault(),u.zoom(Math.exp(-Ft(a)*St)))};return t.addEventListener("pointerdown",k),t.addEventListener("pointermove",M),t.addEventListener("pointerup",v),t.addEventListener("pointercancel",v),t.addEventListener("wheel",x,{passive:false}),()=>{t.removeEventListener("pointerdown",k),t.removeEventListener("pointermove",M),t.removeEventListener("pointerup",v),t.removeEventListener("pointercancel",v),t.removeEventListener("wheel",x)}}const Re={rotateUp:{place:"up",rate:[0,Math.PI/6]},rotateLeft:{place:"left",rate:[Math.PI/2,0]},rotateRight:{place:"right",rate:[-Math.PI/2,0]},rotateDown:{place:"down",rate:[0,-Math.PI/6]}},Pt=400,ee=({rotate:t})=>r("path",{fill:"none",strokeWidth:"64",strokeLinecap:"round",strokeLinejoin:"round",d:"M192 96l160 160-160 160",transform:`rotate(${t} 256 256)`}),q=236,Z=t=>t.toFixed(1);function te(t,u,d,n){const[l,f]=d?[`256 ${Z(256-u)}`,`256 ${Z(256+u)}`]:[`${Z(256-t)} 256`,`${Z(256+t)} 256`];return`M${l}A${Z(t)} ${Z(u)} 0 0 ${n} ${f}`}function Se({theta:t,phi:u}){const d=Math.PI/2-u,n=Math.max(1,q*Math.abs(Math.sin(d))),l=Math.max(1,q*Math.abs(Math.sin(t))),f=d>=0,i=Math.sin(2*t)<0;return{equator:{front:te(q,n,false,f?0:1),back:te(q,n,false,f?1:0)},meridian:{front:te(l,q,true,i?1:0),back:te(l,q,true,i?0:1)},x:256-q*Math.sin(t),y:256+(f?1:-1)*n*Math.cos(t),facing:Math.cos(t)>0}}function Me(t,u){const[d,n,l,f,i]=(t==null?void 0:t.children)??[];if(!i)return;const{equator:I,meridian:k,x:M,y:v,facing:x}=Se(u);d.setAttribute("d",I.front),n.setAttribute("d",I.back),l.setAttribute("d",k.front),f.setAttribute("d",k.back),i.setAttribute("cx",M.toFixed(1)),i.setAttribute("cy",v.toFixed(1)),i.setAttribute("fill",x?"currentColor":"none"),i.setAttribute("opacity",x?"1":String(ve))}const ve=.3,zt=Ae.forwardRef(function(u,d){const n=Se({theta:0,phi:75*Math.PI/180});return r("g",{ref:d,fill:"none",strokeWidth:"14",strokeLinecap:"round",children:[r("path",{d:n.equator.front}),r("path",{d:n.equator.back,strokeOpacity:ve}),r("path",{d:n.meridian.front}),r("path",{d:n.meridian.back,strokeOpacity:ve}),r("circle",{cx:n.x.toFixed(1),cy:n.y.toFixed(1),r:"34",fill:"currentColor"})]})});function Tt({controls:t,controlButtons:u,turn:d,zoom:n,span:l,indicator:f,name:i}){const I=b(null),k=b(false),M=b(d);M.current=d;const v=b(n);v.current=n;const x=b(null),a=!!(t.rotateUp||t.rotateLeft||t.rotateRight||t.rotateDown);z(()=>{const m=x.current;if(m)return Ee(m,{turn:(w,g)=>M.current(w,g),zoom:w=>v.current(w)},l)},[l,a]);const s=m=>{const w=I.current;w&&(window.clearTimeout(w.timer),cancelAnimationFrame(w.frame),I.current=null,w.held&&m&&(k.current=true))};z(()=>()=>s(false),[]);const p=(m,w)=>{if(m.button>0)return;s(false),k.current=false;const[g,pe]=Re[w].rate,L={timer:0,frame:0,held:false};L.timer=window.setTimeout(()=>{L.held=true;let y=performance.now();const j=Y=>{const V=Math.min(.1,Math.max(0,Y-y)/1e3);y=Y,M.current(g*V,pe*V),L.frame=requestAnimationFrame(j)};L.frame=requestAnimationFrame(j)},Pt),I.current=L},A=m=>{const w=t[m];return w?r("span",{className:"clover-scene-rotate-cell","data-place":Re[m].place,onPointerDown:g=>p(g,m),onPointerUp:()=>s(true),onPointerLeave:()=>s(false),onPointerCancel:()=>s(false),onKeyDown:g=>{g.repeat&&g.key==="Enter"&&g.preventDefault()},onClickCapture:g=>{k.current&&g.detail>0&&(g.stopPropagation(),g.preventDefault()),k.current=false},children:fe(w,u)},m):null};return r("div",{className:"clover-scene-rotate",role:"group",...i.props,"data-testid":"clover-scene-rotate",children:[i.node,a&&r("span",{ref:x,className:"clover-scene-rotate-disc","aria-hidden":"true","data-testid":"clover-scene-rotate-disc",children:r("svg",{viewBox:"0 0 512 512",width:"16",height:"16",focusable:"false",children:r(zt,{ref:f})})}),A("rotateUp"),A("rotateLeft"),A("rotateRight"),A("rotateDown"),t.reset&&r("span",{className:"clover-scene-rotate-cell","data-place":"corner",children:fe(t.reset,u)})]})}Et(13,"components/Scene/Scene",'@layer clover{.clover-scene>.clover-scene-navigation{position:absolute;right:var(--clover-canvas-controls-inset);bottom:var(--clover-canvas-controls-inset);z-index:3;display:flex;align-items:flex-end;pointer-events:none;touch-action:none;-webkit-touch-callout:none;user-select:none;-webkit-user-select:none;opacity:var(--clover-controls-shown);translate:0 calc((1 - var(--clover-controls-shown)) * var(--clover-controls-tuck));transition:all var(--clover-controls-timing)}.clover-scene-navigation :is(button,.clover-scene-rotate-disc){pointer-events:var(--clover-controls-events)}.clover-scene:has(>.clover-scene-navigation :is(button,.clover-scene-rotate-disc):hover){--clover-controls-shown: 1;--clover-controls-events: auto;--clover-controls-timing: var(--clover-controls-enter)}.clover-scene:has(>.clover-scene-navigation)>.clover-canvas-viewport:before{position:absolute;inset:auto 0 0;height:calc(3 * var(--clover-control) + 2 * var(--clover-space-s) + 2 * var(--clover-canvas-controls-inset));background:linear-gradient(to top,#00000073,#0003 45%,#0000);opacity:var(--clover-controls-shown);transition:opacity var(--clover-controls-timing);pointer-events:none;content:""}.clover-scene>.clover-scene-navigation[data-compact]{--clover-control: max(1.5rem, 24px)}.clover-scene-tools{display:flex;gap:var(--clover-space-s);margin-inline-end:calc(-1 * var(--clover-control))}.clover-scene-rotate{position:relative;display:grid;grid-template-columns:repeat(3,var(--clover-control));grid-template-rows:repeat(3,var(--clover-control));gap:var(--clover-space-s);--clover-scene-rotate-rim: calc( .756 * var(--clover-control) + .874 * var(--clover-space-s) )}.clover-scene-rotate-disc{position:absolute;top:50%;left:50%;width:calc(2 * var(--clover-scene-rotate-rim));height:calc(2 * var(--clover-scene-rotate-rim));translate:-50% -50%;display:flex;align-items:center;justify-content:center;border-radius:50%;background-color:var(--clover-color-accent, #0065c3);background-image:radial-gradient(circle at 34% 30%,#ffffff24 0,#fff0 24%),radial-gradient(circle at 34% 30%,color-mix(in srgb,var(--clover-color-accent, #0065c3) 84%,#fff) 0,var(--clover-color-accent, #0065c3) 48%,color-mix(in srgb,var(--clover-color-accent, #0065c3) 62%,#000) 100%);box-shadow:0 .236rem .618rem #00000038;color:var(--clover-color-control-glyph, #fff);cursor:grab;isolation:isolate;transition:scale .2s ease}.clover-scene-rotate-disc:active{cursor:grabbing}.clover-scene-rotate-disc:before{position:absolute;inset:0;z-index:-1;border-radius:inherit;background:color-mix(in srgb,#fff 16%,transparent);opacity:0;transition:opacity .2s ease;content:""}.clover-scene-rotate-disc:is(:hover,:active):before,.clover-scene-rotate:has(:focus-visible) .clover-scene-rotate-disc:before,.clover-scene-navigation[data-turning] .clover-scene-rotate-disc:before{opacity:1}.clover-scene-rotate-disc:is(:hover,:active),.clover-scene-rotate:has(:focus-visible) .clover-scene-rotate-disc,.clover-scene-navigation[data-turning] .clover-scene-rotate-disc{scale:1.06}@media (prefers-reduced-motion: reduce){.clover-scene-rotate-disc{transition:none}}@media (forced-colors: active){.clover-scene-rotate-disc{border:1px solid CanvasText}}.clover-scene-rotate-disc svg{width:100%;height:100%;fill:currentColor;stroke:currentColor;-webkit-mask-image:radial-gradient(circle closest-side,#000 45%,transparent 90%);mask-image:radial-gradient(circle closest-side,#000 45%,transparent 90%)}.clover-scene-rotate-cell{position:relative;z-index:1;display:flex}.clover-scene-rotate-cell[data-place=up]{grid-area:1 / 2}.clover-scene-rotate-cell[data-place=left]{grid-area:2 / 1}.clover-scene-rotate-cell[data-place=corner]{grid-area:3 / 3}.clover-scene-rotate-cell[data-place=right]{grid-area:2 / 3}.clover-scene-rotate-cell[data-place=down]{grid-area:3 / 2}.clover-scene .clover-scene-navigation .clover-scene-rotate-cell:not([data-place=corner]) button.clover-canvas-button svg{scale:none;rotate:none}.clover-scene>.clover-scene-error{position:absolute;inset:auto var(--clover-canvas-controls-inset) var(--clover-canvas-controls-inset);z-index:2;background-color:var(--clover-color-secondary, #fff);border-radius:var(--clover-radius, 3px)}}');const Ce={zoom:true,fullPage:true,rotation:true,reset:true,information:true},_=Math.PI/4,re=Math.PI/12,Dt=_/2,oe=1.5,Nt=["ArrowLeft ArrowRight ArrowUp ArrowDown",S.rotateRight.keys,S.rotateLeft.keys,S.zoomIn.keys,S.zoomOut.keys,S.reset.keys].join(" ");function er(t){return t.scene?r(Je,{children:r($t,{...t,scene:t.scene})}):null}function $t({scene:t,label:u,language:d,className:n,controls:l=true,controlButtons:f,options:i,manifestId:I,engine:k="clover",children:M}){const{t:v}=Be(),[x,a]=Q(null),s=Ze(a),p=b(null),A=Qe(x),m=et(),w=tt(x,i==null?void 0:i.hideDelay,p),g=xt(x),L=`clover-scene-${_e()}`,y=l===false?null:l===true?Ce:{...Ce,...l},j=pt(t),Y=mt(t),V=i==null?void 0:i.request,me=JSON.stringify([t.id,j,je(V),k]),ge=I==="loading",[F,T]=Q({state:"waiting"}),D=b(null),ne=b(null),E=b(null),h=b(null),N=b(0),[Fe,Pe]=Q(0),G=b({hiddenSince:null,release:()=>{}}),X=b(false),ae=b(null),ce=b(null),ze=rt(x),H=P(()=>{N.current||!D.current||(N.current=requestAnimationFrame(()=>{var e;N.current=0,h.current&&((e=D.current)==null||e.draw(h.current),Me(ce.current,h.current))}))},[]),U=P(()=>{const e=p.current,o=e&&e.clientHeight?e.clientWidth/e.clientHeight:1;return ne.current?gt(ne.current,o):null},[]),J=P(e=>{!h.current||!E.current||(h.current=e(h.current,E.current),H())},[H]),se=b(0),O=P((e,o)=>{J(R=>ht(R,e,o));const c=ae.current;c&&(c.setAttribute("data-turning",""),window.clearTimeout(se.current),se.current=window.setTimeout(()=>c.removeAttribute("data-turning"),400))},[J]);z(()=>()=>window.clearTimeout(se.current),[]);const $=P(e=>J((o,c)=>bt(o,e,c)),[J]),Te=P(()=>{var e;return((e=p.current)==null?void 0:e.clientHeight)??0},[]),he=P(()=>{E.current=U(),h.current=E.current,H()},[U,H]);z(()=>{const e=p.current;if(!e||!g)return;if(ge){T({state:"loading"});return}let o=true,c=null;const R=()=>{cancelAnimationFrame(N.current),N.current=0,c==null||c.dispose(),c=null,D.current=null,It(G.current)};return G.current.release=()=>{R(),X.current=true,o&&T({state:"waiting"})},X.current=false,Ot(G.current)?(T({state:"loading"}),At(k)().then(({createEngine:C})=>{if(o)return c=C(e,{onLost:()=>{R(),o&&T({state:"error",error:new Error("The browser took back the 3D view's graphics.")})}}),D.current=c,c.load(j,V).then(Ue=>{o&&(ne.current=Ue,E.current=U(),h.current??(h.current=E.current),T({state:"ready"}),H())})}).catch(C=>{o&&(R(),T({state:"error",error:C instanceof Error?C:new Error(String(C))}))}),()=>{o=false,R()}):(X.current=true,T({state:"waiting"}),()=>{o=false})},[me,ge,g,Fe,U,H]),z(()=>{h.current=null},[me]),z(()=>{const e=p.current;if(!e||typeof IntersectionObserver>"u")return;const o=new IntersectionObserver(([c])=>{G.current.hiddenSince=c!=null&&c.isIntersecting?null:performance.now(),c!=null&&c.isIntersecting&&X.current&&Pe(R=>R+1)});return o.observe(e),()=>o.disconnect()},[]),z(()=>{const e=p.current;if(!e||typeof ResizeObserver>"u")return;const o=new ResizeObserver(()=>{var C;const c=parseFloat(getComputedStyle(document.documentElement).fontSize)||16;if((C=ae.current)==null||C.toggleAttribute("data-compact",e.clientWidth<32*c||e.clientHeight<24*c),!D.current)return;D.current.resize();const R=h.current&&E.current&&wt(h.current,E.current);E.current=U(),R&&(h.current=E.current),cancelAnimationFrame(N.current),N.current=0,h.current&&(D.current.draw(h.current),Me(ce.current,h.current))});return o.observe(e),()=>o.disconnect()},[U]),z(()=>{const e=p.current;if(!(!e||F.state!=="ready"))return Ee(e,{turn:O,zoom:$})},[F.state,O,$]);const De=e=>{if(e.target!==e.currentTarget||e.altKey||e.metaKey||e.ctrlKey)return;const o=e.shiftKey?_:Dt,c=e.shiftKey?2*re:re;switch(e.key){case"ArrowLeft":O(o,0);break;case"ArrowRight":O(-o,0);break;case"ArrowUp":O(0,c);break;case"ArrowDown":O(0,-c);break;case"r":O(-_,0);break;case"R":O(_,0);break;case"+":case"=":$(oe);break;case"-":case"_":$(1/oe);break;case"0":he();break;default:return}e.preventDefault()},ie=`caption-${L}`,B=Ye(()=>y!=null&&y.information&&ot(t)?[t]:[],[y==null?void 0:y.information,t]),[Ne,be]=Q(false),le=Ne&&B.length>0,we=P(e=>{var o;be(false),e&&((o=document.getElementById(`information-${L}`))==null||o.focus())},[L]),$e=B.length&&Le(t.label,d).text?nt(ie,0):void 0,W=[u,t.label].map(e=>Le(e,d)).find(e=>e.text),ye=Oe((W==null?void 0:W.text)||v("sceneModel"),W?W.lang:s.langOf("sceneModel"),false,s.hostLanguage),ke=`keys-${L}`,Ke=s.langOf("sceneRoleDescription")?void 0:v("sceneRoleDescription"),K=(e,o,c,R,C)=>({key:e,id:`${e}-${L}`,label:v(o),lang:s.langOf(o),glyph:c,onClick:R,...C?{shortcut:C}:{}}),qe=e=>y?[...y.zoom?[K("zoomIn","imageZoomIn",r(lt,{}),()=>$(oe),S.zoomIn),K("zoomOut","imageZoomOut",r(ut,{}),()=>$(1/oe),S.zoomOut)]:[],...y.fullPage&&m?[{key:"fullPage",id:`fullPage-${L}`,label:v(e?"imageExitFullScreen":"imageFullScreen"),lang:s.langOf(e?"imageExitFullScreen":"imageFullScreen"),glyph:e?r(ft,{}):r(vt,{}),onClick:o=>void dt(o.currentTarget)}]:[]]:[],He=Oe(v("sceneRotate"),s.langOf("sceneRotate"),false,s.hostLanguage),ue=y?{...y.rotation&&{rotateUp:K("rotateUp","sceneRotateUp",r(ee,{rotate:-90}),()=>O(0,re)),rotateLeft:K("rotateLeft","imageRotateLeft",r(ee,{rotate:180}),()=>O(_,0),S.rotateLeft),rotateRight:K("rotateRight","imageRotateRight",r(ee,{rotate:0}),()=>O(-_,0),S.rotateRight),rotateDown:K("rotateDown","sceneRotateDown",r(ee,{rotate:90}),()=>O(0,-re))},...y.reset&&{reset:K("reset","sceneResetView",r(at,{}),he,S.reset)}}:{},de=qe(ze),xe=F.state==="loading"||F.state==="waiting"&&g;return r(We.Provider,{value:s.hostLanguage,children:r("figure",{"aria-labelledby":$e,className:Lt("clover-canvas","clover-scene",n),"data-testid":"clover-scene","data-status":F.state==="ready"?"ready":F.state==="error"?"error":"loading","data-fullscreen":A,"data-controls":w?"visible":"hidden","data-navigable":"true",ref:s.ref,onKeyDown:e=>{if(e.key==="Escape"&&le&&!e.defaultPrevented){e.preventDefault(),we(false);return}Ct(e,p.current)},style:{position:"relative",width:"100%",height:"100%",margin:0,overflow:"hidden",isolation:"isolate"},children:[r(ct,{hidden:!A}),(B.length>0||Ae.Children.count(M)>0)&&r(st,{controls:()=>[],controlButtons:f,children:[B.length>0&&r(Rt,{id:`information-${L}`,label:v("informationPanelTabsAbout"),lang:s.langOf("informationPanelTabsAbout"),onClick:()=>be(e=>!e),expanded:le,controls:ie,children:r(kt,{})}),M]}),(de.length>0||Object.keys(ue).length>0)&&r("div",{ref:ae,className:"clover-scene-navigation",children:[de.length>0&&r("div",{className:"clover-scene-tools",children:de.map(e=>fe(e,f))}),Object.keys(ue).length>0&&r(Tt,{controls:ue,controlButtons:f,turn:O,zoom:$,span:Te,indicator:ce,name:He})]}),r("div",{ref:p,className:"clover-canvas-viewport",style:{position:"absolute",inset:0,overflow:"hidden",zIndex:-1,...Y?{backgroundColor:Y}:{}},"data-testid":"clover-scene-viewport",role:"img","aria-roledescription":Ke,...ye.props,"aria-describedby":ke,"aria-keyshortcuts":Nt,"aria-busy":xe,tabIndex:0,onKeyDown:De}),ye.node,r("span",{id:ke,style:Ve,lang:s.langOf("sceneKeys"),children:v("sceneKeys")}),F.state==="error"&&r(yt,{error:F.error,className:"clover-scene-error"}),xe&&r(Mt,{overlay:true}),B.length>0&&r(it,{id:ie,canvases:B,open:le,onClose:we,language:d})]})})}export{er as S};
1
+ import{u as r,A as b,y as z,R as Ae,a as Be,d as Q,M as Ze,b as _e,ad as je,q as P,T as Ye,o as Le,v as Ve,N as We}from"./shared-YUjOSBKO.mjs";import{i as Ge,T as Xe,r as fe,E as Je,j as Qe,u as et,k as tt,p as rt,l as ot,m as nt,g as at,n as ct,C as st,o as it,Z as lt,d as ut,t as dt,e as ft,f as vt}from"./ErrorBoundary-chQaO-Up.mjs";import{s as pt,a as mt,h as gt,t as ht,z as bt,b as wt}from"./models-D1EE_CmH.mjs";import{B as yt}from"./BodyAlert-C8EOXz24.mjs";import{I as kt}from"./glyphs-drROkef9.mjs";import{u as xt}from"./useNearViewport-CtLyYg9n.mjs";import{j as Lt}from"./classnames-DukgfdpI.mjs";import{c as Ot,r as It}from"./contexts-ByL3eA_T.mjs";import{B as Rt}from"./Button-uWgfvqsL.mjs";import{L as Mt}from"./Loading-CBKfwsML.mjs";import{S,f as Ct}from"./Tip-IO11xX4x.mjs";import{u as Oe}from"./useContainerName-BpJ3IWY0.mjs";import{e as At}from"./engines-CC0OEsVE.mjs";import"./styles-CyuM_fB1.mjs";import{a as Et}from"./index-B7nZdqLg.mjs";const Ie=2*Math.PI,St=.01,Ft=t=>t.deltaMode===1?t.deltaY*16:t.deltaMode===2?t.deltaY*400:t.deltaY;function Ee(t,u,d=()=>t.clientHeight){const n=new Map;let l=0,f=false,i={x:0,y:0};const I=()=>{const[a,s]=[...n.values()];return a&&s?Math.hypot(a.x-s.x,a.y-s.y):0},k=a=>{if(!(a.pointerType==="mouse"&&a.button!==0)&&!Ge(a.target,t)){n.set(a.pointerId,{x:a.clientX,y:a.clientY});try{t.setPointerCapture(a.pointerId)}catch{}n.size===1&&(f=false,i={x:a.clientX,y:a.clientY}),n.size===2&&(l=I())}},M=a=>{const s=n.get(a.pointerId);if(!s)return;const p={x:a.clientX,y:a.clientY};if(n.set(a.pointerId,p),n.size===2){const m=I();l>0&&m>0&&u.zoom(m/l),l=m;return}if(!f){if(Math.hypot(p.x-i.x,p.y-i.y)<Xe)return;f=true}const A=d()||1;u.turn(-(p.x-s.x)/A*Ie,-(p.y-s.y)/A*Ie)},v=a=>{n.delete(a.pointerId),l=n.size===2?I():0},x=a=>{a.ctrlKey&&(a.preventDefault(),u.zoom(Math.exp(-Ft(a)*St)))};return t.addEventListener("pointerdown",k),t.addEventListener("pointermove",M),t.addEventListener("pointerup",v),t.addEventListener("pointercancel",v),t.addEventListener("wheel",x,{passive:false}),()=>{t.removeEventListener("pointerdown",k),t.removeEventListener("pointermove",M),t.removeEventListener("pointerup",v),t.removeEventListener("pointercancel",v),t.removeEventListener("wheel",x)}}const Re={rotateUp:{place:"up",rate:[0,Math.PI/6]},rotateLeft:{place:"left",rate:[Math.PI/2,0]},rotateRight:{place:"right",rate:[-Math.PI/2,0]},rotateDown:{place:"down",rate:[0,-Math.PI/6]}},Pt=400,ee=({rotate:t})=>r("path",{fill:"none",strokeWidth:"64",strokeLinecap:"round",strokeLinejoin:"round",d:"M192 96l160 160-160 160",transform:`rotate(${t} 256 256)`}),q=236,Z=t=>t.toFixed(1);function te(t,u,d,n){const[l,f]=d?[`256 ${Z(256-u)}`,`256 ${Z(256+u)}`]:[`${Z(256-t)} 256`,`${Z(256+t)} 256`];return`M${l}A${Z(t)} ${Z(u)} 0 0 ${n} ${f}`}function Se({theta:t,phi:u}){const d=Math.PI/2-u,n=Math.max(1,q*Math.abs(Math.sin(d))),l=Math.max(1,q*Math.abs(Math.sin(t))),f=d>=0,i=Math.sin(2*t)<0;return{equator:{front:te(q,n,false,f?0:1),back:te(q,n,false,f?1:0)},meridian:{front:te(l,q,true,i?1:0),back:te(l,q,true,i?0:1)},x:256-q*Math.sin(t),y:256+(f?1:-1)*n*Math.cos(t),facing:Math.cos(t)>0}}function Me(t,u){const[d,n,l,f,i]=(t==null?void 0:t.children)??[];if(!i)return;const{equator:I,meridian:k,x:M,y:v,facing:x}=Se(u);d.setAttribute("d",I.front),n.setAttribute("d",I.back),l.setAttribute("d",k.front),f.setAttribute("d",k.back),i.setAttribute("cx",M.toFixed(1)),i.setAttribute("cy",v.toFixed(1)),i.setAttribute("fill",x?"currentColor":"none"),i.setAttribute("opacity",x?"1":String(ve))}const ve=.3,zt=Ae.forwardRef(function(u,d){const n=Se({theta:0,phi:75*Math.PI/180});return r("g",{ref:d,fill:"none",strokeWidth:"14",strokeLinecap:"round",children:[r("path",{d:n.equator.front}),r("path",{d:n.equator.back,strokeOpacity:ve}),r("path",{d:n.meridian.front}),r("path",{d:n.meridian.back,strokeOpacity:ve}),r("circle",{cx:n.x.toFixed(1),cy:n.y.toFixed(1),r:"34",fill:"currentColor"})]})});function Tt({controls:t,controlButtons:u,turn:d,zoom:n,span:l,indicator:f,name:i}){const I=b(null),k=b(false),M=b(d);M.current=d;const v=b(n);v.current=n;const x=b(null),a=!!(t.rotateUp||t.rotateLeft||t.rotateRight||t.rotateDown);z(()=>{const m=x.current;if(m)return Ee(m,{turn:(w,g)=>M.current(w,g),zoom:w=>v.current(w)},l)},[l,a]);const s=m=>{const w=I.current;w&&(window.clearTimeout(w.timer),cancelAnimationFrame(w.frame),I.current=null,w.held&&m&&(k.current=true))};z(()=>()=>s(false),[]);const p=(m,w)=>{if(m.button>0)return;s(false),k.current=false;const[g,pe]=Re[w].rate,L={timer:0,frame:0,held:false};L.timer=window.setTimeout(()=>{L.held=true;let y=performance.now();const j=Y=>{const V=Math.min(.1,Math.max(0,Y-y)/1e3);y=Y,M.current(g*V,pe*V),L.frame=requestAnimationFrame(j)};L.frame=requestAnimationFrame(j)},Pt),I.current=L},A=m=>{const w=t[m];return w?r("span",{className:"clover-scene-rotate-cell","data-place":Re[m].place,onPointerDown:g=>p(g,m),onPointerUp:()=>s(true),onPointerLeave:()=>s(false),onPointerCancel:()=>s(false),onKeyDown:g=>{g.repeat&&g.key==="Enter"&&g.preventDefault()},onClickCapture:g=>{k.current&&g.detail>0&&(g.stopPropagation(),g.preventDefault()),k.current=false},children:fe(w,u)},m):null};return r("div",{className:"clover-scene-rotate",role:"group",...i.props,"data-testid":"clover-scene-rotate",children:[i.node,a&&r("span",{ref:x,className:"clover-scene-rotate-disc","aria-hidden":"true","data-testid":"clover-scene-rotate-disc",children:r("svg",{viewBox:"0 0 512 512",width:"16",height:"16",focusable:"false",children:r(zt,{ref:f})})}),A("rotateUp"),A("rotateLeft"),A("rotateRight"),A("rotateDown"),t.reset&&r("span",{className:"clover-scene-rotate-cell","data-place":"corner",children:fe(t.reset,u)})]})}Et(13,"components/Scene/Scene",'@layer clover{.clover-scene>.clover-scene-navigation{position:absolute;right:var(--clover-canvas-controls-inset);bottom:var(--clover-canvas-controls-inset);z-index:3;display:flex;align-items:flex-end;pointer-events:none;touch-action:none;-webkit-touch-callout:none;user-select:none;-webkit-user-select:none;opacity:var(--clover-controls-shown);translate:0 calc((1 - var(--clover-controls-shown)) * var(--clover-controls-tuck));transition:all var(--clover-controls-timing)}.clover-scene-navigation :is(button,.clover-scene-rotate-disc){pointer-events:var(--clover-controls-events)}.clover-scene:has(>.clover-scene-navigation :is(button,.clover-scene-rotate-disc):hover){--clover-controls-shown: 1;--clover-controls-events: auto;--clover-controls-timing: var(--clover-controls-enter)}.clover-scene:has(>.clover-scene-navigation)>.clover-canvas-viewport:before{position:absolute;inset:auto 0 0;height:calc(3 * var(--clover-control) + 2 * var(--clover-space-s) + 2 * var(--clover-canvas-controls-inset));background:linear-gradient(to top,#00000073,#0003 45%,#0000);opacity:var(--clover-controls-shown);transition:opacity var(--clover-controls-timing);pointer-events:none;content:""}.clover-scene>.clover-scene-navigation[data-compact]{--clover-control: max(1.5rem, 24px)}.clover-scene-tools{display:flex;gap:var(--clover-space-s);margin-inline-end:calc(-1 * var(--clover-control))}.clover-scene-rotate{position:relative;display:grid;grid-template-columns:repeat(3,var(--clover-control));grid-template-rows:repeat(3,var(--clover-control));gap:var(--clover-space-s);--clover-scene-rotate-rim: calc( .756 * var(--clover-control) + .874 * var(--clover-space-s) )}.clover-scene-rotate-disc{position:absolute;top:50%;left:50%;width:calc(2 * var(--clover-scene-rotate-rim));height:calc(2 * var(--clover-scene-rotate-rim));translate:-50% -50%;display:flex;align-items:center;justify-content:center;border-radius:50%;background-color:var(--clover-color-accent, #0065c3);background-image:radial-gradient(circle at 34% 30%,#ffffff24 0,#fff0 24%),radial-gradient(circle at 34% 30%,color-mix(in srgb,var(--clover-color-accent, #0065c3) 84%,#fff) 0,var(--clover-color-accent, #0065c3) 48%,color-mix(in srgb,var(--clover-color-accent, #0065c3) 62%,#000) 100%);box-shadow:0 .236rem .618rem #00000038;color:var(--clover-color-control-glyph, #fff);cursor:grab;isolation:isolate;transition:scale .2s ease}.clover-scene-rotate-disc:active{cursor:grabbing}.clover-scene-rotate-disc:before{position:absolute;inset:0;z-index:-1;border-radius:inherit;background:color-mix(in srgb,#fff 16%,transparent);opacity:0;transition:opacity .2s ease;content:""}.clover-scene-rotate-disc:is(:hover,:active):before,.clover-scene-rotate:has(:focus-visible) .clover-scene-rotate-disc:before,.clover-scene-navigation[data-turning] .clover-scene-rotate-disc:before{opacity:1}.clover-scene-rotate-disc:is(:hover,:active),.clover-scene-rotate:has(:focus-visible) .clover-scene-rotate-disc,.clover-scene-navigation[data-turning] .clover-scene-rotate-disc{scale:1.06}@media (prefers-reduced-motion: reduce){.clover-scene-rotate-disc{transition:none}}@media (forced-colors: active){.clover-scene-rotate-disc{border:1px solid CanvasText}}.clover-scene-rotate-disc svg{width:100%;height:100%;fill:currentColor;stroke:currentColor;-webkit-mask-image:radial-gradient(circle closest-side,#000 45%,transparent 90%);mask-image:radial-gradient(circle closest-side,#000 45%,transparent 90%)}.clover-scene-rotate-cell{position:relative;z-index:1;display:flex}.clover-scene-rotate-cell[data-place=up]{grid-area:1 / 2}.clover-scene-rotate-cell[data-place=left]{grid-area:2 / 1}.clover-scene-rotate-cell[data-place=corner]{grid-area:3 / 3}.clover-scene-rotate-cell[data-place=right]{grid-area:2 / 3}.clover-scene-rotate-cell[data-place=down]{grid-area:3 / 2}.clover-scene .clover-scene-navigation .clover-scene-rotate-cell:not([data-place=corner]) button.clover-canvas-button svg{scale:none;rotate:none}.clover-scene>.clover-scene-error{position:absolute;inset:auto var(--clover-canvas-controls-inset) var(--clover-canvas-controls-inset);z-index:2;background-color:var(--clover-color-secondary, #fff);border-radius:var(--clover-radius, 3px)}}');const Ce={zoom:true,fullPage:true,rotation:true,reset:true,information:true},_=Math.PI/4,re=Math.PI/12,Dt=_/2,oe=1.5,Nt=["ArrowLeft ArrowRight ArrowUp ArrowDown",S.rotateRight.keys,S.rotateLeft.keys,S.zoomIn.keys,S.zoomOut.keys,S.reset.keys].join(" ");function er(t){return t.scene?r(Je,{children:r($t,{...t,scene:t.scene})}):null}function $t({scene:t,label:u,language:d,className:n,controls:l=true,controlButtons:f,options:i,manifestId:I,engine:k="clover",children:M}){const{t:v}=Be(),[x,a]=Q(null),s=Ze(a),p=b(null),A=Qe(x),m=et(),w=tt(x,i==null?void 0:i.hideDelay,p),g=xt(x),L=`clover-scene-${_e()}`,y=l===false?null:l===true?Ce:{...Ce,...l},j=pt(t),Y=mt(t),V=i==null?void 0:i.request,me=JSON.stringify([t.id,j,je(V),k]),ge=I==="loading",[F,T]=Q({state:"waiting"}),D=b(null),ne=b(null),E=b(null),h=b(null),N=b(0),[Fe,Pe]=Q(0),G=b({hiddenSince:null,release:()=>{}}),X=b(false),ae=b(null),ce=b(null),ze=rt(x),H=P(()=>{N.current||!D.current||(N.current=requestAnimationFrame(()=>{var e;N.current=0,h.current&&((e=D.current)==null||e.draw(h.current),Me(ce.current,h.current))}))},[]),U=P(()=>{const e=p.current,o=e&&e.clientHeight?e.clientWidth/e.clientHeight:1;return ne.current?gt(ne.current,o):null},[]),J=P(e=>{!h.current||!E.current||(h.current=e(h.current,E.current),H())},[H]),se=b(0),O=P((e,o)=>{J(R=>ht(R,e,o));const c=ae.current;c&&(c.setAttribute("data-turning",""),window.clearTimeout(se.current),se.current=window.setTimeout(()=>c.removeAttribute("data-turning"),400))},[J]);z(()=>()=>window.clearTimeout(se.current),[]);const $=P(e=>J((o,c)=>bt(o,e,c)),[J]),Te=P(()=>{var e;return((e=p.current)==null?void 0:e.clientHeight)??0},[]),he=P(()=>{E.current=U(),h.current=E.current,H()},[U,H]);z(()=>{const e=p.current;if(!e||!g)return;if(ge){T({state:"loading"});return}let o=true,c=null;const R=()=>{cancelAnimationFrame(N.current),N.current=0,c==null||c.dispose(),c=null,D.current=null,It(G.current)};return G.current.release=()=>{R(),X.current=true,o&&T({state:"waiting"})},X.current=false,Ot(G.current)?(T({state:"loading"}),At(k)().then(({createEngine:C})=>{if(o)return c=C(e,{onLost:()=>{R(),o&&T({state:"error",error:new Error("The browser took back the 3D view's graphics.")})}}),D.current=c,c.load(j,V).then(Ue=>{o&&(ne.current=Ue,E.current=U(),h.current??(h.current=E.current),T({state:"ready"}),H())})}).catch(C=>{o&&(R(),T({state:"error",error:C instanceof Error?C:new Error(String(C))}))}),()=>{o=false,R()}):(X.current=true,T({state:"waiting"}),()=>{o=false})},[me,ge,g,Fe,U,H]),z(()=>{h.current=null},[me]),z(()=>{const e=p.current;if(!e||typeof IntersectionObserver>"u")return;const o=new IntersectionObserver(([c])=>{G.current.hiddenSince=c!=null&&c.isIntersecting?null:performance.now(),c!=null&&c.isIntersecting&&X.current&&Pe(R=>R+1)});return o.observe(e),()=>o.disconnect()},[]),z(()=>{const e=p.current;if(!e||typeof ResizeObserver>"u")return;const o=new ResizeObserver(()=>{var C;const c=parseFloat(getComputedStyle(document.documentElement).fontSize)||16;if((C=ae.current)==null||C.toggleAttribute("data-compact",e.clientWidth<32*c||e.clientHeight<24*c),!D.current)return;D.current.resize();const R=h.current&&E.current&&wt(h.current,E.current);E.current=U(),R&&(h.current=E.current),cancelAnimationFrame(N.current),N.current=0,h.current&&(D.current.draw(h.current),Me(ce.current,h.current))});return o.observe(e),()=>o.disconnect()},[U]),z(()=>{const e=p.current;if(!(!e||F.state!=="ready"))return Ee(e,{turn:O,zoom:$})},[F.state,O,$]);const De=e=>{if(e.target!==e.currentTarget||e.altKey||e.metaKey||e.ctrlKey)return;const o=e.shiftKey?_:Dt,c=e.shiftKey?2*re:re;switch(e.key){case"ArrowLeft":O(o,0);break;case"ArrowRight":O(-o,0);break;case"ArrowUp":O(0,c);break;case"ArrowDown":O(0,-c);break;case"r":O(-_,0);break;case"R":O(_,0);break;case"+":case"=":$(oe);break;case"-":case"_":$(1/oe);break;case"0":he();break;default:return}e.preventDefault()},ie=`caption-${L}`,B=Ye(()=>y!=null&&y.information&&ot(t)?[t]:[],[y==null?void 0:y.information,t]),[Ne,be]=Q(false),le=Ne&&B.length>0,we=P(e=>{var o;be(false),e&&((o=document.getElementById(`information-${L}`))==null||o.focus())},[L]),$e=B.length&&Le(t.label,d).text?nt(ie,0):void 0,W=[u,t.label].map(e=>Le(e,d)).find(e=>e.text),ye=Oe((W==null?void 0:W.text)||v("sceneModel"),W?W.lang:s.langOf("sceneModel"),false,s.hostLanguage),ke=`keys-${L}`,Ke=s.langOf("sceneRoleDescription")?void 0:v("sceneRoleDescription"),K=(e,o,c,R,C)=>({key:e,id:`${e}-${L}`,label:v(o),lang:s.langOf(o),glyph:c,onClick:R,...C?{shortcut:C}:{}}),qe=e=>y?[...y.zoom?[K("zoomIn","imageZoomIn",r(lt,{}),()=>$(oe),S.zoomIn),K("zoomOut","imageZoomOut",r(ut,{}),()=>$(1/oe),S.zoomOut)]:[],...y.fullPage&&m?[{key:"fullPage",id:`fullPage-${L}`,label:v(e?"imageExitFullScreen":"imageFullScreen"),lang:s.langOf(e?"imageExitFullScreen":"imageFullScreen"),glyph:e?r(ft,{}):r(vt,{}),onClick:o=>void dt(o.currentTarget)}]:[]]:[],He=Oe(v("sceneRotate"),s.langOf("sceneRotate"),false,s.hostLanguage),ue=y?{...y.rotation&&{rotateUp:K("rotateUp","sceneRotateUp",r(ee,{rotate:-90}),()=>O(0,re)),rotateLeft:K("rotateLeft","imageRotateLeft",r(ee,{rotate:180}),()=>O(_,0),S.rotateLeft),rotateRight:K("rotateRight","imageRotateRight",r(ee,{rotate:0}),()=>O(-_,0),S.rotateRight),rotateDown:K("rotateDown","sceneRotateDown",r(ee,{rotate:90}),()=>O(0,-re))},...y.reset&&{reset:K("reset","sceneResetView",r(at,{}),he,S.reset)}}:{},de=qe(ze),xe=F.state==="loading"||F.state==="waiting"&&g;return r(We.Provider,{value:s.hostLanguage,children:r("figure",{"aria-labelledby":$e,className:Lt("clover-canvas","clover-scene",n),"data-testid":"clover-scene","data-status":F.state==="ready"?"ready":F.state==="error"?"error":"loading","data-fullscreen":A,"data-controls":w?"visible":"hidden","data-navigable":"true",ref:s.ref,onKeyDown:e=>{if(e.key==="Escape"&&le&&!e.defaultPrevented){e.preventDefault(),we(false);return}Ct(e,p.current)},style:{position:"relative",width:"100%",height:"100%",margin:0,overflow:"hidden",isolation:"isolate"},children:[r(ct,{hidden:!A}),(B.length>0||Ae.Children.count(M)>0)&&r(st,{controls:()=>[],controlButtons:f,children:[B.length>0&&r(Rt,{id:`information-${L}`,label:v("informationPanelTabsAbout"),lang:s.langOf("informationPanelTabsAbout"),onClick:()=>be(e=>!e),expanded:le,controls:ie,children:r(kt,{})}),M]}),(de.length>0||Object.keys(ue).length>0)&&r("div",{ref:ae,className:"clover-scene-navigation",children:[de.length>0&&r("div",{className:"clover-scene-tools",children:de.map(e=>fe(e,f))}),Object.keys(ue).length>0&&r(Tt,{controls:ue,controlButtons:f,turn:O,zoom:$,span:Te,indicator:ce,name:He})]}),r("div",{ref:p,className:"clover-canvas-viewport",style:{position:"absolute",inset:0,overflow:"hidden",zIndex:-1,...Y?{backgroundColor:Y}:{}},"data-testid":"clover-scene-viewport",role:"img","aria-roledescription":Ke,...ye.props,"aria-describedby":ke,"aria-keyshortcuts":Nt,"aria-busy":xe,tabIndex:0,onKeyDown:De}),ye.node,r("span",{id:ke,style:Ve,lang:s.langOf("sceneKeys"),children:v("sceneKeys")}),F.state==="error"&&r(yt,{error:F.error,className:"clover-scene-error"}),xe&&r(Mt,{overlay:true}),B.length>0&&r(it,{id:ie,canvases:B,open:le,onClose:we,language:d})]})})}export{er as S};
@@ -1 +1 @@
1
- import{D as ee,a as te,g as se,i as p,V as ne,E as re,C as ce,b as oe,d as H,y as h,A as d,u as o,o as ae}from"./shared-J3w3gnXD.mjs";import{j as ie}from"./classnames-DukgfdpI.mjs";import{b as le,s as ue}from"./bringIntoView-CQH5ZgMM.mjs";import{a as he}from"./heading-Cjt0f-Eu.mjs";import{u as de}from"./Sections-we9U9fXq.mjs";import{F as fe}from"./FieldPill-DCJBz6Vj.mjs";import"./styles-Ypl9KrSK.mjs";const O=40,qe=ee(function({headingLevel:j=3,sticky:y=false,size:D="large",as:K="div",className:L,...T},U){const{t:V,langOf:k}=te(),{clover:r,language:B}=se("Search"),b=p(e=>{var s;return((s=ne(e.manifest))==null?void 0:s.id)??null}),t=p(e=>e.search),G=p(e=>re(e.manifest).canvases),a=p(e=>e.annotationId),J=ce(r.highlight.subscribe,r.highlight.get,r.highlight.get),I=oe(),[$,S]=H(t.query);h(()=>S(t.query),[t.query]);const l=d(null),v=de(),R=d(0),q=d(false),E=d(null);h(()=>{if(t.status!=="ready"||!t.set||E.current===t.set)return;E.current=t.set;const e=t.hits[0],s=t.hits.some(n=>a&&n.entryIds.includes(a));e&&!s&&r.selectAnnotation(e.entryIds[0])},[r,t.status,t.set,t.hits,a]),h(()=>{var i;const e=(i=l.current)==null?void 0:i.closest(".clover-content-search-field"),s=e==null?void 0:e.parentElement;if(!y||!e||!s||typeof ResizeObserver>"u")return;const n=new ResizeObserver(()=>s.style.setProperty("--clover-content-search-field",`${e.offsetHeight}px`));return n.observe(e),()=>{n.disconnect(),s.style.removeProperty("--clover-content-search-field")}},[y,b]),h(()=>{var s,n;if(!q.current)return;q.current=false;const e=(n=(s=l.current)==null?void 0:s.closest(".clover-content-search"))==null?void 0:n.querySelector('.clover-content-search-hit[aria-current="true"]');e&&le(e,"nearest")},[a]);const[P,Q]=H({set:null,count:O}),w=P.set===t.set?P.count:O,x=()=>Q({set:t.set,count:w+O}),z=d(null),A=a?t.hits.findIndex(e=>e.entryIds.includes(a)):-1,N=typeof IntersectionObserver<"u",u=N?Math.min(t.hits.length,Math.max(w,A+1)):t.hits.length,M=d(x);if(M.current=x,h(()=>{const e=z.current;if(!e||!N||u>=t.hits.length)return;const s=new IntersectionObserver(n=>{n.some(i=>i.isIntersecting)&&M.current()},{root:ue(e),rootMargin:"0px 0px 400px 0px"});return s.observe(e),()=>s.disconnect()},[N,u,t.hits.length]),h(()=>{!v||v===R.current||!l.current||(R.current=v,l.current.focus())},[v,b]),!b)return null;const F={position:A,total:t.hits.length,step:e=>{const s=t.hits[F.position+e];s&&(q.current=true,r.selectAnnotation(s.entryIds[0]))}},g=[];t.hits.slice(0,u).forEach((e,s)=>{const n=g[g.length-1];(n==null?void 0:n.canvasId)===e.canvasId?n.hits.push({hit:e,index:s}):g.push({canvasId:e.canvasId,hits:[{hit:e,index:s}]})});const W=he(j),f=t.hits.length,m=t.status==="loading"?"contentSearchLoading":t.status==="error"?"contentSearchError":t.status==="ready"?f===0?"contentSearchResultsNone":f===1?"contentSearchResult":"contentSearchResults":null,X=m?V(m,{count:f}):"",Y=t.status==="ready"?F:null,Z=o("p",{className:"clover-content-search-status",role:"status","data-status":t.status,lang:m?k(m):void 0,children:X});return o(K,{ref:U,className:ie("clover-content-search",L),"data-status":t.status,"data-sticky":y||void 0,...T,children:[o("div",{className:"clover-content-search-field",children:o(fe,{ref:l,id:`${I}-query`,value:$,onChange:e=>{S(e),!e&&t.query&&r.search("")},onSubmit:()=>void r.search($),onClear:()=>{var e;S(""),t.query&&r.search(""),(e=l.current)==null||e.focus()},results:Y,size:D,classes:{form:"clover-content-search-form",query:"clover-content-search-query",clear:"clover-content-search-clear",submit:"clover-content-search-submit"}})}),Z,g.map(({canvasId:e,hits:s},n)=>{const i=G.find(c=>c.id===e),C=ae(i==null?void 0:i.label,B);return o("section",{className:"clover-content-search-group","aria-labelledby":`${I}-${n}`,children:[o(W,{id:`${I}-${n}`,className:"clover-content-search-canvas",lang:C.text?C.lang:void 0,children:C.text||e}),o("ol",{className:"clover-content-search-hits",children:s.map(({hit:c,index:_})=>o("li",{children:o("button",{type:"button",className:"clover-content-search-hit","aria-current":a&&c.entryIds.includes(a)?"true":void 0,"data-highlighted":c.entryIds.includes(J??""),onClick:()=>r.selectAnnotation(c.entryIds[0]),onPointerEnter:()=>r.highlight.emit(c.entryIds[0]),onPointerLeave:()=>r.highlight.emit(null),onFocus:()=>{r.highlight.emit(c.entryIds[0]),u<f&&_>=u-5&&x()},onBlur:()=>r.highlight.emit(null),children:[c.before,o("mark",{children:c.match}),c.after]})},c.id))})]},`${e}-${n}`)}),u<f&&o("div",{ref:z,className:"clover-content-search-more","aria-hidden":"true"})]})});export{qe as Search};
1
+ import{D as ee,a as te,g as se,i as p,V as ne,E as re,C as ce,b as oe,d as H,y as h,A as d,u as o,o as ae}from"./shared-YUjOSBKO.mjs";import{j as ie}from"./classnames-DukgfdpI.mjs";import{b as le,s as ue}from"./bringIntoView-CQH5ZgMM.mjs";import{a as he}from"./heading-Cjt0f-Eu.mjs";import{u as de}from"./Sections-ejwu1_Sm.mjs";import{F as fe}from"./FieldPill-CyEssPVm.mjs";import"./styles-CyuM_fB1.mjs";const O=40,qe=ee(function({headingLevel:j=3,sticky:y=false,size:D="large",as:K="div",className:L,...T},U){const{t:V,langOf:k}=te(),{clover:r,language:B}=se("Search"),b=p(e=>{var s;return((s=ne(e.manifest))==null?void 0:s.id)??null}),t=p(e=>e.search),G=p(e=>re(e.manifest).canvases),a=p(e=>e.annotationId),J=ce(r.highlight.subscribe,r.highlight.get,r.highlight.get),I=oe(),[$,S]=H(t.query);h(()=>S(t.query),[t.query]);const l=d(null),v=de(),R=d(0),q=d(false),E=d(null);h(()=>{if(t.status!=="ready"||!t.set||E.current===t.set)return;E.current=t.set;const e=t.hits[0],s=t.hits.some(n=>a&&n.entryIds.includes(a));e&&!s&&r.selectAnnotation(e.entryIds[0])},[r,t.status,t.set,t.hits,a]),h(()=>{var i;const e=(i=l.current)==null?void 0:i.closest(".clover-content-search-field"),s=e==null?void 0:e.parentElement;if(!y||!e||!s||typeof ResizeObserver>"u")return;const n=new ResizeObserver(()=>s.style.setProperty("--clover-content-search-field",`${e.offsetHeight}px`));return n.observe(e),()=>{n.disconnect(),s.style.removeProperty("--clover-content-search-field")}},[y,b]),h(()=>{var s,n;if(!q.current)return;q.current=false;const e=(n=(s=l.current)==null?void 0:s.closest(".clover-content-search"))==null?void 0:n.querySelector('.clover-content-search-hit[aria-current="true"]');e&&le(e,"nearest")},[a]);const[P,Q]=H({set:null,count:O}),w=P.set===t.set?P.count:O,x=()=>Q({set:t.set,count:w+O}),z=d(null),A=a?t.hits.findIndex(e=>e.entryIds.includes(a)):-1,N=typeof IntersectionObserver<"u",u=N?Math.min(t.hits.length,Math.max(w,A+1)):t.hits.length,M=d(x);if(M.current=x,h(()=>{const e=z.current;if(!e||!N||u>=t.hits.length)return;const s=new IntersectionObserver(n=>{n.some(i=>i.isIntersecting)&&M.current()},{root:ue(e),rootMargin:"0px 0px 400px 0px"});return s.observe(e),()=>s.disconnect()},[N,u,t.hits.length]),h(()=>{!v||v===R.current||!l.current||(R.current=v,l.current.focus())},[v,b]),!b)return null;const F={position:A,total:t.hits.length,step:e=>{const s=t.hits[F.position+e];s&&(q.current=true,r.selectAnnotation(s.entryIds[0]))}},g=[];t.hits.slice(0,u).forEach((e,s)=>{const n=g[g.length-1];(n==null?void 0:n.canvasId)===e.canvasId?n.hits.push({hit:e,index:s}):g.push({canvasId:e.canvasId,hits:[{hit:e,index:s}]})});const W=he(j),f=t.hits.length,m=t.status==="loading"?"contentSearchLoading":t.status==="error"?"contentSearchError":t.status==="ready"?f===0?"contentSearchResultsNone":f===1?"contentSearchResult":"contentSearchResults":null,X=m?V(m,{count:f}):"",Y=t.status==="ready"?F:null,Z=o("p",{className:"clover-content-search-status",role:"status","data-status":t.status,lang:m?k(m):void 0,children:X});return o(K,{ref:U,className:ie("clover-content-search",L),"data-status":t.status,"data-sticky":y||void 0,...T,children:[o("div",{className:"clover-content-search-field",children:o(fe,{ref:l,id:`${I}-query`,value:$,onChange:e=>{S(e),!e&&t.query&&r.search("")},onSubmit:()=>void r.search($),onClear:()=>{var e;S(""),t.query&&r.search(""),(e=l.current)==null||e.focus()},results:Y,size:D,classes:{form:"clover-content-search-form",query:"clover-content-search-query",clear:"clover-content-search-clear",submit:"clover-content-search-submit"}})}),Z,g.map(({canvasId:e,hits:s},n)=>{const i=G.find(c=>c.id===e),C=ae(i==null?void 0:i.label,B);return o("section",{className:"clover-content-search-group","aria-labelledby":`${I}-${n}`,children:[o(W,{id:`${I}-${n}`,className:"clover-content-search-canvas",lang:C.text?C.lang:void 0,children:C.text||e}),o("ol",{className:"clover-content-search-hits",children:s.map(({hit:c,index:_})=>o("li",{children:o("button",{type:"button",className:"clover-content-search-hit","aria-current":a&&c.entryIds.includes(a)?"true":void 0,"data-highlighted":c.entryIds.includes(J??""),onClick:()=>r.selectAnnotation(c.entryIds[0]),onPointerEnter:()=>r.highlight.emit(c.entryIds[0]),onPointerLeave:()=>r.highlight.emit(null),onFocus:()=>{r.highlight.emit(c.entryIds[0]),u<f&&_>=u-5&&x()},onBlur:()=>r.highlight.emit(null),children:[c.before,o("mark",{children:c.match}),c.after]})},c.id))})]},`${e}-${n}`)}),u<f&&o("div",{ref:z,className:"clover-content-search-more","aria-hidden":"true"})]})});export{qe as Search};
@@ -1,2 +1,2 @@
1
- import{b as ie,A as P,a as ae,d as _,y as z,_ as ue,u as i,Q as G,k as de,x as J}from"./shared-J3w3gnXD.mjs";import{a as fe}from"./heading-Cjt0f-Eu.mjs";import{T as pe}from"./Tip-C8J3qsIK.mjs";import{u as ve}from"./useContainerName-DCbE5JXi.mjs";import{u as he}from"./useScrollTrack-dLFWnT8N.mjs";import"./styles-Ypl9KrSK.mjs";const Z=typeof window>"u"?z:ue,V=G(null);function Ee(){return J(V)}const ee=G(0);function Ce(){return J(ee)}function Be({items:n,layout:s="tabs",value:$,onValueChange:b,label:R,labelLang:h,headingLevel:I=3}){var U;const p=ie(),E=ve(R??"",h,R===void 0),g=P([]),c=s==="tabs",{t:te,langOf:oe}=ae(),m=he({dragFree:true,itemCount:n.length}),v=n.some(e=>e.value===$)?$:((U=n[0])==null?void 0:U.value)??null,A=P(new Set);v&&A.current.add(v);const F=P(null),[H,ne]=_({value:null,count:0});z(()=>{var u;if(c||!v||F.current!==v)return;F.current=null;const e=n.findIndex(d=>d.value===v),o=document.getElementById(`${p}-panel-${e}`),t=(u=g.current[e])==null?void 0:u.parentElement;if(!o||!t)return;const r=t.getBoundingClientRect().bottom-o.getBoundingClientRect().top;if(r<=0)return;const a=T(o);a&&(a.scrollTop-=r)},[v,c,n,p]);const re=e=>{var C,B,w,N;const o=n.findIndex(L=>L.value===v),t=document.getElementById(`${p}-panel-${o}`),r=e.target;if(!t||r===t||!t.contains(r)||!me(r))return;const a=(B=(C=g.current[o])==null?void 0:C.parentElement)==null?void 0:B.getBoundingClientRect(),u=o+1<n.length?(N=(w=g.current[o+1])==null?void 0:w.parentElement)==null?void 0:N.getBoundingClientRect():void 0;if(!a)return;const d=r.getBoundingClientRect(),y=d.top<a.bottom?Math.floor(d.top-a.bottom):u&&d.bottom>u.top?Math.ceil(Math.min(d.bottom-u.top,d.top-a.bottom)):0,f=y?T(t):null;f&&(f.scrollTop+=y)},D=P(null),j=n.map(e=>e.value).join(`
1
+ import{b as ie,A as P,a as ae,d as _,y as z,_ as ue,u as i,Q as G,k as de,x as J}from"./shared-YUjOSBKO.mjs";import{a as fe}from"./heading-Cjt0f-Eu.mjs";import{T as pe}from"./Tip-IO11xX4x.mjs";import{u as ve}from"./useContainerName-BpJ3IWY0.mjs";import{u as he}from"./useScrollTrack-WbG28FPD.mjs";import"./styles-CyuM_fB1.mjs";const Z=typeof window>"u"?z:ue,V=G(null);function Ee(){return J(V)}const ee=G(0);function Ce(){return J(ee)}function Be({items:n,layout:s="tabs",value:$,onValueChange:b,label:R,labelLang:h,headingLevel:I=3}){var U;const p=ie(),E=ve(R??"",h,R===void 0),g=P([]),c=s==="tabs",{t:te,langOf:oe}=ae(),m=he({dragFree:true,itemCount:n.length}),v=n.some(e=>e.value===$)?$:((U=n[0])==null?void 0:U.value)??null,A=P(new Set);v&&A.current.add(v);const F=P(null),[H,ne]=_({value:null,count:0});z(()=>{var u;if(c||!v||F.current!==v)return;F.current=null;const e=n.findIndex(d=>d.value===v),o=document.getElementById(`${p}-panel-${e}`),t=(u=g.current[e])==null?void 0:u.parentElement;if(!o||!t)return;const r=t.getBoundingClientRect().bottom-o.getBoundingClientRect().top;if(r<=0)return;const a=T(o);a&&(a.scrollTop-=r)},[v,c,n,p]);const re=e=>{var C,B,w,N;const o=n.findIndex(L=>L.value===v),t=document.getElementById(`${p}-panel-${o}`),r=e.target;if(!t||r===t||!t.contains(r)||!me(r))return;const a=(B=(C=g.current[o])==null?void 0:C.parentElement)==null?void 0:B.getBoundingClientRect(),u=o+1<n.length?(N=(w=g.current[o+1])==null?void 0:w.parentElement)==null?void 0:N.getBoundingClientRect():void 0;if(!a)return;const d=r.getBoundingClientRect(),y=d.top<a.bottom?Math.floor(d.top-a.bottom):u&&d.bottom>u.top?Math.ceil(Math.min(d.bottom-u.top,d.top-a.bottom)):0,f=y?T(t):null;f&&(f.scrollTop+=y)},D=P(null),j=n.map(e=>e.value).join(`
2
2
  `);Z(()=>{const e=D.current;if(c||!e||typeof ResizeObserver>"u")return;const o=[...e.querySelectorAll(":scope > .clover-sections-item")],t=o.map(l=>l.firstElementChild),r=t[0],a=t[t.length-1],u=new Map,d=l=>(l&&u.get(l))??0,y=document.scrollingElement;let f=null,C=0;const B=()=>{const l=t.reduce((O,M)=>O+d(M),0);let S=0;o.forEach((O,M)=>{O.style.setProperty("--clover-sections-before",`${S}px`),S+=d(t[M]),O.style.setProperty("--clover-sections-after",`${l-S}px`)}),e.style.setProperty("--clover-sections-total",`${l}px`);const x=r&&getComputedStyle(r);(x==null?void 0:x.position)==="sticky"&&a&&(C=parseFloat(x.top)+parseFloat(getComputedStyle(a).bottom)||0);const k=getComputedStyle(e),ce=parseFloat(k.lineHeight)||1.2*parseFloat(k.fontSize),Q=(f==null?void 0:f.clientHeight)??0;Q>0&&Q-C-l<2*ce?e.dataset.stacks="off":delete e.dataset.stacks},w=new ResizeObserver(l=>{var S,x;for(const k of l)t.includes(k.target)&&u.set(k.target,((x=(S=k.borderBoxSize)==null?void 0:S[0])==null?void 0:x.blockSize)??k.target.getBoundingClientRect().height);B()}),N=()=>{const l=T(e);l!==f&&(f&&f!==y&&w.unobserve(f),l&&l!==y&&w.observe(l),f=l)},L=()=>{N(),B()};N();for(const l of t)l&&w.observe(l,{box:"border-box"});return window.addEventListener("resize",L),()=>{w.disconnect(),window.removeEventListener("resize",L);for(const l of o)l.style.removeProperty("--clover-sections-before"),l.style.removeProperty("--clover-sections-after");e.style.removeProperty("--clover-sections-total"),delete e.dataset.stacks}},[c,j,I]),z(()=>{if(c)return;const e=g.current.map(t=>t==null?void 0:t.parentElement).filter(t=>!!t),o=t=>{var d;if(t.ctrlKey)return;const r=t.currentTarget,a=X(r);if(!a||a===document.scrollingElement)return;t.preventDefault();const u=t.deltaMode===1?parseFloat(getComputedStyle(r).lineHeight)||16:t.deltaMode===2?a.clientHeight:1;(d=X(a)??document.scrollingElement)==null||d.scrollBy({left:t.deltaX*u,top:t.deltaY*u,behavior:"instant"})};for(const t of e)t.addEventListener("wheel",o,{passive:false});return()=>{for(const t of e)t.removeEventListener("wheel",o)}},[c,j]);const W=e=>{e!==v&&(F.current=e,c||ne(o=>({value:e,count:o.count+1})),b==null||b(e))},se=(e,o)=>{var d;const t=n.length-1,[r,a]=c?["ArrowLeft","ArrowRight"]:["ArrowUp","ArrowDown"],u=e.key===a?(o+1)%n.length:e.key===r?(o-1+n.length)%n.length:e.key==="Home"?0:e.key==="End"?t:null;u!==null&&(e.preventDefault(),(d=g.current[u])==null||d.focus(),c&&W(n[u].value))},K=P(false);z(()=>{if(!c)return;const e=n.findIndex(f=>f.value===v),o=g.current[e],t=o==null?void 0:o.parentElement;if(!o||!t)return;const r=getComputedStyle(t),a=t.getBoundingClientRect(),u=o.getBoundingClientRect(),d=a.left+(parseFloat(r.scrollPaddingLeft)||0),y=a.right-(parseFloat(r.scrollPaddingRight)||0);(u.left<d-1||u.right>y+1)&&m.scrollToIndex(e,{instant:!K.current}),K.current=true},[v,c,n.length,m.scrollToIndex]);const Y=e=>{const o=e==="prev"?m.canScrollPrev:m.canScrollNext,t=e==="prev"?"sectionsScrollBack":"sectionsScrollForward";return i("button",{type:"button",className:`clover-sections-scroll-${e}`,"aria-hidden":"true",tabIndex:-1,hidden:!o,lang:oe(t),onMouseDown:r=>r.preventDefault(),onClick:e==="prev"?m.scrollPrev:m.scrollNext,children:[i("svg",{"aria-hidden":"true",focusable:"false",width:"16",height:"16",viewBox:"0 0 16 16",children:i("path",{d:e==="next"?"M6 3l5 5-5 5":"M10 3L5 8l5 5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),i(pe,{label:te(t)})]})},le=fe(I,"div"),q=(e,o)=>{const t=e.value===v;return i("button",{ref:r=>{g.current[o]=r},type:"button",id:`${p}-button-${o}`,className:"clover-sections-button","data-value":e.value,"data-track-index":c?o:void 0,"aria-controls":`${p}-panel-${o}`,...c?{role:"tab","aria-selected":t,tabIndex:t?0:-1}:{"aria-expanded":t,"aria-disabled":t||void 0},onClick:()=>W(e.value),onKeyDown:r=>se(r,o),children:[i("span",{className:"clover-sections-label",children:e.label}),!c&&!t&&i("svg",{"aria-hidden":"true",focusable:"false",width:"12",height:"12",viewBox:"0 0 12 12",className:"clover-sections-chevron",children:i("path",{d:"M3 4.5l3 3 3-3",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]},e.value)};return i("div",{ref:D,className:"clover-sections","data-layout":s,onFocus:c?void 0:re,style:c?void 0:{"--clover-sections-count":n.length},children:[c&&i("div",{className:"clover-sections-tabs","data-more":[m.canScrollPrev&&"start",m.canScrollNext&&"end"].filter(Boolean).join(" ")||void 0,children:i("div",{className:"clover-sections-row",children:[i("div",{role:"tablist",ref:m.ref,...E.props,className:"clover-sections-list",children:n.map(q)}),Y("prev"),Y("next")]})}),c&&E.node,n.map((e,o)=>{const t=e.value===v;return i("section",{className:"clover-sections-item","data-value":e.value,"data-open":t,style:c?void 0:{"--clover-sections-index":o},children:[!c&&i(le,{className:"clover-sections-heading",children:[q(e,o),i("span",{className:"clover-sections-reach","aria-hidden":"true"})]}),i(ee.Provider,{value:H.value===e.value?H.count:0,children:i(ge,{id:`${p}-panel-${o}`,tabs:c,labelledBy:`${p}-button-${o}`,hidden:!t,children:A.current.has(e.value)?e.content:null})})]},e.value)})]})}function ge({id:n,tabs:s,labelledBy:$,hidden:b,children:R}){const[h,I]=_(null);return Z(()=>{const p=h==null?void 0:h.parentElement;if(b||!h||!p||typeof ResizeObserver>"u")return;const E=new ResizeObserver(()=>{const g=h.offsetWidth;g?p.style.setProperty("--clover-sections-actions",`${g}px`):p.style.removeProperty("--clover-sections-actions")});return E.observe(h),()=>{E.disconnect(),p.style.removeProperty("--clover-sections-actions")}},[h,b]),i(de,{children:[!s&&i("div",{ref:I,className:"clover-sections-actions",hidden:b}),i("div",{id:n,role:s?"tabpanel":"region","aria-labelledby":$,tabIndex:s?0:void 0,className:"clover-sections-panel",hidden:b,children:i(V.Provider,{value:s?null:h,children:R})})]})}function T(n){for(let s=n.parentElement;s&&s!==document.body;s=s.parentElement)if(/auto|scroll|hidden/.test(getComputedStyle(s).overflowY))return s;return document.scrollingElement}function X(n){for(let s=n.parentElement;s&&s!==document.body;s=s.parentElement)if(/auto|scroll/.test(getComputedStyle(s).overflowY)&&s.scrollHeight>s.clientHeight)return s;return document.scrollingElement}function me(n){try{return n.matches(":focus-visible")}catch{return true}}export{Be as S,Ee as a,Ce as u};
@@ -1 +1 @@
1
- import{d as p,A as P,y as V,aj as j,T as k,u as b}from"./shared-J3w3gnXD.mjs";import{s as F,P as M,a as R}from"./Items-_1Jz3FMs.mjs";import{b as T}from"./items--Tu7ZM3L.mjs";function B({iiifContent:a,items:r,navigation:O,onSelect:e,request:u,header:w=true,forwardedRef:g,...l}){var y,d;const[s,x]=p(null),[f,c]=p(0),A=typeof a=="string"?a:a==null?void 0:a.id,o=P({iiifContent:a,request:u});o.current={iiifContent:a,request:u},V(()=>{if(r||o.current.iiifContent===void 0)return;const t=new AbortController;return j(o.current.iiifContent,{request:o.current.request,signal:t.signal}).then(m=>{t.signal.aborted||x(m)}).catch(()=>{}),()=>t.abort()},[A,r]);const n=k(()=>T(r||s),[r,s]);if(!n.length)return null;const h=!r&&(s==null?void 0:s.type)==="Manifest",i=O??(h?"id":"homepage");if(l.layout==="pager")return b(M,{...l,forwardedRef:g,steps:F(n,f,"left-to-right",(t,m)=>{e==null||e(t,m),c(n.indexOf(t))})});const I=(d=(y=s==null?void 0:s.homepage)==null?void 0:y[0])==null?void 0:d.id;return b(R,{...l,forwardedRef:g,items:n,selected:i==="id"?f:-1,navigation:i,request:u,showSummary:!h,heading:w&&s?{label:s.label,summary:s.summary,homepage:I}:void 0,onActivate:(t,m)=>{e==null||e(t,m),c(n.indexOf(t))},followFocus:t=>c(n.indexOf(t))})}export{B as default};
1
+ import{d as p,A as P,y as V,aj as j,T as k,u as b}from"./shared-YUjOSBKO.mjs";import{s as F,P as M,a as R}from"./Items-DRj1UEpC.mjs";import{b as T}from"./items-CB2Uk7ts.mjs";function B({iiifContent:a,items:r,navigation:O,onSelect:e,request:u,header:w=true,forwardedRef:g,...l}){var y,d;const[s,x]=p(null),[f,c]=p(0),A=typeof a=="string"?a:a==null?void 0:a.id,o=P({iiifContent:a,request:u});o.current={iiifContent:a,request:u},V(()=>{if(r||o.current.iiifContent===void 0)return;const t=new AbortController;return j(o.current.iiifContent,{request:o.current.request,signal:t.signal}).then(m=>{t.signal.aborted||x(m)}).catch(()=>{}),()=>t.abort()},[A,r]);const n=k(()=>T(r||s),[r,s]);if(!n.length)return null;const h=!r&&(s==null?void 0:s.type)==="Manifest",i=O??(h?"id":"homepage");if(l.layout==="pager")return b(M,{...l,forwardedRef:g,steps:F(n,f,"left-to-right",(t,m)=>{e==null||e(t,m),c(n.indexOf(t))})});const I=(d=(y=s==null?void 0:s.homepage)==null?void 0:y[0])==null?void 0:d.id;return b(R,{...l,forwardedRef:g,items:n,selected:i==="id"?f:-1,navigation:i,request:u,showSummary:!h,heading:w&&s?{label:s.label,summary:s.summary,homepage:I}:void 0,onActivate:(t,m)=>{e==null||e(t,m),c(n.indexOf(t))},followFocus:t=>c(n.indexOf(t))})}export{B as default};
@@ -1 +1 @@
1
- import{a as v,u as s,v as c,k as d}from"./shared-J3w3gnXD.mjs";import{j as m}from"./classnames-DukgfdpI.mjs";import{a as p}from"./hooks-Dp8pjU8l.mjs";import{L as f}from"./Loading-BmA--pzr.mjs";function S({className:e,loading:t,error:l}){const{t:n,langOf:i}=v(),{status:a,error:o}=p(),r=a==="loading",u=t!==void 0&&t!==false;return s(d,{children:[s("p",{className:m("clover-status",e),"data-status":r?a:void 0,role:"status",style:r&&t!==false?void 0:c,children:[r&&(u?t:t===void 0&&s(f,{})),r&&!u&&s("span",{style:c,lang:i("statusLoading"),children:n("statusLoading")})]}),a==="error"&&o&&s("div",{className:m("clover-status",e),"data-status":a,role:"alert",children:l?l(o):s(d,{children:[s("p",{lang:i("statusError"),children:n("statusError")}),s("p",{className:"clover-status-detail",lang:"en",children:o.message})]})})]})}export{S};
1
+ import{a as v,u as s,v as c,k as d}from"./shared-YUjOSBKO.mjs";import{j as m}from"./classnames-DukgfdpI.mjs";import{a as p}from"./hooks-BXzQSllm.mjs";import{L as f}from"./Loading-CBKfwsML.mjs";function S({className:e,loading:t,error:l}){const{t:n,langOf:i}=v(),{status:a,error:o}=p(),r=a==="loading",u=t!==void 0&&t!==false;return s(d,{children:[s("p",{className:m("clover-status",e),"data-status":r?a:void 0,role:"status",style:r&&t!==false?void 0:c,children:[r&&(u?t:t===void 0&&s(f,{})),r&&!u&&s("span",{style:c,lang:i("statusLoading"),children:n("statusLoading")})]}),a==="error"&&o&&s("div",{className:m("clover-status",e),"data-status":a,role:"alert",children:l?l(o):s(d,{children:[s("p",{lang:i("statusError"),children:n("statusError")}),s("p",{className:"clover-status-detail",lang:"en",children:o.message})]})})]})}export{S};
@@ -0,0 +1 @@
1
+ import{K as f,u as a,z as l,P as r}from"./shared-YUjOSBKO.mjs";import{C as m}from"./CanvasView-BI3YzNdK.mjs";import{p as t}from"./playerSurface-CU5XxI1j.mjs";import{C as s}from"./Pending-BPOQ2z1L.mjs";import{j as u}from"./classnames-DukgfdpI.mjs";const d=l(()=>import("./Connected-BxqaRL9o.mjs")),v=l(()=>import("./LoadedCanvas-DOjtxLSe.mjs"));function h({timeline:o,className:n,...e}){const c=f(),i=u("clover-timeline",n);return e.iiifContent!==void 0&&o===void 0?a(r,{fallback:a(s,{}),children:a(v,{...e,className:i,of:"Timeline",surface:t})}):o?a(m,{...e,className:i,canvases:[o],navigator:false,surface:t}):c?a(r,{fallback:a(s,{}),children:a(d,{...e,className:n})}):null}export{h as Timeline,h as default};
@@ -1 +1 @@
1
- import{a as v,A as S,y as g,u as h}from"./shared-J3w3gnXD.mjs";import"./styles-Ypl9KrSK.mjs";const K={zoomIn:{keys:"Plus",glyph:"+"},zoomOut:{keys:"-",glyph:"\u2212"},reset:{keys:"0",glyph:"0"},rotateRight:{keys:"R",glyph:"R"},rotateLeft:{keys:"Shift+R",glyph:"\u21E7R"},play:{keys:"K Space",glyph:"K"},mute:{keys:"M",glyph:"M"}},k=new Set(["+","=","-","_","0","r","R","k","K","m","M","j","J","l","L"]);function x({label:t,lang:e,shortcut:n,scrolls:o=false,image:r}){const{t:s}=v(),l=S(null),c=n?s("controlShortcut",{label:t,shortcut:n.glyph}):t;return R(),g(()=>{const i=l.current;i&&p(i)&&f(i)},[c]),h("span",{ref:l,className:"clover-tip","aria-hidden":"true",lang:e,...o&&{tabIndex:-1,onMouseDown:i=>{var a;i.preventDefault(),(a=i.currentTarget.parentElement)==null||a.focus({preventScroll:true})}},children:[r&&h("img",{className:"clover-tip-image",src:r,alt:"",loading:"lazy",onLoad:()=>{const i=l.current;i&&p(i)&&f(i)}}),c]})}function u(t){const e=t.target instanceof Element&&E(t.target),n=e&&d(e);n&&f(n)}function d(t){return Array.from(t.children).find(e=>e.classList.contains("clover-tip"))}function E(t){const e=t.matches("input")?t.parentElement:null;return e&&d(e)?e:t}function p(t){var e;try{return!!((e=t.parentElement)!=null&&e.matches(":hover, :focus-visible, :has(> input:focus-visible)"))}catch{return false}}function f(t){const e=t.parentElement;if(!e)return;t.style.removeProperty("--clover-tip-room"),t.style.removeProperty("--clover-tip-shift");const n=L(e),o=parseFloat(getComputedStyle(t).paddingLeft)||0,r=n.left+o,s=n.right-o,l=e.getBoundingClientRect();let c=t.getBoundingClientRect();const i=c.right<=l.left?c.right-r:c.left>=l.right?s-c.left:s-r;c.width>i&&(t.style.setProperty("--clover-tip-room",`${Math.max(i,0)}px`),c=t.getBoundingClientRect());const a=c.left<r?r-c.left:c.right>s?s-c.right:0;a&&t.style.setProperty("--clover-tip-shift",`${a}px`)}function L(t){let e=0,n=document.documentElement.clientWidth||window.innerWidth;for(let o=t.parentElement;o&&o!==document.documentElement;o=o.parentElement){const{display:r,overflow:s,overflowX:l}=getComputedStyle(o);if(r==="inline"||r==="contents")continue;const c=l||s;if(!c||c==="visible")continue;const i=o.getBoundingClientRect();e=Math.max(e,i.left+o.clientLeft),n=Math.min(n,i.left+o.clientLeft+o.clientWidth)}return{left:e,right:n}}let m=0;function y(t){if(t.key!=="Escape")return;const e=new Set;document.querySelectorAll(":hover > .clover-tip").forEach(r=>r.parentElement&&e.add(r.parentElement));const n=document.activeElement,o=n&&E(n);o&&d(o)&&e.add(o),e.forEach(r=>w(r,"tipHidden",["pointerenter","focusout"]))}function w(t,e,n){t.dataset[e]="";const o=()=>{delete t.dataset[e],n.forEach(r=>t.removeEventListener(r,o))};n.forEach(r=>t.addEventListener(r,o))}function R(){g(()=>(m++===0&&(document.addEventListener("keydown",y,true),document.addEventListener("pointerenter",u,true),document.addEventListener("focus",u,true)),()=>{--m||(document.removeEventListener("keydown",y,true),document.removeEventListener("pointerenter",u,true),document.removeEventListener("focus",u,true))}),[])}function C(t,e){const n=t.target;!e||n===e||e.contains(n)||k.has(t.key)&&(t.altKey||t.metaKey||t.ctrlKey||n.closest("input, select, textarea, [contenteditable]")||(t.preventDefault(),e.dispatchEvent(new KeyboardEvent("keydown",{key:t.key,shiftKey:t.shiftKey,bubbles:true,cancelable:true}))))}export{K as S,x as T,C as f,w as h};
1
+ import{a as v,A as S,y as g,u as h}from"./shared-YUjOSBKO.mjs";import"./styles-CyuM_fB1.mjs";const K={zoomIn:{keys:"Plus",glyph:"+"},zoomOut:{keys:"-",glyph:"\u2212"},reset:{keys:"0",glyph:"0"},rotateRight:{keys:"R",glyph:"R"},rotateLeft:{keys:"Shift+R",glyph:"\u21E7R"},play:{keys:"K Space",glyph:"K"},mute:{keys:"M",glyph:"M"}},k=new Set(["+","=","-","_","0","r","R","k","K","m","M","j","J","l","L"]);function x({label:t,lang:e,shortcut:n,scrolls:o=false,image:r}){const{t:s}=v(),l=S(null),c=n?s("controlShortcut",{label:t,shortcut:n.glyph}):t;return R(),g(()=>{const i=l.current;i&&p(i)&&f(i)},[c]),h("span",{ref:l,className:"clover-tip","aria-hidden":"true",lang:e,...o&&{tabIndex:-1,onMouseDown:i=>{var a;i.preventDefault(),(a=i.currentTarget.parentElement)==null||a.focus({preventScroll:true})}},children:[r&&h("img",{className:"clover-tip-image",src:r,alt:"",loading:"lazy",onLoad:()=>{const i=l.current;i&&p(i)&&f(i)}}),c]})}function u(t){const e=t.target instanceof Element&&E(t.target),n=e&&d(e);n&&f(n)}function d(t){return Array.from(t.children).find(e=>e.classList.contains("clover-tip"))}function E(t){const e=t.matches("input")?t.parentElement:null;return e&&d(e)?e:t}function p(t){var e;try{return!!((e=t.parentElement)!=null&&e.matches(":hover, :focus-visible, :has(> input:focus-visible)"))}catch{return false}}function f(t){const e=t.parentElement;if(!e)return;t.style.removeProperty("--clover-tip-room"),t.style.removeProperty("--clover-tip-shift");const n=L(e),o=parseFloat(getComputedStyle(t).paddingLeft)||0,r=n.left+o,s=n.right-o,l=e.getBoundingClientRect();let c=t.getBoundingClientRect();const i=c.right<=l.left?c.right-r:c.left>=l.right?s-c.left:s-r;c.width>i&&(t.style.setProperty("--clover-tip-room",`${Math.max(i,0)}px`),c=t.getBoundingClientRect());const a=c.left<r?r-c.left:c.right>s?s-c.right:0;a&&t.style.setProperty("--clover-tip-shift",`${a}px`)}function L(t){let e=0,n=document.documentElement.clientWidth||window.innerWidth;for(let o=t.parentElement;o&&o!==document.documentElement;o=o.parentElement){const{display:r,overflow:s,overflowX:l}=getComputedStyle(o);if(r==="inline"||r==="contents")continue;const c=l||s;if(!c||c==="visible")continue;const i=o.getBoundingClientRect();e=Math.max(e,i.left+o.clientLeft),n=Math.min(n,i.left+o.clientLeft+o.clientWidth)}return{left:e,right:n}}let m=0;function y(t){if(t.key!=="Escape")return;const e=new Set;document.querySelectorAll(":hover > .clover-tip").forEach(r=>r.parentElement&&e.add(r.parentElement));const n=document.activeElement,o=n&&E(n);o&&d(o)&&e.add(o),e.forEach(r=>w(r,"tipHidden",["pointerenter","focusout"]))}function w(t,e,n){t.dataset[e]="";const o=()=>{delete t.dataset[e],n.forEach(r=>t.removeEventListener(r,o))};n.forEach(r=>t.addEventListener(r,o))}function R(){g(()=>(m++===0&&(document.addEventListener("keydown",y,true),document.addEventListener("pointerenter",u,true),document.addEventListener("focus",u,true)),()=>{--m||(document.removeEventListener("keydown",y,true),document.removeEventListener("pointerenter",u,true),document.removeEventListener("focus",u,true))}),[])}function C(t,e){const n=t.target;!e||n===e||e.contains(n)||k.has(t.key)&&(t.altKey||t.metaKey||t.ctrlKey||n.closest("input, select, textarea, [contenteditable]")||(t.preventDefault(),e.dispatchEvent(new KeyboardEvent("keydown",{key:t.key,shiftKey:t.shiftKey,bubbles:true,cancelable:true}))))}export{K as S,x as T,C as f,w as h};
@@ -1 +1 @@
1
- import{D as Tt,a as yt,g as Nt,i as xt,r as Ot,T as st,d as b,y as C,C as $t,A as O,b as It,u as n,o as Lt,k as rt,v as Mt,$ as St}from"./shared-J3w3gnXD.mjs";import{c as at,a as ct}from"./layout-KL0V-iJu.mjs";import{l as wt,a as Rt,p as At,b as Et,c as zt}from"./vtt-GFssZH8Y.mjs";import{j as Ft}from"./classnames-DukgfdpI.mjs";import{p as Pt}from"./time-B9GZoYcm.mjs";import{b as ot,s as Vt}from"./bringIntoView-CQH5ZgMM.mjs";import{C as Ht}from"./Cue-CJxnDMEy.mjs";import{F as Kt}from"./FieldPill-DCJBz6Vj.mjs";import{l as jt}from"./languageCode-cCpiU0b0.mjs";import{a as qt}from"./Sections-we9U9fXq.mjs";import{T as Dt}from"./Tip-C8J3qsIK.mjs";import{u as Ut}from"./useContainerName-DCbE5JXi.mjs";import"./styles-Ypl9KrSK.mjs";const F=40,P=s=>s.toLocaleLowerCase();function Xt(s,o){if(!o)return s;const v=P(s),f=[];let r=0;for(let u=v.indexOf(o);u>=0;u=v.indexOf(o,u+o.length))u>r&&f.push(s.slice(r,u)),f.push(n("mark",{children:s.slice(u,u+o.length)},u)),r=u+o.length;return r<s.length&&f.push(s.slice(r)),f}const oe=Tt(function({as:o="div",follow:v=true,find:f=true,sticky:r=false,size:u="large",className:it,...lt},ut){const{t:V,langOf:H}=yt(),{clover:d,language:dt}=Nt("Transcript"),k=xt(t=>Ot(t.manifest,t.canvasId)).find(t=>at(t).length>0||ct(t).length>0),m=st(()=>k?[...at(k).map(t=>({...t,kind:"captions"})),...ct(k).map(t=>({...t,kind:"text"}))]:[],[k]),[K,j]=b(0),i=m[K]??m[0];C(()=>{const t=e=>{const c=m.findIndex(l=>l.kind==="captions"&&l.id===e);c>=0&&j(c)};return t(d.captions.get()),d.captions.subscribe(t)},[d,m]);const[a,q]=b([]),[pt,D]=b([]);C(()=>{if(q([]),D([]),!i)return;let t=true;return(i.kind==="captions"?wt(i.id,d.request).then(e=>t&&q(At(e))):Rt(i.id,d.request).then(e=>t&&D(Et(e)))).catch(()=>{}),()=>{t=false}},[i,d]);const g=$t(d.media.subscribe,d.media.get,d.media.get),N=Bt(g,a),L=O(null);C(()=>{var e;if(!v||N<0||!g||g.paused)return;const t=(e=L.current)==null?void 0:e.children[N];t&&ot(t,"nearest")},[N,v,g]);const[U,X]=b(""),p=P(U.trim()),h=st(()=>p?a.flatMap((t,e)=>P(t.text).includes(p)?[e]:[]):[],[a,p]),[M,ft]=b({query:"",at:0}),T=M.query===p?M.at:0,S=O(null),w=O(false),[B,mt]=b({cues:[],count:F}),G=B.cues===a?B.count:F,R=()=>mt({cues:a,count:G+F}),J=O(R);J.current=R;const A=typeof IntersectionObserver<"u",y=A?Math.min(a.length,Math.max(G,N+1,(h[T]??-1)+1)):a.length,Q=O(null);C(()=>{const t=Q.current;if(!t||!A||y>=a.length)return;const e=new IntersectionObserver(c=>{c.some(l=>l.isIntersecting)&&J.current()},{root:Vt(t),rootMargin:"0px 0px 400px 0px"});return e.observe(t),()=>e.disconnect()},[A,y,a.length]);const $=h[T];C(()=>{var e;if($===void 0)return;const t=(e=L.current)==null?void 0:e.children[$];t&&ot(t,"nearest"),w.current=false},[$,p]);const vt=a.length>0;C(()=>{var l;const t=(l=S.current)==null?void 0:l.closest(".clover-transcript-find"),e=t==null?void 0:t.parentElement;if(!r||!t||!e||typeof ResizeObserver>"u")return;const c=new ResizeObserver(()=>e.style.setProperty("--clover-transcript-find",`${t.offsetHeight}px`));return c.observe(t),()=>{c.disconnect(),e.style.removeProperty("--clover-transcript-find")}},[r,vt,f]);const E=It(),W=qt(),Y=m.every(t=>t.kind==="captions")?"playerCaptions":"transcriptLabel",Z=Ut(V(Y),H(Y));if(!k||!i)return null;const gt=m.filter(t=>t.kind==="text").length,_=m.map(t=>{const e=jt(t.language);return t.kind==="captions"?e:gt>1&&e?`TXT ${e}`:"TXT"}),ht=_.map(t=>t&&_.filter(e=>e===t).length===1?t:void 0),tt=i.language&&i.language!=="none"?i.language:void 0,z=m.length>1&&n(rt,{children:[Z.node,n("fieldset",{...Z.props,className:"clover-transcript-languages",children:m.map((t,e)=>{const c=Lt(t.label,dt),l=ht[e],kt=c.text||t.language||String(e+1);return n("label",{className:"clover-transcript-language",children:[n("input",{type:"radio",name:`${E}-language`,checked:e===K,onChange:()=>{j(e),t.kind==="captions"&&d.captions.emit(t.id)}}),l&&n(rt,{children:[n("span",{className:"clover-transcript-code",children:l})," "]}),n("span",{style:l?Mt:void 0,lang:c.text?c.lang:void 0,children:kt}),l&&c.text&&n(Dt,{label:c.text,lang:c.lang})]},t.id)})})]}),et=(t,e=true)=>{if(g){e?Pt(g,t.start):g.currentTime=t.start;return}d.goTo(k.id,{time:t.start})},nt=t=>{const e=a[h[t]];e&&(w.current=true,ft({query:p,at:t}),et(e,false))},bt={position:h.length?T:-1,total:h.length,step:t=>nt(T+t)},x=h.length,I=p?x===0?"contentSearchResultsNone":x===1?"contentSearchResult":"contentSearchResults":null,Ct=f&&i.kind==="captions"&&a.length>0&&n("div",{className:"clover-transcript-find",children:[n(Kt,{ref:S,id:`${E}-find`,value:U,onChange:X,onSubmit:()=>{if(!x)return;const t=M.query===p&&w.current;nt(t?(T+1)%x:T)},onClear:()=>{var t;X(""),(t=S.current)==null||t.focus()},results:p?bt:null,size:u,classes:{form:"clover-transcript-find-field"}}),n("p",{className:"clover-transcript-find-status",role:"status",lang:I?H(I):void 0,children:I?V(I,{count:x}):""})]});return n(o,{ref:ut,className:Ft("clover-transcript",it),"data-sticky":r||void 0,...lt,children:[z&&(W?St(z,W):z),Ct,i.kind==="text"?n("div",{className:"clover-transcript-body",lang:tt,children:pt.map((t,e)=>n("p",{children:t},e))}):n("ol",{ref:L,className:"clover-transcript-cues",id:`${E}-cues`,lang:tt,children:a.slice(0,y).map((t,e)=>n("li",{className:"clover-transcript-cue","aria-current":e===N?"true":void 0,"data-match":p&&h.includes(e)?e===$?"current":"true":void 0,children:n("button",{type:"button",onClick:()=>et(t),onFocus:()=>{y<a.length&&e>=y-5&&R()},children:[n(Ht,{start:t.start,className:"clover-transcript-time"}),n("span",{className:"clover-transcript-text clover-cue-text",children:[t.voice&&n("span",{className:"clover-transcript-voice",children:[t.voice,":"," "]}),Xt(t.text,p)]})]})},`${t.start}-${e}`))}),i.kind==="captions"&&y<a.length&&n("div",{ref:Q,className:"clover-transcript-more","aria-hidden":"true"})]})});function Bt(s,o){const[v,f]=b(-1);return C(()=>{if(!s||!o.length){f(-1);return}const r=()=>f(zt(o,s.currentTime));return r(),s.addEventListener("timeupdate",r),s.addEventListener("seeked",r),()=>{s.removeEventListener("timeupdate",r),s.removeEventListener("seeked",r)}},[s,o]),v}export{oe as Transcript};
1
+ import{D as Tt,a as yt,g as Nt,i as xt,r as Ot,T as st,d as b,y as C,C as $t,A as O,b as It,u as n,o as Lt,k as rt,v as Mt,$ as St}from"./shared-YUjOSBKO.mjs";import{c as at,a as ct}from"./layout-mMHI0lsj.mjs";import{l as wt,a as Rt,p as At,b as Et,c as zt}from"./vtt-DYAOuQoK.mjs";import{j as Ft}from"./classnames-DukgfdpI.mjs";import{p as Pt}from"./time-B9GZoYcm.mjs";import{b as ot,s as Vt}from"./bringIntoView-CQH5ZgMM.mjs";import{C as Ht}from"./Cue-BT2V9VAq.mjs";import{F as Kt}from"./FieldPill-CyEssPVm.mjs";import{l as jt}from"./languageCode-cCpiU0b0.mjs";import{a as qt}from"./Sections-ejwu1_Sm.mjs";import{T as Dt}from"./Tip-IO11xX4x.mjs";import{u as Ut}from"./useContainerName-BpJ3IWY0.mjs";import"./styles-CyuM_fB1.mjs";const F=40,P=s=>s.toLocaleLowerCase();function Xt(s,o){if(!o)return s;const v=P(s),f=[];let r=0;for(let u=v.indexOf(o);u>=0;u=v.indexOf(o,u+o.length))u>r&&f.push(s.slice(r,u)),f.push(n("mark",{children:s.slice(u,u+o.length)},u)),r=u+o.length;return r<s.length&&f.push(s.slice(r)),f}const oe=Tt(function({as:o="div",follow:v=true,find:f=true,sticky:r=false,size:u="large",className:it,...lt},ut){const{t:V,langOf:H}=yt(),{clover:d,language:dt}=Nt("Transcript"),k=xt(t=>Ot(t.manifest,t.canvasId)).find(t=>at(t).length>0||ct(t).length>0),m=st(()=>k?[...at(k).map(t=>({...t,kind:"captions"})),...ct(k).map(t=>({...t,kind:"text"}))]:[],[k]),[K,j]=b(0),i=m[K]??m[0];C(()=>{const t=e=>{const c=m.findIndex(l=>l.kind==="captions"&&l.id===e);c>=0&&j(c)};return t(d.captions.get()),d.captions.subscribe(t)},[d,m]);const[a,q]=b([]),[pt,D]=b([]);C(()=>{if(q([]),D([]),!i)return;let t=true;return(i.kind==="captions"?wt(i.id,d.request).then(e=>t&&q(At(e))):Rt(i.id,d.request).then(e=>t&&D(Et(e)))).catch(()=>{}),()=>{t=false}},[i,d]);const g=$t(d.media.subscribe,d.media.get,d.media.get),N=Bt(g,a),L=O(null);C(()=>{var e;if(!v||N<0||!g||g.paused)return;const t=(e=L.current)==null?void 0:e.children[N];t&&ot(t,"nearest")},[N,v,g]);const[U,X]=b(""),p=P(U.trim()),h=st(()=>p?a.flatMap((t,e)=>P(t.text).includes(p)?[e]:[]):[],[a,p]),[M,ft]=b({query:"",at:0}),T=M.query===p?M.at:0,S=O(null),w=O(false),[B,mt]=b({cues:[],count:F}),G=B.cues===a?B.count:F,R=()=>mt({cues:a,count:G+F}),J=O(R);J.current=R;const A=typeof IntersectionObserver<"u",y=A?Math.min(a.length,Math.max(G,N+1,(h[T]??-1)+1)):a.length,Q=O(null);C(()=>{const t=Q.current;if(!t||!A||y>=a.length)return;const e=new IntersectionObserver(c=>{c.some(l=>l.isIntersecting)&&J.current()},{root:Vt(t),rootMargin:"0px 0px 400px 0px"});return e.observe(t),()=>e.disconnect()},[A,y,a.length]);const $=h[T];C(()=>{var e;if($===void 0)return;const t=(e=L.current)==null?void 0:e.children[$];t&&ot(t,"nearest"),w.current=false},[$,p]);const vt=a.length>0;C(()=>{var l;const t=(l=S.current)==null?void 0:l.closest(".clover-transcript-find"),e=t==null?void 0:t.parentElement;if(!r||!t||!e||typeof ResizeObserver>"u")return;const c=new ResizeObserver(()=>e.style.setProperty("--clover-transcript-find",`${t.offsetHeight}px`));return c.observe(t),()=>{c.disconnect(),e.style.removeProperty("--clover-transcript-find")}},[r,vt,f]);const E=It(),W=qt(),Y=m.every(t=>t.kind==="captions")?"playerCaptions":"transcriptLabel",Z=Ut(V(Y),H(Y));if(!k||!i)return null;const gt=m.filter(t=>t.kind==="text").length,_=m.map(t=>{const e=jt(t.language);return t.kind==="captions"?e:gt>1&&e?`TXT ${e}`:"TXT"}),ht=_.map(t=>t&&_.filter(e=>e===t).length===1?t:void 0),tt=i.language&&i.language!=="none"?i.language:void 0,z=m.length>1&&n(rt,{children:[Z.node,n("fieldset",{...Z.props,className:"clover-transcript-languages",children:m.map((t,e)=>{const c=Lt(t.label,dt),l=ht[e],kt=c.text||t.language||String(e+1);return n("label",{className:"clover-transcript-language",children:[n("input",{type:"radio",name:`${E}-language`,checked:e===K,onChange:()=>{j(e),t.kind==="captions"&&d.captions.emit(t.id)}}),l&&n(rt,{children:[n("span",{className:"clover-transcript-code",children:l})," "]}),n("span",{style:l?Mt:void 0,lang:c.text?c.lang:void 0,children:kt}),l&&c.text&&n(Dt,{label:c.text,lang:c.lang})]},t.id)})})]}),et=(t,e=true)=>{if(g){e?Pt(g,t.start):g.currentTime=t.start;return}d.goTo(k.id,{time:t.start})},nt=t=>{const e=a[h[t]];e&&(w.current=true,ft({query:p,at:t}),et(e,false))},bt={position:h.length?T:-1,total:h.length,step:t=>nt(T+t)},x=h.length,I=p?x===0?"contentSearchResultsNone":x===1?"contentSearchResult":"contentSearchResults":null,Ct=f&&i.kind==="captions"&&a.length>0&&n("div",{className:"clover-transcript-find",children:[n(Kt,{ref:S,id:`${E}-find`,value:U,onChange:X,onSubmit:()=>{if(!x)return;const t=M.query===p&&w.current;nt(t?(T+1)%x:T)},onClear:()=>{var t;X(""),(t=S.current)==null||t.focus()},results:p?bt:null,size:u,classes:{form:"clover-transcript-find-field"}}),n("p",{className:"clover-transcript-find-status",role:"status",lang:I?H(I):void 0,children:I?V(I,{count:x}):""})]});return n(o,{ref:ut,className:Ft("clover-transcript",it),"data-sticky":r||void 0,...lt,children:[z&&(W?St(z,W):z),Ct,i.kind==="text"?n("div",{className:"clover-transcript-body",lang:tt,children:pt.map((t,e)=>n("p",{children:t},e))}):n("ol",{ref:L,className:"clover-transcript-cues",id:`${E}-cues`,lang:tt,children:a.slice(0,y).map((t,e)=>n("li",{className:"clover-transcript-cue","aria-current":e===N?"true":void 0,"data-match":p&&h.includes(e)?e===$?"current":"true":void 0,children:n("button",{type:"button",onClick:()=>et(t),onFocus:()=>{y<a.length&&e>=y-5&&R()},children:[n(Ht,{start:t.start,className:"clover-transcript-time"}),n("span",{className:"clover-transcript-text clover-cue-text",children:[t.voice&&n("span",{className:"clover-transcript-voice",children:[t.voice,":"," "]}),Xt(t.text,p)]})]})},`${t.start}-${e}`))}),i.kind==="captions"&&y<a.length&&n("div",{ref:Q,className:"clover-transcript-more","aria-hidden":"true"})]})});function Bt(s,o){const[v,f]=b(-1);return C(()=>{if(!s||!o.length){f(-1);return}const r=()=>f(zt(o,s.currentTime));return r(),s.addEventListener("timeupdate",r),s.addEventListener("seeked",r),()=>{s.removeEventListener("timeupdate",r),s.removeEventListener("seeked",r)}},[s,o]),v}export{oe as Transcript};
@@ -1 +1 @@
1
- import{j as p,af as g,ag as u,ae as f}from"./shared-J3w3gnXD.mjs";const y=100;async function l(t,n,i){if(typeof t=="string")return await f(n,t,i);const e=t;return e!=null&&e.id&&e.type==="AnnotationPage"&&!e.items?await f(n,e.id,i):e}async function w(t,n,i){const e=String((t==null?void 0:t.type)??(t==null?void 0:t["@type"])??""),c=/AnnotationCollection/.test(e),o=c?[]:[t],d=new Set(c?[]:[t.id]);let a=c?t.first:t.next;for(;a&&o.length<y;){const r=typeof a=="string"?a:a.id;if(d.has(r??a))break;d.add(r??a);const s=await l(a,n,i);o.push(s),a=s.next}return o}async function A(t,{request:n,signal:i}={}){const e=[];for(const c of p(t)){const o=await l(c,n,i);for(const d of await w(o,n,i)){const a=await g(d),r=a.id??`added-${e.length}`,s=u(a,r);s.length&&e.push({id:r,label:a.label??o.label,source:"added",entries:s})}}return e}export{A as loadAnnotationSets};
1
+ import{j as p,af as g,ag as u,ae as f}from"./shared-YUjOSBKO.mjs";const y=100;async function l(t,n,i){if(typeof t=="string")return await f(n,t,i);const e=t;return e!=null&&e.id&&e.type==="AnnotationPage"&&!e.items?await f(n,e.id,i):e}async function w(t,n,i){const e=String((t==null?void 0:t.type)??(t==null?void 0:t["@type"])??""),c=/AnnotationCollection/.test(e),o=c?[]:[t],d=new Set(c?[]:[t.id]);let a=c?t.first:t.next;for(;a&&o.length<y;){const r=typeof a=="string"?a:a.id;if(d.has(r??a))break;d.add(r??a);const s=await l(a,n,i);o.push(s),a=s.next}return o}async function A(t,{request:n,signal:i}={}){const e=[];for(const c of p(t)){const o=await l(c,n,i);for(const d of await w(o,n,i)){const a=await g(d),r=a.id??`added-${e.length}`,s=u(a,r);s.length&&e.push({id:r,label:a.label??o.label,source:"added",entries:s})}}return e}export{A as loadAnnotationSets};
@@ -1 +1 @@
1
- import{loadAnnotationSets as f}from"./annotation-collection-ZPyvpLFc.mjs";import{F as o,ah as r,H as d}from"./shared-J3w3gnXD.mjs";async function w(s,t){const i=await f(s,t),e=i.flatMap(n=>n.entries),a=e.find(n=>t.manifestId&&o(n.annotation)===t.manifestId)??e.find(n=>o(n.annotation));if(!a)throw new r("The annotations name no Manifest");return{manifest:await d({id:o(a.annotation),type:"Manifest"},t),target:{canvasId:a.canvasId},annotationSets:i,pick:a.id}}export{w as annotationsContent};
1
+ import{loadAnnotationSets as f}from"./annotation-collection-Csv7WIlm.mjs";import{F as o,ah as r,H as d}from"./shared-YUjOSBKO.mjs";async function w(s,t){const i=await f(s,t),e=i.flatMap(n=>n.entries),a=e.find(n=>t.manifestId&&o(n.annotation)===t.manifestId)??e.find(n=>o(n.annotation));if(!a)throw new r("The annotations name no Manifest");return{manifest:await d({id:o(a.annotation),type:"Manifest"},t),target:{canvasId:a.canvasId},annotationSets:i,pick:a.id}}export{w as annotationsContent};
@@ -1 +1 @@
1
- import{c as m,T as u,e as B,u as r,f as g,l as p}from"./shared-J3w3gnXD.mjs";import{B as y}from"./Body-DMEERFuB.mjs";import{u as L,P as b}from"./nodes-Bf-Fb7e5.mjs";import{Toggle as h}from"./toggle-AS72kq6v.mjs";const R={height:"100%"},T=e=>[...e.children].find(s=>s.localName==="clover-panel-toggle")??null,C=e=>e instanceof HTMLElement&&e.localName==="button";function P({hosted:e,props:s}){const a=L(e.element,()=>T(e.element),Object.is),{controlButtons:n,renderers:l,onReady:c,...d}=s,o=m(g,!!n),t=m(p,!!l),i=u(()=>o==null?void 0:o.toControlButtons(n),[o,n]),f=u(()=>t==null?void 0:t.toRenderers(l),[t,l]);return B(c),n&&!o||l&&!t?null:r(y,{...d,onReady:c,controlButtons:i,renderers:f,style:R,children:[a&&r(h,{element:a}),r(b,{from:e.element,picks:C})]})}export{P as BodyElement};
1
+ import{c as m,T as u,e as B,u as r,f as g,l as p}from"./shared-YUjOSBKO.mjs";import{B as y}from"./Body-DxSz3iST.mjs";import{u as L,P as b}from"./nodes-B7JRwBgl.mjs";import{Toggle as h}from"./toggle-BQTjR1I3.mjs";const R={height:"100%"},T=e=>[...e.children].find(s=>s.localName==="clover-panel-toggle")??null,C=e=>e instanceof HTMLElement&&e.localName==="button";function P({hosted:e,props:s}){const a=L(e.element,()=>T(e.element),Object.is),{controlButtons:n,renderers:l,onReady:c,...d}=s,o=m(g,!!n),t=m(p,!!l),i=u(()=>o==null?void 0:o.toControlButtons(n),[o,n]),f=u(()=>t==null?void 0:t.toRenderers(l),[t,l]);return B(c),n&&!o||l&&!t?null:r(y,{...d,onReady:c,controlButtons:i,renderers:f,style:R,children:[a&&r(h,{element:a}),r(b,{from:e.element,picks:C})]})}export{P as BodyElement};
@@ -1 +1 @@
1
- import{K as l,u as o,z as i,P as r,c as f,T as v,e as C,f as m}from"./shared-J3w3gnXD.mjs";import{C as b}from"./CanvasView-B8lMMSou.mjs";import{r as s}from"./rendererSurface-DAvatpMF.mjs";import{C as c}from"./Pending-BspZajh5.mjs";const B=i(()=>import("./Connected-B0S1HXQb.mjs")),h=i(()=>import("./LoadedCanvas-DWz5IK5m.mjs")),k=n=>{const a=l();if(n.iiifContent!==void 0&&n.canvases===void 0)return o(r,{fallback:o(c,{}),children:o(h,{...n,surface:s})});const e=n.canvases!==void 0||n.body!==void 0||n.src!==void 0;return a&&!e?o(r,{fallback:o(c,{}),children:o(B,{...n,surface:s})}):o(b,{...n,surface:s})};function w({props:n}){const{controlButtons:a,onReady:e,...d}=n,t=f(m,!!a),u=v(()=>t==null?void 0:t.toControlButtons(a),[t,a]);return C(e),a&&!t?null:o(k,{...d,onReady:e,controlButtons:u})}export{w as CanvasElement};
1
+ import{K as l,u as o,z as i,P as r,c as f,T as v,e as C,f as m}from"./shared-YUjOSBKO.mjs";import{C as b}from"./CanvasView-BI3YzNdK.mjs";import{r as s}from"./rendererSurface-DhIlOjGT.mjs";import{C as c}from"./Pending-BPOQ2z1L.mjs";const B=i(()=>import("./Connected-DCBI-j9H.mjs")),h=i(()=>import("./LoadedCanvas-DOjtxLSe.mjs")),k=n=>{const a=l();if(n.iiifContent!==void 0&&n.canvases===void 0)return o(r,{fallback:o(c,{}),children:o(h,{...n,surface:s})});const e=n.canvases!==void 0||n.body!==void 0||n.src!==void 0;return a&&!e?o(r,{fallback:o(c,{}),children:o(B,{...n,surface:s})}):o(b,{...n,surface:s})};function w({props:n}){const{controlButtons:a,onReady:e,...d}=n,t=f(m,!!a),u=v(()=>t==null?void 0:t.toControlButtons(a),[t,a]);return C(e),a&&!t?null:o(k,{...d,onReady:e,controlButtons:u})}export{w as CanvasElement};
@@ -1,4 +1,4 @@
1
- import{c as ne,F as ae,i as se,M as ie}from"./models-BP2qp9nT.mjs";import{ad as ce,a1 as ue}from"./shared-J3w3gnXD.mjs";const le=["KHR_materials_unlit","KHR_materials_ior","KHR_materials_specular","KHR_mesh_quantization"],Z=1179937895,fe=1313821514,me=5130562;function de(e){const i=new DataView(e);if(i.getUint32(0,true)!==Z)throw new Error("This is not a GLB.");if(i.getUint32(4,true)!==2)throw new Error("Only glTF 2.0 is drawn.");let o,t;const n=Math.min(i.getUint32(8,true),e.byteLength);for(let s=12;s+8<=n;){const c=i.getUint32(s,true),l=i.getUint32(s+4,true),u=s+8;l===fe?o=JSON.parse(new TextDecoder().decode(new Uint8Array(e,u,c))):l===me&&(t=e.slice(u,u+c)),s=u+c}if(!o)throw new Error("The GLB has no JSON chunk.");return{json:o,bin:t}}async function G(e,i,o){const t=new URL(e,i).href,n=t.startsWith("data:")?await fetch(t):await ue(o,t);if(!n.ok)throw new Error(`${t} answered ${n.status}`);return n.arrayBuffer()}const $=new WeakMap;function ve(e,i){const o=(i==null?void 0:i.fetch)??globalThis.fetch,t=$.get(o)??new Map;$.set(o,t);const n=`${ce(i)} ${e}`;let s=t.get(n);return s||(s=he(e,i).finally(()=>t.delete(n)),t.set(n,s)),s}async function he(e,i){const o=await G(e,location.href,i),t=new DataView(o).getUint32(0,true)===Z,{json:n,bin:s}=t?de(o):{json:JSON.parse(new TextDecoder().decode(o))},c=(n.extensionsRequired??[]).filter(a=>!le.includes(a));if(c.length)throw new Error(`Clover's renderer cannot draw this model: it requires ${c.join(", ")}.`);const l=await Promise.all((n.buffers??[]).map((a,m)=>{if(a.uri!==void 0)return G(a.uri,e,i);if(m===0&&s)return s;throw new Error("A buffer of the model has no data.")})),u=await Promise.all((n.images??[]).map(async a=>{try{let m;if(a.bufferView!==void 0){const r=n.bufferViews[a.bufferView];m=new Blob([new Uint8Array(l[r.buffer],r.byteOffset??0,r.byteLength)],{type:a.mimeType})}else if(a.uri!==void 0)m=new Blob([await G(a.uri,e,i)],{type:a.mimeType});else return null;return await createImageBitmap(m,{premultiplyAlpha:"none",colorSpaceConversion:"none"})}catch{return null}}));return{json:n,buffers:l,images:u}}const pe={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},we={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},q=e=>pe[e];function Ee(e,i){const o=e.json.accessors[i],t=q(o.type),n=new Float32Array(o.count*t);if(o.bufferView===void 0)return n;const s=e.json.bufferViews[o.bufferView],c=we[o.componentType],l=s.byteStride||c*t,u=new DataView(e.buffers[s.buffer],(s.byteOffset??0)+(o.byteOffset??0)),a={5120:r=>u.getInt8(r),5121:r=>u.getUint8(r),5122:r=>u.getInt16(r,true),5123:r=>u.getUint16(r,true),5125:r=>u.getUint32(r,true),5126:r=>u.getFloat32(r,true)}[o.componentType]??(()=>0),m=o.normalized?{5120:127,5121:255,5122:32767,5123:65535}[o.componentType]:void 0;for(let r=0;r<o.count;r++)for(let h=0;h<t;h++){const f=a(r*l+h*c);n[r*t+h]=m?Math.max(f/m,-1):f}return n}const ee=()=>new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function O(e,i){const o=new Float32Array(16);for(let t=0;t<4;t++)for(let n=0;n<4;n++){let s=0;for(let c=0;c<4;c++)s+=e[c*4+n]*i[t*4+c];o[t*4+n]=s}return o}function X([e,i,o],[t,n,s,c],[l,u,a]){const m=t+t,r=n+n,h=s+s,f=t*m,y=t*r,p=t*h,w=n*r,N=n*h,S=s*h,k=c*m,B=c*r,I=c*h;return new Float32Array([(1-(w+S))*l,(y+I)*l,(p-B)*l,0,(y-I)*u,(1-(f+S))*u,(N+k)*u,0,(p+B)*a,(N-k)*a,(1-(f+w))*a,0,e,i,o,1])}const K=e=>X(e,[0,0,0,1],[1,1,1]),Te=e=>X([0,0,0],[0,0,0,1],e);function xe([e,i,o]){const t=(n,s)=>{const c=s*Math.PI/180,l=Math.cos(c),u=Math.sin(c),a=ee(),[m,r]=n===0?[1,2]:n===1?[2,0]:[0,1];return a[m*4+m]=l,a[m*4+r]=u,a[r*4+m]=-u,a[r*4+r]=l,a};return O(t(2,o),O(t(1,i),t(0,e)))}function be(e,i,o,t){const n=1/Math.tan(e/2),s=1/(o-t);return new Float32Array([n/i,0,0,0,0,n,0,0,0,0,(t+o)*s,-1,0,0,2*t*o*s,0])}function ye(e,i){const o=u=>{const a=Math.hypot(...u)||1;return[u[0]/a,u[1]/a,u[2]/a]},t=(u,a)=>[u[1]*a[2]-u[2]*a[1],u[2]*a[0]-u[0]*a[2],u[0]*a[1]-u[1]*a[0]],n=(u,a)=>u[0]*a[0]+u[1]*a[1]+u[2]*a[2],s=o([e[0]-i[0],e[1]-i[1],e[2]-i[2]]),c=o(t([0,1,0],s)),l=t(s,c);return new Float32Array([c[0],l[0],s[0],0,c[1],l[1],s[1],0,c[2],l[2],s[2],0,-n(c,e),-n(l,e),-n(s,e),1])}function Ae(e){const[i,o,t,,n,s,c,,l,u,a]=e,m=s*a-c*u,r=c*l-n*a,h=n*u-s*l,f=i*m+o*r+t*h||1;return new Float32Array([m/f,r/f,h/f,(t*u-o*a)/f,(i*a-t*l)/f,(o*l-i*u)/f,(o*c-t*s)/f,(t*n-i*c)/f,(i*s-o*n)/f])}const Re=()=>({min:[1/0,1/0,1/0],max:[-1/0,-1/0,-1/0]});function _e(e){for(let i=0;i<3;i++){let o=0;for(let t=0;t<3;t++)Math.abs(e[i*4+t])>1e-6&&o++;if(o>1)return false}return true}function Me(e,i,o,t){const n=i.json.accessors[o];let s;if(_e(t)&&n.min&&n.max&&!n.normalized){const[l,u]=[n.min,n.max];s=Array.from({length:8},(a,m)=>[m&1?u[0]:l[0],m&2?u[1]:l[1],m&4?u[2]:l[2]]).flat()}else s=Ee(i,o);const c=t;for(let l=0;l+2<s.length;l+=3){const u=s[l],a=s[l+1],m=s[l+2];for(let r=0;r<3;r++){const h=c[r]*u+c[4+r]*a+c[8+r]*m+c[12+r];h<e.min[r]&&(e.min[r]=h),h>e.max[r]&&(e.max[r]=h)}}return e}const C={normals:1,normalMap:2,unlit:4,mask:8},Y={POSITION:0,NORMAL:1,TEXCOORD_0:2,COLOR_0:3},J=["uBaseTexture","uMetalRoughTexture","uNormalTexture","uOcclusionTexture","uEmissiveTexture"],Ne=`#version 300 es
1
+ import{c as ne,F as ae,i as se,M as ie}from"./models-D1EE_CmH.mjs";import{ad as ce,a1 as ue}from"./shared-YUjOSBKO.mjs";const le=["KHR_materials_unlit","KHR_materials_ior","KHR_materials_specular","KHR_mesh_quantization"],Z=1179937895,fe=1313821514,me=5130562;function de(e){const i=new DataView(e);if(i.getUint32(0,true)!==Z)throw new Error("This is not a GLB.");if(i.getUint32(4,true)!==2)throw new Error("Only glTF 2.0 is drawn.");let o,t;const n=Math.min(i.getUint32(8,true),e.byteLength);for(let s=12;s+8<=n;){const c=i.getUint32(s,true),l=i.getUint32(s+4,true),u=s+8;l===fe?o=JSON.parse(new TextDecoder().decode(new Uint8Array(e,u,c))):l===me&&(t=e.slice(u,u+c)),s=u+c}if(!o)throw new Error("The GLB has no JSON chunk.");return{json:o,bin:t}}async function G(e,i,o){const t=new URL(e,i).href,n=t.startsWith("data:")?await fetch(t):await ue(o,t);if(!n.ok)throw new Error(`${t} answered ${n.status}`);return n.arrayBuffer()}const $=new WeakMap;function ve(e,i){const o=(i==null?void 0:i.fetch)??globalThis.fetch,t=$.get(o)??new Map;$.set(o,t);const n=`${ce(i)} ${e}`;let s=t.get(n);return s||(s=he(e,i).finally(()=>t.delete(n)),t.set(n,s)),s}async function he(e,i){const o=await G(e,location.href,i),t=new DataView(o).getUint32(0,true)===Z,{json:n,bin:s}=t?de(o):{json:JSON.parse(new TextDecoder().decode(o))},c=(n.extensionsRequired??[]).filter(a=>!le.includes(a));if(c.length)throw new Error(`Clover's renderer cannot draw this model: it requires ${c.join(", ")}.`);const l=await Promise.all((n.buffers??[]).map((a,m)=>{if(a.uri!==void 0)return G(a.uri,e,i);if(m===0&&s)return s;throw new Error("A buffer of the model has no data.")})),u=await Promise.all((n.images??[]).map(async a=>{try{let m;if(a.bufferView!==void 0){const r=n.bufferViews[a.bufferView];m=new Blob([new Uint8Array(l[r.buffer],r.byteOffset??0,r.byteLength)],{type:a.mimeType})}else if(a.uri!==void 0)m=new Blob([await G(a.uri,e,i)],{type:a.mimeType});else return null;return await createImageBitmap(m,{premultiplyAlpha:"none",colorSpaceConversion:"none"})}catch{return null}}));return{json:n,buffers:l,images:u}}const pe={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},we={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},q=e=>pe[e];function Ee(e,i){const o=e.json.accessors[i],t=q(o.type),n=new Float32Array(o.count*t);if(o.bufferView===void 0)return n;const s=e.json.bufferViews[o.bufferView],c=we[o.componentType],l=s.byteStride||c*t,u=new DataView(e.buffers[s.buffer],(s.byteOffset??0)+(o.byteOffset??0)),a={5120:r=>u.getInt8(r),5121:r=>u.getUint8(r),5122:r=>u.getInt16(r,true),5123:r=>u.getUint16(r,true),5125:r=>u.getUint32(r,true),5126:r=>u.getFloat32(r,true)}[o.componentType]??(()=>0),m=o.normalized?{5120:127,5121:255,5122:32767,5123:65535}[o.componentType]:void 0;for(let r=0;r<o.count;r++)for(let h=0;h<t;h++){const f=a(r*l+h*c);n[r*t+h]=m?Math.max(f/m,-1):f}return n}const ee=()=>new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function O(e,i){const o=new Float32Array(16);for(let t=0;t<4;t++)for(let n=0;n<4;n++){let s=0;for(let c=0;c<4;c++)s+=e[c*4+n]*i[t*4+c];o[t*4+n]=s}return o}function X([e,i,o],[t,n,s,c],[l,u,a]){const m=t+t,r=n+n,h=s+s,f=t*m,y=t*r,p=t*h,w=n*r,N=n*h,S=s*h,k=c*m,B=c*r,I=c*h;return new Float32Array([(1-(w+S))*l,(y+I)*l,(p-B)*l,0,(y-I)*u,(1-(f+S))*u,(N+k)*u,0,(p+B)*a,(N-k)*a,(1-(f+w))*a,0,e,i,o,1])}const K=e=>X(e,[0,0,0,1],[1,1,1]),Te=e=>X([0,0,0],[0,0,0,1],e);function xe([e,i,o]){const t=(n,s)=>{const c=s*Math.PI/180,l=Math.cos(c),u=Math.sin(c),a=ee(),[m,r]=n===0?[1,2]:n===1?[2,0]:[0,1];return a[m*4+m]=l,a[m*4+r]=u,a[r*4+m]=-u,a[r*4+r]=l,a};return O(t(2,o),O(t(1,i),t(0,e)))}function be(e,i,o,t){const n=1/Math.tan(e/2),s=1/(o-t);return new Float32Array([n/i,0,0,0,0,n,0,0,0,0,(t+o)*s,-1,0,0,2*t*o*s,0])}function ye(e,i){const o=u=>{const a=Math.hypot(...u)||1;return[u[0]/a,u[1]/a,u[2]/a]},t=(u,a)=>[u[1]*a[2]-u[2]*a[1],u[2]*a[0]-u[0]*a[2],u[0]*a[1]-u[1]*a[0]],n=(u,a)=>u[0]*a[0]+u[1]*a[1]+u[2]*a[2],s=o([e[0]-i[0],e[1]-i[1],e[2]-i[2]]),c=o(t([0,1,0],s)),l=t(s,c);return new Float32Array([c[0],l[0],s[0],0,c[1],l[1],s[1],0,c[2],l[2],s[2],0,-n(c,e),-n(l,e),-n(s,e),1])}function Ae(e){const[i,o,t,,n,s,c,,l,u,a]=e,m=s*a-c*u,r=c*l-n*a,h=n*u-s*l,f=i*m+o*r+t*h||1;return new Float32Array([m/f,r/f,h/f,(t*u-o*a)/f,(i*a-t*l)/f,(o*l-i*u)/f,(o*c-t*s)/f,(t*n-i*c)/f,(i*s-o*n)/f])}const Re=()=>({min:[1/0,1/0,1/0],max:[-1/0,-1/0,-1/0]});function _e(e){for(let i=0;i<3;i++){let o=0;for(let t=0;t<3;t++)Math.abs(e[i*4+t])>1e-6&&o++;if(o>1)return false}return true}function Me(e,i,o,t){const n=i.json.accessors[o];let s;if(_e(t)&&n.min&&n.max&&!n.normalized){const[l,u]=[n.min,n.max];s=Array.from({length:8},(a,m)=>[m&1?u[0]:l[0],m&2?u[1]:l[1],m&4?u[2]:l[2]]).flat()}else s=Ee(i,o);const c=t;for(let l=0;l+2<s.length;l+=3){const u=s[l],a=s[l+1],m=s[l+2];for(let r=0;r<3;r++){const h=c[r]*u+c[4+r]*a+c[8+r]*m+c[12+r];h<e.min[r]&&(e.min[r]=h),h>e.max[r]&&(e.max[r]=h)}}return e}const C={normals:1,normalMap:2,unlit:4,mask:8},Y={POSITION:0,NORMAL:1,TEXCOORD_0:2,COLOR_0:3},J=["uBaseTexture","uMetalRoughTexture","uNormalTexture","uOcclusionTexture","uEmissiveTexture"],Ne=`#version 300 es
2
2
  layout(location = 0) in vec3 aPosition;
3
3
  layout(location = 1) in vec3 aNormal;
4
4
  layout(location = 2) in vec2 aUv;
@@ -1 +1 @@
1
- import{j as d,n as m}from"./shared-J3w3gnXD.mjs";function g(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t+"=".repeat((4-t.length%4)%4),i=atob(n);try{return decodeURIComponent(i)}catch{const c=Uint8Array.from(i,r=>r.charCodeAt(0));return new TextDecoder().decode(c)}}function C(e){const t=e.trim();for(const n of[()=>JSON.parse(t),()=>JSON.parse(g(t))])try{const i=n();if(i&&typeof i=="object")return i}catch{}return null}function b(e){if(!e)return;const t=Number(e.split(",")[0]);return Number.isFinite(t)?t:void 0}const u=e=>d(e==null?void 0:e.partOf).find(t=>(t==null?void 0:t.id)&&t.type==="Collection");function A(e){const t=e.type==="Annotation"?d(e.target)[0]:e;if(!t)return null;const n=m(t),i=typeof t=="string"?{id:n.id}:t.type==="SpecificResource"?typeof t.source=="string"?{id:t.source}:t.source??{}:t,c=i.type;if(c==="Manifest"||c==="Collection"){const o=c==="Manifest"?u(i):void 0;return o?{id:o.id,type:"Collection",manifestId:n.id}:{id:n.id,type:c}}const r=d(t.selector).find(o=>(o==null?void 0:o.type)==="PointSelector"&&o.t!=null),a={canvasId:n.id};n.rect&&(a.region=n.rect);const y=(r==null?void 0:r.t)??b(n.t);y!==void 0&&(a.time=Number(y));const s=d(i.partOf).find(o=>(o==null?void 0:o.id)&&(!o.type||o.type==="Manifest")),l=u(s),p=e.type==="Annotation"&&d(e.body).length?{id:e.id??`${n.id}#content-state`,type:"Annotation",motivation:d(e.motivation),body:e.body,target:t}:void 0,f=p?{annotation:p}:{};return l&&s?{id:l.id,type:"Collection",manifestId:s.id,target:a,...f}:s?{id:s.id,type:"Manifest",target:a,...f}:{id:n.id,type:c??"Canvas",target:a,...f}}export{C as decodeContentState,A as resolveContentState};
1
+ import{j as d,n as m}from"./shared-YUjOSBKO.mjs";function g(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t+"=".repeat((4-t.length%4)%4),i=atob(n);try{return decodeURIComponent(i)}catch{const c=Uint8Array.from(i,r=>r.charCodeAt(0));return new TextDecoder().decode(c)}}function C(e){const t=e.trim();for(const n of[()=>JSON.parse(t),()=>JSON.parse(g(t))])try{const i=n();if(i&&typeof i=="object")return i}catch{}return null}function b(e){if(!e)return;const t=Number(e.split(",")[0]);return Number.isFinite(t)?t:void 0}const u=e=>d(e==null?void 0:e.partOf).find(t=>(t==null?void 0:t.id)&&t.type==="Collection");function A(e){const t=e.type==="Annotation"?d(e.target)[0]:e;if(!t)return null;const n=m(t),i=typeof t=="string"?{id:n.id}:t.type==="SpecificResource"?typeof t.source=="string"?{id:t.source}:t.source??{}:t,c=i.type;if(c==="Manifest"||c==="Collection"){const o=c==="Manifest"?u(i):void 0;return o?{id:o.id,type:"Collection",manifestId:n.id}:{id:n.id,type:c}}const r=d(t.selector).find(o=>(o==null?void 0:o.type)==="PointSelector"&&o.t!=null),a={canvasId:n.id};n.rect&&(a.region=n.rect);const y=(r==null?void 0:r.t)??b(n.t);y!==void 0&&(a.time=Number(y));const s=d(i.partOf).find(o=>(o==null?void 0:o.id)&&(!o.type||o.type==="Manifest")),l=u(s),p=e.type==="Annotation"&&d(e.body).length?{id:e.id??`${n.id}#content-state`,type:"Annotation",motivation:d(e.motivation),body:e.body,target:t}:void 0,f=p?{annotation:p}:{};return l&&s?{id:l.id,type:"Collection",manifestId:s.id,target:a,...f}:s?{id:s.id,type:"Manifest",target:a,...f}:{id:n.id,type:c??"Canvas",target:a,...f}}export{C as decodeContentState,A as resolveContentState};
@@ -1 +1 @@
1
- import{u as d,A as v,d as y,_ as g,$ as w,k as A}from"./shared-J3w3gnXD.mjs";const E=new Map;function D(o){if(!o||typeof o!="object")return;const s={};for(const[n,r]of Object.entries(o)){if(typeof r!="function")continue;const u=E.get(n)??new WeakMap;E.set(n,u);let c=u.get(r);c||(c=l=>d(x,{...l,name:n,make:r}),u.set(r,c)),s[n]=c}return s}const B=["id","type","aria-label","lang","aria-keyshortcuts","aria-expanded","aria-controls"];function x({name:o,make:s,buttonProps:n,icon:r,label:u,tip:c}){const l=v(null),[m]=y(()=>{const e=document.createElement("span");return e.style.display="contents",e}),[a,k]=y(null),f=v(n.onClick);return f.current=n.onClick,g(()=>{const e=l.current;if(!e)return;const t=s({name:o,label:u,icon:m});if(!(t instanceof HTMLElement)){console.warn(`controlButtons.${o} returned no element; Clover's own is not drawn either.`);return}const i=t.matches("button")?t:t.querySelector("button")??t,b=h=>{var p;return(p=f.current)==null?void 0:p.call(f,h)};return i.addEventListener("click",b),e.after(t),k(i),()=>{i.removeEventListener("click",b),t.remove(),k(null)}},[s]),g(()=>{if(!a)return;const e=n;for(const t of B){const i=e[t];i===void 0?a.removeAttribute(t):a.setAttribute(t,String(i))}}),d(A,{children:[d("span",{ref:l,hidden:true}),w(r,m),a&&w(c,a)]})}export{D as toControlButtons};
1
+ import{u as d,A as v,d as y,_ as g,$ as w,k as A}from"./shared-YUjOSBKO.mjs";const E=new Map;function D(o){if(!o||typeof o!="object")return;const s={};for(const[n,r]of Object.entries(o)){if(typeof r!="function")continue;const u=E.get(n)??new WeakMap;E.set(n,u);let c=u.get(r);c||(c=l=>d(x,{...l,name:n,make:r}),u.set(r,c)),s[n]=c}return s}const B=["id","type","aria-label","lang","aria-keyshortcuts","aria-expanded","aria-controls"];function x({name:o,make:s,buttonProps:n,icon:r,label:u,tip:c}){const l=v(null),[m]=y(()=>{const e=document.createElement("span");return e.style.display="contents",e}),[a,k]=y(null),f=v(n.onClick);return f.current=n.onClick,g(()=>{const e=l.current;if(!e)return;const t=s({name:o,label:u,icon:m});if(!(t instanceof HTMLElement)){console.warn(`controlButtons.${o} returned no element; Clover's own is not drawn either.`);return}const i=t.matches("button")?t:t.querySelector("button")??t,b=h=>{var p;return(p=f.current)==null?void 0:p.call(f,h)};return i.addEventListener("click",b),e.after(t),k(i),()=>{i.removeEventListener("click",b),t.remove(),k(null)}},[s]),g(()=>{if(!a)return;const e=n;for(const t of B){const i=e[t];i===void 0?a.removeAttribute(t):a.setAttribute(t,String(i))}}),d(A,{children:[d("span",{ref:l,hidden:true}),w(r,m),a&&w(c,a)]})}export{D as toControlButtons};
@@ -1,4 +1,4 @@
1
- import{a0 as jc}from"./shared-J3w3gnXD.mjs";import{F as eu,c as tu,i as nu,M as iu}from"./models-BP2qp9nT.mjs";/**
1
+ import{a0 as jc}from"./shared-YUjOSBKO.mjs";import{F as eu,c as tu,i as nu,M as iu}from"./models-D1EE_CmH.mjs";/**
2
2
  * @license
3
3
  * Copyright 2010-2026 Three.js Authors
4
4
  * SPDX-License-Identifier: MIT
@@ -1 +1 @@
1
- const r=Symbol.for("@nulib/clover/scene-engines"),o=globalThis,c=o[r]??(o[r]=new Map);function s(e,n){c.set(e,n)}const t=()=>import("./cloverEngine-Dbv-26NP.mjs");let i=false;function l(e="clover"){if(e==="clover")return t;const n=c.get(e);return n||(i||(i=true,console.warn(`Clover: no Scene engine "${e}"; drawing with Clover's.`)),t)}export{l as e,s as r};
1
+ const r=Symbol.for("@nulib/clover/scene-engines"),o=globalThis,c=o[r]??(o[r]=new Map);function s(e,n){c.set(e,n)}const t=()=>import("./cloverEngine-B4LinbSt.mjs");let i=false;function l(e="clover"){if(e==="clover")return t;const n=c.get(e);return n||(i||(i=true,console.warn(`Clover: no Scene engine "${e}"; drawing with Clover's.`)),t)}export{l as e,s as r};
@@ -1 +1 @@
1
- import{T as l,o as r}from"./shared-J3w3gnXD.mjs";function a(e,t,u,n){return l(()=>((n==null?void 0:n(e??null,(t==null?void 0:t.id)??null,t==null?void 0:t.duration))??[]).map(o=>{const s=r(o.label,u);return{...o.id?{id:o.id}:{},label:s.text,lang:s.lang,start:o.start,end:o.end}}),[e,t,u,n])}function v(e,t,u,n){if(e.region){if(!t)return false;const{x:o,y:s,w:i,h:f}=e.region;if(!t.fitCanvasRect(e.canvasId,{x:o,y:s,width:i,height:f},true))return false}if(n&&(e.time!==void 0||e.autoplay)){if(!u)return false;const o=()=>{e.time!==void 0&&(u.currentTime=e.time),e.autoplay&&u.play().catch(()=>{})};u.readyState>=HTMLMediaElement.HAVE_METADATA?o():u.addEventListener("loadedmetadata",o,{once:true})}return true}export{v as a,a as u};
1
+ import{T as l,o as r}from"./shared-YUjOSBKO.mjs";function a(e,t,u,n){return l(()=>((n==null?void 0:n(e??null,(t==null?void 0:t.id)??null,t==null?void 0:t.duration))??[]).map(o=>{const s=r(o.label,u);return{...o.id?{id:o.id}:{},label:s.text,lang:s.lang,start:o.start,end:o.end}}),[e,t,u,n])}function v(e,t,u,n){if(e.region){if(!t)return false;const{x:o,y:s,w:i,h:f}=e.region;if(!t.fitCanvasRect(e.canvasId,{x:o,y:s,width:i,height:f},true))return false}if(n&&(e.time!==void 0||e.autoplay)){if(!u)return false;const o=()=>{e.time!==void 0&&(u.currentTime=e.time),e.autoplay&&u.play().catch(()=>{})};u.readyState>=HTMLMediaElement.HAVE_METADATA?o():u.addEventListener("loadedmetadata",o,{once:true})}return true}export{v as a,a as u};
@@ -1 +1 @@
1
- import{u as o,k as e}from"./shared-J3w3gnXD.mjs";const s=()=>o("path",{fillRule:"evenodd",stroke:"none",d:"M144 72H368A96 96 0 0 1 464 168V296A96 96 0 0 1 368 392H200L104 460L144 392A96 96 0 0 1 48 296V168A96 96 0 0 1 144 72Z M168 184H344A16 16 0 0 1 344 216H168A16 16 0 0 1 168 184Z M168 264H280A16 16 0 0 1 280 296H168A16 16 0 0 1 168 264Z"}),t=()=>o("path",{stroke:"none",d:"M256 72A48 48 0 1 1 256 168A48 48 0 1 1 256 72Z M192 216H296V384H328V432H184V384H216V264H192Z"}),c=()=>o("path",{strokeLinejoin:"round",strokeWidth:"40",d:"M184 128V384L392 256Z"}),a=()=>o("path",{strokeLinecap:"round",strokeWidth:"45",d:"M154 154L358 358M358 154L154 358"}),h=()=>o(e,{children:[o("path",{stroke:"none",d:"m456.69,421.39l-94.09-94.09c22.65-30.16,34.88-66.86,34.84-104.58,0-96.34-78.38-174.72-174.72-174.72S48,126.38,48,222.72s78.38,174.72,174.72,174.72c37.72.04,74.42-12.19,104.58-34.84l94.09,94.09c10.29,9.2,26.1,8.32,35.3-1.98,8.48-9.49,8.48-23.83,0-33.32Zm-233.97-73.87c-68.89-.08-124.72-55.91-124.8-124.8h0c0-68.93,55.87-124.8,124.8-124.8s124.8,55.87,124.8,124.8-55.87,124.8-124.8,124.8Z"}),o("path",{stroke:"none",d:"m279.5,197.76h-3.35s-28.47,0-28.47,0v-31.82c-.77-13.79-12.57-24.33-26.36-23.56-12.71.71-22.85,10.86-23.56,23.56v3.35h0v28.47h-31.82c-13.79.77-24.33,12.57-23.56,26.36.71,12.71,10.86,22.85,23.56,23.56h3.35s28.47,0,28.47,0v31.82c.77,13.79,12.57,24.33,26.36,23.56,12.71-.71,22.85-10.86,23.56-23.56v-3.35h0v-28.47h31.82c13.79-.77,24.33-12.57,23.56-26.36-.71-12.71-10.86-22.85-23.56-23.56Z"})]}),r=()=>o(e,{children:[o("path",{stroke:"none",d:"m456.69,421.39l-94.09-94.09c22.65-30.16,34.88-66.86,34.84-104.58,0-96.34-78.38-174.72-174.72-174.72S48,126.38,48,222.72s78.38,174.72,174.72,174.72c37.72.04,74.42-12.19,104.58-34.84l94.09,94.09c10.29,9.2,26.1,8.32,35.3-1.98,8.48-9.49,8.48-23.83,0-33.32Zm-233.97-73.87c-68.89-.08-124.72-55.91-124.8-124.8h0c0-68.93,55.87-124.8,124.8-124.8s124.8,55.87,124.8,124.8-55.87,124.8-124.8,124.8Z"}),o("path",{stroke:"none",d:"M167.26 197.76H278.1a24.96 24.96 0 0 1 0 49.92H167.26a24.96 24.96 0 0 1 0-49.92Z"})]});export{a as C,t as I,h as O,c as P,s as a,r as b};
1
+ import{u as o,k as e}from"./shared-YUjOSBKO.mjs";const s=()=>o("path",{fillRule:"evenodd",stroke:"none",d:"M144 72H368A96 96 0 0 1 464 168V296A96 96 0 0 1 368 392H200L104 460L144 392A96 96 0 0 1 48 296V168A96 96 0 0 1 144 72Z M168 184H344A16 16 0 0 1 344 216H168A16 16 0 0 1 168 184Z M168 264H280A16 16 0 0 1 280 296H168A16 16 0 0 1 168 264Z"}),t=()=>o("path",{stroke:"none",d:"M256 72A48 48 0 1 1 256 168A48 48 0 1 1 256 72Z M192 216H296V384H328V432H184V384H216V264H192Z"}),c=()=>o("path",{strokeLinejoin:"round",strokeWidth:"40",d:"M184 128V384L392 256Z"}),a=()=>o("path",{strokeLinecap:"round",strokeWidth:"45",d:"M154 154L358 358M358 154L154 358"}),h=()=>o(e,{children:[o("path",{stroke:"none",d:"m456.69,421.39l-94.09-94.09c22.65-30.16,34.88-66.86,34.84-104.58,0-96.34-78.38-174.72-174.72-174.72S48,126.38,48,222.72s78.38,174.72,174.72,174.72c37.72.04,74.42-12.19,104.58-34.84l94.09,94.09c10.29,9.2,26.1,8.32,35.3-1.98,8.48-9.49,8.48-23.83,0-33.32Zm-233.97-73.87c-68.89-.08-124.72-55.91-124.8-124.8h0c0-68.93,55.87-124.8,124.8-124.8s124.8,55.87,124.8,124.8-55.87,124.8-124.8,124.8Z"}),o("path",{stroke:"none",d:"m279.5,197.76h-3.35s-28.47,0-28.47,0v-31.82c-.77-13.79-12.57-24.33-26.36-23.56-12.71.71-22.85,10.86-23.56,23.56v3.35h0v28.47h-31.82c-13.79.77-24.33,12.57-23.56,26.36.71,12.71,10.86,22.85,23.56,23.56h3.35s28.47,0,28.47,0v31.82c.77,13.79,12.57,24.33,26.36,23.56,12.71-.71,22.85-10.86,23.56-23.56v-3.35h0v-28.47h31.82c13.79-.77,24.33-12.57,23.56-26.36-.71-12.71-10.86-22.85-23.56-23.56Z"})]}),r=()=>o(e,{children:[o("path",{stroke:"none",d:"m456.69,421.39l-94.09-94.09c22.65-30.16,34.88-66.86,34.84-104.58,0-96.34-78.38-174.72-174.72-174.72S48,126.38,48,222.72s78.38,174.72,174.72,174.72c37.72.04,74.42-12.19,104.58-34.84l94.09,94.09c10.29,9.2,26.1,8.32,35.3-1.98,8.48-9.49,8.48-23.83,0-33.32Zm-233.97-73.87c-68.89-.08-124.72-55.91-124.8-124.8h0c0-68.93,55.87-124.8,124.8-124.8s124.8,55.87,124.8,124.8-55.87,124.8-124.8,124.8Z"}),o("path",{stroke:"none",d:"M167.26 197.76H278.1a24.96 24.96 0 0 1 0 49.92H167.26a24.96 24.96 0 0 1 0-49.92Z"})]});export{a as C,t as I,h as O,c as P,s as a,r as b};
@@ -1 +1 @@
1
- import{i as n,T as i,g as o,a5 as c,Z as f,L as l,E as u,r as v,a as r,o as g}from"./shared-J3w3gnXD.mjs";function C(){const s=n(a=>a.status),e=n(a=>a.error);return i(()=>({status:s,error:e}),[s,e])}function d(){return n(s=>s.manifest)}function L(){return n(s=>u(s.manifest))}function S(){return n(s=>v(s.manifest,s.canvasId))}function b(){return n(s=>f(s.manifest,s.canvasId))}function p(){const{clover:s}=o("useNavigation"),e=n(t=>l(t.manifest,t.canvasId)),a=n(t=>u(t.manifest).views.length);return i(()=>c(s,e,a),[s,e,a])}function z(s){const{language:e}=o("useLocalized");return i(()=>g(s,e),[s,e])}function I(){return r().t}function O(){return r().langOf}export{C as a,p as b,L as c,d,b as e,I as f,O as g,z as h,S as u};
1
+ import{i as n,T as i,g as o,a5 as c,Z as f,L as l,E as u,r as v,a as r,o as g}from"./shared-YUjOSBKO.mjs";function C(){const s=n(a=>a.status),e=n(a=>a.error);return i(()=>({status:s,error:e}),[s,e])}function d(){return n(s=>s.manifest)}function L(){return n(s=>u(s.manifest))}function S(){return n(s=>v(s.manifest,s.canvasId))}function b(){return n(s=>f(s.manifest,s.canvasId))}function p(){const{clover:s}=o("useNavigation"),e=n(t=>l(t.manifest,t.canvasId)),a=n(t=>u(t.manifest).views.length);return i(()=>c(s,e,a),[s,e,a])}function z(s){const{language:e}=o("useLocalized");return i(()=>g(s,e),[s,e])}function I(){return r().t}function O(){return r().langOf}export{C as a,p as b,L as c,d,b as e,I as f,O as g,z as h,S as u};
@@ -1 +1 @@
1
- import{a1 as j}from"./shared-J3w3gnXD.mjs";const S=["jpg","png","webp","gif"];class y extends Error{constructor(t,e,i){super(t),this.url=e,this.status=i,this.name="ImageServiceError"}}function g(r){return r.replace(/\/info\.json$/,"").replace(/\/+$/,"")}function O(r){const t=Array.isArray(r)?r:r?[r]:[];for(const e of t){if(!e||typeof e!="object")continue;const i=e,o=String(i.type??i["@type"]??""),s=JSON.stringify(i.profile??""),n=/ImageService/i.test(o)||/iiif\.io\/api\/image/.test(s)||/^"level[012]"$/.test(s)||!o&&!i.profile,c=i["@id"]??i.id;if(n&&typeof c=="string")return g(c)}}function F(r,t){if(!r||typeof r!="object")throw new y("info.json is not an object",t??"");const e=r,i=N(e),o=i===3?e.id??e["@id"]:e["@id"]??e.id,s=g(o??t??""),n=Number(e.width),c=Number(e.height);if(!s||!(n>0)||!(c>0))throw new y("info.json is missing id, width or height",t??s);const f=Array.isArray(e.profile)?e.profile:[e.profile],b=f.find(a=>typeof a=="string"),w=f.filter(a=>!!a&&typeof a=="object"),l=I(b),d=new Set([...Array.isArray(e.extraFeatures)?e.extraFeatures:[],...w.flatMap(a=>Array.isArray(a.supports)?a.supports:[])]),x=[...Array.isArray(e.preferredFormats)?e.preferredFormats:[]].map(a=>String(a).toLowerCase()).find(a=>S.includes(a))??"jpg",m=a=>{var A;const v=e[a]??((A=w.find($=>$[a]!==void 0))==null?void 0:A[a]);return Number(v)>0?Number(v):void 0};let u=m("maxWidth"),h=m("maxHeight");return u&&!h&&(h=u),h&&!u&&(u=void 0),{id:s,version:i,level:l,width:n,height:c,tiles:z(e.tiles),sizes:B(e.sizes),maxWidth:u,maxHeight:h,maxArea:m("maxArea"),regionByPx:l>=1||d.has("regionByPx"),sizeByW:l>=1||d.has("sizeByW")||d.has("sizeByWh"),format:x,quality:"default"}}function N(r){const t=[].concat(r["@context"]??[]).map(String);return t.some(e=>e.includes("/image/3"))?3:t.some(e=>e.includes("/image/2"))?2:r.type==="ImageService3"?3:r["@id"]?2:3}function I(r){const t=r==null?void 0:r.match(/level([012])/);return t?Number(t[1]):0}function z(r){return Array.isArray(r)?r.map(t=>{const e=Number(t==null?void 0:t.width),i=Number((t==null?void 0:t.height)??(t==null?void 0:t.width)),o=(Array.isArray(t==null?void 0:t.scaleFactors)?t.scaleFactors:[1]).map(Number).filter(s=>s>0).sort((s,n)=>s-n);return{width:e,height:i,scaleFactors:o}}).filter(t=>t.width>0&&t.height>0&&t.scaleFactors.length):[]}function B(r){return Array.isArray(r)?r.map(t=>({width:Number(t==null?void 0:t.width),height:Number(t==null?void 0:t.height)})).filter(t=>t.width>0&&t.height>0).sort((t,e)=>t.width-e.width):[]}function P(r,t,e,i,o=r.quality){const s=t.x===0&&t.y===0&&t.width===r.width&&t.height===r.height,n=s?"full":`${t.x},${t.y},${t.width},${t.height}`,c=s&&e===r.width&&i===r.height;let f;return r.version===3?f=c?"max":`${e},${i}`:f=c?"full":`${e},`,`${r.id}/${n}/${f}/0/${o}.${r.format}`}function C(r){return r.version===2&&r.level===0?"native":void 0}const p=new Map;function L(r,{request:t}={}){const e=g(r),i=p.get(e);if(i)return i;const o=`${e}/info.json`,s=j(t,o,{headers:{Accept:"application/ld+json, application/json"}}).then(async n=>{if(!n.ok)throw new y(`info.json request failed with ${n.status}`,o,n.status);return F(await n.json(),e)}).catch(n=>{throw p.delete(e),n});return p.set(e,s),s}export{C as a,L as b,O as f,P as i};
1
+ import{a1 as j}from"./shared-YUjOSBKO.mjs";const S=["jpg","png","webp","gif"];class y extends Error{constructor(t,e,i){super(t),this.url=e,this.status=i,this.name="ImageServiceError"}}function g(r){return r.replace(/\/info\.json$/,"").replace(/\/+$/,"")}function O(r){const t=Array.isArray(r)?r:r?[r]:[];for(const e of t){if(!e||typeof e!="object")continue;const i=e,o=String(i.type??i["@type"]??""),s=JSON.stringify(i.profile??""),n=/ImageService/i.test(o)||/iiif\.io\/api\/image/.test(s)||/^"level[012]"$/.test(s)||!o&&!i.profile,c=i["@id"]??i.id;if(n&&typeof c=="string")return g(c)}}function F(r,t){if(!r||typeof r!="object")throw new y("info.json is not an object",t??"");const e=r,i=N(e),o=i===3?e.id??e["@id"]:e["@id"]??e.id,s=g(o??t??""),n=Number(e.width),c=Number(e.height);if(!s||!(n>0)||!(c>0))throw new y("info.json is missing id, width or height",t??s);const f=Array.isArray(e.profile)?e.profile:[e.profile],b=f.find(a=>typeof a=="string"),w=f.filter(a=>!!a&&typeof a=="object"),l=I(b),d=new Set([...Array.isArray(e.extraFeatures)?e.extraFeatures:[],...w.flatMap(a=>Array.isArray(a.supports)?a.supports:[])]),x=[...Array.isArray(e.preferredFormats)?e.preferredFormats:[]].map(a=>String(a).toLowerCase()).find(a=>S.includes(a))??"jpg",m=a=>{var A;const v=e[a]??((A=w.find($=>$[a]!==void 0))==null?void 0:A[a]);return Number(v)>0?Number(v):void 0};let u=m("maxWidth"),h=m("maxHeight");return u&&!h&&(h=u),h&&!u&&(u=void 0),{id:s,version:i,level:l,width:n,height:c,tiles:z(e.tiles),sizes:B(e.sizes),maxWidth:u,maxHeight:h,maxArea:m("maxArea"),regionByPx:l>=1||d.has("regionByPx"),sizeByW:l>=1||d.has("sizeByW")||d.has("sizeByWh"),format:x,quality:"default"}}function N(r){const t=[].concat(r["@context"]??[]).map(String);return t.some(e=>e.includes("/image/3"))?3:t.some(e=>e.includes("/image/2"))?2:r.type==="ImageService3"?3:r["@id"]?2:3}function I(r){const t=r==null?void 0:r.match(/level([012])/);return t?Number(t[1]):0}function z(r){return Array.isArray(r)?r.map(t=>{const e=Number(t==null?void 0:t.width),i=Number((t==null?void 0:t.height)??(t==null?void 0:t.width)),o=(Array.isArray(t==null?void 0:t.scaleFactors)?t.scaleFactors:[1]).map(Number).filter(s=>s>0).sort((s,n)=>s-n);return{width:e,height:i,scaleFactors:o}}).filter(t=>t.width>0&&t.height>0&&t.scaleFactors.length):[]}function B(r){return Array.isArray(r)?r.map(t=>({width:Number(t==null?void 0:t.width),height:Number(t==null?void 0:t.height)})).filter(t=>t.width>0&&t.height>0).sort((t,e)=>t.width-e.width):[]}function P(r,t,e,i,o=r.quality){const s=t.x===0&&t.y===0&&t.width===r.width&&t.height===r.height,n=s?"full":`${t.x},${t.y},${t.width},${t.height}`,c=s&&e===r.width&&i===r.height;let f;return r.version===3?f=c?"max":`${e},${i}`:f=c?"full":`${e},`,`${r.id}/${n}/${f}/0/${o}.${r.format}`}function C(r){return r.version===2&&r.level===0?"native":void 0}const p=new Map;function L(r,{request:t}={}){const e=g(r),i=p.get(e);if(i)return i;const o=`${e}/info.json`,s=j(t,o,{headers:{Accept:"application/ld+json, application/json"}}).then(async n=>{if(!n.ok)throw new y(`info.json request failed with ${n.status}`,o,n.status);return F(await n.json(),e)}).catch(n=>{throw p.delete(e),n});return p.set(e,s),s}export{C as a,L as b,O as f,P as i};