g(x,c))a[d]=x,a[n]=c,d=n;else break a}}return b}\nfunction g(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}if(\"object\"===typeof performance&&\"function\"===typeof performance.now){var l=performance;exports.unstable_now=function(){return l.now()}}else{var p=Date,q=p.now();exports.unstable_now=function(){return p.now()-q}}var r=[],t=[],u=1,v=null,y=3,z=!1,A=!1,B=!1,D=\"function\"===typeof setTimeout?setTimeout:null,E=\"function\"===typeof clearTimeout?clearTimeout:null,F=\"undefined\"!==typeof setImmediate?setImmediate:null;\n\"undefined\"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function G(a){for(var b=h(t);null!==b;){if(null===b.callback)k(t);else if(b.startTime<=a)k(t),b.sortIndex=b.expirationTime,f(r,b);else break;b=h(t)}}function H(a){B=!1;G(a);if(!A)if(null!==h(r))A=!0,I(J);else{var b=h(t);null!==b&&K(H,b.startTime-a)}}\nfunction J(a,b){A=!1;B&&(B=!1,E(L),L=-1);z=!0;var c=y;try{G(b);for(v=h(r);null!==v&&(!(v.expirationTime>b)||a&&!M());){var d=v.callback;if(\"function\"===typeof d){v.callback=null;y=v.priorityLevel;var e=d(v.expirationTime<=b);b=exports.unstable_now();\"function\"===typeof e?v.callback=e:v===h(r)&&k(r);G(b)}else k(r);v=h(r)}if(null!==v)var w=!0;else{var m=h(t);null!==m&&K(H,m.startTime-b);w=!1}return w}finally{v=null,y=c,z=!1}}var N=!1,O=null,L=-1,P=5,Q=-1;\nfunction M(){return exports.unstable_now()-Qa||125d?(a.sortIndex=c,f(t,a),null===h(r)&&a===h(t)&&(B?(E(L),L=-1):B=!0,K(H,c-d))):(a.sortIndex=e,f(r,a),A||z||(A=!0,I(J)));return a};\nexports.unstable_shouldYield=M;exports.unstable_wrapCallback=function(a){var b=y;return function(){var c=y;y=b;try{return a.apply(this,arguments)}finally{y=c}}};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/scheduler.production.min.js');\n} else {\n module.exports = require('./cjs/scheduler.development.js');\n}\n","/**\n * The unique id is used for unique hashes.\n */\nlet uniqueId = 0;\n/**\n * Quick dictionary lookup for unit-less numbers.\n */\nconst CSS_NUMBER = Object.create(null);\n/**\n * CSS properties that are valid unit-less numbers.\n *\n * Ref: https://github.com/facebook/react/blob/master/packages/react-dom/src/shared/CSSProperty.js\n */\nconst CSS_NUMBER_KEYS = [\n \"animation-iteration-count\",\n \"border-image-outset\",\n \"border-image-slice\",\n \"border-image-width\",\n \"box-flex\",\n \"box-flex-group\",\n \"box-ordinal-group\",\n \"column-count\",\n \"columns\",\n \"counter-increment\",\n \"counter-reset\",\n \"flex\",\n \"flex-grow\",\n \"flex-positive\",\n \"flex-shrink\",\n \"flex-negative\",\n \"flex-order\",\n \"font-weight\",\n \"grid-area\",\n \"grid-column\",\n \"grid-column-end\",\n \"grid-column-span\",\n \"grid-column-start\",\n \"grid-row\",\n \"grid-row-end\",\n \"grid-row-span\",\n \"grid-row-start\",\n \"line-clamp\",\n \"line-height\",\n \"opacity\",\n \"order\",\n \"orphans\",\n \"tab-size\",\n \"widows\",\n \"z-index\",\n \"zoom\",\n // SVG properties.\n \"fill-opacity\",\n \"flood-opacity\",\n \"stop-opacity\",\n \"stroke-dasharray\",\n \"stroke-dashoffset\",\n \"stroke-miterlimit\",\n \"stroke-opacity\",\n \"stroke-width\"\n];\n// Add vendor prefixes to all unit-less properties.\nfor (const property of CSS_NUMBER_KEYS) {\n for (const prefix of [\"-webkit-\", \"-ms-\", \"-moz-\", \"-o-\", \"\"]) {\n CSS_NUMBER[prefix + property] = true;\n }\n}\n/**\n * Escape a CSS class name.\n */\nfunction escape(str) {\n return str.replace(/[ !#$%&()*+,./;<=>?@[\\]^`{|}~\"'\\\\]/g, \"\\\\$&\");\n}\n/**\n * Transform a JavaScript property into a CSS property.\n */\nfunction hyphenate(propertyName) {\n return propertyName\n .replace(/[A-Z]/g, (m) => `-${m.toLowerCase()}`)\n .replace(/^ms-/, \"-ms-\"); // Internet Explorer vendor prefix.\n}\n/**\n * Generate a hash value from a string.\n */\nfunction stringHash(str) {\n let value = 5381;\n let len = str.length;\n while (len--)\n value = (value * 33) ^ str.charCodeAt(len);\n return (value >>> 0).toString(36);\n}\n/**\n * Transform a style string to a CSS string.\n */\nfunction styleToString(key, value) {\n if (value && typeof value === \"number\" && !CSS_NUMBER[key]) {\n return `${key}:${value}px`;\n }\n return `${key}:${value}`;\n}\n/**\n * Sort an array of tuples by first value.\n */\nfunction sortTuples(value) {\n return value.sort((a, b) => (a[0] > b[0] ? 1 : -1));\n}\n/**\n * Categorize user styles.\n */\nfunction parseStyles(styles, hasNestedStyles) {\n const properties = [];\n const nestedStyles = [];\n // Sort keys before adding to styles.\n for (const key of Object.keys(styles)) {\n const name = key.trim();\n const value = styles[key];\n if (name.charCodeAt(0) !== 36 /* $ */ && value != null) {\n if (typeof value === \"object\" && !Array.isArray(value)) {\n nestedStyles.push([name, value]);\n }\n else {\n properties.push([hyphenate(name), value]);\n }\n }\n }\n return {\n style: stringifyProperties(sortTuples(properties)),\n nested: hasNestedStyles ? nestedStyles : sortTuples(nestedStyles),\n isUnique: !!styles.$unique\n };\n}\n/**\n * Stringify an array of property tuples.\n */\nfunction stringifyProperties(properties) {\n return properties\n .map(([name, value]) => {\n if (!Array.isArray(value))\n return styleToString(name, value);\n return value.map(x => styleToString(name, x)).join(\";\");\n })\n .join(\";\");\n}\n/**\n * Interpolate CSS selectors.\n */\nfunction interpolate(selector, parent) {\n if (selector.indexOf(\"&\") === -1)\n return `${parent} ${selector}`;\n return selector.replace(/&/g, parent);\n}\n/**\n * Recursive loop building styles with deferred selectors.\n */\nfunction stylize(selector, styles, rulesList, stylesList, parent) {\n const { style, nested, isUnique } = parseStyles(styles, selector !== \"\");\n let pid = style;\n if (selector.charCodeAt(0) === 64 /* @ */) {\n const child = {\n selector,\n styles: [],\n rules: [],\n style: parent ? \"\" : style\n };\n rulesList.push(child);\n // Nested styles support (e.g. `.foo > @media > .bar`).\n if (style && parent) {\n child.styles.push({ selector: parent, style, isUnique });\n }\n for (const [name, value] of nested) {\n pid += name + stylize(name, value, child.rules, child.styles, parent);\n }\n }\n else {\n const key = parent ? interpolate(selector, parent) : selector;\n if (style)\n stylesList.push({ selector: key, style, isUnique });\n for (const [name, value] of nested) {\n pid += name + stylize(name, value, rulesList, stylesList, key);\n }\n }\n return pid;\n}\n/**\n * Transform `stylize` tree into style objects.\n */\nfunction composeStylize(cache, pid, rulesList, stylesList, className, isStyle) {\n for (const { selector, style, isUnique } of stylesList) {\n const key = isStyle ? interpolate(selector, className) : selector;\n const id = isUnique\n ? `u\\0${(++uniqueId).toString(36)}`\n : `s\\0${pid}\\0${style}`;\n const item = new Style(style, id);\n item.add(new Selector(key, `k\\0${pid}\\0${key}`));\n cache.add(item);\n }\n for (const { selector, style, rules, styles } of rulesList) {\n const item = new Rule(selector, style, `r\\0${pid}\\0${selector}\\0${style}`);\n composeStylize(item, pid, rules, styles, className, isStyle);\n cache.add(item);\n }\n}\n/**\n * Cache to list to styles.\n */\nfunction join(arr) {\n let res = \"\";\n for (let i = 0; i < arr.length; i++)\n res += arr[i];\n return res;\n}\n/**\n * Noop changes.\n */\nconst noopChanges = {\n add: () => undefined,\n change: () => undefined,\n remove: () => undefined\n};\n/**\n * Implement a cache/event emitter.\n */\nexport class Cache {\n constructor(changes = noopChanges) {\n this.changes = changes;\n this.sheet = [];\n this.changeId = 0;\n this._keys = [];\n this._children = Object.create(null);\n this._counters = Object.create(null);\n }\n add(style) {\n const count = this._counters[style.id] || 0;\n const item = this._children[style.id] || style.clone();\n this._counters[style.id] = count + 1;\n if (count === 0) {\n this._children[item.id] = item;\n this._keys.push(item.id);\n this.sheet.push(item.getStyles());\n this.changeId++;\n this.changes.add(item, this._keys.length - 1);\n }\n else if (item instanceof Cache && style instanceof Cache) {\n const curIndex = this._keys.indexOf(style.id);\n const prevItemChangeId = item.changeId;\n item.merge(style);\n if (item.changeId !== prevItemChangeId) {\n this.sheet.splice(curIndex, 1, item.getStyles());\n this.changeId++;\n this.changes.change(item, curIndex, curIndex);\n }\n }\n }\n remove(style) {\n const count = this._counters[style.id];\n if (count) {\n this._counters[style.id] = count - 1;\n const item = this._children[style.id];\n const index = this._keys.indexOf(item.id);\n if (count === 1) {\n delete this._counters[style.id];\n delete this._children[style.id];\n this._keys.splice(index, 1);\n this.sheet.splice(index, 1);\n this.changeId++;\n this.changes.remove(item, index);\n }\n else if (item instanceof Cache && style instanceof Cache) {\n const prevChangeId = item.changeId;\n item.unmerge(style);\n if (item.changeId !== prevChangeId) {\n this.sheet.splice(index, 1, item.getStyles());\n this.changeId++;\n this.changes.change(item, index, index);\n }\n }\n }\n }\n values() {\n return this._keys.map(key => this._children[key]);\n }\n merge(cache) {\n for (const item of cache.values())\n this.add(item);\n return this;\n }\n unmerge(cache) {\n for (const item of cache.values())\n this.remove(item);\n return this;\n }\n clone() {\n return new Cache().merge(this);\n }\n}\n/**\n * Selector is a dumb class made to represent nested CSS selectors.\n */\nexport class Selector {\n constructor(selector, id) {\n this.selector = selector;\n this.id = id;\n }\n getStyles() {\n return this.selector;\n }\n clone() {\n return this;\n }\n}\n/**\n * The style container registers a style string with selectors.\n */\nexport class Style extends Cache {\n constructor(style, id) {\n super();\n this.style = style;\n this.id = id;\n }\n getStyles() {\n return `${this.sheet.join(\",\")}{${this.style}}`;\n }\n clone() {\n return new Style(this.style, this.id).merge(this);\n }\n}\n/**\n * Implement rule logic for style output.\n */\nexport class Rule extends Cache {\n constructor(rule, style, id) {\n super();\n this.rule = rule;\n this.style = style;\n this.id = id;\n }\n getStyles() {\n return `${this.rule}{${this.style}${join(this.sheet)}}`;\n }\n clone() {\n return new Rule(this.rule, this.style, this.id).merge(this);\n }\n}\nfunction key(pid, styles) {\n const key = `f${stringHash(pid)}`;\n if (process.env.NODE_ENV === \"production\" || !styles.$displayName)\n return key;\n return `${styles.$displayName}_${key}`;\n}\n/**\n * The FreeStyle class implements the API for everything else.\n */\nexport class FreeStyle extends Cache {\n constructor(id, changes) {\n super(changes);\n this.id = id;\n }\n registerStyle(styles) {\n const rulesList = [];\n const stylesList = [];\n const pid = stylize(\"&\", styles, rulesList, stylesList);\n const id = key(pid, styles);\n const selector = `.${process.env.NODE_ENV === \"production\" ? id : escape(id)}`;\n composeStylize(this, pid, rulesList, stylesList, selector, true);\n return id;\n }\n registerKeyframes(keyframes) {\n return this.registerHashRule(\"@keyframes\", keyframes);\n }\n registerHashRule(prefix, styles) {\n const rulesList = [];\n const stylesList = [];\n const pid = stylize(\"\", styles, rulesList, stylesList);\n const id = key(pid, styles);\n const selector = `${prefix} ${process.env.NODE_ENV === \"production\" ? id : escape(id)}`;\n const rule = new Rule(selector, \"\", `h\\0${pid}\\0${prefix}`);\n composeStylize(rule, pid, rulesList, stylesList, \"\", false);\n this.add(rule);\n return id;\n }\n registerRule(rule, styles) {\n const rulesList = [];\n const stylesList = [];\n const pid = stylize(rule, styles, rulesList, stylesList);\n composeStylize(this, pid, rulesList, stylesList, \"\", false);\n }\n registerCss(styles) {\n return this.registerRule(\"\", styles);\n }\n getStyles() {\n return join(this.sheet);\n }\n clone() {\n return new FreeStyle(this.id, this.changes).merge(this);\n }\n}\n/**\n * Exports a simple function to create a new instance.\n */\nexport function create(changes) {\n return new FreeStyle(`f${(++uniqueId).toString(36)}`, changes);\n}\n//# sourceMappingURL=index.js.map","/**\n * We need to do the following to *our* objects before passing to freestyle:\n * - For any `$nest` directive move up to FreeStyle style nesting\n * - For any `$unique` directive map to FreeStyle Unique\n * - For any `$debugName` directive return the debug name\n */\nexport function convertToStyles(object) {\n /** The final result we will return */\n var styles = {};\n for (var key in object) {\n /** Grab the value upfront */\n var val = object[key];\n /** TypeStyle configuration options */\n if (key === '$nest') {\n var nested = val;\n for (var selector in nested) {\n var subproperties = nested[selector];\n styles[selector] = convertToStyles(subproperties);\n }\n }\n else if (key === '$debugName') {\n styles.$displayName = val;\n }\n else {\n styles[key] = val;\n }\n }\n return styles;\n}\n// todo: better name here\nexport function convertToKeyframes(frames) {\n var result = {};\n for (var offset in frames) {\n if (offset !== '$debugName') {\n result[offset] = frames[offset];\n }\n }\n if (frames.$debugName) {\n result.$displayName = frames.$debugName;\n }\n return result;\n}\n","/** Raf for node + browser */\nexport var raf = typeof requestAnimationFrame === 'undefined'\n /**\n * Make sure setTimeout is always invoked with\n * `this` set to `window` or `global` automatically\n **/\n ? function (cb) { return setTimeout(cb); }\n /**\n * Make sure window.requestAnimationFrame is always invoked with `this` window\n * We might have raf without window in case of `raf/polyfill` (recommended by React)\n **/\n : typeof window === 'undefined'\n ? requestAnimationFrame\n : requestAnimationFrame.bind(window);\n/**\n * Utility to join classes conditionally\n */\nexport function classes() {\n var classes = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n classes[_i] = arguments[_i];\n }\n return classes\n .map(function (c) { return c && typeof c === 'object' ? Object.keys(c).map(function (key) { return !!c[key] && key; }) : [c]; })\n .reduce(function (flattened, c) { return flattened.concat(c); }, [])\n .filter(function (c) { return !!c; })\n .join(' ');\n}\n/**\n * Merges various styles into a single style object.\n * Note: if two objects have the same property the last one wins\n */\nexport function extend() {\n var objects = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n objects[_i] = arguments[_i];\n }\n /** The final result we will return */\n var result = {};\n for (var _a = 0, objects_1 = objects; _a < objects_1.length; _a++) {\n var object = objects_1[_a];\n if (object == null || object === false) {\n continue;\n }\n for (var key in object) {\n /** Falsy values except a explicit 0 is ignored */\n var val = object[key];\n if (!val && val !== 0) {\n continue;\n }\n /** if nested media or pseudo selector */\n if (key === '$nest' && val) {\n result[key] = result['$nest'] ? extend(result['$nest'], val) : val;\n }\n /** if freestyle sub key that needs merging. We come here due to our recursive calls */\n else if ((key.indexOf('&') !== -1 || key.indexOf('@media') === 0)) {\n result[key] = result[key] ? extend(result[key], val) : val;\n }\n else {\n result[key] = val;\n }\n }\n }\n return result;\n}\n/**\n * Utility to help customize styles with media queries. e.g.\n * ```\n * style(\n * media({maxWidth:500}, {color:'red'})\n * )\n * ```\n */\nexport var media = function (mediaQuery) {\n var _a;\n var objects = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n objects[_i - 1] = arguments[_i];\n }\n var mediaQuerySections = [];\n if (mediaQuery.type)\n mediaQuerySections.push(mediaQuery.type);\n if (mediaQuery.orientation)\n mediaQuerySections.push(\"(orientation: \" + mediaQuery.orientation + \")\");\n if (mediaQuery.minWidth)\n mediaQuerySections.push(\"(min-width: \" + mediaLength(mediaQuery.minWidth) + \")\");\n if (mediaQuery.maxWidth)\n mediaQuerySections.push(\"(max-width: \" + mediaLength(mediaQuery.maxWidth) + \")\");\n if (mediaQuery.minHeight)\n mediaQuerySections.push(\"(min-height: \" + mediaLength(mediaQuery.minHeight) + \")\");\n if (mediaQuery.maxHeight)\n mediaQuerySections.push(\"(max-height: \" + mediaLength(mediaQuery.maxHeight) + \")\");\n var stringMediaQuery = \"@media \" + mediaQuerySections.join(' and ');\n var object = {\n $nest: (_a = {},\n _a[stringMediaQuery] = extend.apply(void 0, objects),\n _a)\n };\n return object;\n};\nvar mediaLength = function (value) {\n return typeof value === 'string' ? value : value + \"px\";\n};\n","import * as FreeStyle from \"free-style\";\nimport { convertToStyles, convertToKeyframes } from './formatting';\nimport { extend, raf } from './utilities';\n/**\n * Creates an instance of free style with our options\n */\nvar createFreeStyle = function () { return FreeStyle.create(); };\n/**\n * Maintains a single stylesheet and keeps it in sync with requested styles\n */\nvar TypeStyle = /** @class */ (function () {\n function TypeStyle(_a) {\n var _this = this;\n var autoGenerateTag = _a.autoGenerateTag;\n /**\n * Insert `raw` CSS as a string. This is useful for e.g.\n * - third party CSS that you are customizing with template strings\n * - generating raw CSS in JavaScript\n * - reset libraries like normalize.css that you can use without loaders\n */\n this.cssRaw = function (mustBeValidCSS) {\n if (!mustBeValidCSS) {\n return;\n }\n _this._raw += mustBeValidCSS || '';\n _this._pendingRawChange = true;\n _this._styleUpdated();\n };\n /**\n * Takes CSSProperties and registers it to a global selector (body, html, etc.)\n */\n this.cssRule = function (selector) {\n var objects = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n objects[_i - 1] = arguments[_i];\n }\n var styles = convertToStyles(extend.apply(void 0, objects));\n _this._freeStyle.registerRule(selector, styles);\n _this._styleUpdated();\n return;\n };\n /**\n * Renders styles to the singleton tag imediately\n * NOTE: You should only call it on initial render to prevent any non CSS flash.\n * After that it is kept sync using `requestAnimationFrame` and we haven't noticed any bad flashes.\n **/\n this.forceRenderStyles = function () {\n var target = _this._getTag();\n if (!target) {\n return;\n }\n target.textContent = _this.getStyles();\n };\n /**\n * Utility function to register an @font-face\n */\n this.fontFace = function () {\n var fontFace = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fontFace[_i] = arguments[_i];\n }\n var freeStyle = _this._freeStyle;\n for (var _a = 0, _b = fontFace; _a < _b.length; _a++) {\n var face = _b[_a];\n freeStyle.registerRule('@font-face', face);\n }\n _this._styleUpdated();\n return;\n };\n /**\n * Allows use to use the stylesheet in a node.js environment\n */\n this.getStyles = function () {\n return (_this._raw || '') + _this._freeStyle.getStyles();\n };\n /**\n * Takes keyframes and returns a generated animationName\n */\n this.keyframes = function (frames) {\n var keyframes = convertToKeyframes(frames);\n // TODO: replace $debugName with display name\n var animationName = _this._freeStyle.registerKeyframes(keyframes);\n _this._styleUpdated();\n return animationName;\n };\n /**\n * Helps with testing. Reinitializes FreeStyle + raw\n */\n this.reinit = function () {\n /** reinit freestyle */\n var freeStyle = createFreeStyle();\n _this._freeStyle = freeStyle;\n _this._lastFreeStyleChangeId = freeStyle.changeId;\n /** reinit raw */\n _this._raw = '';\n _this._pendingRawChange = false;\n /** Clear any styles that were flushed */\n var target = _this._getTag();\n if (target) {\n target.textContent = '';\n }\n };\n /** Sets the target tag where we write the css on style updates */\n this.setStylesTarget = function (tag) {\n /** Clear any data in any previous tag */\n if (_this._tag) {\n _this._tag.textContent = '';\n }\n _this._tag = tag;\n /** This special time buffer immediately */\n _this.forceRenderStyles();\n };\n /**\n * Takes an object where property names are ideal class names and property values are CSSProperties, and\n * returns an object where property names are the same ideal class names and the property values are\n * the actual generated class names using the ideal class name as the $debugName\n */\n this.stylesheet = function (classes) {\n var classNames = Object.getOwnPropertyNames(classes);\n var result = {};\n for (var _i = 0, classNames_1 = classNames; _i < classNames_1.length; _i++) {\n var className = classNames_1[_i];\n var classDef = classes[className];\n if (classDef) {\n classDef.$debugName = className;\n result[className] = _this.style(classDef);\n }\n }\n return result;\n };\n var freeStyle = createFreeStyle();\n this._autoGenerateTag = autoGenerateTag;\n this._freeStyle = freeStyle;\n this._lastFreeStyleChangeId = freeStyle.changeId;\n this._pending = 0;\n this._pendingRawChange = false;\n this._raw = '';\n this._tag = undefined;\n // rebind prototype to TypeStyle. It might be better to do a function() { return this.style.apply(this, arguments)}\n this.style = this.style.bind(this);\n }\n /**\n * Only calls cb all sync operations settle\n */\n TypeStyle.prototype._afterAllSync = function (cb) {\n var _this = this;\n this._pending++;\n var pending = this._pending;\n raf(function () {\n if (pending !== _this._pending) {\n return;\n }\n cb();\n });\n };\n TypeStyle.prototype._getTag = function () {\n if (this._tag) {\n return this._tag;\n }\n if (this._autoGenerateTag) {\n var tag = typeof window === 'undefined'\n ? { textContent: '' }\n : document.createElement('style');\n if (typeof document !== 'undefined') {\n document.head.appendChild(tag);\n }\n this._tag = tag;\n return tag;\n }\n return undefined;\n };\n /** Checks if the style tag needs updating and if so queues up the change */\n TypeStyle.prototype._styleUpdated = function () {\n var _this = this;\n var changeId = this._freeStyle.changeId;\n var lastChangeId = this._lastFreeStyleChangeId;\n if (!this._pendingRawChange && changeId === lastChangeId) {\n return;\n }\n this._lastFreeStyleChangeId = changeId;\n this._pendingRawChange = false;\n this._afterAllSync(function () { return _this.forceRenderStyles(); });\n };\n TypeStyle.prototype.style = function () {\n var className = this._freeStyle.registerStyle(convertToStyles(extend.apply(undefined, arguments)));\n this._styleUpdated();\n return className;\n };\n return TypeStyle;\n}());\nexport { TypeStyle };\n","import { TypeStyle } from './internal/typestyle';\nexport { TypeStyle };\n/**\n * All the CSS types in the 'types' namespace\n */\nimport * as types from './types';\nexport { types };\n/**\n * Export certain utilities\n */\nexport { extend, classes, media } from './internal/utilities';\n/** Zero configuration, default instance of TypeStyle */\nvar ts = new TypeStyle({ autoGenerateTag: true });\n/** Sets the target tag where we write the css on style updates */\nexport var setStylesTarget = ts.setStylesTarget;\n/**\n * Insert `raw` CSS as a string. This is useful for e.g.\n * - third party CSS that you are customizing with template strings\n * - generating raw CSS in JavaScript\n * - reset libraries like normalize.css that you can use without loaders\n */\nexport var cssRaw = ts.cssRaw;\n/**\n * Takes CSSProperties and registers it to a global selector (body, html, etc.)\n */\nexport var cssRule = ts.cssRule;\n/**\n * Renders styles to the singleton tag imediately\n * NOTE: You should only call it on initial render to prevent any non CSS flash.\n * After that it is kept sync using `requestAnimationFrame` and we haven't noticed any bad flashes.\n **/\nexport var forceRenderStyles = ts.forceRenderStyles;\n/**\n * Utility function to register an @font-face\n */\nexport var fontFace = ts.fontFace;\n/**\n * Allows use to use the stylesheet in a node.js environment\n */\nexport var getStyles = ts.getStyles;\n/**\n * Takes keyframes and returns a generated animationName\n */\nexport var keyframes = ts.keyframes;\n/**\n * Helps with testing. Reinitializes FreeStyle + raw\n */\nexport var reinit = ts.reinit;\n/**\n * Takes CSSProperties and return a generated className you can use on your component\n */\nexport var style = ts.style;\n/**\n * Takes an object where property names are ideal class names and property values are CSSProperties, and\n * returns an object where property names are the same ideal class names and the property values are\n * the actual generated class names using the ideal class name as the $debugName\n */\nexport var stylesheet = ts.stylesheet;\n/**\n * Creates a new instance of TypeStyle separate from the default instance.\n *\n * - Use this for creating a different typestyle instance for a shadow dom component.\n * - Use this if you don't want an auto tag generated and you just want to collect the CSS.\n *\n * NOTE: styles aren't shared between different instances.\n */\nexport function createTypeStyle(target) {\n var instance = new TypeStyle({ autoGenerateTag: false });\n if (target) {\n instance.setStylesTarget(target);\n }\n return instance;\n}\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nvar warning = function() {};\n\nif (__DEV__) {\n var printWarning = function printWarning(format, args) {\n var len = arguments.length;\n args = new Array(len > 1 ? len - 1 : 0);\n for (var key = 1; key < len; key++) {\n args[key - 1] = arguments[key];\n }\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n }\n\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n if (!condition) {\n printWarning.apply(null, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;\n","import * as React from \"react\";\n\nfunction isShallowEqual(object1, object2) {\n const keys1 = Object.keys(object1);\n const keys2 = Object.keys(object2);\n\n if (keys1.length !== keys2.length) {\n return false;\n }\n\n for (let key of keys1) {\n if (object1[key] !== object2[key]) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction isTouchEvent({ nativeEvent }) {\n return window.TouchEvent\n ? nativeEvent instanceof TouchEvent\n : \"touches\" in nativeEvent;\n}\n\nfunction isMouseEvent(event) {\n return event.nativeEvent instanceof MouseEvent;\n}\n\nfunction throttle(cb, ms) {\n let lastTime = 0;\n return () => {\n const now = Date.now();\n if (now - lastTime >= ms) {\n cb();\n lastTime = now;\n }\n };\n}\n\nexport function useBattery() {\n const [state, setState] = React.useState({\n supported: true,\n loading: true,\n level: null,\n charging: null,\n chargingTime: null,\n dischargingTime: null\n });\n\n React.useEffect(() => {\n if (!navigator.getBattery) {\n setState((s) => ({\n ...s,\n supported: false,\n loading: false\n }));\n return\n }\n\n let battery = null;\n\n const handleChange = () => {\n setState({\n supported: true,\n loading: false,\n level: battery.level,\n charging: battery.charging,\n chargingTime: battery.chargingTime,\n dischargingTime: battery.dischargingTime\n });\n };\n\n navigator.getBattery().then((b) => {\n battery = b;\n handleChange();\n\n b.addEventListener(\"levelchange\", handleChange);\n b.addEventListener(\"chargingchange\", handleChange);\n b.addEventListener(\"chargingtimechange\", handleChange);\n b.addEventListener(\"dischargingtimechange\", handleChange);\n });\n\n return () => {\n if (battery) {\n battery.removeEventListener(\"levelchange\", handleChange);\n battery.removeEventListener(\"chargingchange\", handleChange);\n battery.removeEventListener(\"chargingtimechange\", handleChange);\n battery.removeEventListener(\"dischargingtimechange;\", handleChange);\n }\n };\n }, []);\n\n return state;\n}\n\nexport function useClickAway(cb) {\n const ref = React.useRef(null);\n const refCb = React.useRef(cb);\n\n React.useEffect(() => {\n const handler = (e) => {\n const element = ref.current;\n if (element && !element.contains(e.target)) {\n refCb.current(e);\n }\n };\n\n document.addEventListener(\"mousedown\", handler);\n document.addEventListener(\"touchstart\", handler);\n\n return () => {\n document.removeEventListener(\"mousedown\", handler);\n document.removeEventListener(\"touchstart\", handler);\n };\n }, []);\n\n return ref;\n}\n\nexport function useCopyToClipboard() {\n const [state, setState] = React.useState({\n error: null,\n text: null\n });\n\n const copyToClipboard = React.useCallback(async (value) => {\n if (!navigator?.clipboard) {\n return setState({\n error: new Error(\"Clipboard not supported\"),\n text: null\n });\n }\n\n const handleSuccess = () => {\n setState({\n error: null,\n text: value\n });\n };\n\n const handleFailure = (e) => {\n setState({\n error: e,\n text: null\n });\n };\n\n navigator.clipboard.writeText(value).then(handleSuccess, handleFailure);\n }, []);\n\n return [state, copyToClipboard];\n}\n\nexport function useCounter(startingValue = 0, options = {}) {\n const { min, max } = options;\n\n if (min && startingValue < min) {\n throw new Error(\n `Your starting value of ${startingValue} is less than your min of ${min}.`\n );\n }\n\n if (max && startingValue > max) {\n throw new Error(\n `Your starting value of ${startingValue} is greater than your max of ${max}.`\n );\n }\n\n const [count, setCount] = React.useState(startingValue);\n\n const increment = () => {\n const nextCount = count + 1;\n if (max && nextCount > max) {\n return;\n }\n\n setCount(nextCount);\n };\n\n const decrement = () => {\n const nextCount = count - 1;\n if (min && nextCount < min) {\n return;\n }\n\n setCount(nextCount);\n };\n\n const set = (nextCount) => {\n if (max && nextCount > max) {\n return;\n }\n\n if (min && nextCount < min) {\n return;\n }\n\n if (nextCount === count) {\n return;\n }\n\n setCount(nextCount);\n };\n\n const reset = () => {\n if (count === startingValue) {\n return;\n }\n\n setCount(startingValue);\n };\n\n return [\n count,\n {\n increment,\n decrement,\n set,\n reset\n }\n ];\n}\n\nexport function useDebounce(value, delay) {\n const [debouncedValue, setDebouncedValue] = React.useState(value);\n\n React.useEffect(() => {\n const handler = setTimeout(() => {\n setDebouncedValue(value);\n }, delay);\n\n return () => {\n clearTimeout(handler);\n };\n }, [value, delay]);\n\n return debouncedValue;\n}\n\nexport function useDefault(initialValue, defaultValue) {\n const [state, setState] = React.useState(initialValue);\n\n if (typeof state === \"undefined\" || state === null) {\n return [defaultValue, setState];\n }\n\n return [state, setState];\n}\n\nexport function useDocumentTitle(title) {\n React.useEffect(() => {\n document.title = title;\n }, [title]);\n}\n\nexport function useFavicon(url) {\n React.useEffect(() => {\n const link =\n document.querySelector(\"link[rel*='icon']\") ||\n document.createElement(\"link\");\n link.type = \"image/x-icon\";\n link.rel = \"shortcut icon\";\n link.href = url;\n document.getElementsByTagName(\"head\")[0].appendChild(link);\n }, [url]);\n}\n\nexport function useGeolocation(options = {}) {\n const [state, setState] = React.useState({\n loading: true,\n accuracy: null,\n altitude: null,\n altitudeAccuracy: null,\n heading: null,\n latitude: null,\n longitude: null,\n speed: null,\n timestamp: null,\n error: null,\n });\n\n const optionsRef = React.useRef(options);\n\n React.useEffect(() => {\n const onEvent = ({ coords, timestamp }) => {\n setState({\n loading: false,\n timestamp,\n latitude: coords.latitude,\n longitude: coords.longitude,\n altitude: coords.altitude,\n accuracy: coords.accuracy,\n altitudeAccuracy: coords.altitudeAccuracy,\n heading: coords.heading,\n speed: coords.speed,\n });\n };\n\n const onEventError = (error) => {\n setState((s) => ({\n ...s,\n loading: false,\n error,\n }));\n };\n\n navigator.geolocation.getCurrentPosition(\n onEvent,\n onEventError,\n optionsRef.current\n );\n\n const watchId = navigator.geolocation.watchPosition(\n onEvent,\n onEventError,\n optionsRef.current\n );\n\n return () => {\n navigator.geolocation.clearWatch(watchId);\n };\n }, []);\n\n return state;\n}\n\nconst initialUseHistoryStateState = {\n past: [],\n present: null,\n future: [],\n};\n\nconst useHistoryStateReducer = (state, action) => {\n const { past, present, future } = state;\n switch (action.type) {\n case \"UNDO\":\n return {\n past: past.slice(0, past.length - 1),\n present: past[past.length - 1],\n future: [present, ...future],\n };\n case \"REDO\":\n return {\n past: [...past, present],\n present: future[0],\n future: future.slice(1),\n };\n case \"SET\":\n const { newPresent } = action;\n\n if (action.newPresent === present) {\n return state;\n }\n\n return {\n past: [...past, present],\n present: newPresent,\n future: [],\n };\n case \"CLEAR\":\n return {\n ...initialUseHistoryStateState,\n present: action.initialPresent,\n };\n default:\n throw new Error(\"Unsupported action type\");\n }\n};\n\nexport function useHistoryState (initialPresent = {}) {\n const initialPresentRef = React.useRef(initialPresent);\n\n const [state, dispatch] = React.useReducer(useHistoryStateReducer, {\n ...initialUseHistoryStateState,\n present: initialPresentRef.current,\n });\n\n const canUndo = state.past.length !== 0;\n const canRedo = state.future.length !== 0;\n\n const undo = React.useCallback(() => {\n if (canUndo) {\n dispatch({ type: \"UNDO\" });\n }\n }, [canUndo]);\n\n const redo = React.useCallback(() => {\n if (canRedo) {\n dispatch({ type: \"REDO\" });\n }\n }, [canRedo]);\n\n const set = React.useCallback(\n (newPresent) => dispatch({ type: \"SET\", newPresent }),\n []\n );\n\n const clear = React.useCallback(\n () =>\n dispatch({ type: \"CLEAR\", initialPresent: initialPresentRef.current }),\n []\n );\n\n return { state: state.present, set, undo, redo, clear, canUndo, canRedo };\n};\n\nexport function useHover() {\n const [hovering, setHovering] = React.useState(false);\n const ref = React.useRef(null);\n\n React.useEffect(() => {\n const node = ref.current;\n\n if (!node) return;\n\n const handleMouseEnter = () => {\n setHovering(true);\n };\n\n const handleMouseLeave = () => {\n setHovering(false);\n };\n\n node.addEventListener(\"mouseenter\", handleMouseEnter);\n node.addEventListener(\"mouseleave\", handleMouseLeave);\n\n return () => {\n node.removeEventListener(\"mouseenter\", handleMouseEnter);\n node.removeEventListener(\"mouseleave\", handleMouseLeave);\n };\n }, []);\n\n return [ref, hovering];\n}\n\nexport function useIdle(ms = 1000 * 60) {\n const [idle, setIdle] = React.useState(false);\n\n React.useEffect(() => {\n let timeoutId;\n\n const handleTimeout = () => {\n setIdle(true);\n };\n\n const handleEvent = throttle((e) => {\n setIdle(false);\n\n window.clearTimeout(timeoutId);\n timeoutId = window.setTimeout(handleTimeout, ms);\n }, 500);\n\n const handleVisibilityChange = () => {\n if (!document.hidden) {\n handleEvent();\n }\n };\n\n timeoutId = window.setTimeout(handleTimeout, ms);\n\n window.addEventListener(\"mousemove\", handleEvent);\n window.addEventListener(\"mousedown\", handleEvent);\n window.addEventListener(\"resize\", handleEvent);\n window.addEventListener(\"keydown\", handleEvent);\n window.addEventListener(\"touchstart\", handleEvent);\n window.addEventListener(\"wheel\", handleEvent);\n document.addEventListener(\"visibilitychange\", handleVisibilityChange);\n\n return () => {\n window.removeEventListener(\"mousemove\", handleEvent);\n window.removeEventListener(\"mousedown\", handleEvent);\n window.removeEventListener(\"resize\", handleEvent);\n window.removeEventListener(\"keydown\", handleEvent);\n window.removeEventListener(\"touchstart\", handleEvent);\n window.removeEventListener(\"wheel\", handleEvent);\n document.removeEventListener(\"visibilitychange\", handleVisibilityChange);\n window.clearTimeout(timeoutId);\n };\n }, [ms]);\n\n return idle;\n}\n\nexport function useIntersectionObserver(options = {}) {\n const { threshold = 1, root = null, rootMargin = \"0%\" } = options;\n const ref = React.useRef(null);\n const [entry, setEntry] = React.useState(null);\n\n React.useEffect(() => {\n const node = ref?.current;\n\n if (!node || typeof IntersectionObserver !== \"function\") {\n return;\n }\n\n const observer = new IntersectionObserver(\n ([entry]) => {\n setEntry(entry);\n },\n { threshold, root, rootMargin }\n );\n\n observer.observe(node);\n\n return () => {\n setEntry(null);\n observer.disconnect();\n };\n }, [threshold, root, rootMargin]);\n\n return [ref, entry];\n}\n\nexport function useIsClient() {\n const [isClient, setIsClient] = React.useState(false);\n\n React.useEffect(() => {\n setIsClient(true);\n }, []);\n\n return isClient;\n}\n\nexport function useIsFirstRender() {\n const renderRef = React.useRef(true);\n\n if (renderRef.current === true) {\n renderRef.current = false;\n return true;\n }\n\n return renderRef.current;\n}\n\nexport function useList(defaultList = []) {\n const [list, setList] = React.useState(defaultList);\n\n const methods = React.useMemo(() => {\n const set = (l) => {\n setList(l);\n };\n\n const push = (element) => {\n setList((l) => [...l, element]);\n };\n\n const removeAt = (index) => {\n setList((l) => [...l.slice(0, index), ...l.slice(index + 1)]);\n };\n\n const insertAt = (index, element) => {\n setList((l) => [...l.slice(0, index), element, ...l.slice(index)]);\n };\n\n const updateAt = (index, element) => {\n setList((l) => l.map((e, i) => (i === index ? element : e)));\n };\n\n const clear = () => setList([]);\n\n return {\n set,\n push,\n removeAt,\n insertAt,\n updateAt,\n clear,\n };\n }, []);\n\n return [list, methods];\n}\n\nexport function useLockBodyScroll() {\n React.useEffect(() => {\n const originalStyle = window.getComputedStyle(document.body).overflow;\n document.body.style.overflow = \"hidden\";\n return () => {\n document.body.style.overflow = originalStyle;\n };\n }, []);\n}\n\nexport function useLongPress(\n callback,\n { threshold = 400, onStart, onFinish, onCancel } = {}\n) {\n const isLongPressActive = React.useRef(false);\n const isPressed = React.useRef(false);\n const timerId = React.useRef();\n const cbRef = React.useRef(callback);\n\n const start = React.useCallback(\n () => (event) => {\n if (isPressed.current) return;\n\n if (!isMouseEvent(event) && !isTouchEvent(event)) return;\n\n if (onStart) {\n onStart(event);\n }\n\n isPressed.current = true;\n timerId.current = setTimeout(() => {\n cbRef.current(event);\n isLongPressActive.current = true;\n }, threshold);\n },\n [onStart, threshold]\n );\n\n const cancel = React.useCallback(\n () => (event) => {\n if (!isMouseEvent(event) && !isTouchEvent(event)) return;\n\n if (isLongPressActive.current) {\n if (onFinish) {\n onFinish(event);\n }\n } else if (isPressed.current) {\n if (onCancel) {\n onCancel(event);\n }\n }\n\n isLongPressActive.current = false;\n isPressed.current = false;\n\n if (timerId.current) {\n window.clearTimeout(timerId.current);\n }\n },\n [onFinish, onCancel]\n );\n\n return React.useMemo(() => {\n if (callback === null) {\n return {};\n }\n\n const mouseHandlers = {\n onMouseDown: start(),\n onMouseUp: cancel(),\n onMouseLeave: cancel(),\n };\n\n const touchHandlers = {\n onTouchStart: start(),\n onTouchEnd: cancel(),\n };\n\n return {\n ...mouseHandlers,\n ...touchHandlers,\n };\n }, [callback, cancel, start]);\n}\n\nexport function useMap(initialState) {\n const mapRef = React.useRef(new Map(initialState));\n const [, reRender] = React.useReducer((x) => x + 1, 0);\n\n mapRef.current.set = (...args) => {\n Map.prototype.set.apply(mapRef.current, args);\n reRender();\n return mapRef.current;\n };\n\n mapRef.current.clear = (...args) => {\n Map.prototype.clear.apply(mapRef.current, args);\n reRender();\n };\n\n mapRef.current.delete = (...args) => {\n const res = Map.prototype.delete.apply(mapRef.current, args);\n reRender();\n\n return res;\n };\n\n return mapRef.current;\n}\n\nexport function useMeasure() {\n const ref = React.useRef(null);\n const [rect, setRect] = React.useState({\n width: null,\n height: null,\n });\n\n React.useLayoutEffect(() => {\n if (!ref.current) return;\n\n const observer = new ResizeObserver(([entry]) => {\n if (entry && entry.contentRect) {\n setRect({\n width: entry.contentRect.width,\n height: entry.contentRect.height,\n });\n }\n });\n\n observer.observe(ref.current);\n return () => {\n observer.disconnect();\n };\n }, []);\n\n return [ref, rect];\n}\n\nexport function useMediaQuery(query) {\n const subscribe = React.useCallback(\n (callback) => {\n const matchMedia = window.matchMedia(query);\n\n matchMedia.addEventListener(\"change\", callback);\n return () => {\n matchMedia.removeEventListener(\"change\", callback);\n };\n },\n [query]\n );\n\n const getSnapshot = () => {\n return window.matchMedia(query).matches;\n };\n\n const getServerSnapshot = () => {\n throw Error(\"useMediaQuery is a client-only hook\");\n };\n\n return React.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n}\n\nexport function useMouse() {\n const [state, setState] = React.useState({\n x: 0,\n y: 0,\n elementX: 0,\n elementY: 0,\n elementPositionX: 0,\n elementPositionY: 0\n });\n\n const ref = React.useRef(null);\n\n React.useLayoutEffect(() => {\n const handleMouseMove = (event) => {\n let newState = {\n x: event.pageX,\n y: event.pageY\n };\n\n if (ref.current instanceof HTMLElement) {\n const { left, top } = ref.current.getBoundingClientRect();\n const elementPositionX = left + window.pageXOffset;\n const elementPositionY = top + window.pageYOffset;\n const elementX = event.pageX - elementPositionX;\n const elementY = event.pageY - elementPositionY;\n\n newState.elementX = elementX;\n newState.elementY = elementY;\n newState.elementX = elementX;\n newState.elementY = elementY;\n newState.elementPositionX = elementPositionX;\n newState.elementPositionY = elementPositionY;\n }\n\n setState((s) => {\n return {\n ...s,\n ...newState\n };\n });\n };\n\n document.addEventListener(\"mousemove\", handleMouseMove);\n\n return () => {\n document.removeEventListener(\"mousemove\", handleMouseMove);\n };\n }, []);\n\n return [state, ref];\n}\n\nexport function useNetworkState() {\n const connection =\n navigator?.connection ||\n navigator?.mozConnection ||\n navigator?.webkitConnection;\n\n const cache = React.useRef({});\n\n const subscribe = React.useCallback((callback) => {\n window.addEventListener(\"online\", callback, { passive: true });\n window.addEventListener(\"offline\", callback, { passive: true });\n\n if (connection) {\n connection.addEventListener(\"change\", callback, { passive: true });\n }\n\n return () => {\n window.removeEventListener(\"online\", callback);\n window.removeEventListener(\"offline\", callback);\n\n if (connection) {\n connection.removeEventListener(\"change\", callback);\n }\n };\n }, []);\n\n const getSnapshot = () => {\n const online = navigator.onLine;\n\n const nextState = {\n online,\n downlink: connection?.downlink,\n downlinkMax: connection?.downlinkMax,\n effectiveType: connection?.effectiveType,\n rtt: connection?.rtt,\n saveData: connection?.saveData,\n type: connection?.type,\n };\n\n if (isShallowEqual(cache.current, nextState)) {\n return cache.current;\n } else {\n cache.current = nextState;\n return nextState;\n }\n };\n\n const getServerSnapshot = () => {\n throw Error(\"useNetworkState is a client-only hook\");\n };\n\n return React.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n}\n\nexport function useObjectState(initialValue) {\n const [state, setState] = React.useState(initialValue);\n\n const handleUpdate = React.useCallback((arg) => {\n if (typeof arg === \"function\") {\n setState((s) => {\n const newState = arg(s);\n\n return {\n ...s,\n ...newState,\n };\n });\n }\n\n if (typeof arg === \"object\") {\n setState((s) => ({\n ...s,\n ...arg,\n }));\n }\n }, []);\n\n return [state, handleUpdate];\n}\n\nexport function useOrientation() {\n const [orientation, setOrientation] = React.useState({\n angle: 0,\n type: \"landscape-primary\",\n });\n\n React.useLayoutEffect(() => {\n const handleChange = () => {\n const { angle, type } = window.screen.orientation;\n setOrientation({\n angle,\n type,\n });\n };\n\n const handle_orientationchange = () => {\n setOrientation({\n type: \"UNKNOWN\",\n angle: window.orientation,\n });\n };\n\n if (window.screen?.orientation) {\n handleChange();\n window.screen.orientation.addEventListener(\"change\", handleChange);\n } else {\n handle_orientationchange()\n window.addEventListener(\"orientationchange\", handle_orientationchange);\n }\n\n return () => {\n if (window.screen?.orientation) {\n window.screen.orientation.removeEventListener(\"change\", handleChange);\n } else {\n window.removeEventListener(\n \"orientationchange\",\n handle_orientationchange\n );\n }\n };\n }, []);\n\n return orientation;\n}\n\nconst usePreferredLanguageSubscribe = (cb) => {\n window.addEventListener(\"languagechange\", cb);\n return () => window.removeEventListener(\"languagechange\", cb);\n};\n\nconst getPreferredLanguageSnapshot = () => {\n return navigator.language;\n};\n\nconst getPreferredLanguageServerSnapshot = () => {\n throw Error(\"usePreferredLanguage is a client-only hook\");\n};\n\nexport function usePreferredLanguage() {\n return React.useSyncExternalStore(usePreferredLanguageSubscribe, getPreferredLanguageSnapshot, getPreferredLanguageServerSnapshot);\n}\n\nexport function usePrevious(newValue) {\n const previousRef = React.useRef();\n\n React.useEffect(() => {\n previousRef.current = newValue;\n });\n\n return previousRef.current;\n}\n\nexport function useQueue(initialValue = []) {\n const [queue, setQueue] = React.useState(initialValue);\n\n const add = React.useCallback((element) => {\n setQueue((q) => [...q, element]);\n }, []);\n\n const remove = React.useCallback(() => {\n let removedElement;\n\n setQueue(([first, ...q]) => {\n removedElement = first;\n return q;\n });\n\n return removedElement;\n }, []);\n\n const clear = React.useCallback(() => {\n setQueue([]);\n }, []);\n\n return {\n add,\n remove,\n clear,\n first: queue[0],\n last: queue[queue.length - 1],\n size: queue.length,\n };\n}\n\nexport function useRenderCount() {\n const count = React.useRef(0);\n\n count.current++;\n\n return count.current;\n}\n\nexport function useRenderInfo(name = \"Unknown\") {\n const count = React.useRef(0);\n const lastRender = React.useRef();\n const now = Date.now();\n\n count.current++;\n\n React.useEffect(() => {\n lastRender.current = Date.now();\n });\n\n const sinceLastRender = lastRender.current ? now - lastRender.current : 0;\n\n if (process.env.NODE_ENV !== \"production\") {\n const info = {\n name,\n renders: count.current,\n sinceLastRender,\n timestamp: now,\n };\n\n console.log(info);\n\n return info;\n }\n}\n\nexport function useScript(src, options = {}) {\n const [status, setStatus] = React.useState(() => {\n if (!src) {\n return \"idle\";\n }\n\n return \"loading\";\n });\n\n const cachedScriptStatuses = React.useRef({});\n\n React.useEffect(() => {\n if (!src) {\n return;\n }\n\n const cachedScriptStatus = cachedScriptStatuses.current[src];\n if (cachedScriptStatus === \"ready\" || cachedScriptStatus === \"error\") {\n setStatus(cachedScriptStatus);\n return;\n }\n\n let script = document.querySelector(`script[src=\"${src}\"]`);\n\n if (script) {\n setStatus(\n script.getAttribute(\"data-status\") ?? cachedScriptStatus ?? \"loading\"\n );\n } else {\n script = document.createElement(\"script\");\n script.src = src;\n script.async = true;\n script.setAttribute(\"data-status\", \"loading\");\n document.body.appendChild(script);\n\n const setAttributeFromEvent = (event) => {\n const scriptStatus = event.type === \"load\" ? \"ready\" : \"error\";\n\n if (script) {\n script.setAttribute(\"data-status\", scriptStatus);\n }\n };\n\n script.addEventListener(\"load\", setAttributeFromEvent);\n script.addEventListener(\"error\", setAttributeFromEvent);\n }\n\n const setStateFromEvent = (event) => {\n const newStatus = event.type === \"load\" ? \"ready\" : \"error\";\n setStatus(newStatus);\n cachedScriptStatuses.current[src] = newStatus;\n };\n\n script.addEventListener(\"load\", setStateFromEvent);\n script.addEventListener(\"error\", setStateFromEvent);\n\n return () => {\n if (script) {\n script.removeEventListener(\"load\", setStateFromEvent);\n script.removeEventListener(\"error\", setStateFromEvent);\n }\n\n if (script && options.removeOnUnmount) {\n script.remove();\n }\n };\n }, [src, options.removeOnUnmount]);\n\n return status;\n}\n\nexport function useSet(values) {\n const setRef = React.useRef(new Set(values));\n const [, reRender] = React.useReducer((x) => x + 1, 0);\n\n setRef.current.add = (...args) => {\n const res = Set.prototype.add.apply(setRef.current, args);\n reRender();\n\n return res;\n };\n\n setRef.current.clear = (...args) => {\n Set.prototype.clear.apply(setRef.current, args);\n reRender();\n };\n\n setRef.current.delete = (...args) => {\n const res = Set.prototype.delete.apply(setRef.current, args);\n reRender();\n\n return res;\n };\n\n return setRef.current;\n}\n\nexport function useSpeech(text, options) {\n const [state, setState] = React.useState(() => {\n const { lang = \"default\", name = \"\" } = options.voice || {};\n return {\n isPlaying: false,\n status: \"init\",\n lang: options.lang || \"default\",\n voiceInfo: { lang, name },\n rate: options.rate || 1,\n pitch: options.pitch || 1,\n volume: options.volume || 1,\n };\n });\n\n const optionsRef = React.useRef(options);\n\n React.useEffect(() => {\n const handlePlay = () => {\n setState((s) => {\n return { ...s, isPlaying: true, status: \"play\" };\n });\n };\n\n const handlePause = () => {\n setState((s) => {\n return { ...s, isPlaying: false, status: \"pause\" };\n });\n };\n\n const handleEnd = () => {\n setState((s) => {\n return { ...s, isPlaying: false, status: \"end\" };\n });\n };\n\n const utterance = new SpeechSynthesisUtterance(text);\n optionsRef.current.lang && (utterance.lang = optionsRef.current.lang);\n optionsRef.current.voice && (utterance.voice = optionsRef.current.voice);\n utterance.rate = optionsRef.current.rate || 1;\n utterance.pitch = optionsRef.current.pitch || 1;\n utterance.volume = optionsRef.current.volume || 1;\n utterance.onstart = handlePlay;\n utterance.onpause = handlePause;\n utterance.onresume = handlePlay;\n utterance.onend = handleEnd;\n window.speechSynthesis.speak(utterance);\n }, [text]);\n\n return state;\n}\n\nexport function useThrottle(value, interval = 500) {\n const [throttledValue, setThrottledValue] = React.useState(value);\n const lastUpdated = React.useRef();\n\n React.useEffect(() => {\n const now = Date.now();\n\n if (now >= lastUpdated.current + interval) {\n lastUpdated.current = now;\n setThrottledValue(value);\n } else {\n const id = window.setTimeout(() => {\n lastUpdated.current = now;\n setThrottledValue(value);\n }, interval);\n\n return () => window.clearTimeout(id);\n }\n }, [value, interval]);\n\n return throttledValue;\n}\n\nexport function useToggle(initialValue) {\n const [on, setOn] = React.useState(initialValue);\n\n const handleToggle = React.useCallback((value) => {\n if (typeof value === \"boolean\") {\n return setOn(value);\n }\n\n return setOn((v) => !v);\n }, []);\n\n return [on, handleToggle];\n}\n\nexport function useVisibilityChange() {\n const [documentVisible, setDocumentVisibility] = React.useState(true);\n\n React.useEffect(() => {\n const handleChange = () => {\n if (document.visibilityState !== \"visible\") {\n setDocumentVisibility(false);\n } else {\n setDocumentVisibility(true);\n }\n };\n\n document.addEventListener(\"visibilitychange\", handleChange);\n\n return () => {\n document.removeEventListener(\"visibilitychange\", handleChange);\n };\n }, []);\n\n return documentVisible;\n}\n\nexport function useWindowScroll() {\n const [state, setState] = React.useState({\n x: null,\n y: null,\n });\n\n const scrollTo = React.useCallback((...args) => {\n if (typeof args[0] === \"object\") {\n window.scrollTo(args[0]);\n } else if (typeof args[0] === \"number\" && typeof args[1] === \"number\") {\n window.scrollTo(args[0], args[1]);\n } else {\n throw new Error(\n `Invalid arguments passed to scrollTo. See here for more info. https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollTo`\n );\n }\n }, []);\n\n React.useLayoutEffect(() => {\n const handleScroll = () => {\n setState({ x: window.pageXOffset, y: window.pageYOffset });\n };\n\n handleScroll();\n window.addEventListener(\"scroll\", handleScroll);\n\n return () => {\n window.removeEventListener(\"scroll\", handleScroll);\n };\n }, []);\n\n return [state, scrollTo];\n}\n\nexport function useWindowSize() {\n const [size, setSize] = React.useState({\n width: null,\n height: null,\n });\n\n React.useLayoutEffect(() => {\n const handleResize = () => {\n setSize({\n width: window.innerWidth,\n height: window.innerHeight,\n });\n };\n\n handleResize();\n window.addEventListener(\"resize\", handleResize);\n\n return () => {\n window.removeEventListener(\"resize\", handleResize);\n };\n }, []);\n\n return size;\n}\n"],"names":["hasOwn","hasOwnProperty","classNames","classes","i","arguments","length","arg","argType","push","Array","isArray","inner","apply","toString","Object","prototype","key","call","join","module","exports","default","boxUnitToString","value","createBoxFunction","mapFromBox","a","b","c","d","undefined","box","top","right","bottom","left","__esModule","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","border","borderTop","borderRight","borderBottom","borderLeft","verticallySpaced","horizontallySpaced","gridSpaced","spacing","fillParent","width","height","maxWidth","maxHeight","horizontallyCenterSelf","horizontallyCenterChildren","textAlign","block","display","none","inlineBlock","invisible","visibility","typestyle_1","flexRoot","pass","flexDirection","flexGrow","inlineRoot","horizontal","extend","vertical","wrap","flexWrap","content","flexShrink","flexBasis","flex","flex1","flex2","flex3","flex4","flex5","flex6","flex7","flex8","flex9","flex10","flex11","flex12","start","alignItems","center","end","startJustified","justifyContent","centerJustified","endJustified","aroundJustified","betweenJustified","centerCenter","selfStart","alignSelf","selfCenter","selfEnd","selfStretch","fontStyleItalic","fontStyle","fontWeightNormal","fontWeight","fontWeightBold","__export","m","p","layerParent","position","attachToLayerParent","newLayer","attachToTop","attachToRight","attachToBottom","attachToLeft","fixed","pageTop","pageRight","pageBottom","pageLeft","normalize","cssRaw","trim","box_1","setupPage","rootSelector","cssRule","boxSizing","scroll","overflow","scrollX","overflowX","scrollY","overflowY","someChildWillScroll","isMergeableObject","isNonNullObject","stringValue","$$typeof","REACT_ELEMENT_TYPE","isReactElement","isSpecial","Symbol","for","cloneUnlessOtherwiseSpecified","options","clone","deepmerge","val","defaultArrayMerge","target","source","concat","map","element","getKeys","keys","getOwnPropertySymbols","filter","symbol","propertyIsEnumerable","getEnumerableOwnPropertySymbols","propertyIsOnObject","object","property","_","mergeObject","destination","forEach","propertyIsUnsafe","customMerge","getMergeFunction","arrayMerge","sourceIsArray","all","array","Error","reduce","prev","next","deepmerge_1","REACT_STATICS","childContextTypes","contextTypes","defaultProps","displayName","getDefaultProps","getDerivedStateFromProps","mixins","propTypes","type","KNOWN_STATICS","name","caller","callee","arity","defineProperty","getOwnPropertyNames","getOwnPropertyDescriptor","getPrototypeOf","objectPrototype","hoistNonReactStatics","targetComponent","sourceComponent","blacklist","inheritedComponent","descriptor","e","condition","format","f","error","args","argIndex","replace","framesToPop","arr","DataView","getNative","hashClear","hashDelete","hashGet","hashHas","hashSet","Hash","entries","index","this","clear","entry","set","get","has","listCacheClear","listCacheDelete","listCacheGet","listCacheHas","listCacheSet","ListCache","Map","mapCacheClear","mapCacheDelete","mapCacheGet","mapCacheHas","mapCacheSet","MapCache","Promise","Set","setCacheAdd","setCacheHas","SetCache","values","__data__","add","stackClear","stackDelete","stackGet","stackHas","stackSet","Stack","data","size","Uint8Array","WeakMap","predicate","resIndex","result","baseTimes","isArguments","isBuffer","isIndex","isTypedArray","inherited","isArr","isArg","isBuff","isType","skipIndexes","String","iteratee","offset","eq","fromIndex","fromRight","arrayPush","keysFunc","symbolsFunc","getRawTag","objectToString","symToStringTag","toStringTag","baseFindIndex","baseIsNaN","strictIndexOf","baseGetTag","isObjectLike","baseIsEqualDeep","baseIsEqual","other","bitmask","customizer","stack","equalArrays","equalByTag","equalObjects","getTag","argsTag","arrayTag","objectTag","equalFunc","objIsArr","othIsArr","objTag","othTag","objIsObj","othIsObj","isSameTag","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","isFunction","isMasked","isObject","toSource","reIsHostCtor","funcProto","Function","objectProto","funcToString","reIsNative","RegExp","test","isLength","typedArrayTags","isPrototype","nativeKeys","n","trimmedEndIndex","reTrimStart","string","slice","func","arrayMap","props","cache","coreJsData","arraySome","cacheHas","isPartial","arrLength","othLength","arrStacked","othStacked","seen","arrValue","othValue","compared","othIndex","mapToArray","setToArray","symbolProto","symbolValueOf","valueOf","tag","byteLength","byteOffset","buffer","message","convert","stacked","getAllKeys","objProps","objLength","objStacked","skipCtor","objValue","objCtor","constructor","othCtor","freeGlobal","g","baseGetAllKeys","getSymbols","isKeyable","baseIsNative","getValue","nativeObjectToString","isOwn","unmasked","arrayFilter","stubArray","nativeGetSymbols","mapTag","promiseTag","setTag","weakMapTag","dataViewTag","dataViewCtorString","mapCtorString","promiseCtorString","setCtorString","weakMapCtorString","ArrayBuffer","resolve","Ctor","ctorString","nativeCreate","reIsUint","uid","maskSrcKey","exec","IE_PROTO","assocIndexOf","splice","pop","getMapData","overArg","freeExports","nodeType","freeModule","freeProcess","process","nodeUtil","types","require","binding","transform","freeSelf","self","root","pairs","LARGE_ARRAY_SIZE","reWhitespace","charAt","baseIndexOf","isArrayLike","isString","toInteger","nativeMax","Math","max","collection","guard","indexOf","baseIsArguments","stubFalse","Buffer","baseIsTypedArray","baseUnary","nodeIsTypedArray","arrayLikeKeys","baseKeys","toNumber","INFINITY","toFinite","remainder","baseTrim","isSymbol","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","parseInt","isBinary","baseValues","isarray","pathToRegexp","parse","compile","str","tokensToFunction","tokensToRegExp","PATH_REGEXP","res","tokens","path","defaultDelimiter","delimiter","escaped","prefix","capture","group","modifier","asterisk","partial","repeat","optional","pattern","escapeGroup","escapeString","substr","encodeURIComponentPretty","encodeURI","charCodeAt","toUpperCase","matches","flags","obj","opts","encode","pretty","encodeURIComponent","token","segment","TypeError","JSON","stringify","j","attachKeys","re","sensitive","strict","route","endsWithDelimiter","groups","match","regexpToRegexp","parts","arrayToRegexp","stringToRegexp","ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","resetWarningCache","shim","propName","componentName","location","propFullName","secret","err","getShim","isRequired","ReactPropTypes","bigint","bool","number","any","arrayOf","elementType","instanceOf","node","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","aa","l","fa","ha","ia","ja","r","acceptsBooleans","attributeName","attributeNamespace","mustUseProperty","propertyName","sanitizeURL","removeEmptyString","t","split","toLowerCase","ka","la","xlinkHref","u","animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flexPositive","flexNegative","flexOrder","gridArea","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","lineClamp","lineHeight","opacity","order","orphans","tabSize","widows","zIndex","zoom","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","ma","substring","na","v","oa","pa","qa","w","insertionMode","selectedValue","sa","ta","x","isNaN","y","__html","va","A","wa","xa","ya","h","k","q","Children","ua","C","D","is","za","Ca","Da","Fa","generateStaticMarkup","B","assign","Ga","Ha","Ia","Ja","Ka","La","Ma","Na","Oa","Pa","Qa","Ra","Sa","Ta","Ua","Va","Wa","iterator","Xa","_context","render","_payload","_init","Ya","Za","E","F","context","_currentValue2","parentValue","parent","$a","ab","bb","depth","cb","G","db","isMounted","enqueueSetState","_reactInternals","queue","enqueueReplaceState","enqueueForceUpdate","eb","state","updater","contextType","getSnapshotBeforeUpdate","UNSAFE_componentWillMount","componentWillMount","fb","id","gb","H","clz32","ib","jb","log","LN2","lb","I","ob","J","K","L","M","N","O","P","Q","pb","memoizedState","qb","rb","sb","tb","dispatch","delete","action","last","ub","bind","vb","wb","R","xb","readContext","useContext","useMemo","useReducer","useRef","current","useState","useInsertionEffect","useLayoutEffect","useCallback","useImperativeHandle","useEffect","useDebugValue","useDeferredValue","useTransition","useId","treeContext","S","idPrefix","useMutableSource","_source","useSyncExternalStore","yb","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentDispatcher","zb","console","T","Bb","allPendingTasks","pendingRootTasks","pendingTasks","ping","pingedTasks","Cb","blockedBoundary","blockedSegment","abortSet","legacyContext","U","status","parentFlushed","chunks","children","formatContext","boundary","lastPushedText","textEmbedded","V","onError","W","onShellError","onFatalError","destroy","fatalError","Db","Eb","getChildContext","X","Fb","Gb","isReactComponent","fallback","rootSegmentID","forceClientRender","completedSegments","byteSize","fallbackAbortableTasks","errorDigest","Hb","responseState","Y","_defaultValue","defaultValue","ra","ref","Ib","done","then","Jb","Kb","Lb","clientRenderedBoundaries","onAllReady","completedRootSegment","onShellReady","completedBoundaries","partialBoundaries","z","Mb","Z","nextSegmentId","placeholderPrefix","Nb","nextSuspenseID","boundaryPrefix","progressiveChunkSize","Ob","segmentPrefix","Aa","Ba","Pb","Qb","startInlineScript","sentCompleteBoundaryFunction","sentCompleteSegmentFunction","bootstrapChunks","errorMessage","errorComponentStack","sentClientRenderFunction","ba","ca","mb","da","nb","ea","Rb","abortableTasks","Sb","Tb","Ab","Ea","identifierPrefix","Infinity","renderToNodeStream","renderToStaticMarkup","renderToStaticNodeStream","renderToString","version","enqueue","subarray","TextEncoder","close","hb","kb","Ub","Vb","Wb","Xb","Yb","Zb","$b","ac","bc","cc","dc","ec","fc","gc","hc","ic","jc","kc","lc","_currentValue","mc","nc","oc","pc","qc","rc","sc","tc","uc","wc","xc","zc","Ac","Bc","Cc","Dc","Ec","Fc","Gc","Hc","Ic","Jc","Kc","Lc","Mc","Oc","Nc","Pc","Qc","Tc","Uc","Sc","Vc","Wc","Xc","Yc","Zc","$c","ad","bd","cd","dd","ed","fd","gd","hd","jd","kd","ld","renderToReadableStream","Rc","nonce","bootstrapScriptContent","bootstrapScripts","bootstrapModules","namespaceURI","ReadableStream","pull","cancel","highWaterMark","allReady","catch","signal","reason","removeEventListener","addEventListener","window","document","createElement","removeAttribute","setAttribute","setAttributeNS","prepareStackTrace","Reflect","construct","includes","nodeName","_valueTracker","configurable","enumerable","setValue","stopTracking","checked","activeElement","body","defaultChecked","_wrapperState","initialChecked","initialValue","controlled","ownerDocument","selected","defaultSelected","disabled","dangerouslySetInnerHTML","textContent","innerHTML","firstChild","removeChild","appendChild","MSApp","execUnsafeLocalFunction","lastChild","nodeValue","style","setProperty","menuitem","area","base","br","col","embed","hr","img","input","keygen","link","meta","param","track","wbr","srcElement","correspondingUseElement","parentNode","stateNode","alternate","return","dehydrated","child","sibling","unstable_scheduleCallback","unstable_cancelCallback","unstable_shouldYield","unstable_requestPaint","unstable_now","unstable_getCurrentPriorityLevel","unstable_ImmediatePriority","unstable_UserBlockingPriority","unstable_NormalPriority","unstable_LowPriority","unstable_IdlePriority","pendingLanes","suspendedLanes","pingedLanes","entangledLanes","entanglements","vc","yc","eventTimes","pointerId","nativeEvent","blockedOn","domEventName","eventSystemFlags","targetContainers","priority","isDehydrated","containerInfo","dispatchEvent","shift","ReactCurrentBatchConfig","transition","stopPropagation","md","nd","od","keyCode","charCode","pd","qd","rd","_reactName","_targetInst","currentTarget","isDefaultPrevented","defaultPrevented","returnValue","isPropagationStopped","preventDefault","cancelBubble","persist","isPersistent","wd","xd","yd","sd","eventPhase","bubbles","cancelable","timeStamp","Date","now","isTrusted","td","ud","view","detail","vd","Ad","screenX","screenY","clientX","clientY","pageX","pageY","ctrlKey","shiftKey","altKey","metaKey","getModifierState","zd","button","buttons","relatedTarget","fromElement","toElement","movementX","movementY","Bd","Dd","dataTransfer","Fd","Hd","animationName","elapsedTime","pseudoElement","Id","clipboardData","Jd","Ld","Md","Esc","Spacebar","Left","Up","Right","Down","Del","Win","Menu","Apps","Scroll","MozPrintableKey","Nd","Od","Alt","Control","Meta","Shift","Pd","Qd","fromCharCode","code","locale","which","Rd","Td","pressure","tangentialPressure","tiltX","tiltY","twist","pointerType","isPrimary","Vd","touches","targetTouches","changedTouches","Xd","Yd","deltaX","wheelDeltaX","deltaY","wheelDeltaY","wheelDelta","deltaZ","deltaMode","Zd","$d","ae","be","documentMode","ce","de","ee","fe","ge","he","ie","le","color","date","datetime","email","month","password","range","search","tel","text","time","url","week","me","ne","oe","event","listeners","pe","qe","se","te","ue","ve","we","xe","ye","ze","oninput","Ae","detachEvent","Be","Ce","attachEvent","De","Ee","Fe","He","Ie","Je","Ke","nextSibling","Le","contains","compareDocumentPosition","Me","HTMLIFrameElement","contentWindow","href","Ne","contentEditable","Oe","focusedElem","selectionRange","documentElement","selectionStart","selectionEnd","min","defaultView","getSelection","rangeCount","anchorNode","anchorOffset","focusNode","focusOffset","createRange","setStart","removeAllRanges","addRange","setEnd","scrollLeft","scrollTop","focus","Pe","Qe","Re","Se","Te","Ue","Ve","We","animationend","animationiteration","animationstart","transitionend","Xe","Ye","Ze","animation","$e","af","bf","cf","df","ef","ff","gf","hf","lf","mf","nf","instance","listener","of","pf","qf","rf","random","sf","passive","tf","uf","parentWindow","vf","wf","je","char","ke","unshift","xf","yf","zf","Af","Bf","Cf","Df","Ef","Ff","setTimeout","Gf","clearTimeout","Hf","Jf","queueMicrotask","If","Kf","Lf","Mf","previousSibling","Nf","Of","Pf","Qf","Rf","Sf","Tf","Uf","Vf","Wf","Xf","Yf","__reactInternalMemoizedUnmaskedChildContext","__reactInternalMemoizedMaskedChildContext","Zf","$f","ag","bg","cg","__reactInternalMemoizedMergedChildContext","dg","eg","fg","gg","hg","jg","kg","lg","mg","ng","og","pg","qg","rg","sg","tg","ug","vg","wg","xg","yg","zg","Ag","Bg","deletions","Cg","pendingProps","retryLane","Dg","mode","Eg","Fg","Gg","memoizedProps","Hg","Ig","Jg","Kg","Lg","Mg","Ng","Og","Pg","Qg","Rg","Sg","childLanes","Tg","dependencies","firstContext","lanes","Ug","Vg","memoizedValue","Wg","Xg","Yg","interleaved","Zg","$g","ah","updateQueue","baseState","firstBaseUpdate","lastBaseUpdate","shared","pending","effects","bh","ch","eventTime","lane","payload","callback","dh","eh","fh","gh","hh","ih","jh","Component","refs","kh","nh","lh","mh","oh","shouldComponentUpdate","isPureReactComponent","ph","qh","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","rh","componentDidMount","sh","_owner","_stringRef","th","uh","vh","wh","xh","yh","implementation","zh","Ah","Bh","Ch","Dh","Eh","Fh","Gh","Hh","Ih","tagName","Jh","Kh","Lh","Mh","revealOrder","Nh","Oh","_workInProgressVersionPrimary","Ph","Qh","Rh","Sh","Th","Uh","Vh","Wh","Xh","Yh","Zh","$h","ai","bi","ci","baseQueue","di","ei","fi","lastRenderedReducer","hasEagerState","eagerState","lastRenderedState","gi","hi","ii","ji","ki","getSnapshot","li","mi","ni","lastEffect","stores","oi","pi","qi","ri","create","deps","si","ti","ui","vi","wi","xi","yi","zi","Ai","Bi","Ci","Di","Ei","Fi","Gi","Hi","Ii","Ji","unstable_isNewReconciler","Ki","digest","Li","Mi","Ni","Oi","Pi","Qi","Ri","getDerivedStateFromError","componentDidCatch","Si","componentStack","Ti","pingCache","Ui","Vi","Wi","Xi","ReactCurrentOwner","Yi","Zi","$i","aj","bj","compare","cj","dj","ej","baseLanes","cachePool","transitions","fj","gj","hj","ij","jj","UNSAFE_componentWillUpdate","componentWillUpdate","componentDidUpdate","kj","lj","pendingContext","mj","Aj","Cj","Dj","nj","oj","pj","qj","rj","tj","dataset","dgst","uj","vj","_reactRetry","sj","subtreeFlags","wj","xj","isBackwards","rendering","renderingStartTime","tail","tailMode","yj","Ej","Fj","Gj","wasMultiple","multiple","suppressHydrationWarning","onClick","onclick","createElementNS","autoFocus","createTextNode","Hj","Ij","Jj","Kj","Lj","WeakSet","Mj","Nj","Oj","Qj","Rj","Sj","Tj","Uj","Vj","Wj","insertBefore","_reactRootContainer","Xj","Yj","Zj","ak","onCommitFiberUnmount","componentWillUnmount","bk","ck","dk","ek","fk","isHidden","gk","hk","ik","jk","kk","lk","__reactInternalSnapshotBeforeUpdate","src","Wk","mk","ceil","nk","ok","pk","qk","rk","sk","tk","uk","vk","wk","xk","yk","zk","Ak","Bk","Ck","Dk","Ek","callbackNode","expirationTimes","expiredLanes","callbackPriority","ig","Fk","Gk","Hk","Ik","Jk","Kk","Lk","Mk","Nk","Ok","Pk","finishedWork","finishedLanes","Qk","timeoutHandle","Rk","Sk","Tk","Uk","Vk","mutableReadLanes","Pj","onCommitFiberRoot","onRecoverableError","Xk","onPostCommitFiberRoot","Yk","Zk","al","pendingChildren","bl","mutableSourceEagerHydrationData","cl","pendingSuspenseBoundaries","dl","el","fl","gl","hl","il","jl","zj","$k","ll","reportError","ml","_internalRoot","nl","ol","pl","ql","sl","rl","unmount","unstable_scheduleHydration","querySelectorAll","form","tl","usingClientEntryPoint","Events","ul","findFiberByHostInstance","bundleType","rendererPackageName","vl","rendererConfig","overrideHookState","overrideHookStateDeletePath","overrideHookStateRenamePath","overrideProps","overridePropsDeletePath","overridePropsRenamePath","setErrorHandler","setSuspenseHandler","scheduleUpdate","currentDispatcherRef","findHostInstanceByFiber","findHostInstancesForRefresh","scheduleRefresh","scheduleRoot","setRefreshHandler","getCurrentFiber","reconcilerVersion","__REACT_DEVTOOLS_GLOBAL_HOOK__","wl","isDisabled","supportsFiber","inject","createPortal","createRoot","unstable_strictMode","findDOMNode","flushSync","hydrate","hydrateRoot","hydratedSources","_getVersion","unmountComponentAtNode","unstable_batchedUpdates","unstable_renderSubtreeIntoContainer","checkDCE","s","authenticityToken","querySelector","HTMLMetaElement","authenticityHeaders","otherHeaders","__importDefault","mod","isRenderFunction_1","registeredComponents","register","components","warn","component","renderFunction","isRenderer","from","__createBinding","o","k2","desc","writable","__setModuleDefault","__importStar","ClientStartup","handleError_1","ComponentRegistry_1","StoreRegistry_1","serverRenderReactComponent_1","buildConsoleReplay_1","createReactOutput_1","Authenticity_1","context_1","reactHydrateOrRender_1","ctx","DEFAULT_OPTIONS","traceTurbolinks","turbo","ReactOnRails","registerStore","getStore","throwIfMissing","reactHydrateOrRender","domNode","reactElement","setOptions","newOptions","reactOnRailsPageLoaded","option","getStoreGenerator","setStore","store","clearHydratedStores","domNodeId","componentObj","getElementById","getComponent","serverRenderReactComponent","handleError","buildConsoleReplay","storeGenerators","resetOptions","clientStartup","wrapInScriptTags","scriptId","scriptBody","registeredStoreGenerators","hydratedStores","storeKeys","msg","consoleReplay","RenderUtils_1","scriptSanitizedVal_1","history","stringifiedList","level","__spreadArray","to","pack","ar","react_dom_1","isServerRenderResult_1","reactApis_1","REACT_ON_RAILS_STORE_ATTRIBUTE","findContext","debugTurbolinks","_i","turboInstalled","reactOnRailsHtmlElements","getElementsByClassName","initializeStore","railsContext","getAttribute","storeGenerator","domNodeIdForEl","trace","delegateToRenderer","shouldHydrate","reactElementOrRouterResult","isServerRenderHash","rootOrElement","supportsRootApi","roots","parseRailsContext","els","forEachStore","forEachReactOnRailsComponentRender","info","reactOnRailsPageUnloaded","roots_1","renderInit","Turbolinks","supported","controller","isWindow","__REACT_ON_RAILS_EVENT_HANDLERS_RAN_ONCE__","readyState","react_1","_a","serverSide","renderFunctionResult","isPromise","isValidElement","reactComponent","server_1","jsCode","lastLine","shouldBeRenderFunctionError","handleRenderFunctionIssue","fileName","lineNumber","testValue","renderedHtml","redirectLocation","routeError","reactMajorVersion","reactRender","reactHydrate","reactDomClient","__awaiter","thisArg","_arguments","generator","reject","fulfilled","step","rejected","__generator","label","sent","trys","ops","verb","op","_this","renderingReturnsPromises","throwJsErrors","renderResult","hasErrors","renderingError","reactRenderingResult_1","redirectPath","pathname","processServerRenderHash","processReactElement","consoleReplayScript","addRenderingErrors","resultObject","renderError","promiseResult","e_1","_b","html","isAbsolute","spliceOne","list","hasTrailingSlash","toParts","fromParts","isToAbs","isFromAbs","mustEndAbs","up","part","addLeadingSlash","stripBasename","hasBasename","stripTrailingSlash","createPath","hash","createLocation","currentLocation","hashIndex","searchIndex","parsePath","decodeURI","URIError","createTransitionManager","prompt","setPrompt","nextPrompt","confirmTransitionTo","getUserConfirmation","appendListener","fn","isActive","item","notifyListeners","_len","_key","canUseDOM","getConfirmation","confirm","PopStateEvent","HashChangeEvent","getHistoryState","createBrowserHistory","globalHistory","canUseHistory","navigator","userAgent","needsHashChangeListener","_props","_props$forceRefresh","forceRefresh","_props$getUserConfirm","_props$keyLength","keyLength","basename","getDOMLocation","historyState","_ref","_window$location","createKey","transitionManager","setState","nextState","handlePopState","isExtraneousPopstateEvent","handlePop","handleHashChange","forceNextPop","fromLocation","toLocation","toIndex","allKeys","delta","go","revertPop","initialLocation","createHref","listenerCount","checkDOMListeners","isBlocked","pushState","prevIndex","nextKeys","replaceState","goBack","goForward","unblock","listen","unlisten","_classCallCheck","Constructor","_possibleConstructorReturn","ReferenceError","Router","_React$Component","_temp","computeMatch","subClass","superClass","setPrototypeOf","__proto__","_inherits","router","params","isExact","_this2","nextProps","BrowserRouter","_extends","isEmptyChildren","Route","computedMatch","matchPath","nextContext","_context$router","staticContext","Switch","_element$props","pathProp","_withRouter","_withRouter2","_warning2","_interopRequireDefault","_invariant2","_react2","_propTypes2","_matchPath2","count","only","patternCache","cacheCount","compilePath","cacheKey","compiledPattern","_options","_options$exact","_options$strict","_options$sensitive","_compilePath","memo","_pathToRegexp","_pathToRegexp2","_hoistNonReactStatics2","_Route2","wrappedComponentRef","remainingProps","_objectWithoutProperties","routeComponentProps","WrappedComponent","forceUpdate","__self","__source","escape","_status","_result","toArray","Fragment","Profiler","PureComponent","StrictMode","Suspense","cloneElement","createContext","_threadCount","Provider","Consumer","_globalName","createFactory","createRef","forwardRef","lazy","startTransition","unstable_act","sortIndex","performance","setImmediate","startTime","expirationTime","priorityLevel","scheduling","isInputPending","MessageChannel","port2","port1","onmessage","postMessage","unstable_Profiling","unstable_continueExecution","unstable_forceFrameRate","floor","unstable_getFirstCallbackNode","unstable_next","unstable_pauseExecution","unstable_runWithPriority","delay","unstable_wrapCallback","uniqueId","CSS_NUMBER","CSS_NUMBER_KEYS","styleToString","sortTuples","sort","stringifyProperties","properties","interpolate","selector","stylize","styles","rulesList","stylesList","nested","isUnique","hasNestedStyles","nestedStyles","$unique","parseStyles","pid","rules","composeStylize","className","isStyle","Style","Selector","Rule","noopChanges","change","remove","Cache","changes","sheet","changeId","_keys","_children","_counters","getStyles","curIndex","prevItemChangeId","merge","prevChangeId","unmerge","super","rule","len","stringHash","FreeStyle","registerStyle","registerKeyframes","keyframes","registerHashRule","registerRule","registerCss","convertToStyles","subproperties","$displayName","raf","requestAnimationFrame","flattened","objects","objects_1","media","mediaQuery","mediaQuerySections","orientation","minWidth","mediaLength","minHeight","stringMediaQuery","$nest","createFreeStyle","TypeStyle","autoGenerateTag","mustBeValidCSS","_raw","_pendingRawChange","_styleUpdated","_freeStyle","forceRenderStyles","_getTag","fontFace","freeStyle","face","frames","$debugName","convertToKeyframes","reinit","_lastFreeStyleChangeId","setStylesTarget","_tag","stylesheet","classNames_1","classDef","_autoGenerateTag","_pending","_afterAllSync","head","lastChangeId","ts","createTypeStyle","warning","useClickAway","refCb","handler"],"sourceRoot":""}