import{f as e}from"./classPrivateFieldGet2.BUYx_jfD.js";var t=e(((e,t)=>{(function(e,n){typeof define==`function`&&define.amd?define([],n):typeof t==`object`&&t.exports?t.exports=n():e.PDFObject=n()})(e,function(){if(typeof window>`u`||window.navigator===void 0||window.navigator.userAgent===void 0)return!1;let e=window,t=e.navigator,n=t.userAgent,r=!1,i=function(){let r=e.chrome!==void 0,i=e.safari!==void 0||t.vendor!==void 0&&/Apple/.test(t.vendor)&&/Safari/.test(n),a=e.Mozilla!==void 0||/irefox/.test(n);return r||i||a},a=function(e){var t=null;try{t=new ActiveXObject(e)}catch{t=null}return!!t},o=function(){return`ActiveXObject`in e&&(a(`AcroPDF.PDF`)||a(`PDF.PdfCtrl`))},s=function(){if(t.platform!==void 0&&t.platform===`MacIntel`&&t.maxTouchPoints!==void 0&&t.maxTouchPoints>1||/Mobi|Tablet|Android|iPad|iPhone/.test(n))return!1;let e=typeof t.pdfViewerEnabled==`boolean`;return e&&!t.pdfViewerEnabled?!1:e&&t.pdfViewerEnabled||i()||o()}(),c=function(e){let t=``,n,r=[],i=``;if((e.comment||e.viewrect||e.highlight)&&(e.page||(e.page=1,l(`The comment, viewrect, and highlight parameters require a page parameter, but none was specified. Defaulting to page 1.`))),e.page&&(r.push(`page=`+encodeURIComponent(e.page)),delete e.page),e.fdf&&(i=e.fdf,delete e.fdf),e){for(n in e)e.hasOwnProperty(n)&&r.push(encodeURIComponent(n)+`=`+encodeURIComponent(e[n]));i&&r.push(`fdf=`+encodeURIComponent(i)),t=r.join(`&`),t&&(t=`#`+t)}return t},l=function(e){return r||console.log(`[PDFObject]`,e),!1},u=function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},d=function(t){let n=document.body;return typeof t==`string`?n=document.querySelector(t):e.jQuery!==void 0&&t instanceof jQuery&&t.length?n=t.get(0):t.nodeType!==void 0&&t.nodeType===1&&(n=t),n},f=function(e,t,n,r){if(window.Blob&&window.URL&&window.URL.createObjectURL){var i=new XMLHttpRequest;i.open(`GET`,e,!0),i.responseType=`blob`,i.onload=function(){if(i.status===200){var e=i.response,a=document.createElement(`a`);a.innerText=`Download PDF`,a.href=URL.createObjectURL(e),a.setAttribute(`download`,t),n.innerHTML=r.replace(/\[pdflink\]/g,a.outerHTML)}},i.send()}},p=function(e,t,n,r,i,a,o,s,c,l,d){u(t);let f=n;e===`pdfjs`?f=d+(d.indexOf(`?`)===-1?`?`:`&`)+`file=`+encodeURIComponent(n)+r:f+=r;let p=document.createElement(`iframe`);if(p.className=`pdfobject`,p.type=`application/pdf`,p.title=s,p.src=f,p.allow=`fullscreen`,p.frameborder=`0`,o&&(p.id=o),!c){let e=`border: none;`;t===document.body?e+=`position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%;`:e+=`width: `+i+`; height: `+a+`;`,p.style.cssText=e}return l&&l.key&&[`className`,`type`,`title`,`src`,`style`,`id`,`allow`,`frameborder`].indexOf(l.key)===-1&&p.setAttribute(l.key,l.value===void 0?``:l.value),t.classList.add(`pdfobject-container`),t.appendChild(p),t.getElementsByTagName(`iframe`)[0]},m=function(e,t,n){let i=t||!1,a=n||{};r=typeof a.suppressConsole==`boolean`?a.suppressConsole:!1;let o=typeof a.id==`string`?a.id:``,u=a.page||!1,m=a.pdfOpenParams||{},h=typeof a.fallbackLink==`string`||typeof a.fallbackLink==`boolean`?a.fallbackLink:!0,g=a.width||`100%`,_=a.height||`100%`,v=a.title||`Embedded PDF`,y=typeof a.forcePDFJS==`boolean`?a.forcePDFJS:!1,b=typeof a.omitInlineStyles==`boolean`?a.omitInlineStyles:!1,x=a.PDFJS_URL||!1,S=d(i),C=``,w=a.customAttribute||{},T=a.fallbackFileNameForBase64,E=`<p>This browser does not support inline PDFs. Please download the PDF to view it: [pdflink]</p>`;if(typeof e!=`string`)return l(`URL is not valid`);if(!S)return l(`Target element cannot be determined`);if(u&&(m.page=u),C=c(m),y&&x)return p(`pdfjs`,S,e,C,g,_,o,v,b,w,x);if(s)return p(`iframe`,S,e,C,g,_,o,v,b,w);if(x)return p(`pdfjs`,S,e,C,g,_,o,v,b,w,x);if(h)if(typeof h==`string`)S.innerHTML=h.replace(/\[url\]/g,e);else{let t=e.match(/data:application\/pdf;(?:.*filename=([^;]+);)?.*base64,/i);if(t)T=T||t[1]||`file.pdf`,f(e,T,S,E);else{let t=`<a href='`+e+`'>Download PDF</a>`;S.innerHTML=E.replace(/\[pdflink\]/g,t)}}return l(`This browser does not support embedded PDFs`)};return{embed:function(e,t,n){return m(e,t,n)},pdfobjectversion:(function(){return`2.3.1`})(),supportsPDFs:(function(){return s})()}})}));export default t();
//# sourceMappingURL=pdfobject.Dr4yjhfI.js.map