@dr.pogodin/react-utils 1.11.2 → 1.12.0

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.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/server/index.js"],"names":["DEFAULT_MAX_SSR_ROUNDS","DEFAULT_SSR_TIMEOUT","normalizePort","value","port","_","toNumber","isFinite","isNumber","launch","webpackConfig","options","ops","cloneDeep","process","env","PORT","defaults","httpsRedirect","maxSsrRounds","ssrTimeout","staticCacheSize","isUndefined","logger","format","transports","winston","createLogger","level","defaultLoggerLogLevel","combine","splat","timestamp","colorize","printf","message","stack","rest","res","Object","keys","length","JSON","stringify","Console","expressServer","httpServer","https","createServer","cert","key","http","on","error","syscall","bind","isString","code","exit","addr","address","info","NODE_ENV","listen","SCRIPT_LOCATIONS"],"mappings":"4VAAA,uCAEA,sDACA,kDACA,oDAGA,wBAEA,wDAEA,yDACA,oCAGA,sU,o9BATA,mC,CAWA;AACA,KAAMA,CAAAA,sBAAsB,CAAG,EAA/B,CACA,KAAMC,CAAAA,mBAAmB,CAAG,IAA5B,CAEA;AACA;AACA;AACA;AACA;AACA;AACA,GACA,QAASC,CAAAA,aAAT,CAAuBC,KAAvB,CAA8B,CAC5B,KAAMC,CAAAA,IAAI,CAAGC,gBAAEC,QAAF,CAAWH,KAAX,CAAb,CACA,GAAIE,gBAAEE,QAAF,CAAWH,IAAX,CAAJ,CAAsB,MAAOA,CAAAA,IAAP,CAAa,iBACnC,GAAI,CAACC,gBAAEG,QAAF,CAAWJ,IAAX,CAAL,CAAuB,MAAOD,CAAAA,KAAP,CAAc,gBACrC,MAAO,MACR,CAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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AA1E,CAEA,6DACA,OAAQiD,KAAK,CAACI,IAAd,EACE,IAAK,QAAL,CACE7C,GAAG,CAACW,MAAJ,CAAW8B,KAAX,CAAkB,GAAEE,IAAK,+BAAzB,EACAzC,OAAO,CAAC4C,IAAR,CAAa,CAAb,EACA,MACF,IAAK,YAAL,CACE9C,GAAG,CAACW,MAAJ,CAAW8B,KAAX,CAAkB,GAAEE,IAAK,oBAAzB,EACAzC,OAAO,CAAC4C,IAAR,CAAa,CAAb,EACA,MACF,QACE,KAAML,CAAAA,KAAN,CAVJ,CAYD,CAjBD,EAmBA,iDACAP,UAAU,CAACM,EAAX,CAAc,WAAd,CAA2B,IAAM,CAC/B,KAAMO,CAAAA,IAAI,CAAGb,UAAU,CAACc,OAAX,EAAb,CACA,KAAML,CAAAA,IAAI,CAAGlD,gBAAEmD,QAAF,CAAWG,IAAX,EAAoB,QAAOA,IAAK,EAAhC,CAAqC,QAAOA,IAAI,CAACvD,IAAK,EAAnE,CACAQ,GAAG,CAACW,MAAJ,CAAWsC,IAAX,CAAiB,uBAAsBN,IAAK,OAC1CzC,OAAO,CAACC,GAAR,CAAY+C,QAAS,OADvB,CAED,CALD,EAOAhB,UAAU,CAACiB,MAAX,CAAkBnD,GAAG,CAACR,IAAtB,EAEA,MAAO,CACLyC,aADK,CAELC,UAFK,CAIR,CAEDrC,MAAM,CAACuD,gBAAP,CAA0BA,0BAA1B,C,aAEevD,M","sourcesContent":["import 'source-map-support/register';\n\nimport _ from 'lodash';\nimport http from 'http';\nimport https from 'https';\n\n/* Polyfill required by ReactJS. */\nimport 'raf/polyfill';\n\nimport winston from 'winston';\n\nimport serverFactory from './server';\nimport { SCRIPT_LOCATIONS } from './renderer';\n\nexport { getDefaultCspSettings } from './server';\nexport * from './utils';\n\n// Various default settings of server factory (launch() function).\nconst DEFAULT_MAX_SSR_ROUNDS = 10;\nconst DEFAULT_SSR_TIMEOUT = 1000;\n\n/**\n * Normalizes a port into a number, string, or false.\n * TODO: Drop this function?\n * @ignore\n * @param {String} value Port name or number.\n * @return Port number (Number), name (String), or false.\n */\nfunction normalizePort(value) {\n const port = _.toNumber(value);\n if (_.isFinite(port)) return port; /* port number */\n if (!_.isNumber(port)) return value; /* named pipe */\n return false;\n}\n\n/**\n * Creates and launches web-server for ReactJS application. Allows zero\n * or detailed configuration, supports server-side rendering,\n * and development tools, including Hot Module Reloading (HMR).\n *\n * See {@link module:ReactGlobalState ReactGlobalState} for some additional\n * notes related to SSR, access to incoming requests during SSR, _etc._\n *\n * @param {object} webpackConfig Webpack configuration used to build\n * the frontend bundle. In production mode the server will read out of it\n * `context`, `publicPath`, and a few other parameters, necessary to locate\n * and serve the app bundle. In development mode the server will use entire\n * provided config to build the app bundle in memory, and further watch and\n * update it via HMR.\n * @param {object} [options] Additional parameters.\n * @param {Component} [options.Application] The root ReactJS component of\n * the app to use for the server-side rendering. When not provided\n * the server-side rendering is disabled.\n * @param {function} [options.beforeExpressJsError] Asynchronous callback\n * (`(server) => Promise<boolean>`) to be executed just before the default error\n * handler is added to ExpressJS server. If the callback is provided and its\n * result resolves to a truthy value, `react-utils` won't attach the default\n * error handler.\n * @param {function} [options.beforeExpressJsSetup] Asynchronous callback\n * (`(server) => Promise) to be executed right after ExpressJS server creation,\n * before any configuration is performed.\n * @param {BeforeRenderHook} [options.beforeRender] The hook to run just before\n * the server-side rendering. For each incoming request, it will be executed\n * just before the HTML markup is generated at the server. It allows to load\n * and provide the data necessary for server-side rendering, and also to inject\n * additional configuration and scripts into the generated HTML code.\n * @param {boolean} [options.noCsp] Set `true` to disable\n * Content-Security-Policy (CSP) headers altogether.\n * @param {function} [options.cspSettingsHook] A hook allowing\n * to customize [CSP](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP)\n * settings for [helmet](https://github.com/helmetjs/helmet)'s\n * `contentSecurityPolicy` middleware on per-request basis.\n *\n * If provided it should be a with signature: \\\n * `(defaultSettings: object, req: object)` &rArr; `object` \\\n * which gets the default settings (also used without the hook),\n * and the incoming request object. The hook response will be passed\n * as options to the helmet `contentSecurityPolicy` middleware.\n *\n * Currently, the default settings is the following object in production\n * environment:\n * ```js\n * {\n * directives: {\n * defaultSrc: [\"'self'\"],\n * baseUri: [\"'self'\"],\n * blockAllMixedContent: [],\n * fontSrc: [\"'self'\", 'https:', 'data:'],\n * frameAncestors: [\"'self'\"],\n * frameSrc: [\"'self'\", 'https://*.youtube.com'],\n * imgSrc: [\"'self'\", 'data:'],\n * objectSrc: [\"'none'\"],\n * scriptSrc: [\"'self'\", \"'unsafe-eval'\", `'nonce-UNIQUE_NONCE_VALUE'`],\n * scriptSrcAttr: [\"'none'\"],\n * styleSrc: [\"'self'\", 'https:', \"'unsafe-inline'\"],\n * upgradeInsecureRequests: [] // Removed in dev mode.\n * }\n * }\n * ```\n * It matches the default value used by Helmet with a few updates:\n * - YouTube host is whitelisted in the `frameSrc` directive to ensure\n * the {@link YouTubeVideo} component works.\n * - An unique per-request nonce is added to `scriptSrc` directive to\n * whitelist auxiliary scripts injected by react-utils. The actual nonce\n * value can be fetched by host code via `.nonce` field of `req` argument\n * of `.beforeRender` hook.\n * - `upgradeInsecureRequests` directive is removed in development mode,\n * to simplify local testing with http requests.\n * @param {string} [options.defaultLoggerLogLevel=info] Log level for\n * the default logger, which is created if no `logger` option provided.\n * @param {boolean} [options.devMode] Pass in `true` to start the server in\n * development mode.\n * @param {string} [options.favicon] Path to the favicon to use by the server.\n * By default no favicon is used.\n * @param {object} [options.https] If provided, HTTPS server will be started,\n * instead of HTTP otherwise. The object should provide SSL certificate and key\n * via two string fields: `cert`, and `key`.\n * @param {string} [options.https.cert] SSL Certificate.\n * @param {string} [options.https.key] SSL key.\n * @param {boolean} [options.httpsRedirect=true] Pass in `true` to enable\n * automatic redirection of all incoming HTTP requests to HTTPS.\n *\n * To smoothly use it at `localhost` you need to run the server in HTTPS mode,\n * and also properly create and install a self-signed SSL sertificate on your\n * system. This article is helpful:\n * [How to get HTTPS working on your local development environment in 5 minutes](https://medium.freecodecamp.org/how-to-get-https-working-on-your-local-development-environment-in-5-minutes-7af615770eec)\n * @param {Logger} [options.logger] The logger to use at server side.\n * By default [`winston`](https://www.npmjs.com/package/winston) logger\n * with console transport is used. The logger you provide, or the default\n * `winston` logger otherwise, will be attached to the created ExpressJS server\n * object.\n * @param {function} [options.onExpressJsSetup] An async callback\n * (`(server) => Promise`) to be triggered when most of the server\n * configuration is completed, just before the server-side renderer,\n * and the default error handler are attached. You can use it to mount\n * custom API routes. The server-side logger can be accessed as `server.logger`.\n * @param {number|string} [options.port=3000] The port to start the server on.\n * @param {number} [options.staticCacheSize=1.e7] The maximum\n * static cache size in bytes. Defaults to ~10 MB.\n * @param {function} [options.staticCacheController] When given, it activates,\n * and controls the static caching of generated HTML markup. When this function\n * is provided, on each incoming request it is triggered with the request\n * passed in as the argument. To attempt to serve the response from the cache\n * it should return the object with the following fields:\n * - `key: string` &ndash; the cache key for the response;\n * - `maxage?: number` &ndash; the maximum age of cached result in ms.\n * If undefined - infinite age is assumed.\n * @param {number} [options.maxSsrRounds=10] Maximum number of SSR rounds.\n * @param {number} [options.ssrTimeout=1000] SSR timeout in milliseconds,\n * defaults to 1 second.\n * @return {Promise<{ expressServer: object, httpServer: object }>} Resolves to\n * an object with created Express and HTTP servers.\n */\nasync function launch(webpackConfig, options) {\n /* Options normalization. */\n const ops = options ? _.cloneDeep(options) : {};\n ops.port = normalizePort(ops.port || process.env.PORT || 3000);\n _.defaults(ops, {\n httpsRedirect: true,\n maxSsrRounds: DEFAULT_MAX_SSR_ROUNDS,\n ssrTimeout: DEFAULT_SSR_TIMEOUT,\n });\n if (!ops.staticCacheSize) ops.staticCacheSize = 1.e7;\n\n if (_.isUndefined(ops.logger)) {\n const { format, transports } = winston;\n ops.logger = winston.createLogger({\n level: ops.defaultLoggerLogLevel || 'info',\n format: format.combine(\n format.splat(),\n format.timestamp(),\n format.colorize(),\n format.printf(\n ({\n level,\n message,\n timestamp,\n stack,\n ...rest\n }) => {\n let res = `${level}\\t(at ${timestamp}):\\t${message}`;\n if (Object.keys(rest).length) {\n res += `\\n${JSON.stringify(rest, null, 2)}`;\n }\n if (stack) res += `\\n${stack}`;\n return res;\n },\n ),\n ),\n transports: [new transports.Console()],\n });\n }\n\n /* Creates servers, resolves and sets the port. */\n const expressServer = await serverFactory(webpackConfig, ops);\n\n let httpServer;\n if (ops.https) {\n httpServer = https.createServer({\n cert: ops.https.cert,\n key: ops.https.key,\n }, expressServer);\n } else httpServer = http.createServer(expressServer);\n\n /* Sets error handler for HTTP(S) server. */\n httpServer.on('error', (error) => {\n if (error.syscall !== 'listen') throw error;\n const bind = _.isString(ops.port) ? `Pipe ${ops.port}` : `Port ${ops.port}`;\n\n /* Human-readable message for some specific listen errors. */\n switch (error.code) {\n case 'EACCES':\n ops.logger.error(`${bind} requires elevated privileges`);\n process.exit(1);\n break;\n case 'EADDRINUSE':\n ops.logger.error(`${bind} is already in use`);\n process.exit(1);\n break;\n default:\n throw error;\n }\n });\n\n /* Listening event handler for HTTP(S) server. */\n httpServer.on('listening', () => {\n const addr = httpServer.address();\n const bind = _.isString(addr) ? `pipe ${addr}` : `port ${addr.port}`;\n ops.logger.info(`Server listening on ${bind} in ${\n process.env.NODE_ENV} mode`);\n });\n\n httpServer.listen(ops.port);\n\n return {\n expressServer,\n httpServer,\n };\n}\n\nlaunch.SCRIPT_LOCATIONS = SCRIPT_LOCATIONS;\n\nexport default launch;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/server/index.js"],"names":["DEFAULT_MAX_SSR_ROUNDS","DEFAULT_SSR_TIMEOUT","normalizePort","value","port","launch","webpackConfig","options","ops","process","env","PORT","httpsRedirect","maxSsrRounds","ssrTimeout","staticCacheSize","logger","format","transports","winston","createLogger","level","defaultLoggerLogLevel","combine","splat","timestamp","colorize","printf","message","stack","rest","res","Object","keys","length","JSON","stringify","Console","expressServer","httpServer","https","createServer","cert","key","http","on","error","syscall","bind","code","exit","addr","address","info","NODE_ENV","listen","SCRIPT_LOCATIONS"],"mappings":"4VAAA,uCAEA,8BAUA,kDACA,oDAGA,wBAEA,wDAEA,yDACA,oCAGA,sU,o9BATA,mC,CAWA;AACA,KAAMA,CAAAA,sBAAsB,CAAG,EAA/B,CACA,KAAMC,CAAAA,mBAAmB,CAAG,IAA5B,CAEA;AACA;AACA;AACA;AACA;AACA;AACA,GACA,QAASC,CAAAA,aAAT,CAAuBC,KAAvB,CAA8B,CAC5B,KAAMC,CAAAA,IAAI,CAAG,qBAASD,KAAT,CAAb,CACA,GAAI,qBAASC,IAAT,CAAJ,CAAoB,MAAOA,CAAAA,IAAP,CAAa,iBACjC,GAAI,CAAC,qBAASA,IAAT,CAAL,CAAqB,MAAOD,CAAAA,KAAP,CAAc,gBACnC,MAAO,MACR,CAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACA,cAAeE,CAAAA,MAAf,CAAsBC,aAAtB,CAAqCC,OAArC,CAA8C,CAC5C,4BACA,KAAMC,CAAAA,GAAG,CAAGD,OAAO,CAAG,sBAAUA,OAAV,CAAH,CAAwB,EAA3C,CACAC,GAAG,CAACJ,IAAJ,CAAWF,aAAa,CAACM,GAAG,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B,uBAAsBL,IAAK,OAC1CvC,OAAO,CAACC,GAAR,CAAY4C,QAAS,OADvB,CAED,CALD,EAOAf,UAAU,CAACgB,MAAX,CAAkB/C,GAAG,CAACJ,IAAtB,EAEA,MAAO,CACLkC,aADK,CAELC,UAFK,CAIR,CAEDlC,MAAM,CAACmD,gBAAP,CAA0BA,0BAA1B,C,aAEenD,M","sourcesContent":["import 'source-map-support/register';\n\nimport {\n cloneDeep,\n defaults,\n isFinite,\n isNumber,\n isUndefined,\n isString,\n toNumber,\n} from 'lodash';\n\nimport http from 'http';\nimport https from 'https';\n\n/* Polyfill required by ReactJS. */\nimport 'raf/polyfill';\n\nimport winston from 'winston';\n\nimport serverFactory from './server';\nimport { SCRIPT_LOCATIONS } from './renderer';\n\nexport { getDefaultCspSettings } from './server';\nexport * from './utils';\n\n// Various default settings of server factory (launch() function).\nconst DEFAULT_MAX_SSR_ROUNDS = 10;\nconst DEFAULT_SSR_TIMEOUT = 1000;\n\n/**\n * Normalizes a port into a number, string, or false.\n * TODO: Drop this function?\n * @ignore\n * @param {String} value Port name or number.\n * @return Port number (Number), name (String), or false.\n */\nfunction normalizePort(value) {\n const port = toNumber(value);\n if (isFinite(port)) return port; /* port number */\n if (!isNumber(port)) return value; /* named pipe */\n return false;\n}\n\n/**\n * Creates and launches web-server for ReactJS application. Allows zero\n * or detailed configuration, supports server-side rendering,\n * and development tools, including Hot Module Reloading (HMR).\n *\n * See {@link module:ReactGlobalState ReactGlobalState} for some additional\n * notes related to SSR, access to incoming requests during SSR, _etc._\n *\n * @param {object} webpackConfig Webpack configuration used to build\n * the frontend bundle. In production mode the server will read out of it\n * `context`, `publicPath`, and a few other parameters, necessary to locate\n * and serve the app bundle. In development mode the server will use entire\n * provided config to build the app bundle in memory, and further watch and\n * update it via HMR.\n * @param {object} [options] Additional parameters.\n * @param {Component} [options.Application] The root ReactJS component of\n * the app to use for the server-side rendering. When not provided\n * the server-side rendering is disabled.\n * @param {function} [options.beforeExpressJsError] Asynchronous callback\n * (`(server) => Promise<boolean>`) to be executed just before the default error\n * handler is added to ExpressJS server. If the callback is provided and its\n * result resolves to a truthy value, `react-utils` won't attach the default\n * error handler.\n * @param {function} [options.beforeExpressJsSetup] Asynchronous callback\n * (`(server) => Promise) to be executed right after ExpressJS server creation,\n * before any configuration is performed.\n * @param {BeforeRenderHook} [options.beforeRender] The hook to run just before\n * the server-side rendering. For each incoming request, it will be executed\n * just before the HTML markup is generated at the server. It allows to load\n * and provide the data necessary for server-side rendering, and also to inject\n * additional configuration and scripts into the generated HTML code.\n * @param {boolean} [options.noCsp] Set `true` to disable\n * Content-Security-Policy (CSP) headers altogether.\n * @param {function} [options.cspSettingsHook] A hook allowing\n * to customize [CSP](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP)\n * settings for [helmet](https://github.com/helmetjs/helmet)'s\n * `contentSecurityPolicy` middleware on per-request basis.\n *\n * If provided it should be a with signature: \\\n * `(defaultSettings: object, req: object)` &rArr; `object` \\\n * which gets the default settings (also used without the hook),\n * and the incoming request object. The hook response will be passed\n * as options to the helmet `contentSecurityPolicy` middleware.\n *\n * Currently, the default settings is the following object in production\n * environment:\n * ```js\n * {\n * directives: {\n * defaultSrc: [\"'self'\"],\n * baseUri: [\"'self'\"],\n * blockAllMixedContent: [],\n * fontSrc: [\"'self'\", 'https:', 'data:'],\n * frameAncestors: [\"'self'\"],\n * frameSrc: [\"'self'\", 'https://*.youtube.com'],\n * imgSrc: [\"'self'\", 'data:'],\n * objectSrc: [\"'none'\"],\n * scriptSrc: [\"'self'\", \"'unsafe-eval'\", `'nonce-UNIQUE_NONCE_VALUE'`],\n * scriptSrcAttr: [\"'none'\"],\n * styleSrc: [\"'self'\", 'https:', \"'unsafe-inline'\"],\n * upgradeInsecureRequests: [] // Removed in dev mode.\n * }\n * }\n * ```\n * It matches the default value used by Helmet with a few updates:\n * - YouTube host is whitelisted in the `frameSrc` directive to ensure\n * the {@link YouTubeVideo} component works.\n * - An unique per-request nonce is added to `scriptSrc` directive to\n * whitelist auxiliary scripts injected by react-utils. The actual nonce\n * value can be fetched by host code via `.nonce` field of `req` argument\n * of `.beforeRender` hook.\n * - `upgradeInsecureRequests` directive is removed in development mode,\n * to simplify local testing with http requests.\n * @param {string} [options.defaultLoggerLogLevel=info] Log level for\n * the default logger, which is created if no `logger` option provided.\n * @param {boolean} [options.devMode] Pass in `true` to start the server in\n * development mode.\n * @param {string} [options.favicon] Path to the favicon to use by the server.\n * By default no favicon is used.\n * @param {object} [options.https] If provided, HTTPS server will be started,\n * instead of HTTP otherwise. The object should provide SSL certificate and key\n * via two string fields: `cert`, and `key`.\n * @param {string} [options.https.cert] SSL Certificate.\n * @param {string} [options.https.key] SSL key.\n * @param {boolean} [options.httpsRedirect=true] Pass in `true` to enable\n * automatic redirection of all incoming HTTP requests to HTTPS.\n *\n * To smoothly use it at `localhost` you need to run the server in HTTPS mode,\n * and also properly create and install a self-signed SSL sertificate on your\n * system. This article is helpful:\n * [How to get HTTPS working on your local development environment in 5 minutes](https://medium.freecodecamp.org/how-to-get-https-working-on-your-local-development-environment-in-5-minutes-7af615770eec)\n * @param {Logger} [options.logger] The logger to use at server side.\n * By default [`winston`](https://www.npmjs.com/package/winston) logger\n * with console transport is used. The logger you provide, or the default\n * `winston` logger otherwise, will be attached to the created ExpressJS server\n * object.\n * @param {function} [options.onExpressJsSetup] An async callback\n * (`(server) => Promise`) to be triggered when most of the server\n * configuration is completed, just before the server-side renderer,\n * and the default error handler are attached. You can use it to mount\n * custom API routes. The server-side logger can be accessed as `server.logger`.\n * @param {number|string} [options.port=3000] The port to start the server on.\n * @param {number} [options.staticCacheSize=1.e7] The maximum\n * static cache size in bytes. Defaults to ~10 MB.\n * @param {function} [options.staticCacheController] When given, it activates,\n * and controls the static caching of generated HTML markup. When this function\n * is provided, on each incoming request it is triggered with the request\n * passed in as the argument. To attempt to serve the response from the cache\n * it should return the object with the following fields:\n * - `key: string` &ndash; the cache key for the response;\n * - `maxage?: number` &ndash; the maximum age of cached result in ms.\n * If undefined - infinite age is assumed.\n * @param {number} [options.maxSsrRounds=10] Maximum number of SSR rounds.\n * @param {number} [options.ssrTimeout=1000] SSR timeout in milliseconds,\n * defaults to 1 second.\n * @return {Promise<{ expressServer: object, httpServer: object }>} Resolves to\n * an object with created Express and HTTP servers.\n */\nasync function launch(webpackConfig, options) {\n /* Options normalization. */\n const ops = options ? cloneDeep(options) : {};\n ops.port = normalizePort(ops.port || process.env.PORT || 3000);\n defaults(ops, {\n httpsRedirect: true,\n maxSsrRounds: DEFAULT_MAX_SSR_ROUNDS,\n ssrTimeout: DEFAULT_SSR_TIMEOUT,\n });\n if (!ops.staticCacheSize) ops.staticCacheSize = 1.e7;\n\n if (isUndefined(ops.logger)) {\n const { format, transports } = winston;\n ops.logger = winston.createLogger({\n level: ops.defaultLoggerLogLevel || 'info',\n format: format.combine(\n format.splat(),\n format.timestamp(),\n format.colorize(),\n format.printf(\n ({\n level,\n message,\n timestamp,\n stack,\n ...rest\n }) => {\n let res = `${level}\\t(at ${timestamp}):\\t${message}`;\n if (Object.keys(rest).length) {\n res += `\\n${JSON.stringify(rest, null, 2)}`;\n }\n if (stack) res += `\\n${stack}`;\n return res;\n },\n ),\n ),\n transports: [new transports.Console()],\n });\n }\n\n /* Creates servers, resolves and sets the port. */\n const expressServer = await serverFactory(webpackConfig, ops);\n\n let httpServer;\n if (ops.https) {\n httpServer = https.createServer({\n cert: ops.https.cert,\n key: ops.https.key,\n }, expressServer);\n } else httpServer = http.createServer(expressServer);\n\n /* Sets error handler for HTTP(S) server. */\n httpServer.on('error', (error) => {\n if (error.syscall !== 'listen') throw error;\n const bind = isString(ops.port) ? `Pipe ${ops.port}` : `Port ${ops.port}`;\n\n /* Human-readable message for some specific listen errors. */\n switch (error.code) {\n case 'EACCES':\n ops.logger.error(`${bind} requires elevated privileges`);\n process.exit(1);\n break;\n case 'EADDRINUSE':\n ops.logger.error(`${bind} is already in use`);\n process.exit(1);\n break;\n default:\n throw error;\n }\n });\n\n /* Listening event handler for HTTP(S) server. */\n httpServer.on('listening', () => {\n const addr = httpServer.address();\n const bind = isString(addr) ? `pipe ${addr}` : `port ${addr.port}`;\n ops.logger.info(`Server listening on ${bind} in ${\n process.env.NODE_ENV} mode`);\n });\n\n httpServer.listen(ops.port);\n\n return {\n expressServer,\n httpServer,\n };\n}\n\nlaunch.SCRIPT_LOCATIONS = SCRIPT_LOCATIONS;\n\nexport default launch;\n"],"file":"index.js"}
@@ -1,6 +1,6 @@
1
- "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.SCRIPT_LOCATIONS=void 0;exports.default=factory;exports.isBrotliAcceptable=isBrotliAcceptable;var _reactGlobalState=require("@dr.pogodin/react-global-state");var _lodash=_interopRequireDefault(require("lodash"));var _config=_interopRequireDefault(require("config"));var _nodeForge=_interopRequireDefault(require("node-forge"));var _fs=_interopRequireDefault(require("fs"));var _path=_interopRequireDefault(require("path"));var _zlib=require("zlib");var _server=_interopRequireDefault(require("react-dom/server"));var _reactHelmet=require("react-helmet");var _server2=require("react-router-dom/server");var _serializeJavascript=_interopRequireDefault(require("serialize-javascript"));var _time=_interopRequireDefault(require("../shared/utils/time"));var _Cache=_interopRequireDefault(require("./Cache"));var _jsxRuntime=require("react/jsx-runtime");/**
1
+ "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.SCRIPT_LOCATIONS=void 0;exports.default=factory;exports.isBrotliAcceptable=isBrotliAcceptable;var _reactGlobalState=require("@dr.pogodin/react-global-state");var _lodash=require("lodash");var _config=_interopRequireDefault(require("config"));var _nodeForge=_interopRequireDefault(require("node-forge"));var _fs=_interopRequireDefault(require("fs"));var _path=_interopRequireDefault(require("path"));var _zlib=require("zlib");var _server=_interopRequireDefault(require("react-dom/server"));var _reactHelmet=require("react-helmet");var _server2=require("react-router-dom/server");var _serializeJavascript=_interopRequireDefault(require("serialize-javascript"));var _time=_interopRequireDefault(require("../shared/utils/time"));var _Cache=_interopRequireDefault(require("./Cache"));var _jsxRuntime=require("react/jsx-runtime");/**
2
2
  * ExpressJS middleware for server-side rendering of a ReactJS app.
