diff --git a/js/files_pdfviewer-workersrc.js b/js/files_pdfviewer-workersrc.js index 74402cb4..c97aac1b 100644 --- a/js/files_pdfviewer-workersrc.js +++ b/js/files_pdfviewer-workersrc.js @@ -1,2 +1,2 @@ -(()=>{var e={9097:(e,t,r)=>{"use strict";t.c0=function(e){return new i.default(e)};var i=s(r(9457)),n=s(r(432));function s(e){return e&&e.__esModule?e:{default:e}}function o(e,t){Object.keys(e).filter((e=>!t||t(e))).map(e.removeItem.bind(e))}},432:(e,t)=>{"use strict";function r(e,t,r){var i;return(t="symbol"==typeof(i=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?i:i+"")in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;class i{constructor(e,t,n){r(this,"scope",void 0),r(this,"wrapped",void 0),this.scope="".concat(n?i.GLOBAL_SCOPE_PERSISTENT:i.GLOBAL_SCOPE_VOLATILE,"_").concat(btoa(e),"_"),this.wrapped=t}scopeKey(e){return"".concat(this.scope).concat(e)}setItem(e,t){this.wrapped.setItem(this.scopeKey(e),t)}getItem(e){return this.wrapped.getItem(this.scopeKey(e))}removeItem(e){this.wrapped.removeItem(this.scopeKey(e))}clear(){Object.keys(this.wrapped).filter((e=>e.startsWith(this.scope))).map(this.wrapped.removeItem.bind(this.wrapped))}}t.default=i,r(i,"GLOBAL_SCOPE_VOLATILE","nextcloud_vol"),r(i,"GLOBAL_SCOPE_PERSISTENT","nextcloud_per")},9457:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,n=(i=r(432))&&i.__esModule?i:{default:i};function s(e,t,r){var i;return(t="symbol"==typeof(i=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?i:i+"")in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}t.default=class{constructor(e){s(this,"appId",void 0),s(this,"persisted",!1),s(this,"clearedOnLogout",!1),this.appId=e}persist(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.persisted=e,this}clearOnLogout(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.clearedOnLogout=e,this}build(){return new n.default(this.appId,this.persisted?window.localStorage:window.sessionStorage,!this.clearedOnLogout)}}},5950:(e,t,r)=>{const i=r(2322),{MAX_LENGTH:n,MAX_SAFE_INTEGER:s}=r(6692),{safeRe:o,t:a}=r(5208),c=r(9901),{compareIdentifiers:l}=r(3229);class E{constructor(e,t){if(t=c(t),e instanceof E){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>n)throw new TypeError(`version is longer than ${n} characters`);i("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?o[a.LOOSE]:o[a.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>s||this.major<0)throw new TypeError("Invalid major version");if(this.minor>s||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>s||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[i]&&(this.prerelease[i]++,i=-2);if(-1===i){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let i=[t,e];!1===r&&(i=[t]),0===l(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=E},8064:(e,t,r)=>{const i=r(5950);e.exports=(e,t)=>new i(e,t).major},8690:(e,t,r)=>{const i=r(5950);e.exports=(e,t,r=!1)=>{if(e instanceof i)return e;try{return new i(e,t)}catch(e){if(!r)return null;throw e}}},8711:(e,t,r)=>{const i=r(8690);e.exports=(e,t)=>{const r=i(e,t);return r?r.version:null}},6692:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},2322:(e,t,r)=>{var i=r(5606);const n="object"==typeof i&&i.env&&i.env.NODE_DEBUG&&/\bsemver\b/i.test(i.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=n},3229:e=>{const t=/^[0-9]+$/,r=(e,r)=>{const i=t.test(e),n=t.test(r);return i&&n&&(e=+e,r=+r),e===r?0:i&&!n?-1:n&&!i?1:er(t,e)}},9901:e=>{const t=Object.freeze({loose:!0}),r=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:r},5208:(e,t,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:i,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:s}=r(6692),o=r(2322),a=(t=e.exports={}).re=[],c=t.safeRe=[],l=t.src=[],E=t.t={};let u=0;const p="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",s],[p,n]],d=(e,t,r)=>{const i=(e=>{for(const[t,r]of h)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),n=u++;o(e,n,t),E[e]=n,l[n]=t,a[n]=new RegExp(t,r?"g":void 0),c[n]=new RegExp(i,r?"g":void 0)};d("NUMERICIDENTIFIER","0|[1-9]\\d*"),d("NUMERICIDENTIFIERLOOSE","\\d+"),d("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),d("MAINVERSION",`(${l[E.NUMERICIDENTIFIER]})\\.(${l[E.NUMERICIDENTIFIER]})\\.(${l[E.NUMERICIDENTIFIER]})`),d("MAINVERSIONLOOSE",`(${l[E.NUMERICIDENTIFIERLOOSE]})\\.(${l[E.NUMERICIDENTIFIERLOOSE]})\\.(${l[E.NUMERICIDENTIFIERLOOSE]})`),d("PRERELEASEIDENTIFIER",`(?:${l[E.NUMERICIDENTIFIER]}|${l[E.NONNUMERICIDENTIFIER]})`),d("PRERELEASEIDENTIFIERLOOSE",`(?:${l[E.NUMERICIDENTIFIERLOOSE]}|${l[E.NONNUMERICIDENTIFIER]})`),d("PRERELEASE",`(?:-(${l[E.PRERELEASEIDENTIFIER]}(?:\\.${l[E.PRERELEASEIDENTIFIER]})*))`),d("PRERELEASELOOSE",`(?:-?(${l[E.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[E.PRERELEASEIDENTIFIERLOOSE]})*))`),d("BUILDIDENTIFIER",`${p}+`),d("BUILD",`(?:\\+(${l[E.BUILDIDENTIFIER]}(?:\\.${l[E.BUILDIDENTIFIER]})*))`),d("FULLPLAIN",`v?${l[E.MAINVERSION]}${l[E.PRERELEASE]}?${l[E.BUILD]}?`),d("FULL",`^${l[E.FULLPLAIN]}$`),d("LOOSEPLAIN",`[v=\\s]*${l[E.MAINVERSIONLOOSE]}${l[E.PRERELEASELOOSE]}?${l[E.BUILD]}?`),d("LOOSE",`^${l[E.LOOSEPLAIN]}$`),d("GTLT","((?:<|>)?=?)"),d("XRANGEIDENTIFIERLOOSE",`${l[E.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),d("XRANGEIDENTIFIER",`${l[E.NUMERICIDENTIFIER]}|x|X|\\*`),d("XRANGEPLAIN",`[v=\\s]*(${l[E.XRANGEIDENTIFIER]})(?:\\.(${l[E.XRANGEIDENTIFIER]})(?:\\.(${l[E.XRANGEIDENTIFIER]})(?:${l[E.PRERELEASE]})?${l[E.BUILD]}?)?)?`),d("XRANGEPLAINLOOSE",`[v=\\s]*(${l[E.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[E.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[E.XRANGEIDENTIFIERLOOSE]})(?:${l[E.PRERELEASELOOSE]})?${l[E.BUILD]}?)?)?`),d("XRANGE",`^${l[E.GTLT]}\\s*${l[E.XRANGEPLAIN]}$`),d("XRANGELOOSE",`^${l[E.GTLT]}\\s*${l[E.XRANGEPLAINLOOSE]}$`),d("COERCEPLAIN",`(^|[^\\d])(\\d{1,${i}})(?:\\.(\\d{1,${i}}))?(?:\\.(\\d{1,${i}}))?`),d("COERCE",`${l[E.COERCEPLAIN]}(?:$|[^\\d])`),d("COERCEFULL",l[E.COERCEPLAIN]+`(?:${l[E.PRERELEASE]})?`+`(?:${l[E.BUILD]})?(?:$|[^\\d])`),d("COERCERTL",l[E.COERCE],!0),d("COERCERTLFULL",l[E.COERCEFULL],!0),d("LONETILDE","(?:~>?)"),d("TILDETRIM",`(\\s*)${l[E.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",d("TILDE",`^${l[E.LONETILDE]}${l[E.XRANGEPLAIN]}$`),d("TILDELOOSE",`^${l[E.LONETILDE]}${l[E.XRANGEPLAINLOOSE]}$`),d("LONECARET","(?:\\^)"),d("CARETTRIM",`(\\s*)${l[E.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",d("CARET",`^${l[E.LONECARET]}${l[E.XRANGEPLAIN]}$`),d("CARETLOOSE",`^${l[E.LONECARET]}${l[E.XRANGEPLAINLOOSE]}$`),d("COMPARATORLOOSE",`^${l[E.GTLT]}\\s*(${l[E.LOOSEPLAIN]})$|^$`),d("COMPARATOR",`^${l[E.GTLT]}\\s*(${l[E.FULLPLAIN]})$|^$`),d("COMPARATORTRIM",`(\\s*)${l[E.GTLT]}\\s*(${l[E.LOOSEPLAIN]}|${l[E.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",d("HYPHENRANGE",`^\\s*(${l[E.XRANGEPLAIN]})\\s+-\\s+(${l[E.XRANGEPLAIN]})\\s*$`),d("HYPHENRANGELOOSE",`^\\s*(${l[E.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[E.XRANGEPLAINLOOSE]})\\s*$`),d("STAR","(<|>)?=?\\s*\\*"),d("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),d("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},5606:e=>{var t,r,i=e.exports={};function n(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function o(e){if(t===setTimeout)return setTimeout(e,0);if((t===n||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:n}catch(e){t=n}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var a,c=[],l=!1,E=-1;function u(){l&&a&&(l=!1,a.length?c=a.concat(c):E=-1,c.length&&p())}function p(){if(!l){var e=o(u);l=!0;for(var t=c.length;t;){for(a=c,c=[];++E1)for(var r=1;r{"use strict";var e=r(8711),t=r(8064);class i{bus;constructor(r){"function"==typeof r.getVersion&&e(r.getVersion())?t(r.getVersion())!==t(this.getVersion())&&console.warn("Proxying an event bus of version "+r.getVersion()+" with "+this.getVersion()):console.warn("Proxying an event bus with an unknown or invalid version"),this.bus=r}getVersion(){return"3.3.1"}subscribe(e,t){this.bus.subscribe(e,t)}unsubscribe(e,t){this.bus.unsubscribe(e,t)}emit(e,t){this.bus.emit(e,t)}}class n{handlers=new Map;getVersion(){return"3.3.1"}subscribe(e,t){this.handlers.set(e,(this.handlers.get(e)||[]).concat(t))}unsubscribe(e,t){this.handlers.set(e,(this.handlers.get(e)||[]).filter((e=>e!==t)))}emit(e,t){(this.handlers.get(e)||[]).forEach((e=>{try{e(t)}catch(e){console.error("could not invoke event listener",e)}}))}}let s=null;function o(){return null!==s?s:"undefined"==typeof window?new Proxy({},{get:()=>()=>console.error("Window not available, EventBus can not be established!")}):(window.OC?._eventBus&&void 0===window._nc_event_bus&&(console.warn("found old event bus instance at OC._eventBus. Update your version!"),window._nc_event_bus=window.OC._eventBus),s=void 0!==window?._nc_event_bus?new i(window._nc_event_bus):window._nc_event_bus=new n,s)}var a=r(9097);let c;const l=[];var E,u;E="csrf-token-update",u=e=>{c=e.token,l.forEach((e=>{try{e(c)}catch(e){console.error("Error updating CSRF token observer",e)}}))},o().subscribe(E,u);(0,a.c0)("public").persist().build();let p;const h=(e,t)=>e?e.getAttribute(t):null;var d=(e=>(e[e.Debug=0]="Debug",e[e.Info=1]="Info",e[e.Warn=2]="Warn",e[e.Error=3]="Error",e[e.Fatal=4]="Fatal",e))(d||{}),I=Object.defineProperty,f=(e,t,r)=>(((e,t,r)=>{t in e?I(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r);class L{constructor(e){f(this,"context"),this.context=e||{}}formatMessage(e,t,r){let i="["+d[t].toUpperCase()+"] ";return r&&r.app&&(i+=r.app+": "),"string"==typeof e?i+e:(i+="Unexpected ".concat(e.name),e.message&&(i+=' "'.concat(e.message,'"')),t===d.Debug&&e.stack&&(i+="\n\nStack trace:\n".concat(e.stack)),i)}log(e,t,r){var i,n;if(!("number"==typeof(null==(i=this.context)?void 0:i.level)&&e<(null==(n=this.context)?void 0:n.level)))switch("object"==typeof t&&void 0===(null==r?void 0:r.error)&&(r.error=t),e){case d.Debug:console.debug(this.formatMessage(t,d.Debug,r),r);break;case d.Info:console.info(this.formatMessage(t,d.Info,r),r);break;case d.Warn:console.warn(this.formatMessage(t,d.Warn,r),r);break;case d.Error:console.error(this.formatMessage(t,d.Error,r),r);break;case d.Fatal:default:console.error(this.formatMessage(t,d.Fatal,r),r)}}debug(e,t){this.log(d.Debug,e,Object.assign({},this.context,t))}info(e,t){this.log(d.Info,e,Object.assign({},this.context,t))}warn(e,t){this.log(d.Warn,e,Object.assign({},this.context,t))}error(e,t){this.log(d.Error,e,Object.assign({},this.context,t))}fatal(e,t){this.log(d.Fatal,e,Object.assign({},this.context,t))}}function m(e){return new L(e)}var O=Object.defineProperty,R=(e,t,r)=>(((e,t,r)=>{t in e?O(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r);class v{constructor(e){R(this,"context"),R(this,"factory"),this.context={},this.factory=e}setApp(e){return this.context.app=e,this}setLogLevel(e){return this.context.level=e,this}setUid(e){return this.context.uid=e,this}detectUser(){const e=function(){if(void 0!==p)return p;const e=document?.getElementsByTagName("head")[0];if(!e)return null;const t=h(e,"data-user");return null===t?(p=null,p):(p={uid:t,displayName:h(e,"data-user-displayname"),isAdmin:!!window._oc_isadmin},p)}();return null!==e&&(this.context.uid=e.uid),this}detectLogLevel(){const e=this,t=()=>{var r,i;"complete"===document.readyState||"interactive"===document.readyState?(e.context.level=null!=(i=null==(r=window._oc_config)?void 0:r.loglevel)?i:d.Warn,window._oc_debug&&(e.context.level=d.Debug),document.removeEventListener("readystatechange",t)):document.addEventListener("readystatechange",t)};return t(),this}build(){return void 0===this.context.level&&this.detectLogLevel(),this.factory(this.context)}}function N(){return new v(m)}const w=N().setApp("Files_PDFViewer").detectUser().build();window.location===window.parent.location&&(window.location.href="/");const b=window.location.search,A=new URLSearchParams(b).get("hideDownload");document.addEventListener("DOMContentLoaded",(function(){const e=document.getElementsByTagName("head")[0];if(PDFViewerApplicationOptions.set("disablePreferences",!0),PDFViewerApplicationOptions.set("externalLinkTarget",2),PDFViewerApplicationOptions.set("isEvalSupported",!1),PDFViewerApplicationOptions.set("workerSrc",e.getAttribute("data-workersrc")),PDFViewerApplicationOptions.set("cMapUrl",e.getAttribute("data-cmapurl")),PDFViewerApplicationOptions.set("sandboxBundleSrc",e.getAttribute("data-sandbox")),PDFViewerApplicationOptions.set("enablePermissions",!0),PDFViewerApplicationOptions.set("imageResourcesPath","./js/pdfjs/web/images/"),PDFViewerApplicationOptions.set("enableScripting",!0===e.getAttribute("data-enableScripting")),"1"===A){const e=window.document.querySelector(".pdfViewer");e&&e.classList.add("disabledTextSelection"),PDFViewerApplication&&(PDFViewerApplication.download=function(){},delete PDFViewerApplication.supportsPrinting,PDFViewerApplication.supportsPrinting=!1,PDFViewerApplication.beforePrint=function(){}),w.info("Download, print and user interaction disabled")}else w.info("Download and print available");w.debug("Initialized files_pdfviewer",PDFViewerApplicationOptions.getAll())}),!0)})()})(); -//# sourceMappingURL=files_pdfviewer-workersrc.js.map?v=44ad0af05578cd51555e \ No newline at end of file +(()=>{var e={9097:(e,t,r)=>{"use strict";t.c0=function(e){return new i.default(e)};var i=s(r(9457)),n=s(r(432));function s(e){return e&&e.__esModule?e:{default:e}}function o(e,t){Object.keys(e).filter((e=>!t||t(e))).map(e.removeItem.bind(e))}},432:(e,t)=>{"use strict";function r(e,t,r){var i;return(t="symbol"==typeof(i=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?i:i+"")in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;class i{constructor(e,t,n){r(this,"scope",void 0),r(this,"wrapped",void 0),this.scope="".concat(n?i.GLOBAL_SCOPE_PERSISTENT:i.GLOBAL_SCOPE_VOLATILE,"_").concat(btoa(e),"_"),this.wrapped=t}scopeKey(e){return"".concat(this.scope).concat(e)}setItem(e,t){this.wrapped.setItem(this.scopeKey(e),t)}getItem(e){return this.wrapped.getItem(this.scopeKey(e))}removeItem(e){this.wrapped.removeItem(this.scopeKey(e))}clear(){Object.keys(this.wrapped).filter((e=>e.startsWith(this.scope))).map(this.wrapped.removeItem.bind(this.wrapped))}}t.default=i,r(i,"GLOBAL_SCOPE_VOLATILE","nextcloud_vol"),r(i,"GLOBAL_SCOPE_PERSISTENT","nextcloud_per")},9457:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,n=(i=r(432))&&i.__esModule?i:{default:i};function s(e,t,r){var i;return(t="symbol"==typeof(i=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?i:i+"")in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}t.default=class{constructor(e){s(this,"appId",void 0),s(this,"persisted",!1),s(this,"clearedOnLogout",!1),this.appId=e}persist(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.persisted=e,this}clearOnLogout(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.clearedOnLogout=e,this}build(){return new n.default(this.appId,this.persisted?window.localStorage:window.sessionStorage,!this.clearedOnLogout)}}},5950:(e,t,r)=>{const i=r(2322),{MAX_LENGTH:n,MAX_SAFE_INTEGER:s}=r(6692),{safeRe:o,t:a}=r(5208),c=r(9901),{compareIdentifiers:l}=r(3229);class E{constructor(e,t){if(t=c(t),e instanceof E){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>n)throw new TypeError(`version is longer than ${n} characters`);i("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?o[a.LOOSE]:o[a.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>s||this.major<0)throw new TypeError("Invalid major version");if(this.minor>s||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>s||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[i]&&(this.prerelease[i]++,i=-2);if(-1===i){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let i=[t,e];!1===r&&(i=[t]),0===l(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=E},8064:(e,t,r)=>{const i=r(5950);e.exports=(e,t)=>new i(e,t).major},8690:(e,t,r)=>{const i=r(5950);e.exports=(e,t,r=!1)=>{if(e instanceof i)return e;try{return new i(e,t)}catch(e){if(!r)return null;throw e}}},8711:(e,t,r)=>{const i=r(8690);e.exports=(e,t)=>{const r=i(e,t);return r?r.version:null}},6692:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},2322:(e,t,r)=>{var i=r(5606);const n="object"==typeof i&&i.env&&i.env.NODE_DEBUG&&/\bsemver\b/i.test(i.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=n},3229:e=>{const t=/^[0-9]+$/,r=(e,r)=>{const i=t.test(e),n=t.test(r);return i&&n&&(e=+e,r=+r),e===r?0:i&&!n?-1:n&&!i?1:er(t,e)}},9901:e=>{const t=Object.freeze({loose:!0}),r=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:r},5208:(e,t,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:i,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:s}=r(6692),o=r(2322),a=(t=e.exports={}).re=[],c=t.safeRe=[],l=t.src=[],E=t.t={};let u=0;const p="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",s],[p,n]],d=(e,t,r)=>{const i=(e=>{for(const[t,r]of h)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),n=u++;o(e,n,t),E[e]=n,l[n]=t,a[n]=new RegExp(t,r?"g":void 0),c[n]=new RegExp(i,r?"g":void 0)};d("NUMERICIDENTIFIER","0|[1-9]\\d*"),d("NUMERICIDENTIFIERLOOSE","\\d+"),d("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),d("MAINVERSION",`(${l[E.NUMERICIDENTIFIER]})\\.(${l[E.NUMERICIDENTIFIER]})\\.(${l[E.NUMERICIDENTIFIER]})`),d("MAINVERSIONLOOSE",`(${l[E.NUMERICIDENTIFIERLOOSE]})\\.(${l[E.NUMERICIDENTIFIERLOOSE]})\\.(${l[E.NUMERICIDENTIFIERLOOSE]})`),d("PRERELEASEIDENTIFIER",`(?:${l[E.NUMERICIDENTIFIER]}|${l[E.NONNUMERICIDENTIFIER]})`),d("PRERELEASEIDENTIFIERLOOSE",`(?:${l[E.NUMERICIDENTIFIERLOOSE]}|${l[E.NONNUMERICIDENTIFIER]})`),d("PRERELEASE",`(?:-(${l[E.PRERELEASEIDENTIFIER]}(?:\\.${l[E.PRERELEASEIDENTIFIER]})*))`),d("PRERELEASELOOSE",`(?:-?(${l[E.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[E.PRERELEASEIDENTIFIERLOOSE]})*))`),d("BUILDIDENTIFIER",`${p}+`),d("BUILD",`(?:\\+(${l[E.BUILDIDENTIFIER]}(?:\\.${l[E.BUILDIDENTIFIER]})*))`),d("FULLPLAIN",`v?${l[E.MAINVERSION]}${l[E.PRERELEASE]}?${l[E.BUILD]}?`),d("FULL",`^${l[E.FULLPLAIN]}$`),d("LOOSEPLAIN",`[v=\\s]*${l[E.MAINVERSIONLOOSE]}${l[E.PRERELEASELOOSE]}?${l[E.BUILD]}?`),d("LOOSE",`^${l[E.LOOSEPLAIN]}$`),d("GTLT","((?:<|>)?=?)"),d("XRANGEIDENTIFIERLOOSE",`${l[E.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),d("XRANGEIDENTIFIER",`${l[E.NUMERICIDENTIFIER]}|x|X|\\*`),d("XRANGEPLAIN",`[v=\\s]*(${l[E.XRANGEIDENTIFIER]})(?:\\.(${l[E.XRANGEIDENTIFIER]})(?:\\.(${l[E.XRANGEIDENTIFIER]})(?:${l[E.PRERELEASE]})?${l[E.BUILD]}?)?)?`),d("XRANGEPLAINLOOSE",`[v=\\s]*(${l[E.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[E.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[E.XRANGEIDENTIFIERLOOSE]})(?:${l[E.PRERELEASELOOSE]})?${l[E.BUILD]}?)?)?`),d("XRANGE",`^${l[E.GTLT]}\\s*${l[E.XRANGEPLAIN]}$`),d("XRANGELOOSE",`^${l[E.GTLT]}\\s*${l[E.XRANGEPLAINLOOSE]}$`),d("COERCEPLAIN",`(^|[^\\d])(\\d{1,${i}})(?:\\.(\\d{1,${i}}))?(?:\\.(\\d{1,${i}}))?`),d("COERCE",`${l[E.COERCEPLAIN]}(?:$|[^\\d])`),d("COERCEFULL",l[E.COERCEPLAIN]+`(?:${l[E.PRERELEASE]})?`+`(?:${l[E.BUILD]})?(?:$|[^\\d])`),d("COERCERTL",l[E.COERCE],!0),d("COERCERTLFULL",l[E.COERCEFULL],!0),d("LONETILDE","(?:~>?)"),d("TILDETRIM",`(\\s*)${l[E.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",d("TILDE",`^${l[E.LONETILDE]}${l[E.XRANGEPLAIN]}$`),d("TILDELOOSE",`^${l[E.LONETILDE]}${l[E.XRANGEPLAINLOOSE]}$`),d("LONECARET","(?:\\^)"),d("CARETTRIM",`(\\s*)${l[E.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",d("CARET",`^${l[E.LONECARET]}${l[E.XRANGEPLAIN]}$`),d("CARETLOOSE",`^${l[E.LONECARET]}${l[E.XRANGEPLAINLOOSE]}$`),d("COMPARATORLOOSE",`^${l[E.GTLT]}\\s*(${l[E.LOOSEPLAIN]})$|^$`),d("COMPARATOR",`^${l[E.GTLT]}\\s*(${l[E.FULLPLAIN]})$|^$`),d("COMPARATORTRIM",`(\\s*)${l[E.GTLT]}\\s*(${l[E.LOOSEPLAIN]}|${l[E.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",d("HYPHENRANGE",`^\\s*(${l[E.XRANGEPLAIN]})\\s+-\\s+(${l[E.XRANGEPLAIN]})\\s*$`),d("HYPHENRANGELOOSE",`^\\s*(${l[E.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[E.XRANGEPLAINLOOSE]})\\s*$`),d("STAR","(<|>)?=?\\s*\\*"),d("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),d("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},5606:e=>{var t,r,i=e.exports={};function n(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function o(e){if(t===setTimeout)return setTimeout(e,0);if((t===n||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:n}catch(e){t=n}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var a,c=[],l=!1,E=-1;function u(){l&&a&&(l=!1,a.length?c=a.concat(c):E=-1,c.length&&p())}function p(){if(!l){var e=o(u);l=!0;for(var t=c.length;t;){for(a=c,c=[];++E1)for(var r=1;r{"use strict";var e=r(8711),t=r(8064);class i{bus;constructor(r){"function"==typeof r.getVersion&&e(r.getVersion())?t(r.getVersion())!==t(this.getVersion())&&console.warn("Proxying an event bus of version "+r.getVersion()+" with "+this.getVersion()):console.warn("Proxying an event bus with an unknown or invalid version"),this.bus=r}getVersion(){return"3.3.1"}subscribe(e,t){this.bus.subscribe(e,t)}unsubscribe(e,t){this.bus.unsubscribe(e,t)}emit(e,t){this.bus.emit(e,t)}}class n{handlers=new Map;getVersion(){return"3.3.1"}subscribe(e,t){this.handlers.set(e,(this.handlers.get(e)||[]).concat(t))}unsubscribe(e,t){this.handlers.set(e,(this.handlers.get(e)||[]).filter((e=>e!==t)))}emit(e,t){(this.handlers.get(e)||[]).forEach((e=>{try{e(t)}catch(e){console.error("could not invoke event listener",e)}}))}}let s=null;function o(){return null!==s?s:"undefined"==typeof window?new Proxy({},{get:()=>()=>console.error("Window not available, EventBus can not be established!")}):(window.OC?._eventBus&&void 0===window._nc_event_bus&&(console.warn("found old event bus instance at OC._eventBus. Update your version!"),window._nc_event_bus=window.OC._eventBus),s=void 0!==window?._nc_event_bus?new i(window._nc_event_bus):window._nc_event_bus=new n,s)}var a=r(9097);let c;const l=[];var E,u;E="csrf-token-update",u=e=>{c=e.token,l.forEach((e=>{try{e(c)}catch(e){console.error("Error updating CSRF token observer",e)}}))},o().subscribe(E,u);(0,a.c0)("public").persist().build();let p;const h=(e,t)=>e?e.getAttribute(t):null;var d=(e=>(e[e.Debug=0]="Debug",e[e.Info=1]="Info",e[e.Warn=2]="Warn",e[e.Error=3]="Error",e[e.Fatal=4]="Fatal",e))(d||{}),I=Object.defineProperty,f=(e,t,r)=>(((e,t,r)=>{t in e?I(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r);class L{constructor(e){f(this,"context"),this.context=e||{}}formatMessage(e,t,r){let i="["+d[t].toUpperCase()+"] ";return r&&r.app&&(i+=r.app+": "),"string"==typeof e?i+e:(i+="Unexpected ".concat(e.name),e.message&&(i+=' "'.concat(e.message,'"')),t===d.Debug&&e.stack&&(i+="\n\nStack trace:\n".concat(e.stack)),i)}log(e,t,r){var i,n;if(!("number"==typeof(null==(i=this.context)?void 0:i.level)&&e<(null==(n=this.context)?void 0:n.level)))switch("object"==typeof t&&void 0===(null==r?void 0:r.error)&&(r.error=t),e){case d.Debug:console.debug(this.formatMessage(t,d.Debug,r),r);break;case d.Info:console.info(this.formatMessage(t,d.Info,r),r);break;case d.Warn:console.warn(this.formatMessage(t,d.Warn,r),r);break;case d.Error:console.error(this.formatMessage(t,d.Error,r),r);break;case d.Fatal:default:console.error(this.formatMessage(t,d.Fatal,r),r)}}debug(e,t){this.log(d.Debug,e,Object.assign({},this.context,t))}info(e,t){this.log(d.Info,e,Object.assign({},this.context,t))}warn(e,t){this.log(d.Warn,e,Object.assign({},this.context,t))}error(e,t){this.log(d.Error,e,Object.assign({},this.context,t))}fatal(e,t){this.log(d.Fatal,e,Object.assign({},this.context,t))}}function m(e){return new L(e)}var O=Object.defineProperty,R=(e,t,r)=>(((e,t,r)=>{t in e?O(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r);class v{constructor(e){R(this,"context"),R(this,"factory"),this.context={},this.factory=e}setApp(e){return this.context.app=e,this}setLogLevel(e){return this.context.level=e,this}setUid(e){return this.context.uid=e,this}detectUser(){const e=function(){if(void 0!==p)return p;const e=document?.getElementsByTagName("head")[0];if(!e)return null;const t=h(e,"data-user");return null===t?(p=null,p):(p={uid:t,displayName:h(e,"data-user-displayname"),isAdmin:!!window._oc_isadmin},p)}();return null!==e&&(this.context.uid=e.uid),this}detectLogLevel(){const e=this,t=()=>{var r,i;"complete"===document.readyState||"interactive"===document.readyState?(e.context.level=null!=(i=null==(r=window._oc_config)?void 0:r.loglevel)?i:d.Warn,window._oc_debug&&(e.context.level=d.Debug),document.removeEventListener("readystatechange",t)):document.addEventListener("readystatechange",t)};return t(),this}build(){return void 0===this.context.level&&this.detectLogLevel(),this.factory(this.context)}}function N(){return new v(m)}const w=N().setApp("Files_PDFViewer").detectUser().build();window.location===window.parent.location&&(window.location.href="/");const b=window.location.search,A=new URLSearchParams(b).get("hideDownload");document.addEventListener("DOMContentLoaded",(function(){const e=document.getElementsByTagName("head")[0];if(PDFViewerApplicationOptions.set("disablePreferences",!0),PDFViewerApplicationOptions.set("externalLinkTarget",2),PDFViewerApplicationOptions.set("isEvalSupported",!1),PDFViewerApplicationOptions.set("workerSrc",e.getAttribute("data-workersrc")),PDFViewerApplicationOptions.set("cMapUrl",e.getAttribute("data-cmapurl")),PDFViewerApplicationOptions.set("sandboxBundleSrc",e.getAttribute("data-sandbox")),PDFViewerApplicationOptions.set("enablePermissions",!0),PDFViewerApplicationOptions.set("imageResourcesPath",e.getAttribute("data-imageresourcespath")),PDFViewerApplicationOptions.set("enableScripting",!0===e.getAttribute("data-enableScripting")),"1"===A){const e=window.document.querySelector(".pdfViewer");e&&e.classList.add("disabledTextSelection"),PDFViewerApplication&&(PDFViewerApplication.download=function(){},delete PDFViewerApplication.supportsPrinting,PDFViewerApplication.supportsPrinting=!1,PDFViewerApplication.beforePrint=function(){}),w.info("Download, print and user interaction disabled")}else w.info("Download and print available");w.debug("Initialized files_pdfviewer",PDFViewerApplicationOptions.getAll())}),!0)})()})(); +//# sourceMappingURL=files_pdfviewer-workersrc.js.map?v=408f31cfbcd9e9f41c03 \ No newline at end of file diff --git a/js/files_pdfviewer-workersrc.js.map b/js/files_pdfviewer-workersrc.js.map index cdead23b..d925833d 100644 --- a/js/files_pdfviewer-workersrc.js.map +++ b/js/files_pd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AsB,GACtD4E,4BAA4B5E,IAAI,mBAAmB,GACnD4E,4BAA4B5E,IAAI,YAAaoD,EAAKvC,aAAa,mBAC/D+D,4BAA4B5E,IAAI,UAAWoD,EAAKvC,aAAa,iBAC7D+D,4BAA4B5E,IAAI,mBAAoBoD,EAAKvC,aAAa,iBACtE+D,4BAA4B5E,IAAI,qBAAqB,GACrD4E,4BAA4B5E,IAAI,qBAAsB,0BACtD4E,4BAA4B5E,IAAI,mBAAiE,IAA9CoD,EAAKvC,aAAa,yBAEhD,MAAjB6D,EAAsB,CACzB,MAAMG,EAAY1P,OAAOkO,SAASyB,cAAc,cAE5CD,GACHA,EAAUE,UAAUC,IAAI,yBAGrBC,uBAIHA,qBAAqBC,SAAW,WAChC,SAUOD,qBAAqBE,iBAC5BF,qBAAqBE,kBAAmB,EAKxCF,qBAAqBG,YAAc,WACnC,GAGDC,EAAOlD,KAAK,gDACb,MACCkD,EAAOlD,KAAK,gCAGbkD,EAAO/P,MAAM,8BAA+BsP,4BAA4BU,SACzE,IAEoF,E","sources":["webpack:///files_pdfviewer/node_modules/@nextcloud/browser-storage/dist/index.js","webpack:///files_pdfviewer/node_modules/@nextcloud/browser-storage/dist/scopedstorage.js","webpack:///files_pdfviewer/node_modules/@nextcloud/browser-storage/dist/storagebuilder.js","webpack:///files_pdfviewer/node_modules/@nextcloud/event-bus/node_modules/semver/classes/semver.js","webpack:///files_pdfviewer/node_modules/@nextcloud/event-bus/node_modules/semver/functions/major.js","webpack:///files_pdfviewer/node_modules/@nextcloud/event-bus/node_modules/semver/functions/parse.js","webpack:///files_pdfviewer/node_modules/@nextcloud/event-bus/node_modules/semver/functions/valid.js","webpack:///files_pdfviewer/node_modules/@nextcloud/event-bus/node_modules/semver/internal/constants.js","webpack:///files_pdfviewer/node_modules/@nextcloud/event-bus/node_modules/semver/internal/debug.js","webpack:///files_pdfviewer/node_modules/@nextcloud/event-bus/node_modules/semver/internal/identifiers.js","webpack:///files_pdfviewer/node_modules/@nextcloud/event-bus/node_modules/semver/internal/parse-options.js","webpack:///files_pdfviewer/node_modules/@nextcloud/event-bus/node_modules/semver/internal/re.js","webpack:///files_pdfviewer/node_modules/process/browser.js","webpack:///files_pdfviewer/webpack/bootstrap","webpack:///files_pdfviewer/node_modules/@nextcloud/event-bus/dist/index.mjs","webpack:///files_pdfviewer/node_modules/@nextcloud/auth/dist/index.mjs","webpack:///files_pdfviewer/node_modules/@nextcloud/logger/dist/index.mjs","webpack:///files_pdfviewer/src/services/logger.js","webpack:///files_pdfviewer/src/utils/redirectIfNotIframe.js","webpack:///files_pdfviewer/src/workersrc.js"],"sourcesContent":["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.clearAll = clearAll;\nexports.clearNonPersistent = clearNonPersistent;\nexports.getBuilder = getBuilder;\nvar _storagebuilder = _interopRequireDefault(require(\"./storagebuilder\"));\nvar _scopedstorage = _interopRequireDefault(require(\"./scopedstorage\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/**\n * Get the storage builder for an app\n * @param appId App ID to scope storage\n */\nfunction getBuilder(appId) {\n return new _storagebuilder.default(appId);\n}\n\n/**\n * Clear values from storage\n * @param storage The storage to clear\n * @param pred Callback to check if value should be cleared\n */\nfunction clearStorage(storage, pred) {\n Object.keys(storage).filter(k => pred ? pred(k) : true).map(storage.removeItem.bind(storage));\n}\n\n/**\n * Clear all values from all storages\n */\nfunction clearAll() {\n const storages = [window.sessionStorage, window.localStorage];\n storages.map(s => clearStorage(s));\n}\n\n/**\n * Clear ony non persistent values\n */\nfunction clearNonPersistent() {\n const storages = [window.sessionStorage, window.localStorage];\n storages.map(s => clearStorage(s, k => !k.startsWith(_scopedstorage.default.GLOBAL_SCOPE_PERSISTENT)));\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nclass ScopedStorage {\n constructor(scope, wrapped, persistent) {\n _defineProperty(this, \"scope\", void 0);\n _defineProperty(this, \"wrapped\", void 0);\n this.scope = \"\".concat(persistent ? ScopedStorage.GLOBAL_SCOPE_PERSISTENT : ScopedStorage.GLOBAL_SCOPE_VOLATILE, \"_\").concat(btoa(scope), \"_\");\n this.wrapped = wrapped;\n }\n scopeKey(key) {\n return \"\".concat(this.scope).concat(key);\n }\n setItem(key, value) {\n this.wrapped.setItem(this.scopeKey(key), value);\n }\n getItem(key) {\n return this.wrapped.getItem(this.scopeKey(key));\n }\n removeItem(key) {\n this.wrapped.removeItem(this.scopeKey(key));\n }\n clear() {\n Object.keys(this.wrapped).filter(key => key.startsWith(this.scope)).map(this.wrapped.removeItem.bind(this.wrapped));\n }\n}\nexports.default = ScopedStorage;\n_defineProperty(ScopedStorage, \"GLOBAL_SCOPE_VOLATILE\", 'nextcloud_vol');\n_defineProperty(ScopedStorage, \"GLOBAL_SCOPE_PERSISTENT\", 'nextcloud_per');\n//# sourceMappingURL=scopedstorage.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _scopedstorage = _interopRequireDefault(require(\"./scopedstorage\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nclass StorageBuilder {\n constructor(appId) {\n _defineProperty(this, \"appId\", void 0);\n _defineProperty(this, \"persisted\", false);\n _defineProperty(this, \"clearedOnLogout\", false);\n this.appId = appId;\n }\n persist() {\n let persist = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n this.persisted = persist;\n return this;\n }\n clearOnLogout() {\n let clear = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n this.clearedOnLogout = clear;\n return this;\n }\n build() {\n return new _scopedstorage.default(this.appId, this.persisted ? window.localStorage : window.sessionStorage, !this.clearedOnLogout);\n }\n}\nexports.default = StorageBuilder;\n//# sourceMappingURL=storagebuilder.js.map","const debug = require('../internal/debug')\nconst { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants')\nconst { safeRe: re, t } = require('../internal/re')\n\nconst parseOptions = require('../internal/parse-options')\nconst { compareIdentifiers } = require('../internal/identifiers')\nclass SemVer {\n constructor (version, options) {\n options = parseOptions(options)\n\n if (version instanceof SemVer) {\n if (version.loose === !!options.loose &&\n version.includePrerelease === !!options.includePrerelease) {\n return version\n } else {\n version = version.version\n }\n } else if (typeof version !== 'string') {\n throw new TypeError(`Invalid version. Must be a string. Got type \"${typeof version}\".`)\n }\n\n if (version.length > MAX_LENGTH) {\n throw new TypeError(\n `version is longer than ${MAX_LENGTH} characters`\n )\n }\n\n debug('SemVer', version, options)\n this.options = options\n this.loose = !!options.loose\n // this isn't actually relevant for versions, but keep it so that we\n // don't run into trouble passing this.options around.\n this.includePrerelease = !!options.includePrerelease\n\n const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])\n\n if (!m) {\n throw new TypeError(`Invalid Version: ${version}`)\n }\n\n this.raw = version\n\n // these are actually numbers\n this.major = +m[1]\n this.minor = +m[2]\n this.patch = +m[3]\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError('Invalid major version')\n }\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError('Invalid minor version')\n }\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError('Invalid patch version')\n }\n\n // numberify any prerelease numeric ids\n if (!m[4]) {\n this.prerelease = []\n } else {\n this.prerelease = m[4].split('.').map((id) => {\n if (/^[0-9]+$/.test(id)) {\n const num = +id\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num\n }\n }\n return id\n })\n }\n\n this.build = m[5] ? m[5].split('.') : []\n this.format()\n }\n\n format () {\n this.version = `${this.major}.${this.minor}.${this.patch}`\n if (this.prerelease.length) {\n this.version += `-${this.prerelease.join('.')}`\n }\n return this.version\n }\n\n toString () {\n return this.version\n }\n\n compare (other) {\n debug('SemVer.compare', this.version, this.options, other)\n if (!(other instanceof SemVer)) {\n if (typeof other === 'string' && other === this.version) {\n return 0\n }\n other = new SemVer(other, this.options)\n }\n\n if (other.version === this.version) {\n return 0\n }\n\n return this.compareMain(other) || this.comparePre(other)\n }\n\n compareMain (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return (\n compareIdentifiers(this.major, other.major) ||\n compareIdentifiers(this.minor, other.minor) ||\n compareIdentifiers(this.patch, other.patch)\n )\n }\n\n comparePre (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length) {\n return -1\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0\n }\n\n let i = 0\n do {\n const a = this.prerelease[i]\n const b = other.prerelease[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n compareBuild (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n let i = 0\n do {\n const a = this.build[i]\n const b = other.build[i]\n debug('build compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n // preminor will bump the version up to the next minor release, and immediately\n // down to pre-release. premajor and prepatch work the same way.\n inc (release, identifier, identifierBase) {\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor = 0\n this.major++\n this.inc('pre', identifier, identifierBase)\n break\n case 'preminor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor++\n this.inc('pre', identifier, identifierBase)\n break\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0\n this.inc('patch', identifier, identifierBase)\n this.inc('pre', identifier, identifierBase)\n break\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0) {\n this.inc('patch', identifier, identifierBase)\n }\n this.inc('pre', identifier, identifierBase)\n break\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (\n this.minor !== 0 ||\n this.patch !== 0 ||\n this.prerelease.length === 0\n ) {\n this.major++\n }\n this.minor = 0\n this.patch = 0\n this.prerelease = []\n break\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++\n }\n this.patch = 0\n this.prerelease = []\n break\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0) {\n this.patch++\n }\n this.prerelease = []\n break\n // This probably shouldn't be used publicly.\n // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.\n case 'pre': {\n const base = Number(identifierBase) ? 1 : 0\n\n if (!identifier && identifierBase === false) {\n throw new Error('invalid increment argument: identifier is empty')\n }\n\n if (this.prerelease.length === 0) {\n this.prerelease = [base]\n } else {\n let i = this.prerelease.length\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++\n i = -2\n }\n }\n if (i === -1) {\n // didn't increment anything\n if (identifier === this.prerelease.join('.') && identifierBase === false) {\n throw new Error('invalid increment argument: identifier already exists')\n }\n this.prerelease.push(base)\n }\n }\n if (identifier) {\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n let prerelease = [identifier, base]\n if (identifierBase === false) {\n prerelease = [identifier]\n }\n if (compareIdentifiers(this.prerelease[0], identifier) === 0) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = prerelease\n }\n } else {\n this.prerelease = prerelease\n }\n }\n break\n }\n default:\n throw new Error(`invalid increment argument: ${release}`)\n }\n this.raw = this.format()\n if (this.build.length) {\n this.raw += `+${this.build.join('.')}`\n }\n return this\n }\n}\n\nmodule.exports = SemVer\n","const SemVer = require('../classes/semver')\nconst major = (a, loose) => new SemVer(a, loose).major\nmodule.exports = major\n","const SemVer = require('../classes/semver')\nconst parse = (version, options, throwErrors = false) => {\n if (version instanceof SemVer) {\n return version\n }\n try {\n return new SemVer(version, options)\n } catch (er) {\n if (!throwErrors) {\n return null\n }\n throw er\n }\n}\n\nmodule.exports = parse\n","const parse = require('./parse')\nconst valid = (version, options) => {\n const v = parse(version, options)\n return v ? v.version : null\n}\nmodule.exports = valid\n","// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nconst SEMVER_SPEC_VERSION = '2.0.0'\n\nconst MAX_LENGTH = 256\nconst MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||\n/* istanbul ignore next */ 9007199254740991\n\n// Max safe segment length for coercion.\nconst MAX_SAFE_COMPONENT_LENGTH = 16\n\n// Max safe length for a build identifier. The max length minus 6 characters for\n// the shortest version with a build 0.0.0+BUILD.\nconst MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6\n\nconst RELEASE_TYPES = [\n 'major',\n 'premajor',\n 'minor',\n 'preminor',\n 'patch',\n 'prepatch',\n 'prerelease',\n]\n\nmodule.exports = {\n MAX_LENGTH,\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_SAFE_INTEGER,\n RELEASE_TYPES,\n SEMVER_SPEC_VERSION,\n FLAG_INCLUDE_PRERELEASE: 0b001,\n FLAG_LOOSE: 0b010,\n}\n","const debug = (\n typeof process === 'object' &&\n process.env &&\n process.env.NODE_DEBUG &&\n /\\bsemver\\b/i.test(process.env.NODE_DEBUG)\n) ? (...args) => console.error('SEMVER', ...args)\n : () => {}\n\nmodule.exports = debug\n","const numeric = /^[0-9]+$/\nconst compareIdentifiers = (a, b) => {\n const anum = numeric.test(a)\n const bnum = numeric.test(b)\n\n if (anum && bnum) {\n a = +a\n b = +b\n }\n\n return a === b ? 0\n : (anum && !bnum) ? -1\n : (bnum && !anum) ? 1\n : a < b ? -1\n : 1\n}\n\nconst rcompareIdentifiers = (a, b) => compareIdentifiers(b, a)\n\nmodule.exports = {\n compareIdentifiers,\n rcompareIdentifiers,\n}\n","// parse out just the options we care about\nconst looseOption = Object.freeze({ loose: true })\nconst emptyOpts = Object.freeze({ })\nconst parseOptions = options => {\n if (!options) {\n return emptyOpts\n }\n\n if (typeof options !== 'object') {\n return looseOption\n }\n\n return options\n}\nmodule.exports = parseOptions\n","const {\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_LENGTH,\n} = require('./constants')\nconst debug = require('./debug')\nexports = module.exports = {}\n\n// The actual regexps go on exports.re\nconst re = exports.re = []\nconst safeRe = exports.safeRe = []\nconst src = exports.src = []\nconst t = exports.t = {}\nlet R = 0\n\nconst LETTERDASHNUMBER = '[a-zA-Z0-9-]'\n\n// Replace some greedy regex tokens to prevent regex dos issues. These regex are\n// used internally via the safeRe object since all inputs in this library get\n// normalized first to trim and collapse all extra whitespace. The original\n// regexes are exported for userland consumption and lower level usage. A\n// future breaking change could export the safer regex only with a note that\n// all input should have extra whitespace removed.\nconst safeRegexReplacements = [\n ['\\\\s', 1],\n ['\\\\d', MAX_LENGTH],\n [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],\n]\n\nconst makeSafeRegex = (value) => {\n for (const [token, max] of safeRegexReplacements) {\n value = value\n .split(`${token}*`).join(`${token}{0,${max}}`)\n .split(`${token}+`).join(`${token}{1,${max}}`)\n }\n return value\n}\n\nconst createToken = (name, value, isGlobal) => {\n const safe = makeSafeRegex(value)\n const index = R++\n debug(name, index, value)\n t[name] = index\n src[index] = value\n re[index] = new RegExp(value, isGlobal ? 'g' : undefined)\n safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined)\n}\n\n// The following Regular Expressions can be used for tokenizing,\n// validating, and parsing SemVer version strings.\n\n// ## Numeric Identifier\n// A single `0`, or a non-zero digit followed by zero or more digits.\n\ncreateToken('NUMERICIDENTIFIER', '0|[1-9]\\\\d*')\ncreateToken('NUMERICIDENTIFIERLOOSE', '\\\\d+')\n\n// ## Non-numeric Identifier\n// Zero or more digits, followed by a letter or hyphen, and then zero or\n// more letters, digits, or hyphens.\n\ncreateToken('NONNUMERICIDENTIFIER', `\\\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`)\n\n// ## Main Version\n// Three dot-separated numeric identifiers.\n\ncreateToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})`)\n\ncreateToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})`)\n\n// ## Pre-release Version Identifier\n// A numeric identifier, or a non-numeric identifier.\n\ncreateToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER]\n}|${src[t.NONNUMERICIDENTIFIER]})`)\n\ncreateToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE]\n}|${src[t.NONNUMERICIDENTIFIER]})`)\n\n// ## Pre-release Version\n// Hyphen, followed by one or more dot-separated pre-release version\n// identifiers.\n\ncreateToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIER]})*))`)\n\ncreateToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`)\n\n// ## Build Metadata Identifier\n// Any combination of digits, letters, or hyphens.\n\ncreateToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`)\n\n// ## Build Metadata\n// Plus sign, followed by one or more period-separated build metadata\n// identifiers.\n\ncreateToken('BUILD', `(?:\\\\+(${src[t.BUILDIDENTIFIER]\n}(?:\\\\.${src[t.BUILDIDENTIFIER]})*))`)\n\n// ## Full Version String\n// A main version, followed optionally by a pre-release version and\n// build metadata.\n\n// Note that the only major, minor, patch, and pre-release sections of\n// the version string are capturing groups. The build metadata is not a\n// capturing group, because it should not ever be used in version\n// comparison.\n\ncreateToken('FULLPLAIN', `v?${src[t.MAINVERSION]\n}${src[t.PRERELEASE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('FULL', `^${src[t.FULLPLAIN]}$`)\n\n// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n// common in the npm registry.\ncreateToken('LOOSEPLAIN', `[v=\\\\s]*${src[t.MAINVERSIONLOOSE]\n}${src[t.PRERELEASELOOSE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)\n\ncreateToken('GTLT', '((?:<|>)?=?)')\n\n// Something like \"2.*\" or \"1.2.x\".\n// Note that \"x.x\" is a valid xRange identifer, meaning \"any version\"\n// Only the first item is strictly required.\ncreateToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`)\ncreateToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\\\*`)\n\ncreateToken('XRANGEPLAIN', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:${src[t.PRERELEASE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGEPLAINLOOSE', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:${src[t.PRERELEASELOOSE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAIN]}$`)\ncreateToken('XRANGELOOSE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Coercion.\n// Extract anything that could conceivably be a part of a valid semver\ncreateToken('COERCEPLAIN', `${'(^|[^\\\\d])' +\n '(\\\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`)\ncreateToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\\\d])`)\ncreateToken('COERCEFULL', src[t.COERCEPLAIN] +\n `(?:${src[t.PRERELEASE]})?` +\n `(?:${src[t.BUILD]})?` +\n `(?:$|[^\\\\d])`)\ncreateToken('COERCERTL', src[t.COERCE], true)\ncreateToken('COERCERTLFULL', src[t.COERCEFULL], true)\n\n// Tilde ranges.\n// Meaning is \"reasonably at or greater than\"\ncreateToken('LONETILDE', '(?:~>?)')\n\ncreateToken('TILDETRIM', `(\\\\s*)${src[t.LONETILDE]}\\\\s+`, true)\nexports.tildeTrimReplace = '$1~'\n\ncreateToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Caret ranges.\n// Meaning is \"at least and backwards compatible with\"\ncreateToken('LONECARET', '(?:\\\\^)')\n\ncreateToken('CARETTRIM', `(\\\\s*)${src[t.LONECARET]}\\\\s+`, true)\nexports.caretTrimReplace = '$1^'\n\ncreateToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\ncreateToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\\\s*(${src[t.LOOSEPLAIN]})$|^$`)\ncreateToken('COMPARATOR', `^${src[t.GTLT]}\\\\s*(${src[t.FULLPLAIN]})$|^$`)\n\n// An expression to strip any whitespace between the gtlt and the thing\n// it modifies, so that `> 1.2.3` ==> `>1.2.3`\ncreateToken('COMPARATORTRIM', `(\\\\s*)${src[t.GTLT]\n}\\\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true)\nexports.comparatorTrimReplace = '$1$2$3'\n\n// Something like `1.2.3 - 1.2.4`\n// Note that these all use the loose form, because they'll be\n// checked against either the strict or loose comparator form\n// later.\ncreateToken('HYPHENRANGE', `^\\\\s*(${src[t.XRANGEPLAIN]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAIN]})` +\n `\\\\s*$`)\n\ncreateToken('HYPHENRANGELOOSE', `^\\\\s*(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s*$`)\n\n// Star ranges basically just allow anything at all.\ncreateToken('STAR', '(<|>)?=?\\\\s*\\\\*')\n// >=0.0.0 is like a star\ncreateToken('GTE0', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$')\ncreateToken('GTE0PRE', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$')\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","import valid from \"semver/functions/valid.js\";\nimport major from \"semver/functions/major.js\";\nclass ProxyBus {\n bus;\n constructor(bus2) {\n if (typeof bus2.getVersion !== \"function\" || !valid(bus2.getVersion())) {\n console.warn(\"Proxying an event bus with an unknown or invalid version\");\n } else if (major(bus2.getVersion()) !== major(this.getVersion())) {\n console.warn(\n \"Proxying an event bus of version \" + bus2.getVersion() + \" with \" + this.getVersion()\n );\n }\n this.bus = bus2;\n }\n getVersion() {\n return \"3.3.1\";\n }\n subscribe(name, handler) {\n this.bus.subscribe(name, handler);\n }\n unsubscribe(name, handler) {\n this.bus.unsubscribe(name, handler);\n }\n emit(name, event) {\n this.bus.emit(name, event);\n }\n}\nclass SimpleBus {\n handlers = /* @__PURE__ */ new Map();\n getVersion() {\n return \"3.3.1\";\n }\n subscribe(name, handler) {\n this.handlers.set(\n name,\n (this.handlers.get(name) || []).concat(\n handler\n )\n );\n }\n unsubscribe(name, handler) {\n this.handlers.set(\n name,\n (this.handlers.get(name) || []).filter((h) => h !== handler)\n );\n }\n emit(name, event) {\n (this.handlers.get(name) || []).forEach((h) => {\n try {\n h(event);\n } catch (e) {\n console.error(\"could not invoke event listener\", e);\n }\n });\n }\n}\nlet bus = null;\nfunction getBus() {\n if (bus !== null) {\n return bus;\n }\n if (typeof window === \"undefined\") {\n return new Proxy({}, {\n get: () => {\n return () => console.error(\n \"Window not available, EventBus can not be established!\"\n );\n }\n });\n }\n if (window.OC?._eventBus && typeof window._nc_event_bus === \"undefined\") {\n console.warn(\n \"found old event bus instance at OC._eventBus. Update your version!\"\n );\n window._nc_event_bus = window.OC._eventBus;\n }\n if (typeof window?._nc_event_bus !== \"undefined\") {\n bus = new ProxyBus(window._nc_event_bus);\n } else {\n bus = window._nc_event_bus = new SimpleBus();\n }\n return bus;\n}\nfunction subscribe(name, handler) {\n getBus().subscribe(name, handler);\n}\nfunction unsubscribe(name, handler) {\n getBus().unsubscribe(name, handler);\n}\nfunction emit(name, event) {\n getBus().emit(name, event);\n}\nexport {\n ProxyBus,\n SimpleBus,\n emit,\n subscribe,\n unsubscribe\n};\n","import { subscribe } from \"@nextcloud/event-bus\";\nimport { getBuilder } from \"@nextcloud/browser-storage\";\nlet token;\nconst observers = [];\nfunction getRequestToken() {\n if (token === void 0) {\n token = document.head.dataset.requesttoken ?? null;\n }\n return token;\n}\nfunction onRequestTokenUpdate(observer) {\n observers.push(observer);\n}\nsubscribe(\"csrf-token-update\", (e) => {\n token = e.token;\n observers.forEach((observer) => {\n try {\n observer(token);\n } catch (e2) {\n console.error(\"Error updating CSRF token observer\", e2);\n }\n });\n});\nfunction getCSPNonce() {\n const meta = document?.querySelector('meta[name=\"csp-nonce\"]');\n if (!meta) {\n const token2 = getRequestToken();\n return token2 ? btoa(token2) : void 0;\n }\n return meta.nonce;\n}\nconst browserStorage = getBuilder(\"public\").persist().build();\nfunction getGuestNickname() {\n return browserStorage.getItem(\"guestNickname\");\n}\nfunction setGuestNickname(nickname) {\n browserStorage.setItem(\"guestNickname\", nickname);\n}\nlet currentUser;\nconst getAttribute = (el, attribute) => {\n if (el) {\n return el.getAttribute(attribute);\n }\n return null;\n};\nfunction getCurrentUser() {\n if (currentUser !== void 0) {\n return currentUser;\n }\n const head = document?.getElementsByTagName(\"head\")[0];\n if (!head) {\n return null;\n }\n const uid = getAttribute(head, \"data-user\");\n if (uid === null) {\n currentUser = null;\n return currentUser;\n }\n currentUser = {\n uid,\n displayName: getAttribute(head, \"data-user-displayname\"),\n isAdmin: !!window._oc_isadmin\n };\n return currentUser;\n}\nexport {\n getCSPNonce,\n getCurrentUser,\n getGuestNickname,\n getRequestToken,\n onRequestTokenUpdate,\n setGuestNickname\n};\n","import { getCurrentUser } from \"@nextcloud/auth\";\nvar LogLevel = /* @__PURE__ */ ((LogLevel2) => {\n LogLevel2[LogLevel2[\"Debug\"] = 0] = \"Debug\";\n LogLevel2[LogLevel2[\"Info\"] = 1] = \"Info\";\n LogLevel2[LogLevel2[\"Warn\"] = 2] = \"Warn\";\n LogLevel2[LogLevel2[\"Error\"] = 3] = \"Error\";\n LogLevel2[LogLevel2[\"Fatal\"] = 4] = \"Fatal\";\n return LogLevel2;\n})(LogLevel || {});\nvar __defProp$1 = Object.defineProperty;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField$1 = (obj, key, value) => {\n __defNormalProp$1(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\nclass ConsoleLogger {\n constructor(context) {\n __publicField$1(this, \"context\");\n this.context = context || {};\n }\n formatMessage(message, level, context) {\n let msg = \"[\" + LogLevel[level].toUpperCase() + \"] \";\n if (context && context.app) {\n msg += context.app + \": \";\n }\n if (typeof message === \"string\")\n return msg + message;\n msg += \"Unexpected \".concat(message.name);\n if (message.message)\n msg += ' \"'.concat(message.message, '\"');\n if (level === LogLevel.Debug && message.stack)\n msg += \"\\n\\nStack trace:\\n\".concat(message.stack);\n return msg;\n }\n log(level, message, context) {\n var _a, _b;\n if (typeof ((_a = this.context) == null ? void 0 : _a.level) === \"number\" && level < ((_b = this.context) == null ? void 0 : _b.level)) {\n return;\n }\n if (typeof message === \"object\" && (context == null ? void 0 : context.error) === void 0) {\n context.error = message;\n }\n switch (level) {\n case LogLevel.Debug:\n console.debug(this.formatMessage(message, LogLevel.Debug, context), context);\n break;\n case LogLevel.Info:\n console.info(this.formatMessage(message, LogLevel.Info, context), context);\n break;\n case LogLevel.Warn:\n console.warn(this.formatMessage(message, LogLevel.Warn, context), context);\n break;\n case LogLevel.Error:\n console.error(this.formatMessage(message, LogLevel.Error, context), context);\n break;\n case LogLevel.Fatal:\n default:\n console.error(this.formatMessage(message, LogLevel.Fatal, context), context);\n break;\n }\n }\n debug(message, context) {\n this.log(LogLevel.Debug, message, Object.assign({}, this.context, context));\n }\n info(message, context) {\n this.log(LogLevel.Info, message, Object.assign({}, this.context, context));\n }\n warn(message, context) {\n this.log(LogLevel.Warn, message, Object.assign({}, this.context, context));\n }\n error(message, context) {\n this.log(LogLevel.Error, message, Object.assign({}, this.context, context));\n }\n fatal(message, context) {\n this.log(LogLevel.Fatal, message, Object.assign({}, this.context, context));\n }\n}\nfunction buildConsoleLogger(context) {\n return new ConsoleLogger(context);\n}\nvar __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => {\n __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\nclass LoggerBuilder {\n constructor(factory) {\n __publicField(this, \"context\");\n __publicField(this, \"factory\");\n this.context = {};\n this.factory = factory;\n }\n /**\n * Set the app name within the logging context\n *\n * @param appId App name\n */\n setApp(appId) {\n this.context.app = appId;\n return this;\n }\n /**\n * Set the logging level within the logging context\n *\n * @param level Logging level\n */\n setLogLevel(level) {\n this.context.level = level;\n return this;\n }\n /* eslint-disable jsdoc/no-undefined-types */\n /**\n * Set the user id within the logging context\n * @param uid User ID\n * @see {@link detectUser}\n */\n /* eslint-enable jsdoc/no-undefined-types */\n setUid(uid) {\n this.context.uid = uid;\n return this;\n }\n /**\n * Detect the currently logged in user and set the user id within the logging context\n */\n detectUser() {\n const user = getCurrentUser();\n if (user !== null) {\n this.context.uid = user.uid;\n }\n return this;\n }\n /**\n * Detect and use logging level configured in nextcloud config\n */\n detectLogLevel() {\n const self = this;\n const onLoaded = () => {\n var _a, _b;\n if (document.readyState === \"complete\" || document.readyState === \"interactive\") {\n self.context.level = (_b = (_a = window._oc_config) == null ? void 0 : _a.loglevel) != null ? _b : LogLevel.Warn;\n if (window._oc_debug) {\n self.context.level = LogLevel.Debug;\n }\n document.removeEventListener(\"readystatechange\", onLoaded);\n } else {\n document.addEventListener(\"readystatechange\", onLoaded);\n }\n };\n onLoaded();\n return this;\n }\n /** Build a logger using the logging context and factory */\n build() {\n if (this.context.level === void 0) {\n this.detectLogLevel();\n }\n return this.factory(this.context);\n }\n}\nfunction getLoggerBuilder() {\n return new LoggerBuilder(buildConsoleLogger);\n}\nfunction getLogger() {\n return getLoggerBuilder().build();\n}\nexport {\n LogLevel,\n getLogger,\n getLoggerBuilder\n};\n","/**\n * SPDX-FileCopyrightText: 2032 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\n// Set up logger\nconst logger = getLoggerBuilder()\n\t.setApp('Files_PDFViewer')\n\t.detectUser()\n\t.build()\n\nexport default logger\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nexport default function() {\n\t// Not within iframe\n\tif (window.location !== window.parent.location) {\n\t\treturn\n\t}\n\n\twindow.location.href = '/'\n}\n","/**\n * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-FileCopyrightText: 2014-2016 ownCloud, Inc.\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport logger from './services/logger.js'\nimport redirectIfNotIframe from './utils/redirectIfNotIframe.js'\n\n// Checks if the page is displayed in an iframe. If not redirect to /.\nredirectIfNotIframe()\n\n// Retrieve the hideDownload from the url, this is\n// the most easy way to pass the prop to this iframe\nconst queryString = window.location.search\nconst urlParams = new URLSearchParams(queryString)\nconst hideDownload = urlParams.get('hideDownload')\n\nfunction initializeCustomPDFViewerApplication() {\n\tconst head = document.getElementsByTagName('head')[0]\n\n\t// Preferences override options, so they must be disabled for\n\t// \"externalLinkTarget\" to take effect.\n\tPDFViewerApplicationOptions.set('disablePreferences', true)\n\t// TODO https://github.com/mozilla/pdf.js/pull/14424#issuecomment-1092947792\n\tPDFViewerApplicationOptions.set('externalLinkTarget', 2)\n\tPDFViewerApplicationOptions.set('isEvalSupported', false)\n\tPDFViewerApplicationOptions.set('workerSrc', head.getAttribute('data-workersrc'))\n\tPDFViewerApplicationOptions.set('cMapUrl', head.getAttribute('data-cmapurl'))\n\tPDFViewerApplicationOptions.set('sandboxBundleSrc', head.getAttribute('data-sandbox'))\n\tPDFViewerApplicationOptions.set('enablePermissions', true)\n\tPDFViewerApplicationOptions.set('imageResourcesPath', './js/pdfjs/web/images/')\n\tPDFViewerApplicationOptions.set('enableScripting', head.getAttribute('data-enableScripting') === true)\n\n\tif (hideDownload === '1') {\n\t\tconst pdfViewer = window.document.querySelector('.pdfViewer')\n\n\t\tif (pdfViewer) {\n\t\t\tpdfViewer.classList.add('disabledTextSelection')\n\t\t}\n\n\t\tif (PDFViewerApplication) {\n\t\t\t// Disable download function when downloads are hidden, as even if the\n\t\t\t// buttons in the UI are hidden the download could still be triggered\n\t\t\t// with Ctrl|Meta+S.\n\t\t\tPDFViewerApplication.download = function() {\n\t\t\t}\n\n\t\t\t// Disable printing service when downloads are hidden, as even if the\n\t\t\t// buttons in the UI are hidden the printing could still be triggered\n\t\t\t// with Ctrl|Meta+P.\n\t\t\t// Abuse the \"supportsPrinting\" parameter, which signals that the\n\t\t\t// browser does not fully support printing, to make PDFViewer disable\n\t\t\t// the printing service.\n\t\t\t// \"supportsPrinting\" is a getter function, so it needs to be deleted\n\t\t\t// before replacing it with a simple value.\n\t\t\tdelete PDFViewerApplication.supportsPrinting\n\t\t\tPDFViewerApplication.supportsPrinting = false\n\n\t\t\t// When printing is not supported a warning is shown by the default\n\t\t\t// \"beforePrint\" function when trying to print. That function needs to\n\t\t\t// be replaced with an empty one to prevent that warning to be shown.\n\t\t\tPDFViewerApplication.beforePrint = function() {\n\t\t\t}\n\t\t}\n\n\t\tlogger.info('Download, print and user interaction disabled')\n\t} else {\n\t\tlogger.info('Download and print available')\n\t}\n\n\tlogger.debug('Initialized files_pdfviewer', PDFViewerApplicationOptions.getAll())\n}\n\ndocument.addEventListener('DOMContentLoaded', initializeCustomPDFViewerApplication, true)\n"],"names":["exports","appId","_storagebuilder","default","_interopRequireDefault","_scopedstorage","obj","__esModule","clearStorage","storage","pred","Object","keys","filter","k","map","removeItem","bind","_defineProperty","key","value","i","t","r","e","Symbol","toPrimitive","call","TypeError","String","Number","_toPrimitive","defineProperty","enumerable","configurable","writable","ScopedStorage","constructor","scope","wrapped","persistent","this","concat","GLOBAL_SCOPE_PERSISTENT","GLOBAL_SCOPE_VOLATILE","btoa","scopeKey","setItem","getItem","clear","startsWith","persist","arguments","length","undefined","persisted","clearOnLogout","clearedOnLogout","build","window","localStorage","sessionStorage","debug","MAX_LENGTH","MAX_SAFE_INTEGER","safeRe","re","parseOptions","compareIdentifiers","SemVer","version","options","loose","includePrerelease","m","trim","match","LOOSE","FULL","raw","major","minor","patch","prerelease","split","id","test","num","format","join","toString","compare","other","compareMain","comparePre","a","b","compareBuild","inc","release","identifier","identifierBase","base","Error","push","isNaN","module","throwErrors","er","parse","v","MAX_SAFE_COMPONENT_LENGTH","MAX_SAFE_BUILD_LENGTH","RELEASE_TYPES","SEMVER_SPEC_VERSION","FLAG_INCLUDE_PRERELEASE","FLAG_LOOSE","process","env","NODE_DEBUG","args","console","error","numeric","anum","bnum","rcompareIdentifiers","looseOption","freeze","emptyOpts","src","R","LETTERDASHNUMBER","safeRegexReplacements","createToken","name","isGlobal","safe","token","max","makeSafeRegex","index","RegExp","NUMERICIDENTIFIER","NUMERICIDENTIFIERLOOSE","NONNUMERICIDENTIFIER","PRERELEASEIDENTIFIER","PRERELEASEIDENTIFIERLOOSE","BUILDIDENTIFIER","MAINVERSION","PRERELEASE","BUILD","FULLPLAIN","MAINVERSIONLOOSE","PRERELEASELOOSE","LOOSEPLAIN","XRANGEIDENTIFIER","XRANGEIDENTIFIERLOOSE","GTLT","XRANGEPLAIN","XRANGEPLAINLOOSE","COERCEPLAIN","COERCE","COERCEFULL","LONETILDE","tildeTrimReplace","LONECARET","caretTrimReplace","comparatorTrimReplace","cachedSetTimeout","cachedClearTimeout","defaultSetTimout","defaultClearTimeout","runTimeout","fun","setTimeout","clearTimeout","currentQueue","queue","draining","queueIndex","cleanUpNextTick","drainQueue","timeout","len","run","marker","runClearTimeout","Item","array","noop","nextTick","Array","prototype","apply","title","browser","argv","versions","on","addListener","once","off","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","binding","cwd","chdir","dir","umask","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","ProxyBus","bus","bus2","getVersion","valid","warn","subscribe","handler","unsubscribe","event","SimpleBus","handlers","Map","set","get","h","forEach","getBus","Proxy","OC","_eventBus","_nc_event_bus","observers","observer","e2","currentUser","getAttribute","el","attribute","LogLevel","LogLevel2","__defProp$1","__publicField$1","__defNormalProp$1","ConsoleLogger","context","formatMessage","message","level","msg","toUpperCase","app","Debug","stack","log","_a","_b","Info","info","Warn","Fatal","assign","fatal","buildConsoleLogger","__defProp","__publicField","__defNormalProp","LoggerBuilder","factory","setApp","setLogLevel","setUid","uid","detectUser","user","head","document","getElementsByTagName","displayName","isAdmin","_oc_isadmin","getCurrentUser","detectLogLevel","self","onLoaded","readyState","_oc_config","loglevel","_oc_debug","removeEventListener","addEventListener","getLoggerBuilder","location","parent","href","queryString","search","hideDownload","URLSearchParams","PDFViewerApplicationOptions","pdfViewer","querySelector","classList","add","PDFViewerApplication","download","supportsPrinting","beforePrint","logger","getAll"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"files_pdfviewer-workersrc.js?v=408f31cfbcd9e9f41c03","mappings":"yCAOAA,EAAQ,GAQR,SAAoBC,GAClB,OAAO,IAAIC,EAAgBC,QAAQF,EACrC,EATA,IAAIC,EAAkBE,EAAuB,EAAQ,OACjDC,EAAiBD,EAAuB,EAAQ,MACpD,SAASA,EAAuBE,GAAO,OAAOA,GAAOA,EAAIC,WAAaD,EAAM,CAAEH,QAASG,EAAO,CAc9F,SAASE,EAAaC,EAASC,GAC7BC,OAAOC,KAAKH,GAASI,QAAOC,IAAKJ,GAAOA,EAAKI,KAAWC,IAAIN,EAAQO,WAAWC,KAAKR,GACtF,C,2BCpBA,SAASS,EAAgBZ,EAAKa,EAAKC,GACnC,IAAiCC,EA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AqBE,iBAC5BF,qBAAqBE,kBAAmB,EAKxCF,qBAAqBG,YAAc,WACnC,GAGDC,EAAOlD,KAAK,gDACb,MACCkD,EAAOlD,KAAK,gCAGbkD,EAAO/P,MAAM,8BAA+BsP,4BAA4BU,SACzE,IAEoF,E","sources":["webpack:///files_pdfviewer/node_modules/@nextcloud/browser-storage/dist/index.js","webpack:///files_pdfviewer/node_modules/@nextcloud/browser-storage/dist/scopedstorage.js","webpack:///files_pdfviewer/node_modules/@nextcloud/browser-storage/dist/storagebuilder.js","webpack:///files_pdfviewer/node_modules/@nextcloud/event-bus/node_modules/semver/classes/semver.js","webpack:///files_pdfviewer/node_modules/@nextcloud/event-bus/node_modules/semver/functions/major.js","webpack:///files_pdfviewer/node_modules/@nextcloud/event-bus/node_modules/semver/functions/parse.js","webpack:///files_pdfviewer/node_modules/@nextcloud/event-bus/node_modules/semver/functions/valid.js","webpack:///files_pdfviewer/node_modules/@nextcloud/event-bus/node_modules/semver/internal/constants.js","webpack:///files_pdfviewer/node_modules/@nextcloud/event-bus/node_modules/semver/internal/debug.js","webpack:///files_pdfviewer/node_modules/@nextcloud/event-bus/node_modules/semver/internal/identifiers.js","webpack:///files_pdfviewer/node_modules/@nextcloud/event-bus/node_modules/semver/internal/parse-options.js","webpack:///files_pdfviewer/node_modules/@nextcloud/event-bus/node_modules/semver/internal/re.js","webpack:///files_pdfviewer/node_modules/process/browser.js","webpack:///files_pdfviewer/webpack/bootstrap","webpack:///files_pdfviewer/node_modules/@nextcloud/event-bus/dist/index.mjs","webpack:///files_pdfviewer/node_modules/@nextcloud/auth/dist/index.mjs","webpack:///files_pdfviewer/node_modules/@nextcloud/logger/dist/index.mjs","webpack:///files_pdfviewer/src/services/logger.js","webpack:///files_pdfviewer/src/utils/redirectIfNotIframe.js","webpack:///files_pdfviewer/src/workersrc.js"],"sourcesContent":["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.clearAll = clearAll;\nexports.clearNonPersistent = clearNonPersistent;\nexports.getBuilder = getBuilder;\nvar _storagebuilder = _interopRequireDefault(require(\"./storagebuilder\"));\nvar _scopedstorage = _interopRequireDefault(require(\"./scopedstorage\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/**\n * Get the storage builder for an app\n * @param appId App ID to scope storage\n */\nfunction getBuilder(appId) {\n return new _storagebuilder.default(appId);\n}\n\n/**\n * Clear values from storage\n * @param storage The storage to clear\n * @param pred Callback to check if value should be cleared\n */\nfunction clearStorage(storage, pred) {\n Object.keys(storage).filter(k => pred ? pred(k) : true).map(storage.removeItem.bind(storage));\n}\n\n/**\n * Clear all values from all storages\n */\nfunction clearAll() {\n const storages = [window.sessionStorage, window.localStorage];\n storages.map(s => clearStorage(s));\n}\n\n/**\n * Clear ony non persistent values\n */\nfunction clearNonPersistent() {\n const storages = [window.sessionStorage, window.localStorage];\n storages.map(s => clearStorage(s, k => !k.startsWith(_scopedstorage.default.GLOBAL_SCOPE_PERSISTENT)));\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nclass ScopedStorage {\n constructor(scope, wrapped, persistent) {\n _defineProperty(this, \"scope\", void 0);\n _defineProperty(this, \"wrapped\", void 0);\n this.scope = \"\".concat(persistent ? ScopedStorage.GLOBAL_SCOPE_PERSISTENT : ScopedStorage.GLOBAL_SCOPE_VOLATILE, \"_\").concat(btoa(scope), \"_\");\n this.wrapped = wrapped;\n }\n scopeKey(key) {\n return \"\".concat(this.scope).concat(key);\n }\n setItem(key, value) {\n this.wrapped.setItem(this.scopeKey(key), value);\n }\n getItem(key) {\n return this.wrapped.getItem(this.scopeKey(key));\n }\n removeItem(key) {\n this.wrapped.removeItem(this.scopeKey(key));\n }\n clear() {\n Object.keys(this.wrapped).filter(key => key.startsWith(this.scope)).map(this.wrapped.removeItem.bind(this.wrapped));\n }\n}\nexports.default = ScopedStorage;\n_defineProperty(ScopedStorage, \"GLOBAL_SCOPE_VOLATILE\", 'nextcloud_vol');\n_defineProperty(ScopedStorage, \"GLOBAL_SCOPE_PERSISTENT\", 'nextcloud_per');\n//# sourceMappingURL=scopedstorage.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _scopedstorage = _interopRequireDefault(require(\"./scopedstorage\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nclass StorageBuilder {\n constructor(appId) {\n _defineProperty(this, \"appId\", void 0);\n _defineProperty(this, \"persisted\", false);\n _defineProperty(this, \"clearedOnLogout\", false);\n this.appId = appId;\n }\n persist() {\n let persist = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n this.persisted = persist;\n return this;\n }\n clearOnLogout() {\n let clear = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n this.clearedOnLogout = clear;\n return this;\n }\n build() {\n return new _scopedstorage.default(this.appId, this.persisted ? window.localStorage : window.sessionStorage, !this.clearedOnLogout);\n }\n}\nexports.default = StorageBuilder;\n//# sourceMappingURL=storagebuilder.js.map","const debug = require('../internal/debug')\nconst { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants')\nconst { safeRe: re, t } = require('../internal/re')\n\nconst parseOptions = require('../internal/parse-options')\nconst { compareIdentifiers } = require('../internal/identifiers')\nclass SemVer {\n constructor (version, options) {\n options = parseOptions(options)\n\n if (version instanceof SemVer) {\n if (version.loose === !!options.loose &&\n version.includePrerelease === !!options.includePrerelease) {\n return version\n } else {\n version = version.version\n }\n } else if (typeof version !== 'string') {\n throw new TypeError(`Invalid version. Must be a string. Got type \"${typeof version}\".`)\n }\n\n if (version.length > MAX_LENGTH) {\n throw new TypeError(\n `version is longer than ${MAX_LENGTH} characters`\n )\n }\n\n debug('SemVer', version, options)\n this.options = options\n this.loose = !!options.loose\n // this isn't actually relevant for versions, but keep it so that we\n // don't run into trouble passing this.options around.\n this.includePrerelease = !!options.includePrerelease\n\n const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])\n\n if (!m) {\n throw new TypeError(`Invalid Version: ${version}`)\n }\n\n this.raw = version\n\n // these are actually numbers\n this.major = +m[1]\n this.minor = +m[2]\n this.patch = +m[3]\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError('Invalid major version')\n }\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError('Invalid minor version')\n }\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError('Invalid patch version')\n }\n\n // numberify any prerelease numeric ids\n if (!m[4]) {\n this.prerelease = []\n } else {\n this.prerelease = m[4].split('.').map((id) => {\n if (/^[0-9]+$/.test(id)) {\n const num = +id\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num\n }\n }\n return id\n })\n }\n\n this.build = m[5] ? m[5].split('.') : []\n this.format()\n }\n\n format () {\n this.version = `${this.major}.${this.minor}.${this.patch}`\n if (this.prerelease.length) {\n this.version += `-${this.prerelease.join('.')}`\n }\n return this.version\n }\n\n toString () {\n return this.version\n }\n\n compare (other) {\n debug('SemVer.compare', this.version, this.options, other)\n if (!(other instanceof SemVer)) {\n if (typeof other === 'string' && other === this.version) {\n return 0\n }\n other = new SemVer(other, this.options)\n }\n\n if (other.version === this.version) {\n return 0\n }\n\n return this.compareMain(other) || this.comparePre(other)\n }\n\n compareMain (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return (\n compareIdentifiers(this.major, other.major) ||\n compareIdentifiers(this.minor, other.minor) ||\n compareIdentifiers(this.patch, other.patch)\n )\n }\n\n comparePre (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length) {\n return -1\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0\n }\n\n let i = 0\n do {\n const a = this.prerelease[i]\n const b = other.prerelease[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n compareBuild (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n let i = 0\n do {\n const a = this.build[i]\n const b = other.build[i]\n debug('build compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n // preminor will bump the version up to the next minor release, and immediately\n // down to pre-release. premajor and prepatch work the same way.\n inc (release, identifier, identifierBase) {\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor = 0\n this.major++\n this.inc('pre', identifier, identifierBase)\n break\n case 'preminor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor++\n this.inc('pre', identifier, identifierBase)\n break\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0\n this.inc('patch', identifier, identifierBase)\n this.inc('pre', identifier, identifierBase)\n break\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0) {\n this.inc('patch', identifier, identifierBase)\n }\n this.inc('pre', identifier, identifierBase)\n break\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (\n this.minor !== 0 ||\n this.patch !== 0 ||\n this.prerelease.length === 0\n ) {\n this.major++\n }\n this.minor = 0\n this.patch = 0\n this.prerelease = []\n break\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++\n }\n this.patch = 0\n this.prerelease = []\n break\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0) {\n this.patch++\n }\n this.prerelease = []\n break\n // This probably shouldn't be used publicly.\n // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.\n case 'pre': {\n const base = Number(identifierBase) ? 1 : 0\n\n if (!identifier && identifierBase === false) {\n throw new Error('invalid increment argument: identifier is empty')\n }\n\n if (this.prerelease.length === 0) {\n this.prerelease = [base]\n } else {\n let i = this.prerelease.length\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++\n i = -2\n }\n }\n if (i === -1) {\n // didn't increment anything\n if (identifier === this.prerelease.join('.') && identifierBase === false) {\n throw new Error('invalid increment argument: identifier already exists')\n }\n this.prerelease.push(base)\n }\n }\n if (identifier) {\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n let prerelease = [identifier, base]\n if (identifierBase === false) {\n prerelease = [identifier]\n }\n if (compareIdentifiers(this.prerelease[0], identifier) === 0) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = prerelease\n }\n } else {\n this.prerelease = prerelease\n }\n }\n break\n }\n default:\n throw new Error(`invalid increment argument: ${release}`)\n }\n this.raw = this.format()\n if (this.build.length) {\n this.raw += `+${this.build.join('.')}`\n }\n return this\n }\n}\n\nmodule.exports = SemVer\n","const SemVer = require('../classes/semver')\nconst major = (a, loose) => new SemVer(a, loose).major\nmodule.exports = major\n","const SemVer = require('../classes/semver')\nconst parse = (version, options, throwErrors = false) => {\n if (version instanceof SemVer) {\n return version\n }\n try {\n return new SemVer(version, options)\n } catch (er) {\n if (!throwErrors) {\n return null\n }\n throw er\n }\n}\n\nmodule.exports = parse\n","const parse = require('./parse')\nconst valid = (version, options) => {\n const v = parse(version, options)\n return v ? v.version : null\n}\nmodule.exports = valid\n","// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nconst SEMVER_SPEC_VERSION = '2.0.0'\n\nconst MAX_LENGTH = 256\nconst MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||\n/* istanbul ignore next */ 9007199254740991\n\n// Max safe segment length for coercion.\nconst MAX_SAFE_COMPONENT_LENGTH = 16\n\n// Max safe length for a build identifier. The max length minus 6 characters for\n// the shortest version with a build 0.0.0+BUILD.\nconst MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6\n\nconst RELEASE_TYPES = [\n 'major',\n 'premajor',\n 'minor',\n 'preminor',\n 'patch',\n 'prepatch',\n 'prerelease',\n]\n\nmodule.exports = {\n MAX_LENGTH,\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_SAFE_INTEGER,\n RELEASE_TYPES,\n SEMVER_SPEC_VERSION,\n FLAG_INCLUDE_PRERELEASE: 0b001,\n FLAG_LOOSE: 0b010,\n}\n","const debug = (\n typeof process === 'object' &&\n process.env &&\n process.env.NODE_DEBUG &&\n /\\bsemver\\b/i.test(process.env.NODE_DEBUG)\n) ? (...args) => console.error('SEMVER', ...args)\n : () => {}\n\nmodule.exports = debug\n","const numeric = /^[0-9]+$/\nconst compareIdentifiers = (a, b) => {\n const anum = numeric.test(a)\n const bnum = numeric.test(b)\n\n if (anum && bnum) {\n a = +a\n b = +b\n }\n\n return a === b ? 0\n : (anum && !bnum) ? -1\n : (bnum && !anum) ? 1\n : a < b ? -1\n : 1\n}\n\nconst rcompareIdentifiers = (a, b) => compareIdentifiers(b, a)\n\nmodule.exports = {\n compareIdentifiers,\n rcompareIdentifiers,\n}\n","// parse out just the options we care about\nconst looseOption = Object.freeze({ loose: true })\nconst emptyOpts = Object.freeze({ })\nconst parseOptions = options => {\n if (!options) {\n return emptyOpts\n }\n\n if (typeof options !== 'object') {\n return looseOption\n }\n\n return options\n}\nmodule.exports = parseOptions\n","const {\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_LENGTH,\n} = require('./constants')\nconst debug = require('./debug')\nexports = module.exports = {}\n\n// The actual regexps go on exports.re\nconst re = exports.re = []\nconst safeRe = exports.safeRe = []\nconst src = exports.src = []\nconst t = exports.t = {}\nlet R = 0\n\nconst LETTERDASHNUMBER = '[a-zA-Z0-9-]'\n\n// Replace some greedy regex tokens to prevent regex dos issues. These regex are\n// used internally via the safeRe object since all inputs in this library get\n// normalized first to trim and collapse all extra whitespace. The original\n// regexes are exported for userland consumption and lower level usage. A\n// future breaking change could export the safer regex only with a note that\n// all input should have extra whitespace removed.\nconst safeRegexReplacements = [\n ['\\\\s', 1],\n ['\\\\d', MAX_LENGTH],\n [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],\n]\n\nconst makeSafeRegex = (value) => {\n for (const [token, max] of safeRegexReplacements) {\n value = value\n .split(`${token}*`).join(`${token}{0,${max}}`)\n .split(`${token}+`).join(`${token}{1,${max}}`)\n }\n return value\n}\n\nconst createToken = (name, value, isGlobal) => {\n const safe = makeSafeRegex(value)\n const index = R++\n debug(name, index, value)\n t[name] = index\n src[index] = value\n re[index] = new RegExp(value, isGlobal ? 'g' : undefined)\n safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined)\n}\n\n// The following Regular Expressions can be used for tokenizing,\n// validating, and parsing SemVer version strings.\n\n// ## Numeric Identifier\n// A single `0`, or a non-zero digit followed by zero or more digits.\n\ncreateToken('NUMERICIDENTIFIER', '0|[1-9]\\\\d*')\ncreateToken('NUMERICIDENTIFIERLOOSE', '\\\\d+')\n\n// ## Non-numeric Identifier\n// Zero or more digits, followed by a letter or hyphen, and then zero or\n// more letters, digits, or hyphens.\n\ncreateToken('NONNUMERICIDENTIFIER', `\\\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`)\n\n// ## Main Version\n// Three dot-separated numeric identifiers.\n\ncreateToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})`)\n\ncreateToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})`)\n\n// ## Pre-release Version Identifier\n// A numeric identifier, or a non-numeric identifier.\n\ncreateToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER]\n}|${src[t.NONNUMERICIDENTIFIER]})`)\n\ncreateToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE]\n}|${src[t.NONNUMERICIDENTIFIER]})`)\n\n// ## Pre-release Version\n// Hyphen, followed by one or more dot-separated pre-release version\n// identifiers.\n\ncreateToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIER]})*))`)\n\ncreateToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`)\n\n// ## Build Metadata Identifier\n// Any combination of digits, letters, or hyphens.\n\ncreateToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`)\n\n// ## Build Metadata\n// Plus sign, followed by one or more period-separated build metadata\n// identifiers.\n\ncreateToken('BUILD', `(?:\\\\+(${src[t.BUILDIDENTIFIER]\n}(?:\\\\.${src[t.BUILDIDENTIFIER]})*))`)\n\n// ## Full Version String\n// A main version, followed optionally by a pre-release version and\n// build metadata.\n\n// Note that the only major, minor, patch, and pre-release sections of\n// the version string are capturing groups. The build metadata is not a\n// capturing group, because it should not ever be used in version\n// comparison.\n\ncreateToken('FULLPLAIN', `v?${src[t.MAINVERSION]\n}${src[t.PRERELEASE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('FULL', `^${src[t.FULLPLAIN]}$`)\n\n// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n// common in the npm registry.\ncreateToken('LOOSEPLAIN', `[v=\\\\s]*${src[t.MAINVERSIONLOOSE]\n}${src[t.PRERELEASELOOSE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)\n\ncreateToken('GTLT', '((?:<|>)?=?)')\n\n// Something like \"2.*\" or \"1.2.x\".\n// Note that \"x.x\" is a valid xRange identifer, meaning \"any version\"\n// Only the first item is strictly required.\ncreateToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`)\ncreateToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\\\*`)\n\ncreateToken('XRANGEPLAIN', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:${src[t.PRERELEASE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGEPLAINLOOSE', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:${src[t.PRERELEASELOOSE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAIN]}$`)\ncreateToken('XRANGELOOSE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Coercion.\n// Extract anything that could conceivably be a part of a valid semver\ncreateToken('COERCEPLAIN', `${'(^|[^\\\\d])' +\n '(\\\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`)\ncreateToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\\\d])`)\ncreateToken('COERCEFULL', src[t.COERCEPLAIN] +\n `(?:${src[t.PRERELEASE]})?` +\n `(?:${src[t.BUILD]})?` +\n `(?:$|[^\\\\d])`)\ncreateToken('COERCERTL', src[t.COERCE], true)\ncreateToken('COERCERTLFULL', src[t.COERCEFULL], true)\n\n// Tilde ranges.\n// Meaning is \"reasonably at or greater than\"\ncreateToken('LONETILDE', '(?:~>?)')\n\ncreateToken('TILDETRIM', `(\\\\s*)${src[t.LONETILDE]}\\\\s+`, true)\nexports.tildeTrimReplace = '$1~'\n\ncreateToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Caret ranges.\n// Meaning is \"at least and backwards compatible with\"\ncreateToken('LONECARET', '(?:\\\\^)')\n\ncreateToken('CARETTRIM', `(\\\\s*)${src[t.LONECARET]}\\\\s+`, true)\nexports.caretTrimReplace = '$1^'\n\ncreateToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\ncreateToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\\\s*(${src[t.LOOSEPLAIN]})$|^$`)\ncreateToken('COMPARATOR', `^${src[t.GTLT]}\\\\s*(${src[t.FULLPLAIN]})$|^$`)\n\n// An expression to strip any whitespace between the gtlt and the thing\n// it modifies, so that `> 1.2.3` ==> `>1.2.3`\ncreateToken('COMPARATORTRIM', `(\\\\s*)${src[t.GTLT]\n}\\\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true)\nexports.comparatorTrimReplace = '$1$2$3'\n\n// Something like `1.2.3 - 1.2.4`\n// Note that these all use the loose form, because they'll be\n// checked against either the strict or loose comparator form\n// later.\ncreateToken('HYPHENRANGE', `^\\\\s*(${src[t.XRANGEPLAIN]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAIN]})` +\n `\\\\s*$`)\n\ncreateToken('HYPHENRANGELOOSE', `^\\\\s*(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s*$`)\n\n// Star ranges basically just allow anything at all.\ncreateToken('STAR', '(<|>)?=?\\\\s*\\\\*')\n// >=0.0.0 is like a star\ncreateToken('GTE0', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$')\ncreateToken('GTE0PRE', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$')\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","import valid from \"semver/functions/valid.js\";\nimport major from \"semver/functions/major.js\";\nclass ProxyBus {\n bus;\n constructor(bus2) {\n if (typeof bus2.getVersion !== \"function\" || !valid(bus2.getVersion())) {\n console.warn(\"Proxying an event bus with an unknown or invalid version\");\n } else if (major(bus2.getVersion()) !== major(this.getVersion())) {\n console.warn(\n \"Proxying an event bus of version \" + bus2.getVersion() + \" with \" + this.getVersion()\n );\n }\n this.bus = bus2;\n }\n getVersion() {\n return \"3.3.1\";\n }\n subscribe(name, handler) {\n this.bus.subscribe(name, handler);\n }\n unsubscribe(name, handler) {\n this.bus.unsubscribe(name, handler);\n }\n emit(name, event) {\n this.bus.emit(name, event);\n }\n}\nclass SimpleBus {\n handlers = /* @__PURE__ */ new Map();\n getVersion() {\n return \"3.3.1\";\n }\n subscribe(name, handler) {\n this.handlers.set(\n name,\n (this.handlers.get(name) || []).concat(\n handler\n )\n );\n }\n unsubscribe(name, handler) {\n this.handlers.set(\n name,\n (this.handlers.get(name) || []).filter((h) => h !== handler)\n );\n }\n emit(name, event) {\n (this.handlers.get(name) || []).forEach((h) => {\n try {\n h(event);\n } catch (e) {\n console.error(\"could not invoke event listener\", e);\n }\n });\n }\n}\nlet bus = null;\nfunction getBus() {\n if (bus !== null) {\n return bus;\n }\n if (typeof window === \"undefined\") {\n return new Proxy({}, {\n get: () => {\n return () => console.error(\n \"Window not available, EventBus can not be established!\"\n );\n }\n });\n }\n if (window.OC?._eventBus && typeof window._nc_event_bus === \"undefined\") {\n console.warn(\n \"found old event bus instance at OC._eventBus. Update your version!\"\n );\n window._nc_event_bus = window.OC._eventBus;\n }\n if (typeof window?._nc_event_bus !== \"undefined\") {\n bus = new ProxyBus(window._nc_event_bus);\n } else {\n bus = window._nc_event_bus = new SimpleBus();\n }\n return bus;\n}\nfunction subscribe(name, handler) {\n getBus().subscribe(name, handler);\n}\nfunction unsubscribe(name, handler) {\n getBus().unsubscribe(name, handler);\n}\nfunction emit(name, event) {\n getBus().emit(name, event);\n}\nexport {\n ProxyBus,\n SimpleBus,\n emit,\n subscribe,\n unsubscribe\n};\n","import { subscribe } from \"@nextcloud/event-bus\";\nimport { getBuilder } from \"@nextcloud/browser-storage\";\nlet token;\nconst observers = [];\nfunction getRequestToken() {\n if (token === void 0) {\n token = document.head.dataset.requesttoken ?? null;\n }\n return token;\n}\nfunction onRequestTokenUpdate(observer) {\n observers.push(observer);\n}\nsubscribe(\"csrf-token-update\", (e) => {\n token = e.token;\n observers.forEach((observer) => {\n try {\n observer(token);\n } catch (e2) {\n console.error(\"Error updating CSRF token observer\", e2);\n }\n });\n});\nfunction getCSPNonce() {\n const meta = document?.querySelector('meta[name=\"csp-nonce\"]');\n if (!meta) {\n const token2 = getRequestToken();\n return token2 ? btoa(token2) : void 0;\n }\n return meta.nonce;\n}\nconst browserStorage = getBuilder(\"public\").persist().build();\nfunction getGuestNickname() {\n return browserStorage.getItem(\"guestNickname\");\n}\nfunction setGuestNickname(nickname) {\n browserStorage.setItem(\"guestNickname\", nickname);\n}\nlet currentUser;\nconst getAttribute = (el, attribute) => {\n if (el) {\n return el.getAttribute(attribute);\n }\n return null;\n};\nfunction getCurrentUser() {\n if (currentUser !== void 0) {\n return currentUser;\n }\n const head = document?.getElementsByTagName(\"head\")[0];\n if (!head) {\n return null;\n }\n const uid = getAttribute(head, \"data-user\");\n if (uid === null) {\n currentUser = null;\n return currentUser;\n }\n currentUser = {\n uid,\n displayName: getAttribute(head, \"data-user-displayname\"),\n isAdmin: !!window._oc_isadmin\n };\n return currentUser;\n}\nexport {\n getCSPNonce,\n getCurrentUser,\n getGuestNickname,\n getRequestToken,\n onRequestTokenUpdate,\n setGuestNickname\n};\n","import { getCurrentUser } from \"@nextcloud/auth\";\nvar LogLevel = /* @__PURE__ */ ((LogLevel2) => {\n LogLevel2[LogLevel2[\"Debug\"] = 0] = \"Debug\";\n LogLevel2[LogLevel2[\"Info\"] = 1] = \"Info\";\n LogLevel2[LogLevel2[\"Warn\"] = 2] = \"Warn\";\n LogLevel2[LogLevel2[\"Error\"] = 3] = \"Error\";\n LogLevel2[LogLevel2[\"Fatal\"] = 4] = \"Fatal\";\n return LogLevel2;\n})(LogLevel || {});\nvar __defProp$1 = Object.defineProperty;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField$1 = (obj, key, value) => {\n __defNormalProp$1(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\nclass ConsoleLogger {\n constructor(context) {\n __publicField$1(this, \"context\");\n this.context = context || {};\n }\n formatMessage(message, level, context) {\n let msg = \"[\" + LogLevel[level].toUpperCase() + \"] \";\n if (context && context.app) {\n msg += context.app + \": \";\n }\n if (typeof message === \"string\")\n return msg + message;\n msg += \"Unexpected \".concat(message.name);\n if (message.message)\n msg += ' \"'.concat(message.message, '\"');\n if (level === LogLevel.Debug && message.stack)\n msg += \"\\n\\nStack trace:\\n\".concat(message.stack);\n return msg;\n }\n log(level, message, context) {\n var _a, _b;\n if (typeof ((_a = this.context) == null ? void 0 : _a.level) === \"number\" && level < ((_b = this.context) == null ? void 0 : _b.level)) {\n return;\n }\n if (typeof message === \"object\" && (context == null ? void 0 : context.error) === void 0) {\n context.error = message;\n }\n switch (level) {\n case LogLevel.Debug:\n console.debug(this.formatMessage(message, LogLevel.Debug, context), context);\n break;\n case LogLevel.Info:\n console.info(this.formatMessage(message, LogLevel.Info, context), context);\n break;\n case LogLevel.Warn:\n console.warn(this.formatMessage(message, LogLevel.Warn, context), context);\n break;\n case LogLevel.Error:\n console.error(this.formatMessage(message, LogLevel.Error, context), context);\n break;\n case LogLevel.Fatal:\n default:\n console.error(this.formatMessage(message, LogLevel.Fatal, context), context);\n break;\n }\n }\n debug(message, context) {\n this.log(LogLevel.Debug, message, Object.assign({}, this.context, context));\n }\n info(message, context) {\n this.log(LogLevel.Info, message, Object.assign({}, this.context, context));\n }\n warn(message, context) {\n this.log(LogLevel.Warn, message, Object.assign({}, this.context, context));\n }\n error(message, context) {\n this.log(LogLevel.Error, message, Object.assign({}, this.context, context));\n }\n fatal(message, context) {\n this.log(LogLevel.Fatal, message, Object.assign({}, this.context, context));\n }\n}\nfunction buildConsoleLogger(context) {\n return new ConsoleLogger(context);\n}\nvar __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => {\n __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\nclass LoggerBuilder {\n constructor(factory) {\n __publicField(this, \"context\");\n __publicField(this, \"factory\");\n this.context = {};\n this.factory = factory;\n }\n /**\n * Set the app name within the logging context\n *\n * @param appId App name\n */\n setApp(appId) {\n this.context.app = appId;\n return this;\n }\n /**\n * Set the logging level within the logging context\n *\n * @param level Logging level\n */\n setLogLevel(level) {\n this.context.level = level;\n return this;\n }\n /* eslint-disable jsdoc/no-undefined-types */\n /**\n * Set the user id within the logging context\n * @param uid User ID\n * @see {@link detectUser}\n */\n /* eslint-enable jsdoc/no-undefined-types */\n setUid(uid) {\n this.context.uid = uid;\n return this;\n }\n /**\n * Detect the currently logged in user and set the user id within the logging context\n */\n detectUser() {\n const user = getCurrentUser();\n if (user !== null) {\n this.context.uid = user.uid;\n }\n return this;\n }\n /**\n * Detect and use logging level configured in nextcloud config\n */\n detectLogLevel() {\n const self = this;\n const onLoaded = () => {\n var _a, _b;\n if (document.readyState === \"complete\" || document.readyState === \"interactive\") {\n self.context.level = (_b = (_a = window._oc_config) == null ? void 0 : _a.loglevel) != null ? _b : LogLevel.Warn;\n if (window._oc_debug) {\n self.context.level = LogLevel.Debug;\n }\n document.removeEventListener(\"readystatechange\", onLoaded);\n } else {\n document.addEventListener(\"readystatechange\", onLoaded);\n }\n };\n onLoaded();\n return this;\n }\n /** Build a logger using the logging context and factory */\n build() {\n if (this.context.level === void 0) {\n this.detectLogLevel();\n }\n return this.factory(this.context);\n }\n}\nfunction getLoggerBuilder() {\n return new LoggerBuilder(buildConsoleLogger);\n}\nfunction getLogger() {\n return getLoggerBuilder().build();\n}\nexport {\n LogLevel,\n getLogger,\n getLoggerBuilder\n};\n","/**\n * SPDX-FileCopyrightText: 2032 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\n// Set up logger\nconst logger = getLoggerBuilder()\n\t.setApp('Files_PDFViewer')\n\t.detectUser()\n\t.build()\n\nexport default logger\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nexport default function() {\n\t// Not within iframe\n\tif (window.location !== window.parent.location) {\n\t\treturn\n\t}\n\n\twindow.location.href = '/'\n}\n","/**\n * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-FileCopyrightText: 2014-2016 ownCloud, Inc.\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport logger from './services/logger.js'\nimport redirectIfNotIframe from './utils/redirectIfNotIframe.js'\n\n// Checks if the page is displayed in an iframe. If not redirect to /.\nredirectIfNotIframe()\n\n// Retrieve the hideDownload from the url, this is\n// the most easy way to pass the prop to this iframe\nconst queryString = window.location.search\nconst urlParams = new URLSearchParams(queryString)\nconst hideDownload = urlParams.get('hideDownload')\n\nfunction initializeCustomPDFViewerApplication() {\n\tconst head = document.getElementsByTagName('head')[0]\n\n\t// Preferences override options, so they must be disabled for\n\t// \"externalLinkTarget\" to take effect.\n\tPDFViewerApplicationOptions.set('disablePreferences', true)\n\t// TODO https://github.com/mozilla/pdf.js/pull/14424#issuecomment-1092947792\n\tPDFViewerApplicationOptions.set('externalLinkTarget', 2)\n\tPDFViewerApplicationOptions.set('isEvalSupported', false)\n\tPDFViewerApplicationOptions.set('workerSrc', head.getAttribute('data-workersrc'))\n\tPDFViewerApplicationOptions.set('cMapUrl', head.getAttribute('data-cmapurl'))\n\tPDFViewerApplicationOptions.set('sandboxBundleSrc', head.getAttribute('data-sandbox'))\n\tPDFViewerApplicationOptions.set('enablePermissions', true)\n\tPDFViewerApplicationOptions.set('imageResourcesPath', head.getAttribute('data-imageresourcespath'))\n\tPDFViewerApplicationOptions.set('enableScripting', head.getAttribute('data-enableScripting') === true)\n\n\tif (hideDownload === '1') {\n\t\tconst pdfViewer = window.document.querySelector('.pdfViewer')\n\n\t\tif (pdfViewer) {\n\t\t\tpdfViewer.classList.add('disabledTextSelection')\n\t\t}\n\n\t\tif (PDFViewerApplication) {\n\t\t\t// Disable download function when downloads are hidden, as even if the\n\t\t\t// buttons in the UI are hidden the download could still be triggered\n\t\t\t// with Ctrl|Meta+S.\n\t\t\tPDFViewerApplication.download = function() {\n\t\t\t}\n\n\t\t\t// Disable printing service when downloads are hidden, as even if the\n\t\t\t// buttons in the UI are hidden the printing could still be triggered\n\t\t\t// with Ctrl|Meta+P.\n\t\t\t// Abuse the \"supportsPrinting\" parameter, which signals that the\n\t\t\t// browser does not fully support printing, to make PDFViewer disable\n\t\t\t// the printing service.\n\t\t\t// \"supportsPrinting\" is a getter function, so it needs to be deleted\n\t\t\t// before replacing it with a simple value.\n\t\t\tdelete PDFViewerApplication.supportsPrinting\n\t\t\tPDFViewerApplication.supportsPrinting = false\n\n\t\t\t// When printing is not supported a warning is shown by the default\n\t\t\t// \"beforePrint\" function when trying to print. That function needs to\n\t\t\t// be replaced with an empty one to prevent that warning to be shown.\n\t\t\tPDFViewerApplication.beforePrint = function() {\n\t\t\t}\n\t\t}\n\n\t\tlogger.info('Download, print and user interaction disabled')\n\t} else {\n\t\tlogger.info('Download and print available')\n\t}\n\n\tlogger.debug('Initialized files_pdfviewer', PDFViewerApplicationOptions.getAll())\n}\n\ndocument.addEventListener('DOMContentLoaded', initializeCustomPDFViewerApplication, true)\n"],"names":["exports","appId","_storagebuilder","default","_interopRequireDefault","_scopedstorage","obj","__esModule","clearStorage","storage","pred","Object","keys","filter","k","map","removeItem","bind","_defineProperty","key","value","i","t","r","e","Symbol","toPrimitive","call","TypeError","String","Number","_toPrimitive","defineProperty","enumerable","configurable","writable","ScopedStorage","constructor","scope","wrapped","persistent","this","concat","GLOBAL_SCOPE_PERSISTENT","GLOBAL_SCOPE_VOLATILE","btoa","scopeKey","setItem","getItem","clear","startsWith","persist","arguments","length","undefined","persisted","clearOnLogout","clearedOnLogout","build","window","localStorage","sessionStorage","debug","MAX_LENGTH","MAX_SAFE_INTEGER","safeRe","re","parseOptions","compareIdentifiers","SemVer","version","options","loose","includePrerelease","m","trim","match","LOOSE","FULL","raw","major","minor","patch","prerelease","split","id","test","num","format","join","toString","compare","other","compareMain","comparePre","a","b","compareBuild","inc","release","identifier","identifierBase","base","Error","push","isNaN","module","throwErrors","er","parse","v","MAX_SAFE_COMPONENT_LENGTH","MAX_SAFE_BUILD_LENGTH","RELEASE_TYPES","SEMVER_SPEC_VERSION","FLAG_INCLUDE_PRERELEASE","FLAG_LOOSE","process","env","NODE_DEBUG","args","console","error","numeric","anum","bnum","rcompareIdentifiers","looseOption","freeze","emptyOpts","src","R","LETTERDASHNUMBER","safeRegexReplacements","createToken","name","isGlobal","safe","token","max","makeSafeRegex","index","RegExp","NUMERICIDENTIFIER","NUMERICIDENTIFIERLOOSE","NONNUMERICIDENTIFIER","PRERELEASEIDENTIFIER","PRERELEASEIDENTIFIERLOOSE","BUILDIDENTIFIER","MAINVERSION","PRERELEASE","BUILD","FULLPLAIN","MAINVERSIONLOOSE","PRERELEASELOOSE","LOOSEPLAIN","XRANGEIDENTIFIER","XRANGEIDENTIFIERLOOSE","GTLT","XRANGEPLAIN","XRANGEPLAINLOOSE","COERCEPLAIN","COERCE","COERCEFULL","LONETILDE","tildeTrimReplace","LONECARET","caretTrimReplace","comparatorTrimReplace","cachedSetTimeout","cachedClearTimeout","defaultSetTimout","defaultClearTimeout","runTimeout","fun","setTimeout","clearTimeout","currentQueue","queue","draining","queueIndex","cleanUpNextTick","drainQueue","timeout","len","run","marker","runClearTimeout","Item","array","noop","nextTick","Array","prototype","apply","title","browser","argv","versions","on","addListener","once","off","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","binding","cwd","chdir","dir","umask","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","ProxyBus","bus","bus2","getVersion","valid","warn","subscribe","handler","unsubscribe","event","SimpleBus","handlers","Map","set","get","h","forEach","getBus","Proxy","OC","_eventBus","_nc_event_bus","observers","observer","e2","currentUser","getAttribute","el","attribute","LogLevel","LogLevel2","__defProp$1","__publicField$1","__defNormalProp$1","ConsoleLogger","context","formatMessage","message","level","msg","toUpperCase","app","Debug","stack","log","_a","_b","Info","info","Warn","Fatal","assign","fatal","buildConsoleLogger","__defProp","__publicField","__defNormalProp","LoggerBuilder","factory","setApp","setLogLevel","setUid","uid","detectUser","user","head","document","getElementsByTagName","displayName","isAdmin","_oc_isadmin","getCurrentUser","detectLogLevel","self","onLoaded","readyState","_oc_config","loglevel","_oc_debug","removeEventListener","addEventListener","getLoggerBuilder","location","parent","href","queryString","search","hideDownload","URLSearchParams","PDFViewerApplicationOptions","pdfViewer","querySelector","classList","add","PDFViewerApplication","download","supportsPrinting","beforePrint","logger","getAll"],"sourceRoot":""} \ No newline at end of file diff --git a/src/workersrc.js b/src/workersrc.js index b53535b5..4b9e869f 100644 --- a/src/workersrc.js +++ b/src/workersrc.js @@ -29,7 +29,7 @@ function initializeCustomPDFViewerApplication() { PDFViewerApplicationOptions.set('cMapUrl', head.getAttribute('data-cmapurl')) PDFViewerApplicationOptions.set('sandboxBundleSrc', head.getAttribute('data-sandbox')) PDFViewerApplicationOptions.set('enablePermissions', true) - PDFViewerApplicationOptions.set('imageResourcesPath', './js/pdfjs/web/images/') + PDFViewerApplicationOptions.set('imageResourcesPath', head.getAttribute('data-imageresourcespath')) PDFViewerApplicationOptions.set('enableScripting', head.getAttribute('data-enableScripting') === true) if (hideDownload === '1') { diff --git a/templates/viewer.php b/templates/viewer.php index 2259fa8a..dbd3e55c 100644 --- a/templates/viewer.php +++ b/templates/viewer.php @@ -42,7 +42,8 @@ + data-cmapurl="linkTo('files_pdfviewer', 'js/pdfjs/web/cmaps/')) ?>" + data-imageresourcespath="linkTo('files_pdfviewer', 'js/pdfjs/web/images/')) ?>">