UNPKG

laif-ds

Version:

Design System di Laif con componenti React basati su principi di Atomic Design

69 lines (68 loc) 2.41 kB
"use client"; import { __exports as d } from "../../../../_virtual/with-selector.development.js"; import M from "react"; import { __require as b } from "../../shim/index.js"; /** * @license React * use-sync-external-store-shim/with-selector.development.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var s; function H() { return s ? d : (s = 1, process.env.NODE_ENV !== "production" && (function() { function A(r, u) { return r === u && (r !== 0 || 1 / r === 1 / u) || r !== r && u !== u; } typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()); var n = M, R = b(), T = typeof Object.is == "function" ? Object.is : A, V = R.useSyncExternalStore, D = n.useRef, S = n.useEffect, p = n.useMemo, G = n.useDebugValue; d.useSyncExternalStoreWithSelector = function(r, u, a, c, i) { var _ = D(null); if (_.current === null) { var t = { hasValue: !1, value: null }; _.current = t; } else t = _.current; _ = p( function() { function m(e) { if (!v) { if (v = !0, l = e, e = c(e), i !== void 0 && t.hasValue) { var o = t.value; if (i(o, e)) return O = o; } return O = e; } if (o = O, T(l, e)) return o; var E = c(e); return i !== void 0 && i(o, E) ? (l = e, o) : (l = e, O = E); } var v = !1, l, O, L = a === void 0 ? null : a; return [ function() { return m(u()); }, L === null ? void 0 : function() { return m(L()); } ]; }, [u, a, c, i] ); var f = V(r, _[0], _[1]); return S( function() { t.hasValue = !0, t.value = f; }, [f] ), G(f), f; }, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error()); })(), d); } export { H as __require };