@dr.pogodin/react-utils 1.19.0 → 1.20.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -78,7 +78,7 @@ if (window.INJ) {
78
78
  decipher.update(_forge.default.util.createBuffer(data.slice(32)));
79
79
  decipher.finish();
80
80
  data = _forge.default.util.decodeUtf8(decipher.output.data);
81
- data = eval("(".concat(data, ")")); // eslint-disable-line no-eval
81
+ data = eval(`(${data})`); // eslint-disable-line no-eval
82
82
 
83
83
  window.CHUNK_GROUPS = data.CHUNK_GROUPS;
84
84
  window.CONFIG = data.CONFIG;
@@ -1 +1 @@
1
- {"version":3,"file":"init.js","names":["BUILD_INFO","window","TRU_BUILD_INFO","TRU_KEEP_INJ_SCRIPT","block","document","querySelector","getElementsByTagName","removeChild","useServiceWorker","navigator","addEventListener","reg","serviceWorker","register","console","log","err","INJ","key","data","forge","util","decode64","decipher","cipher","createDecipher","start","iv","slice","update","createBuffer","finish","decodeUtf8","output","eval","CHUNK_GROUPS","CONFIG","ISTATE","CSRF","cookie","parse","csrfToken"],"sources":["../../../src/client/init.js"],"sourcesContent":["/**\n * Initialization of client-side environment.\n */\n\n/* global BUILD_INFO, document, window */\n\nimport cookie from 'cookie';\n\n// Note: this way, only required part of \"node-forge\": AES, and some utils,\n// is bundled into client-side code.\nimport forge from 'node-forge/lib/forge';\nimport 'node-forge/lib/aes';\n\n/* `BUILD_INFO` is always injected by Webpack build, but this check is needed\n * to adopt the code for usage in tests. */\nif (typeof BUILD_INFO !== 'undefined') {\n window.TRU_BUILD_INFO = BUILD_INFO;\n}\n\n/* Removes data injection script out of the document.\n * The if block is here for test purposes. */\nif (!window.TRU_KEEP_INJ_SCRIPT) {\n const block = document.querySelector('script[id=\"inj\"]');\n if (block) document.getElementsByTagName('body')[0].removeChild(block);\n}\n\n/* TODO: A proper logger should be moved to `@dr.pogodin/react-utils`. */\n/* eslint-disable no-console */\nconst { useServiceWorker } = window.TRU_BUILD_INFO;\nif (useServiceWorker) {\n const { navigator } = window;\n if ('serviceWorker' in navigator) {\n window.addEventListener('load', async () => {\n try {\n // Note: no matter the \"publicPath\", we want to serve the service worker\n // from the web app root, to allow it control any and all pages of the\n // web app (otherwise, it will be restricted to the scope of its path).\n // The server takes it into account.\n const reg = await navigator\n .serviceWorker.register('/__service-worker.js');\n console.log('SW registered:', reg);\n } catch (err) {\n console.log('SW registration failed:', err);\n }\n });\n }\n}\n/* eslint-enable no-console */\n\n/* Decodes data injected at the server side. */\nif (window.INJ) {\n const { key } = window.TRU_BUILD_INFO;\n let data = forge.util.decode64(window.INJ);\n const decipher = forge.cipher.createDecipher('AES-CBC', key);\n decipher.start({ iv: data.slice(0, 32) });\n decipher.update(forge.util.createBuffer(data.slice(32)));\n decipher.finish();\n\n data = forge.util.decodeUtf8(decipher.output.data);\n data = eval(`(${data})`); // eslint-disable-line no-eval\n\n window.CHUNK_GROUPS = data.CHUNK_GROUPS;\n window.CONFIG = data.CONFIG;\n window.ISTATE = data.ISTATE;\n} else {\n // This is possible when the client-side bundle is launched as a stand-alone\n // precompiled website, rather than served by react-utils' based server.\n window.CHUNK_GROUPS = {};\n window.CONFIG = {};\n}\n\nwindow.CONFIG.CSRF = cookie.parse(document.cookie).csrfToken;\n"],"mappings":";;;;AAMA;;AAIA;;AACA;;AAXA;AACA;AACA;;AAEA;AAIA;AACA;;AAIA;AACA;AACA,IAAI,OAAOA,UAAP,KAAsB,WAA1B,EAAuC;EACrCC,MAAM,CAACC,cAAP,GAAwBF,UAAxB;AACD;AAED;AACA;;;AACA,IAAI,CAACC,MAAM,CAACE,mBAAZ,EAAiC;EAC/B,MAAMC,KAAK,GAAGC,QAAQ,CAACC,aAAT,CAAuB,kBAAvB,CAAd;EACA,IAAIF,KAAJ,EAAWC,QAAQ,CAACE,oBAAT,CAA8B,MAA9B,EAAsC,CAAtC,EAAyCC,WAAzC,CAAqDJ,KAArD;AACZ;AAED;;AACA;;;AACA,MAAM;EAAEK;AAAF,IAAuBR,MAAM,CAACC,cAApC;;AACA,IAAIO,gBAAJ,EAAsB;EACpB,MAAM;IAAEC;EAAF,IAAgBT,MAAtB;;EACA,IAAI,mBAAmBS,SAAvB,EAAkC;IAChCT,MAAM,CAACU,gBAAP,CAAwB,MAAxB,EAAgC,YAAY;MAC1C,IAAI;QACF;QACA;QACA;QACA;QACA,MAAMC,GAAG,GAAG,MAAMF,SAAS,CACxBG,aADe,CACDC,QADC,CACQ,sBADR,CAAlB;QAEAC,OAAO,CAACC,GAAR,CAAY,gBAAZ,EAA8BJ,GAA9B;MACD,CARD,CAQE,OAAOK,GAAP,EAAY;QACZF,OAAO,CAACC,GAAR,CAAY,yBAAZ,EAAuCC,GAAvC;MACD;IACF,CAZD;EAaD;AACF;AACD;;AAEA;;;AACA,IAAIhB,MAAM,CAACiB,GAAX,EAAgB;EACd,MAAM;IAAEC;EAAF,IAAUlB,MAAM,CAACC,cAAvB;;EACA,IAAIkB,IAAI,GAAGC,cAAA,CAAMC,IAAN,CAAWC,QAAX,CAAoBtB,MAAM,CAACiB,GAA3B,CAAX;;EACA,MAAMM,QAAQ,GAAGH,cAAA,CAAMI,MAAN,CAAaC,cAAb,CAA4B,SAA5B,EAAuCP,GAAvC,CAAjB;;EACAK,QAAQ,CAACG,KAAT,CAAe;IAAEC,EAAE,EAAER,IAAI,CAACS,KAAL,CAAW,CAAX,EAAc,EAAd;EAAN,CAAf;EACAL,QAAQ,CAACM,MAAT,CAAgBT,cAAA,CAAMC,IAAN,CAAWS,YAAX,CAAwBX,IAAI,CAACS,KAAL,CAAW,EAAX,CAAxB,CAAhB;EACAL,QAAQ,CAACQ,MAAT;EAEAZ,IAAI,GAAGC,cAAA,CAAMC,IAAN,CAAWW,UAAX,CAAsBT,QAAQ,CAACU,MAAT,CAAgBd,IAAtC,CAAP;EACAA,IAAI,GAAGe,IAAI,YAAKf,IAAL,OAAX,CATc,CASY;;EAE1BnB,MAAM,CAACmC,YAAP,GAAsBhB,IAAI,CAACgB,YAA3B;EACAnC,MAAM,CAACoC,MAAP,GAAgBjB,IAAI,CAACiB,MAArB;EACApC,MAAM,CAACqC,MAAP,GAAgBlB,IAAI,CAACkB,MAArB;AACD,CAdD,MAcO;EACL;EACA;EACArC,MAAM,CAACmC,YAAP,GAAsB,EAAtB;EACAnC,MAAM,CAACoC,MAAP,GAAgB,EAAhB;AACD;;AAEDpC,MAAM,CAACoC,MAAP,CAAcE,IAAd,GAAqBC,eAAA,CAAOC,KAAP,CAAapC,QAAQ,CAACmC,MAAtB,EAA8BE,SAAnD"}
1
+ {"version":3,"file":"init.js","names":["BUILD_INFO","window","TRU_BUILD_INFO","TRU_KEEP_INJ_SCRIPT","block","document","querySelector","getElementsByTagName","removeChild","useServiceWorker","navigator","addEventListener","reg","serviceWorker","register","console","log","err","INJ","key","data","forge","util","decode64","decipher","cipher","createDecipher","start","iv","slice","update","createBuffer","finish","decodeUtf8","output","eval","CHUNK_GROUPS","CONFIG","ISTATE","CSRF","cookie","parse","csrfToken"],"sources":["../../../src/client/init.js"],"sourcesContent":["/**\n * Initialization of client-side environment.\n */\n\n/* global BUILD_INFO, document, window */\n\nimport cookie from 'cookie';\n\n// Note: this way, only required part of \"node-forge\": AES, and some utils,\n// is bundled into client-side code.\nimport forge from 'node-forge/lib/forge';\nimport 'node-forge/lib/aes';\n\n/* `BUILD_INFO` is always injected by Webpack build, but this check is needed\n * to adopt the code for usage in tests. */\nif (typeof BUILD_INFO !== 'undefined') {\n window.TRU_BUILD_INFO = BUILD_INFO;\n}\n\n/* Removes data injection script out of the document.\n * The if block is here for test purposes. */\nif (!window.TRU_KEEP_INJ_SCRIPT) {\n const block = document.querySelector('script[id=\"inj\"]');\n if (block) document.getElementsByTagName('body')[0].removeChild(block);\n}\n\n/* TODO: A proper logger should be moved to `@dr.pogodin/react-utils`. */\n/* eslint-disable no-console */\nconst { useServiceWorker } = window.TRU_BUILD_INFO;\nif (useServiceWorker) {\n const { navigator } = window;\n if ('serviceWorker' in navigator) {\n window.addEventListener('load', async () => {\n try {\n // Note: no matter the \"publicPath\", we want to serve the service worker\n // from the web app root, to allow it control any and all pages of the\n // web app (otherwise, it will be restricted to the scope of its path).\n // The server takes it into account.\n const reg = await navigator\n .serviceWorker.register('/__service-worker.js');\n console.log('SW registered:', reg);\n } catch (err) {\n console.log('SW registration failed:', err);\n }\n });\n }\n}\n/* eslint-enable no-console */\n\n/* Decodes data injected at the server side. */\nif (window.INJ) {\n const { key } = window.TRU_BUILD_INFO;\n let data = forge.util.decode64(window.INJ);\n const decipher = forge.cipher.createDecipher('AES-CBC', key);\n decipher.start({ iv: data.slice(0, 32) });\n decipher.update(forge.util.createBuffer(data.slice(32)));\n decipher.finish();\n\n data = forge.util.decodeUtf8(decipher.output.data);\n data = eval(`(${data})`); // eslint-disable-line no-eval\n\n window.CHUNK_GROUPS = data.CHUNK_GROUPS;\n window.CONFIG = data.CONFIG;\n window.ISTATE = data.ISTATE;\n} else {\n // This is possible when the client-side bundle is launched as a stand-alone\n // precompiled website, rather than served by react-utils' based server.\n window.CHUNK_GROUPS = {};\n window.CONFIG = {};\n}\n\nwindow.CONFIG.CSRF = cookie.parse(document.cookie).csrfToken;\n"],"mappings":";;;;AAMA;;AAIA;;AACA;;AAXA;AACA;AACA;;AAEA;AAIA;AACA;;AAIA;AACA;AACA,IAAI,OAAOA,UAAP,KAAsB,WAA1B,EAAuC;EACrCC,MAAM,CAACC,cAAP,GAAwBF,UAAxB;AACD;AAED;AACA;;;AACA,IAAI,CAACC,MAAM,CAACE,mBAAZ,EAAiC;EAC/B,MAAMC,KAAK,GAAGC,QAAQ,CAACC,aAAT,CAAuB,kBAAvB,CAAd;EACA,IAAIF,KAAJ,EAAWC,QAAQ,CAACE,oBAAT,CAA8B,MAA9B,EAAsC,CAAtC,EAAyCC,WAAzC,CAAqDJ,KAArD;AACZ;AAED;;AACA;;;AACA,MAAM;EAAEK;AAAF,IAAuBR,MAAM,CAACC,cAApC;;AACA,IAAIO,gBAAJ,EAAsB;EACpB,MAAM;IAAEC;EAAF,IAAgBT,MAAtB;;EACA,IAAI,mBAAmBS,SAAvB,EAAkC;IAChCT,MAAM,CAACU,gBAAP,CAAwB,MAAxB,EAAgC,YAAY;MAC1C,IAAI;QACF;QACA;QACA;QACA;QACA,MAAMC,GAAG,GAAG,MAAMF,SAAS,CACxBG,aADe,CACDC,QADC,CACQ,sBADR,CAAlB;QAEAC,OAAO,CAACC,GAAR,CAAY,gBAAZ,EAA8BJ,GAA9B;MACD,CARD,CAQE,OAAOK,GAAP,EAAY;QACZF,OAAO,CAACC,GAAR,CAAY,yBAAZ,EAAuCC,GAAvC;MACD;IACF,CAZD;EAaD;AACF;AACD;;AAEA;;;AACA,IAAIhB,MAAM,CAACiB,GAAX,EAAgB;EACd,MAAM;IAAEC;EAAF,IAAUlB,MAAM,CAACC,cAAvB;;EACA,IAAIkB,IAAI,GAAGC,cAAA,CAAMC,IAAN,CAAWC,QAAX,CAAoBtB,MAAM,CAACiB,GAA3B,CAAX;;EACA,MAAMM,QAAQ,GAAGH,cAAA,CAAMI,MAAN,CAAaC,cAAb,CAA4B,SAA5B,EAAuCP,GAAvC,CAAjB;;EACAK,QAAQ,CAACG,KAAT,CAAe;IAAEC,EAAE,EAAER,IAAI,CAACS,KAAL,CAAW,CAAX,EAAc,EAAd;EAAN,CAAf;EACAL,QAAQ,CAACM,MAAT,CAAgBT,cAAA,CAAMC,IAAN,CAAWS,YAAX,CAAwBX,IAAI,CAACS,KAAL,CAAW,EAAX,CAAxB,CAAhB;EACAL,QAAQ,CAACQ,MAAT;EAEAZ,IAAI,GAAGC,cAAA,CAAMC,IAAN,CAAWW,UAAX,CAAsBT,QAAQ,CAACU,MAAT,CAAgBd,IAAtC,CAAP;EACAA,IAAI,GAAGe,IAAI,CAAE,IAAGf,IAAK,GAAV,CAAX,CATc,CASY;;EAE1BnB,MAAM,CAACmC,YAAP,GAAsBhB,IAAI,CAACgB,YAA3B;EACAnC,MAAM,CAACoC,MAAP,GAAgBjB,IAAI,CAACiB,MAArB;EACApC,MAAM,CAACqC,MAAP,GAAgBlB,IAAI,CAACkB,MAArB;AACD,CAdD,MAcO;EACL;EACA;EACArC,MAAM,CAACmC,YAAP,GAAsB,EAAtB;EACAnC,MAAM,CAACoC,MAAP,GAAgB,EAAhB;AACD;;AAEDpC,MAAM,CAACoC,MAAP,CAAcE,IAAd,GAAqBC,eAAA,CAAOC,KAAP,CAAapC,QAAQ,CAACmC,MAAtB,EAA8BE,SAAnD"}
@@ -37,7 +37,7 @@ const Input = /*#__PURE__*/(0, _react.forwardRef)(({
37
37
  label,
38
38
  theme,
39
39
  ...rest
40
- }, ref) => /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
40
+ }, ref) => /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
41
41
  className: theme.container,