3
- */const sanitizedConfig=_lodash.default.omit(_config.default,"SECRET");const SCRIPT_LOCATIONS={BODY_OPEN:"BODY_OPEN",DEFAULT:"DEFAULT",HEAD_OPEN:"HEAD_OPEN"};/**
3
+ */const sanitizedConfig=(0,_lodash.omit)(_config.default,"SECRET");const SCRIPT_LOCATIONS={BODY_OPEN:"BODY_OPEN",DEFAULT:"DEFAULT",HEAD_OPEN:"HEAD_OPEN"};/**
4
4
  * Reads build-time information about the app. This information is generated
5
5
  * by our standard Webpack config for apps, and it is written into
6
6
  * ".build-info" file in the context folder specified in Webpack config.
@@ -46,12 +46,13 @@
46
46
  */function factory(webpackConfig,options){const buildInfo=getBuildInfo(webpackConfig.context);global.TRU_BUILD_INFO=buildInfo;// publicPath from webpack.output has a trailing slash at the end.
47
47
  const{publicPath,path:outputPath}=webpackConfig.output;let manifestLink=_fs.default.existsSync(`${outputPath}/manifest.json`);manifestLink=manifestLink?`<link rel="manifest" href="${publicPath}manifest.json"></link>`:"";// TODO: Update the caching mechanics to stored cached data gzipped,
48
48
  // and serve them without a need to unpacking server-side.
49
- const cache=options.staticCacheController?new _Cache.default(options.staticCacheSize):null;const CHUNK_GROUPS=readChunkGroupsJson(outputPath);const ops=_lodash.default.defaults(_lodash.default.clone(options),{beforeRender:()=>Promise.resolve({})});return async(req,res,next)=>{try{let cacheRef;if(cache){cacheRef=options.staticCacheController(req);if(cacheRef){const data=cache.get(cacheRef);if(data!==null){if(options.noCsp&&isBrotliAcceptable(req)){res.set("Content-Type","text/html");res.set("Content-Encoding","br");res.send(data)}else{(0,_zlib.brotliDecompress)(data,(error,html)=>{if(error)next(error);else{let h=html.toString();if(!options.noCsp){// TODO: Starting from Node v15 we'll be able to use string's
49
+ const cache=options.staticCacheController?new _Cache.default(options.staticCacheSize):null;const CHUNK_GROUPS=readChunkGroupsJson(outputPath);const ops=(0,_lodash.defaults)((0,_lodash.clone)(options),{beforeRender:()=>Promise.resolve({})});return async(req,res,next)=>{try{// Ensures any caches always revalidate HTML markup before reuse.
50
+ res.set("Cache-Control","no-cache");let cacheRef;if(cache){cacheRef=options.staticCacheController(req);if(cacheRef){const data=cache.get(cacheRef);if(data!==null){if(options.noCsp&&isBrotliAcceptable(req)){res.set("Content-Type","text/html");res.set("Content-Encoding","br");res.send(data)}else{(0,_zlib.brotliDecompress)(data,(error,html)=>{if(error)next(error);else{let h=html.toString();if(!options.noCsp){// TODO: Starting from Node v15 we'll be able to use string's
50
51
  // .replaceAll() method instead relying on reg. expression for
51
52
  // global matching.
52
- const regex=new RegExp(data.nonce,"g");h=h.replace(regex,req.nonce)}res.send(h)}})}return}}}const[{configToInject,extraScripts,initialState},{cipher,iv}]=await Promise.all([ops.beforeRender(req,sanitizedConfig),prepareCipher(buildInfo.key)]);let helmet;/* Optional server-side rendering. */let App=options.Application;const ssrContext={req,state:_lodash.default.cloneDeep(initialState||{}),// Array of chunk names encountered during the rendering.
53
+ const regex=new RegExp(data.nonce,"g");h=h.replace(regex,req.nonce)}res.send(h)}})}return}}}const[{configToInject,extraScripts,initialState},{cipher,iv}]=await Promise.all([ops.beforeRender(req,sanitizedConfig),prepareCipher(buildInfo.key)]);let helmet;/* Optional server-side rendering. */let App=options.Application;const ssrContext={req,state:(0,_lodash.cloneDeep)(initialState||{}),// Array of chunk names encountered during the rendering.
53
54
  chunks:[]};if(App){let markup;const ssrStart=Date.now();for(let round=0;round<options.maxSsrRounds;++round){ssrContext.chunks=[];markup=_server.default.renderToString(/*#__PURE__*/(0,_jsxRuntime.jsx)(_reactGlobalState.GlobalStateProvider,{initialState:ssrContext.state,ssrContext:ssrContext,children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_server2.StaticRouter,{location:req.url,children:/*#__PURE__*/(0,_jsxRuntime.jsx)(App,{})})}));if(!ssrContext.dirty)break;/* eslint-disable no-await-in-loop */const timeout=options.ssrTimeout+ssrStart-Date.now();const ok=timeout>0&&(await Promise.race([Promise.allSettled(ssrContext.pending),_time.default.timer(timeout).then(()=>false)]));if(!ok)break;/* eslint-enable no-await-in-loop */}App=markup;/* This takes care about server-side rendering of page title and meta tags
54
- * (still demands injection into HTML template, which happens below). */helmet=_reactHelmet.Helmet.renderStatic()}let chunkGroups;const webpackStats=_lodash.default.get(res.locals,"webpack.devMiddleware.stats");if(webpackStats){chunkGroups=_lodash.default.mapValues(webpackStats.toJson({all:false,chunkGroups:true}).namedChunkGroups,item=>item.assets.map(({name})=>name))}else if(CHUNK_GROUPS)chunkGroups=CHUNK_GROUPS;else chunkGroups={};/* Encrypts data to be injected into HTML.
55
+ * (still demands injection into HTML template, which happens below). */helmet=_reactHelmet.Helmet.renderStatic()}let chunkGroups;const webpackStats=(0,_lodash.get)(res.locals,"webpack.devMiddleware.stats");if(webpackStats){chunkGroups=(0,_lodash.mapValues)(webpackStats.toJson({all:false,chunkGroups:true}).namedChunkGroups,item=>item.assets.map(({name})=>name))}else if(CHUNK_GROUPS)chunkGroups=CHUNK_GROUPS;else chunkGroups={};/* Encrypts data to be injected into HTML.
55
56
  * Keep in mind, that this encryption is no way secure: as the JS bundle
56
57
  * contains decryption key and is able to decode it at the client side.
57
58
  * Hovewer, for a number of reasons, encryption of injected data is still
@@ -65,7 +66,7 @@ chunks:[]};if(App){let markup;const ssrStart=Date.now();for(let round=0;round<op
65
66
  // thus for now this handles the default config.
66
67
  ["main",...ssrContext.chunks].forEach(chunk=>{const assets=chunkGroups[chunk];if(assets)assets.forEach(asset=>chunkSet.add(asset))});let styleChunkString="";let scriptChunkString="";chunkSet.forEach(chunk=>{if(chunk.endsWith(".css")){styleChunkString+=`<link href="${publicPath}${chunk}" rel="stylesheet" />`}else if(chunk.endsWith(".js")// In dev mode HMR adds JS updates into asset arrays,
67
68
  // and they (updates) should be ignored.
68
- &&!chunk.endsWith(".hot-update.js")){scriptChunkString+=`<script src="${publicPath}${chunk}" type="application/javascript"></script>`}});let bodyOpenExtraScripts;let defaultExtraScripts;let headOpenExtraScripts;if(extraScripts){bodyOpenExtraScripts=extraScripts.filter(script=>_lodash.default.isObject(script)&&script.location===SCRIPT_LOCATIONS.BODY_OPEN).map(script=>script.code).join("");defaultExtraScripts=extraScripts.filter(script=>_lodash.default.isString(script)||script.location===SCRIPT_LOCATIONS.DEFAULT).map(script=>_lodash.default.isString(script)?script:script.code).join("");headOpenExtraScripts=extraScripts.filter(script=>_lodash.default.isObject(script)&&script.location===SCRIPT_LOCATIONS.HEAD_OPEN).map(script=>script.code).join("")}const faviconLink=ops.favicon?"<link rel=\"shortcut icon\" href=\"/favicon.ico\" />":"";const html=`<!DOCTYPE html>
69
+ &&!chunk.endsWith(".hot-update.js")){scriptChunkString+=`<script src="${publicPath}${chunk}" type="application/javascript"></script>`}});let bodyOpenExtraScripts;let defaultExtraScripts;let headOpenExtraScripts;if(extraScripts){bodyOpenExtraScripts=extraScripts.filter(script=>(0,_lodash.isObject)(script)&&script.location===SCRIPT_LOCATIONS.BODY_OPEN).map(script=>script.code).join("");defaultExtraScripts=extraScripts.filter(script=>(0,_lodash.isString)(script)||script.location===SCRIPT_LOCATIONS.DEFAULT).map(script=>(0,_lodash.isString)(script)?script:script.code).join("");headOpenExtraScripts=extraScripts.filter(script=>(0,_lodash.isObject)(script)&&script.location===SCRIPT_LOCATIONS.HEAD_OPEN).map(script=>script.code).join("")}const faviconLink=ops.favicon?"<link rel=\"shortcut icon\" href=\"/favicon.ico\" />":"";const html=`<!DOCTYPE html>
69
70
  <html lang="en">
70
71
  <head>
71
72
  ${headOpenExtraScripts||""}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/server/renderer.jsx"],"names":["sanitizedConfig","_","omit","config","SCRIPT_LOCATIONS","BODY_OPEN","DEFAULT","HEAD_OPEN","getBuildInfo","context","url","path","resolve","JSON","parse","fs","readFileSync","readChunkGroupsJson","buildDir","res","err","prepareCipher","key","Promise","reject","forge","random","getBytes","iv","cipher","createCipher","start","isBrotliAcceptable","req","acceptable","get","ops","split","i","length","type","priority","trim","parseFloat","factory","webpackConfig","options","buildInfo","global","TRU_BUILD_INFO","publicPath","outputPath","output","manifestLink","existsSync","cache","staticCacheController","Cache","staticCacheSize","CHUNK_GROUPS","defaults","clone","beforeRender","next","cacheRef","data","noCsp","set","send","error","html","h","toString","regex","RegExp","nonce","replace","configToInject","extraScripts","initialState","all","helmet","App","Application","ssrContext","state","cloneDeep","chunks","markup","ssrStart","Date","now","round","maxSsrRounds","ReactDOM","renderToString","dirty","timeout","ssrTimeout","ok","race","allSettled","pending","time","timer","then","Helmet","renderStatic","chunkGroups","webpackStats","locals","mapValues","toJson","namedChunkGroups","item","assets","map","name","dr_pogodin_react_utils___split_components","payload","CONFIG","ISTATE","ignoreFunction","unsafe","update","util","createBuffer","finish","INJ","encode64","status","chunkSet","Set","forEach","chunk","asset","add","styleChunkString","scriptChunkString","endsWith","bodyOpenExtraScripts","defaultExtraScripts","headOpenExtraScripts","filter","script","isObject","location","code","join","isString","faviconLink","favicon","title","meta","buffer"],"mappings":"+PAIA,gEAEA,sDACA,sDACA,6DACA,8CACA,kDACA,0BAEA,gEACA,yCACA,gDACA,iFAEA,kEAEA,sD,6CApBA;AACA;AACA,GAoBA,KAAMA,CAAAA,eAAe,CAAGC,gBAAEC,IAAF,CAAOC,eAAP,CAAe,QAAf,CAAxB,CAEO,KAAMC,CAAAA,gBAAgB,CAAG,CAC9BC,SAAS,CAAE,WADmB,CAE9BC,OAAO,CAAE,SAFqB,CAG9BC,SAAS,CAAE,WAHmB,CAAzB,CAMP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G,0CACA,QAASC,CAAAA,YAAT,CAAsBC,OAAtB,CAA+B,CAC7B,KAAMC,CAAAA,GAAG,CAAGC,cAAKC,OAAL,CAAaH,OAAb,CAAsB,aAAtB,CAAZ,CACA,MAAOI,CAAAA,IAAI,CAACC,KAAL,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cG,mBAAmB,EAAI,EAAG;AACxC;AACA,gBA7BM,CA+BA1H,GAAG,CAACiD,IAAJ,CAASE,IAAT,EAEA,GAAIN,QAAJ,CAAc,CACZ,yBAAeM,IAAf,CAAqB,CAACD,KAAD,CAAQqF,MAAR,GAAmB,CACtC,GAAIrF,KAAJ,CAAW,KAAMA,CAAAA,KAAN,CACXqF,MAAM,CAAC/E,KAAP,CAAe1C,GAAG,CAAC0C,KAAnB,CAA0B;AAC1BpB,KAAK,CAACiF,GAAN,CAAUkB,MAAV,CAAkB1F,QAAQ,CAAC1C,GAA3B,CACD,CAJD,CAKD,CACF,CAAC,MAAO+C,KAAP,CAAc,CACdN,IAAI,CAACM,KAAD,CACL,CACF,CACF","sourcesContent":["/**\n * ExpressJS middleware for server-side rendering of a ReactJS app.\n */\n\nimport { GlobalStateProvider } from '@dr.pogodin/react-global-state';\n\nimport _ from 'lodash';\nimport config from 'config';\nimport forge from 'node-forge';\nimport fs from 'fs';\nimport path from 'path';\nimport { brotliCompress, brotliDecompress } from 'zlib';\n\nimport ReactDOM from 'react-dom/server';\nimport { Helmet } from 'react-helmet';\nimport { StaticRouter } from 'react-router-dom/server';\nimport serializeJs from 'serialize-javascript';\n\nimport time from 'utils/time';\n\nimport Cache from './Cache';\n\nconst sanitizedConfig = _.omit(config, 'SECRET');\n\nexport const SCRIPT_LOCATIONS = {\n BODY_OPEN: 'BODY_OPEN',\n DEFAULT: 'DEFAULT',\n HEAD_OPEN: 'HEAD_OPEN',\n};\n\n/**\n * Reads build-time information about the app. This information is generated\n * by our standard Webpack config for apps, and it is written into\n * \".build-info\" file in the context folder specified in Webpack config.\n * At the moment, that file contains build timestamp and a random 32-bit key,\n * suitable for cryptographical use.\n * @ignore\n * @param {String} context Webpack context path used during the build.\n * @return {Object} Resolves to the build-time information.\n */\nfunction getBuildInfo(context) {\n const url = path.resolve(context, '.build-info');\n return JSON.parse(fs.readFileSync(url));\n}\n\n/**\n * Attempts to read from disk the named chunk groups mapping generated\n * by Webpack during the compilation.\n * It will not work for development builds, where these stats should be captured\n * via compilator callback.\n * @ignore\n * @param {string} buildDir\n * @return {object}\n */\nfunction readChunkGroupsJson(buildDir) {\n const url = path.resolve(buildDir, '__chunk_groups__.json');\n let res;\n try {\n res = JSON.parse(fs.readFileSync(url));\n } catch (err) {\n res = null;\n }\n return res;\n}\n\n/**\n * Prepares a new Cipher for data encryption.\n * @ignore\n * @param {String} key Encryption key (32-bit random key is expected, see\n * node-forge documentation, in case of doubts).\n * @return {Promise} Resolves to the object with two fields:\n * 1. cipher - a new Cipher, ready for encryption;\n * 2. iv - initial vector used by the cipher.\n */\nfunction prepareCipher(key) {\n return new Promise((resolve, reject) => {\n forge.random.getBytes(32, (err, iv) => {\n if (err) reject(err);\n else {\n const cipher = forge.cipher.createCipher('AES-CBC', key);\n cipher.start({ iv });\n resolve({ cipher, iv });\n }\n });\n });\n}\n\n/**\n * Given an incoming HTTP requests, it deduces whether Brotli-encoded responses\n * are acceptable to the caller.\n * @param {object} req\n * @return {boolean}\n * @ignore\n */\nexport function isBrotliAcceptable(req) {\n const acceptable = req.get('accept-encoding');\n if (acceptable) {\n const ops = acceptable.split(',');\n for (let i = 0; i < ops.length; ++i) {\n const [type, priority] = ops[i].trim().split(';q=');\n if ((type === '*' || type === 'br')\n && (!priority || parseFloat(priority) > 0)) {\n return true;\n }\n }\n }\n return false;\n}\n\n/**\n * Creates the middleware.\n * @param {object} webpackConfig\n * @param {object} options Additional options:\n * @param {boolean} [options.favicon] `true` will include favicon\n * link into the rendered HTML templates.\n * @param {boolean} [options.noCsp] `true` means that no\n * Content-Security-Policy (CSP) is used by server, thus the renderer\n * may cut a few corners.\n * @param {number} options.maxSsrRounds\n * @param {number} options.ssrTimeout\n * @return {function} Created middleware.\n */\nexport default function factory(webpackConfig, options) {\n const buildInfo = getBuildInfo(webpackConfig.context);\n\n global.TRU_BUILD_INFO = buildInfo;\n\n // publicPath from webpack.output has a trailing slash at the end.\n const { publicPath, path: outputPath } = webpackConfig.output;\n\n let manifestLink = fs.existsSync(`${outputPath}/manifest.json`);\n manifestLink = manifestLink ? (\n `<link rel=\"manifest\" href=\"${publicPath}manifest.json\"></link>`\n ) : '';\n\n // TODO: Update the caching mechanics to stored cached data gzipped,\n // and serve them without a need to unpacking server-side.\n const cache = options.staticCacheController\n ? new Cache(options.staticCacheSize) : null;\n\n const CHUNK_GROUPS = readChunkGroupsJson(outputPath);\n\n const ops = _.defaults(_.clone(options), {\n beforeRender: () => Promise.resolve({}),\n });\n\n return async (req, res, next) => {\n try {\n let cacheRef;\n if (cache) {\n cacheRef = options.staticCacheController(req);\n if (cacheRef) {\n const data = cache.get(cacheRef);\n if (data !== null) {\n if (options.noCsp && isBrotliAcceptable(req)) {\n res.set('Content-Type', 'text/html');\n res.set('Content-Encoding', 'br');\n res.send(data);\n } else {\n brotliDecompress(data, (error, html) => {\n if (error) next(error);\n else {\n let h = html.toString();\n if (!options.noCsp) {\n // TODO: Starting from Node v15 we'll be able to use string's\n // .replaceAll() method instead relying on reg. expression for\n // global matching.\n const regex = new RegExp(data.nonce, 'g');\n h = h.replace(regex, req.nonce);\n }\n res.send(h);\n }\n });\n }\n return;\n }\n }\n }\n\n const [{\n configToInject,\n extraScripts,\n initialState,\n }, {\n cipher,\n iv,\n }] = await Promise.all([\n ops.beforeRender(req, sanitizedConfig),\n prepareCipher(buildInfo.key),\n ]);\n\n let helmet;\n\n /* Optional server-side rendering. */\n let App = options.Application;\n const ssrContext = {\n req,\n state: _.cloneDeep(initialState || {}),\n\n // Array of chunk names encountered during the rendering.\n chunks: [],\n };\n if (App) {\n let markup;\n const ssrStart = Date.now();\n for (let round = 0; round < options.maxSsrRounds; ++round) {\n ssrContext.chunks = [];\n markup = ReactDOM.renderToString((\n <GlobalStateProvider\n initialState={ssrContext.state}\n ssrContext={ssrContext}\n >\n <StaticRouter location={req.url}>\n <App />\n </StaticRouter>\n </GlobalStateProvider>\n ));\n\n if (!ssrContext.dirty) break;\n\n /* eslint-disable no-await-in-loop */\n const timeout = options.ssrTimeout + ssrStart - Date.now();\n const ok = timeout > 0 && await Promise.race([\n Promise.allSettled(ssrContext.pending),\n time.timer(timeout).then(() => false),\n ]);\n if (!ok) break;\n /* eslint-enable no-await-in-loop */\n }\n App = markup;\n\n /* This takes care about server-side rendering of page title and meta tags\n * (still demands injection into HTML template, which happens below). */\n helmet = Helmet.renderStatic();\n }\n\n let chunkGroups;\n const webpackStats = _.get(res.locals, 'webpack.devMiddleware.stats');\n if (webpackStats) {\n chunkGroups = _.mapValues(\n webpackStats.toJson({\n all: false,\n chunkGroups: true,\n }).namedChunkGroups,\n (item) => item.assets.map(({ name }) => name),\n );\n } else if (CHUNK_GROUPS) chunkGroups = CHUNK_GROUPS;\n else chunkGroups = {};\n\n /* Encrypts data to be injected into HTML.\n * Keep in mind, that this encryption is no way secure: as the JS bundle\n * contains decryption key and is able to decode it at the client side.\n * Hovewer, for a number of reasons, encryption of injected data is still\n * better than injection of a plain text. */\n delete ssrContext.state.dr_pogodin_react_utils___split_components;\n\n const payload = serializeJs({\n CHUNK_GROUPS: chunkGroups,\n CONFIG: configToInject || sanitizedConfig,\n ISTATE: ssrContext.state,\n }, {\n ignoreFunction: true,\n unsafe: true,\n });\n cipher.update(forge.util.createBuffer(payload, 'utf8'));\n cipher.finish();\n const INJ = forge.util.encode64(`${iv}${cipher.output.data}`);\n\n if (ssrContext.status) res.status(ssrContext.status);\n\n const chunkSet = new Set();\n\n // TODO: \"main\" chunk has to be added explicitly,\n // because unlike all other chunks they are not managed by <CodeSplit>\n // component, thus they are not added to the ssrContext.chunks\n // automatically. Actually, names of these entry chunks should be\n // read from Wepback config, as the end user may customize them,\n // remove or add other entry points, but it requires additional\n // efforts to figure out how to automatically order them right,\n // thus for now this handles the default config.\n [\n 'main',\n ...ssrContext.chunks,\n ].forEach((chunk) => {\n const assets = chunkGroups[chunk];\n if (assets) assets.forEach((asset) => chunkSet.add(asset));\n });\n\n let styleChunkString = '';\n let scriptChunkString = '';\n chunkSet.forEach((chunk) => {\n if (chunk.endsWith('.css')) {\n styleChunkString += `<link href=\"${publicPath}${chunk}\" rel=\"stylesheet\" />`;\n } else if (\n chunk.endsWith('.js')\n // In dev mode HMR adds JS updates into asset arrays,\n // and they (updates) should be ignored.\n && !chunk.endsWith('.hot-update.js')\n ) {\n scriptChunkString += `<script src=\"${publicPath}${chunk}\" type=\"application/javascript\"></script>`;\n }\n });\n\n let bodyOpenExtraScripts;\n let defaultExtraScripts;\n let headOpenExtraScripts;\n if (extraScripts) {\n bodyOpenExtraScripts = extraScripts\n .filter((script) => _.isObject(script)\n && script.location === SCRIPT_LOCATIONS.BODY_OPEN)\n .map((script) => script.code)\n .join('');\n defaultExtraScripts = extraScripts\n .filter((script) => _.isString(script)\n || script.location === SCRIPT_LOCATIONS.DEFAULT)\n .map((script) => (_.isString(script) ? script : script.code))\n .join('');\n headOpenExtraScripts = extraScripts\n .filter((script) => _.isObject(script)\n && script.location === SCRIPT_LOCATIONS.HEAD_OPEN)\n .map((script) => script.code)\n .join('');\n }\n\n const faviconLink = ops.favicon ? (\n '<link rel=\"shortcut icon\" href=\"/favicon.ico\" />'\n ) : '';\n\n const html = `<!DOCTYPE html>\n <html lang=\"en\">\n <head>\n ${headOpenExtraScripts || ''}\n ${helmet ? helmet.title.toString() : ''}\n ${helmet ? helmet.meta.toString() : ''}\n <meta name=\"theme-color\" content=\"#FFFFFF\"/>\n ${manifestLink}\n ${styleChunkString}\n ${faviconLink}\n <meta charset=\"utf-8\" />\n <meta\n content=\"width=device-width,initial-scale=1.0\"\n name=\"viewport\"\n />\n </head>\n <body>\n ${bodyOpenExtraScripts || ''}\n <div id=\"react-view\">${App || ''}</div>\n <script\n id=\"inj\"\n type=\"application/javascript\"\n ${options.noCsp ? '' : `nonce=\"${req.nonce}\"`}\n >\n window.INJ=\"${INJ}\"\n </script>\n ${scriptChunkString}\n ${defaultExtraScripts || ''}\n </body>\n </html>`;\n\n res.send(html);\n\n if (cacheRef) {\n brotliCompress(html, (error, buffer) => {\n if (error) throw error;\n buffer.nonce = req.nonce; // eslint-disable-line no-param-reassign\n cache.add(buffer, cacheRef.key);\n });\n }\n } catch (error) {\n next(error);\n }\n };\n}\n"],"file":"renderer.js"}
1
+ {"version":3,"sources":["../../../src/server/renderer.jsx"],"names":["sanitizedConfig","config","SCRIPT_LOCATIONS","BODY_OPEN","DEFAULT","HEAD_OPEN","getBuildInfo","context","url","path","resolve","JSON","parse","fs","readFileSync","readChunkGroupsJson","buildDir","res","err","prepareCipher","key","Promise","reject","forge","random","getBytes","iv","cipher","createCipher","start","isBrotliAcceptable","req","acceptable","get","ops","split","i","length","type","priority","trim","parseFloat","factory","webpackConfig","options","buildInfo","global","TRU_BUILD_INFO","publicPath","outputPath","output","manifestLink","existsSync","cache","staticCacheController","Cache","staticCacheSize","CHUNK_GROUPS","beforeRender","next","set","cacheRef","data","noCsp","send","error","html","h","toString","regex","RegExp","nonce","replace","configToInject","extraScripts","initialState","all","helmet","App","Application","ssrContext","state","chunks","markup","ssrStart","Date","now","round","maxSsrRounds","ReactDOM","renderToString","dirty","timeout","ssrTimeout","ok","race","allSettled","pending","time","timer","then","Helmet","renderStatic","chunkGroups","webpackStats","locals","toJson","namedChunkGroups","item","assets","map","name","dr_pogodin_react_utils___split_components","payload","CONFIG","ISTATE","ignoreFunction","unsafe","update","util","createBuffer","finish","INJ","encode64","status","chunkSet","Set","forEach","chunk","asset","add","styleChunkString","scriptChunkString","endsWith","bodyOpenExtraScripts","defaultExtraScripts","headOpenExtraScripts","filter","script","location","code","join","faviconLink","favicon","title","meta","buffer"],"mappings":"+PAIA,gEAEA,8BAWA,sDACA,6DACA,8CACA,kDACA,0BAEA,gEACA,yCACA,gDACA,iFAEA,kEAEA,sD,6CA9BA;AACA;AACA,GA8BA,KAAMA,CAAAA,eAAe,CAAG,iBAAKC,eAAL,CAAa,QAAb,CAAxB,CAEO,KAAMC,CAAAA,gBAAgB,CAAG,CAC9BC,SAAS,CAAE,WADmB,CAE9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G,EAAI,EAAG;AAC7C;AACA;AACA;AACA,gBAAgBlC,OAAO,CAACmB,KAAR,CAAgB,EAAhB,CAAsB,UAAShC,GAAG,CAACwC,KAAM,GAAG;AAC5D;AACA,4BAA4BmD,GAAI;AAChC;AACA,cAAcU,iBAAkB;AAChC,cAAcG,mBAAmB,EAAI,EAAG;AACxC;AACA,gBA7BM,CA+BAtH,GAAG,CAAC+C,IAAJ,CAASE,IAAT,EAEA,GAAIL,QAAJ,CAAc,CACZ,yBAAeK,IAAf,CAAqB,CAACD,KAAD,CAAQiF,MAAR,GAAmB,CACtC,GAAIjF,KAAJ,CAAW,KAAMA,CAAAA,KAAN,CACXiF,MAAM,CAAC3E,KAAP,CAAexC,GAAG,CAACwC,KAAnB,CAA0B;AAC1BlB,KAAK,CAAC6E,GAAN,CAAUgB,MAAV,CAAkBrF,QAAQ,CAACzC,GAA3B,CACD,CAJD,CAKD,CACF,CAAC,MAAO6C,KAAP,CAAc,CACdN,IAAI,CAACM,KAAD,CACL,CACF,CACF","sourcesContent":["/**\n * ExpressJS middleware for server-side rendering of a ReactJS app.\n */\n\nimport { GlobalStateProvider } from '@dr.pogodin/react-global-state';\n\nimport {\n clone,\n cloneDeep,\n defaults,\n isObject,\n isString,\n get,\n mapValues,\n omit,\n} from 'lodash';\n\nimport config from 'config';\nimport forge from 'node-forge';\nimport fs from 'fs';\nimport path from 'path';\nimport { brotliCompress, brotliDecompress } from 'zlib';\n\nimport ReactDOM from 'react-dom/server';\nimport { Helmet } from 'react-helmet';\nimport { StaticRouter } from 'react-router-dom/server';\nimport serializeJs from 'serialize-javascript';\n\nimport time from 'utils/time';\n\nimport Cache from './Cache';\n\nconst sanitizedConfig = omit(config, 'SECRET');\n\nexport const SCRIPT_LOCATIONS = {\n BODY_OPEN: 'BODY_OPEN',\n DEFAULT: 'DEFAULT',\n HEAD_OPEN: 'HEAD_OPEN',\n};\n\n/**\n * Reads build-time information about the app. This information is generated\n * by our standard Webpack config for apps, and it is written into\n * \".build-info\" file in the context folder specified in Webpack config.\n * At the moment, that file contains build timestamp and a random 32-bit key,\n * suitable for cryptographical use.\n * @ignore\n * @param {String} context Webpack context path used during the build.\n * @return {Object} Resolves to the build-time information.\n */\nfunction getBuildInfo(context) {\n const url = path.resolve(context, '.build-info');\n return JSON.parse(fs.readFileSync(url));\n}\n\n/**\n * Attempts to read from disk the named chunk groups mapping generated\n * by Webpack during the compilation.\n * It will not work for development builds, where these stats should be captured\n * via compilator callback.\n * @ignore\n * @param {string} buildDir\n * @return {object}\n */\nfunction readChunkGroupsJson(buildDir) {\n const url = path.resolve(buildDir, '__chunk_groups__.json');\n let res;\n try {\n res = JSON.parse(fs.readFileSync(url));\n } catch (err) {\n res = null;\n }\n return res;\n}\n\n/**\n * Prepares a new Cipher for data encryption.\n * @ignore\n * @param {String} key Encryption key (32-bit random key is expected, see\n * node-forge documentation, in case of doubts).\n * @return {Promise} Resolves to the object with two fields:\n * 1. cipher - a new Cipher, ready for encryption;\n * 2. iv - initial vector used by the cipher.\n */\nfunction prepareCipher(key) {\n return new Promise((resolve, reject) => {\n forge.random.getBytes(32, (err, iv) => {\n if (err) reject(err);\n else {\n const cipher = forge.cipher.createCipher('AES-CBC', key);\n cipher.start({ iv });\n resolve({ cipher, iv });\n }\n });\n });\n}\n\n/**\n * Given an incoming HTTP requests, it deduces whether Brotli-encoded responses\n * are acceptable to the caller.\n * @param {object} req\n * @return {boolean}\n * @ignore\n */\nexport function isBrotliAcceptable(req) {\n const acceptable = req.get('accept-encoding');\n if (acceptable) {\n const ops = acceptable.split(',');\n for (let i = 0; i < ops.length; ++i) {\n const [type, priority] = ops[i].trim().split(';q=');\n if ((type === '*' || type === 'br')\n && (!priority || parseFloat(priority) > 0)) {\n return true;\n }\n }\n }\n return false;\n}\n\n/**\n * Creates the middleware.\n * @param {object} webpackConfig\n * @param {object} options Additional options:\n * @param {boolean} [options.favicon] `true` will include favicon\n * link into the rendered HTML templates.\n * @param {boolean} [options.noCsp] `true` means that no\n * Content-Security-Policy (CSP) is used by server, thus the renderer\n * may cut a few corners.\n * @param {number} options.maxSsrRounds\n * @param {number} options.ssrTimeout\n * @return {function} Created middleware.\n */\nexport default function factory(webpackConfig, options) {\n const buildInfo = getBuildInfo(webpackConfig.context);\n\n global.TRU_BUILD_INFO = buildInfo;\n\n // publicPath from webpack.output has a trailing slash at the end.\n const { publicPath, path: outputPath } = webpackConfig.output;\n\n let manifestLink = fs.existsSync(`${outputPath}/manifest.json`);\n manifestLink = manifestLink ? (\n `<link rel=\"manifest\" href=\"${publicPath}manifest.json\"></link>`\n ) : '';\n\n // TODO: Update the caching mechanics to stored cached data gzipped,\n // and serve them without a need to unpacking server-side.\n const cache = options.staticCacheController\n ? new Cache(options.staticCacheSize) : null;\n\n const CHUNK_GROUPS = readChunkGroupsJson(outputPath);\n\n const ops = defaults(clone(options), {\n beforeRender: () => Promise.resolve({}),\n });\n\n return async (req, res, next) => {\n try {\n // Ensures any caches always revalidate HTML markup before reuse.\n res.set('Cache-Control', 'no-cache');\n\n let cacheRef;\n if (cache) {\n cacheRef = options.staticCacheController(req);\n if (cacheRef) {\n const data = cache.get(cacheRef);\n if (data !== null) {\n if (options.noCsp && isBrotliAcceptable(req)) {\n res.set('Content-Type', 'text/html');\n res.set('Content-Encoding', 'br');\n res.send(data);\n } else {\n brotliDecompress(data, (error, html) => {\n if (error) next(error);\n else {\n let h = html.toString();\n if (!options.noCsp) {\n // TODO: Starting from Node v15 we'll be able to use string's\n // .replaceAll() method instead relying on reg. expression for\n // global matching.\n const regex = new RegExp(data.nonce, 'g');\n h = h.replace(regex, req.nonce);\n }\n res.send(h);\n }\n });\n }\n return;\n }\n }\n }\n\n const [{\n configToInject,\n extraScripts,\n initialState,\n }, {\n cipher,\n iv,\n }] = await Promise.all([\n ops.beforeRender(req, sanitizedConfig),\n prepareCipher(buildInfo.key),\n ]);\n\n let helmet;\n\n /* Optional server-side rendering. */\n let App = options.Application;\n const ssrContext = {\n req,\n state: cloneDeep(initialState || {}),\n\n // Array of chunk names encountered during the rendering.\n chunks: [],\n };\n if (App) {\n let markup;\n const ssrStart = Date.now();\n for (let round = 0; round < options.maxSsrRounds; ++round) {\n ssrContext.chunks = [];\n markup = ReactDOM.renderToString((\n <GlobalStateProvider\n initialState={ssrContext.state}\n ssrContext={ssrContext}\n >\n <StaticRouter location={req.url}>\n <App />\n </StaticRouter>\n </GlobalStateProvider>\n ));\n\n if (!ssrContext.dirty) break;\n\n /* eslint-disable no-await-in-loop */\n const timeout = options.ssrTimeout + ssrStart - Date.now();\n const ok = timeout > 0 && await Promise.race([\n Promise.allSettled(ssrContext.pending),\n time.timer(timeout).then(() => false),\n ]);\n if (!ok) break;\n /* eslint-enable no-await-in-loop */\n }\n App = markup;\n\n /* This takes care about server-side rendering of page title and meta tags\n * (still demands injection into HTML template, which happens below). */\n helmet = Helmet.renderStatic();\n }\n\n let chunkGroups;\n const webpackStats = get(res.locals, 'webpack.devMiddleware.stats');\n if (webpackStats) {\n chunkGroups = mapValues(\n webpackStats.toJson({\n all: false,\n chunkGroups: true,\n }).namedChunkGroups,\n (item) => item.assets.map(({ name }) => name),\n );\n } else if (CHUNK_GROUPS) chunkGroups = CHUNK_GROUPS;\n else chunkGroups = {};\n\n /* Encrypts data to be injected into HTML.\n * Keep in mind, that this encryption is no way secure: as the JS bundle\n * contains decryption key and is able to decode it at the client side.\n * Hovewer, for a number of reasons, encryption of injected data is still\n * better than injection of a plain text. */\n delete ssrContext.state.dr_pogodin_react_utils___split_components;\n\n const payload = serializeJs({\n CHUNK_GROUPS: chunkGroups,\n CONFIG: configToInject || sanitizedConfig,\n ISTATE: ssrContext.state,\n }, {\n ignoreFunction: true,\n unsafe: true,\n });\n cipher.update(forge.util.createBuffer(payload, 'utf8'));\n cipher.finish();\n const INJ = forge.util.encode64(`${iv}${cipher.output.data}`);\n\n if (ssrContext.status) res.status(ssrContext.status);\n\n const chunkSet = new Set();\n\n // TODO: \"main\" chunk has to be added explicitly,\n // because unlike all other chunks they are not managed by <CodeSplit>\n // component, thus they are not added to the ssrContext.chunks\n // automatically. Actually, names of these entry chunks should be\n // read from Wepback config, as the end user may customize them,\n // remove or add other entry points, but it requires additional\n // efforts to figure out how to automatically order them right,\n // thus for now this handles the default config.\n [\n 'main',\n ...ssrContext.chunks,\n ].forEach((chunk) => {\n const assets = chunkGroups[chunk];\n if (assets) assets.forEach((asset) => chunkSet.add(asset));\n });\n\n let styleChunkString = '';\n let scriptChunkString = '';\n chunkSet.forEach((chunk) => {\n if (chunk.endsWith('.css')) {\n styleChunkString += `<link href=\"${publicPath}${chunk}\" rel=\"stylesheet\" />`;\n } else if (\n chunk.endsWith('.js')\n // In dev mode HMR adds JS updates into asset arrays,\n // and they (updates) should be ignored.\n && !chunk.endsWith('.hot-update.js')\n ) {\n scriptChunkString += `<script src=\"${publicPath}${chunk}\" type=\"application/javascript\"></script>`;\n }\n });\n\n let bodyOpenExtraScripts;\n let defaultExtraScripts;\n let headOpenExtraScripts;\n if (extraScripts) {\n bodyOpenExtraScripts = extraScripts\n .filter((script) => isObject(script)\n && script.location === SCRIPT_LOCATIONS.BODY_OPEN)\n .map((script) => script.code)\n .join('');\n defaultExtraScripts = extraScripts\n .filter((script) => isString(script)\n || script.location === SCRIPT_LOCATIONS.DEFAULT)\n .map((script) => (isString(script) ? script : script.code))\n .join('');\n headOpenExtraScripts = extraScripts\n .filter((script) => isObject(script)\n && script.location === SCRIPT_LOCATIONS.HEAD_OPEN)\n .map((script) => script.code)\n .join('');\n }\n\n const faviconLink = ops.favicon ? (\n '<link rel=\"shortcut icon\" href=\"/favicon.ico\" />'\n ) : '';\n\n const html = `<!DOCTYPE html>\n <html lang=\"en\">\n <head>\n ${headOpenExtraScripts || ''}\n ${helmet ? helmet.title.toString() : ''}\n ${helmet ? helmet.meta.toString() : ''}\n <meta name=\"theme-color\" content=\"#FFFFFF\"/>\n ${manifestLink}\n ${styleChunkString}\n ${faviconLink}\n <meta charset=\"utf-8\" />\n <meta\n content=\"width=device-width,initial-scale=1.0\"\n name=\"viewport\"\n />\n </head>\n <body>\n ${bodyOpenExtraScripts || ''}\n <div id=\"react-view\">${App || ''}</div>\n <script\n id=\"inj\"\n type=\"application/javascript\"\n ${options.noCsp ? '' : `nonce=\"${req.nonce}\"`}\n >\n window.INJ=\"${INJ}\"\n </script>\n ${scriptChunkString}\n ${defaultExtraScripts || ''}\n </body>\n </html>`;\n\n res.send(html);\n\n if (cacheRef) {\n brotliCompress(html, (error, buffer) => {\n if (error) throw error;\n buffer.nonce = req.nonce; // eslint-disable-line no-param-reassign\n cache.add(buffer, cacheRef.key);\n });\n }\n } catch (error) {\n next(error);\n }\n };\n}\n"],"file":"renderer.js"}
@@ -1,2 +1,2 @@
1
- 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{border:0;font:inherit;font-size:100%;margin:0;padding:0;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:after,blockquote:before,q:after,q:before{content:"";content:none}table{border-collapse:collapse;border-spacing:0}body{text-rendering:auto}*{box-sizing:border-box}.zH52sA[disabled]{cursor:not-allowed}._3jm1-Q._0plpDL.E1FNQT,.E1FNQT,.KM0v4f.E1FNQT{background-image:linear-gradient(0deg,#d3d3d3,#fff 50%,#fff);border:1px solid 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}._3jm1-Q._0plpDL.E1FNQT:visited,.E1FNQT:visited,.KM0v4f.E1FNQT:visited{color:inherit}._3jm1-Q._0plpDL.E1FNQT:hover,.E1FNQT:hover,.KM0v4f.E1FNQT:hover{border-color:gray;cursor:pointer}._3jm1-Q._0plpDL.E1FNQT:focus,.E1FNQT:focus,.KM0v4f.E1FNQT:focus{border-color:blue;box-shadow:0 0 3px 1px #add8e6;outline:none}._3jm1-Q._0plpDL.E1FNQT.MAe9O6,._3jm1-Q._0plpDL.E1FNQT:active,.E1FNQT.MAe9O6,.E1FNQT:active,.KM0v4f.E1FNQT.MAe9O6,.KM0v4f.E1FNQT:active{background-image:linear-gradient(180deg,#d3d3d3,#fff 50%,#fff);border-color:gray;box-shadow:inset 0 1px 3px 0 #d3d3d3}._3jm1-Q._0plpDL.Br9IWV,.Br9IWV,.KM0v4f.Br9IWV{cursor:not-allowed;opacity:33%}.A-f8qJ,.dNQcC6.A-f8qJ,.earXxa.qAPfQ6.A-f8qJ{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:#fff;border:1px solid gray;border-radius:.3em;cursor:pointer;font:inherit;height:1.5em;margin:0;outline:none;width:1.5em}.A-f8qJ:checked:after,.dNQcC6.A-f8qJ:checked:after,.earXxa.qAPfQ6.A-f8qJ:checked:after{background:#000;border-radius:.3em;content:"";display:block;height:1em;margin:.2em;width:1em}.A-f8qJ:focus,.dNQcC6.A-f8qJ:focus,.earXxa.qAPfQ6.A-f8qJ:focus{border-color:blue;box-shadow:0 0 3px 1px #add8e6}.dNQcC6.Kr0g3M,.earXxa.qAPfQ6.Kr0g3M,.Kr0g3M{align-items:center;display:inline-flex;margin:.1em}._3dML-O,.dNQcC6._3dML-O,.earXxa.qAPfQ6._3dML-O{margin:0 .6em 0 1.5em}.-zPK7Y,.D4XHG2.N3nd34.-zPK7Y,.haRIry.-zPK7Y{background-image:linear-gradient(0deg,#d3d3d3,#fff 50%,#fff);border:1px solid gray;border-radius:0 .3em .3em 0;padding:.3em .6em;pointer-events:none;position:absolute;right:0}._9CQpeA,.D4XHG2.N3nd34._9CQpeA,.haRIry._9CQpeA{align-items:center;display:inline-flex;margin:.1em;position:relative}:active+.-zPK7Y,:active+.D4XHG2.N3nd34.-zPK7Y,:active+.haRIry.-zPK7Y{background-image:linear-gradient(180deg,#d3d3d3,#fff 50%,#fff);border-bottom-right-radius:0}:focus+.-zPK7Y,:focus+.D4XHG2.N3nd34.-zPK7Y,:focus+.haRIry.-zPK7Y{border-color:blue blue blue gray}.D4XHG2.N3nd34.Gv0kyu,.Gv0kyu,.haRIry.Gv0kyu{margin:0 .6em 0 1.5em}.D4XHG2.N3nd34.RdW3yR,.haRIry.RdW3yR,.RdW3yR{display:none}.D4XHG2.N3nd34.JXK1uw,.haRIry.JXK1uw,.JXK1uw{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:#fff;border:1px solid gray;border-radius:.3em;color:inherit;cursor:pointer;display:inline-block;font:inherit;outline:none;padding:.3em 3.3em calc(.3em + 1px) 1.2em}.D4XHG2.N3nd34.JXK1uw:active,.haRIry.JXK1uw:active,.JXK1uw:active{background:#fff;border-bottom-left-radius:0;border-bottom-right-radius:0}.D4XHG2.N3nd34.JXK1uw:focus,.haRIry.JXK1uw:focus,.JXK1uw:focus{border-color:blue;box-shadow:0 0 3px 1px #add8e6}._8s7GCr.TVlBYc.Cxx397,.Cxx397,.X5WszA.Cxx397{align-items:center;display:inline-flex;margin:.1em}._8s7GCr.TVlBYc.M07d4s,.M07d4s,.X5WszA.M07d4s{border:1px solid gray;border-radius:.3em;cursor:text;font:inherit;outline:none;padding:.3em .3em calc(.3em + 1px)}._8s7GCr.TVlBYc.M07d4s:focus,.M07d4s:focus,.X5WszA.M07d4s:focus{border-color:blue;box-shadow:0 0 3px 1px #add8e6}._8s7GCr.TVlBYc.gfbdq-,.gfbdq-,.X5WszA.gfbdq-{margin:0 .6em 0 1.5em}.m3-mdC.J15Z4H.T3cuHB,.m4mL-M.T3cuHB,.T3cuHB{align-items:stretch;display:flex;min-height:100vh;overflow:hidden;width:100%}.m3-mdC.J15Z4H.pPlQO2,.m4mL-M.pPlQO2,.pPlQO2{overflow:hidden;padding:1.2em;width:1024px}.lqNh4h,.m3-mdC.J15Z4H.lqNh4h,.m4mL-M.lqNh4h{overflow:hidden;width:calc(50% - 512px)}.Ah-Nsc.Wki41G.ye2BZo,.Szmbbz.ye2BZo,.ye2BZo{background:#eee;height:100%;left:0;opacity:80%;position:fixed;top:0;width:100%;z-index:998}.Ah-Nsc.Wki41G.ye2BZo:focus,.Szmbbz.ye2BZo:focus,.ye2BZo:focus{outline:none}.Ah-Nsc.Wki41G.gyZ4rc,.gyZ4rc,.Szmbbz.gyZ4rc{background:#fff;border-radius:4;box-shadow:0 0 14px 1px rgba(38,38,40,.15);left:50%;max-height:95vh;max-width:1024px;overflow:hidden;padding:.6em 1.2em;position:fixed;top:50%;transform:translate(-50%,-50%);width:480px;z-index:999}@media(max-width:1280px){.Ah-Nsc.Wki41G.gyZ4rc,.gyZ4rc,.Szmbbz.gyZ4rc{max-width:95vw}}body.scrolling-disabled-by-modal{overflow:hidden}.EznFz3{position:relative;width:100%}._0vb7tq{height:100%;position:absolute;width:100%}._7zdld4,.uIObt7._7zdld4,.XIxe9o.YOyORH._7zdld4{display:inline-block}.dBrB4g,.uIObt7.dBrB4g,.XIxe9o.YOyORH.dBrB4g{-webkit-animation:TJe-6j .4s ease-in infinite alternate;animation:TJe-6j .4s ease-in infinite alternate;background:#000;border-radius:.3em;display:inline-block;height:.6em;margin:0 .1em;position:relative;width:.6em}@-webkit-keyframes TJe-6j{0%{top:-.3em}to{top:.3em}}@keyframes TJe-6j{0%{top:-.3em}to{top:.3em}}.dBrB4g:first-child,.uIObt7.dBrB4g:first-child,.XIxe9o.YOyORH.dBrB4g:first-child{-webkit-animation-delay:-.2s;animation-delay:-.2s}.dBrB4g:last-child,.uIObt7.dBrB4g:last-child,.XIxe9o.YOyORH.dBrB4g:last-child{-webkit-animation-delay:.2s;animation-delay:.2s}@-webkit-keyframes L4ubm-{0%{opacity:0}to{opacity:100%}}@keyframes L4ubm-{0%{opacity:0}to{opacity:100%}}._4xT7zE.zd-vnH.M9gywF,.GdZucr.M9gywF,.M9gywF{border:.6em solid gray;height:0;pointer-events:none;position:absolute;width:0}._4xT7zE.zd-vnH.f9gY8K,.f9gY8K,.GdZucr.f9gY8K{-webkit-animation:L4ubm- .6s;animation:L4ubm- .6s;background:gray;border-radius:.3em;color:#fff;display:inline-block;left:0;padding:0 .3em;position:absolute;top:0}._4qDBRM,._4xT7zE.zd-vnH._4qDBRM,.GdZucr._4qDBRM{display:inline-block}* .sXHM81,.r3ABzd.YKcPnR .sXHM81,.veKyYi .sXHM81{background:#f5f5f5}* .SlV2zw,.r3ABzd.YKcPnR .SlV2zw,.veKyYi .SlV2zw{height:100%;position:relative;width:100%}* .jTxmOX,._5a9XX1._7sH52O .jTxmOX,.dzIcLh .jTxmOX{position:absolute;text-align:center;top:40%;transform:translateY(50%);width:100%}
1
+ 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{border:0;font:inherit;font-size:100%;margin:0;padding:0;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:after,blockquote:before,q:after,q:before{content:"";content:none}table{border-collapse:collapse;border-spacing:0}body{text-rendering:auto}*{box-sizing:border-box}.zH52sA[disabled]{cursor:not-allowed}._3jm1-Q._0plpDL.E1FNQT,.E1FNQT,.KM0v4f.E1FNQT{background-image:linear-gradient(0deg,#d3d3d3,#fff 50%,#fff);border:1px solid 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}._3jm1-Q._0plpDL.E1FNQT:visited,.E1FNQT:visited,.KM0v4f.E1FNQT:visited{color:inherit}._3jm1-Q._0plpDL.E1FNQT:hover,.E1FNQT:hover,.KM0v4f.E1FNQT:hover{border-color:gray;cursor:pointer}._3jm1-Q._0plpDL.E1FNQT:focus,.E1FNQT:focus,.KM0v4f.E1FNQT:focus{border-color:blue;box-shadow:0 0 3px 1px #add8e6;outline:none}._3jm1-Q._0plpDL.E1FNQT.MAe9O6,._3jm1-Q._0plpDL.E1FNQT:active,.E1FNQT.MAe9O6,.E1FNQT:active,.KM0v4f.E1FNQT.MAe9O6,.KM0v4f.E1FNQT:active{background-image:linear-gradient(180deg,#d3d3d3,#fff 50%,#fff);border-color:gray;box-shadow:inset 0 1px 3px 0 #d3d3d3}._3jm1-Q._0plpDL.Br9IWV,.Br9IWV,.KM0v4f.Br9IWV{cursor:not-allowed;opacity:.33}.A-f8qJ,.dNQcC6.A-f8qJ,.earXxa.qAPfQ6.A-f8qJ{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:#fff;border:1px solid gray;border-radius:.3em;cursor:pointer;font:inherit;height:1.5em;margin:0;outline:none;width:1.5em}.A-f8qJ:checked:after,.dNQcC6.A-f8qJ:checked:after,.earXxa.qAPfQ6.A-f8qJ:checked:after{background:#000;border-radius:.3em;content:"";display:block;height:1em;margin:.2em;width:1em}.A-f8qJ:focus,.dNQcC6.A-f8qJ:focus,.earXxa.qAPfQ6.A-f8qJ:focus{border-color:blue;box-shadow:0 0 3px 1px #add8e6}.dNQcC6.Kr0g3M,.earXxa.qAPfQ6.Kr0g3M,.Kr0g3M{align-items:center;display:inline-flex;margin:.1em}._3dML-O,.dNQcC6._3dML-O,.earXxa.qAPfQ6._3dML-O{margin:0 .6em 0 1.5em}.-zPK7Y,.D4XHG2.N3nd34.-zPK7Y,.haRIry.-zPK7Y{background-image:linear-gradient(0deg,#d3d3d3,#fff 50%,#fff);border:1px solid gray;border-radius:0 .3em .3em 0;padding:.3em .6em;pointer-events:none;position:absolute;right:0}._9CQpeA,.D4XHG2.N3nd34._9CQpeA,.haRIry._9CQpeA{align-items:center;display:inline-flex;margin:.1em;position:relative}:active+.-zPK7Y,:active+.D4XHG2.N3nd34.-zPK7Y,:active+.haRIry.-zPK7Y{background-image:linear-gradient(180deg,#d3d3d3,#fff 50%,#fff);border-bottom-right-radius:0}:focus+.-zPK7Y,:focus+.D4XHG2.N3nd34.-zPK7Y,:focus+.haRIry.-zPK7Y{border-color:blue blue blue gray}.D4XHG2.N3nd34.Gv0kyu,.Gv0kyu,.haRIry.Gv0kyu{margin:0 .6em 0 1.5em}.D4XHG2.N3nd34.RdW3yR,.haRIry.RdW3yR,.RdW3yR{display:none}.D4XHG2.N3nd34.JXK1uw,.haRIry.JXK1uw,.JXK1uw{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:#fff;border:1px solid gray;border-radius:.3em;color:inherit;cursor:pointer;display:inline-block;font:inherit;outline:none;padding:.3em 3.3em calc(.3em + 1px) 1.2em}.D4XHG2.N3nd34.JXK1uw:active,.haRIry.JXK1uw:active,.JXK1uw:active{background:#fff;border-bottom-left-radius:0;border-bottom-right-radius:0}.D4XHG2.N3nd34.JXK1uw:focus,.haRIry.JXK1uw:focus,.JXK1uw:focus{border-color:blue;box-shadow:0 0 3px 1px #add8e6}._8s7GCr.TVlBYc.Cxx397,.Cxx397,.X5WszA.Cxx397{align-items:center;display:inline-flex;margin:.1em}._8s7GCr.TVlBYc.M07d4s,.M07d4s,.X5WszA.M07d4s{border:1px solid gray;border-radius:.3em;cursor:text;font:inherit;outline:none;padding:.3em .3em calc(.3em + 1px)}._8s7GCr.TVlBYc.M07d4s:focus,.M07d4s:focus,.X5WszA.M07d4s:focus{border-color:blue;box-shadow:0 0 3px 1px #add8e6}._8s7GCr.TVlBYc.gfbdq-,.gfbdq-,.X5WszA.gfbdq-{margin:0 .6em 0 1.5em}.m3-mdC.J15Z4H.T3cuHB,.m4mL-M.T3cuHB,.T3cuHB{align-items:stretch;display:flex;min-height:100vh;overflow:hidden;width:100%}.m3-mdC.J15Z4H.pPlQO2,.m4mL-M.pPlQO2,.pPlQO2{overflow:hidden;padding:1.2em;width:1024px}.lqNh4h,.m3-mdC.J15Z4H.lqNh4h,.m4mL-M.lqNh4h{overflow:hidden;width:calc(50% - 512px)}.Ah-Nsc.Wki41G.ye2BZo,.Szmbbz.ye2BZo,.ye2BZo{background:#eee;height:100%;left:0;opacity:.8;position:fixed;top:0;width:100%;z-index:998}.Ah-Nsc.Wki41G.ye2BZo:focus,.Szmbbz.ye2BZo:focus,.ye2BZo:focus{outline:none}.Ah-Nsc.Wki41G.gyZ4rc,.gyZ4rc,.Szmbbz.gyZ4rc{background:#fff;border-radius:4;box-shadow:0 0 14px 1px rgba(38,38,40,.15);left:50%;max-height:95vh;max-width:1024px;overflow:hidden;padding:.6em 1.2em;position:fixed;top:50%;transform:translate(-50%,-50%);width:480px;z-index:999}@media(max-width:1280px){.Ah-Nsc.Wki41G.gyZ4rc,.gyZ4rc,.Szmbbz.gyZ4rc{max-width:95vw}}body.scrolling-disabled-by-modal{overflow:hidden}.EznFz3{position:relative;width:100%}._0vb7tq{height:100%;position:absolute;width:100%}._7zdld4,.uIObt7._7zdld4,.XIxe9o.YOyORH._7zdld4{display:inline-block}.dBrB4g,.uIObt7.dBrB4g,.XIxe9o.YOyORH.dBrB4g{-webkit-animation:TJe-6j .4s ease-in infinite alternate;animation:TJe-6j .4s ease-in infinite alternate;background:#000;border-radius:.3em;display:inline-block;height:.6em;margin:0 .1em;position:relative;width:.6em}@-webkit-keyframes TJe-6j{0%{top:-.3em}to{top:.3em}}@keyframes TJe-6j{0%{top:-.3em}to{top:.3em}}.dBrB4g:first-child,.uIObt7.dBrB4g:first-child,.XIxe9o.YOyORH.dBrB4g:first-child{-webkit-animation-delay:-.2s;animation-delay:-.2s}.dBrB4g:last-child,.uIObt7.dBrB4g:last-child,.XIxe9o.YOyORH.dBrB4g:last-child{-webkit-animation-delay:.2s;animation-delay:.2s}@-webkit-keyframes L4ubm-{0%{opacity:0}to{opacity:1}}@keyframes L4ubm-{0%{opacity:0}to{opacity:1}}._4xT7zE.zd-vnH.M9gywF,.GdZucr.M9gywF,.M9gywF{border:.6em solid gray;height:0;pointer-events:none;position:absolute;width:0}._4xT7zE.zd-vnH.f9gY8K,.f9gY8K,.GdZucr.f9gY8K{-webkit-animation:L4ubm- .6s;animation:L4ubm- .6s;background:gray;border-radius:.3em;color:#fff;display:inline-block;left:0;padding:0 .3em;position:absolute;top:0}._4qDBRM,._4xT7zE.zd-vnH._4qDBRM,.GdZucr._4qDBRM{display:inline-block}* .sXHM81,.r3ABzd.YKcPnR .sXHM81,.veKyYi .sXHM81{background:#f5f5f5}* .SlV2zw,.r3ABzd.YKcPnR .SlV2zw,.veKyYi .SlV2zw{height:100%;position:relative;width:100%}* .jTxmOX,._5a9XX1._7sH52O .jTxmOX,.dzIcLh .jTxmOX{position:absolute;text-align:center;top:40%;transform:translateY(50%);width:100%}
2
2
  /*# sourceMappingURL=style.css.map*/
@@ -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,sBCTF,kBACE,mBCMA,+CACE,6DACA,sBACA,mBACA,cACA,eACA,qBACA,aACA,YACA,mBACA,kBACA,qBAEA,uEACE,cAGF,iEACE,kBACA,eAGF,iEAEE,kBADA,+BAEA,aAGF,wIAEE,+DAEA,kBADA,oCACA,CAKJ,+CACE,mBACA,YC3CF,6CACE,6DACA,gBACA,sBACA,mBACA,eACA,aACA,aAEA,SADA,aAEA,YAGE,uFACE,gBACA,mBACA,WACA,cACA,WACA,YACA,UAIJ,+DACE,kBACA,+BAIJ,6CACE,mBACA,oBACA,YAGF,gDACE,sBCnCF,6CACE,6DACA,sBACA,4BACA,kBACA,oBACA,kBACA,QAGF,gDACE,mBACA,oBACA,YACA,kBAGF,qEACE,+DACA,6BAGF,kEAEE,iCAGF,6CACE,sBAIF,0DAEA,6CACE,6DACA,gBACA,sBACA,mBACA,cACA,eACA,qBACA,aACA,aACA,0CAEA,kEACE,gBACA,4BACA,6BAGF,+DACE,kBACA,+BCxDJ,8CACE,mBACA,oBACA,YAGF,8CACE,sBACA,mBACA,YACA,aACA,aACA,mCAEA,gEACE,kBACA,+BAIJ,8CACE,sBCZF,6CACE,oBACA,aACA,iBACA,gBACA,WAGF,6CACE,gBACA,cACA,YCPQ,CDUV,6CACE,gBACA,wBEvBF,6CACE,gBACA,YACA,OACA,YACA,eACA,MACA,WACA,YAEA,4EAGF,6CACE,gBAEA,gBADA,2CASA,SAPA,gBACA,gBDPQ,CCQR,gBACA,mBAEA,eACA,QAEA,+BAJA,YAKA,YDeF,yBC5BA,6CAgBI,gBCjCJ,iCACE,gBCFJ,QACE,kBACA,WAGF,SACE,YACA,kBACA,WCLA,gDACE,qBAGF,6CAME,wGACA,gBACA,mBACA,qBACA,YACA,cACA,kBACA,WAZA,0BACE,aACA,aAFF,kBACE,aACA,aAYF,mIACA,8HCvBJ,0BACE,aACA,iBAFF,kBACE,aACA,iBAMA,8CACE,uBAIA,QAAO,CAHP,oBACA,kBACA,OACA,CAOF,8CASE,kDARA,gBACA,mBACA,WACA,qBAIA,OAHA,eACA,kBACA,KAEA,CAGF,iDACE,qBC9BF,iDACE,mBAGF,iDACE,YACA,kBACA,WCPF,mDACE,kBACA,kBACA,QACA,0BACA","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/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/Dropdown/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/styles/_mixins/media.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/Modal/base-theme.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/Modal/styles.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/ScalableRect/style.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"],"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@import \"_global/reset\";\n\nbody {\n text-rendering: auto;\n}\n\n* {\n box-sizing: border-box;\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\n &:visited {\n color: inherit;\n }\n\n &:hover {\n border-color: gray;\n cursor: pointer;\n }\n\n &:focus {\n box-shadow: 0 0 3px 1px lightblue;\n border-color: blue;\n outline: none;\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\n /* Additional styling of disabled buttons. */\n &.disabled {\n cursor: not-allowed;\n opacity: 33%;\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\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","@import \"styles/mixins\";\n\n*,\n.context,\n.ad.hoc {\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 padding: 0.3em 0.6em;\n pointer-events: none;\n position: absolute;\n right: 0;\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 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 { /* Empty style */ }\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 font: inherit;\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}\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@import \"styles/mixins\";\n\n*,\n.context,\n.ad.hoc {\n &.container {\n align-items: stretch;\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 overflow: hidden;\n width: calc((100% - #{$screen-md}) / 2);\n }\n}\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","@import \"styles/mixins\";\n\n*,\n.context,\n.ad.hoc {\n &.overlay {\n background: #eee;\n height: 100%;\n left: 0;\n opacity: 80%;\n position: fixed;\n top: 0;\n width: 100%;\n z-index: 998;\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: 4;\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: 999;\n\n @include xs-to-lg {\n max-width: 95vw;\n }\n }\n}\n",":global {\n body.scrolling-disabled-by-modal {\n overflow: hidden;\n }\n}\n",".container {\n position: relative;\n width: 100%;\n}\n\n.wrapper {\n height: 100%;\n position: absolute;\n width: 100%;\n}\n","*,\n.context,\n.ad.hoc {\n &.container {\n display: inline-block;\n }\n\n &.circle {\n @keyframes bouncing {\n from { top: -0.3em; }\n to { top: 0.3em; }\n }\n\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: 100%; }\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 background: whitesmoke;\n }\n\n .video {\n height: 100%;\n position: relative;\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"],"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,sBCTF,kBACE,mBCMA,+CACE,6DACA,sBACA,mBACA,cACA,eACA,qBACA,aACA,YACA,mBACA,kBACA,qBAEA,uEACE,cAGF,iEACE,kBACA,eAGF,iEAEE,kBADA,+BAEA,aAGF,wIAEE,+DAEA,kBADA,oCACA,CAKJ,+CACE,mBACA,YC3CF,6CACE,6DACA,gBACA,sBACA,mBACA,eACA,aACA,aAEA,SADA,aAEA,YAGE,uFACE,gBACA,mBACA,WACA,cACA,WACA,YACA,UAIJ,+DACE,kBACA,+BAIJ,6CACE,mBACA,oBACA,YAGF,gDACE,sBCnCF,6CACE,6DACA,sBACA,4BACA,kBACA,oBACA,kBACA,QAGF,gDACE,mBACA,oBACA,YACA,kBAGF,qEACE,+DACA,6BAGF,kEAEE,iCAGF,6CACE,sBAIF,0DAEA,6CACE,6DACA,gBACA,sBACA,mBACA,cACA,eACA,qBACA,aACA,aACA,0CAEA,kEACE,gBACA,4BACA,6BAGF,+DACE,kBACA,+BCxDJ,8CACE,mBACA,oBACA,YAGF,8CACE,sBACA,mBACA,YACA,aACA,aACA,mCAEA,gEACE,kBACA,+BAIJ,8CACE,sBCZF,6CACE,oBACA,aACA,iBACA,gBACA,WAGF,6CACE,gBACA,cACA,YCPQ,CDUV,6CACE,gBACA,wBEvBF,6CACE,gBACA,YACA,OACA,WACA,eACA,MACA,WACA,YAEA,4EAGF,6CACE,gBAEA,gBADA,2CASA,SAPA,gBACA,gBDPQ,CCQR,gBACA,mBAEA,eACA,QAEA,+BAJA,YAKA,YDeF,yBC5BA,6CAgBI,gBCjCJ,iCACE,gBCFJ,QACE,kBACA,WAGF,SACE,YACA,kBACA,WCLA,gDACE,qBAGF,6CAME,wGACA,gBACA,mBACA,qBACA,YACA,cACA,kBACA,WAZA,0BACE,aACA,aAFF,kBACE,aACA,aAYF,mIACA,8HCvBJ,0BACE,aACA,cAFF,kBACE,aACA,cAMA,8CACE,uBAIA,QAAO,CAHP,oBACA,kBACA,OACA,CAOF,8CASE,kDARA,gBACA,mBACA,WACA,qBAIA,OAHA,eACA,kBACA,KAEA,CAGF,iDACE,qBC9BF,iDACE,mBAGF,iDACE,YACA,kBACA,WCPF,mDACE,kBACA,kBACA,QACA,0BACA","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/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/Dropdown/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/styles/_mixins/media.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/Modal/base-theme.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/Modal/styles.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/ScalableRect/style.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"],"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@import \"_global/reset\";\n\nbody {\n text-rendering: auto;\n}\n\n* {\n box-sizing: border-box;\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\n &:visited {\n color: inherit;\n }\n\n &:hover {\n border-color: gray;\n cursor: pointer;\n }\n\n &:focus {\n box-shadow: 0 0 3px 1px lightblue;\n border-color: blue;\n outline: none;\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\n /* Additional styling of disabled buttons. */\n &.disabled {\n cursor: not-allowed;\n opacity: 0.33;\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\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","@import \"styles/mixins\";\n\n*,\n.context,\n.ad.hoc {\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 padding: 0.3em 0.6em;\n pointer-events: none;\n position: absolute;\n right: 0;\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 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 { /* Empty style */ }\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 font: inherit;\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}\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@import \"styles/mixins\";\n\n*,\n.context,\n.ad.hoc {\n &.container {\n align-items: stretch;\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 overflow: hidden;\n width: calc((100% - #{$screen-md}) / 2);\n }\n}\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","@import \"styles/mixins\";\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: 998;\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: 4;\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: 999;\n\n @include xs-to-lg {\n max-width: 95vw;\n }\n }\n}\n",":global {\n body.scrolling-disabled-by-modal {\n overflow: hidden;\n }\n}\n",".container {\n position: relative;\n width: 100%;\n}\n\n.wrapper {\n height: 100%;\n position: absolute;\n width: 100%;\n}\n","*,\n.context,\n.ad.hoc {\n &.container {\n display: inline-block;\n }\n\n &.circle {\n @keyframes bouncing {\n from { top: -0.3em; }\n to { top: 0.3em; }\n }\n\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 background: whitesmoke;\n }\n\n .video {\n height: 100%;\n position: relative;\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"],"names":[],"sourceRoot":""}
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see web.bundle.js.LICENSE.txt */
2
- !function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/objectWithoutProperties"),require("@babel/runtime/helpers/slicedToArray"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/regenerator"),require("@dr.pogodin/react-global-state"),require("@dr.pogodin/react-themes"),require("axios"),require("dayjs"),require("lodash"),require("prop-types"),require("qs"),require("react"),require("react-dom"),require("react-helmet"),require("react-router-dom")):"function"==typeof define&&define.amd?define(["@babel/runtime/helpers/asyncToGenerator","@babel/runtime/helpers/defineProperty","@babel/runtime/helpers/objectWithoutProperties","@babel/runtime/helpers/slicedToArray","@babel/runtime/helpers/typeof","@babel/runtime/regenerator","@dr.pogodin/react-global-state","@dr.pogodin/react-themes","axios","dayjs","lodash","prop-types","qs","react","react-dom","react-helmet","react-router-dom"],r):"object"==typeof exports?exports["@dr.pogodin/react-utils"]=r(require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/objectWithoutProperties"),require("@babel/runtime/helpers/slicedToArray"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/regenerator"),require("@dr.pogodin/react-global-state"),require("@dr.pogodin/react-themes"),require("axios"),require("dayjs"),require("lodash"),require("prop-types"),require("qs"),require("react"),require("react-dom"),require("react-helmet"),require("react-router-dom")):e["@dr.pogodin/react-utils"]=r(e["@babel/runtime/helpers/asyncToGenerator"],e["@babel/runtime/helpers/defineProperty"],e["@babel/runtime/helpers/objectWithoutProperties"],e["@babel/runtime/helpers/slicedToArray"],e["@babel/runtime/helpers/typeof"],e["@babel/runtime/regenerator"],e["@dr.pogodin/react-global-state"],e["@dr.pogodin/react-themes"],e.axios,e.dayjs,e.lodash,e["prop-types"],e.qs,e.react,e["react-dom"],e["react-helmet"],e["react-router-dom"])}("undefined"!=typeof self?self:this,(function(__WEBPACK_EXTERNAL_MODULE__314__,__WEBPACK_EXTERNAL_MODULE__311__,__WEBPACK_EXTERNAL_MODULE__189__,__WEBPACK_EXTERNAL_MODULE__673__,__WEBPACK_EXTERNAL_MODULE__541__,__WEBPACK_EXTERNAL_MODULE__395__,__WEBPACK_EXTERNAL_MODULE__899__,__WEBPACK_EXTERNAL_MODULE__198__,__WEBPACK_EXTERNAL_MODULE__300__,__WEBPACK_EXTERNAL_MODULE__760__,__WEBPACK_EXTERNAL_MODULE__467__,__WEBPACK_EXTERNAL_MODULE__99__,__WEBPACK_EXTERNAL_MODULE__656__,__WEBPACK_EXTERNAL_MODULE__156__,__WEBPACK_EXTERNAL_MODULE__111__,__WEBPACK_EXTERNAL_MODULE__383__,__WEBPACK_EXTERNAL_MODULE__128__){return function(){"use strict";var __webpack_modules__={869: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 _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(673),_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__),_babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(189),_babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__),_excluded=["default"];function requireWeak(modulePath){var _eval=eval("require")(modulePath),def=_eval.default,named=_babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1___default()(_eval,_excluded);return def?(Object.entries(named).forEach((function(e){var r=_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(e,2),t=r[0],n=r[1];if(def[t])throw Error("Conflict between default and named exports");def[t]=n})),def):named}function resolveWeak(e){return e}},418:function(e){var r=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(r).map((function(e){return r[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,c,_=o(e),l=1;l<arguments.length;l++){for(var u in a=Object(arguments[l]))t.call(a,u)&&(_[u]=a[u]);if(r){c=r(a);for(var s=0;s<c.length;s++)n.call(a,c[s])&&(_[c[s]]=a[c[s]])}}return _}},251:function(e,r,t){t(418);var n=t(156),o=60103;if(r.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),r.Fragment=i("react.fragment")}var a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c=Object.prototype.hasOwnProperty,_={key:!0,ref:!0,__self:!0,__source:!0};function l(e,r,t){var n,i={},l=null,u=null;for(n in void 0!==t&&(l=""+t),void 0!==r.key&&(l=""+r.key),void 0!==r.ref&&(u=r.ref),r)c.call(r,n)&&!_.hasOwnProperty(n)&&(i[n]=r[n]);if(e&&e.defaultProps)for(n in r=e.defaultProps)void 0===i[n]&&(i[n]=r[n]);return{$$typeof:o,type:e,key:l,ref:u,props:i,_owner:a.current}}r.jsx=l,r.jsxs=l},893:function(e,r,t){e.exports=t(251)},314:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__314__},311:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__311__},189:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__189__},673:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__673__},541:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__541__},395:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__395__},899:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__899__},198:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__198__},300:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__300__},760:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__760__},467:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__467__},99:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__99__},656:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__656__},156:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__156__},111:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__111__},383:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__383__},128:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__128__}},__webpack_module_cache__={};function __webpack_require__(e){var r=__webpack_module_cache__[e];if(void 0!==r)return r.exports;var t=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](t,t.exports,__webpack_require__),t.exports}__webpack_require__.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(r,{a:r}),r},__webpack_require__.d=function(e,r){for(var t in r)__webpack_require__.o(r,t)&&!__webpack_require__.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},__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,r){return Object.prototype.hasOwnProperty.call(e,r)},__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__={};return function(){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{BaseModal:function(){return we},Button:function(){return G},Checkbox:function(){return V},CodeSplit:function(){return ie},Dropdown:function(){return _e},GlobalStateProvider:function(){return A.GlobalStateProvider},Input:function(){return fe},JU:function(){return E},Link:function(){return I},MetaTags:function(){return ye},Modal:function(){return ge},NavLink:function(){return xe},PT:function(){return T},PageLayout:function(){return me},ScalableRect:function(){return ke},ThemeProvider:function(){return i.ThemeProvider},Throbber:function(){return qe},WithTooltip:function(){return Se},YouTubeVideo:function(){return Ie},_:function(){return j()},api:function(){return k()},client:function(){return Z},config:function(){return b},getGlobalState:function(){return A.getGlobalState},isomorphy:function(){return e},newBarrier:function(){return w},server:function(){return ze},themed:function(){return a()},time:function(){return v},useAsyncCollection:function(){return A.useAsyncCollection},useAsyncData:function(){return A.useAsyncData},useGlobalState:function(){return A.useGlobalState},webpack:function(){return f},withRetries:function(){return O}});var e={};__webpack_require__.r(e),__webpack_require__.d(e,{IS_CLIENT_SIDE:function(){return _},IS_SERVER_SIDE:function(){return l},buildTimestamp:function(){return d},getBuildInfo:function(){return p},isDevBuild:function(){return u},isProdBuild:function(){return s}});var r=__webpack_require__(314),t=__webpack_require__.n(r),n=__webpack_require__(395),o=__webpack_require__.n(n),i=__webpack_require__(198),a=__webpack_require__.n(i),c=__webpack_require__(541),_="object"!==("undefined"==typeof process?"undefined":__webpack_require__.n(c)()(process))||!process.versions||!process.versions.node,l=!_;function u(){return!1}function s(){return!0}function p(){return(_?window:__webpack_require__.g).TRU_BUILD_INFO}function d(){return p().timestamp}var f=__webpack_require__(869),b=_?window.CONFIG:(0,f.requireWeak)("config"),h=__webpack_require__(760),m=__webpack_require__.n(h);m().SEC_MS=1e3,m().MIN_MS=60*m().SEC_MS,m().HOUR_MS=60*m().MIN_MS,m().DAY_MS=24*m().HOUR_MS,m().YEAR_MS=365*m().DAY_MS,m().now=Date.now,m().timer=function(){var e=t()(o().mark((function e(r){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){setTimeout(e,r)})));case 1:case"end":return e.stop()}}),e)})));return function(r){return e.apply(this,arguments)}}();var v=m();a().COMPOSE=i.COMPOSE,a().PRIORITY=i.PRIORITY;var E=null;if(l&&"production"!==(process.env.NODE_CONFIG_ENV||"production")){var y=f.requireWeak("path");E=f.requireWeak(y.resolve("/","./jest"))}function w(){var e,r=new Promise((function(r){e=r}));return r.resolve=e,r}function O(e){return g.apply(this,arguments)}function g(){return g=t()(o().mark((function e(r){var t,n,i,a=arguments;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=a.length>1&&void 0!==a[1]?a[1]:5,n=a.length>2&&void 0!==a[2]?a[2]:1e3,i=1;case 3:return e.prev=3,e.next=6,r();case 6:return e.abrupt("return",e.sent);case 9:if(e.prev=9,e.t0=e.catch(3),!(i<t)){e.next=16;break}return e.next=14,v.timer(n);case 14:e.next=17;break;case 16:throw e.t0;case 17:++i,e.next=3;break;case 20:case"end":return e.stop()}}),e,null,[[3,9]])}))),g.apply(this,arguments)}var P=__webpack_require__(467),j=__webpack_require__.n(P),x=__webpack_require__(300),k=__webpack_require__.n(x),T=__webpack_require__(99),q=__webpack_require__.n(T),A=__webpack_require__(899),C=__webpack_require__(311),N=__webpack_require__.n(C),L=__webpack_require__(128),D=__webpack_require__(189),M=__webpack_require__.n(D),R=__webpack_require__(156),S=__webpack_require__(893),B=["children","className","disabled","enforceA","keepScrollPosition","onClick","onMouseDown","openNewTab","replace","routerLinkType","to"];function W(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function U(e){var r=e.children,t=e.className,n=e.disabled,o=e.enforceA,i=e.keepScrollPosition,a=e.onClick,c=e.onMouseDown,_=e.openNewTab,l=e.replace,u=e.routerLinkType,s=e.to,p=M()(e,B);return n||o||_||s.match(/^(#|(https?|mailto):)/)?(0,S.jsx)("a",{className:(t?t+" ":"")+"zH52sA",disabled:n,href:s,onClick:n?function(e){return e.preventDefault()}:a,onMouseDown:n?function(e){return e.preventDefault()}:c,rel:"noopener noreferrer",target:_?"_blank":"",children:r}):(0,R.createElement)(u,function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?W(Object(t),!0).forEach((function(r){N()(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):W(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}({className:t,disabled:n,onMouseDown:c,replace:l,to:s,onClick:function(e){a&&a(e),i||window.scroll(0,0)}},p),r)}function X(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function K(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?X(Object(t),!0).forEach((function(r){N()(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):X(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function I(e){return(0,S.jsx)(U,K(K({},e),{},{routerLinkType:L.Link}))}function z(e){var r=e.active,t=e.children,n=e.disabled,o=e.enforceA,i=e.onClick,a=e.onMouseDown,c=e.openNewTab,_=e.replace,l=e.theme,u=e.to,s=l.button;return r&&l.active&&(s+=" ".concat(l.active)),n?(l.disabled&&(s+=" ".concat(l.disabled)),(0,S.jsx)("div",{className:s,children:t})):u?(0,S.jsx)(I,{className:s,enforceA:o,onClick:i,onMouseDown:a,openNewTab:c,replace:_,to:u,children:t}):(0,S.jsx)("div",{className:s,onClick:i,onKeyPress:i,onMouseDown:a,role:"button",tabIndex:0,children:t})}U.defaultProps={children:null,className:null,disabled:!1,enforceA:!1,keepScrollPosition:!1,onClick:null,onMouseDown:null,openNewTab:!1,replace:!1,to:""},U.propTypes={children:q().node,className:q().string,disabled:q().bool,enforceA:q().bool,keepScrollPosition:q().bool,onClick:q().func,onMouseDown:q().func,openNewTab:q().bool,replace:q().bool,routerLinkType:q().elementType.isRequired,to:q().oneOfType([q().object,q().string])};var Y=a()("Button",["active","button","disabled"],{button:"E1FNQT",context:"KM0v4f",ad:"_3jm1-Q",hoc:"_0plpDL",active:"MAe9O6",disabled:"Br9IWV"})(z);z.defaultProps={active:!1,children:void 0,disabled:!1,enforceA:!1,onClick:void 0,onMouseDown:void 0,openNewTab:!1,replace:!1,to:void 0},z.propTypes={active:q().bool,children:q().node,disabled:q().bool,enforceA:q().bool,onClick:q().func,onMouseDown:q().func,openNewTab:q().bool,replace:q().bool,theme:Y.themeType.isRequired,to:q().oneOfType([q().object,q().string])};var G=Y;function H(e){var r=e.checked,t=e.label,n=e.onChange,o=e.theme;return(0,S.jsxs)("div",{className:o.container,children:[void 0===t?null:(0,S.jsx)("p",{className:o.label,children:t}),(0,S.jsx)("input",{checked:r,className:o.checkbox,onChange:n,type:"checkbox"})]})}var F=a()("Checkbox",["checkbox","container","label"],{checkbox:"A-f8qJ",context:"dNQcC6",ad:"earXxa",hoc:"qAPfQ6",container:"Kr0g3M",label:"_3dML-O"})(H);H.propTypes={checked:q().bool,label:q().string,onChange:q().func,theme:F.themeType.isRequired},H.defaultProps={checked:void 0,label:void 0,onChange:void 0};var V=F,Q=__webpack_require__(111),J=__webpack_require__.n(Q);function Z(e){J().hydrate((0,S.jsx)(A.GlobalStateProvider,{initialState:window.ISTATE,children:(0,S.jsx)(L.BrowserRouter,{children:(0,S.jsx)(e,{})})}),document.getElementById("react-view"))}var $,ee=__webpack_require__(673),re=__webpack_require__.n(ee),te=["chunkName","getComponentAsync","placeholder"];function ne(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function oe(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ne(Object(t),!0).forEach((function(r){N()(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ne(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}try{$=l&&f.requireWeak("".concat("/","/ServerSide"))}catch(e){$=void 0}$||($=function(e){var r=e.chunkName,t=e.getComponentAsync,n=e.placeholder,o=M()(e,te),i=(0,R.useRef)({pendingStyles:[],renderInitialized:!1,stylesInitialized:!1}).current,a=p().publicPath;i.stylesInitialized||(i.stylesInitialized=!0,window.CHUNK_GROUPS[r].forEach((function(e){if(e.endsWith(".css")){var t="".concat(a,"/").concat(e),n=document.querySelector('link[href="'.concat(t,'"]'));if(!n){(n=document.createElement("link")).setAttribute("href",t),n.setAttribute("rel","stylesheet");var o=w();n.onload=o.resolve,i.pendingStyles.push(o),document.querySelector("head").appendChild(n)}n.dependants?n.dependants.add(r):n.dependants=new Set([r])}})));var c=(0,A.useAsyncData)("dr_pogodin_react_utils___split_components.".concat(r),t,{maxage:v.YEAR_MS}).data,_=function(){var e=c.default||c;return(0,S.jsx)("div",{"data-chunk-name":r,children:(0,S.jsx)(e,oe({},o))})},l=(0,R.useState)((function(){if(c&&!i.pendingStyles.length)return i.renderInitialized=!0,_();var e=document.querySelector("[data-chunk-name=".concat(r,"]"));if(e)return(0,S.jsx)("div",{dangerouslySetInnerHTML:{__html:e.innerHTML||""},"data-chunk-name":r});var t=n||function(){return null};return(0,S.jsx)("div",{children:(0,S.jsx)(t,{})})})),u=re()(l,2),s=u[0],d=u[1];return c&&!i.renderInitialized&&(i.renderInitialized=!0,Promise.all(i.pendingStyles).then((function(){i.stylesInitialized&&d(_())}))),(0,R.useEffect)((function(){return function(){i.stylesInitialized=!1,window.CHUNK_GROUPS[r].forEach((function(e){if(e.endsWith(".css")){var t="".concat(a,"/").concat(e),n=document.querySelector('link[href="'.concat(t,'"]'));n.dependants.delete(r),n.dependants.size||document.querySelector("head").removeChild(n)}}))}}),[r,i,a]),s});var ie=$;function ae(e){for(var r=e.filter,t=e.label,n=e.onChange,o=e.options,i=e.theme,a=e.value,c=[(0,S.jsx)("option",{className:i.hiddenOption,children:"‌"},"__reactUtilsHiddenOption")],_=0;_<o.length;++_){var l=o[_];r&&!r(l)||((0,P.isString)(l)&&(l={value:l}),c.push((0,S.jsx)("option",{className:i.option,value:l.value,children:void 0===l.name?l.value:l.name},l.value)))}return(0,S.jsxs)("div",{className:i.container,children:[void 0===t?null:(0,S.jsx)("p",{className:i.label,children:t}),(0,S.jsx)("select",{className:i.select,onChange:n,value:a,children:c}),(0,S.jsx)("div",{className:i.arrow,children:"▼"})]})}var ce=a()("Dropdown",["arrow","container","hiddenOption","label","option","select"],{arrow:"-zPK7Y",context:"haRIry",ad:"D4XHG2",hoc:"N3nd34",container:"_9CQpeA",label:"Gv0kyu",hiddenOption:"RdW3yR",select:"JXK1uw"})(ae);ae.propTypes={filter:q().func,label:q().string,onChange:q().func,options:q().arrayOf(q().oneOfType([q().shape({name:q().node,value:q().string.isRequired}),q().string]).isRequired),theme:ce.themeType.isRequired,value:q().string},ae.defaultProps={filter:void 0,label:void 0,onChange:void 0,options:[],value:void 0};var _e=ce,le=["label","theme"];function ue(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function se(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ue(Object(t),!0).forEach((function(r){N()(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ue(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function pe(e){var r=e.label,t=e.theme,n=M()(e,le);return(0,S.jsxs)("div",{className:t.container,children:[void 0===r?null:(0,S.jsx)("p",{className:t.label,children:r}),(0,S.jsx)("input",se({className:t.input},n))]})}var de=a()("Input",["container","input","label"],{container:"Cxx397",context:"X5WszA",ad:"_8s7GCr",hoc:"TVlBYc",input:"M07d4s",label:"gfbdq-"})(pe);pe.propTypes={label:q().string,theme:de.themeType.isRequired},pe.defaultProps={label:void 0};var fe=de;function be(e){var r=e.children,t=e.leftSidePanelContent,n=e.rightSidePanelContent,o=e.theme;return(0,S.jsxs)("div",{className:o.container,children:[(0,S.jsx)("div",{className:[o.sidePanel,o.leftSidePanel].join(" "),children:t}),(0,S.jsx)("div",{className:o.mainPanel,children:r}),(0,S.jsx)("div",{className:[o.sidePanel,o.rightSidePanel].join(" "),children:n})]})}var he=a()("PageLayout",["container","leftSidePanel","mainPanel","rightSidePanel","sidePanel"],{container:"T3cuHB",context:"m4mL-M",ad:"m3-mdC",hoc:"J15Z4H",mainPanel:"pPlQO2",sidePanel:"lqNh4h"})(be);be.propTypes={children:q().node,leftSidePanelContent:q().node,rightSidePanelContent:q().node,theme:he.themeType.isRequired},be.defaultProps={children:null,leftSidePanelContent:null,rightSidePanelContent:null};var me=he,ve=__webpack_require__(383),Ee=(0,R.createContext)();function ye(e){var r=e.children,t=e.description,n=e.image,o=e.siteName,i=e.socialDescription,a=e.socialTitle,c=e.title,_=e.url,l=a||c,u=i||t,s=(0,R.useMemo)((function(){return{description:t,image:n,siteName:o,socialDescription:i,socialTitle:a,title:c,url:_}}),[t,n,o,i,a,c,_]);return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(ve.Helmet,{children:[(0,S.jsx)("title",{children:c}),(0,S.jsx)("meta",{name:"description",content:t}),(0,S.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,S.jsx)("meta",{name:"twitter:title",content:l}),(0,S.jsx)("meta",{name:"twitter:description",content:u}),n?(0,S.jsx)("meta",{name:"twitter:image",content:n}):null,o?(0,S.jsx)("meta",{name:"twitter:site",content:"@".concat(o)}):null,(0,S.jsx)("meta",{name:"og:title",content:l}),n?(0,S.jsx)("meta",{name:"og:image",content:n}):null,n?(0,S.jsx)("meta",{name:"og:image:alt",content:l}):null,(0,S.jsx)("meta",{name:"og:description",content:u}),o?(0,S.jsx)("meta",{name:"og:sitename",content:o}):null,_?(0,S.jsx)("meta",{name:"og:url",content:_}):null]}),r?(0,S.jsx)(Ee.Provider,{value:s,children:r}):null]})}function we(e){var r=e.children,t=e.onCancel,n=e.theme,o=(0,R.useRef)(),i=(0,R.useRef)(),a=(0,R.useState)(),c=re()(a,2),_=c[0],l=c[1];(0,R.useEffect)((function(){var e=document.createElement("div");return document.body.classList.add("scrolling-disabled-by-modal"),document.body.appendChild(e),l(e),function(){document.body.classList.remove("scrolling-disabled-by-modal"),document.body.removeChild(e)}}),[]);var u=(0,R.useMemo)((function(){return(0,S.jsx)("div",{onFocus:function(){for(var e=o.current.querySelectorAll("*"),r=e.length-1;r>=0;--r)if(e[r].focus(),document.activeElement===e[r])return;i.current.focus()},tabIndex:"0"})}),[]);return _?J().createPortal((0,S.jsxs)(S.Fragment,{children:[u,(0,S.jsx)("div",{"aria-label":"Cancel",className:n.overlay,onClick:function(){return t()},onKeyDown:function(e){"Escape"===e.key&&t()},ref:function(e){e&&e!==i.current&&(i.current=e,e.focus())},role:"button",tabIndex:"0"}),(0,S.jsx)("div",{"aria-modal":"true",className:n.container,onWheel:function(e){return e.stopPropagation()},ref:o,role:"dialog",children:r}),(0,S.jsx)("div",{onFocus:function(){i.current.focus()},tabIndex:"0"}),u]}),_):null}ye.Context=Ee,ye.defaultProps={children:null,image:null,siteName:null,socialDescription:null,socialTitle:null,url:null},ye.propTypes={children:q().node,description:q().string.isRequired,image:q().string,siteName:q().string,socialDescription:q().string,socialTitle:q().string,title:q().string.isRequired,url:q().string};var Oe=a()("Modal",["container","overlay"],{overlay:"ye2BZo",context:"Szmbbz",ad:"Ah-Nsc",hoc:"Wki41G",container:"gyZ4rc"})(we);we.propTypes={onCancel:q().func,children:q().node,theme:Oe.themeType.isRequired},we.defaultProps={onCancel:P.noop,children:null};var ge=Oe;function Pe(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function je(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?Pe(Object(t),!0).forEach((function(r){N()(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Pe(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function xe(e){return(0,S.jsx)(U,je(je({},e),{},{routerLinkType:L.NavLink}))}function ke(e){var r=e.children,t=e.className,n=e.ratio.split(":"),o="".concat(100*n[1]/n[0],"%"),i=(0,S.jsx)("div",{style:{paddingBottom:o},className:"EznFz3",children:(0,S.jsx)("div",{className:"_0vb7tq",children:r})});return t?(0,S.jsx)("div",{className:t,children:i}):i}function Te(e){var r=e.theme;return(0,S.jsxs)("div",{className:(r.container?r.container+" ":"")+"_7zdld4",children:[(0,S.jsx)("div",{className:(r.circle?r.circle+" ":"")+"dBrB4g"}),(0,S.jsx)("div",{className:(r.circle?r.circle+" ":"")+"dBrB4g"}),(0,S.jsx)("div",{className:(r.circle?r.circle+" ":"")+"dBrB4g"})]})}ke.defaultProps={children:null,className:null,ratio:"1:1"},ke.propTypes={children:q().node,className:q().string,ratio:q().string},Te.defaultProps={theme:{}},Te.propTypes={theme:q().shape({container:q().string,circle:q().string})};var qe=a()("Throbber",["circle","container"],{container:"_7zdld4",context:"uIObt7",ad:"XIxe9o",hoc:"YOyORH",circle:"dBrB4g",bouncing:"TJe-6j"})(Te),Ae={ABOVE_CURSOR:"ABOVE_CURSOR",ABOVE_ELEMENT:"ABOVE_ELEMENT",BELOW_CURSOR:"BELOW_CURSOR",BELOW_ELEMENT:"BELOW_ELEMENT"},Ce=["border-bottom-color:transparent","border-left-color:transparent","border-right-color:transparent"].join(";"),Ne=["border-top-color:transparent","border-left-color:transparent","border-right-color:transparent"].join(";");var Le=(0,R.forwardRef)((function(e,r){var t=e.children,n=e.theme,o=(0,R.useState)(null),i=re()(o,2),a=i[0],c=i[1],_=function(e,r,t,n){return a&&function(e,r,t,n,o){var i,a,c,_,l,u=function(e){return{arrow:e.arrow.getBoundingClientRect(),container:e.container.getBoundingClientRect()}}(o),s=(a=(i=window).pageXOffset,c=i.pageYOffset,l=(_=document.documentElement).clientHeight,{left:a,right:a+_.clientWidth,top:c,bottom:c+l}),p=function(e,r,t){var n=t.arrow,o=t.container;return{arrowX:.5*(o.width-n.width),arrowY:o.height,containerX:e-o.width/2,containerY:r-o.height-n.height/1.5,baseArrowStyle:Ce}}(e,r,u);if(p.containerX<s.left+6)p.containerX=s.left+6,p.arrowX=Math.max(6,e-p.containerX-u.arrow.width/2);else{var d=s.right-6-u.container.width;p.containerX>d&&(p.containerX=d,p.arrowX=Math.min(u.container.width-6,e-p.containerX-u.arrow.width/2))}p.containerY<s.top+6&&(p.containerY+=u.container.height+2*u.arrow.height,p.arrowY-=u.container.height+u.arrow.height,p.baseArrowStyle=Ne);var f="left:".concat(p.containerX,"px;top:").concat(p.containerY,"px");o.container.setAttribute("style",f);var b="".concat(p.baseArrowStyle,";left:").concat(p.arrowX,"px;top:").concat(p.arrowY,"px");o.arrow.setAttribute("style",b)}(e,r,0,0,a)};return(0,R.useImperativeHandle)(r,(function(){return{pointTo:_}})),(0,R.useEffect)((function(){var e=function(e){var r=document.createElement("div");e.arrow&&r.setAttribute("class",e.arrow);var t=document.createElement("div");e.content&&t.setAttribute("class",e.content);var n=document.createElement("div");return e.container&&n.setAttribute("class",e.container),n.appendChild(r),n.appendChild(t),document.body.appendChild(n),{container:n,arrow:r,content:t}}(n);return c(e),function(){document.body.removeChild(e.container),c(null)}}),[n]),a?(0,Q.createPortal)(t,a.content):null}));Le.propTypes={children:q().node,theme:q().shape().isRequired},Le.defaultProps={children:null};var De=Le;function Me(e){var r=e.children,t=e.placement,n=e.tip,o=e.theme,i=(0,R.useRef)(),a=(0,R.useRef)(),c=(0,R.useState)(!1),_=re()(c,2),l=_[0],u=_[1];return(0,R.useEffect)((function(){if(l&&null!==n){var e=function(){return u(!1)};return window.addEventListener("scroll",e),function(){return window.removeEventListener("scroll",e)}}}),[l,n]),(0,S.jsxs)("div",{className:o.wrapper,onMouseLeave:function(){return u(!1)},onMouseMove:function(e){return function(e,r){if(l){var n=a.current.getBoundingClientRect();e<n.left||e>n.right||r<n.top||r>n.bottom?u(!1):i.current&&i.current.pointTo(e+window.pageXOffset,r+window.pageYOffset,t,a.current)}else u(!0)}(e.clientX,e.clientY)},ref:a,children:[l&&null!==n?(0,S.jsx)(De,{ref:i,theme:o,children:n}):null,r]})}var Re=a()("WithTooltip",["appearance","arrow","container","content","wrapper"],{arrow:"M9gywF",ad:"_4xT7zE",hoc:"zd-vnH",context:"GdZucr",container:"f9gY8K",appearance:"L4ubm-",wrapper:"_4qDBRM"})(Me);Re.PLACEMENTS=Ae,Me.propTypes={children:q().node,placement:q().oneOf(Object.values(Ae)),theme:Re.themeType.isRequired,tip:q().node},Me.defaultProps={children:null,placement:Ae.ABOVE_CURSOR,tip:null};var Se=Re,Be=__webpack_require__(656),We=__webpack_require__.n(Be),Ue={container:"jTxmOX",context:"dzIcLh",ad:"_5a9XX1",hoc:"_7sH52O"};function Xe(e){var r=e.autoplay,t=e.src,n=e.theme,o=e.title,i=t.split("?"),a=re()(i,2),c=a[0],_=a[1],l=(_=_?We().parse(_):{}).v||c.match(/\/([a-zA-Z0-9-_]*)$/)[1];return c="https://www.youtube.com/embed/".concat(l),delete _.v,_.autoplay=r?1:0,c+="?".concat(We().stringify(_)),(0,S.jsxs)(ke,{className:n.container,ratio:"16:9",children:[(0,S.jsx)(qe,{theme:Ue}),(0,S.jsx)("iframe",{allow:"autoplay",allowFullScreen:!0,className:n.video,src:c,title:o})]})}var Ke=a()("YouTubeVideo",["container","video"],{container:"sXHM81",context:"veKyYi",ad:"r3ABzd",hoc:"YKcPnR",video:"SlV2zw"})(Xe);Xe.propTypes={autoplay:q().bool,src:q().string.isRequired,theme:Ke.themeType.isRequired,title:q().string},Xe.defaultProps={autoplay:!1,title:""};var Ie=Ke,ze=null;if(l)try{var Ye=f.requireWeak("path");ze=f.requireWeak(Ye.resolve("/","./server"))}catch(e){ze=null}}(),__webpack_exports__}()}));
2
+ !function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/objectWithoutProperties"),require("@babel/runtime/helpers/slicedToArray"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/regenerator"),require("@dr.pogodin/react-global-state"),require("@dr.pogodin/react-themes"),require("axios"),require("dayjs"),require("lodash"),require("prop-types"),require("qs"),require("react"),require("react-dom"),require("react-helmet"),require("react-router-dom")):"function"==typeof define&&define.amd?define(["@babel/runtime/helpers/asyncToGenerator","@babel/runtime/helpers/defineProperty","@babel/runtime/helpers/objectWithoutProperties","@babel/runtime/helpers/slicedToArray","@babel/runtime/helpers/typeof","@babel/runtime/regenerator","@dr.pogodin/react-global-state","@dr.pogodin/react-themes","axios","dayjs","lodash","prop-types","qs","react","react-dom","react-helmet","react-router-dom"],r):"object"==typeof exports?exports["@dr.pogodin/react-utils"]=r(require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/objectWithoutProperties"),require("@babel/runtime/helpers/slicedToArray"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/regenerator"),require("@dr.pogodin/react-global-state"),require("@dr.pogodin/react-themes"),require("axios"),require("dayjs"),require("lodash"),require("prop-types"),require("qs"),require("react"),require("react-dom"),require("react-helmet"),require("react-router-dom")):e["@dr.pogodin/react-utils"]=r(e["@babel/runtime/helpers/asyncToGenerator"],e["@babel/runtime/helpers/defineProperty"],e["@babel/runtime/helpers/objectWithoutProperties"],e["@babel/runtime/helpers/slicedToArray"],e["@babel/runtime/helpers/typeof"],e["@babel/runtime/regenerator"],e["@dr.pogodin/react-global-state"],e["@dr.pogodin/react-themes"],e.axios,e.dayjs,e.lodash,e["prop-types"],e.qs,e.react,e["react-dom"],e["react-helmet"],e["react-router-dom"])}("undefined"!=typeof self?self:this,(function(__WEBPACK_EXTERNAL_MODULE__314__,__WEBPACK_EXTERNAL_MODULE__311__,__WEBPACK_EXTERNAL_MODULE__189__,__WEBPACK_EXTERNAL_MODULE__673__,__WEBPACK_EXTERNAL_MODULE__541__,__WEBPACK_EXTERNAL_MODULE__395__,__WEBPACK_EXTERNAL_MODULE__899__,__WEBPACK_EXTERNAL_MODULE__198__,__WEBPACK_EXTERNAL_MODULE__300__,__WEBPACK_EXTERNAL_MODULE__760__,__WEBPACK_EXTERNAL_MODULE__467__,__WEBPACK_EXTERNAL_MODULE__99__,__WEBPACK_EXTERNAL_MODULE__656__,__WEBPACK_EXTERNAL_MODULE__156__,__WEBPACK_EXTERNAL_MODULE__111__,__WEBPACK_EXTERNAL_MODULE__383__,__WEBPACK_EXTERNAL_MODULE__128__){return function(){"use strict";var __webpack_modules__={869: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 _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(673),_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__),_babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(189),_babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__),_excluded=["default"];function requireWeak(modulePath){var _eval=eval("require")(modulePath),def=_eval.default,named=_babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1___default()(_eval,_excluded);return def?(Object.entries(named).forEach((function(e){var r=_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(e,2),t=r[0],n=r[1];if(def[t])throw Error("Conflict between default and named exports");def[t]=n})),def):named}function resolveWeak(e){return e}},418:function(e){var r=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(r).map((function(e){return r[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,c,_=o(e),l=1;l<arguments.length;l++){for(var u in a=Object(arguments[l]))t.call(a,u)&&(_[u]=a[u]);if(r){c=r(a);for(var s=0;s<c.length;s++)n.call(a,c[s])&&(_[c[s]]=a[c[s]])}}return _}},251:function(e,r,t){t(418);var n=t(156),o=60103;if(r.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),r.Fragment=i("react.fragment")}var a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c=Object.prototype.hasOwnProperty,_={key:!0,ref:!0,__self:!0,__source:!0};function l(e,r,t){var n,i={},l=null,u=null;for(n in void 0!==t&&(l=""+t),void 0!==r.key&&(l=""+r.key),void 0!==r.ref&&(u=r.ref),r)c.call(r,n)&&!_.hasOwnProperty(n)&&(i[n]=r[n]);if(e&&e.defaultProps)for(n in r=e.defaultProps)void 0===i[n]&&(i[n]=r[n]);return{$$typeof:o,type:e,key:l,ref:u,props:i,_owner:a.current}}r.jsx=l,r.jsxs=l},893:function(e,r,t){e.exports=t(251)},314:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__314__},311:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__311__},189:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__189__},673:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__673__},541:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__541__},395:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__395__},899:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__899__},198:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__198__},300:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__300__},760:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__760__},467:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__467__},99:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__99__},656:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__656__},156:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__156__},111:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__111__},383:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__383__},128:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__128__}},__webpack_module_cache__={};function __webpack_require__(e){var r=__webpack_module_cache__[e];if(void 0!==r)return r.exports;var t=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](t,t.exports,__webpack_require__),t.exports}__webpack_require__.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(r,{a:r}),r},__webpack_require__.d=function(e,r){for(var t in r)__webpack_require__.o(r,t)&&!__webpack_require__.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},__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,r){return Object.prototype.hasOwnProperty.call(e,r)},__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__={};return function(){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{BaseModal:function(){return ye},Button:function(){return z},Checkbox:function(){return H},CodeSplit:function(){return ne},Dropdown:function(){return ce},GlobalStateProvider:function(){return T.GlobalStateProvider},Input:function(){return de},JU:function(){return E},Link:function(){return X},MetaTags:function(){return Ee},Modal:function(){return Oe},NavLink:function(){return je},PT:function(){return x},PageLayout:function(){return he},ScalableRect:function(){return xe},ThemeProvider:function(){return i.ThemeProvider},Throbber:function(){return Te},WithTooltip:function(){return Re},YouTubeVideo:function(){return Ke},api:function(){return j()},client:function(){return Q},config:function(){return b},getGlobalState:function(){return T.getGlobalState},isomorphy:function(){return e},newBarrier:function(){return w},server:function(){return Ie},themed:function(){return a()},time:function(){return v},useAsyncCollection:function(){return T.useAsyncCollection},useAsyncData:function(){return T.useAsyncData},useGlobalState:function(){return T.useGlobalState},webpack:function(){return f},withRetries:function(){return O}});var e={};__webpack_require__.r(e),__webpack_require__.d(e,{IS_CLIENT_SIDE:function(){return _},IS_SERVER_SIDE:function(){return l},buildTimestamp:function(){return d},getBuildInfo:function(){return p},isDevBuild:function(){return u},isProdBuild:function(){return s}});var r=__webpack_require__(314),t=__webpack_require__.n(r),n=__webpack_require__(395),o=__webpack_require__.n(n),i=__webpack_require__(198),a=__webpack_require__.n(i),c=__webpack_require__(541),_="object"!==("undefined"==typeof process?"undefined":__webpack_require__.n(c)()(process))||!process.versions||!process.versions.node,l=!_;function u(){return!1}function s(){return!0}function p(){return(_?window:__webpack_require__.g).TRU_BUILD_INFO}function d(){return p().timestamp}var f=__webpack_require__(869),b=_?window.CONFIG:(0,f.requireWeak)("config"),h=__webpack_require__(760),m=__webpack_require__.n(h);m().SEC_MS=1e3,m().MIN_MS=60*m().SEC_MS,m().HOUR_MS=60*m().MIN_MS,m().DAY_MS=24*m().HOUR_MS,m().YEAR_MS=365*m().DAY_MS,m().now=Date.now,m().timer=function(){var e=t()(o().mark((function e(r){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){setTimeout(e,r)})));case 1:case"end":return e.stop()}}),e)})));return function(r){return e.apply(this,arguments)}}();var v=m();a().COMPOSE=i.COMPOSE,a().PRIORITY=i.PRIORITY;var E=null;if(l&&"production"!==(process.env.NODE_CONFIG_ENV||"production")){var y=f.requireWeak("path");E=f.requireWeak(y.resolve("/","./jest"))}function w(){var e,r=new Promise((function(r){e=r}));return r.resolve=e,r}function O(e){return g.apply(this,arguments)}function g(){return g=t()(o().mark((function e(r){var t,n,i,a=arguments;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=a.length>1&&void 0!==a[1]?a[1]:5,n=a.length>2&&void 0!==a[2]?a[2]:1e3,i=1;case 3:return e.prev=3,e.next=6,r();case 6:return e.abrupt("return",e.sent);case 9:if(e.prev=9,e.t0=e.catch(3),!(i<t)){e.next=16;break}return e.next=14,v.timer(n);case 14:e.next=17;break;case 16:throw e.t0;case 17:++i,e.next=3;break;case 20:case"end":return e.stop()}}),e,null,[[3,9]])}))),g.apply(this,arguments)}var P=__webpack_require__(300),j=__webpack_require__.n(P),x=__webpack_require__(99),k=__webpack_require__.n(x),T=__webpack_require__(899),A=__webpack_require__(311),q=__webpack_require__.n(A),C=__webpack_require__(128),N=__webpack_require__(189),L=__webpack_require__.n(N),D=__webpack_require__(156),M=__webpack_require__(893),R=["children","className","disabled","enforceA","keepScrollPosition","onClick","onMouseDown","openNewTab","replace","routerLinkType","to"];function S(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function B(e){var r=e.children,t=e.className,n=e.disabled,o=e.enforceA,i=e.keepScrollPosition,a=e.onClick,c=e.onMouseDown,_=e.openNewTab,l=e.replace,u=e.routerLinkType,s=e.to,p=L()(e,R);return n||o||_||s.match(/^(#|(https?|mailto):)/)?(0,M.jsx)("a",{className:(t?t+" ":"")+"zH52sA",disabled:n,href:s,onClick:n?function(e){return e.preventDefault()}:a,onMouseDown:n?function(e){return e.preventDefault()}:c,rel:"noopener noreferrer",target:_?"_blank":"",children:r}):(0,D.createElement)(u,function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?S(Object(t),!0).forEach((function(r){q()(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):S(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}({className:t,disabled:n,onMouseDown:c,replace:l,to:s,onClick:function(e){a&&a(e),i||window.scroll(0,0)}},p),r)}function W(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function U(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?W(Object(t),!0).forEach((function(r){q()(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):W(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function X(e){return(0,M.jsx)(B,U(U({},e),{},{routerLinkType:C.Link}))}function K(e){var r=e.active,t=e.children,n=e.disabled,o=e.enforceA,i=e.onClick,a=e.onMouseDown,c=e.openNewTab,_=e.replace,l=e.theme,u=e.to,s=l.button;return r&&l.active&&(s+=" ".concat(l.active)),n?(l.disabled&&(s+=" ".concat(l.disabled)),(0,M.jsx)("div",{className:s,children:t})):u?(0,M.jsx)(X,{className:s,enforceA:o,onClick:i,onMouseDown:a,openNewTab:c,replace:_,to:u,children:t}):(0,M.jsx)("div",{className:s,onClick:i,onKeyPress:i,onMouseDown:a,role:"button",tabIndex:0,children:t})}B.defaultProps={children:null,className:null,disabled:!1,enforceA:!1,keepScrollPosition:!1,onClick:null,onMouseDown:null,openNewTab:!1,replace:!1,to:""},B.propTypes={children:k().node,className:k().string,disabled:k().bool,enforceA:k().bool,keepScrollPosition:k().bool,onClick:k().func,onMouseDown:k().func,openNewTab:k().bool,replace:k().bool,routerLinkType:k().elementType.isRequired,to:k().oneOfType([k().object,k().string])};var I=a()("Button",["active","button","disabled"],{button:"E1FNQT",context:"KM0v4f",ad:"_3jm1-Q",hoc:"_0plpDL",active:"MAe9O6",disabled:"Br9IWV"})(K);K.defaultProps={active:!1,children:void 0,disabled:!1,enforceA:!1,onClick:void 0,onMouseDown:void 0,openNewTab:!1,replace:!1,to:void 0},K.propTypes={active:k().bool,children:k().node,disabled:k().bool,enforceA:k().bool,onClick:k().func,onMouseDown:k().func,openNewTab:k().bool,replace:k().bool,theme:I.themeType.isRequired,to:k().oneOfType([k().object,k().string])};var z=I;function Y(e){var r=e.checked,t=e.label,n=e.onChange,o=e.theme;return(0,M.jsxs)("div",{className:o.container,children:[void 0===t?null:(0,M.jsx)("p",{className:o.label,children:t}),(0,M.jsx)("input",{checked:r,className:o.checkbox,onChange:n,type:"checkbox"})]})}var G=a()("Checkbox",["checkbox","container","label"],{checkbox:"A-f8qJ",context:"dNQcC6",ad:"earXxa",hoc:"qAPfQ6",container:"Kr0g3M",label:"_3dML-O"})(Y);Y.propTypes={checked:k().bool,label:k().string,onChange:k().func,theme:G.themeType.isRequired},Y.defaultProps={checked:void 0,label:void 0,onChange:void 0};var H=G,F=__webpack_require__(111),V=__webpack_require__.n(F);function Q(e){V().hydrate((0,M.jsx)(T.GlobalStateProvider,{initialState:window.ISTATE,children:(0,M.jsx)(C.BrowserRouter,{children:(0,M.jsx)(e,{})})}),document.getElementById("react-view"))}var J,Z=__webpack_require__(673),$=__webpack_require__.n(Z),ee=["chunkName","getComponentAsync","placeholder"];function re(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function te(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?re(Object(t),!0).forEach((function(r){q()(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):re(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}try{J=l&&f.requireWeak("".concat("/","/ServerSide"))}catch(e){J=void 0}J||(J=function(e){var r=e.chunkName,t=e.getComponentAsync,n=e.placeholder,o=L()(e,ee),i=(0,D.useRef)({pendingStyles:[],renderInitialized:!1,stylesInitialized:!1}).current,a=p().publicPath;i.stylesInitialized||(i.stylesInitialized=!0,window.CHUNK_GROUPS[r].forEach((function(e){if(e.endsWith(".css")){var t="".concat(a,"/").concat(e),n=document.querySelector('link[href="'.concat(t,'"]'));if(!n){(n=document.createElement("link")).setAttribute("href",t),n.setAttribute("rel","stylesheet");var o=w();n.onload=o.resolve,i.pendingStyles.push(o),document.querySelector("head").appendChild(n)}n.dependants?n.dependants.add(r):n.dependants=new Set([r])}})));var c=(0,T.useAsyncData)("dr_pogodin_react_utils___split_components.".concat(r),t,{maxage:v.YEAR_MS}).data,_=function(){var e=c.default||c;return(0,M.jsx)("div",{"data-chunk-name":r,children:(0,M.jsx)(e,te({},o))})},l=(0,D.useState)((function(){if(c&&!i.pendingStyles.length)return i.renderInitialized=!0,_();var e=document.querySelector("[data-chunk-name=".concat(r,"]"));if(e)return(0,M.jsx)("div",{dangerouslySetInnerHTML:{__html:e.innerHTML||""},"data-chunk-name":r});var t=n||function(){return null};return(0,M.jsx)("div",{children:(0,M.jsx)(t,{})})})),u=$()(l,2),s=u[0],d=u[1];return c&&!i.renderInitialized&&(i.renderInitialized=!0,Promise.all(i.pendingStyles).then((function(){i.stylesInitialized&&d(_())}))),(0,D.useEffect)((function(){return function(){i.stylesInitialized=!1,window.CHUNK_GROUPS[r].forEach((function(e){if(e.endsWith(".css")){var t="".concat(a,"/").concat(e),n=document.querySelector('link[href="'.concat(t,'"]'));n.dependants.delete(r),n.dependants.size||document.querySelector("head").removeChild(n)}}))}}),[r,i,a]),s});var ne=J,oe=__webpack_require__(467);function ie(e){for(var r=e.filter,t=e.label,n=e.onChange,o=e.options,i=e.theme,a=e.value,c=[(0,M.jsx)("option",{className:i.hiddenOption,children:"‌"},"__reactUtilsHiddenOption")],_=0;_<o.length;++_){var l=o[_];r&&!r(l)||((0,oe.isString)(l)&&(l={value:l}),c.push((0,M.jsx)("option",{className:i.option,value:l.value,children:void 0===l.name?l.value:l.name},l.value)))}return(0,M.jsxs)("div",{className:i.container,children:[void 0===t?null:(0,M.jsx)("p",{className:i.label,children:t}),(0,M.jsx)("select",{className:i.select,onChange:n,value:a,children:c}),(0,M.jsx)("div",{className:i.arrow,children:"▼"})]})}var ae=a()("Dropdown",["arrow","container","hiddenOption","label","option","select"],{arrow:"-zPK7Y",context:"haRIry",ad:"D4XHG2",hoc:"N3nd34",container:"_9CQpeA",label:"Gv0kyu",hiddenOption:"RdW3yR",select:"JXK1uw"})(ie);ie.propTypes={filter:k().func,label:k().string,onChange:k().func,options:k().arrayOf(k().oneOfType([k().shape({name:k().node,value:k().string.isRequired}),k().string]).isRequired),theme:ae.themeType.isRequired,value:k().string},ie.defaultProps={filter:void 0,label:void 0,onChange:void 0,options:[],value:void 0};var ce=ae,_e=["label","theme"];function le(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function ue(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?le(Object(t),!0).forEach((function(r){q()(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):le(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function se(e){var r=e.label,t=e.theme,n=L()(e,_e);return(0,M.jsxs)("div",{className:t.container,children:[void 0===r?null:(0,M.jsx)("p",{className:t.label,children:r}),(0,M.jsx)("input",ue({className:t.input},n))]})}var pe=a()("Input",["container","input","label"],{container:"Cxx397",context:"X5WszA",ad:"_8s7GCr",hoc:"TVlBYc",input:"M07d4s",label:"gfbdq-"})(se);se.propTypes={label:k().string,theme:pe.themeType.isRequired},se.defaultProps={label:void 0};var de=pe;function fe(e){var r=e.children,t=e.leftSidePanelContent,n=e.rightSidePanelContent,o=e.theme;return(0,M.jsxs)("div",{className:o.container,children:[(0,M.jsx)("div",{className:[o.sidePanel,o.leftSidePanel].join(" "),children:t}),(0,M.jsx)("div",{className:o.mainPanel,children:r}),(0,M.jsx)("div",{className:[o.sidePanel,o.rightSidePanel].join(" "),children:n})]})}var be=a()("PageLayout",["container","leftSidePanel","mainPanel","rightSidePanel","sidePanel"],{container:"T3cuHB",context:"m4mL-M",ad:"m3-mdC",hoc:"J15Z4H",mainPanel:"pPlQO2",sidePanel:"lqNh4h"})(fe);fe.propTypes={children:k().node,leftSidePanelContent:k().node,rightSidePanelContent:k().node,theme:be.themeType.isRequired},fe.defaultProps={children:null,leftSidePanelContent:null,rightSidePanelContent:null};var he=be,me=__webpack_require__(383),ve=(0,D.createContext)();function Ee(e){var r=e.children,t=e.description,n=e.image,o=e.siteName,i=e.socialDescription,a=e.socialTitle,c=e.title,_=e.url,l=a||c,u=i||t,s=(0,D.useMemo)((function(){return{description:t,image:n,siteName:o,socialDescription:i,socialTitle:a,title:c,url:_}}),[t,n,o,i,a,c,_]);return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(me.Helmet,{children:[(0,M.jsx)("title",{children:c}),(0,M.jsx)("meta",{name:"description",content:t}),(0,M.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,M.jsx)("meta",{name:"twitter:title",content:l}),(0,M.jsx)("meta",{name:"twitter:description",content:u}),n?(0,M.jsx)("meta",{name:"twitter:image",content:n}):null,o?(0,M.jsx)("meta",{name:"twitter:site",content:"@".concat(o)}):null,(0,M.jsx)("meta",{name:"og:title",content:l}),n?(0,M.jsx)("meta",{name:"og:image",content:n}):null,n?(0,M.jsx)("meta",{name:"og:image:alt",content:l}):null,(0,M.jsx)("meta",{name:"og:description",content:u}),o?(0,M.jsx)("meta",{name:"og:sitename",content:o}):null,_?(0,M.jsx)("meta",{name:"og:url",content:_}):null]}),r?(0,M.jsx)(ve.Provider,{value:s,children:r}):null]})}function ye(e){var r=e.children,t=e.onCancel,n=e.theme,o=(0,D.useRef)(),i=(0,D.useRef)(),a=(0,D.useState)(),c=$()(a,2),_=c[0],l=c[1];(0,D.useEffect)((function(){var e=document.createElement("div");return document.body.classList.add("scrolling-disabled-by-modal"),document.body.appendChild(e),l(e),function(){document.body.classList.remove("scrolling-disabled-by-modal"),document.body.removeChild(e)}}),[]);var u=(0,D.useMemo)((function(){return(0,M.jsx)("div",{onFocus:function(){for(var e=o.current.querySelectorAll("*"),r=e.length-1;r>=0;--r)if(e[r].focus(),document.activeElement===e[r])return;i.current.focus()},tabIndex:"0"})}),[]);return _?V().createPortal((0,M.jsxs)(M.Fragment,{children:[u,(0,M.jsx)("div",{"aria-label":"Cancel",className:n.overlay,onClick:function(){return t()},onKeyDown:function(e){"Escape"===e.key&&t()},ref:function(e){e&&e!==i.current&&(i.current=e,e.focus())},role:"button",tabIndex:"0"}),(0,M.jsx)("div",{"aria-modal":"true",className:n.container,onWheel:function(e){return e.stopPropagation()},ref:o,role:"dialog",children:r}),(0,M.jsx)("div",{onFocus:function(){i.current.focus()},tabIndex:"0"}),u]}),_):null}Ee.Context=ve,Ee.defaultProps={children:null,image:null,siteName:null,socialDescription:null,socialTitle:null,url:null},Ee.propTypes={children:k().node,description:k().string.isRequired,image:k().string,siteName:k().string,socialDescription:k().string,socialTitle:k().string,title:k().string.isRequired,url:k().string};var we=a()("Modal",["container","overlay"],{overlay:"ye2BZo",context:"Szmbbz",ad:"Ah-Nsc",hoc:"Wki41G",container:"gyZ4rc"})(ye);ye.propTypes={onCancel:k().func,children:k().node,theme:we.themeType.isRequired},ye.defaultProps={onCancel:oe.noop,children:null};var Oe=we;function ge(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function Pe(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ge(Object(t),!0).forEach((function(r){q()(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ge(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function je(e){return(0,M.jsx)(B,Pe(Pe({},e),{},{routerLinkType:C.NavLink}))}function xe(e){var r=e.children,t=e.className,n=e.ratio.split(":"),o="".concat(100*n[1]/n[0],"%"),i=(0,M.jsx)("div",{style:{paddingBottom:o},className:"EznFz3",children:(0,M.jsx)("div",{className:"_0vb7tq",children:r})});return t?(0,M.jsx)("div",{className:t,children:i}):i}function ke(e){var r=e.theme;return(0,M.jsxs)("div",{className:(r.container?r.container+" ":"")+"_7zdld4",children:[(0,M.jsx)("div",{className:(r.circle?r.circle+" ":"")+"dBrB4g"}),(0,M.jsx)("div",{className:(r.circle?r.circle+" ":"")+"dBrB4g"}),(0,M.jsx)("div",{className:(r.circle?r.circle+" ":"")+"dBrB4g"})]})}xe.defaultProps={children:null,className:null,ratio:"1:1"},xe.propTypes={children:k().node,className:k().string,ratio:k().string},ke.defaultProps={theme:{}},ke.propTypes={theme:k().shape({container:k().string,circle:k().string})};var Te=a()("Throbber",["circle","container"],{container:"_7zdld4",context:"uIObt7",ad:"XIxe9o",hoc:"YOyORH",circle:"dBrB4g",bouncing:"TJe-6j"})(ke),Ae={ABOVE_CURSOR:"ABOVE_CURSOR",ABOVE_ELEMENT:"ABOVE_ELEMENT",BELOW_CURSOR:"BELOW_CURSOR",BELOW_ELEMENT:"BELOW_ELEMENT"},qe=["border-bottom-color:transparent","border-left-color:transparent","border-right-color:transparent"].join(";"),Ce=["border-top-color:transparent","border-left-color:transparent","border-right-color:transparent"].join(";");var Ne=(0,D.forwardRef)((function(e,r){var t=e.children,n=e.theme,o=(0,D.useState)(null),i=$()(o,2),a=i[0],c=i[1],_=function(e,r,t,n){return a&&function(e,r,t,n,o){var i,a,c,_,l,u=function(e){return{arrow:e.arrow.getBoundingClientRect(),container:e.container.getBoundingClientRect()}}(o),s=(a=(i=window).pageXOffset,c=i.pageYOffset,l=(_=document.documentElement).clientHeight,{left:a,right:a+_.clientWidth,top:c,bottom:c+l}),p=function(e,r,t){var n=t.arrow,o=t.container;return{arrowX:.5*(o.width-n.width),arrowY:o.height,containerX:e-o.width/2,containerY:r-o.height-n.height/1.5,baseArrowStyle:qe}}(e,r,u);if(p.containerX<s.left+6)p.containerX=s.left+6,p.arrowX=Math.max(6,e-p.containerX-u.arrow.width/2);else{var d=s.right-6-u.container.width;p.containerX>d&&(p.containerX=d,p.arrowX=Math.min(u.container.width-6,e-p.containerX-u.arrow.width/2))}p.containerY<s.top+6&&(p.containerY+=u.container.height+2*u.arrow.height,p.arrowY-=u.container.height+u.arrow.height,p.baseArrowStyle=Ce);var f="left:".concat(p.containerX,"px;top:").concat(p.containerY,"px");o.container.setAttribute("style",f);var b="".concat(p.baseArrowStyle,";left:").concat(p.arrowX,"px;top:").concat(p.arrowY,"px");o.arrow.setAttribute("style",b)}(e,r,0,0,a)};return(0,D.useImperativeHandle)(r,(function(){return{pointTo:_}})),(0,D.useEffect)((function(){var e=function(e){var r=document.createElement("div");e.arrow&&r.setAttribute("class",e.arrow);var t=document.createElement("div");e.content&&t.setAttribute("class",e.content);var n=document.createElement("div");return e.container&&n.setAttribute("class",e.container),n.appendChild(r),n.appendChild(t),document.body.appendChild(n),{container:n,arrow:r,content:t}}(n);return c(e),function(){document.body.removeChild(e.container),c(null)}}),[n]),a?(0,F.createPortal)(t,a.content):null}));Ne.propTypes={children:k().node,theme:k().shape().isRequired},Ne.defaultProps={children:null};var Le=Ne;function De(e){var r=e.children,t=e.placement,n=e.tip,o=e.theme,i=(0,D.useRef)(),a=(0,D.useRef)(),c=(0,D.useState)(!1),_=$()(c,2),l=_[0],u=_[1];return(0,D.useEffect)((function(){if(l&&null!==n){var e=function(){return u(!1)};return window.addEventListener("scroll",e),function(){return window.removeEventListener("scroll",e)}}}),[l,n]),(0,M.jsxs)("div",{className:o.wrapper,onMouseLeave:function(){return u(!1)},onMouseMove:function(e){return function(e,r){if(l){var n=a.current.getBoundingClientRect();e<n.left||e>n.right||r<n.top||r>n.bottom?u(!1):i.current&&i.current.pointTo(e+window.pageXOffset,r+window.pageYOffset,t,a.current)}else u(!0)}(e.clientX,e.clientY)},ref:a,children:[l&&null!==n?(0,M.jsx)(Le,{ref:i,theme:o,children:n}):null,r]})}var Me=a()("WithTooltip",["appearance","arrow","container","content","wrapper"],{arrow:"M9gywF",ad:"_4xT7zE",hoc:"zd-vnH",context:"GdZucr",container:"f9gY8K",appearance:"L4ubm-",wrapper:"_4qDBRM"})(De);Me.PLACEMENTS=Ae,De.propTypes={children:k().node,placement:k().oneOf(Object.values(Ae)),theme:Me.themeType.isRequired,tip:k().node},De.defaultProps={children:null,placement:Ae.ABOVE_CURSOR,tip:null};var Re=Me,Se=__webpack_require__(656),Be=__webpack_require__.n(Se),We={container:"jTxmOX",context:"dzIcLh",ad:"_5a9XX1",hoc:"_7sH52O"};function Ue(e){var r=e.autoplay,t=e.src,n=e.theme,o=e.title,i=t.split("?"),a=$()(i,2),c=a[0],_=a[1],l=(_=_?Be().parse(_):{}).v||c.match(/\/([a-zA-Z0-9-_]*)$/)[1];return c="https://www.youtube.com/embed/".concat(l),delete _.v,_.autoplay=r?1:0,c+="?".concat(Be().stringify(_)),(0,M.jsxs)(xe,{className:n.container,ratio:"16:9",children:[(0,M.jsx)(Te,{theme:We}),(0,M.jsx)("iframe",{allow:"autoplay",allowFullScreen:!0,className:n.video,src:c,title:o})]})}var Xe=a()("YouTubeVideo",["container","video"],{container:"sXHM81",context:"veKyYi",ad:"r3ABzd",hoc:"YKcPnR",video:"SlV2zw"})(Ue);Ue.propTypes={autoplay:k().bool,src:k().string.isRequired,theme:Xe.themeType.isRequired,title:k().string},Ue.defaultProps={autoplay:!1,title:""};var Ke=Xe,Ie=null;if(l)try{var ze=f.requireWeak("path");Ie=f.requireWeak(ze.resolve("/","./server"))}catch(e){Ie=null}}(),__webpack_exports__}()}));
3
3
  //# sourceMappingURL=web.bundle.js.map