UNPKG

@pdftron/webviewer-html

Version:

This is an addon for WebViewer that allows loading HTML web pages so that they can be annotated.

1 lines 21.5 kB
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.WebViewerHTML=t():e.WebViewerHTML=t()}(self,(()=>(()=>{var e={296:(e,t,n)=>{var o=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,c="object"==typeof self&&self&&self.Object===Object&&self,u=l||c||Function("return this")(),f=Object.prototype.toString,d=Math.max,p=Math.min,h=function(){return u.Date.now()};function b(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==f.call(e)}(e))return NaN;if(b(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=b(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var n=i.test(e);return n||a.test(e)?s(e.slice(2),n?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var o,r,i,a,s,l,c=0,u=!1,f=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=o,i=r;return o=r=void 0,c=t,a=e.apply(i,n)}function g(e){return c=e,s=setTimeout(x,t),u?y(e):a}function w(e){var n=e-l;return void 0===l||n>=t||n<0||f&&e-c>=i}function x(){var e=h();if(w(e))return _(e);s=setTimeout(x,function(e){var n=t-(e-l);return f?p(n,i-(e-c)):n}(e))}function _(e){return s=void 0,v&&o?y(e):(o=r=void 0,a)}function k(){var e=h(),n=w(e);if(o=arguments,r=this,l=e,n){if(void 0===s)return g(l);if(f)return s=setTimeout(x,t),y(l)}return void 0===s&&(s=setTimeout(x,t)),a}return t=m(t)||0,b(n)&&(u=!!n.leading,i=(f="maxWait"in n)?d(m(n.maxWait)||0,t):i,v="trailing"in n?!!n.trailing:v),k.cancel=function(){void 0!==s&&clearTimeout(s),c=0,o=l=r=s=void 0},k.flush=function(){return void 0===s?a:_(h())},k}},465:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return a(t,e),t},l=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((o=o.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,o&&(r=2&s[0]?o.return:s[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,s[1])).done)return r;switch(o=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,o=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){a.label=s[1];break}if(6===s[0]&&a.label<r[1]){a.label=r[1],r=s;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(s);break}r[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],o=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.initializeHTMLViewer=void 0;var f=u(n(296)),d=n(53),p=u(n(253)),h=u(n(601)),b=u(n(142)),m=s(n(686));t.initializeHTMLViewer=function(e,t){return l(void 0,void 0,void 0,(function(){var n,o,i,a,s,u,v;return c(this,(function(y){switch(y.label){case 0:return n=!1,o=t.license,[4,(0,m.default)(o)];case 1:return(i=y.sent())===m.LicenseType.INVALID?a="License key is invalid. WebViewer HTML keys should be in format: xxx@email.com///34:592:33:40...\n \nPlease contact sales@apryse.com to receive the correct key.":i===m.LicenseType.WEBVIEWER&&(a="License key is for WebViewer. Please use a WebViewer HTML license key. WebViewer HTML keys should be in format: xxx@email.com///34:592:33:40...\n \nPlease contact sales@apryse.com to receive the correct key."),a&&e.UI.displayErrorMessage(a),s=function(e){if(!n){n=!0;var o=e.Core,i=o.getVersion(),a=function(e,t){var n=e.Core,o=e.UI,i=n.annotationManager,a=n.Annotations,s=n.documentViewer,u=n.Actions,b=n.Tools,m=o.iframeWindow,v=o.FitMode,y=t,g=["viewControlsButton","leftPanel","leftPanelButton","downloadButton","saveAsButton","printButton","fileAttachmentToolGroupButton","toolbarGroup-Edit"];return function(e){function t(){var t=e.call(this)||this;return t.currentLinkAnnots=[],t._debouncedPostMessage=(0,f.default)((function(e,t){void 0===t&&(t="/"),e&&e.contentWindow&&e.contentWindow.postMessage("loadTextData",t)}),2e3,{leading:!1,trailing:!0}),t}return r(t,e),t.prototype.extractXFDF=function(){},t.prototype.unloadResources=function(){var e=this;o.removeEventListener("toolbarGroupChanged",e._toolbarGroupChangedCallBack),i.removeEventListener("annotationsDrawn.webviewer-html",e._annotationsDrawnCallback),i.removeEventListener("annotationChanged.webviewer-html",e._annotationChangedCallback);var t=m.document.querySelector("#custom-html-styles");t&&t.remove();for(var n=0,r=Object.values(s.getToolModeMap());n<r.length;n++){var a=r[n];a instanceof b.TextHighlightCreateTool&&a.removeEventListener("annotationCreated.webviewer-html")}o.enableElements(g)},t.prototype.loadTextData=function(e,t){void 0===e&&(e=1);var n=this,o=n.pageData.iframeUrl,r=new URL(o).origin;n._debouncedPostMessage(n.iframe,r),t(n.getPage(e).text)},t.prototype.getPageCount=function(){return 1},t.prototype.getLayersArray=function(){return Promise.resolve([])},t.prototype.getBookmarks=function(){return Promise.resolve([])},t.prototype.getDocumentCompletePromise=function(){return l(this,void 0,void 0,(function(){return c(this,(function(e){return[2,this.documentCompletePromise]}))}))},t.prototype._getUpdateLinkAnnotationsCallback=function(e){var t=this;return function(n){var o=n.map((function(t){var n=t.clientRect,o=t.href,r=new a.Link({});return r.PageNumber=e.pageNumber,r.StrokeStyle="solid",r.StrokeThickness=0,r.Author=i.getCurrentUser(),r.Subject="Link",r.X=n.x,r.Y=n.y,r.Width=n.width,r.Height=n.height,r.addAction("U",new u.URI({uri:new URL(o,e.urlToProxy).href})),r}));t.currentLinkAnnots.length&&i.deleteAnnotations(t.currentLinkAnnots),t.currentLinkAnnots=o,i.addAnnotations(o),i.drawAnnotations({pageNumber:e.pageNumber,majorRedraw:!0})}},t.prototype._getUpdateTextDataCallback=function(e){var t=this;return function(o){var r=new n.XODText.SelectionInfo;r.parseFromOld({m_Struct:o.struct,m_Str:o.str,m_Offsets:o.offsets,m_Quads:o.quads,m_Ready:!0}),t.getPage(e.pageNumber).text=r}},t.prototype._getResizeIframeCallback=function(e){var t=this;return function(n,o){var r;if(!(e.iframeHeight<e.height||(null===(r=t.iframe)||void 0===r?void 0:r.height)==="".concat(e.iframeHeight))){n.height="".concat(o),e.auxCanvas&&(e.auxCanvas.width=e.width,e.auxCanvas.height=o);var i=t._createPageInfo(e.width,o);i.contentChanged=!0,t.setPage(i,1),t.forwardEvent({type:"pagesUpdated",data:[i]}),t.maxViewportZoom=t.calculateMaxViewportZoom()}}},t.prototype._getIframeOnMessageCallback=function(e){var t,n=this,r=[],i=new URL(e.iframeUrl).origin,a=n._getUpdateTextDataCallback(e),l=n._getUpdateLinkAnnotationsCallback(e),c=n._getResizeIframeCallback(e);return function(u){if(u.origin===i){var f,d=[];switch("object"==typeof u.data?u.data.type:"unknown"){case"websiteData":f=u.data.selectionData,d=u.data.linkData,e.iframeHeight=u.data.iframeHeight;break;case"proxyFinishFail":o.closeElements(["loadingModal"]),o.displayErrorMessage(u.data.error);break;case"proxyFinishSuccess":o.closeElements(["loadingModal"]),s.trigger("proxyLoaded")}c(n.iframe,e.iframeHeight),f&&JSON.stringify(t)!==JSON.stringify(f)&&(t=f,a(f));var p=d&&JSON.stringify(r)!==JSON.stringify(d);!e.disableLinkAnnotations&&p&&(r=d,l(d))}}},t.prototype.loadAsync=function(e,t){var n=this;n.pageData=e.page;var r=n.pageData,a=r.width,l=r.height,c=r.iframeUrl,u=r.urlToProxy,f=r.disableLinkAnnotations,d=n._createPageInfo(a,l),h=m.document.querySelector("canvas.auxiliary");n.addPage(d);var y={pageNumber:1,urlToProxy:u,auxCanvas:h,width:a,height:l,iframeUrl:c,iframeHeight:l,disableLinkAnnotations:f};m.onmessage=n._getIframeOnMessageCallback(y),n.maxViewportZoom=n.calculateMaxViewportZoom(),s.addEventListener("documentLoaded",(function(){n.documentCompletePromise=Promise.resolve(),setTimeout((function(){o.isElementOpen("loadingModal")&&o.closeElements(["loadingModal"])}),5e3),o.disableElements(g),o.addEventListener("toolbarGroupChanged",n._toolbarGroupChangedCallBack),(0,p.default)(m.document),i.addEventListener("annotationsDrawn.webviewer-html",n._annotationsDrawnCallback),i.addEventListener("annotationChanged.webviewer-html",n._annotationChangedCallback);for(var e=0,t=Object.values(s.getToolModeMap());e<t.length;e++){var r=t[e];r instanceof b.TextHighlightCreateTool&&r.addEventListener("annotationCreated.webviewer-html",(function(e){e.BlendMode=void 0}))}o.getFitMode()!==v.FitWidth&&o.setFitMode(v.FitWidth)}),{once:!0}),t(),s.addEventListener("zoomUpdated",(function(e){n.iframe&&(n.iframe.style.transform="scale(".concat(e,")"))}))},t.prototype.loadCanvasAsync=function(e){var t,n=e.getZoom,r=this,i=r.pageData,a=i.iframeUrl,s=i.width,l=i.height,c=i.scrollable,u=!1;r.iframe?t=r.iframe:(o.isElementOpen("errorModal")||o.openElements(["loadingModal"]),u=!0,(t=document.createElement("iframe")).src="".concat(a),t.className="document-iframe",t.sandbox="allow-scripts allow-forms allow-same-origin allow-pointer-lock allow-presentation allow-popups",t.allow="clipboard-write",t.width="".concat(s),t.height="".concat(l),c||(t.scrolling="no"),r.iframe=t);var f=n();t.style="transform:scale(".concat(f,"); transform-origin: top left;"),u&&m.document.getElementsByClassName("pageSection")[0].appendChild(t)},t.prototype._createPageInfo=function(e,t){var o=new n.XODText.Matrix2D;o.initCoordinates(1,0,0,-1,-0,t);var r=new n.PageInfo(e,t);return r.setFromPageData({width:e,height:t,matrix:o,rotation:0,pageNum:1}),r},t.prototype._annotationsDrawnCallback=function(){return l(this,void 0,void 0,(function(){return c(this,(function(e){switch(e.label){case 0:return"toolbarGroup-View"===o.selectors.getCurrentToolbarGroup()&&(0,d.updatePointerEvents)(m.document,"none"),[4,(0,h.default)(null==y?void 0:y.license)];case 1:return e.sent()||m.document.querySelectorAll("canvas.auxiliary").forEach((function(e){var t=e.getContext("2d");t.save(),t.globalAlpha=.3,t.font="".concat(128,"px Arial"),t.fillStyle="#00A5E4";var n="APRYSE DEMO",o=t.measureText(n).width;t.translate(e.width/2,e.height/2),t.rotate(-Math.atan(e.height/e.width)),t.fillText(n,-o/2,64),t.restore()})),[2]}}))}))},t.prototype._annotationChangedCallback=function(e,t){"add"===t&&e.forEach((function(e){e instanceof a.TextHighlightAnnotation&&(e.BlendMode=void 0)}))},t.prototype._toolbarGroupChangedCallBack=function(e){"toolbarGroup-View"===e.detail?(0,d.updatePointerEvents)(m.document,"none"):(0,d.updatePointerEvents)(m.document,"auto")},t}(n.BaseDocument)}(e,t),s="10.0.0";i.localeCompare(s,void 0,{numeric:!0,sensitivity:"base"})<0&&console.error("WebViewer-HTML requires version ".concat(s," or greater")),(0,b.default)(),o.HTMLDocument=a,o.Document.registerDocumentType("html",o.HTMLDocument)}},e&&s(e),u=function(){if(!e)throw new Error('WebViewer instance has not been set. Please pass instance into "initializeHTMLViewer", or call "setInstance"');return e},v=function(e){var t=e.iframeUrl,n=e.width,o=e.height,r=e.urlToProxy,i=e.scrollable,a=e.disableLinkAnnotations,s=u().Core,l=s.documentViewer,c=s.HTMLDocument;l.loadDocument(c,{customDocParams:{page:{iframeUrl:t,width:Number(n),height:Number(o),urlToProxy:r,scrollable:i,disableLinkAnnotations:a}},extension:"html",type:"html"})},[2,{loadHTMLPage:v,setInstance:s}]}}))}))}},253:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.createElement("style");t.id="custom-html-styles",t.innerHTML="\n .pageContainer {\n background-color: transparent !important;\n border: none !important;\n box-shadow: none !important;\n }\n\n .document-iframe {\n border: none;\n position: absolute; \n top: 0px; \n left: 0px;\n }\n ",e.getElementsByTagName("head")[0].appendChild(t)}},601:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((o=o.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,o&&(r=2&s[0]?o.return:s[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,s[1])).done)return r;switch(o=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,o=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){a.label=s[1];break}if(6===s[0]&&a.label<r[1]){a.label=r[1],r=s;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(s);break}r[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],o=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}};function r(e,t,r){return n(this,void 0,void 0,(function(){var n,i,a,s,l;return o(this,(function(o){switch(o.label){case 0:return n=t.split(":").map((function(e){return+e})),i=new Uint8Array(n).buffer,[4,(a=window.crypto||window.msCrypto).subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["verify"])];case 1:return s=o.sent(),l=(new TextEncoder).encode(r),[4,a.subtle.verify({name:"RSASSA-PKCS1-v1_5"},s,i,l)];case 2:return[2,o.sent()]}}))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return void 0===e&&(e=""),n(this,void 0,void 0,(function(){var t,n,i,a;return o(this,(function(o){return t=e.replace(/\s+/g,""),n=t.split("///"),i=n[0],a=n[1],RegExp(/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/).test(i)?[2,r(JSON.parse('{"alg":"RS256","e":"AQAB","ext":true,"key_ops":["verify"],"kty":"RSA","n":"tYFfXUdk_ue3hNadbd4yc653UlazFC_BPTHyvIne5q6-8foHTRUNgFd0RlyrpaqchNCvvIowAElWjJ6d09RtRHZn-fHIUqfSdyVpoPYw0e9NXZcWMdy3E-BizucH8eXTq5PIyJhSj18F2tBwSpHkBQDhmDwYWZJGugbccG9X39c"}'),a,i)]:[2]}))}))}},686:function(e,t,n){"use strict";var o=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((o=o.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,o&&(r=2&s[0]?o.return:s[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,s[1])).done)return r;switch(o=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,o=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){a.label=s[1];break}if(6===s[0]&&a.label<r[1]){a.label=r[1],r=s;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(s);break}r[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],o=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.LicenseType=void 0;var a,s=i(n(601)),l=/(ENTERP|ENTCPU|WEBCPU|OEM|PWS):/;!function(e){e.INVALID="Invalid",e.HTML="HTML",e.WEBVIEWER="WebViewer"}(a=t.LicenseType||(t.LicenseType={})),t.default=function(e){return o(void 0,void 0,void 0,(function(){var t;return r(this,(function(n){switch(n.label){case 0:return l.test(e)?[2,a.WEBVIEWER]:[4,(0,s.default)(e)];case 1:return t=n.sent(),!(null==e?void 0:e.length)||"---- Insert commercial license key here after purchase ----"===e||t?[2,a.HTML]:[2,a.INVALID]}}))}))}},142:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(147));t.default=function(){window.document.documentMode&&console.warn("WebViewer HTML: IE not supported");var e=r.default.version;if(e)if(console.table){var t={"WebViewer HTML version":e};console.table(t)}else console.log("WebViewer HTML version: ".concat(e))}},53:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updatePointerEvents=void 0,t.updatePointerEvents=function(e,t){var n,o;null===(n=e.querySelectorAll("canvas.auxiliary"))||void 0===n||n.forEach((function(e){e.style.pointerEvents=t})),null===(o=e.querySelectorAll('[id*="pageWidgetContainer1"]'))||void 0===o||o.forEach((function(e){e.style.pointerEvents=t}))}},147:e=>{"use strict";e.exports=JSON.parse('{"name":"@pdftron/webviewer-html","description":"This is an addon for WebViewer that allows loading HTML web pages so that they can be annotated.","version":"5.0.1","main":"dist/main.js","files":["dist/main.js","doc/*","types/*"],"types":"types/index.d.ts","scripts":{"test":"echo \\"Error: no test specified\\" && exit 1","build-doc":"rm -rf doc && ./node_modules/.bin/jsdoc -c jsdocconfig.json -t ./node_modules/ink-docstrap/template -R README.md","build":"webpack --mode=production --config webpack.config.js","watch-debug":"webpack --watch --mode=development --config webpack.config.js","lint":"eslint ./src --fix --ext .js,.jsx,.ts,.tsx","lint:ci":"eslint ./src --quiet --ext .js,.jsx,.ts,.tsx","release-patch":"npm version patch && npm publish --access public","release-minor":"npm version minor && npm publish --access public","release-major":"npm version major && npm publish --access public","prepublishOnly":"npm run build && npm run build-doc","postpublish":"git push"},"keywords":["mark up web page","annotate web page","annotate a website","html annotations","html annotating","webviewer"],"devDependencies":{"@babel/core":"^7.19.6","@babel/eslint-parser":"^7.17.0","@babel/plugin-transform-runtime":"^7.10.1","@babel/preset-env":"^7.10.2","@babel/preset-typescript":"^7.16.7","@pdftron/webviewer":"^10.0.0","@typescript-eslint/eslint-plugin":"^2.20.0","@typescript-eslint/parser":"^2.15.0","babel-eslint":"^8.2.6","babel-loader":"^9.0.0","eslint":"^5.16.0","eslint-config-airbnb-base":"^13.1.0","eslint-import-resolver-alias":"^1.1.2","eslint-import-resolver-typescript":"^3.5.2","eslint-plugin-import":"^2.26.0","eslint-plugin-typescript":"^0.14.0","ink-docstrap":"^1.3.2","jsdoc":"^3.6.4","jsdoc-babel":"^0.5.0","ts-loader":"^9.1.2","webpack":"^5.37.0","webpack-cli":"^4.10.0"},"peerDependencies":{},"repository":{"type":"git","url":""},"author":"PDFTron Systems Inc.","dependencies":{"lodash.debounce":"^4.0.8","tsconfig-paths":"^4.1.0","typescript":"^4.2.4"}}')}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o].call(i.exports,i,i.exports,n),i.exports}return n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n(465)})()));