diff --git a/404.html b/404.html index beaf1bb7..cb479641 100644 --- a/404.html +++ b/404.html @@ -1 +1 @@ -404: This page could not be found

404

This page could not be found.

\ No newline at end of file +404: This page could not be found

404

This page could not be found.

\ No newline at end of file diff --git a/_next/static/fa5r_khA3BGHtzTjMHOG9/_buildManifest.js b/_next/static/VlaPyGdo8QsL7_FqbCOWT/_buildManifest.js similarity index 81% rename from _next/static/fa5r_khA3BGHtzTjMHOG9/_buildManifest.js rename to _next/static/VlaPyGdo8QsL7_FqbCOWT/_buildManifest.js index bda27f32..bf844c7a 100644 --- a/_next/static/fa5r_khA3BGHtzTjMHOG9/_buildManifest.js +++ b/_next/static/VlaPyGdo8QsL7_FqbCOWT/_buildManifest.js @@ -1 +1 @@ -self.__BUILD_MANIFEST=function(s,c,e,a,d,t,o,i,r,n,b){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/":[e,s,c,a,d,o,i,t,r,n,"static/chunks/pages/index-6a1f06c1d9a1ff3c.js"],"/_error":["static/chunks/pages/_error-e2426e9e19aa5a2c.js"],"/docs":[s,c,"static/chunks/pages/docs-3c5d2e45ea99b6dd.js"],"/docs/composing":[s,c,"static/chunks/pages/docs/composing-ddd2b3df59986657.js"],"/docs/homepage":[e,s,c,a,d,t,"static/chunks/pages/docs/homepage-af1cbce51e7e506b.js"],"/docs/image":[s,c,o,"static/chunks/pages/docs/image-b9d3efdef25688d0.js"],"/docs/label":[e,s,c,a,d,t,"static/chunks/pages/docs/label-1a34a67441319d0c.js"],"/docs/metadata":[e,s,c,a,d,t,"static/chunks/pages/docs/metadata-7e4d0190398bf79b.js"],"/docs/partOf":[e,s,c,a,d,t,"static/chunks/pages/docs/partOf-6414343e1db14ab5.js"],"/docs/rendering":[e,s,c,a,d,t,"static/chunks/pages/docs/rendering-5ec34dffa0660607.js"],"/docs/requiredStatement":[e,s,c,a,d,t,"static/chunks/pages/docs/requiredStatement-b157370cce8881ac.js"],"/docs/scroll":[s,c,o,"static/chunks/pages/docs/scroll-85743f1c8d98d09f.js"],"/docs/scroll/demo":[s,c,o,b,"static/chunks/pages/docs/scroll/demo-cc5a5bdbd8d9f1d4.js"],"/docs/seeAlso":[e,s,c,a,d,t,"static/chunks/pages/docs/seeAlso-0daae0d99112d518.js"],"/docs/slider":[e,s,c,a,d,i,t,r,n,"static/chunks/pages/docs/slider-0fdadcae30c343f3.js"],"/docs/slider/demo":[e,s,c,a,d,b,i,t,r,n,"static/chunks/pages/docs/slider/demo-687179752687c29c.js"],"/docs/summary":[e,s,c,a,d,t,"static/chunks/pages/docs/summary-d20b604cc7c5a0de.js"],"/docs/thumbnail":[e,s,c,a,d,t,"static/chunks/pages/docs/thumbnail-2217015da6f332d7.js"],"/docs/viewer":[s,c,o,"static/chunks/pages/docs/viewer-19f912e4f92bdc6e.js"],"/docs/viewer/contentsearch":[s,c,o,"static/chunks/pages/docs/viewer/contentsearch-f775897fd8d93944.js"],"/docs/viewer/demo":[s,c,o,b,"static/chunks/pages/docs/viewer/demo-dcdfd250172facea.js"],sortedPages:["/","/_app","/_error","/docs","/docs/composing","/docs/homepage","/docs/image","/docs/label","/docs/metadata","/docs/partOf","/docs/rendering","/docs/requiredStatement","/docs/scroll","/docs/scroll/demo","/docs/seeAlso","/docs/slider","/docs/slider/demo","/docs/summary","/docs/thumbnail","/docs/viewer","/docs/viewer/contentsearch","/docs/viewer/demo"]}}("static/css/445c4173ffc2bf04.css","static/chunks/356-a37171af083948d7.js","static/chunks/c94dc662-660e9d64bfd7c753.js","static/chunks/196-266dbe427a7fa6a9.js","static/chunks/646-1549be95f1ec4c10.js","static/chunks/792-1f78aa5355df99b4.js","static/chunks/101-1054146d4f4062b1.js","static/chunks/956-334257b9af71be0c.js","static/chunks/321-c9a2fad4e996aaa2.js","static/css/e7f2c32b53a96c4e.css","static/chunks/332-7b824de13587a790.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file +self.__BUILD_MANIFEST=function(s,c,e,a,d,t,o,i,r,n,f){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/":[e,s,c,a,d,o,i,t,r,n,"static/chunks/pages/index-79ee04a8b088a8a9.js"],"/_error":["static/chunks/pages/_error-e2426e9e19aa5a2c.js"],"/docs":[s,c,"static/chunks/pages/docs-3c5d2e45ea99b6dd.js"],"/docs/composing":[s,c,"static/chunks/pages/docs/composing-ddd2b3df59986657.js"],"/docs/homepage":[e,s,c,a,d,t,"static/chunks/pages/docs/homepage-af1cbce51e7e506b.js"],"/docs/image":[s,c,o,"static/chunks/pages/docs/image-b9d3efdef25688d0.js"],"/docs/label":[e,s,c,a,d,t,"static/chunks/pages/docs/label-1a34a67441319d0c.js"],"/docs/metadata":[e,s,c,a,d,t,"static/chunks/pages/docs/metadata-7e4d0190398bf79b.js"],"/docs/partOf":[e,s,c,a,d,t,"static/chunks/pages/docs/partOf-6414343e1db14ab5.js"],"/docs/rendering":[e,s,c,a,d,t,"static/chunks/pages/docs/rendering-5ec34dffa0660607.js"],"/docs/requiredStatement":[e,s,c,a,d,t,"static/chunks/pages/docs/requiredStatement-b157370cce8881ac.js"],"/docs/scroll":[s,c,o,"static/chunks/pages/docs/scroll-85743f1c8d98d09f.js"],"/docs/scroll/demo":[s,c,o,f,"static/chunks/pages/docs/scroll/demo-cc5a5bdbd8d9f1d4.js"],"/docs/seeAlso":[e,s,c,a,d,t,"static/chunks/pages/docs/seeAlso-0daae0d99112d518.js"],"/docs/slider":[e,s,c,a,d,i,t,r,n,"static/chunks/pages/docs/slider-0fdadcae30c343f3.js"],"/docs/slider/demo":[e,s,c,a,d,f,i,t,r,n,"static/chunks/pages/docs/slider/demo-687179752687c29c.js"],"/docs/summary":[e,s,c,a,d,t,"static/chunks/pages/docs/summary-d20b604cc7c5a0de.js"],"/docs/thumbnail":[e,s,c,a,d,t,"static/chunks/pages/docs/thumbnail-2217015da6f332d7.js"],"/docs/viewer":[s,c,o,"static/chunks/pages/docs/viewer-ff7bba4ba2ffe0ae.js"],"/docs/viewer/contentsearch":[s,c,o,"static/chunks/pages/docs/viewer/contentsearch-f8183febfc132ba5.js"],"/docs/viewer/demo":[s,c,o,f,"static/chunks/pages/docs/viewer/demo-d956ae30199064dc.js"],sortedPages:["/","/_app","/_error","/docs","/docs/composing","/docs/homepage","/docs/image","/docs/label","/docs/metadata","/docs/partOf","/docs/rendering","/docs/requiredStatement","/docs/scroll","/docs/scroll/demo","/docs/seeAlso","/docs/slider","/docs/slider/demo","/docs/summary","/docs/thumbnail","/docs/viewer","/docs/viewer/contentsearch","/docs/viewer/demo"]}}("static/css/445c4173ffc2bf04.css","static/chunks/356-a37171af083948d7.js","static/chunks/c94dc662-660e9d64bfd7c753.js","static/chunks/196-266dbe427a7fa6a9.js","static/chunks/646-1549be95f1ec4c10.js","static/chunks/792-1f78aa5355df99b4.js","static/chunks/101-1054146d4f4062b1.js","static/chunks/956-334257b9af71be0c.js","static/chunks/321-c9a2fad4e996aaa2.js","static/css/e7f2c32b53a96c4e.css","static/chunks/332-7b824de13587a790.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/_next/static/fa5r_khA3BGHtzTjMHOG9/_ssgManifest.js b/_next/static/VlaPyGdo8QsL7_FqbCOWT/_ssgManifest.js similarity index 100% rename from _next/static/fa5r_khA3BGHtzTjMHOG9/_ssgManifest.js rename to _next/static/VlaPyGdo8QsL7_FqbCOWT/_ssgManifest.js diff --git a/_next/static/chunks/129.57ee31f7aa8d632c.js b/_next/static/chunks/129.57ee31f7aa8d632c.js deleted file mode 100644 index af771f14..00000000 --- a/_next/static/chunks/129.57ee31f7aa8d632c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[129],{515:function(e,t,o){o.d(t,{c:function(){return n}});let n=(0,o(5455).zo)("button",{display:"flex",height:"2rem",width:"2rem",borderRadius:"2rem",padding:"0",margin:"0",fontFamily:"inherit",background:"none",backgroundColor:"$primary",border:"none",color:"white",cursor:"pointer",marginLeft:"0.618rem",filter:"drop-shadow(2px 2px 5px #0003)",transition:"$all",boxSizing:"content-box !important","&:first-child":{marginLeft:"0"},"@xs":{marginBottom:"0.618rem",marginLeft:"0","&:last-child":{marginBottom:"0"}},svg:{height:"60%",width:"60%",padding:"20%",fill:"$secondary",stroke:"$secondary",filter:"drop-shadow(2px 2px 5px #0003)",transition:"$all",boxSizing:"inherit"},"&:hover, &:focus":{backgroundColor:"$accent"},"&[data-button=rotate-right]":{"&:hover, &:focus":{svg:{rotate:"45deg"}}},"&[data-button=rotate-left]":{transform:"scaleX(-1)","&:hover, &:focus":{svg:{rotate:"45deg"}}},"&[data-button=reset]":{"&:hover, &:focus":{svg:{rotate:"-15deg"}}}})},5129:function(e,t,o){o.r(t),o.d(t,{default:function(){return z}});var n=o(1527),r=o(6661),i=o(8448),a=o(2196),l=o(5455);let s=(0,l.zo)("div",{position:"absolute !important",zIndex:"1",top:"1rem",left:"1rem",width:"161.8px",height:"100px",backgroundColor:"#000D",boxShadow:"5px 5px 5px #0002",borderRadius:"3px",".displayregion":{border:" 3px solid $accent !important",boxShadow:"0 0 3px #0006"},"@sm":{width:"123px",height:"76px"},"@xs":{width:"100px",height:"61.8px"}}),c=(0,l.zo)("div",{position:"relative",width:"100%",height:"100%",zIndex:"0"}),d=(0,l.zo)("div",{width:"100%",height:"100%",maxHeight:"100vh",background:"transparent",backgroundSize:"contain",color:"white",position:"relative",zIndex:"0",overflow:"hidden",variants:{hasNavigator:{true:{["".concat(s)]:{display:"block"}},false:{["".concat(s)]:{display:"none"}}}}});var u=o(9212),h=o.n(u),g=o(959),f=o(515),v=e=>{let{className:t,id:o,label:r,children:i}=e,a=r.toLowerCase().replace(/\s/g,"-");return(0,n.jsx)(f.c,{id:o,className:t,"data-testid":"openseadragon-button","data-button":a,children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"".concat(o,"-svg-title"),"data-testid":"openseadragon-button-svg",focusable:"false",viewBox:"0 0 512 512",role:"img",children:[(0,n.jsx)("title",{id:"".concat(o,"-svg-title"),children:r}),i]})})};let p=(0,l.zo)("div",{position:"absolute",zIndex:"1",top:"1rem",right:"1rem",display:"flex","@xs":{flexDirection:"column",zIndex:"2"},variants:{hasPlaceholder:{true:{right:"3.618rem","@xs":{top:"3.618rem",right:"1rem"}},false:{right:"1rem","@xs":{top:"1rem",right:"1rem"}}}}}),m=()=>(0,n.jsx)("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M256 112v288M400 256H112"}),w=()=>(0,n.jsx)("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M400 256H112"}),x=()=>(0,n.jsx)("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M432 320v112H320M421.8 421.77L304 304M80 192V80h112M90.2 90.23L208 208M320 80h112v112M421.77 90.2L304 208M192 432H80V320M90.23 421.8L208 304"}),b=()=>(0,n.jsx)("path",{d:"M448 440a16 16 0 01-12.61-6.15c-22.86-29.27-44.07-51.86-73.32-67C335 352.88 301 345.59 256 344.23V424a16 16 0 01-27 11.57l-176-168a16 16 0 010-23.14l176-168A16 16 0 01256 88v80.36c74.14 3.41 129.38 30.91 164.35 81.87C449.32 292.44 464 350.9 464 424a16 16 0 01-16 16z"}),y=()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("path",{fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M400 148l-21.12-24.57A191.43 191.43 0 00240 64C134 64 48 150 48 256s86 192 192 192a192.09 192.09 0 00181.07-128"}),(0,n.jsx)("path",{d:"M464 97.42V208a16 16 0 01-16 16H337.42c-14.26 0-21.4-17.23-11.32-27.31L436.69 86.1C446.77 76 464 83.16 464 97.42z"})]});var S=e=>{let{_cloverViewerHasPlaceholder:t,config:o}=e;return(0,n.jsxs)(p,{"data-testid":"clover-iiif-image-openseadragon-controls",hasPlaceholder:t,children:[o.showZoomControl&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(v,{id:o.zoomInButton,label:"zoom in",children:(0,n.jsx)(m,{})}),(0,n.jsx)(v,{id:o.zoomOutButton,label:"zoom out",children:(0,n.jsx)(w,{})})]}),o.showFullPageControl&&(0,n.jsx)(v,{id:o.fullPageButton,label:"full page",children:(0,n.jsx)(x,{})}),o.showRotationControl&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(v,{id:o.rotateRightButton,label:"rotate right",children:(0,n.jsx)(y,{})}),(0,n.jsx)(v,{id:o.rotateLeftButton,label:"rotate left",children:(0,n.jsx)(y,{})})]}),o.showHomeControl&&(0,n.jsx)(v,{id:o.homeButton,label:"reset",children:(0,n.jsx)(b,{})})]})},C=o(2103),k=o(3431),I=e=>{let{ariaLabel:t,config:o,uri:r,_cloverViewerHasPlaceholder:i,imageType:a,openSeadragonCallback:l}=e,[u,f]=(0,g.useState)(),[v,p]=(0,g.useState)(),m=(0,k.Cu)(),w=(0,g.useRef)(!1);return(0,g.useEffect)(()=>(w.current||(w.current=!0,v||p(h()(o))),()=>null==v?void 0:v.destroy()),[]),(0,g.useEffect)(()=>{v&&l&&l(v)},[v,l]),(0,g.useEffect)(()=>{v&&r!==u&&(null==v||v.forceRedraw(),f(r))},[v,u,r]),(0,g.useEffect)(()=>{if(u&&v)switch(a){case"simpleImage":null==v||v.addSimpleImage({url:u});break;case"tiledImage":(0,C.Er)(u).then(e=>{try{if(!e)throw Error("No tile source found for ".concat(u));null==v||v.addTiledImage({tileSource:e,success:()=>{"function"==typeof m&&m({type:"updateOSDImageLoaded",OSDImageLoaded:!0})}})}catch(e){console.error(e)}});break;default:null==v||v.close(),console.warn("Unable to render ".concat(u,' in OpenSeadragon as type: "').concat(a,'"'))}},[a,u]),(0,n.jsxs)(d,{className:"clover-iiif-image-openseadragon","data-testid":"clover-iiif-image-openseadragon","data-openseadragon-instance":o.id,hasNavigator:o.showNavigator,children:[(0,n.jsx)(S,{_cloverViewerHasPlaceholder:i,config:o}),o.showNavigator&&(0,n.jsx)(s,{id:o.navigatorId,"data-testid":"clover-iiif-image-openseadragon-navigator"}),(0,n.jsx)(c,{id:o.id,"data-testid":"clover-iiif-image-openseadragon-viewport",role:"img",...t&&{"aria-label":t}})]})},_=o(5593),j=o(2950),z=e=>{let{_cloverViewerHasPlaceholder:t=!1,body:o,instanceId:l,isTiledImage:s=!1,label:c,src:d="",openSeadragonCallback:u,openSeadragonConfig:h={}}=e,g=l||(0,j.Z)(),f="string"==typeof c?c:(0,_.M)(c),v={id:"openseadragon-".concat(g),navigatorId:"openseadragon-navigator-".concat(g),loadTilesWithAjax:!0,fullPageButton:"fullPage-".concat(g),homeButton:"reset-".concat(g),rotateLeftButton:"rotateLeft-".concat(g),rotateRightButton:"rotateRight-".concat(g),zoomInButton:"zoomIn-".concat(g),zoomOutButton:"zoomOut-".concat(g),showNavigator:!0,showFullPageControl:!0,showHomeControl:!0,showRotationControl:!0,showZoomControl:!0,navigatorBorderColor:"transparent",gestureSettingsMouse:{clickToZoom:!0,dblClickToZoom:!0,pinchToZoom:!0,scrollToZoom:!1},...h},{imageType:p,uri:m}=o?(0,r.z9)(o):(0,r.D1)(d,s);return m?(0,n.jsx)(i.SV,{FallbackComponent:a.Z,children:(0,n.jsx)(I,{_cloverViewerHasPlaceholder:t,ariaLabel:f,config:v,imageType:p,uri:m,openSeadragonCallback:u},g)}):null}},2196:function(e,t,o){o.d(t,{Z:function(){return s}});var n=o(1527),r=o(5455);let i=(0,r.zo)("div",{display:"flex",flexDirection:"column",alignItems:"center"}),a=(0,r.zo)("p",{fontWeight:"bold",fontSize:"x-large"}),l=(0,r.zo)("span",{fontSize:"medium"});o(959);var s=e=>{let{error:t}=e,{message:o}=t;return(0,n.jsxs)(i,{role:"alert",children:[(0,n.jsx)(a,{"data-testid":"headline",children:"Something went wrong"}),o&&(0,n.jsxs)(l,{children:["Error message: ".concat(o)," "]})]})}},3431:function(e,t,o){o.d(t,{Cu:function(){return b},D1:function(){return x},MY:function(){return w},W2:function(){return f},as:function(){return h}});var n,r,i,a=o(1527),l=o(959),s=o(3832),c=o(3631),d=o(2950);let u={annotationOverlays:{backgroundColor:"#6666ff",borderColor:"#000099",borderType:"solid",borderWidth:"1px",opacity:"0.5",renderOverlays:!0,zoomLevel:2},background:"transparent",canvasBackgroundColor:"#6662",canvasHeight:"500px",contentSearch:{searchResultsLimit:20,overlays:{backgroundColor:"#ff6666",borderColor:"#990000",borderType:"solid",borderWidth:"1px",opacity:"0.5",renderOverlays:!0,zoomLevel:4}},ignoreCaptionLabels:[],informationPanel:{vtt:{autoScroll:{enabled:!0,settings:{behavior:"smooth",block:"center"}}},open:!0,renderAbout:!0,renderSupplementing:!0,renderToggle:!0,renderAnnotation:!0,renderContentSearch:!0},openSeadragon:{},requestHeaders:{"Content-Type":"application/json"},showDownload:!0,showIIIFBadge:!0,showTitle:!0,withCredentials:!1,localeText:{contentSearch:{tabLabel:"Search Results",formPlaceholder:"Enter search words",noSearchResults:"No search results",loading:"Loading...",moreResults:"more results"}}};function h(e){let t={...u.informationPanel.vtt.autoScroll};return"object"==typeof e&&(t="enabled"in e?e:{enabled:!0,settings:e}),!1===e&&(t.enabled=!1),function(e){let{behavior:t,block:o}=e,n=["auto","instant","smooth"],r=["center","end","nearest","start"];if(!n.includes(t))throw TypeError("'".concat(t,"' not in ").concat(n.join(" | ")));if(!r.includes(o))throw TypeError("'".concat(o,"' not in ").concat(r.join(" | ")))}(t.settings),t}let g=h(null==u?void 0:null===(r=u.informationPanel)||void 0===r?void 0:null===(n=r.vtt)||void 0===n?void 0:n.autoScroll),f={activeCanvas:"",activeManifest:"",OSDImageLoaded:!1,collection:{},configOptions:u,customDisplays:[],isAutoScrollEnabled:g.enabled,isAutoScrolling:!1,isInformationOpen:null==u?void 0:null===(i=u.informationPanel)||void 0===i?void 0:i.open,isLoaded:!1,isUserScrolling:void 0,vault:new s.j,contentSearchVault:new s.j,openSeadragonViewer:null,viewerId:(0,d.Z)()},v=l.createContext(f),p=l.createContext(f);function m(e,t){switch(t.type){case"updateActiveCanvas":return t.canvasId||(t.canvasId=""),{...e,activeCanvas:t.canvasId};case"updateActiveManifest":return{...e,activeManifest:t.manifestId};case"updateOSDImageLoaded":return{...e,OSDImageLoaded:t.OSDImageLoaded};case"updateAutoScrollAnnotationEnabled":return{...e,isAutoScrollEnabled:t.isAutoScrollEnabled};case"updateAutoScrolling":return{...e,isAutoScrolling:t.isAutoScrolling};case"updateCollection":return{...e,collection:t.collection};case"updateConfigOptions":return{...e,configOptions:(0,c.RH)(e.configOptions,t.configOptions)};case"updateInformationOpen":return{...e,isInformationOpen:t.isInformationOpen};case"updateIsLoaded":return{...e,isLoaded:t.isLoaded};case"updateUserScrolling":return{...e,isUserScrolling:t.isUserScrolling};case"updateOpenSeadragonViewer":return{...e,openSeadragonViewer:t.openSeadragonViewer};case"updateViewerId":return{...e,viewerId:t.viewerId};default:throw Error("Unhandled action type: ".concat(t.type))}}let w=e=>{let{initialState:t=f,children:o}=e,[n,r]=(0,l.useReducer)(m,t);return(0,a.jsx)(v.Provider,{value:n,children:(0,a.jsx)(p.Provider,{value:r,children:o})})};function x(){let e=l.useContext(v);if(void 0===e)throw Error("useViewerState must be used within a ViewerProvider");return e}function b(){let e=l.useContext(p);if(void 0===e)throw Error("useViewerDispatch must be used within a ViewerProvider");return e}},2103:function(e,t,o){o.d(t,{AG:function(){return i},Er:function(){return r},FO:function(){return s},Mx:function(){return c},Vu:function(){return l}});var n=o(1921);let r=e=>fetch("".concat(e.replace(/\/$/,""),"/info.json")).then(e=>e.json()).then(e=>e).catch(t=>{console.error("The IIIF tilesource ".concat(e.replace(/\/$/,""),"/info.json failed to load: ").concat(t))}),i=e=>{let t,o;return Array.isArray(e)&&(t=e[0])&&(o="@id"in t?t["@id"]:t.id),o},a=e=>{let t,o;if(d(e))t=e,o={};else{let i=JSON.parse((0,n.o0)(e));switch(null==i?void 0:i.type){case"SpecificResource":case"Range":case"Annotation":o={manifest:t=null==i?void 0:i.target.partOf[0].id,canvas:null==i?void 0:i.target.id};break;case"Canvas":o={manifest:t=null==i?void 0:i.partOf[0].id,canvas:null==i?void 0:i.id};break;case"Manifest":var r;t=null==i?void 0:i.id,o={collection:null==i?void 0:null===(r=i.partOf[0])||void 0===r?void 0:r.id,manifest:null==i?void 0:i.id};break;case"Collection":o={collection:t=null==i?void 0:i.id}}}return{resourceId:t,active:o}},l=e=>{let{resourceId:t,active:o}=a(e);return o.collection||o.manifest||t},s=(e,t)=>{let o=t.items.map(e=>e.id),{active:n}=a(e),r=n.canvas;return o.includes(r)?r:o[0]},c=(e,t)=>{let{active:o}=a(e),n=o.manifest,r=t.items.filter(e=>"Manifest"===e.type).map(e=>e.id);return 0==r.length?null:r.includes(n)?n:r[0]},d=e=>{try{new URL(e)}catch(e){return!1}return!0}},6661:function(e,t,o){o.d(t,{LW:function(){return x},zG:function(){return g},$H:function(){return w},z9:function(){return v},D1:function(){return p},dH:function(){return m}});var n,r,i=o(9212),a=o.n(i);let l=window.OpenSeadragon;if(!l&&!(l=a()))throw Error("OpenSeadragon is missing.");let s="http://www.w3.org/2000/svg";l.Viewer&&(l.Viewer.prototype.svgOverlay=function(){return this._svgOverlayInfo||(this._svgOverlayInfo=new c(this)),this._svgOverlayInfo});let c=function(e){let t=this;this._viewer=e,this._containerWidth=0,this._containerHeight=0,this._svg=document.createElementNS(s,"svg"),this._svg.style.position="absolute",this._svg.style.left=0,this._svg.style.top=0,this._svg.style.width="100%",this._svg.style.height="100%",this._viewer.canvas.appendChild(this._svg),this._node=document.createElementNS(s,"g"),this._svg.appendChild(this._node),this._viewer.addHandler("animation",function(){t.resize()}),this._viewer.addHandler("open",function(){t.resize()}),this._viewer.addHandler("rotate",function(){t.resize()}),this._viewer.addHandler("flip",function(){t.resize()}),this._viewer.addHandler("resize",function(){t.resize()}),this.resize()};c.prototype={node:function(){return this._node},resize:function(){this._containerWidth!==this._viewer.container.clientWidth&&(this._containerWidth=this._viewer.container.clientWidth,this._svg.setAttribute("width",this._containerWidth)),this._containerHeight!==this._viewer.container.clientHeight&&(this._containerHeight=this._viewer.container.clientHeight,this._svg.setAttribute("height",this._containerHeight));let e=this._viewer.viewport.pixelFromPoint(new l.Point(0,0),!0),t=this._viewer.viewport.getZoom(!0),o=this._viewer.viewport.getRotation(),n=this._viewer.viewport.getFlip(),r=this._viewer.viewport._containerInnerSize.x,i=r*t,a=i;n&&(i=-i,e.x=-e.x+r),this._node.setAttribute("transform","translate("+e.x+","+e.y+") scale("+i+","+a+") rotate("+o+")")},onClick:function(e,t){new l.MouseTracker({element:e,clickHandler:t}).setTracking(!0)}};let d=e=>new c(e),u=e=>{let t={id:"string"==typeof e?e:e.source};if("string"==typeof e){if(e.includes("#xywh=")){let o=e.split("#xywh=");if(o&&o[1]){let[e,n,r,i]=o[1].split(",").map(e=>Number(e));t={id:o[0],rect:{x:e,y:n,w:r,h:i}}}}else if(e.includes("#t=")){let o=e.split("#t=");o&&o[1]&&(t={id:o[0],t:o[1]})}}else if("object"==typeof e){var o,n;(null===(o=e.selector)||void 0===o?void 0:o.type)==="PointSelector"?t={id:e.source,point:{x:e.selector.x,y:e.selector.y}}:(null===(n=e.selector)||void 0===n?void 0:n.type)==="SvgSelector"&&(t={id:e.source,svg:e.selector.value})}return t};var h=o(2103);function g(e,t,o,n,r){if(!e)return;let i=1/t.width;n.forEach(t=>{if(!t.target)return;let{point:n,rect:l,svg:s}=u(t.target);if(l){let{x:t,y:n,w:s,h:c}=l;!function(e,t,o,n,r,i,l){let s=new(a()).Rect(t,o,n,r),c=document.createElement("div");if(i){let{backgroundColor:e,opacity:t,borderType:o,borderColor:n,borderWidth:r}=i;c.style.backgroundColor=e,c.style.opacity=t,c.style.border="".concat(o," ").concat(r," ").concat(n),c.className=l}e.addOverlay(c,s)}(e,t*i,n*i,s*i,c*i,o,r)}if(n){let{x:t,y:a}=n;f(e,'\n \n \n \n '),o,i,r)}s&&f(e,s,o,i,r)})}function f(e,t,o,n,r){let i=function(e){if(!e)return null;let t=document.createElement("template");return t.innerHTML=e.trim(),t.content.children[0]}(t);if(i)for(let t of i.children)!function e(t,o,n,r,i){var a;if("#text"===o.nodeName)!o.textContent||o.textContent.includes("\n")||console.log("nodeName:",o.nodeName,", textContent:",o.textContent,", childNodes.length",o.childNodes.length);else{let l=function(e,t,o){let n=!1,r=!1,i=!1,a=!1,l=document.createElementNS("http://www.w3.org/2000/svg",e.nodeName);if(e.attributes.length>0)for(let t=0;t{e(t,o,n,r,i)})}}(e,t,o,n,r)}(n=r||(r={})).TiledImage="tiledImage",n.SimpleImage="simpleImage";let v=e=>{let t=Array.isArray(null==e?void 0:e.service)&&(null==e?void 0:e.service.length)>0;return{uri:t?(0,h.AG)(null==e?void 0:e.service):null==e?void 0:e.id,imageType:t?r.TiledImage:r.SimpleImage}},p=(e,t)=>({uri:e,imageType:t?r.TiledImage:r.SimpleImage});function m(e,t){if(!e)return;t.startsWith(".")||(t="."+t);let o=document.querySelectorAll(t);o&&o.forEach(t=>e.removeOverlay(t))}function w(e,t,o,n){let r=u(o),{point:i,rect:l,svg:s}=r;if(i||l||s){let o=function(e,t,o){let n,r,i=40,l=40;t.rect&&(n=t.rect.x,r=t.rect.y,i=t.rect.w,l=t.rect.h),t.point&&(n=t.point.x,r=t.point.y),u.svg;let s=1/e.width;return new(a()).Rect(n*s-i*s/2*(o-1),r*s-l*s/2*(o-1),i*s*o,l*s*o)}(n,r,t);null==e||e.viewport.fitBounds(o)}}function x(e,t,o,n,r){var i;if(!(null==t?void 0:t.items)||(null==t?void 0:t.items.length)===0)return;let a=[];t.items.forEach(t=>{let o=e.get(t.id);"string"==typeof o.target&&o.target.startsWith(n.id)&&a.push(o)}),o&&(null===(i=r.contentSearch)||void 0===i?void 0:i.overlays)&&g(o,n,r.contentSearch.overlays,a,"content-search-overlay")}}}]); \ No newline at end of file diff --git a/_next/static/chunks/129.dfd77a8bf58246c0.js b/_next/static/chunks/129.dfd77a8bf58246c0.js new file mode 100644 index 00000000..59c69069 --- /dev/null +++ b/_next/static/chunks/129.dfd77a8bf58246c0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[129],{515:function(e,t,o){o.d(t,{c:function(){return n}});let n=(0,o(5455).zo)("button",{display:"flex",height:"2rem",width:"2rem",borderRadius:"2rem",padding:"0",margin:"0",fontFamily:"inherit",background:"none",backgroundColor:"$primary",border:"none",color:"white",cursor:"pointer",marginLeft:"0.618rem",filter:"drop-shadow(2px 2px 5px #0003)",transition:"$all",boxSizing:"content-box !important","&:first-child":{marginLeft:"0"},"@xs":{marginBottom:"0.618rem",marginLeft:"0","&:last-child":{marginBottom:"0"}},svg:{height:"60%",width:"60%",padding:"20%",fill:"$secondary",stroke:"$secondary",filter:"drop-shadow(2px 2px 5px #0003)",transition:"$all",boxSizing:"inherit"},"&:hover, &:focus":{backgroundColor:"$accent"},"&[data-button=rotate-right]":{"&:hover, &:focus":{svg:{rotate:"45deg"}}},"&[data-button=rotate-left]":{transform:"scaleX(-1)","&:hover, &:focus":{svg:{rotate:"45deg"}}},"&[data-button=reset]":{"&:hover, &:focus":{svg:{rotate:"-15deg"}}}})},5129:function(e,t,o){o.r(t),o.d(t,{default:function(){return z}});var n=o(1527),i=o(6661),r=o(8448),a=o(2196),l=o(5455);let s=(0,l.zo)("div",{position:"absolute !important",zIndex:"1",top:"1rem",left:"1rem",width:"161.8px",height:"100px",backgroundColor:"#000D",boxShadow:"5px 5px 5px #0002",borderRadius:"3px",".displayregion":{border:" 3px solid $accent !important",boxShadow:"0 0 3px #0006"},"@sm":{width:"123px",height:"76px"},"@xs":{width:"100px",height:"61.8px"}}),c=(0,l.zo)("div",{position:"relative",width:"100%",height:"100%",zIndex:"0"}),d=(0,l.zo)("div",{width:"100%",height:"100%",maxHeight:"100vh",background:"transparent",backgroundSize:"contain",color:"white",position:"relative",zIndex:"0",overflow:"hidden",variants:{hasNavigator:{true:{["".concat(s)]:{display:"block"}},false:{["".concat(s)]:{display:"none"}}}}});var u=o(9212),h=o.n(u),v=o(959),g=o(515),p=e=>{let{className:t,id:o,label:i,children:r}=e,a=i.toLowerCase().replace(/\s/g,"-");return(0,n.jsx)(g.c,{id:o,className:t,"data-testid":"openseadragon-button","data-button":a,children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"".concat(o,"-svg-title"),"data-testid":"openseadragon-button-svg",focusable:"false",viewBox:"0 0 512 512",role:"img",children:[(0,n.jsx)("title",{id:"".concat(o,"-svg-title"),children:i}),r]})})};let f=(0,l.zo)("div",{position:"absolute",zIndex:"1",top:"1rem",right:"1rem",display:"flex","@xs":{flexDirection:"column",zIndex:"2"},variants:{hasPlaceholder:{true:{right:"3.618rem","@xs":{top:"3.618rem",right:"1rem"}},false:{right:"1rem","@xs":{top:"1rem",right:"1rem"}}}}});var m=o(3431);let w=()=>(0,n.jsx)("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M256 112v288M400 256H112"}),x=()=>(0,n.jsx)("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M400 256H112"}),b=()=>(0,n.jsx)("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M432 320v112H320M421.8 421.77L304 304M80 192V80h112M90.2 90.23L208 208M320 80h112v112M421.77 90.2L304 208M192 432H80V320M90.23 421.8L208 304"}),y=()=>(0,n.jsx)("path",{d:"M448 440a16 16 0 01-12.61-6.15c-22.86-29.27-44.07-51.86-73.32-67C335 352.88 301 345.59 256 344.23V424a16 16 0 01-27 11.57l-176-168a16 16 0 010-23.14l176-168A16 16 0 01256 88v80.36c74.14 3.41 129.38 30.91 164.35 81.87C449.32 292.44 464 350.9 464 424a16 16 0 01-16 16z"}),S=()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("path",{fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M400 148l-21.12-24.57A191.43 191.43 0 00240 64C134 64 48 150 48 256s86 192 192 192a192.09 192.09 0 00181.07-128"}),(0,n.jsx)("path",{d:"M464 97.42V208a16 16 0 01-16 16H337.42c-14.26 0-21.4-17.23-11.32-27.31L436.69 86.1C446.77 76 464 83.16 464 97.42z"})]});var C=e=>{let{_cloverViewerHasPlaceholder:t,config:o}=e,{activeCanvas:i,plugins:r,vault:a}=(0,m.D1)(),l=a.get({id:i,type:"Canvas"});return(0,n.jsxs)(f,{"data-testid":"clover-iiif-image-openseadragon-controls",hasPlaceholder:t,children:[o.showZoomControl&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(p,{id:o.zoomInButton,label:"zoom in",children:(0,n.jsx)(w,{})}),(0,n.jsx)(p,{id:o.zoomOutButton,label:"zoom out",children:(0,n.jsx)(x,{})})]}),o.showFullPageControl&&(0,n.jsx)(p,{id:o.fullPageButton,label:"full page",children:(0,n.jsx)(b,{})}),o.showRotationControl&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(p,{id:o.rotateRightButton,label:"rotate right",children:(0,n.jsx)(S,{})}),(0,n.jsx)(p,{id:o.rotateLeftButton,label:"rotate left",children:(0,n.jsx)(S,{})})]}),o.showHomeControl&&(0,n.jsx)(p,{id:o.homeButton,label:"reset",children:(0,n.jsx)(y,{})}),r.filter(e=>{var t;return null===(t=e.imageViewer)||void 0===t?void 0:t.controls}).map((e,t)=>{var o,i,r,a;let s=null===(i=e.imageViewer)||void 0===i?void 0:null===(o=i.controls)||void 0===o?void 0:o.component;return(0,n.jsx)(s,{...null==e?void 0:null===(a=e.imageViewer)||void 0===a?void 0:null===(r=a.controls)||void 0===r?void 0:r.componentProps,canvas:l,useViewerDispatch:m.Cu,useViewerState:m.D1},t)})]})},k=o(2103),I=e=>{let{ariaLabel:t,config:o,uri:i,_cloverViewerHasPlaceholder:r,imageType:a,openSeadragonCallback:l}=e,[u,g]=(0,v.useState)(),[p,f]=(0,v.useState)(),w=(0,m.Cu)(),x=(0,v.useRef)(!1);return(0,v.useEffect)(()=>(x.current||(x.current=!0,p||f(h()(o))),()=>null==p?void 0:p.destroy()),[]),(0,v.useEffect)(()=>{p&&l&&l(p)},[p,l]),(0,v.useEffect)(()=>{p&&i!==u&&(null==p||p.forceRedraw(),g(i))},[p,u,i]),(0,v.useEffect)(()=>{if(u&&p)switch(a){case"simpleImage":null==p||p.addSimpleImage({url:u});break;case"tiledImage":(0,k.Er)(u).then(e=>{try{if(!e)throw Error("No tile source found for ".concat(u));null==p||p.addTiledImage({tileSource:e,success:()=>{"function"==typeof w&&w({type:"updateOSDImageLoaded",OSDImageLoaded:!0})}})}catch(e){console.error(e)}});break;default:null==p||p.close(),console.warn("Unable to render ".concat(u,' in OpenSeadragon as type: "').concat(a,'"'))}},[a,u]),(0,n.jsxs)(d,{className:"clover-iiif-image-openseadragon","data-testid":"clover-iiif-image-openseadragon","data-openseadragon-instance":o.id,hasNavigator:o.showNavigator,children:[(0,n.jsx)(C,{_cloverViewerHasPlaceholder:r,config:o}),o.showNavigator&&(0,n.jsx)(s,{id:o.navigatorId,"data-testid":"clover-iiif-image-openseadragon-navigator"}),(0,n.jsx)(c,{id:o.id,"data-testid":"clover-iiif-image-openseadragon-viewport",role:"img",...t&&{"aria-label":t}})]})},j=o(5593),_=o(2950),z=e=>{let{_cloverViewerHasPlaceholder:t=!1,body:o,instanceId:l,isTiledImage:s=!1,label:c,src:d="",openSeadragonCallback:u,openSeadragonConfig:h={}}=e,v=l||(0,_.Z)(),g="string"==typeof c?c:(0,j.M)(c),p={id:"openseadragon-".concat(v),navigatorId:"openseadragon-navigator-".concat(v),loadTilesWithAjax:!0,fullPageButton:"fullPage-".concat(v),homeButton:"reset-".concat(v),rotateLeftButton:"rotateLeft-".concat(v),rotateRightButton:"rotateRight-".concat(v),zoomInButton:"zoomIn-".concat(v),zoomOutButton:"zoomOut-".concat(v),showNavigator:!0,showFullPageControl:!0,showHomeControl:!0,showRotationControl:!0,showZoomControl:!0,navigatorBorderColor:"transparent",gestureSettingsMouse:{clickToZoom:!0,dblClickToZoom:!0,pinchToZoom:!0,scrollToZoom:!1},...h},{imageType:f,uri:m}=o?(0,i.z9)(o):(0,i.D1)(d,s);return m?(0,n.jsx)(r.SV,{FallbackComponent:a.Z,children:(0,n.jsx)(I,{_cloverViewerHasPlaceholder:t,ariaLabel:g,config:p,imageType:f,uri:m,openSeadragonCallback:u},v)}):null}},2196:function(e,t,o){o.d(t,{Z:function(){return s}});var n=o(1527),i=o(5455);let r=(0,i.zo)("div",{display:"flex",flexDirection:"column",alignItems:"center"}),a=(0,i.zo)("p",{fontWeight:"bold",fontSize:"x-large"}),l=(0,i.zo)("span",{fontSize:"medium"});o(959);var s=e=>{let{error:t}=e,{message:o}=t;return(0,n.jsxs)(r,{role:"alert",children:[(0,n.jsx)(a,{"data-testid":"headline",children:"Something went wrong"}),o&&(0,n.jsxs)(l,{children:["Error message: ".concat(o)," "]})]})}},3431:function(e,t,o){o.d(t,{Cu:function(){return b},D1:function(){return x},MY:function(){return w},W2:function(){return g},as:function(){return h}});var n,i,r,a=o(1527),l=o(959),s=o(3832),c=o(3631),d=o(2950);let u={annotationOverlays:{backgroundColor:"#6666ff",borderColor:"#000099",borderType:"solid",borderWidth:"1px",opacity:"0.5",renderOverlays:!0,zoomLevel:2},background:"transparent",canvasBackgroundColor:"#6662",canvasHeight:"500px",contentSearch:{searchResultsLimit:20,overlays:{backgroundColor:"#ff6666",borderColor:"#990000",borderType:"solid",borderWidth:"1px",opacity:"0.5",renderOverlays:!0,zoomLevel:4}},ignoreCaptionLabels:[],informationPanel:{vtt:{autoScroll:{enabled:!0,settings:{behavior:"smooth",block:"center"}}},open:!0,renderAbout:!0,renderSupplementing:!0,renderToggle:!0,renderAnnotation:!0,renderContentSearch:!0},openSeadragon:{},requestHeaders:{"Content-Type":"application/json"},showDownload:!0,showIIIFBadge:!0,showTitle:!0,withCredentials:!1,localeText:{contentSearch:{tabLabel:"Search Results",formPlaceholder:"Enter search words",noSearchResults:"No search results",loading:"Loading...",moreResults:"more results"}}};function h(e){let t={...u.informationPanel.vtt.autoScroll};return"object"==typeof e&&(t="enabled"in e?e:{enabled:!0,settings:e}),!1===e&&(t.enabled=!1),function(e){let{behavior:t,block:o}=e,n=["auto","instant","smooth"],i=["center","end","nearest","start"];if(!n.includes(t))throw TypeError("'".concat(t,"' not in ").concat(n.join(" | ")));if(!i.includes(o))throw TypeError("'".concat(o,"' not in ").concat(i.join(" | ")))}(t.settings),t}let v=h(null==u?void 0:null===(i=u.informationPanel)||void 0===i?void 0:null===(n=i.vtt)||void 0===n?void 0:n.autoScroll),g={activeCanvas:"",activeManifest:"",OSDImageLoaded:!1,collection:{},configOptions:u,customDisplays:[],plugins:[],isAutoScrollEnabled:v.enabled,isAutoScrolling:!1,isInformationOpen:null==u?void 0:null===(r=u.informationPanel)||void 0===r?void 0:r.open,isLoaded:!1,isUserScrolling:void 0,vault:new s.j,contentSearchVault:new s.j,openSeadragonViewer:null,viewerId:(0,d.Z)()},p=l.createContext(g),f=l.createContext(g);function m(e,t){switch(t.type){case"updateActiveCanvas":return t.canvasId||(t.canvasId=""),{...e,activeCanvas:t.canvasId};case"updateActiveManifest":return{...e,activeManifest:t.manifestId};case"updateOSDImageLoaded":return{...e,OSDImageLoaded:t.OSDImageLoaded};case"updateAutoScrollAnnotationEnabled":return{...e,isAutoScrollEnabled:t.isAutoScrollEnabled};case"updateAutoScrolling":return{...e,isAutoScrolling:t.isAutoScrolling};case"updateCollection":return{...e,collection:t.collection};case"updateConfigOptions":return{...e,configOptions:(0,c.RH)(e.configOptions,t.configOptions)};case"updateInformationOpen":return{...e,isInformationOpen:t.isInformationOpen};case"updateIsLoaded":return{...e,isLoaded:t.isLoaded};case"updateUserScrolling":return{...e,isUserScrolling:t.isUserScrolling};case"updateOpenSeadragonViewer":return{...e,openSeadragonViewer:t.openSeadragonViewer};case"updateViewerId":return{...e,viewerId:t.viewerId};default:throw Error("Unhandled action type: ".concat(t.type))}}let w=e=>{let{initialState:t=g,children:o}=e,[n,i]=(0,l.useReducer)(m,t);return(0,a.jsx)(p.Provider,{value:n,children:(0,a.jsx)(f.Provider,{value:i,children:o})})};function x(){let e=l.useContext(p);if(void 0===e)throw Error("useViewerState must be used within a ViewerProvider");return e}function b(){let e=l.useContext(f);if(void 0===e)throw Error("useViewerDispatch must be used within a ViewerProvider");return e}},2103:function(e,t,o){o.d(t,{AG:function(){return r},Er:function(){return i},FO:function(){return s},Mx:function(){return c},Vu:function(){return l}});var n=o(1921);let i=e=>fetch("".concat(e.replace(/\/$/,""),"/info.json")).then(e=>e.json()).then(e=>e).catch(t=>{console.error("The IIIF tilesource ".concat(e.replace(/\/$/,""),"/info.json failed to load: ").concat(t))}),r=e=>{let t,o;return Array.isArray(e)&&(t=e[0])&&(o="@id"in t?t["@id"]:t.id),o},a=e=>{let t,o;if(d(e))t=e,o={};else{let r=JSON.parse((0,n.o0)(e));switch(null==r?void 0:r.type){case"SpecificResource":case"Range":case"Annotation":o={manifest:t=null==r?void 0:r.target.partOf[0].id,canvas:null==r?void 0:r.target.id};break;case"Canvas":o={manifest:t=null==r?void 0:r.partOf[0].id,canvas:null==r?void 0:r.id};break;case"Manifest":var i;t=null==r?void 0:r.id,o={collection:null==r?void 0:null===(i=r.partOf[0])||void 0===i?void 0:i.id,manifest:null==r?void 0:r.id};break;case"Collection":o={collection:t=null==r?void 0:r.id}}}return{resourceId:t,active:o}},l=e=>{let{resourceId:t,active:o}=a(e);return o.collection||o.manifest||t},s=(e,t)=>{let o=t.items.map(e=>e.id),{active:n}=a(e),i=n.canvas;return o.includes(i)?i:o[0]},c=(e,t)=>{let{active:o}=a(e),n=o.manifest,i=t.items.filter(e=>"Manifest"===e.type).map(e=>e.id);return 0==i.length?null:i.includes(n)?n:i[0]},d=e=>{try{new URL(e)}catch(e){return!1}return!0}},6661:function(e,t,o){o.d(t,{LW:function(){return x},zG:function(){return v},$H:function(){return w},z9:function(){return p},D1:function(){return f},dH:function(){return m}});var n,i,r=o(9212),a=o.n(r);let l=window.OpenSeadragon;if(!l&&!(l=a()))throw Error("OpenSeadragon is missing.");let s="http://www.w3.org/2000/svg";l.Viewer&&(l.Viewer.prototype.svgOverlay=function(){return this._svgOverlayInfo||(this._svgOverlayInfo=new c(this)),this._svgOverlayInfo});let c=function(e){let t=this;this._viewer=e,this._containerWidth=0,this._containerHeight=0,this._svg=document.createElementNS(s,"svg"),this._svg.style.position="absolute",this._svg.style.left=0,this._svg.style.top=0,this._svg.style.width="100%",this._svg.style.height="100%",this._viewer.canvas.appendChild(this._svg),this._node=document.createElementNS(s,"g"),this._svg.appendChild(this._node),this._viewer.addHandler("animation",function(){t.resize()}),this._viewer.addHandler("open",function(){t.resize()}),this._viewer.addHandler("rotate",function(){t.resize()}),this._viewer.addHandler("flip",function(){t.resize()}),this._viewer.addHandler("resize",function(){t.resize()}),this.resize()};c.prototype={node:function(){return this._node},resize:function(){this._containerWidth!==this._viewer.container.clientWidth&&(this._containerWidth=this._viewer.container.clientWidth,this._svg.setAttribute("width",this._containerWidth)),this._containerHeight!==this._viewer.container.clientHeight&&(this._containerHeight=this._viewer.container.clientHeight,this._svg.setAttribute("height",this._containerHeight));let e=this._viewer.viewport.pixelFromPoint(new l.Point(0,0),!0),t=this._viewer.viewport.getZoom(!0),o=this._viewer.viewport.getRotation(),n=this._viewer.viewport.getFlip(),i=this._viewer.viewport._containerInnerSize.x,r=i*t,a=r;n&&(r=-r,e.x=-e.x+i),this._node.setAttribute("transform","translate("+e.x+","+e.y+") scale("+r+","+a+") rotate("+o+")")},onClick:function(e,t){new l.MouseTracker({element:e,clickHandler:t}).setTracking(!0)}};let d=e=>new c(e),u=e=>{let t={id:"string"==typeof e?e:e.source};if("string"==typeof e){if(e.includes("#xywh=")){let o=e.split("#xywh=");if(o&&o[1]){let[e,n,i,r]=o[1].split(",").map(e=>Number(e));t={id:o[0],rect:{x:e,y:n,w:i,h:r}}}}else if(e.includes("#t=")){let o=e.split("#t=");o&&o[1]&&(t={id:o[0],t:o[1]})}}else if("object"==typeof e){var o,n,i,r,a;if((null===(o=e.selector)||void 0===o?void 0:o.type)==="PointSelector")t={id:e.source,point:{x:e.selector.x,y:e.selector.y}};else if((null===(n=e.selector)||void 0===n?void 0:n.type)==="SvgSelector")t={id:e.source,svg:e.selector.value};else if((null===(i=e.selector)||void 0===i?void 0:i.type)==="FragmentSelector"&&(null===(r=e.selector)||void 0===r?void 0:r.value.includes("xywh="))&&"Canvas"==e.source.type&&e.source.id){let o=null===(a=e.selector)||void 0===a?void 0:a.value.split("xywh=");if(o&&o[1]){let[n,i,r,a]=o[1].split(",").map(e=>Number(e));t={id:e.source.id,rect:{x:n,y:i,w:r,h:a}}}}}return t};var h=o(2103);function v(e,t,o,n,i){if(!e)return;let r=1/t.width;n.forEach(t=>{if(!t.target)return;let{point:n,rect:l,svg:s}=u(t.target);if(l){let{x:t,y:n,w:s,h:c}=l;!function(e,t,o,n,i,r,l){let s=new(a()).Rect(t,o,n,i),c=document.createElement("div");if(r){let{backgroundColor:e,opacity:t,borderType:o,borderColor:n,borderWidth:i}=r;c.style.backgroundColor=e,c.style.opacity=t,c.style.border="".concat(o," ").concat(i," ").concat(n),c.className=l}e.addOverlay(c,s)}(e,t*r,n*r,s*r,c*r,o,i)}if(n){let{x:t,y:a}=n;g(e,'\n \n \n \n '),o,r,i)}s&&g(e,s,o,r,i)})}function g(e,t,o,n,i){let r=function(e){if(!e)return null;let t=document.createElement("template");return t.innerHTML=e.trim(),t.content.children[0]}(t);if(r)for(let t of r.children)!function e(t,o,n,i,r){var a;if("#text"===o.nodeName)!o.textContent||o.textContent.includes("\n")||console.log("nodeName:",o.nodeName,", textContent:",o.textContent,", childNodes.length",o.childNodes.length);else{let l=function(e,t,o){let n=!1,i=!1,r=!1,a=!1,l=document.createElementNS("http://www.w3.org/2000/svg",e.nodeName);if(e.attributes.length>0)for(let t=0;t{e(t,o,n,i,r)})}}(e,t,o,n,i)}(n=i||(i={})).TiledImage="tiledImage",n.SimpleImage="simpleImage";let p=e=>{let t=Array.isArray(null==e?void 0:e.service)&&(null==e?void 0:e.service.length)>0;return{uri:t?(0,h.AG)(null==e?void 0:e.service):null==e?void 0:e.id,imageType:t?i.TiledImage:i.SimpleImage}},f=(e,t)=>({uri:e,imageType:t?i.TiledImage:i.SimpleImage});function m(e,t){if(!e)return;t.startsWith(".")||(t="."+t);let o=document.querySelectorAll(t);o&&o.forEach(t=>e.removeOverlay(t))}function w(e,t,o,n){let i=u(o),{point:r,rect:l,svg:s}=i;if(r||l||s){let o=function(e,t,o){let n,i,r=40,l=40;t.rect&&(n=t.rect.x,i=t.rect.y,r=t.rect.w,l=t.rect.h),t.point&&(n=t.point.x,i=t.point.y),u.svg;let s=1/e.width;return new(a()).Rect(n*s-r*s/2*(o-1),i*s-l*s/2*(o-1),r*s*o,l*s*o)}(n,i,t);null==e||e.viewport.fitBounds(o)}}function x(e,t,o,n,i){var r;if(!(null==t?void 0:t.items)||(null==t?void 0:t.items.length)===0)return;let a=[];t.items.forEach(t=>{let o=e.get(t.id);"string"==typeof o.target&&o.target.startsWith(n.id)&&a.push(o)}),o&&(null===(r=i.contentSearch)||void 0===r?void 0:r.overlays)&&v(o,n,i.contentSearch.overlays,a,"content-search-overlay")}}}]); \ No newline at end of file diff --git a/_next/static/chunks/510.2d42081a4ccb135f.js b/_next/static/chunks/510.2d42081a4ccb135f.js deleted file mode 100644 index ef97b93d..00000000 --- a/_next/static/chunks/510.2d42081a4ccb135f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[510],{888:function(e,t,n){n.r(t),n.d(t,{default:function(){return t4}});var i=n(1527),o=n(959),a=n(3431),r=n(3832),l=n(603),s=n(4707);let d=(e,t)=>{let n=e.get({id:t,type:"Canvas"});return(null==n?void 0:n.annotations)&&n.annotations[0]?e.get(n.annotations).filter(e=>!!e.items&&!!e.items.length&&e).map(e=>{let t=e.label||{none:["Annotations"]};return{...e,label:t}}):[]},c=async(e,t,n,i)=>{let o;if(void 0==i||void 0==i.q)return{label:{none:[n]}};let a="".concat(t,"?q=").concat(i.q.trim());try{o=await e.load(a)}catch(e){return console.log("Could not load content search."),{}}return void 0==o.label&&(o.label={none:[n]}),o};var u=n(6661),h=n(8448),p=n(2196),m=n(5455);let g=(0,m.zo)("div",{position:"relative",zIndex:"0"}),f=(0,m.zo)("div",{display:"flex",flexDirection:"row",flexGrow:"1",overflow:"hidden","@sm":{flexDirection:"column"}}),x=(0,m.zo)("div",{display:"flex",flexDirection:"column",flexGrow:"1",flexShrink:"1",width:"61.8%","@sm":{width:"100%"}}),v=(0,m.zo)(l.xz,{display:"none",border:"none",padding:"0",transition:"$all",opacity:"1",background:"#6663",margin:"1rem 0",borderRadius:"6px","&[data-information-panel='false']":{opacity:"0",marginTop:"-59px"},"@sm":{display:"flex","> span":{display:"flex",flexGrow:"1",fontSize:"0.8333em",justifyContent:"center",padding:"0.5rem",fontFamily:"inherit"}}}),b=(0,m.zo)(l.VY,{width:"100%",display:"flex"}),j=(0,m.zo)("aside",{display:"flex",flexGrow:"1",flexShrink:"0",width:"38.2%",maxHeight:"100%","@sm":{width:"100%"}}),y=(0,m.zo)("div",{display:"flex",flexDirection:"column",fontSmooth:"auto",webkitFontSmoothing:"antialiased",'&[data-absolute-position="true"]':{position:"absolute",width:"100%",height:"100%",zIndex:"0"},"> div":{display:"flex",flexDirection:"column",flexGrow:"1",justifyContent:"flex-start",height:"100%",maxHeight:"100%","@sm":{["& ".concat(f)]:{flexGrow:"1"},["& ".concat(x)]:{flexGrow:"0"}}},"@sm":{padding:"0"},"&[data-information-panel-open='true']":{"@sm":{position:"fixed",height:"100%",width:"100%",top:"0",left:"0",zIndex:"2500000000",["& ".concat(g)]:{display:"none"},["& ".concat(v)]:{margin:"1rem"},["& ".concat(b)]:{height:"100%"}}}});var w=n(3367);let C=(0,m.zo)(w.fC,{display:"flex",flexDirection:"column",width:"100%",height:"100%",flexGrow:"1",flexShrink:"0",position:"relative",zIndex:"1",maskImage:"linear-gradient(180deg, rgba(0, 0, 0, 1) calc(100% - 2rem), transparent 100%)","@sm":{marginTop:"0.5rem",boxShadow:"none"}}),S=(0,m.zo)(w.aV,{display:"flex",flexGrow:"0",margin:"0 1.618rem",borderBottom:"4px solid #6663","@sm":{margin:"0 1rem"}}),k=(0,m.zo)(w.xz,{display:"flex",position:"relative",padding:"0.5rem 1rem",background:"none",backgroundColor:"transparent",fontFamily:"inherit",border:"none",opacity:"0.7",fontSize:"1rem",marginRight:"1rem",lineHeight:"1rem",whiteSpace:"nowrap",cursor:"pointer",fontWeight:400,transition:"$all","&::after":{width:"0",height:"4px",content:"",position:"absolute",bottom:"-4px",left:"0",transition:"$all"},"&[data-state='active']":{opacity:"1",fontWeight:700,"&::after":{width:"100%",backgroundColor:"$accent"}}}),z=(0,m.zo)(w.VY,{display:"flex",flexGrow:"1",flexShrink:"0",position:"absolute",top:"0",left:"0","&[data-state='active']":{width:"100%",height:"calc(100% - 2rem)",padding:"1.618rem 0"}}),I=(0,m.zo)(e=>{let{handleScroll:t,children:n,className:o}=e;return(0,i.jsx)("div",{className:o,onScroll:t,children:n})},{position:"relative",height:"100%",width:"100%",overflowY:"scroll"}),$={position:"relative",cursor:"pointer",display:"flex",width:"100%",justifyContent:"space-between",textAlign:"left",margin:"0",padding:"0.5rem 1.618rem",fontFamily:"inherit",lineHeight:"1.25em",fontSize:"1rem",color:"inherit",border:"none",background:"none"},A=(0,m.zo)("button",{textAlign:"left","&:hover":{color:"$accent"}}),T=(0,m.zo)("div",{display:"flex",flexDirection:"column",width:"100%"}),M=(0,m.zo)("div",{...$}),R=(0,m.zo)("div",{"&:hover":{color:"$accent"}});var E=e=>{let{value:t,handleClick:n}=e;return(0,i.jsx)(A,{onClick:n,children:t})},L=e=>{let{value:t,handleClick:n}=e;return(0,i.jsx)(R,{dangerouslySetInnerHTML:{__html:t},onClick:n})},F=n(2950),H=()=>{function e(e){return e.map(e=>{let t=e.identifier||(0,F.Z)();return{...e,identifier:t}})}return{addIdentifiersToParsedCues:e,createNestedCues:function(t){let n=[],i=[];for(let a of e(t)){for(;i.length>0&&i[i.length-1].end<=a.start;)i.pop();if(i.length>0){var o;i[i.length-1].children||(i[i.length-1].children=[]),null===(o=i[i.length-1].children)||void 0===o||o.push(a),i.push(a)}else n.push(a),i.push(a)}return n},isChild:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.some(t=>e.start>=t.start&&e.end<=t.end)},orderCuesByTime:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.sort((e,t)=>e.start-t.start)}}},D=n(6427);let O=(0,m.F4)({from:{transform:"rotate(360deg)"},to:{transform:"rotate(0deg)"}}),B=(0,m.zo)(D.fC,{display:"flex",flexDirection:"column",width:"100%"}),V=(0,m.zo)(D.ck,{...$,"@sm":{padding:"0.5rem 1rem",fontSize:"0.8333rem"},"&::before":{content:"",width:"12px",height:"12px",borderRadius:"12px",position:"absolute",backgroundColor:"$primaryMuted",opacity:"0",left:"8px",marginTop:"3px",boxSizing:"content-box","@sm":{content:"unset"}},"&::after":{content:"",width:"4px",height:"6px",position:"absolute",backgroundColor:"$secondary",opacity:"0",clipPath:"polygon(100% 50%, 0 100%, 0 0)",left:"13px",marginTop:"6px",boxSizing:"content-box","@sm":{content:"unset"}},strong:{marginLeft:"1rem"},"&:hover":{color:"$accent","&::before":{backgroundColor:"$accent",opacity:"1"},"&::after":{content:"",width:"4px",height:"6px",position:"absolute",backgroundColor:"$secondary",clipPath:"polygon(100% 50%, 0 100%, 0 0)",opacity:"1"}},"&[aria-checked='true']":{backgroundColor:"#6663","&::before":{content:"",width:"6px",height:"6px",position:"absolute",backgroundColor:"transparent",border:"3px solid $accentMuted",borderRadius:"12px",left:"8px",marginTop:"4px",opacity:"1",animation:"1s linear infinite",animationName:O,boxSizing:"content-box","@sm":{content:"unset"}},"&::after":{content:"",width:"6px",height:"6px",position:"absolute",backgroundColor:"transparent",border:"3px solid $accent",clipPath:"polygon(100% 0, 100% 100%, 0 0)",borderRadius:"12px",left:"8px",marginTop:"4px",opacity:"1",animation:"1.5s linear infinite",animationName:O,boxSizing:"content-box","@sm":{content:"unset"}}}});var N=n(3631);let P=e=>{for(;e&&e!==document.body;){let t=window.getComputedStyle(e).overflowY;if("visible"!==t&&"hidden"!==t&&e.scrollHeight>e.clientHeight)return e;e=e.parentNode}return null};var W=e=>{var t,n;let{label:r,start:l,end:s}=e,d=(0,a.Cu)(),{configOptions:c,isAutoScrollEnabled:u,isUserScrolling:h}=(0,a.D1)(),p=null==c?void 0:null===(n=c.informationPanel)||void 0===n?void 0:null===(t=n.vtt)||void 0===t?void 0:t.autoScroll,[m,g]=(0,o.useState)(!1),f=(0,o.useRef)(null),x=document.getElementById("clover-iiif-video");return(0,o.useEffect)(()=>(null==x||x.addEventListener("timeupdate",()=>{let{currentTime:e}=x;g(l<=e&&edocument.removeEventListener("timeupdate",()=>{})),[s,l,x]),(0,o.useEffect)(()=>{if(u&&m&&f.current&&!h){let n=f.current;if(n&&n instanceof HTMLElement){let i=P(n);if(i&&i instanceof HTMLElement){var e,t;let o;switch(null==p?void 0:null===(e=p.settings)||void 0===e?void 0:e.block){case"center":let a=i.getBoundingClientRect();o=n.offsetTop+n.offsetHeight-Math.floor((a.bottom-a.top)/2);break;case"end":o=n.offsetTop+n.offsetHeight-(i.clientHeight-n.clientHeight)+2;break;default:o=n.offsetTop-2}d({type:"updateAutoScrolling",isAutoScrolling:!0}),i.scrollTo({top:o,left:0,behavior:null==p?void 0:null===(t=p.settings)||void 0===t?void 0:t.behavior}),setTimeout(()=>d({type:"updateAutoScrolling",isAutoScrolling:!1}),750)}}}},[p,m,h,u,d]),(0,i.jsxs)(V,{ref:f,"aria-checked":m,"data-testid":"information-panel-cue",onClick:()=>{x&&(x.pause(),x.currentTime=l,x.play())},value:r,children:[r,(0,i.jsx)("strong",{children:(0,N.rJ)(l)})]})};let _=(0,m.zo)("ul",{listStyle:"none",paddingLeft:"1rem",position:"relative","&&:first-child":{paddingLeft:"0"},"& li ul":{["& ".concat(V)]:{backgroundColor:"unset","&::before":{content:"none"},"&::after":{content:"none"}}},"&:first-child":{margin:"0 0 1.618rem"}}),G=e=>{let{items:t}=e;return(0,i.jsx)(_,{children:t.map(e=>{let{text:t,start:n,end:o,children:a,identifier:r}=e;return(0,i.jsxs)("li",{children:[(0,i.jsx)(W,{label:t,start:n,end:o}),a&&(0,i.jsx)(G,{items:a})]},r)})})},q=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en";if(!e)return"";if(!e[t]){let t=Object.getOwnPropertyNames(e);if(t.length>0)return e[t[0]]}return e[t]};var U=n(3836),Z=e=>{let{label:t,vttUri:n}=e,[a,r]=o.useState([]),{createNestedCues:l,orderCuesByTime:s}=H(),[d,c]=o.useState();return(0,o.useEffect)(()=>{n&&fetch(n,{headers:{"Content-Type":"text/plain",Accept:"application/json"}}).then(e=>e.text()).then(e=>{r(l(s((0,U.parse)(e).cues)))}).catch(e=>{console.error(n,e.toString()),c(e)})},[n]),(0,i.jsxs)(B,{"data-testid":"annotation-item-vtt","aria-label":"navigate ".concat(q(t,"en")),children:[d&&(0,i.jsxs)("div",{"data-testid":"error-message",children:["Network Error: ",d.toString()]}),(0,i.jsx)(G,{items:a})]})},Y=e=>{let{caption:t,handleClick:n,imageUri:o}=e;return(0,i.jsxs)(A,{onClick:n,children:[(0,i.jsx)("img",{src:o,alt:"A visual annotation for ".concat(t)}),(0,i.jsx)("span",{children:t})]})},J=e=>{var t,n;let{annotation:o}=e,{target:r}=o,{openSeadragonViewer:l,vault:s,activeCanvas:d,configOptions:c}=(0,a.D1)(),h=o.body.map(e=>s.get(e.id)),p=(null===(t=h.find(e=>e.format))||void 0===t?void 0:t.format)||"",m=(null===(n=h.find(e=>e.value))||void 0===n?void 0:n.value)||"",g=s.get({id:d,type:"Canvas"});function f(){var e;if(!r)return;let t=(null===(e=c.annotationOverlays)||void 0===e?void 0:e.zoomLevel)||1;(0,u.$H)(l,t,r,g)}return(0,i.jsx)(M,{children:function(){var e,t;switch(p){case"text/plain":return(0,i.jsx)(E,{value:m,handleClick:f});case"text/html":return(0,i.jsx)(L,{value:m,handleClick:f});case"text/vtt":return(0,i.jsx)(Z,{label:h[0].label,vttUri:h[0].id||""});case null===(e=p.match(/^image\//))||void 0===e?void 0:e.input:let n=(null===(t=h.find(e=>{var t;return!(null===(t=e.id)||void 0===t?void 0:t.includes("vault://"))}))||void 0===t?void 0:t.id)||"";return(0,i.jsx)(Y,{caption:m,handleClick:f,imageUri:n});default:return(0,i.jsx)(E,{value:m,handleClick:f})}}()})},Q=e=>{var t;let{annotationPage:n}=e,{vault:o}=(0,a.D1)();if(!n||!n.items||(null===(t=n.items)||void 0===t?void 0:t.length)===0)return(0,i.jsx)(i.Fragment,{});let r=n.items.map(e=>o.get(e.id));return r?(0,i.jsx)(T,{"data-testid":"annotation-page",children:null==r?void 0:r.map(e=>(0,i.jsx)(J,{annotation:e},e.id))}):(0,i.jsx)(i.Fragment,{})};let X=(0,m.zo)("button",{textAlign:"left","&:hover":{color:"$accent"}}),K=(0,m.zo)("li",{margin:"0.25rem 0"}),ee=(0,m.zo)("ol",{listStyleType:"auto",marginBottom:"1rem",listStylePosition:"inside"}),et=(0,m.zo)("div",{margin:"0.5rem 1.618rem"}),en=(0,m.zo)("div",{fontWeight:"bold"}),ei=(0,m.zo)("div",{marginBottom:"1rem"});var eo=e=>{let{value:t,handleClick:n,target:o,canvas:a}=e;return(0,i.jsx)(X,{onClick:n,"data-target":o,"data-canvas":a,children:t})},ea=e=>{var t,n,r;let l,s,{annotation:d,activeContentSearchTarget:c,setActiveContentSearchTarget:h}=e,p=(0,a.Cu)(),{openSeadragonViewer:m,vault:g,contentSearchVault:f,activeCanvas:x,configOptions:v,OSDImageLoaded:b}=(0,a.D1)(),j=g.get({id:x,type:"Canvas"}),y=(null===(t=d.body.map(e=>f.get(e.id)).find(e=>e.value))||void 0===t?void 0:t.value)||"";if(d.target&&"string"==typeof d.target&&(l=d.target),l){let e=l.split("#xywh");e.length>1&&(s=e[0])}let w=(null===(r=v.contentSearch)||void 0===r?void 0:null===(n=r.overlays)||void 0===n?void 0:n.zoomLevel)||1;(0,o.useEffect)(()=>{b&&m&&d.target&&d.target==c&&(0,u.$H)(m,w,l,j)},[m,b]);let C=JSON.stringify(l);return(0,i.jsx)(K,{children:(0,i.jsx)(eo,{target:C,canvas:s,value:y,handleClick:function(e){if(!m)return;let t=JSON.parse(e.target.dataset.target),n=e.target.dataset.canvas;x===n?(0,u.$H)(m,w,l,j):(p({type:"updateOSDImageLoaded",OSDImageLoaded:!1}),p({type:"updateActiveCanvas",canvasId:n}),h(t))}})})},er=e=>{var t,n,r;let{annotationPage:l}=e,{contentSearchVault:s,configOptions:d}=(0,a.D1)(),[c,u]=(0,o.useState)(),h=null===(t=d.contentSearch)||void 0===t?void 0:t.searchResultsLimit,p=null===(n=d.localeText)||void 0===n?void 0:n.contentSearch;return l&&l.items&&(null===(r=l.items)||void 0===r?void 0:r.length)!==0?(0,i.jsx)(i.Fragment,{children:Object.entries(function(e){let t={};return e.items.forEach(e=>{let n=s.get(e.id),i="";if(n.label){let e=q(n.label);e&&(i=e[0])}void 0==t[i]&&(t[i]=[]),t[i].push(n)}),t}(l)).map((e,t)=>{let[n,o]=e;return(0,i.jsxs)("div",{children:[(0,i.jsx)(en,{className:"content-search-results-title",children:n}),(0,i.jsx)(ee,{className:"content-search-results",children:(h?o.slice(0,h):o).map((e,t)=>(0,i.jsx)(ea,{annotation:e,activeContentSearchTarget:c,setActiveContentSearchTarget:u},t))}),function(e){if(h){let t=e.length-h;if(t>0)return(0,i.jsxs)(ei,{children:[t," ",null==p?void 0:p.moreResults]})}}(o)]},t)})}):(0,i.jsx)("p",{children:null==p?void 0:p.noSearchResults})},el=n(1332);let es=(0,m.zo)("div",{".content-search-form":{display:"flex",marginBottom:"1rem"},input:{padding:".25rem",marginRight:"1rem"}}),ed=(0,m.zo)("button",{display:"flex",background:"none",border:"none",width:"2rem",height:"2rem",padding:"0",margin:"0",fontWeight:"700",borderRadius:"2rem",backgroundColor:"$accent",color:"$secondary",cursor:"pointer",boxSizing:"content-box",transition:"$all",svg:{height:"60%",width:"60%",padding:"20%",fill:"$secondary",stroke:"$secondary",opacity:"1",filter:"drop-shadow(5px 5px 5px #000D)",boxSizing:"inherit",transition:"$all"},"&:disabled":{backgroundColor:"transparent",boxShadow:"none",svg:{opacity:"0.25"}}});var ec=e=>{var t;let{searchServiceUrl:n,setContentSearchResource:r,setLoading:l}=e,[s,d]=(0,o.useState)(),{contentSearchVault:u,openSeadragonViewer:h,configOptions:p}=(0,a.D1)(),m=null===(t=p.localeText)||void 0===t?void 0:t.contentSearch;async function g(e){e.preventDefault();let t=null==m?void 0:m.tabLabel;if(h&&n){if(!s||""===s.trim()){r({label:{none:[t]}});return}l(!0),c(u,n,t,{q:s}).then(e=>{r(e),l(!1)})}}return(0,i.jsx)(es,{children:(0,i.jsxs)(el.fC,{onSubmit:g,className:"content-search-form",children:[(0,i.jsx)(el.gN,{className:"FormField",name:"searchTerms",onChange:e=>{e.preventDefault(),d(e.target.value)},children:(0,i.jsx)(el.oT,{placeholder:null==m?void 0:m.formPlaceholder})}),(0,i.jsx)(el.k4,{asChild:!0,children:(0,i.jsx)(ed,{type:"submit",children:(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:[(0,i.jsx)("title",{children:"Search"}),(0,i.jsx)("path",{d:"M456.69 421.39L362.6 327.3a173.81 173.81 0 0034.84-104.58C397.44 126.38 319.06 48 222.72 48S48 126.38 48 222.72s78.38 174.72 174.72 174.72A173.81 173.81 0 00327.3 362.6l94.09 94.09a25 25 0 0035.3-35.3zM97.92 222.72a124.8 124.8 0 11124.8 124.8 124.95 124.95 0 01-124.8-124.8z"})]})})})]})})},eu=e=>{let{searchServiceUrl:t,setContentSearchResource:n,activeCanvas:a,annotationPage:r}=e,[l,s]=(0,o.useState)(!1);return(0,i.jsxs)(et,{children:[(0,i.jsx)(ec,{searchServiceUrl:t,setContentSearchResource:n,activeCanvas:a,setLoading:s}),!l&&(0,i.jsx)(er,{annotationPage:r}),l&&(0,i.jsx)("span",{children:"Loading..."})]})};let eh=(0,m.zo)("div",{padding:" 0 1.618rem 2rem",display:"flex",flexDirection:"column",overflow:"scroll",position:"absolute",fontWeight:"400",fontSize:"1rem",zIndex:"0",img:{maxWidth:"100px",maxHeight:"100px",objectFit:"contain",color:"transparent",margin:"0 0 1rem",borderRadius:"3px",backgroundColor:"$secondaryMuted"},video:{display:"none"},"a, a:visited":{color:"$accent"},p:{fontSize:"1rem",lineHeight:"1.45em",margin:"0"},dl:{margin:"0",dt:{fontWeight:"700",margin:"1rem 0 0.25rem"},dd:{margin:"0"}},".manifest-property-title":{fontWeight:"700",margin:"1rem 0 0.25rem"},"ul, ol":{padding:"0",margin:"0",li:{fontSize:"1rem",lineHeight:"1.45em",listStyle:"none",margin:"0.25rem 0 0.25rem"}}}),ep=(0,m.zo)("div",{position:"relative",width:"100%",height:"100%",zIndex:"0"});var em=n(7184),eg=e=>{let{homepage:t}=e;return(null==t?void 0:t.length)===0?(0,i.jsx)(i.Fragment,{}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"manifest-property-title",children:"Homepage"}),(0,i.jsx)(em.bw,{homepage:t})]})},ef=e=>{let{id:t,htmlLabel:n,parent:o="manifest"}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"manifest-property-title",children:n}),(0,i.jsx)("a",{href:t,target:"_blank",id:"iiif-".concat(o,"-id"),children:t})]})},ex=e=>{let{metadata:t,parent:n="manifest"}=e;return t?(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(em.SF,{metadata:t,id:"iiif-".concat(n,"-metadata")})}):(0,i.jsx)(i.Fragment,{})},ev=e=>{let{rendering:t}=e;return(null==t?void 0:t.length)===0?(0,i.jsx)(i.Fragment,{}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"manifest-property-title",children:"Alternate formats"}),(0,i.jsx)(em.Oy,{rendering:t})]})},eb=e=>{let{requiredStatement:t,parent:n="manifest"}=e;return t?(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(em.bT,{requiredStatement:t,id:"iiif-".concat(n,"-required-statement")})}):(0,i.jsx)(i.Fragment,{})},ej=e=>{let{rights:t}=e;return t?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"manifest-property-title",children:"Rights"}),(0,i.jsx)("a",{href:t,target:"_blank",children:t})]}):(0,i.jsx)(i.Fragment,{})},ey=e=>{let{seeAlso:t}=e;return(null==t?void 0:t.length)===0?(0,i.jsx)(i.Fragment,{}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"manifest-property-title",children:"See Also"}),(0,i.jsx)(em.QZ,{seeAlso:t})]})},ew=e=>{let{summary:t,parent:n="manifest"}=e;return t?(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(em.ER,{summary:t,as:"p",id:"iiif-".concat(n,"-summary")})}):(0,i.jsx)(i.Fragment,{})},eC=e=>{let{label:t,thumbnail:n}=e;return(null==n?void 0:n.length)===0?(0,i.jsx)(i.Fragment,{}):(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(em.pl,{altAsLabel:t||{none:["resource"]},thumbnail:n,style:{backgroundColor:"#6663",objectFit:"cover"}})})},eS=()=>{let{activeManifest:e,vault:t}=(0,a.D1)(),[n,r]=(0,o.useState)(),[l,s]=(0,o.useState)([]),[d,c]=(0,o.useState)([]),[u,h]=(0,o.useState)([]),[p,m]=(0,o.useState)([]);return((0,o.useEffect)(()=>{var n,i,o,a;let l=t.get(e);r(l),(null===(n=l.homepage)||void 0===n?void 0:n.length)>0&&s(t.get(l.homepage)),(null===(i=l.seeAlso)||void 0===i?void 0:i.length)>0&&c(t.get(l.seeAlso)),(null===(o=l.rendering)||void 0===o?void 0:o.length)>0&&h(t.get(l.rendering)),(null===(a=l.thumbnail)||void 0===a?void 0:a.length)>0&&m(t.get(l.thumbnail))},[e,t]),n)?(0,i.jsx)(ep,{children:(0,i.jsxs)(eh,{children:[(0,i.jsx)(eC,{thumbnail:p,label:n.label}),(0,i.jsx)(ew,{summary:n.summary}),(0,i.jsx)(ex,{metadata:n.metadata}),(0,i.jsx)(eb,{requiredStatement:n.requiredStatement}),(0,i.jsx)(ej,{rights:n.rights}),(0,i.jsx)(eg,{homepage:l}),(0,i.jsx)(ey,{seeAlso:d}),(0,i.jsx)(ev,{rendering:u}),(0,i.jsx)(ef,{id:n.id,htmlLabel:"IIIF Manifest"})]})}):(0,i.jsx)(i.Fragment,{})},ek=e=>{let{activeCanvas:t,annotationResources:n,searchServiceUrl:r,setContentSearchResource:l,contentSearchResource:s}=e,d=(0,a.Cu)(),{isAutoScrolling:c,configOptions:{informationPanel:u},isUserScrolling:h,vault:p}=(0,a.D1)(),m=p.get({id:t,type:"Canvas"}),[g,f]=(0,o.useState)(),x=null==u?void 0:u.renderAbout,v=null==u?void 0:u.renderAnnotation,b=null==u?void 0:u.renderContentSearch;return(0,o.useEffect)(()=>{if(!g){if(null==u?void 0:u.defaultTab){let e=["manifest-about","manifest-content-search"];m.annotations.length>0&&m.annotations.forEach(t=>e.push(t.id)),e.includes(null==u?void 0:u.defaultTab)?f(u.defaultTab):f("manifest-about")}else x?f("manifest-about"):b?f("manifest-content-search"):n&&(null==n?void 0:n.length)>0&&f(n[0].id)}},[null==u?void 0:u.defaultTab,t,g,x,b,n,s,null==m?void 0:m.annotations]),(0,i.jsxs)(C,{"data-testid":"information-panel",defaultValue:g,onValueChange:e=>{f(e)},orientation:"horizontal",value:g,className:"clover-viewer-information-panel",children:[(0,i.jsxs)(S,{"aria-label":"select chapter","data-testid":"information-panel-list",children:[x&&(0,i.jsx)(k,{value:"manifest-about",children:"About"}),b&&s&&(0,i.jsx)(k,{value:"manifest-content-search",children:(0,i.jsx)(em.__,{label:s.label})}),v&&n&&n.map((e,t)=>(0,i.jsx)(k,{value:e.id,children:(0,i.jsx)(em.__,{label:e.label})},t))]}),(0,i.jsxs)(I,{handleScroll:function(){if(!c){clearTimeout(h);let e=setTimeout(()=>{d({type:"updateUserScrolling",isUserScrolling:void 0})},1500);d({type:"updateUserScrolling",isUserScrolling:e})}},children:[x&&(0,i.jsx)(z,{value:"manifest-about",children:(0,i.jsx)(eS,{})}),b&&s&&(0,i.jsx)(z,{value:"manifest-content-search",children:(0,i.jsx)(eu,{searchServiceUrl:r,setContentSearchResource:l,activeCanvas:t,annotationPage:s})}),v&&n&&n.map(e=>(0,i.jsx)(z,{value:e.id,children:(0,i.jsx)(Q,{annotationPage:e})},e.id))]})]})},ez=n(8640);let eI=(e,t,n,i)=>{let o=[];if(t.canvas&&t.canvas.thumbnail.length>0){let n=e.get(t.canvas.thumbnail[0]);o.push(n)}if(t.annotations[0]){if(t.annotations[0].thumbnail&&t.annotations[0].thumbnail.length>0){let n=e.get(t.annotations[0].thumbnail[0]);o.push(n)}if(!t.annotations[0].body)return;let n=t.annotations[0].body;"Image"===n.type&&o.push(n)}if(0!==o.length)return{id:o[0].id,format:o[0].format,type:o[0].type,width:n,height:i}},e$=(0,m.zo)("div",{position:"absolute",right:"1rem",top:"1rem",display:"flex",justifyContent:"flex-end",zIndex:"1"}),eA=(0,m.zo)("input",{flexGrow:"1",border:"none",backgroundColor:"$secondaryMuted",color:"$primary",marginRight:"1rem",height:"2rem",padding:"0 1rem",borderRadius:"2rem",fontFamily:"inherit",fontSize:"1rem",lineHeight:"1rem",boxShadow:"inset 1px 1px 2px #0003","&::placeholder":{color:"$primaryMuted"}}),eT=(0,m.zo)("button",{display:"flex",background:"none",border:"none",width:"2rem !important",height:"2rem !important",padding:"0",margin:"0",fontWeight:"700",borderRadius:"2rem",backgroundColor:"$accent",color:"$secondary",cursor:"pointer",boxSizing:"content-box !important",transition:"$all",svg:{height:"60%",width:"60%",padding:"20%",fill:"$secondary",stroke:"$secondary",opacity:"1",filter:"drop-shadow(5px 5px 5px #000D)",boxSizing:"inherit",transition:"$all"},"&:disabled":{backgroundColor:"transparent",boxShadow:"none",svg:{opacity:"0.25"}}}),eM=(0,m.zo)("div",{display:"flex",marginRight:"0.618rem",backgroundColor:"$accentAlt",borderRadius:"2rem",boxShadow:"5px 5px 5px #0003",color:"$secondary",alignItems:"center","> span":{display:"flex",margin:"0 0.5rem",fontSize:"0.7222rem"}}),eR=(0,m.zo)("div",{display:"flex",position:"relative",zIndex:"1",width:"100%",padding:"0",transition:"$all",variants:{isToggle:{true:{paddingTop:"2.618rem",["& ".concat(e$)]:{width:"calc(100% - 2rem)","@sm":{width:"calc(100% - 2rem)"}}}}}});var eE=(e,t)=>{(0,o.useEffect)(()=>{function n(n){n.key===e&&t()}return window.addEventListener("keyup",n),()=>window.removeEventListener("keyup",n)},[])};let eL=()=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:[(0,i.jsx)("title",{children:"Arrow Back"}),(0,i.jsx)("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M244 400L100 256l144-144M120 256h292"})]}),eF=()=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:[(0,i.jsx)("title",{children:"Arrow Forward"}),(0,i.jsx)("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M268 112l144 144-144 144M392 256H100"})]}),eH=()=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:[(0,i.jsx)("title",{children:"Close"}),(0,i.jsx)("path",{d:"M289.94 256l95-95A24 24 0 00351 127l-95 95-95-95a24 24 0 00-34 34l95 95-95 95a24 24 0 1034 34l95-95 95 95a24 24 0 0034-34z"})]}),eD=()=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:[(0,i.jsx)("title",{children:"Search"}),(0,i.jsx)("path",{d:"M456.69 421.39L362.6 327.3a173.81 173.81 0 0034.84-104.58C397.44 126.38 319.06 48 222.72 48S48 126.38 48 222.72s78.38 174.72 174.72 174.72A173.81 173.81 0 00327.3 362.6l94.09 94.09a25 25 0 0035.3-35.3zM97.92 222.72a124.8 124.8 0 11124.8 124.8 124.95 124.95 0 01-124.8-124.8z"})]});var eO=e=>{let{handleCanvasToggle:t,handleFilter:n,activeIndex:a,canvasLength:r}=e,[l,s]=(0,o.useState)(!1),[d,c]=(0,o.useState)(!1),[u,h]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{0===a?h(!0):h(!1),a===r-1?c(!0):c(!1)},[a,r]),eE("Escape",()=>{s(!1),n("")}),(0,i.jsx)(eR,{isToggle:l,children:(0,i.jsxs)(e$,{children:[l&&(0,i.jsx)(eA,{autoFocus:!0,onChange:e=>n(e.target.value),placeholder:"Search"}),!l&&(0,i.jsxs)(eM,{children:[(0,i.jsx)(eT,{onClick:()=>t(-1),disabled:u,type:"button",children:(0,i.jsx)(eL,{})}),(0,i.jsxs)("span",{children:[a+1," of ",r]}),(0,i.jsx)(eT,{onClick:()=>t(1),disabled:d,type:"button",children:(0,i.jsx)(eF,{})})]}),(0,i.jsx)(eT,{onClick:()=>{s(e=>!e),n("")},type:"button",children:l?(0,i.jsx)(eH,{}):(0,i.jsx)(eD,{})})]})})};let eB=(0,m.zo)(D.fC,{display:"flex",flexDirection:"row",flexGrow:"1",padding:"1.618rem",overflowX:"scroll",position:"relative",zIndex:"0"}),eV=(0,m.zo)("svg",{display:"inline-flex",variants:{isLarge:{true:{height:"4rem",width:"4rem"}},isMedium:{true:{height:"2rem",width:"2rem"}},isSmall:{true:{height:"1rem",width:"1rem"}}}}),eN=e=>(0,i.jsx)(eV,{...e,"data-testid":"icon-svg",role:"img",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:e.children});eN.Title=e=>{let{children:t}=e;return(0,i.jsx)("title",{children:t})},eN.Add=()=>(0,i.jsx)("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M256 112v288M400 256H112"}),eN.Audio=()=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("path",{d:"M232 416a23.88 23.88 0 01-14.2-4.68 8.27 8.27 0 01-.66-.51L125.76 336H56a24 24 0 01-24-24V200a24 24 0 0124-24h69.75l91.37-74.81a8.27 8.27 0 01.66-.51A24 24 0 01256 120v272a24 24 0 01-24 24zm-106.18-80zm-.27-159.86zM320 336a16 16 0 01-14.29-23.19c9.49-18.87 14.3-38 14.3-56.81 0-19.38-4.66-37.94-14.25-56.73a16 16 0 0128.5-14.54C346.19 208.12 352 231.44 352 256c0 23.86-6 47.81-17.7 71.19A16 16 0 01320 336z"}),(0,i.jsx)("path",{d:"M368 384a16 16 0 01-13.86-24C373.05 327.09 384 299.51 384 256c0-44.17-10.93-71.56-29.82-103.94a16 16 0 0127.64-16.12C402.92 172.11 416 204.81 416 256c0 50.43-13.06 83.29-34.13 120a16 16 0 01-13.87 8z"}),(0,i.jsx)("path",{d:"M416 432a16 16 0 01-13.39-24.74C429.85 365.47 448 323.76 448 256c0-66.5-18.18-108.62-45.49-151.39a16 16 0 1127-17.22C459.81 134.89 480 181.74 480 256c0 64.75-14.66 113.63-50.6 168.74A16 16 0 01416 432z"})]}),eN.Close=()=>(0,i.jsx)("path",{d:"M289.94 256l95-95A24 24 0 00351 127l-95 95-95-95a24 24 0 00-34 34l95 95-95 95a24 24 0 1034 34l95-95 95 95a24 24 0 0034-34z"}),eN.Download=()=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("path",{d:"M336 176h40a40 40 0 0140 40v208a40 40 0 01-40 40H136a40 40 0 01-40-40V216a40 40 0 0140-40h40",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32"}),(0,i.jsx)("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M176 272l80 80 80-80M256 48v288"})]}),eN.Image=()=>(0,i.jsx)("path",{d:"M416 64H96a64.07 64.07 0 00-64 64v256a64.07 64.07 0 0064 64h320a64.07 64.07 0 0064-64V128a64.07 64.07 0 00-64-64zm-80 64a48 48 0 11-48 48 48.05 48.05 0 0148-48zM96 416a32 32 0 01-32-32v-67.63l94.84-84.3a48.06 48.06 0 0165.8 1.9l64.95 64.81L172.37 416zm352-32a32 32 0 01-32 32H217.63l121.42-121.42a47.72 47.72 0 0161.64-.16L448 333.84z"}),eN.Video=()=>(0,i.jsx)("path",{d:"M464 384.39a32 32 0 01-13-2.77 15.77 15.77 0 01-2.71-1.54l-82.71-58.22A32 32 0 01352 295.7v-79.4a32 32 0 0113.58-26.16l82.71-58.22a15.77 15.77 0 012.71-1.54 32 32 0 0145 29.24v192.76a32 32 0 01-32 32zM268 400H84a68.07 68.07 0 01-68-68V180a68.07 68.07 0 0168-68h184.48A67.6 67.6 0 01336 179.52V332a68.07 68.07 0 01-68 68z"});var eP=n(2338);let eW=(0,m.F4)({"0%":{opacity:0,transform:"translateY(1rem)"},"100%":{opacity:1,transform:"translateY(0)"}}),e_=(0,m.F4)({"0%":{opacity:0,transform:"translateY(1rem)"},"100%":{opacity:1,transform:"translateY(0)"}}),eG=(0,m.zo)(eP.Eh,{fill:"$secondaryAlt"}),eq=(0,m.zo)(eP.x8,{position:"absolute",right:"0",top:"0",padding:"0.5rem",margin:"0",cursor:"pointer",border:"none",background:"none",fill:"inherit","&:hover":{opacity:"0.75"}}),eU=(0,m.zo)(eP.VY,{border:"none",backgroundColor:"white",fill:"inhrerit",padding:"1rem 2rem 1rem 1rem",width:"auto",minWidth:"200px",maxWidth:"350px",borderRadius:"3px",boxShadow:"5px 5px 13px #0002",animationDuration:"0.3s",animationTimingFunction:"cubic-bezier(0.16, 1, 0.3, 1)",'&[data-side="top"]':{animationName:e_},'&[data-side="bottom"]':{animationName:eW},'&[data-align="end"]':{["& ".concat(eG)]:{margin:"0 0.7rem"}}}),eZ=(0,m.zo)(eP.xz,{display:"inline-flex",padding:"0.5rem 0",margin:"0 0.5rem 0 0",cursor:"pointer",border:"none",background:"none","> button, > span":{margin:"0"}}),eY=(0,m.zo)(eP.fC,{boxSizing:"content-box"}),eJ=e=>{let{children:t}=e;return(0,i.jsx)(eY,{children:t})};eJ.Trigger=e=>(0,i.jsx)(eZ,{...e,children:e.children}),eJ.Content=e=>(0,i.jsxs)(eU,{...e,children:[(0,i.jsx)(eG,{}),(0,i.jsx)(eq,{children:(0,i.jsx)(eN,{isSmall:!0,children:(0,i.jsx)(eN.Close,{})})}),e.children]});let eQ=(0,m.zo)("div",{boxSizing:"border-box",display:"inline-flex",alignItems:"center",borderRadius:"5px",padding:"$1",marginBottom:"$2",marginRight:"$2",backgroundColor:"$lightGrey",color:"$richBlack50",textTransform:"uppercase",fontSize:"$2",objectFit:"contain",lineHeight:"1em !important","&:last-child":{marginRight:"0"},["".concat(eV)]:{position:"absolute",left:"$1",height:"$3",width:"$3"},variants:{isIcon:{true:{position:"relative",paddingLeft:"$5"}}}}),eX=(0,m.zo)("span",{display:"flex"}),eK=(0,m.zo)("span",{display:"flex",width:"1.2111rem",height:"0.7222rem"}),e0=(0,m.zo)("span",{display:"inline-flex",marginLeft:"5px",marginBottom:"-1px"}),e1=(0,m.zo)(D.ck,{display:"flex",flexShrink:"0",margin:"0 1.618rem 0 0",padding:"0",cursor:"pointer",background:"none",border:"none",fontFamily:"inherit",lineHeight:"1.25em",fontSize:"1rem",textAlign:"left","&:last-child":{marginRight:"1rem"},figure:{margin:"0",width:"161.8px","> div":{position:"relative",display:"flex",backgroundColor:"$secondaryAlt",width:"inherit",height:"100px",overflow:"hidden",borderRadius:"3px",transition:"$all",img:{width:"100%",height:"100%",objectFit:"cover",filter:"blur(0)",transform:"scale3d(1, 1, 1)",transition:"$all",color:"transparent"},["& ".concat(eX)]:{position:"absolute",right:"0",bottom:"0",["& ".concat(eQ)]:{margin:"0",paddingLeft:"0",fontSize:"0.7222rem",backgroundColor:"#000d",color:"$secondary",fill:"$secondary",borderBottomLeftRadius:"0",borderTopRightRadius:"0"}}},figcaption:{marginTop:"0.5rem",fontWeight:"400",fontSize:"0.8333rem",display:"-webkit-box",overflow:"hidden",MozBoxOrient:"vertical",WebkitBoxOrient:"vertical",WebkitLineClamp:"5","@sm":{fontSize:"0.8333rem"}}},"&[aria-checked='true']":{figure:{"> div":{backgroundColor:"$primaryAlt","&::before":{position:"absolute",zIndex:"1",color:"$secondaryMuted",content:"Active Item",textTransform:"uppercase",fontWeight:"700",fontSize:"0.6111rem",letterSpacing:"0.03rem",display:"flex",width:"100%",height:"100%",flexDirection:"column",justifyContent:"center",textAlign:"center",textShadow:"5px 5px 5px #0003"},img:{opacity:"0.3",transform:"scale3d(1.1, 1.1, 1.1)",filter:"blur(2px)"},["& ".concat(eX)]:{["& ".concat(eQ)]:{backgroundColor:"$accent"}}}},figcaption:{fontWeight:"700"}}}),e2=e=>{let{type:t}=e;switch(t){case"Sound":return(0,i.jsx)(eN.Audio,{});case"Image":default:return(0,i.jsx)(eN.Image,{});case"Video":return(0,i.jsx)(eN.Video,{})}};var e4=e=>{let{canvas:t,canvasIndex:n,isActive:o,thumbnail:a,type:r,handleChange:l}=e;return(0,i.jsx)(e1,{"aria-checked":o,"data-testid":"media-thumbnail","data-canvas":n,onClick:()=>l(t.id),value:t.id,children:(0,i.jsxs)("figure",{children:[(0,i.jsxs)("div",{children:[(null==a?void 0:a.id)&&(0,i.jsx)("img",{src:a.id,alt:(null==t?void 0:t.label)?q(t.label):""}),(0,i.jsx)(eX,{children:(0,i.jsxs)(eQ,{isIcon:!0,"data-testid":"thumbnail-tag",children:[(0,i.jsx)(eK,{}),(0,i.jsx)(eN,{"aria-label":r,children:(0,i.jsx)(e2,{type:r})}),["Video","Sound"].includes(r)&&(0,i.jsx)(e0,{children:(0,N.rJ)(t.duration)})]})})]}),(null==t?void 0:t.label)&&(0,i.jsx)("figcaption",{"data-testid":"fig-caption",children:(0,i.jsx)(em.__,{label:t.label})})]})})};let e3=e=>e.body?e.body.type:"Image";var e5=e=>{let{items:t}=e,n=(0,a.Cu)(),{activeCanvas:r,vault:l}=(0,a.D1)(),[s,d]=(0,o.useState)(""),[c,u]=(0,o.useState)([]),[h,p]=(0,o.useState)(0),m=o.useRef(null),g=e=>{r!==e&&n({type:"updateActiveCanvas",canvasId:e})};return(0,o.useEffect)(()=>{if(!c.length){let e=["Image","Sound","Video"];u(t.map(t=>(0,ez.g)(l,t,"painting",e)).filter(e=>e.annotations.length>0))}},[t,c.length,l]),(0,o.useEffect)(()=>{c.forEach((e,t)=>{(null==e?void 0:e.canvas)&&e.canvas.id===r&&p(t)})},[r,c]),(0,o.useEffect)(()=>{let e=document.querySelector('[data-canvas="'.concat(h,'"]'));if(e instanceof HTMLElement&&m.current){let t=e.offsetLeft-m.current.offsetWidth/2+e.offsetWidth/2;m.current.scrollTo({left:t,behavior:"smooth"})}},[h]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(eO,{handleFilter:e=>d(e),handleCanvasToggle:e=>{let t=c[h+e];(null==t?void 0:t.canvas)&&g(t.canvas.id)},activeIndex:h,canvasLength:c.length}),(0,i.jsx)(eB,{"aria-label":"select item","data-testid":"media",ref:m,children:c.filter(e=>{var t;if(null===(t=e.canvas)||void 0===t?void 0:t.label){let t=q(e.canvas.label);if(Array.isArray(t))return t[0].toLowerCase().includes(s.toLowerCase())}}).map((e,t)=>{var n,o;return(0,i.jsx)(e4,{canvas:e.canvas,canvasIndex:t,handleChange:g,isActive:r===(null==e?void 0:null===(n=e.canvas)||void 0===n?void 0:n.id),thumbnail:eI(l,e,200,200),type:e3(e.annotations[0])},null==e?void 0:null===(o=e.canvas)||void 0===o?void 0:o.id)})})]})};let e6=(0,m.zo)("button",{position:"absolute",background:"none",border:"none",cursor:"zoom-in",margin:"0",padding:"0",width:"100%",height:"100%",transition:"$all","& img":{width:"100%",height:"100%",objectFit:"contain",color:"transparent",transition:"$all"},variants:{isMedia:{true:{cursor:"pointer"}}}});var e8=n(515);let e7=(0,m.zo)(e8.c,{position:"absolute",width:"2rem",top:"1rem",right:"1rem",zIndex:100,display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",transition:"$all",borderRadius:"50%",backgroundColor:"$accent",cursor:"pointer","&:hover, &:focus":{backgroundColor:"$accent !important"},variants:{isInteractive:{true:{"&:hover":{opacity:"1"}},false:{}},isMedia:{true:{cursor:"pointer !important"}}},compoundVariants:[{isInteractive:!1,isMedia:!0,css:{top:"50%",right:"50%",width:"4rem",height:"4rem",transform:"translate(50%,-50%)"}}]}),e9=(0,m.zo)("div",{position:"relative",display:"flex",flexDirection:"column",flexGrow:"1",flexShrink:"1",gap:"1rem",zIndex:"0",overflow:"hidden","&:hover":{["".concat(e7)]:{backgroundColor:"$accent"},["".concat(e6)]:{backgroundColor:"#6662"}}}),te=(0,m.zo)("div",{width:"100%",height:"100%"});var tt=n(2016);let tn=(0,m.zo)("svg",{height:"19px",color:"$accent",fill:"$accent",stroke:"$accent",display:"flex",margin:"0.25rem 0.85rem"}),ti=(0,m.zo)(tt.xz,{fontSize:"1.25rem",fontWeight:"400",fontFamily:"inherit",alignSelf:"flex-start",flexGrow:"1",cursor:"pointer",transition:"$all",border:"1px solid #6663",boxShadow:"2px 2px 5px #0001",borderRadius:"3px",display:"flex",alignItems:"center",paddingLeft:"0.5rem",width:"100%","@sm":{fontSize:"1rem"}}),to=(0,m.zo)(tt.VY,{borderRadius:"3px",boxShadow:"3px 3px 8px #0003",backgroundColor:"$secondary",marginTop:"2.25rem",marginLeft:"6px",paddingBottom:"0.25rem",maxHeight:"calc(61.8vh - 2.5rem) !important",borderTopLeftRadius:"0",border:"1px solid $secondaryMuted",maxWidth:"90vw"}),ta=(0,m.zo)(tt.ck,{display:"flex",alignItems:"center",fontFamily:"inherit",padding:"0.25rem 0.5rem",color:"$primary",fontWeight:"400",fontSize:"0.8333rem",cursor:"pointer",backgroundColor:"$secondary",width:"calc(100% - 1rem)","> span":{whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"},'&[data-state="checked"]':{fontWeight:"700",color:"$primary !important"},"&:hover":{color:"$accent"},img:{width:"31px",height:"31px",marginRight:"0.5rem",borderRadius:"3px"}}),tr=(0,m.zo)(tt.__,{color:"$primaryMuted",fontFamily:"inherit",fontSize:"0.85rem",padding:"0.5rem 1rem 0.5rem 0.5rem",display:"flex",alignItems:"center",marginBottom:"0.25rem",borderRadius:"3px",borderTopLeftRadius:"0",borderBottomLeftRadius:"0",borderBottomRightRadius:"0",backgroundColor:"$secondaryMuted"}),tl=(0,m.zo)(tt.fC,{position:"relative",zIndex:"5",width:"100%"});var ts=e=>{let{direction:t,title:n}=e;return(0,i.jsxs)(tn,{xmlns:"http://www.w3.org/2000/svg",focusable:"false",viewBox:"0 0 512 512",role:"img",children:[(0,i.jsx)("title",{children:n}),"up"===t&&(0,i.jsx)(()=>(0,i.jsx)("path",{d:"M414 321.94L274.22 158.82a24 24 0 00-36.44 0L98 321.94c-13.34 15.57-2.28 39.62 18.22 39.62h279.6c20.5 0 31.56-24.05 18.18-39.62z"}),{}),"down"===t&&(0,i.jsx)(()=>(0,i.jsx)("path",{d:"M98 190.06l139.78 163.12a24 24 0 0036.44 0L414 190.06c13.34-15.57 2.28-39.62-18.22-39.62h-279.6c-20.5 0-31.56 24.05-18.18 39.62z"}),{})]})},td=e=>{let{children:t,label:n,maxHeight:o,onValueChange:a,value:r}=e;return(0,i.jsxs)(tl,{onValueChange:a,value:r,children:[(0,i.jsxs)(ti,{"data-testid":"select-button",children:[(0,i.jsx)(tt.ki,{"data-testid":"select-button-value"}),(0,i.jsx)(tt.GV,{children:(0,i.jsx)(ts,{direction:"down",title:"select"})})]}),(0,i.jsx)(tt.ue,{children:(0,i.jsxs)(to,{css:{maxHeight:"".concat(o," !important")},"data-testid":"select-content",children:[(0,i.jsx)(tt.Pn,{children:(0,i.jsx)(ts,{direction:"up",title:"scroll up for more"})}),(0,i.jsx)(tt.Q_,{children:(0,i.jsxs)(tt.DI,{children:[n&&(0,i.jsx)(tr,{children:(0,i.jsx)(em.__,{"data-testid":"select-label",label:n})}),t]})}),(0,i.jsx)(tt.Jk,{children:(0,i.jsx)(ts,{direction:"down",title:"scroll down for more"})})]})})]})},tc=e=>(0,i.jsxs)(ta,{...e,children:[e.thumbnail&&(0,i.jsx)(em.pl,{thumbnail:e.thumbnail}),(0,i.jsx)(tt.S_,{children:(0,i.jsx)(em.__,{label:e.label})}),(0,i.jsx)(tt.o6,{})]}),tu=n(5129),th=e=>{let{isMedia:t,label:n,placeholderCanvas:o,setIsInteractive:r}=e,{vault:l}=(0,a.D1)(),d=(0,s.G)(l,o),c=d?d[0]:void 0,u=n?q(n):["placeholder image"];return(0,i.jsx)(e6,{onClick:()=>r(!0),isMedia:t,className:"clover-viewer-placeholder",children:(0,i.jsx)("img",{src:(null==c?void 0:c.id)||"",alt:u.join(),height:null==c?void 0:c.height,width:null==c?void 0:c.width})})},tp=n(2089);let tm=(0,m.zo)("canvas",{position:"absolute",width:"100%",height:"100%",zIndex:"0"}),tg=o.forwardRef((e,t)=>{let n=o.useRef(null),a=(0,o.useCallback)(()=>{var e,i;if((null===(e=t.current)||void 0===e?void 0:e.currentTime)&&(null===(i=t.current)||void 0===i?void 0:i.currentTime)>0)return;let o=t.current;if(!o)return;let a=new AudioContext,r=a.createMediaElementSource(o),l=a.createAnalyser(),s=n.current;if(!s)return;s.width=o.offsetWidth,s.height=o.offsetHeight;let d=s.getContext("2d");r.connect(l),l.connect(a.destination),l.fftSize=256;let c=l.frequencyBinCount,u=new Uint8Array(c);setInterval(function(){!function(e,t,n,i,o,a){let r;let l=o/n*2.6,s=0;e.getByteFrequencyData(i),t.fillStyle="#000000",t.fillRect(0,0,o,a);for(let e=0;e{t&&t.current&&(t.current.onplay=a)},[a,t]),(0,i.jsx)(tm,{ref:n,role:"presentation"})}),tf=(0,m.zo)("div",{position:"relative",backgroundColor:"$primaryAlt",display:"flex",flexGrow:"0",flexShrink:"1",height:"100%",zIndex:"1",video:{backgroundColor:"transparent",objectFit:"contain",width:"100%",height:"100%",position:"relative",zIndex:"1"}});var tx=e=>{let{resource:t,ignoreCaptionLabels:n}=e,o=q(t.label,"en");return Array.isArray(o)&&o.some(e=>n.includes(e))?null:(0,i.jsx)("track",{src:t.id,label:Array.isArray(o)?o[0]:o,srcLang:"en","data-testid":"player-track"},t.id)};let tv=["application/vnd.apple.mpegurl","vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"];var tb=e=>{let{allSources:t,annotationResources:n,painting:r}=e,[l,d]=o.useState(0),[c,u]=o.useState(),h=o.useRef(null),p=(null==r?void 0:r.type)==="Sound",{activeCanvas:m,configOptions:g,vault:f}=(0,a.D1)();return(0,o.useEffect)(()=>{if(!r.id||!h.current)return;if(null==h?void 0:h.current){let e=h.current;e.src=r.id,e.load()}if("m3u8"!==r.id.split(".").pop()&&r.format&&!tv.includes(r.format))return;let e=new tp.ZP({xhrSetup:function(e,t){e.withCredentials=!!g.withCredentials}});return e.attachMedia(h.current),e.on(tp.ZP.Events.MEDIA_ATTACHED,function(){e.loadSource(r.id)}),e.on(tp.ZP.Events.ERROR,function(t,n){if(n.fatal)switch(n.type){case tp.ZP.ErrorTypes.NETWORK_ERROR:console.error("fatal ".concat(t," network error encountered, try to recover")),e.startLoad();break;case tp.ZP.ErrorTypes.MEDIA_ERROR:console.error("fatal ".concat(t," media error encountered, try to recover")),e.recoverMediaError();break;default:e.destroy()}}),()=>{if(e&&h.current){let t=h.current;e.detachMedia(),e.destroy(),t.currentTime=0}}},[g.withCredentials,r.id]),(0,o.useEffect)(()=>{var e,t,n,i;let o=f.get(m),a=(null===(e=o.accompanyingCanvas)||void 0===e?void 0:e.id)?(0,s.G)(f,null===(t=o.accompanyingCanvas)||void 0===t?void 0:t.id):null,r=(null===(n=o.placeholderCanvas)||void 0===n?void 0:n.id)?(0,s.G)(f,null===(i=o.placeholderCanvas)||void 0===i?void 0:i.id):null;a&&r?0===l?u(r[0].id):u(a[0].id):(a&&u(a[0].id),r&&u(r[0].id))},[m,l,f]),(0,o.useEffect)(()=>{if(null==h?void 0:h.current){let e=h.current;return null==e||e.addEventListener("timeupdate",()=>d(e.currentTime)),()=>document.removeEventListener("timeupdate",()=>{})}},[]),(0,i.jsxs)(tf,{css:{backgroundColor:g.canvasBackgroundColor,maxHeight:g.canvasHeight,position:"relative"},"data-testid":"player-wrapper",className:"clover-viewer-player-wrapper",children:[(0,i.jsxs)("video",{id:"clover-iiif-video",ref:h,controls:!0,height:r.height,width:r.width,crossOrigin:"anonymous",poster:c,style:{maxHeight:g.canvasHeight,position:"relative",zIndex:"1"},children:[t.map(e=>(0,i.jsx)("source",{src:e.id,type:e.format},e.id)),(null==n?void 0:n.length)>0&&n.map(e=>{let t=[];return e.items.forEach(e=>{f.get(e.id).body.forEach(e=>{let n=f.get(e.id);t.push(n)})}),t.map(e=>(0,i.jsx)(tx,{resource:e,ignoreCaptionLabels:g.ignoreCaptionLabels||[]},e.id))}),"Sorry, your browser doesn't support embedded videos."]},r.id),p&&(0,i.jsx)(tg,{ref:h})]})};let tj=()=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"close-svg-title",focusable:"false",viewBox:"0 0 512 512",role:"img",children:[(0,i.jsx)("title",{id:"close-svg-title",children:"close"}),(0,i.jsx)("path",{d:"M289.94 256l95-95A24 24 0 00351 127l-95 95-95-95a24 24 0 00-34 34l95 95-95 95a24 24 0 1034 34l95-95 95 95a24 24 0 0034-34z"})]}),ty=e=>{let{isMedia:t}=e;return(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"open-svg-title",focusable:"false",viewBox:"0 0 512 512",role:"img",children:[(0,i.jsx)("title",{id:"open-svg-title",children:"open"}),t?(0,i.jsx)("path",{d:"M133 440a35.37 35.37 0 01-17.5-4.67c-12-6.8-19.46-20-19.46-34.33V111c0-14.37 7.46-27.53 19.46-34.33a35.13 35.13 0 0135.77.45l247.85 148.36a36 36 0 010 61l-247.89 148.4A35.5 35.5 0 01133 440z"}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("path",{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"}),(0,i.jsx)("path",{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"})]})]})};var tw=e=>{let{handleToggle:t,isInteractive:n,isMedia:o}=e;return(0,i.jsx)(e7,{onClick:t,isInteractive:n,isMedia:o,"data-testid":"placeholder-toggle",children:n?(0,i.jsx)(tj,{}):(0,i.jsx)(ty,{isMedia:o})})},tC=e=>{var t,n,r,l,s;let{activeCanvas:d,annotationResources:c,isMedia:h,painting:p}=e,[m,g]=o.useState(0),[f,x]=o.useState(!1),{configOptions:v,customDisplays:b,openSeadragonViewer:j,vault:y,viewerId:w}=(0,a.D1)(),C=(0,a.Cu)(),S=y.get(d),k=null==S?void 0:null===(t=S.placeholderCanvas)||void 0===t?void 0:t.id,z=!!k,I=(null==p?void 0:p.length)>1,$=k&&!f&&!h,A="".concat(w,"-").concat((0,N.un)(d+m)),T=b.find(e=>{let t=!1,{canvasId:n,paintingFormat:i}=e.target;if(Array.isArray(n)&&n.length>0&&(t=n.includes(d)),Array.isArray(i)&&i.length>0){var o;let e=(null===(o=p[m])||void 0===o?void 0:o.format)||"";t=!!(e&&i.includes(e))}return t}),M=[];null===(r=c[0])||void 0===r||null===(n=r.items)||void 0===n||n.forEach(e=>{let t=y.get(e.id);M.push(t)}),(0,o.useEffect)(()=>{var e;M&&j&&(null===(e=v.annotationOverlays)||void 0===e?void 0:e.renderOverlays)&&((0,u.dH)(j,"annotation-overlay"),(0,u.zG)(j,S,v.annotationOverlays,M,"annotation-overlay"))},[S,M,j,v]);let R=null==T?void 0:null===(l=T.display)||void 0===l?void 0:l.component;return(0,i.jsxs)(e9,{className:"clover-viewer-painting",children:[(0,i.jsxs)(te,{style:{backgroundColor:v.canvasBackgroundColor,height:"auto"===v.canvasHeight?"100%":v.canvasHeight},children:[k&&!h&&(0,i.jsx)(tw,{handleToggle:()=>x(!f),isInteractive:f,isMedia:h}),$&&!h&&(0,i.jsx)(th,{isMedia:h,label:null==S?void 0:S.label,placeholderCanvas:k,setIsInteractive:x}),!$&&!T&&(h?(0,i.jsx)(tb,{allSources:p,painting:p[m],annotationResources:c}):p&&(0,i.jsx)(tu.default,{_cloverViewerHasPlaceholder:z,body:p[m],instanceId:A,openSeadragonCallback:e=>{e&&(null==j?void 0:j.id)!=="openseadragon-".concat(A)&&C({type:"updateOpenSeadragonViewer",openSeadragonViewer:e})},openSeadragonConfig:v.openSeadragon},A)),!$&&R&&(0,i.jsx)(R,{id:d,annotationBody:p[m],...null==T?void 0:T.display.componentProps})]}),I&&(0,i.jsx)(td,{value:null===(s=p[m])||void 0===s?void 0:s.id,onValueChange:e=>{g(p.findIndex(t=>t.id===e))},maxHeight:"200px",children:null==p?void 0:p.map(e=>(0,i.jsx)(tc,{value:null==e?void 0:e.id,label:null==e?void 0:e.label},null==e?void 0:e.id))})]})},tS=e=>{let{activeCanvas:t,annotationResources:n,searchServiceUrl:o,setContentSearchResource:r,contentSearchResource:l,isAudioVideo:s,items:d,painting:c}=e,{isInformationOpen:u,configOptions:h}=(0,a.D1)(),{informationPanel:p}=h,m=(null==p?void 0:p.renderAbout)&&u,y=(null==p?void 0:p.renderAnnotation)&&n.length>0&&!p.open;return(0,i.jsxs)(f,{className:"clover-viewer-content","data-testid":"clover-viewer-content",children:[(0,i.jsxs)(x,{children:[(0,i.jsx)(tC,{activeCanvas:t,annotationResources:n,isMedia:s,painting:c}),m&&(0,i.jsx)(v,{children:(0,i.jsx)("span",{children:u?"View Items":"More Information"})}),d.length>1&&(0,i.jsx)(g,{className:"clover-viewer-media-wrapper",children:(0,i.jsx)(e5,{items:d,activeItem:0})})]}),(m||y)&&(0,i.jsx)(j,{children:(0,i.jsx)(b,{children:(0,i.jsx)(ek,{activeCanvas:t,annotationResources:n,searchServiceUrl:o,setContentSearchResource:r,contentSearchResource:l})})})]})};let tk=(0,m.zo)(eJ.Trigger,{width:"30px",padding:"5px"}),tz=(0,m.zo)(eJ.Content,{display:"flex",flexDirection:"column",fontSize:"0.8333rem",border:"none",boxShadow:"2px 2px 5px #0003",zIndex:"2",button:{display:"flex",textDecoration:"none",marginBottom:"0.5em",color:"$accentAlt",cursor:"pointer",background:"$secondary",border:"none","&:last-child":{marginBottom:"0"}}}),tI=(0,m.zo)("span",{fontSize:"1.33rem",alignSelf:"flex-start",flexGrow:"0",flexShrink:"1",padding:"1rem","@sm":{fontSize:"1rem"},"&.visually-hidden":{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}}),t$=(0,m.zo)("header",{display:"flex",backgroundColor:"transparent !important",justifyContent:"space-between",alignItems:"flex-start",width:"100%",["> ".concat(tl)]:{flexGrow:"1",flexShrink:"0"},form:{flexGrow:"0",flexShrink:"1"}}),tA=(0,m.zo)("div",{display:"flex",alignItems:"flex-end",justifyContent:"flex-end",padding:"1rem",flexShrink:"0",flexGrow:"1"});var tT=()=>{var e;let t=(0,a.Cu)(),{activeManifest:n,collection:o,configOptions:r,vault:l}=(0,a.D1)(),s=null==r?void 0:r.canvasHeight;return(0,i.jsx)("div",{style:{margin:"0.75rem"},children:(0,i.jsx)(td,{label:o.label,maxHeight:s,value:n,onValueChange:e=>{t({type:"updateActiveManifest",manifestId:e}),t({type:"updateViewerId",viewerId:(0,F.Z)()})},children:null==o?void 0:null===(e=o.items)||void 0===e?void 0:e.map(e=>(0,i.jsx)(tc,{value:e.id,thumbnail:(null==e?void 0:e.thumbnail)?l.get(null==e?void 0:e.thumbnail):void 0,label:e.label},e.id))})})};let tM=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2500,[n,i]=(0,o.useState)(),a=(0,o.useCallback)(()=>{navigator.clipboard.writeText(e).then(()=>i("copied"),()=>i("failed"))},[e]);return(0,o.useEffect)(()=>{if(!n)return;let e=setTimeout(()=>i(void 0),t);return()=>clearTimeout(e)},[n]),[n,a]},tR=(0,m.zo)("span",{display:"flex",alignContent:"center",alignItems:"center",padding:"0.125rem 0.25rem 0",marginTop:"-0.125rem",marginLeft:"0.5rem",backgroundColor:"$accent",color:"$secondary",borderRadius:"3px",fontSize:"0.6111rem",textTransform:"uppercase",lineHeight:"1em"}),tE=e=>{let{status:t}=e;return t?(0,i.jsx)(tR,{"data-copy-status":t,children:t}):null};var tL=e=>{let{textPrompt:t,textToCopy:n}=e,[o,a]=tM(n);return(0,i.jsxs)("button",{onClick:a,children:[t," ",(0,i.jsx)(tE,{status:o})]})},tF=()=>{let e="#ed1d33",t="#2873ab";return(0,i.jsxs)("svg",{viewBox:"0 0 493.35999 441.33334",id:"iiif-logo",version:"1.1",children:[(0,i.jsx)("title",{children:"IIIF Manifest Options"}),(0,i.jsx)("g",{transform:"matrix(1.3333333,0,0,-1.3333333,0,441.33333)",children:(0,i.jsxs)("g",{transform:"scale(0.1)",children:[(0,i.jsx)("path",{style:{fill:t},d:"M 65.2422,2178.75 775.242,1915 773.992,15 65.2422,276.25 v 1902.5"}),(0,i.jsx)("path",{style:{fill:t},d:"m 804.145,2640.09 c 81.441,-240.91 -26.473,-436.2 -241.04,-436.2 -214.558,0 -454.511,195.29 -535.9527,436.2 -81.4335,240.89 26.4805,436.18 241.0387,436.18 214.567,0 454.512,-195.29 535.954,-436.18"}),(0,i.jsx)("path",{style:{fill:e},d:"M 1678.58,2178.75 968.578,1915 969.828,15 1678.58,276.25 v 1902.5"}),(0,i.jsx)("path",{style:{fill:e},d:"m 935.082,2640.09 c -81.437,-240.91 26.477,-436.2 241.038,-436.2 214.56,0 454.51,195.29 535.96,436.2 81.43,240.89 -26.48,436.18 -241.04,436.18 -214.57,0 -454.52,-195.29 -535.958,-436.18"}),(0,i.jsx)("path",{style:{fill:t},d:"m 1860.24,2178.75 710,-263.75 -1.25,-1900 -708.75,261.25 v 1902.5"}),(0,i.jsx)("path",{style:{fill:t},d:"m 2603.74,2640.09 c 81.45,-240.91 -26.47,-436.2 -241.03,-436.2 -214.58,0 -454.52,195.29 -535.96,436.2 -81.44,240.89 26.48,436.18 241.03,436.18 214.57,0 454.51,-195.29 535.96,-436.18"}),(0,i.jsx)("path",{style:{fill:e},d:"m 3700.24,3310 v -652.5 c 0,0 -230,90 -257.5,-142.5 -2.5,-247.5 0,-336.25 0,-336.25 l 257.5,83.75 V 1690 l -258.61,-92.5 V 262.5 L 2735.24,0 v 2360 c 0,0 -15,850 965,950"})]})})]})},tH=n(2472);let tD=(0,m.zo)(tH.fC,{all:"unset",height:"2rem",width:"3.236rem",backgroundColor:"#6663",borderRadius:"9999px",position:"relative",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:focus":{boxShadow:"0 0 0 2px $secondaryAlt"},'&[data-state="checked"]':{backgroundColor:"$accent",boxShadow:"inset 2px 2px 5px #0003"}}),tO=(0,m.zo)(tH.bU,{display:"block",height:"calc(2rem - 12px)",width:"calc(2rem - 12px)",backgroundColor:"$secondary",borderRadius:"100%",boxShadow:"2px 2px 5px #0001",transition:"$all",transform:"translateX(6px)",willChange:"transform",'&[data-state="checked"]':{transform:"translateX(calc(1.236rem + 6px))"}}),tB=(0,m.zo)("label",{fontSize:"0.8333rem",fontWeight:"400",lineHeight:"1em",userSelect:"none",cursor:"pointer",paddingRight:"0.618rem"}),tV=(0,m.zo)("form",{display:"flex",flexShrink:"0",flexGrow:"1",alignItems:"center",marginLeft:"1.618rem"});var tN=()=>{var e;let{configOptions:t}=(0,a.D1)(),n=(0,a.Cu)(),[r,l]=(0,o.useState)(null==t?void 0:null===(e=t.informationPanel)||void 0===e?void 0:e.open);return(0,o.useEffect)(()=>{n({type:"updateInformationOpen",isInformationOpen:r})},[r,n]),(0,i.jsxs)(tV,{children:[(0,i.jsx)(tB,{htmlFor:"information-toggle",css:r?{opacity:"1"}:{},children:"More Information"}),(0,i.jsx)(tD,{checked:r,onCheckedChange:()=>l(!r),id:"information-toggle","aria-label":"information panel toggle",name:"toggled?",children:(0,i.jsx)(tO,{})})]})};let tP=(0,m.zo)(eJ.Trigger,{width:"30px",padding:"5px"}),tW=(0,m.zo)(tz,{h3:{color:"$primaryAlt",fontSize:"$2",fontWeight:"700",margin:"$2 0"},button:{},"& ul li":{marginBottom:"$1"}});var t_=n(5593);function tG(e,t){let n=[];if(!e)return n;for(let i of e)if(i.id){let e=t.get(i.id);e&&n.push(e)}return n}function tq(e,t){return e.map(e=>{let{format:n,id:i,label:o}=e;return{format:n,id:function(e){let{vault:t}=(0,a.D1)();try{let n=e&&t.get(e);if(!n)throw Error("Vault entity ".concat(e," not found."));return(null==n?void 0:n["@id"])||(null==n?void 0:n.id)}catch(t){return console.error(t),e}}(i),label:(0,t_.M)(o)||t}})}var tU=()=>{let{allPages:e,individualPages:t}=function(){let e=function(){let{activeCanvas:e,activeManifest:t,vault:n}=(0,a.D1)(),[i,r]=(0,o.useState)({root:[],canvas:[]});return(0,o.useEffect)(()=>{let i=n.get(t),o=n.get(e),a=null==i?void 0:i.rendering,l=null==o?void 0:o.rendering;r({root:tG(a,n),canvas:tG(l,n)})},[e,t,n]),{...i}}();return{allPages:tq((null==e?void 0:e.root)||[],"Root Rendering Label"),individualPages:tq((null==e?void 0:e.canvas)||[],"Canvas Rendering Label")}}(),n=e.length>0||t.length>0,r=e=>{window.open(e,"_blank")};return n?(0,i.jsxs)(eJ,{children:[(0,i.jsx)(tP,{"data-testid":"download-button",children:(0,i.jsx)(eN,{children:(0,i.jsx)(eN.Download,{})})}),(0,i.jsxs)(tW,{"data-testid":"download-content",children:[t.length>0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("h3",{children:"Individual Pages"}),(0,i.jsx)("ul",{children:t.map(e=>{let{format:t,id:n,label:o}=e;return(0,i.jsx)("li",{children:(0,i.jsxs)("button",{onClick:()=>r(n),children:[o," (",t,")"]})},o)})})]}),e.length>0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("h3",{children:"All Pages"}),(0,i.jsx)("ul",{children:e.map(e=>{let{format:t,id:n,label:o}=e;return(0,i.jsx)("li",{children:(0,i.jsxs)("button",{onClick:()=>r(n),children:[o," (",t,")"]})},o)})})]})]})]}):null};let tZ=e=>{let t=()=>!!window.matchMedia&&window.matchMedia(e).matches,[n,i]=(0,o.useState)(t);return(0,o.useEffect)(()=>{let e=()=>i(t);return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),n};var tY=e=>{let{manifestId:t,manifestLabel:n}=e,{collection:o,configOptions:r}=(0,a.D1)(),{informationPanel:l,showDownload:s,showIIIFBadge:d,showTitle:c}=r,u=s||d||(null==l?void 0:l.renderToggle),h=tZ(m.BC.sm);return(0,i.jsxs)(t$,{className:"clover-viewer-header",children:[(null==o?void 0:o.items)?(0,i.jsx)(tT,{}):(0,i.jsx)(tI,{className:c?"":"visually-hidden",children:c&&(0,i.jsx)(em.__,{label:n,className:"label"})}),u&&(0,i.jsxs)(tA,{children:[s&&(0,i.jsx)(tU,{}),d&&(0,i.jsxs)(eJ,{children:[(0,i.jsx)(tk,{children:(0,i.jsx)(tF,{})}),(0,i.jsxs)(tz,{children:[(null==o?void 0:o.items)&&(0,i.jsx)("button",{onClick:e=>{e.preventDefault(),window.open(o.id,"_blank")},children:"View Collection"}),(0,i.jsx)("button",{onClick:e=>{e.preventDefault(),window.open(t,"_blank")},children:"View Manifest"})," ",(null==o?void 0:o.items)&&(0,i.jsx)(tL,{textPrompt:"Copy Collection URL",textToCopy:o.id}),(0,i.jsx)(tL,{textPrompt:"Copy Manifest URL",textToCopy:t})]})]}),(null==l?void 0:l.renderToggle)&&!h&&(0,i.jsx)(tN,{})]})]})};let tJ=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],[t,n]=(0,o.useState)(e);return(0,o.useLayoutEffect)(()=>{if(!t)return;let e=document.documentElement.style.overflow;return document.documentElement.style.overflow="hidden",()=>{document.documentElement.style.overflow=e}},[t]),(0,o.useEffect)(()=>{t!==e&&n(e)},[e]),[t,n]};var tQ=e=>{var t;let{manifest:n,theme:r,iiifContentSearchQuery:g}=e,f=(0,a.D1)(),x=(0,a.Cu)(),{activeCanvas:v,isInformationOpen:b,vault:j,contentSearchVault:w,configOptions:C,openSeadragonViewer:S}=f,k=(null==C?void 0:C.canvasHeight)&&["100%","auto"].includes(null==C?void 0:C.canvasHeight),[z,I]=(0,o.useState)(!1),[$,A]=(0,o.useState)(!1),[T,M]=(0,o.useState)([]),[R,E]=(0,o.useState)([]),[L,F]=(0,o.useState)(),[H,D]=tJ(!1),O=tZ(m.BC.sm),[B,V]=(0,o.useState)(),N=(0,o.useCallback)(e=>{x({type:"updateInformationOpen",isInformationOpen:e})},[x]);(0,o.useEffect)(()=>{var e;(null==C?void 0:null===(e=C.informationPanel)||void 0===e?void 0:e.open)&&N(!O)},[O,null==C?void 0:null===(t=C.informationPanel)||void 0===t?void 0:t.open,N]),(0,o.useEffect)(()=>{if(!O){D(!1);return}D(b)},[b,O,D]),(0,o.useEffect)(()=>{let e=(0,s.G)(j,v);e&&(A(["Sound","Video"].indexOf(e[0].type)>-1),M(e));let t=d(j,v);t.length>0&&x({type:"updateInformationOpen",isInformationOpen:!0}),E(t),I(0!==t.length)},[v,j,x]);let P=n.service.some(e=>"SearchService2"===e.type);return(0,o.useEffect)(()=>{if(P){let e=n.service.find(e=>"SearchService2"===e.type);e&&V(e.id)}},[n,P]),(0,o.useEffect)(()=>{var e,t,n;B&&(null===(e=C.informationPanel)||void 0===e?void 0:e.renderContentSearch)!==!1&&c(w,B,null===(n=C.localeText)||void 0===n?void 0:null===(t=n.contentSearch)||void 0===t?void 0:t.tabLabel,g).then(e=>{F(e)})},[B]),(0,o.useEffect)(()=>{if(!S||!L)return;let e=j.get({id:v,type:"Canvas"});(0,u.dH)(S,"content-search-overlay"),(0,u.LW)(w,L,S,e,C)},[S,L]),(0,i.jsx)(h.SV,{FallbackComponent:p.Z,children:(0,i.jsx)(y,{className:"".concat(r," clover-viewer"),css:{background:null==C?void 0:C.background},"data-body-locked":H,"data-absolute-position":k,"data-information-panel":z,"data-information-panel-open":b,children:(0,i.jsxs)(l.fC,{open:b,onOpenChange:N,children:[(0,i.jsx)(tY,{manifestLabel:n.label,manifestId:n.id}),(0,i.jsx)(tS,{activeCanvas:v,painting:T,annotationResources:R,searchServiceUrl:B,setContentSearchResource:F,contentSearchResource:L,items:n.items,isAudioVideo:$})]})})})},tX=n(458);let tK={ignoreCache:!1,headers:{Accept:"application/json, text/javascript, text/plain"},timeout:5e3,withCredentials:!1};function t0(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{ok:!1,status:e.status,statusText:e.statusText,headers:e.getAllResponseHeaders(),data:t||e.statusText,json:()=>JSON.parse(t||e.statusText)}}var t1=n(2103);let t2=e=>{let{canvasIdCallback:t,customTheme:n,iiifContent:r,options:l,iiifContentSearchQuery:s}=e,d=(0,a.Cu)(),{activeCanvas:c,activeManifest:u,isLoaded:h,vault:p}=(0,a.D1)(),[m,g]=(0,o.useState)(),[f,x]=(0,o.useState)(),v={};return(n&&(v=(0,tX.jG)("custom",n)),(0,o.useEffect)(()=>{t&&t(c)},[c,t]),(0,o.useEffect)(()=>{u&&p.loadManifest(u).then(e=>{x(e),d({type:"updateActiveCanvas",canvasId:(0,t1.FO)(r,e)})}).catch(e=>{console.error("Manifest failed to load: ".concat(e))}).finally(()=>{d({type:"updateIsLoaded",isLoaded:!0})})},[r,u,d,p]),(0,o.useEffect)(()=>{d({type:"updateConfigOptions",configOptions:l});let e=(0,t1.Vu)(r);p.load(e).then(e=>{g(e)}).catch(e=>{console.error("The IIIF resource ".concat(r," failed to load: ").concat(e))})},[d,r,l,p]),(0,o.useEffect)(()=>{if((null==m?void 0:m.type)==="Collection"){d({type:"updateCollection",collection:m});let e=(0,t1.Mx)(r,m);e&&d({type:"updateActiveManifest",manifestId:e})}else(null==m?void 0:m.type)==="Manifest"&&d({type:"updateActiveManifest",manifestId:m.id})},[d,r,m]),h)?f&&f.items?0===f.items.length?(console.log("The IIIF manifest ".concat(r," does not contain canvases.")),(0,i.jsx)(i.Fragment,{})):(0,i.jsx)(tQ,{manifest:f,theme:v,iiifContentSearchQuery:s},f.id):(console.log("The IIIF manifest ".concat(r," failed to load.")),(0,i.jsx)(i.Fragment,{})):(0,i.jsx)(i.Fragment,{children:"Loading"})};var t4=e=>{var t,n,o;let{canvasIdCallback:l=()=>{},customDisplays:s=[],customTheme:d,iiifContent:c,id:u,manifestId:h,options:p,iiifContentSearchQuery:m}=e,g=c;u&&(g=u),h&&(g=h);let f=(0,a.as)(null==p?void 0:null===(n=p.informationPanel)||void 0===n?void 0:null===(t=n.vtt)||void 0===t?void 0:t.autoScroll);return(0,i.jsx)(a.MY,{initialState:{...a.W2,customDisplays:s,isAutoScrollEnabled:f.enabled,isInformationOpen:!!(null==p?void 0:null===(o=p.informationPanel)||void 0===o?void 0:o.open),vault:new r.j({customFetcher:e=>(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:tK,n=t.headers||tK.headers;return new Promise((i,o)=>{let a=new XMLHttpRequest;a.open("get",e),a.withCredentials=t.withCredentials,n&&Object.keys(n).forEach(e=>a.setRequestHeader(e,n[e])),a.onload=()=>{i({ok:a.status>=200&&a.status<300,status:a.status,statusText:a.statusText,headers:a.getAllResponseHeaders(),data:a.responseText,json:()=>JSON.parse(a.responseText)})},a.onerror=()=>{o(t0(a,"Failed to make request."))},a.ontimeout=()=>{o(t0(a,"Request took longer than expected."))},a.send()})})(e,{withCredentials:null==p?void 0:p.withCredentials,headers:null==p?void 0:p.requestHeaders}).then(e=>JSON.parse(e.data))})},children:(0,i.jsx)(t2,{iiifContent:g,canvasIdCallback:l,customTheme:d,options:p,iiifContentSearchQuery:m})})}},8640:function(e,t,n){n.d(t,{g:function(){return i}});let i=(e,t,n,i)=>{let o={canvas:void 0,accompanyingCanvas:void 0,annotationPage:void 0,annotations:[]};if(o.canvas=e.get(t),o.canvas){var a,r;o.annotationPage=e.get(o.canvas.items[0]),o.accompanyingCanvas=(null===(a=o.canvas)||void 0===a?void 0:a.accompanyingCanvas)?e.get(null===(r=o.canvas)||void 0===r?void 0:r.accompanyingCanvas):void 0}if(o.annotationPage){let a=e.get(o.annotationPage.items).map(t=>({body:e.get(t.body[0].id),motivation:t.motivation,type:"Annotation"})),r=[];a.forEach(t=>{"Choice"===t.body.type?t.body.items.forEach(n=>r.push({...t,id:n.id,body:e.get(n.id)})):r.push(t)}),o.annotations=r.filter(o=>{if(o){if(!o.body||!o.motivation){console.error("Invalid annotation after Hyperion parsing: missing either 'body' or 'motivation'",o);return}let a=o.body;Array.isArray(a)&&(a=a[0]);let r=e.get(a.id);if(r)switch(n){case"painting":return o.target===t.id&&o.motivation&&"painting"===o.motivation[0]&&i.includes(r.type)&&(o.body=r),!!o;case"supplementing":return;default:throw Error("Invalid annotation motivation.")}}})}return o}},4707:function(e,t,n){n.d(t,{G:function(){return o}});var i=n(8640);let o=(e,t)=>{let n=(0,i.g)(e,{id:t,type:"Canvas"},"painting",["Image","Sound","Video"]);if(0!==n.annotations.length&&n.annotations&&n.annotations)return n.annotations.map(e=>null==e?void 0:e.body)}}}]); \ No newline at end of file diff --git a/_next/static/chunks/82.7baeb3595a9e8eee.js b/_next/static/chunks/82.7baeb3595a9e8eee.js new file mode 100644 index 00000000..ea938a28 --- /dev/null +++ b/_next/static/chunks/82.7baeb3595a9e8eee.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[82],{4082:function(e,t,n){n.r(t),n.d(t,{default:function(){return t4}});var i=n(1527),o=n(959),a=n(3431),r=n(3832),l=n(603),s=n(4707);let d=async(e,t)=>{let n=e.get({id:t,type:"Canvas"});if(!(null==n?void 0:n.annotations)||!n.annotations[0])return[];let i=e.get(n.annotations).filter(e=>!!e.items&&e),o=[];for(let t of i)if(t.items.length>0){let e=t.label||{none:["Annotations"]};o.push({...t,label:e})}else{let n={};try{n=await e.load(t.id)}catch(e){console.log(e)}if(n.items&&n.items.length>0){let e=n.label||{none:["Annotations"]};o.push({...n,label:e})}}return o},c=async(e,t,n,i)=>{let o;if(void 0==i||void 0==i.q)return{label:{none:[n]}};let a="".concat(t,"?q=").concat(i.q.trim());try{o=await e.load(a)}catch(e){return console.log("Could not load content search."),{}}return void 0==o.label&&(o.label={none:[n]}),o};var u=n(6661),h=n(8448),m=n(2196),p=n(5455);let g=(0,p.zo)("div",{position:"relative",zIndex:"0"}),f=(0,p.zo)("div",{display:"flex",flexDirection:"row",flexGrow:"1",overflow:"hidden","@sm":{flexDirection:"column"}}),x=(0,p.zo)("div",{display:"flex",flexDirection:"column",flexGrow:"1",flexShrink:"1",width:"61.8%","@sm":{width:"100%"}}),v=(0,p.zo)(l.xz,{display:"none",border:"none",padding:"0",transition:"$all",opacity:"1",background:"#6663",margin:"1rem 0",borderRadius:"6px","&[data-information-panel='false']":{opacity:"0",marginTop:"-59px"},"@sm":{display:"flex","> span":{display:"flex",flexGrow:"1",fontSize:"0.8333em",justifyContent:"center",padding:"0.5rem",fontFamily:"inherit"}}}),b=(0,p.zo)(l.VY,{width:"100%",display:"flex"}),j=(0,p.zo)("aside",{display:"flex",flexGrow:"1",flexShrink:"0",width:"38.2%",maxHeight:"100%","@sm":{width:"100%"}}),y=(0,p.zo)("div",{display:"flex",flexDirection:"column",fontSmooth:"auto",webkitFontSmoothing:"antialiased",'&[data-absolute-position="true"]':{position:"absolute",width:"100%",height:"100%",zIndex:"0"},"> div":{display:"flex",flexDirection:"column",flexGrow:"1",justifyContent:"flex-start",height:"100%",maxHeight:"100%","@sm":{["& ".concat(f)]:{flexGrow:"1"},["& ".concat(x)]:{flexGrow:"0"}}},"@sm":{padding:"0"},"&[data-information-panel-open='true']":{"@sm":{position:"fixed",height:"100%",width:"100%",top:"0",left:"0",zIndex:"2500000000",["& ".concat(g)]:{display:"none"},["& ".concat(v)]:{margin:"1rem"},["& ".concat(b)]:{height:"100%"}}}});var w=n(3367);let C=(0,p.zo)(w.fC,{display:"flex",flexDirection:"column",width:"100%",height:"100%",flexGrow:"1",flexShrink:"0",position:"relative",zIndex:"1",maskImage:"linear-gradient(180deg, rgba(0, 0, 0, 1) calc(100% - 2rem), transparent 100%)","@sm":{marginTop:"0.5rem",boxShadow:"none"}}),S=(0,p.zo)(w.aV,{display:"flex",flexGrow:"0",margin:"0 1.618rem",borderBottom:"4px solid #6663","@sm":{margin:"0 1rem"}}),k=(0,p.zo)(w.xz,{display:"flex",position:"relative",padding:"0.5rem 1rem",background:"none",backgroundColor:"transparent",fontFamily:"inherit",border:"none",opacity:"0.7",fontSize:"1rem",marginRight:"1rem",lineHeight:"1rem",whiteSpace:"nowrap",cursor:"pointer",fontWeight:400,transition:"$all","&::after":{width:"0",height:"4px",content:"",position:"absolute",bottom:"-4px",left:"0",transition:"$all"},"&[data-state='active']":{opacity:"1",fontWeight:700,"&::after":{width:"100%",backgroundColor:"$accent"}}}),z=(0,p.zo)(w.VY,{display:"flex",flexGrow:"1",flexShrink:"0",position:"absolute",top:"0",left:"0","&[data-state='active']":{width:"100%",height:"calc(100% - 2rem)",padding:"1.618rem 0"}}),I=(0,p.zo)(e=>{let{handleScroll:t,children:n,className:o}=e;return(0,i.jsx)("div",{className:o,onScroll:t,children:n})},{position:"relative",height:"100%",width:"100%",overflowY:"scroll"}),$={position:"relative",cursor:"pointer",display:"flex",width:"100%",justifyContent:"space-between",textAlign:"left",margin:"0",padding:"0.5rem 1.618rem",fontFamily:"inherit",lineHeight:"1.25em",fontSize:"1rem",color:"inherit",border:"none",background:"none"},A=(0,p.zo)("button",{textAlign:"left","&:hover":{color:"$accent"}}),T=(0,p.zo)("div",{display:"flex",flexDirection:"column",width:"100%"}),M=(0,p.zo)("div",{...$}),R=(0,p.zo)("div",{"&:hover":{color:"$accent"}});var E=e=>{let{value:t,handleClick:n}=e;return(0,i.jsx)(A,{onClick:n,children:t})},L=e=>{let{value:t,handleClick:n}=e;return(0,i.jsx)(R,{dangerouslySetInnerHTML:{__html:t},onClick:n})},F=n(2950),H=()=>{function e(e){return e.map(e=>{let t=e.identifier||(0,F.Z)();return{...e,identifier:t}})}return{addIdentifiersToParsedCues:e,createNestedCues:function(t){let n=[],i=[];for(let a of e(t)){for(;i.length>0&&i[i.length-1].end<=a.start;)i.pop();if(i.length>0){var o;i[i.length-1].children||(i[i.length-1].children=[]),null===(o=i[i.length-1].children)||void 0===o||o.push(a),i.push(a)}else n.push(a),i.push(a)}return n},isChild:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.some(t=>e.start>=t.start&&e.end<=t.end)},orderCuesByTime:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.sort((e,t)=>e.start-t.start)}}},D=n(6427);let V=(0,p.F4)({from:{transform:"rotate(360deg)"},to:{transform:"rotate(0deg)"}}),P=(0,p.zo)(D.fC,{display:"flex",flexDirection:"column",width:"100%"}),B=(0,p.zo)(D.ck,{...$,"@sm":{padding:"0.5rem 1rem",fontSize:"0.8333rem"},"&::before":{content:"",width:"12px",height:"12px",borderRadius:"12px",position:"absolute",backgroundColor:"$primaryMuted",opacity:"0",left:"8px",marginTop:"3px",boxSizing:"content-box","@sm":{content:"unset"}},"&::after":{content:"",width:"4px",height:"6px",position:"absolute",backgroundColor:"$secondary",opacity:"0",clipPath:"polygon(100% 50%, 0 100%, 0 0)",left:"13px",marginTop:"6px",boxSizing:"content-box","@sm":{content:"unset"}},strong:{marginLeft:"1rem"},"&:hover":{color:"$accent","&::before":{backgroundColor:"$accent",opacity:"1"},"&::after":{content:"",width:"4px",height:"6px",position:"absolute",backgroundColor:"$secondary",clipPath:"polygon(100% 50%, 0 100%, 0 0)",opacity:"1"}},"&[aria-checked='true']":{backgroundColor:"#6663","&::before":{content:"",width:"6px",height:"6px",position:"absolute",backgroundColor:"transparent",border:"3px solid $accentMuted",borderRadius:"12px",left:"8px",marginTop:"4px",opacity:"1",animation:"1s linear infinite",animationName:V,boxSizing:"content-box","@sm":{content:"unset"}},"&::after":{content:"",width:"6px",height:"6px",position:"absolute",backgroundColor:"transparent",border:"3px solid $accent",clipPath:"polygon(100% 0, 100% 100%, 0 0)",borderRadius:"12px",left:"8px",marginTop:"4px",opacity:"1",animation:"1.5s linear infinite",animationName:V,boxSizing:"content-box","@sm":{content:"unset"}}}});var O=n(3631);let N=e=>{for(;e&&e!==document.body;){let t=window.getComputedStyle(e).overflowY;if("visible"!==t&&"hidden"!==t&&e.scrollHeight>e.clientHeight)return e;e=e.parentNode}return null};var W=e=>{var t,n;let{label:r,start:l,end:s}=e,d=(0,a.Cu)(),{configOptions:c,isAutoScrollEnabled:u,isUserScrolling:h}=(0,a.D1)(),m=null==c?void 0:null===(n=c.informationPanel)||void 0===n?void 0:null===(t=n.vtt)||void 0===t?void 0:t.autoScroll,[p,g]=(0,o.useState)(!1),f=(0,o.useRef)(null),x=document.getElementById("clover-iiif-video");return(0,o.useEffect)(()=>(null==x||x.addEventListener("timeupdate",()=>{let{currentTime:e}=x;g(l<=e&&edocument.removeEventListener("timeupdate",()=>{})),[s,l,x]),(0,o.useEffect)(()=>{if(u&&p&&f.current&&!h){let n=f.current;if(n&&n instanceof HTMLElement){let i=N(n);if(i&&i instanceof HTMLElement){var e,t;let o;switch(null==m?void 0:null===(e=m.settings)||void 0===e?void 0:e.block){case"center":let a=i.getBoundingClientRect();o=n.offsetTop+n.offsetHeight-Math.floor((a.bottom-a.top)/2);break;case"end":o=n.offsetTop+n.offsetHeight-(i.clientHeight-n.clientHeight)+2;break;default:o=n.offsetTop-2}d({type:"updateAutoScrolling",isAutoScrolling:!0}),i.scrollTo({top:o,left:0,behavior:null==m?void 0:null===(t=m.settings)||void 0===t?void 0:t.behavior}),setTimeout(()=>d({type:"updateAutoScrolling",isAutoScrolling:!1}),750)}}}},[m,p,h,u,d]),(0,i.jsxs)(B,{ref:f,"aria-checked":p,"data-testid":"information-panel-cue",onClick:()=>{x&&(x.pause(),x.currentTime=l,x.play())},value:r,children:[r,(0,i.jsx)("strong",{children:(0,O.rJ)(l)})]})};let _=(0,p.zo)("ul",{listStyle:"none",paddingLeft:"1rem",position:"relative","&&:first-child":{paddingLeft:"0"},"& li ul":{["& ".concat(B)]:{backgroundColor:"unset","&::before":{content:"none"},"&::after":{content:"none"}}},"&:first-child":{margin:"0 0 1.618rem"}}),G=e=>{let{items:t}=e;return(0,i.jsx)(_,{children:t.map(e=>{let{text:t,start:n,end:o,children:a,identifier:r}=e;return(0,i.jsxs)("li",{children:[(0,i.jsx)(W,{label:t,start:n,end:o}),a&&(0,i.jsx)(G,{items:a})]},r)})})},q=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en";if(!e)return"";if(!e[t]){let t=Object.getOwnPropertyNames(e);if(t.length>0)return e[t[0]]}return e[t]};var U=n(3836),Z=e=>{let{label:t,vttUri:n}=e,[a,r]=o.useState([]),{createNestedCues:l,orderCuesByTime:s}=H(),[d,c]=o.useState();return(0,o.useEffect)(()=>{n&&fetch(n,{headers:{"Content-Type":"text/plain",Accept:"application/json"}}).then(e=>e.text()).then(e=>{r(l(s((0,U.parse)(e).cues)))}).catch(e=>{console.error(n,e.toString()),c(e)})},[n]),(0,i.jsxs)(P,{"data-testid":"annotation-item-vtt","aria-label":"navigate ".concat(q(t,"en")),children:[d&&(0,i.jsxs)("div",{"data-testid":"error-message",children:["Network Error: ",d.toString()]}),(0,i.jsx)(G,{items:a})]})},Y=e=>{let{caption:t,handleClick:n,imageUri:o}=e;return(0,i.jsxs)(A,{onClick:n,children:[(0,i.jsx)("img",{src:o,alt:"A visual annotation for ".concat(t)}),(0,i.jsx)("span",{children:t})]})},J=e=>{var t,n;let{annotation:o}=e,{target:r}=o,{openSeadragonViewer:l,vault:s,activeCanvas:d,configOptions:c}=(0,a.D1)(),h=o.body.map(e=>s.get(e.id)),m=(null===(t=h.find(e=>e.format))||void 0===t?void 0:t.format)||"",p=(null===(n=h.find(e=>e.value))||void 0===n?void 0:n.value)||"",g=s.get({id:d,type:"Canvas"});function f(){var e;if(!r)return;let t=(null===(e=c.annotationOverlays)||void 0===e?void 0:e.zoomLevel)||1;(0,u.$H)(l,t,r,g)}return(0,i.jsx)(M,{children:function(){var e,t;switch(m){case"text/plain":return(0,i.jsx)(E,{value:p,handleClick:f});case"text/html":return(0,i.jsx)(L,{value:p,handleClick:f});case"text/vtt":return(0,i.jsx)(Z,{label:h[0].label,vttUri:h[0].id||""});case null===(e=m.match(/^image\//))||void 0===e?void 0:e.input:let n=(null===(t=h.find(e=>{var t;return!(null===(t=e.id)||void 0===t?void 0:t.includes("vault://"))}))||void 0===t?void 0:t.id)||"";return(0,i.jsx)(Y,{caption:p,handleClick:f,imageUri:n});default:return(0,i.jsx)(E,{value:p,handleClick:f})}}()})},Q=e=>{var t;let{annotationPage:n}=e,{vault:o}=(0,a.D1)();if(!n||!n.items||(null===(t=n.items)||void 0===t?void 0:t.length)===0)return(0,i.jsx)(i.Fragment,{});let r=n.items.map(e=>o.get(e.id));return r?(0,i.jsx)(T,{"data-testid":"annotation-page",children:null==r?void 0:r.map(e=>(0,i.jsx)(J,{annotation:e},e.id))}):(0,i.jsx)(i.Fragment,{})};let X=(0,p.zo)("button",{textAlign:"left","&:hover":{color:"$accent"}}),K=(0,p.zo)("li",{margin:"0.25rem 0"}),ee=(0,p.zo)("ol",{listStyleType:"auto",marginBottom:"1rem",listStylePosition:"inside"}),et=(0,p.zo)("div",{margin:"0.5rem 1.618rem"}),en=(0,p.zo)("div",{fontWeight:"bold"}),ei=(0,p.zo)("div",{marginBottom:"1rem"});var eo=e=>{let{value:t,handleClick:n,target:o,canvas:a}=e;return(0,i.jsx)(X,{onClick:n,"data-target":o,"data-canvas":a,children:t})},ea=e=>{var t,n,r;let l,s,{annotation:d,activeContentSearchTarget:c,setActiveContentSearchTarget:h}=e,m=(0,a.Cu)(),{openSeadragonViewer:p,vault:g,contentSearchVault:f,activeCanvas:x,configOptions:v,OSDImageLoaded:b}=(0,a.D1)(),j=g.get({id:x,type:"Canvas"}),y=(null===(t=d.body.map(e=>f.get(e.id)).find(e=>e.value))||void 0===t?void 0:t.value)||"";if(d.target&&"string"==typeof d.target&&(l=d.target),l){let e=l.split("#xywh");e.length>1&&(s=e[0])}let w=(null===(r=v.contentSearch)||void 0===r?void 0:null===(n=r.overlays)||void 0===n?void 0:n.zoomLevel)||1;(0,o.useEffect)(()=>{b&&p&&d.target&&d.target==c&&(0,u.$H)(p,w,l,j)},[p,b]);let C=JSON.stringify(l);return(0,i.jsx)(K,{children:(0,i.jsx)(eo,{target:C,canvas:s,value:y,handleClick:function(e){if(!p)return;let t=JSON.parse(e.target.dataset.target),n=e.target.dataset.canvas;x===n?(0,u.$H)(p,w,l,j):(m({type:"updateOSDImageLoaded",OSDImageLoaded:!1}),m({type:"updateActiveCanvas",canvasId:n}),h(t))}})})},er=e=>{var t,n,r;let{annotationPage:l}=e,{contentSearchVault:s,configOptions:d}=(0,a.D1)(),[c,u]=(0,o.useState)(),h=null===(t=d.contentSearch)||void 0===t?void 0:t.searchResultsLimit,m=null===(n=d.localeText)||void 0===n?void 0:n.contentSearch;return l&&l.items&&(null===(r=l.items)||void 0===r?void 0:r.length)!==0?(0,i.jsx)(i.Fragment,{children:Object.entries(function(e){let t={};return e.items.forEach(e=>{let n=s.get(e.id),i="";if(n.label){let e=q(n.label);e&&(i=e[0])}void 0==t[i]&&(t[i]=[]),t[i].push(n)}),t}(l)).map((e,t)=>{let[n,o]=e;return(0,i.jsxs)("div",{children:[(0,i.jsx)(en,{className:"content-search-results-title",children:n}),(0,i.jsx)(ee,{className:"content-search-results",children:(h?o.slice(0,h):o).map((e,t)=>(0,i.jsx)(ea,{annotation:e,activeContentSearchTarget:c,setActiveContentSearchTarget:u},t))}),function(e){if(h){let t=e.length-h;if(t>0)return(0,i.jsxs)(ei,{children:[t," ",null==m?void 0:m.moreResults]})}}(o)]},t)})}):(0,i.jsx)("p",{children:null==m?void 0:m.noSearchResults})},el=n(1332);let es=(0,p.zo)("div",{".content-search-form":{display:"flex",marginBottom:"1rem"},input:{padding:".25rem",marginRight:"1rem"}}),ed=(0,p.zo)("button",{display:"flex",background:"none",border:"none",width:"2rem",height:"2rem",padding:"0",margin:"0",fontWeight:"700",borderRadius:"2rem",backgroundColor:"$accent",color:"$secondary",cursor:"pointer",boxSizing:"content-box",transition:"$all",svg:{height:"60%",width:"60%",padding:"20%",fill:"$secondary",stroke:"$secondary",opacity:"1",filter:"drop-shadow(5px 5px 5px #000D)",boxSizing:"inherit",transition:"$all"},"&:disabled":{backgroundColor:"transparent",boxShadow:"none",svg:{opacity:"0.25"}}});var ec=e=>{var t;let{searchServiceUrl:n,setContentSearchResource:r,setLoading:l}=e,[s,d]=(0,o.useState)(),{contentSearchVault:u,openSeadragonViewer:h,configOptions:m}=(0,a.D1)(),p=null===(t=m.localeText)||void 0===t?void 0:t.contentSearch;async function g(e){e.preventDefault();let t=null==p?void 0:p.tabLabel;if(h&&n){if(!s||""===s.trim()){r({label:{none:[t]}});return}l(!0),c(u,n,t,{q:s}).then(e=>{r(e),l(!1)})}}return(0,i.jsx)(es,{children:(0,i.jsxs)(el.fC,{onSubmit:g,className:"content-search-form",children:[(0,i.jsx)(el.gN,{className:"FormField",name:"searchTerms",onChange:e=>{e.preventDefault(),d(e.target.value)},children:(0,i.jsx)(el.oT,{placeholder:null==p?void 0:p.formPlaceholder})}),(0,i.jsx)(el.k4,{asChild:!0,children:(0,i.jsx)(ed,{type:"submit",children:(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:[(0,i.jsx)("title",{children:"Search"}),(0,i.jsx)("path",{d:"M456.69 421.39L362.6 327.3a173.81 173.81 0 0034.84-104.58C397.44 126.38 319.06 48 222.72 48S48 126.38 48 222.72s78.38 174.72 174.72 174.72A173.81 173.81 0 00327.3 362.6l94.09 94.09a25 25 0 0035.3-35.3zM97.92 222.72a124.8 124.8 0 11124.8 124.8 124.95 124.95 0 01-124.8-124.8z"})]})})})]})})},eu=e=>{let{searchServiceUrl:t,setContentSearchResource:n,activeCanvas:a,annotationPage:r}=e,[l,s]=(0,o.useState)(!1);return(0,i.jsxs)(et,{children:[(0,i.jsx)(ec,{searchServiceUrl:t,setContentSearchResource:n,activeCanvas:a,setLoading:s}),!l&&(0,i.jsx)(er,{annotationPage:r}),l&&(0,i.jsx)("span",{children:"Loading..."})]})};let eh=(0,p.zo)("div",{padding:" 0 1.618rem 2rem",display:"flex",flexDirection:"column",overflow:"scroll",position:"absolute",fontWeight:"400",fontSize:"1rem",zIndex:"0",img:{maxWidth:"100px",maxHeight:"100px",objectFit:"contain",color:"transparent",margin:"0 0 1rem",borderRadius:"3px",backgroundColor:"$secondaryMuted"},video:{display:"none"},"a, a:visited":{color:"$accent"},p:{fontSize:"1rem",lineHeight:"1.45em",margin:"0"},dl:{margin:"0",dt:{fontWeight:"700",margin:"1rem 0 0.25rem"},dd:{margin:"0"}},".manifest-property-title":{fontWeight:"700",margin:"1rem 0 0.25rem"},"ul, ol":{padding:"0",margin:"0",li:{fontSize:"1rem",lineHeight:"1.45em",listStyle:"none",margin:"0.25rem 0 0.25rem"}}}),em=(0,p.zo)("div",{position:"relative",width:"100%",height:"100%",zIndex:"0"});var ep=n(7184),eg=e=>{let{homepage:t}=e;return(null==t?void 0:t.length)===0?(0,i.jsx)(i.Fragment,{}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"manifest-property-title",children:"Homepage"}),(0,i.jsx)(ep.bw,{homepage:t})]})},ef=e=>{let{id:t,htmlLabel:n,parent:o="manifest"}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"manifest-property-title",children:n}),(0,i.jsx)("a",{href:t,target:"_blank",id:"iiif-".concat(o,"-id"),children:t})]})},ex=e=>{let{metadata:t,parent:n="manifest"}=e;return t?(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(ep.SF,{metadata:t,id:"iiif-".concat(n,"-metadata")})}):(0,i.jsx)(i.Fragment,{})},ev=e=>{let{rendering:t}=e;return(null==t?void 0:t.length)===0?(0,i.jsx)(i.Fragment,{}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"manifest-property-title",children:"Alternate formats"}),(0,i.jsx)(ep.Oy,{rendering:t})]})},eb=e=>{let{requiredStatement:t,parent:n="manifest"}=e;return t?(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(ep.bT,{requiredStatement:t,id:"iiif-".concat(n,"-required-statement")})}):(0,i.jsx)(i.Fragment,{})},ej=e=>{let{rights:t}=e;return t?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"manifest-property-title",children:"Rights"}),(0,i.jsx)("a",{href:t,target:"_blank",children:t})]}):(0,i.jsx)(i.Fragment,{})},ey=e=>{let{seeAlso:t}=e;return(null==t?void 0:t.length)===0?(0,i.jsx)(i.Fragment,{}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"manifest-property-title",children:"See Also"}),(0,i.jsx)(ep.QZ,{seeAlso:t})]})},ew=e=>{let{summary:t,parent:n="manifest"}=e;return t?(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(ep.ER,{summary:t,as:"p",id:"iiif-".concat(n,"-summary")})}):(0,i.jsx)(i.Fragment,{})},eC=e=>{let{label:t,thumbnail:n}=e;return(null==n?void 0:n.length)===0?(0,i.jsx)(i.Fragment,{}):(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(ep.pl,{altAsLabel:t||{none:["resource"]},thumbnail:n,style:{backgroundColor:"#6663",objectFit:"cover"}})})},eS=()=>{let{activeManifest:e,vault:t}=(0,a.D1)(),[n,r]=(0,o.useState)(),[l,s]=(0,o.useState)([]),[d,c]=(0,o.useState)([]),[u,h]=(0,o.useState)([]),[m,p]=(0,o.useState)([]);return((0,o.useEffect)(()=>{var n,i,o,a;let l=t.get(e);r(l),(null===(n=l.homepage)||void 0===n?void 0:n.length)>0&&s(t.get(l.homepage)),(null===(i=l.seeAlso)||void 0===i?void 0:i.length)>0&&c(t.get(l.seeAlso)),(null===(o=l.rendering)||void 0===o?void 0:o.length)>0&&h(t.get(l.rendering)),(null===(a=l.thumbnail)||void 0===a?void 0:a.length)>0&&p(t.get(l.thumbnail))},[e,t]),n)?(0,i.jsx)(em,{children:(0,i.jsxs)(eh,{children:[(0,i.jsx)(eC,{thumbnail:m,label:n.label}),(0,i.jsx)(ew,{summary:n.summary}),(0,i.jsx)(ex,{metadata:n.metadata}),(0,i.jsx)(eb,{requiredStatement:n.requiredStatement}),(0,i.jsx)(ej,{rights:n.rights}),(0,i.jsx)(eg,{homepage:l}),(0,i.jsx)(ey,{seeAlso:d}),(0,i.jsx)(ev,{rendering:u}),(0,i.jsx)(ef,{id:n.id,htmlLabel:"IIIF Manifest"})]})}):(0,i.jsx)(i.Fragment,{})},ek=e=>{let{activeCanvas:t,annotationResources:n,searchServiceUrl:r,setContentSearchResource:l,contentSearchResource:s}=e,d=(0,a.Cu)(),{isAutoScrolling:c,isUserScrolling:u,vault:p,configOptions:g,plugins:f}=(0,a.D1)(),{informationPanel:x}=g,[v,b]=(0,o.useState)(),j=null==x?void 0:x.renderAbout,y=null==x?void 0:x.renderAnnotation,w=p.get({id:t,type:"Canvas"}),$=null==x?void 0:x.renderContentSearch,{pluginsWithInfoPanel:A}=function(e){let t=[];return e.forEach(e=>{var n;(null===(n=e.informationPanel)||void 0===n?void 0:n.component)&&t.push(e)}),{pluginsWithInfoPanel:t}}(f);return(0,o.useEffect)(()=>{if(!v){if(null==x?void 0:x.defaultTab){let e=["manifest-about","manifest-content-search"];w.annotations.length>0&&w.annotations.forEach(t=>e.push(t.id)),e.includes(null==x?void 0:x.defaultTab)?b(x.defaultTab):b("manifest-about")}else j?b("manifest-about"):$?b("manifest-content-search"):n&&(null==n?void 0:n.length)>0?b(n[0].id):f.length>0&&b(f[0].id)}},[null==x?void 0:x.defaultTab,t,v,j,$,n,s,null==w?void 0:w.annotations,f]),(0,i.jsxs)(C,{"data-testid":"information-panel",defaultValue:v,onValueChange:e=>{b(e)},orientation:"horizontal",value:v,className:"clover-viewer-information-panel",children:[(0,i.jsxs)(S,{"aria-label":"select chapter","data-testid":"information-panel-list",children:[j&&(0,i.jsx)(k,{value:"manifest-about",children:"About"}),$&&s&&(0,i.jsx)(k,{value:"manifest-content-search",children:(0,i.jsx)(ep.__,{label:s.label})}),y&&n&&n.map((e,t)=>(0,i.jsx)(k,{value:e.id,children:(0,i.jsx)(ep.__,{label:e.label})},t)),A&&A.map((e,t)=>{var n;return(0,i.jsx)(k,{value:e.id,children:(0,i.jsx)(ep.__,{label:null===(n=e.informationPanel)||void 0===n?void 0:n.label})},t)})]}),(0,i.jsxs)(I,{handleScroll:function(){if(!c){clearTimeout(u);let e=setTimeout(()=>{d({type:"updateUserScrolling",isUserScrolling:void 0})},1500);d({type:"updateUserScrolling",isUserScrolling:e})}},children:[j&&(0,i.jsx)(z,{value:"manifest-about",children:(0,i.jsx)(eS,{})}),$&&s&&(0,i.jsx)(z,{value:"manifest-content-search",children:(0,i.jsx)(eu,{searchServiceUrl:r,setContentSearchResource:l,activeCanvas:t,annotationPage:s})}),y&&n&&n.map(e=>(0,i.jsx)(z,{value:e.id,children:(0,i.jsx)(Q,{annotationPage:e})},e.id)),A&&A.map((e,t)=>(function(e,t){var n,o;let r=null==e?void 0:null===(n=e.informationPanel)||void 0===n?void 0:n.component;return void 0===r?(0,i.jsx)(i.Fragment,{}):(0,i.jsx)(z,{value:e.id,children:(0,i.jsx)(h.SV,{FallbackComponent:m.Z,children:(0,i.jsx)(r,{...null==e?void 0:null===(o=e.informationPanel)||void 0===o?void 0:o.componentProps,canvas:w,useViewerDispatch:a.Cu,useViewerState:a.D1})})},t)})(e,t))]})]})},ez=n(8640);let eI=(e,t,n,i)=>{let o=[];if(t.canvas&&t.canvas.thumbnail.length>0){let n=e.get(t.canvas.thumbnail[0]);o.push(n)}if(t.annotations[0]){if(t.annotations[0].thumbnail&&t.annotations[0].thumbnail.length>0){let n=e.get(t.annotations[0].thumbnail[0]);o.push(n)}if(!t.annotations[0].body)return;let n=t.annotations[0].body;"Image"===n.type&&o.push(n)}if(0!==o.length)return{id:o[0].id,format:o[0].format,type:o[0].type,width:n,height:i}},e$=(0,p.zo)("div",{position:"absolute",right:"1rem",top:"1rem",display:"flex",justifyContent:"flex-end",zIndex:"1"}),eA=(0,p.zo)("input",{flexGrow:"1",border:"none",backgroundColor:"$secondaryMuted",color:"$primary",marginRight:"1rem",height:"2rem",padding:"0 1rem",borderRadius:"2rem",fontFamily:"inherit",fontSize:"1rem",lineHeight:"1rem",boxShadow:"inset 1px 1px 2px #0003","&::placeholder":{color:"$primaryMuted"}}),eT=(0,p.zo)("button",{display:"flex",background:"none",border:"none",width:"2rem !important",height:"2rem !important",padding:"0",margin:"0",fontWeight:"700",borderRadius:"2rem",backgroundColor:"$accent",color:"$secondary",cursor:"pointer",boxSizing:"content-box !important",transition:"$all",svg:{height:"60%",width:"60%",padding:"20%",fill:"$secondary",stroke:"$secondary",opacity:"1",filter:"drop-shadow(5px 5px 5px #000D)",boxSizing:"inherit",transition:"$all"},"&:disabled":{backgroundColor:"transparent",boxShadow:"none",svg:{opacity:"0.25"}}}),eM=(0,p.zo)("div",{display:"flex",marginRight:"0.618rem",backgroundColor:"$accentAlt",borderRadius:"2rem",boxShadow:"5px 5px 5px #0003",color:"$secondary",alignItems:"center","> span":{display:"flex",margin:"0 0.5rem",fontSize:"0.7222rem"}}),eR=(0,p.zo)("div",{display:"flex",position:"relative",zIndex:"1",width:"100%",padding:"0",transition:"$all",variants:{isToggle:{true:{paddingTop:"2.618rem",["& ".concat(e$)]:{width:"calc(100% - 2rem)","@sm":{width:"calc(100% - 2rem)"}}}}}});var eE=(e,t)=>{(0,o.useEffect)(()=>{function n(n){n.key===e&&t()}return window.addEventListener("keyup",n),()=>window.removeEventListener("keyup",n)},[])};let eL=()=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:[(0,i.jsx)("title",{children:"Arrow Back"}),(0,i.jsx)("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M244 400L100 256l144-144M120 256h292"})]}),eF=()=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:[(0,i.jsx)("title",{children:"Arrow Forward"}),(0,i.jsx)("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M268 112l144 144-144 144M392 256H100"})]}),eH=()=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:[(0,i.jsx)("title",{children:"Close"}),(0,i.jsx)("path",{d:"M289.94 256l95-95A24 24 0 00351 127l-95 95-95-95a24 24 0 00-34 34l95 95-95 95a24 24 0 1034 34l95-95 95 95a24 24 0 0034-34z"})]}),eD=()=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:[(0,i.jsx)("title",{children:"Search"}),(0,i.jsx)("path",{d:"M456.69 421.39L362.6 327.3a173.81 173.81 0 0034.84-104.58C397.44 126.38 319.06 48 222.72 48S48 126.38 48 222.72s78.38 174.72 174.72 174.72A173.81 173.81 0 00327.3 362.6l94.09 94.09a25 25 0 0035.3-35.3zM97.92 222.72a124.8 124.8 0 11124.8 124.8 124.95 124.95 0 01-124.8-124.8z"})]});var eV=e=>{let{handleCanvasToggle:t,handleFilter:n,activeIndex:a,canvasLength:r}=e,[l,s]=(0,o.useState)(!1),[d,c]=(0,o.useState)(!1),[u,h]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{0===a?h(!0):h(!1),a===r-1?c(!0):c(!1)},[a,r]),eE("Escape",()=>{s(!1),n("")}),(0,i.jsx)(eR,{isToggle:l,children:(0,i.jsxs)(e$,{children:[l&&(0,i.jsx)(eA,{autoFocus:!0,onChange:e=>n(e.target.value),placeholder:"Search"}),!l&&(0,i.jsxs)(eM,{children:[(0,i.jsx)(eT,{onClick:()=>t(-1),disabled:u,type:"button",children:(0,i.jsx)(eL,{})}),(0,i.jsxs)("span",{children:[a+1," of ",r]}),(0,i.jsx)(eT,{onClick:()=>t(1),disabled:d,type:"button",children:(0,i.jsx)(eF,{})})]}),(0,i.jsx)(eT,{onClick:()=>{s(e=>!e),n("")},type:"button",children:l?(0,i.jsx)(eH,{}):(0,i.jsx)(eD,{})})]})})};let eP=(0,p.zo)(D.fC,{display:"flex",flexDirection:"row",flexGrow:"1",padding:"1.618rem",overflowX:"scroll",position:"relative",zIndex:"0"}),eB=(0,p.zo)("svg",{display:"inline-flex",variants:{isLarge:{true:{height:"4rem",width:"4rem"}},isMedium:{true:{height:"2rem",width:"2rem"}},isSmall:{true:{height:"1rem",width:"1rem"}}}}),eO=e=>(0,i.jsx)(eB,{...e,"data-testid":"icon-svg",role:"img",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:e.children});eO.Title=e=>{let{children:t}=e;return(0,i.jsx)("title",{children:t})},eO.Add=()=>(0,i.jsx)("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M256 112v288M400 256H112"}),eO.Audio=()=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("path",{d:"M232 416a23.88 23.88 0 01-14.2-4.68 8.27 8.27 0 01-.66-.51L125.76 336H56a24 24 0 01-24-24V200a24 24 0 0124-24h69.75l91.37-74.81a8.27 8.27 0 01.66-.51A24 24 0 01256 120v272a24 24 0 01-24 24zm-106.18-80zm-.27-159.86zM320 336a16 16 0 01-14.29-23.19c9.49-18.87 14.3-38 14.3-56.81 0-19.38-4.66-37.94-14.25-56.73a16 16 0 0128.5-14.54C346.19 208.12 352 231.44 352 256c0 23.86-6 47.81-17.7 71.19A16 16 0 01320 336z"}),(0,i.jsx)("path",{d:"M368 384a16 16 0 01-13.86-24C373.05 327.09 384 299.51 384 256c0-44.17-10.93-71.56-29.82-103.94a16 16 0 0127.64-16.12C402.92 172.11 416 204.81 416 256c0 50.43-13.06 83.29-34.13 120a16 16 0 01-13.87 8z"}),(0,i.jsx)("path",{d:"M416 432a16 16 0 01-13.39-24.74C429.85 365.47 448 323.76 448 256c0-66.5-18.18-108.62-45.49-151.39a16 16 0 1127-17.22C459.81 134.89 480 181.74 480 256c0 64.75-14.66 113.63-50.6 168.74A16 16 0 01416 432z"})]}),eO.Close=()=>(0,i.jsx)("path",{d:"M289.94 256l95-95A24 24 0 00351 127l-95 95-95-95a24 24 0 00-34 34l95 95-95 95a24 24 0 1034 34l95-95 95 95a24 24 0 0034-34z"}),eO.Download=()=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("path",{d:"M336 176h40a40 40 0 0140 40v208a40 40 0 01-40 40H136a40 40 0 01-40-40V216a40 40 0 0140-40h40",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32"}),(0,i.jsx)("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M176 272l80 80 80-80M256 48v288"})]}),eO.Image=()=>(0,i.jsx)("path",{d:"M416 64H96a64.07 64.07 0 00-64 64v256a64.07 64.07 0 0064 64h320a64.07 64.07 0 0064-64V128a64.07 64.07 0 00-64-64zm-80 64a48 48 0 11-48 48 48.05 48.05 0 0148-48zM96 416a32 32 0 01-32-32v-67.63l94.84-84.3a48.06 48.06 0 0165.8 1.9l64.95 64.81L172.37 416zm352-32a32 32 0 01-32 32H217.63l121.42-121.42a47.72 47.72 0 0161.64-.16L448 333.84z"}),eO.Video=()=>(0,i.jsx)("path",{d:"M464 384.39a32 32 0 01-13-2.77 15.77 15.77 0 01-2.71-1.54l-82.71-58.22A32 32 0 01352 295.7v-79.4a32 32 0 0113.58-26.16l82.71-58.22a15.77 15.77 0 012.71-1.54 32 32 0 0145 29.24v192.76a32 32 0 01-32 32zM268 400H84a68.07 68.07 0 01-68-68V180a68.07 68.07 0 0168-68h184.48A67.6 67.6 0 01336 179.52V332a68.07 68.07 0 01-68 68z"});var eN=n(2338);let eW=(0,p.F4)({"0%":{opacity:0,transform:"translateY(1rem)"},"100%":{opacity:1,transform:"translateY(0)"}}),e_=(0,p.F4)({"0%":{opacity:0,transform:"translateY(1rem)"},"100%":{opacity:1,transform:"translateY(0)"}}),eG=(0,p.zo)(eN.Eh,{fill:"$secondaryAlt"}),eq=(0,p.zo)(eN.x8,{position:"absolute",right:"0",top:"0",padding:"0.5rem",margin:"0",cursor:"pointer",border:"none",background:"none",fill:"inherit","&:hover":{opacity:"0.75"}}),eU=(0,p.zo)(eN.VY,{border:"none",backgroundColor:"white",fill:"inhrerit",padding:"1rem 2rem 1rem 1rem",width:"auto",minWidth:"200px",maxWidth:"350px",borderRadius:"3px",boxShadow:"5px 5px 13px #0002",animationDuration:"0.3s",animationTimingFunction:"cubic-bezier(0.16, 1, 0.3, 1)",'&[data-side="top"]':{animationName:e_},'&[data-side="bottom"]':{animationName:eW},'&[data-align="end"]':{["& ".concat(eG)]:{margin:"0 0.7rem"}}}),eZ=(0,p.zo)(eN.xz,{display:"inline-flex",padding:"0.5rem 0",margin:"0 0.5rem 0 0",cursor:"pointer",border:"none",background:"none","> button, > span":{margin:"0"}}),eY=(0,p.zo)(eN.fC,{boxSizing:"content-box"}),eJ=e=>{let{children:t}=e;return(0,i.jsx)(eY,{children:t})};eJ.Trigger=e=>(0,i.jsx)(eZ,{...e,children:e.children}),eJ.Content=e=>(0,i.jsxs)(eU,{...e,children:[(0,i.jsx)(eG,{}),(0,i.jsx)(eq,{children:(0,i.jsx)(eO,{isSmall:!0,children:(0,i.jsx)(eO.Close,{})})}),e.children]});let eQ=(0,p.zo)("div",{boxSizing:"border-box",display:"inline-flex",alignItems:"center",borderRadius:"5px",padding:"$1",marginBottom:"$2",marginRight:"$2",backgroundColor:"$lightGrey",color:"$richBlack50",textTransform:"uppercase",fontSize:"$2",objectFit:"contain",lineHeight:"1em !important","&:last-child":{marginRight:"0"},["".concat(eB)]:{position:"absolute",left:"$1",height:"$3",width:"$3"},variants:{isIcon:{true:{position:"relative",paddingLeft:"$5"}}}}),eX=(0,p.zo)("span",{display:"flex"}),eK=(0,p.zo)("span",{display:"flex",width:"1.2111rem",height:"0.7222rem"}),e0=(0,p.zo)("span",{display:"inline-flex",marginLeft:"5px",marginBottom:"-1px"}),e1=(0,p.zo)(D.ck,{display:"flex",flexShrink:"0",margin:"0 1.618rem 0 0",padding:"0",cursor:"pointer",background:"none",border:"none",fontFamily:"inherit",lineHeight:"1.25em",fontSize:"1rem",textAlign:"left","&:last-child":{marginRight:"1rem"},figure:{margin:"0",width:"161.8px","> div":{position:"relative",display:"flex",backgroundColor:"$secondaryAlt",width:"inherit",height:"100px",overflow:"hidden",borderRadius:"3px",transition:"$all",img:{width:"100%",height:"100%",objectFit:"cover",filter:"blur(0)",transform:"scale3d(1, 1, 1)",transition:"$all",color:"transparent"},["& ".concat(eX)]:{position:"absolute",right:"0",bottom:"0",["& ".concat(eQ)]:{margin:"0",paddingLeft:"0",fontSize:"0.7222rem",backgroundColor:"#000d",color:"$secondary",fill:"$secondary",borderBottomLeftRadius:"0",borderTopRightRadius:"0"}}},figcaption:{marginTop:"0.5rem",fontWeight:"400",fontSize:"0.8333rem",display:"-webkit-box",overflow:"hidden",MozBoxOrient:"vertical",WebkitBoxOrient:"vertical",WebkitLineClamp:"5","@sm":{fontSize:"0.8333rem"}}},"&[aria-checked='true']":{figure:{"> div":{backgroundColor:"$primaryAlt","&::before":{position:"absolute",zIndex:"1",color:"$secondaryMuted",content:"Active Item",textTransform:"uppercase",fontWeight:"700",fontSize:"0.6111rem",letterSpacing:"0.03rem",display:"flex",width:"100%",height:"100%",flexDirection:"column",justifyContent:"center",textAlign:"center",textShadow:"5px 5px 5px #0003"},img:{opacity:"0.3",transform:"scale3d(1.1, 1.1, 1.1)",filter:"blur(2px)"},["& ".concat(eX)]:{["& ".concat(eQ)]:{backgroundColor:"$accent"}}}},figcaption:{fontWeight:"700"}}}),e2=e=>{let{type:t}=e;switch(t){case"Sound":return(0,i.jsx)(eO.Audio,{});case"Image":default:return(0,i.jsx)(eO.Image,{});case"Video":return(0,i.jsx)(eO.Video,{})}};var e4=e=>{let{canvas:t,canvasIndex:n,isActive:o,thumbnail:a,type:r,handleChange:l}=e;return(0,i.jsx)(e1,{"aria-checked":o,"data-testid":"media-thumbnail","data-canvas":n,onClick:()=>l(t.id),value:t.id,children:(0,i.jsxs)("figure",{children:[(0,i.jsxs)("div",{children:[(null==a?void 0:a.id)&&(0,i.jsx)("img",{src:a.id,alt:(null==t?void 0:t.label)?q(t.label):""}),(0,i.jsx)(eX,{children:(0,i.jsxs)(eQ,{isIcon:!0,"data-testid":"thumbnail-tag",children:[(0,i.jsx)(eK,{}),(0,i.jsx)(eO,{"aria-label":r,children:(0,i.jsx)(e2,{type:r})}),["Video","Sound"].includes(r)&&(0,i.jsx)(e0,{children:(0,O.rJ)(t.duration)})]})})]}),(null==t?void 0:t.label)&&(0,i.jsx)("figcaption",{"data-testid":"fig-caption",children:(0,i.jsx)(ep.__,{label:t.label})})]})})};let e3=e=>e.body?e.body.type:"Image";var e5=e=>{let{items:t}=e,n=(0,a.Cu)(),{activeCanvas:r,vault:l}=(0,a.D1)(),[s,d]=(0,o.useState)(""),[c,u]=(0,o.useState)([]),[h,m]=(0,o.useState)(0),p=o.useRef(null),g=e=>{r!==e&&n({type:"updateActiveCanvas",canvasId:e})};return(0,o.useEffect)(()=>{if(!c.length){let e=["Image","Sound","Video"];u(t.map(t=>(0,ez.g)(l,t,"painting",e)).filter(e=>e.annotations.length>0))}},[t,c.length,l]),(0,o.useEffect)(()=>{c.forEach((e,t)=>{(null==e?void 0:e.canvas)&&e.canvas.id===r&&m(t)})},[r,c]),(0,o.useEffect)(()=>{let e=document.querySelector('[data-canvas="'.concat(h,'"]'));if(e instanceof HTMLElement&&p.current){let t=e.offsetLeft-p.current.offsetWidth/2+e.offsetWidth/2;p.current.scrollTo({left:t,behavior:"smooth"})}},[h]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(eV,{handleFilter:e=>d(e),handleCanvasToggle:e=>{let t=c[h+e];(null==t?void 0:t.canvas)&&g(t.canvas.id)},activeIndex:h,canvasLength:c.length}),(0,i.jsx)(eP,{"aria-label":"select item","data-testid":"media",ref:p,children:c.filter(e=>{var t;if(null===(t=e.canvas)||void 0===t?void 0:t.label){let t=q(e.canvas.label);if(Array.isArray(t))return t[0].toLowerCase().includes(s.toLowerCase())}}).map((e,t)=>{var n,o;return(0,i.jsx)(e4,{canvas:e.canvas,canvasIndex:t,handleChange:g,isActive:r===(null==e?void 0:null===(n=e.canvas)||void 0===n?void 0:n.id),thumbnail:eI(l,e,200,200),type:e3(e.annotations[0])},null==e?void 0:null===(o=e.canvas)||void 0===o?void 0:o.id)})})]})};let e6=(0,p.zo)("button",{position:"absolute",background:"none",border:"none",cursor:"zoom-in",margin:"0",padding:"0",width:"100%",height:"100%",transition:"$all","& img":{width:"100%",height:"100%",objectFit:"contain",color:"transparent",transition:"$all"},variants:{isMedia:{true:{cursor:"pointer"}}}});var e8=n(515);let e7=(0,p.zo)(e8.c,{position:"absolute",width:"2rem",top:"1rem",right:"1rem",zIndex:100,display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",transition:"$all",borderRadius:"50%",backgroundColor:"$accent",cursor:"pointer","&:hover, &:focus":{backgroundColor:"$accent !important"},variants:{isInteractive:{true:{"&:hover":{opacity:"1"}},false:{}},isMedia:{true:{cursor:"pointer !important"}}},compoundVariants:[{isInteractive:!1,isMedia:!0,css:{top:"50%",right:"50%",width:"4rem",height:"4rem",transform:"translate(50%,-50%)"}}]}),e9=(0,p.zo)("div",{position:"relative",display:"flex",flexDirection:"column",flexGrow:"1",flexShrink:"1",gap:"1rem",zIndex:"0",overflow:"hidden","&:hover":{["".concat(e7)]:{backgroundColor:"$accent"},["".concat(e6)]:{backgroundColor:"#6662"}}}),te=(0,p.zo)("div",{width:"100%",height:"100%"});var tt=n(2016);let tn=(0,p.zo)("svg",{height:"19px",color:"$accent",fill:"$accent",stroke:"$accent",display:"flex",margin:"0.25rem 0.85rem"}),ti=(0,p.zo)(tt.xz,{fontSize:"1.25rem",fontWeight:"400",fontFamily:"inherit",alignSelf:"flex-start",flexGrow:"1",cursor:"pointer",transition:"$all",border:"1px solid #6663",boxShadow:"2px 2px 5px #0001",borderRadius:"3px",display:"flex",alignItems:"center",paddingLeft:"0.5rem",width:"100%","@sm":{fontSize:"1rem"}}),to=(0,p.zo)(tt.VY,{borderRadius:"3px",boxShadow:"3px 3px 8px #0003",backgroundColor:"$secondary",marginTop:"2.25rem",marginLeft:"6px",paddingBottom:"0.25rem",maxHeight:"calc(61.8vh - 2.5rem) !important",borderTopLeftRadius:"0",border:"1px solid $secondaryMuted",maxWidth:"90vw"}),ta=(0,p.zo)(tt.ck,{display:"flex",alignItems:"center",fontFamily:"inherit",padding:"0.25rem 0.5rem",color:"$primary",fontWeight:"400",fontSize:"0.8333rem",cursor:"pointer",backgroundColor:"$secondary",width:"calc(100% - 1rem)","> span":{whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"},'&[data-state="checked"]':{fontWeight:"700",color:"$primary !important"},"&:hover":{color:"$accent"},img:{width:"31px",height:"31px",marginRight:"0.5rem",borderRadius:"3px"}}),tr=(0,p.zo)(tt.__,{color:"$primaryMuted",fontFamily:"inherit",fontSize:"0.85rem",padding:"0.5rem 1rem 0.5rem 0.5rem",display:"flex",alignItems:"center",marginBottom:"0.25rem",borderRadius:"3px",borderTopLeftRadius:"0",borderBottomLeftRadius:"0",borderBottomRightRadius:"0",backgroundColor:"$secondaryMuted"}),tl=(0,p.zo)(tt.fC,{position:"relative",zIndex:"5",width:"100%"});var ts=e=>{let{direction:t,title:n}=e;return(0,i.jsxs)(tn,{xmlns:"http://www.w3.org/2000/svg",focusable:"false",viewBox:"0 0 512 512",role:"img",children:[(0,i.jsx)("title",{children:n}),"up"===t&&(0,i.jsx)(()=>(0,i.jsx)("path",{d:"M414 321.94L274.22 158.82a24 24 0 00-36.44 0L98 321.94c-13.34 15.57-2.28 39.62 18.22 39.62h279.6c20.5 0 31.56-24.05 18.18-39.62z"}),{}),"down"===t&&(0,i.jsx)(()=>(0,i.jsx)("path",{d:"M98 190.06l139.78 163.12a24 24 0 0036.44 0L414 190.06c13.34-15.57 2.28-39.62-18.22-39.62h-279.6c-20.5 0-31.56 24.05-18.18 39.62z"}),{})]})},td=e=>{let{children:t,label:n,maxHeight:o,onValueChange:a,value:r}=e;return(0,i.jsxs)(tl,{onValueChange:a,value:r,children:[(0,i.jsxs)(ti,{"data-testid":"select-button",children:[(0,i.jsx)(tt.ki,{"data-testid":"select-button-value"}),(0,i.jsx)(tt.GV,{children:(0,i.jsx)(ts,{direction:"down",title:"select"})})]}),(0,i.jsx)(tt.ue,{children:(0,i.jsxs)(to,{css:{maxHeight:"".concat(o," !important")},"data-testid":"select-content",children:[(0,i.jsx)(tt.Pn,{children:(0,i.jsx)(ts,{direction:"up",title:"scroll up for more"})}),(0,i.jsx)(tt.Q_,{children:(0,i.jsxs)(tt.DI,{children:[n&&(0,i.jsx)(tr,{children:(0,i.jsx)(ep.__,{"data-testid":"select-label",label:n})}),t]})}),(0,i.jsx)(tt.Jk,{children:(0,i.jsx)(ts,{direction:"down",title:"scroll down for more"})})]})})]})},tc=e=>(0,i.jsxs)(ta,{...e,children:[e.thumbnail&&(0,i.jsx)(ep.pl,{thumbnail:e.thumbnail}),(0,i.jsx)(tt.S_,{children:(0,i.jsx)(ep.__,{label:e.label})}),(0,i.jsx)(tt.o6,{})]}),tu=n(5129),th=e=>{let{isMedia:t,label:n,placeholderCanvas:o,setIsInteractive:r}=e,{vault:l}=(0,a.D1)(),d=(0,s.G)(l,o),c=d?d[0]:void 0,u=n?q(n):["placeholder image"];return(0,i.jsx)(e6,{onClick:()=>r(!0),isMedia:t,className:"clover-viewer-placeholder",children:(0,i.jsx)("img",{src:(null==c?void 0:c.id)||"",alt:u.join(),height:null==c?void 0:c.height,width:null==c?void 0:c.width})})},tm=n(2089);let tp=(0,p.zo)("canvas",{position:"absolute",width:"100%",height:"100%",zIndex:"0"}),tg=o.forwardRef((e,t)=>{let n=o.useRef(null),a=(0,o.useCallback)(()=>{var e,i;if((null===(e=t.current)||void 0===e?void 0:e.currentTime)&&(null===(i=t.current)||void 0===i?void 0:i.currentTime)>0)return;let o=t.current;if(!o)return;let a=new AudioContext,r=a.createMediaElementSource(o),l=a.createAnalyser(),s=n.current;if(!s)return;s.width=o.offsetWidth,s.height=o.offsetHeight;let d=s.getContext("2d");r.connect(l),l.connect(a.destination),l.fftSize=256;let c=l.frequencyBinCount,u=new Uint8Array(c);setInterval(function(){!function(e,t,n,i,o,a){let r;let l=o/n*2.6,s=0;e.getByteFrequencyData(i),t.fillStyle="#000000",t.fillRect(0,0,o,a);for(let e=0;e{t&&t.current&&(t.current.onplay=a)},[a,t]),(0,i.jsx)(tp,{ref:n,role:"presentation"})}),tf=(0,p.zo)("div",{position:"relative",backgroundColor:"$primaryAlt",display:"flex",flexGrow:"0",flexShrink:"1",height:"100%",zIndex:"1",video:{backgroundColor:"transparent",objectFit:"contain",width:"100%",height:"100%",position:"relative",zIndex:"1"}});var tx=e=>{let{resource:t,ignoreCaptionLabels:n}=e,o=q(t.label,"en");return Array.isArray(o)&&o.some(e=>n.includes(e))?null:(0,i.jsx)("track",{src:t.id,label:Array.isArray(o)?o[0]:o,srcLang:"en","data-testid":"player-track"},t.id)};let tv=["application/vnd.apple.mpegurl","vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"];var tb=e=>{let{allSources:t,annotationResources:n,painting:r}=e,[l,d]=o.useState(0),[c,u]=o.useState(),h=o.useRef(null),m=(null==r?void 0:r.type)==="Sound",{activeCanvas:p,configOptions:g,vault:f}=(0,a.D1)();return(0,o.useEffect)(()=>{if(!r.id||!h.current)return;if(null==h?void 0:h.current){let e=h.current;e.src=r.id,e.load()}if("m3u8"!==r.id.split(".").pop()&&r.format&&!tv.includes(r.format))return;let e=new tm.ZP({xhrSetup:function(e,t){e.withCredentials=!!g.withCredentials}});return e.attachMedia(h.current),e.on(tm.ZP.Events.MEDIA_ATTACHED,function(){e.loadSource(r.id)}),e.on(tm.ZP.Events.ERROR,function(t,n){if(n.fatal)switch(n.type){case tm.ZP.ErrorTypes.NETWORK_ERROR:console.error("fatal ".concat(t," network error encountered, try to recover")),e.startLoad();break;case tm.ZP.ErrorTypes.MEDIA_ERROR:console.error("fatal ".concat(t," media error encountered, try to recover")),e.recoverMediaError();break;default:e.destroy()}}),()=>{if(e&&h.current){let t=h.current;e.detachMedia(),e.destroy(),t.currentTime=0}}},[g.withCredentials,r.id]),(0,o.useEffect)(()=>{var e,t,n,i;let o=f.get(p),a=(null===(e=o.accompanyingCanvas)||void 0===e?void 0:e.id)?(0,s.G)(f,null===(t=o.accompanyingCanvas)||void 0===t?void 0:t.id):null,r=(null===(n=o.placeholderCanvas)||void 0===n?void 0:n.id)?(0,s.G)(f,null===(i=o.placeholderCanvas)||void 0===i?void 0:i.id):null;a&&r?0===l?u(r[0].id):u(a[0].id):(a&&u(a[0].id),r&&u(r[0].id))},[p,l,f]),(0,o.useEffect)(()=>{if(null==h?void 0:h.current){let e=h.current;return null==e||e.addEventListener("timeupdate",()=>d(e.currentTime)),()=>document.removeEventListener("timeupdate",()=>{})}},[]),(0,i.jsxs)(tf,{css:{backgroundColor:g.canvasBackgroundColor,maxHeight:g.canvasHeight,position:"relative"},"data-testid":"player-wrapper",className:"clover-viewer-player-wrapper",children:[(0,i.jsxs)("video",{id:"clover-iiif-video",ref:h,controls:!0,height:r.height,width:r.width,crossOrigin:"anonymous",poster:c,style:{maxHeight:g.canvasHeight,position:"relative",zIndex:"1"},children:[t.map(e=>(0,i.jsx)("source",{src:e.id,type:e.format},e.id)),(null==n?void 0:n.length)>0&&n.map(e=>{let t=[];return e.items.forEach(e=>{f.get(e.id).body.forEach(e=>{let n=f.get(e.id);t.push(n)})}),t.map(e=>(0,i.jsx)(tx,{resource:e,ignoreCaptionLabels:g.ignoreCaptionLabels||[]},e.id))}),"Sorry, your browser doesn't support embedded videos."]},r.id),m&&(0,i.jsx)(tg,{ref:h})]})};let tj=()=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"close-svg-title",focusable:"false",viewBox:"0 0 512 512",role:"img",children:[(0,i.jsx)("title",{id:"close-svg-title",children:"close"}),(0,i.jsx)("path",{d:"M289.94 256l95-95A24 24 0 00351 127l-95 95-95-95a24 24 0 00-34 34l95 95-95 95a24 24 0 1034 34l95-95 95 95a24 24 0 0034-34z"})]}),ty=e=>{let{isMedia:t}=e;return(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"open-svg-title",focusable:"false",viewBox:"0 0 512 512",role:"img",children:[(0,i.jsx)("title",{id:"open-svg-title",children:"open"}),t?(0,i.jsx)("path",{d:"M133 440a35.37 35.37 0 01-17.5-4.67c-12-6.8-19.46-20-19.46-34.33V111c0-14.37 7.46-27.53 19.46-34.33a35.13 35.13 0 0135.77.45l247.85 148.36a36 36 0 010 61l-247.89 148.4A35.5 35.5 0 01133 440z"}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("path",{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"}),(0,i.jsx)("path",{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"})]})]})};var tw=e=>{let{handleToggle:t,isInteractive:n,isMedia:o}=e;return(0,i.jsx)(e7,{onClick:t,isInteractive:n,isMedia:o,"data-testid":"placeholder-toggle",children:n?(0,i.jsx)(tj,{}):(0,i.jsx)(ty,{isMedia:o})})},tC=e=>{var t,n,r,l,s;let{activeCanvas:d,annotationResources:c,isMedia:h,painting:m}=e,[p,g]=o.useState(0),[f,x]=o.useState(!1),{configOptions:v,customDisplays:b,openSeadragonViewer:j,vault:y,viewerId:w}=(0,a.D1)(),C=(0,a.Cu)(),S=y.get(d),k=null==S?void 0:null===(t=S.placeholderCanvas)||void 0===t?void 0:t.id,z=!!k,I=(null==m?void 0:m.length)>1,$=k&&!f&&!h,A="".concat(w,"-").concat((0,O.un)(d+p)),T=b.find(e=>{let t=!1,{canvasId:n,paintingFormat:i}=e.target;if(Array.isArray(n)&&n.length>0&&(t=n.includes(d)),Array.isArray(i)&&i.length>0){var o;let e=(null===(o=m[p])||void 0===o?void 0:o.format)||"";t=!!(e&&i.includes(e))}return t}),M=[];null===(r=c[0])||void 0===r||null===(n=r.items)||void 0===n||n.forEach(e=>{let t=y.get(e.id);M.push(t)}),(0,o.useEffect)(()=>{var e;M&&j&&(null===(e=v.annotationOverlays)||void 0===e?void 0:e.renderOverlays)&&((0,u.dH)(j,"annotation-overlay"),(0,u.zG)(j,S,v.annotationOverlays,M,"annotation-overlay"))},[S,M,j,v]);let R=null==T?void 0:null===(l=T.display)||void 0===l?void 0:l.component;return(0,i.jsxs)(e9,{className:"clover-viewer-painting",children:[(0,i.jsxs)(te,{style:{backgroundColor:v.canvasBackgroundColor,height:"auto"===v.canvasHeight?"100%":v.canvasHeight},children:[k&&!h&&(0,i.jsx)(tw,{handleToggle:()=>x(!f),isInteractive:f,isMedia:h}),$&&!h&&(0,i.jsx)(th,{isMedia:h,label:null==S?void 0:S.label,placeholderCanvas:k,setIsInteractive:x}),!$&&!T&&(h?(0,i.jsx)(tb,{allSources:m,painting:m[p],annotationResources:c}):m&&(0,i.jsx)(tu.default,{_cloverViewerHasPlaceholder:z,body:m[p],instanceId:A,openSeadragonCallback:e=>{e&&(null==j?void 0:j.id)!=="openseadragon-".concat(A)&&C({type:"updateOpenSeadragonViewer",openSeadragonViewer:e})},openSeadragonConfig:v.openSeadragon},A)),!$&&R&&(0,i.jsx)(R,{id:d,annotationBody:m[p],...null==T?void 0:T.display.componentProps})]}),I&&(0,i.jsx)(td,{value:null===(s=m[p])||void 0===s?void 0:s.id,onValueChange:e=>{g(m.findIndex(t=>t.id===e))},maxHeight:"200px",children:null==m?void 0:m.map(e=>(0,i.jsx)(tc,{value:null==e?void 0:e.id,label:null==e?void 0:e.label},null==e?void 0:e.id))})]})},tS=e=>{let{activeCanvas:t,annotationResources:n,searchServiceUrl:o,setContentSearchResource:r,contentSearchResource:l,isAudioVideo:s,items:d,painting:c}=e,{isInformationOpen:u,configOptions:h}=(0,a.D1)(),{informationPanel:m}=h,p=(null==m?void 0:m.renderAbout)&&u,y=(null==m?void 0:m.renderAnnotation)&&n.length>0&&!m.open;return(0,i.jsxs)(f,{className:"clover-viewer-content","data-testid":"clover-viewer-content",children:[(0,i.jsxs)(x,{children:[(0,i.jsx)(tC,{activeCanvas:t,annotationResources:n,isMedia:s,painting:c}),p&&(0,i.jsx)(v,{children:(0,i.jsx)("span",{children:u?"View Items":"More Information"})}),d.length>1&&(0,i.jsx)(g,{className:"clover-viewer-media-wrapper",children:(0,i.jsx)(e5,{items:d,activeItem:0})})]}),(p||y)&&(0,i.jsx)(j,{children:(0,i.jsx)(b,{children:(0,i.jsx)(ek,{activeCanvas:t,annotationResources:n,searchServiceUrl:o,setContentSearchResource:r,contentSearchResource:l})})})]})};let tk=(0,p.zo)(eJ.Trigger,{width:"30px",padding:"5px"}),tz=(0,p.zo)(eJ.Content,{display:"flex",flexDirection:"column",fontSize:"0.8333rem",border:"none",boxShadow:"2px 2px 5px #0003",zIndex:"2",button:{display:"flex",textDecoration:"none",marginBottom:"0.5em",color:"$accentAlt",cursor:"pointer",background:"$secondary",border:"none","&:last-child":{marginBottom:"0"}}}),tI=(0,p.zo)("span",{fontSize:"1.33rem",alignSelf:"flex-start",flexGrow:"0",flexShrink:"1",padding:"1rem","@sm":{fontSize:"1rem"},"&.visually-hidden":{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}}),t$=(0,p.zo)("header",{display:"flex",backgroundColor:"transparent !important",justifyContent:"space-between",alignItems:"flex-start",width:"100%",["> ".concat(tl)]:{flexGrow:"1",flexShrink:"0"},form:{flexGrow:"0",flexShrink:"1"}}),tA=(0,p.zo)("div",{display:"flex",alignItems:"flex-end",justifyContent:"flex-end",padding:"1rem",flexShrink:"0",flexGrow:"1"});var tT=()=>{var e;let t=(0,a.Cu)(),{activeManifest:n,collection:o,configOptions:r,vault:l}=(0,a.D1)(),s=null==r?void 0:r.canvasHeight;return(0,i.jsx)("div",{style:{margin:"0.75rem"},children:(0,i.jsx)(td,{label:o.label,maxHeight:s,value:n,onValueChange:e=>{t({type:"updateActiveManifest",manifestId:e}),t({type:"updateViewerId",viewerId:(0,F.Z)()})},children:null==o?void 0:null===(e=o.items)||void 0===e?void 0:e.map(e=>(0,i.jsx)(tc,{value:e.id,thumbnail:(null==e?void 0:e.thumbnail)?l.get(null==e?void 0:e.thumbnail):void 0,label:e.label},e.id))})})};let tM=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2500,[n,i]=(0,o.useState)(),a=(0,o.useCallback)(()=>{navigator.clipboard.writeText(e).then(()=>i("copied"),()=>i("failed"))},[e]);return(0,o.useEffect)(()=>{if(!n)return;let e=setTimeout(()=>i(void 0),t);return()=>clearTimeout(e)},[n]),[n,a]},tR=(0,p.zo)("span",{display:"flex",alignContent:"center",alignItems:"center",padding:"0.125rem 0.25rem 0",marginTop:"-0.125rem",marginLeft:"0.5rem",backgroundColor:"$accent",color:"$secondary",borderRadius:"3px",fontSize:"0.6111rem",textTransform:"uppercase",lineHeight:"1em"}),tE=e=>{let{status:t}=e;return t?(0,i.jsx)(tR,{"data-copy-status":t,children:t}):null};var tL=e=>{let{textPrompt:t,textToCopy:n}=e,[o,a]=tM(n);return(0,i.jsxs)("button",{onClick:a,children:[t," ",(0,i.jsx)(tE,{status:o})]})},tF=()=>{let e="#ed1d33",t="#2873ab";return(0,i.jsxs)("svg",{viewBox:"0 0 493.35999 441.33334",id:"iiif-logo",version:"1.1",children:[(0,i.jsx)("title",{children:"IIIF Manifest Options"}),(0,i.jsx)("g",{transform:"matrix(1.3333333,0,0,-1.3333333,0,441.33333)",children:(0,i.jsxs)("g",{transform:"scale(0.1)",children:[(0,i.jsx)("path",{style:{fill:t},d:"M 65.2422,2178.75 775.242,1915 773.992,15 65.2422,276.25 v 1902.5"}),(0,i.jsx)("path",{style:{fill:t},d:"m 804.145,2640.09 c 81.441,-240.91 -26.473,-436.2 -241.04,-436.2 -214.558,0 -454.511,195.29 -535.9527,436.2 -81.4335,240.89 26.4805,436.18 241.0387,436.18 214.567,0 454.512,-195.29 535.954,-436.18"}),(0,i.jsx)("path",{style:{fill:e},d:"M 1678.58,2178.75 968.578,1915 969.828,15 1678.58,276.25 v 1902.5"}),(0,i.jsx)("path",{style:{fill:e},d:"m 935.082,2640.09 c -81.437,-240.91 26.477,-436.2 241.038,-436.2 214.56,0 454.51,195.29 535.96,436.2 81.43,240.89 -26.48,436.18 -241.04,436.18 -214.57,0 -454.52,-195.29 -535.958,-436.18"}),(0,i.jsx)("path",{style:{fill:t},d:"m 1860.24,2178.75 710,-263.75 -1.25,-1900 -708.75,261.25 v 1902.5"}),(0,i.jsx)("path",{style:{fill:t},d:"m 2603.74,2640.09 c 81.45,-240.91 -26.47,-436.2 -241.03,-436.2 -214.58,0 -454.52,195.29 -535.96,436.2 -81.44,240.89 26.48,436.18 241.03,436.18 214.57,0 454.51,-195.29 535.96,-436.18"}),(0,i.jsx)("path",{style:{fill:e},d:"m 3700.24,3310 v -652.5 c 0,0 -230,90 -257.5,-142.5 -2.5,-247.5 0,-336.25 0,-336.25 l 257.5,83.75 V 1690 l -258.61,-92.5 V 262.5 L 2735.24,0 v 2360 c 0,0 -15,850 965,950"})]})})]})},tH=n(2472);let tD=(0,p.zo)(tH.fC,{all:"unset",height:"2rem",width:"3.236rem",backgroundColor:"#6663",borderRadius:"9999px",position:"relative",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:focus":{boxShadow:"0 0 0 2px $secondaryAlt"},'&[data-state="checked"]':{backgroundColor:"$accent",boxShadow:"inset 2px 2px 5px #0003"}}),tV=(0,p.zo)(tH.bU,{display:"block",height:"calc(2rem - 12px)",width:"calc(2rem - 12px)",backgroundColor:"$secondary",borderRadius:"100%",boxShadow:"2px 2px 5px #0001",transition:"$all",transform:"translateX(6px)",willChange:"transform",'&[data-state="checked"]':{transform:"translateX(calc(1.236rem + 6px))"}}),tP=(0,p.zo)("label",{fontSize:"0.8333rem",fontWeight:"400",lineHeight:"1em",userSelect:"none",cursor:"pointer",paddingRight:"0.618rem"}),tB=(0,p.zo)("form",{display:"flex",flexShrink:"0",flexGrow:"1",alignItems:"center",marginLeft:"1.618rem"});var tO=()=>{var e;let{configOptions:t}=(0,a.D1)(),n=(0,a.Cu)(),[r,l]=(0,o.useState)(null==t?void 0:null===(e=t.informationPanel)||void 0===e?void 0:e.open);return(0,o.useEffect)(()=>{n({type:"updateInformationOpen",isInformationOpen:r})},[r,n]),(0,i.jsxs)(tB,{children:[(0,i.jsx)(tP,{htmlFor:"information-toggle",css:r?{opacity:"1"}:{},children:"More Information"}),(0,i.jsx)(tD,{checked:r,onCheckedChange:()=>l(!r),id:"information-toggle","aria-label":"information panel toggle",name:"toggled?",children:(0,i.jsx)(tV,{})})]})};let tN=(0,p.zo)(eJ.Trigger,{width:"30px",padding:"5px"}),tW=(0,p.zo)(tz,{h3:{color:"$primaryAlt",fontSize:"$2",fontWeight:"700",margin:"$2 0"},button:{},"& ul li":{marginBottom:"$1"}});var t_=n(5593);function tG(e,t){let n=[];if(!e)return n;for(let i of e)if(i.id){let e=t.get(i.id);e&&n.push(e)}return n}function tq(e,t){return e.map(e=>{let{format:n,id:i,label:o}=e;return{format:n,id:function(e){let{vault:t}=(0,a.D1)();try{let n=e&&t.get(e);if(!n)throw Error("Vault entity ".concat(e," not found."));return(null==n?void 0:n["@id"])||(null==n?void 0:n.id)}catch(t){return console.error(t),e}}(i),label:(0,t_.M)(o)||t}})}var tU=()=>{let{allPages:e,individualPages:t}=function(){let e=function(){let{activeCanvas:e,activeManifest:t,vault:n}=(0,a.D1)(),[i,r]=(0,o.useState)({root:[],canvas:[]});return(0,o.useEffect)(()=>{let i=n.get(t),o=n.get(e),a=null==i?void 0:i.rendering,l=null==o?void 0:o.rendering;r({root:tG(a,n),canvas:tG(l,n)})},[e,t,n]),{...i}}();return{allPages:tq((null==e?void 0:e.root)||[],"Root Rendering Label"),individualPages:tq((null==e?void 0:e.canvas)||[],"Canvas Rendering Label")}}(),n=e.length>0||t.length>0,r=e=>{window.open(e,"_blank")};return n?(0,i.jsxs)(eJ,{children:[(0,i.jsx)(tN,{"data-testid":"download-button",children:(0,i.jsx)(eO,{children:(0,i.jsx)(eO.Download,{})})}),(0,i.jsxs)(tW,{"data-testid":"download-content",children:[t.length>0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("h3",{children:"Individual Pages"}),(0,i.jsx)("ul",{children:t.map(e=>{let{format:t,id:n,label:o}=e;return(0,i.jsx)("li",{children:(0,i.jsxs)("button",{onClick:()=>r(n),children:[o," (",t,")"]})},o)})})]}),e.length>0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("h3",{children:"All Pages"}),(0,i.jsx)("ul",{children:e.map(e=>{let{format:t,id:n,label:o}=e;return(0,i.jsx)("li",{children:(0,i.jsxs)("button",{onClick:()=>r(n),children:[o," (",t,")"]})},o)})})]})]})]}):null};let tZ=e=>{let t=()=>!!window.matchMedia&&window.matchMedia(e).matches,[n,i]=(0,o.useState)(t);return(0,o.useEffect)(()=>{let e=()=>i(t);return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),n};var tY=e=>{let{manifestId:t,manifestLabel:n}=e,{collection:o,configOptions:r}=(0,a.D1)(),{informationPanel:l,showDownload:s,showIIIFBadge:d,showTitle:c}=r,u=s||d||(null==l?void 0:l.renderToggle),h=tZ(p.BC.sm);return(0,i.jsxs)(t$,{className:"clover-viewer-header",children:[(null==o?void 0:o.items)?(0,i.jsx)(tT,{}):(0,i.jsx)(tI,{className:c?"":"visually-hidden",children:c&&(0,i.jsx)(ep.__,{label:n,className:"label"})}),u&&(0,i.jsxs)(tA,{children:[s&&(0,i.jsx)(tU,{}),d&&(0,i.jsxs)(eJ,{children:[(0,i.jsx)(tk,{children:(0,i.jsx)(tF,{})}),(0,i.jsxs)(tz,{children:[(null==o?void 0:o.items)&&(0,i.jsx)("button",{onClick:e=>{e.preventDefault(),window.open(o.id,"_blank")},children:"View Collection"}),(0,i.jsx)("button",{onClick:e=>{e.preventDefault(),window.open(t,"_blank")},children:"View Manifest"})," ",(null==o?void 0:o.items)&&(0,i.jsx)(tL,{textPrompt:"Copy Collection URL",textToCopy:o.id}),(0,i.jsx)(tL,{textPrompt:"Copy Manifest URL",textToCopy:t})]})]}),(null==l?void 0:l.renderToggle)&&!h&&(0,i.jsx)(tO,{})]})]})};let tJ=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],[t,n]=(0,o.useState)(e);return(0,o.useLayoutEffect)(()=>{if(!t)return;let e=document.documentElement.style.overflow;return document.documentElement.style.overflow="hidden",()=>{document.documentElement.style.overflow=e}},[t]),(0,o.useEffect)(()=>{t!==e&&n(e)},[e]),[t,n]};var tQ=e=>{var t;let{manifest:n,theme:r,iiifContentSearchQuery:g}=e,f=(0,a.D1)(),x=(0,a.Cu)(),{activeCanvas:v,isInformationOpen:b,vault:j,contentSearchVault:w,configOptions:C,openSeadragonViewer:S}=f,k=(null==C?void 0:C.canvasHeight)&&["100%","auto"].includes(null==C?void 0:C.canvasHeight),[z,I]=(0,o.useState)(!1),[$,A]=(0,o.useState)(!1),[T,M]=(0,o.useState)([]),[R,E]=(0,o.useState)([]),[L,F]=(0,o.useState)(),[H,D]=tJ(!1),V=tZ(p.BC.sm),[P,B]=(0,o.useState)(),O=(0,o.useCallback)(e=>{x({type:"updateInformationOpen",isInformationOpen:e})},[x]);(0,o.useEffect)(()=>{var e;(null==C?void 0:null===(e=C.informationPanel)||void 0===e?void 0:e.open)&&O(!V)},[V,null==C?void 0:null===(t=C.informationPanel)||void 0===t?void 0:t.open,O]),(0,o.useEffect)(()=>{if(!V){D(!1);return}D(b)},[b,V,D]),(0,o.useEffect)(()=>{let e=(0,s.G)(j,v);e&&(A(["Sound","Video"].indexOf(e[0].type)>-1),M(e)),d(j,v).then(e=>{e.length>0&&x({type:"updateInformationOpen",isInformationOpen:!0}),E(e),I(0!==e.length)})},[v,R.length,j,x]);let N=n.service.some(e=>"SearchService2"===e.type);return(0,o.useEffect)(()=>{if(N){let e=n.service.find(e=>"SearchService2"===e.type);e&&B(e.id)}},[n,N]),(0,o.useEffect)(()=>{var e,t,n;P&&(null===(e=C.informationPanel)||void 0===e?void 0:e.renderContentSearch)!==!1&&c(w,P,null===(n=C.localeText)||void 0===n?void 0:null===(t=n.contentSearch)||void 0===t?void 0:t.tabLabel,g).then(e=>{F(e)})},[P]),(0,o.useEffect)(()=>{if(!S||!L)return;let e=j.get({id:v,type:"Canvas"});(0,u.dH)(S,"content-search-overlay"),(0,u.LW)(w,L,S,e,C)},[S,L]),(0,i.jsx)(h.SV,{FallbackComponent:m.Z,children:(0,i.jsx)(y,{className:"".concat(r," clover-viewer"),css:{background:null==C?void 0:C.background},"data-body-locked":H,"data-absolute-position":k,"data-information-panel":z,"data-information-panel-open":b,children:(0,i.jsxs)(l.fC,{open:b,onOpenChange:O,children:[(0,i.jsx)(tY,{manifestLabel:n.label,manifestId:n.id}),(0,i.jsx)(tS,{activeCanvas:v,painting:T,annotationResources:R,searchServiceUrl:P,setContentSearchResource:F,contentSearchResource:L,items:n.items,isAudioVideo:$})]})})})},tX=n(458);let tK={ignoreCache:!1,headers:{Accept:"application/json, text/javascript, text/plain"},timeout:5e3,withCredentials:!1};function t0(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{ok:!1,status:e.status,statusText:e.statusText,headers:e.getAllResponseHeaders(),data:t||e.statusText,json:()=>JSON.parse(t||e.statusText)}}var t1=n(2103);let t2=e=>{let{canvasIdCallback:t,customTheme:n,iiifContent:r,options:l,iiifContentSearchQuery:s}=e,d=(0,a.Cu)(),{activeCanvas:c,activeManifest:u,isLoaded:h,vault:m}=(0,a.D1)(),[p,g]=(0,o.useState)(),[f,x]=(0,o.useState)(),v={};return(n&&(v=(0,tX.jG)("custom",n)),(0,o.useEffect)(()=>{t&&t(c)},[c,t]),(0,o.useEffect)(()=>{u&&m.loadManifest(u).then(e=>{x(e),d({type:"updateActiveCanvas",canvasId:(0,t1.FO)(r,e)})}).catch(e=>{console.error("Manifest failed to load: ".concat(e))}).finally(()=>{d({type:"updateIsLoaded",isLoaded:!0})})},[r,u,d,m]),(0,o.useEffect)(()=>{d({type:"updateConfigOptions",configOptions:l});let e=(0,t1.Vu)(r);m.load(e).then(e=>{g(e)}).catch(e=>{console.error("The IIIF resource ".concat(r," failed to load: ").concat(e))})},[d,r,l,m]),(0,o.useEffect)(()=>{if((null==p?void 0:p.type)==="Collection"){d({type:"updateCollection",collection:p});let e=(0,t1.Mx)(r,p);e&&d({type:"updateActiveManifest",manifestId:e})}else(null==p?void 0:p.type)==="Manifest"&&d({type:"updateActiveManifest",manifestId:p.id})},[d,r,p]),h)?f&&f.items?0===f.items.length?(console.log("The IIIF manifest ".concat(r," does not contain canvases.")),(0,i.jsx)(i.Fragment,{})):(0,i.jsx)(tQ,{manifest:f,theme:v,iiifContentSearchQuery:s},f.id):(console.log("The IIIF manifest ".concat(r," failed to load.")),(0,i.jsx)(i.Fragment,{})):(0,i.jsx)(i.Fragment,{children:"Loading"})};var t4=e=>{var t,n,o;let{canvasIdCallback:l=()=>{},customDisplays:s=[],plugins:d=[],customTheme:c,iiifContent:u,id:h,manifestId:m,options:p,iiifContentSearchQuery:g}=e,f=u;h&&(f=h),m&&(f=m);let x=(0,a.as)(null==p?void 0:null===(n=p.informationPanel)||void 0===n?void 0:null===(t=n.vtt)||void 0===t?void 0:t.autoScroll);return(0,i.jsx)(a.MY,{initialState:{...a.W2,customDisplays:s,plugins:d,isAutoScrollEnabled:x.enabled,isInformationOpen:!!(null==p?void 0:null===(o=p.informationPanel)||void 0===o?void 0:o.open),vault:new r.j({customFetcher:e=>(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:tK,n=t.headers||tK.headers;return new Promise((i,o)=>{let a=new XMLHttpRequest;a.open("get",e),a.withCredentials=t.withCredentials,n&&Object.keys(n).forEach(e=>a.setRequestHeader(e,n[e])),a.onload=()=>{i({ok:a.status>=200&&a.status<300,status:a.status,statusText:a.statusText,headers:a.getAllResponseHeaders(),data:a.responseText,json:()=>JSON.parse(a.responseText)})},a.onerror=()=>{o(t0(a,"Failed to make request."))},a.ontimeout=()=>{o(t0(a,"Request took longer than expected."))},a.send()})})(e,{withCredentials:null==p?void 0:p.withCredentials,headers:null==p?void 0:p.requestHeaders}).then(e=>JSON.parse(e.data))})},children:(0,i.jsx)(t2,{iiifContent:f,canvasIdCallback:l,customTheme:c,options:p,iiifContentSearchQuery:g})})}},8640:function(e,t,n){n.d(t,{g:function(){return i}});let i=(e,t,n,i)=>{let o={canvas:void 0,accompanyingCanvas:void 0,annotationPage:void 0,annotations:[]};if(o.canvas=e.get(t),o.canvas){var a,r;o.annotationPage=e.get(o.canvas.items[0]),o.accompanyingCanvas=(null===(a=o.canvas)||void 0===a?void 0:a.accompanyingCanvas)?e.get(null===(r=o.canvas)||void 0===r?void 0:r.accompanyingCanvas):void 0}if(o.annotationPage){let a=e.get(o.annotationPage.items).map(t=>({body:e.get(t.body[0].id),motivation:t.motivation,type:"Annotation"})),r=[];a.forEach(t=>{"Choice"===t.body.type?t.body.items.forEach(n=>r.push({...t,id:n.id,body:e.get(n.id)})):r.push(t)}),o.annotations=r.filter(o=>{if(o){if(!o.body||!o.motivation){console.error("Invalid annotation after Hyperion parsing: missing either 'body' or 'motivation'",o);return}let a=o.body;Array.isArray(a)&&(a=a[0]);let r=e.get(a.id);if(r)switch(n){case"painting":return o.target===t.id&&o.motivation&&"painting"===o.motivation[0]&&i.includes(r.type)&&(o.body=r),!!o;case"supplementing":return;default:throw Error("Invalid annotation motivation.")}}})}return o}},4707:function(e,t,n){n.d(t,{G:function(){return o}});var i=n(8640);let o=(e,t)=>{let n=(0,i.g)(e,{id:t,type:"Canvas"},"painting",["Image","Sound","Video"]);if(0!==n.annotations.length&&n.annotations&&n.annotations)return n.annotations.map(e=>null==e?void 0:e.body)}}}]); \ No newline at end of file diff --git a/_next/static/chunks/nextra-data-en-US.json b/_next/static/chunks/nextra-data-en-US.json index db2893c9..4cfeb6ba 100644 --- a/_next/static/chunks/nextra-data-en-US.json +++ b/_next/static/chunks/nextra-data-en-US.json @@ -1 +1 @@ -{"/docs/composing":{"title":"Getting Started","data":{"":"Clover IIIF is designed to allow for rapid creation of web content translated from IIIF resources. The following is quick step-by-step guide to get you up and running with Clover IIIF.","creating-a-work-page#Creating a Work page":"In this tutorial, we will install Clover IIIF and compose a \"Work\" page representing a IIIF Manifest for Northwestern Football vs. Illinois, 1950.","install-package#Install package":"Add the following dependency to your project:\nnpm install @samvera/clover-iiif","create-file#Create file":"Create a file called Work.jsx in your project and add the following:","define-component#Define component":"Import React. Define and export a functional component named Work that renders an empty
element.\nimport React from \"react\";\nconst Work = () => {\n return
;\n};\nexport default Work;","add-viewer#Add Viewer":"As an initial step, define a constant manifestId that points to the IIIF Manifest for Northwestern Football vs. Illinois, 1950. Then, add a component to the Work component that renders the IIIF Manifest. If your react application is running in your browser, you should see the Clover IIIF viewer.\nimport React from \"react\";\nimport Viewer from \"@samvera/clover-iiif/viewer\";\nconst Work = () => {\n const manifestId =\n \"https://api.dc.library.northwestern.edu/api/v2/works/0902aed4-0eb0-4ab4-a151-c925493be04e?as=iiif\";\n return (\n
\n \n
\n );\n};\nexport default Work;","add-manifest-content#Add Manifest Content":"Next, we add the IIIF Primitives components to the Work component to render the IIIF Manifest content.This requires fetching the IIIF Manifest and passing it to the components. The following code snippet demonstrates how to fetch the IIIF Manifest in a useEffect hook, set the manifest in state, and pass the manifest properties to the IIIF Primitives components.\nWhile the Viewer and Slider components are designed for both the IIIF\nPresentation API 2.x and 3.0, the Primitives components, e.g., Label,\nSummary, Metadata, are limited to the IIIF Presentation API 3.0. If\nthis is an issue, you can use\n@iiif/parser for\nconversion.\nimport React, { useEffect, useState } from \"react\";\nimport Viewer from \"@samvera/clover-iiif/viewer\";\nimport {\n Homepage,\n Label,\n Metadata,\n PartOf,\n RequiredStatement,\n SeeAlso,\n Summary,\n} from \"@samvera/clover-iiif/primitives\";\nconst Work = () => {\n const [manifest, setManifest] = useState();\n const manifestId =\n \"https://api.dc.library.northwestern.edu/api/v2/works/0902aed4-0eb0-4ab4-a151-c925493be04e?as=iiif\";\n useEffect(() => {\n (async () => {\n const response = await fetch(manifestId);\n const json = await response.json();\n setManifest(json);\n })();\n }, [manifestId]);\n if (!manifest) return <>;\n return (\n
\n \n
\n
\n
\n );\n};\nexport default Work;","add-slider#Add Slider":"Finally, we add the Slider component to render the IIIF Collection that this Manifest is part of. We also need to import the swiper CSS files for baseline styling.\nimport React, { useEffect, useState } from \"react\";\nimport Viewer from \"@samvera/clover-iiif/viewer\";\nimport {\n Homepage,\n Label,\n Metadata,\n PartOf,\n RequiredStatement,\n SeeAlso,\n Thumbnail,\n} from \"@samvera/clover-iiif/primitives\";\nimport Slider from \"@samvera/clover-iiif/slider\";\nimport \"swiper/css\";\nimport \"swiper/css/navigation\";\nimport \"swiper/css/pagination\";\nconst Work = () => {\n const [manifest, setManifest] = useState();\n const manifestId =\n \"https://api.dc.library.northwestern.edu/api/v2/works/0902aed4-0eb0-4ab4-a151-c925493be04e?as=iiif\";\n const collectionId = manifest?.partOf[0].id;\n useEffect(() => {\n (async () => {\n const response = await fetch(manifestId);\n const json = await response.json();\n setManifest(json);\n })();\n }, [manifestId]);\n if (!manifest) return <>;\n return (\n
\n \n
\n
\n \n
\n );\n};\nexport default Work;","summary#Summary":"In this tutorial, we installed Clover IIIF and composed an unstyled \"Work\" page representing a IIIF Manifest. The completed code covered in these steps is available in a CodeSandbox."}},"/docs/homepage":{"title":"Homepage","data":{"":"A web page that is about the object represented by the resource that has the homepage property.\n\n\n Homepage at Northwestern University Libraries Digital Collections\n","usage#Usage":"","react#React":"import { Homepage } from \"@samvera/clover-iiif/primitives\";\nconst CustomHomepage = ({ homepage }) => {\n return ;\n};\nexport default CustomHomepage;","nextjs#Next.js":"If using Next.js, you will want to render your Homepage component as a Next.js Link component. To do so, pass the Homepage component with the as prop using Link.\nimport Link from \"next/link\";\nimport { Primitives as IIIF } from \"@samvera/clover-iiif/primitives\";\nconst CustomHomepage = ({ homepage }) => {\n return ;\n};\nexport default CustomHomepage;","api-reference#API Reference":"Prop\tType\tDefault\tRequired\tas\ta\ta\t--\thomepage\thomepage\t--\tYes\tclassName\tstring, undefined\t--\t--\tstyle\tCSSProperties, undefined\t--\t--\tlang\tstring, undefined\t--\t--\ttitle\tstring, undefined\t--\t--\tdata-*\tstring, undefined\t--\t--\taria-*\tAriaAttributes, undefined\t--\t--","html-attributes#HTML Attributes":"Homepage, like all Clover IIIF primitives accept common HTMLElement attributes. Use the JSX style className prop to add custom classes. The same attribute methodology can be used for id, style, title, data-*, and aria-* props.In the following example, an onClick() function will display an with the data-homepage-id attribute value.\n {\n e.preventDefault();\n alert(e.target.dataset.homepageId);\n }}\n/>\n\n Homepage at Northwestern University Libraries Digital Collections\n","wrapping-children#Wrapping Children":"The Homepage component can also be used to wrap React children. An aria-label element with the value of the homepage label.\n\n View Homepage\n\nView Homepage\n\n View Homepage\n"}},"/docs":{"title":"Docs","data":{"":"UI component library for rapidly creating high-quality and accessible IIIF-fluent web interfaces.Clover IIIF is a suite of Manifest and Collection components combined with lower-level IIIF Presentation 3.0 API UI components. Clover IIIF has a focus on accessibility, customization and developer experience. You can use Clover IIIF to build your own custom IIIF-fluent web interfaces while still using the full power of the IIIF Presentation 3.0 API.","vision#Vision":"Implementation of the IIIF Presentation API does not need to be limited to a primary viewer. Using Clover IIIF breaks the model of a \"viewer\" and allows the IIIF Presentation API to be used as a front-end for any web application. This is possible because the IIIF Presentation API is a highly defined and interoperable specification for representing digital objects. This means that the IIIF Presentation API can be used to represent any digital object, not just images. This concept gives creation to highly interoperable web user interfaces.","key-features#Key Features":"Accessibility - All components lean on WAI-ARIA design patterns to ensure that they are accessible to all users.\nCustomization - All components are designed to be easily customized with CSS.\nDeveloper Experience - All components are built with developer experience in mind and are designed to be easily integrated into any web application."}},"/docs/label":{"title":"Label","data":{"":"The Label component is used to display the label of a resource. It is used in the following contexts: Manifest, Canvas, Range, Annotation, AnnotationPage, Collection, and Manifest. It is a string or an object with language keys and string values.\n

Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source.
\ No newline at end of file diff --git a/docs/label.html b/docs/label.html index 3a008ca5..fba1bff8 100644 --- a/docs/label.html +++ b/docs/label.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 209deg; --nextra-primary-saturation: 100%; } -
Documentation
Label