42
42
  children: [label === undefined ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
43
43
  className: theme.label,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["Input","forwardRef","label","theme","rest","ref","container","undefined","input","ThemedInput","themed","defaultTheme","propTypes","PT","string","themeType","isRequired","defaultProps"],"sources":["../../../../../src/shared/components/Input/index.jsx"],"sourcesContent":["import PT from 'prop-types';\nimport { forwardRef } from 'react';\n\nimport { themed } from 'utils';\n\nimport defaultTheme from './theme.scss';\n\n/**\n * Themeable input field, based on the standard HTML `<input>` element.\n * @param {object} [props]\n * @param {string} [props.label] Input label.\n * @param {InputTheme} [props.theme] _Ad hoc_ theme.\n * @param {...any} [props...] [Other theming properties](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties)\n * @param {...any} [props...] Any other properties are passed to the underlying\n * `<input>` element.\n */\nconst Input = forwardRef(({\n label,\n theme,\n ...rest\n}, ref) => (\n <div className={theme.container}>\n { label === undefined ? null : <p className={theme.label}>{label}</p> }\n <input\n className={theme.input}\n ref={ref}\n {...rest} // eslint-disable-line react/jsx-props-no-spreading\n />\n </div>\n));\n\nconst ThemedInput = themed('Input', [\n 'container',\n 'input',\n 'label',\n], defaultTheme)(Input);\n\nInput.propTypes = {\n label: PT.string,\n theme: ThemedInput.themeType.isRequired,\n};\n\nInput.defaultProps = {\n label: undefined,\n};\n\nexport default ThemedInput;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEA;;;;;;;;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,MAAMA,KAAK,gBAAG,IAAAC,iBAAA,EAAW,CAAC;EACxBC,KADwB;EAExBC,KAFwB;EAGxB,GAAGC;AAHqB,CAAD,EAItBC,GAJsB,kBAKvB;EAAK,SAAS,EAAEF,KAAK,CAACG,SAAtB;EAAA,WACIJ,KAAK,KAAKK,SAAV,GAAsB,IAAtB,gBAA6B;IAAG,SAAS,EAAEJ,KAAK,CAACD,KAApB;IAAA,UAA4BA;EAA5B,EADjC,eAEE;IACE,SAAS,EAAEC,KAAK,CAACK,KADnB;IAEE,GAAG,EAAEH,GAFP;IAAA,GAGMD;EAHN,EAFF;AAAA,EALY,CAAd;AAeA,MAAMK,WAAW,GAAG,IAAAC,aAAA,EAAO,OAAP,EAAgB,CAClC,WADkC,EAElC,OAFkC,EAGlC,OAHkC,CAAhB,EAIjBC,YAJiB,EAIHX,KAJG,CAApB;AAMAA,KAAK,CAACY,SAAN,GAAkB;EAChBV,KAAK,EAAEW,kBAAA,CAAGC,MADM;EAEhBX,KAAK,EAAEM,WAAW,CAACM,SAAZ,CAAsBC;AAFb,CAAlB;AAKAhB,KAAK,CAACiB,YAAN,GAAqB;EACnBf,KAAK,EAAEK;AADY,CAArB;eAIeE,W"}
1
+ {"version":3,"file":"index.js","names":["Input","forwardRef","label","theme","rest","ref","container","undefined","input","ThemedInput","themed","defaultTheme","propTypes","PT","string","themeType","isRequired","defaultProps"],"sources":["../../../../../src/shared/components/Input/index.jsx"],"sourcesContent":["import PT from 'prop-types';\nimport { forwardRef } from 'react';\n\nimport { themed } from 'utils';\n\nimport defaultTheme from './theme.scss';\n\n/**\n * Themeable input field, based on the standard HTML `<input>` element.\n * @param {object} [props]\n * @param {string} [props.label] Input label.\n * @param {InputTheme} [props.theme] _Ad hoc_ theme.\n * @param {...any} [props...] [Other theming properties](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties)\n * @param {...any} [props...] Any other properties are passed to the underlying\n * `<input>` element.\n */\nconst Input = forwardRef(({\n label,\n theme,\n ...rest\n}, ref) => (\n <span className={theme.container}>\n { label === undefined ? null : <p className={theme.label}>{label}</p> }\n <input\n className={theme.input}\n ref={ref}\n {...rest} // eslint-disable-line react/jsx-props-no-spreading\n />\n </span>\n));\n\nconst ThemedInput = themed('Input', [\n 'container',\n 'input',\n 'label',\n], defaultTheme)(Input);\n\nInput.propTypes = {\n label: PT.string,\n theme: ThemedInput.themeType.isRequired,\n};\n\nInput.defaultProps = {\n label: undefined,\n};\n\nexport default ThemedInput;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEA;;;;;;;;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,MAAMA,KAAK,gBAAG,IAAAC,iBAAA,EAAW,CAAC;EACxBC,KADwB;EAExBC,KAFwB;EAGxB,GAAGC;AAHqB,CAAD,EAItBC,GAJsB,kBAKvB;EAAM,SAAS,EAAEF,KAAK,CAACG,SAAvB;EAAA,WACIJ,KAAK,KAAKK,SAAV,GAAsB,IAAtB,gBAA6B;IAAG,SAAS,EAAEJ,KAAK,CAACD,KAApB;IAAA,UAA4BA;EAA5B,EADjC,eAEE;IACE,SAAS,EAAEC,KAAK,CAACK,KADnB;IAEE,GAAG,EAAEH,GAFP;IAAA,GAGMD;EAHN,EAFF;AAAA,EALY,CAAd;AAeA,MAAMK,WAAW,GAAG,IAAAC,aAAA,EAAO,OAAP,EAAgB,CAClC,WADkC,EAElC,OAFkC,EAGlC,OAHkC,CAAhB,EAIjBC,YAJiB,EAIHX,KAJG,CAApB;AAMAA,KAAK,CAACY,SAAN,GAAkB;EAChBV,KAAK,EAAEW,kBAAA,CAAGC,MADM;EAEhBX,KAAK,EAAEM,WAAW,CAACM,SAAZ,CAAsBC;AAFb,CAAlB;AAKAhB,KAAK,CAACiB,YAAN,GAAqB;EACnBf,KAAK,EAAEK;AADY,CAArB;eAIeE,W"}
@@ -34,13 +34,13 @@ const defaultTheme = {
34
34
  function Throbber({
35
35
  theme
36
36
  }) {
37
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
37
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
38
38
  className: (theme.container ? theme.container + " " : "") + "-dr-pogodin-react-utils___src-shared-components-Throbber-theme___container___7zdld4",
39
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
39
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
40
40
  className: (theme.circle ? theme.circle + " " : "") + "-dr-pogodin-react-utils___src-shared-components-Throbber-theme___circle___dBrB4g"
41
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
41
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
42
42
  className: (theme.circle ? theme.circle + " " : "") + "-dr-pogodin-react-utils___src-shared-components-Throbber-theme___circle___dBrB4g"
43
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
43
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
44
44
  className: (theme.circle ? theme.circle + " " : "") + "-dr-pogodin-react-utils___src-shared-components-Throbber-theme___circle___dBrB4g"
45
45
  })]
46
46
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["Throbber","theme","container","circle","defaultProps","propTypes","PT","shape","string","themed","defaultTheme"],"sources":["../../../../../src/shared/components/Throbber/index.jsx"],"sourcesContent":["import PT from 'prop-types';\nimport themed from '@dr.pogodin/react-themes';\n\nimport defaultTheme from './theme.scss';\n\n/**\n * Throbber is an \"action in progress\" indicator, which renders\n * three bouncing circles as a simple pending activity indicator,\n * and can be further themed to a certain degree.\n * @param {object} [props] Component properties.\n * @param {ThrobberTheme} [props.theme] _Ad hoc_ theme.\n * @param {...any} [props....]\n * [Other theming properties](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties)\n */\nfunction Throbber({\n theme,\n}) {\n return (\n <div className={theme.container} styleName=\"container\">\n <div className={theme.circle} styleName=\"circle\" />\n <div className={theme.circle} styleName=\"circle\" />\n <div className={theme.circle} styleName=\"circle\" />\n </div>\n );\n}\n\nThrobber.defaultProps = {\n theme: {},\n};\n\nThrobber.propTypes = {\n theme: PT.shape({\n container: PT.string,\n circle: PT.string,\n }),\n};\n\nexport default themed('Throbber', [\n 'circle',\n 'container',\n], defaultTheme)(Throbber);\n"],"mappings":";;;;;;;;;AAAA;;AACA;;;;;;;;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASA,QAAT,CAAkB;EAChBC;AADgB,CAAlB,EAEG;EACD,oBACE;IAAK,SAAS,GAAEA,KAAK,CAACC,SAAR,GAAED,KAAK,CAACC,SAAR,oGAAd;IAAA,wBACE;MAAK,SAAS,GAAED,KAAK,CAACE,MAAR,GAAEF,KAAK,CAACE,MAAR;IAAd,EADF,eAEE;MAAK,SAAS,GAAEF,KAAK,CAACE,MAAR,GAAEF,KAAK,CAACE,MAAR;IAAd,EAFF,eAGE;MAAK,SAAS,GAAEF,KAAK,CAACE,MAAR,GAAEF,KAAK,CAACE,MAAR;IAAd,EAHF;EAAA,EADF;AAOD;;AAEDH,QAAQ,CAACI,YAAT,GAAwB;EACtBH,KAAK,EAAE;AADe,CAAxB;AAIAD,QAAQ,CAACK,SAAT,GAAqB;EACnBJ,KAAK,EAAEK,kBAAA,CAAGC,KAAH,CAAS;IACdL,SAAS,EAAEI,kBAAA,CAAGE,MADA;IAEdL,MAAM,EAAEG,kBAAA,CAAGE;EAFG,CAAT;AADY,CAArB;;eAOe,IAAAC,oBAAA,EAAO,UAAP,EAAmB,CAChC,QADgC,EAEhC,WAFgC,CAAnB,EAGZC,YAHY,EAGEV,QAHF,C"}
1
+ {"version":3,"file":"index.js","names":["Throbber","theme","container","circle","defaultProps","propTypes","PT","shape","string","themed","defaultTheme"],"sources":["../../../../../src/shared/components/Throbber/index.jsx"],"sourcesContent":["import PT from 'prop-types';\nimport themed from '@dr.pogodin/react-themes';\n\nimport defaultTheme from './theme.scss';\n\n/**\n * Throbber is an \"action in progress\" indicator, which renders\n * three bouncing circles as a simple pending activity indicator,\n * and can be further themed to a certain degree.\n * @param {object} [props] Component properties.\n * @param {ThrobberTheme} [props.theme] _Ad hoc_ theme.\n * @param {...any} [props....]\n * [Other theming properties](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties)\n */\nfunction Throbber({\n theme,\n}) {\n return (\n <span className={theme.container} styleName=\"container\">\n <span className={theme.circle} styleName=\"circle\" />\n <span className={theme.circle} styleName=\"circle\" />\n <span className={theme.circle} styleName=\"circle\" />\n </span>\n );\n}\n\nThrobber.defaultProps = {\n theme: {},\n};\n\nThrobber.propTypes = {\n theme: PT.shape({\n container: PT.string,\n circle: PT.string,\n }),\n};\n\nexport default themed('Throbber', [\n 'circle',\n 'container',\n], defaultTheme)(Throbber);\n"],"mappings":";;;;;;;;;AAAA;;AACA;;;;;;;;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASA,QAAT,CAAkB;EAChBC;AADgB,CAAlB,EAEG;EACD,oBACE;IAAM,SAAS,GAAEA,KAAK,CAACC,SAAR,GAAED,KAAK,CAACC,SAAR,oGAAf;IAAA,wBACE;MAAM,SAAS,GAAED,KAAK,CAACE,MAAR,GAAEF,KAAK,CAACE,MAAR;IAAf,EADF,eAEE;MAAM,SAAS,GAAEF,KAAK,CAACE,MAAR,GAAEF,KAAK,CAACE,MAAR;IAAf,EAFF,eAGE;MAAM,SAAS,GAAEF,KAAK,CAACE,MAAR,GAAEF,KAAK,CAACE,MAAR;IAAf,EAHF;EAAA,EADF;AAOD;;AAEDH,QAAQ,CAACI,YAAT,GAAwB;EACtBH,KAAK,EAAE;AADe,CAAxB;AAIAD,QAAQ,CAACK,SAAT,GAAqB;EACnBJ,KAAK,EAAEK,kBAAA,CAAGC,KAAH,CAAS;IACdL,SAAS,EAAEI,kBAAA,CAAGE,MADA;IAEdL,MAAM,EAAEG,kBAAA,CAAGE;EAFG,CAAT;AADY,CAArB;;eAOe,IAAAC,oBAAA,EAAO,UAAP,EAAmB,CAChC,QADgC,EAEhC,WAFgC,CAAnB,EAGZC,YAHY,EAGEV,QAHF,C"}
@@ -10,6 +10,8 @@ exports.timer = timer;
10
10
 
11
11
  var _dayjs = _interopRequireDefault(require("dayjs"));
12
12
 
13
+ var _lodash = require("lodash");
14
+
13
15
  var _Barrier = require("./Barrier");
14
16
 
15
17
  /**
@@ -83,9 +85,15 @@ _dayjs.default.now = Date.now;
83
85
 
84
86
  async function timer(timeout) {
85
87
  const res = new _Barrier.Barrier();
86
- const id = setTimeout(res.resolve.bind(res), timeout);
87
88
 
88
- res.abort = () => clearTimeout(id);
89
+ if (timeout > 0) {
90
+ const id = setTimeout(res.resolve.bind(res), timeout);
91
+
92
+ res.abort = () => clearTimeout(id);
93
+ } else {
94
+ res.abort = _lodash.noop;
95
+ res.resolve();
96
+ }
89
97
 
90
98
  return res;
91
99
  }
@@ -1 +1 @@
1
- {"version":3,"file":"time.js","names":["dayjs","SEC_MS","MIN_MS","HOUR_MS","DAY_MS","YEAR_MS","now","Date","timer","timeout","res","Barrier","id","setTimeout","resolve","bind","abort","clearTimeout"],"sources":["../../../../src/shared/utils/time.js"],"sourcesContent":["import dayjs from 'dayjs';\nimport { Barrier } from './Barrier';\n\n/**\n * @static\n * @const SEC_MS\n * @desc One second, expressed in milliseconds (equals 1000 ms).\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.SEC_MS); // Prints: 1000\n */\ndayjs.SEC_MS = 1000;\n\n/**\n * @static\n * @const MIN_MS\n * @desc One minute, expressed in milliseconds (equals 60 &times; `SEC_MS`).\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.MIN_MS); // Prints: 60000\n */\ndayjs.MIN_MS = 60 * dayjs.SEC_MS;\n\n/**\n * @static\n * @const HOUR_MS\n * @desc One hour, expressed in milliseconds (equals 60 &times; `MIN_MS`).\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.HOUR_MS); // Prints: 3600000\n */\ndayjs.HOUR_MS = 60 * dayjs.MIN_MS;\n\n/**\n * @static\n * @const DAY_MS\n * @desc One day, expressed in milliseconds (equals 24 &times; `HOUR_MS`).\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.DAY_MS); // Prints: 86400000\n */\ndayjs.DAY_MS = 24 * dayjs.HOUR_MS;\n\n/**\n * @static\n * @const YEAR_MS\n * @desc One year, expressed in milliseconds (equals 365 &times; `DAY_MS`,\n * thus a normal, non-leap year).\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.YEAR_MS); // Prints: 31536000000\n */\ndayjs.YEAR_MS = 365 * dayjs.DAY_MS;\n\n/**\n * @static\n * @func now\n * @desc Returns Unix timestamp [ms] (thus, it is just an alias for `Date.now`).\n * @return {number}\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.now()); // Prints the current timestamp, e.g. 1618608761000.\n */\ndayjs.now = Date.now;\n\n/**\n * Creates a Promise, which resolves after the given timeout.\n * @param {number} timeout Timeout [ms].\n * @return {Barrier} Resolves after the timeout. It has additional\n * .abort() method attached, which cancels the pending timer resolution\n * (without resolving or rejecting the barrier).\n */\nexport async function timer(timeout) {\n const res = new Barrier();\n const id = setTimeout(res.resolve.bind(res), timeout);\n res.abort = () => clearTimeout(id);\n return res;\n}\n\ndayjs.timer = timer;\n\nexport default dayjs;\n"],"mappings":";;;;;;;;;;AAAA;;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACAA,cAAA,CAAMC,MAAN,GAAe,IAAf;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACAD,cAAA,CAAME,MAAN,GAAe,KAAKF,cAAA,CAAMC,MAA1B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACAD,cAAA,CAAMG,OAAN,GAAgB,KAAKH,cAAA,CAAME,MAA3B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACAF,cAAA,CAAMI,MAAN,GAAe,KAAKJ,cAAA,CAAMG,OAA1B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACAH,cAAA,CAAMK,OAAN,GAAgB,MAAML,cAAA,CAAMI,MAA5B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACAJ,cAAA,CAAMM,GAAN,GAAYC,IAAI,CAACD,GAAjB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACO,eAAeE,KAAf,CAAqBC,OAArB,EAA8B;EACnC,MAAMC,GAAG,GAAG,IAAIC,gBAAJ,EAAZ;EACA,MAAMC,EAAE,GAAGC,UAAU,CAACH,GAAG,CAACI,OAAJ,CAAYC,IAAZ,CAAiBL,GAAjB,CAAD,EAAwBD,OAAxB,CAArB;;EACAC,GAAG,CAACM,KAAJ,GAAY,MAAMC,YAAY,CAACL,EAAD,CAA9B;;EACA,OAAOF,GAAP;AACD;;AAEDV,cAAA,CAAMQ,KAAN,GAAcA,KAAd;eAEeR,c"}
1
+ {"version":3,"file":"time.js","names":["dayjs","SEC_MS","MIN_MS","HOUR_MS","DAY_MS","YEAR_MS","now","Date","timer","timeout","res","Barrier","id","setTimeout","resolve","bind","abort","clearTimeout","noop"],"sources":["../../../../src/shared/utils/time.js"],"sourcesContent":["import dayjs from 'dayjs';\nimport { noop } from 'lodash';\n\nimport { Barrier } from './Barrier';\n\n/**\n * @static\n * @const SEC_MS\n * @desc One second, expressed in milliseconds (equals 1000 ms).\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.SEC_MS); // Prints: 1000\n */\ndayjs.SEC_MS = 1000;\n\n/**\n * @static\n * @const MIN_MS\n * @desc One minute, expressed in milliseconds (equals 60 &times; `SEC_MS`).\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.MIN_MS); // Prints: 60000\n */\ndayjs.MIN_MS = 60 * dayjs.SEC_MS;\n\n/**\n * @static\n * @const HOUR_MS\n * @desc One hour, expressed in milliseconds (equals 60 &times; `MIN_MS`).\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.HOUR_MS); // Prints: 3600000\n */\ndayjs.HOUR_MS = 60 * dayjs.MIN_MS;\n\n/**\n * @static\n * @const DAY_MS\n * @desc One day, expressed in milliseconds (equals 24 &times; `HOUR_MS`).\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.DAY_MS); // Prints: 86400000\n */\ndayjs.DAY_MS = 24 * dayjs.HOUR_MS;\n\n/**\n * @static\n * @const YEAR_MS\n * @desc One year, expressed in milliseconds (equals 365 &times; `DAY_MS`,\n * thus a normal, non-leap year).\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.YEAR_MS); // Prints: 31536000000\n */\ndayjs.YEAR_MS = 365 * dayjs.DAY_MS;\n\n/**\n * @static\n * @func now\n * @desc Returns Unix timestamp [ms] (thus, it is just an alias for `Date.now`).\n * @return {number}\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.now()); // Prints the current timestamp, e.g. 1618608761000.\n */\ndayjs.now = Date.now;\n\n/**\n * Creates a Promise, which resolves after the given timeout.\n * @param {number} timeout Timeout [ms].\n * @return {Barrier} Resolves after the timeout. It has additional\n * .abort() method attached, which cancels the pending timer resolution\n * (without resolving or rejecting the barrier).\n */\nexport async function timer(timeout) {\n const res = new Barrier();\n if (timeout > 0) {\n const id = setTimeout(res.resolve.bind(res), timeout);\n res.abort = () => clearTimeout(id);\n } else {\n res.abort = noop;\n res.resolve();\n }\n return res;\n}\n\ndayjs.timer = timer;\n\nexport default dayjs;\n"],"mappings":";;;;;;;;;;AAAA;;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACAA,cAAA,CAAMC,MAAN,GAAe,IAAf;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACAD,cAAA,CAAME,MAAN,GAAe,KAAKF,cAAA,CAAMC,MAA1B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACAD,cAAA,CAAMG,OAAN,GAAgB,KAAKH,cAAA,CAAME,MAA3B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACAF,cAAA,CAAMI,MAAN,GAAe,KAAKJ,cAAA,CAAMG,OAA1B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACAH,cAAA,CAAMK,OAAN,GAAgB,MAAML,cAAA,CAAMI,MAA5B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACAJ,cAAA,CAAMM,GAAN,GAAYC,IAAI,CAACD,GAAjB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACO,eAAeE,KAAf,CAAqBC,OAArB,EAA8B;EACnC,MAAMC,GAAG,GAAG,IAAIC,gBAAJ,EAAZ;;EACA,IAAIF,OAAO,GAAG,CAAd,EAAiB;IACf,MAAMG,EAAE,GAAGC,UAAU,CAACH,GAAG,CAACI,OAAJ,CAAYC,IAAZ,CAAiBL,GAAjB,CAAD,EAAwBD,OAAxB,CAArB;;IACAC,GAAG,CAACM,KAAJ,GAAY,MAAMC,YAAY,CAACL,EAAD,CAA9B;EACD,CAHD,MAGO;IACLF,GAAG,CAACM,KAAJ,GAAYE,YAAZ;IACAR,GAAG,CAACI,OAAJ;EACD;;EACD,OAAOJ,GAAP;AACD;;AAEDV,cAAA,CAAMQ,KAAN,GAAcA,KAAd;eAEeR,c"}
@@ -369,7 +369,6 @@ body {
369
369
  *.-dr-pogodin-react-utils___src-shared-components-PageLayout-base-theme___container___T3cuHB,
370
370
  .-dr-pogodin-react-utils___src-shared-components-PageLayout-base-theme___context___m4mL-M.-dr-pogodin-react-utils___src-shared-components-PageLayout-base-theme___container___T3cuHB,
371
371
  .-dr-pogodin-react-utils___src-shared-components-PageLayout-base-theme___ad___m3-mdC.-dr-pogodin-react-utils___src-shared-components-PageLayout-base-theme___hoc___J15Z4H.-dr-pogodin-react-utils___src-shared-components-PageLayout-base-theme___container___T3cuHB {
372
- align-items: stretch;
373
372
  display: flex;
374
373
  min-height: 100vh;
375
374
  overflow: hidden;
@@ -385,8 +384,8 @@ body {
385
384
  *.-dr-pogodin-react-utils___src-shared-components-PageLayout-base-theme___sidePanel___lqNh4h,
386
385
  .-dr-pogodin-react-utils___src-shared-components-PageLayout-base-theme___context___m4mL-M.-dr-pogodin-react-utils___src-shared-components-PageLayout-base-theme___sidePanel___lqNh4h,
387
386
  .-dr-pogodin-react-utils___src-shared-components-PageLayout-base-theme___ad___m3-mdC.-dr-pogodin-react-utils___src-shared-components-PageLayout-base-theme___hoc___J15Z4H.-dr-pogodin-react-utils___src-shared-components-PageLayout-base-theme___sidePanel___lqNh4h {
387
+ flex: 1;
388
388
  overflow: hidden;
389
- width: calc((100% - 1024px) / 2);
390
389
  }
391
390
  /*!***************************************************************************************************************************************************************************************************************************************************************************************************************!*\
392
391
  !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[4]!./src/shared/components/Modal/base-theme.scss ***!
@@ -46,7 +46,7 @@ eval("var __dirname = \"/\";\n__webpack_require__.r(__webpack_exports__);\n/* ha
46
46
  \************************************************/
47
47
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
48
48
 
49
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ \"prop-types\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Link__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Link */ \"./src/shared/components/Link.jsx\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils */ \"./src/shared/utils/index.js\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./style.scss */ \"./src/shared/components/Button/style.scss\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n// The <Button> component implements a standard button / button-like link.\n\n\n\n\n\n\nfunction BaseButton(_ref) {\n let {\n active,\n children,\n disabled,\n enforceA,\n onClick,\n onMouseDown,\n openNewTab,\n replace,\n theme,\n to\n } = _ref;\n let className = theme.button;\n if (active && theme.active) className += \" \".concat(theme.active);\n\n if (disabled) {\n if (theme.disabled) className += \" \".concat(theme.disabled);\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"div\", {\n className: className,\n children: children\n });\n }\n\n if (to) {\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_Link__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n className: className,\n enforceA: enforceA,\n onClick: onClick,\n onMouseDown: onMouseDown,\n openNewTab: openNewTab,\n replace: replace,\n to: to,\n children: children\n });\n }\n\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"div\", {\n className: className,\n onClick: onClick,\n onKeyPress: onClick,\n onMouseDown: onMouseDown,\n role: \"button\",\n tabIndex: 0,\n children: children\n });\n}\n/**\n * Button component theme: a map of CSS\n * class names to append to button elements:\n * @prop {string} [active] to the root element of active button.\n * @prop {string} [button] to the root element of any button.\n * @prop {string} [disabled] to the root element of disabled button.\n */\n\n\nconst ThemedButton = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.themed)('Button', ['active', 'button', 'disabled'], _style_scss__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(BaseButton);\n/**\n * Implements themeable buttons, and button-line links (elements which look\n * like buttons, but behave as links) in the same uniform manner.\n * @param {object} [props] Component props.\n * @param {boolean} [props.active] Set `true` to render the button as\n * active, even if it is not active otherwise.\n * @param {boolean} [props.disabled] Set `true` to disable the button.\n * @param {boolean} [props.enforceA] When the button is rendered as `<Link>`\n * component, this prop enforces it to be rendered as a simple `<a>` element\n * (external link), rather than the React router's internal link.\n * See `<Link>` documentation to learn when links are rendered as `<a>`\n * by default.\n * @param {function} [props.onClick] Click event handler.\n * @param {function} [props.onMouseDown] Mouse down event handler.\n * @param {boolean} [props.openNewTab] Set `true` to open link in the new tab.\n * @param {boolean} [props.replace] When the button is rendered as\n * `<Link>`, and the target URL is internal, this property tells that\n * the new route should replace the last record in the browser's history,\n * rather than to be pushed as a new entry into the history stack.\n * @param {ButtonTheme} [props.theme] _Ad hoc_ button theme.\n * @param {object|string} [props.to] If specified, the button will be rendered\n * as `<Link>` (if not disabled), and it will point to the specified location\n * or URL.\n * @param {...any} [props....]\n * [Other properties of themeable components](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties)\n */\n\nBaseButton.defaultProps = {\n active: false,\n children: undefined,\n disabled: false,\n enforceA: false,\n onClick: undefined,\n onMouseDown: undefined,\n openNewTab: false,\n replace: false,\n to: undefined\n};\nBaseButton.propTypes = {\n active: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),\n children: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),\n disabled: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),\n enforceA: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),\n onClick: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),\n onMouseDown: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),\n openNewTab: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),\n replace: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),\n theme: ThemedButton.themeType.isRequired,\n to: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().object), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)])\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (ThemedButton);\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/components/Button/index.jsx?");
49
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ \"prop-types\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Link__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Link */ \"./src/shared/components/Link.jsx\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils */ \"./src/shared/utils/index.js\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./style.scss */ \"./src/shared/components/Button/style.scss\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n// The <Button> component implements a standard button / button-like link.\n\n\n\n\n\n\nfunction BaseButton(_ref) {\n let {\n active,\n children,\n disabled,\n enforceA,\n onClick,\n onMouseDown,\n openNewTab,\n replace,\n theme,\n to\n } = _ref;\n let className = theme.button;\n if (active && theme.active) className += ` ${theme.active}`;\n\n if (disabled) {\n if (theme.disabled) className += ` ${theme.disabled}`;\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"div\", {\n className: className,\n children: children\n });\n }\n\n if (to) {\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_Link__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n className: className,\n enforceA: enforceA,\n onClick: onClick,\n onMouseDown: onMouseDown,\n openNewTab: openNewTab,\n replace: replace,\n to: to,\n children: children\n });\n }\n\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"div\", {\n className: className,\n onClick: onClick,\n onKeyPress: onClick,\n onMouseDown: onMouseDown,\n role: \"button\",\n tabIndex: 0,\n children: children\n });\n}\n/**\n * Button component theme: a map of CSS\n * class names to append to button elements:\n * @prop {string} [active] to the root element of active button.\n * @prop {string} [button] to the root element of any button.\n * @prop {string} [disabled] to the root element of disabled button.\n */\n\n\nconst ThemedButton = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.themed)('Button', ['active', 'button', 'disabled'], _style_scss__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(BaseButton);\n/**\n * Implements themeable buttons, and button-line links (elements which look\n * like buttons, but behave as links) in the same uniform manner.\n * @param {object} [props] Component props.\n * @param {boolean} [props.active] Set `true` to render the button as\n * active, even if it is not active otherwise.\n * @param {boolean} [props.disabled] Set `true` to disable the button.\n * @param {boolean} [props.enforceA] When the button is rendered as `<Link>`\n * component, this prop enforces it to be rendered as a simple `<a>` element\n * (external link), rather than the React router's internal link.\n * See `<Link>` documentation to learn when links are rendered as `<a>`\n * by default.\n * @param {function} [props.onClick] Click event handler.\n * @param {function} [props.onMouseDown] Mouse down event handler.\n * @param {boolean} [props.openNewTab] Set `true` to open link in the new tab.\n * @param {boolean} [props.replace] When the button is rendered as\n * `<Link>`, and the target URL is internal, this property tells that\n * the new route should replace the last record in the browser's history,\n * rather than to be pushed as a new entry into the history stack.\n * @param {ButtonTheme} [props.theme] _Ad hoc_ button theme.\n * @param {object|string} [props.to] If specified, the button will be rendered\n * as `<Link>` (if not disabled), and it will point to the specified location\n * or URL.\n * @param {...any} [props....]\n * [Other properties of themeable components](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties)\n */\n\nBaseButton.defaultProps = {\n active: false,\n children: undefined,\n disabled: false,\n enforceA: false,\n onClick: undefined,\n onMouseDown: undefined,\n openNewTab: false,\n replace: false,\n to: undefined\n};\nBaseButton.propTypes = {\n active: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),\n children: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),\n disabled: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),\n enforceA: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),\n onClick: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),\n onMouseDown: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),\n openNewTab: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),\n replace: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),\n theme: ThemedButton.themeType.isRequired,\n to: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().object), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)])\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (ThemedButton);\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/components/Button/index.jsx?");
50
50
 
51
51
  /***/ }),
52
52
 
@@ -66,7 +66,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var prop
66
66
  \***************************************************/
67
67
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
68
68
 
69
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ CodeSplit; }\n/* harmony export */ });\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ \"prop-types\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @dr.pogodin/react-global-state */ \"@dr.pogodin/react-global-state\");\n/* harmony import */ var _dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _utils_Barrier__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/Barrier */ \"./src/shared/utils/Barrier.js\");\n/* harmony import */ var _utils_isomorphy__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/isomorphy */ \"./src/shared/utils/isomorphy.js\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* eslint-disable react/jsx-props-no-spreading */\n\n/* global document, window */\n\n\n\n\n\n\nfunction CodeSplit(_ref) {\n let {\n children,\n chunkName,\n getComponent,\n placeholder,\n ...props\n } = _ref;\n const {\n current: heap\n } = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)({\n mounted: false,\n pendingStyles: []\n });\n const {\n publicPath\n } = (0,_utils_isomorphy__WEBPACK_IMPORTED_MODULE_4__.getBuildInfo)(); // TODO: Not sure whether it is fine for the inner React.lazy() mechanics\n // if we dynamically create the lazy component inside a render of another\n // component, or does it expect we only create it once on outside of any\n // component.\n\n const LazyComponent = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.lazy)(async () => {\n const res = await getComponent();\n if (heap.pendingStyles.length) await Promise.all(heap.pendingStyles);\n return res.default ? res : {\n default: res\n };\n });\n\n if (_utils_isomorphy__WEBPACK_IMPORTED_MODULE_4__.IS_SERVER_SIDE) {\n const {\n chunks\n } = (0,_dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_2__.getGlobalState)().ssrContext;\n\n if (chunks.includes(chunkName)) {\n throw Error(\"Chunk name clash for \\\"\".concat(chunkName, \"\\\"\"));\n } else chunks.push(chunkName);\n } else if (!heap.mounted) {\n heap.mounted = true;\n window.CHUNK_GROUPS[chunkName].forEach(asset => {\n var _window, _window$STYLESHEET_US;\n\n if (!asset.endsWith('.css')) return;\n const path = \"\".concat(publicPath, \"/\").concat(asset);\n let link = document.querySelector(\"link[href=\\\"\".concat(path, \"\\\"]\"));\n\n if (!link) {\n link = document.createElement('link');\n link.setAttribute('href', path);\n link.setAttribute('rel', 'stylesheet');\n const barrier = (0,_utils_Barrier__WEBPACK_IMPORTED_MODULE_3__.newBarrier)();\n link.onload = barrier.resolve; // Even if the style load failed, still allow to mount the component,\n // abeit with broken styling.\n\n link.onerror = barrier.resolve;\n heap.pendingStyles.push(barrier);\n const head = document.querySelector('head');\n head.appendChild(link);\n }\n\n (_window = window).STYLESHEET_USAGE_COUNTERS || (_window.STYLESHEET_USAGE_COUNTERS = {});\n (_window$STYLESHEET_US = window.STYLESHEET_USAGE_COUNTERS)[path] || (_window$STYLESHEET_US[path] = 0);\n ++window.STYLESHEET_USAGE_COUNTERS[path];\n });\n } // This effectively fires only once, just before the component unmounts.\n\n\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => () => {\n heap.mounted = false;\n window.CHUNK_GROUPS[chunkName].forEach(item => {\n if (!item.endsWith('.css')) return;\n const path = \"\".concat(publicPath, \"/\").concat(item);\n\n if (--window.STYLESHEET_USAGE_COUNTERS[path] <= 0) {\n const link = document.querySelector(\"link[href=\\\"\".concat(path, \"\\\"]\"));\n const head = document.querySelector('head');\n head.removeChild(link);\n }\n });\n }, [chunkName, heap, publicPath]);\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Suspense, {\n fallback: placeholder,\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(LazyComponent, { ...props,\n children: children\n })\n });\n}\nCodeSplit.propTypes = {\n children: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),\n chunkName: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string.isRequired),\n getComponent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func.isRequired),\n placeholder: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node)\n};\nCodeSplit.defaultProps = {\n children: undefined,\n placeholder: undefined\n};\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/components/CodeSplit/index.jsx?");
69
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ CodeSplit; }\n/* harmony export */ });\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ \"prop-types\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @dr.pogodin/react-global-state */ \"@dr.pogodin/react-global-state\");\n/* harmony import */ var _dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _utils_Barrier__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/Barrier */ \"./src/shared/utils/Barrier.js\");\n/* harmony import */ var _utils_isomorphy__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/isomorphy */ \"./src/shared/utils/isomorphy.js\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* eslint-disable react/jsx-props-no-spreading */\n\n/* global document, window */\n\n\n\n\n\n\nfunction CodeSplit(_ref) {\n let {\n children,\n chunkName,\n getComponent,\n placeholder,\n ...props\n } = _ref;\n const {\n current: heap\n } = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)({\n mounted: false,\n pendingStyles: []\n });\n const {\n publicPath\n } = (0,_utils_isomorphy__WEBPACK_IMPORTED_MODULE_4__.getBuildInfo)(); // TODO: Not sure whether it is fine for the inner React.lazy() mechanics\n // if we dynamically create the lazy component inside a render of another\n // component, or does it expect we only create it once on outside of any\n // component.\n\n const LazyComponent = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.lazy)(async () => {\n const res = await getComponent();\n if (heap.pendingStyles.length) await Promise.all(heap.pendingStyles);\n return res.default ? res : {\n default: res\n };\n });\n\n if (_utils_isomorphy__WEBPACK_IMPORTED_MODULE_4__.IS_SERVER_SIDE) {\n const {\n chunks\n } = (0,_dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_2__.getGlobalState)().ssrContext;\n\n if (chunks.includes(chunkName)) {\n throw Error(`Chunk name clash for \"${chunkName}\"`);\n } else chunks.push(chunkName);\n } else if (!heap.mounted) {\n heap.mounted = true;\n window.CHUNK_GROUPS[chunkName].forEach(asset => {\n if (!asset.endsWith('.css')) return;\n const path = `${publicPath}/${asset}`;\n let link = document.querySelector(`link[href=\"${path}\"]`);\n\n if (!link) {\n link = document.createElement('link');\n link.setAttribute('href', path);\n link.setAttribute('rel', 'stylesheet');\n const barrier = (0,_utils_Barrier__WEBPACK_IMPORTED_MODULE_3__.newBarrier)();\n link.onload = barrier.resolve; // Even if the style load failed, still allow to mount the component,\n // abeit with broken styling.\n\n link.onerror = barrier.resolve;\n heap.pendingStyles.push(barrier);\n const head = document.querySelector('head');\n head.appendChild(link);\n }\n\n window.STYLESHEET_USAGE_COUNTERS ||= {};\n window.STYLESHEET_USAGE_COUNTERS[path] ||= 0;\n ++window.STYLESHEET_USAGE_COUNTERS[path];\n });\n } // This effectively fires only once, just before the component unmounts.\n\n\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => () => {\n heap.mounted = false;\n window.CHUNK_GROUPS[chunkName].forEach(item => {\n if (!item.endsWith('.css')) return;\n const path = `${publicPath}/${item}`;\n\n if (--window.STYLESHEET_USAGE_COUNTERS[path] <= 0) {\n const link = document.querySelector(`link[href=\"${path}\"]`);\n const head = document.querySelector('head');\n head.removeChild(link);\n }\n });\n }, [chunkName, heap, publicPath]);\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Suspense, {\n fallback: placeholder,\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(LazyComponent, { ...props,\n children: children\n })\n });\n}\nCodeSplit.propTypes = {\n children: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),\n chunkName: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string.isRequired),\n getComponent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func.isRequired),\n placeholder: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node)\n};\nCodeSplit.defaultProps = {\n children: undefined,\n placeholder: undefined\n};\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/components/CodeSplit/index.jsx?");
70
70
 
