text: ﻿(()=>{var e={303:(e,t,r)=>{e.exports=r(302),r(200),r(630),r(16),r(677),r(635),r(166),r(140),r(922)},635:(e,t,r)=>{var n,o,i;!function(a){"use strict";o=[r(302),r(677)],void 0===(i="function"==typeof(n=function(e){var t=e.ExifMap.prototype;t.tags={256:"ImageWidth",257:"ImageHeight",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",274:"Orientation",277:"SamplesPerPixel",284:"PlanarConfiguration",530:"YCbCrSubSampling",531:"YCbCrPositioning",282:"XResolution",283:"YResolution",296:"ResolutionUnit",273:"StripOffsets",278:"RowsPerStrip",279:"StripByteCounts",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",301:"TransferFunction",318:"WhitePoint",319:"PrimaryChromaticities",529:"YCbCrCoefficients",532:"ReferenceBlackWhite",306:"DateTime",270:"ImageDescription",271:"Make",272:"Model",305:"Software",315:"Artist",33432:"Copyright",34665:{36864:"ExifVersion",40960:"FlashpixVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",42240:"Gamma",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",37500:"MakerNote",37510:"UserComment",40964:"RelatedSoundFile",36867:"DateTimeOriginal",36868:"DateTimeDigitized",37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",33434:"ExposureTime",33437:"FNumber",34850:"ExposureProgram",34852:"SpectralSensitivity",34855:"PhotographicSensitivity",34856:"OECF",34864:"SensitivityType",34865:"StandardOutputSensitivity",34866:"RecommendedExposureIndex",34867:"ISOSpeed",34868:"ISOSpeedLatitudeyyy",34869:"ISOSpeedLatitudezzz",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureBias",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37396:"SubjectArea",37386:"FocalLength",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41492:"SubjectLocation",41493:"ExposureIndex",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",41985:"CustomRendered",41986:"ExposureMode",41987:"WhiteBalance",41988:"DigitalZoomRatio",41989:"FocalLengthIn35mmFilm",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",42016:"ImageUniqueID",42032:"CameraOwnerName",42033:"BodySerialNumber",42034:"LensSpecification",42035:"LensMake",42036:"LensModel",42037:"LensSerialNumber"},34853:{0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential",31:"GPSHPositioningError"},40965:{1:"InteroperabilityIndex"}},t.stringValues={ExposureProgram:{0:"Undefined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},SensingMethod:{1:"Undefined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},SceneType:{1:"Directly photographed"},CustomRendered:{0:"Normal process",1:"Custom process"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},GainControl:{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},SubjectDistanceRange:{0:"Unknown",1:"Macro",2:"Close view",3:"Distant view"},FileSource:{3:"DSC"},ComponentsConfiguration:{0:"",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"},Orientation:{1:"top-left",2:"top-right",3:"bottom-right",4:"bottom-left",5:"left-top",6:"right-top",7:"right-bottom",8:"left-bottom"}},t.getText=function(e){var t=this.get(e);switch(e){case"LightSource":case"Flash":case"MeteringMode":case"ExposureProgram":case"SensingMethod":case"SceneCaptureType":case"SceneType":case"CustomRendered":case"WhiteBalance":case"GainControl":case"Contrast":case"Saturation":case"Sharpness":case"SubjectDistanceRange":case"FileSource":case"Orientation":return this.stringValues[e][t];case"ExifVersion":case"FlashpixVersion":if(!t)return;return String.fromCharCode(t[0],t[1],t[2],t[3]);case"ComponentsConfiguration":if(!t)return;return this.stringValues[e][t[0]]+this.stringValues[e][t[1]]+this.stringValues[e][t[2]]+this.stringValues[e][t[3]];case"GPSVersionID":if(!t)return;return t[0]+"."+t[1]+"."+t[2]+"."+t[3]}return String(t)},t.getAll=function(){var e,t,r,n={};for(e in this)Object.prototype.hasOwnProperty.call(this,e)&&((t=this[e])&&t.getAll?n[this.privateIFDs[e].name]=t.getAll():(r=this.tags[e])&&(n[r]=this.getText(r)));return n},t.getName=function(e){var t=this.tags[e];return"object"==typeof t?this.privateIFDs[e].name:t},function(){var e,r,n,o=t.tags;for(e in o)if(Object.prototype.hasOwnProperty.call(o,e))if(r=t.privateIFDs[e])for(e in n=o[e])Object.prototype.hasOwnProperty.call(n,e)&&(r.map[n[e]]=Number(e));else t.map[o[e]]=Number(e)}()})?n.apply(t,o):n)||(e.exports=i)}()},677:(e,t,r)=>{var n,o,i;!function(a){"use strict";o=[r(302),r(630)],void 0===(i="function"==typeof(n=function(e){function t(e){e&&(Object.defineProperty(this,"map",{value:this.privateIFDs[e].map}),Object.defineProperty(this,"tags",{value:this.tags&&this.tags[e]||{}}))}t.prototype.map={Orientation:274,Thumbnail:513,Exif:34665,GPSInfo:34853,Interoperability:40965},t.prototype.privateIFDs={34665:{name:"Exif",map:{}},34853:{name:"GPSInfo",map:{}},40965:{name:"Interoperability",map:{}}},t.prototype.get=function(e){return this[e]||this[this.map[e]]};var r={1:{getValue:function(e,t){return e.getUint8(t)},size:1},2:{getValue:function(e,t){return String.fromCharCode(e.getUint8(t))},size:1,ascii:!0},3:{getValue:function(e,t,r){return e.getUint16(t,r)},size:2},4:{getValue:function(e,t,r){return e.getUint32(t,r)},size:4},5:{getValue:function(e,t,r){return e.getUint32(t,r)/e.getUint32(t+4,r)},size:8},9:{getValue:function(e,t,r){return e.getInt32(t,r)},size:4},10:{getValue:function(e,t,r){return e.getInt32(t,r)/e.getInt32(t+4,r)},size:8}};function n(e,t,n,o,i,a){var s,c,l,u,d,f,p=r[o];if(p){if(!((c=(s=p.size*i)>4?t+e.getUint32(n+8,a):n+8)+s>e.byteLength)){if(1===i)return p.getValue(e,c,a);for(l=[],u=0;u<i;u+=1)l[u]=p.getValue(e,c+u*p.size,a);if(p.ascii){for(d="",u=0;u<l.length&&"\0"!==(f=l[u]);u+=1)d+=f;return d}return l}console.log("Invalid Exif data: Invalid data offset.")}else console.log("Invalid Exif data: Invalid tag type.")}function o(e,t,r,o,i,a,s,c){var l,u,d,f,p,h;if(r+6>e.byteLength)console.log("Invalid Exif data: Invalid directory offset.");else{if(!((u=r+2+12*(l=e.getUint16(r,o)))+4>e.byteLength)){for(d=0;d<l;d+=1)f=r+2+12*d,p=e.getUint16(f,o),s&&!s[p]||c&&!0===c[p]||(h=n(e,t,f,e.getUint16(f+2,o),e.getUint32(f+4,o),o),i[p]=h,a&&(a[p]=f));return e.getUint32(u,o)}console.log("Invalid Exif data: Invalid directory size.")}}r[7]=r[1],e.parseExifData=function(e,r,n,i,a){if(!a.disableExif){var s,c,l=a.includeExifTags,u=a.excludeExifTags||{34665:{37500:!0}},d=r+10;if(1165519206===e.getUint32(r+4))if(d+8>e.byteLength)console.log("Invalid Exif data: Invalid segment size.");else if(0===e.getUint16(r+8)){switch(e.getUint16(d)){case 18761:s=!0;break;case 19789:s=!1;break;default:return void console.log("Invalid Exif data: Invalid byte alignment marker.")}42===e.getUint16(d+2,s)?(c=e.getUint32(d+4,s),i.exif=new t,a.disableExifOffsets||(i.exifOffsets=new t,i.exifTiffOffset=d,i.exifLittleEndian=s),(c=o(e,d,d+c,s,i.exif,i.exifOffsets,l,u))&&!a.disableExifThumbnail&&(c=o(e,d,d+c,s,i.exif,i.exifOffsets,l,u),i.exif[513]&&i.exif[514]&&(i.exif[513]=function(e,t,r){if(r&&!(t+r>e.byteLength))return new Blob([e.buffer.slice(t,t+r)],{type:"image/jpeg"});console.log("Invalid Exif data: Invalid thumbnail data.")}(e,d+i.exif[513],i.exif[514]))),Object.keys(i.exif.privateIFDs).forEach((function(r){!function(e,r,n,i,a,s,c){var l=e.exif[r];l&&(e.exif[r]=new t(r),e.exifOffsets&&(e.exifOffsets[r]=new t(r)),o(n,i,i+l,a,e.exif[r],e.exifOffsets&&e.exifOffsets[r],s&&s[r],c&&c[r]))}(i,r,e,d,s,l,u)}))):console.log("Invalid Exif data: Missing TIFF marker.")}else console.log("Invalid Exif data: Missing byte alignment offset.")}},e.metaDataParsers.jpeg[65505].push(e.parseExifData),e.exifWriters={274:function(e,t,r){return new DataView(e,t.exifOffsets[274]+8,2).setUint16(0,r,t.exifLittleEndian),e}},e.writeExifData=function(t,r,n,o){e.exifWriters[r.exif.map[n]](t,r,o)},e.ExifMap=t})?n.apply(t,o):n)||(e.exports=i)}()},16:(e,t,r)=>{var n,o,i;!function(a){"use strict";o=[r(302)],void 0===(i="function"==typeof(n=function(e){"undefined"!=typeof fetch&&"undefined"!=typeof Request?e.fetchBlob=function(e,t,r){fetch(new Request(e,r)).then((function(e){return e.blob()})).then(t).catch((function(e){t(null,e)}))}:"undefined"!=typeof XMLHttpRequest&&"undefined"!=typeof ProgressEvent&&(e.fetchBlob=function(e,t,r){r=r||{};var n=new XMLHttpRequest;n.open(r.method||"GET",e),r.headers&&Object.keys(r.headers).forEach((function(e){n.setRequestHeader(e,r.headers[e])})),n.withCredentials="include"===r.credentials,n.responseType="blob",n.onload=function(){t(n.response)},n.onerror=n.onabort=n.ontimeout=function(e){t(null,e)},n.send(r.body)})})?n.apply(t,o):n)||(e.exports=i)}()},140:(e,t,r)=>{var n,o,i;!function(a){"use strict";o=[r(302),r(166)],void 0===(i="function"==typeof(n=function(e){var t=e.IptcMap.prototype;t.tags={0:"ApplicationRecordVersion",3:"ObjectTypeReference",4:"ObjectAttributeReference",5:"ObjectName",7:"EditStatus",8:"EditorialUpdate",10:"Urgency",12:"SubjectReference",15:"Category",20:"SupplementalCategories",22:"FixtureIdentifier",25:"Keywords",26:"ContentLocationCode",27:"ContentLocationName",30:"ReleaseDate",35:"ReleaseTime",37:"ExpirationDate",38:"ExpirationTime",40:"SpecialInstructions",42:"ActionAdvised",45:"ReferenceService",47:"ReferenceDate",50:"ReferenceNumber",55:"DateCreated",60:"TimeCreated",62:"DigitalCreationDate",63:"DigitalCreationTime",65:"OriginatingProgram",70:"ProgramVersion",75:"ObjectCycle",80:"Byline",85:"BylineTitle",90:"City",92:"Sublocation",95:"State",100:"CountryCode",101:"Country",103:"OriginalTransmissionReference",105:"Headline",110:"Credit",115:"Source",116:"CopyrightNotice",118:"Contact",120:"Caption",121:"LocalCaption",122:"Writer",125:"RasterizedCaption",130:"ImageType",131:"ImageOrientation",135:"LanguageIdentifier",150:"AudioType",151:"AudioSamplingRate",152:"AudioSamplingResolution",153:"AudioDuration",154:"AudioOutcue",184:"JobID",185:"MasterDocumentID",186:"ShortDocumentID",187:"UniqueDocumentID",188:"OwnerID",200:"ObjectPreviewFileFormat",201:"ObjectPreviewFileVersion",202:"ObjectPreviewData",221:"Prefs",225:"ClassifyState",228:"SimilarityIndex",230:"DocumentNotes",231:"DocumentHistory",232:"ExifCameraInfo",255:"CatalogSets"},t.stringValues={10:{0:"0 (reserved)",1:"1 (most urgent)",2:"2",3:"3",4:"4",5:"5 (normal urgency)",6:"6",7:"7",8:"8 (least urgent)",9:"9 (user-defined priority)"},75:{a:"Morning",b:"Both Morning and Evening",p:"Evening"},131:{L:"Landscape",P:"Portrait",S:"Square"}},t.getText=function(e){var t=this.get(e),r=this.map[e],n=this.stringValues[r];return n?n[t]:String(t)},t.getAll=function(){var e,t,r={};for(e in this)Object.prototype.hasOwnProperty.call(this,e)&&(t=this.tags[e])&&(r[t]=this.getText(t));return r},t.getName=function(e){return this.tags[e]},function(){var e,r=t.tags,n=t.map||{};for(e in r)Object.prototype.hasOwnProperty.call(r,e)&&(n[r[e]]=Number(e))}()})?n.apply(t,o):n)||(e.exports=i)}()},166:(e,t,r)=>{var n,o,i;!function(a){"use strict";o=[r(302),r(630)],void 0===(i="function"==typeof(n=function(e){function t(){}function r(e,t,r,n,o){return"binary"===t.types[e]?new Blob([r.buffer.slice(n,n+o)]):"Uint16"===t.types[e]?r.getUint16(n):function(e,t,r){for(var n="",o=t+r,i=t;i<o;i+=1)n+=String.fromCharCode(e.getUint8(i));return n}(r,n,o)}function n(e,t){return void 0===e?t:e instanceof Array?(e.push(t),e):[e,t]}function o(e,t,o,i,a,s){for(var c,l,u,d=t+o,f=t;f<d;)28===e.getUint8(f)&&2===e.getUint8(f+1)&&(u=e.getUint8(f+2),a&&!a[u]||s&&s[u]||(l=e.getInt16(f+3),c=r(u,i.iptc,e,f+5,l),i.iptc[u]=n(i.iptc[u],c),i.iptcOffsets&&(i.iptcOffsets[u]=f))),f+=1}function i(e,t){return 943868237===e.getUint32(t)&&1028===e.getUint16(t+4)}function a(e,t){var r=e.getUint8(t+7);return r%2!=0&&(r+=1),0===r&&(r=4),r}t.prototype.map={ObjectName:5},t.prototype.types={0:"Uint16",200:"Uint16",201:"Uint16",202:"binary"},t.prototype.get=function(e){return this[e]||this[this.map[e]]},e.parseIptcData=function(e,r,n,s,c){if(!c.disableIptc)for(var l=r+n;r+8<l;){if(i(e,r)){var u=a(e,r),d=r+8+u;if(d>l){console.log("Invalid IPTC data: Invalid segment offset.");break}var f=e.getUint16(r+6+u);if(r+f>l){console.log("Invalid IPTC data: Invalid segment size.");break}return s.iptc=new t,c.disableIptcOffsets||(s.iptcOffsets=new t),void o(e,d,f,s,c.includeIptcTags,c.excludeIptcTags||{202:!0})}r+=1}},e.metaDataParsers.jpeg[65517].push(e.parseIptcData),e.IptcMap=t})?n.apply(t,o):n)||(e.exports=i)}()},630:(e,t,r)=>{var n,o,i;!function(a){"use strict";o=[r(302)],void 0===(i="function"==typeof(n=function(e){var t="undefined"!=typeof Blob&&(Blob.prototype.slice||Blob.prototype.webkitSlice||Blob.prototype.mozSlice);e.blobSlice=t&&function(){return(this.slice||this.webkitSlice||this.mozSlice).apply(this,arguments)},e.metaDataParsers={jpeg:{65505:[],65517:[]}},e.parseMetaData=function(t,r,n,o){o=o||{};var i=this,a=(n=n||{}).maxMetaDataSize||262144;"undefined"!=typeof DataView&&t&&t.size>=12&&"image/jpeg"===t.type&&e.blobSlice&&e.readFile(e.blobSlice.call(t,0,a),(function(t){if(t.target.error)return console.log(t.target.error),void r(o);var a,s,c,l,u=t.target.result,d=new DataView(u),f=2,p=d.byteLength-4,h=f;if(65496===d.getUint16(0)){for(;f<p&&((a=d.getUint16(f))>=65504&&a<=65519||65534===a);){if(f+(s=d.getUint16(f+2)+2)>d.byteLength){console.log("Invalid meta data: Invalid segment size.");break}if((c=e.metaDataParsers.jpeg[a])&&!n.disableMetaDataParsers)for(l=0;l<c.length;l+=1)c[l].call(i,d,f,s,o,n);h=f+=s}!n.disableImageHead&&h>6&&(u.slice?o.imageHead=u.slice(0,h):o.imageHead=new Uint8Array(u).subarray(0,h))}else console.log("Invalid JPEG file: Missing JPEG marker.");r(o)}),"readAsArrayBuffer")||r(o)},e.replaceHead=function(t,r,n){e.parseMetaData(t,(function(o){n(new Blob([r,e.blobSlice.call(t,o.imageHead.byteLength)],{type:"image/jpeg"}))}),{maxMetaDataSize:256,disableMetaDataParsers:!0})};var r=e.transform;e.transform=function(t,n,o,i,a){e.hasMetaOption(n)?e.parseMetaData(i,(function(a){r.call(e,t,n,o,i,a)}),n,a):r.apply(e,arguments)}})?n.apply(t,o):n)||(e.exports=i)}()},922:(e,t,r)=>{var n,o,i;!function(a){"use strict";o=[r(302),r(200),r(630)],void 0===(i="function"==typeof(n=function(e){var t,r=e.hasCanvasOption,n=e.hasMetaOption,o=e.transformCoordinates,i=e.getTransformedOptions;(t=document.createElement("img")).onload=function(){e.orientation=1===t.width&&2===t.height},t.src="data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==",e.hasCanvasOption=function(t){return 1==!!t.orientation&&!e.orientation||t.orientation>1&&t.orientation<9||r.call(e,t)},e.hasMetaOption=function(t){return t&&!0===t.orientation&&!e.orientation||n.call(e,t)},e.transformCoordinates=function(t,r){o.call(e,t,r);var n=t.getContext("2d"),i=t.width,a=t.height,s=t.style.width,c=t.style.height,l=r.orientation;if(l>1&&l<9)switch(l>4&&(t.width=a,t.height=i,t.style.width=c,t.style.height=s),l){case 2:n.translate(i,0),n.scale(-1,1);break;case 3:n.translate(i,a),n.rotate(Math.PI);break;case 4:n.translate(0,a),n.scale(1,-1);break;case 5:n.rotate(.5*Math.PI),n.scale(1,-1);break;case 6:n.rotate(.5*Math.PI),n.translate(0,-a);break;case 7:n.rotate(.5*Math.PI),n.translate(i,-a),n.scale(-1,1);break;case 8:n.rotate(-.5*Math.PI),n.translate(-i,0)}},e.getTransformedOptions=function(t,r,n){var o,a,s=i.call(e,t,r),c=s.orientation;if(!0===c){if(e.orientation)return s;c=n&&n.exif&&n.exif.get("Orientation")}if(!(c>1&&c<9))return s;for(a in o={},s)Object.prototype.hasOwnProperty.call(s,a)&&(o[a]=s[a]);switch(o.orientation=c,c){case 2:o.left=s.right,o.right=s.left;break;case 3:o.left=s.right,o.top=s.bottom,o.right=s.left,o.bottom=s.top;break;case 4:o.top=s.bottom,o.bottom=s.top;break;case 5:o.left=s.top,o.top=s.left,o.right=s.bottom,o.bottom=s.right;break;case 6:o.left=s.top,o.top=s.right,o.right=s.bottom,o.bottom=s.left;break;case 7:o.left=s.bottom,o.top=s.right,o.right=s.top,o.bottom=s.left;break;case 8:o.left=s.bottom,o.top=s.left,o.right=s.top,o.bottom=s.right}return o.orientation>4&&(o.maxWidth=s.maxHeight,o.maxHeight=s.maxWidth,o.minWidth=s.minHeight,o.minHeight=s.minWidth,o.sourceWidth=s.sourceHeight,o.sourceHeight=s.sourceWidth),o}})?n.apply(t,o):n)||(e.exports=i)}()},200:(e,t,r)=>{var n,o,i;!function(a){"use strict";o=[r(302)],void 0===(i="function"==typeof(n=function(e){var t=e.transform;e.transform=function(r,n,o,i,a){t.call(e,e.scale(r,n,a),n,o,i,a)},e.transformCoordinates=function(){},e.getTransformedOptions=function(e,t){var r,n,o,i,a=t.aspectRatio;if(!a)return t;for(n in r={},t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r.crop=!0,(o=e.naturalWidth||e.width)/(i=e.naturalHeight||e.height)>a?(r.maxWidth=i*a,r.maxHeight=i):(r.maxWidth=o,r.maxHeight=o/a),r},e.renderImageToCanvas=function(e,t,r,n,o,i,a,s,c,l,u){var d=e.getContext("2d");return!1===u.imageSmoothingEnabled?d.imageSmoothingEnabled=!1:u.imageSmoothingQuality&&(d.imageSmoothingQuality=u.imageSmoothingQuality),d.drawImage(t,r,n,o,i,a,s,c,l),e},e.hasCanvasOption=function(e){return e.canvas||e.crop||!!e.aspectRatio},e.scale=function(t,r,n){r=r||{};var o,i,a,s,c,l,u,d,f,p,h,g=document.createElement("canvas"),m=t.getContext||e.hasCanvasOption(r)&&g.getContext,y=t.naturalWidth||t.width,b=t.naturalHeight||t.height,v=y,A=b;function w(){var e=Math.max((a||v)/v,(s||A)/A);e>1&&(v*=e,A*=e)}function S(){var e=Math.min((o||v)/v,(i||A)/A);e<1&&(v*=e,A*=e)}if(m&&(u=(r=e.getTransformedOptions(t,r,n)).left||0,d=r.top||0,r.sourceWidth?(c=r.sourceWidth,void 0!==r.right&&void 0===r.left&&(u=y-c-r.right)):c=y-u-(r.right||0),r.sourceHeight?(l=r.sourceHeight,void 0!==r.bottom&&void 0===r.top&&(d=b-l-r.bottom)):l=b-d-(r.bottom||0),v=c,A=l),o=r.maxWidth,i=r.maxHeight,a=r.minWidth,s=r.minHeight,m&&o&&i&&r.crop?(v=o,A=i,(h=c/l-o/i)<0?(l=i*c/o,void 0===r.top&&void 0===r.bottom&&(d=(b-l)/2)):h>0&&(c=o*l/i,void 0===r.left&&void 0===r.right&&(u=(y-c)/2))):((r.contain||r.cover)&&(a=o=o||a,s=i=i||s),r.cover?(S(),w()):(w(),S())),m){if((f=r.pixelRatio)>1&&(g.style.width=v+"px",g.style.height=A+"px",v*=f,A*=f,g.getContext("2d").scale(f,f)),(p=r.downsamplingRatio)>0&&p<1&&v<c&&A<l)for(;c*p>v;)g.width=c*p,g.height=l*p,e.renderImageToCanvas(g,t,u,d,c,l,0,0,g.width,g.height,r),u=0,d=0,c=g.width,l=g.height,(t=document.createElement("canvas")).width=c,t.height=l,e.renderImageToCanvas(t,g,0,0,c,l,0,0,c,l,r);return g.width=v,g.height=A,e.transformCoordinates(g,r),e.renderImageToCanvas(g,t,u,d,c,l,0,0,v,A,r)}return t.width=v,t.height=A,t}})?n.apply(t,o):n)||(e.exports=i)}()},302:function(e,t,r){var n;!function(o){"use strict";function i(e,t,r){var n,o=document.createElement("img");function a(t,a){a&&console.log(a),t&&i.isInstanceOf("Blob",t)?(e=t,n=i.createObjectURL(e)):(n=e,r&&r.crossOrigin&&(o.crossOrigin=r.crossOrigin)),o.src=n}return o.onerror=function(a){return i.onerror(o,a,e,n,t,r)},o.onload=function(a){return i.onload(o,a,e,n,t,r)},"string"==typeof e?(i.hasMetaOption(r)?i.fetchBlob(e,a,r):a(),o):i.isInstanceOf("Blob",e)||i.isInstanceOf("File",e)?(n=i.createObjectURL(e))?(o.src=n,o):i.readFile(e,(function(e){var r=e.target;r&&r.result?o.src=r.result:t&&t(e)})):void 0}var a=o.createObjectURL&&o||o.URL&&URL.revokeObjectURL&&URL||o.webkitURL&&webkitURL;function s(e,t){!e||"blob:"!==e.slice(0,5)||t&&t.noRevoke||i.revokeObjectURL(e)}i.hasMetaOption=function(e){return e&&e.meta},i.fetchBlob=function(e,t){t()},i.isInstanceOf=function(e,t){return Object.prototype.toString.call(t)==="[object "+e+"]"},i.transform=function(e,t,r,n,o){r(e,o)},i.onerror=function(e,t,r,n,o,i){s(n,i),o&&o.call(e,t)},i.onload=function(e,t,r,n,o,a){s(n,a),o&&i.transform(e,a,o,r,{originalWidth:e.naturalWidth||e.width,originalHeight:e.naturalHeight||e.height})},i.createObjectURL=function(e){return!!a&&a.createObjectURL(e)},i.revokeObjectURL=function(e){return!!a&&a.revokeObjectURL(e)},i.readFile=function(e,t,r){if(o.FileReader){var n=new FileReader;if(n.onload=n.onerror=t,n[r=r||"readAsDataURL"])return n[r](e),n}return!1},void 0===(n=function(){return i}.call(t,r,t,e))||(e.exports=n)}("undefined"!=typeof window&&window||this)},134:e=>{e.exports=function(){return"undefined"!=typeof window&&"object"==typeof window.process&&"renderer"===window.process.type||!("undefined"==typeof process||"object"!=typeof process.versions||!process.versions.electron)||"object"==typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent.indexOf("Electron")>=0}},666:e=>{var t=function(e){"use strict";var t,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var o=t&&t.prototype instanceof m?t:m,i=Object.create(o.prototype),a=new P(n||[]);return i._invoke=function(e,t,r){var n=d;return function(o,i){if(n===p)throw new Error("Generator is already running");if(n===h){if("throw"===o)throw i;return R()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=O(a,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===d)throw n=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var c=u(e,t,r);if("normal"===c.type){if(n=r.done?h:f,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=h,r.method="throw",r.arg=c.arg)}}}(e,r,a),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var d="suspendedStart",f="suspendedYield",p="executing",h="completed",g={};function m(){}function y(){}function b(){}var v={};c(v,i,(function(){return this}));var A=Object.getPrototypeOf,w=A&&A(A(C([])));w&&w!==r&&n.call(w,i)&&(v=w);var S=b.prototype=m.prototype=Object.create(v);function E(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function r(o,i,a,s){var c=u(e[o],e,i);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"==typeof d&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(d).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,s)}))}s(c.arg)}var o;this._invoke=function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}}function O(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method))return g;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var o=u(n,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function C(e){if(e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}return{next:R}}function R(){return{value:t,done:!0}}return y.prototype=b,c(S,"constructor",b),c(b,"constructor",y),y.displayName=c(b,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,s,"GeneratorFunction")),e.prototype=Object.create(S),e},e.awrap=function(e){return{__await:e}},E(x.prototype),c(x.prototype,a,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(S),c(S,s,"Generator"),c(S,i,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=C,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),I(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:C(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},72:function(e,t,r){var n,o;void 0===(o="function"==typeof(n=function(){return function(){var e=arguments.length;if(0===e)throw new Error("resolveUrl requires at least one argument; got none.");var t=document.createElement("base");if(t.href=arguments[0],1===e)return t.href;var r=document.getElementsByTagName("head")[0];r.insertBefore(t,r.firstChild);for(var n,o=document.createElement("a"),i=1;i<e;i++)o.href=arguments[i],n=o.href,t.href=n;return r.removeChild(t),n}})?n.call(t,r,t,e):n)||(e.exports=o)},181:(e,t,r)=>{const n=r(158);e.exports={recognize:async(e,t,r)=>{const o=n(r);return await o.load(),await o.loadLanguage(t),await o.initialize(t),o.recognize(e).finally((async()=>{await o.terminate()}))},detect:async(e,t)=>{const r=n(t);return await r.load(),await r.loadLanguage("osd"),await r.initialize("osd"),r.detect(e).finally((async()=>{await r.terminate()}))}}},308:e=>{e.exports={TESSERACT_ONLY:0,LSTM_ONLY:1,TESSERACT_LSTM_COMBINED:2,DEFAULT:3}},895:e=>{e.exports={OSD_ONLY:"0",AUTO_OSD:"1",AUTO_ONLY:"2",AUTO:"3",SINGLE_COLUMN:"4",SINGLE_BLOCK_VERT_TEXT:"5",SINGLE_BLOCK:"6",SINGLE_LINE:"7",SINGLE_WORD:"8",CIRCLE_WORD:"9",SINGLE_CHAR:"10",SPARSE_TEXT:"11",SPARSE_TEXT_OSD:"12"}},154:(e,t,r)=>{const n=r(308);e.exports={defaultOEM:n.DEFAULT}},720:e=>{e.exports={langPath:"https://tessdata.projectnaptha.com/4.0.0",workerBlobURL:!0,logger:()=>{}}},520:e=>{e.exports={AFR:"afr",AMH:"amh",ARA:"ara",ASM:"asm",AZE:"aze",AZE_CYRL:"aze_cyrl",BEL:"bel",BEN:"ben",BOD:"bod",BOS:"bos",BUL:"bul",CAT:"cat",CEB:"ceb",CES:"ces",CHI_SIM:"chi_sim",CHI_TRA:"chi_tra",CHR:"chr",CYM:"cym",DAN:"dan",DEU:"deu",DZO:"dzo",ELL:"ell",ENG:"eng",ENM:"enm",EPO:"epo",EST:"est",EUS:"eus",FAS:"fas",FIN:"fin",FRA:"fra",FRK:"frk",FRM:"frm",GLE:"gle",GLG:"glg",GRC:"grc",GUJ:"guj",HAT:"hat",HEB:"heb",HIN:"hin",HRV:"hrv",HUN:"hun",IKU:"iku",IND:"ind",ISL:"isl",ITA:"ita",ITA_OLD:"ita_old",JAV:"jav",JPN:"jpn",KAN:"kan",KAT:"kat",KAT_OLD:"kat_old",KAZ:"kaz",KHM:"khm",KIR:"kir",KOR:"kor",KUR:"kur",LAO:"lao",LAT:"lat",LAV:"lav",LIT:"lit",MAL:"mal",MAR:"mar",MKD:"mkd",MLT:"mlt",MSA:"msa",MYA:"mya",NEP:"nep",NLD:"nld",NOR:"nor",ORI:"ori",PAN:"pan",POL:"pol",POR:"por",PUS:"pus",RON:"ron",RUS:"rus",SAN:"san",SIN:"sin",SLK:"slk",SLV:"slv",SPA:"spa",SPA_OLD:"spa_old",SQI:"sqi",SRP:"srp",SRP_LATN:"srp_latn",SWA:"swa",SWE:"swe",SYR:"syr",TAM:"tam",TEL:"tel",TGK:"tgk",TGL:"tgl",THA:"tha",TIR:"tir",TUR:"tur",UIG:"uig",UKR:"ukr",URD:"urd",UZB:"uzb",UZB_CYRL:"uzb_cyrl",VIE:"vie",YID:"yid"}},949:(e,t,r)=>{const n=r(504);let o=0;e.exports=({id:e,action:t,payload:r={}})=>{let i=e;return void 0===i&&(i=n("Job",o),o+=1),{id:i,action:t,payload:r}}},877:function(e,t,r){const n=r(949),{log:o}=r(486),i=r(504);let a=0;e.exports=()=>{const e=i("Scheduler",a),t={},r={};let s=[];a+=1;const c=()=>Object.keys(t).length,l=()=>{if(0!==s.length){const e=Object.keys(t);for(let n=0;n<e.length;n+=1)if(void 0===r[e[n]]){s[0](t[e[n]]);break}}},u=(t,i)=>new Promise(((a,c)=>{const u=n({action:t,payload:i});s.push((async e=>{s.shift(),r[e.id]=u;try{a(await e[t].apply(this,[...i,u.id]))}catch(e){c(e)}finally{delete r[e.id],l()}})),o(`[${e}]: Add ${u.id} to JobQueue`),o(`[${e}]: JobQueue length=${s.length}`),l()}));return{addWorker:r=>(t[r.id]=r,o(`[${e}]: Add ${r.id}`),o(`[${e}]: Number of workers=${c()}`),l(),r.id),addJob:async(t,...r)=>{if(0===c())throw Error(`[${e}]: You need to have at least one worker before adding jobs`);return u(t,r)},terminate:async()=>{Object.keys(t).forEach((async e=>{await t[e].terminate()})),s=[]},getQueueLen:()=>s.length,getNumWorkers:c}}},158:(e,t,r)=>{const n=r(937),o=r(634),i=r(949),{log:a}=r(486),s=r(504),{defaultOEM:c}=r(154),{defaultOptions:l,spawnWorker:u,terminateWorker:d,onMessage:f,loadImage:p,send:h}=r(791);let g=0;e.exports=(e={})=>{const t=s("Worker",g),{logger:r,errorHandler:m,...y}=n({...l,...e}),b={},v={};let A=u(y);g+=1;const w=(e,t)=>{b[e]=t},S=(e,t)=>{v[e]=t},E=({id:e,action:r,payload:n})=>new Promise(((o,i)=>{a(`[${t}]: Start ${e}, action=${r}`),w(r,o),S(r,i),h(A,{workerId:t,jobId:e,action:r,payload:n})}));return f(A,(({workerId:e,jobId:t,status:n,action:i,data:s})=>{if("resolve"===n){a(`[${e}]: Complete ${t}`);let r=s;"recognize"===i?r=o(s):"getPDF"===i&&(r=Array.from({...s,length:Object.keys(s).length})),b[i]({jobId:t,data:r})}else if("reject"===n){if(v[i](s),!m)throw Error(s);m(s)}else"progress"===n&&r({...s,userJobId:t})})),{id:t,worker:A,setResolve:w,setReject:S,load:e=>E(i({id:e,action:"load",payload:{options:y}})),writeText:(e,t,r)=>E(i({id:r,action:"FS",payload:{method:"writeFile",args:[e,t]}})),readText:(e,t)=>E(i({id:t,action:"FS",payload:{method:"readFile",args:[e,{encoding:"utf8"}]}})),removeFile:(e,t)=>E(i({id:t,action:"FS",payload:{method:"unlink",args:[e]}})),FS:(e,t,r)=>E(i({id:r,action:"FS",payload:{method:e,args:t}})),loadLanguage:(e="eng",t)=>E(i({id:t,action:"loadLanguage",payload:{langs:e,options:y}})),initialize:(e="eng",t=c,r)=>E(i({id:r,action:"initialize",payload:{langs:e,oem:t}})),setParameters:(e={},t)=>E(i({id:t,action:"setParameters",payload:{params:e}})),recognize:async(e,t={},r)=>E(i({id:r,action:"recognize",payload:{image:await p(e),options:t}})),getPDF:(e="Tesseract OCR Result",t=!1,r)=>E(i({id:r,action:"getPDF",payload:{title:e,textonly:t}})),detect:async(e,t)=>E(i({id:t,action:"detect",payload:{image:await p(e)}})),terminate:async()=>(null!==A&&(d(A),A=null),Promise.resolve())}}},320:(e,t,r)=>{r(666);const n=r(877),o=r(158),i=r(181),a=r(520),s=r(308),c=r(895),{setLogging:l}=r(486);e.exports={languages:a,OEM:s,PSM:c,createScheduler:n,createWorker:o,setLogging:l,...i}},634:e=>{e.exports=e=>{const t=[],r=[],n=[],o=[],i=[];return e.blocks.forEach((a=>{a.paragraphs.forEach((t=>{t.lines.forEach((r=>{r.words.forEach((n=>{n.symbols.forEach((o=>{i.push({...o,page:e,block:a,paragraph:t,line:r,word:n})})),o.push({...n,page:e,block:a,paragraph:t,line:r})})),n.push({...r,page:e,block:a,paragraph:t})})),r.push({...t,page:e,block:a})})),t.push({...a,page:e})})),{...e,blocks:t,paragraphs:r,lines:n,words:o,symbols:i}}},376:(e,t,r)=>{const n=r(134);e.exports=e=>{const t={};return"undefined"!=typeof WorkerGlobalScope?t.type="webworker":n()?t.type="electron":"object"==typeof window?t.type="browser":"object"==typeof process&&(t.type="node"),void 0===e?t:t[e]}},504:e=>{e.exports=(e,t)=>`${e}-${t}-${Math.random().toString(16).slice(3,8)}`},486:function(e,t){let r=!1;t.logging=r,t.setLogging=e=>{r=e},t.log=(...e)=>r?console.log.apply(this,e):null},937:(e,t,r)=>{const n="browser"===r(376)("type")?r(72):e=>e;e.exports=e=>{const t={...e};return["corePath","workerPath","langPath"].forEach((r=>{void 0!==e[r]&&(t[r]=n(t[r]))})),t}},40:(e,t,r)=>{const n=r(72),{version:o,dependencies:i}=r(547),a=r(720);e.exports={...a,workerPath:"undefined"!=typeof process&&"development"===process.env.TESS_ENV?n(`/dist/worker.dev.js?nocache=${Math.random().toString(36).slice(3)}`):`https://unpkg.com/tesseract.js@v${o}/dist/worker.min.js`,corePath:`https://unpkg.com/tesseract.js-core@v${i["tesseract.js-core"].substring(1)}/tesseract-core.${"object"==typeof WebAssembly?"wasm":"asm"}.js`}},791:(e,t,r)=>{const n=r(40),o=r(5),i=r(25),a=r(804),s=r(247),c=r(196);e.exports={defaultOptions:n,spawnWorker:o,terminateWorker:i,onMessage:a,send:s,loadImage:c}},196:(e,t,r)=>{const n=r(72),o=r(303),i=e=>new Promise(((t,r)=>{const n=new FileReader;n.onload=()=>{t(n.result)},n.onerror=({target:{error:{code:e}}})=>{r(Error(`File could not be read! Code=${e}`))},n.readAsArrayBuffer(e)})),a=e=>new Promise((t=>{o(e,(e=>e.toBlob(t)),{orientation:!0,canvas:!0})})),s=async e=>{let t=e;if(void 0===e)return"undefined";if("string"==typeof e)if(e.endsWith(".pbm")){const r=await fetch(n(e));t=await r.arrayBuffer()}else{let r=e;/data:image\/([a-zA-Z]*);base64,([^"]*)/.test(e)||(r=n(e)),t=await i(await a(r))}else if(e instanceof HTMLElement)"IMG"===e.tagName&&(t=await s(e.src)),"VIDEO"===e.tagName&&(t=await s(e.poster)),"CANVAS"===e.tagName&&await new Promise((r=>{e.toBlob((async e=>{t=await i(e),r()}))}));else if(e instanceof File||e instanceof Blob){let r=e;e.name.endsWith(".pbm")||(r=await a(r)),t=await i(r)}return new Uint8Array(t)};e.exports=s},804:e=>{e.exports=(e,t)=>{e.onmessage=({data:e})=>{t(e)}}},247:e=>{e.exports=async(e,t)=>{e.postMessage(t)}},5:e=>{e.exports=({workerPath:e,workerBlobURL:t})=>{let r;if(Blob&&URL&&t){const t=new Blob([`importScripts("${e}");`],{type:"application/javascript"});r=new Worker(URL.createObjectURL(t))}else r=new Worker(e);return r}},25:e=>{e.exports=e=>{e.terminate()}},547:e=>{"use strict";e.exports=JSON.parse('{"name":"tesseract.js","version":"2.1.5","description":"Pure Javascript Multilingual OCR","main":"src/index.js","types":"src/index.d.ts","unpkg":"dist/tesseract.min.js","jsdelivr":"dist/tesseract.min.js","scripts":{"start":"node scripts/server.js","build":"rimraf dist && webpack --config scripts/webpack.config.prod.js","profile:tesseract":"webpack-bundle-analyzer dist/tesseract-stats.json","profile:worker":"webpack-bundle-analyzer dist/worker-stats.json","prepublishOnly":"npm run build","wait":"rimraf dist && wait-on http://localhost:3000/dist/tesseract.dev.js","test":"npm-run-all -p -r start test:all","test:all":"npm-run-all wait test:browser:* test:node:all","test:node":"nyc mocha --exit --bail --require ./scripts/test-helper.js","test:node:all":"npm run test:node -- ./tests/*.test.js","test:browser-tpl":"mocha-headless-chrome -a incognito -a no-sandbox -a disable-setuid-sandbox -a disable-logging -t 300000","test:browser:detect":"npm run test:browser-tpl -- -f ./tests/detect.test.html","test:browser:recognize":"npm run test:browser-tpl -- -f ./tests/recognize.test.html","test:browser:scheduler":"npm run test:browser-tpl -- -f ./tests/scheduler.test.html","test:browser:FS":"npm run test:browser-tpl -- -f ./tests/FS.test.html","lint":"eslint src","lint:fix":"eslint --fix src","postinstall":"opencollective-postinstall || true"},"browser":{"./src/worker/node/index.js":"./src/worker/browser/index.js"},"author":"","contributors":["jeromewu"],"license":"Apache-2.0","devDependencies":{"@babel/core":"^7.7.7","@babel/preset-env":"^7.7.7","acorn":"^6.4.0","babel-loader":"^8.1.0","cors":"^2.8.5","eslint":"^7.2.0","eslint-config-airbnb-base":"^14.2.0","eslint-plugin-import":"^2.22.1","expect.js":"^0.3.1","express":"^4.17.1","mocha":"^8.1.3","mocha-headless-chrome":"^2.0.3","npm-run-all":"^4.1.5","nyc":"^15.1.0","rimraf":"^2.7.1","wait-on":"^3.3.0","webpack":"^4.44.2","webpack-bundle-analyzer":"^3.6.0","webpack-cli":"^3.3.12","webpack-dev-middleware":"^3.7.2"},"dependencies":{"blueimp-load-image":"^3.0.0","bmp-js":"^0.1.0","file-type":"^12.4.1","idb-keyval":"^3.2.0","is-electron":"^2.2.0","is-url":"^1.2.4","jpeg-autorotate":"^7.1.1","node-fetch":"^2.6.0","opencollective-postinstall":"^2.0.2","regenerator-runtime":"^0.13.3","resolve-url":"^0.2.1","tesseract.js-core":"^2.2.0","zlibjs":"^0.3.1"},"repository":{"type":"git","url":"https://github.com/naptha/tesseract.js.git"},"bugs":{"url":"https://github.com/naptha/tesseract.js/issues"},"homepage":"https://github.com/naptha/tesseract.js","collective":{"type":"opencollective","url":"https://opencollective.com/tesseractjs"}}')}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e=r(320),t=r.n(e);$((function(){$("#scanFile").change((function(e){var r=$(this)[0].files[0];if(r){var n=new FileReader;n.onload=function(e){$("#preview").attr("src",e.target.result)},n.readAsDataURL(e.target.files[0]),t().recognize(r,"jpn",{logger:e=>$("#loading").text(e.status+":"+Math.round(100*e.progress)+"%")}).then((e=>{var t=e.data.text;console.log(t);var r=t.match(/[a-zA-Z]{0,}: [a-zA-Z0-9あ-ん]{0,}/g);if(console.log(r),$.isArray(r))for(let e=0;e<r.length;e++){var n=r[e].match(/[a-zA-Z]{0,}:/),o=n[0].replace(":",""),i=r[e].replace(n,"");$("#scanData > ul").append("<li>"+o+" =><strong>"+i+"</strong></li>"),console.log(o+"=>"+i)}$("#loading").text("実行完了！")}))}return!1}))}))})()})();