Label

+
Documentation
Label

Label

The Label component is used to display the label of a resource. It is used in the following contexts: Manifest, Canvas, Range, Annotation, AnnotationPage, Collection, and Manifest. It is a string or an object with language keys and string values.

label
<Label label={{ none: ["Crossing the Pend d'Oreille - Kalispel"] }} />
@@ -46,4 +46,4 @@

fr: ["Notes des réunions de mise en scène et d'environnement"], }} lang="fr" -/>


Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source.
\ No newline at end of file +/>

Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source.
\ No newline at end of file diff --git a/docs/metadata.html b/docs/metadata.html index d9daa9ad..bd5fbd3e 100644 --- a/docs/metadata.html +++ b/docs/metadata.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 209deg; --nextra-primary-saturation: 100%; } -
Documentation
Metadata

Metadata

+
Documentation
Metadata

Metadata

An ordered list of descriptions to be displayed to the user when they interact with the resource, given as pairs of human readable label and value entries.

metadata
<Metadata
@@ -141,4 +141,4 @@ 

}, ]} customValueDelimiter="<br/>" -/>


Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source.
\ No newline at end of file +/>

Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source.
\ No newline at end of file diff --git a/docs/partOf.html b/docs/partOf.html index 1e861d9b..37a1b4b6 100644 --- a/docs/partOf.html +++ b/docs/partOf.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 209deg; --nextra-primary-saturation: 100%; } -
Documentation
PartOf

