Skip to content

Instantly share code, notes, and snippets.

@Jaid
Last active May 31, 2021
Embed
What would you like to do?
Testing Babel output of React component with some optimizers
/* !
*** react-modern-picture 1.2.0
*** Copyright © 2021, Jaid <jaid.jsx@gmail.com> (https://github.com/Jaid)
*** @license MIT
*** See https://github.com/Jaid/react-modern-picture
!*/
let e; let t;e = this, t = function () {
return (() => {
const e = {
418: e => {
const t = Object.getOwnPropertySymbols; const r = Object.prototype.hasOwnProperty; const n = Object.prototype.propertyIsEnumerable;function o(e) {
if (e == null) {
throw new TypeError("Object.assign cannot be called with null or undefined")
} return new Object(e)
}e.exports = function () {
try {
if (!Object.assign) {
return !1
} const e = new String("abc");if (e[5] = "de", Object.getOwnPropertyNames(e)[0] === "5") {
return !1
} for (var t = {}, r = 0;r < 10;r++) {
t[`_${String.fromCharCode(r)}`] = r
} if (Object.getOwnPropertyNames(t).map(function (e) {
return t[e]
}).join("") !== "0123456789") {
return !1
} const n = {};return "abcdefghijklmnopqrst".split("").forEach(function (e) {
n[e] = e
}), Object.keys(Object.assign({}, n)).join("") === "abcdefghijklmnopqrst"
} catch (error) {
return !1
}
}() ? Object.assign : function (e, u) {
for (var i, a, c = o(e), f = 1;arguments.length > f;f++) {
for (const l in i = new Object(arguments[f])) {
r.call(i, l) && (c[l] = i[l])
} if (t) {
a = t(i);for (let s = 0;s < a.length;s++) {
n.call(i, a[s]) && (c[a[s]] = i[a[s]])
}
}
} return c
}
},
408: (e, t, r) => {
const n = r(418); let o = 60_103; let u = 60_106;t.Fragment = 60_107, t.StrictMode = 60_108, t.Profiler = 60_114;let i = 60_109; let a = 60_110; let c = 60_112;t.Suspense = 60_113;let f = 60_115; let l = 60_116;if (typeof Symbol == "function" && Symbol.for) {
const s = Symbol.for;o = s("react.element"), u = s("react.portal"), t.Fragment = s("react.fragment"), t.StrictMode = s("react.strict_mode"), t.Profiler = s("react.profiler"), i = s("react.provider"), a = s("react.context"), c = s("react.forward_ref"), t.Suspense = s("react.suspense"), f = s("react.memo"), l = s("react.lazy")
} const p = typeof Symbol == "function" && Symbol.iterator;function y(e) {
for (var t = `https://reactjs.org/docs/error-decoder.html?invariant=${e}`, r = 1;arguments.length > r;r++) {
t += `&args[]=${encodeURIComponent(arguments[r])}`
} return `Minified React error #${e}; visit ${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`
} const d = {
isMounted() {
return !1
},
enqueueForceUpdate() {},
enqueueReplaceState() {},
enqueueSetState() {},
}; const v = {};function b(e, t, r) {
this.props = e, this.context = t, this.refs = v, this.updater = r || d
} function m() {} function h(e, t, r) {
this.props = e, this.context = t, this.refs = v, this.updater = r || d
}b.prototype.isReactComponent = {}, b.prototype.setState = function (e, t) {
if (typeof e != "object" && typeof e != "function" && e != null) {
throw new Error(y(85))
} this.updater.enqueueSetState(this, e, t, "setState")
}, b.prototype.forceUpdate = function (e) {
this.updater.enqueueForceUpdate(this, e, "forceUpdate")
}, m.prototype = b.prototype;const g = h.prototype = new m;g.constructor = h, n(g, b.prototype), g.isPureReactComponent = !0;const _ = {current: null}; const j = Object.prototype.hasOwnProperty; const w = {
key: !0,
ref: !0,
__self: !0,
__source: !0,
};function O(e, t, r) {
let n; const u = {}; let i = null; let a = null;if (t != null) {
for (n in void 0 !== t.ref && (a = t.ref), void 0 !== t.key && (i = `${t.key}`), t) {
j.call(t, n) && !w.hasOwnProperty(n) && (u[n] = t[n])
}
}let c = arguments.length - 2;if (c === 1) {
u.children = r
} else if (c > 1) {
for (var f = new Array(c), l = 0;c > l;l++) {
f[l] = arguments[l + 2]
}u.children = f
} if (e && e.defaultProps) {
for (n in c = e.defaultProps) {
void 0 === u[n] && (u[n] = c[n])
}
} return {
$$typeof: o,
type: e,
key: i,
ref: a,
props: u,
_owner: _.current,
}
} function S(e) {
return typeof e == "object" && e !== null && e.$$typeof === o
} const k = /\/+/g;function E(e, t) {
return typeof e == "object" && e !== null && e.key != null ? function (e) {
const t = {
"=": "=0",
":": "=2",
};return `$${e.replace(/[:=]/g, function (e) {
return t[e]
})}`
}(`${e.key}`) : t.toString(36)
} function P(e, t, r, n, i) {
let a = typeof e;a !== "undefined" && a !== "boolean" || (e = null);let c = !1;if (e === null) {
c = !0
} else {
switch (a) {
case "string": case "number": c = !0;break;case "object": switch (e.$$typeof) {
case o: case u: c = !0
}
}
} if (c) {
return i = i(c = e), e = n === "" ? `.${E(c, 0)}` : n, Array.isArray(i) ? (r = "", e != null && (r = `${e.replace(k, "$&/")}/`), P(i, t, r, "", function (e) {
return e
})) : i != null && (S(i) && (i = function (e, t) {
return {
$$typeof: o,
type: e.type,
key: t,
ref: e.ref,
props: e.props,
_owner: e._owner,
}
}(i, r + (!i.key || c && c.key === i.key ? "" : `${`${i.key}`.replace(k, "$&/")}/`) + e)), t.push(i)), 1
} if (c = 0, n = n === "" ? "." : `${n}:`, Array.isArray(e)) {
for (var f = 0;f < e.length;f++) {
var l = n + E(a = e[f], f);c += P(a, t, r, l, i)
}
} else if (typeof(l = function (e) {
return e === null || typeof e != "object" ? null : typeof(e = p && e[p] || e["@@iterator"]) == "function" ? e : null
}(e)) == "function") {
for (e = l.call(e), f = 0;!(a = e.next()).done;) {
c += P(a = a.value, t, r, l = n + E(a, f++), i)
}
} else if (a === "object") {
throw t = `${e}`, new Error(y(31, t === "[object Object]" ? `object with keys {${Object.keys(e).join(", ")}}` : t))
} return c
} function $(e, t, r) {
if (e == null) {
return e
} const n = []; let o = 0;return P(e, n, "", "", function (e) {
return t.call(r, e, o++)
}), n
} function C(e) {
if (e._status === -1) {
let t = e._result;t = t(), e._status = 0, e._result = t, t.then(function (t) {
e._status === 0 && (t = t.default, e._status = 1, e._result = t)
}, function (error) {
e._status === 0 && (e._status = 2, e._result = error)
})
} if (e._status === 1) {
return e._result
} throw e._result
} const R = {current: null};function x() {
const e = R.current;if (e === null) {
throw new Error(y(321))
} return e
} const A = {
ReactCurrentDispatcher: R,
ReactCurrentBatchConfig: {transition: 0},
ReactCurrentOwner: _,
IsSomeRendererActing: {current: !1},
assign: n,
};t.Children = {
map: $,
forEach(e, t, r) {
$(e, function () {
t.apply(this, arguments)
}, r)
},
count(e) {
let t = 0;return $(e, function () {
t++
}), t
},
toArray(e) {
return $(e, function (e) {
return e
}) || []
},
only(e) {
if (!S(e)) {
throw new Error(y(143))
} return e
},
}, t.Component = b, t.PureComponent = h, t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = A, t.cloneElement = function (e, t, r) {
if (e == null) {
throw new Error(y(267, e))
} const u = n({}, e.props); let i = e.key; let a = e.ref; let c = e._owner;if (t != null) {
if (void 0 !== t.ref && (a = t.ref, c = _.current), void 0 !== t.key && (i = `${t.key}`), e.type && e.type.defaultProps) {
var f = e.type.defaultProps
} for (l in t) {
j.call(t, l) && !w.hasOwnProperty(l) && (u[l] = void 0 === t[l] && void 0 !== f ? f[l] : t[l])
}
} var l = arguments.length - 2;if (l === 1) {
u.children = r
} else if (l > 1) {
f = new Array(l);for (let s = 0;l > s;s++) {
f[s] = arguments[s + 2]
}u.children = f
} return {
$$typeof: o,
type: e.type,
key: i,
ref: a,
props: u,
_owner: c,
}
}, t.createContext = function (e, t) {
return void 0 === t && (t = null), (e = {
$$typeof: a,
_calculateChangedBits: t,
_currentValue: e,
_currentValue2: e,
_threadCount: 0,
Provider: null,
Consumer: null,
}).Provider = {
$$typeof: i,
_context: e,
}, e.Consumer = e
}, t.createElement = O, t.createFactory = function (e) {
const t = O.bind(null, e);return t.type = e, t
}, t.createRef = function () {
return {current: null}
}, t.forwardRef = function (e) {
return {
$$typeof: c,
render: e,
}
}, t.isValidElement = S, t.lazy = function (e) {
return {
$$typeof: l,
_payload: {
_status: -1,
_result: e,
},
_init: C,
}
}, t.memo = function (e, t) {
return {
$$typeof: f,
type: e,
compare: void 0 === t ? null : t,
}
}, t.useCallback = function (e, t) {
return x().useCallback(e, t)
}, t.useContext = function (e, t) {
return x().useContext(e, t)
}, t.useDebugValue = function () {}, t.useEffect = function (e, t) {
return x().useEffect(e, t)
}, t.useImperativeHandle = function (e, t, r) {
return x().useImperativeHandle(e, t, r)
}, t.useLayoutEffect = function (e, t) {
return x().useLayoutEffect(e, t)
}, t.useMemo = function (e, t) {
return x().useMemo(e, t)
}, t.useReducer = function (e, t, r) {
return x().useReducer(e, t, r)
}, t.useRef = function (e) {
return x().useRef(e)
}, t.useState = function (e) {
return x().useState(e)
}, t.version = "17.0.2"
},
294: (e, t, r) => {
e.exports = r(408)
},
}; const t = {};function r(n) {
const o = t[n];if (void 0 !== o) {
return o.exports
} const u = t[n] = {exports: {}};return e[n](u, u.exports, r), u.exports
}r.d = (e, t) => {
for (const n in t) {
r.o(t, n) && !r.o(e, n) && Object.defineProperty(e, n, {
enumerable: !0,
get: t[n],
})
}
}, r.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t), r.r = e => {
typeof Symbol != "undefined" && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {value: "Module"}), Object.defineProperty(e, "__esModule", {value: !0})
};const n = {};return (() => {
r.r(n), r.d(n, {default: () => c});const e = require("lodash");require("prop-types");let t; const o = r(294);function u(e, r, n, o) {
t || (t = typeof Symbol == "function" && Symbol.for && Symbol.for("react.element") || 60_103);const u = e && e.defaultProps; const i = arguments.length - 3;if (r || i === 0 || (r = {children: void 0}), i === 1) {
r.children = o
} else if (i > 1) {
for (var a = new Array(i), c = 0;i > c;c++) {
a[c] = arguments[c + 3]
}r.children = a
} if (r && u) {
for (const f in u) {
void 0 === r[f] && (r[f] = u[f])
}
} else {
r || (r = u || {})
} return {
$$typeof: t,
type: e,
key: void 0 === n ? null : `${n}`,
ref: null,
props: r,
_owner: null,
}
} function i() {
return (i = Object.assign || function (e) {
for (let t = 1;arguments.length > t;t++) {
const r = arguments[t];for (const n in r) {
Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n])
}
} return e
}).apply(this, arguments)
} const a = t => {
const r = (0, e.pick)(t, ["className", "style", "alt"]);return t.lazy && (r.loading = "lazy"), (0, e.isString)(t.input) ? o.createElement("img", i({src: t.input}, r)) : (0, e.isNil)(t.input.webp) && (0, e.isString)(t.input.fallback) ? o.createElement("img", i({src: t.input.fallback}, r)) : (0, e.isString)(t.input.webp) && (0, e.isNil)(t.input.fallback) ? o.createElement("img", i({src: t.input.webp}, r)) : (0, e.isObject)(t.input.webp) && (0, e.isObject)(t.input.fallback) ? (Object.assign(r, t.input.img), r.src || (r.src = t.input.fallback.srcset), u("picture", {}, void 0, o.createElement("source", t.input.webp), o.createElement("source", t.input.fallback), o.createElement("img", r))) : void 0
}; const c = a;let f; let l; let s;s = "react-modern-picture", (l = "displayName") in (f = a) ? Object.defineProperty(f, l, {
value: s,
enumerable: !0,
configurable: !0,
writable: !0,
}) : f[l] = s
})(), n
})()
}, typeof exports == "object" && typeof module == "object" ? module.exports = t() : typeof define == "function" && define.amd ? define([], t) : typeof exports == "object" ? exports.ReactModernPicture = t() : e.ReactModernPicture = t()
34,36c34,36
< for (var i, a, c = o(e), f = 1;arguments.length > f;f++) {
< for (const l in i = new Object(arguments[f])) {
< r.call(i, l) && (c[l] = i[l])
---
> for (var i, a, c = o(e), l = 1;arguments.length > l;l++) {
> for (const f in i = new Object(arguments[l])) {
> r.call(i, f) && (c[f] = i[f])
46,47c46,47
< const n = r(418); let o = 60_103; let u = 60_106;t.Fragment = 60_107, t.StrictMode = 60_108, t.Profiler = 60_114;let i = 60_109; let a = 60_110; let c = 60_112;t.Suspense = 60_113;let f = 60_115; let l = 60_116;if (typeof Symbol == "function" && Symbol.for) {
< const s = Symbol.for;o = s("react.element"), u = s("react.portal"), t.Fragment = s("react.fragment"), t.StrictMode = s("react.strict_mode"), t.Profiler = s("react.profiler"), i = s("react.provider"), a = s("react.context"), c = s("react.forward_ref"), t.Suspense = s("react.suspense"), f = s("react.memo"), l = s("react.lazy")
---
> const n = r(418); let o = 60_103; let u = 60_106;t.Fragment = 60_107, t.StrictMode = 60_108, t.Profiler = 60_114;let i = 60_109; let a = 60_110; let c = 60_112;t.Suspense = 60_113;let l = 60_115; let f = 60_116;if (typeof Symbol == "function" && Symbol.for) {
> const s = Symbol.for;o = s("react.element"), u = s("react.portal"), t.Fragment = s("react.fragment"), t.StrictMode = s("react.strict_mode"), t.Profiler = s("react.profiler"), i = s("react.provider"), a = s("react.context"), c = s("react.forward_ref"), t.Suspense = s("react.suspense"), l = s("react.memo"), f = s("react.lazy")
59,60c59,60
< }; const v = {};function b(e, t, r) {
< this.props = e, this.context = t, this.refs = v, this.updater = r || d
---
> }; const b = {};function v(e, t, r) {
> this.props = e, this.context = t, this.refs = b, this.updater = r || d
62,63c62,63
< this.props = e, this.context = t, this.refs = v, this.updater = r || d
< }b.prototype.isReactComponent = {}, b.prototype.setState = function (e, t) {
---
> this.props = e, this.context = t, this.refs = b, this.updater = r || d
> }v.prototype.isReactComponent = {}, v.prototype.setState = function (e, t) {
67c67
< }, b.prototype.forceUpdate = function (e) {
---
> }, v.prototype.forceUpdate = function (e) {
69c69
< }, m.prototype = b.prototype;const g = h.prototype = new m;g.constructor = h, n(g, b.prototype), g.isPureReactComponent = !0;const _ = {current: null}; const j = Object.prototype.hasOwnProperty; const w = {
---
> }, m.prototype = v.prototype;const g = h.prototype = new m;g.constructor = h, n(g, v.prototype), g.isPureReactComponent = !0;const _ = {current: null}; const j = Object.prototype.hasOwnProperty; const O = {
74c74
< };function O(e, t, r) {
---
> };function w(e, t, r) {
77c77
< j.call(t, n) && !w.hasOwnProperty(n) && (u[n] = t[n])
---
> j.call(t, n) && !O.hasOwnProperty(n) && (u[n] = t[n])
82,84c82,84
< for (var f = new Array(c), l = 0;c > l;l++) {
< f[l] = arguments[l + 2]
< }u.children = f
---
> for (var l = new Array(c), f = 0;c > f;f++) {
> l[f] = arguments[f + 2]
> }u.children = l
131,132c131,132
< for (var f = 0;f < e.length;f++) {
< var l = n + E(a = e[f], f);c += P(a, t, r, l, i)
---
> for (var l = 0;l < e.length;l++) {
> var f = n + E(a = e[l], l);c += P(a, t, r, f, i)
134c134
< } else if (typeof(l = function (e) {
---
> } else if (typeof(f = function (e) {
137,138c137,138
< for (e = l.call(e), f = 0;!(a = e.next()).done;) {
< c += P(a = a.value, t, r, l = n + E(a, f++), i)
---
> for (e = f.call(e), l = 0;!(a = e.next()).done;) {
> c += P(a = a.value, t, r, f = n + E(a, l++), i)
163c163
< } const A = {
---
> } const M = {
191c191
< }, t.Component = b, t.PureComponent = h, t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = A, t.cloneElement = function (e, t, r) {
---
> }, t.Component = v, t.PureComponent = h, t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = M, t.cloneElement = function (e, t, r) {
196,198c196,198
< var f = e.type.defaultProps
< } for (l in t) {
< j.call(t, l) && !w.hasOwnProperty(l) && (u[l] = void 0 === t[l] && void 0 !== f ? f[l] : t[l])
---
> var l = e.type.defaultProps
> } for (f in t) {
> j.call(t, f) && !O.hasOwnProperty(f) && (u[f] = void 0 === t[f] && void 0 !== l ? l[f] : t[f])
200c200
< } var l = arguments.length - 2;if (l === 1) {
---
> } var f = arguments.length - 2;if (f === 1) {
202,205c202,205
< } else if (l > 1) {
< f = new Array(l);for (let s = 0;l > s;s++) {
< f[s] = arguments[s + 2]
< }u.children = f
---
> } else if (f > 1) {
> l = new Array(f);for (let s = 0;f > s;s++) {
> l[s] = arguments[s + 2]
> }u.children = l
227,228c227,228
< }, t.createElement = O, t.createFactory = function (e) {
< const t = O.bind(null, e);return t.type = e, t
---
> }, t.createElement = w, t.createFactory = function (e) {
> const t = w.bind(null, e);return t.type = e, t
238c238
< $$typeof: l,
---
> $$typeof: f,
247c247
< $$typeof: f,
---
> $$typeof: l,
278c278,280
< }r.d = (e, t) => {
---
> }r.n = e => {
> const t = e && e.__esModule ? () => e.default : () => e;return r.d(t, {a: t}), t
> }, r.d = (e, t) => {
288,290c290,292
< r.r(n), r.d(n, {default: () => c});const e = require("lodash");require("prop-types");let t; const o = r(294);function u(e, r, n, o) {
< t || (t = typeof Symbol == "function" && Symbol.for && Symbol.for("react.element") || 60_103);const u = e && e.defaultProps; const i = arguments.length - 3;if (r || i === 0 || (r = {children: void 0}), i === 1) {
< r.children = o
---
> r.r(n), r.d(n, {default: () => s});const e = require("lodash"); const t = require("prop-types");let o; const u = r.n(t); const i = r(294);function a(e, t, r, n) {
> o || (o = typeof Symbol == "function" && Symbol.for && Symbol.for("react.element") || 60_103);const u = e && e.defaultProps; const i = arguments.length - 3;if (t || i === 0 || (t = {children: void 0}), i === 1) {
> t.children = n
294,297c296,299
< }r.children = a
< } if (r && u) {
< for (const f in u) {
< void 0 === r[f] && (r[f] = u[f])
---
> }t.children = a
> } if (t && u) {
> for (const l in u) {
> void 0 === t[l] && (t[l] = u[l])
300c302
< r || (r = u || {})
---
> t || (t = u || {})
302c304
< $$typeof: t,
---
> $$typeof: o,
304c306
< key: void 0 === n ? null : `${n}`,
---
> key: void 0 === r ? null : `${r}`,
306c308
< props: r,
---
> props: t,
309,310c311,312
< } function i() {
< return (i = Object.assign || function (e) {
---
> } function c() {
> return (c = Object.assign || function (e) {
317,324c319,334
< } const a = t => {
< const r = (0, e.pick)(t, ["className", "style", "alt"]);return t.lazy && (r.loading = "lazy"), (0, e.isString)(t.input) ? o.createElement("img", i({src: t.input}, r)) : (0, e.isNil)(t.input.webp) && (0, e.isString)(t.input.fallback) ? o.createElement("img", i({src: t.input.fallback}, r)) : (0, e.isString)(t.input.webp) && (0, e.isNil)(t.input.fallback) ? o.createElement("img", i({src: t.input.webp}, r)) : (0, e.isObject)(t.input.webp) && (0, e.isObject)(t.input.fallback) ? (Object.assign(r, t.input.img), r.src || (r.src = t.input.fallback.srcset), u("picture", {}, void 0, o.createElement("source", t.input.webp), o.createElement("source", t.input.fallback), o.createElement("img", r))) : void 0
< }; const c = a;let f; let l; let s;s = "react-modern-picture", (l = "displayName") in (f = a) ? Object.defineProperty(f, l, {
< value: s,
< enumerable: !0,
< configurable: !0,
< writable: !0,
< }) : f[l] = s
---
> } function l(e, t, r) {
> return t in e ? Object.defineProperty(e, t, {
> value: r,
> enumerable: !0,
> configurable: !0,
> writable: !0,
> }) : e[t] = r, e
> } const f = t => {
> const r = (0, e.pick)(t, ["className", "style", "alt"]);return t.lazy && (r.loading = "lazy"), (0, e.isString)(t.input) ? i.createElement("img", c({src: t.input}, r)) : (0, e.isNil)(t.input.webp) && (0, e.isString)(t.input.fallback) ? i.createElement("img", c({src: t.input.fallback}, r)) : (0, e.isString)(t.input.webp) && (0, e.isNil)(t.input.fallback) ? i.createElement("img", c({src: t.input.webp}, r)) : (0, e.isObject)(t.input.webp) && (0, e.isObject)(t.input.fallback) ? (Object.assign(r, t.input.img), r.src || (r.src = t.input.fallback.srcset), a("picture", {}, void 0, i.createElement("source", t.input.webp), i.createElement("source", t.input.fallback), i.createElement("img", r))) : void 0
> }; const s = f;l(f, "displayName", "react-modern-picture"), l(f, "propTypes", {
> className: u().oneOfType([u().string, u().object, u().arrayOf(u().string), u().arrayOf(u().object)]),
> input: u().any.isRequired,
> style: u().object,
> alt: u().string,
> lazy: u().bool,
> })
34,35c34,35
< for (var i, a, c = o(e), f = 1;arguments.length > f;f++) {
< for (const l in i = new Object(arguments[f])) {
---
> for (var i, a, c = o(e), s = 1;arguments.length > s;s++) {
> for (const l in i = new Object(arguments[s])) {
38,39c38,39
< a = t(i);for (let s = 0;s < a.length;s++) {
< n.call(i, a[s]) && (c[a[s]] = i[a[s]])
---
> a = t(i);for (let f = 0;f < a.length;f++) {
> n.call(i, a[f]) && (c[a[f]] = i[a[f]])
46,47c46,47
< const n = r(418); let o = 60_103; let u = 60_106;t.Fragment = 60_107, t.StrictMode = 60_108, t.Profiler = 60_114;let i = 60_109; let a = 60_110; let c = 60_112;t.Suspense = 60_113;let f = 60_115; let l = 60_116;if (typeof Symbol == "function" && Symbol.for) {
< const s = Symbol.for;o = s("react.element"), u = s("react.portal"), t.Fragment = s("react.fragment"), t.StrictMode = s("react.strict_mode"), t.Profiler = s("react.profiler"), i = s("react.provider"), a = s("react.context"), c = s("react.forward_ref"), t.Suspense = s("react.suspense"), f = s("react.memo"), l = s("react.lazy")
---
> const n = r(418); let o = 60_103; let u = 60_106;t.Fragment = 60_107, t.StrictMode = 60_108, t.Profiler = 60_114;let i = 60_109; let a = 60_110; let c = 60_112;t.Suspense = 60_113;let s = 60_115; let l = 60_116;if (typeof Symbol == "function" && Symbol.for) {
> const f = Symbol.for;o = f("react.element"), u = f("react.portal"), t.Fragment = f("react.fragment"), t.StrictMode = f("react.strict_mode"), t.Profiler = f("react.profiler"), i = f("react.provider"), a = f("react.context"), c = f("react.forward_ref"), t.Suspense = f("react.suspense"), s = f("react.memo"), l = f("react.lazy")
59,62c59,62
< }; const v = {};function b(e, t, r) {
< this.props = e, this.context = t, this.refs = v, this.updater = r || d
< } function m() {} function h(e, t, r) {
< this.props = e, this.context = t, this.refs = v, this.updater = r || d
---
> }; const h = {};function b(e, t, r) {
> this.props = e, this.context = t, this.refs = h, this.updater = r || d
> } function v() {} function m(e, t, r) {
> this.props = e, this.context = t, this.refs = h, this.updater = r || d
69c69
< }, m.prototype = b.prototype;const g = h.prototype = new m;g.constructor = h, n(g, b.prototype), g.isPureReactComponent = !0;const _ = {current: null}; const j = Object.prototype.hasOwnProperty; const w = {
---
> }, v.prototype = b.prototype;const g = m.prototype = new v;g.constructor = m, n(g, b.prototype), g.isPureReactComponent = !0;const _ = {current: null}; const j = Object.prototype.hasOwnProperty; const O = {
74c74
< };function O(e, t, r) {
---
> };function w(e, t, r) {
77c77
< j.call(t, n) && !w.hasOwnProperty(n) && (u[n] = t[n])
---
> j.call(t, n) && !O.hasOwnProperty(n) && (u[n] = t[n])
82,84c82,84
< for (var f = new Array(c), l = 0;c > l;l++) {
< f[l] = arguments[l + 2]
< }u.children = f
---
> for (var s = new Array(c), l = 0;c > l;l++) {
> s[l] = arguments[l + 2]
> }u.children = s
131,132c131,132
< for (var f = 0;f < e.length;f++) {
< var l = n + E(a = e[f], f);c += P(a, t, r, l, i)
---
> for (var s = 0;s < e.length;s++) {
> var l = n + E(a = e[s], s);c += P(a, t, r, l, i)
137,138c137,138
< for (e = l.call(e), f = 0;!(a = e.next()).done;) {
< c += P(a = a.value, t, r, l = n + E(a, f++), i)
---
> for (e = l.call(e), s = 0;!(a = e.next()).done;) {
> c += P(a = a.value, t, r, l = n + E(a, s++), i)
143c143
< } function $(e, t, r) {
---
> } function C(e, t, r) {
149c149
< } function C(e) {
---
> } function $(e) {
163c163
< } const A = {
---
> } const M = {
170c170
< map: $,
---
> map: C,
172c172
< $(e, function () {
---
> C(e, function () {
177c177
< let t = 0;return $(e, function () {
---
> let t = 0;return C(e, function () {
182c182
< return $(e, function (e) {
---
> return C(e, function (e) {
191c191
< }, t.Component = b, t.PureComponent = h, t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = A, t.cloneElement = function (e, t, r) {
---
> }, t.Component = b, t.PureComponent = m, t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = M, t.cloneElement = function (e, t, r) {
196c196
< var f = e.type.defaultProps
---
> var s = e.type.defaultProps
198c198
< j.call(t, l) && !w.hasOwnProperty(l) && (u[l] = void 0 === t[l] && void 0 !== f ? f[l] : t[l])
---
> j.call(t, l) && !O.hasOwnProperty(l) && (u[l] = void 0 === t[l] && void 0 !== s ? s[l] : t[l])
203,205c203,205
< f = new Array(l);for (let s = 0;l > s;s++) {
< f[s] = arguments[s + 2]
< }u.children = f
---
> s = new Array(l);for (let f = 0;l > f;f++) {
> s[f] = arguments[f + 2]
> }u.children = s
227,228c227,228
< }, t.createElement = O, t.createFactory = function (e) {
< const t = O.bind(null, e);return t.type = e, t
---
> }, t.createElement = w, t.createFactory = function (e) {
> const t = w.bind(null, e);return t.type = e, t
243c243
< _init: C,
---
> _init: $,
247c247
< $$typeof: f,
---
> $$typeof: s,
278c278,280
< }r.d = (e, t) => {
---
> }r.n = e => {
> const t = e && e.__esModule ? () => e.default : () => e;return r.d(t, {a: t}), t
> }, r.d = (e, t) => {
288,309c290
< r.r(n), r.d(n, {default: () => c});const e = require("lodash");require("prop-types");let t; const o = r(294);function u(e, r, n, o) {
< t || (t = typeof Symbol == "function" && Symbol.for && Symbol.for("react.element") || 60_103);const u = e && e.defaultProps; const i = arguments.length - 3;if (r || i === 0 || (r = {children: void 0}), i === 1) {
< r.children = o
< } else if (i > 1) {
< for (var a = new Array(i), c = 0;i > c;c++) {
< a[c] = arguments[c + 3]
< }r.children = a
< } if (r && u) {
< for (const f in u) {
< void 0 === r[f] && (r[f] = u[f])
< }
< } else {
< r || (r = u || {})
< } return {
< $$typeof: t,
< type: e,
< key: void 0 === n ? null : `${n}`,
< ref: null,
< props: r,
< _owner: null,
< }
< } function i() {
---
> r.r(n), r.d(n, {default: () => c});const e = require("lodash"); const t = require("prop-types");const o = r.n(t); const u = r(294);function i() {
317,324c298,315
< } const a = t => {
< const r = (0, e.pick)(t, ["className", "style", "alt"]);return t.lazy && (r.loading = "lazy"), (0, e.isString)(t.input) ? o.createElement("img", i({src: t.input}, r)) : (0, e.isNil)(t.input.webp) && (0, e.isString)(t.input.fallback) ? o.createElement("img", i({src: t.input.fallback}, r)) : (0, e.isString)(t.input.webp) && (0, e.isNil)(t.input.fallback) ? o.createElement("img", i({src: t.input.webp}, r)) : (0, e.isObject)(t.input.webp) && (0, e.isObject)(t.input.fallback) ? (Object.assign(r, t.input.img), r.src || (r.src = t.input.fallback.srcset), u("picture", {}, void 0, o.createElement("source", t.input.webp), o.createElement("source", t.input.fallback), o.createElement("img", r))) : void 0
< }; const c = a;let f; let l; let s;s = "react-modern-picture", (l = "displayName") in (f = a) ? Object.defineProperty(f, l, {
< value: s,
< enumerable: !0,
< configurable: !0,
< writable: !0,
< }) : f[l] = s
---
> } function a(e, t, r) {
> return t in e ? Object.defineProperty(e, t, {
> value: r,
> enumerable: !0,
> configurable: !0,
> writable: !0,
> }) : e[t] = r, e
> } class c extends u.Component {
> render() {
> const t = (0, e.pick)(this.props, ["className", "style", "alt"]);return this.props.lazy && (t.loading = "lazy"), (0, e.isString)(this.props.input) ? u.createElement("img", i({src: this.props.input}, t)) : (0, e.isNil)(this.props.input.webp) && (0, e.isString)(this.props.input.fallback) ? u.createElement("img", i({src: this.props.input.fallback}, t)) : (0, e.isString)(this.props.input.webp) && (0, e.isNil)(this.props.input.fallback) ? u.createElement("img", i({src: this.props.input.webp}, t)) : (0, e.isObject)(this.props.input.webp) && (0, e.isObject)(this.props.input.fallback) ? (Object.assign(t, this.props.input.img), t.src || (t.src = this.props.input.fallback.srcset), u.createElement("picture", null, u.createElement("source", this.props.input.webp), u.createElement("source", this.props.input.fallback), u.createElement("img", t))) : void 0
> }
> }a(c, "displayName", "react-modern-picture"), a(c, "propTypes", {
> className: o().oneOfType([o().string, o().object, o().arrayOf(o().string), o().arrayOf(o().object)]),
> input: o().any.isRequired,
> style: o().object,
> alt: o().string,
> lazy: o().bool,
> })
/* !
*** react-modern-picture 1.2.0
*** Copyright © 2021, Jaid <jaid.jsx@gmail.com> (https://github.com/Jaid)
*** @license MIT
*** See https://github.com/Jaid/react-modern-picture
!*/
let e; let t;e = this, t = function () {
return (() => {
const e = {
418: e => {
const t = Object.getOwnPropertySymbols; const r = Object.prototype.hasOwnProperty; const n = Object.prototype.propertyIsEnumerable;function o(e) {
if (e == null) {
throw new TypeError("Object.assign cannot be called with null or undefined")
} return new Object(e)
}e.exports = function () {
try {
if (!Object.assign) {
return !1
} const e = new String("abc");if (e[5] = "de", Object.getOwnPropertyNames(e)[0] === "5") {
return !1
} for (var t = {}, r = 0;r < 10;r++) {
t[`_${String.fromCharCode(r)}`] = r
} if (Object.getOwnPropertyNames(t).map(function (e) {
return t[e]
}).join("") !== "0123456789") {
return !1
} const n = {};return "abcdefghijklmnopqrst".split("").forEach(function (e) {
n[e] = e
}), Object.keys(Object.assign({}, n)).join("") === "abcdefghijklmnopqrst"
} catch (error) {
return !1
}
}() ? Object.assign : function (e, u) {
for (var i, a, c = o(e), l = 1;arguments.length > l;l++) {
for (const f in i = new Object(arguments[l])) {
r.call(i, f) && (c[f] = i[f])
} if (t) {
a = t(i);for (let s = 0;s < a.length;s++) {
n.call(i, a[s]) && (c[a[s]] = i[a[s]])
}
}
} return c
}
},
408: (e, t, r) => {
const n = r(418); let o = 60_103; let u = 60_106;t.Fragment = 60_107, t.StrictMode = 60_108, t.Profiler = 60_114;let i = 60_109; let a = 60_110; let c = 60_112;t.Suspense = 60_113;let l = 60_115; let f = 60_116;if (typeof Symbol == "function" && Symbol.for) {
const s = Symbol.for;o = s("react.element"), u = s("react.portal"), t.Fragment = s("react.fragment"), t.StrictMode = s("react.strict_mode"), t.Profiler = s("react.profiler"), i = s("react.provider"), a = s("react.context"), c = s("react.forward_ref"), t.Suspense = s("react.suspense"), l = s("react.memo"), f = s("react.lazy")
} const p = typeof Symbol == "function" && Symbol.iterator;function y(e) {
for (var t = `https://reactjs.org/docs/error-decoder.html?invariant=${e}`, r = 1;arguments.length > r;r++) {
t += `&args[]=${encodeURIComponent(arguments[r])}`
} return `Minified React error #${e}; visit ${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`
} const d = {
isMounted() {
return !1
},
enqueueForceUpdate() {},
enqueueReplaceState() {},
enqueueSetState() {},
}; const b = {};function v(e, t, r) {
this.props = e, this.context = t, this.refs = b, this.updater = r || d
} function m() {} function h(e, t, r) {
this.props = e, this.context = t, this.refs = b, this.updater = r || d
}v.prototype.isReactComponent = {}, v.prototype.setState = function (e, t) {
if (typeof e != "object" && typeof e != "function" && e != null) {
throw new Error(y(85))
} this.updater.enqueueSetState(this, e, t, "setState")
}, v.prototype.forceUpdate = function (e) {
this.updater.enqueueForceUpdate(this, e, "forceUpdate")
}, m.prototype = v.prototype;const g = h.prototype = new m;g.constructor = h, n(g, v.prototype), g.isPureReactComponent = !0;const _ = {current: null}; const j = Object.prototype.hasOwnProperty; const O = {
key: !0,
ref: !0,
__self: !0,
__source: !0,
};function w(e, t, r) {
let n; const u = {}; let i = null; let a = null;if (t != null) {
for (n in void 0 !== t.ref && (a = t.ref), void 0 !== t.key && (i = `${t.key}`), t) {
j.call(t, n) && !O.hasOwnProperty(n) && (u[n] = t[n])
}
}let c = arguments.length - 2;if (c === 1) {
u.children = r
} else if (c > 1) {
for (var l = new Array(c), f = 0;c > f;f++) {
l[f] = arguments[f + 2]
}u.children = l
} if (e && e.defaultProps) {
for (n in c = e.defaultProps) {
void 0 === u[n] && (u[n] = c[n])
}
} return {
$$typeof: o,
type: e,
key: i,
ref: a,
props: u,
_owner: _.current,
}
} function S(e) {
return typeof e == "object" && e !== null && e.$$typeof === o
} const k = /\/+/g;function E(e, t) {
return typeof e == "object" && e !== null && e.key != null ? function (e) {
const t = {
"=": "=0",
":": "=2",
};return `$${e.replace(/[:=]/g, function (e) {
return t[e]
})}`
}(`${e.key}`) : t.toString(36)
} function P(e, t, r, n, i) {
let a = typeof e;a !== "undefined" && a !== "boolean" || (e = null);let c = !1;if (e === null) {
c = !0
} else {
switch (a) {
case "string": case "number": c = !0;break;case "object": switch (e.$$typeof) {
case o: case u: c = !0
}
}
} if (c) {
return i = i(c = e), e = n === "" ? `.${E(c, 0)}` : n, Array.isArray(i) ? (r = "", e != null && (r = `${e.replace(k, "$&/")}/`), P(i, t, r, "", function (e) {
return e
})) : i != null && (S(i) && (i = function (e, t) {
return {
$$typeof: o,
type: e.type,
key: t,
ref: e.ref,
props: e.props,
_owner: e._owner,
}
}(i, r + (!i.key || c && c.key === i.key ? "" : `${`${i.key}`.replace(k, "$&/")}/`) + e)), t.push(i)), 1
} if (c = 0, n = n === "" ? "." : `${n}:`, Array.isArray(e)) {
for (var l = 0;l < e.length;l++) {
var f = n + E(a = e[l], l);c += P(a, t, r, f, i)
}
} else if (typeof(f = function (e) {
return e === null || typeof e != "object" ? null : typeof(e = p && e[p] || e["@@iterator"]) == "function" ? e : null
}(e)) == "function") {
for (e = f.call(e), l = 0;!(a = e.next()).done;) {
c += P(a = a.value, t, r, f = n + E(a, l++), i)
}
} else if (a === "object") {
throw t = `${e}`, new Error(y(31, t === "[object Object]" ? `object with keys {${Object.keys(e).join(", ")}}` : t))
} return c
} function $(e, t, r) {
if (e == null) {
return e
} const n = []; let o = 0;return P(e, n, "", "", function (e) {
return t.call(r, e, o++)
}), n
} function C(e) {
if (e._status === -1) {
let t = e._result;t = t(), e._status = 0, e._result = t, t.then(function (t) {
e._status === 0 && (t = t.default, e._status = 1, e._result = t)
}, function (error) {
e._status === 0 && (e._status = 2, e._result = error)
})
} if (e._status === 1) {
return e._result
} throw e._result
} const R = {current: null};function x() {
const e = R.current;if (e === null) {
throw new Error(y(321))
} return e
} const M = {
ReactCurrentDispatcher: R,
ReactCurrentBatchConfig: {transition: 0},
ReactCurrentOwner: _,
IsSomeRendererActing: {current: !1},
assign: n,
};t.Children = {
map: $,
forEach(e, t, r) {
$(e, function () {
t.apply(this, arguments)
}, r)
},
count(e) {
let t = 0;return $(e, function () {
t++
}), t
},
toArray(e) {
return $(e, function (e) {
return e
}) || []
},
only(e) {
if (!S(e)) {
throw new Error(y(143))
} return e
},
}, t.Component = v, t.PureComponent = h, t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = M, t.cloneElement = function (e, t, r) {
if (e == null) {
throw new Error(y(267, e))
} const u = n({}, e.props); let i = e.key; let a = e.ref; let c = e._owner;if (t != null) {
if (void 0 !== t.ref && (a = t.ref, c = _.current), void 0 !== t.key && (i = `${t.key}`), e.type && e.type.defaultProps) {
var l = e.type.defaultProps
} for (f in t) {
j.call(t, f) && !O.hasOwnProperty(f) && (u[f] = void 0 === t[f] && void 0 !== l ? l[f] : t[f])
}
} var f = arguments.length - 2;if (f === 1) {
u.children = r
} else if (f > 1) {
l = new Array(f);for (let s = 0;f > s;s++) {
l[s] = arguments[s + 2]
}u.children = l
} return {
$$typeof: o,
type: e.type,
key: i,
ref: a,
props: u,
_owner: c,
}
}, t.createContext = function (e, t) {
return void 0 === t && (t = null), (e = {
$$typeof: a,
_calculateChangedBits: t,
_currentValue: e,
_currentValue2: e,
_threadCount: 0,
Provider: null,
Consumer: null,
}).Provider = {
$$typeof: i,
_context: e,
}, e.Consumer = e
}, t.createElement = w, t.createFactory = function (e) {
const t = w.bind(null, e);return t.type = e, t
}, t.createRef = function () {
return {current: null}
}, t.forwardRef = function (e) {
return {
$$typeof: c,
render: e,
}
}, t.isValidElement = S, t.lazy = function (e) {
return {
$$typeof: f,
_payload: {
_status: -1,
_result: e,
},
_init: C,
}
}, t.memo = function (e, t) {
return {
$$typeof: l,
type: e,
compare: void 0 === t ? null : t,
}
}, t.useCallback = function (e, t) {
return x().useCallback(e, t)
}, t.useContext = function (e, t) {
return x().useContext(e, t)
}, t.useDebugValue = function () {}, t.useEffect = function (e, t) {
return x().useEffect(e, t)
}, t.useImperativeHandle = function (e, t, r) {
return x().useImperativeHandle(e, t, r)
}, t.useLayoutEffect = function (e, t) {
return x().useLayoutEffect(e, t)
}, t.useMemo = function (e, t) {
return x().useMemo(e, t)
}, t.useReducer = function (e, t, r) {
return x().useReducer(e, t, r)
}, t.useRef = function (e) {
return x().useRef(e)
}, t.useState = function (e) {
return x().useState(e)
}, t.version = "17.0.2"
},
294: (e, t, r) => {
e.exports = r(408)
},
}; const t = {};function r(n) {
const o = t[n];if (void 0 !== o) {
return o.exports
} const u = t[n] = {exports: {}};return e[n](u, u.exports, r), u.exports
}r.n = e => {
const t = e && e.__esModule ? () => e.default : () => e;return r.d(t, {a: t}), t
}, r.d = (e, t) => {
for (const n in t) {
r.o(t, n) && !r.o(e, n) && Object.defineProperty(e, n, {
enumerable: !0,
get: t[n],
})
}
}, r.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t), r.r = e => {
typeof Symbol != "undefined" && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {value: "Module"}), Object.defineProperty(e, "__esModule", {value: !0})
};const n = {};return (() => {
r.r(n), r.d(n, {default: () => s});const e = require("lodash"); const t = require("prop-types");let o; const u = r.n(t); const i = r(294);function a(e, t, r, n) {
o || (o = typeof Symbol == "function" && Symbol.for && Symbol.for("react.element") || 60_103);const u = e && e.defaultProps; const i = arguments.length - 3;if (t || i === 0 || (t = {children: void 0}), i === 1) {
t.children = n
} else if (i > 1) {
for (var a = new Array(i), c = 0;i > c;c++) {
a[c] = arguments[c + 3]
}t.children = a
} if (t && u) {
for (const l in u) {
void 0 === t[l] && (t[l] = u[l])
}
} else {
t || (t = u || {})
} return {
$$typeof: o,
type: e,
key: void 0 === r ? null : `${r}`,
ref: null,
props: t,
_owner: null,
}
} function c() {
return (c = Object.assign || function (e) {
for (let t = 1;arguments.length > t;t++) {
const r = arguments[t];for (const n in r) {
Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n])
}
} return e
}).apply(this, arguments)
} function l(e, t, r) {
return t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0,
}) : e[t] = r, e
} const f = t => {
const r = (0, e.pick)(t, ["className", "style", "alt"]);return t.lazy && (r.loading = "lazy"), (0, e.isString)(t.input) ? i.createElement("img", c({src: t.input}, r)) : (0, e.isNil)(t.input.webp) && (0, e.isString)(t.input.fallback) ? i.createElement("img", c({src: t.input.fallback}, r)) : (0, e.isString)(t.input.webp) && (0, e.isNil)(t.input.fallback) ? i.createElement("img", c({src: t.input.webp}, r)) : (0, e.isObject)(t.input.webp) && (0, e.isObject)(t.input.fallback) ? (Object.assign(r, t.input.img), r.src || (r.src = t.input.fallback.srcset), a("picture", {}, void 0, i.createElement("source", t.input.webp), i.createElement("source", t.input.fallback), i.createElement("img", r))) : void 0
}; const s = f;l(f, "displayName", "react-modern-picture"), l(f, "propTypes", {
className: u().oneOfType([u().string, u().object, u().arrayOf(u().string), u().arrayOf(u().object)]),
input: u().any.isRequired,
style: u().object,
alt: u().string,
lazy: u().bool,
})
})(), n
})()
}, typeof exports == "object" && typeof module == "object" ? module.exports = t() : typeof define == "function" && define.amd ? define([], t) : typeof exports == "object" ? exports.ReactModernPicture = t() : e.ReactModernPicture = t()
34,36c34,36
< for (var i, a, c = o(e), l = 1;arguments.length > l;l++) {
< for (const f in i = new Object(arguments[l])) {
< r.call(i, f) && (c[f] = i[f])
---
> for (var i, a, c = o(e), s = 1;arguments.length > s;s++) {
> for (const l in i = new Object(arguments[s])) {
> r.call(i, l) && (c[l] = i[l])
38,39c38,39
< a = t(i);for (let s = 0;s < a.length;s++) {
< n.call(i, a[s]) && (c[a[s]] = i[a[s]])
---
> a = t(i);for (let f = 0;f < a.length;f++) {
> n.call(i, a[f]) && (c[a[f]] = i[a[f]])
46,47c46,47
< const n = r(418); let o = 60_103; let u = 60_106;t.Fragment = 60_107, t.StrictMode = 60_108, t.Profiler = 60_114;let i = 60_109; let a = 60_110; let c = 60_112;t.Suspense = 60_113;let l = 60_115; let f = 60_116;if (typeof Symbol == "function" && Symbol.for) {
< const s = Symbol.for;o = s("react.element"), u = s("react.portal"), t.Fragment = s("react.fragment"), t.StrictMode = s("react.strict_mode"), t.Profiler = s("react.profiler"), i = s("react.provider"), a = s("react.context"), c = s("react.forward_ref"), t.Suspense = s("react.suspense"), l = s("react.memo"), f = s("react.lazy")
---
> const n = r(418); let o = 60_103; let u = 60_106;t.Fragment = 60_107, t.StrictMode = 60_108, t.Profiler = 60_114;let i = 60_109; let a = 60_110; let c = 60_112;t.Suspense = 60_113;let s = 60_115; let l = 60_116;if (typeof Symbol == "function" && Symbol.for) {
> const f = Symbol.for;o = f("react.element"), u = f("react.portal"), t.Fragment = f("react.fragment"), t.StrictMode = f("react.strict_mode"), t.Profiler = f("react.profiler"), i = f("react.provider"), a = f("react.context"), c = f("react.forward_ref"), t.Suspense = f("react.suspense"), s = f("react.memo"), l = f("react.lazy")
59,63c59,63
< }; const b = {};function v(e, t, r) {
< this.props = e, this.context = t, this.refs = b, this.updater = r || d
< } function m() {} function h(e, t, r) {
< this.props = e, this.context = t, this.refs = b, this.updater = r || d
< }v.prototype.isReactComponent = {}, v.prototype.setState = function (e, t) {
---
> }; const h = {};function b(e, t, r) {
> this.props = e, this.context = t, this.refs = h, this.updater = r || d
> } function v() {} function m(e, t, r) {
> this.props = e, this.context = t, this.refs = h, this.updater = r || d
> }b.prototype.isReactComponent = {}, b.prototype.setState = function (e, t) {
67c67
< }, v.prototype.forceUpdate = function (e) {
---
> }, b.prototype.forceUpdate = function (e) {
69c69
< }, m.prototype = v.prototype;const g = h.prototype = new m;g.constructor = h, n(g, v.prototype), g.isPureReactComponent = !0;const _ = {current: null}; const j = Object.prototype.hasOwnProperty; const O = {
---
> }, v.prototype = b.prototype;const g = m.prototype = new v;g.constructor = m, n(g, b.prototype), g.isPureReactComponent = !0;const _ = {current: null}; const j = Object.prototype.hasOwnProperty; const O = {
82,84c82,84
< for (var l = new Array(c), f = 0;c > f;f++) {
< l[f] = arguments[f + 2]
< }u.children = l
---
> for (var s = new Array(c), l = 0;c > l;l++) {
> s[l] = arguments[l + 2]
> }u.children = s
131,132c131,132
< for (var l = 0;l < e.length;l++) {
< var f = n + E(a = e[l], l);c += P(a, t, r, f, i)
---
> for (var s = 0;s < e.length;s++) {
> var l = n + E(a = e[s], s);c += P(a, t, r, l, i)
134c134
< } else if (typeof(f = function (e) {
---
> } else if (typeof(l = function (e) {
137,138c137,138
< for (e = f.call(e), l = 0;!(a = e.next()).done;) {
< c += P(a = a.value, t, r, f = n + E(a, l++), i)
---
> for (e = l.call(e), s = 0;!(a = e.next()).done;) {
> c += P(a = a.value, t, r, l = n + E(a, s++), i)
143c143
< } function $(e, t, r) {
---
> } function C(e, t, r) {
149c149
< } function C(e) {
---
> } function $(e) {
170c170
< map: $,
---
> map: C,
172c172
< $(e, function () {
---
> C(e, function () {
177c177
< let t = 0;return $(e, function () {
---
> let t = 0;return C(e, function () {
182c182
< return $(e, function (e) {
---
> return C(e, function (e) {
191c191
< }, t.Component = v, t.PureComponent = h, t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = M, t.cloneElement = function (e, t, r) {
---
> }, t.Component = b, t.PureComponent = m, t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = M, t.cloneElement = function (e, t, r) {
196,198c196,198
< var l = e.type.defaultProps
< } for (f in t) {
< j.call(t, f) && !O.hasOwnProperty(f) && (u[f] = void 0 === t[f] && void 0 !== l ? l[f] : t[f])
---
> var s = e.type.defaultProps
> } for (l in t) {
> j.call(t, l) && !O.hasOwnProperty(l) && (u[l] = void 0 === t[l] && void 0 !== s ? s[l] : t[l])
200c200
< } var f = arguments.length - 2;if (f === 1) {
---
> } var l = arguments.length - 2;if (l === 1) {
202,205c202,205
< } else if (f > 1) {
< l = new Array(f);for (let s = 0;f > s;s++) {
< l[s] = arguments[s + 2]
< }u.children = l
---
> } else if (l > 1) {
> s = new Array(l);for (let f = 0;l > f;f++) {
> s[f] = arguments[f + 2]
> }u.children = s
238c238
< $$typeof: f,
---
> $$typeof: l,
243c243
< _init: C,
---
> _init: $,
247c247
< $$typeof: l,
---
> $$typeof: s,
290,312c290,291
< r.r(n), r.d(n, {default: () => s});const e = require("lodash"); const t = require("prop-types");let o; const u = r.n(t); const i = r(294);function a(e, t, r, n) {
< o || (o = typeof Symbol == "function" && Symbol.for && Symbol.for("react.element") || 60_103);const u = e && e.defaultProps; const i = arguments.length - 3;if (t || i === 0 || (t = {children: void 0}), i === 1) {
< t.children = n
< } else if (i > 1) {
< for (var a = new Array(i), c = 0;i > c;c++) {
< a[c] = arguments[c + 3]
< }t.children = a
< } if (t && u) {
< for (const l in u) {
< void 0 === t[l] && (t[l] = u[l])
< }
< } else {
< t || (t = u || {})
< } return {
< $$typeof: o,
< type: e,
< key: void 0 === r ? null : `${r}`,
< ref: null,
< props: t,
< _owner: null,
< }
< } function c() {
< return (c = Object.assign || function (e) {
---
> r.r(n), r.d(n, {default: () => c});const e = require("lodash"); const t = require("prop-types");const o = r.n(t); const u = r(294);function i() {
> return (i = Object.assign || function (e) {
319c298
< } function l(e, t, r) {
---
> } function a(e, t, r) {
326,333c305,314
< } const f = t => {
< const r = (0, e.pick)(t, ["className", "style", "alt"]);return t.lazy && (r.loading = "lazy"), (0, e.isString)(t.input) ? i.createElement("img", c({src: t.input}, r)) : (0, e.isNil)(t.input.webp) && (0, e.isString)(t.input.fallback) ? i.createElement("img", c({src: t.input.fallback}, r)) : (0, e.isString)(t.input.webp) && (0, e.isNil)(t.input.fallback) ? i.createElement("img", c({src: t.input.webp}, r)) : (0, e.isObject)(t.input.webp) && (0, e.isObject)(t.input.fallback) ? (Object.assign(r, t.input.img), r.src || (r.src = t.input.fallback.srcset), a("picture", {}, void 0, i.createElement("source", t.input.webp), i.createElement("source", t.input.fallback), i.createElement("img", r))) : void 0
< }; const s = f;l(f, "displayName", "react-modern-picture"), l(f, "propTypes", {
< className: u().oneOfType([u().string, u().object, u().arrayOf(u().string), u().arrayOf(u().object)]),
< input: u().any.isRequired,
< style: u().object,
< alt: u().string,
< lazy: u().bool,
---
> } class c extends u.Component {
> render() {
> const t = (0, e.pick)(this.props, ["className", "style", "alt"]);return this.props.lazy && (t.loading = "lazy"), (0, e.isString)(this.props.input) ? u.createElement("img", i({src: this.props.input}, t)) : (0, e.isNil)(this.props.input.webp) && (0, e.isString)(this.props.input.fallback) ? u.createElement("img", i({src: this.props.input.fallback}, t)) : (0, e.isString)(this.props.input.webp) && (0, e.isNil)(this.props.input.fallback) ? u.createElement("img", i({src: this.props.input.webp}, t)) : (0, e.isObject)(this.props.input.webp) && (0, e.isObject)(this.props.input.fallback) ? (Object.assign(t, this.props.input.img), t.src || (t.src = this.props.input.fallback.srcset), u.createElement("picture", null, u.createElement("source", this.props.input.webp), u.createElement("source", this.props.input.fallback), u.createElement("img", t))) : void 0
> }
> }a(c, "displayName", "react-modern-picture"), a(c, "propTypes", {
> className: o().oneOfType([o().string, o().object, o().arrayOf(o().string), o().arrayOf(o().object)]),
> input: o().any.isRequired,
> style: o().object,
> alt: o().string,
> lazy: o().bool,
/* !
*** react-modern-picture 1.2.0
*** Copyright © 2021, Jaid <jaid.jsx@gmail.com> (https://github.com/Jaid)
*** @license MIT
*** See https://github.com/Jaid/react-modern-picture
!*/
let e; let t;e = this, t = function () {
return (() => {
const e = {
418: e => {
const t = Object.getOwnPropertySymbols; const r = Object.prototype.hasOwnProperty; const n = Object.prototype.propertyIsEnumerable;function o(e) {
if (e == null) {
throw new TypeError("Object.assign cannot be called with null or undefined")
} return new Object(e)
}e.exports = function () {
try {
if (!Object.assign) {
return !1
} const e = new String("abc");if (e[5] = "de", Object.getOwnPropertyNames(e)[0] === "5") {
return !1
} for (var t = {}, r = 0;r < 10;r++) {
t[`_${String.fromCharCode(r)}`] = r
} if (Object.getOwnPropertyNames(t).map(function (e) {
return t[e]
}).join("") !== "0123456789") {
return !1
} const n = {};return "abcdefghijklmnopqrst".split("").forEach(function (e) {
n[e] = e
}), Object.keys(Object.assign({}, n)).join("") === "abcdefghijklmnopqrst"
} catch (error) {
return !1
}
}() ? Object.assign : function (e, u) {
for (var i, a, c = o(e), s = 1;arguments.length > s;s++) {
for (const l in i = new Object(arguments[s])) {
r.call(i, l) && (c[l] = i[l])
} if (t) {
a = t(i);for (let f = 0;f < a.length;f++) {
n.call(i, a[f]) && (c[a[f]] = i[a[f]])
}
}
} return c
}
},
408: (e, t, r) => {
const n = r(418); let o = 60_103; let u = 60_106;t.Fragment = 60_107, t.StrictMode = 60_108, t.Profiler = 60_114;let i = 60_109; let a = 60_110; let c = 60_112;t.Suspense = 60_113;let s = 60_115; let l = 60_116;if (typeof Symbol == "function" && Symbol.for) {
const f = Symbol.for;o = f("react.element"), u = f("react.portal"), t.Fragment = f("react.fragment"), t.StrictMode = f("react.strict_mode"), t.Profiler = f("react.profiler"), i = f("react.provider"), a = f("react.context"), c = f("react.forward_ref"), t.Suspense = f("react.suspense"), s = f("react.memo"), l = f("react.lazy")
} const p = typeof Symbol == "function" && Symbol.iterator;function y(e) {
for (var t = `https://reactjs.org/docs/error-decoder.html?invariant=${e}`, r = 1;arguments.length > r;r++) {
t += `&args[]=${encodeURIComponent(arguments[r])}`
} return `Minified React error #${e}; visit ${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`
} const d = {
isMounted() {
return !1
},
enqueueForceUpdate() {},
enqueueReplaceState() {},
enqueueSetState() {},
}; const h = {};function b(e, t, r) {
this.props = e, this.context = t, this.refs = h, this.updater = r || d
} function v() {} function m(e, t, r) {
this.props = e, this.context = t, this.refs = h, this.updater = r || d
}b.prototype.isReactComponent = {}, b.prototype.setState = function (e, t) {
if (typeof e != "object" && typeof e != "function" && e != null) {
throw new Error(y(85))
} this.updater.enqueueSetState(this, e, t, "setState")
}, b.prototype.forceUpdate = function (e) {
this.updater.enqueueForceUpdate(this, e, "forceUpdate")
}, v.prototype = b.prototype;const g = m.prototype = new v;g.constructor = m, n(g, b.prototype), g.isPureReactComponent = !0;const _ = {current: null}; const j = Object.prototype.hasOwnProperty; const O = {
key: !0,
ref: !0,
__self: !0,
__source: !0,
};function w(e, t, r) {
let n; const u = {}; let i = null; let a = null;if (t != null) {
for (n in void 0 !== t.ref && (a = t.ref), void 0 !== t.key && (i = `${t.key}`), t) {
j.call(t, n) && !O.hasOwnProperty(n) && (u[n] = t[n])
}
}let c = arguments.length - 2;if (c === 1) {
u.children = r
} else if (c > 1) {
for (var s = new Array(c), l = 0;c > l;l++) {
s[l] = arguments[l + 2]
}u.children = s
} if (e && e.defaultProps) {
for (n in c = e.defaultProps) {
void 0 === u[n] && (u[n] = c[n])
}
} return {
$$typeof: o,
type: e,
key: i,
ref: a,
props: u,
_owner: _.current,
}
} function S(e) {
return typeof e == "object" && e !== null && e.$$typeof === o
} const k = /\/+/g;function E(e, t) {
return typeof e == "object" && e !== null && e.key != null ? function (e) {
const t = {
"=": "=0",
":": "=2",
};return `$${e.replace(/[:=]/g, function (e) {
return t[e]
})}`
}(`${e.key}`) : t.toString(36)
} function P(e, t, r, n, i) {
let a = typeof e;a !== "undefined" && a !== "boolean" || (e = null);let c = !1;if (e === null) {
c = !0
} else {
switch (a) {
case "string": case "number": c = !0;break;case "object": switch (e.$$typeof) {
case o: case u: c = !0
}
}
} if (c) {
return i = i(c = e), e = n === "" ? `.${E(c, 0)}` : n, Array.isArray(i) ? (r = "", e != null && (r = `${e.replace(k, "$&/")}/`), P(i, t, r, "", function (e) {
return e
})) : i != null && (S(i) && (i = function (e, t) {
return {
$$typeof: o,
type: e.type,
key: t,
ref: e.ref,
props: e.props,
_owner: e._owner,
}
}(i, r + (!i.key || c && c.key === i.key ? "" : `${`${i.key}`.replace(k, "$&/")}/`) + e)), t.push(i)), 1
} if (c = 0, n = n === "" ? "." : `${n}:`, Array.isArray(e)) {
for (var s = 0;s < e.length;s++) {
var l = n + E(a = e[s], s);c += P(a, t, r, l, i)
}
} else if (typeof(l = function (e) {
return e === null || typeof e != "object" ? null : typeof(e = p && e[p] || e["@@iterator"]) == "function" ? e : null
}(e)) == "function") {
for (e = l.call(e), s = 0;!(a = e.next()).done;) {
c += P(a = a.value, t, r, l = n + E(a, s++), i)
}
} else if (a === "object") {
throw t = `${e}`, new Error(y(31, t === "[object Object]" ? `object with keys {${Object.keys(e).join(", ")}}` : t))
} return c
} function C(e, t, r) {
if (e == null) {
return e
} const n = []; let o = 0;return P(e, n, "", "", function (e) {
return t.call(r, e, o++)
}), n
} function $(e) {
if (e._status === -1) {
let t = e._result;t = t(), e._status = 0, e._result = t, t.then(function (t) {
e._status === 0 && (t = t.default, e._status = 1, e._result = t)
}, function (error) {
e._status === 0 && (e._status = 2, e._result = error)
})
} if (e._status === 1) {
return e._result
} throw e._result
} const R = {current: null};function x() {
const e = R.current;if (e === null) {
throw new Error(y(321))
} return e
} const M = {
ReactCurrentDispatcher: R,
ReactCurrentBatchConfig: {transition: 0},
ReactCurrentOwner: _,
IsSomeRendererActing: {current: !1},
assign: n,
};t.Children = {
map: C,
forEach(e, t, r) {
C(e, function () {
t.apply(this, arguments)
}, r)
},
count(e) {
let t = 0;return C(e, function () {
t++
}), t
},
toArray(e) {
return C(e, function (e) {
return e
}) || []
},
only(e) {
if (!S(e)) {
throw new Error(y(143))
} return e
},
}, t.Component = b, t.PureComponent = m, t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = M, t.cloneElement = function (e, t, r) {
if (e == null) {
throw new Error(y(267, e))
} const u = n({}, e.props); let i = e.key; let a = e.ref; let c = e._owner;if (t != null) {
if (void 0 !== t.ref && (a = t.ref, c = _.current), void 0 !== t.key && (i = `${t.key}`), e.type && e.type.defaultProps) {
var s = e.type.defaultProps
} for (l in t) {
j.call(t, l) && !O.hasOwnProperty(l) && (u[l] = void 0 === t[l] && void 0 !== s ? s[l] : t[l])
}
} var l = arguments.length - 2;if (l === 1) {
u.children = r
} else if (l > 1) {
s = new Array(l);for (let f = 0;l > f;f++) {
s[f] = arguments[f + 2]
}u.children = s
} return {
$$typeof: o,
type: e.type,
key: i,
ref: a,
props: u,
_owner: c,
}
}, t.createContext = function (e, t) {
return void 0 === t && (t = null), (e = {
$$typeof: a,
_calculateChangedBits: t,
_currentValue: e,
_currentValue2: e,
_threadCount: 0,
Provider: null,
Consumer: null,
}).Provider = {
$$typeof: i,
_context: e,
}, e.Consumer = e
}, t.createElement = w, t.createFactory = function (e) {
const t = w.bind(null, e);return t.type = e, t
}, t.createRef = function () {
return {current: null}
}, t.forwardRef = function (e) {
return {
$$typeof: c,
render: e,
}
}, t.isValidElement = S, t.lazy = function (e) {
return {
$$typeof: l,
_payload: {
_status: -1,
_result: e,
},
_init: $,
}
}, t.memo = function (e, t) {
return {
$$typeof: s,
type: e,
compare: void 0 === t ? null : t,
}
}, t.useCallback = function (e, t) {
return x().useCallback(e, t)
}, t.useContext = function (e, t) {
return x().useContext(e, t)
}, t.useDebugValue = function () {}, t.useEffect = function (e, t) {
return x().useEffect(e, t)
}, t.useImperativeHandle = function (e, t, r) {
return x().useImperativeHandle(e, t, r)
}, t.useLayoutEffect = function (e, t) {
return x().useLayoutEffect(e, t)
}, t.useMemo = function (e, t) {
return x().useMemo(e, t)
}, t.useReducer = function (e, t, r) {
return x().useReducer(e, t, r)
}, t.useRef = function (e) {
return x().useRef(e)
}, t.useState = function (e) {
return x().useState(e)
}, t.version = "17.0.2"
},
294: (e, t, r) => {
e.exports = r(408)
},
}; const t = {};function r(n) {
const o = t[n];if (void 0 !== o) {
return o.exports
} const u = t[n] = {exports: {}};return e[n](u, u.exports, r), u.exports
}r.n = e => {
const t = e && e.__esModule ? () => e.default : () => e;return r.d(t, {a: t}), t
}, r.d = (e, t) => {
for (const n in t) {
r.o(t, n) && !r.o(e, n) && Object.defineProperty(e, n, {
enumerable: !0,
get: t[n],
})
}
}, r.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t), r.r = e => {
typeof Symbol != "undefined" && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {value: "Module"}), Object.defineProperty(e, "__esModule", {value: !0})
};const n = {};return (() => {
r.r(n), r.d(n, {default: () => c});const e = require("lodash"); const t = require("prop-types");const o = r.n(t); const u = r(294);function i() {
return (i = Object.assign || function (e) {
for (let t = 1;arguments.length > t;t++) {
const r = arguments[t];for (const n in r) {
Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n])
}
} return e
}).apply(this, arguments)
} function a(e, t, r) {
return t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0,
}) : e[t] = r, e
} class c extends u.Component {
render() {
const t = (0, e.pick)(this.props, ["className", "style", "alt"]);return this.props.lazy && (t.loading = "lazy"), (0, e.isString)(this.props.input) ? u.createElement("img", i({src: this.props.input}, t)) : (0, e.isNil)(this.props.input.webp) && (0, e.isString)(this.props.input.fallback) ? u.createElement("img", i({src: this.props.input.fallback}, t)) : (0, e.isString)(this.props.input.webp) && (0, e.isNil)(this.props.input.fallback) ? u.createElement("img", i({src: this.props.input.webp}, t)) : (0, e.isObject)(this.props.input.webp) && (0, e.isObject)(this.props.input.fallback) ? (Object.assign(t, this.props.input.img), t.src || (t.src = this.props.input.fallback.srcset), u.createElement("picture", null, u.createElement("source", this.props.input.webp), u.createElement("source", this.props.input.fallback), u.createElement("img", t))) : void 0
}
}a(c, "displayName", "react-modern-picture"), a(c, "propTypes", {
className: o().oneOfType([o().string, o().object, o().arrayOf(o().string), o().arrayOf(o().object)]),
input: o().any.isRequired,
style: o().object,
alt: o().string,
lazy: o().bool,
})
})(), n
})()
}, typeof exports == "object" && typeof module == "object" ? module.exports = t() : typeof define == "function" && define.amd ? define([], t) : typeof exports == "object" ? exports.ReactModernPicture = t() : e.ReactModernPicture = t()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment