@dr.pogodin/react-utils 1.40.13 → 1.40.14

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.
@@ -7,14 +7,12 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.default = void 0;
8
8
  exports.useCurrent = useCurrent;
9
9
  exports.useTimezoneOffset = useTimezoneOffset;
10
- var _cookie = _interopRequireDefault(require("cookie"));
10
+ var _cookie = require("cookie");
11
11
  var _dayjs = _interopRequireDefault(require("dayjs"));
12
12
  var _react = require("react");
13
13
  var _jsUtils = require("@dr.pogodin/js-utils");
14
14
  var _reactGlobalState = require("@dr.pogodin/react-global-state");
15
15
  var _globalState = require("./globalState");
16
- /* global document */
17
-
18
16
  /**
19
17
  * This react hook wraps Date.now() function in a SSR friendly way,
20
18
  * ensuring that all calls to useCurrent() within the same render return
@@ -22,18 +20,6 @@ var _globalState = require("./globalState");
22
20
  * then stored in the global state to be reused in all other calls), which
23
21
  * is also passed and used in the first client side render, and then updated
24
22
  * with a finite precision to avoid infinite re-rendering loops.
25
- * @param [options] Optional settings.
26
- * @param [options.globalStatePath="currentTime"] Global state path
27
- * to keep the current time value.
28
- * @param [options.precision= 5 * time.SEC_MS] Current time precision.
29
- * The hook won't update the current time stored in the global state unless it
30
- * is different from Date.now() result by this number (in milliseconds).
31
- * Default to 5 seconds.
32
- * @param [options.autorefresh=false] Set `true` to automatically
33
- * refresh time stored in the global state with the given `precision` (and
34
- * thus automatically re-rendering components dependent on this hook, or
35
- * the global state with the period equal to the `precision`.
36
- * @return Unix timestamp in milliseconds.
37
23
  */
38
24
  // TODO: Should we request the state type as generic parameter, to be able
39
25
  // to verify the give globalStatePath is correct?
@@ -68,16 +54,6 @@ function useCurrent({
68
54
  * via the global state. Prior to the value being known (in the very first
69
55
  * request from the user, when the cookie is still missing), zero value is used
70
56
  * as the default value.
71
- *
72
- * @param {object} [options] Optional settings.
73
- * @param {string} [options.cookieName="timezoneOffset"] Optional. The name of
74
- * cookie to use to store the timezone offset. Defaults "timezoneOffset". Set
75
- * to a falsy value to forbid using cookies altogether (in that case the hook
76
- * will always return zero value at the server-side, and in the first render
77
- * at the client-side).
78
- * @param {string} [options.timezoneOffset="timezoneOffset"] Optional.
79
- * The global state path to store the offset. Defaults "timezoneOffset".
80
- * @return {number} Timezone offset.
81
57
  */
82
58
  // TODO: Should we request the state type as generic parameter, to be able
83
59
  // to verify the give globalStatePath is correct?
@@ -95,7 +71,7 @@ function useTimezoneOffset({
95
71
  const value = date.getTimezoneOffset();
96
72
  setOffset(value);
97
73
  if (cookieName) {
98
- document.cookie = _cookie.default.serialize(cookieName, value.toString(), {
74
+ document.cookie = (0, _cookie.serialize)(cookieName, value.toString(), {
99
75
  path: '/'
100
76
  });
101
77
  }
@@ -1 +1 @@
1
- {"version":3,"file":"time.js","names":["_cookie","_interopRequireDefault","require","_dayjs","_react","_jsUtils","_reactGlobalState","_globalState","useCurrent","autorefresh","globalStatePath","precision","SEC_MS","now","setter","useGlobalState","Date","useEffect","timerId","update","old","neu","Math","abs","setTimeout","clearTimeout","useTimezoneOffset","cookieName","ssrContext","getSsrContext","offset","setOffset","value","req","cookies","parseInt","date","getTimezoneOffset","document","cookie","Cookie","serialize","toString","path","time","DAY_MS","HOUR_MS","MIN_MS","YEAR_MS","timer","_default","exports","default","Object","assign","dayjs"],"sources":["../../../../src/shared/utils/time.ts"],"sourcesContent":["/* global document */\n\nimport Cookie from 'cookie';\nimport dayjs from 'dayjs';\nimport { useEffect } from 'react';\n\nimport {\n DAY_MS,\n HOUR_MS,\n MIN_MS,\n SEC_MS,\n YEAR_MS,\n timer,\n} from '@dr.pogodin/js-utils';\n\nimport { type ForceT, useGlobalState } from '@dr.pogodin/react-global-state';\n\nimport { getSsrContext } from './globalState';\n\n/**\n * This react hook wraps Date.now() function in a SSR friendly way,\n * ensuring that all calls to useCurrent() within the same render return\n * exactly the same time (which is retrieved from Date.now() first, and\n * then stored in the global state to be reused in all other calls), which\n * is also passed and used in the first client side render, and then updated\n * with a finite precision to avoid infinite re-rendering loops.\n * @param [options] Optional settings.\n * @param [options.globalStatePath=\"currentTime\"] Global state path\n * to keep the current time value.\n * @param [options.precision= 5 * time.SEC_MS] Current time precision.\n * The hook won't update the current time stored in the global state unless it\n * is different from Date.now() result by this number (in milliseconds).\n * Default to 5 seconds.\n * @param [options.autorefresh=false] Set `true` to automatically\n * refresh time stored in the global state with the given `precision` (and\n * thus automatically re-rendering components dependent on this hook, or\n * the global state with the period equal to the `precision`.\n * @return Unix timestamp in milliseconds.\n */\n// TODO: Should we request the state type as generic parameter, to be able\n// to verify the give globalStatePath is correct?\nexport function useCurrent({\n autorefresh = false,\n globalStatePath = 'currentTime',\n precision = 5 * SEC_MS,\n} = {}) {\n const [now, setter] = useGlobalState<ForceT, number>(globalStatePath, Date.now);\n useEffect(() => {\n let timerId: NodeJS.Timeout;\n const update = () => {\n setter((old) => {\n const neu = Date.now();\n return Math.abs(neu - old) > precision ? neu : old;\n });\n if (autorefresh) timerId = setTimeout(update, precision);\n };\n update();\n return () => {\n if (timerId) clearTimeout(timerId);\n };\n }, [autorefresh, precision, setter]);\n return now;\n}\n\n/**\n * Wraps the standard Date.getTimezoneOffset() method in a SSR-friendly way.\n * This hook retrieves the offset value at the client side and uses a cookie\n * to pass it to the server in subsequent requests from that user. At the server\n * side the value from cookie is used in renders and passed back to the client\n * via the global state. Prior to the value being known (in the very first\n * request from the user, when the cookie is still missing), zero value is used\n * as the default value.\n *\n * @param {object} [options] Optional settings.\n * @param {string} [options.cookieName=\"timezoneOffset\"] Optional. The name of\n * cookie to use to store the timezone offset. Defaults \"timezoneOffset\". Set\n * to a falsy value to forbid using cookies altogether (in that case the hook\n * will always return zero value at the server-side, and in the first render\n * at the client-side).\n * @param {string} [options.timezoneOffset=\"timezoneOffset\"] Optional.\n * The global state path to store the offset. Defaults \"timezoneOffset\".\n * @return {number} Timezone offset.\n */\n// TODO: Should we request the state type as generic parameter, to be able\n// to verify the give globalStatePath is correct?\nexport function useTimezoneOffset({\n cookieName = 'timezoneOffset',\n globalStatePath = 'timezoneOffset',\n} = {}) {\n const ssrContext = getSsrContext(false);\n const [offset, setOffset] = useGlobalState<ForceT, number>(globalStatePath, () => {\n const value = cookieName && ssrContext?.req?.cookies?.[cookieName];\n return value ? parseInt(value, 10) : 0;\n });\n useEffect(() => {\n const date = new Date();\n const value = date.getTimezoneOffset();\n setOffset(value);\n if (cookieName) {\n document.cookie = Cookie.serialize(cookieName, value.toString(), { path: '/' });\n }\n }, [cookieName, setOffset]);\n return offset;\n}\n\nconst time = {\n DAY_MS,\n HOUR_MS,\n MIN_MS,\n SEC_MS,\n YEAR_MS,\n now: Date.now,\n timer,\n useCurrent,\n useTimezoneOffset,\n};\n\nexport default Object.assign(dayjs, time);\n"],"mappings":"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","ignoreList":[]}
1
+ {"version":3,"file":"time.js","names":["_cookie","require","_dayjs","_interopRequireDefault","_react","_jsUtils","_reactGlobalState","_globalState","useCurrent","autorefresh","globalStatePath","precision","SEC_MS","now","setter","useGlobalState","Date","useEffect","timerId","update","old","neu","Math","abs","setTimeout","clearTimeout","useTimezoneOffset","cookieName","ssrContext","getSsrContext","offset","setOffset","value","req","cookies","parseInt","date","getTimezoneOffset","document","cookie","serialize","toString","path","time","DAY_MS","HOUR_MS","MIN_MS","YEAR_MS","timer","_default","exports","default","Object","assign","dayjs"],"sources":["../../../../src/shared/utils/time.ts"],"sourcesContent":["import { serialize } from 'cookie';\nimport dayjs from 'dayjs';\nimport { useEffect } from 'react';\n\nimport {\n DAY_MS,\n HOUR_MS,\n MIN_MS,\n SEC_MS,\n YEAR_MS,\n timer,\n} from '@dr.pogodin/js-utils';\n\nimport { type ForceT, useGlobalState } from '@dr.pogodin/react-global-state';\n\nimport { getSsrContext } from './globalState';\n\n/**\n * This react hook wraps Date.now() function in a SSR friendly way,\n * ensuring that all calls to useCurrent() within the same render return\n * exactly the same time (which is retrieved from Date.now() first, and\n * then stored in the global state to be reused in all other calls), which\n * is also passed and used in the first client side render, and then updated\n * with a finite precision to avoid infinite re-rendering loops.\n */\n// TODO: Should we request the state type as generic parameter, to be able\n// to verify the give globalStatePath is correct?\nexport function useCurrent({\n autorefresh = false,\n globalStatePath = 'currentTime',\n precision = 5 * SEC_MS,\n} = {}): number {\n const [now, setter] = useGlobalState<ForceT, number>(globalStatePath, Date.now);\n useEffect(() => {\n let timerId: NodeJS.Timeout;\n const update = () => {\n setter((old) => {\n const neu = Date.now();\n return Math.abs(neu - old) > precision ? neu : old;\n });\n if (autorefresh) timerId = setTimeout(update, precision);\n };\n update();\n return () => {\n if (timerId) clearTimeout(timerId);\n };\n }, [autorefresh, precision, setter]);\n return now;\n}\n\n/**\n * Wraps the standard Date.getTimezoneOffset() method in a SSR-friendly way.\n * This hook retrieves the offset value at the client side and uses a cookie\n * to pass it to the server in subsequent requests from that user. At the server\n * side the value from cookie is used in renders and passed back to the client\n * via the global state. Prior to the value being known (in the very first\n * request from the user, when the cookie is still missing), zero value is used\n * as the default value.\n */\n// TODO: Should we request the state type as generic parameter, to be able\n// to verify the give globalStatePath is correct?\nexport function useTimezoneOffset({\n cookieName = 'timezoneOffset',\n globalStatePath = 'timezoneOffset',\n} = {}): number {\n const ssrContext = getSsrContext(false);\n const [offset, setOffset] = useGlobalState<ForceT, number>(globalStatePath, () => {\n const value = cookieName && ssrContext?.req?.cookies?.[cookieName];\n return value ? parseInt(value, 10) : 0;\n });\n useEffect(() => {\n const date = new Date();\n const value = date.getTimezoneOffset();\n setOffset(value);\n if (cookieName) {\n document.cookie = serialize(cookieName, value.toString(), { path: '/' });\n }\n }, [cookieName, setOffset]);\n return offset;\n}\n\nconst time = {\n DAY_MS,\n HOUR_MS,\n MIN_MS,\n SEC_MS,\n YEAR_MS,\n now: Date.now,\n timer,\n useCurrent,\n useTimezoneOffset,\n};\n\nexport default Object.assign(dayjs, time);\n"],"mappings":";;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAEA,IAAAI,QAAA,GAAAJ,OAAA;AASA,IAAAK,iBAAA,GAAAL,OAAA;AAEA,IAAAM,YAAA,GAAAN,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASO,UAAUA,CAAC;EACzBC,WAAW,GAAG,KAAK;EACnBC,eAAe,GAAG,aAAa;EAC/BC,SAAS,GAAG,CAAC,GAAGC;AAClB,CAAC,GAAG,CAAC,CAAC,EAAU;EACd,MAAM,CAACC,GAAG,EAAEC,MAAM,CAAC,GAAG,IAAAC,gCAAc,EAAiBL,eAAe,EAAEM,IAAI,CAACH,GAAG,CAAC;EAC/E,IAAAI,gBAAS,EAAC,MAAM;IACd,IAAIC,OAAuB;IAC3B,MAAMC,MAAM,GAAGA,CAAA,KAAM;MACnBL,MAAM,CAAEM,GAAG,IAAK;QACd,MAAMC,GAAG,GAAGL,IAAI,CAACH,GAAG,CAAC,CAAC;QACtB,OAAOS,IAAI,CAACC,GAAG,CAACF,GAAG,GAAGD,GAAG,CAAC,GAAGT,SAAS,GAAGU,GAAG,GAAGD,GAAG;MACpD,CAAC,CAAC;MACF,IAAIX,WAAW,EAAES,OAAO,GAAGM,UAAU,CAACL,MAAM,EAAER,SAAS,CAAC;IAC1D,CAAC;IACDQ,MAAM,CAAC,CAAC;IACR,OAAO,MAAM;MACX,IAAID,OAAO,EAAEO,YAAY,CAACP,OAAO,CAAC;IACpC,CAAC;EACH,CAAC,EAAE,CAACT,WAAW,EAAEE,SAAS,EAAEG,MAAM,CAAC,CAAC;EACpC,OAAOD,GAAG;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASa,iBAAiBA,CAAC;EAChCC,UAAU,GAAG,gBAAgB;EAC7BjB,eAAe,GAAG;AACpB,CAAC,GAAG,CAAC,CAAC,EAAU;EACd,MAAMkB,UAAU,GAAG,IAAAC,0BAAa,EAAC,KAAK,CAAC;EACvC,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAG,IAAAhB,gCAAc,EAAiBL,eAAe,EAAE,MAAM;IAChF,MAAMsB,KAAK,GAAGL,UAAU,IAAIC,UAAU,EAAEK,GAAG,EAAEC,OAAO,GAAGP,UAAU,CAAC;IAClE,OAAOK,KAAK,GAAGG,QAAQ,CAACH,KAAK,EAAE,EAAE,CAAC,GAAG,CAAC;EACxC,CAAC,CAAC;EACF,IAAAf,gBAAS,EAAC,MAAM;IACd,MAAMmB,IAAI,GAAG,IAAIpB,IAAI,CAAC,CAAC;IACvB,MAAMgB,KAAK,GAAGI,IAAI,CAACC,iBAAiB,CAAC,CAAC;IACtCN,SAAS,CAACC,KAAK,CAAC;IAChB,IAAIL,UAAU,EAAE;MACdW,QAAQ,CAACC,MAAM,GAAG,IAAAC,iBAAS,EAACb,UAAU,EAAEK,KAAK,CAACS,QAAQ,CAAC,CAAC,EAAE;QAAEC,IAAI,EAAE;MAAI,CAAC,CAAC;IAC1E;EACF,CAAC,EAAE,CAACf,UAAU,EAAEI,SAAS,CAAC,CAAC;EAC3B,OAAOD,MAAM;AACf;AAEA,MAAMa,IAAI,GAAG;EACXC,MAAM,EAANA,eAAM;EACNC,OAAO,EAAPA,gBAAO;EACPC,MAAM,EAANA,eAAM;EACNlC,MAAM,EAANA,eAAM;EACNmC,OAAO,EAAPA,gBAAO;EACPlC,GAAG,EAAEG,IAAI,CAACH,GAAG;EACbmC,KAAK,EAALA,cAAK;EACLxC,UAAU;EACVkB;AACF,CAAC;AAAC,IAAAuB,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaC,MAAM,CAACC,MAAM,CAACC,cAAK,EAAEX,IAAI,CAAC","ignoreList":[]}
@@ -336,7 +336,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
336
336
  \**********************************/
337
337
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
338
338
 
339
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ useCurrent: function() { return /* binding */ useCurrent; },\n/* harmony export */ useTimezoneOffset: function() { return /* binding */ useTimezoneOffset; }\n/* harmony export */ });\n/* harmony import */ var cookie__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! cookie */ \"cookie\");\n/* harmony import */ var cookie__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(cookie__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! dayjs */ \"dayjs\");\n/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _dr_pogodin_js_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @dr.pogodin/js-utils */ \"@dr.pogodin/js-utils\");\n/* harmony import */ var _dr_pogodin_js_utils__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_dr_pogodin_js_utils__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @dr.pogodin/react-global-state */ \"@dr.pogodin/react-global-state\");\n/* harmony import */ var _dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _globalState__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./globalState */ \"./src/shared/utils/globalState.ts\");\n/* global document */\n\n\n\n\n\n\n\n\n/**\n * This react hook wraps Date.now() function in a SSR friendly way,\n * ensuring that all calls to useCurrent() within the same render return\n * exactly the same time (which is retrieved from Date.now() first, and\n * then stored in the global state to be reused in all other calls), which\n * is also passed and used in the first client side render, and then updated\n * with a finite precision to avoid infinite re-rendering loops.\n * @param [options] Optional settings.\n * @param [options.globalStatePath=\"currentTime\"] Global state path\n * to keep the current time value.\n * @param [options.precision= 5 * time.SEC_MS] Current time precision.\n * The hook won't update the current time stored in the global state unless it\n * is different from Date.now() result by this number (in milliseconds).\n * Default to 5 seconds.\n * @param [options.autorefresh=false] Set `true` to automatically\n * refresh time stored in the global state with the given `precision` (and\n * thus automatically re-rendering components dependent on this hook, or\n * the global state with the period equal to the `precision`.\n * @return Unix timestamp in milliseconds.\n */\n// TODO: Should we request the state type as generic parameter, to be able\n// to verify the give globalStatePath is correct?\nfunction useCurrent() {\n let {\n autorefresh = false,\n globalStatePath = 'currentTime',\n precision = 5 * _dr_pogodin_js_utils__WEBPACK_IMPORTED_MODULE_3__.SEC_MS\n } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n const [now, setter] = (0,_dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_4__.useGlobalState)(globalStatePath, Date.now);\n (0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(() => {\n let timerId;\n const update = () => {\n setter(old => {\n const neu = Date.now();\n return Math.abs(neu - old) > precision ? neu : old;\n });\n if (autorefresh) timerId = setTimeout(update, precision);\n };\n update();\n return () => {\n if (timerId) clearTimeout(timerId);\n };\n }, [autorefresh, precision, setter]);\n return now;\n}\n\n/**\n * Wraps the standard Date.getTimezoneOffset() method in a SSR-friendly way.\n * This hook retrieves the offset value at the client side and uses a cookie\n * to pass it to the server in subsequent requests from that user. At the server\n * side the value from cookie is used in renders and passed back to the client\n * via the global state. Prior to the value being known (in the very first\n * request from the user, when the cookie is still missing), zero value is used\n * as the default value.\n *\n * @param {object} [options] Optional settings.\n * @param {string} [options.cookieName=\"timezoneOffset\"] Optional. The name of\n * cookie to use to store the timezone offset. Defaults \"timezoneOffset\". Set\n * to a falsy value to forbid using cookies altogether (in that case the hook\n * will always return zero value at the server-side, and in the first render\n * at the client-side).\n * @param {string} [options.timezoneOffset=\"timezoneOffset\"] Optional.\n * The global state path to store the offset. Defaults \"timezoneOffset\".\n * @return {number} Timezone offset.\n */\n// TODO: Should we request the state type as generic parameter, to be able\n// to verify the give globalStatePath is correct?\nfunction useTimezoneOffset() {\n let {\n cookieName = 'timezoneOffset',\n globalStatePath = 'timezoneOffset'\n } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n const ssrContext = (0,_globalState__WEBPACK_IMPORTED_MODULE_5__.getSsrContext)(false);\n const [offset, setOffset] = (0,_dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_4__.useGlobalState)(globalStatePath, () => {\n var _ssrContext$req;\n const value = cookieName && (ssrContext === null || ssrContext === void 0 || (_ssrContext$req = ssrContext.req) === null || _ssrContext$req === void 0 || (_ssrContext$req = _ssrContext$req.cookies) === null || _ssrContext$req === void 0 ? void 0 : _ssrContext$req[cookieName]);\n return value ? parseInt(value, 10) : 0;\n });\n (0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(() => {\n const date = new Date();\n const value = date.getTimezoneOffset();\n setOffset(value);\n if (cookieName) {\n document.cookie = cookie__WEBPACK_IMPORTED_MODULE_0___default().serialize(cookieName, value.toString(), {\n path: '/'\n });\n }\n }, [cookieName, setOffset]);\n return offset;\n}\nconst time = {\n DAY_MS: _dr_pogodin_js_utils__WEBPACK_IMPORTED_MODULE_3__.DAY_MS,\n HOUR_MS: _dr_pogodin_js_utils__WEBPACK_IMPORTED_MODULE_3__.HOUR_MS,\n MIN_MS: _dr_pogodin_js_utils__WEBPACK_IMPORTED_MODULE_3__.MIN_MS,\n SEC_MS: _dr_pogodin_js_utils__WEBPACK_IMPORTED_MODULE_3__.SEC_MS,\n YEAR_MS: _dr_pogodin_js_utils__WEBPACK_IMPORTED_MODULE_3__.YEAR_MS,\n now: Date.now,\n timer: _dr_pogodin_js_utils__WEBPACK_IMPORTED_MODULE_3__.timer,\n useCurrent,\n useTimezoneOffset\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object.assign((dayjs__WEBPACK_IMPORTED_MODULE_1___default()), time));\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/utils/time.ts?");
339
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ useCurrent: function() { return /* binding */ useCurrent; },\n/* harmony export */ useTimezoneOffset: function() { return /* binding */ useTimezoneOffset; }\n/* harmony export */ });\n/* harmony import */ var cookie__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! cookie */ \"cookie\");\n/* harmony import */ var cookie__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(cookie__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! dayjs */ \"dayjs\");\n/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _dr_pogodin_js_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @dr.pogodin/js-utils */ \"@dr.pogodin/js-utils\");\n/* harmony import */ var _dr_pogodin_js_utils__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_dr_pogodin_js_utils__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @dr.pogodin/react-global-state */ \"@dr.pogodin/react-global-state\");\n/* harmony import */ var _dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _globalState__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./globalState */ \"./src/shared/utils/globalState.ts\");\n\n\n\n\n\n\n\n/**\n * This react hook wraps Date.now() function in a SSR friendly way,\n * ensuring that all calls to useCurrent() within the same render return\n * exactly the same time (which is retrieved from Date.now() first, and\n * then stored in the global state to be reused in all other calls), which\n * is also passed and used in the first client side render, and then updated\n * with a finite precision to avoid infinite re-rendering loops.\n */\n// TODO: Should we request the state type as generic parameter, to be able\n// to verify the give globalStatePath is correct?\nfunction useCurrent() {\n let {\n autorefresh = false,\n globalStatePath = 'currentTime',\n precision = 5 * _dr_pogodin_js_utils__WEBPACK_IMPORTED_MODULE_3__.SEC_MS\n } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n const [now, setter] = (0,_dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_4__.useGlobalState)(globalStatePath, Date.now);\n (0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(() => {\n let timerId;\n const update = () => {\n setter(old => {\n const neu = Date.now();\n return Math.abs(neu - old) > precision ? neu : old;\n });\n if (autorefresh) timerId = setTimeout(update, precision);\n };\n update();\n return () => {\n if (timerId) clearTimeout(timerId);\n };\n }, [autorefresh, precision, setter]);\n return now;\n}\n\n/**\n * Wraps the standard Date.getTimezoneOffset() method in a SSR-friendly way.\n * This hook retrieves the offset value at the client side and uses a cookie\n * to pass it to the server in subsequent requests from that user. At the server\n * side the value from cookie is used in renders and passed back to the client\n * via the global state. Prior to the value being known (in the very first\n * request from the user, when the cookie is still missing), zero value is used\n * as the default value.\n */\n// TODO: Should we request the state type as generic parameter, to be able\n// to verify the give globalStatePath is correct?\nfunction useTimezoneOffset() {\n let {\n cookieName = 'timezoneOffset',\n globalStatePath = 'timezoneOffset'\n } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n const ssrContext = (0,_globalState__WEBPACK_IMPORTED_MODULE_5__.getSsrContext)(false);\n const [offset, setOffset] = (0,_dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_4__.useGlobalState)(globalStatePath, () => {\n var _ssrContext$req;\n const value = cookieName && (ssrContext === null || ssrContext === void 0 || (_ssrContext$req = ssrContext.req) === null || _ssrContext$req === void 0 || (_ssrContext$req = _ssrContext$req.cookies) === null || _ssrContext$req === void 0 ? void 0 : _ssrContext$req[cookieName]);\n return value ? parseInt(value, 10) : 0;\n });\n (0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(() => {\n const date = new Date();\n const value = date.getTimezoneOffset();\n setOffset(value);\n if (cookieName) {\n document.cookie = (0,cookie__WEBPACK_IMPORTED_MODULE_0__.serialize)(cookieName, value.toString(), {\n path: '/'\n });\n }\n }, [cookieName, setOffset]);\n return offset;\n}\nconst time = {\n DAY_MS: _dr_pogodin_js_utils__WEBPACK_IMPORTED_MODULE_3__.DAY_MS,\n HOUR_MS: _dr_pogodin_js_utils__WEBPACK_IMPORTED_MODULE_3__.HOUR_MS,\n MIN_MS: _dr_pogodin_js_utils__WEBPACK_IMPORTED_MODULE_3__.MIN_MS,\n SEC_MS: _dr_pogodin_js_utils__WEBPACK_IMPORTED_MODULE_3__.SEC_MS,\n YEAR_MS: _dr_pogodin_js_utils__WEBPACK_IMPORTED_MODULE_3__.YEAR_MS,\n now: Date.now,\n timer: _dr_pogodin_js_utils__WEBPACK_IMPORTED_MODULE_3__.timer,\n useCurrent,\n useTimezoneOffset\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object.assign((dayjs__WEBPACK_IMPORTED_MODULE_1___default()), time));\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/utils/time.ts?");
340
340
 