PartOf

+

Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source.
\ No newline at end of file +/>

Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source.
\ No newline at end of file diff --git a/docs/rendering.html b/docs/rendering.html index 15d6b9c2..4b32c015 100644 --- a/docs/rendering.html +++ b/docs/rendering.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 209deg; --nextra-primary-saturation: 100%; } -
Documentation
Rendering

Rendering

+
Documentation
Rendering

Rendering

The Rendering component is used to display a list of alternate formats related to a resource. Whereas SeeAlso is used to link to a machine-readable resource such as metadata, the Rendering component alerts users that the resource is available in another format such as PDF or ePub or has a related format. Because of the wide variety of formats that @@ -55,4 +55,4 @@

}, ]} as="ol" -/>


Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source.
\ No newline at end of file +/>

Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source.
\ No newline at end of file diff --git a/docs/requiredStatement.html b/docs/requiredStatement.html index 26004190..0c776f08 100644 --- a/docs/requiredStatement.html +++ b/docs/requiredStatement.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 209deg; --nextra-primary-saturation: 100%; } -
Documentation
RequiredStatement

RequiredStatement

+
Documentation
RequiredStatement

RequiredStatement

The RequiredStatement component renders the required statement for a IIIF resource. The required statement is a human readable label and value pair that describes the rights status of the resource.

