{"version":3,"file":"scripts.js","mappings":"YAEA,IAAAA,GAAA,EAIAC,EAAA,SAAAC,GACA,OAAAA,aAAAD,EAAAC,EACAC,gBAAAF,OACAE,KAAAC,YAAAF,GADA,IAAAD,EAAAC,EAEA,SAEAG,QAAA,YACAC,OAAA,KAAAA,OAAAD,UACAA,QAAAC,OAAAD,QAAAJ,GAEAI,QAAAJ,QAZAE,KAcAF,OAGA,IAAAM,EAAAN,EAAAO,KAAA,CAGA,oBACA,wBAGA,mBAGA,wBACA,wBACA,gCACA,+BAGA,kBACA,oBAGA,yBAGA,yBACA,0BACA,mBACA,2BACA,4BAGA,qBACA,gBACA,wBACA,4BACA,wBACA,aACA,0BACA,sBACA,wBACA,qBACA,yBACA,wBACA,qBACA,oBACA,cACA,oBACA,oBACA,oBACA,iCACA,8BACA,8BACA,iCACA,wBACA,sBACA,sBACA,mBACA,kBACA,mBACA,uBACA,qBACA,qBACA,0BACA,8BACA,yBACA,oBACA,iBACA,mBACA,kBACA,iCACA,6BAGA,mCACA,uBAGAC,EAAAR,EAAAQ,SAAA,CACA,iBACA,kBACA,uBACA,0BACA,mCACA,oBACA,kBACA,gCACA,kBACA,sBACA,0BACA,uBACA,uBACA,kBACA,kBACA,qBACA,mBACA,mBACA,sBACA,4BACA,kCACA,uBACA,iBACA,4BACA,wBACA,0BACA,eACA,uBACA,WACA,YACA,eACA,aACA,mBAGAC,EAAAT,EAAAS,QAAA,CACA,iBACA,mBACA,gBACA,oBACA,iBACA,mBACA,gBACA,iBACA,kBACA,cACA,oBACA,YACA,iBACA,cACA,iBACA,cACA,wBACA,qBACA,iBACA,wBACA,qBACA,yBACA,sBACA,uBACA,oBACA,wBACA,qBACA,yBACA,wBACA,kBACA,sBAIAC,EAAAV,EAAAU,SAAA,CACA,iBACA,kBACA,oBACA,kBACA,gCACA,mBACA,kBACA,sBACA,mBACA,sBACA,kBACA,kBACA,0BACA,qBACA,mBACA,sBACA,wBACA,uBACA,uBACA,2BAGAC,EAAAX,EAAAW,aAAA,CACAC,gBAAA,CACA,gBACA,WACA,mBACA,sBACA,qBACA,qBACA,mBACA,kBACA,oBAEAC,aAAA,CACA,YACA,YACA,0BACA,SACA,cACA,YACA,YACA,aAEAC,YAAA,CACA,YACA,aACA,gBACA,kCACA,UACA,iBACA,oBACA,WACA,2CACA,4CACA,6CACA,yCACA,sBACA,sBACA,sBACA,SACA,SACA,SACA,SACA,yBACA,aAEAC,MAAA,CACA,uBACA,gBACA,qCACA,iCACA,uCACA,mEACA,+DACA,+CACA,mCACA,4BACA,uDACA,mDACA,uBACA,yCACA,oEACA,gEACA,gEACA,2FACA,uFACA,oDACA,+EACA,4EAEAC,cAAA,CACA,gBACA,+BACA,+BACA,iCACA,iCACA,qBACA,oCAEAC,iBAAA,CACA,aACA,cACA,aACA,iBAEAC,UAAA,CACA,2BAEAC,eAAA,CACA,mBACA,oBAEAC,aAAA,CACA,uBACA,0BAEAC,YAAA,CACA,SACA,gBACA,iBACA,kBACA,oBAEAC,SAAA,CACA,WACA,SACA,UAEAC,WAAA,CACA,WACA,mBACA,qBAEAC,UAAA,CACA,WACA,SACA,UAEAC,qBAAA,CACA,YACA,UACA,eACA,kBAEAC,WAAA,CACA,SAGAC,WAAA,CACA,KACA,MACA,OACA,OACA,MACA,MACA,QAYA,SAAAC,EAAAC,GACA,QAAAA,EAAAC,QACA,CAiFA,SAAAC,EAAAC,GACA,IAAAC,EAAA,IAAAC,SAAAF,GAGA,GADAjC,GAAAoC,QAAAC,IAAA,sBAAAJ,EAAAK,YACA,KAAAJ,EAAAK,SAAA,SAAAL,EAAAK,SAAA,GACA,OAAAvC,GAAAoC,QAAAC,IAAA,qBACA,EAOA,QAFAG,EAFAC,EAAA,EACAC,EAAAT,EAAAK,WAGAG,EAAAC,GAAA,CACA,QAAAR,EAAAK,SAAAE,GACA,OAAAzC,GAAAoC,QAAAC,IAAA,gCAAAI,EAAA,YAAAP,EAAAK,SAAAE,KACA,EASA,GANAD,EAAAN,EAAAK,SAAAE,EA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,EAEAyL,EAAAzX,UAAA4b,OAAA,SAAAC,EAAAC,EAAAnZ,GACA,OAAAmZ,KAAA,YACA,IAAAjR,QAAA,SAAAC,GACA,GAAA+Q,EAAAD,OACAC,EAAAD,OAAA,SAAApjB,GACA,OAAAsS,EAAAtS,EACA,EAAOsjB,EAAAnZ,QAIP,GAAAkZ,EAAAE,cACAjR,EAAA+Q,EAAAE,cAAA,CACAhlB,KAAA+kB,EACAnZ,iBAHA,CAaA,QAJAqZ,EAAAzf,KAAAsf,EAAAI,UAAAH,EAAAnZ,GAAAuR,MAAA,SACA1X,EAAAwf,EAAAnnB,OACAqnB,EAAA,IAAAxjB,WAAA8D,GAEAlG,EAAA,EAAoBA,EAAAkG,EAASlG,IAC7B4lB,EAAA5lB,GAAA0lB,EAAArf,WAAArG,GAGAwU,EAAA,IAAArS,KAAA,CAAAyjB,GAAA,CACAnlB,KAAA+kB,IAZA,CAcA,EACA,EAEArE,EAAAzX,UAAA7N,MAAA,aAEAM,EAAAD,QAAAilB,CAEA,EAAC,CAAE,2HAAAhB,WAAA,MAA6I,GAAG,GAhrE8O,CAgrE9O,IACnJ","names":["debug","EXIF","obj","this","EXIFwrapped","exports","module","ExifTags","Tags","TiffTags","GPSTags","IFD1Tags","StringValues","ExposureProgram","MeteringMode","LightSource","Flash","SensingMethod","SceneCaptureType","SceneType","CustomRendered","WhiteBalance","GainControl","Contrast","Saturation","Sharpness","SubjectDistanceRange","FileSource","Components","imageHasData","img","exifdata","findEXIFinJPEG","file","dataView","DataView","console","log","byteLength","getUint8","marker","offset","length","readEXIFData","getUint16","IptcFieldMap","readIPTCData","startOffset","sectionLength","fieldValue","fieldName","dataSize","segmentType","data","segmentStartPos","getInt16","getStringFromDB","hasOwnProperty","Array","push","readTags","tiffStart","dirStart","strings","bigEnd","entryOffset","tag","i","entries","tags","readTagValue","vals","val","n","numerator","denominator","type","numValues","getUint32","valueOffset","Number","getInt32","buffer","start","outstr","String","fromCharCode","exifData","gpsData","tiffOffset","firstIFDOffset","ExifIFDPointer","GPSInfoIFDPointer","thumbnail","readThumbnailImage","IFD1OffsetPointer","getNextIFDOffset","thumbTags","Compression","JpegIFOffset","JpegIFByteCount","blob","Blob","Uint8Array","PhotometricInterpretation","xml2json","xml","json","nodeType","attributes","j","attribute","item","nodeName","nodeValue","hasChildNodes","childNodes","child","old","xml2Object","children","idx","itemAtt","dataKey","textContent","e","message","enableXmp","isXmpEnabled","disableXmp","getData","callback","self","Image","HTMLImageElement","complete","call","getImageData","handleBinaryFile","binFile","iptcdata","findIPTCinJPEG","isFieldSegmentStart","nameHeaderLength","xmpdata","findXMPinJPEG","dom","DOMParser","xmpString","xmpEndIndex","indexOf","indexOfXmp","substring","slice","parseFromString","src","test","arrayBuffer","base64ToArrayBuffer","base64","contentType","match","replace","binary","atob","len","ArrayBuffer","view","charCodeAt","fileReader","FileReader","onload","target","result","objectURLToBlob","url","http","XMLHttpRequest","open","responseType","status","response","send","readAsArrayBuffer","File","getTag","getIptcTag","getAllTags","a","getAllIptcTags","pretty","strPretty","readFromBinaryFile","define","amd","f","window","global","pica","r","t","o","c","require","u","Error","code","p","_dereq_","inherits","Multimath","mm_unsharp_mask","mm_resize","MathLib","requested_features","__requested_features","features","js","wasm","has_wasm","use","prototype","resizeAndUnsharp","options","cache","resize","unsharpAmount","unsharp_mask","toWidth","toHeight","unsharpRadius","unsharpThreshold","multimath","clampTo8","convolveHorizontally","dest","srcW","srcH","destW","filters","g","b","filterPtr","filterShift","filterSize","srcPtr","srcY","destX","filterVal","srcOffset","destOffset","convolveVertically","name","fn","wasm_fn","wasm_src","createFilters","width","height","destH","scaleX","scaleY","offsetX","offsetY","quality","alpha","filtersX","filtersY","tmp","resetAlpha","dst","ptr","FILTER_INFO","toFixedPoint","num","Math","round","srcSize","destSize","scale","destPixel","srcPixel","srcFirst","srcLast","filterElementSize","floatFilter","fxpFilter","total","pxl","floatVal","filterTotal","leftNotEmpty","rightNotEmpty","filterFunction","filter","scaleInverted","scaleClamped","min","srcWindow","win","maxFilterElementSize","floor","packedFilter","Int16Array","packedFilterPtr","slowCopy","subarray","set","max","ceil","Float32Array","x","xpi","PI","sin","cos","IS_LE","Uint32Array","copyInt16asLE","target_offset","asUint8Array","tmp_offset","__align","filtersX_offset","filtersY_offset","instance","__instance","mem","__memory","mem32","src32","convolveHV","_convolveHV","Pool","create","idle","available","acquired","lastId","timeoutId","acquire","resource","_this","pop","id","release","_this2","lastUsed","Date","now","setTimeout","gc","_this3","destroy","fromWidth","fromHeight","srcTileSize","destTileBorder","minScale","stageCount","pow","PIXEL_EPSILON","pixelFloor","nearest","abs","pixelCeil","innerTileWidth","innerTileHeight","y","innerX","innerY","toTileWidth","toTileHeight","tile","tiles","toX","toY","toInnerX","toInnerY","toInnerWidth","toInnerHeight","objClass","Object","toString","isCanvas","element","cname","isImage","limiter","concurrency","active","queue","roll","shift","Promise","resolve","reject","then","err","cib_quality_name","cib_support","createImageBitmap","document","createElement","resizeWidth","resizeHeight","resizeQuality","bitmap","close","catch","mathLib","onmessage","ev","opts","postMessage","a0","a1","a2","a3","b1","b2","convolveMono16","out","line","coeff","prev_src","curr_src","curr_out","prev_out","prev_prev_out","src_index","out_index","line_index","coeff_a0","coeff_a1","coeff_b1","coeff_b2","blurMono16","radius","Uint16Array","tmp_line","gaussCoef","sigma","exp","g1","g2","k","ctor","superCtor","super_","constructor","value","enumerable","writable","configurable","TempCtor","assign","base64decode","hasWebAssembly","DEFAULT_OPTIONS","MultiMath","__cache","__init_promise","__modules","modules","__wasm","__isLE","init","all","keys","map","WebAssembly","compile","__base64decode","m","__reallocate","bytes","Memory","initial","mem_size","grow","memsize","env_extra","Module","env_base","memoryBase","memory","tableBase","table","Table","Instance","env","number","base","reminder","str","input","bits","charAt","tailbits","size","glur_mono16","hsl_l16","amount","threshold","h","s","l","m1","m2","hShifted","diff","iTimes4","lightness","blured","amountFp","thresholdFp","pixels","img_bytes_cnt","hsl_bytes_cnt","blur_bytes_cnt","blur_line_byte_cnt","hsl_offset","blur_offset","blur_tmp_offset","blur_line_offset","blur_coeffs_offset","img32","_hsl_l16","_blurMono16","unsharp","_unsharp","wa","bin","getOwnPropertySymbols","propIsEnumerable","propertyIsEnumerable","shouldUseNative","test1","getOwnPropertyNames","test2","join","test3","split","forEach","letter","source","from","symbols","to","toObject","TypeError","arguments","key","bundleFn","sources","stringify","JSON","wkey","cacheKeys","default","random","wcache","skey","scache","workerSources","resolveSources","depPath","depKey","URL","webkitURL","mozURL","msURL","bare","workerUrl","createObjectURL","worker","Worker","objectURL","_arrayLikeToArray","arr","arr2","webworkify","utils","createStages","createRegions","singletones","NEED_SAFARI_FIX","navigator","userAgent","hardwareConcurrency","CAN_NEW_IMAGE_DATA","CAN_CREATE_IMAGE_BITMAP","DEFAULT_PICA_OPTS","DEFAULT_RESIZE_OPTS","workerFabric","terminate","revokeObjectURL","Pica","limiter_key","concat","__limit","cib","ww","__workersPool","__mathlib","__initPromise","ImageData","Uint8ClampedArray","ImageBitmap","wpool_key","checkCibResize","initMath","mathlib","isNaN","naturalWidth","naturalHeight","canceled","cancelToken","toCtx","getContext","imageBitmap","drawImage","tmpCanvas","tmpCtx","iData","putImageData","tileAndResize","srcCtx","srcImageBitmap","jobs","srcImageData","globalCompositeOperation","w","preload","wasm_nodule","__","invokeResize","toImageData","createImageData","processTile","cleanup","processStages","stages","_stages$shift2","_slicedToArray","_arrayWithHoles","isArray","_iterableToArrayLimit","Symbol","iterator","_arr","_n","_d","_e","_s","_i","next","done","return","_unsupportedIterableToArray","minLen","_nonIterableRest","isLastStage","resizeBuffer","toBlob","canvas","mimeType","convertToBlob","asString","toDataURL","asBuffer"],"sourceRoot":"webpack:///","sources":["node_modules/exif-js/exif.js","node_modules/pica/dist/pica.js"],"sourcesContent":["(function() {\n\n var debug = false;\n\n var root = this;\n\n var EXIF = function(obj) {\n if (obj instanceof EXIF) return obj;\n if (!(this instanceof EXIF)) return new EXIF(obj);\n this.EXIFwrapped = obj;\n };\n\n if (typeof exports !== 'undefined') {\n if (typeof module !== 'undefined' && module.exports) {\n exports = module.exports = EXIF;\n }\n exports.EXIF = EXIF;\n } else {\n root.EXIF = EXIF;\n }\n\n var ExifTags = EXIF.Tags = {\n\n // version tags\n 0x9000 : \"ExifVersion\", // EXIF version\n 0xA000 : \"FlashpixVersion\", // Flashpix format version\n\n // colorspace tags\n 0xA001 : \"ColorSpace\", // Color space information tag\n\n // image configuration\n 0xA002 : \"PixelXDimension\", // Valid width of meaningful image\n 0xA003 : \"PixelYDimension\", // Valid height of meaningful image\n 0x9101 : \"ComponentsConfiguration\", // Information about channels\n 0x9102 : \"CompressedBitsPerPixel\", // Compressed bits per pixel\n\n // user information\n 0x927C : \"MakerNote\", // Any desired information written by the manufacturer\n 0x9286 : \"UserComment\", // Comments by user\n\n // related file\n 0xA004 : \"RelatedSoundFile\", // Name of related sound file\n\n // date and time\n 0x9003 : \"DateTimeOriginal\", // Date and time when the original image was generated\n 0x9004 : \"DateTimeDigitized\", // Date and time when the image was stored digitally\n 0x9290 : \"SubsecTime\", // Fractions of seconds for DateTime\n 0x9291 : \"SubsecTimeOriginal\", // Fractions of seconds for DateTimeOriginal\n 0x9292 : \"SubsecTimeDigitized\", // Fractions of seconds for DateTimeDigitized\n\n // picture-taking conditions\n 0x829A : \"ExposureTime\", // Exposure time (in seconds)\n 0x829D : \"FNumber\", // F number\n 0x8822 : \"ExposureProgram\", // Exposure program\n 0x8824 : \"SpectralSensitivity\", // Spectral sensitivity\n 0x8827 : \"ISOSpeedRatings\", // ISO speed rating\n 0x8828 : \"OECF\", // Optoelectric conversion factor\n 0x9201 : \"ShutterSpeedValue\", // Shutter speed\n 0x9202 : \"ApertureValue\", // Lens aperture\n 0x9203 : \"BrightnessValue\", // Value of brightness\n 0x9204 : \"ExposureBias\", // Exposure bias\n 0x9205 : \"MaxApertureValue\", // Smallest F number of lens\n 0x9206 : \"SubjectDistance\", // Distance to subject in meters\n 0x9207 : \"MeteringMode\", // Metering mode\n 0x9208 : \"LightSource\", // Kind of light source\n 0x9209 : \"Flash\", // Flash status\n 0x9214 : \"SubjectArea\", // Location and area of main subject\n 0x920A : \"FocalLength\", // Focal length of the lens in mm\n 0xA20B : \"FlashEnergy\", // Strobe energy in BCPS\n 0xA20C : \"SpatialFrequencyResponse\", //\n 0xA20E : \"FocalPlaneXResolution\", // Number of pixels in width direction per FocalPlaneResolutionUnit\n 0xA20F : \"FocalPlaneYResolution\", // Number of pixels in height direction per FocalPlaneResolutionUnit\n 0xA210 : \"FocalPlaneResolutionUnit\", // Unit for measuring FocalPlaneXResolution and FocalPlaneYResolution\n 0xA214 : \"SubjectLocation\", // Location of subject in image\n 0xA215 : \"ExposureIndex\", // Exposure index selected on camera\n 0xA217 : \"SensingMethod\", // Image sensor type\n 0xA300 : \"FileSource\", // Image source (3 == DSC)\n 0xA301 : \"SceneType\", // Scene type (1 == directly photographed)\n 0xA302 : \"CFAPattern\", // Color filter array geometric pattern\n 0xA401 : \"CustomRendered\", // Special processing\n 0xA402 : \"ExposureMode\", // Exposure mode\n 0xA403 : \"WhiteBalance\", // 1 = auto white balance, 2 = manual\n 0xA404 : \"DigitalZoomRation\", // Digital zoom ratio\n 0xA405 : \"FocalLengthIn35mmFilm\", // Equivalent foacl length assuming 35mm film camera (in mm)\n 0xA406 : \"SceneCaptureType\", // Type of scene\n 0xA407 : \"GainControl\", // Degree of overall image gain adjustment\n 0xA408 : \"Contrast\", // Direction of contrast processing applied by camera\n 0xA409 : \"Saturation\", // Direction of saturation processing applied by camera\n 0xA40A : \"Sharpness\", // Direction of sharpness processing applied by camera\n 0xA40B : \"DeviceSettingDescription\", //\n 0xA40C : \"SubjectDistanceRange\", // Distance to subject\n\n // other tags\n 0xA005 : \"InteroperabilityIFDPointer\",\n 0xA420 : \"ImageUniqueID\" // Identifier assigned uniquely to each image\n };\n\n var TiffTags = EXIF.TiffTags = {\n 0x0100 : \"ImageWidth\",\n 0x0101 : \"ImageHeight\",\n 0x8769 : \"ExifIFDPointer\",\n 0x8825 : \"GPSInfoIFDPointer\",\n 0xA005 : \"InteroperabilityIFDPointer\",\n 0x0102 : \"BitsPerSample\",\n 0x0103 : \"Compression\",\n 0x0106 : \"PhotometricInterpretation\",\n 0x0112 : \"Orientation\",\n 0x0115 : \"SamplesPerPixel\",\n 0x011C : \"PlanarConfiguration\",\n 0x0212 : \"YCbCrSubSampling\",\n 0x0213 : \"YCbCrPositioning\",\n 0x011A : \"XResolution\",\n 0x011B : \"YResolution\",\n 0x0128 : \"ResolutionUnit\",\n 0x0111 : \"StripOffsets\",\n 0x0116 : \"RowsPerStrip\",\n 0x0117 : \"StripByteCounts\",\n 0x0201 : \"JPEGInterchangeFormat\",\n 0x0202 : \"JPEGInterchangeFormatLength\",\n 0x012D : \"TransferFunction\",\n 0x013E : \"WhitePoint\",\n 0x013F : \"PrimaryChromaticities\",\n 0x0211 : \"YCbCrCoefficients\",\n 0x0214 : \"ReferenceBlackWhite\",\n 0x0132 : \"DateTime\",\n 0x010E : \"ImageDescription\",\n 0x010F : \"Make\",\n 0x0110 : \"Model\",\n 0x0131 : \"Software\",\n 0x013B : \"Artist\",\n 0x8298 : \"Copyright\"\n };\n\n var GPSTags = EXIF.GPSTags = {\n 0x0000 : \"GPSVersionID\",\n 0x0001 : \"GPSLatitudeRef\",\n 0x0002 : \"GPSLatitude\",\n 0x0003 : \"GPSLongitudeRef\",\n 0x0004 : \"GPSLongitude\",\n 0x0005 : \"GPSAltitudeRef\",\n 0x0006 : \"GPSAltitude\",\n 0x0007 : \"GPSTimeStamp\",\n 0x0008 : \"GPSSatellites\",\n 0x0009 : \"GPSStatus\",\n 0x000A : \"GPSMeasureMode\",\n 0x000B : \"GPSDOP\",\n 0x000C : \"GPSSpeedRef\",\n 0x000D : \"GPSSpeed\",\n 0x000E : \"GPSTrackRef\",\n 0x000F : \"GPSTrack\",\n 0x0010 : \"GPSImgDirectionRef\",\n 0x0011 : \"GPSImgDirection\",\n 0x0012 : \"GPSMapDatum\",\n 0x0013 : \"GPSDestLatitudeRef\",\n 0x0014 : \"GPSDestLatitude\",\n 0x0015 : \"GPSDestLongitudeRef\",\n 0x0016 : \"GPSDestLongitude\",\n 0x0017 : \"GPSDestBearingRef\",\n 0x0018 : \"GPSDestBearing\",\n 0x0019 : \"GPSDestDistanceRef\",\n 0x001A : \"GPSDestDistance\",\n 0x001B : \"GPSProcessingMethod\",\n 0x001C : \"GPSAreaInformation\",\n 0x001D : \"GPSDateStamp\",\n 0x001E : \"GPSDifferential\"\n };\n\n // EXIF 2.3 Spec\n var IFD1Tags = EXIF.IFD1Tags = {\n 0x0100: \"ImageWidth\",\n 0x0101: \"ImageHeight\",\n 0x0102: \"BitsPerSample\",\n 0x0103: \"Compression\",\n 0x0106: \"PhotometricInterpretation\",\n 0x0111: \"StripOffsets\",\n 0x0112: \"Orientation\",\n 0x0115: \"SamplesPerPixel\",\n 0x0116: \"RowsPerStrip\",\n 0x0117: \"StripByteCounts\",\n 0x011A: \"XResolution\",\n 0x011B: \"YResolution\",\n 0x011C: \"PlanarConfiguration\",\n 0x0128: \"ResolutionUnit\",\n 0x0201: \"JpegIFOffset\", // When image format is JPEG, this value show offset to JPEG data stored.(aka \"ThumbnailOffset\" or \"JPEGInterchangeFormat\")\n 0x0202: \"JpegIFByteCount\", // When image format is JPEG, this value shows data size of JPEG image (aka \"ThumbnailLength\" or \"JPEGInterchangeFormatLength\")\n 0x0211: \"YCbCrCoefficients\",\n 0x0212: \"YCbCrSubSampling\",\n 0x0213: \"YCbCrPositioning\",\n 0x0214: \"ReferenceBlackWhite\"\n };\n\n var StringValues = EXIF.StringValues = {\n ExposureProgram : {\n 0 : \"Not defined\",\n 1 : \"Manual\",\n 2 : \"Normal program\",\n 3 : \"Aperture priority\",\n 4 : \"Shutter priority\",\n 5 : \"Creative program\",\n 6 : \"Action program\",\n 7 : \"Portrait mode\",\n 8 : \"Landscape mode\"\n },\n MeteringMode : {\n 0 : \"Unknown\",\n 1 : \"Average\",\n 2 : \"CenterWeightedAverage\",\n 3 : \"Spot\",\n 4 : \"MultiSpot\",\n 5 : \"Pattern\",\n 6 : \"Partial\",\n 255 : \"Other\"\n },\n LightSource : {\n 0 : \"Unknown\",\n 1 : \"Daylight\",\n 2 : \"Fluorescent\",\n 3 : \"Tungsten (incandescent light)\",\n 4 : \"Flash\",\n 9 : \"Fine weather\",\n 10 : \"Cloudy weather\",\n 11 : \"Shade\",\n 12 : \"Daylight fluorescent (D 5700 - 7100K)\",\n 13 : \"Day white fluorescent (N 4600 - 5400K)\",\n 14 : \"Cool white fluorescent (W 3900 - 4500K)\",\n 15 : \"White fluorescent (WW 3200 - 3700K)\",\n 17 : \"Standard light A\",\n 18 : \"Standard light B\",\n 19 : \"Standard light C\",\n 20 : \"D55\",\n 21 : \"D65\",\n 22 : \"D75\",\n 23 : \"D50\",\n 24 : \"ISO studio tungsten\",\n 255 : \"Other\"\n },\n Flash : {\n 0x0000 : \"Flash did not fire\",\n 0x0001 : \"Flash fired\",\n 0x0005 : \"Strobe return light not detected\",\n 0x0007 : \"Strobe return light detected\",\n 0x0009 : \"Flash fired, compulsory flash mode\",\n 0x000D : \"Flash fired, compulsory flash mode, return light not detected\",\n 0x000F : \"Flash fired, compulsory flash mode, return light detected\",\n 0x0010 : \"Flash did not fire, compulsory flash mode\",\n 0x0018 : \"Flash did not fire, auto mode\",\n 0x0019 : \"Flash fired, auto mode\",\n 0x001D : \"Flash fired, auto mode, return light not detected\",\n 0x001F : \"Flash fired, auto mode, return light detected\",\n 0x0020 : \"No flash function\",\n 0x0041 : \"Flash fired, red-eye reduction mode\",\n 0x0045 : \"Flash fired, red-eye reduction mode, return light not detected\",\n 0x0047 : \"Flash fired, red-eye reduction mode, return light detected\",\n 0x0049 : \"Flash fired, compulsory flash mode, red-eye reduction mode\",\n 0x004D : \"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected\",\n 0x004F : \"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected\",\n 0x0059 : \"Flash fired, auto mode, red-eye reduction mode\",\n 0x005D : \"Flash fired, auto mode, return light not detected, red-eye reduction mode\",\n 0x005F : \"Flash fired, auto mode, return light detected, red-eye reduction mode\"\n },\n SensingMethod : {\n 1 : \"Not defined\",\n 2 : \"One-chip color area sensor\",\n 3 : \"Two-chip color area sensor\",\n 4 : \"Three-chip color area sensor\",\n 5 : \"Color sequential area sensor\",\n 7 : \"Trilinear sensor\",\n 8 : \"Color sequential linear sensor\"\n },\n SceneCaptureType : {\n 0 : \"Standard\",\n 1 : \"Landscape\",\n 2 : \"Portrait\",\n 3 : \"Night scene\"\n },\n SceneType : {\n 1 : \"Directly photographed\"\n },\n CustomRendered : {\n 0 : \"Normal process\",\n 1 : \"Custom process\"\n },\n WhiteBalance : {\n 0 : \"Auto white balance\",\n 1 : \"Manual white balance\"\n },\n GainControl : {\n 0 : \"None\",\n 1 : \"Low gain up\",\n 2 : \"High gain up\",\n 3 : \"Low gain down\",\n 4 : \"High gain down\"\n },\n Contrast : {\n 0 : \"Normal\",\n 1 : \"Soft\",\n 2 : \"Hard\"\n },\n Saturation : {\n 0 : \"Normal\",\n 1 : \"Low saturation\",\n 2 : \"High saturation\"\n },\n Sharpness : {\n 0 : \"Normal\",\n 1 : \"Soft\",\n 2 : \"Hard\"\n },\n SubjectDistanceRange : {\n 0 : \"Unknown\",\n 1 : \"Macro\",\n 2 : \"Close view\",\n 3 : \"Distant view\"\n },\n FileSource : {\n 3 : \"DSC\"\n },\n\n Components : {\n 0 : \"\",\n 1 : \"Y\",\n 2 : \"Cb\",\n 3 : \"Cr\",\n 4 : \"R\",\n 5 : \"G\",\n 6 : \"B\"\n }\n };\n\n function addEvent(element, event, handler) {\n if (element.addEventListener) {\n element.addEventListener(event, handler, false);\n } else if (element.attachEvent) {\n element.attachEvent(\"on\" + event, handler);\n }\n }\n\n function imageHasData(img) {\n return !!(img.exifdata);\n }\n\n\n function base64ToArrayBuffer(base64, contentType) {\n contentType = contentType || base64.match(/^data\\:([^\\;]+)\\;base64,/mi)[1] || ''; // e.g. 'data:image/jpeg;base64,...' => 'image/jpeg'\n base64 = base64.replace(/^data\\:([^\\;]+)\\;base64,/gmi, '');\n var binary = atob(base64);\n var len = binary.length;\n var buffer = new ArrayBuffer(len);\n var view = new Uint8Array(buffer);\n for (var i = 0; i < len; i++) {\n view[i] = binary.charCodeAt(i);\n }\n return buffer;\n }\n\n function objectURLToBlob(url, callback) {\n var http = new XMLHttpRequest();\n http.open(\"GET\", url, true);\n http.responseType = \"blob\";\n http.onload = function(e) {\n if (this.status == 200 || this.status === 0) {\n callback(this.response);\n }\n };\n http.send();\n }\n\n function getImageData(img, callback) {\n function handleBinaryFile(binFile) {\n var data = findEXIFinJPEG(binFile);\n img.exifdata = data || {};\n var iptcdata = findIPTCinJPEG(binFile);\n img.iptcdata = iptcdata || {};\n if (EXIF.isXmpEnabled) {\n var xmpdata= findXMPinJPEG(binFile);\n img.xmpdata = xmpdata || {}; \n }\n if (callback) {\n callback.call(img);\n }\n }\n\n if (img.src) {\n if (/^data\\:/i.test(img.src)) { // Data URI\n var arrayBuffer = base64ToArrayBuffer(img.src);\n handleBinaryFile(arrayBuffer);\n\n } else if (/^blob\\:/i.test(img.src)) { // Object URL\n var fileReader = new FileReader();\n fileReader.onload = function(e) {\n handleBinaryFile(e.target.result);\n };\n objectURLToBlob(img.src, function (blob) {\n fileReader.readAsArrayBuffer(blob);\n });\n } else {\n var http = new XMLHttpRequest();\n http.onload = function() {\n if (this.status == 200 || this.status === 0) {\n handleBinaryFile(http.response);\n } else {\n throw \"Could not load image\";\n }\n http = null;\n };\n http.open(\"GET\", img.src, true);\n http.responseType = \"arraybuffer\";\n http.send(null);\n }\n } else if (self.FileReader && (img instanceof self.Blob || img instanceof self.File)) {\n var fileReader = new FileReader();\n fileReader.onload = function(e) {\n if (debug) console.log(\"Got file of length \" + e.target.result.byteLength);\n handleBinaryFile(e.target.result);\n };\n\n fileReader.readAsArrayBuffer(img);\n }\n }\n\n function findEXIFinJPEG(file) {\n var dataView = new DataView(file);\n\n if (debug) console.log(\"Got file of length \" + file.byteLength);\n if ((dataView.getUint8(0) != 0xFF) || (dataView.getUint8(1) != 0xD8)) {\n if (debug) console.log(\"Not a valid JPEG\");\n return false; // not a valid jpeg\n }\n\n var offset = 2,\n length = file.byteLength,\n marker;\n\n while (offset < length) {\n if (dataView.getUint8(offset) != 0xFF) {\n if (debug) console.log(\"Not a valid marker at offset \" + offset + \", found: \" + dataView.getUint8(offset));\n return false; // not a valid marker, something is wrong\n }\n\n marker = dataView.getUint8(offset + 1);\n if (debug) console.log(marker);\n\n // we could implement handling for other markers here,\n // but we're only looking for 0xFFE1 for EXIF data\n\n if (marker == 225) {\n if (debug) console.log(\"Found 0xFFE1 marker\");\n\n return readEXIFData(dataView, offset + 4, dataView.getUint16(offset + 2) - 2);\n\n // offset += 2 + file.getShortAt(offset+2, true);\n\n } else {\n offset += 2 + dataView.getUint16(offset+2);\n }\n\n }\n\n }\n\n function findIPTCinJPEG(file) {\n var dataView = new DataView(file);\n\n if (debug) console.log(\"Got file of length \" + file.byteLength);\n if ((dataView.getUint8(0) != 0xFF) || (dataView.getUint8(1) != 0xD8)) {\n if (debug) console.log(\"Not a valid JPEG\");\n return false; // not a valid jpeg\n }\n\n var offset = 2,\n length = file.byteLength;\n\n\n var isFieldSegmentStart = function(dataView, offset){\n return (\n dataView.getUint8(offset) === 0x38 &&\n dataView.getUint8(offset+1) === 0x42 &&\n dataView.getUint8(offset+2) === 0x49 &&\n dataView.getUint8(offset+3) === 0x4D &&\n dataView.getUint8(offset+4) === 0x04 &&\n dataView.getUint8(offset+5) === 0x04\n );\n };\n\n while (offset < length) {\n\n if ( isFieldSegmentStart(dataView, offset )){\n\n // Get the length of the name header (which is padded to an even number of bytes)\n var nameHeaderLength = dataView.getUint8(offset+7);\n if(nameHeaderLength % 2 !== 0) nameHeaderLength += 1;\n // Check for pre photoshop 6 format\n if(nameHeaderLength === 0) {\n // Always 4\n nameHeaderLength = 4;\n }\n\n var startOffset = offset + 8 + nameHeaderLength;\n var sectionLength = dataView.getUint16(offset + 6 + nameHeaderLength);\n\n return readIPTCData(file, startOffset, sectionLength);\n\n break;\n\n }\n\n\n // Not the marker, continue searching\n offset++;\n\n }\n\n }\n var IptcFieldMap = {\n 0x78 : 'caption',\n 0x6E : 'credit',\n 0x19 : 'keywords',\n 0x37 : 'dateCreated',\n 0x50 : 'byline',\n 0x55 : 'bylineTitle',\n 0x7A : 'captionWriter',\n 0x69 : 'headline',\n 0x74 : 'copyright',\n 0x0F : 'category'\n };\n function readIPTCData(file, startOffset, sectionLength){\n var dataView = new DataView(file);\n var data = {};\n var fieldValue, fieldName, dataSize, segmentType, segmentSize;\n var segmentStartPos = startOffset;\n while(segmentStartPos < startOffset+sectionLength) {\n if(dataView.getUint8(segmentStartPos) === 0x1C && dataView.getUint8(segmentStartPos+1) === 0x02){\n segmentType = dataView.getUint8(segmentStartPos+2);\n if(segmentType in IptcFieldMap) {\n dataSize = dataView.getInt16(segmentStartPos+3);\n segmentSize = dataSize + 5;\n fieldName = IptcFieldMap[segmentType];\n fieldValue = getStringFromDB(dataView, segmentStartPos+5, dataSize);\n // Check if we already stored a value with this name\n if(data.hasOwnProperty(fieldName)) {\n // Value already stored with this name, create multivalue field\n if(data[fieldName] instanceof Array) {\n data[fieldName].push(fieldValue);\n }\n else {\n data[fieldName] = [data[fieldName], fieldValue];\n }\n }\n else {\n data[fieldName] = fieldValue;\n }\n }\n\n }\n segmentStartPos++;\n }\n return data;\n }\n\n\n\n function readTags(file, tiffStart, dirStart, strings, bigEnd) {\n var entries = file.getUint16(dirStart, !bigEnd),\n tags = {},\n entryOffset, tag,\n i;\n\n for (i=0;i 4 ? valueOffset : (entryOffset + 8);\n vals = [];\n for (n=0;n 4 ? valueOffset : (entryOffset + 8);\n return getStringFromDB(file, offset, numValues-1);\n\n case 3: // short, 16 bit int\n if (numValues == 1) {\n return file.getUint16(entryOffset + 8, !bigEnd);\n } else {\n offset = numValues > 2 ? valueOffset : (entryOffset + 8);\n vals = [];\n for (n=0;n dataView.byteLength) { // this should not happen\n // console.log('******** IFD1Offset is outside the bounds of the DataView ********');\n return {};\n }\n // console.log('******* thumbnail IFD offset (IFD1) is: %s', IFD1OffsetPointer);\n\n var thumbTags = readTags(dataView, tiffStart, tiffStart + IFD1OffsetPointer, IFD1Tags, bigEnd)\n\n // EXIF 2.3 specification for JPEG format thumbnail\n\n // If the value of Compression(0x0103) Tag in IFD1 is '6', thumbnail image format is JPEG.\n // Most of Exif image uses JPEG format for thumbnail. In that case, you can get offset of thumbnail\n // by JpegIFOffset(0x0201) Tag in IFD1, size of thumbnail by JpegIFByteCount(0x0202) Tag.\n // Data format is ordinary JPEG format, starts from 0xFFD8 and ends by 0xFFD9. It seems that\n // JPEG format and 160x120pixels of size are recommended thumbnail format for Exif2.1 or later.\n\n if (thumbTags['Compression']) {\n // console.log('Thumbnail image found!');\n\n switch (thumbTags['Compression']) {\n case 6:\n // console.log('Thumbnail image format is JPEG');\n if (thumbTags.JpegIFOffset && thumbTags.JpegIFByteCount) {\n // extract the thumbnail\n var tOffset = tiffStart + thumbTags.JpegIFOffset;\n var tLength = thumbTags.JpegIFByteCount;\n thumbTags['blob'] = new Blob([new Uint8Array(dataView.buffer, tOffset, tLength)], {\n type: 'image/jpeg'\n });\n }\n break;\n\n case 1:\n console.log(\"Thumbnail image format is TIFF, which is not implemented.\");\n break;\n default:\n console.log(\"Unknown thumbnail image format '%s'\", thumbTags['Compression']);\n }\n }\n else if (thumbTags['PhotometricInterpretation'] == 2) {\n console.log(\"Thumbnail image format is RGB, which is not implemented.\");\n }\n return thumbTags;\n }\n\n function getStringFromDB(buffer, start, length) {\n var outstr = \"\";\n for (n = start; n < start+length; n++) {\n outstr += String.fromCharCode(buffer.getUint8(n));\n }\n return outstr;\n }\n\n function readEXIFData(file, start) {\n if (getStringFromDB(file, start, 4) != \"Exif\") {\n if (debug) console.log(\"Not valid EXIF data! \" + getStringFromDB(file, start, 4));\n return false;\n }\n\n var bigEnd,\n tags, tag,\n exifData, gpsData,\n tiffOffset = start + 6;\n\n // test for TIFF validity and endianness\n if (file.getUint16(tiffOffset) == 0x4949) {\n bigEnd = false;\n } else if (file.getUint16(tiffOffset) == 0x4D4D) {\n bigEnd = true;\n } else {\n if (debug) console.log(\"Not valid TIFF data! (no 0x4949 or 0x4D4D)\");\n return false;\n }\n\n if (file.getUint16(tiffOffset+2, !bigEnd) != 0x002A) {\n if (debug) console.log(\"Not valid TIFF data! (no 0x002A)\");\n return false;\n }\n\n var firstIFDOffset = file.getUint32(tiffOffset+4, !bigEnd);\n\n if (firstIFDOffset < 0x00000008) {\n if (debug) console.log(\"Not valid TIFF data! (First offset less than 8)\", file.getUint32(tiffOffset+4, !bigEnd));\n return false;\n }\n\n tags = readTags(file, tiffOffset, tiffOffset + firstIFDOffset, TiffTags, bigEnd);\n\n if (tags.ExifIFDPointer) {\n exifData = readTags(file, tiffOffset, tiffOffset + tags.ExifIFDPointer, ExifTags, bigEnd);\n for (tag in exifData) {\n switch (tag) {\n case \"LightSource\" :\n case \"Flash\" :\n case \"MeteringMode\" :\n case \"ExposureProgram\" :\n case \"SensingMethod\" :\n case \"SceneCaptureType\" :\n case \"SceneType\" :\n case \"CustomRendered\" :\n case \"WhiteBalance\" :\n case \"GainControl\" :\n case \"Contrast\" :\n case \"Saturation\" :\n case \"Sharpness\" :\n case \"SubjectDistanceRange\" :\n case \"FileSource\" :\n exifData[tag] = StringValues[tag][exifData[tag]];\n break;\n\n case \"ExifVersion\" :\n case \"FlashpixVersion\" :\n exifData[tag] = String.fromCharCode(exifData[tag][0], exifData[tag][1], exifData[tag][2], exifData[tag][3]);\n break;\n\n case \"ComponentsConfiguration\" :\n exifData[tag] =\n StringValues.Components[exifData[tag][0]] +\n StringValues.Components[exifData[tag][1]] +\n StringValues.Components[exifData[tag][2]] +\n StringValues.Components[exifData[tag][3]];\n break;\n }\n tags[tag] = exifData[tag];\n }\n }\n\n if (tags.GPSInfoIFDPointer) {\n gpsData = readTags(file, tiffOffset, tiffOffset + tags.GPSInfoIFDPointer, GPSTags, bigEnd);\n for (tag in gpsData) {\n switch (tag) {\n case \"GPSVersionID\" :\n gpsData[tag] = gpsData[tag][0] +\n \".\" + gpsData[tag][1] +\n \".\" + gpsData[tag][2] +\n \".\" + gpsData[tag][3];\n break;\n }\n tags[tag] = gpsData[tag];\n }\n }\n\n // extract thumbnail\n tags['thumbnail'] = readThumbnailImage(file, tiffOffset, firstIFDOffset, bigEnd);\n\n return tags;\n }\n\n function findXMPinJPEG(file) {\n\n if (!('DOMParser' in self)) {\n // console.warn('XML parsing not supported without DOMParser');\n return;\n }\n var dataView = new DataView(file);\n\n if (debug) console.log(\"Got file of length \" + file.byteLength);\n if ((dataView.getUint8(0) != 0xFF) || (dataView.getUint8(1) != 0xD8)) {\n if (debug) console.log(\"Not a valid JPEG\");\n return false; // not a valid jpeg\n }\n\n var offset = 2,\n length = file.byteLength,\n dom = new DOMParser();\n\n while (offset < (length-4)) {\n if (getStringFromDB(dataView, offset, 4) == \"http\") {\n var startOffset = offset - 1;\n var sectionLength = dataView.getUint16(offset - 2) - 1;\n var xmpString = getStringFromDB(dataView, startOffset, sectionLength)\n var xmpEndIndex = xmpString.indexOf('xmpmeta>') + 8;\n xmpString = xmpString.substring( xmpString.indexOf( ' 0) {\n json['@attributes'] = {};\n for (var j = 0; j < xml.attributes.length; j++) {\n var attribute = xml.attributes.item(j);\n json['@attributes'][attribute.nodeName] = attribute.nodeValue;\n }\n }\n } else if (xml.nodeType == 3) { // text node\n return xml.nodeValue;\n }\n \n // deal with children\n if (xml.hasChildNodes()) {\n for(var i = 0; i < xml.childNodes.length; i++) {\n var child = xml.childNodes.item(i);\n var nodeName = child.nodeName;\n if (json[nodeName] == null) {\n json[nodeName] = xml2json(child);\n } else {\n if (json[nodeName].push == null) {\n var old = json[nodeName];\n json[nodeName] = [];\n json[nodeName].push(old);\n }\n json[nodeName].push(xml2json(child));\n }\n }\n }\n \n return json;\n }\n\n function xml2Object(xml) {\n try {\n var obj = {};\n if (xml.children.length > 0) {\n for (var i = 0; i < xml.children.length; i++) {\n var item = xml.children.item(i);\n var attributes = item.attributes;\n for(var idx in attributes) {\n var itemAtt = attributes[idx];\n var dataKey = itemAtt.nodeName;\n var dataValue = itemAtt.nodeValue;\n\n if(dataKey !== undefined) {\n obj[dataKey] = dataValue;\n }\n }\n var nodeName = item.nodeName;\n\n if (typeof (obj[nodeName]) == \"undefined\") {\n obj[nodeName] = xml2json(item);\n } else {\n if (typeof (obj[nodeName].push) == \"undefined\") {\n var old = obj[nodeName];\n\n obj[nodeName] = [];\n obj[nodeName].push(old);\n }\n obj[nodeName].push(xml2json(item));\n }\n }\n } else {\n obj = xml.textContent;\n }\n return obj;\n } catch (e) {\n console.log(e.message);\n }\n }\n\n EXIF.enableXmp = function() {\n EXIF.isXmpEnabled = true;\n }\n\n EXIF.disableXmp = function() {\n EXIF.isXmpEnabled = false;\n }\n\n EXIF.getData = function(img, callback) {\n if (((self.Image && img instanceof self.Image)\n || (self.HTMLImageElement && img instanceof self.HTMLImageElement))\n && !img.complete)\n return false;\n\n if (!imageHasData(img)) {\n getImageData(img, callback);\n } else {\n if (callback) {\n callback.call(img);\n }\n }\n return true;\n }\n\n EXIF.getTag = function(img, tag) {\n if (!imageHasData(img)) return;\n return img.exifdata[tag];\n }\n \n EXIF.getIptcTag = function(img, tag) {\n if (!imageHasData(img)) return;\n return img.iptcdata[tag];\n }\n\n EXIF.getAllTags = function(img) {\n if (!imageHasData(img)) return {};\n var a,\n data = img.exifdata,\n tags = {};\n for (a in data) {\n if (data.hasOwnProperty(a)) {\n tags[a] = data[a];\n }\n }\n return tags;\n }\n \n EXIF.getAllIptcTags = function(img) {\n if (!imageHasData(img)) return {};\n var a,\n data = img.iptcdata,\n tags = {};\n for (a in data) {\n if (data.hasOwnProperty(a)) {\n tags[a] = data[a];\n }\n }\n return tags;\n }\n\n EXIF.pretty = function(img) {\n if (!imageHasData(img)) return \"\";\n var a,\n data = img.exifdata,\n strPretty = \"\";\n for (a in data) {\n if (data.hasOwnProperty(a)) {\n if (typeof data[a] == \"object\") {\n if (data[a] instanceof Number) {\n strPretty += a + \" : \" + data[a] + \" [\" + data[a].numerator + \"/\" + data[a].denominator + \"]\\r\\n\";\n } else {\n strPretty += a + \" : [\" + data[a].length + \" values]\\r\\n\";\n }\n } else {\n strPretty += a + \" : \" + data[a] + \"\\r\\n\";\n }\n }\n }\n return strPretty;\n }\n\n EXIF.readFromBinaryFile = function(file) {\n return findEXIFinJPEG(file);\n }\n\n if (typeof define === 'function' && define.amd) {\n define('exif-js', [], function() {\n return EXIF;\n });\n }\n}.call(this));\n\n","/* pica 5.3.0 nodeca/pica */(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.pica = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i= 0,\n wasm: __requested_features.indexOf('wasm') >= 0\n };\n Multimath.call(this, features);\n this.features = {\n js: features.js,\n wasm: features.wasm && this.has_wasm()\n };\n this.use(mm_unsharp_mask);\n this.use(mm_resize);\n}\n\ninherits(MathLib, Multimath);\n\nMathLib.prototype.resizeAndUnsharp = function resizeAndUnsharp(options, cache) {\n var result = this.resize(options, cache);\n\n if (options.unsharpAmount) {\n this.unsharp_mask(result, options.toWidth, options.toHeight, options.unsharpAmount, options.unsharpRadius, options.unsharpThreshold);\n }\n\n return result;\n};\n\nmodule.exports = MathLib;\n\n},{\"./mm_resize\":4,\"inherits\":15,\"multimath\":16,\"multimath/lib/unsharp_mask\":19}],2:[function(_dereq_,module,exports){\n// Resize convolvers, pure JS implementation\n//\n'use strict'; // Precision of fixed FP values\n//var FIXED_FRAC_BITS = 14;\n\nfunction clampTo8(i) {\n return i < 0 ? 0 : i > 255 ? 255 : i;\n} // Convolve image in horizontal directions and transpose output. In theory,\n// transpose allow:\n//\n// - use the same convolver for both passes (this fails due different\n// types of input array and temporary buffer)\n// - making vertical pass by horisonltal lines inprove CPU cache use.\n//\n// But in real life this doesn't work :)\n//\n\n\nfunction convolveHorizontally(src, dest, srcW, srcH, destW, filters) {\n var r, g, b, a;\n var filterPtr, filterShift, filterSize;\n var srcPtr, srcY, destX, filterVal;\n var srcOffset = 0,\n destOffset = 0; // For each row\n\n for (srcY = 0; srcY < srcH; srcY++) {\n filterPtr = 0; // Apply precomputed filters to each destination row point\n\n for (destX = 0; destX < destW; destX++) {\n // Get the filter that determines the current output pixel.\n filterShift = filters[filterPtr++];\n filterSize = filters[filterPtr++];\n srcPtr = srcOffset + filterShift * 4 | 0;\n r = g = b = a = 0; // Apply the filter to the row to get the destination pixel r, g, b, a\n\n for (; filterSize > 0; filterSize--) {\n filterVal = filters[filterPtr++]; // Use reverse order to workaround deopts in old v8 (node v.10)\n // Big thanks to @mraleph (Vyacheslav Egorov) for the tip.\n\n a = a + filterVal * src[srcPtr + 3] | 0;\n b = b + filterVal * src[srcPtr + 2] | 0;\n g = g + filterVal * src[srcPtr + 1] | 0;\n r = r + filterVal * src[srcPtr] | 0;\n srcPtr = srcPtr + 4 | 0;\n } // Bring this value back in range. All of the filter scaling factors\n // are in fixed point with FIXED_FRAC_BITS bits of fractional part.\n //\n // (!) Add 1/2 of value before clamping to get proper rounding. In other\n // case brightness loss will be noticeable if you resize image with white\n // border and place it on white background.\n //\n\n\n dest[destOffset + 3] = clampTo8(a + (1 << 13) >> 14\n /*FIXED_FRAC_BITS*/\n );\n dest[destOffset + 2] = clampTo8(b + (1 << 13) >> 14\n /*FIXED_FRAC_BITS*/\n );\n dest[destOffset + 1] = clampTo8(g + (1 << 13) >> 14\n /*FIXED_FRAC_BITS*/\n );\n dest[destOffset] = clampTo8(r + (1 << 13) >> 14\n /*FIXED_FRAC_BITS*/\n );\n destOffset = destOffset + srcH * 4 | 0;\n }\n\n destOffset = (srcY + 1) * 4 | 0;\n srcOffset = (srcY + 1) * srcW * 4 | 0;\n }\n} // Technically, convolvers are the same. But input array and temporary\n// buffer can be of different type (especially, in old browsers). So,\n// keep code in separate functions to avoid deoptimizations & speed loss.\n\n\nfunction convolveVertically(src, dest, srcW, srcH, destW, filters) {\n var r, g, b, a;\n var filterPtr, filterShift, filterSize;\n var srcPtr, srcY, destX, filterVal;\n var srcOffset = 0,\n destOffset = 0; // For each row\n\n for (srcY = 0; srcY < srcH; srcY++) {\n filterPtr = 0; // Apply precomputed filters to each destination row point\n\n for (destX = 0; destX < destW; destX++) {\n // Get the filter that determines the current output pixel.\n filterShift = filters[filterPtr++];\n filterSize = filters[filterPtr++];\n srcPtr = srcOffset + filterShift * 4 | 0;\n r = g = b = a = 0; // Apply the filter to the row to get the destination pixel r, g, b, a\n\n for (; filterSize > 0; filterSize--) {\n filterVal = filters[filterPtr++]; // Use reverse order to workaround deopts in old v8 (node v.10)\n // Big thanks to @mraleph (Vyacheslav Egorov) for the tip.\n\n a = a + filterVal * src[srcPtr + 3] | 0;\n b = b + filterVal * src[srcPtr + 2] | 0;\n g = g + filterVal * src[srcPtr + 1] | 0;\n r = r + filterVal * src[srcPtr] | 0;\n srcPtr = srcPtr + 4 | 0;\n } // Bring this value back in range. All of the filter scaling factors\n // are in fixed point with FIXED_FRAC_BITS bits of fractional part.\n //\n // (!) Add 1/2 of value before clamping to get proper rounding. In other\n // case brightness loss will be noticeable if you resize image with white\n // border and place it on white background.\n //\n\n\n dest[destOffset + 3] = clampTo8(a + (1 << 13) >> 14\n /*FIXED_FRAC_BITS*/\n );\n dest[destOffset + 2] = clampTo8(b + (1 << 13) >> 14\n /*FIXED_FRAC_BITS*/\n );\n dest[destOffset + 1] = clampTo8(g + (1 << 13) >> 14\n /*FIXED_FRAC_BITS*/\n );\n dest[destOffset] = clampTo8(r + (1 << 13) >> 14\n /*FIXED_FRAC_BITS*/\n );\n destOffset = destOffset + srcH * 4 | 0;\n }\n\n destOffset = (srcY + 1) * 4 | 0;\n srcOffset = (srcY + 1) * srcW * 4 | 0;\n }\n}\n\nmodule.exports = {\n convolveHorizontally: convolveHorizontally,\n convolveVertically: convolveVertically\n};\n\n},{}],3:[function(_dereq_,module,exports){\n// This is autogenerated file from math.wasm, don't edit.\n//\n'use strict';\n/* eslint-disable max-len */\n\nmodule.exports = 'AGFzbQEAAAABFAJgBn9/f39/fwBgB39/f39/f38AAg8BA2VudgZtZW1vcnkCAAEDAwIAAQQEAXAAAAcZAghjb252b2x2ZQAACmNvbnZvbHZlSFYAAQkBAArmAwLBAwEQfwJAIANFDQAgBEUNACAFQQRqIRVBACEMQQAhDQNAIA0hDkEAIRFBACEHA0AgB0ECaiESAn8gBSAHQQF0IgdqIgZBAmouAQAiEwRAQQAhCEEAIBNrIRQgFSAHaiEPIAAgDCAGLgEAakECdGohEEEAIQlBACEKQQAhCwNAIBAoAgAiB0EYdiAPLgEAIgZsIAtqIQsgB0H/AXEgBmwgCGohCCAHQRB2Qf8BcSAGbCAKaiEKIAdBCHZB/wFxIAZsIAlqIQkgD0ECaiEPIBBBBGohECAUQQFqIhQNAAsgEiATagwBC0EAIQtBACEKQQAhCUEAIQggEgshByABIA5BAnRqIApBgMAAakEOdSIGQf8BIAZB/wFIG0EQdEGAgPwHcUEAIAZBAEobIAtBgMAAakEOdSIGQf8BIAZB/wFIG0EYdEEAIAZBAEobciAJQYDAAGpBDnUiBkH/ASAGQf8BSBtBCHRBgP4DcUEAIAZBAEobciAIQYDAAGpBDnUiBkH/ASAGQf8BSBtB/wFxQQAgBkEAShtyNgIAIA4gA2ohDiARQQFqIhEgBEcNAAsgDCACaiEMIA1BAWoiDSADRw0ACwsLIQACQEEAIAIgAyAEIAUgABAAIAJBACAEIAUgBiABEAALCw==';\n\n},{}],4:[function(_dereq_,module,exports){\n'use strict';\n\nmodule.exports = {\n name: 'resize',\n fn: _dereq_('./resize'),\n wasm_fn: _dereq_('./resize_wasm'),\n wasm_src: _dereq_('./convolve_wasm_base64')\n};\n\n},{\"./convolve_wasm_base64\":3,\"./resize\":5,\"./resize_wasm\":8}],5:[function(_dereq_,module,exports){\n'use strict';\n\nvar createFilters = _dereq_('./resize_filter_gen');\n\nvar convolveHorizontally = _dereq_('./convolve').convolveHorizontally;\n\nvar convolveVertically = _dereq_('./convolve').convolveVertically;\n\nfunction resetAlpha(dst, width, height) {\n var ptr = 3,\n len = width * height * 4 | 0;\n\n while (ptr < len) {\n dst[ptr] = 0xFF;\n ptr = ptr + 4 | 0;\n }\n}\n\nmodule.exports = function resize(options) {\n var src = options.src;\n var srcW = options.width;\n var srcH = options.height;\n var destW = options.toWidth;\n var destH = options.toHeight;\n var scaleX = options.scaleX || options.toWidth / options.width;\n var scaleY = options.scaleY || options.toHeight / options.height;\n var offsetX = options.offsetX || 0;\n var offsetY = options.offsetY || 0;\n var dest = options.dest || new Uint8Array(destW * destH * 4);\n var quality = typeof options.quality === 'undefined' ? 3 : options.quality;\n var alpha = options.alpha || false;\n var filtersX = createFilters(quality, srcW, destW, scaleX, offsetX),\n filtersY = createFilters(quality, srcH, destH, scaleY, offsetY);\n var tmp = new Uint8Array(destW * srcH * 4); // To use single function we need src & tmp of the same type.\n // But src can be CanvasPixelArray, and tmp - Uint8Array. So, keep\n // vertical and horizontal passes separately to avoid deoptimization.\n\n convolveHorizontally(src, tmp, srcW, srcH, destW, filtersX);\n convolveVertically(tmp, dest, srcH, destW, destH, filtersY); // That's faster than doing checks in convolver.\n // !!! Note, canvas data is not premultipled. We don't need other\n // alpha corrections.\n\n if (!alpha) resetAlpha(dest, destW, destH);\n return dest;\n};\n\n},{\"./convolve\":2,\"./resize_filter_gen\":6}],6:[function(_dereq_,module,exports){\n// Calculate convolution filters for each destination point,\n// and pack data to Int16Array:\n//\n// [ shift, length, data..., shift2, length2, data..., ... ]\n//\n// - shift - offset in src image\n// - length - filter length (in src points)\n// - data - filter values sequence\n//\n'use strict';\n\nvar FILTER_INFO = _dereq_('./resize_filter_info'); // Precision of fixed FP values\n\n\nvar FIXED_FRAC_BITS = 14;\n\nfunction toFixedPoint(num) {\n return Math.round(num * ((1 << FIXED_FRAC_BITS) - 1));\n}\n\nmodule.exports = function resizeFilterGen(quality, srcSize, destSize, scale, offset) {\n var filterFunction = FILTER_INFO[quality].filter;\n var scaleInverted = 1.0 / scale;\n var scaleClamped = Math.min(1.0, scale); // For upscale\n // Filter window (averaging interval), scaled to src image\n\n var srcWindow = FILTER_INFO[quality].win / scaleClamped;\n var destPixel, srcPixel, srcFirst, srcLast, filterElementSize, floatFilter, fxpFilter, total, pxl, idx, floatVal, filterTotal, filterVal;\n var leftNotEmpty, rightNotEmpty, filterShift, filterSize;\n var maxFilterElementSize = Math.floor((srcWindow + 1) * 2);\n var packedFilter = new Int16Array((maxFilterElementSize + 2) * destSize);\n var packedFilterPtr = 0;\n var slowCopy = !packedFilter.subarray || !packedFilter.set; // For each destination pixel calculate source range and built filter values\n\n for (destPixel = 0; destPixel < destSize; destPixel++) {\n // Scaling should be done relative to central pixel point\n srcPixel = (destPixel + 0.5) * scaleInverted + offset;\n srcFirst = Math.max(0, Math.floor(srcPixel - srcWindow));\n srcLast = Math.min(srcSize - 1, Math.ceil(srcPixel + srcWindow));\n filterElementSize = srcLast - srcFirst + 1;\n floatFilter = new Float32Array(filterElementSize);\n fxpFilter = new Int16Array(filterElementSize);\n total = 0.0; // Fill filter values for calculated range\n\n for (pxl = srcFirst, idx = 0; pxl <= srcLast; pxl++, idx++) {\n floatVal = filterFunction((pxl + 0.5 - srcPixel) * scaleClamped);\n total += floatVal;\n floatFilter[idx] = floatVal;\n } // Normalize filter, convert to fixed point and accumulate conversion error\n\n\n filterTotal = 0;\n\n for (idx = 0; idx < floatFilter.length; idx++) {\n filterVal = floatFilter[idx] / total;\n filterTotal += filterVal;\n fxpFilter[idx] = toFixedPoint(filterVal);\n } // Compensate normalization error, to minimize brightness drift\n\n\n fxpFilter[destSize >> 1] += toFixedPoint(1.0 - filterTotal); //\n // Now pack filter to useable form\n //\n // 1. Trim heading and tailing zero values, and compensate shitf/length\n // 2. Put all to single array in this format:\n //\n // [ pos shift, data length, value1, value2, value3, ... ]\n //\n\n leftNotEmpty = 0;\n\n while (leftNotEmpty < fxpFilter.length && fxpFilter[leftNotEmpty] === 0) {\n leftNotEmpty++;\n }\n\n if (leftNotEmpty < fxpFilter.length) {\n rightNotEmpty = fxpFilter.length - 1;\n\n while (rightNotEmpty > 0 && fxpFilter[rightNotEmpty] === 0) {\n rightNotEmpty--;\n }\n\n filterShift = srcFirst + leftNotEmpty;\n filterSize = rightNotEmpty - leftNotEmpty + 1;\n packedFilter[packedFilterPtr++] = filterShift; // shift\n\n packedFilter[packedFilterPtr++] = filterSize; // size\n\n if (!slowCopy) {\n packedFilter.set(fxpFilter.subarray(leftNotEmpty, rightNotEmpty + 1), packedFilterPtr);\n packedFilterPtr += filterSize;\n } else {\n // fallback for old IE < 11, without subarray/set methods\n for (idx = leftNotEmpty; idx <= rightNotEmpty; idx++) {\n packedFilter[packedFilterPtr++] = fxpFilter[idx];\n }\n }\n } else {\n // zero data, write header only\n packedFilter[packedFilterPtr++] = 0; // shift\n\n packedFilter[packedFilterPtr++] = 0; // size\n }\n }\n\n return packedFilter;\n};\n\n},{\"./resize_filter_info\":7}],7:[function(_dereq_,module,exports){\n// Filter definitions to build tables for\n// resizing convolvers.\n//\n// Presets for quality 0..3. Filter functions + window size\n//\n'use strict';\n\nmodule.exports = [{\n // Nearest neibor (Box)\n win: 0.5,\n filter: function filter(x) {\n return x >= -0.5 && x < 0.5 ? 1.0 : 0.0;\n }\n}, {\n // Hamming\n win: 1.0,\n filter: function filter(x) {\n if (x <= -1.0 || x >= 1.0) {\n return 0.0;\n }\n\n if (x > -1.19209290E-07 && x < 1.19209290E-07) {\n return 1.0;\n }\n\n var xpi = x * Math.PI;\n return Math.sin(xpi) / xpi * (0.54 + 0.46 * Math.cos(xpi / 1.0));\n }\n}, {\n // Lanczos, win = 2\n win: 2.0,\n filter: function filter(x) {\n if (x <= -2.0 || x >= 2.0) {\n return 0.0;\n }\n\n if (x > -1.19209290E-07 && x < 1.19209290E-07) {\n return 1.0;\n }\n\n var xpi = x * Math.PI;\n return Math.sin(xpi) / xpi * Math.sin(xpi / 2.0) / (xpi / 2.0);\n }\n}, {\n // Lanczos, win = 3\n win: 3.0,\n filter: function filter(x) {\n if (x <= -3.0 || x >= 3.0) {\n return 0.0;\n }\n\n if (x > -1.19209290E-07 && x < 1.19209290E-07) {\n return 1.0;\n }\n\n var xpi = x * Math.PI;\n return Math.sin(xpi) / xpi * Math.sin(xpi / 3.0) / (xpi / 3.0);\n }\n}];\n\n},{}],8:[function(_dereq_,module,exports){\n'use strict';\n\nvar createFilters = _dereq_('./resize_filter_gen');\n\nfunction resetAlpha(dst, width, height) {\n var ptr = 3,\n len = width * height * 4 | 0;\n\n while (ptr < len) {\n dst[ptr] = 0xFF;\n ptr = ptr + 4 | 0;\n }\n}\n\nfunction asUint8Array(src) {\n return new Uint8Array(src.buffer, 0, src.byteLength);\n}\n\nvar IS_LE = true; // should not crash everything on module load in old browsers\n\ntry {\n IS_LE = new Uint32Array(new Uint8Array([1, 0, 0, 0]).buffer)[0] === 1;\n} catch (__) {}\n\nfunction copyInt16asLE(src, target, target_offset) {\n if (IS_LE) {\n target.set(asUint8Array(src), target_offset);\n return;\n }\n\n for (var ptr = target_offset, i = 0; i < src.length; i++) {\n var data = src[i];\n target[ptr++] = data & 0xFF;\n target[ptr++] = data >> 8 & 0xFF;\n }\n}\n\nmodule.exports = function resize_wasm(options) {\n var src = options.src;\n var srcW = options.width;\n var srcH = options.height;\n var destW = options.toWidth;\n var destH = options.toHeight;\n var scaleX = options.scaleX || options.toWidth / options.width;\n var scaleY = options.scaleY || options.toHeight / options.height;\n var offsetX = options.offsetX || 0.0;\n var offsetY = options.offsetY || 0.0;\n var dest = options.dest || new Uint8Array(destW * destH * 4);\n var quality = typeof options.quality === 'undefined' ? 3 : options.quality;\n var alpha = options.alpha || false;\n var filtersX = createFilters(quality, srcW, destW, scaleX, offsetX),\n filtersY = createFilters(quality, srcH, destH, scaleY, offsetY); // destination is 0 too.\n\n var src_offset = 0; // buffer between convolve passes\n\n var tmp_offset = this.__align(src_offset + Math.max(src.byteLength, dest.byteLength));\n\n var filtersX_offset = this.__align(tmp_offset + srcH * destW * 4);\n\n var filtersY_offset = this.__align(filtersX_offset + filtersX.byteLength);\n\n var alloc_bytes = filtersY_offset + filtersY.byteLength;\n\n var instance = this.__instance('resize', alloc_bytes); //\n // Fill memory block with data to process\n //\n\n\n var mem = new Uint8Array(this.__memory.buffer);\n var mem32 = new Uint32Array(this.__memory.buffer); // 32-bit copy is much faster in chrome\n\n var src32 = new Uint32Array(src.buffer);\n mem32.set(src32); // We should guarantee LE bytes order. Filters are not big, so\n // speed difference is not significant vs direct .set()\n\n copyInt16asLE(filtersX, mem, filtersX_offset);\n copyInt16asLE(filtersY, mem, filtersY_offset); //\n // Now call webassembly method\n // emsdk does method names with '_'\n\n var fn = instance.exports.convolveHV || instance.exports._convolveHV;\n fn(filtersX_offset, filtersY_offset, tmp_offset, srcW, srcH, destW, destH); //\n // Copy data back to typed array\n //\n // 32-bit copy is much faster in chrome\n\n var dest32 = new Uint32Array(dest.buffer);\n dest32.set(new Uint32Array(this.__memory.buffer, 0, destH * destW)); // That's faster than doing checks in convolver.\n // !!! Note, canvas data is not premultipled. We don't need other\n // alpha corrections.\n\n if (!alpha) resetAlpha(dest, destW, destH);\n return dest;\n};\n\n},{\"./resize_filter_gen\":6}],9:[function(_dereq_,module,exports){\n'use strict';\n\nvar GC_INTERVAL = 100;\n\nfunction Pool(create, idle) {\n this.create = create;\n this.available = [];\n this.acquired = {};\n this.lastId = 1;\n this.timeoutId = 0;\n this.idle = idle || 2000;\n}\n\nPool.prototype.acquire = function () {\n var _this = this;\n\n var resource;\n\n if (this.available.length !== 0) {\n resource = this.available.pop();\n } else {\n resource = this.create();\n resource.id = this.lastId++;\n\n resource.release = function () {\n return _this.release(resource);\n };\n }\n\n this.acquired[resource.id] = resource;\n return resource;\n};\n\nPool.prototype.release = function (resource) {\n var _this2 = this;\n\n delete this.acquired[resource.id];\n resource.lastUsed = Date.now();\n this.available.push(resource);\n\n if (this.timeoutId === 0) {\n this.timeoutId = setTimeout(function () {\n return _this2.gc();\n }, GC_INTERVAL);\n }\n};\n\nPool.prototype.gc = function () {\n var _this3 = this;\n\n var now = Date.now();\n this.available = this.available.filter(function (resource) {\n if (now - resource.lastUsed > _this3.idle) {\n resource.destroy();\n return false;\n }\n\n return true;\n });\n\n if (this.available.length !== 0) {\n this.timeoutId = setTimeout(function () {\n return _this3.gc();\n }, GC_INTERVAL);\n } else {\n this.timeoutId = 0;\n }\n};\n\nmodule.exports = Pool;\n\n},{}],10:[function(_dereq_,module,exports){\n// Add intermediate resizing steps when scaling down by a very large factor.\n//\n// For example, when resizing 10000x10000 down to 10x10, it'll resize it to\n// 300x300 first.\n//\n// It's needed because tiler has issues when the entire tile is scaled down\n// to a few pixels (1024px source tile with border size 3 should result in\n// at least 3+3+2 = 8px target tile, so max scale factor is 128 here).\n//\n// Also, adding intermediate steps can speed up processing if we use lower\n// quality algorithms for first stages.\n//\n'use strict'; // min size = 0 results in infinite loop,\n// min size = 1 can consume large amount of memory\n\nvar MIN_INNER_TILE_SIZE = 2;\n\nmodule.exports = function createStages(fromWidth, fromHeight, toWidth, toHeight, srcTileSize, destTileBorder) {\n var scaleX = toWidth / fromWidth;\n var scaleY = toHeight / fromHeight; // derived from createRegions equation:\n // innerTileWidth = pixelFloor(srcTileSize * scaleX) - 2 * destTileBorder;\n\n var minScale = (2 * destTileBorder + MIN_INNER_TILE_SIZE + 1) / srcTileSize; // refuse to scale image multiple times by less than twice each time,\n // it could only happen because of invalid options\n\n if (minScale > 0.5) return [[toWidth, toHeight]];\n var stageCount = Math.ceil(Math.log(Math.min(scaleX, scaleY)) / Math.log(minScale)); // no additional resizes are necessary,\n // stageCount can be zero or be negative when enlarging the image\n\n if (stageCount <= 1) return [[toWidth, toHeight]];\n var result = [];\n\n for (var i = 0; i < stageCount; i++) {\n var width = Math.round(Math.pow(Math.pow(fromWidth, stageCount - i - 1) * Math.pow(toWidth, i + 1), 1 / stageCount));\n var height = Math.round(Math.pow(Math.pow(fromHeight, stageCount - i - 1) * Math.pow(toHeight, i + 1), 1 / stageCount));\n result.push([width, height]);\n }\n\n return result;\n};\n\n},{}],11:[function(_dereq_,module,exports){\n// Split original image into multiple 1024x1024 chunks to reduce memory usage\n// (images have to be unpacked into typed arrays for resizing) and allow\n// parallel processing of multiple tiles at a time.\n//\n'use strict';\n/*\n * pixelFloor and pixelCeil are modified versions of Math.floor and Math.ceil\n * functions which take into account floating point arithmetic errors.\n * Those errors can cause undesired increments/decrements of sizes and offsets:\n * Math.ceil(36 / (36 / 500)) = 501\n * pixelCeil(36 / (36 / 500)) = 500\n */\n\nvar PIXEL_EPSILON = 1e-5;\n\nfunction pixelFloor(x) {\n var nearest = Math.round(x);\n\n if (Math.abs(x - nearest) < PIXEL_EPSILON) {\n return nearest;\n }\n\n return Math.floor(x);\n}\n\nfunction pixelCeil(x) {\n var nearest = Math.round(x);\n\n if (Math.abs(x - nearest) < PIXEL_EPSILON) {\n return nearest;\n }\n\n return Math.ceil(x);\n}\n\nmodule.exports = function createRegions(options) {\n var scaleX = options.toWidth / options.width;\n var scaleY = options.toHeight / options.height;\n var innerTileWidth = pixelFloor(options.srcTileSize * scaleX) - 2 * options.destTileBorder;\n var innerTileHeight = pixelFloor(options.srcTileSize * scaleY) - 2 * options.destTileBorder; // prevent infinite loop, this should never happen\n\n if (innerTileWidth < 1 || innerTileHeight < 1) {\n throw new Error('Internal error in pica: target tile width/height is too small.');\n }\n\n var x, y;\n var innerX, innerY, toTileWidth, toTileHeight;\n var tiles = [];\n var tile; // we go top-to-down instead of left-to-right to make image displayed from top to\n // doesn in the browser\n\n for (innerY = 0; innerY < options.toHeight; innerY += innerTileHeight) {\n for (innerX = 0; innerX < options.toWidth; innerX += innerTileWidth) {\n x = innerX - options.destTileBorder;\n\n if (x < 0) {\n x = 0;\n }\n\n toTileWidth = innerX + innerTileWidth + options.destTileBorder - x;\n\n if (x + toTileWidth >= options.toWidth) {\n toTileWidth = options.toWidth - x;\n }\n\n y = innerY - options.destTileBorder;\n\n if (y < 0) {\n y = 0;\n }\n\n toTileHeight = innerY + innerTileHeight + options.destTileBorder - y;\n\n if (y + toTileHeight >= options.toHeight) {\n toTileHeight = options.toHeight - y;\n }\n\n tile = {\n toX: x,\n toY: y,\n toWidth: toTileWidth,\n toHeight: toTileHeight,\n toInnerX: innerX,\n toInnerY: innerY,\n toInnerWidth: innerTileWidth,\n toInnerHeight: innerTileHeight,\n offsetX: x / scaleX - pixelFloor(x / scaleX),\n offsetY: y / scaleY - pixelFloor(y / scaleY),\n scaleX: scaleX,\n scaleY: scaleY,\n x: pixelFloor(x / scaleX),\n y: pixelFloor(y / scaleY),\n width: pixelCeil(toTileWidth / scaleX),\n height: pixelCeil(toTileHeight / scaleY)\n };\n tiles.push(tile);\n }\n }\n\n return tiles;\n};\n\n},{}],12:[function(_dereq_,module,exports){\n'use strict';\n\nfunction objClass(obj) {\n return Object.prototype.toString.call(obj);\n}\n\nmodule.exports.isCanvas = function isCanvas(element) {\n //return (element.nodeName && element.nodeName.toLowerCase() === 'canvas') ||\n var cname = objClass(element);\n return cname === '[object HTMLCanvasElement]'\n /* browser */\n || cname === '[object OffscreenCanvas]' || cname === '[object Canvas]'\n /* node-canvas */\n ;\n};\n\nmodule.exports.isImage = function isImage(element) {\n //return element.nodeName && element.nodeName.toLowerCase() === 'img';\n return objClass(element) === '[object HTMLImageElement]';\n};\n\nmodule.exports.limiter = function limiter(concurrency) {\n var active = 0,\n queue = [];\n\n function roll() {\n if (active < concurrency && queue.length) {\n active++;\n queue.shift()();\n }\n }\n\n return function limit(fn) {\n return new Promise(function (resolve, reject) {\n queue.push(function () {\n fn().then(function (result) {\n resolve(result);\n active--;\n roll();\n }, function (err) {\n reject(err);\n active--;\n roll();\n });\n });\n roll();\n });\n };\n};\n\nmodule.exports.cib_quality_name = function cib_quality_name(num) {\n switch (num) {\n case 0:\n return 'pixelated';\n\n case 1:\n return 'low';\n\n case 2:\n return 'medium';\n }\n\n return 'high';\n};\n\nmodule.exports.cib_support = function cib_support() {\n return Promise.resolve().then(function () {\n if (typeof createImageBitmap === 'undefined' || typeof document === 'undefined') {\n return false;\n }\n\n var c = document.createElement('canvas');\n c.width = 100;\n c.height = 100;\n return createImageBitmap(c, 0, 0, 100, 100, {\n resizeWidth: 10,\n resizeHeight: 10,\n resizeQuality: 'high'\n }).then(function (bitmap) {\n var status = bitmap.width === 10; // Branch below is filtered on upper level. We do not call resize\n // detection for basic ImageBitmap.\n //\n // https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap\n // old Crome 51 has ImageBitmap without .close(). Then this code\n // will throw and return 'false' as expected.\n //\n\n bitmap.close();\n c = null;\n return status;\n });\n })[\"catch\"](function () {\n return false;\n });\n};\n\n},{}],13:[function(_dereq_,module,exports){\n// Web Worker wrapper for image resize function\n'use strict';\n\nmodule.exports = function () {\n var MathLib = _dereq_('./mathlib');\n\n var mathLib;\n /* eslint-disable no-undef */\n\n onmessage = function onmessage(ev) {\n var opts = ev.data.opts;\n if (!mathLib) mathLib = new MathLib(ev.data.features); // Use multimath's sync auto-init. Avoid Promise use in old browsers,\n // because polyfills are not propagated to webworker.\n\n var result = mathLib.resizeAndUnsharp(opts);\n postMessage({\n result: result\n }, [result.buffer]);\n };\n};\n\n},{\"./mathlib\":1}],14:[function(_dereq_,module,exports){\n// Calculate Gaussian blur of an image using IIR filter\n// The method is taken from Intel's white paper and code example attached to it:\n// https://software.intel.com/en-us/articles/iir-gaussian-blur-filter\n// -implementation-using-intel-advanced-vector-extensions\n\nvar a0, a1, a2, a3, b1, b2, left_corner, right_corner;\n\nfunction gaussCoef(sigma) {\n if (sigma < 0.5) {\n sigma = 0.5;\n }\n\n var a = Math.exp(0.726 * 0.726) / sigma,\n g1 = Math.exp(-a),\n g2 = Math.exp(-2 * a),\n k = (1 - g1) * (1 - g1) / (1 + 2 * a * g1 - g2);\n\n a0 = k;\n a1 = k * (a - 1) * g1;\n a2 = k * (a + 1) * g1;\n a3 = -k * g2;\n b1 = 2 * g1;\n b2 = -g2;\n left_corner = (a0 + a1) / (1 - b1 - b2);\n right_corner = (a2 + a3) / (1 - b1 - b2);\n\n // Attempt to force type to FP32.\n return new Float32Array([ a0, a1, a2, a3, b1, b2, left_corner, right_corner ]);\n}\n\nfunction convolveMono16(src, out, line, coeff, width, height) {\n // takes src image and writes the blurred and transposed result into out\n\n var prev_src, curr_src, curr_out, prev_out, prev_prev_out;\n var src_index, out_index, line_index;\n var i, j;\n var coeff_a0, coeff_a1, coeff_b1, coeff_b2;\n\n for (i = 0; i < height; i++) {\n src_index = i * width;\n out_index = i;\n line_index = 0;\n\n // left to right\n prev_src = src[src_index];\n prev_prev_out = prev_src * coeff[6];\n prev_out = prev_prev_out;\n\n coeff_a0 = coeff[0];\n coeff_a1 = coeff[1];\n coeff_b1 = coeff[4];\n coeff_b2 = coeff[5];\n\n for (j = 0; j < width; j++) {\n curr_src = src[src_index];\n\n curr_out = curr_src * coeff_a0 +\n prev_src * coeff_a1 +\n prev_out * coeff_b1 +\n prev_prev_out * coeff_b2;\n\n prev_prev_out = prev_out;\n prev_out = curr_out;\n prev_src = curr_src;\n\n line[line_index] = prev_out;\n line_index++;\n src_index++;\n }\n\n src_index--;\n line_index--;\n out_index += height * (width - 1);\n\n // right to left\n prev_src = src[src_index];\n prev_prev_out = prev_src * coeff[7];\n prev_out = prev_prev_out;\n curr_src = prev_src;\n\n coeff_a0 = coeff[2];\n coeff_a1 = coeff[3];\n\n for (j = width - 1; j >= 0; j--) {\n curr_out = curr_src * coeff_a0 +\n prev_src * coeff_a1 +\n prev_out * coeff_b1 +\n prev_prev_out * coeff_b2;\n\n prev_prev_out = prev_out;\n prev_out = curr_out;\n\n prev_src = curr_src;\n curr_src = src[src_index];\n\n out[out_index] = line[line_index] + prev_out;\n\n src_index--;\n line_index--;\n out_index -= height;\n }\n }\n}\n\n\nfunction blurMono16(src, width, height, radius) {\n // Quick exit on zero radius\n if (!radius) { return; }\n\n var out = new Uint16Array(src.length),\n tmp_line = new Float32Array(Math.max(width, height));\n\n var coeff = gaussCoef(radius);\n\n convolveMono16(src, out, tmp_line, coeff, width, height, radius);\n convolveMono16(out, src, tmp_line, coeff, height, width, radius);\n}\n\nmodule.exports = blurMono16;\n\n},{}],15:[function(_dereq_,module,exports){\nif (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n }\n}\n\n},{}],16:[function(_dereq_,module,exports){\n'use strict';\n\n\nvar assign = _dereq_('object-assign');\nvar base64decode = _dereq_('./lib/base64decode');\nvar hasWebAssembly = _dereq_('./lib/wa_detect');\n\n\nvar DEFAULT_OPTIONS = {\n js: true,\n wasm: true\n};\n\n\nfunction MultiMath(options) {\n if (!(this instanceof MultiMath)) return new MultiMath(options);\n\n var opts = assign({}, DEFAULT_OPTIONS, options || {});\n\n this.options = opts;\n\n this.__cache = {};\n\n this.__init_promise = null;\n this.__modules = opts.modules || {};\n this.__memory = null;\n this.__wasm = {};\n\n this.__isLE = ((new Uint32Array((new Uint8Array([ 1, 0, 0, 0 ])).buffer))[0] === 1);\n\n if (!this.options.js && !this.options.wasm) {\n throw new Error('mathlib: at least \"js\" or \"wasm\" should be enabled');\n }\n}\n\n\nMultiMath.prototype.has_wasm = hasWebAssembly;\n\n\nMultiMath.prototype.use = function (module) {\n this.__modules[module.name] = module;\n\n // Pin the best possible implementation\n if (this.options.wasm && this.has_wasm() && module.wasm_fn) {\n this[module.name] = module.wasm_fn;\n } else {\n this[module.name] = module.fn;\n }\n\n return this;\n};\n\n\nMultiMath.prototype.init = function () {\n if (this.__init_promise) return this.__init_promise;\n\n if (!this.options.js && this.options.wasm && !this.has_wasm()) {\n return Promise.reject(new Error('mathlib: only \"wasm\" was enabled, but it\\'s not supported'));\n }\n\n var self = this;\n\n this.__init_promise = Promise.all(Object.keys(self.__modules).map(function (name) {\n var module = self.__modules[name];\n\n if (!self.options.wasm || !self.has_wasm() || !module.wasm_fn) return null;\n\n // If already compiled - exit\n if (self.__wasm[name]) return null;\n\n // Compile wasm source\n return WebAssembly.compile(self.__base64decode(module.wasm_src))\n .then(function (m) { self.__wasm[name] = m; });\n }))\n .then(function () { return self; });\n\n return this.__init_promise;\n};\n\n\n////////////////////////////////////////////////////////////////////////////////\n// Methods below are for internal use from plugins\n\n\n// Simple decode base64 to typed array. Useful to load embedded webassembly\n// code. You probably don't need to call this method directly.\n//\nMultiMath.prototype.__base64decode = base64decode;\n\n\n// Increase current memory to include specified number of bytes. Do nothing if\n// size is already ok. You probably don't need to call this method directly,\n// because it will be invoked from `.__instance()`.\n//\nMultiMath.prototype.__reallocate = function mem_grow_to(bytes) {\n if (!this.__memory) {\n this.__memory = new WebAssembly.Memory({\n initial: Math.ceil(bytes / (64 * 1024))\n });\n return this.__memory;\n }\n\n var mem_size = this.__memory.buffer.byteLength;\n\n if (mem_size < bytes) {\n this.__memory.grow(Math.ceil((bytes - mem_size) / (64 * 1024)));\n }\n\n return this.__memory;\n};\n\n\n// Returns instantinated webassembly item by name, with specified memory size\n// and environment.\n// - use cache if available\n// - do sync module init, if async init was not called earlier\n// - allocate memory if not enougth\n// - can export functions to webassembly via \"env_extra\",\n// for example, { exp: Math.exp }\n//\nMultiMath.prototype.__instance = function instance(name, memsize, env_extra) {\n if (memsize) this.__reallocate(memsize);\n\n // If .init() was not called, do sync compile\n if (!this.__wasm[name]) {\n var module = this.__modules[name];\n this.__wasm[name] = new WebAssembly.Module(this.__base64decode(module.wasm_src));\n }\n\n if (!this.__cache[name]) {\n var env_base = {\n memoryBase: 0,\n memory: this.__memory,\n tableBase: 0,\n table: new WebAssembly.Table({ initial: 0, element: 'anyfunc' })\n };\n\n this.__cache[name] = new WebAssembly.Instance(this.__wasm[name], {\n env: assign(env_base, env_extra || {})\n });\n }\n\n return this.__cache[name];\n};\n\n\n// Helper to calculate memory aligh for pointers. Webassembly does not require\n// this, but you may wish to experiment. Default base = 8;\n//\nMultiMath.prototype.__align = function align(number, base) {\n base = base || 8;\n var reminder = number % base;\n return number + (reminder ? base - reminder : 0);\n};\n\n\nmodule.exports = MultiMath;\n\n},{\"./lib/base64decode\":17,\"./lib/wa_detect\":23,\"object-assign\":24}],17:[function(_dereq_,module,exports){\n// base64 decode str -> Uint8Array, to load WA modules\n//\n'use strict';\n\n\nvar BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\n\nmodule.exports = function base64decode(str) {\n var input = str.replace(/[\\r\\n=]/g, ''), // remove CR/LF & padding to simplify scan\n max = input.length;\n\n var out = new Uint8Array((max * 3) >> 2);\n\n // Collect by 6*4 bits (3 bytes)\n\n var bits = 0;\n var ptr = 0;\n\n for (var idx = 0; idx < max; idx++) {\n if ((idx % 4 === 0) && idx) {\n out[ptr++] = (bits >> 16) & 0xFF;\n out[ptr++] = (bits >> 8) & 0xFF;\n out[ptr++] = bits & 0xFF;\n }\n\n bits = (bits << 6) | BASE64_MAP.indexOf(input.charAt(idx));\n }\n\n // Dump tail\n\n var tailbits = (max % 4) * 6;\n\n if (tailbits === 0) {\n out[ptr++] = (bits >> 16) & 0xFF;\n out[ptr++] = (bits >> 8) & 0xFF;\n out[ptr++] = bits & 0xFF;\n } else if (tailbits === 18) {\n out[ptr++] = (bits >> 10) & 0xFF;\n out[ptr++] = (bits >> 2) & 0xFF;\n } else if (tailbits === 12) {\n out[ptr++] = (bits >> 4) & 0xFF;\n }\n\n return out;\n};\n\n},{}],18:[function(_dereq_,module,exports){\n// Calculates 16-bit precision HSL lightness from 8-bit rgba buffer\n//\n'use strict';\n\n\nmodule.exports = function hsl_l16_js(img, width, height) {\n var size = width * height;\n var out = new Uint16Array(size);\n var r, g, b, min, max;\n for (var i = 0; i < size; i++) {\n r = img[4 * i];\n g = img[4 * i + 1];\n b = img[4 * i + 2];\n max = (r >= g && r >= b) ? r : (g >= b && g >= r) ? g : b;\n min = (r <= g && r <= b) ? r : (g <= b && g <= r) ? g : b;\n out[i] = (max + min) * 257 >> 1;\n }\n return out;\n};\n\n},{}],19:[function(_dereq_,module,exports){\n'use strict';\n\nmodule.exports = {\n name: 'unsharp_mask',\n fn: _dereq_('./unsharp_mask'),\n wasm_fn: _dereq_('./unsharp_mask_wasm'),\n wasm_src: _dereq_('./unsharp_mask_wasm_base64')\n};\n\n},{\"./unsharp_mask\":20,\"./unsharp_mask_wasm\":21,\"./unsharp_mask_wasm_base64\":22}],20:[function(_dereq_,module,exports){\n// Unsharp mask filter\n//\n// http://stackoverflow.com/a/23322820/1031804\n// USM(O) = O + (2 * (Amount / 100) * (O - GB))\n// GB - gaussian blur.\n//\n// Image is converted from RGB to HSL, unsharp mask is applied to the\n// lightness channel and then image is converted back to RGB.\n//\n'use strict';\n\n\nvar glur_mono16 = _dereq_('glur/mono16');\nvar hsl_l16 = _dereq_('./hsl_l16');\n\n\nmodule.exports = function unsharp(img, width, height, amount, radius, threshold) {\n var r, g, b;\n var h, s, l;\n var min, max;\n var m1, m2, hShifted;\n var diff, iTimes4;\n\n if (amount === 0 || radius < 0.5) {\n return;\n }\n if (radius > 2.0) {\n radius = 2.0;\n }\n\n var lightness = hsl_l16(img, width, height);\n\n var blured = new Uint16Array(lightness); // copy, because blur modify src\n\n glur_mono16(blured, width, height, radius);\n\n var amountFp = (amount / 100 * 0x1000 + 0.5)|0;\n var thresholdFp = (threshold * 257)|0;\n\n var size = width * height;\n\n /* eslint-disable indent */\n for (var i = 0; i < size; i++) {\n diff = 2 * (lightness[i] - blured[i]);\n\n if (Math.abs(diff) >= thresholdFp) {\n iTimes4 = i * 4;\n r = img[iTimes4];\n g = img[iTimes4 + 1];\n b = img[iTimes4 + 2];\n\n // convert RGB to HSL\n // take RGB, 8-bit unsigned integer per each channel\n // save HSL, H and L are 16-bit unsigned integers, S is 12-bit unsigned integer\n // math is taken from here: http://www.easyrgb.com/index.php?X=MATH&H=18\n // and adopted to be integer (fixed point in fact) for sake of performance\n max = (r >= g && r >= b) ? r : (g >= r && g >= b) ? g : b; // min and max are in [0..0xff]\n min = (r <= g && r <= b) ? r : (g <= r && g <= b) ? g : b;\n l = (max + min) * 257 >> 1; // l is in [0..0xffff] that is caused by multiplication by 257\n\n if (min === max) {\n h = s = 0;\n } else {\n s = (l <= 0x7fff) ?\n (((max - min) * 0xfff) / (max + min))|0 :\n (((max - min) * 0xfff) / (2 * 0xff - max - min))|0; // s is in [0..0xfff]\n // h could be less 0, it will be fixed in backward conversion to RGB, |h| <= 0xffff / 6\n h = (r === max) ? (((g - b) * 0xffff) / (6 * (max - min)))|0\n : (g === max) ? 0x5555 + ((((b - r) * 0xffff) / (6 * (max - min)))|0) // 0x5555 == 0xffff / 3\n : 0xaaaa + ((((r - g) * 0xffff) / (6 * (max - min)))|0); // 0xaaaa == 0xffff * 2 / 3\n }\n\n // add unsharp mask mask to the lightness channel\n l += (amountFp * diff + 0x800) >> 12;\n if (l > 0xffff) {\n l = 0xffff;\n } else if (l < 0) {\n l = 0;\n }\n\n // convert HSL back to RGB\n // for information about math look above\n if (s === 0) {\n r = g = b = l >> 8;\n } else {\n m2 = (l <= 0x7fff) ? (l * (0x1000 + s) + 0x800) >> 12 :\n l + (((0xffff - l) * s + 0x800) >> 12);\n m1 = 2 * l - m2 >> 8;\n m2 >>= 8;\n // save result to RGB channels\n // R channel\n hShifted = (h + 0x5555) & 0xffff; // 0x5555 == 0xffff / 3\n r = (hShifted >= 0xaaaa) ? m1 // 0xaaaa == 0xffff * 2 / 3\n : (hShifted >= 0x7fff) ? m1 + ((m2 - m1) * 6 * (0xaaaa - hShifted) + 0x8000 >> 16)\n : (hShifted >= 0x2aaa) ? m2 // 0x2aaa == 0xffff / 6\n : m1 + ((m2 - m1) * 6 * hShifted + 0x8000 >> 16);\n // G channel\n hShifted = h & 0xffff;\n g = (hShifted >= 0xaaaa) ? m1 // 0xaaaa == 0xffff * 2 / 3\n : (hShifted >= 0x7fff) ? m1 + ((m2 - m1) * 6 * (0xaaaa - hShifted) + 0x8000 >> 16)\n : (hShifted >= 0x2aaa) ? m2 // 0x2aaa == 0xffff / 6\n : m1 + ((m2 - m1) * 6 * hShifted + 0x8000 >> 16);\n // B channel\n hShifted = (h - 0x5555) & 0xffff;\n b = (hShifted >= 0xaaaa) ? m1 // 0xaaaa == 0xffff * 2 / 3\n : (hShifted >= 0x7fff) ? m1 + ((m2 - m1) * 6 * (0xaaaa - hShifted) + 0x8000 >> 16)\n : (hShifted >= 0x2aaa) ? m2 // 0x2aaa == 0xffff / 6\n : m1 + ((m2 - m1) * 6 * hShifted + 0x8000 >> 16);\n }\n\n img[iTimes4] = r;\n img[iTimes4 + 1] = g;\n img[iTimes4 + 2] = b;\n }\n }\n};\n\n},{\"./hsl_l16\":18,\"glur/mono16\":14}],21:[function(_dereq_,module,exports){\n'use strict';\n\n\nmodule.exports = function unsharp(img, width, height, amount, radius, threshold) {\n if (amount === 0 || radius < 0.5) {\n return;\n }\n\n if (radius > 2.0) {\n radius = 2.0;\n }\n\n var pixels = width * height;\n\n var img_bytes_cnt = pixels * 4;\n var hsl_bytes_cnt = pixels * 2;\n var blur_bytes_cnt = pixels * 2;\n var blur_line_byte_cnt = Math.max(width, height) * 4; // float32 array\n var blur_coeffs_byte_cnt = 8 * 4; // float32 array\n\n var img_offset = 0;\n var hsl_offset = img_bytes_cnt;\n var blur_offset = hsl_offset + hsl_bytes_cnt;\n var blur_tmp_offset = blur_offset + blur_bytes_cnt;\n var blur_line_offset = blur_tmp_offset + blur_bytes_cnt;\n var blur_coeffs_offset = blur_line_offset + blur_line_byte_cnt;\n\n var instance = this.__instance(\n 'unsharp_mask',\n img_bytes_cnt + hsl_bytes_cnt + blur_bytes_cnt * 2 + blur_line_byte_cnt + blur_coeffs_byte_cnt,\n { exp: Math.exp }\n );\n\n // 32-bit copy is much faster in chrome\n var img32 = new Uint32Array(img.buffer);\n var mem32 = new Uint32Array(this.__memory.buffer);\n mem32.set(img32);\n\n // HSL\n var fn = instance.exports.hsl_l16 || instance.exports._hsl_l16;\n fn(img_offset, hsl_offset, width, height);\n\n // BLUR\n fn = instance.exports.blurMono16 || instance.exports._blurMono16;\n fn(hsl_offset, blur_offset, blur_tmp_offset,\n blur_line_offset, blur_coeffs_offset, width, height, radius);\n\n // UNSHARP\n fn = instance.exports.unsharp || instance.exports._unsharp;\n fn(img_offset, img_offset, hsl_offset,\n blur_offset, width, height, amount, threshold);\n\n // 32-bit copy is much faster in chrome\n img32.set(new Uint32Array(this.__memory.buffer, 0, pixels));\n};\n\n},{}],22:[function(_dereq_,module,exports){\n// This is autogenerated file from math.wasm, don't edit.\n//\n'use strict';\n\n/* eslint-disable max-len */\nmodule.exports = 'AGFzbQEAAAABMQZgAXwBfGACfX8AYAZ/f39/f38AYAh/f39/f39/fQBgBH9/f38AYAh/f39/f39/fwACGQIDZW52A2V4cAAAA2VudgZtZW1vcnkCAAEDBgUBAgMEBQQEAXAAAAdMBRZfX2J1aWxkX2dhdXNzaWFuX2NvZWZzAAEOX19nYXVzczE2X2xpbmUAAgpibHVyTW9ub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SIFBEAgBkH//wFKDQEgBUGAIGogBmxBgBBqQQx2DAILIAZBCHYiBiEFIAYhBAwCCyAFIAZB//8Dc2xBgBBqQQx2IAZqCyIFQQh2IQcgBkEBdCAFa0EIdiIGIQQCQCAJQdWqAWpB//8DcSIFQanVAksNACAFQf//AU8EQEGq1QIgBWsgByAGa2xBBmxBgIACakEQdiAGaiEEDAELIAchBCAFQanVAEsNACAFIAcgBmtsQQZsQYCAAmpBEHYgBmohBAsCfyAGIgUgCUH//wNxIghBqdUCSw0AGkGq1QIgCGsgByAGa2xBBmxBgIACakEQdiAGaiAIQf//AU8NABogByIFIAhBqdUASw0AGiAIIAcgBmtsQQZsQYCAAmpBEHYgBmoLIQUgCUGr1QJqQf//A3EiCEGp1QJLDQAgCEH//wFPBEBBqtUCIAhrIAcgBmtsQQZsQYCAAmpBEHYgBmohBgwBCyAIQanVAEsEQCAHIQYMAQsgCCAHIAZrbEEGbEGAgAJqQRB2IAZqIQYLIAEgBDoAACABQQFqIAU6AAAgAUECaiAGOgAACyADQQJqIQMgAkECaiECIABBBGohACABQQRqIQEgC0F/aiILDQALCwsL';\n\n},{}],23:[function(_dereq_,module,exports){\n// Detect WebAssembly support.\n// - Check global WebAssembly object\n// - Try to load simple module (can be disabled via CSP)\n//\n'use strict';\n\n\nvar wa;\n\n\nmodule.exports = function hasWebAssembly() {\n // use cache if called before;\n if (typeof wa !== 'undefined') return wa;\n\n wa = false;\n\n if (typeof WebAssembly === 'undefined') return wa;\n\n // If WebAssenbly is disabled, code can throw on compile\n try {\n // https://github.com/brion/min-wasm-fail/blob/master/min-wasm-fail.in.js\n // Additional check that WA internals are correct\n\n /* eslint-disable comma-spacing, max-len */\n var bin = new Uint8Array([ 0,97,115,109,1,0,0,0,1,6,1,96,1,127,1,127,3,2,1,0,5,3,1,0,1,7,8,1,4,116,101,115,116,0,0,10,16,1,14,0,32,0,65,1,54,2,0,32,0,40,2,0,11 ]);\n var module = new WebAssembly.Module(bin);\n var instance = new WebAssembly.Instance(module, {});\n\n // test storing to and loading from a non-zero location via a parameter.\n // Safari on iOS 11.2.5 returns 0 unexpectedly at non-zero locations\n if (instance.exports.test(4) !== 0) wa = true;\n\n return wa;\n } catch (__) {}\n\n return wa;\n};\n\n},{}],24:[function(_dereq_,module,exports){\n/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n},{}],25:[function(_dereq_,module,exports){\nvar bundleFn = arguments[3];\nvar sources = arguments[4];\nvar cache = arguments[5];\n\nvar stringify = JSON.stringify;\n\nmodule.exports = function (fn, options) {\n var wkey;\n var cacheKeys = Object.keys(cache);\n\n for (var i = 0, l = cacheKeys.length; i < l; i++) {\n var key = cacheKeys[i];\n var exp = cache[key].exports;\n // Using babel as a transpiler to use esmodule, the export will always\n // be an object with the default export as a property of it. To ensure\n // the existing api and babel esmodule exports are both supported we\n // check for both\n if (exp === fn || exp && exp.default === fn) {\n wkey = key;\n break;\n }\n }\n\n if (!wkey) {\n wkey = Math.floor(Math.pow(16, 8) * Math.random()).toString(16);\n var wcache = {};\n for (var i = 0, l = cacheKeys.length; i < l; i++) {\n var key = cacheKeys[i];\n wcache[key] = key;\n }\n sources[wkey] = [\n 'function(require,module,exports){' + fn + '(self); }',\n wcache\n ];\n }\n var skey = Math.floor(Math.pow(16, 8) * Math.random()).toString(16);\n\n var scache = {}; scache[wkey] = wkey;\n sources[skey] = [\n 'function(require,module,exports){' +\n // try to call default if defined to also support babel esmodule exports\n 'var f = require(' + stringify(wkey) + ');' +\n '(f.default ? f.default : f)(self);' +\n '}',\n scache\n ];\n\n var workerSources = {};\n resolveSources(skey);\n\n function resolveSources(key) {\n workerSources[key] = true;\n\n for (var depPath in sources[key][1]) {\n var depKey = sources[key][1][depPath];\n if (!workerSources[depKey]) {\n resolveSources(depKey);\n }\n }\n }\n\n var src = '(' + bundleFn + ')({'\n + Object.keys(workerSources).map(function (key) {\n return stringify(key) + ':['\n + sources[key][0]\n + ',' + stringify(sources[key][1]) + ']'\n ;\n }).join(',')\n + '},{},[' + stringify(skey) + '])'\n ;\n\n var URL = window.URL || window.webkitURL || window.mozURL || window.msURL;\n\n var blob = new Blob([src], { type: 'text/javascript' });\n if (options && options.bare) { return blob; }\n var workerUrl = URL.createObjectURL(blob);\n var worker = new Worker(workerUrl);\n worker.objectURL = workerUrl;\n return worker;\n};\n\n},{}],\"/\":[function(_dereq_,module,exports){\n'use strict';\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nvar assign = _dereq_('object-assign');\n\nvar webworkify = _dereq_('webworkify');\n\nvar MathLib = _dereq_('./lib/mathlib');\n\nvar Pool = _dereq_('./lib/pool');\n\nvar utils = _dereq_('./lib/utils');\n\nvar worker = _dereq_('./lib/worker');\n\nvar createStages = _dereq_('./lib/stepper');\n\nvar createRegions = _dereq_('./lib/tiler'); // Deduplicate pools & limiters with the same configs\n// when user creates multiple pica instances.\n\n\nvar singletones = {};\nvar NEED_SAFARI_FIX = false;\n\ntry {\n if (typeof navigator !== 'undefined' && navigator.userAgent) {\n NEED_SAFARI_FIX = navigator.userAgent.indexOf('Safari') >= 0;\n }\n} catch (e) {}\n\nvar concurrency = 1;\n\nif (typeof navigator !== 'undefined') {\n concurrency = Math.min(navigator.hardwareConcurrency || 1, 4);\n}\n\nvar DEFAULT_PICA_OPTS = {\n tile: 1024,\n concurrency: concurrency,\n features: ['js', 'wasm', 'ww'],\n idle: 2000\n};\nvar DEFAULT_RESIZE_OPTS = {\n quality: 3,\n alpha: false,\n unsharpAmount: 0,\n unsharpRadius: 0.0,\n unsharpThreshold: 0\n};\nvar CAN_NEW_IMAGE_DATA;\nvar CAN_CREATE_IMAGE_BITMAP;\n\nfunction workerFabric() {\n return {\n value: webworkify(worker),\n destroy: function destroy() {\n this.value.terminate();\n\n if (typeof window !== 'undefined') {\n var url = window.URL || window.webkitURL || window.mozURL || window.msURL;\n\n if (url && url.revokeObjectURL && this.value.objectURL) {\n url.revokeObjectURL(this.value.objectURL);\n }\n }\n }\n };\n} ////////////////////////////////////////////////////////////////////////////////\n// API methods\n\n\nfunction Pica(options) {\n if (!(this instanceof Pica)) return new Pica(options);\n this.options = assign({}, DEFAULT_PICA_OPTS, options || {});\n var limiter_key = \"lk_\".concat(this.options.concurrency); // Share limiters to avoid multiple parallel workers when user creates\n // multiple pica instances.\n\n this.__limit = singletones[limiter_key] || utils.limiter(this.options.concurrency);\n if (!singletones[limiter_key]) singletones[limiter_key] = this.__limit; // List of supported features, according to options & browser/node.js\n\n this.features = {\n js: false,\n // pure JS implementation, can be disabled for testing\n wasm: false,\n // webassembly implementation for heavy functions\n cib: false,\n // resize via createImageBitmap (only FF at this moment)\n ww: false // webworkers\n\n };\n this.__workersPool = null; // Store requested features for webworkers\n\n this.__requested_features = [];\n this.__mathlib = null;\n}\n\nPica.prototype.init = function () {\n var _this = this;\n\n if (this.__initPromise) return this.__initPromise; // Test if we can create ImageData without canvas and memory copy\n\n if (CAN_NEW_IMAGE_DATA !== false && CAN_NEW_IMAGE_DATA !== true) {\n CAN_NEW_IMAGE_DATA = false;\n\n if (typeof ImageData !== 'undefined' && typeof Uint8ClampedArray !== 'undefined') {\n try {\n /* eslint-disable no-new */\n new ImageData(new Uint8ClampedArray(400), 10, 10);\n CAN_NEW_IMAGE_DATA = true;\n } catch (__) {}\n }\n } // ImageBitmap can be effective in 2 places:\n //\n // 1. Threaded jpeg unpack (basic)\n // 2. Built-in resize (blocked due problem in chrome, see issue #89)\n //\n // For basic use we also need ImageBitmap wo support .close() method,\n // see https://developer.mozilla.org/ru/docs/Web/API/ImageBitmap\n\n\n if (CAN_CREATE_IMAGE_BITMAP !== false && CAN_CREATE_IMAGE_BITMAP !== true) {\n CAN_CREATE_IMAGE_BITMAP = false;\n\n if (typeof ImageBitmap !== 'undefined') {\n if (ImageBitmap.prototype && ImageBitmap.prototype.close) {\n CAN_CREATE_IMAGE_BITMAP = true;\n } else {\n this.debug('ImageBitmap does not support .close(), disabled');\n }\n }\n }\n\n var features = this.options.features.slice();\n\n if (features.indexOf('all') >= 0) {\n features = ['cib', 'wasm', 'js', 'ww'];\n }\n\n this.__requested_features = features;\n this.__mathlib = new MathLib(features); // Check WebWorker support if requested\n\n if (features.indexOf('ww') >= 0) {\n if (typeof window !== 'undefined' && 'Worker' in window) {\n // IE <= 11 don't allow to create webworkers from string. We should check it.\n // https://connect.microsoft.com/IE/feedback/details/801810/web-workers-from-blob-urls-in-ie-10-and-11\n try {\n var wkr = _dereq_('webworkify')(function () {});\n\n wkr.terminate();\n this.features.ww = true; // pool uniqueness depends on pool config + webworker config\n\n var wpool_key = \"wp_\".concat(JSON.stringify(this.options));\n\n if (singletones[wpool_key]) {\n this.__workersPool = singletones[wpool_key];\n } else {\n this.__workersPool = new Pool(workerFabric, this.options.idle);\n singletones[wpool_key] = this.__workersPool;\n }\n } catch (__) {}\n }\n }\n\n var initMath = this.__mathlib.init().then(function (mathlib) {\n // Copy detected features\n assign(_this.features, mathlib.features);\n });\n\n var checkCibResize;\n\n if (!CAN_CREATE_IMAGE_BITMAP) {\n checkCibResize = Promise.resolve(false);\n } else {\n checkCibResize = utils.cib_support().then(function (status) {\n if (_this.features.cib && features.indexOf('cib') < 0) {\n _this.debug('createImageBitmap() resize supported, but disabled by config');\n\n return;\n }\n\n if (features.indexOf('cib') >= 0) _this.features.cib = status;\n });\n } // Init math lib. That's async because can load some\n\n\n this.__initPromise = Promise.all([initMath, checkCibResize]).then(function () {\n return _this;\n });\n return this.__initPromise;\n};\n\nPica.prototype.resize = function (from, to, options) {\n var _this2 = this;\n\n this.debug('Start resize...');\n var opts = assign({}, DEFAULT_RESIZE_OPTS);\n\n if (!isNaN(options)) {\n opts = assign(opts, {\n quality: options\n });\n } else if (options) {\n opts = assign(opts, options);\n }\n\n opts.toWidth = to.width;\n opts.toHeight = to.height;\n opts.width = from.naturalWidth || from.width;\n opts.height = from.naturalHeight || from.height; // Prevent stepper from infinite loop\n\n if (to.width === 0 || to.height === 0) {\n return Promise.reject(new Error(\"Invalid output size: \".concat(to.width, \"x\").concat(to.height)));\n }\n\n if (opts.unsharpRadius > 2) opts.unsharpRadius = 2;\n var canceled = false;\n var cancelToken = null;\n\n if (opts.cancelToken) {\n // Wrap cancelToken to avoid successive resolve & set flag\n cancelToken = opts.cancelToken.then(function (data) {\n canceled = true;\n throw data;\n }, function (err) {\n canceled = true;\n throw err;\n });\n }\n\n var DEST_TILE_BORDER = 3; // Max possible filter window size\n\n var destTileBorder = Math.ceil(Math.max(DEST_TILE_BORDER, 2.5 * opts.unsharpRadius | 0));\n return this.init().then(function () {\n if (canceled) return cancelToken; // if createImageBitmap supports resize, just do it and return\n\n if (_this2.features.cib) {\n var toCtx = to.getContext('2d', {\n alpha: Boolean(opts.alpha)\n });\n\n _this2.debug('Resize via createImageBitmap()');\n\n return createImageBitmap(from, {\n resizeWidth: opts.toWidth,\n resizeHeight: opts.toHeight,\n resizeQuality: utils.cib_quality_name(opts.quality)\n }).then(function (imageBitmap) {\n if (canceled) return cancelToken; // if no unsharp - draw directly to output canvas\n\n if (!opts.unsharpAmount) {\n toCtx.drawImage(imageBitmap, 0, 0);\n imageBitmap.close();\n toCtx = null;\n\n _this2.debug('Finished!');\n\n return to;\n }\n\n _this2.debug('Unsharp result');\n\n var tmpCanvas = document.createElement('canvas');\n tmpCanvas.width = opts.toWidth;\n tmpCanvas.height = opts.toHeight;\n var tmpCtx = tmpCanvas.getContext('2d', {\n alpha: Boolean(opts.alpha)\n });\n tmpCtx.drawImage(imageBitmap, 0, 0);\n imageBitmap.close();\n var iData = tmpCtx.getImageData(0, 0, opts.toWidth, opts.toHeight);\n\n _this2.__mathlib.unsharp_mask(iData.data, opts.toWidth, opts.toHeight, opts.unsharpAmount, opts.unsharpRadius, opts.unsharpThreshold);\n\n toCtx.putImageData(iData, 0, 0);\n iData = tmpCtx = tmpCanvas = toCtx = null;\n\n _this2.debug('Finished!');\n\n return to;\n });\n } //\n // No easy way, let's resize manually via arrays\n //\n // Share cache between calls:\n //\n // - wasm instance\n // - wasm memory object\n //\n\n\n var cache = {}; // Call resizer in webworker or locally, depending on config\n\n var invokeResize = function invokeResize(opts) {\n return Promise.resolve().then(function () {\n if (!_this2.features.ww) return _this2.__mathlib.resizeAndUnsharp(opts, cache);\n return new Promise(function (resolve, reject) {\n var w = _this2.__workersPool.acquire();\n\n if (cancelToken) cancelToken[\"catch\"](function (err) {\n return reject(err);\n });\n\n w.value.onmessage = function (ev) {\n w.release();\n if (ev.data.err) reject(ev.data.err);else resolve(ev.data.result);\n };\n\n w.value.postMessage({\n opts: opts,\n features: _this2.__requested_features,\n preload: {\n wasm_nodule: _this2.__mathlib.__\n }\n }, [opts.src.buffer]);\n });\n });\n };\n\n var tileAndResize = function tileAndResize(from, to, opts) {\n var srcCtx;\n var srcImageBitmap;\n var toCtx;\n\n var processTile = function processTile(tile) {\n return _this2.__limit(function () {\n if (canceled) return cancelToken;\n var srcImageData; // Extract tile RGBA buffer, depending on input type\n\n if (utils.isCanvas(from)) {\n _this2.debug('Get tile pixel data'); // If input is Canvas - extract region data directly\n\n\n srcImageData = srcCtx.getImageData(tile.x, tile.y, tile.width, tile.height);\n } else {\n // If input is Image or decoded to ImageBitmap,\n // draw region to temporary canvas and extract data from it\n //\n // Note! Attempt to reuse this canvas causes significant slowdown in chrome\n //\n _this2.debug('Draw tile imageBitmap/image to temporary canvas');\n\n var tmpCanvas = document.createElement('canvas');\n tmpCanvas.width = tile.width;\n tmpCanvas.height = tile.height;\n var tmpCtx = tmpCanvas.getContext('2d', {\n alpha: Boolean(opts.alpha)\n });\n tmpCtx.globalCompositeOperation = 'copy';\n tmpCtx.drawImage(srcImageBitmap || from, tile.x, tile.y, tile.width, tile.height, 0, 0, tile.width, tile.height);\n\n _this2.debug('Get tile pixel data');\n\n srcImageData = tmpCtx.getImageData(0, 0, tile.width, tile.height);\n tmpCtx = tmpCanvas = null;\n }\n\n var o = {\n src: srcImageData.data,\n width: tile.width,\n height: tile.height,\n toWidth: tile.toWidth,\n toHeight: tile.toHeight,\n scaleX: tile.scaleX,\n scaleY: tile.scaleY,\n offsetX: tile.offsetX,\n offsetY: tile.offsetY,\n quality: opts.quality,\n alpha: opts.alpha,\n unsharpAmount: opts.unsharpAmount,\n unsharpRadius: opts.unsharpRadius,\n unsharpThreshold: opts.unsharpThreshold\n };\n\n _this2.debug('Invoke resize math');\n\n return Promise.resolve().then(function () {\n return invokeResize(o);\n }).then(function (result) {\n if (canceled) return cancelToken;\n srcImageData = null;\n var toImageData;\n\n _this2.debug('Convert raw rgba tile result to ImageData');\n\n if (CAN_NEW_IMAGE_DATA) {\n // this branch is for modern browsers\n // If `new ImageData()` & Uint8ClampedArray suported\n toImageData = new ImageData(new Uint8ClampedArray(result), tile.toWidth, tile.toHeight);\n } else {\n // fallback for `node-canvas` and old browsers\n // (IE11 has ImageData but does not support `new ImageData()`)\n toImageData = toCtx.createImageData(tile.toWidth, tile.toHeight);\n\n if (toImageData.data.set) {\n toImageData.data.set(result);\n } else {\n // IE9 don't have `.set()`\n for (var i = toImageData.data.length - 1; i >= 0; i--) {\n toImageData.data[i] = result[i];\n }\n }\n }\n\n _this2.debug('Draw tile');\n\n if (NEED_SAFARI_FIX) {\n // Safari draws thin white stripes between tiles without this fix\n toCtx.putImageData(toImageData, tile.toX, tile.toY, tile.toInnerX - tile.toX, tile.toInnerY - tile.toY, tile.toInnerWidth + 1e-5, tile.toInnerHeight + 1e-5);\n } else {\n toCtx.putImageData(toImageData, tile.toX, tile.toY, tile.toInnerX - tile.toX, tile.toInnerY - tile.toY, tile.toInnerWidth, tile.toInnerHeight);\n }\n\n return null;\n });\n });\n }; // Need to normalize data source first. It can be canvas or image.\n // If image - try to decode in background if possible\n\n\n return Promise.resolve().then(function () {\n toCtx = to.getContext('2d', {\n alpha: Boolean(opts.alpha)\n });\n\n if (utils.isCanvas(from)) {\n srcCtx = from.getContext('2d', {\n alpha: Boolean(opts.alpha)\n });\n return null;\n }\n\n if (utils.isImage(from)) {\n // try do decode image in background for faster next operations\n if (!CAN_CREATE_IMAGE_BITMAP) return null;\n\n _this2.debug('Decode image via createImageBitmap');\n\n return createImageBitmap(from).then(function (imageBitmap) {\n srcImageBitmap = imageBitmap;\n }) // Suppress error to use fallback, if method fails\n // https://github.com/nodeca/pica/issues/190\n\n /* eslint-disable no-unused-vars */\n [\"catch\"](function (e) {\n return null;\n });\n }\n\n throw new Error('\".from\" should be image or canvas');\n }).then(function () {\n if (canceled) return cancelToken;\n\n _this2.debug('Calculate tiles'); //\n // Here we are with \"normalized\" source,\n // follow to tiling\n //\n\n\n var regions = createRegions({\n width: opts.width,\n height: opts.height,\n srcTileSize: _this2.options.tile,\n toWidth: opts.toWidth,\n toHeight: opts.toHeight,\n destTileBorder: destTileBorder\n });\n var jobs = regions.map(function (tile) {\n return processTile(tile);\n });\n\n function cleanup() {\n if (srcImageBitmap) {\n srcImageBitmap.close();\n srcImageBitmap = null;\n }\n }\n\n _this2.debug('Process tiles');\n\n return Promise.all(jobs).then(function () {\n _this2.debug('Finished!');\n\n cleanup();\n return to;\n }, function (err) {\n cleanup();\n throw err;\n });\n });\n };\n\n var processStages = function processStages(stages, from, to, opts) {\n if (canceled) return cancelToken;\n\n var _stages$shift = stages.shift(),\n _stages$shift2 = _slicedToArray(_stages$shift, 2),\n toWidth = _stages$shift2[0],\n toHeight = _stages$shift2[1];\n\n var isLastStage = stages.length === 0;\n opts = assign({}, opts, {\n toWidth: toWidth,\n toHeight: toHeight,\n // only use user-defined quality for the last stage,\n // use simpler (Hamming) filter for the first stages where\n // scale factor is large enough (more than 2-3)\n quality: isLastStage ? opts.quality : Math.min(1, opts.quality)\n });\n var tmpCanvas;\n\n if (!isLastStage) {\n // create temporary canvas\n tmpCanvas = document.createElement('canvas');\n tmpCanvas.width = toWidth;\n tmpCanvas.height = toHeight;\n }\n\n return tileAndResize(from, isLastStage ? to : tmpCanvas, opts).then(function () {\n if (isLastStage) return to;\n opts.width = toWidth;\n opts.height = toHeight;\n return processStages(stages, tmpCanvas, to, opts);\n });\n };\n\n var stages = createStages(opts.width, opts.height, opts.toWidth, opts.toHeight, _this2.options.tile, destTileBorder);\n return processStages(stages, from, to, opts);\n });\n}; // RGBA buffer resize\n//\n\n\nPica.prototype.resizeBuffer = function (options) {\n var _this3 = this;\n\n var opts = assign({}, DEFAULT_RESIZE_OPTS, options);\n return this.init().then(function () {\n return _this3.__mathlib.resizeAndUnsharp(opts);\n });\n};\n\nPica.prototype.toBlob = function (canvas, mimeType, quality) {\n mimeType = mimeType || 'image/png';\n return new Promise(function (resolve) {\n if (canvas.toBlob) {\n canvas.toBlob(function (blob) {\n return resolve(blob);\n }, mimeType, quality);\n return;\n }\n\n if (canvas.convertToBlob) {\n resolve(canvas.convertToBlob({\n type: mimeType,\n quality: quality\n }));\n return;\n } // Fallback for old browsers\n\n\n var asString = atob(canvas.toDataURL(mimeType, quality).split(',')[1]);\n var len = asString.length;\n var asBuffer = new Uint8Array(len);\n\n for (var i = 0; i < len; i++) {\n asBuffer[i] = asString.charCodeAt(i);\n }\n\n resolve(new Blob([asBuffer], {\n type: mimeType\n }));\n });\n};\n\nPica.prototype.debug = function () {};\n\nmodule.exports = Pica;\n\n},{\"./lib/mathlib\":1,\"./lib/pool\":9,\"./lib/stepper\":10,\"./lib/tiler\":11,\"./lib/utils\":12,\"./lib/worker\":13,\"object-assign\":24,\"webworkify\":25}]},{},[])(\"/\")\n});\n"],"x_google_ignoreList":[]}