71
71
  /***/ }),
72
72
 
@@ -96,7 +96,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
96
96
  \***********************************************/
97
97
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
98
98
 
99
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ \"prop-types\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils */ \"./src/shared/utils/index.js\");\n/* harmony import */ var _theme_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./theme.scss */ \"./src/shared/components/Input/theme.scss\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n\n\n\n\n/**\n * Themeable input field, based on the standard HTML `<input>` element.\n * @param {object} [props]\n * @param {string} [props.label] Input label.\n * @param {InputTheme} [props.theme] _Ad hoc_ theme.\n * @param {...any} [props...] [Other theming properties](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties)\n * @param {...any} [props...] Any other properties are passed to the underlying\n * `<input>` element.\n */\n\n\n\nconst Input = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((_ref, ref) => {\n let {\n label,\n theme,\n ...rest\n } = _ref;\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(\"div\", {\n className: theme.container,\n children: [label === undefined ? null : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"p\", {\n className: theme.label,\n children: label\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"input\", {\n className: theme.input,\n ref: ref,\n ...rest\n })]\n });\n});\nconst ThemedInput = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.themed)('Input', ['container', 'input', 'label'], _theme_scss__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(Input);\nInput.propTypes = {\n label: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),\n theme: ThemedInput.themeType.isRequired\n};\nInput.defaultProps = {\n label: undefined\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (ThemedInput);\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/components/Input/index.jsx?");
99
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ \"prop-types\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils */ \"./src/shared/utils/index.js\");\n/* harmony import */ var _theme_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./theme.scss */ \"./src/shared/components/Input/theme.scss\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n\n\n\n\n/**\n * Themeable input field, based on the standard HTML `<input>` element.\n * @param {object} [props]\n * @param {string} [props.label] Input label.\n * @param {InputTheme} [props.theme] _Ad hoc_ theme.\n * @param {...any} [props...] [Other theming properties](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties)\n * @param {...any} [props...] Any other properties are passed to the underlying\n * `<input>` element.\n */\n\n\n\nconst Input = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((_ref, ref) => {\n let {\n label,\n theme,\n ...rest\n } = _ref;\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(\"span\", {\n className: theme.container,\n children: [label === undefined ? null : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"p\", {\n className: theme.label,\n children: label\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"input\", {\n className: theme.input,\n ref: ref,\n ...rest\n })]\n });\n});\nconst ThemedInput = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.themed)('Input', ['container', 'input', 'label'], _theme_scss__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(Input);\nInput.propTypes = {\n label: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),\n theme: ThemedInput.themeType.isRequired\n};\nInput.defaultProps = {\n label: undefined\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (ThemedInput);\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/components/Input/index.jsx?");
100
100
 
101
101
  /***/ }),
102
102
 
@@ -116,7 +116,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
116
116
  \********************************************/
117
117
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
118
118
 
119
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ MetaTags; }\n/* harmony export */ });\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ \"prop-types\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var react_helmet__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-helmet */ \"react-helmet\");\n/* harmony import */ var react_helmet__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_helmet__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n\n\n\n\n\n\nconst Context = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.createContext)();\n/**\n * The `<MetaTags>` component is an auxiliary wrapper around `react-helmet`,\n * which helps to inject meta tags (page title, a brief content description,\n * and social media thumbnails) into generated pages.\n *\n * When `<MetaTags>` are nested within the app's component tree, meta tags\n * content injected by components encountered down the tree overrides tags\n * injected by previously encountered `<MetaTags>` components.\n *\n * **Children:** `<MetaTags>` children, if any, are rendered at the component's\n * location. The context passes down all meta tag properties of parent\n * `<MetaTag>` instances. These properties can fetched within children\n * hierarchy in the following way, thus facilitating tags modification by\n * children:\n * ```jsx\n * import { useContext } from 'react';\n * import { MetaTags } from '@dr.pogodin/react-utils';\n * export default function SampleComponent() {\n * const { title, description, ...rest } = useContext(MetaTags.Context);\n * // Do something with these props here, e.g. prefix the page title with\n * // the component name:\n * return (\n * <MetaTags title={`Sample component - ${title}`} />\n * );\n * }\n * ```\n * @param {object} [props]\n * @param {string} [props.description] Page description to use in\n * the `description` meta tag, and as a default description of Open Graph Tags.\n * @param {string} [props.image] The absolute URL of thumbnail image to use\n * in Open Graph Tags (`twitter:image`, and `og:image`). By default these tags\n * are not injected.\n *\n * **BEWARE:** It must be a complete, absolute URL, including the correct\n * website domain and HTTP schema.\n *\n * @param {string} [props.siteName]: The site name to use in `twitter:site`,\n * and `og:sitename` tags. By default these tags are not injected.\n *\n * @param {string} [props.socialDescription] The site description to use in\n * `twitter:description` and `og:description` meta tags. By default the value of\n * `description` prop is used.\n * @param {string} [props.socialTitle] The page title to use in\n * `twitter:title`, `og:title`, and `og:image:alt` tags. By default the value of\n * `title` prop is used. Also the `og:image:alt` tag is only injected if `image`\n * prop is present.\n *\n * @param {string} props.title: The page name to use in the `<title>` tag.\n * It is also used as the default value of `socialTitle` prop.\n *\n * @param {string} [props.url] The page URL to use in `og:url` tag.\n * By default the tag is not injected.\n */\n\nfunction MetaTags(_ref) {\n let {\n children,\n description,\n image,\n siteName,\n socialDescription,\n socialTitle,\n title,\n url\n } = _ref;\n const socTitle = socialTitle || title;\n const socDesc = socialDescription || description;\n const context = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(() => ({\n description,\n image,\n siteName,\n socialDescription,\n socialTitle,\n title,\n url\n }), [description, image, siteName, socialDescription, socialTitle, title, url]);\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.Fragment, {\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(react_helmet__WEBPACK_IMPORTED_MODULE_2__.Helmet, {\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"title\", {\n children: title\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"description\",\n content: description\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"twitter:card\",\n content: \"summary_large_image\"\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"twitter:title\",\n content: socTitle\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"twitter:description\",\n content: socDesc\n }), image ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"twitter:image\",\n content: image\n }) : null, siteName ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"twitter:site\",\n content: \"@\".concat(siteName)\n }) : null, /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"og:title\",\n content: socTitle\n }), image ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"og:image\",\n content: image\n }) : null, image ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"og:image:alt\",\n content: socTitle\n }) : null, /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"og:description\",\n content: socDesc\n }), siteName ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"og:sitename\",\n content: siteName\n }) : null, url ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"og:url\",\n content: url\n }) : null]\n }), children ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(Context.Provider, {\n value: context,\n children: children\n }) : null]\n });\n}\nMetaTags.Context = Context;\nMetaTags.defaultProps = {\n children: null,\n image: null,\n siteName: null,\n socialDescription: null,\n socialTitle: null,\n url: null\n};\nMetaTags.propTypes = {\n children: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),\n description: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string.isRequired),\n image: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),\n siteName: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),\n socialDescription: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),\n socialTitle: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),\n title: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string.isRequired),\n url: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)\n};\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/components/MetaTags.jsx?");
119
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ MetaTags; }\n/* harmony export */ });\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ \"prop-types\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var react_helmet__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-helmet */ \"react-helmet\");\n/* harmony import */ var react_helmet__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_helmet__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n\n\n\n\n\n\nconst Context = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.createContext)();\n/**\n * The `<MetaTags>` component is an auxiliary wrapper around `react-helmet`,\n * which helps to inject meta tags (page title, a brief content description,\n * and social media thumbnails) into generated pages.\n *\n * When `<MetaTags>` are nested within the app's component tree, meta tags\n * content injected by components encountered down the tree overrides tags\n * injected by previously encountered `<MetaTags>` components.\n *\n * **Children:** `<MetaTags>` children, if any, are rendered at the component's\n * location. The context passes down all meta tag properties of parent\n * `<MetaTag>` instances. These properties can fetched within children\n * hierarchy in the following way, thus facilitating tags modification by\n * children:\n * ```jsx\n * import { useContext } from 'react';\n * import { MetaTags } from '@dr.pogodin/react-utils';\n * export default function SampleComponent() {\n * const { title, description, ...rest } = useContext(MetaTags.Context);\n * // Do something with these props here, e.g. prefix the page title with\n * // the component name:\n * return (\n * <MetaTags title={`Sample component - ${title}`} />\n * );\n * }\n * ```\n * @param {object} [props]\n * @param {string} [props.description] Page description to use in\n * the `description` meta tag, and as a default description of Open Graph Tags.\n * @param {string} [props.image] The absolute URL of thumbnail image to use\n * in Open Graph Tags (`twitter:image`, and `og:image`). By default these tags\n * are not injected.\n *\n * **BEWARE:** It must be a complete, absolute URL, including the correct\n * website domain and HTTP schema.\n *\n * @param {string} [props.siteName]: The site name to use in `twitter:site`,\n * and `og:sitename` tags. By default these tags are not injected.\n *\n * @param {string} [props.socialDescription] The site description to use in\n * `twitter:description` and `og:description` meta tags. By default the value of\n * `description` prop is used.\n * @param {string} [props.socialTitle] The page title to use in\n * `twitter:title`, `og:title`, and `og:image:alt` tags. By default the value of\n * `title` prop is used. Also the `og:image:alt` tag is only injected if `image`\n * prop is present.\n *\n * @param {string} props.title: The page name to use in the `<title>` tag.\n * It is also used as the default value of `socialTitle` prop.\n *\n * @param {string} [props.url] The page URL to use in `og:url` tag.\n * By default the tag is not injected.\n */\n\nfunction MetaTags(_ref) {\n let {\n children,\n description,\n image,\n siteName,\n socialDescription,\n socialTitle,\n title,\n url\n } = _ref;\n const socTitle = socialTitle || title;\n const socDesc = socialDescription || description;\n const context = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(() => ({\n description,\n image,\n siteName,\n socialDescription,\n socialTitle,\n title,\n url\n }), [description, image, siteName, socialDescription, socialTitle, title, url]);\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.Fragment, {\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(react_helmet__WEBPACK_IMPORTED_MODULE_2__.Helmet, {\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"title\", {\n children: title\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"description\",\n content: description\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"twitter:card\",\n content: \"summary_large_image\"\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"twitter:title\",\n content: socTitle\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"twitter:description\",\n content: socDesc\n }), image ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"twitter:image\",\n content: image\n }) : null, siteName ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"twitter:site\",\n content: `@${siteName}`\n }) : null, /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"og:title\",\n content: socTitle\n }), image ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"og:image\",\n content: image\n }) : null, image ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"og:image:alt\",\n content: socTitle\n }) : null, /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"og:description\",\n content: socDesc\n }), siteName ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"og:sitename\",\n content: siteName\n }) : null, url ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"og:url\",\n content: url\n }) : null]\n }), children ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(Context.Provider, {\n value: context,\n children: children\n }) : null]\n });\n}\nMetaTags.Context = Context;\nMetaTags.defaultProps = {\n children: null,\n image: null,\n siteName: null,\n socialDescription: null,\n socialTitle: null,\n url: null\n};\nMetaTags.propTypes = {\n children: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),\n description: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string.isRequired),\n image: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),\n siteName: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),\n socialDescription: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),\n socialTitle: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),\n title: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string.isRequired),\n url: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)\n};\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/components/MetaTags.jsx?");
120
120
 
121
121
  /***/ }),
122
122
 
@@ -156,7 +156,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var prop
156
156
  \******************************************************/
157
157
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
158
158
 
159
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ ScalableRect; }\n/* harmony export */ });\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ \"prop-types\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ \"./src/shared/components/ScalableRect/style.scss\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n\n\n/**\n * The `<ScalableRect>` component implements container keeping given aspect\n * ratio, while its width is altered.\n *\n * **Children:** Component children are rendered as the component's content.\n * @param {object} props\n * @param {string} [props.className] CSS class for component container.\n * @param {string} [props.ratio=1:1] Ratio of the rendered rectangle sides,\n * in `W:H` form.\n */\n\n\nfunction ScalableRect(_ref) {\n let {\n children,\n className,\n ratio\n } = _ref;\n const aux = ratio.split(':');\n const paddingBottom = \"\".concat(100 * aux[1] / aux[0], \"%\");\n /* NOTE: In case the following code looks strange to you, mind that we want to\n * allow the user to set custom styles on this component. If user passes in a\n * \"className\" prop (possibly \"styleName\", but that one is converted to\n * \"className\" by Babel just before being passed into this component), it\n * should not interfere with the sizing behavior, thus we need an extra <div>\n * level in this component; however, if user does not need a custom styling,\n * we can save one level of HTML code, so we do it. */\n\n const rect = /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(\"div\", {\n style: {\n paddingBottom\n },\n className: \"-dr-pogodin-react-utils___src-shared-components-ScalableRect-style___container___EznFz3\",\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(\"div\", {\n className: \"-dr-pogodin-react-utils___src-shared-components-ScalableRect-style___wrapper___0vb7tq\",\n children: children\n })\n });\n\n return className ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(\"div\", {\n className: className,\n children: rect\n }) : rect;\n}\nScalableRect.defaultProps = {\n children: null,\n className: null,\n ratio: '1:1'\n};\nScalableRect.propTypes = {\n children: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),\n className: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),\n ratio: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)\n};\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/components/ScalableRect/index.jsx?");
159
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ ScalableRect; }\n/* harmony export */ });\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ \"prop-types\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ \"./src/shared/components/ScalableRect/style.scss\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n\n\n/**\n * The `<ScalableRect>` component implements container keeping given aspect\n * ratio, while its width is altered.\n *\n * **Children:** Component children are rendered as the component's content.\n * @param {object} props\n * @param {string} [props.className] CSS class for component container.\n * @param {string} [props.ratio=1:1] Ratio of the rendered rectangle sides,\n * in `W:H` form.\n */\n\n\nfunction ScalableRect(_ref) {\n let {\n children,\n className,\n ratio\n } = _ref;\n const aux = ratio.split(':');\n const paddingBottom = `${100 * aux[1] / aux[0]}%`;\n /* NOTE: In case the following code looks strange to you, mind that we want to\n * allow the user to set custom styles on this component. If user passes in a\n * \"className\" prop (possibly \"styleName\", but that one is converted to\n * \"className\" by Babel just before being passed into this component), it\n * should not interfere with the sizing behavior, thus we need an extra <div>\n * level in this component; however, if user does not need a custom styling,\n * we can save one level of HTML code, so we do it. */\n\n const rect = /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(\"div\", {\n style: {\n paddingBottom\n },\n className: \"-dr-pogodin-react-utils___src-shared-components-ScalableRect-style___container___EznFz3\",\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(\"div\", {\n className: \"-dr-pogodin-react-utils___src-shared-components-ScalableRect-style___wrapper___0vb7tq\",\n children: children\n })\n });\n\n return className ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(\"div\", {\n className: className,\n children: rect\n }) : rect;\n}\nScalableRect.defaultProps = {\n children: null,\n className: null,\n ratio: '1:1'\n};\nScalableRect.propTypes = {\n children: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),\n className: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),\n ratio: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)\n};\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/components/ScalableRect/index.jsx?");
160
160
 