requiredStatement
<RequiredStatement
@@ -82,4 +82,4 @@ 

}, }} customValueDelimiter=". " -/>


Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source.
\ No newline at end of file +/>

Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source.
\ No newline at end of file diff --git a/docs/scroll.html b/docs/scroll.html index 335e756e..1e7eb221 100644 --- a/docs/scroll.html +++ b/docs/scroll.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 209deg; --nextra-primary-saturation: 100%; } -
Documentation
Scroll

Scroll

+
Documentation
Scroll

Scroll

A UI component rendering a vertical scrolling articles that output individual Canvases, basic descriptive properties, and Annotations with commenting motivations with support for transcribing and translating motivations.

Manifest
@@ -58,4 +58,4 @@

<Scroll
   iiifContent="https://digital.lib.utk.edu/assemble/manifest/civilwar/5390"
   options={{ offset: 90 }}
-/>


Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source.
\ No newline at end of file +/>

Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source.
\ No newline at end of file diff --git a/docs/scroll/demo.html b/docs/scroll/demo.html index f3195c07..6bdf33e3 100644 --- a/docs/scroll/demo.html +++ b/docs/scroll/demo.html @@ -11,10 +11,10 @@ --nextra-primary-hue: 209deg; --nextra-primary-saturation: 100%; } -

Scroll

