react-flags-component
Version:
Flag Display component compliant with ISO 3166 standards, supporting both `alpha 2` and `alpha 3` notation.
1,346 lines (1,342 loc) • 45.2 kB
JavaScript
import ir from "react";
var $e = {}, xr = {
get exports() {
return $e;
},
set exports(o) {
$e = o;
}
}, he = {};
/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var Ge;
function jr() {
if (Ge)
return he;
Ge = 1;
var o = ir, D = Symbol.for("react.element"), I = Symbol.for("react.fragment"), d = Object.prototype.hasOwnProperty, R = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, f = { key: !0, ref: !0, __self: !0, __source: !0 };
function C(l, y, O) {
var c, E = {}, $ = null, F = null;
O !== void 0 && ($ = "" + O), y.key !== void 0 && ($ = "" + y.key), y.ref !== void 0 && (F = y.ref);
for (c in y)
d.call(y, c) && !f.hasOwnProperty(c) && (E[c] = y[c]);
if (l && l.defaultProps)
for (c in y = l.defaultProps, y)
E[c] === void 0 && (E[c] = y[c]);
return { $$typeof: D, type: l, key: $, ref: F, props: E, _owner: R.current };
}
return he.Fragment = I, he.jsx = C, he.jsxs = C, he;
}
var me = {};
/**
* @license React
* react-jsx-runtime.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var He;
function Ar() {
return He || (He = 1, process.env.NODE_ENV !== "production" && function() {
var o = ir, D = Symbol.for("react.element"), I = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), R = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), C = Symbol.for("react.provider"), l = Symbol.for("react.context"), y = Symbol.for("react.forward_ref"), O = Symbol.for("react.suspense"), c = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), $ = Symbol.for("react.lazy"), F = Symbol.for("react.offscreen"), z = Symbol.iterator, M = "@@iterator";
function V(e) {
if (e === null || typeof e != "object")
return null;
var r = z && e[z] || e[M];
return typeof r == "function" ? r : null;
}
var U = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
function Y(e) {
{
for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), s = 1; s < r; s++)
n[s - 1] = arguments[s];
N("error", e, n);
}
}
function N(e, r, n) {
{
var s = U.ReactDebugCurrentFrame, x = s.getStackAddendum();
x !== "" && (r += "%s", n = n.concat([x]));
var k = n.map(function(P) {
return String(P);
});
k.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, k);
}
}
var L = !1, i = !1, re = !1, ve = !1, pe = !1, ie;
ie = Symbol.for("react.module.reference");
function ye(e) {
return !!(typeof e == "string" || typeof e == "function" || e === d || e === f || pe || e === R || e === O || e === c || ve || e === F || L || i || re || typeof e == "object" && e !== null && (e.$$typeof === $ || e.$$typeof === E || e.$$typeof === C || e.$$typeof === l || e.$$typeof === y || // This needs to include all possible module reference object
// types supported by any Flight configuration anywhere since
// we don't know which Flight build this will end up being used
// with.
e.$$typeof === ie || e.getModuleId !== void 0));
}
function ue(e, r, n) {
var s = e.displayName;
if (s)
return s;
var x = r.displayName || r.name || "";
return x !== "" ? n + "(" + x + ")" : n;
}
function se(e) {
return e.displayName || "Context";
}
function H(e) {
if (e == null)
return null;
if (typeof e.tag == "number" && Y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
return e.displayName || e.name || null;
if (typeof e == "string")
return e;
switch (e) {
case d:
return "Fragment";
case I:
return "Portal";
case f:
return "Profiler";
case R:
return "StrictMode";
case O:
return "Suspense";
case c:
return "SuspenseList";
}
if (typeof e == "object")
switch (e.$$typeof) {
case l:
var r = e;
return se(r) + ".Consumer";
case C:
var n = e;
return se(n._context) + ".Provider";
case y:
return ue(e, e.render, "ForwardRef");
case E:
var s = e.displayName || null;
return s !== null ? s : H(e.type) || "Memo";
case $: {
var x = e, k = x._payload, P = x._init;
try {
return H(P(k));
} catch {
return null;
}
}
}
return null;
}
var G = Object.assign, te = 0, K, ee, ae, fe, t, u, m;
function h() {
}
h.__reactDisabledLog = !0;
function v() {
{
if (te === 0) {
K = console.log, ee = console.info, ae = console.warn, fe = console.error, t = console.group, u = console.groupCollapsed, m = console.groupEnd;
var e = {
configurable: !0,
enumerable: !0,
value: h,
writable: !0
};
Object.defineProperties(console, {
info: e,
log: e,
warn: e,
error: e,
group: e,
groupCollapsed: e,
groupEnd: e
});
}
te++;
}
}
function S() {
{
if (te--, te === 0) {
var e = {
configurable: !0,
enumerable: !0,
writable: !0
};
Object.defineProperties(console, {
log: G({}, e, {
value: K
}),
info: G({}, e, {
value: ee
}),
warn: G({}, e, {
value: ae
}),
error: G({}, e, {
value: fe
}),
group: G({}, e, {
value: t
}),
groupCollapsed: G({}, e, {
value: u
}),
groupEnd: G({}, e, {
value: m
})
});
}
te < 0 && Y("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
}
}
var p = U.ReactCurrentDispatcher, b;
function g(e, r, n) {
{
if (b === void 0)
try {
throw Error();
} catch (x) {
var s = x.stack.trim().match(/\n( *(at )?)/);
b = s && s[1] || "";
}
return `
` + b + e;
}
}
var w = !1, T;
{
var B = typeof WeakMap == "function" ? WeakMap : Map;
T = new B();
}
function a(e, r) {
if (!e || w)
return "";
{
var n = T.get(e);
if (n !== void 0)
return n;
}
var s;
w = !0;
var x = Error.prepareStackTrace;
Error.prepareStackTrace = void 0;
var k;
k = p.current, p.current = null, v();
try {
if (r) {
var P = function() {
throw Error();
};
if (Object.defineProperty(P.prototype, "props", {
set: function() {
throw Error();
}
}), typeof Reflect == "object" && Reflect.construct) {
try {
Reflect.construct(P, []);
} catch (ne) {
s = ne;
}
Reflect.construct(e, [], P);
} else {
try {
P.call();
} catch (ne) {
s = ne;
}
e.call(P.prototype);
}
} else {
try {
throw Error();
} catch (ne) {
s = ne;
}
e();
}
} catch (ne) {
if (ne && s && typeof ne.stack == "string") {
for (var _ = ne.stack.split(`
`), J = s.stack.split(`
`), W = _.length - 1, q = J.length - 1; W >= 1 && q >= 0 && _[W] !== J[q]; )
q--;
for (; W >= 1 && q >= 0; W--, q--)
if (_[W] !== J[q]) {
if (W !== 1 || q !== 1)
do
if (W--, q--, q < 0 || _[W] !== J[q]) {
var Z = `
` + _[W].replace(" at new ", " at ");
return e.displayName && Z.includes("<anonymous>") && (Z = Z.replace("<anonymous>", e.displayName)), typeof e == "function" && T.set(e, Z), Z;
}
while (W >= 1 && q >= 0);
break;
}
}
} finally {
w = !1, p.current = k, S(), Error.prepareStackTrace = x;
}
var de = e ? e.displayName || e.name : "", Je = de ? g(de) : "";
return typeof e == "function" && T.set(e, Je), Je;
}
function X(e, r, n) {
return a(e, !1);
}
function ce(e) {
var r = e.prototype;
return !!(r && r.isReactComponent);
}
function oe(e, r, n) {
if (e == null)
return "";
if (typeof e == "function")
return a(e, ce(e));
if (typeof e == "string")
return g(e);
switch (e) {
case O:
return g("Suspense");
case c:
return g("SuspenseList");
}
if (typeof e == "object")
switch (e.$$typeof) {
case y:
return X(e.render);
case E:
return oe(e.type, r, n);
case $: {
var s = e, x = s._payload, k = s._init;
try {
return oe(k(x), r, n);
} catch {
}
}
}
return "";
}
var Ee = Object.prototype.hasOwnProperty, De = {}, Me = U.ReactDebugCurrentFrame;
function ge(e) {
if (e) {
var r = e._owner, n = oe(e.type, e._source, r ? r.type : null);
Me.setExtraStackFrame(n);
} else
Me.setExtraStackFrame(null);
}
function fr(e, r, n, s, x) {
{
var k = Function.call.bind(Ee);
for (var P in e)
if (k(e, P)) {
var _ = void 0;
try {
if (typeof e[P] != "function") {
var J = Error((s || "React class") + ": " + n + " type `" + P + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[P] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
throw J.name = "Invariant Violation", J;
}
_ = e[P](r, P, s, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
} catch (W) {
_ = W;
}
_ && !(_ instanceof Error) && (ge(x), Y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", s || "React class", n, P, typeof _), ge(null)), _ instanceof Error && !(_.message in De) && (De[_.message] = !0, ge(x), Y("Failed %s type: %s", n, _.message), ge(null));
}
}
}
var cr = Array.isArray;
function _e(e) {
return cr(e);
}
function lr(e) {
{
var r = typeof Symbol == "function" && Symbol.toStringTag, n = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
return n;
}
}
function dr(e) {
try {
return Fe(e), !1;
} catch {
return !0;
}
}
function Fe(e) {
return "" + e;
}
function Ye(e) {
if (dr(e))
return Y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", lr(e)), Fe(e);
}
var be = U.ReactCurrentOwner, vr = {
key: !0,
ref: !0,
__self: !0,
__source: !0
}, We, Le, Re;
Re = {};
function pr(e) {
if (Ee.call(e, "ref")) {
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
if (r && r.isReactWarning)
return !1;
}
return e.ref !== void 0;
}
function yr(e) {
if (Ee.call(e, "key")) {
var r = Object.getOwnPropertyDescriptor(e, "key").get;
if (r && r.isReactWarning)
return !1;
}
return e.key !== void 0;
}
function br(e, r) {
if (typeof e.ref == "string" && be.current && r && be.current.stateNode !== r) {
var n = H(be.current.type);
Re[n] || (Y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', H(be.current.type), e.ref), Re[n] = !0);
}
}
function hr(e, r) {
{
var n = function() {
We || (We = !0, Y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
};
n.isReactWarning = !0, Object.defineProperty(e, "key", {
get: n,
configurable: !0
});
}
}
function mr(e, r) {
{
var n = function() {
Le || (Le = !0, Y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
};
n.isReactWarning = !0, Object.defineProperty(e, "ref", {
get: n,
configurable: !0
});
}
}
var Er = function(e, r, n, s, x, k, P) {
var _ = {
// This tag allows us to uniquely identify this as a React Element
$$typeof: D,
// Built-in properties that belong on the element
type: e,
key: r,
ref: n,
props: P,
// Record the component responsible for creating this element.
_owner: k
};
return _._store = {}, Object.defineProperty(_._store, "validated", {
configurable: !1,
enumerable: !1,
writable: !0,
value: !1
}), Object.defineProperty(_, "_self", {
configurable: !1,
enumerable: !1,
writable: !1,
value: s
}), Object.defineProperty(_, "_source", {
configurable: !1,
enumerable: !1,
writable: !1,
value: x
}), Object.freeze && (Object.freeze(_.props), Object.freeze(_)), _;
};
function gr(e, r, n, s, x) {
{
var k, P = {}, _ = null, J = null;
n !== void 0 && (Ye(n), _ = "" + n), yr(r) && (Ye(r.key), _ = "" + r.key), pr(r) && (J = r.ref, br(r, x));
for (k in r)
Ee.call(r, k) && !vr.hasOwnProperty(k) && (P[k] = r[k]);
if (e && e.defaultProps) {
var W = e.defaultProps;
for (k in W)
P[k] === void 0 && (P[k] = W[k]);
}
if (_ || J) {
var q = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
_ && hr(P, q), J && mr(P, q);
}
return Er(e, _, J, x, s, be.current, P);
}
}
var Oe = U.ReactCurrentOwner, qe = U.ReactDebugCurrentFrame;
function le(e) {
if (e) {
var r = e._owner, n = oe(e.type, e._source, r ? r.type : null);
qe.setExtraStackFrame(n);
} else
qe.setExtraStackFrame(null);
}
var Se;
Se = !1;
function Pe(e) {
return typeof e == "object" && e !== null && e.$$typeof === D;
}
function Ue() {
{
if (Oe.current) {
var e = H(Oe.current.type);
if (e)
return `
Check the render method of \`` + e + "`.";
}
return "";
}
}
function Tr(e) {
{
if (e !== void 0) {
var r = e.fileName.replace(/^.*[\\\/]/, ""), n = e.lineNumber;
return `
Check your code at ` + r + ":" + n + ".";
}
return "";
}
}
var Ne = {};
function _r(e) {
{
var r = Ue();
if (!r) {
var n = typeof e == "string" ? e : e.displayName || e.name;
n && (r = `
Check the top-level render call using <` + n + ">.");
}
return r;
}
}
function Ve(e, r) {
{
if (!e._store || e._store.validated || e.key != null)
return;
e._store.validated = !0;
var n = _r(r);
if (Ne[n])
return;
Ne[n] = !0;
var s = "";
e && e._owner && e._owner !== Oe.current && (s = " It was passed a child from " + H(e._owner.type) + "."), le(e), Y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, s), le(null);
}
}
function ze(e, r) {
{
if (typeof e != "object")
return;
if (_e(e))
for (var n = 0; n < e.length; n++) {
var s = e[n];
Pe(s) && Ve(s, r);
}
else if (Pe(e))
e._store && (e._store.validated = !0);
else if (e) {
var x = V(e);
if (typeof x == "function" && x !== e.entries)
for (var k = x.call(e), P; !(P = k.next()).done; )
Pe(P.value) && Ve(P.value, r);
}
}
}
function Rr(e) {
{
var r = e.type;
if (r == null || typeof r == "string")
return;
var n;
if (typeof r == "function")
n = r.propTypes;
else if (typeof r == "object" && (r.$$typeof === y || // Note: Memo only checks outer props here.
// Inner props are checked in the reconciler.
r.$$typeof === E))
n = r.propTypes;
else
return;
if (n) {
var s = H(r);
fr(n, e.props, "prop", s, e);
} else if (r.PropTypes !== void 0 && !Se) {
Se = !0;
var x = H(r);
Y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", x || "Unknown");
}
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && Y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
}
}
function Or(e) {
{
for (var r = Object.keys(e.props), n = 0; n < r.length; n++) {
var s = r[n];
if (s !== "children" && s !== "key") {
le(e), Y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", s), le(null);
break;
}
}
e.ref !== null && (le(e), Y("Invalid attribute `ref` supplied to `React.Fragment`."), le(null));
}
}
function Be(e, r, n, s, x, k) {
{
var P = ye(e);
if (!P) {
var _ = "";
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (_ += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
var J = Tr(x);
J ? _ += J : _ += Ue();
var W;
e === null ? W = "null" : _e(e) ? W = "array" : e !== void 0 && e.$$typeof === D ? (W = "<" + (H(e.type) || "Unknown") + " />", _ = " Did you accidentally export a JSX literal instead of a component?") : W = typeof e, Y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", W, _);
}
var q = gr(e, r, n, x, k);
if (q == null)
return q;
if (P) {
var Z = r.children;
if (Z !== void 0)
if (s)
if (_e(Z)) {
for (var de = 0; de < Z.length; de++)
ze(Z[de], e);
Object.freeze && Object.freeze(Z);
} else
Y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
else
ze(Z, e);
}
return e === d ? Or(q) : Rr(q), q;
}
}
function Sr(e, r, n) {
return Be(e, r, n, !0);
}
function Pr(e, r, n) {
return Be(e, r, n, !1);
}
var Cr = Pr, wr = Sr;
me.Fragment = d, me.jsx = Cr, me.jsxs = wr;
}()), me;
}
(function(o) {
process.env.NODE_ENV === "production" ? o.exports = jr() : o.exports = Ar();
})(xr);
const Ir = $e.jsx;
var Q = {}, Ke = {
get exports() {
return Q;
},
set exports(o) {
Q = o;
}
}, Te = {}, $r = {
get exports() {
return Te;
},
set exports(o) {
Te = o;
}
}, j = {};
/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var Xe;
function kr() {
if (Xe)
return j;
Xe = 1;
var o = typeof Symbol == "function" && Symbol.for, D = o ? Symbol.for("react.element") : 60103, I = o ? Symbol.for("react.portal") : 60106, d = o ? Symbol.for("react.fragment") : 60107, R = o ? Symbol.for("react.strict_mode") : 60108, f = o ? Symbol.for("react.profiler") : 60114, C = o ? Symbol.for("react.provider") : 60109, l = o ? Symbol.for("react.context") : 60110, y = o ? Symbol.for("react.async_mode") : 60111, O = o ? Symbol.for("react.concurrent_mode") : 60111, c = o ? Symbol.for("react.forward_ref") : 60112, E = o ? Symbol.for("react.suspense") : 60113, $ = o ? Symbol.for("react.suspense_list") : 60120, F = o ? Symbol.for("react.memo") : 60115, z = o ? Symbol.for("react.lazy") : 60116, M = o ? Symbol.for("react.block") : 60121, V = o ? Symbol.for("react.fundamental") : 60117, U = o ? Symbol.for("react.responder") : 60118, Y = o ? Symbol.for("react.scope") : 60119;
function N(i) {
if (typeof i == "object" && i !== null) {
var re = i.$$typeof;
switch (re) {
case D:
switch (i = i.type, i) {
case y:
case O:
case d:
case f:
case R:
case E:
return i;
default:
switch (i = i && i.$$typeof, i) {
case l:
case c:
case z:
case F:
case C:
return i;
default:
return re;
}
}
case I:
return re;
}
}
}
function L(i) {
return N(i) === O;
}
return j.AsyncMode = y, j.ConcurrentMode = O, j.ContextConsumer = l, j.ContextProvider = C, j.Element = D, j.ForwardRef = c, j.Fragment = d, j.Lazy = z, j.Memo = F, j.Portal = I, j.Profiler = f, j.StrictMode = R, j.Suspense = E, j.isAsyncMode = function(i) {
return L(i) || N(i) === y;
}, j.isConcurrentMode = L, j.isContextConsumer = function(i) {
return N(i) === l;
}, j.isContextProvider = function(i) {
return N(i) === C;
}, j.isElement = function(i) {
return typeof i == "object" && i !== null && i.$$typeof === D;
}, j.isForwardRef = function(i) {
return N(i) === c;
}, j.isFragment = function(i) {
return N(i) === d;
}, j.isLazy = function(i) {
return N(i) === z;
}, j.isMemo = function(i) {
return N(i) === F;
}, j.isPortal = function(i) {
return N(i) === I;
}, j.isProfiler = function(i) {
return N(i) === f;
}, j.isStrictMode = function(i) {
return N(i) === R;
}, j.isSuspense = function(i) {
return N(i) === E;
}, j.isValidElementType = function(i) {
return typeof i == "string" || typeof i == "function" || i === d || i === O || i === f || i === R || i === E || i === $ || typeof i == "object" && i !== null && (i.$$typeof === z || i.$$typeof === F || i.$$typeof === C || i.$$typeof === l || i.$$typeof === c || i.$$typeof === V || i.$$typeof === U || i.$$typeof === Y || i.$$typeof === M);
}, j.typeOf = N, j;
}
var A = {};
/** @license React v16.13.1
* react-is.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var Ze;
function Dr() {
return Ze || (Ze = 1, process.env.NODE_ENV !== "production" && function() {
var o = typeof Symbol == "function" && Symbol.for, D = o ? Symbol.for("react.element") : 60103, I = o ? Symbol.for("react.portal") : 60106, d = o ? Symbol.for("react.fragment") : 60107, R = o ? Symbol.for("react.strict_mode") : 60108, f = o ? Symbol.for("react.profiler") : 60114, C = o ? Symbol.for("react.provider") : 60109, l = o ? Symbol.for("react.context") : 60110, y = o ? Symbol.for("react.async_mode") : 60111, O = o ? Symbol.for("react.concurrent_mode") : 60111, c = o ? Symbol.for("react.forward_ref") : 60112, E = o ? Symbol.for("react.suspense") : 60113, $ = o ? Symbol.for("react.suspense_list") : 60120, F = o ? Symbol.for("react.memo") : 60115, z = o ? Symbol.for("react.lazy") : 60116, M = o ? Symbol.for("react.block") : 60121, V = o ? Symbol.for("react.fundamental") : 60117, U = o ? Symbol.for("react.responder") : 60118, Y = o ? Symbol.for("react.scope") : 60119;
function N(a) {
return typeof a == "string" || typeof a == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
a === d || a === O || a === f || a === R || a === E || a === $ || typeof a == "object" && a !== null && (a.$$typeof === z || a.$$typeof === F || a.$$typeof === C || a.$$typeof === l || a.$$typeof === c || a.$$typeof === V || a.$$typeof === U || a.$$typeof === Y || a.$$typeof === M);
}
function L(a) {
if (typeof a == "object" && a !== null) {
var X = a.$$typeof;
switch (X) {
case D:
var ce = a.type;
switch (ce) {
case y:
case O:
case d:
case f:
case R:
case E:
return ce;
default:
var oe = ce && ce.$$typeof;
switch (oe) {
case l:
case c:
case z:
case F:
case C:
return oe;
default:
return X;
}
}
case I:
return X;
}
}
}
var i = y, re = O, ve = l, pe = C, ie = D, ye = c, ue = d, se = z, H = F, G = I, te = f, K = R, ee = E, ae = !1;
function fe(a) {
return ae || (ae = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), t(a) || L(a) === y;
}
function t(a) {
return L(a) === O;
}
function u(a) {
return L(a) === l;
}
function m(a) {
return L(a) === C;
}
function h(a) {
return typeof a == "object" && a !== null && a.$$typeof === D;
}
function v(a) {
return L(a) === c;
}
function S(a) {
return L(a) === d;
}
function p(a) {
return L(a) === z;
}
function b(a) {
return L(a) === F;
}
function g(a) {
return L(a) === I;
}
function w(a) {
return L(a) === f;
}
function T(a) {
return L(a) === R;
}
function B(a) {
return L(a) === E;
}
A.AsyncMode = i, A.ConcurrentMode = re, A.ContextConsumer = ve, A.ContextProvider = pe, A.Element = ie, A.ForwardRef = ye, A.Fragment = ue, A.Lazy = se, A.Memo = H, A.Portal = G, A.Profiler = te, A.StrictMode = K, A.Suspense = ee, A.isAsyncMode = fe, A.isConcurrentMode = t, A.isContextConsumer = u, A.isContextProvider = m, A.isElement = h, A.isForwardRef = v, A.isFragment = S, A.isLazy = p, A.isMemo = b, A.isPortal = g, A.isProfiler = w, A.isStrictMode = T, A.isSuspense = B, A.isValidElementType = N, A.typeOf = L;
}()), A;
}
var Qe;
function ur() {
return Qe || (Qe = 1, function(o) {
process.env.NODE_ENV === "production" ? o.exports = kr() : o.exports = Dr();
}($r)), Te;
}
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
var Ce, er;
function Mr() {
if (er)
return Ce;
er = 1;
var o = Object.getOwnPropertySymbols, D = Object.prototype.hasOwnProperty, I = Object.prototype.propertyIsEnumerable;
function d(f) {
if (f == null)
throw new TypeError("Object.assign cannot be called with null or undefined");
return Object(f);
}
function R() {
try {
if (!Object.assign)
return !1;
var f = new String("abc");
if (f[5] = "de", Object.getOwnPropertyNames(f)[0] === "5")
return !1;
for (var C = {}, l = 0; l < 10; l++)
C["_" + String.fromCharCode(l)] = l;
var y = Object.getOwnPropertyNames(C).map(function(c) {
return C[c];
});
if (y.join("") !== "0123456789")
return !1;
var O = {};
return "abcdefghijklmnopqrst".split("").forEach(function(c) {
O[c] = c;
}), Object.keys(Object.assign({}, O)).join("") === "abcdefghijklmnopqrst";
} catch {
return !1;
}
}
return Ce = R() ? Object.assign : function(f, C) {
for (var l, y = d(f), O, c = 1; c < arguments.length; c++) {
l = Object(arguments[c]);
for (var E in l)
D.call(l, E) && (y[E] = l[E]);
if (o) {
O = o(l);
for (var $ = 0; $ < O.length; $++)
I.call(l, O[$]) && (y[O[$]] = l[O[$]]);
}
}
return y;
}, Ce;
}
var we, rr;
function ke() {
if (rr)
return we;
rr = 1;
var o = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
return we = o, we;
}
var xe, tr;
function sr() {
return tr || (tr = 1, xe = Function.call.bind(Object.prototype.hasOwnProperty)), xe;
}
var je, nr;
function Fr() {
if (nr)
return je;
nr = 1;
var o = function() {
};
if (process.env.NODE_ENV !== "production") {
var D = ke(), I = {}, d = sr();
o = function(f) {
var C = "Warning: " + f;
typeof console < "u" && console.error(C);
try {
throw new Error(C);
} catch {
}
};
}
function R(f, C, l, y, O) {
if (process.env.NODE_ENV !== "production") {
for (var c in f)
if (d(f, c)) {
var E;
try {
if (typeof f[c] != "function") {
var $ = Error(
(y || "React class") + ": " + l + " type `" + c + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof f[c] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
);
throw $.name = "Invariant Violation", $;
}
E = f[c](C, c, y, l, null, D);
} catch (z) {
E = z;
}
if (E && !(E instanceof Error) && o(
(y || "React class") + ": type specification of " + l + " `" + c + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof E + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
), E instanceof Error && !(E.message in I)) {
I[E.message] = !0;
var F = O ? O() : "";
o(
"Failed " + l + " type: " + E.message + (F ?? "")
);
}
}
}
}
return R.resetWarningCache = function() {
process.env.NODE_ENV !== "production" && (I = {});
}, je = R, je;
}
var Ae, ar;
function Yr() {
if (ar)
return Ae;
ar = 1;
var o = ur(), D = Mr(), I = ke(), d = sr(), R = Fr(), f = function() {
};
process.env.NODE_ENV !== "production" && (f = function(l) {
var y = "Warning: " + l;
typeof console < "u" && console.error(y);
try {
throw new Error(y);
} catch {
}
});
function C() {
return null;
}
return Ae = function(l, y) {
var O = typeof Symbol == "function" && Symbol.iterator, c = "@@iterator";
function E(t) {
var u = t && (O && t[O] || t[c]);
if (typeof u == "function")
return u;
}
var $ = "<<anonymous>>", F = {
array: U("array"),
bigint: U("bigint"),
bool: U("boolean"),
func: U("function"),
number: U("number"),
object: U("object"),
string: U("string"),
symbol: U("symbol"),
any: Y(),
arrayOf: N,
element: L(),
elementType: i(),
instanceOf: re,
node: ye(),
objectOf: pe,
oneOf: ve,
oneOfType: ie,
shape: se,
exact: H
};
function z(t, u) {
return t === u ? t !== 0 || 1 / t === 1 / u : t !== t && u !== u;
}
function M(t, u) {
this.message = t, this.data = u && typeof u == "object" ? u : {}, this.stack = "";
}
M.prototype = Error.prototype;
function V(t) {
if (process.env.NODE_ENV !== "production")
var u = {}, m = 0;
function h(S, p, b, g, w, T, B) {
if (g = g || $, T = T || b, B !== I) {
if (y) {
var a = new Error(
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
);
throw a.name = "Invariant Violation", a;
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
var X = g + ":" + b;
!u[X] && // Avoid spamming the console because they are often not actionable except for lib authors
m < 3 && (f(
"You are manually calling a React.PropTypes validation function for the `" + T + "` prop on `" + g + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
), u[X] = !0, m++);
}
}
return p[b] == null ? S ? p[b] === null ? new M("The " + w + " `" + T + "` is marked as required " + ("in `" + g + "`, but its value is `null`.")) : new M("The " + w + " `" + T + "` is marked as required in " + ("`" + g + "`, but its value is `undefined`.")) : null : t(p, b, g, w, T);
}
var v = h.bind(null, !1);
return v.isRequired = h.bind(null, !0), v;
}
function U(t) {
function u(m, h, v, S, p, b) {
var g = m[h], w = K(g);
if (w !== t) {
var T = ee(g);
return new M(
"Invalid " + S + " `" + p + "` of type " + ("`" + T + "` supplied to `" + v + "`, expected ") + ("`" + t + "`."),
{ expectedType: t }
);
}
return null;
}
return V(u);
}
function Y() {
return V(C);
}
function N(t) {
function u(m, h, v, S, p) {
if (typeof t != "function")
return new M("Property `" + p + "` of component `" + v + "` has invalid PropType notation inside arrayOf.");
var b = m[h];
if (!Array.isArray(b)) {
var g = K(b);
return new M("Invalid " + S + " `" + p + "` of type " + ("`" + g + "` supplied to `" + v + "`, expected an array."));
}
for (var w = 0; w < b.length; w++) {
var T = t(b, w, v, S, p + "[" + w + "]", I);
if (T instanceof Error)
return T;
}
return null;
}
return V(u);
}
function L() {
function t(u, m, h, v, S) {
var p = u[m];
if (!l(p)) {
var b = K(p);
return new M("Invalid " + v + " `" + S + "` of type " + ("`" + b + "` supplied to `" + h + "`, expected a single ReactElement."));
}
return null;
}
return V(t);
}
function i() {
function t(u, m, h, v, S) {
var p = u[m];
if (!o.isValidElementType(p)) {
var b = K(p);
return new M("Invalid " + v + " `" + S + "` of type " + ("`" + b + "` supplied to `" + h + "`, expected a single ReactElement type."));
}
return null;
}
return V(t);
}
function re(t) {
function u(m, h, v, S, p) {
if (!(m[h] instanceof t)) {
var b = t.name || $, g = fe(m[h]);
return new M("Invalid " + S + " `" + p + "` of type " + ("`" + g + "` supplied to `" + v + "`, expected ") + ("instance of `" + b + "`."));
}
return null;
}
return V(u);
}
function ve(t) {
if (!Array.isArray(t))
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? f(
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
) : f("Invalid argument supplied to oneOf, expected an array.")), C;
function u(m, h, v, S, p) {
for (var b = m[h], g = 0; g < t.length; g++)
if (z(b, t[g]))
return null;
var w = JSON.stringify(t, function(B, a) {
var X = ee(a);
return X === "symbol" ? String(a) : a;
});
return new M("Invalid " + S + " `" + p + "` of value `" + String(b) + "` " + ("supplied to `" + v + "`, expected one of " + w + "."));
}
return V(u);
}
function pe(t) {
function u(m, h, v, S, p) {
if (typeof t != "function")
return new M("Property `" + p + "` of component `" + v + "` has invalid PropType notation inside objectOf.");
var b = m[h], g = K(b);
if (g !== "object")
return new M("Invalid " + S + " `" + p + "` of type " + ("`" + g + "` supplied to `" + v + "`, expected an object."));
for (var w in b)
if (d(b, w)) {
var T = t(b, w, v, S, p + "." + w, I);
if (T instanceof Error)
return T;
}
return null;
}
return V(u);
}
function ie(t) {
if (!Array.isArray(t))
return process.env.NODE_ENV !== "production" && f("Invalid argument supplied to oneOfType, expected an instance of array."), C;
for (var u = 0; u < t.length; u++) {
var m = t[u];
if (typeof m != "function")
return f(
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ae(m) + " at index " + u + "."
), C;
}
function h(v, S, p, b, g) {
for (var w = [], T = 0; T < t.length; T++) {
var B = t[T], a = B(v, S, p, b, g, I);
if (a == null)
return null;
a.data && d(a.data, "expectedType") && w.push(a.data.expectedType);
}
var X = w.length > 0 ? ", expected one of type [" + w.join(", ") + "]" : "";
return new M("Invalid " + b + " `" + g + "` supplied to " + ("`" + p + "`" + X + "."));
}
return V(h);
}
function ye() {
function t(u, m, h, v, S) {
return G(u[m]) ? null : new M("Invalid " + v + " `" + S + "` supplied to " + ("`" + h + "`, expected a ReactNode."));
}
return V(t);
}
function ue(t, u, m, h, v) {
return new M(
(t || "React class") + ": " + u + " type `" + m + "." + h + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + v + "`."
);
}
function se(t) {
function u(m, h, v, S, p) {
var b = m[h], g = K(b);
if (g !== "object")
return new M("Invalid " + S + " `" + p + "` of type `" + g + "` " + ("supplied to `" + v + "`, expected `object`."));
for (var w in t) {
var T = t[w];
if (typeof T != "function")
return ue(v, S, p, w, ee(T));
var B = T(b, w, v, S, p + "." + w, I);
if (B)
return B;
}
return null;
}
return V(u);
}
function H(t) {
function u(m, h, v, S, p) {
var b = m[h], g = K(b);
if (g !== "object")
return new M("Invalid " + S + " `" + p + "` of type `" + g + "` " + ("supplied to `" + v + "`, expected `object`."));
var w = D({}, m[h], t);
for (var T in w) {
var B = t[T];
if (d(t, T) && typeof B != "function")
return ue(v, S, p, T, ee(B));
if (!B)
return new M(
"Invalid " + S + " `" + p + "` key `" + T + "` supplied to `" + v + "`.\nBad object: " + JSON.stringify(m[h], null, " ") + `
Valid keys: ` + JSON.stringify(Object.keys(t), null, " ")
);
var a = B(b, T, v, S, p + "." + T, I);
if (a)
return a;
}
return null;
}
return V(u);
}
function G(t) {
switch (typeof t) {
case "number":
case "string":
case "undefined":
return !0;
case "boolean":
return !t;
case "object":
if (Array.isArray(t))
return t.every(G);
if (t === null || l(t))
return !0;
var u = E(t);
if (u) {
var m = u.call(t), h;
if (u !== t.entries) {
for (; !(h = m.next()).done; )
if (!G(h.value))
return !1;
} else
for (; !(h = m.next()).done; ) {
var v = h.value;
if (v && !G(v[1]))
return !1;
}
} else
return !1;
return !0;
default:
return !1;
}
}
function te(t, u) {
return t === "symbol" ? !0 : u ? u["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && u instanceof Symbol : !1;
}
function K(t) {
var u = typeof t;
return Array.isArray(t) ? "array" : t instanceof RegExp ? "object" : te(u, t) ? "symbol" : u;
}
function ee(t) {
if (typeof t > "u" || t === null)
return "" + t;
var u = K(t);
if (u === "object") {
if (t instanceof Date)
return "date";
if (t instanceof RegExp)
return "regexp";
}
return u;
}
function ae(t) {
var u = ee(t);
switch (u) {
case "array":
case "object":
return "an " + u;
case "boolean":
case "date":
case "regexp":
return "a " + u;
default:
return u;
}
}
function fe(t) {
return !t.constructor || !t.constructor.name ? $ : t.constructor.name;
}
return F.checkPropTypes = R, F.resetWarningCache = R.resetWarningCache, F.PropTypes = F, F;
}, Ae;
}
var Ie, or;
function Wr() {
if (or)
return Ie;
or = 1;
var o = ke();
function D() {
}
function I() {
}
return I.resetWarningCache = D, Ie = function() {
function d(C, l, y, O, c, E) {
if (E !== o) {
var $ = new Error(
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
);
throw $.name = "Invariant Violation", $;
}
}
d.isRequired = d;
function R() {
return d;
}
var f = {
array: d,
bigint: d,
bool: d,
func: d,
number: d,
object: d,
string: d,
symbol: d,
any: d,
arrayOf: R,
element: d,
elementType: d,
instanceOf: R,
node: d,
objectOf: R,
oneOf: R,
oneOfType: R,
shape: R,
exact: R,
checkPropTypes: I,
resetWarningCache: D
};
return f.PropTypes = f, f;
}, Ie;
}
if (process.env.NODE_ENV !== "production") {
var Lr = ur(), qr = !0;
Ke.exports = Yr()(Lr.isElement, qr);
} else
Ke.exports = Wr()();
const Ur = ({
countryCode: o = "AFG",
size: D = "md",
shape: I = "rectangular",
as: d = "div",
customHeight: R,
customWidth: f,
...C
}) => {
const O = R || R ? { style: { ...R ? { height: R } : {}, ...f ? { width: f } : {} } } : {};
return /* @__PURE__ */ Ir(
d,
{
className: `fib-${I}-${o} fib-size-${D}`,
...O,
...C
}
);
};
Ur.propTypes = {
countryCode: Q.string,
size: Q.string,
shape: Q.string,
as: Q.string,
customHeight: Q.oneOfType([Q.number, Q.string]),
customWidth: Q.oneOfType([Q.number, Q.string])
};
export {
Ur as FlagDisplay
};