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AE,UAAW,YAAa,oBAEvE,EAAI,aAAa,YAAY,aACtC,CACA,SAAS,kBACP,IAAI,EAAQ,YACP,EAAM,IAAW,EAAI,aAAa,WAAU,IAAM,EAAQ,CAAE,MAAO,EAAG,OAAQ,GAAM,oBAwBzF,OAvBA,EAAI,aAAa,YAAW,KAC1B,IAAI,EAAW,KACb,GAAS,IACP,IAAI,EAAU,kBACd,OAAI,EAAQ,QAAU,EAAM,OAAS,EAAQ,SAAW,EAAM,OACrD,EAEF,CAAO,GACd,EAOJ,OALK,eAGH,eAAe,iBAAiB,SAAU,GAF1C,OAAO,iBAAiB,SAAU,GAI7B,KACA,eAGH,eAAe,oBAAoB,SAAU,GAF7C,OAAO,oBAAoB,SAAU,EAGvC,CACD,GACA,IACI,CACT,CACA,SAAS,kBACP,MAAO,CACL,MAAO,iBAAqC,MAAlB,oBAAyB,EAAS,eAAe,QAAU,OAAO,WAC5F,OAAQ,iBAAqC,MAAlB,oBAAyB,EAAS,eAAe,SAAW,OAAO,YAElG","file":"/npm/@heroui/use-viewport-size@2.0.1/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@heroui/use-viewport-size@2.0.1/dist/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n  for (var name in all)\n    __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n  if (from && typeof from === \"object\" || typeof from === \"function\") {\n    for (let key of __getOwnPropNames(from))\n      if (!__hasOwnProp.call(to, key) && key !== except)\n        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n  }\n  return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n  // If the importer is in node compatibility mode or this is not an ESM\n  // file that has been converted to a CommonJS file using a Babel-\n  // compatible transform (i.e. \"__esModule\" has not been set), then set\n  // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n  isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n  mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n  useIsSSR: () => useIsSSR,\n  useViewportSize: () => useViewportSize\n});\nmodule.exports = __toCommonJS(index_exports);\nvar import_react = __toESM(require(\"react\"));\nvar visualViewport = typeof document !== \"undefined\" && window.visualViewport;\nvar IsSSRContext = import_react.default.createContext(false);\nfunction getSnapshot() {\n  return false;\n}\nfunction getServerSnapshot() {\n  return true;\n}\nfunction subscribe(onStoreChange) {\n  return () => {\n  };\n}\nfunction useIsSSR() {\n  if (typeof import_react.default[\"useSyncExternalStore\"] === \"function\") {\n    return import_react.default[\"useSyncExternalStore\"](subscribe, getSnapshot, getServerSnapshot);\n  }\n  return (0, import_react.useContext)(IsSSRContext);\n}\nfunction useViewportSize() {\n  let isSSR = useIsSSR();\n  let [size, setSize] = (0, import_react.useState)(() => isSSR ? { width: 0, height: 0 } : getViewportSize());\n  (0, import_react.useEffect)(() => {\n    let onResize = () => {\n      setSize((size2) => {\n        let newSize = getViewportSize();\n        if (newSize.width === size2.width && newSize.height === size2.height) {\n          return size2;\n        }\n        return newSize;\n      });\n    };\n    if (!visualViewport) {\n      window.addEventListener(\"resize\", onResize);\n    } else {\n      visualViewport.addEventListener(\"resize\", onResize);\n    }\n    return () => {\n      if (!visualViewport) {\n        window.removeEventListener(\"resize\", onResize);\n      } else {\n        visualViewport.removeEventListener(\"resize\", onResize);\n      }\n    };\n  }, []);\n  return size;\n}\nfunction getViewportSize() {\n  return {\n    width: visualViewport && (visualViewport == null ? void 0 : visualViewport.width) || window.innerWidth,\n    height: visualViewport && (visualViewport == null ? void 0 : visualViewport.height) || window.innerHeight\n  };\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n  useIsSSR,\n  useViewportSize\n});\n"]}