Liferay.Loader.define("layout-content-page-editor-web@2.0.169/page_editor/app/utils/checkDeepEqual", ['module', 'exports', 'require'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.deepEqual = deepEqual;

    function _typeof(obj) {
      "@babel/helpers - typeof";
      if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
        _typeof = function _typeof(obj) {
          return typeof obj;
        };
      } else {
        _typeof = function _typeof(obj) {
          return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
        };
      }return _typeof(obj);
    }

    /**
     * SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
     * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
     */

    /**
     * Returns true if a and b are deeply equal
     * @param a
     * @param b
     * @returns {boolean}
     */
    function deepEqual(a, b) {
      if (a === b) {
        return true;
      }

      if (Array.isArray(a) && Array.isArray(b)) {
        if (a.length !== b.length) {
          return false;
        }

        return a.every(function (value, index) {
          return deepEqual(value, b[index]);
        });
      }

      if (a && b && _typeof(a) === 'object' && _typeof(b) === 'object') {
        var keys = Object.keys(a);

        if (keys.length !== Object.keys(b).length) {
          return false;
        }

        return keys.every(function (key) {
          return deepEqual(a[key], b[key]);
        });
      }

      return false;
    }
    //# sourceMappingURL=checkDeepEqual.js.map
  }
});
//# sourceMappingURL=checkDeepEqual.js.map