{"version":3,"sources":["webpack://frontend-taglib-clay/node_modules/@clayui/data-provider/lib/LRUCache.js","webpack://frontend-taglib-clay/node_modules/@clayui/data-provider/lib/types.js","webpack://frontend-taglib-clay/node_modules/@clayui/data-provider/lib/useCache.js","webpack://frontend-taglib-clay/node_modules/@clayui/data-provider/lib/useResource.js","webpack://frontend-taglib-clay/node_modules/@clayui/data-provider/lib/util.js","webpack://frontend-taglib-clay/node_modules/fast-json-stable-stringify/index.js","webpack://frontend-taglib-clay/node_modules/warning/warning.js","webpack://frontend-taglib-clay/frontend-js-react-web/__liferay__/exports/react.js\"","webpack://frontend-taglib-clay/frontend-taglib-clay/__liferay__/exports/@clayui$shared.js\"","webpack://frontend-taglib-clay/webpack/bootstrap","webpack://frontend-taglib-clay/node_modules/@clayui/data-provider/lib/index.js"],"names":["_classCallCheck","instance","Constructor","TypeError","_defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","Object","defineProperty","key","exports","value","LRUCache","maxSize","arguments","undefined","this","_maxSize","_storage","Map","protoProps","staticProps","has","get","delete","set","size","iterator","keys","count","_value","next","prototype","SYMBOL_ORIGIN","SYMBOL_DATA_PROVIDER","NetworkStatus","FetchPolicy","Symbol","useCache","_fastJsonStableStringify","_interopRequireDefault","__webpack_require__","_react","_LRUCache","_types","obj","__esModule","default","fetchPolicy","storage","storageMaxSize","link","variables","cache","useRef","current","shouldUseCache","CacheFirst","CacheAndNetwork","getCacheKey","concat","ifVal","x","fn","partial","presetArgs","args","reset","useResource","_shared","_useCache","_util","_typeof","constructor","_slicedToArray","arr","Array","isArray","_arrayWithHoles","_i","_s","_e","_arr","_n","_d","call","done","push","err","_iterableToArrayLimit","o","minLen","_arrayLikeToArray","n","toString","slice","name","from","test","_unsupportedIterableToArray","_nonIterableRest","len","arr2","_ref","fetcher","fetch","_ref$fetchDelay","fetchDelay","fetchOptions","_ref$fetchPolicy","NoCache","_ref$fetchTimeout","fetchTimeout","_ref$onNetworkStatusC","onNetworkStatusChange","dispatchNetworkStatus","_ref$pollInterval","pollInterval","_ref$storage","_ref$fetchRetry","fetchRetry","_ref$storageMaxSize","_ref$variables","_React$useState2","useState","resource","setResource","pollingTimeoutId","retryDelayTimeoutId","pollIntervalRef","firstRenderRef","debouncedVariablesChange","useDebounce","cleanRetry","clearTimeout","handleFetchRetry","error","retryAttempts","_fetchRetry$attempts","attempts","delay","_fetchRetry$delay","_delay$initial","initial","_delay$jitter","jitter","Math","pow","random","getRetryDelay","console","warn","setTimeout","doFetch","Error","cleanPoll","setPoll","maybeFetch","Polling","fetchOnComplete","result","Unused","populateSearchParams","uri","forEach","searchParams","getUrlFormat","URL","promise","then","res","ok","bodyUsed","json","timeout","catch","status","cacheData","useEffect","Refetch","Loading","refetch","ms","Promise","resolve","reject","timeoutId","module","data","opts","cmp","f","cycles","node","a","b","aobj","bobj","seen","stringify","toJSON","isFinite","JSON","out","indexOf","seenIndex","sort","splice","warning","printWarning","format","argIndex","message","replace","condition","apply","__WEBPACK_EXTERNAL_MODULE__frontend_js_react_web_liferay_exports_react_js_52accfa8__","__WEBPACK_EXTERNAL_MODULE__frontend_taglib_clay_liferay_exports_clayui$shared_js_be5ffeeb__","__webpack_module_cache__","moduleId","cachedModule","__webpack_modules__","_useResource2","_excluded","ownKeys","object","enumerableOnly","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","_objectSpread","source","_defineProperty","getOwnPropertyDescriptors","defineProperties","_objectWithoutProperties","excluded","sourceKeys","_objectWithoutPropertiesLoose","sourceSymbolKeys","propertyIsEnumerable","_default","children","_ref$notifyOnNetworkS","notifyOnNetworkStatusChange","otherProps","loading","state","setState","_useResource","payload","networkStatus","createElement","Fragment"],"mappings":";;;+EAOA,SAAAA,EAAAC,EAAAC,GAAA,KAAAD,aAAAC,GAAA,MAAA,IAAAC,UAAA,qCAEA,SAAAC,EAAAC,EAAAC,GAAA,IAAA,IAAAC,EAAA,EAAAA,EAAAD,EAAAE,OAAAD,IAAA,CAAA,IAAAE,EAAAH,E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,EAAA,EAAAA,EAAA8O,EAAA7O,OAAAD,IAAAQ,EAAAsO,EAAA9O,GAAA6O,EAAAlC,QAAAnM,IAAA,IAAAV,EAAAU,GAAAgO,EAAAhO,IAAA,OAAAV,EAFAiP,CAAAP,EAAAK,GAAA,GAAAvO,OAAA4N,sBAAA,CAAA,IAAAc,EAAA1O,OAAA4N,sBAAAM,GAAA,IAAAxO,EAAA,EAAAA,EAAAgP,EAAA/O,OAAAD,IAAAQ,EAAAwO,EAAAhP,GAAA6O,EAAAlC,QAAAnM,IAAA,GAAAF,OAAAyB,UAAAkN,qBAAA7J,KAAAoJ,EAAAhO,KAAAV,EAAAU,GAAAgO,EAAAhO,IAAA,OAAAV,EAIA,IAgDAoP,EAhDA,SAAA5I,GACA,IAAA6I,EAAA7I,EAAA6I,SACAC,EAAA9I,EAAA+I,4BACAA,OAAA,IAAAD,GAAAA,EACAE,EAAAV,EAAAtI,EAAAwH,GAaApG,EAAAjD,EANAhC,EAAAK,QAAA6E,UAAA,WACA,MAAA,CACAY,OAAA,EACAgH,SAAA,MAGA,GACAC,EAAA9H,EAAA,GACA+H,EAAA/H,EAAA,GAeAgI,GAAA,EAAA7B,EAAA1J,aAAAoK,EAAAA,EAAA,GAAAe,GAAA,GAAA,CACArI,sBAdA,SAAA8D,GACA,IAAA4E,EAAA,CACApH,MAAA,IAAAwC,EACAwE,QAAAxE,EAAA,GAGAsE,IACAM,EAAAC,cAAA7E,GAGA0E,EAAAE,OAMAvE,EAAAsE,EAAAtE,QACAxD,EAAA8H,EAAA9H,SAIA,OAAAnF,EAAAK,QAAA+M,cAAApN,EAAAK,QAAAgN,SAAA,KAAAX,EAAAZ,EAAAA,EAAA,GAAAiB,GAAA,GAAA,CACA7D,KAAA/D,EACAwD,QAAAA,OAKA3K,EAAA,QAAAyO","sourcesContent":["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.LRUCache = void 0;\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n/**\n * SPDX-FileCopyrightText: © 2019 Liferay, Inc. \n * SPDX-License-Identifier: BSD-3-Clause\n */\nvar DEFAULT_MAX_SIZE = 20;\n\nvar LRUCache = /*#__PURE__*/function () {\n function LRUCache() {\n var maxSize = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_MAX_SIZE;\n\n _classCallCheck(this, LRUCache);\n\n if (maxSize <= 0) {\n throw new TypeError('LRUCache: max must be a non-negative number');\n }\n\n this._maxSize = maxSize;\n this._storage = new Map();\n }\n\n _createClass(LRUCache, [{\n key: \"reset\",\n value: function reset() {\n this._storage = new Map();\n return this._storage;\n }\n }, {\n key: \"has\",\n value: function has(key) {\n return this._storage.has(key);\n }\n }, {\n key: \"get\",\n value: function get(key) {\n if (this._storage.has(key)) {\n var value = this._storage.get(key);\n\n this._storage.delete(key);\n\n this._storage.set(key, value);\n\n return value;\n }\n }\n }, {\n key: \"set\",\n value: function set(key, value) {\n if (this._storage.size >= this._maxSize) {\n var iterator = this._storage.keys();\n\n var count = this._maxSize - (this._storage.size - 1);\n\n while (count) {\n var _iterator$next = iterator.next(),\n _value = _iterator$next.value;\n\n this._storage.delete(_value);\n\n count--;\n }\n }\n\n this._storage.set(key, value);\n }\n }]);\n\n return LRUCache;\n}();\n\nexports.LRUCache = LRUCache;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.SYMBOL_ORIGIN = exports.SYMBOL_DATA_PROVIDER = exports.NetworkStatus = exports.FetchPolicy = void 0;\n\n/**\n * SPDX-FileCopyrightText: © 2019 Liferay, Inc. \n * SPDX-License-Identifier: BSD-3-Clause\n */\nvar SYMBOL_DATA_PROVIDER = Symbol('clay.data.provider');\nexports.SYMBOL_DATA_PROVIDER = SYMBOL_DATA_PROVIDER;\nvar SYMBOL_ORIGIN = Symbol('clay.internal');\n/**\n * - Loading (1) The status is set to `loading` only when the first\n * requisition occurs.\n * - Refetch (2) The status is set to `refetch` when a change in the variables API\n * or refetch method is called.\n * - Polling (3) The status is set to `polling` when pollInterval is set above 0.\n * - Unused (4) When no request is happening the status will be `unused`.\n * - Error (5) When any timeout or request `error` occurs, the status will be set\n * to error.\n */\n\nexports.SYMBOL_ORIGIN = SYMBOL_ORIGIN;\nvar NetworkStatus;\nexports.NetworkStatus = NetworkStatus;\n\n(function (NetworkStatus) {\n NetworkStatus[NetworkStatus[\"Error\"] = 5] = \"Error\";\n NetworkStatus[NetworkStatus[\"Loading\"] = 1] = \"Loading\";\n NetworkStatus[NetworkStatus[\"Polling\"] = 3] = \"Polling\";\n NetworkStatus[NetworkStatus[\"Refetch\"] = 2] = \"Refetch\";\n NetworkStatus[NetworkStatus[\"Unused\"] = 4] = \"Unused\";\n})(NetworkStatus || (exports.NetworkStatus = NetworkStatus = {}));\n\nvar FetchPolicy;\nexports.FetchPolicy = FetchPolicy;\n\n(function (FetchPolicy) {\n FetchPolicy[\"CacheFirst\"] = \"cache-first\";\n FetchPolicy[\"NoCache\"] = \"no-cache\";\n FetchPolicy[\"CacheAndNetwork\"] = \"cache-and-network\";\n})(FetchPolicy || (exports.FetchPolicy = FetchPolicy = {}));","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.useCache = void 0;\n\nvar _fastJsonStableStringify = _interopRequireDefault(require(\"fast-json-stable-stringify\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _LRUCache = require(\"./LRUCache\");\n\nvar _types = require(\"./types\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * SPDX-FileCopyrightText: © 2019 Liferay, Inc. \n * SPDX-License-Identifier: BSD-3-Clause\n */\nvar useCache = function useCache(fetchPolicy, storage, storageMaxSize, link, variables) {\n if (!storage[_types.SYMBOL_DATA_PROVIDER]) {\n storage[_types.SYMBOL_DATA_PROVIDER] = new _LRUCache.LRUCache(storageMaxSize);\n }\n\n var cache = _react.default.useRef(storage[_types.SYMBOL_DATA_PROVIDER]).current;\n\n var shouldUseCache = fetchPolicy === _types.FetchPolicy.CacheFirst || fetchPolicy === _types.FetchPolicy.CacheAndNetwork;\n\n var getCacheKey = function getCacheKey(link, variables) {\n if (typeof link === 'string') {\n return \"\".concat(link, \":\").concat((0, _fastJsonStableStringify.default)(variables));\n }\n\n return null;\n };\n\n var ifVal = function ifVal(x, fn) {\n return x ? fn : function () {\n return null;\n };\n };\n\n var partial = function partial(fn, presetArgs) {\n return function (args) {\n return fn(presetArgs, args);\n };\n };\n\n var readFromCache = function readFromCache(key) {\n if (key && cache.has(key)) {\n return cache.get(key);\n }\n\n return null;\n };\n\n var putCacheValue = function putCacheValue(key, value) {\n if (key) {\n return cache.set(key, value);\n }\n\n return null;\n };\n\n return {\n get: ifVal(shouldUseCache, partial(readFromCache, getCacheKey(link, variables))),\n reset: cache.reset,\n set: ifVal(shouldUseCache, partial(putCacheValue, getCacheKey(link, variables)))\n };\n};\n\nexports.useCache = useCache;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.useResource = void 0;\n\nvar _shared = require(\"@clayui/shared\");\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _warning = _interopRequireDefault(require(\"warning\"));\n\nvar _types = require(\"./types\");\n\nvar _useCache = require(\"./useCache\");\n\nvar _util = require(\"./util\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _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); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar useResource = function useResource(_ref) {\n var fetcher = _ref.fetch,\n _ref$fetchDelay = _ref.fetchDelay,\n fetchDelay = _ref$fetchDelay === void 0 ? 300 : _ref$fetchDelay,\n fetchOptions = _ref.fetchOptions,\n _ref$fetchPolicy = _ref.fetchPolicy,\n fetchPolicy = _ref$fetchPolicy === void 0 ? _types.FetchPolicy.NoCache : _ref$fetchPolicy,\n _ref$fetchTimeout = _ref.fetchTimeout,\n fetchTimeout = _ref$fetchTimeout === void 0 ? 6000 : _ref$fetchTimeout,\n link = _ref.link,\n _ref$onNetworkStatusC = _ref.onNetworkStatusChange,\n dispatchNetworkStatus = _ref$onNetworkStatusC === void 0 ? function () {} : _ref$onNetworkStatusC,\n _ref$pollInterval = _ref.pollInterval,\n pollInterval = _ref$pollInterval === void 0 ? 0 : _ref$pollInterval,\n _ref$storage = _ref.storage,\n storage = _ref$storage === void 0 ? _defineProperty({}, _types.SYMBOL_ORIGIN, true) : _ref$storage,\n _ref$fetchRetry = _ref.fetchRetry,\n fetchRetry = _ref$fetchRetry === void 0 ? {} : _ref$fetchRetry,\n _ref$storageMaxSize = _ref.storageMaxSize,\n storageMaxSize = _ref$storageMaxSize === void 0 ? 20 : _ref$storageMaxSize,\n _ref$variables = _ref.variables,\n variables = _ref$variables === void 0 ? null : _ref$variables;\n\n var _React$useState = _react.default.useState(null),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n resource = _React$useState2[0],\n setResource = _React$useState2[1];\n\n var pollingTimeoutId = _react.default.useRef(null).current;\n\n var retryDelayTimeoutId = _react.default.useRef(null).current;\n\n var pollIntervalRef = _react.default.useRef(pollInterval); // A flag to identify if the first rendering happened to avoid\n // two requests.\n\n\n var firstRenderRef = _react.default.useRef(true);\n\n var cache = (0, _useCache.useCache)(fetchPolicy, storage, storageMaxSize, link, variables);\n var debouncedVariablesChange = (0, _shared.useDebounce)(variables, fetchDelay);\n\n var handleRefetch = function handleRefetch() {\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n doFetch();\n dispatchNetworkStatus(_types.NetworkStatus.Refetch);\n };\n\n var cleanRetry = function cleanRetry() {\n if (retryDelayTimeoutId) {\n clearTimeout(retryDelayTimeoutId);\n }\n };\n\n var getRetryDelay = function getRetryDelay(retryAttempts) {\n var _fetchRetry$delay = fetchRetry.delay,\n delay = _fetchRetry$delay === void 0 ? {} : _fetchRetry$delay;\n var _delay$initial = delay.initial,\n initial = _delay$initial === void 0 ? 300 : _delay$initial,\n _delay$jitter = delay.jitter,\n jitter = _delay$jitter === void 0 ? true : _delay$jitter;\n var baseDelay = jitter ? initial : initial / 2;\n var value = baseDelay * Math.pow(2, retryAttempts);\n\n if (jitter) {\n value = Math.random() * value;\n }\n\n return value;\n };\n\n var handleFetchRetry = function handleFetchRetry(error, retryAttempts) {\n var _fetchRetry$attempts = fetchRetry.attempts,\n attempts = _fetchRetry$attempts === void 0 ? 5 : _fetchRetry$attempts;\n cleanRetry();\n\n if (attempts > 0 && retryAttempts < attempts) {\n var delay = getRetryDelay(retryAttempts); // eslint-disable-next-line no-console\n\n console.warn(\"DataProvider: Trying \".concat(retryAttempts + 1, \" of \").concat(attempts, \" will happen in \").concat(delay, \"ms\"));\n retryDelayTimeoutId = setTimeout(function () {\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n doFetch(retryAttempts + 1);\n }, delay);\n } else {\n dispatchNetworkStatus(_types.NetworkStatus.Error);\n \"production\" !== \"production\" ? (0, _warning.default)(false, \"DataProvider: Error making the requisition \".concat(error)) : void 0;\n }\n };\n\n var cleanPoll = function cleanPoll() {\n return pollingTimeoutId && clearTimeout(pollingTimeoutId);\n };\n\n var setPoll = function setPoll() {\n cleanPoll();\n pollingTimeoutId = setTimeout(function () {\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n maybeFetch(_types.NetworkStatus.Polling);\n }, pollIntervalRef.current);\n };\n\n var fetchOnComplete = function fetchOnComplete(result) {\n // Should clear retry interval if any of the\n // attempts are successful.\n cleanRetry();\n setResource(result);\n dispatchNetworkStatus(_types.NetworkStatus.Unused);\n cache.set(result);\n\n if (pollIntervalRef.current > 0) {\n setPoll();\n }\n };\n\n var populateSearchParams = function populateSearchParams(uri, variables) {\n if (!variables) {\n return uri;\n }\n\n var keys = Object.keys(variables);\n keys.forEach(function (key) {\n return uri.searchParams.set(key, variables[key]);\n });\n return uri;\n };\n\n var getUrlFormat = function getUrlFormat(link, variables) {\n var uri = new URL(link);\n \"production\" !== \"production\" ? (0, _warning.default)(uri.searchParams.toString() === '', 'DataProvider: We recommend that instead of passing parameters over the link, use the variables API. \\n More details: https://clayui.com/docs/components/data-provider.html') : void 0;\n\n if (!variables) {\n return uri.toString();\n }\n\n populateSearchParams(uri, variables);\n return uri.toString();\n };\n\n var doFetch = function doFetch() {\n var retryAttempts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var promise;\n \"production\" !== \"production\" ? (0, _warning.default)(typeof link === 'string', 'DataProvider: The behavior of the `link` accepting a function has been deprecated in favor of the `fetcher` API. \\n More details: https://clayui.com/docs/components/data-provider.html#data-fetching') : void 0;\n\n switch (_typeof(link)) {\n case 'function':\n promise = link(populateSearchParams( // This is just a hack to be able to instantiate the URL and make\n // `populateSearchParams` reusable in `getUrlFormat` and make\n // things easier.\n new URL('http://clay.data.provider'), variables).searchParams.toString());\n break;\n\n case 'string':\n {\n var fn = fetcher !== null && fetcher !== void 0 ? fetcher : fetch;\n promise = fn(getUrlFormat(link, variables), fetchOptions).then(function (res) {\n if (res.ok && !res.bodyUsed) {\n return res.json();\n }\n\n return res;\n });\n break;\n }\n\n default:\n return null;\n }\n\n (0, _util.timeout)(fetchTimeout, promise).then(fetchOnComplete).catch(function (error) {\n return handleFetchRetry(error, retryAttempts);\n });\n };\n\n var maybeFetch = function maybeFetch(status) {\n var cacheData = cache.get();\n\n if (cacheData) {\n fetchOnComplete(cacheData); // When fetch policy is only cache-first and gets the data from\n // the cache, it should not perform a request, only when it is\n // cache-and-network.\n\n if (fetchPolicy === _types.FetchPolicy.CacheFirst) {\n return false;\n }\n }\n\n dispatchNetworkStatus(status);\n doFetch();\n };\n\n _react.default.useEffect(function () {\n pollIntervalRef.current = pollInterval;\n\n if (pollInterval > 0) {\n setPoll();\n }\n }, [pollInterval]);\n\n _react.default.useEffect(function () {\n if (!firstRenderRef.current) {\n maybeFetch(_types.NetworkStatus.Refetch);\n }\n }, [debouncedVariablesChange]);\n\n _react.default.useEffect(function () {\n maybeFetch(_types.NetworkStatus.Loading);\n firstRenderRef.current = false;\n return function () {\n // Reset the cache only if the storage reference is\n // local from useResource.\n if (storage[_types.SYMBOL_ORIGIN]) {\n cache.reset();\n } // Set to zero to prevent any unfinished requests\n // from continuing polling after umount has occurred.\n\n\n pollIntervalRef.current = 0;\n cleanPoll();\n cleanRetry();\n };\n }, []);\n\n return {\n refetch: handleRefetch,\n resource: resource\n };\n};\n\nexports.useResource = useResource;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.timeout = void 0;\n\n/**\n * SPDX-FileCopyrightText: © 2019 Liferay, Inc. \n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/**\n * Implementation of the timeout.\n * Based on: https://github.com/github/fetch/issues/175#issuecomment-125779262\n */\nvar timeout = function timeout(ms, promise) {\n return new Promise(function (resolve, reject) {\n var timeoutId = setTimeout(function () {\n reject(new Error('timeout'));\n }, ms);\n promise.then(function (res) {\n clearTimeout(timeoutId);\n resolve(res);\n }).catch(function (error) {\n clearTimeout(timeoutId);\n reject(error);\n });\n });\n};\n\nexports.timeout = timeout;","'use strict';\n\nmodule.exports = function (data, opts) {\n if (!opts) opts = {};\n if (typeof opts === 'function') opts = { cmp: opts };\n var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false;\n\n var cmp = opts.cmp && (function (f) {\n return function (node) {\n return function (a, b) {\n var aobj = { key: a, value: node[a] };\n var bobj = { key: b, value: node[b] };\n return f(aobj, bobj);\n };\n };\n })(opts.cmp);\n\n var seen = [];\n return (function stringify (node) {\n if (node && node.toJSON && typeof node.toJSON === 'function') {\n node = node.toJSON();\n }\n\n if (node === undefined) return;\n if (typeof node == 'number') return isFinite(node) ? '' + node : 'null';\n if (typeof node !== 'object') return JSON.stringify(node);\n\n var i, out;\n if (Array.isArray(node)) {\n out = '[';\n for (i = 0; i < node.length; i++) {\n if (i) out += ',';\n out += stringify(node[i]) || 'null';\n }\n return out + ']';\n }\n\n if (node === null) return 'null';\n\n if (seen.indexOf(node) !== -1) {\n if (cycles) return JSON.stringify('__cycle__');\n throw new TypeError('Converting circular structure to JSON');\n }\n\n var seenIndex = seen.push(node) - 1;\n var keys = Object.keys(node).sort(cmp && cmp(node));\n out = '';\n for (i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = stringify(node[key]);\n\n if (!value) continue;\n if (out) out += ',';\n out += JSON.stringify(key) + ':' + value;\n }\n seen.splice(seenIndex, 1);\n return '{' + out + '}';\n })(data);\n};\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nvar warning = function() {};\n\nif (__DEV__) {\n var printWarning = function printWarning(format, args) {\n var len = arguments.length;\n args = new Array(len > 1 ? len - 1 : 0);\n for (var key = 1; key < len; key++) {\n args[key - 1] = arguments[key];\n }\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n }\n\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n if (!condition) {\n printWarning.apply(null, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;\n","var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }\nvar y = x => () => x\nmodule.exports = __WEBPACK_EXTERNAL_MODULE__frontend_js_react_web_liferay_exports_react_js_52accfa8__;","var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }\nvar y = x => () => x\nmodule.exports = __WEBPACK_EXTERNAL_MODULE__frontend_taglib_clay_liferay_exports_clayui$shared_js_be5ffeeb__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nObject.defineProperty(exports, \"useResource\", {\n enumerable: true,\n get: function get() {\n return _useResource2.useResource;\n }\n});\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _useResource2 = require(\"./useResource\");\n\nvar _excluded = [\"children\", \"notifyOnNetworkStatusChange\"];\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nvar ClayDataProvider = function ClayDataProvider(_ref) {\n var children = _ref.children,\n _ref$notifyOnNetworkS = _ref.notifyOnNetworkStatusChange,\n notifyOnNetworkStatusChange = _ref$notifyOnNetworkS === void 0 ? false : _ref$notifyOnNetworkS,\n otherProps = _objectWithoutProperties(_ref, _excluded);\n\n /**\n * networkStatus is only updated when notifyOnNetworkStatusChange\n * is enabled, this will inform of the fetch status and cause\n * a new rendering.\n */\n var _React$useState = _react.default.useState(function () {\n return {\n error: false,\n loading: false\n };\n }),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n state = _React$useState2[0],\n setState = _React$useState2[1];\n\n var handleNetworkStatus = function handleNetworkStatus(status) {\n var payload = {\n error: status === 5,\n loading: status < 4\n };\n\n if (notifyOnNetworkStatusChange) {\n payload.networkStatus = status;\n }\n\n setState(payload);\n };\n\n var _useResource = (0, _useResource2.useResource)(_objectSpread(_objectSpread({}, otherProps), {}, {\n onNetworkStatusChange: handleNetworkStatus\n })),\n refetch = _useResource.refetch,\n resource = _useResource.resource; // Adding a fragment is a hack to dribble the\n // react-docgen to identify that it is a component.\n\n\n return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children(_objectSpread(_objectSpread({}, state), {}, {\n data: resource,\n refetch: refetch\n })));\n};\n\nvar _default = ClayDataProvider;\nexports.default = _default;"]}