+

Scroll


Docs

A UI component rendering vertical scrolling articles that output individual Canvases, basic descriptive properties, and Annotations with commenting motivations with support for transcribing and translating motivations.


-

Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source.
\ No newline at end of file +

Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source.
\ No newline at end of file diff --git a/docs/seeAlso.html b/docs/seeAlso.html index d832f147..1125988f 100644 --- a/docs/seeAlso.html +++ b/docs/seeAlso.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 209deg; --nextra-primary-saturation: 100%; } -
Documentation
SeeAlso

SeeAlso

+
Documentation
SeeAlso

SeeAlso

The SeeAlso component is used to display a list of related resources. A machine-readable resource such as an XML or RDF description that is related to the current resource that has the seeAlso property. The resource may be of any media type, and contain any type of data.

seeAlso
<SeeAlso
@@ -51,4 +51,4 @@ 

}, ]} as="ol" -/>


Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source.
\ No newline at end of file +/>

Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source.
\ No newline at end of file diff --git a/docs/slider.html b/docs/slider.html index 8dfb1863..74b6408c 100644 --- a/docs/slider.html +++ b/docs/slider.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 209deg; --nextra-primary-saturation: 100%; } -
Documentation
Slider

Slider

+

Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source.
\ No newline at end of file +]

Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source.
\ No newline at end of file diff --git a/docs/slider/demo.html b/docs/slider/demo.html index 0453b24b..1926d171 100644 --- a/docs/slider/demo.html +++ b/docs/slider/demo.html @@ -11,9 +11,9 @@ --nextra-primary-hue: 209deg; --nextra-primary-saturation: 100%; } -

