diff --git a/404.html b/404.html index 7410f37c..9cafd791 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/chunks/912.972bcb6984e33609.js b/_next/static/chunks/779.55f0ab6254873d44.js similarity index 85% rename from _next/static/chunks/912.972bcb6984e33609.js rename to _next/static/chunks/779.55f0ab6254873d44.js index a1813af4..e970a243 100644 --- a/_next/static/chunks/912.972bcb6984e33609.js +++ b/_next/static/chunks/779.55f0ab6254873d44.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[912],{3912:function(e,t,n){n.r(t),n.d(t,{default:function(){return t1}});var i,o,r,a=n(1527),l=n(959),s=n(3832),d=n(3631),c=n(2950);let u={annotationOverlays:{backgroundColor:"#ff6666",borderColor:"#990000",borderType:"solid",borderWidth:"1px",opacity:"0.5",renderOverlays:!0,zoomLevel:2},background:"transparent",canvasBackgroundColor:"#6662",canvasHeight:"500px",ignoreCaptionLabels:[],informationPanel:{vtt:{autoScroll:{enabled:!0,settings:{behavior:"smooth",block:"center"}}},open:!0,renderAbout:!0,renderSupplementing:!0,renderToggle:!0,renderAnnotation:!0},openSeadragon:{},requestHeaders:{"Content-Type":"application/json"},showDownload:!0,showIIIFBadge:!0,showTitle:!0,withCredentials:!1};function p(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:n}=e,i=["auto","instant","smooth"],o=["center","end","nearest","start"];if(!i.includes(t))throw TypeError("'".concat(t,"' not in ").concat(i.join(" | ")));if(!o.includes(n))throw TypeError("'".concat(n,"' not in ").concat(o.join(" | ")))}(t.settings),t}let h=p(null==u?void 0:null===(o=u.informationPanel)||void 0===o?void 0:null===(i=o.vtt)||void 0===i?void 0:i.autoScroll),m={activeCanvas:"",activeManifest:"",collection:{},configOptions:u,customDisplays:[],isAutoScrollEnabled:h.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,openSeadragonViewer:null,viewerId:(0,c.Z)()},g=l.createContext(m),f=l.createContext(m);function x(e,t){switch(t.type){case"updateActiveCanvas":return t.canvasId||(t.canvasId=""),{...e,activeCanvas:t.canvasId};case"updateActiveManifest":return{...e,activeManifest:t.manifestId};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,d.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 v=e=>{let{initialState:t=m,children:n}=e,[i,o]=(0,l.useReducer)(x,t);return(0,a.jsx)(g.Provider,{value:i,children:(0,a.jsx)(f.Provider,{value:o,children:n})})};function b(){let e=l.useContext(g);if(void 0===e)throw Error("useViewerState must be used within a ViewerProvider");return e}function j(){let e=l.useContext(f);if(void 0===e)throw Error("useViewerDispatch must be used within a ViewerProvider");return e}var y=n(603),w=n(4707);let C=(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}}):[]};var S=n(8448),k=n(2196),z=n(5455);let I=(0,z.zo)("div",{position:"relative",zIndex:"0"}),A=(0,z.zo)("div",{display:"flex",flexDirection:"row",flexGrow:"1",overflow:"hidden","@sm":{flexDirection:"column"}}),E=(0,z.zo)("div",{display:"flex",flexDirection:"column",flexGrow:"1",flexShrink:"1",width:"61.8%","@sm":{width:"100%"}}),M=(0,z.zo)(y.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"}}}),$=(0,z.zo)(y.VY,{width:"100%",display:"flex"}),T=(0,z.zo)("aside",{display:"flex",flexGrow:"1",flexShrink:"0",width:"38.2%",maxHeight:"100%","@sm":{width:"100%"}}),L=(0,z.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(A)]:{flexGrow:"1"},["& ".concat(E)]:{flexGrow:"0"}}},"@sm":{padding:"0"},"&[data-information-panel-open='true']":{"@sm":{position:"fixed",height:"100%",width:"100%",top:"0",left:"0",zIndex:"2500000000",["& ".concat(I)]:{display:"none"},["& ".concat(M)]:{margin:"1rem"},["& ".concat($)]:{height:"100%"}}}});var R=n(3367);let F=(0,z.zo)(R.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"}}),H=(0,z.zo)(R.aV,{display:"flex",flexGrow:"0",margin:"0 1.618rem",borderBottom:"4px solid #6663","@sm":{margin:"0 1rem"}}),O=(0,z.zo)(R.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"}}}),V=(0,z.zo)(R.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"}}),P=(0,z.zo)(e=>{let{handleScroll:t,children:n,className:i}=e;return(0,a.jsx)("div",{className:i,onScroll:t,children:n})},{position:"relative",height:"100%",width:"100%",overflowY:"scroll"}),B={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"},W=(0,z.zo)("button",{textAlign:"left","&:hover":{color:"$accent"}}),N=(0,z.zo)("div",{display:"flex",flexDirection:"column",width:"100%"}),G=(0,z.zo)("div",{...B}),_=(0,z.zo)("div",{"&:hover":{color:"$accent"}});var D=e=>{let{value:t,handleClick:n}=e;return(0,a.jsx)(W,{onClick:n,children:t})},U=e=>{let{value:t,handleClick:n}=e;return(0,a.jsx)(_,{dangerouslySetInnerHTML:{__html:t},onClick:n})},q=()=>{function e(e){return e.map(e=>{let t=e.identifier||(0,c.Z)();return{...e,identifier:t}})}return{addIdentifiersToParsedCues:e,createNestedCues:function(t){let n=[],i=[];for(let r of e(t)){for(;i.length>0&&i[i.length-1].end<=r.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(r),i.push(r)}else n.push(r),i.push(r)}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)}}},Z=n(6427);let Y=(0,z.F4)({from:{transform:"rotate(360deg)"},to:{transform:"rotate(0deg)"}}),J=(0,z.zo)(Z.fC,{display:"flex",flexDirection:"column",width:"100%"}),X=(0,z.zo)(Z.ck,{...B,"@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:Y,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:Y,boxSizing:"content-box","@sm":{content:"unset"}}}}),Q=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 K=e=>{var t,n;let{label:i,start:o,end:r}=e,s=j(),{configOptions:c,isAutoScrollEnabled:u,isUserScrolling:p}=b(),h=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,l.useState)(!1),f=(0,l.useRef)(null),x=document.getElementById("clover-iiif-video");return(0,l.useEffect)(()=>(null==x||x.addEventListener("timeupdate",()=>{let{currentTime:e}=x;g(o<=e&&edocument.removeEventListener("timeupdate",()=>{})),[r,o,x]),(0,l.useEffect)(()=>{if(u&&m&&f.current&&!p){let n=f.current;if(n&&n instanceof HTMLElement){let i=Q(n);if(i&&i instanceof HTMLElement){var e,t;let o;switch(null==h?void 0:null===(e=h.settings)||void 0===e?void 0:e.block){case"center":let r=i.getBoundingClientRect();o=n.offsetTop+n.offsetHeight-Math.floor((r.bottom-r.top)/2);break;case"end":o=n.offsetTop+n.offsetHeight-(i.clientHeight-n.clientHeight)+2;break;default:o=n.offsetTop-2}s({type:"updateAutoScrolling",isAutoScrolling:!0}),i.scrollTo({top:o,left:0,behavior:null==h?void 0:null===(t=h.settings)||void 0===t?void 0:t.behavior}),setTimeout(()=>s({type:"updateAutoScrolling",isAutoScrolling:!1}),750)}}}},[h,m,p,u,s]),(0,a.jsxs)(X,{ref:f,"aria-checked":m,"data-testid":"information-panel-cue",onClick:()=>{x&&(x.pause(),x.currentTime=o,x.play())},value:i,children:[i,(0,a.jsx)("strong",{children:(0,d.rJ)(o)})]})};let ee=(0,z.zo)("ul",{listStyle:"none",paddingLeft:"1rem",position:"relative","&&:first-child":{paddingLeft:"0"},"& li ul":{["& ".concat(X)]:{backgroundColor:"unset","&::before":{content:"none"},"&::after":{content:"none"}}},"&:first-child":{margin:"0 0 1.618rem"}}),et=e=>{let{items:t}=e;return(0,a.jsx)(ee,{children:t.map(e=>{let{text:t,start:n,end:i,children:o,identifier:r}=e;return(0,a.jsxs)("li",{children:[(0,a.jsx)(K,{label:t,start:n,end:i}),o&&(0,a.jsx)(et,{items:o})]},r)})})},en=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 ei=n(3836),eo=e=>{let{label:t,vttUri:n}=e,[i,o]=l.useState([]),{createNestedCues:r,orderCuesByTime:s}=q(),[d,c]=l.useState();return(0,l.useEffect)(()=>{n&&fetch(n,{headers:{"Content-Type":"text/plain",Accept:"application/json"}}).then(e=>e.text()).then(e=>{o(r(s((0,ei.parse)(e).cues)))}).catch(e=>{console.error(n,e.toString()),c(e)})},[n]),(0,a.jsxs)(J,{"data-testid":"annotation-item-vtt","aria-label":"navigate ".concat(en(t,"en")),children:[d&&(0,a.jsxs)("div",{"data-testid":"error-message",children:["Network Error: ",d.toString()]}),(0,a.jsx)(et,{items:i})]})},er=n(5500),ea=n(6543),el=e=>{let{caption:t,handleClick:n,imageUri:i}=e;return(0,a.jsxs)(W,{onClick:n,children:[(0,a.jsx)("img",{src:i,alt:"A visual annotation for ".concat(t)}),(0,a.jsx)("span",{children:t})]})},es=e=>{var t,n;let{annotation:i}=e,{target:o}=i,{openSeadragonViewer:r,vault:l,activeCanvas:s,configOptions:d}=b(),c=i.body.map(e=>l.get(e.id)),u=(null===(t=c.find(e=>e.format))||void 0===t?void 0:t.format)||"",p=(null===(n=c.find(e=>e.value))||void 0===n?void 0:n.value)||"",h=l.get({id:s,type:"Canvas"});function m(){var e;if(!o)return;let t=(null===(e=d.annotationOverlays)||void 0===e?void 0:e.zoomLevel)||1,n=(0,er.L)(o),{point:i,rect:a,svg:l}=n;if(i||a||l){let e=(0,ea.cW)(h,n,t);null==r||r.viewport.fitBounds(e)}}return(0,a.jsx)(G,{children:function(){var e,t;switch(u){case"text/plain":return(0,a.jsx)(D,{value:p,handleClick:m});case"text/html":return(0,a.jsx)(U,{value:p,handleClick:m});case"text/vtt":return(0,a.jsx)(eo,{label:c[0].label,vttUri:c[0].id||""});case null===(e=u.match(/^image\//))||void 0===e?void 0:e.input:let n=(null===(t=c.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,a.jsx)(el,{caption:p,handleClick:m,imageUri:n});default:return(0,a.jsx)(D,{value:p,handleClick:m})}}()})},ed=e=>{var t;let{annotationPage:n}=e,{vault:i}=b();if(!n||!n.items||(null===(t=n.items)||void 0===t?void 0:t.length)===0)return(0,a.jsx)(a.Fragment,{});let o=n.items.map(e=>i.get(e.id));return o?(0,a.jsx)(N,{"data-testid":"annotation-page",children:null==o?void 0:o.map(e=>(0,a.jsx)(es,{annotation:e},e.id))}):(0,a.jsx)(a.Fragment,{})};let ec=(0,z.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"}}}),eu=(0,z.zo)("div",{position:"relative",width:"100%",height:"100%",zIndex:"0"});var ep=n(7184),eh=e=>{let{homepage:t}=e;return(null==t?void 0:t.length)===0?(0,a.jsx)(a.Fragment,{}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"manifest-property-title",children:"Homepage"}),(0,a.jsx)(ep.bw,{homepage:t})]})},em=e=>{let{id:t,htmlLabel:n,parent:i="manifest"}=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"manifest-property-title",children:n}),(0,a.jsx)("a",{href:t,target:"_blank",id:"iiif-".concat(i,"-id"),children:t})]})},eg=e=>{let{metadata:t,parent:n="manifest"}=e;return t?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(ep.SF,{metadata:t,id:"iiif-".concat(n,"-metadata")})}):(0,a.jsx)(a.Fragment,{})},ef=e=>{let{rendering:t}=e;return(null==t?void 0:t.length)===0?(0,a.jsx)(a.Fragment,{}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"manifest-property-title",children:"Alternate formats"}),(0,a.jsx)(ep.Oy,{rendering:t})]})},ex=e=>{let{requiredStatement:t,parent:n="manifest"}=e;return t?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(ep.bT,{requiredStatement:t,id:"iiif-".concat(n,"-required-statement")})}):(0,a.jsx)(a.Fragment,{})},ev=e=>{let{rights:t}=e;return t?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"manifest-property-title",children:"Rights"}),(0,a.jsx)("a",{href:t,target:"_blank",children:t})]}):(0,a.jsx)(a.Fragment,{})},eb=e=>{let{seeAlso:t}=e;return(null==t?void 0:t.length)===0?(0,a.jsx)(a.Fragment,{}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"manifest-property-title",children:"See Also"}),(0,a.jsx)(ep.QZ,{seeAlso:t})]})},ej=e=>{let{summary:t,parent:n="manifest"}=e;return t?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(ep.ER,{summary:t,as:"p",id:"iiif-".concat(n,"-summary")})}):(0,a.jsx)(a.Fragment,{})},ey=e=>{let{label:t,thumbnail:n}=e;return(null==n?void 0:n.length)===0?(0,a.jsx)(a.Fragment,{}):(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(ep.pl,{altAsLabel:t||{none:["resource"]},thumbnail:n,style:{backgroundColor:"#6663",objectFit:"cover"}})})},ew=()=>{let{activeManifest:e,vault:t}=b(),[n,i]=(0,l.useState)(),[o,r]=(0,l.useState)([]),[s,d]=(0,l.useState)([]),[c,u]=(0,l.useState)([]),[p,h]=(0,l.useState)([]);return((0,l.useEffect)(()=>{var n,o,a,l;let s=t.get(e);i(s),(null===(n=s.homepage)||void 0===n?void 0:n.length)>0&&r(t.get(s.homepage)),(null===(o=s.seeAlso)||void 0===o?void 0:o.length)>0&&d(t.get(s.seeAlso)),(null===(a=s.rendering)||void 0===a?void 0:a.length)>0&&u(t.get(s.rendering)),(null===(l=s.thumbnail)||void 0===l?void 0:l.length)>0&&h(t.get(s.thumbnail))},[e,t]),n)?(0,a.jsx)(eu,{children:(0,a.jsxs)(ec,{children:[(0,a.jsx)(ey,{thumbnail:p,label:n.label}),(0,a.jsx)(ej,{summary:n.summary}),(0,a.jsx)(eg,{metadata:n.metadata}),(0,a.jsx)(ex,{requiredStatement:n.requiredStatement}),(0,a.jsx)(ev,{rights:n.rights}),(0,a.jsx)(eh,{homepage:o}),(0,a.jsx)(eb,{seeAlso:s}),(0,a.jsx)(ef,{rendering:c}),(0,a.jsx)(em,{id:n.id,htmlLabel:"IIIF Manifest"})]})}):(0,a.jsx)(a.Fragment,{})},eC=e=>{let{activeCanvas:t,annotationResources:n}=e,i=j(),{isAutoScrolling:o,configOptions:{informationPanel:r},isUserScrolling:s}=b(),[d,c]=(0,l.useState)(),u=null==r?void 0:r.renderAbout,p=null==r?void 0:r.renderAnnotation;return(0,l.useEffect)(()=>{u?c("manifest-about"):n&&(null==n?void 0:n.length)>0&&!u&&c(n[0].id)},[t,u,n]),(0,a.jsxs)(F,{"data-testid":"information-panel",defaultValue:d,onValueChange:e=>{c(e)},orientation:"horizontal",value:d,className:"clover-viewer-information-panel",children:[(0,a.jsxs)(H,{"aria-label":"select chapter","data-testid":"information-panel-list",children:[u&&(0,a.jsx)(O,{value:"manifest-about",children:"About"}),p&&n&&n.map((e,t)=>(0,a.jsx)(O,{value:e.id,children:(0,a.jsx)(ep.__,{label:e.label})},t))]}),(0,a.jsxs)(P,{handleScroll:function(){if(!o){clearTimeout(s);let e=setTimeout(()=>{i({type:"updateUserScrolling",isUserScrolling:void 0})},1500);i({type:"updateUserScrolling",isUserScrolling:e})}},children:[u&&(0,a.jsx)(V,{value:"manifest-about",children:(0,a.jsx)(ew,{})}),p&&n&&n.map(e=>(0,a.jsx)(V,{value:e.id,children:(0,a.jsx)(ed,{annotationPage:e})},e.id))]})]})},eS=n(8640);let ek=(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}},ez=(0,z.zo)("div",{position:"absolute",right:"1rem",top:"1rem",display:"flex",justifyContent:"flex-end",zIndex:"1"}),eI=(0,z.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"}}),eA=(0,z.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"}}}),eE=(0,z.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"}}),eM=(0,z.zo)("div",{display:"flex",position:"relative",zIndex:"1",width:"100%",padding:"0",transition:"$all",variants:{isToggle:{true:{paddingTop:"2.618rem",["& ".concat(ez)]:{width:"calc(100% - 2rem)","@sm":{width:"calc(100% - 2rem)"}}}}}});var e$=(e,t)=>{(0,l.useEffect)(()=>{function n(n){n.key===e&&t()}return window.addEventListener("keyup",n),()=>window.removeEventListener("keyup",n)},[])};let eT=()=>(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:[(0,a.jsx)("title",{children:"Arrow Back"}),(0,a.jsx)("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M244 400L100 256l144-144M120 256h292"})]}),eL=()=>(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:[(0,a.jsx)("title",{children:"Arrow Forward"}),(0,a.jsx)("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M268 112l144 144-144 144M392 256H100"})]}),eR=()=>(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:[(0,a.jsx)("title",{children:"Close"}),(0,a.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"})]}),eF=()=>(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:[(0,a.jsx)("title",{children:"Search"}),(0,a.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 eH=e=>{let{handleCanvasToggle:t,handleFilter:n,activeIndex:i,canvasLength:o}=e,[r,s]=(0,l.useState)(!1),[d,c]=(0,l.useState)(!1),[u,p]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{0===i?p(!0):p(!1),i===o-1?c(!0):c(!1)},[i,o]),e$("Escape",()=>{s(!1),n("")}),(0,a.jsx)(eM,{isToggle:r,children:(0,a.jsxs)(ez,{children:[r&&(0,a.jsx)(eI,{autoFocus:!0,onChange:e=>n(e.target.value),placeholder:"Search"}),!r&&(0,a.jsxs)(eE,{children:[(0,a.jsx)(eA,{onClick:()=>t(-1),disabled:u,type:"button",children:(0,a.jsx)(eT,{})}),(0,a.jsxs)("span",{children:[i+1," of ",o]}),(0,a.jsx)(eA,{onClick:()=>t(1),disabled:d,type:"button",children:(0,a.jsx)(eL,{})})]}),(0,a.jsx)(eA,{onClick:()=>{s(e=>!e),n("")},type:"button",children:r?(0,a.jsx)(eR,{}):(0,a.jsx)(eF,{})})]})})};let eO=(0,z.zo)(Z.fC,{display:"flex",flexDirection:"row",flexGrow:"1",padding:"1.618rem",overflowX:"scroll",position:"relative",zIndex:"0"}),eV=(0,z.zo)("svg",{display:"inline-flex",variants:{isLarge:{true:{height:"4rem",width:"4rem"}},isMedium:{true:{height:"2rem",width:"2rem"}},isSmall:{true:{height:"1rem",width:"1rem"}}}}),eP=e=>(0,a.jsx)(eV,{...e,"data-testid":"icon-svg",role:"img",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:e.children});eP.Title=e=>{let{children:t}=e;return(0,a.jsx)("title",{children:t})},eP.Add=()=>(0,a.jsx)("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M256 112v288M400 256H112"}),eP.Audio=()=>(0,a.jsxs)(a.Fragment,{children:[(0,a.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,a.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,a.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"})]}),eP.Close=()=>(0,a.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"}),eP.Download=()=>(0,a.jsxs)(a.Fragment,{children:[(0,a.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,a.jsx)("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M176 272l80 80 80-80M256 48v288"})]}),eP.Image=()=>(0,a.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"}),eP.Video=()=>(0,a.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 eB=n(2338);let eW=(0,z.F4)({"0%":{opacity:0,transform:"translateY(1rem)"},"100%":{opacity:1,transform:"translateY(0)"}}),eN=(0,z.F4)({"0%":{opacity:0,transform:"translateY(1rem)"},"100%":{opacity:1,transform:"translateY(0)"}}),eG=(0,z.zo)(eB.Eh,{fill:"$secondaryAlt"}),e_=(0,z.zo)(eB.x8,{position:"absolute",right:"0",top:"0",padding:"0.5rem",margin:"0",cursor:"pointer",border:"none",background:"none",fill:"inherit","&:hover":{opacity:"0.75"}}),eD=(0,z.zo)(eB.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:eN},'&[data-side="bottom"]':{animationName:eW},'&[data-align="end"]':{["& ".concat(eG)]:{margin:"0 0.7rem"}}}),eU=(0,z.zo)(eB.xz,{display:"inline-flex",padding:"0.5rem 0",margin:"0 0.5rem 0 0",cursor:"pointer",border:"none",background:"none","> button, > span":{margin:"0"}}),eq=(0,z.zo)(eB.fC,{boxSizing:"content-box"}),eZ=e=>{let{children:t}=e;return(0,a.jsx)(eq,{children:t})};eZ.Trigger=e=>(0,a.jsx)(eU,{...e,children:e.children}),eZ.Content=e=>(0,a.jsxs)(eD,{...e,children:[(0,a.jsx)(eG,{}),(0,a.jsx)(e_,{children:(0,a.jsx)(eP,{isSmall:!0,children:(0,a.jsx)(eP.Close,{})})}),e.children]});let eY=(0,z.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"}}}}),eJ=(0,z.zo)("span",{display:"flex"}),eX=(0,z.zo)("span",{display:"flex",width:"1.2111rem",height:"0.7222rem"}),eQ=(0,z.zo)("span",{display:"inline-flex",marginLeft:"5px",marginBottom:"-1px"}),eK=(0,z.zo)(Z.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(eJ)]:{position:"absolute",right:"0",bottom:"0",["& ".concat(eY)]:{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(eJ)]:{["& ".concat(eY)]:{backgroundColor:"$accent"}}}},figcaption:{fontWeight:"700"}}}),e0=e=>{let{type:t}=e;switch(t){case"Sound":return(0,a.jsx)(eP.Audio,{});case"Image":default:return(0,a.jsx)(eP.Image,{});case"Video":return(0,a.jsx)(eP.Video,{})}};var e1=e=>{let{canvas:t,canvasIndex:n,isActive:i,thumbnail:o,type:r,handleChange:l}=e;return(0,a.jsx)(eK,{"aria-checked":i,"data-testid":"media-thumbnail","data-canvas":n,onClick:()=>l(t.id),value:t.id,children:(0,a.jsxs)("figure",{children:[(0,a.jsxs)("div",{children:[(null==o?void 0:o.id)&&(0,a.jsx)("img",{src:o.id,alt:(null==t?void 0:t.label)?en(t.label):""}),(0,a.jsx)(eJ,{children:(0,a.jsxs)(eY,{isIcon:!0,"data-testid":"thumbnail-tag",children:[(0,a.jsx)(eX,{}),(0,a.jsx)(eP,{"aria-label":r,children:(0,a.jsx)(e0,{type:r})}),["Video","Sound"].includes(r)&&(0,a.jsx)(eQ,{children:(0,d.rJ)(t.duration)})]})})]}),(null==t?void 0:t.label)&&(0,a.jsx)("figcaption",{"data-testid":"fig-caption",children:(0,a.jsx)(ep.__,{label:t.label})})]})})};let e2=e=>e.body?e.body.type:"Image";var e4=e=>{let{items:t}=e,n=j(),{activeCanvas:i,vault:o}=b(),[r,s]=(0,l.useState)(""),[d,c]=(0,l.useState)([]),[u,p]=(0,l.useState)(0),h=l.useRef(null),m=e=>{i!==e&&n({type:"updateActiveCanvas",canvasId:e})};return(0,l.useEffect)(()=>{if(!d.length){let e=["Image","Sound","Video"];c(t.map(t=>(0,eS.g)(o,t,"painting",e)).filter(e=>e.annotations.length>0))}},[t,d.length,o]),(0,l.useEffect)(()=>{d.forEach((e,t)=>{(null==e?void 0:e.canvas)&&e.canvas.id===i&&p(t)})},[i,d]),(0,l.useEffect)(()=>{let e=document.querySelector('[data-canvas="'.concat(u,'"]'));if(e instanceof HTMLElement&&h.current){let t=e.offsetLeft-h.current.offsetWidth/2+e.offsetWidth/2;h.current.scrollTo({left:t,behavior:"smooth"})}},[u]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(eH,{handleFilter:e=>s(e),handleCanvasToggle:e=>{let t=d[u+e];(null==t?void 0:t.canvas)&&m(t.canvas.id)},activeIndex:u,canvasLength:d.length}),(0,a.jsx)(eO,{"aria-label":"select item","data-testid":"media",ref:h,children:d.filter(e=>{var t;if(null===(t=e.canvas)||void 0===t?void 0:t.label){let t=en(e.canvas.label);if(Array.isArray(t))return t[0].toLowerCase().includes(r.toLowerCase())}}).map((e,t)=>{var n,r;return(0,a.jsx)(e1,{canvas:e.canvas,canvasIndex:t,handleChange:m,isActive:i===(null==e?void 0:null===(n=e.canvas)||void 0===n?void 0:n.id),thumbnail:ek(o,e,200,200),type:e2(e.annotations[0])},null==e?void 0:null===(r=e.canvas)||void 0===r?void 0:r.id)})})]})};let e3=(0,z.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 e5=n(515);let e6=(0,z.zo)(e5.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%)"}}]}),e8=(0,z.zo)("div",{position:"relative",display:"flex",flexDirection:"column",flexGrow:"1",flexShrink:"1",gap:"1rem",zIndex:"0",overflow:"hidden","&:hover":{["".concat(e6)]:{backgroundColor:"$accent"},["".concat(e3)]:{backgroundColor:"#6662"}}}),e7=(0,z.zo)("div",{width:"100%",height:"100%"});var e9=n(2016);let te=(0,z.zo)("svg",{height:"19px",color:"$accent",fill:"$accent",stroke:"$accent",display:"flex",margin:"0.25rem 0.85rem"}),tt=(0,z.zo)(e9.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"}}),tn=(0,z.zo)(e9.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"}),ti=(0,z.zo)(e9.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"}}),to=(0,z.zo)(e9.__,{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"}),tr=(0,z.zo)(e9.fC,{position:"relative",zIndex:"5",width:"100%"});var ta=e=>{let{direction:t,title:n}=e;return(0,a.jsxs)(te,{xmlns:"http://www.w3.org/2000/svg",focusable:"false",viewBox:"0 0 512 512",role:"img",children:[(0,a.jsx)("title",{children:n}),"up"===t&&(0,a.jsx)(()=>(0,a.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,a.jsx)(()=>(0,a.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"}),{})]})},tl=e=>{let{children:t,label:n,maxHeight:i,onValueChange:o,value:r}=e;return(0,a.jsxs)(tr,{onValueChange:o,value:r,children:[(0,a.jsxs)(tt,{"data-testid":"select-button",children:[(0,a.jsx)(e9.ki,{"data-testid":"select-button-value"}),(0,a.jsx)(e9.GV,{children:(0,a.jsx)(ta,{direction:"down",title:"select"})})]}),(0,a.jsx)(e9.ue,{children:(0,a.jsxs)(tn,{css:{maxHeight:"".concat(i," !important")},"data-testid":"select-content",children:[(0,a.jsx)(e9.Pn,{children:(0,a.jsx)(ta,{direction:"up",title:"scroll up for more"})}),(0,a.jsx)(e9.Q_,{children:(0,a.jsxs)(e9.DI,{children:[n&&(0,a.jsx)(to,{children:(0,a.jsx)(ep.__,{"data-testid":"select-label",label:n})}),t]})}),(0,a.jsx)(e9.Jk,{children:(0,a.jsx)(ta,{direction:"down",title:"scroll down for more"})})]})})]})},ts=e=>(0,a.jsxs)(ti,{...e,children:[e.thumbnail&&(0,a.jsx)(ep.pl,{thumbnail:e.thumbnail}),(0,a.jsx)(e9.S_,{children:(0,a.jsx)(ep.__,{label:e.label})}),(0,a.jsx)(e9.o6,{})]}),td=n(5129),tc=e=>{let{isMedia:t,label:n,placeholderCanvas:i,setIsInteractive:o}=e,{vault:r}=b(),l=(0,w.G)(r,i),s=l?l[0]:void 0,d=n?en(n):["placeholder image"];return(0,a.jsx)(e3,{onClick:()=>o(!0),isMedia:t,className:"clover-viewer-placeholder",children:(0,a.jsx)("img",{src:(null==s?void 0:s.id)||"",alt:d.join(),height:null==s?void 0:s.height,width:null==s?void 0:s.width})})},tu=n(2089);let tp=(0,z.zo)("canvas",{position:"absolute",width:"100%",height:"100%",zIndex:"0"}),th=l.forwardRef((e,t)=>{let n=l.useRef(null),i=(0,l.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 r=new AudioContext,a=r.createMediaElementSource(o),l=r.createAnalyser(),s=n.current;if(!s)return;s.width=o.offsetWidth,s.height=o.offsetHeight;let d=s.getContext("2d");a.connect(l),l.connect(r.destination),l.fftSize=256;let c=l.frequencyBinCount,u=new Uint8Array(c);setInterval(function(){!function(e,t,n,i,o,r){let a;let l=o/n*2.6,s=0;e.getByteFrequencyData(i),t.fillStyle="#000000",t.fillRect(0,0,o,r);for(let e=0;e{t&&t.current&&(t.current.onplay=i)},[i,t]),(0,a.jsx)(tp,{ref:n,role:"presentation"})}),tm=(0,z.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 tg=e=>{let{resource:t,ignoreCaptionLabels:n}=e,i=en(t.label,"en");return Array.isArray(i)&&i.some(e=>n.includes(e))?null:(0,a.jsx)("track",{src:t.id,label:Array.isArray(i)?i[0]:i,srcLang:"en","data-testid":"player-track"},t.id)};let tf=["application/vnd.apple.mpegurl","vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"];var tx=e=>{let{allSources:t,annotationResources:n,painting:i}=e,[o,r]=l.useState(0),[s,d]=l.useState(),c=l.useRef(null),u=(null==i?void 0:i.type)==="Sound",{activeCanvas:p,configOptions:h,vault:m}=b();return(0,l.useEffect)(()=>{if(!i.id||!c.current)return;if(null==c?void 0:c.current){let e=c.current;e.src=i.id,e.load()}if("m3u8"!==i.id.split(".").pop()&&i.format&&!tf.includes(i.format))return;let e=new tu.ZP({xhrSetup:function(e,t){e.withCredentials=!!h.withCredentials}});return e.attachMedia(c.current),e.on(tu.ZP.Events.MEDIA_ATTACHED,function(){e.loadSource(i.id)}),e.on(tu.ZP.Events.ERROR,function(t,n){if(n.fatal)switch(n.type){case tu.ZP.ErrorTypes.NETWORK_ERROR:console.error("fatal ".concat(t," network error encountered, try to recover")),e.startLoad();break;case tu.ZP.ErrorTypes.MEDIA_ERROR:console.error("fatal ".concat(t," media error encountered, try to recover")),e.recoverMediaError();break;default:e.destroy()}}),()=>{if(e&&c.current){let t=c.current;e.detachMedia(),e.destroy(),t.currentTime=0}}},[h.withCredentials,i.id]),(0,l.useEffect)(()=>{var e,t,n,i;let r=m.get(p),a=(null===(e=r.accompanyingCanvas)||void 0===e?void 0:e.id)?(0,w.G)(m,null===(t=r.accompanyingCanvas)||void 0===t?void 0:t.id):null,l=(null===(n=r.placeholderCanvas)||void 0===n?void 0:n.id)?(0,w.G)(m,null===(i=r.placeholderCanvas)||void 0===i?void 0:i.id):null;a&&l?0===o?d(l[0].id):d(a[0].id):(a&&d(a[0].id),l&&d(l[0].id))},[p,o,m]),(0,l.useEffect)(()=>{if(null==c?void 0:c.current){let e=c.current;return null==e||e.addEventListener("timeupdate",()=>r(e.currentTime)),()=>document.removeEventListener("timeupdate",()=>{})}},[]),(0,a.jsxs)(tm,{css:{backgroundColor:h.canvasBackgroundColor,maxHeight:h.canvasHeight,position:"relative"},"data-testid":"player-wrapper",className:"clover-viewer-player-wrapper",children:[(0,a.jsxs)("video",{id:"clover-iiif-video",ref:c,controls:!0,height:i.height,width:i.width,crossOrigin:"anonymous",poster:s,style:{maxHeight:h.canvasHeight,position:"relative",zIndex:"1"},children:[t.map(e=>(0,a.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=>{m.get(e.id).body.forEach(e=>{let n=m.get(e.id);t.push(n)})}),t.map(e=>(0,a.jsx)(tg,{resource:e,ignoreCaptionLabels:h.ignoreCaptionLabels||[]},e.id))}),"Sorry, your browser doesn't support embedded videos."]},i.id),u&&(0,a.jsx)(th,{ref:c})]})};let tv=()=>(0,a.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,a.jsx)("title",{id:"close-svg-title",children:"close"}),(0,a.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"})]}),tb=e=>{let{isMedia:t}=e;return(0,a.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,a.jsx)("title",{id:"open-svg-title",children:"open"}),t?(0,a.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,a.jsxs)(a.Fragment,{children:[(0,a.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,a.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 tj=e=>{let{handleToggle:t,isInteractive:n,isMedia:i}=e;return(0,a.jsx)(e6,{onClick:t,isInteractive:n,isMedia:i,"data-testid":"placeholder-toggle",children:n?(0,a.jsx)(tv,{}):(0,a.jsx)(tb,{isMedia:i})})},ty=e=>{var t,n,i,o,r,s;let{activeCanvas:c,annotationResources:u,isMedia:p,painting:h}=e,[m,g]=l.useState(0),[f,x]=l.useState(!1),{configOptions:v,customDisplays:y,openSeadragonViewer:w,vault:C,viewerId:S}=b(),k=j(),z=C.get(c),I=null==z?void 0:null===(t=z.placeholderCanvas)||void 0===t?void 0:t.id,A=!!I,E=(null==h?void 0:h.length)>1,M=I&&!f&&!p,$="".concat(S,"-").concat((0,d.un)(c+m)),T=y.find(e=>{let t=!1,{canvasId:n,paintingFormat:i}=e.target;if(Array.isArray(n)&&n.length>0&&(t=n.includes(c)),Array.isArray(i)&&i.length>0){var o;let e=(null===(o=h[m])||void 0===o?void 0:o.format)||"";t=!!(e&&i.includes(e))}return t}),L=[];null===(i=u[0])||void 0===i||null===(n=i.items)||void 0===n||n.forEach(e=>{let t=C.get(e.id);L.push(t)}),(0,l.useEffect)(()=>{var e;L&&w&&(null===(e=v.annotationOverlays)||void 0===e?void 0:e.renderOverlays)&&(0,ea.zG)(w,z,v,L)},[null==z?void 0:z.id,L,w,null===(o=v.annotationOverlays)||void 0===o?void 0:o.renderOverlays]);let R=null==T?void 0:null===(r=T.display)||void 0===r?void 0:r.component;return(0,a.jsxs)(e8,{className:"clover-viewer-painting",children:[(0,a.jsxs)(e7,{style:{backgroundColor:v.canvasBackgroundColor,height:"auto"===v.canvasHeight?"100%":v.canvasHeight},children:[I&&!p&&(0,a.jsx)(tj,{handleToggle:()=>x(!f),isInteractive:f,isMedia:p}),M&&!p&&(0,a.jsx)(tc,{isMedia:p,label:null==z?void 0:z.label,placeholderCanvas:I,setIsInteractive:x}),!M&&!T&&(p?(0,a.jsx)(tx,{allSources:h,painting:h[m],annotationResources:u}):h&&(0,a.jsx)(td.default,{_cloverViewerHasPlaceholder:A,body:h[m],instanceId:$,openSeadragonCallback:e=>{e&&(null==w?void 0:w.id)!=="openseadragon-".concat($)&&k({type:"updateOpenSeadragonViewer",openSeadragonViewer:e})},openSeadragonConfig:v.openSeadragon},$)),!M&&R&&(0,a.jsx)(R,{id:c,annotationBody:h[m],...null==T?void 0:T.display.componentProps})]}),E&&(0,a.jsx)(tl,{value:null===(s=h[m])||void 0===s?void 0:s.id,onValueChange:e=>{g(h.findIndex(t=>t.id===e))},maxHeight:"200px",children:null==h?void 0:h.map(e=>(0,a.jsx)(ts,{value:null==e?void 0:e.id,label:null==e?void 0:e.label},null==e?void 0:e.id))})]})},tw=e=>{let{activeCanvas:t,annotationResources:n,isAudioVideo:i,items:o,painting:r}=e,{isInformationOpen:l,configOptions:s}=b(),{informationPanel:d}=s,c=(null==d?void 0:d.renderAbout)&&l,u=(null==d?void 0:d.renderAnnotation)&&n.length>0&&!d.open;return(0,a.jsxs)(A,{className:"clover-viewer-content","data-testid":"clover-viewer-content",children:[(0,a.jsxs)(E,{children:[(0,a.jsx)(ty,{activeCanvas:t,annotationResources:n,isMedia:i,painting:r}),c&&(0,a.jsx)(M,{children:(0,a.jsx)("span",{children:l?"View Items":"More Information"})}),o.length>1&&(0,a.jsx)(I,{className:"clover-viewer-media-wrapper",children:(0,a.jsx)(e4,{items:o,activeItem:0})})]}),(c||u)&&(0,a.jsx)(T,{children:(0,a.jsx)($,{children:(0,a.jsx)(eC,{activeCanvas:t,annotationResources:n})})})]})};let tC=(0,z.zo)(eZ.Trigger,{width:"30px",padding:"5px"}),tS=(0,z.zo)(eZ.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"}}}),tk=(0,z.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"}}),tz=(0,z.zo)("header",{display:"flex",backgroundColor:"transparent !important",justifyContent:"space-between",alignItems:"flex-start",width:"100%",["> ".concat(tr)]:{flexGrow:"1",flexShrink:"0"},form:{flexGrow:"0",flexShrink:"1"}}),tI=(0,z.zo)("div",{display:"flex",alignItems:"flex-end",justifyContent:"flex-end",padding:"1rem",flexShrink:"0",flexGrow:"1"});var tA=()=>{var e;let t=j(),{activeManifest:n,collection:i,configOptions:o,vault:r}=b(),l=null==o?void 0:o.canvasHeight;return(0,a.jsx)("div",{style:{margin:"0.75rem"},children:(0,a.jsx)(tl,{label:i.label,maxHeight:l,value:n,onValueChange:e=>{t({type:"updateActiveManifest",manifestId:e}),t({type:"updateViewerId",viewerId:(0,c.Z)()})},children:null==i?void 0:null===(e=i.items)||void 0===e?void 0:e.map(e=>(0,a.jsx)(ts,{value:e.id,thumbnail:(null==e?void 0:e.thumbnail)?r.get(null==e?void 0:e.thumbnail):void 0,label:e.label},e.id))})})};let tE=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2500,[n,i]=(0,l.useState)(),o=(0,l.useCallback)(()=>{navigator.clipboard.writeText(e).then(()=>i("copied"),()=>i("failed"))},[e]);return(0,l.useEffect)(()=>{if(!n)return;let e=setTimeout(()=>i(void 0),t);return()=>clearTimeout(e)},[n]),[n,o]},tM=(0,z.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"}),t$=e=>{let{status:t}=e;return t?(0,a.jsx)(tM,{"data-copy-status":t,children:t}):null};var tT=e=>{let{textPrompt:t,textToCopy:n}=e,[i,o]=tE(n);return(0,a.jsxs)("button",{onClick:o,children:[t," ",(0,a.jsx)(t$,{status:i})]})},tL=()=>{let e="#ed1d33",t="#2873ab";return(0,a.jsxs)("svg",{viewBox:"0 0 493.35999 441.33334",id:"iiif-logo",version:"1.1",children:[(0,a.jsx)("title",{children:"IIIF Manifest Options"}),(0,a.jsx)("g",{transform:"matrix(1.3333333,0,0,-1.3333333,0,441.33333)",children:(0,a.jsxs)("g",{transform:"scale(0.1)",children:[(0,a.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,a.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,a.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,a.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,a.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,a.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,a.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"})]})})]})},tR=n(2472);let tF=(0,z.zo)(tR.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"}}),tH=(0,z.zo)(tR.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))"}}),tO=(0,z.zo)("label",{fontSize:"0.8333rem",fontWeight:"400",lineHeight:"1em",userSelect:"none",cursor:"pointer",paddingRight:"0.618rem"}),tV=(0,z.zo)("form",{display:"flex",flexShrink:"0",flexGrow:"1",alignItems:"center",marginLeft:"1.618rem"});var tP=()=>{var e;let{configOptions:t}=b(),n=j(),[i,o]=(0,l.useState)(null==t?void 0:null===(e=t.informationPanel)||void 0===e?void 0:e.open);return(0,l.useEffect)(()=>{n({type:"updateInformationOpen",isInformationOpen:i})},[i,n]),(0,a.jsxs)(tV,{children:[(0,a.jsx)(tO,{htmlFor:"information-toggle",css:i?{opacity:"1"}:{},children:"More Information"}),(0,a.jsx)(tF,{checked:i,onCheckedChange:()=>o(!i),id:"information-toggle","aria-label":"information panel toggle",name:"toggled?",children:(0,a.jsx)(tH,{})})]})};let tB=(0,z.zo)(eZ.Trigger,{width:"30px",padding:"5px"}),tW=(0,z.zo)(tS,{h3:{color:"$primaryAlt",fontSize:"$2",fontWeight:"700",margin:"$2 0"},button:{},"& ul li":{marginBottom:"$1"}});var tN=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 t_(e,t){return e.map(e=>{let{format:n,id:i,label:o}=e;return{format:n,id:i,label:(0,tN.M)(o)||t}})}var tD=()=>{let{allPages:e,individualPages:t}=function(){let e=function(){let{activeCanvas:e,activeManifest:t,vault:n}=b(),[i,o]=(0,l.useState)({root:[],canvas:[]});return(0,l.useEffect)(()=>{let i=n.get(t),r=n.get(e),a=null==i?void 0:i.rendering,l=null==r?void 0:r.rendering;o({root:tG(a,n),canvas:tG(l,n)})},[e,t,n]),{...i}}();return{allPages:t_((null==e?void 0:e.root)||[],"Root Rendering Label"),individualPages:t_((null==e?void 0:e.canvas)||[],"Canvas Rendering Label")}}(),n=e.length>0||t.length>0,i=e=>{window.open(e,"_blank")};return n?(0,a.jsxs)(eZ,{children:[(0,a.jsx)(tB,{"data-testid":"download-button",children:(0,a.jsx)(eP,{children:(0,a.jsx)(eP.Download,{})})}),(0,a.jsxs)(tW,{"data-testid":"download-content",children:[t.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h3",{children:"Individual Pages"}),(0,a.jsx)("ul",{children:t.map(e=>{let{format:t,id:n,label:o}=e;return(0,a.jsx)("li",{children:(0,a.jsxs)("button",{onClick:()=>i(n),children:[o," (",t,")"]})},o)})})]}),e.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h3",{children:"All Pages"}),(0,a.jsx)("ul",{children:e.map(e=>{let{format:t,id:n,label:o}=e;return(0,a.jsx)("li",{children:(0,a.jsxs)("button",{onClick:()=>i(n),children:[o," (",t,")"]})},o)})})]})]})]}):null};let tU=e=>{let t=()=>!!window.matchMedia&&window.matchMedia(e).matches,[n,i]=(0,l.useState)(t);return(0,l.useEffect)(()=>{let e=()=>i(t);return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),n};var tq=e=>{let{manifestId:t,manifestLabel:n}=e,{collection:i,configOptions:o}=b(),{informationPanel:r,showDownload:l,showIIIFBadge:s,showTitle:d}=o,c=l||s||(null==r?void 0:r.renderToggle),u=tU(z.BC.sm);return(0,a.jsxs)(tz,{className:"clover-viewer-header",children:[(null==i?void 0:i.items)?(0,a.jsx)(tA,{}):(0,a.jsx)(tk,{className:d?"":"visually-hidden",children:d&&(0,a.jsx)(ep.__,{label:n,className:"label"})}),c&&(0,a.jsxs)(tI,{children:[l&&(0,a.jsx)(tD,{}),s&&(0,a.jsxs)(eZ,{children:[(0,a.jsx)(tC,{children:(0,a.jsx)(tL,{})}),(0,a.jsxs)(tS,{children:[(null==i?void 0:i.items)&&(0,a.jsx)("button",{onClick:e=>{e.preventDefault(),window.open(i.id,"_blank")},children:"View Collection"}),(0,a.jsx)("button",{onClick:e=>{e.preventDefault(),window.open(t,"_blank")},children:"View Manifest"})," ",(null==i?void 0:i.items)&&(0,a.jsx)(tT,{textPrompt:"Copy Collection URL",textToCopy:i.id}),(0,a.jsx)(tT,{textPrompt:"Copy Manifest URL",textToCopy:t})]})]}),(null==r?void 0:r.renderToggle)&&!u&&(0,a.jsx)(tP,{})]})]})};let tZ=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],[t,n]=(0,l.useState)(e);return(0,l.useLayoutEffect)(()=>{if(!t)return;let e=document.documentElement.style.overflow;return document.documentElement.style.overflow="hidden",()=>{document.documentElement.style.overflow=e}},[t]),(0,l.useEffect)(()=>{t!==e&&n(e)},[e]),[t,n]};var tY=e=>{var t;let{manifest:n,theme:i}=e,o=b(),r=j(),{activeCanvas:s,isInformationOpen:d,vault:c,configOptions:u}=o,p=(null==u?void 0:u.canvasHeight)&&["100%","auto"].includes(null==u?void 0:u.canvasHeight),[h,m]=(0,l.useState)(!1),[g,f]=(0,l.useState)(!1),[x,v]=(0,l.useState)([]),[I,A]=(0,l.useState)([]),[E,M]=tZ(!1),$=tU(z.BC.sm),T=(0,l.useCallback)(e=>{r({type:"updateInformationOpen",isInformationOpen:e})},[r]);return(0,l.useEffect)(()=>{var e;(null==u?void 0:null===(e=u.informationPanel)||void 0===e?void 0:e.open)&&T(!$)},[$,null==u?void 0:null===(t=u.informationPanel)||void 0===t?void 0:t.open,T]),(0,l.useEffect)(()=>{if(!$){M(!1);return}M(d)},[d,$,M]),(0,l.useEffect)(()=>{let e=(0,w.G)(c,s);e&&(f(["Sound","Video"].indexOf(e[0].type)>-1),v(e));let t=C(c,s);t.length>0&&r({type:"updateInformationOpen",isInformationOpen:!0}),A(t),m(0!==t.length)},[s,c,r]),(0,a.jsx)(S.SV,{FallbackComponent:k.Z,children:(0,a.jsx)(L,{className:"".concat(i," clover-viewer"),css:{background:null==u?void 0:u.background},"data-body-locked":E,"data-absolute-position":p,"data-information-panel":h,"data-information-panel-open":d,children:(0,a.jsxs)(y.fC,{open:d,onOpenChange:T,children:[(0,a.jsx)(tq,{manifestLabel:n.label,manifestId:n.id}),(0,a.jsx)(tw,{activeCanvas:s,painting:x,annotationResources:I,items:n.items,isAudioVideo:g})]})})})},tJ=n(458);let tX={ignoreCache:!1,headers:{Accept:"application/json, text/javascript, text/plain"},timeout:5e3,withCredentials:!1};function tQ(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 tK=n(2103);let t0=e=>{let{canvasIdCallback:t,customTheme:n,iiifContent:i,options:o}=e,r=j(),{activeCanvas:s,activeManifest:d,isLoaded:c,vault:u}=b(),[p,h]=(0,l.useState)(),[m,g]=(0,l.useState)(),f={};return(n&&(f=(0,tJ.jG)("custom",n)),(0,l.useEffect)(()=>{t&&t(s)},[s,t]),(0,l.useEffect)(()=>{d&&u.loadManifest(d).then(e=>{g(e),r({type:"updateActiveCanvas",canvasId:(0,tK.FO)(i,e)})}).catch(e=>{console.error("Manifest failed to load: ".concat(e))}).finally(()=>{r({type:"updateIsLoaded",isLoaded:!0})})},[i,d,r,u]),(0,l.useEffect)(()=>{r({type:"updateConfigOptions",configOptions:o});let e=(0,tK.Vu)(i);u.load(e).then(e=>{h(e)}).catch(e=>{console.error("The IIIF resource ".concat(i," failed to load: ").concat(e))})},[r,i,o,u]),(0,l.useEffect)(()=>{if((null==p?void 0:p.type)==="Collection"){r({type:"updateCollection",collection:p});let e=(0,tK.Mx)(i,p);e&&r({type:"updateActiveManifest",manifestId:e})}else(null==p?void 0:p.type)==="Manifest"&&r({type:"updateActiveManifest",manifestId:p.id})},[r,i,p]),c)?m&&m.items?0===m.items.length?(console.log("The IIIF manifest ".concat(i," does not contain canvases.")),(0,a.jsx)(a.Fragment,{})):(0,a.jsx)(tY,{manifest:m,theme:f},m.id):(console.log("The IIIF manifest ".concat(i," failed to load.")),(0,a.jsx)(a.Fragment,{})):(0,a.jsx)(a.Fragment,{children:"Loading"})};var t1=e=>{var t,n,i;let{canvasIdCallback:o=()=>{},customDisplays:r=[],customTheme:l,iiifContent:d,id:c,manifestId:u,options:h}=e,g=d;c&&(g=c),u&&(g=u);let f=p(null==h?void 0:null===(n=h.informationPanel)||void 0===n?void 0:null===(t=n.vtt)||void 0===t?void 0:t.autoScroll);return(0,a.jsx)(v,{initialState:{...m,customDisplays:r,isAutoScrollEnabled:f.enabled,isInformationOpen:!!(null==h?void 0:null===(i=h.informationPanel)||void 0===i?void 0:i.open),vault:new s.j({customFetcher:e=>(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:tX,n=t.headers||tX.headers;return new Promise((i,o)=>{let r=new XMLHttpRequest;r.open("get",e),r.withCredentials=t.withCredentials,n&&Object.keys(n).forEach(e=>r.setRequestHeader(e,n[e])),r.onload=()=>{i({ok:r.status>=200&&r.status<300,status:r.status,statusText:r.statusText,headers:r.getAllResponseHeaders(),data:r.responseText,json:()=>JSON.parse(r.responseText)})},r.onerror=()=>{o(tQ(r,"Failed to make request."))},r.ontimeout=()=>{o(tQ(r,"Request took longer than expected."))},r.send()})})(e,{withCredentials:null==h?void 0:h.withCredentials,headers:null==h?void 0:h.requestHeaders}).then(e=>JSON.parse(e.data))})},children:(0,a.jsx)(t0,{iiifContent:g,canvasIdCallback:o,customTheme:l,options:h})})}},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 r,a;o.annotationPage=e.get(o.canvas.items[0]),o.accompanyingCanvas=(null===(r=o.canvas)||void 0===r?void 0:r.accompanyingCanvas)?e.get(null===(a=o.canvas)||void 0===a?void 0:a.accompanyingCanvas):void 0}if(o.annotationPage){let r=e.get(o.annotationPage.items).map(t=>({body:e.get(t.body[0].id),motivation:t.motivation,type:"Annotation"})),a=[];r.forEach(t=>{"Choice"===t.body.type?t.body.items.forEach(n=>a.push({...t,id:n.id,body:e.get(n.id)})):a.push(t)}),o.annotations=a.filter(o=>{if(o){if(!o.body||!o.motivation){console.error("Invalid annotation after Hyperion parsing: missing either 'body' or 'motivation'",o);return}let r=o.body;Array.isArray(r)&&(r=r[0]);let a=e.get(r.id);if(a)switch(n){case"painting":return o.target===t.id&&o.motivation&&"painting"===o.motivation[0]&&i.includes(a.type)&&(o.body=a),!!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 +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[779],{3779:function(e,t,n){n.r(t),n.d(t,{default:function(){return t1}});var i,o,r,a=n(1527),l=n(959),s=n(3832),d=n(3631),c=n(2950);let u={annotationOverlays:{backgroundColor:"#ff6666",borderColor:"#990000",borderType:"solid",borderWidth:"1px",opacity:"0.5",renderOverlays:!0,zoomLevel:2},background:"transparent",canvasBackgroundColor:"#6662",canvasHeight:"500px",ignoreCaptionLabels:[],informationPanel:{vtt:{autoScroll:{enabled:!0,settings:{behavior:"smooth",block:"center"}}},open:!0,renderAbout:!0,renderSupplementing:!0,renderToggle:!0,renderAnnotation:!0},openSeadragon:{},requestHeaders:{"Content-Type":"application/json"},showDownload:!0,showIIIFBadge:!0,showTitle:!0,withCredentials:!1};function p(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:n}=e,i=["auto","instant","smooth"],o=["center","end","nearest","start"];if(!i.includes(t))throw TypeError("'".concat(t,"' not in ").concat(i.join(" | ")));if(!o.includes(n))throw TypeError("'".concat(n,"' not in ").concat(o.join(" | ")))}(t.settings),t}let h=p(null==u?void 0:null===(o=u.informationPanel)||void 0===o?void 0:null===(i=o.vtt)||void 0===i?void 0:i.autoScroll),m={activeCanvas:"",activeManifest:"",collection:{},configOptions:u,customDisplays:[],isAutoScrollEnabled:h.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,openSeadragonViewer:null,viewerId:(0,c.Z)()},g=l.createContext(m),f=l.createContext(m);function x(e,t){switch(t.type){case"updateActiveCanvas":return t.canvasId||(t.canvasId=""),{...e,activeCanvas:t.canvasId};case"updateActiveManifest":return{...e,activeManifest:t.manifestId};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,d.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 v=e=>{let{initialState:t=m,children:n}=e,[i,o]=(0,l.useReducer)(x,t);return(0,a.jsx)(g.Provider,{value:i,children:(0,a.jsx)(f.Provider,{value:o,children:n})})};function b(){let e=l.useContext(g);if(void 0===e)throw Error("useViewerState must be used within a ViewerProvider");return e}function j(){let e=l.useContext(f);if(void 0===e)throw Error("useViewerDispatch must be used within a ViewerProvider");return e}var y=n(603),w=n(4707);let C=(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}}):[]};var S=n(8448),k=n(2196),z=n(5455);let I=(0,z.zo)("div",{position:"relative",zIndex:"0"}),A=(0,z.zo)("div",{display:"flex",flexDirection:"row",flexGrow:"1",overflow:"hidden","@sm":{flexDirection:"column"}}),E=(0,z.zo)("div",{display:"flex",flexDirection:"column",flexGrow:"1",flexShrink:"1",width:"61.8%","@sm":{width:"100%"}}),M=(0,z.zo)(y.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"}}}),$=(0,z.zo)(y.VY,{width:"100%",display:"flex"}),T=(0,z.zo)("aside",{display:"flex",flexGrow:"1",flexShrink:"0",width:"38.2%",maxHeight:"100%","@sm":{width:"100%"}}),L=(0,z.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(A)]:{flexGrow:"1"},["& ".concat(E)]:{flexGrow:"0"}}},"@sm":{padding:"0"},"&[data-information-panel-open='true']":{"@sm":{position:"fixed",height:"100%",width:"100%",top:"0",left:"0",zIndex:"2500000000",["& ".concat(I)]:{display:"none"},["& ".concat(M)]:{margin:"1rem"},["& ".concat($)]:{height:"100%"}}}});var R=n(3367);let F=(0,z.zo)(R.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"}}),H=(0,z.zo)(R.aV,{display:"flex",flexGrow:"0",margin:"0 1.618rem",borderBottom:"4px solid #6663","@sm":{margin:"0 1rem"}}),O=(0,z.zo)(R.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"}}}),V=(0,z.zo)(R.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"}}),P=(0,z.zo)(e=>{let{handleScroll:t,children:n,className:i}=e;return(0,a.jsx)("div",{className:i,onScroll:t,children:n})},{position:"relative",height:"100%",width:"100%",overflowY:"scroll"}),B={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"},W=(0,z.zo)("button",{textAlign:"left","&:hover":{color:"$accent"}}),N=(0,z.zo)("div",{display:"flex",flexDirection:"column",width:"100%"}),G=(0,z.zo)("div",{...B}),_=(0,z.zo)("div",{"&:hover":{color:"$accent"}});var D=e=>{let{value:t,handleClick:n}=e;return(0,a.jsx)(W,{onClick:n,children:t})},U=e=>{let{value:t,handleClick:n}=e;return(0,a.jsx)(_,{dangerouslySetInnerHTML:{__html:t},onClick:n})},q=()=>{function e(e){return e.map(e=>{let t=e.identifier||(0,c.Z)();return{...e,identifier:t}})}return{addIdentifiersToParsedCues:e,createNestedCues:function(t){let n=[],i=[];for(let r of e(t)){for(;i.length>0&&i[i.length-1].end<=r.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(r),i.push(r)}else n.push(r),i.push(r)}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)}}},Z=n(6427);let Y=(0,z.F4)({from:{transform:"rotate(360deg)"},to:{transform:"rotate(0deg)"}}),J=(0,z.zo)(Z.fC,{display:"flex",flexDirection:"column",width:"100%"}),X=(0,z.zo)(Z.ck,{...B,"@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:Y,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:Y,boxSizing:"content-box","@sm":{content:"unset"}}}}),Q=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 K=e=>{var t,n;let{label:i,start:o,end:r}=e,s=j(),{configOptions:c,isAutoScrollEnabled:u,isUserScrolling:p}=b(),h=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,l.useState)(!1),f=(0,l.useRef)(null),x=document.getElementById("clover-iiif-video");return(0,l.useEffect)(()=>(null==x||x.addEventListener("timeupdate",()=>{let{currentTime:e}=x;g(o<=e&&edocument.removeEventListener("timeupdate",()=>{})),[r,o,x]),(0,l.useEffect)(()=>{if(u&&m&&f.current&&!p){let n=f.current;if(n&&n instanceof HTMLElement){let i=Q(n);if(i&&i instanceof HTMLElement){var e,t;let o;switch(null==h?void 0:null===(e=h.settings)||void 0===e?void 0:e.block){case"center":let r=i.getBoundingClientRect();o=n.offsetTop+n.offsetHeight-Math.floor((r.bottom-r.top)/2);break;case"end":o=n.offsetTop+n.offsetHeight-(i.clientHeight-n.clientHeight)+2;break;default:o=n.offsetTop-2}s({type:"updateAutoScrolling",isAutoScrolling:!0}),i.scrollTo({top:o,left:0,behavior:null==h?void 0:null===(t=h.settings)||void 0===t?void 0:t.behavior}),setTimeout(()=>s({type:"updateAutoScrolling",isAutoScrolling:!1}),750)}}}},[h,m,p,u,s]),(0,a.jsxs)(X,{ref:f,"aria-checked":m,"data-testid":"information-panel-cue",onClick:()=>{x&&(x.pause(),x.currentTime=o,x.play())},value:i,children:[i,(0,a.jsx)("strong",{children:(0,d.rJ)(o)})]})};let ee=(0,z.zo)("ul",{listStyle:"none",paddingLeft:"1rem",position:"relative","&&:first-child":{paddingLeft:"0"},"& li ul":{["& ".concat(X)]:{backgroundColor:"unset","&::before":{content:"none"},"&::after":{content:"none"}}},"&:first-child":{margin:"0 0 1.618rem"}}),et=e=>{let{items:t}=e;return(0,a.jsx)(ee,{children:t.map(e=>{let{text:t,start:n,end:i,children:o,identifier:r}=e;return(0,a.jsxs)("li",{children:[(0,a.jsx)(K,{label:t,start:n,end:i}),o&&(0,a.jsx)(et,{items:o})]},r)})})},en=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 ei=n(3836),eo=e=>{let{label:t,vttUri:n}=e,[i,o]=l.useState([]),{createNestedCues:r,orderCuesByTime:s}=q(),[d,c]=l.useState();return(0,l.useEffect)(()=>{n&&fetch(n,{headers:{"Content-Type":"text/plain",Accept:"application/json"}}).then(e=>e.text()).then(e=>{o(r(s((0,ei.parse)(e).cues)))}).catch(e=>{console.error(n,e.toString()),c(e)})},[n]),(0,a.jsxs)(J,{"data-testid":"annotation-item-vtt","aria-label":"navigate ".concat(en(t,"en")),children:[d&&(0,a.jsxs)("div",{"data-testid":"error-message",children:["Network Error: ",d.toString()]}),(0,a.jsx)(et,{items:i})]})},er=n(5500),ea=n(6543),el=e=>{let{caption:t,handleClick:n,imageUri:i}=e;return(0,a.jsxs)(W,{onClick:n,children:[(0,a.jsx)("img",{src:i,alt:"A visual annotation for ".concat(t)}),(0,a.jsx)("span",{children:t})]})},es=e=>{var t,n;let{annotation:i}=e,{target:o}=i,{openSeadragonViewer:r,vault:l,activeCanvas:s,configOptions:d}=b(),c=i.body.map(e=>l.get(e.id)),u=(null===(t=c.find(e=>e.format))||void 0===t?void 0:t.format)||"",p=(null===(n=c.find(e=>e.value))||void 0===n?void 0:n.value)||"",h=l.get({id:s,type:"Canvas"});function m(){var e;if(!o)return;let t=(null===(e=d.annotationOverlays)||void 0===e?void 0:e.zoomLevel)||1,n=(0,er.L)(o),{point:i,rect:a,svg:l}=n;if(i||a||l){let e=(0,ea.cW)(h,n,t);null==r||r.viewport.fitBounds(e)}}return(0,a.jsx)(G,{children:function(){var e,t;switch(u){case"text/plain":return(0,a.jsx)(D,{value:p,handleClick:m});case"text/html":return(0,a.jsx)(U,{value:p,handleClick:m});case"text/vtt":return(0,a.jsx)(eo,{label:c[0].label,vttUri:c[0].id||""});case null===(e=u.match(/^image\//))||void 0===e?void 0:e.input:let n=(null===(t=c.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,a.jsx)(el,{caption:p,handleClick:m,imageUri:n});default:return(0,a.jsx)(D,{value:p,handleClick:m})}}()})},ed=e=>{var t;let{annotationPage:n}=e,{vault:i}=b();if(!n||!n.items||(null===(t=n.items)||void 0===t?void 0:t.length)===0)return(0,a.jsx)(a.Fragment,{});let o=n.items.map(e=>i.get(e.id));return o?(0,a.jsx)(N,{"data-testid":"annotation-page",children:null==o?void 0:o.map(e=>(0,a.jsx)(es,{annotation:e},e.id))}):(0,a.jsx)(a.Fragment,{})};let ec=(0,z.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"}}}),eu=(0,z.zo)("div",{position:"relative",width:"100%",height:"100%",zIndex:"0"});var ep=n(7184),eh=e=>{let{homepage:t}=e;return(null==t?void 0:t.length)===0?(0,a.jsx)(a.Fragment,{}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"manifest-property-title",children:"Homepage"}),(0,a.jsx)(ep.bw,{homepage:t})]})},em=e=>{let{id:t,htmlLabel:n,parent:i="manifest"}=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"manifest-property-title",children:n}),(0,a.jsx)("a",{href:t,target:"_blank",id:"iiif-".concat(i,"-id"),children:t})]})},eg=e=>{let{metadata:t,parent:n="manifest"}=e;return t?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(ep.SF,{metadata:t,id:"iiif-".concat(n,"-metadata")})}):(0,a.jsx)(a.Fragment,{})},ef=e=>{let{rendering:t}=e;return(null==t?void 0:t.length)===0?(0,a.jsx)(a.Fragment,{}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"manifest-property-title",children:"Alternate formats"}),(0,a.jsx)(ep.Oy,{rendering:t})]})},ex=e=>{let{requiredStatement:t,parent:n="manifest"}=e;return t?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(ep.bT,{requiredStatement:t,id:"iiif-".concat(n,"-required-statement")})}):(0,a.jsx)(a.Fragment,{})},ev=e=>{let{rights:t}=e;return t?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"manifest-property-title",children:"Rights"}),(0,a.jsx)("a",{href:t,target:"_blank",children:t})]}):(0,a.jsx)(a.Fragment,{})},eb=e=>{let{seeAlso:t}=e;return(null==t?void 0:t.length)===0?(0,a.jsx)(a.Fragment,{}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"manifest-property-title",children:"See Also"}),(0,a.jsx)(ep.QZ,{seeAlso:t})]})},ej=e=>{let{summary:t,parent:n="manifest"}=e;return t?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(ep.ER,{summary:t,as:"p",id:"iiif-".concat(n,"-summary")})}):(0,a.jsx)(a.Fragment,{})},ey=e=>{let{label:t,thumbnail:n}=e;return(null==n?void 0:n.length)===0?(0,a.jsx)(a.Fragment,{}):(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(ep.pl,{altAsLabel:t||{none:["resource"]},thumbnail:n,style:{backgroundColor:"#6663",objectFit:"cover"}})})},ew=()=>{let{activeManifest:e,vault:t}=b(),[n,i]=(0,l.useState)(),[o,r]=(0,l.useState)([]),[s,d]=(0,l.useState)([]),[c,u]=(0,l.useState)([]),[p,h]=(0,l.useState)([]);return((0,l.useEffect)(()=>{var n,o,a,l;let s=t.get(e);i(s),(null===(n=s.homepage)||void 0===n?void 0:n.length)>0&&r(t.get(s.homepage)),(null===(o=s.seeAlso)||void 0===o?void 0:o.length)>0&&d(t.get(s.seeAlso)),(null===(a=s.rendering)||void 0===a?void 0:a.length)>0&&u(t.get(s.rendering)),(null===(l=s.thumbnail)||void 0===l?void 0:l.length)>0&&h(t.get(s.thumbnail))},[e,t]),n)?(0,a.jsx)(eu,{children:(0,a.jsxs)(ec,{children:[(0,a.jsx)(ey,{thumbnail:p,label:n.label}),(0,a.jsx)(ej,{summary:n.summary}),(0,a.jsx)(eg,{metadata:n.metadata}),(0,a.jsx)(ex,{requiredStatement:n.requiredStatement}),(0,a.jsx)(ev,{rights:n.rights}),(0,a.jsx)(eh,{homepage:o}),(0,a.jsx)(eb,{seeAlso:s}),(0,a.jsx)(ef,{rendering:c}),(0,a.jsx)(em,{id:n.id,htmlLabel:"IIIF Manifest"})]})}):(0,a.jsx)(a.Fragment,{})},eC=e=>{let{activeCanvas:t,annotationResources:n}=e,i=j(),{isAutoScrolling:o,configOptions:{informationPanel:r},isUserScrolling:s}=b(),[d,c]=(0,l.useState)(),u=null==r?void 0:r.renderAbout,p=null==r?void 0:r.renderAnnotation;return(0,l.useEffect)(()=>{u?c("manifest-about"):n&&(null==n?void 0:n.length)>0&&!u&&c(n[0].id)},[t,u,n]),(0,a.jsxs)(F,{"data-testid":"information-panel",defaultValue:d,onValueChange:e=>{c(e)},orientation:"horizontal",value:d,className:"clover-viewer-information-panel",children:[(0,a.jsxs)(H,{"aria-label":"select chapter","data-testid":"information-panel-list",children:[u&&(0,a.jsx)(O,{value:"manifest-about",children:"About"}),p&&n&&n.map((e,t)=>(0,a.jsx)(O,{value:e.id,children:(0,a.jsx)(ep.__,{label:e.label})},t))]}),(0,a.jsxs)(P,{handleScroll:function(){if(!o){clearTimeout(s);let e=setTimeout(()=>{i({type:"updateUserScrolling",isUserScrolling:void 0})},1500);i({type:"updateUserScrolling",isUserScrolling:e})}},children:[u&&(0,a.jsx)(V,{value:"manifest-about",children:(0,a.jsx)(ew,{})}),p&&n&&n.map(e=>(0,a.jsx)(V,{value:e.id,children:(0,a.jsx)(ed,{annotationPage:e})},e.id))]})]})},eS=n(8640);let ek=(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}},ez=(0,z.zo)("div",{position:"absolute",right:"1rem",top:"1rem",display:"flex",justifyContent:"flex-end",zIndex:"1"}),eI=(0,z.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"}}),eA=(0,z.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"}}}),eE=(0,z.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"}}),eM=(0,z.zo)("div",{display:"flex",position:"relative",zIndex:"1",width:"100%",padding:"0",transition:"$all",variants:{isToggle:{true:{paddingTop:"2.618rem",["& ".concat(ez)]:{width:"calc(100% - 2rem)","@sm":{width:"calc(100% - 2rem)"}}}}}});var e$=(e,t)=>{(0,l.useEffect)(()=>{function n(n){n.key===e&&t()}return window.addEventListener("keyup",n),()=>window.removeEventListener("keyup",n)},[])};let eT=()=>(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:[(0,a.jsx)("title",{children:"Arrow Back"}),(0,a.jsx)("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M244 400L100 256l144-144M120 256h292"})]}),eL=()=>(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:[(0,a.jsx)("title",{children:"Arrow Forward"}),(0,a.jsx)("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M268 112l144 144-144 144M392 256H100"})]}),eR=()=>(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:[(0,a.jsx)("title",{children:"Close"}),(0,a.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"})]}),eF=()=>(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:[(0,a.jsx)("title",{children:"Search"}),(0,a.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 eH=e=>{let{handleCanvasToggle:t,handleFilter:n,activeIndex:i,canvasLength:o}=e,[r,s]=(0,l.useState)(!1),[d,c]=(0,l.useState)(!1),[u,p]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{0===i?p(!0):p(!1),i===o-1?c(!0):c(!1)},[i,o]),e$("Escape",()=>{s(!1),n("")}),(0,a.jsx)(eM,{isToggle:r,children:(0,a.jsxs)(ez,{children:[r&&(0,a.jsx)(eI,{autoFocus:!0,onChange:e=>n(e.target.value),placeholder:"Search"}),!r&&(0,a.jsxs)(eE,{children:[(0,a.jsx)(eA,{onClick:()=>t(-1),disabled:u,type:"button",children:(0,a.jsx)(eT,{})}),(0,a.jsxs)("span",{children:[i+1," of ",o]}),(0,a.jsx)(eA,{onClick:()=>t(1),disabled:d,type:"button",children:(0,a.jsx)(eL,{})})]}),(0,a.jsx)(eA,{onClick:()=>{s(e=>!e),n("")},type:"button",children:r?(0,a.jsx)(eR,{}):(0,a.jsx)(eF,{})})]})})};let eO=(0,z.zo)(Z.fC,{display:"flex",flexDirection:"row",flexGrow:"1",padding:"1.618rem",overflowX:"scroll",position:"relative",zIndex:"0"}),eV=(0,z.zo)("svg",{display:"inline-flex",variants:{isLarge:{true:{height:"4rem",width:"4rem"}},isMedium:{true:{height:"2rem",width:"2rem"}},isSmall:{true:{height:"1rem",width:"1rem"}}}}),eP=e=>(0,a.jsx)(eV,{...e,"data-testid":"icon-svg",role:"img",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:e.children});eP.Title=e=>{let{children:t}=e;return(0,a.jsx)("title",{children:t})},eP.Add=()=>(0,a.jsx)("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M256 112v288M400 256H112"}),eP.Audio=()=>(0,a.jsxs)(a.Fragment,{children:[(0,a.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,a.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,a.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"})]}),eP.Close=()=>(0,a.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"}),eP.Download=()=>(0,a.jsxs)(a.Fragment,{children:[(0,a.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,a.jsx)("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M176 272l80 80 80-80M256 48v288"})]}),eP.Image=()=>(0,a.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"}),eP.Video=()=>(0,a.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 eB=n(2338);let eW=(0,z.F4)({"0%":{opacity:0,transform:"translateY(1rem)"},"100%":{opacity:1,transform:"translateY(0)"}}),eN=(0,z.F4)({"0%":{opacity:0,transform:"translateY(1rem)"},"100%":{opacity:1,transform:"translateY(0)"}}),eG=(0,z.zo)(eB.Eh,{fill:"$secondaryAlt"}),e_=(0,z.zo)(eB.x8,{position:"absolute",right:"0",top:"0",padding:"0.5rem",margin:"0",cursor:"pointer",border:"none",background:"none",fill:"inherit","&:hover":{opacity:"0.75"}}),eD=(0,z.zo)(eB.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:eN},'&[data-side="bottom"]':{animationName:eW},'&[data-align="end"]':{["& ".concat(eG)]:{margin:"0 0.7rem"}}}),eU=(0,z.zo)(eB.xz,{display:"inline-flex",padding:"0.5rem 0",margin:"0 0.5rem 0 0",cursor:"pointer",border:"none",background:"none","> button, > span":{margin:"0"}}),eq=(0,z.zo)(eB.fC,{boxSizing:"content-box"}),eZ=e=>{let{children:t}=e;return(0,a.jsx)(eq,{children:t})};eZ.Trigger=e=>(0,a.jsx)(eU,{...e,children:e.children}),eZ.Content=e=>(0,a.jsxs)(eD,{...e,children:[(0,a.jsx)(eG,{}),(0,a.jsx)(e_,{children:(0,a.jsx)(eP,{isSmall:!0,children:(0,a.jsx)(eP.Close,{})})}),e.children]});let eY=(0,z.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"}}}}),eJ=(0,z.zo)("span",{display:"flex"}),eX=(0,z.zo)("span",{display:"flex",width:"1.2111rem",height:"0.7222rem"}),eQ=(0,z.zo)("span",{display:"inline-flex",marginLeft:"5px",marginBottom:"-1px"}),eK=(0,z.zo)(Z.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(eJ)]:{position:"absolute",right:"0",bottom:"0",["& ".concat(eY)]:{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(eJ)]:{["& ".concat(eY)]:{backgroundColor:"$accent"}}}},figcaption:{fontWeight:"700"}}}),e0=e=>{let{type:t}=e;switch(t){case"Sound":return(0,a.jsx)(eP.Audio,{});case"Image":default:return(0,a.jsx)(eP.Image,{});case"Video":return(0,a.jsx)(eP.Video,{})}};var e1=e=>{let{canvas:t,canvasIndex:n,isActive:i,thumbnail:o,type:r,handleChange:l}=e;return(0,a.jsx)(eK,{"aria-checked":i,"data-testid":"media-thumbnail","data-canvas":n,onClick:()=>l(t.id),value:t.id,children:(0,a.jsxs)("figure",{children:[(0,a.jsxs)("div",{children:[(null==o?void 0:o.id)&&(0,a.jsx)("img",{src:o.id,alt:(null==t?void 0:t.label)?en(t.label):""}),(0,a.jsx)(eJ,{children:(0,a.jsxs)(eY,{isIcon:!0,"data-testid":"thumbnail-tag",children:[(0,a.jsx)(eX,{}),(0,a.jsx)(eP,{"aria-label":r,children:(0,a.jsx)(e0,{type:r})}),["Video","Sound"].includes(r)&&(0,a.jsx)(eQ,{children:(0,d.rJ)(t.duration)})]})})]}),(null==t?void 0:t.label)&&(0,a.jsx)("figcaption",{"data-testid":"fig-caption",children:(0,a.jsx)(ep.__,{label:t.label})})]})})};let e2=e=>e.body?e.body.type:"Image";var e4=e=>{let{items:t}=e,n=j(),{activeCanvas:i,vault:o}=b(),[r,s]=(0,l.useState)(""),[d,c]=(0,l.useState)([]),[u,p]=(0,l.useState)(0),h=l.useRef(null),m=e=>{i!==e&&n({type:"updateActiveCanvas",canvasId:e})};return(0,l.useEffect)(()=>{if(!d.length){let e=["Image","Sound","Video"];c(t.map(t=>(0,eS.g)(o,t,"painting",e)).filter(e=>e.annotations.length>0))}},[t,d.length,o]),(0,l.useEffect)(()=>{d.forEach((e,t)=>{(null==e?void 0:e.canvas)&&e.canvas.id===i&&p(t)})},[i,d]),(0,l.useEffect)(()=>{let e=document.querySelector('[data-canvas="'.concat(u,'"]'));if(e instanceof HTMLElement&&h.current){let t=e.offsetLeft-h.current.offsetWidth/2+e.offsetWidth/2;h.current.scrollTo({left:t,behavior:"smooth"})}},[u]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(eH,{handleFilter:e=>s(e),handleCanvasToggle:e=>{let t=d[u+e];(null==t?void 0:t.canvas)&&m(t.canvas.id)},activeIndex:u,canvasLength:d.length}),(0,a.jsx)(eO,{"aria-label":"select item","data-testid":"media",ref:h,children:d.filter(e=>{var t;if(null===(t=e.canvas)||void 0===t?void 0:t.label){let t=en(e.canvas.label);if(Array.isArray(t))return t[0].toLowerCase().includes(r.toLowerCase())}}).map((e,t)=>{var n,r;return(0,a.jsx)(e1,{canvas:e.canvas,canvasIndex:t,handleChange:m,isActive:i===(null==e?void 0:null===(n=e.canvas)||void 0===n?void 0:n.id),thumbnail:ek(o,e,200,200),type:e2(e.annotations[0])},null==e?void 0:null===(r=e.canvas)||void 0===r?void 0:r.id)})})]})};let e3=(0,z.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 e5=n(515);let e6=(0,z.zo)(e5.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%)"}}]}),e8=(0,z.zo)("div",{position:"relative",display:"flex",flexDirection:"column",flexGrow:"1",flexShrink:"1",gap:"1rem",zIndex:"0",overflow:"hidden","&:hover":{["".concat(e6)]:{backgroundColor:"$accent"},["".concat(e3)]:{backgroundColor:"#6662"}}}),e7=(0,z.zo)("div",{width:"100%",height:"100%"});var e9=n(2016);let te=(0,z.zo)("svg",{height:"19px",color:"$accent",fill:"$accent",stroke:"$accent",display:"flex",margin:"0.25rem 0.85rem"}),tt=(0,z.zo)(e9.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"}}),tn=(0,z.zo)(e9.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"}),ti=(0,z.zo)(e9.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"}}),to=(0,z.zo)(e9.__,{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"}),tr=(0,z.zo)(e9.fC,{position:"relative",zIndex:"5",width:"100%"});var ta=e=>{let{direction:t,title:n}=e;return(0,a.jsxs)(te,{xmlns:"http://www.w3.org/2000/svg",focusable:"false",viewBox:"0 0 512 512",role:"img",children:[(0,a.jsx)("title",{children:n}),"up"===t&&(0,a.jsx)(()=>(0,a.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,a.jsx)(()=>(0,a.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"}),{})]})},tl=e=>{let{children:t,label:n,maxHeight:i,onValueChange:o,value:r}=e;return(0,a.jsxs)(tr,{onValueChange:o,value:r,children:[(0,a.jsxs)(tt,{"data-testid":"select-button",children:[(0,a.jsx)(e9.ki,{"data-testid":"select-button-value"}),(0,a.jsx)(e9.GV,{children:(0,a.jsx)(ta,{direction:"down",title:"select"})})]}),(0,a.jsx)(e9.ue,{children:(0,a.jsxs)(tn,{css:{maxHeight:"".concat(i," !important")},"data-testid":"select-content",children:[(0,a.jsx)(e9.Pn,{children:(0,a.jsx)(ta,{direction:"up",title:"scroll up for more"})}),(0,a.jsx)(e9.Q_,{children:(0,a.jsxs)(e9.DI,{children:[n&&(0,a.jsx)(to,{children:(0,a.jsx)(ep.__,{"data-testid":"select-label",label:n})}),t]})}),(0,a.jsx)(e9.Jk,{children:(0,a.jsx)(ta,{direction:"down",title:"scroll down for more"})})]})})]})},ts=e=>(0,a.jsxs)(ti,{...e,children:[e.thumbnail&&(0,a.jsx)(ep.pl,{thumbnail:e.thumbnail}),(0,a.jsx)(e9.S_,{children:(0,a.jsx)(ep.__,{label:e.label})}),(0,a.jsx)(e9.o6,{})]}),td=n(5129),tc=e=>{let{isMedia:t,label:n,placeholderCanvas:i,setIsInteractive:o}=e,{vault:r}=b(),l=(0,w.G)(r,i),s=l?l[0]:void 0,d=n?en(n):["placeholder image"];return(0,a.jsx)(e3,{onClick:()=>o(!0),isMedia:t,className:"clover-viewer-placeholder",children:(0,a.jsx)("img",{src:(null==s?void 0:s.id)||"",alt:d.join(),height:null==s?void 0:s.height,width:null==s?void 0:s.width})})},tu=n(2089);let tp=(0,z.zo)("canvas",{position:"absolute",width:"100%",height:"100%",zIndex:"0"}),th=l.forwardRef((e,t)=>{let n=l.useRef(null),i=(0,l.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 r=new AudioContext,a=r.createMediaElementSource(o),l=r.createAnalyser(),s=n.current;if(!s)return;s.width=o.offsetWidth,s.height=o.offsetHeight;let d=s.getContext("2d");a.connect(l),l.connect(r.destination),l.fftSize=256;let c=l.frequencyBinCount,u=new Uint8Array(c);setInterval(function(){!function(e,t,n,i,o,r){let a;let l=o/n*2.6,s=0;e.getByteFrequencyData(i),t.fillStyle="#000000",t.fillRect(0,0,o,r);for(let e=0;e{t&&t.current&&(t.current.onplay=i)},[i,t]),(0,a.jsx)(tp,{ref:n,role:"presentation"})}),tm=(0,z.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 tg=e=>{let{resource:t,ignoreCaptionLabels:n}=e,i=en(t.label,"en");return Array.isArray(i)&&i.some(e=>n.includes(e))?null:(0,a.jsx)("track",{src:t.id,label:Array.isArray(i)?i[0]:i,srcLang:"en","data-testid":"player-track"},t.id)};let tf=["application/vnd.apple.mpegurl","vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"];var tx=e=>{let{allSources:t,annotationResources:n,painting:i}=e,[o,r]=l.useState(0),[s,d]=l.useState(),c=l.useRef(null),u=(null==i?void 0:i.type)==="Sound",{activeCanvas:p,configOptions:h,vault:m}=b();return(0,l.useEffect)(()=>{if(!i.id||!c.current)return;if(null==c?void 0:c.current){let e=c.current;e.src=i.id,e.load()}if("m3u8"!==i.id.split(".").pop()&&i.format&&!tf.includes(i.format))return;let e=new tu.ZP({xhrSetup:function(e,t){e.withCredentials=!!h.withCredentials}});return e.attachMedia(c.current),e.on(tu.ZP.Events.MEDIA_ATTACHED,function(){e.loadSource(i.id)}),e.on(tu.ZP.Events.ERROR,function(t,n){if(n.fatal)switch(n.type){case tu.ZP.ErrorTypes.NETWORK_ERROR:console.error("fatal ".concat(t," network error encountered, try to recover")),e.startLoad();break;case tu.ZP.ErrorTypes.MEDIA_ERROR:console.error("fatal ".concat(t," media error encountered, try to recover")),e.recoverMediaError();break;default:e.destroy()}}),()=>{if(e&&c.current){let t=c.current;e.detachMedia(),e.destroy(),t.currentTime=0}}},[h.withCredentials,i.id]),(0,l.useEffect)(()=>{var e,t,n,i;let r=m.get(p),a=(null===(e=r.accompanyingCanvas)||void 0===e?void 0:e.id)?(0,w.G)(m,null===(t=r.accompanyingCanvas)||void 0===t?void 0:t.id):null,l=(null===(n=r.placeholderCanvas)||void 0===n?void 0:n.id)?(0,w.G)(m,null===(i=r.placeholderCanvas)||void 0===i?void 0:i.id):null;a&&l?0===o?d(l[0].id):d(a[0].id):(a&&d(a[0].id),l&&d(l[0].id))},[p,o,m]),(0,l.useEffect)(()=>{if(null==c?void 0:c.current){let e=c.current;return null==e||e.addEventListener("timeupdate",()=>r(e.currentTime)),()=>document.removeEventListener("timeupdate",()=>{})}},[]),(0,a.jsxs)(tm,{css:{backgroundColor:h.canvasBackgroundColor,maxHeight:h.canvasHeight,position:"relative"},"data-testid":"player-wrapper",className:"clover-viewer-player-wrapper",children:[(0,a.jsxs)("video",{id:"clover-iiif-video",ref:c,controls:!0,height:i.height,width:i.width,crossOrigin:"anonymous",poster:s,style:{maxHeight:h.canvasHeight,position:"relative",zIndex:"1"},children:[t.map(e=>(0,a.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=>{m.get(e.id).body.forEach(e=>{let n=m.get(e.id);t.push(n)})}),t.map(e=>(0,a.jsx)(tg,{resource:e,ignoreCaptionLabels:h.ignoreCaptionLabels||[]},e.id))}),"Sorry, your browser doesn't support embedded videos."]},i.id),u&&(0,a.jsx)(th,{ref:c})]})};let tv=()=>(0,a.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,a.jsx)("title",{id:"close-svg-title",children:"close"}),(0,a.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"})]}),tb=e=>{let{isMedia:t}=e;return(0,a.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,a.jsx)("title",{id:"open-svg-title",children:"open"}),t?(0,a.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,a.jsxs)(a.Fragment,{children:[(0,a.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,a.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 tj=e=>{let{handleToggle:t,isInteractive:n,isMedia:i}=e;return(0,a.jsx)(e6,{onClick:t,isInteractive:n,isMedia:i,"data-testid":"placeholder-toggle",children:n?(0,a.jsx)(tv,{}):(0,a.jsx)(tb,{isMedia:i})})},ty=e=>{var t,n,i,o,r,s;let{activeCanvas:c,annotationResources:u,isMedia:p,painting:h}=e,[m,g]=l.useState(0),[f,x]=l.useState(!1),{configOptions:v,customDisplays:y,openSeadragonViewer:w,vault:C,viewerId:S}=b(),k=j(),z=C.get(c),I=null==z?void 0:null===(t=z.placeholderCanvas)||void 0===t?void 0:t.id,A=!!I,E=(null==h?void 0:h.length)>1,M=I&&!f&&!p,$="".concat(S,"-").concat((0,d.un)(c+m)),T=y.find(e=>{let t=!1,{canvasId:n,paintingFormat:i}=e.target;if(Array.isArray(n)&&n.length>0&&(t=n.includes(c)),Array.isArray(i)&&i.length>0){var o;let e=(null===(o=h[m])||void 0===o?void 0:o.format)||"";t=!!(e&&i.includes(e))}return t}),L=[];null===(i=u[0])||void 0===i||null===(n=i.items)||void 0===n||n.forEach(e=>{let t=C.get(e.id);L.push(t)}),(0,l.useEffect)(()=>{var e;L&&w&&(null===(e=v.annotationOverlays)||void 0===e?void 0:e.renderOverlays)&&(0,ea.zG)(w,z,v,L)},[null==z?void 0:z.id,L,w,null===(o=v.annotationOverlays)||void 0===o?void 0:o.renderOverlays]);let R=null==T?void 0:null===(r=T.display)||void 0===r?void 0:r.component;return(0,a.jsxs)(e8,{className:"clover-viewer-painting",children:[(0,a.jsxs)(e7,{style:{backgroundColor:v.canvasBackgroundColor,height:"auto"===v.canvasHeight?"100%":v.canvasHeight},children:[I&&!p&&(0,a.jsx)(tj,{handleToggle:()=>x(!f),isInteractive:f,isMedia:p}),M&&!p&&(0,a.jsx)(tc,{isMedia:p,label:null==z?void 0:z.label,placeholderCanvas:I,setIsInteractive:x}),!M&&!T&&(p?(0,a.jsx)(tx,{allSources:h,painting:h[m],annotationResources:u}):h&&(0,a.jsx)(td.default,{_cloverViewerHasPlaceholder:A,body:h[m],instanceId:$,openSeadragonCallback:e=>{e&&(null==w?void 0:w.id)!=="openseadragon-".concat($)&&k({type:"updateOpenSeadragonViewer",openSeadragonViewer:e})},openSeadragonConfig:v.openSeadragon},$)),!M&&R&&(0,a.jsx)(R,{id:c,annotationBody:h[m],...null==T?void 0:T.display.componentProps})]}),E&&(0,a.jsx)(tl,{value:null===(s=h[m])||void 0===s?void 0:s.id,onValueChange:e=>{g(h.findIndex(t=>t.id===e))},maxHeight:"200px",children:null==h?void 0:h.map(e=>(0,a.jsx)(ts,{value:null==e?void 0:e.id,label:null==e?void 0:e.label},null==e?void 0:e.id))})]})},tw=e=>{let{activeCanvas:t,annotationResources:n,isAudioVideo:i,items:o,painting:r}=e,{isInformationOpen:l,configOptions:s}=b(),{informationPanel:d}=s,c=(null==d?void 0:d.renderAbout)&&l,u=(null==d?void 0:d.renderAnnotation)&&n.length>0&&!d.open;return(0,a.jsxs)(A,{className:"clover-viewer-content","data-testid":"clover-viewer-content",children:[(0,a.jsxs)(E,{children:[(0,a.jsx)(ty,{activeCanvas:t,annotationResources:n,isMedia:i,painting:r}),c&&(0,a.jsx)(M,{children:(0,a.jsx)("span",{children:l?"View Items":"More Information"})}),o.length>1&&(0,a.jsx)(I,{className:"clover-viewer-media-wrapper",children:(0,a.jsx)(e4,{items:o,activeItem:0})})]}),(c||u)&&(0,a.jsx)(T,{children:(0,a.jsx)($,{children:(0,a.jsx)(eC,{activeCanvas:t,annotationResources:n})})})]})};let tC=(0,z.zo)(eZ.Trigger,{width:"30px",padding:"5px"}),tS=(0,z.zo)(eZ.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"}}}),tk=(0,z.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"}}),tz=(0,z.zo)("header",{display:"flex",backgroundColor:"transparent !important",justifyContent:"space-between",alignItems:"flex-start",width:"100%",["> ".concat(tr)]:{flexGrow:"1",flexShrink:"0"},form:{flexGrow:"0",flexShrink:"1"}}),tI=(0,z.zo)("div",{display:"flex",alignItems:"flex-end",justifyContent:"flex-end",padding:"1rem",flexShrink:"0",flexGrow:"1"});var tA=()=>{var e;let t=j(),{activeManifest:n,collection:i,configOptions:o,vault:r}=b(),l=null==o?void 0:o.canvasHeight;return(0,a.jsx)("div",{style:{margin:"0.75rem"},children:(0,a.jsx)(tl,{label:i.label,maxHeight:l,value:n,onValueChange:e=>{t({type:"updateActiveManifest",manifestId:e}),t({type:"updateViewerId",viewerId:(0,c.Z)()})},children:null==i?void 0:null===(e=i.items)||void 0===e?void 0:e.map(e=>(0,a.jsx)(ts,{value:e.id,thumbnail:(null==e?void 0:e.thumbnail)?r.get(null==e?void 0:e.thumbnail):void 0,label:e.label},e.id))})})};let tE=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2500,[n,i]=(0,l.useState)(),o=(0,l.useCallback)(()=>{navigator.clipboard.writeText(e).then(()=>i("copied"),()=>i("failed"))},[e]);return(0,l.useEffect)(()=>{if(!n)return;let e=setTimeout(()=>i(void 0),t);return()=>clearTimeout(e)},[n]),[n,o]},tM=(0,z.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"}),t$=e=>{let{status:t}=e;return t?(0,a.jsx)(tM,{"data-copy-status":t,children:t}):null};var tT=e=>{let{textPrompt:t,textToCopy:n}=e,[i,o]=tE(n);return(0,a.jsxs)("button",{onClick:o,children:[t," ",(0,a.jsx)(t$,{status:i})]})},tL=()=>{let e="#ed1d33",t="#2873ab";return(0,a.jsxs)("svg",{viewBox:"0 0 493.35999 441.33334",id:"iiif-logo",version:"1.1",children:[(0,a.jsx)("title",{children:"IIIF Manifest Options"}),(0,a.jsx)("g",{transform:"matrix(1.3333333,0,0,-1.3333333,0,441.33333)",children:(0,a.jsxs)("g",{transform:"scale(0.1)",children:[(0,a.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,a.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,a.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,a.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,a.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,a.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,a.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"})]})})]})},tR=n(2472);let tF=(0,z.zo)(tR.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"}}),tH=(0,z.zo)(tR.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))"}}),tO=(0,z.zo)("label",{fontSize:"0.8333rem",fontWeight:"400",lineHeight:"1em",userSelect:"none",cursor:"pointer",paddingRight:"0.618rem"}),tV=(0,z.zo)("form",{display:"flex",flexShrink:"0",flexGrow:"1",alignItems:"center",marginLeft:"1.618rem"});var tP=()=>{var e;let{configOptions:t}=b(),n=j(),[i,o]=(0,l.useState)(null==t?void 0:null===(e=t.informationPanel)||void 0===e?void 0:e.open);return(0,l.useEffect)(()=>{n({type:"updateInformationOpen",isInformationOpen:i})},[i,n]),(0,a.jsxs)(tV,{children:[(0,a.jsx)(tO,{htmlFor:"information-toggle",css:i?{opacity:"1"}:{},children:"More Information"}),(0,a.jsx)(tF,{checked:i,onCheckedChange:()=>o(!i),id:"information-toggle","aria-label":"information panel toggle",name:"toggled?",children:(0,a.jsx)(tH,{})})]})};let tB=(0,z.zo)(eZ.Trigger,{width:"30px",padding:"5px"}),tW=(0,z.zo)(tS,{h3:{color:"$primaryAlt",fontSize:"$2",fontWeight:"700",margin:"$2 0"},button:{},"& ul li":{marginBottom:"$1"}});var tN=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 t_(e,t){return e.map(e=>{let{format:n,id:i,label:o}=e;return{format:n,id:function(e){let{vault:t}=b();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,tN.M)(o)||t}})}var tD=()=>{let{allPages:e,individualPages:t}=function(){let e=function(){let{activeCanvas:e,activeManifest:t,vault:n}=b(),[i,o]=(0,l.useState)({root:[],canvas:[]});return(0,l.useEffect)(()=>{let i=n.get(t),r=n.get(e),a=null==i?void 0:i.rendering,l=null==r?void 0:r.rendering;o({root:tG(a,n),canvas:tG(l,n)})},[e,t,n]),{...i}}();return{allPages:t_((null==e?void 0:e.root)||[],"Root Rendering Label"),individualPages:t_((null==e?void 0:e.canvas)||[],"Canvas Rendering Label")}}(),n=e.length>0||t.length>0,i=e=>{window.open(e,"_blank")};return n?(0,a.jsxs)(eZ,{children:[(0,a.jsx)(tB,{"data-testid":"download-button",children:(0,a.jsx)(eP,{children:(0,a.jsx)(eP.Download,{})})}),(0,a.jsxs)(tW,{"data-testid":"download-content",children:[t.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h3",{children:"Individual Pages"}),(0,a.jsx)("ul",{children:t.map(e=>{let{format:t,id:n,label:o}=e;return(0,a.jsx)("li",{children:(0,a.jsxs)("button",{onClick:()=>i(n),children:[o," (",t,")"]})},o)})})]}),e.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h3",{children:"All Pages"}),(0,a.jsx)("ul",{children:e.map(e=>{let{format:t,id:n,label:o}=e;return(0,a.jsx)("li",{children:(0,a.jsxs)("button",{onClick:()=>i(n),children:[o," (",t,")"]})},o)})})]})]})]}):null};let tU=e=>{let t=()=>!!window.matchMedia&&window.matchMedia(e).matches,[n,i]=(0,l.useState)(t);return(0,l.useEffect)(()=>{let e=()=>i(t);return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),n};var tq=e=>{let{manifestId:t,manifestLabel:n}=e,{collection:i,configOptions:o}=b(),{informationPanel:r,showDownload:l,showIIIFBadge:s,showTitle:d}=o,c=l||s||(null==r?void 0:r.renderToggle),u=tU(z.BC.sm);return(0,a.jsxs)(tz,{className:"clover-viewer-header",children:[(null==i?void 0:i.items)?(0,a.jsx)(tA,{}):(0,a.jsx)(tk,{className:d?"":"visually-hidden",children:d&&(0,a.jsx)(ep.__,{label:n,className:"label"})}),c&&(0,a.jsxs)(tI,{children:[l&&(0,a.jsx)(tD,{}),s&&(0,a.jsxs)(eZ,{children:[(0,a.jsx)(tC,{children:(0,a.jsx)(tL,{})}),(0,a.jsxs)(tS,{children:[(null==i?void 0:i.items)&&(0,a.jsx)("button",{onClick:e=>{e.preventDefault(),window.open(i.id,"_blank")},children:"View Collection"}),(0,a.jsx)("button",{onClick:e=>{e.preventDefault(),window.open(t,"_blank")},children:"View Manifest"})," ",(null==i?void 0:i.items)&&(0,a.jsx)(tT,{textPrompt:"Copy Collection URL",textToCopy:i.id}),(0,a.jsx)(tT,{textPrompt:"Copy Manifest URL",textToCopy:t})]})]}),(null==r?void 0:r.renderToggle)&&!u&&(0,a.jsx)(tP,{})]})]})};let tZ=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],[t,n]=(0,l.useState)(e);return(0,l.useLayoutEffect)(()=>{if(!t)return;let e=document.documentElement.style.overflow;return document.documentElement.style.overflow="hidden",()=>{document.documentElement.style.overflow=e}},[t]),(0,l.useEffect)(()=>{t!==e&&n(e)},[e]),[t,n]};var tY=e=>{var t;let{manifest:n,theme:i}=e,o=b(),r=j(),{activeCanvas:s,isInformationOpen:d,vault:c,configOptions:u}=o,p=(null==u?void 0:u.canvasHeight)&&["100%","auto"].includes(null==u?void 0:u.canvasHeight),[h,m]=(0,l.useState)(!1),[g,f]=(0,l.useState)(!1),[x,v]=(0,l.useState)([]),[I,A]=(0,l.useState)([]),[E,M]=tZ(!1),$=tU(z.BC.sm),T=(0,l.useCallback)(e=>{r({type:"updateInformationOpen",isInformationOpen:e})},[r]);return(0,l.useEffect)(()=>{var e;(null==u?void 0:null===(e=u.informationPanel)||void 0===e?void 0:e.open)&&T(!$)},[$,null==u?void 0:null===(t=u.informationPanel)||void 0===t?void 0:t.open,T]),(0,l.useEffect)(()=>{if(!$){M(!1);return}M(d)},[d,$,M]),(0,l.useEffect)(()=>{let e=(0,w.G)(c,s);e&&(f(["Sound","Video"].indexOf(e[0].type)>-1),v(e));let t=C(c,s);t.length>0&&r({type:"updateInformationOpen",isInformationOpen:!0}),A(t),m(0!==t.length)},[s,c,r]),(0,a.jsx)(S.SV,{FallbackComponent:k.Z,children:(0,a.jsx)(L,{className:"".concat(i," clover-viewer"),css:{background:null==u?void 0:u.background},"data-body-locked":E,"data-absolute-position":p,"data-information-panel":h,"data-information-panel-open":d,children:(0,a.jsxs)(y.fC,{open:d,onOpenChange:T,children:[(0,a.jsx)(tq,{manifestLabel:n.label,manifestId:n.id}),(0,a.jsx)(tw,{activeCanvas:s,painting:x,annotationResources:I,items:n.items,isAudioVideo:g})]})})})},tJ=n(458);let tX={ignoreCache:!1,headers:{Accept:"application/json, text/javascript, text/plain"},timeout:5e3,withCredentials:!1};function tQ(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 tK=n(2103);let t0=e=>{let{canvasIdCallback:t,customTheme:n,iiifContent:i,options:o}=e,r=j(),{activeCanvas:s,activeManifest:d,isLoaded:c,vault:u}=b(),[p,h]=(0,l.useState)(),[m,g]=(0,l.useState)(),f={};return(n&&(f=(0,tJ.jG)("custom",n)),(0,l.useEffect)(()=>{t&&t(s)},[s,t]),(0,l.useEffect)(()=>{d&&u.loadManifest(d).then(e=>{g(e),r({type:"updateActiveCanvas",canvasId:(0,tK.FO)(i,e)})}).catch(e=>{console.error("Manifest failed to load: ".concat(e))}).finally(()=>{r({type:"updateIsLoaded",isLoaded:!0})})},[i,d,r,u]),(0,l.useEffect)(()=>{r({type:"updateConfigOptions",configOptions:o});let e=(0,tK.Vu)(i);u.load(e).then(e=>{h(e)}).catch(e=>{console.error("The IIIF resource ".concat(i," failed to load: ").concat(e))})},[r,i,o,u]),(0,l.useEffect)(()=>{if((null==p?void 0:p.type)==="Collection"){r({type:"updateCollection",collection:p});let e=(0,tK.Mx)(i,p);e&&r({type:"updateActiveManifest",manifestId:e})}else(null==p?void 0:p.type)==="Manifest"&&r({type:"updateActiveManifest",manifestId:p.id})},[r,i,p]),c)?m&&m.items?0===m.items.length?(console.log("The IIIF manifest ".concat(i," does not contain canvases.")),(0,a.jsx)(a.Fragment,{})):(0,a.jsx)(tY,{manifest:m,theme:f},m.id):(console.log("The IIIF manifest ".concat(i," failed to load.")),(0,a.jsx)(a.Fragment,{})):(0,a.jsx)(a.Fragment,{children:"Loading"})};var t1=e=>{var t,n,i;let{canvasIdCallback:o=()=>{},customDisplays:r=[],customTheme:l,iiifContent:d,id:c,manifestId:u,options:h}=e,g=d;c&&(g=c),u&&(g=u);let f=p(null==h?void 0:null===(n=h.informationPanel)||void 0===n?void 0:null===(t=n.vtt)||void 0===t?void 0:t.autoScroll);return(0,a.jsx)(v,{initialState:{...m,customDisplays:r,isAutoScrollEnabled:f.enabled,isInformationOpen:!!(null==h?void 0:null===(i=h.informationPanel)||void 0===i?void 0:i.open),vault:new s.j({customFetcher:e=>(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:tX,n=t.headers||tX.headers;return new Promise((i,o)=>{let r=new XMLHttpRequest;r.open("get",e),r.withCredentials=t.withCredentials,n&&Object.keys(n).forEach(e=>r.setRequestHeader(e,n[e])),r.onload=()=>{i({ok:r.status>=200&&r.status<300,status:r.status,statusText:r.statusText,headers:r.getAllResponseHeaders(),data:r.responseText,json:()=>JSON.parse(r.responseText)})},r.onerror=()=>{o(tQ(r,"Failed to make request."))},r.ontimeout=()=>{o(tQ(r,"Request took longer than expected."))},r.send()})})(e,{withCredentials:null==h?void 0:h.withCredentials,headers:null==h?void 0:h.requestHeaders}).then(e=>JSON.parse(e.data))})},children:(0,a.jsx)(t0,{iiifContent:g,canvasIdCallback:o,customTheme:l,options:h})})}},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 r,a;o.annotationPage=e.get(o.canvas.items[0]),o.accompanyingCanvas=(null===(r=o.canvas)||void 0===r?void 0:r.accompanyingCanvas)?e.get(null===(a=o.canvas)||void 0===a?void 0:a.accompanyingCanvas):void 0}if(o.annotationPage){let r=e.get(o.annotationPage.items).map(t=>({body:e.get(t.body[0].id),motivation:t.motivation,type:"Annotation"})),a=[];r.forEach(t=>{"Choice"===t.body.type?t.body.items.forEach(n=>a.push({...t,id:n.id,body:e.get(n.id)})):a.push(t)}),o.annotations=a.filter(o=>{if(o){if(!o.body||!o.motivation){console.error("Invalid annotation after Hyperion parsing: missing either 'body' or 'motivation'",o);return}let r=o.body;Array.isArray(r)&&(r=r[0]);let a=e.get(r.id);if(a)switch(n){case"painting":return o.target===t.id&&o.motivation&&"painting"===o.motivation[0]&&i.includes(a.type)&&(o.body=a),!!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 6e39bf75..5ea89291 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 2c6d82b2..11129dd8 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 228bc5ee..e2de879b 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 676a45a2..7381d69f 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 45793684..3d5ef83a 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 72f378ca..b4eb5353 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 0c4b3199..b5c5f07e 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 38448226..ba5aa8e2 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 586f6ec7..5ca45f46 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 0f442c96..f5eed736 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 be789baa..f4df06f9 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 5eff3404..e2cfae55 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 e1a18c65..87defa0d 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 6077fb6d..34a9e5f2 100644 --- a/docs/viewer.html +++ b/docs/viewer.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 209deg; --nextra-primary-saturation: 100%; } -
Documentation
Viewer

Viewer

+
-

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.


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 e78ed8f0..cbe2fd74 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 78b18d76..b64aa31e 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