341
341
  /***/ }),
342
342
 
@@ -1,22 +1,10 @@
1
- "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;exports.useCurrent=useCurrent;exports.useTimezoneOffset=useTimezoneOffset;var _cookie=_interopRequireDefault(require("cookie"));var _dayjs=_interopRequireDefault(require("dayjs"));var _react=require("react");var _jsUtils=require("@dr.pogodin/js-utils");var _reactGlobalState=require("@dr.pogodin/react-global-state");var _globalState=require("./globalState");/* global document *//**
1
+ "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;exports.useCurrent=useCurrent;exports.useTimezoneOffset=useTimezoneOffset;var _cookie=require("cookie");var _dayjs=_interopRequireDefault(require("dayjs"));var _react=require("react");var _jsUtils=require("@dr.pogodin/js-utils");var _reactGlobalState=require("@dr.pogodin/react-global-state");var _globalState=require("./globalState");/**
2
2
  * This react hook wraps Date.now() function in a SSR friendly way,
3
3
  * ensuring that all calls to useCurrent() within the same render return
4
4
  * exactly the same time (which is retrieved from Date.now() first, and
5
5
  * then stored in the global state to be reused in all other calls), which
6
6
  * is also passed and used in the first client side render, and then updated
7
7
  * with a finite precision to avoid infinite re-rendering loops.