Slider

+

Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source.
\ No newline at end of file +

Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source.
\ No newline at end of file diff --git a/docs/summary.html b/docs/summary.html index 21456a46..fcd6afb8 100644 --- a/docs/summary.html +++ b/docs/summary.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 209deg; --nextra-primary-saturation: 100%; } -
Documentation
Summary

Summary

+
Documentation
Summary

Summary

The Summary component is used to display a short description of the resource. It is a wrapper around the IIIF Presentation API 3.0 summary property (opens in a new tab). The summary property is a multi-lingual field that can be used to provide a short description of the resource. It is recommended that the summary be less than 250 characters. The summary property is intended to be displayed to the user when the resource is being selected from a list of search results or resources.

summary
<Summary
@@ -67,4 +67,4 @@ 

as="p" dir="rtl" lang="ar" -/>


Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source.
\ No newline at end of file +/>

Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source.
\ No newline at end of file diff --git a/docs/thumbnail.html b/docs/thumbnail.html index b213e916..ec7585ab 100644 --- a/docs/thumbnail.html +++ b/docs/thumbnail.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 209deg; --nextra-primary-saturation: 100%; } -
Documentation
Thumbnail

Thumbnail

+
Documentation
Thumbnail

Thumbnail

The Thumbnail component is used to display a thumbnail for a IIIF resource. This generally is an Image, however, could be a short Video or Sound clip.