161
161
  /***/ }),
162
162
 
@@ -166,7 +166,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
166
166
  \**************************************************/
167
167
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
168
168
 
169
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ \"prop-types\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @dr.pogodin/react-themes */ \"@dr.pogodin/react-themes\");\n/* harmony import */ var _dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _theme_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./theme.scss */ \"./src/shared/components/Throbber/theme.scss\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n\n\n\n/**\n * Throbber is an \"action in progress\" indicator, which renders\n * three bouncing circles as a simple pending activity indicator,\n * and can be further themed to a certain degree.\n * @param {object} [props] Component properties.\n * @param {ThrobberTheme} [props.theme] _Ad hoc_ theme.\n * @param {...any} [props....]\n * [Other theming properties](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties)\n */\n\n\n\n\nfunction Throbber(_ref) {\n let {\n theme\n } = _ref;\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(\"div\", {\n className: (theme.container ? theme.container + \" \" : \"\") + \"-dr-pogodin-react-utils___src-shared-components-Throbber-theme___container___7zdld4\",\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"div\", {\n className: (theme.circle ? theme.circle + \" \" : \"\") + \"-dr-pogodin-react-utils___src-shared-components-Throbber-theme___circle___dBrB4g\"\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"div\", {\n className: (theme.circle ? theme.circle + \" \" : \"\") + \"-dr-pogodin-react-utils___src-shared-components-Throbber-theme___circle___dBrB4g\"\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"div\", {\n className: (theme.circle ? theme.circle + \" \" : \"\") + \"-dr-pogodin-react-utils___src-shared-components-Throbber-theme___circle___dBrB4g\"\n })]\n });\n}\n\nThrobber.defaultProps = {\n theme: {}\n};\nThrobber.propTypes = {\n theme: prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({\n container: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),\n circle: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)\n })\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (_dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_1___default()('Throbber', ['circle', 'container'], _theme_scss__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(Throbber));\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/components/Throbber/index.jsx?");
169
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ \"prop-types\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @dr.pogodin/react-themes */ \"@dr.pogodin/react-themes\");\n/* harmony import */ var _dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _theme_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./theme.scss */ \"./src/shared/components/Throbber/theme.scss\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n\n\n\n/**\n * Throbber is an \"action in progress\" indicator, which renders\n * three bouncing circles as a simple pending activity indicator,\n * and can be further themed to a certain degree.\n * @param {object} [props] Component properties.\n * @param {ThrobberTheme} [props.theme] _Ad hoc_ theme.\n * @param {...any} [props....]\n * [Other theming properties](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties)\n */\n\n\n\n\nfunction Throbber(_ref) {\n let {\n theme\n } = _ref;\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(\"span\", {\n className: (theme.container ? theme.container + \" \" : \"\") + \"-dr-pogodin-react-utils___src-shared-components-Throbber-theme___container___7zdld4\",\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"span\", {\n className: (theme.circle ? theme.circle + \" \" : \"\") + \"-dr-pogodin-react-utils___src-shared-components-Throbber-theme___circle___dBrB4g\"\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"span\", {\n className: (theme.circle ? theme.circle + \" \" : \"\") + \"-dr-pogodin-react-utils___src-shared-components-Throbber-theme___circle___dBrB4g\"\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"span\", {\n className: (theme.circle ? theme.circle + \" \" : \"\") + \"-dr-pogodin-react-utils___src-shared-components-Throbber-theme___circle___dBrB4g\"\n })]\n });\n}\n\nThrobber.defaultProps = {\n theme: {}\n};\nThrobber.propTypes = {\n theme: prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({\n container: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),\n circle: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)\n })\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (_dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_1___default()('Throbber', ['circle', 'container'], _theme_scss__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(Throbber));\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/components/Throbber/index.jsx?");
170
170
 
171
171
  /***/ }),
172
172
 
@@ -176,7 +176,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var prop
176
176
  \*******************************************************/
177
177
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
178
178
 
179
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"PLACEMENTS\": function() { return /* binding */ PLACEMENTS; }\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ \"react-dom\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ \"prop-types\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);\n/**\n * The actual tooltip component. It is rendered outside the regular document\n * hierarchy, and with sub-components managed without React to achieve the best\n * performance during animation.\n */\n\n/* global document, window */\n\n\n\n/* Valid placements of the rendered tooltip. They will be overriden when\n * necessary to fit the tooltip within the viewport. */\n\nconst PLACEMENTS = {\n ABOVE_CURSOR: 'ABOVE_CURSOR',\n ABOVE_ELEMENT: 'ABOVE_ELEMENT',\n BELOW_CURSOR: 'BELOW_CURSOR',\n BELOW_ELEMENT: 'BELOW_ELEMENT'\n};\nconst ARROW_STYLE_DOWN = ['border-bottom-color:transparent', 'border-left-color:transparent', 'border-right-color:transparent'].join(';');\nconst ARROW_STYLE_UP = ['border-top-color:transparent', 'border-left-color:transparent', 'border-right-color:transparent'].join(';');\n/**\n * Creates tooltip components.\n * @ignore\n * @param {object} theme Themes to use for tooltip container, arrow,\n * and content.\n * @return {object} Object with DOM references to the container components:\n * container, arrow, content.\n */\n\nfunction createTooltipComponents(theme) {\n const arrow = document.createElement('div');\n if (theme.arrow) arrow.setAttribute('class', theme.arrow);\n const content = document.createElement('div');\n if (theme.content) content.setAttribute('class', theme.content);\n const container = document.createElement('div');\n if (theme.container) container.setAttribute('class', theme.container);\n container.appendChild(arrow);\n container.appendChild(content);\n document.body.appendChild(container);\n return {\n container,\n arrow,\n content\n };\n}\n/**\n * Generates bounding client rectangles for tooltip components.\n * @ignore\n * @param {object} tooltip DOM references to the tooltip components.\n * @param {object} tooltip.arrow\n * @param {object} tooltip.container\n * @return {{ arrow: object, container}} Object holding tooltip rectangles in\n * two fields.\n */\n\n\nfunction calcTooltipRects(tooltip) {\n return {\n arrow: tooltip.arrow.getBoundingClientRect(),\n container: tooltip.container.getBoundingClientRect()\n };\n}\n/**\n * Calculates the document viewport size.\n * @ignore\n * @return {{x, y, width, height}}\n */\n\n\nfunction calcViewportRect() {\n const {\n pageXOffset,\n pageYOffset\n } = window;\n const {\n documentElement: {\n clientHeight,\n clientWidth\n }\n } = document;\n return {\n left: pageXOffset,\n right: pageXOffset + clientWidth,\n top: pageYOffset,\n bottom: pageYOffset + clientHeight\n };\n}\n/**\n * Calculates tooltip and arrow positions for the placement just above\n * the cursor.\n * @ignore\n * @param {number} x Cursor page-x position.\n * @param {number} y Cursor page-y position.\n * @param {object} tooltipRects Bounding client rectangles of tooltip parts.\n * @param {object} tooltipRects.arrow\n * @param {object} tooltipRects.container\n * @return {object} Contains the following fields:\n * - {number} arrowX\n * - {number} arrowY\n * - {number} containerX\n * - {number} containerY\n * - {string} baseArrowStyle\n */\n\n\nfunction calcPositionAboveXY(x, y, tooltipRects) {\n const {\n arrow,\n container\n } = tooltipRects;\n return {\n arrowX: 0.5 * (container.width - arrow.width),\n arrowY: container.height,\n containerX: x - container.width / 2,\n containerY: y - container.height - arrow.height / 1.5,\n // TODO: Instead of already setting the base style here, we should\n // introduce a set of constants for arrow directions, which will help\n // to do checks dependant on the arrow direction.\n baseArrowStyle: ARROW_STYLE_DOWN\n };\n}\n/*\nconst HIT = {\n NONE: false,\n LEFT: 'LEFT',\n RIGHT: 'RIGHT',\n TOP: 'TOP',\n BOTTOM: 'BOTTOM',\n};\n*/\n\n/**\n * Checks whether\n * @param {object} pos\n * @param {object} tooltipRects\n * @param {object} viewportRect\n * @return {HIT}\n */\n\n/*\nfunction checkViewportFit(pos, tooltipRects, viewportRect) {\n const { containerX, containerY } = pos;\n if (containerX < viewportRect.left + 6) return HIT.LEFT;\n if (containerX > viewportRect.right - 6) return HIT.RIGHT;\n return HIT.NONE;\n}\n*/\n\n/**\n * Shifts tooltip horizontally to fit into the viewport, while keeping\n * the arrow pointed to the XY point.\n * @param {number} x\n * @param {number} y\n * @param {object} pos\n * @param {number} pageXOffset\n * @param {number} pageXWidth\n */\n\n/*\nfunction xPageFitCorrection(x, y, pos, pageXOffset, pageXWidth) {\n if (pos.containerX < pageXOffset + 6) {\n pos.containerX = pageXOffset + 6;\n pos.arrowX = Math.max(6, pageX - containerX - arrowRect.width / 2);\n } else {\n const maxX = pageXOffset + docRect.width - containerRect.width - 6;\n if (containerX > maxX) {\n containerX = maxX;\n arrowX = Math.min(\n containerRect.width - 6,\n pageX - containerX - arrowRect.width / 2,\n );\n }\n }\n}\n*/\n\n/**\n * Sets positions of tooltip components to point the tooltip to the specified\n * page point.\n * @ignore\n * @param {number} pageX\n * @param {number} pageY\n * @param {PLACEMENTS} placement\n * @param {object} element DOM reference to the element wrapped by the tooltip.\n * @param {object} tooltip\n * @param {object} tooltip.arrow DOM reference to the tooltip arrow.\n * @param {object} tooltip.container DOM reference to the tooltip container.\n */\n\n\nfunction setComponentPositions(pageX, pageY, placement, element, tooltip) {\n const tooltipRects = calcTooltipRects(tooltip);\n const viewportRect = calcViewportRect();\n /* Default container coords: tooltip at the top. */\n\n const pos = calcPositionAboveXY(pageX, pageY, tooltipRects);\n\n if (pos.containerX < viewportRect.left + 6) {\n pos.containerX = viewportRect.left + 6;\n pos.arrowX = Math.max(6, pageX - pos.containerX - tooltipRects.arrow.width / 2);\n } else {\n const maxX = viewportRect.right - 6 - tooltipRects.container.width;\n\n if (pos.containerX > maxX) {\n pos.containerX = maxX;\n pos.arrowX = Math.min(tooltipRects.container.width - 6, pageX - pos.containerX - tooltipRects.arrow.width / 2);\n }\n }\n /* If tooltip has not enough space on top - make it bottom tooltip. */\n\n\n if (pos.containerY < viewportRect.top + 6) {\n pos.containerY += tooltipRects.container.height + 2 * tooltipRects.arrow.height;\n pos.arrowY -= tooltipRects.container.height + tooltipRects.arrow.height;\n pos.baseArrowStyle = ARROW_STYLE_UP;\n }\n\n const containerStyle = \"left:\".concat(pos.containerX, \"px;top:\").concat(pos.containerY, \"px\");\n tooltip.container.setAttribute('style', containerStyle);\n const arrowStyle = \"\".concat(pos.baseArrowStyle, \";left:\").concat(pos.arrowX, \"px;top:\").concat(pos.arrowY, \"px\");\n tooltip.arrow.setAttribute('style', arrowStyle);\n}\n/* The Tooltip component itself. */\n\n\nconst Tooltip = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)((_ref, ref) => {\n let {\n children,\n theme\n } = _ref;\n const [components, setComponents] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null);\n\n const pointTo = (pageX, pageY, placement, element) => components && setComponentPositions(pageX, pageY, placement, element, components);\n\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useImperativeHandle)(ref, () => ({\n pointTo\n }));\n /* Inits and destroys tooltip components. */\n\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {\n const x = createTooltipComponents(theme);\n setComponents(x);\n return () => {\n document.body.removeChild(x.container);\n setComponents(null);\n };\n }, [theme]);\n return components ? /*#__PURE__*/(0,react_dom__WEBPACK_IMPORTED_MODULE_1__.createPortal)(children, components.content) : null;\n});\nTooltip.propTypes = {\n children: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().node),\n theme: prop_types__WEBPACK_IMPORTED_MODULE_2___default().shape().isRequired\n};\nTooltip.defaultProps = {\n children: null\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (Tooltip);\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/components/WithTooltip/Tooltip.jsx?");
179
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"PLACEMENTS\": function() { return /* binding */ PLACEMENTS; }\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ \"react-dom\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ \"prop-types\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);\n/**\n * The actual tooltip component. It is rendered outside the regular document\n * hierarchy, and with sub-components managed without React to achieve the best\n * performance during animation.\n */\n\n/* global document, window */\n\n\n\n/* Valid placements of the rendered tooltip. They will be overriden when\n * necessary to fit the tooltip within the viewport. */\n\nconst PLACEMENTS = {\n ABOVE_CURSOR: 'ABOVE_CURSOR',\n ABOVE_ELEMENT: 'ABOVE_ELEMENT',\n BELOW_CURSOR: 'BELOW_CURSOR',\n BELOW_ELEMENT: 'BELOW_ELEMENT'\n};\nconst ARROW_STYLE_DOWN = ['border-bottom-color:transparent', 'border-left-color:transparent', 'border-right-color:transparent'].join(';');\nconst ARROW_STYLE_UP = ['border-top-color:transparent', 'border-left-color:transparent', 'border-right-color:transparent'].join(';');\n/**\n * Creates tooltip components.\n * @ignore\n * @param {object} theme Themes to use for tooltip container, arrow,\n * and content.\n * @return {object} Object with DOM references to the container components:\n * container, arrow, content.\n */\n\nfunction createTooltipComponents(theme) {\n const arrow = document.createElement('div');\n if (theme.arrow) arrow.setAttribute('class', theme.arrow);\n const content = document.createElement('div');\n if (theme.content) content.setAttribute('class', theme.content);\n const container = document.createElement('div');\n if (theme.container) container.setAttribute('class', theme.container);\n container.appendChild(arrow);\n container.appendChild(content);\n document.body.appendChild(container);\n return {\n container,\n arrow,\n content\n };\n}\n/**\n * Generates bounding client rectangles for tooltip components.\n * @ignore\n * @param {object} tooltip DOM references to the tooltip components.\n * @param {object} tooltip.arrow\n * @param {object} tooltip.container\n * @return {{ arrow: object, container}} Object holding tooltip rectangles in\n * two fields.\n */\n\n\nfunction calcTooltipRects(tooltip) {\n return {\n arrow: tooltip.arrow.getBoundingClientRect(),\n container: tooltip.container.getBoundingClientRect()\n };\n}\n/**\n * Calculates the document viewport size.\n * @ignore\n * @return {{x, y, width, height}}\n */\n\n\nfunction calcViewportRect() {\n const {\n pageXOffset,\n pageYOffset\n } = window;\n const {\n documentElement: {\n clientHeight,\n clientWidth\n }\n } = document;\n return {\n left: pageXOffset,\n right: pageXOffset + clientWidth,\n top: pageYOffset,\n bottom: pageYOffset + clientHeight\n };\n}\n/**\n * Calculates tooltip and arrow positions for the placement just above\n * the cursor.\n * @ignore\n * @param {number} x Cursor page-x position.\n * @param {number} y Cursor page-y position.\n * @param {object} tooltipRects Bounding client rectangles of tooltip parts.\n * @param {object} tooltipRects.arrow\n * @param {object} tooltipRects.container\n * @return {object} Contains the following fields:\n * - {number} arrowX\n * - {number} arrowY\n * - {number} containerX\n * - {number} containerY\n * - {string} baseArrowStyle\n */\n\n\nfunction calcPositionAboveXY(x, y, tooltipRects) {\n const {\n arrow,\n container\n } = tooltipRects;\n return {\n arrowX: 0.5 * (container.width - arrow.width),\n arrowY: container.height,\n containerX: x - container.width / 2,\n containerY: y - container.height - arrow.height / 1.5,\n // TODO: Instead of already setting the base style here, we should\n // introduce a set of constants for arrow directions, which will help\n // to do checks dependant on the arrow direction.\n baseArrowStyle: ARROW_STYLE_DOWN\n };\n}\n/*\nconst HIT = {\n NONE: false,\n LEFT: 'LEFT',\n RIGHT: 'RIGHT',\n TOP: 'TOP',\n BOTTOM: 'BOTTOM',\n};\n*/\n\n/**\n * Checks whether\n * @param {object} pos\n * @param {object} tooltipRects\n * @param {object} viewportRect\n * @return {HIT}\n */\n\n/*\nfunction checkViewportFit(pos, tooltipRects, viewportRect) {\n const { containerX, containerY } = pos;\n if (containerX < viewportRect.left + 6) return HIT.LEFT;\n if (containerX > viewportRect.right - 6) return HIT.RIGHT;\n return HIT.NONE;\n}\n*/\n\n/**\n * Shifts tooltip horizontally to fit into the viewport, while keeping\n * the arrow pointed to the XY point.\n * @param {number} x\n * @param {number} y\n * @param {object} pos\n * @param {number} pageXOffset\n * @param {number} pageXWidth\n */\n\n/*\nfunction xPageFitCorrection(x, y, pos, pageXOffset, pageXWidth) {\n if (pos.containerX < pageXOffset + 6) {\n pos.containerX = pageXOffset + 6;\n pos.arrowX = Math.max(6, pageX - containerX - arrowRect.width / 2);\n } else {\n const maxX = pageXOffset + docRect.width - containerRect.width - 6;\n if (containerX > maxX) {\n containerX = maxX;\n arrowX = Math.min(\n containerRect.width - 6,\n pageX - containerX - arrowRect.width / 2,\n );\n }\n }\n}\n*/\n\n/**\n * Sets positions of tooltip components to point the tooltip to the specified\n * page point.\n * @ignore\n * @param {number} pageX\n * @param {number} pageY\n * @param {PLACEMENTS} placement\n * @param {object} element DOM reference to the element wrapped by the tooltip.\n * @param {object} tooltip\n * @param {object} tooltip.arrow DOM reference to the tooltip arrow.\n * @param {object} tooltip.container DOM reference to the tooltip container.\n */\n\n\nfunction setComponentPositions(pageX, pageY, placement, element, tooltip) {\n const tooltipRects = calcTooltipRects(tooltip);\n const viewportRect = calcViewportRect();\n /* Default container coords: tooltip at the top. */\n\n const pos = calcPositionAboveXY(pageX, pageY, tooltipRects);\n\n if (pos.containerX < viewportRect.left + 6) {\n pos.containerX = viewportRect.left + 6;\n pos.arrowX = Math.max(6, pageX - pos.containerX - tooltipRects.arrow.width / 2);\n } else {\n const maxX = viewportRect.right - 6 - tooltipRects.container.width;\n\n if (pos.containerX > maxX) {\n pos.containerX = maxX;\n pos.arrowX = Math.min(tooltipRects.container.width - 6, pageX - pos.containerX - tooltipRects.arrow.width / 2);\n }\n }\n /* If tooltip has not enough space on top - make it bottom tooltip. */\n\n\n if (pos.containerY < viewportRect.top + 6) {\n pos.containerY += tooltipRects.container.height + 2 * tooltipRects.arrow.height;\n pos.arrowY -= tooltipRects.container.height + tooltipRects.arrow.height;\n pos.baseArrowStyle = ARROW_STYLE_UP;\n }\n\n const containerStyle = `left:${pos.containerX}px;top:${pos.containerY}px`;\n tooltip.container.setAttribute('style', containerStyle);\n const arrowStyle = `${pos.baseArrowStyle};left:${pos.arrowX}px;top:${pos.arrowY}px`;\n tooltip.arrow.setAttribute('style', arrowStyle);\n}\n/* The Tooltip component itself. */\n\n\nconst Tooltip = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)((_ref, ref) => {\n let {\n children,\n theme\n } = _ref;\n const [components, setComponents] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null);\n\n const pointTo = (pageX, pageY, placement, element) => components && setComponentPositions(pageX, pageY, placement, element, components);\n\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useImperativeHandle)(ref, () => ({\n pointTo\n }));\n /* Inits and destroys tooltip components. */\n\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {\n const x = createTooltipComponents(theme);\n setComponents(x);\n return () => {\n document.body.removeChild(x.container);\n setComponents(null);\n };\n }, [theme]);\n return components ? /*#__PURE__*/(0,react_dom__WEBPACK_IMPORTED_MODULE_1__.createPortal)(children, components.content) : null;\n});\nTooltip.propTypes = {\n children: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().node),\n theme: prop_types__WEBPACK_IMPORTED_MODULE_2___default().shape().isRequired\n};\nTooltip.defaultProps = {\n children: null\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (Tooltip);\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/components/WithTooltip/Tooltip.jsx?");
180
180
 
