UNPKG

universalviewer

Version:

The Universal Viewer is a community-developed open source project on a mission to help you share your 📚📜📰📽️📻🗿 with the 🌎

1 lines 115 kB
import{c as K,d as U}from"./chunk-L67DAW3A.js";var k=K(P=>{"use strict";Object.defineProperty(P,"__esModule",{value:!0});P.ViewingHint=P.ViewingDirection=P.ServiceType=P.ServiceProfile=P.RenderingFormat=P.MediaType=P.IIIFResourceType=P.ExternalResourceType=P.Behavior=P.AnnotationMotivation=void 0;var J;(function(a){a.BOOKMARKING="oa:bookmarking",a.CLASSIFYING="oa:classifying",a.COMMENTING="oa:commenting",a.DESCRIBING="oa:describing",a.EDITING="oa:editing",a.HIGHLIGHTING="oa:highlighting",a.IDENTIFYING="oa:identifying",a.LINKING="oa:linking",a.MODERATING="oa:moderating",a.PAINTING="sc:painting",a.QUESTIONING="oa:questioning",a.REPLYING="oa:replying",a.TAGGING="oa:tagging",a.TRANSCRIBING="oad:transcribing"})(J||(P.AnnotationMotivation=J={}));var Z;(function(a){a.AUTO_ADVANCE="auto-advance",a.CONTINUOUS="continuous",a.FACING_PAGES="facing-pages",a.HIDDEN="hidden",a.INDIVIDUALS="individuals",a.MULTI_PART="multi-part",a.NO_NAV="no-nav",a.NON_PAGED="non-paged",a.PAGED="paged",a.REPEAT="repeat",a.SEQUENCE="sequence",a.THUMBNAIL_NAV="thumbnail-nav",a.TOGETHER="together",a.UNORDERED="unordered"})(Z||(P.Behavior=Z={}));var $;(function(a){a.CANVAS="canvas",a.CHOICE="choice",a.OA_CHOICE="oa:choice",a.CONTENT_AS_TEXT="contentastext",a.DATASET="dataset",a.DOCUMENT="document",a.IMAGE="image",a.MODEL="model",a.MOVING_IMAGE="movingimage",a.PDF="pdf",a.PHYSICAL_OBJECT="physicalobject",a.SOUND="sound",a.TEXT="text",a.TEXTUALBODY="textualbody",a.VIDEO="video"})($||(P.ExternalResourceType=$={}));var ee;(function(a){a.ANNOTATION="annotation",a.ANNOTATION_COLLECTION="annotationcollection",a.ANNOTATION_PAGE="annotationpage",a.CANVAS="canvas",a.COLLECTION="collection",a.MANIFEST="manifest",a.RANGE="range",a.SEQUENCE="sequence"})(ee||(P.IIIFResourceType=ee={}));var te;(function(a){a.APNG="image/apng",a.AUDIO_MP4="audio/mp4",a.AUDIO_OGG="audio/ogg",a.AVIF="audio/avif",a.CORTO="application/corto",a.DICOM="application/dicom",a.DRACO="application/draco",a.EPUB="application/epub+zip",a.GIF="image/gif",a.GIRDER="image/vnd.kitware.girder",a.GLB="model/gltf-binary",a.GLTF="model/gltf+json",a.IIIF_PRESENTATION_2='application/ld+json;profile="http://iiif.io/api/presentation/2/context.json"',a.IIIF_PRESENTATION_3='application/ld+json;profile="http://iiif.io/api/presentation/3/context.json"',a.JPG="image/jpeg",a.M3U8="application/vnd.apple.mpegurl",a.MP3="audio/mp3",a.MPEG="audio/mpeg",a.MPEG_DASH="application/dash+xml",a.OBJ="model/obj",a.OPF="application/oebps-package+xml",a.PDF="application/pdf",a.PLY="application/ply",a.PNG="image/png",a.SVG="image/svg+xml",a.THREEJS="application/vnd.threejs+json",a.USDZ="model/vnd.usd+zip",a.VIDEO_MP4="video/mp4",a.VIDEO_OGG="video/ogg",a.WAV="audio/wav",a.WEBM="video/webm",a.WEBP="image/webp"})(te||(P.MediaType=te={}));var ne;(function(a){a.DOC="application/msword",a.DOCX="application/vnd.openxmlformats-officedocument.wordprocessingml.document",a.ODT="application/vnd.oasis.opendocument.text",a.PDF="application/pdf"})(ne||(P.RenderingFormat=ne={}));var re;(function(a){a.IMAGE_0_COMPLIANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/compliance.html#level0",a.IMAGE_0_COMPLIANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/compliance.html#level1",a.IMAGE_0_COMPLIANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/compliance.html#level2",a.IMAGE_0_CONFORMANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/conformance.html#level0",a.IMAGE_0_CONFORMANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/conformance.html#level1",a.IMAGE_0_CONFORMANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/conformance.html#level2",a.IMAGE_1_COMPLIANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level0",a.IMAGE_1_COMPLIANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level1",a.IMAGE_1_COMPLIANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level2",a.IMAGE_1_CONFORMANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level0",a.IMAGE_1_CONFORMANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level1",a.IMAGE_1_CONFORMANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level2",a.IMAGE_1_LEVEL_0="http://iiif.io/api/image/1/level0.json",a.IMAGE_1_PROFILE_LEVEL_0="http://iiif.io/api/image/1/profiles/level0.json",a.IMAGE_1_LEVEL_1="http://iiif.io/api/image/1/level1.json",a.IMAGE_1_PROFILE_LEVEL_1="http://iiif.io/api/image/1/profiles/level1.json",a.IMAGE_1_LEVEL_2="http://iiif.io/api/image/1/level2.json",a.IMAGE_1_PROFILE_LEVEL_2="http://iiif.io/api/image/1/profiles/level2.json",a.IMAGE_2_LEVEL_0="http://iiif.io/api/image/2/level0.json",a.IMAGE_2_PROFILE_LEVEL_0="http://iiif.io/api/image/2/profiles/level0.json",a.IMAGE_2_LEVEL_1="http://iiif.io/api/image/2/level1.json",a.IMAGE_2_PROFILE_LEVEL_1="http://iiif.io/api/image/2/profiles/level1.json",a.IMAGE_2_LEVEL_2="http://iiif.io/api/image/2/level2.json",a.IMAGE_2_PROFILE_LEVEL_2="http://iiif.io/api/image/2/profiles/level2.json",a.AUTH_0_CLICK_THROUGH="http://iiif.io/api/auth/0/login/clickthrough",a.AUTH_0_LOGIN="http://iiif.io/api/auth/0/login",a.AUTH_0_LOGOUT="http://iiif.io/api/auth/0/logout",a.AUTH_0_RESTRICTED="http://iiif.io/api/auth/0/login/restricted",a.AUTH_0_TOKEN="http://iiif.io/api/auth/0/token",a.AUTH_1_CLICK_THROUGH="http://iiif.io/api/auth/1/clickthrough",a.AUTH_1_EXTERNAL="http://iiif.io/api/auth/1/external",a.AUTH_1_KIOSK="http://iiif.io/api/auth/1/kiosk",a.AUTH_1_LOGIN="http://iiif.io/api/auth/1/login",a.AUTH_1_LOGOUT="http://iiif.io/api/auth/1/logout",a.AUTH_1_PROBE="http://iiif.io/api/auth/1/probe",a.AUTH_1_TOKEN="http://iiif.io/api/auth/1/token",a.SEARCH_0="http://iiif.io/api/search/0/search",a.SEARCH_0_AUTO_COMPLETE="http://iiif.io/api/search/0/autocomplete",a.SEARCH_1="http://iiif.io/api/search/1/search",a.SEARCH_1_AUTO_COMPLETE="http://iiif.io/api/search/1/autocomplete",a.SEARCH_2="http://iiif.io/api/search/2/search",a.SEARCH_2_AUTO_COMPLETE="http://iiif.io/api/search/2/autocomplete",a.TRACKING_EXTENSIONS="http://universalviewer.io/tracking-extensions-profile",a.UI_EXTENSIONS="http://universalviewer.io/ui-extensions-profile",a.PRINT_EXTENSIONS="http://universalviewer.io/print-extensions-profile",a.SHARE_EXTENSIONS="http://universalviewer.io/share-extensions-profile",a.DOWNLOAD_EXTENSIONS="http://universalviewer.io/download-extensions-profile",a.OTHER_MANIFESTATIONS="http://iiif.io/api/otherManifestations.json",a.IXIF="http://wellcomelibrary.org/ld/ixif/0/alpha.json"})(re||(P.ServiceProfile=re={}));var ie;(function(a){a.IMAGE_SERVICE_2="ImageService2",a.IMAGE_SERVICE_3="ImageService3",a.SEARCH_SERVICE_2="SearchService2",a.AUTO_COMPLETE_SERVICE_2="AutoCompleteService2"})(ie||(P.ServiceType=ie={}));var oe;(function(a){a.BOTTOM_TO_TOP="bottom-to-top",a.LEFT_TO_RIGHT="left-to-right",a.RIGHT_TO_LEFT="right-to-left",a.TOP_TO_BOTTOM="top-to-bottom"})(oe||(P.ViewingDirection=oe={}));var ae;(function(a){a.CONTINUOUS="continuous",a.INDIVIDUALS="individuals",a.NON_PAGED="non-paged",a.PAGED="paged",a.TOP="top"})(ae||(P.ViewingHint=ae={}))});var F=K((H,W)=>{(function(a,i){typeof H=="object"&&typeof W=="object"?W.exports=i():typeof define=="function"&&define.amd?define("manifesto",[],i):typeof H=="object"?H.manifesto=i():a.manifesto=i()})(Object(typeof self<"u"?self:H),()=>(()=>{var a={7019(l,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.CONTINUE=100,r.SWITCHING_PROTOCOLS=101,r.PROCESSING=102,r.OK=200,r.CREATED=201,r.ACCEPTED=202,r.NON_AUTHORITATIVE_INFORMATION=203,r.NO_CONTENT=204,r.RESET_CONTENT=205,r.PARTIAL_CONTENT=206,r.MULTI_STATUS=207,r.MULTIPLE_CHOICES=300,r.MOVED_PERMANENTLY=301,r.MOVED_TEMPORARILY=302,r.SEE_OTHER=303,r.NOT_MODIFIED=304,r.USE_PROXY=305,r.TEMPORARY_REDIRECT=307,r.BAD_REQUEST=400,r.UNAUTHORIZED=401,r.PAYMENT_REQUIRED=402,r.FORBIDDEN=403,r.NOT_FOUND=404,r.METHOD_NOT_ALLOWED=405,r.NOT_ACCEPTABLE=406,r.PROXY_AUTHENTICATION_REQUIRED=407,r.REQUEST_TIME_OUT=408,r.CONFLICT=409,r.GONE=410,r.LENGTH_REQUIRED=411,r.PRECONDITION_FAILED=412,r.REQUEST_ENTITY_TOO_LARGE=413,r.REQUEST_URI_TOO_LARGE=414,r.UNSUPPORTED_MEDIA_TYPE=415,r.REQUESTED_RANGE_NOT_SATISFIABLE=416,r.EXPECTATION_FAILED=417,r.IM_A_TEAPOT=418,r.UNPROCESSABLE_ENTITY=422,r.LOCKED=423,r.FAILED_DEPENDENCY=424,r.UNORDERED_COLLECTION=425,r.UPGRADE_REQUIRED=426,r.PRECONDITION_REQUIRED=428,r.TOO_MANY_REQUESTS=429,r.REQUEST_HEADER_FIELDS_TOO_LARGE=431,r.INTERNAL_SERVER_ERROR=500,r.NOT_IMPLEMENTED=501,r.BAD_GATEWAY=502,r.SERVICE_UNAVAILABLE=503,r.GATEWAY_TIME_OUT=504,r.HTTP_VERSION_NOT_SUPPORTED=505,r.VARIANT_ALSO_NEGOTIATES=506,r.INSUFFICIENT_STORAGE=507,r.BANDWIDTH_LIMIT_EXCEEDED=509,r.NOT_EXTENDED=510,r.NETWORK_AUTHENTICATION_REQUIRED=511},3957(l,r){"use strict";var c,g,_,v,u,h,s,t,e,o;Object.defineProperty(r,"__esModule",{value:!0}),r.ViewingHint=r.ViewingDirection=r.ServiceType=r.ServiceProfile=r.RenderingFormat=r.MediaType=r.IIIFResourceType=r.ExternalResourceType=r.Behavior=r.AnnotationMotivation=void 0,function(n){n.BOOKMARKING="oa:bookmarking",n.CLASSIFYING="oa:classifying",n.COMMENTING="oa:commenting",n.DESCRIBING="oa:describing",n.EDITING="oa:editing",n.HIGHLIGHTING="oa:highlighting",n.IDENTIFYING="oa:identifying",n.LINKING="oa:linking",n.MODERATING="oa:moderating",n.PAINTING="sc:painting",n.QUESTIONING="oa:questioning",n.REPLYING="oa:replying",n.TAGGING="oa:tagging",n.TRANSCRIBING="oad:transcribing"}(c||(r.AnnotationMotivation=c={})),function(n){n.AUTO_ADVANCE="auto-advance",n.CONTINUOUS="continuous",n.FACING_PAGES="facing-pages",n.HIDDEN="hidden",n.INDIVIDUALS="individuals",n.MULTI_PART="multi-part",n.NO_NAV="no-nav",n.NON_PAGED="non-paged",n.PAGED="paged",n.REPEAT="repeat",n.SEQUENCE="sequence",n.THUMBNAIL_NAV="thumbnail-nav",n.TOGETHER="together",n.UNORDERED="unordered"}(g||(r.Behavior=g={})),function(n){n.CANVAS="canvas",n.CHOICE="choice",n.OA_CHOICE="oa:choice",n.CONTENT_AS_TEXT="contentastext",n.DATASET="dataset",n.DOCUMENT="document",n.IMAGE="image",n.MODEL="model",n.MOVING_IMAGE="movingimage",n.PDF="pdf",n.PHYSICAL_OBJECT="physicalobject",n.SOUND="sound",n.TEXT="text",n.TEXTUALBODY="textualbody",n.VIDEO="video"}(_||(r.ExternalResourceType=_={})),function(n){n.ANNOTATION="annotation",n.CANVAS="canvas",n.COLLECTION="collection",n.MANIFEST="manifest",n.RANGE="range",n.SEQUENCE="sequence"}(v||(r.IIIFResourceType=v={})),function(n){n.AUDIO_MP4="audio/mp4",n.CORTO="application/corto",n.DICOM="application/dicom",n.DRACO="application/draco",n.EPUB="application/epub+zip",n.GIRDER="image/vnd.kitware.girder",n.GLB="model/gltf-binary",n.GLTF="model/gltf+json",n.IIIF_PRESENTATION_2='application/ld+json;profile="http://iiif.io/api/presentation/2/context.json"',n.IIIF_PRESENTATION_3='application/ld+json;profile="http://iiif.io/api/presentation/3/context.json"',n.JPG="image/jpeg",n.M3U8="application/vnd.apple.mpegurl",n.MP3="audio/mp3",n.MPEG="audio/mpeg",n.MPEG_DASH="application/dash+xml",n.OBJ="model/obj",n.OPF="application/oebps-package+xml",n.PDF="application/pdf",n.PLY="application/ply",n.THREEJS="application/vnd.threejs+json",n.USDZ="model/vnd.usd+zip",n.VIDEO_MP4="video/mp4",n.WAV="audio/wav",n.WEBM="video/webm"}(u||(r.MediaType=u={})),function(n){n.DOC="application/msword",n.DOCX="application/vnd.openxmlformats-officedocument.wordprocessingml.document",n.ODT="application/vnd.oasis.opendocument.text",n.PDF="application/pdf"}(h||(r.RenderingFormat=h={})),function(n){n.IMAGE_0_COMPLIANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/compliance.html#level0",n.IMAGE_0_COMPLIANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/compliance.html#level1",n.IMAGE_0_COMPLIANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/compliance.html#level2",n.IMAGE_0_CONFORMANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/conformance.html#level0",n.IMAGE_0_CONFORMANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/conformance.html#level1",n.IMAGE_0_CONFORMANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/conformance.html#level2",n.IMAGE_1_COMPLIANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level0",n.IMAGE_1_COMPLIANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level1",n.IMAGE_1_COMPLIANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level2",n.IMAGE_1_CONFORMANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level0",n.IMAGE_1_CONFORMANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level1",n.IMAGE_1_CONFORMANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level2",n.IMAGE_1_LEVEL_0="http://iiif.io/api/image/1/level0.json",n.IMAGE_1_PROFILE_LEVEL_0="http://iiif.io/api/image/1/profiles/level0.json",n.IMAGE_1_LEVEL_1="http://iiif.io/api/image/1/level1.json",n.IMAGE_1_PROFILE_LEVEL_1="http://iiif.io/api/image/1/profiles/level1.json",n.IMAGE_1_LEVEL_2="http://iiif.io/api/image/1/level2.json",n.IMAGE_1_PROFILE_LEVEL_2="http://iiif.io/api/image/1/profiles/level2.json",n.IMAGE_2_LEVEL_0="http://iiif.io/api/image/2/level0.json",n.IMAGE_2_PROFILE_LEVEL_0="http://iiif.io/api/image/2/profiles/level0.json",n.IMAGE_2_LEVEL_1="http://iiif.io/api/image/2/level1.json",n.IMAGE_2_PROFILE_LEVEL_1="http://iiif.io/api/image/2/profiles/level1.json",n.IMAGE_2_LEVEL_2="http://iiif.io/api/image/2/level2.json",n.IMAGE_2_PROFILE_LEVEL_2="http://iiif.io/api/image/2/profiles/level2.json",n.AUTH_0_CLICK_THROUGH="http://iiif.io/api/auth/0/login/clickthrough",n.AUTH_0_LOGIN="http://iiif.io/api/auth/0/login",n.AUTH_0_LOGOUT="http://iiif.io/api/auth/0/logout",n.AUTH_0_RESTRICTED="http://iiif.io/api/auth/0/login/restricted",n.AUTH_0_TOKEN="http://iiif.io/api/auth/0/token",n.AUTH_1_CLICK_THROUGH="http://iiif.io/api/auth/1/clickthrough",n.AUTH_1_EXTERNAL="http://iiif.io/api/auth/1/external",n.AUTH_1_KIOSK="http://iiif.io/api/auth/1/kiosk",n.AUTH_1_LOGIN="http://iiif.io/api/auth/1/login",n.AUTH_1_LOGOUT="http://iiif.io/api/auth/1/logout",n.AUTH_1_PROBE="http://iiif.io/api/auth/1/probe",n.AUTH_1_TOKEN="http://iiif.io/api/auth/1/token",n.SEARCH_0="http://iiif.io/api/search/0/search",n.SEARCH_0_AUTO_COMPLETE="http://iiif.io/api/search/0/autocomplete",n.SEARCH_1="http://iiif.io/api/search/1/search",n.SEARCH_1_AUTO_COMPLETE="http://iiif.io/api/search/1/autocomplete",n.TRACKING_EXTENSIONS="http://universalviewer.io/tracking-extensions-profile",n.UI_EXTENSIONS="http://universalviewer.io/ui-extensions-profile",n.PRINT_EXTENSIONS="http://universalviewer.io/print-extensions-profile",n.SHARE_EXTENSIONS="http://universalviewer.io/share-extensions-profile",n.DOWNLOAD_EXTENSIONS="http://universalviewer.io/download-extensions-profile",n.OTHER_MANIFESTATIONS="http://iiif.io/api/otherManifestations.json",n.IXIF="http://wellcomelibrary.org/ld/ixif/0/alpha.json"}(s||(r.ServiceProfile=s={})),function(n){n.IMAGE_SERVICE_2="ImageService2",n.IMAGE_SERVICE_3="ImageService3"}(t||(r.ServiceType=t={})),function(n){n.BOTTOM_TO_TOP="bottom-to-top",n.LEFT_TO_RIGHT="left-to-right",n.RIGHT_TO_LEFT="right-to-left",n.TOP_TO_BOTTOM="top-to-bottom"}(e||(r.ViewingDirection=e={})),function(n){n.CONTINUOUS="continuous",n.INDIVIDUALS="individuals",n.NON_PAGED="non-paged",n.PAGED="paged",n.TOP="top"}(o||(r.ViewingHint=o={}))},916(l,r,c){l.exports=self.fetch||(self.fetch=c(6782).default||c(6782))},1873(l,r,c){var g=c(9325).Symbol;l.exports=g},4528(l){l.exports=function(r,c){for(var g=-1,_=c.length,v=r.length;++g<_;)r[v+g]=c[g];return r}},3120(l,r,c){var g=c(4528),_=c(5891);l.exports=function v(u,h,s,t,e){var o=-1,n=u.length;for(s||(s=_),e||(e=[]);++o<n;){var f=u[o];h>0&&s(f)?h>1?v(f,h-1,s,t,e):g(e,f):t||(e[e.length]=f)}return e}},2552(l,r,c){var g=c(1873),_=c(659),v=c(9350),u=g?g.toStringTag:void 0;l.exports=function(h){return h==null?h===void 0?"[object Undefined]":"[object Null]":u&&u in Object(h)?_(h):v(h)}},7534(l,r,c){var g=c(2552),_=c(346);l.exports=function(v){return _(v)&&g(v)=="[object Arguments]"}},4840(l,r,c){var g=typeof c.g=="object"&&c.g&&c.g.Object===Object&&c.g;l.exports=g},659(l,r,c){var g=c(1873),_=Object.prototype,v=_.hasOwnProperty,u=_.toString,h=g?g.toStringTag:void 0;l.exports=function(s){var t=v.call(s,h),e=s[h];try{s[h]=void 0;var o=!0}catch{}var n=u.call(s);return o&&(t?s[h]=e:delete s[h]),n}},5891(l,r,c){var g=c(1873),_=c(2428),v=c(6449),u=g?g.isConcatSpreadable:void 0;l.exports=function(h){return v(h)||_(h)||!!(u&&h&&h[u])}},9350(l){var r=Object.prototype.toString;l.exports=function(c){return r.call(c)}},9325(l,r,c){var g=c(4840),_=typeof self=="object"&&self&&self.Object===Object&&self,v=g||_||Function("return this")();l.exports=v},5970(l,r,c){var g=c(3120);l.exports=function(_){return _!=null&&_.length?g(_,1):[]}},3176(l,r,c){var g=c(3120),_=1/0;l.exports=function(v){return v!=null&&v.length?g(v,_):[]}},2428(l,r,c){var g=c(7534),_=c(346),v=Object.prototype,u=v.hasOwnProperty,h=v.propertyIsEnumerable,s=g(function(){return arguments}())?g:function(t){return _(t)&&u.call(t,"callee")&&!h.call(t,"callee")};l.exports=s},6449(l){var r=Array.isArray;l.exports=r},346(l){l.exports=function(r){return r!=null&&typeof r=="object"}},3039(l,r,c){"use strict";var g,_=this&&this.__extends||(g=function(h,s){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},g(h,s)},function(h,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");function t(){this.constructor=h}g(h,s),h.prototype=s===null?Object.create(s):(t.prototype=s.prototype,new t)});Object.defineProperty(r,"__esModule",{value:!0}),r.Annotation=void 0;var v=c(4799),u=function(h){function s(t,e){return h.call(this,t,e)||this}return _(s,h),s.prototype.getBody=function(){var t=[],e=this.getProperty("body");if(e)if(Array.isArray(e))for(var o=0;o<e.length;o++)if((d=e[o]).items)for(var n=0;n<d.items.length;n++){var f=d.items[n];t.push(new v.AnnotationBody(f,this.options))}else t.push(new v.AnnotationBody(d,this.options));else if(e.items)for(o=0;o<e.items.length;o++){var d=e.items[o];t.push(new v.AnnotationBody(d,this.options))}else t.push(new v.AnnotationBody(e,this.options));return t},s.prototype.getMotivation=function(){return this.getProperty("motivation")||null},s.prototype.getOn=function(){return this.getProperty("on")},s.prototype.getTarget=function(){return this.getProperty("target")},s.prototype.getResource=function(){return new v.Resource(this.getProperty("resource"),this.options)},s}(v.ManifestResource);r.Annotation=u},2339(l,r,c){"use strict";var g,_=this&&this.__extends||(g=function(h,s){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},g(h,s)},function(h,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");function t(){this.constructor=h}g(h,s),h.prototype=s===null?Object.create(s):(t.prototype=s.prototype,new t)});Object.defineProperty(r,"__esModule",{value:!0}),r.AnnotationBody=void 0;var v=c(4799),u=function(h){function s(t,e){return h.call(this,t,e)||this}return _(s,h),s.prototype.getFormat=function(){var t=this.getProperty("format");return t?v.Utils.getMediaType(t):null},s.prototype.getType=function(){return this.getProperty("type")?v.Utils.normaliseType(this.getProperty("type")):null},s.prototype.getValue=function(){return this.getProperty("value")},s.prototype.getLanguage=function(){return this.getProperty("language")},s.prototype.getWidth=function(){return this.getProperty("width")},s.prototype.getHeight=function(){return this.getProperty("height")},s}(v.ManifestResource);r.AnnotationBody=u},3435(l,r,c){"use strict";var g,_=this&&this.__extends||(g=function(h,s){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},g(h,s)},function(h,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");function t(){this.constructor=h}g(h,s),h.prototype=s===null?Object.create(s):(t.prototype=s.prototype,new t)});Object.defineProperty(r,"__esModule",{value:!0}),r.AnnotationList=void 0;var v=c(4799),u=function(h){function s(t,e,o){var n=h.call(this,e)||this;return n.label=t,n.options=o,n}return _(s,h),s.prototype.getIIIFResourceType=function(){return v.Utils.normaliseType(this.getProperty("type"))},s.prototype.getLabel=function(){return this.label},s.prototype.getResources=function(){var t=this;return this.getProperty("resources").map(function(e){return new v.Annotation(e,t.options)})},s.prototype.load=function(){var t=this;return new Promise(function(e,o){if(t.isLoaded)e(t);else{var n=t.__jsonld.id;n||(n=t.__jsonld["@id"]),v.Utils.loadManifest(n).then(function(f){t.__jsonld=f,t.context=t.getProperty("context"),t.id=t.getProperty("id"),t.isLoaded=!0,e(t)}).catch(o)}})},s}(v.JSONLDResource);r.AnnotationList=u},3556(l,r,c){"use strict";var g,_=this&&this.__extends||(g=function(h,s){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},g(h,s)},function(h,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");function t(){this.constructor=h}g(h,s),h.prototype=s===null?Object.create(s):(t.prototype=s.prototype,new t)});Object.defineProperty(r,"__esModule",{value:!0}),r.AnnotationPage=void 0;var v=c(4799),u=function(h){function s(t,e){return h.call(this,t,e)||this}return _(s,h),s.prototype.getItems=function(){return this.getProperty("items")},s.prototype.getAnnotations=function(){var t=[],e=this.getProperty("items");if(!e||!Array.isArray(e))return t;for(var o=0;o<e.length;o++){var n=new v.Annotation(e[o],this.options);t.push(n)}return t},s}(v.ManifestResource);r.AnnotationPage=u},8098(l,r,c){"use strict";var g,_=this&&this.__extends||(g=function(o,n){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,d){f.__proto__=d}||function(f,d){for(var E in d)Object.prototype.hasOwnProperty.call(d,E)&&(f[E]=d[E])},g(o,n)},function(o,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function f(){this.constructor=o}g(o,n),o.prototype=n===null?Object.create(n):(f.prototype=n.prototype,new f)}),v=this&&this.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(r,"__esModule",{value:!0}),r.Canvas=void 0;var u=c(3957),h=c(4799),s=v(c(5970)),t=v(c(3176)),e=function(o){function n(f,d){return o.call(this,f,d)||this}return _(n,o),n.prototype.getCanonicalImageUri=function(f){var d=null,E="default",y=f,O=y+",";if(this.externalResource&&this.externalResource.data&&this.externalResource.data["@id"])d=this.externalResource.data["@id"],y||(y=this.externalResource.data.width),this.externalResource.data["@context"]&&(this.externalResource.data["@context"].indexOf("/1.0/context.json")>-1||this.externalResource.data["@context"].indexOf("/1.1/context.json")>-1||this.externalResource.data["@context"].indexOf("/1/context.json")>-1)&&(E="native");else{var m=void 0;if((m=this.getImages())&&m.length){var I=m[0].getResource(),T=I.getServices();if(y||(y=I.getWidth()),A=T?T.find(function(b){return h.Utils.isImageProfile(b.getProfile())||h.Utils.isImageServiceType(b.getIIIFResourceType())}):null)d=A.id,E=h.Utils.getImageQuality(A.getProfile());else if(y===I.getWidth())return I.id}if((m=this.getContent())&&m.length){var A,L=m[0].getBody()[0];if(T=L.getServices(),y||(y=L.getWidth()),A=T?T.find(function(b){return h.Utils.isImageServiceType(b.getIIIFResourceType())}):null)d=A.id,E=h.Utils.getImageQuality(A.getProfile());else if(y===L.getWidth())return L.id}if(!d){var N=this.getProperty("thumbnail");if(N){if(typeof N=="string")return N;if(N["@id"])return N["@id"];if(N.length)return N[0].id}}}return d&&d.endsWith("/")&&(d=d.substr(0,d.length-1)),[d,"full",O,0,E+".jpg"].join("/")},n.prototype.getMaxDimensions=function(){var f,d=null;return this.externalResource&&this.externalResource.data&&this.externalResource.data.profile&&(f=this.externalResource.data.profile,Array.isArray(f)&&(f=f.filter(function(E){var y;return(y=E.maxWidth)!==null&&y!==void 0?y:E.maxwidth})[0])&&(d=new h.Size(f.maxWidth,f.maxHeight?f.maxHeight:f.maxWidth))),this.externalResource&&this.externalResource.data&&this.externalResource.data.maxWidth&&(d=new h.Size(this.externalResource.data.maxWidth,this.externalResource.data.maxHeight?this.externalResource.data.maxHeight:this.externalResource.data.maxWidth)),d},n.prototype.getContent=function(){var f=[],d=this.__jsonld.items||this.__jsonld.content;if(!d)return f;var E=null;if(d.length&&(E=new h.AnnotationPage(d[0],this.options)),!E)return f;for(var y=E.getAnnotations(),O=0;O<y.length;O++){var m=y[O];f.push(m)}return f},n.prototype.getAnnotations=function(){var f=[],d=this.__jsonld.annotations;if(!d||!Array.isArray(d))return f;for(var E=0;E<d.length;E++){var y=new h.AnnotationPage(d[E],this.options);f.push(y)}return f},n.prototype.getDuration=function(){return this.getProperty("duration")},n.prototype.getImages=function(){var f=[];if(!this.__jsonld.images)return f;for(var d=0;d<this.__jsonld.images.length;d++){var E=this.__jsonld.images[d],y=new h.Annotation(E,this.options);f.push(y)}return f},n.prototype.getIndex=function(){return this.getProperty("index")},n.prototype.getOtherContent=function(){var f=this,d=(Array.isArray(this.getProperty("otherContent"))?this.getProperty("otherContent"):[this.getProperty("otherContent")]).filter(function(E){return E&&typeof(y=E["@type"])=="string"&&y.toLowerCase()==y.toLowerCase();var y}).map(function(E,y){return new h.AnnotationList(E.label||"Annotation list ".concat(y),E,f.options)}).map(function(E){return E.load()});return Promise.all(d)},n.prototype.getWidth=function(){return this.getProperty("width")},n.prototype.getHeight=function(){return this.getProperty("height")},n.prototype.getViewingHint=function(){var f=this.getProperty("viewingHint");return Array.isArray(f)&&(f=f[0]),f||null},Object.defineProperty(n.prototype,"imageResources",{get:function(){var f=this,d=(0,t.default)([this.getImages().map(function(E){return E.getResource()}),this.getContent().map(function(E){return E.getBody()})]);return(0,s.default)(d.map(function(E){switch(E.getProperty("type").toLowerCase()){case u.ExternalResourceType.CHOICE:case u.ExternalResourceType.OA_CHOICE:return new n({images:(0,s.default)([E.getProperty("default"),E.getProperty("item")]).map(function(y){return{resource:y}})},f.options).getImages().map(function(y){return y.getResource()});default:return E}}))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"resourceAnnotations",{get:function(){return(0,t.default)([this.getImages(),this.getContent()])},enumerable:!1,configurable:!0}),n.prototype.resourceAnnotation=function(f){return this.resourceAnnotations.find(function(d){return d.getResource().id===f||(0,s.default)(new Array(d.getBody())).some(function(E){return E.id===f})})},n.prototype.onFragment=function(f){var d=this.resourceAnnotation(f);if(d){var E=d.getProperty("on"),y=d.getProperty("target");if(E&&y){var O=(E||y).match(/xywh=(.*)$/);if(O)return O[1].split(",").map(function(m){return parseInt(m,10)})}}},Object.defineProperty(n.prototype,"iiifImageResources",{get:function(){return this.imageResources.filter(function(f){return f&&f.getServices()[0]&&f.getServices()[0].id})},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"imageServiceIds",{get:function(){return this.iiifImageResources.map(function(f){return f.getServices()[0].id})},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"aspectRatio",{get:function(){return this.getWidth()/this.getHeight()},enumerable:!1,configurable:!0}),n.prototype.getChoices=function(){for(var f,d=this,E=0,y=this.getContent();E<y.length;E++){var O=y[E].getProperty("body");if(O&&((f=O.type)===null||f===void 0?void 0:f.toLowerCase())===u.ExternalResourceType.CHOICE&&O.items&&O.items.length)return O.items.map(function(m){return new h.AnnotationBody(m,d.options)})}return[]},n}(h.Resource);r.Canvas=e},8214(l,r,c){"use strict";var g,_=this&&this.__extends||(g=function(s,t){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,o){e.__proto__=o}||function(e,o){for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])},g(s,t)},function(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=s}g(s,t),s.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)});Object.defineProperty(r,"__esModule",{value:!0}),r.Collection=void 0;var v=c(3957),u=c(4799),h=function(s){function t(e,o){var n=s.call(this,e,o)||this;return n.items=[],n._collections=null,n._manifests=null,e.__collection=n,n}return _(t,s),t.prototype.getCollections=function(){return this._collections?this._collections:this._collections=this.items.filter(function(e){return e.isCollection()})},t.prototype.getManifests=function(){return this._manifests?this._manifests:this._manifests=this.items.filter(function(e){return e.isManifest()})},t.prototype.getCollectionByIndex=function(e){for(var o,n=this.getCollections(),f=0;f<n.length;f++){var d=n[f];d.index===e&&(o=d)}if(o)return o.options.index=e,o.load();throw new Error("Collection index not found")},t.prototype.getManifestByIndex=function(e){for(var o,n=this.getManifests(),f=0;f<n.length;f++){var d=n[f];d.index===e&&(o=d)}if(o)return o.options.index=e,o.load();throw new Error("Manifest index not found")},t.prototype.getTotalCollections=function(){return this.getCollections().length},t.prototype.getTotalManifests=function(){return this.getManifests().length},t.prototype.getTotalItems=function(){return this.items.length},t.prototype.getViewingDirection=function(){return this.getProperty("viewingDirection")?this.getProperty("viewingDirection"):v.ViewingDirection.LEFT_TO_RIGHT},t.prototype.getBehavior=function(){var e=this.getProperty("behavior");return Array.isArray(e)&&(e=e[0]),e||null},t.prototype.getViewingHint=function(){var e=this.getProperty("viewingHint");return Array.isArray(e)&&(e=e[0]),e||null},t.prototype.getDefaultTree=function(){return s.prototype.getDefaultTree.call(this),this.defaultTree.data.type=u.Utils.normaliseType(u.TreeNodeType.COLLECTION),this._parseManifests(this),this._parseCollections(this),u.Utils.generateTreeNodeIds(this.defaultTree),this.defaultTree},t.prototype._parseManifests=function(e){if(e.getManifests()&&e.getManifests().length)for(var o=0;o<e.getManifests().length;o++){var n=e.getManifests()[o],f=n.getDefaultTree();f.label=n.parentLabel||n.getLabel().getValue(this.options.locale)||"manifest "+(o+1),f.navDate=n.getNavDate(),f.data.id=n.id,f.data.type=u.Utils.normaliseType(u.TreeNodeType.MANIFEST),e.defaultTree.addNode(f)}},t.prototype._parseCollections=function(e){if(e.getCollections()&&e.getCollections().length)for(var o=0;o<e.getCollections().length;o++){var n=e.getCollections()[o],f=n.getDefaultTree();f.label=n.parentLabel||n.getLabel().getValue(this.options.locale)||"collection "+(o+1),f.navDate=n.getNavDate(),f.data.id=n.id,f.data.type=u.Utils.normaliseType(u.TreeNodeType.COLLECTION),e.defaultTree.addNode(f)}},t}(u.IIIFResource);r.Collection=h},1858(l,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Duration=void 0;var c=function(){function g(_,v){this.start=_,this.end=v}return g.prototype.getLength=function(){return this.end-this.start},g}();r.Duration=c},2712(l,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0})},3167(l,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0})},672(l,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0})},7376(l,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0})},2184(l,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0})},107(l,r,c){"use strict";var g,_=this&&this.__extends||(g=function(s,t){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,o){e.__proto__=o}||function(e,o){for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])},g(s,t)},function(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=s}g(s,t),s.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)});Object.defineProperty(r,"__esModule",{value:!0}),r.IIIFResource=void 0;var v=c(4799),u=c(3957),h=function(s){function t(e,o){var n=s.call(this,e,o)||this;n.index=-1,n.isLoaded=!1;var f={defaultLabel:"-",locale:"en-GB",resource:n,pessimisticAccessControl:!1};return n.options=Object.assign(f,o),n}return _(t,s),t.prototype.getAttribution=function(){var e=this.getProperty("attribution");return e?v.PropertyValue.parse(e,this.options.locale):new v.PropertyValue([],this.options.locale)},t.prototype.getDescription=function(){var e=this.getProperty("description");return e===void 0&&(e=this.getProperty("summary")),e?v.PropertyValue.parse(e,this.options.locale):new v.PropertyValue([],this.options.locale)},t.prototype.getSummary=function(){var e=this.getProperty("summary");return e===void 0&&(e=this.getProperty("description")),e?v.PropertyValue.parse(e,this.options.locale):new v.PropertyValue([],this.options.locale)},t.prototype.getHomepage=function(){var e=this.getProperty("homepage");return e?typeof e=="string"?e:(Array.isArray(e)&&e.length&&(e=e[0]),e["@id"]||e.id):null},t.prototype.getIIIFResourceType=function(){return v.Utils.normaliseType(this.getProperty("type"))},t.prototype.getLogo=function(){var e=this.getProperty("logo");if(!e){var o=this.getProperty("provider");if(!o)return null;var n=o.find(function(f){return f.logo!==void 0});e=n&&n.logo!==void 0?n.logo:null}return e?typeof e=="string"?e:(Array.isArray(e)&&e.length&&(e=e[0]),e["@id"]||e?.id):null},t.prototype.getLicense=function(){return v.Utils.getLocalisedValue(this.getProperty("license"),this.options.locale)},t.prototype.getRights=function(){var e=this.getProperty("rights");return e?typeof e=="string"?e:(Array.isArray(e)&&e.length&&(e=e[0]),e["@id"]||e.id):null},t.prototype.getNavDate=function(){return new Date(this.getProperty("navDate"))},t.prototype.getRelated=function(){return this.getProperty("related")},t.prototype.getSeeAlso=function(){return this.getProperty("seeAlso")},t.prototype.getTrackingLabel=function(){var e=this.getService(u.ServiceProfile.TRACKING_EXTENSIONS);return e?e.getProperty("trackingLabel"):""},t.prototype.getDefaultTree=function(){return this.defaultTree=new v.TreeNode("root"),this.defaultTree.data=this,this.defaultTree},t.prototype.getRequiredStatement=function(){var e=null,o=this.getProperty("requiredStatement");if(o)(e=new v.LabelValuePair(this.options.locale)).parse(o);else{var n=this.getAttribution();n&&n.length&&((e=new v.LabelValuePair(this.options.locale)).value=n)}return e},t.prototype.isCollection=function(){return this.getIIIFResourceType()===u.IIIFResourceType.COLLECTION},t.prototype.isManifest=function(){return this.getIIIFResourceType()===u.IIIFResourceType.MANIFEST},t.prototype.load=function(){var e=this;return new Promise(function(o){if(e.isLoaded)o(e);else{var n=e.options;n.navDate=e.getNavDate();var f=e.__jsonld.id;f||(f=e.__jsonld["@id"]),v.Utils.loadManifest(f).then(function(d){e.parentLabel=e.getLabel().getValue(n.locale);var E=v.Deserialiser.parse(d,n);(e=Object.assign(e,E)).index=n.index,o(e)})}})},t}(v.ManifestResource);r.IIIFResource=h},6739(l,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0})},7436(l,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.JSONLDResource=void 0;var c=function(){function g(_){this.__jsonld=_,this.context=this.getProperty("context"),this.id=this.getProperty("id")}return g.prototype.getProperty=function(_){var v=null;return this.__jsonld&&((v=this.__jsonld[_])||(v=this.__jsonld["@"+_])),v},g}();r.JSONLDResource=c},2817(l,r,c){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.LabelValuePair=void 0;var g=c(4799),_=function(){function v(u){this.label=null,this.value=null,this.defaultLocale=u}return v.prototype.parse=function(u){this.resource=u,this.label=g.PropertyValue.parse(this.resource.label,this.defaultLocale),this.value=g.PropertyValue.parse(this.resource.value,this.defaultLocale)},v.prototype.getLabel=function(u){return this.label===null?null:(Array.isArray(u)&&!u.length&&(u=void 0),this.label.getValue(u||this.defaultLocale))},v.prototype.getLabels=function(u){return this.label===null?[]:(Array.isArray(u)&&!u.length&&(u=void 0),this.label.getValues(u||this.defaultLocale))},v.prototype.setLabel=function(u){this.label===null&&(this.label=new g.PropertyValue([])),this.label.setValue(u,this.defaultLocale)},v.prototype.getValue=function(u,h){return h===void 0&&(h="<br/>"),this.value===null?null:(Array.isArray(u)&&!u.length&&(u=void 0),this.value.getValue(u||this.defaultLocale,h))},v.prototype.getValues=function(u){return this.value===null?[]:(Array.isArray(u)&&!u.length&&(u=void 0),this.value.getValues(u||this.defaultLocale))},v.prototype.setValue=function(u){this.value===null&&(this.value=new g.PropertyValue([])),this.value.setValue(u,this.defaultLocale)},v}();r.LabelValuePair=_},72(l,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0})},212(l,r){"use strict";var c,g=this&&this.__extends||(c=function(v,u){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,s){h.__proto__=s}||function(h,s){for(var t in s)Object.prototype.hasOwnProperty.call(s,t)&&(h[t]=s[t])},c(v,u)},function(v,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");function h(){this.constructor=v}c(v,u),v.prototype=u===null?Object.create(u):(h.prototype=u.prototype,new h)});Object.defineProperty(r,"__esModule",{value:!0}),r.LanguageMap=void 0;var _=function(v){function u(){return v!==null&&v.apply(this,arguments)||this}return g(u,v),u.getValue=function(h,s){return h.getValue(s,"<br/>")},u.getValues=function(h,s){return h.getValues(s)},u}(Array);r.LanguageMap=_},4531(l,r,c){"use strict";var g,_=this&&this.__extends||(g=function(s,t){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,o){e.__proto__=o}||function(e,o){for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])},g(s,t)},function(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=s}g(s,t),s.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)});Object.defineProperty(r,"__esModule",{value:!0}),r.Manifest=void 0;var v=c(3957),u=c(4799),h=function(s){function t(e,o){var n=s.call(this,e,o)||this;if(n.index=0,n._allRanges=null,n.items=[],n._topRanges=[],n.__jsonld.structures&&n.__jsonld.structures.length)for(var f=n._getTopRanges(),d=0;d<f.length;d++){var E=f[d];n._parseRanges(E,String(d))}return n}return _(t,s),t.prototype.getPosterCanvas=function(){var e=this.getProperty("posterCanvas");return e&&(e=new u.Canvas(e,this.options)),e},t.prototype.getAccompanyingCanvas=function(){var e=this.getProperty("accompanyingCanvas");return e&&(e=new u.Canvas(e,this.options)),e},t.prototype.getBehavior=function(){var e=this.getProperty("behavior");return Array.isArray(e)&&(e=e[0]),e||null},t.prototype.getDefaultTree=function(){if(s.prototype.getDefaultTree.call(this),this.defaultTree.data.type=u.Utils.normaliseType(u.TreeNodeType.MANIFEST),!this.isLoaded)return this.defaultTree;var e=this.getTopRanges();return e.length&&e[0].getTree(this.defaultTree),u.Utils.generateTreeNodeIds(this.defaultTree),this.defaultTree},t.prototype._getTopRanges=function(){var e=[];if(this.__jsonld.structures&&this.__jsonld.structures.length){for(var o=0;o<this.__jsonld.structures.length;o++){var n=this.__jsonld.structures[o];n.viewingHint===v.ViewingHint.TOP&&e.push(n)}if(!e.length){var f={};f.ranges=this.__jsonld.structures,e.push(f)}}return e},t.prototype.getTopRanges=function(){return this._topRanges},t.prototype._getRangeById=function(e){if(this.__jsonld.structures&&this.__jsonld.structures.length)for(var o=0;o<this.__jsonld.structures.length;o++){var n=this.__jsonld.structures[o];if(n["@id"]===e||n.id===e)return n}return null},t.prototype._parseRanges=function(e,o,n){var f=null;if(typeof e=="string"&&(f=e,e=this._getRangeById(f)),e){var d=new u.Range(e,this.options);d.parentRange=n,d.path=o,n?n.items.push(d):this._topRanges.push(d);var E=e.items||e.members;if(E)for(var y=0;y<E.length;y++){var O=E[y];if(O["@type"]&&O["@type"].toLowerCase()==="sc:range"||O.type&&O.type.toLowerCase()==="range")this._parseRanges(O,o+"/"+y,d);else if(O["@type"]&&O["@type"].toLowerCase()==="sc:canvas"||O.type&&O.type.toLowerCase()==="canvas"){d.canvases||(d.canvases=[]);var m=O.id||O["@id"];d.canvases.push(m)}}else if(e.ranges)for(y=0;y<e.ranges.length;y++)this._parseRanges(e.ranges[y],o+"/"+y,d)}else console.warn("Range:",f,"does not exist")},t.prototype.getAllRanges=function(){if(this._allRanges!=null)return this._allRanges;this._allRanges=[];for(var e=this.getTopRanges(),o=function(d){var E=e[d];E.id&&n._allRanges.push(E);var y=function(m,I){m.add(I);var T=I.getRanges();return T.length?T.reduce(y,m):m},O=Array.from(E.getRanges().reduce(y,new Set));n._allRanges=n._allRanges.concat(O)},n=this,f=0;f<e.length;f++)o(f);return this._allRanges},t.prototype.getRangeById=function(e){for(var o=this.getAllRanges(),n=0;n<o.length;n++){var f=o[n];if(f.id===e)return f}return null},t.prototype.getRangeByPath=function(e){for(var o=this.getAllRanges(),n=0;n<o.length;n++){var f=o[n];if(f.path===e)return f}return null},t.prototype.getSequences=function(){if(this.items.length)return this.items;var e=this.__jsonld.mediaSequences||this.__jsonld.sequences;if(e)for(var o=0;o<e.length;o++){var n=e[o],f=new u.Sequence(n,this.options);this.items.push(f)}else this.__jsonld.items&&(f=new u.Sequence(this.__jsonld.items,this.options),this.items.push(f));return this.items},t.prototype.getSequenceByIndex=function(e){return this.getSequences()[e]},t.prototype.getTotalSequences=function(){return this.getSequences().length},t.prototype.getManifestType=function(){var e=this.getService(v.ServiceProfile.UI_EXTENSIONS);return e?e.getProperty("manifestType"):u.ManifestType.EMPTY},t.prototype.isMultiSequence=function(){return this.getTotalSequences()>1},t.prototype.isPagingEnabled=function(){var e=this.getViewingHint();if(e)return e===v.ViewingHint.PAGED;var o=this.getBehavior();return!!o&&o===v.Behavior.PAGED},t.prototype.getViewingDirection=function(){return this.getProperty("viewingDirection")},t.prototype.getViewingHint=function(){var e=this.getProperty("viewingHint");return Array.isArray(e)&&(e=e[0]),e||null},t}(u.IIIFResource);r.Manifest=h},2315(l,r,c){"use strict";var g,_=this&&this.__extends||(g=function(s,t){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,o){e.__proto__=o}||function(e,o){for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])},g(s,t)},function(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=s}g(s,t),s.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)});Object.defineProperty(r,"__esModule",{value:!0}),r.ManifestResource=void 0;var v=c(4799),u=c(3957),h=function(s){function t(e,o){var n=s.call(this,e)||this;return n.options=o,n}return _(t,s),t.prototype.getIIIFResourceType=function(){return v.Utils.normaliseType(this.getProperty("type"))},t.prototype.getLabel=function(){var e=this.getProperty("label");return e?v.PropertyValue.parse(e,this.options.locale):new v.PropertyValue([],this.options.locale)},t.prototype.getDefaultLabel=function(){return this.getLabel().getValue(this.options.locale)},t.prototype.getMetadata=function(){var e=this.getProperty("metadata"),o=[];if(!e)return o;for(var n=0;n<e.length;n++){var f=e[n],d=new v.LabelValuePair(this.options.locale);d.parse(f),o.push(d)}return o},t.prototype.getRendering=function(e){for(var o=this.getRenderings(),n=0;n<o.length;n++){var f=o[n];if(f.getFormat()===e)return f}return null},t.prototype.getRenderings=function(){var e,o=[];if(!(e=this.__jsonld?this.__jsonld.rendering:this.rendering))return o;Array.isArray(e)||(e=[e]);for(var n=0;n<e.length;n++){var f=e[n];o.push(new v.Rendering(f,this.options))}return o},t.prototype.getRequiredStatement=function(){var e=null,o=this.getProperty("requiredStatement");return o&&(e=new v.LabelValuePair(this.options.locale)).parse(o),e},t.prototype.getService=function(e){return v.Utils.getService(this,e)},t.prototype.getServices=function(){return v.Utils.getServices(this)},t.prototype.getThumbnail=function(){var e=this.getProperty("thumbnail");return Array.isArray(e)&&(e=e[0]),e?new v.Thumbnail(e,this.options):null},t.prototype.isAnnotation=function(){return this.getIIIFResourceType()===u.IIIFResourceType.ANNOTATION},t.prototype.isCanvas=function(){return this.getIIIFResourceType()===u.IIIFResourceType.CANVAS},t.prototype.isCollection=function(){return this.getIIIFResourceType()===u.IIIFResourceType.COLLECTION},t.prototype.isManifest=function(){return this.getIIIFResourceType()===u.IIIFResourceType.MANIFEST},t.prototype.isRange=function(){return this.getIIIFResourceType()===u.IIIFResourceType.RANGE},t.prototype.isSequence=function(){return this.getIIIFResourceType()===u.IIIFResourceType.SEQUENCE},t}(v.JSONLDResource);r.ManifestResource=h},3043(l,r){"use strict";var c;Object.defineProperty(r,"__esModule",{value:!0}),r.ManifestType=void 0,function(g){g.EMPTY="",g.MANUSCRIPT="manuscript",g.MONOGRAPH="monograph"}(c||(r.ManifestType=c={}))},2006(l,r,c){"use strict";var g,_=this&&this.__extends||(g=function(s,t){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,o){e.__proto__=o}||function(e,o){for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])},g(s,t)},function(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=s}g(s,t),s.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)});Object.defineProperty(r,"__esModule",{value:!0}),r.PropertyValue=r.LocalizedValue=void 0;var v=c(41),u=function(){function s(t,e,o){o===void 0&&(o="none"),Array.isArray(t)&&t.length===1?this._value=t[0]:this._value=t,e!=="none"&&e!=="@none"||(e=void 0),this._locale=e,this._defaultLocale=o}return s.parseV2Value=function(t,e){return typeof t=="string"?new s(t,void 0,e):t["@value"]?new s(t["@value"],t["@language"],e):null},Object.defineProperty(s.prototype,"value",{get:function(){return Array.isArray(this._value)?this._value.join("<br/>"):this._value},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"locale",{get:function(){return this._locale===void 0?this._defaultLocale:this._locale},enumerable:!1,configurable:!0}),s.prototype.addValue=function(t){Array.isArray(this._value)||(this._value=[this._value]),Array.isArray(t)?this._value=this._value.concat(t):this._value.push(t)},s}();r.LocalizedValue=u;var h=function(s){function t(e,o){e===void 0&&(e=[]);var n=s.apply(this,e)||this;return n.__proto__=t.prototype,n._defaultLocale=o,n}return _(t,s),t.parse=function(e,o){if(!e)return new t([],o);if(Array.isArray(e)){var n=(f=e.map(function(d){return u.parseV2Value(d,o)}).filter(function(d){return d!==null})).reduce(function(d,E){var y=E._locale;return y||(y="none"),d[y]?d[y].addValue(E._value):d[y]=E,d},{});return new t(Object.values(n),o)}return typeof e=="string"?new t([new u(e,void 0,o)],o):e["@language"]||e["@value"]?new t((f=u.parseV2Value(e))!==null?[f]:[],o):new t(Object.keys(e).map(function(d){var E=e[d];if(!Array.isArray(E))throw new Error("A IIIF v3 localized property value must have an array as the value for a given language.");return new u(E,d,o)}),o);var f},t.prototype.getSuitableLocale=function(e){for(var o=Array.from(this.values()).map(function(T){return T._locale}).filter(function(T){return T!==void 0}),n=function(T){var A=o.find(function(L){return L===T});if(A)return{value:A}},f=0,d=e;f<d.length;f++){var E=n(d[f]);if(typeof E=="object")return E.value}for(var y=function(T){var A=o.find(function(L){return v.Utils.getInexactLocale(L)===v.Utils.getInexactLocale(T)});if(A)return{value:A}},O=0,m=e;O<m.length;O++){var I=y(m[O]);if(typeof I=="object")return I.value}},t.prototype.setValue=function(e,o){var n=void 0;if(o){var f=this.getSuitableLocale([o]);f&&(n=this.find(function(d){return d._locale===f}))}else n=this.find(function(d){return d._locale===void 0});n?n._value=e:this.push(new u(e,o,this._defaultLocale))},t.prototype.getValue=function(e,o){var n=this.getValues(e);return n.length===0?null:o?n.join(o):n[0]},t.prototype.getValues=function(e){if(!this.length)return[];var o;if(o=e?Array.isArray(e)?e:[e]:[],this.length===1&&this[0]._locale===void 0){var n=this[0]._value;return Array.isArray(n)?n:[n]}var f=this.getSuitableLocale(o);if(f)return n=this.find(function(y){return y._locale===f})._value,Array.isArray(n)?n:[n];var d=!this.find(function(y){return y._locale===void 0});if(d)return n=this[0]._value,Array.isArray(n)?n:[n];var E=this.find(function(y){return y._locale===void 0});return E?Array.isArray(E._value)?E._value:[E._value]:[]},t}(Array);r.PropertyValue=h},3845(l,r,c){"use strict";var g,_=this&&this.__extends||(g=function(s,t){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,o){e.__proto__=o}||function(e,o){for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])},g(s,t)},function(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.