Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 18.188.130.151
{"version":3,"sources":["../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","../node_modules/compress.js/index.js","views/barcode/index.js"],"names":["asyncGeneratorStep","gen","resolve","reject","_next","_throw","key","arg","info","value","error","done","Promise","then","_asyncToGenerator","fn","self","this","args","arguments","apply","err","undefined","__webpack_require__","d","__webpack_exports__","module","exports","t","e","i","n","a","id","loaded","call","m","c","p","r","o","u","__esModule","default","l","h","v","g","length","enumerable","configurable","writable","Object","defineProperty","prototype","w","TypeError","f","document","querySelector","setAttribute","addEventListener","compress","concat","Array","isArray","from","s","target","files","start","window","performance","now","alt","name","ext","type","startSize","size","orientation","load","startWidth","naturalWidth","startHeight","naturalHeight","resize","maxWidth","maxHeight","width","height","endWidth","endHeight","imageToCanvas","iterations","base64prefix","prefix","canvasToBase64","quality","minQuality","finalSize","data","end","elapsedTimeInSeconds","initialSizeInMb","MB","endSizeInMb","endWidthInPx","endHeightInPx","initialWidthInPx","initialHeightInPx","sizeReducedInPercent","all","map","base64ToFile","replace","mime","split","match","atob","charCodeAt","Blob","Uint8Array","_n","createElement","getContext","drawImage","translate","scale","rotate","Math","PI","toDataURL","KB","FileReader","result","readAsDataURL","Image","src","min","endSize","onload","DataView","getUint16","byteLength","getUint32","readAsArrayBuffer","slice","_regeneratorRuntime","Op","hasOwn","hasOwnProperty","obj","desc","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","wrap","innerFn","outerFn","tryLocsList","protoGenerator","Generator","generator","create","context","Context","makeInvokeMethod","tryCatch","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","forEach","method","_invoke","AsyncIterator","PromiseImpl","previousPromise","callInvokeWithMethodAndArg","invoke","record","__await","unwrapped","state","Error","doneResult","delegate","delegateResult","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","methodName","return","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","displayName","isGeneratorFunction","genFun","ctor","constructor","mark","setPrototypeOf","__proto__","awrap","async","iter","keys","val","object","reverse","pop","skipTempReset","prev","charAt","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","catch","thrown","delegateYield","ScanBarcode","onFileChange","_ref","_Users_shivu_Documents_work_tdvs_react_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__","_callee","_context","Compress","preventDefault","_x","react__WEBPACK_IMPORTED_MODULE_1___default","accept","onChange"],"mappings":"4FAAA,SAAAA,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,GACA,IACA,IAAAC,EAAAP,EAAAK,GAAAC,GACAE,EAAAD,EAAAC,MACG,MAAAC,GAEH,YADAP,EAAAO,GAIAF,EAAAG,KACAT,EAAAO,GAEAG,QAAAV,QAAAO,GAAAI,KAAAT,EAAAC,GAIe,SAAAS,EAAAC,GACf,kBACA,IAAAC,EAAAC,KACAC,EAAAC,UACA,WAAAP,QAAA,SAAAV,EAAAC,GACA,IAAAF,EAAAc,EAAAK,MAAAJ,EAAAE,GAEA,SAAAd,EAAAK,GACAT,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAA,OAAAI,GAGA,SAAAJ,EAAAgB,GACArB,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAA,QAAAgB,GAGAjB,OAAAkB,MA/BAC,EAAAC,EAAAC,EAAA,sBAAAX,0BCCyDY,EAAAC,QAEzD,SAAAC,GACA,SAAAC,EAAAC,GACA,GAAAC,EAAAD,GAAA,OAAAC,EAAAD,GA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/js/14.2fd531d9.chunk.js","sourcesContent":["function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}","!function (t, e) {\n \"object\" == typeof exports && \"object\" == typeof module ? module.exports = e() : \"function\" == typeof define && define.amd ? define([], e) : \"object\" == typeof exports ? exports.Compress = e() : t.Compress = e();\n}(this, function () {\n return function (t) {\n function e(i) {\n if (n[i]) return n[i].exports;\n var a = n[i] = {\n exports: {},\n id: i,\n loaded: !1\n };\n return t[i].call(a.exports, a, a.exports, e), a.loaded = !0, a.exports;\n }\n var n = {};\n return e.m = t, e.c = n, e.p = \"\", e(0);\n }([function (t, e, n) {\n var i, a, r;\n !function (o, u) {\n a = [t, n(1), n(2), n(3), n(4), n(5), n(6)], i = u, r = \"function\" == typeof i ? i.apply(e, a) : i, !(void 0 !== r && (t.exports = r));\n }(this, function (t, e, n, i, a, r, o) {\n \"use strict\";\n\n function u(t) {\n return t && t.__esModule ? t : {\n default: t\n };\n }\n function s(t) {\n if (Array.isArray(t)) {\n for (var e = 0, n = Array(t.length); e < t.length; e++) n[e] = t[e];\n return n;\n }\n return Array.from(t);\n }\n function f(t, e) {\n if (!(t instanceof e)) throw new TypeError(\"Cannot call a class as a function\");\n }\n var d = u(e),\n l = u(n),\n c = u(i),\n h = u(a),\n v = u(r),\n p = u(o),\n g = function () {\n function t(t, e) {\n for (var n = 0; n < e.length; n++) {\n var i = e[n];\n i.enumerable = i.enumerable || !1, i.configurable = !0, \"value\" in i && (i.writable = !0), Object.defineProperty(t, i.key, i);\n }\n }\n return function (e, n, i) {\n return n && t(e.prototype, n), i && t(e, i), e;\n };\n }(),\n w = function () {\n function t() {\n f(this, t);\n }\n return g(t, [{\n key: \"attach\",\n value: function value(t, e) {\n var n = this;\n return new Promise(function (i, a) {\n var r = document.querySelector(t);\n r.setAttribute(\"accept\", \"image/*\"), r.addEventListener(\"change\", function (t) {\n var a = n.compress([].concat(s(t.target.files)), e);\n i(a);\n }, !1);\n });\n }\n }, {\n key: \"compress\",\n value: function value(t, e) {\n function n(t, e) {\n var n = new v.default(e);\n return n.start = window.performance.now(), n.alt = t.name, n.ext = t.type, n.startSize = t.size, p.default.orientation(t).then(function (e) {\n return n.orientation = e, c.default.load(t);\n }).then(i(n));\n }\n function i(t) {\n return function (e) {\n return h.default.load(e).then(function (e) {\n if (t.startWidth = e.naturalWidth, t.startHeight = e.naturalHeight, t.resize) {\n var n = h.default.resize(t.maxWidth, t.maxHeight)(e.naturalWidth, e.naturalHeight),\n i = n.width,\n a = n.height;\n t.endWidth = i, t.endHeight = a;\n } else t.endWidth = e.naturalWidth, t.endHeight = e.naturalHeight;\n return l.default.imageToCanvas(t.endWidth, t.endHeight, t.orientation)(e);\n }).then(function (e) {\n return t.iterations = 1, t.base64prefix = d.default.prefix(t.ext), a(e, t.startSize, t.quality, t.size, t.minQuality, t.iterations);\n }).then(function (e) {\n return t.finalSize = d.default.size(e), d.default.data(e);\n }).then(function (e) {\n t.end = window.performance.now();\n var n = t.end - t.start;\n return {\n data: e,\n prefix: t.base64prefix,\n elapsedTimeInSeconds: n / 1e3,\n alt: t.alt,\n initialSizeInMb: l.default.size(t.startSize).MB,\n endSizeInMb: l.default.size(t.finalSize).MB,\n ext: t.ext,\n quality: t.quality,\n endWidthInPx: t.endWidth,\n endHeightInPx: t.endHeight,\n initialWidthInPx: t.startWidth,\n initialHeightInPx: t.startHeight,\n sizeReducedInPercent: (t.startSize - t.finalSize) / t.startSize * 100,\n iterations: t.iterations\n };\n });\n };\n }\n function a(t, e) {\n var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1,\n i = arguments[3],\n r = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : 1,\n o = arguments[5],\n u = l.default.canvasToBase64(t, n),\n s = d.default.size(u);\n return o += 1, s > i ? a(t, s, n - .1, i, r, o) : n > r ? a(t, s, n - .1, i, r, o) : n < .5 ? u : u;\n }\n return Promise.all(t.map(function (t) {\n return n(t, e);\n }));\n }\n }], [{\n key: \"convertBase64ToFile\",\n value: function value(t, e) {\n return l.default.base64ToFile(t, e);\n }\n }]), t;\n }();\n t.exports = w;\n });\n }, function (t, e, n) {\n var i, a, r;\n !function (n, o) {\n a = [e], i = o, r = \"function\" == typeof i ? i.apply(e, a) : i, !(void 0 !== r && (t.exports = r));\n }(this, function (t) {\n \"use strict\";\n\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n });\n var e = function e(t) {\n var e = t.replace(/^data:image\\/\\w+;base64,/, \"\").length;\n return (e - 814) / 1.37;\n },\n n = function n(t) {\n return t.split(\";\")[0].match(/jpeg|png|gif/)[0];\n },\n i = function i(t) {\n return t.replace(/^data:image\\/\\w+;base64,/, \"\");\n },\n a = function a(t) {\n return \"data:\" + t + \";base64,\";\n };\n t.default = {\n size: e,\n mime: n,\n data: i,\n prefix: a\n };\n });\n }, function (t, e, n) {\n var i, a, r;\n !function (n, o) {\n a = [e], i = o, r = \"function\" == typeof i ? i.apply(e, a) : i, !(void 0 !== r && (t.exports = r));\n }(this, function (t) {\n \"use strict\";\n\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n });\n var e = function e(t) {\n for (var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : \"image/jpeg\", n = window.atob(t), i = [], a = 0; a < n.length; a++) i[a] = n.charCodeAt(a);\n return new window.Blob([new Uint8Array(i)], {\n type: e\n });\n },\n n = function n(t, e, _n) {\n var i = document.createElement(\"canvas\"),\n a = i.getContext(\"2d\");\n return i.width = t, i.height = e, function (r) {\n if (!_n || _n > 8) return a.drawImage(r, 0, 0, i.width, i.height), i;\n switch (_n > 4 && (i.width = e, i.height = t), _n) {\n case 2:\n a.translate(t, 0), a.scale(-1, 1);\n break;\n case 3:\n a.translate(t, e), a.rotate(Math.PI);\n break;\n case 4:\n a.translate(0, e), a.scale(1, -1);\n break;\n case 5:\n a.rotate(.5 * Math.PI), a.scale(1, -1);\n break;\n case 6:\n a.rotate(.5 * Math.PI), a.translate(0, -e);\n break;\n case 7:\n a.rotate(.5 * Math.PI), a.translate(t, -e), a.scale(-1, 1);\n break;\n case 8:\n a.rotate(-.5 * Math.PI), a.translate(-t, 0);\n }\n return _n > 4 ? a.drawImage(r, 0, 0, i.height, i.width) : a.drawImage(r, 0, 0, i.width, i.height), i;\n };\n },\n i = function i(t) {\n var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : .75,\n n = t.toDataURL(\"image/jpeg\", e);\n return n;\n },\n a = function a(t) {\n return {\n KB: t / 1e3,\n MB: t / 1e6\n };\n };\n t.default = {\n base64ToFile: e,\n imageToCanvas: n,\n canvasToBase64: i,\n size: a\n };\n });\n }, function (t, e, n) {\n var i, a, r;\n !function (n, o) {\n a = [e], i = o, r = \"function\" == typeof i ? i.apply(e, a) : i, !(void 0 !== r && (t.exports = r));\n }(this, function (t) {\n \"use strict\";\n\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n });\n var e = function e(t) {\n return new Promise(function (e, n) {\n var i = new window.FileReader();\n i.addEventListener(\"load\", function (t) {\n e(t.target.result);\n }, !1), i.addEventListener(\"error\", function (t) {\n n(t);\n }, !1), i.readAsDataURL(t);\n });\n };\n t.default = {\n load: e\n };\n });\n }, function (t, e, n) {\n var i, a, r;\n !function (n, o) {\n a = [e], i = o, r = \"function\" == typeof i ? i.apply(e, a) : i, !(void 0 !== r && (t.exports = r));\n }(this, function (t) {\n \"use strict\";\n\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n });\n var e = function e(t) {\n return new Promise(function (e, n) {\n var i = new window.Image();\n i.addEventListener(\"load\", function () {\n e(i);\n }, !1), i.addEventListener(\"error\", function (t) {\n n(t);\n }, !1), i.src = t;\n });\n },\n n = function n(t, e) {\n return function (n, i) {\n if (!t && !e) return {\n width: n,\n height: i\n };\n var a = n / i,\n r = t / e,\n o = void 0,\n u = void 0;\n return a > r ? (o = Math.min(n, t), u = o / a) : (u = Math.min(i, e), o = u * a), {\n width: o,\n height: u\n };\n };\n };\n t.default = {\n load: e,\n resize: n\n };\n });\n }, function (t, e, n) {\n var i, a, r;\n !function (n, o) {\n a = [e], i = o, r = \"function\" == typeof i ? i.apply(e, a) : i, !(void 0 !== r && (t.exports = r));\n }(this, function (t) {\n \"use strict\";\n\n function e(t, e) {\n if (!(t instanceof e)) throw new TypeError(\"Cannot call a class as a function\");\n }\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n });\n var n = function t(n) {\n var i = n.quality,\n a = void 0 === i ? .75 : i,\n r = n.size,\n o = void 0 === r ? 2 : r,\n u = n.maxWidth,\n s = void 0 === u ? 1920 : u,\n f = n.maxHeight,\n d = void 0 === f ? 1920 : f,\n l = n.resize,\n c = void 0 === l || l;\n e(this, t), this.start = window.performance.now(), this.end = null, this.alt = null, this.ext = null, this.startSize = null, this.startWidth = null, this.startHeight = null, this.size = 1e3 * o * 1e3, this.endSize = null, this.endWidth = null, this.endHeight = null, this.iterations = 0, this.base64prefix = null, this.quality = a, this.resize = c, this.maxWidth = s, this.maxHeight = d, this.orientation = 1;\n };\n t.default = n;\n });\n }, function (t, e, n) {\n var i, a, r;\n !function (n, o) {\n a = [e], i = o, r = \"function\" == typeof i ? i.apply(e, a) : i, !(void 0 !== r && (t.exports = r));\n }(this, function (t) {\n \"use strict\";\n\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n });\n var e = function e(t) {\n return new Promise(function (e, n) {\n var i = new window.FileReader();\n i.onload = function (t) {\n var n = new DataView(t.target.result);\n 65496 !== n.getUint16(0, !1) && e(-2);\n for (var i = n.byteLength, a = 2; a < i;) {\n var r = n.getUint16(a, !1);\n if (a += 2, 65505 === r) {\n 1165519206 !== n.getUint32(a += 2, !1) && e(-1);\n var o = 18761 === n.getUint16(a += 6, !1);\n a += n.getUint32(a + 4, o);\n var u = n.getUint16(a, o);\n a += 2;\n for (var s = 0; s < u; s++) 274 === n.getUint16(a + 12 * s, o) && e(n.getUint16(a + 12 * s + 8, o));\n } else {\n if (65280 !== (65280 & r)) break;\n a += n.getUint16(a, !1);\n }\n }\n e(-1);\n }, i.readAsArrayBuffer(t.slice(0, 65536));\n });\n };\n t.default = {\n orientation: e\n };\n });\n }]);\n});","import React from \"react\";\nimport Compress from \"compress.js\";\n\nconst ScanBarcode = () => {\n const onFileChange = async (e) => {\n const compress = new Compress();\n e.preventDefault();\n\n const resizedImage = await compress.compress([e.target.files[0]], {\n size: 2, // the max size in MB, defaults to 2MB\n quality: 0.85, // the quality of the image, max is 1,\n maxWidth: 700, // the max width of the output image, defaults to 1920px\n maxHeight: 1200, // the max height of the output image, defaults to 1920px\n resize: true, // defaults to true, set false if you do not want to resize the image width and height\n });\n const img = resizedImage[0];\n // const base64str = \"data:\" + img.ext + \";base64,\" + img.data;\n };\n return (\n <div>\n <h1>Scan Barcode</h1>\n <label>Select image:</label>\n <input\n type=\"file\"\n id=\"img\"\n name=\"img\"\n accept=\"image/*\"\n onChange={onFileChange}\n ></input>\n </div>\n );\n};\n\nexport default ScanBarcode;\n"],"sourceRoot":""}
|