181
181
  /***/ }),
182
182
 
@@ -196,7 +196,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var prop
196
196
  \******************************************************/
197
197
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
198
198
 
199
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ \"prop-types\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! qs */ \"qs\");\n/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _ScalableRect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../ScalableRect */ \"./src/shared/components/ScalableRect/index.jsx\");\n/* harmony import */ var _dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @dr.pogodin/react-themes */ \"@dr.pogodin/react-themes\");\n/* harmony import */ var _dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _Throbber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Throbber */ \"./src/shared/components/Throbber/index.jsx\");\n/* harmony import */ var _base_scss__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./base.scss */ \"./src/shared/components/YouTubeVideo/base.scss\");\n/* harmony import */ var _throbber_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./throbber.scss */ \"./src/shared/components/YouTubeVideo/throbber.scss\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n\n\n\n\n\n\n\n/**\n * A component for embeding a YouTube video.\n * @param {object} [props] Component properties.\n * @param {boolean} [props.autoplay] If `true` the video will start to play\n * automatically once loaded.\n * @param {string} [props.src] URL of the video to play. Can be in any of\n * the following formats, and keeps any additional query parameters understood\n * by the YouTube IFrame player:\n * - `https://www.youtube.com/watch?v=NdF6Rmt6Ado`\n * - `https://youtu.be/NdF6Rmt6Ado`\n * - `https://www.youtube.com/embed/NdF6Rmt6Ado`\n * @param {YouTubeVideoTheme} [props.theme] _Ad hoc_ theme.\n * @param {string} [props.title] The `title` attribute to add to the player\n * IFrame.\n */\n\n\n\n\nfunction YouTubeVideo(_ref) {\n let {\n autoplay,\n src,\n theme,\n title\n } = _ref;\n let [url, query] = src.split('?');\n query = query ? qs__WEBPACK_IMPORTED_MODULE_1___default().parse(query) : {};\n const videoId = query.v || url.match(/\\/([a-zA-Z0-9-_]*)$/)[1];\n url = \"https://www.youtube.com/embed/\".concat(videoId);\n delete query.v;\n query.autoplay = autoplay ? 1 : 0;\n url += \"?\".concat(qs__WEBPACK_IMPORTED_MODULE_1___default().stringify(query)); // TODO: https://developers.google.com/youtube/player_parameters\n // More query parameters can be exposed via the component props.\n\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_ScalableRect__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n className: theme.container,\n ratio: \"16:9\",\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_Throbber__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n theme: _throbber_scss__WEBPACK_IMPORTED_MODULE_6__[\"default\"]\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(\"iframe\", {\n allow: \"autoplay\",\n allowFullScreen: true,\n className: theme.video,\n src: url,\n title: title\n })]\n });\n}\n\nconst ThemedYouTubeVideo = _dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_3___default()('YouTubeVideo', ['container', 'video'], _base_scss__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(YouTubeVideo);\nYouTubeVideo.propTypes = {\n autoplay: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),\n src: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string.isRequired),\n theme: ThemedYouTubeVideo.themeType.isRequired,\n title: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)\n};\nYouTubeVideo.defaultProps = {\n autoplay: false,\n title: ''\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (ThemedYouTubeVideo);\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/components/YouTubeVideo/index.jsx?");
199
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ \"prop-types\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! qs */ \"qs\");\n/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _ScalableRect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../ScalableRect */ \"./src/shared/components/ScalableRect/index.jsx\");\n/* harmony import */ var _dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @dr.pogodin/react-themes */ \"@dr.pogodin/react-themes\");\n/* harmony import */ var _dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _Throbber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Throbber */ \"./src/shared/components/Throbber/index.jsx\");\n/* harmony import */ var _base_scss__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./base.scss */ \"./src/shared/components/YouTubeVideo/base.scss\");\n/* harmony import */ var _throbber_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./throbber.scss */ \"./src/shared/components/YouTubeVideo/throbber.scss\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n\n\n\n\n\n\n\n/**\n * A component for embeding a YouTube video.\n * @param {object} [props] Component properties.\n * @param {boolean} [props.autoplay] If `true` the video will start to play\n * automatically once loaded.\n * @param {string} [props.src] URL of the video to play. Can be in any of\n * the following formats, and keeps any additional query parameters understood\n * by the YouTube IFrame player:\n * - `https://www.youtube.com/watch?v=NdF6Rmt6Ado`\n * - `https://youtu.be/NdF6Rmt6Ado`\n * - `https://www.youtube.com/embed/NdF6Rmt6Ado`\n * @param {YouTubeVideoTheme} [props.theme] _Ad hoc_ theme.\n * @param {string} [props.title] The `title` attribute to add to the player\n * IFrame.\n */\n\n\n\n\nfunction YouTubeVideo(_ref) {\n let {\n autoplay,\n src,\n theme,\n title\n } = _ref;\n let [url, query] = src.split('?');\n query = query ? qs__WEBPACK_IMPORTED_MODULE_1___default().parse(query) : {};\n const videoId = query.v || url.match(/\\/([a-zA-Z0-9-_]*)$/)[1];\n url = `https://www.youtube.com/embed/${videoId}`;\n delete query.v;\n query.autoplay = autoplay ? 1 : 0;\n url += `?${qs__WEBPACK_IMPORTED_MODULE_1___default().stringify(query)}`; // TODO: https://developers.google.com/youtube/player_parameters\n // More query parameters can be exposed via the component props.\n\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_ScalableRect__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n className: theme.container,\n ratio: \"16:9\",\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_Throbber__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n theme: _throbber_scss__WEBPACK_IMPORTED_MODULE_6__[\"default\"]\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(\"iframe\", {\n allow: \"autoplay\",\n allowFullScreen: true,\n className: theme.video,\n src: url,\n title: title\n })]\n });\n}\n\nconst ThemedYouTubeVideo = _dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_3___default()('YouTubeVideo', ['container', 'video'], _base_scss__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(YouTubeVideo);\nYouTubeVideo.propTypes = {\n autoplay: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),\n src: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string.isRequired),\n theme: ThemedYouTubeVideo.themeType.isRequired,\n title: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)\n};\nYouTubeVideo.defaultProps = {\n autoplay: false,\n title: ''\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (ThemedYouTubeVideo);\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/components/YouTubeVideo/index.jsx?");
200
200
 
201
201
  /***/ }),
202
202
 
@@ -286,7 +286,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
286
286
  \**********************************/
287
287
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
288
288
 
289
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"timer\": function() { return /* binding */ timer; }\n/* harmony export */ });\n/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! dayjs */ \"dayjs\");\n/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Barrier__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Barrier */ \"./src/shared/utils/Barrier.js\");\n\n\n/**\n * @static\n * @const SEC_MS\n * @desc One second, expressed in milliseconds (equals 1000 ms).\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.SEC_MS); // Prints: 1000\n */\n\n(dayjs__WEBPACK_IMPORTED_MODULE_0___default().SEC_MS) = 1000;\n/**\n * @static\n * @const MIN_MS\n * @desc One minute, expressed in milliseconds (equals 60 &times; `SEC_MS`).\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.MIN_MS); // Prints: 60000\n */\n\n(dayjs__WEBPACK_IMPORTED_MODULE_0___default().MIN_MS) = 60 * (dayjs__WEBPACK_IMPORTED_MODULE_0___default().SEC_MS);\n/**\n * @static\n * @const HOUR_MS\n * @desc One hour, expressed in milliseconds (equals 60 &times; `MIN_MS`).\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.HOUR_MS); // Prints: 3600000\n */\n\n(dayjs__WEBPACK_IMPORTED_MODULE_0___default().HOUR_MS) = 60 * (dayjs__WEBPACK_IMPORTED_MODULE_0___default().MIN_MS);\n/**\n * @static\n * @const DAY_MS\n * @desc One day, expressed in milliseconds (equals 24 &times; `HOUR_MS`).\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.DAY_MS); // Prints: 86400000\n */\n\n(dayjs__WEBPACK_IMPORTED_MODULE_0___default().DAY_MS) = 24 * (dayjs__WEBPACK_IMPORTED_MODULE_0___default().HOUR_MS);\n/**\n * @static\n * @const YEAR_MS\n * @desc One year, expressed in milliseconds (equals 365 &times; `DAY_MS`,\n * thus a normal, non-leap year).\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.YEAR_MS); // Prints: 31536000000\n */\n\n(dayjs__WEBPACK_IMPORTED_MODULE_0___default().YEAR_MS) = 365 * (dayjs__WEBPACK_IMPORTED_MODULE_0___default().DAY_MS);\n/**\n * @static\n * @func now\n * @desc Returns Unix timestamp [ms] (thus, it is just an alias for `Date.now`).\n * @return {number}\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.now()); // Prints the current timestamp, e.g. 1618608761000.\n */\n\n(dayjs__WEBPACK_IMPORTED_MODULE_0___default().now) = Date.now;\n/**\n * Creates a Promise, which resolves after the given timeout.\n * @param {number} timeout Timeout [ms].\n * @return {Barrier} Resolves after the timeout. It has additional\n * .abort() method attached, which cancels the pending timer resolution\n * (without resolving or rejecting the barrier).\n */\n\nasync function timer(timeout) {\n const res = new _Barrier__WEBPACK_IMPORTED_MODULE_1__.Barrier();\n const id = setTimeout(res.resolve.bind(res), timeout);\n\n res.abort = () => clearTimeout(id);\n\n return res;\n}\n(dayjs__WEBPACK_IMPORTED_MODULE_0___default().timer) = timer;\n/* harmony default export */ __webpack_exports__[\"default\"] = ((dayjs__WEBPACK_IMPORTED_MODULE_0___default()));\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/utils/time.js?");
289
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"timer\": function() { return /* binding */ timer; }\n/* harmony export */ });\n/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! dayjs */ \"dayjs\");\n/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _Barrier__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Barrier */ \"./src/shared/utils/Barrier.js\");\n\n\n\n/**\n * @static\n * @const SEC_MS\n * @desc One second, expressed in milliseconds (equals 1000 ms).\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.SEC_MS); // Prints: 1000\n */\n\n(dayjs__WEBPACK_IMPORTED_MODULE_0___default().SEC_MS) = 1000;\n/**\n * @static\n * @const MIN_MS\n * @desc One minute, expressed in milliseconds (equals 60 &times; `SEC_MS`).\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.MIN_MS); // Prints: 60000\n */\n\n(dayjs__WEBPACK_IMPORTED_MODULE_0___default().MIN_MS) = 60 * (dayjs__WEBPACK_IMPORTED_MODULE_0___default().SEC_MS);\n/**\n * @static\n * @const HOUR_MS\n * @desc One hour, expressed in milliseconds (equals 60 &times; `MIN_MS`).\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.HOUR_MS); // Prints: 3600000\n */\n\n(dayjs__WEBPACK_IMPORTED_MODULE_0___default().HOUR_MS) = 60 * (dayjs__WEBPACK_IMPORTED_MODULE_0___default().MIN_MS);\n/**\n * @static\n * @const DAY_MS\n * @desc One day, expressed in milliseconds (equals 24 &times; `HOUR_MS`).\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.DAY_MS); // Prints: 86400000\n */\n\n(dayjs__WEBPACK_IMPORTED_MODULE_0___default().DAY_MS) = 24 * (dayjs__WEBPACK_IMPORTED_MODULE_0___default().HOUR_MS);\n/**\n * @static\n * @const YEAR_MS\n * @desc One year, expressed in milliseconds (equals 365 &times; `DAY_MS`,\n * thus a normal, non-leap year).\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.YEAR_MS); // Prints: 31536000000\n */\n\n(dayjs__WEBPACK_IMPORTED_MODULE_0___default().YEAR_MS) = 365 * (dayjs__WEBPACK_IMPORTED_MODULE_0___default().DAY_MS);\n/**\n * @static\n * @func now\n * @desc Returns Unix timestamp [ms] (thus, it is just an alias for `Date.now`).\n * @return {number}\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.now()); // Prints the current timestamp, e.g. 1618608761000.\n */\n\n(dayjs__WEBPACK_IMPORTED_MODULE_0___default().now) = Date.now;\n/**\n * Creates a Promise, which resolves after the given timeout.\n * @param {number} timeout Timeout [ms].\n * @return {Barrier} Resolves after the timeout. It has additional\n * .abort() method attached, which cancels the pending timer resolution\n * (without resolving or rejecting the barrier).\n */\n\nasync function timer(timeout) {\n const res = new _Barrier__WEBPACK_IMPORTED_MODULE_2__.Barrier();\n\n if (timeout > 0) {\n const id = setTimeout(res.resolve.bind(res), timeout);\n\n res.abort = () => clearTimeout(id);\n } else {\n res.abort = lodash__WEBPACK_IMPORTED_MODULE_1__.noop;\n res.resolve();\n }\n\n return res;\n}\n(dayjs__WEBPACK_IMPORTED_MODULE_0___default().timer) = timer;\n/* harmony default export */ __webpack_exports__[\"default\"] = ((dayjs__WEBPACK_IMPORTED_MODULE_0___default()));\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/utils/time.js?");
290
290
 