thumbnail
<Thumbnail
@@ -50,4 +50,4 @@ 

duration: 30, }, ]} -/>


Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source.
\ No newline at end of file +/>

Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source.
\ No newline at end of file diff --git a/docs/viewer.html b/docs/viewer.html index bff9273d..e56013a5 100644 --- a/docs/viewer.html +++ b/docs/viewer.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 209deg; --nextra-primary-saturation: 100%; } -
Documentation
Viewer

Viewer

+

API Reference

Viewer can configured through an options prop, which will serve as a object for common options.

-
PropTypeRequiredDefault
iiifContentstringYes
iiifContentSearchQuerySee Content SearchNo
canvasIdCallbackfunctionNo
customDisplaysSee Custom DisplaysNo
customThemeobjectNo
optionsobjectNo
options.backgroundstring CSS (opens in a new tab)Notransparent
options.canvasBackgroundColorstring CSS (opens in a new tab)No#1a1d1e
options.canvasHeightstring CSS (opens in a new tab)No500px
options.ignoreCaptionLabelsstring[]No[]
options.openSeadragonOpenSeadragon.OptionsNo
options.informationPanelSee Information PanelNo
options.requestHeadersIncomingHttpHeadersNo{ "Content-Type": "application/json" }
options.showDownloadbooleanNotrue
options.showIIIFBadgebooleanNotrue
options.showTitlebooleanNotrue
options.withCredentialsbooleanNofalse
options.contentSearchSee Content SearchNo
+
PropTypeRequiredDefault
iiifContentstringYes
iiifContentSearchQuerySee Content SearchNo
canvasIdCallbackfunctionNo
customDisplaysSee Custom DisplaysNo
customThemeobjectNo
pluginsSee PluginsNo
optionsobjectNo
options.backgroundstring CSS (opens in a new tab)Notransparent
options.canvasBackgroundColorstring CSS (opens in a new tab)No#1a1d1e
options.canvasHeightstring CSS (opens in a new tab)No500px
options.ignoreCaptionLabelsstring[]No[]
options.openSeadragonOpenSeadragon.OptionsNo
options.informationPanelSee Information PanelNo
options.requestHeadersIncomingHttpHeadersNo{ "Content-Type": "application/json" }
options.showDownloadbooleanNotrue
options.showIIIFBadgebooleanNotrue
options.showTitlebooleanNotrue
options.withCredentialsbooleanNofalse
options.contentSearchSee Content SearchNo
  • Options canvasBackgroundColor and canvasHeight will apply to both <video> elements and the OpenseaDragon canvas.
  • Option withCredentials being set as true will inform IIIF resource requests to be made using credentials (opens in a new tab) such as cookies, authorization headers or TLS client certificates.
  • @@ -368,4 +368,173 @@

    "width": 1192 } }

