diff --git a/.gitignore b/.gitignore index 4cbe7c7..c44b870 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,5 @@ node_modules dist/ .idea -lib/ react-avatar.iml diff --git a/lib/react-avatar.js b/lib/react-avatar.js new file mode 100644 index 0000000..ab16ec6 --- /dev/null +++ b/lib/react-avatar.js @@ -0,0 +1,2 @@ +/*! For license information please see react-avatar.js.LICENSE.txt */ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.reactAvatar=e(require("react")):t.reactAvatar=e(t.react)}(self,(function(t){return(()=>{var e={303:(t,e,i)=>{t.exports=i(302),i(200),i(630),i(16),i(677),i(635),i(166),i(140),i(922)},635:(t,e,i)=>{var n,a;!function(){"use strict";n=[i(302),i(677)],void 0===(a="function"==typeof(a=function(t){var e=t.ExifMap.prototype;e.tags={256:"ImageWidth",257:"ImageHeight",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",274:"Orientation",277:"SamplesPerPixel",284:"PlanarConfiguration",530:"YCbCrSubSampling",531:"YCbCrPositioning",282:"XResolution",283:"YResolution",296:"ResolutionUnit",273:"StripOffsets",278:"RowsPerStrip",279:"StripByteCounts",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",301:"TransferFunction",318:"WhitePoint",319:"PrimaryChromaticities",529:"YCbCrCoefficients",532:"ReferenceBlackWhite",306:"DateTime",270:"ImageDescription",271:"Make",272:"Model",305:"Software",315:"Artist",33432:"Copyright",34665:{36864:"ExifVersion",40960:"FlashpixVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",42240:"Gamma",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",37500:"MakerNote",37510:"UserComment",40964:"RelatedSoundFile",36867:"DateTimeOriginal",36868:"DateTimeDigitized",36880:"OffsetTime",36881:"OffsetTimeOriginal",36882:"OffsetTimeDigitized",37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",33434:"ExposureTime",33437:"FNumber",34850:"ExposureProgram",34852:"SpectralSensitivity",34855:"PhotographicSensitivity",34856:"OECF",34864:"SensitivityType",34865:"StandardOutputSensitivity",34866:"RecommendedExposureIndex",34867:"ISOSpeed",34868:"ISOSpeedLatitudeyyy",34869:"ISOSpeedLatitudezzz",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureBias",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37396:"SubjectArea",37386:"FocalLength",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41492:"SubjectLocation",41493:"ExposureIndex",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",41985:"CustomRendered",41986:"ExposureMode",41987:"WhiteBalance",41988:"DigitalZoomRatio",41989:"FocalLengthIn35mmFilm",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",42016:"ImageUniqueID",42032:"CameraOwnerName",42033:"BodySerialNumber",42034:"LensSpecification",42035:"LensMake",42036:"LensModel",42037:"LensSerialNumber"},34853:{0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential",31:"GPSHPositioningError"},40965:{1:"InteroperabilityIndex"}},e.tags.ifd1=e.tags,e.stringValues={ExposureProgram:{0:"Undefined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},SensingMethod:{1:"Undefined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},SceneType:{1:"Directly photographed"},CustomRendered:{0:"Normal process",1:"Custom process"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},GainControl:{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},SubjectDistanceRange:{0:"Unknown",1:"Macro",2:"Close view",3:"Distant view"},FileSource:{3:"DSC"},ComponentsConfiguration:{0:"",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"},Orientation:{1:"Original",2:"Horizontal flip",3:"Rotate 180° CCW",4:"Vertical flip",5:"Vertical flip + Rotate 90° CW",6:"Rotate 90° CW",7:"Horizontal flip + Rotate 90° CW",8:"Rotate 90° CCW"}},e.getText=function(t){var e=this.get(t);switch(t){case"LightSource":case"Flash":case"MeteringMode":case"ExposureProgram":case"SensingMethod":case"SceneCaptureType":case"SceneType":case"CustomRendered":case"WhiteBalance":case"GainControl":case"Contrast":case"Saturation":case"Sharpness":case"SubjectDistanceRange":case"FileSource":case"Orientation":return this.stringValues[t][e];case"ExifVersion":case"FlashpixVersion":if(!e)return;return String.fromCharCode(e[0],e[1],e[2],e[3]);case"ComponentsConfiguration":if(!e)return;return this.stringValues[t][e[0]]+this.stringValues[t][e[1]]+this.stringValues[t][e[2]]+this.stringValues[t][e[3]];case"GPSVersionID":if(!e)return;return e[0]+"."+e[1]+"."+e[2]+"."+e[3]}return String(e)},e.getAll=function(){var t,e,i,n={};for(t in this)Object.prototype.hasOwnProperty.call(this,t)&&((e=this[t])&&e.getAll?n[this.ifds[t].name]=e.getAll():(i=this.tags[t])&&(n[i]=this.getText(i)));return n},e.getName=function(t){var e=this.tags[t];return"object"==typeof e?this.ifds[t].name:e},function(){var t,i,n,a=e.tags;for(t in a)if(Object.prototype.hasOwnProperty.call(a,t))if(i=e.ifds[t])for(t in n=a[t])Object.prototype.hasOwnProperty.call(n,t)&&(i.map[n[t]]=Number(t));else e.map[a[t]]=Number(t)}()})?a.apply(e,n):a)||(t.exports=a)}()},677:(t,e,i)=>{var n,a;!function(){"use strict";n=[i(302),i(630)],void 0===(a="function"==typeof(a=function(t){function e(t){t&&(Object.defineProperty(this,"map",{value:this.ifds[t].map}),Object.defineProperty(this,"tags",{value:this.tags&&this.tags[t]||{}}))}function i(e,i,n){if(n){if(!(i+n>e.byteLength))return new Blob([t.bufferSlice.call(e.buffer,i,i+n)],{type:"image/jpeg"});console.log("Invalid Exif data: Invalid thumbnail data.")}}e.prototype.ifds={ifd1:{name:"Thumbnail",map:e.prototype.map={Orientation:274,Thumbnail:"ifd1",Blob:513,Exif:34665,GPSInfo:34853,Interoperability:40965}},34665:{name:"Exif",map:{}},34853:{name:"GPSInfo",map:{}},40965:{name:"Interoperability",map:{}}},e.prototype.get=function(t){return this[t]||this[this.map[t]]};var n={1:{getValue:function(t,e){return t.getUint8(e)},size:1},2:{getValue:function(t,e){return String.fromCharCode(t.getUint8(e))},size:1,ascii:!0},3:{getValue:function(t,e,i){return t.getUint16(e,i)},size:2},4:{getValue:function(t,e,i){return t.getUint32(e,i)},size:4},5:{getValue:function(t,e,i){return t.getUint32(e,i)/t.getUint32(e+4,i)},size:8},9:{getValue:function(t,e,i){return t.getInt32(e,i)},size:4},10:{getValue:function(t,e,i){return t.getInt32(e,i)/t.getInt32(e+4,i)},size:8}};function a(t,e,i,a,r,o){var s,h,l,c,u,d,f=n[a];if(f){if(!((h=(s=f.size*r)>4?e+t.getUint32(i+8,o):i+8)+s>t.byteLength)){if(1===r)return f.getValue(t,h,o);for(l=[],c=0;ct.byteLength)console.log("Invalid Exif data: Invalid directory offset.");else{if(!((u=i+2+12*(c=t.getUint16(i,n)))+4>t.byteLength)){for(d=0;dt.byteLength)console.log("Invalid Exif data: Invalid segment size.");else if(0===t.getUint16(n+8)){switch(t.getUint16(g)){case 18761:l=!0;break;case 19789:l=!1;break;default:return void console.log("Invalid Exif data: Invalid byte alignment marker.")}42===t.getUint16(g+2,l)?(c=t.getUint32(g+4,l),s.exif=new e,h.disableExifOffsets||(s.exifOffsets=new e,s.exifTiffOffset=g,s.exifLittleEndian=l),(c=o(t,g,g+c,l,s.exif,s.exifOffsets,d,f))&&r(d,f,"ifd1")&&(s.exif.ifd1=c,s.exifOffsets&&(s.exifOffsets.ifd1=g+c)),Object.keys(s.exif.ifds).forEach((function(i){!function(t,i,n,a,r,s,h){var l=t.exif[i];l&&(t.exif[i]=new e(i),t.exifOffsets&&(t.exifOffsets[i]=new e(i)),o(n,a,a+l,r,t.exif[i],t.exifOffsets&&t.exifOffsets[i],s&&s[i],h&&h[i]))}(s,i,t,g,l,d,f)})),(u=s.exif.ifd1)&&u[513]&&(u[513]=i(t,g+u[513],u[514]))):console.log("Invalid Exif data: Missing TIFF marker.")}else console.log("Invalid Exif data: Missing byte alignment offset.")}},t.metaDataParsers.jpeg[65505].push(t.parseExifData),t.exifWriters={274:function(t,e,i){var n=e.exifOffsets[274];return n?(new DataView(t,n+8,2).setUint16(0,i,e.exifLittleEndian),t):t}},t.writeExifData=function(e,i,n,a){return t.exifWriters[i.exif.map[n]](e,i,a)},t.ExifMap=e})?a.apply(e,n):a)||(t.exports=a)}()},16:(t,e,i)=>{var n,a;!function(){"use strict";n=[i(302)],void 0===(a="function"==typeof(a=function(t){var e=t.global;e.fetch&&e.Request&&e.Response&&e.Response.prototype.blob?t.fetchBlob=function(t,i,n){function a(t){return t.blob()}if(e.Promise&&"function"!=typeof i)return fetch(new Request(t,i)).then(a);fetch(new Request(t,n)).then(a).then(i).catch((function(t){i(null,t)}))}:e.XMLHttpRequest&&""===(new XMLHttpRequest).responseType&&(t.fetchBlob=function(t,i,n){function a(e,i){n=n||{};var a=new XMLHttpRequest;a.open(n.method||"GET",t),n.headers&&Object.keys(n.headers).forEach((function(t){a.setRequestHeader(t,n.headers[t])})),a.withCredentials="include"===n.credentials,a.responseType="blob",a.onload=function(){e(a.response)},a.onerror=a.onabort=a.ontimeout=function(t){e===i?i(null,t):i(t)},a.send(n.body)}return e.Promise&&"function"!=typeof i?(n=i,new Promise(a)):a(i,i)})})?a.apply(e,n):a)||(t.exports=a)}()},140:(t,e,i)=>{var n,a;!function(){"use strict";n=[i(302),i(166)],void 0===(a="function"==typeof(a=function(t){var e=t.IptcMap.prototype;e.tags={0:"ApplicationRecordVersion",3:"ObjectTypeReference",4:"ObjectAttributeReference",5:"ObjectName",7:"EditStatus",8:"EditorialUpdate",10:"Urgency",12:"SubjectReference",15:"Category",20:"SupplementalCategories",22:"FixtureIdentifier",25:"Keywords",26:"ContentLocationCode",27:"ContentLocationName",30:"ReleaseDate",35:"ReleaseTime",37:"ExpirationDate",38:"ExpirationTime",40:"SpecialInstructions",42:"ActionAdvised",45:"ReferenceService",47:"ReferenceDate",50:"ReferenceNumber",55:"DateCreated",60:"TimeCreated",62:"DigitalCreationDate",63:"DigitalCreationTime",65:"OriginatingProgram",70:"ProgramVersion",75:"ObjectCycle",80:"Byline",85:"BylineTitle",90:"City",92:"Sublocation",95:"State",100:"CountryCode",101:"Country",103:"OriginalTransmissionReference",105:"Headline",110:"Credit",115:"Source",116:"CopyrightNotice",118:"Contact",120:"Caption",121:"LocalCaption",122:"Writer",125:"RasterizedCaption",130:"ImageType",131:"ImageOrientation",135:"LanguageIdentifier",150:"AudioType",151:"AudioSamplingRate",152:"AudioSamplingResolution",153:"AudioDuration",154:"AudioOutcue",184:"JobID",185:"MasterDocumentID",186:"ShortDocumentID",187:"UniqueDocumentID",188:"OwnerID",200:"ObjectPreviewFileFormat",201:"ObjectPreviewFileVersion",202:"ObjectPreviewData",221:"Prefs",225:"ClassifyState",228:"SimilarityIndex",230:"DocumentNotes",231:"DocumentHistory",232:"ExifCameraInfo",255:"CatalogSets"},e.stringValues={10:{0:"0 (reserved)",1:"1 (most urgent)",2:"2",3:"3",4:"4",5:"5 (normal urgency)",6:"6",7:"7",8:"8 (least urgent)",9:"9 (user-defined priority)"},75:{a:"Morning",b:"Both Morning and Evening",p:"Evening"},131:{L:"Landscape",P:"Portrait",S:"Square"}},e.getText=function(t){var e=this.get(t),i=this.map[t],n=this.stringValues[i];return n?n[e]:String(e)},e.getAll=function(){var t,e,i={};for(t in this)Object.prototype.hasOwnProperty.call(this,t)&&(e=this.tags[t])&&(i[e]=this.getText(e));return i},e.getName=function(t){return this.tags[t]},function(){var t,i=e.tags,n=e.map||{};for(t in i)Object.prototype.hasOwnProperty.call(i,t)&&(n[i[t]]=Number(t))}()})?a.apply(e,n):a)||(t.exports=a)}()},166:(t,e,i)=>{var n,a;!function(){"use strict";n=[i(302),i(630)],void 0===(a="function"==typeof(a=function(t){function e(){}function i(t,e,i,n,a){return"binary"===e.types[t]?new Blob([i.buffer.slice(n,n+a)]):"Uint16"===e.types[t]?i.getUint16(n):function(t,e,i){for(var n="",a=e+i,r=e;rl){console.log("Invalid IPTC data: Invalid segment offset.");break}var d=t.getUint16(i+6+c);if(i+d>l){console.log("Invalid IPTC data: Invalid segment size.");break}return s.iptc=new e,h.disableIptcOffsets||(s.iptcOffsets=new e),void a(t,u,d,s,h.includeIptcTags,h.excludeIptcTags||{202:!0})}i+=1}},t.metaDataParsers.jpeg[65517].push(t.parseIptcData),t.IptcMap=e})?a.apply(e,n):a)||(t.exports=a)}()},630:(t,e,i)=>{var n,a;!function(){"use strict";n=[i(302)],void 0===(a="function"==typeof(a=function(t){var e=t.global,i=t.transform,n=e.Blob&&(Blob.prototype.slice||Blob.prototype.webkitSlice||Blob.prototype.mozSlice),a=e.ArrayBuffer&&ArrayBuffer.prototype.slice||function(t,e){e=e||this.byteLength-t;var i=new Uint8Array(this,t,e),n=new Uint8Array(e);return n.set(i),n.buffer},r={jpeg:{65505:[],65517:[]}};function o(i,o,s,h){var l=this;function c(o,c){if(!(e.DataView&&n&&i&&i.size>=12&&"image/jpeg"===i.type))return o(h);var u=s.maxMetaDataSize||262144;t.readFile(n.call(i,0,u),(function(t){var e=new DataView(t);if(65496!==e.getUint16(0))return c(new Error("Invalid JPEG file: Missing JPEG marker."));for(var i,n,u,d,f=2,g=e.byteLength-4,p=f;f=65504&&i<=65519||65534===i);){if(f+(n=e.getUint16(f+2)+2)>e.byteLength){console.log("Invalid JPEG metadata: Invalid segment size.");break}if((u=r.jpeg[i])&&!s.disableMetaDataParsers)for(d=0;d6&&(h.imageHead=a.call(t,0,p)),o(h)}),c,"readAsArrayBuffer")||o(h)}return s=s||{},e.Promise&&"function"!=typeof o?(h=s=o||{},new Promise(c)):(h=h||{},c(o,o))}function s(t,e,i){return t&&e&&i?new Blob([i,n.call(t,e.byteLength)],{type:"image/jpeg"}):null}t.transform=function(n,a,r,s,h){t.requiresMetaData(a)?o(s,(function(o){o!==h&&(e.console&&console.log(o),o=h),i.call(t,n,a,r,s,o)}),a,h=h||{}):i.apply(t,arguments)},t.blobSlice=n,t.bufferSlice=a,t.replaceHead=function(t,i,n){var a={maxMetaDataSize:256,disableMetaDataParsers:!0};if(!n&&e.Promise)return o(t,a).then((function(e){return s(t,e.imageHead,i)}));o(t,(function(e){n(s(t,e.imageHead,i))}),a)},t.parseMetaData=o,t.metaDataParsers=r})?a.apply(e,n):a)||(t.exports=a)}()},922:(t,e,i)=>{var n,a;!function(){"use strict";n=[i(302),i(200),i(630)],void 0===(a="function"==typeof(a=function(t){var e=t.transform,i=t.requiresCanvas,n=t.requiresMetaData,a=t.transformCoordinates,r=t.getTransformedOptions;function o(e,i){var n=e&&e.orientation;return!0===n&&!t.orientation||1===n&&t.orientation||(!i||t.orientation)&&n>1&&n<9}function s(t,e){return t!==e&&(1===t&&e>1&&e<9||t>1&&t<9)}function h(t,e){if(e>1&&e<9)switch(t){case 2:case 4:return e>4;case 5:case 7:return e%2==0;case 6:case 8:return 2===e||4===e||5===e||7===e}return!1}(function(t){if(t.global.document){var e=document.createElement("img");e.onload=function(){if(t.orientation=2===e.width&&3===e.height,t.orientation){var i=t.createCanvas(1,1,!0).getContext("2d");i.drawImage(e,1,1,1,1,0,0,1,1),t.orientationCropBug="255,255,255,255"!==i.getImageData(0,0,1,1).data.toString()}},e.src="data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAIAAwMBEQACEQEDEQH/xABRAAEAAAAAAAAAAAAAAAAAAAAKEAEBAQADAQEAAAAAAAAAAAAGBQQDCAkCBwEBAAAAAAAAAAAAAAAAAAAAABEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8AG8T9NfSMEVMhQvoP3fFiRZ+MTHDifa/95OFSZU5OzRzxkyejv8ciEfhSceSXGjS8eSdLnZc2HDm4M3BxcXwH/9k="}})(t),t.requiresCanvas=function(e){return o(e)||i.call(t,e)},t.requiresMetaData=function(e){return o(e,!0)||n.call(t,e)},t.transform=function(i,n,a,r,o){e.call(t,i,n,(function(e,i){if(i){var n=t.orientation&&i.exif&&i.exif.get("Orientation");if(n>4&&n<9){var r=i.originalWidth,o=i.originalHeight;i.originalWidth=o,i.originalHeight=r}}a(e,i)}),r,o)},t.getTransformedOptions=function(e,i,n){var a=r.call(t,e,i),o=n.exif&&n.exif.get("Orientation"),l=a.orientation,c=t.orientation&&o;if(!0===l&&(l=o),!s(l,c))return a;var u=a.top,d=a.right,f=a.bottom,g=a.left,p={};for(var v in a)Object.prototype.hasOwnProperty.call(a,v)&&(p[v]=a[v]);if(p.orientation=l,(l>4&&!(c>4)||l<5&&c>4)&&(p.maxWidth=a.maxHeight,p.maxHeight=a.maxWidth,p.minWidth=a.minHeight,p.minHeight=a.minWidth,p.sourceWidth=a.sourceHeight,p.sourceHeight=a.sourceWidth),c>1){switch(c){case 2:d=a.left,g=a.right;break;case 3:u=a.bottom,d=a.left,f=a.top,g=a.right;break;case 4:u=a.bottom,f=a.top;break;case 5:u=a.left,d=a.bottom,f=a.right,g=a.top;break;case 6:u=a.left,d=a.top,f=a.right,g=a.bottom;break;case 7:u=a.right,d=a.top,f=a.left,g=a.bottom;break;case 8:u=a.right,d=a.bottom,f=a.left,g=a.top}if(h(l,c)){var m=u,y=d;u=f,d=g,f=m,g=y}}switch(p.top=u,p.right=d,p.bottom=f,p.left=g,l){case 2:p.right=g,p.left=d;break;case 3:p.top=f,p.right=g,p.bottom=u,p.left=d;break;case 4:p.top=f,p.bottom=u;break;case 5:p.top=g,p.right=f,p.bottom=d,p.left=u;break;case 6:p.top=d,p.right=f,p.bottom=g,p.left=u;break;case 7:p.top=d,p.right=u,p.bottom=g,p.left=f;break;case 8:p.top=g,p.right=u,p.bottom=d,p.left=f}return p},t.transformCoordinates=function(e,i,n){a.call(t,e,i,n);var r=i.orientation,o=t.orientation&&n.exif&&n.exif.get("Orientation");if(s(r,o)){var l=e.getContext("2d"),c=e.width,u=e.height,d=c,f=u;switch((r>4&&!(o>4)||r<5&&o>4)&&(e.width=u,e.height=c),r>4&&(d=u,f=c),o){case 2:l.translate(d,0),l.scale(-1,1);break;case 3:l.translate(d,f),l.rotate(Math.PI);break;case 4:l.translate(0,f),l.scale(1,-1);break;case 5:l.rotate(-.5*Math.PI),l.scale(-1,1);break;case 6:l.rotate(-.5*Math.PI),l.translate(-d,0);break;case 7:l.rotate(-.5*Math.PI),l.translate(-d,f),l.scale(1,-1);break;case 8:l.rotate(.5*Math.PI),l.translate(0,-f)}switch(h(r,o)&&(l.translate(d,f),l.rotate(Math.PI)),r){case 2:l.translate(c,0),l.scale(-1,1);break;case 3:l.translate(c,u),l.rotate(Math.PI);break;case 4:l.translate(0,u),l.scale(1,-1);break;case 5:l.rotate(.5*Math.PI),l.scale(1,-1);break;case 6:l.rotate(.5*Math.PI),l.translate(0,-u);break;case 7:l.rotate(.5*Math.PI),l.translate(c,-u),l.scale(-1,1);break;case 8:l.rotate(-.5*Math.PI),l.translate(-c,0)}}}})?a.apply(e,n):a)||(t.exports=a)}()},200:(t,e,i)=>{var n,a;!function(){"use strict";n=[i(302)],void 0===(a="function"==typeof(a=function(t){var e=t.transform;t.createCanvas=function(e,i,n){if(n&&t.global.OffscreenCanvas)return new OffscreenCanvas(e,i);var a=document.createElement("canvas");return a.width=e,a.height=i,a},t.transform=function(i,n,a,r,o){e.call(t,t.scale(i,n,o),n,a,r,o)},t.transformCoordinates=function(){},t.getTransformedOptions=function(t,e){var i,n,a,r,o=e.aspectRatio;if(!o)return e;for(n in i={},e)Object.prototype.hasOwnProperty.call(e,n)&&(i[n]=e[n]);return i.crop=!0,(a=t.naturalWidth||t.width)/(r=t.naturalHeight||t.height)>o?(i.maxWidth=r*o,i.maxHeight=r):(i.maxWidth=a,i.maxHeight=a/o),i},t.drawImage=function(t,e,i,n,a,r,o,s,h){var l=e.getContext("2d");return!1===h.imageSmoothingEnabled?(l.msImageSmoothingEnabled=!1,l.imageSmoothingEnabled=!1):h.imageSmoothingQuality&&(l.imageSmoothingQuality=h.imageSmoothingQuality),l.drawImage(t,i,n,a,r,0,0,o,s),l},t.requiresCanvas=function(t){return t.canvas||t.crop||!!t.aspectRatio},t.scale=function(e,i,n){i=i||{},n=n||{};var a,r,o,s,h,l,c,u,d,f,g,p,v=e.getContext||t.requiresCanvas(i)&&!!t.global.HTMLCanvasElement,m=e.naturalWidth||e.width,y=e.naturalHeight||e.height,b=m,S=y;function C(){var t=Math.max((o||b)/b,(s||S)/S);t>1&&(b*=t,S*=t)}function _(){var t=Math.min((a||b)/b,(r||S)/S);t<1&&(b*=t,S*=t)}if(v&&(c=(i=t.getTransformedOptions(e,i,n)).left||0,u=i.top||0,i.sourceWidth?(h=i.sourceWidth,void 0!==i.right&&void 0===i.left&&(c=m-h-i.right)):h=m-c-(i.right||0),i.sourceHeight?(l=i.sourceHeight,void 0!==i.bottom&&void 0===i.top&&(u=y-l-i.bottom)):l=y-u-(i.bottom||0),b=h,S=l),a=i.maxWidth,r=i.maxHeight,o=i.minWidth,s=i.minHeight,v&&a&&r&&i.crop?(b=a,S=r,(g=h/l-a/r)<0?(l=r*h/a,void 0===i.top&&void 0===i.bottom&&(u=(y-l)/2)):g>0&&(h=a*l/r,void 0===i.left&&void 0===i.right&&(c=(m-h)/2))):((i.contain||i.cover)&&(o=a=a||o,s=r=r||s),i.cover?(_(),C()):(C(),_())),v){if((d=i.pixelRatio)>1&&(!e.style.width||Math.floor(parseFloat(e.style.width,10))!==Math.floor(m/d))&&(b*=d,S*=d),t.orientationCropBug&&!e.getContext&&(c||u||h!==m||l!==y)&&(g=e,e=t.createCanvas(m,y,!0),t.drawImage(g,e,0,0,m,y,m,y,i)),(f=i.downsamplingRatio)>0&&f<1&&bb;)p=t.createCanvas(h*f,l*f,!0),t.drawImage(e,p,c,u,h,l,p.width,p.height,i),c=0,u=0,h=p.width,l=p.height,e=p;return p=t.createCanvas(b,S),t.transformCoordinates(p,i,n),d>1&&(p.style.width=p.width/d+"px"),t.drawImage(e,p,c,u,h,l,b,S,i).setTransform(1,0,0,1,0,0),p}return e.width=b,e.height=S,e}})?a.apply(e,n):a)||(t.exports=a)}()},302:function(t,e,i){var n;!function(a){"use strict";var r=a.URL||a.webkitURL;function o(t){return!!r&&r.createObjectURL(t)}function s(t){return!!r&&r.revokeObjectURL(t)}function h(t,e){!t||"blob:"!==t.slice(0,5)||e&&e.noRevoke||s(t)}function l(t,e,i,n){if(!a.FileReader)return!1;var r=new FileReader;return r.onload=function(){e.call(r,this.result)},i&&(r.onabort=r.onerror=function(){i.call(r,this.error)}),(n=r[n||"readAsDataURL"])?(n.call(r,t),r):void 0}function c(t,e){return Object.prototype.toString.call(e)==="[object "+t+"]"}function u(t,e,i){function n(e,n){var r,s=document.createElement("img");function d(t,i){e!==n?t instanceof Error?n(t):((i=i||{}).image=t,e(i)):e&&e(t,i)}function f(e,n){n&&a.console&&console.log(n),e&&c("Blob",e)?r=o(t=e):(r=t,i&&i.crossOrigin&&(s.crossOrigin=i.crossOrigin)),s.src=r}return s.onerror=function(t){h(r,i),n&&n.call(s,t)},s.onload=function(){h(r,i);var e={originalWidth:s.naturalWidth||s.width,originalHeight:s.naturalHeight||s.height};try{u.transform(s,i,d,t,e)}catch(e){n&&n(e)}},"string"==typeof t?(u.requiresMetaData(i)?u.fetchBlob(t,f,i):f(),s):c("Blob",t)||c("File",t)?(r=o(t))?(s.src=r,s):l(t,(function(t){s.src=t}),n):void 0}return a.Promise&&"function"!=typeof e?(i=e,new Promise(n)):n(e,e)}u.requiresMetaData=function(t){return t&&t.meta},u.fetchBlob=function(t,e){e()},u.transform=function(t,e,i,n,a){i(t,a)},u.global=a,u.readFile=l,u.isInstanceOf=c,u.createObjectURL=o,u.revokeObjectURL=s,void 0===(n=function(){return u}.call(e,i,e,t))||(t.exports=n)}("undefined"!=typeof window&&window||this)},918:function(t,e){var i;(function(){var a=function(t){return t instanceof a?t:this instanceof a?void(this.EXIFwrapped=t):new a(t)},r=((e=t.exports?t.exports=a:e).EXIF=a).Tags={36864:"ExifVersion",40960:"FlashpixVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",37500:"MakerNote",37510:"UserComment",40964:"RelatedSoundFile",36867:"DateTimeOriginal",36868:"DateTimeDigitized",37520:"SubsecTime",37521:"SubsecTimeOriginal",37522:"SubsecTimeDigitized",33434:"ExposureTime",33437:"FNumber",34850:"ExposureProgram",34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:"OECF",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureBias",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37396:"SubjectArea",37386:"FocalLength",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41492:"SubjectLocation",41493:"ExposureIndex",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",41985:"CustomRendered",41986:"ExposureMode",41987:"WhiteBalance",41988:"DigitalZoomRation",41989:"FocalLengthIn35mmFilm",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",40965:"InteroperabilityIFDPointer",42016:"ImageUniqueID"},o=a.TiffTags={256:"ImageWidth",257:"ImageHeight",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer",40965:"InteroperabilityIFDPointer",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",274:"Orientation",277:"SamplesPerPixel",284:"PlanarConfiguration",530:"YCbCrSubSampling",531:"YCbCrPositioning",282:"XResolution",283:"YResolution",296:"ResolutionUnit",273:"StripOffsets",278:"RowsPerStrip",279:"StripByteCounts",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",301:"TransferFunction",318:"WhitePoint",319:"PrimaryChromaticities",529:"YCbCrCoefficients",532:"ReferenceBlackWhite",306:"DateTime",270:"ImageDescription",271:"Make",272:"Model",305:"Software",315:"Artist",33432:"Copyright"},s=a.GPSTags={0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential"},h=a.IFD1Tags={256:"ImageWidth",257:"ImageHeight",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",273:"StripOffsets",274:"Orientation",277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",282:"XResolution",283:"YResolution",284:"PlanarConfiguration",296:"ResolutionUnit",513:"JpegIFOffset",514:"JpegIFByteCount",529:"YCbCrCoefficients",530:"YCbCrSubSampling",531:"YCbCrPositioning",532:"ReferenceBlackWhite"},l=a.StringValues={ExposureProgram:{0:"Not defined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},SensingMethod:{1:"Not defined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},SceneType:{1:"Directly photographed"},CustomRendered:{0:"Normal process",1:"Custom process"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},GainControl:{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},SubjectDistanceRange:{0:"Unknown",1:"Macro",2:"Close view",3:"Distant view"},FileSource:{3:"DSC"},Components:{0:"",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"}};function c(t){return t.exifdata}function u(t){var e=new DataView(t);if(255!=e.getUint8(0)||216!=e.getUint8(1))return!1;for(var i=2,n=t.byteLength;it.byteLength)return{};var a=f(t,e,e+i,h,n);if(a.Compression)switch(a.Compression){case 6:var r,o;a.JpegIFOffset&&a.JpegIFByteCount&&(r=e+a.JpegIFOffset,o=a.JpegIFByteCount,a.blob=new Blob([new Uint8Array(t.buffer,r,o)],{type:"image/jpeg"}));break;case 1:console.log("Thumbnail image format is TIFF, which is not implemented.");break;default:console.log("Unknown thumbnail image format '%s'",a.Compression)}else 2==a.PhotometricInterpretation&&console.log("Thumbnail image format is RGB, which is not implemented.");return a}(t,d,e,i),n}(e,i+4,e.getUint16(i+2));i+=2+e.getUint16(i+2)}}var d={120:"caption",110:"credit",25:"keywords",55:"dateCreated",80:"byline",85:"bylineTitle",122:"captionWriter",105:"headline",116:"copyright",15:"category"};function f(t,e,i,n,a){for(var r,o=t.getUint16(i,!a),s={},h=0;h")+8,o=(r=r.substring(r.indexOf("{!function(t){"use strict";var e=t.global.performance&&t.global.performance.now?function(){return t.global.performance.now()}:function(){return(new Date).getTime()},i=t.global.requestAnimationFrame||t.global.webkitRequestAnimationFrame||t.global.mozRequestAnimationFrame||t.global.oRequestAnimationFrame||t.global.msRequestAnimationFrame||function(t){setTimeout(t,1e3/60)};function n(){return i.apply(t.global,arguments)}t.Animation=function(i,n){var a=t.Animation;this.func=i,this.setLayers(n),this.id=a.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:e()}},t.Animation.prototype={setLayers:function(t){var e=t?0{!function(t){"use strict";t.BaseLayer=function(t){this.___init(t)},t.Util.addMethods(t.BaseLayer,{___init:function(e){this.nodeType="Layer",t.Container.call(this,e)},createPNGStream:function(){return this.canvas._canvas.createPNGStream()},getCanvas:function(){return this.canvas},getHitCanvas:function(){return this.hitCanvas},getContext:function(){return this.getCanvas().getContext()},clear:function(t){return this.getContext().clear(t),this},clearHitCache:function(){this._hitImageData=void 0},setZIndex:function(e){t.Node.prototype.setZIndex.call(this,e);var i=this.getStage();return i&&(i.content.removeChild(this.getCanvas()._canvas),e{!function(){"use strict";var t;Konva.Canvas=function(t){this.init(t)},Konva.Canvas.prototype={init:function(e){e=(e||{}).pixelRatio||Konva.pixelRatio||function(){if(t)return t;var e=Konva.Util.createCanvasElement().getContext("2d");return t=(Konva.window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}(),this.pixelRatio=e,this._canvas=Konva.Util.createCanvasElement(),this._canvas.style.padding=0,this._canvas.style.margin=0,this._canvas.style.border=0,this._canvas.style.background="transparent",this._canvas.style.position="absolute",this._canvas.style.top=0,this._canvas.style.left=0},getContext:function(){return this.context},getPixelRatio:function(){return this.pixelRatio},setPixelRatio:function(t){var e=this.pixelRatio;this.pixelRatio=t,this.setSize(this.getWidth()/e,this.getHeight()/e)},setWidth:function(t){this.width=this._canvas.width=t*this.pixelRatio,this._canvas.style.width=t+"px",t=this.pixelRatio,this.getContext()._context.scale(t,t)},setHeight:function(t){this.height=this._canvas.height=t*this.pixelRatio,this._canvas.style.height=t+"px",t=this.pixelRatio,this.getContext()._context.scale(t,t)},getWidth:function(){return this.width},getHeight:function(){return this.height},setSize:function(t,e){this.setWidth(t),this.setHeight(e)},toDataURL:function(t,e){try{return this._canvas.toDataURL(t,e)}catch(t){try{return this._canvas.toDataURL()}catch(t){return Konva.Util.warn("Unable to get data URL. "+t.message),""}}}},Konva.SceneCanvas=function(t){var e=t||{},i=e.width||0;t=e.height||0,Konva.Canvas.call(this,e),this.context=new Konva.SceneContext(this),this.setSize(i,t)},Konva.Util.extend(Konva.SceneCanvas,Konva.Canvas),Konva.HitCanvas=function(t){var e=t||{},i=e.width||0;t=e.height||0,Konva.Canvas.call(this,e),this.context=new Konva.HitContext(this),this.setSize(i,t),this.hitCanvas=!0},Konva.Util.extend(Konva.HitCanvas,Konva.Canvas)}()},513:()=>{!function(){"use strict";Konva.Container=function(t){this.__init(t)},Konva.Util.addMethods(Konva.Container,{__init:function(t){this.children=new Konva.Collection,Konva.Node.call(this,t)},getChildren:function(t){if(!t)return this.children;var e=new Konva.Collection;return this.children.each((function(i){t(i)&&e.push(i)})),e},hasChildren:function(){return 0{!function(){"use strict";var t=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"];Konva.Context=function(t){this.init(t)},Konva.Context.prototype={init:function(t){this.canvas=t,this._context=t._canvas.getContext("2d"),Konva.enableTrace&&(this.traceArr=[],this._enableTrace())},fillShape:function(t){t.getFillEnabled()&&this._fill(t)},strokeShape:function(t){t.getStrokeEnabled()&&this._stroke(t)},fillStrokeShape:function(t){t.getFillEnabled()&&this._fill(t),t.getStrokeEnabled()&&this._stroke(t)},getTrace:function(t){for(var e,i,n,a=this.traceArr,r=a.length,o="",s=0;s=Konva.traceArrMax&&e.shift()},reset:function(){var t=this.getCanvas().getPixelRatio();this.setTransform(+t,0,0,+t,0,0)},getCanvas:function(){return this.canvas},clear:function(t){var e=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,e.getWidth()/e.pixelRatio,e.getHeight()/e.pixelRatio)},_applyLineCap:function(t){(t=t.getLineCap())&&this.setAttr("lineCap",t)},_applyOpacity:function(t){1!==(t=t.getAbsoluteOpacity())&&this.setAttr("globalAlpha",t)},_applyLineJoin:function(t){(t=t.getLineJoin())&&this.setAttr("lineJoin",t)},setAttr:function(t,e){this._context[t]=e},arc:function(){var t=arguments;this._context.arc(t[0],t[1],t[2],t[3],t[4],t[5])},beginPath:function(){this._context.beginPath()},bezierCurveTo:function(){var t=arguments;this._context.bezierCurveTo(t[0],t[1],t[2],t[3],t[4],t[5])},clearRect:function(){var t=arguments;this._context.clearRect(t[0],t[1],t[2],t[3])},clip:function(){this._context.clip()},closePath:function(){this._context.closePath()},createImageData:function(){var t=arguments;return 2===t.length?this._context.createImageData(t[0],t[1]):1===t.length?this._context.createImageData(t[0]):void 0},createLinearGradient:function(){var t=arguments;return this._context.createLinearGradient(t[0],t[1],t[2],t[3])},createPattern:function(){var t=arguments;return this._context.createPattern(t[0],t[1])},createRadialGradient:function(){var t=arguments;return this._context.createRadialGradient(t[0],t[1],t[2],t[3],t[4],t[5])},drawImage:function(){var t=arguments,e=this._context;3===t.length?e.drawImage(t[0],t[1],t[2]):5===t.length?e.drawImage(t[0],t[1],t[2],t[3],t[4]):9===t.length&&e.drawImage(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])},isPointInPath:function(t,e){return this._context.isPointInPath(t,e)},fill:function(){this._context.fill()},fillRect:function(t,e,i,n){this._context.fillRect(t,e,i,n)},strokeRect:function(t,e,i,n){this._context.strokeRect(t,e,i,n)},fillText:function(){var t=arguments;this._context.fillText(t[0],t[1],t[2])},measureText:function(t){return this._context.measureText(t)},getImageData:function(){var t=arguments;return this._context.getImageData(t[0],t[1],t[2],t[3])},lineTo:function(){var t=arguments;this._context.lineTo(t[0],t[1])},moveTo:function(){var t=arguments;this._context.moveTo(t[0],t[1])},rect:function(){var t=arguments;this._context.rect(t[0],t[1],t[2],t[3])},putImageData:function(){var t=arguments;this._context.putImageData(t[0],t[1],t[2])},quadraticCurveTo:function(){var t=arguments;this._context.quadraticCurveTo(t[0],t[1],t[2],t[3])},restore:function(){this._context.restore()},rotate:function(){var t=arguments;this._context.rotate(t[0])},save:function(){this._context.save()},scale:function(){var t=arguments;this._context.scale(t[0],t[1])},setLineDash:function(){var t=arguments,e=this._context;this._context.setLineDash?e.setLineDash(t[0]):"mozDash"in e?e.mozDash=t[0]:"webkitLineDash"in e&&(e.webkitLineDash=t[0])},getLineDash:function(){return this._context.getLineDash()},setTransform:function(){var t=arguments;this._context.setTransform(t[0],t[1],t[2],t[3],t[4],t[5])},stroke:function(){this._context.stroke()},strokeText:function(){var t=arguments;this._context.strokeText(t[0],t[1],t[2])},transform:function(){var t=arguments;this._context.transform(t[0],t[1],t[2],t[3],t[4],t[5])},translate:function(){var t=arguments;this._context.translate(t[0],t[1])},_enableTrace:function(){for(var e,i=this,n=t.length,a=Konva.Util._simplifyArray,r=this.setAttr,o=0;o{t.exports=i(894),i(840),i(613),i(765),i(970),i(150),i(513),i(144),i(514),i(892),i(711),i(715),i(512)},371:()=>{!function(){"use strict";Konva.DD={anim:new Konva.Animation((function(){var t=this.dirty;return this.dirty=!1,t})),isDragging:!1,justDragged:!1,offset:{x:0,y:0},node:null,_drag:function(t){var e=Konva.DD,i=e.node;if(i){if(!e.isDragging){var n=i.getStage().getPointerPosition();n||(i.getStage()._setPointerPosition(t),n=i.getStage().getPointerPosition());var a=i.dragDistance();if(Math.max(Math.abs(n.x-e.startPointerPos.x),Math.abs(n.y-e.startPointerPos.y)){!function(){"use strict";var t="get",e="set";Konva.Factory={addGetterSetter:function(t,e,i,n,a){this.addGetter(t,e,i),this.addSetter(t,e,n,a),this.addOverloadedGetterSetter(t,e)},addGetter:function(e,i,n){var a=t+Konva.Util._capitalize(i);e.prototype[a]=function(){var t=this.attrs[i];return void 0===t?n:t}},addSetter:function(t,i,n,a){var r=e+Konva.Util._capitalize(i);t.prototype[r]=function(t){return n&&null!=t&&(t=n.call(this,t,i)),this._setAttr(i,t),a&&a.call(this),this}},addComponentsGetterSetter:function(i,n,a,r,o){var s,h,l=a.length,c=Konva.Util._capitalize,u=t+c(n),d=e+c(n);i.prototype[u]=function(){var t={};for(s=0;s{!function(){"use strict";Konva.FastLayer=function(t){this.____init(t)},Konva.Util.addMethods(Konva.FastLayer,{____init:function(t){this.nodeType="Layer",this.canvas=new Konva.SceneCanvas,Konva.BaseLayer.call(this,t)},_validateAdd:function(t){"Shape"!==t.getType()&&Konva.Util.throw("You may only add shapes to a fast layer.")},_setCanvasSize:function(t,e){this.canvas.setSize(t,e)},hitGraphEnabled:function(){return!1},getIntersection:function(){return null},drawScene:function(t){var e=this.getLayer();return e=t||e&&e.getCanvas(),this.getClearBeforeDraw()&&e.getContext().clear(),Konva.Container.prototype.drawScene.call(this,e),this},draw:function(){return this.drawScene(),this},setVisible:function(t){return Konva.Node.prototype.setVisible.call(this,t),this.getCanvas()._canvas.style.display=t?"block":"none",this}}),Konva.Util.extend(Konva.FastLayer,Konva.BaseLayer),Konva.Collection.mapMethods(Konva.FastLayer)}()},894:(t,e,i)=>{!function(){"use strict";var e=Math.PI/180,n={version:"@@version",stages:[],idCounter:0,ids:{},names:{},shapes:{},listenClickTap:!1,inDblClickWindow:!1,isBrowser:"undefined"!=typeof window&&("[object Window]"==={}.toString.call(window)||"[object global]"==={}.toString.call(window)),isUnminified:/comment/.test((function(){})),enableTrace:!1,traceArrMax:100,dblClickWindow:400,pixelRatio:void 0,dragDistance:3,angleDeg:!0,showWarnings:!0,Filters:{},isDragging:function(){var t=n.DD;return!!t&&t.isDragging},isDragReady:function(){var t=n.DD;return!!t&&!!t.node},_addId:function(t,e){e&&(this.ids[e]=t)},_removeId:function(t){void 0!==t&&delete this.ids[t]},_addName:function(t,e){e&&(this.names[e]||(this.names[e]=[]),this.names[e].push(t))},_removeName:function(t,e){if(t){var i=this.names[t];if(i){for(var n=0;n{!function(){"use strict";Konva.Group=function(t){this.___init(t)},Konva.Util.addMethods(Konva.Group,{___init:function(t){this.nodeType="Group",Konva.Container.call(this,t)},_validateAdd:function(t){"Group"!==(t=t.getType())&&"Shape"!==t&&Konva.Util.throw("You may only add groups and shapes to groups.")}}),Konva.Util.extend(Konva.Group,Konva.Container),Konva.Collection.mapMethods(Konva.Group)}()},711:()=>{!function(){"use strict";var t=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],e=t.length;Konva.Layer=function(t){this.____init(t)},Konva.Util.addMethods(Konva.Layer,{____init:function(t){this.nodeType="Layer",this.canvas=new Konva.SceneCanvas,this.hitCanvas=new Konva.HitCanvas({pixelRatio:1}),Konva.BaseLayer.call(this,t)},_setCanvasSize:function(t,e){this.canvas.setSize(t,e),this.hitCanvas.setSize(t,e)},_validateAdd:function(t){"Group"!==(t=t.getType())&&"Shape"!==t&&Konva.Util.throw("You may only add groups and shapes to a layer.")},getIntersection:function(i,n){var a,r,o;if(!this.hitGraphEnabled()||!this.isVisible())return null;for(var s=1,h=!1;;){for(r=0;r{!function(t){"use strict";var e="absoluteOpacity",i="absoluteTransform",n="absoluteScale",a="listening",r="mouseenter",o="mouseleave",s="transform",h="visible",l=["id"],c=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(" "),u=["scaleXChange.konva","scaleYChange.konva"].join(" ");t.Node=function(t){this._init(t)},t.Util.addMethods(t.Node,{_init:function(r){this._id=t.idCounter++,this.eventListeners={},this.attrs={},this._cache={},this._filterUpToDate=!1,this._isUnderCache=!1,this.setAttrs(r),this.on(c,(function(){this._clearCache(s),this._clearSelfAndDescendantCache(i)})),this.on(u,(function(){this._clearSelfAndDescendantCache(n)})),this.on("visibleChange.konva",(function(){this._clearSelfAndDescendantCache(h)})),this.on("listeningChange.konva",(function(){this._clearSelfAndDescendantCache(a)})),this.on("opacityChange.konva",(function(){this._clearSelfAndDescendantCache(e)}))},_clearCache:function(t){t?delete this._cache[t]:this._cache={}},_getCache:function(t,e){return void 0===this._cache[t]&&(this._cache[t]=e.call(this)),this._cache[t]},_clearSelfAndDescendantCache:function(t){this._clearCache(t),this.children&&this.getChildren().each((function(e){e._clearSelfAndDescendantCache(t)}))},clearCache:function(){return delete this._cache.canvas,this._filterUpToDate=!1,this},cache:function(i){var a=i||{},r={};void 0!==a.x&&void 0!==a.y&&void 0!==a.width&&void 0!==a.height||(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var o=a.width||r.width,s=a.height||r.height,h=a.pixelRatio,l=(void 0===a.x?r:a).x,c=(void 0===a.y?r:a).y,u=a.offset||0,d=a.drawBorder||!1;if(o&&s)return o+=2*u,s+=2*u,l-=u,c-=u,i=new t.SceneCanvas({pixelRatio:h,width:o,height:s}),r=new t.SceneCanvas({pixelRatio:h,width:o,height:s}),a=new t.HitCanvas({pixelRatio:1,width:o,height:s}),u=i.getContext(),h=a.getContext(),a.isCache=!0,this.clearCache(),u.save(),h.save(),u.translate(-l,-c),h.translate(-l,-c),this._isUnderCache=!0,this._clearSelfAndDescendantCache(e),this._clearSelfAndDescendantCache(n),this.drawScene(i,this,!0),this.drawHit(a,this,!0),this._isUnderCache=!1,u.restore(),h.restore(),d&&(u.save(),u.beginPath(),u.rect(0,0,o,s),u.closePath(),u.setAttr("strokeStyle","red"),u.setAttr("lineWidth",5),u.stroke(),u.restore()),this._cache.canvas={scene:i,filter:r,hit:a,x:l,y:c},this;t.Util.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.")},getClientRect:function(){throw new Error('abstract "getClientRect" method call')},_transformedRect:function(t,e){t=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}];var i,n,a,r,o=this.getAbsoluteTransform(e);return t.forEach((function(t){t=o.point(t),void 0===i&&(i=a=t.x,n=r=t.y),i=Math.min(i,t.x),n=Math.min(n,t.y),a=Math.max(a,t.x),r=Math.max(r,t.y)})),{x:i,y:n,width:a-i,height:r-n}},_drawCachedSceneCanvas:function(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this),t.translate(this._cache.canvas.x,this._cache.canvas.y);var e=this._getCachedSceneCanvas(),i=e.pixelRatio;t.drawImage(e._canvas,0,0,e.width/i,e.height/i),t.restore()},_drawCachedHitCanvas:function(t){var e=this._cache.canvas.hit;t.save(),t.translate(this._cache.canvas.x,this._cache.canvas.y),t.drawImage(e._canvas,0,0),t.restore()},_getCachedSceneCanvas:function(){var e,i,n,a,r=this.filters(),o=this._cache.canvas,s=o.scene,h=o.filter,l=h.getContext();if(r){if(!this._filterUpToDate){var c=s.pixelRatio;try{for(e=r.length,l.clear(),l.drawImage(s._canvas,0,0,s.getWidth()/c,s.getHeight()/c),i=l.getImageData(0,0,h.getWidth(),h.getHeight()),n=0;n{!function(t){"use strict";var e="hasShadow",i="shadowRGBA";function n(t){t.fill()}function a(t){t.stroke()}function r(t){t.fill()}function o(t){t.stroke()}function s(){this._clearCache(e)}function h(){this._clearCache(i)}t.Shape=function(t){this.__init(t)},t.Util.addMethods(t.Shape,{__init:function(e){this.nodeType="Shape",this._fillFunc=n,this._strokeFunc=a,this._fillFuncHit=r,this._strokeFuncHit=o;for(var i,l=t.shapes;!(i=t.Util.getRandomColor())||i in l;);l[this.colorKey=i]=this,t.Node.call(this,e),this.on("shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",s),this.on("shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",h)},hasChildren:function(){return!1},getChildren:function(){return[]},getContext:function(){return this.getLayer().getContext()},getCanvas:function(){return this.getLayer().getCanvas()},hasShadow:function(){return this._getCache(e,this._hasShadow)},_hasShadow:function(){return this.getShadowEnabled()&&0!==this.getShadowOpacity()&&!!(this.getShadowColor()||this.getShadowBlur()||this.getShadowOffsetX()||this.getShadowOffsetY())},getShadowRGBA:function(){return this._getCache(i,this._getShadowRGBA)},_getShadowRGBA:function(){if(this.hasShadow()){var e=t.Util.colorToRGBA(this.shadowColor());return"rgba("+e.r+","+e.g+","+e.b+","+e.a*(this.getShadowOpacity()||1)+")"}},hasFill:function(){return!!(this.getFill()||this.getFillPatternImage()||this.getFillLinearGradientColorStops()||this.getFillRadialGradientColorStops())},hasStroke:function(){return this.strokeEnabled()&&!(!this.stroke()&&!this.getStrokeLinearGradientColorStops())},intersects:function(t){var e=this.getStage().bufferHitCanvas;return e.getContext().clear(),this.drawHit(e),0{!function(){"use strict";var t="mouseout",e="mouseleave",i="mouseover",n="mousemove",a="mousedown",r="mouseup",o="contextmenu",s="dblclick",h="touchstart",l="touchend",c="touchmove",u="wheel",d=[a,n,r,t,h,c,l,i,u,o],f=d.length;Konva.Stage=function(t){this.___init(t)},Konva.Util.addMethods(Konva.Stage,{___init:function(t){this.nodeType="Stage",Konva.Container.call(this,t),this._id=Konva.idCounter++,this._buildDOM(),this._bindContentEvents(),this._enableNestedTransforms=!1,Konva.stages.push(this)},_validateAdd:function(t){"Layer"!==t.getType()&&Konva.Util.throw("You may only add layers to the stage.")},setContainer:function(t){var e,i;if("string"==typeof t&&!(t="."===t.charAt(0)?(e=t.slice(1),Konva.document.getElementsByClassName(e)[0]):(i="#"!==t.charAt(0)?t:t.slice(1),Konva.document.getElementById(i))))throw"Can not find container in document with id "+i;return this._setAttr("container",t),this},shouldDrawHit:function(){return!0},draw:function(){return Konva.Node.prototype.draw.call(this),this},setHeight:function(t){return Konva.Node.prototype.setHeight.call(this,t),this._resizeDOM(),this},setWidth:function(t){return Konva.Node.prototype.setWidth.call(this,t),this._resizeDOM(),this},clear:function(){for(var t=this.children,e=t.length,i=0;i{!function(){"use strict";Konva.Collection=function(){var t=[].slice.call(arguments),e=t.length,i=0;for(this.length=e;i>16&255,g:t>>8&255,b:255&t}},getRandomColor:function(){for(var t=(16777215*Math.random()<<0).toString(16);t.length<6;)t="0"+t;return"#"+t},get:function(t,e){return void 0===t?e:t},getRGB:function(t){var e;return t in n?{r:(e=n[t])[0],g:e[1],b:e[2]}:"#"===t[0]?this._hexToRgb(t.substring(1)):"rgb("===t.substr(0,4)?(e=a.exec(t.replace(/ /g,"")),{r:parseInt(e[1],10),g:parseInt(e[2],10),b:parseInt(e[3],10)}):{r:0,g:0,b:0}},colorToRGBA:function(t){return t=t||"black",Konva.Util._namedColorToRBA(t)||Konva.Util._hex3ColorToRGBA(t)||Konva.Util._hex6ColorToRGBA(t)||Konva.Util._rgbColorToRGBA(t)||Konva.Util._rgbaColorToRGBA(t)},_namedColorToRBA:function(t){return(t=n[t.toLowerCase()])?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA:function(t){if(0===t.indexOf("rgb("))return{r:(t=(t=t.match(/rgb\(([^)]+)\)/)[1]).split(/ *, */).map(Number))[0],g:t[1],b:t[2],a:1}},_rgbaColorToRGBA:function(t){if(0===t.indexOf("rgba("))return{r:(t=(t=t.match(/rgba\(([^)]+)\)/)[1]).split(/ *, */).map(Number))[0],g:t[1],b:t[2],a:t[3]}},_hex6ColorToRGBA:function(t){if("#"===t[0]&&7===t.length)return{r:parseInt(t.slice(1,3),16),g:parseInt(t.slice(3,5),16),b:parseInt(t.slice(5,7),16),a:1}},_hex3ColorToRGBA:function(t){if("#"===t[0]&&4===t.length)return{r:parseInt(t[1]+t[1],16),g:parseInt(t[2]+t[2],16),b:parseInt(t[3]+t[3],16),a:1}},_merge:function(t,e){var i,n=this._clone(e);for(i in t)this._isObject(t[i])?n[i]=this._merge(t[i],n[i]):n[i]=t[i];return n},trimRight:function(t){return t.replace(/\s+$/,"")},trimLeft:function(t){return t.replace(/^\s+/,"")},haveIntersection:function(t,e){return!(e.x>t.x+t.width||e.x+e.widtht.y+t.height||e.y+e.heighte.length&&(a=e,e=t,t=a),n=0;n{!function(t){"use strict";var e=2*Math.PI-1e-4;t.Circle=function(t){this.___init(t)},t.Circle.prototype={_centroid:!0,___init:function(e){t.Shape.call(this,e),this.className="Circle",this.sceneFunc(this._sceneFunc)},_sceneFunc:function(t){t.beginPath(),t.arc(0,0,this.getRadius(),0,e,!1),t.closePath(),t.fillStrokeShape(this)},getWidth:function(){return 2*this.getRadius()},getHeight:function(){return 2*this.getRadius()},setWidth:function(e){t.Node.prototype.setWidth.call(this,e),this.radius()!==e/2&&this.setRadius(e/2)},setHeight:function(e){t.Node.prototype.setHeight.call(this,e),this.radius()!==e/2&&this.setRadius(e/2)}},t.Util.extend(t.Circle,t.Shape),t.Factory.addGetterSetter(t.Circle,"radius",0,t.Validators.getNumberValidator()),t.Factory.addOverloadedGetterSetter(t.Circle,"radius"),t.Collection.mapMethods(t.Circle)}(Konva)},951:()=>{!function(){"use strict";Konva.Image=function(t){this.___init(t)},Konva.Image.prototype={___init:function(t){Konva.Shape.call(this,t),this.className="Image",this.sceneFunc(this._sceneFunc),this.hitFunc(this._hitFunc)},_useBufferCanvas:function(){return(this.hasShadow()||1!==this.getAbsoluteOpacity())&&this.hasStroke()&&this.getStage()},_sceneFunc:function(t){var e,i,n=this.getWidth(),a=this.getHeight(),r=this.getImage();r&&(e=this.getCropWidth(),i=this.getCropHeight(),i=e&&i?[r,this.getCropX(),this.getCropY(),e,i,0,0,n,a]:[r,0,0,n,a]),(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,n,a),t.closePath(),t.fillStrokeShape(this)),r&&t.drawImage.apply(t,i)},_hitFunc:function(t){var e=this.getWidth(),i=this.getHeight();t.beginPath(),t.rect(0,0,e,i),t.closePath(),t.fillStrokeShape(this)},getWidth:function(){var t=this.getImage();return this.attrs.width||(t?t.width:0)},getHeight:function(){var t=this.getImage();return this.attrs.height||(t?t.height:0)}},Konva.Util.extend(Konva.Image,Konva.Shape),Konva.Factory.addGetterSetter(Konva.Image,"image"),Konva.Factory.addComponentsGetterSetter(Konva.Image,"crop",["x","y","width","height"]),Konva.Factory.addGetterSetter(Konva.Image,"cropX",0,Konva.Validators.getNumberValidator()),Konva.Factory.addGetterSetter(Konva.Image,"cropY",0,Konva.Validators.getNumberValidator()),Konva.Factory.addGetterSetter(Konva.Image,"cropWidth",0,Konva.Validators.getNumberValidator()),Konva.Factory.addGetterSetter(Konva.Image,"cropHeight",0,Konva.Validators.getNumberValidator()),Konva.Collection.mapMethods(Konva.Image),Konva.Image.fromURL=function(t,e){var i=new Image;i.onload=function(){var t=new Konva.Image({image:i});e(t)},i.crossOrigin="Anonymous",i.src=t}}()},639:()=>{!function(){"use strict";Konva.Path=function(t){this.___init(t)},Konva.Path.prototype={___init:function(t){this.dataArray=[];var e=this;Konva.Shape.call(this,t),this.className="Path",this.dataArray=Konva.Path.parsePathData(this.getData());for(var i=this.pathLength=0;ithis.dataArray[i].pathLength;)t-=this.dataArray[i].pathLength,++i;if(i===n)return{x:(e=this.dataArray[i-1].points.slice(-2))[0],y:e[1]};if(t<.01)return{x:(e=this.dataArray[i].points.slice(0,2))[0],y:e[1]};var a=this.dataArray[i],r=a.points;switch(a.command){case"L":return Konva.Path.getPointOnLine(t,a.start.x,a.start.y,r[0],r[1]);case"C":return Konva.Path.getPointOnCubicBezier(t/a.pathLength,a.start.x,a.start.y,r[0],r[1],r[2],r[3],r[4],r[5]);case"Q":return Konva.Path.getPointOnQuadraticBezier(t/a.pathLength,a.start.x,a.start.y,r[0],r[1],r[2],r[3]);case"A":var o=r[0],s=r[1],h=r[2],l=r[3],c=r[4],u=r[5],d=r[6];return c+=u*t/a.pathLength,Konva.Path.getPointOnEllipticalArc(o,s,h,l,c,d)}return null}},Konva.Util.extend(Konva.Path,Konva.Shape),Konva.Path.getLineLength=function(t,e,i,n){return Math.sqrt((i-t)*(i-t)+(n-e)*(n-e))},Konva.Path.getPointOnLine=function(t,e,i,n,a,r,o){void 0===r&&(r=e),void 0===o&&(o=i);var s=(a-i)/(n-e+1e-8),h=Math.sqrt(t*t/(1+s*s));n{!function(){"use strict";Konva.Rect=function(t){this.___init(t)},Konva.Rect.prototype={___init:function(t){Konva.Shape.call(this,t),this.className="Rect",this.sceneFunc(this._sceneFunc)},_sceneFunc:function(t){var e=this.getCornerRadius(),i=this.getWidth(),n=this.getHeight();t.beginPath(),e?(e=Math.min(e,i/2,n/2),t.moveTo(e,0),t.lineTo(i-e,0),t.arc(i-e,e,e,3*Math.PI/2,0,!1),t.lineTo(i,n-e),t.arc(i-e,n-e,e,0,Math.PI/2,!1),t.lineTo(e,n),t.arc(e,n-e,e,Math.PI/2,Math.PI,!1),t.lineTo(0,e),t.arc(e,e,e,Math.PI,3*Math.PI/2,!1)):t.rect(0,0,i,n),t.closePath(),t.fillStrokeShape(this)}},Konva.Util.extend(Konva.Rect,Konva.Shape),Konva.Factory.addGetterSetter(Konva.Rect,"cornerRadius",0,Konva.Validators.getNumberValidator()),Konva.Collection.mapMethods(Konva.Rect)}()},297:e=>{"use strict";e.exports=t}},i={};function a(t){if(i[t])return i[t].exports;var n=i[t]={exports:{}};return e[t].call(n.exports,n,n.exports,a),n.exports}a.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return a.d(e,{a:e}),e},a.d=(t,e)=>{for(var i in e)a.o(e,i)&&!a.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),a.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";a.r(r),a.d(r,{default:()=>p});var t=a(297),e=a.n(t),i=(t=a(435),a.n(t)),n=(t=a(918),a.n(t)),o=(t=a(303),a.n(t));function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function h(t,e){var i,n=Object.keys(t);return Object.getOwnPropertySymbols&&(i=Object.getOwnPropertySymbols(t),e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)),n}function l(t){for(var e=1;ee.width()}function g(t){return r.y()+c(t)>e.height()}function p(e){return c(e)>=t.minCropRadius?e:r.radius()-t.minCropRadius}function v(t){return t+.86*r.radius()}function m(t){return t-.5*r.radius()}function y(t,e){s.x(v(t)-8),s.y(m(e)-8),h.x(v(t)-8),h.y(m(e)-10)}function b(){if(t.props.exportAsSquare){var e=new(i().Image)({image:t.image}),a=e.width()/n.width(),o=e.height()/n.height(),s=2*r.radius()*a,h=2*r.radius()*o,l=t.props.exportSize?t.props.exportSize/s:void 0;return e.toDataURL({x:(r.x()-r.radius())*a,y:(r.y()-r.radius())*o,width:s,height:h,pixelRatio:l,mimeType:t.props.exportMimeType,quality:t.props.exportQuality})}return s=2*r.radius(),h=2*r.radius(),l=t.props.exportSize?t.props.exportSize/s:void 0,r.toDataURL({x:r.x()-r.radius(),y:r.y()-r.radius(),width:s,height:h,pixelRatio:l,mimeType:t.props.exportMimeType,quality:t.props.exportQuality})}function S(t){var e;t=0 // TypeScript Version: 2.3 -import * as React from 'react'; +import * as React from "react"; export interface Props { /** @@ -24,12 +24,12 @@ export interface Props { * The height of the editor (image will fit to this height) */ height: number; - + /** * The desired width of the image, can not be used together with imageHeight */ imageWidth?: number; - + /** * The desired height of the image, can not be used together with imageWidth */ @@ -117,7 +117,7 @@ export interface Props { * Label text * Default: Choose a file */ - label?: string; + label?: any; /** * The style object for preview label @@ -138,7 +138,7 @@ export interface Props { * Invoked when user drag&drop event stop and return croped image in base64 sting */ onCrop?: (data: string) => void; - + /** * Invoked when user upload file with internal file loader */