291
291
  /***/ }),
292
292
 
@@ -8,7 +8,7 @@
8
8
  // from the web app root, to allow it control any and all pages of the
9
9
  // web app (otherwise, it will be restricted to the scope of its path).
10
10
  // The server takes it into account.
11
- const reg=await navigator.serviceWorker.register("/__service-worker.js");console.log("SW registered:",reg)}catch(err){console.log("SW registration failed:",err)}})}}/* eslint-enable no-console */ /* Decodes data injected at the server side. */if(window.INJ){const{key}=window.TRU_BUILD_INFO;let data=_forge.default.util.decode64(window.INJ);const decipher=_forge.default.cipher.createDecipher("AES-CBC",key);decipher.start({iv:data.slice(0,32)});decipher.update(_forge.default.util.createBuffer(data.slice(32)));decipher.finish();data=_forge.default.util.decodeUtf8(decipher.output.data);data=eval("(".concat(data,")"));// eslint-disable-line no-eval
11
+ const reg=await navigator.serviceWorker.register("/__service-worker.js");console.log("SW registered:",reg)}catch(err){console.log("SW registration failed:",err)}})}}/* eslint-enable no-console */ /* Decodes data injected at the server side. */if(window.INJ){const{key}=window.TRU_BUILD_INFO;let data=_forge.default.util.decode64(window.INJ);const decipher=_forge.default.cipher.createDecipher("AES-CBC",key);decipher.start({iv:data.slice(0,32)});decipher.update(_forge.default.util.createBuffer(data.slice(32)));decipher.finish();data=_forge.default.util.decodeUtf8(decipher.output.data);data=eval(`(${data})`);// eslint-disable-line no-eval
12
12
  window.CHUNK_GROUPS=data.CHUNK_GROUPS;window.CONFIG=data.CONFIG;window.ISTATE=data.ISTATE}else{// This is possible when the client-side bundle is launched as a stand-alone
13
13
  // precompiled website, rather than served by react-utils' based server.
14
14
  window.CHUNK_GROUPS={};window.CONFIG={}}window.CONFIG.CSRF=_cookie.default.parse(document.cookie).csrfToken;
@@ -1 +1 @@
1
- {"version":3,"file":"init.js","names":["BUILD_INFO","window","TRU_BUILD_INFO","TRU_KEEP_INJ_SCRIPT","block","document","querySelector","getElementsByTagName","removeChild","useServiceWorker","navigator","addEventListener","reg","serviceWorker","register","console","log","err","INJ","key","data","forge","util","decode64","decipher","cipher","createDecipher","start","iv","slice","update","createBuffer","finish","decodeUtf8","output","eval","CHUNK_GROUPS","CONFIG","ISTATE","CSRF","cookie","parse","csrfToken"],"sources":["../../../src/client/init.js"],"sourcesContent":["/**\n * Initialization of client-side environment.\n */\n\n/* global BUILD_INFO, document, window */\n\nimport cookie from 'cookie';\n\n// Note: this way, only required part of \"node-forge\": AES, and some utils,\n// is bundled into client-side code.\nimport forge from 'node-forge/lib/forge';\nimport 'node-forge/lib/aes';\n\n/* `BUILD_INFO` is always injected by Webpack build, but this check is needed\n * to adopt the code for usage in tests. */\nif (typeof BUILD_INFO !== 'undefined') {\n window.TRU_BUILD_INFO = BUILD_INFO;\n}\n\n/* Removes data injection script out of the document.\n * The if block is here for test purposes. */\nif (!window.TRU_KEEP_INJ_SCRIPT) {\n const block = document.querySelector('script[id=\"inj\"]');\n if (block) document.getElementsByTagName('body')[0].removeChild(block);\n}\n\n/* TODO: A proper logger should be moved to `@dr.pogodin/react-utils`. */\n/* eslint-disable no-console */\nconst { useServiceWorker } = window.TRU_BUILD_INFO;\nif (useServiceWorker) {\n const { navigator } = window;\n if ('serviceWorker' in navigator) {\n window.addEventListener('load', async () => {\n try {\n // Note: no matter the \"publicPath\", we want to serve the service worker\n // from the web app root, to allow it control any and all pages of the\n // web app (otherwise, it will be restricted to the scope of its path).\n // The server takes it into account.\n const reg = await navigator\n .serviceWorker.register('/__service-worker.js');\n console.log('SW registered:', reg);\n } catch (err) {\n console.log('SW registration failed:', err);\n }\n });\n }\n}\n/* eslint-enable no-console */\n\n/* Decodes data injected at the server side. */\nif (window.INJ) {\n const { key } = window.TRU_BUILD_INFO;\n let data = forge.util.decode64(window.INJ);\n const decipher = forge.cipher.createDecipher('AES-CBC', key);\n decipher.start({ iv: data.slice(0, 32) });\n decipher.update(forge.util.createBuffer(data.slice(32)));\n decipher.finish();\n\n data = forge.util.decodeUtf8(decipher.output.data);\n data = eval(`(${data})`); // eslint-disable-line no-eval\n\n window.CHUNK_GROUPS = data.CHUNK_GROUPS;\n window.CONFIG = data.CONFIG;\n window.ISTATE = data.ISTATE;\n} else {\n // This is possible when the client-side bundle is launched as a stand-alone\n // precompiled website, rather than served by react-utils' based server.\n window.CHUNK_GROUPS = {};\n window.CONFIG = {};\n}\n\nwindow.CONFIG.CSRF = cookie.parse(document.cookie).csrfToken;\n"],"mappings":"gGAMA,sDAIA,mEACA,8BAXA;AACA;AACA,G,CAEA,yC,CAIA;AACA;AAIA;AACA,2CACA,GAAI,MAAOA,WAAP,GAAsB,WAA1B,CAAuC,CACrCC,MAAM,CAACC,cAAP,CAAwBF,UACzB,CAED;AACA,6CACA,GAAI,CAACC,MAAM,CAACE,mBAAZ,CAAiC,CAC/B,KAAMC,MAAK,CAAGC,QAAQ,CAACC,aAAT,CAAuB,oBAAvB,CAAd,CACA,GAAIF,KAAJ,CAAWC,QAAQ,CAACE,oBAAT,CAA8B,MAA9B,EAAsC,CAAtC,EAAyCC,WAAzC,CAAqDJ,KAArD,CACZ,CAED,yE,CACA,+BACA,KAAM,CAAEK,gBAAF,EAAuBR,MAAM,CAACC,cAApC,CACA,GAAIO,gBAAJ,CAAsB,CACpB,KAAM,CAAEC,SAAF,EAAgBT,MAAtB,CACA,GAAI,iBAAmBS,UAAvB,CAAkC,CAChCT,MAAM,CAACU,gBAAP,CAAwB,MAAxB,CAAgC,SAAY,CAC1C,GAAI,CACF;AACA;AACA;AACA;AACA,KAAMC,IAAG,CAAG,KAAMF,UAAS,CACxBG,aADe,CACDC,QADC,CACQ,sBADR,CAAlB,CAEAC,OAAO,CAACC,GAAR,CAAY,gBAAZ,CAA8BJ,GAA9B,CACD,CAAC,MAAOK,GAAP,CAAY,CACZF,OAAO,CAACC,GAAR,CAAY,yBAAZ,CAAuCC,GAAvC,CACD,CACF,CAZD,CAaD,CACF,CACD,8B,CAEA,+CACA,GAAIhB,MAAM,CAACiB,GAAX,CAAgB,CACd,KAAM,CAAEC,GAAF,EAAUlB,MAAM,CAACC,cAAvB,CACA,GAAIkB,KAAI,CAAGC,cAAA,CAAMC,IAAN,CAAWC,QAAX,CAAoBtB,MAAM,CAACiB,GAA3B,CAAX,CACA,KAAMM,SAAQ,CAAGH,cAAA,CAAMI,MAAN,CAAaC,cAAb,CAA4B,SAA5B,CAAuCP,GAAvC,CAAjB,CACAK,QAAQ,CAACG,KAAT,CAAe,CAAEC,EAAE,CAAER,IAAI,CAACS,KAAL,CAAW,CAAX,CAAc,EAAd,CAAN,CAAf,EACAL,QAAQ,CAACM,MAAT,CAAgBT,cAAA,CAAMC,IAAN,CAAWS,YAAX,CAAwBX,IAAI,CAACS,KAAL,CAAW,EAAX,CAAxB,CAAhB,EACAL,QAAQ,CAACQ,MAAT,GAEAZ,IAAI,CAAGC,cAAA,CAAMC,IAAN,CAAWW,UAAX,CAAsBT,QAAQ,CAACU,MAAT,CAAgBd,IAAtC,CAAP,CACAA,IAAI,CAAGe,IAAI,YAAKf,IAAL,MAAX,CAA0B;AAE1BnB,MAAM,CAACmC,YAAP,CAAsBhB,IAAI,CAACgB,YAA3B,CACAnC,MAAM,CAACoC,MAAP,CAAgBjB,IAAI,CAACiB,MAArB,CACApC,MAAM,CAACqC,MAAP,CAAgBlB,IAAI,CAACkB,MACtB,CAdD,IAcO,CACL;AACA;AACArC,MAAM,CAACmC,YAAP,CAAsB,EAAtB,CACAnC,MAAM,CAACoC,MAAP,CAAgB,EACjB,CAEDpC,MAAM,CAACoC,MAAP,CAAcE,IAAd,CAAqBC,eAAA,CAAOC,KAAP,CAAapC,QAAQ,CAACmC,MAAtB,EAA8BE,SAAnD"}
1
+ {"version":3,"file":"init.js","names":["BUILD_INFO","window","TRU_BUILD_INFO","TRU_KEEP_INJ_SCRIPT","block","document","querySelector","getElementsByTagName","removeChild","useServiceWorker","navigator","addEventListener","reg","serviceWorker","register","console","log","err","INJ","key","data","forge","util","decode64","decipher","cipher","createDecipher","start","iv","slice","update","createBuffer","finish","decodeUtf8","output","eval","CHUNK_GROUPS","CONFIG","ISTATE","CSRF","cookie","parse","csrfToken"],"sources":["../../../src/client/init.js"],"sourcesContent":["/**\n * Initialization of client-side environment.\n */\n\n/* global BUILD_INFO, document, window */\n\nimport cookie from 'cookie';\n\n// Note: this way, only required part of \"node-forge\": AES, and some utils,\n// is bundled into client-side code.\nimport forge from 'node-forge/lib/forge';\nimport 'node-forge/lib/aes';\n\n/* `BUILD_INFO` is always injected by Webpack build, but this check is needed\n * to adopt the code for usage in tests. */\nif (typeof BUILD_INFO !== 'undefined') {\n window.TRU_BUILD_INFO = BUILD_INFO;\n}\n\n/* Removes data injection script out of the document.\n * The if block is here for test purposes. */\nif (!window.TRU_KEEP_INJ_SCRIPT) {\n const block = document.querySelector('script[id=\"inj\"]');\n if (block) document.getElementsByTagName('body')[0].removeChild(block);\n}\n\n/* TODO: A proper logger should be moved to `@dr.pogodin/react-utils`. */\n/* eslint-disable no-console */\nconst { useServiceWorker } = window.TRU_BUILD_INFO;\nif (useServiceWorker) {\n const { navigator } = window;\n if ('serviceWorker' in navigator) {\n window.addEventListener('load', async () => {\n try {\n // Note: no matter the \"publicPath\", we want to serve the service worker\n // from the web app root, to allow it control any and all pages of the\n // web app (otherwise, it will be restricted to the scope of its path).\n // The server takes it into account.\n const reg = await navigator\n .serviceWorker.register('/__service-worker.js');\n console.log('SW registered:', reg);\n } catch (err) {\n console.log('SW registration failed:', err);\n }\n });\n }\n}\n/* eslint-enable no-console */\n\n/* Decodes data injected at the server side. */\nif (window.INJ) {\n const { key } = window.TRU_BUILD_INFO;\n let data = forge.util.decode64(window.INJ);\n const decipher = forge.cipher.createDecipher('AES-CBC', key);\n decipher.start({ iv: data.slice(0, 32) });\n decipher.update(forge.util.createBuffer(data.slice(32)));\n decipher.finish();\n\n data = forge.util.decodeUtf8(decipher.output.data);\n data = eval(`(${data})`); // eslint-disable-line no-eval\n\n window.CHUNK_GROUPS = data.CHUNK_GROUPS;\n window.CONFIG = data.CONFIG;\n window.ISTATE = data.ISTATE;\n} else {\n // This is possible when the client-side bundle is launched as a stand-alone\n // precompiled website, rather than served by react-utils' based server.\n window.CHUNK_GROUPS = {};\n window.CONFIG = {};\n}\n\nwindow.CONFIG.CSRF = cookie.parse(document.cookie).csrfToken;\n"],"mappings":"gGAMA,sDAIA,mEACA,8BAXA;AACA;AACA,G,CAEA,yC,CAIA;AACA;AAIA;AACA,2CACA,GAAI,MAAOA,WAAP,GAAsB,WAA1B,CAAuC,CACrCC,MAAM,CAACC,cAAP,CAAwBF,UACzB,CAED;AACA,6CACA,GAAI,CAACC,MAAM,CAACE,mBAAZ,CAAiC,CAC/B,KAAMC,MAAK,CAAGC,QAAQ,CAACC,aAAT,CAAuB,oBAAvB,CAAd,CACA,GAAIF,KAAJ,CAAWC,QAAQ,CAACE,oBAAT,CAA8B,MAA9B,EAAsC,CAAtC,EAAyCC,WAAzC,CAAqDJ,KAArD,CACZ,CAED,yE,CACA,+BACA,KAAM,CAAEK,gBAAF,EAAuBR,MAAM,CAACC,cAApC,CACA,GAAIO,gBAAJ,CAAsB,CACpB,KAAM,CAAEC,SAAF,EAAgBT,MAAtB,CACA,GAAI,iBAAmBS,UAAvB,CAAkC,CAChCT,MAAM,CAACU,gBAAP,CAAwB,MAAxB,CAAgC,SAAY,CAC1C,GAAI,CACF;AACA;AACA;AACA;AACA,KAAMC,IAAG,CAAG,KAAMF,UAAS,CACxBG,aADe,CACDC,QADC,CACQ,sBADR,CAAlB,CAEAC,OAAO,CAACC,GAAR,CAAY,gBAAZ,CAA8BJ,GAA9B,CACD,CAAC,MAAOK,GAAP,CAAY,CACZF,OAAO,CAACC,GAAR,CAAY,yBAAZ,CAAuCC,GAAvC,CACD,CACF,CAZD,CAaD,CACF,CACD,8B,CAEA,+CACA,GAAIhB,MAAM,CAACiB,GAAX,CAAgB,CACd,KAAM,CAAEC,GAAF,EAAUlB,MAAM,CAACC,cAAvB,CACA,GAAIkB,KAAI,CAAGC,cAAA,CAAMC,IAAN,CAAWC,QAAX,CAAoBtB,MAAM,CAACiB,GAA3B,CAAX,CACA,KAAMM,SAAQ,CAAGH,cAAA,CAAMI,MAAN,CAAaC,cAAb,CAA4B,SAA5B,CAAuCP,GAAvC,CAAjB,CACAK,QAAQ,CAACG,KAAT,CAAe,CAAEC,EAAE,CAAER,IAAI,CAACS,KAAL,CAAW,CAAX,CAAc,EAAd,CAAN,CAAf,EACAL,QAAQ,CAACM,MAAT,CAAgBT,cAAA,CAAMC,IAAN,CAAWS,YAAX,CAAwBX,IAAI,CAACS,KAAL,CAAW,EAAX,CAAxB,CAAhB,EACAL,QAAQ,CAACQ,MAAT,GAEAZ,IAAI,CAAGC,cAAA,CAAMC,IAAN,CAAWW,UAAX,CAAsBT,QAAQ,CAACU,MAAT,CAAgBd,IAAtC,CAAP,CACAA,IAAI,CAAGe,IAAI,CAAE,IAAGf,IAAK,GAAV,CAAX,CAA0B;AAE1BnB,MAAM,CAACmC,YAAP,CAAsBhB,IAAI,CAACgB,YAA3B,CACAnC,MAAM,CAACoC,MAAP,CAAgBjB,IAAI,CAACiB,MAArB,CACApC,MAAM,CAACqC,MAAP,CAAgBlB,IAAI,CAACkB,MACtB,CAdD,IAcO,CACL;AACA;AACArC,MAAM,CAACmC,YAAP,CAAsB,EAAtB,CACAnC,MAAM,CAACoC,MAAP,CAAgB,EACjB,CAEDpC,MAAM,CAACoC,MAAP,CAAcE,IAAd,CAAqBC,eAAA,CAAOC,KAAP,CAAapC,QAAQ,CAACmC,MAAtB,EAA8BE,SAAnD"}
@@ -6,5 +6,5 @@
6
6
  * @param {...any} [props...] [Other theming properties](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties)
