import { isNull, isUndefined } from 'lodash-es';

"use strict";
function deepCompare(obj1, obj2) {
  const stack = [[obj1, obj2]];
  while (stack.length) {
    const [a, b] = stack.pop();
    if (a === b) continue;
    if (typeof a !== "object" || a === null || typeof b !== "object" || b === null) {
      return false;
    }
    const keysA = Object.keys(a);
    const keysB = Object.keys(b);
    if (keysA.length !== keysB.length) {
      return false;
    }
    if (keysA.length === 0 && keysB.length === 0) {
      continue;
    }
    for (const key of keysA) {
      if (!keysB.includes(key)) {
        return false;
      }
      stack.push([a[key], b[key]]);
    }
  }
  return true;
}
const hasValue = (value) => {
  return Array.isArray(value) ? value.length > 0 : !isNull(value) && !isUndefined(value) && value !== "";
};
const guid = () => {
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
    const r = Math.random() * 16 | 0;
    const v = c === "x" ? r : r & 3 | 8;
    return v.toString(16);
  });
};

export { deepCompare, guid, hasValue };
//# sourceMappingURL=data.mjs.map
