From b0b4f79288dde8b3ad2548ea9d648ce91951c9e5 Mon Sep 17 00:00:00 2001 From: t11r <1674104+t11r@users.noreply.github.com> Date: Sat, 27 Aug 2022 19:29:03 +0200 Subject: [PATCH] 0.27.0 --- README.md | 10 +++++----- dist/tify.css | 2 +- dist/tify.js | 16 ++++++++-------- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index f879950c..894ce6db 100644 --- a/README.md +++ b/README.md @@ -23,17 +23,17 @@ Embed TIFY into your website in three easy steps: - Either download TIFY and copy the contents of the `dist` directory to your server: ``` html - - + + ``` - > To avoid issues with browser caching, add a query parameter with the current version, e.g. `?v0.26.1`. + > To avoid issues with browser caching, add a query parameter with the current version, e.g. `?v0.27.0`. - Or use [jsDelivr](https://www.jsdelivr.com/): ``` html - - + + ``` - Or `import` TIFY into your web application: diff --git a/dist/tify.css b/dist/tify.css index f3923795..1b101b05 100644 --- a/dist/tify.css +++ b/dist/tify.css @@ -1,5 +1,5 @@ /*! - * TIFY v0.26.1 + * TIFY v0.27.0 * (c) 2017-2022 Göttingen State and University Library (https://www.sub.uni-goettingen.de/en/) * AGPL-3.0 * https://tify.rocks/ diff --git a/dist/tify.js b/dist/tify.js index defc77d3..3e7e863b 100644 --- a/dist/tify.js +++ b/dist/tify.js @@ -1,26 +1,26 @@ /*! - * TIFY v0.26.1 + * TIFY v0.27.0 * (c) 2017-2022 Göttingen State and University Library (https://www.sub.uni-goettingen.de/en/) * AGPL-3.0 * https://tify.rocks/ */(function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/",i(i.s=0)})({0:function(e,t,i){e.exports=i("56d7")},"00ee":function(e,t,i){var n=i("b622"),r=n("toStringTag"),o={};o[r]="z",e.exports="[object z]"===String(o)},"06cf":function(e,t,i){var n=i("83ab"),r=i("c65b"),o=i("d1e7"),s=i("5c6c"),a=i("fc6a"),l=i("a04b"),c=i("1a2d"),u=i("0cfb"),h=Object.getOwnPropertyDescriptor;t.f=n?h:function(e,t){if(e=a(e),t=l(t),u)try{return h(e,t)}catch(i){}if(c(e,t))return s(!r(o.f,e,t),e[t])}},"07d2":function(e,t,i){"use strict";var n;(function(r){if("function"!==typeof o){var o=function(e){return e};o.nonNative=!0}const s=o("plaintext"),a=o("html"),l=o("comment"),c=/<(\w*)>/g,u=/<\/?([^\s\/>]+)/;function h(e,t,i){e=e||"",t=t||[],i=i||"";let n=p(t,i);return f(e,n)}function d(e,t){e=e||[],t=t||"";let i=p(e,t);return function(e){return f(e||"",i)}}function p(e,t){return e=v(e),{allowable_tags:e,tag_replacement:t,state:s,tag_buffer:"",depth:0,in_quote_char:""}}function f(e,t){if("string"!=typeof e)throw new TypeError("'html' parameter must be a string");let i=t.allowable_tags,n=t.tag_replacement,r=t.state,o=t.tag_buffer,c=t.depth,u=t.in_quote_char,h="";for(let d=0,p=e.length;d":if(u)break;if(c){c--;break}u="",r=s,o+=">",i.has(g(o))?h+=o:h+=n,o="";break;case'"':case"'":u=t===u?"":u||t,o+=t;break;case"-":"":"--"==o.slice(-2)&&(r=s),o="";break;default:o+=t;break}}return t.state=r,t.tag_buffer=o,t.depth=c,t.in_quote_char=u,h}function v(e){let t=new Set;if("string"===typeof e){let i;while(i=c.exec(e))t.add(i[1])}else o.nonNative||"function"!==typeof e[o.iterator]?"function"===typeof e.forEach&&e.forEach(t.add,t):t=new Set(e);return t}function g(e){let t=u.exec(e);return t?t[1].toLowerCase():null}h.init_streaming_mode=d,n=function(){return h}.call(t,i,t,e),void 0===n||(e.exports=n)})()},"07fa":function(e,t,i){var n=i("50c4");e.exports=function(e){return n(e.length)}},"0a06":function(e,t,i){"use strict";var n=i("c532"),r=i("30b5"),o=i("f6b4"),s=i("5270"),a=i("4a7b"),l=i("83b9"),c=i("848b"),u=c.validators;function h(e){this.defaults=e,this.interceptors={request:new o,response:new o}}h.prototype.request=function(e,t){"string"===typeof e?(t=t||{},t.url=e):t=e||{},t=a(this.defaults,t),t.method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var i=t.transitional;void 0!==i&&c.assertOptions(i,{silentJSONParsing:u.transitional(u.boolean),forcedJSONParsing:u.transitional(u.boolean),clarifyTimeoutError:u.transitional(u.boolean)},!1);var n=[],r=!0;this.interceptors.request.forEach((function(e){"function"===typeof e.runWhen&&!1===e.runWhen(t)||(r=r&&e.synchronous,n.unshift(e.fulfilled,e.rejected))}));var o,l=[];if(this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)})),!r){var h=[s,void 0];Array.prototype.unshift.apply(h,n),h=h.concat(l),o=Promise.resolve(t);while(h.length)o=o.then(h.shift(),h.shift());return o}var d=t;while(n.length){var p=n.shift(),f=n.shift();try{d=p(d)}catch(v){f(v);break}}try{o=s(d)}catch(v){return Promise.reject(v)}while(l.length)o=o.then(l.shift(),l.shift());return o},h.prototype.getUri=function(e){e=a(this.defaults,e);var t=l(e.baseURL,e.url);return r(t,e.params,e.paramsSerializer)},n.forEach(["delete","get","head","options"],(function(e){h.prototype[e]=function(t,i){return this.request(a(i||{},{method:e,url:t,data:(i||{}).data}))}})),n.forEach(["post","put","patch"],(function(e){function t(t){return function(i,n,r){return this.request(a(r||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:i,data:n}))}}h.prototype[e]=t(),h.prototype[e+"Form"]=t(!0)})),e.exports=h},"0cfb":function(e,t,i){var n=i("83ab"),r=i("d039"),o=i("cc12");e.exports=!n&&!r((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},"0d51":function(e,t){var i=String;e.exports=function(e){try{return i(e)}catch(t){return"Object"}}},"0df6":function(e,t,i){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},"13d2":function(e,t,i){var n=i("d039"),r=i("1626"),o=i("1a2d"),s=i("83ab"),a=i("5e77").CONFIGURABLE,l=i("8925"),c=i("69f3"),u=c.enforce,h=c.get,d=Object.defineProperty,p=s&&!n((function(){return 8!==d((function(){}),"length",{value:8}).length})),f=String(String).split("String"),v=e.exports=function(e,t,i){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),i&&i.getter&&(t="get "+t),i&&i.setter&&(t="set "+t),(!o(e,"name")||a&&e.name!==t)&&(s?d(e,"name",{value:t,configurable:!0}):e.name=t),p&&i&&o(i,"arity")&&e.length!==i.arity&&d(e,"length",{value:i.arity});try{i&&o(i,"constructor")&&i.constructor?s&&d(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(r){}var n=u(e);return o(n,"source")||(n.source=f.join("string"==typeof t?t:"")),e};Function.prototype.toString=v((function(){return r(this)&&h(this).source||l(this)}),"toString")},1626:function(e,t){e.exports=function(e){return"function"==typeof e}},"1a2d":function(e,t,i){var n=i("e330"),r=i("7b0b"),o=n({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return o(r(e),t)}},"1b80":function(e,t){e.exports={computed:{customPageViewActive(){const{pages:e}=this.$root.options;return e.length>2||2===e.length&&(e[0]%2>0||e[1]!==e[0]+1)&&e[1]>0},isFirstPage(){return this.$root.options.pages[0]<2},isLastPage(){const{pages:e}=this.$root.options,t=this.$root.pageCount;return e[0]>=t||e[e.length-1]>=t}},methods:{goToFirstPage(){this.$root.setPage(1)},goToNextPage(){const{pages:e}=this.$root.options;let t=e[0]+1;e.length>1&&t%2>0&&t1&&t%2>0&&t>0&&(t-=1),this.$root.setPage(t)}}}},"1d2b":function(e,t,i){"use strict";e.exports=function(e,t){return function(){for(var i=new Array(arguments.length),n=0;n0)throw new Error("Invalid string. Length must be a multiple of 4");var i=e.indexOf("=");-1===i&&(i=t);var n=i===t?0:4-i%4;return[i,n]}function u(e){var t=c(e),i=t[0],n=t[1];return 3*(i+n)/4-n}function h(e,t,i){return 3*(t+i)/4-i}function d(e){var t,i,n=c(e),s=n[0],a=n[1],l=new o(h(e,s,a)),u=0,d=a>0?s-4:s;for(i=0;i>16&255,l[u++]=t>>8&255,l[u++]=255&t;return 2===a&&(t=r[e.charCodeAt(i)]<<2|r[e.charCodeAt(i+1)]>>4,l[u++]=255&t),1===a&&(t=r[e.charCodeAt(i)]<<10|r[e.charCodeAt(i+1)]<<4|r[e.charCodeAt(i+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t),l}function p(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function f(e,t,i){for(var n,r=[],o=t;ol?l:a+s));return 1===r?(t=e[i-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===r&&(t=(e[i-2]<<8)+e[i-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},"23cb":function(e,t,i){var n=i("5926"),r=Math.max,o=Math.min;e.exports=function(e,t){var i=n(e);return i<0?r(i+t,0):o(i,t)}},"23e7":function(e,t,i){var n=i("da84"),r=i("06cf").f,o=i("9112"),s=i("cb2d"),a=i("6374"),l=i("e893"),c=i("94ca");e.exports=function(e,t){var i,u,h,d,p,f,v=e.target,g=e.global,m=e.stat;if(u=g?n:m?n[v]||a(v,{}):(n[v]||{}).prototype,u)for(h in t){if(p=t[h],e.dontCallGetSet?(f=r(u,h),d=f&&f.value):d=u[h],i=c(g?h:v+(m?".":"#")+h,e.forced),!i&&void 0!==d){if(typeof p==typeof d)continue;l(p,d)}(e.sham||d&&d.sham)&&o(p,"sham",!0),s(u,h,p,e)}}},"241c":function(e,t,i){var n=i("ca84"),r=i("7839"),o=r.concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,o)}},"2b0e":function(e,t,i){"use strict";(function(e){i.d(t,"a",(function(){return Zn})); /*! - * Vue.js v2.7.8 + * Vue.js v2.7.10 * (c) 2014-2022 Evan You * Released under the MIT License. */ -var n=Object.freeze({}),r=Array.isArray;function o(e){return void 0===e||null===e}function s(e){return void 0!==e&&null!==e}function a(e){return!0===e}function l(e){return!1===e}function c(e){return"string"===typeof e||"number"===typeof e||"symbol"===typeof e||"boolean"===typeof e}function u(e){return"function"===typeof e}function h(e){return null!==e&&"object"===typeof e}var d=Object.prototype.toString;function p(e){return"[object Object]"===d.call(e)}function f(e){return"[object RegExp]"===d.call(e)}function v(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function g(e){return s(e)&&"function"===typeof e.then&&"function"===typeof e.catch}function m(e){return null==e?"":Array.isArray(e)||p(e)&&e.toString===d?JSON.stringify(e,null,2):String(e)}function y(e){var t=parseFloat(e);return isNaN(t)?e:t}function w(e,t){for(var i=Object.create(null),n=e.split(","),r=0;r-1)return e.splice(i,1)}}var _=Object.prototype.hasOwnProperty;function T(e,t){return _.call(e,t)}function S(e){var t=Object.create(null);return function(i){var n=t[i];return n||(t[i]=e(i))}}var E=/-(\w)/g,P=S((function(e){return e.replace(E,(function(e,t){return t?t.toUpperCase():""}))})),C=S((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})),R=/\B([A-Z])/g,k=S((function(e){return e.replace(R,"-$1").toLowerCase()}));function O(e,t){function i(i){var n=arguments.length;return n?n>1?e.apply(t,arguments):e.call(t,i):e.call(t)}return i._length=e.length,i}function I(e,t){return e.bind(t)}var D=Function.prototype.bind?I:O;function A(e,t){t=t||0;var i=e.length-t,n=new Array(i);while(i--)n[i]=e[i+t];return n}function L(e,t){for(var i in t)e[i]=t[i];return e}function H(e){for(var t={},i=0;i0,ne=ee&&ee.indexOf("edge/")>0;ee&&ee.indexOf("android");var re=ee&&/iphone|ipad|ipod|ios/.test(ee);ee&&/chrome\/\d+/.test(ee),ee&&/phantomjs/.test(ee);var oe,se=ee&&ee.match(/firefox\/(\d+)/),ae={}.watch,le=!1;if(J)try{var ce={};Object.defineProperty(ce,"passive",{get:function(){le=!0}}),window.addEventListener("test-passive",null,ce)}catch(Xs){}var ue=function(){return void 0===oe&&(oe=!J&&"undefined"!==typeof e&&(e["process"]&&"server"===e["process"].env.VUE_ENV)),oe},he=J&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function de(e){return"function"===typeof e&&/native code/.test(e.toString())}var pe,fe="undefined"!==typeof Symbol&&de(Symbol)&&"undefined"!==typeof Reflect&&de(Reflect.ownKeys);pe="undefined"!==typeof Set&&de(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var ve=null;function ge(e){void 0===e&&(e=null),e||ve&&ve._scope.off(),ve=e,e&&e._scope.on()}var me=function(){function e(e,t,i,n,r,o,s,a){this.tag=e,this.data=t,this.children=i,this.text=n,this.elm=r,this.ns=void 0,this.context=o,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=t&&t.key,this.componentOptions=s,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=a,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1}return Object.defineProperty(e.prototype,"child",{get:function(){return this.componentInstance},enumerable:!1,configurable:!0}),e}(),ye=function(e){void 0===e&&(e="");var t=new me;return t.text=e,t.isComment=!0,t};function we(e){return new me(void 0,void 0,void 0,String(e))}function xe(e){var t=new me(e.tag,e.data,e.children&&e.children.slice(),e.text,e.elm,e.context,e.componentOptions,e.asyncFactory);return t.ns=e.ns,t.isStatic=e.isStatic,t.key=e.key,t.isComment=e.isComment,t.fnContext=e.fnContext,t.fnOptions=e.fnOptions,t.fnScopeId=e.fnScopeId,t.asyncMeta=e.asyncMeta,t.isCloned=!0,t}var be=0,_e=function(){function e(){this.id=be++,this.subs=[]}return e.prototype.addSub=function(e){this.subs.push(e)},e.prototype.removeSub=function(e){b(this.subs,e)},e.prototype.depend=function(t){e.target&&e.target.addDep(this)},e.prototype.notify=function(e){var t=this.subs.slice();for(var i=0,n=t.length;i0&&(n=ot(n,"".concat(t||"","_").concat(i)),rt(n[0])&&rt(u)&&(h[l]=we(u.text+n[0].text),n.shift()),h.push.apply(h,n)):c(n)?rt(u)?h[l]=we(u.text+n):""!==n&&h.push(we(n)):rt(n)&&rt(u)?h[l]=we(u.text+n.text):(a(e._isVList)&&s(n.tag)&&o(n.key)&&s(t)&&(n.key="__vlist".concat(t,"_").concat(i,"__")),h.push(n)));return h}function st(e,t){var i,n,o,a,l=null;if(r(e)||"string"===typeof e)for(l=new Array(e.length),i=0,n=e.length;i0,a=t?!!t.$stable:!s,l=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(a&&r&&r!==n&&l===r.$key&&!s&&!r.$hasNormal)return r;for(var c in o={},t)t[c]&&"$"!==c[0]&&(o[c]=Et(e,i,c,t[c]))}else o={};for(var u in i)u in o||(o[u]=Pt(i,u));return t&&Object.isExtensible(t)&&(t._normalized=o),X(o,"$stable",a),X(o,"$key",l),X(o,"$hasNormal",s),o}function Et(e,t,i,n){var o=function(){var t=ve;ge(e);var i=arguments.length?n.apply(null,arguments):n({});i=i&&"object"===typeof i&&!r(i)?[i]:nt(i);var o=i&&i[0];return ge(t),i&&(!o||1===i.length&&o.isComment&&!Tt(o))?void 0:i};return n.proxy&&Object.defineProperty(t,i,{get:o,enumerable:!0,configurable:!0}),o}function Pt(e,t){return function(){return e[t]}}function Ct(e){var t=e.$options,i=t.setup;if(i){var n=e._setupContext=Rt(e);ge(e),Se();var r=qt(i,null,[e._props||Ne({}),n],e,"setup");if(Ee(),ge(),u(r))t.render=r;else if(h(r))if(e._setupState=r,r.__sfc){var o=e._setupProxy={};for(var s in r)"__sfc"!==s&&je(o,r,s)}else for(var s in r)Z(s)||je(e,r,s);else 0}}function Rt(e){return{get attrs(){if(!e._attrsProxy){var t=e._attrsProxy={};X(t,"_v_attr_proxy",!0),kt(t,e.$attrs,n,e,"$attrs")}return e._attrsProxy},get listeners(){if(!e._listenersProxy){var t=e._listenersProxy={};kt(t,e.$listeners,n,e,"$listeners")}return e._listenersProxy},get slots(){return It(e)},emit:D(e.$emit,e),expose:function(t){t&&Object.keys(t).forEach((function(i){return je(e,t,i)}))}}}function kt(e,t,i,n,r){var o=!1;for(var s in t)s in e?t[s]!==i[s]&&(o=!0):(o=!0,Ot(e,s,n,r));for(var s in e)s in t||(o=!0,delete e[s]);return o}function Ot(e,t,i,n){Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){return i[n][t]}})}function It(e){return e._slotsProxy||Dt(e._slotsProxy={},e.$scopedSlots),e._slotsProxy}function Dt(e,t){for(var i in t)e[i]=t[i];for(var i in e)i in t||delete e[i]}function At(e){e._vnode=null,e._staticTrees=null;var t=e.$options,i=e.$vnode=t._parentVnode,r=i&&i.context;e.$slots=bt(t._renderChildren,r),e.$scopedSlots=i?St(e.$parent,i.data.scopedSlots,e.$slots):n,e._c=function(t,i,n,r){return Vt(e,t,i,n,r,!1)},e.$createElement=function(t,i,n,r){return Vt(e,t,i,n,r,!0)};var o=i&&i.data;Me(e,"$attrs",o&&o.attrs||n,null,!0),Me(e,"$listeners",t._parentListeners||n,null,!0)}var Lt=null;function Ht(e){xt(e.prototype),e.prototype.$nextTick=function(e){return oi(e,this)},e.prototype._render=function(){var e,t=this,i=t.$options,n=i.render,o=i._parentVnode;o&&t._isMounted&&(t.$scopedSlots=St(t.$parent,o.data.scopedSlots,t.$slots,t.$scopedSlots),t._slotsProxy&&Dt(t._slotsProxy,t.$scopedSlots)),t.$vnode=o;try{ge(t),Lt=t,e=n.call(t._renderProxy,t.$createElement)}catch(Xs){Gt(Xs,t,"render"),e=t._vnode}finally{Lt=null,ge()}return r(e)&&1===e.length&&(e=e[0]),e instanceof me||(e=ye()),e.parent=o,e}}function Mt(e,t){return(e.__esModule||fe&&"Module"===e[Symbol.toStringTag])&&(e=e.default),h(e)?t.extend(e):e}function Bt(e,t,i,n,r){var o=ye();return o.asyncFactory=e,o.asyncMeta={data:t,context:i,children:n,tag:r},o}function Ft(e,t){if(a(e.error)&&s(e.errorComp))return e.errorComp;if(s(e.resolved))return e.resolved;var i=Lt;if(i&&s(e.owners)&&-1===e.owners.indexOf(i)&&e.owners.push(i),a(e.loading)&&s(e.loadingComp))return e.loadingComp;if(i&&!s(e.owners)){var n=e.owners=[i],r=!0,l=null,c=null;i.$on("hook:destroyed",(function(){return b(n,i)}));var u=function(e){for(var t=0,i=n.length;t1?A(i):i;for(var n=A(arguments,1),r='event handler for "'.concat(e,'"'),o=0,s=i.length;odocument.createEvent("Event").timeStamp&&($i=function(){return Ni.now()})}var zi=function(e,t){if(e.post){if(!t.post)return 1}else if(t.post)return-1;return e.id-t.id};function Vi(){var e,t;for(Fi=$i(),Hi=!0,Ii.sort(zi),Mi=0;MiMi&&Ii[i].id>e.id)i--;Ii.splice(i+1,0,e)}else Ii.push(e);Li||(Li=!0,oi(Vi))}}function qi(e){var t=e.$options.provide;if(t){var i=u(t)?t.call(e):t;if(!h(i))return;for(var n=Xe(e),r=fe?Reflect.ownKeys(i):Object.keys(i),o=0;o-1)if(o&&!T(r,"default"))s=!1;else if(""===s||s===k(e)){var l=Cn(String,r.type);(l<0||a-1)return this;var i=A(arguments,1);return i.unshift(this),u(e.install)?e.install.apply(e,i):u(e)&&e.apply(null,i),t.push(e),this}}function Yn(e){e.mixin=function(e){return this.options=xn(this.options,e),this}}function Kn(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var i=this,n=i.cid,r=e._Ctor||(e._Ctor={});if(r[n])return r[n];var o=en(e)||en(i.options);var s=function(e){this._init(e)};return s.prototype=Object.create(i.prototype),s.prototype.constructor=s,s.cid=t++,s.options=xn(i.options,e),s["super"]=i,s.options.props&&Qn(s),s.options.computed&&Jn(s),s.extend=i.extend,s.mixin=i.mixin,s.use=i.use,j.forEach((function(e){s[e]=i[e]})),o&&(s.options.components[o]=s),s.superOptions=i.options,s.extendOptions=e,s.sealedOptions=L({},s.options),r[n]=s,s}}function Qn(e){var t=e.options.props;for(var i in t)kn(e.prototype,"_props",i)}function Jn(e){var t=e.options.computed;for(var i in t)Mn(e.prototype,i,t[i])}function er(e){j.forEach((function(t){e[t]=function(e,i){return i?("component"===t&&p(i)&&(i.name=i.name||e,i=this.options._base.extend(i)),"directive"===t&&u(i)&&(i={bind:i,update:i}),this.options[t+"s"][e]=i,i):this.options[t+"s"][e]}}))}function tr(e){return e&&(en(e.Ctor.options)||e.tag)}function ir(e,t){return r(e)?e.indexOf(t)>-1:"string"===typeof e?e.split(",").indexOf(t)>-1:!!f(e)&&e.test(t)}function nr(e,t){var i=e.cache,n=e.keys,r=e._vnode;for(var o in i){var s=i[o];if(s){var a=s.name;a&&!t(a)&&rr(i,o,n,r)}}}function rr(e,t,i,n){var r=e[t];!r||n&&r.tag===n.tag||r.componentInstance.$destroy(),e[t]=null,b(i,t)}jn(Zn),Vn(Zn),xi(Zn),Si(Zn),Ht(Zn);var or=[String,RegExp,Array],sr={name:"keep-alive",abstract:!0,props:{include:or,exclude:or,max:[String,Number]},methods:{cacheVNode:function(){var e=this,t=e.cache,i=e.keys,n=e.vnodeToCache,r=e.keyToCache;if(n){var o=n.tag,s=n.componentInstance,a=n.componentOptions;t[r]={name:tr(a),tag:o,componentInstance:s},i.push(r),this.max&&i.length>parseInt(this.max)&&rr(t,i[0],i,this._vnode),this.vnodeToCache=null}}},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var e in this.cache)rr(this.cache,e,this.keys)},mounted:function(){var e=this;this.cacheVNode(),this.$watch("include",(function(t){nr(e,(function(e){return ir(t,e)}))})),this.$watch("exclude",(function(t){nr(e,(function(e){return!ir(t,e)}))}))},updated:function(){this.cacheVNode()},render:function(){var e=this.$slots.default,t=$t(e),i=t&&t.componentOptions;if(i){var n=tr(i),r=this,o=r.include,s=r.exclude;if(o&&(!n||!ir(o,n))||s&&n&&ir(s,n))return t;var a=this,l=a.cache,c=a.keys,u=null==t.key?i.Ctor.cid+(i.tag?"::".concat(i.tag):""):t.key;l[u]?(t.componentInstance=l[u].componentInstance,b(c,u),c.push(u)):(this.vnodeToCache=t,this.keyToCache=u),t.data.keepAlive=!0}return t||e&&e[0]}},ar={KeepAlive:sr};function lr(e){var t={get:function(){return G}};Object.defineProperty(e,"config",t),e.util={warn:cn,extend:L,mergeOptions:xn,defineReactive:Me},e.set=Be,e.delete=Fe,e.nextTick=oi,e.observable=function(e){return He(e),e},e.options=Object.create(null),j.forEach((function(t){e.options[t+"s"]=Object.create(null)})),e.options._base=e,L(e.options.components,ar),Xn(e),Yn(e),Kn(e),er(e)}lr(Zn),Object.defineProperty(Zn.prototype,"$isServer",{get:ue}),Object.defineProperty(Zn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Zn,"FunctionalRenderContext",{value:Yi}),Zn.version=li;var cr=w("style,class"),ur=w("input,textarea,option,select,progress"),hr=function(e,t,i){return"value"===i&&ur(e)&&"button"!==t||"selected"===i&&"option"===e||"checked"===i&&"input"===e||"muted"===i&&"video"===e},dr=w("contenteditable,draggable,spellcheck"),pr=w("events,caret,typing,plaintext-only"),fr=function(e,t){return wr(t)||"false"===t?"false":"contenteditable"===e&&pr(t)?t:"true"},vr=w("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"),gr="http://www.w3.org/1999/xlink",mr=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},yr=function(e){return mr(e)?e.slice(6,e.length):""},wr=function(e){return null==e||!1===e};function xr(e){var t=e.data,i=e,n=e;while(s(n.componentInstance))n=n.componentInstance._vnode,n&&n.data&&(t=br(n.data,t));while(s(i=i.parent))i&&i.data&&(t=br(t,i.data));return _r(t.staticClass,t.class)}function br(e,t){return{staticClass:Tr(e.staticClass,t.staticClass),class:s(e.class)?[e.class,t.class]:t.class}}function _r(e,t){return s(e)||s(t)?Tr(e,Sr(t)):""}function Tr(e,t){return e?t?e+" "+t:e:t||""}function Sr(e){return Array.isArray(e)?Er(e):h(e)?Pr(e):"string"===typeof e?e:""}function Er(e){for(var t,i="",n=0,r=e.length;n-1?Dr[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:Dr[e]=/HTMLUnknownElement/.test(t.toString())}var Lr=w("text,number,password,search,email,tel,url");function Hr(e){if("string"===typeof e){var t=document.querySelector(e);return t||document.createElement("div")}return e}function Mr(e,t){var i=document.createElement(e);return"select"!==e||t.data&&t.data.attrs&&void 0!==t.data.attrs.multiple&&i.setAttribute("multiple","multiple"),i}function Br(e,t){return document.createElementNS(Cr[e],t)}function Fr(e){return document.createTextNode(e)}function $r(e){return document.createComment(e)}function Nr(e,t,i){e.insertBefore(t,i)}function zr(e,t){e.removeChild(t)}function Vr(e,t){e.appendChild(t)}function Ur(e){return e.parentNode}function jr(e){return e.nextSibling}function Wr(e){return e.tagName}function Gr(e,t){e.textContent=t}function qr(e,t){e.setAttribute(t,"")}var Zr=Object.freeze({__proto__:null,createElement:Mr,createElementNS:Br,createTextNode:Fr,createComment:$r,insertBefore:Nr,removeChild:zr,appendChild:Vr,parentNode:Ur,nextSibling:jr,tagName:Wr,setTextContent:Gr,setStyleScope:qr}),Xr={create:function(e,t){Yr(t)},update:function(e,t){e.data.ref!==t.data.ref&&(Yr(e,!0),Yr(t))},destroy:function(e){Yr(e,!0)}};function Yr(e,t){var i=e.data.ref;if(s(i)){var n=e.context,o=e.componentInstance||e.elm,a=t?null:o,l=t?void 0:o;if(u(i))qt(i,n,[a],n,"template ref function");else{var c=e.data.refInFor,h="string"===typeof i||"number"===typeof i,d=Ue(i),p=n.$refs;if(h||d)if(c){var f=h?p[i]:i.value;t?r(f)&&b(f,o):r(f)?f.includes(o)||f.push(o):h?(p[i]=[o],Kr(n,i,p[i])):i.value=[o]}else if(h){if(t&&p[i]!==o)return;p[i]=l,Kr(n,i,a)}else if(d){if(t&&i.value!==o)return;i.value=a}else 0}}}function Kr(e,t,i){var n=e._setupState;n&&T(n,t)&&(Ue(n[t])?n[t].value=i:n[t]=i)}var Qr=new me("",{},[]),Jr=["create","activate","update","remove","destroy"];function eo(e,t){return e.key===t.key&&e.asyncFactory===t.asyncFactory&&(e.tag===t.tag&&e.isComment===t.isComment&&s(e.data)===s(t.data)&&to(e,t)||a(e.isAsyncPlaceholder)&&o(t.asyncFactory.error))}function to(e,t){if("input"!==e.tag)return!0;var i,n=s(i=e.data)&&s(i=i.attrs)&&i.type,r=s(i=t.data)&&s(i=i.attrs)&&i.type;return n===r||Lr(n)&&Lr(r)}function io(e,t,i){var n,r,o={};for(n=t;n<=i;++n)r=e[n].key,s(r)&&(o[r]=n);return o}function no(e){var t,i,n={},l=e.modules,u=e.nodeOps;for(t=0;tv?(h=o(i[y+1])?null:i[y+1].elm,S(e,h,i,p,y,n)):p>y&&P(t,d,v)}function k(e,t,i,n){for(var r=i;r-1?vo(e,t,i):vr(t)?wr(i)?e.removeAttribute(t):(i="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,i)):dr(t)?e.setAttribute(t,fr(t,i)):mr(t)?wr(i)?e.removeAttributeNS(gr,yr(t)):e.setAttributeNS(gr,t,i):vo(e,t,i)}function vo(e,t,i){if(wr(i))e.removeAttribute(t);else{if(te&&!ie&&"TEXTAREA"===e.tagName&&"placeholder"===t&&""!==i&&!e.__ieph){var n=function(t){t.stopImmediatePropagation(),e.removeEventListener("input",n)};e.addEventListener("input",n),e.__ieph=!0}e.setAttribute(t,i)}}var go={create:po,update:po};function mo(e,t){var i=t.elm,n=t.data,r=e.data;if(!(o(n.staticClass)&&o(n.class)&&(o(r)||o(r.staticClass)&&o(r.class)))){var a=xr(t),l=i._transitionClasses;s(l)&&(a=Tr(a,Sr(l))),a!==i._prevClass&&(i.setAttribute("class",a),i._prevClass=a)}}var yo,wo={create:mo,update:mo},xo="__r",bo="__c";function _o(e){if(s(e[xo])){var t=te?"change":"input";e[t]=[].concat(e[xo],e[t]||[]),delete e[xo]}s(e[bo])&&(e.change=[].concat(e[bo],e.change||[]),delete e[bo])}function To(e,t,i){var n=yo;return function r(){var o=t.apply(null,arguments);null!==o&&Po(e,r,i,n)}}var So=Kt&&!(se&&Number(se[1])<=53);function Eo(e,t,i,n){if(So){var r=Fi,o=t;t=o._wrapper=function(e){if(e.target===e.currentTarget||e.timeStamp>=r||e.timeStamp<=0||e.target.ownerDocument!==document)return o.apply(this,arguments)}}yo.addEventListener(e,t,le?{capture:i,passive:n}:i)}function Po(e,t,i,n){(n||yo).removeEventListener(e,t._wrapper||t,i)}function Co(e,t){if(!o(e.data.on)||!o(t.data.on)){var i=t.data.on||{},n=e.data.on||{};yo=t.elm||e.elm,_o(i),Qe(i,n,Eo,Po,To,t.context),yo=void 0}}var Ro,ko={create:Co,update:Co,destroy:function(e){return Co(e,Qr)}};function Oo(e,t){if(!o(e.data.domProps)||!o(t.data.domProps)){var i,n,r=t.elm,l=e.data.domProps||{},c=t.data.domProps||{};for(i in(s(c.__ob__)||a(c._v_attr_proxy))&&(c=t.data.domProps=L({},c)),l)i in c||(r[i]="");for(i in c){if(n=c[i],"textContent"===i||"innerHTML"===i){if(t.children&&(t.children.length=0),n===l[i])continue;1===r.childNodes.length&&r.removeChild(r.childNodes[0])}if("value"===i&&"PROGRESS"!==r.tagName){r._value=n;var u=o(n)?"":String(n);Io(r,u)&&(r.value=u)}else if("innerHTML"===i&&kr(r.tagName)&&o(r.innerHTML)){Ro=Ro||document.createElement("div"),Ro.innerHTML="".concat(n,"");var h=Ro.firstChild;while(r.firstChild)r.removeChild(r.firstChild);while(h.firstChild)r.appendChild(h.firstChild)}else if(n!==l[i])try{r[i]=n}catch(Xs){}}}}function Io(e,t){return!e.composing&&("OPTION"===e.tagName||Do(e,t)||Ao(e,t))}function Do(e,t){var i=!0;try{i=document.activeElement!==e}catch(Xs){}return i&&e.value!==t}function Ao(e,t){var i=e.value,n=e._vModifiers;if(s(n)){if(n.number)return y(i)!==y(t);if(n.trim)return i.trim()!==t.trim()}return i!==t}var Lo={create:Oo,update:Oo},Ho=S((function(e){var t={},i=/;(?![^(]*\))/g,n=/:(.+)/;return e.split(i).forEach((function(e){if(e){var i=e.split(n);i.length>1&&(t[i[0].trim()]=i[1].trim())}})),t}));function Mo(e){var t=Bo(e.style);return e.staticStyle?L(e.staticStyle,t):t}function Bo(e){return Array.isArray(e)?H(e):"string"===typeof e?Ho(e):e}function Fo(e,t){var i,n={};if(t){var r=e;while(r.componentInstance)r=r.componentInstance._vnode,r&&r.data&&(i=Mo(r.data))&&L(n,i)}(i=Mo(e.data))&&L(n,i);var o=e;while(o=o.parent)o.data&&(i=Mo(o.data))&&L(n,i);return n}var $o,No=/^--/,zo=/\s*!important$/,Vo=function(e,t,i){if(No.test(t))e.style.setProperty(t,i);else if(zo.test(i))e.style.setProperty(k(t),i.replace(zo,""),"important");else{var n=jo(t);if(Array.isArray(i))for(var r=0,o=i.length;r-1?t.split(qo).forEach((function(t){return e.classList.add(t)})):e.classList.add(t);else{var i=" ".concat(e.getAttribute("class")||""," ");i.indexOf(" "+t+" ")<0&&e.setAttribute("class",(i+t).trim())}}function Xo(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(qo).forEach((function(t){return e.classList.remove(t)})):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{var i=" ".concat(e.getAttribute("class")||""," "),n=" "+t+" ";while(i.indexOf(n)>=0)i=i.replace(n," ");i=i.trim(),i?e.setAttribute("class",i):e.removeAttribute("class")}}function Yo(e){if(e){if("object"===typeof e){var t={};return!1!==e.css&&L(t,Ko(e.name||"v")),L(t,e),t}return"string"===typeof e?Ko(e):void 0}}var Ko=S((function(e){return{enterClass:"".concat(e,"-enter"),enterToClass:"".concat(e,"-enter-to"),enterActiveClass:"".concat(e,"-enter-active"),leaveClass:"".concat(e,"-leave"),leaveToClass:"".concat(e,"-leave-to"),leaveActiveClass:"".concat(e,"-leave-active")}})),Qo=J&&!ie,Jo="transition",es="animation",ts="transition",is="transitionend",ns="animation",rs="animationend";Qo&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(ts="WebkitTransition",is="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(ns="WebkitAnimation",rs="webkitAnimationEnd"));var os=J?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function ss(e){os((function(){os(e)}))}function as(e,t){var i=e._transitionClasses||(e._transitionClasses=[]);i.indexOf(t)<0&&(i.push(t),Zo(e,t))}function ls(e,t){e._transitionClasses&&b(e._transitionClasses,t),Xo(e,t)}function cs(e,t,i){var n=hs(e,t),r=n.type,o=n.timeout,s=n.propCount;if(!r)return i();var a=r===Jo?is:rs,l=0,c=function(){e.removeEventListener(a,u),i()},u=function(t){t.target===e&&++l>=s&&c()};setTimeout((function(){l0&&(i=Jo,u=s,h=o.length):t===es?c>0&&(i=es,u=c,h=l.length):(u=Math.max(s,c),i=u>0?s>c?Jo:es:null,h=i?i===Jo?o.length:l.length:0);var d=i===Jo&&us.test(n[ts+"Property"]);return{type:i,timeout:u,propCount:h,hasTransform:d}}function ds(e,t){while(e.length1}function ys(e,t){!0!==t.data.show&&fs(t)}var ws=J?{create:ys,activate:ys,remove:function(e,t){!0!==e.data.show?vs(e,t):t()}}:{},xs=[go,wo,ko,Lo,Go,ws],bs=xs.concat(ho),_s=no({nodeOps:Zr,modules:bs});ie&&document.addEventListener("selectionchange",(function(){var e=document.activeElement;e&&e.vmodel&&Os(e,"input")}));var Ts={inserted:function(e,t,i,n){"select"===i.tag?(n.elm&&!n.elm._vOptions?Je(i,"postpatch",(function(){Ts.componentUpdated(e,t,i)})):Ss(e,t,i.context),e._vOptions=[].map.call(e.options,Cs)):("textarea"===i.tag||Lr(e.type))&&(e._vModifiers=t.modifiers,t.modifiers.lazy||(e.addEventListener("compositionstart",Rs),e.addEventListener("compositionend",ks),e.addEventListener("change",ks),ie&&(e.vmodel=!0)))},componentUpdated:function(e,t,i){if("select"===i.tag){Ss(e,t,i.context);var n=e._vOptions,r=e._vOptions=[].map.call(e.options,Cs);if(r.some((function(e,t){return!$(e,n[t])}))){var o=e.multiple?t.value.some((function(e){return Ps(e,r)})):t.value!==t.oldValue&&Ps(t.value,r);o&&Os(e,"change")}}}};function Ss(e,t,i){Es(e,t,i),(te||ne)&&setTimeout((function(){Es(e,t,i)}),0)}function Es(e,t,i){var n=t.value,r=e.multiple;if(!r||Array.isArray(n)){for(var o,s,a=0,l=e.options.length;a-1,s.selected!==o&&(s.selected=o);else if($(Cs(s),n))return void(e.selectedIndex!==a&&(e.selectedIndex=a));r||(e.selectedIndex=-1)}}function Ps(e,t){return t.every((function(t){return!$(t,e)}))}function Cs(e){return"_value"in e?e._value:e.value}function Rs(e){e.target.composing=!0}function ks(e){e.target.composing&&(e.target.composing=!1,Os(e.target,"input"))}function Os(e,t){var i=document.createEvent("HTMLEvents");i.initEvent(t,!0,!0),e.dispatchEvent(i)}function Is(e){return!e.componentInstance||e.data&&e.data.transition?e:Is(e.componentInstance._vnode)}var Ds={bind:function(e,t,i){var n=t.value;i=Is(i);var r=i.data&&i.data.transition,o=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;n&&r?(i.data.show=!0,fs(i,(function(){e.style.display=o}))):e.style.display=n?o:"none"},update:function(e,t,i){var n=t.value,r=t.oldValue;if(!n!==!r){i=Is(i);var o=i.data&&i.data.transition;o?(i.data.show=!0,n?fs(i,(function(){e.style.display=e.__vOriginalDisplay})):vs(i,(function(){e.style.display="none"}))):e.style.display=n?e.__vOriginalDisplay:"none"}},unbind:function(e,t,i,n,r){r||(e.style.display=e.__vOriginalDisplay)}},As={model:Ts,show:Ds},Ls={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function Hs(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?Hs($t(t.children)):e}function Ms(e){var t={},i=e.$options;for(var n in i.propsData)t[n]=e[n];var r=i._parentListeners;for(var n in r)t[P(n)]=r[n];return t}function Bs(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}function Fs(e){while(e=e.parent)if(e.data.transition)return!0}function $s(e,t){return t.key===e.key&&t.tag===e.tag}var Ns=function(e){return e.tag||Tt(e)},zs=function(e){return"show"===e.name},Vs={name:"transition",props:Ls,abstract:!0,render:function(e){var t=this,i=this.$slots.default;if(i&&(i=i.filter(Ns),i.length)){0;var n=this.mode;0;var r=i[0];if(Fs(this.$vnode))return r;var o=Hs(r);if(!o)return r;if(this._leaving)return Bs(e,r);var s="__transition-".concat(this._uid,"-");o.key=null==o.key?o.isComment?s+"comment":s+o.tag:c(o.key)?0===String(o.key).indexOf(s)?o.key:s+o.key:o.key;var a=(o.data||(o.data={})).transition=Ms(this),l=this._vnode,u=Hs(l);if(o.data.directives&&o.data.directives.some(zs)&&(o.data.show=!0),u&&u.data&&!$s(o,u)&&!Tt(u)&&(!u.componentInstance||!u.componentInstance._vnode.isComment)){var h=u.data.transition=L({},a);if("out-in"===n)return this._leaving=!0,Je(h,"afterLeave",(function(){t._leaving=!1,t.$forceUpdate()})),Bs(e,r);if("in-out"===n){if(Tt(o))return l;var d,p=function(){d()};Je(a,"afterEnter",p),Je(a,"enterCancelled",p),Je(h,"delayLeave",(function(e){d=e}))}}return r}}},Us=L({tag:String,moveClass:String},Ls);delete Us.mode;var js={props:Us,beforeMount:function(){var e=this,t=this._update;this._update=function(i,n){var r=_i(e);e.__patch__(e._vnode,e.kept,!1,!0),e._vnode=e.kept,r(),t.call(e,i,n)}},render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",i=Object.create(null),n=this.prevChildren=this.children,r=this.$slots.default||[],o=this.children=[],s=Ms(this),a=0;a0&&n[0]<4?1:+(n[0]+n[1])),!r&&s&&(n=s.match(/Edge\/(\d+)/),(!n||n[1]>=74)&&(n=s.match(/Chrome\/(\d+)/),n&&(r=+n[1]))),e.exports=r},"2d00b":function(e,t,i){"use strict";i("f675")},"2e67":function(e,t,i){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},"30b5":function(e,t,i){"use strict";var n=i("c532");function r(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,i){if(!t)return e;var o;if(i)o=i(t);else if(n.isURLSearchParams(t))o=t.toString();else{var s=[];n.forEach(t,(function(e,t){null!==e&&"undefined"!==typeof e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),s.push(r(t)+"="+r(e))})))})),o=s.join("&")}if(o){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},"32be":function(e,t){e.exports={methods:{preventKeyboardEvent(e){return!!(e.altKey||e.ctrlKey||e.metaKey)||!(!["INPUT","SELECT","TEXTAREA"].includes(e.target.nodeName)||"range"===e.target.type)}}}},"342f":function(e,t,i){var n=i("d066");e.exports=n("navigator","userAgent")||""},3934:function(e,t,i){"use strict";var n=i("c532");e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");function r(e){var n=e;return t&&(i.setAttribute("href",n),n=i.href),i.setAttribute("href",n),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}return e=r(window.location.href),function(t){var i=n.isString(t)?r(t):t;return i.protocol===e.protocol&&i.host===e.host}}():function(){return function(){return!0}}()},"3a9b":function(e,t,i){var n=i("e330");e.exports=n({}.isPrototypeOf)},"3bbe":function(e,t,i){var n=i("1626"),r=String,o=TypeError;e.exports=function(e){if("object"==typeof e||n(e))return e;throw o("Can't set "+r(e)+" as a prototype")}},"40d5":function(e,t,i){var n=i("d039");e.exports=!n((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},4362:function(e,t,i){t.nextTick=function(e){var t=Array.prototype.slice.call(arguments);t.shift(),setTimeout((function(){e.apply(null,t)}),0)},t.platform=t.arch=t.execPath=t.title="browser",t.pid=1,t.browser=!0,t.env={},t.argv=[],t.binding=function(e){throw new Error("No such module. (Possibly not yet loaded)")},function(){var e,n="/";t.cwd=function(){return n},t.chdir=function(t){e||(e=i("df7c")),n=e.resolve(t,n)}}(),t.exit=t.kill=t.umask=t.dlopen=t.uptime=t.memoryUsage=t.uvCounters=function(){},t.features={}},"44ad":function(e,t,i){var n=i("e330"),r=i("d039"),o=i("c6b6"),s=Object,a=n("".split);e.exports=r((function(){return!s("z").propertyIsEnumerable(0)}))?function(e){return"String"==o(e)?a(e,""):s(e)}:s},4581:function(e,t){e.exports=null},"467f":function(e,t,i){"use strict";var n=i("7917");e.exports=function(e,t,i){var r=i.config.validateStatus;i.status&&r&&!r(i.status)?t(new n("Request failed with status code "+i.status,[n.ERR_BAD_REQUEST,n.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i)):e(i)}},"485a":function(e,t,i){var n=i("c65b"),r=i("1626"),o=i("861d"),s=TypeError;e.exports=function(e,t){var i,a;if("string"===t&&r(i=e.toString)&&!o(a=n(i,e)))return a;if(r(i=e.valueOf)&&!o(a=n(i,e)))return a;if("string"!==t&&r(i=e.toString)&&!o(a=n(i,e)))return a;throw s("Can't convert object to primitive value")}},4930:function(e,t,i){var n=i("2d00"),r=i("d039");e.exports=!!Object.getOwnPropertySymbols&&!r((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},"4a7b":function(e,t,i){"use strict";var n=i("c532");e.exports=function(e,t){t=t||{};var i={};function r(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function o(i){return n.isUndefined(t[i])?n.isUndefined(e[i])?void 0:r(void 0,e[i]):r(e[i],t[i])}function s(e){if(!n.isUndefined(t[e]))return r(void 0,t[e])}function a(i){return n.isUndefined(t[i])?n.isUndefined(e[i])?void 0:r(void 0,e[i]):r(void 0,t[i])}function l(i){return i in t?r(e[i],t[i]):i in e?r(void 0,e[i]):void 0}var c={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:l};return n.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||o,r=t(e);n.isUndefined(r)&&t!==l||(i[e]=r)})),i}},"4c3d":function(e,t,i){"use strict";(function(t){var n=i("c532"),r=i("c8af"),o=i("7917"),s=i("cafa"),a=i("e467"),l={"Content-Type":"application/x-www-form-urlencoded"};function c(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function u(){var e;return("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof t&&"[object process]"===Object.prototype.toString.call(t))&&(e=i("b50d")),e}function h(e,t,i){if(n.isString(e))try{return(t||JSON.parse)(e),n.trim(e)}catch(r){if("SyntaxError"!==r.name)throw r}return(i||JSON.stringify)(e)}var d={transitional:s,adapter:u(),transformRequest:[function(e,t){if(r(t,"Accept"),r(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e))return e;if(n.isArrayBufferView(e))return e.buffer;if(n.isURLSearchParams(e))return c(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var i,o=n.isObject(e),s=t&&t["Content-Type"];if((i=n.isFileList(e))||o&&"multipart/form-data"===s){var l=this.env&&this.env.FormData;return a(i?{"files[]":e}:e,l&&new l)}return o||"application/json"===s?(c(t,"application/json"),h(e)):e}],transformResponse:[function(e){var t=this.transitional||d.transitional,i=t&&t.silentJSONParsing,r=t&&t.forcedJSONParsing,s=!i&&"json"===this.responseType;if(s||r&&n.isString(e)&&e.length)try{return JSON.parse(e)}catch(a){if(s){if("SyntaxError"===a.name)throw o.from(a,o.ERR_BAD_RESPONSE,this,null,this.response);throw a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:i("4581")},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],(function(e){d.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){d.headers[e]=n.merge(l)})),e.exports=d}).call(this,i("4362"))},"4ce8":function(e,t){e.exports=function(e,t){var i="function"===typeof e.exports?e.exports.extendOptions:e.options;for(var n in"function"===typeof e.exports&&(i.components=e.exports.options.components),i.components=i.components||{},t)i.components[n]=i.components[n]||t[n]}},"4d64":function(e,t,i){var n=i("fc6a"),r=i("23cb"),o=i("07fa"),s=function(e){return function(t,i,s){var a,l=n(t),c=o(l),u=r(s,c);if(e&&i!=i){while(c>u)if(a=l[u++],a!=a)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===i)return e||u||0;return!e&&-1}};e.exports={includes:s(!0),indexOf:s(!1)}},"50c4":function(e,t,i){var n=i("5926"),r=Math.min;e.exports=function(e){return e>0?r(n(e),9007199254740991):0}},5270:function(e,t,i){"use strict";var n=i("c532"),r=i("c401"),o=i("2e67"),s=i("4c3d"),a=i("fb60");function l(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new a}e.exports=function(e){l(e),e.headers=e.headers||{},e.data=r.call(e,e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]}));var t=e.adapter||s.adapter;return t(e).then((function(t){return l(e),t.data=r.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(l(e),t&&t.response&&(t.response.data=r.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},5692:function(e,t,i){var n=i("c430"),r=i("c6cd");(e.exports=function(e,t){return r[e]||(r[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.24.1",mode:n?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.24.1/LICENSE",source:"https://github.com/zloirock/core-js"})},"56d7":function(e,t,i){"use strict";i.r(t);i("d9e2");var n=i("2b0e"),r=i("bc3a"),o=i.n(r),s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"tify",attrs:{tabindex:"-1"}},[e.ready?t("app-header",{attrs:{fulltextEnabled:e.hasOtherContent,tocEnabled:e.hasToc}}):e._e(),e.ready?t("div",{staticClass:"tify-main"},[t("view-scan",{attrs:{id:e.$root.getId("scan")}}),e.hasOtherContent?t("view-fulltext",{directives:[{name:"show",rawName:"v-show",value:"fulltext"===e.$root.options.view,expression:"$root.options.view === 'fulltext'"}],attrs:{id:e.$root.getId("fulltext")}}):e._e(),e.hasToc?t("view-toc",{directives:[{name:"show",rawName:"v-show",value:"toc"===e.$root.options.view,expression:"$root.options.view === 'toc'"}],attrs:{id:e.$root.getId("toc")}}):e._e(),t("view-thumbnails",{directives:[{name:"show",rawName:"v-show",value:"thumbnails"===e.$root.options.view,expression:"$root.options.view === 'thumbnails'"}],attrs:{id:e.$root.getId("thumbnails")}}),t("view-info",{directives:[{name:"show",rawName:"v-show",value:"info"===e.$root.options.view,expression:"$root.options.view === 'info'"}],attrs:{id:e.$root.getId("info")}}),t("view-export",{directives:[{name:"show",rawName:"v-show",value:"export"===e.$root.options.view,expression:"$root.options.view === 'export'"}],attrs:{id:e.$root.getId("export")}}),t("view-help",{directives:[{name:"show",rawName:"v-show",value:"help"===e.$root.options.view,expression:"$root.options.view === 'help'"}],attrs:{id:e.$root.getId("help")}})],1):e._e(),e.$root.loading?t("div",{staticClass:"tify-loading",attrs:{"aria-label":e.$root.translation?e.$root.translate("Loading"):"Loading"}}):e._e(),e.$root.error?t("div",{staticClass:"tify-error"},[t("button",{staticClass:"tify-error-close",on:{click:function(t){e.$root.error=""}}},[t("icon-close")],1),t("span",[e._v(e._s(e.$root.error))])]):e._e()],1)},a=[],l=function(){var e=this,t=e._self._c;return t("header",{staticClass:"tify-header"},[t("div",{staticClass:"tify-header-column -title"},[t("h1",{staticClass:"tify-header-title",attrs:{title:e.titles.join(", ")}},[e._v(" "+e._s(e.titles.join(", "))+" ")])]),t("div",{staticClass:"tify-header-column -pagination"},[t("div",{staticClass:"tify-header-button-group"},[t("page-select",{staticClass:"tify-header-button"}),t("button",{staticClass:"tify-header-button",class:{"-active":e.$root.options.pages.length>1,"-warning":e.customPageViewActive},attrs:{title:e.$root.translate("Toggle double-page")},on:{click:e.toggleDoublePage}},[e.customPageViewActive?t("icon-view-module"):t("icon-book-open-blank-variant")],1)],1),t("div",{staticClass:"tify-header-button-group -pagination"},[t("button",{staticClass:"tify-header-button",attrs:{disabled:e.customPageViewActive||e.isFirstPage,title:e.$root.translate("First page")},on:{click:e.goToFirstPage}},[t("icon-page-first")],1),e.structures&&e.structures.length?t("button",{staticClass:"tify-header-button",attrs:{disabled:e.customPageViewActive||e.isFirstPage,title:e.$root.translate("Previous section")},on:{click:e.goToPreviousSection}},[t("icon-skip-previous")],1):e._e(),t("button",{staticClass:"tify-header-button",attrs:{disabled:e.customPageViewActive||e.isFirstPage,title:e.$root.translate("Previous page")},on:{click:e.goToPreviousPage}},[t("icon-chevron-left")],1),t("button",{staticClass:"tify-header-button",attrs:{disabled:e.customPageViewActive||e.isLastPage,title:e.$root.translate("Next page")},on:{click:e.goToNextPage}},[t("icon-chevron-right")],1),e.structures&&e.structures.length?t("button",{staticClass:"tify-header-button",attrs:{disabled:e.customPageViewActive||e.isLastSection,title:e.$root.translate("Next section")},on:{click:e.goToNextSection}},[t("icon-skip-next")],1):e._e(),t("button",{staticClass:"tify-header-button",attrs:{disabled:e.customPageViewActive||e.isLastPage,title:e.$root.translate("Last page")},on:{click:e.goToLastPage}},[t("icon-page-last")],1)])]),t("div",{staticClass:"tify-header-column -controls-toggle"},[t("div",{ref:"switchViewSmall",staticClass:"tify-header-button-group"},[t("button",{directives:[{name:"click-outside",rawName:"v-click-outside",value:e.closeControlsPopup,expression:"closeControlsPopup"}],staticClass:"tify-header-button",attrs:{"aria-controls":e.$root.getId("controls"),"aria-expanded":e.controlsVisible?"true":"false"},on:{click:e.toggleControlsPopup}},[t("icon-menu"),e._v(" "+e._s(e.$root.translate("View"))+" ")],1)])]),t("div",{staticClass:"tify-header-column -controls",class:{"-visible":e.controlsVisible},attrs:{id:e.$root.getId("controls")}},[t("div",{staticClass:"tify-header-button-group -view"},[t("button",{staticClass:"tify-header-button -scan",class:{"-active":"scan"===e.$root.options.view},attrs:{"aria-controls":e.$root.getId("scan"),"aria-expanded":"scan"===e.$root.options.view?"true":"false"},on:{click:function(t){return e.toggleView("scan")}}},[t("icon-image"),e._v(" "+e._s(e.$root.translate("Scan"))+" ")],1),e.fulltextEnabled?t("button",{staticClass:"tify-header-button",class:{"-active":"fulltext"===e.$root.options.view},attrs:{"aria-controls":e.$root.getId("fulltext"),"aria-expanded":"fulltext"===e.$root.options.view?"true":"false"},on:{click:function(t){return e.toggleView("fulltext")}}},[t("icon-text-long"),e._v(" "+e._s(e.$root.translate("Fulltext"))+" ")],1):e._e(),t("button",{staticClass:"tify-header-button",class:{"-active":"thumbnails"===e.$root.options.view},attrs:{"aria-controls":e.$root.getId("thumbnails"),"aria-expanded":"thumbnails"===e.$root.options.view?"true":"false"},on:{click:function(t){return e.toggleView("thumbnails")}}},[t("icon-view-module"),e._v(" "+e._s(e.$root.translate("Pages"))+" ")],1),e.tocEnabled?t("button",{staticClass:"tify-header-button",class:{"-active":"toc"===e.$root.options.view},attrs:{"aria-controls":e.$root.getId("toc"),"aria-expanded":"toc"===e.$root.options.view?"true":"false"},on:{click:function(t){return e.toggleView("toc")}}},[t("icon-table-of-contents"),e._v(" "+e._s(e.$root.translate("Contents"))+" ")],1):e._e(),t("button",{staticClass:"tify-header-button",class:{"-active":"info"===e.$root.options.view},attrs:{"aria-controls":e.$root.getId("info"),"aria-expanded":"info"===e.$root.options.view?"true":"false"},on:{click:function(t){return e.toggleView("info")}}},[t("icon-information-outline"),e._v(" "+e._s(e.$root.translate("Info"))+" ")],1),t("button",{staticClass:"tify-header-button",class:{"-active":"export"===e.$root.options.view},attrs:{"aria-controls":e.$root.getId("export"),"aria-expanded":"export"===e.$root.options.view?"true":"false"},on:{click:function(t){return e.toggleView("export")}}},[t("icon-download"),e._v(" "+e._s(e.$root.translate("Export"))+" ")],1),t("button",{staticClass:"tify-header-button -icon-only",class:{"-active":"help"===e.$root.options.view},attrs:{"aria-controls":e.$root.getId("help"),"aria-expanded":"help"===e.$root.options.view?"true":"false",title:e.$root.translate("Help")},on:{click:function(t){return e.toggleView("help")}}},[t("icon-help-circle-outline"),e._v(" "+e._s(e.$root.translate("Help"))+" ")],1)]),e.fullscreenSupported?t("div",{staticClass:"tify-header-button-group -view"},[e.fullscreenActive?t("button",{staticClass:"tify-header-button -icon-only",attrs:{title:e.$root.translate("Exit fullscreen")},on:{click:e.toggleFullscreen}},[t("icon-fullscreen-exit"),e._v(" "+e._s(e.$root.translate("Exit fullscreen"))+" ")],1):t("button",{staticClass:"tify-header-button -icon-only",attrs:{title:e.$root.translate("Fullscreen")},on:{click:e.toggleFullscreen}},[t("icon-fullscreen"),e._v(" "+e._s(e.$root.translate("Fullscreen"))+" ")],1)]):e._e(),t("div",{staticClass:"tify-header-button-group -popup"},[t("button",{staticClass:"tify-header-button",attrs:{disabled:e.customPageViewActive||e.isFirstPage,title:e.$root.translate("First page")},on:{click:e.goToFirstPage}},[t("icon-page-first")],1),e.structures&&e.structures.length?t("button",{staticClass:"tify-header-button",attrs:{disabled:e.customPageViewActive||e.isFirstPage,title:e.$root.translate("Previous section")},on:{click:e.goToPreviousSection}},[t("icon-skip-previous")],1):e._e(),t("button",{staticClass:"tify-header-button",attrs:{disabled:e.customPageViewActive||e.isFirstPage,title:e.$root.translate("Previous page")},on:{click:e.goToPreviousPage}},[t("icon-chevron-left")],1),t("button",{staticClass:"tify-header-button",attrs:{disabled:e.customPageViewActive||e.isLastPage,title:e.$root.translate("Next page")},on:{click:e.goToNextPage}},[t("icon-chevron-right")],1),e.structures&&e.structures.length?t("button",{staticClass:"tify-header-button",attrs:{disabled:e.customPageViewActive||e.isLastSection,title:e.$root.translate("Next section")},on:{click:e.goToNextSection}},[t("icon-skip-next")],1):e._e(),t("button",{staticClass:"tify-header-button",attrs:{disabled:e.customPageViewActive||e.isLastPage,title:e.$root.translate("Last page")},on:{click:e.goToLastPage}},[t("icon-page-last")],1)])])])},c=[],u=function(){var e=this,t=e._self._c;return t("div",{staticClass:"tify-page-select"},[t("button",{directives:[{name:"click-outside",rawName:"v-click-outside",value:e.closeDropdown,expression:"closeDropdown"}],staticClass:"tify-page-select-button",attrs:{title:e.currentPageTitleAttr,"aria-label":e.$root.translate("Current page"),"aria-controls":e.$root.getId("dropdown"),"aria-expanded":e.isOpen?"true":"false"},on:{click:e.toggleDropdown}},[e._v(" "+e._s(e.currentPageLabel)+" ")]),t("div",{directives:[{name:"show",rawName:"v-show",value:e.isOpen,expression:"isOpen"}],key:"dropdown",staticClass:"tify-page-select-dropdown",attrs:{id:e.$root.getId("dropdown")},on:{click:function(e){e.stopPropagation()}}},[t("div",{staticClass:"tify-page-select-filter"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.filter,expression:"filter"}],ref:"search",staticClass:"tify-page-select-input",attrs:{"aria-label":e.$root.translate("Filter pages"),type:"text"},domProps:{value:e.filter},on:{keyup:function(t){if(!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter"))return null;e.filteredCanvases[e.highlightIndex]&&e.setPage(e.filteredCanvases[e.highlightIndex].page)},keydown:[function(t){if(!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"]))return null;t.preventDefault(),e.filter?e.filter="":e.closeDropdown()},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"up",38,t.key,["Up","ArrowUp"])?null:(t.preventDefault(),e.onKeyUpArrow())},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"down",40,t.key,["Down","ArrowDown"])?null:(t.preventDefault(),e.onKeyDownArrow())}],input:function(t){t.target.composing||(e.filter=t.target.value)}}})]),t("ol",{ref:"list",staticClass:"tify-page-select-list"},e._l(e.filteredCanvases,(function(i,n){return t("li",{key:n,class:{"-current":e.$root.options.pages.indexOf(i.page)>-1,"-highlighted":e.highlightIndex===n}},[t("a",{attrs:{href:"javascript:;"},on:{click:function(t){return e.setPage(i.page)}}},[e._v(" "+e._s(e.$root.getPageLabel(i.page,e.$root.convertValueToArray(i.label)[0]))+" ")])])})),0)])])},h=[],d=i("32be"),p=i.n(d),f={mixins:[p.a],data(){return{filter:"",filteredCanvases:[],highlightIndex:0,isOpen:!1}},computed:{currentPageLabel(){const e=this.$root.options.pages[0]||1,t=this.$root.options.pages[0]?this.$root.options.pages[0]-1:0,i=this.$root.convertValueToArray(this.$root.canvases[t].label)[0];return this.$root.getPageLabel(e,i)},currentPageTitleAttr(){const{pages:e}=this.$root.options,t=0===e[0]&&e.length>1?1:e[0],i=this.$root.translate("Physical page"),n=this.$root.translate("Logical page");return`${i}: ${t}\n${n}: ${this.$root.convertValueToArray(this.$root.canvases[t-1].label)[0]}`}},watch:{filter(){this.updateFilteredCanvases(),this.$nextTick(()=>this.updateScroll())},isOpen(){this.isOpen&&(this.filter="",this.highlightIndex=this.$root.options.pages[0]-1)}},methods:{closeDropdown(){this.isOpen=!1},onKeydown(e){this.preventKeyboardEvent(e)||("Escape"!==e.key?"x"===e.key&&(this.toggleDropdown(),e.preventDefault()):this.closeDropdown())},onKeyDownArrow(){this.highlightIndex0&&(this.highlightIndex-=1,this.updateScroll())},setPage(e){this.closeDropdown(),this.$root.setPage(e),this.$root.isMobile()&&this.$root.updateOptions({view:"scan"})},toggleDropdown(){this.isOpen=!this.isOpen,this.isOpen&&this.$nextTick(()=>{this.$refs.search.focus(),this.updateScroll()})},updateFilteredCanvases(){const e=[],t=this.filter.toLowerCase();let i=-1;this.$root.canvases.forEach((n,r)=>{const o=this.$root.convertValueToArray(n.label)[0],s=o.toLowerCase().indexOf(t)>-1,a=(r+1).toFixed().indexOf(t)>-1;if(s||a){const t=n;t.page=r+1,t.page===this.$root.options.pages[0]&&(i=e.length),e.push(t)}}),this.highlightIndex=i<0?0:i,this.filteredCanvases=e},updateScroll(){const{list:e}=this.$refs;if(e&&e.children[this.highlightIndex]){const{offsetTop:t}=e.children[this.highlightIndex];e.scrollTop=t-(e.offsetHeight/2-e.children[0].offsetHeight)}}},mounted(){this.updateFilteredCanvases(),this.$root.$el.addEventListener("keydown",this.onKeydown)},beforeDestroy(){this.$root.$el.removeEventListener("keydown",this.onKeydown)}},v=f;function g(e,t,i,n,r,o,s,a){var l,c="function"===typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=i,c._compiled=!0),n&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),s?(l=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},c._ssrRegister=l):r&&(l=a?function(){r.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:r),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(e,t){return l.call(t),u(e,t)}}else{var h=c.beforeCreate;c.beforeCreate=h?[].concat(h,l):[l]}return{exports:e,options:c}}var m=g(v,u,h,!1,null,null,null),y=m.exports,w=i("1b80"),x=i.n(w),b={components:{PageSelect:y},mixins:[p.a,x.a],props:["fulltextEnabled","tocEnabled"],data(){return{controlsVisible:!1,fullscreenActive:!1,screen:this.$root.$el.parentNode,sections:[]}},computed:{fullscreenSupported(){return null===document.fullscreenElement||null===document.msFullscreenElement||null===document.webkitFullscreenElement},isLastSection(){const{pages:e}=this.$root.options,t=e.length-1,i=e[t]?e[t]:e[t-1];return i>=this.sections[this.sections.length-1].firstPage},structures(){return this.$root.manifest.structures},titles(){return this.$root.convertValueToArray(this.$root.manifest.label)}},methods:{closeControlsPopup(){this.controlsVisible=!1},detectFullscreen:()=>{let e;switch(null){case document.msFullscreenElement:e=document.msFullscreenElement;break;case document.webkitFullscreenElement:e=document.webkitFullscreenElement;break;case document.fullscreenElement:e=document.fullscreenElement;break;default:e=!1}return e},goToNextSection(){const{pages:e}=this.$root.options,t=e.length-1,i=e[t]?e[t]:e[t-1];let n=0;while(i>=this.sections[n].firstPage||i&&i>=this.sections[n].firstPage)n+=1;this.$root.setPage(this.sections[n].firstPage)},goToPreviousSection(){const{pages:e}=this.$root.options,t=e[0]?e[0]:e[1];let i=this.sections.length-1;while(t<=this.sections[i].firstPage||t&&t<=this.sections[i].firstPage)i-=1;this.$root.setPage(this.sections[i].firstPage)},onKeyDown(e){if(this.preventKeyboardEvent(e))return;if("Escape"===e.key)return void(this.controlsVisible=!1);switch(e.key){case"Backspace":this.$refs.switchViewSmall.offsetParent&&this.toggleView("scan");break;case"1":this.fulltextEnabled&&this.toggleView("fulltext");break;case"2":this.toggleView("thumbnails");break;case"3":this.tocEnabled&&this.toggleView("toc");break;case"4":this.toggleView("info");break;case"5":this.toggleView("export");break;case"6":this.toggleView("help");break;case"b":this.toggleDoublePage();break;case"f":this.toggleFullscreen();break;default:}if(this.customPageViewActive)return;const{pages:t}=this.$root.options;switch(e.key){case"q":case",":t[0]>1&&this.goToPreviousPage();break;case"e":case".":this.isLastPage||this.goToNextPage();break;case"Q":t[0]>1&&this.goToFirstPage();break;case"E":this.isLastPage||this.goToLastPage();break;default:}},setView(e){this.$root.updateOptions({view:e})},toggleControlsPopup(){this.controlsVisible=!this.controlsVisible},toggleDoublePage(e){const{pages:t}=this.$root.options;let i;if(t.length>1&&!0!==e||!1===e)i=[t[0]<1?1:t[0]];else if(t[0]<2)i=[0,1];else if(t[0]%2>0)i=[t[0]-1,t[0]];else{const e=t[0]{if(!t.canvases)return void e.push({firstPage:1,lastPage:this.$root.pageCount});const i=t.canvases[0],n=this.$root.canvases.findIndex(e=>e["@id"]===i)+1,r=t.canvases[t.canvases.length-1],o=this.$root.canvases.findIndex(e=>e["@id"]===r)+1;e.push({firstPage:n,lastPage:o})}),this.sections=e},mounted(){this.$root.$el.addEventListener("keydown",this.onKeyDown);const e=["","moz","ms","webkit"];e.forEach(e=>{document.addEventListener(e+"fullscreenchange",this.toggleFullscreenActive)})},beforeDestroy(){this.$root.$el.removeEventListener("keydown",this.onKeyDown)}},_=b,T=i("4ce8"),S=i.n(T),E=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M21,5C19.89,4.65 18.67,4.5 17.5,4.5C15.55,4.5 13.45,4.9 12,6C10.55,4.9 8.45,4.5 6.5,4.5C4.55,4.5 2.45,4.9 1,6V20.65C1,20.9 1.25,21.15 1.5,21.15C1.6,21.15 1.65,21.1 1.75,21.1C3.1,20.45 5.05,20 6.5,20C8.45,20 10.55,20.4 12,21.5C13.35,20.65 15.8,20 17.5,20C19.15,20 20.85,20.3 22.25,21.05C22.35,21.1 22.4,21.1 22.5,21.1C22.75,21.1 23,20.85 23,20.6V6C22.4,5.55 21.75,5.25 21,5M21,18.5C19.9,18.15 18.7,18 17.5,18C15.8,18 13.35,18.65 12,19.5V8C13.35,7.15 15.8,6.5 17.5,6.5C18.7,6.5 19.9,6.65 21,7V18.5Z"}})])},P=[],C={},R=g(C,E,P,!1,null,null,null),k=R.exports,O=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z"}})])},I=[],D={},A=g(D,O,I,!1,null,null,null),L=A.exports,H=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"}})])},M=[],B={},F=g(B,H,M,!1,null,null,null),$=F.exports,N=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z"}})])},z=[],V={},U=g(V,N,z,!1,null,null,null),j=U.exports,W=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M5,5H10V7H7V10H5V5M14,5H19V10H17V7H14V5M17,14H19V19H14V17H17V14M10,17V19H5V14H7V17H10Z"}})])},G=[],q={},Z=g(q,W,G,!1,null,null,null),X=Z.exports,Y=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M14,14H19V16H16V19H14V14M5,14H10V19H8V16H5V14M8,5H10V10H5V8H8V5M19,8V10H14V5H16V8H19Z"}})])},K=[],Q={},J=g(Q,Y,K,!1,null,null,null),ee=J.exports,te=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M11,18H13V16H11V18M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,6A4,4 0 0,0 8,10H10A2,2 0 0,1 12,8A2,2 0 0,1 14,10C14,12 11,11.75 11,15H13C13,12.75 16,12.5 16,10A4,4 0 0,0 12,6Z"}})])},ie=[],ne={},re=g(ne,te,ie,!1,null,null,null),oe=re.exports,se=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M8.5,13.5L11,16.5L14.5,12L19,18H5M21,19V5C21,3.89 20.1,3 19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19Z"}})])},ae=[],le={},ce=g(le,se,ae,!1,null,null,null),ue=ce.exports,he=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z"}})])},de=[],pe={},fe=g(pe,he,de,!1,null,null,null),ve=fe.exports,ge=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z"}})])},me=[],ye={},we=g(ye,ge,me,!1,null,null,null),xe=we.exports,be=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M18.41,16.59L13.82,12L18.41,7.41L17,6L11,12L17,18L18.41,16.59M6,6H8V18H6V6Z"}})])},_e=[],Te={},Se=g(Te,be,_e,!1,null,null,null),Ee=Se.exports,Pe=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M5.59,7.41L10.18,12L5.59,16.59L7,18L13,12L7,6L5.59,7.41M16,6H18V18H16V6Z"}})])},Ce=[],Re={},ke=g(Re,Pe,Ce,!1,null,null,null),Oe=ke.exports,Ie=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M16,18H18V6H16M6,18L14.5,12L6,6V18Z"}})])},De=[],Ae={},Le=g(Ae,Ie,De,!1,null,null,null),He=Le.exports,Me=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M6,18V6H8V18H6M9.5,12L18,6V18L9.5,12Z"}})])},Be=[],Fe={},$e=g(Fe,Me,Be,!1,null,null,null),Ne=$e.exports,ze=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M3,9H17V7H3V9M3,13H17V11H3V13M3,17H17V15H3V17M19,17H21V15H19V17M19,7V9H21V7H19M19,13H21V11H19V13Z"}})])},Ve=[],Ue={},je=g(Ue,ze,Ve,!1,null,null,null),We=je.exports,Ge=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M4,5H20V7H4V5M4,9H20V11H4V9M4,13H20V15H4V13M4,17H14V19H4V17Z"}})])},qe=[],Ze={},Xe=g(Ze,Ge,qe,!1,null,null,null),Ye=Xe.exports,Ke=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M16,5V11H21V5M10,11H15V5H10M16,18H21V12H16M10,18H15V12H10M4,18H9V12H4M4,11H9V5H4V11Z"}})])},Qe=[],Je={},et=g(Je,Ke,Qe,!1,null,null,null),tt=et.exports,it=g(_,l,c,!1,null,null,null),nt=it.exports;S()(it,{IconBookOpenBlankVariant:k,IconChevronLeft:L,IconChevronRight:$,IconDownload:j,IconFullscreen:X,IconFullscreenExit:ee,IconHelpCircleOutline:oe,IconImage:ue,IconInformationOutline:ve,IconMenu:xe,IconPageFirst:Ee,IconPageLast:Oe,IconSkipNext:He,IconSkipPrevious:Ne,IconTableOfContents:We,IconTextLong:Ye,IconViewModule:tt});var rt=function(){var e=this,t=e._self._c;return t("section",{staticClass:"tify-export",attrs:{tabindex:"0"}},[t("h2",{staticClass:"tify-sr-only"},[e._v(e._s(e.$root.translate("Export")))]),t("div",{staticClass:"tify-export-section -links"},[t("h3",[e._v(e._s(e.$root.translate("Download Individual Images")))]),t("ul",e._l(e.pages,(function(i){return t("li",{key:i},[t("a",{attrs:{href:e.imageUrls[i],download:i+".jpg"}},[e._v(" "+e._s(e.$root.translate("Page"))+" "+e._s(i)+" : "+e._s(e.$root.convertValueToArray(e.$root.canvases[i-1].label)[0])+" ")])])})),0)]),this.$root.manifest.rendering?t("div",{staticClass:"tify-export-section -renderings"},[t("h3",[e._v(e._s(e.$root.translate("Renderings")))]),t("ul",e._l(e.renderings,(function(i){return t("li",{key:i["@id"]},[t("a",{attrs:{href:i["@id"]}},[e._v(e._s(i.label))])])})),0),e.hasElementPdfLinks?t("div",{staticClass:"tify-export-container"},[t("button",{staticClass:"tify-export-toggle",attrs:{"aria-controls":e.$root.getId("export-pdf-list"),"aria-expanded":e.perElementPdfLinksVisible?"true":"false"},on:{click:function(t){e.perElementPdfLinksVisible=!e.perElementPdfLinksVisible}}},[e.perElementPdfLinksVisible?[e._v(" "+e._s(e.$root.translate("Close PDF list"))+" ")]:[e._v(" "+e._s(e.$root.translate("PDFs for each element"))+" ")]],2),t("div",{directives:[{name:"show",rawName:"v-show",value:e.perElementPdfLinksVisible,expression:"perElementPdfLinksVisible"}],staticClass:"tify-export-toc",attrs:{id:e.$root.getId("export-pdf-list")}},[t("toc-list",{ref:"children",attrs:{purpose:"pdf",level:0,structures:e.structures}})],1)]):e._e()]):e._e(),e.literatureItems.length?t("div",{staticClass:"tify-export-section -literature"},[t("h3",[e._v(e._s(e.$root.translate("Literature Management")))]),t("ul",e._l(e.literatureItems,(function(i){return t("li",{key:i["@id"]},[t("a",{attrs:{href:i["@id"],download:""}},[e._v(" "+e._s(i.label)+" ")])])})),0)]):e._e(),t("div",{staticClass:"tify-export-section -other"},[t("h3",[e._v(e._s(e.$root.translate("Other Formats")))]),t("ul",[t("li",[t("a",{attrs:{href:e.$root.options.manifestUrl,download:"manifest.json"}},[e._v(" "+e._s(e.$root.translate("IIIF manifest"))+" ")])]),e._l(e.otherItems,(function(i){return t("li",{key:i["@id"]},[t("a",{attrs:{href:i["@id"],download:""}},[e._v(" "+e._s(i.label||i["@id"])+" ")])])}))],2)])])},ot=[],st=function(){var e=this,t=e._self._c;return t("ul",{staticClass:"tify-toc-list"},e._l(e.structures,(function(i,n){return t("li",{key:n,staticClass:"tify-toc-structure",class:{"-current":e.checkIfPagesInStructure(i),"-expanded":e.expandedStructures[n]},attrs:{"data-level":e.level}},[i.childStructures?t("button",{staticClass:"tify-toc-toggle",attrs:{title:e.$root.translate(e.expandedStructures[n]?"Collapse":"Expand"),"aria-controls":`${e.id}-${n}`,"aria-expanded":e.expandedStructures[n]?"true":"false"},on:{click:function(t){return e.toggleChildren(n)}}},[e.expandedStructures[n]?[t("icon-minus")]:[t("icon-plus")]],2):e._e(),"pdf"===e.purpose?t("a",{staticClass:"tify-toc-link",attrs:{download:"",href:e.$root.convertValueToArray(i.rendering)[0]["@id"]}},[e._v(" "+e._s(i.label)+" ("+e._s(i.pageCount)+" "+e._s(e.$root.translate(1===i.pageCount?"page":"pages"))+") ")]):t("a",{staticClass:"tify-toc-link -dots",attrs:{href:"javascript:;"},on:{click:function(t){return e.setPage(i.firstPage)}}},[t("span",{staticClass:"tify-toc-label"},[e._v(e._s(i.label))]),t("span",{staticClass:"tify-toc-page"},[e._v(e._s(i.pageLabel))])]),i.childStructures?t("toc-list",{directives:[{name:"show",rawName:"v-show",value:e.expandedStructures[n],expression:"expandedStructures[index]"}],ref:"children",refInFor:!0,attrs:{id:`${e.id}-${n}`,level:e.level+1,parentStructure:i,purpose:e.purpose,structures:i.childStructures}}):e._e()],1)})),0)},at=[],lt={name:"toc-list",props:["level","structures","parentStructure","purpose"],data(){return{expandedStructures:[],id:this.$root.getId("toc-list-"+Math.floor(1e12*Math.random()))}},methods:{checkIfPagesInStructure(e){const{pages:t}=this.$root.options;return t.some(t=>t>=e.firstPage&&t<=e.lastPage)},setPage(e){this.$root.setPage(e),this.$root.isMobile()&&this.$root.updateOptions({view:"scan"})},toggleAllChildren(e=null){if(this.$refs.children){for(let t=this.structures.length-1;t>=0;t-=1)this.toggleChildren(t,e);this.$refs.children.forEach(t=>{t.toggleAllChildren(e)})}},toggleChildren(e,t=null){const i=this.structures[e];if(!i.childStructures)return;const n=null!==t?t:!this.expandedStructures[e];n?this.$set(this.expandedStructures,e,!0):this.$set(this.expandedStructures,e,!1)}}},ct=lt,ut=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M19,13H5V11H19V13Z"}})])},ht=[],dt={},pt=g(dt,ut,ht,!1,null,null,null),ft=pt.exports,vt=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"}})])},gt=[],mt={},yt=g(mt,vt,gt,!1,null,null,null),wt=yt.exports,xt=g(ct,st,at,!1,null,null,null),bt=xt.exports;S()(xt,{IconMinus:ft,IconPlus:wt});const _t={computed:{currentStructure(){if(!Array.isArray(this.$root.manifest.structures))return!1;const e=[];this.$root.options.pages.forEach(t=>{t&&e.push(this.$root.canvases[t-1]["@id"])});const{length:t}=this.$root.manifest.structures;let i,n;for(let r=0;re.indexOf(t)>-1)&&t.firstPage&&t.lastPage){const e=t.lastPage-t.firstPage;if((e=0&&this.$root.manifest.structures[i]},currentStructureLabel(){const{label:e}=this.currentStructure;return e},currentStructureMetadata(){const{metadata:e}=this.currentStructure;return e},structures(){if(!this.$root.manifest.structures)return[];const e=[],t=[],{length:i}=this.$root.manifest.structures;for(let o=0;ot["@id"]===e)+1;const t=i.canvases[i.canvases.length-1];i.lastPage=this.$root.canvases.findIndex(e=>e["@id"]===t)+1;const n=this.$root.canvases[i.firstPage-1];if(!n)continue;i.pageLabel=n.label}else this.$root.canvases[0]&&(i.firstPage=1,i.lastPage=this.$root.pageCount,i.pageLabel=this.$root.canvases[0].label);i.pageCount=i.lastPage-i.firstPage+1,i.within&&t.push(i),e.push(i)}const n=t.length;for(let o=0;oe.firstPage-t.firstPage))}const r=e.filter(e=>!e.within).sort((e,t)=>e.firstPage-t.firstPage);return r}}};var Tt=_t;const St=[{label:"BibTex",profile:"http://www.bibtex.org/Format/",type:"literature"},{label:"EndNote",profile:"http://endnote.com/",type:"literature"},{label:"RIS",profile:"http://referencemanager.com/sites/rm/files/m/direct_export_ris.pdf",type:"literature"},{label:"METS",profile:"http://www.loc.gov/standards/mets/profile_docs/mets.profile.v2-0.xsd",type:"other"},{label:"MODS",format:"application/mods+xml",type:"other"}];var Et={components:{TocList:bt},mixins:[Tt],data(){return{literatureItems:[],otherItems:[],perElementPdfLinksVisible:!1}},computed:{pages(){return this.$root.options.pages.filter(e=>e>0)},hasElementPdfLinks(){const{manifest:e}=this.$root;if(!Array.isArray(e.structures)||!e.structures[0]||!e.structures[0].rendering)return!1;const t=this.$root.convertValueToArray(e.structures[0].rendering);return t.some(e=>e.format&&"application/pdf"===e.format)},imageUrls(){const e={};return this.$root.options.pages.forEach(t=>{if(!t)return;const{resource:i}=this.$root.canvases[t-1].images[0];if(i.service){const n="http://iiif.io/api/image/2/context.json"===i.service["@context"]?"default":"native",r=i.service["@id"];e[t]=`${r}${"/"===r.slice(-1)?"":"/"}full/full/0/${n}.jpg`}else e[t]=i["@id"]}),e},renderings(){return this.$root.convertValueToArray(this.$root.manifest.rendering)}},created(){const{seeAlso:e}=this.$root.manifest;if(!e)return;const t=JSON.parse(JSON.stringify(Array.isArray(e)?e:[e]));t.forEach(e=>{const t="object"===typeof e?e:{"@id":e};let i=!1;St.some(n=>{const r=e.format&&n.format===e.format,o=e.profile&&n.profile===e.profile;return!(!r&&!o)&&(t.label=n.label,"literature"===n.type&&(i=!0),!0)}),i?this.literatureItems.push(t):this.otherItems.push(t)})}},Pt=Et,Ct=g(Pt,rt,ot,!1,null,null,null),Rt=Ct.exports,kt=function(){var e=this,t=e._self._c;return t("section",{staticClass:"tify-fulltext",attrs:{tabindex:"0"}},[t("h2",{staticClass:"tify-sr-only"},[e._v(e._s(e.$root.translate("Fulltext")))]),e.fulltextAvailable?t("div",{staticClass:"tify-fulltext-texts"},[e._l(e.pages,(function(i,n){return[n&&i>1?t("hr",{key:n,staticClass:"tify-fulltext-separator"}):e._e(),e._l(e.fulltexts[i],(function(i,n){return t("div",{key:n,staticClass:"tify-fulltext-text",domProps:{innerHTML:e._s(i)}})}))]}))],2):t("div",{staticClass:"tify-fulltext-none"},[e._v(" "+e._s(e.$root.translate("Fulltext not available for this page"))+" ")])])},Ot=[],It={data(){return{fulltextAvailable:!1,fulltexts:[]}},watch:{"$root.options.pages":function(){this.loadFulltexts()}},methods:{loadFulltexts(){this.fulltextAvailable=!1,this.fulltexts=[],this.$root.options.pages.forEach(e=>{if(e<1||this.fulltexts[e])return;const t=this.$root.canvases[e-1];if(!("otherContent"in t))return;this.$set(this.fulltexts,e,[]);const i=t.otherContent[0]["@id"];this.$http.get(i).then(t=>{const{resources:i}=t.data;Array.isArray(i)&&i.forEach((t,i)=>{const n=t.resource;if(n&&n.chars){const t=this.$root.filterHtml(n.chars);t&&(this.fulltextAvailable=!0),this.$set(this.fulltexts[e],i,t)}else n["@id"]&&this.loadRemoteFulltext(e,i,n["@id"])})},e=>{const t=e.response?e.response.statusText:e.message;console.warn("Could not load annotations: "+t)})})},loadRemoteFulltext(e,t,i){this.$http.get(i).then(i=>{const n=this.$root.filterHtml(i.data);n&&(this.fulltextAvailable=!0),this.$set(this.fulltexts[e],t,n)},e=>{const t=e.response?e.response.statusText:e.message;console.warn("Could not load fulltext: "+t)})}},mounted(){this.loadFulltexts()},computed:{pages(){return this.$root.options.pages.filter(e=>!!e)}}},Dt=It,At=g(Dt,kt,Ot,!1,null,null,null),Lt=At.exports,Ht=function(){var e=this,t=e._self._c;return t("section",{staticClass:"tify-help",attrs:{tabindex:"0"}},[t("h2",{staticClass:"tify-sr-only"},[e._v(e._s(e.$root.translate("Help")))]),t("h3",[e._v(e._s(e.$root.translate("About TIFY")))]),t("p",{domProps:{innerHTML:e._s(e.info)}}),t("ul",[t("li",[t("a",{attrs:{href:e.userGuideUrl}},[e._v(e._s(e.$root.translate("User guide")))])]),t("li",[t("a",{attrs:{href:e.env.VUE_APP_REPOSITORY_URL}},[e._v(e._s(e.$root.translate("Source code")))])]),t("li",[t("a",{attrs:{href:e.env.VUE_APP_CONTRIBUTORS_URL}},[e._v(e._s(e.$root.translate("Contributors")))])]),t("li",[t("a",{attrs:{href:e.env.VUE_APP_BUGS_URL}},[e._v(e._s(e.$root.translate("Report a bug")))])])]),t("footer",{staticClass:"tify-help-footer"},[t("p",[e._v(e._s(e.$root.translate("Version"))+" "+e._s(e.env.VUE_APP_VERSION))]),t("p",{domProps:{innerHTML:e._s(e.copyright)}})])])},Mt=[],Bt={computed:{copyright(){const e='Copyright © 2017–2022 Göttingen University / Göttingen State and University Library';return this.$root.translate("$copyright",e)},env(){return Object({NODE_ENV:"production",VUE_APP_VERSION:"0.26.1",VUE_APP_LICENSE:"AGPL-3.0",VUE_APP_BUGS_URL:"https://github.com/tify-iiif-viewer/tify/issues",VUE_APP_CONTRIBUTORS_URL:"https://github.com/tify-iiif-viewer/tify/blob/main/CONTRIBUTORS.md",VUE_APP_DOCS_URL:"https://github.com/tify-iiif-viewer/tify/blob/v0.26.1/doc",VUE_APP_DOCS_LANGUAGES:"de,en",VUE_APP_REPOSITORY_URL:"https://github.com/tify-iiif-viewer/tify",BASE_URL:"/"})},info(){const e="TIFY is a slim and mobile-friendly IIIF document viewer, released under the GNU Affero General Public License 3.0.";return this.$root.translate("$info",e)},userGuideUrl(){const e="de,en".includes(this.$root.options.language)?this.$root.options.language:"en";return`https://github.com/tify-iiif-viewer/tify/blob/v0.26.1/doc/user-guide.${e}.md`}}},Ft=Bt,$t=g(Ft,Ht,Mt,!1,null,null,null),Nt=$t.exports,zt=function(){var e=this,t=e._self._c;return t("section",{staticClass:"tify-info",attrs:{tabindex:"0"}},[t("h2",{staticClass:"tify-sr-only"},[e._v(e._s(e.$root.translate("Info")))]),e.manifest.label?t("div",{staticClass:"tify-info-section -title"},[t("h3",{staticClass:"tify-info-heading"},[e._v(e._s(e.$root.translate("Title")))]),e._l(e.$root.convertValueToArray(e.manifest.label),(function(i){return t("div",{key:i},[e._v(" "+e._s(i)+" ")])}))],2):e._e(),e.manifest.metadata&&e.manifest.metadata.length?t("div",{staticClass:"tify-info-section -metadata"},[t("h3",[e._v(e._s(e.$root.translate("Metadata")))]),"info"===e.$root.options.view?t("metadata-list",{attrs:{metadata:e.manifest.metadata}}):e._e()],1):e._e(),e.currentStructureLabel||e.currentStructureMetadata?t("div",{staticClass:"tify-info-section -metadata -structure"},[t("h3",[e._v(" "+e._s(e.$root.translate("Current Element"))+" ")]),e.currentStructureLabel?t("p",{staticClass:"tify-info-structure"},[e._v(" "+e._s(e.currentStructureLabel)+" ")]):e._e(),"info"===e.$root.options.view&&e.currentStructureMetadata?t("metadata-list",{staticClass:"tify-info-section -metadata",attrs:{metadata:e.currentStructureMetadata}}):e._e()],1):e._e(),e.manifest.description?t("div",{staticClass:"tify-info-section -description"},[t("h3",[e._v(e._s(e.$root.translate("Description")))]),e._l(e.$root.convertValueToArray(e.manifest.description),(function(i,n){return t("div",{key:n,domProps:{innerHTML:e._s(i)}})}))],2):e._e(),e.license.length?t("div",{staticClass:"tify-info-section -license"},[t("h3",[e._v(e._s(e.$root.translate("License")))]),e._l(e.license,(function(i,n){return t("div",{key:n},["string"===typeof i?[e.isUrl(i)?t("a",{attrs:{href:i}},[e._v(" "+e._s(i)+" ")]):[e._v(" "+e._s(i)+" ")]]:[e.isUrl(i["@id"])?t("a",{attrs:{href:i["@id"]}},[e._v(" "+e._s(i["label"]||i["@id"])+" ")]):[e._v(" "+e._s(i["label"]||i["@id"])+" ")]]],2)}))],2):e._e(),e.related.length?t("div",{staticClass:"tify-info-section -related"},[t("h3",[e._v(e._s(e.$root.translate("Related Resources")))]),e._l(e.related,(function(i,n){return t("div",{key:n},["string"===typeof i?t("a",{attrs:{href:i}},[e._v(" "+e._s(i)+" ")]):t("a",{attrs:{href:i["@id"]}},[e._v(" "+e._s(i["label"]||i["@id"])+" ")])])}))],2):e._e(),e.manifest.attribution?t("div",{staticClass:"tify-info-section -attribution"},[t("h3",[e._v(e._s(e.$root.translate("Provided by")))]),e._l(e.$root.convertValueToArray(e.manifest.attribution),(function(i,n){return t("div",{key:n,domProps:{innerHTML:e._s(i)}})}))],2):e._e(),e.manifest.logo?t("div",{staticClass:"tify-info-section -logo"},[e.logoId&&e.manifest.logo.service&&e.manifest.logo.service["@id"]?t("a",{attrs:{href:e.manifest.logo.service["@id"]}},[t("img",{staticClass:"tify-info-logo",attrs:{src:e.logoId,alt:e.$root.translate("Logo")}})]):t("img",{staticClass:"tify-info-logo",attrs:{src:e.logoId,alt:e.$root.translate("Logo")}})]):e._e()])},Vt=[],Ut=function(){var e=this,t=e._self._c;return t("div",{staticClass:"tify-info-metadata"},e._l(e.metadata,(function(i,n){return t("div",{key:n},[t("h4",e._l(e.$root.convertValueToArray(i.label),(function(i,n){return t("div",{key:n},[e._v(" "+e._s(e.cleanLabel(i))+" ")])})),0),t("div",{ref:"contents",refInFor:!0,staticClass:"tify-info-content",class:{"-collapsed":e.infoItems[n]&&e.infoItems[n].collapsed}},[t("div",{staticClass:"tify-info-value"},e._l(e.$root.convertValueToArray(i.value),(function(i){return t("div",{key:i,domProps:{innerHTML:e._s(i)}})})),0),e.infoItems[n]&&e.infoItems[n].exceedsHeight?t("button",{staticClass:"tify-info-toggle",on:{click:function(t){e.infoItems[n].collapsed=!e.infoItems[n].collapsed}}},[e.infoItems[n].collapsed?[t("icon-chevron-down"),e._v(" "+e._s(e.$root.translate("Expand"))+" ")]:[t("icon-chevron-up"),e._v(" "+e._s(e.$root.translate("Collapse"))+" ")]],2):e._e()])])})),0)},jt=[],Wt={props:["metadata"],data(){return{infoItems:[]}},watch:{metadata(){this.updateInfoItems()}},mounted(){this.updateInfoItems()},methods:{cleanLabel(e){const t=e.replace("_"," ");return t.charAt(0).toUpperCase()+t.substr(1)},updateInfoItems(){this.$nextTick(()=>{this.$refs.contents&&this.$refs.contents.forEach((e,t)=>{const i=e.offsetHeight;this.$set(this.infoItems,t,{collapsed:!0,exceedsHeight:!0}),this.$nextTick(()=>{const n=e.offsetHeight,r=i>=n;this.$set(this.infoItems,t,{collapsed:r,exceedsHeight:r})})})})}}},Gt=Wt,qt=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"}})])},Zt=[],Xt={},Yt=g(Xt,qt,Zt,!1,null,null,null),Kt=Yt.exports,Qt=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z"}})])},Jt=[],ei={},ti=g(ei,Qt,Jt,!1,null,null,null),ii=ti.exports,ni=g(Gt,Ut,jt,!1,null,null,null),ri=ni.exports;S()(ni,{IconChevronDown:Kt,IconChevronUp:ii});var oi={components:{MetadataList:ri},mixins:[Tt],computed:{license(){return this.manifest.license?this.$root.convertValueToArray(this.manifest.license):[]},logoId(){return this.manifest.logo["@id"]?this.manifest.logo["@id"]:this.manifest.logo},manifest(){return this.$root.manifest},related(){return this.manifest.related?this.$root.convertValueToArray(this.manifest.related):[]}},methods:{isUrl(e){return/^https?:\/\//.test(e)}}},si=oi,ai=g(si,zt,Vt,!1,null,null,null),li=ai.exports,ci=function(){var e=this,t=e._self._c;return t("section",{staticClass:"tify-scan"},[t("h2",{staticClass:"tify-sr-only"},[e._v(e._s(e.$root.translate("Scan")))]),e.customPageViewActive||e.isFirstPage?e._e():t("button",{staticClass:"tify-scan-page-button -previous",attrs:{title:e.$root.translate("Previous page")},on:{click:e.goToPreviousPage}},[t("icon-chevron-left")],1),e.customPageViewActive||e.isLastPage?e._e():t("button",{staticClass:"tify-scan-page-button -next",attrs:{title:e.$root.translate("Next page")},on:{click:e.goToNextPage}},[t("icon-chevron-right")],1),e.viewer?t("div",{staticClass:"tify-scan-buttons"},[t("button",{staticClass:"tify-scan-button",attrs:{disabled:e.isMaxZoom,title:e.$root.translate("Zoom in")},on:{click:e.zoomIn}},[t("icon-magnify-plus")],1),t("button",{staticClass:"tify-scan-button",attrs:{disabled:e.isReset,title:e.$root.translate("Reset")},on:{click:function(t){return e.resetScan(!!t.shiftKey)}}},[t("icon-aspect-ratio")],1),t("button",{staticClass:"tify-scan-button",attrs:{disabled:e.isMinZoom,title:e.$root.translate("Zoom out")},on:{click:e.zoomOut}},[t("icon-magnify-minus")],1),t("button",{staticClass:"tify-scan-button",class:{"-active":e.$root.options.rotation},attrs:{title:e.$root.translate("Rotate")},on:{click:function(t){return e.rotateRight(t)}}},[t("icon-rotate-right")],1),e.cssFiltersSupported?t("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:e.closeFilters,expression:"closeFilters"}],staticClass:"tify-scan-filters",class:{"-open":e.filtersVisible}},[t("button",{staticClass:"tify-scan-button",class:{"-active":e.filtersActive},attrs:{title:e.$root.translate("Toggle image filters"),"aria-controls":e.$root.getId("filters"),"aria-expanded":e.filtersVisible?"true":"false"},on:{click:function(t){e.filtersVisible=!e.filtersVisible}}},[t("icon-tune")],1),t("div",{directives:[{name:"show",rawName:"v-show",value:e.filtersVisible,expression:"filtersVisible"}],staticClass:"tify-scan-filters-popup",attrs:{id:e.$root.getId("filters")}},[t("h3",{staticClass:"tify-sr-only"},[e._v(e._s(e.$root.translate("Image filters")))]),t("p",[t("label",[t("icon-white-balance-sunny"),e._v(" "+e._s(e.$root.translate("Brightness"))+" "),t("b",[e._v(e._s(Math.round(100*(e.$root.options.filters.brightness||1)))+" %")]),t("input",{ref:"firstSlider",staticClass:"tify-scan-range",attrs:{max:"2",min:".5",step:".01",type:"range"},domProps:{value:e.$root.options.filters.brightness||1},on:{input:function(t){return e.setFilter("brightness",t)}}})],1)]),t("p",[t("label",[t("icon-brightness-6"),e._v(" "+e._s(e.$root.translate("Contrast"))+" "),t("b",[e._v(e._s(Math.round(100*(e.$root.options.filters.contrast||1)))+" %")]),t("input",{staticClass:"tify-scan-range",attrs:{max:"2",min:".5",step:".01",type:"range"},domProps:{value:e.$root.options.filters.contrast||1},on:{input:function(t){return e.setFilter("contrast",t)}}})],1)]),t("p",[t("label",[t("icon-palette"),e._v(" "+e._s(e.$root.translate("Saturation"))+" "),t("b",[e._v(e._s(Math.round(100*e.saturation))+" %")]),t("input",{staticClass:"tify-scan-range",attrs:{max:"3",min:"0",step:".01",type:"range"},domProps:{value:e.saturation},on:{input:function(t){return e.setFilter("saturate",t)}}})],1)]),t("p",[t("button",{staticClass:"tify-scan-reset",attrs:{disabled:!e.filtersActive},on:{click:e.resetFilters}},[t("icon-backup-restore"),e._v(" "+e._s(e.$root.translate("Reset"))+" ")],1)])])]):e._e()]):e._e(),t("div",{ref:"image",staticClass:"tify-scan-image"})])},ui=[],hi=i("aa78"),di=i.n(hi);const pi=.01,fi=["-webkit-","-moz-","-o-","-ms-"];var vi={mixins:[p.a,x.a],data(){return{filtersVisible:!1,loadingTimeout:null,tileSources:{},viewer:null,zoomFactor:1.5}},computed:{cssFiltersSupported(){const e=document.createElement("a");return e.style.cssText=fi.join("filter:blur(2px);"),!!e.style.length&&(void 0===document.documentMode||document.documentMode>9)},filtersActive(){return Object.keys(this.$root.options.filters).length>0},isMinZoom(){return!this.viewer||this.viewer.viewport.getZoom()<=this.viewer.viewport.getMinZoom()},isMaxZoom(){return!this.viewer||this.viewer.viewport.getZoom()>=this.viewer.viewport.getMaxZoom()},isReset(){const e=this.viewer.viewport.getHomeBounds(),t=this.viewer.viewport.getBounds();return Math.abs(e.height-t.height)<1e-9&&Math.abs(e.width-t.width)<1e-9&&Math.abs(e.x-t.x)<1e-9&&Math.abs(e.y-t.y)<1e-9},saturation(){const e=this.$parent.$parent.options.filters.saturate;return"number"===typeof e?e:1}},watch:{"$root.options.pages":function(e,t){const i=e.length!==t.length;this.loadImageInfo(i)}},methods:{closeFilters(){this.filtersVisible=!1},initViewer(e){const{options:t}=this.$root,i=[];let n,r=0,o=0;if(t.pages.forEach((e,t)=>{let s=1;e<1?(s=0,n=t>0?this.$root.pageCount:1):n=e;const a=this.tileSources[n];if(!a)return;r||(r=a.width);const l=a.width/r;i.push({opacity:s,tileSource:a,width:l,x:o}),o+=l+pi}),this.viewer)return this.viewer.addOnceHandler("open",()=>{if(this.isReset||e)this.resetScan();else{this.viewer.viewport.applyConstraints(!0);const e=this.viewer.viewport.getBounds();if(e.x<=0&&e.y<=0)return;const i=t.pages[0]?0:1;this.viewer.viewport.panTo({x:e.x>0?e.width/2+i:t.pan.x,y:e.y>0?e.height/2:t.pan.y})}}),void this.viewer.open(i);this.viewer=di()({animationTime:.4,element:this.$refs.image,immediateRender:!0,preload:!this.$root.isMobile(),preserveImageSizeOnResize:!0,preserveViewport:!0,showNavigationControl:!1,showZoomControl:!1,tileSources:i,visibilityRatio:.2,...this.$root.options.viewer}),this.viewer.innerTracker.keyHandler=null,this.viewer.gestureSettingsMouse.clickToZoom=!1,this.viewer.addHandler("animation-finish",()=>{if(this.isReset)return void this.removeScanOptions();const e=this.viewer.viewport.getCenter();this.$root.updateOptions({pan:{x:Math.round(1e3*e.x)/1e3,y:Math.round(1e3*e.y)/1e3},zoom:Math.round(1e3*this.viewer.viewport.getZoom())/1e3})}),this.viewer.addHandler("canvas-click",()=>{document.body.click()}),this.viewer.addHandler("open",()=>{this.startLoadingWatch(),void 0!==t.pan.x||void 0!==t.pan.y||t.zoom?(void 0===t.pan.x&&void 0===t.pan.y||this.viewer.viewport.panTo({x:t.pan.x,y:t.pan.y},!0),t.zoom&&this.viewer.viewport.zoomTo(t.zoom,null,!0)):this.viewer.viewport.goHome(),null!==t.rotation&&this.viewer.viewport.setRotation(t.rotation)}),this.viewer.addHandler("tile-load-failed",e=>{this.$root.error="Error loading image: "+e.message}),this.$root.expose(this.resetScan),this.$root.expose(this.viewer,"viewer")},loadImageInfo(e=!1){this.stopLoadingWatch();const t=[];this.$root.options.pages.forEach(e=>{if(e<1||this.tileSources[e])return;const{resource:i}=this.$root.canvases[e-1].images[0];if(i.service){const n=i.service["@id"],r=`${n}${"/"===n.slice(-1)?"":"/"}info.json`;t.push(this.$http.get(r).then(t=>({...t,page:e}),t=>{let i;t.response&&t.response.statusText?i=t.response.statusText:t.message&&(i=t.message),this.$root.error=`Error loading info file for page ${e}${i?": "+i:""}`}))}else this.tileSources[e]={type:"image",url:i["@id"],width:i.width,height:i.height}}),t.length?Promise.all(t).then(t=>{t.forEach(e=>{e&&(this.tileSources[e.page]=e.data)}),this.initViewer(e)}):this.initViewer(e)},onKeydown(e){"Escape"===e.key&&(this.filtersVisible=!1);const t=[45,48,96];t.indexOf(e.keyCode)>-1&&(e.shiftKey?this.resetScan(e):this.viewer.viewport.goHome())},onKeypress(e){if(!this.preventKeyboardEvent(e))switch(e.key){case"r":case"R":this.rotateRight(e);break;case"i":this.filtersVisible=!this.filtersVisible,this.filtersVisible&&this.$nextTick(()=>{this.$refs.firstSlider.focus()});break;case"I":this.resetFilters();break;case"+":case"=":case"W":this.viewer.viewport.zoomBy(1.1),this.viewer.viewport.applyConstraints();break;case"-":case"_":case"S":this.viewer.viewport.zoomBy(.9),this.viewer.viewport.applyConstraints();break;case"w":this.viewer.innerTracker.keyDownHandler({keyCode:38});break;case"s":this.viewer.innerTracker.keyDownHandler({keyCode:40});break;case"a":this.viewer.innerTracker.keyDownHandler({keyCode:37});break;case"d":this.viewer.innerTracker.keyDownHandler({keyCode:39});break;default:}},removeScanOptions(){this.$root.updateOptions({pan:{},zoom:null})},resetFilters(){this.$refs.image.style.cssText="",this.$root.updateOptions({filters:{}})},resetScan(e){e&&(this.viewer.viewport.setRotation(0),this.$root.updateOptions({rotation:null}),this.filtersActive&&this.resetFilters()),this.viewer.viewport.goHome(),this.removeScanOptions()},rotateRight(e){const{viewport:t}=this.viewer,i=e&&e.shiftKey?0:(t.getRotation()+90)%360;t.setRotation(i),this.$root.updateOptions({rotation:i||null})},setFilter(e,t){const i=t.target.valueAsNumber;1===i?this.$delete(this.$root.options.filters,e):this.$set(this.$root.options.filters,e,i),this.$root.updateOptions({filters:this.$root.options.filters}),this.updateFilterStyle()},startLoadingWatch(){let e=0;for(let t=this.viewer.world.getItemCount()-1;t>=0;t-=1){const i=this.viewer.world.getItemAt(t);i&&i._tilesLoading&&(e=1)}this.$root.loading=e,this.loadingTimeout=setTimeout(this.startLoadingWatch,200)},stopLoadingWatch(){clearTimeout(this.loadingTimeout)},updateFilterStyle(){if(!this.filtersActive||!this.cssFiltersSupported)return;const e=[];Object.keys(this.$root.options.filters).forEach(t=>{e.push(`${t}(${this.$root.options.filters[t]})`)});const{image:t}=this.$refs,i=e.join(" ");t.style.cssText=fi.join(`filter:${i};`)},zoomIn(){this.viewer.viewport.zoomBy(this.zoomFactor)},zoomOut(){this.viewer.viewport.zoomBy(1/this.zoomFactor)}},mounted(){this.loadImageInfo(),this.updateFilterStyle(),this.$root.$el.addEventListener("keydown",this.onKeydown),this.$root.$el.addEventListener("keypress",this.onKeypress)},beforeDestroy(){this.viewer&&this.viewer.destroy(),this.$root.$el.removeEventListener("keydown",this.onKeydown),this.$root.$el.removeEventListener("keypress",this.onKeypress)}},gi=vi,mi=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M19,12H17V15H14V17H19V12M7,9H10V7H5V12H7V9M21,3H3A2,2 0 0,0 1,5V19A2,2 0 0,0 3,21H21A2,2 0 0,0 23,19V5A2,2 0 0,0 21,3M21,19H3V5H21V19Z"}})])},yi=[],wi={},xi=g(wi,mi,yi,!1,null,null,null),bi=xi.exports,_i=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M12,3A9,9 0 0,0 3,12H0L4,16L8,12H5A7,7 0 0,1 12,5A7,7 0 0,1 19,12A7,7 0 0,1 12,19C10.5,19 9.09,18.5 7.94,17.7L6.5,19.14C8.04,20.3 9.94,21 12,21A9,9 0 0,0 21,12A9,9 0 0,0 12,3M14,12A2,2 0 0,0 12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12Z"}})])},Ti=[],Si={},Ei=g(Si,_i,Ti,!1,null,null,null),Pi=Ei.exports,Ci=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M12,18V6A6,6 0 0,1 18,12A6,6 0 0,1 12,18M20,15.31L23.31,12L20,8.69V4H15.31L12,0.69L8.69,4H4V8.69L0.69,12L4,15.31V20H8.69L12,23.31L15.31,20H20V15.31Z"}})])},Ri=[],ki={},Oi=g(ki,Ci,Ri,!1,null,null,null),Ii=Oi.exports,Di=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M9,2A7,7 0 0,1 16,9C16,10.57 15.5,12 14.61,13.19L15.41,14H16L22,20L20,22L14,16V15.41L13.19,14.61C12,15.5 10.57,16 9,16A7,7 0 0,1 2,9A7,7 0 0,1 9,2M5,8V10H13V8H5Z"}})])},Ai=[],Li={},Hi=g(Li,Di,Ai,!1,null,null,null),Mi=Hi.exports,Bi=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M9,2A7,7 0 0,1 16,9C16,10.57 15.5,12 14.61,13.19L15.41,14H16L22,20L20,22L14,16V15.41L13.19,14.61C12,15.5 10.57,16 9,16A7,7 0 0,1 2,9A7,7 0 0,1 9,2M8,5V8H5V10H8V13H10V10H13V8H10V5H8Z"}})])},Fi=[],$i={},Ni=g($i,Bi,Fi,!1,null,null,null),zi=Ni.exports,Vi=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M17.5,12A1.5,1.5 0 0,1 16,10.5A1.5,1.5 0 0,1 17.5,9A1.5,1.5 0 0,1 19,10.5A1.5,1.5 0 0,1 17.5,12M14.5,8A1.5,1.5 0 0,1 13,6.5A1.5,1.5 0 0,1 14.5,5A1.5,1.5 0 0,1 16,6.5A1.5,1.5 0 0,1 14.5,8M9.5,8A1.5,1.5 0 0,1 8,6.5A1.5,1.5 0 0,1 9.5,5A1.5,1.5 0 0,1 11,6.5A1.5,1.5 0 0,1 9.5,8M6.5,12A1.5,1.5 0 0,1 5,10.5A1.5,1.5 0 0,1 6.5,9A1.5,1.5 0 0,1 8,10.5A1.5,1.5 0 0,1 6.5,12M12,3A9,9 0 0,0 3,12A9,9 0 0,0 12,21A1.5,1.5 0 0,0 13.5,19.5C13.5,19.11 13.35,18.76 13.11,18.5C12.88,18.23 12.73,17.88 12.73,17.5A1.5,1.5 0 0,1 14.23,16H16A5,5 0 0,0 21,11C21,6.58 16.97,3 12,3Z"}})])},Ui=[],ji={},Wi=g(ji,Vi,Ui,!1,null,null,null),Gi=Wi.exports,qi=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M16.89,15.5L18.31,16.89C19.21,15.73 19.76,14.39 19.93,13H17.91C17.77,13.87 17.43,14.72 16.89,15.5M13,17.9V19.92C14.39,19.75 15.74,19.21 16.9,18.31L15.46,16.87C14.71,17.41 13.87,17.76 13,17.9M19.93,11C19.76,9.61 19.21,8.27 18.31,7.11L16.89,8.53C17.43,9.28 17.77,10.13 17.91,11M15.55,5.55L11,1V4.07C7.06,4.56 4,7.92 4,12C4,16.08 7.05,19.44 11,19.93V17.91C8.16,17.43 6,14.97 6,12C6,9.03 8.16,6.57 11,6.09V10L15.55,5.55Z"}})])},Zi=[],Xi={},Yi=g(Xi,qi,Zi,!1,null,null,null),Ki=Yi.exports,Qi=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M3,17V19H9V17H3M3,5V7H13V5H3M13,21V19H21V17H13V15H11V21H13M7,9V11H3V13H7V15H9V9H7M21,13V11H11V13H21M15,9H17V7H21V5H17V3H15V9Z"}})])},Ji=[],en={},tn=g(en,Qi,Ji,!1,null,null,null),nn=tn.exports,rn=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M3.55 19.09L4.96 20.5L6.76 18.71L5.34 17.29M12 6C8.69 6 6 8.69 6 12S8.69 18 12 18 18 15.31 18 12C18 8.68 15.31 6 12 6M20 13H23V11H20M17.24 18.71L19.04 20.5L20.45 19.09L18.66 17.29M20.45 5L19.04 3.6L17.24 5.39L18.66 6.81M13 1H11V4H13M6.76 5.39L4.96 3.6L3.55 5L5.34 6.81L6.76 5.39M1 13H4V11H1M13 20H11V23H13"}})])},on=[],sn={},an=g(sn,rn,on,!1,null,null,null),ln=an.exports,cn=g(gi,ci,ui,!1,null,null,null),un=cn.exports;S()(cn,{IconAspectRatio:bi,IconBackupRestore:Pi,IconBrightness6:Ii,IconChevronLeft:L,IconChevronRight:$,IconMagnifyMinus:Mi,IconMagnifyPlus:zi,IconPalette:Gi,IconRotateRight:Ki,IconTune:nn,IconWhiteBalanceSunny:ln});var hn=function(){var e=this,t=e._self._c;return t("section",{staticClass:"tify-thumbnails",attrs:{tabindex:"0"},on:{scroll:e.redrawThumbnails}},[t("h2",{staticClass:"tify-sr-only"},[e._v(e._s(e.$root.translate("Pages")))]),t("div",{ref:"container",staticClass:"tify-thumbnails-list"},e._l(e.items,(function(i){return t("a",{key:i.page,staticClass:"tify-thumbnails-item",class:{"-current":e.$root.options.pages.indexOf(i.page)>-1},attrs:{href:"javascript:;"},on:{click:function(t){return t.preventDefault(),e.setPageAndSwitchView(i.page,t.ctrlKey)},touchstart:function(t){return e.touchStartTogglePage(i.page)},touchend:e.touchEnd}},[t("img",{attrs:{alt:"",src:i.imgUrl}}),t("span",{staticClass:"tify-thumbnails-page"},[e._v(" "+e._s(e.$root.getPageLabel(i.page,i.label))+" ")])])})),0)])},dn=[],pn=i("6015"),fn=i.n(pn);const vn=750;var gn={mixins:[fn.a],data(){return{isInited:!1,itemHeight:0,itemVMargin:0,items:[{label:""}],itemsPerRow:0,knownImages:[],lastScrollTop:0,resizeTimeout:null,style:{},thumbnailWidth:0,touchTimeout:null}},watch:{"$root.options.pages":function(e){this.$nextTick(()=>{const t=".tify-thumbnails-item.-current";e.length>2||e.length>1&&e[1]!==e[0]+1||(this.$refs.container.querySelector(t)?this.updateScrollPos(t):this.scrollToCurrentPage())})},"$root.options.view":function(e){"thumbnails"===e&&this.init()}},methods:{init(){this.updateDimensions(),this.scrollToCurrentPage(!1),this.isInited||(window.addEventListener("resize",this.onResize),this.isInited=!0)},onResize(){clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{"thumbnails"===this.$root.options.view&&this.updateDimensions()},200)},updateDimensions(){const e=this.$refs.container.querySelector(".tify-thumbnails-item"),t=e.currentStyle||window.getComputedStyle(e),i=parseInt(t.marginTop,10)+parseFloat(t.marginBottom,10);this.itemHeight=e.offsetHeight+i,this.itemVMargin=i;const n=parseInt(t.marginLeft,10)+parseFloat(t.marginRight,10),r=e.offsetWidth+n;this.thumbnailWidth=e.offsetWidth,this.itemsPerRow=Math.floor(this.$refs.container.clientWidth/r);const o=Math.ceil(this.$root.canvases.length/this.itemsPerRow),s=o*this.itemHeight;this.$refs.container.style.height=s+"px",this.redrawThumbnails(),this.scrollToCurrentPage(!1)},redrawThumbnails(){const e=this.$el.scrollTop,t=Math.floor(e/this.itemHeight)*this.itemsPerRow+1,i=Math.ceil(this.$el.offsetHeight/this.itemHeight),n=i*this.itemsPerRow,r=t+this.itemsPerRow+n,o=Math.min(this.$root.canvases.length,r),s=[];for(let a=t-1;a{const e=Math.floor(t/this.itemsPerRow);this.$refs.container.style.paddingTop=e*this.itemHeight+"px"})},scrollToCurrentPage(e=!0){const t=Math.floor((this.$root.options.pages[0]-1)/this.itemsPerRow),i=t*this.itemHeight+(this.itemVMargin-50);e?this.scrollTo(this.$el,i):this.$el.scrollTop=i},setPageAndSwitchView(e,t=!1){if(t){const t=this.$root.options.pages.slice(0),i=t.indexOf(e);return i<0?(t.push(e),t.sort((e,t)=>e-t),0===t[0]&&t.shift()):t.length>1&&t.splice(i,1),void this.$root.updateOptions({pages:t})}this.$root.setPage(e),this.$root.isMobile()&&this.$root.updateOptions({view:"scan"})},touchStartTogglePage(e){this.lastScrollTop=this.$el.scrollTop,this.touchTimeout=setTimeout(()=>{this.$el.scrollTop===this.lastScrollTop&&this.setPageAndSwitchView(e,!0)},vn)},touchEnd(){clearTimeout(this.touchTimeout)}},mounted(){this.style.flex=this.$el.style.flex,"thumbnails"===this.$root.options.view&&this.init()},beforeDestroy(){window.removeEventListener("resize",this.onResize)}},mn=gn,yn=g(mn,hn,dn,!1,null,null,null),wn=yn.exports,xn=function(){var e=this,t=e._self._c;return t("section",{staticClass:"tify-toc",attrs:{tabindex:"0"}},[t("h2",{staticClass:"tify-sr-only"},[e._v(e._s(e.$root.translate("Table of Contents")))]),e.hasChildStructures?t("div",{staticClass:"tify-toc-header"},[t("button",{staticClass:"tify-toc-toggle-all",on:{click:function(t){return e.$refs.children.toggleAllChildren(!0)}}},[e._v(" "+e._s(e.$root.translate("Expand all"))+" ")]),t("button",{staticClass:"tify-toc-toggle-all",on:{click:function(t){return e.$refs.children.toggleAllChildren(!1)}}},[e._v(" "+e._s(e.$root.translate("Collapse all"))+" ")])]):e._e(),e.isInited?t("toc-list",{ref:"children",attrs:{level:0,structures:e.structures}}):e._e()],1)},bn=[];const _n=".tify-toc-structure.-current";var Tn={mixins:[fn.a,Tt],components:{TocList:bt},data(){return{isInited:!1}},computed:{hasChildStructures(){return this.structures.some(e=>e.childStructures)}},methods:{init(){this.isInited=!0,this.$nextTick(()=>this.updateScrollPos(_n,!1))}},watch:{"$root.options.pages":function(){this.$nextTick(()=>this.updateScrollPos(_n))},"$root.options.view":function(e){"toc"===e&&this.init()}},mounted(){"toc"===this.$root.options.view&&this.init()}},Sn=Tn,En=g(Sn,xn,bn,!1,null,null,null),Pn=En.exports,Cn={components:{AppHeader:nt,ViewExport:Rt,ViewHelp:Nt,ViewInfo:li,ViewScan:un,ViewThumbnails:wn,ViewToc:Pn,ViewFulltext:Lt},computed:{hasOtherContent(){return this.$root.canvases.some(e=>"otherContent"in e)},hasToc(){return!(!this.$root.manifest.structures||!this.$root.manifest.structures.length)},ready(){return this.$root.manifest&&("en"===this.$root.options.language||this.$root.translation)}},created(){this.$root.expose(this.setLanguage)},mounted(){this.$http.interceptors.request.use(e=>(this.$root.loading+=1,e)),this.$http.interceptors.response.use(e=>(this.$root.loading>0&&(this.$root.loading-=1),e),e=>(this.$root.loading=0,Promise.reject(e))),this.$root.options.manifestUrl?(this.loadManifest(this.$root.options.manifestUrl),this.setLanguage(this.$root.options.language)):this.$root.error='Missing option "manifestUrl"'},methods:{loadManifest(e){this.$root.manifest=null,this.$http.get(e).then(e=>{const t=e.data;this.$root.isManifest(t)?(this.$root.manifest=t,this.$root.updateOptionsFromUrlQuery(),window.addEventListener("popstate",this.$root.updateOptionsFromUrlQuery),this.$nextTick(()=>this.$root.readyPromise.resolve())):(this.$root.error="Please provide a valid IIIF Presentation API 2.x manifest",this.$root.readyPromise.reject(this.$root.error))},e=>{const t=e.response?e.response.statusText:e.message;this.$root.error="Error loading IIIF manifest: "+t,this.$root.readyPromise.reject(this.$root.error)})},setLanguage(e){let t,i;const n=new Promise((e,n)=>{t=e,i=n});if("en"===e)return this.$root.options.language="en",this.$root.translation=null,t(e),n;const r=`${this.$root.options.translationsDirUrl}/${e}.json`;return this.$http.get(r).then(i=>{this.$root.options.language=e,this.$root.translation=i.data,t(e)},t=>{const n=t.response?t.response.statusText:t.message;this.$root.error=`Error loading translation for "${e}": ${n}`,i(new Error(this.$root.error))}),n}},beforeDestroy(){window.removeEventListener("popstate",this.$root.updateOptionsFromUrlQuery)}},Rn=Cn,kn=(i("2d00b"),function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"}})])}),On=[],In={},Dn=g(In,kn,On,!1,null,null,null),An=Dn.exports,Ln=g(Rn,s,a,!1,null,null,null),Hn=Ln.exports;S()(Ln,{IconClose:An});var Mn=i("07d2"),Bn=i.n(Mn),Fn={methods:{convertValueToArray(e){const{filterHtml:t}=this;if(!(e instanceof Array)){if("object"===typeof e){if(e["@value"])return[t(e["@value"])];if(e["@id"]){const i=t(e["@id"]);return[{"@id":i,label:e.label?t(e.label):i}]}return["(Invalid value)"]}return[t(e)]}const i=[],n={};e.forEach(e=>{"string"===typeof e||e["@id"]&&e.label?i.push(e):e&&"object"!==typeof e?i.push(t(e)):e["@language"]&&e["@value"]&&(n.fallback||(n.fallback=e["@value"]),0===e["@language"].indexOf("en")?n.en=e["@value"]:e["@language"]===this.options.language&&(n.preferred=e["@value"]))});const r=n.preferred||n.en||n.fallback||null;return r&&i.push(t(r)),i},filterHtml(e){const t=["a","b","br","i","img","p","span"],i={a:["href"],img:["alt","src"]};let n=Bn()(e,t);const r=/<(\w+)((\s+.+?(\s*=\s*(?:".*?"|'.*?'|.*?|[\^'">\s]+))?)+\s*|\s*)>/g;return n=n.replace(r,(e,t,n)=>{if(!n)return`<${t}>`;const r=/(?:([^\s]+)=(?:"(.*?)"|'(.*?)'))|([^\s]+)/g,o=[];return n.replace(r,(e,n)=>{e!==n&&i[t]&&i[t].indexOf(n)>-1&&o.push(e)}),o.length>0?`<${t} ${o.join(" ")}>`:`<${t}>`}),n},isManifest(e){return e&&Array.isArray(e.sequences)}}},$n={data(){return{urlUpdateTimeout:null}},mounted(){this.expose(this.setPage)},beforeDestroy(){clearTimeout(this.urlUpdateTimeout)},methods:{isValidPagesArray(e){if(!Array.isArray(e))return!1;if(new Set(e).size!==e.length)return!1;for(let t=0,i=e.length;t0&&e[t]>0&&e[t]<=e[t-1]||e[t]<0||e[t]>this.pageCount)return!1;return!0},setPage(e){let t=e;if(Array.isArray(e)||(t=[e]),!this.isValidPagesArray(t))throw new RangeError("Invalid pages");if(1===t.length&&this.options.pages[0]%2<1&&(this.options.pages[1]===this.options.pages[0]+1||0===this.options.pages[1])){const e=t[0]%2>0?t[0]-1:t[0];t=[e,e===this.pageCount?0:e+1]}return this.updateOptions({pages:t}),t},updateOptions(e){Object.assign(this.options,e),window.history&&this.$root.options.urlQueryKey&&(clearTimeout(this.urlUpdateTimeout),this.urlUpdateTimeout=setTimeout(()=>{const t={};this.options.urlQueryParams.forEach(e=>{const i=this.options[e];null===i||"pages"===e&&i.length<2&&i[0]<2||"object"===typeof i&&!Object.keys(i).length?delete t[e]:t[e]=this.options[e]});const i=new URL(window.location);i.searchParams.set(this.$root.options.urlQueryKey,JSON.stringify(t)),e.pages?(this.error="",window.history.pushState({},"",i)):window.history.replaceState({},"",i)},100))},updateOptionsFromUrlQuery(){let e={};try{const t=new URLSearchParams(window.location.search);e=JSON.parse(t.get(this.$root.options.urlQueryKey))||{}}catch(t){}""===e.view&&this.$root.isMobile()&&(e.view="scan"),e.pages&&!this.isValidPagesArray(e.pages)&&(this.$root.error="Invalid pages, reset to first page",e.pages=[1]),this.options.filters=e.filters||this.options.filters,this.options.pages=e.pages||this.options.pages,this.options.pan=e.panX||e.panY?{x:e.panX,y:e.panY}:e.pan||this.options.pan,this.options.rotation=parseInt(e.rotation,10)||this.options.rotation,this.options.view=e.view||""===e.view?e.view:this.options.view,this.options.zoom=parseFloat(e.zoom)||this.options.zoom}}},Nn={methods:{isMobile(){return this.$root.$el.offsetWidth{this.$el.clientWidth<=this.options.breakpoints[e]?this.$el.classList.add("-"+e):this.$el.classList.remove("-"+e)}),this.$el.clientHeight<=499?this.$el.classList.add("-short"):this.$el.classList.remove("-short")}},mounted(){this.updateBreakpoint(),window.addEventListener("resize",this.updateBreakpoint)},beforeDestroy(){window.removeEventListener("resize",this.updateBreakpoint)}};n["a"].directive("click-outside",{bind(e,t,i){e.event=n=>{e===n.target||e.contains(n.target)||i.context[t.expression](n)},document.body.addEventListener("click",e.event)},unbind(e){document.body.removeEventListener("click",e.event)}}),n["a"].prototype.$http=o.a,window.Tify=function(e={}){const t={breakpoints:{tiny:359,small:700,medium:1e3,large:1300},container:null,filters:{},language:"en",manifestUrl:null,viewer:{},pageLabelFormat:"P : L",pages:[1],pan:{},rotation:null,translationsDirUrl:null,urlQueryKey:null,urlQueryParams:["filters","pages","pan","rotation","view","zoom"],view:"",zoom:null};if(this.options={...t,...e},!this.options.translationsDirUrl){const e=document.getElementsByTagName("script"),t=[...e].find(e=>e.src.includes("/tify"));if(t){const{src:e}=t;this.options.translationsDirUrl=e.substring(0,e.lastIndexOf("/"))+"/translations"}}let i=null;this.ready=new Promise((e,t)=>{i={resolve:e,reject:t}});const r=this;this.app=new n["a"]({render:e=>e(Hn),data(){return{api:{},error:"",id:"tify-"+Math.floor(Math.random()*Date.now()),loading:0,manifest:null,options:r.options,readyPromise:i,translation:null}},mixins:[Fn,$n,Nn],computed:{canvases(){return this.manifest.sequences[0].canvases},pageCount(){return this.manifest.sequences[0].canvases.length}},methods:{expose(e,t){r[t||e.name.replace("bound ","")]=e},getId(e){return this.id+(e?"-"+e:"")},getPageLabel(e,t){return this.options.pageLabelFormat.replace("P",e).replace("L",t)},translate(e,t){return this.translation&&this.translation[e]?this.translation[e]:t||e}}});let o=!1;this.mount=e=>{if(o)throw new Error("TIFY is already mounted");const t="string"===typeof e?document.querySelector(e):e;if(!t)throw new Error("Container element not found");const i=window.getComputedStyle(t);"static"===i.position&&(t.style.position="relative");const n=document.createElement("div");t.innerHTML="",t.appendChild(n),this.app.$mount(n),o=!0},this.destroy=()=>{this.app.$destroy()},this.options.container&&this.mount(this.options.container)};t["default"]=window.Tify},"56ef":function(e,t,i){var n=i("d066"),r=i("e330"),o=i("241c"),s=i("7418"),a=i("825a"),l=r([].concat);e.exports=n("Reflect","ownKeys")||function(e){var t=o.f(a(e)),i=s.f;return i?l(t,i(e)):t}},"577e":function(e,t,i){var n=i("f5df"),r=String;e.exports=function(e){if("Symbol"===n(e))throw TypeError("Cannot convert a Symbol value to a string");return r(e)}},5926:function(e,t,i){var n=i("b42e");e.exports=function(e){var t=+e;return t!==t||0===t?0:n(t)}},"59ed":function(e,t,i){var n=i("1626"),r=i("0d51"),o=TypeError;e.exports=function(e){if(n(e))return e;throw o(r(e)+" is not a function")}},"5c6c":function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"5cce":function(e,t){e.exports={version:"0.27.2"}},"5e77":function(e,t,i){var n=i("83ab"),r=i("1a2d"),o=Function.prototype,s=n&&Object.getOwnPropertyDescriptor,a=r(o,"name"),l=a&&"something"===function(){}.name,c=a&&(!n||n&&s(o,"name").configurable);e.exports={EXISTS:a,PROPER:l,CONFIGURABLE:c}},"5f02":function(e,t,i){"use strict";var n=i("c532");e.exports=function(e){return n.isObject(e)&&!0===e.isAxiosError}},6015:function(e,t){e.exports={methods:{scrollTo(e,t,i=120){const n=e,r=!0===i?120:i;if(!r||r<0)return void(n.scrollTop=t);const o=t-e.scrollTop,s=o/r/.1;setTimeout(()=>{n.scrollTop+=s,n.scrollTop!==t&&this.scrollTo(n,t,r-10)},10)},updateScrollPos(e,t=!0){const i=this.$el.querySelectorAll(e);if(!i.length)return;let n=i[0];const r=i[i.length-1];Array.prototype.forEach.call(i,e=>{e.dataset.level>n.dataset.level&&(n=e)});const o=this.$el.getBoundingClientRect(),s=n.getBoundingClientRect(),a=r.getBoundingClientRect();if(s.topo.bottom){const e=a.bottom-o.bottom+this.$el.scrollTop;this.scrollTo(this.$el,e+50,t)}}}}},6374:function(e,t,i){var n=i("da84"),r=Object.defineProperty;e.exports=function(e,t){try{r(n,e,{value:t,configurable:!0,writable:!0})}catch(i){n[e]=t}return t}},"69f3":function(e,t,i){var n,r,o,s=i("7f9a"),a=i("da84"),l=i("e330"),c=i("861d"),u=i("9112"),h=i("1a2d"),d=i("c6cd"),p=i("f772"),f=i("d012"),v="Object already initialized",g=a.TypeError,m=a.WeakMap,y=function(e){return o(e)?r(e):n(e,{})},w=function(e){return function(t){var i;if(!c(t)||(i=r(t)).type!==e)throw g("Incompatible receiver, "+e+" required");return i}};if(s||d.state){var x=d.state||(d.state=new m),b=l(x.get),_=l(x.has),T=l(x.set);n=function(e,t){if(_(x,e))throw new g(v);return t.facade=e,T(x,e,t),t},r=function(e){return b(x,e)||{}},o=function(e){return _(x,e)}}else{var S=p("state");f[S]=!0,n=function(e,t){if(h(e,S))throw new g(v);return t.facade=e,u(e,S,t),t},r=function(e){return h(e,S)?e[S]:{}},o=function(e){return h(e,S)}}e.exports={set:n,get:r,has:o,enforce:y,getterFor:w}},7156:function(e,t,i){var n=i("1626"),r=i("861d"),o=i("d2bb");e.exports=function(e,t,i){var s,a;return o&&n(s=t.constructor)&&s!==i&&r(a=s.prototype)&&a!==i.prototype&&o(e,a),e}},7418:function(e,t){t.f=Object.getOwnPropertySymbols},7839:function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},7917:function(e,t,i){"use strict";var n=i("c532");function r(e,t,i,n,r){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),i&&(this.config=i),n&&(this.request=n),r&&(this.response=r)}n.inherits(r,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var o=r.prototype,s={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach((function(e){s[e]={value:e}})),Object.defineProperties(r,s),Object.defineProperty(o,"isAxiosError",{value:!0}),r.from=function(e,t,i,s,a,l){var c=Object.create(o);return n.toFlatObject(e,c,(function(e){return e!==Error.prototype})),r.call(c,e.message,t,i,s,a),c.name=e.name,l&&Object.assign(c,l),c},e.exports=r},"7aac":function(e,t,i){"use strict";var n=i("c532");e.exports=n.isStandardBrowserEnv()?function(){return{write:function(e,t,i,r,o,s){var a=[];a.push(e+"="+encodeURIComponent(t)),n.isNumber(i)&&a.push("expires="+new Date(i).toGMTString()),n.isString(r)&&a.push("path="+r),n.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},"7b0b":function(e,t,i){var n=i("1d80"),r=Object;e.exports=function(e){return r(n(e))}},"7f9a":function(e,t,i){var n=i("da84"),r=i("1626"),o=i("8925"),s=n.WeakMap;e.exports=r(s)&&/native code/.test(o(s))},"825a":function(e,t,i){var n=i("861d"),r=String,o=TypeError;e.exports=function(e){if(n(e))return e;throw o(r(e)+" is not an object")}},"83ab":function(e,t,i){var n=i("d039");e.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},"83b9":function(e,t,i){"use strict";var n=i("d925"),r=i("e683");e.exports=function(e,t){return e&&!n(t)?r(e,t):t}},"848b":function(e,t,i){"use strict";var n=i("5cce").version,r=i("7917"),o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}}));var s={};function a(e,t,i){if("object"!==typeof e)throw new r("options must be an object",r.ERR_BAD_OPTION_VALUE);var n=Object.keys(e),o=n.length;while(o-- >0){var s=n[o],a=t[s];if(a){var l=e[s],c=void 0===l||a(l,s,e);if(!0!==c)throw new r("option "+s+" must be "+c,r.ERR_BAD_OPTION_VALUE)}else if(!0!==i)throw new r("Unknown option "+s,r.ERR_BAD_OPTION)}}o.transitional=function(e,t,i){function o(e,t){return"[Axios v"+n+"] Transitional option '"+e+"'"+t+(i?". "+i:"")}return function(i,n,a){if(!1===e)throw new r(o(n," has been removed"+(t?" in "+t:"")),r.ERR_DEPRECATED);return t&&!s[n]&&(s[n]=!0,console.warn(o(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(i,n,a)}},e.exports={assertOptions:a,validators:o}},"861d":function(e,t,i){var n=i("1626");e.exports=function(e){return"object"==typeof e?null!==e:n(e)}},8925:function(e,t,i){var n=i("e330"),r=i("1626"),o=i("c6cd"),s=n(Function.toString);r(o.inspectSource)||(o.inspectSource=function(e){return s(e)}),e.exports=o.inspectSource},"8df4":function(e,t,i){"use strict";var n=i("fb60");function r(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var i=this;this.promise.then((function(e){if(i._listeners){var t,n=i._listeners.length;for(t=0;t=0&&Math.floor(t)===t&&isFinite(e)}function g(e){return s(e)&&"function"===typeof e.then&&"function"===typeof e.catch}function m(e){return null==e?"":Array.isArray(e)||p(e)&&e.toString===d?JSON.stringify(e,null,2):String(e)}function y(e){var t=parseFloat(e);return isNaN(t)?e:t}function w(e,t){for(var i=Object.create(null),n=e.split(","),r=0;r-1)return e.splice(i,1)}}var _=Object.prototype.hasOwnProperty;function T(e,t){return _.call(e,t)}function S(e){var t=Object.create(null);return function(i){var n=t[i];return n||(t[i]=e(i))}}var E=/-(\w)/g,P=S((function(e){return e.replace(E,(function(e,t){return t?t.toUpperCase():""}))})),C=S((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})),R=/\B([A-Z])/g,k=S((function(e){return e.replace(R,"-$1").toLowerCase()}));function O(e,t){function i(i){var n=arguments.length;return n?n>1?e.apply(t,arguments):e.call(t,i):e.call(t)}return i._length=e.length,i}function I(e,t){return e.bind(t)}var D=Function.prototype.bind?I:O;function A(e,t){t=t||0;var i=e.length-t,n=new Array(i);while(i--)n[i]=e[i+t];return n}function L(e,t){for(var i in t)e[i]=t[i];return e}function H(e){for(var t={},i=0;i0,ne=ee&&ee.indexOf("edge/")>0;ee&&ee.indexOf("android");var re=ee&&/iphone|ipad|ipod|ios/.test(ee);ee&&/chrome\/\d+/.test(ee),ee&&/phantomjs/.test(ee);var oe,se=ee&&ee.match(/firefox\/(\d+)/),ae={}.watch,le=!1;if(J)try{var ce={};Object.defineProperty(ce,"passive",{get:function(){le=!0}}),window.addEventListener("test-passive",null,ce)}catch(Xs){}var ue=function(){return void 0===oe&&(oe=!J&&"undefined"!==typeof e&&(e["process"]&&"server"===e["process"].env.VUE_ENV)),oe},he=J&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function de(e){return"function"===typeof e&&/native code/.test(e.toString())}var pe,fe="undefined"!==typeof Symbol&&de(Symbol)&&"undefined"!==typeof Reflect&&de(Reflect.ownKeys);pe="undefined"!==typeof Set&&de(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var ve=null;function ge(e){void 0===e&&(e=null),e||ve&&ve._scope.off(),ve=e,e&&e._scope.on()}var me=function(){function e(e,t,i,n,r,o,s,a){this.tag=e,this.data=t,this.children=i,this.text=n,this.elm=r,this.ns=void 0,this.context=o,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=t&&t.key,this.componentOptions=s,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=a,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1}return Object.defineProperty(e.prototype,"child",{get:function(){return this.componentInstance},enumerable:!1,configurable:!0}),e}(),ye=function(e){void 0===e&&(e="");var t=new me;return t.text=e,t.isComment=!0,t};function we(e){return new me(void 0,void 0,void 0,String(e))}function xe(e){var t=new me(e.tag,e.data,e.children&&e.children.slice(),e.text,e.elm,e.context,e.componentOptions,e.asyncFactory);return t.ns=e.ns,t.isStatic=e.isStatic,t.key=e.key,t.isComment=e.isComment,t.fnContext=e.fnContext,t.fnOptions=e.fnOptions,t.fnScopeId=e.fnScopeId,t.asyncMeta=e.asyncMeta,t.isCloned=!0,t}var be=0,_e=function(){function e(){this.id=be++,this.subs=[]}return e.prototype.addSub=function(e){this.subs.push(e)},e.prototype.removeSub=function(e){b(this.subs,e)},e.prototype.depend=function(t){e.target&&e.target.addDep(this)},e.prototype.notify=function(e){var t=this.subs.slice();for(var i=0,n=t.length;i0&&(n=ot(n,"".concat(t||"","_").concat(i)),rt(n[0])&&rt(u)&&(h[l]=we(u.text+n[0].text),n.shift()),h.push.apply(h,n)):c(n)?rt(u)?h[l]=we(u.text+n):""!==n&&h.push(we(n)):rt(n)&&rt(u)?h[l]=we(u.text+n.text):(a(e._isVList)&&s(n.tag)&&o(n.key)&&s(t)&&(n.key="__vlist".concat(t,"_").concat(i,"__")),h.push(n)));return h}function st(e,t){var i,n,o,a,l=null;if(r(e)||"string"===typeof e)for(l=new Array(e.length),i=0,n=e.length;i0,a=t?!!t.$stable:!s,l=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(a&&r&&r!==n&&l===r.$key&&!s&&!r.$hasNormal)return r;for(var c in o={},t)t[c]&&"$"!==c[0]&&(o[c]=Et(e,i,c,t[c]))}else o={};for(var u in i)u in o||(o[u]=Pt(i,u));return t&&Object.isExtensible(t)&&(t._normalized=o),X(o,"$stable",a),X(o,"$key",l),X(o,"$hasNormal",s),o}function Et(e,t,i,n){var o=function(){var t=ve;ge(e);var i=arguments.length?n.apply(null,arguments):n({});i=i&&"object"===typeof i&&!r(i)?[i]:nt(i);var o=i&&i[0];return ge(t),i&&(!o||1===i.length&&o.isComment&&!Tt(o))?void 0:i};return n.proxy&&Object.defineProperty(t,i,{get:o,enumerable:!0,configurable:!0}),o}function Pt(e,t){return function(){return e[t]}}function Ct(e){var t=e.$options,i=t.setup;if(i){var n=e._setupContext=Rt(e);ge(e),Se();var r=qt(i,null,[e._props||Ne({}),n],e,"setup");if(Ee(),ge(),u(r))t.render=r;else if(h(r))if(e._setupState=r,r.__sfc){var o=e._setupProxy={};for(var s in r)"__sfc"!==s&&Ue(o,r,s)}else for(var s in r)Z(s)||Ue(e,r,s);else 0}}function Rt(e){return{get attrs(){if(!e._attrsProxy){var t=e._attrsProxy={};X(t,"_v_attr_proxy",!0),kt(t,e.$attrs,n,e,"$attrs")}return e._attrsProxy},get listeners(){if(!e._listenersProxy){var t=e._listenersProxy={};kt(t,e.$listeners,n,e,"$listeners")}return e._listenersProxy},get slots(){return It(e)},emit:D(e.$emit,e),expose:function(t){t&&Object.keys(t).forEach((function(i){return Ue(e,t,i)}))}}}function kt(e,t,i,n,r){var o=!1;for(var s in t)s in e?t[s]!==i[s]&&(o=!0):(o=!0,Ot(e,s,n,r));for(var s in e)s in t||(o=!0,delete e[s]);return o}function Ot(e,t,i,n){Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){return i[n][t]}})}function It(e){return e._slotsProxy||Dt(e._slotsProxy={},e.$scopedSlots),e._slotsProxy}function Dt(e,t){for(var i in t)e[i]=t[i];for(var i in e)i in t||delete e[i]}function At(e){e._vnode=null,e._staticTrees=null;var t=e.$options,i=e.$vnode=t._parentVnode,r=i&&i.context;e.$slots=bt(t._renderChildren,r),e.$scopedSlots=i?St(e.$parent,i.data.scopedSlots,e.$slots):n,e._c=function(t,i,n,r){return Vt(e,t,i,n,r,!1)},e.$createElement=function(t,i,n,r){return Vt(e,t,i,n,r,!0)};var o=i&&i.data;Me(e,"$attrs",o&&o.attrs||n,null,!0),Me(e,"$listeners",t._parentListeners||n,null,!0)}var Lt=null;function Ht(e){xt(e.prototype),e.prototype.$nextTick=function(e){return oi(e,this)},e.prototype._render=function(){var e,t=this,i=t.$options,n=i.render,o=i._parentVnode;o&&t._isMounted&&(t.$scopedSlots=St(t.$parent,o.data.scopedSlots,t.$slots,t.$scopedSlots),t._slotsProxy&&Dt(t._slotsProxy,t.$scopedSlots)),t.$vnode=o;try{ge(t),Lt=t,e=n.call(t._renderProxy,t.$createElement)}catch(Xs){Gt(Xs,t,"render"),e=t._vnode}finally{Lt=null,ge()}return r(e)&&1===e.length&&(e=e[0]),e instanceof me||(e=ye()),e.parent=o,e}}function Mt(e,t){return(e.__esModule||fe&&"Module"===e[Symbol.toStringTag])&&(e=e.default),h(e)?t.extend(e):e}function Bt(e,t,i,n,r){var o=ye();return o.asyncFactory=e,o.asyncMeta={data:t,context:i,children:n,tag:r},o}function Ft(e,t){if(a(e.error)&&s(e.errorComp))return e.errorComp;if(s(e.resolved))return e.resolved;var i=Lt;if(i&&s(e.owners)&&-1===e.owners.indexOf(i)&&e.owners.push(i),a(e.loading)&&s(e.loadingComp))return e.loadingComp;if(i&&!s(e.owners)){var n=e.owners=[i],r=!0,l=null,c=null;i.$on("hook:destroyed",(function(){return b(n,i)}));var u=function(e){for(var t=0,i=n.length;t1?A(i):i;for(var n=A(arguments,1),r='event handler for "'.concat(e,'"'),o=0,s=i.length;odocument.createEvent("Event").timeStamp&&($i=function(){return Ni.now()})}var zi=function(e,t){if(e.post){if(!t.post)return 1}else if(t.post)return-1;return e.id-t.id};function Vi(){var e,t;for(Fi=$i(),Hi=!0,Ii.sort(zi),Mi=0;MiMi&&Ii[i].id>e.id)i--;Ii.splice(i+1,0,e)}else Ii.push(e);Li||(Li=!0,oi(Vi))}}function qi(e){var t=e.$options.provide;if(t){var i=u(t)?t.call(e):t;if(!h(i))return;for(var n=Xe(e),r=fe?Reflect.ownKeys(i):Object.keys(i),o=0;o-1)if(o&&!T(r,"default"))s=!1;else if(""===s||s===k(e)){var l=Cn(String,r.type);(l<0||a-1)return this;var i=A(arguments,1);return i.unshift(this),u(e.install)?e.install.apply(e,i):u(e)&&e.apply(null,i),t.push(e),this}}function Yn(e){e.mixin=function(e){return this.options=xn(this.options,e),this}}function Kn(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var i=this,n=i.cid,r=e._Ctor||(e._Ctor={});if(r[n])return r[n];var o=en(e)||en(i.options);var s=function(e){this._init(e)};return s.prototype=Object.create(i.prototype),s.prototype.constructor=s,s.cid=t++,s.options=xn(i.options,e),s["super"]=i,s.options.props&&Qn(s),s.options.computed&&Jn(s),s.extend=i.extend,s.mixin=i.mixin,s.use=i.use,U.forEach((function(e){s[e]=i[e]})),o&&(s.options.components[o]=s),s.superOptions=i.options,s.extendOptions=e,s.sealedOptions=L({},s.options),r[n]=s,s}}function Qn(e){var t=e.options.props;for(var i in t)kn(e.prototype,"_props",i)}function Jn(e){var t=e.options.computed;for(var i in t)Mn(e.prototype,i,t[i])}function er(e){U.forEach((function(t){e[t]=function(e,i){return i?("component"===t&&p(i)&&(i.name=i.name||e,i=this.options._base.extend(i)),"directive"===t&&u(i)&&(i={bind:i,update:i}),this.options[t+"s"][e]=i,i):this.options[t+"s"][e]}}))}function tr(e){return e&&(en(e.Ctor.options)||e.tag)}function ir(e,t){return r(e)?e.indexOf(t)>-1:"string"===typeof e?e.split(",").indexOf(t)>-1:!!f(e)&&e.test(t)}function nr(e,t){var i=e.cache,n=e.keys,r=e._vnode;for(var o in i){var s=i[o];if(s){var a=s.name;a&&!t(a)&&rr(i,o,n,r)}}}function rr(e,t,i,n){var r=e[t];!r||n&&r.tag===n.tag||r.componentInstance.$destroy(),e[t]=null,b(i,t)}Un(Zn),Vn(Zn),xi(Zn),Si(Zn),Ht(Zn);var or=[String,RegExp,Array],sr={name:"keep-alive",abstract:!0,props:{include:or,exclude:or,max:[String,Number]},methods:{cacheVNode:function(){var e=this,t=e.cache,i=e.keys,n=e.vnodeToCache,r=e.keyToCache;if(n){var o=n.tag,s=n.componentInstance,a=n.componentOptions;t[r]={name:tr(a),tag:o,componentInstance:s},i.push(r),this.max&&i.length>parseInt(this.max)&&rr(t,i[0],i,this._vnode),this.vnodeToCache=null}}},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var e in this.cache)rr(this.cache,e,this.keys)},mounted:function(){var e=this;this.cacheVNode(),this.$watch("include",(function(t){nr(e,(function(e){return ir(t,e)}))})),this.$watch("exclude",(function(t){nr(e,(function(e){return!ir(t,e)}))}))},updated:function(){this.cacheVNode()},render:function(){var e=this.$slots.default,t=$t(e),i=t&&t.componentOptions;if(i){var n=tr(i),r=this,o=r.include,s=r.exclude;if(o&&(!n||!ir(o,n))||s&&n&&ir(s,n))return t;var a=this,l=a.cache,c=a.keys,u=null==t.key?i.Ctor.cid+(i.tag?"::".concat(i.tag):""):t.key;l[u]?(t.componentInstance=l[u].componentInstance,b(c,u),c.push(u)):(this.vnodeToCache=t,this.keyToCache=u),t.data.keepAlive=!0}return t||e&&e[0]}},ar={KeepAlive:sr};function lr(e){var t={get:function(){return G}};Object.defineProperty(e,"config",t),e.util={warn:cn,extend:L,mergeOptions:xn,defineReactive:Me},e.set=Be,e.delete=Fe,e.nextTick=oi,e.observable=function(e){return He(e),e},e.options=Object.create(null),U.forEach((function(t){e.options[t+"s"]=Object.create(null)})),e.options._base=e,L(e.options.components,ar),Xn(e),Yn(e),Kn(e),er(e)}lr(Zn),Object.defineProperty(Zn.prototype,"$isServer",{get:ue}),Object.defineProperty(Zn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Zn,"FunctionalRenderContext",{value:Yi}),Zn.version=li;var cr=w("style,class"),ur=w("input,textarea,option,select,progress"),hr=function(e,t,i){return"value"===i&&ur(e)&&"button"!==t||"selected"===i&&"option"===e||"checked"===i&&"input"===e||"muted"===i&&"video"===e},dr=w("contenteditable,draggable,spellcheck"),pr=w("events,caret,typing,plaintext-only"),fr=function(e,t){return wr(t)||"false"===t?"false":"contenteditable"===e&&pr(t)?t:"true"},vr=w("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"),gr="http://www.w3.org/1999/xlink",mr=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},yr=function(e){return mr(e)?e.slice(6,e.length):""},wr=function(e){return null==e||!1===e};function xr(e){var t=e.data,i=e,n=e;while(s(n.componentInstance))n=n.componentInstance._vnode,n&&n.data&&(t=br(n.data,t));while(s(i=i.parent))i&&i.data&&(t=br(t,i.data));return _r(t.staticClass,t.class)}function br(e,t){return{staticClass:Tr(e.staticClass,t.staticClass),class:s(e.class)?[e.class,t.class]:t.class}}function _r(e,t){return s(e)||s(t)?Tr(e,Sr(t)):""}function Tr(e,t){return e?t?e+" "+t:e:t||""}function Sr(e){return Array.isArray(e)?Er(e):h(e)?Pr(e):"string"===typeof e?e:""}function Er(e){for(var t,i="",n=0,r=e.length;n-1?Dr[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:Dr[e]=/HTMLUnknownElement/.test(t.toString())}var Lr=w("text,number,password,search,email,tel,url");function Hr(e){if("string"===typeof e){var t=document.querySelector(e);return t||document.createElement("div")}return e}function Mr(e,t){var i=document.createElement(e);return"select"!==e||t.data&&t.data.attrs&&void 0!==t.data.attrs.multiple&&i.setAttribute("multiple","multiple"),i}function Br(e,t){return document.createElementNS(Cr[e],t)}function Fr(e){return document.createTextNode(e)}function $r(e){return document.createComment(e)}function Nr(e,t,i){e.insertBefore(t,i)}function zr(e,t){e.removeChild(t)}function Vr(e,t){e.appendChild(t)}function jr(e){return e.parentNode}function Ur(e){return e.nextSibling}function Wr(e){return e.tagName}function Gr(e,t){e.textContent=t}function qr(e,t){e.setAttribute(t,"")}var Zr=Object.freeze({__proto__:null,createElement:Mr,createElementNS:Br,createTextNode:Fr,createComment:$r,insertBefore:Nr,removeChild:zr,appendChild:Vr,parentNode:jr,nextSibling:Ur,tagName:Wr,setTextContent:Gr,setStyleScope:qr}),Xr={create:function(e,t){Yr(t)},update:function(e,t){e.data.ref!==t.data.ref&&(Yr(e,!0),Yr(t))},destroy:function(e){Yr(e,!0)}};function Yr(e,t){var i=e.data.ref;if(s(i)){var n=e.context,o=e.componentInstance||e.elm,a=t?null:o,l=t?void 0:o;if(u(i))qt(i,n,[a],n,"template ref function");else{var c=e.data.refInFor,h="string"===typeof i||"number"===typeof i,d=je(i),p=n.$refs;if(h||d)if(c){var f=h?p[i]:i.value;t?r(f)&&b(f,o):r(f)?f.includes(o)||f.push(o):h?(p[i]=[o],Kr(n,i,p[i])):i.value=[o]}else if(h){if(t&&p[i]!==o)return;p[i]=l,Kr(n,i,a)}else if(d){if(t&&i.value!==o)return;i.value=a}else 0}}}function Kr(e,t,i){var n=e._setupState;n&&T(n,t)&&(je(n[t])?n[t].value=i:n[t]=i)}var Qr=new me("",{},[]),Jr=["create","activate","update","remove","destroy"];function eo(e,t){return e.key===t.key&&e.asyncFactory===t.asyncFactory&&(e.tag===t.tag&&e.isComment===t.isComment&&s(e.data)===s(t.data)&&to(e,t)||a(e.isAsyncPlaceholder)&&o(t.asyncFactory.error))}function to(e,t){if("input"!==e.tag)return!0;var i,n=s(i=e.data)&&s(i=i.attrs)&&i.type,r=s(i=t.data)&&s(i=i.attrs)&&i.type;return n===r||Lr(n)&&Lr(r)}function io(e,t,i){var n,r,o={};for(n=t;n<=i;++n)r=e[n].key,s(r)&&(o[r]=n);return o}function no(e){var t,i,n={},l=e.modules,u=e.nodeOps;for(t=0;tv?(h=o(i[y+1])?null:i[y+1].elm,S(e,h,i,p,y,n)):p>y&&P(t,d,v)}function k(e,t,i,n){for(var r=i;r-1?vo(e,t,i):vr(t)?wr(i)?e.removeAttribute(t):(i="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,i)):dr(t)?e.setAttribute(t,fr(t,i)):mr(t)?wr(i)?e.removeAttributeNS(gr,yr(t)):e.setAttributeNS(gr,t,i):vo(e,t,i)}function vo(e,t,i){if(wr(i))e.removeAttribute(t);else{if(te&&!ie&&"TEXTAREA"===e.tagName&&"placeholder"===t&&""!==i&&!e.__ieph){var n=function(t){t.stopImmediatePropagation(),e.removeEventListener("input",n)};e.addEventListener("input",n),e.__ieph=!0}e.setAttribute(t,i)}}var go={create:po,update:po};function mo(e,t){var i=t.elm,n=t.data,r=e.data;if(!(o(n.staticClass)&&o(n.class)&&(o(r)||o(r.staticClass)&&o(r.class)))){var a=xr(t),l=i._transitionClasses;s(l)&&(a=Tr(a,Sr(l))),a!==i._prevClass&&(i.setAttribute("class",a),i._prevClass=a)}}var yo,wo={create:mo,update:mo},xo="__r",bo="__c";function _o(e){if(s(e[xo])){var t=te?"change":"input";e[t]=[].concat(e[xo],e[t]||[]),delete e[xo]}s(e[bo])&&(e.change=[].concat(e[bo],e.change||[]),delete e[bo])}function To(e,t,i){var n=yo;return function r(){var o=t.apply(null,arguments);null!==o&&Po(e,r,i,n)}}var So=Kt&&!(se&&Number(se[1])<=53);function Eo(e,t,i,n){if(So){var r=Fi,o=t;t=o._wrapper=function(e){if(e.target===e.currentTarget||e.timeStamp>=r||e.timeStamp<=0||e.target.ownerDocument!==document)return o.apply(this,arguments)}}yo.addEventListener(e,t,le?{capture:i,passive:n}:i)}function Po(e,t,i,n){(n||yo).removeEventListener(e,t._wrapper||t,i)}function Co(e,t){if(!o(e.data.on)||!o(t.data.on)){var i=t.data.on||{},n=e.data.on||{};yo=t.elm||e.elm,_o(i),Qe(i,n,Eo,Po,To,t.context),yo=void 0}}var Ro,ko={create:Co,update:Co,destroy:function(e){return Co(e,Qr)}};function Oo(e,t){if(!o(e.data.domProps)||!o(t.data.domProps)){var i,n,r=t.elm,l=e.data.domProps||{},c=t.data.domProps||{};for(i in(s(c.__ob__)||a(c._v_attr_proxy))&&(c=t.data.domProps=L({},c)),l)i in c||(r[i]="");for(i in c){if(n=c[i],"textContent"===i||"innerHTML"===i){if(t.children&&(t.children.length=0),n===l[i])continue;1===r.childNodes.length&&r.removeChild(r.childNodes[0])}if("value"===i&&"PROGRESS"!==r.tagName){r._value=n;var u=o(n)?"":String(n);Io(r,u)&&(r.value=u)}else if("innerHTML"===i&&kr(r.tagName)&&o(r.innerHTML)){Ro=Ro||document.createElement("div"),Ro.innerHTML="".concat(n,"");var h=Ro.firstChild;while(r.firstChild)r.removeChild(r.firstChild);while(h.firstChild)r.appendChild(h.firstChild)}else if(n!==l[i])try{r[i]=n}catch(Xs){}}}}function Io(e,t){return!e.composing&&("OPTION"===e.tagName||Do(e,t)||Ao(e,t))}function Do(e,t){var i=!0;try{i=document.activeElement!==e}catch(Xs){}return i&&e.value!==t}function Ao(e,t){var i=e.value,n=e._vModifiers;if(s(n)){if(n.number)return y(i)!==y(t);if(n.trim)return i.trim()!==t.trim()}return i!==t}var Lo={create:Oo,update:Oo},Ho=S((function(e){var t={},i=/;(?![^(]*\))/g,n=/:(.+)/;return e.split(i).forEach((function(e){if(e){var i=e.split(n);i.length>1&&(t[i[0].trim()]=i[1].trim())}})),t}));function Mo(e){var t=Bo(e.style);return e.staticStyle?L(e.staticStyle,t):t}function Bo(e){return Array.isArray(e)?H(e):"string"===typeof e?Ho(e):e}function Fo(e,t){var i,n={};if(t){var r=e;while(r.componentInstance)r=r.componentInstance._vnode,r&&r.data&&(i=Mo(r.data))&&L(n,i)}(i=Mo(e.data))&&L(n,i);var o=e;while(o=o.parent)o.data&&(i=Mo(o.data))&&L(n,i);return n}var $o,No=/^--/,zo=/\s*!important$/,Vo=function(e,t,i){if(No.test(t))e.style.setProperty(t,i);else if(zo.test(i))e.style.setProperty(k(t),i.replace(zo,""),"important");else{var n=Uo(t);if(Array.isArray(i))for(var r=0,o=i.length;r-1?t.split(qo).forEach((function(t){return e.classList.add(t)})):e.classList.add(t);else{var i=" ".concat(e.getAttribute("class")||""," ");i.indexOf(" "+t+" ")<0&&e.setAttribute("class",(i+t).trim())}}function Xo(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(qo).forEach((function(t){return e.classList.remove(t)})):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{var i=" ".concat(e.getAttribute("class")||""," "),n=" "+t+" ";while(i.indexOf(n)>=0)i=i.replace(n," ");i=i.trim(),i?e.setAttribute("class",i):e.removeAttribute("class")}}function Yo(e){if(e){if("object"===typeof e){var t={};return!1!==e.css&&L(t,Ko(e.name||"v")),L(t,e),t}return"string"===typeof e?Ko(e):void 0}}var Ko=S((function(e){return{enterClass:"".concat(e,"-enter"),enterToClass:"".concat(e,"-enter-to"),enterActiveClass:"".concat(e,"-enter-active"),leaveClass:"".concat(e,"-leave"),leaveToClass:"".concat(e,"-leave-to"),leaveActiveClass:"".concat(e,"-leave-active")}})),Qo=J&&!ie,Jo="transition",es="animation",ts="transition",is="transitionend",ns="animation",rs="animationend";Qo&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(ts="WebkitTransition",is="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(ns="WebkitAnimation",rs="webkitAnimationEnd"));var os=J?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function ss(e){os((function(){os(e)}))}function as(e,t){var i=e._transitionClasses||(e._transitionClasses=[]);i.indexOf(t)<0&&(i.push(t),Zo(e,t))}function ls(e,t){e._transitionClasses&&b(e._transitionClasses,t),Xo(e,t)}function cs(e,t,i){var n=hs(e,t),r=n.type,o=n.timeout,s=n.propCount;if(!r)return i();var a=r===Jo?is:rs,l=0,c=function(){e.removeEventListener(a,u),i()},u=function(t){t.target===e&&++l>=s&&c()};setTimeout((function(){l0&&(i=Jo,u=s,h=o.length):t===es?c>0&&(i=es,u=c,h=l.length):(u=Math.max(s,c),i=u>0?s>c?Jo:es:null,h=i?i===Jo?o.length:l.length:0);var d=i===Jo&&us.test(n[ts+"Property"]);return{type:i,timeout:u,propCount:h,hasTransform:d}}function ds(e,t){while(e.length1}function ys(e,t){!0!==t.data.show&&fs(t)}var ws=J?{create:ys,activate:ys,remove:function(e,t){!0!==e.data.show?vs(e,t):t()}}:{},xs=[go,wo,ko,Lo,Go,ws],bs=xs.concat(ho),_s=no({nodeOps:Zr,modules:bs});ie&&document.addEventListener("selectionchange",(function(){var e=document.activeElement;e&&e.vmodel&&Os(e,"input")}));var Ts={inserted:function(e,t,i,n){"select"===i.tag?(n.elm&&!n.elm._vOptions?Je(i,"postpatch",(function(){Ts.componentUpdated(e,t,i)})):Ss(e,t,i.context),e._vOptions=[].map.call(e.options,Cs)):("textarea"===i.tag||Lr(e.type))&&(e._vModifiers=t.modifiers,t.modifiers.lazy||(e.addEventListener("compositionstart",Rs),e.addEventListener("compositionend",ks),e.addEventListener("change",ks),ie&&(e.vmodel=!0)))},componentUpdated:function(e,t,i){if("select"===i.tag){Ss(e,t,i.context);var n=e._vOptions,r=e._vOptions=[].map.call(e.options,Cs);if(r.some((function(e,t){return!$(e,n[t])}))){var o=e.multiple?t.value.some((function(e){return Ps(e,r)})):t.value!==t.oldValue&&Ps(t.value,r);o&&Os(e,"change")}}}};function Ss(e,t,i){Es(e,t,i),(te||ne)&&setTimeout((function(){Es(e,t,i)}),0)}function Es(e,t,i){var n=t.value,r=e.multiple;if(!r||Array.isArray(n)){for(var o,s,a=0,l=e.options.length;a-1,s.selected!==o&&(s.selected=o);else if($(Cs(s),n))return void(e.selectedIndex!==a&&(e.selectedIndex=a));r||(e.selectedIndex=-1)}}function Ps(e,t){return t.every((function(t){return!$(t,e)}))}function Cs(e){return"_value"in e?e._value:e.value}function Rs(e){e.target.composing=!0}function ks(e){e.target.composing&&(e.target.composing=!1,Os(e.target,"input"))}function Os(e,t){var i=document.createEvent("HTMLEvents");i.initEvent(t,!0,!0),e.dispatchEvent(i)}function Is(e){return!e.componentInstance||e.data&&e.data.transition?e:Is(e.componentInstance._vnode)}var Ds={bind:function(e,t,i){var n=t.value;i=Is(i);var r=i.data&&i.data.transition,o=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;n&&r?(i.data.show=!0,fs(i,(function(){e.style.display=o}))):e.style.display=n?o:"none"},update:function(e,t,i){var n=t.value,r=t.oldValue;if(!n!==!r){i=Is(i);var o=i.data&&i.data.transition;o?(i.data.show=!0,n?fs(i,(function(){e.style.display=e.__vOriginalDisplay})):vs(i,(function(){e.style.display="none"}))):e.style.display=n?e.__vOriginalDisplay:"none"}},unbind:function(e,t,i,n,r){r||(e.style.display=e.__vOriginalDisplay)}},As={model:Ts,show:Ds},Ls={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function Hs(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?Hs($t(t.children)):e}function Ms(e){var t={},i=e.$options;for(var n in i.propsData)t[n]=e[n];var r=i._parentListeners;for(var n in r)t[P(n)]=r[n];return t}function Bs(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}function Fs(e){while(e=e.parent)if(e.data.transition)return!0}function $s(e,t){return t.key===e.key&&t.tag===e.tag}var Ns=function(e){return e.tag||Tt(e)},zs=function(e){return"show"===e.name},Vs={name:"transition",props:Ls,abstract:!0,render:function(e){var t=this,i=this.$slots.default;if(i&&(i=i.filter(Ns),i.length)){0;var n=this.mode;0;var r=i[0];if(Fs(this.$vnode))return r;var o=Hs(r);if(!o)return r;if(this._leaving)return Bs(e,r);var s="__transition-".concat(this._uid,"-");o.key=null==o.key?o.isComment?s+"comment":s+o.tag:c(o.key)?0===String(o.key).indexOf(s)?o.key:s+o.key:o.key;var a=(o.data||(o.data={})).transition=Ms(this),l=this._vnode,u=Hs(l);if(o.data.directives&&o.data.directives.some(zs)&&(o.data.show=!0),u&&u.data&&!$s(o,u)&&!Tt(u)&&(!u.componentInstance||!u.componentInstance._vnode.isComment)){var h=u.data.transition=L({},a);if("out-in"===n)return this._leaving=!0,Je(h,"afterLeave",(function(){t._leaving=!1,t.$forceUpdate()})),Bs(e,r);if("in-out"===n){if(Tt(o))return l;var d,p=function(){d()};Je(a,"afterEnter",p),Je(a,"enterCancelled",p),Je(h,"delayLeave",(function(e){d=e}))}}return r}}},js=L({tag:String,moveClass:String},Ls);delete js.mode;var Us={props:js,beforeMount:function(){var e=this,t=this._update;this._update=function(i,n){var r=_i(e);e.__patch__(e._vnode,e.kept,!1,!0),e._vnode=e.kept,r(),t.call(e,i,n)}},render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",i=Object.create(null),n=this.prevChildren=this.children,r=this.$slots.default||[],o=this.children=[],s=Ms(this),a=0;a0&&n[0]<4?1:+(n[0]+n[1])),!r&&s&&(n=s.match(/Edge\/(\d+)/),(!n||n[1]>=74)&&(n=s.match(/Chrome\/(\d+)/),n&&(r=+n[1]))),e.exports=r},"2d00b":function(e,t,i){"use strict";i("f675")},"2e67":function(e,t,i){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},"30b5":function(e,t,i){"use strict";var n=i("c532");function r(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,i){if(!t)return e;var o;if(i)o=i(t);else if(n.isURLSearchParams(t))o=t.toString();else{var s=[];n.forEach(t,(function(e,t){null!==e&&"undefined"!==typeof e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),s.push(r(t)+"="+r(e))})))})),o=s.join("&")}if(o){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},"32be":function(e,t){e.exports={methods:{preventKeyboardEvent(e){return!!(e.altKey||e.ctrlKey||e.metaKey)||!(!["INPUT","SELECT","TEXTAREA"].includes(e.target.nodeName)||"range"===e.target.type)}}}},"342f":function(e,t,i){var n=i("d066");e.exports=n("navigator","userAgent")||""},3934:function(e,t,i){"use strict";var n=i("c532");e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");function r(e){var n=e;return t&&(i.setAttribute("href",n),n=i.href),i.setAttribute("href",n),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}return e=r(window.location.href),function(t){var i=n.isString(t)?r(t):t;return i.protocol===e.protocol&&i.host===e.host}}():function(){return function(){return!0}}()},"3a9b":function(e,t,i){var n=i("e330");e.exports=n({}.isPrototypeOf)},"3bbe":function(e,t,i){var n=i("1626"),r=String,o=TypeError;e.exports=function(e){if("object"==typeof e||n(e))return e;throw o("Can't set "+r(e)+" as a prototype")}},"40d5":function(e,t,i){var n=i("d039");e.exports=!n((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},4362:function(e,t,i){t.nextTick=function(e){var t=Array.prototype.slice.call(arguments);t.shift(),setTimeout((function(){e.apply(null,t)}),0)},t.platform=t.arch=t.execPath=t.title="browser",t.pid=1,t.browser=!0,t.env={},t.argv=[],t.binding=function(e){throw new Error("No such module. (Possibly not yet loaded)")},function(){var e,n="/";t.cwd=function(){return n},t.chdir=function(t){e||(e=i("df7c")),n=e.resolve(t,n)}}(),t.exit=t.kill=t.umask=t.dlopen=t.uptime=t.memoryUsage=t.uvCounters=function(){},t.features={}},"44ad":function(e,t,i){var n=i("e330"),r=i("d039"),o=i("c6b6"),s=Object,a=n("".split);e.exports=r((function(){return!s("z").propertyIsEnumerable(0)}))?function(e){return"String"==o(e)?a(e,""):s(e)}:s},4581:function(e,t){e.exports=null},"467f":function(e,t,i){"use strict";var n=i("7917");e.exports=function(e,t,i){var r=i.config.validateStatus;i.status&&r&&!r(i.status)?t(new n("Request failed with status code "+i.status,[n.ERR_BAD_REQUEST,n.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i)):e(i)}},"485a":function(e,t,i){var n=i("c65b"),r=i("1626"),o=i("861d"),s=TypeError;e.exports=function(e,t){var i,a;if("string"===t&&r(i=e.toString)&&!o(a=n(i,e)))return a;if(r(i=e.valueOf)&&!o(a=n(i,e)))return a;if("string"!==t&&r(i=e.toString)&&!o(a=n(i,e)))return a;throw s("Can't convert object to primitive value")}},4930:function(e,t,i){var n=i("2d00"),r=i("d039");e.exports=!!Object.getOwnPropertySymbols&&!r((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},"4a7b":function(e,t,i){"use strict";var n=i("c532");e.exports=function(e,t){t=t||{};var i={};function r(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function o(i){return n.isUndefined(t[i])?n.isUndefined(e[i])?void 0:r(void 0,e[i]):r(e[i],t[i])}function s(e){if(!n.isUndefined(t[e]))return r(void 0,t[e])}function a(i){return n.isUndefined(t[i])?n.isUndefined(e[i])?void 0:r(void 0,e[i]):r(void 0,t[i])}function l(i){return i in t?r(e[i],t[i]):i in e?r(void 0,e[i]):void 0}var c={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:l};return n.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||o,r=t(e);n.isUndefined(r)&&t!==l||(i[e]=r)})),i}},"4c3d":function(e,t,i){"use strict";(function(t){var n=i("c532"),r=i("c8af"),o=i("7917"),s=i("cafa"),a=i("e467"),l={"Content-Type":"application/x-www-form-urlencoded"};function c(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function u(){var e;return("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof t&&"[object process]"===Object.prototype.toString.call(t))&&(e=i("b50d")),e}function h(e,t,i){if(n.isString(e))try{return(t||JSON.parse)(e),n.trim(e)}catch(r){if("SyntaxError"!==r.name)throw r}return(i||JSON.stringify)(e)}var d={transitional:s,adapter:u(),transformRequest:[function(e,t){if(r(t,"Accept"),r(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e))return e;if(n.isArrayBufferView(e))return e.buffer;if(n.isURLSearchParams(e))return c(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var i,o=n.isObject(e),s=t&&t["Content-Type"];if((i=n.isFileList(e))||o&&"multipart/form-data"===s){var l=this.env&&this.env.FormData;return a(i?{"files[]":e}:e,l&&new l)}return o||"application/json"===s?(c(t,"application/json"),h(e)):e}],transformResponse:[function(e){var t=this.transitional||d.transitional,i=t&&t.silentJSONParsing,r=t&&t.forcedJSONParsing,s=!i&&"json"===this.responseType;if(s||r&&n.isString(e)&&e.length)try{return JSON.parse(e)}catch(a){if(s){if("SyntaxError"===a.name)throw o.from(a,o.ERR_BAD_RESPONSE,this,null,this.response);throw a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:i("4581")},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],(function(e){d.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){d.headers[e]=n.merge(l)})),e.exports=d}).call(this,i("4362"))},"4ce8":function(e,t){e.exports=function(e,t){var i="function"===typeof e.exports?e.exports.extendOptions:e.options;for(var n in"function"===typeof e.exports&&(i.components=e.exports.options.components),i.components=i.components||{},t)i.components[n]=i.components[n]||t[n]}},"4d64":function(e,t,i){var n=i("fc6a"),r=i("23cb"),o=i("07fa"),s=function(e){return function(t,i,s){var a,l=n(t),c=o(l),u=r(s,c);if(e&&i!=i){while(c>u)if(a=l[u++],a!=a)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===i)return e||u||0;return!e&&-1}};e.exports={includes:s(!0),indexOf:s(!1)}},"50c4":function(e,t,i){var n=i("5926"),r=Math.min;e.exports=function(e){return e>0?r(n(e),9007199254740991):0}},5270:function(e,t,i){"use strict";var n=i("c532"),r=i("c401"),o=i("2e67"),s=i("4c3d"),a=i("fb60");function l(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new a}e.exports=function(e){l(e),e.headers=e.headers||{},e.data=r.call(e,e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]}));var t=e.adapter||s.adapter;return t(e).then((function(t){return l(e),t.data=r.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(l(e),t&&t.response&&(t.response.data=r.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},5692:function(e,t,i){var n=i("c430"),r=i("c6cd");(e.exports=function(e,t){return r[e]||(r[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.24.1",mode:n?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.24.1/LICENSE",source:"https://github.com/zloirock/core-js"})},"56d7":function(e,t,i){"use strict";i.r(t);i("d9e2");var n=i("2b0e"),r=i("bc3a"),o=i.n(r),s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"tify",attrs:{tabindex:"-1"}},[e.ready?t("app-header",{attrs:{fulltextEnabled:e.hasOtherContent,tocEnabled:e.hasToc}}):e._e(),e.ready?t("div",{staticClass:"tify-main"},[t("view-scan",{attrs:{id:e.$root.getId("scan")}}),e.hasOtherContent?t("view-fulltext",{directives:[{name:"show",rawName:"v-show",value:"fulltext"===e.$root.options.view,expression:"$root.options.view === 'fulltext'"}],attrs:{id:e.$root.getId("fulltext")}}):e._e(),e.hasToc?t("view-toc",{directives:[{name:"show",rawName:"v-show",value:"toc"===e.$root.options.view,expression:"$root.options.view === 'toc'"}],attrs:{id:e.$root.getId("toc")}}):e._e(),t("view-thumbnails",{directives:[{name:"show",rawName:"v-show",value:"thumbnails"===e.$root.options.view,expression:"$root.options.view === 'thumbnails'"}],attrs:{id:e.$root.getId("thumbnails")}}),t("view-info",{directives:[{name:"show",rawName:"v-show",value:"info"===e.$root.options.view,expression:"$root.options.view === 'info'"}],attrs:{id:e.$root.getId("info")}}),t("view-export",{directives:[{name:"show",rawName:"v-show",value:"export"===e.$root.options.view,expression:"$root.options.view === 'export'"}],attrs:{id:e.$root.getId("export")}}),t("view-help",{directives:[{name:"show",rawName:"v-show",value:"help"===e.$root.options.view,expression:"$root.options.view === 'help'"}],attrs:{id:e.$root.getId("help")}})],1):e._e(),e.$root.loading?t("div",{staticClass:"tify-loading",attrs:{"aria-label":e.$root.translation?e.$root.translate("Loading"):"Loading"}}):e._e(),e.$root.error?t("div",{staticClass:"tify-error"},[t("button",{staticClass:"tify-error-close",on:{click:function(t){e.$root.error=""}}},[t("icon-close")],1),t("span",[e._v(e._s(e.$root.error))])]):e._e()],1)},a=[],l=function(){var e=this,t=e._self._c;return t("header",{staticClass:"tify-header"},[t("div",{staticClass:"tify-header-column -title"},[t("h1",{staticClass:"tify-header-title",attrs:{title:e.titles.join(", ")}},[e._v(" "+e._s(e.titles.join(", "))+" ")])]),t("div",{staticClass:"tify-header-column -pagination"},[t("div",{staticClass:"tify-header-button-group"},[t("page-select",{staticClass:"tify-header-button"}),t("button",{staticClass:"tify-header-button",class:{"-active":e.$root.options.pages.length>1,"-warning":e.customPageViewActive},attrs:{title:e.$root.translate("Toggle double-page")},on:{click:e.toggleDoublePage}},[e.customPageViewActive?t("icon-view-module"):t("icon-book-open-blank-variant")],1)],1),t("div",{staticClass:"tify-header-button-group -pagination"},[t("button",{staticClass:"tify-header-button",attrs:{disabled:e.customPageViewActive||e.isFirstPage,title:e.$root.translate("First page")},on:{click:e.goToFirstPage}},[t("icon-page-first")],1),e.structures&&e.structures.length?t("button",{staticClass:"tify-header-button",attrs:{disabled:e.customPageViewActive||e.isFirstPage,title:e.$root.translate("Previous section")},on:{click:e.goToPreviousSection}},[t("icon-skip-previous")],1):e._e(),t("button",{staticClass:"tify-header-button",attrs:{disabled:e.customPageViewActive||e.isFirstPage,title:e.$root.translate("Previous page")},on:{click:e.goToPreviousPage}},[t("icon-chevron-left")],1),t("button",{staticClass:"tify-header-button",attrs:{disabled:e.customPageViewActive||e.isLastPage,title:e.$root.translate("Next page")},on:{click:e.goToNextPage}},[t("icon-chevron-right")],1),e.structures&&e.structures.length?t("button",{staticClass:"tify-header-button",attrs:{disabled:e.customPageViewActive||e.isLastSection,title:e.$root.translate("Next section")},on:{click:e.goToNextSection}},[t("icon-skip-next")],1):e._e(),t("button",{staticClass:"tify-header-button",attrs:{disabled:e.customPageViewActive||e.isLastPage,title:e.$root.translate("Last page")},on:{click:e.goToLastPage}},[t("icon-page-last")],1)])]),t("div",{staticClass:"tify-header-column -controls-toggle"},[t("div",{ref:"switchViewSmall",staticClass:"tify-header-button-group"},[t("button",{directives:[{name:"click-outside",rawName:"v-click-outside",value:e.closeControlsPopup,expression:"closeControlsPopup"}],staticClass:"tify-header-button",attrs:{"aria-controls":e.$root.getId("controls"),"aria-expanded":e.controlsVisible?"true":"false"},on:{click:e.toggleControlsPopup}},[t("icon-menu"),e._v(" "+e._s(e.$root.translate("View"))+" ")],1)])]),t("div",{staticClass:"tify-header-column -controls",class:{"-visible":e.controlsVisible},attrs:{id:e.$root.getId("controls")}},[t("div",{staticClass:"tify-header-button-group -view"},[t("button",{staticClass:"tify-header-button -scan",class:{"-active":"scan"===e.$root.options.view},attrs:{"aria-controls":e.$root.getId("scan"),"aria-expanded":"scan"===e.$root.options.view?"true":"false"},on:{click:function(t){return e.toggleView("scan")}}},[t("icon-image"),e._v(" "+e._s(e.$root.translate("Scan"))+" ")],1),e.fulltextEnabled?t("button",{staticClass:"tify-header-button",class:{"-active":"fulltext"===e.$root.options.view},attrs:{"aria-controls":e.$root.getId("fulltext"),"aria-expanded":"fulltext"===e.$root.options.view?"true":"false"},on:{click:function(t){return e.toggleView("fulltext")}}},[t("icon-text-long"),e._v(" "+e._s(e.$root.translate("Fulltext"))+" ")],1):e._e(),t("button",{staticClass:"tify-header-button",class:{"-active":"thumbnails"===e.$root.options.view},attrs:{"aria-controls":e.$root.getId("thumbnails"),"aria-expanded":"thumbnails"===e.$root.options.view?"true":"false"},on:{click:function(t){return e.toggleView("thumbnails")}}},[t("icon-view-module"),e._v(" "+e._s(e.$root.translate("Pages"))+" ")],1),e.tocEnabled?t("button",{staticClass:"tify-header-button",class:{"-active":"toc"===e.$root.options.view},attrs:{"aria-controls":e.$root.getId("toc"),"aria-expanded":"toc"===e.$root.options.view?"true":"false"},on:{click:function(t){return e.toggleView("toc")}}},[t("icon-table-of-contents"),e._v(" "+e._s(e.$root.translate("Contents"))+" ")],1):e._e(),t("button",{staticClass:"tify-header-button",class:{"-active":"info"===e.$root.options.view},attrs:{"aria-controls":e.$root.getId("info"),"aria-expanded":"info"===e.$root.options.view?"true":"false"},on:{click:function(t){return e.toggleView("info")}}},[t("icon-information-outline"),e._v(" "+e._s(e.$root.translate("Info"))+" ")],1),t("button",{staticClass:"tify-header-button",class:{"-active":"export"===e.$root.options.view},attrs:{"aria-controls":e.$root.getId("export"),"aria-expanded":"export"===e.$root.options.view?"true":"false"},on:{click:function(t){return e.toggleView("export")}}},[t("icon-download"),e._v(" "+e._s(e.$root.translate("Export"))+" ")],1),t("button",{staticClass:"tify-header-button -icon-only",class:{"-active":"help"===e.$root.options.view},attrs:{"aria-controls":e.$root.getId("help"),"aria-expanded":"help"===e.$root.options.view?"true":"false",title:e.$root.translate("Help")},on:{click:function(t){return e.toggleView("help")}}},[t("icon-help-circle-outline"),e._v(" "+e._s(e.$root.translate("Help"))+" ")],1)]),e.fullscreenSupported?t("div",{staticClass:"tify-header-button-group -view"},[e.fullscreenActive?t("button",{staticClass:"tify-header-button -icon-only",attrs:{title:e.$root.translate("Exit fullscreen")},on:{click:e.toggleFullscreen}},[t("icon-fullscreen-exit"),e._v(" "+e._s(e.$root.translate("Exit fullscreen"))+" ")],1):t("button",{staticClass:"tify-header-button -icon-only",attrs:{title:e.$root.translate("Fullscreen")},on:{click:e.toggleFullscreen}},[t("icon-fullscreen"),e._v(" "+e._s(e.$root.translate("Fullscreen"))+" ")],1)]):e._e(),t("div",{staticClass:"tify-header-button-group -popup"},[t("button",{staticClass:"tify-header-button",attrs:{disabled:e.customPageViewActive||e.isFirstPage,title:e.$root.translate("First page")},on:{click:e.goToFirstPage}},[t("icon-page-first")],1),e.structures&&e.structures.length?t("button",{staticClass:"tify-header-button",attrs:{disabled:e.customPageViewActive||e.isFirstPage,title:e.$root.translate("Previous section")},on:{click:e.goToPreviousSection}},[t("icon-skip-previous")],1):e._e(),t("button",{staticClass:"tify-header-button",attrs:{disabled:e.customPageViewActive||e.isFirstPage,title:e.$root.translate("Previous page")},on:{click:e.goToPreviousPage}},[t("icon-chevron-left")],1),t("button",{staticClass:"tify-header-button",attrs:{disabled:e.customPageViewActive||e.isLastPage,title:e.$root.translate("Next page")},on:{click:e.goToNextPage}},[t("icon-chevron-right")],1),e.structures&&e.structures.length?t("button",{staticClass:"tify-header-button",attrs:{disabled:e.customPageViewActive||e.isLastSection,title:e.$root.translate("Next section")},on:{click:e.goToNextSection}},[t("icon-skip-next")],1):e._e(),t("button",{staticClass:"tify-header-button",attrs:{disabled:e.customPageViewActive||e.isLastPage,title:e.$root.translate("Last page")},on:{click:e.goToLastPage}},[t("icon-page-last")],1)])])])},c=[],u=function(){var e=this,t=e._self._c;return t("div",{staticClass:"tify-page-select"},[t("button",{directives:[{name:"click-outside",rawName:"v-click-outside",value:e.closeDropdown,expression:"closeDropdown"}],staticClass:"tify-page-select-button",attrs:{title:e.currentPageTitleAttr,"aria-label":e.$root.translate("Current page"),"aria-controls":e.$root.getId("dropdown"),"aria-expanded":e.isOpen?"true":"false"},on:{click:e.toggleDropdown}},[e._v(" "+e._s(e.currentPageLabel)+" ")]),t("div",{directives:[{name:"show",rawName:"v-show",value:e.isOpen,expression:"isOpen"}],key:"dropdown",staticClass:"tify-page-select-dropdown",attrs:{id:e.$root.getId("dropdown")},on:{click:function(e){e.stopPropagation()}}},[t("div",{staticClass:"tify-page-select-filter"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.filter,expression:"filter"}],ref:"search",staticClass:"tify-page-select-input",attrs:{"aria-label":e.$root.translate("Filter pages"),type:"text"},domProps:{value:e.filter},on:{keyup:function(t){if(!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter"))return null;e.filteredCanvases[e.highlightIndex]&&e.setPage(e.filteredCanvases[e.highlightIndex].page)},keydown:[function(t){if(!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"]))return null;t.preventDefault(),e.filter?e.filter="":e.closeDropdown()},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"up",38,t.key,["Up","ArrowUp"])?null:(t.preventDefault(),e.onKeyUpArrow())},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"down",40,t.key,["Down","ArrowDown"])?null:(t.preventDefault(),e.onKeyDownArrow())}],input:function(t){t.target.composing||(e.filter=t.target.value)}}})]),t("ol",{ref:"list",staticClass:"tify-page-select-list"},e._l(e.filteredCanvases,(function(i,n){return t("li",{key:n,class:{"-current":e.$root.options.pages.indexOf(i.page)>-1,"-highlighted":e.highlightIndex===n}},[t("a",{attrs:{href:"javascript:;"},on:{click:function(t){return e.setPage(i.page)}}},[e._v(" "+e._s(e.$root.getPageLabel(i.page,e.$root.convertValueToArray(i.label)[0]))+" ")])])})),0)])])},h=[],d=i("32be"),p=i.n(d),f={mixins:[p.a],data(){return{filter:"",filteredCanvases:[],highlightIndex:0,isOpen:!1}},computed:{currentPageLabel(){const e=this.$root.options.pages[0]||1,t=this.$root.options.pages[0]?this.$root.options.pages[0]-1:0,i=this.$root.convertValueToArray(this.$root.canvases[t].label)[0];return this.$root.getPageLabel(e,i)},currentPageTitleAttr(){const{pages:e}=this.$root.options,t=0===e[0]&&e.length>1?1:e[0],i=this.$root.translate("Physical page"),n=this.$root.translate("Logical page");return`${i}: ${t}\n${n}: ${this.$root.convertValueToArray(this.$root.canvases[t-1].label)[0]}`}},watch:{filter(){this.updateFilteredCanvases(),this.$nextTick(()=>this.updateScroll())},isOpen(){this.isOpen&&(this.filter="",this.highlightIndex=this.$root.options.pages[0]-1)}},methods:{closeDropdown(){this.isOpen=!1},onKeydown(e){this.preventKeyboardEvent(e)||("Escape"!==e.key?"x"===e.key&&(this.toggleDropdown(),e.preventDefault()):this.closeDropdown())},onKeyDownArrow(){this.highlightIndex0&&(this.highlightIndex-=1,this.updateScroll())},setPage(e){this.closeDropdown(),this.$root.setPage(e),this.$root.isMobile()&&this.$root.updateOptions({view:"scan"})},toggleDropdown(){this.isOpen=!this.isOpen,this.isOpen&&this.$nextTick(()=>{this.$refs.search.focus(),this.updateScroll()})},updateFilteredCanvases(){const e=[],t=this.filter.toLowerCase();let i=-1;this.$root.canvases.forEach((n,r)=>{const o=this.$root.convertValueToArray(n.label)[0],s=o.toLowerCase().indexOf(t)>-1,a=(r+1).toFixed().indexOf(t)>-1;if(s||a){const t=n;t.page=r+1,t.page===this.$root.options.pages[0]&&(i=e.length),e.push(t)}}),this.highlightIndex=i<0?0:i,this.filteredCanvases=e},updateScroll(){const{list:e}=this.$refs;if(e&&e.children[this.highlightIndex]){const{offsetTop:t}=e.children[this.highlightIndex];e.scrollTop=t-(e.offsetHeight/2-e.children[0].offsetHeight)}}},mounted(){this.updateFilteredCanvases(),this.$root.$el.addEventListener("keydown",this.onKeydown)},beforeDestroy(){this.$root.$el.removeEventListener("keydown",this.onKeydown)}},v=f;function g(e,t,i,n,r,o,s,a){var l,c="function"===typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=i,c._compiled=!0),n&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),s?(l=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},c._ssrRegister=l):r&&(l=a?function(){r.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:r),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(e,t){return l.call(t),u(e,t)}}else{var h=c.beforeCreate;c.beforeCreate=h?[].concat(h,l):[l]}return{exports:e,options:c}}var m=g(v,u,h,!1,null,null,null),y=m.exports,w=i("1b80"),x=i.n(w),b={components:{PageSelect:y},mixins:[p.a,x.a],props:["fulltextEnabled","tocEnabled"],data(){return{controlsVisible:!1,fullscreenActive:!1,screen:this.$root.$el.parentNode,sections:[]}},computed:{fullscreenSupported(){return null===document.fullscreenElement||null===document.msFullscreenElement||null===document.webkitFullscreenElement},isLastSection(){const{pages:e}=this.$root.options,t=e.length-1,i=e[t]?e[t]:e[t-1];return i>=this.sections[this.sections.length-1].firstPage},structures(){return this.$root.manifest.structures},titles(){return this.$root.convertValueToArray(this.$root.manifest.label)}},methods:{closeControlsPopup(){this.controlsVisible=!1},detectFullscreen:()=>{let e;switch(null){case document.msFullscreenElement:e=document.msFullscreenElement;break;case document.webkitFullscreenElement:e=document.webkitFullscreenElement;break;case document.fullscreenElement:e=document.fullscreenElement;break;default:e=!1}return e},goToNextSection(){const{pages:e}=this.$root.options,t=e.length-1,i=e[t]?e[t]:e[t-1];let n=0;while(i>=this.sections[n].firstPage||i&&i>=this.sections[n].firstPage)n+=1;this.$root.setPage(this.sections[n].firstPage)},goToPreviousSection(){const{pages:e}=this.$root.options,t=e[0]?e[0]:e[1];let i=this.sections.length-1;while(t<=this.sections[i].firstPage||t&&t<=this.sections[i].firstPage)i-=1;this.$root.setPage(this.sections[i].firstPage)},onKeyDown(e){if(this.preventKeyboardEvent(e))return;if("Escape"===e.key)return void(this.controlsVisible=!1);switch(e.key){case"Backspace":this.$refs.switchViewSmall.offsetParent&&this.toggleView("scan");break;case"1":this.fulltextEnabled&&this.toggleView("fulltext");break;case"2":this.toggleView("thumbnails");break;case"3":this.tocEnabled&&this.toggleView("toc");break;case"4":this.toggleView("info");break;case"5":this.toggleView("export");break;case"6":this.toggleView("help");break;case"b":this.toggleDoublePage();break;case"f":this.toggleFullscreen();break;default:}if(this.customPageViewActive)return;const{pages:t}=this.$root.options;switch(e.key){case"q":case",":t[0]>1&&this.goToPreviousPage();break;case"e":case".":this.isLastPage||this.goToNextPage();break;case"Q":t[0]>1&&this.goToFirstPage();break;case"E":this.isLastPage||this.goToLastPage();break;default:}},setView(e){this.$root.updateOptions({view:e})},toggleControlsPopup(){this.controlsVisible=!this.controlsVisible},toggleDoublePage(e){const{pages:t}=this.$root.options;let i;if(t.length>1&&!0!==e||!1===e)i=[t[0]<1?1:t[0]];else if(t[0]<2)i=[0,1];else if(t[0]%2>0)i=[t[0]-1,t[0]];else{const e=t[0]{if(!t.canvases)return void e.push({firstPage:1,lastPage:this.$root.pageCount});const i=t.canvases[0],n=this.$root.canvases.findIndex(e=>e["@id"]===i)+1,r=t.canvases[t.canvases.length-1],o=this.$root.canvases.findIndex(e=>e["@id"]===r)+1;e.push({firstPage:n,lastPage:o})}),this.sections=e},mounted(){this.$root.$el.addEventListener("keydown",this.onKeyDown);const e=["","moz","ms","webkit"];e.forEach(e=>{document.addEventListener(e+"fullscreenchange",this.toggleFullscreenActive)})},beforeDestroy(){this.$root.$el.removeEventListener("keydown",this.onKeyDown)}},_=b,T=i("4ce8"),S=i.n(T),E=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M21,5C19.89,4.65 18.67,4.5 17.5,4.5C15.55,4.5 13.45,4.9 12,6C10.55,4.9 8.45,4.5 6.5,4.5C4.55,4.5 2.45,4.9 1,6V20.65C1,20.9 1.25,21.15 1.5,21.15C1.6,21.15 1.65,21.1 1.75,21.1C3.1,20.45 5.05,20 6.5,20C8.45,20 10.55,20.4 12,21.5C13.35,20.65 15.8,20 17.5,20C19.15,20 20.85,20.3 22.25,21.05C22.35,21.1 22.4,21.1 22.5,21.1C22.75,21.1 23,20.85 23,20.6V6C22.4,5.55 21.75,5.25 21,5M21,18.5C19.9,18.15 18.7,18 17.5,18C15.8,18 13.35,18.65 12,19.5V8C13.35,7.15 15.8,6.5 17.5,6.5C18.7,6.5 19.9,6.65 21,7V18.5Z"}})])},P=[],C={},R=g(C,E,P,!1,null,null,null),k=R.exports,O=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z"}})])},I=[],D={},A=g(D,O,I,!1,null,null,null),L=A.exports,H=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"}})])},M=[],B={},F=g(B,H,M,!1,null,null,null),$=F.exports,N=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z"}})])},z=[],V={},j=g(V,N,z,!1,null,null,null),U=j.exports,W=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M5,5H10V7H7V10H5V5M14,5H19V10H17V7H14V5M17,14H19V19H14V17H17V14M10,17V19H5V14H7V17H10Z"}})])},G=[],q={},Z=g(q,W,G,!1,null,null,null),X=Z.exports,Y=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M14,14H19V16H16V19H14V14M5,14H10V19H8V16H5V14M8,5H10V10H5V8H8V5M19,8V10H14V5H16V8H19Z"}})])},K=[],Q={},J=g(Q,Y,K,!1,null,null,null),ee=J.exports,te=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M11,18H13V16H11V18M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,6A4,4 0 0,0 8,10H10A2,2 0 0,1 12,8A2,2 0 0,1 14,10C14,12 11,11.75 11,15H13C13,12.75 16,12.5 16,10A4,4 0 0,0 12,6Z"}})])},ie=[],ne={},re=g(ne,te,ie,!1,null,null,null),oe=re.exports,se=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M8.5,13.5L11,16.5L14.5,12L19,18H5M21,19V5C21,3.89 20.1,3 19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19Z"}})])},ae=[],le={},ce=g(le,se,ae,!1,null,null,null),ue=ce.exports,he=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z"}})])},de=[],pe={},fe=g(pe,he,de,!1,null,null,null),ve=fe.exports,ge=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z"}})])},me=[],ye={},we=g(ye,ge,me,!1,null,null,null),xe=we.exports,be=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M18.41,16.59L13.82,12L18.41,7.41L17,6L11,12L17,18L18.41,16.59M6,6H8V18H6V6Z"}})])},_e=[],Te={},Se=g(Te,be,_e,!1,null,null,null),Ee=Se.exports,Pe=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M5.59,7.41L10.18,12L5.59,16.59L7,18L13,12L7,6L5.59,7.41M16,6H18V18H16V6Z"}})])},Ce=[],Re={},ke=g(Re,Pe,Ce,!1,null,null,null),Oe=ke.exports,Ie=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M16,18H18V6H16M6,18L14.5,12L6,6V18Z"}})])},De=[],Ae={},Le=g(Ae,Ie,De,!1,null,null,null),He=Le.exports,Me=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M6,18V6H8V18H6M9.5,12L18,6V18L9.5,12Z"}})])},Be=[],Fe={},$e=g(Fe,Me,Be,!1,null,null,null),Ne=$e.exports,ze=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M3,9H17V7H3V9M3,13H17V11H3V13M3,17H17V15H3V17M19,17H21V15H19V17M19,7V9H21V7H19M19,13H21V11H19V13Z"}})])},Ve=[],je={},Ue=g(je,ze,Ve,!1,null,null,null),We=Ue.exports,Ge=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M4,5H20V7H4V5M4,9H20V11H4V9M4,13H20V15H4V13M4,17H14V19H4V17Z"}})])},qe=[],Ze={},Xe=g(Ze,Ge,qe,!1,null,null,null),Ye=Xe.exports,Ke=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M16,5V11H21V5M10,11H15V5H10M16,18H21V12H16M10,18H15V12H10M4,18H9V12H4M4,11H9V5H4V11Z"}})])},Qe=[],Je={},et=g(Je,Ke,Qe,!1,null,null,null),tt=et.exports,it=g(_,l,c,!1,null,null,null),nt=it.exports;S()(it,{IconBookOpenBlankVariant:k,IconChevronLeft:L,IconChevronRight:$,IconDownload:U,IconFullscreen:X,IconFullscreenExit:ee,IconHelpCircleOutline:oe,IconImage:ue,IconInformationOutline:ve,IconMenu:xe,IconPageFirst:Ee,IconPageLast:Oe,IconSkipNext:He,IconSkipPrevious:Ne,IconTableOfContents:We,IconTextLong:Ye,IconViewModule:tt});var rt=function(){var e=this,t=e._self._c;return t("section",{staticClass:"tify-export",attrs:{tabindex:"0"}},[t("h2",{staticClass:"tify-sr-only"},[e._v(e._s(e.$root.translate("Export")))]),t("div",{staticClass:"tify-export-section -links"},[t("h3",[e._v(e._s(e.$root.translate("Download Individual Images")))]),t("ul",e._l(e.pages,(function(i){return t("li",{key:i},[t("a",{attrs:{href:e.imageUrls[i],download:i+".jpg"}},[e._v(" "+e._s(e.$root.translate("Page"))+" "+e._s(i)+" : "+e._s(e.$root.convertValueToArray(e.$root.canvases[i-1].label)[0])+" ")])])})),0)]),this.$root.manifest.rendering?t("div",{staticClass:"tify-export-section -renderings"},[t("h3",[e._v(e._s(e.$root.translate("Renderings")))]),t("ul",e._l(e.renderings,(function(i){return t("li",{key:i["@id"]},[t("a",{attrs:{href:i["@id"]}},[e._v(e._s(i.label))])])})),0),e.hasElementPdfLinks?t("div",{staticClass:"tify-export-container"},[t("button",{staticClass:"tify-export-toggle",attrs:{"aria-controls":e.$root.getId("export-pdf-list"),"aria-expanded":e.perElementPdfLinksVisible?"true":"false"},on:{click:function(t){e.perElementPdfLinksVisible=!e.perElementPdfLinksVisible}}},[e.perElementPdfLinksVisible?[e._v(" "+e._s(e.$root.translate("Close PDF list"))+" ")]:[e._v(" "+e._s(e.$root.translate("PDFs for each element"))+" ")]],2),t("div",{directives:[{name:"show",rawName:"v-show",value:e.perElementPdfLinksVisible,expression:"perElementPdfLinksVisible"}],staticClass:"tify-export-toc",attrs:{id:e.$root.getId("export-pdf-list")}},[t("toc-list",{ref:"children",attrs:{purpose:"pdf",level:0,structures:e.structures}})],1)]):e._e()]):e._e(),e.literatureItems.length?t("div",{staticClass:"tify-export-section -literature"},[t("h3",[e._v(e._s(e.$root.translate("Literature Management")))]),t("ul",e._l(e.literatureItems,(function(i){return t("li",{key:i["@id"]},[t("a",{attrs:{href:i["@id"],download:""}},[e._v(" "+e._s(i.label)+" ")])])})),0)]):e._e(),t("div",{staticClass:"tify-export-section -other"},[t("h3",[e._v(e._s(e.$root.translate("Other Formats")))]),t("ul",[t("li",[t("a",{attrs:{href:e.$root.options.manifestUrl,download:"manifest.json"}},[e._v(" "+e._s(e.$root.translate("IIIF manifest"))+" ")])]),e._l(e.otherItems,(function(i){return t("li",{key:i["@id"]},[t("a",{attrs:{href:i["@id"],download:""}},[e._v(" "+e._s(i.label||i["@id"])+" ")])])}))],2)])])},ot=[],st=function(){var e=this,t=e._self._c;return t("ul",{staticClass:"tify-toc-list"},e._l(e.structures,(function(i,n){return t("li",{key:n,staticClass:"tify-toc-structure",class:{"-current":e.checkIfPagesInStructure(i),"-expanded":e.expandedStructures[n]},attrs:{"data-level":e.level}},[i.childStructures?t("button",{staticClass:"tify-toc-toggle",attrs:{title:e.$root.translate(e.expandedStructures[n]?"Collapse":"Expand"),"aria-controls":`${e.id}-${n}`,"aria-expanded":e.expandedStructures[n]?"true":"false"},on:{click:function(t){return e.toggleChildren(n)}}},[e.expandedStructures[n]?[t("icon-minus")]:[t("icon-plus")]],2):e._e(),"pdf"===e.purpose?t("a",{staticClass:"tify-toc-link",attrs:{download:"",href:e.$root.convertValueToArray(i.rendering)[0]["@id"]}},[e._v(" "+e._s(i.label)+" ("+e._s(i.pageCount)+" "+e._s(e.$root.translate(1===i.pageCount?"page":"pages"))+") ")]):t("a",{staticClass:"tify-toc-link -dots",attrs:{href:"javascript:;"},on:{click:function(t){return e.setPage(i.firstPage)}}},[t("span",{staticClass:"tify-toc-label"},[e._v(e._s(i.label))]),t("span",{staticClass:"tify-toc-page"},[e._v(e._s(i.pageLabel))])]),i.childStructures?t("toc-list",{directives:[{name:"show",rawName:"v-show",value:e.expandedStructures[n],expression:"expandedStructures[index]"}],ref:"children",refInFor:!0,attrs:{id:`${e.id}-${n}`,level:e.level+1,parentStructure:i,purpose:e.purpose,structures:i.childStructures}}):e._e()],1)})),0)},at=[],lt={name:"toc-list",props:["level","structures","parentStructure","purpose"],data(){return{expandedStructures:[],id:this.$root.getId("toc-list-"+Math.floor(1e12*Math.random()))}},methods:{checkIfPagesInStructure(e){const{pages:t}=this.$root.options;return t.some(t=>t>=e.firstPage&&t<=e.lastPage)},setPage(e){this.$root.setPage(e),this.$root.isMobile()&&this.$root.updateOptions({view:"scan"})},toggleAllChildren(e=null){if(this.$refs.children){for(let t=this.structures.length-1;t>=0;t-=1)this.toggleChildren(t,e);this.$refs.children.forEach(t=>{t.toggleAllChildren(e)})}},toggleChildren(e,t=null){const i=this.structures[e];if(!i.childStructures)return;const n=null!==t?t:!this.expandedStructures[e];n?this.$set(this.expandedStructures,e,!0):this.$set(this.expandedStructures,e,!1)}}},ct=lt,ut=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M19,13H5V11H19V13Z"}})])},ht=[],dt={},pt=g(dt,ut,ht,!1,null,null,null),ft=pt.exports,vt=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"}})])},gt=[],mt={},yt=g(mt,vt,gt,!1,null,null,null),wt=yt.exports,xt=g(ct,st,at,!1,null,null,null),bt=xt.exports;S()(xt,{IconMinus:ft,IconPlus:wt});const _t={computed:{currentStructure(){if(!Array.isArray(this.$root.manifest.structures))return!1;const e=[];this.$root.options.pages.forEach(t=>{t&&e.push(this.$root.canvases[t-1]["@id"])});const{length:t}=this.$root.manifest.structures;let i,n;for(let r=0;re.indexOf(t)>-1)&&t.firstPage&&t.lastPage){const e=t.lastPage-t.firstPage;if((e=0&&this.$root.manifest.structures[i]},currentStructureLabel(){const{label:e}=this.currentStructure;return e},currentStructureMetadata(){const{metadata:e}=this.currentStructure;return e},structures(){if(!this.$root.manifest.structures)return[];const e=[],t=[],{length:i}=this.$root.manifest.structures;for(let o=0;ot["@id"]===e)+1;const t=i.canvases[i.canvases.length-1];i.lastPage=this.$root.canvases.findIndex(e=>e["@id"]===t)+1;const n=this.$root.canvases[i.firstPage-1];if(!n)continue;i.pageLabel=n.label}else this.$root.canvases[0]&&(i.firstPage=1,i.lastPage=this.$root.pageCount,i.pageLabel=this.$root.canvases[0].label);i.pageCount=i.lastPage-i.firstPage+1,i.within&&t.push(i),e.push(i)}const n=t.length;for(let o=0;oe.firstPage-t.firstPage))}const r=e.filter(e=>!e.within).sort((e,t)=>e.firstPage-t.firstPage);return r}}};var Tt=_t;const St=[{label:"BibTex",profile:"http://www.bibtex.org/Format/",type:"literature"},{label:"EndNote",profile:"http://endnote.com/",type:"literature"},{label:"RIS",profile:"http://referencemanager.com/sites/rm/files/m/direct_export_ris.pdf",type:"literature"},{label:"METS",profile:"http://www.loc.gov/standards/mets/profile_docs/mets.profile.v2-0.xsd",type:"other"},{label:"MODS",format:"application/mods+xml",type:"other"}];var Et={components:{TocList:bt},mixins:[Tt],data(){return{literatureItems:[],otherItems:[],perElementPdfLinksVisible:!1}},computed:{pages(){return this.$root.options.pages.filter(e=>e>0)},hasElementPdfLinks(){const{manifest:e}=this.$root;if(!Array.isArray(e.structures)||!e.structures[0]||!e.structures[0].rendering)return!1;const t=this.$root.convertValueToArray(e.structures[0].rendering);return t.some(e=>e.format&&"application/pdf"===e.format)},imageUrls(){const e={};return this.$root.options.pages.forEach(t=>{if(!t)return;const{resource:i}=this.$root.canvases[t-1].images[0];if(i.service){const n="http://iiif.io/api/image/2/context.json"===i.service["@context"]?"default":"native",r=i.service["@id"];e[t]=`${r}${"/"===r.slice(-1)?"":"/"}full/full/0/${n}.jpg`}else e[t]=i["@id"]}),e},renderings(){return this.$root.convertValueToArray(this.$root.manifest.rendering)}},created(){const{seeAlso:e}=this.$root.manifest;if(!e)return;const t=JSON.parse(JSON.stringify(Array.isArray(e)?e:[e]));t.forEach(e=>{const t="object"===typeof e?e:{"@id":e};let i=!1;St.some(n=>{const r=e.format&&n.format===e.format,o=e.profile&&n.profile===e.profile;return!(!r&&!o)&&(t.label=n.label,"literature"===n.type&&(i=!0),!0)}),i?this.literatureItems.push(t):this.otherItems.push(t)})}},Pt=Et,Ct=g(Pt,rt,ot,!1,null,null,null),Rt=Ct.exports,kt=function(){var e=this,t=e._self._c;return t("section",{staticClass:"tify-fulltext",attrs:{tabindex:"0"}},[t("h2",{staticClass:"tify-sr-only"},[e._v(e._s(e.$root.translate("Fulltext")))]),e.fulltextAvailable?t("div",{staticClass:"tify-fulltext-texts"},[e._l(e.pages,(function(i,n){return[n&&i>1?t("hr",{key:n,staticClass:"tify-fulltext-separator"}):e._e(),e._l(e.fulltexts[i],(function(i,n){return t("div",{key:n,staticClass:"tify-fulltext-text",domProps:{innerHTML:e._s(i)}})}))]}))],2):t("div",{staticClass:"tify-fulltext-none"},[e._v(" "+e._s(e.$root.translate("Fulltext not available for this page"))+" ")])])},Ot=[],It={data(){return{fulltextAvailable:!1,fulltexts:[]}},watch:{"$root.options.pages":function(){this.loadFulltexts()}},methods:{loadFulltexts(){this.fulltextAvailable=!1,this.fulltexts=[],this.$root.options.pages.forEach(e=>{if(e<1||this.fulltexts[e])return;const t=this.$root.canvases[e-1];if(!("otherContent"in t))return;this.$set(this.fulltexts,e,[]);const i=t.otherContent[0]["@id"];this.$http.get(i).then(t=>{const{resources:i}=t.data;Array.isArray(i)&&i.forEach((t,i)=>{const n=t.resource;if(n&&n.chars){const t=this.$root.filterHtml(n.chars);t&&(this.fulltextAvailable=!0),this.$set(this.fulltexts[e],i,t)}else n["@id"]&&this.loadRemoteFulltext(e,i,n["@id"])})},e=>{const t=e.response?e.response.statusText:e.message;console.warn("Could not load annotations: "+t)})})},loadRemoteFulltext(e,t,i){this.$http.get(i).then(i=>{const n=this.$root.filterHtml(i.data);n&&(this.fulltextAvailable=!0),this.$set(this.fulltexts[e],t,n)},e=>{const t=e.response?e.response.statusText:e.message;console.warn("Could not load fulltext: "+t)})}},mounted(){this.loadFulltexts()},computed:{pages(){return this.$root.options.pages.filter(e=>!!e)}}},Dt=It,At=g(Dt,kt,Ot,!1,null,null,null),Lt=At.exports,Ht=function(){var e=this,t=e._self._c;return t("section",{staticClass:"tify-help",attrs:{tabindex:"0"}},[t("h2",{staticClass:"tify-sr-only"},[e._v(e._s(e.$root.translate("Help")))]),t("h3",[e._v(e._s(e.$root.translate("About TIFY")))]),t("p",{domProps:{innerHTML:e._s(e.info)}}),t("ul",[t("li",[t("a",{attrs:{href:e.userGuideUrl}},[e._v(e._s(e.$root.translate("User guide")))])]),t("li",[t("a",{attrs:{href:e.env.VUE_APP_REPOSITORY_URL}},[e._v(e._s(e.$root.translate("Source code")))])]),t("li",[t("a",{attrs:{href:e.env.VUE_APP_CONTRIBUTORS_URL}},[e._v(e._s(e.$root.translate("Contributors")))])]),t("li",[t("a",{attrs:{href:e.env.VUE_APP_BUGS_URL}},[e._v(e._s(e.$root.translate("Report a bug")))])])]),t("footer",{staticClass:"tify-help-footer"},[t("p",[e._v(e._s(e.$root.translate("Version"))+" "+e._s(e.env.VUE_APP_VERSION))]),t("p",{domProps:{innerHTML:e._s(e.copyright)}})])])},Mt=[],Bt={computed:{copyright(){const e='Copyright © 2017–2022 Göttingen University / Göttingen State and University Library';return this.$root.translate("$copyright",e)},env(){return Object({NODE_ENV:"production",VUE_APP_VERSION:"0.27.0",VUE_APP_LICENSE:"AGPL-3.0",VUE_APP_BUGS_URL:"https://github.com/tify-iiif-viewer/tify/issues",VUE_APP_CONTRIBUTORS_URL:"https://github.com/tify-iiif-viewer/tify/blob/main/CONTRIBUTORS.md",VUE_APP_DOCS_URL:"https://github.com/tify-iiif-viewer/tify/blob/v0.27.0/doc",VUE_APP_DOCS_LANGUAGES:"de,en",VUE_APP_REPOSITORY_URL:"https://github.com/tify-iiif-viewer/tify",BASE_URL:"/"})},info(){const e="TIFY is a slim and mobile-friendly IIIF document viewer, released under the GNU Affero General Public License 3.0.";return this.$root.translate("$info",e)},userGuideUrl(){const e="de,en".includes(this.$root.options.language)?this.$root.options.language:"en";return`https://github.com/tify-iiif-viewer/tify/blob/v0.27.0/doc/user-guide.${e}.md`}}},Ft=Bt,$t=g(Ft,Ht,Mt,!1,null,null,null),Nt=$t.exports,zt=function(){var e=this,t=e._self._c;return t("section",{staticClass:"tify-info",attrs:{tabindex:"0"}},[t("h2",{staticClass:"tify-sr-only"},[e._v(e._s(e.$root.translate("Info")))]),e.manifest.label?t("div",{staticClass:"tify-info-section -title"},[t("h3",{staticClass:"tify-info-heading"},[e._v(e._s(e.$root.translate("Title")))]),e._l(e.$root.convertValueToArray(e.manifest.label),(function(i){return t("div",{key:i},[e._v(" "+e._s(i)+" ")])}))],2):e._e(),e.manifest.metadata&&e.manifest.metadata.length?t("div",{staticClass:"tify-info-section -metadata"},[t("h3",[e._v(e._s(e.$root.translate("Metadata")))]),"info"===e.$root.options.view?t("metadata-list",{attrs:{metadata:e.manifest.metadata}}):e._e()],1):e._e(),e.currentStructureLabel||e.currentStructureMetadata?t("div",{staticClass:"tify-info-section -metadata -structure"},[t("h3",[e._v(" "+e._s(e.$root.translate("Current Element"))+" ")]),e.currentStructureLabel?t("p",{staticClass:"tify-info-structure"},[e._v(" "+e._s(e.currentStructureLabel)+" ")]):e._e(),"info"===e.$root.options.view&&e.currentStructureMetadata?t("metadata-list",{staticClass:"tify-info-section -metadata",attrs:{metadata:e.currentStructureMetadata}}):e._e()],1):e._e(),e.manifest.description?t("div",{staticClass:"tify-info-section -description"},[t("h3",[e._v(e._s(e.$root.translate("Description")))]),e._l(e.$root.convertValueToArray(e.manifest.description),(function(i,n){return t("div",{key:n,domProps:{innerHTML:e._s(i)}})}))],2):e._e(),e.license.length?t("div",{staticClass:"tify-info-section -license"},[t("h3",[e._v(e._s(e.$root.translate("License")))]),e._l(e.license,(function(i,n){return t("div",{key:n},["string"===typeof i?[e.isUrl(i)?t("a",{attrs:{href:i}},[e._v(" "+e._s(i)+" ")]):[e._v(" "+e._s(i)+" ")]]:[e.isUrl(i["@id"])?t("a",{attrs:{href:i["@id"]}},[e._v(" "+e._s(i["label"]||i["@id"])+" ")]):[e._v(" "+e._s(i["label"]||i["@id"])+" ")]]],2)}))],2):e._e(),e.related.length?t("div",{staticClass:"tify-info-section -related"},[t("h3",[e._v(e._s(e.$root.translate("Related Resources")))]),e._l(e.related,(function(i,n){return t("div",{key:n},["string"===typeof i?t("a",{attrs:{href:i}},[e._v(" "+e._s(i)+" ")]):t("a",{attrs:{href:i["@id"]}},[e._v(" "+e._s(i["label"]||i["@id"])+" ")])])}))],2):e._e(),e.manifest.attribution?t("div",{staticClass:"tify-info-section -attribution"},[t("h3",[e._v(e._s(e.$root.translate("Provided by")))]),e._l(e.$root.convertValueToArray(e.manifest.attribution),(function(i,n){return t("div",{key:n,domProps:{innerHTML:e._s(i)}})}))],2):e._e(),e.manifest.logo?t("div",{staticClass:"tify-info-section -logo"},[e.logoId&&e.manifest.logo.service&&e.manifest.logo.service["@id"]?t("a",{attrs:{href:e.manifest.logo.service["@id"]}},[t("img",{staticClass:"tify-info-logo",attrs:{src:e.logoId,alt:e.$root.translate("Logo")}})]):t("img",{staticClass:"tify-info-logo",attrs:{src:e.logoId,alt:e.$root.translate("Logo")}})]):e._e()])},Vt=[],jt=function(){var e=this,t=e._self._c;return t("div",{staticClass:"tify-info-metadata"},e._l(e.metadata,(function(i,n){return t("div",{key:n},[t("h4",e._l(e.$root.convertValueToArray(i.label),(function(i,n){return t("div",{key:n},[e._v(" "+e._s(e.cleanLabel(i))+" ")])})),0),t("div",{ref:"contents",refInFor:!0,staticClass:"tify-info-content",class:{"-collapsed":e.infoItems[n]&&e.infoItems[n].collapsed}},[t("div",{staticClass:"tify-info-value"},e._l(e.$root.convertValueToArray(i.value),(function(i){return t("div",{key:i,domProps:{innerHTML:e._s(i)}})})),0),e.infoItems[n]&&e.infoItems[n].exceedsHeight?t("button",{staticClass:"tify-info-toggle",on:{click:function(t){e.infoItems[n].collapsed=!e.infoItems[n].collapsed}}},[e.infoItems[n].collapsed?[t("icon-chevron-down"),e._v(" "+e._s(e.$root.translate("Expand"))+" ")]:[t("icon-chevron-up"),e._v(" "+e._s(e.$root.translate("Collapse"))+" ")]],2):e._e()])])})),0)},Ut=[],Wt={props:["metadata"],data(){return{infoItems:[]}},watch:{metadata(){this.updateInfoItems()}},mounted(){this.updateInfoItems()},methods:{cleanLabel(e){const t=e.replace("_"," ");return t.charAt(0).toUpperCase()+t.substr(1)},updateInfoItems(){this.$nextTick(()=>{this.$refs.contents&&this.$refs.contents.forEach((e,t)=>{const i=e.offsetHeight;this.$set(this.infoItems,t,{collapsed:!0,exceedsHeight:!0}),this.$nextTick(()=>{const n=e.offsetHeight,r=i>=n;this.$set(this.infoItems,t,{collapsed:r,exceedsHeight:r})})})})}}},Gt=Wt,qt=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"}})])},Zt=[],Xt={},Yt=g(Xt,qt,Zt,!1,null,null,null),Kt=Yt.exports,Qt=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z"}})])},Jt=[],ei={},ti=g(ei,Qt,Jt,!1,null,null,null),ii=ti.exports,ni=g(Gt,jt,Ut,!1,null,null,null),ri=ni.exports;S()(ni,{IconChevronDown:Kt,IconChevronUp:ii});var oi={components:{MetadataList:ri},mixins:[Tt],computed:{license(){return this.manifest.license?this.$root.convertValueToArray(this.manifest.license):[]},logoId(){return this.manifest.logo["@id"]?this.manifest.logo["@id"]:this.manifest.logo},manifest(){return this.$root.manifest},related(){return this.manifest.related?this.$root.convertValueToArray(this.manifest.related):[]}},methods:{isUrl(e){return/^https?:\/\//.test(e)}}},si=oi,ai=g(si,zt,Vt,!1,null,null,null),li=ai.exports,ci=function(){var e=this,t=e._self._c;return t("section",{staticClass:"tify-scan"},[t("h2",{staticClass:"tify-sr-only"},[e._v(e._s(e.$root.translate("Scan")))]),e.customPageViewActive||e.isFirstPage?e._e():t("button",{staticClass:"tify-scan-page-button -previous",attrs:{title:e.$root.translate("Previous page")},on:{click:e.goToPreviousPage}},[t("icon-chevron-left")],1),e.customPageViewActive||e.isLastPage?e._e():t("button",{staticClass:"tify-scan-page-button -next",attrs:{title:e.$root.translate("Next page")},on:{click:e.goToNextPage}},[t("icon-chevron-right")],1),e.viewer?t("div",{staticClass:"tify-scan-buttons"},[t("button",{staticClass:"tify-scan-button",attrs:{disabled:e.isMaxZoom,title:e.$root.translate("Zoom in")},on:{click:e.zoomIn}},[t("icon-magnify-plus")],1),t("button",{staticClass:"tify-scan-button",attrs:{disabled:e.isReset,title:e.$root.translate("Reset")},on:{click:function(t){return e.resetScan(!!t.shiftKey)}}},[t("icon-aspect-ratio")],1),t("button",{staticClass:"tify-scan-button",attrs:{disabled:e.isMinZoom,title:e.$root.translate("Zoom out")},on:{click:e.zoomOut}},[t("icon-magnify-minus")],1),t("button",{staticClass:"tify-scan-button",class:{"-active":e.$root.options.rotation},attrs:{title:e.$root.translate("Rotate")},on:{click:function(t){return e.rotateRight(t)}}},[t("icon-rotate-right")],1),e.cssFiltersSupported?t("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:e.closeFilters,expression:"closeFilters"}],staticClass:"tify-scan-filters",class:{"-open":e.filtersVisible}},[t("button",{staticClass:"tify-scan-button",class:{"-active":e.filtersActive},attrs:{title:e.$root.translate("Toggle image filters"),"aria-controls":e.$root.getId("filters"),"aria-expanded":e.filtersVisible?"true":"false"},on:{click:function(t){e.filtersVisible=!e.filtersVisible}}},[t("icon-tune")],1),t("div",{directives:[{name:"show",rawName:"v-show",value:e.filtersVisible,expression:"filtersVisible"}],staticClass:"tify-scan-filters-popup",attrs:{id:e.$root.getId("filters")}},[t("h3",{staticClass:"tify-sr-only"},[e._v(e._s(e.$root.translate("Image filters")))]),t("p",[t("label",[t("icon-white-balance-sunny"),e._v(" "+e._s(e.$root.translate("Brightness"))+" "),t("b",[e._v(e._s(Math.round(100*(e.$root.options.filters.brightness||1)))+" %")]),t("input",{ref:"firstSlider",staticClass:"tify-scan-range",attrs:{max:"2",min:".5",step:".01",type:"range"},domProps:{value:e.$root.options.filters.brightness||1},on:{input:function(t){return e.setFilter("brightness",t)}}})],1)]),t("p",[t("label",[t("icon-brightness-6"),e._v(" "+e._s(e.$root.translate("Contrast"))+" "),t("b",[e._v(e._s(Math.round(100*(e.$root.options.filters.contrast||1)))+" %")]),t("input",{staticClass:"tify-scan-range",attrs:{max:"2",min:".5",step:".01",type:"range"},domProps:{value:e.$root.options.filters.contrast||1},on:{input:function(t){return e.setFilter("contrast",t)}}})],1)]),t("p",[t("label",[t("icon-palette"),e._v(" "+e._s(e.$root.translate("Saturation"))+" "),t("b",[e._v(e._s(Math.round(100*e.saturation))+" %")]),t("input",{staticClass:"tify-scan-range",attrs:{max:"3",min:"0",step:".01",type:"range"},domProps:{value:e.saturation},on:{input:function(t){return e.setFilter("saturate",t)}}})],1)]),t("p",[t("button",{staticClass:"tify-scan-reset",attrs:{disabled:!e.filtersActive},on:{click:e.resetFilters}},[t("icon-backup-restore"),e._v(" "+e._s(e.$root.translate("Reset"))+" ")],1)])])]):e._e()]):e._e(),t("div",{ref:"image",staticClass:"tify-scan-image"})])},ui=[],hi=i("aa78"),di=i.n(hi);const pi=.01,fi=["-webkit-","-moz-","-o-","-ms-"];var vi={mixins:[p.a,x.a],data(){return{filtersVisible:!1,loadingTimeout:null,tileSources:{},viewer:null,zoomFactor:1.5}},computed:{cssFiltersSupported(){const e=document.createElement("a");return e.style.cssText=fi.join("filter:blur(2px);"),!!e.style.length&&(void 0===document.documentMode||document.documentMode>9)},filtersActive(){return Object.keys(this.$root.options.filters).length>0},isMinZoom(){return!this.viewer||this.viewer.viewport.getZoom()<=this.viewer.viewport.getMinZoom()},isMaxZoom(){return!this.viewer||this.viewer.viewport.getZoom()>=this.viewer.viewport.getMaxZoom()},isReset(){const e=this.viewer.viewport.getHomeBounds(),t=this.viewer.viewport.getBounds();return Math.abs(e.height-t.height)<1e-9&&Math.abs(e.width-t.width)<1e-9&&Math.abs(e.x-t.x)<1e-9&&Math.abs(e.y-t.y)<1e-9},saturation(){const e=this.$parent.$parent.options.filters.saturate;return"number"===typeof e?e:1}},watch:{"$root.options.pages":function(e,t){const i=e.length!==t.length;this.loadImageInfo(i)}},methods:{closeFilters(){this.filtersVisible=!1},initViewer(e){const{options:t}=this.$root,i=[];let n,r=0,o=0;if(t.pages.forEach((e,t)=>{let s=1;e<1?(s=0,n=t>0?this.$root.pageCount:1):n=e;const a=this.tileSources[n];if(!a)return;r||(r=a.width);const l=a.width/r;i.push({opacity:s,tileSource:a,width:l,x:o}),o+=l+pi}),this.viewer)return this.viewer.addOnceHandler("open",()=>{if(this.isReset||e)this.resetScan();else{this.viewer.viewport.applyConstraints(!0);const e=this.viewer.viewport.getBounds();if(e.x<=0&&e.y<=0)return;const i=t.pages[0]?0:1;this.viewer.viewport.panTo({x:e.x>0?e.width/2+i:t.pan.x,y:e.y>0?e.height/2:t.pan.y})}}),void this.viewer.open(i);this.viewer=di()({animationTime:.4,element:this.$refs.image,immediateRender:!0,preload:!this.$root.isMobile(),preserveImageSizeOnResize:!0,preserveViewport:!0,showNavigationControl:!1,showZoomControl:!1,tileSources:i,visibilityRatio:.2,...this.$root.options.viewer}),this.viewer.innerTracker.keyHandler=null,this.viewer.gestureSettingsMouse.clickToZoom=!1,this.viewer.addHandler("animation-finish",()=>{if(this.isReset)return void this.removeScanOptions();const e=this.viewer.viewport.getCenter();this.$root.updateOptions({pan:{x:Math.round(1e3*e.x)/1e3,y:Math.round(1e3*e.y)/1e3},zoom:Math.round(1e3*this.viewer.viewport.getZoom())/1e3})}),this.viewer.addHandler("canvas-click",()=>{document.body.click()}),this.viewer.addHandler("open",()=>{this.startLoadingWatch(),void 0!==t.pan.x||void 0!==t.pan.y||t.zoom?(void 0===t.pan.x&&void 0===t.pan.y||this.viewer.viewport.panTo({x:t.pan.x,y:t.pan.y},!0),t.zoom&&this.viewer.viewport.zoomTo(t.zoom,null,!0)):this.viewer.viewport.goHome(),null!==t.rotation&&this.viewer.viewport.setRotation(t.rotation)}),this.viewer.addHandler("tile-load-failed",e=>{this.$root.error="Error loading image: "+e.message}),this.$root.expose(this.resetScan),this.$root.expose(this.viewer,"viewer")},loadImageInfo(e=!1){this.stopLoadingWatch();const t=[];this.$root.options.pages.forEach(e=>{if(e<1||this.tileSources[e])return;const{resource:i}=this.$root.canvases[e-1].images[0];if(i.service){const n=i.service["@id"],r=`${n}${"/"===n.slice(-1)?"":"/"}info.json`;t.push(this.$http.get(r).then(t=>({...t,page:e}),t=>{let i;t.response&&t.response.statusText?i=t.response.statusText:t.message&&(i=t.message),this.$root.error=`Error loading info file for page ${e}${i?": "+i:""}`}))}else this.tileSources[e]={type:"image",url:i["@id"],width:i.width,height:i.height}}),t.length?Promise.all(t).then(t=>{t.forEach(e=>{e&&(this.tileSources[e.page]=e.data)}),this.initViewer(e)}):this.initViewer(e)},onKeydown(e){"Escape"===e.key&&(this.filtersVisible=!1);const t=[45,48,96];t.indexOf(e.keyCode)>-1&&(e.shiftKey?this.resetScan(e):this.viewer.viewport.goHome())},onKeypress(e){if(!this.preventKeyboardEvent(e))switch(e.key){case"r":case"R":this.rotateRight(e);break;case"i":this.filtersVisible=!this.filtersVisible,this.filtersVisible&&this.$nextTick(()=>{this.$refs.firstSlider.focus()});break;case"I":this.resetFilters();break;case"+":case"=":case"W":this.viewer.viewport.zoomBy(1.1),this.viewer.viewport.applyConstraints();break;case"-":case"_":case"S":this.viewer.viewport.zoomBy(.9),this.viewer.viewport.applyConstraints();break;case"w":this.viewer.innerTracker.keyDownHandler({keyCode:38});break;case"s":this.viewer.innerTracker.keyDownHandler({keyCode:40});break;case"a":this.viewer.innerTracker.keyDownHandler({keyCode:37});break;case"d":this.viewer.innerTracker.keyDownHandler({keyCode:39});break;default:}},removeScanOptions(){this.$root.updateOptions({pan:{},zoom:null})},resetFilters(){this.$refs.image.style.cssText="",this.$root.updateOptions({filters:{}})},resetScan(e){e&&(this.viewer.viewport.setRotation(0),this.$root.updateOptions({rotation:null}),this.filtersActive&&this.resetFilters()),this.viewer.viewport.goHome(),this.removeScanOptions()},rotateRight(e){const{viewport:t}=this.viewer,i=e&&e.shiftKey?0:(t.getRotation()+90)%360;t.setRotation(i),this.$root.updateOptions({rotation:i||null})},setFilter(e,t){const i=t.target.valueAsNumber;1===i?this.$delete(this.$root.options.filters,e):this.$set(this.$root.options.filters,e,i),this.$root.updateOptions({filters:this.$root.options.filters}),this.updateFilterStyle()},startLoadingWatch(){let e=0;for(let t=this.viewer.world.getItemCount()-1;t>=0;t-=1){const i=this.viewer.world.getItemAt(t);i&&i._tilesLoading&&(e=1)}this.$root.loading=e,this.loadingTimeout=setTimeout(this.startLoadingWatch,200)},stopLoadingWatch(){clearTimeout(this.loadingTimeout)},updateFilterStyle(){if(!this.filtersActive||!this.cssFiltersSupported)return;const e=[];Object.keys(this.$root.options.filters).forEach(t=>{e.push(`${t}(${this.$root.options.filters[t]})`)});const{image:t}=this.$refs,i=e.join(" ");t.style.cssText=fi.join(`filter:${i};`)},zoomIn(){this.viewer.viewport.zoomBy(this.zoomFactor)},zoomOut(){this.viewer.viewport.zoomBy(1/this.zoomFactor)}},mounted(){this.loadImageInfo(),this.updateFilterStyle(),this.$root.$el.addEventListener("keydown",this.onKeydown),this.$root.$el.addEventListener("keypress",this.onKeypress)},beforeDestroy(){this.viewer&&this.viewer.destroy(),this.$root.$el.removeEventListener("keydown",this.onKeydown),this.$root.$el.removeEventListener("keypress",this.onKeypress)}},gi=vi,mi=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M19,12H17V15H14V17H19V12M7,9H10V7H5V12H7V9M21,3H3A2,2 0 0,0 1,5V19A2,2 0 0,0 3,21H21A2,2 0 0,0 23,19V5A2,2 0 0,0 21,3M21,19H3V5H21V19Z"}})])},yi=[],wi={},xi=g(wi,mi,yi,!1,null,null,null),bi=xi.exports,_i=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M12,3A9,9 0 0,0 3,12H0L4,16L8,12H5A7,7 0 0,1 12,5A7,7 0 0,1 19,12A7,7 0 0,1 12,19C10.5,19 9.09,18.5 7.94,17.7L6.5,19.14C8.04,20.3 9.94,21 12,21A9,9 0 0,0 21,12A9,9 0 0,0 12,3M14,12A2,2 0 0,0 12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12Z"}})])},Ti=[],Si={},Ei=g(Si,_i,Ti,!1,null,null,null),Pi=Ei.exports,Ci=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M12,18V6A6,6 0 0,1 18,12A6,6 0 0,1 12,18M20,15.31L23.31,12L20,8.69V4H15.31L12,0.69L8.69,4H4V8.69L0.69,12L4,15.31V20H8.69L12,23.31L15.31,20H20V15.31Z"}})])},Ri=[],ki={},Oi=g(ki,Ci,Ri,!1,null,null,null),Ii=Oi.exports,Di=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M9,2A7,7 0 0,1 16,9C16,10.57 15.5,12 14.61,13.19L15.41,14H16L22,20L20,22L14,16V15.41L13.19,14.61C12,15.5 10.57,16 9,16A7,7 0 0,1 2,9A7,7 0 0,1 9,2M5,8V10H13V8H5Z"}})])},Ai=[],Li={},Hi=g(Li,Di,Ai,!1,null,null,null),Mi=Hi.exports,Bi=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M9,2A7,7 0 0,1 16,9C16,10.57 15.5,12 14.61,13.19L15.41,14H16L22,20L20,22L14,16V15.41L13.19,14.61C12,15.5 10.57,16 9,16A7,7 0 0,1 2,9A7,7 0 0,1 9,2M8,5V8H5V10H8V13H10V10H13V8H10V5H8Z"}})])},Fi=[],$i={},Ni=g($i,Bi,Fi,!1,null,null,null),zi=Ni.exports,Vi=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M17.5,12A1.5,1.5 0 0,1 16,10.5A1.5,1.5 0 0,1 17.5,9A1.5,1.5 0 0,1 19,10.5A1.5,1.5 0 0,1 17.5,12M14.5,8A1.5,1.5 0 0,1 13,6.5A1.5,1.5 0 0,1 14.5,5A1.5,1.5 0 0,1 16,6.5A1.5,1.5 0 0,1 14.5,8M9.5,8A1.5,1.5 0 0,1 8,6.5A1.5,1.5 0 0,1 9.5,5A1.5,1.5 0 0,1 11,6.5A1.5,1.5 0 0,1 9.5,8M6.5,12A1.5,1.5 0 0,1 5,10.5A1.5,1.5 0 0,1 6.5,9A1.5,1.5 0 0,1 8,10.5A1.5,1.5 0 0,1 6.5,12M12,3A9,9 0 0,0 3,12A9,9 0 0,0 12,21A1.5,1.5 0 0,0 13.5,19.5C13.5,19.11 13.35,18.76 13.11,18.5C12.88,18.23 12.73,17.88 12.73,17.5A1.5,1.5 0 0,1 14.23,16H16A5,5 0 0,0 21,11C21,6.58 16.97,3 12,3Z"}})])},ji=[],Ui={},Wi=g(Ui,Vi,ji,!1,null,null,null),Gi=Wi.exports,qi=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M16.89,15.5L18.31,16.89C19.21,15.73 19.76,14.39 19.93,13H17.91C17.77,13.87 17.43,14.72 16.89,15.5M13,17.9V19.92C14.39,19.75 15.74,19.21 16.9,18.31L15.46,16.87C14.71,17.41 13.87,17.76 13,17.9M19.93,11C19.76,9.61 19.21,8.27 18.31,7.11L16.89,8.53C17.43,9.28 17.77,10.13 17.91,11M15.55,5.55L11,1V4.07C7.06,4.56 4,7.92 4,12C4,16.08 7.05,19.44 11,19.93V17.91C8.16,17.43 6,14.97 6,12C6,9.03 8.16,6.57 11,6.09V10L15.55,5.55Z"}})])},Zi=[],Xi={},Yi=g(Xi,qi,Zi,!1,null,null,null),Ki=Yi.exports,Qi=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M3,17V19H9V17H3M3,5V7H13V5H3M13,21V19H21V17H13V15H11V21H13M7,9V11H3V13H7V15H9V9H7M21,13V11H11V13H21M15,9H17V7H21V5H17V3H15V9Z"}})])},Ji=[],en={},tn=g(en,Qi,Ji,!1,null,null,null),nn=tn.exports,rn=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M3.55 19.09L4.96 20.5L6.76 18.71L5.34 17.29M12 6C8.69 6 6 8.69 6 12S8.69 18 12 18 18 15.31 18 12C18 8.68 15.31 6 12 6M20 13H23V11H20M17.24 18.71L19.04 20.5L20.45 19.09L18.66 17.29M20.45 5L19.04 3.6L17.24 5.39L18.66 6.81M13 1H11V4H13M6.76 5.39L4.96 3.6L3.55 5L5.34 6.81L6.76 5.39M1 13H4V11H1M13 20H11V23H13"}})])},on=[],sn={},an=g(sn,rn,on,!1,null,null,null),ln=an.exports,cn=g(gi,ci,ui,!1,null,null,null),un=cn.exports;S()(cn,{IconAspectRatio:bi,IconBackupRestore:Pi,IconBrightness6:Ii,IconChevronLeft:L,IconChevronRight:$,IconMagnifyMinus:Mi,IconMagnifyPlus:zi,IconPalette:Gi,IconRotateRight:Ki,IconTune:nn,IconWhiteBalanceSunny:ln});var hn=function(){var e=this,t=e._self._c;return t("section",{staticClass:"tify-thumbnails",attrs:{tabindex:"0"},on:{scroll:e.redrawThumbnails}},[t("h2",{staticClass:"tify-sr-only"},[e._v(e._s(e.$root.translate("Pages")))]),t("div",{ref:"container",staticClass:"tify-thumbnails-list"},e._l(e.items,(function(i){return t("a",{key:i.page,staticClass:"tify-thumbnails-item",class:{"-current":e.$root.options.pages.indexOf(i.page)>-1},attrs:{href:"javascript:;"},on:{click:function(t){return t.preventDefault(),e.setPageAndSwitchView(i.page,t.ctrlKey)},touchstart:function(t){return e.touchStartTogglePage(i.page)},touchend:e.touchEnd}},[t("img",{attrs:{alt:"",src:i.imgUrl}}),t("span",{staticClass:"tify-thumbnails-page"},[e._v(" "+e._s(e.$root.getPageLabel(i.page,i.label))+" ")])])})),0)])},dn=[],pn=i("6015"),fn=i.n(pn);const vn=750;var gn={mixins:[fn.a],data(){return{isInited:!1,itemHeight:0,itemVMargin:0,items:[{label:""}],itemsPerRow:0,knownImages:[],lastScrollTop:0,resizeTimeout:null,style:{},thumbnailWidth:0,touchTimeout:null}},watch:{"$root.options.pages":function(e){this.$nextTick(()=>{const t=".tify-thumbnails-item.-current";e.length>2||e.length>1&&e[1]!==e[0]+1||(this.$refs.container.querySelector(t)?this.updateScrollPos(t):this.scrollToCurrentPage())})},"$root.options.view":function(e){"thumbnails"===e&&this.init()}},methods:{init(){this.updateDimensions(),this.scrollToCurrentPage(!1),this.isInited||(window.addEventListener("resize",this.onResize),this.isInited=!0)},onResize(){clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{"thumbnails"===this.$root.options.view&&this.updateDimensions()},200)},updateDimensions(){const e=this.$refs.container.querySelector(".tify-thumbnails-item"),t=e.currentStyle||window.getComputedStyle(e),i=parseInt(t.marginTop,10)+parseFloat(t.marginBottom,10);this.itemHeight=e.offsetHeight+i,this.itemVMargin=i;const n=parseInt(t.marginLeft,10)+parseFloat(t.marginRight,10),r=e.offsetWidth+n;this.thumbnailWidth=e.offsetWidth,this.itemsPerRow=Math.floor(this.$refs.container.clientWidth/r);const o=Math.ceil(this.$root.canvases.length/this.itemsPerRow),s=o*this.itemHeight;this.$refs.container.style.height=s+"px",this.redrawThumbnails(),this.scrollToCurrentPage(!1)},redrawThumbnails(){const e=this.$el.scrollTop,t=Math.floor(e/this.itemHeight)*this.itemsPerRow+1,i=Math.ceil(this.$el.offsetHeight/this.itemHeight),n=i*this.itemsPerRow,r=t+this.itemsPerRow+n,o=Math.min(this.$root.canvases.length,r),s=[];for(let a=t-1;a{const e=Math.floor(t/this.itemsPerRow);this.$refs.container.style.paddingTop=e*this.itemHeight+"px"})},scrollToCurrentPage(e=!0){const t=Math.floor((this.$root.options.pages[0]-1)/this.itemsPerRow),i=t*this.itemHeight+(this.itemVMargin-50);e?this.scrollTo(this.$el,i):this.$el.scrollTop=i},setPageAndSwitchView(e,t=!1){if(t){const t=this.$root.options.pages.slice(0),i=t.indexOf(e);return i<0?(t.push(e),t.sort((e,t)=>e-t),0===t[0]&&t.shift()):t.length>1&&t.splice(i,1),void this.$root.updateOptions({pages:t})}this.$root.setPage(e),this.$root.isMobile()&&this.$root.updateOptions({view:"scan"})},touchStartTogglePage(e){this.lastScrollTop=this.$el.scrollTop,this.touchTimeout=setTimeout(()=>{this.$el.scrollTop===this.lastScrollTop&&this.setPageAndSwitchView(e,!0)},vn)},touchEnd(){clearTimeout(this.touchTimeout)}},mounted(){this.style.flex=this.$el.style.flex,"thumbnails"===this.$root.options.view&&this.init()},beforeDestroy(){window.removeEventListener("resize",this.onResize)}},mn=gn,yn=g(mn,hn,dn,!1,null,null,null),wn=yn.exports,xn=function(){var e=this,t=e._self._c;return t("section",{staticClass:"tify-toc",attrs:{tabindex:"0"}},[t("h2",{staticClass:"tify-sr-only"},[e._v(e._s(e.$root.translate("Table of Contents")))]),e.hasChildStructures?t("div",{staticClass:"tify-toc-header"},[t("button",{staticClass:"tify-toc-toggle-all",on:{click:function(t){return e.$refs.children.toggleAllChildren(!0)}}},[e._v(" "+e._s(e.$root.translate("Expand all"))+" ")]),t("button",{staticClass:"tify-toc-toggle-all",on:{click:function(t){return e.$refs.children.toggleAllChildren(!1)}}},[e._v(" "+e._s(e.$root.translate("Collapse all"))+" ")])]):e._e(),e.isInited?t("toc-list",{ref:"children",attrs:{level:0,structures:e.structures}}):e._e()],1)},bn=[];const _n=".tify-toc-structure.-current";var Tn={mixins:[fn.a,Tt],components:{TocList:bt},data(){return{isInited:!1}},computed:{hasChildStructures(){return this.structures.some(e=>e.childStructures)}},methods:{init(){this.isInited=!0,this.$nextTick(()=>this.updateScrollPos(_n,!1))}},watch:{"$root.options.pages":function(){this.$nextTick(()=>this.updateScrollPos(_n))},"$root.options.view":function(e){"toc"===e&&this.init()}},mounted(){"toc"===this.$root.options.view&&this.init()}},Sn=Tn,En=g(Sn,xn,bn,!1,null,null,null),Pn=En.exports,Cn={components:{AppHeader:nt,ViewExport:Rt,ViewHelp:Nt,ViewInfo:li,ViewScan:un,ViewThumbnails:wn,ViewToc:Pn,ViewFulltext:Lt},computed:{hasOtherContent(){return this.$root.canvases.some(e=>"otherContent"in e)},hasToc(){return!(!this.$root.manifest.structures||!this.$root.manifest.structures.length)},ready(){return this.$root.manifest&&("en"===this.$root.options.language||this.$root.translation)}},created(){this.$root.expose(this.setLanguage)},mounted(){this.$http.interceptors.request.use(e=>(this.$root.loading+=1,e)),this.$http.interceptors.response.use(e=>(this.$root.loading>0&&(this.$root.loading-=1),e),e=>(this.$root.loading=0,Promise.reject(e))),this.$root.options.manifestUrl?(this.loadManifest(this.$root.options.manifestUrl),this.setLanguage(this.$root.options.language)):this.$root.error='Missing option "manifestUrl"'},methods:{loadManifest(e){this.$root.manifest=null,this.$http.get(e).then(e=>{const t=e.data;this.$root.isManifest(t)?(this.$root.manifest=t,this.$root.updateOptionsFromUrlQuery(),window.addEventListener("popstate",this.$root.updateOptionsFromUrlQuery),this.$nextTick(()=>this.$root.readyPromise.resolve())):(this.$root.error="Please provide a valid IIIF Presentation API 2.x manifest",this.$root.readyPromise.reject(this.$root.error))},e=>{const t=e.response?e.response.statusText:e.message;this.$root.error="Error loading IIIF manifest: "+t,this.$root.readyPromise.reject(this.$root.error)})},setLanguage(e){let t,i;const n=new Promise((e,n)=>{t=e,i=n});if("en"===e)return this.$root.options.language="en",this.$root.translation=null,t(e),n;const r=`${this.$root.options.translationsDirUrl}/${e}.json`;return this.$http.get(r).then(i=>{this.$root.options.language=e,this.$root.translation=i.data,t(e)},t=>{const n=t.response?t.response.statusText:t.message;this.$root.error=`Error loading translation for "${e}": ${n}`,i(new Error(this.$root.error))}),n}},beforeDestroy(){window.removeEventListener("popstate",this.$root.updateOptionsFromUrlQuery)}},Rn=Cn,kn=(i("2d00b"),function(){var e=this,t=e._self._c;return t("svg",{staticClass:"tify-icon",attrs:{viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"}})])}),On=[],In={},Dn=g(In,kn,On,!1,null,null,null),An=Dn.exports,Ln=g(Rn,s,a,!1,null,null,null),Hn=Ln.exports;S()(Ln,{IconClose:An});var Mn=i("07d2"),Bn=i.n(Mn),Fn={methods:{convertValueToArray(e){const{filterHtml:t}=this;if(!(e instanceof Array)){if("object"===typeof e){if(e["@value"])return[t(e["@value"])];if(e["@id"]){const i=t(e["@id"]);return[{"@id":i,label:e.label?t(e.label):i}]}return["(Invalid value)"]}return[t(e)]}const i=[],n={};e.forEach(e=>{"string"===typeof e||e["@id"]&&e.label?i.push(e):e&&"object"!==typeof e?i.push(t(e)):e["@language"]&&e["@value"]&&(n.fallback||(n.fallback=e["@value"]),0===e["@language"].indexOf("en")?n.en=e["@value"]:e["@language"]===this.options.language&&(n.preferred=e["@value"]))});const r=n.preferred||n.en||n.fallback||null;return r&&i.push(t(r)),i},filterHtml(e){const t=["a","b","br","i","img","p","span"],i={a:["href"],img:["alt","src"]};let n=Bn()(e,t);const r=/<(\w+)((\s+.+?(\s*=\s*(?:".*?"|'.*?'|.*?|[\^'">\s]+))?)+\s*|\s*)>/g;return n=n.replace(r,(e,t,n)=>{if(!n)return`<${t}>`;const r=/(?:([^\s]+)=(?:"(.*?)"|'(.*?)'))|([^\s]+)/g,o=[];return n.replace(r,(e,n)=>{e!==n&&i[t]&&i[t].indexOf(n)>-1&&o.push(e)}),o.length>0?`<${t} ${o.join(" ")}>`:`<${t}>`}),n},isManifest(e){return e&&Array.isArray(e.sequences)}}},$n={data(){return{urlUpdateTimeout:null}},mounted(){this.expose(this.setPage)},beforeDestroy(){clearTimeout(this.urlUpdateTimeout)},methods:{getStartPages(){const{pages:e}=this.options;if(e)return e;const{startCanvas:t}=this.manifest.sequences[0],i=t?this.canvases.findIndex(e=>e["@id"]===t)+1:1;return[i]},isValidPagesArray(e){if(!Array.isArray(e))return!1;if(new Set(e).size!==e.length)return!1;for(let t=0,i=e.length;t0&&e[t]>0&&e[t]<=e[t-1]||e[t]<0||e[t]>this.pageCount)return!1;return!0},setPage(e){let t=e;if(Array.isArray(e)||(t=[e]),!this.isValidPagesArray(t))throw new RangeError("Invalid pages");if(1===t.length&&this.options.pages&&this.options.pages[0]%2<1&&(this.options.pages[1]===this.options.pages[0]+1||0===this.options.pages[1])){const e=t[0]%2>0?t[0]-1:t[0];t=[e,e===this.pageCount?0:e+1]}return this.updateOptions({pages:t}),t},updateOptions(e){Object.assign(this.options,e),window.history&&this.$root.options.urlQueryKey&&(clearTimeout(this.urlUpdateTimeout),this.urlUpdateTimeout=setTimeout(()=>{const t={};this.options.urlQueryParams.forEach(e=>{const i=this.options[e];null===i||"pages"===e&&i.length<2&&i[0]<2||"object"===typeof i&&!Object.keys(i).length?delete t[e]:t[e]=this.options[e]});const i=new URL(window.location);i.searchParams.set(this.$root.options.urlQueryKey,JSON.stringify(t)),e.pages?(this.error="",window.history.pushState({},"",i)):window.history.replaceState({},"",i)},100))},updateOptionsFromUrlQuery(){let e={};try{const t=new URLSearchParams(window.location.search);e=JSON.parse(t.get(this.$root.options.urlQueryKey))||{}}catch(t){}""===e.view&&this.$root.isMobile()&&(e.view="scan"),e.pages&&!this.isValidPagesArray(e.pages)&&(this.$root.error="Invalid pages, reset to start page",e.pages=this.getStartPages()),this.options.filters=e.filters||this.options.filters,this.options.pages=e.pages||this.getStartPages(),this.options.pan=e.panX||e.panY?{x:e.panX,y:e.panY}:e.pan||this.options.pan,this.options.rotation=parseInt(e.rotation,10)||this.options.rotation,this.options.view=e.view||""===e.view?e.view:this.options.view,this.options.zoom=parseFloat(e.zoom)||this.options.zoom}}},Nn={methods:{isMobile(){return this.$root.$el.offsetWidth{this.$el.clientWidth<=this.options.breakpoints[e]?this.$el.classList.add("-"+e):this.$el.classList.remove("-"+e)}),this.$el.clientHeight<=499?this.$el.classList.add("-short"):this.$el.classList.remove("-short")}},mounted(){this.updateBreakpoint(),window.addEventListener("resize",this.updateBreakpoint)},beforeDestroy(){window.removeEventListener("resize",this.updateBreakpoint)}};n["a"].directive("click-outside",{bind(e,t,i){e.event=n=>{e===n.target||e.contains(n.target)||i.context[t.expression](n)},document.body.addEventListener("click",e.event)},unbind(e){document.body.removeEventListener("click",e.event)}}),n["a"].prototype.$http=o.a,window.Tify=function(e={}){const t={breakpoints:{tiny:359,small:700,medium:1e3,large:1300},container:null,filters:{},language:"en",manifestUrl:null,viewer:{},pageLabelFormat:"P : L",pages:null,pan:{},rotation:null,translationsDirUrl:null,urlQueryKey:null,urlQueryParams:["filters","pages","pan","rotation","view","zoom"],view:"",zoom:null};if(this.options={...t,...e},!this.options.translationsDirUrl){const e=document.getElementsByTagName("script"),t=[...e].find(e=>e.src.includes("/tify"));if(t){const{src:e}=t;this.options.translationsDirUrl=e.substring(0,e.lastIndexOf("/"))+"/translations"}}let i=null;this.ready=new Promise((e,t)=>{i={resolve:e,reject:t}});const r=this;this.app=new n["a"]({render:e=>e(Hn),data(){return{api:{},error:"",id:"tify-"+Math.floor(Math.random()*Date.now()),loading:0,manifest:null,options:r.options,readyPromise:i,translation:null}},mixins:[Fn,$n,Nn],computed:{canvases(){return this.manifest.sequences[0].canvases},pageCount(){return this.manifest.sequences[0].canvases.length}},methods:{expose(e,t){r[t||e.name.replace("bound ","")]=e},getId(e){return this.id+(e?"-"+e:"")},getPageLabel(e,t){return this.options.pageLabelFormat.replace("P",e).replace("L",t)},translate(e,t){return this.translation&&this.translation[e]?this.translation[e]:t||e}}});let o=!1;this.mount=e=>{if(o)throw new Error("TIFY is already mounted");const t="string"===typeof e?document.querySelector(e):e;if(!t)throw new Error("Container element not found");const i=window.getComputedStyle(t);"static"===i.position&&(t.style.position="relative");const n=document.createElement("div");t.innerHTML="",t.appendChild(n),this.app.$mount(n),o=!0},this.destroy=()=>{this.app.$destroy()},this.options.container&&this.mount(this.options.container)};t["default"]=window.Tify},"56ef":function(e,t,i){var n=i("d066"),r=i("e330"),o=i("241c"),s=i("7418"),a=i("825a"),l=r([].concat);e.exports=n("Reflect","ownKeys")||function(e){var t=o.f(a(e)),i=s.f;return i?l(t,i(e)):t}},"577e":function(e,t,i){var n=i("f5df"),r=String;e.exports=function(e){if("Symbol"===n(e))throw TypeError("Cannot convert a Symbol value to a string");return r(e)}},5926:function(e,t,i){var n=i("b42e");e.exports=function(e){var t=+e;return t!==t||0===t?0:n(t)}},"59ed":function(e,t,i){var n=i("1626"),r=i("0d51"),o=TypeError;e.exports=function(e){if(n(e))return e;throw o(r(e)+" is not a function")}},"5c6c":function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"5cce":function(e,t){e.exports={version:"0.27.2"}},"5e77":function(e,t,i){var n=i("83ab"),r=i("1a2d"),o=Function.prototype,s=n&&Object.getOwnPropertyDescriptor,a=r(o,"name"),l=a&&"something"===function(){}.name,c=a&&(!n||n&&s(o,"name").configurable);e.exports={EXISTS:a,PROPER:l,CONFIGURABLE:c}},"5f02":function(e,t,i){"use strict";var n=i("c532");e.exports=function(e){return n.isObject(e)&&!0===e.isAxiosError}},6015:function(e,t){e.exports={methods:{scrollTo(e,t,i=120){const n=e,r=!0===i?120:i;if(!r||r<0)return void(n.scrollTop=t);const o=t-e.scrollTop,s=o/r/.1;setTimeout(()=>{n.scrollTop+=s,n.scrollTop!==t&&this.scrollTo(n,t,r-10)},10)},updateScrollPos(e,t=!0){const i=this.$el.querySelectorAll(e);if(!i.length)return;let n=i[0];const r=i[i.length-1];Array.prototype.forEach.call(i,e=>{e.dataset.level>n.dataset.level&&(n=e)});const o=this.$el.getBoundingClientRect(),s=n.getBoundingClientRect(),a=r.getBoundingClientRect();if(s.topo.bottom){const e=a.bottom-o.bottom+this.$el.scrollTop;this.scrollTo(this.$el,e+50,t)}}}}},6374:function(e,t,i){var n=i("da84"),r=Object.defineProperty;e.exports=function(e,t){try{r(n,e,{value:t,configurable:!0,writable:!0})}catch(i){n[e]=t}return t}},"69f3":function(e,t,i){var n,r,o,s=i("7f9a"),a=i("da84"),l=i("e330"),c=i("861d"),u=i("9112"),h=i("1a2d"),d=i("c6cd"),p=i("f772"),f=i("d012"),v="Object already initialized",g=a.TypeError,m=a.WeakMap,y=function(e){return o(e)?r(e):n(e,{})},w=function(e){return function(t){var i;if(!c(t)||(i=r(t)).type!==e)throw g("Incompatible receiver, "+e+" required");return i}};if(s||d.state){var x=d.state||(d.state=new m),b=l(x.get),_=l(x.has),T=l(x.set);n=function(e,t){if(_(x,e))throw new g(v);return t.facade=e,T(x,e,t),t},r=function(e){return b(x,e)||{}},o=function(e){return _(x,e)}}else{var S=p("state");f[S]=!0,n=function(e,t){if(h(e,S))throw new g(v);return t.facade=e,u(e,S,t),t},r=function(e){return h(e,S)?e[S]:{}},o=function(e){return h(e,S)}}e.exports={set:n,get:r,has:o,enforce:y,getterFor:w}},7156:function(e,t,i){var n=i("1626"),r=i("861d"),o=i("d2bb");e.exports=function(e,t,i){var s,a;return o&&n(s=t.constructor)&&s!==i&&r(a=s.prototype)&&a!==i.prototype&&o(e,a),e}},7418:function(e,t){t.f=Object.getOwnPropertySymbols},7839:function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},7917:function(e,t,i){"use strict";var n=i("c532");function r(e,t,i,n,r){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),i&&(this.config=i),n&&(this.request=n),r&&(this.response=r)}n.inherits(r,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var o=r.prototype,s={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach((function(e){s[e]={value:e}})),Object.defineProperties(r,s),Object.defineProperty(o,"isAxiosError",{value:!0}),r.from=function(e,t,i,s,a,l){var c=Object.create(o);return n.toFlatObject(e,c,(function(e){return e!==Error.prototype})),r.call(c,e.message,t,i,s,a),c.name=e.name,l&&Object.assign(c,l),c},e.exports=r},"7aac":function(e,t,i){"use strict";var n=i("c532");e.exports=n.isStandardBrowserEnv()?function(){return{write:function(e,t,i,r,o,s){var a=[];a.push(e+"="+encodeURIComponent(t)),n.isNumber(i)&&a.push("expires="+new Date(i).toGMTString()),n.isString(r)&&a.push("path="+r),n.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},"7b0b":function(e,t,i){var n=i("1d80"),r=Object;e.exports=function(e){return r(n(e))}},"7f9a":function(e,t,i){var n=i("da84"),r=i("1626"),o=i("8925"),s=n.WeakMap;e.exports=r(s)&&/native code/.test(o(s))},"825a":function(e,t,i){var n=i("861d"),r=String,o=TypeError;e.exports=function(e){if(n(e))return e;throw o(r(e)+" is not an object")}},"83ab":function(e,t,i){var n=i("d039");e.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},"83b9":function(e,t,i){"use strict";var n=i("d925"),r=i("e683");e.exports=function(e,t){return e&&!n(t)?r(e,t):t}},"848b":function(e,t,i){"use strict";var n=i("5cce").version,r=i("7917"),o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}}));var s={};function a(e,t,i){if("object"!==typeof e)throw new r("options must be an object",r.ERR_BAD_OPTION_VALUE);var n=Object.keys(e),o=n.length;while(o-- >0){var s=n[o],a=t[s];if(a){var l=e[s],c=void 0===l||a(l,s,e);if(!0!==c)throw new r("option "+s+" must be "+c,r.ERR_BAD_OPTION_VALUE)}else if(!0!==i)throw new r("Unknown option "+s,r.ERR_BAD_OPTION)}}o.transitional=function(e,t,i){function o(e,t){return"[Axios v"+n+"] Transitional option '"+e+"'"+t+(i?". "+i:"")}return function(i,n,a){if(!1===e)throw new r(o(n," has been removed"+(t?" in "+t:"")),r.ERR_DEPRECATED);return t&&!s[n]&&(s[n]=!0,console.warn(o(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(i,n,a)}},e.exports={assertOptions:a,validators:o}},"861d":function(e,t,i){var n=i("1626");e.exports=function(e){return"object"==typeof e?null!==e:n(e)}},8925:function(e,t,i){var n=i("e330"),r=i("1626"),o=i("c6cd"),s=n(Function.toString);r(o.inspectSource)||(o.inspectSource=function(e){return s(e)}),e.exports=o.inspectSource},"8df4":function(e,t,i){"use strict";var n=i("fb60");function r(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var i=this;this.promise.then((function(e){if(i._listeners){var t,n=i._listeners.length;for(t=0;t */ -t.read=function(e,t,i,n,r){var o,s,a=8*r-n-1,l=(1<>1,u=-7,h=i?r-1:0,d=i?-1:1,p=e[t+h];for(h+=d,o=p&(1<<-u)-1,p>>=-u,u+=a;u>0;o=256*o+e[t+h],h+=d,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=n;u>0;s=256*s+e[t+h],h+=d,u-=8);if(0===o)o=1-c;else{if(o===l)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=c}return(p?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,i,n,r,o){var s,a,l,c=8*o-r-1,u=(1<>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,f=n?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),t+=s+h>=1?d/l:d*Math.pow(2,1-h),t*l>=2&&(s++,l/=2),s+h>=u?(a=0,s=u):s+h>=1?(a=(t*l-1)*Math.pow(2,r),s+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,r),s=0));r>=8;e[i+p]=255&a,p+=f,a/=256,r-=8);for(s=s<0;e[i+p]=255&s,p+=f,s/=256,c-=8);e[i+p-f]|=128*v}},"94ca":function(e,t,i){var n=i("d039"),r=i("1626"),o=/#|\.prototype\./,s=function(e,t){var i=l[a(e)];return i==u||i!=c&&(r(t)?n(t):!!t)},a=s.normalize=function(e){return String(e).replace(o,".").toLowerCase()},l=s.data={},c=s.NATIVE="N",u=s.POLYFILL="P";e.exports=s},"9bf2":function(e,t,i){var n=i("83ab"),r=i("0cfb"),o=i("aed9"),s=i("825a"),a=i("a04b"),l=TypeError,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,h="enumerable",d="configurable",p="writable";t.f=n?o?function(e,t,i){if(s(e),t=a(t),s(i),"function"===typeof e&&"prototype"===t&&"value"in i&&p in i&&!i[p]){var n=u(e,t);n&&n[p]&&(e[t]=i.value,i={configurable:d in i?i[d]:n[d],enumerable:h in i?i[h]:n[h],writable:!1})}return c(e,t,i)}:c:function(e,t,i){if(s(e),t=a(t),s(i),r)try{return c(e,t,i)}catch(n){}if("get"in i||"set"in i)throw l("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},a04b:function(e,t,i){var n=i("c04e"),r=i("d9b5");e.exports=function(e){var t=n(e,"string");return r(t)?t:t+""}},aa78:function(e,t,i){var n,r,o;//! openseadragon 3.1.0 -//! Built on 2022-06-07 -//! Git commit: v3.1.0-1-c1c380f +t.read=function(e,t,i,n,r){var o,s,a=8*r-n-1,l=(1<>1,u=-7,h=i?r-1:0,d=i?-1:1,p=e[t+h];for(h+=d,o=p&(1<<-u)-1,p>>=-u,u+=a;u>0;o=256*o+e[t+h],h+=d,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=n;u>0;s=256*s+e[t+h],h+=d,u-=8);if(0===o)o=1-c;else{if(o===l)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=c}return(p?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,i,n,r,o){var s,a,l,c=8*o-r-1,u=(1<>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,f=n?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),t+=s+h>=1?d/l:d*Math.pow(2,1-h),t*l>=2&&(s++,l/=2),s+h>=u?(a=0,s=u):s+h>=1?(a=(t*l-1)*Math.pow(2,r),s+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,r),s=0));r>=8;e[i+p]=255&a,p+=f,a/=256,r-=8);for(s=s<0;e[i+p]=255&s,p+=f,s/=256,c-=8);e[i+p-f]|=128*v}},"94ca":function(e,t,i){var n=i("d039"),r=i("1626"),o=/#|\.prototype\./,s=function(e,t){var i=l[a(e)];return i==u||i!=c&&(r(t)?n(t):!!t)},a=s.normalize=function(e){return String(e).replace(o,".").toLowerCase()},l=s.data={},c=s.NATIVE="N",u=s.POLYFILL="P";e.exports=s},"9bf2":function(e,t,i){var n=i("83ab"),r=i("0cfb"),o=i("aed9"),s=i("825a"),a=i("a04b"),l=TypeError,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,h="enumerable",d="configurable",p="writable";t.f=n?o?function(e,t,i){if(s(e),t=a(t),s(i),"function"===typeof e&&"prototype"===t&&"value"in i&&p in i&&!i[p]){var n=u(e,t);n&&n[p]&&(e[t]=i.value,i={configurable:d in i?i[d]:n[d],enumerable:h in i?i[h]:n[h],writable:!1})}return c(e,t,i)}:c:function(e,t,i){if(s(e),t=a(t),s(i),r)try{return c(e,t,i)}catch(n){}if("get"in i||"set"in i)throw l("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},a04b:function(e,t,i){var n=i("c04e"),r=i("d9b5");e.exports=function(e){var t=n(e,"string");return r(t)?t:t+""}},aa78:function(e,t,i){var n,r,o;//! openseadragon 3.0.0 +//! Built on 2021-12-15 +//! Git commit: v3.0.0-0-3eded36 //! http://openseadragon.github.io //! License: http://openseadragon.github.io/license/ -function s(e){return new s.Viewer(e)}(function(e){e.version={versionStr:"3.1.0",major:parseInt("3",10),minor:parseInt("1",10),revision:parseInt("0",10)};var t={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object"},i=Object.prototype.toString,n=Object.prototype.hasOwnProperty;e.isFunction=function(t){return"function"===e.type(t)},e.isArray=Array.isArray||function(t){return"array"===e.type(t)},e.isWindow=function(e){return e&&"object"===typeof e&&"setInterval"in e},e.type=function(e){return null===e||void 0===e?String(e):t[i.call(e)]||"object"},e.isPlainObject=function(t){if(!t||"object"!==s.type(t)||t.nodeType||e.isWindow(t))return!1;if(t.constructor&&!n.call(t,"constructor")&&!n.call(t.constructor.prototype,"isPrototypeOf"))return!1;var i;for(var r in t)i=r;return void 0===i||n.call(t,i)},e.isEmptyObject=function(e){for(var t in e)return!1;return!0},e.freezeObject=function(t){return Object.freeze?e.freezeObject=Object.freeze:e.freezeObject=function(e){return e},e.freezeObject(t)},e.supportsCanvas=function(){var t=document.createElement("canvas");return!(!e.isFunction(t.getContext)||!t.getContext("2d"))}(),e.isCanvasTainted=function(e){var t=!1;try{e.getContext("2d").getImageData(0,0,1,1)}catch(i){t=!0}return t},e.supportsAddEventListener=function(){return!(!document.documentElement.addEventListener||!document.addEventListener)}(),e.supportsRemoveEventListener=function(){return!(!document.documentElement.removeEventListener||!document.removeEventListener)}(),e.supportsEventListenerOptions=function(){var t=0;if(e.supportsAddEventListener)try{var i={get capture(){return t++,!1},get once(){return t++,!1},get passive(){return t++,!1}};window.addEventListener("test",null,i),window.removeEventListener("test",null,i)}catch(n){t=0}return t>=3}(),e.getCurrentPixelDensityRatio=function(){if(e.supportsCanvas){var t=document.createElement("canvas").getContext("2d"),i=window.devicePixelRatio||1,n=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return Math.max(i,1)/n}return 1},e.pixelDensityRatio=e.getCurrentPixelDensityRatio()})(s),function(e){e.extend=function(){var e,t,i,n,r,o,a=arguments[0]||{},l=arguments.length,c=!1,u=1;for("boolean"===typeof a&&(c=a,a=arguments[1]||{},u=2),"object"===typeof a||s.isFunction(a)||(a={}),l===u&&(a=this,--u);u=n.x&&i.x=n.y},getMousePosition:function(t){if("number"===typeof t.pageX)e.getMousePosition=function(t){var i=new e.Point;return i.x=t.pageX,i.y=t.pageY,i};else{if("number"!==typeof t.clientX)throw new Error("Unknown event mouse position, no known technique.");e.getMousePosition=function(t){var i=new e.Point;return i.x=t.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,i.y=t.clientY+document.body.scrollTop+document.documentElement.scrollTop,i}}return e.getMousePosition(t)},getPageScroll:function(){var t=document.documentElement||{},i=document.body||{};if("number"===typeof window.pageXOffset)e.getPageScroll=function(){return new e.Point(window.pageXOffset,window.pageYOffset)};else if(i.scrollLeft||i.scrollTop)e.getPageScroll=function(){return new e.Point(document.body.scrollLeft,document.body.scrollTop)};else{if(!t.scrollLeft&&!t.scrollTop)return new e.Point(0,0);e.getPageScroll=function(){return new e.Point(document.documentElement.scrollLeft,document.documentElement.scrollTop)}}return e.getPageScroll()},setPageScroll:function(t){if("undefined"!==typeof window.scrollTo)e.setPageScroll=function(e){window.scrollTo(e.x,e.y)};else{var i=e.getPageScroll();if(i.x===t.x&&i.y===t.y)return;document.body.scrollLeft=t.x,document.body.scrollTop=t.y;var n=e.getPageScroll();if(n.x!==i.x&&n.y!==i.y)return void(e.setPageScroll=function(e){document.body.scrollLeft=e.x,document.body.scrollTop=e.y});if(document.documentElement.scrollLeft=t.x,document.documentElement.scrollTop=t.y,n=e.getPageScroll(),n.x!==i.x&&n.y!==i.y)return void(e.setPageScroll=function(e){document.documentElement.scrollLeft=e.x,document.documentElement.scrollTop=e.y});e.setPageScroll=function(e){}}e.setPageScroll(t)},getWindowSize:function(){var t=document.documentElement||{},i=document.body||{};if("number"===typeof window.innerWidth)e.getWindowSize=function(){return new e.Point(window.innerWidth,window.innerHeight)};else if(t.clientWidth||t.clientHeight)e.getWindowSize=function(){return new e.Point(document.documentElement.clientWidth,document.documentElement.clientHeight)};else{if(!i.clientWidth&&!i.clientHeight)throw new Error("Unknown window size, no known technique.");e.getWindowSize=function(){return new e.Point(document.body.clientWidth,document.body.clientHeight)}}return e.getWindowSize()},makeCenteredNode:function(t){t=e.getElement(t);var i=[e.makeNeutralElement("div"),e.makeNeutralElement("div"),e.makeNeutralElement("div")];return e.extend(i[0].style,{display:"table",height:"100%",width:"100%"}),e.extend(i[1].style,{display:"table-row"}),e.extend(i[2].style,{display:"table-cell",verticalAlign:"middle",textAlign:"center"}),i[0].appendChild(i[1]),i[1].appendChild(i[2]),i[2].appendChild(t),i[0]},makeNeutralElement:function(e){var t=document.createElement(e),i=t.style;return i.background="transparent none",i.border="none",i.margin="0px",i.padding="0px",i.position="static",t},now:function(){return Date.now?e.now=Date.now:e.now=function(){return(new Date).getTime()},e.now()},makeTransparentImage:function(t){var i=e.makeNeutralElement("img");return i.src=t,i},setElementOpacity:function(t,i,n){var r,o;t=e.getElement(t),n&&!e.Browser.alpha&&(i=Math.round(i)),e.Browser.opacity?t.style.opacity=i<1?i:"":i<1?(r=Math.round(100*i),o="alpha(opacity="+r+")",t.style.filter=o):t.style.filter=""},setElementTouchActionNone:function(t){t=e.getElement(t),"undefined"!==typeof t.style.touchAction?t.style.touchAction="none":"undefined"!==typeof t.style.msTouchAction&&(t.style.msTouchAction="none")},setElementPointerEvents:function(t,i){t=e.getElement(t),"undefined"!==typeof t.style&&"undefined"!==typeof t.style.pointerEvents&&(t.style.pointerEvents=i)},setElementPointerEventsNone:function(t){e.setElementPointerEvents(t,"none")},addClass:function(t,i){t=e.getElement(t),t.className?-1===(" "+t.className+" ").indexOf(" "+i+" ")&&(t.className+=" "+i):t.className=i},indexOf:function(e,t,i){return Array.prototype.indexOf?this.indexOf=function(e,t,i){return e.indexOf(t,i)}:this.indexOf=function(e,t,i){var n,r,o=i||0;if(!e)throw new TypeError;if(r=e.length,0===r||o>=r)return-1;for(o<0&&(o=r-Math.abs(o)),n=o;n=200&&c.status<300||0===c.status&&"http:"!==l&&"https:"!==l?i(c):e.isFunction(n)?n(c):e.console.error("AJAX request returned %d: %s",c.status,t))};var u=a?"POST":"GET";try{if(c.open(u,t,!0),s&&(c.responseType=s),o)for(var h in o)Object.prototype.hasOwnProperty.call(o,h)&&o[h]&&c.setRequestHeader(h,o[h]);r&&(c.withCredentials=!0),c.send(a)}catch(d){e.console.error("%s while making AJAX request: %s",d.name,d.message),c.onreadystatechange=function(){},e.isFunction(n)&&n(c,d)}return c},jsonp:function(t){var i,n=t.url,r=document.head||document.getElementsByTagName("head")[0]||document.documentElement,o=t.callbackName||"openseadragon"+e.now(),s=window[o],a="$1"+o+"$2",l=t.param||"callback",c=t.callback;n=n.replace(/(=)\?(&|$)|\?\?/i,a),n+=(/\?/.test(n)?"&":"?")+l+"="+o,window[o]=function(t){if(s)window[o]=s;else try{delete window[o]}catch(i){}c&&e.isFunction(c)&&c(t)},i=document.createElement("script"),void 0===t.async&&!1===t.async||(i.async="async"),t.scriptCharset&&(i.charset=t.scriptCharset),i.src=n,i.onload=i.onreadystatechange=function(e,t){(t||!i.readyState||/loaded|complete/.test(i.readyState))&&(i.onload=i.onreadystatechange=null,r&&i.parentNode&&r.removeChild(i),i=void 0)},r.insertBefore(i,r.firstChild)},createFromDZI:function(){throw"OpenSeadragon.createFromDZI is deprecated, use Viewer.open."},parseXml:function(t){if(window.DOMParser)e.parseXml=function(e){var t,i=null;return t=new DOMParser,i=t.parseFromString(e,"text/xml"),i};else{if(!window.ActiveXObject)throw new Error("Browser doesn't support XML DOM.");e.parseXml=function(e){var t=null;return t=new ActiveXObject("Microsoft.XMLDOM"),t.async=!1,t.loadXML(e),t}}return e.parseXml(t)},parseJSON:function(t){return e.parseJSON=window.JSON.parse,e.parseJSON(t)},imageFormatSupported:function(e){return e=e||"",!!n[e.toLowerCase()]},setImageFormatsSupported:function(t){e.extend(n,t)}});var i=function(e){};e.console=window.console||{log:i,debug:i,info:i,warn:i,error:i,assert:i},e.Browser={vendor:e.BROWSERS.UNKNOWN,version:0,alpha:!0};var n={bmp:!1,jpeg:!0,jpg:!0,png:!0,tif:!1,wdp:!1},r={};function o(e,t){return t&&e!==document.body?document.body:e.offsetParent}(function(){var t,i=navigator.appVersion,n=navigator.userAgent;switch(navigator.appName){case"Microsoft Internet Explorer":window.attachEvent&&window.ActiveXObject&&(e.Browser.vendor=e.BROWSERS.IE,e.Browser.version=parseFloat(n.substring(n.indexOf("MSIE")+5,n.indexOf(";",n.indexOf("MSIE")))));break;case"Netscape":window.addEventListener&&(n.indexOf("Edge")>=0?(e.Browser.vendor=e.BROWSERS.EDGE,e.Browser.version=parseFloat(n.substring(n.indexOf("Edge")+5))):n.indexOf("Edg")>=0?(e.Browser.vendor=e.BROWSERS.CHROMEEDGE,e.Browser.version=parseFloat(n.substring(n.indexOf("Edg")+4))):n.indexOf("Firefox")>=0?(e.Browser.vendor=e.BROWSERS.FIREFOX,e.Browser.version=parseFloat(n.substring(n.indexOf("Firefox")+8))):n.indexOf("Safari")>=0?(e.Browser.vendor=n.indexOf("Chrome")>=0?e.BROWSERS.CHROME:e.BROWSERS.SAFARI,e.Browser.version=parseFloat(n.substring(n.substring(0,n.indexOf("Safari")).lastIndexOf("/")+1,n.indexOf("Safari")))):(t=new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})"),null!==t.exec(n)&&(e.Browser.vendor=e.BROWSERS.IE,e.Browser.version=parseFloat(RegExp.$1))));break;case"Opera":e.Browser.vendor=e.BROWSERS.OPERA,e.Browser.version=parseFloat(i);break}var o,s,a,l=window.location.search.substring(1),c=l.split("&");for(a=0;a0){var u=o.substring(0,s),h=o.substring(s+1);try{r[u]=decodeURIComponent(h)}catch(d){e.console.error("Ignoring malformed URL parameter: %s=%s",u,h)}}e.Browser.alpha=!(e.Browser.vendor===e.BROWSERS.CHROME&&e.Browser.version<2),e.Browser.opacity=!0,e.Browser.vendor===e.BROWSERS.IE&&e.Browser.version<11&&e.console.error("Internet Explorer versions < 11 are not supported by OpenSeadragon")})(),function(t){var i=t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame,n=t.cancelAnimationFrame||t.mozCancelAnimationFrame||t.webkitCancelAnimationFrame||t.msCancelAnimationFrame;if(i&&n)e.requestAnimationFrame=function(){return i.apply(t,arguments)},e.cancelAnimationFrame=function(){return n.apply(t,arguments)};else{var r,o=[],s=[],a=0;e.requestAnimationFrame=function(t){return o.push([++a,t]),r||(r=setInterval((function(){if(o.length){var t=e.now(),i=s;s=o,o=i;while(s.length)s.shift()[1](t)}else clearInterval(r),r=void 0}),20)),a},e.cancelAnimationFrame=function(e){var t,i;for(t=0,i=o.length;t0){for(s=[],o=r.asArray(),n=0;ni.touches.length-s&&e.console.warn("Tracked touch contact count doesn't match event.touches.length");var l={originalEvent:i,eventType:"pointerdown",pointerType:"touch",isEmulated:!1};for(J(t,l),r=0;r8||"onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll",e.MouseTracker.subscribeEvents=["click","dblclick","keydown","keyup","keypress","focus","blur","contextmenu",e.MouseTracker.wheelEventName],"DOMMouseScroll"===e.MouseTracker.wheelEventName&&e.MouseTracker.subscribeEvents.push("MozMousePixelScroll"),window.PointerEvent?(e.MouseTracker.havePointerEvents=!0,e.MouseTracker.subscribeEvents.push("pointerenter","pointerleave","pointerover","pointerout","pointerdown","pointerup","pointermove","pointercancel"),e.MouseTracker.havePointerCapture=function(){var t=document.createElement("div");return e.isFunction(t.setPointerCapture)&&e.isFunction(t.releasePointerCapture)}(),e.MouseTracker.havePointerCapture&&e.MouseTracker.subscribeEvents.push("gotpointercapture","lostpointercapture")):(e.MouseTracker.havePointerEvents=!1,e.MouseTracker.subscribeEvents.push("mouseenter","mouseleave","mouseover","mouseout","mousedown","mouseup","mousemove"),e.MouseTracker.mousePointerId="legacy-mouse",e.MouseTracker.havePointerCapture=function(){var t=document.createElement("div");return e.isFunction(t.setCapture)&&e.isFunction(t.releaseCapture)}(),e.MouseTracker.havePointerCapture&&e.MouseTracker.subscribeEvents.push("losecapture"),"ontouchstart"in window&&e.MouseTracker.subscribeEvents.push("touchstart","touchend","touchmove","touchcancel"),"ongesturestart"in window&&e.MouseTracker.subscribeEvents.push("gesturestart","gesturechange")),e.MouseTracker.GesturePointList=function(e){this._gPoints=[],this.type=e,this.buttons=0,this.contacts=0,this.clicks=0,this.captureCount=0},e.MouseTracker.GesturePointList.prototype={getLength:function(){return this._gPoints.length},asArray:function(){return this._gPoints},add:function(e){return this._gPoints.push(e)},removeById:function(e){var t,i=this._gPoints.length;for(t=0;t1&&("mouse"===this.type||"pen"===this.type)&&(e.console.warn("GesturePointList.addContact() Implausible contacts value"),this.contacts=1)},removeContact:function(){--this.contacts,this.contacts<0&&(this.contacts=0)}}}(s),function(e){e.ControlAnchor={NONE:0,TOP_LEFT:1,TOP_RIGHT:2,BOTTOM_RIGHT:3,BOTTOM_LEFT:4,ABSOLUTE:5},e.Control=function(t,i,n){var r=t.parentNode;"number"===typeof i&&(e.console.error("Passing an anchor directly into the OpenSeadragon.Control constructor is deprecated; please use an options object instead. Support for this deprecated variant is scheduled for removal in December 2013"),i={anchor:i}),i.attachToViewer="undefined"===typeof i.attachToViewer||i.attachToViewer,this.autoFade="undefined"===typeof i.autoFade||i.autoFade,this.element=t,this.anchor=i.anchor,this.container=n,this.anchor===e.ControlAnchor.ABSOLUTE?(this.wrapper=e.makeNeutralElement("div"),this.wrapper.style.position="absolute",this.wrapper.style.top="number"===typeof i.top?i.top+"px":i.top,this.wrapper.style.left="number"===typeof i.left?i.left+"px":i.left,this.wrapper.style.height="number"===typeof i.height?i.height+"px":i.height,this.wrapper.style.width="number"===typeof i.width?i.width+"px":i.width,this.wrapper.style.margin="0px",this.wrapper.style.padding="0px",this.element.style.position="relative",this.element.style.top="0px",this.element.style.left="0px",this.element.style.height="100%",this.element.style.width="100%"):(this.wrapper=e.makeNeutralElement("div"),this.wrapper.style.display="inline-block",this.anchor===e.ControlAnchor.NONE&&(this.wrapper.style.width=this.wrapper.style.height="100%")),this.wrapper.appendChild(this.element),i.attachToViewer?this.anchor===e.ControlAnchor.TOP_RIGHT||this.anchor===e.ControlAnchor.BOTTOM_RIGHT?this.container.insertBefore(this.wrapper,this.container.firstChild):this.container.appendChild(this.wrapper):r.appendChild(this.wrapper)},e.Control.prototype={destroy:function(){this.wrapper.removeChild(this.element),this.anchor!==e.ControlAnchor.NONE&&this.container.removeChild(this.wrapper)},isVisible:function(){return"none"!==this.wrapper.style.display},setVisible:function(t){this.wrapper.style.display=t?this.anchor===e.ControlAnchor.ABSOLUTE?"block":"inline-block":"none"},setOpacity:function(t){this.element[e.SIGNAL]&&e.Browser.vendor===e.BROWSERS.IE?e.setElementOpacity(this.element,t,!0):e.setElementOpacity(this.wrapper,t,!0)}}}(s),function(e){function t(e,t){var i,n=e.controls;for(i=n.length-1;i>=0;i--)if(n[i].element===t)return i;return-1}e.ControlDock=function(t){var i,n,r=["topleft","topright","bottomright","bottomleft"];for(e.extend(!0,this,{id:"controldock-"+e.now()+"-"+Math.floor(1e6*Math.random()),container:e.makeNeutralElement("div"),controls:[]},t),this.container.onsubmit=function(){return!1},this.element&&(this.element=e.getElement(this.element),this.element.appendChild(this.container),this.element.style.position="relative",this.container.style.width="100%",this.container.style.height="100%"),n=0;n=0)){switch(n.anchor){case e.ControlAnchor.TOP_RIGHT:r=this.controls.topright,i.style.position="relative",i.style.paddingRight="0px",i.style.paddingTop="0px";break;case e.ControlAnchor.BOTTOM_RIGHT:r=this.controls.bottomright,i.style.position="relative",i.style.paddingRight="0px",i.style.paddingBottom="0px";break;case e.ControlAnchor.BOTTOM_LEFT:r=this.controls.bottomleft,i.style.position="relative",i.style.paddingLeft="0px",i.style.paddingBottom="0px";break;case e.ControlAnchor.TOP_LEFT:r=this.controls.topleft,i.style.position="relative",i.style.paddingLeft="0px",i.style.paddingTop="0px";break;case e.ControlAnchor.ABSOLUTE:r=this.container,i.style.margin="0px",i.style.padding="0px";break;default:case e.ControlAnchor.NONE:r=this.container,i.style.margin="0px",i.style.padding="0px";break}this.controls.push(new e.Control(i,n,r)),i.style.display="inline-block"}},removeControl:function(i){i=e.getElement(i);var n=t(this,i);return n>=0&&(this.controls[n].destroy(),this.controls.splice(n,1)),this},clearControls:function(){while(this.controls.length>0)this.controls.pop().destroy();return this},areControlsEnabled:function(){var e;for(e=this.controls.length-1;e>=0;e--)if(this.controls[e].isVisible())return!0;return!1},setControlsEnabled:function(e){var t;for(t=this.controls.length-1;t>=0;t--)this.controls[t].setVisible(e);return this}}}(s),function(e){e.Placement=e.freezeObject({CENTER:0,TOP_LEFT:1,TOP:2,TOP_RIGHT:3,RIGHT:4,BOTTOM_RIGHT:5,BOTTOM:6,BOTTOM_LEFT:7,LEFT:8,properties:{0:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!1,isVerticallyCentered:!0,isBottom:!1},1:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!0,isVerticallyCentered:!1,isBottom:!1},2:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!0,isVerticallyCentered:!1,isBottom:!1},3:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!0,isVerticallyCentered:!1,isBottom:!1},4:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!1,isVerticallyCentered:!0,isBottom:!1},5:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!1,isVerticallyCentered:!1,isBottom:!0},6:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!1,isVerticallyCentered:!1,isBottom:!0},7:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!1,isVerticallyCentered:!1,isBottom:!0},8:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!1,isVerticallyCentered:!0,isBottom:!1}}})}(s),function(e){var t={},i=1;function n(t){return t=e.getElement(t),new e.Point(0===t.clientWidth?1:t.clientWidth,0===t.clientHeight?1:t.clientHeight)}function r(t,i,n,r,o){var s=t;if("string"===e.type(i))if(i.match(/^\s*<.*>\s*$/))i=e.parseXml(i);else if(i.match(/^\s*[{[].*[}\]]\s*$/))try{var a=e.parseJSON(i);i=a}catch(c){}function l(e,t){e.ready?r(e):(e.addHandler("ready",(function(){r(e)})),e.addHandler("open-failed",(function(e){o({message:e.message,source:t})})))}setTimeout((function(){if("string"===e.type(i))i=new e.TileSource({url:i,crossOriginPolicy:void 0!==n.crossOriginPolicy?n.crossOriginPolicy:t.crossOriginPolicy,ajaxWithCredentials:t.ajaxWithCredentials,ajaxHeaders:n.ajaxHeaders?n.ajaxHeaders:t.ajaxHeaders,splitHashDataForPost:t.splitHashDataForPost,useCanvas:t.useCanvas,success:function(e){r(e.tileSource)}}),i.addHandler("open-failed",(function(e){o(e)}));else if(e.isPlainObject(i)||i.nodeType)if(void 0!==i.crossOriginPolicy||void 0===n.crossOriginPolicy&&void 0===t.crossOriginPolicy||(i.crossOriginPolicy=void 0!==n.crossOriginPolicy?n.crossOriginPolicy:t.crossOriginPolicy),void 0===i.ajaxWithCredentials&&(i.ajaxWithCredentials=t.ajaxWithCredentials),void 0===i.useCanvas&&(i.useCanvas=t.useCanvas),e.isFunction(i.getTileUrl)){var a=new e.TileSource(i);a.getTileUrl=i.getTileUrl,r(a)}else{var c=e.TileSource.determineType(s,i);if(!c)return void o({message:"Unable to load TileSource",source:i});var u=c.prototype.configure.apply(s,[i]);l(new c(u),i)}else l(i,i)}))}function o(t,i){if(i instanceof e.Overlay)return i;var n=null;if(i.element)n=e.getElement(i.element);else{var r=i.id?i.id:"openseadragon-overlay-"+Math.floor(1e7*Math.random());n=e.getElement(i.id),n||(n=document.createElement("a"),n.href="#/overlay/"+r),n.id=r,e.addClass(n,i.className?i.className:"openseadragon-overlay")}var o=i.location,s=i.width,a=i.height;if(!o){var l=i.x,c=i.y;if(void 0!==i.px){var u=t.viewport.imageToViewportRectangle(new e.Rect(i.px,i.py,s||0,a||0));l=u.x,c=u.y,s=void 0!==s?u.width:void 0,a=void 0!==a?u.height:void 0}o=new e.Point(l,c)}var h=i.placement;return h&&"string"===e.type(h)&&(h=e.Placement[i.placement.toUpperCase()]),new e.Overlay({element:n,location:o,placement:h,onDraw:i.onDraw,checkResize:i.checkResize,width:s,height:a,rotationMode:i.rotationMode})}function s(e,t){var i;for(i=e.length-1;i>=0;i--)if(e[i].element===t)return i;return-1}function a(t,i){return e.requestAnimationFrame((function(){i(t)}))}function l(t){e.requestAnimationFrame((function(){u(t)}))}function c(t){t.autoHideControls&&(t.controlsShouldFade=!0,t.controlsFadeBeginTime=e.now()+t.controlsFadeDelay,window.setTimeout((function(){l(t)}),t.controlsFadeDelay))}function u(t){var i,n,r,o;if(t.controlsShouldFade){for(i=e.now(),n=i-t.controlsFadeBeginTime,r=1-n/t.controlsFadeLength,r=Math.min(1,r),r=Math.max(0,r),o=t.controls.length-1;o>=0;o--)t.controls[o].autoFade&&t.controls[o].setOpacity(r);r>0&&l(t)}}function h(e){var t;for(e.controlsShouldFade=!1,t=e.controls.length-1;t>=0;t--)e.controls[t].setOpacity(1)}function d(){h(this)}function p(){c(this)}function f(e){var t={tracker:e.eventSource,position:e.position,originalEvent:e.originalEvent,preventDefault:e.preventDefault};this.raiseEvent("canvas-contextmenu",t),e.preventDefault=t.preventDefault}function v(t){var i={originalEvent:t.originalEvent,preventDefaultAction:!1,preventVerticalPan:t.preventVerticalPan||!this.panVertical,preventHorizontalPan:t.preventHorizontalPan||!this.panHorizontal};if(this.raiseEvent("canvas-key",i),i.preventDefaultAction||t.ctrl||t.alt||t.meta)t.preventDefault=!1;else switch(t.keyCode){case 38:i.preventVerticalPan||(t.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,-this.pixelsPerArrowPress))),this.viewport.applyConstraints()),t.preventDefault=!0;break;case 40:i.preventVerticalPan||(t.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,this.pixelsPerArrowPress))),this.viewport.applyConstraints()),t.preventDefault=!0;break;case 37:i.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(-this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),t.preventDefault=!0;break;case 39:i.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),t.preventDefault=!0;break;default:t.preventDefault=!1;break}}function g(t){var i={originalEvent:t.originalEvent,preventDefaultAction:!1,preventVerticalPan:t.preventVerticalPan||!this.panVertical,preventHorizontalPan:t.preventHorizontalPan||!this.panHorizontal};if(this.raiseEvent("canvas-key",i),i.preventDefaultAction||t.ctrl||t.alt||t.meta)t.preventDefault=!1;else switch(t.keyCode){case 43:case 61:this.viewport.zoomBy(1.1),this.viewport.applyConstraints(),t.preventDefault=!0;break;case 45:this.viewport.zoomBy(.9),this.viewport.applyConstraints(),t.preventDefault=!0;break;case 48:this.viewport.goHome(),this.viewport.applyConstraints(),t.preventDefault=!0;break;case 119:case 87:i.preventVerticalPan||(t.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,-40))),this.viewport.applyConstraints()),t.preventDefault=!0;break;case 115:case 83:i.preventVerticalPan||(t.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,40))),this.viewport.applyConstraints()),t.preventDefault=!0;break;case 97:i.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(-40,0))),this.viewport.applyConstraints()),t.preventDefault=!0;break;case 100:i.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(40,0))),this.viewport.applyConstraints()),t.preventDefault=!0;break;case 114:this.viewport.flipped?this.viewport.setRotation(e.positiveModulo(this.viewport.degrees-this.rotationIncrement,360)):this.viewport.setRotation(e.positiveModulo(this.viewport.degrees+this.rotationIncrement,360)),this.viewport.applyConstraints(),t.preventDefault=!0;break;case 82:this.viewport.flipped?this.viewport.setRotation(e.positiveModulo(this.viewport.degrees+this.rotationIncrement,360)):this.viewport.setRotation(e.positiveModulo(this.viewport.degrees-this.rotationIncrement,360)),this.viewport.applyConstraints(),t.preventDefault=!0;break;case 102:this.viewport.toggleFlip(),t.preventDefault=!0;break;case 106:this.goToPreviousPage();break;case 107:this.goToNextPage();break;default:t.preventDefault=!1;break}}function m(e){var t,i=document.activeElement===this.canvas;i||this.canvas.focus(),this.viewport.flipped&&(e.position.x=this.viewport.getContainerSize().x-e.position.x);var n={tracker:e.eventSource,position:e.position,quick:e.quick,shift:e.shift,originalEvent:e.originalEvent,originalTarget:e.originalTarget,preventDefaultAction:!1};this.raiseEvent("canvas-click",n),!n.preventDefaultAction&&this.viewport&&e.quick&&(t=this.gestureSettingsByDeviceType(e.pointerType),t.clickToZoom&&(this.viewport.zoomBy(e.shift?1/this.zoomPerClick:this.zoomPerClick,t.zoomToRefPoint?this.viewport.pointFromPixel(e.position,!0):null),this.viewport.applyConstraints()))}function y(e){var t,i={tracker:e.eventSource,position:e.position,shift:e.shift,originalEvent:e.originalEvent,preventDefaultAction:!1};this.raiseEvent("canvas-double-click",i),!i.preventDefaultAction&&this.viewport&&(t=this.gestureSettingsByDeviceType(e.pointerType),t.dblClickToZoom&&(this.viewport.zoomBy(e.shift?1/this.zoomPerClick:this.zoomPerClick,t.zoomToRefPoint?this.viewport.pointFromPixel(e.position,!0):null),this.viewport.applyConstraints()))}function w(e){var t,i={tracker:e.eventSource,pointerType:e.pointerType,position:e.position,delta:e.delta,speed:e.speed,direction:e.direction,shift:e.shift,originalEvent:e.originalEvent,preventDefaultAction:!1};if(this.raiseEvent("canvas-drag",i),t=this.gestureSettingsByDeviceType(e.pointerType),t.dragToPan&&!i.preventDefaultAction&&this.viewport){if(this.panHorizontal||(e.delta.x=0),this.panVertical||(e.delta.y=0),this.viewport.flipped&&(e.delta.x=-e.delta.x),this.constrainDuringPan){var n=this.viewport.deltaPointsFromPixels(e.delta.negate());this.viewport.centerSpringX.target.value+=n.x,this.viewport.centerSpringY.target.value+=n.y;var r=this.viewport.getBounds(),o=this.viewport.getConstrainedBounds();this.viewport.centerSpringX.target.value-=n.x,this.viewport.centerSpringY.target.value-=n.y,r.x!==o.x&&(e.delta.x=0),r.y!==o.y&&(e.delta.y=0)}this.viewport.panBy(this.viewport.deltaPointsFromPixels(e.delta.negate()),t.flickEnabled&&!this.constrainDuringPan)}}function x(t){var i={tracker:t.eventSource,pointerType:t.pointerType,position:t.position,speed:t.speed,direction:t.direction,shift:t.shift,originalEvent:t.originalEvent,preventDefaultAction:!1};if(this.raiseEvent("canvas-drag-end",i),!i.preventDefaultAction&&this.viewport){var n=this.gestureSettingsByDeviceType(t.pointerType);if(n.flickEnabled&&t.speed>=n.flickMinSpeed){var r=0;this.panHorizontal&&(r=n.flickMomentum*t.speed*Math.cos(t.direction));var o=0;this.panVertical&&(o=n.flickMomentum*t.speed*Math.sin(t.direction));var s=this.viewport.pixelFromPoint(this.viewport.getCenter(!0)),a=this.viewport.pointFromPixel(new e.Point(s.x-r,s.y-o));this.viewport.panTo(a,!1)}this.viewport.applyConstraints()}}function b(e){this.raiseEvent("canvas-enter",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,buttons:e.buttons,pointers:e.pointers,insideElementPressed:e.insideElementPressed,buttonDownAny:e.buttonDownAny,originalEvent:e.originalEvent})}function _(e){this.raiseEvent("canvas-exit",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,buttons:e.buttons,pointers:e.pointers,insideElementPressed:e.insideElementPressed,buttonDownAny:e.buttonDownAny,originalEvent:e.originalEvent})}function T(e){this.raiseEvent("canvas-press",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,insideElementPressed:e.insideElementPressed,insideElementReleased:e.insideElementReleased,originalEvent:e.originalEvent})}function S(e){this.raiseEvent("canvas-release",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,insideElementPressed:e.insideElementPressed,insideElementReleased:e.insideElementReleased,originalEvent:e.originalEvent})}function E(e){this.raiseEvent("canvas-nonprimary-press",{tracker:e.eventSource,position:e.position,pointerType:e.pointerType,button:e.button,buttons:e.buttons,originalEvent:e.originalEvent})}function P(e){this.raiseEvent("canvas-nonprimary-release",{tracker:e.eventSource,position:e.position,pointerType:e.pointerType,button:e.button,buttons:e.buttons,originalEvent:e.originalEvent})}function C(e){var t,i,n,r,o={tracker:e.eventSource,pointerType:e.pointerType,gesturePoints:e.gesturePoints,lastCenter:e.lastCenter,center:e.center,lastDistance:e.lastDistance,distance:e.distance,shift:e.shift,originalEvent:e.originalEvent,preventDefaultPanAction:!1,preventDefaultZoomAction:!1,preventDefaultRotateAction:!1};if(this.raiseEvent("canvas-pinch",o),this.viewport&&(t=this.gestureSettingsByDeviceType(e.pointerType),!t.pinchToZoom||o.preventDefaultPanAction&&o.preventDefaultZoomAction||(i=this.viewport.pointFromPixel(e.center,!0),t.zoomToRefPoint&&!o.preventDefaultPanAction&&(n=this.viewport.pointFromPixel(e.lastCenter,!0),r=n.minus(i),this.panHorizontal||(r.x=0),this.panVertical||(r.y=0),this.viewport.panBy(r,!0)),o.preventDefaultZoomAction||this.viewport.zoomBy(e.distance/e.lastDistance,i,!0),this.viewport.applyConstraints()),t.pinchRotate&&!o.preventDefaultRotateAction)){var s=Math.atan2(e.gesturePoints[0].currentPos.y-e.gesturePoints[1].currentPos.y,e.gesturePoints[0].currentPos.x-e.gesturePoints[1].currentPos.x),a=Math.atan2(e.gesturePoints[0].lastPos.y-e.gesturePoints[1].lastPos.y,e.gesturePoints[0].lastPos.x-e.gesturePoints[1].lastPos.x);this.viewport.setRotation(this.viewport.getRotation()+(s-a)*(180/Math.PI))}}function R(t){var i,n,r,o,s;o=e.now(),s=o-this._lastScrollTime,s>this.minScrollDeltaTime?(this._lastScrollTime=o,i={tracker:t.eventSource,position:t.position,scroll:t.scroll,shift:t.shift,originalEvent:t.originalEvent,preventDefaultAction:!1,preventDefault:!0},this.raiseEvent("canvas-scroll",i),!i.preventDefaultAction&&this.viewport&&(this.viewport.flipped&&(t.position.x=this.viewport.getContainerSize().x-t.position.x),n=this.gestureSettingsByDeviceType(t.pointerType),n.scrollToZoom&&(r=Math.pow(this.zoomPerScroll,t.scroll),this.viewport.zoomBy(r,n.zoomToRefPoint?this.viewport.pointFromPixel(t.position,!0):null),this.viewport.applyConstraints())),t.preventDefault=i.preventDefault):t.preventDefault=!0}function k(e){t[this.hash].mouseInside=!0,h(this),this.raiseEvent("container-enter",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,buttons:e.buttons,pointers:e.pointers,insideElementPressed:e.insideElementPressed,buttonDownAny:e.buttonDownAny,originalEvent:e.originalEvent})}function O(e){e.pointers<1&&(t[this.hash].mouseInside=!1,t[this.hash].animating||c(this)),this.raiseEvent("container-exit",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,buttons:e.buttons,pointers:e.pointers,insideElementPressed:e.insideElementPressed,buttonDownAny:e.buttonDownAny,originalEvent:e.originalEvent})}function I(e){D(e),e.isOpen()?e._updateRequestId=a(e,I):e._updateRequestId=!1}function D(e){if(!e._opening&&t[e.hash]){if(e.autoResize){var i=n(e.container),r=t[e.hash].prevContainerSize;if(!i.equals(r)){var o=e.viewport;if(e.preserveImageSizeOnResize){var s=r.x/i.x,a=o.getZoom()*s,l=o.getCenter();o.resize(i,!1),o.zoomTo(a,null,!0),o.panTo(l,!0)}else{var u=o.getBounds();o.resize(i,!0),o.fitBoundsWithConstraints(u,!0)}t[e.hash].prevContainerSize=i,t[e.hash].forceRedraw=!0}}var d=e.viewport.update(),p=e.world.update()||d;d&&e.raiseEvent("viewport-change"),e.referenceStrip&&(p=e.referenceStrip.update(e.viewport)||p);var f=t[e.hash].animating;!f&&p&&(e.raiseEvent("animation-start"),h(e));var v=f&&!p;v&&(t[e.hash].animating=!1),(p||v||t[e.hash].forceRedraw||e.world.needsDraw())&&(A(e),e._drawOverlays(),e.navigator&&e.navigator.update(e.viewport),t[e.hash].forceRedraw=!1,p&&e.raiseEvent("animation")),v&&(e.raiseEvent("animation-finish"),t[e.hash].mouseInside||c(e)),t[e.hash].animating=p}}function A(e){e.imageLoader.clear(),e.drawer.clear(),e.world.draw(),e.raiseEvent("update-viewport",{})}function L(e,t){return e?e+t:t}function H(){t[this.hash].lastZoomTime=e.now(),t[this.hash].zoomFactor=this.zoomPerSecond,t[this.hash].zooming=!0,F(this)}function M(){t[this.hash].lastZoomTime=e.now(),t[this.hash].zoomFactor=1/this.zoomPerSecond,t[this.hash].zooming=!0,F(this)}function B(){t[this.hash].zooming=!1}function F(t){e.requestAnimationFrame(e.delegate(t,$))}function $(){var i,n,r;t[this.hash].zooming&&this.viewport&&(i=e.now(),n=i-t[this.hash].lastZoomTime,r=Math.pow(t[this.hash].zoomFactor,n/1e3),this.viewport.zoomBy(r),this.viewport.applyConstraints(),t[this.hash].lastZoomTime=i,F(this))}function N(){this.viewport&&(t[this.hash].zooming=!1,this.viewport.zoomBy(this.zoomPerClick/1),this.viewport.applyConstraints())}function z(){this.viewport&&(t[this.hash].zooming=!1,this.viewport.zoomBy(1/this.zoomPerClick),this.viewport.applyConstraints())}function V(){this.buttonGroup&&(this.buttonGroup.emulateEnter(),this.buttonGroup.emulateLeave())}function U(){this.viewport&&this.viewport.goHome()}function j(){this.isFullPage()&&!e.isFullScreen()?this.setFullPage(!1):this.setFullScreen(!this.isFullPage()),this.buttonGroup&&this.buttonGroup.emulateLeave(),this.fullPageButton.element.focus(),this.viewport&&this.viewport.applyConstraints()}function W(){if(this.viewport){var t=this.viewport.getRotation();t=this.viewport.flipped?e.positiveModulo(t+this.rotationIncrement,360):e.positiveModulo(t-this.rotationIncrement,360),this.viewport.setRotation(t)}}function G(){if(this.viewport){var t=this.viewport.getRotation();t=this.viewport.flipped?e.positiveModulo(t-this.rotationIncrement,360):e.positiveModulo(t+this.rotationIncrement,360),this.viewport.setRotation(t)}}function q(){this.viewport.toggleFlip()}e.Viewer=function(r){var o,s=arguments,l=this;if(e.isPlainObject(r)||(r={id:s[0],xmlPath:s.length>1?s[1]:void 0,prefixUrl:s.length>2?s[2]:void 0,controls:s.length>3?s[3]:void 0,overlays:s.length>4?s[4]:void 0}),r.config&&(e.extend(!0,r,r.config),delete r.config),e.extend(!0,this,{id:r.id,hash:r.hash||i++,initialPage:0,element:null,container:null,canvas:null,overlays:[],overlaysContainer:null,previousBody:[],customControls:[],source:null,drawer:null,world:null,viewport:null,navigator:null,collectionViewport:null,collectionDrawer:null,navImages:null,buttons:null,profiler:null},e.DEFAULT_SETTINGS,r),"undefined"===typeof this.hash)throw new Error("A hash must be defined, either by specifying options.id or options.hash.");for("undefined"!==typeof t[this.hash]&&e.console.warn("Hash "+this.hash+" has already been used."),t[this.hash]={fsBoundsDelta:new e.Point(1,1),prevContainerSize:null,animating:!1,forceRedraw:!1,mouseInside:!1,group:null,zooming:!1,zoomFactor:null,lastZoomTime:null,fullPage:!1,onfullscreenchange:null},this._sequenceIndex=0,this._firstOpen=!0,this._updateRequestId=null,this._loadQueue=[],this.currentOverlays=[],this._updatePixelDensityRatioBind=null,this._lastScrollTime=e.now(),e.EventSource.call(this),this.addHandler("open-failed",(function(t){var i=e.getString("Errors.OpenFailed",t.eventSource,t.message);l._showMessage(i)})),e.ControlDock.call(this,r),this.xmlPath&&(this.tileSources=[this.xmlPath]),this.element=this.element||document.getElementById(this.id),this.canvas=e.makeNeutralElement("div"),this.canvas.className="openseadragon-canvas",function(e){e.width="100%",e.height="100%",e.overflow="hidden",e.position="absolute",e.top="0px",e.left="0px"}(this.canvas.style),e.setElementTouchActionNone(this.canvas),""!==r.tabIndex&&(this.canvas.tabIndex=void 0===r.tabIndex?0:r.tabIndex),this.container.className="openseadragon-container",function(e){e.width="100%",e.height="100%",e.position="relative",e.overflow="hidden",e.left="0px",e.top="0px",e.textAlign="left"}(this.container.style),e.setElementTouchActionNone(this.container),this.container.insertBefore(this.canvas,this.container.firstChild),this.element.appendChild(this.container),this.bodyWidth=document.body.style.width,this.bodyHeight=document.body.style.height,this.bodyOverflow=document.body.style.overflow,this.docOverflow=document.documentElement.style.overflow,this.innerTracker=new e.MouseTracker({userData:"Viewer.innerTracker",element:this.canvas,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,contextMenuHandler:e.delegate(this,f),keyDownHandler:e.delegate(this,v),keyHandler:e.delegate(this,g),clickHandler:e.delegate(this,m),dblClickHandler:e.delegate(this,y),dragHandler:e.delegate(this,w),dragEndHandler:e.delegate(this,x),enterHandler:e.delegate(this,b),leaveHandler:e.delegate(this,_),pressHandler:e.delegate(this,T),releaseHandler:e.delegate(this,S),nonPrimaryPressHandler:e.delegate(this,E),nonPrimaryReleaseHandler:e.delegate(this,P),scrollHandler:e.delegate(this,R),pinchHandler:e.delegate(this,C)}),this.outerTracker=new e.MouseTracker({userData:"Viewer.outerTracker",element:this.container,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,enterHandler:e.delegate(this,k),leaveHandler:e.delegate(this,O)}),this.toolbar&&(this.toolbar=new e.ControlDock({element:this.toolbar})),this.bindStandardControls(),t[this.hash].prevContainerSize=n(this.container),this.world=new e.World({viewer:this}),this.world.addHandler("add-item",(function(e){l.source=l.world.getItemAt(0).source,t[l.hash].forceRedraw=!0,l._updateRequestId||(l._updateRequestId=a(l,I))})),this.world.addHandler("remove-item",(function(e){l.world.getItemCount()?l.source=l.world.getItemAt(0).source:l.source=null,t[l.hash].forceRedraw=!0})),this.world.addHandler("metrics-change",(function(e){l.viewport&&l.viewport._setContentBounds(l.world.getHomeBounds(),l.world.getContentFactor())})),this.world.addHandler("item-index-change",(function(e){l.source=l.world.getItemAt(0).source})),this.viewport=new e.Viewport({containerSize:t[this.hash].prevContainerSize,springStiffness:this.springStiffness,animationTime:this.animationTime,minZoomImageRatio:this.minZoomImageRatio,maxZoomPixelRatio:this.maxZoomPixelRatio,visibilityRatio:this.visibilityRatio,wrapHorizontal:this.wrapHorizontal,wrapVertical:this.wrapVertical,defaultZoomLevel:this.defaultZoomLevel,minZoomLevel:this.minZoomLevel,maxZoomLevel:this.maxZoomLevel,viewer:this,degrees:this.degrees,flipped:this.flipped,navigatorRotate:this.navigatorRotate,homeFillsViewer:this.homeFillsViewer,margins:this.viewportMargins,silenceMultiImageWarnings:this.silenceMultiImageWarnings}),this.viewport._setContentBounds(this.world.getHomeBounds(),this.world.getContentFactor()),this.imageLoader=new e.ImageLoader({jobLimit:this.imageLoaderLimit,timeout:r.timeout}),this.tileCache=new e.TileCache({maxImageCacheCount:this.maxImageCacheCount}),this.drawer=new e.Drawer({viewer:this,viewport:this.viewport,element:this.canvas,debugGridColor:this.debugGridColor}),this.overlaysContainer=e.makeNeutralElement("div"),this.canvas.appendChild(this.overlaysContainer),this.drawer.canRotate()||(this.rotateLeft&&(o=this.buttonGroup.buttons.indexOf(this.rotateLeft),this.buttonGroup.buttons.splice(o,1),this.buttonGroup.element.removeChild(this.rotateLeft.element)),this.rotateRight&&(o=this.buttonGroup.buttons.indexOf(this.rotateRight),this.buttonGroup.buttons.splice(o,1),this.buttonGroup.element.removeChild(this.rotateRight.element))),this._addUpdatePixelDensityRatioEvent(),this.showNavigator&&(this.navigator=new e.Navigator({id:this.navigatorId,position:this.navigatorPosition,sizeRatio:this.navigatorSizeRatio,maintainSizeRatio:this.navigatorMaintainSizeRatio,top:this.navigatorTop,left:this.navigatorLeft,width:this.navigatorWidth,height:this.navigatorHeight,autoResize:this.navigatorAutoResize,autoFade:this.navigatorAutoFade,prefixUrl:this.prefixUrl,viewer:this,navigatorRotate:this.navigatorRotate,background:this.navigatorBackground,opacity:this.navigatorOpacity,borderColor:this.navigatorBorderColor,displayRegionColor:this.navigatorDisplayRegionColor,crossOriginPolicy:this.crossOriginPolicy})),this.sequenceMode&&this.bindSequenceControls(),this.tileSources&&this.open(this.tileSources),o=0;o-1&&t.index=0&&e=0)return this;var l=o(this,a);return this.currentOverlays.push(l),l.drawHTML(this.overlaysContainer,this.viewport),this.raiseEvent("add-overlay",{element:t,location:a.location,placement:a.placement}),this},updateOverlay:function(i,n,r){var o;return i=e.getElement(i),o=s(this.currentOverlays,i),o>=0&&(this.currentOverlays[o].update(n,r),t[this.hash].forceRedraw=!0,this.raiseEvent("update-overlay",{element:i,location:n,placement:r})),this},removeOverlay:function(i){var n;return i=e.getElement(i),n=s(this.currentOverlays,i),n>=0&&(this.currentOverlays[n].destroy(),this.currentOverlays.splice(n,1),t[this.hash].forceRedraw=!0,this.raiseEvent("remove-overlay",{element:i})),this},clearOverlays:function(){while(this.currentOverlays.length>0)this.currentOverlays.pop().destroy();return t[this.hash].forceRedraw=!0,this.raiseEvent("clear-overlay",{}),this},getOverlayById:function(t){var i;return t=e.getElement(t),i=s(this.currentOverlays,t),i>=0?this.currentOverlays[i]:null},_updateSequenceButtons:function(e){this.nextButton&&(this.tileSources&&this.tileSources.length-1!==e?this.nextButton.enable():this.navPrevNextWrap||this.nextButton.disable()),this.previousButton&&(e>0?this.previousButton.enable():this.navPrevNextWrap||this.previousButton.disable())},_showMessage:function(t){this._hideMessage();var i=e.makeNeutralElement("div");i.appendChild(document.createTextNode(t)),this.messageDiv=e.makeCenteredNode(i),e.addClass(this.messageDiv,"openseadragon-message"),this.container.appendChild(this.messageDiv)},_hideMessage:function(){var e=this.messageDiv;e&&(e.parentNode.removeChild(e),delete this.messageDiv)},gestureSettingsByDeviceType:function(e){switch(e){case"mouse":return this.gestureSettingsMouse;case"touch":return this.gestureSettingsTouch;case"pen":return this.gestureSettingsPen;default:return this.gestureSettingsUnknown}},_drawOverlays:function(){var e,t=this.currentOverlays.length;for(e=0;e1&&(this.referenceStrip=new e.ReferenceStrip({id:this.referenceStripElement,position:this.referenceStripPosition,sizeRatio:this.referenceStripSizeRatio,scroll:this.referenceStripScroll,height:this.referenceStripHeight,width:this.referenceStripWidth,tileSources:this.tileSources,prefixUrl:this.prefixUrl,useCanvas:this.useCanvas,viewer:this}),this.referenceStrip.setFocus(this._sequenceIndex))}else e.console.warn('Attempting to display a reference strip while "sequenceMode" is off.')},_addUpdatePixelDensityRatioEvent:function(){this._updatePixelDensityRatioBind=this._updatePixelDensityRatio.bind(this),e.addEvent(window,"resize",this._updatePixelDensityRatioBind)},_removeUpdatePixelDensityRatioEvent:function(){e.removeEvent(window,"resize",this._updatePixelDensityRatioBind)},_updatePixelDensityRatio:function(){var t=e.pixelDensityRatio,i=e.getCurrentPixelDensityRatio();t!==i&&(e.pixelDensityRatio=i,this.world.resetItems(),this.forceRedraw())},goToPreviousPage:function(){var e=this._sequenceIndex-1;this.navPrevNextWrap&&e<0&&(e+=this.tileSources.length),this.goToPage(e)},goToNextPage:function(){var e=this._sequenceIndex+1;this.navPrevNextWrap&&e>=this.tileSources.length&&(e=0),this.goToPage(e)},isAnimating:function(){return t[this.hash].animating}})}(s),function(e){function t(e){var t={tracker:e.eventSource,position:e.position,quick:e.quick,shift:e.shift,originalEvent:e.originalEvent,preventDefaultAction:!1};if(this.viewer.raiseEvent("navigator-click",t),!t.preventDefaultAction&&e.quick&&this.viewer.viewport&&(this.panVertical||this.panHorizontal)){this.viewer.viewport.flipped&&(e.position.x=this.viewport.getContainerSize().x-e.position.x);var i=this.viewport.pointFromPixel(e.position);this.panVertical?this.panHorizontal||(i.x=this.viewer.viewport.getCenter(!0).x):i.y=this.viewer.viewport.getCenter(!0).y,this.viewer.viewport.panTo(i),this.viewer.viewport.applyConstraints()}}function i(e){var t={tracker:e.eventSource,position:e.position,delta:e.delta,speed:e.speed,direction:e.direction,shift:e.shift,originalEvent:e.originalEvent,preventDefaultAction:!1};this.viewer.raiseEvent("navigator-drag",t),!t.preventDefaultAction&&this.viewer.viewport&&(this.panHorizontal||(e.delta.x=0),this.panVertical||(e.delta.y=0),this.viewer.viewport.flipped&&(e.delta.x=-e.delta.x),this.viewer.viewport.panBy(this.viewport.deltaPointsFromPixels(e.delta)),this.viewer.constrainDuringPan&&this.viewer.viewport.applyConstraints())}function n(e){e.insideElementPressed&&this.viewer.viewport&&this.viewer.viewport.applyConstraints()}function r(e){var t={tracker:e.eventSource,position:e.position,scroll:e.scroll,shift:e.shift,originalEvent:e.originalEvent,preventDefault:e.preventDefault};this.viewer.raiseEvent("navigator-scroll",t),e.preventDefault=t.preventDefault}function o(e,t){s(e,"rotate("+t+"deg)")}function s(e,t){e.style.webkitTransform=t,e.style.mozTransform=t,e.style.msTransform=t,e.style.oTransform=t,e.style.transform=t}e.Navigator=function(s){var a,l,c=s.viewer,u=this;function h(e){o(u.displayRegionContainer,e),o(u.displayRegion,-e),u.viewport.setRotation(e)}if(s.id?(this.element=document.getElementById(s.id),s.controlOptions={anchor:e.ControlAnchor.NONE,attachToViewer:!1,autoFade:!1}):(s.id="navigator-"+e.now(),this.element=e.makeNeutralElement("div"),s.controlOptions={anchor:e.ControlAnchor.TOP_RIGHT,attachToViewer:!0,autoFade:s.autoFade},s.position&&("BOTTOM_RIGHT"===s.position?s.controlOptions.anchor=e.ControlAnchor.BOTTOM_RIGHT:"BOTTOM_LEFT"===s.position?s.controlOptions.anchor=e.ControlAnchor.BOTTOM_LEFT:"TOP_RIGHT"===s.position?s.controlOptions.anchor=e.ControlAnchor.TOP_RIGHT:"TOP_LEFT"===s.position?s.controlOptions.anchor=e.ControlAnchor.TOP_LEFT:"ABSOLUTE"===s.position&&(s.controlOptions.anchor=e.ControlAnchor.ABSOLUTE,s.controlOptions.top=s.top,s.controlOptions.left=s.left,s.controlOptions.height=s.height,s.controlOptions.width=s.width))),this.element.id=s.id,this.element.className+=" navigator",s=e.extend(!0,{sizeRatio:e.DEFAULT_SETTINGS.navigatorSizeRatio},s,{element:this.element,tabIndex:-1,showNavigator:!1,mouseNavEnabled:!1,showNavigationControl:!1,showSequenceControl:!1,immediateRender:!0,blendTime:0,animationTime:0,autoResize:s.autoResize,minZoomImageRatio:1,background:s.background,opacity:s.opacity,borderColor:s.borderColor,displayRegionColor:s.displayRegionColor}),s.minPixelRatio=this.minPixelRatio=c.minPixelRatio,e.setElementTouchActionNone(this.element),this.borderWidth=2,this.fudge=new e.Point(1,1),this.totalBorderWidths=new e.Point(2*this.borderWidth,2*this.borderWidth).minus(this.fudge),s.controlOptions.anchor!==e.ControlAnchor.NONE&&function(e,t){e.margin="0px",e.border=t+"px solid "+s.borderColor,e.padding="0px",e.background=s.background,e.opacity=s.opacity,e.overflow="hidden"}(this.element.style,this.borderWidth),this.displayRegion=e.makeNeutralElement("div"),this.displayRegion.id=this.element.id+"-displayregion",this.displayRegion.className="displayregion",function(e,t){e.position="relative",e.top="0px",e.left="0px",e.fontSize="0px",e.overflow="hidden",e.border=t+"px solid "+s.displayRegionColor,e.margin="0px",e.padding="0px",e.background="transparent",e["float"]="left",e.cssFloat="left",e.styleFloat="left",e.zIndex=999999999,e.cursor="default"}(this.displayRegion.style,this.borderWidth),e.setElementPointerEventsNone(this.displayRegion),e.setElementTouchActionNone(this.displayRegion),this.displayRegionContainer=e.makeNeutralElement("div"),this.displayRegionContainer.id=this.element.id+"-displayregioncontainer",this.displayRegionContainer.className="displayregioncontainer",this.displayRegionContainer.style.width="100%",this.displayRegionContainer.style.height="100%",e.setElementPointerEventsNone(this.displayRegionContainer),e.setElementTouchActionNone(this.displayRegionContainer),c.addControl(this.element,s.controlOptions),this._resizeWithViewer=s.controlOptions.anchor!==e.ControlAnchor.ABSOLUTE&&s.controlOptions.anchor!==e.ControlAnchor.NONE,s.width&&s.height?(this.setWidth(s.width),this.setHeight(s.height)):this._resizeWithViewer&&(a=e.getElementSize(c.element),this.element.style.height=Math.round(a.y*s.sizeRatio)+"px",this.element.style.width=Math.round(a.x*s.sizeRatio)+"px",this.oldViewerSize=a,l=e.getElementSize(this.element),this.elementArea=l.x*l.y),this.oldContainerSize=new e.Point(0,0),e.Viewer.apply(this,[s]),this.displayRegionContainer.appendChild(this.displayRegion),this.element.getElementsByTagName("div")[0].appendChild(this.displayRegionContainer),s.navigatorRotate){var d=s.viewer.viewport?s.viewer.viewport.getRotation():s.viewer.degrees||0;h(d),s.viewer.addHandler("rotate",(function(e){h(e.degrees)}))}this.innerTracker.destroy(),this.innerTracker=new e.MouseTracker({userData:"Navigator.innerTracker",element:this.element,dragHandler:e.delegate(this,i),clickHandler:e.delegate(this,t),releaseHandler:e.delegate(this,n),scrollHandler:e.delegate(this,r),preProcessEventHandler:function(e){"wheel"===e.eventType&&(e.preventDefault=!0)}}),this.outerTracker.userData="Navigator.outerTracker",e.setElementPointerEventsNone(this.canvas),e.setElementPointerEventsNone(this.container),this.addHandler("reset-size",(function(){u.viewport&&u.viewport.goHome(!0)})),c.world.addHandler("item-index-change",(function(e){window.setTimeout((function(){var t=u.world.getItemAt(e.previousIndex);u.world.setItemIndex(t,e.newIndex)}),1)})),c.world.addHandler("remove-item",(function(e){var t=e.item,i=u._getMatchingItem(t);i&&u.world.removeItem(i)})),this.update(c.viewport)},e.extend(e.Navigator.prototype,e.EventSource.prototype,e.Viewer.prototype,{updateSize:function(){if(this.viewport){var t=new e.Point(0===this.container.clientWidth?1:this.container.clientWidth,0===this.container.clientHeight?1:this.container.clientHeight);t.equals(this.oldContainerSize)||(this.viewport.resize(t,!0),this.viewport.goHome(!0),this.oldContainerSize=t,this.drawer.clear(),this.world.draw())}},setWidth:function(e){this.width=e,this.element.style.width="number"===typeof e?e+"px":e,this._resizeWithViewer=!1},setHeight:function(e){this.height=e,this.element.style.height="number"===typeof e?e+"px":e,this._resizeWithViewer=!1},setFlip:function(e){return this.viewport.setFlip(e),this.setDisplayTransform(this.viewer.viewport.getFlip()?"scale(-1,1)":"scale(1,1)"),this},setDisplayTransform:function(e){s(this.displayRegion,e),s(this.canvas,e),s(this.element,e)},update:function(t){var i,n,r,o,s,a;if(i=e.getElementSize(this.viewer.element),this._resizeWithViewer&&i.x&&i.y&&!i.equals(this.oldViewerSize)&&(this.oldViewerSize=i,this.maintainSizeRatio||!this.elementArea?(n=i.x*this.sizeRatio,r=i.y*this.sizeRatio):(n=Math.sqrt(this.elementArea*(i.x/i.y)),r=this.elementArea/n),this.element.style.width=Math.round(n)+"px",this.element.style.height=Math.round(r)+"px",this.elementArea||(this.elementArea=n*r),this.updateSize()),t&&this.viewport){o=t.getBoundsNoRotate(!0),s=this.viewport.pixelFromPointNoRotate(o.getTopLeft(),!1),a=this.viewport.pixelFromPointNoRotate(o.getBottomRight(),!1).minus(this.totalBorderWidths);var l=this.displayRegion.style;l.display=this.world.getItemCount()?"block":"none",l.top=Math.round(s.y)+"px",l.left=Math.round(s.x)+"px";var c=Math.abs(s.x-a.x),u=Math.abs(s.y-a.y);l.width=Math.round(Math.max(c,0))+"px",l.height=Math.round(Math.max(u,0))+"px"}},addTiledImage:function(t){var i=this,n=t.originalTiledImage;delete t.original;var r=e.extend({},t,{success:function(e){var t=e.item;function r(){i._matchBounds(t,n)}function o(){i._matchOpacity(t,n)}function s(){i._matchCompositeOperation(t,n)}t._originalForNavigator=n,i._matchBounds(t,n,!0),i._matchOpacity(t,n),i._matchCompositeOperation(t,n),n.addHandler("bounds-change",r),n.addHandler("clip-change",r),n.addHandler("opacity-change",o),n.addHandler("composite-operation-change",s)}});return e.Viewer.prototype.addTiledImage.apply(this,[r])},destroy:function(){return e.Viewer.prototype.destroy.apply(this)},_getMatchingItem:function(e){for(var t,i=this.world.getItemCount(),n=0;n1||t.y>1)break;return e-1},getTileAtPoint:function(t,i){var n=i.x>=0&&i.x<=1&&i.y>=0&&i.y<=1/this.aspectRatio;e.console.assert(n,"[TileSource.getTileAtPoint] must be called with a valid point.");var r=this.dimensions.x*this.getLevelScale(t),o=i.x*r,s=i.y*r,a=Math.floor(o/this.getTileWidth(t)),l=Math.floor(s/this.getTileHeight(t));i.x>=1&&(a=this.getNumTiles(t).x-1);var c=1e-15;return i.y>=1/this.aspectRatio-c&&(l=this.getNumTiles(t).y-1),new e.Point(a,l)},getTileBounds:function(t,i,n,r){var o=this.dimensions.times(this.getLevelScale(t)),s=this.getTileWidth(t),a=this.getTileHeight(t),l=0===i?0:s*i-this.tileOverlap,c=0===n?0:a*n-this.tileOverlap,u=s+(0===i?1:2)*this.tileOverlap,h=a+(0===n?1:2)*this.tileOverlap,d=1/o.x;return u=Math.min(u,o.x-l),h=Math.min(h,o.y-c),r?new e.Rect(0,0,u,h):new e.Rect(l*d,c*d,u*d,h*d)},getImageInfo:function(i){var n,r,o,s,a,l,c,u=this;i&&(a=i.split("/"),l=a[a.length-1],c=l.lastIndexOf("."),c>-1&&(a[a.length-1]=l.slice(0,c)));var h=null;if(this.splitHashDataForPost){var d=i.indexOf("#");-1!==d&&(h=i.substring(d+1),i=i.substr(0,d))}r=function(t){"string"===typeof t&&(t=e.parseXml(t));var n=e.TileSource.determineType(u,t,i);n?(s=n.prototype.configure.apply(u,[t,i,h]),void 0===s.ajaxWithCredentials&&(s.ajaxWithCredentials=u.ajaxWithCredentials),o=new n(s),u.ready=!0,u.raiseEvent("ready",{tileSource:o})):u.raiseEvent("open-failed",{message:"Unable to load TileSource",source:i})},i.match(/\.js$/)?(n=i.split("/").pop().replace(".js",""),e.jsonp({url:i,async:!1,callbackName:n,callback:r})):e.makeAjaxRequest({url:i,postData:h,withCredentials:this.ajaxWithCredentials,headers:this.ajaxHeaders,success:function(e){var i=t(e);r(i)},error:function(t,n){var r;try{r="HTTP "+t.status+" attempting to load TileSource: "+i}catch(s){var o;o="undefined"!==typeof n&&n.toString?n.toString():"Unknown error",r=o+" attempting to load TileSource: "+i}e.console.error(r),u.raiseEvent("open-failed",{message:r,source:i,postData:h})}})},supports:function(e,t){return!1},configure:function(e,t,i){throw new Error("Method not implemented.")},getTileUrl:function(e,t,i){throw new Error("Method not implemented.")},getTilePostData:function(e,t,i){return null},getTileAjaxHeaders:function(e,t,i){return{}},getTileHashKey:function(e,t,i,n,r,o){return r?n+"+"+JSON.stringify(r):n},tileExists:function(e,t,i){var n=this.getNumTiles(e);return e>=this.minLevel&&e<=this.maxLevel&&t>=0&&i>=0&&t=0;u--)for(h=this.displayRects[u],d=h.minLevel;d<=h.maxLevel;d++)this._levelRects[d]||(this._levelRects[d]=[]),this._levelRects[d].push(h);e.TileSource.apply(this,[p])},e.extend(e.DziTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){var i;return e.Image?i=e.Image.xmlns:e.documentElement&&("Image"!==e.documentElement.localName&&"Image"!==e.documentElement.tagName||(i=e.documentElement.namespaceURI)),i=(i||"").toLowerCase(),-1!==i.indexOf("schemas.microsoft.com/deepzoom/2008")||-1!==i.indexOf("schemas.microsoft.com/deepzoom/2009")},configure:function(n,r,o){var s;return s=e.isPlainObject(n)?i(this,n):t(this,n),r&&!s.tilesUrl&&(s.tilesUrl=r.replace(/([^/]+?)(\.(dzi|xml|js)?(\?[^/]*)?)?\/?$/,"$1_files/"),-1!==r.search(/\.(dzi|xml|js)\?/)?s.queryParams=r.match(/\?.*/):s.queryParams=""),s},getTileUrl:function(e,t,i){return[this.tilesUrl,e,"/",t,"_",i,".",this.fileFormat,this.queryParams].join("")},tileExists:function(e,t,i){var n,r,o,s,a,l,c,u=this._levelRects[e];if(this.minLevel&&ethis.maxLevel)return!1;if(!u||!u.length)return!0;for(c=u.length-1;c>=0;c--)if(n=u[c],!(en.maxLevel)&&(r=this.getLevelScale(e),o=n.x*r,s=n.y*r,a=o+n.width*r,l=s+n.height*r,o=Math.floor(o/this._tileWidth),s=Math.floor(s/this._tileWidth),a=Math.ceil(a/this._tileWidth),l=Math.ceil(l/this._tileWidth),o<=t&&t1&&e.profile[1].supports&&(r=-1!==e.profile[1].supports.indexOf("sizeByW")),3===e.version&&e.extraFeatures&&(r=-1!==e.extraFeatures.indexOf("sizeByWh")),!n||r}function i(e){for(var t=[],i=0;i0?n.tileSize=Math.max.apply(null,c):n.tileSize=a}else this.sizes&&this.sizes.length>0?(this.emulateLegacyImagePyramid=!0,n.levels=i(this),e.extend(!0,n,{width:n.levels[n.levels.length-1].width,height:n.levels[n.levels.length-1].height,tileSize:Math.max(n.height,n.width),tileOverlap:0,minLevel:0,maxLevel:n.levels.length-1}),this.levels=n.levels):e.console.error("Nothing in the info.json to construct image pyramids from");if(!n.maxLevel&&!this.emulateLegacyImagePyramid)if(this.scale_factors){var h=Math.max.apply(null,this.scale_factors);n.maxLevel=Math.round(Math.log(h)*Math.LOG2E)}else n.maxLevel=Number(Math.ceil(Math.log(Math.max(this.width,this.height),2)));e.TileSource.apply(this,[n])},e.extend(e.IIIFTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){return!(!e.protocol||"http://iiif.io/api/image"!==e.protocol)||(!(!e["@context"]||"http://library.stanford.edu/iiif/image-api/1.1/context.json"!==e["@context"]&&"http://iiif.io/api/image/1/context.json"!==e["@context"])||(!(!e.profile||0!==e.profile.indexOf("http://library.stanford.edu/iiif/image-api/compliance.html"))||(!!(e.identifier&&e.width&&e.height)||!(!e.documentElement||"info"!==e.documentElement.tagName||"http://library.stanford.edu/iiif/image-api/ns/"!==e.documentElement.namespaceURI))))},configure:function(t,i,r){if(e.isPlainObject(t)){if(t["@context"]){var o=t["@context"];if(Array.isArray(o))for(var a=0;a0&&t>=this.minLevel&&t<=this.maxLevel&&(i=this.levels[t].width/this.levels[this.maxLevel].width),i}return e.TileSource.prototype.getLevelScale.call(this,t)},getNumTiles:function(t){if(this.emulateLegacyImagePyramid){var i=this.getLevelScale(t);return i?new e.Point(1,1):new e.Point(0,0)}return e.TileSource.prototype.getNumTiles.call(this,t)},getTileAtPoint:function(t,i){return this.emulateLegacyImagePyramid?new e.Point(0,0):e.TileSource.prototype.getTileAtPoint.call(this,t,i)},getTileUrl:function(e,t,i){if(this.emulateLegacyImagePyramid){var n=null;return this.levels.length>0&&e>=this.minLevel&&e<=this.maxLevel&&(n=this.levels[e].url),n}var r,o,s,a,l,c,u,h,d,p,f,v,g,m,y="0",w=Math.pow(.5,this.maxLevel-e),x=Math.ceil(this.width*w),b=Math.ceil(this.height*w);return r=this.getTileWidth(e),o=this.getTileHeight(e),s=Math.ceil(r/w),a=Math.ceil(o/w),g=1===this.version?"native."+this.tileFormat:"default."+this.tileFormat,xc?l/256:c/256,s.maxLevel=Math.ceil(Math.log(a)/Math.log(2))-1,s.tileSize=256,s.width=l,s.height=c,e.TileSource.apply(this,[s])},e.extend(e.TmsTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){return e.type&&"tiledmapservice"===e.type},configure:function(e,t,i){return e},getTileUrl:function(e,t,i){var n=this.getNumTiles(e).y-1;return this.tilesUrl+e+"/"+t+"/"+(n-i)+".png"}})}(s),function(e){e.ZoomifyTileSource=function(e){"undefined"===typeof e.tileSize&&(e.tileSize=256),"undefined"===typeof e.fileFormat&&(e.fileFormat="jpg",this.fileFormat=e.fileFormat);var t={x:e.width,y:e.height};e.imageSizes=[{x:e.width,y:e.height}],e.gridSize=[this._getGridSize(e.width,e.height,e.tileSize)];while(parseInt(t.x,10)>e.tileSize||parseInt(t.y,10)>e.tileSize)t.x=Math.floor(t.x/2),t.y=Math.floor(t.y/2),e.imageSizes.push({x:t.x,y:t.y}),e.gridSize.push(this._getGridSize(t.x,t.y,e.tileSize));e.imageSizes.reverse(),e.gridSize.reverse(),e.minLevel=0,e.maxLevel=e.gridSize.length-1,s.TileSource.apply(this,[e])},e.extend(e.ZoomifyTileSource.prototype,e.TileSource.prototype,{_getGridSize:function(e,t,i){return{x:Math.ceil(e/i),y:Math.ceil(t/i)}},_calculateAbsoluteTileNumber:function(e,t,i){for(var n=0,r={},o=0;o");return r.sort((function(e,t){return e.height-t.height}))}function i(t,i){if(!i||!i.documentElement)throw new Error(e.getString("Errors.Xml"));var r,o,s=i.documentElement,a=s.tagName,l=null,c=[];if("image"===a)try{for(l={type:s.getAttribute("type"),levels:[]},c=s.getElementsByTagName("level"),o=0;o0?(r=n.levels[n.levels.length-1].width,o=n.levels[n.levels.length-1].height):(r=0,o=0,e.console.error("No supported image formats found")),e.extend(!0,n,{width:r,height:o,tileSize:Math.max(o,r),tileOverlap:0,minLevel:0,maxLevel:n.levels.length>0?n.levels.length-1:0}),e.TileSource.apply(this,[n]),this.levels=n.levels},e.extend(e.LegacyTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){return e.type&&"legacy-image-pyramid"===e.type||e.documentElement&&"legacy-image-pyramid"===e.documentElement.getAttribute("type")},configure:function(t,r,o){var s;return s=e.isPlainObject(t)?n(this,t):i(this,t),s},getLevelScale:function(e){var t=NaN;return this.levels.length>0&&e>=this.minLevel&&e<=this.maxLevel&&(t=this.levels[e].width/this.levels[this.maxLevel].width),t},getNumTiles:function(t){var i=this.getLevelScale(t);return i?new e.Point(1,1):new e.Point(0,0)},getTileUrl:function(e,t,i){var n=null;return this.levels.length>0&&e>=this.minLevel&&e<=this.maxLevel&&(n=this.levels[e].url),n}})}(s),function(e){e.ImageTileSource=function(t){t=e.extend({buildPyramid:!0,crossOriginPolicy:!1,ajaxWithCredentials:!1,useCanvas:!0},t),e.TileSource.apply(this,[t])},e.extend(e.ImageTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){return e.type&&"image"===e.type},configure:function(e,t,i){return e},getImageInfo:function(t){var i=this._image=new Image,n=this;this.crossOriginPolicy&&(i.crossOrigin=this.crossOriginPolicy),this.ajaxWithCredentials&&(i.useCredentials=this.ajaxWithCredentials),e.addEvent(i,"load",(function(){n.width=i.naturalWidth,n.height=i.naturalHeight,n.aspectRatio=n.width/n.height,n.dimensions=new e.Point(n.width,n.height),n._tileWidth=n.width,n._tileHeight=n.height,n.tileOverlap=0,n.minLevel=0,n.levels=n._buildLevels(),n.maxLevel=n.levels.length-1,n.ready=!0,n.raiseEvent("ready",{tileSource:n})})),e.addEvent(i,"error",(function(){n.raiseEvent("open-failed",{message:"Error loading image at "+t,source:t})})),i.src=t},getLevelScale:function(e){var t=NaN;return e>=this.minLevel&&e<=this.maxLevel&&(t=this.levels[e].width/this.levels[this.maxLevel].width),t},getNumTiles:function(t){var i=this.getLevelScale(t);return i?new e.Point(1,1):new e.Point(0,0)},getTileUrl:function(e,t,i){var n=null;return e>=this.minLevel&&e<=this.maxLevel&&(n=this.levels[e].url),n},getContext2D:function(e,t,i){var n=null;return e>=this.minLevel&&e<=this.maxLevel&&(n=this.levels[e].context2D),n},destroy:function(){this._freeupCanvasMemory()},_buildLevels:function(){var t=[{url:this._image.src,width:this._image.naturalWidth,height:this._image.naturalHeight}];if(!this.buildPyramid||!e.supportsCanvas||!this.useCanvas)return delete this._image,t;var i=this._image.naturalWidth,n=this._image.naturalHeight,r=document.createElement("canvas"),o=r.getContext("2d");if(r.width=i,r.height=n,o.drawImage(this._image,0,0,i,n),t[0].context2D=o,delete this._image,e.isCanvasTainted(r))return t;while(i>=2&&n>=2){i=Math.floor(i/2),n=Math.floor(n/2);var s=document.createElement("canvas"),a=s.getContext("2d");s.width=i,s.height=n,a.drawImage(r,0,0,i,n),t.splice(0,0,{context2D:a,width:i,height:n}),r=s,o=a}return t},_freeupCanvasMemory:function(){for(var e=0;e0&&t(i))}function n(i){i.shouldFade=!0,i.fadeBeginTime=e.now()+i.fadeDelay,window.setTimeout((function(){t(i)}),i.fadeDelay)}function r(t){t.shouldFade=!1,t.imgGroup&&e.setElementOpacity(t.imgGroup,1,!0)}function o(t,i){t.element.disabled||(i>=e.ButtonState.GROUP&&t.currentState===e.ButtonState.REST&&(r(t),t.currentState=e.ButtonState.GROUP),i>=e.ButtonState.HOVER&&t.currentState===e.ButtonState.GROUP&&(t.imgHover&&(t.imgHover.style.visibility=""),t.currentState=e.ButtonState.HOVER),i>=e.ButtonState.DOWN&&t.currentState===e.ButtonState.HOVER&&(t.imgDown&&(t.imgDown.style.visibility=""),t.currentState=e.ButtonState.DOWN))}function s(t,i){t.element.disabled||(i<=e.ButtonState.HOVER&&t.currentState===e.ButtonState.DOWN&&(t.imgDown&&(t.imgDown.style.visibility="hidden"),t.currentState=e.ButtonState.HOVER),i<=e.ButtonState.GROUP&&t.currentState===e.ButtonState.HOVER&&(t.imgHover&&(t.imgHover.style.visibility="hidden"),t.currentState=e.ButtonState.GROUP),i<=e.ButtonState.REST&&t.currentState===e.ButtonState.GROUP&&(n(t),t.currentState=e.ButtonState.REST))}e.ButtonState={REST:0,GROUP:1,HOVER:2,DOWN:3},e.Button=function(t){var i=this;e.EventSource.call(this),e.extend(!0,this,{tooltip:null,srcRest:null,srcGroup:null,srcHover:null,srcDown:null,clickTimeThreshold:e.DEFAULT_SETTINGS.clickTimeThreshold,clickDistThreshold:e.DEFAULT_SETTINGS.clickDistThreshold,fadeDelay:0,fadeLength:2e3,onPress:null,onRelease:null,onClick:null,onEnter:null,onExit:null,onFocus:null,onBlur:null,userData:null},t),this.element=t.element||e.makeNeutralElement("div"),t.element||(this.imgRest=e.makeTransparentImage(this.srcRest),this.imgGroup=e.makeTransparentImage(this.srcGroup),this.imgHover=e.makeTransparentImage(this.srcHover),this.imgDown=e.makeTransparentImage(this.srcDown),this.imgRest.alt=this.imgGroup.alt=this.imgHover.alt=this.imgDown.alt=this.tooltip,e.setElementPointerEventsNone(this.imgRest),e.setElementPointerEventsNone(this.imgGroup),e.setElementPointerEventsNone(this.imgHover),e.setElementPointerEventsNone(this.imgDown),this.element.style.position="relative",e.setElementTouchActionNone(this.element),this.imgGroup.style.position=this.imgHover.style.position=this.imgDown.style.position="absolute",this.imgGroup.style.top=this.imgHover.style.top=this.imgDown.style.top="0px",this.imgGroup.style.left=this.imgHover.style.left=this.imgDown.style.left="0px",this.imgHover.style.visibility=this.imgDown.style.visibility="hidden",e.Browser.vendor===e.BROWSERS.FIREFOX&&e.Browser.version<3&&(this.imgGroup.style.top=this.imgHover.style.top=this.imgDown.style.top=""),this.element.appendChild(this.imgRest),this.element.appendChild(this.imgGroup),this.element.appendChild(this.imgHover),this.element.appendChild(this.imgDown)),this.addHandler("press",this.onPress),this.addHandler("release",this.onRelease),this.addHandler("click",this.onClick),this.addHandler("enter",this.onEnter),this.addHandler("exit",this.onExit),this.addHandler("focus",this.onFocus),this.addHandler("blur",this.onBlur),this.currentState=e.ButtonState.GROUP,this.fadeBeginTime=null,this.shouldFade=!1,this.element.style.display="inline-block",this.element.style.position="relative",this.element.title=this.tooltip,this.tracker=new e.MouseTracker({userData:"Button.tracker",element:this.element,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,enterHandler:function(t){t.insideElementPressed?(o(i,e.ButtonState.DOWN),i.raiseEvent("enter",{originalEvent:t.originalEvent})):t.buttonDownAny||o(i,e.ButtonState.HOVER)},focusHandler:function(e){i.tracker.enterHandler(e),i.raiseEvent("focus",{originalEvent:e.originalEvent})},leaveHandler:function(t){s(i,e.ButtonState.GROUP),t.insideElementPressed&&i.raiseEvent("exit",{originalEvent:t.originalEvent})},blurHandler:function(e){i.tracker.leaveHandler(e),i.raiseEvent("blur",{originalEvent:e.originalEvent})},pressHandler:function(t){o(i,e.ButtonState.DOWN),i.raiseEvent("press",{originalEvent:t.originalEvent})},releaseHandler:function(t){t.insideElementPressed&&t.insideElementReleased?(s(i,e.ButtonState.HOVER),i.raiseEvent("release",{originalEvent:t.originalEvent})):t.insideElementPressed?s(i,e.ButtonState.GROUP):o(i,e.ButtonState.HOVER)},clickHandler:function(e){e.quick&&i.raiseEvent("click",{originalEvent:e.originalEvent})},keyHandler:function(e){13===e.keyCode?(i.raiseEvent("click",{originalEvent:e.originalEvent}),i.raiseEvent("release",{originalEvent:e.originalEvent}),e.preventDefault=!0):e.preventDefault=!1}}),s(this,e.ButtonState.REST)},e.extend(e.Button.prototype,e.EventSource.prototype,{notifyGroupEnter:function(){o(this,e.ButtonState.GROUP)},notifyGroupExit:function(){s(this,e.ButtonState.REST)},disable:function(){this.notifyGroupExit(),this.element.disabled=!0,e.setElementOpacity(this.element,.2,!0)},enable:function(){this.element.disabled=!1,e.setElementOpacity(this.element,1,!0),this.notifyGroupEnter()},destroy:function(){this.imgRest&&(this.element.removeChild(this.imgRest),this.imgRest=null),this.imgGroup&&(this.element.removeChild(this.imgGroup),this.imgGroup=null),this.imgHover&&(this.element.removeChild(this.imgHover),this.imgHover=null),this.imgDown&&(this.element.removeChild(this.imgDown),this.imgDown=null),this.removeAllHandlers(),this.tracker.destroy(),this.element=null}})}(s),function(e){e.ButtonGroup=function(t){e.extend(!0,this,{buttons:[],clickTimeThreshold:e.DEFAULT_SETTINGS.clickTimeThreshold,clickDistThreshold:e.DEFAULT_SETTINGS.clickDistThreshold,labelText:""},t);var i,n=this.buttons.concat([]),r=this;if(this.element=t.element||e.makeNeutralElement("div"),!t.group)for(this.element.style.display="inline-block",i=0;i=270?(s=this.getTopRight(),this.x=s.x,this.y=s.y,a=this.height,this.height=this.width,this.width=a,this.degrees-=270):this.degrees>=180?(s=this.getBottomRight(),this.x=s.x,this.y=s.y,this.degrees-=180):this.degrees>=90&&(s=this.getBottomLeft(),this.x=s.x,this.y=s.y,a=this.height,this.height=this.width,this.width=a,this.degrees-=90)},e.Rect.fromSummits=function(t,i,n){var r=t.distanceTo(i),o=t.distanceTo(n),s=i.minus(t),a=Math.atan(s.y/s.x);return s.x<0?a+=Math.PI:s.y<0&&(a+=2*Math.PI),new e.Rect(t.x,t.y,r,o,a/Math.PI*180)},e.Rect.prototype={clone:function(){return new e.Rect(this.x,this.y,this.width,this.height,this.degrees)},getAspectRatio:function(){return this.width/this.height},getTopLeft:function(){return new e.Point(this.x,this.y)},getBottomRight:function(){return new e.Point(this.x+this.width,this.y+this.height).rotate(this.degrees,this.getTopLeft())},getTopRight:function(){return new e.Point(this.x+this.width,this.y).rotate(this.degrees,this.getTopLeft())},getBottomLeft:function(){return new e.Point(this.x,this.y+this.height).rotate(this.degrees,this.getTopLeft())},getCenter:function(){return new e.Point(this.x+this.width/2,this.y+this.height/2).rotate(this.degrees,this.getTopLeft())},getSize:function(){return new e.Point(this.width,this.height)},equals:function(t){return t instanceof e.Rect&&this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height&&this.degrees===t.degrees},times:function(t){return new e.Rect(this.x*t,this.y*t,this.width*t,this.height*t,this.degrees)},translate:function(t){return new e.Rect(this.x+t.x,this.y+t.y,this.width,this.height,this.degrees)},union:function(t){var i=this.getBoundingBox(),n=t.getBoundingBox(),r=Math.min(i.x,n.x),o=Math.min(i.y,n.y),s=Math.max(i.x+i.width,n.x+n.width),a=Math.max(i.y+i.height,n.y+n.height);return new e.Rect(r,o,s-r,a-o)},intersection:function(t){var i=1e-10,n=[],r=this.getTopLeft();t.containsPoint(r,i)&&n.push(r);var o=this.getTopRight();t.containsPoint(o,i)&&n.push(o);var s=this.getBottomLeft();t.containsPoint(s,i)&&n.push(s);var a=this.getBottomRight();t.containsPoint(a,i)&&n.push(a);var l=t.getTopLeft();this.containsPoint(l,i)&&n.push(l);var c=t.getTopRight();this.containsPoint(c,i)&&n.push(c);var u=t.getBottomLeft();this.containsPoint(u,i)&&n.push(u);var h=t.getBottomRight();this.containsPoint(h,i)&&n.push(h);for(var d=this._getSegments(),p=t._getSegments(),f=0;fb&&(b=E.x),E.y<_&&(_=E.y),E.y>T&&(T=E.y)}return new e.Rect(x,_,b-x,T-_)},_getSegments:function(){var e=this.getTopLeft(),t=this.getTopRight(),i=this.getBottomLeft(),n=this.getBottomRight();return[[e,t],[t,n],[n,i],[i,e]]},rotate:function(t,i){if(t=e.positiveModulo(t,360),0===t)return this.clone();i=i||this.getCenter();var n=this.getTopLeft().rotate(t,i),r=this.getTopRight().rotate(t,i),o=r.minus(n);o=o.apply((function(e){var t=1e-15;return Math.abs(e)=-t&&(e.x-n.x)*o.x+(e.y-n.y)*o.y<=t&&(e.x-i.x)*s.x+(e.y-i.y)*s.y>=-t&&(e.x-r.x)*s.x+(e.y-r.y)*s.y<=t},toString:function(){return"["+Math.round(100*this.x)/100+", "+Math.round(100*this.y)/100+", "+Math.round(100*this.width)/100+"x"+Math.round(100*this.height)/100+", "+Math.round(100*this.degrees)/100+"deg]"}}}(s),function(e){var t={};function i(e){var t;e.quick&&(t="horizontal"===this.scroll?Math.floor(e.position.x/this.panelWidth):Math.floor(e.position.y/this.panelHeight),this.viewer.goToPage(t));this.element.focus()}function n(t){if(this.dragging=!0,this.element){var i=Number(this.element.style.marginLeft.replace("px","")),n=Number(this.element.style.marginTop.replace("px","")),r=Number(this.element.style.width.replace("px","")),s=Number(this.element.style.height.replace("px","")),a=e.getElementSize(this.viewer.canvas);"horizontal"===this.scroll?-t.delta.x>0?i>-(r-a.x)&&(this.element.style.marginLeft=i+2*t.delta.x+"px",o(this,a.x,i+2*t.delta.x)):-t.delta.x<0&&i<0&&(this.element.style.marginLeft=i+2*t.delta.x+"px",o(this,a.x,i+2*t.delta.x)):-t.delta.y>0?n>-(s-a.y)&&(this.element.style.marginTop=n+2*t.delta.y+"px",o(this,a.y,n+2*t.delta.y)):-t.delta.y<0&&n<0&&(this.element.style.marginTop=n+2*t.delta.y+"px",o(this,a.y,n+2*t.delta.y))}}function r(t){if(this.element){var i=Number(this.element.style.marginLeft.replace("px","")),n=Number(this.element.style.marginTop.replace("px","")),r=Number(this.element.style.width.replace("px","")),s=Number(this.element.style.height.replace("px","")),a=e.getElementSize(this.viewer.canvas);"horizontal"===this.scroll?t.scroll>0?i>-(r-a.x)&&(this.element.style.marginLeft=i-60*t.scroll+"px",o(this,a.x,i-60*t.scroll)):t.scroll<0&&i<0&&(this.element.style.marginLeft=i-60*t.scroll+"px",o(this,a.x,i-60*t.scroll)):t.scroll<0?n>a.y-s&&(this.element.style.marginTop=n+60*t.scroll+"px",o(this,a.y,n+60*t.scroll)):t.scroll>0&&n<0&&(this.element.style.marginTop=n+60*t.scroll+"px",o(this,a.y,n+60*t.scroll)),t.preventDefault=!0}}function o(t,i,n){var r,o,s,a,l,c;for(r="horizontal"===t.scroll?t.panelWidth:t.panelHeight,o=Math.ceil(i/r)+5,s=Math.ceil((Math.abs(n)+i)/r)+1,o=s-o,o=o<0?0:o,l=o;lc+r.x-this.panelWidth?(i=Math.min(i,a-r.x),this.element.style.marginLeft=-i+"px",o(this,r.x,-i)):iu+r.y-this.panelHeight?(i=Math.min(i,l-r.y),this.element.style.marginTop=-i+"px",o(this,r.y,-i)):i1?i[1].springStiffness:5,animationTime:i.length>1?i[1].animationTime:1.5}),e.console.assert("number"===typeof t.springStiffness&&0!==t.springStiffness,"[OpenSeadragon.Spring] options.springStiffness must be a non-zero number"),e.console.assert("number"===typeof t.animationTime&&t.animationTime>=0,"[OpenSeadragon.Spring] options.animationTime must be a number greater than or equal to 0"),t.exponential&&(this._exponential=!0,delete t.exponential),e.extend(!0,this,t),this.current={value:"number"===typeof this.initial?this.initial:this._exponential?0:1,time:e.now()},e.console.assert(!this._exponential||0!==this.current.value,"[OpenSeadragon.Spring] value must be non-zero for exponential springs"),this.start={value:this.current.value,time:this.current.time},this.target={value:this.current.value,time:this.current.time},this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},e.Spring.prototype={resetTo:function(t){e.console.assert(!this._exponential||0!==t,"[OpenSeadragon.Spring.resetTo] target must be non-zero for exponential springs"),this.start.value=this.target.value=this.current.value=t,this.start.time=this.target.time=this.current.time=e.now(),this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},springTo:function(t){e.console.assert(!this._exponential||0!==t,"[OpenSeadragon.Spring.springTo] target must be non-zero for exponential springs"),this.start.value=this.current.value,this.start.time=this.current.time,this.target.value=t,this.target.time=this.start.time+1e3*this.animationTime,this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value))},shiftBy:function(t){this.start.value+=t,this.target.value+=t,this._exponential&&(e.console.assert(0!==this.target.value&&0!==this.start.value,"[OpenSeadragon.Spring.shiftBy] spring value must be non-zero for exponential springs"),this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value))},setExponential:function(t){this._exponential=t,this._exponential&&(e.console.assert(0!==this.current.value&&0!==this.target.value&&0!==this.start.value,"[OpenSeadragon.Spring.setExponential] spring value must be non-zero for exponential springs"),this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},update:function(){var i,n;this.current.time=e.now(),this._exponential?(i=this.start._logValue,n=this.target._logValue):(i=this.start.value,n=this.target.value);var r=this.current.time>=this.target.time?n:i+(n-i)*t(this.springStiffness,(this.current.time-this.start.time)/(this.target.time-this.start.time)),o=this.current.value;return this._exponential?this.current.value=Math.exp(r):this.current.value=r,o!==this.current.value},isAtTargetValue:function(){return this.current.value===this.target.value}}}(s),function(e){function t(t){e.extend(!0,this,{timeout:e.DEFAULT_SETTINGS.timeout,jobId:null},t),this.image=null}function i(e,t,i){var n;e.jobsInProgress--,(!e.jobLimit||e.jobsInProgress0&&(n=e.jobQueue.shift(),n.start(),e.jobsInProgress++),i(t.image,t.errorMsg,t.request)}t.prototype={errorMsg:null,start:function(){var t=this,i=this.abort;this.image=new Image,this.image.onload=function(){t.finish(!0)},this.image.onabort=this.image.onerror=function(){t.errorMsg="Image load aborted",t.finish(!1)},this.jobId=window.setTimeout((function(){t.errorMsg="Image load exceeded timeout ("+t.timeout+" ms)",t.finish(!1)}),this.timeout),this.loadWithAjax?(this.request=e.makeAjaxRequest({url:this.src,withCredentials:this.ajaxWithCredentials,headers:this.ajaxHeaders,responseType:"arraybuffer",postData:this.postData,success:function(e){var i;try{i=new window.Blob([e.response])}catch(s){var n=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder;if("TypeError"===s.name&&n){var r=new n;r.append(e.response),i=r.getBlob()}}0===i.size&&(t.errorMsg="Empty image response.",t.finish(!1));var o=(window.URL||window.webkitURL).createObjectURL(i);t.image.src=o},error:function(e){t.errorMsg="Image load aborted - XHR error: Ajax returned "+e.status,t.finish(!1)}}),this.abort=function(){t.request.abort(),"function"===typeof i&&i()}):(!1!==this.crossOriginPolicy&&(this.image.crossOrigin=this.crossOriginPolicy),this.image.src=this.src)},finish:function(e){this.image.onload=this.image.onerror=this.image.onabort=null,e||(this.image=null),this.jobId&&window.clearTimeout(this.jobId),this.callback(this)}},e.ImageLoader=function(t){e.extend(!0,this,{jobLimit:e.DEFAULT_SETTINGS.imageLoaderLimit,timeout:e.DEFAULT_SETTINGS.timeout,jobQueue:[],jobsInProgress:0},t)},e.ImageLoader.prototype={addJob:function(e){var n=this,r=function(t){i(n,t,e.callback)},o={src:e.src,loadWithAjax:e.loadWithAjax,ajaxHeaders:e.loadWithAjax?e.ajaxHeaders:null,crossOriginPolicy:e.crossOriginPolicy,ajaxWithCredentials:e.ajaxWithCredentials,postData:e.postData,callback:r,abort:e.abort,timeout:this.timeout},s=new t(o);!this.jobLimit||this.jobsInProgressi&&(i=r)}return i},needsUpdate:function(){return e.console.error("[Drawer.needsUpdate] this function is deprecated. Use World.needsDraw instead."),this.viewer.world.needsDraw()},numTilesLoaded:function(){return e.console.error("[Drawer.numTilesLoaded] this function is deprecated. Use TileCache.numTilesLoaded instead."),this.viewer.tileCache.numTilesLoaded()},reset:function(){return e.console.error("[Drawer.reset] this function is deprecated. Use World.resetItems instead."),this.viewer.world.resetItems(),this},update:function(){return e.console.error("[Drawer.update] this function is deprecated. Use Drawer.clear and World.draw instead."),this.clear(),this.viewer.world.draw(),this},canRotate:function(){return this.useCanvas},destroy:function(){this.canvas.width=1,this.canvas.height=1,this.sketchCanvas=null,this.sketchContext=null},clear:function(){if(this.canvas.innerHTML="",this.useCanvas){var e=this._calculateCanvasSize();if((this.canvas.width!==e.x||this.canvas.height!==e.y)&&(this.canvas.width=e.x,this.canvas.height=e.y,this._updateImageSmoothingEnabled(this.context),null!==this.sketchCanvas)){var t=this._calculateSketchCanvasSize();this.sketchCanvas.width=t.x,this.sketchCanvas.height=t.y,this._updateImageSmoothingEnabled(this.sketchContext)}this._clear()}},_clear:function(e,t){if(this.useCanvas){var i=this._getContext(e);if(t)i.clearRect(t.x,t.y,t.width,t.height);else{var n=i.canvas;i.clearRect(0,0,n.width,n.height)}}},viewportToDrawerRectangle:function(t){var i=this.viewport.pixelFromPointNoRotate(t.getTopLeft(),!0),n=this.viewport.deltaPixelsFromPointsNoRotate(t.getSize(),!0);return new e.Rect(i.x*e.pixelDensityRatio,i.y*e.pixelDensityRatio,n.x*e.pixelDensityRatio,n.y*e.pixelDensityRatio)},drawTile:function(t,i,n,r,o,s){if(e.console.assert(t,"[Drawer.drawTile] tile is required"),e.console.assert(i,"[Drawer.drawTile] drawingHandler is required"),this.useCanvas){var a=this._getContext(n);r=r||1,t.drawCanvas(a,i,r,o,s)}else t.drawHTML(this.canvas)},_getContext:function(e){var t=this.context;if(e){if(null===this.sketchCanvas){this.sketchCanvas=document.createElement("canvas");var i=this._calculateSketchCanvasSize();if(this.sketchCanvas.width=i.x,this.sketchCanvas.height=i.y,this.sketchContext=this.sketchCanvas.getContext("2d"),0===this.viewport.getRotation()){var n=this;this.viewer.addHandler("rotate",(function e(){if(0!==n.viewport.getRotation()){n.viewer.removeHandler("rotate",e);var t=n._calculateSketchCanvasSize();n.sketchCanvas.width=t.x,n.sketchCanvas.height=t.y}}))}this._updateImageSmoothingEnabled(this.sketchContext)}t=this.sketchContext}return t},saveContext:function(e){this.useCanvas&&this._getContext(e).save()},restoreContext:function(e){this.useCanvas&&this._getContext(e).restore()},setClip:function(e,t){if(this.useCanvas){var i=this._getContext(t);i.beginPath(),i.rect(e.x,e.y,e.width,e.height),i.clip()}},drawRectangle:function(e,t,i){if(this.useCanvas){var n=this._getContext(i);n.save(),n.fillStyle=t,n.fillRect(e.x,e.y,e.width,e.height),n.restore()}},blendSketch:function(t,i,n,r){var o=t;if(e.isPlainObject(o)||(o={opacity:t,scale:i,translate:n,compositeOperation:r}),this.useCanvas&&this.sketchCanvas){t=o.opacity,r=o.compositeOperation;var s=o.bounds;if(this.context.save(),this.context.globalAlpha=t,r&&(this.context.globalCompositeOperation=r),s)s.x<0&&(s.width+=s.x,s.x=0),s.x+s.width>this.canvas.width&&(s.width=this.canvas.width-s.x),s.y<0&&(s.height+=s.y,s.y=0),s.y+s.height>this.canvas.height&&(s.height=this.canvas.height-s.y),this.context.drawImage(this.sketchCanvas,s.x,s.y,s.width,s.height,s.x,s.y,s.width,s.height);else{i=o.scale||1,n=o.translate;var a=n instanceof e.Point?n:new e.Point(0,0),l=0,c=0;if(n){var u=this.sketchCanvas.width-this.canvas.width,h=this.sketchCanvas.height-this.canvas.height;l=Math.round(u/2),c=Math.round(h/2)}this.context.drawImage(this.sketchCanvas,a.x-l*i,a.y-c*i,(this.canvas.width+2*l)*i,(this.canvas.height+2*c)*i,-l,-c,this.canvas.width+2*l,this.canvas.height+2*c)}this.context.restore()}},drawDebugInfo:function(t,i,n,r){if(this.useCanvas){var o=this.viewer.world.getIndexOfItem(r)%this.debugGridColor.length,s=this.context;s.save(),s.lineWidth=2*e.pixelDensityRatio,s.font="small-caps bold "+13*e.pixelDensityRatio+"px arial",s.strokeStyle=this.debugGridColor[o],s.fillStyle=this.debugGridColor[o],0!==this.viewport.degrees&&this._offsetForRotation({degrees:this.viewport.degrees}),r.getRotation(!0)%360!==0&&this._offsetForRotation({degrees:r.getRotation(!0),point:r.viewport.pixelFromPointNoRotate(r._getRotationPoint(!0),!0)}),0===r.viewport.degrees&&r.getRotation(!0)%360===0&&r._drawer.viewer.viewport.getFlip()&&r._drawer._flip(),s.strokeRect(t.position.x*e.pixelDensityRatio,t.position.y*e.pixelDensityRatio,t.size.x*e.pixelDensityRatio,t.size.y*e.pixelDensityRatio);var a=(t.position.x+t.size.x/2)*e.pixelDensityRatio,l=(t.position.y+t.size.y/2)*e.pixelDensityRatio;s.translate(a,l),s.rotate(Math.PI/180*-this.viewport.degrees),s.translate(-a,-l),0===t.x&&0===t.y&&(s.fillText("Zoom: "+this.viewport.getZoom(),t.position.x*e.pixelDensityRatio,(t.position.y-30)*e.pixelDensityRatio),s.fillText("Pan: "+this.viewport.getBounds().toString(),t.position.x*e.pixelDensityRatio,(t.position.y-20)*e.pixelDensityRatio)),s.fillText("Level: "+t.level,(t.position.x+10)*e.pixelDensityRatio,(t.position.y+20)*e.pixelDensityRatio),s.fillText("Column: "+t.x,(t.position.x+10)*e.pixelDensityRatio,(t.position.y+30)*e.pixelDensityRatio),s.fillText("Row: "+t.y,(t.position.x+10)*e.pixelDensityRatio,(t.position.y+40)*e.pixelDensityRatio),s.fillText("Order: "+n+" of "+i,(t.position.x+10)*e.pixelDensityRatio,(t.position.y+50)*e.pixelDensityRatio),s.fillText("Size: "+t.size.toString(),(t.position.x+10)*e.pixelDensityRatio,(t.position.y+60)*e.pixelDensityRatio),s.fillText("Position: "+t.position.toString(),(t.position.x+10)*e.pixelDensityRatio,(t.position.y+70)*e.pixelDensityRatio),0!==this.viewport.degrees&&this._restoreRotationChanges(),r.getRotation(!0)%360!==0&&this._restoreRotationChanges(),0===r.viewport.degrees&&r.getRotation(!0)%360===0&&r._drawer.viewer.viewport.getFlip()&&r._drawer._flip(),s.restore()}},debugRect:function(t){if(this.useCanvas){var i=this.context;i.save(),i.lineWidth=2*e.pixelDensityRatio,i.strokeStyle=this.debugGridColor[0],i.fillStyle=this.debugGridColor[0],i.strokeRect(t.x*e.pixelDensityRatio,t.y*e.pixelDensityRatio,t.width*e.pixelDensityRatio,t.height*e.pixelDensityRatio),i.restore()}},setImageSmoothingEnabled:function(e){this.useCanvas&&(this._imageSmoothingEnabled=e,this._updateImageSmoothingEnabled(this.context),this.viewer.forceRedraw())},_updateImageSmoothingEnabled:function(e){e.msImageSmoothingEnabled=this._imageSmoothingEnabled,e.imageSmoothingEnabled=this._imageSmoothingEnabled},getCanvasSize:function(t){var i=this._getContext(t).canvas;return new e.Point(i.width,i.height)},getCanvasCenter:function(){return new e.Point(this.canvas.width/2,this.canvas.height/2)},_offsetForRotation:function(t){var i=t.point?t.point.times(e.pixelDensityRatio):this.getCanvasCenter(),n=this._getContext(t.useSketch);n.save(),n.translate(i.x,i.y),this.viewer.viewport.flipped?(n.rotate(Math.PI/180*-t.degrees),n.scale(-1,1)):n.rotate(Math.PI/180*t.degrees),n.translate(-i.x,-i.y)},_flip:function(t){t=t||{};var i=t.point?t.point.times(e.pixelDensityRatio):this.getCanvasCenter(),n=this._getContext(t.useSketch);n.translate(i.x,0),n.scale(-1,1),n.translate(-i.x,0)},_restoreRotationChanges:function(e){var t=this._getContext(e);t.restore()},_calculateCanvasSize:function(){var t=e.pixelDensityRatio,i=this.viewport.getContainerSize();return{x:Math.round(i.x*t),y:Math.round(i.y*t)}},_calculateSketchCanvasSize:function(){var e=this._calculateCanvasSize();if(0===this.viewport.getRotation())return e;var t=Math.ceil(Math.sqrt(e.x*e.x+e.y*e.y));return{x:t,y:t}}}}(s),function(e){e.Viewport=function(t){var i=arguments;i.length&&i[0]instanceof e.Point&&(t={containerSize:i[0],contentSize:i[1],config:i[2]}),t.config&&(e.extend(!0,t,t.config),delete t.config),this._margins=e.extend({left:0,top:0,right:0,bottom:0},t.margins||{}),delete t.margins,e.extend(!0,this,{containerSize:null,contentSize:null,zoomPoint:null,viewer:null,springStiffness:e.DEFAULT_SETTINGS.springStiffness,animationTime:e.DEFAULT_SETTINGS.animationTime,minZoomImageRatio:e.DEFAULT_SETTINGS.minZoomImageRatio,maxZoomPixelRatio:e.DEFAULT_SETTINGS.maxZoomPixelRatio,visibilityRatio:e.DEFAULT_SETTINGS.visibilityRatio,wrapHorizontal:e.DEFAULT_SETTINGS.wrapHorizontal,wrapVertical:e.DEFAULT_SETTINGS.wrapVertical,defaultZoomLevel:e.DEFAULT_SETTINGS.defaultZoomLevel,minZoomLevel:e.DEFAULT_SETTINGS.minZoomLevel,maxZoomLevel:e.DEFAULT_SETTINGS.maxZoomLevel,degrees:e.DEFAULT_SETTINGS.degrees,flipped:e.DEFAULT_SETTINGS.flipped,homeFillsViewer:e.DEFAULT_SETTINGS.homeFillsViewer,silenceMultiImageWarnings:e.DEFAULT_SETTINGS.silenceMultiImageWarnings},t),this._updateContainerInnerSize(),this.centerSpringX=new e.Spring({initial:0,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.centerSpringY=new e.Spring({initial:0,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.zoomSpring=new e.Spring({exponential:!0,initial:1,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._oldCenterX=this.centerSpringX.current.value,this._oldCenterY=this.centerSpringY.current.value,this._oldZoom=this.zoomSpring.current.value,this._setContentBounds(new e.Rect(0,0,1,1),1),this.goHome(!0),this.update()},e.Viewport.prototype={resetContentSize:function(t){return e.console.assert(t,"[Viewport.resetContentSize] contentSize is required"),e.console.assert(t instanceof e.Point,"[Viewport.resetContentSize] contentSize must be an OpenSeadragon.Point"),e.console.assert(t.x>0,"[Viewport.resetContentSize] contentSize.x must be greater than 0"),e.console.assert(t.y>0,"[Viewport.resetContentSize] contentSize.y must be greater than 0"),this._setContentBounds(new e.Rect(0,0,1,t.y/t.x),t.x),this},setHomeBounds:function(t,i){e.console.error("[Viewport.setHomeBounds] this function is deprecated; The content bounds should not be set manually."),this._setContentBounds(t,i)},_setContentBounds:function(t,i){e.console.assert(t,"[Viewport._setContentBounds] bounds is required"),e.console.assert(t instanceof e.Rect,"[Viewport._setContentBounds] bounds must be an OpenSeadragon.Rect"),e.console.assert(t.width>0,"[Viewport._setContentBounds] bounds.width must be greater than 0"),e.console.assert(t.height>0,"[Viewport._setContentBounds] bounds.height must be greater than 0"),this._contentBoundsNoRotate=t.clone(),this._contentSizeNoRotate=this._contentBoundsNoRotate.getSize().times(i),this._contentBounds=t.rotate(this.degrees).getBoundingBox(),this._contentSize=this._contentBounds.getSize().times(i),this._contentAspectRatio=this._contentSize.x/this._contentSize.y,this.viewer&&this.viewer.raiseEvent("reset-size",{contentSize:this._contentSizeNoRotate.clone(),contentFactor:i,homeBounds:this._contentBoundsNoRotate.clone(),contentBounds:this._contentBounds.clone()})},getHomeZoom:function(){if(this.defaultZoomLevel)return this.defaultZoomLevel;var e,t=this._contentAspectRatio/this.getAspectRatio();return e=this.homeFillsViewer?t>=1?t:1:t>=1?1:t,e/this._contentBounds.width},getHomeBounds:function(){return this.getHomeBoundsNoRotate().rotate(-this.getRotation())},getHomeBoundsNoRotate:function(){var t=this._contentBounds.getCenter(),i=1/this.getHomeZoom(),n=i/this.getAspectRatio();return new e.Rect(t.x-i/2,t.y-n/2,i,n)},goHome:function(e){return this.viewer&&this.viewer.raiseEvent("home",{immediately:e}),this.fitBounds(this.getHomeBounds(),e)},getMinZoom:function(){var e=this.getHomeZoom(),t=this.minZoomLevel?this.minZoomLevel:this.minZoomImageRatio*e;return t},getMaxZoom:function(){var e=this.maxZoomLevel;return e||(e=this._contentSize.x*this.maxZoomPixelRatio/this._containerInnerSize.x,e/=this._contentBounds.width),Math.max(e,this.getHomeZoom())},getAspectRatio:function(){return this._containerInnerSize.x/this._containerInnerSize.y},getContainerSize:function(){return new e.Point(this.containerSize.x,this.containerSize.y)},getMargins:function(){return e.extend({},this._margins)},setMargins:function(t){e.console.assert("object"===e.type(t),"[Viewport.setMargins] margins must be an object"),this._margins=e.extend({left:0,top:0,right:0,bottom:0},t),this._updateContainerInnerSize(),this.viewer&&this.viewer.forceRedraw()},getBounds:function(e){return this.getBoundsNoRotate(e).rotate(-this.getRotation())},getBoundsNoRotate:function(t){var i=this.getCenter(t),n=1/this.getZoom(t),r=n/this.getAspectRatio();return new e.Rect(i.x-n/2,i.y-r/2,n,r)},getBoundsWithMargins:function(e){return this.getBoundsNoRotateWithMargins(e).rotate(-this.getRotation(),this.getCenter(e))},getBoundsNoRotateWithMargins:function(e){var t=this.getBoundsNoRotate(e),i=this._containerInnerSize.x*this.getZoom(e);return t.x-=this._margins.left/i,t.y-=this._margins.top/i,t.width+=(this._margins.left+this._margins.right)/i,t.height+=(this._margins.top+this._margins.bottom)/i,t},getCenter:function(t){var i,n,r,o,s,a,l,c,u=new e.Point(this.centerSpringX.current.value,this.centerSpringY.current.value),h=new e.Point(this.centerSpringX.target.value,this.centerSpringY.target.value);return t?u:this.zoomPoint?(i=this.pixelFromPoint(this.zoomPoint,!0),n=this.getZoom(),r=1/n,o=r/this.getAspectRatio(),s=new e.Rect(u.x-r/2,u.y-o/2,r,o),a=this._pixelFromPoint(this.zoomPoint,s),l=a.minus(i),c=l.divide(this._containerInnerSize.x*n),h.plus(c)):h},getZoom:function(e){return e?this.zoomSpring.current.value:this.zoomSpring.target.value},_applyZoomConstraints:function(e){return Math.max(Math.min(e,this.getMaxZoom()),this.getMinZoom())},_applyBoundaryConstraints:function(t){var i=new e.Rect(t.x,t.y,t.width,t.height);if(this.wrapHorizontal);else{var n=this.visibilityRatio*i.width,r=i.x+i.width,o=this._contentBoundsNoRotate.x+this._contentBoundsNoRotate.width,s=this._contentBoundsNoRotate.x-r+n,a=o-i.x-n;n>this._contentBoundsNoRotate.width?i.x+=(s+a)/2:a<0?i.x+=a:s>0&&(i.x+=s)}if(this.wrapVertical);else{var l=this.visibilityRatio*i.height,c=i.y+i.height,u=this._contentBoundsNoRotate.y+this._contentBoundsNoRotate.height,h=this._contentBoundsNoRotate.y-c+l,d=u-i.y-l;l>this._contentBoundsNoRotate.height?i.y+=(h+d)/2:d<0?i.y+=d:h>0&&(i.y+=h)}return i},_raiseConstraintsEvent:function(e){this.viewer&&this.viewer.raiseEvent("constrain",{immediately:e})},applyConstraints:function(e){var t=this.getZoom(),i=this._applyZoomConstraints(t);t!==i&&this.zoomTo(i,this.zoomPoint,e);var n=this.getBoundsNoRotate(),r=this._applyBoundaryConstraints(n);return this._raiseConstraintsEvent(e),(n.x!==r.x||n.y!==r.y||e)&&this.fitBounds(r.rotate(-this.getRotation()),e),this},ensureVisible:function(e){return this.applyConstraints(e)},_fitBounds:function(t,i){i=i||{};var n=i.immediately||!1,r=i.constraints||!1,o=this.getAspectRatio(),s=t.getCenter(),a=new e.Rect(t.x,t.y,t.width,t.height,t.degrees+this.getRotation()).getBoundingBox();a.getAspectRatio()>=o?a.height=a.width/o:a.width=a.height*o,a.x=s.x-a.width/2,a.y=s.y-a.height/2;var l=1/a.width;if(r){var c=a.getAspectRatio(),u=this._applyZoomConstraints(l);l!==u&&(l=u,a.width=1/l,a.x=s.x-a.width/2,a.height=a.width/c,a.y=s.y-a.height/2),a=this._applyBoundaryConstraints(a),s=a.getCenter(),this._raiseConstraintsEvent(n)}if(n)return this.panTo(s,!0),this.zoomTo(l,null,!0);this.panTo(this.getCenter(!0),!0),this.zoomTo(this.getZoom(!0),null,!0);var h=this.getBounds(),d=this.getZoom();if(0===d||Math.abs(l/d-1)<1e-8)return this.zoomTo(l,!0),this.panTo(s,n);a=a.rotate(-this.getRotation());var p=a.getTopLeft().times(l).minus(h.getTopLeft().times(d)).divide(l-d);return this.zoomTo(l,p,n)},fitBounds:function(e,t){return this._fitBounds(e,{immediately:t,constraints:!1})},fitBoundsWithConstraints:function(e,t){return this._fitBounds(e,{immediately:t,constraints:!0})},fitVertically:function(t){var i=new e.Rect(this._contentBounds.x+this._contentBounds.width/2,this._contentBounds.y,0,this._contentBounds.height);return this.fitBounds(i,t)},fitHorizontally:function(t){var i=new e.Rect(this._contentBounds.x,this._contentBounds.y+this._contentBounds.height/2,this._contentBounds.width,0);return this.fitBounds(i,t)},getConstrainedBounds:function(e){var t,i;return t=this.getBounds(e),i=this._applyBoundaryConstraints(t),i},panBy:function(t,i){var n=new e.Point(this.centerSpringX.target.value,this.centerSpringY.target.value);return this.panTo(n.plus(t),i)},panTo:function(e,t){return t?(this.centerSpringX.resetTo(e.x),this.centerSpringY.resetTo(e.y)):(this.centerSpringX.springTo(e.x),this.centerSpringY.springTo(e.y)),this.viewer&&this.viewer.raiseEvent("pan",{center:e,immediately:t}),this},zoomBy:function(e,t,i){return this.zoomTo(this.zoomSpring.target.value*e,t,i)},zoomTo:function(t,i,n){var r=this;return this.zoomPoint=i instanceof e.Point&&!isNaN(i.x)&&!isNaN(i.y)?i:null,n?this._adjustCenterSpringsForZoomPoint((function(){r.zoomSpring.resetTo(t)})):this.zoomSpring.springTo(t),this.viewer&&this.viewer.raiseEvent("zoom",{zoom:t,refPoint:i,immediately:n}),this},setRotation:function(t){return this.viewer&&this.viewer.drawer.canRotate()?(this.degrees=e.positiveModulo(t,360),this._setContentBounds(this.viewer.world.getHomeBounds(),this.viewer.world.getContentFactor()),this.viewer.forceRedraw(),this.viewer.raiseEvent("rotate",{degrees:t}),this):this},getRotation:function(){return this.degrees},resize:function(e,t){var i,n=this.getBoundsNoRotate(),r=n;return this.containerSize.x=e.x,this.containerSize.y=e.y,this._updateContainerInnerSize(),t&&(i=e.x/this.containerSize.x,r.width=n.width*i,r.height=r.width/this.getAspectRatio()),this.viewer&&this.viewer.raiseEvent("resize",{newContainerSize:e,maintain:t}),this.fitBounds(r,!0)},_updateContainerInnerSize:function(){this._containerInnerSize=new e.Point(Math.max(1,this.containerSize.x-(this._margins.left+this._margins.right)),Math.max(1,this.containerSize.y-(this._margins.top+this._margins.bottom)))},update:function(){var e=this;this._adjustCenterSpringsForZoomPoint((function(){e.zoomSpring.update()})),this.centerSpringX.update(),this.centerSpringY.update();var t=this.centerSpringX.current.value!==this._oldCenterX||this.centerSpringY.current.value!==this._oldCenterY||this.zoomSpring.current.value!==this._oldZoom;return this._oldCenterX=this.centerSpringX.current.value,this._oldCenterY=this.centerSpringY.current.value,this._oldZoom=this.zoomSpring.current.value,t},_adjustCenterSpringsForZoomPoint:function(e){if(this.zoomPoint){var t=this.pixelFromPoint(this.zoomPoint,!0);e();var i=this.pixelFromPoint(this.zoomPoint,!0),n=i.minus(t),r=this.deltaPointsFromPixels(n,!0);this.centerSpringX.shiftBy(r.x),this.centerSpringY.shiftBy(r.y),this.zoomSpring.isAtTargetValue()&&(this.zoomPoint=null)}else e()},deltaPixelsFromPointsNoRotate:function(e,t){return e.times(this._containerInnerSize.x*this.getZoom(t))},deltaPixelsFromPoints:function(e,t){return this.deltaPixelsFromPointsNoRotate(e.rotate(this.getRotation()),t)},deltaPointsFromPixelsNoRotate:function(e,t){return e.divide(this._containerInnerSize.x*this.getZoom(t))},deltaPointsFromPixels:function(e,t){return this.deltaPointsFromPixelsNoRotate(e,t).rotate(-this.getRotation())},pixelFromPointNoRotate:function(e,t){return this._pixelFromPointNoRotate(e,this.getBoundsNoRotate(t))},pixelFromPoint:function(e,t){return this._pixelFromPoint(e,this.getBoundsNoRotate(t))},_pixelFromPointNoRotate:function(t,i){return t.minus(i.getTopLeft()).times(this._containerInnerSize.x/i.width).plus(new e.Point(this._margins.left,this._margins.top))},_pixelFromPoint:function(e,t){return this._pixelFromPointNoRotate(e.rotate(this.getRotation(),this.getCenter(!0)),t)},pointFromPixelNoRotate:function(t,i){var n=this.getBoundsNoRotate(i);return t.minus(new e.Point(this._margins.left,this._margins.top)).divide(this._containerInnerSize.x/n.width).plus(n.getTopLeft())},pointFromPixel:function(e,t){return this.pointFromPixelNoRotate(e,t).rotate(-this.getRotation(),this.getCenter(!0))},_viewportToImageDelta:function(t,i){var n=this._contentBoundsNoRotate.width;return new e.Point(t*this._contentSizeNoRotate.x/n,i*this._contentSizeNoRotate.x/n)},viewportToImageCoordinates:function(t,i){if(t instanceof e.Point)return this.viewportToImageCoordinates(t.x,t.y);if(this.viewer){var n=this.viewer.world.getItemCount();if(n>1)this.silenceMultiImageWarnings||e.console.error("[Viewport.viewportToImageCoordinates] is not accurate with multi-image; use TiledImage.viewportToImageCoordinates instead.");else if(1===n){var r=this.viewer.world.getItemAt(0);return r.viewportToImageCoordinates(t,i,!0)}}return this._viewportToImageDelta(t-this._contentBoundsNoRotate.x,i-this._contentBoundsNoRotate.y)},_imageToViewportDelta:function(t,i){var n=this._contentBoundsNoRotate.width;return new e.Point(t/this._contentSizeNoRotate.x*n,i/this._contentSizeNoRotate.x*n)},imageToViewportCoordinates:function(t,i){if(t instanceof e.Point)return this.imageToViewportCoordinates(t.x,t.y);if(this.viewer){var n=this.viewer.world.getItemCount();if(n>1)this.silenceMultiImageWarnings||e.console.error("[Viewport.imageToViewportCoordinates] is not accurate with multi-image; use TiledImage.imageToViewportCoordinates instead.");else if(1===n){var r=this.viewer.world.getItemAt(0);return r.imageToViewportCoordinates(t,i,!0)}}var o=this._imageToViewportDelta(t,i);return o.x+=this._contentBoundsNoRotate.x,o.y+=this._contentBoundsNoRotate.y,o},imageToViewportRectangle:function(t,i,n,r){var o=t;if(o instanceof e.Rect||(o=new e.Rect(t,i,n,r)),this.viewer){var s=this.viewer.world.getItemCount();if(s>1)this.silenceMultiImageWarnings||e.console.error("[Viewport.imageToViewportRectangle] is not accurate with multi-image; use TiledImage.imageToViewportRectangle instead.");else if(1===s){var a=this.viewer.world.getItemAt(0);return a.imageToViewportRectangle(t,i,n,r,!0)}}var l=this.imageToViewportCoordinates(o.x,o.y),c=this._imageToViewportDelta(o.width,o.height);return new e.Rect(l.x,l.y,c.x,c.y,o.degrees)},viewportToImageRectangle:function(t,i,n,r){var o=t;if(o instanceof e.Rect||(o=new e.Rect(t,i,n,r)),this.viewer){var s=this.viewer.world.getItemCount();if(s>1)this.silenceMultiImageWarnings||e.console.error("[Viewport.viewportToImageRectangle] is not accurate with multi-image; use TiledImage.viewportToImageRectangle instead.");else if(1===s){var a=this.viewer.world.getItemAt(0);return a.viewportToImageRectangle(t,i,n,r,!0)}}var l=this.viewportToImageCoordinates(o.x,o.y),c=this._viewportToImageDelta(o.width,o.height);return new e.Rect(l.x,l.y,c.x,c.y,o.degrees)},viewerElementToImageCoordinates:function(e){var t=this.pointFromPixel(e,!0);return this.viewportToImageCoordinates(t)},imageToViewerElementCoordinates:function(e){var t=this.imageToViewportCoordinates(e);return this.pixelFromPoint(t,!0)},windowToImageCoordinates:function(t){e.console.assert(this.viewer,"[Viewport.windowToImageCoordinates] the viewport must have a viewer.");var i=t.minus(e.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(i)},imageToWindowCoordinates:function(t){e.console.assert(this.viewer,"[Viewport.imageToWindowCoordinates] the viewport must have a viewer.");var i=this.imageToViewerElementCoordinates(t);return i.plus(e.getElementPosition(this.viewer.element))},viewerElementToViewportCoordinates:function(e){return this.pointFromPixel(e,!0)},viewportToViewerElementCoordinates:function(e){return this.pixelFromPoint(e,!0)},viewerElementToViewportRectangle:function(t){return e.Rect.fromSummits(this.pointFromPixel(t.getTopLeft(),!0),this.pointFromPixel(t.getTopRight(),!0),this.pointFromPixel(t.getBottomLeft(),!0))},viewportToViewerElementRectangle:function(t){return e.Rect.fromSummits(this.pixelFromPoint(t.getTopLeft(),!0),this.pixelFromPoint(t.getTopRight(),!0),this.pixelFromPoint(t.getBottomLeft(),!0))},windowToViewportCoordinates:function(t){e.console.assert(this.viewer,"[Viewport.windowToViewportCoordinates] the viewport must have a viewer.");var i=t.minus(e.getElementPosition(this.viewer.element));return this.viewerElementToViewportCoordinates(i)},viewportToWindowCoordinates:function(t){e.console.assert(this.viewer,"[Viewport.viewportToWindowCoordinates] the viewport must have a viewer.");var i=this.viewportToViewerElementCoordinates(t);return i.plus(e.getElementPosition(this.viewer.element))},viewportToImageZoom:function(t){if(this.viewer){var i=this.viewer.world.getItemCount();if(i>1)this.silenceMultiImageWarnings||e.console.error("[Viewport.viewportToImageZoom] is not accurate with multi-image.");else if(1===i){var n=this.viewer.world.getItemAt(0);return n.viewportToImageZoom(t)}}var r=this._contentSizeNoRotate.x,o=this._containerInnerSize.x,s=this._contentBoundsNoRotate.width,a=o/r*s;return t*a},imageToViewportZoom:function(t){if(this.viewer){var i=this.viewer.world.getItemCount();if(i>1)this.silenceMultiImageWarnings||e.console.error("[Viewport.imageToViewportZoom] is not accurate with multi-image.");else if(1===i){var n=this.viewer.world.getItemAt(0);return n.imageToViewportZoom(t)}}var r=this._contentSizeNoRotate.x,o=this._containerInnerSize.x,s=this._contentBoundsNoRotate.width,a=r/o/s;return t*a},toggleFlip:function(){return this.setFlip(!this.getFlip()),this},getFlip:function(){return this.flipped},setFlip:function(e){return this.flipped===e||(this.flipped=e,this.viewer.navigator&&this.viewer.navigator.setFlip(this.getFlip()),this.viewer.forceRedraw(),this.viewer.raiseEvent("flip",{flipped:e})),this}}}(s),function(e){e.TiledImage=function(t){var i=this;e.console.assert(t.tileCache,"[TiledImage] options.tileCache is required"),e.console.assert(t.drawer,"[TiledImage] options.drawer is required"),e.console.assert(t.viewer,"[TiledImage] options.viewer is required"),e.console.assert(t.imageLoader,"[TiledImage] options.imageLoader is required"),e.console.assert(t.source,"[TiledImage] options.source is required"),e.console.assert(!t.clip||t.clip instanceof e.Rect,"[TiledImage] options.clip must be an OpenSeadragon.Rect if present"),e.EventSource.call(this),this._tileCache=t.tileCache,delete t.tileCache,this._drawer=t.drawer,delete t.drawer,this._imageLoader=t.imageLoader,delete t.imageLoader,t.clip instanceof e.Rect&&(this._clip=t.clip.clone()),delete t.clip;var n=t.x||0;delete t.x;var r=t.y||0;delete t.y,this.normHeight=t.source.dimensions.y/t.source.dimensions.x,this.contentAspectX=t.source.dimensions.x/t.source.dimensions.y;var o=1;t.width?(o=t.width,delete t.width,t.height&&(e.console.error("specifying both width and height to a tiledImage is not supported"),delete t.height)):t.height&&(o=t.height/this.normHeight,delete t.height);var a=t.fitBounds;delete t.fitBounds;var l=t.fitBoundsPlacement||s.Placement.CENTER;delete t.fitBoundsPlacement;var c=t.degrees||0;delete t.degrees,e.extend(!0,this,{viewer:null,tilesMatrix:{},coverage:{},loadingCoverage:{},lastDrawn:[],lastResetTime:0,_midDraw:!1,_needsDraw:!0,_hasOpaqueTile:!1,_tilesLoading:0,springStiffness:e.DEFAULT_SETTINGS.springStiffness,animationTime:e.DEFAULT_SETTINGS.animationTime,minZoomImageRatio:e.DEFAULT_SETTINGS.minZoomImageRatio,wrapHorizontal:e.DEFAULT_SETTINGS.wrapHorizontal,wrapVertical:e.DEFAULT_SETTINGS.wrapVertical,immediateRender:e.DEFAULT_SETTINGS.immediateRender,blendTime:e.DEFAULT_SETTINGS.blendTime,alwaysBlend:e.DEFAULT_SETTINGS.alwaysBlend,minPixelRatio:e.DEFAULT_SETTINGS.minPixelRatio,smoothTileEdgesMinZoom:e.DEFAULT_SETTINGS.smoothTileEdgesMinZoom,iOSDevice:e.DEFAULT_SETTINGS.iOSDevice,debugMode:e.DEFAULT_SETTINGS.debugMode,crossOriginPolicy:e.DEFAULT_SETTINGS.crossOriginPolicy,ajaxWithCredentials:e.DEFAULT_SETTINGS.ajaxWithCredentials,placeholderFillStyle:e.DEFAULT_SETTINGS.placeholderFillStyle,opacity:e.DEFAULT_SETTINGS.opacity,preload:e.DEFAULT_SETTINGS.preload,compositeOperation:e.DEFAULT_SETTINGS.compositeOperation,subPixelRoundingForTransparency:e.DEFAULT_SETTINGS.subPixelRoundingForTransparency},t),this._preload=this.preload,delete this.preload,this._fullyLoaded=!1,this._xSpring=new e.Spring({initial:n,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._ySpring=new e.Spring({initial:r,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._scaleSpring=new e.Spring({initial:o,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._degreesSpring=new e.Spring({initial:c,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._updateForScale(),a&&this.fitBounds(a,l,!0),this._drawingHandler=function(t){i.viewer.raiseEvent("tile-drawing",e.extend({tiledImage:i},t))}},e.extend(e.TiledImage.prototype,e.EventSource.prototype,{needsDraw:function(){return this._needsDraw},getFullyLoaded:function(){return this._fullyLoaded},_setFullyLoaded:function(e){e!==this._fullyLoaded&&(this._fullyLoaded=e,this.raiseEvent("fully-loaded-change",{fullyLoaded:this._fullyLoaded}))},reset:function(){this._tileCache.clearTilesFor(this),this.lastResetTime=e.now(),this._needsDraw=!0},update:function(){var e=this._xSpring.update(),t=this._ySpring.update(),i=this._scaleSpring.update(),n=this._degreesSpring.update();return!!(e||t||i||n)&&(this._updateForScale(),this._needsDraw=!0,!0)},draw:function(){0!==this.opacity||this._preload?(this._midDraw=!0,this._updateViewport(),this._midDraw=!1):this._needsDraw=!1},destroy:function(){this.reset(),this.source.destroy&&this.source.destroy()},getBounds:function(e){return this.getBoundsNoRotate(e).rotate(this.getRotation(e),this._getRotationPoint(e))},getBoundsNoRotate:function(t){return t?new e.Rect(this._xSpring.current.value,this._ySpring.current.value,this._worldWidthCurrent,this._worldHeightCurrent):new e.Rect(this._xSpring.target.value,this._ySpring.target.value,this._worldWidthTarget,this._worldHeightTarget)},getWorldBounds:function(){return e.console.error("[TiledImage.getWorldBounds] is deprecated; use TiledImage.getBounds instead"),this.getBounds()},getClippedBounds:function(t){var i=this.getBoundsNoRotate(t);if(this._clip){var n=t?this._worldWidthCurrent:this._worldWidthTarget,r=n/this.source.dimensions.x,o=this._clip.times(r);i=new e.Rect(i.x+o.x,i.y+o.y,o.width,o.height)}return i.rotate(this.getRotation(t),this._getRotationPoint(t))},getTileBounds:function(e,t,i){var n=this.source.getNumTiles(e),r=(n.x+t%n.x)%n.x,o=(n.y+i%n.y)%n.y,s=this.source.getTileBounds(e,r,o);return this.getFlip()&&(s.x=1-s.x-s.width),s.x+=(t-r)/n.x,s.y+=this._worldHeightCurrent/this._worldWidthCurrent*((i-o)/n.y),s},getContentSize:function(){return new e.Point(this.source.dimensions.x,this.source.dimensions.y)},getSizeInWindowCoordinates:function(){var t=this.imageToWindowCoordinates(new e.Point(0,0)),i=this.imageToWindowCoordinates(this.getContentSize());return new e.Point(i.x-t.x,i.y-t.y)},_viewportToImageDelta:function(t,i,n){var r=n?this._scaleSpring.current.value:this._scaleSpring.target.value;return new e.Point(t*(this.source.dimensions.x/r),i*(this.source.dimensions.y*this.contentAspectX/r))},viewportToImageCoordinates:function(t,i,n){var r;return t instanceof e.Point?(n=i,r=t):r=new e.Point(t,i),r=r.rotate(-this.getRotation(n),this._getRotationPoint(n)),n?this._viewportToImageDelta(r.x-this._xSpring.current.value,r.y-this._ySpring.current.value):this._viewportToImageDelta(r.x-this._xSpring.target.value,r.y-this._ySpring.target.value)},_imageToViewportDelta:function(t,i,n){var r=n?this._scaleSpring.current.value:this._scaleSpring.target.value;return new e.Point(t/this.source.dimensions.x*r,i/this.source.dimensions.y/this.contentAspectX*r)},imageToViewportCoordinates:function(t,i,n){t instanceof e.Point&&(n=i,i=t.y,t=t.x);var r=this._imageToViewportDelta(t,i);return n?(r.x+=this._xSpring.current.value,r.y+=this._ySpring.current.value):(r.x+=this._xSpring.target.value,r.y+=this._ySpring.target.value),r.rotate(this.getRotation(n),this._getRotationPoint(n))},imageToViewportRectangle:function(t,i,n,r,o){var s=t;s instanceof e.Rect?o=i:s=new e.Rect(t,i,n,r);var a=this.imageToViewportCoordinates(s.getTopLeft(),o),l=this._imageToViewportDelta(s.width,s.height,o);return new e.Rect(a.x,a.y,l.x,l.y,s.degrees+this.getRotation(o))},viewportToImageRectangle:function(t,i,n,r,o){var s=t;t instanceof e.Rect?o=i:s=new e.Rect(t,i,n,r);var a=this.viewportToImageCoordinates(s.getTopLeft(),o),l=this._viewportToImageDelta(s.width,s.height,o);return new e.Rect(a.x,a.y,l.x,l.y,s.degrees-this.getRotation(o))},viewerElementToImageCoordinates:function(e){var t=this.viewport.pointFromPixel(e,!0);return this.viewportToImageCoordinates(t)},imageToViewerElementCoordinates:function(e){var t=this.imageToViewportCoordinates(e);return this.viewport.pixelFromPoint(t,!0)},windowToImageCoordinates:function(e){var t=e.minus(s.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(t)},imageToWindowCoordinates:function(e){var t=this.imageToViewerElementCoordinates(e);return t.plus(s.getElementPosition(this.viewer.element))},_viewportToTiledImageRectangle:function(t){var i=this._scaleSpring.current.value;return t=t.rotate(-this.getRotation(!0),this._getRotationPoint(!0)),new e.Rect((t.x-this._xSpring.current.value)/i,(t.y-this._ySpring.current.value)/i,t.width/i,t.height/i,t.degrees)},viewportToImageZoom:function(e){var t=this._scaleSpring.current.value*this.viewport._containerInnerSize.x/this.source.dimensions.x;return t*e},imageToViewportZoom:function(e){var t=this._scaleSpring.current.value*this.viewport._containerInnerSize.x/this.source.dimensions.x;return e/t},setPosition:function(e,t){var i=this._xSpring.target.value===e.x&&this._ySpring.target.value===e.y;if(t){if(i&&this._xSpring.current.value===e.x&&this._ySpring.current.value===e.y)return;this._xSpring.resetTo(e.x),this._ySpring.resetTo(e.y),this._needsDraw=!0}else{if(i)return;this._xSpring.springTo(e.x),this._ySpring.springTo(e.y),this._needsDraw=!0}i||this._raiseBoundsChange()},setWidth:function(e,t){this._setScale(e,t)},setHeight:function(e,t){this._setScale(e/this.normHeight,t)},setCroppingPolygons:function(t){var i=function(t){return t instanceof e.Point||"number"===typeof t.x&&"number"===typeof t.y},n=function(e){return e.map((function(e){try{if(i(e))return{x:e.x,y:e.y};throw new Error}catch(t){throw new Error("A Provided cropping polygon point is not supported")}}))};try{if(!e.isArray(t))throw new Error("Provided cropping polygon is not an array");this._croppingPolygons=t.map((function(e){return n(e)}))}catch(r){e.console.error("[TiledImage.setCroppingPolygons] Cropping polygon format not supported"),e.console.error(r),this._croppingPolygons=null}},resetCroppingPolygons:function(){this._croppingPolygons=null},fitBounds:function(t,i,n){i=i||e.Placement.CENTER;var r=e.Placement.properties[i],o=this.contentAspectX,s=0,a=0,l=1,c=1;if(this._clip&&(o=this._clip.getAspectRatio(),l=this._clip.width/this.source.dimensions.x,c=this._clip.height/this.source.dimensions.y,t.getAspectRatio()>o?(s=this._clip.x/this._clip.height*t.height,a=this._clip.y/this._clip.height*t.height):(s=this._clip.x/this._clip.width*t.width,a=this._clip.y/this._clip.width*t.width)),t.getAspectRatio()>o){var u=t.height/c,h=0;r.isHorizontallyCentered?h=(t.width-t.height*o)/2:r.isRight&&(h=t.width-t.height*o),this.setPosition(new e.Point(t.x-s+h,t.y-a),n),this.setHeight(u,n)}else{var d=t.width/l,p=0;r.isVerticallyCentered?p=(t.height-t.width/o)/2:r.isBottom&&(p=t.height-t.width/o),this.setPosition(new e.Point(t.x-s,t.y-a+p),n),this.setWidth(d,n)}},getClip:function(){return this._clip?this._clip.clone():null},setClip:function(t){e.console.assert(!t||t instanceof e.Rect,"[TiledImage.setClip] newClip must be an OpenSeadragon.Rect or null"),t instanceof e.Rect?this._clip=t.clone():this._clip=null,this._needsDraw=!0,this.raiseEvent("clip-change")},getFlip:function(){return!!this.flipped},setFlip:function(e){this.flipped=!!e,this._needsDraw=!0,this._raiseBoundsChange()},getOpacity:function(){return this.opacity},setOpacity:function(e){e!==this.opacity&&(this.opacity=e,this._needsDraw=!0,this.raiseEvent("opacity-change",{opacity:this.opacity}))},getPreload:function(){return this._preload},setPreload:function(e){this._preload=!!e,this._needsDraw=!0},getRotation:function(e){return e?this._degreesSpring.current.value:this._degreesSpring.target.value},setRotation:function(e,t){this._degreesSpring.target.value===e&&this._degreesSpring.isAtTargetValue()||(t?this._degreesSpring.resetTo(e):this._degreesSpring.springTo(e),this._needsDraw=!0,this._raiseBoundsChange())},_getRotationPoint:function(e){return this.getBoundsNoRotate(e).getCenter()},getCompositeOperation:function(){return this.compositeOperation},setCompositeOperation:function(e){e!==this.compositeOperation&&(this.compositeOperation=e,this._needsDraw=!0,this.raiseEvent("composite-operation-change",{compositeOperation:this.compositeOperation}))},_setScale:function(e,t){var i=this._scaleSpring.target.value===e;if(t){if(i&&this._scaleSpring.current.value===e)return;this._scaleSpring.resetTo(e),this._updateForScale(),this._needsDraw=!0}else{if(i)return;this._scaleSpring.springTo(e),this._updateForScale(),this._needsDraw=!0}i||this._raiseBoundsChange()},_updateForScale:function(){this._worldWidthTarget=this._scaleSpring.target.value,this._worldHeightTarget=this.normHeight*this._scaleSpring.target.value,this._worldWidthCurrent=this._scaleSpring.current.value,this._worldHeightCurrent=this.normHeight*this._scaleSpring.current.value},_raiseBoundsChange:function(){this.raiseEvent("bounds-change")},_isBottomItem:function(){return this.viewer.world.getItemAt(0)===this},_getLevelsInterval:function(){var e=Math.max(this.source.minLevel,Math.floor(Math.log(this.minZoomImageRatio)/Math.log(2))),t=this.viewport.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(0),!0).x*this._scaleSpring.current.value,i=Math.min(Math.abs(this.source.maxLevel),Math.abs(Math.floor(Math.log(t/this.minPixelRatio)/Math.log(2))));return i=Math.max(i,this.source.minLevel||0),e=Math.min(e,i),{lowestLevel:e,highestLevel:i}},_updateViewport:function(){this._needsDraw=!1,this._tilesLoading=0,this.loadingCoverage={};while(this.lastDrawn.length>0){var t=this.lastDrawn.pop();t.beingDrawn=!1}var i=this.viewport,n=this._viewportToTiledImageRectangle(i.getBoundsWithMargins(!0));if(!this.wrapHorizontal&&!this.wrapVertical){var r=this._viewportToTiledImageRectangle(this.getClippedBounds(!0));if(n=n.intersection(r),null===n)return}for(var o=this._getLevelsInterval(),s=o.lowestLevel,a=o.highestLevel,l=null,c=!1,u=e.now(),h=a;h>=s;h--){var d=!1,p=i.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(h),!0).x*this._scaleSpring.current.value;if(h===s||!c&&p>=this.minPixelRatio)d=!0,c=!0;else if(!c)continue;var f=i.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(h),!1).x*this._scaleSpring.current.value,v=i.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(Math.max(this.source.getClosestLevel(),0)),!1).x*this._scaleSpring.current.value,g=this.immediateRender?1:v,m=Math.min(1,(p-.5)/.5),y=g/Math.abs(g-f);if(l=this._updateLevel(c,d,h,m,y,n,u,l),this._providesCoverage(this.coverage,h))break}this._drawTiles(this.lastDrawn),l&&!l.context2D?(this._loadTile(l,u),this._needsDraw=!0,this._setFullyLoaded(!1)):this._setFullyLoaded(0===this._tilesLoading)},_getCornerTiles:function(t,i,n){var r,o,s,a;this.wrapHorizontal?(r=e.positiveModulo(i.x,1),o=e.positiveModulo(n.x,1)):(r=Math.max(0,i.x),o=Math.min(1,n.x));var l=1/this.source.aspectRatio;this.wrapVertical?(s=e.positiveModulo(i.y,l),a=e.positiveModulo(n.y,l)):(s=Math.max(0,i.y),a=Math.min(l,n.y));var c=this.source.getTileAtPoint(t,new e.Point(r,s)),u=this.source.getTileAtPoint(t,new e.Point(o,a)),h=this.source.getNumTiles(t);return this.wrapHorizontal&&(c.x+=h.x*Math.floor(i.x),u.x+=h.x*Math.floor(n.x)),this.wrapVertical&&(c.y+=h.y*Math.floor(i.y/l),u.y+=h.y*Math.floor(n.y/l)),{topLeft:c,bottomRight:u}},_updateLevel:function(e,t,i,n,r,o,s,a){var l=o.getBoundingBox().getTopLeft(),c=o.getBoundingBox().getBottomRight();this.viewer&&this.viewer.raiseEvent("update-level",{tiledImage:this,havedrawn:e,level:i,opacity:n,visibility:r,drawArea:o,topleft:l,bottomright:c,currenttime:s,best:a}),this._resetCoverage(this.coverage,i),this._resetCoverage(this.loadingCoverage,i);var u=this._getCornerTiles(i,l,c),h=u.topLeft,d=u.bottomRight,p=this.source.getNumTiles(i),f=this.viewport.pixelFromPoint(this.viewport.getCenter());this.getFlip()&&(d.x+=1,this.wrapHorizontal||(d.x=Math.min(d.x,p.x-1)));for(var v=h.x;v<=d.x;v++)for(var g=h.y;g<=d.y;g++){var m;if(this.getFlip()){var y=(p.x+v%p.x)%p.x;m=v+p.x-y-y-1}else m=v;null!==o.intersection(this.getTileBounds(i,m,g))&&(a=this._updateTile(t,e,m,g,i,n,r,f,p,s,a))}return a},_updateTile:function(e,t,i,n,r,o,s,a,l,c,u){var h=this._getTile(i,n,r,c,l,this._worldWidthCurrent,this._worldHeightCurrent),d=t;this.viewer&&this.viewer.raiseEvent("update-tile",{tiledImage:this,tile:h}),this._setCoverage(this.coverage,r,i,n,!1);var p=h.loaded||h.loading||this._isCovered(this.loadingCoverage,r,i,n);if(this._setCoverage(this.loadingCoverage,r,i,n,p),!h.exists)return u;if(e&&!d&&(this._isCovered(this.coverage,r,i,n)?this._setCoverage(this.coverage,r,i,n,!0):d=!0),!d)return u;if(this._positionTile(h,this.source.tileOverlap,this.viewport,a,s),!h.loaded)if(h.context2D)this._setTileLoaded(h);else{var f=this._tileCache.getImageRecord(h.cacheKey);if(f){var v=f.getImage();this._setTileLoaded(h,v)}}if(h.loaded){var g=this._blendTile(h,i,n,r,o,c);g&&(this._needsDraw=!0)}else h.loading?this._tilesLoading++:p||(u=this._compareTiles(u,h));return u},_getTile:function(t,i,n,r,o,s,a){var l,c,u,h,d,p,f,v,g,m,y=this.tilesMatrix,w=this.source;return y[n]||(y[n]={}),y[n][t]||(y[n][t]={}),y[n][t][i]&&!y[n][t][i].flipped===!this.flipped||(l=(o.x+t%o.x)%o.x,c=(o.y+i%o.y)%o.y,u=this.getTileBounds(n,t,i),h=w.getTileBounds(n,l,c,!0),d=w.tileExists(n,l,c),p=w.getTileUrl(n,l,c),f=w.getTilePostData(n,l,c),this.loadTilesWithAjax?(v=w.getTileAjaxHeaders(n,l,c),e.isPlainObject(this.ajaxHeaders)&&(v=e.extend({},this.ajaxHeaders,v))):v=null,g=w.getContext2D?w.getContext2D(n,l,c):void 0,m=new e.Tile(n,t,i,u,d,p,g,this.loadTilesWithAjax,v,h,f,w.getTileHashKey(n,l,c,p,v,f)),this.getFlip()?0===l&&(m.isRightMost=!0):l===o.x-1&&(m.isRightMost=!0),c===o.y-1&&(m.isBottomMost=!0),m.flipped=this.flipped,y[n][t][i]=m),m=y[n][t][i],m.lastTouchTime=r,m},_loadTile:function(e,t){var i=this;e.loading=!0,this._imageLoader.addJob({src:e.url,postData:e.postData,loadWithAjax:e.loadWithAjax,ajaxHeaders:e.ajaxHeaders,crossOriginPolicy:this.crossOriginPolicy,ajaxWithCredentials:this.ajaxWithCredentials,callback:function(n,r,o){i._onTileLoad(e,t,n,r,o)},abort:function(){e.loading=!1}})},_onTileLoad:function(t,i,n,r,o){if(!n)return e.console.error("Tile %s failed to load: %s - error: %s",t,t.url,r),this.viewer.raiseEvent("tile-load-failed",{tile:t,tiledImage:this,time:i,message:r,tileRequest:o}),t.loading=!1,void(t.exists=!1);if(ie.visibility||t.visibility===e.visibility&&t.squaredDistance1&&c>this.smoothTileEdgesMinZoom&&!this.iOSDevice&&this.getRotation(!0)%360===0&&e.supportsCanvas&&this.viewer.useCanvas&&(i=!0,n=s.getScaleForEdgeSmoothing(),o=s.getTranslationForEdgeSmoothing(n,this._drawer.getCanvasSize(!1),this._drawer.getCanvasSize(!0))),i&&(n||(a=this.viewport.viewportToViewerElementRectangle(this.getClippedBounds(!0)).getIntegerBoundingBox(),this._drawer.viewer.viewport.getFlip()&&(0===this.viewport.degrees&&this.getRotation(!0)%360===0||(a.x=this._drawer.viewer.container.clientWidth-(a.x+a.width))),a=a.times(e.pixelDensityRatio)),this._drawer._clear(!0,a)),n||(0!==this.viewport.degrees&&this._drawer._offsetForRotation({degrees:this.viewport.degrees,useSketch:i}),this.getRotation(!0)%360!==0&&this._drawer._offsetForRotation({degrees:this.getRotation(!0),point:this.viewport.pixelFromPointNoRotate(this._getRotationPoint(!0),!0),useSketch:i}),0===this.viewport.degrees&&this.getRotation(!0)%360===0&&this._drawer.viewer.viewport.getFlip()&&this._drawer._flip());var u=!1;if(this._clip){this._drawer.saveContext(i);var h=this.imageToViewportRectangle(this._clip,!0);h=h.rotate(-this.getRotation(!0),this._getRotationPoint(!0));var d=this._drawer.viewportToDrawerRectangle(h);n&&(d=d.times(n)),o&&(d=d.translate(o)),this._drawer.setClip(d,i),u=!0}if(this._croppingPolygons){this._drawer.saveContext(i);try{var p=this._croppingPolygons.map((function(e){return e.map((function(e){var t=this.imageToViewportCoordinates(e.x,e.y,!0).rotate(-this.getRotation(!0),this._getRotationPoint(!0)),i=this._drawer.viewportCoordToDrawerCoord(t);return n&&(i=i.times(n)),i}))}));this._drawer.clipWithPolygons(p,i)}catch(x){e.console.error(x)}u=!0}if(this.placeholderFillStyle&&!1===this._hasOpaqueTile){var f=this._drawer.viewportToDrawerRectangle(this.getBounds(!0));n&&(f=f.times(n)),o&&(f=f.translate(o));var v=null;v="function"===typeof this.placeholderFillStyle?this.placeholderFillStyle(this,this._drawer.context):this.placeholderFillStyle,this._drawer.drawRectangle(f,v,i)}var g=r(this.subPixelRoundingForTransparency),m=!1;if(g===e.SUBPIXEL_ROUNDING_OCCURRENCES.ALWAYS)m=!0;else if(g===e.SUBPIXEL_ROUNDING_OCCURRENCES.ONLY_AT_REST){var y=this.viewer&&this.viewer.isAnimating();m=!y}for(var w=t.length-1;w>=0;w--)s=t[w],this._drawer.drawTile(s,this._drawingHandler,i,n,o,m),s.beingDrawn=!0,this.viewer&&this.viewer.raiseEvent("tile-drawn",{tiledImage:this,tile:s});u&&this._drawer.restoreContext(i),n||(this.getRotation(!0)%360!==0&&this._drawer._restoreRotationChanges(i),0!==this.viewport.degrees&&this._drawer._restoreRotationChanges(i)),i&&(n&&(0!==this.viewport.degrees&&this._drawer._offsetForRotation({degrees:this.viewport.degrees,useSketch:!1}),this.getRotation(!0)%360!==0&&this._drawer._offsetForRotation({degrees:this.getRotation(!0),point:this.viewport.pixelFromPointNoRotate(this._getRotationPoint(!0),!0),useSketch:!1})),this._drawer.blendSketch({opacity:this.opacity,scale:n,translate:o,compositeOperation:this.compositeOperation,bounds:a}),n&&(this.getRotation(!0)%360!==0&&this._drawer._restoreRotationChanges(!1),0!==this.viewport.degrees&&this._drawer._restoreRotationChanges(!1))),n||0===this.viewport.degrees&&this.getRotation(!0)%360===0&&this._drawer.viewer.viewport.getFlip()&&this._drawer._flip(),this._drawDebugInfo(t)}},_drawDebugInfo:function(t){if(this.debugMode)for(var i=t.length-1;i>=0;i--){var n=t[i];try{this._drawer.drawDebugInfo(n,t.length,i,this)}catch(r){e.console.error(r)}}},_providesCoverage:function(e,t,i,n){var r,o,s,a;if(!e[t])return!1;if(void 0===i||void 0===n){for(s in r=e[t],r)if(Object.prototype.hasOwnProperty.call(r,s))for(a in o=r[s],o)if(Object.prototype.hasOwnProperty.call(o,a)&&!o[a])return!1;return!0}return void 0===e[t][i]||void 0===e[t][i][n]||!0===e[t][i][n]},_isCovered:function(e,t,i,n){return void 0===i||void 0===n?this._providesCoverage(e,t+1):this._providesCoverage(e,t+1,2*i,2*n)&&this._providesCoverage(e,t+1,2*i,2*n+1)&&this._providesCoverage(e,t+1,2*i+1,2*n)&&this._providesCoverage(e,t+1,2*i+1,2*n+1)},_setCoverage:function(t,i,n,r,o){t[i]?(t[i][n]||(t[i][n]={}),t[i][n][r]=o):e.console.warn("Setting coverage for a tile before its level's coverage has been reset: %s",i)},_resetCoverage:function(e,t){e[t]={}}});var t=e.SUBPIXEL_ROUNDING_OCCURRENCES.NEVER;function i(t){return t!==e.SUBPIXEL_ROUNDING_OCCURRENCES.ALWAYS&&t!==e.SUBPIXEL_ROUNDING_OCCURRENCES.ONLY_AT_REST&&t!==e.SUBPIXEL_ROUNDING_OCCURRENCES.NEVER}function n(e){return i(e)?t:e}function r(r){if("number"===typeof r)return n(r);if(!r||!e.Browser)return t;var o=r[e.Browser.vendor];return i(o)&&(o=r["*"]),n(o)}}(s),function(e){var t=function(t){e.console.assert(t,"[TileCache.cacheTile] options is required"),e.console.assert(t.tile,"[TileCache.cacheTile] options.tile is required"),e.console.assert(t.tiledImage,"[TileCache.cacheTile] options.tiledImage is required"),this.tile=t.tile,this.tiledImage=t.tiledImage},i=function(t){e.console.assert(t,"[ImageRecord] options is required"),e.console.assert(t.image,"[ImageRecord] options.image is required"),this._image=t.image,this._tiles=[]};i.prototype={destroy:function(){this._image=null,this._renderedContext=null,this._tiles=null},getImage:function(){return this._image},getRenderedContext:function(){if(!this._renderedContext){var e=document.createElement("canvas");e.width=this._image.width,e.height=this._image.height,this._renderedContext=e.getContext("2d"),this._renderedContext.drawImage(this._image,0,0),this._image=null}return this._renderedContext},setRenderedContext:function(t){e.console.error("ImageRecord.setRenderedContext is deprecated. The rendered context should be created by the ImageRecord itself when calling ImageRecord.getRenderedContext."),this._renderedContext=t},addTile:function(t){e.console.assert(t,"[ImageRecord.addTile] tile is required"),this._tiles.push(t)},removeTile:function(t){for(var i=0;ithis._maxImageCacheCount){for(var a,l,c,u,h,d,p=null,f=-1,v=null,g=this._tilesLoaded.length-1;g>=0;g--)d=this._tilesLoaded[g],a=d.tile,a.level<=r||a.beingDrawn||(p?(u=a.lastTouchTime,l=p.lastTouchTime,h=a.level,c=p.level,(uc)&&(p=a,f=g,v=d)):(p=a,f=g,v=d));p&&f>=0&&(this._unloadTile(v),o=f)}this._tilesLoaded[o]=new t({tile:n.tile,tiledImage:n.tiledImage})},clearTilesFor:function(t){var i;e.console.assert(t,"[TileCache.clearTilesFor] tiledImage is required");for(var n=0;n=this._items.length)throw new Error("Index bigger than number of layers.");i!==n&&-1!==n&&(this._items.splice(n,1),this._items.splice(i,0,t),this._needsDraw=!0,this.raiseEvent("item-index-change",{item:t,previousIndex:n,newIndex:i}))},removeItem:function(t){e.console.assert(t,"[World.removeItem] item is required");var i=e.indexOf(this._items,t);-1!==i&&(t.removeHandler("bounds-change",this._delegatedFigureSizes),t.removeHandler("clip-change",this._delegatedFigureSizes),t.destroy(),this._items.splice(i,1),this._figureSizes(),this._needsDraw=!0,this._raiseRemoveItem(t))},removeAll:function(){var e,t;for(this.viewer._cancelPendingImages(),t=0;th.height?a:a*(h.width/h.height),p=d*(h.height/h.width),f=new e.Point(v+(a-d)/2,g+(a-p)/2),u.setPosition(f,n),u.setWidth(d,n),"horizontal"===r?v+=c:g+=c;this.setAutoRefigureSizes(!0)},_figureSizes:function(){var t=this._homeBounds?this._homeBounds.clone():null,i=this._contentSize?this._contentSize.clone():null,n=this._contentFactor||0;if(this._items.length){var r=this._items[0],o=r.getBounds();this._contentFactor=r.getContentSize().x/o.width;for(var s=r.getClippedBounds().getBoundingBox(),a=s.x,l=s.y,c=s.x+s.width,u=s.y+s.height,h=1;h0?n:i)(t)}},b50d:function(e,t,i){"use strict";var n=i("c532"),r=i("467f"),o=i("7aac"),s=i("30b5"),a=i("83b9"),l=i("c345"),c=i("3934"),u=i("cafa"),h=i("7917"),d=i("fb60"),p=i("b68a");e.exports=function(e){return new Promise((function(t,i){var f,v=e.data,g=e.headers,m=e.responseType;function y(){e.cancelToken&&e.cancelToken.unsubscribe(f),e.signal&&e.signal.removeEventListener("abort",f)}n.isFormData(v)&&n.isStandardBrowserEnv()&&delete g["Content-Type"];var w=new XMLHttpRequest;if(e.auth){var x=e.auth.username||"",b=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";g.Authorization="Basic "+btoa(x+":"+b)}var _=a(e.baseURL,e.url);function T(){if(w){var n="getAllResponseHeaders"in w?l(w.getAllResponseHeaders()):null,o=m&&"text"!==m&&"json"!==m?w.response:w.responseText,s={data:o,status:w.status,statusText:w.statusText,headers:n,config:e,request:w};r((function(e){t(e),y()}),(function(e){i(e),y()}),s),w=null}}if(w.open(e.method.toUpperCase(),s(_,e.params,e.paramsSerializer),!0),w.timeout=e.timeout,"onloadend"in w?w.onloadend=T:w.onreadystatechange=function(){w&&4===w.readyState&&(0!==w.status||w.responseURL&&0===w.responseURL.indexOf("file:"))&&setTimeout(T)},w.onabort=function(){w&&(i(new h("Request aborted",h.ECONNABORTED,e,w)),w=null)},w.onerror=function(){i(new h("Network Error",h.ERR_NETWORK,e,w,w)),w=null},w.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||u;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),i(new h(t,n.clarifyTimeoutError?h.ETIMEDOUT:h.ECONNABORTED,e,w)),w=null},n.isStandardBrowserEnv()){var S=(e.withCredentials||c(_))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;S&&(g[e.xsrfHeaderName]=S)}"setRequestHeader"in w&&n.forEach(g,(function(e,t){"undefined"===typeof v&&"content-type"===t.toLowerCase()?delete g[t]:w.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(w.withCredentials=!!e.withCredentials),m&&"json"!==m&&(w.responseType=e.responseType),"function"===typeof e.onDownloadProgress&&w.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&w.upload&&w.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(f=function(e){w&&(i(!e||e&&e.type?new d:e),w.abort(),w=null)},e.cancelToken&&e.cancelToken.subscribe(f),e.signal&&(e.signal.aborted?f():e.signal.addEventListener("abort",f))),v||(v=null);var E=p(_);E&&-1===["http","https","file"].indexOf(E)?i(new h("Unsupported protocol "+E+":",h.ERR_BAD_REQUEST,e)):w.send(v)}))}},b622:function(e,t,i){var n=i("da84"),r=i("5692"),o=i("1a2d"),s=i("90e3"),a=i("4930"),l=i("fdbf"),c=r("wks"),u=n.Symbol,h=u&&u["for"],d=l?u:u&&u.withoutSetter||s;e.exports=function(e){if(!o(c,e)||!a&&"string"!=typeof c[e]){var t="Symbol."+e;a&&o(u,e)?c[e]=u[e]:c[e]=l&&h?h(t):d(t)}return c[e]}},b639:function(e,t,i){"use strict";(function(e){ +function s(e){return new s.Viewer(e)}(function(e){e.version={versionStr:"3.0.0",major:parseInt("3",10),minor:parseInt("0",10),revision:parseInt("0",10)};var t={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object"},i=Object.prototype.toString,n=Object.prototype.hasOwnProperty;e.isFunction=function(t){return"function"===e.type(t)},e.isArray=Array.isArray||function(t){return"array"===e.type(t)},e.isWindow=function(e){return e&&"object"===typeof e&&"setInterval"in e},e.type=function(e){return null===e||void 0===e?String(e):t[i.call(e)]||"object"},e.isPlainObject=function(t){if(!t||"object"!==s.type(t)||t.nodeType||e.isWindow(t))return!1;if(t.constructor&&!n.call(t,"constructor")&&!n.call(t.constructor.prototype,"isPrototypeOf"))return!1;var i;for(var r in t)i=r;return void 0===i||n.call(t,i)},e.isEmptyObject=function(e){for(var t in e)return!1;return!0},e.freezeObject=function(t){return Object.freeze?e.freezeObject=Object.freeze:e.freezeObject=function(e){return e},e.freezeObject(t)},e.supportsCanvas=function(){var t=document.createElement("canvas");return!(!e.isFunction(t.getContext)||!t.getContext("2d"))}(),e.isCanvasTainted=function(e){var t=!1;try{e.getContext("2d").getImageData(0,0,1,1)}catch(i){t=!0}return t},e.supportsAddEventListener=function(){return!(!document.documentElement.addEventListener||!document.addEventListener)}(),e.supportsRemoveEventListener=function(){return!(!document.documentElement.removeEventListener||!document.removeEventListener)}(),e.supportsEventListenerOptions=function(){var t=0;if(e.supportsAddEventListener)try{var i={get capture(){return t++,!1},get once(){return t++,!1},get passive(){return t++,!1}};window.addEventListener("test",null,i),window.removeEventListener("test",null,i)}catch(n){t=0}return t>=3}(),e.getCurrentPixelDensityRatio=function(){if(e.supportsCanvas){var t=document.createElement("canvas").getContext("2d"),i=window.devicePixelRatio||1,n=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return Math.max(i,1)/n}return 1},e.pixelDensityRatio=e.getCurrentPixelDensityRatio()})(s),function(e){e.extend=function(){var e,t,i,n,r,o,a=arguments[0]||{},l=arguments.length,c=!1,u=1;for("boolean"===typeof a&&(c=a,a=arguments[1]||{},u=2),"object"===typeof a||s.isFunction(a)||(a={}),l===u&&(a=this,--u);u=n.x&&i.x=n.y},getMousePosition:function(t){if("number"===typeof t.pageX)e.getMousePosition=function(t){var i=new e.Point;return i.x=t.pageX,i.y=t.pageY,i};else{if("number"!==typeof t.clientX)throw new Error("Unknown event mouse position, no known technique.");e.getMousePosition=function(t){var i=new e.Point;return i.x=t.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,i.y=t.clientY+document.body.scrollTop+document.documentElement.scrollTop,i}}return e.getMousePosition(t)},getPageScroll:function(){var t=document.documentElement||{},i=document.body||{};if("number"===typeof window.pageXOffset)e.getPageScroll=function(){return new e.Point(window.pageXOffset,window.pageYOffset)};else if(i.scrollLeft||i.scrollTop)e.getPageScroll=function(){return new e.Point(document.body.scrollLeft,document.body.scrollTop)};else{if(!t.scrollLeft&&!t.scrollTop)return new e.Point(0,0);e.getPageScroll=function(){return new e.Point(document.documentElement.scrollLeft,document.documentElement.scrollTop)}}return e.getPageScroll()},setPageScroll:function(t){if("undefined"!==typeof window.scrollTo)e.setPageScroll=function(e){window.scrollTo(e.x,e.y)};else{var i=e.getPageScroll();if(i.x===t.x&&i.y===t.y)return;document.body.scrollLeft=t.x,document.body.scrollTop=t.y;var n=e.getPageScroll();if(n.x!==i.x&&n.y!==i.y)return void(e.setPageScroll=function(e){document.body.scrollLeft=e.x,document.body.scrollTop=e.y});if(document.documentElement.scrollLeft=t.x,document.documentElement.scrollTop=t.y,n=e.getPageScroll(),n.x!==i.x&&n.y!==i.y)return void(e.setPageScroll=function(e){document.documentElement.scrollLeft=e.x,document.documentElement.scrollTop=e.y});e.setPageScroll=function(e){}}e.setPageScroll(t)},getWindowSize:function(){var t=document.documentElement||{},i=document.body||{};if("number"===typeof window.innerWidth)e.getWindowSize=function(){return new e.Point(window.innerWidth,window.innerHeight)};else if(t.clientWidth||t.clientHeight)e.getWindowSize=function(){return new e.Point(document.documentElement.clientWidth,document.documentElement.clientHeight)};else{if(!i.clientWidth&&!i.clientHeight)throw new Error("Unknown window size, no known technique.");e.getWindowSize=function(){return new e.Point(document.body.clientWidth,document.body.clientHeight)}}return e.getWindowSize()},makeCenteredNode:function(t){t=e.getElement(t);var i=[e.makeNeutralElement("div"),e.makeNeutralElement("div"),e.makeNeutralElement("div")];return e.extend(i[0].style,{display:"table",height:"100%",width:"100%"}),e.extend(i[1].style,{display:"table-row"}),e.extend(i[2].style,{display:"table-cell",verticalAlign:"middle",textAlign:"center"}),i[0].appendChild(i[1]),i[1].appendChild(i[2]),i[2].appendChild(t),i[0]},makeNeutralElement:function(e){var t=document.createElement(e),i=t.style;return i.background="transparent none",i.border="none",i.margin="0px",i.padding="0px",i.position="static",t},now:function(){return Date.now?e.now=Date.now:e.now=function(){return(new Date).getTime()},e.now()},makeTransparentImage:function(t){var i=e.makeNeutralElement("img");return i.src=t,i},setElementOpacity:function(t,i,n){var r,o;t=e.getElement(t),n&&!e.Browser.alpha&&(i=Math.round(i)),e.Browser.opacity?t.style.opacity=i<1?i:"":i<1?(r=Math.round(100*i),o="alpha(opacity="+r+")",t.style.filter=o):t.style.filter=""},setElementTouchActionNone:function(t){t=e.getElement(t),"undefined"!==typeof t.style.touchAction?t.style.touchAction="none":"undefined"!==typeof t.style.msTouchAction&&(t.style.msTouchAction="none")},setElementPointerEvents:function(t,i){t=e.getElement(t),"undefined"!==typeof t.style.pointerEvents&&(t.style.pointerEvents=i)},setElementPointerEventsNone:function(t){e.setElementPointerEvents(t,"none")},addClass:function(t,i){t=e.getElement(t),t.className?-1===(" "+t.className+" ").indexOf(" "+i+" ")&&(t.className+=" "+i):t.className=i},indexOf:function(e,t,i){return Array.prototype.indexOf?this.indexOf=function(e,t,i){return e.indexOf(t,i)}:this.indexOf=function(e,t,i){var n,r,o=i||0;if(!e)throw new TypeError;if(r=e.length,0===r||o>=r)return-1;for(o<0&&(o=r-Math.abs(o)),n=o;n=200&&l.status<300||0===l.status&&"http:"!==a&&"https:"!==a?i(l):(e.console.log("AJAX request returned %d: %s",l.status,t),e.isFunction(n)&&n(l)))};try{if(l.open("GET",t,!0),s&&(l.responseType=s),o)for(var c in o)Object.prototype.hasOwnProperty.call(o,c)&&o[c]&&l.setRequestHeader(c,o[c]);r&&(l.withCredentials=!0),l.send(null)}catch(u){e.console.log("%s while making AJAX request: %s",u.name,u.message),l.onreadystatechange=function(){},e.isFunction(n)&&n(l,u)}return l},jsonp:function(t){var i,n=t.url,r=document.head||document.getElementsByTagName("head")[0]||document.documentElement,o=t.callbackName||"openseadragon"+e.now(),s=window[o],a="$1"+o+"$2",l=t.param||"callback",c=t.callback;n=n.replace(/(=)\?(&|$)|\?\?/i,a),n+=(/\?/.test(n)?"&":"?")+l+"="+o,window[o]=function(t){if(s)window[o]=s;else try{delete window[o]}catch(i){}c&&e.isFunction(c)&&c(t)},i=document.createElement("script"),void 0===t.async&&!1===t.async||(i.async="async"),t.scriptCharset&&(i.charset=t.scriptCharset),i.src=n,i.onload=i.onreadystatechange=function(e,t){(t||!i.readyState||/loaded|complete/.test(i.readyState))&&(i.onload=i.onreadystatechange=null,r&&i.parentNode&&r.removeChild(i),i=void 0)},r.insertBefore(i,r.firstChild)},createFromDZI:function(){throw"OpenSeadragon.createFromDZI is deprecated, use Viewer.open."},parseXml:function(t){if(window.DOMParser)e.parseXml=function(e){var t,i=null;return t=new DOMParser,i=t.parseFromString(e,"text/xml"),i};else{if(!window.ActiveXObject)throw new Error("Browser doesn't support XML DOM.");e.parseXml=function(e){var t=null;return t=new ActiveXObject("Microsoft.XMLDOM"),t.async=!1,t.loadXML(e),t}}return e.parseXml(t)},parseJSON:function(t){return e.parseJSON=window.JSON.parse,e.parseJSON(t)},imageFormatSupported:function(e){return e=e||"",!!n[e.toLowerCase()]},setImageFormatsSupported:function(t){e.extend(n,t)}});var i=function(e){};e.console=window.console||{log:i,debug:i,info:i,warn:i,error:i,assert:i},e.Browser={vendor:e.BROWSERS.UNKNOWN,version:0,alpha:!0};var n={bmp:!1,jpeg:!0,jpg:!0,png:!0,tif:!1,wdp:!1},r={};function o(e,t){return t&&e!==document.body?document.body:e.offsetParent}(function(){var t,i=navigator.appVersion,n=navigator.userAgent;switch(navigator.appName){case"Microsoft Internet Explorer":window.attachEvent&&window.ActiveXObject&&(e.Browser.vendor=e.BROWSERS.IE,e.Browser.version=parseFloat(n.substring(n.indexOf("MSIE")+5,n.indexOf(";",n.indexOf("MSIE")))));break;case"Netscape":window.addEventListener&&(n.indexOf("Edge")>=0?(e.Browser.vendor=e.BROWSERS.EDGE,e.Browser.version=parseFloat(n.substring(n.indexOf("Edge")+5))):n.indexOf("Edg")>=0?(e.Browser.vendor=e.BROWSERS.CHROMEEDGE,e.Browser.version=parseFloat(n.substring(n.indexOf("Edg")+4))):n.indexOf("Firefox")>=0?(e.Browser.vendor=e.BROWSERS.FIREFOX,e.Browser.version=parseFloat(n.substring(n.indexOf("Firefox")+8))):n.indexOf("Safari")>=0?(e.Browser.vendor=n.indexOf("Chrome")>=0?e.BROWSERS.CHROME:e.BROWSERS.SAFARI,e.Browser.version=parseFloat(n.substring(n.substring(0,n.indexOf("Safari")).lastIndexOf("/")+1,n.indexOf("Safari")))):(t=new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})"),null!==t.exec(n)&&(e.Browser.vendor=e.BROWSERS.IE,e.Browser.version=parseFloat(RegExp.$1))));break;case"Opera":e.Browser.vendor=e.BROWSERS.OPERA,e.Browser.version=parseFloat(i);break}var o,s,a,l=window.location.search.substring(1),c=l.split("&");for(a=0;a0){var u=o.substring(0,s),h=o.substring(s+1);try{r[u]=decodeURIComponent(h)}catch(d){e.console.error("Ignoring malformed URL parameter: %s=%s",u,h)}}e.Browser.alpha=!(e.Browser.vendor===e.BROWSERS.CHROME&&e.Browser.version<2),e.Browser.opacity=!0,e.Browser.vendor===e.BROWSERS.IE&&e.Browser.version<11&&e.console.error("Internet Explorer versions < 11 are not supported by OpenSeadragon")})(),function(t){var i=t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame,n=t.cancelAnimationFrame||t.mozCancelAnimationFrame||t.webkitCancelAnimationFrame||t.msCancelAnimationFrame;if(i&&n)e.requestAnimationFrame=function(){return i.apply(t,arguments)},e.cancelAnimationFrame=function(){return n.apply(t,arguments)};else{var r,o=[],s=[],a=0;e.requestAnimationFrame=function(t){return o.push([++a,t]),r||(r=setInterval((function(){if(o.length){var t=e.now(),i=s;s=o,o=i;while(s.length)s.shift()[1](t)}else clearInterval(r),r=void 0}),20)),a},e.cancelAnimationFrame=function(e){var t,i;for(t=0,i=o.length;t0){for(s=[],o=r.asArray(),n=0;ni.touches.length-s&&e.console.warn("Tracked touch contact count doesn't match event.touches.length");var l={originalEvent:i,eventType:"pointerdown",pointerType:"touch",isEmulated:!1};for(J(t,l),r=0;r0&&i.removeContact(),r=i.removeById(n.id)):r=i.getLength(),r}function Q(e,t){switch(t.eventType){case"pointermove":t.isStoppable=!0,t.isCancelable=!0,t.preventDefault=!1,t.preventGesture=!e.hasGestureHandlers,t.stopPropagation=!1;break;case"pointerover":case"pointerout":case"contextmenu":case"keydown":case"keyup":case"keypress":t.isStoppable=!0,t.isCancelable=!0,t.preventDefault=!1,t.preventGesture=!1,t.stopPropagation=!1;break;case"pointerdown":t.isStoppable=!0,t.isCancelable=!0,t.preventDefault=!1,t.preventGesture=!e.hasGestureHandlers,t.stopPropagation=!1;break;case"pointerup":t.isStoppable=!0,t.isCancelable=!0,t.preventDefault=!1,t.preventGesture=!e.hasGestureHandlers,t.stopPropagation=!1;break;case"wheel":t.isStoppable=!0,t.isCancelable=!0,t.preventDefault=!1,t.preventGesture=!e.hasScrollHandler,t.stopPropagation=!1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":t.isStoppable=!0,t.isCancelable=!1,t.preventDefault=!1,t.preventGesture=!1,t.stopPropagation=!1;break;case"click":t.isStoppable=!0,t.isCancelable=!0,t.preventDefault=!!e.clickHandler,t.preventGesture=!1,t.stopPropagation=!1;break;case"dblclick":t.isStoppable=!0,t.isCancelable=!0,t.preventDefault=!!e.dblClickHandler,t.preventGesture=!1,t.stopPropagation=!1;break;case"focus":case"blur":case"pointerenter":case"pointerleave":default:t.isStoppable=!1,t.isCancelable=!1,t.preventDefault=!1,t.preventGesture=!1,t.stopPropagation=!1;break}}function J(t,i){i.eventSource=t,i.eventPhase=i.originalEvent&&"undefined"!==typeof i.originalEvent.eventPhase?i.originalEvent.eventPhase:0,i.defaultPrevented=e.eventIsCanceled(i.originalEvent),i.shouldCapture=!1,i.shouldReleaseCapture=!1,i.userData=t.userData,Q(t,i),t.preProcessEventHandler&&t.preProcessEventHandler(i)}function ee(t,i,n){var r=t.getActivePointersListByType(i.type),o=r.getById(i.id);o?n&&!o.captured?(o.captured=!0,r.captureCount++):!n&&o.captured&&(o.captured=!1,r.captureCount--,r.captureCount<0&&(r.captureCount=0,e.console.warn("updatePointerCaptured() - pointsList.captureCount went negative"))):e.console.warn("updatePointerCaptured() called on untracked pointer")}function te(e,t,i){var n,r=e.getActivePointersListByType(i.type);n=r.getById(i.id),n?(n.insideElement=!0,n.lastPos=n.currentPos,n.lastTime=n.currentTime,n.currentPos=i.currentPos,n.currentTime=i.currentTime,i=n):(i.captured=!1,i.insideElementPressed=!1,i.insideElement=!0,Y(r,i)),e.enterHandler&&e.enterHandler({eventSource:e,pointerType:i.type,position:g(i.currentPos,e.element),buttons:r.buttons,pointers:e.getActivePointerCount(),insideElementPressed:i.insideElementPressed,buttonDownAny:0!==r.buttons,isTouchEvent:"touch"===i.type,originalEvent:t.originalEvent,userData:e.userData})}function ie(e,t,i){var n,r,o=e.getActivePointersListByType(i.type);n=o.getById(i.id),n?(n.captured?(n.insideElement=!1,n.lastPos=n.currentPos,n.lastTime=n.currentTime,n.currentPos=i.currentPos,n.currentTime=i.currentTime):K(e,o,n),i=n):(i.captured=!1,i.insideElementPressed=!1),(e.leaveHandler||e.exitHandler)&&(r={eventSource:e,pointerType:i.type,position:i.currentPos&&g(i.currentPos,e.element),buttons:o.buttons,pointers:e.getActivePointerCount(),insideElementPressed:i.insideElementPressed,buttonDownAny:0!==o.buttons,isTouchEvent:"touch"===i.type,originalEvent:t.originalEvent,userData:e.userData},e.leaveHandler&&e.leaveHandler(r),e.exitHandler&&e.exitHandler(r))}function ne(e,t,i){var n,r;n=e.getActivePointersListByType(i.type),r=n.getById(i.id),r?i=r:(i.captured=!1,i.insideElementPressed=!1),e.overHandler&&e.overHandler({eventSource:e,pointerType:i.type,position:g(i.currentPos,e.element),buttons:n.buttons,pointers:e.getActivePointerCount(),insideElementPressed:i.insideElementPressed,buttonDownAny:0!==n.buttons,isTouchEvent:"touch"===i.type,originalEvent:t.originalEvent,userData:e.userData})}function re(e,t,i){var n,r;n=e.getActivePointersListByType(i.type),r=n.getById(i.id),r?i=r:(i.captured=!1,i.insideElementPressed=!1),e.outHandler&&e.outHandler({eventSource:e,pointerType:i.type,position:i.currentPos&&g(i.currentPos,e.element),buttons:n.buttons,pointers:e.getActivePointerCount(),insideElementPressed:i.insideElementPressed,buttonDownAny:0!==n.buttons,isTouchEvent:"touch"===i.type,originalEvent:t.originalEvent,userData:e.userData})}function oe(t,n,r,o){var s,a=i[t.hash],l=t.getActivePointersListByType(r.type);return"undefined"!==typeof n.originalEvent.buttons?l.buttons=n.originalEvent.buttons:0===o?l.buttons|=1:1===o?l.buttons|=4:2===o?l.buttons|=2:3===o?l.buttons|=8:4===o?l.buttons|=16:5===o&&(l.buttons|=32),0!==o?(n.shouldCapture=!1,n.shouldReleaseCapture=!1,void(!t.nonPrimaryPressHandler||n.preventGesture||n.defaultPrevented||(n.preventDefault=!0,t.nonPrimaryPressHandler({eventSource:t,pointerType:r.type,position:g(r.currentPos,t.element),button:o,buttons:l.buttons,isTouchEvent:"touch"===r.type,originalEvent:n.originalEvent,userData:t.userData})))):(s=l.getById(r.id),s?(s.insideElementPressed=!0,s.insideElement=!0,s.originalTarget=n.originalEvent.target,s.contactPos=r.currentPos,s.contactTime=r.currentTime,s.lastPos=s.currentPos,s.lastTime=s.currentTime,s.currentPos=r.currentPos,s.currentTime=r.currentTime,r=s,l.addContact(),void(n.preventGesture||n.defaultPrevented?(n.shouldCapture=!1,n.shouldReleaseCapture=!1):(n.shouldCapture=!0,n.shouldReleaseCapture=!1,n.preventDefault=!0,(t.dragHandler||t.dragEndHandler||t.pinchHandler)&&e.MouseTracker.gesturePointVelocityTracker.addPoint(t,r),1===l.contacts?t.pressHandler&&!n.preventGesture&&t.pressHandler({eventSource:t,pointerType:r.type,position:g(r.contactPos,t.element),buttons:l.buttons,isTouchEvent:"touch"===r.type,originalEvent:n.originalEvent,userData:t.userData}):2===l.contacts&&t.pinchHandler&&"touch"===r.type&&(a.pinchGPoints=l.asArray(),a.lastPinchDist=a.currentPinchDist=a.pinchGPoints[0].currentPos.distanceTo(a.pinchGPoints[1].currentPos),a.lastPinchCenter=a.currentPinchCenter=m(a.pinchGPoints[0].currentPos,a.pinchGPoints[1].currentPos))))):(e.console.warn("pointerdown event on untracked pointer"),r.captured=!1,r.insideElementPressed=!0,r.insideElement=!0,r.originalTarget=n.originalEvent.target,void Y(l,r)))}function se(t,n,r,o){var s,a,l,c,u=i[t.hash],h=t.getActivePointersListByType(r.type),d=!1;if("undefined"!==typeof n.originalEvent.buttons?h.buttons=n.originalEvent.buttons:0===o?h.buttons^=-2:1===o?h.buttons^=-5:2===o?h.buttons^=-3:3===o?h.buttons^=-9:4===o?h.buttons^=-17:5===o&&(h.buttons^=-33),n.shouldCapture=!1,0!==o)return n.shouldReleaseCapture=!1,void(!t.nonPrimaryReleaseHandler||n.preventGesture||n.defaultPrevented||(n.preventDefault=!0,t.nonPrimaryReleaseHandler({eventSource:t,pointerType:r.type,position:g(r.currentPos,t.element),button:o,buttons:h.buttons,isTouchEvent:"touch"===r.type,originalEvent:n.originalEvent,userData:t.userData})));l=h.getById(r.id),l?(h.removeContact(),l.captured&&(d=!0),l.lastPos=l.currentPos,l.lastTime=l.currentTime,l.currentPos=r.currentPos,l.currentTime=r.currentTime,l.insideElement||K(t,h,l),s=l.currentPos,a=l.currentTime):(e.console.warn("updatePointerUp(): pointerup on untracked gPoint"),r.captured=!1,r.insideElementPressed=!1,r.insideElement=!0,Y(h,r),l=r),n.preventGesture||n.defaultPrevented||(d?(n.shouldReleaseCapture=!0,n.preventDefault=!0,(t.dragHandler||t.dragEndHandler||t.pinchHandler)&&e.MouseTracker.gesturePointVelocityTracker.removePoint(t,l),0===h.contacts?(t.releaseHandler&&t.releaseHandler({eventSource:t,pointerType:l.type,position:g(s,t.element),buttons:h.buttons,insideElementPressed:l.insideElementPressed,insideElementReleased:l.insideElement,isTouchEvent:"touch"===l.type,originalEvent:n.originalEvent,userData:t.userData}),t.dragEndHandler&&u.sentDragEvent&&t.dragEndHandler({eventSource:t,pointerType:l.type,position:g(l.currentPos,t.element),speed:l.speed,direction:l.direction,shift:n.originalEvent.shiftKey,isTouchEvent:"touch"===l.type,originalEvent:n.originalEvent,userData:t.userData}),u.sentDragEvent=!1,(t.clickHandler||t.dblClickHandler)&&l.insideElement&&(c=a-l.contactTime<=t.clickTimeThreshold&&l.contactPos.distanceTo(s)<=t.clickDistThreshold,t.clickHandler&&t.clickHandler({eventSource:t,pointerType:l.type,position:g(l.currentPos,t.element),quick:c,shift:n.originalEvent.shiftKey,isTouchEvent:"touch"===l.type,originalEvent:n.originalEvent,originalTarget:l.originalTarget,userData:t.userData}),t.dblClickHandler&&c&&(h.clicks++,1===h.clicks?(u.lastClickPos=s,u.dblClickTimeOut=setTimeout((function(){h.clicks=0}),t.dblClickTimeThreshold)):2===h.clicks&&(clearTimeout(u.dblClickTimeOut),h.clicks=0,u.lastClickPos.distanceTo(s)<=t.dblClickDistThreshold&&t.dblClickHandler({eventSource:t,pointerType:l.type,position:g(l.currentPos,t.element),shift:n.originalEvent.shiftKey,isTouchEvent:"touch"===l.type,originalEvent:n.originalEvent,userData:t.userData}),u.lastClickPos=null)))):2===h.contacts&&t.pinchHandler&&"touch"===l.type&&(u.pinchGPoints=h.asArray(),u.lastPinchDist=u.currentPinchDist=u.pinchGPoints[0].currentPos.distanceTo(u.pinchGPoints[1].currentPos),u.lastPinchCenter=u.currentPinchCenter=m(u.pinchGPoints[0].currentPos,u.pinchGPoints[1].currentPos))):(n.shouldReleaseCapture=!1,t.releaseHandler&&(t.releaseHandler({eventSource:t,pointerType:l.type,position:g(s,t.element),buttons:h.buttons,insideElementPressed:l.insideElementPressed,insideElementReleased:l.insideElement,isTouchEvent:"touch"===l.type,originalEvent:n.originalEvent,userData:t.userData}),n.preventDefault=!0)))}function ae(e,t,n){var r,o,s,a=i[e.hash],l=e.getActivePointersListByType(n.type);"undefined"!==typeof t.originalEvent.buttons&&(l.buttons=t.originalEvent.buttons),r=l.getById(n.id),r&&(r.lastPos=r.currentPos,r.lastTime=r.currentTime,r.currentPos=n.currentPos,r.currentTime=n.currentTime,t.shouldCapture=!1,t.shouldReleaseCapture=!1,e.stopHandler&&"mouse"===n.type&&(clearTimeout(e.stopTimeOut),e.stopTimeOut=setTimeout((function(){ce(e,t.originalEvent,n.type)}),e.stopDelay)),0===l.contacts?e.moveHandler&&e.moveHandler({eventSource:e,pointerType:n.type,position:g(n.currentPos,e.element),buttons:l.buttons,isTouchEvent:"touch"===n.type,originalEvent:t.originalEvent,userData:e.userData}):1===l.contacts?(e.moveHandler&&(r=l.asArray()[0],e.moveHandler({eventSource:e,pointerType:r.type,position:g(r.currentPos,e.element),buttons:l.buttons,isTouchEvent:"touch"===r.type,originalEvent:t.originalEvent,userData:e.userData})),!e.dragHandler||t.preventGesture||t.defaultPrevented||(r=l.asArray()[0],s=r.currentPos.minus(r.lastPos),e.dragHandler({eventSource:e,pointerType:r.type,position:g(r.currentPos,e.element),buttons:l.buttons,delta:s,speed:r.speed,direction:r.direction,shift:t.originalEvent.shiftKey,isTouchEvent:"touch"===r.type,originalEvent:t.originalEvent,userData:e.userData}),t.preventDefault=!0,a.sentDragEvent=!0)):2===l.contacts&&(e.moveHandler&&(o=l.asArray(),e.moveHandler({eventSource:e,pointerType:o[0].type,position:g(m(o[0].currentPos,o[1].currentPos),e.element),buttons:l.buttons,isTouchEvent:"touch"===o[0].type,originalEvent:t.originalEvent,userData:e.userData})),!e.pinchHandler||"touch"!==n.type||t.preventGesture||t.defaultPrevented||(s=a.pinchGPoints[0].currentPos.distanceTo(a.pinchGPoints[1].currentPos),s!==a.currentPinchDist&&(a.lastPinchDist=a.currentPinchDist,a.currentPinchDist=s,a.lastPinchCenter=a.currentPinchCenter,a.currentPinchCenter=m(a.pinchGPoints[0].currentPos,a.pinchGPoints[1].currentPos),e.pinchHandler({eventSource:e,pointerType:"touch",gesturePoints:a.pinchGPoints,lastCenter:g(a.lastPinchCenter,e.element),center:g(a.currentPinchCenter,e.element),lastDistance:a.lastPinchDist,distance:a.currentPinchDist,shift:t.originalEvent.shiftKey,originalEvent:t.originalEvent,userData:e.userData}),t.preventDefault=!0))))}function le(e,t,i){var n,r=e.getActivePointersListByType(i.type);n=r.getById(i.id),n&&K(e,r,n)}function ce(e,t,i){e.stopHandler&&e.stopHandler({eventSource:e,pointerType:i,position:v(t,e.element),buttons:e.getActivePointersListByType(i).buttons,isTouchEvent:"touch"===i,originalEvent:t,userData:e.userData})}e.MouseTracker.gesturePointVelocityTracker=function(){var t=[],i=0,n=0,r=function(e,t){return e.hash.toString()+t.type+t.id.toString()},o=function(){var i,r,o,s,a,l,c=t.length,u=e.now();for(s=u-n,n=u,i=0;i8||"onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll",e.MouseTracker.subscribeEvents=["click","dblclick","keydown","keyup","keypress","focus","blur","contextmenu",e.MouseTracker.wheelEventName],"DOMMouseScroll"===e.MouseTracker.wheelEventName&&e.MouseTracker.subscribeEvents.push("MozMousePixelScroll"),window.PointerEvent?(e.MouseTracker.havePointerEvents=!0,e.MouseTracker.subscribeEvents.push("pointerenter","pointerleave","pointerover","pointerout","pointerdown","pointerup","pointermove","pointercancel"),e.MouseTracker.havePointerCapture=function(){var t=document.createElement("div");return e.isFunction(t.setPointerCapture)&&e.isFunction(t.releasePointerCapture)}(),e.MouseTracker.havePointerCapture&&e.MouseTracker.subscribeEvents.push("gotpointercapture","lostpointercapture")):(e.MouseTracker.havePointerEvents=!1,e.MouseTracker.subscribeEvents.push("mouseenter","mouseleave","mouseover","mouseout","mousedown","mouseup","mousemove"),e.MouseTracker.mousePointerId="legacy-mouse",e.MouseTracker.havePointerCapture=function(){var t=document.createElement("div");return e.isFunction(t.setCapture)&&e.isFunction(t.releaseCapture)}(),e.MouseTracker.havePointerCapture&&e.MouseTracker.subscribeEvents.push("losecapture"),"ontouchstart"in window&&e.MouseTracker.subscribeEvents.push("touchstart","touchend","touchmove","touchcancel"),"ongesturestart"in window&&e.MouseTracker.subscribeEvents.push("gesturestart","gesturechange")),e.MouseTracker.GesturePointList=function(e){this._gPoints=[],this.type=e,this.buttons=0,this.contacts=0,this.clicks=0,this.captureCount=0},e.MouseTracker.GesturePointList.prototype={getLength:function(){return this._gPoints.length},asArray:function(){return this._gPoints},add:function(e){return this._gPoints.push(e)},removeById:function(e){var t,i=this._gPoints.length;for(t=0;t1&&("mouse"===this.type||"pen"===this.type)&&(e.console.warn("GesturePointList.addContact() Implausible contacts value"),this.contacts=1)},removeContact:function(){--this.contacts,this.contacts<0&&(e.console.warn("GesturePointList.removeContact() Implausible contacts value"),this.contacts=0)}}}(s),function(e){e.ControlAnchor={NONE:0,TOP_LEFT:1,TOP_RIGHT:2,BOTTOM_RIGHT:3,BOTTOM_LEFT:4,ABSOLUTE:5},e.Control=function(t,i,n){var r=t.parentNode;"number"===typeof i&&(e.console.error("Passing an anchor directly into the OpenSeadragon.Control constructor is deprecated; please use an options object instead. Support for this deprecated variant is scheduled for removal in December 2013"),i={anchor:i}),i.attachToViewer="undefined"===typeof i.attachToViewer||i.attachToViewer,this.autoFade="undefined"===typeof i.autoFade||i.autoFade,this.element=t,this.anchor=i.anchor,this.container=n,this.anchor===e.ControlAnchor.ABSOLUTE?(this.wrapper=e.makeNeutralElement("div"),this.wrapper.style.position="absolute",this.wrapper.style.top="number"===typeof i.top?i.top+"px":i.top,this.wrapper.style.left="number"===typeof i.left?i.left+"px":i.left,this.wrapper.style.height="number"===typeof i.height?i.height+"px":i.height,this.wrapper.style.width="number"===typeof i.width?i.width+"px":i.width,this.wrapper.style.margin="0px",this.wrapper.style.padding="0px",this.element.style.position="relative",this.element.style.top="0px",this.element.style.left="0px",this.element.style.height="100%",this.element.style.width="100%"):(this.wrapper=e.makeNeutralElement("div"),this.wrapper.style.display="inline-block",this.anchor===e.ControlAnchor.NONE&&(this.wrapper.style.width=this.wrapper.style.height="100%")),this.wrapper.appendChild(this.element),i.attachToViewer?this.anchor===e.ControlAnchor.TOP_RIGHT||this.anchor===e.ControlAnchor.BOTTOM_RIGHT?this.container.insertBefore(this.wrapper,this.container.firstChild):this.container.appendChild(this.wrapper):r.appendChild(this.wrapper)},e.Control.prototype={destroy:function(){this.wrapper.removeChild(this.element),this.anchor!==e.ControlAnchor.NONE&&this.container.removeChild(this.wrapper)},isVisible:function(){return"none"!==this.wrapper.style.display},setVisible:function(t){this.wrapper.style.display=t?this.anchor===e.ControlAnchor.ABSOLUTE?"block":"inline-block":"none"},setOpacity:function(t){this.element[e.SIGNAL]&&e.Browser.vendor===e.BROWSERS.IE?e.setElementOpacity(this.element,t,!0):e.setElementOpacity(this.wrapper,t,!0)}}}(s),function(e){function t(e,t){var i,n=e.controls;for(i=n.length-1;i>=0;i--)if(n[i].element===t)return i;return-1}e.ControlDock=function(t){var i,n,r=["topleft","topright","bottomright","bottomleft"];for(e.extend(!0,this,{id:"controldock-"+e.now()+"-"+Math.floor(1e6*Math.random()),container:e.makeNeutralElement("div"),controls:[]},t),this.container.onsubmit=function(){return!1},this.element&&(this.element=e.getElement(this.element),this.element.appendChild(this.container),this.element.style.position="relative",this.container.style.width="100%",this.container.style.height="100%"),n=0;n=0)){switch(n.anchor){case e.ControlAnchor.TOP_RIGHT:r=this.controls.topright,i.style.position="relative",i.style.paddingRight="0px",i.style.paddingTop="0px";break;case e.ControlAnchor.BOTTOM_RIGHT:r=this.controls.bottomright,i.style.position="relative",i.style.paddingRight="0px",i.style.paddingBottom="0px";break;case e.ControlAnchor.BOTTOM_LEFT:r=this.controls.bottomleft,i.style.position="relative",i.style.paddingLeft="0px",i.style.paddingBottom="0px";break;case e.ControlAnchor.TOP_LEFT:r=this.controls.topleft,i.style.position="relative",i.style.paddingLeft="0px",i.style.paddingTop="0px";break;case e.ControlAnchor.ABSOLUTE:r=this.container,i.style.margin="0px",i.style.padding="0px";break;default:case e.ControlAnchor.NONE:r=this.container,i.style.margin="0px",i.style.padding="0px";break}this.controls.push(new e.Control(i,n,r)),i.style.display="inline-block"}},removeControl:function(i){i=e.getElement(i);var n=t(this,i);return n>=0&&(this.controls[n].destroy(),this.controls.splice(n,1)),this},clearControls:function(){while(this.controls.length>0)this.controls.pop().destroy();return this},areControlsEnabled:function(){var e;for(e=this.controls.length-1;e>=0;e--)if(this.controls[e].isVisible())return!0;return!1},setControlsEnabled:function(e){var t;for(t=this.controls.length-1;t>=0;t--)this.controls[t].setVisible(e);return this}}}(s),function(e){e.Placement=e.freezeObject({CENTER:0,TOP_LEFT:1,TOP:2,TOP_RIGHT:3,RIGHT:4,BOTTOM_RIGHT:5,BOTTOM:6,BOTTOM_LEFT:7,LEFT:8,properties:{0:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!1,isVerticallyCentered:!0,isBottom:!1},1:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!0,isVerticallyCentered:!1,isBottom:!1},2:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!0,isVerticallyCentered:!1,isBottom:!1},3:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!0,isVerticallyCentered:!1,isBottom:!1},4:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!1,isVerticallyCentered:!0,isBottom:!1},5:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!1,isVerticallyCentered:!1,isBottom:!0},6:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!1,isVerticallyCentered:!1,isBottom:!0},7:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!1,isVerticallyCentered:!1,isBottom:!0},8:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!1,isVerticallyCentered:!0,isBottom:!1}}})}(s),function(e){var t={},i=1;function n(t){return t=e.getElement(t),new e.Point(0===t.clientWidth?1:t.clientWidth,0===t.clientHeight?1:t.clientHeight)}function r(t,i,n,r,o){var s=t;if("string"===e.type(i))if(i.match(/^\s*<.*>\s*$/))i=e.parseXml(i);else if(i.match(/^\s*[{[].*[}\]]\s*$/))try{var a=e.parseJSON(i);i=a}catch(c){}function l(e,t){e.ready?r(e):(e.addHandler("ready",(function(){r(e)})),e.addHandler("open-failed",(function(e){o({message:e.message,source:t})})))}setTimeout((function(){if("string"===e.type(i))i=new e.TileSource({url:i,crossOriginPolicy:void 0!==n.crossOriginPolicy?n.crossOriginPolicy:t.crossOriginPolicy,ajaxWithCredentials:t.ajaxWithCredentials,ajaxHeaders:n.ajaxHeaders?n.ajaxHeaders:t.ajaxHeaders,useCanvas:t.useCanvas,success:function(e){r(e.tileSource)}}),i.addHandler("open-failed",(function(e){o(e)}));else if(e.isPlainObject(i)||i.nodeType)if(void 0!==i.crossOriginPolicy||void 0===n.crossOriginPolicy&&void 0===t.crossOriginPolicy||(i.crossOriginPolicy=void 0!==n.crossOriginPolicy?n.crossOriginPolicy:t.crossOriginPolicy),void 0===i.ajaxWithCredentials&&(i.ajaxWithCredentials=t.ajaxWithCredentials),void 0===i.useCanvas&&(i.useCanvas=t.useCanvas),e.isFunction(i.getTileUrl)){var a=new e.TileSource(i);a.getTileUrl=i.getTileUrl,r(a)}else{var c=e.TileSource.determineType(s,i);if(!c)return void o({message:"Unable to load TileSource",source:i});var u=c.prototype.configure.apply(s,[i]);l(new c(u),i)}else l(i,i)}))}function o(t,i){if(i instanceof e.Overlay)return i;var n=null;if(i.element)n=e.getElement(i.element);else{var r=i.id?i.id:"openseadragon-overlay-"+Math.floor(1e7*Math.random());n=e.getElement(i.id),n||(n=document.createElement("a"),n.href="#/overlay/"+r),n.id=r,e.addClass(n,i.className?i.className:"openseadragon-overlay")}var o=i.location,s=i.width,a=i.height;if(!o){var l=i.x,c=i.y;if(void 0!==i.px){var u=t.viewport.imageToViewportRectangle(new e.Rect(i.px,i.py,s||0,a||0));l=u.x,c=u.y,s=void 0!==s?u.width:void 0,a=void 0!==a?u.height:void 0}o=new e.Point(l,c)}var h=i.placement;return h&&"string"===e.type(h)&&(h=e.Placement[i.placement.toUpperCase()]),new e.Overlay({element:n,location:o,placement:h,onDraw:i.onDraw,checkResize:i.checkResize,width:s,height:a,rotationMode:i.rotationMode})}function s(e,t){var i;for(i=e.length-1;i>=0;i--)if(e[i].element===t)return i;return-1}function a(t,i){return e.requestAnimationFrame((function(){i(t)}))}function l(t){e.requestAnimationFrame((function(){u(t)}))}function c(t){t.autoHideControls&&(t.controlsShouldFade=!0,t.controlsFadeBeginTime=e.now()+t.controlsFadeDelay,window.setTimeout((function(){l(t)}),t.controlsFadeDelay))}function u(t){var i,n,r,o;if(t.controlsShouldFade){for(i=e.now(),n=i-t.controlsFadeBeginTime,r=1-n/t.controlsFadeLength,r=Math.min(1,r),r=Math.max(0,r),o=t.controls.length-1;o>=0;o--)t.controls[o].autoFade&&t.controls[o].setOpacity(r);r>0&&l(t)}}function h(e){var t;for(e.controlsShouldFade=!1,t=e.controls.length-1;t>=0;t--)e.controls[t].setOpacity(1)}function d(){h(this)}function p(){c(this)}function f(e){var t={tracker:e.eventSource,position:e.position,originalEvent:e.originalEvent,preventDefault:e.preventDefault};this.raiseEvent("canvas-contextmenu",t),e.preventDefault=t.preventDefault}function v(t){var i={originalEvent:t.originalEvent,preventDefaultAction:!1,preventVerticalPan:t.preventVerticalPan,preventHorizontalPan:t.preventHorizontalPan};if(this.raiseEvent("canvas-key",i),i.preventDefaultAction||t.ctrl||t.alt||t.meta)t.preventDefault=!1;else switch(t.keyCode){case 38:i.preventVerticalPan||(t.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,-this.pixelsPerArrowPress))),this.viewport.applyConstraints()),t.preventDefault=!0;break;case 40:i.preventVerticalPan||(t.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,this.pixelsPerArrowPress))),this.viewport.applyConstraints()),t.preventDefault=!0;break;case 37:i.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(-this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),t.preventDefault=!0;break;case 39:i.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),t.preventDefault=!0;break;default:t.preventDefault=!1;break}}function g(t){var i={originalEvent:t.originalEvent,preventDefaultAction:!1,preventVerticalPan:t.preventVerticalPan,preventHorizontalPan:t.preventHorizontalPan};if(this.raiseEvent("canvas-key",i),i.preventDefaultAction||t.ctrl||t.alt||t.meta)t.preventDefault=!1;else switch(t.keyCode){case 43:case 61:this.viewport.zoomBy(1.1),this.viewport.applyConstraints(),t.preventDefault=!0;break;case 45:this.viewport.zoomBy(.9),this.viewport.applyConstraints(),t.preventDefault=!0;break;case 48:this.viewport.goHome(),this.viewport.applyConstraints(),t.preventDefault=!0;break;case 119:case 87:i.preventVerticalPan||(t.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,-40))),this.viewport.applyConstraints()),t.preventDefault=!0;break;case 115:case 83:i.preventVerticalPan||(t.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,40))),this.viewport.applyConstraints()),t.preventDefault=!0;break;case 97:i.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(-40,0))),this.viewport.applyConstraints()),t.preventDefault=!0;break;case 100:i.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(40,0))),this.viewport.applyConstraints()),t.preventDefault=!0;break;case 114:this.viewport.flipped?this.viewport.setRotation(e.positiveModulo(this.viewport.degrees-this.rotationIncrement,360)):this.viewport.setRotation(e.positiveModulo(this.viewport.degrees+this.rotationIncrement,360)),this.viewport.applyConstraints(),t.preventDefault=!0;break;case 82:this.viewport.flipped?this.viewport.setRotation(e.positiveModulo(this.viewport.degrees+this.rotationIncrement,360)):this.viewport.setRotation(e.positiveModulo(this.viewport.degrees-this.rotationIncrement,360)),this.viewport.applyConstraints(),t.preventDefault=!0;break;case 102:this.viewport.toggleFlip(),t.preventDefault=!0;break;case 106:this.goToPreviousPage();break;case 107:this.goToNextPage();break;default:t.preventDefault=!1;break}}function m(e){var t,i=document.activeElement===this.canvas;i||this.canvas.focus(),this.viewport.flipped&&(e.position.x=this.viewport.getContainerSize().x-e.position.x);var n={tracker:e.eventSource,position:e.position,quick:e.quick,shift:e.shift,originalEvent:e.originalEvent,originalTarget:e.originalTarget,preventDefaultAction:!1};this.raiseEvent("canvas-click",n),!n.preventDefaultAction&&this.viewport&&e.quick&&(t=this.gestureSettingsByDeviceType(e.pointerType),t.clickToZoom&&(this.viewport.zoomBy(e.shift?1/this.zoomPerClick:this.zoomPerClick,t.zoomToRefPoint?this.viewport.pointFromPixel(e.position,!0):null),this.viewport.applyConstraints()))}function y(e){var t,i={tracker:e.eventSource,position:e.position,shift:e.shift,originalEvent:e.originalEvent,preventDefaultAction:!1};this.raiseEvent("canvas-double-click",i),!i.preventDefaultAction&&this.viewport&&(t=this.gestureSettingsByDeviceType(e.pointerType),t.dblClickToZoom&&(this.viewport.zoomBy(e.shift?1/this.zoomPerClick:this.zoomPerClick,t.zoomToRefPoint?this.viewport.pointFromPixel(e.position,!0):null),this.viewport.applyConstraints()))}function w(e){var t,i={tracker:e.eventSource,pointerType:e.pointerType,position:e.position,delta:e.delta,speed:e.speed,direction:e.direction,shift:e.shift,originalEvent:e.originalEvent,preventDefaultAction:!1};if(this.raiseEvent("canvas-drag",i),t=this.gestureSettingsByDeviceType(e.pointerType),t.dragToPan&&!i.preventDefaultAction&&this.viewport){if(this.panHorizontal||(e.delta.x=0),this.panVertical||(e.delta.y=0),this.viewport.flipped&&(e.delta.x=-e.delta.x),this.constrainDuringPan){var n=this.viewport.deltaPointsFromPixels(e.delta.negate());this.viewport.centerSpringX.target.value+=n.x,this.viewport.centerSpringY.target.value+=n.y;var r=this.viewport.getBounds(),o=this.viewport.getConstrainedBounds();this.viewport.centerSpringX.target.value-=n.x,this.viewport.centerSpringY.target.value-=n.y,r.x!==o.x&&(e.delta.x=0),r.y!==o.y&&(e.delta.y=0)}this.viewport.panBy(this.viewport.deltaPointsFromPixels(e.delta.negate()),t.flickEnabled&&!this.constrainDuringPan)}}function x(t){var i={tracker:t.eventSource,pointerType:t.pointerType,position:t.position,speed:t.speed,direction:t.direction,shift:t.shift,originalEvent:t.originalEvent,preventDefaultAction:!1};if(this.raiseEvent("canvas-drag-end",i),!i.preventDefaultAction&&this.viewport){var n=this.gestureSettingsByDeviceType(t.pointerType);if(n.flickEnabled&&t.speed>=n.flickMinSpeed){var r=0;this.panHorizontal&&(r=n.flickMomentum*t.speed*Math.cos(t.direction));var o=0;this.panVertical&&(o=n.flickMomentum*t.speed*Math.sin(t.direction));var s=this.viewport.pixelFromPoint(this.viewport.getCenter(!0)),a=this.viewport.pointFromPixel(new e.Point(s.x-r,s.y-o));this.viewport.panTo(a,!1)}this.viewport.applyConstraints()}}function b(e){this.raiseEvent("canvas-enter",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,buttons:e.buttons,pointers:e.pointers,insideElementPressed:e.insideElementPressed,buttonDownAny:e.buttonDownAny,originalEvent:e.originalEvent})}function _(e){this.raiseEvent("canvas-exit",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,buttons:e.buttons,pointers:e.pointers,insideElementPressed:e.insideElementPressed,buttonDownAny:e.buttonDownAny,originalEvent:e.originalEvent})}function T(e){this.raiseEvent("canvas-press",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,insideElementPressed:e.insideElementPressed,insideElementReleased:e.insideElementReleased,originalEvent:e.originalEvent})}function S(e){this.raiseEvent("canvas-release",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,insideElementPressed:e.insideElementPressed,insideElementReleased:e.insideElementReleased,originalEvent:e.originalEvent})}function E(e){this.raiseEvent("canvas-nonprimary-press",{tracker:e.eventSource,position:e.position,pointerType:e.pointerType,button:e.button,buttons:e.buttons,originalEvent:e.originalEvent})}function P(e){this.raiseEvent("canvas-nonprimary-release",{tracker:e.eventSource,position:e.position,pointerType:e.pointerType,button:e.button,buttons:e.buttons,originalEvent:e.originalEvent})}function C(e){var t,i,n,r,o={tracker:e.eventSource,pointerType:e.pointerType,gesturePoints:e.gesturePoints,lastCenter:e.lastCenter,center:e.center,lastDistance:e.lastDistance,distance:e.distance,shift:e.shift,originalEvent:e.originalEvent,preventDefaultPanAction:!1,preventDefaultZoomAction:!1,preventDefaultRotateAction:!1};if(this.raiseEvent("canvas-pinch",o),this.viewport&&(t=this.gestureSettingsByDeviceType(e.pointerType),!t.pinchToZoom||o.preventDefaultPanAction&&o.preventDefaultZoomAction||(i=this.viewport.pointFromPixel(e.center,!0),o.preventDefaultZoomAction||this.viewport.zoomBy(e.distance/e.lastDistance,i,!0),t.zoomToRefPoint&&!o.preventDefaultPanAction&&(n=this.viewport.pointFromPixel(e.lastCenter,!0),r=n.minus(i),this.panHorizontal||(r.x=0),this.panVertical||(r.y=0),this.viewport.panBy(r,!0)),this.viewport.applyConstraints()),t.pinchRotate&&!o.preventDefaultRotateAction)){var s=Math.atan2(e.gesturePoints[0].currentPos.y-e.gesturePoints[1].currentPos.y,e.gesturePoints[0].currentPos.x-e.gesturePoints[1].currentPos.x),a=Math.atan2(e.gesturePoints[0].lastPos.y-e.gesturePoints[1].lastPos.y,e.gesturePoints[0].lastPos.x-e.gesturePoints[1].lastPos.x);this.viewport.setRotation(this.viewport.getRotation()+(s-a)*(180/Math.PI))}}function R(t){var i,n,r,o,s;o=e.now(),s=o-this._lastScrollTime,s>this.minScrollDeltaTime?(this._lastScrollTime=o,i={tracker:t.eventSource,position:t.position,scroll:t.scroll,shift:t.shift,originalEvent:t.originalEvent,preventDefaultAction:!1,preventDefault:!0},this.raiseEvent("canvas-scroll",i),!i.preventDefaultAction&&this.viewport&&(this.viewport.flipped&&(t.position.x=this.viewport.getContainerSize().x-t.position.x),n=this.gestureSettingsByDeviceType(t.pointerType),n.scrollToZoom&&(r=Math.pow(this.zoomPerScroll,t.scroll),this.viewport.zoomBy(r,n.zoomToRefPoint?this.viewport.pointFromPixel(t.position,!0):null),this.viewport.applyConstraints())),t.preventDefault=i.preventDefault):t.preventDefault=!0}function k(e){t[this.hash].mouseInside=!0,h(this),this.raiseEvent("container-enter",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,buttons:e.buttons,pointers:e.pointers,insideElementPressed:e.insideElementPressed,buttonDownAny:e.buttonDownAny,originalEvent:e.originalEvent})}function O(e){e.pointers<1&&(t[this.hash].mouseInside=!1,t[this.hash].animating||c(this)),this.raiseEvent("container-exit",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,buttons:e.buttons,pointers:e.pointers,insideElementPressed:e.insideElementPressed,buttonDownAny:e.buttonDownAny,originalEvent:e.originalEvent})}function I(e){D(e),e.isOpen()?e._updateRequestId=a(e,I):e._updateRequestId=!1}function D(e){if(!e._opening&&t[e.hash]){if(e.autoResize){var i=n(e.container),r=t[e.hash].prevContainerSize;if(!i.equals(r)){var o=e.viewport;if(e.preserveImageSizeOnResize){var s=r.x/i.x,a=o.getZoom()*s,l=o.getCenter();o.resize(i,!1),o.zoomTo(a,null,!0),o.panTo(l,!0)}else{var u=o.getBounds();o.resize(i,!0),o.fitBoundsWithConstraints(u,!0)}t[e.hash].prevContainerSize=i,t[e.hash].forceRedraw=!0}}var d=e.viewport.update(),p=e.world.update()||d;d&&e.raiseEvent("viewport-change"),e.referenceStrip&&(p=e.referenceStrip.update(e.viewport)||p),!t[e.hash].animating&&p&&(e.raiseEvent("animation-start"),h(e)),(p||t[e.hash].forceRedraw||e.world.needsDraw())&&(A(e),e._drawOverlays(),e.navigator&&e.navigator.update(e.viewport),t[e.hash].forceRedraw=!1,p&&e.raiseEvent("animation")),t[e.hash].animating&&!p&&(e.raiseEvent("animation-finish"),t[e.hash].mouseInside||c(e)),t[e.hash].animating=p}}function A(e){e.imageLoader.clear(),e.drawer.clear(),e.world.draw(),e.raiseEvent("update-viewport",{})}function L(e,t){return e?e+t:t}function H(){t[this.hash].lastZoomTime=e.now(),t[this.hash].zoomFactor=this.zoomPerSecond,t[this.hash].zooming=!0,F(this)}function M(){t[this.hash].lastZoomTime=e.now(),t[this.hash].zoomFactor=1/this.zoomPerSecond,t[this.hash].zooming=!0,F(this)}function B(){t[this.hash].zooming=!1}function F(t){e.requestAnimationFrame(e.delegate(t,$))}function $(){var i,n,r;t[this.hash].zooming&&this.viewport&&(i=e.now(),n=i-t[this.hash].lastZoomTime,r=Math.pow(t[this.hash].zoomFactor,n/1e3),this.viewport.zoomBy(r),this.viewport.applyConstraints(),t[this.hash].lastZoomTime=i,F(this))}function N(){this.viewport&&(t[this.hash].zooming=!1,this.viewport.zoomBy(this.zoomPerClick/1),this.viewport.applyConstraints())}function z(){this.viewport&&(t[this.hash].zooming=!1,this.viewport.zoomBy(1/this.zoomPerClick),this.viewport.applyConstraints())}function V(){this.buttonGroup&&(this.buttonGroup.emulateEnter(),this.buttonGroup.emulateLeave())}function j(){this.viewport&&this.viewport.goHome()}function U(){this.isFullPage()&&!e.isFullScreen()?this.setFullPage(!1):this.setFullScreen(!this.isFullPage()),this.buttonGroup&&this.buttonGroup.emulateLeave(),this.fullPageButton.element.focus(),this.viewport&&this.viewport.applyConstraints()}function W(){if(this.viewport){var t=this.viewport.getRotation();t=this.viewport.flipped?e.positiveModulo(t+this.rotationIncrement,360):e.positiveModulo(t-this.rotationIncrement,360),this.viewport.setRotation(t)}}function G(){if(this.viewport){var t=this.viewport.getRotation();t=this.viewport.flipped?e.positiveModulo(t-this.rotationIncrement,360):e.positiveModulo(t+this.rotationIncrement,360),this.viewport.setRotation(t)}}function q(){this.viewport.toggleFlip()}e.Viewer=function(r){var o,s=arguments,l=this;if(e.isPlainObject(r)||(r={id:s[0],xmlPath:s.length>1?s[1]:void 0,prefixUrl:s.length>2?s[2]:void 0,controls:s.length>3?s[3]:void 0,overlays:s.length>4?s[4]:void 0}),r.config&&(e.extend(!0,r,r.config),delete r.config),e.extend(!0,this,{id:r.id,hash:r.hash||i++,initialPage:0,element:null,container:null,canvas:null,overlays:[],overlaysContainer:null,previousBody:[],customControls:[],source:null,drawer:null,world:null,viewport:null,navigator:null,collectionViewport:null,collectionDrawer:null,navImages:null,buttons:null,profiler:null},e.DEFAULT_SETTINGS,r),"undefined"===typeof this.hash)throw new Error("A hash must be defined, either by specifying options.id or options.hash.");for("undefined"!==typeof t[this.hash]&&e.console.warn("Hash "+this.hash+" has already been used."),t[this.hash]={fsBoundsDelta:new e.Point(1,1),prevContainerSize:null,animating:!1,forceRedraw:!1,mouseInside:!1,group:null,zooming:!1,zoomFactor:null,lastZoomTime:null,fullPage:!1,onfullscreenchange:null},this._sequenceIndex=0,this._firstOpen=!0,this._updateRequestId=null,this._loadQueue=[],this.currentOverlays=[],this._updatePixelDensityRatioBind=null,this._lastScrollTime=e.now(),e.EventSource.call(this),this.addHandler("open-failed",(function(t){var i=e.getString("Errors.OpenFailed",t.eventSource,t.message);l._showMessage(i)})),e.ControlDock.call(this,r),this.xmlPath&&(this.tileSources=[this.xmlPath]),this.element=this.element||document.getElementById(this.id),this.canvas=e.makeNeutralElement("div"),this.canvas.className="openseadragon-canvas",function(e){e.width="100%",e.height="100%",e.overflow="hidden",e.position="absolute",e.top="0px",e.left="0px"}(this.canvas.style),e.setElementTouchActionNone(this.canvas),""!==r.tabIndex&&(this.canvas.tabIndex=void 0===r.tabIndex?0:r.tabIndex),this.container.className="openseadragon-container",function(e){e.width="100%",e.height="100%",e.position="relative",e.overflow="hidden",e.left="0px",e.top="0px",e.textAlign="left"}(this.container.style),e.setElementTouchActionNone(this.container),this.container.insertBefore(this.canvas,this.container.firstChild),this.element.appendChild(this.container),this.bodyWidth=document.body.style.width,this.bodyHeight=document.body.style.height,this.bodyOverflow=document.body.style.overflow,this.docOverflow=document.documentElement.style.overflow,this.innerTracker=new e.MouseTracker({userData:"Viewer.innerTracker",element:this.canvas,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,contextMenuHandler:e.delegate(this,f),keyDownHandler:e.delegate(this,v),keyHandler:e.delegate(this,g),clickHandler:e.delegate(this,m),dblClickHandler:e.delegate(this,y),dragHandler:e.delegate(this,w),dragEndHandler:e.delegate(this,x),enterHandler:e.delegate(this,b),leaveHandler:e.delegate(this,_),pressHandler:e.delegate(this,T),releaseHandler:e.delegate(this,S),nonPrimaryPressHandler:e.delegate(this,E),nonPrimaryReleaseHandler:e.delegate(this,P),scrollHandler:e.delegate(this,R),pinchHandler:e.delegate(this,C)}),this.outerTracker=new e.MouseTracker({userData:"Viewer.outerTracker",element:this.container,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,enterHandler:e.delegate(this,k),leaveHandler:e.delegate(this,O)}),this.toolbar&&(this.toolbar=new e.ControlDock({element:this.toolbar})),this.bindStandardControls(),t[this.hash].prevContainerSize=n(this.container),this.world=new e.World({viewer:this}),this.world.addHandler("add-item",(function(e){l.source=l.world.getItemAt(0).source,t[l.hash].forceRedraw=!0,l._updateRequestId||(l._updateRequestId=a(l,I))})),this.world.addHandler("remove-item",(function(e){l.world.getItemCount()?l.source=l.world.getItemAt(0).source:l.source=null,t[l.hash].forceRedraw=!0})),this.world.addHandler("metrics-change",(function(e){l.viewport&&l.viewport._setContentBounds(l.world.getHomeBounds(),l.world.getContentFactor())})),this.world.addHandler("item-index-change",(function(e){l.source=l.world.getItemAt(0).source})),this.viewport=new e.Viewport({containerSize:t[this.hash].prevContainerSize,springStiffness:this.springStiffness,animationTime:this.animationTime,minZoomImageRatio:this.minZoomImageRatio,maxZoomPixelRatio:this.maxZoomPixelRatio,visibilityRatio:this.visibilityRatio,wrapHorizontal:this.wrapHorizontal,wrapVertical:this.wrapVertical,defaultZoomLevel:this.defaultZoomLevel,minZoomLevel:this.minZoomLevel,maxZoomLevel:this.maxZoomLevel,viewer:this,degrees:this.degrees,flipped:this.flipped,navigatorRotate:this.navigatorRotate,homeFillsViewer:this.homeFillsViewer,margins:this.viewportMargins}),this.viewport._setContentBounds(this.world.getHomeBounds(),this.world.getContentFactor()),this.imageLoader=new e.ImageLoader({jobLimit:this.imageLoaderLimit,timeout:r.timeout}),this.tileCache=new e.TileCache({maxImageCacheCount:this.maxImageCacheCount}),this.drawer=new e.Drawer({viewer:this,viewport:this.viewport,element:this.canvas,debugGridColor:this.debugGridColor}),this.overlaysContainer=e.makeNeutralElement("div"),this.canvas.appendChild(this.overlaysContainer),this.drawer.canRotate()||(this.rotateLeft&&(o=this.buttonGroup.buttons.indexOf(this.rotateLeft),this.buttonGroup.buttons.splice(o,1),this.buttonGroup.element.removeChild(this.rotateLeft.element)),this.rotateRight&&(o=this.buttonGroup.buttons.indexOf(this.rotateRight),this.buttonGroup.buttons.splice(o,1),this.buttonGroup.element.removeChild(this.rotateRight.element))),this._addUpdatePixelDensityRatioEvent(),this.showNavigator&&(this.navigator=new e.Navigator({id:this.navigatorId,position:this.navigatorPosition,sizeRatio:this.navigatorSizeRatio,maintainSizeRatio:this.navigatorMaintainSizeRatio,top:this.navigatorTop,left:this.navigatorLeft,width:this.navigatorWidth,height:this.navigatorHeight,autoResize:this.navigatorAutoResize,autoFade:this.navigatorAutoFade,prefixUrl:this.prefixUrl,viewer:this,navigatorRotate:this.navigatorRotate,background:this.navigatorBackground,opacity:this.navigatorOpacity,borderColor:this.navigatorBorderColor,displayRegionColor:this.navigatorDisplayRegionColor,crossOriginPolicy:this.crossOriginPolicy})),this.sequenceMode&&this.bindSequenceControls(),this.tileSources&&this.open(this.tileSources),o=0;o-1&&t.index=0&&e=0)return this;var l=o(this,a);return this.currentOverlays.push(l),l.drawHTML(this.overlaysContainer,this.viewport),this.raiseEvent("add-overlay",{element:t,location:a.location,placement:a.placement}),this},updateOverlay:function(i,n,r){var o;return i=e.getElement(i),o=s(this.currentOverlays,i),o>=0&&(this.currentOverlays[o].update(n,r),t[this.hash].forceRedraw=!0,this.raiseEvent("update-overlay",{element:i,location:n,placement:r})),this},removeOverlay:function(i){var n;return i=e.getElement(i),n=s(this.currentOverlays,i),n>=0&&(this.currentOverlays[n].destroy(),this.currentOverlays.splice(n,1),t[this.hash].forceRedraw=!0,this.raiseEvent("remove-overlay",{element:i})),this},clearOverlays:function(){while(this.currentOverlays.length>0)this.currentOverlays.pop().destroy();return t[this.hash].forceRedraw=!0,this.raiseEvent("clear-overlay",{}),this},getOverlayById:function(t){var i;return t=e.getElement(t),i=s(this.currentOverlays,t),i>=0?this.currentOverlays[i]:null},_updateSequenceButtons:function(e){this.nextButton&&(this.tileSources&&this.tileSources.length-1!==e?this.nextButton.enable():this.navPrevNextWrap||this.nextButton.disable()),this.previousButton&&(e>0?this.previousButton.enable():this.navPrevNextWrap||this.previousButton.disable())},_showMessage:function(t){this._hideMessage();var i=e.makeNeutralElement("div");i.appendChild(document.createTextNode(t)),this.messageDiv=e.makeCenteredNode(i),e.addClass(this.messageDiv,"openseadragon-message"),this.container.appendChild(this.messageDiv)},_hideMessage:function(){var e=this.messageDiv;e&&(e.parentNode.removeChild(e),delete this.messageDiv)},gestureSettingsByDeviceType:function(e){switch(e){case"mouse":return this.gestureSettingsMouse;case"touch":return this.gestureSettingsTouch;case"pen":return this.gestureSettingsPen;default:return this.gestureSettingsUnknown}},_drawOverlays:function(){var e,t=this.currentOverlays.length;for(e=0;e1&&(this.referenceStrip=new e.ReferenceStrip({id:this.referenceStripElement,position:this.referenceStripPosition,sizeRatio:this.referenceStripSizeRatio,scroll:this.referenceStripScroll,height:this.referenceStripHeight,width:this.referenceStripWidth,tileSources:this.tileSources,prefixUrl:this.prefixUrl,useCanvas:this.useCanvas,viewer:this}),this.referenceStrip.setFocus(this._sequenceIndex))}else e.console.warn('Attempting to display a reference strip while "sequenceMode" is off.')},_addUpdatePixelDensityRatioEvent:function(){this._updatePixelDensityRatioBind=this._updatePixelDensityRatio.bind(this),e.addEvent(window,"resize",this._updatePixelDensityRatioBind)},_removeUpdatePixelDensityRatioEvent:function(){e.removeEvent(window,"resize",this._updatePixelDensityRatioBind)},_updatePixelDensityRatio:function(){var t=e.pixelDensityRatio,i=e.getCurrentPixelDensityRatio();t!==i&&(e.pixelDensityRatio=i,this.world.resetItems(),this.forceRedraw())},goToPreviousPage:function(){var e=this._sequenceIndex-1;this.navPrevNextWrap&&e<0&&(e+=this.tileSources.length),this.goToPage(e)},goToNextPage:function(){var e=this._sequenceIndex+1;this.navPrevNextWrap&&e>=this.tileSources.length&&(e=0),this.goToPage(e)}})}(s),function(e){function t(e){var t={tracker:e.eventSource,position:e.position,quick:e.quick,shift:e.shift,originalEvent:e.originalEvent,preventDefaultAction:!1};if(this.viewer.raiseEvent("navigator-click",t),!t.preventDefaultAction&&e.quick&&this.viewer.viewport&&(this.panVertical||this.panHorizontal)){this.viewer.viewport.flipped&&(e.position.x=this.viewport.getContainerSize().x-e.position.x);var i=this.viewport.pointFromPixel(e.position);this.panVertical?this.panHorizontal||(i.x=this.viewer.viewport.getCenter(!0).x):i.y=this.viewer.viewport.getCenter(!0).y,this.viewer.viewport.panTo(i),this.viewer.viewport.applyConstraints()}}function i(e){var t={tracker:e.eventSource,position:e.position,delta:e.delta,speed:e.speed,direction:e.direction,shift:e.shift,originalEvent:e.originalEvent,preventDefaultAction:!1};this.viewer.raiseEvent("navigator-drag",t),!t.preventDefaultAction&&this.viewer.viewport&&(this.panHorizontal||(e.delta.x=0),this.panVertical||(e.delta.y=0),this.viewer.viewport.flipped&&(e.delta.x=-e.delta.x),this.viewer.viewport.panBy(this.viewport.deltaPointsFromPixels(e.delta)),this.viewer.constrainDuringPan&&this.viewer.viewport.applyConstraints())}function n(e){e.insideElementPressed&&this.viewer.viewport&&this.viewer.viewport.applyConstraints()}function r(e){var t={tracker:e.eventSource,position:e.position,scroll:e.scroll,shift:e.shift,originalEvent:e.originalEvent,preventDefault:e.preventDefault};this.viewer.raiseEvent("navigator-scroll",t),e.preventDefault=t.preventDefault}function o(e,t){s(e,"rotate("+t+"deg)")}function s(e,t){e.style.webkitTransform=t,e.style.mozTransform=t,e.style.msTransform=t,e.style.oTransform=t,e.style.transform=t}e.Navigator=function(s){var a,l,c=s.viewer,u=this;function h(e){o(u.displayRegionContainer,e),o(u.displayRegion,-e),u.viewport.setRotation(e)}if(s.id?(this.element=document.getElementById(s.id),s.controlOptions={anchor:e.ControlAnchor.NONE,attachToViewer:!1,autoFade:!1}):(s.id="navigator-"+e.now(),this.element=e.makeNeutralElement("div"),s.controlOptions={anchor:e.ControlAnchor.TOP_RIGHT,attachToViewer:!0,autoFade:s.autoFade},s.position&&("BOTTOM_RIGHT"===s.position?s.controlOptions.anchor=e.ControlAnchor.BOTTOM_RIGHT:"BOTTOM_LEFT"===s.position?s.controlOptions.anchor=e.ControlAnchor.BOTTOM_LEFT:"TOP_RIGHT"===s.position?s.controlOptions.anchor=e.ControlAnchor.TOP_RIGHT:"TOP_LEFT"===s.position?s.controlOptions.anchor=e.ControlAnchor.TOP_LEFT:"ABSOLUTE"===s.position&&(s.controlOptions.anchor=e.ControlAnchor.ABSOLUTE,s.controlOptions.top=s.top,s.controlOptions.left=s.left,s.controlOptions.height=s.height,s.controlOptions.width=s.width))),this.element.id=s.id,this.element.className+=" navigator",s=e.extend(!0,{sizeRatio:e.DEFAULT_SETTINGS.navigatorSizeRatio},s,{element:this.element,tabIndex:-1,showNavigator:!1,mouseNavEnabled:!1,showNavigationControl:!1,showSequenceControl:!1,immediateRender:!0,blendTime:0,animationTime:0,autoResize:s.autoResize,minZoomImageRatio:1,background:s.background,opacity:s.opacity,borderColor:s.borderColor,displayRegionColor:s.displayRegionColor}),s.minPixelRatio=this.minPixelRatio=c.minPixelRatio,e.setElementTouchActionNone(this.element),this.borderWidth=2,this.fudge=new e.Point(1,1),this.totalBorderWidths=new e.Point(2*this.borderWidth,2*this.borderWidth).minus(this.fudge),s.controlOptions.anchor!==e.ControlAnchor.NONE&&function(e,t){e.margin="0px",e.border=t+"px solid "+s.borderColor,e.padding="0px",e.background=s.background,e.opacity=s.opacity,e.overflow="hidden"}(this.element.style,this.borderWidth),this.displayRegion=e.makeNeutralElement("div"),this.displayRegion.id=this.element.id+"-displayregion",this.displayRegion.className="displayregion",function(e,t){e.position="relative",e.top="0px",e.left="0px",e.fontSize="0px",e.overflow="hidden",e.border=t+"px solid "+s.displayRegionColor,e.margin="0px",e.padding="0px",e.background="transparent",e["float"]="left",e.cssFloat="left",e.styleFloat="left",e.zIndex=999999999,e.cursor="default"}(this.displayRegion.style,this.borderWidth),e.setElementPointerEventsNone(this.displayRegion),e.setElementTouchActionNone(this.displayRegion),this.displayRegionContainer=e.makeNeutralElement("div"),this.displayRegionContainer.id=this.element.id+"-displayregioncontainer",this.displayRegionContainer.className="displayregioncontainer",this.displayRegionContainer.style.width="100%",this.displayRegionContainer.style.height="100%",e.setElementPointerEventsNone(this.displayRegionContainer),e.setElementTouchActionNone(this.displayRegionContainer),c.addControl(this.element,s.controlOptions),this._resizeWithViewer=s.controlOptions.anchor!==e.ControlAnchor.ABSOLUTE&&s.controlOptions.anchor!==e.ControlAnchor.NONE,s.width&&s.height?(this.setWidth(s.width),this.setHeight(s.height)):this._resizeWithViewer&&(a=e.getElementSize(c.element),this.element.style.height=Math.round(a.y*s.sizeRatio)+"px",this.element.style.width=Math.round(a.x*s.sizeRatio)+"px",this.oldViewerSize=a,l=e.getElementSize(this.element),this.elementArea=l.x*l.y),this.oldContainerSize=new e.Point(0,0),e.Viewer.apply(this,[s]),this.displayRegionContainer.appendChild(this.displayRegion),this.element.getElementsByTagName("div")[0].appendChild(this.displayRegionContainer),s.navigatorRotate){var d=s.viewer.viewport?s.viewer.viewport.getRotation():s.viewer.degrees||0;h(d),s.viewer.addHandler("rotate",(function(e){h(e.degrees)}))}this.innerTracker.destroy(),this.innerTracker=new e.MouseTracker({userData:"Navigator.innerTracker",element:this.element,dragHandler:e.delegate(this,i),clickHandler:e.delegate(this,t),releaseHandler:e.delegate(this,n),scrollHandler:e.delegate(this,r),preProcessEventHandler:function(e){"wheel"===e.eventType&&(e.preventDefault=!0)}}),this.outerTracker.userData="Navigator.outerTracker",e.setElementPointerEventsNone(this.canvas),e.setElementPointerEventsNone(this.container),this.addHandler("reset-size",(function(){u.viewport&&u.viewport.goHome(!0)})),c.world.addHandler("item-index-change",(function(e){window.setTimeout((function(){var t=u.world.getItemAt(e.previousIndex);u.world.setItemIndex(t,e.newIndex)}),1)})),c.world.addHandler("remove-item",(function(e){var t=e.item,i=u._getMatchingItem(t);i&&u.world.removeItem(i)})),this.update(c.viewport)},e.extend(e.Navigator.prototype,e.EventSource.prototype,e.Viewer.prototype,{updateSize:function(){if(this.viewport){var t=new e.Point(0===this.container.clientWidth?1:this.container.clientWidth,0===this.container.clientHeight?1:this.container.clientHeight);t.equals(this.oldContainerSize)||(this.viewport.resize(t,!0),this.viewport.goHome(!0),this.oldContainerSize=t,this.drawer.clear(),this.world.draw())}},setWidth:function(e){this.width=e,this.element.style.width="number"===typeof e?e+"px":e,this._resizeWithViewer=!1},setHeight:function(e){this.height=e,this.element.style.height="number"===typeof e?e+"px":e,this._resizeWithViewer=!1},setFlip:function(e){return this.viewport.setFlip(e),this.setDisplayTransform(this.viewer.viewport.getFlip()?"scale(-1,1)":"scale(1,1)"),this},setDisplayTransform:function(e){s(this.displayRegion,e),s(this.canvas,e),s(this.element,e)},update:function(t){var i,n,r,o,s,a;if(i=e.getElementSize(this.viewer.element),this._resizeWithViewer&&i.x&&i.y&&!i.equals(this.oldViewerSize)&&(this.oldViewerSize=i,this.maintainSizeRatio||!this.elementArea?(n=i.x*this.sizeRatio,r=i.y*this.sizeRatio):(n=Math.sqrt(this.elementArea*(i.x/i.y)),r=this.elementArea/n),this.element.style.width=Math.round(n)+"px",this.element.style.height=Math.round(r)+"px",this.elementArea||(this.elementArea=n*r),this.updateSize()),t&&this.viewport){o=t.getBoundsNoRotate(!0),s=this.viewport.pixelFromPointNoRotate(o.getTopLeft(),!1),a=this.viewport.pixelFromPointNoRotate(o.getBottomRight(),!1).minus(this.totalBorderWidths);var l=this.displayRegion.style;l.display=this.world.getItemCount()?"block":"none",l.top=Math.round(s.y)+"px",l.left=Math.round(s.x)+"px";var c=Math.abs(s.x-a.x),u=Math.abs(s.y-a.y);l.width=Math.round(Math.max(c,0))+"px",l.height=Math.round(Math.max(u,0))+"px"}},addTiledImage:function(t){var i=this,n=t.originalTiledImage;delete t.original;var r=e.extend({},t,{success:function(e){var t=e.item;function r(){i._matchBounds(t,n)}function o(){i._matchOpacity(t,n)}function s(){i._matchCompositeOperation(t,n)}t._originalForNavigator=n,i._matchBounds(t,n,!0),i._matchOpacity(t,n),i._matchCompositeOperation(t,n),n.addHandler("bounds-change",r),n.addHandler("clip-change",r),n.addHandler("opacity-change",o),n.addHandler("composite-operation-change",s)}});return e.Viewer.prototype.addTiledImage.apply(this,[r])},destroy:function(){return e.Viewer.prototype.destroy.apply(this)},_getMatchingItem:function(e){for(var t,i=this.world.getItemCount(),n=0;n1||t.y>1)break;return e-1},getTileAtPoint:function(t,i){var n=i.x>=0&&i.x<=1&&i.y>=0&&i.y<=1/this.aspectRatio;e.console.assert(n,"[TileSource.getTileAtPoint] must be called with a valid point.");var r=this.dimensions.x*this.getLevelScale(t),o=i.x*r,s=i.y*r,a=Math.floor(o/this.getTileWidth(t)),l=Math.floor(s/this.getTileHeight(t));i.x>=1&&(a=this.getNumTiles(t).x-1);var c=1e-15;return i.y>=1/this.aspectRatio-c&&(l=this.getNumTiles(t).y-1),new e.Point(a,l)},getTileBounds:function(t,i,n,r){var o=this.dimensions.times(this.getLevelScale(t)),s=this.getTileWidth(t),a=this.getTileHeight(t),l=0===i?0:s*i-this.tileOverlap,c=0===n?0:a*n-this.tileOverlap,u=s+(0===i?1:2)*this.tileOverlap,h=a+(0===n?1:2)*this.tileOverlap,d=1/o.x;return u=Math.min(u,o.x-l),h=Math.min(h,o.y-c),r?new e.Rect(0,0,u,h):new e.Rect(l*d,c*d,u*d,h*d)},getImageInfo:function(i){var n,r,o,s,a,l,c,u=this;i&&(a=i.split("/"),l=a[a.length-1],c=l.lastIndexOf("."),c>-1&&(a[a.length-1]=l.slice(0,c))),r=function(t){"string"===typeof t&&(t=e.parseXml(t));var n=e.TileSource.determineType(u,t,i);n?(s=n.prototype.configure.apply(u,[t,i]),void 0===s.ajaxWithCredentials&&(s.ajaxWithCredentials=u.ajaxWithCredentials),o=new n(s),u.ready=!0,u.raiseEvent("ready",{tileSource:o})):u.raiseEvent("open-failed",{message:"Unable to load TileSource",source:i})},i.match(/\.js$/)?(n=i.split("/").pop().replace(".js",""),e.jsonp({url:i,async:!1,callbackName:n,callback:r})):e.makeAjaxRequest({url:i,withCredentials:this.ajaxWithCredentials,headers:this.ajaxHeaders,success:function(e){var i=t(e);r(i)},error:function(e,t){var n;try{n="HTTP "+e.status+" attempting to load TileSource"}catch(o){var r;r="undefined"!==typeof t&&t.toString?t.toString():"Unknown error",n=r+" attempting to load TileSource"}u.raiseEvent("open-failed",{message:n,source:i})}})},supports:function(e,t){return!1},configure:function(e,t){throw new Error("Method not implemented.")},getTileUrl:function(e,t,i){throw new Error("Method not implemented.")},getTileAjaxHeaders:function(e,t,i){return{}},tileExists:function(e,t,i){var n=this.getNumTiles(e);return e>=this.minLevel&&e<=this.maxLevel&&t>=0&&i>=0&&t=0;u--)for(h=this.displayRects[u],d=h.minLevel;d<=h.maxLevel;d++)this._levelRects[d]||(this._levelRects[d]=[]),this._levelRects[d].push(h);e.TileSource.apply(this,[p])},e.extend(e.DziTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){var i;return e.Image?i=e.Image.xmlns:e.documentElement&&("Image"!==e.documentElement.localName&&"Image"!==e.documentElement.tagName||(i=e.documentElement.namespaceURI)),i=(i||"").toLowerCase(),-1!==i.indexOf("schemas.microsoft.com/deepzoom/2008")||-1!==i.indexOf("schemas.microsoft.com/deepzoom/2009")},configure:function(n,r){var o;return o=e.isPlainObject(n)?i(this,n):t(this,n),r&&!o.tilesUrl&&(o.tilesUrl=r.replace(/([^/]+?)(\.(dzi|xml|js)?(\?[^/]*)?)?\/?$/,"$1_files/"),-1!==r.search(/\.(dzi|xml|js)\?/)?o.queryParams=r.match(/\?.*/):o.queryParams=""),o},getTileUrl:function(e,t,i){return[this.tilesUrl,e,"/",t,"_",i,".",this.fileFormat,this.queryParams].join("")},tileExists:function(e,t,i){var n,r,o,s,a,l,c,u=this._levelRects[e];if(this.minLevel&&ethis.maxLevel)return!1;if(!u||!u.length)return!0;for(c=u.length-1;c>=0;c--)if(n=u[c],!(en.maxLevel)&&(r=this.getLevelScale(e),o=n.x*r,s=n.y*r,a=o+n.width*r,l=s+n.height*r,o=Math.floor(o/this._tileWidth),s=Math.floor(s/this._tileWidth),a=Math.ceil(a/this._tileWidth),l=Math.ceil(l/this._tileWidth),o<=t&&t1&&e.profile[1].supports&&(r=-1!==e.profile[1].supports.indexOf("sizeByW")),3===e.version&&e.extraFeatures&&(r=-1!==e.extraFeatures.indexOf("sizeByWh")),!n||r}function i(e){for(var t=[],i=0;i0?n.tileSize=Math.max.apply(null,c):n.tileSize=a}else this.sizes&&this.sizes.length>0?(this.emulateLegacyImagePyramid=!0,n.levels=i(this),e.extend(!0,n,{width:n.levels[n.levels.length-1].width,height:n.levels[n.levels.length-1].height,tileSize:Math.max(n.height,n.width),tileOverlap:0,minLevel:0,maxLevel:n.levels.length-1}),this.levels=n.levels):e.console.error("Nothing in the info.json to construct image pyramids from");if(!n.maxLevel&&!this.emulateLegacyImagePyramid)if(this.scale_factors){var h=Math.max.apply(null,this.scale_factors);n.maxLevel=Math.round(Math.log(h)*Math.LOG2E)}else n.maxLevel=Number(Math.ceil(Math.log(Math.max(this.width,this.height),2)));e.TileSource.apply(this,[n])},e.extend(e.IIIFTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){return!(!e.protocol||"http://iiif.io/api/image"!==e.protocol)||(!(!e["@context"]||"http://library.stanford.edu/iiif/image-api/1.1/context.json"!==e["@context"]&&"http://iiif.io/api/image/1/context.json"!==e["@context"])||(!(!e.profile||0!==e.profile.indexOf("http://library.stanford.edu/iiif/image-api/compliance.html"))||(!!(e.identifier&&e.width&&e.height)||!(!e.documentElement||"info"!==e.documentElement.tagName||"http://library.stanford.edu/iiif/image-api/ns/"!==e.documentElement.namespaceURI))))},configure:function(t,i){if(e.isPlainObject(t)){if(t["@context"]){var r=t["@context"];if(Array.isArray(r))for(var o=0;o0&&t>=this.minLevel&&t<=this.maxLevel&&(i=this.levels[t].width/this.levels[this.maxLevel].width),i}return e.TileSource.prototype.getLevelScale.call(this,t)},getNumTiles:function(t){if(this.emulateLegacyImagePyramid){var i=this.getLevelScale(t);return i?new e.Point(1,1):new e.Point(0,0)}return e.TileSource.prototype.getNumTiles.call(this,t)},getTileAtPoint:function(t,i){return this.emulateLegacyImagePyramid?new e.Point(0,0):e.TileSource.prototype.getTileAtPoint.call(this,t,i)},getTileUrl:function(e,t,i){if(this.emulateLegacyImagePyramid){var n=null;return this.levels.length>0&&e>=this.minLevel&&e<=this.maxLevel&&(n=this.levels[e].url),n}var r,o,s,a,l,c,u,h,d,p,f,v,g,m,y="0",w=Math.pow(.5,this.maxLevel-e),x=Math.ceil(this.width*w),b=Math.ceil(this.height*w);return r=this.getTileWidth(e),o=this.getTileHeight(e),s=Math.ceil(r/w),a=Math.ceil(o/w),g=1===this.version?"native."+this.tileFormat:"default."+this.tileFormat,xc?l/256:c/256,s.maxLevel=Math.ceil(Math.log(a)/Math.log(2))-1,s.tileSize=256,s.width=l,s.height=c,e.TileSource.apply(this,[s])},e.extend(e.TmsTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){return e.type&&"tiledmapservice"===e.type},configure:function(e,t){return e},getTileUrl:function(e,t,i){var n=this.getNumTiles(e).y-1;return this.tilesUrl+e+"/"+t+"/"+(n-i)+".png"}})}(s),function(e){e.ZoomifyTileSource=function(e){"undefined"===typeof e.tileSize&&(e.tileSize=256),"undefined"===typeof e.fileFormat&&(e.fileFormat="jpg",this.fileFormat=e.fileFormat);var t={x:e.width,y:e.height};e.imageSizes=[{x:e.width,y:e.height}],e.gridSize=[this._getGridSize(e.width,e.height,e.tileSize)];while(parseInt(t.x,10)>e.tileSize||parseInt(t.y,10)>e.tileSize)t.x=Math.floor(t.x/2),t.y=Math.floor(t.y/2),e.imageSizes.push({x:t.x,y:t.y}),e.gridSize.push(this._getGridSize(t.x,t.y,e.tileSize));e.imageSizes.reverse(),e.gridSize.reverse(),e.minLevel=0,e.maxLevel=e.gridSize.length-1,s.TileSource.apply(this,[e])},e.extend(e.ZoomifyTileSource.prototype,e.TileSource.prototype,{_getGridSize:function(e,t,i){return{x:Math.ceil(e/i),y:Math.ceil(t/i)}},_calculateAbsoluteTileNumber:function(e,t,i){for(var n=0,r={},o=0;o");return r.sort((function(e,t){return e.height-t.height}))}function i(t,i){if(!i||!i.documentElement)throw new Error(e.getString("Errors.Xml"));var r,o,s=i.documentElement,a=s.tagName,l=null,c=[];if("image"===a)try{for(l={type:s.getAttribute("type"),levels:[]},c=s.getElementsByTagName("level"),o=0;o0?(r=n.levels[n.levels.length-1].width,o=n.levels[n.levels.length-1].height):(r=0,o=0,e.console.error("No supported image formats found")),e.extend(!0,n,{width:r,height:o,tileSize:Math.max(o,r),tileOverlap:0,minLevel:0,maxLevel:n.levels.length>0?n.levels.length-1:0}),e.TileSource.apply(this,[n]),this.levels=n.levels},e.extend(e.LegacyTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){return e.type&&"legacy-image-pyramid"===e.type||e.documentElement&&"legacy-image-pyramid"===e.documentElement.getAttribute("type")},configure:function(t,r){var o;return o=e.isPlainObject(t)?n(this,t):i(this,t),o},getLevelScale:function(e){var t=NaN;return this.levels.length>0&&e>=this.minLevel&&e<=this.maxLevel&&(t=this.levels[e].width/this.levels[this.maxLevel].width),t},getNumTiles:function(t){var i=this.getLevelScale(t);return i?new e.Point(1,1):new e.Point(0,0)},getTileUrl:function(e,t,i){var n=null;return this.levels.length>0&&e>=this.minLevel&&e<=this.maxLevel&&(n=this.levels[e].url),n}})}(s),function(e){e.ImageTileSource=function(t){t=e.extend({buildPyramid:!0,crossOriginPolicy:!1,ajaxWithCredentials:!1,useCanvas:!0},t),e.TileSource.apply(this,[t])},e.extend(e.ImageTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){return e.type&&"image"===e.type},configure:function(e,t){return e},getImageInfo:function(t){var i=this._image=new Image,n=this;this.crossOriginPolicy&&(i.crossOrigin=this.crossOriginPolicy),this.ajaxWithCredentials&&(i.useCredentials=this.ajaxWithCredentials),e.addEvent(i,"load",(function(){n.width=i.naturalWidth,n.height=i.naturalHeight,n.aspectRatio=n.width/n.height,n.dimensions=new e.Point(n.width,n.height),n._tileWidth=n.width,n._tileHeight=n.height,n.tileOverlap=0,n.minLevel=0,n.levels=n._buildLevels(),n.maxLevel=n.levels.length-1,n.ready=!0,n.raiseEvent("ready",{tileSource:n})})),e.addEvent(i,"error",(function(){n.raiseEvent("open-failed",{message:"Error loading image at "+t,source:t})})),i.src=t},getLevelScale:function(e){var t=NaN;return e>=this.minLevel&&e<=this.maxLevel&&(t=this.levels[e].width/this.levels[this.maxLevel].width),t},getNumTiles:function(t){var i=this.getLevelScale(t);return i?new e.Point(1,1):new e.Point(0,0)},getTileUrl:function(e,t,i){var n=null;return e>=this.minLevel&&e<=this.maxLevel&&(n=this.levels[e].url),n},getContext2D:function(e,t,i){var n=null;return e>=this.minLevel&&e<=this.maxLevel&&(n=this.levels[e].context2D),n},destroy:function(){this._freeupCanvasMemory()},_buildLevels:function(){var t=[{url:this._image.src,width:this._image.naturalWidth,height:this._image.naturalHeight}];if(!this.buildPyramid||!e.supportsCanvas||!this.useCanvas)return delete this._image,t;var i=this._image.naturalWidth,n=this._image.naturalHeight,r=document.createElement("canvas"),o=r.getContext("2d");if(r.width=i,r.height=n,o.drawImage(this._image,0,0,i,n),t[0].context2D=o,delete this._image,e.isCanvasTainted(r))return t;while(i>=2&&n>=2){i=Math.floor(i/2),n=Math.floor(n/2);var s=document.createElement("canvas"),a=s.getContext("2d");s.width=i,s.height=n,a.drawImage(r,0,0,i,n),t.splice(0,0,{context2D:a,width:i,height:n}),r=s,o=a}return t},_freeupCanvasMemory:function(){for(var e=0;e0&&t(i))}function n(i){i.shouldFade=!0,i.fadeBeginTime=e.now()+i.fadeDelay,window.setTimeout((function(){t(i)}),i.fadeDelay)}function r(t){t.shouldFade=!1,t.imgGroup&&e.setElementOpacity(t.imgGroup,1,!0)}function o(t,i){t.element.disabled||(i>=e.ButtonState.GROUP&&t.currentState===e.ButtonState.REST&&(r(t),t.currentState=e.ButtonState.GROUP),i>=e.ButtonState.HOVER&&t.currentState===e.ButtonState.GROUP&&(t.imgHover&&(t.imgHover.style.visibility=""),t.currentState=e.ButtonState.HOVER),i>=e.ButtonState.DOWN&&t.currentState===e.ButtonState.HOVER&&(t.imgDown&&(t.imgDown.style.visibility=""),t.currentState=e.ButtonState.DOWN))}function s(t,i){t.element.disabled||(i<=e.ButtonState.HOVER&&t.currentState===e.ButtonState.DOWN&&(t.imgDown&&(t.imgDown.style.visibility="hidden"),t.currentState=e.ButtonState.HOVER),i<=e.ButtonState.GROUP&&t.currentState===e.ButtonState.HOVER&&(t.imgHover&&(t.imgHover.style.visibility="hidden"),t.currentState=e.ButtonState.GROUP),i<=e.ButtonState.REST&&t.currentState===e.ButtonState.GROUP&&(n(t),t.currentState=e.ButtonState.REST))}e.ButtonState={REST:0,GROUP:1,HOVER:2,DOWN:3},e.Button=function(t){var i=this;e.EventSource.call(this),e.extend(!0,this,{tooltip:null,srcRest:null,srcGroup:null,srcHover:null,srcDown:null,clickTimeThreshold:e.DEFAULT_SETTINGS.clickTimeThreshold,clickDistThreshold:e.DEFAULT_SETTINGS.clickDistThreshold,fadeDelay:0,fadeLength:2e3,onPress:null,onRelease:null,onClick:null,onEnter:null,onExit:null,onFocus:null,onBlur:null,userData:null},t),this.element=t.element||e.makeNeutralElement("div"),t.element||(this.imgRest=e.makeTransparentImage(this.srcRest),this.imgGroup=e.makeTransparentImage(this.srcGroup),this.imgHover=e.makeTransparentImage(this.srcHover),this.imgDown=e.makeTransparentImage(this.srcDown),this.imgRest.alt=this.imgGroup.alt=this.imgHover.alt=this.imgDown.alt=this.tooltip,e.setElementPointerEventsNone(this.imgRest),e.setElementPointerEventsNone(this.imgGroup),e.setElementPointerEventsNone(this.imgHover),e.setElementPointerEventsNone(this.imgDown),this.element.style.position="relative",e.setElementTouchActionNone(this.element),this.imgGroup.style.position=this.imgHover.style.position=this.imgDown.style.position="absolute",this.imgGroup.style.top=this.imgHover.style.top=this.imgDown.style.top="0px",this.imgGroup.style.left=this.imgHover.style.left=this.imgDown.style.left="0px",this.imgHover.style.visibility=this.imgDown.style.visibility="hidden",e.Browser.vendor===e.BROWSERS.FIREFOX&&e.Browser.version<3&&(this.imgGroup.style.top=this.imgHover.style.top=this.imgDown.style.top=""),this.element.appendChild(this.imgRest),this.element.appendChild(this.imgGroup),this.element.appendChild(this.imgHover),this.element.appendChild(this.imgDown)),this.addHandler("press",this.onPress),this.addHandler("release",this.onRelease),this.addHandler("click",this.onClick),this.addHandler("enter",this.onEnter),this.addHandler("exit",this.onExit),this.addHandler("focus",this.onFocus),this.addHandler("blur",this.onBlur),this.currentState=e.ButtonState.GROUP,this.fadeBeginTime=null,this.shouldFade=!1,this.element.style.display="inline-block",this.element.style.position="relative",this.element.title=this.tooltip,this.tracker=new e.MouseTracker({userData:"Button.tracker",element:this.element,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,enterHandler:function(t){t.insideElementPressed?(o(i,e.ButtonState.DOWN),i.raiseEvent("enter",{originalEvent:t.originalEvent})):t.buttonDownAny||o(i,e.ButtonState.HOVER)},focusHandler:function(e){i.tracker.enterHandler(e),i.raiseEvent("focus",{originalEvent:e.originalEvent})},leaveHandler:function(t){s(i,e.ButtonState.GROUP),t.insideElementPressed&&i.raiseEvent("exit",{originalEvent:t.originalEvent})},blurHandler:function(e){i.tracker.leaveHandler(e),i.raiseEvent("blur",{originalEvent:e.originalEvent})},pressHandler:function(t){o(i,e.ButtonState.DOWN),i.raiseEvent("press",{originalEvent:t.originalEvent})},releaseHandler:function(t){t.insideElementPressed&&t.insideElementReleased?(s(i,e.ButtonState.HOVER),i.raiseEvent("release",{originalEvent:t.originalEvent})):t.insideElementPressed?s(i,e.ButtonState.GROUP):o(i,e.ButtonState.HOVER)},clickHandler:function(e){e.quick&&i.raiseEvent("click",{originalEvent:e.originalEvent})},keyHandler:function(e){13===e.keyCode?(i.raiseEvent("click",{originalEvent:e.originalEvent}),i.raiseEvent("release",{originalEvent:e.originalEvent}),e.preventDefault=!0):e.preventDefault=!1}}),s(this,e.ButtonState.REST)},e.extend(e.Button.prototype,e.EventSource.prototype,{notifyGroupEnter:function(){o(this,e.ButtonState.GROUP)},notifyGroupExit:function(){s(this,e.ButtonState.REST)},disable:function(){this.notifyGroupExit(),this.element.disabled=!0,e.setElementOpacity(this.element,.2,!0)},enable:function(){this.element.disabled=!1,e.setElementOpacity(this.element,1,!0),this.notifyGroupEnter()},destroy:function(){this.imgRest&&(this.element.removeChild(this.imgRest),this.imgRest=null),this.imgGroup&&(this.element.removeChild(this.imgGroup),this.imgGroup=null),this.imgHover&&(this.element.removeChild(this.imgHover),this.imgHover=null),this.imgDown&&(this.element.removeChild(this.imgDown),this.imgDown=null),this.removeAllHandlers(),this.tracker.destroy(),this.element=null}})}(s),function(e){e.ButtonGroup=function(t){e.extend(!0,this,{buttons:[],clickTimeThreshold:e.DEFAULT_SETTINGS.clickTimeThreshold,clickDistThreshold:e.DEFAULT_SETTINGS.clickDistThreshold,labelText:""},t);var i,n=this.buttons.concat([]),r=this;if(this.element=t.element||e.makeNeutralElement("div"),!t.group)for(this.element.style.display="inline-block",i=0;i=270?(s=this.getTopRight(),this.x=s.x,this.y=s.y,a=this.height,this.height=this.width,this.width=a,this.degrees-=270):this.degrees>=180?(s=this.getBottomRight(),this.x=s.x,this.y=s.y,this.degrees-=180):this.degrees>=90&&(s=this.getBottomLeft(),this.x=s.x,this.y=s.y,a=this.height,this.height=this.width,this.width=a,this.degrees-=90)},e.Rect.fromSummits=function(t,i,n){var r=t.distanceTo(i),o=t.distanceTo(n),s=i.minus(t),a=Math.atan(s.y/s.x);return s.x<0?a+=Math.PI:s.y<0&&(a+=2*Math.PI),new e.Rect(t.x,t.y,r,o,a/Math.PI*180)},e.Rect.prototype={clone:function(){return new e.Rect(this.x,this.y,this.width,this.height,this.degrees)},getAspectRatio:function(){return this.width/this.height},getTopLeft:function(){return new e.Point(this.x,this.y)},getBottomRight:function(){return new e.Point(this.x+this.width,this.y+this.height).rotate(this.degrees,this.getTopLeft())},getTopRight:function(){return new e.Point(this.x+this.width,this.y).rotate(this.degrees,this.getTopLeft())},getBottomLeft:function(){return new e.Point(this.x,this.y+this.height).rotate(this.degrees,this.getTopLeft())},getCenter:function(){return new e.Point(this.x+this.width/2,this.y+this.height/2).rotate(this.degrees,this.getTopLeft())},getSize:function(){return new e.Point(this.width,this.height)},equals:function(t){return t instanceof e.Rect&&this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height&&this.degrees===t.degrees},times:function(t){return new e.Rect(this.x*t,this.y*t,this.width*t,this.height*t,this.degrees)},translate:function(t){return new e.Rect(this.x+t.x,this.y+t.y,this.width,this.height,this.degrees)},union:function(t){var i=this.getBoundingBox(),n=t.getBoundingBox(),r=Math.min(i.x,n.x),o=Math.min(i.y,n.y),s=Math.max(i.x+i.width,n.x+n.width),a=Math.max(i.y+i.height,n.y+n.height);return new e.Rect(r,o,s-r,a-o)},intersection:function(t){var i=1e-10,n=[],r=this.getTopLeft();t.containsPoint(r,i)&&n.push(r);var o=this.getTopRight();t.containsPoint(o,i)&&n.push(o);var s=this.getBottomLeft();t.containsPoint(s,i)&&n.push(s);var a=this.getBottomRight();t.containsPoint(a,i)&&n.push(a);var l=t.getTopLeft();this.containsPoint(l,i)&&n.push(l);var c=t.getTopRight();this.containsPoint(c,i)&&n.push(c);var u=t.getBottomLeft();this.containsPoint(u,i)&&n.push(u);var h=t.getBottomRight();this.containsPoint(h,i)&&n.push(h);for(var d=this._getSegments(),p=t._getSegments(),f=0;fb&&(b=E.x),E.y<_&&(_=E.y),E.y>T&&(T=E.y)}return new e.Rect(x,_,b-x,T-_)},_getSegments:function(){var e=this.getTopLeft(),t=this.getTopRight(),i=this.getBottomLeft(),n=this.getBottomRight();return[[e,t],[t,n],[n,i],[i,e]]},rotate:function(t,i){if(t=e.positiveModulo(t,360),0===t)return this.clone();i=i||this.getCenter();var n=this.getTopLeft().rotate(t,i),r=this.getTopRight().rotate(t,i),o=r.minus(n);o=o.apply((function(e){var t=1e-15;return Math.abs(e)=-t&&(e.x-n.x)*o.x+(e.y-n.y)*o.y<=t&&(e.x-i.x)*s.x+(e.y-i.y)*s.y>=-t&&(e.x-r.x)*s.x+(e.y-r.y)*s.y<=t},toString:function(){return"["+Math.round(100*this.x)/100+", "+Math.round(100*this.y)/100+", "+Math.round(100*this.width)/100+"x"+Math.round(100*this.height)/100+", "+Math.round(100*this.degrees)/100+"deg]"}}}(s),function(e){var t={};function i(e){var t;e.quick&&(t="horizontal"===this.scroll?Math.floor(e.position.x/this.panelWidth):Math.floor(e.position.y/this.panelHeight),this.viewer.goToPage(t));this.element.focus()}function n(t){if(this.dragging=!0,this.element){var i=Number(this.element.style.marginLeft.replace("px","")),n=Number(this.element.style.marginTop.replace("px","")),r=Number(this.element.style.width.replace("px","")),s=Number(this.element.style.height.replace("px","")),a=e.getElementSize(this.viewer.canvas);"horizontal"===this.scroll?-t.delta.x>0?i>-(r-a.x)&&(this.element.style.marginLeft=i+2*t.delta.x+"px",o(this,a.x,i+2*t.delta.x)):-t.delta.x<0&&i<0&&(this.element.style.marginLeft=i+2*t.delta.x+"px",o(this,a.x,i+2*t.delta.x)):-t.delta.y>0?n>-(s-a.y)&&(this.element.style.marginTop=n+2*t.delta.y+"px",o(this,a.y,n+2*t.delta.y)):-t.delta.y<0&&n<0&&(this.element.style.marginTop=n+2*t.delta.y+"px",o(this,a.y,n+2*t.delta.y))}}function r(t){if(this.element){var i=Number(this.element.style.marginLeft.replace("px","")),n=Number(this.element.style.marginTop.replace("px","")),r=Number(this.element.style.width.replace("px","")),s=Number(this.element.style.height.replace("px","")),a=e.getElementSize(this.viewer.canvas);"horizontal"===this.scroll?t.scroll>0?i>-(r-a.x)&&(this.element.style.marginLeft=i-60*t.scroll+"px",o(this,a.x,i-60*t.scroll)):t.scroll<0&&i<0&&(this.element.style.marginLeft=i-60*t.scroll+"px",o(this,a.x,i-60*t.scroll)):t.scroll<0?n>a.y-s&&(this.element.style.marginTop=n+60*t.scroll+"px",o(this,a.y,n+60*t.scroll)):t.scroll>0&&n<0&&(this.element.style.marginTop=n+60*t.scroll+"px",o(this,a.y,n+60*t.scroll)),t.preventDefault=!0}}function o(t,i,n){var r,o,s,a,l,c;for(r="horizontal"===t.scroll?t.panelWidth:t.panelHeight,o=Math.ceil(i/r)+5,s=Math.ceil((Math.abs(n)+i)/r)+1,o=s-o,o=o<0?0:o,l=o;lc+r.x-this.panelWidth?(i=Math.min(i,a-r.x),this.element.style.marginLeft=-i+"px",o(this,r.x,-i)):iu+r.y-this.panelHeight?(i=Math.min(i,l-r.y),this.element.style.marginTop=-i+"px",o(this,r.y,-i)):i1?i[1].springStiffness:5,animationTime:i.length>1?i[1].animationTime:1.5}),e.console.assert("number"===typeof t.springStiffness&&0!==t.springStiffness,"[OpenSeadragon.Spring] options.springStiffness must be a non-zero number"),e.console.assert("number"===typeof t.animationTime&&t.animationTime>=0,"[OpenSeadragon.Spring] options.animationTime must be a number greater than or equal to 0"),t.exponential&&(this._exponential=!0,delete t.exponential),e.extend(!0,this,t),this.current={value:"number"===typeof this.initial?this.initial:this._exponential?0:1,time:e.now()},e.console.assert(!this._exponential||0!==this.current.value,"[OpenSeadragon.Spring] value must be non-zero for exponential springs"),this.start={value:this.current.value,time:this.current.time},this.target={value:this.current.value,time:this.current.time},this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},e.Spring.prototype={resetTo:function(t){e.console.assert(!this._exponential||0!==t,"[OpenSeadragon.Spring.resetTo] target must be non-zero for exponential springs"),this.start.value=this.target.value=this.current.value=t,this.start.time=this.target.time=this.current.time=e.now(),this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},springTo:function(t){e.console.assert(!this._exponential||0!==t,"[OpenSeadragon.Spring.springTo] target must be non-zero for exponential springs"),this.start.value=this.current.value,this.start.time=this.current.time,this.target.value=t,this.target.time=this.start.time+1e3*this.animationTime,this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value))},shiftBy:function(t){this.start.value+=t,this.target.value+=t,this._exponential&&(e.console.assert(0!==this.target.value&&0!==this.start.value,"[OpenSeadragon.Spring.shiftBy] spring value must be non-zero for exponential springs"),this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value))},setExponential:function(t){this._exponential=t,this._exponential&&(e.console.assert(0!==this.current.value&&0!==this.target.value&&0!==this.start.value,"[OpenSeadragon.Spring.setExponential] spring value must be non-zero for exponential springs"),this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},update:function(){var i,n;this.current.time=e.now(),this._exponential?(i=this.start._logValue,n=this.target._logValue):(i=this.start.value,n=this.target.value);var r=this.current.time>=this.target.time?n:i+(n-i)*t(this.springStiffness,(this.current.time-this.start.time)/(this.target.time-this.start.time)),o=this.current.value;return this._exponential?this.current.value=Math.exp(r):this.current.value=r,o!==this.current.value},isAtTargetValue:function(){return this.current.value===this.target.value}}}(s),function(e){function t(t){e.extend(!0,this,{timeout:e.DEFAULT_SETTINGS.timeout,jobId:null},t),this.image=null}function i(e,t,i){var n;e.jobsInProgress--,(!e.jobLimit||e.jobsInProgress0&&(n=e.jobQueue.shift(),n.start(),e.jobsInProgress++),i(t.image,t.errorMsg,t.request)}t.prototype={errorMsg:null,start:function(){var t=this,i=this.abort;this.image=new Image,this.image.onload=function(){t.finish(!0)},this.image.onabort=this.image.onerror=function(){t.errorMsg="Image load aborted",t.finish(!1)},this.jobId=window.setTimeout((function(){t.errorMsg="Image load exceeded timeout ("+t.timeout+" ms)",t.finish(!1)}),this.timeout),this.loadWithAjax?(this.request=e.makeAjaxRequest({url:this.src,withCredentials:this.ajaxWithCredentials,headers:this.ajaxHeaders,responseType:"arraybuffer",success:function(e){var i;try{i=new window.Blob([e.response])}catch(s){var n=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder;if("TypeError"===s.name&&n){var r=new n;r.append(e.response),i=r.getBlob()}}0===i.size&&(t.errorMsg="Empty image response.",t.finish(!1));var o=(window.URL||window.webkitURL).createObjectURL(i);t.image.src=o},error:function(e){t.errorMsg="Image load aborted - XHR error",t.finish(!1)}}),this.abort=function(){t.request.abort(),"function"===typeof i&&i()}):(!1!==this.crossOriginPolicy&&(this.image.crossOrigin=this.crossOriginPolicy),this.image.src=this.src)},finish:function(e){this.image.onload=this.image.onerror=this.image.onabort=null,e||(this.image=null),this.jobId&&window.clearTimeout(this.jobId),this.callback(this)}},e.ImageLoader=function(t){e.extend(!0,this,{jobLimit:e.DEFAULT_SETTINGS.imageLoaderLimit,timeout:e.DEFAULT_SETTINGS.timeout,jobQueue:[],jobsInProgress:0},t)},e.ImageLoader.prototype={addJob:function(e){var n=this,r=function(t){i(n,t,e.callback)},o={src:e.src,loadWithAjax:e.loadWithAjax,ajaxHeaders:e.loadWithAjax?e.ajaxHeaders:null,crossOriginPolicy:e.crossOriginPolicy,ajaxWithCredentials:e.ajaxWithCredentials,callback:r,abort:e.abort,timeout:this.timeout},s=new t(o);!this.jobLimit||this.jobsInProgressi&&(i=r)}return i},needsUpdate:function(){return e.console.error("[Drawer.needsUpdate] this function is deprecated. Use World.needsDraw instead."),this.viewer.world.needsDraw()},numTilesLoaded:function(){return e.console.error("[Drawer.numTilesLoaded] this function is deprecated. Use TileCache.numTilesLoaded instead."),this.viewer.tileCache.numTilesLoaded()},reset:function(){return e.console.error("[Drawer.reset] this function is deprecated. Use World.resetItems instead."),this.viewer.world.resetItems(),this},update:function(){return e.console.error("[Drawer.update] this function is deprecated. Use Drawer.clear and World.draw instead."),this.clear(),this.viewer.world.draw(),this},canRotate:function(){return this.useCanvas},destroy:function(){this.canvas.width=1,this.canvas.height=1,this.sketchCanvas=null,this.sketchContext=null},clear:function(){if(this.canvas.innerHTML="",this.useCanvas){var e=this._calculateCanvasSize();if((this.canvas.width!==e.x||this.canvas.height!==e.y)&&(this.canvas.width=e.x,this.canvas.height=e.y,this._updateImageSmoothingEnabled(this.context),null!==this.sketchCanvas)){var t=this._calculateSketchCanvasSize();this.sketchCanvas.width=t.x,this.sketchCanvas.height=t.y,this._updateImageSmoothingEnabled(this.sketchContext)}this._clear()}},_clear:function(e,t){if(this.useCanvas){var i=this._getContext(e);if(t)i.clearRect(t.x,t.y,t.width,t.height);else{var n=i.canvas;i.clearRect(0,0,n.width,n.height)}}},viewportToDrawerRectangle:function(t){var i=this.viewport.pixelFromPointNoRotate(t.getTopLeft(),!0),n=this.viewport.deltaPixelsFromPointsNoRotate(t.getSize(),!0);return new e.Rect(i.x*e.pixelDensityRatio,i.y*e.pixelDensityRatio,n.x*e.pixelDensityRatio,n.y*e.pixelDensityRatio)},drawTile:function(t,i,n,r,o){if(e.console.assert(t,"[Drawer.drawTile] tile is required"),e.console.assert(i,"[Drawer.drawTile] drawingHandler is required"),this.useCanvas){var s=this._getContext(n);r=r||1,t.drawCanvas(s,i,r,o)}else t.drawHTML(this.canvas)},_getContext:function(e){var t=this.context;if(e){if(null===this.sketchCanvas){this.sketchCanvas=document.createElement("canvas");var i=this._calculateSketchCanvasSize();if(this.sketchCanvas.width=i.x,this.sketchCanvas.height=i.y,this.sketchContext=this.sketchCanvas.getContext("2d"),0===this.viewport.getRotation()){var n=this;this.viewer.addHandler("rotate",(function e(){if(0!==n.viewport.getRotation()){n.viewer.removeHandler("rotate",e);var t=n._calculateSketchCanvasSize();n.sketchCanvas.width=t.x,n.sketchCanvas.height=t.y}}))}this._updateImageSmoothingEnabled(this.sketchContext)}t=this.sketchContext}return t},saveContext:function(e){this.useCanvas&&this._getContext(e).save()},restoreContext:function(e){this.useCanvas&&this._getContext(e).restore()},setClip:function(e,t){if(this.useCanvas){var i=this._getContext(t);i.beginPath(),i.rect(e.x,e.y,e.width,e.height),i.clip()}},drawRectangle:function(e,t,i){if(this.useCanvas){var n=this._getContext(i);n.save(),n.fillStyle=t,n.fillRect(e.x,e.y,e.width,e.height),n.restore()}},blendSketch:function(t,i,n,r){var o=t;if(e.isPlainObject(o)||(o={opacity:t,scale:i,translate:n,compositeOperation:r}),this.useCanvas&&this.sketchCanvas){t=o.opacity,r=o.compositeOperation;var s=o.bounds;if(this.context.save(),this.context.globalAlpha=t,r&&(this.context.globalCompositeOperation=r),s)s.x<0&&(s.width+=s.x,s.x=0),s.x+s.width>this.canvas.width&&(s.width=this.canvas.width-s.x),s.y<0&&(s.height+=s.y,s.y=0),s.y+s.height>this.canvas.height&&(s.height=this.canvas.height-s.y),this.context.drawImage(this.sketchCanvas,s.x,s.y,s.width,s.height,s.x,s.y,s.width,s.height);else{i=o.scale||1,n=o.translate;var a=n instanceof e.Point?n:new e.Point(0,0),l=0,c=0;if(n){var u=this.sketchCanvas.width-this.canvas.width,h=this.sketchCanvas.height-this.canvas.height;l=Math.round(u/2),c=Math.round(h/2)}this.context.drawImage(this.sketchCanvas,a.x-l*i,a.y-c*i,(this.canvas.width+2*l)*i,(this.canvas.height+2*c)*i,-l,-c,this.canvas.width+2*l,this.canvas.height+2*c)}this.context.restore()}},drawDebugInfo:function(t,i,n,r){if(this.useCanvas){var o=this.viewer.world.getIndexOfItem(r)%this.debugGridColor.length,s=this.context;s.save(),s.lineWidth=2*e.pixelDensityRatio,s.font="small-caps bold "+13*e.pixelDensityRatio+"px arial",s.strokeStyle=this.debugGridColor[o],s.fillStyle=this.debugGridColor[o],0!==this.viewport.degrees&&this._offsetForRotation({degrees:this.viewport.degrees}),r.getRotation(!0)%360!==0&&this._offsetForRotation({degrees:r.getRotation(!0),point:r.viewport.pixelFromPointNoRotate(r._getRotationPoint(!0),!0)}),0===r.viewport.degrees&&r.getRotation(!0)%360===0&&r._drawer.viewer.viewport.getFlip()&&r._drawer._flip(),s.strokeRect(t.position.x*e.pixelDensityRatio,t.position.y*e.pixelDensityRatio,t.size.x*e.pixelDensityRatio,t.size.y*e.pixelDensityRatio);var a=(t.position.x+t.size.x/2)*e.pixelDensityRatio,l=(t.position.y+t.size.y/2)*e.pixelDensityRatio;s.translate(a,l),s.rotate(Math.PI/180*-this.viewport.degrees),s.translate(-a,-l),0===t.x&&0===t.y&&(s.fillText("Zoom: "+this.viewport.getZoom(),t.position.x*e.pixelDensityRatio,(t.position.y-30)*e.pixelDensityRatio),s.fillText("Pan: "+this.viewport.getBounds().toString(),t.position.x*e.pixelDensityRatio,(t.position.y-20)*e.pixelDensityRatio)),s.fillText("Level: "+t.level,(t.position.x+10)*e.pixelDensityRatio,(t.position.y+20)*e.pixelDensityRatio),s.fillText("Column: "+t.x,(t.position.x+10)*e.pixelDensityRatio,(t.position.y+30)*e.pixelDensityRatio),s.fillText("Row: "+t.y,(t.position.x+10)*e.pixelDensityRatio,(t.position.y+40)*e.pixelDensityRatio),s.fillText("Order: "+n+" of "+i,(t.position.x+10)*e.pixelDensityRatio,(t.position.y+50)*e.pixelDensityRatio),s.fillText("Size: "+t.size.toString(),(t.position.x+10)*e.pixelDensityRatio,(t.position.y+60)*e.pixelDensityRatio),s.fillText("Position: "+t.position.toString(),(t.position.x+10)*e.pixelDensityRatio,(t.position.y+70)*e.pixelDensityRatio),0!==this.viewport.degrees&&this._restoreRotationChanges(),r.getRotation(!0)%360!==0&&this._restoreRotationChanges(),0===r.viewport.degrees&&r.getRotation(!0)%360===0&&r._drawer.viewer.viewport.getFlip()&&r._drawer._flip(),s.restore()}},debugRect:function(t){if(this.useCanvas){var i=this.context;i.save(),i.lineWidth=2*e.pixelDensityRatio,i.strokeStyle=this.debugGridColor[0],i.fillStyle=this.debugGridColor[0],i.strokeRect(t.x*e.pixelDensityRatio,t.y*e.pixelDensityRatio,t.width*e.pixelDensityRatio,t.height*e.pixelDensityRatio),i.restore()}},setImageSmoothingEnabled:function(e){this.useCanvas&&(this._imageSmoothingEnabled=e,this._updateImageSmoothingEnabled(this.context),this.viewer.forceRedraw())},_updateImageSmoothingEnabled:function(e){e.msImageSmoothingEnabled=this._imageSmoothingEnabled,e.imageSmoothingEnabled=this._imageSmoothingEnabled},getCanvasSize:function(t){var i=this._getContext(t).canvas;return new e.Point(i.width,i.height)},getCanvasCenter:function(){return new e.Point(this.canvas.width/2,this.canvas.height/2)},_offsetForRotation:function(t){var i=t.point?t.point.times(e.pixelDensityRatio):this.getCanvasCenter(),n=this._getContext(t.useSketch);n.save(),n.translate(i.x,i.y),this.viewer.viewport.flipped?(n.rotate(Math.PI/180*-t.degrees),n.scale(-1,1)):n.rotate(Math.PI/180*t.degrees),n.translate(-i.x,-i.y)},_flip:function(t){t=t||{};var i=t.point?t.point.times(e.pixelDensityRatio):this.getCanvasCenter(),n=this._getContext(t.useSketch);n.translate(i.x,0),n.scale(-1,1),n.translate(-i.x,0)},_restoreRotationChanges:function(e){var t=this._getContext(e);t.restore()},_calculateCanvasSize:function(){var t=e.pixelDensityRatio,i=this.viewport.getContainerSize();return{x:Math.round(i.x*t),y:Math.round(i.y*t)}},_calculateSketchCanvasSize:function(){var e=this._calculateCanvasSize();if(0===this.viewport.getRotation())return e;var t=Math.ceil(Math.sqrt(e.x*e.x+e.y*e.y));return{x:t,y:t}}}}(s),function(e){e.Viewport=function(t){var i=arguments;i.length&&i[0]instanceof e.Point&&(t={containerSize:i[0],contentSize:i[1],config:i[2]}),t.config&&(e.extend(!0,t,t.config),delete t.config),this._margins=e.extend({left:0,top:0,right:0,bottom:0},t.margins||{}),delete t.margins,e.extend(!0,this,{containerSize:null,contentSize:null,zoomPoint:null,viewer:null,springStiffness:e.DEFAULT_SETTINGS.springStiffness,animationTime:e.DEFAULT_SETTINGS.animationTime,minZoomImageRatio:e.DEFAULT_SETTINGS.minZoomImageRatio,maxZoomPixelRatio:e.DEFAULT_SETTINGS.maxZoomPixelRatio,visibilityRatio:e.DEFAULT_SETTINGS.visibilityRatio,wrapHorizontal:e.DEFAULT_SETTINGS.wrapHorizontal,wrapVertical:e.DEFAULT_SETTINGS.wrapVertical,defaultZoomLevel:e.DEFAULT_SETTINGS.defaultZoomLevel,minZoomLevel:e.DEFAULT_SETTINGS.minZoomLevel,maxZoomLevel:e.DEFAULT_SETTINGS.maxZoomLevel,degrees:e.DEFAULT_SETTINGS.degrees,flipped:e.DEFAULT_SETTINGS.flipped,homeFillsViewer:e.DEFAULT_SETTINGS.homeFillsViewer},t),this._updateContainerInnerSize(),this.centerSpringX=new e.Spring({initial:0,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.centerSpringY=new e.Spring({initial:0,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.zoomSpring=new e.Spring({exponential:!0,initial:1,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._oldCenterX=this.centerSpringX.current.value,this._oldCenterY=this.centerSpringY.current.value,this._oldZoom=this.zoomSpring.current.value,this._setContentBounds(new e.Rect(0,0,1,1),1),this.goHome(!0),this.update()},e.Viewport.prototype={resetContentSize:function(t){return e.console.assert(t,"[Viewport.resetContentSize] contentSize is required"),e.console.assert(t instanceof e.Point,"[Viewport.resetContentSize] contentSize must be an OpenSeadragon.Point"),e.console.assert(t.x>0,"[Viewport.resetContentSize] contentSize.x must be greater than 0"),e.console.assert(t.y>0,"[Viewport.resetContentSize] contentSize.y must be greater than 0"),this._setContentBounds(new e.Rect(0,0,1,t.y/t.x),t.x),this},setHomeBounds:function(t,i){e.console.error("[Viewport.setHomeBounds] this function is deprecated; The content bounds should not be set manually."),this._setContentBounds(t,i)},_setContentBounds:function(t,i){e.console.assert(t,"[Viewport._setContentBounds] bounds is required"),e.console.assert(t instanceof e.Rect,"[Viewport._setContentBounds] bounds must be an OpenSeadragon.Rect"),e.console.assert(t.width>0,"[Viewport._setContentBounds] bounds.width must be greater than 0"),e.console.assert(t.height>0,"[Viewport._setContentBounds] bounds.height must be greater than 0"),this._contentBoundsNoRotate=t.clone(),this._contentSizeNoRotate=this._contentBoundsNoRotate.getSize().times(i),this._contentBounds=t.rotate(this.degrees).getBoundingBox(),this._contentSize=this._contentBounds.getSize().times(i),this._contentAspectRatio=this._contentSize.x/this._contentSize.y,this.viewer&&this.viewer.raiseEvent("reset-size",{contentSize:this._contentSizeNoRotate.clone(),contentFactor:i,homeBounds:this._contentBoundsNoRotate.clone(),contentBounds:this._contentBounds.clone()})},getHomeZoom:function(){if(this.defaultZoomLevel)return this.defaultZoomLevel;var e,t=this._contentAspectRatio/this.getAspectRatio();return e=this.homeFillsViewer?t>=1?t:1:t>=1?1:t,e/this._contentBounds.width},getHomeBounds:function(){return this.getHomeBoundsNoRotate().rotate(-this.getRotation())},getHomeBoundsNoRotate:function(){var t=this._contentBounds.getCenter(),i=1/this.getHomeZoom(),n=i/this.getAspectRatio();return new e.Rect(t.x-i/2,t.y-n/2,i,n)},goHome:function(e){return this.viewer&&this.viewer.raiseEvent("home",{immediately:e}),this.fitBounds(this.getHomeBounds(),e)},getMinZoom:function(){var e=this.getHomeZoom(),t=this.minZoomLevel?this.minZoomLevel:this.minZoomImageRatio*e;return t},getMaxZoom:function(){var e=this.maxZoomLevel;return e||(e=this._contentSize.x*this.maxZoomPixelRatio/this._containerInnerSize.x,e/=this._contentBounds.width),Math.max(e,this.getHomeZoom())},getAspectRatio:function(){return this._containerInnerSize.x/this._containerInnerSize.y},getContainerSize:function(){return new e.Point(this.containerSize.x,this.containerSize.y)},getMargins:function(){return e.extend({},this._margins)},setMargins:function(t){e.console.assert("object"===e.type(t),"[Viewport.setMargins] margins must be an object"),this._margins=e.extend({left:0,top:0,right:0,bottom:0},t),this._updateContainerInnerSize(),this.viewer&&this.viewer.forceRedraw()},getBounds:function(e){return this.getBoundsNoRotate(e).rotate(-this.getRotation())},getBoundsNoRotate:function(t){var i=this.getCenter(t),n=1/this.getZoom(t),r=n/this.getAspectRatio();return new e.Rect(i.x-n/2,i.y-r/2,n,r)},getBoundsWithMargins:function(e){return this.getBoundsNoRotateWithMargins(e).rotate(-this.getRotation(),this.getCenter(e))},getBoundsNoRotateWithMargins:function(e){var t=this.getBoundsNoRotate(e),i=this._containerInnerSize.x*this.getZoom(e);return t.x-=this._margins.left/i,t.y-=this._margins.top/i,t.width+=(this._margins.left+this._margins.right)/i,t.height+=(this._margins.top+this._margins.bottom)/i,t},getCenter:function(t){var i,n,r,o,s,a,l,c,u=new e.Point(this.centerSpringX.current.value,this.centerSpringY.current.value),h=new e.Point(this.centerSpringX.target.value,this.centerSpringY.target.value);return t?u:this.zoomPoint?(i=this.pixelFromPoint(this.zoomPoint,!0),n=this.getZoom(),r=1/n,o=r/this.getAspectRatio(),s=new e.Rect(u.x-r/2,u.y-o/2,r,o),a=this._pixelFromPoint(this.zoomPoint,s),l=a.minus(i),c=l.divide(this._containerInnerSize.x*n),h.plus(c)):h},getZoom:function(e){return e?this.zoomSpring.current.value:this.zoomSpring.target.value},_applyZoomConstraints:function(e){return Math.max(Math.min(e,this.getMaxZoom()),this.getMinZoom())},_applyBoundaryConstraints:function(t){var i=new e.Rect(t.x,t.y,t.width,t.height);if(this.wrapHorizontal);else{var n=this.visibilityRatio*i.width,r=i.x+i.width,o=this._contentBoundsNoRotate.x+this._contentBoundsNoRotate.width,s=this._contentBoundsNoRotate.x-r+n,a=o-i.x-n;n>this._contentBoundsNoRotate.width?i.x+=(s+a)/2:a<0?i.x+=a:s>0&&(i.x+=s)}if(this.wrapVertical);else{var l=this.visibilityRatio*i.height,c=i.y+i.height,u=this._contentBoundsNoRotate.y+this._contentBoundsNoRotate.height,h=this._contentBoundsNoRotate.y-c+l,d=u-i.y-l;l>this._contentBoundsNoRotate.height?i.y+=(h+d)/2:d<0?i.y+=d:h>0&&(i.y+=h)}return i},_raiseConstraintsEvent:function(e){this.viewer&&this.viewer.raiseEvent("constrain",{immediately:e})},applyConstraints:function(e){var t=this.getZoom(),i=this._applyZoomConstraints(t);t!==i&&this.zoomTo(i,this.zoomPoint,e);var n=this.getBoundsNoRotate(),r=this._applyBoundaryConstraints(n);return this._raiseConstraintsEvent(e),(n.x!==r.x||n.y!==r.y||e)&&this.fitBounds(r.rotate(-this.getRotation()),e),this},ensureVisible:function(e){return this.applyConstraints(e)},_fitBounds:function(t,i){i=i||{};var n=i.immediately||!1,r=i.constraints||!1,o=this.getAspectRatio(),s=t.getCenter(),a=new e.Rect(t.x,t.y,t.width,t.height,t.degrees+this.getRotation()).getBoundingBox();a.getAspectRatio()>=o?a.height=a.width/o:a.width=a.height*o,a.x=s.x-a.width/2,a.y=s.y-a.height/2;var l=1/a.width;if(r){var c=a.getAspectRatio(),u=this._applyZoomConstraints(l);l!==u&&(l=u,a.width=1/l,a.x=s.x-a.width/2,a.height=a.width/c,a.y=s.y-a.height/2),a=this._applyBoundaryConstraints(a),s=a.getCenter(),this._raiseConstraintsEvent(n)}if(n)return this.panTo(s,!0),this.zoomTo(l,null,!0);this.panTo(this.getCenter(!0),!0),this.zoomTo(this.getZoom(!0),null,!0);var h=this.getBounds(),d=this.getZoom();if(0===d||Math.abs(l/d-1)<1e-8)return this.zoomTo(l,!0),this.panTo(s,n);a=a.rotate(-this.getRotation());var p=a.getTopLeft().times(l).minus(h.getTopLeft().times(d)).divide(l-d);return this.zoomTo(l,p,n)},fitBounds:function(e,t){return this._fitBounds(e,{immediately:t,constraints:!1})},fitBoundsWithConstraints:function(e,t){return this._fitBounds(e,{immediately:t,constraints:!0})},fitVertically:function(t){var i=new e.Rect(this._contentBounds.x+this._contentBounds.width/2,this._contentBounds.y,0,this._contentBounds.height);return this.fitBounds(i,t)},fitHorizontally:function(t){var i=new e.Rect(this._contentBounds.x,this._contentBounds.y+this._contentBounds.height/2,this._contentBounds.width,0);return this.fitBounds(i,t)},getConstrainedBounds:function(e){var t,i;return t=this.getBounds(e),i=this._applyBoundaryConstraints(t),i},panBy:function(t,i){var n=new e.Point(this.centerSpringX.target.value,this.centerSpringY.target.value);return this.panTo(n.plus(t),i)},panTo:function(e,t){return t?(this.centerSpringX.resetTo(e.x),this.centerSpringY.resetTo(e.y)):(this.centerSpringX.springTo(e.x),this.centerSpringY.springTo(e.y)),this.viewer&&this.viewer.raiseEvent("pan",{center:e,immediately:t}),this},zoomBy:function(e,t,i){return this.zoomTo(this.zoomSpring.target.value*e,t,i)},zoomTo:function(t,i,n){var r=this;return this.zoomPoint=i instanceof e.Point&&!isNaN(i.x)&&!isNaN(i.y)?i:null,n?this._adjustCenterSpringsForZoomPoint((function(){r.zoomSpring.resetTo(t)})):this.zoomSpring.springTo(t),this.viewer&&this.viewer.raiseEvent("zoom",{zoom:t,refPoint:i,immediately:n}),this},setRotation:function(t){return this.viewer&&this.viewer.drawer.canRotate()?(this.degrees=e.positiveModulo(t,360),this._setContentBounds(this.viewer.world.getHomeBounds(),this.viewer.world.getContentFactor()),this.viewer.forceRedraw(),this.viewer.raiseEvent("rotate",{degrees:t}),this):this},getRotation:function(){return this.degrees},resize:function(e,t){var i,n=this.getBoundsNoRotate(),r=n;return this.containerSize.x=e.x,this.containerSize.y=e.y,this._updateContainerInnerSize(),t&&(i=e.x/this.containerSize.x,r.width=n.width*i,r.height=r.width/this.getAspectRatio()),this.viewer&&this.viewer.raiseEvent("resize",{newContainerSize:e,maintain:t}),this.fitBounds(r,!0)},_updateContainerInnerSize:function(){this._containerInnerSize=new e.Point(Math.max(1,this.containerSize.x-(this._margins.left+this._margins.right)),Math.max(1,this.containerSize.y-(this._margins.top+this._margins.bottom)))},update:function(){var e=this;this._adjustCenterSpringsForZoomPoint((function(){e.zoomSpring.update()})),this.centerSpringX.update(),this.centerSpringY.update();var t=this.centerSpringX.current.value!==this._oldCenterX||this.centerSpringY.current.value!==this._oldCenterY||this.zoomSpring.current.value!==this._oldZoom;return this._oldCenterX=this.centerSpringX.current.value,this._oldCenterY=this.centerSpringY.current.value,this._oldZoom=this.zoomSpring.current.value,t},_adjustCenterSpringsForZoomPoint:function(e){if(this.zoomPoint){var t=this.pixelFromPoint(this.zoomPoint,!0);e();var i=this.pixelFromPoint(this.zoomPoint,!0),n=i.minus(t),r=this.deltaPointsFromPixels(n,!0);this.centerSpringX.shiftBy(r.x),this.centerSpringY.shiftBy(r.y),this.zoomSpring.isAtTargetValue()&&(this.zoomPoint=null)}else e()},deltaPixelsFromPointsNoRotate:function(e,t){return e.times(this._containerInnerSize.x*this.getZoom(t))},deltaPixelsFromPoints:function(e,t){return this.deltaPixelsFromPointsNoRotate(e.rotate(this.getRotation()),t)},deltaPointsFromPixelsNoRotate:function(e,t){return e.divide(this._containerInnerSize.x*this.getZoom(t))},deltaPointsFromPixels:function(e,t){return this.deltaPointsFromPixelsNoRotate(e,t).rotate(-this.getRotation())},pixelFromPointNoRotate:function(e,t){return this._pixelFromPointNoRotate(e,this.getBoundsNoRotate(t))},pixelFromPoint:function(e,t){return this._pixelFromPoint(e,this.getBoundsNoRotate(t))},_pixelFromPointNoRotate:function(t,i){return t.minus(i.getTopLeft()).times(this._containerInnerSize.x/i.width).plus(new e.Point(this._margins.left,this._margins.top))},_pixelFromPoint:function(e,t){return this._pixelFromPointNoRotate(e.rotate(this.getRotation(),this.getCenter(!0)),t)},pointFromPixelNoRotate:function(t,i){var n=this.getBoundsNoRotate(i);return t.minus(new e.Point(this._margins.left,this._margins.top)).divide(this._containerInnerSize.x/n.width).plus(n.getTopLeft())},pointFromPixel:function(e,t){return this.pointFromPixelNoRotate(e,t).rotate(-this.getRotation(),this.getCenter(!0))},_viewportToImageDelta:function(t,i){var n=this._contentBoundsNoRotate.width;return new e.Point(t*this._contentSizeNoRotate.x/n,i*this._contentSizeNoRotate.x/n)},viewportToImageCoordinates:function(t,i){if(t instanceof e.Point)return this.viewportToImageCoordinates(t.x,t.y);if(this.viewer){var n=this.viewer.world.getItemCount();if(n>1)e.console.error("[Viewport.viewportToImageCoordinates] is not accurate with multi-image; use TiledImage.viewportToImageCoordinates instead.");else if(1===n){var r=this.viewer.world.getItemAt(0);return r.viewportToImageCoordinates(t,i,!0)}}return this._viewportToImageDelta(t-this._contentBoundsNoRotate.x,i-this._contentBoundsNoRotate.y)},_imageToViewportDelta:function(t,i){var n=this._contentBoundsNoRotate.width;return new e.Point(t/this._contentSizeNoRotate.x*n,i/this._contentSizeNoRotate.x*n)},imageToViewportCoordinates:function(t,i){if(t instanceof e.Point)return this.imageToViewportCoordinates(t.x,t.y);if(this.viewer){var n=this.viewer.world.getItemCount();if(n>1)e.console.error("[Viewport.imageToViewportCoordinates] is not accurate with multi-image; use TiledImage.imageToViewportCoordinates instead.");else if(1===n){var r=this.viewer.world.getItemAt(0);return r.imageToViewportCoordinates(t,i,!0)}}var o=this._imageToViewportDelta(t,i);return o.x+=this._contentBoundsNoRotate.x,o.y+=this._contentBoundsNoRotate.y,o},imageToViewportRectangle:function(t,i,n,r){var o=t;if(o instanceof e.Rect||(o=new e.Rect(t,i,n,r)),this.viewer){var s=this.viewer.world.getItemCount();if(s>1)e.console.error("[Viewport.imageToViewportRectangle] is not accurate with multi-image; use TiledImage.imageToViewportRectangle instead.");else if(1===s){var a=this.viewer.world.getItemAt(0);return a.imageToViewportRectangle(t,i,n,r,!0)}}var l=this.imageToViewportCoordinates(o.x,o.y),c=this._imageToViewportDelta(o.width,o.height);return new e.Rect(l.x,l.y,c.x,c.y,o.degrees)},viewportToImageRectangle:function(t,i,n,r){var o=t;if(o instanceof e.Rect||(o=new e.Rect(t,i,n,r)),this.viewer){var s=this.viewer.world.getItemCount();if(s>1)e.console.error("[Viewport.viewportToImageRectangle] is not accurate with multi-image; use TiledImage.viewportToImageRectangle instead.");else if(1===s){var a=this.viewer.world.getItemAt(0);return a.viewportToImageRectangle(t,i,n,r,!0)}}var l=this.viewportToImageCoordinates(o.x,o.y),c=this._viewportToImageDelta(o.width,o.height);return new e.Rect(l.x,l.y,c.x,c.y,o.degrees)},viewerElementToImageCoordinates:function(e){var t=this.pointFromPixel(e,!0);return this.viewportToImageCoordinates(t)},imageToViewerElementCoordinates:function(e){var t=this.imageToViewportCoordinates(e);return this.pixelFromPoint(t,!0)},windowToImageCoordinates:function(t){e.console.assert(this.viewer,"[Viewport.windowToImageCoordinates] the viewport must have a viewer.");var i=t.minus(e.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(i)},imageToWindowCoordinates:function(t){e.console.assert(this.viewer,"[Viewport.imageToWindowCoordinates] the viewport must have a viewer.");var i=this.imageToViewerElementCoordinates(t);return i.plus(e.getElementPosition(this.viewer.element))},viewerElementToViewportCoordinates:function(e){return this.pointFromPixel(e,!0)},viewportToViewerElementCoordinates:function(e){return this.pixelFromPoint(e,!0)},viewerElementToViewportRectangle:function(t){return e.Rect.fromSummits(this.pointFromPixel(t.getTopLeft(),!0),this.pointFromPixel(t.getTopRight(),!0),this.pointFromPixel(t.getBottomLeft(),!0))},viewportToViewerElementRectangle:function(t){return e.Rect.fromSummits(this.pixelFromPoint(t.getTopLeft(),!0),this.pixelFromPoint(t.getTopRight(),!0),this.pixelFromPoint(t.getBottomLeft(),!0))},windowToViewportCoordinates:function(t){e.console.assert(this.viewer,"[Viewport.windowToViewportCoordinates] the viewport must have a viewer.");var i=t.minus(e.getElementPosition(this.viewer.element));return this.viewerElementToViewportCoordinates(i)},viewportToWindowCoordinates:function(t){e.console.assert(this.viewer,"[Viewport.viewportToWindowCoordinates] the viewport must have a viewer.");var i=this.viewportToViewerElementCoordinates(t);return i.plus(e.getElementPosition(this.viewer.element))},viewportToImageZoom:function(t){if(this.viewer){var i=this.viewer.world.getItemCount();if(i>1)e.console.error("[Viewport.viewportToImageZoom] is not accurate with multi-image.");else if(1===i){var n=this.viewer.world.getItemAt(0);return n.viewportToImageZoom(t)}}var r=this._contentSizeNoRotate.x,o=this._containerInnerSize.x,s=this._contentBoundsNoRotate.width,a=o/r*s;return t*a},imageToViewportZoom:function(t){if(this.viewer){var i=this.viewer.world.getItemCount();if(i>1)e.console.error("[Viewport.imageToViewportZoom] is not accurate with multi-image.");else if(1===i){var n=this.viewer.world.getItemAt(0);return n.imageToViewportZoom(t)}}var r=this._contentSizeNoRotate.x,o=this._containerInnerSize.x,s=this._contentBoundsNoRotate.width,a=r/o/s;return t*a},toggleFlip:function(){return this.setFlip(!this.getFlip()),this},getFlip:function(){return this.flipped},setFlip:function(e){return this.flipped===e||(this.flipped=e,this.viewer.navigator&&this.viewer.navigator.setFlip(this.getFlip()),this.viewer.forceRedraw(),this.viewer.raiseEvent("flip",{flipped:e})),this}}}(s),function(e){function t(e,t,n,r,o,s,a,l,c){var u=a.getBoundingBox().getTopLeft(),h=a.getBoundingBox().getBottomRight();e.viewer&&e.viewer.raiseEvent("update-level",{tiledImage:e,havedrawn:t,level:r,opacity:o,visibility:s,drawArea:a,topleft:u,bottomright:h,currenttime:l,best:c}),p(e.coverage,r),p(e.loadingCoverage,r);var d=e._getCornerTiles(r,u,h),f=d.topLeft,v=d.bottomRight,g=e.source.getNumTiles(r),m=e.viewport.pixelFromPoint(e.viewport.getCenter());e.getFlip()&&(v.x+=1,e.wrapHorizontal||(v.x=Math.min(v.x,g.x-1)));for(var y=f.x;y<=v.x;y++)for(var w=f.y;w<=v.y;w++){var x;if(e.getFlip()){var b=(g.x+y%g.x)%g.x;x=y+g.x-b-b-1}else x=y;null!==a.intersection(e.getTileBounds(r,x,w))&&(c=i(e,n,t,x,w,r,o,s,m,g,l,c))}return c}function i(e,t,i,r,o,s,u,p,v,g,m,y){var w=n(r,o,s,e,e.source,e.tilesMatrix,m,g,e._worldWidthCurrent,e._worldHeightCurrent),x=i;e.viewer&&e.viewer.raiseEvent("update-tile",{tiledImage:e,tile:w}),d(e.coverage,s,r,o,!1);var b=w.loaded||w.loading||h(e.loadingCoverage,s,r,o);if(d(e.loadingCoverage,s,r,o,b),!w.exists)return y;if(t&&!x&&(h(e.coverage,s,r,o)?d(e.coverage,s,r,o,!0):x=!0),!x)return y;if(l(w,e.source.tileOverlap,e.viewport,v,p,e),!w.loaded)if(w.context2D)a(e,w);else{var _=e._tileCache.getImageRecord(w.cacheKey);if(_){var T=_.getImage();a(e,w,T)}}if(w.loaded){var S=c(e,w,r,o,s,u,m);S&&(e._needsDraw=!0)}else w.loading?e._tilesLoading++:b||(y=f(y,w));return y}function n(t,i,n,r,o,s,a,l,c,u){var h,d,p,f,v,g,m,y,w;return s[n]||(s[n]={}),s[n][t]||(s[n][t]={}),s[n][t][i]&&!s[n][t][i].flipped===!r.flipped||(h=(l.x+t%l.x)%l.x,d=(l.y+i%l.y)%l.y,p=r.getTileBounds(n,t,i),f=o.getTileBounds(n,h,d,!0),v=o.tileExists(n,h,d),g=o.getTileUrl(n,h,d),r.loadTilesWithAjax?(m=o.getTileAjaxHeaders(n,h,d),e.isPlainObject(r.ajaxHeaders)&&(m=e.extend({},r.ajaxHeaders,m))):m=null,y=o.getContext2D?o.getContext2D(n,h,d):void 0,w=new e.Tile(n,t,i,p,v,g,y,r.loadTilesWithAjax,m,f),r.getFlip()?0===h&&(w.isRightMost=!0):h===l.x-1&&(w.isRightMost=!0),d===l.y-1&&(w.isBottomMost=!0),w.flipped=r.flipped,s[n][t][i]=w),w=s[n][t][i],w.lastTouchTime=a,w}function r(e,t,i){t.loading=!0,e._imageLoader.addJob({src:t.url,loadWithAjax:t.loadWithAjax,ajaxHeaders:t.ajaxHeaders,crossOriginPolicy:e.crossOriginPolicy,ajaxWithCredentials:e.ajaxWithCredentials,callback:function(n,r,s){o(e,t,i,n,r,s)},abort:function(){t.loading=!1}})}function o(t,i,n,r,o,s){if(!r)return e.console.log("Tile %s failed to load: %s - error: %s",i,i.url,o),t.viewer.raiseEvent("tile-load-failed",{tile:i,tiledImage:t,time:n,message:o,tileRequest:s}),i.loading=!1,void(i.exists=!1);if(ne.visibility||t.visibility===e.visibility&&t.squaredDistance1&&c>t.smoothTileEdgesMinZoom&&!t.iOSDevice&&t.getRotation(!0)%360===0&&e.supportsCanvas&&(n=!0,r=s.getScaleForEdgeSmoothing(),o=s.getTranslationForEdgeSmoothing(r,t._drawer.getCanvasSize(!1),t._drawer.getCanvasSize(!0))),n&&(r||(a=t.viewport.viewportToViewerElementRectangle(t.getClippedBounds(!0)).getIntegerBoundingBox(),t._drawer.viewer.viewport.getFlip()&&(0===t.viewport.degrees&&t.getRotation(!0)%360===0||(a.x=t._drawer.viewer.container.clientWidth-(a.x+a.width))),a=a.times(e.pixelDensityRatio)),t._drawer._clear(!0,a)),r||(0!==t.viewport.degrees&&t._drawer._offsetForRotation({degrees:t.viewport.degrees,useSketch:n}),t.getRotation(!0)%360!==0&&t._drawer._offsetForRotation({degrees:t.getRotation(!0),point:t.viewport.pixelFromPointNoRotate(t._getRotationPoint(!0),!0),useSketch:n}),0===t.viewport.degrees&&t.getRotation(!0)%360===0&&t._drawer.viewer.viewport.getFlip()&&t._drawer._flip());var u=!1;if(t._clip){t._drawer.saveContext(n);var h=t.imageToViewportRectangle(t._clip,!0);h=h.rotate(-t.getRotation(!0),t._getRotationPoint(!0));var d=t._drawer.viewportToDrawerRectangle(h);r&&(d=d.times(r)),o&&(d=d.translate(o)),t._drawer.setClip(d,n),u=!0}if(t._croppingPolygons){t._drawer.saveContext(n);try{var p=t._croppingPolygons.map((function(e){return e.map((function(e){var i=t.imageToViewportCoordinates(e.x,e.y,!0).rotate(-t.getRotation(!0),t._getRotationPoint(!0)),n=t._drawer.viewportCoordToDrawerCoord(i);return r&&(n=n.times(r)),n}))}));t._drawer.clipWithPolygons(p,n)}catch(y){e.console.error(y)}u=!0}if(t.placeholderFillStyle&&!1===t._hasOpaqueTile){var f=t._drawer.viewportToDrawerRectangle(t.getBounds(!0));r&&(f=f.times(r)),o&&(f=f.translate(o));var v=null;v="function"===typeof t.placeholderFillStyle?t.placeholderFillStyle(t,t._drawer.context):t.placeholderFillStyle,t._drawer.drawRectangle(f,v,n)}for(var m=i.length-1;m>=0;m--)s=i[m],t._drawer.drawTile(s,t._drawingHandler,n,r,o),s.beingDrawn=!0,t.viewer&&t.viewer.raiseEvent("tile-drawn",{tiledImage:t,tile:s});u&&t._drawer.restoreContext(n),r||(t.getRotation(!0)%360!==0&&t._drawer._restoreRotationChanges(n),0!==t.viewport.degrees&&t._drawer._restoreRotationChanges(n)),n&&(r&&(0!==t.viewport.degrees&&t._drawer._offsetForRotation({degrees:t.viewport.degrees,useSketch:!1}),t.getRotation(!0)%360!==0&&t._drawer._offsetForRotation({degrees:t.getRotation(!0),point:t.viewport.pixelFromPointNoRotate(t._getRotationPoint(!0),!0),useSketch:!1})),t._drawer.blendSketch({opacity:t.opacity,scale:r,translate:o,compositeOperation:t.compositeOperation,bounds:a}),r&&(t.getRotation(!0)%360!==0&&t._drawer._restoreRotationChanges(!1),0!==t.viewport.degrees&&t._drawer._restoreRotationChanges(!1))),r||0===t.viewport.degrees&&t.getRotation(!0)%360===0&&t._drawer.viewer.viewport.getFlip()&&t._drawer._flip(),g(t,i)}}function g(t,i){if(t.debugMode)for(var n=i.length-1;n>=0;n--){var r=i[n];try{t._drawer.drawDebugInfo(r,i.length,n,t)}catch(o){e.console.error(o)}}}e.TiledImage=function(t){var i=this;e.console.assert(t.tileCache,"[TiledImage] options.tileCache is required"),e.console.assert(t.drawer,"[TiledImage] options.drawer is required"),e.console.assert(t.viewer,"[TiledImage] options.viewer is required"),e.console.assert(t.imageLoader,"[TiledImage] options.imageLoader is required"),e.console.assert(t.source,"[TiledImage] options.source is required"),e.console.assert(!t.clip||t.clip instanceof e.Rect,"[TiledImage] options.clip must be an OpenSeadragon.Rect if present"),e.EventSource.call(this),this._tileCache=t.tileCache,delete t.tileCache,this._drawer=t.drawer,delete t.drawer,this._imageLoader=t.imageLoader,delete t.imageLoader,t.clip instanceof e.Rect&&(this._clip=t.clip.clone()),delete t.clip;var n=t.x||0;delete t.x;var r=t.y||0;delete t.y,this.normHeight=t.source.dimensions.y/t.source.dimensions.x,this.contentAspectX=t.source.dimensions.x/t.source.dimensions.y;var o=1;t.width?(o=t.width,delete t.width,t.height&&(e.console.error("specifying both width and height to a tiledImage is not supported"),delete t.height)):t.height&&(o=t.height/this.normHeight,delete t.height);var a=t.fitBounds;delete t.fitBounds;var l=t.fitBoundsPlacement||s.Placement.CENTER;delete t.fitBoundsPlacement;var c=t.degrees||0;delete t.degrees,e.extend(!0,this,{viewer:null,tilesMatrix:{},coverage:{},loadingCoverage:{},lastDrawn:[],lastResetTime:0,_midDraw:!1,_needsDraw:!0,_hasOpaqueTile:!1,_tilesLoading:0,springStiffness:e.DEFAULT_SETTINGS.springStiffness,animationTime:e.DEFAULT_SETTINGS.animationTime,minZoomImageRatio:e.DEFAULT_SETTINGS.minZoomImageRatio,wrapHorizontal:e.DEFAULT_SETTINGS.wrapHorizontal,wrapVertical:e.DEFAULT_SETTINGS.wrapVertical,immediateRender:e.DEFAULT_SETTINGS.immediateRender,blendTime:e.DEFAULT_SETTINGS.blendTime,alwaysBlend:e.DEFAULT_SETTINGS.alwaysBlend,minPixelRatio:e.DEFAULT_SETTINGS.minPixelRatio,smoothTileEdgesMinZoom:e.DEFAULT_SETTINGS.smoothTileEdgesMinZoom,iOSDevice:e.DEFAULT_SETTINGS.iOSDevice,debugMode:e.DEFAULT_SETTINGS.debugMode,crossOriginPolicy:e.DEFAULT_SETTINGS.crossOriginPolicy,ajaxWithCredentials:e.DEFAULT_SETTINGS.ajaxWithCredentials,placeholderFillStyle:e.DEFAULT_SETTINGS.placeholderFillStyle,opacity:e.DEFAULT_SETTINGS.opacity,preload:e.DEFAULT_SETTINGS.preload,compositeOperation:e.DEFAULT_SETTINGS.compositeOperation},t),this._preload=this.preload,delete this.preload,this._fullyLoaded=!1,this._xSpring=new e.Spring({initial:n,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._ySpring=new e.Spring({initial:r,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._scaleSpring=new e.Spring({initial:o,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._degreesSpring=new e.Spring({initial:c,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._updateForScale(),a&&this.fitBounds(a,l,!0),this._drawingHandler=function(t){i.viewer.raiseEvent("tile-drawing",e.extend({tiledImage:i},t))}},e.extend(e.TiledImage.prototype,e.EventSource.prototype,{needsDraw:function(){return this._needsDraw},getFullyLoaded:function(){return this._fullyLoaded},_setFullyLoaded:function(e){e!==this._fullyLoaded&&(this._fullyLoaded=e,this.raiseEvent("fully-loaded-change",{fullyLoaded:this._fullyLoaded}))},reset:function(){this._tileCache.clearTilesFor(this),this.lastResetTime=e.now(),this._needsDraw=!0},update:function(){var e=this._xSpring.update(),t=this._ySpring.update(),i=this._scaleSpring.update(),n=this._degreesSpring.update();return!!(e||t||i||n)&&(this._updateForScale(),this._needsDraw=!0,!0)},draw:function(){0!==this.opacity||this._preload?(this._midDraw=!0,this._updateViewport(),this._midDraw=!1):this._needsDraw=!1},destroy:function(){this.reset(),this.source.destroy&&this.source.destroy()},getBounds:function(e){return this.getBoundsNoRotate(e).rotate(this.getRotation(e),this._getRotationPoint(e))},getBoundsNoRotate:function(t){return t?new e.Rect(this._xSpring.current.value,this._ySpring.current.value,this._worldWidthCurrent,this._worldHeightCurrent):new e.Rect(this._xSpring.target.value,this._ySpring.target.value,this._worldWidthTarget,this._worldHeightTarget)},getWorldBounds:function(){return e.console.error("[TiledImage.getWorldBounds] is deprecated; use TiledImage.getBounds instead"),this.getBounds()},getClippedBounds:function(t){var i=this.getBoundsNoRotate(t);if(this._clip){var n=t?this._worldWidthCurrent:this._worldWidthTarget,r=n/this.source.dimensions.x,o=this._clip.times(r);i=new e.Rect(i.x+o.x,i.y+o.y,o.width,o.height)}return i.rotate(this.getRotation(t),this._getRotationPoint(t))},getTileBounds:function(e,t,i){var n=this.source.getNumTiles(e),r=(n.x+t%n.x)%n.x,o=(n.y+i%n.y)%n.y,s=this.source.getTileBounds(e,r,o);return this.getFlip()&&(s.x=1-s.x-s.width),s.x+=(t-r)/n.x,s.y+=this._worldHeightCurrent/this._worldWidthCurrent*((i-o)/n.y),s},getContentSize:function(){return new e.Point(this.source.dimensions.x,this.source.dimensions.y)},getSizeInWindowCoordinates:function(){var t=this.imageToWindowCoordinates(new e.Point(0,0)),i=this.imageToWindowCoordinates(this.getContentSize());return new e.Point(i.x-t.x,i.y-t.y)},_viewportToImageDelta:function(t,i,n){var r=n?this._scaleSpring.current.value:this._scaleSpring.target.value;return new e.Point(t*(this.source.dimensions.x/r),i*(this.source.dimensions.y*this.contentAspectX/r))},viewportToImageCoordinates:function(t,i,n){var r;return t instanceof e.Point?(n=i,r=t):r=new e.Point(t,i),r=r.rotate(-this.getRotation(n),this._getRotationPoint(n)),n?this._viewportToImageDelta(r.x-this._xSpring.current.value,r.y-this._ySpring.current.value):this._viewportToImageDelta(r.x-this._xSpring.target.value,r.y-this._ySpring.target.value)},_imageToViewportDelta:function(t,i,n){var r=n?this._scaleSpring.current.value:this._scaleSpring.target.value;return new e.Point(t/this.source.dimensions.x*r,i/this.source.dimensions.y/this.contentAspectX*r)},imageToViewportCoordinates:function(t,i,n){t instanceof e.Point&&(n=i,i=t.y,t=t.x);var r=this._imageToViewportDelta(t,i);return n?(r.x+=this._xSpring.current.value,r.y+=this._ySpring.current.value):(r.x+=this._xSpring.target.value,r.y+=this._ySpring.target.value),r.rotate(this.getRotation(n),this._getRotationPoint(n))},imageToViewportRectangle:function(t,i,n,r,o){var s=t;s instanceof e.Rect?o=i:s=new e.Rect(t,i,n,r);var a=this.imageToViewportCoordinates(s.getTopLeft(),o),l=this._imageToViewportDelta(s.width,s.height,o);return new e.Rect(a.x,a.y,l.x,l.y,s.degrees+this.getRotation(o))},viewportToImageRectangle:function(t,i,n,r,o){var s=t;t instanceof e.Rect?o=i:s=new e.Rect(t,i,n,r);var a=this.viewportToImageCoordinates(s.getTopLeft(),o),l=this._viewportToImageDelta(s.width,s.height,o);return new e.Rect(a.x,a.y,l.x,l.y,s.degrees-this.getRotation(o))},viewerElementToImageCoordinates:function(e){var t=this.viewport.pointFromPixel(e,!0);return this.viewportToImageCoordinates(t)},imageToViewerElementCoordinates:function(e){var t=this.imageToViewportCoordinates(e);return this.viewport.pixelFromPoint(t,!0)},windowToImageCoordinates:function(e){var t=e.minus(s.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(t)},imageToWindowCoordinates:function(e){var t=this.imageToViewerElementCoordinates(e);return t.plus(s.getElementPosition(this.viewer.element))},_viewportToTiledImageRectangle:function(t){var i=this._scaleSpring.current.value;return t=t.rotate(-this.getRotation(!0),this._getRotationPoint(!0)),new e.Rect((t.x-this._xSpring.current.value)/i,(t.y-this._ySpring.current.value)/i,t.width/i,t.height/i,t.degrees)},viewportToImageZoom:function(e){var t=this._scaleSpring.current.value*this.viewport._containerInnerSize.x/this.source.dimensions.x;return t*e},imageToViewportZoom:function(e){var t=this._scaleSpring.current.value*this.viewport._containerInnerSize.x/this.source.dimensions.x;return e/t},setPosition:function(e,t){var i=this._xSpring.target.value===e.x&&this._ySpring.target.value===e.y;if(t){if(i&&this._xSpring.current.value===e.x&&this._ySpring.current.value===e.y)return;this._xSpring.resetTo(e.x),this._ySpring.resetTo(e.y),this._needsDraw=!0}else{if(i)return;this._xSpring.springTo(e.x),this._ySpring.springTo(e.y),this._needsDraw=!0}i||this._raiseBoundsChange()},setWidth:function(e,t){this._setScale(e,t)},setHeight:function(e,t){this._setScale(e/this.normHeight,t)},setCroppingPolygons:function(t){var i=function(t){return t instanceof e.Point||"number"===typeof t.x&&"number"===typeof t.y},n=function(e){return e.map((function(e){try{if(i(e))return{x:e.x,y:e.y};throw new Error}catch(t){throw new Error("A Provided cropping polygon point is not supported")}}))};try{if(!e.isArray(t))throw new Error("Provided cropping polygon is not an array");this._croppingPolygons=t.map((function(e){return n(e)}))}catch(r){e.console.error("[TiledImage.setCroppingPolygons] Cropping polygon format not supported"),e.console.error(r),this._croppingPolygons=null}},resetCroppingPolygons:function(){this._croppingPolygons=null},fitBounds:function(t,i,n){i=i||e.Placement.CENTER;var r=e.Placement.properties[i],o=this.contentAspectX,s=0,a=0,l=1,c=1;if(this._clip&&(o=this._clip.getAspectRatio(),l=this._clip.width/this.source.dimensions.x,c=this._clip.height/this.source.dimensions.y,t.getAspectRatio()>o?(s=this._clip.x/this._clip.height*t.height,a=this._clip.y/this._clip.height*t.height):(s=this._clip.x/this._clip.width*t.width,a=this._clip.y/this._clip.width*t.width)),t.getAspectRatio()>o){var u=t.height/c,h=0;r.isHorizontallyCentered?h=(t.width-t.height*o)/2:r.isRight&&(h=t.width-t.height*o),this.setPosition(new e.Point(t.x-s+h,t.y-a),n),this.setHeight(u,n)}else{var d=t.width/l,p=0;r.isVerticallyCentered?p=(t.height-t.width/o)/2:r.isBottom&&(p=t.height-t.width/o),this.setPosition(new e.Point(t.x-s,t.y-a+p),n),this.setWidth(d,n)}},getClip:function(){return this._clip?this._clip.clone():null},setClip:function(t){e.console.assert(!t||t instanceof e.Rect,"[TiledImage.setClip] newClip must be an OpenSeadragon.Rect or null"),t instanceof e.Rect?this._clip=t.clone():this._clip=null,this._needsDraw=!0,this.raiseEvent("clip-change")},getFlip:function(){return!!this.flipped},setFlip:function(e){this.flipped=!!e,this._needsDraw=!0,this._raiseBoundsChange()},getOpacity:function(){return this.opacity},setOpacity:function(e){e!==this.opacity&&(this.opacity=e,this._needsDraw=!0,this.raiseEvent("opacity-change",{opacity:this.opacity}))},getPreload:function(){return this._preload},setPreload:function(e){this._preload=!!e,this._needsDraw=!0},getRotation:function(e){return e?this._degreesSpring.current.value:this._degreesSpring.target.value},setRotation:function(e,t){this._degreesSpring.target.value===e&&this._degreesSpring.isAtTargetValue()||(t?this._degreesSpring.resetTo(e):this._degreesSpring.springTo(e),this._needsDraw=!0,this._raiseBoundsChange())},_getRotationPoint:function(e){return this.getBoundsNoRotate(e).getCenter()},getCompositeOperation:function(){return this.compositeOperation},setCompositeOperation:function(e){e!==this.compositeOperation&&(this.compositeOperation=e,this._needsDraw=!0,this.raiseEvent("composite-operation-change",{compositeOperation:this.compositeOperation}))},_setScale:function(e,t){var i=this._scaleSpring.target.value===e;if(t){if(i&&this._scaleSpring.current.value===e)return;this._scaleSpring.resetTo(e),this._updateForScale(),this._needsDraw=!0}else{if(i)return;this._scaleSpring.springTo(e),this._updateForScale(),this._needsDraw=!0}i||this._raiseBoundsChange()},_updateForScale:function(){this._worldWidthTarget=this._scaleSpring.target.value,this._worldHeightTarget=this.normHeight*this._scaleSpring.target.value,this._worldWidthCurrent=this._scaleSpring.current.value,this._worldHeightCurrent=this.normHeight*this._scaleSpring.current.value},_raiseBoundsChange:function(){this.raiseEvent("bounds-change")},_isBottomItem:function(){return this.viewer.world.getItemAt(0)===this},_getLevelsInterval:function(){var e=Math.max(this.source.minLevel,Math.floor(Math.log(this.minZoomImageRatio)/Math.log(2))),t=this.viewport.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(0),!0).x*this._scaleSpring.current.value,i=Math.min(Math.abs(this.source.maxLevel),Math.abs(Math.floor(Math.log(t/this.minPixelRatio)/Math.log(2))));return i=Math.max(i,this.source.minLevel||0),e=Math.min(e,i),{lowestLevel:e,highestLevel:i}},_updateViewport:function(){this._needsDraw=!1,this._tilesLoading=0,this.loadingCoverage={};while(this.lastDrawn.length>0){var i=this.lastDrawn.pop();i.beingDrawn=!1}var n=this.viewport,o=this._viewportToTiledImageRectangle(n.getBoundsWithMargins(!0));if(!this.wrapHorizontal&&!this.wrapVertical){var s=this._viewportToTiledImageRectangle(this.getClippedBounds(!0));if(o=o.intersection(s),null===o)return}for(var a=this._getLevelsInterval(),l=a.lowestLevel,c=a.highestLevel,h=null,d=!1,p=e.now(),f=c;f>=l;f--){var g=!1,m=n.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(f),!0).x*this._scaleSpring.current.value;if(f===l||!d&&m>=this.minPixelRatio)g=!0,d=!0;else if(!d)continue;var y=n.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(f),!1).x*this._scaleSpring.current.value,w=n.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(Math.max(this.source.getClosestLevel(),0)),!1).x*this._scaleSpring.current.value,x=this.immediateRender?1:w,b=Math.min(1,(m-.5)/.5),_=x/Math.abs(x-y);if(h=t(this,d,g,f,b,_,o,p,h),u(this.coverage,f))break}v(this,this.lastDrawn),h&&!h.context2D?(r(this,h,p),this._needsDraw=!0,this._setFullyLoaded(!1)):this._setFullyLoaded(0===this._tilesLoading)},_getCornerTiles:function(t,i,n){var r,o,s,a;this.wrapHorizontal?(r=e.positiveModulo(i.x,1),o=e.positiveModulo(n.x,1)):(r=Math.max(0,i.x),o=Math.min(1,n.x));var l=1/this.source.aspectRatio;this.wrapVertical?(s=e.positiveModulo(i.y,l),a=e.positiveModulo(n.y,l)):(s=Math.max(0,i.y),a=Math.min(l,n.y));var c=this.source.getTileAtPoint(t,new e.Point(r,s)),u=this.source.getTileAtPoint(t,new e.Point(o,a)),h=this.source.getNumTiles(t);return this.wrapHorizontal&&(c.x+=h.x*Math.floor(i.x),u.x+=h.x*Math.floor(n.x)),this.wrapVertical&&(c.y+=h.y*Math.floor(i.y/l),u.y+=h.y*Math.floor(n.y/l)),{topLeft:c,bottomRight:u}}})}(s),function(e){var t=function(t){e.console.assert(t,"[TileCache.cacheTile] options is required"),e.console.assert(t.tile,"[TileCache.cacheTile] options.tile is required"),e.console.assert(t.tiledImage,"[TileCache.cacheTile] options.tiledImage is required"),this.tile=t.tile,this.tiledImage=t.tiledImage},i=function(t){e.console.assert(t,"[ImageRecord] options is required"),e.console.assert(t.image,"[ImageRecord] options.image is required"),this._image=t.image,this._tiles=[]};i.prototype={destroy:function(){this._image=null,this._renderedContext=null,this._tiles=null},getImage:function(){return this._image},getRenderedContext:function(){if(!this._renderedContext){var e=document.createElement("canvas");e.width=this._image.width,e.height=this._image.height,this._renderedContext=e.getContext("2d"),this._renderedContext.drawImage(this._image,0,0),this._image=null}return this._renderedContext},setRenderedContext:function(t){e.console.error("ImageRecord.setRenderedContext is deprecated. The rendered context should be created by the ImageRecord itself when calling ImageRecord.getRenderedContext."),this._renderedContext=t},addTile:function(t){e.console.assert(t,"[ImageRecord.addTile] tile is required"),this._tiles.push(t)},removeTile:function(t){for(var i=0;ithis._maxImageCacheCount){for(var a,l,c,u,h,d,p=null,f=-1,v=null,g=this._tilesLoaded.length-1;g>=0;g--)d=this._tilesLoaded[g],a=d.tile,a.level<=r||a.beingDrawn||(p?(u=a.lastTouchTime,l=p.lastTouchTime,h=a.level,c=p.level,(uc)&&(p=a,f=g,v=d)):(p=a,f=g,v=d));p&&f>=0&&(this._unloadTile(v),o=f)}this._tilesLoaded[o]=new t({tile:n.tile,tiledImage:n.tiledImage})},clearTilesFor:function(t){var i;e.console.assert(t,"[TileCache.clearTilesFor] tiledImage is required");for(var n=0;n=this._items.length)throw new Error("Index bigger than number of layers.");i!==n&&-1!==n&&(this._items.splice(n,1),this._items.splice(i,0,t),this._needsDraw=!0,this.raiseEvent("item-index-change",{item:t,previousIndex:n,newIndex:i}))},removeItem:function(t){e.console.assert(t,"[World.removeItem] item is required");var i=e.indexOf(this._items,t);-1!==i&&(t.removeHandler("bounds-change",this._delegatedFigureSizes),t.removeHandler("clip-change",this._delegatedFigureSizes),t.destroy(),this._items.splice(i,1),this._figureSizes(),this._needsDraw=!0,this._raiseRemoveItem(t))},removeAll:function(){var e,t;for(this.viewer._cancelPendingImages(),t=0;th.height?a:a*(h.width/h.height),p=d*(h.height/h.width),f=new e.Point(v+(a-d)/2,g+(a-p)/2),u.setPosition(f,n),u.setWidth(d,n),"horizontal"===r?v+=c:g+=c;this.setAutoRefigureSizes(!0)},_figureSizes:function(){var t=this._homeBounds?this._homeBounds.clone():null,i=this._contentSize?this._contentSize.clone():null,n=this._contentFactor||0;if(this._items.length){var r=this._items[0],o=r.getBounds();this._contentFactor=r.getContentSize().x/o.width;for(var s=r.getClippedBounds().getBoundingBox(),a=s.x,l=s.y,c=s.x+s.width,u=s.y+s.height,h=1;h0?n:i)(t)}},b50d:function(e,t,i){"use strict";var n=i("c532"),r=i("467f"),o=i("7aac"),s=i("30b5"),a=i("83b9"),l=i("c345"),c=i("3934"),u=i("cafa"),h=i("7917"),d=i("fb60"),p=i("b68a");e.exports=function(e){return new Promise((function(t,i){var f,v=e.data,g=e.headers,m=e.responseType;function y(){e.cancelToken&&e.cancelToken.unsubscribe(f),e.signal&&e.signal.removeEventListener("abort",f)}n.isFormData(v)&&n.isStandardBrowserEnv()&&delete g["Content-Type"];var w=new XMLHttpRequest;if(e.auth){var x=e.auth.username||"",b=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";g.Authorization="Basic "+btoa(x+":"+b)}var _=a(e.baseURL,e.url);function T(){if(w){var n="getAllResponseHeaders"in w?l(w.getAllResponseHeaders()):null,o=m&&"text"!==m&&"json"!==m?w.response:w.responseText,s={data:o,status:w.status,statusText:w.statusText,headers:n,config:e,request:w};r((function(e){t(e),y()}),(function(e){i(e),y()}),s),w=null}}if(w.open(e.method.toUpperCase(),s(_,e.params,e.paramsSerializer),!0),w.timeout=e.timeout,"onloadend"in w?w.onloadend=T:w.onreadystatechange=function(){w&&4===w.readyState&&(0!==w.status||w.responseURL&&0===w.responseURL.indexOf("file:"))&&setTimeout(T)},w.onabort=function(){w&&(i(new h("Request aborted",h.ECONNABORTED,e,w)),w=null)},w.onerror=function(){i(new h("Network Error",h.ERR_NETWORK,e,w,w)),w=null},w.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||u;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),i(new h(t,n.clarifyTimeoutError?h.ETIMEDOUT:h.ECONNABORTED,e,w)),w=null},n.isStandardBrowserEnv()){var S=(e.withCredentials||c(_))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;S&&(g[e.xsrfHeaderName]=S)}"setRequestHeader"in w&&n.forEach(g,(function(e,t){"undefined"===typeof v&&"content-type"===t.toLowerCase()?delete g[t]:w.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(w.withCredentials=!!e.withCredentials),m&&"json"!==m&&(w.responseType=e.responseType),"function"===typeof e.onDownloadProgress&&w.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&w.upload&&w.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(f=function(e){w&&(i(!e||e&&e.type?new d:e),w.abort(),w=null)},e.cancelToken&&e.cancelToken.subscribe(f),e.signal&&(e.signal.aborted?f():e.signal.addEventListener("abort",f))),v||(v=null);var E=p(_);E&&-1===["http","https","file"].indexOf(E)?i(new h("Unsupported protocol "+E+":",h.ERR_BAD_REQUEST,e)):w.send(v)}))}},b622:function(e,t,i){var n=i("da84"),r=i("5692"),o=i("1a2d"),s=i("90e3"),a=i("4930"),l=i("fdbf"),c=r("wks"),u=n.Symbol,h=u&&u["for"],d=l?u:u&&u.withoutSetter||s;e.exports=function(e){if(!o(c,e)||!a&&"string"!=typeof c[e]){var t="Symbol."+e;a&&o(u,e)?c[e]=u[e]:c[e]=l&&h?h(t):d(t)}return c[e]}},b639:function(e,t,i){"use strict";(function(e){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ -var n=i("1fb5"),r=i("9152"),o=i("e3db");function s(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"===typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(t){return!1}}function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function l(e,t){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function w(e){return+e!=e&&(e=0),c.alloc(+e)}function x(e,t){if(c.isBuffer(e))return e.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!==typeof e&&(e=""+e);var i=e.length;if(0===i)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return Y(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return J(e).length;default:if(n)return Y(e).length;t=(""+t).toLowerCase(),n=!0}}function b(e,t,i){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if(i>>>=0,t>>>=0,i<=t)return"";e||(e="utf8");while(1)switch(e){case"hex":return B(this,t,i);case"utf8":case"utf-8":return D(this,t,i);case"ascii":return H(this,t,i);case"latin1":case"binary":return M(this,t,i);case"base64":return I(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,t,i);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function _(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function T(e,t,i,n,r){if(0===e.length)return-1;if("string"===typeof i?(n=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,isNaN(i)&&(i=r?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(r)return-1;i=e.length-1}else if(i<0){if(!r)return-1;i=0}if("string"===typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:S(e,t,i,n,r);if("number"===typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,i):Uint8Array.prototype.lastIndexOf.call(e,t,i):S(e,[t],i,n,r);throw new TypeError("val must be string, number or Buffer")}function S(e,t,i,n,r){var o,s=1,a=e.length,l=t.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,l/=2,i/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(r){var u=-1;for(o=i;oa&&(i=a-l),o=i;o>=0;o--){for(var h=!0,d=0;dr&&(n=r)):n=r;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s239?4:c>223?3:c>191?2:1;if(r+h<=i)switch(h){case 1:c<128&&(u=c);break;case 2:o=e[r+1],128===(192&o)&&(l=(31&c)<<6|63&o,l>127&&(u=l));break;case 3:o=e[r+1],s=e[r+2],128===(192&o)&&128===(192&s)&&(l=(15&c)<<12|(63&o)<<6|63&s,l>2047&&(l<55296||l>57343)&&(u=l));break;case 4:o=e[r+1],s=e[r+2],a=e[r+3],128===(192&o)&&128===(192&s)&&128===(192&a)&&(l=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a,l>65535&&l<1114112&&(u=l))}null===u?(u=65533,h=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),r+=h}return L(n)}t.Buffer=c,t.SlowBuffer=w,t.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:s(),t.kMaxLength=a(),c.poolSize=8192,c._augment=function(e){return e.__proto__=c.prototype,e},c.from=function(e,t,i){return u(null,e,t,i)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(e,t,i){return d(null,e,t,i)},c.allocUnsafe=function(e){return p(null,e)},c.allocUnsafeSlow=function(e){return p(null,e)},c.isBuffer=function(e){return!(null==e||!e._isBuffer)},c.compare=function(e,t){if(!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var i=e.length,n=t.length,r=0,o=Math.min(i,n);r0&&(e=this.toString("hex",0,i).match(/.{2}/g).join(" "),this.length>i&&(e+=" ... ")),""},c.prototype.compare=function(e,t,i,n,r){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===i&&(i=e?e.length:0),void 0===n&&(n=0),void 0===r&&(r=this.length),t<0||i>e.length||n<0||r>this.length)throw new RangeError("out of range index");if(n>=r&&t>=i)return 0;if(n>=r)return-1;if(t>=i)return 1;if(t>>>=0,i>>>=0,n>>>=0,r>>>=0,this===e)return 0;for(var o=r-n,s=i-t,a=Math.min(o,s),l=this.slice(n,r),u=e.slice(t,i),h=0;hr)&&(i=r),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return E(this,e,t,i);case"utf8":case"utf-8":return P(this,e,t,i);case"ascii":return C(this,e,t,i);case"latin1":case"binary":return R(this,e,t,i);case"base64":return k(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,t,i);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function L(e){var t=e.length;if(t<=A)return String.fromCharCode.apply(String,e);var i="",n=0;while(nn)&&(i=n);for(var r="",o=t;oi)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,i,n,r,o){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||te.length)throw new RangeError("Index out of range")}function z(e,t,i,n){t<0&&(t=65535+t+1);for(var r=0,o=Math.min(e.length-i,2);r>>8*(n?r:1-r)}function V(e,t,i,n){t<0&&(t=4294967295+t+1);for(var r=0,o=Math.min(e.length-i,4);r>>8*(n?r:3-r)&255}function U(e,t,i,n,r,o){if(i+n>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function j(e,t,i,n,o){return o||U(e,t,i,4,34028234663852886e22,-34028234663852886e22),r.write(e,t,i,n,23,4),i+4}function W(e,t,i,n,o){return o||U(e,t,i,8,17976931348623157e292,-17976931348623157e292),r.write(e,t,i,n,52,8),i+8}c.prototype.slice=function(e,t){var i,n=this.length;if(e=~~e,t=void 0===t?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t0&&(r*=256))n+=this[e+--t]*r;return n},c.prototype.readUInt8=function(e,t){return t||$(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||$(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||$(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||$(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||$(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,i){e|=0,t|=0,i||$(e,t,this.length);var n=this[e],r=1,o=0;while(++o=r&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,i){e|=0,t|=0,i||$(e,t,this.length);var n=t,r=1,o=this[e+--n];while(n>0&&(r*=256))o+=this[e+--n]*r;return r*=128,o>=r&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return t||$(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||$(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},c.prototype.readInt16BE=function(e,t){t||$(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},c.prototype.readInt32LE=function(e,t){return t||$(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||$(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||$(e,4,this.length),r.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||$(e,4,this.length),r.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||$(e,8,this.length),r.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||$(e,8,this.length),r.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,i,n){if(e=+e,t|=0,i|=0,!n){var r=Math.pow(2,8*i)-1;N(this,e,t,i,r,0)}var o=1,s=0;this[t]=255&e;while(++s=0&&(s*=256))this[t+o]=e/s&255;return t+i},c.prototype.writeUInt8=function(e,t,i){return e=+e,t|=0,i||N(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,i){return e=+e,t|=0,i||N(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):z(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,i){return e=+e,t|=0,i||N(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):z(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,i){return e=+e,t|=0,i||N(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):V(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,i){return e=+e,t|=0,i||N(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):V(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,i,n){if(e=+e,t|=0,!n){var r=Math.pow(2,8*i-1);N(this,e,t,i,r-1,-r)}var o=0,s=1,a=0;this[t]=255&e;while(++o>0)-a&255;return t+i},c.prototype.writeIntBE=function(e,t,i,n){if(e=+e,t|=0,!n){var r=Math.pow(2,8*i-1);N(this,e,t,i,r-1,-r)}var o=i-1,s=1,a=0;this[t+o]=255&e;while(--o>=0&&(s*=256))e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+i},c.prototype.writeInt8=function(e,t,i){return e=+e,t|=0,i||N(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,i){return e=+e,t|=0,i||N(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):z(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,i){return e=+e,t|=0,i||N(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):z(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,i){return e=+e,t|=0,i||N(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):V(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,i){return e=+e,t|=0,i||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):V(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,i){return j(this,e,t,!0,i)},c.prototype.writeFloatBE=function(e,t,i){return j(this,e,t,!1,i)},c.prototype.writeDoubleLE=function(e,t,i){return W(this,e,t,!0,i)},c.prototype.writeDoubleBE=function(e,t,i){return W(this,e,t,!1,i)},c.prototype.copy=function(e,t,i,n){if(i||(i=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--r)e[r+t]=this[r+i];else if(o<1e3||!c.TYPED_ARRAY_SUPPORT)for(r=0;r>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"===typeof e)for(o=t;o55295&&i<57344){if(!r){if(i>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}r=i;continue}if(i<56320){(t-=3)>-1&&o.push(239,191,189),r=i;continue}i=65536+(r-55296<<10|i-56320)}else r&&(t-=3)>-1&&o.push(239,191,189);if(r=null,i<128){if((t-=1)<0)break;o.push(i)}else if(i<2048){if((t-=2)<0)break;o.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;o.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return o}function K(e){for(var t=[],i=0;i>8,r=i%256,o.push(r),o.push(n)}return o}function J(e){return n.toByteArray(q(e))}function ee(e,t,i,n){for(var r=0;r=t.length||r>=e.length)break;t[r+i]=e[r]}return r}function te(e){return e!==e}}).call(this,i("c8ba"))},b68a:function(e,t,i){"use strict";e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},b980:function(e,t,i){var n=i("d039"),r=i("5c6c");e.exports=!n((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",r(1,7)),7!==e.stack)}))},bc3a:function(e,t,i){e.exports=i("cee4")},c04e:function(e,t,i){var n=i("c65b"),r=i("861d"),o=i("d9b5"),s=i("dc4a"),a=i("485a"),l=i("b622"),c=TypeError,u=l("toPrimitive");e.exports=function(e,t){if(!r(e)||o(e))return e;var i,l=s(e,u);if(l){if(void 0===t&&(t="default"),i=n(l,e,t),!r(i)||o(i))return i;throw c("Can't convert object to primitive value")}return void 0===t&&(t="number"),a(e,t)}},c345:function(e,t,i){"use strict";var n=i("c532"),r=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,i,o,s={};return e?(n.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=n.trim(e.substr(0,o)).toLowerCase(),i=n.trim(e.substr(o+1)),t){if(s[t]&&r.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([i]):s[t]?s[t]+", "+i:i}})),s):s}},c401:function(e,t,i){"use strict";var n=i("c532"),r=i("4c3d");e.exports=function(e,t,i){var o=this||r;return n.forEach(i,(function(i){e=i.call(o,e,t)})),e}},c430:function(e,t){e.exports=!1},c532:function(e,t,i){"use strict";var n=i("1d2b"),r=Object.prototype.toString,o=function(e){return function(t){var i=r.call(t);return e[i]||(e[i]=i.slice(8,-1).toLowerCase())}}(Object.create(null));function s(e){return e=e.toLowerCase(),function(t){return o(t)===e}}function a(e){return Array.isArray(e)}function l(e){return"undefined"===typeof e}function c(e){return null!==e&&!l(e)&&null!==e.constructor&&!l(e.constructor)&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var u=s("ArrayBuffer");function h(e){var t;return t="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&u(e.buffer),t}function d(e){return"string"===typeof e}function p(e){return"number"===typeof e}function f(e){return null!==e&&"object"===typeof e}function v(e){if("object"!==o(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var g=s("Date"),m=s("File"),y=s("Blob"),w=s("FileList");function x(e){return"[object Function]"===r.call(e)}function b(e){return f(e)&&x(e.pipe)}function _(e){var t="[object FormData]";return e&&("function"===typeof FormData&&e instanceof FormData||r.call(e)===t||x(e.toString)&&e.toString()===t)}var T=s("URLSearchParams");function S(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function E(){return("undefined"===typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!==typeof window&&"undefined"!==typeof document)}function P(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),a(e))for(var i=0,n=e.length;i0)o=n[r],s[o]||(t[o]=e[o],s[o]=!0);e=Object.getPrototypeOf(e)}while(e&&(!i||i(e,t))&&e!==Object.prototype);return t}function D(e,t,i){e=String(e),(void 0===i||i>e.length)&&(i=e.length),i-=t.length;var n=e.indexOf(t,i);return-1!==n&&n===i}function A(e){if(!e)return null;var t=e.length;if(l(t))return null;var i=new Array(t);while(t-- >0)i[t]=e[t];return i}var L=function(e){return function(t){return e&&t instanceof e}}("undefined"!==typeof Uint8Array&&Object.getPrototypeOf(Uint8Array));e.exports={isArray:a,isArrayBuffer:u,isBuffer:c,isFormData:_,isArrayBufferView:h,isString:d,isNumber:p,isObject:f,isPlainObject:v,isUndefined:l,isDate:g,isFile:m,isBlob:y,isFunction:x,isStream:b,isURLSearchParams:T,isStandardBrowserEnv:E,forEach:P,merge:C,extend:R,trim:S,stripBOM:k,inherits:O,toFlatObject:I,kindOf:o,kindOfTest:s,endsWith:D,toArray:A,isTypedArray:L,isFileList:w}},c65b:function(e,t,i){var n=i("40d5"),r=Function.prototype.call;e.exports=n?r.bind(r):function(){return r.apply(r,arguments)}},c6b6:function(e,t,i){var n=i("e330"),r=n({}.toString),o=n("".slice);e.exports=function(e){return o(r(e),8,-1)}},c6cd:function(e,t,i){var n=i("da84"),r=i("6374"),o="__core-js_shared__",s=n[o]||r(o,{});e.exports=s},c770:function(e,t,i){var n=i("e330"),r=Error,o=n("".replace),s=function(e){return String(r(e).stack)}("zxcasd"),a=/\n\s*at [^:]*:[^\n]*/,l=a.test(s);e.exports=function(e,t){if(l&&"string"==typeof e&&!r.prepareStackTrace)while(t--)e=o(e,a,"");return e}},c8af:function(e,t,i){"use strict";var n=i("c532");e.exports=function(e,t){n.forEach(e,(function(i,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=i,delete e[n])}))}},c8ba:function(e,t){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(n){"object"===typeof window&&(i=window)}e.exports=i},ca84:function(e,t,i){var n=i("e330"),r=i("1a2d"),o=i("fc6a"),s=i("4d64").indexOf,a=i("d012"),l=n([].push);e.exports=function(e,t){var i,n=o(e),c=0,u=[];for(i in n)!r(a,i)&&r(n,i)&&l(u,i);while(t.length>c)r(n,i=t[c++])&&(~s(u,i)||l(u,i));return u}},cafa:function(e,t,i){"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},cb2d:function(e,t,i){var n=i("1626"),r=i("9bf2"),o=i("13d2"),s=i("6374");e.exports=function(e,t,i,a){a||(a={});var l=a.enumerable,c=void 0!==a.name?a.name:t;if(n(i)&&o(i,c,a),a.global)l?e[t]=i:s(t,i);else{try{a.unsafe?e[t]&&(l=!0):delete e[t]}catch(u){}l?e[t]=i:r.f(e,t,{value:i,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return e}},cc12:function(e,t,i){var n=i("da84"),r=i("861d"),o=n.document,s=r(o)&&r(o.createElement);e.exports=function(e){return s?o.createElement(e):{}}},cee4:function(e,t,i){"use strict";var n=i("c532"),r=i("1d2b"),o=i("0a06"),s=i("4a7b"),a=i("4c3d");function l(e){var t=new o(e),i=r(o.prototype.request,t);return n.extend(i,o.prototype,t),n.extend(i,t),i.create=function(t){return l(s(e,t))},i}var c=l(a);c.Axios=o,c.CanceledError=i("fb60"),c.CancelToken=i("8df4"),c.isCancel=i("2e67"),c.VERSION=i("5cce").version,c.toFormData=i("e467"),c.AxiosError=i("7917"),c.Cancel=c.CanceledError,c.all=function(e){return Promise.all(e)},c.spread=i("0df6"),c.isAxiosError=i("5f02"),e.exports=c,e.exports.default=c},d012:function(e,t){e.exports={}},d039:function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},d066:function(e,t,i){var n=i("da84"),r=i("1626"),o=function(e){return r(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?o(n[e]):n[e]&&n[e][t]}},d1e7:function(e,t,i){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);t.f=o?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},d2bb:function(e,t,i){var n=i("e330"),r=i("825a"),o=i("3bbe");e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,i={};try{e=n(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),e(i,[]),t=i instanceof Array}catch(s){}return function(i,n){return r(i),o(n),t?e(i,n):i.__proto__=n,i}}():void 0)},d925:function(e,t,i){"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},d9b5:function(e,t,i){var n=i("d066"),r=i("1626"),o=i("3a9b"),s=i("fdbf"),a=Object;e.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return r(t)&&o(t.prototype,a(e))}},d9e2:function(e,t,i){var n=i("23e7"),r=i("da84"),o=i("2ba4"),s=i("e5cb"),a="WebAssembly",l=r[a],c=7!==Error("e",{cause:7}).cause,u=function(e,t){var i={};i[e]=s(e,t,c),n({global:!0,constructor:!0,arity:1,forced:c},i)},h=function(e,t){if(l&&l[e]){var i={};i[e]=s(a+"."+e,t,c),n({target:a,stat:!0,constructor:!0,arity:1,forced:c},i)}};u("Error",(function(e){return function(t){return o(e,this,arguments)}})),u("EvalError",(function(e){return function(t){return o(e,this,arguments)}})),u("RangeError",(function(e){return function(t){return o(e,this,arguments)}})),u("ReferenceError",(function(e){return function(t){return o(e,this,arguments)}})),u("SyntaxError",(function(e){return function(t){return o(e,this,arguments)}})),u("TypeError",(function(e){return function(t){return o(e,this,arguments)}})),u("URIError",(function(e){return function(t){return o(e,this,arguments)}})),h("CompileError",(function(e){return function(t){return o(e,this,arguments)}})),h("LinkError",(function(e){return function(t){return o(e,this,arguments)}})),h("RuntimeError",(function(e){return function(t){return o(e,this,arguments)}}))},da84:function(e,t,i){(function(t){var i=function(e){return e&&e.Math==Math&&e};e.exports=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof t&&t)||function(){return this}()||Function("return this")()}).call(this,i("c8ba"))},dc4a:function(e,t,i){var n=i("59ed");e.exports=function(e,t){var i=e[t];return null==i?void 0:n(i)}},df7c:function(e,t,i){(function(e){function i(e,t){for(var i=0,n=e.length-1;n>=0;n--){var r=e[n];"."===r?e.splice(n,1):".."===r?(e.splice(n,1),i++):i&&(e.splice(n,1),i--)}if(t)for(;i--;i)e.unshift("..");return e}function n(e){"string"!==typeof e&&(e+="");var t,i=0,n=-1,r=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!r){i=t+1;break}}else-1===n&&(r=!1,n=t+1);return-1===n?"":e.slice(i,n)}function r(e,t){if(e.filter)return e.filter(t);for(var i=[],n=0;n=-1&&!n;o--){var s=o>=0?arguments[o]:e.cwd();if("string"!==typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(t=s+"/"+t,n="/"===s.charAt(0))}return t=i(r(t.split("/"),(function(e){return!!e})),!n).join("/"),(n?"/":"")+t||"."},t.normalize=function(e){var n=t.isAbsolute(e),s="/"===o(e,-1);return e=i(r(e.split("/"),(function(e){return!!e})),!n).join("/"),e||n||(e="."),e&&s&&(e+="/"),(n?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(r(e,(function(e,t){if("string"!==typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,i){function n(e){for(var t=0;t=0;i--)if(""!==e[i])break;return t>i?[]:e.slice(t,i-t+1)}e=t.resolve(e).substr(1),i=t.resolve(i).substr(1);for(var r=n(e.split("/")),o=n(i.split("/")),s=Math.min(r.length,o.length),a=s,l=0;l=1;--o)if(t=e.charCodeAt(o),47===t){if(!r){n=o;break}}else r=!1;return-1===n?i?"/":".":i&&1===n?"/":e.slice(0,n)},t.basename=function(e,t){var i=n(e);return t&&i.substr(-1*t.length)===t&&(i=i.substr(0,i.length-t.length)),i},t.extname=function(e){"string"!==typeof e&&(e+="");for(var t=-1,i=0,n=-1,r=!0,o=0,s=e.length-1;s>=0;--s){var a=e.charCodeAt(s);if(47!==a)-1===n&&(r=!1,n=s+1),46===a?-1===t?t=s:1!==o&&(o=1):-1!==t&&(o=-1);else if(!r){i=s+1;break}}return-1===t||-1===n||0===o||1===o&&t===n-1&&t===i+1?"":e.slice(t,n)};var o="b"==="ab".substr(-1)?function(e,t,i){return e.substr(t,i)}:function(e,t,i){return t<0&&(t=e.length+t),e.substr(t,i)}}).call(this,i("4362"))},e330:function(e,t,i){var n=i("40d5"),r=Function.prototype,o=r.bind,s=r.call,a=n&&o.bind(s,s);e.exports=n?function(e){return e&&a(e)}:function(e){return e&&function(){return s.apply(e,arguments)}}},e391:function(e,t,i){var n=i("577e");e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:n(e)}},e3db:function(e,t){var i={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==i.call(e)}},e467:function(e,t,i){"use strict";(function(t){var n=i("c532");function r(e,i){i=i||new FormData;var r=[];function o(e){return null===e?"":n.isDate(e)?e.toISOString():n.isArrayBuffer(e)||n.isTypedArray(e)?"function"===typeof Blob?new Blob([e]):t.from(e):e}function s(e,t){if(n.isPlainObject(e)||n.isArray(e)){if(-1!==r.indexOf(e))throw Error("Circular reference detected in "+t);r.push(e),n.forEach(e,(function(e,r){if(!n.isUndefined(e)){var a,l=t?t+"."+r:r;if(e&&!t&&"object"===typeof e)if(n.endsWith(r,"{}"))e=JSON.stringify(e);else if(n.endsWith(r,"[]")&&(a=n.toArray(e)))return void a.forEach((function(e){!n.isUndefined(e)&&i.append(l,o(e))}));s(e,l)}})),r.pop()}else i.append(t,o(e))}return s(e),i}e.exports=r}).call(this,i("b639").Buffer)},e5cb:function(e,t,i){"use strict";var n=i("d066"),r=i("1a2d"),o=i("9112"),s=i("3a9b"),a=i("d2bb"),l=i("e893"),c=i("aeb0"),u=i("7156"),h=i("e391"),d=i("ab36"),p=i("c770"),f=i("b980"),v=i("83ab"),g=i("c430");e.exports=function(e,t,i,m){var y="stackTraceLimit",w=m?2:1,x=e.split("."),b=x[x.length-1],_=n.apply(null,x);if(_){var T=_.prototype;if(!g&&r(T,"cause")&&delete T.cause,!i)return _;var S=n("Error"),E=t((function(e,t){var i=h(m?t:e,void 0),n=m?new _(e):new _;return void 0!==i&&o(n,"message",i),f&&o(n,"stack",p(n.stack,2)),this&&s(T,this)&&u(n,this,E),arguments.length>w&&d(n,arguments[w]),n}));if(E.prototype=T,"Error"!==b?a?a(E,S):l(E,S,{name:!0}):v&&y in _&&(c(E,_,y),c(E,_,"prepareStackTrace")),l(E,_),!g)try{T.name!==b&&o(T,"name",b),T.constructor=E}catch(P){}return E}}},e683:function(e,t,i){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},e893:function(e,t,i){var n=i("1a2d"),r=i("56ef"),o=i("06cf"),s=i("9bf2");e.exports=function(e,t,i){for(var a=r(t),l=s.f,c=o.f,u=0;u=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function w(e){return+e!=e&&(e=0),c.alloc(+e)}function x(e,t){if(c.isBuffer(e))return e.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!==typeof e&&(e=""+e);var i=e.length;if(0===i)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return Y(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return J(e).length;default:if(n)return Y(e).length;t=(""+t).toLowerCase(),n=!0}}function b(e,t,i){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if(i>>>=0,t>>>=0,i<=t)return"";e||(e="utf8");while(1)switch(e){case"hex":return B(this,t,i);case"utf8":case"utf-8":return D(this,t,i);case"ascii":return H(this,t,i);case"latin1":case"binary":return M(this,t,i);case"base64":return I(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,t,i);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function _(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function T(e,t,i,n,r){if(0===e.length)return-1;if("string"===typeof i?(n=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,isNaN(i)&&(i=r?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(r)return-1;i=e.length-1}else if(i<0){if(!r)return-1;i=0}if("string"===typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:S(e,t,i,n,r);if("number"===typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,i):Uint8Array.prototype.lastIndexOf.call(e,t,i):S(e,[t],i,n,r);throw new TypeError("val must be string, number or Buffer")}function S(e,t,i,n,r){var o,s=1,a=e.length,l=t.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,l/=2,i/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(r){var u=-1;for(o=i;oa&&(i=a-l),o=i;o>=0;o--){for(var h=!0,d=0;dr&&(n=r)):n=r;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s239?4:c>223?3:c>191?2:1;if(r+h<=i)switch(h){case 1:c<128&&(u=c);break;case 2:o=e[r+1],128===(192&o)&&(l=(31&c)<<6|63&o,l>127&&(u=l));break;case 3:o=e[r+1],s=e[r+2],128===(192&o)&&128===(192&s)&&(l=(15&c)<<12|(63&o)<<6|63&s,l>2047&&(l<55296||l>57343)&&(u=l));break;case 4:o=e[r+1],s=e[r+2],a=e[r+3],128===(192&o)&&128===(192&s)&&128===(192&a)&&(l=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a,l>65535&&l<1114112&&(u=l))}null===u?(u=65533,h=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),r+=h}return L(n)}t.Buffer=c,t.SlowBuffer=w,t.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:s(),t.kMaxLength=a(),c.poolSize=8192,c._augment=function(e){return e.__proto__=c.prototype,e},c.from=function(e,t,i){return u(null,e,t,i)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(e,t,i){return d(null,e,t,i)},c.allocUnsafe=function(e){return p(null,e)},c.allocUnsafeSlow=function(e){return p(null,e)},c.isBuffer=function(e){return!(null==e||!e._isBuffer)},c.compare=function(e,t){if(!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var i=e.length,n=t.length,r=0,o=Math.min(i,n);r0&&(e=this.toString("hex",0,i).match(/.{2}/g).join(" "),this.length>i&&(e+=" ... ")),""},c.prototype.compare=function(e,t,i,n,r){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===i&&(i=e?e.length:0),void 0===n&&(n=0),void 0===r&&(r=this.length),t<0||i>e.length||n<0||r>this.length)throw new RangeError("out of range index");if(n>=r&&t>=i)return 0;if(n>=r)return-1;if(t>=i)return 1;if(t>>>=0,i>>>=0,n>>>=0,r>>>=0,this===e)return 0;for(var o=r-n,s=i-t,a=Math.min(o,s),l=this.slice(n,r),u=e.slice(t,i),h=0;hr)&&(i=r),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return E(this,e,t,i);case"utf8":case"utf-8":return P(this,e,t,i);case"ascii":return C(this,e,t,i);case"latin1":case"binary":return R(this,e,t,i);case"base64":return k(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,t,i);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function L(e){var t=e.length;if(t<=A)return String.fromCharCode.apply(String,e);var i="",n=0;while(nn)&&(i=n);for(var r="",o=t;oi)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,i,n,r,o){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||te.length)throw new RangeError("Index out of range")}function z(e,t,i,n){t<0&&(t=65535+t+1);for(var r=0,o=Math.min(e.length-i,2);r>>8*(n?r:1-r)}function V(e,t,i,n){t<0&&(t=4294967295+t+1);for(var r=0,o=Math.min(e.length-i,4);r>>8*(n?r:3-r)&255}function j(e,t,i,n,r,o){if(i+n>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function U(e,t,i,n,o){return o||j(e,t,i,4,34028234663852886e22,-34028234663852886e22),r.write(e,t,i,n,23,4),i+4}function W(e,t,i,n,o){return o||j(e,t,i,8,17976931348623157e292,-17976931348623157e292),r.write(e,t,i,n,52,8),i+8}c.prototype.slice=function(e,t){var i,n=this.length;if(e=~~e,t=void 0===t?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t0&&(r*=256))n+=this[e+--t]*r;return n},c.prototype.readUInt8=function(e,t){return t||$(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||$(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||$(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||$(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||$(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,i){e|=0,t|=0,i||$(e,t,this.length);var n=this[e],r=1,o=0;while(++o=r&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,i){e|=0,t|=0,i||$(e,t,this.length);var n=t,r=1,o=this[e+--n];while(n>0&&(r*=256))o+=this[e+--n]*r;return r*=128,o>=r&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return t||$(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||$(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},c.prototype.readInt16BE=function(e,t){t||$(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},c.prototype.readInt32LE=function(e,t){return t||$(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||$(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||$(e,4,this.length),r.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||$(e,4,this.length),r.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||$(e,8,this.length),r.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||$(e,8,this.length),r.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,i,n){if(e=+e,t|=0,i|=0,!n){var r=Math.pow(2,8*i)-1;N(this,e,t,i,r,0)}var o=1,s=0;this[t]=255&e;while(++s=0&&(s*=256))this[t+o]=e/s&255;return t+i},c.prototype.writeUInt8=function(e,t,i){return e=+e,t|=0,i||N(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,i){return e=+e,t|=0,i||N(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):z(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,i){return e=+e,t|=0,i||N(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):z(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,i){return e=+e,t|=0,i||N(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):V(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,i){return e=+e,t|=0,i||N(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):V(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,i,n){if(e=+e,t|=0,!n){var r=Math.pow(2,8*i-1);N(this,e,t,i,r-1,-r)}var o=0,s=1,a=0;this[t]=255&e;while(++o>0)-a&255;return t+i},c.prototype.writeIntBE=function(e,t,i,n){if(e=+e,t|=0,!n){var r=Math.pow(2,8*i-1);N(this,e,t,i,r-1,-r)}var o=i-1,s=1,a=0;this[t+o]=255&e;while(--o>=0&&(s*=256))e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+i},c.prototype.writeInt8=function(e,t,i){return e=+e,t|=0,i||N(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,i){return e=+e,t|=0,i||N(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):z(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,i){return e=+e,t|=0,i||N(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):z(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,i){return e=+e,t|=0,i||N(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):V(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,i){return e=+e,t|=0,i||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):V(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,i){return U(this,e,t,!0,i)},c.prototype.writeFloatBE=function(e,t,i){return U(this,e,t,!1,i)},c.prototype.writeDoubleLE=function(e,t,i){return W(this,e,t,!0,i)},c.prototype.writeDoubleBE=function(e,t,i){return W(this,e,t,!1,i)},c.prototype.copy=function(e,t,i,n){if(i||(i=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--r)e[r+t]=this[r+i];else if(o<1e3||!c.TYPED_ARRAY_SUPPORT)for(r=0;r>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"===typeof e)for(o=t;o55295&&i<57344){if(!r){if(i>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}r=i;continue}if(i<56320){(t-=3)>-1&&o.push(239,191,189),r=i;continue}i=65536+(r-55296<<10|i-56320)}else r&&(t-=3)>-1&&o.push(239,191,189);if(r=null,i<128){if((t-=1)<0)break;o.push(i)}else if(i<2048){if((t-=2)<0)break;o.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;o.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return o}function K(e){for(var t=[],i=0;i>8,r=i%256,o.push(r),o.push(n)}return o}function J(e){return n.toByteArray(q(e))}function ee(e,t,i,n){for(var r=0;r=t.length||r>=e.length)break;t[r+i]=e[r]}return r}function te(e){return e!==e}}).call(this,i("c8ba"))},b68a:function(e,t,i){"use strict";e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},b980:function(e,t,i){var n=i("d039"),r=i("5c6c");e.exports=!n((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",r(1,7)),7!==e.stack)}))},bc3a:function(e,t,i){e.exports=i("cee4")},c04e:function(e,t,i){var n=i("c65b"),r=i("861d"),o=i("d9b5"),s=i("dc4a"),a=i("485a"),l=i("b622"),c=TypeError,u=l("toPrimitive");e.exports=function(e,t){if(!r(e)||o(e))return e;var i,l=s(e,u);if(l){if(void 0===t&&(t="default"),i=n(l,e,t),!r(i)||o(i))return i;throw c("Can't convert object to primitive value")}return void 0===t&&(t="number"),a(e,t)}},c345:function(e,t,i){"use strict";var n=i("c532"),r=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,i,o,s={};return e?(n.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=n.trim(e.substr(0,o)).toLowerCase(),i=n.trim(e.substr(o+1)),t){if(s[t]&&r.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([i]):s[t]?s[t]+", "+i:i}})),s):s}},c401:function(e,t,i){"use strict";var n=i("c532"),r=i("4c3d");e.exports=function(e,t,i){var o=this||r;return n.forEach(i,(function(i){e=i.call(o,e,t)})),e}},c430:function(e,t){e.exports=!1},c532:function(e,t,i){"use strict";var n=i("1d2b"),r=Object.prototype.toString,o=function(e){return function(t){var i=r.call(t);return e[i]||(e[i]=i.slice(8,-1).toLowerCase())}}(Object.create(null));function s(e){return e=e.toLowerCase(),function(t){return o(t)===e}}function a(e){return Array.isArray(e)}function l(e){return"undefined"===typeof e}function c(e){return null!==e&&!l(e)&&null!==e.constructor&&!l(e.constructor)&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var u=s("ArrayBuffer");function h(e){var t;return t="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&u(e.buffer),t}function d(e){return"string"===typeof e}function p(e){return"number"===typeof e}function f(e){return null!==e&&"object"===typeof e}function v(e){if("object"!==o(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var g=s("Date"),m=s("File"),y=s("Blob"),w=s("FileList");function x(e){return"[object Function]"===r.call(e)}function b(e){return f(e)&&x(e.pipe)}function _(e){var t="[object FormData]";return e&&("function"===typeof FormData&&e instanceof FormData||r.call(e)===t||x(e.toString)&&e.toString()===t)}var T=s("URLSearchParams");function S(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function E(){return("undefined"===typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!==typeof window&&"undefined"!==typeof document)}function P(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),a(e))for(var i=0,n=e.length;i0)o=n[r],s[o]||(t[o]=e[o],s[o]=!0);e=Object.getPrototypeOf(e)}while(e&&(!i||i(e,t))&&e!==Object.prototype);return t}function D(e,t,i){e=String(e),(void 0===i||i>e.length)&&(i=e.length),i-=t.length;var n=e.indexOf(t,i);return-1!==n&&n===i}function A(e){if(!e)return null;var t=e.length;if(l(t))return null;var i=new Array(t);while(t-- >0)i[t]=e[t];return i}var L=function(e){return function(t){return e&&t instanceof e}}("undefined"!==typeof Uint8Array&&Object.getPrototypeOf(Uint8Array));e.exports={isArray:a,isArrayBuffer:u,isBuffer:c,isFormData:_,isArrayBufferView:h,isString:d,isNumber:p,isObject:f,isPlainObject:v,isUndefined:l,isDate:g,isFile:m,isBlob:y,isFunction:x,isStream:b,isURLSearchParams:T,isStandardBrowserEnv:E,forEach:P,merge:C,extend:R,trim:S,stripBOM:k,inherits:O,toFlatObject:I,kindOf:o,kindOfTest:s,endsWith:D,toArray:A,isTypedArray:L,isFileList:w}},c65b:function(e,t,i){var n=i("40d5"),r=Function.prototype.call;e.exports=n?r.bind(r):function(){return r.apply(r,arguments)}},c6b6:function(e,t,i){var n=i("e330"),r=n({}.toString),o=n("".slice);e.exports=function(e){return o(r(e),8,-1)}},c6cd:function(e,t,i){var n=i("da84"),r=i("6374"),o="__core-js_shared__",s=n[o]||r(o,{});e.exports=s},c770:function(e,t,i){var n=i("e330"),r=Error,o=n("".replace),s=function(e){return String(r(e).stack)}("zxcasd"),a=/\n\s*at [^:]*:[^\n]*/,l=a.test(s);e.exports=function(e,t){if(l&&"string"==typeof e&&!r.prepareStackTrace)while(t--)e=o(e,a,"");return e}},c8af:function(e,t,i){"use strict";var n=i("c532");e.exports=function(e,t){n.forEach(e,(function(i,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=i,delete e[n])}))}},c8ba:function(e,t){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(n){"object"===typeof window&&(i=window)}e.exports=i},ca84:function(e,t,i){var n=i("e330"),r=i("1a2d"),o=i("fc6a"),s=i("4d64").indexOf,a=i("d012"),l=n([].push);e.exports=function(e,t){var i,n=o(e),c=0,u=[];for(i in n)!r(a,i)&&r(n,i)&&l(u,i);while(t.length>c)r(n,i=t[c++])&&(~s(u,i)||l(u,i));return u}},cafa:function(e,t,i){"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},cb2d:function(e,t,i){var n=i("1626"),r=i("9bf2"),o=i("13d2"),s=i("6374");e.exports=function(e,t,i,a){a||(a={});var l=a.enumerable,c=void 0!==a.name?a.name:t;if(n(i)&&o(i,c,a),a.global)l?e[t]=i:s(t,i);else{try{a.unsafe?e[t]&&(l=!0):delete e[t]}catch(u){}l?e[t]=i:r.f(e,t,{value:i,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return e}},cc12:function(e,t,i){var n=i("da84"),r=i("861d"),o=n.document,s=r(o)&&r(o.createElement);e.exports=function(e){return s?o.createElement(e):{}}},cee4:function(e,t,i){"use strict";var n=i("c532"),r=i("1d2b"),o=i("0a06"),s=i("4a7b"),a=i("4c3d");function l(e){var t=new o(e),i=r(o.prototype.request,t);return n.extend(i,o.prototype,t),n.extend(i,t),i.create=function(t){return l(s(e,t))},i}var c=l(a);c.Axios=o,c.CanceledError=i("fb60"),c.CancelToken=i("8df4"),c.isCancel=i("2e67"),c.VERSION=i("5cce").version,c.toFormData=i("e467"),c.AxiosError=i("7917"),c.Cancel=c.CanceledError,c.all=function(e){return Promise.all(e)},c.spread=i("0df6"),c.isAxiosError=i("5f02"),e.exports=c,e.exports.default=c},d012:function(e,t){e.exports={}},d039:function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},d066:function(e,t,i){var n=i("da84"),r=i("1626"),o=function(e){return r(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?o(n[e]):n[e]&&n[e][t]}},d1e7:function(e,t,i){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);t.f=o?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},d2bb:function(e,t,i){var n=i("e330"),r=i("825a"),o=i("3bbe");e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,i={};try{e=n(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),e(i,[]),t=i instanceof Array}catch(s){}return function(i,n){return r(i),o(n),t?e(i,n):i.__proto__=n,i}}():void 0)},d925:function(e,t,i){"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},d9b5:function(e,t,i){var n=i("d066"),r=i("1626"),o=i("3a9b"),s=i("fdbf"),a=Object;e.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return r(t)&&o(t.prototype,a(e))}},d9e2:function(e,t,i){var n=i("23e7"),r=i("da84"),o=i("2ba4"),s=i("e5cb"),a="WebAssembly",l=r[a],c=7!==Error("e",{cause:7}).cause,u=function(e,t){var i={};i[e]=s(e,t,c),n({global:!0,constructor:!0,arity:1,forced:c},i)},h=function(e,t){if(l&&l[e]){var i={};i[e]=s(a+"."+e,t,c),n({target:a,stat:!0,constructor:!0,arity:1,forced:c},i)}};u("Error",(function(e){return function(t){return o(e,this,arguments)}})),u("EvalError",(function(e){return function(t){return o(e,this,arguments)}})),u("RangeError",(function(e){return function(t){return o(e,this,arguments)}})),u("ReferenceError",(function(e){return function(t){return o(e,this,arguments)}})),u("SyntaxError",(function(e){return function(t){return o(e,this,arguments)}})),u("TypeError",(function(e){return function(t){return o(e,this,arguments)}})),u("URIError",(function(e){return function(t){return o(e,this,arguments)}})),h("CompileError",(function(e){return function(t){return o(e,this,arguments)}})),h("LinkError",(function(e){return function(t){return o(e,this,arguments)}})),h("RuntimeError",(function(e){return function(t){return o(e,this,arguments)}}))},da84:function(e,t,i){(function(t){var i=function(e){return e&&e.Math==Math&&e};e.exports=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof t&&t)||function(){return this}()||Function("return this")()}).call(this,i("c8ba"))},dc4a:function(e,t,i){var n=i("59ed");e.exports=function(e,t){var i=e[t];return null==i?void 0:n(i)}},df7c:function(e,t,i){(function(e){function i(e,t){for(var i=0,n=e.length-1;n>=0;n--){var r=e[n];"."===r?e.splice(n,1):".."===r?(e.splice(n,1),i++):i&&(e.splice(n,1),i--)}if(t)for(;i--;i)e.unshift("..");return e}function n(e){"string"!==typeof e&&(e+="");var t,i=0,n=-1,r=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!r){i=t+1;break}}else-1===n&&(r=!1,n=t+1);return-1===n?"":e.slice(i,n)}function r(e,t){if(e.filter)return e.filter(t);for(var i=[],n=0;n=-1&&!n;o--){var s=o>=0?arguments[o]:e.cwd();if("string"!==typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(t=s+"/"+t,n="/"===s.charAt(0))}return t=i(r(t.split("/"),(function(e){return!!e})),!n).join("/"),(n?"/":"")+t||"."},t.normalize=function(e){var n=t.isAbsolute(e),s="/"===o(e,-1);return e=i(r(e.split("/"),(function(e){return!!e})),!n).join("/"),e||n||(e="."),e&&s&&(e+="/"),(n?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(r(e,(function(e,t){if("string"!==typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,i){function n(e){for(var t=0;t=0;i--)if(""!==e[i])break;return t>i?[]:e.slice(t,i-t+1)}e=t.resolve(e).substr(1),i=t.resolve(i).substr(1);for(var r=n(e.split("/")),o=n(i.split("/")),s=Math.min(r.length,o.length),a=s,l=0;l=1;--o)if(t=e.charCodeAt(o),47===t){if(!r){n=o;break}}else r=!1;return-1===n?i?"/":".":i&&1===n?"/":e.slice(0,n)},t.basename=function(e,t){var i=n(e);return t&&i.substr(-1*t.length)===t&&(i=i.substr(0,i.length-t.length)),i},t.extname=function(e){"string"!==typeof e&&(e+="");for(var t=-1,i=0,n=-1,r=!0,o=0,s=e.length-1;s>=0;--s){var a=e.charCodeAt(s);if(47!==a)-1===n&&(r=!1,n=s+1),46===a?-1===t?t=s:1!==o&&(o=1):-1!==t&&(o=-1);else if(!r){i=s+1;break}}return-1===t||-1===n||0===o||1===o&&t===n-1&&t===i+1?"":e.slice(t,n)};var o="b"==="ab".substr(-1)?function(e,t,i){return e.substr(t,i)}:function(e,t,i){return t<0&&(t=e.length+t),e.substr(t,i)}}).call(this,i("4362"))},e330:function(e,t,i){var n=i("40d5"),r=Function.prototype,o=r.bind,s=r.call,a=n&&o.bind(s,s);e.exports=n?function(e){return e&&a(e)}:function(e){return e&&function(){return s.apply(e,arguments)}}},e391:function(e,t,i){var n=i("577e");e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:n(e)}},e3db:function(e,t){var i={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==i.call(e)}},e467:function(e,t,i){"use strict";(function(t){var n=i("c532");function r(e,i){i=i||new FormData;var r=[];function o(e){return null===e?"":n.isDate(e)?e.toISOString():n.isArrayBuffer(e)||n.isTypedArray(e)?"function"===typeof Blob?new Blob([e]):t.from(e):e}function s(e,t){if(n.isPlainObject(e)||n.isArray(e)){if(-1!==r.indexOf(e))throw Error("Circular reference detected in "+t);r.push(e),n.forEach(e,(function(e,r){if(!n.isUndefined(e)){var a,l=t?t+"."+r:r;if(e&&!t&&"object"===typeof e)if(n.endsWith(r,"{}"))e=JSON.stringify(e);else if(n.endsWith(r,"[]")&&(a=n.toArray(e)))return void a.forEach((function(e){!n.isUndefined(e)&&i.append(l,o(e))}));s(e,l)}})),r.pop()}else i.append(t,o(e))}return s(e),i}e.exports=r}).call(this,i("b639").Buffer)},e5cb:function(e,t,i){"use strict";var n=i("d066"),r=i("1a2d"),o=i("9112"),s=i("3a9b"),a=i("d2bb"),l=i("e893"),c=i("aeb0"),u=i("7156"),h=i("e391"),d=i("ab36"),p=i("c770"),f=i("b980"),v=i("83ab"),g=i("c430");e.exports=function(e,t,i,m){var y="stackTraceLimit",w=m?2:1,x=e.split("."),b=x[x.length-1],_=n.apply(null,x);if(_){var T=_.prototype;if(!g&&r(T,"cause")&&delete T.cause,!i)return _;var S=n("Error"),E=t((function(e,t){var i=h(m?t:e,void 0),n=m?new _(e):new _;return void 0!==i&&o(n,"message",i),f&&o(n,"stack",p(n.stack,2)),this&&s(T,this)&&u(n,this,E),arguments.length>w&&d(n,arguments[w]),n}));if(E.prototype=T,"Error"!==b?a?a(E,S):l(E,S,{name:!0}):v&&y in _&&(c(E,_,y),c(E,_,"prepareStackTrace")),l(E,_),!g)try{T.name!==b&&o(T,"name",b),T.constructor=E}catch(P){}return E}}},e683:function(e,t,i){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},e893:function(e,t,i){var n=i("1a2d"),r=i("56ef"),o=i("06cf"),s=i("9bf2");e.exports=function(e,t,i){for(var a=r(t),l=s.f,c=o.f,u=0;u