7
7
  * @param {...any} [props...] Any other properties are passed to the underlying
8
8
  * `<input>` element.
9
- */const Input=/*#__PURE__*/(0,_react.forwardRef)(({label,theme,...rest},ref)=>/*#__PURE__*/(0,_jsxRuntime.jsxs)("div",{className:theme.container,children:[label===undefined?null:/*#__PURE__*/(0,_jsxRuntime.jsx)("p",{className:theme.label,children:label}),/*#__PURE__*/(0,_jsxRuntime.jsx)("input",{className:theme.input,ref:ref,...rest})]}));const ThemedInput=(0,_utils.themed)("Input",["container","input","label"],defaultTheme)(Input);Input.propTypes={label:_propTypes.default.string,theme:ThemedInput.themeType.isRequired};Input.defaultProps={label:undefined};var _default=ThemedInput;exports.default=_default;
9
+ */const Input=/*#__PURE__*/(0,_react.forwardRef)(({label,theme,...rest},ref)=>/*#__PURE__*/(0,_jsxRuntime.jsxs)("span",{className:theme.container,children:[label===undefined?null:/*#__PURE__*/(0,_jsxRuntime.jsx)("p",{className:theme.label,children:label}),/*#__PURE__*/(0,_jsxRuntime.jsx)("input",{className:theme.input,ref:ref,...rest})]}));const ThemedInput=(0,_utils.themed)("Input",["container","input","label"],defaultTheme)(Input);Input.propTypes={label:_propTypes.default.string,theme:ThemedInput.themeType.isRequired};Input.defaultProps={label:undefined};var _default=ThemedInput;exports.default=_default;
10
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["Input","forwardRef","label","theme","rest","ref","container","undefined","input","ThemedInput","themed","defaultTheme","propTypes","PT","string","themeType","isRequired","defaultProps"],"sources":["../../../../../src/shared/components/Input/index.jsx"],"sourcesContent":["import PT from 'prop-types';\nimport { forwardRef } from 'react';\n\nimport { themed } from 'utils';\n\nimport defaultTheme from './theme.scss';\n\n/**\n * Themeable input field, based on the standard HTML `<input>` element.\n * @param {object} [props]\n * @param {string} [props.label] Input label.\n * @param {InputTheme} [props.theme] _Ad hoc_ theme.\n * @param {...any} [props...] [Other theming properties](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties)\n * @param {...any} [props...] Any other properties are passed to the underlying\n * `<input>` element.\n */\nconst Input = forwardRef(({\n label,\n theme,\n ...rest\n}, ref) => (\n <div className={theme.container}>\n { label === undefined ? null : <p className={theme.label}>{label}</p> }\n <input\n className={theme.input}\n ref={ref}\n {...rest} // eslint-disable-line react/jsx-props-no-spreading\n />\n </div>\n));\n\nconst ThemedInput = themed('Input', [\n 'container',\n 'input',\n 'label',\n], defaultTheme)(Input);\n\nInput.propTypes = {\n label: PT.string,\n theme: ThemedInput.themeType.isRequired,\n};\n\nInput.defaultProps = {\n label: undefined,\n};\n\nexport default ThemedInput;\n"],"mappings":"gLAAA,6DACA,4BAEA,kC,0KAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACA,KAAMA,MAAK,cAAG,GAAAC,iBAAA,EAAW,CAAC,CACxBC,KADwB,CAExBC,KAFwB,CAGxB,GAAGC,IAHqB,CAAD,CAItBC,GAJsB,gBAKvB,4BAAK,SAAS,CAAEF,KAAK,CAACG,SAAtB,WACIJ,KAAK,GAAKK,SAAV,CAAsB,IAAtB,cAA6B,yBAAG,SAAS,CAAEJ,KAAK,CAACD,KAApB,UAA4BA,KAA5B,EADjC,cAEE,6BACE,SAAS,CAAEC,KAAK,CAACK,KADnB,CAEE,GAAG,CAAEH,GAFP,IAGMD,IAHN,EAFF,GALY,CAAd,CAeA,KAAMK,YAAW,CAAG,GAAAC,aAAA,EAAO,OAAP,CAAgB,CAClC,WADkC,CAElC,OAFkC,CAGlC,OAHkC,CAAhB,CAIjBC,YAJiB,EAIHX,KAJG,CAApB,CAMAA,KAAK,CAACY,SAAN,CAAkB,CAChBV,KAAK,CAAEW,kBAAA,CAAGC,MADM,CAEhBX,KAAK,CAAEM,WAAW,CAACM,SAAZ,CAAsBC,UAFb,CAAlB,CAKAhB,KAAK,CAACiB,YAAN,CAAqB,CACnBf,KAAK,CAAEK,SADY,CAArB,C,aAIeE,W"}
1
+ {"version":3,"file":"index.js","names":["Input","forwardRef","label","theme","rest","ref","container","undefined","input","ThemedInput","themed","defaultTheme","propTypes","PT","string","themeType","isRequired","defaultProps"],"sources":["../../../../../src/shared/components/Input/index.jsx"],"sourcesContent":["import PT from 'prop-types';\nimport { forwardRef } from 'react';\n\nimport { themed } from 'utils';\n\nimport defaultTheme from './theme.scss';\n\n/**\n * Themeable input field, based on the standard HTML `<input>` element.\n * @param {object} [props]\n * @param {string} [props.label] Input label.\n * @param {InputTheme} [props.theme] _Ad hoc_ theme.\n * @param {...any} [props...] [Other theming properties](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties)\n * @param {...any} [props...] Any other properties are passed to the underlying\n * `<input>` element.\n */\nconst Input = forwardRef(({\n label,\n theme,\n ...rest\n}, ref) => (\n <span className={theme.container}>\n { label === undefined ? null : <p className={theme.label}>{label}</p> }\n <input\n className={theme.input}\n ref={ref}\n {...rest} // eslint-disable-line react/jsx-props-no-spreading\n />\n </span>\n));\n\nconst ThemedInput = themed('Input', [\n 'container',\n 'input',\n 'label',\n], defaultTheme)(Input);\n\nInput.propTypes = {\n label: PT.string,\n theme: ThemedInput.themeType.isRequired,\n};\n\nInput.defaultProps = {\n label: undefined,\n};\n\nexport default ThemedInput;\n"],"mappings":"gLAAA,6DACA,4BAEA,kC,0KAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACA,KAAMA,MAAK,cAAG,GAAAC,iBAAA,EAAW,CAAC,CACxBC,KADwB,CAExBC,KAFwB,CAGxB,GAAGC,IAHqB,CAAD,CAItBC,GAJsB,gBAKvB,6BAAM,SAAS,CAAEF,KAAK,CAACG,SAAvB,WACIJ,KAAK,GAAKK,SAAV,CAAsB,IAAtB,cAA6B,yBAAG,SAAS,CAAEJ,KAAK,CAACD,KAApB,UAA4BA,KAA5B,EADjC,cAEE,6BACE,SAAS,CAAEC,KAAK,CAACK,KADnB,CAEE,GAAG,CAAEH,GAFP,IAGMD,IAHN,EAFF,GALY,CAAd,CAeA,KAAMK,YAAW,CAAG,GAAAC,aAAA,EAAO,OAAP,CAAgB,CAClC,WADkC,CAElC,OAFkC,CAGlC,OAHkC,CAAhB,CAIjBC,YAJiB,EAIHX,KAJG,CAApB,CAMAA,KAAK,CAACY,SAAN,CAAkB,CAChBV,KAAK,CAAEW,kBAAA,CAAGC,MADM,CAEhBX,KAAK,CAAEM,WAAW,CAACM,SAAZ,CAAsBC,UAFb,CAAlB,CAKAhB,KAAK,CAACiB,YAAN,CAAqB,CACnBf,KAAK,CAAEK,SADY,CAArB,C,aAIeE,W"}
@@ -6,5 +6,5 @@
6
6
  * @param {ThrobberTheme} [props.theme] _Ad hoc_ theme.
7
7
  * @param {...any} [props....]
8
8
  * [Other theming properties](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties)
9
- */function Throbber({theme}){return/*#__PURE__*/(0,_jsxRuntime.jsxs)("div",{className:(theme.container?theme.container+" ":"")+"_7zdld4",children:[/*#__PURE__*/(0,_jsxRuntime.jsx)("div",{className:(theme.circle?theme.circle+" ":"")+"dBrB4g"}),/*#__PURE__*/(0,_jsxRuntime.jsx)("div",{className:(theme.circle?theme.circle+" ":"")+"dBrB4g"}),/*#__PURE__*/(0,_jsxRuntime.jsx)("div",{className:(theme.circle?theme.circle+" ":"")+"dBrB4g"})]})}Throbber.defaultProps={theme:{}};Throbber.propTypes={theme:_propTypes.default.shape({container:_propTypes.default.string,circle:_propTypes.default.string})};var _default=(0,_reactThemes.default)("Throbber",["circle","container"],defaultTheme)(Throbber);exports.default=_default;
9
+ */function Throbber({theme}){return/*#__PURE__*/(0,_jsxRuntime.jsxs)("span",{className:(theme.container?theme.container+" ":"")+"_7zdld4",children:[/*#__PURE__*/(0,_jsxRuntime.jsx)("span",{className:(theme.circle?theme.circle+" ":"")+"dBrB4g"}),/*#__PURE__*/(0,_jsxRuntime.jsx)("span",{className:(theme.circle?theme.circle+" ":"")+"dBrB4g"}),/*#__PURE__*/(0,_jsxRuntime.jsx)("span",{className:(theme.circle?theme.circle+" ":"")+"dBrB4g"})]})}Throbber.defaultProps={theme:{}};Throbber.propTypes={theme:_propTypes.default.shape({container:_propTypes.default.string,circle:_propTypes.default.string})};var _default=(0,_reactThemes.default)("Throbber",["circle","container"],defaultTheme)(Throbber);exports.default=_default;
10
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["Throbber","theme","container","circle","defaultProps","propTypes","PT","shape","string","themed","defaultTheme"],"sources":["../../../../../src/shared/components/Throbber/index.jsx"],"sourcesContent":["import PT from 'prop-types';\nimport themed from '@dr.pogodin/react-themes';\n\nimport defaultTheme from './theme.scss';\n\n/**\n * Throbber is an \"action in progress\" indicator, which renders\n * three bouncing circles as a simple pending activity indicator,\n * and can be further themed to a certain degree.\n * @param {object} [props] Component properties.\n * @param {ThrobberTheme} [props.theme] _Ad hoc_ theme.\n * @param {...any} [props....]\n * [Other theming properties](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties)\n */\nfunction Throbber({\n theme,\n}) {\n return (\n <div className={theme.container} styleName=\"container\">\n <div className={theme.circle} styleName=\"circle\" />\n <div className={theme.circle} styleName=\"circle\" />\n <div className={theme.circle} styleName=\"circle\" />\n </div>\n );\n}\n\nThrobber.defaultProps = {\n theme: {},\n};\n\nThrobber.propTypes = {\n theme: PT.shape({\n container: PT.string,\n circle: PT.string,\n }),\n};\n\nexport default themed('Throbber', [\n 'circle',\n 'container',\n], defaultTheme)(Throbber);\n"],"mappings":"gLAAA,6DACA,6E,8KAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACA,QAASA,SAAT,CAAkB,CAChBC,KADgB,CAAlB,CAEG,CACD,mBACE,4BAAK,SAAS,EAAEA,KAAK,CAACC,SAAR,CAAED,KAAK,CAACC,SAAR,kBAAd,wBACE,2BAAK,SAAS,EAAED,KAAK,CAACE,MAAR,CAAEF,KAAK,CAACE,MAAR,iBAAd,EADF,cAEE,2BAAK,SAAS,EAAEF,KAAK,CAACE,MAAR,CAAEF,KAAK,CAACE,MAAR,iBAAd,EAFF,cAGE,2BAAK,SAAS,EAAEF,KAAK,CAACE,MAAR,CAAEF,KAAK,CAACE,MAAR,iBAAd,EAHF,GAMH,CAEDH,QAAQ,CAACI,YAAT,CAAwB,CACtBH,KAAK,CAAE,EADe,CAAxB,CAIAD,QAAQ,CAACK,SAAT,CAAqB,CACnBJ,KAAK,CAAEK,kBAAA,CAAGC,KAAH,CAAS,CACdL,SAAS,CAAEI,kBAAA,CAAGE,MADA,CAEdL,MAAM,CAAEG,kBAAA,CAAGE,MAFG,CAAT,CADY,CAArB,C,aAOe,GAAAC,oBAAA,EAAO,UAAP,CAAmB,CAChC,QADgC,CAEhC,WAFgC,CAAnB,CAGZC,YAHY,EAGEV,QAHF,C"}
1
+ {"version":3,"file":"index.js","names":["Throbber","theme","container","circle","defaultProps","propTypes","PT","shape","string","themed","defaultTheme"],"sources":["../../../../../src/shared/components/Throbber/index.jsx"],"sourcesContent":["import PT from 'prop-types';\nimport themed from '@dr.pogodin/react-themes';\n\nimport defaultTheme from './theme.scss';\n\n/**\n * Throbber is an \"action in progress\" indicator, which renders\n * three bouncing circles as a simple pending activity indicator,\n * and can be further themed to a certain degree.\n * @param {object} [props] Component properties.\n * @param {ThrobberTheme} [props.theme] _Ad hoc_ theme.\n * @param {...any} [props....]\n * [Other theming properties](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties)\n */\nfunction Throbber({\n theme,\n}) {\n return (\n <span className={theme.container} styleName=\"container\">\n <span className={theme.circle} styleName=\"circle\" />\n <span className={theme.circle} styleName=\"circle\" />\n <span className={theme.circle} styleName=\"circle\" />\n </span>\n );\n}\n\nThrobber.defaultProps = {\n theme: {},\n};\n\nThrobber.propTypes = {\n theme: PT.shape({\n container: PT.string,\n circle: PT.string,\n }),\n};\n\nexport default themed('Throbber', [\n 'circle',\n 'container',\n], defaultTheme)(Throbber);\n"],"mappings":"gLAAA,6DACA,6E,8KAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACA,QAASA,SAAT,CAAkB,CAChBC,KADgB,CAAlB,CAEG,CACD,mBACE,6BAAM,SAAS,EAAEA,KAAK,CAACC,SAAR,CAAED,KAAK,CAACC,SAAR,kBAAf,wBACE,4BAAM,SAAS,EAAED,KAAK,CAACE,MAAR,CAAEF,KAAK,CAACE,MAAR,iBAAf,EADF,cAEE,4BAAM,SAAS,EAAEF,KAAK,CAACE,MAAR,CAAEF,KAAK,CAACE,MAAR,iBAAf,EAFF,cAGE,4BAAM,SAAS,EAAEF,KAAK,CAACE,MAAR,CAAEF,KAAK,CAACE,MAAR,iBAAf,EAHF,GAMH,CAEDH,QAAQ,CAACI,YAAT,CAAwB,CACtBH,KAAK,CAAE,EADe,CAAxB,CAIAD,QAAQ,CAACK,SAAT,CAAqB,CACnBJ,KAAK,CAAEK,kBAAA,CAAGC,KAAH,CAAS,CACdL,SAAS,CAAEI,kBAAA,CAAGE,MADA,CAEdL,MAAM,CAAEG,kBAAA,CAAGE,MAFG,CAAT,CADY,CAArB,C,aAOe,GAAAC,oBAAA,EAAO,UAAP,CAAmB,CAChC,QADgC,CAEhC,WAFgC,CAAnB,CAGZC,YAHY,EAGEV,QAHF,C"}
@@ -1,4 +1,4 @@
1
- "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;exports.timer=timer;var _dayjs=_interopRequireDefault(require("dayjs"));var _Barrier=require("./Barrier");/**
1
+ "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;exports.timer=timer;var _dayjs=_interopRequireDefault(require("dayjs"));var _lodash=require("lodash");var _Barrier=require("./Barrier");/**
2
2
  * @static
3
3
  * @const SEC_MS
4
4
  * @desc One second, expressed in milliseconds (equals 1000 ms).
@@ -48,5 +48,5 @@
48
48
  * @return {Barrier} Resolves after the timeout. It has additional
49
49
  * .abort() method attached, which cancels the pending timer resolution
50
50
  * (without resolving or rejecting the barrier).
51
- */async function timer(timeout){const res=new _Barrier.Barrier;const id=setTimeout(res.resolve.bind(res),timeout);res.abort=()=>clearTimeout(id);return res}_dayjs.default.timer=timer;var _default=_dayjs.default;exports.default=_default;
51
+ */async function timer(timeout){const res=new _Barrier.Barrier;if(timeout>0){const id=setTimeout(res.resolve.bind(res),timeout);res.abort=()=>clearTimeout(id)}else{res.abort=_lodash.noop;res.resolve()}return res}_dayjs.default.timer=timer;var _default=_dayjs.default;exports.default=_default;
52
52
  //# sourceMappingURL=time.js.map