-

See a complete recipe for a PDF Viewer (opens in a new tab) using custom canvas displays.


Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source.
\ No newline at end of file +

See a complete recipe for a PDF Viewer (opens in a new tab) using custom canvas displays.

+
+

Plugins

+

Clover supports 3rd-party plugins as a way to add more functionality to Clover. To add plugins, use the plugins prop. plugins will accept an array of objects, with each object representing a plugin.

+

People can use prebuilt plugins or create their own plugins. To install a prebuilt plugin, people should follow the instructions for the particular plugin.

+

Here's an example of using two plugins. PluginA adds a button to imageViewer.controls. PluginB adds a tab to informationPanel.

+
import PluginA from "plugin-A";
+import PluginB from "plugin-B";
+ 
+export default function App() {
+  return (
+    <Viewer
+      iiifContent={iiifContent}
+      plugins={[
+        {
+          id: "Plugin A",
+          imageViewer: {
+            controls: {
+              component: PluginA,
+            },
+          },
+        },
+        {
+          id: "Plugin B",
+          informationPanel: {
+            component: PluginB,
+            componentProps: {
+              objectId: 456,
+            },
+            label: { none: ["My Plugin"] },
+          },
+        },
+      ]}
+    />
+  );
+}
+

plugin

+
PropTypeRequiredDefault
idstringyes
imageViewer.controlsobjectNo
imageViewer.controls.componentReact Componentyes
imageViewer.controls.componentPropsobjectno
informationPanelobjectNo
informationPanel.componentReact Componentyes
informationPanel.componentPropsobjectno
informationPanel.labelobjectyes
+

id - unique id for the plugin

+

imageViewer.controls - If you want to add a custom component to image viewer controls, use imageViewer.controls.

+

imageViewer.controls.component - The component to render.

+

imageViewer.controls.componentProps - Props passed to the controls component.

+

informationPanel - If you want to add a custom component to the information panel, use informationPanel.

+

informationPanel.component - The component to render.

+

informationPanel.componentProps - Props passed to the information panel component.

+

informationPanel.label - The text that is displayed in the tab.

+

Instructions for creating a plugin

+

Clover offers these features to support plugins:

+
    +
  • Renders custom React components in certain areas of the Clover Viewer. Areas include image viewer controls and information panel.
  • +
  • Gives plugins the ability to access and change the state of the Clover Viewer via props
  • +
  • Pass in props to the plugin components
  • +
+
PropDescription
canvasactive canvas object
useViewerDispatchReact hook to update the Viewer context store (opens in a new tab)
useViewerStateReact hook to access the Viewer context store (opens in a new tab)
+

Here is an example plugin that has both imageViewer.controls and informationPanel. Plugin components have access to canvas, useViewerDispatch, and useViewerState via props.

+

plugin

+
// PluginButton.tsx
+ 
+export default function PluginButton(props) {
+  const { canvas, useViewerDispatch, useViewerState } = props;
+ 
+  // use useViewerState to access to viewer state properties such as openSeadragonViewer, etc
+  const viewerState = useViewerState();
+  const { openSeadragonViewer, activeManifest } = viewerState;
+ 
+  // use useViewerDispatch to update viewer state
+  const dispatch: any = useViewerDispatch();
+ 
+  function clickHandler() {
+    dispatch({
+      type: "updateOSDImageLoaded",
+      OSDImageLoaded: false,
+    });
+  }
+ 
+  return (
+    <button
+      onClick={clickHandler}
+      style={{
+        backgroundColor: "var(--colors-primary)",
+        borderRadius: "2rem",
+        width: "2rem",
+        margin: "0px 0px 0px 0.618rem",
+      }}
+    >
+      <b>P</b>
+    </button>
+  );
+}
+ 
+// PluginInfoPanel.tsx
+ 
+export default function PluginInfoPanel(props) {
+  const {
+    canvas,
+    useViewerDispatch,
+    useViewerState,
+ 
+    // componentProps
+    objectId,
+  } = props;
+ 
+  return (
+    <div style={{ padding: "0px 1.618rem 2rem" }}>
+      <p>Plugin Info Panel</p>
+      <p>objectId: {objectId}</p>
+    </div>
+  );
+}
+ 
+// App.tsx
+ 
+import PluginButton from "PluginButton";
+import PluginInfoPanel from "PluginInfoPanel";
+ 
+export default function App() {
+  return (
+    <Viewer
+      iiifContent="https://iiif.io/api/cookbook/recipe/0001-mvm-image/manifest.json"
+      plugins={[
+        {
+          id: "Demo",
+          imageViewer: {
+            controls: {
+              component: PluginButton,
+            },
+          },
+          informationPanel: {
+            component: PluginInfoPanel,
+            label: { none: ["My Plugin"] },
+            componentProps: {
+              objectId: 456,
+            },
+          },
+        },
+      ]}
+    />
+  );
+}
+

If the imageViewer.controls.component and informationPanel.component need to share state, wrap the Viewer in a context provider that is provided by the plugin.

+
import PluginButton from "PluginButton";
+import PluginInfoPanel from "PluginInfoPanel";
+import { PluginProvider } from "PluginContext";
+ 
+export default function App() {
+  return (
+    <PluginProvider>
+      <Viewer
+        iiifContent="https://iiif.io/api/cookbook/recipe/0001-mvm-image/manifest.json"
+        plugins={[
+          {
+            id: "Demo",
+            imageViewer: {
+              controls: {
+                component: PluginButton,
+              },
+            },
+            informationPanel: {
+              component: PluginInfoPanel,
+              label: { none: ["My Plugin"] },
+              componentProps: {
+                objectId: 456,
+              },
+            },
+          },
+        ]}
+      />
+    </PluginProvider>
+  );
+}

Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source.
\ No newline at end of file diff --git a/docs/viewer/contentsearch.html b/docs/viewer/contentsearch.html index 2ff4202d..56280461 100644 --- a/docs/viewer/contentsearch.html +++ b/docs/viewer/contentsearch.html @@ -11,10 +11,10 @@ --nextra-primary-hue: 209deg; --nextra-primary-saturation: 100%; } -

Viewer

+

Viewer


Docs

Content search.

Type in anything in the search field, and click the search button or type return. This demo will show the search results for "Berliner". Click on any of search results, and Clover will zoom and pan to that search result.

Due to the fact that the Clover documentation site is a statically generated, search will only return results for "Berliner" because the search service returns a static content search manifest. In a fully functional site, the search service will return a dynamic content search manifest based on the entered search words.

-

Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source.
\ No newline at end of file +

Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source.
\ No newline at end of file diff --git a/docs/viewer/demo.html b/docs/viewer/demo.html index d3adb261..5817bcca 100644 --- a/docs/viewer/demo.html +++ b/docs/viewer/demo.html @@ -11,10 +11,10 @@ --nextra-primary-hue: 209deg; --nextra-primary-saturation: 100%; } -

Viewer

+

Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source.
\ No newline at end of file +

Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source.
\ No newline at end of file diff --git a/index.html b/index.html index d0d7b540..fb94c136 100644 --- a/index.html +++ b/index.html @@ -11,6 +11,6 @@ --nextra-primary-hue: 209deg; --nextra-primary-saturation: 100%; } -
+

Showcase IIIF Manifests
as interoperable web content.

Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source.

Get Started
-

Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source.
\ No newline at end of file +

Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source.
\ No newline at end of file diff --git a/media/images/pluginUI.png b/media/images/pluginUI.png new file mode 100644 index 00000000..62deb4f8 Binary files /dev/null and b/media/images/pluginUI.png differ