8
- * @param [options] Optional settings.
9
- * @param [options.globalStatePath="currentTime"] Global state path
10
- * to keep the current time value.
11
- * @param [options.precision= 5 * time.SEC_MS] Current time precision.
12
- * The hook won't update the current time stored in the global state unless it
13
- * is different from Date.now() result by this number (in milliseconds).
14
- * Default to 5 seconds.
15
- * @param [options.autorefresh=false] Set `true` to automatically
16
- * refresh time stored in the global state with the given `precision` (and
17
- * thus automatically re-rendering components dependent on this hook, or
18
- * the global state with the period equal to the `precision`.
19
- * @return Unix timestamp in milliseconds.
20
8
  */// TODO: Should we request the state type as generic parameter, to be able
21
9
  // to verify the give globalStatePath is correct?
22
10
  function useCurrent({autorefresh=false,globalStatePath="currentTime",precision=5*_jsUtils.SEC_MS}={}){const[now,setter]=(0,_reactGlobalState.useGlobalState)(globalStatePath,Date.now);(0,_react.useEffect)(()=>{let timerId;const update=()=>{setter(old=>{const neu=Date.now();return Math.abs(neu-old)>precision?neu:old});if(autorefresh)timerId=setTimeout(update,precision)};update();return()=>{if(timerId)clearTimeout(timerId)}},[autorefresh,precision,setter]);return now}/**
@@ -27,17 +15,7 @@ function useCurrent({autorefresh=false,globalStatePath="currentTime",precision=5
27
15
  * via the global state. Prior to the value being known (in the very first
28
16
  * request from the user, when the cookie is still missing), zero value is used
29
17
  * as the default value.
30
- *
31
- * @param {object} [options] Optional settings.
32
- * @param {string} [options.cookieName="timezoneOffset"] Optional. The name of
33
- * cookie to use to store the timezone offset. Defaults "timezoneOffset". Set
34
- * to a falsy value to forbid using cookies altogether (in that case the hook
35
- * will always return zero value at the server-side, and in the first render
36
- * at the client-side).
37
- * @param {string} [options.timezoneOffset="timezoneOffset"] Optional.
38
- * The global state path to store the offset. Defaults "timezoneOffset".
39
- * @return {number} Timezone offset.
40
18
  */// TODO: Should we request the state type as generic parameter, to be able
41
19
  // to verify the give globalStatePath is correct?
42
- function useTimezoneOffset({cookieName="timezoneOffset",globalStatePath="timezoneOffset"}={}){const ssrContext=(0,_globalState.getSsrContext)(false);const[offset,setOffset]=(0,_reactGlobalState.useGlobalState)(globalStatePath,()=>{const value=cookieName&&ssrContext?.req?.cookies?.[cookieName];return value?parseInt(value,10):0});(0,_react.useEffect)(()=>{const date=new Date;const value=date.getTimezoneOffset();setOffset(value);if(cookieName){document.cookie=_cookie.default.serialize(cookieName,value.toString(),{path:"/"})}},[cookieName,setOffset]);return offset}const time={DAY_MS:_jsUtils.DAY_MS,HOUR_MS:_jsUtils.HOUR_MS,MIN_MS:_jsUtils.MIN_MS,SEC_MS:_jsUtils.SEC_MS,YEAR_MS:_jsUtils.YEAR_MS,now:Date.now,timer:_jsUtils.timer,useCurrent,useTimezoneOffset};var _default=exports.default=Object.assign(_dayjs.default,time);
20
+ function useTimezoneOffset({cookieName="timezoneOffset",globalStatePath="timezoneOffset"}={}){const ssrContext=(0,_globalState.getSsrContext)(false);const[offset,setOffset]=(0,_reactGlobalState.useGlobalState)(globalStatePath,()=>{const value=cookieName&&ssrContext?.req?.cookies?.[cookieName];return value?parseInt(value,10):0});(0,_react.useEffect)(()=>{const date=new Date;const value=date.getTimezoneOffset();setOffset(value);if(cookieName){document.cookie=(0,_cookie.serialize)(cookieName,value.toString(),{path:"/"})}},[cookieName,setOffset]);return offset}const time={DAY_MS:_jsUtils.DAY_MS,HOUR_MS:_jsUtils.HOUR_MS,MIN_MS:_jsUtils.MIN_MS,SEC_MS:_jsUtils.SEC_MS,YEAR_MS:_jsUtils.YEAR_MS,now:Date.now,timer:_jsUtils.timer,useCurrent,useTimezoneOffset};var _default=exports.default=Object.assign(_dayjs.default,time);
43
21
  //# sourceMappingURL=time.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"time.js","names":["_cookie","_interopRequireDefault","require","_dayjs","_react","_jsUtils","_reactGlobalState","_globalState","useCurrent","autorefresh","globalStatePath","precision","SEC_MS","now","setter","useGlobalState","Date","useEffect","timerId","update","old","neu","Math","abs","setTimeout","clearTimeout","useTimezoneOffset","cookieName","ssrContext","getSsrContext","offset","setOffset","value","req","cookies","parseInt","date","getTimezoneOffset","document","cookie","Cookie","serialize","toString","path","time","DAY_MS","HOUR_MS","MIN_MS","YEAR_MS","timer","_default","exports","default","Object","assign","dayjs"],"sources":["../../../../src/shared/utils/time.ts"],"sourcesContent":["/* global document */\n\nimport Cookie from 'cookie';\nimport dayjs from 'dayjs';\nimport { useEffect } from 'react';\n\nimport {\n DAY_MS,\n HOUR_MS,\n MIN_MS,\n SEC_MS,\n YEAR_MS,\n timer,\n} from '@dr.pogodin/js-utils';\n\nimport { type ForceT, useGlobalState } from '@dr.pogodin/react-global-state';\n\nimport { getSsrContext } from './globalState';\n\n/**\n * This react hook wraps Date.now() function in a SSR friendly way,\n * ensuring that all calls to useCurrent() within the same render return\n * exactly the same time (which is retrieved from Date.now() first, and\n * then stored in the global state to be reused in all other calls), which\n * is also passed and used in the first client side render, and then updated\n * with a finite precision to avoid infinite re-rendering loops.\n * @param [options] Optional settings.\n * @param [options.globalStatePath=\"currentTime\"] Global state path\n * to keep the current time value.\n * @param [options.precision= 5 * time.SEC_MS] Current time precision.\n * The hook won't update the current time stored in the global state unless it\n * is different from Date.now() result by this number (in milliseconds).\n * Default to 5 seconds.\n * @param [options.autorefresh=false] Set `true` to automatically\n * refresh time stored in the global state with the given `precision` (and\n * thus automatically re-rendering components dependent on this hook, or\n * the global state with the period equal to the `precision`.\n * @return Unix timestamp in milliseconds.\n */\n// TODO: Should we request the state type as generic parameter, to be able\n// to verify the give globalStatePath is correct?\nexport function useCurrent({\n autorefresh = false,\n globalStatePath = 'currentTime',\n precision = 5 * SEC_MS,\n} = {}) {\n const [now, setter] = useGlobalState<ForceT, number>(globalStatePath, Date.now);\n useEffect(() => {\n let timerId: NodeJS.Timeout;\n const update = () => {\n setter((old) => {\n const neu = Date.now();\n return Math.abs(neu - old) > precision ? neu : old;\n });\n if (autorefresh) timerId = setTimeout(update, precision);\n };\n update();\n return () => {\n if (timerId) clearTimeout(timerId);\n };\n }, [autorefresh, precision, setter]);\n return now;\n}\n\n/**\n * Wraps the standard Date.getTimezoneOffset() method in a SSR-friendly way.\n * This hook retrieves the offset value at the client side and uses a cookie\n * to pass it to the server in subsequent requests from that user. At the server\n * side the value from cookie is used in renders and passed back to the client\n * via the global state. Prior to the value being known (in the very first\n * request from the user, when the cookie is still missing), zero value is used\n * as the default value.\n *\n * @param {object} [options] Optional settings.\n * @param {string} [options.cookieName=\"timezoneOffset\"] Optional. The name of\n * cookie to use to store the timezone offset. Defaults \"timezoneOffset\". Set\n * to a falsy value to forbid using cookies altogether (in that case the hook\n * will always return zero value at the server-side, and in the first render\n * at the client-side).\n * @param {string} [options.timezoneOffset=\"timezoneOffset\"] Optional.\n * The global state path to store the offset. Defaults \"timezoneOffset\".\n * @return {number} Timezone offset.\n */\n// TODO: Should we request the state type as generic parameter, to be able\n// to verify the give globalStatePath is correct?\nexport function useTimezoneOffset({\n cookieName = 'timezoneOffset',\n globalStatePath = 'timezoneOffset',\n} = {}) {\n const ssrContext = getSsrContext(false);\n const [offset, setOffset] = useGlobalState<ForceT, number>(globalStatePath, () => {\n const value = cookieName && ssrContext?.req?.cookies?.[cookieName];\n return value ? parseInt(value, 10) : 0;\n });\n useEffect(() => {\n const date = new Date();\n const value = date.getTimezoneOffset();\n setOffset(value);\n if (cookieName) {\n document.cookie = Cookie.serialize(cookieName, value.toString(), { path: '/' });\n }\n }, [cookieName, setOffset]);\n return offset;\n}\n\nconst time = {\n DAY_MS,\n HOUR_MS,\n MIN_MS,\n SEC_MS,\n YEAR_MS,\n now: Date.now,\n timer,\n useCurrent,\n useTimezoneOffset,\n};\n\nexport default Object.assign(dayjs, time);\n"],"mappings":"0PAEA,IAAAA,OAAA,CAAAC,sBAAA,CAAAC,OAAA,YACA,IAAAC,MAAA,CAAAF,sBAAA,CAAAC,OAAA,WACA,IAAAE,MAAA,CAAAF,OAAA,UAEA,IAAAG,QAAA,CAAAH,OAAA,yBASA,IAAAI,iBAAA,CAAAJ,OAAA,mCAEA,IAAAK,YAAA,CAAAL,OAAA,kBAjBA,qBAmBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACA;AACA;AACO,QAAS,CAAAM,UAAUA,CAAC,CACzBC,WAAW,CAAG,KAAK,CACnBC,eAAe,CAAG,aAAa,CAC/BC,SAAS,CAAG,CAAC,CAAGC,eAClB,CAAC,CAAG,CAAC,CAAC,CAAE,CACN,KAAM,CAACC,GAAG,CAAEC,MAAM,CAAC,CAAG,GAAAC,gCAAc,EAAiBL,eAAe,CAAEM,IAAI,CAACH,GAAG,CAAC,CAC/E,GAAAI,gBAAS,EAAC,IAAM,CACd,GAAI,CAAAC,OAAuB,CAC3B,KAAM,CAAAC,MAAM,CAAGA,CAAA,GAAM,CACnBL,MAAM,CAAEM,GAAG,EAAK,CACd,KAAM,CAAAC,GAAG,CAAGL,IAAI,CAACH,GAAG,CAAC,CAAC,CACtB,MAAO,CAAAS,IAAI,CAACC,GAAG,CAACF,GAAG,CAAGD,GAAG,CAAC,CAAGT,SAAS,CAAGU,GAAG,CAAGD,GACjD,CAAC,CAAC,CACF,GAAIX,WAAW,CAAES,OAAO,CAAGM,UAAU,CAACL,MAAM,CAAER,SAAS,CACzD,CAAC,CACDQ,MAAM,CAAC,CAAC,CACR,MAAO,IAAM,CACX,GAAID,OAAO,CAAEO,YAAY,CAACP,OAAO,CACnC,CACF,CAAC,CAAE,CAACT,WAAW,CAAEE,SAAS,CAAEG,MAAM,CAAC,CAAC,CACpC,MAAO,CAAAD,GACT,CAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACA;AACA;AACO,QAAS,CAAAa,iBAAiBA,CAAC,CAChCC,UAAU,CAAG,gBAAgB,CAC7BjB,eAAe,CAAG,gBACpB,CAAC,CAAG,CAAC,CAAC,CAAE,CACN,KAAM,CAAAkB,UAAU,CAAG,GAAAC,0BAAa,EAAC,KAAK,CAAC,CACvC,KAAM,CAACC,MAAM,CAAEC,SAAS,CAAC,CAAG,GAAAhB,gCAAc,EAAiBL,eAAe,CAAE,IAAM,CAChF,KAAM,CAAAsB,KAAK,CAAGL,UAAU,EAAIC,UAAU,EAAEK,GAAG,EAAEC,OAAO,GAAGP,UAAU,CAAC,CAClE,MAAO,CAAAK,KAAK,CAAGG,QAAQ,CAACH,KAAK,CAAE,EAAE,CAAC,CAAG,CACvC,CAAC,CAAC,CACF,GAAAf,gBAAS,EAAC,IAAM,CACd,KAAM,CAAAmB,IAAI,CAAG,GAAI,CAAApB,IAAM,CACvB,KAAM,CAAAgB,KAAK,CAAGI,IAAI,CAACC,iBAAiB,CAAC,CAAC,CACtCN,SAAS,CAACC,KAAK,CAAC,CAChB,GAAIL,UAAU,CAAE,CACdW,QAAQ,CAACC,MAAM,CAAGC,eAAM,CAACC,SAAS,CAACd,UAAU,CAAEK,KAAK,CAACU,QAAQ,CAAC,CAAC,CAAE,CAAEC,IAAI,CAAE,GAAI,CAAC,CAChF,CACF,CAAC,CAAE,CAAChB,UAAU,CAAEI,SAAS,CAAC,CAAC,CAC3B,MAAO,CAAAD,MACT,CAEA,KAAM,CAAAc,IAAI,CAAG,CACXC,MAAM,CAANA,eAAM,CACNC,OAAO,CAAPA,gBAAO,CACPC,MAAM,CAANA,eAAM,CACNnC,MAAM,CAANA,eAAM,CACNoC,OAAO,CAAPA,gBAAO,CACPnC,GAAG,CAAEG,IAAI,CAACH,GAAG,CACboC,KAAK,CAALA,cAAK,CACLzC,UAAU,CACVkB,iBACF,CAAC,CAAC,IAAAwB,QAAA,CAAAC,OAAA,CAAAC,OAAA,CAEaC,MAAM,CAACC,MAAM,CAACC,cAAK,CAAEX,IAAI,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"time.js","names":["_cookie","require","_dayjs","_interopRequireDefault","_react","_jsUtils","_reactGlobalState","_globalState","useCurrent","autorefresh","globalStatePath","precision","SEC_MS","now","setter","useGlobalState","Date","useEffect","timerId","update","old","neu","Math","abs","setTimeout","clearTimeout","useTimezoneOffset","cookieName","ssrContext","getSsrContext","offset","setOffset","value","req","cookies","parseInt","date","getTimezoneOffset","document","cookie","serialize","toString","path","time","DAY_MS","HOUR_MS","MIN_MS","YEAR_MS","timer","_default","exports","default","Object","assign","dayjs"],"sources":["../../../../src/shared/utils/time.ts"],"sourcesContent":["import { serialize } from 'cookie';\nimport dayjs from 'dayjs';\nimport { useEffect } from 'react';\n\nimport {\n DAY_MS,\n HOUR_MS,\n MIN_MS,\n SEC_MS,\n YEAR_MS,\n timer,\n} from '@dr.pogodin/js-utils';\n\nimport { type ForceT, useGlobalState } from '@dr.pogodin/react-global-state';\n\nimport { getSsrContext } from './globalState';\n\n/**\n * This react hook wraps Date.now() function in a SSR friendly way,\n * ensuring that all calls to useCurrent() within the same render return\n * exactly the same time (which is retrieved from Date.now() first, and\n * then stored in the global state to be reused in all other calls), which\n * is also passed and used in the first client side render, and then updated\n * with a finite precision to avoid infinite re-rendering loops.\n */\n// TODO: Should we request the state type as generic parameter, to be able\n// to verify the give globalStatePath is correct?\nexport function useCurrent({\n autorefresh = false,\n globalStatePath = 'currentTime',\n precision = 5 * SEC_MS,\n} = {}): number {\n const [now, setter] = useGlobalState<ForceT, number>(globalStatePath, Date.now);\n useEffect(() => {\n let timerId: NodeJS.Timeout;\n const update = () => {\n setter((old) => {\n const neu = Date.now();\n return Math.abs(neu - old) > precision ? neu : old;\n });\n if (autorefresh) timerId = setTimeout(update, precision);\n };\n update();\n return () => {\n if (timerId) clearTimeout(timerId);\n };\n }, [autorefresh, precision, setter]);\n return now;\n}\n\n/**\n * Wraps the standard Date.getTimezoneOffset() method in a SSR-friendly way.\n * This hook retrieves the offset value at the client side and uses a cookie\n * to pass it to the server in subsequent requests from that user. At the server\n * side the value from cookie is used in renders and passed back to the client\n * via the global state. Prior to the value being known (in the very first\n * request from the user, when the cookie is still missing), zero value is used\n * as the default value.\n */\n// TODO: Should we request the state type as generic parameter, to be able\n// to verify the give globalStatePath is correct?\nexport function useTimezoneOffset({\n cookieName = 'timezoneOffset',\n globalStatePath = 'timezoneOffset',\n} = {}): number {\n const ssrContext = getSsrContext(false);\n const [offset, setOffset] = useGlobalState<ForceT, number>(globalStatePath, () => {\n const value = cookieName && ssrContext?.req?.cookies?.[cookieName];\n return value ? parseInt(value, 10) : 0;\n });\n useEffect(() => {\n const date = new Date();\n const value = date.getTimezoneOffset();\n setOffset(value);\n if (cookieName) {\n document.cookie = serialize(cookieName, value.toString(), { path: '/' });\n }\n }, [cookieName, setOffset]);\n return offset;\n}\n\nconst time = {\n DAY_MS,\n HOUR_MS,\n MIN_MS,\n SEC_MS,\n YEAR_MS,\n now: Date.now,\n timer,\n useCurrent,\n useTimezoneOffset,\n};\n\nexport default Object.assign(dayjs, time);\n"],"mappings":"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","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"style.css","mappings":"AAUA,2ZASE,SACA,aACA,eAJA,SACA,UAIA,wBAIF,8EAEE,cAGF,KACE,cAGF,MACE,gBAGF,aACE,YAGF,oDACE,WACA,aAGF,MACE,yBACA,iBC9CF,KACE,oBAGF,EACE,sBCJA,6CACE,gBACA,YACA,OACA,WACA,eACA,MACA,WACA,WCR0B,CDU1B,4EAGF,6CACE,gBAEA,mBADA,2CASA,SAPA,gBACA,gBEPQ,CFQR,gBACA,mBAEA,eACA,QAEA,+BAJA,YAKA,YEeF,yBF5BA,6CAgBI,gBGlCN,SACE,gBCDF,QACE,QACA,WACA,eACA,aCJF,8CASE,kBACE,oBACA,YACA,kBACA,+CAKF,qBACE,+CAGF,qBAtBO,mBAwBL,eACA,gBACA,aACA,2BACA,kBACA,gEACA,iEAEA,iBACE,+BACA,+CAIJ,cACE,aACA,eACA,CAIE,gIAGF,kBACE,WACA,+CAIJ,eACE,CAEA,qBACA,CA1DK,2BAyDL,gBACA,kCACA,eACA,aACA,+CAGF,4DACE,2BAjEK,4BAmEL,SACA,kBACA,kBACA,QACA,MACA,iEAEA,WACE,uEAKF,wBACE,uEAGF,iBACE,4BACA,4FASA,sBACE,4FAGF,2BACE,oEAKJ,kBACE,CA1GG,2BA4GH,CAFA,yBA1GG,CA4GH,eAMA,CClHN,6CAGE,YACE,OACA,gBACA,gBACA,kBACA,8CAGF,4DACE,sBACA,4BACA,SACA,kBACA,oBACA,kBACA,QACA,MACA,gEAEA,WACE,8CAIJ,kBACE,oBACA,YACA,kBACA,2IAGF,8DAEE,6BACA,mEAIA,gCACA,8CAGF,qBACE,iDAGF,wDACA,0DAEA,uBACE,CADF,oBACE,CADF,eACE,gBACA,sBACA,mBACA,cACA,eACA,qBACA,OACA,aACA,eACA,aACA,0CACA,mEAEA,eACE,4BACA,6BACA,gEAGF,iBACE,+BACA,mEAGF,WC1EF,8CACE,mBACA,aACA,SAGF,8CACE,6BACA,mBACA,eACA,aACA,eAEA,gEACE,kBACA,+BAIJ,8CAEE,gBADA,sBAEA,eAGF,8CACE,mBACA,mBACA,sBACA,mBACA,aACA,SACA,aACA,gECpCJ,kBACE,mBCMA,+CACE,6DACA,sBACA,mBACA,cACA,eACA,qBACA,aACA,YACA,mBACA,kBACA,qBACA,gEAEA,uEACE,cAGF,wIAEE,+DAEA,kBADA,oCACA,CAGF,iEAEE,kBADA,+BAEA,aAKJ,+CACE,mBACA,YAKA,wIAEE,6DACA,gBC/CJ,6CACE,6DACA,gBACA,sBACA,mBACA,eACA,aACA,aAEA,SADA,aAEA,YAGE,uFACE,gBACA,mBACA,WACA,cACA,WACA,YACA,UAIJ,+DACE,kBACA,+BAIA,oFACE,gBACA,mBACA,WACA,cACA,YACA,iBACA,UAKN,6CACE,mBACA,oBACA,YAGF,gDACE,sBAGF,6CACE,YAEA,qEACE,6BCxDJ,8CACE,mBACA,oBACA,YAGF,8CACE,sBACA,mBACA,YACA,aACA,aACA,mCAEA,gEACE,kBACA,+BAIJ,8CACE,sBCZF,6CACE,aACA,iBACA,gBACA,WAGF,6CACE,gBACA,cACA,YVNQ,CUSV,6CACE,OACA,gBC3BJ,kBACE,aACA,aAMA,gDACE,qBAGF,6CACE,gDACA,gBACA,mBACA,qBACA,YACA,cACA,kBACA,WAEA,sGACA,kGCvBJ,kBACE,aACA,cAMA,8CACE,uBAIA,SAHA,oBACA,kBACA,OACA,CAOF,8CASE,qBARA,gBACA,mBACA,WACA,qBAIA,OAHA,eACA,kBACA,KAEA,CAGF,iDACE,qBC9BF,iDACE,kBACA,mBACA,kBAGF,iDACE,YACA,kBACA,WCTF,mDACE,kBACA,kBACA,QACA,0BACA,WCHF,8CACE,YACA,kBAGF,8CACE,gBACA,sBACA,mBACA,sBACA,aACA,SACA,aACA,gBACA,mCACA,YAEA,gEACE,kBACA,+BAGF,oGACE,WADF,qFACE,WAGF,yEACE,gCAEA,yBADA,mBAEA,gEAIJ,8CACE,kBACA","sources":["webpack://@dr.pogodin/react-utils/./src/styles/_global/reset.css","webpack://@dr.pogodin/react-utils/./src/styles/global.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/Modal/base-theme.scss","webpack://@dr.pogodin/react-utils/./src/styles/mixins.scss","webpack://@dr.pogodin/react-utils/./src/styles/_mixins/media.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/Modal/styles.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/selectors/CustomDropdown/Options/style.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/selectors/CustomDropdown/theme.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/selectors/NativeDropdown/theme.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/selectors/Switch/theme.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/GenericLink/style.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/Button/style.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/Checkbox/theme.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/Input/theme.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/PageLayout/base-theme.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/Throbber/theme.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/WithTooltip/default-theme.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/YouTubeVideo/base.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/YouTubeVideo/throbber.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/TextArea/style.scss"],"sourcesContent":[null,"a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font:inherit;font-size:100%;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote::before,blockquote::after,q::before,q::after{content:\"\";content:none}table{border-collapse:collapse;border-spacing:0}body{text-rendering:auto}*{box-sizing:border-box}","*.overlay,.context.overlay,.ad.hoc.overlay{background:#eee;height:100%;left:0;opacity:.8;position:fixed;top:0;width:100%;z-index:998}*.overlay:focus,.context.overlay:focus,.ad.hoc.overlay:focus{outline:none}*.container,.context.container,.ad.hoc.container{background:#fff;box-shadow:0 0 14px 1px rgba(38,38,40,.15);border-radius:.3em;max-height:95vh;max-width:1024px;overflow:hidden;padding:.6em 1.2em;width:480px;position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);z-index:999}@media(max-width: 1280px){*.container,.context.container,.ad.hoc.container{max-width:95vw}}",null,null,".scrollingDisabledByModal{overflow:hidden}",".overlay{inset:0;opacity:.2;position:fixed;z-index:1000}","*.container,.context.container,.ad.hoc.container{align-items:center;display:inline-flex;margin:.1em;position:relative}*.label,.context.label,.ad.hoc.label{margin:0 .6em 0 1.2em}*.dropdown,.context.dropdown,.ad.hoc.dropdown{border:1px solid gray;border-radius:.3em;cursor:pointer;min-width:200px;outline:none;padding:.3em 3em .3em .6em;position:relative;user-select:none}*.dropdown:focus,.context.dropdown:focus,.ad.hoc.dropdown:focus{border-color:blue;box-shadow:0 0 3px 1px #add8e6}*.option,.context.option,.ad.hoc.option{cursor:pointer;outline:none;padding:0 .6em}*.option:focus,.context.option:focus,.ad.hoc.option:focus{background:#4169e1;color:#fff}*.option:hover,.context.option:hover,.ad.hoc.option:hover{background:#4169e1;color:#fff}*.select,.context.select,.ad.hoc.select{background:#fff;border:1px solid gray;border-radius:0 0 .3em .3em;border-top:none;box-shadow:0 6px 12px 3px #d3d3d3;position:fixed;z-index:1001}*.arrow,.context.arrow,.ad.hoc.arrow{background-image:linear-gradient(to top, lightgray, white 50%, white);border-left:1px solid gray;border-radius:0 .3em .3em 0;bottom:0;padding:.3em .6em;position:absolute;right:0;top:0}*.arrow::after,.context.arrow::after,.ad.hoc.arrow::after{content:\"▼\"}*.active .arrow,.context.active .arrow,.ad.hoc.active .arrow{border-radius:0 .3em 0 0}*.active .dropdown,.context.active .dropdown,.ad.hoc.active .dropdown{border-color:blue;border-radius:.3em .3em 0 0}*.upward.active .arrow,.context.upward.active .arrow,.ad.hoc.upward.active .arrow{border-radius:0 0 .3em}*.upward.active .dropdown,.context.upward.active .dropdown,.ad.hoc.upward.active .dropdown{border-radius:0 0 .3em .3em}*.upward.select,.context.upward.select,.ad.hoc.upward.select{border-bottom:none;border-top:1px solid gray;border-radius:.3em .3em 0 0;box-shadow:none}","*.dropdown,.context.dropdown,.ad.hoc.dropdown{display:flex;flex:1;min-width:5.5em;overflow:hidden;position:relative}*.arrow,.context.arrow,.ad.hoc.arrow{background-image:linear-gradient(to top, lightgray, white 50%, white);border:1px solid gray;border-radius:0 .3em .3em 0;bottom:0;padding:.3em .6em;pointer-events:none;position:absolute;right:0;top:0}*.arrow::after,.context.arrow::after,.ad.hoc.arrow::after{content:\"▼\"}*.container,.context.container,.ad.hoc.container{align-items:center;display:inline-flex;margin:.1em;position:relative}.active+*.arrow,:active+*.arrow,.active+.context.arrow,:active+.context.arrow,.active+.ad.hoc.arrow,:active+.ad.hoc.arrow{background-image:linear-gradient(to bottom, lightgray, white 50%, white);border-bottom-right-radius:0}:focus+*.arrow,:focus+.context.arrow,:focus+.ad.hoc.arrow{border-color:blue;border-left-color:gray}*.label,.context.label,.ad.hoc.label{margin:0 .6em 0 1.5em}*.option,.context.option,.ad.hoc.option{color:#000}*.hiddenOption,.context.hiddenOption,.ad.hoc.hiddenOption{display:none}*.select,.context.select,.ad.hoc.select{appearance:none;background:#fff;border:1px solid gray;border-radius:.3em;color:inherit;cursor:pointer;display:inline-block;flex:1;font:inherit;max-width:100%;outline:none;padding:.3em 3.3em calc(.3em + 1px) 1.2em}*.select:active,.context.select:active,.ad.hoc.select:active{background:#fff;border-bottom-left-radius:0;border-bottom-right-radius:0}*.select:focus,.context.select:focus,.ad.hoc.select:focus{border-color:blue;box-shadow:0 0 3px 1px #add8e6}*.select.invalid,.context.select.invalid,.ad.hoc.select.invalid{color:gray}","*.container,.context.container,.ad.hoc.container{align-items:center;display:flex;gap:.6em}*.option,.context.option,.ad.hoc.option{border:1px solid rgba(0,0,0,0);border-radius:.3em;cursor:pointer;outline:none;padding:0 .9em}*.option:focus,.context.option:focus,.ad.hoc.option:focus{border-color:blue;box-shadow:0 0 3px 1px #add8e6}*.selected,.context.selected,.ad.hoc.selected{border:1px solid gray;background:#fff;cursor:default}*.options,.context.options,.ad.hoc.options{align-items:center;background:#f5f5f5;border:1px solid gray;border-radius:.3em;display:flex;gap:.3em;padding:.3em;user-select:none}",".link[disabled]{cursor:not-allowed}","*.button,.context.button,.ad.hoc.button{background-image:linear-gradient(to top, lightgray, white 50%, white);border:solid 1px gray;border-radius:.3em;color:inherit;cursor:pointer;display:inline-block;font:inherit;margin:.1em;padding:.3em 1.2em;text-align:center;text-decoration:none;user-select:none}*.button:visited,.context.button:visited,.ad.hoc.button:visited{color:inherit}*.button.active,*.button:active,.context.button.active,.context.button:active,.ad.hoc.button.active,.ad.hoc.button:active{background-image:linear-gradient(to bottom, lightgray, white 50%, white);box-shadow:inset 0 1px 3px 0 #d3d3d3;border-color:gray}*.button:focus,.context.button:focus,.ad.hoc.button:focus{box-shadow:0 0 3px 1px #add8e6;border-color:blue;outline:none}*.disabled,.context.disabled,.ad.hoc.disabled{cursor:not-allowed;opacity:.33}*.disabled.active,*.disabled:active,.context.disabled.active,.context.disabled:active,.ad.hoc.disabled.active,.ad.hoc.disabled:active{background-image:linear-gradient(to top, lightgray, white 50%, white);box-shadow:none}","*.checkbox,.context.checkbox,.ad.hoc.checkbox{appearance:none;background:#fff;border:1px solid gray;border-radius:.3em;cursor:pointer;font:inherit;height:1.5em;outline:none;margin:0;width:1.5em}*.checkbox:checked::after,.context.checkbox:checked::after,.ad.hoc.checkbox:checked::after{background:#000;border-radius:.3em;content:\"\";display:block;height:1em;margin:.2em;width:1em}*.checkbox:focus,.context.checkbox:focus,.ad.hoc.checkbox:focus{border-color:blue;box-shadow:0 0 3px 1px #add8e6}*.checkbox.indeterminate::after,.context.checkbox.indeterminate::after,.ad.hoc.checkbox.indeterminate::after{background:#000;border-radius:.2em;content:\"\";display:block;height:.2em;margin:.6em .2em;width:1em}*.container,.context.container,.ad.hoc.container{align-items:center;display:inline-flex;margin:.1em}*.label,.context.label,.ad.hoc.label{margin:0 .6em 0 1.5em}*.disabled,.context.disabled,.ad.hoc.disabled{opacity:.33}*.disabled .checkbox,.context.disabled .checkbox,.ad.hoc.disabled .checkbox{cursor:not-allowed !important}","*.container,.context.container,.ad.hoc.container{align-items:center;display:inline-flex;margin:.1em}*.input,.context.input,.ad.hoc.input{border:1px solid gray;border-radius:.3em;cursor:text;font:inherit;outline:none;padding:.3em .3em calc(.3em + 1px)}*.input:focus,.context.input:focus,.ad.hoc.input:focus{border-color:blue;box-shadow:0 0 3px 1px #add8e6}*.label,.context.label,.ad.hoc.label{margin:0 .6em 0 1.5em}","*.container,.context.container,.ad.hoc.container{display:flex;min-height:100vh;overflow:hidden;width:100%}*.mainPanel,.context.mainPanel,.ad.hoc.mainPanel{overflow:hidden;padding:1.2em;width:1024px}*.sidePanel,.context.sidePanel,.ad.hoc.sidePanel{flex:1;overflow:hidden}","@keyframes bouncing{from{top:-0.3em}to{top:.3em}}*.container,.context.container,.ad.hoc.container{display:inline-block}*.circle,.context.circle,.ad.hoc.circle{animation:bouncing .4s ease-in infinite alternate;background:#000;border-radius:.3em;display:inline-block;height:.6em;margin:0 .1em;position:relative;width:.6em}*.circle:first-child,.context.circle:first-child,.ad.hoc.circle:first-child{animation-delay:-0.2s}*.circle:last-child,.context.circle:last-child,.ad.hoc.circle:last-child{animation-delay:.2s}","@keyframes appearance{from{opacity:0}to{opacity:1}}*.arrow,.ad.hoc.arrow,.context.arrow{border:.6em solid gray;pointer-events:none;position:absolute;width:0;height:0}*.container,.ad.hoc.container,.context.container{background:gray;border-radius:.3em;color:#fff;display:inline-block;padding:0 .3em;position:absolute;top:0;left:0;animation:appearance .6s}*.wrapper,.ad.hoc.wrapper,.context.wrapper{display:inline-block}","* .container,.context .container,.ad.hoc .container{aspect-ratio:16/9;background:#f5f5f5;position:relative}* .video,.context .video,.ad.hoc .video{height:100%;position:absolute;width:100%}","* .container,.context .container,.ad.hoc .container{position:absolute;text-align:center;top:40%;transform:translateY(50%);width:100%}","*.container,.context.container,.ad.hoc.container{margin:.1em;position:relative}*.textarea,.context.textarea,.ad.hoc.textarea{background:#fff;border:1px solid gray;border-radius:.3em;box-sizing:border-box;font:inherit;height:0;outline:none;overflow:hidden;padding:.3em .3em calc(.3em + 1px);resize:none}*.textarea:focus,.context.textarea:focus,.ad.hoc.textarea:focus{border-color:blue;box-shadow:0 0 3px 1px #add8e6}*.textarea::placeholder,.context.textarea::placeholder,.ad.hoc.textarea::placeholder{color:gray}*.textarea:disabled,.context.textarea:disabled,.ad.hoc.textarea:disabled{border-color:rgba(128,128,128,.34);cursor:not-allowed;color:rgba(128,128,128,.34);user-select:none}*.hidden,.context.hidden,.ad.hoc.hidden{position:absolute;z-index:-1}"],"names":[],"sourceRoot":""}
1
+ {"version":3,"file":"style.css","mappings":"AAUA,2ZASE,SACA,aACA,eAJA,SACA,UAIA,wBAIF,8EAEE,cAGF,KACE,cAGF,MACE,gBAGF,aACE,YAGF,oDACE,WACA,aAGF,MACE,yBACA,iBC9CF,KACE,oBAGF,EACE,sBCJA,6CACE,gBACA,YACA,OACA,WACA,eACA,MACA,WACA,WCR0B,CDU1B,4EAGF,6CACE,gBAEA,mBADA,2CASA,SAPA,gBACA,gBEPQ,CFQR,gBACA,mBAEA,eACA,QAEA,+BAJA,YAKA,YEeF,yBF5BA,6CAgBI,gBGlCN,SACE,gBCDF,QACE,QACA,WACA,eACA,aCJF,8CASE,kBACE,oBACA,YACA,kBACA,+CAKF,qBACE,+CAGF,qBAtBO,mBAwBL,eACA,gBACA,aACA,2BACA,kBACA,gEACA,iEAEA,iBACE,+BACA,+CAIJ,cACE,aACA,eACA,CAIE,gIAGF,kBACE,WACA,+CAIJ,eACE,CAEA,qBACA,CA1DK,2BAyDL,gBACA,kCACA,eACA,aACA,+CAGF,4DACE,2BAjEK,4BAmEL,SACA,kBACA,kBACA,QACA,MACA,iEAEA,WACE,uEAKF,wBACE,uEAGF,iBACE,4BACA,4FASA,sBACE,4FAGF,2BACE,oEAKJ,kBACE,CA1GG,2BA4GH,CAFA,yBA1GG,CA4GH,eAMA,CClHN,6CAGE,YACE,OACA,gBACA,gBACA,kBACA,8CAGF,4DACE,sBACA,4BACA,SACA,kBACA,oBACA,kBACA,QACA,MACA,gEAEA,WACE,8CAIJ,kBACE,oBACA,YACA,kBACA,2IAGF,8DAEE,6BACA,mEAIA,gCACA,8CAGF,qBACE,iDAGF,wDACA,0DAEA,uBACE,CADF,oBACE,CADF,eACE,gBACA,sBACA,mBACA,cACA,eACA,qBACA,OACA,aACA,eACA,aACA,0CACA,mEAEA,eACE,4BACA,6BACA,gEAGF,iBACE,+BACA,mEAGF,WC1EF,8CACE,mBACA,aACA,SAGF,8CACE,6BACA,mBACA,eACA,aACA,eAEA,gEACE,kBACA,+BAIJ,8CAEE,gBADA,sBAEA,eAGF,8CACE,mBACA,mBACA,sBACA,mBACA,aACA,SACA,aACA,gECpCJ,kBACE,mBCMA,+CACE,6DACA,sBACA,mBACA,cACA,eACA,qBACA,aACA,YACA,mBACA,kBACA,qBACA,gEAEA,uEACE,cAGF,wIAEE,+DAEA,kBADA,oCACA,CAGF,iEAEE,kBADA,+BAEA,aAKJ,+CACE,mBACA,YAKA,wIAEE,6DACA,gBC/CJ,6CACE,6DACA,gBACA,sBACA,mBACA,eACA,aACA,aAEA,SADA,aAEA,YAGE,uFACE,gBACA,mBACA,WACA,cACA,WACA,YACA,UAIJ,+DACE,kBACA,+BAIA,oFACE,gBACA,mBACA,WACA,cACA,YACA,iBACA,UAKN,6CACE,mBACA,oBACA,YAGF,gDACE,sBAGF,6CACE,YAEA,qEACE,6BCxDJ,8CACE,mBACA,oBACA,YAGF,8CACE,sBACA,mBACA,YACA,aACA,aACA,mCAEA,gEACE,kBACA,+BAIJ,8CACE,sBCZF,6CACE,aACA,iBACA,gBACA,WAGF,6CACE,gBACA,cACA,YVNQ,CUSV,6CACE,OACA,gBC3BJ,kBACE,aACA,aAMA,gDACE,qBAGF,6CACE,gDACA,gBACA,mBACA,qBACA,YACA,cACA,kBACA,WAEA,sGACA,kGCvBJ,kBACE,aACA,cAMA,8CACE,uBAIA,QAAO,CAHP,oBACA,kBACA,OACA,CAOF,8CASE,qBARA,gBACA,mBACA,WACA,qBAIA,OAHA,eACA,kBACA,KAEA,CAGF,iDACE,qBC9BF,iDACE,kBACA,mBACA,kBAGF,iDACE,YACA,kBACA,WCTF,mDACE,kBACA,kBACA,QACA,0BACA,WCHF,8CACE,YACA,kBAGF,8CACE,gBACA,sBACA,mBACA,sBACA,aACA,SACA,aACA,gBACA,mCACA,YAEA,gEACE,kBACA,+BAGF,oGACE,WADF,qFACE,WAGF,yEACE,gCAEA,yBADA,mBAEA,gEAIJ,8CACE,kBACA","sources":["webpack://@dr.pogodin/react-utils/./src/styles/_global/reset.css","webpack://@dr.pogodin/react-utils/./src/styles/global.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/Modal/base-theme.scss","webpack://@dr.pogodin/react-utils/./src/styles/mixins.scss","webpack://@dr.pogodin/react-utils/./src/styles/_mixins/media.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/Modal/styles.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/selectors/CustomDropdown/Options/style.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/selectors/CustomDropdown/theme.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/selectors/NativeDropdown/theme.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/selectors/Switch/theme.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/GenericLink/style.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/Button/style.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/Checkbox/theme.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/Input/theme.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/PageLayout/base-theme.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/Throbber/theme.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/WithTooltip/default-theme.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/YouTubeVideo/base.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/YouTubeVideo/throbber.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/TextArea/style.scss"],"sourcesContent":["/* Eric Meyer's \"Reset CSS\" 2.0 */\n\n/* http://meyerweb.com/eric/tools/css/reset/\n v2.0 | 20110126\n License: none (public domain)\n*/\n\n/* Having all selectors at individual lines is unreadable in the case of this\n * style reset sheet. */\n/* stylelint-disable selector-list-comma-newline-after */\na, abbr, acronym, address, applet, article, aside, audio, b, big, blockquote,\nbody, canvas, caption, center, cite, code, dd, del, details, dfn, div, dl, dt,\nem, embed, fieldset, figcaption, figure, footer, form, h1, h2, h3, h4, h5, h6,\nheader, hgroup, html, i, iframe, img, ins, kbd, label, legend, li, mark, menu,\nnav, object, ol, output, p, pre, q, ruby, s, samp, section, small, span,\nstrike, strong,sub, summary, sup, table, tbody, td, tfoot, th, thead, time, tr,\ntt, u, ul, var, video {\n margin: 0;\n padding: 0;\n border: 0;\n font: inherit;\n font-size: 100%;\n vertical-align: baseline;\n}\n\n/* HTML5 display-role reset for older browsers */\narticle, aside, details, figcaption, figure, footer, header, hgroup, menu, nav,\nsection {\n display: block;\n}\n\nbody {\n line-height: 1;\n}\n\nol, ul {\n list-style: none;\n}\n\nblockquote, q {\n quotes: none;\n}\n\nblockquote::before, blockquote::after, q::before, q::after {\n content: \"\";\n content: none;\n}\n\ntable {\n border-collapse: collapse;\n border-spacing: 0;\n}\n","/* Global styles. */\n\n@use \"_global/reset\";\n\nbody {\n text-rendering: auto;\n}\n\n* {\n box-sizing: border-box;\n}\n","@use \"styles/mixins\" as *;\n\n*,\n.context,\n.ad.hoc {\n &.overlay {\n background: #eee;\n height: 100%;\n left: 0;\n opacity: 0.8;\n position: fixed;\n top: 0;\n width: 100%;\n z-index: $zIndexOfDefaultModalOverlay;\n\n &:focus { outline: none; }\n }\n\n &.container {\n background: #fff;\n box-shadow: 0 0 14px 1px rgba(38 38 40 / 15%);\n border-radius: 0.3em;\n max-height: 95vh;\n max-width: $screen-md;\n overflow: hidden;\n padding: 0.6em 1.2em;\n width: 480px;\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: $zIndexOfDefaultModalOverlay + 1;\n\n @include xs-to-lg {\n max-width: 95vw;\n }\n }\n}\n","/* Collection of standard mixins, being used all around. */\n@forward \"_mixins/fonts\";\n@forward \"_mixins/media\";\n@forward \"_mixins/typography\";\n\n$zIndexOfDefaultModalOverlay: 998;\n","/**\n * Mixins for different layout sizes: xs, sm, md, lg.\n * Breaking points are defined in _variables.scss\n * The range mixins A-to-B all means \"for the sizes from A to B, both\n * inclusive\", in particular it means that mixin A-to-lg is equivalent to\n * all sizes from A (inclusive) and larger.\n *\n * NOTE: For convenience, these mixins are sorted not alphabetically, but,\n * first, by increase of the first size; second, by increase of the second size.\n */\n\n/* Break points. */\n\n$screen-xs: 320px !default;\n$screen-sm: 495px !default;\n$screen-mm: 768px !default;\n$screen-md: 1024px !default;\n$screen-lg: 1280px !default;\n\n/* XS */\n\n@mixin xs {\n @media (max-width: #{$screen-xs}) {\n @content;\n }\n}\n\n@mixin xs-to-sm {\n @media (max-width: #{$screen-sm}) {\n @content;\n }\n}\n\n@mixin xs-to-mm {\n @media (max-width: #{$screen-mm}) {\n @content;\n }\n}\n\n@mixin xs-to-md {\n @media (max-width: #{$screen-md}) {\n @content;\n }\n}\n\n@mixin xs-to-lg {\n @media (max-width: #{$screen-lg}) {\n @content;\n }\n}\n\n/* SM */\n\n@mixin sm {\n @media (min-width: #{$screen-xs + 1px}) and (max-width: #{$screen-sm}) {\n @content;\n }\n}\n\n@mixin sm-to-mm {\n @media (min-width: #{$screen-xs + 1px}) and (max-width: #{$screen-mm}) {\n @content;\n }\n}\n\n@mixin sm-to-md {\n @media (min-width: #{$screen-xs + 1px}) and (max-width: #{$screen-md}) {\n @content;\n }\n}\n\n@mixin sm-to-lg {\n @media (min-width: #{$screen-xs + 1px}) and (max-width: #{$screen-lg}) {\n @content;\n }\n}\n\n@mixin sm-to-xl {\n @media (min-width: #{$screen-xs + 1px}) {\n @content;\n }\n}\n\n/* MM */\n\n@mixin mm {\n @media (min-width: #{$screen-sm + 1px}) and (max-width: #{$screen-mm}) {\n @content;\n }\n}\n\n@mixin mm-to-md {\n @media (min-width: #{$screen-sm + 1px}) and (max-width: #{$screen-md}) {\n @content;\n }\n}\n\n@mixin mm-to-lg {\n @media (min-width: #{$screen-sm + 1px}) and (max-width: #{$screen-lg}) {\n @content;\n }\n}\n\n@mixin mm-to-xl {\n @media (min-width: #{$screen-sm + 1px}) {\n @content;\n }\n}\n\n/* MD */\n\n@mixin md {\n @media (min-width: #{$screen-mm + 1px}) and (max-width: #{$screen-md}) {\n @content;\n }\n}\n\n@mixin md-to-lg {\n @media (min-width: #{$screen-mm + 1px}) and (max-width: #{$screen-lg}) {\n @content;\n }\n}\n\n@mixin md-to-xl {\n @media (min-width: #{$screen-mm + 1px}) {\n @content;\n }\n}\n\n/* LG */\n\n@mixin lg {\n @media (min-width: #{$screen-md + 1px}) and (max-width: #{$screen-lg}) {\n @content;\n }\n}\n\n@mixin lg-to-xl {\n @media (min-width: #{$screen-md + 1px}) {\n @content;\n }\n}\n\n/* XL */\n\n@mixin xl {\n @media (min-width: #{$screen-lg + 1px}) {\n @content;\n }\n}\n",".scrollingDisabledByModal {\n overflow: hidden;\n}\n",".overlay {\n inset: 0;\n opacity: 0.2;\n position: fixed;\n z-index: 1000;\n}\n","$border: 1px solid gray;\n\n*,\n.context,\n.ad.hoc {\n // The outermost dropdown container, holding together the label (if any),\n // and the select element with arrow. Note, that the dropdown option list,\n // when opened, exists completely outside the dropdown DOM hierarchy, and\n // is aligned into the correct position by JS.\n &.container {\n align-items: center;\n display: inline-flex;\n margin: 0.1em;\n position: relative;\n }\n\n // Styling of default label next to the dropdown (has no effect on custom\n // non-string label node, if provided).\n &.label {\n margin: 0 0.6em 0 1.2em;\n }\n\n &.dropdown {\n border: $border;\n border-radius: 0.3em;\n cursor: pointer;\n min-width: 200px;\n outline: none;\n padding: 0.3em 3.0em 0.3em 0.6em;\n position: relative;\n user-select: none;\n\n &:focus {\n border-color: blue;\n box-shadow: 0 0 3px 1px lightblue;\n }\n }\n\n &.option {\n cursor: pointer;\n outline: none ;\n padding: 0 0.6em;\n\n &:focus {\n background: royalblue;\n color: white;\n }\n\n &:hover {\n background: royalblue;\n color: white;\n }\n }\n\n &.select {\n background: white;\n border: $border;\n border-radius: 0 0 0.3em 0.3em;\n border-top: none;\n box-shadow: 0 6px 12px 3px lightgray;\n position: fixed;\n z-index: 1001;\n }\n\n &.arrow {\n background-image: linear-gradient(to top, lightgray, white 50%, white);\n border-left: $border;\n border-radius: 0 0.3em 0.3em 0;\n bottom: 0;\n padding: 0.3em 0.6em;\n position: absolute;\n right: 0;\n top: 0;\n\n &::after {\n content: '▼';\n }\n }\n\n &.active {\n .arrow {\n border-radius: 0 0.3em 0 0;\n }\n\n .dropdown {\n border-color: blue;\n border-radius: 0.3em 0.3em 0 0;\n }\n }\n\n &.upward {\n &.active {\n // NOTE: Here StyleLint complains about order & specifity of selectors in\n // the compiled CSS, but it should have no effect on the actual styling.\n // stylelint-disable no-descending-specificity\n .arrow {\n border-radius: 0 0 0.3em;\n }\n\n .dropdown {\n border-radius: 0 0 0.3em 0.3em;\n }\n // stylelint-enable no-descending-specificity\n }\n\n &.select {\n border-bottom: none;\n border-top: $border;\n border-radius: 0.3em 0.3em 0 0;\n\n // NOTE: Here a normal (downward) shadow would weirdly cast over\n // the dropdown element, and other ways to cast the shadow result in\n // \"upward\" shadow, which is also weird. Thus, better no shadow at all\n // for the upward-opened dropdown.\n box-shadow: none;\n }\n }\n}\n","*,\n.context,\n.ad.hoc {\n &.dropdown {\n display: flex;\n flex: 1;\n min-width: 5.5em;\n overflow: hidden;\n position: relative;\n }\n\n &.arrow {\n background-image: linear-gradient(to top, lightgray, white 50%, white);\n border: 1px solid gray;\n border-radius: 0 0.3em 0.3em 0;\n bottom: 0;\n padding: 0.3em 0.6em;\n pointer-events: none;\n position: absolute;\n right: 0;\n top: 0;\n\n &::after {\n content: '▼';\n }\n }\n\n &.container {\n align-items: center;\n display: inline-flex;\n margin: 0.1em;\n position: relative;\n }\n\n .active + &.arrow,\n :active + &.arrow {\n background-image: linear-gradient(to bottom, lightgray, white 50%, white);\n border-bottom-right-radius: 0;\n }\n\n :focus + &.arrow {\n border-color: blue;\n border-left-color: gray;\n }\n\n &.label {\n margin: 0 0.6em 0 1.5em;\n }\n\n &.option { color: black; }\n &.hiddenOption { display: none; }\n\n &.select {\n appearance: none;\n background: white;\n border: 1px solid gray;\n border-radius: 0.3em;\n color: inherit;\n cursor: pointer;\n display: inline-block;\n flex: 1;\n font: inherit;\n max-width: 100%;\n outline: none;\n padding: 0.3em 3.3em calc(0.3em + 1px) 1.2em;\n\n &:active {\n background: white;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n }\n\n &:focus {\n border-color: blue;\n box-shadow: 0 0 3px 1px lightblue;\n }\n\n &.invalid { color: gray; }\n }\n}\n","*,\n.context,\n.ad.hoc {\n &.container {\n align-items: center;\n display: flex;\n gap: 0.6em;\n }\n\n &.option {\n border: 1px solid transparent;\n border-radius: 0.3em;\n cursor: pointer;\n outline: none;\n padding: 0 0.9em;\n\n &:focus {\n border-color: blue;\n box-shadow: 0 0 3px 1px lightblue;\n }\n }\n\n &.selected {\n border: 1px solid gray;\n background: white;\n cursor: default;\n }\n\n &.options {\n align-items: center;\n background: whitesmoke;\n border: 1px solid gray;\n border-radius: 0.3em;\n display: flex;\n gap: 0.3em;\n padding: 0.3em;\n user-select: none;\n }\n}\n",".link[disabled] {\n cursor: not-allowed;\n}\n","/**\n * The default button theme.\n */\n\n*,\n.context,\n.ad.hoc {\n &.button {\n background-image: linear-gradient(to top, lightgray, white 50%, white);\n border: solid 1px gray;\n border-radius: 0.3em;\n color: inherit;\n cursor: pointer;\n display: inline-block;\n font: inherit;\n margin: 0.1em;\n padding: 0.3em 1.2em;\n text-align: center;\n text-decoration: none;\n user-select: none;\n\n &:visited {\n color: inherit;\n }\n\n &.active,\n &:active {\n background-image: linear-gradient(to bottom, lightgray, white 50%, white);\n box-shadow: inset 0 1px 3px 0 lightgray;\n border-color: gray;\n }\n\n &:focus {\n box-shadow: 0 0 3px 1px lightblue;\n border-color: blue;\n outline: none;\n }\n }\n\n /* Additional styling of disabled buttons. */\n &.disabled {\n cursor: not-allowed;\n opacity: 0.33;\n\n // Note: this \"cancels out\" the active state styling of an active button,\n // which is defined above, thus ensuring a click on disabled button does\n // not alter its appearance (does not result in visual press).\n &.active,\n &:active {\n background-image: linear-gradient(to top, lightgray, white 50%, white);\n box-shadow: none;\n }\n }\n}\n","*,\n.context,\n.ad.hoc {\n &.checkbox {\n appearance: none;\n background: white;\n border: 1px solid gray;\n border-radius: 0.3em;\n cursor: pointer;\n font: inherit;\n height: 1.5em;\n outline: none;\n margin: 0;\n width: 1.5em;\n\n &:checked {\n &::after {\n background: black;\n border-radius: 0.3em;\n content: \"\";\n display: block;\n height: 1em;\n margin: 0.2em;\n width: 1em;\n }\n }\n\n &:focus {\n border-color: blue;\n box-shadow: 0 0 3px 1px lightblue;\n }\n\n &.indeterminate {\n &::after {\n background: black;\n border-radius: 0.2em;\n content: \"\";\n display: block;\n height: 0.2em;\n margin: 0.6em 0.2em;\n width: 1em;\n }\n }\n }\n\n &.container {\n align-items: center;\n display: inline-flex;\n margin: 0.1em;\n }\n\n &.label {\n margin: 0 0.6em 0 1.5em;\n }\n\n &.disabled {\n opacity: 0.33;\n\n .checkbox {\n cursor: not-allowed !important;\n }\n }\n}\n","*,\n.context,\n.ad.hoc {\n &.container {\n align-items: center;\n display: inline-flex;\n margin: 0.1em;\n }\n\n &.input {\n border: 1px solid gray;\n border-radius: 0.3em;\n cursor: text;\n font: inherit;\n outline: none;\n padding: 0.3em 0.3em calc(0.3em + 1px);\n\n &:focus {\n border-color: blue;\n box-shadow: 0 0 3px 1px lightblue;\n }\n }\n\n &.label {\n margin: 0 0.6em 0 1.5em;\n }\n}\n","/**\n * Base theme: symmetric 3-columns layout, with the center column occupying all\n * screen up to mid screen size. For larger screen sizes the main column is\n * limited by the mid screen size, and the free space is filled with side\n * columns on left and right.\n */\n\n@use \"styles/mixins\" as *;\n\n*,\n.context,\n.ad.hoc {\n &.container {\n display: flex;\n min-height: 100vh;\n overflow: hidden;\n width: 100%;\n }\n\n &.mainPanel {\n overflow: hidden;\n padding: 1.2em;\n width: $screen-md;\n }\n\n &.sidePanel {\n flex: 1;\n overflow: hidden;\n }\n}\n","@keyframes bouncing {\n from { top: -0.3em; }\n to { top: 0.3em; }\n}\n\n*,\n.context,\n.ad.hoc {\n &.container {\n display: inline-block;\n }\n\n &.circle {\n animation: bouncing 0.4s ease-in infinite alternate;\n background: black;\n border-radius: 0.3em;\n display: inline-block;\n height: 0.6em;\n margin: 0 0.1em;\n position: relative;\n width: 0.6em;\n\n &:first-child { animation-delay: -0.2s; }\n &:last-child { animation-delay: 0.2s; }\n }\n}\n","@keyframes appearance {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n*,\n.ad.hoc,\n.context {\n &.arrow {\n border: 0.6em solid grey;\n pointer-events: none;\n position: absolute;\n width: 0;\n height: 0;\n }\n\n /*\n &.content { }\n */\n\n &.container {\n background: grey;\n border-radius: 0.3em;\n color: white;\n display: inline-block;\n padding: 0 0.3em;\n position: absolute;\n top: 0;\n left: 0;\n animation: appearance 0.6s;\n }\n\n &.wrapper {\n display: inline-block;\n }\n}\n","*,\n.context,\n.ad.hoc {\n .container {\n aspect-ratio: 16 / 9;\n background: whitesmoke;\n position: relative;\n }\n\n .video {\n height: 100%;\n position: absolute;\n width: 100%;\n }\n}\n","*,\n.context,\n.ad.hoc {\n .container {\n position: absolute;\n text-align: center;\n top: 40%;\n transform: translateY(50%);\n width: 100%;\n }\n}\n","@use \"sass:color\";\n\n*,\n.context,\n.ad.hoc {\n &.container {\n margin: 0.1em;\n position: relative;\n }\n\n &.textarea {\n background: white;\n border: 1px solid gray;\n border-radius: 0.3em;\n box-sizing: border-box;\n font: inherit;\n height: 0;\n outline: none;\n overflow: hidden;\n padding: 0.3em 0.3em calc(0.3em + 1px);\n resize: none;\n\n &:focus {\n border-color: blue;\n box-shadow: 0 0 3px 1px lightblue;\n }\n\n &::placeholder {\n color: gray;\n }\n\n &:disabled {\n border-color: color.adjust($color: gray, $alpha: -0.66);\n cursor: not-allowed;\n color: color.adjust($color: gray, $alpha: -0.66);\n user-select: none;\n }\n }\n\n &.hidden {\n position: absolute;\n z-index: -1;\n }\n}\n"],"names":[],"sourceRoot":""}
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see web.bundle.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@dr.pogodin/js-utils"),require("@dr.pogodin/react-global-state"),require("@dr.pogodin/react-themes"),require("cookie"),require("dayjs"),require("node-forge/lib/aes"),require("node-forge/lib/forge"),require("qs"),require("react"),require("react-dom"),require("react-dom/client"),require("react-helmet"),require("react-router-dom")):"function"==typeof define&&define.amd?define(["@dr.pogodin/js-utils","@dr.pogodin/react-global-state","@dr.pogodin/react-themes","cookie","dayjs","node-forge/lib/aes","node-forge/lib/forge","qs","react","react-dom","react-dom/client","react-helmet","react-router-dom"],t):"object"==typeof exports?exports["@dr.pogodin/react-utils"]=t(require("@dr.pogodin/js-utils"),require("@dr.pogodin/react-global-state"),require("@dr.pogodin/react-themes"),require("cookie"),require("dayjs"),require("node-forge/lib/aes"),require("node-forge/lib/forge"),require("qs"),require("react"),require("react-dom"),require("react-dom/client"),require("react-helmet"),require("react-router-dom")):e["@dr.pogodin/react-utils"]=t(e["@dr.pogodin/js-utils"],e["@dr.pogodin/react-global-state"],e["@dr.pogodin/react-themes"],e.cookie,e.dayjs,e["node-forge/lib/aes"],e["node-forge/lib/forge"],e.qs,e.react,e["react-dom"],e["react-dom/client"],e["react-helmet"],e["react-router-dom"])}("undefined"!=typeof self?self:this,(function(__WEBPACK_EXTERNAL_MODULE__864__,__WEBPACK_EXTERNAL_MODULE__126__,__WEBPACK_EXTERNAL_MODULE__859__,__WEBPACK_EXTERNAL_MODULE__462__,__WEBPACK_EXTERNAL_MODULE__185__,__WEBPACK_EXTERNAL_MODULE__958__,__WEBPACK_EXTERNAL_MODULE__814__,__WEBPACK_EXTERNAL_MODULE__360__,__WEBPACK_EXTERNAL_MODULE__155__,__WEBPACK_EXTERNAL_MODULE__514__,__WEBPACK_EXTERNAL_MODULE__236__,__WEBPACK_EXTERNAL_MODULE__883__,__WEBPACK_EXTERNAL_MODULE__442__){return function(){"use strict";var __webpack_modules__={668:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{A:function(){return getInj}});var node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(814),node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0__),node_forge_lib_aes__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(958),node_forge_lib_aes__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(node_forge_lib_aes__WEBPACK_IMPORTED_MODULE_1__),_shared_utils_isomorphy_buildInfo__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(540);let inj={};const metaElement="undefined"!=typeof document?document.querySelector('meta[itemprop="drpruinj"]'):null;if(metaElement){metaElement.remove();let data=node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0___default().util.decode64(metaElement.content);const{key:key}=(0,_shared_utils_isomorphy_buildInfo__WEBPACK_IMPORTED_MODULE_2__.F)(),d=node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0___default().cipher.createDecipher("AES-CBC",key);d.start({iv:data.slice(0,key.length)}),d.update(node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0___default().util.createBuffer(data.slice(key.length))),d.finish(),data=node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0___default().util.decodeUtf8(d.output.data),inj=eval(`(${data})`)}else"undefined"!=typeof window&&window.REACT_UTILS_INJECTION?(inj=window.REACT_UTILS_INJECTION,delete window.REACT_UTILS_INJECTION):inj={};function getInj(){return inj}},969:function(e,t,n){n.d(t,{A:function(){return s}}),n(155);var r=n(126),o=n(236),a=n(442),i=n(668),_=n(922);function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=document.getElementById("react-view");if(!n)throw Error("Failed to find container for React app");const s=(0,_.jsx)(r.GlobalStateProvider,{initialState:(0,i.A)().ISTATE||t.initialState,children:(0,_.jsx)(a.BrowserRouter,{future:{v7_relativeSplatPath:!0,v7_startTransition:!0},children:(0,_.jsx)(e,{})})});t.dontHydrate?(0,o.createRoot)(n).render(s):(0,o.hydrateRoot)(n,s)}},540:function(e,t,n){let r;function o(){if(void 0===r)throw Error('"Build Info" has not been initialized yet');return r}n.d(t,{F:function(){return o}}),"undefined"!=typeof BUILD_INFO&&(r=BUILD_INFO)},48:function(e,t,n){n.d(t,{B:function(){return r},p:function(){return o}});const r="object"!=typeof process||!process.versions||!process.versions.node||!!n.g.REACT_UTILS_FORCE_CLIENT_SIDE,o=!r},724:function(e,t,n){n.r(t),n.d(t,{IS_CLIENT_SIDE:function(){return o.B},IS_SERVER_SIDE:function(){return o.p},buildTimestamp:function(){return _},getBuildInfo:function(){return r.F},isDevBuild:function(){return a},isProdBuild:function(){return i}});var r=n(540),o=n(48);function a(){return!1}function i(){return!0}function _(){return(0,r.F)().timestamp}},148:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{requireWeak:function(){return requireWeak},resolveWeak:function(){return resolveWeak}});var _isomorphy__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(724);function requireWeak(modulePath,basePath){if(_isomorphy__WEBPACK_IMPORTED_MODULE_0__.IS_CLIENT_SIDE)return null;try{const{resolve:resolve}=eval("require")("path"),path=basePath?resolve(basePath,modulePath):modulePath,module=eval("require")(path);if(!("default"in module))return module;const{default:def,...named}=module,res=def;return Object.entries(named).forEach((e=>{let[t,n]=e;const r=res[t];if(void 0!==r){if(r!==n)throw Error("Conflict between default and named exports")}else res[t]=n})),res}catch{return null}}function resolveWeak(e){return e}},394:function(e,t,n){var r=n(155),o=Symbol.for("react.element"),a=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,_=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,n){var r,a={},l=null,c=null;for(r in void 0!==n&&(l=""+n),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(c=t.ref),t)i.call(t,r)&&!s.hasOwnProperty(r)&&(a[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===a[r]&&(a[r]=t[r]);return{$$typeof:o,type:e,key:l,ref:c,props:a,_owner:_.current}}t.Fragment=a,t.jsx=l,t.jsxs=l},922:function(e,t,n){e.exports=n(394)},864:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__864__},126:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__126__},859:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__859__},462:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__462__},185:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__185__},958:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__958__},814:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__814__},360:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__360__},155:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__155__},514:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__514__},236:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__236__},883:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__883__},442:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__442__}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](n,n.exports,__webpack_require__),n.exports}__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=function(e,t){for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Barrier:function(){return js_utils_.Barrier},BaseButton:function(){return BaseButton},BaseModal:function(){return BaseModal},Button:function(){return Button},Checkbox:function(){return components_Checkbox},CustomDropdown:function(){return CustomDropdown},Dropdown:function(){return NativeDropdown},Emitter:function(){return js_utils_.Emitter},GlobalStateProvider:function(){return react_global_state_.GlobalStateProvider},Input:function(){return components_Input},Link:function(){return components_Link},MetaTags:function(){return components_MetaTags},Modal:function(){return Modal},NavLink:function(){return components_NavLink},PageLayout:function(){return components_PageLayout},Semaphore:function(){return js_utils_.Semaphore},Switch:function(){return Switch},TextArea:function(){return components_TextArea},ThemeProvider:function(){return react_themes_.ThemeProvider},Throbber:function(){return components_Throbber},WithTooltip:function(){return WithTooltip},YouTubeVideo:function(){return components_YouTubeVideo},client:function(){return client},config:function(){return utils_config},getGlobalState:function(){return react_global_state_.getGlobalState},getSsrContext:function(){return getSsrContext},isomorphy:function(){return isomorphy},newAsyncDataEnvelope:function(){return react_global_state_.newAsyncDataEnvelope},server:function(){return server},splitComponent:function(){return splitComponent},themed:function(){return themed},time:function(){return utils_time},useAsyncCollection:function(){return react_global_state_.useAsyncCollection},useAsyncData:function(){return react_global_state_.useAsyncData},useGlobalState:function(){return react_global_state_.useGlobalState},webpack:function(){return webpack},withGlobalStateType:function(){return react_global_state_.withGlobalStateType},withRetries:function(){return js_utils_.withRetries}});var global={},react_themes_=__webpack_require__(859),react_themes_default=__webpack_require__.n(react_themes_),environment_check=__webpack_require__(48),webpack=__webpack_require__(148);const config=(environment_check.B?__webpack_require__(668).A().CONFIG:(0,webpack.requireWeak)("config"))||{};if(environment_check.B&&"undefined"!=typeof document){const e=__webpack_require__(462);config.CSRF=e.parse(document.cookie).csrfToken}var utils_config=config,isomorphy=__webpack_require__(724),external_cookie_=__webpack_require__(462),external_cookie_default=__webpack_require__.n(external_cookie_),external_dayjs_=__webpack_require__(185),external_dayjs_default=__webpack_require__.n(external_dayjs_),external_react_=__webpack_require__(155),js_utils_=__webpack_require__(864),react_global_state_=__webpack_require__(126);const{getSsrContext:getSsrContext}=(0,react_global_state_.withGlobalStateType)();function useCurrent(){let{autorefresh:e=!1,globalStatePath:t="currentTime",precision:n=5*js_utils_.SEC_MS}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[r,o]=(0,react_global_state_.useGlobalState)(t,Date.now);return(0,external_react_.useEffect)((()=>{let t;const r=()=>{o((e=>{const t=Date.now();return Math.abs(t-e)>n?t:e})),e&&(t=setTimeout(r,n))};return r(),()=>{t&&clearTimeout(t)}}),[e,n,o]),r}function useTimezoneOffset(){let{cookieName:e="timezoneOffset",globalStatePath:t="timezoneOffset"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=getSsrContext(!1),[r,o]=(0,react_global_state_.useGlobalState)(t,(()=>{var t;const r=e&&(null==n||null===(t=n.req)||void 0===t||null===(t=t.cookies)||void 0===t?void 0:t[e]);return r?parseInt(r,10):0}));return(0,external_react_.useEffect)((()=>{const t=(new Date).getTimezoneOffset();o(t),e&&(document.cookie=external_cookie_default().serialize(e,t.toString(),{path:"/"}))}),[e,o]),r}const time={DAY_MS:js_utils_.DAY_MS,HOUR_MS:js_utils_.HOUR_MS,MIN_MS:js_utils_.MIN_MS,SEC_MS:js_utils_.SEC_MS,YEAR_MS:js_utils_.YEAR_MS,now:Date.now,timer:js_utils_.timer,useCurrent:useCurrent,useTimezoneOffset:useTimezoneOffset};var utils_time=Object.assign(external_dayjs_default(),time),jsx_runtime=__webpack_require__(922);let clientChunkGroups;isomorphy.IS_CLIENT_SIDE&&(clientChunkGroups=__webpack_require__(668).A().CHUNK_GROUPS||{});const refCounts={};function getPublicPath(){return(0,isomorphy.getBuildInfo)().publicPath}function bookStyleSheet(e,t,n){let r;const o=`${getPublicPath()}/${e}`,a=`${document.location.origin}${o}`;if(!t.has(a)){let e=document.querySelector(`link[href="${o}"]`);e||(e=document.createElement("link"),e.setAttribute("rel","stylesheet"),e.setAttribute("href",o),document.head.appendChild(e)),r=new js_utils_.Barrier,e.addEventListener("load",(()=>r.resolve())),e.addEventListener("error",(()=>r.resolve()))}if(n){const e=refCounts[o]||0;refCounts[o]=1+e}return r}function getLoadedStyleSheets(){const e=new Set,{styleSheets:t}=document;for(let r=0;r<t.length;++r){var n;const o=null===(n=t[r])||void 0===n?void 0:n.href;o&&e.add(o)}return e}function assertChunkName(e,t){if(!t[e])throw Error(`Unknown chunk name "${e}"`)}function bookStyleSheets(e,t,n){const r=[],o=t[e];if(!o)return Promise.resolve();const a=getLoadedStyleSheets();for(let e=0;e<o.length;++e){const t=o[e];if(null!=t&&t.endsWith(".css")){const e=bookStyleSheet(t,a,n);e&&r.push(e)}}return r.length?Promise.allSettled(r).then():Promise.resolve()}function freeStyleSheets(e,t){const n=t[e];if(n)for(let e=0;e<n.length;++e){const t=n[e];if(null!=t&&t.endsWith(".css")){const e=`${getPublicPath()}/${t}`,n=refCounts[e];n&&(n<=1?(document.head.querySelector(`link[href="${e}"]`).remove(),delete refCounts[e]):refCounts[e]=n-1)}}}const usedChunkNames=new Set;function splitComponent(e){let{chunkName:t,getComponent:n,placeholder:r}=e;if(isomorphy.IS_CLIENT_SIDE&&assertChunkName(t,clientChunkGroups),usedChunkNames.has(t))throw Error(`Repeated splitComponent() call for the chunk "${t}"`);usedChunkNames.add(t);const o=(0,external_react_.lazy)((async()=>{const e=await n(),r="default"in e?e.default:e;return isomorphy.IS_CLIENT_SIDE&&await bookStyleSheets(t,clientChunkGroups,!1),{default:(0,external_react_.forwardRef)(((e,n)=>{let{children:o,...a}=e;if(isomorphy.IS_SERVER_SIDE){const{chunkGroups:e,chunks:n}=getSsrContext();assertChunkName(t,e),n.includes(t)||n.push(t)}return(0,external_react_.useInsertionEffect)((()=>(bookStyleSheets(t,clientChunkGroups,!0),()=>freeStyleSheets(t,clientChunkGroups))),[]),(0,jsx_runtime.jsx)(r,{ref:n,...a,children:o})}))}}));return e=>{let{children:t,...n}=e;return(0,jsx_runtime.jsx)(external_react_.Suspense,{fallback:r,children:(0,jsx_runtime.jsx)(o,{...n,children:t})})}}const themed=react_themes_default();themed.COMPOSE=react_themes_.COMPOSE,themed.PRIORITY=react_themes_.PRIORITY;var external_react_dom_=__webpack_require__(514),external_react_dom_default=__webpack_require__.n(external_react_dom_),base_theme={overlay:"ye2BZo",context:"Szmbbz",ad:"Ah-Nsc",hoc:"Wki41G",container:"gyZ4rc"},styles={scrollingDisabledByModal:"_5fRFtF"};const BaseModal=e=>{let{cancelOnScrolling:t,children:n,containerStyle:r,dontDisableScrolling:o,onCancel:a,style:i,testId:_,testIdForOverlay:s,theme:l}=e;const c=(0,external_react_.useRef)(null),u=(0,external_react_.useRef)(null),[d,m]=(0,external_react_.useState)();(0,external_react_.useEffect)((()=>{const e=document.createElement("div");return document.body.appendChild(e),m(e),()=>{document.body.removeChild(e)}}),[]),(0,external_react_.useEffect)((()=>(t&&a&&(window.addEventListener("scroll",a),window.addEventListener("wheel",a)),()=>{t&&a&&(window.removeEventListener("scroll",a),window.removeEventListener("wheel",a))})),[t,a]),(0,external_react_.useEffect)((()=>(o||document.body.classList.add(styles.scrollingDisabledByModal),()=>{o||document.body.classList.remove(styles.scrollingDisabledByModal)})),[o]);const p=(0,external_react_.useMemo)((()=>(0,jsx_runtime.jsx)("div",{onFocus:()=>{var e,t;const n=null===(e=c.current)||void 0===e?void 0:e.querySelectorAll("*");for(let e=n.length-1;e>=0;--e){var r;if(null===(r=n[e])||void 0===r||r.focus(),document.activeElement===n[e])return}null===(t=u.current)||void 0===t||t.focus()},tabIndex:0})),[]);return d?external_react_dom_default().createPortal((0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[p,(0,jsx_runtime.jsx)("div",{"aria-label":"Cancel",className:l.overlay,"data-testid":void 0,onClick:e=>{a&&(a(),e.stopPropagation())},onKeyDown:e=>{"Escape"===e.key&&a&&(a(),e.stopPropagation())},ref:e=>{e&&e!==u.current&&(u.current=e,e.focus())},role:"button",tabIndex:0}),(0,jsx_runtime.jsx)("div",{"aria-modal":"true",className:l.container,"data-testid":void 0,onClick:e=>e.stopPropagation(),onWheel:e=>e.stopPropagation(),ref:c,role:"dialog",style:null!=i?i:r,children:n}),(0,jsx_runtime.jsx)("div",{onFocus:()=>{var e;null===(e=u.current)||void 0===e||e.focus()},tabIndex:0}),p]}),d):null};var Modal=react_themes_default()(BaseModal,"Modal",base_theme),style={overlay:"jKsMKG"};function isValue(e){const t=typeof e;return"number"===t||"string"===t}function optionValueName(e){var t;return isValue(e)?[e,e]:[e.value,null!==(t=e.name)&&void 0!==t?t:e.value]}function areEqual(e,t){return(null==e?void 0:e.left)===(null==t?void 0:t.left)&&(null==e?void 0:e.top)===(null==t?void 0:t.top)&&(null==e?void 0:e.width)===(null==t?void 0:t.width)}const Options=(0,external_react_.forwardRef)(((e,t)=>{let{containerClass:n,containerStyle:r,filter:o,onCancel:a,onChange:i,optionClass:_,options:s}=e;const l=(0,external_react_.useRef)(null);(0,external_react_.useImperativeHandle)(t,(()=>({measure:()=>{var e,t;const n=null===(e=l.current)||void 0===e?void 0:e.parentElement;if(!n)return;const r=null===(t=l.current)||void 0===t?void 0:t.getBoundingClientRect(),o=window.getComputedStyle(n),a=parseFloat(o.marginBottom),i=parseFloat(o.marginTop);return r.height+=a+i,r}})),[]);const c=[];for(let e=0;e<s.length;++e){const t=s[e];if(void 0!==t&&(!o||o(t))){const[e,n]=optionValueName(t);c.push((0,jsx_runtime.jsx)("div",{className:_,onClick:t=>{i(e),t.stopPropagation()},onKeyDown:t=>{"Enter"===t.key&&(i(e),t.stopPropagation())},role:"button",tabIndex:0,children:n},e))}}return(0,jsx_runtime.jsx)(BaseModal,{cancelOnScrolling:!0,containerStyle:r,dontDisableScrolling:!0,onCancel:a,theme:{ad:"",hoc:"",container:n,context:"",overlay:style.overlay},children:(0,jsx_runtime.jsx)("div",{ref:l,children:c})})}));var CustomDropdown_Options=Options,theme={container:"oQKv0Y",context:"_9Tod5r",ad:"R58zIg",hoc:"O-Tp1i",label:"YUPUNs",dropdown:"pNEyAA",option:"LD2Kzy",select:"LP5azC",arrow:"-wscve",active:"k2UDsV",upward:"HWRvu4"};const BaseCustomDropdown=e=>{let{filter:t,label:n,onChange:r,options:o,theme:a,value:i}=e;if(!o)throw Error("Internal error");const[_,s]=(0,external_react_.useState)(!1),l=(0,external_react_.useRef)(null),c=(0,external_react_.useRef)(null),[u,d]=(0,external_react_.useState)(),[m,p]=(0,external_react_.useState)(!1);(0,external_react_.useEffect)((()=>{if(!_)return;let e;const t=()=>{var n,r;const o=null===(n=l.current)||void 0===n?void 0:n.getBoundingClientRect(),a=null===(r=c.current)||void 0===r?void 0:r.measure();if(o&&a){var i,_;const e=o.bottom+a.height<(null!==(i=null===(_=window.visualViewport)||void 0===_?void 0:_.height)&&void 0!==i?i:0),t=o.top-a.height>0,n=!e&&t;p(n);const r=n?{top:o.top-a.height-1,left:o.left,width:o.width}:{left:o.left,top:o.bottom,width:o.width};d((e=>areEqual(e,r)?e:r))}e=requestAnimationFrame(t)};return requestAnimationFrame(t),()=>{cancelAnimationFrame(e)}}),[_]);const f=e=>{const t=window.visualViewport,n=l.current.getBoundingClientRect();s(!0),d({left:(null==t?void 0:t.width)||0,top:(null==t?void 0:t.height)||0,width:n.width}),e.stopPropagation()};let h=(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:"‌"});for(let e=0;e<o.length;++e){const n=o[e];if(void 0!==n&&(!t||t(n))){const[e,t]=optionValueName(n);if(e===i){h=t;break}}}let x=a.container;_&&(x+=` ${a.active}`);let b=a.select||"";return m&&(x+=` ${a.upward}`,b+=` ${a.upward}`),(0,jsx_runtime.jsxs)("div",{className:x,children:[void 0===n?null:(0,jsx_runtime.jsx)("div",{className:a.label,children:n}),(0,jsx_runtime.jsxs)("div",{className:a.dropdown,onClick:f,onKeyDown:e=>{"Enter"===e.key&&f(e)},ref:l,role:"listbox",tabIndex:0,children:[h,(0,jsx_runtime.jsx)("div",{className:a.arrow})]}),_?(0,jsx_runtime.jsx)(CustomDropdown_Options,{containerClass:b,containerStyle:u,onCancel:()=>{s(!1)},onChange:e=>{s(!1),r&&r(e)},optionClass:a.option||"",options:o,ref:c}):null]})};var CustomDropdown=react_themes_default()(BaseCustomDropdown,"CustomDropdown",theme),NativeDropdown_theme={dropdown:"kI9A9U",context:"xHyZo4",ad:"ADu59e",hoc:"FTP2bb",arrow:"DubGkT",container:"WtSZPd",active:"ayMn7O",label:"K7JYKw",option:"_27pZ6W",hiddenOption:"clAKFJ",select:"N0Fc14",invalid:"wL4umU"};const Dropdown=e=>{let{filter:t,label:n,onChange:r,options:o,testId:a,theme:i,value:_}=e;if(!o)throw Error("Internal error");let s=!1;const l=[];for(let e=0;e<o.length;++e){const n=o[e];if(void 0!==n&&(!t||t(n))){const[e,t]=optionValueName(n);s||(s=e===_),l.push((0,jsx_runtime.jsx)("option",{className:i.option,value:e,children:t},e))}}const c=s?null:(0,jsx_runtime.jsx)("option",{disabled:!0,className:i.hiddenOption,value:_,children:_},"__reactUtilsHiddenOption");let u=i.select;return s||(u+=` ${i.invalid}`),(0,jsx_runtime.jsxs)("div",{className:i.container,children:[void 0===n?null:(0,jsx_runtime.jsx)("div",{className:i.label,children:n}),(0,jsx_runtime.jsxs)("div",{className:i.dropdown,children:[(0,jsx_runtime.jsxs)("select",{className:u,"data-testid":void 0,onChange:r,value:_,children:[c,l]}),(0,jsx_runtime.jsx)("div",{className:i.arrow})]})]})};var NativeDropdown=react_themes_default()(Dropdown,"Dropdown",NativeDropdown_theme),Switch_theme={container:"AWNvRj",context:"VMHfnP",ad:"HNliRC",hoc:"_2Ue-db",option:"fUfIAd",selected:"Wco-qk",options:"CZYtcC"};const BaseSwitch=e=>{let{label:t,onChange:n,options:r,theme:o,value:a}=e;if(!r||!o.option)throw Error("Internal error");const i=[];for(let e=0;e<(null==r?void 0:r.length);++e){const t=r[e];if(void 0!==t){const[e,r]=optionValueName(t);let _,s=o.option;e===a?s+=` ${o.selected}`:n&&(_=()=>n(e)),i.push(_?(0,jsx_runtime.jsx)("div",{className:s,onClick:_,onKeyDown:e=>{_&&"Enter"===e.key&&_()},role:"button",tabIndex:0,children:r},e):(0,jsx_runtime.jsx)("div",{className:s,children:r},e))}}return(0,jsx_runtime.jsxs)("div",{className:o.container,children:[t?(0,jsx_runtime.jsx)("div",{className:o.label,children:t}):null,(0,jsx_runtime.jsx)("div",{className:o.options,children:i})]})};var Switch=react_themes_default()(BaseSwitch,"Switch",Switch_theme),external_react_router_dom_=__webpack_require__(442),GenericLink_style={link:"zH52sA"};const GenericLink=e=>{let{children:t,className:n,disabled:r,enforceA:o,keepScrollPosition:a,onClick:i,onMouseDown:_,openNewTab:s,replace:l,routerLinkType:c,to:u,...d}=e;if(r||o||s||null!=u&&u.match(/^(#|(https?|mailto):)/))return(0,jsx_runtime.jsx)("a",{className:(n?n+" ":"")+"zH52sA",href:u,onClick:r?e=>e.preventDefault():i,onMouseDown:r?e=>e.preventDefault():_,rel:"noopener noreferrer",target:s?"_blank":"",children:t});const m=c;return(0,jsx_runtime.jsx)(m,{className:n,onMouseDown:_,replace:l,to:u,onClick:e=>{i&&i(e),a||window.scroll(0,0)},...d,children:t})};var components_GenericLink=GenericLink;const Link=e=>(0,jsx_runtime.jsx)(components_GenericLink,{...e,routerLinkType:external_react_router_dom_.Link});var components_Link=Link,Button_style={button:"E1FNQT",context:"KM0v4f",ad:"_3jm1-Q",hoc:"_0plpDL",active:"MAe9O6",disabled:"Br9IWV"};const BaseButton=e=>{let{active:t,children:n,disabled:r,enforceA:o,onClick:a,onMouseDown:i,openNewTab:_,replace:s,testId:l,theme:c,to:u}=e,d=c.button;return t&&c.active&&(d+=` ${c.active}`),r?(c.disabled&&(d+=` ${c.disabled}`),(0,jsx_runtime.jsx)("div",{className:d,"data-testid":void 0,children:n})):u?(0,jsx_runtime.jsx)(components_Link,{className:d,"data-testid":void 0,enforceA:o,onClick:a,onMouseDown:i,openNewTab:_,replace:s,to:u,children:n}):(0,jsx_runtime.jsx)("div",{className:d,"data-testid":void 0,onClick:a,onKeyDown:a&&(e=>{"Enter"===e.key&&a(e)}),onMouseDown:i,role:"button",tabIndex:0,children:n})};var Button=react_themes_default()(BaseButton,"Button",Button_style),Checkbox_theme={checkbox:"A-f8qJ",context:"dNQcC6",ad:"earXxa",hoc:"qAPfQ6",indeterminate:"N9bCb8",container:"Kr0g3M",label:"_3dML-O",disabled:"EzQra1"};const Checkbox=e=>{let{checked:t,disabled:n,label:r,onChange:o,testId:a,theme:i}=e,_=i.container;n&&(_+=` ${i.disabled}`);let s=i.checkbox;return"indeterminate"===t&&(s+=` ${i.indeterminate}`),(0,jsx_runtime.jsxs)("div",{className:_,children:[void 0===r?null:(0,jsx_runtime.jsx)("div",{className:i.label,children:r}),(0,jsx_runtime.jsx)("input",{checked:void 0===t?void 0:!0===t,className:s,"data-testid":void 0,disabled:n,onChange:o,onClick:e=>e.stopPropagation(),type:"checkbox"})]})};var components_Checkbox=react_themes_default()(Checkbox,"Checkbox",Checkbox_theme),Input_theme={container:"Cxx397",context:"X5WszA",ad:"_8s7GCr",hoc:"TVlBYc",input:"M07d4s",label:"gfbdq-"};const Input=(0,external_react_.forwardRef)(((e,t)=>{let{label:n,testId:r,theme:o,...a}=e;return(0,jsx_runtime.jsxs)("span",{className:o.container,children:[void 0===n?null:(0,jsx_runtime.jsx)("div",{className:o.label,children:n}),(0,jsx_runtime.jsx)("input",{className:o.input,"data-testid":void 0,ref:t,...a})]})}));var components_Input=react_themes_default()(Input,"Input",Input_theme),PageLayout_base_theme={container:"T3cuHB",context:"m4mL-M",ad:"m3-mdC",hoc:"J15Z4H",mainPanel:"pPlQO2",sidePanel:"lqNh4h"};const PageLayout=e=>{let{children:t,leftSidePanelContent:n,rightSidePanelContent:r,theme:o}=e;return(0,jsx_runtime.jsxs)("div",{className:o.container,children:[(0,jsx_runtime.jsx)("div",{className:[o.sidePanel,o.leftSidePanel].join(" "),children:n}),(0,jsx_runtime.jsx)("div",{className:o.mainPanel,children:t}),(0,jsx_runtime.jsx)("div",{className:[o.sidePanel,o.rightSidePanel].join(" "),children:r})]})};var components_PageLayout=react_themes_default()(PageLayout,"PageLayout",PageLayout_base_theme),external_react_helmet_=__webpack_require__(883);const Context=(0,external_react_.createContext)({description:"",title:""}),MetaTags=e=>{let{children:t,description:n,extraMetaTags:r,image:o,siteName:a,socialDescription:i,socialTitle:_,title:s,url:l}=e;const c=_||s,u=i||n,d=(0,external_react_.useMemo)((()=>({description:n,image:o,siteName:a,socialDescription:i,socialTitle:_,title:s,url:l})),[n,o,a,i,_,s,l]),m=[];if(null!=r&&r.length)for(let e=0;e<r.length;++e){const{content:t,name:n}=r[e];m.push((0,jsx_runtime.jsx)("meta",{content:t,name:n},`extra-meta-tag-${e}`))}return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)(external_react_helmet_.Helmet,{children:[(0,jsx_runtime.jsx)("title",{children:s}),(0,jsx_runtime.jsx)("meta",{name:"description",content:n}),(0,jsx_runtime.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,jsx_runtime.jsx)("meta",{name:"twitter:title",content:c}),(0,jsx_runtime.jsx)("meta",{name:"twitter:description",content:u}),o?(0,jsx_runtime.jsx)("meta",{name:"twitter:image",content:o}):null,a?(0,jsx_runtime.jsx)("meta",{name:"twitter:site",content:`@${a}`}):null,(0,jsx_runtime.jsx)("meta",{name:"og:title",content:c}),o?(0,jsx_runtime.jsx)("meta",{name:"og:image",content:o}):null,o?(0,jsx_runtime.jsx)("meta",{name:"og:image:alt",content:c}):null,(0,jsx_runtime.jsx)("meta",{name:"og:description",content:u}),a?(0,jsx_runtime.jsx)("meta",{name:"og:sitename",content:a}):null,l?(0,jsx_runtime.jsx)("meta",{name:"og:url",content:l}):null,m]}),t?(0,jsx_runtime.jsx)(Context.Provider,{value:d,children:t}):null]})};MetaTags.Context=Context;var components_MetaTags=MetaTags;const NavLink=e=>(0,jsx_runtime.jsx)(components_GenericLink,{...e,routerLinkType:external_react_router_dom_.NavLink});var components_NavLink=NavLink,Throbber_theme={container:"_7zdld4",context:"uIObt7",ad:"XIxe9o",hoc:"YOyORH",circle:"dBrB4g",bouncing:"TJe-6j"};const Throbber=e=>{let{theme:t}=e;return(0,jsx_runtime.jsxs)("span",{className:t.container,children:[(0,jsx_runtime.jsx)("span",{className:t.circle}),(0,jsx_runtime.jsx)("span",{className:t.circle}),(0,jsx_runtime.jsx)("span",{className:t.circle})]})};var components_Throbber=react_themes_default()(Throbber,"Throbber",Throbber_theme);let PLACEMENTS=function(e){return e.ABOVE_CURSOR="ABOVE_CURSOR",e.ABOVE_ELEMENT="ABOVE_ELEMENT",e.BELOW_CURSOR="BELOW_CURSOR",e.BELOW_ELEMENT="BELOW_ELEMENT",e}({});const ARROW_STYLE_DOWN=["border-bottom-color:transparent","border-left-color:transparent","border-right-color:transparent"].join(";"),ARROW_STYLE_UP=["border-top-color:transparent","border-left-color:transparent","border-right-color:transparent"].join(";");function createTooltipComponents(e){const t=document.createElement("div");e.arrow&&t.setAttribute("class",e.arrow);const n=document.createElement("div");e.content&&n.setAttribute("class",e.content);const r=document.createElement("div");return e.container&&r.setAttribute("class",e.container),r.appendChild(t),r.appendChild(n),document.body.appendChild(r),{container:r,arrow:t,content:n}}function calcTooltipRects(e){return{arrow:e.arrow.getBoundingClientRect(),container:e.container.getBoundingClientRect()}}function calcViewportRect(){const{scrollX:e,scrollY:t}=window,{documentElement:{clientHeight:n,clientWidth:r}}=document;return{left:e,right:e+r,top:t,bottom:t+n}}function calcPositionAboveXY(e,t,n){const{arrow:r,container:o}=n;return{arrowX:.5*(o.width-r.width),arrowY:o.height,containerX:e-o.width/2,containerY:t-o.height-r.height/1.5,baseArrowStyle:ARROW_STYLE_DOWN}}function setComponentPositions(e,t,n,r,o){const a=calcTooltipRects(o),i=calcViewportRect(),_=calcPositionAboveXY(e,t,a);if(_.containerX<i.left+6)_.containerX=i.left+6,_.arrowX=Math.max(6,e-_.containerX-a.arrow.width/2);else{const t=i.right-6-a.container.width;_.containerX>t&&(_.containerX=t,_.arrowX=Math.min(a.container.width-6,e-_.containerX-a.arrow.width/2))}_.containerY<i.top+6&&(_.containerY+=a.container.height+2*a.arrow.height,_.arrowY-=a.container.height+a.arrow.height,_.baseArrowStyle=ARROW_STYLE_UP);const s=`left:${_.containerX}px;top:${_.containerY}px`;o.container.setAttribute("style",s);const l=`${_.baseArrowStyle};left:${_.arrowX}px;top:${_.arrowY}px`;o.arrow.setAttribute("style",l)}const Tooltip=(0,external_react_.forwardRef)(((e,t)=>{let{children:n,theme:r}=e;const{current:o}=(0,external_react_.useRef)({lastElement:void 0,lastPageX:0,lastPageY:0,lastPlacement:void 0}),[a,i]=(0,external_react_.useState)(null),_=(e,t,n,r)=>{o.lastElement=r,o.lastPageX=e,o.lastPageY=t,o.lastPlacement=n,a&&setComponentPositions(e,t,n,r,a)};return(0,external_react_.useImperativeHandle)(t,(()=>({pointTo:_}))),(0,external_react_.useEffect)((()=>{const e=createTooltipComponents(r);return i(e),()=>{document.body.removeChild(e.container),i(null)}}),[r]),(0,external_react_.useEffect)((()=>{a&&setComponentPositions(o.lastPageX,o.lastPageY,o.lastPlacement,o.lastElement,a)}),[a,o.lastPageX,o.lastPageY,o.lastPlacement,o.lastElement]),a?(0,external_react_dom_.createPortal)(n,a.content):null}));var WithTooltip_Tooltip=Tooltip,default_theme={arrow:"M9gywF",ad:"_4xT7zE",hoc:"zd-vnH",context:"GdZucr",container:"f9gY8K",appearance:"L4ubm-",wrapper:"_4qDBRM"};const Wrapper=e=>{let{children:t,placement:n=PLACEMENTS.ABOVE_CURSOR,tip:r,theme:o}=e;const{current:a}=(0,external_react_.useRef)({lastCursorX:0,lastCursorY:0,triggeredByTouch:!1,timerId:void 0}),i=(0,external_react_.useRef)(),_=(0,external_react_.useRef)(null),[s,l]=(0,external_react_.useState)(!1);return(0,external_react_.useEffect)((()=>{if(s&&null!==r){i.current&&i.current.pointTo(a.lastCursorX+window.scrollX,a.lastCursorY+window.scrollY,n,_.current);const e=()=>l(!1);return window.addEventListener("scroll",e),()=>window.removeEventListener("scroll",e)}}),[a.lastCursorX,a.lastCursorY,n,s,r]),(0,jsx_runtime.jsxs)("div",{className:o.wrapper,onMouseLeave:()=>l(!1),onMouseMove:e=>((e,t)=>{if(s){const r=_.current.getBoundingClientRect();e<r.left||e>r.right||t<r.top||t>r.bottom?l(!1):i.current&&i.current.pointTo(e+window.scrollX,t+window.scrollY,n,_.current)}else a.lastCursorX=e,a.lastCursorY=t,a.triggeredByTouch?a.timerId||(a.timerId=setTimeout((()=>{a.triggeredByTouch=!1,a.timerId=void 0,l(!0)}),300)):l(!0)})(e.clientX,e.clientY),onClick:()=>{a.timerId&&(clearTimeout(a.timerId),a.timerId=void 0,a.triggeredByTouch=!1)},onTouchStart:()=>{a.triggeredByTouch=!0},ref:_,role:"presentation",children:[s&&null!==r?(0,jsx_runtime.jsx)(WithTooltip_Tooltip,{ref:i,theme:o,children:r}):null,t]})},ThemedWrapper=react_themes_default()(Wrapper,"WithTooltip",default_theme),e=ThemedWrapper;e.PLACEMENTS=PLACEMENTS;var WithTooltip=e,external_qs_=__webpack_require__(360),external_qs_default=__webpack_require__.n(external_qs_),base={container:"sXHM81",context:"veKyYi",ad:"r3ABzd",hoc:"YKcPnR",video:"SlV2zw"},throbber={container:"jTxmOX",context:"dzIcLh",ad:"_5a9XX1",hoc:"_7sH52O"};const YouTubeVideo=e=>{var t;let{autoplay:n,src:r,theme:o,title:a}=e;const i=r.split("?");let _=i[0];const s=i[1],l=s?external_qs_default().parse(s):{};return _=`https://www.youtube.com/embed/${l.v||(null===(t=_)||void 0===t||null===(t=t.match(/\/([a-zA-Z0-9-_]*)$/))||void 0===t?void 0:t[1])}`,delete l.v,l.autoplay=n?"1":"0",_+=`?${external_qs_default().stringify(l)}`,(0,jsx_runtime.jsxs)("div",{className:o.container,children:[(0,jsx_runtime.jsx)(components_Throbber,{theme:throbber}),(0,jsx_runtime.jsx)("iframe",{allow:"autoplay",allowFullScreen:!0,className:o.video,src:_,title:a})]})};var components_YouTubeVideo=react_themes_default()(YouTubeVideo,"YouTubeVideo",base),TextArea_style={container:"dzMVIB",context:"KVPc7g",ad:"z2GQ0Z",hoc:"_8R1Qdj",textarea:"zd-OFg",hidden:"GiHBXI"};const TextArea=e=>{let{disabled:t,onChange:n,onKeyDown:r,placeholder:o,theme:a,value:i}=e;const _=(0,external_react_.useRef)(null),[s,l]=(0,external_react_.useState)(),[c,u]=(0,external_react_.useState)(i||"");return void 0!==i&&c!==i&&u(i),(0,external_react_.useEffect)((()=>{const e=_.current;if(!e)return;const t=new ResizeObserver((()=>{l(e.scrollHeight)}));return t.observe(e),()=>{t.disconnect()}}),[]),(0,external_react_.useEffect)((()=>{const e=_.current;e&&l(e.scrollHeight)}),[c]),(0,jsx_runtime.jsxs)("div",{className:a.container,children:[(0,jsx_runtime.jsx)("textarea",{readOnly:!0,ref:_,className:`${a.textarea} ${a.hidden}`,value:c}),(0,jsx_runtime.jsx)("textarea",{disabled:t,onChange:void 0===i?e=>{u(e.target.value)}:n,onKeyDown:r,placeholder:o,style:{height:s},className:a.textarea,value:c})]})};var components_TextArea=react_themes_default()(TextArea,"TextArea",TextArea_style),src_dirname="/";const server=webpack.requireWeak("./server",src_dirname),client=server?void 0:__webpack_require__(969).A;return __webpack_exports__}()}));
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@dr.pogodin/js-utils"),require("@dr.pogodin/react-global-state"),require("@dr.pogodin/react-themes"),require("cookie"),require("dayjs"),require("node-forge/lib/aes"),require("node-forge/lib/forge"),require("qs"),require("react"),require("react-dom"),require("react-dom/client"),require("react-helmet"),require("react-router-dom")):"function"==typeof define&&define.amd?define(["@dr.pogodin/js-utils","@dr.pogodin/react-global-state","@dr.pogodin/react-themes","cookie","dayjs","node-forge/lib/aes","node-forge/lib/forge","qs","react","react-dom","react-dom/client","react-helmet","react-router-dom"],t):"object"==typeof exports?exports["@dr.pogodin/react-utils"]=t(require("@dr.pogodin/js-utils"),require("@dr.pogodin/react-global-state"),require("@dr.pogodin/react-themes"),require("cookie"),require("dayjs"),require("node-forge/lib/aes"),require("node-forge/lib/forge"),require("qs"),require("react"),require("react-dom"),require("react-dom/client"),require("react-helmet"),require("react-router-dom")):e["@dr.pogodin/react-utils"]=t(e["@dr.pogodin/js-utils"],e["@dr.pogodin/react-global-state"],e["@dr.pogodin/react-themes"],e.cookie,e.dayjs,e["node-forge/lib/aes"],e["node-forge/lib/forge"],e.qs,e.react,e["react-dom"],e["react-dom/client"],e["react-helmet"],e["react-router-dom"])}("undefined"!=typeof self?self:this,(function(__WEBPACK_EXTERNAL_MODULE__864__,__WEBPACK_EXTERNAL_MODULE__126__,__WEBPACK_EXTERNAL_MODULE__859__,__WEBPACK_EXTERNAL_MODULE__462__,__WEBPACK_EXTERNAL_MODULE__185__,__WEBPACK_EXTERNAL_MODULE__958__,__WEBPACK_EXTERNAL_MODULE__814__,__WEBPACK_EXTERNAL_MODULE__360__,__WEBPACK_EXTERNAL_MODULE__155__,__WEBPACK_EXTERNAL_MODULE__514__,__WEBPACK_EXTERNAL_MODULE__236__,__WEBPACK_EXTERNAL_MODULE__883__,__WEBPACK_EXTERNAL_MODULE__442__){return function(){"use strict";var __webpack_modules__={668:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{A:function(){return getInj}});var node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(814),node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0__),node_forge_lib_aes__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(958),node_forge_lib_aes__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(node_forge_lib_aes__WEBPACK_IMPORTED_MODULE_1__),_shared_utils_isomorphy_buildInfo__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(540);let inj={};const metaElement="undefined"!=typeof document?document.querySelector('meta[itemprop="drpruinj"]'):null;if(metaElement){metaElement.remove();let data=node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0___default().util.decode64(metaElement.content);const{key:key}=(0,_shared_utils_isomorphy_buildInfo__WEBPACK_IMPORTED_MODULE_2__.F)(),d=node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0___default().cipher.createDecipher("AES-CBC",key);d.start({iv:data.slice(0,key.length)}),d.update(node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0___default().util.createBuffer(data.slice(key.length))),d.finish(),data=node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0___default().util.decodeUtf8(d.output.data),inj=eval(`(${data})`)}else"undefined"!=typeof window&&window.REACT_UTILS_INJECTION?(inj=window.REACT_UTILS_INJECTION,delete window.REACT_UTILS_INJECTION):inj={};function getInj(){return inj}},969:function(e,t,n){n.d(t,{A:function(){return s}}),n(155);var r=n(126),o=n(236),a=n(442),i=n(668),_=n(922);function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=document.getElementById("react-view");if(!n)throw Error("Failed to find container for React app");const s=(0,_.jsx)(r.GlobalStateProvider,{initialState:(0,i.A)().ISTATE||t.initialState,children:(0,_.jsx)(a.BrowserRouter,{future:{v7_relativeSplatPath:!0,v7_startTransition:!0},children:(0,_.jsx)(e,{})})});t.dontHydrate?(0,o.createRoot)(n).render(s):(0,o.hydrateRoot)(n,s)}},540:function(e,t,n){let r;function o(){if(void 0===r)throw Error('"Build Info" has not been initialized yet');return r}n.d(t,{F:function(){return o}}),"undefined"!=typeof BUILD_INFO&&(r=BUILD_INFO)},48:function(e,t,n){n.d(t,{B:function(){return r},p:function(){return o}});const r="object"!=typeof process||!process.versions||!process.versions.node||!!n.g.REACT_UTILS_FORCE_CLIENT_SIDE,o=!r},724:function(e,t,n){n.r(t),n.d(t,{IS_CLIENT_SIDE:function(){return o.B},IS_SERVER_SIDE:function(){return o.p},buildTimestamp:function(){return _},getBuildInfo:function(){return r.F},isDevBuild:function(){return a},isProdBuild:function(){return i}});var r=n(540),o=n(48);function a(){return!1}function i(){return!0}function _(){return(0,r.F)().timestamp}},148:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{requireWeak:function(){return requireWeak},resolveWeak:function(){return resolveWeak}});var _isomorphy__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(724);function requireWeak(modulePath,basePath){if(_isomorphy__WEBPACK_IMPORTED_MODULE_0__.IS_CLIENT_SIDE)return null;try{const{resolve:resolve}=eval("require")("path"),path=basePath?resolve(basePath,modulePath):modulePath,module=eval("require")(path);if(!("default"in module))return module;const{default:def,...named}=module,res=def;return Object.entries(named).forEach((e=>{let[t,n]=e;const r=res[t];if(void 0!==r){if(r!==n)throw Error("Conflict between default and named exports")}else res[t]=n})),res}catch{return null}}function resolveWeak(e){return e}},394:function(e,t,n){var r=n(155),o=Symbol.for("react.element"),a=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,_=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,n){var r,a={},l=null,c=null;for(r in void 0!==n&&(l=""+n),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(c=t.ref),t)i.call(t,r)&&!s.hasOwnProperty(r)&&(a[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===a[r]&&(a[r]=t[r]);return{$$typeof:o,type:e,key:l,ref:c,props:a,_owner:_.current}}t.Fragment=a,t.jsx=l,t.jsxs=l},922:function(e,t,n){e.exports=n(394)},864:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__864__},126:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__126__},859:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__859__},462:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__462__},185:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__185__},958:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__958__},814:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__814__},360:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__360__},155:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__155__},514:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__514__},236:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__236__},883:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__883__},442:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__442__}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](n,n.exports,__webpack_require__),n.exports}__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=function(e,t){for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Barrier:function(){return js_utils_.Barrier},BaseButton:function(){return BaseButton},BaseModal:function(){return BaseModal},Button:function(){return Button},Checkbox:function(){return components_Checkbox},CustomDropdown:function(){return CustomDropdown},Dropdown:function(){return NativeDropdown},Emitter:function(){return js_utils_.Emitter},GlobalStateProvider:function(){return react_global_state_.GlobalStateProvider},Input:function(){return components_Input},Link:function(){return components_Link},MetaTags:function(){return components_MetaTags},Modal:function(){return Modal},NavLink:function(){return components_NavLink},PageLayout:function(){return components_PageLayout},Semaphore:function(){return js_utils_.Semaphore},Switch:function(){return Switch},TextArea:function(){return components_TextArea},ThemeProvider:function(){return react_themes_.ThemeProvider},Throbber:function(){return components_Throbber},WithTooltip:function(){return WithTooltip},YouTubeVideo:function(){return components_YouTubeVideo},client:function(){return client},config:function(){return utils_config},getGlobalState:function(){return react_global_state_.getGlobalState},getSsrContext:function(){return getSsrContext},isomorphy:function(){return isomorphy},newAsyncDataEnvelope:function(){return react_global_state_.newAsyncDataEnvelope},server:function(){return server},splitComponent:function(){return splitComponent},themed:function(){return themed},time:function(){return utils_time},useAsyncCollection:function(){return react_global_state_.useAsyncCollection},useAsyncData:function(){return react_global_state_.useAsyncData},useGlobalState:function(){return react_global_state_.useGlobalState},webpack:function(){return webpack},withGlobalStateType:function(){return react_global_state_.withGlobalStateType},withRetries:function(){return js_utils_.withRetries}});var global={},react_themes_=__webpack_require__(859),react_themes_default=__webpack_require__.n(react_themes_),environment_check=__webpack_require__(48),webpack=__webpack_require__(148);const config=(environment_check.B?__webpack_require__(668).A().CONFIG:(0,webpack.requireWeak)("config"))||{};if(environment_check.B&&"undefined"!=typeof document){const e=__webpack_require__(462);config.CSRF=e.parse(document.cookie).csrfToken}var utils_config=config,isomorphy=__webpack_require__(724),external_cookie_=__webpack_require__(462),external_dayjs_=__webpack_require__(185),external_dayjs_default=__webpack_require__.n(external_dayjs_),external_react_=__webpack_require__(155),js_utils_=__webpack_require__(864),react_global_state_=__webpack_require__(126);const{getSsrContext:getSsrContext}=(0,react_global_state_.withGlobalStateType)();function useCurrent(){let{autorefresh:e=!1,globalStatePath:t="currentTime",precision:n=5*js_utils_.SEC_MS}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[r,o]=(0,react_global_state_.useGlobalState)(t,Date.now);return(0,external_react_.useEffect)((()=>{let t;const r=()=>{o((e=>{const t=Date.now();return Math.abs(t-e)>n?t:e})),e&&(t=setTimeout(r,n))};return r(),()=>{t&&clearTimeout(t)}}),[e,n,o]),r}function useTimezoneOffset(){let{cookieName:e="timezoneOffset",globalStatePath:t="timezoneOffset"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=getSsrContext(!1),[r,o]=(0,react_global_state_.useGlobalState)(t,(()=>{var t;const r=e&&(null==n||null===(t=n.req)||void 0===t||null===(t=t.cookies)||void 0===t?void 0:t[e]);return r?parseInt(r,10):0}));return(0,external_react_.useEffect)((()=>{const t=(new Date).getTimezoneOffset();o(t),e&&(document.cookie=(0,external_cookie_.serialize)(e,t.toString(),{path:"/"}))}),[e,o]),r}const time={DAY_MS:js_utils_.DAY_MS,HOUR_MS:js_utils_.HOUR_MS,MIN_MS:js_utils_.MIN_MS,SEC_MS:js_utils_.SEC_MS,YEAR_MS:js_utils_.YEAR_MS,now:Date.now,timer:js_utils_.timer,useCurrent:useCurrent,useTimezoneOffset:useTimezoneOffset};var utils_time=Object.assign(external_dayjs_default(),time),jsx_runtime=__webpack_require__(922);let clientChunkGroups;isomorphy.IS_CLIENT_SIDE&&(clientChunkGroups=__webpack_require__(668).A().CHUNK_GROUPS||{});const refCounts={};function getPublicPath(){return(0,isomorphy.getBuildInfo)().publicPath}function bookStyleSheet(e,t,n){let r;const o=`${getPublicPath()}/${e}`,a=`${document.location.origin}${o}`;if(!t.has(a)){let e=document.querySelector(`link[href="${o}"]`);e||(e=document.createElement("link"),e.setAttribute("rel","stylesheet"),e.setAttribute("href",o),document.head.appendChild(e)),r=new js_utils_.Barrier,e.addEventListener("load",(()=>r.resolve())),e.addEventListener("error",(()=>r.resolve()))}if(n){const e=refCounts[o]||0;refCounts[o]=1+e}return r}function getLoadedStyleSheets(){const e=new Set,{styleSheets:t}=document;for(let r=0;r<t.length;++r){var n;const o=null===(n=t[r])||void 0===n?void 0:n.href;o&&e.add(o)}return e}function assertChunkName(e,t){if(!t[e])throw Error(`Unknown chunk name "${e}"`)}function bookStyleSheets(e,t,n){const r=[],o=t[e];if(!o)return Promise.resolve();const a=getLoadedStyleSheets();for(let e=0;e<o.length;++e){const t=o[e];if(null!=t&&t.endsWith(".css")){const e=bookStyleSheet(t,a,n);e&&r.push(e)}}return r.length?Promise.allSettled(r).then():Promise.resolve()}function freeStyleSheets(e,t){const n=t[e];if(n)for(let e=0;e<n.length;++e){const t=n[e];if(null!=t&&t.endsWith(".css")){const e=`${getPublicPath()}/${t}`,n=refCounts[e];n&&(n<=1?(document.head.querySelector(`link[href="${e}"]`).remove(),delete refCounts[e]):refCounts[e]=n-1)}}}const usedChunkNames=new Set;function splitComponent(e){let{chunkName:t,getComponent:n,placeholder:r}=e;if(isomorphy.IS_CLIENT_SIDE&&assertChunkName(t,clientChunkGroups),usedChunkNames.has(t))throw Error(`Repeated splitComponent() call for the chunk "${t}"`);usedChunkNames.add(t);const o=(0,external_react_.lazy)((async()=>{const e=await n(),r="default"in e?e.default:e;return isomorphy.IS_CLIENT_SIDE&&await bookStyleSheets(t,clientChunkGroups,!1),{default:(0,external_react_.forwardRef)(((e,n)=>{let{children:o,...a}=e;if(isomorphy.IS_SERVER_SIDE){const{chunkGroups:e,chunks:n}=getSsrContext();assertChunkName(t,e),n.includes(t)||n.push(t)}return(0,external_react_.useInsertionEffect)((()=>(bookStyleSheets(t,clientChunkGroups,!0),()=>freeStyleSheets(t,clientChunkGroups))),[]),(0,jsx_runtime.jsx)(r,{ref:n,...a,children:o})}))}}));return e=>{let{children:t,...n}=e;return(0,jsx_runtime.jsx)(external_react_.Suspense,{fallback:r,children:(0,jsx_runtime.jsx)(o,{...n,children:t})})}}const themed=react_themes_default();themed.COMPOSE=react_themes_.COMPOSE,themed.PRIORITY=react_themes_.PRIORITY;var external_react_dom_=__webpack_require__(514),external_react_dom_default=__webpack_require__.n(external_react_dom_),base_theme={overlay:"ye2BZo",context:"Szmbbz",ad:"Ah-Nsc",hoc:"Wki41G",container:"gyZ4rc"},styles={scrollingDisabledByModal:"_5fRFtF"};const BaseModal=e=>{let{cancelOnScrolling:t,children:n,containerStyle:r,dontDisableScrolling:o,onCancel:a,style:i,testId:_,testIdForOverlay:s,theme:l}=e;const c=(0,external_react_.useRef)(null),u=(0,external_react_.useRef)(null),[d,m]=(0,external_react_.useState)();(0,external_react_.useEffect)((()=>{const e=document.createElement("div");return document.body.appendChild(e),m(e),()=>{document.body.removeChild(e)}}),[]),(0,external_react_.useEffect)((()=>(t&&a&&(window.addEventListener("scroll",a),window.addEventListener("wheel",a)),()=>{t&&a&&(window.removeEventListener("scroll",a),window.removeEventListener("wheel",a))})),[t,a]),(0,external_react_.useEffect)((()=>(o||document.body.classList.add(styles.scrollingDisabledByModal),()=>{o||document.body.classList.remove(styles.scrollingDisabledByModal)})),[o]);const p=(0,external_react_.useMemo)((()=>(0,jsx_runtime.jsx)("div",{onFocus:()=>{var e,t;const n=null===(e=c.current)||void 0===e?void 0:e.querySelectorAll("*");for(let e=n.length-1;e>=0;--e){var r;if(null===(r=n[e])||void 0===r||r.focus(),document.activeElement===n[e])return}null===(t=u.current)||void 0===t||t.focus()},tabIndex:0})),[]);return d?external_react_dom_default().createPortal((0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[p,(0,jsx_runtime.jsx)("div",{"aria-label":"Cancel",className:l.overlay,"data-testid":void 0,onClick:e=>{a&&(a(),e.stopPropagation())},onKeyDown:e=>{"Escape"===e.key&&a&&(a(),e.stopPropagation())},ref:e=>{e&&e!==u.current&&(u.current=e,e.focus())},role:"button",tabIndex:0}),(0,jsx_runtime.jsx)("div",{"aria-modal":"true",className:l.container,"data-testid":void 0,onClick:e=>e.stopPropagation(),onWheel:e=>e.stopPropagation(),ref:c,role:"dialog",style:null!=i?i:r,children:n}),(0,jsx_runtime.jsx)("div",{onFocus:()=>{var e;null===(e=u.current)||void 0===e||e.focus()},tabIndex:0}),p]}),d):null};var Modal=react_themes_default()(BaseModal,"Modal",base_theme),style={overlay:"jKsMKG"};function isValue(e){const t=typeof e;return"number"===t||"string"===t}function optionValueName(e){var t;return isValue(e)?[e,e]:[e.value,null!==(t=e.name)&&void 0!==t?t:e.value]}function areEqual(e,t){return(null==e?void 0:e.left)===(null==t?void 0:t.left)&&(null==e?void 0:e.top)===(null==t?void 0:t.top)&&(null==e?void 0:e.width)===(null==t?void 0:t.width)}const Options=(0,external_react_.forwardRef)(((e,t)=>{let{containerClass:n,containerStyle:r,filter:o,onCancel:a,onChange:i,optionClass:_,options:s}=e;const l=(0,external_react_.useRef)(null);(0,external_react_.useImperativeHandle)(t,(()=>({measure:()=>{var e,t;const n=null===(e=l.current)||void 0===e?void 0:e.parentElement;if(!n)return;const r=null===(t=l.current)||void 0===t?void 0:t.getBoundingClientRect(),o=window.getComputedStyle(n),a=parseFloat(o.marginBottom),i=parseFloat(o.marginTop);return r.height+=a+i,r}})),[]);const c=[];for(let e=0;e<s.length;++e){const t=s[e];if(void 0!==t&&(!o||o(t))){const[e,n]=optionValueName(t);c.push((0,jsx_runtime.jsx)("div",{className:_,onClick:t=>{i(e),t.stopPropagation()},onKeyDown:t=>{"Enter"===t.key&&(i(e),t.stopPropagation())},role:"button",tabIndex:0,children:n},e))}}return(0,jsx_runtime.jsx)(BaseModal,{cancelOnScrolling:!0,containerStyle:r,dontDisableScrolling:!0,onCancel:a,theme:{ad:"",hoc:"",container:n,context:"",overlay:style.overlay},children:(0,jsx_runtime.jsx)("div",{ref:l,children:c})})}));var CustomDropdown_Options=Options,theme={container:"oQKv0Y",context:"_9Tod5r",ad:"R58zIg",hoc:"O-Tp1i",label:"YUPUNs",dropdown:"pNEyAA",option:"LD2Kzy",select:"LP5azC",arrow:"-wscve",active:"k2UDsV",upward:"HWRvu4"};const BaseCustomDropdown=e=>{let{filter:t,label:n,onChange:r,options:o,theme:a,value:i}=e;if(!o)throw Error("Internal error");const[_,s]=(0,external_react_.useState)(!1),l=(0,external_react_.useRef)(null),c=(0,external_react_.useRef)(null),[u,d]=(0,external_react_.useState)(),[m,p]=(0,external_react_.useState)(!1);(0,external_react_.useEffect)((()=>{if(!_)return;let e;const t=()=>{var n,r;const o=null===(n=l.current)||void 0===n?void 0:n.getBoundingClientRect(),a=null===(r=c.current)||void 0===r?void 0:r.measure();if(o&&a){var i,_;const e=o.bottom+a.height<(null!==(i=null===(_=window.visualViewport)||void 0===_?void 0:_.height)&&void 0!==i?i:0),t=o.top-a.height>0,n=!e&&t;p(n);const r=n?{top:o.top-a.height-1,left:o.left,width:o.width}:{left:o.left,top:o.bottom,width:o.width};d((e=>areEqual(e,r)?e:r))}e=requestAnimationFrame(t)};return requestAnimationFrame(t),()=>{cancelAnimationFrame(e)}}),[_]);const f=e=>{const t=window.visualViewport,n=l.current.getBoundingClientRect();s(!0),d({left:(null==t?void 0:t.width)||0,top:(null==t?void 0:t.height)||0,width:n.width}),e.stopPropagation()};let h=(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:"‌"});for(let e=0;e<o.length;++e){const n=o[e];if(void 0!==n&&(!t||t(n))){const[e,t]=optionValueName(n);if(e===i){h=t;break}}}let x=a.container;_&&(x+=` ${a.active}`);let b=a.select||"";return m&&(x+=` ${a.upward}`,b+=` ${a.upward}`),(0,jsx_runtime.jsxs)("div",{className:x,children:[void 0===n?null:(0,jsx_runtime.jsx)("div",{className:a.label,children:n}),(0,jsx_runtime.jsxs)("div",{className:a.dropdown,onClick:f,onKeyDown:e=>{"Enter"===e.key&&f(e)},ref:l,role:"listbox",tabIndex:0,children:[h,(0,jsx_runtime.jsx)("div",{className:a.arrow})]}),_?(0,jsx_runtime.jsx)(CustomDropdown_Options,{containerClass:b,containerStyle:u,onCancel:()=>{s(!1)},onChange:e=>{s(!1),r&&r(e)},optionClass:a.option||"",options:o,ref:c}):null]})};var CustomDropdown=react_themes_default()(BaseCustomDropdown,"CustomDropdown",theme),NativeDropdown_theme={dropdown:"kI9A9U",context:"xHyZo4",ad:"ADu59e",hoc:"FTP2bb",arrow:"DubGkT",container:"WtSZPd",active:"ayMn7O",label:"K7JYKw",option:"_27pZ6W",hiddenOption:"clAKFJ",select:"N0Fc14",invalid:"wL4umU"};const Dropdown=e=>{let{filter:t,label:n,onChange:r,options:o,testId:a,theme:i,value:_}=e;if(!o)throw Error("Internal error");let s=!1;const l=[];for(let e=0;e<o.length;++e){const n=o[e];if(void 0!==n&&(!t||t(n))){const[e,t]=optionValueName(n);s||(s=e===_),l.push((0,jsx_runtime.jsx)("option",{className:i.option,value:e,children:t},e))}}const c=s?null:(0,jsx_runtime.jsx)("option",{disabled:!0,className:i.hiddenOption,value:_,children:_},"__reactUtilsHiddenOption");let u=i.select;return s||(u+=` ${i.invalid}`),(0,jsx_runtime.jsxs)("div",{className:i.container,children:[void 0===n?null:(0,jsx_runtime.jsx)("div",{className:i.label,children:n}),(0,jsx_runtime.jsxs)("div",{className:i.dropdown,children:[(0,jsx_runtime.jsxs)("select",{className:u,"data-testid":void 0,onChange:r,value:_,children:[c,l]}),(0,jsx_runtime.jsx)("div",{className:i.arrow})]})]})};var NativeDropdown=react_themes_default()(Dropdown,"Dropdown",NativeDropdown_theme),Switch_theme={container:"AWNvRj",context:"VMHfnP",ad:"HNliRC",hoc:"_2Ue-db",option:"fUfIAd",selected:"Wco-qk",options:"CZYtcC"};const BaseSwitch=e=>{let{label:t,onChange:n,options:r,theme:o,value:a}=e;if(!r||!o.option)throw Error("Internal error");const i=[];for(let e=0;e<(null==r?void 0:r.length);++e){const t=r[e];if(void 0!==t){const[e,r]=optionValueName(t);let _,s=o.option;e===a?s+=` ${o.selected}`:n&&(_=()=>n(e)),i.push(_?(0,jsx_runtime.jsx)("div",{className:s,onClick:_,onKeyDown:e=>{_&&"Enter"===e.key&&_()},role:"button",tabIndex:0,children:r},e):(0,jsx_runtime.jsx)("div",{className:s,children:r},e))}}return(0,jsx_runtime.jsxs)("div",{className:o.container,children:[t?(0,jsx_runtime.jsx)("div",{className:o.label,children:t}):null,(0,jsx_runtime.jsx)("div",{className:o.options,children:i})]})};var Switch=react_themes_default()(BaseSwitch,"Switch",Switch_theme),external_react_router_dom_=__webpack_require__(442),GenericLink_style={link:"zH52sA"};const GenericLink=e=>{let{children:t,className:n,disabled:r,enforceA:o,keepScrollPosition:a,onClick:i,onMouseDown:_,openNewTab:s,replace:l,routerLinkType:c,to:u,...d}=e;if(r||o||s||null!=u&&u.match(/^(#|(https?|mailto):)/))return(0,jsx_runtime.jsx)("a",{className:(n?n+" ":"")+"zH52sA",href:u,onClick:r?e=>e.preventDefault():i,onMouseDown:r?e=>e.preventDefault():_,rel:"noopener noreferrer",target:s?"_blank":"",children:t});const m=c;return(0,jsx_runtime.jsx)(m,{className:n,onMouseDown:_,replace:l,to:u,onClick:e=>{i&&i(e),a||window.scroll(0,0)},...d,children:t})};var components_GenericLink=GenericLink;const Link=e=>(0,jsx_runtime.jsx)(components_GenericLink,{...e,routerLinkType:external_react_router_dom_.Link});var components_Link=Link,Button_style={button:"E1FNQT",context:"KM0v4f",ad:"_3jm1-Q",hoc:"_0plpDL",active:"MAe9O6",disabled:"Br9IWV"};const BaseButton=e=>{let{active:t,children:n,disabled:r,enforceA:o,onClick:a,onMouseDown:i,openNewTab:_,replace:s,testId:l,theme:c,to:u}=e,d=c.button;return t&&c.active&&(d+=` ${c.active}`),r?(c.disabled&&(d+=` ${c.disabled}`),(0,jsx_runtime.jsx)("div",{className:d,"data-testid":void 0,children:n})):u?(0,jsx_runtime.jsx)(components_Link,{className:d,"data-testid":void 0,enforceA:o,onClick:a,onMouseDown:i,openNewTab:_,replace:s,to:u,children:n}):(0,jsx_runtime.jsx)("div",{className:d,"data-testid":void 0,onClick:a,onKeyDown:a&&(e=>{"Enter"===e.key&&a(e)}),onMouseDown:i,role:"button",tabIndex:0,children:n})};var Button=react_themes_default()(BaseButton,"Button",Button_style),Checkbox_theme={checkbox:"A-f8qJ",context:"dNQcC6",ad:"earXxa",hoc:"qAPfQ6",indeterminate:"N9bCb8",container:"Kr0g3M",label:"_3dML-O",disabled:"EzQra1"};const Checkbox=e=>{let{checked:t,disabled:n,label:r,onChange:o,testId:a,theme:i}=e,_=i.container;n&&(_+=` ${i.disabled}`);let s=i.checkbox;return"indeterminate"===t&&(s+=` ${i.indeterminate}`),(0,jsx_runtime.jsxs)("div",{className:_,children:[void 0===r?null:(0,jsx_runtime.jsx)("div",{className:i.label,children:r}),(0,jsx_runtime.jsx)("input",{checked:void 0===t?void 0:!0===t,className:s,"data-testid":void 0,disabled:n,onChange:o,onClick:e=>e.stopPropagation(),type:"checkbox"})]})};var components_Checkbox=react_themes_default()(Checkbox,"Checkbox",Checkbox_theme),Input_theme={container:"Cxx397",context:"X5WszA",ad:"_8s7GCr",hoc:"TVlBYc",input:"M07d4s",label:"gfbdq-"};const Input=(0,external_react_.forwardRef)(((e,t)=>{let{label:n,testId:r,theme:o,...a}=e;return(0,jsx_runtime.jsxs)("span",{className:o.container,children:[void 0===n?null:(0,jsx_runtime.jsx)("div",{className:o.label,children:n}),(0,jsx_runtime.jsx)("input",{className:o.input,"data-testid":void 0,ref:t,...a})]})}));var components_Input=react_themes_default()(Input,"Input",Input_theme),PageLayout_base_theme={container:"T3cuHB",context:"m4mL-M",ad:"m3-mdC",hoc:"J15Z4H",mainPanel:"pPlQO2",sidePanel:"lqNh4h"};const PageLayout=e=>{let{children:t,leftSidePanelContent:n,rightSidePanelContent:r,theme:o}=e;return(0,jsx_runtime.jsxs)("div",{className:o.container,children:[(0,jsx_runtime.jsx)("div",{className:[o.sidePanel,o.leftSidePanel].join(" "),children:n}),(0,jsx_runtime.jsx)("div",{className:o.mainPanel,children:t}),(0,jsx_runtime.jsx)("div",{className:[o.sidePanel,o.rightSidePanel].join(" "),children:r})]})};var components_PageLayout=react_themes_default()(PageLayout,"PageLayout",PageLayout_base_theme),external_react_helmet_=__webpack_require__(883);const Context=(0,external_react_.createContext)({description:"",title:""}),MetaTags=e=>{let{children:t,description:n,extraMetaTags:r,image:o,siteName:a,socialDescription:i,socialTitle:_,title:s,url:l}=e;const c=_||s,u=i||n,d=(0,external_react_.useMemo)((()=>({description:n,image:o,siteName:a,socialDescription:i,socialTitle:_,title:s,url:l})),[n,o,a,i,_,s,l]),m=[];if(null!=r&&r.length)for(let e=0;e<r.length;++e){const{content:t,name:n}=r[e];m.push((0,jsx_runtime.jsx)("meta",{content:t,name:n},`extra-meta-tag-${e}`))}return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)(external_react_helmet_.Helmet,{children:[(0,jsx_runtime.jsx)("title",{children:s}),(0,jsx_runtime.jsx)("meta",{name:"description",content:n}),(0,jsx_runtime.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,jsx_runtime.jsx)("meta",{name:"twitter:title",content:c}),(0,jsx_runtime.jsx)("meta",{name:"twitter:description",content:u}),o?(0,jsx_runtime.jsx)("meta",{name:"twitter:image",content:o}):null,a?(0,jsx_runtime.jsx)("meta",{name:"twitter:site",content:`@${a}`}):null,(0,jsx_runtime.jsx)("meta",{name:"og:title",content:c}),o?(0,jsx_runtime.jsx)("meta",{name:"og:image",content:o}):null,o?(0,jsx_runtime.jsx)("meta",{name:"og:image:alt",content:c}):null,(0,jsx_runtime.jsx)("meta",{name:"og:description",content:u}),a?(0,jsx_runtime.jsx)("meta",{name:"og:sitename",content:a}):null,l?(0,jsx_runtime.jsx)("meta",{name:"og:url",content:l}):null,m]}),t?(0,jsx_runtime.jsx)(Context.Provider,{value:d,children:t}):null]})};MetaTags.Context=Context;var components_MetaTags=MetaTags;const NavLink=e=>(0,jsx_runtime.jsx)(components_GenericLink,{...e,routerLinkType:external_react_router_dom_.NavLink});var components_NavLink=NavLink,Throbber_theme={container:"_7zdld4",context:"uIObt7",ad:"XIxe9o",hoc:"YOyORH",circle:"dBrB4g",bouncing:"TJe-6j"};const Throbber=e=>{let{theme:t}=e;return(0,jsx_runtime.jsxs)("span",{className:t.container,children:[(0,jsx_runtime.jsx)("span",{className:t.circle}),(0,jsx_runtime.jsx)("span",{className:t.circle}),(0,jsx_runtime.jsx)("span",{className:t.circle})]})};var components_Throbber=react_themes_default()(Throbber,"Throbber",Throbber_theme);let PLACEMENTS=function(e){return e.ABOVE_CURSOR="ABOVE_CURSOR",e.ABOVE_ELEMENT="ABOVE_ELEMENT",e.BELOW_CURSOR="BELOW_CURSOR",e.BELOW_ELEMENT="BELOW_ELEMENT",e}({});const ARROW_STYLE_DOWN=["border-bottom-color:transparent","border-left-color:transparent","border-right-color:transparent"].join(";"),ARROW_STYLE_UP=["border-top-color:transparent","border-left-color:transparent","border-right-color:transparent"].join(";");function createTooltipComponents(e){const t=document.createElement("div");e.arrow&&t.setAttribute("class",e.arrow);const n=document.createElement("div");e.content&&n.setAttribute("class",e.content);const r=document.createElement("div");return e.container&&r.setAttribute("class",e.container),r.appendChild(t),r.appendChild(n),document.body.appendChild(r),{container:r,arrow:t,content:n}}function calcTooltipRects(e){return{arrow:e.arrow.getBoundingClientRect(),container:e.container.getBoundingClientRect()}}function calcViewportRect(){const{scrollX:e,scrollY:t}=window,{documentElement:{clientHeight:n,clientWidth:r}}=document;return{left:e,right:e+r,top:t,bottom:t+n}}function calcPositionAboveXY(e,t,n){const{arrow:r,container:o}=n;return{arrowX:.5*(o.width-r.width),arrowY:o.height,containerX:e-o.width/2,containerY:t-o.height-r.height/1.5,baseArrowStyle:ARROW_STYLE_DOWN}}function setComponentPositions(e,t,n,r,o){const a=calcTooltipRects(o),i=calcViewportRect(),_=calcPositionAboveXY(e,t,a);if(_.containerX<i.left+6)_.containerX=i.left+6,_.arrowX=Math.max(6,e-_.containerX-a.arrow.width/2);else{const t=i.right-6-a.container.width;_.containerX>t&&(_.containerX=t,_.arrowX=Math.min(a.container.width-6,e-_.containerX-a.arrow.width/2))}_.containerY<i.top+6&&(_.containerY+=a.container.height+2*a.arrow.height,_.arrowY-=a.container.height+a.arrow.height,_.baseArrowStyle=ARROW_STYLE_UP);const s=`left:${_.containerX}px;top:${_.containerY}px`;o.container.setAttribute("style",s);const l=`${_.baseArrowStyle};left:${_.arrowX}px;top:${_.arrowY}px`;o.arrow.setAttribute("style",l)}const Tooltip=(0,external_react_.forwardRef)(((e,t)=>{let{children:n,theme:r}=e;const{current:o}=(0,external_react_.useRef)({lastElement:void 0,lastPageX:0,lastPageY:0,lastPlacement:void 0}),[a,i]=(0,external_react_.useState)(null),_=(e,t,n,r)=>{o.lastElement=r,o.lastPageX=e,o.lastPageY=t,o.lastPlacement=n,a&&setComponentPositions(e,t,n,r,a)};return(0,external_react_.useImperativeHandle)(t,(()=>({pointTo:_}))),(0,external_react_.useEffect)((()=>{const e=createTooltipComponents(r);return i(e),()=>{document.body.removeChild(e.container),i(null)}}),[r]),(0,external_react_.useEffect)((()=>{a&&setComponentPositions(o.lastPageX,o.lastPageY,o.lastPlacement,o.lastElement,a)}),[a,o.lastPageX,o.lastPageY,o.lastPlacement,o.lastElement]),a?(0,external_react_dom_.createPortal)(n,a.content):null}));var WithTooltip_Tooltip=Tooltip,default_theme={arrow:"M9gywF",ad:"_4xT7zE",hoc:"zd-vnH",context:"GdZucr",container:"f9gY8K",appearance:"L4ubm-",wrapper:"_4qDBRM"};const Wrapper=e=>{let{children:t,placement:n=PLACEMENTS.ABOVE_CURSOR,tip:r,theme:o}=e;const{current:a}=(0,external_react_.useRef)({lastCursorX:0,lastCursorY:0,triggeredByTouch:!1,timerId:void 0}),i=(0,external_react_.useRef)(),_=(0,external_react_.useRef)(null),[s,l]=(0,external_react_.useState)(!1);return(0,external_react_.useEffect)((()=>{if(s&&null!==r){i.current&&i.current.pointTo(a.lastCursorX+window.scrollX,a.lastCursorY+window.scrollY,n,_.current);const e=()=>l(!1);return window.addEventListener("scroll",e),()=>window.removeEventListener("scroll",e)}}),[a.lastCursorX,a.lastCursorY,n,s,r]),(0,jsx_runtime.jsxs)("div",{className:o.wrapper,onMouseLeave:()=>l(!1),onMouseMove:e=>((e,t)=>{if(s){const r=_.current.getBoundingClientRect();e<r.left||e>r.right||t<r.top||t>r.bottom?l(!1):i.current&&i.current.pointTo(e+window.scrollX,t+window.scrollY,n,_.current)}else a.lastCursorX=e,a.lastCursorY=t,a.triggeredByTouch?a.timerId||(a.timerId=setTimeout((()=>{a.triggeredByTouch=!1,a.timerId=void 0,l(!0)}),300)):l(!0)})(e.clientX,e.clientY),onClick:()=>{a.timerId&&(clearTimeout(a.timerId),a.timerId=void 0,a.triggeredByTouch=!1)},onTouchStart:()=>{a.triggeredByTouch=!0},ref:_,role:"presentation",children:[s&&null!==r?(0,jsx_runtime.jsx)(WithTooltip_Tooltip,{ref:i,theme:o,children:r}):null,t]})},ThemedWrapper=react_themes_default()(Wrapper,"WithTooltip",default_theme),e=ThemedWrapper;e.PLACEMENTS=PLACEMENTS;var WithTooltip=e,external_qs_=__webpack_require__(360),external_qs_default=__webpack_require__.n(external_qs_),base={container:"sXHM81",context:"veKyYi",ad:"r3ABzd",hoc:"YKcPnR",video:"SlV2zw"},throbber={container:"jTxmOX",context:"dzIcLh",ad:"_5a9XX1",hoc:"_7sH52O"};const YouTubeVideo=e=>{var t;let{autoplay:n,src:r,theme:o,title:a}=e;const i=r.split("?");let _=i[0];const s=i[1],l=s?external_qs_default().parse(s):{};return _=`https://www.youtube.com/embed/${l.v||(null===(t=_)||void 0===t||null===(t=t.match(/\/([a-zA-Z0-9-_]*)$/))||void 0===t?void 0:t[1])}`,delete l.v,l.autoplay=n?"1":"0",_+=`?${external_qs_default().stringify(l)}`,(0,jsx_runtime.jsxs)("div",{className:o.container,children:[(0,jsx_runtime.jsx)(components_Throbber,{theme:throbber}),(0,jsx_runtime.jsx)("iframe",{allow:"autoplay",allowFullScreen:!0,className:o.video,src:_,title:a})]})};var components_YouTubeVideo=react_themes_default()(YouTubeVideo,"YouTubeVideo",base),TextArea_style={container:"dzMVIB",context:"KVPc7g",ad:"z2GQ0Z",hoc:"_8R1Qdj",textarea:"zd-OFg",hidden:"GiHBXI"};const TextArea=e=>{let{disabled:t,onChange:n,onKeyDown:r,placeholder:o,theme:a,value:i}=e;const _=(0,external_react_.useRef)(null),[s,l]=(0,external_react_.useState)(),[c,u]=(0,external_react_.useState)(i||"");return void 0!==i&&c!==i&&u(i),(0,external_react_.useEffect)((()=>{const e=_.current;if(!e)return;const t=new ResizeObserver((()=>{l(e.scrollHeight)}));return t.observe(e),()=>{t.disconnect()}}),[]),(0,external_react_.useEffect)((()=>{const e=_.current;e&&l(e.scrollHeight)}),[c]),(0,jsx_runtime.jsxs)("div",{className:a.container,children:[(0,jsx_runtime.jsx)("textarea",{readOnly:!0,ref:_,className:`${a.textarea} ${a.hidden}`,value:c}),(0,jsx_runtime.jsx)("textarea",{disabled:t,onChange:void 0===i?e=>{u(e.target.value)}:n,onKeyDown:r,placeholder:o,style:{height:s},className:a.textarea,value:c})]})};var components_TextArea=react_themes_default()(TextArea,"TextArea",TextArea_style),src_dirname="/";const server=webpack.requireWeak("./server",src_dirname),client=server?void 0:__webpack_require__(969).A;return __webpack_exports__}()}));
3
3
  //# sourceMappingURL=web.bundle.js.map