!function(e,t){"object"==typeofexports&&"object"==typeofmodule?module.exports=t():"function"==typeofdefine&&define.amd?define([],t):"object"==typeofexports?exports.Tesseract=t():e.Tesseract=t()}(window,function(){returnfunction(e){vart={};functionn(r){if(t[r])returnt[r].exports;varo=t[r]={i:r,l:!1,exports:{}};returne[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}returnn.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeofSymbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)returne;if(4&t&&"object"==typeofe&&e&&e.__esModule)returne;varr=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeofe)for(varoine)n.d(r,o,function(t){returne[t]}.bind(null,o));returnr},n.n=function(e){vart=e&&e.__esModule?function(){returne.default}:function(){returne};returnn.d(t,"a",t),t},n.o=function(e,t){returnObject.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t,n){constr=n(3),o={corePath:`https://cdn.jsdelivr.net/gh/naptha/tesseract.js-core@2.0.0-beta.4/tesseract${"object"==typeofWebAssembly?"":"asm"}.js`,langPath:"https://cdn.jsdelivr.net/gh/naptha/tessdata@gh-pages/3.02/"};{const{version:e}=n(4);o.workerPath=`https://cdn.jsdelivr.net/gh/naptha/tesseract.js@${e}/dist/worker.js`}t.defaultOptions=o,t.spawnWorker=((e,t)=>{letn;if(window.Blob&&window.URL){conste=newBlob([`importScripts("${t.workerPath}");`]);n=newWorker(window.URL.createObjectURL(e))}elsen=newWorker(t.workerPath);returnn.onmessage=(({data:t})=>{e._recv(t)}),n}),t.terminateWorker=(e=>{e.worker.terminate()}),t.sendPacket=((e,t)=>{(e=>r(e)?fetch(e).then(e=>e.buffer()):newPromise)(t.payload.image).then(e=>newUint8Array(e)).then(n=>{e.worker.postMessage({...t,payload:{...t.payload,image:Array.from(n)}})})})},function(e,t,n){constr=n(2),o=n(0),s=n(5),i=n(6);e.exports={TesseractWorker:class{constructor(e={}){this.worker=null,this.workerOptions=Object.assign({},o.defaultOptions,e),this._currentJob=null,this._queue=[]}recognize(e,t={lang:"eng"}){returnthis._delay(n=>{n._send("recognize",{image:e,options:r.string(t)?{lang:t||"eng"}:t,workerOptions:this.workerOptions})})}detect(e,t={}){returnthis._delay(n=>{n._send("detect",{image:e,options:t,workerOptions:this.workerOptions})})}terminate(){this.worker&&o.terminateWorker(this),this.worker=null,this._currentJob=null,this._queue=[]}_delay(e){r.null(this.worker)&&(this.worker=o.spawnWorker(this,this.workerOptions));constt=newi(this);returnthis._queue.push(()=>{this._queue.shift(),this._currentJob=t,e(t)}),r.null(this._currentJob)&&this._dequeue(),t}_dequeue(){this._currentJob=null,this._queue.length&&this._queue[0]()}_recv(e){this._currentJob.id===e.jobId?this._currentJob._handle({...e,data:"resolve"===e.status&&"recognize"===e.action?s(e.data):e.data}):console.warn(`Job ID ${e.jobId} not known.`)}}}},function(e,t,n){varr;!function(o){"use strict";vars,i,u,a,c,f,l,p,h,b,d,y,g;functionm(e){returnnull!=e}functionv(e){return"number"==typeofe&&e>b&&e<d}functionw(e){return"number"==typeofe&&e%1==0}functionj(e,t){returnv(e)&&e>t}function_(e,t){returnv(e)&&e<t}functionk(e,t){returnv(e)&&e>=t}functionO(e,t){returnv(e)&&e<=t}functionE(e){return"string"==typeofe}functionx(e){returnE(e)&&""!==e}functionP(e){return"[object Object]"===Object.prototype.toString.call(e)}functionS(e,t){try{returneinstanceoft}catch(e){return!1}}functionI(e,t){varn;for(nint)if(t.hasOwnProperty(n)){if(!1===e.hasOwnProperty(n)||typeofe[n]!=typeoft[n])return!1;if(P(e[n])&&!1===I(e[n],t[n]))return!1}return!0}functionT(e){returny(e)}functionq(e){returnm(e)&&k(e.length,0)}functionA(e){return"function"==typeofe}functionJ(e,t){varn;for(n=0;n<e.length;n+=1)if(e[n]===t)returnt;return!t}functionN(e,t){varn,r;for(nine)if(e.hasOwnProperty(n)){if(P(r=e[n])&&N(r,t)===t)returnt;if(r===t)returnt}return!t}functionM(e,t){returnObject