File: //data/geometra-4-host-prod/webviewer/core/LocalPdfPartRetriever.chunk.js
/** Notice * This file contains works from many authors under various (but compatible) licenses. Please see legal.txt for more information. **/
(function(){(window.wpCoreControlsBundle=window.wpCoreControlsBundle||[]).push([[9],{345:function(ia,da,h){h.r(da);var ca=h(3);ia=h(34);var aa=h(297),fa=h(185),ea=window;h=function(){function h(h){var n=this;this.TZ=function(f){return f&&("image"===f.type.split("/")[0].toLowerCase()||f.name&&!!f.name.match(/.(jpg|jpeg|png|gif)$/i))};this.file=h;this.b_=new Promise(function(f){return Object(ca.b)(n,void 0,void 0,function(){var n,w;return Object(ca.d)(this,function(e){switch(e.label){case 0:return this.TZ(this.file)?
[4,Object(fa.b)(h)]:[3,2];case 1:n=e.ka(),this.file=new File([n],null===(w=h)||void 0===w?void 0:w.name,{type:h.type}),e.label=2;case 2:return f(!0),[2]}})})})}h.prototype.getFileData=function(x){var n=this,f=new FileReader;f.onload=function(f){n.trigger(h.Events.DOCUMENT_LOADING_PROGRESS,[f.loaded,f.loaded]);x(new Uint8Array(f.target.result))};f.onprogress=function(f){f.lengthComputable&&n.trigger(h.Events.DOCUMENT_LOADING_PROGRESS,[f.loaded,0<f.total?f.total:0])};f.readAsArrayBuffer(this.file)};
h.prototype.getFile=function(){return Object(ca.b)(this,void 0,Promise,function(){return Object(ca.d)(this,function(h){switch(h.label){case 0:return[4,this.b_];case 1:return h.ka(),ea.utils.isJSWorker?[2,this.file.path]:[2,this.file]}})})};h.Events={DOCUMENT_LOADING_PROGRESS:"documentLoadingProgress"};return h}();Object(ia.b)(h);Object(aa.a)(h);Object(aa.b)(h);da["default"]=h}}]);}).call(this || window)