@inseefr/lunatic 0.3.9-v2 → 0.3.12-v2
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.
- package/lib/index.js +2992 -0
- package/lib/index.js.map +1 -0
- package/package.json +22 -7
- package/src/components/index.js +1 -0
- package/src/stories/questionnaires/logement/source-sequence.json +34180 -33113
- package/src/stories/questionnaires/logement/source.json +34190 -33123
- package/src/index.js +0 -2
package/lib/index.js
ADDED
|
@@ -0,0 +1,2992 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:// attributeNamespace
|
|
2
|
+
// sanitizeURL
|
|
3
|
+
!0});var React=require("react"),PropTypes=require("prop-types");require("lodash.camelcase"),require("snowball");var removeAccents=require("remove-accents");require("string-tokenizer");var trevas=require("@inseefr/trevas"),ReactMarkdown=require("react-markdown"),ReactTooltip=require("react-tooltip"),vtl2_0AntlrTools=require("@inseefr/vtl-2.0-antlr-tools"),antlr4=require("antlr4"),objectHash=require("object-hash"),KeyboardEventHandler=require("react-keyboard-event-handler");function _interopDefaultLegacy(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var React__default=/*#__PURE__*/_interopDefaultLegacy(React),PropTypes__default=/*#__PURE__*/_interopDefaultLegacy(PropTypes),removeAccents__default=/*#__PURE__*/_interopDefaultLegacy(removeAccents),ReactMarkdown__default=/*#__PURE__*/_interopDefaultLegacy(ReactMarkdown),ReactTooltip__default=/*#__PURE__*/_interopDefaultLegacy(ReactTooltip),antlr4__default=/*#__PURE__*/_interopDefaultLegacy(antlr4),objectHash__default=/*#__PURE__*/_interopDefaultLegacy(objectHash),KeyboardEventHandler__default=/*#__PURE__*/_interopDefaultLegacy(KeyboardEventHandler),lunatic=/*#__PURE__*/Object.freeze({__proto__:null,get Table(){return lunaticTable},get useLunatic(){return useLunatic},get Button(){return Button},get Datepicker(){return lunaticDatepicker},get Declarations(){return Declarations},get Dropdown(){return lunaticDropdown},get Input(){return LunaticInput},get InputNumber(){return LunaticInputNumber},get FilterDescription(){return FilterDescription},get Loop(){return Loop},get Modal(){return ModalControls},get Radio(){return LunaticRadioGroup$1},get RosterForLoop(){return Loop},get Sequence(){return Sequence},get Subsequence(){return Subsequence},get Suggester(){return lunaticSuggester},get Switch(){return lunaticSwitch},get Textarea(){return LunaticTextarea},get SuggesterLoaderWidget(){return SuggesterLoaderWidget},get CheckboxGroup(){return lunaticCheckboxGroup},get CheckboxBoolean(){return lunaticCheckboxBoolean},get CheckboxOne(){return LunaticCheckboxOne},get PairwiseBlock(){return PairwiseBlock},get PairwiseLinks(){return PairwiseLinks}});function createCommonjsModule(e,n){return n={exports:{}},e(n,n.exports),n.exports}var classnames=createCommonjsModule(function(e){/*!
|
|
4
|
+
Copyright (c) 2018 Jed Watson.
|
|
5
|
+
Licensed under the MIT License (MIT), see
|
|
6
|
+
http://jedwatson.github.io/classnames
|
|
7
|
+
*/ /* global define */(function(){function n(){for(var e=[],a=0,o;a<arguments.length;a++)if(o=arguments[a],o){var d=typeof o;if("string"===d||"number"===d)e.push(o);else if(Array.isArray(o)){if(o.length){var r=n.apply(null,o);r&&e.push(r)}}else if("object"===d)if(o.toString===Object.prototype.toString)for(var s in o)t.call(o,s)&&o[s]&&e.push(s);else e.push(o.toString())}return e.join(" ")}var t={}.hasOwnProperty;e.exports?(n.default=n,e.exports=n):window.classNames=n})()});function isElement(e){return/*#__PURE__*/React.isValidElement(e)}function styleInject(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===t?a.firstChild?a.insertBefore(i,a.firstChild):a.appendChild(i):a.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var css_248z$l=".button-lunatic {\n min-width: 20%;\n color: white;\n border-color: var(--color-primary-dark);\n background-color: var(--color-primary-dark);\n font-size: 1.2em;\n font-weight: bold;\n padding: 0.4em;\n}\n.button-lunatic:hover, .button-lunatic:focus:hover {\n color: var(--color-primary-dark);\n background-color: white;\n border-color: var(--color-primary-dark);\n}\n.button-lunatic:focus {\n outline: none;\n background-color: var(--color-primary-light);\n border-color: var(--color-primary-light);\n}\n.button-lunatic:disabled {\n background: var(--color-disabled);\n color: var(--color-primary-dark);\n}";styleInject(".button-lunatic {\n min-width: 20%;\n color: white;\n border-color: var(--color-primary-dark);\n background-color: var(--color-primary-dark);\n font-size: 1.2em;\n font-weight: bold;\n padding: 0.4em;\n}\n.button-lunatic:hover, .button-lunatic:focus:hover {\n color: var(--color-primary-dark);\n background-color: white;\n border-color: var(--color-primary-dark);\n}\n.button-lunatic:focus {\n outline: none;\n background-color: var(--color-primary-light);\n border-color: var(--color-primary-light);\n}\n.button-lunatic:disabled {\n background: var(--color-disabled);\n color: var(--color-primary-dark);\n}");function Button(e){var n=e.children,t=e.onClick,a=e.disabled,i=e.label,o=e.className,d=React.useCallback(function(n){n.stopPropagation(),n.preventDefault(),t(n)},[t]);return isElement(n)?/*#__PURE__*/React__default["default"].createElement("button",{disabled:a,type:"button",className:classnames("button-lunatic",o,{disabled:a}),onClick:d},n):/*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment,null,/*#__PURE__*/React__default["default"].createElement("input",{disabled:a,type:"button",className:classnames("button-lunatic",o,{disabled:a}),value:i||n,onClick:d}))}Button.propTypes={value:PropTypes__default["default"].oneOfType([PropTypes__default["default"].string,PropTypes__default["default"].element]),disabled:PropTypes__default["default"].bool,onClick:PropTypes__default["default"].func.isRequired};var css_248z$k=".lunatic-icon {\n display: flex;\n justify-content: center;\n}";styleInject(".lunatic-icon {\n display: flex;\n justify-content: center;\n}");function ClosedIcon$1(e){var n=e.className,t=e.children;return/*#__PURE__*/React__default["default"].createElement("i",{className:classnames("lunatic-icon",n)},t)}function CrossIcon$2(e){var n=e.className,t=e.width,a=void 0===t?32:t,i=e.height,o=void 0===i?32:i;return/*#__PURE__*/React__default["default"].createElement(ClosedIcon$1,{className:n},/*#__PURE__*/React__default["default"].createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:a,height:o,x:"0",y:"0",enableBackground:"new 0 0 32 32",version:"1.1",viewBox:"0 0 32 32",xmlSpace:"preserve"},/*#__PURE__*/React__default["default"].createElement("path",{d:"M 7.097006,7.0709627 C 6.4710386,7.6950801 6.0348033,8.5167883 6,9.3333333 l 6.666666,6.6666677 -6.6666655,6.666666 C 6.0406655,24.255963 7.7002437,25.930395 9.3333333,26 L 15.999999,19.333334 22.666665,26 C 24.255962,25.95934 25.930393,24.299755 26,22.666667 L 19.333332,16.000001 26,9.3333334 C 25.959335,7.7440359 24.299754,6.069605 22.666665,6 L 15.999999,12.666666 9.3333333,6 C 8.5386853,6.020332 7.7229758,6.4468492 7.097006,7.0709627 Z"})))}function ClosedIcon(e){var n=e.className,t=e.width,a=void 0===t?32:t,i=e.height,o=void 0===i?32:i;return/*#__PURE__*/React__default["default"].createElement(ClosedIcon$1,{className:n},/*#__PURE__*/React__default["default"].createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:a,height:o,x:"0",y:"0",enableBackground:"new 0 0 32 32",version:"1.1",viewBox:"0 0 32 32",xmlSpace:"preserve"},/*#__PURE__*/React__default["default"].createElement("path",{d:"m 10.628906,5.8808594 c -0.214987,-0.001 -0.42313,0.066105 -0.621094,0.203125 -0.197929,0.13695 -0.3337126,0.3059125 -0.4082026,0.5078125 -0.07434,0.20177 -0.063157,0.3725087 0.033203,0.5117187 L 10.667969,8.5996094 C 7.7654347,10.429719 6.000564,13.619938 6,17.054688 c 0,5.522849 4.477153,10 10,10 5.522847,0 10,-4.477151 10,-10 C 26.000084,13.846958 24.464581,10.867019 21.925781,9 l -2.167969,4.773438 c 0.779895,0.889532 1.238599,2.0462 1.242188,3.28125 0,2.76142 -2.238576,5 -5,5 -2.761424,0 -5,-2.238581 -5,-5 0.0042,-1.793391 0.969178,-3.443679 2.523438,-4.330079 l 1.089843,1.574219 c 0.09638,0.13927 0.25171,0.209318 0.466797,0.210938 0.215229,10e-4 0.421172,-0.06601 0.619141,-0.203125 0.19792,-0.13696 0.333879,-0.305933 0.408203,-0.507813 l 2.626953,-7.1386718 c 0.07422,-0.2019799 0.06311,-0.3725587 -0.0332,-0.5117187 -0.0963,-0.13917 -0.251768,-0.2093975 -0.4668,-0.2109375 z"})))}function CrossIcon$1(e){var n=e.className,t=e.width,a=void 0===t?32:t,i=e.height,o=void 0===i?32:i;return/*#__PURE__*/React__default["default"].createElement(ClosedIcon$1,{className:n},/*#__PURE__*/React__default["default"].createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:a,height:o,x:"0",y:"0",enableBackground:"new 0 0 32 32",version:"1.1",viewBox:"0 0 32 32",xmlSpace:"preserve"},/*#__PURE__*/React__default["default"].createElement("path",{d:"M 16.211514,6 C 11.574486,6.008 7.1494292,7.94279 4,11.34621 c 0.067313,0.60594 0.3511557,1.08182 1.0781965,1.29181 2.8398143,-3.15866 6.8857655,-4.96513 11.1333175,-4.9708 4.246875,0.008 8.291469,1.81516 11.12987,4.9742 0.42856,-0.18331 0.899659,-0.21808 1.074753,-1.28833 C 25.269539,7.94895 20.847185,6.00922 16.211514,6 Z m 0,3.33452 c -3.859338,0.004 -7.5270269,1.68269 -10.055121,4.59867 0.082129,0.59595 0.3347147,1.09028 1.0747495,1.2918 2.214919,-2.67556 5.5069425,-4.22502 8.9803715,-4.22664 3.472148,0.004 6.761427,1.5572 8.973481,4.23352 0.574616,-0.21997 1.032388,-0.55661 1.081639,-1.30212 -2.528736,-2.91477 -6.196335,-4.59084 -10.05512,-4.59523 z m -0.0034,3.33101 c -3.084894,0.002 -5.995941,1.42878 -7.8883982,3.86498 0.015118,0.87625 0.5660293,1.08257 1.095416,1.31584 1.5613712,-2.20255 4.0931392,-3.51208 6.7929792,-3.51359 2.700508,0.004 5.231123,1.31845 6.789531,3.52395 0.886465,-0.21657 1.135403,-0.70692 1.098867,-1.31932 -1.891063,-2.43881 -4.802322,-3.8677 -7.888395,-3.87186 z m 0,3.33449 c -2.316849,0.002 -4.46631,1.20748 -5.676888,3.18293 L 16.211554,26 21.884999,19.18982 c -1.2089,-1.97805 -3.358668,-3.18598 -5.676885,-3.1898 z"})))}function CrossIcon(e){var n=e.className,t=e.width,a=void 0===t?32:t,i=e.height,o=void 0===i?32:i;return/*#__PURE__*/React__default["default"].createElement(ClosedIcon$1,{className:n},/*#__PURE__*/React__default["default"].createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:a,height:o,x:"0",y:"0",enableBackground:"new 0 0 32 32",version:"1.1",viewBox:"0 0 32 32",xmlSpace:"preserve"},/*#__PURE__*/React__default["default"].createElement("path",{d:"M 15.998805,0 C 15.791758,0 15.614821,0.068587 15.4636,0.2030911 L 10.109162,4.9578137 C 9.95798,5.0923491 9.884566,5.2516109 9.884566,5.4356753 c 0,0.1840189 0.07342,0.3431857 0.224596,0.4778615 0.151203,0.1345354 0.330468,0.2030913 0.537594,0.2030913 h 4.205182 V 14.854326 H 6.1166281 v -4.202792 c 0,-0.2072 -0.068555,-0.388637 -0.2030912,-0.539983 C 5.7788793,9.9602251 5.6197345,9.8845661 5.4356754,9.8845661 c -0.1840494,0 -0.3432982,0.07566 -0.4778615,0.2269849 L 0.2030911,15.4636 C 0.0685559,15.615109 1.2e-6,15.794159 0,16.001195 0,16.208242 0.068592,16.385179 0.2030911,16.5364 l 4.7547228,5.352049 c 0.1345352,0.151182 0.2937975,0.226985 0.4778615,0.226985 0.1840188,0 0.3431856,-0.07581 0.4778615,-0.226985 0.1345353,-0.151203 0.2030912,-0.328079 0.2030912,-0.535205 v -4.205182 h 8.7353099 v 8.73531 h -4.202794 c -0.207124,0 -0.388779,0.06855 -0.539982,0.203092 -0.151179,0.134675 -0.224596,0.293842 -0.224596,0.477861 0,0.184064 0.07341,0.343326 0.224596,0.477862 L 15.4636,31.796909 C 15.614821,31.931407 15.794147,32 16.001195,32 c 0.207036,-1e-6 0.383696,-0.06855 0.535205,-0.203091 l 5.352049,-4.754722 c 0.151326,-0.134563 0.226985,-0.293813 0.226985,-0.477862 0,-0.184058 -0.07566,-0.343204 -0.226985,-0.477861 -0.151346,-0.134536 -0.337561,-0.203092 -0.544762,-0.203092 h -4.198013 v -8.73531 h 8.737698 v 4.202793 c 0,0.207125 0.06855,0.386391 0.203092,0.537594 0.134675,0.151179 0.293842,0.226985 0.477861,0.226985 0.184064,0 0.343326,-0.0758 0.477862,-0.226985 L 31.796909,16.5364 C 31.931407,16.385179 32,16.205853 32,15.998805 31.999999,15.791768 31.93144,15.615109 31.796909,15.4636 L 27.042187,10.111551 C 26.907624,9.9602251 26.748374,9.8845661 26.564325,9.8845661 c -0.184058,0 -0.343204,0.07566 -0.477861,0.2269849 -0.134536,0.151346 -0.203092,0.335171 -0.203092,0.542372 v 4.200403 H 17.145674 V 6.1166281 h 4.200403 c 0.207201,0 0.391026,-0.068557 0.542372,-0.2030913 0.151326,-0.1346576 0.226985,-0.2938028 0.226985,-0.4778615 0,-0.1840494 -0.07566,-0.3432989 -0.226985,-0.4778616 L 16.5364,0.2030911 C 16.384891,0.0685559 16.205841,1.5e-6 15.998805,0 Z"})))}function RadioCheckedIcon(e){var n=e.className,t=e.width,a=void 0===t?32:t,i=e.height,o=void 0===i?32:i;return/*#__PURE__*/React__default["default"].createElement(ClosedIcon$1,{className:n},/*#__PURE__*/React__default["default"].createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:a,height:o,x:"0",y:"0",enableBackground:"new 0 0 32 32",version:"1.1",viewBox:"0 0 32 32",xmlSpace:"preserve"},/*#__PURE__*/React__default["default"].createElement("path",{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),/*#__PURE__*/React__default["default"].createElement("path",{d:"M0 0h24v24H0z",fill:"none"})))}function RadioUncheckedIcon(e){var n=e.className,t=e.width,a=void 0===t?32:t,i=e.height,o=void 0===i?32:i;return/*#__PURE__*/React__default["default"].createElement(ClosedIcon$1,{className:n},/*#__PURE__*/React__default["default"].createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:a,height:o,x:"0",y:"0",enableBackground:"new 0 0 32 32",version:"1.1",viewBox:"0 0 32 32",xmlSpace:"preserve"},/*#__PURE__*/React__default["default"].createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),/*#__PURE__*/React__default["default"].createElement("path",{d:"M0 0h24v24H0z",fill:"none"})))}function CheckboxCheckedIcon(e){var n=e.className,t=e.width,a=void 0===t?32:t,i=e.height,o=void 0===i?32:i;return/*#__PURE__*/React__default["default"].createElement(ClosedIcon$1,{className:n},/*#__PURE__*/React__default["default"].createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:a,height:o,x:"0",y:"0",enableBackground:"new 0 0 32 32",version:"1.1",viewBox:"0 0 32 32",xmlSpace:"preserve"},/*#__PURE__*/React__default["default"].createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),/*#__PURE__*/React__default["default"].createElement("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})))}function CheckboxUncheckedIcon(e){var n=e.className,t=e.width,a=void 0===t?32:t,i=e.height,o=void 0===i?32:i;return/*#__PURE__*/React__default["default"].createElement(ClosedIcon$1,{className:n},/*#__PURE__*/React__default["default"].createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:a,height:o,x:"0",y:"0",enableBackground:"new 0 0 32 32",version:"1.1",viewBox:"0 0 32 32",xmlSpace:"preserve"},/*#__PURE__*/React__default["default"].createElement("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),/*#__PURE__*/React__default["default"].createElement("path",{d:"M0 0h24v24H0z",fill:"none"})))}function CheckboxOption(e){var n=e.disabled,t=e.checked,a=e.id,i=e.value,o=void 0!==i&&i,d=e.onClick,r=e.labelledBy,s=React.useCallback(function(){d(!o)},[o,d]),l=React.useCallback(function(n){var e=n.code;"Space"===e&&s()},[s]),u=t?CheckboxCheckedIcon:CheckboxUncheckedIcon;return/*#__PURE__*/React__default["default"].createElement("div",{className:classnames("checkbox-modality","checkbox-modality-block",{checked:t,disabled:n})},/*#__PURE__*/React__default["default"].createElement("span",{id:a,role:"checkbox",className:"lunatic-input-checkbox","aria-checked":t,tabIndex:"0",onClick:s,onKeyDown:l,"aria-labelledby":r},/*#__PURE__*/React__default["default"].createElement(u,null)))}var css_248z$j="";styleInject("");function Tooltip(e){var n=e.management;return n?/*#__PURE__*/React__default["default"].createElement("div",{className:"tooltip"}):null}function FieldContainer(e){var n=e.children,t=e.management,a=e.value,i=e.id;return/*#__PURE__*/React__default["default"].createElement("div",{className:"field-container"},/*#__PURE__*/React__default["default"].createElement("div",{className:classnames({"field-with-tooltip":t,field:!t})},n),/*#__PURE__*/React__default["default"].createElement(Tooltip,{management:t,value:a,id:i}))}function ownKeys(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function _objectSpread2(e){for(var n=1,t;n<arguments.length;n++)t=null==arguments[n]?{}:arguments[n],n%2?ownKeys(Object(t),!0).forEach(function(n){_defineProperty(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))});return e}function _regeneratorRuntime(){function e(e,n,t){return Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}),e[n]}function n(e,n,i,o){var d=n&&n.prototype instanceof a?n:a,r=Object.create(d.prototype),l=new c(o||[]);return r._invoke=function(e,n,a){var i="suspendedStart";return function(o,d){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===o)throw d;return p()}for(a.method=o,a.arg=d;;){var r=a.delegate;if(r){var l=s(r,a);if(l){if(l===w)continue;return l}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===i)throw i="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);i="executing";var u=t(e,n,a);if("normal"===u.type){if(i=a.done?"completed":"suspendedYield",u.arg===w)continue;return{value:u.arg,done:a.done}}"throw"===u.type&&(i="completed",a.method="throw",a.arg=u.arg)}}}(e,i,l),r}function t(e,n,t){try{return{type:"normal",arg:e.call(n,t)}}catch(e){return{type:"throw",arg:e}}}function a(){}function i(){}function o(){}function d(n){["next","throw","return"].forEach(function(t){e(n,t,function(e){return this._invoke(t,e)})})}function r(e,n){function a(i,o,d,r){var s=t(e[i],e,o);if("throw"!==s.type){var l=s.arg,u=l.value;return u&&"object"==typeof u&&h.call(u,"__await")?n.resolve(u.__await).then(function(e){a("next",e,d,r)},function(e){a("throw",e,d,r)}):n.resolve(u).then(function(e){l.value=e,d(l)},function(e){return a("throw",e,d,r)})}r(s.arg)}var i;this._invoke=function(e,t){function o(){return new n(function(n,i){a(e,t,n,i)})}return i=i?i.then(o,o):o()}}function s(e,n){var a=e.iterator[n.method];if(// last
|
|
8
|
+
void 0===a){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=void 0,s(e,n),"throw"===n.method))return w;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return w}var i=t(a,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,w;var o=i.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,w):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,w)}function l(e){var n={tryLoc:e[0]};1 in e&&(n.catchLoc=e[1]),2 in e&&(n.finallyLoc=e[2],n.afterLoc=e[3]),this.tryEntries.push(n)}function u(e){var n=e.completion||{};n.type="normal",delete n.arg,e.completion=n}function c(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(l,this),this.reset(!0)}function f(e){if(e){var n=e[y];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var t=-1,a=function n(){for(;++t<e.length;)if(h.call(e,t))return n.value=e[t],n.done=!1,n;return n.value=void 0,n.done=!0,n};return a.next=a}}return{next:p}}function p(){return{value:void 0,done:!0}}_regeneratorRuntime=function(){return m};var m={},g=Object.prototype,h=g.hasOwnProperty,b="function"==typeof Symbol?Symbol:{},y=b.iterator||"@@iterator",x=b.asyncIterator||"@@asyncIterator",v=b.toStringTag||"@@toStringTag";try{e({},"")}catch(n){e=function(e,n,t){return e[n]=t}}m.wrap=n;var w={},k={};e(k,y,function(){return this});var E=Object.getPrototypeOf,S=E&&E(E(f([])));S&&S!==g&&h.call(S,y)&&(k=S);var C=o.prototype=a.prototype=Object.create(k);return i.prototype=o,e(C,"constructor",o),e(o,"constructor",i),i.displayName=e(o,v,"GeneratorFunction"),m.isGeneratorFunction=function(e){var n="function"==typeof e&&e.constructor;return!!n&&(n===i||"GeneratorFunction"===(n.displayName||n.name))},m.mark=function(n){return Object.setPrototypeOf?Object.setPrototypeOf(n,o):(n.__proto__=o,e(n,v,"GeneratorFunction")),n.prototype=Object.create(C),n},m.awrap=function(e){return{__await:e}},d(r.prototype),e(r.prototype,x,function(){return this}),m.AsyncIterator=r,m.async=function(e,t,a,i,o){void 0===o&&(o=Promise);var d=new r(n(e,t,a,i),o);return m.isGeneratorFunction(t)?d:d.next().then(function(e){return e.done?e.value:d.next()})},d(C),e(C,v,"Generator"),e(C,y,function(){return this}),e(C,"toString",function(){return"[object Generator]"}),m.keys=function(e){var n=[];for(var t in e)n.push(t);return n.reverse(),function t(){for(;n.length;){var a=n.pop();if(a in e)return t.value=a,t.done=!1,t}return t.done=!0,t}},m.values=f,c.prototype={constructor:c,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(u),!e)for(var n in this)"t"===n.charAt(0)&&h.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){function n(n,a){return d.type="throw",d.arg=e,t.next=n,a&&(t.method="next",t.arg=void 0),!!a}if(this.done)throw e;for(var t=this,a=this.tryEntries.length-1;0<=a;--a){var o=this.tryEntries[a],d=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var r=h.call(o,"catchLoc"),s=h.call(o,"finallyLoc");if(r&&s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(!r){if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}}},abrupt:function(e,n){for(var t=this.tryEntries.length-1,a;0<=t;--t)if(a=this.tryEntries[t],a.tryLoc<=this.prev&&h.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}o&&("break"===e||"continue"===e)&&o.tryLoc<=n&&n<=o.finallyLoc&&(o=null);var d=o?o.completion:{};return d.type=e,d.arg=n,o?(this.method="next",this.next=o.finallyLoc,w):this.complete(d)},complete:function(e,n){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&n&&(this.next=n),w},finish:function(e){for(var n=this.tryEntries.length-1,t;0<=n;--n)if(t=this.tryEntries[n],t.finallyLoc===e)return this.complete(t.completion,t.afterLoc),u(t),w},catch:function(e){for(var n=this.tryEntries.length-1,t;0<=n;--n)if(t=this.tryEntries[n],t.tryLoc===e){var a=t.completion;if("throw"===a.type){var o=a.arg;u(t)}return o}throw new Error("illegal catch attempt")},delegateYield:function(e,n,t){return this.delegate={iterator:f(e),resultName:n,nextLoc:t},"next"===this.method&&(this.arg=void 0),w}},m}function _typeof(e){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function asyncGeneratorStep(e,n,t,a,i,o,d){try{var r=e[o](d),s=r.value}catch(e){return void t(e)}r.done?n(s):Promise.resolve(s).then(a,i)}function _asyncToGenerator(e){return function(){var n=this,t=arguments;return new Promise(function(a,i){function o(e){asyncGeneratorStep(r,a,i,o,d,"next",e)}function d(e){asyncGeneratorStep(r,a,i,o,d,"throw",e)}var r=e.apply(n,t);o(void 0)})}}function _defineProperty(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var n=1,t;n<arguments.length;n++)for(var a in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},_extends.apply(this,arguments)}function _objectWithoutPropertiesLoose(e,n){if(null==e)return{};var t={},a=Object.keys(e),o,d;for(d=0;d<a.length;d++)o=a[d],0<=n.indexOf(o)||(t[o]=e[o]);return t}function _objectWithoutProperties(e,n){if(null==e)return{};var t=_objectWithoutPropertiesLoose(e,n),a,o;if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(e);for(o=0;o<d.length;o++)a=d[o],0<=n.indexOf(a)||Object.prototype.propertyIsEnumerable.call(e,a)&&(t[a]=e[a])}return t}function _slicedToArray(e,n){return _arrayWithHoles(e)||_iterableToArrayLimit(e,n)||_unsupportedIterableToArray(e,n)||_nonIterableRest()}function _toArray(e){return _arrayWithHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableRest()}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterableToArrayLimit(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var a=[],i=!0,o=// attributeNamespace
|
|
9
|
+
// sanitizeURL
|
|
10
|
+
// attributeNamespace
|
|
11
|
+
// sanitizeURL
|
|
12
|
+
// attributeNamespace
|
|
13
|
+
// sanitizeURL
|
|
14
|
+
// attributeNamespace
|
|
15
|
+
// sanitizeURL
|
|
16
|
+
// attributeNamespace
|
|
17
|
+
// sanitizeURL
|
|
18
|
+
// attributeNamespace
|
|
19
|
+
// sanitizeURL
|
|
20
|
+
// attributeNamespace
|
|
21
|
+
// sanitizeURL
|
|
22
|
+
// attributeNamespace
|
|
23
|
+
// sanitizeURL
|
|
24
|
+
// attributeNamespace
|
|
25
|
+
// sanitizeURL
|
|
26
|
+
// attributeNamespace
|
|
27
|
+
// sanitizeURL
|
|
28
|
+
// sanitizeURL
|
|
29
|
+
// sanitizeURL
|
|
30
|
+
// attributeNamespace
|
|
31
|
+
// sanitizeURL
|
|
32
|
+
// sanitizeURL
|
|
33
|
+
!1,d,r;try{for(t=t.call(e);!(i=(d=t.next()).done)&&(a.push(d.value),!(n&&a.length===n));i=!0);}catch(e){o=!0,r=e}finally{try{i||null==t["return"]||t["return"]()}finally{if(o)throw r}}return a}}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,a=Array(n);t<n;t++)a[t]=e[t];return a}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var _excluded$2=["custom"];function createCustomizableLunaticField(e){var n=/*#__PURE__*/React__default["default"].memo(e),t=e.name;return function(e){var a=e.custom,i=_objectWithoutProperties(e,_excluded$2);if("object"===_typeof(a)&&t in a){var o=a[t];return/*#__PURE__*/React__default["default"].createElement(o,i)}return/*#__PURE__*/React__default["default"].createElement(n,e)}}function Label(e){var n=e.children,t=e.id,a=e.htmlFor,i=e.className,o=e.style;return n?/*#__PURE__*/React__default["default"].createElement("label",{htmlFor:a,id:t,className:i,style:o},n):null}var Label$1=createCustomizableLunaticField(Label);function safetyLabel(e){if("string"==typeof e||"boolean"==typeof e||"number"==typeof e)return e;if("object"===_typeof(e)){if(isElement(e))return e;var n=e.value;if("string"==typeof n)return n}return"function"==typeof e?e:""}function Fieldset(e){var n=e.children,t=e.legend;return/*#__PURE__*/React__default["default"].createElement("fieldset",null,/*#__PURE__*/React__default["default"].createElement("legend",null,safetyLabel(t)),n)}var Fieldset$1=createCustomizableLunaticField(Fieldset);function useOnHandleChange(e){var n=e.handleChange,t=e.response,a=e.value,i=React.useCallback(function(e){a!==e&&n(t,e)},[n,t,a]);return i}function useOptionsKeydown(e,n){var t=React.useCallback(function(t){var a=t.key,i=t.index,o=e.length;if("ArrowRight"===a||"ArrowDown"===a){var d=i===o-1?0:i+1;n(e[d].value)}else if("ArrowLeft"===a||"ArrowUp"===a){var r=0===i?o-1:i-1;n(e[r].value)}},[n,e]);return t}var CALLBACKS={};function getSignature(e){var n=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{};return Object.entries(n).reduce(function(e,n){var t=_slicedToArray(n,2),a=t[0],i=t[1];return"".concat(e,"-").concat(a,"-").concat(i)},e)}function createListener(e,n){var t=getSignature(e,n),a=function(n){if(t in CALLBACKS){var e=CALLBACKS[t].callbacks;e.forEach(function(e){e(n)})}};return document.addEventListener(e,a,n),a}function unmount(e,n,t){var a=getSignature(e,t);if(a in CALLBACKS){var i=CALLBACKS[a],o=i.listener,d=i.callbacks,r=d.indexOf(n);CALLBACKS[a].callbacks.splice(r,1),0===CALLBACKS[a].callbacks.length&&(delete CALLBACKS[a],document.removeEventListener(e,o))}}function mount(e,n,t){var a=getSignature(e,t);if(!(a in CALLBACKS)){var i=createListener(e,t);CALLBACKS[a]={listener:i,callbacks:[n]}}else CALLBACKS[a]=_objectSpread2(_objectSpread2({},CALLBACKS[a]),{},{callbacks:[].concat(_toConsumableArray(CALLBACKS[a].callbacks),[n])})}function useDocumentAddEventListener(e,n,t){React.useEffect(function(){return mount(e,n,t),function(){unmount(e,n,t)}},[e,n,t])}function NothingToDisplay(){return/*#__PURE__*/React__default["default"].createElement("div",null,"Nothing to display!")}function createRowOrchestrator(e){return function(n){var t=n.id,a=n.components,i=n.nbRows,o=n.valueMap,d=n.handleChange,r=n.features,s=n.missing,l=n.shortcut,u=n.preferences,c=n.executeExpression,f=n.iteration,p=n.xAxisIterations,m=n.custom;return 0<i?Array(i).fill(null).map(function(n,g){var h=Math.trunc,b=h(g/p);return/*#__PURE__*/React__default["default"].createElement(e,{key:g,id:t,rowIndex:g,components:a,valueMap:o,handleChange:d,executeExpression:c,iteration:f,linksIterations:[b,g%p],custom:m/** */,features:r,shortcut:l,preferences:u,missing:s})}):null}}function isPaginatedLoop(e){var n=e.componentType,t=e.paginatedLoop;return"Loop"===n&&t}function extractSubPages(e){var n=1<arguments.length&&arguments[1]!==void 0?arguments[1]:[],t=e.components;return t.reduce(function(e,n){var t=n.page;return t&&-1===e.indexOf(t)?[].concat(_toConsumableArray(e),[t]):e},n)}function extractLoop(){var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:[];return e.reduce(function(e,n){var t=e.isLoop,a=e.subPages,i=e.iterations,o=e.loopDependencies,d=isPaginatedLoop(n);return d?{isLoop:!0,subPages:extractSubPages(n,a),iterations:i||n.iterations,loopDependencies:o||n.loopDependencies}:{isLoop:t,subPages:a,iterations:i}},{isLoop:!1,subPages:void 0,iterations:void 0,loopDependencies:void 0})}function checkLoops(e){return Object.entries(e).reduce(function(e,n){var t=_slicedToArray(n,2),a=t[0],i=t[1];if("unpaged"!==a){var o=i.components,d=extractLoop(o),r=d.isLoop,s=d.subPages,l=d.iterations,u=d.loopDependencies;return _objectSpread2(_objectSpread2({},e),{},_defineProperty({},a,_objectSpread2(_objectSpread2({},i),{},{isLoop:r,subPages:s,iterations:l,loopDependencies:u})))}return e},{})}function isUnpaginated(e){var n=e.maxPage;return n===void 0}/**
|
|
34
|
+
*
|
|
35
|
+
* @param {*} component: object
|
|
36
|
+
* @param {*} page: string
|
|
37
|
+
* @param {*} map Map<page,{ components: Array<component>, isLoop: boolean, subPages: Array<page> }>
|
|
38
|
+
* @returns
|
|
39
|
+
*/function mergeComponent(e,n,t){if(!n)return _objectSpread2(_objectSpread2({},t),{},{unpaged:[].concat(_toConsumableArray(t.unpaged),[e])});if(n in t){var a=t[n],i=a.components;return _objectSpread2(_objectSpread2({},t),{},_defineProperty({},n,_objectSpread2(_objectSpread2({},a),{},{components:[].concat(_toConsumableArray(i),[e])})))}return _objectSpread2(_objectSpread2({},t),{},_defineProperty({},n,{components:[e]}))}function mergeNestedComponents(e,n){return e.reduce(function(e,n){var t=n.page;return t?mergeComponent(n,t,e):e},n)}/**
|
|
40
|
+
*
|
|
41
|
+
* @param {*} components
|
|
42
|
+
* @returns
|
|
43
|
+
*/function createPages(e){var n=e.components;if(isUnpaginated(e))return{1:{components:n}};// no page -> one page ;)
|
|
44
|
+
var t=n.reduce(function(e,n){var t=n.components,a=n.page;return isPaginatedLoop(n)?mergeComponent(n,a,mergeNestedComponents(t,e)):mergeComponent(n,a,e)},{unpaged:[]});return t}function getComponentsFromState(e){var n=e.pager,t=e.pages,a=e.isInLoop,i=n.page,o=n.subPage;if(i&&t&&i in t){var d=t[i];if(a){var r=d.subPages,s=r[o];if(s in t){var l=t[s],u=l.components;return u}}else{var c=d.components;return c}}return[]}var VTL_ATTRIBUTES=["label","responses.label","hierarchy.label","hierarchy.subSequence.label","hierarchy.sequence.label","declarations.label","controls.control","controls.errorMessage","options.label","lines.min","lines.max","iterations","xAxisIterations","yAxisIterations","body.label","header.label","conditionFilter"];function createCrawl(e){/**
|
|
45
|
+
*
|
|
46
|
+
* @param {*} object
|
|
47
|
+
* @param {*} path
|
|
48
|
+
* @returns
|
|
49
|
+
*/function n(e,n){var t=e[n];return _objectSpread2(_objectSpread2({},e),{},_defineProperty({},n,d(t,{iteration:r,linksIterations:s})))}function t(e,n){return Array.isArray(e)?e.map(function(t){return o(n,t)}):o(n,e)}/**
|
|
50
|
+
*
|
|
51
|
+
* @param {*} object
|
|
52
|
+
* @param {*} array
|
|
53
|
+
* @param {*} path
|
|
54
|
+
* @returns
|
|
55
|
+
*/function a(e,n){var a=_toArray(n),i=a[0],o=a.slice(1);return e[i].reduce(function(e,n){var a=t(n,o);return _objectSpread2(_objectSpread2({},e),{},_defineProperty({},i,[].concat(_toConsumableArray(e[i]),[a])))},_objectSpread2(_objectSpread2({},e),{},_defineProperty({},i,[])))}/**
|
|
56
|
+
*
|
|
57
|
+
* @param {*} object
|
|
58
|
+
* @param {*} path
|
|
59
|
+
* @returns
|
|
60
|
+
*/function i(e,n){var t=_toArray(n),a=t[0],i=t.slice(1);return _objectSpread2(_objectSpread2({},e),{},_defineProperty({},a,o(i,e[a])))}/**
|
|
61
|
+
*
|
|
62
|
+
* @param {*} path
|
|
63
|
+
* @param {*} object
|
|
64
|
+
* @returns
|
|
65
|
+
*/function o(e,t){var o=_toArray(e),d=o[0],r=o.slice(1);if(d in t&&0===r.length)return n(t,d);return d in t?Array.isArray(t[d])?a(t,e):i(t,e):t}var d=e.executeExpression,r=e.iteration,s=e.linksIterations;return o}function fillAttributes(e,n){var t=n.executeExpression,a=n.iteration,i=n.linksIterations,o=createCrawl({executeExpression:t,iteration:a,linksIterations:i});return VTL_ATTRIBUTES.reduce(function(e,n){var t=n.split(".");return _objectSpread2(_objectSpread2({},e),o(t,e,n))},_objectSpread2({},e))}function fillComponentExpressions(e,n){var t=n.pager,a=n.executeExpression,i=t.iteration,o=t.linksIterations;return fillAttributes(e,{executeExpression:a,iteration:i,linksIterations:o})}function fillErrors(e,n){var t=n.errors,a=e.id;return t&&a in t?_objectSpread2(_objectSpread2({},e),{},{error:t[a]}):e}function fillFromState(e,n){var t=n.handleChange,a=n.executeExpression,i=n.preferences;return _objectSpread2(_objectSpread2({},e),{},{handleChange:t,executeExpression:a,preferences:i})}function isInSubPage(e){var n=e.pager,t=n.subPage;return t!==void 0}/* */function mergeResponse(e){var n=e.map,t=e.response,a=e.variables,i=t.name;return i in a?_objectSpread2(_objectSpread2({},n),{},_defineProperty({},i,a[i].value)):n}function collecteArrayResponses(e){var n=e.components,t=e.variables,a=e.map,i=void 0===a?{}:a;return n.reduce(function(e,n){return collecteComponentResponse({component:n,variables:t,map:e})},i)}function collectCell(e){var n=e.cell,t=e.variables,a=e.map,i=_toArray(n),o=i[0],d=i.slice(1),r=o.componentType,s=a;return r&&(s=_objectSpread2(_objectSpread2({},a),collecteComponentResponse({component:o,variables:t,map:a}))),d.length?collectCell({cell:d,variables:t,map:s}):s}function collectTableResponse(e){var n=e.map,t=e.body,a=e.variables;return Array.isArray(t)?t.reduce(function(e,n){return Array.isArray(n)?collectCell({cell:n,variables:a,map:e}):e},n):n}function collecteComponentResponse(e){var n=e.component,t=e.variables,a=e.map,i=void 0===a?{}:a,o=n.components,d=n.response,r=n.responses,s=n.body;return s?collectTableResponse({map:i,body:s,variables:t}):d?mergeResponse({map:i,response:d,variables:t}):o?collecteArrayResponses({components:o,variables:t,map:i}):r?collecteArrayResponses({components:r,variables:t,map:i}):i}/* */function checkArrayForSubPage(e,n){var t=n.pager,a=t.iteration;return Object.entries(e).reduce(function(e,n){var t=_slicedToArray(n,2),i=t[0],o=t[1];return o&&Array.isArray(o)?_objectSpread2(_objectSpread2({},e),{},_defineProperty({},i,o[a])):_objectSpread2(_objectSpread2({},e),{},_defineProperty({},i,o))},{})}function checkUseContext(e,n){return isInSubPage(n)?checkArrayForSubPage(e,n):e}function isSimpleComponent(e){var n=e.response;return"object"===_typeof(n)}/* */function getComponentValue(e,n){var t=n.variables,a=checkUseContext(collecteComponentResponse({component:e,variables:t}),n);/* */if(isSimpleComponent(e)){var i=e.response,o=i.name;return a[o]}return a}function fillComponentValue(e,n){var t=getComponentValue(e,n);return _objectSpread2(_objectSpread2({},e),{},{value:t})}function fillPagination(e,n){var t=n.pager,a=t.iteration;return _objectSpread2(_objectSpread2({},e),{},{iteration:a})}function fillMissingResponse(e,n){var t=e.missingResponse,a=n.variables,i=n.pager.iteration;if(t){var o=t.name;if(o in a){var d=a[o].value,r=i===void 0?d:d[i];return _objectSpread2(_objectSpread2({},e),{},{missingResponse:_objectSpread2(_objectSpread2({},t),{},{value:r})})}}return e}function fillManagement(e,n){var t=n.management;return t?_objectSpread2(_objectSpread2({},e),{},{management:t}):e}function compose$1(){for(var e=arguments.length,n=Array(e),t=0;t<e;t++)n[t]=arguments[t];return n.reduce(function(e,n){return function(t,a){return n(e(t,a),a)}},function(e){return e})}var fillComponent=compose$1(fillErrors,fillFromState,fillComponentExpressions,fillPagination,fillComponentValue,fillMissingResponse,fillManagement);function fillComponents(e,n){return e.map(function(e){return fillComponent(e,n)})}function useComponentsFromState(e){var n=React.useState([]),t=_slicedToArray(n,2),a=t[0],i=t[1];return React.useEffect(function(){var n=e.pager,t=e.pages,a=e.isInLoop,o=getComponentsFromState({pager:n,pages:t,isInLoop:a});i(fillComponents(o,e))},[e]),a}function getPageTag(e){var n=e.page,t=e.subPage,a=e.iteration;return void 0!==t&&void 0!==a?"".concat(n,".").concat(t+1,"#").concat(a+1):"".concat(n)}function isFirstLastPage(e){var n=e.page,t=e.maxPage;return{isFirstPage:"1"===n,isLastPage:n===t}}var Link=function(e){var n=e.href,t=e.children,a=e.title,i=function(){return function(){// if (isFunction(logFunction))
|
|
66
|
+
// logFunction(
|
|
67
|
+
// createObjectEvent(
|
|
68
|
+
// link ? `link-${href}` : `tooltip-${title}`,
|
|
69
|
+
// link ? LINK_CATEGORY : TOOLTIP_CATEGORY,
|
|
70
|
+
// EVENT_CLICK
|
|
71
|
+
// )
|
|
72
|
+
// );
|
|
73
|
+
}};// TODO: reactivate
|
|
74
|
+
return n.trim().startsWith("http")?/*#__PURE__*/React__default["default"].createElement("a",{href:n,target:"_blank",rel:"noreferrer noopener",onClick:i()},t):/*#__PURE__*/React__default["default"].createElement("span",{className:"link-md",onPointerUp:i()},/*#__PURE__*/React__default["default"].createElement("span",{"data-for":"".concat(a,"-tooltip"),"data-tip":a,"data-multiline":!0,className:"field-md"},t),/*#__PURE__*/React__default["default"].createElement(ReactTooltip__default["default"],{id:"".concat(a,"-tooltip"),className:"tooltip-content",place:"bottom",effect:"solid",globalEventOff:"click"}))},renderers=function(e){return{p:function(e){return/*#__PURE__*/React__default["default"].createElement("p",{style:{margin:"0"}},e.children)},a:function(n){return Link(_objectSpread2(_objectSpread2({},e),n))}}},DEFAULT_LOG_FUNCTION=function(){},MdLabel=function(e){var n=e.expression,t=e.logFunction,a=void 0===t?DEFAULT_LOG_FUNCTION:t;return/*#__PURE__*/React__default["default"].createElement(ReactMarkdown__default["default"],{children:n,components:renderers({logFunction:a})})},DK="DK",RF="RF",VTL="VTL",MD="MD",VTL_MD="VTL|MD",X_AXIS="xAxis",Y_AXIS="yAxis",PREVIOUS="PREVIOUS",COLLECTED="COLLECTED",FORCED="FORCED",EDITED="EDITED",INPUTED="INPUTED",CALCULATED="CALCULATED";function isDataSet(e){return e&&"object"===_typeof(e)&&e.dataPoints}function extractDataSetResult(e){var n=e.dataPoints;if(n){var t=n.result;return t}}function executeVtlExpression(e,n){var t=trevas.interpret(e,n);return isDataSet(t)?extractDataSetResult(t):null===t?null:"object"===_typeof(t)?e:t}function executeVTL(n,t,a){if(n)try{return executeVtlExpression(n,t)}catch(i){return a(n,t,i),n}return""}function loggingDefault(n,t,a){"development"===process.env.NODE_ENV&&(console.warn("VTL error : ".concat(n),t),console.warn(a))}function executeExpression(e,n,t,a/* VTL, MD */){var i=4<arguments.length&&arguments[4]!==void 0?arguments[4]:loggingDefault;if(a.includes(VTL)&&t.includes(VTL)){var o=executeVTL(n,e,i);return a.includes(MD)&&t.includes(MD)?/*#__PURE__*/React__default["default"].createElement(MdLabel,{expression:o}):o}return n}function getSafetyExpression(e){return"string"==typeof e?{value:e,type:VTL}:"object"===_typeof(e)&&"value"in e&&!("type"in e)?_objectSpread2(_objectSpread2({},e),{},{type:VTL}):e;// TODO: fix into model and supress this block
|
|
75
|
+
}function getExpressionVariables(e,n){try{var t=new antlr4__default["default"].InputStream(e),a=new vtl2_0AntlrTools.VtlLexer(t);return a.getAllTokens().reduce(function(t,a){var i=a.start,o=a.stop,d=a.type;if(234===d){var r=e.substr(i,o-i+1);if(-1===t.indexOf(r)&&r in n)return[].concat(_toConsumableArray(t),[r])}return t},[])}catch(n){return[]}}function createMemoizer(){function e(e){return Object.entries(e).reduce(function(e,n){var t=_slicedToArray(n,2),a=t[0],i=t[1],o=null===i||void 0===i?void 0:i.result;return o?_objectSpread2(_objectSpread2({},e),{},_defineProperty({},a,o)):_objectSpread2(_objectSpread2({},e),{},_defineProperty({},a,i))},{})}var n=new Map;return[function(t,a,i){var o=e(a),d=objectHash__default["default"](o),r=n.get(t);r||(r=new Map,n.set(t,r)),r.set(d,i)},function(t,a){var i=n.get(t);if(i){var o=e(a),d=objectHash__default["default"](o);return i.get(d)}}]}function createRefreshCalculated(e){function n(e){var n=e.name,t=e.iteration,a=e.linksIterations;return n===X_AXIS?a[0]:n===Y_AXIS?a[1]:t}function t(e){var t=e.expression,a=e.logging,i=e.shapeFrom,r=e.name,s=e.iteration,l=e.linksIterations,u=o(t,{logging:a,iteration:i?n({name:r,iteration:s,linksIterations:l}):void 0});if(i&&void 0!==s){if(void 0===d[r]){var c=d[i],f=c.map(function(e,n){return o(t,{logging:a,iteration:n})});return d[r]=f,f[s]}return Array.isArray(d[r])?(d[r][s]=u,d[r][s]):(console.error("Binding not array! ".concat(d[r]," for ").concat(r)),d[r]=null,null)}return d[r]=u,u}var a=e.variables,o=e.execute,d=e.bindings,r=new Map;return Object.values(a).forEach(function(e){var n=e.variable,t=n.variableType,a=n.name;t===CALCULATED&&r.set(a,n)}),[function(e,n){var i=n.rootExpression,o=n.iteration,s=n.linksIterations;return Object.entries(e).reduce(function(e,n){var l=_slicedToArray(n,2),u=l[0],c=l[1],f=a[u],p=f.variable,m=f.type;if(m===CALCULATED&&r.has(u)){var g=function(n,t,a){"development"===process.env.NODE_ENV&&(console.warn("VTL error when refreshing calculated variable ".concat(u," : ").concat(n.value),{bindings:t}),console.warn("root expression : ".concat(i)),console.warn(a))},h=p.expression,b=p.shapeFrom,y=t({expression:h,logging:g,shapeFrom:b,name:u,iteration:o,linksIterations:s,bindings:d});return(m!==CALCULATED||void 0===o)&&r["delete"](u),_objectSpread2(_objectSpread2({},e),{},_defineProperty({},u,y))}return _objectSpread2(_objectSpread2({},e),{},_defineProperty({},u,c))},{})},function(e,n){r.set(e,n)}]}function getVtlCompatibleValue(e){return void 0===e?null:Array.isArray(e)?{dataStructure:{result:{}},dataPoints:{result:e}}:e}function validateExpression(e){if("object"===_typeof(e)){var n=e.type;if(n===VTL||n===VTL_MD)return e}return"string"==typeof e?{value:e,type:VTL}:void console.warn("Non-VTL compatible expression : ".concat(e))}function createBindings(e){return Object.entries(e).reduce(function(e,n){var t=_slicedToArray(n,2),a=t[0],i=t[1].value;return _objectSpread2(_objectSpread2({},e),{},_defineProperty({},a,i))},{})}/**
|
|
76
|
+
*
|
|
77
|
+
* @param {*} variables
|
|
78
|
+
* @returns
|
|
79
|
+
*/function createExecuteExpression(e,n){/**
|
|
80
|
+
*
|
|
81
|
+
* @param {*} name
|
|
82
|
+
*/function t(n){var t=e[n].CalculatedLinked,a=void 0===t?[]:t;a.forEach(function(e){var n=e.name;x(n,e)})}/**
|
|
83
|
+
*
|
|
84
|
+
* @param {*} name
|
|
85
|
+
* @param {*} value
|
|
86
|
+
*/function a(e,n){e in l&&(l[e]=n,c.set(e,[])),t(e)}function i(n){if(u.has(n))return u.get(n);var t=getExpressionVariables(n,e);return u.set(n,t),t}/**/function o(n){return Array.isArray(n)?n.reduce(function(n,t){if(t in e){var a=e[t],d=a.variable,r=a.type;if(!(t in n)){if("CALCULATED"===r){var s=d.expression,l=i(s);return _objectSpread2(_objectSpread2({},n),{},_defineProperty({},t,_objectSpread2({},d)),o(l))}return _objectSpread2(_objectSpread2({},n),{},_defineProperty({},t,_objectSpread2({},d)))}}else throw new Error("Unknown variable ".concat(t));return n},{}):{}}function d(e,n){var a=n.iteration,i=n.linksIterations,o=l[e];if([X_AXIS,Y_AXIS].includes(e)&&i!==void 0){t(e);var d=_slicedToArray(i,2),r=d[0],s=d[1];return Array.isArray(o)&&r<o.length?o[e===X_AXIS?r:s]:null}return void 0!==a&&Array.isArray(o)?(t(e),a<o.length?o[a]:null):getVtlCompatibleValue(o)}function r(e,n){var t=n.iteration,a=n.linksIterations;return Object.entries(e).reduce(function(e,n){var i=_slicedToArray(n,2),o=i[0];return i[1],_objectSpread2(_objectSpread2({},e),{},_defineProperty({},o,d(o,{iteration:t,linksIterations:a})))},{})}/**
|
|
87
|
+
*
|
|
88
|
+
* @param {*} vtlObject
|
|
89
|
+
* @param {*} args
|
|
90
|
+
* @returns
|
|
91
|
+
*/function s(e){function t(n,t,i){"development"===process.env.NODE_ENV&&(console.warn("VTL error : ".concat(s),_objectSpread2({},a),{bindings:t}),console.warn(i))}var a=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},d=validateExpression(getSafetyExpression(e)),s=d.value,l=d.type,u=a.iteration,c=a.linksIterations,f=a.logging,p=i(s),h=y(r(o(p),{iteration:u,linksIterations:c}),{rootExpression:s,iteration:u,linksIterations:c}),b=g(s,h);if(void 0===b){var x=executeExpression(h,s,l,n,f||t);return m(s,h,x),x}return b}// on aimerait map d'expression, avec les bindings
|
|
92
|
+
var l=createBindings(e),u=new Map,c=new Map,f=createMemoizer(),p=_slicedToArray(f,2),m=p[0],g=p[1],h=createRefreshCalculated({variables:e,execute:s,bindings:l}),b=_slicedToArray(h,2),y=b[0],x=b[1];return[s,a]}function getCompatibleVTLExpression(e){if("string"==typeof e)return{value:e,type:VTL};if("object"===_typeof(e)){var n=e.type;if(n===VTL)return e}console.warn("Non-VTL compatible expression : ".concat(e))}function executeConditionFilter(e,n,t){if(e&&"function"==typeof n){var a=function(){for(var n=arguments.length,t=Array(n),a=0;a<n;a++)t[a]=arguments[a];console.warn(t),console.warn("executeConditionFilter:",e)},i=e.value;return n(getCompatibleVTLExpression(i),{iteration:t,logging:a})}}var STORE_DATA_NAME="store/entities",STORE_INFO_NAME="store/info",STORE_INDEX_NAME="store/entities/index",STORE_INDEX_PATH="searching",MAX_STRING=String.fromCharCode(65535),SEARCH_TYPES={prefix:"search/prefix",tokens:"search/tokens"},CONSTANTES={STORE_DATA_NAME:"store/entities",STORE_INDEX_NAME:STORE_INDEX_NAME,STORE_INDEX_PATH:STORE_INDEX_PATH,MAX_STRING:MAX_STRING,SEARCH_TYPES:SEARCH_TYPES,STORE_INFO_NAME:STORE_INFO_NAME};/* eslint-disable no-restricted-globals */function getIDB(){var e=self||window;return e.indexedDB||e.mozIndexedDB||e.webkitIndexedDB||e.msIndexedDB}var IDB_REF$1=getIDB();function onSuccessDefault(n,e){e(n.result)}function onUpgradeNeededDefault(){throw new Error("Upgrade needed hook required!")}function onErrorDefault(n,e,t){t(n.error)}function createDbOpener(){var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},n=e.onSuccess,t=void 0===n?onSuccessDefault:n,a=e.onUpgradeNeeded,i=void 0===a?onUpgradeNeededDefault:a,o=e.onError,d=void 0===o?onErrorDefault:o;return function(e){var n=1<arguments.length&&arguments[1]!==void 0?arguments[1]:1;return new Promise(function(a,o){IDB_REF$1||o("indexedDb not supported !");var r=IDB_REF$1.open(e,n);r.onupgradeneeded=function(n){i(n,a,o)},r.onsuccess=function(n){t(n,a,o)},r.onerror=function(n){d(n,a,o)}})}}/* eslint-disable no-restricted-globals */function onUpgradeNeeded$1(n,e,t){n.target.transaction.abort(),t({message:"base seems to need an upgrade!"})}function onSuccess$1(n,e){e(n.target.result)}var openDb=createDbOpener({onUpgradeNeeded:onUpgradeNeeded$1,onSuccess:onSuccess$1});function clearStore(){return _clearStore.apply(this,arguments)}function _clearStore(){return _clearStore=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function t(e,n){return _regeneratorRuntime().wrap(function a(t){for(;1;)switch(t.prev=t.next){case 0:new Promise(function(t,a){try{var i=e.transaction(n,"readwrite");i.oncomplete=function(){t(!0)};var o=i.objectStore(n);o.clear()}catch(n){a(n)}});case 1:case"end":return t.stop();}},t)})),_clearStore.apply(this,arguments)}function get$1(e,n,t){return new Promise(function(a,i){var o=e.transaction(n,"readwrite"),d=o.objectStore(n),r=d.get(t);o.onerror=function(){i(o.error)},r.onsuccess=function(){a(r.result)}})}/* eslint-disable no-restricted-globals */function onUpgradeNeeded(n,e,t){try{n.target.onsuccess=function(){// Block success event!
|
|
93
|
+
};var a=n.target.result,i=a.createObjectStore(CONSTANTES.STORE_DATA_NAME,{keyPath:"id"});a.createObjectStore(CONSTANTES.STORE_INFO_NAME,{keyPath:"name"}),i.createIndex(CONSTANTES.STORE_INDEX_NAME,"tokens",{multiEntry:!0});var o=n.target.transaction;o.oncomplete=function(){e(a)}}catch(n){t(n)}}function onSuccess(n,e){e(n.target.result)}createDbOpener({onUpgradeNeeded:onUpgradeNeeded,onSuccess:onSuccess});var BULK_INSERT_MESSAGES={bulkInsertComplete:{type:"bulk-insert/complete"},bulkInsertFinished:{type:"bulk-insert/finished"},bulkInsertError:{type:"bulk-insert/error"}},IDB_REF=getIDB();/* eslint-disable no-restricted-globals */function openStorage(e){var n=1<arguments.length&&arguments[1]!==void 0?arguments[1]:1;return new Promise(function(t,a){IDB_REF||a("indexedDb not supported !");var i=IDB_REF.open(e,n),o=!0,d;i.onupgradeneeded=function(n){o=!1,d=n.target.result;var e=d.createObjectStore(CONSTANTES.STORE_DATA_NAME,{keyPath:"id"});d.createObjectStore(CONSTANTES.STORE_INFO_NAME,{keyPath:"name"}),e.createIndex(CONSTANTES.STORE_INDEX_NAME,"tokens",{multiEntry:!0});var a=n.target.transaction;a.oncomplete=function(){t(d)}},i.onsuccess=function(){o&&t(i.result)},i.onerror=function(n){a(n)}})}function clear$1(e){return _clear$1.apply(this,arguments)}function _clear$1(){return _clear$1=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function n(e){return _regeneratorRuntime().wrap(function t(n){for(;1;)switch(n.prev=n.next){case 0:return n.next=2,clearStore(e,CONSTANTES.STORE_DATA_NAME);case 2:case"end":return n.stop();}},n)})),_clear$1.apply(this,arguments)}function clear(e){return _clear.apply(this,arguments)}function _clear(){return _clear=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function n(e){return _regeneratorRuntime().wrap(function t(n){for(;1;)switch(n.prev=n.next){case 0:return n.next=2,clearStore(e,CONSTANTES.STORE_INFO_NAME);case 2:case"end":return n.stop();}},n)})),_clear.apply(this,arguments)}function updateStoreInfo(e,n){return new Promise(function(t,a){try{var i=e.transaction(CONSTANTES.STORE_INFO_NAME,"readwrite"),o=i.objectStore(CONSTANTES.STORE_INFO_NAME),d=o.add(n);d.onsuccess=function(){t("success")},d.onerror=function(n){a(n)}}catch(n){a(n)}})}function create(e,n){return _create.apply(this,arguments)}function _create(){return _create=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function t(e,n){var a,i;return _regeneratorRuntime().wrap(function o(t){for(;1;)switch(t.prev=t.next){case 0:return a=e.name,t.prev=1,t.next=4,openStorage(a,n);case 4:return i=t.sent,t.next=7,clearStore(i,CONSTANTES.STORE_INFO_NAME);case 7:return t.next=9,updateStoreInfo(i,e);case 9:return t.abrupt("return",i);case 12:throw t.prev=12,t.t0=t["catch"](1),t.t0;case 15:case"end":return t.stop();}},t,null,[[1,12]])})),_create.apply(this,arguments)}function useStoreIndex(e,n){var t=React.useState(void 0),a=_slicedToArray(t,2),i=a[0],o=a[1];return React.useEffect(function(){function t(){return a.apply(this,arguments)}function a(){return a=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function t(){var a;return _regeneratorRuntime().wrap(function i(t){for(;1;)switch(t.prev=t.next){case 0:if(!(e&&n)){t.next=5;break}return t.next=3,create(e,n);case 3:a=t.sent,o(a);case 5:case"end":return t.stop();}},t)})),a.apply(this,arguments)}return t(),function(){}},[e,n]),i}function get(e){return new Promise(function(n,t){try{var a=e.transaction([CONSTANTES.STORE_DATA_NAME],"readonly"),i=a.objectStore(CONSTANTES.STORE_DATA_NAME),o=i.count();o.onsuccess=function(){n(o.result)}}catch(n){t(n)}})}_objectSpread2(_objectSpread2({},BULK_INSERT_MESSAGES),{},{startCreateIndex:{type:"fill-store/start-create-index"},indexBatch:{type:"fill-store/index-batch",max:void 0,done:void 0,percent:void 0},createIndexDone:{type:"fill-store/create-index-done"},//
|
|
94
|
+
storeClear:{type:"fill-store/clear-store"},startInsertBatch:{type:"fill-store/start-insert-bacth"},insertBatchDone:{type:"fill-store/insert-done"},done:{type:"fill-store/done"},error:{type:"fill-store/error"}});// Enable cross domain workers
|
|
95
|
+
var testSameOrigin=function n(e){var t=window.location,i=document.createElement("a");return i.href=e,i.hostname===t.hostname&&i.port===t.port&&i.protocol===t.protocol},createWorkerFallback=function t(n){console.log("Create worker for MFE");var a=null;try{var i;try{i=new Blob(["importScripts('".concat(n,"');")],{type:"application/javascript"})}catch(t){var o=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);o.append("importScripts('".concat(n,"');")),i=o.getBlob("application/javascript")}var d=window.URL||window.webkitURL,r=d.createObjectURL(i);a=new Worker(r)}catch(e){console.error("Lunatic-worker : Failed to load web worker : ".concat(n))}return a},createWorker=function t(n){var a=null;try{testSameOrigin(n)?(a=new Worker(n),a.onerror=function(e){e.preventDefault(),a=createWorkerFallback(n)}):a=createWorkerFallback(n)}catch(t){a=createWorkerFallback(n)}return a},workerPath$1=process.env.LUNATIC_LOADER_WORKER_PATH||process.env.REACT_APP_LUNATIC_LOADER_WORKER_PATH||"workers/lunatic-loader-worker-0.1.0.js";/**
|
|
96
|
+
* Only with Worker
|
|
97
|
+
*/function task$1(e,n){function t(e){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:function(){return null};return new Promise(function(a){l=!0,s.addEventListener("message",function(n){var e=n.data;"success"===e?(!u&&t(),a(e)):i(e)}),s.postMessage({name:o,version:n,fields:d,stopWords:r,entities:e})})}function a(){l&&(u=!0,s.terminate())}var i=2<arguments.length&&arguments[2]!==void 0?arguments[2]:function(){return null},o=e.name,d=e.fields,r=e.stopWords,s=createWorker(workerPath$1),l=!1,u=!1;return[t,a]}function OrchestratedComponent(e){var n=e.id,t=e.component,a=e.handleChange,i=e.features,o=e.missing,d=e.shortcut,r=e.management,s=e.preferences,l=e.value,u=e.iteration,c=e.linksIterations,f=e.executeExpression,p=e.custom,m=t.componentType,g=fillComponentExpressions(t,{executeExpression:f,pager:{iteration:u,linksIterations:c}}),h=lunatic[m],b=null===g||void 0===g?void 0:g.conditionFilter;return m in lunatic&&b?/*#__PURE__*/React__default["default"].createElement(h,_extends({},g,{id:n,handleChange:a,preferences:s,management:r,features:i,missing:o,shortcut:d,value:l,executeExpression:f,custom:p})):null}var KEYBOARD_KEY_CODES={ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",Home:"Home",End:"End",Enter:"Enter",Escape:"Escape",Tab:"Tab"};function ComboBoxContent(e){var n=e.children,t=e.focused,a=e.onFocus,i=e.onBlur,o=e.onKeyDown,d=React.useRef(),r=React.useCallback(function(n){var e=d.current;e.contains(n.target)||i()},[d,i]);useDocumentAddEventListener("mousedown",r);var s=React.useCallback(function(n){var e=n.key;n.stopPropagation();e===KEYBOARD_KEY_CODES.Escape||e===KEYBOARD_KEY_CODES.Enter||e===KEYBOARD_KEY_CODES.Tab?d.current.focus():void 0;o(e)},[o]);return/*#__PURE__*/React__default["default"].createElement("div",{className:classnames("lunatic-combo-box",{focused:t}),onFocus:a,onClick:a,onKeyDown:s,ref:d,tabIndex:"0"},/*#__PURE__*/React__default["default"].createElement("div",{className:classnames("lunatic-combo-box-content",{focused:t})},n))}function displayLabelOrInput(e){var n=/*#__PURE__*/React__default["default"].memo(e),t=e.name;return function a(e){var i=e.editable,o=e.expended,d=!i||!o;return"Input"===t&&!d||"LabelSelection"===t&&d?/*#__PURE__*/React__default["default"].createElement(n,e):null}}function LabelSelection(e){var n=e.labelRenderer,t=e.placeholder,a=e.selectedIndex,i=e.options,o=e.search,d=e.disabled,r=e.labelledBy,s=a===void 0?void 0:i[a];return/*#__PURE__*/React__default["default"].createElement("div",{className:classnames("lunatic-combo-box-selected",{disabled:d}),"aria-labelledby":r},/*#__PURE__*/React__default["default"].createElement(n,{option:s,placeholder:t,search:o}))}var LabelSelection$1=displayLabelOrInput(LabelSelection);function Input$2(e){function n(n){var e=n.key;("ArrowUp"===e||"ArrowDown"===e)&&n.preventDefault()}var t=e.placeholder,a=e.disabled,i=e.onChange,o=e.value,d=e.id,r=e.labelledBy,s=e.focused,l=e.className,u=React.useRef();return React.useEffect(function(){u.current&&s&&u.current.focus()},[u,s]),/*#__PURE__*/React__default["default"].createElement("input",{ref:u,id:d,className:classnames("lunatic-combo-box-input",l),type:"text",onChange:i,value:o,"aria-label":"lunatic-combo-box",title:"combo-box",autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:"false",placeholder:t,disabled:a,"aria-labelledby":r,onKeyDown:n})}var Input$3=displayLabelOrInput(Input$2);function SelectionContainer(e){var n=e.children,t=e.id,a=e.expended,i=e.focused,o=e.disabled,d="lunatic-combo-box-selection-".concat(t);return/*#__PURE__*/React__default["default"].createElement("div",{id:d,className:classnames("lunatic-combo-box-selection",{focused:i,disabled:o}),role:"combobox","aria-controls":"todo","aria-haspopup":"listbox","aria-expanded":a,"aria-autocomplete":"list","aria-owns":d},n)}SelectionContainer.defaultProps={id:"idUndefined"};function Selection(e){var n=e.labelRenderer,t=e.placeholder,a=e.search,i=e.expended,o=e.htmlFor,d=e.disabled,r=e.focused,s=e.onChange,l=e.selectedIndex,u=e.options,c=e.editable,f=e.labelledBy,p=e.id,m=React.useCallback(function(n){s(n.target.value)},[s]);return/*#__PURE__*/React__default["default"].createElement(SelectionContainer,{id:p,"aria-controls":"todo",expanded:i,ariaOwns:"".concat(p,"-list")},/*#__PURE__*/React__default["default"].createElement(LabelSelection$1,{id:o,labelRenderer:n,placeholder:t,editable:c,selectedIndex:l,options:u,search:a,disabled:d,labelledBy:f,expended:i}),/*#__PURE__*/React__default["default"].createElement(Input$3,{id:o,className:"lunatic-combo-box-input",onChange:m,value:a,placeholder:t,disabled:d,focused:r,editable:c,expended:i}))}function PanelContainer(e){var n=e.children,t=e.focused,a=e.expended,i=e.id;return/*#__PURE__*/React__default["default"].createElement("ul",{id:"lunatic-combo-box-panel-".concat(i),"aria-label":"suggestions",className:classnames("lunatic-combo-box-panel",{focused:t,expended:a}),role:"listbox"},n)}function getMin(e){var n=e.top;return n}function getMax(e){var n=e.top,t=e.height;return n+t}function isVisible(e,n){var t=Math.min(getMin(e),getMin(n)),a=Math.max(getMax(e),getMax(n));return!!(a-t<e.height+n.height)}function OptionContainer(e){var n=e.children,t=e.index,a=e.selected,i=e.onSelect,o=React.useRef(),d=React.useCallback(function(n){n.stopPropagation(),n.preventDefault(),i(t)},[i,t]);return React.useEffect(function(){var e=o.current;if(e&&a){var n=e.getBoundingClientRect(),t=e.parentNode.getBoundingClientRect();isVisible(n,t)||e.scrollIntoView()}},[o,a]),/*#__PURE__*/React__default["default"].createElement("li",{className:classnames("lunatic-combo-box-option-container",{selected:a}),role:"option","aria-selected":a,onClick:d,ref:o},n)}function getContent$3(e){var n=e.options,t=e.optionRenderer,a=e.selectedIndex,i=e.expended,o=e.search,d=e.onSelect;return i?n.map(function(e,n){var i=e.id,r=e.value,s=a===n;return/*#__PURE__*/React__default["default"].createElement(OptionContainer,{key:null!==i&&void 0!==i?i:r,index:n,selected:s,onSelect:d},/*#__PURE__*/React__default["default"].createElement(t,{option:e,selected:s,search:o}))}):null}function Panel(e){var n=e.optionRenderer,t=e.options,a=e.focused,i=e.selectedIndex,o=e.expended,d=e.id,r=e.search,s=e.onSelect,l=getContent$3({options:t,optionRenderer:n,selectedIndex:i,expended:o,search:r,onSelect:s});return/*#__PURE__*/React__default["default"].createElement(PanelContainer,{expended:o,focused:a,id:"".concat(d,"-list")},l)}var css_248z$i=".lunatic-fab {\n width: 32px;\n height: 32px;\n border-radius: 50%;\n margin: 0;\n padding: 0;\n outline: inherit;\n border: none;\n background-color: royalblue;\n box-shadow: 0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12);\n}\n.lunatic-fab:hover {\n cursor: pointer;\n background-color: navy;\n transition: background-color 1s;\n}\n.lunatic-fab.mini {\n width: 18px;\n height: 18px;\n}\n.lunatic-fab:focus {\n border: solid 1px black;\n}\n.lunatic-fab:disabled {\n cursor: default;\n background-color: darkgray;\n}";styleInject(".lunatic-fab {\n width: 32px;\n height: 32px;\n border-radius: 50%;\n margin: 0;\n padding: 0;\n outline: inherit;\n border: none;\n background-color: royalblue;\n box-shadow: 0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12);\n}\n.lunatic-fab:hover {\n cursor: pointer;\n background-color: navy;\n transition: background-color 1s;\n}\n.lunatic-fab.mini {\n width: 18px;\n height: 18px;\n}\n.lunatic-fab:focus {\n border: solid 1px black;\n}\n.lunatic-fab:disabled {\n cursor: default;\n background-color: darkgray;\n}");function empty$2(){}function Fab(e){var n=e.className,t=e.children,a=e.tabIndex,i=e.title,o=e.onClick,d=e.onKeyDown,r=e.disabled;return/*#__PURE__*/React__default["default"].createElement("button",{className:classnames("lunatic-fab",n),tabIndex:a,title:i,onClick:o,onKeyDown:d,disabled:r,"aria-label":i},t)}Fab.propTypes={className:PropTypes__default["default"].string,tabIndex:PropTypes__default["default"].string,onClick:PropTypes__default["default"].func,onKeyDown:PropTypes__default["default"].func,title:PropTypes__default["default"].string,disabled:PropTypes__default["default"].bool},Fab.defaultProps={className:void 0,tabIndex:void 0,title:"Fab",onClick:empty$2,disabled:!1,onKeyDown:empty$2};function isDisabled(e){return!e||0===e.trim().length}function createOnKeyDown(n){return"function"==typeof n?function e(t){var a=t.key;"Enter"===a&&n()}:function(){return null}}function Delete(e){var n=e.className,t=e.search,a=e.onClick,i=e.editable,o=React.useMemo(function(){return createOnKeyDown(a)},[a]);return i?/*#__PURE__*/React__default["default"].createElement(Fab,{className:classnames("mini","lunatic-combo-box-fab",n),title:"delete",onClick:a,disabled:isDisabled(t),onKeyDown:o},/*#__PURE__*/React__default["default"].createElement(CrossIcon$2,{className:"lunatic-combo-box-icon"})):null}function ComboBoxContainer(e){var n=e.children,t=e.className,a=e.id,i=e.classStyle;return/*#__PURE__*/React__default["default"].createElement("div",{id:"lunatic-combo-box-container-".concat(a),className:classnames("lunatic-combo-box-container",t,i)},n)}ComboBoxContainer.propTypes={id:PropTypes__default["default"].string.isRequired,className:PropTypes__default["default"].string,classStyle:PropTypes__default["default"].string},ComboBoxContainer.defaultProps={className:void 0,classStyle:"default-style"};var INITIAL_STATE$1={focused:!1,expended:!1,selectedIndex:void 0,search:""},ON_CHANGE="combo-box/on-change",onChange=function n(e){return{type:ON_CHANGE,payload:{search:e}}},ON_SELECT="combo-box/on-select",onSelect=function n(e){return{type:ON_SELECT,payload:{selectedIndex:e}}},ON_KEYDOWN="combo-box/on-keydown",onKeydown=function t(e,n){return{type:ON_KEYDOWN,payload:{key:e,nbOptions:n}}},ON_DELETE="combo-box/on-delete",onDelete=function e(){return{type:ON_DELETE}},ON_FOCUS="combo-box/on-focus",onFocus=function e(){return{type:ON_FOCUS}},ON_BLUR="combo-box/on-blur",onBlur=function e(){return{type:ON_BLUR}},ON_INIT$1="combo-box/on-init",onInit$1=function n(e){var t=_extends({},e);return{type:ON_INIT$1,payload:_objectSpread2({},t)}};function reduceOnFocus(e){return _objectSpread2(_objectSpread2({},e),{},{expended:!0,focused:!0})}function reduceOnBlur(e){return _objectSpread2(_objectSpread2({},e),{},{expended:!1,focused:!1})}function reduceOnChange(e,n){var t=n.payload,a=t.search;return _objectSpread2(_objectSpread2({},e),{},{search:a,selectedIndex:void 0})}function reduceOnSelect(e,n){var t=n.payload,a=t.selectedIndex;return _objectSpread2(_objectSpread2({},e),{},{selectedIndex:a,expended:!1})}function reduceOnDelete(e){return _objectSpread2(_objectSpread2({},e),{},{search:"",selectedIndex:void 0,expended:!1})}function onArrowDown(e,n){var t=Math.min;if(n){var a=e.selectedIndex;return void 0===a?_objectSpread2(_objectSpread2({},e),{},{selectedIndex:0,expended:!0}):_objectSpread2(_objectSpread2({},e),{},{selectedIndex:t(a+1,n-1),expended:!0})}return _objectSpread2(_objectSpread2({},e),{},{expended:!0})}function onArrowUp(e,n){var t=Math.max;if(n){var a=e.selectedIndex;return void 0===a?_objectSpread2(_objectSpread2({},e),{},{selectedIndex:0,expended:!0}):_objectSpread2(_objectSpread2({},e),{},{selectedIndex:t(a-1,0),expended:!0})}return _objectSpread2(_objectSpread2({},e),{},{expended:!0})}function onTab(e){return _objectSpread2(_objectSpread2({},e),{},{expended:!1,focused:!1})}function onHome(e,n){return n?_objectSpread2(_objectSpread2({},e),{},{selectedIndex:0,expended:!0}):_objectSpread2(_objectSpread2({},e),{},{expended:!0})}function onEnd(e,n){return n?_objectSpread2(_objectSpread2({},e),{},{selectedIndex:n-1,expended:!0}):_objectSpread2(_objectSpread2({},e),{},{expended:!0})}function onEnter(e){var n=e.expended;return _objectSpread2(_objectSpread2({},e),{},{expended:!n,focused:!0})}function onEscape(e){return _objectSpread2(_objectSpread2({},e),{},{expended:!1,focused:!0})}function reduceOnKeyDown(e,n){var t=n.payload,a=t.key,i=t.nbOptions;return a===KEYBOARD_KEY_CODES.Tab?onTab(e):a===KEYBOARD_KEY_CODES.ArrowDown?onArrowDown(e,i):a===KEYBOARD_KEY_CODES.ArrowUp?onArrowUp(e,i):a===KEYBOARD_KEY_CODES.Home?onHome(e,i):a===KEYBOARD_KEY_CODES.End?onEnd(e,i):a===KEYBOARD_KEY_CODES.Enter?onEnter(e):a===KEYBOARD_KEY_CODES.Escape?onEscape(e):e}function reduceOnInit$1(e,n){var t=n.payload,a=t.options,i=t.value,o=t.selectedIndex,d=t.getOptionValue;if(Array.isArray(a)&&o===void 0){var r=a.reduce(function(e,n,t){var a=d(n);return i===a?t:e},void 0);return _objectSpread2(_objectSpread2({},e),{},{selectedIndex:r})}return i?e:_objectSpread2(_objectSpread2({},e),{},{selectedIndex:void 0})}function reducer$1(e,n){var t=n.type;return t===ON_FOCUS?reduceOnFocus(e):t===ON_BLUR?reduceOnBlur(e):t===ON_CHANGE?reduceOnChange(e,n):t===ON_SELECT?reduceOnSelect(e,n):t===ON_DELETE?reduceOnDelete(e):t===ON_KEYDOWN?reduceOnKeyDown(e,n):t===ON_INIT$1?reduceOnInit$1(e,n):e}var css_248z$h=".lunatic-combo-box-container {\n position: relative;\n width: 100%;\n}\n.lunatic-combo-box-container.default-style {\n --color-combo-box-selected: Cornsilk;\n --color-primary-dark: DarkGreen;\n --color-primary-main: FloralWhite;\n --color-combo-box-background: snow;\n --color-disabled: Gainsboro;\n --color-primary-light: GreenYellow;\n margin-bottom: 10px;\n}\n.lunatic-combo-box-container.default-style .lunatic-combo-box {\n min-height: 30px;\n min-width: 260px;\n width: 100%;\n}\n.lunatic-combo-box-container.default-style .lunatic-combo-box .lunatic-combo-box-content .lunatic-combo-box-selection {\n border-radius: 5px;\n border: 2px solid var(--color-primary-dark);\n background-color: var(--color-combo-box-background);\n}\n.lunatic-combo-box-container.default-style .lunatic-combo-box .lunatic-combo-box-content .lunatic-combo-box-selection:hover {\n border-color: var(--color-primary-main);\n}\n.lunatic-combo-box-container.default-style .lunatic-combo-box .lunatic-combo-box-content .lunatic-combo-box-selection .lunatic-combo-box-input {\n height: 34;\n line-height: 34px;\n font-size: 15px;\n padding-left: 4px;\n font-family: \"Roboto\", \"Helvetica\", \"Arial\", sans-serif;\n}\n.lunatic-combo-box-container.default-style .lunatic-combo-box .lunatic-combo-box-content .lunatic-combo-box-selection .lunatic-combo-box-input::placeholder {\n color: gray;\n font-family: \"Roboto\", \"Helvetica\", \"Arial\", sans-serif;\n font-size: 15px;\n line-height: 34px;\n vertical-align: middle;\n font-weight: normal;\n}\n.lunatic-combo-box-container.default-style .lunatic-combo-box .lunatic-combo-box-content .lunatic-combo-box-selection .lunatic-combo-box-selected {\n height: 34px;\n line-height: 34px;\n background-color: var(--color-combo-box-background);\n border-radius: 5px;\n padding-left: 4px;\n font-family: \"Roboto\", \"Helvetica\", \"Arial\", sans-serif;\n outline: none;\n display: block;\n color: gray;\n font-family: \"Roboto\", \"Helvetica\", \"Arial\", sans-serif;\n font-size: 15px;\n line-height: 34px;\n vertical-align: middle;\n font-weight: normal;\n}\n.lunatic-combo-box-container.default-style .lunatic-combo-box .lunatic-combo-box-content .lunatic-combo-box-selection .lunatic-combo-box-selected .selection {\n display: inline-block;\n line-height: 34px;\n font-size: 15px;\n}\n.lunatic-combo-box-container.default-style .lunatic-combo-box .lunatic-combo-box-content .lunatic-combo-box-selection .lunatic-combo-box-selected.disabled {\n background-color: var(--color-disabled);\n}\n.lunatic-combo-box-container.default-style .lunatic-combo-box .lunatic-combo-box-content .lunatic-combo-box-panel {\n font-family: \"Roboto\", \"Helvetica\", \"Arial\", sans-serif;\n height: 0;\n opacity: 0;\n background-color: var(--color-combo-box-background);\n transition: opacity 267ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, transform 178ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n}\n.lunatic-combo-box-container.default-style .lunatic-combo-box .lunatic-combo-box-content .lunatic-combo-box-panel.expended {\n border: solid 1px var(--color-primary-light);\n opacity: 1;\n min-height: 30px;\n height: max-content;\n box-shadow: 0 2px 2px grey;\n border-radius: 4px;\n}\n.lunatic-combo-box-container.default-style .lunatic-combo-box .lunatic-combo-box-content .lunatic-combo-box-panel .lunatic-combo-box-option {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n margin-bottom: 0.1em;\n line-height: 2rem;\n display: block;\n}\n.lunatic-combo-box-container.default-style .lunatic-combo-box .lunatic-combo-box-content .lunatic-combo-box-panel .lunatic-combo-box-option.selected {\n color: var(--color-primary-dark);\n background-color: var(--color-combo-box-selected);\n}\n.lunatic-combo-box-container.default-style .lunatic-combo-box .lunatic-combo-box-content .lunatic-combo-box-panel .lunatic-combo-box-option:hover {\n background-color: var(--color-primary-main);\n color: var(--color-combo-box-background);\n}\n.lunatic-combo-box-container .lunatic-combo-box-fab {\n position: absolute;\n right: 4px;\n top: 8px;\n z-index: 0;\n}\n.lunatic-combo-box-container .lunatic-combo-box-fab.focused {\n z-index: 1;\n}\n.lunatic-combo-box-container .lunatic-combo-box-fab .lunatic-icon svg {\n fill: white;\n width: 16px;\n height: 16px;\n}\n.lunatic-combo-box-container .lunatic-combo-box {\n position: relative;\n z-index: 0;\n}\n.lunatic-combo-box-container .lunatic-combo-box:focus {\n outline: none;\n}\n.lunatic-combo-box-container .lunatic-combo-box.focused {\n z-index: 1;\n}\n.lunatic-combo-box-container .lunatic-combo-box .lunatic-combo-box-content {\n position: absolute;\n width: 100%;\n}\n.lunatic-combo-box-container .lunatic-combo-box .lunatic-combo-box-content .lunatic-combo-box-selection {\n position: relative;\n}\n.lunatic-combo-box-container .lunatic-combo-box .lunatic-combo-box-content .lunatic-combo-box-selection .lunatic-combo-box-input {\n border: none;\n margin: 0;\n padding: 0;\n background-color: transparent;\n width: 100%;\n /* */\n}\n.lunatic-combo-box-container .lunatic-combo-box .lunatic-combo-box-content .lunatic-combo-box-selection .lunatic-combo-box-input:focus {\n outline: none;\n}\n.lunatic-combo-box-container .lunatic-combo-box .lunatic-combo-box-content .lunatic-combo-box-selection .lunatic-combo-box-selected {\n top: 0;\n white-space: nowrap;\n overflow-x: hidden;\n width: 100%;\n height: 100%;\n display: none;\n}\n.lunatic-combo-box-container .lunatic-combo-box .lunatic-combo-box-content .lunatic-combo-box-selection .lunatic-combo-box-selected.displayed {\n display: block;\n}\n.lunatic-combo-box-container .lunatic-combo-box .lunatic-combo-box-content ul,\n.lunatic-combo-box-container .lunatic-combo-box .lunatic-combo-box-content li,\n.lunatic-combo-box-container .lunatic-combo-box .lunatic-combo-box-content div,\n.lunatic-combo-box-container .lunatic-combo-box .lunatic-combo-box-content span {\n margin: 0;\n padding: 0;\n border: none;\n list-style: none;\n}\n.lunatic-combo-box-container .lunatic-combo-box .lunatic-combo-box-content .lunatic-combo-box-panel:focus {\n outline: none;\n}\n.lunatic-combo-box-container .lunatic-combo-box .lunatic-combo-box-content .lunatic-combo-box-panel .lunatic-combo-box-option {\n white-space: nowrap;\n -moz-user-select: -moz-none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n}";styleInject(".lunatic-combo-box-container {\n position: relative;\n width: 100%;\n}\n.lunatic-combo-box-container.default-style {\n --color-combo-box-selected: Cornsilk;\n --color-primary-dark: DarkGreen;\n --color-primary-main: FloralWhite;\n --color-combo-box-background: snow;\n --color-disabled: Gainsboro;\n --color-primary-light: GreenYellow;\n margin-bottom: 10px;\n}\n.lunatic-combo-box-container.default-style .lunatic-combo-box {\n min-height: 30px;\n min-width: 260px;\n width: 100%;\n}\n.lunatic-combo-box-container.default-style .lunatic-combo-box .lunatic-combo-box-content .lunatic-combo-box-selection {\n border-radius: 5px;\n border: 2px solid var(--color-primary-dark);\n background-color: var(--color-combo-box-background);\n}\n.lunatic-combo-box-container.default-style .lunatic-combo-box .lunatic-combo-box-content .lunatic-combo-box-selection:hover {\n border-color: var(--color-primary-main);\n}\n.lunatic-combo-box-container.default-style .lunatic-combo-box .lunatic-combo-box-content .lunatic-combo-box-selection .lunatic-combo-box-input {\n height: 34;\n line-height: 34px;\n font-size: 15px;\n padding-left: 4px;\n font-family: \"Roboto\", \"Helvetica\", \"Arial\", sans-serif;\n}\n.lunatic-combo-box-container.default-style .lunatic-combo-box .lunatic-combo-box-content .lunatic-combo-box-selection .lunatic-combo-box-input::placeholder {\n color: gray;\n font-family: \"Roboto\", \"Helvetica\", \"Arial\", sans-serif;\n font-size: 15px;\n line-height: 34px;\n vertical-align: middle;\n font-weight: normal;\n}\n.lunatic-combo-box-container.default-style .lunatic-combo-box .lunatic-combo-box-content .lunatic-combo-box-selection .lunatic-combo-box-selected {\n height: 34px;\n line-height: 34px;\n background-color: var(--color-combo-box-background);\n border-radius: 5px;\n padding-left: 4px;\n font-family: \"Roboto\", \"Helvetica\", \"Arial\", sans-serif;\n outline: none;\n display: block;\n color: gray;\n font-family: \"Roboto\", \"Helvetica\", \"Arial\", sans-serif;\n font-size: 15px;\n line-height: 34px;\n vertical-align: middle;\n font-weight: normal;\n}\n.lunatic-combo-box-container.default-style .lunatic-combo-box .lunatic-combo-box-content .lunatic-combo-box-selection .lunatic-combo-box-selected .selection {\n display: inline-block;\n line-height: 34px;\n font-size: 15px;\n}\n.lunatic-combo-box-container.default-style .lunatic-combo-box .lunatic-combo-box-content .lunatic-combo-box-selection .lunatic-combo-box-selected.disabled {\n background-color: var(--color-disabled);\n}\n.lunatic-combo-box-container.default-style .lunatic-combo-box .lunatic-combo-box-content .lunatic-combo-box-panel {\n font-family: \"Roboto\", \"Helvetica\", \"Arial\", sans-serif;\n height: 0;\n opacity: 0;\n background-color: var(--color-combo-box-background);\n transition: opacity 267ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, transform 178ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n}\n.lunatic-combo-box-container.default-style .lunatic-combo-box .lunatic-combo-box-content .lunatic-combo-box-panel.expended {\n border: solid 1px var(--color-primary-light);\n opacity: 1;\n min-height: 30px;\n height: max-content;\n box-shadow: 0 2px 2px grey;\n border-radius: 4px;\n}\n.lunatic-combo-box-container.default-style .lunatic-combo-box .lunatic-combo-box-content .lunatic-combo-box-panel .lunatic-combo-box-option {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n margin-bottom: 0.1em;\n line-height: 2rem;\n display: block;\n}\n.lunatic-combo-box-container.default-style .lunatic-combo-box .lunatic-combo-box-content .lunatic-combo-box-panel .lunatic-combo-box-option.selected {\n color: var(--color-primary-dark);\n background-color: var(--color-combo-box-selected);\n}\n.lunatic-combo-box-container.default-style .lunatic-combo-box .lunatic-combo-box-content .lunatic-combo-box-panel .lunatic-combo-box-option:hover {\n background-color: var(--color-primary-main);\n color: var(--color-combo-box-background);\n}\n.lunatic-combo-box-container .lunatic-combo-box-fab {\n position: absolute;\n right: 4px;\n top: 8px;\n z-index: 0;\n}\n.lunatic-combo-box-container .lunatic-combo-box-fab.focused {\n z-index: 1;\n}\n.lunatic-combo-box-container .lunatic-combo-box-fab .lunatic-icon svg {\n fill: white;\n width: 16px;\n height: 16px;\n}\n.lunatic-combo-box-container .lunatic-combo-box {\n position: relative;\n z-index: 0;\n}\n.lunatic-combo-box-container .lunatic-combo-box:focus {\n outline: none;\n}\n.lunatic-combo-box-container .lunatic-combo-box.focused {\n z-index: 1;\n}\n.lunatic-combo-box-container .lunatic-combo-box .lunatic-combo-box-content {\n position: absolute;\n width: 100%;\n}\n.lunatic-combo-box-container .lunatic-combo-box .lunatic-combo-box-content .lunatic-combo-box-selection {\n position: relative;\n}\n.lunatic-combo-box-container .lunatic-combo-box .lunatic-combo-box-content .lunatic-combo-box-selection .lunatic-combo-box-input {\n border: none;\n margin: 0;\n padding: 0;\n background-color: transparent;\n width: 100%;\n /* */\n}\n.lunatic-combo-box-container .lunatic-combo-box .lunatic-combo-box-content .lunatic-combo-box-selection .lunatic-combo-box-input:focus {\n outline: none;\n}\n.lunatic-combo-box-container .lunatic-combo-box .lunatic-combo-box-content .lunatic-combo-box-selection .lunatic-combo-box-selected {\n top: 0;\n white-space: nowrap;\n overflow-x: hidden;\n width: 100%;\n height: 100%;\n display: none;\n}\n.lunatic-combo-box-container .lunatic-combo-box .lunatic-combo-box-content .lunatic-combo-box-selection .lunatic-combo-box-selected.displayed {\n display: block;\n}\n.lunatic-combo-box-container .lunatic-combo-box .lunatic-combo-box-content ul,\n.lunatic-combo-box-container .lunatic-combo-box .lunatic-combo-box-content li,\n.lunatic-combo-box-container .lunatic-combo-box .lunatic-combo-box-content div,\n.lunatic-combo-box-container .lunatic-combo-box .lunatic-combo-box-content span {\n margin: 0;\n padding: 0;\n border: none;\n list-style: none;\n}\n.lunatic-combo-box-container .lunatic-combo-box .lunatic-combo-box-content .lunatic-combo-box-panel:focus {\n outline: none;\n}\n.lunatic-combo-box-container .lunatic-combo-box .lunatic-combo-box-content .lunatic-combo-box-panel .lunatic-combo-box-option {\n white-space: nowrap;\n -moz-user-select: -moz-none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n}");var EMPTY_SEARCH="";function getDefaultOptionValue(){var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},n=e.id,t=e.value;return n||t}function ComboBox(e){var n=e.className,t=e.classStyle,a=e.placeholder,i=e.labelledBy,o=e.htmlFor,d=e.editable,r=e.disabled,s=e.id,l=e.optionRenderer,u=e.labelRenderer,c=e.onChange,f=e.onSelect,p=e.value,m=e.options,g=e.messageError,h=e.search,b=e.getOptionValue,y=React.useReducer(reducer$1,_objectSpread2(_objectSpread2({},INITIAL_STATE$1),{},{search:h})),x=_slicedToArray(y,2),v=x[0],w=x[1],k=v.focused,E=v.expended,S=v.search,C=v.selectedIndex,_=v.displayLabel;React.useEffect(function(){w(onInit$1({options:m,value:p,selectedIndex:C,getOptionValue:b}))},[p,C,m,b]);var N=React.useCallback(function(){w(onFocus())},[]),T=React.useCallback(function(){w(onBlur())},[]),R=React.useCallback(function(e){var n=m[e];w(onSelect(e)),f(b(n))},[m,f,b]),P=React.useCallback(function(e){w(onChange(e)),c(e)},[c]),I=React.useCallback(function(e){var n=m.length;w(onKeydown(e,n))},[m]),L=React.useCallback(function(){w(onDelete()),c(EMPTY_SEARCH)},[c]);return g?/*#__PURE__*/React__default["default"].createElement("div",{className:"lunatic-combo-box-message-error"},g):/*#__PURE__*/React__default["default"].createElement(ComboBoxContainer,{id:s,classStyle:t,className:n},/*#__PURE__*/React__default["default"].createElement(ComboBoxContent,{id:s,focused:k,onFocus:N,onBlur:T,onKeyDown:I},/*#__PURE__*/React__default["default"].createElement(Selection,{labelRenderer:u,placeholder:a,labelledBy:i,htmlFor:o,search:S,expended:E,id:s,disabled:r,focused:k,editable:d,selectedIndex:C,options:m,onChange:P,displayLabel:_}),/*#__PURE__*/React__default["default"].createElement(Panel,{optionRenderer:l,value:p,options:m,focused:k,selectedIndex:C,expended:E,id:s,search:S,onSelect:R})),/*#__PURE__*/React__default["default"].createElement(Delete,{className:classnames({focused:k}),search:S,onClick:L,editable:d}))}ComboBox.propTypes={classStyle:PropTypes__default["default"].string,placeholder:PropTypes__default["default"].string,htmlFor:PropTypes__default["default"].string.isRequired,labelledBy:PropTypes__default["default"].string.isRequired,search:PropTypes__default["default"].string,editable:PropTypes__default["default"].bool,onSelect:PropTypes__default["default"].func,onChange:PropTypes__default["default"].func,options:PropTypes__default["default"].array,className:PropTypes__default["default"].string,disabled:PropTypes__default["default"].bool,id:PropTypes__default["default"].string.isRequired,optionRenderer:PropTypes__default["default"].elementType.isRequired,labelRenderer:PropTypes__default["default"].elementType.isRequired,getOptionValue:PropTypes__default["default"].func// value: PropTypes.oneOf([
|
|
98
|
+
// null,
|
|
99
|
+
// PropTypes.oneOfType([
|
|
100
|
+
// PropTypes.string,
|
|
101
|
+
// PropTypes.number,
|
|
102
|
+
// PropTypes.array,
|
|
103
|
+
// PropTypes.bool,
|
|
104
|
+
// ]),
|
|
105
|
+
// ]).isRequired,
|
|
106
|
+
},ComboBox.defaultProps={classStyle:"default-style",placeholder:"Please, do something...",editable:!1,search:"",onSelect:function e(){return null},onChange:function e(){return null},options:[],getOptionValue:getDefaultOptionValue};var ComboBox$1=createCustomizableLunaticField(ComboBox);function Table$1(e){var n=e.className,t=e.id,a=e.children;return/*#__PURE__*/React__default["default"].createElement("table",{id:"table-".concat(t),className:classnames("lunatic-table",n)},a)}Table$1.propTypes={id:PropTypes__default["default"].string.isRequired,className:PropTypes__default["default"].string},Table$1.defaultProps={className:void 0};var HtmlTable=createCustomizableLunaticField(Table$1);function Tbody(e){var n=e.id,t=e.className,a=e.children;return/*#__PURE__*/React__default["default"].createElement("tbody",{id:"lunatic-table-tbody-".concat(n),className:classnames("lunatic-table-tbody",t)},a)}Tbody.propTypes={id:PropTypes__default["default"].string.isRequired,className:PropTypes__default["default"].string},Tbody.defaultProps={className:void 0};var HtmlTbody=createCustomizableLunaticField(Tbody);function Td$1(e){var n=e.id,t=e.children,a=e.row,i=e.index,o=e.className,d=e.colSpan,r=e.rowSpan;return/*#__PURE__*/React__default["default"].createElement("td",{id:"lunatic-table-td-".concat(n,"-").concat(a,"-").concat(i),className:classnames("lunatic-table-td",o),colSpan:d,rowSpan:r},t)}Td$1.propTypes={id:PropTypes__default["default"].string.isRequired,row:PropTypes__default["default"].number.isRequired,index:PropTypes__default["default"].number.isRequired,className:PropTypes__default["default"].string,rowSpan:PropTypes__default["default"].number,colSpan:PropTypes__default["default"].number},Td$1.defaultProps={className:void 0,rowSpan:void 0,colSpan:void 0};var HtmlTd=createCustomizableLunaticField(Td$1);function Th$1(e){var n=e.id,t=e.index,a=e.children,i=e.className,o=e.colSpan,d=e.rowSpan;return/*#__PURE__*/React__default["default"].createElement("th",{id:"lunatic-table-th-".concat(n,"-").concat(t),className:classnames("lunatic-table-th",i),colSpan:o,rowSpan:d},a)}Th$1.propTypes={id:PropTypes__default["default"].string.isRequired,index:PropTypes__default["default"].number.isRequired,className:PropTypes__default["default"].string,rowSpan:PropTypes__default["default"].number,colSpan:PropTypes__default["default"].number},Th$1.defaultProps={className:void 0,rowSpan:void 0,colSpan:void 0};var HtmlTh=createCustomizableLunaticField(Th$1);function Thead(e){var n=e.id,t=e.children,a=e.className;return/*#__PURE__*/React__default["default"].createElement("thead",{id:"lunatic-table-thead-".concat(n),className:classnames("lunatic-table-thead",a)},t)}Thead.propTypes={id:PropTypes__default["default"].string.isRequired,className:PropTypes__default["default"].string},Thead.defaultProps={className:void 0};var HtmlThead=createCustomizableLunaticField(Thead);function Tr(e){var n=e.id,t=e.children,a=e.className,i=e.row;return/*#__PURE__*/React__default["default"].createElement("tr",{id:"lunatic-table-tr-".concat(n,"-").concat(i),className:classnames("lunatic-table-tr",a)},t)}Tr.propTypes={id:PropTypes__default["default"].string.isRequired,row:PropTypes__default["default"].number.isRequired,className:PropTypes__default["default"].string},Tr.defaultProps={className:void 0};var HtmlTr=createCustomizableLunaticField(Tr);function DefaultOptionRenderer(e){var n=e.option,t=e.selected,a=n.id,i=n.value,o=n.label;return o&&o.length?/*#__PURE__*/React__default["default"].createElement("div",{className:classnames("lunatic-combo-box-option",{selected:t})},/*#__PURE__*/React__default["default"].createElement("span",{className:"id"},a||i),o&&/*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment,null,/*#__PURE__*/React__default["default"].createElement("span",null," - "),/*#__PURE__*/React__default["default"].createElement("span",{className:"label"},o))):/*#__PURE__*/React__default["default"].createElement("div",{className:classnames("lunatic-combo-box-option",{selected:t})},/*#__PURE__*/React__default["default"].createElement("span",{className:"id"},a))}function getContent$2(e,n){if(e){var t=e.id,a=e.value,i=e.label;return i?"".concat(t||a," - ").concat(i):t||a}return n&&n.trim().length?n:null}function DefaultLabelRenderer(e){var n=e.option,t=e.placeholder,a=e.search,i=getContent$2(n,a);return i?/*#__PURE__*/React__default["default"].createElement("span",{className:"selection"},i):/*#__PURE__*/React__default["default"].createElement("span",{className:"placeholder"},t)}DefaultLabelRenderer.propTypes={option:PropTypes__default["default"].shape({id:PropTypes__default["default"].oneOfType([PropTypes__default["default"].string,PropTypes__default["default"].number]).isRequired}),placeholder:PropTypes__default["default"].string,search:PropTypes__default["default"].string};var img$2=new Image;img$2.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAAGEMEXHAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAABjUExURf///8Xn9XrH6Va44zKp3Eiy4GW+5b7j9Kja8Bme2CSj2p7W7vH5/UGv34XM69vw+czq9iCh2ZbT7bfg82W94+33/Njt92zB5k+14XPE6On2+4vN6sLl9Mno9i+n3Cum2wAAAIfAWccAAAAhdFJOU///////////////////////////////////////////AJ/B0CEAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAEVSURBVChTVVIBcsMgDFODm2JKIFnTbvv/Ryfb0F11Z4ptWYBSYL8wFBk34A7kLwDCUIbBfkcIHppsM2tIVy61exRoQ0LFaa2NhLSiP7l/MA7no6rsdd+UI5SINQSvZKVsBXSB7N4plnFRyihxxrFdtxeep5qwYRFZx1ZK6735IMrmJSQOZR9sXKWZSKeaVdQVfftOirdG8kHjhXlFxZ0ZWezpwrclo4Q69ZUWZj28BPyobmbCQPYxR6HdE53leLyBpGIGEELHP7GGtB/DIyds+mathZ/BEBefyNSRMJxDwRggcXbMlSlGsPM9uWHpgKnRgPB/zBCd/yStLB3z1hK6wO+8zn7o+7sx47v/s9oOdgdoLAD8AWlNC8M57XWRAAAAAElFTkSuQmCC";var img$1=new Image;img$1.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAZCAMAAAFiGY6DAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAABUUExURf///6zc8Uiy4PH5/d/x+b7j9Bme2DKp3CSj2la442W+5YnN61O34nrH6Z7W7tDr9yCh2bfg8+33/HPE6EGv35bT7U+14czq9nDD56XZ7+n2+wAAAJWny4EAAAAcdFJOU////////////////////////////////////wAXsuLXAAAACXBIWXMAAA7EAAAOxAGVKw4bAAABKElEQVQoU2VSC3bDIAwzJRM0hCb0ldfd/6STDFm7TgnEX2GbGHExQ4PZoc0scT0MgC/6xkqZ+tC0x6y4E4zlU5VAs8I2Wrv0/PL/xzih4gKsCJVB1RZKsvXYrJntG7gXrM/ddgZ3JPDtBRHFSQYG1Ylgy9cUhStwdaGKO6tAdX0wCQi5tUyzK6oYYNHB+aDDBXhHcjtu09uHKgfTYGTUXMRDtCOU7HUU8ShH1CdWdj1FoS/3k+4vyB3Se6KV8tv6Bamm2Z3d+GWvuNmel4WC7A9+OUcV9AKr5PHEJHIxavjui4mOisf0/B7uiqwTrp9/gisa0wuycLTs3zlI2yl7QpTvDR8FlXy3jWq3hqBYjYpXPy/A7Lmu33GIMR1r3z6OPnFngYFXbfYDTw4LkdQNpj4AAAAASUVORK5CYII=";var img=/*#__PURE__*/Object.freeze({__proto__:null,editedImg:img$2,forcedImg:img$1}),css_248z$g="* {\n box-sizing: border-box;\n --color-primary-dark: #2a5885;\n --color-primary-light: #5181b8;\n --color-primary-main: #4a73a4;\n --color-primary-contrast-text: #ffffff;\n --color-secondary-dark: #14202d;\n --color-secondary-light: #f7f8fa;\n --color-secondary-main: #1a293b;\n --color-secondary-contrast-text: #ffffff;\n --color-very-light: #dbe4ef;\n --color-very-very-light: #e6eaee;\n --color-current-item: #0d823e;\n --color-error: #f50c0c;\n --color-disabled: rgb(235, 235, 228);\n --color-prefix: cornflowerblue;\n --color-dropdown-active: rgba(0, 0, 0, 0.04);\n --color-dropdown-selected: rgba(0, 0, 0, 0.08);\n --dropdown-transition-time: 0.5s;\n}\n\n.lunatic-component {\n /* refactor proposition */\n /******/\n}\n.lunatic-component .mandatory:after {\n content: \" *\";\n color: red;\n}\n.lunatic-component .horizontal-options {\n display: inline-block;\n margin-right: 2em;\n}\n.lunatic-component label,\n.lunatic-component legend,\n.lunatic-component .subsequence-lunatic,\n.lunatic-component .lunatic-dropdown-label,\n.lunatic-component .lunatic-dropdown-label focused {\n color: var(--color-primary-dark);\n background-color: var(--color-primary-contrast-text);\n border: 0;\n padding: 0;\n font-size: 0.75rem;\n font-family: \"Roboto\", \"Helvetica\", \"Arial\", sans-serif;\n line-height: 0.75rem;\n font-weight: bold;\n margin-bottom: 0.375rem;\n}\n.lunatic-component .lunatic-component-container {\n display: flex;\n}\n.lunatic-component .lunatic-component-container.label-left-ex {\n flex-direction: row;\n align-items: baseline;\n}\n.lunatic-component .lunatic-component-container.label-left-ex .lunatic-label {\n margin-right: 1em;\n}\n.lunatic-component .lunatic-component-container.label-right-ex {\n flex-direction: row-reverse;\n align-items: baseline;\n}\n.lunatic-component .lunatic-component-container.label-right-ex .lunatic-label {\n margin-left: 1em;\n}\n.lunatic-component .lunatic-component-container.label-top-ex {\n flex-direction: column;\n}\n.lunatic-component .lunatic-component-container.label-bottom-ex {\n flex-direction: column-reverse;\n}\n.lunatic-component .label-top {\n display: flex;\n flex-direction: column;\n}\n.lunatic-component .label-bottom {\n display: flex;\n flex-direction: column-reverse;\n}\n.lunatic-component .label-right {\n justify-content: flex-end;\n display: flex;\n flex-direction: row-reverse;\n align-items: baseline;\n}\n.lunatic-component .label-right :first-child {\n margin-right: 1rem;\n}\n.lunatic-component .label-left {\n display: flex;\n flex-direction: row;\n align-items: baseline;\n}\n.lunatic-component .label-left :first-child {\n margin-right: 1rem;\n}\n.lunatic-component .field-container {\n display: flex;\n}\n.lunatic-component .modality-label p {\n display: inline;\n}\n.lunatic-component .field {\n width: 100%;\n position: relative;\n}\n.lunatic-component .link-md .field-md {\n border-bottom: dashed 0.1em var(--color-primary-dark);\n}\n.lunatic-component .link-md .field-md:hover {\n cursor: help;\n color: var(--color-primary-contrast-text);\n background-color: var(--color-primary-dark);\n}\n\n.lunatic-component-container-test {\n display: flex;\n /* Tooltip container */\n /* Tooltip text */\n}\n.lunatic-component-container-test .lunatic-component-body {\n width: 80%;\n}\n.lunatic-component-container-test .tooltip-lunatic {\n margin: auto;\n width: 20%;\n position: relative;\n display: block;\n margin-left: auto;\n margin-right: auto;\n}\n.lunatic-component-container-test .tooltip-lunatic .tooltip-text {\n min-width: 10em;\n max-width: 20em;\n background-color: var(--color-primary-dark);\n color: #fff;\n padding: 0.5em;\n border-radius: 6px;\n font-size: 1em;\n}\n.lunatic-component-container-test .tooltip-lunatic .tooltip-text.place-left::before {\n border-left: 10px solid var(--color-primary-dark);\n}\n.lunatic-component-container-test .tooltip-lunatic .tooltip-text.place-left::after {\n content: none;\n}";styleInject(css_248z$g);var VariableStatus=function n(e){var t=e.id,a=void 0===t?"":t,i=e.children,o=React.useState(function(){return{imgName:"editedImg",content:[{key:"TODO",value:" coming soon"}]}}),d=_slicedToArray(o,2),r=d[0];d[1];// useEffect(() => {
|
|
107
|
+
// setTooltipElements({ imgName: 'edited', content: 'toto' });
|
|
108
|
+
// }, [response]);
|
|
109
|
+
var s=r.content,l=r.imgName;if(!s)return null;var u=s.map(function(e){var n=e.key,t=e.value;return"".concat(n," : ").concat(t,"<br />")}).join("");return/*#__PURE__*/React__default["default"].createElement("div",{className:"lunatic-component-container-test"},/*#__PURE__*/React__default["default"].createElement("div",{className:"lunatic-component-body"},i),/*#__PURE__*/React__default["default"].createElement("div",{className:"tooltip-lunatic"},/*#__PURE__*/React__default["default"].createElement("span",{"data-for":"".concat(a,"-management-tooltip"),"data-tip":u,"data-multiline":!0},/*#__PURE__*/React__default["default"].createElement("img",{id:a,alt:"img-tooltip",src:img[l]})),/*#__PURE__*/React__default["default"].createElement(ReactTooltip__default["default"],{id:"".concat(a,"-management-tooltip"),className:"tooltip-text",place:"left"})))};VariableStatus.defaultProps={response:{}},VariableStatus.propTypes={id:PropTypes__default["default"].string};var css_248z$f="@charset \"UTF-8\";\n.lunatic-component .lunatic-declarations {\n margin-bottom: 0.4rem;\n}\n.lunatic-component .declaration-instruction {\n font-style: italic;\n font-size: 80%;\n}\n.lunatic-component .declaration-statement {\n font-style: italic;\n font-size: 80%;\n color: blue;\n}\n.lunatic-component .declaration-help {\n font-style: italic;\n font-size: 80%;\n color: green;\n}\n.lunatic-component .declaration-codecard {\n font-style: bold;\n font-size: 80%;\n color: purple;\n}\n.lunatic-component .declaration-message_filter {\n font-size: 100%;\n color: rgb(73, 66, 66);\n}\n.lunatic-component .declaration-message_filter:before {\n content: \"\u2192 \";\n}";styleInject("@charset \"UTF-8\";\n.lunatic-component .lunatic-declarations {\n margin-bottom: 0.4rem;\n}\n.lunatic-component .declaration-instruction {\n font-style: italic;\n font-size: 80%;\n}\n.lunatic-component .declaration-statement {\n font-style: italic;\n font-size: 80%;\n color: blue;\n}\n.lunatic-component .declaration-help {\n font-style: italic;\n font-size: 80%;\n color: green;\n}\n.lunatic-component .declaration-codecard {\n font-style: bold;\n font-size: 80%;\n color: purple;\n}\n.lunatic-component .declaration-message_filter {\n font-size: 100%;\n color: rgb(73, 66, 66);\n}\n.lunatic-component .declaration-message_filter:before {\n content: \"\u2192 \";\n}");function Declaration(e){var n=e.children,t=e.type;return/*#__PURE__*/React__default["default"].createElement("div",{className:classnames("declaration-lunatic","declaration-".concat(t.toLowerCase()))},n)}var Declaration$1=createCustomizableLunaticField(Declaration),DECLARATION_POSITIONS={after:"AFTER_QUESTION_TEXT",before:"BEFORE_QUESTION_TEXT",detachable:"DETACHABLE"};function Declarations(e){var n=e.id,t=e.type,a=e.declarations;e.logFunction;var i=e.custom,o=a.filter(function(e){var n=e.position;return n===t});return 0===o.length?null:/*#__PURE__*/React__default["default"].createElement("div",{id:"declarations-".concat(n,"-").concat(t),className:"lunatic-declarations"},o.map(function(e){var n=e.id,t=e.label,a=e.declarationType;return/*#__PURE__*/React__default["default"].createElement(Declaration$1,{key:"".concat(n),type:a.toLowerCase(),custom:i},t)}))}Declarations.defaultProps={type:"AFTER_QUESTION_TEXT",declarations:[],features:[],bindings:{}},Declarations.propTypes={};function DeclarationsBeforeText(e){return/*#__PURE__*/React__default["default"].createElement(Declarations,_extends({type:DECLARATION_POSITIONS.before},e))}function DeclarationsAfterText(e){return/*#__PURE__*/React__default["default"].createElement(Declarations,_extends({type:DECLARATION_POSITIONS.after},e))}function DeclarationsDetachable(e){return/*#__PURE__*/React__default["default"].createElement(Declarations,_extends({type:DECLARATION_POSITIONS.detachable},e))}/**
|
|
110
|
+
* Based on the locale passed as a paremeter, this function will return
|
|
111
|
+
* the corresponding dictionary.
|
|
112
|
+
*
|
|
113
|
+
* @param {string} lang the lang of the user
|
|
114
|
+
* @param {any} dict
|
|
115
|
+
*/var createDictionary=function t(e,n){return Object.keys(n).reduce(function(a,i){var o=Object.keys(n[i]).find(function(e){return n[i][e]&&"object"===_typeof(n[i][e])&&n[i][e].constructor===Object});return _objectSpread2(_objectSpread2({},a),{},_defineProperty({},i,o?t(e,n[i]):n[i][e]))},{})},firstLang="fr",secondLang="en",getLang=function n(e){return(e||navigator.language||navigator.browserLanguage).split("-")[0]===firstLang?firstLang:secondLang},dictionary={DEFAULT_BUTTON_ADD:{fr:"Ajouter une ligne",en:"Add row"},DEFAULT_BUTTON_REMOVE:{fr:"Supprimer une ligne",en:"Remove row"},DK:{fr:"Ne sais pas",en:"Don't know"},RF:{fr:"Refus",en:"Refused"}},D1=createDictionary("fr",dictionary),D2=createDictionary("en",dictionary),D$1="fr"===getLang()?D1:D2,css_248z$e=".lunatic-component .missing-buttons {\n margin-top: 1em;\n}\n.lunatic-component .missing-buttons .button-lunatic {\n width: 4em;\n font-size: 1em;\n font-weight: normal;\n}\n.lunatic-component .missing-buttons .missing-button .button-lunatic {\n background-color: var(--color-very-very-light);\n color: var(--color-primary-dark);\n}\n.lunatic-component .missing-buttons .missing-button .button-lunatic:hover {\n background-color: white;\n color: var(--color-primary-main);\n}\n.lunatic-component .missing-buttons .missing-button-active .button-lunatic {\n background-color: var(--color-primary-dark);\n color: var(--color-very-very-light);\n}\n.lunatic-component .missing-buttons .missing-button-active .button-lunatic:hover {\n background-color: var(--color-primary-main);\n color: white;\n}";/**
|
|
116
|
+
* This function will return only the lang part of a locale
|
|
117
|
+
* For example, with fr-FR, will return fr
|
|
118
|
+
* If the lang is not fr, will return en
|
|
119
|
+
* @param {string} lang the lang of the user
|
|
120
|
+
*/styleInject(css_248z$e);var DEFAULT_SHORTCUT={dontKnow:"",refused:""},Missing=function n(e){var t=e.dontKnowButton,a=void 0===t?D$1.DK:t,i=e.refusedButton,o=void 0===i?D$1.RF:i,d=e.missingResponse,r=e.handleChange,s=e.missingStrategy,l=e.missingShortcut,u=void 0===l?DEFAULT_SHORTCUT:l,c=e.shortcut,f=e.componentType,p=e.paginatedLoop,m=d.value,g=useOnHandleChange({handleChange:r,response:d,value:m}),h=React.useCallback(function(){s&&s()},[s]),b=React.useCallback(function(){g(DK),h()},[g,h]),y=React.useCallback(function(){g(RF),h()},[g,h]);return"Loop"===f&&p||!d?null:/*#__PURE__*/React__default["default"].createElement("div",{className:"missing-buttons"},/*#__PURE__*/React__default["default"].createElement("span",{className:"missing-button".concat(m===DK?"-active":""," missing-button-dk").concat(m===DK?"-active":"")},/*#__PURE__*/React__default["default"].createElement(Button,{label:a,onClick:b})),/*#__PURE__*/React__default["default"].createElement("span",{className:"missing-button".concat(m===RF?"-active":""," missing-button-rf").concat(m===RF?"-active":"")},/*#__PURE__*/React__default["default"].createElement(Button,{label:o,onClick:y})),c&&u&&u.dontKnow&&u.refused&&/*#__PURE__*/React__default["default"].createElement(KeyboardEventHandler__default["default"],{handleKeys:Object.values(u),onKeyEvent:function e(n,t){t.preventDefault(),n===u.dontKnow&&g(DK)(),n===u.refused&&g(RF)()},handleFocusableElements:!0}))};function LunaticComponent(e){var n=e.id,t=e.labelId,a=e.inputId,i=e.label,o=e.custom,d=e.preferences,r=e.declarations,s=e.className,l=e.value,u=e.children,c=e.missing,f=e.missingResponse,p=e.management,m=/*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment,null,/*#__PURE__*/React__default["default"].createElement(DeclarationsBeforeText,{declarations:r,custom:o}),/*#__PURE__*/React__default["default"].createElement(Label$1,{id:t,htmlFor:a,className:s,custom:o},safetyLabel(i)),/*#__PURE__*/React__default["default"].createElement(DeclarationsAfterText,{declarations:r,custom:o}),/*#__PURE__*/React__default["default"].createElement(FieldContainer,{value:l,id:n,custom:o,preferences:d},u),/*#__PURE__*/React__default["default"].createElement(DeclarationsDetachable,{declarations:r,custom:o}),c&&f&&/*#__PURE__*/React__default["default"].createElement(Missing,e));return p?/*#__PURE__*/React__default["default"].createElement(VariableStatus,null,m):m}function LunaticFieldsetComponent(e){var n=e.id,t=e.label,a=e.custom,i=e.preferences,o=e.declarations,d=e.value,r=e.children,s=e.missingResponse,l=e.missing,u=e.management,c=/*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment,null,/*#__PURE__*/React__default["default"].createElement(DeclarationsBeforeText,{declarations:o,custom:a}),/*#__PURE__*/React__default["default"].createElement(FieldContainer,{value:d,id:n,custom:a,preferences:i},/*#__PURE__*/React__default["default"].createElement(Fieldset$1,{legend:t,custom:a},/*#__PURE__*/React__default["default"].createElement(DeclarationsAfterText,{declarations:o,custom:a}),r)),/*#__PURE__*/React__default["default"].createElement(DeclarationsDetachable,{declarations:o,custom:a}),l&&s&&/*#__PURE__*/React__default["default"].createElement(Missing,e));return u?/*#__PURE__*/React__default["default"].createElement(VariableStatus,null,c):c}/*
|
|
121
|
+
Pour le moment HOC utilisé pour :
|
|
122
|
+
Input
|
|
123
|
+
InputNumber
|
|
124
|
+
DatePicker
|
|
125
|
+
Switch
|
|
126
|
+
Dropdown
|
|
127
|
+
Suggester
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
*/function getComponent(e){return e?LunaticFieldsetComponent:LunaticComponent}function createLunaticComponent(e){var n=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},t=n.labelId,a=void 0===t?"lunatic-label":t,i=n.inputId,o=void 0===i?"lunatic-input":i,d=n.fieldset,r=void 0!==d&&d,s=/*#__PURE__*/React__default["default"].memo(e);return function n(e){var t=e.id,i=e.value,d=e.handleChange,l=e.response,u="".concat(o,"-").concat(t),c="".concat(a,"-").concat(t),f=getComponent(r),p=useOnHandleChange({handleChange:d,response:l,value:i});return/*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment,null,/*#__PURE__*/React__default["default"].createElement(f,_extends({},e,{labelId:c,inputId:u}),/*#__PURE__*/React__default["default"].createElement(s,_extends({},e,{onChange:p,id:u,labelId:c}))))}}function onClick(){}function CheckBoxOptionWrapper(e){var n=e.checkboxId,t=e.labelId,a=e.checked,i=e.value,o=e.onKeyDown,d=e.handleChange,r=e.response,s=i||!1,l=useOnHandleChange({handleChange:d,response:r,value:s});// const onClickOption = useCallback(
|
|
131
|
+
// function (valueOption) {
|
|
132
|
+
// handleChange(response, !valueOption);
|
|
133
|
+
// },
|
|
134
|
+
// [handleChange, response]
|
|
135
|
+
// );
|
|
136
|
+
return/*#__PURE__*/React__default["default"].createElement(CheckboxOption,{id:n,labelledBy:t,checked:a,onClick:l,value:s,onKeyDown:o})}function CheckboxGroupContainer(e){var n=e.children;return/*#__PURE__*/React__default["default"].createElement("div",{className:"lunatic-checkbox-group-option"},n)}function CheckboxGroup(e){var n=e.options,t=e.value,a=e.id,i=e.handleChange;return n.map(function(e,n){var o=e.label,d=e.response;if(d&&t){var r=d.name;if(r in t){var s=t[r],l="lunatic-checkbox-".concat(a,"-").concat(r),u="lunatic-checkbox-label-".concat(a,"-").concat(r);return/*#__PURE__*/React__default["default"].createElement(CheckboxGroupContainer,{key:l},/*#__PURE__*/React__default["default"].createElement(Label$1,{id:u,htmlFor:l},o),/*#__PURE__*/React__default["default"].createElement(CheckBoxOptionWrapper,{checkboxId:l,labelId:u,checked:s,value:s,onKeyDown:onClick,response:d,handleChange:i}))}}return null})}var CheckboxGroup$1=createCustomizableLunaticField(CheckboxGroup);function LunaticCheckboxGroup(e){var n=e.id,t=e.value,a=e.responses,i=e.custom,o=e.handleChange;return/*#__PURE__*/React__default["default"].createElement(CheckboxGroup$1,{id:n,options:a,value:t,handleChange:o,custom:i})}var lunaticCheckboxGroup=createLunaticComponent(LunaticCheckboxGroup,{fieldset:!0,inputId:"lunatic-checkbox-group"});function CheckboxBoolean(e){var n=e.checked,t=e.id,a=e.disabled,i=e.onClick,o=e.labelId;return/*#__PURE__*/React__default["default"].createElement(CheckboxOption,{disabled:a,checked:n,id:t,onClick:i,labelledBy:o,value:n})}var CheckboxBoolean$1=createCustomizableLunaticField(CheckboxBoolean);function LunaticCheckboxBoolean(e){var n=e.value,t=e.id,a=e.options,i=e.disabled,o=e.onChange,d=e.custom;return/*#__PURE__*/React__default["default"].createElement(CheckboxBoolean$1,{id:t,options:a,checked:n,onClick:o,disabled:i,custom:d})}LunaticCheckboxBoolean.defaultProps={value:!1};var lunaticCheckboxBoolean=createLunaticComponent(LunaticCheckboxBoolean,{fieldset:!0,inputId:"lunatic-checkbox-boolean"});function getIcon(e,n){return e?n?CheckboxCheckedIcon:RadioCheckedIcon:n?CheckboxUncheckedIcon:RadioUncheckedIcon}function RadioOption(e){var n=e.checked,t=e.onClick,a=e.value,i=e.id,o=e.disabled,d=e.onKeyDown,r=e.index,s=e.labelledBy,l=e.checkboxStyle,u=React.useRef(),c=getIcon(n,l),f=n?"0":"-1",p=React.useCallback(function(){t(a)},[a,t]),m=React.useCallback(function(n){var e=n.key,t=u.current;d({key:e,index:r}),t.blur()},[d,r,u]);return React.useEffect(function(){var e=u.current;e&&n&&e.focus()},[n,u,a]),/*#__PURE__*/React__default["default"].createElement("div",{className:classnames("radio-modality","radio-modality-block",{checked:n,disabled:o})},/*#__PURE__*/React__default["default"].createElement("span",{id:i,role:"radio",className:"lunatic-input-radio","aria-checked":n,tabIndex:f,onClick:p,onKeyDown:m,"aria-labelledby":s,ref:u},/*#__PURE__*/React__default["default"].createElement(c,null)))}function Radio(e){var n=e.options,t=e.value,a=e.id,i=e.onClick,o=e.checkboxStyle,d=void 0!==o&&o,r=useOptionsKeydown(n,i);return n.map(function(e,n){var o=e.value,s=e.label,l="lunatic-radio-".concat(a,"-").concat(o),u="lunatic-radio-label-".concat(a,"-").concat(o);return/*#__PURE__*/React__default["default"].createElement("div",{key:l,className:"lunatic-radio-group-option"},/*#__PURE__*/React__default["default"].createElement(Label$1,{id:u,htmlFor:l},s),/*#__PURE__*/React__default["default"].createElement(RadioOption,{id:l,labelledBy:u,index:n,checked:t===o,onClick:i,value:o,onKeyDown:r,checkboxStyle:d}))})}var RadioGroup=createCustomizableLunaticField(Radio),css_248z$d="";styleInject(css_248z$d);function LunaticRadioGroup(e){var n=e.id,t=e.options,a=e.value,i=e.onChange,o=e.checkboxStyle,d=e.custom;return/*#__PURE__*/React__default["default"].createElement(RadioGroup,{id:n,options:t,value:a,onClick:i,checkboxStyle:o,custom:d})}var LunaticRadioGroup$1=createLunaticComponent(LunaticRadioGroup,{fieldset:!0,inputId:"lunatic-radio-group"});function LunaticCheckboxOne(e){return/*#__PURE__*/React__default["default"].createElement(LunaticRadioGroup$1,_extends({},e,{checkboxStyle:!0}))}var css_248z$c="";styleInject("");function Datepicker(e){var n=e.disabled,t=e.readOnly,a=e.value,i=e.onChange,o=e.labelId,d=e.id,r=React.useCallback(function(n){var e=n.target.value;i(e)},[i]);return/*#__PURE__*/React__default["default"].createElement("input",{id:d,className:classnames("lunatic-datepicker",{disabled:n,readOnly:t}),type:"date",labelledby:o,readOnly:t,disabled:n,value:a,onChange:r})}var lunaticDatepicker=createLunaticComponent(Datepicker,{inputId:"lunatic-datepicker"});function SimpleOptionRenderer(e){var n=e.option,t=e.selected,a=n.value,i=n.label;return i&&i.length?/*#__PURE__*/React__default["default"].createElement("div",{className:classnames("lunatic-dropdown-option",{selected:t})},/*#__PURE__*/React__default["default"].createElement("span",{className:"id"},a),i&&/*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment,null,/*#__PURE__*/React__default["default"].createElement("span",null,"\xA0\u2014\xA0"),/*#__PURE__*/React__default["default"].createElement("span",{className:"label"},i))):/*#__PURE__*/React__default["default"].createElement("div",{className:classnames("lunatic-dropdown-option",{selected:t})},/*#__PURE__*/React__default["default"].createElement("span",{className:"id"},a))}function getContent$1(e,n){if(e){var t=e.value,a=e.label;return a?"".concat(t," - ").concat(a):t}return n&&n.trim().length?n:null}function SimpleLabelRenderer(e){var n=e.option,t=e.placeholder,a=e.search,i=getContent$1(n,a);return i?/*#__PURE__*/React__default["default"].createElement("span",{className:"selection"},i):/*#__PURE__*/React__default["default"].createElement("span",{className:"placeholder"},t)}SimpleLabelRenderer.propTypes={option:PropTypes__default["default"].shape({value:PropTypes__default["default"].oneOfType([PropTypes__default["default"].string,PropTypes__default["default"].number]).isRequired}),placeholder:PropTypes__default["default"].string,search:PropTypes__default["default"].string};function DropdownSimple(e){var n=e.id,t=e.htmlFor,a=e.labelId,i=e.disabled,o=e.options,d=e.onSelect,r=e.className,s=e.value;return/*#__PURE__*/React__default["default"].createElement(ComboBox$1,{id:n,className:r,htmlFor:t,labelledBy:a,disabled:i,options:o,editable:!1,onSelect:d,optionRenderer:SimpleOptionRenderer,labelRenderer:SimpleLabelRenderer,value:s})}function preparePrefix(e){return"string"==typeof e?removeAccents__default["default"](e.toLowerCase()).replace(/[- ']/g,""):e}function lettersMatching(e){var n=1<arguments.length&&arguments[1]!==void 0?arguments[1]:"",t=n.split(""),i=-1,o=preparePrefix(e);return o.split("").reduce(function(e,n,a){return i<t.length&&t[i+1]===n?(i++,[].concat(_toConsumableArray(e),[n])):e},[])}function hightlightSearch(e,n){var t=lettersMatching(e,n);return e.split("").reduce(function(e,n){var t=e.letters,a=e.stack,i=preparePrefix(n),o=_toArray(t),d=o[0],r=o.slice(1);return i===d?{letters:r,stack:[].concat(_toConsumableArray(a),[{char:n,className:"prefix"}])}:{letters:t,stack:[].concat(_toConsumableArray(a),[{char:n,className:"normal"}])}},{letters:t,stack:[]}).stack.reduce(function(e,n){var t=e.last,a=e.stack,i=n.char,o=n.className;if(!t)return{last:o,stack:[{part:i,className:o}]};if(t!==o)return{last:o,stack:[{part:i,className:o}].concat(_toConsumableArray(a))};var d=_toArray(a),r=d[0],s=d.slice(1);return{last:o,stack:[_objectSpread2(_objectSpread2({},r),{},{part:"".concat(r.part).concat(i)})].concat(_toConsumableArray(s))}},{last:void 0,stack:[]}).stack.reverse()}function WritableOptionRenderer(e){var n=e.option,t=e.selected,a=e.search,i=React.useState([]),o=_slicedToArray(i,2),d=o[0],r=o[1],s=n.value,l=n.label;return React.useEffect(function(){r(hightlightSearch(l,a))},[a,l]),d&&d.length?/*#__PURE__*/React__default["default"].createElement("div",{className:classnames("lunatic-dropdown-option",{selected:t})},/*#__PURE__*/React__default["default"].createElement("span",{className:"id"},s),/*#__PURE__*/React__default["default"].createElement("span",null,"\xA0\u2014\xA0"),/*#__PURE__*/React__default["default"].createElement("span",{className:"label"},d.map(function(e,n){var t=e.part,a=e.className;return/*#__PURE__*/React__default["default"].createElement("span",{className:a,key:n},t)}))):/*#__PURE__*/React__default["default"].createElement("div",{className:classnames("lunatic-dropdown-option",{selected:t})},/*#__PURE__*/React__default["default"].createElement("span",{className:"id"},s))}function getContent(e,n){if(e){var t=e.value,a=e.label;return a?"".concat(t," - ").concat(a):t}return n&&n.trim().length?n:null}function WritableLabelRenderer(e){var n=e.option,t=e.placeholder,a=e.search,i=getContent(n,a);return i?/*#__PURE__*/React__default["default"].createElement("span",{className:"selection"},i):/*#__PURE__*/React__default["default"].createElement("span",{className:"placeholder"},t)}WritableLabelRenderer.propTypes={option:PropTypes__default["default"].shape({value:PropTypes__default["default"].oneOfType([PropTypes__default["default"].string,PropTypes__default["default"].number]).isRequired}),placeholder:PropTypes__default["default"].string,search:PropTypes__default["default"].string};function match(e,n){var t=n.split(""),i=-1,o=preparePrefix(e);return o.split("").reduce(function(e,n,a){return i<t.length&&t[i+1]===n?(i++,e+1):e/(1e-4*a+1)},0)/n.length}/** */function filterOptions(e,n){return n&&0!==n.length?e.reduce(function(e,t){var a=t.label,i=t.search,o=match(i||a,n);return .6<=o?[{o:t,how:o}].concat(_toConsumableArray(e)).sort(function(e,n){return e.how<=n.how}):e},[]).map(function(e){var n=e.o;return n}):e}function DropdownWritable(e){var n=e.id,t=e.htmlFor,a=e.labelId,i=e.disabled,o=e.options,d=e.onSelect,r=e.className,s=e.value,l=React.useState(o),u=_slicedToArray(l,2),c=u[0],f=u[1],p=React.useCallback(function(e){e?f(filterOptions(o,e)):f(o),d(null)},[o,d]);return/*#__PURE__*/React__default["default"].createElement(ComboBox$1,{id:n,className:r,htmlFor:t,labelledBy:a,disabled:i,options:c,onSelect:d,onChange:p,optionRenderer:WritableOptionRenderer,labelRenderer:WritableLabelRenderer,editable:!0,value:s})}var css_248z$b=".lunatic-component .lunatic-dropdown .lunatic-dropdown-option {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n margin-bottom: 0.1em;\n line-height: 2rem;\n display: block;\n}\n.lunatic-component .lunatic-dropdown .lunatic-dropdown-option.selected {\n color: var(--color-primary-dark);\n background-color: goldenrod;\n}\n.lunatic-component .lunatic-dropdown .lunatic-dropdown-option:hover {\n background-color: var(--color-primary-main);\n color: white;\n}\n.lunatic-component .lunatic-dropdown .lunatic-dropdown-option .prefix {\n color: red;\n}";styleInject(".lunatic-component .lunatic-dropdown .lunatic-dropdown-option {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n margin-bottom: 0.1em;\n line-height: 2rem;\n display: block;\n}\n.lunatic-component .lunatic-dropdown .lunatic-dropdown-option.selected {\n color: var(--color-primary-dark);\n background-color: goldenrod;\n}\n.lunatic-component .lunatic-dropdown .lunatic-dropdown-option:hover {\n background-color: var(--color-primary-main);\n color: white;\n}\n.lunatic-component .lunatic-dropdown .lunatic-dropdown-option .prefix {\n color: red;\n}");function Dropdown(e){var n=e.id,t=e.labelId,a=e.disabled,i=e.options,o=e.onSelect,d=e.htmlFor,r=e.writable,s=e.className,l=e.value;return r?/*#__PURE__*/React__default["default"].createElement(DropdownWritable,{id:n,className:s,htmlFor:n,labelId:t,disabled:a,options:i,onSelect:o,value:l}):/*#__PURE__*/React__default["default"].createElement(DropdownSimple,{id:n,className:s,htmlFor:d,labelId:t,disabled:a,options:i,onSelect:o,value:l})}var Dropdown$1=createCustomizableLunaticField(Dropdown);function LunaticDropdown(e){var n=e.id,t=e.onChange,a=e.options,i=e.writable,o=e.disabled;e.htmlFor;var d=e.labelId,r=e.value;return/*#__PURE__*/React__default["default"].createElement(Dropdown$1,{id:n,htmlFor:n,labelId:d,writable:i,disabled:o,options:a,editable:i,onSelect:t,value:r,className:"lunatic-dropdown"})}LunaticDropdown.propTypes={id:PropTypes__default["default"].string.isRequired,handleChange:PropTypes__default["default"].func.isRequired,options:PropTypes__default["default"].arrayOf(PropTypes__default["default"].shape({label:PropTypes__default["default"].string.isRequired,value:PropTypes__default["default"].oneOfType([PropTypes__default["default"].string,PropTypes__default["default"].number]).isRequired})).isRequired,disabled:PropTypes__default["default"].bool,value:PropTypes__default["default"].oneOfType([PropTypes__default["default"].string,PropTypes__default["default"].number,PropTypes__default["default"].array])},LunaticDropdown.defaultProps={disabled:!1,value:null};var lunaticDropdown=createLunaticComponent(LunaticDropdown);function checkValue$1(e){return e||""}function Input(e){var n=e.value,t=e.onChange,a=e.disabled,i=e.required,o=e.maxLength,d=e.id,r=e.labelledBy,s=React.useCallback(function(n){var e=n.target.value;t(e)},[t]);return/*#__PURE__*/React__default["default"].createElement("input",{id:d,labelledbby:r,autoComplete:"off",type:"text",disabled:a,className:classnames("lunatic-input"),value:checkValue$1(n),onChange:s,"aria-required":i,required:i,maxLength:o})}Input.defaultProps={disabled:!1,required:!0,maxLength:Number.MAX_SAFE_INTEGER};var Input$1=createCustomizableLunaticField(Input),css_248z$a=".lunatic-component .lunatic-input,\n.lunatic-component .lunatic-datepicker,\n.lunatic-component .lunatic-textarea {\n font: inherit;\n border: 0;\n border-bottom: 0.125rem double rgba(0, 0, 0, 0.42);\n margin: 0;\n padding: 0.375rem 0 0.375rem 0.4375rem;\n display: block;\n min-width: 0;\n box-sizing: content-box;\n background: none;\n}\n.lunatic-component .lunatic-input:focus,\n.lunatic-component .lunatic-datepicker:focus,\n.lunatic-component .lunatic-textarea:focus {\n outline: none;\n border-bottom: 0.125rem solid var(--color-primary-main);\n}\n.lunatic-component .lunatic-input:hover,\n.lunatic-component .lunatic-datepicker:hover,\n.lunatic-component .lunatic-textarea:hover {\n border-bottom: 0.125rem solid black;\n}\n.lunatic-component .lunatic-input:read-only,\n.lunatic-component .lunatic-datepicker:read-only,\n.lunatic-component .lunatic-textarea:read-only {\n background-color: var(--color-disabled);\n}\n.lunatic-component .warning {\n box-sizing: border-box;\n border: solid 2px var(--color-error);\n background-color: var(--color-error);\n}";styleInject(css_248z$a);var LunaticInput=createLunaticComponent(Input$1,{inputId:"lunatic-input"});LunaticInput.defaultProps={className:"todo"};var css_248z$9="";styleInject("");function InputNumber(e){var n=e.value,t=e.onChange,a=e.disabled,i=e.readOnly,o=e.labelId,d=e.min,r=e.max,s=e.step,l=null!==n&&void 0!==n?n:"",u=React.useCallback(function(n){var e=n.target.value;t(e)},[t]);return/*#__PURE__*/React__default["default"].createElement("input",{className:classnames("lunatic-input",{disabled:a,readOnly:i}),type:"number",onChange:u,value:l,labelledby:o,readOnly:i,disabled:a,min:d,max:r,step:s})}var InputNumber$1=createCustomizableLunaticField(InputNumber),LunaticInputNumber=createLunaticComponent(InputNumber$1,{inputId:"lunatic-input-number"}),FilterDescription=function n(e){var t=e.id,a=e.label,i=e.filterDescription;return i?/*#__PURE__*/React__default["default"].createElement("div",{id:"filter-description-".concat(t),"aria-label":"filter-description",className:"filter-description-lunatic"},a):null};function Row$3(e){var n=e.components,t=e.valueMap,a=void 0===t?{}:t,i=e.handleChange,o=e.features,d=e.missing,r=e.shortcut,s=e.management,l=e.preferences,u=e.rowIndex,c=e.executeExpression,f=e.custom,p=React.useCallback(function(e,n){i(e,n,{index:u})},[i,u]);return n.reduce(function(e,n){var t=n.response,i=n.id,m="".concat(i,"-").concat(u+1," "),g=void 0;if(t){var h=t.name,b=a[h];Array.isArray(b)&&(g=b[u]||"")}return[].concat(_toConsumableArray(e),[/*#__PURE__*/React__default["default"].createElement(OrchestratedComponent,{component:n,key:m,handleChange:p,features:o,missing:d,shortcut:r,management:s,value:g,id:m,preferences:l,iteration:u,executeExpression:c,custom:f})])},[])}var BlockForLoopOrchestrator=createRowOrchestrator(Row$3);function BlockForLoop(e){var n=e.declarations,t=e.lines,a=e.components,i=e.handleChange,o=e.valueMap,d=e.missing,r=e.shortcut,s=e.features,l=e.preferences,u=e.management,c=e.executeExpression,f=e.iterations,p=e.custom,m=React.useState(-1),g=_slicedToArray(m,2),h=g[0],b=g[1],y=React.useState(void 0),x=_slicedToArray(y,2),v=x[0],w=x[1],k=React.useState(void 0),E=_slicedToArray(k,2),S=E[0],C=E[1];React.useEffect(function(){if(t){var e=t.min,n=t.max;e!==void 0&&n!==void 0&&(w(e),C(n))}},[t]),React.useEffect(function(){Number.parseInt(f)?b(f):v&&S&&b(v)},[v,S,f]);var _=React.useCallback(function(e,n,t){i(e,n,_objectSpread2(_objectSpread2({},t),{},{loop:!0,length:h}))},[i,h]);return 0<h?/*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment,null,/*#__PURE__*/React__default["default"].createElement(DeclarationsBeforeText,{declarations:n,custom:p}),/*#__PURE__*/React__default["default"].createElement(DeclarationsAfterText,{declarations:n,custom:p}),/*#__PURE__*/React__default["default"].createElement(BlockForLoopOrchestrator,{components:a,handleChange:_,nbRows:h,valueMap:o,management:u,missing:d,shortcut:r,features:s,preferences:l,executeExpression:c,custom:p}),/*#__PURE__*/React__default["default"].createElement(DeclarationsDetachable,{declarations:n,custom:p})):null}// preferences={preferences}
|
|
137
|
+
// savingType={savingType}
|
|
138
|
+
// management={management}
|
|
139
|
+
// features={features}
|
|
140
|
+
// bindings={bindings}
|
|
141
|
+
// missing={missing}
|
|
142
|
+
// shortcut={shortcut}
|
|
143
|
+
function Header$1(e){var n=e.header,t=e.id,a=e.custom;return Array.isArray(n)?/*#__PURE__*/React__default["default"].createElement(HtmlThead,{id:t,custom:a},/*#__PURE__*/React__default["default"].createElement(HtmlTr,{id:t,custom:a,row:0},n.map(function(e,n){var i=e.label;return/*#__PURE__*/React__default["default"].createElement(HtmlTh,{id:t,index:n,key:"".concat(i,"-").concat(n),custom:a},i)}))):null}function Row$2(e){var n=e.id,t=e.components,a=e.valueMap,i=e.rowIndex,o=e.handleChange,d=e.features,r=e.missing,s=e.shortcut,l=e.management,u=e.preferences,c=e.executeExpression,f=e.custom,p=React.useCallback(function(e,n){o(e,n,{index:i})},[o,i]);return Array.isArray(t)?/*#__PURE__*/React__default["default"].createElement(HtmlTr,{id:n,custom:f,row:i},t.map(function(e){var n=e.response,t=e.id,o="".concat(t,"-").concat(i+1," "),m=void 0,g="".concat(t,"-").concat(i);if(n){var h=n.name;h in a&&(m=a[h][i]||"")}return/*#__PURE__*/React__default["default"].createElement(HtmlTd,{id:o,key:g,custom:f},/*#__PURE__*/React__default["default"].createElement(OrchestratedComponent,{component:e,handleChange:p,features:d,missing:r,shortcut:s,management:l,value:m,id:o,preferences:u,iteration:i,executeExpression:c,custom:f}))})):/*#__PURE__*/React__default["default"].createElement(HtmlTr,{id:n})}var RosterForLoopOrchestrator=createRowOrchestrator(Row$2);function Body(e){var n=e.id,t=e.components,a=e.nbRows,i=e.executeExpression,o=e.handleChange,d=e.valueMap,r=e.missing,s=e.management,l=e.features,u=e.preferences,c=e.custom,f=React.useCallback(function(e,n,t){o(e,n,_objectSpread2(_objectSpread2({},t),{},{loop:!0,length:a}))},[a,o]);return 0<a?/*#__PURE__*/React__default["default"].createElement(HtmlTbody,{id:n,custom:c},/*#__PURE__*/React__default["default"].createElement(RosterForLoopOrchestrator,{components:t,nbRows:a,handleChange:f,executeExpression:i,valueMap:d,missing:r,management:s,features:l,preferences:u,custom:c})):null}var css_248z$8=".lunatic-table {\n table-layout: fixed;\n border-collapse: collapse;\n margin-top: 0.3em;\n margin-bottom: 0.3em;\n}\n.lunatic-table .lunatic-table-thead .lunatic-table-th {\n border: 0.15em solid var(--color-primary-dark);\n padding: 0.2em;\n}";styleInject(".lunatic-table {\n table-layout: fixed;\n border-collapse: collapse;\n margin-top: 0.3em;\n margin-bottom: 0.3em;\n}\n.lunatic-table .lunatic-table-thead .lunatic-table-th {\n border: 0.15em solid var(--color-primary-dark);\n padding: 0.2em;\n}");function RosterTable(e){var n=e.components,t=e.nbRows,a=e.executeExpression,i=e.id,o=e.header,d=e.valueMap,r=e.shortcut,s=e.missing,l=e.management,u=e.handleChange,c=e.custom;return 0<t?/*#__PURE__*/React__default["default"].createElement(HtmlTable,{id:i,custom:c},/*#__PURE__*/React__default["default"].createElement(Header$1,{header:o,id:i,custom:c}),/*#__PURE__*/React__default["default"].createElement(Body,{id:i,components:n,handleChange:u,nbRows:t,valueMap:d,management:l,missing:s,shortcut:r,executeExpression:a,custom:c})):/*#__PURE__*/React__default["default"].createElement(NothingToDisplay,null)}function HandleRowButton(e){var n=e.onClick,t=e.disabled,a=e.children;return/*#__PURE__*/React__default["default"].createElement(Button,{onClick:n,disabled:t},a)}var _excluded$1=["valueMap","loopDependencies","lines","handleChange","declarations","label","components","executeExpression","headers","missing","shortcut","id","management","custom"],DEFAULT_MAX_ROWS=12;function getTableLength(e){var n=Math.max;return Object.values(e).reduce(function(e,t){return Array.isArray(t)?n(e,t.length):e},1)}function RosterforLoop(e){var n=e.valueMap;e.loopDependencies;var t=e.lines,a=e.handleChange,i=e.declarations,o=e.label,d=e.components,r=e.executeExpression,s=e.headers,l=e.missing,u=e.shortcut,c=e.id,f=e.management,p=e.custom;_objectWithoutProperties(e,_excluded$1);var m=(null===t||void 0===t?void 0:t.max)||DEFAULT_MAX_ROWS,g=React.useState(!1),h=_slicedToArray(g,2),b=h[0],y=h[1],x=React.useState(-1),v=_slicedToArray(x,2),w=v[0],k=v[1];React.useEffect(function(){!b&&n&&(k(getTableLength(n)),y(!0))},[b,n]);var E=React.useCallback(function(){w<m&&k(w+1)},[m,w]),S=React.useCallback(function(){if(1<w){var t=w-1;k(t),Object.entries(n).forEach(function(e){var n=_slicedToArray(e,2),i=n[0],o=n[1],d=o.reduce(function(n,a,e){return e<t?[].concat(_toConsumableArray(n),[a]):n},[]);a({name:i},d)})}},[w,a,n]);return 0<w?/*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment,null,/*#__PURE__*/React__default["default"].createElement(DeclarationsBeforeText,{declarations:i,custom:p}),/*#__PURE__*/React__default["default"].createElement(DeclarationsAfterText,{declarations:i,custom:p}),/*#__PURE__*/React__default["default"].createElement(RosterTable,{id:c,components:d,nbRows:w,executeExpression:r,header:s,handleChange:a,valueMap:n,management:f,missing:l,shortcut:u,custom:p}),/*#__PURE__*/React__default["default"].createElement(DeclarationsDetachable,{declarations:i,custom:p}),/*#__PURE__*/React__default["default"].createElement(HandleRowButton,{onClick:E,disabled:w===m,custom:p},o||D$1.DEFAULT_BUTTON_ADD),/*#__PURE__*/React__default["default"].createElement(HandleRowButton,{onClick:S,disabled:1===w,custom:p},D$1.DEFAULT_BUTTON_REMOVE)):null}var LoopTypes={rosterForLoop:"RosterForLoop",blockForLoop:"Loop"};function Loop(e){var n=e.declarations,t=e.label,a=e.lines,i=e.iterations,o=e.id,d=e.components,r=e.handleChange,s=e.value,l=e.executeExpression,u=e.loopDependencies,c=e.componentType,f=e.headers,p=e.shortcut,m=e.management,g=e.missing,h=e.features,b=e.preferences,y=e.custom;return c===LoopTypes.blockForLoop?/*#__PURE__*/React__default["default"].createElement(BlockForLoop,{declarations:n,label:t,lines:a,iterations:i,id:o,components:d,handleChange:r,valueMap:s,management:m,executeExpression:l,loopDependencies:u,missing:g,shortcut:p,features:h,preferences:b,custom:y}):c===LoopTypes.rosterForLoop?/*#__PURE__*/React__default["default"].createElement(RosterforLoop,{declarations:n,label:t,lines:a,iterations:i,id:o,components:d,handleChange:r,valueMap:s,management:m,executeExpression:l,loopDependencies:u,missing:g,shortcut:p,features:h,preferences:b,headers:f,custom:y}):null}/*
|
|
144
|
+
object-assign
|
|
145
|
+
(c) Sindre Sorhus
|
|
146
|
+
@license MIT
|
|
147
|
+
*/ /* eslint-disable no-unused-vars */var getOwnPropertySymbols=Object.getOwnPropertySymbols,hasOwnProperty=Object.prototype.hasOwnProperty,propIsEnumerable=Object.prototype.propertyIsEnumerable;function toObject(e){if(null===e||e===void 0)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function shouldUseNative(){var e=String.fromCharCode;try{if(!Object.assign)return!1;// Detect buggy property enumeration order in older V8 versions.
|
|
148
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
|
149
|
+
var n=new String("abc");// eslint-disable-line no-new-wrappers
|
|
150
|
+
if(n[5]="de","5"===Object.getOwnPropertyNames(n)[0])return!1;// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
151
|
+
for(var t={},a=0;10>a;a++)t["_"+e(a)]=a;var o=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==o.join(""))return!1;// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
152
|
+
var d={};return["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t"].forEach(function(e){d[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},d)).join("")}catch(e){// We don't expect any of the above to throw, but better to be safe.
|
|
153
|
+
return!1}}var objectAssign=shouldUseNative()?Object.assign:function(e,n){for(var t=toObject(e),a=1,o,d;a<arguments.length;a++){for(var r in o=Object(arguments[a]),o)hasOwnProperty.call(o,r)&&(t[r]=o[r]);if(getOwnPropertySymbols){d=getOwnPropertySymbols(o);for(var l=0;l<d.length;l++)propIsEnumerable.call(o,d[l])&&(t[d[l]]=o[d[l]])}}return t},scheduler_production_min=createCommonjsModule(function(e,n){var i=Math.floor;function o(n,t){var a=n.length;n.push(t);a:for(;;){var i=a-1>>>1,o=n[i];if(void 0!==o&&0<_(o,t))n[i]=t,n[a]=o,a=i;else break a}}function r(e){return e=e[0],void 0===e?null:e}function s(t){var a=t[0];if(void 0!==a){var i=t.pop();if(i!==a){t[0]=i;a:for(var o=0,s=t.length;o<s;){var e=2*(o+1)-1,l=t[e],n=e+1,u=t[n];if(void 0!==l&&0>_(l,i))void 0!==u&&0>_(u,l)?(t[o]=u,t[n]=i,o=n):(t[o]=l,t[e]=i,o=e);else if(void 0!==u&&0>_(u,i))t[o]=u,t[n]=i,o=n;else break a}}return a}return null}function _(e,n){var t=e.sortIndex-n.sortIndex;return 0==t?e.id-n.id:t}function c(e){for(var n=r(L);null!==n;){if(null===n.callback)s(L);else if(n.startTime<=e)s(L),n.sortIndex=n.expirationTime,o(X,n);else break;n=r(L)}}function m(e){if(ne=!1,c(e),!ee)if(null!==r(X))ee=!0,T(v);else{var n=r(L);null!==n&&I(m,n.startTime-e)}}function v(t,a){ee=!1,ne&&(ne=!1,U()),J=!0;var i=Z;try{for(c(a),G=r(X);null!==G&&(!(G.expirationTime>a)||t&&!n.unstable_shouldYield());){var o=G.callback;if("function"==typeof o){G.callback=null,Z=G.priorityLevel;var d=o(G.expirationTime<=a);a=n.unstable_now(),"function"==typeof d?G.callback=d:G===r(X)&&s(X),c(a)}else s(X);G=r(X)}if(null!==G)var e=!0;else{var l=r(L);null!==l&&I(m,l.startTime-a),e=!1}return e}finally{G=null,Z=i,J=!1}}var T,I,U,a;if("object"==typeof performance&&"function"==typeof performance.now){var d=performance;n.unstable_now=function(){return d.now()}}else{var l=Date,p=l.now();n.unstable_now=function(){return l.now()-p}}if("undefined"==typeof window||"function"!=typeof MessageChannel){var b=null,V=null,j=function(){if(null!==b)try{var e=n.unstable_now();b(!0,e),b=null}catch(e){throw setTimeout(j,0),e}};T=function(e){null===b?(b=e,setTimeout(j,0)):setTimeout(T,0,e)},I=function(e,n){V=setTimeout(e,n)},U=function(){clearTimeout(V)},n.unstable_shouldYield=function(){return!1},a=n.unstable_forceFrameRate=function(){}}else{var w=window.setTimeout,x=window.clearTimeout;if("undefined"!=typeof console){var y=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!=typeof y&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var z=!1,H=null,q=-1,K=5,Y=0;n.unstable_shouldYield=function(){return n.unstable_now()>=Y},a=function(){},n.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):K=0<e?i(1E3/e):5};var $=new MessageChannel,F=$.port2;$.port1.onmessage=function(){if(null!==H){var e=n.unstable_now();Y=e+K;try{H(!0,e)?F.postMessage(null):(z=!1,H=null)}catch(e){throw F.postMessage(null),e}}else z=!1},T=function(e){H=e,z||(z=!0,F.postMessage(null))},I=function(e,t){q=w(function(){e(n.unstable_now())},t)},U=function(){x(q),q=-1}}var X=[],L=[],M=1,G=null,Z=3,J=!1,ee=!1,ne=!1,te=a;n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(e){e.callback=null},n.unstable_continueExecution=function(){ee||J||(ee=!0,T(v))},n.unstable_getCurrentPriorityLevel=function(){return Z},n.unstable_getFirstCallbackNode=function(){return r(X)},n.unstable_next=function(e){switch(Z){case 1:case 2:case 3:var n=3;break;default:n=Z;}var t=Z;Z=n;try{return e()}finally{Z=t}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=te,n.unstable_runWithPriority=function(e,n){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3;}var t=Z;Z=e;try{return n()}finally{Z=t}},n.unstable_scheduleCallback=function(t,i,s){var l=n.unstable_now();switch("object"==typeof s&&null!==s?(s=s.delay,s="number"==typeof s&&0<s?l+s:l):s=l,t){case 1:var d=-1;break;case 2:d=250;break;case 5:d=1073741823;break;case 4:d=1E4;break;default:d=5E3;}return d=s+d,t={id:M++,callback:i,priorityLevel:t,startTime:s,expirationTime:d,sortIndex:-1},s>l?(t.sortIndex=s,o(L,t),null===r(X)&&t===r(L)&&(ne?U():ne=!0,I(m,s-l))):(t.sortIndex=d,o(X,t),ee||J||(ee=!0,T(v))),t},n.unstable_wrapCallback=function(e){var n=Z;return function(){var t=Z;Z=n;try{return e.apply(this,arguments)}finally{Z=t}}}});scheduler_production_min.unstable_now,scheduler_production_min.unstable_shouldYield,scheduler_production_min.unstable_forceFrameRate,scheduler_production_min.unstable_IdlePriority,scheduler_production_min.unstable_ImmediatePriority,scheduler_production_min.unstable_LowPriority,scheduler_production_min.unstable_NormalPriority,scheduler_production_min.unstable_Profiling,scheduler_production_min.unstable_UserBlockingPriority,scheduler_production_min.unstable_cancelCallback,scheduler_production_min.unstable_continueExecution,scheduler_production_min.unstable_getCurrentPriorityLevel,scheduler_production_min.unstable_getFirstCallbackNode,scheduler_production_min.unstable_next,scheduler_production_min.unstable_pauseExecution,scheduler_production_min.unstable_requestPaint,scheduler_production_min.unstable_runWithPriority,scheduler_production_min.unstable_scheduleCallback,scheduler_production_min.unstable_wrapCallback;var scheduler_development=createCommonjsModule(function(e,n){var t=Math.floor;"production"!==process.env.NODE_ENV&&function(){function e(e,n){var t=e.length;e.push(n),o(e,n,t)}function a(e){var n=e[0];return n===void 0?null:n}function i(e){var n=e[0];if(void 0!==n){var t=e.pop();return t!==n&&(e[0]=t,d(e,t,0)),n}return null}function o(e,n,t){for(var a=t;!0;){var i=a-1>>>1,o=e[i];if(o!==void 0&&0<r(o,n))// The parent is larger. Swap positions.
|
|
154
|
+
e[i]=n,e[a]=o,a=i;else// The parent is smaller. Exit.
|
|
155
|
+
return}}function d(e,n,t){for(var a=t,i=e.length;a<i;){var o=2*(a+1)-1,d=e[o],s=o+1,l=e[s];// If the left or right node is smaller, swap with the smaller of those.
|
|
156
|
+
if(d!==void 0&&0>r(d,n))void 0!==l&&0>r(l,d)?(e[a]=l,e[s]=n,a=s):(e[a]=d,e[o]=n,a=o);else if(l!==void 0&&0>r(l,n))e[a]=l,e[s]=n,a=s;else// Neither child is smaller. Exit.
|
|
157
|
+
return}}function r(e,n){// Compare sort index first, then task id.
|
|
158
|
+
var t=e.sortIndex-n.sortIndex;return 0==t?e.id-n.id:t}// TODO: Use symbols?
|
|
159
|
+
function s(e,n){}/* eslint-disable no-var */ // Math.pow(2, 30) - 1
|
|
160
|
+
// 0b111111111111111111111111111111
|
|
161
|
+
function l(n){// Check for tasks that are no longer delayed and add them to the queue.
|
|
162
|
+
for(var t=a(oe);null!==t;){if(null===t.callback)// Timer was cancelled.
|
|
163
|
+
i(oe);else if(t.startTime<=n)// Timer fired. Transfer to the task queue.
|
|
164
|
+
i(oe),t.sortIndex=t.expirationTime,e(ie,t);else// Remaining timers are pending.
|
|
165
|
+
return;t=a(oe)}}function u(e){if(ce=!1,l(e),!ue)if(null!==a(ie))ue=!0,C(c);else{var n=a(oe);null!==n&&_(u,n.startTime-e)}}function c(e,n){ue=!1,ce&&(ce=!1,N()),le=!0;var t=se;try{var a;// No catch in prod code path.
|
|
166
|
+
return f(e,n)}finally{re=null,se=t,le=!1}}function f(e,t){var o=t;for(l(o),re=a(ie);null!==re&&!0&&!(re.expirationTime>o&&(!e||n.unstable_shouldYield()));){var d=re.callback;if("function"==typeof d){re.callback=null,se=re.priorityLevel;var r=re.expirationTime<=o,s=d(r);o=n.unstable_now(),"function"==typeof s?re.callback=s:re===a(ie)&&i(ie),l(o)}else i(ie);re=a(ie)}// Return whether there's additional work
|
|
167
|
+
if(null!==re)return!0;var c=a(oe);return null!==c&&_(u,c.startTime-o),!1}function p(e,n){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3;}var t=se;se=e;try{return n()}finally{se=t}}function m(e){var n;switch(se){case 1:case 2:case 3:n=3;break;default:n=se;}var t=se;se=n;try{return e()}finally{se=t}}function g(e){var n=se;return function(){// This is a fork of runWithPriority, inlined for performance.
|
|
168
|
+
var t=se;se=n;try{return e.apply(this,arguments)}finally{se=t}}}function h(t,i,o){var d=n.unstable_now(),r;if("object"==typeof o&&null!==o){var s=o.delay;r="number"==typeof s&&0<s?d+s:d}else r=d;var l;switch(t){case 1:l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=10000;break;case 3:default:l=5000;}var f=r+l,p={id:de++,callback:i,priorityLevel:t,startTime:r,expirationTime:f,sortIndex:-1};return r>d?(p.sortIndex=r,e(oe,p),null===a(ie)&&p===a(oe)&&(ce?N():ce=!0,_(u,r-d))):(p.sortIndex=f,e(ie,p),!ue&&!le&&(ue=!0,C(c))),p}function b(){}function y(){ue||le||(ue=!0,C(c))}function x(){return a(ie)}function v(e){// remove from the queue because you can't remove arbitrary nodes from an
|
|
169
|
+
// array based heap, only the first one.)
|
|
170
|
+
e.callback=null}function w(){return se}var k=!1,E=!1,S="object"==typeof performance&&"function"==typeof performance.now,C,_,N,T;if(S){var R=performance;n.unstable_now=function(){return R.now()}}else{var P=Date,I=P.now();n.unstable_now=function(){return P.now()-I}}if(// If Scheduler runs in a non-DOM environment, it falls back to a naive
|
|
171
|
+
// implementation using setTimeout.
|
|
172
|
+
"undefined"==typeof window||// Check if MessageChannel is supported, too.
|
|
173
|
+
"function"!=typeof MessageChannel){// If this accidentally gets imported in a non-browser environment, e.g. JavaScriptCore,
|
|
174
|
+
// fallback to a naive implementation.
|
|
175
|
+
var L=null,D=null,z=function(){if(null!==L)try{var e=n.unstable_now(),t=!0;L(t,e),L=null}catch(n){throw setTimeout(z,0),n}};C=function(e){null===L?(L=e,setTimeout(z,0)):setTimeout(C,0,e)},_=function(e,n){D=setTimeout(e,n)},N=function(){clearTimeout(D)},n.unstable_shouldYield=function(){return!1},T=n.unstable_forceFrameRate=function(){}}else{// Capture local references to native APIs, in case a polyfill overrides them.
|
|
176
|
+
var A=window.setTimeout,O=window.clearTimeout;if("undefined"!=typeof console){// TODO: Scheduler no longer requires these methods to be polyfilled. But
|
|
177
|
+
// maybe we want to continue warning if they don't exist, to preserve the
|
|
178
|
+
// option to rely on it in the future?
|
|
179
|
+
var M=window.requestAnimationFrame,U=window.cancelAnimationFrame;"function"!=typeof M&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!=typeof U&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var F=!1,B=null,W=-1,V=5,j=0;n.unstable_shouldYield=function(){return n.unstable_now()>=j},T=function(){},n.unstable_forceFrameRate=function(e){return 0>e||125<e?void console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):void(0<e?V=t(1e3/e):V=5)};var H=function(){if(null!==B){var e=n.unstable_now();// Yield after `yieldInterval` ms, regardless of where we are in the vsync
|
|
180
|
+
// cycle. This means there's always time remaining at the beginning of
|
|
181
|
+
// the message event.
|
|
182
|
+
j=e+V;var t=!0;try{var a=B(!0,e);a?Q.postMessage(null):(F=!1,B=null)}catch(e){throw Q.postMessage(null),e}}else F=!1;// Yielding to the browser will give it a chance to paint, so we can
|
|
183
|
+
},q=new MessageChannel,Q=q.port2;q.port1.onmessage=H,C=function(e){B=e,F||(F=!0,Q.postMessage(null))},_=function(e,t){W=A(function(){e(n.unstable_now())},t)},N=function(){O(W),W=-1}}var K=1,Y=2,$=3,X=4,G=5,Z=1073741823,J=-1,ee=250,ne=5e3,te=1e4,ae=Z,ie=[],oe=[],de=1,re=null,se=$,le=!1,ue=!1,ce=!1,fe=T,pe=null;n.unstable_IdlePriority=G,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=X,n.unstable_NormalPriority=$,n.unstable_Profiling=pe,n.unstable_UserBlockingPriority=Y,n.unstable_cancelCallback=v,n.unstable_continueExecution=y,n.unstable_getCurrentPriorityLevel=w,n.unstable_getFirstCallbackNode=x,n.unstable_next=m,n.unstable_pauseExecution=b,n.unstable_requestPaint=fe,n.unstable_runWithPriority=p,n.unstable_scheduleCallback=h,n.unstable_wrapCallback=g}()});scheduler_development.unstable_now,scheduler_development.unstable_shouldYield,scheduler_development.unstable_forceFrameRate,scheduler_development.unstable_IdlePriority,scheduler_development.unstable_ImmediatePriority,scheduler_development.unstable_LowPriority,scheduler_development.unstable_NormalPriority,scheduler_development.unstable_Profiling,scheduler_development.unstable_UserBlockingPriority,scheduler_development.unstable_cancelCallback,scheduler_development.unstable_continueExecution,scheduler_development.unstable_getCurrentPriorityLevel,scheduler_development.unstable_getFirstCallbackNode,scheduler_development.unstable_next,scheduler_development.unstable_pauseExecution,scheduler_development.unstable_requestPaint,scheduler_development.unstable_runWithPriority,scheduler_development.unstable_scheduleCallback,scheduler_development.unstable_wrapCallback;var scheduler=createCommonjsModule(function(e){e.exports="production"===process.env.NODE_ENV?scheduler_production_min:scheduler_development});function y(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,t=1;t<arguments.length;t++)n+="&args[]="+encodeURIComponent(arguments[t]);return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!React__default["default"])throw Error(y(227));var ba=new Set,ca={};function da(e,n){ea(e,n),ea(e+"Capture",n)}function ea(e,n){for(ca[e]=n,e=0;e<n.length;e++)ba.add(n[e])}var fa="undefined"!=typeof window&&"undefined"!=typeof window.document&&"undefined"!=typeof window.document.createElement,ha=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ia=Object.prototype.hasOwnProperty,ja={},ka={};function la(e){return!!ia.call(ka,e)||!ia.call(ja,e)&&(ha.test(e)?ka[e]=!0:(ja[e]=!0,!1))}function ma(e,n,t,i){if(null!==t&&0===t.type)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return!i&&(null===t?(e=e.toLowerCase().slice(0,5),"data-"!==e&&"aria-"!==e):!t.acceptsBooleans);default:return!1;}}function na(e,n,t,a){if(null===n||"undefined"==typeof n||ma(e,n,t,a))return!0;if(a)return!1;if(null!==t)switch(t.type){case 3:return!n;case 4:return!1===n;case 5:return isNaN(n);case 6:return isNaN(n)||1>n;}return!1}function B(n,t,a,i,o,e,d){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=i,this.attributeNamespace=o,this.mustUseProperty=a,this.propertyName=n,this.type=t,this.sanitizeURL=e,this.removeEmptyString=d}var D={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach(function(e){D[e]=new B(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];D[n]=new B(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){D[e]=new B(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){D[e]=new B(e,2,!1,e,null,!1,!1)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(function(e){D[e]=new B(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){D[e]=new B(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){D[e]=new B(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){D[e]=new B(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){D[e]=new B(e,5,!1,e.toLowerCase(),null,!1,!1)});var oa=/[\-:]([a-z])/g;function pa(e){return e[1].toUpperCase()}["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(function(e){var n=e.replace(oa,pa);D[n]=new B(n,1,!1,e,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(e){var n=e.replace(oa,pa);D[n]=new B(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(oa,pa);D[n]=new B(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){D[e]=new B(e,1,!1,e.toLowerCase(),null,!1,!1)}),D.xlinkHref=new B("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){D[e]=new B(e,1,!1,e.toLowerCase(),null,!0,!0)});function qa(n,t,a,i){var o=D.hasOwnProperty(t)?D[t]:null,r=null===o?!i&&!!(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])):0===o.type;r||(na(t,a,o,i)&&(a=null),i||null===o?la(t)&&(null===a?n.removeAttribute(t):n.setAttribute(t,""+a)):o.mustUseProperty?n[o.propertyName]=null===a?3!==o.type&&"":a:(t=o.attributeName,i=o.attributeNamespace,null===a?n.removeAttribute(t):(o=o.type,a=3===o||4===o&&!0===a?"":""+a,i?n.setAttributeNS(i,t,a):n.setAttribute(t,a))))}var ra=React__default["default"].__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,sa=60103,ta=60106,ua=60107,wa=60108,xa=60114,ya=60109,za=60110,Aa=60112,Ba=60113,Ca=60120,Da=60115,Ea=60116,Fa=60121,Ga=60128,Ha=60129,Ia=60130,Ja=60131;if("function"==typeof Symbol&&Symbol.for){var E=Symbol.for;sa=E("react.element"),ta=E("react.portal"),ua=E("react.fragment"),wa=E("react.strict_mode"),xa=E("react.profiler"),ya=E("react.provider"),za=E("react.context"),Aa=E("react.forward_ref"),Ba=E("react.suspense"),Ca=E("react.suspense_list"),Da=E("react.memo"),Ea=E("react.lazy"),Fa=E("react.block"),E("react.scope"),Ga=E("react.opaque.id"),Ha=E("react.debug_trace_mode"),Ia=E("react.offscreen"),Ja=E("react.legacy_hidden")}var Ka="function"==typeof Symbol&&Symbol.iterator;function La(e){return null===e||"object"!=typeof e?null:(e=Ka&&e[Ka]||e["@@iterator"],"function"==typeof e?e:null)}var Ma;function Na(e){if(void 0===Ma)try{throw Error()}catch(e){var n=e.stack.trim().match(/\n( *(at )?)/);Ma=n&&n[1]||""}return"\n"+Ma+e}var Oa=!1;function Pa(n,t){if(!n||Oa)return"";Oa=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(!t){try{throw Error()}catch(e){o=e}n()}else if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var o=e}Reflect.construct(n,[],t)}else{try{t.call()}catch(e){o=e}n.call(t.prototype)}}catch(n){if(n&&o&&"string"==typeof n.stack){for(var r=n.stack.split("\n"),e=o.stack.split("\n"),s=r.length-1,l=e.length-1;1<=s&&0<=l&&r[s]!==e[l];)l--;for(;1<=s&&0<=l;s--,l--)if(r[s]!==e[l]){if(1!==s||1!==l)do if(s--,l--,0>l||r[s]!==e[l])return"\n"+r[s].replace(" at new "," at ");while(1<=s&&0<=l);break}}}finally{Oa=!1,Error.prepareStackTrace=i}return(n=n?n.displayName||n.name:"")?Na(n):""}function Qa(e){switch(e.tag){case 5:return Na(e.type);case 16:return Na("Lazy");case 13:return Na("Suspense");case 19:return Na("SuspenseList");case 0:case 2:case 15:return e=Pa(e.type,!1),e;case 11:return e=Pa(e.type.render,!1),e;case 22:return e=Pa(e.type._render,!1),e;case 1:return e=Pa(e.type,!0),e;default:return"";}}function Ra(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case ua:return"Fragment";case ta:return"Portal";case xa:return"Profiler";case wa:return"StrictMode";case Ba:return"Suspense";case Ca:return"SuspenseList";}if("object"==typeof e)switch(e.$$typeof){case za:return(e.displayName||"Context")+".Consumer";case ya:return(e._context.displayName||"Context")+".Provider";case Aa:var n=e.render;return n=n.displayName||n.name||"",e.displayName||(""===n?"ForwardRef":"ForwardRef("+n+")");case Da:return Ra(e.type);case Fa:return Ra(e._render);case Ea:n=e._payload,e=e._init;try{return Ra(e(n))}catch(e){}}return null}function Sa(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return"";}}function Ta(e){var n=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===n||"radio"===n)}function Ua(n){var t=Ta(n)?"checked":"value",a=Object.getOwnPropertyDescriptor(n.constructor.prototype,t),i=""+n[t];if(!n.hasOwnProperty(t)&&"undefined"!=typeof a&&"function"==typeof a.get&&"function"==typeof a.set){var o=a.get,e=a.set;return Object.defineProperty(n,t,{configurable:!0,get:function(){return o.call(this)},set:function(n){i=""+n,e.call(this,n)}}),Object.defineProperty(n,t,{enumerable:a.enumerable}),{getValue:function(){return i},setValue:function(e){i=""+e},stopTracking:function(){n._valueTracker=null,delete n[t]}}}}function Va(e){e._valueTracker||(e._valueTracker=Ua(e))}function Wa(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var t=n.getValue(),i="";return e&&(i=Ta(e)?e.checked?"true":"false":e.value),e=i,e!==t&&(n.setValue(e),!0)}function Xa(e){if(e=e||("undefined"==typeof document?void 0:document),"undefined"==typeof e)return null;try{return e.activeElement||e.body}catch(n){return e.body}}function Ya(e,n){var t=n.checked;return objectAssign({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null==t?e._wrapperState.initialChecked:t})}function Za(e,n){var t=null==n.defaultValue?"":n.defaultValue,a=null==n.checked?n.defaultChecked:n.checked;t=Sa(null==n.value?t:n.value),e._wrapperState={initialChecked:a,initialValue:t,controlled:"checkbox"===n.type||"radio"===n.type?null!=n.checked:null!=n.value}}function $a(e,n){n=n.checked,null!=n&&qa(e,"checked",n,!1)}function ab(e,n){$a(e,n);var t=Sa(n.value),a=n.type;if(null!=t)"number"===a?(0===t&&""===e.value||e.value!=t)&&(e.value=""+t):e.value!==""+t&&(e.value=""+t);else if("submit"===a||"reset"===a)return void e.removeAttribute("value");n.hasOwnProperty("value")?bb(e,n.type,t):n.hasOwnProperty("defaultValue")&&bb(e,n.type,Sa(n.defaultValue)),null==n.checked&&null!=n.defaultChecked&&(e.defaultChecked=!!n.defaultChecked)}function cb(e,n,t){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var a=n.type;if(("submit"===a||"reset"===a)&&(void 0===n.value||null===n.value))return;n=""+e._wrapperState.initialValue,t||n===e.value||(e.value=n),e.defaultValue=n}t=e.name,""!==t&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==t&&(e.name=t)}function bb(e,n,t){("number"!==n||Xa(e.ownerDocument)!==e)&&(null==t?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+t&&(e.defaultValue=""+t))}function db(e){var n="";return React__default["default"].Children.forEach(e,function(e){null!=e&&(n+=e)}),n}function eb(e,n){return e=objectAssign({children:void 0},n),(n=db(n.children))&&(e.children=n),e}function fb(n,t,i,o){if(n=n.options,t){t={};for(var d=0;d<i.length;d++)t["$"+i[d]]=!0;for(i=0;i<n.length;i++)d=t.hasOwnProperty("$"+n[i].value),n[i].selected!==d&&(n[i].selected=d),d&&o&&(n[i].defaultSelected=!0)}else{for(i=""+Sa(i),t=null,d=0;d<n.length;d++){if(n[d].value===i)return n[d].selected=!0,void(o&&(n[d].defaultSelected=!0));null!==t||n[d].disabled||(t=n[d])}null!==t&&(t.selected=!0)}}function gb(e,n){if(null!=n.dangerouslySetInnerHTML)throw Error(y(91));return objectAssign({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function hb(e,n){var t=n.value;if(null==t){if(t=n.children,n=n.defaultValue,null!=t){if(null!=n)throw Error(y(92));if(Array.isArray(t)){if(!(1>=t.length))throw Error(y(93));t=t[0]}n=t}null==n&&(n=""),t=n}e._wrapperState={initialValue:Sa(t)}}function ib(e,n){var t=Sa(n.value),a=Sa(n.defaultValue);null!=t&&(t=""+t,t!==e.value&&(e.value=t),null==n.defaultValue&&e.defaultValue!==t&&(e.defaultValue=t)),null!=a&&(e.defaultValue=""+a)}function jb(e){var n=e.textContent;n===e._wrapperState.initialValue&&""!==n&&null!==n&&(e.value=n)}var kb={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function lb(e){return"svg"===e?"http://www.w3.org/2000/svg":"math"===e?"http://www.w3.org/1998/Math/MathML":"http://www.w3.org/1999/xhtml"}function mb(e,n){return null==e||"http://www.w3.org/1999/xhtml"===e?lb(n):"http://www.w3.org/2000/svg"===e&&"foreignObject"===n?"http://www.w3.org/1999/xhtml":e}var ob=function(n){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,a,i,o){MSApp.execUnsafeLocalFunction(function(){return n(t,a,i,o)})}:n}(function(e,n){if(e.namespaceURI!==kb.svg||"innerHTML"in e)e.innerHTML=n;else{for(nb=nb||document.createElement("div"),nb.innerHTML="<svg>"+n.valueOf().toString()+"</svg>",n=nb.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}}),nb;function pb(e,n){if(n){var t=e.firstChild;if(t&&t===e.lastChild&&3===t.nodeType)return void(t.nodeValue=n)}e.textContent=n}var qb={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},rb=["Webkit","ms","Moz","O"];Object.keys(qb).forEach(function(e){rb.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),qb[n]=qb[e]})});function sb(e,n,t){return null==n||"boolean"==typeof n||""===n?"":t||"number"!=typeof n||0===n||qb.hasOwnProperty(e)&&qb[e]?(""+n).trim():n+"px"}function tb(n,t){for(var i in n=n.style,t)if(t.hasOwnProperty(i)){var o=0===i.indexOf("--"),d=sb(i,t[i],o);"float"===i&&(i="cssFloat"),o?n.setProperty(i,d):n[i]=d}}var ub=objectAssign({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function vb(e,n){if(n){if(ub[e]&&(null!=n.children||null!=n.dangerouslySetInnerHTML))throw Error(y(137,e));if(null!=n.dangerouslySetInnerHTML){if(null!=n.children)throw Error(y(60));if(!("object"==typeof n.dangerouslySetInnerHTML&&"__html"in n.dangerouslySetInnerHTML))throw Error(y(61))}if(null!=n.style&&"object"!=typeof n.style)throw Error(y(62))}}function wb(e,n){if(-1===e.indexOf("-"))return"string"==typeof n.is;return"annotation-xml"!==e&&"color-profile"!==e&&"font-face"!==e&&"font-face-src"!==e&&"font-face-uri"!==e&&"font-face-format"!==e&&"font-face-name"!==e&&"missing-glyph"!==e}function xb(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var yb=null,zb=null,Ab=null;function Bb(e){if(e=Cb(e)){if("function"!=typeof yb)throw Error(y(280));var n=e.stateNode;n&&(n=Db(n),yb(e.stateNode,e.type,n))}}function Eb(e){zb?Ab?Ab.push(e):Ab=[e]:zb=e}function Fb(){if(zb){var e=zb,n=Ab;if(Ab=zb=null,Bb(e),n)for(e=0;e<n.length;e++)Bb(n[e])}}function Gb(e,n){return e(n)}function Hb(n,t,a,i,o){return n(t,a,i,o)}function Ib(){}var Jb=Gb,Kb=!1,Lb=!1;function Mb(){(null!==zb||null!==Ab)&&(Ib(),Fb())}function Nb(e,n,t){if(Lb)return e(n,t);Lb=!0;try{return Jb(e,n,t)}finally{Lb=!1,Mb()}}function Ob(e,n){var t=e.stateNode;if(null===t)return null;var i=Db(t);if(null===i)return null;t=i[n];a:"onClick"===n||"onClickCapture"===n||"onDoubleClick"===n||"onDoubleClickCapture"===n||"onMouseDown"===n||"onMouseDownCapture"===n||"onMouseMove"===n||"onMouseMoveCapture"===n||"onMouseUp"===n||"onMouseUpCapture"===n||"onMouseEnter"===n?((i=!i.disabled)||(e=e.type,i="button"!==e&&"input"!==e&&"select"!==e&&"textarea"!==e),e=!i):e=!1;if(e)return null;if(t&&"function"!=typeof t)throw Error(y(231,n,typeof t));return t}var Pb=!1;if(fa)try{var Qb={};Object.defineProperty(Qb,"passive",{get:function(){Pb=!0}}),window.addEventListener("test",Qb,Qb),window.removeEventListener("test",Qb,Qb)}catch(e){Pb=!1}function Rb(n,t,a,i,o,e,d,r,s){var u=Array.prototype.slice.call(arguments,3);try{t.apply(a,u)}catch(e){this.onError(e)}}var Sb=!1,Tb=null,Ub=!1,Vb=null,Wb={onError:function(e){Sb=!0,Tb=e}};function Xb(n,t,a,i,o,e,d,r,s){Sb=!1,Tb=null,Rb.apply(Wb,arguments)}function Yb(n,t,a,i,o,e,d,r,s){if(Xb.apply(this,arguments),Sb){if(Sb){var u=Tb;Sb=!1,Tb=null}else throw Error(y(198));Ub||(Ub=!0,Vb=u)}}function Zb(e){var n=e,t=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,0!=(1026&n.flags)&&(t=n.return),e=n.return;while(e)}return 3===n.tag?t:null}function $b(e){if(13===e.tag){var n=e.memoizedState;if(null===n&&(e=e.alternate,null!==e&&(n=e.memoizedState)),null!==n)return n.dehydrated}return null}function ac(e){if(Zb(e)!==e)throw Error(y(188))}function bc(n){var t=n.alternate;if(!t){if(t=Zb(n),null===t)throw Error(y(188));return t===n?n:null}for(var a=n,i=t,o;;){if(o=a.return,null===o)break;var r=o.alternate;if(null===r){if(i=o.return,null!==i){a=i;continue}break}if(o.child===r.child){for(r=o.child;r;){if(r===a)return ac(o),n;if(r===i)return ac(o),t;r=r.sibling}throw Error(y(188))}if(a.return!==i.return)a=o,i=r;else{for(var s=!1,l=o.child;l;){if(l===a){s=!0,a=o,i=r;break}if(l===i){s=!0,i=o,a=r;break}l=l.sibling}if(!s){for(l=r.child;l;){if(l===a){s=!0,a=r,i=o;break}if(l===i){s=!0,i=r,a=o;break}l=l.sibling}if(!s)throw Error(y(189))}}if(a.alternate!==i)throw Error(y(190))}if(3!==a.tag)throw Error(y(188));return a.stateNode.current===a?n:t}function cc(e){if(e=bc(e),!e)return null;for(var n=e;;){if(5===n.tag||6===n.tag)return n;if(n.child)n.child.return=n,n=n.child;else{if(n===e)break;for(;!n.sibling;){if(!n.return||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}}return null}function dc(e,n){for(var t=e.alternate;null!==n;){if(n===e||n===t)return!0;n=n.return}return!1}var ic=!1,jc=[],kc=null,lc=null,mc=null,nc=new Map,oc=new Map,pc=[],qc=["mousedown","mouseup","touchcancel","touchend","touchstart","auxclick","dblclick","pointercancel","pointerdown","pointerup","dragend","dragstart","drop","compositionend","compositionstart","keydown","keypress","keyup","input","textInput","copy","cut","paste","click","change","contextmenu","reset","submit"],ec,fc,gc,hc;function rc(n,t,a,i,o){return{blockedOn:n,domEventName:t,eventSystemFlags:16|a,nativeEvent:o,targetContainers:[i]}}function sc(e,n){"focusin"===e||"focusout"===e?kc=null:"dragenter"===e||"dragleave"===e?lc=null:"mouseover"===e||"mouseout"===e?mc=null:"pointerover"===e||"pointerout"===e?nc.delete(n.pointerId):"gotpointercapture"===e||"lostpointercapture"===e?oc.delete(n.pointerId):void 0}function tc(n,t,i,o,d,e){return null===n||n.nativeEvent!==e?(n=rc(t,i,o,d,e),null!==t&&(t=Cb(t),null!==t&&fc(t)),n):(n.eventSystemFlags|=o,t=n.targetContainers,null!==d&&-1===t.indexOf(d)&&t.push(d),n)}function uc(n,t,a,i,o){switch(t){case"focusin":return kc=tc(kc,n,t,a,i,o),!0;case"dragenter":return lc=tc(lc,n,t,a,i,o),!0;case"mouseover":return mc=tc(mc,n,t,a,i,o),!0;case"pointerover":var e=o.pointerId;return nc.set(e,tc(nc.get(e)||null,n,t,a,i,o)),!0;case"gotpointercapture":return e=o.pointerId,oc.set(e,tc(oc.get(e)||null,n,t,a,i,o)),!0;}return!1}function vc(e){var n=wc(e.target);if(null!==n){var t=Zb(n);if(null!==t)if(n=t.tag,13===n){if(n=$b(t),null!==n)return e.blockedOn=n,void hc(e.lanePriority,function(){scheduler.unstable_runWithPriority(e.priority,function(){gc(t)})});}else if(3===n&&t.stateNode.hydrate)return void(e.blockedOn=3===t.tag?t.stateNode.containerInfo:null)}e.blockedOn=null}function xc(e){if(null!==e.blockedOn)return!1;for(var n=e.targetContainers,t;0<n.length;){if(t=yc(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent),null!==t)return n=Cb(t),null!==n&&fc(n),e.blockedOn=t,!1;n.shift()}return!0}function zc(e,n,t){xc(e)&&t.delete(n)}function Ac(){for(ic=!1;0<jc.length;){var e=jc[0];if(null!==e.blockedOn){e=Cb(e.blockedOn),null!==e&&ec(e);break}for(var n=e.targetContainers,t;0<n.length;){if(t=yc(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent),null!==t){e.blockedOn=t;break}n.shift()}null===e.blockedOn&&jc.shift()}null!==kc&&xc(kc)&&(kc=null),null!==lc&&xc(lc)&&(lc=null),null!==mc&&xc(mc)&&(mc=null),nc.forEach(zc),oc.forEach(zc)}function Bc(e,n){e.blockedOn===n&&(e.blockedOn=null,ic||(ic=!0,scheduler.unstable_scheduleCallback(scheduler.unstable_NormalPriority,Ac)))}function Cc(e){function n(n){return Bc(n,e)}if(0<jc.length){Bc(jc[0],e);for(var t=1,a;t<jc.length;t++)a=jc[t],a.blockedOn===e&&(a.blockedOn=null)}for(null!==kc&&Bc(kc,e),null!==lc&&Bc(lc,e),null!==mc&&Bc(mc,e),nc.forEach(n),oc.forEach(n),t=0;t<pc.length;t++)a=pc[t],a.blockedOn===e&&(a.blockedOn=null);for(;0<pc.length&&(t=pc[0],null===t.blockedOn);)vc(t),null===t.blockedOn&&pc.shift()}function Dc(e,n){var t={};return t[e.toLowerCase()]=n.toLowerCase(),t["Webkit"+e]="webkit"+n,t["Moz"+e]="moz"+n,t}var Ec={animationend:Dc("Animation","AnimationEnd"),animationiteration:Dc("Animation","AnimationIteration"),animationstart:Dc("Animation","AnimationStart"),transitionend:Dc("Transition","TransitionEnd")},Fc={},Gc={};fa&&(Gc=document.createElement("div").style,"AnimationEvent"in window||(delete Ec.animationend.animation,delete Ec.animationiteration.animation,delete Ec.animationstart.animation),"TransitionEvent"in window||delete Ec.transitionend.transition);function Hc(e){if(Fc[e])return Fc[e];if(!Ec[e])return e;var n=Ec[e],t;for(t in n)if(n.hasOwnProperty(t)&&t in Gc)return Fc[e]=n[t];return e}var Ic=Hc("animationend"),Jc=Hc("animationiteration"),Kc=Hc("animationstart"),Lc=Hc("transitionend"),Mc=new Map,Nc=new Map,Oc=["abort","abort",Ic,"animationEnd",Jc,"animationIteration",Kc,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Lc,"transitionEnd","waiting","waiting"];function Pc(n,t){for(var a=0;a<n.length;a+=2){var i=n[a],o=n[a+1];o="on"+(o[0].toUpperCase()+o.slice(1)),Nc.set(i,t),Mc.set(i,o),da(o,[i])}}var Qc=scheduler.unstable_now;Qc();var F=8;function Rc(e){if(0!=(1&e))return F=15,1;if(0!=(2&e))return F=14,2;if(0!=(4&e))return F=13,4;var n=24&e;return 0==n?0==(32&e)?(n=192&e,0!=n)?(F=10,n):0==(256&e)?(n=3584&e,0!=n)?(F=8,n):0==(4096&e)?(n=4186112&e,0!=n)?(F=6,n):(n=62914560&e,0!=n)?(F=5,n):67108864&e?(F=4,67108864):0==(134217728&e)?(n=805306368&e,0!=n)?(F=2,n):0==(1073741824&e)?(F=8,e):(F=1,1073741824):(F=3,134217728):(F=7,4096):(F=9,256):(F=11,32):(F=12,n)}function Sc(e){return 99===e?15:98===e?10:97===e||96===e?8:95===e?2:0}function Tc(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(y(358,e));}}function Uc(n,t){var i=n.pendingLanes;if(0===i)return F=0;var o=0,r=0,s=n.expiredLanes,l=n.suspendedLanes,u=n.pingedLanes;if(0!==s)o=s,r=F=15;else if(s=134217727&i,0!==s){var p=s&~l;0==p?(u&=s,0!==u&&(o=Rc(u),r=F)):(o=Rc(p),r=F)}else s=i&~l,0===s?0!==u&&(o=Rc(u),r=F):(o=Rc(s),r=F);if(0===o)return 0;if(o=31-Vc(o),o=i&((0>o?0:1<<o)<<1)-1,0!==t&&t!==o&&0==(t&l)){if(Rc(t),r<=F)return t;F=r}if(t=n.entangledLanes,0!==t)for(n=n.entanglements,t&=o;0<t;)i=31-Vc(t),r=1<<i,o|=n[i],t&=~r;return o}function Wc(e){return e=-1073741825&e.pendingLanes,0===e?1073741824&e?1073741824:0:e}function Xc(e,n){switch(e){case 15:return 1;case 14:return 2;case 12:return e=Yc(24&~n),0===e?Xc(10,n):e;case 10:return e=Yc(192&~n),0===e?Xc(8,n):e;case 8:return e=Yc(3584&~n),0===e&&(e=Yc(4186112&~n),0===e&&(e=512)),e;case 2:return n=Yc(805306368&~n),0===n&&(n=268435456),n;}throw Error(y(358,e))}function Yc(e){return e&-e}function Zc(e){for(var n=[],t=0;31>t;t++)n.push(e);return n}function $c(e,n,t){e.pendingLanes|=n;var i=n-1;e.suspendedLanes&=i,e.pingedLanes&=i,e=e.eventTimes,n=31-Vc(n),e[n]=t}var Vc=Math.clz32?Math.clz32:ad,bd=Math.log,cd=Math.LN2;function ad(e){return 0===e?32:0|31-(0|bd(e)/cd)}var dd=scheduler.unstable_UserBlockingPriority,ed=scheduler.unstable_runWithPriority,fd=!0;function gd(n,t,a,i){Kb||Ib();var o=hd,e=Kb;Kb=!0;try{Hb(o,n,t,a,i)}finally{(Kb=e)||Mb()}}function id(e,n,t,a){ed(dd,hd.bind(null,e,n,t,a))}function hd(n,t,i,o){if(fd){var d;if((d=0==(4&t))&&0<jc.length&&-1<qc.indexOf(n))n=rc(null,n,t,i,o),jc.push(n);else{var r=yc(n,t,i,o);if(null===r)d&&sc(n,o);else{if(d){if(-1<qc.indexOf(n))return n=rc(r,n,t,i,o),void jc.push(n);if(uc(r,n,t,i,o))return;sc(n,o)}jd(n,t,o,null,i)}}}}function yc(n,t,a,i){var o=xb(i);if(o=wc(o),null!==o){var d=Zb(o);if(null===d)o=null;else{var r=d.tag;if(13===r){if(o=$b(d),null!==o)return o;o=null}else if(3===r){if(d.stateNode.hydrate)return 3===d.tag?d.stateNode.containerInfo:null;o=null}else d!==o&&(o=null)}}return jd(n,t,i,o,a),null}var kd=null,ld=null,md=null;function nd(){if(md)return md;var n=ld,t=n.length,i="value"in kd?kd.value:kd.textContent,e=i.length,o,r;for(o=0;o<t&&n[o]===i[o];o++);var s=t-o;for(r=1;r<=s&&n[t-r]===i[e-r];r++);return md=i.slice(o,1<r?1-r:void 0)}function od(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,0===e&&13===n&&(e=13)):e=n,10===e&&(e=13),32<=e||13===e?e:0}function pd(){return!0}function qd(){return!1}function rd(n){function e(t,a,i,e,o){for(var d in this._reactName=t,this._targetInst=i,this.type=a,this.nativeEvent=e,this.target=o,this.currentTarget=null,n)n.hasOwnProperty(d)&&(t=n[d],this[d]=t?t(e):e[d]);return this.isDefaultPrevented=(null==e.defaultPrevented?!1===e.returnValue:e.defaultPrevented)?pd:qd,this.isPropagationStopped=qd,this}return objectAssign(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=pd)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=pd)},persist:function(){},isPersistent:pd}),e}var sd={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},td=rd(sd),ud=objectAssign({},sd,{view:0,detail:0}),vd=rd(ud),Ad=objectAssign({},ud,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zd,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==yd&&(yd&&"mousemove"===e.type?(wd=e.screenX-yd.screenX,xd=e.screenY-yd.screenY):xd=wd=0,yd=e),wd)},movementY:function(e){return"movementY"in e?e.movementY:xd}}),Bd=rd(Ad),Cd=objectAssign({},Ad,{dataTransfer:0}),Dd=rd(Cd),Ed=objectAssign({},ud,{relatedTarget:0}),Fd=rd(Ed),Gd=objectAssign({},sd,{animationName:0,elapsedTime:0,pseudoElement:0}),Hd=rd(Gd),Id=objectAssign({},sd,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Jd=rd(Id),Kd=objectAssign({},sd,{data:0}),Ld=rd(Kd),Md={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Nd={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Od={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},wd,xd,yd;function Pd(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):!!(e=Od[e])&&!!n[e]}function zd(){return Pd}var Qd=objectAssign({},ud,{key:function(e){if(e.key){var n=Md[e.key]||e.key;if("Unidentified"!==n)return n}return"keypress"===e.type?(e=od(e),13===e?"Enter":String.fromCharCode(e)):"keydown"===e.type||"keyup"===e.type?Nd[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zd,charCode:function(e){return"keypress"===e.type?od(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?od(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Rd=rd(Qd),Sd=objectAssign({},Ad,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Td=rd(Sd),Ud=objectAssign({},ud,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zd}),Vd=rd(Ud),Wd=objectAssign({},sd,{propertyName:0,elapsedTime:0,pseudoElement:0}),Xd=rd(Wd),Yd=objectAssign({},Ad,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Zd=rd(Yd),$d=[9,13,27,32],ae=fa&&"CompositionEvent"in window,be=null;fa&&"documentMode"in document&&(be=document.documentMode);var ce=fa&&"TextEvent"in window&&!be,de=fa&&(!ae||be&&8<be&&11>=be),ee=String.fromCharCode(32),fe=!1;function ge(e,n){return"keyup"===e?-1!==$d.indexOf(n.keyCode):"keydown"===e?229!==n.keyCode:!("keypress"!=e&&"mousedown"!=e&&"focusout"!=e)}function he(e){return e=e.detail,"object"==typeof e&&"data"in e?e.data:null}var ie=!1;function je(e,n){return"compositionend"===e?he(n):"keypress"===e?32===n.which?(fe=!0,ee):null:"textInput"===e?(e=n.data,e===ee&&fe?null:e):null}function ke(e,n){var t=String.fromCharCode;if(ie)return"compositionend"===e||!ae&&ge(e,n)?(e=nd(),md=ld=kd=null,ie=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return t(n.which)}return null;case"compositionend":return de&&"ko"!==n.locale?null:n.data;default:return null;}}var le={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function me(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===n?!!le[e.type]:!("textarea"!==n)}function ne(e,n,t,a){Eb(a),n=oe(n,"onChange"),0<n.length&&(t=new td("onChange","change",null,t,a),e.push({event:t,listeners:n}))}var pe=null,qe=null;function re(e){se(e,0)}function te(e){var n=ue(e);if(Wa(n))return e}function ve(e,n){if("change"===e)return n}var we=!1;if(fa){var xe;if(fa){var ye=("oninput"in document);if(!ye){var ze=document.createElement("div");ze.setAttribute("oninput","return;"),ye="function"==typeof ze.oninput}xe=ye}else xe=!1;we=xe&&(!document.documentMode||9<document.documentMode)}function Ae(){pe&&(pe.detachEvent("onpropertychange",Be),qe=pe=null)}function Be(e){if("value"===e.propertyName&&te(qe)){var n=[];if(ne(n,qe,e,xb(e)),e=re,Kb)e(n);else{Kb=!0;try{Gb(e,n)}finally{Kb=!1,Mb()}}}}function Ce(e,n,t){"focusin"===e?(Ae(),pe=n,qe=t,pe.attachEvent("onpropertychange",Be)):"focusout"==e&&Ae()}function De(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return te(qe)}function Ee(e,n){if("click"===e)return te(n)}function Fe(e,n){if("input"===e||"change"===e)return te(n)}function Ge(e,n){return e===n&&(0!==e||1/e==1/n)||e!==e&&n!==n}var He="function"==typeof Object.is?Object.is:Ge,Ie=Object.prototype.hasOwnProperty;function Je(e,n){if(He(e,n))return!0;if("object"!=typeof e||null===e||"object"!=typeof n||null===n)return!1;var t=Object.keys(e),a=Object.keys(n);if(t.length!==a.length)return!1;for(a=0;a<t.length;a++)if(!Ie.call(n,t[a])||!He(e[t[a]],n[t[a]]))return!1;return!0}function Ke(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Le(e,n){var t=Ke(e);e=0;for(var i;t;){if(3===t.nodeType){if(i=e+t.textContent.length,e<=n&&i>=n)return{node:t,offset:n-e};e=i}a:{for(;t;){if(t.nextSibling){t=t.nextSibling;break a}t=t.parentNode}t=void 0}t=Ke(t)}}function Me(e,n){return!!(e&&n)&&(!(e!==n)||!(e&&3===e.nodeType)&&(n&&3===n.nodeType?Me(e,n.parentNode):"contains"in e?e.contains(n):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(n))))}function Ne(){for(var e=window,n=Xa();n instanceof e.HTMLIFrameElement;){try{var t="string"==typeof n.contentWindow.location.href}catch(e){t=!1}if(t)e=n.contentWindow;else break;n=Xa(e.document)}return n}function Oe(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&("input"===n&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===n||"true"===e.contentEditable)}var Pe=fa&&"documentMode"in document&&11>=document.documentMode,Qe=null,Re=null,Se=null,Te=!1;function Ue(e,n,t){var a=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;Te||null==Qe||Qe!==Xa(a)||(a=Qe,"selectionStart"in a&&Oe(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Se&&Je(Se,a)||(Se=a,a=oe(Re,"onSelect"),0<a.length&&(n=new td("onSelect","select",null,n,t),e.push({event:n,listeners:a}),n.target=Qe)))}Pc(["cancel","cancel","click","click","close","close","contextmenu","contextMenu","copy","copy","cut","cut","auxclick","auxClick","dblclick","doubleClick","dragend","dragEnd","dragstart","dragStart","drop","drop","focusin","focus","focusout","blur","input","input","invalid","invalid","keydown","keyDown","keypress","keyPress","keyup","keyUp","mousedown","mouseDown","mouseup","mouseUp","paste","paste","pause","pause","play","play","pointercancel","pointerCancel","pointerdown","pointerDown","pointerup","pointerUp","ratechange","rateChange","reset","reset","seeked","seeked","submit","submit","touchcancel","touchCancel","touchend","touchEnd","touchstart","touchStart","volumechange","volumeChange"],0),Pc(["drag","drag","dragenter","dragEnter","dragexit","dragExit","dragleave","dragLeave","dragover","dragOver","mousemove","mouseMove","mouseout","mouseOut","mouseover","mouseOver","pointermove","pointerMove","pointerout","pointerOut","pointerover","pointerOver","scroll","scroll","toggle","toggle","touchmove","touchMove","wheel","wheel"],1),Pc(Oc,2);for(var Ve=["change","selectionchange","textInput","compositionstart","compositionend","compositionupdate"],We=0;We<Ve.length;We++)Nc.set(Ve[We],0);ea("onMouseEnter",["mouseout","mouseover"]),ea("onMouseLeave",["mouseout","mouseover"]),ea("onPointerEnter",["pointerout","pointerover"]),ea("onPointerLeave",["pointerout","pointerover"]),da("onChange",["change","click","focusin","focusout","input","keydown","keyup","selectionchange"]),da("onSelect",["focusout","contextmenu","dragend","focusin","keydown","keyup","mousedown","mouseup","selectionchange"]),da("onBeforeInput",["compositionend","keypress","textInput","paste"]),da("onCompositionEnd",["compositionend","focusout","keydown","keypress","keyup","mousedown"]),da("onCompositionStart",["compositionstart","focusout","keydown","keypress","keyup","mousedown"]),da("onCompositionUpdate",["compositionupdate","focusout","keydown","keypress","keyup","mousedown"]);var Xe=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],Ye=new Set(["cancel","close","invalid","load","scroll","toggle"].concat(Xe));function Ze(e,n,t){var a=e.type||"unknown-event";e.currentTarget=t,Yb(a,n,void 0,e),e.currentTarget=null}function se(n,t){t=0!=(4&t);for(var i=0;i<n.length;i++){var o=n[i],r=o.event;o=o.listeners;a:{var e=void 0;if(t)for(var s=o.length-1;0<=s;s--){var u=o[s],p=u.instance,m=u.currentTarget;if(u=u.listener,p!==e&&r.isPropagationStopped())break a;Ze(r,u,m),e=p}else for(s=0;s<o.length;s++){if(u=o[s],p=u.instance,m=u.currentTarget,u=u.listener,p!==e&&r.isPropagationStopped())break a;Ze(r,u,m),e=p}}}if(Ub)throw n=Vb,Ub=!1,Vb=null,n}function G(e,n){var t=$e(n),a=e+"__bubble";t.has(a)||(af(n,e,2,!1),t.add(a))}var bf="_reactListening"+Math.random().toString(36).slice(2);function cf(e){e[bf]||(e[bf]=!0,ba.forEach(function(n){Ye.has(n)||df(n,!1,e,null),df(n,!0,e,null)}))}function df(n,t,a,i){var o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,d=a;if("selectionchange"===n&&9!==a.nodeType&&(d=a.ownerDocument),null!==i&&!t&&Ye.has(n)){if("scroll"!==n)return;o|=2,d=i}var r=$e(d),s=n+"__"+(t?"capture":"bubble");r.has(s)||(t&&(o|=4),af(d,n,o,t),r.add(s))}function af(n,t,a,i){var o=Nc.get(t);switch(void 0===o?2:o){case 0:o=gd;break;case 1:o=id;break;default:o=hd;}a=o.bind(null,t,a,n),o=void 0,Pb&&("touchstart"===t||"touchmove"===t||"wheel"===t)&&(o=!0),i?void 0===o?n.addEventListener(t,a,!0):n.addEventListener(t,a,{capture:!0,passive:o}):void 0===o?n.addEventListener(t,a,!1):n.addEventListener(t,a,{passive:o})}function jd(n,a,i,t,o){var r=t;if(0==(1&a)&&0==(2&a)&&null!==t)a:for(;;){if(null===t)return;var e=t.tag;if(3===e||4===e){var s=t.stateNode.containerInfo;if(s===o||8===s.nodeType&&s.parentNode===o)break;if(4===e)for(e=t.return;null!==e;){var l=e.tag;if((3===l||4===l)&&(l=e.stateNode.containerInfo,l===o||8===l.nodeType&&l.parentNode===o))return;e=e.return}for(;null!==s;){if(e=wc(s),null===e)return;if(l=e.tag,5===l||6===l){t=r=e;continue a}s=s.parentNode}}t=t.return}Nb(function(){var o=r,s=xb(i),l=[];a:{var c=Mc.get(n);if(void 0!==c){var f=td,p=n;switch(n){case"keypress":if(0===od(i))break a;case"keydown":case"keyup":f=Rd;break;case"focusin":p="focus",f=Fd;break;case"focusout":p="blur",f=Fd;break;case"beforeblur":case"afterblur":f=Fd;break;case"click":if(2===i.button)break a;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":f=Bd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=Dd;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=Vd;break;case Ic:case Jc:case Kc:f=Hd;break;case Lc:f=Xd;break;case"scroll":f=vd;break;case"wheel":f=Zd;break;case"copy":case"cut":case"paste":f=Jd;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=Td;}var m=0!=(4&a),g=!m&&"scroll"===n,b=m?null===c?null:c+"Capture":c;m=[];for(var y=o,E;null!==y;){E=y;var S=E.stateNode;if(5===E.tag&&null!==S&&(E=S,null!==b&&(S=Ob(y,b),null!=S&&m.push(ef(y,S,E)))),g)break;y=y.return}0<m.length&&(c=new f(c,p,null,i,s),l.push({event:c,listeners:m}))}}if(0==(7&a)){a:{if(c="mouseover"===n||"pointerover"===n,f="mouseout"===n||"pointerout"===n,c&&0==(16&a)&&(p=i.relatedTarget||i.fromElement)&&(wc(p)||p[ff]))break a;if((f||c)&&(c=s.window===s?s:(c=s.ownerDocument)?c.defaultView||c.parentWindow:window,f?(p=i.relatedTarget||i.toElement,f=o,p=p?wc(p):null,null!==p&&(g=Zb(p),p!==g||5!==p.tag&&6!==p.tag))&&(p=null):(f=null,p=o),f!==p)){if(m=Bd,S="onMouseLeave",b="onMouseEnter",y="mouse",("pointerout"===n||"pointerover"===n)&&(m=Td,S="onPointerLeave",b="onPointerEnter",y="pointer"),g=null==f?c:ue(f),E=null==p?c:ue(p),c=new m(S,y+"leave",f,i,s),c.target=g,c.relatedTarget=E,S=null,wc(s)===o&&(m=new m(b,y+"enter",p,i,s),m.target=E,m.relatedTarget=g,S=m),g=S,f&&p)b:{for(m=f,b=p,y=0,E=m;E;E=gf(E))y++;for(E=0,S=b;S;S=gf(S))E++;for(;0<y-E;)m=gf(m),y--;for(;0<E-y;)b=gf(b),E--;for(;y--;){if(m===b||null!==b&&m===b.alternate)break b;m=gf(m),b=gf(b)}m=null}else m=null;null!==f&&hf(l,c,f,m,!1),null!==p&&null!==g&&hf(l,g,p,m,!0)}}a:{if(c=o?ue(o):window,f=c.nodeName&&c.nodeName.toLowerCase(),"select"===f||"input"===f&&"file"===c.type)var C=ve;else if(!me(c))(f=c.nodeName)&&"input"===f.toLowerCase()&&("checkbox"===c.type||"radio"===c.type)&&(C=Ee);else if(we)C=Fe;else{C=De;var _=Ce}if(C&&(C=C(n,o))){ne(l,C,i,s);break a}_&&_(n,c,o),"focusout"===n&&(_=c._wrapperState)&&_.controlled&&"number"===c.type&&bb(c,"number",c.value)}switch(_=o?ue(o):window,n){case"focusin":(me(_)||"true"===_.contentEditable)&&(Qe=_,Re=o,Se=null);break;case"focusout":Se=Re=Qe=null;break;case"mousedown":Te=!0;break;case"contextmenu":case"mouseup":case"dragend":Te=!1,Ue(l,i,s);break;case"selectionchange":if(Pe)break;case"keydown":case"keyup":Ue(l,i,s);}var N;if(ae)b:{switch(n){case"compositionstart":var T="onCompositionStart";break b;case"compositionend":T="onCompositionEnd";break b;case"compositionupdate":T="onCompositionUpdate";break b;}T=void 0}else ie?ge(n,i)&&(T="onCompositionEnd"):"keydown"===n&&229===i.keyCode&&(T="onCompositionStart");T&&(de&&"ko"!==i.locale&&(ie||"onCompositionStart"!==T?"onCompositionEnd"===T&&ie&&(N=nd()):(kd=s,ld="value"in kd?kd.value:kd.textContent,ie=!0)),_=oe(o,T),0<_.length&&(T=new Ld(T,n,null,i,s),l.push({event:T,listeners:_}),N?T.data=N:(N=he(i),null!==N&&(T.data=N)))),(N=ce?je(n,i):ke(n,i))&&(o=oe(o,"onBeforeInput"),0<o.length&&(s=new Ld("onBeforeInput","beforeinput",null,i,s),l.push({event:s,listeners:o}),s.data=N))}se(l,a)})}function ef(e,n,t){return{instance:e,listener:n,currentTarget:t}}function oe(n,t){for(var i=t+"Capture",o=[];null!==n;){var d=n,r=d.stateNode;5===d.tag&&null!==r&&(d=r,r=Ob(n,i),null!=r&&o.unshift(ef(n,r,d)),r=Ob(n,t),null!=r&&o.push(ef(n,r,d))),n=n.return}return o}function gf(e){if(null===e)return null;do e=e.return;while(e&&5!==e.tag);return e?e:null}function hf(n,t,a,i,o){for(var e=t._reactName,d=[];null!==a&&a!==i;){var r=a,s=r.alternate,u=r.stateNode;if(null!==s&&s===i)break;5===r.tag&&null!==u&&(r=u,o?(s=Ob(a,e),null!=s&&d.unshift(ef(a,s,r))):o||(s=Ob(a,e),null!=s&&d.push(ef(a,s,r)))),a=a.return}0!==d.length&&n.push({event:t,listeners:d})}function jf(){}var kf=null,lf=null;function mf(e,n){return!("button"!==e&&"input"!==e&&"select"!==e&&"textarea"!==e)&&!!n.autoFocus}function nf(e,n){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof n.children||"number"==typeof n.children||"object"==typeof n.dangerouslySetInnerHTML&&null!==n.dangerouslySetInnerHTML&&null!=n.dangerouslySetInnerHTML.__html}var of="function"==typeof setTimeout?setTimeout:void 0,pf="function"==typeof clearTimeout?clearTimeout:void 0;function qf(e){1===e.nodeType?e.textContent="":9===e.nodeType&&(e=e.body,null!=e&&(e.textContent=""))}function rf(e){for(;null!=e;e=e.nextSibling){var n=e.nodeType;if(1===n||3===n)break}return e}function sf(e){e=e.previousSibling;for(var n=0;e;){if(8===e.nodeType){var t=e.data;if("$"===t||"$!"===t||"$?"===t){if(0===n)return e;n--}else"/$"===t&&n++}e=e.previousSibling}return null}var tf=0;function uf(e){return{$$typeof:Ga,toString:e,valueOf:e}}var vf=Math.random().toString(36).slice(2),wf="__reactFiber$"+vf,xf="__reactProps$"+vf,ff="__reactContainer$"+vf,yf="__reactEvents$"+vf;function wc(e){var n=e[wf];if(n)return n;for(var t=e.parentNode;t;){if(n=t[ff]||t[wf]){if(t=n.alternate,null!==n.child||null!==t&&null!==t.child)for(e=sf(e);null!==e;){if(t=e[wf])return t;e=sf(e)}return n}e=t,t=e.parentNode}return null}function Cb(e){return e=e[wf]||e[ff],e&&(5===e.tag||6===e.tag||13===e.tag||3===e.tag)?e:null}function ue(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(y(33))}function Db(e){return e[xf]||null}function $e(e){var n=e[yf];return void 0===n&&(n=e[yf]=new Set),n}var zf=[],Af=-1;function Bf(e){return{current:e}}function H(e){0>Af||(e.current=zf[Af],zf[Af]=null,Af--)}function I(e,n){Af++,zf[Af]=e.current,e.current=n}var Cf={},M=Bf(Cf),N=Bf(!1),Df=Cf;function Ef(n,t){var i=n.type.contextTypes;if(!i)return Cf;var o=n.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===t)return o.__reactInternalMemoizedMaskedChildContext;var d={},e;for(e in i)d[e]=t[e];return o&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=t,n.__reactInternalMemoizedMaskedChildContext=d),d}function Ff(e){return e=e.childContextTypes,null!==e&&void 0!==e}function Gf(){H(N),H(M)}function Hf(e,n,t){if(M.current!==Cf)throw Error(y(168));I(M,n),I(N,t)}function If(n,t,i){var o=n.stateNode;if(n=t.childContextTypes,"function"!=typeof o.getChildContext)return i;for(var r in o=o.getChildContext(),o)if(!(r in n))throw Error(y(108,Ra(t)||"Unknown",r));return objectAssign({},i,o)}function Jf(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Cf,Df=M.current,I(M,e),I(N,N.current),!0}function Kf(e,n,t){var i=e.stateNode;if(!i)throw Error(y(169));t?(e=If(e,n,Df),i.__reactInternalMemoizedMergedChildContext=e,H(N),H(M),I(M,e)):H(N),I(N,t)}var Lf=null,Mf=null,Nf=scheduler.unstable_runWithPriority,Of=scheduler.unstable_scheduleCallback,Pf=scheduler.unstable_cancelCallback,Qf=scheduler.unstable_shouldYield,Rf=scheduler.unstable_requestPaint,Sf=scheduler.unstable_now,Tf=scheduler.unstable_getCurrentPriorityLevel,Uf=scheduler.unstable_ImmediatePriority,Vf=scheduler.unstable_UserBlockingPriority,Wf=scheduler.unstable_NormalPriority,Xf=scheduler.unstable_LowPriority,Yf=scheduler.unstable_IdlePriority,Zf={},$f=void 0===Rf?function(){}:Rf,ag=null,bg=null,cg=!1,dg=Sf(),O=1E4>dg?Sf:function(){return Sf()-dg};function eg(){switch(Tf()){case Uf:return 99;case Vf:return 98;case Wf:return 97;case Xf:return 96;case Yf:return 95;default:throw Error(y(332));}}function fg(e){switch(e){case 99:return Uf;case 98:return Vf;case 97:return Wf;case 96:return Xf;case 95:return Yf;default:throw Error(y(332));}}function gg(e,n){return e=fg(e),Nf(e,n)}function hg(e,n,t){return e=fg(e),Of(e,n,t)}function ig(){if(null!==bg){var e=bg;bg=null,Pf(e)}jg()}function jg(){if(!cg&&null!==ag){cg=!0;var e=0;try{var n=ag;gg(99,function(){for(;e<n.length;e++){var t=n[e];do t=t(!0);while(null!==t)}}),ag=null}catch(n){throw null!==ag&&(ag=ag.slice(e+1)),Of(Uf,ig),n}finally{cg=!1}}}var kg=ra.ReactCurrentBatchConfig;function lg(e,n){if(e&&e.defaultProps){for(var t in n=objectAssign({},n),e=e.defaultProps,e)void 0===n[t]&&(n[t]=e[t]);return n}return n}var mg=Bf(null),ng=null,og=null,pg=null;function qg(){pg=og=ng=null}function rg(e){var n=mg.current;H(mg),e.type._context._currentValue=n}function sg(e,n){for(;null!==e;){var t=e.alternate;if(!((e.childLanes&n)===n))e.childLanes|=n,null!==t&&(t.childLanes|=n);else if(null===t||(t.childLanes&n)===n)break;else t.childLanes|=n;e=e.return}}function tg(e,n){ng=e,pg=og=null,e=e.dependencies,null!==e&&null!==e.firstContext&&(0!=(e.lanes&n)&&(ug=!0),e.firstContext=null)}function vg(e,n){if(pg!==e&&!1!==n&&0!==n)if(("number"!=typeof n||1073741823===n)&&(pg=e,n=1073741823),n={context:e,observedBits:n,next:null},null===og){if(null===ng)throw Error(y(308));og=n,ng.dependencies={lanes:0,firstContext:n,responders:null}}else og=og.next=n;return e._currentValue}var wg=!1;function xg(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function yg(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function zg(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function Ag(e,n){if(e=e.updateQueue,null!==e){e=e.shared;var t=e.pending;null===t?n.next=n:(n.next=t.next,t.next=n),e.pending=n}}function Bg(n,t){var i=n.updateQueue,o=n.alternate;if(null!==o&&(o=o.updateQueue,i===o)){var r=null,s=null;if(i=i.firstBaseUpdate,null!==i){do{var l={eventTime:i.eventTime,lane:i.lane,tag:i.tag,payload:i.payload,callback:i.callback,next:null};null===s?r=s=l:s=s.next=l,i=i.next}while(null!==i);null===s?r=s=t:s=s.next=t}else r=s=t;return i={baseState:o.baseState,firstBaseUpdate:r,lastBaseUpdate:s,shared:o.shared,effects:o.effects},void(n.updateQueue=i)}n=i.lastBaseUpdate,null===n?i.firstBaseUpdate=t:n.next=t,i.lastBaseUpdate=t}function Cg(t,a,i,o){var d=t.updateQueue;wg=!1;var e=d.firstBaseUpdate,r=d.lastBaseUpdate,s=d.shared.pending;if(null!==s){d.shared.pending=null;var u=s,c=u.next;u.next=null,null===r?e=c:r.next=c,r=u;var m=t.alternate;if(null!==m){m=m.updateQueue;var b=m.lastBaseUpdate;b!==r&&(null===b?m.firstBaseUpdate=c:b.next=c,m.lastBaseUpdate=u)}}if(null!==e){b=d.baseState,r=0,m=c=u=null;do{s=e.lane;var y=e.eventTime;if((o&s)===s){null!==m&&(m=m.next={eventTime:y,lane:0,tag:e.tag,payload:e.payload,callback:e.callback,next:null});a:{var v=t,w=e;switch(s=a,y=i,w.tag){case 1:if(v=w.payload,"function"==typeof v){b=v.call(y,b,s);break a}b=v;break a;case 3:v.flags=64|-4097&v.flags;case 0:if(v=w.payload,s="function"==typeof v?v.call(y,b,s):v,null===s||void 0===s)break a;b=objectAssign({},b,s);break a;case 2:wg=!0;}}null!==e.callback&&(t.flags|=32,s=d.effects,null===s?d.effects=[e]:s.push(e))}else y={eventTime:y,lane:s,tag:e.tag,payload:e.payload,callback:e.callback,next:null},null===m?(c=m=y,u=b):m=m.next=y,r|=s;if(e=e.next,null===e)if(s=d.shared.pending,null===s)break;else e=s.next,s.next=null,d.lastBaseUpdate=s,d.shared.pending=null}while(1);null===m&&(u=b),d.baseState=u,d.firstBaseUpdate=c,d.lastBaseUpdate=m,Dg|=r,t.lanes=r,t.memoizedState=b}}function Eg(n,t,i){if(n=t.effects,t.effects=null,null!==n)for(t=0;t<n.length;t++){var o=n[t],r=o.callback;if(null!==r){if(o.callback=null,o=i,"function"!=typeof r)throw Error(y(191,r));r.call(o)}}}var Fg=new React__default["default"].Component().refs;function Gg(e,n,t,a){n=e.memoizedState,t=t(a,n),t=null===t||void 0===t?n:objectAssign({},n,t),e.memoizedState=t,0===e.lanes&&(e.updateQueue.baseState=t)}var Kg={isMounted:function(e){return!!(e=e._reactInternals)&&Zb(e)===e},enqueueSetState:function(n,t,i){n=n._reactInternals;var o=Hg(),d=Ig(n),e=zg(o,d);e.payload=t,void 0!==i&&null!==i&&(e.callback=i),Ag(n,e),Jg(n,d,o)},enqueueReplaceState:function(n,t,i){n=n._reactInternals;var o=Hg(),d=Ig(n),e=zg(o,d);e.tag=1,e.payload=t,void 0!==i&&null!==i&&(e.callback=i),Ag(n,e),Jg(n,d,o)},enqueueForceUpdate:function(n,t){n=n._reactInternals;var i=Hg(),o=Ig(n),d=zg(i,o);d.tag=2,void 0!==t&&null!==t&&(d.callback=t),Ag(n,d),Jg(n,o,i)}};function Lg(n,t,i,o,d,e,r){return n=n.stateNode,"function"==typeof n.shouldComponentUpdate?n.shouldComponentUpdate(o,e,r):!(t.prototype&&t.prototype.isPureReactComponent)||!Je(i,o)||!Je(d,e)}function Mg(n,t,i){var o=!1,r=Cf,s=t.contextType;return"object"==typeof s&&null!==s?s=vg(s):(r=Ff(t)?Df:M.current,o=t.contextTypes,s=(o=null!==o&&void 0!==o)?Ef(n,r):Cf),t=new t(i,s),n.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Kg,n.stateNode=t,t._reactInternals=n,o&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=r,n.__reactInternalMemoizedMaskedChildContext=s),t}function Ng(e,n,t,i){e=n.state,"function"==typeof n.componentWillReceiveProps&&n.componentWillReceiveProps(t,i),"function"==typeof n.UNSAFE_componentWillReceiveProps&&n.UNSAFE_componentWillReceiveProps(t,i),n.state!==e&&Kg.enqueueReplaceState(n,n.state,null)}function Og(n,t,a,i){var o=n.stateNode;o.props=a,o.state=n.memoizedState,o.refs=Fg,xg(n);var e=t.contextType;"object"==typeof e&&null!==e?o.context=vg(e):(e=Ff(t)?Df:M.current,o.context=Ef(n,e)),Cg(n,a,o,i),o.state=n.memoizedState,e=t.getDerivedStateFromProps,"function"==typeof e&&(Gg(n,t,e,a),o.state=n.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(t=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&Kg.enqueueReplaceState(o,o.state,null),Cg(n,a,o,i),o.state=n.memoizedState),"function"==typeof o.componentDidMount&&(n.flags|=4)}var Pg=Array.isArray;function Qg(n,t,i){if(n=i.ref,null!==n&&"function"!=typeof n&&"object"!=typeof n){if(i._owner){if(i=i._owner,i){if(1!==i.tag)throw Error(y(309));var o=i.stateNode}if(!o)throw Error(y(147,n));var d=""+n;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===d?t.ref:(t=function(e){var n=o.refs;n===Fg&&(n=o.refs={}),null===e?delete n[d]:n[d]=e},t._stringRef=d,t)}if("string"!=typeof n)throw Error(y(284));if(!i._owner)throw Error(y(290,n))}return n}function Rg(e,n){if("textarea"!==e.type)throw Error(y(31,"[object Object]"===Object.prototype.toString.call(n)?"object with keys {"+Object.keys(n).join(", ")+"}":n))}function Sg(i){function o(e,n){if(i){var t=e.lastEffect;null===t?e.firstEffect=e.lastEffect=n:(t.nextEffect=n,e.lastEffect=n),n.nextEffect=null,n.flags=8}}function r(e,n){if(!i)return null;for(;null!==n;)o(e,n),n=n.sibling;return null}function a(e,n){for(e=new Map;null!==n;)null===n.key?e.set(n.index,n):e.set(n.key,n),n=n.sibling;return e}function t(e,n){return e=Tg(e,n),e.index=0,e.sibling=null,e}function d(e,n,t){return(e.index=t,!i)?n:(t=e.alternate,null!==t)?(t=t.index,t<n?(e.flags=2,n):t):(e.flags=2,n)}function e(e){return i&&null===e.alternate&&(e.flags=2),e}function s(e,n,a,i){return null===n||6!==n.tag?(n=Ug(a,e.mode,i),n.return=e,n):(n=t(n,a),n.return=e,n)}function u(e,n,a,i){return null!==n&&n.elementType===a.type?(i=t(n,a.props),i.ref=Qg(e,n,a),i.return=e,i):(i=Vg(a.type,a.key,a.props,null,e.mode,i),i.ref=Qg(e,n,a),i.return=e,i)}function f(e,n,a,i){return null===n||4!==n.tag||n.stateNode.containerInfo!==a.containerInfo||n.stateNode.implementation!==a.implementation?(n=Wg(a,e.mode,i),n.return=e,n):(n=t(n,a.children||[]),n.return=e,n)}function l(e,n,a,i,o){return null===n||7!==n.tag?(n=Xg(a,e.mode,i,o),n.return=e,n):(n=t(n,a),n.return=e,n)}function c(e,n,t){if("string"==typeof n||"number"==typeof n)return n=Ug(""+n,e.mode,t),n.return=e,n;if("object"==typeof n&&null!==n){switch(n.$$typeof){case sa:return t=Vg(n.type,n.key,n.props,null,e.mode,t),t.ref=Qg(e,null,n),t.return=e,t;case ta:return n=Wg(n,e.mode,t),n.return=e,n;}if(Pg(n)||La(n))return n=Xg(n,e.mode,t,null),n.return=e,n;Rg(e,n)}return null}function m(n,t,a,i){var o=null===t?null:t.key;if("string"==typeof a||"number"==typeof a)return null===o?s(n,t,""+a,i):null;if("object"==typeof a&&null!==a){switch(a.$$typeof){case sa:return a.key===o?a.type===ua?l(n,t,a.props.children,i,o):u(n,t,a,i):null;case ta:return a.key===o?f(n,t,a,i):null;}if(Pg(a)||La(a))return null===o?l(n,t,a,i,null):null;Rg(n,a)}return null}function p(n,t,i,o,d){if("string"==typeof o||"number"==typeof o)return n=n.get(i)||null,s(t,n,""+o,d);if("object"==typeof o&&null!==o){switch(o.$$typeof){case sa:return n=n.get(null===o.key?i:o.key)||null,o.type===ua?l(t,n,o.props.children,d,o.key):u(t,n,o,d);case ta:return n=n.get(null===o.key?i:o.key)||null,f(t,n,o,d);}if(Pg(o)||La(o))return n=n.get(i)||null,l(t,n,o,d,null);Rg(t,o)}return null}function n(s,e,f,h){for(var b=null,y=null,x=e,v=e=0,w=null;null!==x&&v<f.length;v++){x.index>v?(w=x,x=null):w=x.sibling;var k=m(s,x,f[v],h);if(null===k){null===x&&(x=w);break}i&&x&&null===k.alternate&&o(s,x),e=d(k,e,v),null===y?b=k:y.sibling=k,y=k,x=w}if(v===f.length)return r(s,x),b;if(null===x){for(;v<f.length;v++)x=c(s,f[v],h),null!==x&&(e=d(x,e,v),null===y?b=x:y.sibling=x,y=x);return b}for(x=a(s,x);v<f.length;v++)w=p(x,s,v,f[v],h),null!==w&&(i&&null!==w.alternate&&x.delete(null===w.key?v:w.key),e=d(w,e,v),null===y?b=w:y.sibling=w,y=w);return i&&x.forEach(function(e){return o(s,e)}),b}function g(s,e,f,b){var x=La(f);if("function"!=typeof x)throw Error(y(150));if(f=x.call(f),null==f)throw Error(y(151));for(var v=x=null,k=e,E=e=0,S=null,C=f.next();null!==k&&!C.done;E++,C=f.next()){k.index>E?(S=k,k=null):S=k.sibling;var _=m(s,k,C.value,b);if(null===_){null===k&&(k=S);break}i&&k&&null===_.alternate&&o(s,k),e=d(_,e,E),null===v?x=_:v.sibling=_,v=_,k=S}if(C.done)return r(s,k),x;if(null===k){for(;!C.done;E++,C=f.next())C=c(s,C.value,b),null!==C&&(e=d(C,e,E),null===v?x=C:v.sibling=C,v=C);return x}for(k=a(s,k);!C.done;E++,C=f.next())C=p(k,s,E,C.value,b),null!==C&&(i&&null!==C.alternate&&k.delete(null===C.key?E:C.key),e=d(C,e,E),null===v?x=C:v.sibling=C,v=C);return i&&k.forEach(function(e){return o(s,e)}),x}return function(i,s,u,c){var p="object"==typeof u&&null!==u&&u.type===ua&&null===u.key;p&&(u=u.props.children);var m="object"==typeof u&&null!==u;if(m)switch(u.$$typeof){case sa:a:{for(m=u.key,p=s;null!==p;){if(p.key===m){switch(p.tag){case 7:if(u.type===ua){r(i,p.sibling),s=t(p,u.props.children),s.return=i,i=s;break a}break;default:if(p.elementType===u.type){r(i,p.sibling),s=t(p,u.props),s.ref=Qg(i,p,u),s.return=i,i=s;break a}}r(i,p);break}else o(i,p);p=p.sibling}u.type===ua?(s=Xg(u.props.children,i.mode,c,u.key),s.return=i,i=s):(c=Vg(u.type,u.key,u.props,null,i.mode,c),c.ref=Qg(i,s,u),c.return=i,i=c)}return e(i);case ta:a:{for(p=u.key;null!==s;){if(s.key!==p)o(i,s);else if(4===s.tag&&s.stateNode.containerInfo===u.containerInfo&&s.stateNode.implementation===u.implementation){r(i,s.sibling),s=t(s,u.children||[]),s.return=i,i=s;break a}else{r(i,s);break}s=s.sibling}s=Wg(u,i.mode,c),s.return=i,i=s}return e(i);}if("string"==typeof u||"number"==typeof u)return u=""+u,null!==s&&6===s.tag?(r(i,s.sibling),s=t(s,u),s.return=i,i=s):(r(i,s),s=Ug(u,i.mode,c),s.return=i,i=s),e(i);if(Pg(u))return n(i,s,u,c);if(La(u))return g(i,s,u,c);if(m&&Rg(i,u),"undefined"==typeof u&&!p)switch(i.tag){case 1:case 22:case 0:case 11:case 15:throw Error(y(152,Ra(i.type)||"Component"));}return r(i,s)}}var Yg=Sg(!0),Zg=Sg(!1),$g={},ah=Bf($g),bh=Bf($g),ch=Bf($g);function dh(e){if(e===$g)throw Error(y(174));return e}function eh(e,n){I(ch,n),I(bh,e),I(ah,$g),e=n.nodeType;9===e||11===e?n=(n=n.documentElement)?n.namespaceURI:mb(null,""):(e=8===e?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=mb(n,e));H(ah),I(ah,n)}function fh(){H(ah),H(bh),H(ch)}function gh(e){dh(ch.current);var n=dh(ah.current),t=mb(n,e.type);n!==t&&(I(bh,e),I(ah,t))}function hh(e){bh.current===e&&(H(ah),H(bh))}var P=Bf(0);function ih(e){for(var n=e;null!==n;){if(13===n.tag){var t=n.memoizedState;if(null!==t&&(t=t.dehydrated,null===t||"$?"===t.data||"$!"===t.data))return n}else if(19===n.tag&&void 0!==n.memoizedProps.revealOrder){if(0!=(64&n.flags))return n;}else if(null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var jh=null,kh=null,lh=!1;function mh(e,n){var t=nh(5,null,null,0);t.elementType="DELETED",t.type="DELETED",t.stateNode=n,t.return=e,t.flags=8,null===e.lastEffect?e.firstEffect=e.lastEffect=t:(e.lastEffect.nextEffect=t,e.lastEffect=t)}function oh(e,n){switch(e.tag){case 5:var t=e.type;return n=1!==n.nodeType||t.toLowerCase()!==n.nodeName.toLowerCase()?null:n,null!==n&&(e.stateNode=n,!0);case 6:return n=""===e.pendingProps||3!==n.nodeType?null:n,null!==n&&(e.stateNode=n,!0);case 13:return!1;default:return!1;}}function ph(e){if(lh){var n=kh;if(n){var t=n;if(!oh(e,n)){if(n=rf(t.nextSibling),!n||!oh(e,n))return e.flags=2|-1025&e.flags,lh=!1,void(jh=e);mh(jh,t)}jh=e,kh=rf(n.firstChild)}else e.flags=2|-1025&e.flags,lh=!1,jh=e}}function qh(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;jh=e}function rh(e){if(e!==jh)return!1;if(!lh)return qh(e),lh=!0,!1;var n=e.type;if(5!==e.tag||"head"!==n&&"body"!==n&&!nf(n,e.memoizedProps))for(n=kh;n;)mh(e,n),n=rf(n.nextSibling);if(qh(e),13===e.tag){if(e=e.memoizedState,e=null===e?null:e.dehydrated,!e)throw Error(y(317));a:{for(e=e.nextSibling,n=0;e;){if(8===e.nodeType){var t=e.data;if("/$"===t){if(0===n){kh=rf(e.nextSibling);break a}n--}else"$"!==t&&"$!"!==t&&"$?"!==t||n++}e=e.nextSibling}kh=null}}else kh=jh?rf(e.stateNode.nextSibling):null;return!0}function sh(){kh=jh=null,lh=!1}var th=[];function uh(){for(var e=0;e<th.length;e++)th[e]._workInProgressVersionPrimary=null;th.length=0}var vh=ra.ReactCurrentDispatcher,wh=ra.ReactCurrentBatchConfig,xh=0,R=null,S=null,T=null,yh=!1,zh=!1;function Ah(){throw Error(y(321))}function Bh(e,n){if(null===n)return!1;for(var t=0;t<n.length&&t<e.length;t++)if(!He(e[t],n[t]))return!1;return!0}function Ch(n,t,i,o,d,e){if(xh=e,R=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,vh.current=null===n||null===n.memoizedState?Dh:Eh,n=i(o,d),zh){e=0;do{if(zh=!1,!(25>e))throw Error(y(301));e+=1,T=S=null,t.updateQueue=null,vh.current=Fh,n=i(o,d)}while(zh)}if(vh.current=Gh,t=null!==S&&null!==S.next,xh=0,T=S=R=null,yh=!1,t)throw Error(y(300));return n}function Hh(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===T?R.memoizedState=T=e:T=T.next=e,T}function Ih(){if(null===S){var e=R.alternate;e=null===e?null:e.memoizedState}else e=S.next;var n=null===T?R.memoizedState:T.next;if(null!==n)T=n,S=e;else{if(null===e)throw Error(y(310));S=e,e={memoizedState:S.memoizedState,baseState:S.baseState,baseQueue:S.baseQueue,queue:S.queue,next:null},null===T?R.memoizedState=T=e:T=T.next=e}return T}function Jh(e,n){return"function"==typeof n?n(e):n}function Kh(t){var a=Ih(),i=a.queue;if(null===i)throw Error(y(311));i.lastRenderedReducer=t;var o=S,r=o.baseQueue,s=i.pending;if(null!==s){if(null!==r){var u=r.next;r.next=s.next,s.next=u}o.baseQueue=r=s,i.pending=null}if(null!==r){r=r.next,o=o.baseState;var c=u=s=null,p=r;do{var m=p.lane;if((xh&m)===m)null!==c&&(c=c.next={lane:0,action:p.action,eagerReducer:p.eagerReducer,eagerState:p.eagerState,next:null}),o=p.eagerReducer===t?p.eagerState:t(o,p.action);else{var l={lane:m,action:p.action,eagerReducer:p.eagerReducer,eagerState:p.eagerState,next:null};null===c?(u=c=l,s=o):c=c.next=l,R.lanes|=m,Dg|=m}p=p.next}while(null!==p&&p!==r);null===c?s=o:c.next=u,He(o,a.memoizedState)||(ug=!0),a.memoizedState=o,a.baseState=s,a.baseQueue=c,i.lastRenderedState=o}return[a.memoizedState,i.dispatch]}function Lh(n){var t=Ih(),a=t.queue;if(null===a)throw Error(y(311));a.lastRenderedReducer=n;var i=a.dispatch,o=a.pending,d=t.memoizedState;if(null!==o){a.pending=null;var r=o=o.next;do d=n(d,r.action),r=r.next;while(r!==o);He(d,t.memoizedState)||(ug=!0),t.memoizedState=d,null===t.baseQueue&&(t.baseState=d),a.lastRenderedState=d}return[d,i]}function Mh(n,t,i){var o=t._getVersion;o=o(t._source);var r=t._workInProgressVersionPrimary;if(null===r?(n=n.mutableReadLanes,n=(xh&n)===n)&&(t._workInProgressVersionPrimary=o,th.push(t)):n=r===o,n)return i(t._source);throw th.push(t),Error(y(350))}function Nh(t,i,o,r){var s=U;if(null===s)throw Error(y(349));var e=i._getVersion,u=e(i._source),d=vh.current,c=d.useState(function(){return Mh(s,i,o)}),f=c[1],m=c[0];c=T;var g=t.memoizedState,b=g.refs,p=b.getSnapshot,h=g.source;g=g.subscribe;var x=R;return t.memoizedState={refs:b,source:i,subscribe:r},d.useEffect(function(){b.getSnapshot=o,b.setSnapshot=f;var n=e(i._source);if(!He(u,n)){n=o(i._source),He(m,n)||(f(n),n=Ig(x),s.mutableReadLanes|=n&s.pendingLanes),n=s.mutableReadLanes,s.entangledLanes|=n;for(var t=s.entanglements,d=n;0<d;){var r=31-Vc(d),l=1<<r;t[r]|=n,d&=~l}}},[o,i,r]),d.useEffect(function(){return r(i._source,function(){var e=b.getSnapshot,n=b.setSnapshot;try{n(e(i._source));var t=Ig(x);s.mutableReadLanes|=t&s.pendingLanes}catch(e){n(function(){throw e})}})},[i,r]),He(p,o)&&He(h,i)&&He(g,r)||(t={pending:null,dispatch:null,lastRenderedReducer:Jh,lastRenderedState:m},t.dispatch=f=Oh.bind(null,R,t),c.queue=t,c.baseQueue=null,m=Mh(s,i,o),c.memoizedState=c.baseState=m),m}function Ph(e,n,t){var a=Ih();return Nh(a,e,n,t)}function Qh(e){var n=Hh();return"function"==typeof e&&(e=e()),n.memoizedState=n.baseState=e,e=n.queue={pending:null,dispatch:null,lastRenderedReducer:Jh,lastRenderedState:e},e=e.dispatch=Oh.bind(null,R,e),[n.memoizedState,e]}function Rh(e,n,t,i){return e={tag:e,create:n,destroy:t,deps:i,next:null},n=R.updateQueue,null===n?(n={lastEffect:null},R.updateQueue=n,n.lastEffect=e.next=e):(t=n.lastEffect,null===t?n.lastEffect=e.next=e:(i=t.next,t.next=e,e.next=i,n.lastEffect=e)),e}function Sh(e){var n=Hh();return e={current:e},n.memoizedState=e}function Th(){return Ih().memoizedState}function Uh(n,t,a,i){var o=Hh();R.flags|=n,o.memoizedState=Rh(1|t,a,void 0,void 0===i?null:i)}function Vh(n,t,a,i){var o=Ih();i=void 0===i?null:i;var e;if(null!==S){var r=S.memoizedState;if(e=r.destroy,null!==i&&Bh(i,r.deps))return void Rh(t,a,e,i)}R.flags|=n,o.memoizedState=Rh(1|t,a,e,i)}function Wh(e,n){return Uh(516,4,e,n)}function Xh(e,n){return Vh(516,4,e,n)}function Yh(e,n){return Vh(4,2,e,n)}function Zh(e,n){return"function"==typeof n?(e=e(),n(e),function(){n(null)}):null!==n&&void 0!==n?(e=e(),n.current=e,function(){n.current=null}):void 0}function $h(e,n,t){return t=null!==t&&void 0!==t?t.concat([e]):null,Vh(4,2,Zh.bind(null,n,e),t)}function ai(){}function bi(e,n){var t=Ih();n=void 0===n?null:n;var a=t.memoizedState;return null!==a&&null!==n&&Bh(n,a[1])?a[0]:(t.memoizedState=[e,n],e)}function ci(e,n){var t=Ih();n=void 0===n?null:n;var i=t.memoizedState;return null!==i&&null!==n&&Bh(n,i[1])?i[0]:(e=e(),t.memoizedState=[e,n],e)}function di(e,n){var t=eg();gg(98>t?98:t,function(){e(!0)}),gg(97<t?97:t,function(){var t=wh.transition;wh.transition=1;try{e(!1),n()}finally{wh.transition=t}})}function Oh(n,t,a){var i=Hg(),o=Ig(n),e={lane:o,action:a,eagerReducer:null,eagerState:null,next:null},d=t.pending;if(null===d?e.next=e:(e.next=d.next,d.next=e),t.pending=e,d=n.alternate,n===R||null!==d&&d===R)zh=yh=!0;else{if(0===n.lanes&&(null===d||0===d.lanes)&&(d=t.lastRenderedReducer,null!==d))try{var r=t.lastRenderedState,s=d(r,a);if(e.eagerReducer=d,e.eagerState=s,He(s,r))return}catch(e){}finally{}Jg(n,o,i)}}var Gh={readContext:vg,useCallback:Ah,useContext:Ah,useEffect:Ah,useImperativeHandle:Ah,useLayoutEffect:Ah,useMemo:Ah,useReducer:Ah,useRef:Ah,useState:Ah,useDebugValue:Ah,useDeferredValue:Ah,useTransition:Ah,useMutableSource:Ah,useOpaqueIdentifier:Ah,unstable_isNewReconciler:!1},Dh={readContext:vg,useCallback:function(e,n){return Hh().memoizedState=[e,void 0===n?null:n],e},useContext:vg,useEffect:Wh,useImperativeHandle:function(e,n,t){return t=null!==t&&void 0!==t?t.concat([e]):null,Uh(4,2,Zh.bind(null,n,e),t)},useLayoutEffect:function(e,n){return Uh(4,2,e,n)},useMemo:function(e,n){var t=Hh();return n=void 0===n?null:n,e=e(),t.memoizedState=[e,n],e},useReducer:function(e,n,t){var i=Hh();return n=void 0===t?n:t(n),i.memoizedState=i.baseState=n,e=i.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},e=e.dispatch=Oh.bind(null,R,e),[i.memoizedState,e]},useRef:Sh,useState:Qh,useDebugValue:ai,useDeferredValue:function(e){var n=Qh(e),t=n[0],a=n[1];return Wh(function(){var n=wh.transition;wh.transition=1;try{a(e)}finally{wh.transition=n}},[e]),t},useTransition:function(){var e=Qh(!1),n=e[0];return e=di.bind(null,e[1]),Sh(e),[e,n]},useMutableSource:function(e,n,t){var a=Hh();return a.memoizedState={refs:{getSnapshot:n,setSnapshot:null},source:e,subscribe:t},Nh(a,e,n,t)},useOpaqueIdentifier:function(){if(lh){var e=!1,n=uf(function(){throw e||(e=!0,t("r:"+(tf++).toString(36))),Error(y(355))}),t=Qh(n)[1];return 0==(2&R.mode)&&(R.flags|=516,Rh(5,function(){t("r:"+(tf++).toString(36))},void 0,null)),n}return n="r:"+(tf++).toString(36),Qh(n),n},unstable_isNewReconciler:!1},Eh={readContext:vg,useCallback:bi,useContext:vg,useEffect:Xh,useImperativeHandle:$h,useLayoutEffect:Yh,useMemo:ci,useReducer:Kh,useRef:Th,useState:function(){return Kh(Jh)},useDebugValue:ai,useDeferredValue:function(e){var n=Kh(Jh),t=n[0],a=n[1];return Xh(function(){var n=wh.transition;wh.transition=1;try{a(e)}finally{wh.transition=n}},[e]),t},useTransition:function(){var e=Kh(Jh)[0];return[Th().current,e]},useMutableSource:Ph,useOpaqueIdentifier:function(){return Kh(Jh)[0]},unstable_isNewReconciler:!1},Fh={readContext:vg,useCallback:bi,useContext:vg,useEffect:Xh,useImperativeHandle:$h,useLayoutEffect:Yh,useMemo:ci,useReducer:Lh,useRef:Th,useState:function(){return Lh(Jh)},useDebugValue:ai,useDeferredValue:function(e){var n=Lh(Jh),t=n[0],a=n[1];return Xh(function(){var n=wh.transition;wh.transition=1;try{a(e)}finally{wh.transition=n}},[e]),t},useTransition:function(){var e=Lh(Jh)[0];return[Th().current,e]},useMutableSource:Ph,useOpaqueIdentifier:function(){return Lh(Jh)[0]},unstable_isNewReconciler:!1},ei=ra.ReactCurrentOwner,ug=!1;function fi(e,n,t,a){n.child=null===e?Zg(n,null,t,a):Yg(n,e.child,t,a)}function gi(n,t,a,i,o){a=a.render;var e=t.ref;return(tg(t,o),i=Ch(n,t,a,i,e,o),null!==n&&!ug)?(t.updateQueue=n.updateQueue,t.flags&=-517,n.lanes&=~o,hi(n,t,o)):(t.flags|=1,fi(n,t,i,o),t.child)}function ii(n,t,i,o,d,r){if(null===n){var s=i.type;return"function"!=typeof s||ji(s)||void 0!==s.defaultProps||null!==i.compare||void 0!==i.defaultProps?(n=Vg(i.type,null,o,t,t.mode,r),n.ref=t.ref,n.return=t,t.child=n):(t.tag=15,t.type=s,ki(n,t,s,o,d,r))}return(s=n.child,0==(d&r)&&(d=s.memoizedProps,i=i.compare,i=null===i?Je:i,i(d,o)&&n.ref===t.ref))?hi(n,t,r):(t.flags|=1,n=Tg(s,o),n.ref=t.ref,n.return=t,t.child=n)}function ki(n,t,a,i,o,e){if(null!==n&&Je(n.memoizedProps,i)&&n.ref===t.ref)if(ug=!1,0!=(e&o))0!=(16384&n.flags)&&(ug=!0);else return t.lanes=n.lanes,hi(n,t,e);return li(n,t,a,i,e)}function mi(n,t,i){var o=t.pendingProps,r=o.children,e=null===n?null:n.memoizedState;if("hidden"!==o.mode&&"unstable-defer-without-hiding"!==o.mode)null===e?o=i:(o=e.baseLanes|i,t.memoizedState=null),ni(t,o);else if(0==(4&t.mode))t.memoizedState={baseLanes:0},ni(t,i);else if(0!=(1073741824&i))t.memoizedState={baseLanes:0},ni(t,null===e?i:e.baseLanes);else return n=null===e?i:e.baseLanes|i,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:n},ni(t,n),null;return fi(n,t,r,i),t.child}function oi(e,n){var t=n.ref;(null===e&&null!==t||null!==e&&e.ref!==t)&&(n.flags|=128)}function li(n,t,a,i,o){var e=Ff(a)?Df:M.current;return(e=Ef(t,e),tg(t,o),a=Ch(n,t,a,i,e,o),null!==n&&!ug)?(t.updateQueue=n.updateQueue,t.flags&=-517,n.lanes&=~o,hi(n,t,o)):(t.flags|=1,fi(n,t,a,o),t.child)}function pi(t,a,i,o,r){if(Ff(i)){var e=!0;Jf(a)}else e=!1;if(tg(a,r),null===a.stateNode)null!==t&&(t.alternate=null,a.alternate=null,a.flags|=2),Mg(a,i,o),Og(a,i,o,r),o=!0;else if(null===t){var s=a.stateNode,u=a.memoizedProps;s.props=u;var c=s.context,m=i.contextType;"object"==typeof m&&null!==m?m=vg(m):(m=Ff(i)?Df:M.current,m=Ef(a,m));var b=i.getDerivedStateFromProps,y="function"==typeof b||"function"==typeof s.getSnapshotBeforeUpdate;y||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(u!==o||c!==m)&&Ng(a,s,o,m),wg=!1;var v=a.memoizedState;s.state=v,Cg(a,o,s,r),c=a.memoizedState,u!==o||v!==c||N.current||wg?("function"==typeof b&&(Gg(a,i,b,o),c=a.memoizedState),(u=wg||Lg(a,i,u,o,v,c,m))?(y||"function"!=typeof s.UNSAFE_componentWillMount&&"function"!=typeof s.componentWillMount||("function"==typeof s.componentWillMount&&s.componentWillMount(),"function"==typeof s.UNSAFE_componentWillMount&&s.UNSAFE_componentWillMount()),"function"==typeof s.componentDidMount&&(a.flags|=4)):("function"==typeof s.componentDidMount&&(a.flags|=4),a.memoizedProps=o,a.memoizedState=c),s.props=o,s.state=c,s.context=m,o=u):("function"==typeof s.componentDidMount&&(a.flags|=4),o=!1)}else{s=a.stateNode,yg(t,a),u=a.memoizedProps,m=a.type===a.elementType?u:lg(a.type,u),s.props=m,y=a.pendingProps,v=s.context,c=i.contextType,"object"==typeof c&&null!==c?c=vg(c):(c=Ff(i)?Df:M.current,c=Ef(a,c));var w=i.getDerivedStateFromProps;(b="function"==typeof w||"function"==typeof s.getSnapshotBeforeUpdate)||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(u!==y||v!==c)&&Ng(a,s,o,c),wg=!1,v=a.memoizedState,s.state=v,Cg(a,o,s,r);var E=a.memoizedState;u!==y||v!==E||N.current||wg?("function"==typeof w&&(Gg(a,i,w,o),E=a.memoizedState),(m=wg||Lg(a,i,m,o,v,E,c))?(b||"function"!=typeof s.UNSAFE_componentWillUpdate&&"function"!=typeof s.componentWillUpdate||("function"==typeof s.componentWillUpdate&&s.componentWillUpdate(o,E,c),"function"==typeof s.UNSAFE_componentWillUpdate&&s.UNSAFE_componentWillUpdate(o,E,c)),"function"==typeof s.componentDidUpdate&&(a.flags|=4),"function"==typeof s.getSnapshotBeforeUpdate&&(a.flags|=256)):("function"!=typeof s.componentDidUpdate||u===t.memoizedProps&&v===t.memoizedState||(a.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||u===t.memoizedProps&&v===t.memoizedState||(a.flags|=256),a.memoizedProps=o,a.memoizedState=E),s.props=o,s.state=E,s.context=c,o=m):("function"!=typeof s.componentDidUpdate||u===t.memoizedProps&&v===t.memoizedState||(a.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||u===t.memoizedProps&&v===t.memoizedState||(a.flags|=256),o=!1)}return qi(t,a,i,o,e,r)}function qi(n,t,a,i,o,e){oi(n,t);var r=0!=(64&t.flags);if(!i&&!r)return o&&Kf(t,a,!1),hi(n,t,e);i=t.stateNode,ei.current=t;var s=r&&"function"!=typeof a.getDerivedStateFromError?null:i.render();return t.flags|=1,null!==n&&r?(t.child=Yg(t,n.child,null,e),t.child=Yg(t,null,s,e)):fi(n,t,s,e),t.memoizedState=i.state,o&&Kf(t,a,!0),t.child}function ri(e){var n=e.stateNode;n.pendingContext?Hf(e,n.pendingContext,n.pendingContext!==n.context):n.context&&Hf(e,n.context,!1),eh(e,n.containerInfo)}var si={dehydrated:null,retryLane:0};function ti(n,t,i){var o=t.pendingProps,r=P.current,s=!1,l;return((l=0!=(64&t.flags))||(l=(null===n||null!==n.memoizedState)&&0!=(2&r)),l?(s=!0,t.flags&=-65):null!==n&&null===n.memoizedState||void 0===o.fallback||!0===o.unstable_avoidThisFallback||(r|=1),I(P,1&r),null===n)?(void 0!==o.fallback&&ph(t),n=o.children,r=o.fallback,s)?(n=ui(t,n,r,i),t.child.memoizedState={baseLanes:i},t.memoizedState=si,n):"number"==typeof o.unstable_expectedLoadTime?(n=ui(t,n,r,i),t.child.memoizedState={baseLanes:i},t.memoizedState=si,t.lanes=33554432,n):(i=vi({mode:"visible",children:n},t.mode,i,null),i.return=t,t.child=i):null===n.memoizedState?s?(o=wi(n,t,o.children,o.fallback,i),s=t.child,r=n.child.memoizedState,s.memoizedState=null===r?{baseLanes:i}:{baseLanes:r.baseLanes|i},s.childLanes=n.childLanes&~i,t.memoizedState=si,o):(i=xi(n,t,o.children,i),t.memoizedState=null,i):s?(o=wi(n,t,o.children,o.fallback,i),s=t.child,r=n.child.memoizedState,s.memoizedState=null===r?{baseLanes:i}:{baseLanes:r.baseLanes|i},s.childLanes=n.childLanes&~i,t.memoizedState=si,o):(i=xi(n,t,o.children,i),t.memoizedState=null,i)}function ui(n,t,a,i){var o=n.mode,e=n.child;return t={mode:"hidden",children:t},0==(2&o)&&null!==e?(e.childLanes=0,e.pendingProps=t):e=vi(t,o,0,null),a=Xg(a,o,i,null),e.return=n,a.return=n,e.sibling=a,n.child=e,a}function xi(n,t,i,o){var d=n.child;return n=d.sibling,i=Tg(d,{mode:"visible",children:i}),0==(2&t.mode)&&(i.lanes=o),i.return=t,i.sibling=null,null!==n&&(n.nextEffect=null,n.flags=8,t.firstEffect=t.lastEffect=n),t.child=i}function wi(n,t,i,o,r){var e=t.mode,s=n.child;n=s.sibling;var l={mode:"hidden",children:i};return 0==(2&e)&&t.child!==s?(i=t.child,i.childLanes=0,i.pendingProps=l,s=i.lastEffect,null===s?t.firstEffect=t.lastEffect=null:(t.firstEffect=i.firstEffect,t.lastEffect=s,s.nextEffect=null)):i=Tg(s,l),null===n?(o=Xg(o,e,r,null),o.flags|=2):o=Tg(n,o),o.return=t,i.return=t,i.sibling=o,t.child=i,o}function yi(e,n){e.lanes|=n;var t=e.alternate;null!==t&&(t.lanes|=n),sg(e.return,n)}function zi(n,t,a,i,o,e){var d=n.memoizedState;null===d?n.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:a,tailMode:o,lastEffect:e}:(d.isBackwards=t,d.rendering=null,d.renderingStartTime=0,d.last=i,d.tail=a,d.tailMode=o,d.lastEffect=e)}function Ai(n,t,i){var o=t.pendingProps,r=o.revealOrder,s=o.tail;if(fi(n,t,o.children,i),o=P.current,0!=(2&o))o=2|1&o,t.flags|=64;else{if(null!==n&&0!=(64&n.flags))a:for(n=t.child;null!==n;){if(13===n.tag)null!==n.memoizedState&&yi(n,i);else if(19===n.tag)yi(n,i);else if(null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break a;for(;null===n.sibling;){if(null===n.return||n.return===t)break a;n=n.return}n.sibling.return=n.return,n=n.sibling}o&=1}if(I(P,o),0==(2&t.mode))t.memoizedState=null;else switch(r){case"forwards":for(i=t.child,r=null;null!==i;)n=i.alternate,null!==n&&null===ih(n)&&(r=i),i=i.sibling;i=r,null===i?(r=t.child,t.child=null):(r=i.sibling,i.sibling=null),zi(t,!1,r,i,s,t.lastEffect);break;case"backwards":for(i=null,r=t.child,t.child=null;null!==r;){if(n=r.alternate,null!==n&&null===ih(n)){t.child=r;break}n=r.sibling,r.sibling=i,i=r,r=n}zi(t,!0,i,null,s,t.lastEffect);break;case"together":zi(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null;}return t.child}function hi(e,n,t){if(null!==e&&(n.dependencies=e.dependencies),Dg|=n.lanes,0!=(t&n.childLanes)){if(null!==e&&n.child!==e.child)throw Error(y(153));if(null!==n.child){for(e=n.child,t=Tg(e,e.pendingProps),n.child=t,t.return=n;null!==e.sibling;)e=e.sibling,t=t.sibling=Tg(e,e.pendingProps),t.return=n;t.sibling=null}return n.child}return null}var Bi,Ci,Di,Ei;Bi=function(e,n){for(var t=n.child;null!==t;){if(5===t.tag||6===t.tag)e.appendChild(t.stateNode);else if(4!==t.tag&&null!==t.child){t.child.return=t,t=t.child;continue}if(t===n)break;for(;null===t.sibling;){if(null===t.return||t.return===n)return;t=t.return}t.sibling.return=t.return,t=t.sibling}},Ci=function(){},Di=function(n,t,i,o){var r=n.memoizedProps;if(r!==o){n=t.stateNode,dh(ah.current);var s=null;"input"===i?(r=Ya(n,r),o=Ya(n,o),s=[]):"option"===i?(r=eb(n,r),o=eb(n,o),s=[]):"select"===i?(r=objectAssign({},r,{value:void 0}),o=objectAssign({},o,{value:void 0}),s=[]):"textarea"===i?(r=gb(n,r),o=gb(n,o),s=[]):"function"!=typeof r.onClick&&"function"==typeof o.onClick&&(n.onclick=jf),vb(i,o);var u;for(b in i=null,r)if(!o.hasOwnProperty(b)&&r.hasOwnProperty(b)&&null!=r[b])if("style"===b){var p=r[b];for(u in p)p.hasOwnProperty(u)&&(i||(i={}),i[u]="")}else"dangerouslySetInnerHTML"!==b&&"children"!==b&&"suppressContentEditableWarning"!==b&&"suppressHydrationWarning"!==b&&"autoFocus"!==b&&(ca.hasOwnProperty(b)?s||(s=[]):(s=s||[]).push(b,null));for(b in o){var m=o[b];if(p=null==r?void 0:r[b],o.hasOwnProperty(b)&&m!==p&&(null!=m||null!=p))if("style"!==b)"dangerouslySetInnerHTML"===b?(m=m?m.__html:void 0,p=p?p.__html:void 0,null!=m&&p!==m&&(s=s||[]).push(b,m)):"children"===b?"string"!=typeof m&&"number"!=typeof m||(s=s||[]).push(b,""+m):"suppressContentEditableWarning"!==b&&"suppressHydrationWarning"!==b&&(ca.hasOwnProperty(b)?(null!=m&&"onScroll"===b&&G("scroll",n),s||p===m||(s=[])):"object"==typeof m&&null!==m&&m.$$typeof===Ga?m.toString():(s=s||[]).push(b,m));else if(p){for(u in p)!p.hasOwnProperty(u)||m&&m.hasOwnProperty(u)||(i||(i={}),i[u]="");for(u in m)m.hasOwnProperty(u)&&p[u]!==m[u]&&(i||(i={}),i[u]=m[u])}else i||(s||(s=[]),s.push(b,i)),i=m}i&&(s=s||[]).push("style",i);var b=s;(t.updateQueue=b)&&(t.flags|=4)}},Ei=function(e,n,t,a){t!==a&&(n.flags|=4)};function Fi(e,n){if(!lh)switch(e.tailMode){case"hidden":n=e.tail;for(var t=null;null!==n;)null!==n.alternate&&(t=n),n=n.sibling;null===t?e.tail=null:t.sibling=null;break;case"collapsed":t=e.tail;for(var a=null;null!==t;)null!==t.alternate&&(a=t),t=t.sibling;null===a?n||null===e.tail?e.tail=null:e.tail.sibling=null:a.sibling=null;}}function Gi(n,t,i){var o=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return Ff(t.type)&&Gf(),null;case 3:return fh(),H(N),H(M),uh(),o=t.stateNode,o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(null===n||null===n.child)&&(rh(t)?t.flags|=4:o.hydrate||(t.flags|=256)),Ci(t),null;case 5:hh(t);var r=dh(ch.current);if(i=t.type,null!==n&&null!=t.stateNode)Di(n,t,i,o,r),n.ref!==t.ref&&(t.flags|=128);else{if(!o){if(null===t.stateNode)throw Error(y(166));return null}if(n=dh(ah.current),rh(t)){o=t.stateNode,i=t.type;var s=t.memoizedProps;switch(o[wf]=t,o[xf]=s,i){case"dialog":G("cancel",o),G("close",o);break;case"iframe":case"object":case"embed":G("load",o);break;case"video":case"audio":for(n=0;n<Xe.length;n++)G(Xe[n],o);break;case"source":G("error",o);break;case"img":case"image":case"link":G("error",o),G("load",o);break;case"details":G("toggle",o);break;case"input":Za(o,s),G("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!s.multiple},G("invalid",o);break;case"textarea":hb(o,s),G("invalid",o);}for(var l in vb(i,s),n=null,s)s.hasOwnProperty(l)&&(r=s[l],"children"===l?"string"==typeof r?o.textContent!==r&&(n=["children",r]):"number"==typeof r&&o.textContent!==""+r&&(n=["children",""+r]):ca.hasOwnProperty(l)&&null!=r&&"onScroll"===l&&G("scroll",o));switch(i){case"input":Va(o),cb(o,s,!0);break;case"textarea":Va(o),jb(o);break;case"select":case"option":break;default:"function"==typeof s.onClick&&(o.onclick=jf);}o=n,t.updateQueue=o,null!==o&&(t.flags|=4)}else{switch(l=9===r.nodeType?r:r.ownerDocument,n===kb.html&&(n=lb(i)),n===kb.html?"script"===i?(n=l.createElement("div"),n.innerHTML="<script></script>",n=n.removeChild(n.firstChild)):"string"==typeof o.is?n=l.createElement(i,{is:o.is}):(n=l.createElement(i),"select"===i&&(l=n,o.multiple?l.multiple=!0:o.size&&(l.size=o.size))):n=l.createElementNS(n,i),n[wf]=t,n[xf]=o,Bi(n,t,!1,!1),t.stateNode=n,l=wb(i,o),i){case"dialog":G("cancel",n),G("close",n),r=o;break;case"iframe":case"object":case"embed":G("load",n),r=o;break;case"video":case"audio":for(r=0;r<Xe.length;r++)G(Xe[r],n);r=o;break;case"source":G("error",n),r=o;break;case"img":case"image":case"link":G("error",n),G("load",n),r=o;break;case"details":G("toggle",n),r=o;break;case"input":Za(n,o),r=Ya(n,o),G("invalid",n);break;case"option":r=eb(n,o);break;case"select":n._wrapperState={wasMultiple:!!o.multiple},r=objectAssign({},o,{value:void 0}),G("invalid",n);break;case"textarea":hb(n,o),r=gb(n,o),G("invalid",n);break;default:r=o;}vb(i,r);var u=r;for(s in u)if(u.hasOwnProperty(s)){var p=u[s];"style"===s?tb(n,p):"dangerouslySetInnerHTML"===s?(p=p?p.__html:void 0,null!=p&&ob(n,p)):"children"===s?"string"==typeof p?("textarea"!==i||""!==p)&&pb(n,p):"number"==typeof p&&pb(n,""+p):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(ca.hasOwnProperty(s)?null!=p&&"onScroll"===s&&G("scroll",n):null!=p&&qa(n,s,p,l))}"input"===i?(Va(n),cb(n,o,!1)):"textarea"===i?(Va(n),jb(n)):"option"===i?null!=o.value&&n.setAttribute("value",""+Sa(o.value)):"select"===i?(n.multiple=!!o.multiple,s=o.value,null==s?null!=o.defaultValue&&fb(n,!!o.multiple,o.defaultValue,!0):fb(n,!!o.multiple,s,!1)):"function"==typeof r.onClick&&(n.onclick=jf),mf(i,o)&&(t.flags|=4)}null!==t.ref&&(t.flags|=128)}return null;case 6:if(n&&null!=t.stateNode)Ei(n,t,n.memoizedProps,o);else{if("string"!=typeof o&&null===t.stateNode)throw Error(y(166));i=dh(ch.current),dh(ah.current),rh(t)?(o=t.stateNode,i=t.memoizedProps,o[wf]=t,o.nodeValue!==i&&(t.flags|=4)):(o=(9===i.nodeType?i:i.ownerDocument).createTextNode(o),o[wf]=t,t.stateNode=o)}return null;case 13:return(H(P),o=t.memoizedState,0!=(64&t.flags))?(t.lanes=i,t):(o=null!==o,i=!1,null===n?void 0!==t.memoizedProps.fallback&&rh(t):i=null!==n.memoizedState,o&&!i&&0!=(2&t.mode)&&(null===n&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!=(1&P.current)?0===V&&(V=3):((0===V||3===V)&&(V=4),null===U||0==(134217727&Dg)&&0==(134217727&Hi)||Ii(U,W))),(o||i)&&(t.flags|=4),null);case 4:return fh(),Ci(t),null===n&&cf(t.stateNode.containerInfo),null;case 10:return rg(t),null;case 17:return Ff(t.type)&&Gf(),null;case 19:if(H(P),o=t.memoizedState,null===o)return null;if(s=0!=(64&t.flags),l=o.rendering,null!==l){if(!s)if(n=ih(l),null===n)2*O()-o.renderingStartTime>Ji&&1073741824!==i&&(t.flags|=64,s=!0,Fi(o,!1),t.lanes=33554432);else if(t.flags|=64,s=!0,i=n.updateQueue,null!==i&&(t.updateQueue=i,t.flags|=4),Fi(o,!0),null===o.tail&&"hidden"===o.tailMode&&!l.alternate&&!lh)return t=t.lastEffect=o.lastEffect,null!==t&&(t.nextEffect=null),null;o.isBackwards?(l.sibling=t.child,t.child=l):(i=o.last,null===i?t.child=l:i.sibling=l,o.last=l)}else if(s)Fi(o,!1);else{if(0!==V||null!==n&&0!=(64&n.flags))for(n=t.child;null!==n;){if(l=ih(n),null!==l){for(t.flags|=64,Fi(o,!1),s=l.updateQueue,null!==s&&(t.updateQueue=s,t.flags|=4),null===o.lastEffect&&(t.firstEffect=null),t.lastEffect=o.lastEffect,o=i,i=t.child;null!==i;)s=i,n=o,s.flags&=2,s.nextEffect=null,s.firstEffect=null,s.lastEffect=null,l=s.alternate,null===l?(s.childLanes=0,s.lanes=n,s.child=null,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=l.childLanes,s.lanes=l.lanes,s.child=l.child,s.memoizedProps=l.memoizedProps,s.memoizedState=l.memoizedState,s.updateQueue=l.updateQueue,s.type=l.type,n=l.dependencies,s.dependencies=null===n?null:{lanes:n.lanes,firstContext:n.firstContext}),i=i.sibling;return I(P,2|1&P.current),t.child}n=n.sibling}null!==o.tail&&O()>Ji&&(t.flags|=64,s=!0,Fi(o,!1),t.lanes=33554432)}return null===o.tail?null:(i=o.tail,o.rendering=i,o.tail=i.sibling,o.lastEffect=t.lastEffect,o.renderingStartTime=O(),i.sibling=null,t=P.current,I(P,s?2|1&t:1&t),i);case 23:case 24:return Ki(),null!==n&&null!==n.memoizedState!=(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==o.mode&&(t.flags|=4),null;}throw Error(y(156,t.tag))}function Li(e){switch(e.tag){case 1:Ff(e.type)&&Gf();var n=e.flags;return 4096&n?(e.flags=64|-4097&n,e):null;case 3:if(fh(),H(N),H(M),uh(),n=e.flags,0!=(64&n))throw Error(y(285));return e.flags=64|-4097&n,e;case 5:return hh(e),null;case 13:return H(P),n=e.flags,4096&n?(e.flags=64|-4097&n,e):null;case 19:return H(P),null;case 4:return fh(),null;case 10:return rg(e),null;case 23:case 24:return Ki(),null;default:return null;}}function Mi(n,t){try{var a="",i=t;do a+=Qa(i),i=i.return;while(i);var o=a}catch(e){o="\nError generating stack: "+e.message+"\n"+e.stack}return{value:n,source:t,stack:o}}function Ni(e,n){try{console.error(n.value)}catch(e){setTimeout(function(){throw e})}}var Oi="function"==typeof WeakMap?WeakMap:Map;function Pi(e,n,t){t=zg(-1,t),t.tag=3,t.payload={element:null};var a=n.value;return t.callback=function(){Qi||(Qi=!0,Ri=a),Ni(e,n)},t}function Si(n,t,a){a=zg(-1,a),a.tag=3;var i=n.type.getDerivedStateFromError;if("function"==typeof i){var o=t.value;a.payload=function(){return Ni(n,t),i(o)}}var e=n.stateNode;return null!==e&&"function"==typeof e.componentDidCatch&&(a.callback=function(){"function"!=typeof i&&(null===Ti?Ti=new Set([this]):Ti.add(this),Ni(n,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null===e?"":e})}),a}var Ui="function"==typeof WeakSet?WeakSet:Set;function Vi(e){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){Wi(e,n)}else n.current=null}function Xi(e,n){switch(n.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&n.flags&&null!==e){var t=e.memoizedProps,i=e.memoizedState;e=n.stateNode,n=e.getSnapshotBeforeUpdate(n.elementType===n.type?t:lg(n.type,t),i),e.__reactInternalSnapshotBeforeUpdate=n}return;case 3:return void(256&n.flags&&qf(n.stateNode.containerInfo));case 5:case 6:case 4:case 17:return;}throw Error(y(163))}function Yi(n,t,i){switch(i.tag){case 0:case 11:case 15:case 22:if(t=i.updateQueue,t=null===t?null:t.lastEffect,null!==t){n=t=t.next;do{if(3==(3&n.tag)){var o=n.create;n.destroy=o()}n=n.next}while(n!==t)}if(t=i.updateQueue,t=null===t?null:t.lastEffect,null!==t){n=t=t.next;do{var r=n;o=r.next,r=r.tag,0!=(4&r)&&0!=(1&r)&&(Zi(i,n),$i(i,n)),n=o}while(n!==t)}return;case 1:return n=i.stateNode,4&i.flags&&(null===t?n.componentDidMount():(o=i.elementType===i.type?t.memoizedProps:lg(i.type,t.memoizedProps),n.componentDidUpdate(o,t.memoizedState,n.__reactInternalSnapshotBeforeUpdate))),t=i.updateQueue,void(null!==t&&Eg(i,t,n));case 3:if(t=i.updateQueue,null!==t){if(n=null,null!==i.child)switch(i.child.tag){case 5:n=i.child.stateNode;break;case 1:n=i.child.stateNode;}Eg(i,t,n)}return;case 5:return n=i.stateNode,void(null===t&&4&i.flags&&mf(i.type,i.memoizedProps)&&n.focus());case 6:return;case 4:return;case 12:return;case 13:return void(null===i.memoizedState&&(i=i.alternate,null!==i&&(i=i.memoizedState,null!==i&&(i=i.dehydrated,null!==i&&Cc(i)))));case 19:case 17:case 20:case 21:case 23:case 24:return;}throw Error(y(163))}function aj(n,t){for(var a=n;;){if(5===a.tag){var i=a.stateNode;if(t)i=i.style,"function"==typeof i.setProperty?i.setProperty("display","none","important"):i.display="none";else{i=a.stateNode;var o=a.memoizedProps.style;o=void 0!==o&&null!==o&&o.hasOwnProperty("display")?o.display:null,i.style.display=sb("display",o)}}else if(6===a.tag)a.stateNode.nodeValue=t?"":a.memoizedProps;else if((23!==a.tag&&24!==a.tag||null===a.memoizedState||a===n)&&null!==a.child){a.child.return=a,a=a.child;continue}if(a===n)break;for(;null===a.sibling;){if(null===a.return||a.return===n)return;a=a.return}a.sibling.return=a.return,a=a.sibling}}function bj(n,t){if(Mf&&"function"==typeof Mf.onCommitFiberUnmount)try{Mf.onCommitFiberUnmount(Lf,t)}catch(e){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(n=t.updateQueue,null!==n&&(n=n.lastEffect,null!==n)){var i=n=n.next;do{var o=i,r=o.destroy;if(o=o.tag,void 0!==r)if(0!=(4&o))Zi(t,i);else{o=t;try{r()}catch(e){Wi(o,e)}}i=i.next}while(i!==n)}break;case 1:if(Vi(t),n=t.stateNode,"function"==typeof n.componentWillUnmount)try{n.props=t.memoizedProps,n.state=t.memoizedState,n.componentWillUnmount()}catch(e){Wi(t,e)}break;case 5:Vi(t);break;case 4:cj(n,t);}}function dj(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function ej(e){return 5===e.tag||3===e.tag||4===e.tag}function fj(e){a:{for(var n=e.return;null!==n;){if(ej(n))break a;n=n.return}throw Error(y(160))}var t=n;switch(n=t.stateNode,t.tag){case 5:var a=!1;break;case 3:n=n.containerInfo,a=!0;break;case 4:n=n.containerInfo,a=!0;break;default:throw Error(y(161));}16&t.flags&&(pb(n,""),t.flags&=-17);a:b:for(t=e;;){for(;null===t.sibling;){if(null===t.return||ej(t.return)){t=null;break a}t=t.return}for(t.sibling.return=t.return,t=t.sibling;5!==t.tag&&6!==t.tag&&18!==t.tag;){if(2&t.flags)continue b;if(null===t.child||4===t.tag)continue b;else t.child.return=t,t=t.child}if(!(2&t.flags)){t=t.stateNode;break a}}a?gj(e,t,n):hj(e,t,n)}function gj(n,t,i){var o=n.tag,d=5===o||6===o;if(d)n=d?n.stateNode:n.stateNode.instance,t?8===i.nodeType?i.parentNode.insertBefore(n,t):i.insertBefore(n,t):(8===i.nodeType?(t=i.parentNode,t.insertBefore(n,i)):(t=i,t.appendChild(n)),i=i._reactRootContainer,null!==i&&void 0!==i||null!==t.onclick||(t.onclick=jf));else if(4!==o&&(n=n.child,null!==n))for(gj(n,t,i),n=n.sibling;null!==n;)gj(n,t,i),n=n.sibling}function hj(n,t,i){var o=n.tag,d=5===o||6===o;if(d)n=d?n.stateNode:n.stateNode.instance,t?i.insertBefore(n,t):i.appendChild(n);else if(4!==o&&(n=n.child,null!==n))for(hj(n,t,i),n=n.sibling;null!==n;)hj(n,t,i),n=n.sibling}function cj(n,t){for(var a=t,i=!1,o,r;;){if(!i){i=a.return;a:for(;;){if(null===i)throw Error(y(160));switch(o=i.stateNode,i.tag){case 5:r=!1;break a;case 3:o=o.containerInfo,r=!0;break a;case 4:o=o.containerInfo,r=!0;break a;}i=i.return}i=!0}if(5===a.tag||6===a.tag){a:for(var s=n,l=a,u=l;;)if(bj(s,u),null!==u.child&&4!==u.tag)u.child.return=u,u=u.child;else{if(u===l)break a;for(;null===u.sibling;){if(null===u.return||u.return===l)break a;u=u.return}u.sibling.return=u.return,u=u.sibling}r?(s=o,l=a.stateNode,8===s.nodeType?s.parentNode.removeChild(l):s.removeChild(l)):o.removeChild(a.stateNode)}else if(4===a.tag){if(null!==a.child){o=a.stateNode.containerInfo,r=!0,a.child.return=a,a=a.child;continue}}else if(bj(n,a),null!==a.child){a.child.return=a,a=a.child;continue}if(a===t)break;for(;null===a.sibling;){if(null===a.return||a.return===t)return;a=a.return,4===a.tag&&(i=!1)}a.sibling.return=a.return,a=a.sibling}}function ij(n,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var i=t.updateQueue;if(i=null===i?null:i.lastEffect,null!==i){var o=i=i.next;do 3==(3&o.tag)&&(n=o.destroy,o.destroy=void 0,void 0!==n&&n()),o=o.next;while(o!==i)}return;case 1:return;case 5:if(i=t.stateNode,null!=i){o=t.memoizedProps;var r=null===n?o:n.memoizedProps;n=t.type;var s=t.updateQueue;if(t.updateQueue=null,null!==s){for(i[xf]=o,"input"===n&&"radio"===o.type&&null!=o.name&&$a(i,o),wb(n,r),t=wb(n,o),r=0;r<s.length;r+=2){var l=s[r],u=s[r+1];"style"===l?tb(i,u):"dangerouslySetInnerHTML"===l?ob(i,u):"children"===l?pb(i,u):qa(i,l,u,t)}"input"===n?ab(i,o):"textarea"===n?ib(i,o):"select"===n?(n=i._wrapperState.wasMultiple,i._wrapperState.wasMultiple=!!o.multiple,s=o.value,null==s?n!==!!o.multiple&&(null==o.defaultValue?fb(i,!!o.multiple,o.multiple?[]:"",!1):fb(i,!!o.multiple,o.defaultValue,!0)):fb(i,!!o.multiple,s,!1)):void 0}}return;case 6:if(null===t.stateNode)throw Error(y(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return i=t.stateNode,void(i.hydrate&&(i.hydrate=!1,Cc(i.containerInfo)));case 12:return;case 13:return null!==t.memoizedState&&(jj=O(),aj(t.child,!0)),void kj(t);case 19:return void kj(t);case 17:return;case 23:case 24:return void aj(t,null!==t.memoizedState);}throw Error(y(163))}function kj(e){var n=e.updateQueue;if(null!==n){e.updateQueue=null;var t=e.stateNode;null===t&&(t=e.stateNode=new Ui),n.forEach(function(n){var a=lj.bind(null,e,n);t.has(n)||(t.add(n),n.then(a,a))})}}function mj(e,n){return!!(null!==e&&(e=e.memoizedState,null===e||null!==e.dehydrated))&&(n=n.memoizedState,null!==n&&null===n.dehydrated)}var nj=Math.ceil,oj=ra.ReactCurrentDispatcher,pj=ra.ReactCurrentOwner,X=0,U=null,Y=null,W=0,qj=0,rj=Bf(0),V=0,sj=null,tj=0,Dg=0,Hi=0,uj=0,vj=null,jj=0,Ji=1/0;function wj(){Ji=O()+500}var Z=null,Qi=!1,Ri=null,Ti=null,xj=!1,yj=null,zj=90,Aj=[],Bj=[],Cj=null,Dj=0,Ej=null,Fj=-1,Gj=0,Hj=0,Ij=null,Jj=!1;function Hg(){return 0==(48&X)?-1===Fj?Fj=O():Fj:O()}function Ig(e){if(e=e.mode,0==(2&e))return 1;if(0==(4&e))return 99===eg()?1:2;if(0===Gj&&(Gj=tj),0!==kg.transition){0!==Hj&&(Hj=null===vj?0:vj.pendingLanes),e=Gj;var n=4186112&~Hj;return n&=-n,0==n&&(e=4186112&~e,n=e&-e,0==n&&(n=8192)),n}return e=eg(),0!=(4&X)&&98===e?e=Xc(12,Gj):(e=Sc(e),e=Xc(e,Gj)),e}function Jg(e,n,t){if(50<Dj)throw Dj=0,Ej=null,Error(y(185));if(e=Kj(e,n),null===e)return null;$c(e,n,t),e===U&&(Hi|=n,4===V&&Ii(e,W));var i=eg();1===n?0!=(8&X)&&0==(48&X)?Lj(e):(Mj(e,t),0===X&&(wj(),ig())):(0==(4&X)||98!==i&&99!==i||(null===Cj?Cj=new Set([e]):Cj.add(e)),Mj(e,t)),vj=e}function Kj(e,n){e.lanes|=n;var t=e.alternate;for(null!==t&&(t.lanes|=n),t=e,e=e.return;null!==e;)e.childLanes|=n,t=e.alternate,null!==t&&(t.childLanes|=n),t=e,e=e.return;return 3===t.tag?t.stateNode:null}function Mj(t,a){for(var i=t.callbackNode,o=t.suspendedLanes,r=t.pingedLanes,e=t.expirationTimes,s=t.pendingLanes;0<s;){var u=31-Vc(s),f=1<<u,p=e[u];if(-1!==p)p<=a&&(t.expiredLanes|=f);else if(0==(f&o)||0!=(f&r)){p=a,Rc(f);var m=F;e[u]=10<=m?p+250:6<=m?p+5E3:-1}s&=~f}if(o=Uc(t,t===U?W:0),a=F,0===o)null!==i&&(i!==Zf&&Pf(i),t.callbackNode=null,t.callbackPriority=0);else{if(null!==i){if(t.callbackPriority===a)return;i!==Zf&&Pf(i)}15===a?(i=Lj.bind(null,t),null===ag?(ag=[i],bg=Of(Uf,jg)):ag.push(i),i=Zf):14===a?i=hg(99,Lj.bind(null,t)):(i=Tc(a),i=hg(i,Nj.bind(null,t))),t.callbackPriority=a,t.callbackNode=i}}function Nj(n){if(Fj=-1,Hj=Gj=0,0!=(48&X))throw Error(y(327));var t=n.callbackNode;if(Oj()&&n.callbackNode!==t)return null;var a=Uc(n,n===U?W:0);if(0===a)return null;var i=a,o=X;X|=16;var r=Pj();(U!==n||W!==i)&&(wj(),Qj(n,i));do try{Rj();break}catch(e){Sj(n,e)}while(1);if(qg(),oj.current=r,X=o,null===Y?(U=null,W=0,i=V):i=0,0!=(tj&Hi))Qj(n,0);else if(0!==i){if(2===i&&(X|=64,n.hydrate&&(n.hydrate=!1,qf(n.containerInfo)),a=Wc(n),0!==a&&(i=Tj(n,a))),1===i)throw t=sj,Qj(n,0),Ii(n,a),Mj(n,O()),t;switch(n.finishedWork=n.current.alternate,n.finishedLanes=a,i){case 0:case 1:throw Error(y(345));case 2:Uj(n);break;case 3:if(Ii(n,a),(62914560&a)===a&&(i=jj+500-O(),10<i)){if(0!==Uc(n,0))break;if(o=n.suspendedLanes,(o&a)!==a){Hg(),n.pingedLanes|=n.suspendedLanes&o;break}n.timeoutHandle=of(Uj.bind(null,n),i);break}Uj(n);break;case 4:if(Ii(n,a),(4186112&a)===a)break;for(i=n.eventTimes,o=-1;0<a;){var s=31-Vc(a);r=1<<s,s=i[s],s>o&&(o=s),a&=~r}if(a=o,a=O()-a,a=(120>a?120:480>a?480:1080>a?1080:1920>a?1920:3E3>a?3E3:4320>a?4320:1960*nj(a/1960))-a,10<a){n.timeoutHandle=of(Uj.bind(null,n),a);break}Uj(n);break;case 5:Uj(n);break;default:throw Error(y(329));}}return Mj(n,O()),n.callbackNode===t?Nj.bind(null,n):null}function Ii(e,n){for(n&=~uj,n&=~Hi,e.suspendedLanes|=n,e.pingedLanes&=~n,e=e.expirationTimes;0<n;){var t=31-Vc(n),i=1<<t;e[t]=-1,n&=~i}}function Lj(e){if(0!=(48&X))throw Error(y(327));if(Oj(),e===U&&0!=(e.expiredLanes&W)){var n=W,t=Tj(e,n);0!=(tj&Hi)&&(n=Uc(e,n),t=Tj(e,n))}else n=Uc(e,0),t=Tj(e,n);if(0!==e.tag&&2===t&&(X|=64,e.hydrate&&(e.hydrate=!1,qf(e.containerInfo)),n=Wc(e),0!==n&&(t=Tj(e,n))),1===t)throw t=sj,Qj(e,0),Ii(e,n),Mj(e,O()),t;return e.finishedWork=e.current.alternate,e.finishedLanes=n,Uj(e),Mj(e,O()),null}function Vj(){if(null!==Cj){var e=Cj;Cj=null,e.forEach(function(e){e.expiredLanes|=24&e.pendingLanes,Mj(e,O())})}ig()}function Wj(e,n){var t=X;X|=1;try{return e(n)}finally{X=t,0===X&&(wj(),ig())}}function Xj(e,n){var t=X;X&=-2,X|=8;try{return e(n)}finally{X=t,0===X&&(wj(),ig())}}function ni(e,n){I(rj,qj),qj|=n,tj|=n}function Ki(){qj=rj.current,H(rj)}function Qj(e,n){e.finishedWork=null,e.finishedLanes=0;var t=e.timeoutHandle;if(-1!==t&&(e.timeoutHandle=-1,pf(t)),null!==Y)for(t=Y.return;null!==t;){var a=t;switch(a.tag){case 1:a=a.type.childContextTypes,null!==a&&void 0!==a&&Gf();break;case 3:fh(),H(N),H(M),uh();break;case 5:hh(a);break;case 4:fh();break;case 13:H(P);break;case 19:H(P);break;case 10:rg(a);break;case 23:case 24:Ki();}t=t.return}U=e,Y=Tg(e.current,null),W=qj=tj=n,V=0,sj=null,uj=Hi=Dg=0}function Sj(i,a){do{var o=Y;try{if(qg(),vh.current=Gh,yh){for(var r=R.memoizedState,s;null!==r;)s=r.queue,null!==s&&(s.pending=null),r=r.next;yh=!1}if(xh=0,T=S=R=null,zh=!1,pj.current=null,null===o||null===o.return){V=1,sj=a,Y=null;break}a:{var m=i,y=o.return,g=o,E=a;if(a=W,g.flags|=2048,g.firstEffect=g.lastEffect=null,null!==E&&"object"==typeof E&&"function"==typeof E.then){var S=E;if(0==(2&g.mode)){var l=g.alternate;l?(g.updateQueue=l.updateQueue,g.memoizedState=l.memoizedState,g.lanes=l.lanes):(g.updateQueue=null,g.memoizedState=null)}var n=0!=(1&P.current),_=y;do{var N;if(N=13===_.tag){var T=_.memoizedState;if(null!==T)N=null!==T.dehydrated;else{var x=_.memoizedProps;N=void 0!==x.fallback&&(!0!==x.unstable_avoidThisFallback||!n)}}if(N){var w=_.updateQueue;if(null===w){var I=new Set;I.add(S),_.updateQueue=I}else w.add(S);if(0==(2&_.mode)){if(_.flags|=64,g.flags|=16384,g.flags&=-2981,1===g.tag)if(null===g.alternate)g.tag=17;else{var u=zg(-1,1);u.tag=2,Ag(g,u)}g.lanes|=1;break a}E=void 0,g=a;var t=m.pingCache;if(null===t?(t=m.pingCache=new Oi,E=new Set,t.set(S,E)):(E=t.get(S),void 0===E&&(E=new Set,t.set(S,E))),!E.has(g)){E.add(g);var D=Yj.bind(null,m,S,g);S.then(D,D)}_.flags|=4096,_.lanes=a;break a}_=_.return}while(null!==_);E=Error((Ra(g.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==V&&(V=2),E=Mi(E,g),_=y;do{switch(_.tag){case 3:m=E,_.flags|=4096,a&=-a,_.lanes|=a;var v=Pi(_,m,a);Bg(_,v);break a;case 1:m=E;var z=_.type,A=_.stateNode;if(0==(64&_.flags)&&("function"==typeof z.getDerivedStateFromError||null!==A&&"function"==typeof A.componentDidCatch&&(null===Ti||!Ti.has(A)))){_.flags|=4096,a&=-a,_.lanes|=a;var O=Si(_,m,a);Bg(_,O);break a}}_=_.return}while(null!==_)}Zj(o)}catch(e){a=e,Y===o&&null!==o&&(Y=o=o.return);continue}break}while(1)}function Pj(){var e=oj.current;return oj.current=Gh,null===e?Gh:e}function Tj(n,e){var t=X;X|=16;var a=Pj();U===n&&W===e||Qj(n,e);do try{ak();break}catch(t){Sj(n,t)}while(1);if(qg(),X=t,oj.current=a,null!==Y)throw Error(y(261));return U=null,W=0,V}function ak(){for(;null!==Y;)bk(Y)}function Rj(){for(;null!==Y&&!Qf();)bk(Y)}function bk(e){var n=ck(e.alternate,e,qj);e.memoizedProps=e.pendingProps,null===n?Zj(e):Y=n,pj.current=null}function Zj(n){var t=n;do{var i=t.alternate;if(n=t.return,0==(2048&t.flags)){if(i=Gi(i,t,qj),null!==i)return void(Y=i);if(i=t,24!==i.tag&&23!==i.tag||null===i.memoizedState||0!=(1073741824&qj)||0==(4&i.mode)){for(var o=0,r=i.child;null!==r;)o|=r.lanes|r.childLanes,r=r.sibling;i.childLanes=o}null!==n&&0==(2048&n.flags)&&(null===n.firstEffect&&(n.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=t.firstEffect),n.lastEffect=t.lastEffect),1<t.flags&&(null===n.lastEffect?n.firstEffect=t:n.lastEffect.nextEffect=t,n.lastEffect=t))}else{if(i=Li(t),null!==i)return i.flags&=2047,void(Y=i);null!==n&&(n.firstEffect=n.lastEffect=null,n.flags|=2048)}if(t=t.sibling,null!==t)return void(Y=t);Y=t=n}while(null!==t);0===V&&(V=5)}function Uj(e){var n=eg();return gg(99,dk.bind(null,e,n)),null}function dk(i,o){var r=Math.min;do Oj();while(null!==yj);if(0!=(48&X))throw Error(y(327));var s=i.finishedWork;if(null===s)return null;if(i.finishedWork=null,i.finishedLanes=0,s===i.current)throw Error(y(177));i.callbackNode=null;var m=s.lanes|s.childLanes,E=m,S=i.pendingLanes&~E;i.pendingLanes=E,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=E,i.mutableReadLanes&=E,i.entangledLanes&=E,E=i.entanglements;for(var _=i.eventTimes,N=i.expirationTimes;0<S;){var T=31-Vc(S),R=1<<T;E[T]=0,_[T]=-1,N[T]=-1,S&=~R}if(null!==Cj&&0==(24&m)&&Cj.has(i)&&Cj.delete(i),i===U&&(Y=U=null,W=0),1<s.flags?null===s.lastEffect?m=s:(s.lastEffect.nextEffect=s,m=s.firstEffect):m=s.firstEffect,null!==m){if(E=X,X|=32,pj.current=null,kf=fd,_=Ne(),Oe(_)){if("selectionStart"in _)N={start:_.selectionStart,end:_.selectionEnd};else a:if(N=(N=_.ownerDocument)&&N.defaultView||window,(R=N.getSelection&&N.getSelection())&&0!==R.rangeCount){N=R.anchorNode,S=R.anchorOffset,T=R.focusNode,R=R.focusOffset;try{N.nodeType,T.nodeType}catch(e){N=null;break a}var P=0,I=-1,D=-1,M=0,F=0,B=_,W=null;b:for(;;){for(var V;;){if(B!==N||0!==S&&3!==B.nodeType||(I=P+S),B!==T||0!==R&&3!==B.nodeType||(D=P+R),3===B.nodeType&&(P+=B.nodeValue.length),null===(V=B.firstChild))break;W=B,B=V}for(;;){if(B===_)break b;if(W===N&&++M===S&&(I=P),W===T&&++F===R&&(D=P),null!==(V=B.nextSibling))break;B=W,W=B.parentNode}B=V}N=-1===I||-1===D?null:{start:I,end:D}}else N=null;N=N||{start:0,end:0}}else N=null;lf={focusedElem:_,selectionRange:N},fd=!1,Ij=null,Jj=!1,Z=m;do try{ek()}catch(e){if(null===Z)throw Error(y(330));Wi(Z,e),Z=Z.nextEffect}while(null!==Z);Ij=null,Z=m;do try{for(_=i;null!==Z;){var j=Z.flags;if(16&j&&pb(Z.stateNode,""),128&j){var H=Z.alternate;if(null!==H){var Y=H.ref;null!==Y&&("function"==typeof Y?Y(null):Y.current=null)}}switch(1038&j){case 2:fj(Z),Z.flags&=-3;break;case 6:fj(Z),Z.flags&=-3,ij(Z.alternate,Z);break;case 1024:Z.flags&=-1025;break;case 1028:Z.flags&=-1025,ij(Z.alternate,Z);break;case 4:ij(Z.alternate,Z);break;case 8:N=Z,cj(_,N);var $=N.alternate;dj(N),null!==$&&dj($);}Z=Z.nextEffect}}catch(e){if(null===Z)throw Error(y(330));Wi(Z,e),Z=Z.nextEffect}while(null!==Z);if(Y=lf,H=Ne(),j=Y.focusedElem,_=Y.selectionRange,H!==j&&j&&j.ownerDocument&&Me(j.ownerDocument.documentElement,j)){for(null!==_&&Oe(j)&&(H=_.start,Y=_.end,void 0===Y&&(Y=H),("selectionStart"in j)?(j.selectionStart=H,j.selectionEnd=r(Y,j.value.length)):(Y=(H=j.ownerDocument||document)&&H.defaultView||window,Y.getSelection&&(Y=Y.getSelection(),N=j.textContent.length,$=r(_.start,N),_=void 0===_.end?$:r(_.end,N),!Y.extend&&$>_&&(N=_,_=$,$=N),N=Le(j,$),S=Le(j,_),N&&S&&(1!==Y.rangeCount||Y.anchorNode!==N.node||Y.anchorOffset!==N.offset||Y.focusNode!==S.node||Y.focusOffset!==S.offset)&&(H=H.createRange(),H.setStart(N.node,N.offset),Y.removeAllRanges(),$>_?(Y.addRange(H),Y.extend(S.node,S.offset)):(H.setEnd(S.node,S.offset),Y.addRange(H)))))),H=[],Y=j;Y=Y.parentNode;)1===Y.nodeType&&H.push({element:Y,left:Y.scrollLeft,top:Y.scrollTop});for("function"==typeof j.focus&&j.focus(),j=0;j<H.length;j++)Y=H[j],Y.element.scrollLeft=Y.left,Y.element.scrollTop=Y.top}fd=!!kf,lf=kf=null,i.current=s,Z=m;do try{for(j=i;null!==Z;){var G=Z.flags;if(36&G&&Yi(j,Z.alternate,Z),128&G){H=void 0;var ee=Z.ref;if(null!==ee){var Q=Z.stateNode;switch(Z.tag){case 5:H=Q;break;default:H=Q;}"function"==typeof ee?ee(H):ee.current=H}}Z=Z.nextEffect}}catch(e){if(null===Z)throw Error(y(330));Wi(Z,e),Z=Z.nextEffect}while(null!==Z);Z=null,$f(),X=E}else i.current=s;if(xj)xj=!1,yj=i,zj=o;else for(Z=m;null!==Z;)o=Z.nextEffect,Z.nextEffect=null,8&Z.flags&&(G=Z,G.sibling=null,G.stateNode=null),Z=o;if(m=i.pendingLanes,0===m&&(Ti=null),1===m?i===Ej?Dj++:(Dj=0,Ej=i):Dj=0,s=s.stateNode,Mf&&"function"==typeof Mf.onCommitFiberRoot)try{Mf.onCommitFiberRoot(Lf,s,void 0,64==(64&s.current.flags))}catch(e){}if(Mj(i,O()),Qi)throw Qi=!1,i=Ri,Ri=null,i;return 0==(8&X)?(ig(),null):null}function ek(){for(;null!==Z;){var e=Z.alternate;Jj||null===Ij||(0==(8&Z.flags)?13===Z.tag&&mj(e,Z)&&dc(Z,Ij)&&(Jj=!0):dc(Z,Ij)&&(Jj=!0));var n=Z.flags;0!=(256&n)&&Xi(e,Z),0==(512&n)||xj||(xj=!0,hg(97,function(){return Oj(),null})),Z=Z.nextEffect}}function Oj(){if(90!==zj){var e=97<zj?97:zj;return zj=90,gg(e,fk)}return!1}function $i(e,n){Aj.push(n,e),xj||(xj=!0,hg(97,function(){return Oj(),null}))}function Zi(e,n){Bj.push(n,e),xj||(xj=!0,hg(97,function(){return Oj(),null}))}function fk(){if(null===yj)return!1;var n=yj;if(yj=null,0!=(48&X))throw Error(y(331));var t=X;X|=32;var i=Bj;Bj=[];for(var o=0;o<i.length;o+=2){var r=i[o],s=i[o+1],l=r.destroy;if(r.destroy=void 0,"function"==typeof l)try{l()}catch(e){if(null===s)throw Error(y(330));Wi(s,e)}}for(i=Aj,Aj=[],o=0;o<i.length;o+=2){r=i[o],s=i[o+1];try{var u=r.create;r.destroy=u()}catch(e){if(null===s)throw Error(y(330));Wi(s,e)}}for(u=n.current.firstEffect;null!==u;)n=u.nextEffect,u.nextEffect=null,8&u.flags&&(u.sibling=null,u.stateNode=null),u=n;return X=t,ig(),!0}function gk(e,n,t){n=Mi(t,n),n=Pi(e,n,1),Ag(e,n),n=Hg(),e=Kj(e,1),null!==e&&($c(e,1,n),Mj(e,n))}function Wi(n,t){if(3===n.tag)gk(n,n,t);else for(var i=n.return;null!==i;){if(3===i.tag){gk(i,n,t);break}else if(1===i.tag){var o=i.stateNode;if("function"==typeof i.type.getDerivedStateFromError||"function"==typeof o.componentDidCatch&&(null===Ti||!Ti.has(o))){n=Mi(t,n);var d=Si(i,n,1);if(Ag(i,d),d=Hg(),i=Kj(i,1),null!==i)$c(i,1,d),Mj(i,d);else if("function"==typeof o.componentDidCatch&&(null===Ti||!Ti.has(o)))try{o.componentDidCatch(t,n)}catch(e){}break}}i=i.return}}function Yj(e,n,t){var a=e.pingCache;null!==a&&a.delete(n),n=Hg(),e.pingedLanes|=e.suspendedLanes&t,U===e&&(W&t)===t&&(4===V||3===V&&(62914560&W)===W&&500>O()-jj?Qj(e,0):uj|=t),Mj(e,n)}function lj(e,n){var t=e.stateNode;null!==t&&t.delete(n),n=0,0===n&&(n=e.mode,0==(2&n)?n=1:0==(4&n)?n=99===eg()?1:2:(0===Gj&&(Gj=tj),n=Yc(62914560&~Gj),0===n&&(n=4194304))),t=Hg(),e=Kj(e,n),null!==e&&($c(e,n,t),Mj(e,t))}var ck;ck=function(n,t,i){var o=t.lanes;if(null===n)ug=!1;else if(n.memoizedProps!==t.pendingProps||N.current)ug=!0;else if(0!=(i&o))ug=0!=(16384&n.flags);else{switch(ug=!1,t.tag){case 3:ri(t),sh();break;case 5:gh(t);break;case 1:Ff(t.type)&&Jf(t);break;case 4:eh(t,t.stateNode.containerInfo);break;case 10:o=t.memoizedProps.value;var r=t.type._context;I(mg,r._currentValue),r._currentValue=o;break;case 13:if(null!==t.memoizedState)return 0==(i&t.child.childLanes)?(I(P,1&P.current),t=hi(n,t,i),null===t?null:t.sibling):ti(n,t,i);I(P,1&P.current);break;case 19:if(o=0!=(i&t.childLanes),0!=(64&n.flags)){if(o)return Ai(n,t,i);t.flags|=64}if(r=t.memoizedState,null!==r&&(r.rendering=null,r.tail=null,r.lastEffect=null),I(P,P.current),o)break;else return null;case 23:case 24:return t.lanes=0,mi(n,t,i);}return hi(n,t,i)}switch(t.lanes=0,t.tag){case 2:if(o=t.type,null!==n&&(n.alternate=null,t.alternate=null,t.flags|=2),n=t.pendingProps,r=Ef(t,M.current),tg(t,i),r=Ch(null,t,o,n,r,i),t.flags|=1,"object"==typeof r&&null!==r&&"function"==typeof r.render&&void 0===r.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ff(o)){var s=!0;Jf(t)}else s=!1;t.memoizedState=null!==r.state&&void 0!==r.state?r.state:null,xg(t);var u=o.getDerivedStateFromProps;"function"==typeof u&&Gg(t,o,u,n),r.updater=Kg,t.stateNode=r,r._reactInternals=t,Og(t,o,n,i),t=qi(null,t,o,!0,s,i)}else t.tag=0,fi(null,t,r,i),t=t.child;return t;case 16:r=t.elementType;a:throw null!==n&&(n.alternate=null,t.alternate=null,t.flags|=2),n=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=hk(r),n=lg(r,n),(0===s?t=li(null,t,r,n,i):1===s?t=pi(null,t,r,n,i):11===s?t=gi(null,t,r,n,i):14===s?t=ii(null,t,r,lg(r.type,n),o,i):void 0,Error(y(306,r,"")));return t;case 0:return o=t.type,r=t.pendingProps,r=t.elementType===o?r:lg(o,r),li(n,t,o,r,i);case 1:return o=t.type,r=t.pendingProps,r=t.elementType===o?r:lg(o,r),pi(n,t,o,r,i);case 3:if(ri(t),o=t.updateQueue,null===n||null===o)throw Error(y(282));if(o=t.pendingProps,r=t.memoizedState,r=null===r?null:r.element,yg(n,t),Cg(t,o,null,i),o=t.memoizedState.element,o===r)sh(),t=hi(n,t,i);else{if(r=t.stateNode,(s=r.hydrate)&&(kh=rf(t.stateNode.containerInfo.firstChild),jh=t,s=lh=!0),s){if(n=r.mutableSourceEagerHydrationData,null!=n)for(r=0;r<n.length;r+=2)s=n[r],s._workInProgressVersionPrimary=n[r+1],th.push(s);for(i=Zg(t,null,o,i),t.child=i;i;)i.flags=1024|-3&i.flags,i=i.sibling}else fi(n,t,o,i),sh();t=t.child}return t;case 5:return gh(t),null===n&&ph(t),o=t.type,r=t.pendingProps,s=null===n?null:n.memoizedProps,u=r.children,nf(o,r)?u=null:null!==s&&nf(o,s)&&(t.flags|=16),oi(n,t),fi(n,t,u,i),t.child;case 6:return null===n&&ph(t),null;case 13:return ti(n,t,i);case 4:return eh(t,t.stateNode.containerInfo),o=t.pendingProps,null===n?t.child=Yg(t,null,o,i):fi(n,t,o,i),t.child;case 11:return o=t.type,r=t.pendingProps,r=t.elementType===o?r:lg(o,r),gi(n,t,o,r,i);case 7:return fi(n,t,t.pendingProps,i),t.child;case 8:return fi(n,t,t.pendingProps.children,i),t.child;case 12:return fi(n,t,t.pendingProps.children,i),t.child;case 10:a:{o=t.type._context,r=t.pendingProps,u=t.memoizedProps,s=r.value;var p=t.type._context;if(I(mg,p._currentValue),p._currentValue=s,null!==u)if(p=u.value,s=He(p,s)?0:0|("function"==typeof o._calculateChangedBits?o._calculateChangedBits(p,s):1073741823),0!==s)for(p=t.child,null!==p&&(p.return=t);null!==p;){var m=p.dependencies;if(null!==m){u=p.child;for(var x=m.firstContext;null!==x;){if(x.context===o&&0!=(x.observedBits&s)){1===p.tag&&(x=zg(-1,i&-i),x.tag=2,Ag(p,x)),p.lanes|=i,x=p.alternate,null!==x&&(x.lanes|=i),sg(p.return,i),m.lanes|=i;break}x=x.next}}else u=10===p.tag?p.type===t.type?null:p.child:p.child;if(null!==u)u.return=p;else for(u=p;null!==u;){if(u===t){u=null;break}if(p=u.sibling,null!==p){p.return=u.return,u=p;break}u=u.return}p=u}else if(u.children===r.children&&!N.current){t=hi(n,t,i);break a}fi(n,t,r.children,i),t=t.child}return t;case 9:return r=t.type,s=t.pendingProps,o=s.children,tg(t,i),r=vg(r,s.unstable_observedBits),o=o(r),t.flags|=1,fi(n,t,o,i),t.child;case 14:return r=t.type,s=lg(r,t.pendingProps),s=lg(r.type,s),ii(n,t,r,s,o,i);case 15:return ki(n,t,t.type,t.pendingProps,o,i);case 17:return o=t.type,r=t.pendingProps,r=t.elementType===o?r:lg(o,r),null!==n&&(n.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,Ff(o)?(n=!0,Jf(t)):n=!1,tg(t,i),Mg(t,o,r),Og(t,o,r,i),qi(null,t,o,!0,n,i);case 19:return Ai(n,t,i);case 23:return mi(n,t,i);case 24:return mi(n,t,i);}throw Error(y(156,t.tag))};function ik(e,n,t,a){this.tag=e,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function nh(e,n,t,a){return new ik(e,n,t,a)}function ji(e){return e=e.prototype,e&&e.isReactComponent}function hk(e){if("function"==typeof e)return ji(e)?1:0;if(void 0!==e&&null!==e){if(e=e.$$typeof,e===Aa)return 11;if(e===Da)return 14}return 2}function Tg(e,n){var t=e.alternate;return null===t?(t=nh(e.tag,n,e.key,e.mode),t.elementType=e.elementType,t.type=e.type,t.stateNode=e.stateNode,t.alternate=e,e.alternate=t):(t.pendingProps=n,t.type=e.type,t.flags=0,t.nextEffect=null,t.firstEffect=null,t.lastEffect=null),t.childLanes=e.childLanes,t.lanes=e.lanes,t.child=e.child,t.memoizedProps=e.memoizedProps,t.memoizedState=e.memoizedState,t.updateQueue=e.updateQueue,n=e.dependencies,t.dependencies=null===n?null:{lanes:n.lanes,firstContext:n.firstContext},t.sibling=e.sibling,t.index=e.index,t.ref=e.ref,t}function Vg(n,t,i,o,r,s){var l=2;if(o=n,"function"==typeof n)ji(n)&&(l=1);else if("string"==typeof n)l=5;else a:switch(n){case ua:return Xg(i.children,r,s,t);case Ha:l=8,r|=16;break;case wa:l=8,r|=1;break;case xa:return n=nh(12,i,t,8|r),n.elementType=xa,n.type=xa,n.lanes=s,n;case Ba:return n=nh(13,i,t,r),n.type=Ba,n.elementType=Ba,n.lanes=s,n;case Ca:return n=nh(19,i,t,r),n.elementType=Ca,n.lanes=s,n;case Ia:return vi(i,r,s,t);case Ja:return n=nh(24,i,t,r),n.elementType=Ja,n.lanes=s,n;default:if("object"==typeof n&&null!==n)switch(n.$$typeof){case ya:l=10;break a;case za:l=9;break a;case Aa:l=11;break a;case Da:l=14;break a;case Ea:l=16,o=null;break a;case Fa:l=22;break a;}throw Error(y(130,null==n?n:typeof n,""));}return t=nh(l,i,t,r),t.elementType=n,t.type=o,t.lanes=s,t}function Xg(e,n,t,i){return e=nh(7,e,i,n),e.lanes=t,e}function vi(e,n,t,i){return e=nh(23,e,i,n),e.elementType=Ia,e.lanes=t,e}function Ug(e,n,t){return e=nh(6,e,null,n),e.lanes=t,e}function Wg(e,n,t){return n=nh(4,null===e.children?[]:e.children,e.key,n),n.lanes=t,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function jk(e,n,t){this.tag=n,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=t,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Zc(0),this.expirationTimes=Zc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zc(0),this.mutableSourceEagerHydrationData=null}function kk(e,n,t){var a=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:ta,key:null==a?null:""+a,children:e,containerInfo:n,implementation:t}}function lk(n,t,a,i){var o=t.current,e=Hg(),r=Ig(o);a:if(a){a=a._reactInternals;b:{if(Zb(a)!==a||1!==a.tag)throw Error(y(170));var s=a;do{switch(s.tag){case 3:s=s.stateNode.context;break b;case 1:if(Ff(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break b}}s=s.return}while(null!==s);throw Error(y(171))}if(1===a.tag){var l=a.type;if(Ff(l)){a=If(a,l,s);break a}}a=s}else a=Cf;return null===t.context?t.context=a:t.pendingContext=a,t=zg(e,r),t.payload={element:n},i=void 0===i?null:i,null!==i&&(t.callback=i),Ag(o,t),Jg(o,r,e),r}function mk(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode;}}function nk(e,n){if(e=e.memoizedState,null!==e&&null!==e.dehydrated){var t=e.retryLane;e.retryLane=0!==t&&t<n?t:n}}function ok(e,n){nk(e,n),(e=e.alternate)&&nk(e,n)}function pk(){return null}function qk(n,t,i){var o=null!=i&&null!=i.hydrationOptions&&i.hydrationOptions.mutableSources||null;if(i=new jk(n,t,null!=i&&!0===i.hydrate),t=nh(3,null,null,2===t?7:1===t?3:0),i.current=t,t.stateNode=i,xg(t),n[ff]=i.current,cf(8===n.nodeType?n.parentNode:n),o)for(n=0;n<o.length;n++){t=o[n];var d=t._getVersion;d=d(t._source),null==i.mutableSourceEagerHydrationData?i.mutableSourceEagerHydrationData=[t,d]:i.mutableSourceEagerHydrationData.push(t,d)}this._internalRoot=i}qk.prototype.render=function(e){lk(e,this._internalRoot,null,null)},qk.prototype.unmount=function(){var e=this._internalRoot,n=e.containerInfo;lk(null,e,null,function(){n[ff]=null})};function rk(e){return e&&(1===e.nodeType||9===e.nodeType||11===e.nodeType||8===e.nodeType&&" react-mount-point-unstable "===e.nodeValue)}function sk(e,n){if(n||(n=e?9===e.nodeType?e.documentElement:e.firstChild:null,n=n&&1===n.nodeType&&n.hasAttribute("data-reactroot")),!n)for(var t;t=e.lastChild;)e.removeChild(t);return new qk(e,0,n?{hydrate:!0}:void 0)}function tk(n,t,a,i,o){var d=a._reactRootContainer;if(d){var r=d._internalRoot;if("function"==typeof o){var s=o;o=function(){var e=mk(r);s.call(e)}}lk(t,r,n,o)}else{if(d=a._reactRootContainer=sk(a,i),r=d._internalRoot,"function"==typeof o){var l=o;o=function(){var e=mk(r);l.call(e)}}Xj(function(){lk(t,r,n,o)})}return mk(r)}ec=function(e){if(13===e.tag){var n=Hg();Jg(e,4,n),ok(e,4)}},fc=function(e){if(13===e.tag){var n=Hg();Jg(e,67108864,n),ok(e,67108864)}},gc=function(e){if(13===e.tag){var n=Hg(),t=Ig(e);Jg(e,t,n),ok(e,t)}},hc=function(e,n){return n()},yb=function(n,t,a){switch(t){case"input":if(ab(n,a),t=a.name,"radio"===a.type&&null!=t){for(a=n;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll("input[name="+JSON.stringify(""+t)+"][type=\"radio\"]"),t=0;t<a.length;t++){var i=a[t];if(i!==n&&i.form===n.form){var o=Db(i);if(!o)throw Error(y(90));Wa(i),ab(i,o)}}}break;case"textarea":ib(n,a);break;case"select":t=a.value,null!=t&&fb(n,!!a.multiple,t,!1);}},Gb=Wj,Hb=function(n,t,a,i,o){var e=X;X|=4;try{return gg(98,n.bind(null,t,a,i,o))}finally{X=e,0===X&&(wj(),ig())}},Ib=function(){0==(49&X)&&(Vj(),Oj())},Jb=function(e,n){var t=X;X|=2;try{return e(n)}finally{X=t,0===X&&(wj(),ig())}};function uk(e,n){var t=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!rk(n))throw Error(y(200));return kk(e,n,null,t)}var vk={Events:[Cb,ue,Db,Eb,Fb,Oj,{current:!1}]},wk={findFiberByHostInstance:wc,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},xk={bundleType:wk.bundleType,version:wk.version,rendererPackageName:wk.rendererPackageName,rendererConfig:wk.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ra.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=cc(e),null===e?null:e.stateNode},findFiberByHostInstance:wk.findFiberByHostInstance||pk,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var yk=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yk.isDisabled&&yk.supportsFiber)try{Lf=yk.inject(xk),Mf=yk}catch(e){}}var __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=vk,createPortal=uk,findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var n=e._reactInternals;if(void 0===n){if("function"==typeof e.render)throw Error(y(188));throw Error(y(268,Object.keys(e)))}return e=cc(n),e=null===e?null:e.stateNode,e},flushSync=function(e,n){var t=X;if(0!=(48&t))return e(n);X|=1;try{if(e)return gg(99,e.bind(null,n))}finally{X=t,ig()}},hydrate=function(e,n,t){if(!rk(n))throw Error(y(200));return tk(null,e,n,!0,t)},render=function(e,n,t){if(!rk(n))throw Error(y(200));return tk(null,e,n,!1,t)},unmountComponentAtNode=function(e){if(!rk(e))throw Error(y(40));return!!e._reactRootContainer&&(Xj(function(){tk(null,null,e,!1,function(){e._reactRootContainer=null,e[ff]=null})}),!0)},unstable_batchedUpdates=Wj,unstable_createPortal=function(e,n){return uk(e,n,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},unstable_renderSubtreeIntoContainer=function(e,n,t,a){if(!rk(t))throw Error(y(200));if(null==e||void 0===e._reactInternals)throw Error(y(38));return tk(e,n,t,!1,a)},version="17.0.2",reactDom_production_min={__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,createPortal:createPortal,findDOMNode:findDOMNode,flushSync:flushSync,hydrate:hydrate,render:render,unmountComponentAtNode:unmountComponentAtNode,unstable_batchedUpdates:unstable_batchedUpdates,unstable_createPortal:unstable_createPortal,unstable_renderSubtreeIntoContainer:unstable_renderSubtreeIntoContainer,version:version},b=0,__interactionsRef=null,__subscriberRef=null,unstable_clear=function(e){return e()},unstable_getCurrent=function(){return null},unstable_getThreadID=function(){return++b},unstable_subscribe=function(){},unstable_trace=function(e,n,t){return t()},unstable_unsubscribe=function(){},unstable_wrap=function(e){return e},schedulerTracing_production_min={__interactionsRef:__interactionsRef,__subscriberRef:__subscriberRef,unstable_clear:unstable_clear,unstable_getCurrent:unstable_getCurrent,unstable_getThreadID:unstable_getThreadID,unstable_subscribe:unstable_subscribe,unstable_trace:unstable_trace,unstable_unsubscribe:unstable_unsubscribe,unstable_wrap:unstable_wrap},schedulerTracing_development=createCommonjsModule(function(e,n){"production"!==process.env.NODE_ENV&&function(){function e(e){var t=n.__interactionsRef.current;n.__interactionsRef.current=new Set;try{return e()}finally{n.__interactionsRef.current=t}}function t(){return n.__interactionsRef.current}function a(){return++h}function i(e,t,a){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:0,o={__count:1,id:g++,name:e,timestamp:t},d=n.__interactionsRef.current,r=new Set(d);r.add(o),n.__interactionsRef.current=r;var s=n.__subscriberRef.current,l;try{null!==s&&s.onInteractionTraced(o)}finally{try{null!==s&&s.onWorkStarted(r,i)}finally{try{l=a()}finally{n.__interactionsRef.current=d;try{null!==s&&s.onWorkStopped(r,i)}finally{o.__count--,null!==s&&0===o.__count&&s.onInteractionScheduledWorkCompleted(o)}}}}return l}function o(e){function t(){var t=n.__interactionsRef.current;n.__interactionsRef.current=i,o=n.__subscriberRef.current;try{var r;try{null!==o&&o.onWorkStarted(i,a)}finally{try{r=e.apply(void 0,arguments)}finally{n.__interactionsRef.current=t,null!==o&&o.onWorkStopped(i,a)}}return r}finally{d||(d=!0,i.forEach(function(e){e.__count--,null!==o&&0===e.__count&&o.onInteractionScheduledWorkCompleted(e)}))}}var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,i=n.__interactionsRef.current,o=n.__subscriberRef.current;null!==o&&o.onWorkScheduled(i,a),i.forEach(function(e){e.__count++});var d=!1;return t.cancel=function e(){o=n.__subscriberRef.current;try{null!==o&&o.onWorkCanceled(i,a)}finally{i.forEach(function(e){e.__count--,o&&0===e.__count&&o.onInteractionScheduledWorkCompleted(e)})}},t}function d(e){b.add(e),1===b.size&&(n.__subscriberRef.current={onInteractionScheduledWorkCompleted:l,onInteractionTraced:s,onWorkCanceled:p,onWorkScheduled:u,onWorkStarted:c,onWorkStopped:f})}function r(e){b.delete(e),0===b.size&&(n.__subscriberRef.current=null)}function s(e){var n=!1,t=null;if(b.forEach(function(a){try{a.onInteractionTraced(e)}catch(e){n||(n=!0,t=e)}}),n)throw t}function l(e){var n=!1,t=null;if(b.forEach(function(a){try{a.onInteractionScheduledWorkCompleted(e)}catch(e){n||(n=!0,t=e)}}),n)throw t}function u(e,n){var t=!1,a=null;if(b.forEach(function(i){try{i.onWorkScheduled(e,n)}catch(e){t||(t=!0,a=e)}}),t)throw a}function c(e,n){var t=!1,a=null;if(b.forEach(function(i){try{i.onWorkStarted(e,n)}catch(e){t||(t=!0,a=e)}}),t)throw a}function f(e,n){var t=!1,a=null;if(b.forEach(function(i){try{i.onWorkStopped(e,n)}catch(e){t||(t=!0,a=e)}}),t)throw a}function p(e,n){var t=!1,a=null;if(b.forEach(function(i){try{i.onWorkCanceled(e,n)}catch(e){t||(t=!0,a=e)}}),t)throw a}var m=0,g=0,h=0;// Counters used to generate unique IDs.
|
|
184
|
+
n.__interactionsRef=null,n.__subscriberRef=null,n.__interactionsRef={current:new Set},n.__subscriberRef={current:null};var b=null;b=new Set,n.unstable_clear=e,n.unstable_getCurrent=t,n.unstable_getThreadID=a,n.unstable_subscribe=d,n.unstable_trace=i,n.unstable_unsubscribe=r,n.unstable_wrap=o}()});schedulerTracing_development.__interactionsRef,schedulerTracing_development.__subscriberRef,schedulerTracing_development.unstable_clear,schedulerTracing_development.unstable_getCurrent,schedulerTracing_development.unstable_getThreadID,schedulerTracing_development.unstable_subscribe,schedulerTracing_development.unstable_trace,schedulerTracing_development.unstable_unsubscribe,schedulerTracing_development.unstable_wrap;var tracing=createCommonjsModule(function(e){e.exports="production"===process.env.NODE_ENV?schedulerTracing_production_min:schedulerTracing_development}),reactDom_development=createCommonjsModule(function(e,n){var t=String.fromCharCode,a=Math.min;"production"!==process.env.NODE_ENV&&function(){var e=Math.clz32;// by calls to these methods by a Babel plugin.
|
|
185
|
+
//
|
|
186
|
+
// In PROD (or in packages without access to React internals),
|
|
187
|
+
// they are left as they are instead.
|
|
188
|
+
function o(e){{for(var n=arguments.length,t=Array(1<n?n-1:0),a=1;a<n;a++)t[a-1]=arguments[a];r("warn",e,t)}}function d(e){{for(var n=arguments.length,t=Array(1<n?n-1:0),a=1;a<n;a++)t[a-1]=arguments[a];r("error",e,t)}}function r(e,n,t){// When changing this logic, you might want to also
|
|
189
|
+
// update consoleWithStackDev.www.js as well.
|
|
190
|
+
{var a=fp.ReactDebugCurrentFrame,i=a.getStackAddendum();""!==i&&(n+="%s",t=t.concat([i]));var o=t.map(function(e){return""+e});// Careful: RN currently depends on this prefix
|
|
191
|
+
// We intentionally don't use spread (or .apply) directly because it
|
|
192
|
+
// breaks IE9: https://github.com/facebook/react/issues/13610
|
|
193
|
+
// eslint-disable-next-line react-internal/no-production-logging
|
|
194
|
+
o.unshift("Warning: "+n),Function.prototype.apply.call(console[e],console,o)}}// Trust the developer to only use possibleRegistrationNames in true
|
|
195
|
+
function s(e,n){l(e,n),l(e+"Capture",n)}function l(e,n){jp[e]&&d("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",e),jp[e]=n;{var t=e.toLowerCase();Hp[t]=e,"onDoubleClick"===e&&(Hp.ondblclick=e)}for(var a=0;a<n.length;a++)Vp.add(n[a])}function u(e){return!!am.call(om,e)||!am.call(im,e)&&(tm.test(e)?(om[e]=!0,!0):(im[e]=!0,d("Invalid attribute name: `%s`",e),!1))}function c(e,n,t){return null===n?!t&&!!(2<e.length&&("o"===e[0]||"O"===e[0])&&("n"===e[1]||"N"===e[1])):0===n.type}function f(e,n,t,a){if(null!==t&&t.type===0)return!1;switch(typeof n){case"function":// $FlowIssue symbol is perfectly valid here
|
|
196
|
+
case"symbol":// eslint-disable-line
|
|
197
|
+
return!0;case"boolean":{if(a)return!1;if(null!==t)return!t.acceptsBooleans;var i=e.toLowerCase().slice(0,5);return"data-"!==i&&"aria-"!==i}default:return!1;}}function p(e,n,t,a){if(null===n||"undefined"==typeof n)return!0;if(f(e,n,t,a))return!0;if(a)return!1;if(null!==t)switch(t.type){case 3:return!n;case 4:return!1===n;case 5:return isNaN(n);case 6:return isNaN(n)||1>n;}return!1}function m(e){return dm.hasOwnProperty(e)?dm[e]:null}function g(e,n,t,a,i,o,d){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=a,this.attributeNamespace=i,this.mustUseProperty=t,this.propertyName=e,this.type=n,this.sanitizeURL=o,this.removeEmptyString=d}// When adding attributes to this list, be sure to also add them to
|
|
198
|
+
// the `possibleStandardNames` module to ensure casing and incorrect
|
|
199
|
+
// name warnings.
|
|
200
|
+
function h(e){!fm&&cm.test(e)&&(fm=!0,d("A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.",JSON.stringify(e)))}/**
|
|
201
|
+
* Get the value for a property on a node. Only used in DEV for SSR validation.
|
|
202
|
+
* The "expected" argument is used as a hint of what the expected value is.
|
|
203
|
+
* Some properties have multiple equivalent values.
|
|
204
|
+
*/function b(e,n,t,a){{if(a.mustUseProperty){var i=a.propertyName;return e[i]}a.sanitizeURL&&h(""+t);var o=a.attributeName,d=null;if(4===a.type){if(e.hasAttribute(o)){var r=e.getAttribute(o);return""===r||(p(n,t,a,!1)?r:r===""+t?t:r)}}else if(e.hasAttribute(o)){if(p(n,t,a,!1))// We had an attribute but shouldn't have had one, so read it
|
|
205
|
+
// for the error message.
|
|
206
|
+
return e.getAttribute(o);if(3===a.type)// If this was a boolean, it doesn't matter what the value is
|
|
207
|
+
// the fact that we have it is the same as the expected.
|
|
208
|
+
return t;// Even if this property uses a namespace we use getAttribute
|
|
209
|
+
// because we assume its namespaced name is the same as our config.
|
|
210
|
+
// To use getAttributeNS we need the local name which we don't have
|
|
211
|
+
// in our config atm.
|
|
212
|
+
d=e.getAttribute(o)}return p(n,t,a,!1)?null===d?t:d:d===""+t?t:d}}/**
|
|
213
|
+
* Get the value for a attribute on a node. Only used in DEV for SSR validation.
|
|
214
|
+
* The third argument is used as a hint of what the expected value is. Some
|
|
215
|
+
* attributes have multiple equivalent values.
|
|
216
|
+
*/function y(e,n,t){{if(!u(n))return;// If the object is an opaque reference ID, it's expected that
|
|
217
|
+
// the next prop is different than the server value, so just return
|
|
218
|
+
// expected
|
|
219
|
+
if(Ao(t))return t;if(!e.hasAttribute(n))return void 0===t?void 0:null;var a=e.getAttribute(n);return a===""+t?t:a}}/**
|
|
220
|
+
* Sets the value for a property on a node.
|
|
221
|
+
*
|
|
222
|
+
* @param {DOMElement} node
|
|
223
|
+
* @param {string} name
|
|
224
|
+
* @param {*} value
|
|
225
|
+
*/function x(e,n,t,a){var i=m(n);if(!c(n,i,a)){// If the prop isn't in the special list, treat it as a simple attribute.
|
|
226
|
+
if(p(n,t,i,a)&&(t=null),a||null===i){if(u(n)){var o=n;null===t?e.removeAttribute(o):e.setAttribute(o,""+t)}return}var d=i.mustUseProperty;if(d){var r=i.propertyName;if(null===t){var s=i.type;e[r]=3!==s&&""}else// Contrary to `setAttribute`, object properties are properly
|
|
227
|
+
// `toString`ed by IE8/9.
|
|
228
|
+
e[r]=t;return}// The rest are treated as attributes with special cases.
|
|
229
|
+
var l=i.attributeName,f=i.attributeNamespace;if(null===t)e.removeAttribute(l);else{var g=i.type,b;3===g||4===g&&!0===t?b="":(b=""+t,i.sanitizeURL&&h(b.toString())),f?e.setAttributeNS(f,l,b):e.setAttribute(l,b)}}}// ATTENTION
|
|
230
|
+
// When adding new symbols to this file,
|
|
231
|
+
// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
|
|
232
|
+
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
233
|
+
// nor polyfill, then a plain number is used for performance.
|
|
234
|
+
function v(e){if(null===e||"object"!=typeof e)return null;var n=Lm&&e[Lm]||e["@@iterator"];return"function"==typeof n?n:null}// Helpers to patch console.logs to avoid logging during side-effect free
|
|
235
|
+
// replaying on render function. This currently only patches the object
|
|
236
|
+
// lazily which won't cover if the log function was extracted eagerly.
|
|
237
|
+
// We could also eagerly patch the method.
|
|
238
|
+
function w(){}function k(){{if(0===zm){Am=console.log,Om=console.info,Mm=console.warn,Um=console.error,Fm=console.group,Bm=console.groupCollapsed,Wm=console.groupEnd;// https://github.com/facebook/react/issues/19099
|
|
239
|
+
var e={configurable:!0,enumerable:!0,value:w,writable:!0};// $FlowFixMe Flow thinks console is immutable.
|
|
240
|
+
Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}zm++}}function E(){{if(zm--,0===zm){/* eslint-disable react-internal/no-production-logging */var e={configurable:!0,enumerable:!0,writable:!0};// $FlowFixMe Flow thinks console is immutable.
|
|
241
|
+
Object.defineProperties(console,{log:lp({},e,{value:Am}),info:lp({},e,{value:Om}),warn:lp({},e,{value:Mm}),error:lp({},e,{value:Um}),group:lp({},e,{value:Fm}),groupCollapsed:lp({},e,{value:Bm}),groupEnd:lp({},e,{value:Wm})})}0>zm&&d("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}function S(e,n,t){{if(Hm===void 0)// Extract the VM specific prefix used by each line.
|
|
242
|
+
try{throw Error()}catch(e){var a=e.stack.trim().match(/\n( *(at )?)/);Hm=a&&a[1]||""}// We use the prefix to ensure our stacks line up with native stack frames.
|
|
243
|
+
return"\n"+Hm+e}}function C(e,n){// If something asked for a stack inside a fake render, it should get ignored.
|
|
244
|
+
if(!e||jm)return"";{var t=qm.get(e);if(void 0!==t)return t}var a;jm=!0;var i=Error.prepareStackTrace;// $FlowFixMe It does accept undefined.
|
|
245
|
+
Error.prepareStackTrace=void 0;var o;// Set the dispatcher in DEV because this might be call in the render function
|
|
246
|
+
// for warnings.
|
|
247
|
+
o=Vm.current,Vm.current=null,k();try{// This should throw.
|
|
248
|
+
if(n){// Something should be setting the props in the constructor.
|
|
249
|
+
var d=function(){throw Error()};// $FlowFixMe
|
|
250
|
+
if(Object.defineProperty(d.prototype,"props",{set:function(){// We use a throwing setter instead of frozen or non-writable props
|
|
251
|
+
// because that won't throw in a non-strict mode function.
|
|
252
|
+
throw Error()}}),"object"==typeof Reflect&&Reflect.construct){// We construct a different control for this case to include any extra
|
|
253
|
+
// frames added by the construct call.
|
|
254
|
+
try{Reflect.construct(d,[])}catch(e){a=e}Reflect.construct(e,[],d)}else{try{d.call()}catch(e){a=e}e.call(d.prototype)}}else{try{throw Error()}catch(e){a=e}e()}}catch(n){// This is inlined manually because closure doesn't do it for us.
|
|
255
|
+
if(n&&a&&"string"==typeof n.stack){// This extracts the first frame from the sample that isn't also in the control.
|
|
256
|
+
// Skipping one frame that we assume is the frame that calls the two.
|
|
257
|
+
for(var r=n.stack.split("\n"),l=a.stack.split("\n"),u=r.length-1,f=l.length-1;1<=u&&0<=f&&r[u]!==l[f];)// We expect at least one stack frame to be shared.
|
|
258
|
+
// Typically this will be the root most one. However, stack frames may be
|
|
259
|
+
// cut off due to maximum stack limits. In this case, one maybe cut off
|
|
260
|
+
// earlier than the other. We assume that the sample is longer or the same
|
|
261
|
+
// and there for cut off earlier. So we should find the root most frame in
|
|
262
|
+
// the sample somewhere in the control.
|
|
263
|
+
f--;for(;1<=u&&0<=f;u--,f--)// Next we find the first one that isn't the same which should be the
|
|
264
|
+
// frame that called our sample function and the control.
|
|
265
|
+
if(r[u]!==l[f]){// In V8, the first line is describing the message but other VMs don't.
|
|
266
|
+
// If we're about to return the first line, and the control is also on the same
|
|
267
|
+
// line, that's a pretty good indicator that our sample threw at same line as
|
|
268
|
+
// the control. I.e. before we entered the sample frame. So we ignore this result.
|
|
269
|
+
// This can happen if you passed a class to function component, or non-function.
|
|
270
|
+
if(1!==u||1!==f)do// We may still have similar intermediate frames from the construct call.
|
|
271
|
+
// The next one that isn't the same should be our match though.
|
|
272
|
+
if(u--,f--,0>f||r[u]!==l[f]){// V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
|
|
273
|
+
var p="\n"+r[u].replace(" at new "," at ");// Return the line we found.
|
|
274
|
+
return"function"==typeof e&&qm.set(e,p),p}while(1<=u&&0<=f);break}}}finally{jm=!1,Vm.current=o,E(),Error.prepareStackTrace=i}// Fallback to just using the name if we couldn't make it throw.
|
|
275
|
+
var m=e?e.displayName||e.name:"",g=m?S(m):"";return"function"==typeof e&&qm.set(e,g),g}function _(e,n,t){return C(e,!0)}function N(e,n,t){return C(e,!1)}function T(e){var n=e.prototype;return!!(n&&n.isReactComponent)}function R(e,n,t){if(null==e)return"";if("function"==typeof e)return C(e,T(e));if("string"==typeof e)return S(e);switch(e){case wm:return S("Suspense");case km:return S("SuspenseList");}if("object"==typeof e)switch(e.$$typeof){case vm:return N(e.render);case Em:// Memo may contain any component type so we recursively resolve it.
|
|
276
|
+
return R(e.type,n,t);case Cm:return N(e._render);case Sm:{var a=e,i=a._payload,o=a._init;try{// Lazy may contain any component type so we recursively resolve it.
|
|
277
|
+
return R(o(i),n,t)}catch(e){}}}return""}function P(e){switch(e._debugOwner?e._debugOwner.type:null,e._debugSource,e.tag){case 5:return S(e.type);case 16:return S("Lazy");case 13:return S("Suspense");case 19:return S("SuspenseList");case 0:case 2:case 15:return N(e.type);case 11:return N(e.type.render);case 22:return N(e.type._render);case 1:return _(e.type);default:return"";}}function I(e){try{var n="",t=e;do n+=P(t),t=t.return;while(t);return n}catch(e){return"\nError generating stack: "+e.message+"\n"+e.stack}}function L(e,n,t){var a=n.displayName||n.name||"";return e.displayName||(""===a?t:t+"("+a+")")}function D(e){return e.displayName||"Context"}function z(e){if(null==e)// Host root, text node or just invalid type.
|
|
278
|
+
return null;if("number"==typeof e.tag&&d("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case gm:return"Fragment";case mm:return"Portal";case bm:return"Profiler";case hm:return"StrictMode";case wm:return"Suspense";case km:return"SuspenseList";}if("object"==typeof e)switch(e.$$typeof){case xm:var n=e;return D(n)+".Consumer";case ym:var t=e;return D(t._context)+".Provider";case vm:return L(e,e.render,"ForwardRef");case Em:return z(e.type);case Cm:return z(e._render);case Sm:{var a=e,i=a._payload,o=a._init;try{return z(o(i))}catch(e){return null}}}return null}function A(){{if(null===Ym)return null;var e=Ym._debugOwner;if(null!==e&&"undefined"!=typeof e)return z(e.type)}return null}function O(){return null===Ym?"":I(Ym);// Safe because if current fiber exists, we are reconciling,
|
|
279
|
+
// and it is guaranteed to be the work-in-progress version.
|
|
280
|
+
}function M(){Km.getCurrentStack=null,Ym=null,$m=!1}function U(e){Km.getCurrentStack=O,Ym=e,$m=!1}function F(e){$m=e}function B(){return $m}// Flow does not allow string concatenation of most non-string types. To work
|
|
281
|
+
// around this limitation, we use an opaque type that can only be obtained by
|
|
282
|
+
// passing the value through getToStringValue first.
|
|
283
|
+
function W(e){return""+e}function V(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:// function, symbol are assigned as empty strings
|
|
284
|
+
return"";}}function j(e,n){Xm[n.type]||n.onChange||n.onInput||n.readOnly||n.disabled||null==n.value||d("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."),n.onChange||n.readOnly||n.disabled||null==n.checked||d("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}function H(e){var n=e.type,t=e.nodeName;return t&&"input"===t.toLowerCase()&&("checkbox"===n||"radio"===n)}function q(e){return e._valueTracker}function Q(e){e._valueTracker=null}function K(e){var n="";return e?(n=H(e)?e.checked?"true":"false":e.value,n):n}function Y(e){var n=H(e)?"checked":"value",t=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),a=""+e[n];// if someone has already defined a value or Safari, then bail
|
|
285
|
+
// and don't track value will cause over reporting of changes,
|
|
286
|
+
// but it's better then a hard failure
|
|
287
|
+
// (needed for certain tests that spyOn input values and Safari)
|
|
288
|
+
if(!(e.hasOwnProperty(n)||"undefined"==typeof t||"function"!=typeof t.get||"function"!=typeof t.set)){var i=t.get,o=t.set;Object.defineProperty(e,n,{configurable:!0,get:function(){return i.call(this)},set:function(e){a=""+e,o.call(this,e)}}),Object.defineProperty(e,n,{enumerable:t.enumerable});var d={getValue:function(){return a},setValue:function(e){a=""+e},stopTracking:function(){Q(e),delete e[n]}};return d}}function $(e){q(e)||(// TODO: Once it's just Fiber we can move this to node._wrapperState
|
|
289
|
+
e._valueTracker=Y(e))}function X(e){if(!e)return!1;var n=q(e);// if there is no tracker at this point it's unlikely
|
|
290
|
+
// that trying again will succeed
|
|
291
|
+
if(!n)return!0;var t=n.getValue(),a=K(e);return a!==t&&(n.setValue(a),!0)}function G(n){if(n=n||("undefined"==typeof document?void 0:document),"undefined"==typeof n)return null;try{return n.activeElement||n.body}catch(t){return n.body}}function Z(e){var n="checkbox"===e.type||"radio"===e.type;return n?null!=e.checked:null!=e.value}/**
|
|
292
|
+
* Implements an <input> host component that allows setting these optional
|
|
293
|
+
* props: `checked`, `value`, `defaultChecked`, and `defaultValue`.
|
|
294
|
+
*
|
|
295
|
+
* If `checked` or `value` are not supplied (or null/undefined), user actions
|
|
296
|
+
* that affect the checked state or value will trigger updates to the element.
|
|
297
|
+
*
|
|
298
|
+
* If they are supplied (and not null/undefined), the rendered element will not
|
|
299
|
+
* trigger updates to the element. Instead, the props must change in order for
|
|
300
|
+
* the rendered element to be updated.
|
|
301
|
+
*
|
|
302
|
+
* The rendered element will be initialized as unchecked (or `defaultChecked`)
|
|
303
|
+
* with an empty value (or `defaultValue`).
|
|
304
|
+
*
|
|
305
|
+
* See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html
|
|
306
|
+
*/function J(e,n){var t=e,a=n.checked,i=lp({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null==a?t._wrapperState.initialChecked:a});return i}function ee(e,n){j("input",n),n.checked===void 0||n.defaultChecked===void 0||Zm||(d("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components",A()||"A component",n.type),Zm=!0),n.value===void 0||n.defaultValue===void 0||Gm||(d("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components",A()||"A component",n.type),Gm=!0);var t=e,a=null==n.defaultValue?"":n.defaultValue;t._wrapperState={initialChecked:null==n.checked?n.defaultChecked:n.checked,initialValue:V(null==n.value?a:n.value),controlled:Z(n)}}function ne(e,n){var t=e,a=n.checked;null!=a&&x(t,"checked",a,!1)}function te(e,n){var t=e;{var a=Z(n);t._wrapperState.controlled||!a||eg||(d("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"),eg=!0),!t._wrapperState.controlled||a||Jm||(d("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"),Jm=!0)}ne(e,n);var i=V(n.value),o=n.type;if(null!=i)"number"===o?(0===i&&""===t.value||// We explicitly want to coerce to number here if possible.
|
|
307
|
+
// eslint-disable-next-line
|
|
308
|
+
t.value!=i)&&(t.value=W(i)):t.value!==W(i)&&(t.value=W(i));else if("submit"===o||"reset"===o)return void t.removeAttribute("value");n.hasOwnProperty("value")?de(t,n.type,i):n.hasOwnProperty("defaultValue")&&de(t,n.type,V(n.defaultValue)),null==n.checked&&null!=n.defaultChecked&&(t.defaultChecked=!!n.defaultChecked)}function ae(e,n,t){var a=e;// Do not assign value if it is already set. This prevents user text input
|
|
309
|
+
// from being lost during SSR hydration.
|
|
310
|
+
if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var i=n.type,o="submit"===i||"reset"===i;// Avoid setting value attribute on submit/reset inputs as it overrides the
|
|
311
|
+
// default value provided by the browser. See: #12872
|
|
312
|
+
if(o&&(n.value===void 0||null===n.value))return;var d=W(a._wrapperState.initialValue);// Do not assign value if it is already set. This prevents user text input
|
|
313
|
+
// from being lost during SSR hydration.
|
|
314
|
+
t||d===a.value||(a.value=d),// Otherwise, the value attribute is synchronized to the property,
|
|
315
|
+
// so we assign defaultValue to the same thing as the value property
|
|
316
|
+
// assignment step above.
|
|
317
|
+
a.defaultValue=d}// Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug
|
|
318
|
+
// this is needed to work around a chrome bug where setting defaultChecked
|
|
319
|
+
// will sometimes influence the value of checked (even after detachment).
|
|
320
|
+
// Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416
|
|
321
|
+
// We need to temporarily unset name to avoid disrupting radio button groups.
|
|
322
|
+
var r=a.name;""!==r&&(a.name=""),a.defaultChecked=!a.defaultChecked,a.defaultChecked=!!a._wrapperState.initialChecked,""!==r&&(a.name=r)}function ie(e,n){var t=e;te(t,n),oe(t,n)}function oe(e,n){var t=n.name;if("radio"===n.type&&null!=t){for(var a=e;a.parentNode;)a=a.parentNode;// If `rootNode.form` was non-null, then we could try `form.elements`,
|
|
323
|
+
// but that sometimes behaves strangely in IE8. We could also try using
|
|
324
|
+
// `form.getElementsByName`, but that will only return direct children
|
|
325
|
+
// and won't include inputs that use the HTML5 `form=` attribute. Since
|
|
326
|
+
// the input might not even be in a form. It might not even be in the
|
|
327
|
+
// document. Let's just use the local `querySelectorAll` to ensure we don't
|
|
328
|
+
// miss anything.
|
|
329
|
+
for(var o=a.querySelectorAll("input[name="+JSON.stringify(""+t)+"][type=\"radio\"]"),d=0,r;d<o.length;d++)if(r=o[d],r!==e&&r.form===e.form){// This will throw if radio buttons rendered by different copies of React
|
|
330
|
+
// and the same name are rendered into the same form (same as #1939).
|
|
331
|
+
// That's probably okay; we don't support it just as we don't support
|
|
332
|
+
// mixing React radio buttons with non-React ones.
|
|
333
|
+
var s=qo(r);if(!s)throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");// We need update the tracked value on the named cousin since the value
|
|
334
|
+
// was changed but the input saw no event or value set
|
|
335
|
+
X(r),te(r,s)}}}// In Chrome, assigning defaultValue to certain input types triggers input validation.
|
|
336
|
+
// For number inputs, the display value loses trailing decimal points. For email inputs,
|
|
337
|
+
// Chrome raises "The specified value <x> is not a valid email address".
|
|
338
|
+
//
|
|
339
|
+
// Here we check to see if the defaultValue has actually changed, avoiding these problems
|
|
340
|
+
// when the user is inputting text
|
|
341
|
+
//
|
|
342
|
+
// https://github.com/facebook/react/issues/7253
|
|
343
|
+
function de(e,n,t){(// Focused number inputs synchronize on blur. See ChangeEventPlugin.js
|
|
344
|
+
"number"!==n||G(e.ownerDocument)!==e)&&(null==t?e.defaultValue=W(e._wrapperState.initialValue):e.defaultValue!==W(t)&&(e.defaultValue=W(t)))}function re(e){var n="";// Flatten children. We'll warn if they are invalid
|
|
345
|
+
// during validateProps() which runs for hydration too.
|
|
346
|
+
// Note that this would throw on non-element objects.
|
|
347
|
+
// Elements are stringified (which is normally irrelevant
|
|
348
|
+
// but matters for <fbt>).
|
|
349
|
+
return sp.Children.forEach(e,function(e){null==e||(n+=e)}),n}/**
|
|
350
|
+
* Implements an <option> host component that warns when `selected` is set.
|
|
351
|
+
*/function se(e,n){"object"==typeof n.children&&null!==n.children&&sp.Children.forEach(n.children,function(e){null!=e&&"string"!=typeof e&&"number"!=typeof e&&"string"==typeof e.type&&(tg||(tg=!0,d("Only strings and numbers are supported as <option> children.")))}),null==n.selected||ng||(d("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),ng=!0)}function le(e,n){null!=n.value&&e.setAttribute("value",W(V(n.value)))}function ue(e,n){var t=lp({children:void 0},n),a=re(n.children);return a&&(t.children=a),t}function ce(){var e=A();return e?"\n\nCheck the render method of `"+e+"`.":""}/**
|
|
352
|
+
* Validation function for `value` and `defaultValue`.
|
|
353
|
+
*/function fe(e){{j("select",e);for(var n=0,t;n<ig.length;n++)if(t=ig[n],null!=e[t]){var a=Array.isArray(e[t]);e.multiple&&!a?d("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",t,ce()):!e.multiple&&a&&d("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",t,ce())}}}function pe(e,n,t,a){var o=e.options;if(n){for(var d=t,r={},s=0;s<d.length;s++)// Prefix to avoid chaos with special keys.
|
|
354
|
+
r["$"+d[s]]=!0;for(var l=0,u;l<o.length;l++)u=r.hasOwnProperty("$"+o[l].value),o[l].selected!==u&&(o[l].selected=u),u&&a&&(o[l].defaultSelected=!0)}else{// Do not set `select.value` as exact behavior isn't consistent across all
|
|
355
|
+
// browsers for all cases.
|
|
356
|
+
for(var c=W(V(t)),f=null,p=0;p<o.length;p++){if(o[p].value===c)return o[p].selected=!0,void(a&&(o[p].defaultSelected=!0));null!==f||o[p].disabled||(f=o[p])}null!==f&&(f.selected=!0)}}/**
|
|
357
|
+
* Implements a <select> host component that allows optionally setting the
|
|
358
|
+
* props `value` and `defaultValue`. If `multiple` is false, the prop must be a
|
|
359
|
+
* stringable. If `multiple` is true, the prop must be an array of stringables.
|
|
360
|
+
*
|
|
361
|
+
* If `value` is not supplied (or null/undefined), user actions that change the
|
|
362
|
+
* selected option will trigger updates to the rendered options.
|
|
363
|
+
*
|
|
364
|
+
* If it is supplied (and not null/undefined), the rendered options will not
|
|
365
|
+
* update in response to user actions. Instead, the `value` prop must change in
|
|
366
|
+
* order for the rendered options to update.
|
|
367
|
+
*
|
|
368
|
+
* If `defaultValue` is provided, any options with the supplied values will be
|
|
369
|
+
* selected.
|
|
370
|
+
*/function me(e,n){return lp({},n,{value:void 0})}function ge(e,n){var t=e;fe(n),t._wrapperState={wasMultiple:!!n.multiple},n.value===void 0||n.defaultValue===void 0||ag||(d("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://reactjs.org/link/controlled-components"),ag=!0)}function he(e,n){var t=e;t.multiple=!!n.multiple;var a=n.value;null==a?null!=n.defaultValue&&pe(t,!!n.multiple,n.defaultValue,!0):pe(t,!!n.multiple,a,!1)}function be(e,n){var t=e,a=t._wrapperState.wasMultiple;t._wrapperState.wasMultiple=!!n.multiple;var i=n.value;null==i?a!==!!n.multiple&&(null==n.defaultValue?pe(t,!!n.multiple,n.multiple?[]:"",!1):pe(t,!!n.multiple,n.defaultValue,!0)):pe(t,!!n.multiple,i,!1)}function ye(e,n){var t=e,a=n.value;null!=a&&pe(t,!!n.multiple,a,!1)}/**
|
|
371
|
+
* Implements a <textarea> host component that allows setting `value`, and
|
|
372
|
+
* `defaultValue`. This differs from the traditional DOM API because value is
|
|
373
|
+
* usually set as PCDATA children.
|
|
374
|
+
*
|
|
375
|
+
* If `value` is not supplied (or null/undefined), user actions that affect the
|
|
376
|
+
* value will trigger updates to the element.
|
|
377
|
+
*
|
|
378
|
+
* If `value` is supplied (and not null/undefined), the rendered element will
|
|
379
|
+
* not trigger updates to the element. Instead, the `value` prop must change in
|
|
380
|
+
* order for the rendered element to be updated.
|
|
381
|
+
*
|
|
382
|
+
* The rendered element will be initialized with an empty value, the prop
|
|
383
|
+
* `defaultValue` if specified, or the children content (deprecated).
|
|
384
|
+
*/function xe(e,n){var t=e;if(null!=n.dangerouslySetInnerHTML)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");// Always set children to the same thing. In IE9, the selection range will
|
|
385
|
+
// get reset if `textContent` is mutated. We could add a check in setTextContent
|
|
386
|
+
// to only set the value if/when the value differs from the node value (which would
|
|
387
|
+
// completely solve this IE9 bug), but Sebastian+Sophie seemed to like this
|
|
388
|
+
// solution. The value can be a boolean or object so that's why it's forced
|
|
389
|
+
// to be a string.
|
|
390
|
+
var a=lp({},n,{value:void 0,defaultValue:void 0,children:W(t._wrapperState.initialValue)});return a}function ve(e,n){var t=e;j("textarea",n),n.value===void 0||n.defaultValue===void 0||og||(d("%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://reactjs.org/link/controlled-components",A()||"A component"),og=!0);var a=n.value;// Only bother fetching default value if we're going to use it
|
|
391
|
+
if(null==a){var i=n.children,o=n.defaultValue;if(null!=i){d("Use the `defaultValue` or `value` props instead of setting children on <textarea>.");{if(null!=o)throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(Array.isArray(i)){if(!(1>=i.length))throw Error("<textarea> can only have at most one child.");i=i[0]}o=i}}null==o&&(o=""),a=o}t._wrapperState={initialValue:V(a)}}function we(e,n){var t=e,a=V(n.value),i=V(n.defaultValue);if(null!=a){// Cast `value` to a string to ensure the value is set correctly. While
|
|
392
|
+
// browsers typically do this as necessary, jsdom doesn't.
|
|
393
|
+
var o=W(a);// To avoid side effects (such as losing text selection), only set value if changed
|
|
394
|
+
o!==t.value&&(t.value=o),null==n.defaultValue&&t.defaultValue!==o&&(t.defaultValue=o)}null!=i&&(t.defaultValue=W(i))}function ke(e,n){var t=e,a=t.textContent;// This is in postMount because we need access to the DOM node, which is not
|
|
395
|
+
// available until after the component has mounted.
|
|
396
|
+
a===t._wrapperState.initialValue&&""!==a&&null!==a&&(t.value=a)}function Ee(e,n){// DOM component is still mounted; update
|
|
397
|
+
we(e,n)}// Assumes there is no parent namespace.
|
|
398
|
+
function Se(e){return"svg"===e?"http://www.w3.org/2000/svg":"math"===e?"http://www.w3.org/1998/Math/MathML":"http://www.w3.org/1999/xhtml"}function Ce(e,n){return null==e||"http://www.w3.org/1999/xhtml"===e?Se(n):"http://www.w3.org/2000/svg"===e&&"foreignObject"===n?"http://www.w3.org/1999/xhtml":e;// By default, pass namespace below.
|
|
399
|
+
}/* globals MSApp */ /**
|
|
400
|
+
* Create a function which has 'unsafe' privileges (required by windows8 apps)
|
|
401
|
+
*/ /**
|
|
402
|
+
* @param {string} prefix vendor-specific prefix, eg: Webkit
|
|
403
|
+
* @param {string} key style name, eg: transitionDuration
|
|
404
|
+
* @return {string} style name prefixed with `prefix`, properly camelCased, eg:
|
|
405
|
+
* WebkitTransitionDuration
|
|
406
|
+
*/function _e(e,n){return e+n.charAt(0).toUpperCase()+n.substring(1)}/**
|
|
407
|
+
* Support style names that may come passed in prefixed by adding permutations
|
|
408
|
+
* of vendor prefixes.
|
|
409
|
+
*/ /**
|
|
410
|
+
* Convert a value into the proper css writable value. The style name `name`
|
|
411
|
+
* should be logical (no hyphens), as specified
|
|
412
|
+
* in `CSSProperty.isUnitlessNumber`.
|
|
413
|
+
*
|
|
414
|
+
* @param {string} name CSS property name such as `topMargin`.
|
|
415
|
+
* @param {*} value CSS property value such as `10px`.
|
|
416
|
+
* @return {string} Normalized style value with dimensions applied.
|
|
417
|
+
*/function Ne(e,n,t){// Note that we've removed escapeTextForBrowser() calls here since the
|
|
418
|
+
// whole string will be escaped when the attribute is injected into
|
|
419
|
+
// the markup. If you provide unsafe user data here they can inject
|
|
420
|
+
// arbitrary CSS which may be problematic (I couldn't repro this):
|
|
421
|
+
// https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
|
|
422
|
+
// http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/
|
|
423
|
+
// This is not an XSS hole but instead a potential CSS injection issue
|
|
424
|
+
// which has lead to a greater discussion about how we're going to
|
|
425
|
+
// trust URLs moving forward. See #2115901
|
|
426
|
+
var a=null==n||"boolean"==typeof n||""===n;return a?"":t||"number"!=typeof n||0===n||xg.hasOwnProperty(e)&&xg[e]?(""+n).trim():n+"px"}/**
|
|
427
|
+
* Hyphenates a camelcased CSS property name, for example:
|
|
428
|
+
*
|
|
429
|
+
* > hyphenateStyleName('backgroundColor')
|
|
430
|
+
* < "background-color"
|
|
431
|
+
* > hyphenateStyleName('MozTransition')
|
|
432
|
+
* < "-moz-transition"
|
|
433
|
+
* > hyphenateStyleName('msTransition')
|
|
434
|
+
* < "-ms-transition"
|
|
435
|
+
*
|
|
436
|
+
* As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
|
|
437
|
+
* is converted to `-ms-`.
|
|
438
|
+
*/function Te(e){return e.replace(kg,"-$1").toLowerCase().replace(Eg,"-ms-")}/**
|
|
439
|
+
* Operations for dealing with CSS properties.
|
|
440
|
+
*/ /**
|
|
441
|
+
* This creates a string that is expected to be equivalent to the style
|
|
442
|
+
* attribute generated by server-side rendering. It by-passes warnings and
|
|
443
|
+
* security checks so it's not safe to use this value for anything other than
|
|
444
|
+
* comparison. It is only used in DEV for SSR validation.
|
|
445
|
+
*/function Re(e){{var n="",t="";for(var a in e)if(e.hasOwnProperty(a)){var i=e[a];if(null!=i){var o=0===a.indexOf("--");n+=t+(o?a:Te(a))+":",n+=Ne(a,i,o),t=";"}}return n||null}}/**
|
|
446
|
+
* Sets the value for multiple styles on a node. If a value is specified as
|
|
447
|
+
* '' (empty string), the corresponding style property will be unset.
|
|
448
|
+
*
|
|
449
|
+
* @param {DOMElement} node
|
|
450
|
+
* @param {object} styles
|
|
451
|
+
*/function Pe(e,n){var t=e.style;for(var a in n)if(n.hasOwnProperty(a)){var i=0===a.indexOf("--");i||Fg(a,n[a]);var o=Ne(a,n[a],i);"float"==a&&(a="cssFloat"),i?t.setProperty(a,o):t[a]=o}}function Ie(e){return null==e||"boolean"==typeof e||""===e}/**
|
|
452
|
+
* Given {color: 'red', overflow: 'hidden'} returns {
|
|
453
|
+
* color: 'color',
|
|
454
|
+
* overflowX: 'overflow',
|
|
455
|
+
* overflowY: 'overflow',
|
|
456
|
+
* }. This can be read as "the overflowY property was set by the overflow
|
|
457
|
+
* shorthand". That is, the values are the property that each was derived from.
|
|
458
|
+
*/function Le(e){var n={};for(var t in e)for(var a=yg[t]||[t],o=0;o<a.length;o++)n[a[o]]=t;return n}/**
|
|
459
|
+
* When mixing shorthand and longhand property names, we warn during updates if
|
|
460
|
+
* we expect an incorrect result to occur. In particular, we warn for:
|
|
461
|
+
*
|
|
462
|
+
* Updating a shorthand property (longhand gets overwritten):
|
|
463
|
+
* {font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'}
|
|
464
|
+
* becomes .style.font = 'baz'
|
|
465
|
+
* Removing a shorthand property (longhand gets lost too):
|
|
466
|
+
* {font: 'foo', fontVariant: 'bar'} -> {fontVariant: 'bar'}
|
|
467
|
+
* becomes .style.font = ''
|
|
468
|
+
* Removing a longhand property (should revert to shorthand; doesn't):
|
|
469
|
+
* {font: 'foo', fontVariant: 'bar'} -> {font: 'foo'}
|
|
470
|
+
* becomes .style.fontVariant = ''
|
|
471
|
+
*/function De(e,n){{if(!n)return;var t=Le(e),a=Le(n),i={};for(var o in t){var r=t[o],s=a[o];if(s&&r!==s){var l=r+","+s;if(i[l])continue;i[l]=!0,d("%s a style property during rerender (%s) when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.",Ie(e[r])?"Removing":"Updating",r,s)}}}}// For HTML, certain tags should omit their close tag. We keep a list for
|
|
472
|
+
// those special-case tags.
|
|
473
|
+
function ze(e,n){if(n){// Note the use of `==` which checks for null or undefined.
|
|
474
|
+
if(Wg[e]&&(null!=n.children||null!=n.dangerouslySetInnerHTML))throw Error(e+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");if(null!=n.dangerouslySetInnerHTML){if(null!=n.children)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if(!("object"==typeof n.dangerouslySetInnerHTML&&"__html"in n.dangerouslySetInnerHTML))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.")}if(!n.suppressContentEditableWarning&&n.contentEditable&&null!=n.children&&d("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional."),null!=n.style&&"object"!=typeof n.style)throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.")}}function Ae(e,n){if(-1===e.indexOf("-"))return"string"==typeof n.is;return"annotation-xml"!==e&&"color-profile"!==e&&"font-face"!==e&&"font-face-src"!==e&&"font-face-uri"!==e&&"font-face-format"!==e&&"font-face-name"!==e&&"missing-glyph"!==e}// When adding attributes to the HTML or SVG allowed attribute list, be sure to
|
|
475
|
+
// also add them to this module to ensure casing and incorrect name
|
|
476
|
+
// warnings.
|
|
477
|
+
function Oe(e,n){{if(Yg.call(qg,n)&&qg[n])return!0;if(Kg.test(n)){var t="aria-"+n.slice(4).toLowerCase(),a=Hg.hasOwnProperty(t)?t:null;// If this is an aria-* attribute, but is not listed in the known DOM
|
|
478
|
+
// DOM properties, then it is an invalid aria-* attribute.
|
|
479
|
+
if(null==a)return d("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",n),qg[n]=!0,!0;// aria-* attributes should be lowercase; suggest the lowercase version.
|
|
480
|
+
if(n!==a)return d("Invalid ARIA attribute `%s`. Did you mean `%s`?",n,a),qg[n]=!0,!0}if(Qg.test(n)){var i=n.toLowerCase(),o=Hg.hasOwnProperty(i)?i:null;// If this is an aria-* attribute, but is not listed in the known DOM
|
|
481
|
+
// DOM properties, then it is an invalid aria-* attribute.
|
|
482
|
+
if(null==o)return qg[n]=!0,!1;// aria-* attributes should be lowercase; suggest the lowercase version.
|
|
483
|
+
if(n!==o)return d("Unknown ARIA attribute `%s`. Did you mean `%s`?",n,o),qg[n]=!0,!0}}return!0}function Me(e,n){{var t=[];for(var a in n){var i=Oe(e,a);i||t.push(a)}var o=t.map(function(e){return"`"+e+"`"}).join(", ");1===t.length?d("Invalid aria prop %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",o,e):1<t.length&&d("Invalid aria props %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",o,e)}}function Ue(e,n){Ae(e,n)||Me(e,n)}function Fe(e,n){{if("input"!==e&&"textarea"!==e&&"select"!==e)return;null==n||null!==n.value||$g||($g=!0,"select"===e&&n.multiple?d("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",e):d("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",e))}}function Be(e,n,t){Ae(e,n)||ah(e,n,t)}/**
|
|
484
|
+
* Gets the target node from a native browser event by accounting for
|
|
485
|
+
* inconsistencies in browser DOM APIs.
|
|
486
|
+
*
|
|
487
|
+
* @param {object} nativeEvent Native browser event.
|
|
488
|
+
* @return {DOMEventTarget} Target node.
|
|
489
|
+
*/function We(e){// Fallback to nativeEvent.srcElement for IE9
|
|
490
|
+
// https://github.com/facebook/react/issues/12506
|
|
491
|
+
var n=e.target||e.srcElement||window;// Normalize SVG <use> element events #4963
|
|
492
|
+
// Safari may fire events on text nodes (Node.TEXT_NODE is 3).
|
|
493
|
+
// @see http://www.quirksmode.org/js/events_properties.html
|
|
494
|
+
return n.correspondingUseElement&&(n=n.correspondingUseElement),3===n.nodeType?n.parentNode:n}function Ve(e){// We perform this translation at the end of the event loop so that we
|
|
495
|
+
// always receive the correct fiber here
|
|
496
|
+
var n=jo(e);if(n)// Unmounted
|
|
497
|
+
{if("function"!=typeof lh)throw Error("setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue.");var t=n.stateNode;// Guard against Fiber being unmounted.
|
|
498
|
+
if(t){var a=qo(t);lh(n.stateNode,n.type,a)}}}function je(e){lh=e}function He(e){uh?ch?ch.push(e):ch=[e]:uh=e}function qe(){return null!==uh||null!==ch}function Qe(){if(uh){var e=uh,n=ch;if(uh=null,ch=null,Ve(e),n)for(var t=0;t<n.length;t++)Ve(n[t])}}// the renderer. Such as when we're dispatching events or if third party
|
|
499
|
+
// libraries need to call batchedUpdates. Eventually, this API will go away when
|
|
500
|
+
// everything is batched by default. We'll then have a similar API to opt-out of
|
|
501
|
+
// scheduled work and instead do synchronous work.
|
|
502
|
+
// Defaults
|
|
503
|
+
function Ke(){// Here we wait until all updates have propagated, which is important
|
|
504
|
+
// when using controlled components within layers:
|
|
505
|
+
// https://github.com/facebook/react/issues/1698
|
|
506
|
+
// Then we restore state of any controlled component.
|
|
507
|
+
var e=qe();e&&(mh(),Qe())}function Ye(e,n){if(hh)// If we are currently inside another batch, we need to wait until it
|
|
508
|
+
// fully completes before restoring state.
|
|
509
|
+
return e(n);hh=!0;try{return fh(e,n)}finally{hh=!1,Ke()}}function $e(e,n,t){if(bh)// If we are currently inside another batch, we need to wait until it
|
|
510
|
+
// fully completes before restoring state.
|
|
511
|
+
return e(n,t);bh=!0;try{return gh(e,n,t)}finally{bh=!1,Ke()}}function Xe(e,n,t,a,i){var o=hh;hh=!0;try{return ph(e,n,t,a,i)}finally{hh=o,hh||Ke()}}function Ge(e){hh||mh()}function Ze(e,n,t,a){fh=e,ph=n,mh=t,gh=a}function Je(e){return"button"===e||"input"===e||"select"===e||"textarea"===e}function en(e,n,t){return!("onClick"!==e&&"onClickCapture"!==e&&"onDoubleClick"!==e&&"onDoubleClickCapture"!==e&&"onMouseDown"!==e&&"onMouseDownCapture"!==e&&"onMouseMove"!==e&&"onMouseMoveCapture"!==e&&"onMouseUp"!==e&&"onMouseUpCapture"!==e&&"onMouseEnter"!==e)&&!!(t.disabled&&Je(n))}/**
|
|
512
|
+
* @param {object} inst The instance, which is the source of events.
|
|
513
|
+
* @param {string} registrationName Name of listener (e.g. `onClick`).
|
|
514
|
+
* @return {?function} The stored callback.
|
|
515
|
+
*/function nn(e,n){var t=e.stateNode;if(null===t)// Work in progress (ex: onload events in incremental mode).
|
|
516
|
+
return null;var a=qo(t);if(null===a)// Work in progress.
|
|
517
|
+
return null;var i=a[n];if(en(n,e.type,a))return null;if(i&&"function"!=typeof i)throw Error("Expected `"+n+"` listener to be a function, instead got a value of `"+typeof i+"` type.");return i}function tn(n,t,i,o,a,r,s,d,e){var l=Array.prototype.slice.call(arguments,3);try{t.apply(i,l)}catch(e){this.onError(e)}}/**
|
|
518
|
+
* Call a function while guarding against errors that happens within it.
|
|
519
|
+
* Returns an error if it throws, otherwise null.
|
|
520
|
+
*
|
|
521
|
+
* In production, this is implemented using a try-catch. The reason we don't
|
|
522
|
+
* use a try-catch directly is so that we can swap out a different
|
|
523
|
+
* implementation in DEV mode.
|
|
524
|
+
*
|
|
525
|
+
* @param {String} name of the guard to use for logging or debugging
|
|
526
|
+
* @param {Function} func The function to invoke
|
|
527
|
+
* @param {*} context The context to use when calling the function
|
|
528
|
+
* @param {...*} args Arguments for function
|
|
529
|
+
*/function an(n,t,i,o,a,r,s,d,e){Eh=!1,Sh=null,kh.apply(Nh,arguments)}/**
|
|
530
|
+
* Same as invokeGuardedCallback, but instead of returning an error, it stores
|
|
531
|
+
* it in a global so it can be rethrown by `rethrowCaughtError` later.
|
|
532
|
+
* TODO: See if caughtError and rethrowError can be unified.
|
|
533
|
+
*
|
|
534
|
+
* @param {String} name of the guard to use for logging or debugging
|
|
535
|
+
* @param {Function} func The function to invoke
|
|
536
|
+
* @param {*} context The context to use when calling the function
|
|
537
|
+
* @param {...*} args Arguments for function
|
|
538
|
+
*/function on(n,t,i,o,a,r,s,d,e){if(an.apply(this,arguments),Eh){var l=sn();Ch||(Ch=!0,_h=l)}}/**
|
|
539
|
+
* During execution of guarded functions we will capture the first error which
|
|
540
|
+
* we will rethrow to be handled by the top level error handler.
|
|
541
|
+
*/function dn(){if(Ch){var e=_h;throw Ch=!1,_h=null,e}}function rn(){return Eh}function sn(){if(Eh){var e=Sh;return Eh=!1,Sh=null,e}throw Error("clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.")}/**
|
|
542
|
+
* `ReactInstanceMap` maintains a mapping from a public facing stateful
|
|
543
|
+
* instance (key) and the internal representation (value). This allows public
|
|
544
|
+
* methods to accept the user facing instance as an argument and map them back
|
|
545
|
+
* to internal methods.
|
|
546
|
+
*
|
|
547
|
+
* Note that this module is currently shared and assumed to be stateless.
|
|
548
|
+
* If this becomes an actual Map, that will break.
|
|
549
|
+
*/function ln(e){return e._reactInternals}function un(e){return e._reactInternals!==void 0}function cn(e,n){e._reactInternals=n}// Don't change these two values. They're used by React Dev Tools.
|
|
550
|
+
function fn(e){var n=e,t=e;if(!e.alternate){// If there is no alternate, this might be a new tree that isn't inserted
|
|
551
|
+
// yet. If it is, then it will have a pending insertion effect on it.
|
|
552
|
+
var a=n;do n=a,0!==(1026&n.flags)&&(t=n.return),a=n.return;while(a)}else for(;n.return;)n=n.return;return 3===n.tag?t:null;// If we didn't hit the root, that means that we're in an disconnected tree
|
|
553
|
+
// that has been unmounted.
|
|
554
|
+
}function pn(e){if(e.tag===13){var n=e.memoizedState;if(null===n){var t=e.alternate;null!==t&&(n=t.memoizedState)}if(null!==n)return n.dehydrated}return null}function mn(e){return e.tag===3?e.stateNode.containerInfo:null}function gn(e){return fn(e)===e}function hn(e){{var n=Yh.current;if(null!==n&&n.tag===1){var t=n,a=t.stateNode;a._warnedAboutRefsInRender||d("%s is accessing isMounted inside its render() function. render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",z(t.type)||"A component"),a._warnedAboutRefsInRender=!0}}var i=ln(e);return!!i&&fn(i)===i}function bn(e){if(fn(e)!==e)throw Error("Unable to find node on an unmounted component.")}function yn(e){var n=e.alternate;if(!n){// If there is no alternate, then we only need to check if it is mounted.
|
|
555
|
+
var t=fn(e);if(null===t)throw Error("Unable to find node on an unmounted component.");return t===e?e:null}// If we have two possible branches, we'll walk backwards up to the root
|
|
556
|
+
// to see what path the root points to. On the way we may hit one of the
|
|
557
|
+
// special cases and we'll deal with them.
|
|
558
|
+
for(var i=e,o=n;!0;){var d=i.return;if(null===d)// We're at the root.
|
|
559
|
+
break;var r=d.alternate;if(null===r){// There is no alternate. This is an unusual case. Currently, it only
|
|
560
|
+
// happens when a Suspense component is hidden. An extra fragment fiber
|
|
561
|
+
// is inserted in between the Suspense fiber and its children. Skip
|
|
562
|
+
// over this extra fragment fiber and proceed to the next parent.
|
|
563
|
+
var s=d.return;if(null!==s){i=o=s;continue}// If there's no parent, we're at the root.
|
|
564
|
+
break}// If both copies of the parent fiber point to the same child, we can
|
|
565
|
+
// assume that the child is current. This happens when we bailout on low
|
|
566
|
+
// priority: the bailed out fiber's child reuses the current child.
|
|
567
|
+
if(d.child===r.child){for(var l=d.child;l;){if(l===i)return bn(d),e;if(l===o)return bn(d),n;l=l.sibling}// We should never have an alternate for any mounting node. So the only
|
|
568
|
+
// way this could possibly happen is if this was unmounted, if at all.
|
|
569
|
+
throw Error("Unable to find node on an unmounted component.")}if(i.return!==o.return)// The return pointer of A and the return pointer of B point to different
|
|
570
|
+
// fibers. We assume that return pointers never criss-cross, so A must
|
|
571
|
+
// belong to the child set of A.return, and B must belong to the child
|
|
572
|
+
// set of B.return.
|
|
573
|
+
i=d,o=r;else{// The return pointers point to the same fiber. We'll have to use the
|
|
574
|
+
// default, slow path: scan the child sets of each parent alternate to see
|
|
575
|
+
// which child belongs to which set.
|
|
576
|
+
//
|
|
577
|
+
// Search parent A's child set
|
|
578
|
+
for(var u=!1,c=d.child;c;){if(c===i){u=!0,i=d,o=r;break}if(c===o){u=!0,o=d,i=r;break}c=c.sibling}if(!u){for(c=r.child;c;){if(c===i){u=!0,i=r,o=d;break}if(c===o){u=!0,o=r,i=d;break}c=c.sibling}if(!u)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(i.alternate!==o)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}// If the root is not a host container, we're in a disconnected tree. I.e.
|
|
579
|
+
// unmounted.
|
|
580
|
+
if(i.tag!==3)throw Error("Unable to find node on an unmounted component.");return i.stateNode.current===i?e:n;// Otherwise B has to be current branch.
|
|
581
|
+
}function xn(e){var n=yn(e);if(!n)return null;// Next we'll drill down this component to find the first HostComponent/Text.
|
|
582
|
+
for(var t=n;!0;){if(t.tag===5||t.tag===6)return t;if(t.child){t.child.return=t,t=t.child;continue}if(t===n)return null;for(;!t.sibling;){if(!t.return||t.return===n)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}// Flow needs the return null here, but ESLint complains about it.
|
|
583
|
+
// eslint-disable-next-line no-unreachable
|
|
584
|
+
return null}function vn(e){var n=yn(e);if(!n)return null;// Next we'll drill down this component to find the first HostComponent/Text.
|
|
585
|
+
for(var t=n;!0;){if(t.tag===5||t.tag===6||!1)return t;if(t.child&&4!==t.tag){t.child.return=t,t=t.child;continue}if(t===n)return null;for(;!t.sibling;){if(!t.return||t.return===n)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}// Flow needs the return null here, but ESLint complains about it.
|
|
586
|
+
// eslint-disable-next-line no-unreachable
|
|
587
|
+
return null}function wn(e,n){for(var t=n,a=e.alternate;null!==t;){if(t===e||t===a)return!0;t=t.return}return!1}function kn(e){ub=e}function En(e){cb=e}function Sn(e){fb=e}function Cn(e){pb=e}// TODO: Upgrade this definition once we're on a newer version of Flow that
|
|
588
|
+
function _n(){return 0<Xh.length}function Nn(e){return-1<ab.indexOf(e)}function Tn(e,n,t,a,i){return{blockedOn:e,domEventName:n,eventSystemFlags:t|16,nativeEvent:i,targetContainers:[a]}}function Rn(e,n,t,a,i){var o=Tn(e,n,t,a,i);Xh.push(o)}// Resets the replaying for this type of continuous event to no event.
|
|
589
|
+
function Pn(e,n){switch(e){case"focusin":case"focusout":Gh=null;break;case"dragenter":case"dragleave":Zh=null;break;case"mouseover":case"mouseout":Jh=null;break;case"pointerover":case"pointerout":{var t=n.pointerId;eb.delete(t);break}case"gotpointercapture":case"lostpointercapture":{var a=n.pointerId;nb.delete(a);break}}}function In(e,n,t,a,i,o){if(null===e||e.nativeEvent!==o){var d=Tn(n,t,a,i,o);if(null!==n){var r=jo(n);null!==r&&cb(r)}return d}// If we have already queued this exact event, then it's because
|
|
590
|
+
// the different event systems have different DOM event listeners.
|
|
591
|
+
// We can accumulate the flags, and the targetContainers, and
|
|
592
|
+
// store a single event to be replayed.
|
|
593
|
+
e.eventSystemFlags|=a;var s=e.targetContainers;return null!==i&&-1===s.indexOf(i)&&s.push(i),e}function Ln(e,n,t,a,i){// These set relatedTarget to null because the replayed event will be treated as if we
|
|
594
|
+
// moved from outside the window (no target) onto the target once it hydrates.
|
|
595
|
+
// Instead of mutating we could clone the event.
|
|
596
|
+
switch(n){case"focusin":{var o=i;return Gh=In(Gh,e,n,t,a,o),!0}case"dragenter":{var d=i;return Zh=In(Zh,e,n,t,a,d),!0}case"mouseover":{var r=i;return Jh=In(Jh,e,n,t,a,r),!0}case"pointerover":{var s=i,l=s.pointerId;return eb.set(l,In(eb.get(l)||null,e,n,t,a,s)),!0}case"gotpointercapture":{var u=i,c=u.pointerId;return nb.set(c,In(nb.get(c)||null,e,n,t,a,u)),!0}}return!1}// Check if this target is unblocked. Returns true if it's unblocked.
|
|
597
|
+
function Dn(e){// TODO: This function shares a lot of logic with attemptToDispatchEvent.
|
|
598
|
+
// Try to unify them. It's a bit tricky since it would require two return
|
|
599
|
+
// values.
|
|
600
|
+
var n=Vo(e.target);if(null!==n){var t=fn(n);if(null!==t){var a=t.tag;if(a===13){var i=pn(t);if(null!==i)return e.blockedOn=i,void pb(e.lanePriority,function(){up.unstable_runWithPriority(e.priority,function(){fb(t)})})}else if(a===3){var o=t.stateNode;if(o.hydrate)// We don't currently have a way to increase the priority of
|
|
601
|
+
// a root other than sync.
|
|
602
|
+
return void(e.blockedOn=mn(t))}}}e.blockedOn=null}function zn(e){if(null!==e.blockedOn)return!1;for(var n=e.targetContainers;0<n.length;){var t=n[0],a=At(e.domEventName,e.eventSystemFlags,t,e.nativeEvent);if(null!==a){// We're still blocked. Try again later.
|
|
603
|
+
var i=jo(a);return null!==i&&cb(i),e.blockedOn=a,!1}// This target container was successfully dispatched. Try the next.
|
|
604
|
+
n.shift()}return!0}function An(e,n,t){zn(e)&&t.delete(n)}function On(){// First replay discrete events.
|
|
605
|
+
for($h=!1;0<Xh.length;){var e=Xh[0];if(null!==e.blockedOn){// We're still blocked.
|
|
606
|
+
// Increase the priority of this boundary to unblock
|
|
607
|
+
// the next discrete event.
|
|
608
|
+
var n=jo(e.blockedOn);null!==n&&ub(n);break}for(var t=e.targetContainers;0<t.length;){var a=t[0],i=At(e.domEventName,e.eventSystemFlags,a,e.nativeEvent);if(null!==i){e.blockedOn=i;break}// This target container was successfully dispatched. Try the next.
|
|
609
|
+
t.shift()}null===e.blockedOn&&Xh.shift()}// Next replay any continuous events.
|
|
610
|
+
null!==Gh&&zn(Gh)&&(Gh=null),null!==Zh&&zn(Zh)&&(Zh=null),null!==Jh&&zn(Jh)&&(Jh=null),eb.forEach(An),nb.forEach(An)}function Mn(e,n){e.blockedOn===n&&(e.blockedOn=null,!$h&&($h=!0,up.unstable_scheduleCallback(up.unstable_NormalPriority,On)))}function Un(e){// Mark anything that was blocked on this as no longer blocked
|
|
611
|
+
// and eligible for a replay.
|
|
612
|
+
if(0<Xh.length){Mn(Xh[0],e);// This is a exponential search for each boundary that commits. I think it's
|
|
613
|
+
// worth it because we expect very few discrete events to queue up and once
|
|
614
|
+
// we are actually fully unblocked it will be fast to replay them.
|
|
615
|
+
for(var n=1,t;n<Xh.length;n++)t=Xh[n],t.blockedOn===e&&(t.blockedOn=null)}null!==Gh&&Mn(Gh,e),null!==Zh&&Mn(Zh,e),null!==Jh&&Mn(Jh,e);var a=function(n){return Mn(n,e)};eb.forEach(a),nb.forEach(a);for(var o=0,d;o<tb.length;o++)d=tb[o],d.blockedOn===e&&(d.blockedOn=null);for(;0<tb.length;){var r=tb[0];if(null!==r.blockedOn)// We're still blocked.
|
|
616
|
+
break;else Dn(r),null===r.blockedOn&&tb.shift()}}/**
|
|
617
|
+
* Generate a mapping of standard vendor prefixes using the defined style property and event name.
|
|
618
|
+
*
|
|
619
|
+
* @param {string} styleProp
|
|
620
|
+
* @param {string} eventName
|
|
621
|
+
* @returns {object}
|
|
622
|
+
*/function Fn(e,n){var t={};return t[e.toLowerCase()]=n.toLowerCase(),t["Webkit"+e]="webkit"+n,t["Moz"+e]="moz"+n,t}/**
|
|
623
|
+
* A list of event names to a configurable list of vendor prefixes.
|
|
624
|
+
*/ /**
|
|
625
|
+
* Attempts to determine the correct vendor prefixed event name.
|
|
626
|
+
*
|
|
627
|
+
* @param {string} eventName
|
|
628
|
+
* @returns {string}
|
|
629
|
+
*/function Bn(e){if(sb[e])return sb[e];if(!rb[e])return e;var n=rb[e];for(var t in n)if(n.hasOwnProperty(t)&&t in lb)return sb[e]=n[t];return e}/**
|
|
630
|
+
* Turns
|
|
631
|
+
* ['abort', ...]
|
|
632
|
+
*
|
|
633
|
+
* into
|
|
634
|
+
*
|
|
635
|
+
* topLevelEventsToReactNames = new Map([
|
|
636
|
+
* ['abort', 'onAbort'],
|
|
637
|
+
* ]);
|
|
638
|
+
*
|
|
639
|
+
* and registers them.
|
|
640
|
+
*/function Wn(e,n){// As the event types are in pairs of two, we need to iterate
|
|
641
|
+
// through in twos. The events are in pairs of two to save code
|
|
642
|
+
// and improve init perf of processing this array, as it will
|
|
643
|
+
// result in far fewer object allocations and property accesses
|
|
644
|
+
// if we only use three arrays to process all the categories of
|
|
645
|
+
// instead of tuples.
|
|
646
|
+
for(var t=0;t<e.length;t+=2){var a=e[t],o=e[t+1],d=o[0].toUpperCase()+o.slice(1),r="on"+d;xb.set(a,n),yb.set(a,r),s(r,[a])}}function Vn(e,n){for(var t=0;t<e.length;t++)xb.set(e[t],n)}function jn(e){var n=xb.get(e);// Default to a ContinuousEvent. Note: we might
|
|
647
|
+
// want to warn if we can't detect the priority
|
|
648
|
+
// for the event.
|
|
649
|
+
return n===void 0?2:n}function Hn(){Wn(vb,0),Wn(kb,1),Wn(Eb,2),Vn(wb,0)}function qn(e){}// "Registers" used to "return" multiple values
|
|
650
|
+
// Used by getHighestPriorityLanes and getNextLanes:
|
|
651
|
+
function Qn(e){if(0!==(1&e))return my=15,1;if(0!==(2&e))return my=14,2;if(0!==(4&e))return my=13,4;var n=24&e;if(0!==n)return my=12,n;if(0!==(32&e))return my=11,32;var t=192&e;if(0!==t)return my=10,t;if(0!==(256&e))return my=9,256;var a=3584&e;if(0!==a)return my=8,a;if(0!==(4096&e))return my=7,4096;var i=4186112&e;if(0!==i)return my=6,i;var o=62914560&e;if(0!==o)return my=5,o;if(67108864&e)return my=4,67108864;if(0!==(134217728&e))return my=3,134217728;var r=805306368&e;return 0===r?0===(1073741824&e)?(d("Should have found matching lanes. This is a bug in React."),my=8,e):(my=1,1073741824):(my=2,r)}function Kn(e){return 99===e?15:98===e?10:97===e||96===e?8:95===e?2:0}function Yn(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error("Invalid update priority: "+e+". This is a bug in React.");}}function $n(e,n){// Early bailout if there's no pending work left.
|
|
652
|
+
var t=e.pendingLanes;if(0===t)return my=0,0;var a=0,i=0,o=e.expiredLanes,d=e.suspendedLanes,r=e.pingedLanes;// Check if any work has expired.
|
|
653
|
+
if(0!==o)a=o,i=my=15;else{// Do not work on any idle work until all the non-idle work has finished,
|
|
654
|
+
// even if the work is suspended.
|
|
655
|
+
var s=134217727&t;if(0!==s){var l=s&~d;if(0!==l)a=Qn(l),i=my;else{var u=s&r;0!==u&&(a=Qn(u),i=my)}}else{// The only remaining work is Idle.
|
|
656
|
+
var c=t&~d;0===c?0!==r&&(a=Qn(r),i=my):(a=Qn(c),i=my)}}if(0===a)// This should only be reachable if we're suspended
|
|
657
|
+
// TODO: Consider warning in this path if a fallback timer is not scheduled.
|
|
658
|
+
return 0;// If there are higher priority lanes, we'll include them even if they
|
|
659
|
+
// are suspended.
|
|
660
|
+
// If we're already in the middle of a render, switching lanes will interrupt
|
|
661
|
+
// it and we'll lose our progress. We should only do this if the new lanes are
|
|
662
|
+
// higher priority.
|
|
663
|
+
if(a=t<(a),0!==n&&n!==a&&// If we already suspended with a delay, then interrupting is fine. Don't
|
|
664
|
+
// bother waiting until the root is complete.
|
|
665
|
+
0===(n&d)){Qn(n);var f=my;if(i<=f)return n;my=i}// Check for entangled lanes and add them to the batch.
|
|
666
|
+
//
|
|
667
|
+
// A lane is said to be entangled with another when it's not allowed to render
|
|
668
|
+
// in a batch that does not also include the other lane. Typically we do this
|
|
669
|
+
// when multiple updates have the same source, and we only want to respond to
|
|
670
|
+
// the most recent event from that source.
|
|
671
|
+
//
|
|
672
|
+
// Note that we apply entanglements *after* checking for partial work above.
|
|
673
|
+
// This means that if a lane is entangled during an interleaved event while
|
|
674
|
+
// it's already rendering, we won't interrupt it. This is intentional, since
|
|
675
|
+
// entanglement is usually "best effort": we'll try our best to render the
|
|
676
|
+
// lanes in the same batch, but it's not worth throwing out partially
|
|
677
|
+
// completed work in order to do it.
|
|
678
|
+
//
|
|
679
|
+
// For those exceptions where entanglement is semantically important, like
|
|
680
|
+
// useMutableSource, we should ensure that there is no partial work at the
|
|
681
|
+
// time we apply the entanglement.
|
|
682
|
+
var p=e.entangledLanes;if(0!==p)for(var m=e.entanglements,g=a&p;0<g;){var h=ct(g),b=1<<h;a|=m[h],g&=~b}return a}function Xn(e,n){for(var t=e.eventTimes,a=-1;0<n;){var i=ct(n),o=1<<i,d=t[i];d>a&&(a=d),n&=~o}return a}function Gn(e,n){Qn(e);var t=my;return 10<=t?n+250:6<=t?n+5e3:-1}function Zn(e,n){// TODO: This gets called every time we yield. We can optimize by storing
|
|
683
|
+
// the earliest expiration time on the root. Then use that to quickly bail out
|
|
684
|
+
// of this function.
|
|
685
|
+
for(var t=e.pendingLanes,a=e.suspendedLanes,i=e.pingedLanes,o=e.expirationTimes,d=t;0<d;){var r=ct(d),s=1<<r,l=o[r];l===-1?((s&a)===0||(s&i)!==0)&&(o[r]=Gn(s,n)):l<=n&&(e.expiredLanes|=s),d&=~s}}// This returns the highest priority pending lanes regardless of whether they
|
|
686
|
+
function Jn(e){var n=e.pendingLanes&-1073741825;return 0===n?1073741824&n?1073741824:0:n}function et(){return my}function nt(e){return(e&134217727)!==0}function tt(e){return(e&62914560)===e}function at(e){return(e&4186112)===e}// To ensure consistency across multiple updates in the same event, this should
|
|
687
|
+
// be a pure function, so that it always returns the same lane for given inputs.
|
|
688
|
+
function it(e,n){switch(e){case 0:break;case 15:return 1;case 14:return 2;case 12:{var t=ut(24&~n);return 0===t?it(10,n):t}case 10:{var a=ut(192&~n);return 0===a?it(8,n):a}case 8:{var i=ut(3584&~n);return 0===i&&(i=ut(4186112&~n),0===i&&(i=ut(3584))),i}case 6:// Should be handled by findTransitionLane instead
|
|
689
|
+
case 5:// Should be handled by findRetryLane instead
|
|
690
|
+
break;case 2:var o=ut(805306368&~n);return 0===o&&(o=ut(805306368)),o;}throw Error("Invalid update priority: "+e+". This is a bug in React.")}// To ensure consistency across multiple updates in the same event, this should
|
|
691
|
+
// be pure function, so that it always returns the same lane for given inputs.
|
|
692
|
+
function ot(e,n){// First look for lanes that are completely unclaimed, i.e. have no
|
|
693
|
+
// pending work.
|
|
694
|
+
var t=ut(4186112&~n);return 0===t&&(t=ut(4186112&~e),0===t&&(t=ut(4186112))),t}// To ensure consistency across multiple updates in the same event, this should
|
|
695
|
+
// be pure function, so that it always returns the same lane for given inputs.
|
|
696
|
+
function dt(e){// This is a fork of `findUpdateLane` designed specifically for Suspense
|
|
697
|
+
// "retries" — a special update that attempts to flip a Suspense boundary
|
|
698
|
+
// from its placeholder state to its primary/resolved state.
|
|
699
|
+
var n=ut(62914560&~e);return 0===n&&(n=ut(62914560)),n}function rt(e){return e&-e}function st(e){// This finds the most significant non-zero bit.
|
|
700
|
+
var n=31-gy(e);return 0>n?0:1<<n}function lt(e){return(st(e)<<1)-1}function ut(e){// This wrapper function gets inlined. Only exists so to communicate that it
|
|
701
|
+
// doesn't matter which bit is selected; you can pick any bit without
|
|
702
|
+
// affecting the algorithms where its used. Here I'm using
|
|
703
|
+
// getHighestPriorityLane because it requires the fewest operations.
|
|
704
|
+
return rt(e)}function ct(e){return 31-gy(e)}function ft(e){return ct(e)}function pt(e,n){return(e&n)!==0}function mt(e,n){return(e&n)===n}function gt(e,n){return e|n}function ht(e,n){return e&~n}// Seems redundant, but it changes the type from a single lane (used for
|
|
705
|
+
// updates) to a group of lanes (used for flushing work).
|
|
706
|
+
function bt(e){return e}function yt(e,n){// This works because the bit ranges decrease in priority as you go left.
|
|
707
|
+
return e!==0&&e<n?e:n}function xt(e){// Intentionally pushing one by one.
|
|
708
|
+
// https://v8.dev/blog/elements-kinds#avoid-creating-holes
|
|
709
|
+
for(var n=[],t=0;t<31;t++)n.push(e);return n}function vt(e,n,t){e.pendingLanes|=n;// TODO: Theoretically, any update to any lane can unblock any other lane. But
|
|
710
|
+
// it's not practical to try every single possible combination. We need a
|
|
711
|
+
// heuristic to decide which lanes to attempt to render, and in which batches.
|
|
712
|
+
// For now, we use the same heuristic as in the old ExpirationTimes model:
|
|
713
|
+
// retry any lane at equal or lower priority, but don't try updates at higher
|
|
714
|
+
// priority without also including the lower priority updates. This works well
|
|
715
|
+
// when considering updates across different priority levels, but isn't
|
|
716
|
+
// sufficient for updates within the same priority, since we want to treat
|
|
717
|
+
// those updates as parallel.
|
|
718
|
+
// Unsuspend any update at equal or lower priority.
|
|
719
|
+
var a=n-1;// Turns 0b1000 into 0b0111
|
|
720
|
+
e.suspendedLanes&=a,e.pingedLanes&=a;var i=e.eventTimes,o=ft(n);// We can always overwrite an existing timestamp because we prefer the most
|
|
721
|
+
// recent event, and we assume time is monotonically increasing.
|
|
722
|
+
i[o]=t}function wt(e,n){e.suspendedLanes|=n,e.pingedLanes&=~n;for(// The suspended lanes are no longer CPU-bound. Clear their expiration times.
|
|
723
|
+
var t=e.expirationTimes,a=n;0<a;){var i=ct(a),o=1<<i;t[i]=-1,a&=~o}}function kt(e,n,t){e.pingedLanes|=e.suspendedLanes&n}function Et(e){e.expiredLanes|=24&e.pendingLanes}function St(e){return(e&24)!==0}function Ct(e,n){e.mutableReadLanes|=n&e.pendingLanes}function _t(e,n){var t=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n;for(var a=e.entanglements,i=e.eventTimes,o=e.expirationTimes,d=t;0<d;){var r=ct(d),s=1<<r;a[r]=0,i[r]=-1,o[r]=-1,d&=~s}}function Nt(e,n){e.entangledLanes|=n;for(var t=e.entanglements,a=n;0<a;){var i=ct(a),o=1<<i;t[i]|=n,a&=~o}}function Tt(e){return 0===e?32:0|31-(0|hy(e)/by)}// Intentionally not named imports because Rollup would use dynamic dispatch for
|
|
724
|
+
// This is exported in FB builds for use by legacy FB layer infra.
|
|
725
|
+
// We'd like to remove this but it's not clear if this is safe.
|
|
726
|
+
function Rt(e){vy=!!e}function Pt(){return vy}function It(e,n,t){var a=jn(n),i;switch(a){case 0:i=Lt;break;case 1:i=Dt;break;case 2:default:i=zt;}return i.bind(null,n,t,e)}function Lt(e,n,t,a){Ge(a.timeStamp),Xe(zt,e,n,t,a)}function Dt(e,n,t,a){xy(yy,zt.bind(null,e,n,t,a))}function zt(e,n,t,a){if(vy){var i=!0;if(// TODO: replaying capture phase events is currently broken
|
|
727
|
+
// because we used to do it during top-level native bubble handlers
|
|
728
|
+
// but now we use different bubble and capture handlers.
|
|
729
|
+
// In eager mode, we attach capture listeners early, so we need
|
|
730
|
+
// to filter them out until we fix the logic to handle them correctly.
|
|
731
|
+
// This could've been outside the flag but I put it inside to reduce risk.
|
|
732
|
+
i=0==(4&n),i&&_n()&&Nn(e))return void Rn(null,// Flags that we're not actually blocked on anything as far as we know.
|
|
733
|
+
e,n,t,a);var o=At(e,n,t,a);if(null===o)return void(i&&Pn(e,a));if(i){if(Nn(e))return void Rn(o,e,n,t,a);if(Ln(o,e,n,t,a))return;// We need to clear only if we didn't queue because
|
|
734
|
+
// queueing is accummulative.
|
|
735
|
+
Pn(e,a)}// This is not replayable so we'll invoke it but without a target,
|
|
736
|
+
// in case the event system needs to trace it.
|
|
737
|
+
ui(e,n,a,null,t)}}// Attempt dispatching an event. Returns a SuspenseInstance or Container if it's blocked.
|
|
738
|
+
function At(e,n,t,a){// TODO: Warn if _enabled is false.
|
|
739
|
+
var i=We(a),o=Vo(i);if(null!==o){var d=fn(o);if(null===d)o=null;else{var r=d.tag;if(13===r){var s=pn(d);if(null!==s)// Queue the event to be replayed later. Abort dispatching since we
|
|
740
|
+
// don't want this event dispatched twice through the event system.
|
|
741
|
+
// TODO: If this is the first discrete event in the queue. Schedule an increased
|
|
742
|
+
// priority for this boundary.
|
|
743
|
+
return s;// This shouldn't happen, something went wrong but to avoid blocking
|
|
744
|
+
// the whole system, dispatch the event without a target.
|
|
745
|
+
// TODO: Warn.
|
|
746
|
+
o=null}else if(3===r){var l=d.stateNode;if(l.hydrate)// If this happens during a replay something went wrong and it might block
|
|
747
|
+
// the whole system.
|
|
748
|
+
return mn(d);o=null}else d!==o&&(// If we get an event (ex: img onload) before committing that
|
|
749
|
+
// component's mount, ignore it for now (that is, treat it as if it was an
|
|
750
|
+
// event on a non-React tree). We might also consider queueing events and
|
|
751
|
+
// dispatching them after the mount.
|
|
752
|
+
o=null)}}// We're not blocked on anything.
|
|
753
|
+
return ui(e,n,a,o,t),null}function Ot(e,n,t){return e.addEventListener(n,t,!1),t}function Mt(e,n,t){return e.addEventListener(n,t,!0),t}function Ut(e,n,t,a){return e.addEventListener(n,t,{capture:!0,passive:a}),t}function Ft(e,n,t,a){return e.addEventListener(n,t,{passive:a}),t}/**
|
|
754
|
+
* These variables store information about text content of a target node,
|
|
755
|
+
* allowing comparison of content before and after a given event.
|
|
756
|
+
*
|
|
757
|
+
* Identify the node where selection currently begins, then observe
|
|
758
|
+
* both its text content and its current position in the DOM. Since the
|
|
759
|
+
* browser may natively replace the target node during composition, we can
|
|
760
|
+
* use its position to find its replacement.
|
|
761
|
+
*
|
|
762
|
+
*
|
|
763
|
+
*/function Bt(e){return wy=e,ky=jt(),!0}function Wt(){wy=null,ky=null,Ey=null}function Vt(){if(Ey)return Ey;var e=ky,n=e.length,t=jt(),a=t.length,i,o;for(i=0;i<n&&e[i]===t[i];i++);var d=n-i;for(o=1;o<=d&&e[n-o]===t[a-o];o++);var r=1<o?1-o:void 0;return Ey=t.slice(i,r),Ey}function jt(){return"value"in wy?wy.value:wy.textContent}/**
|
|
764
|
+
* `charCode` represents the actual "character code" and is safe to use with
|
|
765
|
+
* `String.fromCharCode`. As such, only keys that correspond to printable
|
|
766
|
+
* characters produce a valid `charCode`, the only exception to this is Enter.
|
|
767
|
+
* The Tab-key is considered non-printable and does not have a `charCode`,
|
|
768
|
+
* presumably because it does not produce a tab-character in browsers.
|
|
769
|
+
*
|
|
770
|
+
* @param {object} nativeEvent Native browser event.
|
|
771
|
+
* @return {number} Normalized `charCode` property.
|
|
772
|
+
*/function Ht(e){var n=e.keyCode,t;// Some non-printable keys are reported in `charCode`/`keyCode`, discard them.
|
|
773
|
+
// Must not discard the (non-)printable Enter-key.
|
|
774
|
+
return"charCode"in e?(t=e.charCode,0===t&&13===n&&(t=13)):t=n,10===t&&(t=13),32<=t||13===t?t:0}function qt(){return!0}function Qt(){return!1}// This is intentionally a factory so that we have different returned constructors.
|
|
775
|
+
// If we had a single constructor, it would be megamorphic and engines would deopt.
|
|
776
|
+
function Kt(e){/**
|
|
777
|
+
* Synthetic events are dispatched by event plugins, typically in response to a
|
|
778
|
+
* top-level event delegation handler.
|
|
779
|
+
*
|
|
780
|
+
* These systems should generally use pooling to reduce the frequency of garbage
|
|
781
|
+
* collection. The system should check `isPersistent` to determine whether the
|
|
782
|
+
* event should be released into the pool after being dispatched. Users that
|
|
783
|
+
* need a persisted event should invoke `persist`.
|
|
784
|
+
*
|
|
785
|
+
* Synthetic events (and subclasses) implement the DOM Level 3 Events API by
|
|
786
|
+
* normalizing browser quirks. Subclasses do not necessarily have to implement a
|
|
787
|
+
* DOM interface; custom application-specific events can also subclass this.
|
|
788
|
+
*/function n(n,t,a,i,o){for(var d in this._reactName=n,this._targetInst=a,this.type=t,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)if(e.hasOwnProperty(d)){var r=e[d];this[d]=r?r(i):i[d]}var s=null==i.defaultPrevented?!1===i.returnValue:i.defaultPrevented;return this.isDefaultPrevented=s?qt:Qt,this.isPropagationStopped=Qt,this}return lp(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=qt)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=qt)},/**
|
|
789
|
+
* We release all dispatched `SyntheticEvent`s after each event loop, adding
|
|
790
|
+
* them back into the pool. This allows a way to hold onto a reference that
|
|
791
|
+
* won't be added back into the pool.
|
|
792
|
+
*/persist:function(){// Modern event system doesn't use pooling.
|
|
793
|
+
},/**
|
|
794
|
+
* Checks if this event should be released back into the pool.
|
|
795
|
+
*
|
|
796
|
+
* @return {boolean} True if this should not be released, false otherwise.
|
|
797
|
+
*/isPersistent:qt}),n}/**
|
|
798
|
+
* @interface Event
|
|
799
|
+
* @see http://www.w3.org/TR/DOM-Level-3-Events/
|
|
800
|
+
*/function Yt(e){e!==dx&&(dx&&"mousemove"===e.type?(ix=e.screenX-dx.screenX,ox=e.screenY-dx.screenY):(ix=0,ox=0),dx=e)}/**
|
|
801
|
+
* @interface MouseEvent
|
|
802
|
+
* @see http://www.w3.org/TR/DOM-Level-3-Events/
|
|
803
|
+
*/ /**
|
|
804
|
+
* @param {object} nativeEvent Native browser event.
|
|
805
|
+
* @return {string} Normalized `key` property.
|
|
806
|
+
*/function $t(e){if(e.key){// Normalize inconsistent values reported by browsers due to
|
|
807
|
+
// implementations of a working draft specification.
|
|
808
|
+
// FireFox implements `key` but returns `MozPrintableKey` for all
|
|
809
|
+
// printable characters (normalized to `Unidentified`), ignore it.
|
|
810
|
+
var n=Wy[e.key]||e.key;if("Unidentified"!==n)return n}// Browser does not implement `key`, polyfill as much of it as we can.
|
|
811
|
+
if("keypress"===e.type){var a=Ht(e);// The enter-key is technically both printable and non-printable and can
|
|
812
|
+
// thus be captured by `keypress`, no other non-printable key should.
|
|
813
|
+
return 13===a?"Enter":t(a)}return"keydown"===e.type||"keyup"===e.type?Vy[e.keyCode]||"Unidentified":""}/**
|
|
814
|
+
* Translation from modifier key to the associated property in the event.
|
|
815
|
+
* @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers
|
|
816
|
+
*/ // Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support
|
|
817
|
+
// getModifierState. If getModifierState is not supported, we map it to a set of
|
|
818
|
+
// modifier keys exposed by the event. In this case, Lock-keys are not supported.
|
|
819
|
+
function Xt(e){var n=this,t=n.nativeEvent;if(t.getModifierState)return t.getModifierState(e);var a=jy[e];return!!a&&!!t[a]}function Gt(e){return Xt}/**
|
|
820
|
+
* @interface KeyboardEvent
|
|
821
|
+
* @see http://www.w3.org/TR/DOM-Level-3-Events/
|
|
822
|
+
*/function Zt(){s("onBeforeInput",["compositionend","keypress","textInput","paste"]),s("onCompositionEnd",["compositionend","focusout","keydown","keypress","keyup","mousedown"]),s("onCompositionStart",["compositionstart","focusout","keydown","keypress","keyup","mousedown"]),s("onCompositionUpdate",["compositionupdate","focusout","keydown","keypress","keyup","mousedown"])}// Track whether we've ever handled a keypress on the space key.
|
|
823
|
+
/**
|
|
824
|
+
* Return whether a native keypress event is assumed to be a command.
|
|
825
|
+
* This is required because Firefox fires `keypress` events for key commands
|
|
826
|
+
* (cut, copy, select-all, etc.) even though no character is inserted.
|
|
827
|
+
*/function Jt(e){return(e.ctrlKey||e.altKey||e.metaKey)&&// ctrlKey && altKey is equivalent to AltGr, and is not a command.
|
|
828
|
+
!(e.ctrlKey&&e.altKey)}/**
|
|
829
|
+
* Translate native top level events into event types.
|
|
830
|
+
*/function ea(e){return"compositionstart"===e?"onCompositionStart":"compositionend"===e?"onCompositionEnd":"compositionupdate"===e?"onCompositionUpdate":void 0}/**
|
|
831
|
+
* Does our fallback best-guess model think this event signifies that
|
|
832
|
+
* composition has begun?
|
|
833
|
+
*/function na(e,n){return"keydown"===e&&n.keyCode===229}/**
|
|
834
|
+
* Does our fallback mode think that this event is the end of composition?
|
|
835
|
+
*/function ta(e,n){return"keyup"===e?-1!==ex.indexOf(n.keyCode):"keydown"===e?229!==n.keyCode:!("keypress"!=e&&"mousedown"!=e&&"focusout"!=e)}/**
|
|
836
|
+
* Google Input Tools provides composition data via a CustomEvent,
|
|
837
|
+
* with the `data` property populated in the `detail` object. If this
|
|
838
|
+
* is available on the event object, use it. If not, this is a plain
|
|
839
|
+
* composition event and we have nothing special to extract.
|
|
840
|
+
*
|
|
841
|
+
* @param {object} nativeEvent
|
|
842
|
+
* @return {?string}
|
|
843
|
+
*/function aa(e){var n=e.detail;return"object"==typeof n&&"data"in n?n.data:null}/**
|
|
844
|
+
* Check if a composition event was triggered by Korean IME.
|
|
845
|
+
* Our fallback mode does not work well with IE's Korean IME,
|
|
846
|
+
* so just use native composition events when Korean IME is used.
|
|
847
|
+
* Although CompositionEvent.locale property is deprecated,
|
|
848
|
+
* it is available in IE, where our fallback mode is enabled.
|
|
849
|
+
*
|
|
850
|
+
* @param {object} nativeEvent
|
|
851
|
+
* @return {boolean}
|
|
852
|
+
*/function ia(e){return"ko"===e.locale}// Track the current IME composition status, if any.
|
|
853
|
+
/**
|
|
854
|
+
* @return {?object} A SyntheticCompositionEvent.
|
|
855
|
+
*/function oa(e,n,t,a,i){var o,d;if(tx?o=ea(n):fx?ta(n,a)&&(o="onCompositionEnd"):na(n,a)&&(o="onCompositionStart"),!o)return null;sx&&!ia(a)&&(fx||"onCompositionStart"!==o?"onCompositionEnd"===o&&fx&&(d=Vt()):fx=Bt(i));var r=pi(t,o);if(0<r.length){var s=new Fy(o,n,null,a,i);if(e.push({event:s,listeners:r}),d)s.data=d;else{var l=aa(a);null!==l&&(s.data=l)}}}function da(e,n){switch(e){case"compositionend":return aa(n);case"keypress":/**
|
|
856
|
+
* If native `textInput` events are available, our goal is to make
|
|
857
|
+
* use of them. However, there is a special case: the spacebar key.
|
|
858
|
+
* In Webkit, preventing default on a spacebar `textInput` event
|
|
859
|
+
* cancels character insertion, but it *also* causes the browser
|
|
860
|
+
* to fall back to its default spacebar behavior of scrolling the
|
|
861
|
+
* page.
|
|
862
|
+
*
|
|
863
|
+
* Tracking at:
|
|
864
|
+
* https://code.google.com/p/chromium/issues/detail?id=355103
|
|
865
|
+
*
|
|
866
|
+
* To avoid this issue, use the keypress event as if no `textInput`
|
|
867
|
+
* event is available.
|
|
868
|
+
*/var t=n.which;return 32===t?(cx=!0," "):null;case"textInput":// Record the characters to be added to the DOM.
|
|
869
|
+
var a=n.data;// If it's a spacebar character, assume that we have already handled
|
|
870
|
+
// it at the keypress level and bail immediately. Android Chrome
|
|
871
|
+
// doesn't give us keycodes, so we need to ignore it.
|
|
872
|
+
return" "===a&&cx?null:a;default:// For other native event types, do nothing.
|
|
873
|
+
return null;}}/**
|
|
874
|
+
* For browsers that do not provide the `textInput` event, extract the
|
|
875
|
+
* appropriate string to use for SyntheticInputEvent.
|
|
876
|
+
*/function ra(e,n){// If we are currently composing (IME) and using a fallback to do so,
|
|
877
|
+
// try to extract the composed characters from the fallback object.
|
|
878
|
+
// If composition event is available, we extract a string only at
|
|
879
|
+
// compositionevent, otherwise extract it at fallback events.
|
|
880
|
+
if(fx){if("compositionend"===e||!tx&&ta(e,n)){var a=Vt();return Wt(),fx=!1,a}return null}switch(e){case"paste":// If a paste event occurs after a keypress, throw out the input
|
|
881
|
+
// chars. Paste events should not lead to BeforeInput events.
|
|
882
|
+
return null;case"keypress":/**
|
|
883
|
+
* As of v27, Firefox may fire keypress events even when no character
|
|
884
|
+
* will be inserted. A few possibilities:
|
|
885
|
+
*
|
|
886
|
+
* - `which` is `0`. Arrow keys, Esc key, etc.
|
|
887
|
+
*
|
|
888
|
+
* - `which` is the pressed key code, but no char is available.
|
|
889
|
+
* Ex: 'AltGr + d` in Polish. There is no modified character for
|
|
890
|
+
* this key combination and no character is inserted into the
|
|
891
|
+
* document, but FF fires the keypress for char code `100` anyway.
|
|
892
|
+
* No `input` event will occur.
|
|
893
|
+
*
|
|
894
|
+
* - `which` is the pressed key code, but a command combination is
|
|
895
|
+
* being used. Ex: `Cmd+C`. No character is inserted, and no
|
|
896
|
+
* `input` event will occur.
|
|
897
|
+
*/if(!Jt(n)){// IE fires the `keypress` event when a user types an emoji via
|
|
898
|
+
// Touch keyboard of Windows. In such a case, the `char` property
|
|
899
|
+
// holds an emoji character like `\uD83D\uDE0A`. Because its length
|
|
900
|
+
// is 2, the property `which` does not represent an emoji correctly.
|
|
901
|
+
// In such a case, we directly return the `char` property instead of
|
|
902
|
+
// using `which`.
|
|
903
|
+
if(n.char&&1<n.char.length)return n.char;if(n.which)return t(n.which)}return null;case"compositionend":return sx&&!ia(n)?null:n.data;default:return null;}}/**
|
|
904
|
+
* Extract a SyntheticInputEvent for `beforeInput`, based on either native
|
|
905
|
+
* `textInput` or fallback behavior.
|
|
906
|
+
*
|
|
907
|
+
* @return {?object} A SyntheticInputEvent.
|
|
908
|
+
*/function sa(e,n,t,a,i){var o;// If no characters are being inserted, no BeforeInput event should
|
|
909
|
+
// be fired.
|
|
910
|
+
if(o=rx?da(n,a):ra(n,a),!o)return null;var d=pi(t,"onBeforeInput");if(0<d.length){var r=new By("onBeforeInput","beforeinput",null,a,i);e.push({event:r,listeners:d}),r.data=o}}/**
|
|
911
|
+
* Create an `onBeforeInput` event to match
|
|
912
|
+
* http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.
|
|
913
|
+
*
|
|
914
|
+
* This event plugin is based on the native `textInput` event
|
|
915
|
+
* available in Chrome, Safari, Opera, and IE. This event fires after
|
|
916
|
+
* `onKeyPress` and `onCompositionEnd`, but before `onInput`.
|
|
917
|
+
*
|
|
918
|
+
* `beforeInput` is spec'd but not implemented in any browsers, and
|
|
919
|
+
* the `input` event does not provide any useful information about what has
|
|
920
|
+
* actually been added, contrary to the spec. Thus, `textInput` is the best
|
|
921
|
+
* available event to identify the characters that have actually been inserted
|
|
922
|
+
* into the target node.
|
|
923
|
+
*
|
|
924
|
+
* This plugin is also responsible for emitting `composition` events, thus
|
|
925
|
+
* allowing us to share composition fallback code for both `beforeInput` and
|
|
926
|
+
* `composition` event types.
|
|
927
|
+
*/function la(e,n,t,a,i,o,d){oa(e,n,t,a,i),sa(e,n,t,a,i)}/**
|
|
928
|
+
* @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary
|
|
929
|
+
*/function ua(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===n?!!px[e.type]:!("textarea"!==n)}/**
|
|
930
|
+
* Checks if an event is supported in the current execution environment.
|
|
931
|
+
*
|
|
932
|
+
* NOTE: This will not work correctly for non-generic events such as `change`,
|
|
933
|
+
* `reset`, `load`, `error`, and `select`.
|
|
934
|
+
*
|
|
935
|
+
* Borrows from Modernizr.
|
|
936
|
+
*
|
|
937
|
+
* @param {string} eventNameSuffix Event name, e.g. "click".
|
|
938
|
+
* @return {boolean} True if the event is supported.
|
|
939
|
+
* @internal
|
|
940
|
+
* @license Modernizr 3.0.0pre (Custom Build) | MIT
|
|
941
|
+
*/function ca(e){if(!qp)return!1;var n="on"+e,t=(n in document);if(!t){var a=document.createElement("div");a.setAttribute(n,"return;"),t="function"==typeof a[n]}return t}function fa(){s("onChange",["change","click","focusin","focusout","input","keydown","keyup","selectionchange"])}function pa(e,n,t,a){He(a);var i=pi(n,"onChange");if(0<i.length){var o=new Cy("onChange","change",null,t,a);e.push({event:o,listeners:i})}}/**
|
|
942
|
+
* For IE shims
|
|
943
|
+
*/ /**
|
|
944
|
+
* SECTION: handle `change` event
|
|
945
|
+
*/function ma(e){var n=e.nodeName&&e.nodeName.toLowerCase();return"select"===n||"input"===n&&"file"===e.type}function ga(e){var n=[];// If change and propertychange bubbled, we'd just bind to it like all the
|
|
946
|
+
// other events and have it go through ReactBrowserEventEmitter. Since it
|
|
947
|
+
// doesn't, we manually listen for the events and so we have to enqueue and
|
|
948
|
+
// process the abstract event manually.
|
|
949
|
+
//
|
|
950
|
+
// Batching is necessary here in order to ensure that all event handlers run
|
|
951
|
+
// before the next rerender (including event handlers attached to ancestor
|
|
952
|
+
// elements instead of directly on the input). Without this, controlled
|
|
953
|
+
// components don't work properly in conjunction with event bubbling because
|
|
954
|
+
// the component is rerendered and the value reverted before all the event
|
|
955
|
+
// handlers can run. See https://github.com/facebook/react/issues/708.
|
|
956
|
+
pa(n,gx,e,We(e)),Ye(ha,n)}function ha(e){ai(e,0)}function ba(e){var n=Ho(e);if(X(n))return e}function ya(e,n){if("change"===e)return n}/**
|
|
957
|
+
* SECTION: handle `input` event
|
|
958
|
+
*/ /**
|
|
959
|
+
* (For IE <=9) Starts tracking propertychange events on the passed-in element
|
|
960
|
+
* and override the value property so that we can distinguish user events from
|
|
961
|
+
* value changes in JS.
|
|
962
|
+
*/function xa(e,n){mx=e,gx=n,mx.attachEvent("onpropertychange",wa)}/**
|
|
963
|
+
* (For IE <=9) Removes the event listeners from the currently-tracked element,
|
|
964
|
+
* if any exists.
|
|
965
|
+
*/function va(){mx&&(mx.detachEvent("onpropertychange",wa),mx=null,gx=null)}/**
|
|
966
|
+
* (For IE <=9) Handles a propertychange event, sending a `change` event if
|
|
967
|
+
* the value of the active element has changed.
|
|
968
|
+
*/function wa(e){"value"!==e.propertyName||ba(gx)&&ga(e)}function ka(e,n,t){"focusin"===e?(va(),xa(n,t)):"focusout"==e&&va()}// For IE8 and IE9.
|
|
969
|
+
function Ea(e,n){if("selectionchange"===e||"keyup"===e||"keydown"===e)// On the selectionchange event, the target is just document which isn't
|
|
970
|
+
// helpful for us so just check activeElement instead.
|
|
971
|
+
//
|
|
972
|
+
// 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire
|
|
973
|
+
// propertychange on the first input event after setting `value` from a
|
|
974
|
+
// script and fires only keydown, keypress, keyup. Catching keyup usually
|
|
975
|
+
// gets it and catching keydown lets us fire an event for the first
|
|
976
|
+
// keystroke if user does a key repeat (it'll be a little delayed: right
|
|
977
|
+
// before the second keystroke). Other input methods (e.g., paste) seem to
|
|
978
|
+
// fire selectionchange normally.
|
|
979
|
+
return ba(gx)}/**
|
|
980
|
+
* SECTION: handle `click` event
|
|
981
|
+
*/function Sa(e){// Use the `click` event to detect changes to checkbox and radio inputs.
|
|
982
|
+
// This approach works across all browsers, whereas `change` does not fire
|
|
983
|
+
// until `blur` in IE8.
|
|
984
|
+
var n=e.nodeName;return n&&"input"===n.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)}function Ca(e,n){if("click"===e)return ba(n)}function _a(e,n){if("input"===e||"change"===e)return ba(n)}function Na(e){var n=e._wrapperState;n&&n.controlled&&"number"===e.type&&de(e,"number",e.value)}/**
|
|
985
|
+
* This plugin creates an `onChange` event that normalizes change events
|
|
986
|
+
* across form elements. This event fires at a time when it's possible to
|
|
987
|
+
* change the element's value without seeing a flicker.
|
|
988
|
+
*
|
|
989
|
+
* Supported elements are:
|
|
990
|
+
* - input (see `isTextInputElement`)
|
|
991
|
+
* - textarea
|
|
992
|
+
* - select
|
|
993
|
+
*/function Ta(e,n,t,a,i,o,d){var r=t?Ho(t):window,s,l;if(ma(r)?s=ya:ua(r)?hx?s=_a:(s=Ea,l=ka):Sa(r)&&(s=Ca),s){var u=s(n,t);if(u)return void pa(e,u,a,i)}l&&l(n,r,t),"focusout"===n&&Na(r)}function Ra(){l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"])}/**
|
|
994
|
+
* For almost every interaction we care about, there will be both a top-level
|
|
995
|
+
* `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that
|
|
996
|
+
* we do not extract duplicate events. However, moving the mouse into the
|
|
997
|
+
* browser from outside will not fire a `mouseout` event. In this case, we use
|
|
998
|
+
* the `mouseover` top-level event.
|
|
999
|
+
*/function Pa(e,n,t,a,i,o,d){var r="mouseover"===n||"pointerover"===n,s="mouseout"===n||"pointerout"===n;if(r&&0==(o&16)){// If this is an over event with a target, we might have already dispatched
|
|
1000
|
+
// the event in the out event of the other target. If this is replayed,
|
|
1001
|
+
// then it's because we couldn't dispatch against this target previously
|
|
1002
|
+
// so we have to do it now instead.
|
|
1003
|
+
var l=a.relatedTarget||a.fromElement;if(l&&(Vo(l)||Wo(l)))// If the related node is managed by React, we can assume that we have
|
|
1004
|
+
// already dispatched the corresponding events during its mouseout.
|
|
1005
|
+
return}if(s||r)// Must not be a mouse or pointer in or out - ignoring.
|
|
1006
|
+
{var u;// TODO: why is this nullable in the types but we read from it?
|
|
1007
|
+
if(i.window===i)u=i;else{// TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
|
|
1008
|
+
var c=i.ownerDocument;u=c?c.defaultView||c.parentWindow:window}var f,p;if(s){var m=a.relatedTarget||a.toElement;if(f=t,p=m?Vo(m):null,null!==p){var g=fn(p);(p!==g||5!==p.tag&&6!==p.tag)&&(p=null)}}else// Moving to a node from outside the window.
|
|
1009
|
+
f=null,p=t;if(f!==p)// Nothing pertains to our managed components.
|
|
1010
|
+
{var h=Ry,b="onMouseLeave",y="onMouseEnter",x="mouse";("pointerout"===n||"pointerover"===n)&&(h=Ky,b="onPointerLeave",y="onPointerEnter",x="pointer");var v=null==f?u:Ho(f),w=null==p?u:Ho(p),k=new h(b,x+"leave",f,a,i);k.target=v,k.relatedTarget=w;var E=null,S=Vo(i);// We should only process this nativeEvent if we are processing
|
|
1011
|
+
// the first ancestor. Next time, we will ignore the event.
|
|
1012
|
+
if(S===t){var C=new h(y,x+"enter",p,a,i);C.target=w,C.relatedTarget=v,E=C}bi(e,k,E,f,p)}}}/**
|
|
1013
|
+
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
|
1014
|
+
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
|
1015
|
+
*/function Ia(e,n){return e===n&&(0!==e||1/e==1/n)||e!==e&&n!==n// eslint-disable-line no-self-compare
|
|
1016
|
+
}/**
|
|
1017
|
+
* Performs equality by iterating through keys on an object and returning false
|
|
1018
|
+
* when any key has values which are not strictly equal between the arguments.
|
|
1019
|
+
* Returns true when the values of all keys are strictly equal.
|
|
1020
|
+
*/function i(e,n){if(bx(e,n))return!0;if("object"!=typeof e||null===e||"object"!=typeof n||null===n)return!1;var t=Object.keys(e),a=Object.keys(n);if(t.length!==a.length)return!1;// Test for A's keys different from B.
|
|
1021
|
+
for(var o=0;o<t.length;o++)if(!yx.call(n,t[o])||!bx(e[t[o]],n[t[o]]))return!1;return!0}/**
|
|
1022
|
+
* Given any node return the first leaf node without children.
|
|
1023
|
+
*
|
|
1024
|
+
* @param {DOMElement|DOMTextNode} node
|
|
1025
|
+
* @return {DOMElement|DOMTextNode}
|
|
1026
|
+
*/function La(e){for(;e&&e.firstChild;)e=e.firstChild;return e}/**
|
|
1027
|
+
* Get the next sibling within a container. This will walk up the
|
|
1028
|
+
* DOM if a node's siblings have been exhausted.
|
|
1029
|
+
*
|
|
1030
|
+
* @param {DOMElement|DOMTextNode} node
|
|
1031
|
+
* @return {?DOMElement|DOMTextNode}
|
|
1032
|
+
*/function Da(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}/**
|
|
1033
|
+
* Get object describing the nodes which contain characters at offset.
|
|
1034
|
+
*
|
|
1035
|
+
* @param {DOMElement|DOMTextNode} root
|
|
1036
|
+
* @param {number} offset
|
|
1037
|
+
* @return {?object}
|
|
1038
|
+
*/function za(e,n){for(var t=La(e),a=0,i=0;t;){if(3===t.nodeType){if(i=a+t.textContent.length,a<=n&&i>=n)return{node:t,offset:n-a};a=i}t=La(Da(t))}}/**
|
|
1039
|
+
* @param {DOMElement} outerNode
|
|
1040
|
+
* @return {?object}
|
|
1041
|
+
*/function Aa(e){var n=e.ownerDocument,t=n&&n.defaultView||window,a=t.getSelection&&t.getSelection();if(!a||0===a.rangeCount)return null;var i=a.anchorNode,o=a.anchorOffset,d=a.focusNode,r=a.focusOffset;// In Firefox, anchorNode and focusNode can be "anonymous divs", e.g. the
|
|
1042
|
+
// up/down buttons on an <input type="number">. Anonymous divs do not seem to
|
|
1043
|
+
// expose properties, triggering a "Permission denied error" if any of its
|
|
1044
|
+
// properties are accessed. The only seemingly possible way to avoid erroring
|
|
1045
|
+
// is to access a property that typically works for non-anonymous divs and
|
|
1046
|
+
// catch any error that may otherwise arise. See
|
|
1047
|
+
// https://bugzilla.mozilla.org/show_bug.cgi?id=208427
|
|
1048
|
+
try{/* eslint-disable no-unused-expressions */i.nodeType,d.nodeType}catch(n){return null}return Oa(e,i,o,d,r)}/**
|
|
1049
|
+
* Returns {start, end} where `start` is the character/codepoint index of
|
|
1050
|
+
* (anchorNode, anchorOffset) within the textContent of `outerNode`, and
|
|
1051
|
+
* `end` is the index of (focusNode, focusOffset).
|
|
1052
|
+
*
|
|
1053
|
+
* Returns null if you pass in garbage input but we should probably just crash.
|
|
1054
|
+
*
|
|
1055
|
+
* Exported only for testing.
|
|
1056
|
+
*/function Oa(e,n,t,a,i){var o=0,d=-1,r=-1,s=0,l=0,u=e,c=null;outer:for(;!0;){for(var f=null;u===n&&(0===t||3===u.nodeType)&&(d=o+t),u===a&&(0===i||3===u.nodeType)&&(r=o+i),3===u.nodeType&&(o+=u.nodeValue.length),null!==(f=u.firstChild);)// Moving from `node` to its first child `next`.
|
|
1057
|
+
c=u,u=f;for(;!0;){if(u===e)// If `outerNode` has children, this is always the second time visiting
|
|
1058
|
+
// it. If it has no children, this is still the first loop, and the only
|
|
1059
|
+
// valid selection is anchorNode and focusNode both equal to this node
|
|
1060
|
+
// and both offsets 0, in which case we will have handled above.
|
|
1061
|
+
break outer;if(c===n&&++s===t&&(d=o),c===a&&++l===i&&(r=o),null!==(f=u.nextSibling))break;u=c,c=u.parentNode}// Moving from `node` to its next sibling `next`.
|
|
1062
|
+
u=f}return-1===d||-1===r?null:{start:d,end:r}}/**
|
|
1063
|
+
* In modern non-IE browsers, we can support both forward and backward
|
|
1064
|
+
* selections.
|
|
1065
|
+
*
|
|
1066
|
+
* Note: IE10+ supports the Selection object, but it does not support
|
|
1067
|
+
* the `extend` method, which means that even in modern IE, it's not possible
|
|
1068
|
+
* to programmatically create a backward selection. Thus, for all IE
|
|
1069
|
+
* versions, we use the old IE API to create our selections.
|
|
1070
|
+
*
|
|
1071
|
+
* @param {DOMElement|DOMTextNode} node
|
|
1072
|
+
* @param {object} offsets
|
|
1073
|
+
*/function Ma(e,n){var t=e.ownerDocument||document,i=t&&t.defaultView||window;// Edge fails with "Object expected" in some scenarios.
|
|
1074
|
+
// (For instance: TinyMCE editor used in a list component that supports pasting to add more,
|
|
1075
|
+
// fails when pasting 100+ items)
|
|
1076
|
+
if(i.getSelection){var o=i.getSelection(),d=e.textContent.length,r=a(n.start,d),s=void 0===n.end?r:a(n.end,d);// IE 11 uses modern selection, but doesn't support the extend method.
|
|
1077
|
+
// Flip backward selections, so we can set with a single range.
|
|
1078
|
+
if(!o.extend&&r>s){var l=s;s=r,r=l}var u=za(e,r),c=za(e,s);if(u&&c){if(1===o.rangeCount&&o.anchorNode===u.node&&o.anchorOffset===u.offset&&o.focusNode===c.node&&o.focusOffset===c.offset)return;var f=t.createRange();f.setStart(u.node,u.offset),o.removeAllRanges(),r>s?(o.addRange(f),o.extend(c.node,c.offset)):(f.setEnd(c.node,c.offset),o.addRange(f))}}}function Ua(e){return e&&e.nodeType===3}function Fa(e,n){return!!(e&&n)&&(e===n||!Ua(e)&&(Ua(n)?Fa(e,n.parentNode):"contains"in e?e.contains(n):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(n))))}function Ba(e){return e&&e.ownerDocument&&Fa(e.ownerDocument.documentElement,e)}function Wa(e){try{// Accessing the contentDocument of a HTMLIframeElement can cause the browser
|
|
1079
|
+
// to throw, e.g. if it has a cross-origin src attribute.
|
|
1080
|
+
// Safari will show an error in the console when the access results in "Blocked a frame with origin". e.g:
|
|
1081
|
+
// iframe.contentDocument.defaultView;
|
|
1082
|
+
// A safety way is to access one of the cross origin properties: Window or Location
|
|
1083
|
+
// Which might result in "SecurityError" DOM Exception and it is compatible to Safari.
|
|
1084
|
+
// https://html.spec.whatwg.org/multipage/browsers.html#integration-with-idl
|
|
1085
|
+
return"string"==typeof e.contentWindow.location.href}catch(e){return!1}}function Va(){for(var e=window,n=G();n instanceof e.HTMLIFrameElement;){if(Wa(n))e=n.contentWindow;else return n;n=G(e.document)}return n}/**
|
|
1086
|
+
* @ReactInputSelection: React input selection module. Based on Selection.js,
|
|
1087
|
+
* but modified to be suitable for react and has a couple of bug fixes (doesn't
|
|
1088
|
+
* assume buttons have range selections allowed).
|
|
1089
|
+
* Input selection module for React.
|
|
1090
|
+
*/ /**
|
|
1091
|
+
* @hasSelectionCapabilities: we get the element types that support selection
|
|
1092
|
+
* from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart`
|
|
1093
|
+
* and `selectionEnd` rows.
|
|
1094
|
+
*/function ja(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&("input"===n&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===n||"true"===e.contentEditable)}function Ha(){var e=Va();return{focusedElem:e,selectionRange:ja(e)?Qa(e):null}}/**
|
|
1095
|
+
* @restoreSelection: If any selection information was potentially lost,
|
|
1096
|
+
* restore it. This is useful when performing operations that could remove dom
|
|
1097
|
+
* nodes and place them back in, resulting in focus being lost.
|
|
1098
|
+
*/function qa(e){var n=Va(),t=e.focusedElem,a=e.selectionRange;if(n!==t&&Ba(t)){null!==a&&ja(t)&&Ka(t,a);for(// Focusing a node can change the scroll position, which is undesirable
|
|
1099
|
+
var o=[],d=t;d=d.parentNode;)1===d.nodeType&&o.push({element:d,left:d.scrollLeft,top:d.scrollTop});"function"==typeof t.focus&&t.focus();for(var r=0,s;r<o.length;r++)s=o[r],s.element.scrollLeft=s.left,s.element.scrollTop=s.top}}/**
|
|
1100
|
+
* @getSelection: Gets the selection bounds of a focused textarea, input or
|
|
1101
|
+
* contentEditable node.
|
|
1102
|
+
* -@input: Look up selection bounds of this input
|
|
1103
|
+
* -@return {start: selectionStart, end: selectionEnd}
|
|
1104
|
+
*/function Qa(e){var n;return n="selectionStart"in e?{start:e.selectionStart,end:e.selectionEnd}:Aa(e),n||{start:0,end:0}}/**
|
|
1105
|
+
* @setSelection: Sets the selection bounds of a textarea or input and focuses
|
|
1106
|
+
* the input.
|
|
1107
|
+
* -@input Set selection bounds of this input or textarea
|
|
1108
|
+
* -@offsets Object of same form that is returned from get*
|
|
1109
|
+
*/function Ka(e,n){var t=n.start,i=n.end;i===void 0&&(i=t),"selectionStart"in e?(e.selectionStart=t,e.selectionEnd=a(i,e.value.length)):Ma(e,n)}function Ya(){s("onSelect",["focusout","contextmenu","dragend","focusin","keydown","keyup","mousedown","mouseup","selectionchange"])}/**
|
|
1110
|
+
* Get an object which is a unique representation of the current selection.
|
|
1111
|
+
*
|
|
1112
|
+
* The return value will not be consistent across nodes or browsers, but
|
|
1113
|
+
* two identical selections on the same node will return identical objects.
|
|
1114
|
+
*/function $a(e){if("selectionStart"in e&&ja(e))return{start:e.selectionStart,end:e.selectionEnd};var n=e.ownerDocument&&e.ownerDocument.defaultView||window,t=n.getSelection();return{anchorNode:t.anchorNode,anchorOffset:t.anchorOffset,focusNode:t.focusNode,focusOffset:t.focusOffset}}/**
|
|
1115
|
+
* Get document associated with the event target.
|
|
1116
|
+
*/function Xa(e){return e.window===e?e.document:e.nodeType===9?e:e.ownerDocument}/**
|
|
1117
|
+
* Poll selection to see whether it's changed.
|
|
1118
|
+
*
|
|
1119
|
+
* @param {object} nativeEvent
|
|
1120
|
+
* @param {object} nativeEventTarget
|
|
1121
|
+
* @return {?SyntheticEvent}
|
|
1122
|
+
*/function Ga(e,n,t){// Ensure we have the right element, and that the user is not dragging a
|
|
1123
|
+
// selection (this matches native `select` event behavior). In HTML5, select
|
|
1124
|
+
// fires only on input and textarea thus if there's no focused element we
|
|
1125
|
+
// won't dispatch.
|
|
1126
|
+
var a=Xa(t);if(!(Ex||null==vx||vx!==G(a))){// Only fire when selection has actually changed.
|
|
1127
|
+
var o=$a(vx);if(!kx||!i(kx,o)){kx=o;var d=pi(wx,"onSelect");if(0<d.length){var r=new Cy("onSelect","select",null,n,t);e.push({event:r,listeners:d}),r.target=vx}}}}/**
|
|
1128
|
+
* This plugin creates an `onSelect` event that normalizes select events
|
|
1129
|
+
* across form elements.
|
|
1130
|
+
*
|
|
1131
|
+
* Supported elements are:
|
|
1132
|
+
* - input (see `isTextInputElement`)
|
|
1133
|
+
* - textarea
|
|
1134
|
+
* - contentEditable
|
|
1135
|
+
*
|
|
1136
|
+
* This differs from native browser implementations in the following ways:
|
|
1137
|
+
* - Fires on contentEditable fields as well as inputs.
|
|
1138
|
+
* - Fires for collapsed selection.
|
|
1139
|
+
* - Fires after user input.
|
|
1140
|
+
*/function Za(e,n,t,a,i,o,d){var r=t?Ho(t):window;switch(n){// Track the input node that has focus.
|
|
1141
|
+
case"focusin":(ua(r)||"true"===r.contentEditable)&&(vx=r,wx=t,kx=null);break;case"focusout":vx=null,wx=null,kx=null;break;// Don't fire the event while the user is dragging. This matches the
|
|
1142
|
+
// semantics of the native select event.
|
|
1143
|
+
case"mousedown":Ex=!0;break;case"contextmenu":case"mouseup":case"dragend":Ex=!1,Ga(e,a,i);break;// Chrome and IE fire non-standard event when selection is changed (and
|
|
1144
|
+
// sometimes when it hasn't). IE's event fires out of order with respect
|
|
1145
|
+
// to key and input events on deletion, so we discard it.
|
|
1146
|
+
//
|
|
1147
|
+
// Firefox doesn't support selectionchange, so check selection status
|
|
1148
|
+
// after each key entry. The selection changes after keydown and before
|
|
1149
|
+
// keyup, but we check on keydown as well in the case of holding down a
|
|
1150
|
+
// key, when multiple keydown events are fired but only one keyup is.
|
|
1151
|
+
// This is also our approach for IE handling, for the reason above.
|
|
1152
|
+
case"selectionchange":if(xx)break;// falls through
|
|
1153
|
+
case"keydown":case"keyup":Ga(e,a,i);}}function Ja(e,n,t,a,i,o,d){var r=yb.get(n);if(void 0!==r){var s=Cy,l=n;switch(n){case"keypress":// Firefox creates a keypress event for function keys too. This removes
|
|
1154
|
+
// the unwanted keypress events. Enter is however both printable and
|
|
1155
|
+
// non-printable. One would expect Tab to be as well (but it isn't).
|
|
1156
|
+
if(0===Ht(a))return;/* falls through */case"keydown":case"keyup":s=qy;break;case"focusin":l="focus",s=Dy;break;case"focusout":l="blur",s=Dy;break;case"beforeblur":case"afterblur":s=Dy;break;case"click":// Firefox creates a click event on right mouse clicks. This removes the
|
|
1157
|
+
// unwanted click events.
|
|
1158
|
+
if(2===a.button)return;/* falls through */case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":// TODO: Disabled elements should not respond to mouse events
|
|
1159
|
+
/* falls through */case"mouseout":case"mouseover":case"contextmenu":s=Ry;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":s=Iy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":s=$y;break;case mb:case gb:case hb:s=Ay;break;case bb:s=Gy;break;case"scroll":s=Ny;break;case"wheel":s=Jy;break;case"copy":case"cut":case"paste":s=My;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":s=Ky;}var u=0!=(4&o);{// Some events don't bubble in the browser.
|
|
1160
|
+
// In the past, React has always bubbled them, but this can be surprising.
|
|
1161
|
+
// We're going to try aligning closer to the browser behavior by not bubbling
|
|
1162
|
+
// them in React either. We'll start by not bubbling onScroll, and then expand.
|
|
1163
|
+
var c=!u&&// TODO: ideally, we'd eventually add all events from
|
|
1164
|
+
// nonDelegatedEvents list in DOMPluginEventSystem.
|
|
1165
|
+
// Then we can remove this special list.
|
|
1166
|
+
// This is a breaking change that can wait until React 18.
|
|
1167
|
+
"scroll"===n,f=fi(t,r,a.type,u,void 0);if(0<f.length){// Intentionally create event lazily.
|
|
1168
|
+
var p=new s(r,l,null,a,i);e.push({event:p,listeners:f})}}}}// TODO: remove top-level side effect.
|
|
1169
|
+
function ei(e,n,t,a,i,o,d){Ja(e,n,t,a,i,o);var r=0==(o&7);// We don't process these events unless we are in the
|
|
1170
|
+
// event's native "bubble" phase, which means that we're
|
|
1171
|
+
// not in the capture phase. That's because we emulate
|
|
1172
|
+
// the capture phase here still. This is a trade-off,
|
|
1173
|
+
// because in an ideal world we would not emulate and use
|
|
1174
|
+
// the phases properly, like we do with the SimpleEvent
|
|
1175
|
+
// plugin. However, the plugins below either expect
|
|
1176
|
+
// emulation (EnterLeave) or use state localized to that
|
|
1177
|
+
// plugin (BeforeInput, Change, Select). The state in
|
|
1178
|
+
// these modules complicates things, as you'll essentially
|
|
1179
|
+
// get the case where the capture phase event might change
|
|
1180
|
+
// state, only for the following bubble event to come in
|
|
1181
|
+
// later and not trigger anything as the state now
|
|
1182
|
+
// invalidates the heuristics of the event plugin. We
|
|
1183
|
+
// could alter all these plugins to work in such ways, but
|
|
1184
|
+
// that might cause other unknown side-effects that we
|
|
1185
|
+
// can't forsee right now.
|
|
1186
|
+
r&&(Pa(e,n,t,a,i,o),Ta(e,n,t,a,i),Za(e,n,t,a,i),la(e,n,t,a,i))}// List of events that need to be individually attached to media elements.
|
|
1187
|
+
function ni(e,n,t){var a=e.type||"unknown-event";e.currentTarget=t,on(a,n,void 0,e),e.currentTarget=null}function ti(e,n,t){var a;if(t)for(var o=n.length-1;0<=o;o--){var d=n[o],r=d.instance,s=d.currentTarget,l=d.listener;if(r!==a&&e.isPropagationStopped())return;ni(e,l,s),a=r}else for(var u=0;u<n.length;u++){var c=n[u],f=c.instance,p=c.currentTarget,m=c.listener;if(f!==a&&e.isPropagationStopped())return;ni(e,m,p),a=f}}function ai(e,n){for(var t=0!=(n&4),a=0;a<e.length;a++){var o=e[a],d=o.event,r=o.listeners;ti(d,r,t)}// This would be a good time to rethrow if any of the event handlers threw.
|
|
1188
|
+
dn()}function ii(e,n,t,a,i){var o=We(t),d=[];ei(d,e,a,t,o,n),ai(d,n)}function oi(e,n){var t=!1,a=Ko(n),i=yi(e,!1);a.has(i)||(si(n,e,2,!1),a.add(i))}function di(e){{if(e[_x])// Performance optimization: don't iterate through events
|
|
1189
|
+
// for the same portal container or root node more than once.
|
|
1190
|
+
// TODO: once we remove the flag, we may be able to also
|
|
1191
|
+
// remove some of the bookkeeping maps used for laziness.
|
|
1192
|
+
return;e[_x]=!0,Vp.forEach(function(n){Cx.has(n)||ri(n,!1,e,null),ri(n,!0,e,null)})}}function ri(e,n,t,a){var i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,o=t;// If the event can be delegated (or is capture phase), we can
|
|
1193
|
+
// register it to the root container. Otherwise, we should
|
|
1194
|
+
// register the event to the target element and mark it as
|
|
1195
|
+
// a non-delegated event.
|
|
1196
|
+
if("selectionchange"===e&&9!==t.nodeType&&(o=t.ownerDocument),null!==a&&!n&&Cx.has(e)){// For all non-delegated events, apart from scroll, we attach
|
|
1197
|
+
// their event listeners to the respective elements that their
|
|
1198
|
+
// events fire on. That means we can skip this step, as event
|
|
1199
|
+
// listener has already been added previously. However, we
|
|
1200
|
+
// special case the scroll event because the reality is that any
|
|
1201
|
+
// element can scroll.
|
|
1202
|
+
// TODO: ideally, we'd eventually apply the same logic to all
|
|
1203
|
+
// events from the nonDelegatedEvents list. Then we can remove
|
|
1204
|
+
// this special case and use the same logic for all events.
|
|
1205
|
+
if("scroll"!==e)return;i|=2,o=a}var d=Ko(o),r=yi(e,n);d.has(r)||(n&&(i|=4),si(o,e,i,n),d.add(r))}function si(e,n,t,a,i){var o=It(e,n,t),d=void 0;// If passive option is not supported, then the event will be
|
|
1206
|
+
// active and not passive.
|
|
1207
|
+
yh&&("touchstart"===n||"touchmove"===n||"wheel"===n)&&(d=!0),e=e,a?d===void 0?Mt(e,n,o):Ut(e,n,o,d):d===void 0?Ot(e,n,o):Ft(e,n,o,d)}function li(e,n){return e===n||e.nodeType===8&&e.parentNode===n}function ui(e,n,t,a,i){var o=a;if(0==(n&1)&&0==(n&2)){var d=i;// If we are using the legacy FB support flag, we
|
|
1208
|
+
if(null!==a){// The below logic attempts to work out if we need to change
|
|
1209
|
+
// the target fiber to a different ancestor. We had similar logic
|
|
1210
|
+
// in the legacy event system, except the big difference between
|
|
1211
|
+
// systems is that the modern event system now has an event listener
|
|
1212
|
+
// attached to each React Root and React Portal Root. Together,
|
|
1213
|
+
// the DOM nodes representing these roots are the "rootContainer".
|
|
1214
|
+
// To figure out which ancestor instance we should use, we traverse
|
|
1215
|
+
// up the fiber tree from the target instance and attempt to find
|
|
1216
|
+
// root boundaries that match that of our current "rootContainer".
|
|
1217
|
+
// If we find that "rootContainer", we find the parent fiber
|
|
1218
|
+
// sub-tree for that root and make that our ancestor instance.
|
|
1219
|
+
var r=a;mainLoop:for(;!0;){if(null===r)return;var s=r.tag;if(s===3||s===4){var l=r.stateNode.containerInfo;if(li(l,d))break;if(4===s)// The target is a portal, but it's not the rootContainer we're looking for.
|
|
1220
|
+
// Normally portals handle their own events all the way down to the root.
|
|
1221
|
+
// So we should be able to stop now. However, we don't know if this portal
|
|
1222
|
+
// was part of *our* root.
|
|
1223
|
+
for(var u=r.return,c;null!==u;){if(c=u.tag,3===c||4===c){var f=u.stateNode.containerInfo;if(li(f,d))// This is the rootContainer we're looking for and we found it as
|
|
1224
|
+
// a parent of the Portal. That means we can ignore it because the
|
|
1225
|
+
// Portal will bubble through to us.
|
|
1226
|
+
return}u=u.return}// Now we need to find it's corresponding host fiber in the other
|
|
1227
|
+
// tree. To do this we can use getClosestInstanceFromNode, but we
|
|
1228
|
+
// need to validate that the fiber is a host instance, otherwise
|
|
1229
|
+
// we need to traverse up through the DOM till we find the correct
|
|
1230
|
+
// node that is from the other tree.
|
|
1231
|
+
for(;null!==l;){var p=Vo(l);if(null===p)return;var m=p.tag;if(m===5||m===6){r=o=p;continue mainLoop}l=l.parentNode}}r=r.return}}}$e(function(){return ii(e,n,t,o)})}function ci(e,n,t){return{instance:e,listener:n,currentTarget:t}}function fi(e,n,t,a,i){// Accumulate all instances and listeners via the target -> root path.
|
|
1232
|
+
for(var o=null===n?null:n+"Capture",d=a?o:n,r=[],s=e,l=null;null!==s;){var u=s,c=u.stateNode,f=u.tag;// Handle listeners that are on HostComponents (i.e. <div>)
|
|
1233
|
+
if(5===f&&null!==c&&(l=c,null!==d))// createEventHandle listeners
|
|
1234
|
+
{var p=nn(s,d);null!=p&&r.push(ci(s,p,l))}// If we are only accumulating events for the target, then we don't
|
|
1235
|
+
// continue to propagate through the React fiber tree to find other
|
|
1236
|
+
// listeners.
|
|
1237
|
+
if(i)break;s=s.return}return r}// We should only use this function for:
|
|
1238
|
+
// - BeforeInputEventPlugin
|
|
1239
|
+
// - ChangeEventPlugin
|
|
1240
|
+
// - SelectEventPlugin
|
|
1241
|
+
// This is because we only process these plugins
|
|
1242
|
+
// in the bubble phase, so we need to accumulate two
|
|
1243
|
+
// phase event listeners (via emulation).
|
|
1244
|
+
function pi(e,n){// Accumulate all instances and listeners via the target -> root path.
|
|
1245
|
+
for(var t=n+"Capture",a=[],i=e;null!==i;){var o=i,d=o.stateNode,r=o.tag;// Handle listeners that are on HostComponents (i.e. <div>)
|
|
1246
|
+
if(r===5&&null!==d){var s=d,l=nn(i,t);null!=l&&a.unshift(ci(i,l,s));var u=nn(i,n);null!=u&&a.push(ci(i,u,s))}i=i.return}return a}function mi(e){if(null===e)return null;do e=e.return;while(e&&e.tag!==5);return e?e:null}/**
|
|
1247
|
+
* Return the lowest common ancestor of A and B, or null if they are in
|
|
1248
|
+
* different trees.
|
|
1249
|
+
*/function gi(e,n){for(var t=e,a=n,i=0,o=t;o;o=mi(o))i++;for(var d=0,r=a;r;r=mi(r))d++;// If A is deeper, crawl up.
|
|
1250
|
+
for(;0<i-d;)t=mi(t),i--;// If B is deeper, crawl up.
|
|
1251
|
+
for(;0<d-i;)a=mi(a),d--;// Walk in lockstep until we find a match.
|
|
1252
|
+
for(var s=i;s--;){if(t===a||null!==a&&t===a.alternate)return t;t=mi(t),a=mi(a)}return null}function hi(e,n,t,a,i){for(var o=n._reactName,d=[],r=t;null!==r&&!(r===a);){var s=r,l=s.alternate,u=s.stateNode,c=s.tag;if(null!==l&&l===a)break;if(5===c&&null!==u){var f=u;if(i){var p=nn(r,o);null!=p&&d.unshift(ci(r,p,f))}else if(!i){var m=nn(r,o);null!=m&&d.push(ci(r,m,f))}}r=r.return}0!==d.length&&e.push({event:n,listeners:d})}// We should only use this function for:
|
|
1253
|
+
// - EnterLeaveEventPlugin
|
|
1254
|
+
// This is because we only process this plugin
|
|
1255
|
+
// in the bubble phase, so we need to accumulate two
|
|
1256
|
+
// phase event listeners.
|
|
1257
|
+
function bi(e,n,t,a,i){var o=a&&i?gi(a,i):null;null!==a&&hi(e,n,a,o,!1),null!==i&&null!==t&&hi(e,t,i,o,!0)}function yi(e,n){return e+"__"+(n?"capture":"bubble")}function xi(e){return e.nodeType===9?e:e.ownerDocument}function vi(){}function wi(e){// Mobile Safari does not fire properly bubble click events on
|
|
1258
|
+
// non-interactive elements, which means delegated click listeners do not
|
|
1259
|
+
// fire. The workaround for this bug involves attaching an empty click
|
|
1260
|
+
// listener on the target node.
|
|
1261
|
+
// https://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
|
|
1262
|
+
// Just set it using the onclick property so that we don't have to manage any
|
|
1263
|
+
// bookkeeping for it. Not sure if we need to clear it when the listener is
|
|
1264
|
+
// removed.
|
|
1265
|
+
// TODO: Only do this for the relevant Safaris maybe?
|
|
1266
|
+
e.onclick=vi}function ki(e,n,t,a,i){for(var o in a)if(a.hasOwnProperty(o)){var d=a[o];if("style"===o)d&&Object.freeze(d),Pe(n,d);else if("dangerouslySetInnerHTML"===o){var r=d?d.__html:void 0;null!=r&&cg(n,r)}else if("children"===o){if("string"==typeof d){// Avoid setting initial textContent when the text is empty. In IE11 setting
|
|
1267
|
+
// textContent on a <textarea> will cause the placeholder to not
|
|
1268
|
+
// show within the <textarea> until it has been focused and blurred again.
|
|
1269
|
+
// https://github.com/facebook/react/issues/6731#issuecomment-254874553
|
|
1270
|
+
var s="textarea"!==e||""!=d;s&&bg(n,d)}else"number"==typeof d&&bg(n,""+d);}else if("suppressContentEditableWarning"===o||"suppressHydrationWarning"===o);else if("autoFocus"===o);else jp.hasOwnProperty(o)?null!=d&&("function"!=typeof d&&Vx(o,d),"onScroll"===o&&oi("scroll",n)):null!=d&&x(n,o,d,i)}}function Ei(e,n,t,a){// TODO: Handle wasCustomComponentTag
|
|
1271
|
+
for(var o=0;o<n.length;o+=2){var d=n[o],r=n[o+1];d==="style"?Pe(e,r):d==="dangerouslySetInnerHTML"?cg(e,r):d==="children"?bg(e,r):x(e,d,r,a)}}function Si(e,n,t,a){var i=xi(t),o=a,r,s;// We create tags in the namespace of their parent container, except HTML
|
|
1272
|
+
// tags get no namespace.
|
|
1273
|
+
if(o===Ax&&(o=Se(e)),o!==Ax)s=i.createElementNS(o,e);else if(r=Ae(e,n),r||e===e.toLowerCase()||d("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",e),"script"===e){// Create the script via .innerHTML so its "parser-inserted" flag is
|
|
1274
|
+
// set to true and it does not execute
|
|
1275
|
+
var l=i.createElement("div");l.innerHTML="<script></script>";// eslint-disable-line
|
|
1276
|
+
// This is guaranteed to yield a script element.
|
|
1277
|
+
var u=l.firstChild;s=l.removeChild(u)}else if("string"==typeof n.is)// $FlowIssue `createElement` should be updated for Web Components
|
|
1278
|
+
s=i.createElement(e,{is:n.is});else// Normally attributes are assigned in `setInitialDOMProperties`, however the `multiple` and `size`
|
|
1279
|
+
// attributes on `select`s needs to be added before `option`s are inserted.
|
|
1280
|
+
// This prevents:
|
|
1281
|
+
// - a bug where the `select` does not scroll to the correct option because singular
|
|
1282
|
+
// `select` elements automatically pick the first item #13222
|
|
1283
|
+
// - a bug where the `select` set the first item as selected despite the `size` attribute #14239
|
|
1284
|
+
// See https://github.com/facebook/react/issues/13222
|
|
1285
|
+
// and https://github.com/facebook/react/issues/14239
|
|
1286
|
+
if(s=i.createElement(e),"select"===e){var c=s;n.multiple?c.multiple=!0:n.size&&(c.size=n.size)}return o!==Ax||r||"[object HTMLUnknownElement]"!==Object.prototype.toString.call(s)||Object.prototype.hasOwnProperty.call(Ox,e)||(Ox[e]=!0,d("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",e)),s}function Ci(e,n){return xi(n).createTextNode(e)}function _i(e,n,t,a){var o=Ae(n,t);Ux(n,t);// TODO: Make sure that we check isMounted before firing any of these events.
|
|
1287
|
+
var d;switch(n){case"dialog":oi("cancel",e),oi("close",e),d=t;break;case"iframe":case"object":case"embed":oi("load",e),d=t;break;case"video":case"audio":// We listen to these events in case to ensure emulated bubble
|
|
1288
|
+
// listeners still fire for all the media events.
|
|
1289
|
+
for(var r=0;r<Sx.length;r++)oi(Sx[r],e);d=t;break;case"source":oi("error",e),d=t;break;case"img":case"image":case"link":oi("error",e),oi("load",e),d=t;break;case"details":oi("toggle",e),d=t;break;case"input":ee(e,t),d=J(e,t),oi("invalid",e);break;case"option":se(e,t),d=ue(e,t);break;case"select":ge(e,t),d=me(e,t),oi("invalid",e);break;case"textarea":ve(e,t),d=xe(e,t),oi("invalid",e);break;default:d=t;}switch(ze(n,d),ki(n,e,a,d,o),n){case"input":$(e),ae(e,t,!1);break;case"textarea":$(e),ke(e);break;case"option":le(e,t);break;case"select":he(e,t);break;default:"function"==typeof d.onClick&&wi(e);}}// Calculate the diff between the two objects.
|
|
1290
|
+
function Ni(e,n,t,a,i){Ux(n,a);var o=null,d,r;"input"===n?(d=J(e,t),r=J(e,a),o=[]):"option"===n?(d=ue(e,t),r=ue(e,a),o=[]):"select"===n?(d=me(e,t),r=me(e,a),o=[]):"textarea"===n?(d=xe(e,t),r=xe(e,a),o=[]):(d=t,r=a,"function"!=typeof d.onClick&&"function"==typeof r.onClick&&wi(e));ze(n,r);var s=null,l,u;for(l in d)if(!r.hasOwnProperty(l)&&d.hasOwnProperty(l)&&null!=d[l])if("style"===l){var c=d[l];for(u in c)c.hasOwnProperty(u)&&(s||(s={}),s[u]="")}else if("dangerouslySetInnerHTML"===l||"children"===l);else if("suppressContentEditableWarning"===l||"suppressHydrationWarning"===l);else if("autoFocus"===l);else jp.hasOwnProperty(l)?o||(o=[]):// For all other deleted properties we add it to the queue. We use
|
|
1291
|
+
// the allowed property list in the commit phase instead.
|
|
1292
|
+
(o=o||[]).push(l,null);for(l in r){var f=r[l],p=null==d?void 0:d[l];if(r.hasOwnProperty(l)&&f!==p&&(null!=f||null!=p))if("style"===l){if(f&&Object.freeze(f),p){// Unset styles on `lastProp` but not on `nextProp`.
|
|
1293
|
+
for(u in p)!p.hasOwnProperty(u)||f&&f.hasOwnProperty(u)||(s||(s={}),s[u]="");// Update styles that changed since `lastProp`.
|
|
1294
|
+
for(u in f)f.hasOwnProperty(u)&&p[u]!==f[u]&&(s||(s={}),s[u]=f[u])}else s||(!o&&(o=[]),o.push(l,s)),s=f;}else if("dangerouslySetInnerHTML"===l){var m=f?f.__html:void 0,g=p?p.__html:void 0;null!=m&&g!==m&&(o=o||[]).push(l,m)}else if("children"===l)("string"==typeof f||"number"==typeof f)&&(o=o||[]).push(l,""+f);else if("suppressContentEditableWarning"===l||"suppressHydrationWarning"===l);else jp.hasOwnProperty(l)?(null!=f&&("function"!=typeof f&&Vx(l,f),"onScroll"===l&&oi("scroll",e)),o||p===f||(o=[])):"object"==typeof f&&null!==f&&f.$$typeof===Nm?// If we encounter useOpaqueReference's opaque object, this means we are hydrating.
|
|
1295
|
+
// In this case, call the opaque object's toString function which generates a new client
|
|
1296
|
+
// ID so client and server IDs match and throws to rerender.
|
|
1297
|
+
f.toString():// For any other property we always add it to the queue and then we
|
|
1298
|
+
// filter it out using the allowed property list during the commit.
|
|
1299
|
+
(o=o||[]).push(l,f)}return s&&(De(s,r.style),(o=o||[]).push("style",s)),o}// Apply the diff.
|
|
1300
|
+
function Ti(e,n,t,a,i){"input"===t&&"radio"===i.type&&null!=i.name&&ne(e,i);var o=Ae(t,a),d=Ae(t,i);Ei(e,n,o,d);// TODO: Ensure that an update gets scheduled if any of the special props
|
|
1301
|
+
// changed.
|
|
1302
|
+
"input"===t?te(e,i):"textarea"===t?we(e,i):"select"===t?be(e,i):void 0}function Ri(e){{var n=e.toLowerCase();return jg.hasOwnProperty(n)?jg[n]||null:null}}function Pi(e,n,t,a,o){var d,r;// TODO: Make sure that we check isMounted before firing any of these events.
|
|
1303
|
+
switch(Mx=!0===t.suppressHydrationWarning,d=Ae(n,t),Ux(n,t),n){case"dialog":oi("cancel",e),oi("close",e);break;case"iframe":case"object":case"embed":oi("load",e);break;case"video":case"audio":// We listen to these events in case to ensure emulated bubble
|
|
1304
|
+
// listeners still fire for all the media events.
|
|
1305
|
+
for(var s=0;s<Sx.length;s++)oi(Sx[s],e);break;case"source":oi("error",e);break;case"img":case"image":case"link":oi("error",e),oi("load",e);break;case"details":oi("toggle",e);break;case"input":ee(e,t),oi("invalid",e);break;case"option":se(e,t);break;case"select":ge(e,t),oi("invalid",e);break;case"textarea":ve(e,t),oi("invalid",e);}ze(n,t);{r=new Set;for(var l=e.attributes,u=0,f;u<l.length;u++)switch(f=l[u].name.toLowerCase(),f){// Built-in SSR attribute is allowed
|
|
1306
|
+
case"data-reactroot":break;// Controlled attributes are not validated
|
|
1307
|
+
// TODO: Only ignore them on controlled tags.
|
|
1308
|
+
case"value":break;case"checked":break;case"selected":break;default:r.add(l[u].name);}}var g=null;for(var h in t)if(t.hasOwnProperty(h)){var x=t[h];if("children"===h)"string"==typeof x?e.textContent!==x&&(!Mx&&Fx(e.textContent,x),g=["children",x]):"number"==typeof x&&e.textContent!==""+x&&(!Mx&&Fx(e.textContent,x),g=["children",""+x]);else if(jp.hasOwnProperty(h))null!=x&&("function"!=typeof x&&Vx(h,x),"onScroll"===h&&oi("scroll",e));else if(// Convince Flow we've calculated it (it's DEV-only in this method.)
|
|
1309
|
+
"boolean"==typeof d){// Validate that the properties correspond to their expected values.
|
|
1310
|
+
var v=void 0,w=m(h);if(Mx);else if("suppressContentEditableWarning"===h||"suppressHydrationWarning"===h||// Controlled attributes are not validated
|
|
1311
|
+
// TODO: Only ignore them on controlled tags.
|
|
1312
|
+
"value"===h||"checked"===h||"selected"===h);else if("dangerouslySetInnerHTML"===h){var k=e.innerHTML,E=x?x.__html:void 0;if(null!=E){var S=qx(e,E);S!==k&&Bx(h,k,S)}}else if("style"===h){if(r.delete(h),jx){var C=Re(x);v=e.getAttribute("style"),C!==v&&Bx(h,v,C)}}else if(d)// $FlowFixMe - Should be inferred as not undefined.
|
|
1313
|
+
r.delete(h.toLowerCase()),v=y(e,h,x),x!==v&&Bx(h,v,x);else if(!c(h,w,d)&&!p(h,x,w,d)){var _=!1;if(null!==w)r.delete(w.attributeName),v=b(e,h,x,w);else{var N=a;if(N===Ax&&(N=Se(n)),N===Ax)r.delete(h.toLowerCase());else{var T=Ri(h);null!==T&&T!==h&&(_=!0,r.delete(T)),r.delete(h)}v=y(e,h,x)}x===v||_||Bx(h,v,x)}}}switch(0<r.size&&!Mx&&Wx(r),n){case"input":$(e),ae(e,t,!0);break;case"textarea":$(e),ke(e);break;case"select":case"option":// For input and textarea we current always set the value property at
|
|
1314
|
+
// post mount to force it to diverge from attributes. However, for
|
|
1315
|
+
// option and select we don't quite do the same thing and select
|
|
1316
|
+
// is not resilient to the DOM state changing so we don't do that here.
|
|
1317
|
+
// TODO: Consider not doing this for input and textarea.
|
|
1318
|
+
break;default:"function"==typeof t.onClick&&wi(e);}return g}function Ii(e,n){var t=e.nodeValue!==n;return t}function Li(e,n){Fx(e.nodeValue,n)}function Di(e,n){{if(Nx)return;Nx=!0,d("Did not expect server HTML to contain a <%s> in <%s>.",n.nodeName.toLowerCase(),e.nodeName.toLowerCase())}}function zi(e,n){{if(Nx)return;Nx=!0,d("Did not expect server HTML to contain the text node \"%s\" in <%s>.",n.nodeValue,e.nodeName.toLowerCase())}}function Ai(e,n,t){{if(Nx)return;Nx=!0,d("Expected server HTML to contain a matching <%s> in <%s>.",n,e.nodeName.toLowerCase())}}function Oi(e,n){{if(""===n)// We expect to insert empty text nodes since they're not represented in
|
|
1319
|
+
// the HTML.
|
|
1320
|
+
// TODO: Remove this special case if we can just avoid inserting empty
|
|
1321
|
+
// text nodes.
|
|
1322
|
+
return;if(Nx)return;Nx=!0,d("Expected server HTML to contain a matching text node for \"%s\" in <%s>.",n,e.nodeName.toLowerCase())}}function Mi(e,n,t){return"input"===n?void ie(e,t):"textarea"===n?void Ee(e,t):"select"===n?void ye(e,t):void 0}function Ui(e,n){return!("button"!==e&&"input"!==e&&"select"!==e&&"textarea"!==e)&&!!n.autoFocus}function Fi(e){var n=e.nodeType,t,a;switch(n){case 9:case 11:{t=n===9?"#document":"#fragment";var i=e.documentElement;a=i?i.namespaceURI:Ce(null,"");break}default:{var o=n===8?e.parentNode:e,d=o.namespaceURI||null;t=o.tagName,a=Ce(d,t);break}}{var r=t.toLowerCase(),s=$x(null,r);return{namespace:a,ancestorInfo:s}}}function Bi(e,n,t){{var a=e,i=Ce(a.namespace,n),o=$x(a.ancestorInfo,n);return{namespace:i,ancestorInfo:o}}}function Wi(e){return e}function Vi(e){uv=Pt(),cv=Ha();var n=null;return Rt(!1),n}function ji(e){qa(cv),Rt(uv),uv=null,cv=null}function Hi(e,n,t,a,i){var o;{// TODO: take namespace into account when validating.
|
|
1323
|
+
var d=a;if(Yx(e,null,d.ancestorInfo),"string"==typeof n.children||"number"==typeof n.children){var r=""+n.children,s=$x(d.ancestorInfo,e);Yx(null,r,s)}o=d.namespace}var l=Si(e,n,t,o);return Uo(i,l),Qo(l,n),l}function qi(e,n){e.appendChild(n)}function Qi(e,n,t,a,i){return _i(e,n,t,a),Ui(n,t)}function Ki(e,n,t,a,i,o){{var d=o;if(typeof a.children!=typeof t.children&&("string"==typeof a.children||"number"==typeof a.children)){var r=""+a.children,s=$x(d.ancestorInfo,n);Yx(null,r,s)}}return Ni(e,n,t,a)}function Yi(e,n){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof n.children||"number"==typeof n.children||"object"==typeof n.dangerouslySetInnerHTML&&null!==n.dangerouslySetInnerHTML&&null!=n.dangerouslySetInnerHTML.__html}function $i(e,n,t,a){{var i=t;Yx(null,e,i.ancestorInfo)}var o=Ci(e,n);return Uo(a,o),o}// if a component just imports ReactDOM (e.g. for findDOMNode).
|
|
1324
|
+
// Some environments might not have setTimeout or clearTimeout.
|
|
1325
|
+
// -------------------
|
|
1326
|
+
function Xi(e,n,t,a){Ui(n,t)&&e.focus()}function Gi(e,n,t,a,i,o){// Update the props handle so that we know which props are the ones with
|
|
1327
|
+
// with current event handlers.
|
|
1328
|
+
// Apply the diff to the DOM node.
|
|
1329
|
+
Qo(e,i),Ti(e,n,t,a,i)}function Zi(e){bg(e,"")}function Ji(e,n,t){e.nodeValue=t}function eo(e,n){e.appendChild(n)}function no(e,n){var t;e.nodeType===8?(t=e.parentNode,t.insertBefore(n,e)):(t=e,t.appendChild(n));// This container might be used for a portal.
|
|
1330
|
+
// If something inside a portal is clicked, that click should bubble
|
|
1331
|
+
// through the React tree. However, on Mobile Safari the click would
|
|
1332
|
+
// never bubble through the *DOM* tree unless an ancestor with onclick
|
|
1333
|
+
// event exists. So we wouldn't see it and dispatch it.
|
|
1334
|
+
// This is why we ensure that non React root containers have inline onclick
|
|
1335
|
+
// defined.
|
|
1336
|
+
// https://github.com/facebook/react/issues/11918
|
|
1337
|
+
var a=e._reactRootContainer;(null===a||a===void 0)&&null===t.onclick&&wi(t)}function to(e,n,t){e.insertBefore(n,t)}function ao(e,n,t){e.nodeType===8?e.parentNode.insertBefore(n,t):e.insertBefore(n,t)}function io(e,n){e.removeChild(n)}function oo(e,n){e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)}function ro(e){e=e;var n=e.style;"function"==typeof n.setProperty?n.setProperty("display","none","important"):n.display="none"}function so(e){e.nodeValue=""}function lo(e,n){e=e;var t=n.style,a=t!==void 0&&null!==t&&t.hasOwnProperty("display")?t.display:null;e.style.display=Ne("display",a)}function uo(e,n){e.nodeValue=n}function co(e){if(e.nodeType===1)e.textContent="";else if(e.nodeType===9){var n=e.body;null!=n&&(n.textContent="")}}// -------------------
|
|
1338
|
+
function fo(e,n,t){return 1!==e.nodeType||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e;// This has now been refined to an element node.
|
|
1339
|
+
}function po(e,n){return""===n||3!==e.nodeType?null:e;// This has now been refined to a text node.
|
|
1340
|
+
}function mo(e){return e.data==="$?"}function go(e){return e.data==="$!"}function ho(e){// Skip non-hydratable nodes.
|
|
1341
|
+
for(;null!=e;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break}return e}function bo(e){return ho(e.nextSibling)}function yo(e){return ho(e.firstChild)}function xo(e,n,t,a,i,o){Uo(o,e),Qo(e,t);var d;{var r=i;d=r.namespace}return Pi(e,n,t,d)}function vo(e,n,t){return Uo(t,e),Ii(e,n)}function wo(e){for(var n=e.nextSibling,t=0// Skip past all nodes within this suspense boundary.
|
|
1342
|
+
// There might be nested nodes so we need to keep track of how
|
|
1343
|
+
// deep we are and only break out when we're back on top.
|
|
1344
|
+
;n;){if(n.nodeType===8){var a=n.data;if(a==="/$"){if(0===t)return bo(n);t--}else("$"===a||"$!"===a||"$?"===a)&&t++}n=n.nextSibling}// TODO: Warn, we didn't find the end comment boundary.
|
|
1345
|
+
return null}// Returns the SuspenseInstance if this node is a direct child of a
|
|
1346
|
+
// SuspenseInstance. I.e. if its previous sibling is a Comment with
|
|
1347
|
+
// SUSPENSE_x_START_DATA. Otherwise, null.
|
|
1348
|
+
function ko(e){for(var n=e.previousSibling,t=0// Skip past all nodes within this suspense boundary.
|
|
1349
|
+
// There might be nested nodes so we need to keep track of how
|
|
1350
|
+
// deep we are and only break out when we're back on top.
|
|
1351
|
+
;n;){if(n.nodeType===8){var a=n.data;if(a==="$"||a==="$!"||a==="$?"){if(0===t)return n;t--}else"/$"===a&&t++}n=n.previousSibling}return null}function Eo(e){// Retry if any event replaying was blocked on this.
|
|
1352
|
+
Un(e)}function So(e){// Retry if any event replaying was blocked on this.
|
|
1353
|
+
Un(e)}function Co(e,n,t){Li(n,t)}function _o(e,n,t,a,i){!0!==n[iv]&&Li(a,i)}function No(e,n){if(1===n.nodeType)Di(e,n);else if(8===n.nodeType);else zi(e,n)}function To(e,n,t,a){if(!0!==n[iv])if(1===a.nodeType)Di(t,a);else if(8===a.nodeType);else zi(t,a)}function Ro(e,n,t){Ai(e,n)}function Po(e,n){Oi(e,n)}function Io(e,n,t,a,i){!0!==n[iv]&&Ai(t,a)}function Lo(e,n,t,a){!0!==n[iv]&&Oi(t,a)}function Do(e,n,t){if(!0!==n[iv]);}function zo(e){var n="r:"+(gv++).toString(36);return{toString:function(){return e(),n},valueOf:function(){return e(),n}}}function Ao(e){return null!==e&&"object"==typeof e&&e.$$typeof===Nm}function Oo(e){return{$$typeof:Nm,toString:e,valueOf:e}}function Mo(e){di(e)}function Uo(e,n){n[bv]=e}function Fo(e,n){n[xv]=e}function Bo(e){e[xv]=null}function Wo(e){return!!e[xv]}// Given a DOM node, return the closest HostComponent or HostText fiber ancestor.
|
|
1354
|
+
// If the target node is part of a hydrated or not yet rendered subtree, then
|
|
1355
|
+
// this may also return a SuspenseComponent or HostRoot to indicate that.
|
|
1356
|
+
// Conceptually the HostRoot fiber is a child of the Container node. So if you
|
|
1357
|
+
// pass the Container node as the targetNode, you will not actually get the
|
|
1358
|
+
// HostRoot back. To get to the HostRoot, you need to pass a child of it.
|
|
1359
|
+
// The same thing applies to Suspense boundaries.
|
|
1360
|
+
function Vo(e){var n=e[bv];if(n)// Don't return HostRoot or SuspenseComponent here.
|
|
1361
|
+
return n;// If the direct event target isn't a React owned DOM node, we need to look
|
|
1362
|
+
// to see if one of its parents is a React owned DOM node.
|
|
1363
|
+
for(var t=e.parentNode;t;){if(n=t[xv]||t[bv],n){// Since this wasn't the direct target of the event, we might have
|
|
1364
|
+
// stepped past dehydrated DOM nodes to get here. However they could
|
|
1365
|
+
// also have been non-React nodes. We need to answer which one.
|
|
1366
|
+
// If we the instance doesn't have any children, then there can't be
|
|
1367
|
+
// a nested suspense boundary within it. So we can use this as a fast
|
|
1368
|
+
// bailout. Most of the time, when people add non-React children to
|
|
1369
|
+
// the tree, it is using a ref to a child-less DOM node.
|
|
1370
|
+
// Normally we'd only need to check one of the fibers because if it
|
|
1371
|
+
// has ever gone from having children to deleting them or vice versa
|
|
1372
|
+
// it would have deleted the dehydrated boundary nested inside already.
|
|
1373
|
+
// However, since the HostRoot starts out with an alternate it might
|
|
1374
|
+
// have one on the alternate so we need to check in case this was a
|
|
1375
|
+
// root.
|
|
1376
|
+
var a=n.alternate;if(null!==n.child||null!==a&&null!==a.child)// Next we need to figure out if the node that skipped past is
|
|
1377
|
+
// nested within a dehydrated boundary and if so, which one.
|
|
1378
|
+
for(var i=ko(e),o;null!==i;){if(o=i[bv],o)return o;// If we don't find a Fiber on the comment, it might be because
|
|
1379
|
+
// we haven't gotten to hydrate it yet. There might still be a
|
|
1380
|
+
// parent boundary that hasn't above this one so we need to find
|
|
1381
|
+
// the outer most that is known.
|
|
1382
|
+
i=ko(i)}return n}e=t,t=e.parentNode}return null}/**
|
|
1383
|
+
* Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent
|
|
1384
|
+
* instance, or null if the node was not rendered by this React.
|
|
1385
|
+
*/function jo(e){var n=e[bv]||e[xv];return n?5===n.tag||6===n.tag||13===n.tag||3===n.tag?n:null:null}/**
|
|
1386
|
+
* Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
|
|
1387
|
+
* DOM node.
|
|
1388
|
+
*/function Ho(e){if(e.tag===5||e.tag===6)// In Fiber this, is just the state node right now. We assume it will be
|
|
1389
|
+
// a host component or host text.
|
|
1390
|
+
return e.stateNode;// Without this first invariant, passing a non-DOM-component triggers the next
|
|
1391
|
+
// invariant for a missing parent, which is super confusing.
|
|
1392
|
+
throw Error("getNodeFromInstance: Invalid argument.")}function qo(e){return e[yv]||null}function Qo(e,n){e[yv]=n}function Ko(e){var n=e[vv];return void 0===n&&(n=e[vv]=new Set),n}function Yo(e){if(e){var n=e._owner,t=R(e.type,e._source,n?n.type:null);kv.setExtraStackFrame(t)}else kv.setExtraStackFrame(null)}function $o(e,n,t,a,i){{// $FlowFixMe This is okay but Flow doesn't know it.
|
|
1393
|
+
var o=Function.call.bind(Object.prototype.hasOwnProperty);for(var r in e)if(o(e,r)){var s=void 0;// Prop type validation may throw. In case they do, we don't want to
|
|
1394
|
+
// fail the render phase where it didn't fail before. So we log it.
|
|
1395
|
+
// After these have been cleaned up, we'll let them throw.
|
|
1396
|
+
try{// This is intentionally an invariant that gets caught. It's the same
|
|
1397
|
+
// behavior as without this statement except with a better message.
|
|
1398
|
+
if("function"!=typeof e[r]){var l=Error((a||"React class")+": "+t+" type `"+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[r]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw l.name="Invariant Violation",l}s=e[r](n,r,a,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){s=e}s&&!(s instanceof Error)&&(Yo(i),d("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",a||"React class",t,r,typeof s),Yo(null)),s instanceof Error&&!(s.message in wv)&&(wv[s.message]=!0,Yo(i),d("Failed %s type: %s",t,s.message),Yo(null))}}}function Xo(e){return{current:e}}function Go(e,n){return 0>Cv?void d("Unexpected pop."):void(n!==Sv[Cv]&&d("Unexpected Fiber popped."),e.current=Ev[Cv],Ev[Cv]=null,Sv[Cv]=null,Cv--)}function Zo(e,n,t){Cv++,Ev[Cv]=e.current,Sv[Cv]=t,e.current=n}function Jo(e,n,t){return t&&ad(n)?Pv:Tv.current}function ed(e,n,t){{var a=e.stateNode;a.__reactInternalMemoizedUnmaskedChildContext=n,a.__reactInternalMemoizedMaskedChildContext=t}}function nd(e,n){{var t=e.type,a=t.contextTypes;if(!a)return Nv;// Avoid recreating masked context unless unmasked context has changed.
|
|
1399
|
+
// Failing to do this will result in unnecessary calls to componentWillReceiveProps.
|
|
1400
|
+
// This may trigger infinite loops if componentWillReceiveProps calls setState.
|
|
1401
|
+
var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===n)return i.__reactInternalMemoizedMaskedChildContext;var o={};for(var d in a)o[d]=n[d];{var r=z(t)||"Unknown";$o(a,o,"context",r)}// Cache unmasked context so we can avoid recreating masked context unless necessary.
|
|
1402
|
+
// Context is created before the class component is instantiated so check for instance.
|
|
1403
|
+
return i&&ed(e,n,o),o}}function td(){return Rv.current}function ad(e){{var n=e.childContextTypes;return null!==n&&n!==void 0}}function id(e){Go(Rv,e),Go(Tv,e)}function od(e){Go(Rv,e),Go(Tv,e)}function dd(e,n,t){{if(Tv.current!==Nv)throw Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");Zo(Tv,n,e),Zo(Rv,t,e)}}function rd(e,n,t){{var a=e.stateNode,i=n.childContextTypes;// TODO (bvaughn) Replace this behavior with an invariant() in the future.
|
|
1404
|
+
// It has only been added in Fiber to match the (unintentional) behavior in Stack.
|
|
1405
|
+
if("function"!=typeof a.getChildContext){{var o=z(n)||"Unknown";_v[o]||(_v[o]=!0,d("%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.",o,o))}return t}var r=a.getChildContext();for(var s in r)if(!(s in i))throw Error((z(n)||"Unknown")+".getChildContext(): key \""+s+"\" is not defined in childContextTypes.");{var l=z(n)||"Unknown";$o(i,r,"child context",l)}return lp({},t,r)}}function sd(e){{var n=e.stateNode,t=n&&n.__reactInternalMemoizedMergedChildContext||Nv;// We push the context as early as possible to ensure stack integrity.
|
|
1406
|
+
// If the instance does not exist yet, we will push null at first,
|
|
1407
|
+
// and replace it on the stack later when invalidating the context.
|
|
1408
|
+
return Pv=Tv.current,Zo(Tv,t,e),Zo(Rv,Rv.current,e),!0}}function ld(e,n,t){{var a=e.stateNode;if(!a)throw Error("Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.");if(t){// Merge parent and own context.
|
|
1409
|
+
// Skip this if we're not updating due to sCU.
|
|
1410
|
+
// This avoids unnecessarily recomputing memoized values.
|
|
1411
|
+
var i=rd(e,n,Pv);a.__reactInternalMemoizedMergedChildContext=i,Go(Rv,e),Go(Tv,e),Zo(Tv,i,e),Zo(Rv,t,e)}else Go(Rv,e),Zo(Rv,t,e)}}function ud(e){{// Currently this is only used with renderSubtreeIntoContainer; not sure if it
|
|
1412
|
+
// makes sense elsewhere
|
|
1413
|
+
if(!(gn(e)&&e.tag===1))throw Error("Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.");var n=e;do{switch(n.tag){case 3:return n.stateNode.context;case 1:{var t=n.type;if(ad(t))return n.stateNode.__reactInternalMemoizedMergedChildContext;break}}n=n.return}while(null!==n);throw Error("Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.")}}function cd(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)// No DevTools
|
|
1414
|
+
return!1;var n=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(n.isDisabled)// This isn't a real property on the hook, but it can be set to opt out
|
|
1415
|
+
// of DevTools integration and associated warnings and logs.
|
|
1416
|
+
// https://github.com/facebook/react/issues/3877
|
|
1417
|
+
return!0;if(!n.supportsFiber)// DevTools exists, even though it doesn't support Fiber.
|
|
1418
|
+
return d("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://reactjs.org/link/react-devtools"),!0;try{// We have successfully injected, so now it is safe to set up hooks.
|
|
1419
|
+
zv=n.inject(e),Av=n}catch(e){d("React instrumentation encountered an error: %s.",e)}// DevTools exists
|
|
1420
|
+
return!0}function fd(e,n){if(Av&&"function"==typeof Av.onScheduleFiberRoot)try{Av.onScheduleFiberRoot(zv,e,n)}catch(e){Ov||(Ov=!0,d("React instrumentation encountered an error: %s",e))}}function pd(e,n){if(Av&&"function"==typeof Av.onCommitFiberRoot)try{var t=64===(64&e.current.flags);Av.onCommitFiberRoot(zv,e,n,t)}catch(e){Ov||(Ov=!0,d("React instrumentation encountered an error: %s",e))}}function md(e){if(Av&&"function"==typeof Av.onCommitFiberUnmount)try{Av.onCommitFiberUnmount(zv,e)}catch(e){Ov||(Ov=!0,d("React instrumentation encountered an error: %s",e))}}function gd(){switch(Hv()){case qv:return 99;case Qv:return 98;case Kv:return 97;case Yv:return 96;case $v:return 95;default:throw Error("Unknown priority level.");}}function hd(e){switch(e){case 99:return qv;case 98:return Qv;case 97:return Kv;case 96:return Yv;case 95:return $v;default:throw Error("Unknown priority level.");}}function bd(e,n){var t=hd(e);return Uv(t,n)}function yd(e,n,t){var a=hd(e);return Fv(a,n,t)}function xd(e){return null===ow?(ow=[e],dw=Fv(qv,kd)):ow.push(e),Xv}function vd(e){e!==Xv&&Bv(e)}function wd(){if(null!==dw){var e=dw;dw=null,Bv(e)}kd()}function kd(){if(!rw&&null!==ow){rw=!0;var e=0;try{var n=!0,t=ow;bd(99,function(){for(;e<t.length;e++){var n=t[e];do n=n(!0);while(null!==n)}}),ow=null}catch(n){throw null!==ow&&(ow=ow.slice(e+1)),Fv(qv,wd),n}finally{rw=!1}}}// TODO: this is special because it gets imported during build.
|
|
1421
|
+
function Ed(){return bw.transition}function Sd(e,n){if(e&&e.defaultProps){// Resolve default props. Taken from ReactElement
|
|
1422
|
+
var t=lp({},n),a=e.defaultProps;for(var i in a)void 0===t[i]&&(t[i]=a[i]);return t}return n}// Max 31 bit integer. The max integer size in V8 for 32-bit systems.
|
|
1423
|
+
// Math.pow(2, 30) - 1
|
|
1424
|
+
// 0b111111111111111111111111111111
|
|
1425
|
+
function Cd(){// This is called right before React yields execution, to ensure `readContext`
|
|
1426
|
+
// cannot be called outside the render phase.
|
|
1427
|
+
zw=null,Aw=null,Ow=null,Mw=!1}function _d(){Mw=!0}function Nd(){Mw=!1}function Td(e,n){var t=e.type._context;Zo(Lw,t._currentValue,e),t._currentValue=n,t._currentRenderer!==void 0&&null!==t._currentRenderer&&t._currentRenderer!==Dw&&d("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),t._currentRenderer=Dw}function Rd(e){var n=Lw.current;Go(Lw,e);var t=e.type._context;t._currentValue=n}function Pd(e,n,t){if(bx(t,n))// No change
|
|
1428
|
+
return 0;var a="function"==typeof e._calculateChangedBits?e._calculateChangedBits(t,n):1073741823;return(1073741823&a)!==a&&d("calculateChangedBits: Expected the return value to be a 31-bit integer. Instead received: %s",a),0|a}function Id(e,n){// Update the child lanes of all the ancestors, including the alternates.
|
|
1429
|
+
for(var t=e;null!==t;){var a=t.alternate;if(!mt(t.childLanes,n))t.childLanes=gt(t.childLanes,n),null!==a&&(a.childLanes=gt(a.childLanes,n));else if(null!==a&&!mt(a.childLanes,n))a.childLanes=gt(a.childLanes,n);else// Neither alternate was updated, which means the rest of the
|
|
1430
|
+
// ancestor path already has sufficient priority.
|
|
1431
|
+
break;t=t.return}}function Ld(e,n,t,a){var i=e.child;for(null!==i&&(i.return=e);null!==i;){var o=void 0,d=i.dependencies;// Visit this fiber.
|
|
1432
|
+
if(null!==d){o=i.child;for(var r=d.firstContext;null!==r;){// Check if the context matches.
|
|
1433
|
+
if(r.context===n&&0!=(r.observedBits&t)){// Match! Schedule an update on this fiber.
|
|
1434
|
+
if(i.tag===1){// Schedule a force update on the work-in-progress.
|
|
1435
|
+
var s=Md(-1,ut(a));// TODO: Because we don't have a work-in-progress, this will add the
|
|
1436
|
+
// update to the current fiber, too, which means it will persist even if
|
|
1437
|
+
// this render is thrown away. Since it's a race condition, not sure it's
|
|
1438
|
+
// worth fixing.
|
|
1439
|
+
s.tag=Bw,Ud(i,s)}i.lanes=gt(i.lanes,a);var l=i.alternate;null!==l&&(l.lanes=gt(l.lanes,a)),Id(i.return,a),d.lanes=gt(d.lanes,a);// Since we already found a match, we can stop traversing the
|
|
1440
|
+
// dependency list.
|
|
1441
|
+
break}r=r.next}}else o=10===i.tag?// Don't scan deeper if this is a matching provider
|
|
1442
|
+
i.type===e.type?null:i.child:// Traverse down.
|
|
1443
|
+
i.child;if(null!==o)// Set the return pointer of the child to the work-in-progress fiber.
|
|
1444
|
+
o.return=i;else for(o=i;null!==o;){if(o===e){o=null;break}var u=o.sibling;if(null!==u){u.return=o.return,o=u;break}// No more siblings. Traverse up.
|
|
1445
|
+
o=o.return}i=o}}function Dd(e,n){zw=e,Aw=null,Ow=null;var t=e.dependencies;if(null!==t){var a=t.firstContext;null!==a&&(pt(t.lanes,n)&&zl(),t.firstContext=null)}}function zd(e,n){if(Mw&&d("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."),Ow===e);else if(!1===n||0===n);else{var t;// Avoid deopting on observable arguments or heterogeneous types.
|
|
1446
|
+
"number"!=typeof n||1073741823===n?(Ow=e,t=1073741823):t=n;var a={context:e,observedBits:t,next:null};if(null===Aw){if(null===zw)throw Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");// This is the first dependency for this component. Create a new list.
|
|
1447
|
+
Aw=a,zw.dependencies={lanes:0,firstContext:a,responders:null}}else// Append a new context item.
|
|
1448
|
+
Aw=Aw.next=a}return e._currentValue}function Ad(e){var n={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null};e.updateQueue=n}function Od(e,n){// Clone the update queue from current. Unless it's already a clone.
|
|
1449
|
+
var t=n.updateQueue,a=e.updateQueue;if(t===a){var i={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects};n.updateQueue=i}}function Md(e,n){var t={eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null};return t}function Ud(e,n){var t=e.updateQueue;if(null!==t)// Only occurs if the fiber has been unmounted.
|
|
1450
|
+
{var a=t.shared,i=a.pending;null===i?n.next=n:(n.next=i.next,i.next=n),a.pending=n,Hw!==a||jw||(d("An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback."),jw=!0)}}function Fd(e,n){// Captured updates are updates that are thrown by a child during the render
|
|
1451
|
+
// phase. They should be discarded if the render is aborted. Therefore,
|
|
1452
|
+
// we should only put them on the work-in-progress queue, not the current one.
|
|
1453
|
+
var t=e.updateQueue,a=e.alternate;// Check if the work-in-progress queue is a clone.
|
|
1454
|
+
if(null!==a){var i=a.updateQueue;if(t===i){// The work-in-progress queue is the same as current. This happens when
|
|
1455
|
+
// we bail out on a parent fiber that then captures an error thrown by
|
|
1456
|
+
// a child. Since we want to append the update only to the work-in
|
|
1457
|
+
// -progress queue, we need to clone the updates. We usually clone during
|
|
1458
|
+
// processUpdateQueue, but that didn't happen in this case because we
|
|
1459
|
+
// skipped over the parent when we bailed out.
|
|
1460
|
+
var o=null,d=null,r=t.firstBaseUpdate;if(null!==r){// Loop through the updates and clone them.
|
|
1461
|
+
var s=r;do{var l={eventTime:s.eventTime,lane:s.lane,tag:s.tag,payload:s.payload,callback:s.callback,next:null};null===d?o=d=l:(d.next=l,d=l),s=s.next}while(null!==s);// Append the captured update the end of the cloned list.
|
|
1462
|
+
null===d?o=d=n:(d.next=n,d=n)}else// There are no base updates.
|
|
1463
|
+
o=d=n;return t={baseState:i.baseState,firstBaseUpdate:o,lastBaseUpdate:d,shared:i.shared,effects:i.effects},void(e.updateQueue=t)}}// Append the update to the end of the list.
|
|
1464
|
+
var u=t.lastBaseUpdate;null===u?t.firstBaseUpdate=n:u.next=n,t.lastBaseUpdate=n}function Bd(e,n,t,a,i,o){switch(t.tag){case 1:{var d=t.payload;if("function"==typeof d){_d();var r=d.call(o,a,i);{if(e.mode&1){k();try{d.call(o,a,i)}finally{E()}}Nd()}return r}// State object
|
|
1465
|
+
return d}case 3:e.flags=e.flags&-4097|64;// Intentional fallthrough
|
|
1466
|
+
case 0:{var s=t.payload,l;if("function"==typeof s){_d(),l=s.call(o,a,i);{if(e.mode&1){k();try{s.call(o,a,i)}finally{E()}}Nd()}}else// Partial state object
|
|
1467
|
+
l=s;return null===l||void 0===l?a:lp({},a,l);// Merge the partial state and the previous state.
|
|
1468
|
+
}case 2:return Vw=!0,a;}return a}function Wd(e,n,t,a){// This is always non-null on a ClassComponent or HostRoot
|
|
1469
|
+
var i=e.updateQueue;Vw=!1,Hw=i.shared;var o=i.firstBaseUpdate,d=i.lastBaseUpdate,r=i.shared.pending;if(null!==r){i.shared.pending=null;// The pending queue is circular. Disconnect the pointer between first
|
|
1470
|
+
// and last so that it's non-circular.
|
|
1471
|
+
var s=r,l=s.next;s.next=null,null===d?o=l:d.next=l,d=s;// If there's a current queue, and it's different from the base queue, then
|
|
1472
|
+
// we need to transfer the updates to that queue, too. Because the base
|
|
1473
|
+
// queue is a singly-linked list with no cycles, we can append to both
|
|
1474
|
+
// lists and take advantage of structural sharing.
|
|
1475
|
+
// TODO: Pass `current` as argument
|
|
1476
|
+
var u=e.alternate;if(null!==u){// This is always non-null on a ClassComponent or HostRoot
|
|
1477
|
+
var c=u.updateQueue,f=c.lastBaseUpdate;f!==d&&(null===f?c.firstBaseUpdate=l:f.next=l,c.lastBaseUpdate=s)}}// These values may change as we process the queue.
|
|
1478
|
+
if(null!==o){// Iterate through the list of updates to compute the result.
|
|
1479
|
+
var p=i.baseState,m=0,g=null,h=null,b=null,y=o;// TODO: Don't need to accumulate this. Instead, we can remove renderLanes
|
|
1480
|
+
// from the original lanes.
|
|
1481
|
+
do{var x=y.lane,v=y.eventTime;if(!mt(a,x)){// Priority is insufficient. Skip this update. If this is the first
|
|
1482
|
+
// skipped update, the previous update/state is the new base
|
|
1483
|
+
// update/state.
|
|
1484
|
+
var w={eventTime:v,lane:x,tag:y.tag,payload:y.payload,callback:y.callback,next:null};null===b?(h=b=w,g=p):b=b.next=w,m=gt(m,x)}else{// This update does have sufficient priority.
|
|
1485
|
+
if(null!==b){var k={eventTime:v,// This update is going to be committed so we never want uncommit
|
|
1486
|
+
// it. Using NoLane works because 0 is a subset of all bitmasks, so
|
|
1487
|
+
// this will never be skipped by the check above.
|
|
1488
|
+
lane:0,tag:y.tag,payload:y.payload,callback:y.callback,next:null};b=b.next=k}// Process this update.
|
|
1489
|
+
p=Bd(e,i,y,p,n,t);var E=y.callback;if(null!==E){e.flags|=32;var S=i.effects;null===S?i.effects=[y]:S.push(y)}}if(y=y.next,null===y)if(r=i.shared.pending,null===r)break;else{// An update was scheduled from inside a reducer. Add the new
|
|
1490
|
+
// pending updates to the end of the list and keep processing.
|
|
1491
|
+
var C=r,_=C.next;// Intentionally unsound. Pending updates form a circular list, but we
|
|
1492
|
+
// unravel them when transferring them to the base queue.
|
|
1493
|
+
C.next=null,y=_,i.lastBaseUpdate=C,i.shared.pending=null}}while(!0);null===b&&(g=p),i.baseState=g,i.firstBaseUpdate=h,i.lastBaseUpdate=b,nc(m),e.lanes=m,e.memoizedState=p}Hw=null}function Vd(e,n){if("function"!=typeof e)throw Error("Invalid argument passed as callback. Expected a function. Instead received: "+e);e.call(n)}function jd(){Vw=!1}function Hd(){return Vw}function qd(e,n,t){// Commit the effects
|
|
1494
|
+
var a=n.effects;if(n.effects=null,null!==a)for(var o=0;o<a.length;o++){var d=a[o],r=d.callback;null!==r&&(d.callback=null,Vd(r,t))}}function Qd(e,n,t,a){var i=e.memoizedState;if(1&e.mode){k();try{t(a,i)}finally{E()}}var o=t(a,i);Jw(n,o);// Merge the partial state and the previous state.
|
|
1495
|
+
var d=null===o||void 0===o?i:lp({},i,o);// Once the update queue is empty, persist the derived state onto the
|
|
1496
|
+
// base state.
|
|
1497
|
+
if(e.memoizedState=d,0===e.lanes){// Queue is always non-null for classes
|
|
1498
|
+
var r=e.updateQueue;r.baseState=d}}function Kd(e,n,t,a,o,r,s){var l=e.stateNode;if("function"==typeof l.shouldComponentUpdate){if(1&e.mode){k();try{l.shouldComponentUpdate(a,r,s)}finally{E()}}var u=l.shouldComponentUpdate(a,r,s);return void 0===u&&d("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",z(n)||"Component"),u}return!(n.prototype&&n.prototype.isPureReactComponent)||!i(t,a)||!i(o,r)}function Yd(e,n,t){var a=e.stateNode;{var i=z(n)||"Component",o=a.render;o||(n.prototype&&"function"==typeof n.prototype.render?d("%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?",i):d("%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",i)),!a.getInitialState||a.getInitialState.isReactClassApproved||a.state||d("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",i),a.getDefaultProps&&!a.getDefaultProps.isReactClassApproved&&d("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",i),a.propTypes&&d("propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",i),a.contextType&&d("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",i),a.contextTypes&&d("contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",i),n.contextType&&n.contextTypes&&!tk.has(n)&&(tk.add(n),d("%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.",i)),"function"==typeof a.componentShouldUpdate&&d("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",i),n.prototype&&n.prototype.isPureReactComponent&&"undefined"!=typeof a.shouldComponentUpdate&&d("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",z(n)||"A pure component"),"function"==typeof a.componentDidUnmount&&d("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",i),"function"==typeof a.componentDidReceiveProps&&d("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",i),"function"==typeof a.componentWillRecieveProps&&d("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",i),"function"==typeof a.UNSAFE_componentWillRecieveProps&&d("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",i);var r=a.props!==t;a.props!==void 0&&r&&d("%s(...): When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",i,i),a.defaultProps&&d("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",i,i),"function"!=typeof a.getSnapshotBeforeUpdate||"function"==typeof a.componentDidUpdate||Xw.has(n)||(Xw.add(n),d("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",z(n))),"function"==typeof a.getDerivedStateFromProps&&d("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",i),"function"==typeof a.getDerivedStateFromError&&d("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",i),"function"==typeof n.getSnapshotBeforeUpdate&&d("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",i);var s=a.state;s&&("object"!=typeof s||Qw(s))&&d("%s.state: must be set to an object or null",i),"function"==typeof a.getChildContext&&"object"!=typeof n.childContextTypes&&d("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",i)}}function $d(e,n){// The instance needs access to the fiber so that it can schedule updates
|
|
1499
|
+
n.updater=ok,e.stateNode=n,cn(n,e),n._reactInternalInstance=qw}function Xd(e,n,t){var a=!1,i=Nv,o=Nv,r=n.contextType;if("contextType"in n){var s=// Allow null for conditional declaration
|
|
1500
|
+
null===r||void 0!==r&&r.$$typeof===xm&&void 0===r._context;// Not a <Context.Consumer>
|
|
1501
|
+
if(!s&&!ak.has(n)){ak.add(n);var l="";l=void 0===r?" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.":"object"==typeof r?r.$$typeof===ym?" Did you accidentally pass the Context.Provider instead?":void 0===r._context?" However, it is set to an object with keys {"+Object.keys(r).join(", ")+"}.":" Did you accidentally pass the Context.Consumer instead?":" However, it is set to a "+typeof r+".",d("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",z(n)||"Component",l)}}if("object"==typeof r&&null!==r)o=zd(r);else{i=Jo(e,n,!0);var u=n.contextTypes;a=null!==u&&void 0!==u,o=a?nd(e,i):Nv}// Instantiate twice to help detect side-effects.
|
|
1502
|
+
if(1&e.mode){k();try{new n(t,o)}finally{E()}}var c=new n(t,o),f=e.memoizedState=null!==c.state&&void 0!==c.state?c.state:null;$d(e,c);{if("function"==typeof n.getDerivedStateFromProps&&null===f){var p=z(n)||"Component";$w.has(p)||($w.add(p),d("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",p,null===c.state?"null":"undefined",p))}// If new component APIs are defined, "unsafe" lifecycles won't be called.
|
|
1503
|
+
// Warn about these lifecycles if they are present.
|
|
1504
|
+
// Don't warn about react-lifecycles-compat polyfilled methods though.
|
|
1505
|
+
if("function"==typeof n.getDerivedStateFromProps||"function"==typeof c.getSnapshotBeforeUpdate){var m=null,g=null,h=null;if("function"==typeof c.componentWillMount&&!0!==c.componentWillMount.__suppressDeprecationWarning?m="componentWillMount":"function"==typeof c.UNSAFE_componentWillMount&&(m="UNSAFE_componentWillMount"),"function"==typeof c.componentWillReceiveProps&&!0!==c.componentWillReceiveProps.__suppressDeprecationWarning?g="componentWillReceiveProps":"function"==typeof c.UNSAFE_componentWillReceiveProps&&(g="UNSAFE_componentWillReceiveProps"),"function"==typeof c.componentWillUpdate&&!0!==c.componentWillUpdate.__suppressDeprecationWarning?h="componentWillUpdate":"function"==typeof c.UNSAFE_componentWillUpdate&&(h="UNSAFE_componentWillUpdate"),null!==m||null!==g||null!==h){var b=z(n)||"Component",y="function"==typeof n.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";Gw.has(b)||(Gw.add(b),d("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://reactjs.org/link/unsafe-component-lifecycles",b,y,null===m?"":"\n "+m,null===g?"":"\n "+g,null===h?"":"\n "+h))}}}// Cache unmasked context so we can avoid recreating masked context unless necessary.
|
|
1506
|
+
// ReactFiberContext usually updates this cache but can't for newly-created instances.
|
|
1507
|
+
return a&&ed(e,i,o),c}function Gd(e,n){var t=n.state;"function"==typeof n.componentWillMount&&n.componentWillMount(),"function"==typeof n.UNSAFE_componentWillMount&&n.UNSAFE_componentWillMount(),t!==n.state&&(d("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",z(e.type)||"Component"),ok.enqueueReplaceState(n,n.state,null))}function Zd(e,n,t,a){var i=n.state;if("function"==typeof n.componentWillReceiveProps&&n.componentWillReceiveProps(t,a),"function"==typeof n.UNSAFE_componentWillReceiveProps&&n.UNSAFE_componentWillReceiveProps(t,a),n.state!==i){{var o=z(e.type)||"Component";Yw.has(o)||(Yw.add(o),d("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",o))}ok.enqueueReplaceState(n,n.state,null)}}// Invokes the mount life-cycles on a previously never rendered instance.
|
|
1508
|
+
function Jd(e,n,t,a){Yd(e,n,t);var i=e.stateNode;i.props=t,i.state=e.memoizedState,i.refs=Kw,Ad(e);var o=n.contextType;if("object"==typeof o&&null!==o)i.context=zd(o);else{var r=Jo(e,n,!0);i.context=nd(e,r)}{if(i.state===t){var s=z(n)||"Component";nk.has(s)||(nk.add(s),d("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",s))}e.mode&1&&xw.recordLegacyContextWarning(e,i),xw.recordUnsafeLifecycleWarnings(e,i)}Wd(e,t,i,a),i.state=e.memoizedState;var l=n.getDerivedStateFromProps;"function"==typeof l&&(Qd(e,n,l,t),i.state=e.memoizedState),"function"!=typeof n.getDerivedStateFromProps&&"function"!=typeof i.getSnapshotBeforeUpdate&&("function"==typeof i.UNSAFE_componentWillMount||"function"==typeof i.componentWillMount)&&(Gd(e,i),Wd(e,t,i,a),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4)}function er(e,n,t,a){var i=e.stateNode,o=e.memoizedProps;i.props=o;var d=i.context,r=n.contextType,s=Nv;if("object"==typeof r&&null!==r)s=zd(r);else{var l=Jo(e,n,!0);s=nd(e,l)}var u=n.getDerivedStateFromProps,c="function"==typeof u||"function"==typeof i.getSnapshotBeforeUpdate;c||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||o===t&&d===s||Zd(e,i,t,s),jd();var f=e.memoizedState,p=i.state=f;if(Wd(e,t,i,a),p=e.memoizedState,o===t&&f===p&&!td()&&!Hd())return"function"==typeof i.componentDidMount&&(e.flags|=4),!1;"function"==typeof u&&(Qd(e,n,u,t),p=e.memoizedState);var m=Hd()||Kd(e,n,o,t,f,p,s);return m?(!c&&("function"==typeof i.UNSAFE_componentWillMount||"function"==typeof i.componentWillMount)&&("function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"==typeof i.componentDidMount&&(e.flags|=4)):("function"==typeof i.componentDidMount&&(e.flags|=4),e.memoizedProps=t,e.memoizedState=p),i.props=t,i.state=p,i.context=s,m}// Invokes the update life-cycles and returns false if it shouldn't rerender.
|
|
1509
|
+
function nr(e,n,t,a,i){var o=n.stateNode;Od(e,n);var d=n.memoizedProps,r=n.type===n.elementType?d:Sd(n.type,d);o.props=r;var s=n.pendingProps,l=o.context,u=t.contextType,c=Nv;if("object"==typeof u&&null!==u)c=zd(u);else{var f=Jo(n,t,!0);c=nd(n,f)}var p=t.getDerivedStateFromProps,m="function"==typeof p||"function"==typeof o.getSnapshotBeforeUpdate;m||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||d===s&&l===c||Zd(n,o,a,c),jd();var g=n.memoizedState,h=o.state=g;if(Wd(n,a,o,i),h=n.memoizedState,d===s&&g===h&&!td()&&!Hd())return"function"==typeof o.componentDidUpdate&&(d!==e.memoizedProps||g!==e.memoizedState)&&(n.flags|=4),"function"==typeof o.getSnapshotBeforeUpdate&&(d!==e.memoizedProps||g!==e.memoizedState)&&(n.flags|=256),!1;"function"==typeof p&&(Qd(n,t,p,a),h=n.memoizedState);var b=Hd()||Kd(n,t,r,a,g,h,c);return b?(!m&&("function"==typeof o.UNSAFE_componentWillUpdate||"function"==typeof o.componentWillUpdate)&&("function"==typeof o.componentWillUpdate&&o.componentWillUpdate(a,h,c),"function"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(a,h,c)),"function"==typeof o.componentDidUpdate&&(n.flags|=4),"function"==typeof o.getSnapshotBeforeUpdate&&(n.flags|=256)):("function"==typeof o.componentDidUpdate&&(d!==e.memoizedProps||g!==e.memoizedState)&&(n.flags|=4),"function"==typeof o.getSnapshotBeforeUpdate&&(d!==e.memoizedProps||g!==e.memoizedState)&&(n.flags|=256),n.memoizedProps=a,n.memoizedState=h),o.props=a,o.state=h,o.context=c,b}function tr(e,n,t){var a=t.ref;if(null!==a&&"function"!=typeof a&&"object"!=typeof a){// TODO: Clean this up once we turn on the string ref warning for
|
|
1510
|
+
// everyone, because the strict mode case will no longer be relevant
|
|
1511
|
+
if((1&e.mode||!1)&&// We warn in ReactElement.js if owner and self are equal for string refs
|
|
1512
|
+
// because these cannot be automatically converted to an arrow function
|
|
1513
|
+
// using a codemod. Therefore, we don't have to warn about string refs again.
|
|
1514
|
+
!(t._owner&&t._self&&t._owner.stateNode!==t._self)){var i=z(e.type)||"Component";lk[i]||(d("A string ref, \"%s\", has been found within a strict mode tree. String refs are a source of potential bugs and should be avoided. We recommend using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref",a),lk[i]=!0)}if(t._owner){var o=t._owner,r;if(o){var s=o;if(1!==s.tag)throw Error("Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref");r=s.stateNode}if(!r)throw Error("Missing owner for string ref "+a+". This error is likely caused by a bug in React. Please file an issue.");var l=""+a;// Check if previous string ref matches new string ref
|
|
1515
|
+
if(null!==n&&null!==n.ref&&"function"==typeof n.ref&&n.ref._stringRef===l)return n.ref;var u=function(e){var n=r.refs;n===Kw&&(n=r.refs={}),null===e?delete n[l]:n[l]=e};return u._stringRef=l,u}if("string"!=typeof a)throw Error("Expected ref to be a function, a string, an object returned by React.createRef(), or null.");if(!t._owner)throw Error("Element ref was specified as a string ("+a+") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://reactjs.org/link/refs-must-have-owner for more information.")}return a}function ar(e,n){if("textarea"!==e.type)throw Error("Objects are not valid as a React child (found: "+("[object Object]"===Object.prototype.toString.call(n)?"object with keys {"+Object.keys(n).join(", ")+"}":n)+"). If you meant to render a collection of children, use an array instead.")}function ir(e){{var n=z(e.type)||"Component";if(ck[n])return;ck[n]=!0,d("Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.")}}// We avoid inlining this to avoid potential deopts from using try/catch.
|
|
1516
|
+
// to be able to optimize each path individually by branching early. This needs
|
|
1517
|
+
// a compiler or we can do it manually. Helpers that don't need this branching
|
|
1518
|
+
// live outside of this function.
|
|
1519
|
+
function or(e){function n(n,t){if(e)// Noop.
|
|
1520
|
+
{// Deletions are added in reversed order so we add it to the front.
|
|
1521
|
+
// At this point, the return fiber's effect list is empty except for
|
|
1522
|
+
// deletions, so we can just append the deletion to the list. The remaining
|
|
1523
|
+
// effects aren't added until the complete phase. Once we implement
|
|
1524
|
+
// resuming, this may not be true.
|
|
1525
|
+
var a=n.lastEffect;null===a?n.firstEffect=n.lastEffect=t:(a.nextEffect=t,n.lastEffect=t),t.nextEffect=null,t.flags=8}}function t(t,a){if(!e)// Noop.
|
|
1526
|
+
return null;// TODO: For the shouldClone case, this could be micro-optimized a bit by
|
|
1527
|
+
// assuming that after the first child we've already added everything.
|
|
1528
|
+
for(var i=a;null!==i;)n(t,i),i=i.sibling;return null}function a(e,n){// Add the remaining children to a temporary map so that we can find them by
|
|
1529
|
+
// keys quickly. Implicit (null) keys get added to this set with their index
|
|
1530
|
+
// instead.
|
|
1531
|
+
for(var t=new Map,a=n;null!==a;)null===a.key?t.set(a.index,a):t.set(a.key,a),a=a.sibling;return t}function i(e,n){// We currently set sibling to null and index to 0 here because it is easy
|
|
1532
|
+
// to forget to do before returning it. E.g. for the single child case.
|
|
1533
|
+
var t=lf(e,n);return t.index=0,t.sibling=null,t}function o(n,t,a){if(n.index=a,!e)// Noop.
|
|
1534
|
+
return t;var i=n.alternate;if(null!==i){var o=i.index;return o<t?(n.flags=2,t):o}return n.flags=2,t}function r(n){return e&&null===n.alternate&&(n.flags=2),n}function s(e,n,t,a){if(null===n||6!==n.tag){// Insert
|
|
1535
|
+
var o=vf(t,e.mode,a);return o.return=e,o}// Update
|
|
1536
|
+
var d=i(n,t);return d.return=e,d}function l(e,n,t,a){if(null!==n&&(n.elementType===t.type||// Keep this check inline so it only runs on the false path:
|
|
1537
|
+
Zc(n,t))){// Move based on index
|
|
1538
|
+
var o=i(n,t.props);return o.ref=tr(e,n,t),o.return=e,o._debugSource=t._source,o._debugOwner=t._owner,o}// Insert
|
|
1539
|
+
var d=pf(t,e.mode,a);return d.ref=tr(e,n,t),d.return=e,d}function u(e,n,t,a){if(null===n||4!==n.tag||n.stateNode.containerInfo!==t.containerInfo||n.stateNode.implementation!==t.implementation){// Insert
|
|
1540
|
+
var o=kf(t,e.mode,a);return o.return=e,o}// Update
|
|
1541
|
+
var d=i(n,t.children||[]);return d.return=e,d}function c(e,n,t,a,o){if(null===n||7!==n.tag){// Insert
|
|
1542
|
+
var d=mf(t,e.mode,a,o);return d.return=e,d}// Update
|
|
1543
|
+
var r=i(n,t);return r.return=e,r}function f(e,n,t){if("string"==typeof n||"number"==typeof n){// Text nodes don't have keys. If the previous node is implicitly keyed
|
|
1544
|
+
// we can continue to replace it without aborting even if it is not a text
|
|
1545
|
+
// node.
|
|
1546
|
+
var a=vf(""+n,e.mode,t);return a.return=e,a}if("object"==typeof n&&null!==n){switch(n.$$typeof){case pm:{var i=pf(n,e.mode,t);return i.ref=tr(e,null,n),i.return=e,i}case mm:{var o=kf(n,e.mode,t);return o.return=e,o}}if(fk(n)||v(n)){var d=mf(n,e.mode,t,null);return d.return=e,d}ar(e,n)}return"function"==typeof n&&ir(e),null}function p(e,n,t,a){// Update the fiber if the keys match, otherwise return null.
|
|
1547
|
+
var i=null===n?null:n.key;if("string"==typeof t||"number"==typeof t)// Text nodes don't have keys. If the previous node is implicitly keyed
|
|
1548
|
+
// we can continue to replace it without aborting even if it is not a text
|
|
1549
|
+
// node.
|
|
1550
|
+
return null===i?s(e,n,""+t,a):null;if("object"==typeof t&&null!==t){switch(t.$$typeof){case pm:return t.key===i?t.type===gm?c(e,n,t.props.children,a,i):l(e,n,t,a):null;case mm:return t.key===i?u(e,n,t,a):null;}if(fk(t)||v(t))return null===i?c(e,n,t,a,null):null;ar(e,t)}return"function"==typeof t&&ir(e),null}function m(e,n,t,a,i){if("string"==typeof a||"number"==typeof a){// Text nodes don't have keys, so we neither have to check the old nor
|
|
1551
|
+
// new node for the key. If both are text nodes, they match.
|
|
1552
|
+
var o=e.get(t)||null;return s(n,o,""+a,i)}if("object"==typeof a&&null!==a){switch(a.$$typeof){case pm:{var d=e.get(null===a.key?t:a.key)||null;return a.type===gm?c(n,d,a.props.children,i,a.key):l(n,d,a,i)}case mm:{var r=e.get(null===a.key?t:a.key)||null;return u(n,r,a,i)}}if(fk(a)||v(a)){var f=e.get(t)||null;return c(n,f,a,i,null)}ar(n,a)}return"function"==typeof a&&ir(n),null}/**
|
|
1553
|
+
* Warns if there is a duplicate or missing key
|
|
1554
|
+
*/function g(e,n,t){{if("object"!=typeof e||null===e)return n;switch(e.$$typeof){case pm:case mm:dk(e,t);var a=e.key;if("string"!=typeof a)break;if(null===n){n=new Set,n.add(a);break}if(!n.has(a)){n.add(a);break}d("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted \u2014 the behavior is unsupported and could change in a future version.",a);}}return n}function h(d,r,s,l){// First, validate keys.
|
|
1555
|
+
// This algorithm can't optimize by searching from both ends since we
|
|
1556
|
+
// don't have backpointers on fibers. I'm trying to see how far we can get
|
|
1557
|
+
// with that model. If it ends up not being worth the tradeoffs, we can
|
|
1558
|
+
// add it later.
|
|
1559
|
+
// Even with a two ended optimization, we'd want to optimize for the case
|
|
1560
|
+
// where there are few changes and brute force the comparison instead of
|
|
1561
|
+
// going for the Map. It'd like to explore hitting that path first in
|
|
1562
|
+
// forward-only mode and only go for the Map once we notice that we need
|
|
1563
|
+
// lots of look ahead. This doesn't handle reversal as well as two ended
|
|
1564
|
+
// search but that's unusual. Besides, for the two ended optimization to
|
|
1565
|
+
// work on Iterables, we'd need to copy the whole set.
|
|
1566
|
+
// In this first iteration, we'll just live with hitting the bad case
|
|
1567
|
+
// (adding everything to a Map) in for every insert/move.
|
|
1568
|
+
// If you change this code, also update reconcileChildrenIterator() which
|
|
1569
|
+
// uses the same algorithm.
|
|
1570
|
+
for(var u=null,c=0,h;c<s.length;c++)h=s[c],u=g(h,u,d);for(var b=null,y=null,x=r,v=0,w=0,k=null;null!==x&&w<s.length;w++){x.index>w?(k=x,x=null):k=x.sibling;var E=p(d,x,s[w],l);if(null===E){null===x&&(x=k);break}e&&x&&null===E.alternate&&n(d,x),v=o(E,v,w),null===y?b=E:y.sibling=E,y=E,x=k}if(w===s.length)return t(d,x),b;if(null===x){// If we don't have any more existing children we can choose a fast path
|
|
1571
|
+
// since the rest will all be insertions.
|
|
1572
|
+
for(;w<s.length;w++){var S=f(d,s[w],l);null!==S&&(v=o(S,v,w),null===y?b=S:y.sibling=S,y=S)}return b}// Add all children to a key map for quick lookups.
|
|
1573
|
+
// Keep scanning and use the map to restore deleted items as moves.
|
|
1574
|
+
for(var C=a(d,x),_;w<s.length;w++)_=m(C,d,w,s[w],l),null!==_&&(e&&null!==_.alternate&&C.delete(null===_.key?w:_.key),v=o(_,v,w),null===y?b=_:y.sibling=_,y=_);return e&&C.forEach(function(e){return n(d,e)}),b}function b(i,r,s,l){// This is the same implementation as reconcileChildrenArray(),
|
|
1575
|
+
// but using the iterator instead.
|
|
1576
|
+
var u=v(s);if("function"!=typeof u)throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");{"function"==typeof Symbol&&// $FlowFixMe Flow doesn't know about toStringTag
|
|
1577
|
+
"Generator"===s[Symbol.toStringTag]&&(!sk&&d("Using Generators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. Keep in mind you might need to polyfill these features for older browsers."),sk=!0),s.entries===u&&(!rk&&d("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),rk=!0);// First, validate keys.
|
|
1578
|
+
// We'll get a different iterator later for the main pass.
|
|
1579
|
+
var c=u.call(s);if(c)for(var h=null,b=c.next(),y;!b.done;b=c.next())y=b.value,h=g(y,h,i)}var x=u.call(s);if(null==x)throw Error("An iterable object provided no iterator.");for(var w=null,k=null,E=r,S=0,C=0,_=null,N=x.next();null!==E&&!N.done;C++,N=x.next()){E.index>C?(_=E,E=null):_=E.sibling;var T=p(i,E,N.value,l);if(null===T){null===E&&(E=_);break}e&&E&&null===T.alternate&&n(i,E),S=o(T,S,C),null===k?w=T:k.sibling=T,k=T,E=_}if(N.done)return t(i,E),w;if(null===E){// If we don't have any more existing children we can choose a fast path
|
|
1580
|
+
// since the rest will all be insertions.
|
|
1581
|
+
for(;!N.done;C++,N=x.next()){var R=f(i,N.value,l);null!==R&&(S=o(R,S,C),null===k?w=R:k.sibling=R,k=R)}return w}// Add all children to a key map for quick lookups.
|
|
1582
|
+
// Keep scanning and use the map to restore deleted items as moves.
|
|
1583
|
+
for(var P=a(i,E),I;!N.done;C++,N=x.next())I=m(P,i,C,N.value,l),null!==I&&(e&&null!==I.alternate&&P.delete(null===I.key?C:I.key),S=o(I,S,C),null===k?w=I:k.sibling=I,k=I);return e&&P.forEach(function(e){return n(i,e)}),w}function y(e,n,a,o){// There's no need to check for keys on text nodes since we don't have a
|
|
1584
|
+
// way to define them.
|
|
1585
|
+
if(null!==n&&6===n.tag){t(e,n.sibling);var d=i(n,a);return d.return=e,d}// The existing first child is not a text node so we need to create one
|
|
1586
|
+
// and delete the existing ones.
|
|
1587
|
+
t(e,n);var r=vf(a,e.mode,o);return r.return=e,r}function x(e,a,o,d){for(var r=o.key,s=a;null!==s;){// TODO: If key === null and child.key === null, then this only applies to
|
|
1588
|
+
// the first item in the list.
|
|
1589
|
+
if(s.key===r){switch(s.tag){case 7:{if(o.type===gm){t(e,s.sibling);var l=i(s,o.props.children);return l.return=e,l._debugSource=o._source,l._debugOwner=o._owner,l}break}case 22:// We intentionally fallthrough here if enableBlocksAPI is not on.
|
|
1590
|
+
// eslint-disable-next-lined no-fallthrough
|
|
1591
|
+
default:{if(s.elementType===o.type||// Keep this check inline so it only runs on the false path:
|
|
1592
|
+
Zc(s,o)){t(e,s.sibling);var u=i(s,o.props);return u.ref=tr(e,s,o),u.return=e,u._debugSource=o._source,u._debugOwner=o._owner,u}break}}// Didn't match.
|
|
1593
|
+
t(e,s);break}else n(e,s);s=s.sibling}if(o.type===gm){var c=mf(o.props.children,e.mode,d,o.key);return c.return=e,c}var f=pf(o,e.mode,d);return f.ref=tr(e,a,o),f.return=e,f}function w(e,a,o,d){for(var r=o.key,s=a;null!==s;){// TODO: If key === null and child.key === null, then this only applies to
|
|
1594
|
+
// the first item in the list.
|
|
1595
|
+
if(s.key===r){if(4===s.tag&&s.stateNode.containerInfo===o.containerInfo&&s.stateNode.implementation===o.implementation){t(e,s.sibling);var l=i(s,o.children||[]);return l.return=e,l}t(e,s);break}else n(e,s);s=s.sibling}var u=kf(o,e.mode,d);return u.return=e,u}// This API will tag the children with the side-effect of the reconciliation
|
|
1596
|
+
// itself. They will be added to the side-effect list as we pass through the
|
|
1597
|
+
// children and the parent.
|
|
1598
|
+
function k(e,n,a,i){// This function is not recursive.
|
|
1599
|
+
// If the top level item is an array, we treat it as a set of children,
|
|
1600
|
+
// not as a fragment. Nested arrays on the other hand will be treated as
|
|
1601
|
+
// fragment nodes. Recursion happens at the normal flow.
|
|
1602
|
+
// Handle top level unkeyed fragments as if they were arrays.
|
|
1603
|
+
// This leads to an ambiguity between <>{[...]}</> and <>...</>.
|
|
1604
|
+
// We treat the ambiguous cases above the same.
|
|
1605
|
+
var o="object"==typeof a&&null!==a&&a.type===gm&&null===a.key;o&&(a=a.props.children);// Handle object types
|
|
1606
|
+
var d="object"==typeof a&&null!==a;if(d)switch(a.$$typeof){case pm:return r(x(e,n,a,i));case mm:return r(w(e,n,a,i));}if("string"==typeof a||"number"==typeof a)return r(y(e,n,""+a,i));if(fk(a))return h(e,n,a,i);if(v(a))return b(e,n,a,i);if(d&&ar(e,a),"function"==typeof a&&ir(e),"undefined"==typeof a&&!o)// If the new child is undefined, and the return fiber is a composite
|
|
1607
|
+
// component, throw an error. If Fiber return types are disabled,
|
|
1608
|
+
// we already threw above.
|
|
1609
|
+
switch(e.tag){case 1:{var s=e.stateNode;if(s.render._isMockFunction)// We allow auto-mocks to proceed as if they're returning null.
|
|
1610
|
+
break}// Intentionally fall through to the next case, which handles both
|
|
1611
|
+
// functions and classes
|
|
1612
|
+
// eslint-disable-next-lined no-fallthrough
|
|
1613
|
+
case 22:case 0:case 11:case 15:throw Error((z(e.type)||"Component")+"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.");}// Remaining cases are all treated as empty.
|
|
1614
|
+
return t(e,n)}return k}function dr(e,n){if(null!==e&&n.child!==e.child)throw Error("Resuming work not yet implemented.");if(null!==n.child){var t=n.child,a=lf(t,t.pendingProps);for(n.child=a,a.return=n;null!==t.sibling;)t=t.sibling,a=a.sibling=lf(t,t.pendingProps),a.return=n;a.sibling=null}}// Reset a workInProgress child set to prepare it for a second pass.
|
|
1615
|
+
function rr(e,n){for(var t=e.child;null!==t;)uf(t,n),t=t.sibling}function sr(e){if(e===gk)throw Error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.");return e}function lr(){var e=sr(yk.current);return e}function ur(e,n){Zo(yk,n,e),Zo(bk,e,e),Zo(hk,gk,e);var t=Fi(n);// Now that we know this function doesn't throw, replace it.
|
|
1616
|
+
Go(hk,e),Zo(hk,t,e)}function cr(e){Go(hk,e),Go(bk,e),Go(yk,e)}function fr(){var e=sr(hk.current);return e}function pr(e){sr(yk.current);var n=sr(hk.current),t=Bi(n,e.type);// Don't push this Fiber's context unless it's unique.
|
|
1617
|
+
n===t||(// Track the context and the Fiber that provided it.
|
|
1618
|
+
// This enables us to pop only Fibers that provide unique contexts.
|
|
1619
|
+
Zo(bk,e,e),Zo(hk,t,e))}function mr(e){// Do not pop unless this Fiber provided the current context.
|
|
1620
|
+
// pushHostContext() only pushes Fibers that provide unique contexts.
|
|
1621
|
+
bk.current!==e||(Go(hk,e),Go(bk,e))}function gr(e,n){return 0!=(e&n)}function hr(e){return e&1}function br(e,n){return e&1|n}function yr(e,n){return e|n}function xr(e,n){Zo(Ek,n,e)}function vr(e){Go(Ek,e)}function wr(e,n){// If it was the primary children that just suspended, capture and render the
|
|
1622
|
+
// fallback. Otherwise, don't capture and bubble to the next boundary.
|
|
1623
|
+
var t=e.memoizedState;if(null!==t)return null!==t.dehydrated;var a=e.memoizedProps;// In order to capture, the Suspense component must have a fallback prop.
|
|
1624
|
+
return void 0!==a.fallback&&(!0!==a.unstable_avoidThisFallback||!n);// Regular boundaries always capture.
|
|
1625
|
+
// If it's a boundary we should avoid, then we prefer to bubble up to the
|
|
1626
|
+
// parent boundary if it is currently invisible.
|
|
1627
|
+
// If the parent is not able to handle it, we must handle it.
|
|
1628
|
+
}function kr(e){for(var n=e;null!==n;){if(n.tag===13){var t=n.memoizedState;if(null!==t){var a=t.dehydrated;if(null===a||mo(a)||go(a))return n}}else if(n.tag===19&&// revealOrder undefined can't be trusted because it don't
|
|
1629
|
+
// keep track of whether it suspended or not.
|
|
1630
|
+
n.memoizedProps.revealOrder!==void 0){var i=(n.flags&64)!==0;if(i)return n}else if(null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)return null;for(;null===n.sibling;){if(null===n.return||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}function Er(e){var n=e.stateNode.containerInfo;return Rk=yo(n),Tk=e,Pk=!0,!0}function Sr(e,n){switch(e.tag){case 3:No(e.stateNode.containerInfo,n);break;case 5:To(e.type,e.memoizedProps,e.stateNode,n);}var t=wf();t.stateNode=n,t.return=e,t.flags=8,null===e.lastEffect?e.firstEffect=e.lastEffect=t:(e.lastEffect.nextEffect=t,e.lastEffect=t)}function Cr(e,n){switch(n.flags=2|-1025&n.flags,e.tag){case 3:{var t=e.stateNode.containerInfo;switch(n.tag){case 5:var a=n.type;n.pendingProps,Ro(t,a);break;case 6:var i=n.pendingProps;Po(t,i);}break}case 5:{var o=e.type,d=e.memoizedProps,r=e.stateNode;switch(n.tag){case 5:var s=n.type;n.pendingProps,Io(o,d,r,s);break;case 6:var l=n.pendingProps;Lo(o,d,r,l);break;case 13:Do(o,d);}break}default:return;}}function _r(e,n){switch(e.tag){case 5:{var t=e.type;e.pendingProps;var a=fo(n,t);return null!==a&&(e.stateNode=a,!0)}case 6:{var i=e.pendingProps,o=po(n,i);return null!==o&&(e.stateNode=o,!0)}case 13:return!1;default:return!1;}}function Nr(e){if(Pk){var n=Rk;if(!n)return Cr(Tk,e),Pk=!1,void(Tk=e);var t=n;if(!_r(e,n)){if(n=bo(t),!n||!_r(e,n))return Cr(Tk,e),Pk=!1,void(Tk=e);// We matched the next one, we'll now assume that the first one was
|
|
1631
|
+
// superfluous and we'll delete it. Since we can't eagerly delete it
|
|
1632
|
+
// we'll have to schedule a deletion. To do that, this node needs a dummy
|
|
1633
|
+
// fiber associated with it.
|
|
1634
|
+
Sr(Tk,t)}Tk=e,Rk=yo(n)}}function Tr(e,n,t){var a=e.stateNode,i=xo(a,e.type,e.memoizedProps,n,t,e);// If the update payload indicates that there is a change or if there
|
|
1635
|
+
// is a new ref we mark this as an update.
|
|
1636
|
+
return e.updateQueue=i,null!==i}function Rr(e){var n=e.stateNode,t=e.memoizedProps,a=vo(n,t,e);if(a){// We assume that prepareToHydrateHostTextInstance is called in a context where the
|
|
1637
|
+
// hydration parent is the parent host component of this host text.
|
|
1638
|
+
var i=Tk;if(null!==i)switch(i.tag){case 3:{var o=i.stateNode.containerInfo;Co(o,n,t);break}case 5:{var d=i.type,r=i.memoizedProps,s=i.stateNode;_o(d,r,s,n,t);break}}}return a}function Pr(e){var n=e.memoizedState,t=null===n?null:n.dehydrated;if(!t)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");return wo(t)}function Ir(e){for(var n=e.return;null!==n&&n.tag!==5&&n.tag!==3&&n.tag!==13;)n=n.return;Tk=n}function Lr(e){if(e!==Tk)// We're deeper than the current hydration context, inside an inserted
|
|
1639
|
+
// tree.
|
|
1640
|
+
return!1;if(!Pk)return Ir(e),Pk=!0,!1;var n=e.type;// If we have any remaining hydratable nodes, we need to delete them now.
|
|
1641
|
+
// We only do this deeper than head and body since they tend to have random
|
|
1642
|
+
// other nodes in them. We also ignore components with pure text content in
|
|
1643
|
+
// side of them.
|
|
1644
|
+
// TODO: Better heuristic.
|
|
1645
|
+
if(5!==e.tag||"head"!==n&&"body"!==n&&!Yi(n,e.memoizedProps))for(var t=Rk;t;)Sr(e,t),t=bo(t);return Ir(e),Rk=13===e.tag?Pr(e):Tk?bo(e.stateNode):null,!0}function Dr(){Tk=null,Rk=null,Pk=!1}function zr(){return Pk}// and should be reset before starting a new render.
|
|
1646
|
+
// This tracks which mutable sources need to be reset after a render.
|
|
1647
|
+
function Ar(e){Ik.push(e)}function Or(){for(var e=0,n;e<Ik.length;e++)n=Ik[e],n._workInProgressVersionPrimary=null;Ik.length=0}function Mr(e){return e._workInProgressVersionPrimary}function Ur(e,n){e._workInProgressVersionPrimary=n,Ik.push(e)}function Fr(e){null==e._currentPrimaryRenderer?e._currentPrimaryRenderer=Lk:e._currentPrimaryRenderer!==Lk&&d("Detected multiple renderers concurrently rendering the same mutable source. This is currently unsupported.")}// Eager reads the version of a mutable source and stores it on the root.
|
|
1648
|
+
function Br(){{var e=Hk;null===qk?qk=[e]:qk.push(e)}}function Wr(){{var e=Hk;null!==qk&&(Qk++,qk[Qk]!==e&&jr(e))}}function Vr(e){e===void 0||null===e||Array.isArray(e)||d("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",Hk,typeof e)}function jr(e){{var n=z(Uk.type);if(!Ak.has(n)&&(Ak.add(n),null!==qk)){for(var t="",a=30,o=0;o<=Qk;o++){// Extra space so second column lines up
|
|
1649
|
+
// lol @ IE not supporting String#repeat
|
|
1650
|
+
for(var r=qk[o],s=o===Qk?e:r,l=o+1+". "+r;l.length<a;)l+=" ";l+=s+"\n",t+=l}d("React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n Previous render Next render\n ------------------------------------------------------\n%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",n,t)}}}function Hr(){throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.")}function qr(e,n){if(Kk)// Only true when this component is being hot reloaded.
|
|
1651
|
+
return!1;if(null===n)return d("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",Hk),!1;e.length!==n.length&&d("The final argument passed to %s changed size between renders. The order and size of this array must remain constant.\n\nPrevious: %s\nIncoming: %s",Hk,"["+n.join(", ")+"]","["+e.join(", ")+"]");for(var t=0;t<n.length&&t<e.length;t++)if(!bx(e[t],n[t]))return!1;return!0}function Qr(e,n,t,a,i,o){Mk=o,Uk=n,qk=null===e?null:e._debugHookTypes,Qk=-1,Kk=null!==e&&e.type!==n.type,n.memoizedState=null,n.updateQueue=null,n.lanes=0,Dk.current=null!==e&&null!==e.memoizedState?Jk:null===qk?Gk:Zk;var d=t(a,i);// Check if there was a render phase update
|
|
1652
|
+
if(Vk){// Keep rendering in a loop for as long as render phase updates continue to
|
|
1653
|
+
// be scheduled. Use a counter to prevent infinite loops.
|
|
1654
|
+
var r=0;do{if(Vk=!1,!(25>r))throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");r+=1,// Even when hot reloading, allow dependencies to stabilize
|
|
1655
|
+
// after first render to prevent infinite render phase updates.
|
|
1656
|
+
Kk=!1,Fk=null,Bk=null,n.updateQueue=null,// Also validate hook order for cascading updates.
|
|
1657
|
+
Qk=-1,Dk.current=eE,d=t(a,i)}while(Vk)}// We can assume the previous dispatcher is always this one, since we set it
|
|
1658
|
+
// at the beginning of the render phase and there's no re-entrancy.
|
|
1659
|
+
Dk.current=Xk,n._debugHookTypes=qk;// This check uses currentHook so that it works the same in DEV and prod bundles.
|
|
1660
|
+
// hookTypesDev could catch more cases (e.g. context) but only in DEV bundles.
|
|
1661
|
+
var s=null!==Fk&&null!==Fk.next;if(Mk=0,Uk=null,Fk=null,Bk=null,Hk=null,qk=null,Qk=-1,Wk=!1,!!s)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");return d}function Kr(e,n,t){n.updateQueue=e.updateQueue,n.flags&=-517,e.lanes=ht(e.lanes,t)}function Yr(){if(Dk.current=Xk,Wk){// There were render phase updates. These are only valid for this render
|
|
1662
|
+
// phase, which we are now aborting. Remove the updates from the queues so
|
|
1663
|
+
// they do not persist to the next render. Do not remove updates from hooks
|
|
1664
|
+
// that weren't processed.
|
|
1665
|
+
//
|
|
1666
|
+
// Only reset the updates from the queue if it has a clone. If it does
|
|
1667
|
+
// not have a clone, that means it wasn't processed, and the updates were
|
|
1668
|
+
// scheduled before we entered the render phase.
|
|
1669
|
+
for(var e=Uk.memoizedState,n;null!==e;)n=e.queue,null!==n&&(n.pending=null),e=e.next;Wk=!1}Mk=0,Uk=null,Fk=null,Bk=null,qk=null,Qk=-1,Hk=null,$k=!1,Vk=!1}function $r(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Bk?Uk.memoizedState=Bk=e:Bk=Bk.next=e,Bk}function Xr(){// This function is used both for updates and for re-renders triggered by a
|
|
1670
|
+
// render phase update. It assumes there is either a current hook we can
|
|
1671
|
+
// clone, or a work-in-progress hook from a previous render pass that we can
|
|
1672
|
+
// use as a base. When we reach the end of the base list, we must switch to
|
|
1673
|
+
// the dispatcher used for mounts.
|
|
1674
|
+
var e;if(null===Fk){var n=Uk.alternate;e=null===n?null:n.memoizedState}else e=Fk.next;var t;if(t=null===Bk?Uk.memoizedState:Bk.next,null!==t)Bk=t,t=Bk.next,Fk=e;else{// Clone from the current hook.
|
|
1675
|
+
if(null===e)throw Error("Rendered more hooks than during the previous render.");Fk=e;var a={memoizedState:Fk.memoizedState,baseState:Fk.baseState,baseQueue:Fk.baseQueue,queue:Fk.queue,next:null};null===Bk?Uk.memoizedState=Bk=a:Bk=Bk.next=a}return Bk}function Gr(){return{lastEffect:null}}function Zr(e,n){// $FlowFixMe: Flow doesn't like mixed types
|
|
1676
|
+
return"function"==typeof n?n(e):n}function Jr(e,n,t){var a=$r(),i;i=void 0===t?n:t(n),a.memoizedState=a.baseState=i;var o=a.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},d=o.dispatch=Us.bind(null,Uk,o);return[a.memoizedState,d]}function es(e,n,t){var a=Xr(),i=a.queue;if(null===i)throw Error("Should have a queue. This is likely a bug in React. Please file an issue.");i.lastRenderedReducer=e;var o=Fk,r=o.baseQueue,s=i.pending;// The last rebase update that is NOT part of the base state.
|
|
1677
|
+
if(null!==s){// We have new updates that haven't been processed yet.
|
|
1678
|
+
// We'll add them to the base queue.
|
|
1679
|
+
if(null!==r){// Merge the pending queue and the base queue.
|
|
1680
|
+
var l=r.next,u=s.next;r.next=u,s.next=l}o.baseQueue!==r&&d("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),o.baseQueue=r=s,i.pending=null}if(null!==r){// We have a queue to process.
|
|
1681
|
+
var c=r.next,f=o.baseState,p=null,m=null,g=null,h=c;do{var b=h.lane;if(!mt(Mk,b)){// Priority is insufficient. Skip this update. If this is the first
|
|
1682
|
+
// skipped update, the previous update/state is the new base
|
|
1683
|
+
// update/state.
|
|
1684
|
+
var y={lane:b,action:h.action,eagerReducer:h.eagerReducer,eagerState:h.eagerState,next:null};null===g?(m=g=y,p=f):g=g.next=y,Uk.lanes=gt(Uk.lanes,b),nc(b)}else{// This update does have sufficient priority.
|
|
1685
|
+
if(null!==g){var x={// This update is going to be committed so we never want uncommit
|
|
1686
|
+
// it. Using NoLane works because 0 is a subset of all bitmasks, so
|
|
1687
|
+
// this will never be skipped by the check above.
|
|
1688
|
+
lane:0,action:h.action,eagerReducer:h.eagerReducer,eagerState:h.eagerState,next:null};g=g.next=x}// Process this update.
|
|
1689
|
+
if(h.eagerReducer===e)f=h.eagerState;else{var v=h.action;f=e(f,v)}}h=h.next}while(null!==h&&h!==c);null===g?p=f:g.next=m,bx(f,a.memoizedState)||zl(),a.memoizedState=f,a.baseState=p,a.baseQueue=g,i.lastRenderedState=f}var w=i.dispatch;return[a.memoizedState,w]}function ns(e,n,t){var a=Xr(),i=a.queue;if(null===i)throw Error("Should have a queue. This is likely a bug in React. Please file an issue.");i.lastRenderedReducer=e;// This is a re-render. Apply the new render phase updates to the previous
|
|
1690
|
+
// work-in-progress hook.
|
|
1691
|
+
var o=i.dispatch,d=i.pending,r=a.memoizedState;if(null!==d){i.pending=null;var s=d.next,l=s;do{// Process this render phase update. We don't have to check the
|
|
1692
|
+
// priority because it will always be the same as the current
|
|
1693
|
+
// render's.
|
|
1694
|
+
var u=l.action;r=e(r,u),l=l.next}while(l!==s);// Mark that the fiber performed work, but only if the new state is
|
|
1695
|
+
// different from the current state.
|
|
1696
|
+
bx(r,a.memoizedState)||zl(),a.memoizedState=r,null===a.baseQueue&&(a.baseState=r),i.lastRenderedState=r}return[r,o]}function ts(e,n,t){Fr(n);var a=n._getVersion,i=a(n._source),o=!1,r=Mr(n);if(null===r?(o=mt(Mk,e.mutableReadLanes),o&&Ur(n,i)):o=r===i,o){var s=t(n._source);return"function"==typeof s&&d("Mutable source should not return a function as the snapshot value. Functions may close over mutable values and cause tearing."),s}throw Ar(n),Error("Cannot read from mutable source during the current render without tearing. This is a bug in React. Please file an issue.")}function as(e,n,t,a){var i=Tu();if(null===i)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");var o=n._getVersion,r=o(n._source),s=Dk.current,l=s.useState(function(){return ts(i,n,t)}),u=l[0],c=l[1],f=u,p=Bk,m=e.memoizedState,g=m.refs,h=g.getSnapshot,b=m.source,y=m.subscribe,x=Uk;// If any of the inputs to useMutableSource change, reading is potentially unsafe.
|
|
1697
|
+
//
|
|
1698
|
+
// If either the source or the subscription have changed we can't can't trust the update queue.
|
|
1699
|
+
// Maybe the source changed in a way that the old subscription ignored but the new one depends on.
|
|
1700
|
+
//
|
|
1701
|
+
// If the getSnapshot function changed, we also shouldn't rely on the update queue.
|
|
1702
|
+
// It's possible that the underlying source was mutated between the when the last "change" event fired,
|
|
1703
|
+
// and when the current render (with the new getSnapshot function) is processed.
|
|
1704
|
+
//
|
|
1705
|
+
// In both cases, we need to throw away pending updates (since they are no longer relevant)
|
|
1706
|
+
// and treat reading from the source as we do in the mount case.
|
|
1707
|
+
if(e.memoizedState={refs:g,source:n,subscribe:a},s.useEffect(function(){g.getSnapshot=t,g.setSnapshot=c;// Check for a possible change between when we last rendered now.
|
|
1708
|
+
var e=o(n._source);if(!bx(r,e)){var a=t(n._source);if("function"==typeof a&&d("Mutable source should not return a function as the snapshot value. Functions may close over mutable values and cause tearing."),!bx(f,a)){c(a);var s=Pu(x);Ct(i,s)}// If the source mutated between render and now,
|
|
1709
|
+
// there may be state updates already scheduled from the old source.
|
|
1710
|
+
// Entangle the updates so that they render in the same batch.
|
|
1711
|
+
Nt(i,i.mutableReadLanes)}},[t,n,a]),s.useEffect(function(){var e=function(){var e=g.getSnapshot,t=g.setSnapshot;try{t(e(n._source));// Record a pending mutable source update with the same expiration time.
|
|
1712
|
+
var a=Pu(x);Ct(i,a)}catch(e){t(function(){throw e})}},t=a(n._source,e);return"function"!=typeof t&&d("Mutable source subscribe function must return an unsubscribe function."),t},[n,a]),!bx(h,t)||!bx(b,n)||!bx(y,a)){// Create a new queue and setState method,
|
|
1713
|
+
// So if there are interleaved updates, they get pushed to the older queue.
|
|
1714
|
+
// When this becomes current, the previous queue and dispatch method will be discarded,
|
|
1715
|
+
// including any interleaving updates that occur.
|
|
1716
|
+
var v={pending:null,dispatch:null,lastRenderedReducer:Zr,lastRenderedState:f};v.dispatch=c=Us.bind(null,Uk,v),p.queue=v,p.baseQueue=null,f=ts(i,n,t),p.memoizedState=p.baseState=f}return f}function is(e,n,t){var a=$r();return a.memoizedState={refs:{getSnapshot:n,setSnapshot:null},source:e,subscribe:t},as(a,e,n,t)}function os(e,n,t){var a=Xr();return as(a,e,n,t)}function ds(e){var n=$r();"function"==typeof e&&(e=e()),n.memoizedState=n.baseState=e;var t=n.queue={pending:null,dispatch:null,lastRenderedReducer:Zr,lastRenderedState:e},a=t.dispatch=Us.bind(null,Uk,t);return[n.memoizedState,a]}function rs(e){return es(Zr)}function ss(e){return ns(Zr)}function ls(e,n,t,a){var i={tag:e,create:n,destroy:t,deps:a,// Circular
|
|
1717
|
+
next:null},o=Uk.updateQueue;if(null===o)o=Gr(),Uk.updateQueue=o,o.lastEffect=i.next=i;else{var d=o.lastEffect;if(null===d)o.lastEffect=i.next=i;else{var r=d.next;d.next=i,i.next=r,o.lastEffect=i}}return i}function us(e){var n=$r(),t={current:e};return Object.seal(t),n.memoizedState=t,t}function cs(e){var n=Xr();return n.memoizedState}function fs(e,n,t,a){var i=$r(),o=a===void 0?null:a;Uk.flags|=e,i.memoizedState=ls(1|n,t,void 0,o)}function ps(e,n,t,a){var i=Xr(),o=a===void 0?null:a,d=void 0;if(null!==Fk){var r=Fk.memoizedState;if(d=r.destroy,null!==o){var s=r.deps;if(qr(o,s))return void ls(n,t,d,o)}}Uk.flags|=e,i.memoizedState=ls(1|n,t,d,o)}function ms(e,n){return"undefined"!=typeof jest&&Uc(Uk),fs(516,4,e,n)}function gs(e,n){return"undefined"!=typeof jest&&Uc(Uk),ps(516,4,e,n)}function hs(e,n){return fs(4,2,e,n)}function bs(e,n){return ps(4,2,e,n)}function ys(e,n){if("function"==typeof n){var t=n,a=e();return t(a),function(){t(null)}}if(null!==n&&void 0!==n){var i=n;i.hasOwnProperty("current")||d("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(i).join(", ")+"}");var o=e();return i.current=o,function(){i.current=null}}}function xs(e,n,t){"function"!=typeof n&&d("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",null===n?"null":typeof n);// TODO: If deps are provided, should we skip comparing the ref itself?
|
|
1718
|
+
var a=null!==t&&t!==void 0?t.concat([e]):null;return fs(4,2,ys.bind(null,n,e),a)}function vs(e,n,t){"function"!=typeof n&&d("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",null===n?"null":typeof n);// TODO: If deps are provided, should we skip comparing the ref itself?
|
|
1719
|
+
var a=null!==t&&t!==void 0?t.concat([e]):null;return ps(4,2,ys.bind(null,n,e),a)}function ws(e,n){// This hook is normally a no-op.
|
|
1720
|
+
// The react-debug-hooks package injects its own implementation
|
|
1721
|
+
// so that e.g. DevTools can display custom hook values.
|
|
1722
|
+
}function ks(e,n){var t=$r(),a=void 0===n?null:n;return t.memoizedState=[e,a],e}function Es(e,n){var t=Xr(),a=void 0===n?null:n,i=t.memoizedState;if(null!==i&&null!==a){var o=i[1];if(qr(a,o))return i[0]}return t.memoizedState=[e,a],e}function Ss(e,n){var t=$r(),a=void 0===n?null:n,i=e();return t.memoizedState=[i,a],i}function Cs(e,n){var t=Xr(),a=void 0===n?null:n,i=t.memoizedState;if(null!==i&&null!==a)// Assume these are defined. If they're not, areHookInputsEqual will warn.
|
|
1723
|
+
{var o=i[1];if(qr(a,o))return i[0]}var d=e();return t.memoizedState=[d,a],d}function _s(e){var n=ds(e),t=n[0],a=n[1];return ms(function(){var n=zk.transition;zk.transition=1;try{a(e)}finally{zk.transition=n}},[e]),t}function Ns(e){var n=rs(),t=n[0],a=n[1];return gs(function(){var n=zk.transition;zk.transition=1;try{a(e)}finally{zk.transition=n}},[e]),t}function Ts(e){var n=ss(),t=n[0],a=n[1];return gs(function(){var n=zk.transition;zk.transition=1;try{a(e)}finally{zk.transition=n}},[e]),t}function Rs(e,n){var t=gd();bd(t<98?98:t,function(){e(!0)}),bd(t>97?97:t,function(){var t=zk.transition;zk.transition=1;try{e(!1),n()}finally{zk.transition=t}})}function Ps(){var e=ds(!1),n=e[0],t=e[1],a=Rs.bind(null,t);// The `start` method can be stored on a ref, since `setPending`
|
|
1724
|
+
// never changes.
|
|
1725
|
+
return us(a),[a,n]}function Is(){var e=rs(),n=e[0],t=cs(),a=t.current;return[a,n]}function Ls(){var e=ss(),n=e[0],t=cs(),a=t.current;return[a,n]}function Ds(){return $k}function zs(e){{// TODO: Should warn in effects and callbacks, too
|
|
1726
|
+
var n=z(e.type)||"Unknown";B()&&!Ok[n]&&(d("The object passed back from useOpaqueIdentifier is meant to be passed through to attributes only. Do not read the value directly."),Ok[n]=!0)}}function As(){var e=zo.bind(null,zs.bind(null,Uk));if(zr()){var n=!1,t=Uk,a=function(){throw n||(n=!0,$k=!0,o(e()),$k=!1,zs(t)),Error("The object passed back from useOpaqueIdentifier is meant to be passed through to attributes only. Do not read the value directly.")},i=Oo(a),o=ds(i)[1];return 0===(2&Uk.mode)&&(Uk.flags|=516,ls(5,function(){o(e())},void 0,null)),i}var d=e();return ds(d),d}function Os(){var e=rs()[0];return e}function Ms(){var e=ss()[0];return e}function Us(e,n,t){"function"==typeof arguments[3]&&d("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");var a=Ru(),i=Pu(e),o={lane:i,action:t,eagerReducer:null,eagerState:null,next:null},r=n.pending;null===r?o.next=o:(o.next=r.next,r.next=o),n.pending=o;var s=e.alternate;if(e===Uk||null!==s&&s===Uk)// This is a render phase update. Stash it in a lazily-created map of
|
|
1727
|
+
// queue -> linked list of updates. After this render pass, we'll restart
|
|
1728
|
+
// and apply the stashed updates on top of the work-in-progress hook.
|
|
1729
|
+
Vk=Wk=!0;else{if(e.lanes===0&&(null===s||s.lanes===0)){// The queue is currently empty, which means we can eagerly compute the
|
|
1730
|
+
// next state before entering the render phase. If the new state is the
|
|
1731
|
+
// same as the current state, we may be able to bail out entirely.
|
|
1732
|
+
var l=n.lastRenderedReducer;if(null!==l){var u;u=Dk.current,Dk.current=tE;try{var c=n.lastRenderedState,f=l(c,t);if(o.eagerReducer=l,o.eagerState=f,bx(f,c))// Fast path. We can bail out without scheduling React to re-render.
|
|
1733
|
+
// It's still possible that we'll need to rebase this update later,
|
|
1734
|
+
// if the component re-renders for a different reason and by that
|
|
1735
|
+
// time the reducer has changed.
|
|
1736
|
+
return}catch(e){// Suppress the error. It will throw again in the render phase.
|
|
1737
|
+
}finally{Dk.current=u}}}"undefined"!=typeof jest&&(Mc(e),qS(e)),Lu(e,i,a)}}function Fs(){return rE}function Bs(){rE=dE()}function Ws(e){sE=dE(),0>e.actualStartTime&&(e.actualStartTime=dE())}function Vs(e){sE=-1}function js(e,n){if(0<=sE){var t=dE()-sE;e.actualDuration+=t,n&&(e.selfBaseDuration=t),sE=-1}}function Hs(e){// Transfer time spent rendering these children so we don't lose it
|
|
1738
|
+
// after we rerender. This is used as a helper in special cases
|
|
1739
|
+
// where we should count the work of multiple passes.
|
|
1740
|
+
for(var n=e.child;n;)e.actualDuration+=n.actualDuration,n=n.sibling}function qs(e,n,t,a){n.child=null===e?mk(n,null,t,a):pk(n,e.child,t,a)}function Qs(e,n,t,a){// This function is fork of reconcileChildren. It's used in cases where we
|
|
1741
|
+
// want to reconcile without matching against the existing set. This has the
|
|
1742
|
+
// effect of all current children being unmounted; even if the type and key
|
|
1743
|
+
// are the same, the old child is unmounted and a new child is created.
|
|
1744
|
+
//
|
|
1745
|
+
// To do this, we're going to go through the reconcile algorithm twice. In
|
|
1746
|
+
// the first pass, we schedule a deletion for all the current children by
|
|
1747
|
+
// passing null.
|
|
1748
|
+
// In the second pass, we mount the new children. The trick here is that we
|
|
1749
|
+
// pass null in place of where we usually pass the current child set. This has
|
|
1750
|
+
// the effect of remounting all children regardless of whether their
|
|
1751
|
+
// identities match.
|
|
1752
|
+
n.child=pk(n,e.child,null,a),n.child=pk(n,null,t,a)}function Ks(e,n,t,a,i){// TODO: current can be non-null here even if the component
|
|
1753
|
+
// hasn't yet mounted. This happens after the first render suspends.
|
|
1754
|
+
// We'll need to figure out if this is fine or can cause issues.
|
|
1755
|
+
if(n.type!==n.elementType){// Lazy component props can't be validated in createElement
|
|
1756
|
+
// because they're only guaranteed to be resolved here.
|
|
1757
|
+
var o=t.propTypes;o&&$o(o,a,// Resolved props
|
|
1758
|
+
"prop",z(t))}var d=t.render,r=n.ref,s;Dd(n,i);{if(lE.current=n,F(!0),s=Qr(e,n,d,a,r,i),1&n.mode){k();try{s=Qr(e,n,d,a,r,i)}finally{E()}}F(!1)}return null===e||uE?(n.flags|=1,qs(e,n,s,i),n.child):(Kr(e,n,i),Al(e,n,i));// React DevTools reads this flag.
|
|
1759
|
+
}function Ys(e,n,t,a,o,d){if(null===e){var r=t.type;if(rf(r)&&null===t.compare&&// SimpleMemoComponent codepath doesn't resolve outer props either.
|
|
1760
|
+
void 0===t.defaultProps){var s=r;return s=$c(r),n.tag=15,n.type=s,cl(n,r),$s(e,n,s,a,o,d)}{var l=r.propTypes;l&&$o(l,a,// Resolved props
|
|
1761
|
+
"prop",z(r))}var u=ff(t.type,null,a,n,n.mode,d);return u.ref=n.ref,u.return=n,n.child=u,u}{var c=t.type,f=c.propTypes;f&&$o(f,a,// Resolved props
|
|
1762
|
+
"prop",z(c))}var p=e.child;// This is always exactly one child
|
|
1763
|
+
if(!pt(o,d)){// This will be the props with resolved defaultProps,
|
|
1764
|
+
// unlike current.memoizedProps which will be the unresolved ones.
|
|
1765
|
+
var m=p.memoizedProps,g=t.compare;// Default to shallow comparison
|
|
1766
|
+
if(g=null===g?i:g,g(m,a)&&e.ref===n.ref)return Al(e,n,d)}// React DevTools reads this flag.
|
|
1767
|
+
n.flags|=1;var h=lf(p,a);return h.ref=n.ref,h.return=n,n.child=h,h}function $s(e,n,t,a,o,d){// TODO: current can be non-null here even if the component
|
|
1768
|
+
// hasn't yet mounted. This happens when the inner render suspends.
|
|
1769
|
+
// We'll need to figure out if this is fine or can cause issues.
|
|
1770
|
+
if(n.type!==n.elementType){// Lazy component props can't be validated in createElement
|
|
1771
|
+
// because they're only guaranteed to be resolved here.
|
|
1772
|
+
var r=n.elementType;if(r.$$typeof===Sm){// We warn when you define propTypes on lazy()
|
|
1773
|
+
// so let's just skip over it to find memo() outer wrapper.
|
|
1774
|
+
// Inner props for memo are validated later.
|
|
1775
|
+
var s=r,l=s._payload,u=s._init;try{r=u(l)}catch(e){r=null}// Inner propTypes will be validated in the function component path.
|
|
1776
|
+
var c=r&&r.propTypes;c&&$o(c,a,// Resolved (SimpleMemoComponent has no defaultProps)
|
|
1777
|
+
"prop",z(r))}}if(null!==e){var f=e.memoizedProps;if(i(f,a)&&e.ref===n.ref&&// Prevent bailout if the implementation changed due to hot reload.
|
|
1778
|
+
n.type===e.type){if(uE=!1,!pt(d,o))return n.lanes=e.lanes,Al(e,n,d);0!==(16384&e.flags)&&(// This is a special case that only exists for legacy mode.
|
|
1779
|
+
// See https://github.com/facebook/react/pull/19216.
|
|
1780
|
+
uE=!0)}}return nl(e,n,t,a,d)}function Xs(e,n,t){var a=n.pendingProps,i=a.children,o=null===e?null:e.memoizedState;if("hidden"!==a.mode&&"unstable-defer-without-hiding"!==a.mode){var d;null===o?d=t:(d=gt(o.baseLanes,t),n.memoizedState=null),Qu(n,d)}else if(0===(4&n.mode)){// In legacy sync mode, don't defer the subtree. Render it now.
|
|
1781
|
+
// TODO: Figure out what we should do in Blocking mode.
|
|
1782
|
+
var r={baseLanes:0};n.memoizedState=r,Qu(n,t)}else{if(!pt(t,1073741824)){var s;if(null!==o){var l=o.baseLanes;s=gt(l,t)}else s=t;// Schedule this fiber to re-render at offscreen priority. Then bailout.
|
|
1783
|
+
Vc(1073741824),n.lanes=n.childLanes=bt(1073741824);var u={baseLanes:s};return n.memoizedState=u,Qu(n,s),null}// Rendering at offscreen, so we can clear the base lanes.
|
|
1784
|
+
var c={baseLanes:0};n.memoizedState=c;// Push the lanes that were skipped when we bailed out.
|
|
1785
|
+
var f=null===o?t:o.baseLanes;Qu(n,f)}return qs(e,n,i,t),n.child}// Note: These happen to have identical begin phases, for now. We shouldn't hold
|
|
1786
|
+
// ourselves to this constraint, though. If the behavior diverges, we should
|
|
1787
|
+
// fork the function.
|
|
1788
|
+
function Gs(e,n,t){var a=n.pendingProps;return qs(e,n,a,t),n.child}function Zs(e,n,t){var a=n.pendingProps.children;return qs(e,n,a,t),n.child}function Js(e,n,t){{n.flags|=4;// Reset effect durations for the next eventual effect phase.
|
|
1789
|
+
// These are reset during render to allow the DevTools commit hook a chance to read them,
|
|
1790
|
+
var a=n.stateNode;a.effectDuration=0,a.passiveEffectDuration=0}var i=n.pendingProps,o=i.children;return qs(e,n,o,t),n.child}function el(e,n){var t=n.ref;(null===e&&null!==t||null!==e&&e.ref!==t)&&(n.flags|=128)}function nl(e,n,t,a,i){if(n.type!==n.elementType){// Lazy component props can't be validated in createElement
|
|
1791
|
+
// because they're only guaranteed to be resolved here.
|
|
1792
|
+
var o=t.propTypes;o&&$o(o,a,// Resolved props
|
|
1793
|
+
"prop",z(t))}var d;{var r=Jo(n,t,!0);d=nd(n,r)}var s;Dd(n,i);{if(lE.current=n,F(!0),s=Qr(e,n,t,a,d,i),1&n.mode){k();try{s=Qr(e,n,t,a,d,i)}finally{E()}}F(!1)}return null===e||uE?(n.flags|=1,qs(e,n,s,i),n.child):(Kr(e,n,i),Al(e,n,i));// React DevTools reads this flag.
|
|
1794
|
+
}function tl(e,n,t,a,i){if(n.type!==n.elementType){// Lazy component props can't be validated in createElement
|
|
1795
|
+
// because they're only guaranteed to be resolved here.
|
|
1796
|
+
var o=t.propTypes;o&&$o(o,a,// Resolved props
|
|
1797
|
+
"prop",z(t))}// Push context providers early to prevent context stack mismatches.
|
|
1798
|
+
// During mounting we don't know the child context yet as the instance doesn't exist.
|
|
1799
|
+
// We will invalidate the child context in finishClassComponent() right after rendering.
|
|
1800
|
+
var r;ad(t)?(r=!0,sd(n)):r=!1,Dd(n,i);var s=n.stateNode,l;null===s?(null!==e&&(e.alternate=null,n.alternate=null,n.flags|=2),Xd(n,t,a),Jd(n,t,a,i),l=!0):null===e?l=er(n,t,a,i):l=nr(e,n,t,a,i);var u=al(e,n,t,l,r,i);{var c=n.stateNode;l&&c.props!==a&&(!hE&&d("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",z(n.type)||"a component"),hE=!0)}return u}function al(e,n,t,a,i,o){el(e,n);var d=0!==(64&n.flags);if(!a&&!d)return i&&ld(n,t,!1),Al(e,n,o);var r=n.stateNode;// Rerender
|
|
1801
|
+
lE.current=n;var s;if(d&&"function"!=typeof t.getDerivedStateFromError)s=null,Vs();else{if(F(!0),s=r.render(),1&n.mode){k();try{r.render()}finally{E()}}F(!1)}// React DevTools reads this flag.
|
|
1802
|
+
return n.flags|=1,null!==e&&d?Qs(e,n,s,o):qs(e,n,s,o),n.memoizedState=r.state,i&&ld(n,t,!0),n.child}function il(e){var n=e.stateNode;n.pendingContext?dd(e,n.pendingContext,n.pendingContext!==n.context):n.context&&dd(e,n.context,!1),ur(e,n.containerInfo)}function ol(e,n,t){il(n);var a=n.updateQueue;if(null===e||null===a)throw Error("If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue.");var o=n.pendingProps,d=n.memoizedState,r=null===d?null:d.element;Od(e,n),Wd(n,o,null,t);var s=n.memoizedState,l=s.element;// Caution: React DevTools currently depends on this property
|
|
1803
|
+
// being called "element".
|
|
1804
|
+
if(l===r)return Dr(),Al(e,n,t);var u=n.stateNode;if(u.hydrate&&Er(n)){// If we don't have any current children this might be the first pass.
|
|
1805
|
+
// We always try to hydrate. If this isn't a hydration pass there won't
|
|
1806
|
+
// be any children to hydrate which is effectively the same thing as
|
|
1807
|
+
// not hydrating.
|
|
1808
|
+
{var c=u.mutableSourceEagerHydrationData;if(null!=c)for(var f=0;f<c.length;f+=2){var p=c[f],m=c[f+1];Ur(p,m)}}var g=mk(n,null,l,t);n.child=g;for(var h=g;h;)// Mark each child as hydrating. This is a fast path to know whether this
|
|
1809
|
+
// tree is part of a hydrating tree. This is used to determine if a child
|
|
1810
|
+
// node has fully mounted yet, and for scheduling event replaying.
|
|
1811
|
+
// Conceptually this is similar to Placement in that a new subtree is
|
|
1812
|
+
// inserted into the React tree here. It just happens to not need DOM
|
|
1813
|
+
// mutations because it already exists.
|
|
1814
|
+
h.flags=1024|-3&h.flags,h=h.sibling}else// Otherwise reset hydration state in case we aborted and resumed another
|
|
1815
|
+
// root.
|
|
1816
|
+
qs(e,n,l,t),Dr();return n.child}function dl(e,n,t){pr(n),null===e&&Nr(n);var a=n.type,i=n.pendingProps,o=null===e?null:e.memoizedProps,d=i.children,r=Yi(a,i);return r?d=null:null!==o&&Yi(a,o)&&(n.flags|=16),el(e,n),qs(e,n,d,t),n.child}function rl(e,n){// Nothing to do here. This is terminal. We'll do the completion step
|
|
1817
|
+
// immediately after.
|
|
1818
|
+
return null===e&&Nr(n),null}function sl(e,n,t,a,i){null!==e&&(e.alternate=null,n.alternate=null,n.flags|=2);var o=n.pendingProps,d=t,r=d._payload,s=d._init,l=s(r);n.type=l;var u=n.tag=sf(l),c=Sd(l,o),f;switch(u){case 0:return cl(n,l),n.type=l=$c(l),f=nl(null,n,l,c,i),f;case 1:return n.type=l=Xc(l),f=tl(null,n,l,c,i),f;case 11:return n.type=l=Gc(l),f=Ks(null,n,l,c,i),f;case 14:{if(n.type!==n.elementType){var p=l.propTypes;p&&$o(p,c,// Resolved for outer only
|
|
1819
|
+
"prop",z(l))}return f=Ys(null,n,l,Sd(l.type,c),// The inner type can have defaults too
|
|
1820
|
+
a,i),f}}var m="";// This message intentionally doesn't mention ForwardRef or MemoComponent
|
|
1821
|
+
// because the fact that it's a separate type of work is an
|
|
1822
|
+
// implementation detail.
|
|
1823
|
+
throw null!==l&&"object"==typeof l&&l.$$typeof===Sm&&(m=" Did you wrap a component in React.lazy() more than once?"),Error("Element type is invalid. Received a promise that resolves to: "+l+". Lazy element type must resolve to a class or function."+m)}function ll(e,n,t,a,i){null!==e&&(e.alternate=null,n.alternate=null,n.flags|=2),n.tag=1;// The rest of this function is a fork of `updateClassComponent`
|
|
1824
|
+
// Push context providers early to prevent context stack mismatches.
|
|
1825
|
+
// During mounting we don't know the child context yet as the instance doesn't exist.
|
|
1826
|
+
// We will invalidate the child context in finishClassComponent() right after rendering.
|
|
1827
|
+
var o;return ad(t)?(o=!0,sd(n)):o=!1,Dd(n,i),Xd(n,t,a),Jd(n,t,a,i),al(null,n,t,!0,o,i)}function ul(e,n,t,a){null!==e&&(e.alternate=null,n.alternate=null,n.flags|=2);var i=n.pendingProps,o;{var r=Jo(n,t,!1);o=nd(n,r)}Dd(n,a);var s;{if(t.prototype&&"function"==typeof t.prototype.render){var l=z(t)||"Unknown";cE[l]||(d("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",l,l),cE[l]=!0)}1&n.mode&&xw.recordLegacyContextWarning(n,null),F(!0),lE.current=n,s=Qr(null,n,t,i,o,a),F(!1)}// React DevTools reads this flag.
|
|
1828
|
+
// Support for module components is deprecated and is removed behind a flag.
|
|
1829
|
+
// Whether or not it would crash later, we want to show a good message in DEV first.
|
|
1830
|
+
if(n.flags|=1,"object"==typeof s&&null!==s&&"function"==typeof s.render&&void 0===s.$$typeof){var u=z(t)||"Unknown";fE[u]||(d("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",u,u,u),fE[u]=!0)}if(// Run these checks in production only if the flag is off.
|
|
1831
|
+
// Eventually we'll delete this branch altogether.
|
|
1832
|
+
"object"==typeof s&&null!==s&&"function"==typeof s.render&&void 0===s.$$typeof){{var c=z(t)||"Unknown";fE[c]||(d("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",c,c,c),fE[c]=!0)}// Proceed under the assumption that this is a class instance
|
|
1833
|
+
n.tag=1,n.memoizedState=null,n.updateQueue=null;// Push context providers early to prevent context stack mismatches.
|
|
1834
|
+
// During mounting we don't know the child context yet as the instance doesn't exist.
|
|
1835
|
+
// We will invalidate the child context in finishClassComponent() right after rendering.
|
|
1836
|
+
var f=!1;ad(t)?(f=!0,sd(n)):f=!1,n.memoizedState=null!==s.state&&void 0!==s.state?s.state:null,Ad(n);var p=t.getDerivedStateFromProps;return"function"==typeof p&&Qd(n,t,p,i),$d(n,s),Jd(n,t,i,a),al(null,n,t,!0,f,a)}if(n.tag=0,1&n.mode){k();try{s=Qr(null,n,t,i,o,a)}finally{E()}}return qs(null,n,s,a),cl(n,t),n.child}function cl(e,n){{if(n&&n.childContextTypes&&d("%s(...): childContextTypes cannot be defined on a function component.",n.displayName||n.name||"Component"),null!==e.ref){var t="",a=A();a&&(t+="\n\nCheck the render method of `"+a+"`.");var i=a||e._debugID||"",o=e._debugSource;o&&(i=o.fileName+":"+o.lineNumber),gE[i]||(gE[i]=!0,d("Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?%s",t))}if("function"==typeof n.getDerivedStateFromProps){var r=z(n)||"Unknown";mE[r]||(d("%s: Function components do not support getDerivedStateFromProps.",r),mE[r]=!0)}if("object"==typeof n.contextType&&null!==n.contextType){var s=z(n)||"Unknown";pE[s]||(d("%s: Function components do not support contextType.",s),pE[s]=!0)}}}function fl(e){return{baseLanes:e}}function pl(e,n){return{baseLanes:gt(e.baseLanes,n)}}// TODO: Probably should inline this back
|
|
1837
|
+
function ml(e,n,t,a){// If we're already showing a fallback, there are cases where we need to
|
|
1838
|
+
// remain on that fallback regardless of whether the content has resolved.
|
|
1839
|
+
// For example, SuspenseList coordinates when nested content appears.
|
|
1840
|
+
if(null!==n){var i=n.memoizedState;if(null===i)// Currently showing content. Don't hide it, even if ForceSuspenseFallack
|
|
1841
|
+
// is true. More precise name might be "ForceRemainSuspenseFallback".
|
|
1842
|
+
// Note: This is a factoring smell. Can't remain on a fallback if there's
|
|
1843
|
+
// no fallback to remain on.
|
|
1844
|
+
return!1}// Not currently showing content. Consult the Suspense context.
|
|
1845
|
+
return gr(e,2)}function gl(e,n){// TODO: Should not remove render lanes that were pinged during this render
|
|
1846
|
+
return ht(e.childLanes,n)}function hl(e,n,t){var a=n.pendingProps;// This is used by DevTools to force a boundary to suspend.
|
|
1847
|
+
Bf(n)&&(n.flags|=64);var i=Ek.current,o=!1,d=0!==(64&n.flags);// OK, the next part is confusing. We're about to reconcile the Suspense
|
|
1848
|
+
// boundary's children. This involves some custom reconcilation logic. Two
|
|
1849
|
+
// main reasons this is so complicated.
|
|
1850
|
+
//
|
|
1851
|
+
// First, Legacy Mode has different semantics for backwards compatibility. The
|
|
1852
|
+
// primary tree will commit in an inconsistent state, so when we do the
|
|
1853
|
+
// second pass to render the fallback, we do some exceedingly, uh, clever
|
|
1854
|
+
// hacks to make that not totally break. Like transferring effects and
|
|
1855
|
+
// deletions from hidden tree. In Concurrent Mode, it's much simpler,
|
|
1856
|
+
// because we bailout on the primary tree completely and leave it in its old
|
|
1857
|
+
// state, no effects. Same as what we do for Offscreen (except that
|
|
1858
|
+
// Offscreen doesn't have the first render pass).
|
|
1859
|
+
//
|
|
1860
|
+
// Second is hydration. During hydration, the Suspense fiber has a slightly
|
|
1861
|
+
// different layout, where the child points to a dehydrated fragment, which
|
|
1862
|
+
// contains the DOM rendered by the server.
|
|
1863
|
+
//
|
|
1864
|
+
// Third, even if you set all that aside, Suspense is like error boundaries in
|
|
1865
|
+
// that we first we try to render one tree, and if that fails, we render again
|
|
1866
|
+
// and switch to a different tree. Like a try/catch block. So we have to track
|
|
1867
|
+
// which branch we're currently rendering. Ideally we would model this using
|
|
1868
|
+
// a stack.
|
|
1869
|
+
if(d||ml(i,e)?(o=!0,n.flags&=-65):(null===e||null!==e.memoizedState)&&void 0!==a.fallback&&!0!==a.unstable_avoidThisFallback&&(i=yr(i,1)),i=hr(i),xr(n,i),null===e){void 0!==a.fallback&&Nr(n);var r=a.children,s=a.fallback;if(o){var l=yl(n,r,s,t),u=n.child;return u.memoizedState=fl(t),n.memoizedState=vE,l}if("number"==typeof a.unstable_expectedLoadTime){// This is a CPU-bound tree. Skip this tree and show a placeholder to
|
|
1870
|
+
// unblock the surrounding content. Then immediately retry after the
|
|
1871
|
+
// initial commit.
|
|
1872
|
+
var c=yl(n,r,s,t),f=n.child;return f.memoizedState=fl(t),n.memoizedState=vE,n.lanes=33554432,Vc(33554432),c}return bl(n,r,t)}// This is an update.
|
|
1873
|
+
// If the current fiber has a SuspenseState, that means it's already showing
|
|
1874
|
+
// a fallback.
|
|
1875
|
+
var p=e.memoizedState;if(null!==p){if(o){var m=a.fallback,g=a.children,h=wl(e,n,g,m,t),b=n.child,y=e.child.memoizedState;return b.memoizedState=null===y?fl(t):pl(y,t),b.childLanes=gl(e,t),n.memoizedState=vE,h}var x=a.children,v=vl(e,n,x,t);return n.memoizedState=null,v}// The current tree is not already showing a fallback.
|
|
1876
|
+
if(o){// Timed out.
|
|
1877
|
+
var w=a.fallback,k=a.children,E=wl(e,n,k,w,t),S=n.child,C=e.child.memoizedState;return S.memoizedState=null===C?fl(t):pl(C,t),S.childLanes=gl(e,t),n.memoizedState=vE,E}// Still haven't timed out. Continue rendering the children, like we
|
|
1878
|
+
// normally do.
|
|
1879
|
+
var _=a.children,N=vl(e,n,_,t);return n.memoizedState=null,N}function bl(e,n,t){var a=e.mode,i={mode:"visible",children:n},o=yf(i,a,t,null);return o.return=e,e.child=o,o}function yl(e,n,t,a){var i=e.mode,o=e.child,d={mode:"hidden",children:n},r,s;return 0===(2&i)&&null!==o?(r=o,r.childLanes=0,r.pendingProps=d,8&e.mode&&(r.actualDuration=0,r.actualStartTime=-1,r.selfBaseDuration=0,r.treeBaseDuration=0),s=mf(t,i,a,null)):(r=yf(d,i,0,null),s=mf(t,i,a,null)),r.return=e,s.return=e,r.sibling=s,e.child=r,s}function xl(e,n){// The props argument to `createWorkInProgress` is `any` typed, so we use this
|
|
1880
|
+
// wrapper function to constrain it.
|
|
1881
|
+
return lf(e,n)}function vl(e,n,t,a){var i=e.child,o=i.sibling,d=xl(i,{mode:"visible",children:t});return 0===(2&n.mode)&&(d.lanes=a),d.return=n,d.sibling=null,null!==o&&(o.nextEffect=null,o.flags=8,n.firstEffect=n.lastEffect=o),n.child=d,d}function wl(e,n,t,a,i){var o=n.mode,d=e.child,r=d.sibling,s={mode:"hidden",children:t},l;if(// In legacy mode, we commit the primary tree as if it successfully
|
|
1882
|
+
// completed, even though it's in an inconsistent state.
|
|
1883
|
+
0===(2&o)&&// Make sure we're on the second pass, i.e. the primary child fragment was
|
|
1884
|
+
// already cloned. In legacy mode, the only case where this isn't true is
|
|
1885
|
+
// when DevTools forces us to display a fallback; we skip the first render
|
|
1886
|
+
// pass entirely and go straight to rendering the fallback. (In Concurrent
|
|
1887
|
+
// Mode, SuspenseList can also trigger this scenario, but this is a legacy-
|
|
1888
|
+
// only codepath.)
|
|
1889
|
+
n.child!==d){var u=n.child;l=u,l.childLanes=0,l.pendingProps=s,8&n.mode&&(l.actualDuration=0,l.actualStartTime=-1,l.selfBaseDuration=d.selfBaseDuration,l.treeBaseDuration=d.treeBaseDuration);// The fallback fiber was added as a deletion effect during the first pass.
|
|
1890
|
+
// However, since we're going to remain on the fallback, we no longer want
|
|
1891
|
+
// to delete it. So we need to remove it from the list. Deletions are stored
|
|
1892
|
+
// on the same list as effects. We want to keep the effects from the primary
|
|
1893
|
+
// tree. So we copy the primary child fragment's effect list, which does not
|
|
1894
|
+
// include the fallback deletion effect.
|
|
1895
|
+
var c=l.lastEffect;null===c?n.firstEffect=n.lastEffect=null:(n.firstEffect=l.firstEffect,n.lastEffect=c,c.nextEffect=null)}else l=xl(d,s);var f;return null===r?(f=mf(a,o,i,null),f.flags|=2):f=lf(r,a),f.return=n,l.return=n,l.sibling=f,n.child=l,f}function kl(e,n){e.lanes=gt(e.lanes,n);var t=e.alternate;null!==t&&(t.lanes=gt(t.lanes,n)),Id(e.return,n)}function El(e,n,t){// Mark any Suspense boundaries with fallbacks as having work to do.
|
|
1896
|
+
// If they were previously forced into fallbacks, they may now be able
|
|
1897
|
+
// to unblock.
|
|
1898
|
+
for(var a=n;null!==a;){if(a.tag===13){var i=a.memoizedState;null!==i&&kl(a,t)}else if(a.tag===19)// If the tail is hidden there might not be an Suspense boundaries
|
|
1899
|
+
// to schedule work on. In this case we have to schedule it on the
|
|
1900
|
+
// list itself.
|
|
1901
|
+
// We don't have to traverse to the children of the list since
|
|
1902
|
+
// the list will propagate the change when it rerenders.
|
|
1903
|
+
kl(a,t);else if(null!==a.child){a.child.return=a,a=a.child;continue}if(a===e)return;for(;null===a.sibling;){if(null===a.return||a.return===e)return;a=a.return}a.sibling.return=a.return,a=a.sibling}}function Sl(e){// This is going to find the last row among these children that is already
|
|
1904
|
+
// showing content on the screen, as opposed to being in fallback state or
|
|
1905
|
+
// new. If a row has multiple Suspense boundaries, any of them being in the
|
|
1906
|
+
// fallback state, counts as the whole row being in a fallback state.
|
|
1907
|
+
// Note that the "rows" will be workInProgress, but any nested children
|
|
1908
|
+
// will still be current since we haven't rendered them yet. The mounted
|
|
1909
|
+
// order may not be the same as the new order. We use the new order.
|
|
1910
|
+
for(var n=e,t=null;null!==n;){var a=n.alternate;// New rows can't be content rows.
|
|
1911
|
+
null!==a&&null===kr(a)&&(t=n),n=n.sibling}return t}function Cl(e){if(void 0!==e&&"forwards"!==e&&"backwards"!==e&&"together"!==e&&!bE[e])if(bE[e]=!0,"string"==typeof e)switch(e.toLowerCase()){case"together":case"forwards":case"backwards":{d("\"%s\" is not a valid value for revealOrder on <SuspenseList />. Use lowercase \"%s\" instead.",e,e.toLowerCase());break}case"forward":case"backward":{d("\"%s\" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use \"%ss\" instead.",e,e.toLowerCase());break}default:d("\"%s\" is not a supported revealOrder on <SuspenseList />. Did you mean \"together\", \"forwards\" or \"backwards\"?",e);}else d("%s is not a supported value for revealOrder on <SuspenseList />. Did you mean \"together\", \"forwards\" or \"backwards\"?",e)}function _l(e,n){e===void 0||yE[e]||("collapsed"!==e&&"hidden"!==e?(yE[e]=!0,d("\"%s\" is not a supported value for tail on <SuspenseList />. Did you mean \"collapsed\" or \"hidden\"?",e)):"forwards"!==n&&"backwards"!==n&&(yE[e]=!0,d("<SuspenseList tail=\"%s\" /> is only valid if revealOrder is \"forwards\" or \"backwards\". Did you mean to specify revealOrder=\"forwards\"?",e)))}function Nl(e,n){{var t=Array.isArray(e),a=!t&&"function"==typeof v(e);if(t||a){var i=t?"array":"iterable";return d("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",i,n,i),!1}}return!0}function Tl(e,n){if(("forwards"===n||"backwards"===n)&&void 0!==e&&null!==e&&!1!==e)if(Array.isArray(e)){for(var t=0;t<e.length;t++)if(!Nl(e[t],t))return;}else{var a=v(e);if("function"==typeof a){var o=a.call(e);if(o)for(var r=o.next(),s=0;!r.done;r=o.next()){if(!Nl(r.value,s))return;s++}}else d("A single row was passed to a <SuspenseList revealOrder=\"%s\" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?",n)}}function Rl(e,n,t,a,i,o){var d=e.memoizedState;null===d?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:a,tail:t,tailMode:i,lastEffect:o}:(d.isBackwards=n,d.rendering=null,d.renderingStartTime=0,d.last=a,d.tail=t,d.tailMode=i,d.lastEffect=o)}// This can end up rendering this component multiple passes.
|
|
1912
|
+
// The first pass splits the children fibers into two sets. A head and tail.
|
|
1913
|
+
// We first render the head. If anything is in fallback state, we do another
|
|
1914
|
+
// pass through beginWork to rerender all children (including the tail) with
|
|
1915
|
+
// the force suspend context. If the first render didn't have anything in
|
|
1916
|
+
// in fallback state. Then we render each row in the tail one-by-one.
|
|
1917
|
+
// That happens in the completeWork phase without going back to beginWork.
|
|
1918
|
+
function Pl(e,n,t){var a=n.pendingProps,i=a.revealOrder,o=a.tail,d=a.children;Cl(i),_l(o,i),Tl(d,i),qs(e,n,d,t);var r=Ek.current,s=gr(r,2);if(s)r=br(r,2),n.flags|=64;else{var l=null!==e&&0!==(64&e.flags);l&&El(n,n.child,t),r=hr(r)}if(xr(n,r),0===(2&n.mode))n.memoizedState=null;else switch(i){case"forwards":{var u=Sl(n.child),c;null===u?(c=n.child,n.child=null):(c=u.sibling,u.sibling=null),Rl(n,!1,// isBackwards
|
|
1919
|
+
c,u,o,n.lastEffect);break}case"backwards":{// We're going to find the first row that has existing content.
|
|
1920
|
+
// At the same time we're going to reverse the list of everything
|
|
1921
|
+
// we pass in the meantime. That's going to be our tail in reverse
|
|
1922
|
+
// order.
|
|
1923
|
+
var f=null,p=n.child;for(n.child=null;null!==p;){var m=p.alternate;// New rows can't be content rows.
|
|
1924
|
+
if(null!==m&&null===kr(m)){n.child=p;break}var g=p.sibling;p.sibling=f,f=p,p=g}// TODO: If workInProgress.child is null, we can continue on the tail immediately.
|
|
1925
|
+
Rl(n,!0,// isBackwards
|
|
1926
|
+
f,null,// last
|
|
1927
|
+
o,n.lastEffect);break}case"together":{Rl(n,!1,// isBackwards
|
|
1928
|
+
null,// tail
|
|
1929
|
+
null,void 0,n.lastEffect);break}default:n.memoizedState=null;}return n.child}function Il(e,n,t){ur(n,n.stateNode.containerInfo);var a=n.pendingProps;return null===e?n.child=pk(n,null,a,t):qs(e,n,a,t),n.child}function Ll(e,n,t){var a=n.type,i=a._context,o=n.pendingProps,r=n.memoizedProps,s=o.value;{"value"in o||wE||(wE=!0,d("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?"));var l=n.type.propTypes;l&&$o(l,o,"prop","Context.Provider")}if(Td(n,s),null!==r){var u=r.value,c=Pd(i,s,u);if(0!==c)Ld(n,i,c,t);else// No change. Bailout early if children are the same.
|
|
1930
|
+
if(r.children===o.children&&!td())return Al(e,n,t)}var f=o.children;return qs(e,n,f,t),n.child}function Dl(e,n,t){var a=n.type;// The logic below for Context differs depending on PROD or DEV mode. In
|
|
1931
|
+
// DEV mode, we create a separate object for Context.Consumer that acts
|
|
1932
|
+
// like a proxy to Context. This proxy object adds unnecessary code in PROD
|
|
1933
|
+
// so we use the old behaviour (Context.Consumer references Context) to
|
|
1934
|
+
// reduce size and overhead. The separate object references context via
|
|
1935
|
+
// a property called "_context", which also gives us the ability to check
|
|
1936
|
+
// in DEV mode if this property exists or not and warn if it does not.
|
|
1937
|
+
void 0===a._context?a!==a.Consumer&&!kE&&(kE=!0,d("Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")):a=a._context;var i=n.pendingProps,o=i.children;"function"!=typeof o&&d("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),Dd(n,t);var r=zd(a,i.unstable_observedBits),s;return lE.current=n,F(!0),s=o(r),F(!1),n.flags|=1,qs(e,n,s,t),n.child}function zl(){uE=!0}function Al(e,n,t){// Check if the children have any pending work.
|
|
1938
|
+
return null!==e&&(n.dependencies=e.dependencies),// Don't update "base" render times for bailouts.
|
|
1939
|
+
Vs(),nc(n.lanes),pt(t,n.childLanes)?(dr(e,n),n.child):null}function Ol(e,n,t){{var a=n.return;if(null===a)throw new Error("Cannot swap the root fiber.");// Disconnect from the old current.
|
|
1940
|
+
// It will get deleted.
|
|
1941
|
+
// Replace the child/sibling pointers above it.
|
|
1942
|
+
if(e.alternate=null,n.alternate=null,t.index=n.index,t.sibling=n.sibling,t.return=n.return,t.ref=n.ref,n===a.child)a.child=t;else{var i=a.child;if(null===i)throw new Error("Expected parent to have a child.");for(;i.sibling!==n;)if(i=i.sibling,null===i)throw new Error("Expected to find the previous sibling.");i.sibling=t}// Delete the old fiber and place the new one.
|
|
1943
|
+
// Since the old fiber is disconnected, we have to schedule it manually.
|
|
1944
|
+
var o=a.lastEffect;// Restart work from the new fiber.
|
|
1945
|
+
return null===o?a.firstEffect=a.lastEffect=e:(o.nextEffect=e,a.lastEffect=e),e.nextEffect=null,e.flags=8,t.flags|=2,t}}function Ml(e,n,t){var a=n.lanes;if(n._debugNeedsRemount&&null!==e)// This will restart the begin phase with a new fiber.
|
|
1946
|
+
return Ol(e,n,ff(n.type,n.key,n.pendingProps,n._debugOwner||null,n.mode,n.lanes));if(null!==e){var i=e.memoizedProps,o=n.pendingProps;if(i!==o||td()||// Force a re-render if the implementation changed due to hot reload:
|
|
1947
|
+
n.type!==e.type)uE=!0;else{if(!pt(t,a)){// This fiber does not have any pending work. Bailout without entering
|
|
1948
|
+
// the begin phase. There's still some bookkeeping we that needs to be done
|
|
1949
|
+
// in this optimized path, mostly pushing stuff onto the stack.
|
|
1950
|
+
switch(uE=!1,n.tag){case 3:il(n),Dr();break;case 5:pr(n);break;case 1:{var d=n.type;ad(d)&&sd(n);break}case 4:ur(n,n.stateNode.containerInfo);break;case 10:{var r=n.memoizedProps.value;Td(n,r);break}case 12:{// Profiler should only call onRender when one of its descendants actually rendered.
|
|
1951
|
+
var s=pt(t,n.childLanes);s&&(n.flags|=4);// Reset effect durations for the next eventual effect phase.
|
|
1952
|
+
// These are reset during render to allow the DevTools commit hook a chance to read them,
|
|
1953
|
+
var l=n.stateNode;l.effectDuration=0,l.passiveEffectDuration=0}break;case 13:{var u=n.memoizedState;if(null!==u){// whether to retry the primary children, or to skip over it and
|
|
1954
|
+
// go straight to the fallback. Check the priority of the primary
|
|
1955
|
+
// child fragment.
|
|
1956
|
+
var c=n.child,f=c.childLanes;if(pt(t,f))// The primary children have pending work. Use the normal path
|
|
1957
|
+
// to attempt to render the primary children again.
|
|
1958
|
+
return hl(e,n,t);xr(n,hr(Ek.current));// The primary children do not have pending work with sufficient
|
|
1959
|
+
// priority. Bailout.
|
|
1960
|
+
var p=Al(e,n,t);return null===p?null:p.sibling}xr(n,hr(Ek.current));break}case 19:{var m=0!==(64&e.flags),g=pt(t,n.childLanes);if(m){if(g)// If something was in fallback state last time, and we have all the
|
|
1961
|
+
// same children then we're still in progressive loading state.
|
|
1962
|
+
// Something might get unblocked by state updates or retries in the
|
|
1963
|
+
// tree which will affect the tail. So we need to use the normal
|
|
1964
|
+
// path to compute the correct tail.
|
|
1965
|
+
return Pl(e,n,t);// If none of the children had any work, that means that none of
|
|
1966
|
+
// them got retried so they'll still be blocked in the same way
|
|
1967
|
+
// as before. We can fast bail out.
|
|
1968
|
+
n.flags|=64}// If nothing suspended before and we're rendering the same children,
|
|
1969
|
+
// then the tail doesn't matter. Anything new that suspends will work
|
|
1970
|
+
// in the "together" mode, so we can continue from the state we had.
|
|
1971
|
+
var h=n.memoizedState;if(null!==h&&(h.rendering=null,h.tail=null,h.lastEffect=null),xr(n,Ek.current),g)break;else// If none of the children had any work, that means that none of
|
|
1972
|
+
// them got retried so they'll still be blocked in the same way
|
|
1973
|
+
// as before. We can fast bail out.
|
|
1974
|
+
return null}case 23:case 24:return n.lanes=0,Xs(e,n,t);}return Al(e,n,t)}uE=0!==(16384&e.flags)}}else uE=!1;// Before entering the begin phase, clear pending update priority.
|
|
1975
|
+
// TODO: This assumes that we're about to evaluate the component and process
|
|
1976
|
+
// the update queue. However, there's an exception: SimpleMemoComponent
|
|
1977
|
+
// sometimes bails out later in the begin phase. This indicates that we should
|
|
1978
|
+
// move this assignment out of the common path and into each branch.
|
|
1979
|
+
switch(n.lanes=0,n.tag){case 2:return ul(e,n,n.type,t);case 16:{var b=n.elementType;return sl(e,n,b,a,t)}case 0:{var y=n.type,x=n.pendingProps,v=n.elementType===y?x:Sd(y,x);return nl(e,n,y,v,t)}case 1:{var w=n.type,k=n.pendingProps,E=n.elementType===w?k:Sd(w,k);return tl(e,n,w,E,t)}case 3:return ol(e,n,t);case 5:return dl(e,n,t);case 6:return rl(e,n);case 13:return hl(e,n,t);case 4:return Il(e,n,t);case 11:{var S=n.type,C=n.pendingProps,_=n.elementType===S?C:Sd(S,C);return Ks(e,n,S,_,t)}case 7:return Gs(e,n,t);case 8:return Zs(e,n,t);case 12:return Js(e,n,t);case 10:return Ll(e,n,t);case 9:return Dl(e,n,t);case 14:{var N=n.type,T=n.pendingProps,R=Sd(N,T);if(n.type!==n.elementType){var P=N.propTypes;P&&$o(P,R,// Resolved for outer only
|
|
1980
|
+
"prop",z(N))}return R=Sd(N.type,R),Ys(e,n,N,R,a,t)}case 15:return $s(e,n,n.type,n.pendingProps,a,t);case 17:{var I=n.type,L=n.pendingProps,D=n.elementType===I?L:Sd(I,L);return ll(e,n,I,D,t)}case 19:return Pl(e,n,t);case 20:break;case 21:break;case 22:break;case 23:return Xs(e,n,t);case 24:return xE(e,n,t);}throw Error("Unknown unit of work tag ("+n.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function Ul(e){// Tag the fiber with an update effect. This turns a Placement into
|
|
1981
|
+
// a PlacementAndUpdate.
|
|
1982
|
+
e.flags|=4}function Fl(e){e.flags|=128}function Bl(e,n){if(!zr())// If we're hydrating, we should consume as many items as we can
|
|
1983
|
+
// so we don't leave any behind.
|
|
1984
|
+
switch(e.tailMode){case"hidden":{// Any insertions at the end of the tail list after this point
|
|
1985
|
+
// should be invisible. If there are already mounted boundaries
|
|
1986
|
+
// anything before them are not considered for collapsing.
|
|
1987
|
+
// Therefore we need to go through the whole tail to find if
|
|
1988
|
+
// there are any.
|
|
1989
|
+
for(var t=e.tail,a=null;null!==t;)null!==t.alternate&&(a=t),t=t.sibling;// Next we're simply going to delete all insertions after the
|
|
1990
|
+
// last rendered item.
|
|
1991
|
+
null===a?e.tail=null:a.sibling=null;break}case"collapsed":{// Any insertions at the end of the tail list after this point
|
|
1992
|
+
// should be invisible. If there are already mounted boundaries
|
|
1993
|
+
// anything before them are not considered for collapsing.
|
|
1994
|
+
// Therefore we need to go through the whole tail to find if
|
|
1995
|
+
// there are any.
|
|
1996
|
+
for(var i=e.tail,o=null;null!==i;)null!==i.alternate&&(o=i),i=i.sibling;// Next we're simply going to delete all insertions after the
|
|
1997
|
+
// last rendered item.
|
|
1998
|
+
null===o?n||null===e.tail?e.tail=null:e.tail.sibling=null:o.sibling=null;break}}}function Wl(e,n,t){var a=n.pendingProps;switch(n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:{var i=n.type;return ad(i)&&id(n),null}case 3:{cr(n),od(n),Or();var o=n.stateNode;if(o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),null===e||null===e.child){// If we hydrated, pop so that we can delete any remaining children
|
|
1999
|
+
// that weren't hydrated.
|
|
2000
|
+
var d=Lr(n);d?Ul(n):!o.hydrate&&(n.flags|=256)}return SE(n),null}case 5:{mr(n);var r=lr(),s=n.type;if(null!==e&&null!=n.stateNode)CE(e,n,s,a,r),e.ref!==n.ref&&Fl(n);else{if(!a){if(null===n.stateNode)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");// This can happen when we abort work.
|
|
2001
|
+
return null}var l=fr(),u=Lr(n);// TODO: Move createInstance to beginWork and keep it on a context
|
|
2002
|
+
// "stack" as the parent. Then append children as we go in beginWork
|
|
2003
|
+
// or completeWork depending on whether we want to add them top->down or
|
|
2004
|
+
// bottom->up. Top->down is faster in IE11.
|
|
2005
|
+
if(u)Tr(n,r,l)&&Ul(n);else{var c=Hi(s,a,r,l,n);EE(c,n,!1,!1),n.stateNode=c,Qi(c,s,a,r)&&Ul(n)}null!==n.ref&&Fl(n)}return null}case 6:{var f=a;if(e&&null!=n.stateNode){var p=e.memoizedProps;// If we have an alternate, that means this is an update and we need
|
|
2006
|
+
// to schedule a side-effect to do the updates.
|
|
2007
|
+
_E(e,n,p,f)}else{if("string"!=typeof f&&null===n.stateNode)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");// This can happen when we abort work.
|
|
2008
|
+
var m=lr(),g=fr(),h=Lr(n);h?Rr(n)&&Ul(n):n.stateNode=$i(f,m,g,n)}return null}case 13:{vr(n);var b=n.memoizedState;if(0!==(64&n.flags))return n.lanes=t,0!==(8&n.mode)&&Hs(n),n;var y=null!==b,x=!1;if(null===e)void 0!==n.memoizedProps.fallback&&Lr(n);else{var v=e.memoizedState;x=null!==v}if(y&&!x&&0!==(2&n.mode))// If this subtreee is running in blocking mode we can suspend,
|
|
2009
|
+
// otherwise we won't suspend.
|
|
2010
|
+
// TODO: This will still suspend a synchronous tree if anything
|
|
2011
|
+
// in the concurrent tree already suspended during this render.
|
|
2012
|
+
// This is a known bug.
|
|
2013
|
+
{// TODO: Move this back to throwException because this is too late
|
|
2014
|
+
// if this is a large tree which is common for initial loads. We
|
|
2015
|
+
// don't know if we should restart a render or not until we get
|
|
2016
|
+
// this marker, and this is too late.
|
|
2017
|
+
// If this render already had a ping or lower pri updates,
|
|
2018
|
+
// and this is the first time we know we're going to suspend we
|
|
2019
|
+
// should be able to immediately restart from within throwException.
|
|
2020
|
+
var w=null===e&&!0!==n.memoizedProps.unstable_avoidThisFallback;w||gr(Ek.current,1)?tc():ac()}return(y||x)&&(n.flags|=4),null}case 4:return cr(n),SE(n),null===e&&Mo(n.stateNode.containerInfo),null;case 10:return Rd(n),null;case 17:{// Same as class component case. I put it down here so that the tags are
|
|
2021
|
+
// sequential to ensure this switch is compiled to a jump table.
|
|
2022
|
+
var k=n.type;return ad(k)&&id(n),null}case 19:{vr(n);var E=n.memoizedState;if(null===E)// We're running in the default, "independent" mode.
|
|
2023
|
+
// We don't do anything in this mode.
|
|
2024
|
+
return null;var S=0!==(64&n.flags),C=E.rendering;if(null!==C){// Append the rendered row to the child list.
|
|
2025
|
+
if(!S){var _=kr(C);if(null!==_){n.flags|=64,S=!0;// Ensure we transfer the update queue to the parent so that it doesn't
|
|
2026
|
+
// get lost if this row ends up dropped during a second pass.
|
|
2027
|
+
var N=_.updateQueue;// This might have been modified.
|
|
2028
|
+
if(null!==N&&(n.updateQueue=N,n.flags|=4),Bl(E,!0),null===E.tail&&"hidden"===E.tailMode&&!C.alternate&&!zr()// We don't cut it if we're hydrating.
|
|
2029
|
+
){// We need to delete the row we just rendered.
|
|
2030
|
+
// Reset the effect list to what it was before we rendered this
|
|
2031
|
+
// child. The nested children have already appended themselves.
|
|
2032
|
+
var T=n.lastEffect=E.lastEffect;// Remove any effects that were appended after this point.
|
|
2033
|
+
// We're done.
|
|
2034
|
+
return null!==T&&(T.nextEffect=null),null}}else// The time it took to render last row is greater than the remaining
|
|
2035
|
+
// time we have to render. So rendering one more row would likely
|
|
2036
|
+
// exceed it.
|
|
2037
|
+
2*lw()-E.renderingStartTime>Nu()&&1073741824!==t&&(// We have now passed our CPU deadline and we'll just give up further
|
|
2038
|
+
// attempts to render the main content and only render fallbacks.
|
|
2039
|
+
// The assumption is that this is usually faster.
|
|
2040
|
+
// Since nothing actually suspended, there will nothing to ping this
|
|
2041
|
+
// to get it started back up to attempt the next item. While in terms
|
|
2042
|
+
// of priority this work has the same priority as this current render,
|
|
2043
|
+
// it's not part of the same transition once the transition has
|
|
2044
|
+
// committed. If it's sync, we still want to yield so that it can be
|
|
2045
|
+
// painted. Conceptually, this is really the same as pinging.
|
|
2046
|
+
// We can use any RetryLane even if it's the one currently rendering
|
|
2047
|
+
// since we're leaving it behind on this node.
|
|
2048
|
+
n.flags|=64,S=!0,Bl(E,!1),n.lanes=33554432,Vc(33554432))}if(E.isBackwards)C.sibling=n.child,n.child=C;else{var R=E.last;null===R?n.child=C:R.sibling=C,E.last=C}}else// We just rendered the head.
|
|
2049
|
+
if(!S){// This is the first pass. We need to figure out if anything is still
|
|
2050
|
+
// suspended in the rendered set.
|
|
2051
|
+
// If new content unsuspended, but there's still some content that
|
|
2052
|
+
// didn't. Then we need to do a second pass that forces everything
|
|
2053
|
+
// to keep showing their fallbacks.
|
|
2054
|
+
// We might be suspended if something in this render pass suspended, or
|
|
2055
|
+
// something in the previous committed pass suspended. Otherwise,
|
|
2056
|
+
// there's no chance so we can skip the expensive call to
|
|
2057
|
+
// findFirstSuspended.
|
|
2058
|
+
var P=oc()&&(null===e||0===(64&e.flags));if(!P)for(var I=n.child,L;null!==I;){if(L=kr(I),null!==L){S=!0,n.flags|=64,Bl(E,!1);// If this is a newly suspended tree, it might not get committed as
|
|
2059
|
+
// part of the second pass. In that case nothing will subscribe to
|
|
2060
|
+
// its thennables. Instead, we'll transfer its thennables to the
|
|
2061
|
+
// SuspenseList so that it can retry if they resolve.
|
|
2062
|
+
// There might be multiple of these in the list but since we're
|
|
2063
|
+
// going to wait for all of them anyway, it doesn't really matter
|
|
2064
|
+
// which ones gets to ping. In theory we could get clever and keep
|
|
2065
|
+
// track of how many dependencies remain but it gets tricky because
|
|
2066
|
+
// in the meantime, we can add/remove/change items and dependencies.
|
|
2067
|
+
// We might bail out of the loop before finding any but that
|
|
2068
|
+
// doesn't matter since that means that the other boundaries that
|
|
2069
|
+
// we did find already has their listeners attached.
|
|
2070
|
+
var D=L.updateQueue;return null!==D&&(n.updateQueue=D,n.flags|=4),null===E.lastEffect&&(n.firstEffect=null),n.lastEffect=E.lastEffect,rr(n,t),xr(n,br(Ek.current,2)),n.child}I=I.sibling}null!==E.tail&&lw()>Nu()&&(n.flags|=64,S=!0,Bl(E,!1),n.lanes=33554432,Vc(33554432))}else Bl(E,!1);// Next we're going to render the tail.
|
|
2071
|
+
if(null!==E.tail){// We still have tail rows to render.
|
|
2072
|
+
// Pop a row.
|
|
2073
|
+
var z=E.tail;E.rendering=z,E.tail=z.sibling,E.lastEffect=n.lastEffect,E.renderingStartTime=lw(),z.sibling=null;// Restore the context.
|
|
2074
|
+
// TODO: We can probably just avoid popping it instead and only
|
|
2075
|
+
// setting it the first time we go from not suspended to suspended.
|
|
2076
|
+
var A=Ek.current;// Do a pass over the next row.
|
|
2077
|
+
return A=S?br(A,2):hr(A),xr(n,A),z}return null}case 20:break;case 21:break;case 22:break;case 23:case 24:{if(Ku(n),null!==e){var O=n.memoizedState,M=e.memoizedState,U=null!==M,F=null!==O;U!==F&&"unstable-defer-without-hiding"!==a.mode&&(n.flags|=4)}return null}}throw Error("Unknown unit of work tag ("+n.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function Vl(e,n){switch(e.tag){case 1:{var t=e.type;ad(t)&&id(e);var a=e.flags;return 4096&a?(e.flags=64|-4097&a,0!==(8&e.mode)&&Hs(e),e):null}case 3:{cr(e),od(e),Or();var i=e.flags;if(0!==(64&i))throw Error("The root failed to unmount after an error. This is likely a bug in React. Please file an issue.");return e.flags=64|-4097&i,e}case 5:return mr(e),null;case 13:{vr(e);var o=e.flags;return 4096&o?(e.flags=64|-4097&o,0!==(8&e.mode)&&Hs(e),e):null}case 19:// SuspenseList doesn't actually catch anything. It should've been
|
|
2078
|
+
// caught by a nested boundary. If not, it should bubble through.
|
|
2079
|
+
return vr(e),null;case 4:return cr(e),null;case 10:return Rd(e),null;case 23:case 24:return Ku(e),null;default:return null;}}function jl(e){switch(e.tag){case 1:{var n=e.type.childContextTypes;null!==n&&n!==void 0&&id(e);break}case 3:{cr(e),od(e),Or();break}case 5:{mr(e);break}case 4:cr(e);break;case 13:vr(e);break;case 19:vr(e);break;case 10:Rd(e);break;case 23:case 24:Ku(e);}}function Hl(e,n){// If the value is an error, call this function immediately after it is thrown
|
|
2080
|
+
// so the stack is accurate.
|
|
2081
|
+
return{value:e,source:n,stack:I(n)}}// This module is forked in different environments.
|
|
2082
|
+
// By default, return `true` to log errors to the console.
|
|
2083
|
+
// Forks can return `false` if this isn't desirable.
|
|
2084
|
+
function ql(e,n){return!0}function Ql(e,n){try{var t=ql(e,n);// Allow injected showErrorDialog() to prevent default console.error logging.
|
|
2085
|
+
// This enables renderers like ReactNative to better manage redbox behavior.
|
|
2086
|
+
if(!1===t)return;var a=n.value;var i=n.source,o=n.stack,d=null===o?"":o;// Browsers support silencing uncaught errors by calling
|
|
2087
|
+
// `preventDefault()` in window `error` handler.
|
|
2088
|
+
// We record this information as an expando on the error.
|
|
2089
|
+
if(null!=a&&a._suppressLogging){if(1===e.tag)// The error is recoverable and was silenced.
|
|
2090
|
+
// Ignore it and don't print the stack addendum.
|
|
2091
|
+
// This is handy for testing error boundaries without noise.
|
|
2092
|
+
return;// The error is fatal. Since the silencing might have
|
|
2093
|
+
// been accidental, we'll surface it anyway.
|
|
2094
|
+
// However, the browser would have silenced the original error
|
|
2095
|
+
// so we'll print it first, and then print the stack addendum.
|
|
2096
|
+
console.error(a)}var r=i?z(i.type):null,s=r?"The above error occurred in the <"+r+"> component:":"The above error occurred in one of your React components:",l=z(e.type),u;u=l?"React will try to recreate this component tree from scratch using the error boundary you provided, "+l+".":"Consider adding an error boundary to your tree to customize error handling behavior.\nVisit https://reactjs.org/link/error-boundaries to learn more about error boundaries.";var c=s+"\n"+d+"\n\n"+(""+u);// In development, we provide our own message with just the component stack.
|
|
2097
|
+
// We don't include the original error message and JS stack because the browser
|
|
2098
|
+
// has already printed it. Even if the application swallows the error, it is still
|
|
2099
|
+
// displayed by the browser thanks to the DEV-only fake event trick in ReactErrorUtils.
|
|
2100
|
+
console.error(c)}catch(n){// This method must not throw, or React internal state will get messed up.
|
|
2101
|
+
// If console.error is overridden, or logCapturedError() shows a dialog that throws,
|
|
2102
|
+
// we want to report this error outside of the normal stack as a last resort.
|
|
2103
|
+
// https://github.com/facebook/react/issues/13188
|
|
2104
|
+
setTimeout(function(){throw n})}}function Kl(e,n,t){var a=Md(-1,t);// Unmount the root by rendering null.
|
|
2105
|
+
a.tag=3,a.payload={element:null};var i=n.value;return a.callback=function(){MS(i),Ql(e,n)},a}function Yl(e,n,t){var a=Md(-1,t);a.tag=3;var i=e.type.getDerivedStateFromError;if("function"==typeof i){var o=n.value;a.payload=function(){return Ql(e,n),i(o)}}var r=e.stateNode;return a.callback=null!==r&&"function"==typeof r.componentDidCatch?function t(){Jc(e),"function"!=typeof i&&(Sc(this),Ql(e,n));var a=n.value,o=n.stack;this.componentDidCatch(a,{componentStack:null===o?"":o}),"function"==typeof i||pt(e.lanes,1)||d("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",z(e.type)||"Unknown")}:function(){Jc(e)},a}function $l(e,n,t){// Attach a listener to the promise to "ping" the root and retry. But only if
|
|
2106
|
+
// one does not already exist for the lanes we're currently rendering (which
|
|
2107
|
+
// acts like a "thread ID" here).
|
|
2108
|
+
var a=e.pingCache,i;if(null===a?(a=e.pingCache=new NE,i=new Set,a.set(n,i)):(i=a.get(n),void 0===i&&(i=new Set,a.set(n,i))),!i.has(t)){i.add(t);var o=Tc.bind(null,e,n,t);n.then(o,o)}}function Xl(e,n,t,a,i){if(t.flags|=2048,t.firstEffect=t.lastEffect=null,null!==a&&"object"==typeof a&&"function"==typeof a.then){// This is a wakeable.
|
|
2109
|
+
var o=a;if(0===(2&t.mode)){// Reset the memoizedState to what it was before we attempted
|
|
2110
|
+
// to render it.
|
|
2111
|
+
var d=t.alternate;d?(t.updateQueue=d.updateQueue,t.memoizedState=d.memoizedState,t.lanes=d.lanes):(t.updateQueue=null,t.memoizedState=null)}var r=gr(Ek.current,1),s=n;// Schedule the nearest Suspense to re-render the timed out view.
|
|
2112
|
+
do{if(13===s.tag&&wr(s,r)){// Found the nearest boundary.
|
|
2113
|
+
// Stash the promise on the boundary fiber. If the boundary times out, we'll
|
|
2114
|
+
// attach another listener to flip the boundary back to its normal state.
|
|
2115
|
+
var l=s.updateQueue;if(null===l){var u=new Set;u.add(o),s.updateQueue=u}else l.add(o);// If the boundary is outside of blocking mode, we should *not*
|
|
2116
|
+
// suspend the commit. Pretend as if the suspended component rendered
|
|
2117
|
+
// null and keep rendering. In the commit phase, we'll schedule a
|
|
2118
|
+
// subsequent synchronous update to re-render the Suspense.
|
|
2119
|
+
//
|
|
2120
|
+
// Note: It doesn't matter whether the component that suspended was
|
|
2121
|
+
// inside a blocking mode tree. If the Suspense is outside of it, we
|
|
2122
|
+
// should *not* suspend the commit.
|
|
2123
|
+
if(0===(2&s.mode)){if(s.flags|=64,t.flags|=16384,t.flags&=-2981,1===t.tag){var c=t.alternate;if(null===c)t.tag=17;else{// When we try rendering again, we should not reuse the current fiber,
|
|
2124
|
+
// since it's known to be in an inconsistent state. Use a force update to
|
|
2125
|
+
// prevent a bail out.
|
|
2126
|
+
var f=Md(-1,1);f.tag=2,Ud(t,f)}}// The source fiber did not complete. Mark it with Sync priority to
|
|
2127
|
+
// indicate that it still has pending work.
|
|
2128
|
+
// Exit without suspending.
|
|
2129
|
+
return void(t.lanes=gt(t.lanes,1))}// Confirmed that the boundary is in a concurrent mode tree. Continue
|
|
2130
|
+
// with the normal suspend path.
|
|
2131
|
+
//
|
|
2132
|
+
// After this we'll use a set of heuristics to determine whether this
|
|
2133
|
+
// render pass will run to completion or restart or "suspend" the commit.
|
|
2134
|
+
// The actual logic for this is spread out in different places.
|
|
2135
|
+
//
|
|
2136
|
+
// This first principle is that if we're going to suspend when we complete
|
|
2137
|
+
// a root, then we should also restart if we get an update or ping that
|
|
2138
|
+
// might unsuspend it, and vice versa. The only reason to suspend is
|
|
2139
|
+
// because you think you might want to restart before committing. However,
|
|
2140
|
+
// it doesn't make sense to restart only while in the period we're suspended.
|
|
2141
|
+
//
|
|
2142
|
+
// Restarting too aggressively is also not good because it starves out any
|
|
2143
|
+
// intermediate loading state. So we use heuristics to determine when.
|
|
2144
|
+
// Suspense Heuristics
|
|
2145
|
+
//
|
|
2146
|
+
// If nothing threw a Promise or all the same fallbacks are already showing,
|
|
2147
|
+
// then don't suspend/restart.
|
|
2148
|
+
//
|
|
2149
|
+
// If this is an initial render of a new tree of Suspense boundaries and
|
|
2150
|
+
// those trigger a fallback, then don't suspend/restart. We want to ensure
|
|
2151
|
+
// that we can show the initial loading state as quickly as possible.
|
|
2152
|
+
//
|
|
2153
|
+
// If we hit a "Delayed" case, such as when we'd switch from content back into
|
|
2154
|
+
// a fallback, then we should always suspend/restart. Transitions apply
|
|
2155
|
+
// to this case. If none is defined, JND is used instead.
|
|
2156
|
+
//
|
|
2157
|
+
// If we're already showing a fallback and it gets "retried", allowing us to show
|
|
2158
|
+
// another level, but there's still an inner boundary that would show a fallback,
|
|
2159
|
+
// then we suspend/restart for 500ms since the last time we showed a fallback
|
|
2160
|
+
// anywhere in the tree. This effectively throttles progressive loading into a
|
|
2161
|
+
// consistent train of commits. This also gives us an opportunity to restart to
|
|
2162
|
+
// get to the completed state slightly earlier.
|
|
2163
|
+
//
|
|
2164
|
+
// If there's ambiguity due to batching it's resolved in preference of:
|
|
2165
|
+
// 1) "delayed", 2) "initial render", 3) "retry".
|
|
2166
|
+
//
|
|
2167
|
+
// We want to ensure that a "busy" state doesn't get force committed. We want to
|
|
2168
|
+
// ensure that new initial loading states can commit as soon as possible.
|
|
2169
|
+
return $l(e,o,i),s.flags|=4096,void(s.lanes=i)}// This boundary already captured during this render. Continue to the next
|
|
2170
|
+
// boundary.
|
|
2171
|
+
s=s.return}while(null!==s);// No boundary was found. Fallthrough to error mode.
|
|
2172
|
+
// TODO: Use invariant so the message is stripped in prod?
|
|
2173
|
+
a=new Error((z(t.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}// We didn't find a boundary that could handle this type of exception. Start
|
|
2174
|
+
// over and traverse parent path again, this time treating the exception
|
|
2175
|
+
// as an error.
|
|
2176
|
+
ic(),a=Hl(a,t);var p=n;do{switch(p.tag){case 3:{var m=a;p.flags|=4096;var g=ut(i);p.lanes=gt(p.lanes,g);var h=Kl(p,m,g);return void Fd(p,h)}case 1:// Capture and retry
|
|
2177
|
+
var b=a,y=p.type,x=p.stateNode;if(0===(64&p.flags)&&("function"==typeof y.getDerivedStateFromError||null!==x&&"function"==typeof x.componentDidCatch&&!Ec(x))){p.flags|=4096;var v=ut(i);p.lanes=gt(p.lanes,v);// Schedule the error boundary to re-render using updated state
|
|
2178
|
+
var w=Yl(p,b,v);return void Fd(p,w)}}p=p.return}while(null!==p)}// Capture errors so they don't interrupt unmounting.
|
|
2179
|
+
function Gl(e,n){if(an(null,PE,null,e,n),rn()){var t=sn();Nc(e,t)}}function Zl(e){var n=e.ref;if(null!==n)if("function"!=typeof n)n.current=null;else if(an(null,n,null,null),rn()){var t=sn();Nc(e,t)}}function Jl(e,n){if(an(null,n,null),rn()){var t=sn();Nc(e,t)}}function eu(e,n){switch(n.tag){case 0:case 11:case 15:case 22:return;case 1:{if(n.flags&256&&null!==e){var t=e.memoizedProps,a=e.memoizedState,i=n.stateNode;n.type!==n.elementType||hE||(i.props!==n.memoizedProps&&d("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",z(n.type)||"instance"),i.state!==n.memoizedState&&d("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",z(n.type)||"instance"));var o=i.getSnapshotBeforeUpdate(n.elementType===n.type?t:Sd(n.type,t),a);{var r=TE;void 0!==o||r.has(n.type)||(r.add(n.type),d("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",z(n.type)))}i.__reactInternalSnapshotBeforeUpdate=o}return}case 3:{if(256&n.flags){var s=n.stateNode;co(s.containerInfo)}return}case 5:case 6:case 4:case 17:// Nothing to do for these component types
|
|
2180
|
+
return;}throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}function nu(e,n){var t=n.updateQueue,a=null===t?null:t.lastEffect;if(null!==a){var i=a.next,o=i;do{if((o.tag&e)===e){// Unmount
|
|
2181
|
+
var d=o.destroy;o.destroy=void 0,d!==void 0&&d()}o=o.next}while(o!==i)}}function tu(e,n){var t=n.updateQueue,a=null===t?null:t.lastEffect;if(null!==a){var i=a.next,o=i;do{if((o.tag&e)===e){// Mount
|
|
2182
|
+
var r=o.create;o.destroy=r();{var s=o.destroy;if(s!==void 0&&"function"!=typeof s){var l=void 0;l=null===s?" You returned null. If your effect does not require clean up, return undefined (or nothing).":"function"==typeof s.then?"\n\nIt looks like you wrote useEffect(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:\n\nuseEffect(() => {\n async function fetchData() {\n // You can await here\n const response = await MyAPI.getData(someId);\n // ...\n }\n fetchData();\n}, [someId]); // Or [] if effect doesn't need props or state\n\nLearn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching":" You returned: "+s,d("An effect function must not return anything besides a function, which is used for clean-up.%s",l)}}}o=o.next}while(o!==i)}}function au(e){var n=e.updateQueue,t=null===n?null:n.lastEffect;if(null!==t){var a=t.next,i=a;do{var o=i,d=o.next,r=o.tag;(r&4)!==0&&(r&1)!==0&&(vc(e,i),xc(e,i)),i=d}while(i!==a)}}function iu(e,n,t,a){switch(t.tag){case 0:case 11:case 15:case 22:return tu(3,t),void au(t);case 1:{var i=t.stateNode;if(t.flags&4)if(null===n)t.type!==t.elementType||hE||(i.props!==t.memoizedProps&&d("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",z(t.type)||"instance"),i.state!==t.memoizedState&&d("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",z(t.type)||"instance")),i.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:Sd(t.type,n.memoizedProps),r=n.memoizedState;t.type!==t.elementType||hE||(i.props!==t.memoizedProps&&d("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",z(t.type)||"instance"),i.state!==t.memoizedState&&d("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",z(t.type)||"instance")),i.componentDidUpdate(o,r,i.__reactInternalSnapshotBeforeUpdate)}// TODO: I think this is now always non-null by the time it reaches the
|
|
2183
|
+
// commit phase. Consider removing the type check.
|
|
2184
|
+
var s=t.updateQueue;return void(null!==s&&(t.type===t.elementType&&!hE&&(i.props!==t.memoizedProps&&d("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",z(t.type)||"instance"),i.state!==t.memoizedState&&d("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",z(t.type)||"instance")),qd(t,s,i)))}case 3:{// TODO: I think this is now always non-null by the time it reaches the
|
|
2185
|
+
// commit phase. Consider removing the type check.
|
|
2186
|
+
var l=t.updateQueue;if(null!==l){var u=null;if(null!==t.child)switch(t.child.tag){case 5:u=Wi(t.child.stateNode);break;case 1:u=t.child.stateNode;}qd(t,l,u)}return}case 5:{var c=t.stateNode;// Renderers may schedule work to be done after host components are mounted
|
|
2187
|
+
// (eg DOM renderer may schedule auto-focus for inputs and form controls).
|
|
2188
|
+
// These effects should only be committed when components are first mounted,
|
|
2189
|
+
// aka when there is no current/alternate.
|
|
2190
|
+
if(null===n&&t.flags&4){var f=t.type,p=t.memoizedProps;Xi(c,f,p)}return}case 6:// We have no life-cycles associated with text.
|
|
2191
|
+
return;case 4:// We have no life-cycles associated with portals.
|
|
2192
|
+
return;case 12:{{var m=t.memoizedProps;m.onCommit;var g=m.onRender;t.stateNode.effectDuration;var h=Fs();"function"==typeof g&&g(t.memoizedProps.id,null===n?"mount":"update",t.actualDuration,t.treeBaseDuration,t.actualStartTime,h,e.memoizedInteractions)}return}case 13:return void wu(e,t);case 19:case 17:case 20:case 21:case 23:case 24:return;}throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}function ou(e,n){// We only have the top Fiber that was inserted but we need to recurse down its
|
|
2193
|
+
// children to find all the terminal nodes.
|
|
2194
|
+
for(var t=e;!0;){if(5===t.tag){var a=t.stateNode;n?ro(a):lo(t.stateNode,t.memoizedProps)}else if(6===t.tag){var i=t.stateNode;n?so(i):uo(i,t.memoizedProps)}else if((23===t.tag||24===t.tag)&&null!==t.memoizedState&&t!==e);else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)return;for(;null===t.sibling;){if(null===t.return||t.return===e)return;t=t.return}t.sibling.return=t.return,t=t.sibling}}function du(e){var n=e.ref;if(null!==n){var t=e.stateNode,a;switch(e.tag){case 5:a=Wi(t);break;default:a=t;}// Moved outside to ensure DCE works with this flag
|
|
2195
|
+
"function"==typeof n?n(a):(!n.hasOwnProperty("current")&&d("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",z(e.type)),n.current=a)}}function ru(e){var n=e.ref;null!==n&&("function"==typeof n?n(null):n.current=null)}// User-originating errors (lifecycles and refs) should not interrupt
|
|
2196
|
+
// deletion, so don't let them throw. Host-originating errors should
|
|
2197
|
+
// interrupt deletion, so it's okay
|
|
2198
|
+
function su(e,n,t){switch(md(n),n.tag){case 0:case 11:case 14:case 15:case 22:{var a=n.updateQueue;if(null!==a){var i=a.lastEffect;if(null!==i){var o=i.next,d=o;do{var r=d,s=r.destroy,l=r.tag;void 0!==s&&(0===(4&l)?Jl(n,s):vc(n,d)),d=d.next}while(d!==o)}}return}case 1:{Zl(n);var u=n.stateNode;return void("function"==typeof u.componentWillUnmount&&Gl(n,u))}case 5:return void Zl(n);case 4:return void bu(e,n);case 20:return;case 18:return;case 21:return;}}function lu(e,n,t){// While we're inside a removed host node we don't want to call
|
|
2199
|
+
// removeChild on the inner nodes because they're removed by the top
|
|
2200
|
+
// call anyway. We also want to call componentWillUnmount on all
|
|
2201
|
+
// composites before this host node is removed from the tree. Therefore
|
|
2202
|
+
// we do an inner loop while we're still inside the host node.
|
|
2203
|
+
for(var a=n;!0;){// Visit children because they may contain more composite or host nodes.
|
|
2204
|
+
// Skip portals because commitUnmount() currently visits them recursively.
|
|
2205
|
+
if(su(e,a),null!==a.child&&// If we use mutation we drill down into portals using commitUnmount above.
|
|
2206
|
+
// If we don't use mutation we drill down into portals here instead.
|
|
2207
|
+
4!==a.tag){a.child.return=a,a=a.child;continue}if(a===n)return;for(;null===a.sibling;){if(null===a.return||a.return===n)return;a=a.return}a.sibling.return=a.return,a=a.sibling}}function uu(e){// Cut off the return pointers to disconnect it from the tree. Ideally, we
|
|
2208
|
+
// should clear the child pointer of the parent alternate to let this
|
|
2209
|
+
// get GC:ed but we don't know which for sure which parent is the current
|
|
2210
|
+
// one so we'll settle for GC:ing the subtree of this child. This child
|
|
2211
|
+
// itself will be GC:ed when the parent updates the next time.
|
|
2212
|
+
// Note: we cannot null out sibling here, otherwise it can cause issues
|
|
2213
|
+
// with findDOMNode and how it requires the sibling field to carry out
|
|
2214
|
+
// traversal in a later effect. See PR #16820. We now clear the sibling
|
|
2215
|
+
// field after effects, see: detachFiberAfterEffects.
|
|
2216
|
+
//
|
|
2217
|
+
// Don't disconnect stateNode now; it will be detached in detachFiberAfterEffects.
|
|
2218
|
+
// It may be required if the current component is an error boundary,
|
|
2219
|
+
// and one of its descendants throws while unmounting a passive effect.
|
|
2220
|
+
e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null,e._debugOwner=null}function cu(e){for(var n=e.return;null!==n;){if(fu(n))return n;n=n.return}throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.")}function fu(e){return e.tag===5||e.tag===3||e.tag===4}function pu(e){// We're going to search forward into the tree until we find a sibling host
|
|
2221
|
+
// node. Unfortunately, if multiple insertions are done in a row we have to
|
|
2222
|
+
// search past them. This leads to exponential search for the next sibling.
|
|
2223
|
+
// TODO: Find a more efficient way to do this.
|
|
2224
|
+
var n=e;siblings:for(;!0;){// If we didn't find anything, let's try the next sibling.
|
|
2225
|
+
for(;null===n.sibling;){if(null===n.return||fu(n.return))// If we pop out of the root or hit the parent the fiber we are the
|
|
2226
|
+
// last sibling.
|
|
2227
|
+
return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){// If it is not host node and, we might have a host node inside it.
|
|
2228
|
+
// Try to search down until we find one.
|
|
2229
|
+
if(n.flags&2)// If we don't have a child, try the siblings instead.
|
|
2230
|
+
continue siblings;// If we don't have a child, try the siblings instead.
|
|
2231
|
+
// We also skip portals because they are not part of this host tree.
|
|
2232
|
+
if(null===n.child||4===n.tag)continue siblings;else n.child.return=n,n=n.child}// Check if this host node is stable or about to be placed.
|
|
2233
|
+
if(!(n.flags&2))// Found it!
|
|
2234
|
+
return n.stateNode}}function mu(e){var n=cu(e),t=n.stateNode,a,i;// Note: these two variables *must* always be updated together.
|
|
2235
|
+
switch(n.tag){case 5:a=t,i=!1;break;case 3:a=t.containerInfo,i=!0;break;case 4:a=t.containerInfo,i=!0;break;case 20:// eslint-disable-next-line-no-fallthrough
|
|
2236
|
+
default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.");}n.flags&16&&(Zi(a),n.flags&=-17);var o=pu(e);// We only have the top Fiber that was inserted but we need to recurse down its
|
|
2237
|
+
// children to find all the terminal nodes.
|
|
2238
|
+
i?gu(e,o,a):hu(e,o,a)}function gu(e,n,t){var a=e.tag,i=a===5||a===6;if(i||!1){var o=i?e.stateNode:e.stateNode.instance;n?ao(t,o,n):no(t,o)}else if(a===4);else{var d=e.child;if(null!==d){gu(d,n,t);for(var r=d.sibling;null!==r;)gu(r,n,t),r=r.sibling}}}function hu(e,n,t){var a=e.tag,i=a===5||a===6;if(i||!1){var o=i?e.stateNode:e.stateNode.instance;n?to(t,o,n):eo(t,o)}else if(a===4);else{var d=e.child;if(null!==d){hu(d,n,t);for(var r=d.sibling;null!==r;)hu(r,n,t),r=r.sibling}}}function bu(e,n,t){// We only have the top Fiber that was deleted but we need to recurse down its
|
|
2239
|
+
// children to find all the terminal nodes.
|
|
2240
|
+
for(var a=n,i=!1,o,d// Each iteration, currentParent is populated with node's host parent if not
|
|
2241
|
+
// currentParentIsValid.
|
|
2242
|
+
;!0;){if(!i){var r=a.return;findParent:for(;!0;){if(null===r)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");var s=r.stateNode;switch(r.tag){case 5:o=s,d=!1;break findParent;case 3:o=s.containerInfo,d=!0;break findParent;case 4:o=s.containerInfo,d=!0;break findParent;}r=r.return}i=!0}if(5===a.tag||6===a.tag)lu(e,a),d?oo(o,a.stateNode):io(o,a.stateNode);else if(4===a.tag){if(null!==a.child){o=a.stateNode.containerInfo,d=!0,a.child.return=a,a=a.child;continue}}else// Visit children because we may find more host components below.
|
|
2243
|
+
if(su(e,a),null!==a.child){a.child.return=a,a=a.child;continue}if(a===n)return;for(;null===a.sibling;){if(null===a.return||a.return===n)return;a=a.return,a.tag===4&&(i=!1)}a.sibling.return=a.return,a=a.sibling}}function yu(e,n,t){// Recursively delete all host nodes from the parent.
|
|
2244
|
+
// Detach refs and call componentWillUnmount() on the whole subtree.
|
|
2245
|
+
bu(e,n);var a=n.alternate;uu(n),null!==a&&uu(a)}function xu(e,n){switch(n.tag){case 0:case 11:case 14:case 15:case 22:return void nu(3,n);case 1:return;case 5:{var t=n.stateNode;if(null!=t){// Commit the work prepared earlier.
|
|
2246
|
+
var a=n.memoizedProps,i=null===e?a:e.memoizedProps,o=n.type,d=n.updateQueue;// For hydration we reuse the update path but we treat the oldProps
|
|
2247
|
+
// as the newProps. The updatePayload will contain the real change in
|
|
2248
|
+
// this case.
|
|
2249
|
+
n.updateQueue=null,null!==d&&Gi(t,d,o,i,a)}return}case 6:{if(null===n.stateNode)throw Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");var r=n.stateNode,s=n.memoizedProps,l=null===e?s:e.memoizedProps;return void Ji(r,l,s)}case 3:{{var u=n.stateNode;u.hydrate&&(u.hydrate=!1,Eo(u.containerInfo))}return}case 12:return;case 13:return vu(n),void ku(n);case 19:return void ku(n);case 17:return;case 20:break;case 21:break;case 23:case 24:{var c=n.memoizedState,f=null!==c;return void ou(n,f)}}throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}function vu(e){var n=e.memoizedState;if(null!==n){ec();{// Hide the Offscreen component that contains the primary children. TODO:
|
|
2250
|
+
// Ideally, this effect would have been scheduled on the Offscreen fiber
|
|
2251
|
+
// itself. That's how unhiding works: the Offscreen component schedules an
|
|
2252
|
+
// effect on itself. However, in this case, the component didn't complete,
|
|
2253
|
+
// so the fiber was never added to the effect list in the normal path. We
|
|
2254
|
+
// could have appended it to the effect list in the Suspense component's
|
|
2255
|
+
// second pass, but doing it this way is less complicated. This would be
|
|
2256
|
+
// simpler if we got rid of the effect list and traversed the tree, like
|
|
2257
|
+
// we're planning to do.
|
|
2258
|
+
var t=e.child;ou(t,!0)}}}function wu(e,n){var t=n.memoizedState;if(null===t){var a=n.alternate;if(null!==a){var i=a.memoizedState;if(null!==i){var o=i.dehydrated;null!==o&&So(o)}}}}function ku(e){// If this boundary just timed out, then it will have a set of wakeables.
|
|
2259
|
+
// For each wakeable, attach a listener so that when it resolves, React
|
|
2260
|
+
// attempts to re-render the boundary in the primary (pre-timeout) state.
|
|
2261
|
+
var n=e.updateQueue;if(null!==n){e.updateQueue=null;var t=e.stateNode;null===t&&(t=e.stateNode=new RE),n.forEach(function(n){// Memoize using the boundary fiber to prevent redundant listeners.
|
|
2262
|
+
var a=Pc.bind(null,e,n);t.has(n)||(!0!==n.__reactDoNotTraceInteractions&&(a=cp.unstable_wrap(a)),t.add(n),n.then(a,a))})}}// This function detects when a Suspense boundary goes from visible to hidden.
|
|
2263
|
+
// It returns false if the boundary is already hidden.
|
|
2264
|
+
// TODO: Use an effect tag.
|
|
2265
|
+
function Eu(e,n){if(null!==e){var t=e.memoizedState;if(null===t||null!==t.dehydrated){var a=n.memoizedState;return null!==a&&null===a.dehydrated}}return!1}function Su(e){Zi(e.stateNode)}function Cu(){LE.forEach(function(e){return e()})}function _u(){fS=lw()+500}function Nu(){return fS}function Tu(){return ZE}function Ru(){return 0===(48&GE)?-1===IS?(IS=lw(),IS):IS:lw();// We're not inside React, so we may be in the middle of a browser event.
|
|
2266
|
+
// This is the first update since React yielded. Compute a new start time.
|
|
2267
|
+
}function Pu(e){// Special cases
|
|
2268
|
+
var n=e.mode;if((n&2)===0)return 1;// The algorithm for assigning an update to a lane should be stable for all
|
|
2269
|
+
// updates at the same priority within the same event. To do this, the inputs
|
|
2270
|
+
// to the algorithm must be the same. For example, we use the `renderLanes`
|
|
2271
|
+
// to avoid choosing a lane that is already in the middle of rendering.
|
|
2272
|
+
//
|
|
2273
|
+
// However, the "included" lanes could be mutated in between updates in the
|
|
2274
|
+
// same event, like if you perform an update inside `flushSync`. Or any other
|
|
2275
|
+
// code path that might call `prepareFreshStack`.
|
|
2276
|
+
//
|
|
2277
|
+
// The trick we use is to cache the first of each of these inputs within an
|
|
2278
|
+
// event. Then reset the cached values once we can be sure the event is over.
|
|
2279
|
+
// Our heuristic for that is whenever we enter a concurrent work loop.
|
|
2280
|
+
//
|
|
2281
|
+
// We'll do the same for `currentEventPendingLanes` below.
|
|
2282
|
+
if(0===(4&n))return 99===gd()?1:2;LS===0&&(LS=oS);var t=Ed()!==0;if(t)return 0!==DS&&(DS=null===lS?0:lS.pendingLanes),ot(LS,DS);// TODO: Remove this dependency on the Scheduler priority.
|
|
2283
|
+
// To do that, we're replacing it with an update lane priority.
|
|
2284
|
+
var a=gd(),i;// The old behavior was using the priority level of the Scheduler.
|
|
2285
|
+
// This couples React to the Scheduler internals, so we're replacing it
|
|
2286
|
+
// with the currentUpdateLanePriority above. As an example of how this
|
|
2287
|
+
// could be problematic, if we're not inside `Scheduler.runWithPriority`,
|
|
2288
|
+
// then we'll get the priority of the current running Scheduler task,
|
|
2289
|
+
// which is probably not what we want.
|
|
2290
|
+
if(// TODO: Temporary. We're removing the concept of discrete updates.
|
|
2291
|
+
(GE&4)!==0&&a===98)i=it(12,LS);else{var o=Kn(a);i=it(o,LS)}return i}function Iu(e){// This is a fork of `requestUpdateLane` designed specifically for Suspense
|
|
2292
|
+
// "retries" — a special update that attempts to flip a Suspense boundary
|
|
2293
|
+
// from its placeholder state to its primary/resolved state.
|
|
2294
|
+
// Special cases
|
|
2295
|
+
var n=e.mode;return 0===(2&n)?1:0===(4&n)?99===gd()?1:2:(0===LS&&(LS=oS),dt(LS));// See `requestUpdateLane` for explanation of `currentEventWipLanes`
|
|
2296
|
+
}function Lu(e,n,t){Lc(),Oc(e);var a=Du(e,n);if(null===a)return Ac(e),null;// Mark that the root has a pending update.
|
|
2297
|
+
vt(a,n,t),a===ZE&&(rS=gt(rS,n),aS===4&&Mu(a,eS));// TODO: requestUpdateLanePriority also reads the priority. Pass the
|
|
2298
|
+
// priority as an argument to that function and this one.
|
|
2299
|
+
var i=gd();// We use this when assigning a lane for a transition inside
|
|
2300
|
+
// `requestUpdateLane`. We assume it's the same as the root being updated,
|
|
2301
|
+
// since in the common case of a single root app it probably is. If it's not
|
|
2302
|
+
// the same root, then it's not a huge deal, we just might batch more stuff
|
|
2303
|
+
// together more than necessary.
|
|
2304
|
+
n===1?// Check if we're inside unbatchedUpdates
|
|
2305
|
+
(GE&8)!==0&&// Check if we're not already rendering
|
|
2306
|
+
(GE&48)===0?(Hc(a,n),Uu(a)):(zu(a,t),Hc(a,n),GE===0&&(_u(),wd())):((GE&4)!==0&&(// Only updates at user-blocking priority or greater are considered
|
|
2307
|
+
// discrete, even inside a discrete event.
|
|
2308
|
+
i===98||i===99)&&(null===SS?SS=new Set([a]):SS.add(a)),zu(a,t),Hc(a,n)),lS=a}// This is split into a separate function so we can mark a fiber with pending
|
|
2309
|
+
// work without treating it as a typical update that originates from an event;
|
|
2310
|
+
// e.g. retrying a Suspense boundary isn't an update, but it does schedule work
|
|
2311
|
+
// on a fiber.
|
|
2312
|
+
function Du(e,n){e.lanes=gt(e.lanes,n);var t=e.alternate;null!==t&&(t.lanes=gt(t.lanes,n)),null===t&&(e.flags&1026)!==0&&zc(e);for(// Walk the parent path to the root and update the child expiration time.
|
|
2313
|
+
var a=e,i=e.return;null!==i;)i.childLanes=gt(i.childLanes,n),t=i.alternate,null===t?0!==(1026&i.flags)&&zc(e):t.childLanes=gt(t.childLanes,n),a=i,i=i.return;if(a.tag===3){var o=a.stateNode;return o}return null}// Use this function to schedule a task for a root. There's only one task per
|
|
2314
|
+
// root; if a task was already scheduled, we'll check to make sure the priority
|
|
2315
|
+
// of the existing task is the same as the priority of the next level that the
|
|
2316
|
+
// root has work on. This function is called on every update, and right before
|
|
2317
|
+
// exiting a task.
|
|
2318
|
+
function zu(e,n){var t=e.callbackNode;// Check if any lanes are being starved by other work. If so, mark them as
|
|
2319
|
+
// expired so we know to work on those next.
|
|
2320
|
+
Zn(e,n);// Determine the next lanes to work on, and their priority.
|
|
2321
|
+
var a=$n(e,e===ZE?eS:0),i=et();// This returns the priority level computed during the `getNextLanes` call.
|
|
2322
|
+
if(0===a)return void(null!==t&&(vd(t),e.callbackNode=null,e.callbackPriority=0));// Check if there's an existing task. We may be able to reuse it.
|
|
2323
|
+
if(null!==t){var o=e.callbackPriority;if(o===i)// The priority hasn't changed. We can reuse the existing task. Exit.
|
|
2324
|
+
return;// The priority changed. Cancel the existing callback. We'll schedule a new
|
|
2325
|
+
// one below.
|
|
2326
|
+
vd(t)}// Schedule a new callback.
|
|
2327
|
+
var d;if(i===15)// Special case: Sync React callbacks are scheduled on a special
|
|
2328
|
+
// internal queue
|
|
2329
|
+
d=xd(Uu.bind(null,e));else if(i===14)d=yd(99,Uu.bind(null,e));else{var r=Yn(i);d=yd(r,Au.bind(null,e))}e.callbackPriority=i,e.callbackNode=d}// This is the entry point for every concurrent task, i.e. anything that
|
|
2330
|
+
// goes through Scheduler.
|
|
2331
|
+
function Au(e){if(IS=-1,LS=0,DS=0,0!==(48&GE))throw Error("Should not already be working.");// Flush any pending passive effects before deciding which lanes to work on,
|
|
2332
|
+
// in case they schedule additional work.
|
|
2333
|
+
var n=e.callbackNode,t=yc();if(t&&e.callbackNode!==n)// The current task was canceled. Exit. We don't need to call
|
|
2334
|
+
// `ensureRootIsScheduled` because the check above implies either that
|
|
2335
|
+
// there's a new task, or that there's no remaining work on this root.
|
|
2336
|
+
// Something in the passive effect phase may have canceled the current task.
|
|
2337
|
+
// Check if the task node for this root was changed.
|
|
2338
|
+
return null;// Determine the next expiration time to work on, using the fields stored
|
|
2339
|
+
// on the root.
|
|
2340
|
+
var a=$n(e,e===ZE?eS:0);if(0===a)// Defensive coding. This is never expected to happen.
|
|
2341
|
+
return null;var i=sc(e,a);if(pt(oS,rS))Yu(e,0);else if(0!==i){if(2===i&&(GE|=64,e.hydrate&&(e.hydrate=!1,co(e.containerInfo)),a=Jn(e),0!==a&&(i=dc(e,a))),1===i){var o=iS;throw Yu(e,0),Mu(e,a),zu(e,lw()),o}// We now have a consistent tree. The next step is either to commit it,
|
|
2342
|
+
// or, if something suspended, wait to commit it after a timeout.
|
|
2343
|
+
var d=e.current.alternate;e.finishedWork=d,e.finishedLanes=a,Ou(e,i,a)}return zu(e,lw()),e.callbackNode===n?Au.bind(null,e):null}function Ou(e,n,t){switch(n){case 0:case 1:throw Error("Root did not complete. This is a bug in React.");// Flow knows about invariant, so it complains if I add a break
|
|
2344
|
+
// statement, but eslint doesn't know about invariant, so it complains
|
|
2345
|
+
// if I do. eslint-disable-next-line no-fallthrough
|
|
2346
|
+
case 2:{pc(e);break}case 3:{// We have an acceptable loading state. We need to figure out if we
|
|
2347
|
+
// should immediately commit it or wait a bit.
|
|
2348
|
+
if(Mu(e,t),tt(t)&&// do not delay if we're inside an act() scope
|
|
2349
|
+
!Kc()){// This render only included retries, no updates. Throttle committing
|
|
2350
|
+
// retries so that we don't show too many loading states too quickly.
|
|
2351
|
+
var a=uS+500-lw();// Don't bother with a very short suspense time.
|
|
2352
|
+
if(10<a){var i=$n(e,0);if(i!==0)// There's additional work on this root.
|
|
2353
|
+
break;var o=e.suspendedLanes;if(!mt(o,t)){Ru(),kt(e,o);break}// The render is suspended, it hasn't timed out, and there's no
|
|
2354
|
+
// lower priority work to do. Instead of committing the fallback
|
|
2355
|
+
// immediately, wait for more data to arrive.
|
|
2356
|
+
e.timeoutHandle=fv(pc.bind(null,e),a);break}}// The work expired. Commit immediately.
|
|
2357
|
+
pc(e);break}case 4:{if(Mu(e,t),at(t))// This is a transition, so we should exit without committing a
|
|
2358
|
+
// placeholder and without scheduling a timeout. Delay indefinitely
|
|
2359
|
+
// until we receive more data.
|
|
2360
|
+
break;{// This is not a transition, but we did trigger an avoided state.
|
|
2361
|
+
// Schedule a placeholder to display after a short delay, using the Just
|
|
2362
|
+
// Noticeable Difference.
|
|
2363
|
+
// TODO: Is the JND optimization worth the added complexity? If this is
|
|
2364
|
+
// the only reason we track the event time, then probably not.
|
|
2365
|
+
// Consider removing.
|
|
2366
|
+
var d=Xn(e,t),r=d,s=lw()-r,l=Ic(s)-s;// Don't bother with a very short suspense time.
|
|
2367
|
+
if(10<l){e.timeoutHandle=fv(pc.bind(null,e),l);break}}// Commit the placeholder.
|
|
2368
|
+
pc(e);break}case 5:{pc(e);break}default:throw Error("Unknown root exit status.");}}function Mu(e,n){// When suspending, we should always exclude lanes that were pinged or (more
|
|
2369
|
+
// rarely, since we try to avoid it) updated during the render phase.
|
|
2370
|
+
// TODO: Lol maybe there's a better way to factor this besides this
|
|
2371
|
+
// obnoxiously named function :)
|
|
2372
|
+
n=ht(n,sS),n=ht(n,rS),wt(e,n)}// This is the entry point for synchronous tasks that don't go
|
|
2373
|
+
// through Scheduler
|
|
2374
|
+
function Uu(e){if(0!==(48&GE))throw Error("Should not already be working.");yc();var n,t;if(e===ZE&&pt(e.expiredLanes,eS)?(n=eS,t=dc(e,n),pt(oS,rS)&&(n=$n(e,n),t=dc(e,n))):(n=$n(e,0),t=dc(e,n)),0!==e.tag&&2===t&&(GE|=64,e.hydrate&&(e.hydrate=!1,co(e.containerInfo)),n=Jn(e),0!==n&&(t=dc(e,n))),1===t){var a=iS;throw Yu(e,0),Mu(e,n),zu(e,lw()),a}// We now have a consistent tree. Because this is a sync render, we
|
|
2375
|
+
// will commit it even if something suspended.
|
|
2376
|
+
var i=e.current.alternate;return e.finishedWork=i,e.finishedLanes=n,pc(e),zu(e,lw()),null}function Fu(){// TODO: Should be able to flush inside batchedUpdates, but not inside `act`.
|
|
2377
|
+
// However, `act` uses `batchedUpdates`, so there's no way to distinguish
|
|
2378
|
+
// those two cases. Need to fix this before exposing flushDiscreteUpdates
|
|
2379
|
+
// as a public API.
|
|
2380
|
+
return 0===(49&GE)?void(// If the discrete updates scheduled passive effects, flush them now so that
|
|
2381
|
+
// they fire before the next serial event.
|
|
2382
|
+
Bu(),yc()):void(0!==(16&GE)&&d("unstable_flushDiscreteUpdates: Cannot flush updates when React is already rendering."))}function Bu(){if(null!==SS){// For each root with pending discrete updates, schedule a callback to
|
|
2383
|
+
// immediately flush them.
|
|
2384
|
+
var e=SS;SS=null,e.forEach(function(e){Et(e),zu(e,lw())})}// Now flush the immediate queue.
|
|
2385
|
+
wd()}function Wu(e,n){var t=GE;GE|=1;try{return e(n)}finally{GE=t,GE===0&&(_u(),wd())}}function Vu(e,n){var t=GE;GE|=2;try{return e(n)}finally{GE=t,GE===0&&(_u(),wd())}}function ju(e,n,t,a,i){var o=GE;GE|=4;try{return bd(98,e.bind(null,n,t,a,i))}finally{GE=o,0===GE&&(_u(),wd())}}function Hu(e,n){var t=GE;GE&=-2,GE|=8;try{return e(n)}finally{GE=t,GE===0&&(_u(),wd())}}function qu(e,n){var t=GE;if(0!==(48&t))return d("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."),e(n);GE|=1;try{return e?bd(99,e.bind(null,n)):void 0}finally{GE=t,wd()}}function Qu(e,n){Zo(tS,nS,e),nS=gt(nS,n),oS=gt(oS,n)}function Ku(e){nS=tS.current,Go(tS,e)}function Yu(e,n){e.finishedWork=null,e.finishedLanes=0;var t=e.timeoutHandle;if(-1!==t&&(e.timeoutHandle=-1,pv(t)),null!==JE)for(var a=JE.return;null!==a;)jl(a),a=a.return;ZE=e,JE=lf(e.current,null),eS=nS=oS=n,aS=0,iS=null,dS=0,rS=0,sS=0,PS=null,xw.discardPendingWarnings()}function $u(e,n){do{var t=JE;try{if(Cd(),Yr(),M(),AE.current=null,null===t||null===t.return)return aS=1,iS=n,void(JE=null);8&t.mode&&js(t,!0),Xl(e,t.return,t,n,eS),cc(t)}catch(e){n=e,JE===t&&null!==t?(t=t.return,JE=t):t=JE;continue}// Return to the normal work loop.
|
|
2386
|
+
return}while(!0)}function Xu(){var e=zE.current;return zE.current=Xk,null===e?Xk:e}function Gu(e){zE.current=e}function Zu(e){{var n=cp.__interactionsRef.current;return cp.__interactionsRef.current=e.memoizedInteractions,n}}function Ju(e){cp.__interactionsRef.current=e}function ec(){uS=lw()}function nc(e){dS=gt(e,dS)}function tc(){aS===0&&(aS=3)}function ac(){(aS===0||aS===3)&&(aS=4),null!==ZE&&(nt(dS)||nt(rS))&&Mu(ZE,eS)}function ic(){aS!==5&&(aS=2)}// Called during render to determine if anything has suspended.
|
|
2387
|
+
// Returns false if we're not sure.
|
|
2388
|
+
function oc(){// If something errored or completed, we can't really be sure,
|
|
2389
|
+
// so those are false.
|
|
2390
|
+
return aS===0}function dc(e,n){var t=GE;GE|=16;var a=Xu();// If the root or lanes have changed, throw out the existing stack
|
|
2391
|
+
// and prepare a fresh one. Otherwise we'll continue where we left off.
|
|
2392
|
+
(ZE!==e||eS!==n)&&(Yu(e,n),qc(e,n));var i=Zu(e);do try{rc();break}catch(n){$u(e,n)}while(!0);if(Cd(),Ju(i),GE=t,Gu(a),null!==JE)// This is a sync render, so we should have finished the whole tree.
|
|
2393
|
+
throw Error("Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.");return ZE=null,eS=0,aS}// The work loop is an extremely hot path. Tell Closure not to inline it.
|
|
2394
|
+
/** @noinline */function rc(){// Already timed out, so perform work without checking if we need to yield.
|
|
2395
|
+
for(;null!==JE;)uc(JE)}function sc(e,n){var t=GE;GE|=16;var a=Xu();// If the root or lanes have changed, throw out the existing stack
|
|
2396
|
+
// and prepare a fresh one. Otherwise we'll continue where we left off.
|
|
2397
|
+
(ZE!==e||eS!==n)&&(_u(),Yu(e,n),qc(e,n));var i=Zu(e);do try{lc();break}catch(n){$u(e,n)}while(!0);return Cd(),Ju(i),Gu(a),GE=t,null===JE?(ZE=null,eS=0,aS):0}/** @noinline */function lc(){// Perform work until Scheduler asks us to yield
|
|
2398
|
+
for(;null!==JE&&!aw();)uc(JE)}function uc(e){// The current, flushed, state of this fiber is the alternate. Ideally
|
|
2399
|
+
// nothing should rely on this, but relying on it here means that we don't
|
|
2400
|
+
// need an additional field on the work in progress.
|
|
2401
|
+
var n=e.alternate;U(e);var t;(e.mode&8)===0?t=BS(n,e,nS):(Ws(e),t=BS(n,e,nS),js(e,!0)),M(),e.memoizedProps=e.pendingProps,null===t?cc(e):JE=t,AE.current=null}function cc(e){// Attempt to complete the current unit of work, then move to the next
|
|
2402
|
+
// sibling. If there are no more siblings, return to the parent fiber.
|
|
2403
|
+
var n=e;do{// The current, flushed, state of this fiber is the alternate. Ideally
|
|
2404
|
+
// nothing should rely on this, but relying on it here means that we don't
|
|
2405
|
+
// need an additional field on the work in progress.
|
|
2406
|
+
var t=n.alternate,a=n.return;// Check if the work completed or if something threw.
|
|
2407
|
+
if(0===(2048&n.flags)){U(n);var i=void 0;if(0===(8&n.mode)?i=Wl(t,n,nS):(Ws(n),i=Wl(t,n,nS),js(n,!1)),M(),null!==i)return void(JE=i);if(fc(n),null!==a&&// Do not append effects to parents if a sibling failed to complete
|
|
2408
|
+
0===(2048&a.flags)){null===a.firstEffect&&(a.firstEffect=n.firstEffect),null!==n.lastEffect&&(null!==a.lastEffect&&(a.lastEffect.nextEffect=n.firstEffect),a.lastEffect=n.lastEffect);// If this fiber had side-effects, we append it AFTER the children's
|
|
2409
|
+
// side-effects. We can perform certain side-effects earlier if needed,
|
|
2410
|
+
// by doing multiple passes over the effect list. We don't want to
|
|
2411
|
+
// schedule our own side-effect on our own list because if end up
|
|
2412
|
+
// reusing children we'll schedule this effect onto itself since we're
|
|
2413
|
+
// at the end.
|
|
2414
|
+
var o=n.flags;// Skip both NoWork and PerformedWork tags when creating the effect
|
|
2415
|
+
// list. PerformedWork effect is read by React DevTools but shouldn't be
|
|
2416
|
+
// committed.
|
|
2417
|
+
1<o&&(null===a.lastEffect?a.firstEffect=n:a.lastEffect.nextEffect=n,a.lastEffect=n)}}else{// This fiber did not complete because something threw. Pop values off
|
|
2418
|
+
// the stack without entering the complete phase. If this is a boundary,
|
|
2419
|
+
// capture values if possible.
|
|
2420
|
+
var d=Vl(n);// Because this fiber did not complete, don't reset its expiration time.
|
|
2421
|
+
if(null!==d)return d.flags&=2047,void(JE=d);if(0!==(8&n.mode)){js(n,!1);for(// Include the time spent working on failed children before continuing.
|
|
2422
|
+
var r=n.actualDuration,s=n.child;null!==s;)r+=s.actualDuration,s=s.sibling;n.actualDuration=r}null!==a&&(a.firstEffect=a.lastEffect=null,a.flags|=2048)}var l=n.sibling;if(null!==l)return void(JE=l);// Otherwise, return to the parent
|
|
2423
|
+
// Update the next thing we're working on in case something throws.
|
|
2424
|
+
n=a,JE=n}while(null!==n);// We've reached the root.
|
|
2425
|
+
aS===0&&(aS=5)}function fc(e){if(// TODO: Move this check out of the hot path by moving `resetChildLanes`
|
|
2426
|
+
// to switch statement in `completeWork`.
|
|
2427
|
+
24!==e.tag&&23!==e.tag||null===e.memoizedState||pt(nS,1073741824)||0===(4&e.mode))// The children of this component are hidden. Don't bubble their
|
|
2428
|
+
// expiration times.
|
|
2429
|
+
{var n=0;// Bubble up the earliest expiration time.
|
|
2430
|
+
if(0!==(8&e.mode)){// In profiling mode, resetChildExpirationTime is also used to reset
|
|
2431
|
+
// profiler durations.
|
|
2432
|
+
for(var t=e.actualDuration,a=e.selfBaseDuration,i=null===e.alternate||e.child!==e.alternate.child,o=e.child;null!==o;)n=gt(n,gt(o.lanes,o.childLanes)),i&&(t+=o.actualDuration),a+=o.treeBaseDuration,o=o.sibling;var d=13===e.tag&&null!==e.memoizedState;if(d){// Don't count time spent in a timed out Suspense subtree as part of the base duration.
|
|
2433
|
+
var r=e.child;null!==r&&(a-=r.treeBaseDuration)}e.actualDuration=t,e.treeBaseDuration=a}else for(var s=e.child;null!==s;)n=gt(n,gt(s.lanes,s.childLanes)),s=s.sibling;e.childLanes=n}}function pc(e){var n=gd();return bd(99,mc.bind(null,e,n)),null}function mc(e,n){do// `flushPassiveEffects` will call `flushSyncUpdateQueue` at the end, which
|
|
2434
|
+
// means `flushPassiveEffects` will sometimes result in additional
|
|
2435
|
+
// passive effects. So we need to keep flushing in a loop until there are
|
|
2436
|
+
// no more pending effects.
|
|
2437
|
+
// TODO: Might be better if `flushPassiveEffects` did not automatically
|
|
2438
|
+
// flush synchronous work at the end, to avoid factoring hazards like this.
|
|
2439
|
+
yc();while(null!==xS);if(Dc(),0!==(48&GE))throw Error("Should not already be working.");var t=e.finishedWork,a=e.finishedLanes;if(null===t)return null;if(e.finishedWork=null,e.finishedLanes=0,t===e.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");// commitRoot never returns a continuation; it always finishes synchronously.
|
|
2440
|
+
// So we can clear these now to allow a new callback to be scheduled.
|
|
2441
|
+
e.callbackNode=null;// Update the first and last pending times on this root. The new first
|
|
2442
|
+
// pending time is whatever is left on the root fiber.
|
|
2443
|
+
var o=gt(t.lanes,t.childLanes);_t(e,o),null!==SS&&!St(o)&&SS.has(e)&&SS.delete(e),e===ZE&&(ZE=null,JE=null,eS=0);// Get the list of effects.
|
|
2444
|
+
var d;if(1<t.flags?null===t.lastEffect?d=t:(t.lastEffect.nextEffect=t,d=t.firstEffect):d=t.firstEffect,null!==d){var r=GE;GE|=32;var s=Zu(e);// Reset this to null before calling lifecycles
|
|
2445
|
+
AE.current=null,AS=Vi(e.containerInfo),OS=!1,mS=d;do if(an(null,gc,null),rn()){if(null===mS)throw Error("Should be working on an effect.");var l=sn();Nc(mS,l),mS=mS.nextEffect}while(null!==mS);// We no longer need to track the active instance fiber
|
|
2446
|
+
AS=null,// Mark the current commit time to be shared by all Profilers in this
|
|
2447
|
+
// batch. This enables them to be grouped later.
|
|
2448
|
+
Bs(),mS=d;do if(an(null,hc,null,e,n),rn()){if(null===mS)throw Error("Should be working on an effect.");var u=sn();Nc(mS,u),mS=mS.nextEffect}while(null!==mS);ji(e.containerInfo),e.current=t,mS=d;do if(an(null,bc,null,e,a),rn()){if(null===mS)throw Error("Should be working on an effect.");var c=sn();Nc(mS,c),mS=mS.nextEffect}while(null!==mS);mS=null,iw(),Ju(s),GE=r}else// No effects.
|
|
2449
|
+
e.current=t,Bs();var f=yS;if(yS)yS=!1,xS=e,wS=a,vS=n;else for(mS=d;null!==mS;){var p=mS.nextEffect;mS.nextEffect=null,8&mS.flags&&Yc(mS),mS=p}// Read this again, since an effect might have updated it
|
|
2450
|
+
// Check if there's remaining work on this root
|
|
2451
|
+
if(o=e.pendingLanes,0!==o){if(null!==PS){var m=PS;PS=null;for(var g=0;g<m.length;g++)jc(e,m[g],e.memoizedInteractions)}Hc(e,o)}else// If there's no remaining work, we can clear the set of already failed
|
|
2452
|
+
// error boundaries.
|
|
2453
|
+
bS=null;if(f||Qc(e,a),1===o?e===NS?_S++:(_S=0,NS=e):_S=0,pd(t.stateNode,n),Cu(),zu(e,lw()),gS){gS=!1;var h=hS;throw hS=null,h}return 0===(8&GE)?(wd(),null):null;// If layout work was scheduled, flush it now.
|
|
2454
|
+
}function gc(){for(;null!==mS;){var e=mS.alternate;OS||null===AS||((mS.flags&8)===0?mS.tag===13&&Eu(e,mS)&&wn(mS,AS)&&(OS=!0):wn(mS,AS)&&(OS=!0));var n=mS.flags;(n&256)!==0&&(U(mS),eu(e,mS),M()),(n&512)===0||yS||(yS=!0,yd(97,function(){return yc(),null})),mS=mS.nextEffect}}function hc(e,n){// TODO: Should probably move the bulk of this function to commitWork.
|
|
2455
|
+
for(;null!==mS;){U(mS);var t=mS.flags;if(16&t&&Su(mS),128&t){var a=mS.alternate;null!==a&&ru(a)}// The following switch statement is only concerned about placement,
|
|
2456
|
+
// updates, and deletions. To avoid needing to add a case for every possible
|
|
2457
|
+
// bitmap value, we remove the secondary effects from the effect tag and
|
|
2458
|
+
// switch on that value.
|
|
2459
|
+
var i=1038&t;switch(i){case 2:{mu(mS),mS.flags&=-3;break}case 6:{mu(mS),mS.flags&=-3;// Update
|
|
2460
|
+
var o=mS.alternate;xu(o,mS);break}case 1024:{mS.flags&=-1025;break}case 1028:{mS.flags&=-1025;// Update
|
|
2461
|
+
var d=mS.alternate;xu(d,mS);break}case 4:{var r=mS.alternate;xu(r,mS);break}case 8:{yu(e,mS);break}}M(),mS=mS.nextEffect}}function bc(e,n){for(;null!==mS;){U(mS);var t=mS.flags;if(t&36){var a=mS.alternate;iu(e,a,mS)}t&128&&du(mS),M(),mS=mS.nextEffect}}function yc(){// Returns whether passive effects were flushed.
|
|
2462
|
+
if(90!==vS){var e=97<vS?97:vS;return vS=90,bd(e,kc)}return!1}function xc(e,n){kS.push(n,e),yS||(yS=!0,yd(97,function(){return yc(),null}))}function vc(e,n){ES.push(n,e);{e.flags|=8192;var t=e.alternate;null!==t&&(t.flags|=8192)}yS||(yS=!0,yd(97,function(){return yc(),null}))}function wc(e){var n=e.create;e.destroy=n()}function kc(){if(null===xS)return!1;var e=xS,n=wS;if(xS=null,wS=0,0!==(48&GE))throw Error("Cannot flush passive effects while already rendering.");zS=!0;var t=GE;GE|=32;var a=Zu(e),o=ES;// It's important that ALL pending passive effect destroy functions are called
|
|
2463
|
+
// before ANY passive effect create functions are called.
|
|
2464
|
+
// Otherwise effects in sibling components might interfere with each other.
|
|
2465
|
+
// e.g. a destroy function in one component may unintentionally override a ref
|
|
2466
|
+
// value set by a create function in another component.
|
|
2467
|
+
// Layout effects have the same constraint.
|
|
2468
|
+
// First pass: Destroy stale passive effects.
|
|
2469
|
+
ES=[];for(var d=0;d<o.length;d+=2){var r=o[d],s=o[d+1],l=r.destroy;r.destroy=void 0;{s.flags&=-8193;var u=s.alternate;null!==u&&(u.flags&=-8193)}if("function"==typeof l){if(U(s),an(null,l,null),rn()){if(null===s)throw Error("Should be working on an effect.");var c=sn();Nc(s,c)}M()}}// Second pass: Create new passive effects.
|
|
2470
|
+
var f=kS;kS=[];for(var p=0;p<f.length;p+=2){var m=f[p],g=f[p+1];{if(U(g),an(null,wc,null,m),rn()){if(null===g)throw Error("Should be working on an effect.");var h=sn();Nc(g,h)}M()}}// Note: This currently assumes there are no passive effects on the root fiber
|
|
2471
|
+
// because the root is not part of its own effect list.
|
|
2472
|
+
// This could change in the future.
|
|
2473
|
+
for(var b=e.current.firstEffect,y;null!==b;)y=b.nextEffect,b.nextEffect=null,8&b.flags&&Yc(b),b=y;return Ju(a),Qc(e,n),zS=!1,GE=t,wd(),RS=null===xS?0:RS+1,!0}function Ec(e){return null!==bS&&bS.has(e)}function Sc(e){null===bS?bS=new Set([e]):bS.add(e)}function Cc(e){gS||(gS=!0,hS=e)}function _c(e,n,t){var a=Hl(t,n),i=Kl(e,a,1);Ud(e,i);var o=Ru(),d=Du(e,1);null!==d&&(vt(d,1,o),zu(d,o),Hc(d,1))}function Nc(e,n){if(3===e.tag)return void _c(e,e,n);for(var t=e.return;null!==t;){if(3===t.tag)return void _c(t,e,n);if(1===t.tag){var a=t.type,i=t.stateNode;if("function"==typeof a.getDerivedStateFromError||"function"==typeof i.componentDidCatch&&!Ec(i)){var o=Hl(n,e),d=Yl(t,o,1);Ud(t,d);var r=Ru(),s=Du(t,1);if(null!==s)vt(s,1,r),zu(s,r),Hc(s,1);else// This component has already been unmounted.
|
|
2474
|
+
// We can't schedule any follow up work for the root because the fiber is already unmounted,
|
|
2475
|
+
// but we can still call the log-only boundary so the error isn't swallowed.
|
|
2476
|
+
//
|
|
2477
|
+
// TODO This is only a temporary bandaid for the old reconciler fork.
|
|
2478
|
+
// We can delete this special case once the new fork is merged.
|
|
2479
|
+
if("function"==typeof i.componentDidCatch&&!Ec(i))try{i.componentDidCatch(n,o)}catch(e){// TODO Ignore this error? Rethrow it?
|
|
2480
|
+
// This is kind of an edge case.
|
|
2481
|
+
}return}}t=t.return}}function Tc(e,n,t){var a=e.pingCache;null!==a&&a.delete(n);var i=Ru();kt(e,t),ZE===e&&mt(eS,t)&&(aS===4||aS===3&&tt(eS)&&lw()-uS<500?Yu(e,0):sS=gt(sS,t)),zu(e,i),Hc(e,t)}function Rc(e,n){n===0&&(n=Iu(e));// TODO: Special case idle priority?
|
|
2482
|
+
var t=Ru(),a=Du(e,n);null!==a&&(vt(a,n,t),zu(a,t),Hc(a,n))}function Pc(e,n){var t=0,a;// Default
|
|
2483
|
+
a=e.stateNode,null!==a&&a.delete(n),Rc(e,0)}// Computes the next Just Noticeable Difference (JND) boundary.
|
|
2484
|
+
// The theory is that a person can't tell the difference between small differences in time.
|
|
2485
|
+
// Therefore, if we wait a bit longer than necessary that won't translate to a noticeable
|
|
2486
|
+
// difference in the experience. However, waiting for longer might mean that we can avoid
|
|
2487
|
+
// showing an intermediate loading state. The longer we have already waited, the harder it
|
|
2488
|
+
// is to tell small differences in time. Therefore, the longer we've already waited,
|
|
2489
|
+
// the longer we can wait additionally. At some point we have to give up though.
|
|
2490
|
+
// We pick a train model where the next boundary commits at a consistent schedule.
|
|
2491
|
+
// These particular numbers are vague estimates. We expect to adjust them based on research.
|
|
2492
|
+
function Ic(e){return 120>e?120:480>e?480:1080>e?1080:1920>e?1920:3e3>e?3e3:4320>e?4320:1960*DE(e/1960)}function Lc(){if(50<_S)throw _S=0,NS=null,Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");RS>50&&(RS=0,d("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render."))}function Dc(){xw.flushLegacyContextWarning(),xw.flushPendingUnsafeLifecycleWarnings()}function zc(e){{if((GE&16)!==0)// We let the other warning about render phase updates deal with this one.
|
|
2493
|
+
return;if(!(6&e.mode))return;var n=e.tag;if(n!==2&&n!==3&&n!==1&&n!==0&&n!==11&&n!==14&&n!==15&&n!==22)// Only warn for user-defined components, not internal ones like Suspense.
|
|
2494
|
+
return;// We show the whole stack but dedupe on the top component's name because
|
|
2495
|
+
// the problematic code almost always lies inside that component.
|
|
2496
|
+
var t=z(e.type)||"ReactComponent";if(null!==US){if(US.has(t))return;US.add(t)}else US=new Set([t]);var a=Ym;try{U(e),d("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.")}finally{a?U(e):M()}}}function Ac(e){{var n=e.tag;if(n!==3&&n!==1&&n!==0&&n!==11&&n!==14&&n!==15&&n!==22)// Only warn for user-defined components, not internal ones like Suspense.
|
|
2497
|
+
return;// If there are pending passive effects unmounts for this Fiber,
|
|
2498
|
+
// we can assume that they would have prevented this update.
|
|
2499
|
+
if(0!==(8192&e.flags))return;// We show the whole stack but dedupe on the top component's name because
|
|
2500
|
+
// the problematic code almost always lies inside that component.
|
|
2501
|
+
var t=z(e.type)||"ReactComponent";if(null!==FS){if(FS.has(t))return;FS.add(t)}else FS=new Set([t]);if(zS);else{var a=Ym;try{U(e),d("Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in %s.",1===n?"the componentWillUnmount method":"a useEffect cleanup function")}finally{a?U(e):M()}}}}function Oc(e){if($m&&0!==(16&GE)&&!Ds())switch(e.tag){case 0:case 11:case 15:{var n=JE&&z(JE.type)||"Unknown",t=n;// Dedupe by the rendering component because it's the one that needs to be fixed.
|
|
2502
|
+
if(!jS.has(t)){jS.add(t);var a=z(e.type)||"Unknown";d("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://reactjs.org/link/setstate-in-render",a,n,n)}break}case 1:{VS||(d("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),VS=!0);break}}}// a 'shared' variable that changes when act() opens/closes in tests.
|
|
2503
|
+
function Mc(e){if(!0===OE.current&&!0!==HS.current){var n=Ym;try{U(e),d("It looks like you're using the wrong act() around your test interactions.\nBe sure to use the matching version of act() corresponding to your renderer:\n\n// for react-dom:\nimport {act} from 'react-dom/test-utils';\n// ...\nact(() => ...);\n\n// for react-test-renderer:\nimport TestRenderer from react-test-renderer';\nconst {act} = TestRenderer;\n// ...\nact(() => ...);")}finally{n?U(e):M()}}}function Uc(e){(e.mode&1)!==0&&!1===OE.current&&!1===HS.current&&d("An update to %s ran an effect, but was not wrapped in act(...).\n\nWhen testing, code that causes React state updates should be wrapped into act(...):\n\nact(() => {\n /* fire events that update state */\n});\n/* assert on the output */\n\nThis ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act",z(e.type))}function Fc(e){if(0===GE&&!1===OE.current&&!1===HS.current){var n=Ym;try{U(e),d("An update to %s inside a test was not wrapped in act(...).\n\nWhen testing, code that causes React state updates should be wrapped into act(...):\n\nact(() => {\n /* fire events that update state */\n});\n/* assert on the output */\n\nThis ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act",z(e.type))}finally{n?U(e):M()}}}// TODO Before we release concurrent mode, revisit this and decide whether a mocked
|
|
2504
|
+
// scheduler is the actual recommendation. The alternative could be a testing build,
|
|
2505
|
+
// a new lib, or whatever; we dunno just yet. This message is for early adopters
|
|
2506
|
+
// to get their tests right.
|
|
2507
|
+
function Bc(e){!1===QS&&up.unstable_flushAllWithoutAsserting===void 0&&(e.mode&2||e.mode&4)&&(QS=!0,d("In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked to guarantee consistent behaviour across tests and browsers. For example, with jest: \njest.mock('scheduler', () => require('scheduler/unstable_mock'));\n\nFor more info, visit https://reactjs.org/link/mock-scheduler"))}function Wc(e,n){// Interaction threads are unique per root and expiration time.
|
|
2508
|
+
// NOTE: Intentionally unsound cast. All that matters is that it's a number
|
|
2509
|
+
// and it represents a batch of work. Could make a helper function instead,
|
|
2510
|
+
// but meh this is fine for now.
|
|
2511
|
+
return 1e3*n+e.interactionThreadID}function Vc(e){null===PS?PS=[e]:PS.push(e)}function jc(e,n,t){if(0<t.size){var a=e.pendingInteractionMap,i=a.get(n);null==i?(a.set(n,new Set(t)),t.forEach(function(e){e.__count++})):t.forEach(function(e){i.has(e)||e.__count++,i.add(e)});var o=cp.__subscriberRef.current;if(null!==o){var d=Wc(e,n);o.onWorkScheduled(t,d)}}}function Hc(e,n){jc(e,n,cp.__interactionsRef.current)}function qc(e,n){// we can accurately attribute time spent working on it, And so that cascading
|
|
2512
|
+
// work triggered during the render phase will be associated with it.
|
|
2513
|
+
var t=new Set;if(e.pendingInteractionMap.forEach(function(e,a){pt(n,a)&&e.forEach(function(e){return t.add(e)})}),e.memoizedInteractions=t,0<t.size){var a=cp.__subscriberRef.current;if(null!==a){var i=Wc(e,n);try{a.onWorkStarted(t,i)}catch(e){yd(99,function(){throw e})}}}}function Qc(e,n){var t=e.pendingLanes,a;try{if(a=cp.__subscriberRef.current,null!==a&&0<e.memoizedInteractions.size){// FIXME: More than one lane can finish in a single commit.
|
|
2514
|
+
var i=Wc(e,n);a.onWorkStopped(e.memoizedInteractions,i)}}catch(e){yd(99,function(){throw e})}finally{// Clear completed interactions from the pending Map.
|
|
2515
|
+
// Unless the render was suspended or cascading work was scheduled,
|
|
2516
|
+
// In which case– leave pending interactions until the subsequent render.
|
|
2517
|
+
var o=e.pendingInteractionMap;o.forEach(function(e,n){pt(t,n)||(o.delete(n),e.forEach(function(e){if(e.__count--,null!==a&&0===e.__count)try{a.onInteractionScheduledWorkCompleted(e)}catch(e){yd(99,function(){throw e})}}))})}}// `act` testing API
|
|
2518
|
+
function Kc(){// Never force flush in production. This function should get stripped out.
|
|
2519
|
+
return 0<KS}// so we can tell if any async act() calls try to run in parallel.
|
|
2520
|
+
function Yc(e){e.sibling=null,e.stateNode=null}function $c(e){{if(null===YS)// Hot reloading is disabled.
|
|
2521
|
+
return e;var n=YS(e);return void 0===n?e:n.current;// Use the latest known implementation.
|
|
2522
|
+
}}function Xc(e){// No implementation differences.
|
|
2523
|
+
return $c(e)}function Gc(e){{if(null===YS)// Hot reloading is disabled.
|
|
2524
|
+
return e;var n=YS(e);if(n===void 0){// Check if we're dealing with a real forwardRef. Don't want to crash early.
|
|
2525
|
+
if(null!==e&&e!==void 0&&"function"==typeof e.render){// ForwardRef is special because its resolved .type is an object,
|
|
2526
|
+
// but it's possible that we only have its inner render function in the map.
|
|
2527
|
+
// If that inner render function is different, we'll build a new forwardRef type.
|
|
2528
|
+
var t=$c(e.render);if(e.render!==t){var a={$$typeof:vm,render:t};return void 0!==e.displayName&&(a.displayName=e.displayName),a}}return e}// Use the latest known implementation.
|
|
2529
|
+
return n.current}}function Zc(e,n){{if(null===YS)// Hot reloading is disabled.
|
|
2530
|
+
return!1;var t=e.elementType,a=n.type,i=!1,o="object"==typeof a&&null!==a?a.$$typeof:null;switch(e.tag){case 1:{"function"==typeof a&&(i=!0);break}case 0:{"function"==typeof a?i=!0:o===Sm&&(i=!0);break}case 11:{o===vm?i=!0:o===Sm&&(i=!0);break}case 14:case 15:{o===Em?i=!0:o===Sm&&(i=!0);break}default:return!1;}// Check if both types have a family and it's the same one.
|
|
2531
|
+
if(i){// Note: memo() and forwardRef() we'll compare outer rather than inner type.
|
|
2532
|
+
// This means both of them need to be registered to preserve state.
|
|
2533
|
+
// If we unwrapped and compared the inner types for wrappers instead,
|
|
2534
|
+
// then we would risk falsely saying two separate memo(Foo)
|
|
2535
|
+
// calls are equivalent because they wrap the same Foo function.
|
|
2536
|
+
var d=YS(t);if(d!==void 0&&d===YS(a))return!0}return!1}}function Jc(e){{if(null===YS)// Hot reloading is disabled.
|
|
2537
|
+
return;if("function"!=typeof WeakSet)return;null===$S&&($S=new WeakSet),$S.add(e)}}function ef(e,n,t){{var a=e.alternate,i=e.child,o=e.sibling,d=e.tag,r=e.type,s=null;if(0===d||15===d||1===d?s=r:11===d?s=r.render:void 0,null===YS)throw new Error("Expected resolveFamily to be set during hot reload.");var l=!1,u=!1;if(null!==s){var c=YS(s);void 0!==c&&(t.has(c)?u=!0:n.has(c)&&(1===d?u=!0:l=!0))}null!==$S&&($S.has(e)||null!==a&&$S.has(a))&&(u=!0),u&&(e._debugNeedsRemount=!0),(u||l)&&Lu(e,1,-1),null===i||u||ef(i,n,t),null!==o&&ef(o,n,t)}}function nf(e,n,t){{var a=e.child,i=e.sibling,o=e.tag,d=e.type,r=null;0===o||15===o||1===o?r=d:11===o?r=d.render:void 0;var s=!1;null!==r&&n.has(r)&&(s=!0),s?tf(e,t):null!==a&&nf(a,n,t),null!==i&&nf(i,n,t)}}function tf(e,n){{var t=af(e,n);if(t)return;// If we didn't find any host children, fallback to closest host parent.
|
|
2538
|
+
for(var a=e;!0;){switch(a.tag){case 5:return void n.add(a.stateNode);case 4:return void n.add(a.stateNode.containerInfo);case 3:return void n.add(a.stateNode.containerInfo);}if(null===a.return)throw new Error("Expected to reach root first.");a=a.return}}}function af(e,n){for(var t=e,a=!1;!0;){if(5===t.tag)a=!0,n.add(t.stateNode);else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)return a;for(;null===t.sibling;){if(null===t.return||t.return===e)return a;t=t.return}t.sibling.return=t.return,t=t.sibling}return!1}function of(e,n,t,a){var i=Number.NaN;// Instance
|
|
2539
|
+
// Fiber
|
|
2540
|
+
// Effects
|
|
2541
|
+
this.tag=e,this.key=t,this.elementType=null,this.type=null,this.stateNode=null,this.return=null,this.child=null,this.sibling=null,this.index=0,this.ref=null,this.pendingProps=n,this.memoizedProps=null,this.updateQueue=null,this.memoizedState=null,this.dependencies=null,this.mode=a,this.flags=0,this.nextEffect=null,this.firstEffect=null,this.lastEffect=null,this.lanes=0,this.childLanes=0,this.alternate=null,this.actualDuration=i,this.actualStartTime=i,this.selfBaseDuration=i,this.treeBaseDuration=i,this.actualDuration=0,this.actualStartTime=-1,this.selfBaseDuration=0,this.treeBaseDuration=0,this._debugID=tC++,this._debugSource=null,this._debugOwner=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,!eC&&"function"==typeof Object.preventExtensions&&Object.preventExtensions(this)}// This is a constructor function, rather than a POJO constructor, still
|
|
2542
|
+
// please ensure we do the following:
|
|
2543
|
+
// 1) Nobody should add any instance methods on this. Instance methods can be
|
|
2544
|
+
// more difficult to predict when they get optimized and they are almost
|
|
2545
|
+
// never inlined properly in static compilers.
|
|
2546
|
+
// 2) Nobody should rely on `instanceof Fiber` for type testing. We should
|
|
2547
|
+
// always know when it is a fiber.
|
|
2548
|
+
// 3) We might want to experiment with using numeric keys since they are easier
|
|
2549
|
+
// to optimize in a non-JIT environment.
|
|
2550
|
+
// 4) We can easily go from a constructor to a createFiber object literal if that
|
|
2551
|
+
// is faster.
|
|
2552
|
+
// 5) It should be easy to port this to a C struct and keep a C implementation
|
|
2553
|
+
// compatible.
|
|
2554
|
+
function df(e){var n=e.prototype;return!!(n&&n.isReactComponent)}function rf(e){return"function"==typeof e&&!df(e)&&e.defaultProps===void 0}function sf(e){if("function"==typeof e)return df(e)?1:0;if(void 0!==e&&null!==e){var n=e.$$typeof;if(n===vm)return 11;if(n===Em)return 14}return 2}// This is used to create an alternate fiber to do work on.
|
|
2555
|
+
function lf(e,n){var t=e.alternate;null===t?(t=aC(e.tag,n,e.key,e.mode),t.elementType=e.elementType,t.type=e.type,t.stateNode=e.stateNode,t._debugID=e._debugID,t._debugSource=e._debugSource,t._debugOwner=e._debugOwner,t._debugHookTypes=e._debugHookTypes,t.alternate=e,e.alternate=t):(t.pendingProps=n,t.type=e.type,t.flags=0,t.nextEffect=null,t.firstEffect=null,t.lastEffect=null,t.actualDuration=0,t.actualStartTime=-1),t.childLanes=e.childLanes,t.lanes=e.lanes,t.child=e.child,t.memoizedProps=e.memoizedProps,t.memoizedState=e.memoizedState,t.updateQueue=e.updateQueue;// Clone the dependencies object. This is mutated during the render phase, so
|
|
2556
|
+
// it cannot be shared with the current fiber.
|
|
2557
|
+
var a=e.dependencies;switch(t.dependencies=null===a?null:{lanes:a.lanes,firstContext:a.firstContext},t.sibling=e.sibling,t.index=e.index,t.ref=e.ref,t.selfBaseDuration=e.selfBaseDuration,t.treeBaseDuration=e.treeBaseDuration,(t._debugNeedsRemount=e._debugNeedsRemount,t.tag)){case 2:case 0:case 15:t.type=$c(e.type);break;case 1:t.type=Xc(e.type);break;case 11:t.type=Gc(e.type);}return t}// Used to reuse a Fiber for a second pass.
|
|
2558
|
+
function uf(e,n){e.flags&=2,e.nextEffect=null,e.firstEffect=null,e.lastEffect=null;var t=e.alternate;if(null===t)// Reset to createFiber's initial values.
|
|
2559
|
+
e.childLanes=0,e.lanes=n,e.child=null,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null,e.selfBaseDuration=0,e.treeBaseDuration=0;else{e.childLanes=t.childLanes,e.lanes=t.lanes,e.child=t.child,e.memoizedProps=t.memoizedProps,e.memoizedState=t.memoizedState,e.updateQueue=t.updateQueue,e.type=t.type;// Clone the dependencies object. This is mutated during the render phase, so
|
|
2560
|
+
// it cannot be shared with the current fiber.
|
|
2561
|
+
var a=t.dependencies;e.dependencies=null===a?null:{lanes:a.lanes,firstContext:a.firstContext},e.selfBaseDuration=t.selfBaseDuration,e.treeBaseDuration=t.treeBaseDuration}return e}function cf(e){var n;return n=2===e?7:1===e?3:0,Mv&&(n|=8),aC(3,null,null,n)}function ff(e,// React$ElementType
|
|
2562
|
+
n,t,a,i,o){var d=2,r=e;// The resolved type is set if we know what the final type will be. I.e. it's not lazy.
|
|
2563
|
+
if("function"==typeof e)df(e)?(d=1,r=Xc(r)):r=$c(r);else if("string"==typeof e)d=5;else getTag:switch(e){case gm:return mf(t.children,i,o,n);case Tm:d=8,i|=16;break;case hm:d=8,i|=1;break;case bm:return gf(t,i,o,n);case wm:return hf(t,i,o,n);case km:return bf(t,i,o,n);case Rm:return yf(t,i,o,n);case Pm:return xf(t,i,o,n);case _m:// eslint-disable-next-line no-fallthrough
|
|
2564
|
+
default:{if("object"==typeof e&&null!==e)switch(e.$$typeof){case ym:d=10;break getTag;case xm:d=9;break getTag;case vm:d=11,r=Gc(r);break getTag;case Em:d=14;break getTag;case Sm:d=16,r=null;break getTag;case Cm:d=22;break getTag;}var s="";{(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(s+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var l=a?z(a.type):null;l&&(s+="\n\nCheck the render method of `"+l+"`.")}throw Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(null==e?e:typeof e)+"."+s)}}var u=aC(d,t,n,i);return u.elementType=e,u.type=r,u.lanes=o,u._debugOwner=a,u}function pf(e,n,t){var a=null;a=e._owner;var i=e.type,o=e.key,d=e.props,r=ff(i,o,d,a,n,t);return r._debugSource=e._source,r._debugOwner=e._owner,r}function mf(e,n,t,a){var i=aC(7,e,a,n);return i.lanes=t,i}function gf(e,n,t,a){"string"!=typeof e.id&&d("Profiler must specify an \"id\" as a prop");var i=aC(12,e,a,8|n);// TODO: The Profiler fiber shouldn't have a type. It has a tag.
|
|
2565
|
+
return i.elementType=bm,i.type=bm,i.lanes=t,i.stateNode={effectDuration:0,passiveEffectDuration:0},i}function hf(e,n,t,a){var i=aC(13,e,a,n);// TODO: The SuspenseComponent fiber shouldn't have a type. It has a tag.
|
|
2566
|
+
// This needs to be fixed in getComponentName so that it relies on the tag
|
|
2567
|
+
// instead.
|
|
2568
|
+
return i.type=wm,i.elementType=wm,i.lanes=t,i}function bf(e,n,t,a){var i=aC(19,e,a,n);return(// TODO: The SuspenseListComponent fiber shouldn't have a type. It has a tag.
|
|
2569
|
+
// This needs to be fixed in getComponentName so that it relies on the tag
|
|
2570
|
+
// instead.
|
|
2571
|
+
i.type=km,i.elementType=km,i.lanes=t,i)}function yf(e,n,t,a){var i=aC(23,e,a,n);// TODO: The OffscreenComponent fiber shouldn't have a type. It has a tag.
|
|
2572
|
+
// This needs to be fixed in getComponentName so that it relies on the tag
|
|
2573
|
+
// instead.
|
|
2574
|
+
return i.type=Rm,i.elementType=Rm,i.lanes=t,i}function xf(e,n,t,a){var i=aC(24,e,a,n);// TODO: The LegacyHidden fiber shouldn't have a type. It has a tag.
|
|
2575
|
+
// This needs to be fixed in getComponentName so that it relies on the tag
|
|
2576
|
+
// instead.
|
|
2577
|
+
return i.type=Pm,i.elementType=Pm,i.lanes=t,i}function vf(e,n,t){var a=aC(6,e,null,n);return a.lanes=t,a}function wf(){var e=aC(5,null,null,0);// TODO: These should not need a type.
|
|
2578
|
+
return e.elementType="DELETED",e.type="DELETED",e}function kf(e,n,t){var a=null===e.children?[]:e.children,i=aC(4,a,e.key,n);return i.lanes=t,i.stateNode={containerInfo:e.containerInfo,pendingChildren:null,// Used by persistent updates
|
|
2579
|
+
implementation:e.implementation},i}// Used for stashing WIP properties to replay failed work in DEV.
|
|
2580
|
+
function Ef(e,n){return null===e&&(e=aC(2,null,null,0)),e.tag=n.tag,e.key=n.key,e.elementType=n.elementType,e.type=n.type,e.stateNode=n.stateNode,e.return=n.return,e.child=n.child,e.sibling=n.sibling,e.index=n.index,e.ref=n.ref,e.pendingProps=n.pendingProps,e.memoizedProps=n.memoizedProps,e.updateQueue=n.updateQueue,e.memoizedState=n.memoizedState,e.dependencies=n.dependencies,e.mode=n.mode,e.flags=n.flags,e.nextEffect=n.nextEffect,e.firstEffect=n.firstEffect,e.lastEffect=n.lastEffect,e.lanes=n.lanes,e.childLanes=n.childLanes,e.alternate=n.alternate,e.actualDuration=n.actualDuration,e.actualStartTime=n.actualStartTime,e.selfBaseDuration=n.selfBaseDuration,e.treeBaseDuration=n.treeBaseDuration,e._debugID=n._debugID,e._debugSource=n._debugSource,e._debugOwner=n._debugOwner,e._debugNeedsRemount=n._debugNeedsRemount,e._debugHookTypes=n._debugHookTypes,e}function Sf(e,n,t){this.tag=n,this.containerInfo=e,this.pendingChildren=null,this.current=null,this.pingCache=null,this.finishedWork=null,this.timeoutHandle=-1,this.context=null,this.pendingContext=null,this.hydrate=t,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=xt(0),this.expirationTimes=xt(-1),this.pendingLanes=0,this.suspendedLanes=0,this.pingedLanes=0,this.expiredLanes=0,this.mutableReadLanes=0,this.finishedLanes=0,this.entangledLanes=0,this.entanglements=xt(0),this.mutableSourceEagerHydrationData=null,this.interactionThreadID=cp.unstable_getThreadID(),this.memoizedInteractions=new Set,this.pendingInteractionMap=new Map;1===n?this._debugRootType="createBlockingRoot()":2===n?this._debugRootType="createRoot()":0===n?this._debugRootType="createLegacyRoot()":void 0}function Cf(e,n,t,a){var i=new Sf(e,n,t),o=cf(n);// stateNode is any.
|
|
2581
|
+
return i.current=o,o.stateNode=i,Ad(o),i}// This ensures that the version used for server rendering matches the one
|
|
2582
|
+
// that is eventually read during hydration.
|
|
2583
|
+
// If they don't match there's a potential tear and a full deopt render is required.
|
|
2584
|
+
function _f(e,n){var t=n._getVersion,a=t(n._source);null==e.mutableSourceEagerHydrationData?e.mutableSourceEagerHydrationData=[n,a]:e.mutableSourceEagerHydrationData.push(n,a)}function Nf(e,n,// TODO: figure out the API for cross-renderer implementation.
|
|
2585
|
+
t){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{// This tag allow us to uniquely identify this as a React Portal
|
|
2586
|
+
$$typeof:mm,key:null==a?null:""+a,children:e,containerInfo:n,implementation:t}}function Tf(e){if(!e)return Nv;var n=ln(e),t=ud(n);if(n.tag===1){var a=n.type;if(ad(a))return rd(n,a,t)}return t}function Rf(e,n){{var t=ln(e);if(t===void 0)if("function"==typeof e.render)throw Error("Unable to find node on an unmounted component.");else throw Error("Argument appears to not be a ReactComponent. Keys: "+Object.keys(e));var a=xn(t);if(null===a)return null;if(1&a.mode){var i=z(t.type)||"Component";if(!oC[i]){oC[i]=!0;var o=Ym;try{U(a),1&t.mode?d("%s is deprecated in StrictMode. %s was passed an instance of %s which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",n,n,i):d("%s is deprecated in StrictMode. %s was passed an instance of %s which renders StrictMode children. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",n,n,i)}finally{o?U(o):M()}}}return a.stateNode}}function Pf(e,n,t,a){return Cf(e,n,t)}function If(e,n,t,a){fd(n,e);var i=n.current,o=Ru();"undefined"!=typeof jest&&(Bc(i),Mc(i));var r=Pu(i),s=Tf(t);null===n.context?n.context=s:n.pendingContext=s,$m&&null!==Ym&&!iC&&(iC=!0,d("Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.\n\nCheck the render method of %s.",z(Ym.type)||"Unknown"));var l=Md(o,r);// Caution: React DevTools currently depends on this property
|
|
2587
|
+
// being called "element".
|
|
2588
|
+
return l.payload={element:e},a=void 0===a?null:a,null!==a&&("function"!=typeof a&&d("render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",a),l.callback=a),Ud(i,l),Lu(i,r,o),r}function Lf(e){var n=e.current;if(!n.child)return null;switch(n.child.tag){case 5:return Wi(n.child.stateNode);default:return n.child.stateNode;}}function Df(e,n){var t=e.memoizedState;null!==t&&null!==t.dehydrated&&(t.retryLane=yt(t.retryLane,n))}// Increases the priority of thennables when they resolve within this boundary.
|
|
2589
|
+
function zf(e,n){Df(e,n);var t=e.alternate;t&&Df(t,n)}function Af(e){if(13===e.tag)// We ignore HostRoots here because we can't increase
|
|
2590
|
+
// their priority and they should not suspend on I/O,
|
|
2591
|
+
// since you have to wrap anything that might suspend in
|
|
2592
|
+
// Suspense.
|
|
2593
|
+
{var n=Ru(),t=4;Lu(e,t,n),zf(e,t)}}function Of(e){if(13===e.tag)// We ignore HostRoots here because we can't increase
|
|
2594
|
+
// their priority and they should not suspend on I/O,
|
|
2595
|
+
// since you have to wrap anything that might suspend in
|
|
2596
|
+
// Suspense.
|
|
2597
|
+
{var n=Ru(),t=67108864;Lu(e,t,n),zf(e,t)}}function Mf(e){if(13===e.tag)// We ignore HostRoots here because we can't increase
|
|
2598
|
+
// their priority other than synchronously flush it.
|
|
2599
|
+
{var n=Ru(),t=Pu(e);Lu(e,t,n),zf(e,t)}}function Uf(e,n){try{return qn(e),n()}finally{}}function Ff(e){var n=vn(e);return null===n?null:20===n.tag?n.stateNode.instance:n.stateNode}function Bf(e){return dC(e)}function Wf(e){var n=xn(e);return null===n?null:n.stateNode}function Vf(e){return null}function jf(){return Ym}function Hf(e){var n=e.findFiberByHostInstance,t=fp.ReactCurrentDispatcher;return cd({bundleType:e.bundleType,version:e.version,rendererPackageName:e.rendererPackageName,rendererConfig:e.rendererConfig,overrideHookState:rC,overrideHookStateDeletePath:sC,overrideHookStateRenamePath:lC,overrideProps:uC,overridePropsDeletePath:cC,overridePropsRenamePath:fC,setSuspenseHandler:mC,scheduleUpdate:pC,currentDispatcherRef:t,findHostInstanceByFiber:Wf,findFiberByHostInstance:n||Vf,// React Refresh
|
|
2600
|
+
findHostInstancesForRefresh:JS,scheduleRefresh:GS,scheduleRoot:ZS,setRefreshHandler:XS,// Enables DevTools to append owner stacks to error messages in DEV mode.
|
|
2601
|
+
getCurrentFiber:jf})}function qf(e,n,t){this._internalRoot=Qf(e,n,t)}function Qf(e,n,t){// Tag is either LegacyRoot or Concurrent Root
|
|
2602
|
+
var a=null!=t&&!0===t.hydrate;null!=t&&t.hydrationOptions;var o=null!=t&&null!=t.hydrationOptions&&t.hydrationOptions.mutableSources||null,d=Pf(e,n,a);Fo(d.current,e),e.nodeType;{var r=e.nodeType===8?e.parentNode:e;di(r)}if(o)for(var s=0,l;s<o.length;s++)l=o[s],_f(d,l);return d}function Kf(e,n){return new qf(e,0,n)}function Yf(e){return!!(e&&(e.nodeType===1||e.nodeType===9||e.nodeType===11||e.nodeType===8&&" react-mount-point-unstable "===e.nodeValue))}function $f(e){return e?9===e.nodeType?e.documentElement:e.firstChild:null}function Xf(e){var n=$f(e);return!!(n&&n.nodeType===1&&n.hasAttribute("data-reactroot"))}function Gf(e,n){var t=n||Xf(e);// First clear any existing content.
|
|
2603
|
+
if(!t)for(var a=!1,i;i=e.lastChild;)!a&&1===i.nodeType&&i.hasAttribute("data-reactroot")&&(a=!0,d("render(): Target node has markup rendered by React, but there are unrelated nodes as well. This is most commonly caused by white-space inserted around server-rendered markup.")),e.removeChild(i);return!t||n||EC||(EC=!0,o("render(): Calling ReactDOM.render() to hydrate server-rendered markup will stop working in React v18. Replace the ReactDOM.render() call with ReactDOM.hydrate() if you want React to attach to the server HTML.")),Kf(e,t?{hydrate:!0}:void 0)}function Zf(e,n){null!==e&&"function"!=typeof e&&d("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",n,e)}function Jf(e,n,t,a,i){SC(t),Zf(i===void 0?null:i,"render");// TODO: Without `any` type, Flow says "Property cannot be accessed on any
|
|
2604
|
+
// member of intersection type." Whyyyyyy.
|
|
2605
|
+
var o=t._reactRootContainer,d;if(!o){if(o=t._reactRootContainer=Gf(t,a),d=o._internalRoot,"function"==typeof i){var r=i;i=function(){var e=Lf(d);r.call(e)}}// Initial mount should not be batched.
|
|
2606
|
+
Hu(function(){If(n,d,e,i)})}else{if(d=o._internalRoot,"function"==typeof i){var s=i;i=function(){var e=Lf(d);s.call(e)}}// Update
|
|
2607
|
+
If(n,d,e,i)}return Lf(d)}function ep(e){{var n=kC.current;if(null!==n&&null!==n.stateNode){var t=n.stateNode._warnedAboutRefsInRender;t||d("%s is accessing findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",z(n.type)||"A component"),n.stateNode._warnedAboutRefsInRender=!0}}if(null==e)return null;if(1===e.nodeType)return e;return Rf(e,"findDOMNode")}function np(e,n,t){if(!Yf(n))throw Error("Target container is not a DOM element.");{var a=Wo(n)&&n._reactRootContainer===void 0;a&&d("You are calling ReactDOM.hydrate() on a container that was previously passed to ReactDOM.createRoot(). This is not supported. Did you mean to call createRoot(container, {hydrate: true}).render(element)?")}// TODO: throw or warn if we couldn't hydrate?
|
|
2608
|
+
return Jf(null,e,n,!0,t)}function tp(e,n,t){if(!Yf(n))throw Error("Target container is not a DOM element.");{var a=Wo(n)&&n._reactRootContainer===void 0;a&&d("You are calling ReactDOM.render() on a container that was previously passed to ReactDOM.createRoot(). This is not supported. Did you mean to call root.render(element)?")}return Jf(null,e,n,!1,t)}function ap(e,n,t,a){if(!Yf(t))throw Error("Target container is not a DOM element.");if(!(null!=e&&un(e)))throw Error("parentComponent must be a valid React Component");return Jf(e,n,t,!1,a)}function ip(e){if(!Yf(e))throw Error("unmountComponentAtNode(...): Target container is not a DOM element.");{var n=Wo(e)&&e._reactRootContainer===void 0;n&&d("You are calling ReactDOM.unmountComponentAtNode() on a container that was previously passed to ReactDOM.createRoot(). This is not supported. Did you mean to call root.unmount()?")}if(e._reactRootContainer){{var t=$f(e),a=t&&!jo(t);a&&d("unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.")}// Unmount should not be batched.
|
|
2609
|
+
// If you call unmountComponentAtNode twice in quick succession, you'll
|
|
2610
|
+
// get `true` twice. That's probably fine?
|
|
2611
|
+
return Hu(function(){Jf(null,null,e,!1,function(){e._reactRootContainer=null,Bo(e)})}),!0}{var i=$f(e),o=!!(i&&jo(i)),r=1===e.nodeType&&Yf(e.parentNode)&&!!e.parentNode._reactRootContainer;o&&d("unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s",r?"You may have accidentally passed in a React root node instead of its container.":"Instead, have the parent component update its state and rerender in order to remove this component.")}return!1}function op(e,n){var t=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Yf(n))throw Error("Target container is not a DOM element.");// TODO: pass ReactDOM portal implementation as third argument
|
|
2612
|
+
// $FlowFixMe The Flow type is opaque but there's no way to actually create it.
|
|
2613
|
+
return Nf(e,n,null,t)}function dp(e,n,t,a){return ap(e,n,t,a)}function rp(e,n){var t=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;return CC||(CC=!0,o("The ReactDOM.unstable_createPortal() alias has been deprecated, and will be removed in React 18+. Update your code to use ReactDOM.createPortal() instead. It has the exact same API, but without the \"unstable_\" prefix.")),op(e,n,t)}var sp=React__default["default"],lp=objectAssign,up=scheduler,cp=tracing,fp=sp.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;if(!sp)throw Error("ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM.");var pp=0,mp=1,gp=2,hp=3,bp=4,yp=5,xp=6,vp=7,wp=8,kp=9,Ep=10,Sp=11,Cp=12,_p=13,Np=14,Tp=15,Rp=16,Pp=17,Ip=18,Lp=19,Dp=20,zp=21,Ap=22,Op=23,Mp=24,Up=!0,Fp=!1,Bp=!1,Wp=!1,Vp=new Set,jp={},Hp={},qp=!("undefined"==typeof window||"undefined"==typeof window.document||"undefined"==typeof window.document.createElement),Qp=0,Kp=1,Yp=2,$p=3,Xp=4,Gp=5,Zp=6,Jp=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",em=Jp+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",nm="data-reactroot",tm=new RegExp("^["+Jp+"]["+em+"]*$"),am=Object.prototype.hasOwnProperty,im={},om={},dm={},rm=["children","dangerouslySetInnerHTML",// TODO: This prevents the assignment of defaultValue to regular
|
|
2614
|
+
// elements (not just inputs). Now that ReactDOMInput assigns to the
|
|
2615
|
+
// defaultValue property -- do we need this?
|
|
2616
|
+
"defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];rm.forEach(function(e){dm[e]=new g(e,Qp,!1,// mustUseProperty
|
|
2617
|
+
e,// attributeName
|
|
2618
|
+
null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0],t=e[1];dm[n]=new g(n,Kp,!1,// mustUseProperty
|
|
2619
|
+
t,// attributeName
|
|
2620
|
+
null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){dm[e]=new g(e,Yp,!1,// mustUseProperty
|
|
2621
|
+
e.toLowerCase(),// attributeName
|
|
2622
|
+
null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){dm[e]=new g(e,Yp,!1,// mustUseProperty
|
|
2623
|
+
e,// attributeName
|
|
2624
|
+
null,!1,!1)}),["allowFullScreen","async",// Note: there is a special case that prevents it from being written to the DOM
|
|
2625
|
+
// on the client side because the browsers are inconsistent. Instead we call focus().
|
|
2626
|
+
"autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless",// Microdata
|
|
2627
|
+
"itemScope"].forEach(function(e){dm[e]=new g(e,$p,!1,// mustUseProperty
|
|
2628
|
+
e.toLowerCase(),// attributeName
|
|
2629
|
+
null,!1,!1)}),["checked",// Note: `option.selected` is not updated if `select.multiple` is
|
|
2630
|
+
// disabled with `removeAttribute`. We have special logic for handling this.
|
|
2631
|
+
"multiple","muted","selected"// NOTE: if you add a camelCased prop to this list,
|
|
2632
|
+
// you'll need to set attributeName to name.toLowerCase()
|
|
2633
|
+
// instead in the assignment below.
|
|
2634
|
+
].forEach(function(e){dm[e]=new g(e,$p,!0,// mustUseProperty
|
|
2635
|
+
e,// attributeName
|
|
2636
|
+
null,!1,!1)}),["capture","download"// NOTE: if you add a camelCased prop to this list,
|
|
2637
|
+
// you'll need to set attributeName to name.toLowerCase()
|
|
2638
|
+
// instead in the assignment below.
|
|
2639
|
+
].forEach(function(e){dm[e]=new g(e,Xp,!1,// mustUseProperty
|
|
2640
|
+
e,// attributeName
|
|
2641
|
+
null,!1,!1)}),["cols","rows","size","span"// NOTE: if you add a camelCased prop to this list,
|
|
2642
|
+
// you'll need to set attributeName to name.toLowerCase()
|
|
2643
|
+
// instead in the assignment below.
|
|
2644
|
+
].forEach(function(e){dm[e]=new g(e,Zp,!1,// mustUseProperty
|
|
2645
|
+
e,// attributeName
|
|
2646
|
+
null,!1,!1)}),["rowSpan","start"].forEach(function(e){dm[e]=new g(e,Gp,!1,// mustUseProperty
|
|
2647
|
+
e.toLowerCase(),// attributeName
|
|
2648
|
+
null,!1,!1)});var sm=/[\-\:]([a-z])/g,lm=function(e){return e[1].toUpperCase()};["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"// NOTE: if you add a camelCased prop to this list,
|
|
2649
|
+
// you'll need to set attributeName to name.toLowerCase()
|
|
2650
|
+
// instead in the assignment below.
|
|
2651
|
+
].forEach(function(e){var n=e.replace(sm,lm);dm[n]=new g(n,Kp,!1,// mustUseProperty
|
|
2652
|
+
e,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"// NOTE: if you add a camelCased prop to this list,
|
|
2653
|
+
// you'll need to set attributeName to name.toLowerCase()
|
|
2654
|
+
// instead in the assignment below.
|
|
2655
|
+
].forEach(function(e){var n=e.replace(sm,lm);dm[n]=new g(n,Kp,!1,// mustUseProperty
|
|
2656
|
+
e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"// NOTE: if you add a camelCased prop to this list,
|
|
2657
|
+
// you'll need to set attributeName to name.toLowerCase()
|
|
2658
|
+
// instead in the assignment below.
|
|
2659
|
+
].forEach(function(e){var n=e.replace(sm,lm);dm[n]=new g(n,Kp,!1,// mustUseProperty
|
|
2660
|
+
e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){dm[e]=new g(e,Kp,!1,// mustUseProperty
|
|
2661
|
+
e.toLowerCase(),// attributeName
|
|
2662
|
+
null,!1,!1)});// These attributes accept URLs. These must not allow javascript: URLS.
|
|
2663
|
+
// These will also need to accept Trusted Types object in the future.
|
|
2664
|
+
var um="xlinkHref";dm.xlinkHref=new g("xlinkHref",Kp,!1,// mustUseProperty
|
|
2665
|
+
"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){dm[e]=new g(e,Kp,!1,// mustUseProperty
|
|
2666
|
+
e.toLowerCase(),// attributeName
|
|
2667
|
+
null,!0,!0)});// and any newline or tab are filtered out as if they're not part of the URL.
|
|
2668
|
+
// https://url.spec.whatwg.org/#url-parsing
|
|
2669
|
+
// Tab or newline are defined as \r\n\t:
|
|
2670
|
+
// https://infra.spec.whatwg.org/#ascii-tab-or-newline
|
|
2671
|
+
// A C0 control is a code point in the range \u0000 NULL to \u001F
|
|
2672
|
+
// INFORMATION SEPARATOR ONE, inclusive:
|
|
2673
|
+
// https://infra.spec.whatwg.org/#c0-control-or-space
|
|
2674
|
+
/* eslint-disable max-len */var cm=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i,fm=!1,pm=60103,mm=60106,gm=60107,hm=60108,bm=60114,ym=60109,xm=60110,vm=60112,wm=60113,km=60120,Em=60115,Sm=60116,Cm=60121,_m=60119,Nm=60128,Tm=60129,Rm=60130,Pm=60131;if("function"==typeof Symbol&&Symbol.for){var Im=Symbol.for;pm=Im("react.element"),mm=Im("react.portal"),gm=Im("react.fragment"),hm=Im("react.strict_mode"),bm=Im("react.profiler"),ym=Im("react.provider"),xm=Im("react.context"),vm=Im("react.forward_ref"),wm=Im("react.suspense"),km=Im("react.suspense_list"),Em=Im("react.memo"),Sm=Im("react.lazy"),Cm=Im("react.block"),Im("react.server.block"),Im("react.fundamental"),_m=Im("react.scope"),Nm=Im("react.opaque.id"),Tm=Im("react.debug_trace_mode"),Rm=Im("react.offscreen"),Pm=Im("react.legacy_hidden")}var Lm="function"==typeof Symbol&&Symbol.iterator,Dm="@@iterator",zm=0,Am,Om,Mm,Um,Fm,Bm,Wm;w.__reactDisabledLog=!0;var Vm=fp.ReactCurrentDispatcher,jm=!1,Hm,qm;{var Qm="function"==typeof WeakMap?WeakMap:Map;qm=new Qm}var Km=fp.ReactDebugCurrentFrame,Ym=null,$m=!1,Xm={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},Gm=!1,Zm=!1,Jm=!1,eg=!1,ng=!1,tg=!1,ag;ag=!1;var ig=["value","defaultValue"],og=!1,dg="http://www.w3.org/1999/xhtml",rg="http://www.w3.org/1998/Math/MathML",sg="http://www.w3.org/2000/svg",lg={html:dg,mathml:rg,svg:sg},ug=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(n,t,a,i){MSApp.execUnsafeLocalFunction(function(){return e(n,t,a,i)})}:e},cg=ug(function(e,n){if(e.namespaceURI===lg.svg&&!("innerHTML"in e)){wg=wg||document.createElement("div"),wg.innerHTML="<svg>"+n.valueOf().toString()+"</svg>";for(var t=wg.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild);return}e.innerHTML=n}),fg=1,pg=3,mg=8,gg=9,hg=11,bg=function(e,n){if(n){var t=e.firstChild;if(t&&t===e.lastChild&&t.nodeType===pg)return void(t.nodeValue=n)}e.textContent=n},yg={animation:["animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationTimingFunction"],background:["backgroundAttachment","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundSize"],backgroundPosition:["backgroundPositionX","backgroundPositionY"],border:["borderBottomColor","borderBottomStyle","borderBottomWidth","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRightColor","borderRightStyle","borderRightWidth","borderTopColor","borderTopStyle","borderTopWidth"],borderBlockEnd:["borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth"],borderBlockStart:["borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth"],borderBottom:["borderBottomColor","borderBottomStyle","borderBottomWidth"],borderColor:["borderBottomColor","borderLeftColor","borderRightColor","borderTopColor"],borderImage:["borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth"],borderInlineEnd:["borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth"],borderInlineStart:["borderInlineStartColor","borderInlineStartStyle","borderInlineStartWidth"],borderLeft:["borderLeftColor","borderLeftStyle","borderLeftWidth"],borderRadius:["borderBottomLeftRadius","borderBottomRightRadius","borderTopLeftRadius","borderTopRightRadius"],borderRight:["borderRightColor","borderRightStyle","borderRightWidth"],borderStyle:["borderBottomStyle","borderLeftStyle","borderRightStyle","borderTopStyle"],borderTop:["borderTopColor","borderTopStyle","borderTopWidth"],borderWidth:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"],columnRule:["columnRuleColor","columnRuleStyle","columnRuleWidth"],columns:["columnCount","columnWidth"],flex:["flexBasis","flexGrow","flexShrink"],flexFlow:["flexDirection","flexWrap"],font:["fontFamily","fontFeatureSettings","fontKerning","fontLanguageOverride","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantLigatures","fontVariantNumeric","fontVariantPosition","fontWeight","lineHeight"],fontVariant:["fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantLigatures","fontVariantNumeric","fontVariantPosition"],gap:["columnGap","rowGap"],grid:["gridAutoColumns","gridAutoFlow","gridAutoRows","gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],gridArea:["gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart"],gridColumn:["gridColumnEnd","gridColumnStart"],gridColumnGap:["columnGap"],gridGap:["columnGap","rowGap"],gridRow:["gridRowEnd","gridRowStart"],gridRowGap:["rowGap"],gridTemplate:["gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],listStyle:["listStyleImage","listStylePosition","listStyleType"],margin:["marginBottom","marginLeft","marginRight","marginTop"],marker:["markerEnd","markerMid","markerStart"],mask:["maskClip","maskComposite","maskImage","maskMode","maskOrigin","maskPositionX","maskPositionY","maskRepeat","maskSize"],maskPosition:["maskPositionX","maskPositionY"],outline:["outlineColor","outlineStyle","outlineWidth"],overflow:["overflowX","overflowY"],padding:["paddingBottom","paddingLeft","paddingRight","paddingTop"],placeContent:["alignContent","justifyContent"],placeItems:["alignItems","justifyItems"],placeSelf:["alignSelf","justifySelf"],textDecoration:["textDecorationColor","textDecorationLine","textDecorationStyle"],textEmphasis:["textEmphasisColor","textEmphasisStyle"],transition:["transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction"],wordWrap:["overflowWrap"]},xg={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,// SVG-related properties
|
|
2675
|
+
fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},vg=["Webkit","ms","Moz","O"],wg;Object.keys(xg).forEach(function(e){vg.forEach(function(n){xg[_e(n,e)]=xg[e]})});var kg=/([A-Z])/g,Eg=/^ms-/,Sg=function(){};{// 'msTransform' is correct, but the other prefixes should be capitalized
|
|
2676
|
+
var Cg=/^(?:webkit|moz|o)[A-Z]/,_g=/^-ms-/,Ng=/-(.)/g,Tg=/;\s*$/,Rg={},Pg={},Ig=!1,Lg=!1,Dg=function(e){return e.replace(Ng,function(e,n){return n.toUpperCase()})},zg=function(e){Rg.hasOwnProperty(e)&&Rg[e]||(Rg[e]=!0,d("Unsupported style property %s. Did you mean %s?",e,// As Andi Smith suggests
|
|
2677
|
+
// (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
|
|
2678
|
+
// is converted to lowercase `ms`.
|
|
2679
|
+
Dg(e.replace(_g,"ms-"))))},Ag=function(e){Rg.hasOwnProperty(e)&&Rg[e]||(Rg[e]=!0,d("Unsupported vendor-prefixed style property %s. Did you mean %s?",e,e.charAt(0).toUpperCase()+e.slice(1)))},Og=function(e,n){Pg.hasOwnProperty(n)&&Pg[n]||(Pg[n]=!0,d("Style property values shouldn't contain a semicolon. Try \"%s: %s\" instead.",e,n.replace(Tg,"")))},Mg=function(e,n){Ig||(Ig=!0,d("`NaN` is an invalid value for the `%s` css style property.",e))},Ug=function(e,n){Lg||(Lg=!0,d("`Infinity` is an invalid value for the `%s` css style property.",e))};Sg=function(e,n){-1<e.indexOf("-")?zg(e):Cg.test(e)?Ag(e):Tg.test(n)&&Og(e,n),"number"==typeof n&&(isNaN(n)?Mg(e,n):!isFinite(n)&&Ug(e,n))}}var Fg=Sg,Bg={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0// NOTE: menuitem's close tag should be omitted, but that causes problems.
|
|
2680
|
+
},Wg=lp({menuitem:!0},Bg),Vg="__html",jg={// HTML
|
|
2681
|
+
accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback",download:"download",draggable:"draggable",enctype:"encType",enterkeyhint:"enterKeyHint",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",// SVG
|
|
2682
|
+
about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},Hg={"aria-current":0,// state
|
|
2683
|
+
"aria-details":0,"aria-disabled":0,// state
|
|
2684
|
+
"aria-hidden":0,// state
|
|
2685
|
+
"aria-invalid":0,// state
|
|
2686
|
+
"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,// Widget Attributes
|
|
2687
|
+
"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,// Live Region Attributes
|
|
2688
|
+
"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,// Drag-and-Drop Attributes
|
|
2689
|
+
"aria-dropeffect":0,"aria-grabbed":0,// Relationship Attributes
|
|
2690
|
+
"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},qg={},Qg=new RegExp("^(aria)-["+em+"]*$"),Kg=new RegExp("^(aria)[A-Z]["+em+"]*$"),Yg=Object.prototype.hasOwnProperty,$g=!1,Xg=function(){};{var Gg={},Zg=Object.prototype.hasOwnProperty,Jg=/^on./,eh=/^on[^A-Z]/,nh=new RegExp("^(aria)-["+em+"]*$"),th=new RegExp("^(aria)[A-Z]["+em+"]*$");Xg=function(e,n,t,a){if(Zg.call(Gg,n)&&Gg[n])return!0;var i=n.toLowerCase();if("onfocusin"===i||"onfocusout"===i)return d("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),Gg[n]=!0,!0;// We can't rely on the event system being injected on the server.
|
|
2691
|
+
if(null!=a){var o=a.registrationNameDependencies,r=a.possibleRegistrationNames;if(o.hasOwnProperty(n))return!0;var s=r.hasOwnProperty(i)?r[i]:null;if(null!=s)return d("Invalid event handler property `%s`. Did you mean `%s`?",n,s),Gg[n]=!0,!0;if(Jg.test(n))return d("Unknown event handler property `%s`. It will be ignored.",n),Gg[n]=!0,!0}else if(Jg.test(n))return eh.test(n)&&d("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",n),Gg[n]=!0,!0;// Let the ARIA attribute hook validate ARIA attributes
|
|
2692
|
+
if(nh.test(n)||th.test(n))return!0;if("innerhtml"===i)return d("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),Gg[n]=!0,!0;if("aria"===i)return d("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),Gg[n]=!0,!0;if("is"===i&&null!==t&&void 0!==t&&"string"!=typeof t)return d("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof t),Gg[n]=!0,!0;if("number"==typeof t&&isNaN(t))return d("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",n),Gg[n]=!0,!0;var l=m(n),u=null!==l&&l.type===Qp;// Known attributes should match the casing specified in the property config.
|
|
2693
|
+
if(jg.hasOwnProperty(i)){var c=jg[i];if(c!==n)return d("Invalid DOM property `%s`. Did you mean `%s`?",n,c),Gg[n]=!0,!0}else if(!u&&n!==i)return d("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",n,i),Gg[n]=!0,!0;return"boolean"==typeof t&&f(n,t,l,!1)?(t?d("Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s=\"%s\" or %s={value.toString()}.",t,n,n,t,n):d("Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s=\"%s\" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",t,n,n,t,n,n,n),Gg[n]=!0,!0):!!u||(f(n,t,l,!1)?(Gg[n]=!0,!1):"false"!==t&&"true"!==t||null===l||l.type!==$p||(d("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",t,n,"false"===t?"The browser will interpret it as a truthy value.":"Although this works, it will not work as expected if you pass the string \"false\".",n,t),Gg[n]=!0,!0));// Now that we've validated casing, do not validate
|
|
2694
|
+
// data types for reserved props
|
|
2695
|
+
// Warn when a known attribute is a bad type
|
|
2696
|
+
// Warn when passing the strings 'false' or 'true' into a boolean prop
|
|
2697
|
+
}}var ah=function(e,n,t){{var a=[];for(var i in n){var o=Xg(e,i,n[i],t);o||a.push(i)}var r=a.map(function(e){return"`"+e+"`"}).join(", ");1===a.length?d("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",r,e):1<a.length&&d("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",r,e)}},ih=1,oh=2,dh=4,rh=16,sh=ih|oh|dh,lh=null,uh=null,ch=null,fh=function(e,n){return e(n)},ph=function(e,n,t,a,i){return e(n,t,a,i)},mh=function(){},gh=fh,hh=!1,bh=!1,yh=!1;// Check if browser support events with passive listeners
|
|
2698
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support
|
|
2699
|
+
if(qp)try{var xh={};// $FlowFixMe: Ignore Flow complaining about needing a value
|
|
2700
|
+
Object.defineProperty(xh,"passive",{get:function(){yh=!0}}),window.addEventListener("test",xh,xh),window.removeEventListener("test",xh,xh)}catch(n){yh=!1}var vh=tn;// In DEV mode, we swap out invokeGuardedCallback for a special version
|
|
2701
|
+
// that plays more nicely with the browser's DevTools. The idea is to preserve
|
|
2702
|
+
// "Pause on exceptions" behavior. Because React wraps all user-provided
|
|
2703
|
+
// functions in invokeGuardedCallback, and the production version of
|
|
2704
|
+
// invokeGuardedCallback uses a try-catch, all user exceptions are treated
|
|
2705
|
+
// like caught exceptions, and the DevTools won't pause unless the developer
|
|
2706
|
+
// takes the extra step of enabling pause on caught exceptions. This is
|
|
2707
|
+
// unintuitive, though, because even though React has caught the error, from
|
|
2708
|
+
// the developer's perspective, the error is uncaught.
|
|
2709
|
+
//
|
|
2710
|
+
// To preserve the expected "Pause on exceptions" behavior, we don't use a
|
|
2711
|
+
// try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake
|
|
2712
|
+
// DOM node, and call the user-provided callback from inside an event handler
|
|
2713
|
+
// for that fake event. If the callback throws, the error is "captured" using
|
|
2714
|
+
// a global event handler. But because the error happens in a different
|
|
2715
|
+
// event loop context, it does not interrupt the normal program flow.
|
|
2716
|
+
// Effectively, this gives us try-catch behavior without actually using
|
|
2717
|
+
// try-catch. Neat!
|
|
2718
|
+
// Check that the browser supports the APIs we need to implement our special
|
|
2719
|
+
// DEV version of invokeGuardedCallback
|
|
2720
|
+
if("undefined"!=typeof window&&"function"==typeof window.dispatchEvent&&"undefined"!=typeof document&&"function"==typeof document.createEvent){var wh=document.createElement("react");vh=function l(n,t,i,o,a,r,s,d,e){function u(){wh.removeEventListener(w,c,!1),"undefined"!=typeof window.event&&window.hasOwnProperty("event")&&(window.event=h)}// Create an event handler for our fake event. We will synchronously
|
|
2721
|
+
// dispatch our fake event using `dispatchEvent`. Inside the handler, we
|
|
2722
|
+
// call the user-provided callback.
|
|
2723
|
+
function c(){m=!0,u(),t.apply(i,y),g=!1}// Create a global error event handler. We use this to capture the value
|
|
2724
|
+
// that was thrown. It's possible that this error handler will fire more
|
|
2725
|
+
// than once; for example, if non-React code also calls `dispatchEvent`
|
|
2726
|
+
// and a handler for that event throws. We should be resilient to most of
|
|
2727
|
+
// those cases. Even if our error event handler fires more than once, the
|
|
2728
|
+
// last error event is always used. If the callback actually does error,
|
|
2729
|
+
// we know that the last error event is the correct one, because it's not
|
|
2730
|
+
// possible for anything else to have happened in between our callback
|
|
2731
|
+
// erroring and the code that follows the `dispatchEvent` call below. If
|
|
2732
|
+
// the callback doesn't error, but the error event was fired, we know to
|
|
2733
|
+
// ignore it because `didError` will be false, as described above.
|
|
2734
|
+
function f(e){if(k=e.error,x=!0,null===k&&0===e.colno&&0===e.lineno&&(v=!0),e.defaultPrevented&&null!=k&&"object"==typeof k)// Some other error handler has prevented default.
|
|
2735
|
+
// Browsers silence the error report if this happens.
|
|
2736
|
+
// We'll remember this to later decide whether to log it or not.
|
|
2737
|
+
try{k._suppressLogging=!0}catch(e){// Ignore.
|
|
2738
|
+
}}// Create a fake event type.
|
|
2739
|
+
// If document doesn't exist we know for sure we will crash in this method
|
|
2740
|
+
// when we call document.createEvent(). However this can cause confusing
|
|
2741
|
+
// errors: https://github.com/facebookincubator/create-react-app/issues/3482
|
|
2742
|
+
// So we preemptively throw with a better message instead.
|
|
2743
|
+
if("undefined"==typeof document)throw Error("The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.");var p=document.createEvent("Event"),m=!1,g=!0,h=window.event,b=Object.getOwnPropertyDescriptor(window,"event"),y=Array.prototype.slice.call(arguments,3),x=!1,v=!1,w="react-"+(n?n:"invokeguardedcallback"),k;if(window.addEventListener("error",f),wh.addEventListener(w,c,!1),p.initEvent(w,!1,!1),wh.dispatchEvent(p),b&&Object.defineProperty(window,"event",b),m&&g&&(x?v&&(k=new Error("A cross-origin error was thrown. React doesn't have access to the actual error object in development. See https://reactjs.org/link/crossorigin-error for more information.")):k=new Error("An error was thrown inside one of your components, but React doesn't know what it was. This is likely due to browser flakiness. React does its best to preserve the \"Pause on exceptions\" behavior of the DevTools, which requires some DEV-mode only tricks. It's possible that these don't work in your browser. Try triggering the error in production mode, or switching to a modern browser. If you suspect that this is actually an issue with React, please file an issue."),this.onError(k)),window.removeEventListener("error",f),!m)return u(),tn.apply(this,arguments)}}var kh=vh,Eh=!1,Sh=null,Ch=!1,_h=null,Nh={onError:function(e){Eh=!0,Sh=e}},Th=/* */0,Rh=/* */1,Ph=/* */2,Ih=/* */4,Lh=/* */6,Dh=/* */8,zh=/* */16,Ah=/* */32,Oh=/* */64,Mh=/* */128,Uh=/* */256,Fh=/* */512,Bh=/* */8192,Wh=/* */1024,Vh=/* */1028,jh=/* */932,Hh=/* */2047,qh=/* */2048,Qh=/* */4096,Kh=/* */16384,Yh=fp.ReactCurrentOwner,$h=!1,Xh=[],Gh=null,Zh=null,Jh=null,eb=new Map,nb=new Map,tb=[],ab=["mousedown","mouseup","touchcancel","touchend","touchstart","auxclick","dblclick","pointercancel","pointerdown","pointerup","dragend","dragstart","drop","compositionend","compositionstart","keydown","keypress","keyup","input","textInput",// Intentionally camelCase
|
|
2744
|
+
"copy","cut","paste","click","change","contextmenu","reset","submit"],ib=0,ob=1,db=2,rb={animationend:Fn("Animation","AnimationEnd"),animationiteration:Fn("Animation","AnimationIteration"),animationstart:Fn("Animation","AnimationStart"),transitionend:Fn("Transition","TransitionEnd")},sb={},lb={},ub,cb,fb,pb;qp&&(lb=document.createElement("div").style,!("AnimationEvent"in window)&&(delete rb.animationend.animation,delete rb.animationiteration.animation,delete rb.animationstart.animation),!("TransitionEvent"in window)&&delete rb.transitionend.transition);var mb=Bn("animationend"),gb=Bn("animationiteration"),hb=Bn("animationstart"),bb=Bn("transitionend"),yb=new Map,xb=new Map,vb=["cancel","cancel","click","click","close","close","contextmenu","contextMenu","copy","copy","cut","cut","auxclick","auxClick","dblclick","doubleClick",// Careful!
|
|
2745
|
+
"dragend","dragEnd","dragstart","dragStart","drop","drop","focusin","focus",// Careful!
|
|
2746
|
+
"focusout","blur",// Careful!
|
|
2747
|
+
"input","input","invalid","invalid","keydown","keyDown","keypress","keyPress","keyup","keyUp","mousedown","mouseDown","mouseup","mouseUp","paste","paste","pause","pause","play","play","pointercancel","pointerCancel","pointerdown","pointerDown","pointerup","pointerUp","ratechange","rateChange","reset","reset","seeked","seeked","submit","submit","touchcancel","touchCancel","touchend","touchEnd","touchstart","touchStart","volumechange","volumeChange"],wb=["change","selectionchange","textInput","compositionstart","compositionend","compositionupdate"],kb=["drag","drag","dragenter","dragEnter","dragexit","dragExit","dragleave","dragLeave","dragover","dragOver","mousemove","mouseMove","mouseout","mouseOut","mouseover","mouseOver","pointermove","pointerMove","pointerout","pointerOut","pointerover","pointerOver","scroll","scroll","toggle","toggle","touchmove","touchMove","wheel","wheel"],Eb=["abort","abort",mb,"animationEnd",gb,"animationIteration",hb,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",bb,"transitionEnd","waiting","waiting"],Sb=up.unstable_now;// Provide explicit error message when production+profiling bundle of e.g.
|
|
2748
|
+
// react-dom is used with production (non-profiling) bundle of
|
|
2749
|
+
// scheduler/tracing
|
|
2750
|
+
if(null==cp.__interactionsRef||null==cp.__interactionsRef.current)throw Error("It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://reactjs.org/link/profiling");// ascending numbers so we can compare them like numbers. They start at 90 to
|
|
2751
|
+
// avoid clashing with Scheduler's priorities.
|
|
2752
|
+
var Cb=99,_b=98,Nb=97,Tb=96,Rb=95,Pb=90;Sb();// If the initial timestamp is reasonably small, use Scheduler's `now` directly.
|
|
2753
|
+
var Ib=15,Lb=14,Db=13,zb=12,Ab=11,Ob=10,Mb=9,Ub=8,Fb=7,Bb=6,Wb=5,Vb=4,jb=3,Hb=2,qb=1,Qb=0,Kb=31,Yb=/* */0,$b=/* */0,Xb=/* */1,Gb=/* */2,Zb=/* */4,Jb=/* */24,ey=/* */32,ny=/* */192,ty=/* */256,ay=/* */3584,iy=/* */4096,oy=/* */4186112,dy=/* */62914560,ry=/* */33554432,sy=/* */67108864,ly=/* */134217727,uy=/* */134217728,cy=/* */805306368,fy=/* */1073741824,py=-1,my=Ub,gy=e?e:Tt,hy=Math.log,by=Math.LN2,yy=up.unstable_UserBlockingPriority,xy=up.unstable_runWithPriority,vy=!0,wy=null,ky=null,Ey=null,Sy={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Cy=Kt(Sy),_y=lp({},Sy,{view:0,detail:0}),Ny=Kt(_y),Ty=lp({},_y,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gt,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(Yt(e),ix)},movementY:function(e){return"movementY"in e?e.movementY:ox;// Don't need to call updateMouseMovementPolyfillState() here
|
|
2754
|
+
// because it's guaranteed to have already run when movementX
|
|
2755
|
+
// was copied.
|
|
2756
|
+
}}),Ry=Kt(Ty),Py=lp({},Ty,{dataTransfer:0}),Iy=Kt(Py),Ly=lp({},_y,{relatedTarget:0}),Dy=Kt(Ly),zy=lp({},Sy,{animationName:0,elapsedTime:0,pseudoElement:0}),Ay=Kt(zy),Oy=lp({},Sy,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),My=Kt(Oy),Uy=lp({},Sy,{data:0}),Fy=Kt(Uy),By=Fy,Wy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Vy={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},jy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},Hy=lp({},_y,{key:$t,code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gt,// Legacy Interface
|
|
2757
|
+
charCode:function(e){// `charCode` is the result of a KeyPress event and represents the value of
|
|
2758
|
+
// the actual printable character.
|
|
2759
|
+
// KeyPress is deprecated, but its replacement is not yet final and not
|
|
2760
|
+
// implemented in any major browser. Only KeyPress has charCode.
|
|
2761
|
+
return"keypress"===e.type?Ht(e):0},keyCode:function(e){// `keyCode` is the result of a KeyDown/Up event and represents the value of
|
|
2762
|
+
// physical keyboard key.
|
|
2763
|
+
// The actual meaning of the value depends on the users' keyboard layout
|
|
2764
|
+
// which cannot be detected. Assuming that it is a US keyboard layout
|
|
2765
|
+
// provides a surprisingly accurate mapping for US and European users.
|
|
2766
|
+
// Due to this, it is left to the user to implement at this time.
|
|
2767
|
+
return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){// `which` is an alias for either `keyCode` or `charCode` depending on the
|
|
2768
|
+
// type of the event.
|
|
2769
|
+
return"keypress"===e.type?Ht(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),qy=Kt(Hy),Qy=lp({},Ty,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ky=Kt(Qy),Yy=lp({},_y,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gt}),$y=Kt(Yy),Xy=lp({},Sy,{propertyName:0,elapsedTime:0,pseudoElement:0}),Gy=Kt(Xy),Zy=lp({},Ty,{deltaX:function(e){return"deltaX"in e?e.deltaX:// Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
|
|
2770
|
+
"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:// Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).
|
|
2771
|
+
"wheelDeltaY"in e?-e.wheelDeltaY:// Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
|
|
2772
|
+
"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,// Browsers without "deltaMode" is reporting in raw wheel delta where one
|
|
2773
|
+
// notch on the scroll is always +/- 120, roughly equivalent to pixels.
|
|
2774
|
+
// A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or
|
|
2775
|
+
// ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.
|
|
2776
|
+
deltaMode:0}),Jy=Kt(Zy),ex=[9,13,27,32],nx=229,tx=qp&&"CompositionEvent"in window,ax=null,ix,ox,dx;qp&&"documentMode"in document&&(ax=document.documentMode);// Webkit offers a very useful `textInput` event that can be used to
|
|
2777
|
+
// directly represent `beforeInput`. The IE `textinput` event is not as
|
|
2778
|
+
// useful, so we don't use it.
|
|
2779
|
+
var rx=qp&&"TextEvent"in window&&!ax,sx=qp&&(!tx||ax&&8<ax&&11>=ax),lx=32,ux=t(lx),cx=!1,fx=!1,px={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},mx=null,gx=null,hx=!1;// In IE9+, we have access to composition events, but the data supplied
|
|
2780
|
+
// by the native compositionend event may be incorrect. Japanese ideographic
|
|
2781
|
+
// spaces, for instance (\u3000) are not recorded correctly.
|
|
2782
|
+
qp&&(hx=ca("input")&&(!document.documentMode||9<document.documentMode));var bx="function"==typeof Object.is?Object.is:Ia,yx=Object.prototype.hasOwnProperty,xx=qp&&"documentMode"in document&&11>=document.documentMode,vx=null,wx=null,kx=null,Ex=!1;Hn(),Ra(),fa(),Ya(),Zt();var Sx=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],Cx=new Set(["cancel","close","invalid","load","scroll","toggle"].concat(Sx)),_x="_reactListening"+Math.random().toString(36).slice(2),Nx=!1,Tx="dangerouslySetInnerHTML",Rx="suppressContentEditableWarning",Px="suppressHydrationWarning",Ix="autoFocus",Lx="children",Dx="style",zx="__html",Ax=lg.html,Ox,Mx,Ux,Fx,Bx,Wx,Vx,jx,Hx,qx;// We should not delegate these events to the container, but rather
|
|
2783
|
+
// set them on the actual target element itself. This is primarily
|
|
2784
|
+
// because these events do not consistently bubble in the DOM.
|
|
2785
|
+
{Ox={// There are working polyfills for <dialog>. Let people use it.
|
|
2786
|
+
dialog:!0,// Electron ships a custom <webview> tag to display external web content in
|
|
2787
|
+
// an isolated frame and process.
|
|
2788
|
+
// This tag is not present in non Electron environments such as JSDom which
|
|
2789
|
+
// is often used for testing purposes.
|
|
2790
|
+
// @see https://electronjs.org/docs/api/webview-tag
|
|
2791
|
+
webview:!0},Ux=function(e,n){Ue(e,n),Fe(e,n),Be(e,n,{registrationNameDependencies:jp,possibleRegistrationNames:Hp})},jx=qp&&!document.documentMode;// HTML parsing normalizes CR and CRLF to LF.
|
|
2792
|
+
// It also can turn \u0000 into \uFFFD inside attributes.
|
|
2793
|
+
// https://www.w3.org/TR/html5/single-page.html#preprocessing-the-input-stream
|
|
2794
|
+
// If we have a mismatch, it might be caused by that.
|
|
2795
|
+
// We will still patch up in this case but not fire the warning.
|
|
2796
|
+
var Qx=/\r\n?/g,Kx=/\u0000|\uFFFD/g;// Parse the HTML and read it back to normalize the HTML string so that it
|
|
2797
|
+
// can be used for comparison.
|
|
2798
|
+
Hx=function(e){var n="string"==typeof e?e:""+e;return n.replace(Qx,"\n").replace(Kx,"")},Fx=function(e,n){if(!Nx){var t=Hx(n),a=Hx(e);a===t||(Nx=!0,d("Text content did not match. Server: \"%s\" Client: \"%s\"",a,t))}},Bx=function(e,n,t){if(!Nx){var a=Hx(t),i=Hx(n);i===a||(Nx=!0,d("Prop `%s` did not match. Server: %s Client: %s",e,JSON.stringify(i),JSON.stringify(a)))}},Wx=function(e){if(!Nx){Nx=!0;var n=[];e.forEach(function(e){n.push(e)}),d("Extra attributes from the server: %s",n)}},Vx=function(e,n){!1===n?d("Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",e,e,e):d("Expected `%s` listener to be a function, instead got a value of `%s` type.",e,typeof n)},qx=function(e,n){// We could have created a separate document here to avoid
|
|
2799
|
+
// re-initializing custom elements if they exist. But this breaks
|
|
2800
|
+
// how <noscript> is being handled. So we use the same document.
|
|
2801
|
+
// See the discussion in https://github.com/facebook/react/pull/11157.
|
|
2802
|
+
var t=e.namespaceURI===Ax?e.ownerDocument.createElement(e.tagName):e.ownerDocument.createElementNS(e.namespaceURI,e.tagName);return t.innerHTML=n,t.innerHTML}}var Yx=function(){},$x=function(){};{// This validation code was written based on the HTML5 parsing spec:
|
|
2803
|
+
// https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope
|
|
2804
|
+
//
|
|
2805
|
+
// Note: this does not catch all invalid nesting, nor does it try to (as it's
|
|
2806
|
+
// not clear what practical benefit doing so provides); instead, we warn only
|
|
2807
|
+
// for cases where the parser will give a parse tree differing from what React
|
|
2808
|
+
// intended. For example, <b><div></div></b> is invalid but we don't warn
|
|
2809
|
+
// because it still parses correctly; we do warn for other cases like nested
|
|
2810
|
+
// <p> tags where the beginning of the second element implicitly closes the
|
|
2811
|
+
// first, causing a confusing mess.
|
|
2812
|
+
// https://html.spec.whatwg.org/multipage/syntax.html#special
|
|
2813
|
+
var Xx=["address","applet","area","article","aside","base","basefont","bgsound","blockquote","body","br","button","caption","center","col","colgroup","dd","details","dir","div","dl","dt","embed","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","img","input","isindex","li","link","listing","main","marquee","menu","menuitem","meta","nav","noembed","noframes","noscript","object","ol","p","param","plaintext","pre","script","section","select","source","style","summary","table","tbody","td","template","textarea","tfoot","th","thead","title","tr","track","ul","wbr","xmp"],Gx=["applet","caption","html","table","td","th","marquee","object","template",// https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point
|
|
2814
|
+
// TODO: Distinguish by namespace here -- for <title>, including it here
|
|
2815
|
+
// errs on the side of fewer warnings
|
|
2816
|
+
"foreignObject","desc","title"],Zx=Gx.concat(["button"]),Jx=["dd","dt","li","option","optgroup","p","rp","rt"],ev={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null};// https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope
|
|
2817
|
+
$x=function(e,n){var t=lp({},e||ev),a={tag:n};return-1!==Gx.indexOf(n)&&(t.aTagInScope=null,t.buttonTagInScope=null,t.nobrTagInScope=null),-1!==Zx.indexOf(n)&&(t.pTagInButtonScope=null),-1!==Xx.indexOf(n)&&"address"!==n&&"div"!==n&&"p"!==n&&(t.listItemTagAutoclosing=null,t.dlItemTagAutoclosing=null),t.current=a,"form"===n&&(t.formTag=a),"a"===n&&(t.aTagInScope=a),"button"===n&&(t.buttonTagInScope=a),"nobr"===n&&(t.nobrTagInScope=a),"p"===n&&(t.pTagInButtonScope=a),"li"===n&&(t.listItemTagAutoclosing=a),("dd"===n||"dt"===n)&&(t.dlItemTagAutoclosing=a),t};/**
|
|
2818
|
+
* Returns whether
|
|
2819
|
+
*/var nv=function(e,n){// First, let's check if we're in an unusual parsing mode...
|
|
2820
|
+
return"select"===n?"option"===e||"optgroup"===e||"#text"===e:"optgroup"===n?"option"===e||"#text"===e:"option"===n?"#text"===e:"tr"===n?"th"===e||"td"===e||"style"===e||"script"===e||"template"===e:"tbody"===n||"thead"===n||"tfoot"===n?"tr"===e||"style"===e||"script"===e||"template"===e:"colgroup"===n?"col"===e||"template"===e:"table"===n?"caption"===e||"colgroup"===e||"tbody"===e||"tfoot"===e||"thead"===e||"style"===e||"script"===e||"template"===e:"head"===n?"base"===e||"basefont"===e||"bgsound"===e||"link"===e||"meta"===e||"title"===e||"noscript"===e||"noframes"===e||"style"===e||"script"===e||"template"===e:"html"===n?"head"===e||"body"===e||"frameset"===e:"frameset"===n?"frame"===e:"#document"===n?"html"===e:"h1"===e||"h2"===e||"h3"===e||"h4"===e||"h5"===e||"h6"===e?"h1"!==n&&"h2"!==n&&"h3"!==n&&"h4"!==n&&"h5"!==n&&"h6"!==n:"rp"===e||"rt"===e?-1===Jx.indexOf(n):"body"!==e&&"caption"!==e&&"col"!==e&&"colgroup"!==e&&"frameset"!==e&&"frame"!==e&&"head"!==e&&"html"!==e&&"tbody"!==e&&"td"!==e&&"tfoot"!==e&&"th"!==e&&"thead"!==e&&"tr"!==e||null==n;// Probably in the "in body" parsing mode, so we outlaw only tag combos
|
|
2821
|
+
// where the parsing rules cause implicit opens or closes to be added.
|
|
2822
|
+
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
|
|
2823
|
+
},tv=function(e,n){return"address"===e||"article"===e||"aside"===e||"blockquote"===e||"center"===e||"details"===e||"dialog"===e||"dir"===e||"div"===e||"dl"===e||"fieldset"===e||"figcaption"===e||"figure"===e||"footer"===e||"header"===e||"hgroup"===e||"main"===e||"menu"===e||"nav"===e||"ol"===e||"p"===e||"section"===e||"summary"===e||"ul"===e||"pre"===e||"listing"===e||"table"===e||"hr"===e||"xmp"===e||"h1"===e||"h2"===e||"h3"===e||"h4"===e||"h5"===e||"h6"===e?n.pTagInButtonScope:"form"===e?n.formTag||n.pTagInButtonScope:"li"===e?n.listItemTagAutoclosing:"dd"===e||"dt"===e?n.dlItemTagAutoclosing:"button"===e?n.buttonTagInScope:"a"===e?n.aTagInScope:"nobr"===e?n.nobrTagInScope:null},av={};/**
|
|
2824
|
+
* Returns whether
|
|
2825
|
+
*/Yx=function(e,n,t){t=t||ev;var a=t.current,i=a&&a.tag;null!=n&&(null!=e&&d("validateDOMNesting: when childText is passed, childTag should be null"),e="#text");var o=nv(e,i)?null:a,r=o?null:tv(e,t),s=o||r;if(s){var l=s.tag,u=!!o+"|"+e+"|"+l;if(!av[u]){av[u]=!0;var c=e,f="";if("#text"===e?/\S/.test(n)?c="Text nodes":(c="Whitespace text nodes",f=" Make sure you don't have any extra whitespace between tags on each line of your source code."):c="<"+e+">",o){var p="";"table"===l&&"tr"===e&&(p+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."),d("validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s",c,l,f,p)}else d("validateDOMNesting(...): %s cannot appear as a descendant of <%s>.",c,l)}}}}var iv;iv="suppressHydrationWarning";var ov="$",dv="/$",rv="$?",sv="$!",lv="style",uv=null,cv=null,fv="function"==typeof setTimeout?setTimeout:void 0,pv="function"==typeof clearTimeout?clearTimeout:void 0,mv=-1,gv=0,hv=Math.random().toString(36).slice(2),bv="__reactFiber$"+hv,yv="__reactProps$"+hv,xv="__reactContainer$"+hv,vv="__reactEvents$"+hv,wv={},kv=fp.ReactDebugCurrentFrame,Ev=[],Sv;Sv=[];var Cv=-1,_v;_v={};var Nv={};Object.freeze(Nv);// A cursor to the current merged context object on the stack.
|
|
2826
|
+
var Tv=Xo(Nv),Rv=Xo(!1),Pv=Nv,Iv=0,Lv=1,Dv=2,zv=null,Av=null,Ov=!1,Mv="undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__,Uv=up.unstable_runWithPriority,Fv=up.unstable_scheduleCallback,Bv=up.unstable_cancelCallback,Wv=up.unstable_shouldYield,Vv=up.unstable_requestPaint,jv=up.unstable_now,Hv=up.unstable_getCurrentPriorityLevel,qv=up.unstable_ImmediatePriority,Qv=up.unstable_UserBlockingPriority,Kv=up.unstable_NormalPriority,Yv=up.unstable_LowPriority,$v=up.unstable_IdlePriority;// A cursor to a boolean indicating whether the context has changed.
|
|
2827
|
+
// Provide explicit error message when production+profiling bundle of e.g.
|
|
2828
|
+
// react-dom is used with production (non-profiling) bundle of
|
|
2829
|
+
// scheduler/tracing
|
|
2830
|
+
if(null==cp.__interactionsRef||null==cp.__interactionsRef.current)throw Error("It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://reactjs.org/link/profiling");var Xv={},Gv=99,Zv=98,Jv=97,ew=96,nw=95,tw=90,aw=Wv,iw=// Fall back gracefully if we're running an older version of Scheduler.
|
|
2831
|
+
Vv===void 0?function(){}:Vv,ow=null,dw=null,rw=!1,sw=jv(),lw=1e4>sw?jv:function(){return jv()-sw},uw="17.0.2",cw=0,fw=1,pw=2,mw=4,gw=8,hw=16,bw=fp.ReactCurrentBatchConfig,yw=0,xw={recordUnsafeLifecycleWarnings:function(e,n){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(e,n){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}};// Except for NoPriority, these correspond to Scheduler priorities. We use
|
|
2832
|
+
// ascending numbers so we can compare them like numbers. They start at 90 to
|
|
2833
|
+
// avoid clashing with Scheduler's priorities.
|
|
2834
|
+
{var vw=function(e){for(var n=null,t=e;null!==t;)t.mode&fw&&(n=t),t=t.return;return n},ww=function(e){var n=[];return e.forEach(function(e){n.push(e)}),n.sort().join(", ")},kw=[],Ew=[],Sw=[],Cw=[],_w=[],Nw=[],Tw=new Set;xw.recordUnsafeLifecycleWarnings=function(e,n){// Dedup strategy: Warn once per component.
|
|
2835
|
+
Tw.has(e.type)||("function"==typeof n.componentWillMount&&// Don't warn about react-lifecycles-compat polyfilled components.
|
|
2836
|
+
!0!==n.componentWillMount.__suppressDeprecationWarning&&kw.push(e),e.mode&fw&&"function"==typeof n.UNSAFE_componentWillMount&&Ew.push(e),"function"==typeof n.componentWillReceiveProps&&!0!==n.componentWillReceiveProps.__suppressDeprecationWarning&&Sw.push(e),e.mode&fw&&"function"==typeof n.UNSAFE_componentWillReceiveProps&&Cw.push(e),"function"==typeof n.componentWillUpdate&&!0!==n.componentWillUpdate.__suppressDeprecationWarning&&_w.push(e),e.mode&fw&&"function"==typeof n.UNSAFE_componentWillUpdate&&Nw.push(e))},xw.flushPendingUnsafeLifecycleWarnings=function(){// We do an initial pass to gather component names
|
|
2837
|
+
var e=new Set;0<kw.length&&(kw.forEach(function(n){e.add(z(n.type)||"Component"),Tw.add(n.type)}),kw=[]);var n=new Set;0<Ew.length&&(Ew.forEach(function(e){n.add(z(e.type)||"Component"),Tw.add(e.type)}),Ew=[]);var t=new Set;0<Sw.length&&(Sw.forEach(function(e){t.add(z(e.type)||"Component"),Tw.add(e.type)}),Sw=[]);var a=new Set;0<Cw.length&&(Cw.forEach(function(e){a.add(z(e.type)||"Component"),Tw.add(e.type)}),Cw=[]);var i=new Set;0<_w.length&&(_w.forEach(function(e){i.add(z(e.type)||"Component"),Tw.add(e.type)}),_w=[]);var r=new Set;// Finally, we flush all the warnings
|
|
2838
|
+
// UNSAFE_ ones before the deprecated ones, since they'll be 'louder'
|
|
2839
|
+
if(0<Nw.length&&(Nw.forEach(function(e){r.add(z(e.type)||"Component"),Tw.add(e.type)}),Nw=[]),0<n.size){var s=ww(n);d("Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move code with side effects to componentDidMount, and set initial state in the constructor.\n\nPlease update the following components: %s",s)}if(0<a.size){var l=ww(a);d("Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n\nPlease update the following components: %s",l)}if(0<r.size){var u=ww(r);d("Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n\nPlease update the following components: %s",u)}if(0<e.size){var c=ww(e);o("componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move code with side effects to componentDidMount, and set initial state in the constructor.\n* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s",c)}if(0<t.size){var f=ww(t);o("componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s",f)}if(0<i.size){var p=ww(i);o("componentWillUpdate has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s",p)}};var Rw=new Map,Pw=new Set;// Tracks components we have already warned about.
|
|
2840
|
+
xw.recordLegacyContextWarning=function(e,n){var t=vw(e);if(null===t)return void d("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue.");// Dedup strategy: Warn once per component.
|
|
2841
|
+
if(!Pw.has(e.type)){var a=Rw.get(t);(null!=e.type.contextTypes||null!=e.type.childContextTypes||null!==n&&"function"==typeof n.getChildContext)&&(void 0===a&&(a=[],Rw.set(t,a)),a.push(e))}},xw.flushLegacyContextWarning=function(){Rw.forEach(function(e,n){if(0!==e.length){var t=e[0],a=new Set;e.forEach(function(e){a.add(z(e.type)||"Component"),Pw.add(e.type)});var i=ww(a);try{U(t),d("Legacy context API has been detected within a strict-mode tree.\n\nThe old API will be supported in all 16.x releases, but applications using it should migrate to the new version.\n\nPlease update the following components: %s\n\nLearn more about this warning here: https://reactjs.org/link/legacy-context",i)}finally{M()}}})},xw.discardPendingWarnings=function(){kw=[],Ew=[],Sw=[],Cw=[],_w=[],Nw=[],Rw=new Map}}var Iw=1073741823,Lw=Xo(null),Dw;// Use this to detect multiple renderers using the same context
|
|
2842
|
+
Dw={};var zw=null,Aw=null,Ow=null,Mw=!1,Uw=0,Fw=1,Bw=2,Ww=3,Vw=!1,jw,Hw;jw=!1,Hw=null;var qw={},Qw=Array.isArray,Kw=new sp.Component().refs,Yw,$w,Xw,Gw,Zw,Jw,ek,nk,tk,ak;{Yw=new Set,$w=new Set,Xw=new Set,Gw=new Set,nk=new Set,Zw=new Set,tk=new Set,ak=new Set;var ik=new Set;// This is so gross but it's at least non-critical and can be removed if
|
|
2843
|
+
// it causes problems. This is meant to give a nicer error message for
|
|
2844
|
+
// ReactDOM15.unstable_renderSubtreeIntoContainer(reactDOM16Component,
|
|
2845
|
+
// ...)) which otherwise throws a "_processChildContext is not a function"
|
|
2846
|
+
// exception.
|
|
2847
|
+
ek=function(e,n){if(null!==e&&"function"!=typeof e){var t=n+"_"+e;ik.has(t)||(ik.add(t),d("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",n,e))}},Jw=function(e,n){if(n===void 0){var t=z(e)||"Component";Zw.has(t)||(Zw.add(t),d("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",t))}},Object.defineProperty(qw,"_processChildContext",{enumerable:!1,value:function(){throw Error("_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).")}}),Object.freeze(qw)}var ok={isMounted:hn,enqueueSetState:function(e,n,t){var a=ln(e),i=Ru(),o=Pu(a),d=Md(i,o);d.payload=n,t!==void 0&&null!==t&&(ek(t,"setState"),d.callback=t),Ud(a,d),Lu(a,o,i)},enqueueReplaceState:function(e,n,t){var a=ln(e),i=Ru(),o=Pu(a),d=Md(i,o);d.tag=Fw,d.payload=n,t!==void 0&&null!==t&&(ek(t,"replaceState"),d.callback=t),Ud(a,d),Lu(a,o,i)},enqueueForceUpdate:function(e,n){var t=ln(e),a=Ru(),i=Pu(t),o=Md(a,i);o.tag=Bw,n!==void 0&&null!==n&&(ek(n,"forceUpdate"),o.callback=n),Ud(t,o),Lu(t,i,a)}},dk=function(e,n){},rk,sk,lk,uk,ck;/**
|
|
2848
|
+
* Warn if there's no key explicitly set on dynamic arrays of children or
|
|
2849
|
+
* object keys are not valid. This allows us to keep track of children between
|
|
2850
|
+
* updates.
|
|
2851
|
+
*/rk=!1,sk=!1,lk={},uk={},ck={},dk=function(e,n){if(null!==e&&"object"==typeof e&&e._store&&!e._store.validated&&null==e.key){if("object"!=typeof e._store)throw Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");e._store.validated=!0;var t=z(n.type)||"Component";uk[t]||(uk[t]=!0,d("Each child in a list should have a unique \"key\" prop. See https://reactjs.org/link/warning-keys for more information."))}};var fk=Array.isArray,pk=or(!0),mk=or(!1),gk={},hk=Xo(gk),bk=Xo(gk),yk=Xo(gk),xk=0,vk=1,wk=1,kk=2,Ek=Xo(xk),Sk=/* */0,Ck=/* */1,_k=/* */2,Nk=/* */4,Tk=null,Rk=null,Pk=!1,Ik=[],Lk;// Used to detect multiple renderers using the same mutable source.
|
|
2852
|
+
Lk={};var Dk=fp.ReactCurrentDispatcher,zk=fp.ReactCurrentBatchConfig,Ak,Ok;Ok={},Ak=new Set;// These are set right before calling the component.
|
|
2853
|
+
var Mk=Yb,Uk=null,Fk=null,Bk=null,Wk=!1,Vk=!1,jk=25,Hk=null,qk=null,Qk=-1,Kk=!1,Yk=ws,$k=!1,Xk={readContext:zd,useCallback:Hr,useContext:Hr,useEffect:Hr,useImperativeHandle:Hr,useLayoutEffect:Hr,useMemo:Hr,useReducer:Hr,useRef:Hr,useState:Hr,useDebugValue:Hr,useDeferredValue:Hr,useTransition:Hr,useMutableSource:Hr,useOpaqueIdentifier:Hr,unstable_isNewReconciler:Bp},Gk=null,Zk=null,Jk=null,eE=null,nE=null,tE=null,aE=null;// The work-in-progress fiber. I've named it differently to distinguish it from
|
|
2854
|
+
// the work-in-progress hook.
|
|
2855
|
+
{var iE=function(){d("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")},oE=function(){d("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://reactjs.org/link/rules-of-hooks")};Gk={readContext:function(e,n){return zd(e,n)},useCallback:function(e,n){return Hk="useCallback",Br(),Vr(n),ks(e,n)},useContext:function(e,n){return Hk="useContext",Br(),zd(e,n)},useEffect:function(e,n){return Hk="useEffect",Br(),Vr(n),ms(e,n)},useImperativeHandle:function(e,n,t){return Hk="useImperativeHandle",Br(),Vr(t),xs(e,n,t)},useLayoutEffect:function(e,n){return Hk="useLayoutEffect",Br(),Vr(n),hs(e,n)},useMemo:function(e,n){Hk="useMemo",Br(),Vr(n);var t=Dk.current;Dk.current=nE;try{return Ss(e,n)}finally{Dk.current=t}},useReducer:function(e,n,t){Hk="useReducer",Br();var a=Dk.current;Dk.current=nE;try{return Jr(e,n,t)}finally{Dk.current=a}},useRef:function(e){return Hk="useRef",Br(),us(e)},useState:function(e){Hk="useState",Br();var n=Dk.current;Dk.current=nE;try{return ds(e)}finally{Dk.current=n}},useDebugValue:function(e,n){return Hk="useDebugValue",Br(),ws()},useDeferredValue:function(e){return Hk="useDeferredValue",Br(),_s(e)},useTransition:function(){return Hk="useTransition",Br(),Ps()},useMutableSource:function(e,n,t){return Hk="useMutableSource",Br(),is(e,n,t)},useOpaqueIdentifier:function(){return Hk="useOpaqueIdentifier",Br(),As()},unstable_isNewReconciler:Bp},Zk={readContext:function(e,n){return zd(e,n)},useCallback:function(e,n){return Hk="useCallback",Wr(),ks(e,n)},useContext:function(e,n){return Hk="useContext",Wr(),zd(e,n)},useEffect:function(e,n){return Hk="useEffect",Wr(),ms(e,n)},useImperativeHandle:function(e,n,t){return Hk="useImperativeHandle",Wr(),xs(e,n,t)},useLayoutEffect:function(e,n){return Hk="useLayoutEffect",Wr(),hs(e,n)},useMemo:function(e,n){Hk="useMemo",Wr();var t=Dk.current;Dk.current=nE;try{return Ss(e,n)}finally{Dk.current=t}},useReducer:function(e,n,t){Hk="useReducer",Wr();var a=Dk.current;Dk.current=nE;try{return Jr(e,n,t)}finally{Dk.current=a}},useRef:function(e){return Hk="useRef",Wr(),us(e)},useState:function(e){Hk="useState",Wr();var n=Dk.current;Dk.current=nE;try{return ds(e)}finally{Dk.current=n}},useDebugValue:function(e,n){return Hk="useDebugValue",Wr(),ws()},useDeferredValue:function(e){return Hk="useDeferredValue",Wr(),_s(e)},useTransition:function(){return Hk="useTransition",Wr(),Ps()},useMutableSource:function(e,n,t){return Hk="useMutableSource",Wr(),is(e,n,t)},useOpaqueIdentifier:function(){return Hk="useOpaqueIdentifier",Wr(),As()},unstable_isNewReconciler:Bp},Jk={readContext:function(e,n){return zd(e,n)},useCallback:function(e,n){return Hk="useCallback",Wr(),Es(e,n)},useContext:function(e,n){return Hk="useContext",Wr(),zd(e,n)},useEffect:function(e,n){return Hk="useEffect",Wr(),gs(e,n)},useImperativeHandle:function(e,n,t){return Hk="useImperativeHandle",Wr(),vs(e,n,t)},useLayoutEffect:function(e,n){return Hk="useLayoutEffect",Wr(),bs(e,n)},useMemo:function(e,n){Hk="useMemo",Wr();var t=Dk.current;Dk.current=tE;try{return Cs(e,n)}finally{Dk.current=t}},useReducer:function(e,n,t){Hk="useReducer",Wr();var a=Dk.current;Dk.current=tE;try{return es(e,n,t)}finally{Dk.current=a}},useRef:function(e){return Hk="useRef",Wr(),cs()},useState:function(e){Hk="useState",Wr();var n=Dk.current;Dk.current=tE;try{return rs(e)}finally{Dk.current=n}},useDebugValue:function(e,n){return Hk="useDebugValue",Wr(),Yk()},useDeferredValue:function(e){return Hk="useDeferredValue",Wr(),Ns(e)},useTransition:function(){return Hk="useTransition",Wr(),Is()},useMutableSource:function(e,n,t){return Hk="useMutableSource",Wr(),os(e,n,t)},useOpaqueIdentifier:function(){return Hk="useOpaqueIdentifier",Wr(),Os()},unstable_isNewReconciler:Bp},eE={readContext:function(e,n){return zd(e,n)},useCallback:function(e,n){return Hk="useCallback",Wr(),Es(e,n)},useContext:function(e,n){return Hk="useContext",Wr(),zd(e,n)},useEffect:function(e,n){return Hk="useEffect",Wr(),gs(e,n)},useImperativeHandle:function(e,n,t){return Hk="useImperativeHandle",Wr(),vs(e,n,t)},useLayoutEffect:function(e,n){return Hk="useLayoutEffect",Wr(),bs(e,n)},useMemo:function(e,n){Hk="useMemo",Wr();var t=Dk.current;Dk.current=aE;try{return Cs(e,n)}finally{Dk.current=t}},useReducer:function(e,n,t){Hk="useReducer",Wr();var a=Dk.current;Dk.current=aE;try{return ns(e,n,t)}finally{Dk.current=a}},useRef:function(e){return Hk="useRef",Wr(),cs()},useState:function(e){Hk="useState",Wr();var n=Dk.current;Dk.current=aE;try{return ss(e)}finally{Dk.current=n}},useDebugValue:function(e,n){return Hk="useDebugValue",Wr(),Yk()},useDeferredValue:function(e){return Hk="useDeferredValue",Wr(),Ts(e)},useTransition:function(){return Hk="useTransition",Wr(),Ls()},useMutableSource:function(e,n,t){return Hk="useMutableSource",Wr(),os(e,n,t)},useOpaqueIdentifier:function(){return Hk="useOpaqueIdentifier",Wr(),Ms()},unstable_isNewReconciler:Bp},nE={readContext:function(e,n){return iE(),zd(e,n)},useCallback:function(e,n){return Hk="useCallback",oE(),Br(),ks(e,n)},useContext:function(e,n){return Hk="useContext",oE(),Br(),zd(e,n)},useEffect:function(e,n){return Hk="useEffect",oE(),Br(),ms(e,n)},useImperativeHandle:function(e,n,t){return Hk="useImperativeHandle",oE(),Br(),xs(e,n,t)},useLayoutEffect:function(e,n){return Hk="useLayoutEffect",oE(),Br(),hs(e,n)},useMemo:function(e,n){Hk="useMemo",oE(),Br();var t=Dk.current;Dk.current=nE;try{return Ss(e,n)}finally{Dk.current=t}},useReducer:function(e,n,t){Hk="useReducer",oE(),Br();var a=Dk.current;Dk.current=nE;try{return Jr(e,n,t)}finally{Dk.current=a}},useRef:function(e){return Hk="useRef",oE(),Br(),us(e)},useState:function(e){Hk="useState",oE(),Br();var n=Dk.current;Dk.current=nE;try{return ds(e)}finally{Dk.current=n}},useDebugValue:function(e,n){return Hk="useDebugValue",oE(),Br(),ws()},useDeferredValue:function(e){return Hk="useDeferredValue",oE(),Br(),_s(e)},useTransition:function(){return Hk="useTransition",oE(),Br(),Ps()},useMutableSource:function(e,n,t){return Hk="useMutableSource",oE(),Br(),is(e,n,t)},useOpaqueIdentifier:function(){return Hk="useOpaqueIdentifier",oE(),Br(),As()},unstable_isNewReconciler:Bp},tE={readContext:function(e,n){return iE(),zd(e,n)},useCallback:function(e,n){return Hk="useCallback",oE(),Wr(),Es(e,n)},useContext:function(e,n){return Hk="useContext",oE(),Wr(),zd(e,n)},useEffect:function(e,n){return Hk="useEffect",oE(),Wr(),gs(e,n)},useImperativeHandle:function(e,n,t){return Hk="useImperativeHandle",oE(),Wr(),vs(e,n,t)},useLayoutEffect:function(e,n){return Hk="useLayoutEffect",oE(),Wr(),bs(e,n)},useMemo:function(e,n){Hk="useMemo",oE(),Wr();var t=Dk.current;Dk.current=tE;try{return Cs(e,n)}finally{Dk.current=t}},useReducer:function(e,n,t){Hk="useReducer",oE(),Wr();var a=Dk.current;Dk.current=tE;try{return es(e,n,t)}finally{Dk.current=a}},useRef:function(e){return Hk="useRef",oE(),Wr(),cs()},useState:function(e){Hk="useState",oE(),Wr();var n=Dk.current;Dk.current=tE;try{return rs(e)}finally{Dk.current=n}},useDebugValue:function(e,n){return Hk="useDebugValue",oE(),Wr(),Yk()},useDeferredValue:function(e){return Hk="useDeferredValue",oE(),Wr(),Ns(e)},useTransition:function(){return Hk="useTransition",oE(),Wr(),Is()},useMutableSource:function(e,n,t){return Hk="useMutableSource",oE(),Wr(),os(e,n,t)},useOpaqueIdentifier:function(){return Hk="useOpaqueIdentifier",oE(),Wr(),Os()},unstable_isNewReconciler:Bp},aE={readContext:function(e,n){return iE(),zd(e,n)},useCallback:function(e,n){return Hk="useCallback",oE(),Wr(),Es(e,n)},useContext:function(e,n){return Hk="useContext",oE(),Wr(),zd(e,n)},useEffect:function(e,n){return Hk="useEffect",oE(),Wr(),gs(e,n)},useImperativeHandle:function(e,n,t){return Hk="useImperativeHandle",oE(),Wr(),vs(e,n,t)},useLayoutEffect:function(e,n){return Hk="useLayoutEffect",oE(),Wr(),bs(e,n)},useMemo:function(e,n){Hk="useMemo",oE(),Wr();var t=Dk.current;Dk.current=tE;try{return Cs(e,n)}finally{Dk.current=t}},useReducer:function(e,n,t){Hk="useReducer",oE(),Wr();var a=Dk.current;Dk.current=tE;try{return ns(e,n,t)}finally{Dk.current=a}},useRef:function(e){return Hk="useRef",oE(),Wr(),cs()},useState:function(e){Hk="useState",oE(),Wr();var n=Dk.current;Dk.current=tE;try{return ss(e)}finally{Dk.current=n}},useDebugValue:function(e,n){return Hk="useDebugValue",oE(),Wr(),Yk()},useDeferredValue:function(e){return Hk="useDeferredValue",oE(),Wr(),Ts(e)},useTransition:function(){return Hk="useTransition",oE(),Wr(),Ls()},useMutableSource:function(e,n,t){return Hk="useMutableSource",oE(),Wr(),os(e,n,t)},useOpaqueIdentifier:function(){return Hk="useOpaqueIdentifier",oE(),Wr(),Ms()},unstable_isNewReconciler:Bp}}var dE=up.unstable_now,rE=0,sE=-1,lE=fp.ReactCurrentOwner,uE=!1,cE,fE,pE,mE,gE,hE,bE,yE;cE={},fE={},pE={},mE={},gE={},hE=!1,bE={},yE={};var xE=Xs,vE={dehydrated:null,retryLane:$b},wE=!1,kE=!1,EE,SE,CE,_E;// Mutation mode
|
|
2856
|
+
EE=function(e,n,t,a){// We only have the top Fiber that was created but we need recurse down its
|
|
2857
|
+
// children to find all the terminal nodes.
|
|
2858
|
+
for(var i=n.child;null!==i;){if(i.tag===yp||i.tag===xp)qi(e,i.stateNode);else if(i.tag===bp);else if(null!==i.child){i.child.return=i,i=i.child;continue}if(i===n)return;for(;null===i.sibling;){if(null===i.return||i.return===n)return;i=i.return}i.sibling.return=i.return,i=i.sibling}},SE=function(e){// Noop
|
|
2859
|
+
},CE=function(e,n,t,a,i){// If we have an alternate, that means this is an update and we need to
|
|
2860
|
+
// schedule a side-effect to do the updates.
|
|
2861
|
+
var o=e.memoizedProps;if(o!==a)// In mutation mode, this is sufficient for a bailout because
|
|
2862
|
+
// we won't touch this node even if children changed.
|
|
2863
|
+
{// If we get updated because one of our children updated, we don't
|
|
2864
|
+
// have newProps so we'll have to reuse them.
|
|
2865
|
+
// TODO: Split the update API as separate for the props vs. children.
|
|
2866
|
+
// Even better would be if children weren't special cased at all tho.
|
|
2867
|
+
var d=n.stateNode,r=fr(),s=Ki(d,t,o,a,i,r);n.updateQueue=s,s&&Ul(n)}},_E=function(e,n,t,a){t!==a&&Ul(n)};var NE="function"==typeof WeakMap?WeakMap:Map,TE=null;TE=new Set;var RE="function"==typeof WeakSet?WeakSet:Set,PE=function(e,n){n.props=e.memoizedProps,n.state=e.memoizedState,n.componentWillUnmount()};if("function"==typeof Symbol&&Symbol.for){var IE=Symbol.for;IE("selector.component"),IE("selector.has_pseudo_class"),IE("selector.role"),IE("selector.test_id"),IE("selector.text")}var LE=[],DE=Math.ceil,zE=fp.ReactCurrentDispatcher,AE=fp.ReactCurrentOwner,OE=fp.IsSomeRendererActing,ME=/* */0,UE=/* */1,FE=/* */2,BE=/* */4,WE=/* */8,VE=/* */16,jE=/* */32,HE=/* */64,qE=0,QE=1,KE=2,YE=3,$E=4,XE=5,GE=ME,ZE=null,JE=null,eS=Yb,nS=Yb,tS=Xo(Yb),aS=qE,iS=null,oS=Yb,dS=Yb,rS=Yb,sS=Yb,lS=null,uS=0,cS=500,fS=1/0,pS=500,mS=null,gS=!1,hS=null,bS=null,yS=!1,xS=null,vS=tw,wS=Yb,kS=[],ES=[],SS=null,CS=50,_S=0,NS=null,TS=50,RS=0,PS=null,IS=py,LS=Yb,DS=Yb,zS=!1,AS=null,OS=!1,MS=Cc,US=null,FS=null,BS;{var WS=null;BS=function(e,n,t){// If a component throws an error, we replay it again in a synchronously
|
|
2868
|
+
// dispatched event, so that the debugger will treat it as an uncaught
|
|
2869
|
+
// error See ReactErrorUtils for more information.
|
|
2870
|
+
// Before entering the begin phase, copy the work-in-progress onto a dummy
|
|
2871
|
+
// fiber. If beginWork throws, we'll use this to reset the state.
|
|
2872
|
+
var a=Ef(WS,n);try{return Ml(e,n,t)}catch(o){if(null!==o&&"object"==typeof o&&"function"==typeof o.then)// Don't replay promises. Treat everything else like an error.
|
|
2873
|
+
throw o;// Keep this code in sync with handleError; any changes here must have
|
|
2874
|
+
// corresponding changes there.
|
|
2875
|
+
if(Cd(),Yr(),jl(n),Ef(n,a),n.mode&gw&&Ws(n),an(null,Ml,null,e,n,t),rn()){var i=sn();// `invokeGuardedCallback` sometimes sets an expando `_suppressLogging`.
|
|
2876
|
+
// Rethrow this error instead of the original one.
|
|
2877
|
+
throw i}else// This branch is reachable if the render phase is impure.
|
|
2878
|
+
throw o}}}var VS=!1,jS;jS=new Set;var HS={current:!1},qS=Fc,QS=!1,KS=0,YS=null,$S=null,XS=function(e){YS=e},GS=function(e,n){{if(null===YS)// Hot reloading is disabled.
|
|
2879
|
+
return;var t=n.staleFamilies,a=n.updatedFamilies;yc(),qu(function(){ef(e.current,a,t)})}},ZS=function(e,n){{if(e.context!==Nv)// Super edge case: root has a legacy _renderSubtree context
|
|
2880
|
+
// but we don't know the parentComponent so we can't pass it.
|
|
2881
|
+
// Just ignore. We'll delete this with _renderSubtree code path later.
|
|
2882
|
+
return;yc(),qu(function(){If(n,e,null,null)})}},JS=function(e,n){{var t=new Set,a=new Set(n.map(function(e){return e.current}));return nf(e.current,a,t),t}},eC;{eC=!1;try{var nC=Object.preventExtensions({});/* eslint-disable no-new */new Map([[nC,null]]),new Set([nC])}catch(n){// TODO: Consider warning about bad polyfills
|
|
2883
|
+
eC=!0}}var tC=1,aC=function(e,n,t,a){// $FlowFixMe: the shapes are exact here but Flow doesn't like constructors
|
|
2884
|
+
return new of(e,n,t,a)},iC,oC;iC=!1,oC={};var dC=function(e){return!1},rC=null,sC=null,lC=null,uC=null,cC=null,fC=null,pC=null,mC=null;{var gC=function(e,n,t){var a=n[t],i=Array.isArray(e)?e.slice():lp({},e);return t+1===n.length?(Array.isArray(i)?i.splice(a,1):delete i[a],i):(i[a]=gC(e[a],n,t+1),i);// $FlowFixMe number or string is fine here
|
|
2885
|
+
},hC=function(e,n){return gC(e,n,0)},bC=function(e,n,t,a){var i=n[a],o=Array.isArray(e)?e.slice():lp({},e);if(a+1===n.length){var d=t[a];// $FlowFixMe number or string is fine here
|
|
2886
|
+
o[d]=o[i],Array.isArray(o)?o.splice(i,1):delete o[i]}else// $FlowFixMe number or string is fine here
|
|
2887
|
+
o[i]=bC(// $FlowFixMe number or string is fine here
|
|
2888
|
+
e[i],n,t,a+1);return o},yC=function(e,n,t){if(n.length!==t.length)return void o("copyWithRename() expects paths of the same length");for(var a=0;a<t.length-1;a++)if(n[a]!==t[a])return void o("copyWithRename() expects paths to be the same except for the deepest key");return bC(e,n,t,0)},xC=function(e,n,t,a){if(t>=n.length)return a;var i=n[t],o=Array.isArray(e)?e.slice():lp({},e);return o[i]=xC(e[i],n,t+1,a),o},vC=function(e,n,t){return xC(e,n,0,t)},wC=function(e,n){// For now, the "id" of stateful hooks is just the stateful hook index.
|
|
2889
|
+
// This may change in the future with e.g. nested hooks.
|
|
2890
|
+
for(var t=e.memoizedState;null!==t&&0<n;)t=t.next,n--;return t};// Support DevTools editable values for useState and useReducer.
|
|
2891
|
+
// Support DevTools props for function components, forwardRef, memo, host components, etc.
|
|
2892
|
+
rC=function(e,n,t,a){var i=wC(e,n);if(null!==i){var o=vC(i.memoizedState,t,a);// We aren't actually adding an update to the queue,
|
|
2893
|
+
// because there is no update we can add for useReducer hooks that won't trigger an error.
|
|
2894
|
+
// (There's no appropriate action type for DevTools overrides.)
|
|
2895
|
+
// As a result though, React will see the scheduled update as a noop and bailout.
|
|
2896
|
+
// Shallow cloning props works as a workaround for now to bypass the bailout check.
|
|
2897
|
+
i.memoizedState=o,i.baseState=o,e.memoizedProps=lp({},e.memoizedProps),Lu(e,Xb,py)}},sC=function(e,n,t){var a=wC(e,n);if(null!==a){var i=hC(a.memoizedState,t);// We aren't actually adding an update to the queue,
|
|
2898
|
+
// because there is no update we can add for useReducer hooks that won't trigger an error.
|
|
2899
|
+
// (There's no appropriate action type for DevTools overrides.)
|
|
2900
|
+
// As a result though, React will see the scheduled update as a noop and bailout.
|
|
2901
|
+
// Shallow cloning props works as a workaround for now to bypass the bailout check.
|
|
2902
|
+
a.memoizedState=i,a.baseState=i,e.memoizedProps=lp({},e.memoizedProps),Lu(e,Xb,py)}},lC=function(e,n,t,a){var i=wC(e,n);if(null!==i){var o=yC(i.memoizedState,t,a);// We aren't actually adding an update to the queue,
|
|
2903
|
+
// because there is no update we can add for useReducer hooks that won't trigger an error.
|
|
2904
|
+
// (There's no appropriate action type for DevTools overrides.)
|
|
2905
|
+
// As a result though, React will see the scheduled update as a noop and bailout.
|
|
2906
|
+
// Shallow cloning props works as a workaround for now to bypass the bailout check.
|
|
2907
|
+
i.memoizedState=o,i.baseState=o,e.memoizedProps=lp({},e.memoizedProps),Lu(e,Xb,py)}},uC=function(e,n,t){e.pendingProps=vC(e.memoizedProps,n,t),e.alternate&&(e.alternate.pendingProps=e.pendingProps),Lu(e,Xb,py)},cC=function(e,n){e.pendingProps=hC(e.memoizedProps,n),e.alternate&&(e.alternate.pendingProps=e.pendingProps),Lu(e,Xb,py)},fC=function(e,n,t){e.pendingProps=yC(e.memoizedProps,n,t),e.alternate&&(e.alternate.pendingProps=e.pendingProps),Lu(e,Xb,py)},pC=function(e){Lu(e,Xb,py)},mC=function(e){dC=e}}qf.prototype.render=function(e){var n=this._internalRoot;{"function"==typeof arguments[1]&&d("render(...): does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect().");var t=n.containerInfo;if(t.nodeType!==mg){var a=Ff(n.current);a&&a.parentNode!==t&&d("render(...): It looks like the React-rendered content of the root container was removed without using React. This is not supported and will cause errors. Instead, call root.unmount() to empty a root's container.")}}If(e,n,null,null)},qf.prototype.unmount=function(){"function"==typeof arguments[0]&&d("unmount(...): does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect().");var e=this._internalRoot,n=e.containerInfo;If(null,e,null,function(){Bo(n)})};var kC=fp.ReactCurrentOwner,EC=!1,SC;SC=function(e){if(e._reactRootContainer&&e.nodeType!==mg){var n=Ff(e._reactRootContainer._internalRoot.current);n&&n.parentNode!==e&&d("render(...): It looks like the React-rendered content of this container was removed without using React. This is not supported and will cause errors. Instead, call ReactDOM.unmountComponentAtNode to empty a container.")}var t=!!e._reactRootContainer,a=$f(e),i=!!(a&&jo(a));i&&!t&&d("render(...): Replacing React-rendered children with a new root component. If you intended to update the children of this node, you should instead have the existing children update their state and render the new components instead of calling ReactDOM.render."),e.nodeType===fg&&e.tagName&&"BODY"===e.tagName.toUpperCase()&&d("render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app.")},kn(Af),En(Of),Sn(Mf),Cn(Uf);var CC=!1;("function"!=typeof Map||// $FlowIssue Flow incorrectly thinks Map has no prototype
|
|
2908
|
+
null==Map.prototype||"function"!=typeof Map.prototype.forEach||"function"!=typeof Set||// $FlowIssue Flow incorrectly thinks Set has no prototype
|
|
2909
|
+
null==Set.prototype||"function"!=typeof Set.prototype.clear||"function"!=typeof Set.prototype.forEach)&&d("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),je(Mi),Ze(Wu,ju,Fu,Vu);var _C={// Keep in sync with ReactTestUtils.js, and ReactTestUtilsAct.js.
|
|
2910
|
+
// This is an array for better minification.
|
|
2911
|
+
Events:[jo,Ho,qo,He,Qe,yc,// TODO: This is related to `act`, not events. Move to separate key?
|
|
2912
|
+
HS]},NC=Hf({findFiberByHostInstance:Vo,bundleType:1,version:uw,rendererPackageName:"react-dom"});if(!NC&&qp&&window.top===window.self&&(-1<navigator.userAgent.indexOf("Chrome")&&-1===navigator.userAgent.indexOf("Edge")||-1<navigator.userAgent.indexOf("Firefox")))// If we're in Chrome or Firefox, provide a download link if not installed.
|
|
2913
|
+
{var TC=window.location.protocol;// Don't warn in exotic cases like chrome-extension://.
|
|
2914
|
+
/^(https?|file):$/.test(TC)&&console.info("%cDownload the React DevTools for a better development experience: https://reactjs.org/link/react-devtools"+("file:"===TC?"\nYou might need to use a local HTTP server (instead of file://): https://reactjs.org/link/react-devtools-faq":""),"font-weight:bold")}n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=_C,n.createPortal=op,n.findDOMNode=ep,n.flushSync=qu,n.hydrate=np,n.render=tp,n.unmountComponentAtNode=ip,n.unstable_batchedUpdates=Wu,n.unstable_createPortal=rp,n.unstable_renderSubtreeIntoContainer=dp,n.version=uw}()});reactDom_development.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,reactDom_development.createPortal,reactDom_development.findDOMNode,reactDom_development.flushSync,reactDom_development.hydrate,reactDom_development.render,reactDom_development.unmountComponentAtNode,reactDom_development.unstable_batchedUpdates,reactDom_development.unstable_createPortal,reactDom_development.unstable_renderSubtreeIntoContainer,reactDom_development.version;var reactDom=createCommonjsModule(function(e){function n(){/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){if("production"!==process.env.NODE_ENV)// This branch is unreachable because this function is only called
|
|
2915
|
+
// in production, but the condition is true only in development.
|
|
2916
|
+
// Therefore if the branch is still here, dead code elimination wasn't
|
|
2917
|
+
// properly applied.
|
|
2918
|
+
// Don't change the message. React DevTools relies on it. Also make sure
|
|
2919
|
+
// this message doesn't occur elsewhere in this function, or it will cause
|
|
2920
|
+
// a false positive.
|
|
2921
|
+
throw new Error("^_^");try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}}"production"===process.env.NODE_ENV?(n(),e.exports=reactDom_production_min):e.exports=reactDom_development});function ModalContainer(e){var n=e.children;return/*#__PURE__*/reactDom.createPortal(/*#__PURE__*/React__default["default"].createElement("div",{className:"lunatic-modal-controls"},/*#__PURE__*/React__default["default"].createElement("div",{className:"modal"},n)),document.body)}function CloseOrSkip(e){var n=e.errors,t=e.onClose,a=e.onSkip,i=Object.values(n).flat().reduce(function(e,n){var t=n.criticality;return e||"WARN"===t},!1);return i?/*#__PURE__*/React__default["default"].createElement(Button,{className:"modal-button",onClick:t},"Close"):/*#__PURE__*/React__default["default"].createElement(Button,{className:"modal-button",onClick:a},"Next")}var css_248z$7=".lunatic-modal-controls {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(50, 50, 50, 0.5);\n}\n.lunatic-modal-controls .modal {\n background-color: snow;\n height: 200px;\n width: 60%;\n margin: auto;\n margin-top: 20%;\n position: relative;\n border-radius: 8px;\n}\n.lunatic-modal-controls .modal .title {\n height: 32px;\n background-color: darkslateblue;\n color: gainsboro;\n font-size: 18px;\n font-weight: bolder;\n line-height: 32px;\n padding: 0 12px;\n border-radius: 8px 8px 0 0;\n}\n.lunatic-modal-controls .modal .body {\n padding: 0 12px 0 12px;\n height: 60%;\n background-color: aquamarine;\n}\n.lunatic-modal-controls .modal .modal-button {\n display: block;\n position: absolute;\n bottom: 0;\n right: 0;\n margin: 0 12px 12px 0;\n}\n.lunatic-modal-controls .errors ul,\n.lunatic-modal-controls .errors li,\n.lunatic-modal-controls .errors div,\n.lunatic-modal-controls .errors span {\n margin: 0;\n padding: 0;\n border: none;\n list-style: none;\n}";styleInject(".lunatic-modal-controls {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(50, 50, 50, 0.5);\n}\n.lunatic-modal-controls .modal {\n background-color: snow;\n height: 200px;\n width: 60%;\n margin: auto;\n margin-top: 20%;\n position: relative;\n border-radius: 8px;\n}\n.lunatic-modal-controls .modal .title {\n height: 32px;\n background-color: darkslateblue;\n color: gainsboro;\n font-size: 18px;\n font-weight: bolder;\n line-height: 32px;\n padding: 0 12px;\n border-radius: 8px 8px 0 0;\n}\n.lunatic-modal-controls .modal .body {\n padding: 0 12px 0 12px;\n height: 60%;\n background-color: aquamarine;\n}\n.lunatic-modal-controls .modal .modal-button {\n display: block;\n position: absolute;\n bottom: 0;\n right: 0;\n margin: 0 12px 12px 0;\n}\n.lunatic-modal-controls .errors ul,\n.lunatic-modal-controls .errors li,\n.lunatic-modal-controls .errors div,\n.lunatic-modal-controls .errors span {\n margin: 0;\n padding: 0;\n border: none;\n list-style: none;\n}");function Error$1(e){var n=e.criticality,t=e.errorMessage,a=t.value;return/*#__PURE__*/React__default["default"].createElement("li",{className:classnames(n)},a)}function ComponentErrors(e){var n=e.errors,t=n.map(function(e,n){return/*#__PURE__*/React__default["default"].createElement(Error$1,_extends({},e,{key:n}))},[]);return/*#__PURE__*/React__default["default"].createElement("ul",{className:classnames("errors")},t)}function ModalControls(e){var n=e.title,t=e.errors,a=e.goNext,i=React.useCallback(function(){a({block:!0})},[a]);if("object"===_typeof(t)){var o=Object.entries(t).map(function(e){var n=_slicedToArray(e,2),t=n[0],a=n[1];return/*#__PURE__*/React__default["default"].createElement(ComponentErrors,{errors:a,key:t})},[]);return/*#__PURE__*/React__default["default"].createElement(ModalContainer,null,/*#__PURE__*/React__default["default"].createElement("div",{className:"title"},n),/*#__PURE__*/React__default["default"].createElement("div",{className:"body"},o),/*#__PURE__*/React__default["default"].createElement(CloseOrSkip,{onSkip:a,onClose:i,errors:t}))}return null}var PairwiseBlock=function e(){return/*#__PURE__*/React__default["default"].createElement("div",null,"TODO: PairwiseBlock")};function Row$1(e){var n=e.components,t=e.valueMap,a=void 0===t?{}:t,i=e.handleChange,o=e.features,d=e.missing,r=e.shortcut,s=e.management,l=e.preferences,u=e.executeExpression,c=e.custom,f=e.linksIterations,p=React.useCallback(function(e,n){i(e,n,{linksIterations:f})},[i,f]);return n.reduce(function(e,n){var t=n.response,i=n.id,m=_slicedToArray(f,2),g=m[0],h=m[1],b="".concat(i,"-").concat(g+1,"-").concat(h+1," "),y=void 0;if(t){var x=t.name,v=a[x];Array.isArray(v)&&Array.isArray(v[g])&&(y=v[g][h]||"")}return[].concat(_toConsumableArray(e),[/*#__PURE__*/React__default["default"].createElement(OrchestratedComponent,{component:n,key:b,handleChange:p,features:o,missing:d,shortcut:r,management:s,value:y,id:b,preferences:l,linksIterations:f,executeExpression:u,custom:c})])},[])}var LinksOrchestrator=createRowOrchestrator(Row$1),PairwiseLinks=function n(e){var t=e.declarations,a=e.components,i=e.handleChange,o=e.value,d=e.missing,r=e.shortcut,s=e.features,l=e.preferences,u=e.management,c=e.executeExpression,f=e.xAxisIterations,p=e.yAxisIterations,m=e.custom,g=e.id,h=f*p,b=React.useCallback(function(e,n,t){i(e,n,t)},[i]);return 0<h?/*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment,null,/*#__PURE__*/React__default["default"].createElement(DeclarationsBeforeText,{declarations:t,custom:m}),/*#__PURE__*/React__default["default"].createElement(DeclarationsAfterText,{declarations:t,custom:m}),/*#__PURE__*/React__default["default"].createElement(LinksOrchestrator,{id:g,components:a,handleChange:b,nbRows:h,valueMap:o,management:u,missing:d,shortcut:r,features:s,preferences:l,executeExpression:c,custom:m,xAxisIterations:f}),/*#__PURE__*/React__default["default"].createElement(DeclarationsDetachable,{declarations:t,custom:m})):null},css_248z$6=".lunatic-component .sequence-lunatic {\n padding: 0;\n font-size: 0.875rem;\n color: var(--color-primary-light);\n background-color: var(--color-secondary-contrast-text);\n border: 0;\n height: 1.875rem;\n}";styleInject(css_248z$6);function Sequence(e){var n=e.declarations,t=e.label,a=e.id,i=e.style;return/*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment,null,/*#__PURE__*/React__default["default"].createElement(DeclarationsBeforeText,{declarations:n}),/*#__PURE__*/React__default["default"].createElement(Label$1,{className:"sequence-lunatic",id:"sequence-".concat(a),style:i},safetyLabel(t)),/*#__PURE__*/React__default["default"].createElement(DeclarationsAfterText,{declarations:n}),/*#__PURE__*/React__default["default"].createElement(DeclarationsDetachable,{declarations:n}))}function Subsequence(e){var n=e.id,t=e.declarations,a=e.label;return/*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment,null,/*#__PURE__*/React__default["default"].createElement(DeclarationsBeforeText,{declarations:t}),/*#__PURE__*/React__default["default"].createElement("div",{"aria-label":"sequence-".concat(n),className:"sequence-lunatic",id:"sequence-".concat(n)},a),/*#__PURE__*/React__default["default"].createElement(DeclarationsAfterText,{declarations:t}),/*#__PURE__*/React__default["default"].createElement(DeclarationsDetachable,{declarations:t}))}var css_248z$5=".lunatic-component .lunatic-suggester-message-error {\n border: solid 1px darkred;\n color: darkred;\n background-color: tomato;\n display: inline-block;\n border-radius: 3px;\n padding: 4px 8px;\n margin: 4px 4px;\n}\n.lunatic-component .lunatic-suggester-default-style.lunatic-suggester-container {\n margin-bottom: 10px;\n}\n.lunatic-component .lunatic-suggester-default-style.lunatic-suggester-container .lunatic-suggester {\n min-height: 30px;\n min-width: 260px;\n width: 100%;\n}\n.lunatic-component .lunatic-suggester-default-style.lunatic-suggester-container .lunatic-suggester .lunatic-suggester-content {\n /* */\n /* */\n /* */\n}\n.lunatic-component .lunatic-suggester-default-style.lunatic-suggester-container .lunatic-suggester .lunatic-suggester-content .lunatic-suggester-selection {\n border-radius: 5px;\n border: 2px solid var(--color-primary-dark);\n background-color: white;\n}\n.lunatic-component .lunatic-suggester-default-style.lunatic-suggester-container .lunatic-suggester .lunatic-suggester-content .lunatic-suggester-selection:hover {\n border-color: var(--color-primary-main);\n}\n.lunatic-component .lunatic-suggester-default-style.lunatic-suggester-container .lunatic-suggester .lunatic-suggester-content .lunatic-suggester-selection .lunatic-suggester-input {\n height: 34;\n line-height: 34px;\n font-size: 15px;\n padding-left: 4px;\n font-family: \"Roboto\", \"Helvetica\", \"Arial\", sans-serif;\n}\n.lunatic-component .lunatic-suggester-default-style.lunatic-suggester-container .lunatic-suggester .lunatic-suggester-content .lunatic-suggester-selection .lunatic-suggester-input::placeholderlist {\n color: gray;\n font-family: \"Roboto\", \"Helvetica\", \"Arial\", sans-serif;\n font-size: 15px;\n line-height: 34px;\n vertical-align: middle;\n font-weight: normal;\n}\n.lunatic-component .lunatic-suggester-default-style.lunatic-suggester-container .lunatic-suggester .lunatic-suggester-content .lunatic-suggester-selection .lunatic-suggester-selected {\n height: 34px;\n line-height: 34px;\n background-color: white;\n border-radius: 5px;\n padding-left: 4px;\n font-family: \"Roboto\", \"Helvetica\", \"Arial\", sans-serif;\n}\n.lunatic-component .lunatic-suggester-default-style.lunatic-suggester-container .lunatic-suggester .lunatic-suggester-content .lunatic-suggester-selection .lunatic-suggester-selected .placeholderList {\n display: block;\n color: gray;\n font-family: \"Roboto\", \"Helvetica\", \"Arial\", sans-serif;\n font-size: 15px;\n line-height: 34px;\n vertical-align: middle;\n font-weight: normal;\n}\n.lunatic-component .lunatic-suggester-default-style.lunatic-suggester-container .lunatic-suggester .lunatic-suggester-content .lunatic-suggester-selection .lunatic-suggester-selected .selection {\n display: block;\n line-height: 34px;\n font-size: 15px;\n}\n.lunatic-component .lunatic-suggester-default-style.lunatic-suggester-container .lunatic-suggester .lunatic-suggester-content .lunatic-suggester-selection .lunatic-suggester-selected.disabled {\n background-color: var(--color-disabled);\n}\n.lunatic-component .lunatic-suggester-default-style.lunatic-suggester-container .lunatic-suggester .lunatic-suggester-content .lunatic-suggester-panel {\n font-family: \"Roboto\", \"Helvetica\", \"Arial\", sans-serif;\n height: 0;\n opacity: 0;\n background-color: white;\n transition: opacity 267ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, transform 178ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n}\n.lunatic-component .lunatic-suggester-default-style.lunatic-suggester-container .lunatic-suggester .lunatic-suggester-content .lunatic-suggester-panel.expended {\n border: solid 1px var(--color-primary-light);\n opacity: 1;\n min-height: 30px;\n height: max-content;\n box-shadow: 0 2px 2px grey;\n border-radius: 4px;\n}\n.lunatic-component .lunatic-suggester-default-style.lunatic-suggester-container .lunatic-suggester .lunatic-suggester-content .lunatic-suggester-panel .lunatic-suggester-option {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n margin-bottom: 0.1em;\n line-height: 2rem;\n display: block;\n}\n.lunatic-component .lunatic-suggester-default-style.lunatic-suggester-container .lunatic-suggester .lunatic-suggester-content .lunatic-suggester-panel .lunatic-suggester-option.selected {\n color: var(--color-primary-dark);\n background-color: var(--color-dropdown-selected);\n}\n.lunatic-component .lunatic-suggester-default-style.lunatic-suggester-container .lunatic-suggester .lunatic-suggester-content .lunatic-suggester-panel .lunatic-suggester-option:hover {\n background-color: var(--color-primary-main);\n color: white;\n}";styleInject(".lunatic-component .lunatic-suggester-message-error {\n border: solid 1px darkred;\n color: darkred;\n background-color: tomato;\n display: inline-block;\n border-radius: 3px;\n padding: 4px 8px;\n margin: 4px 4px;\n}\n.lunatic-component .lunatic-suggester-default-style.lunatic-suggester-container {\n margin-bottom: 10px;\n}\n.lunatic-component .lunatic-suggester-default-style.lunatic-suggester-container .lunatic-suggester {\n min-height: 30px;\n min-width: 260px;\n width: 100%;\n}\n.lunatic-component .lunatic-suggester-default-style.lunatic-suggester-container .lunatic-suggester .lunatic-suggester-content {\n /* */\n /* */\n /* */\n}\n.lunatic-component .lunatic-suggester-default-style.lunatic-suggester-container .lunatic-suggester .lunatic-suggester-content .lunatic-suggester-selection {\n border-radius: 5px;\n border: 2px solid var(--color-primary-dark);\n background-color: white;\n}\n.lunatic-component .lunatic-suggester-default-style.lunatic-suggester-container .lunatic-suggester .lunatic-suggester-content .lunatic-suggester-selection:hover {\n border-color: var(--color-primary-main);\n}\n.lunatic-component .lunatic-suggester-default-style.lunatic-suggester-container .lunatic-suggester .lunatic-suggester-content .lunatic-suggester-selection .lunatic-suggester-input {\n height: 34;\n line-height: 34px;\n font-size: 15px;\n padding-left: 4px;\n font-family: \"Roboto\", \"Helvetica\", \"Arial\", sans-serif;\n}\n.lunatic-component .lunatic-suggester-default-style.lunatic-suggester-container .lunatic-suggester .lunatic-suggester-content .lunatic-suggester-selection .lunatic-suggester-input::placeholderlist {\n color: gray;\n font-family: \"Roboto\", \"Helvetica\", \"Arial\", sans-serif;\n font-size: 15px;\n line-height: 34px;\n vertical-align: middle;\n font-weight: normal;\n}\n.lunatic-component .lunatic-suggester-default-style.lunatic-suggester-container .lunatic-suggester .lunatic-suggester-content .lunatic-suggester-selection .lunatic-suggester-selected {\n height: 34px;\n line-height: 34px;\n background-color: white;\n border-radius: 5px;\n padding-left: 4px;\n font-family: \"Roboto\", \"Helvetica\", \"Arial\", sans-serif;\n}\n.lunatic-component .lunatic-suggester-default-style.lunatic-suggester-container .lunatic-suggester .lunatic-suggester-content .lunatic-suggester-selection .lunatic-suggester-selected .placeholderList {\n display: block;\n color: gray;\n font-family: \"Roboto\", \"Helvetica\", \"Arial\", sans-serif;\n font-size: 15px;\n line-height: 34px;\n vertical-align: middle;\n font-weight: normal;\n}\n.lunatic-component .lunatic-suggester-default-style.lunatic-suggester-container .lunatic-suggester .lunatic-suggester-content .lunatic-suggester-selection .lunatic-suggester-selected .selection {\n display: block;\n line-height: 34px;\n font-size: 15px;\n}\n.lunatic-component .lunatic-suggester-default-style.lunatic-suggester-container .lunatic-suggester .lunatic-suggester-content .lunatic-suggester-selection .lunatic-suggester-selected.disabled {\n background-color: var(--color-disabled);\n}\n.lunatic-component .lunatic-suggester-default-style.lunatic-suggester-container .lunatic-suggester .lunatic-suggester-content .lunatic-suggester-panel {\n font-family: \"Roboto\", \"Helvetica\", \"Arial\", sans-serif;\n height: 0;\n opacity: 0;\n background-color: white;\n transition: opacity 267ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, transform 178ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n}\n.lunatic-component .lunatic-suggester-default-style.lunatic-suggester-container .lunatic-suggester .lunatic-suggester-content .lunatic-suggester-panel.expended {\n border: solid 1px var(--color-primary-light);\n opacity: 1;\n min-height: 30px;\n height: max-content;\n box-shadow: 0 2px 2px grey;\n border-radius: 4px;\n}\n.lunatic-component .lunatic-suggester-default-style.lunatic-suggester-container .lunatic-suggester .lunatic-suggester-content .lunatic-suggester-panel .lunatic-suggester-option {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n margin-bottom: 0.1em;\n line-height: 2rem;\n display: block;\n}\n.lunatic-component .lunatic-suggester-default-style.lunatic-suggester-container .lunatic-suggester .lunatic-suggester-content .lunatic-suggester-panel .lunatic-suggester-option.selected {\n color: var(--color-primary-dark);\n background-color: var(--color-dropdown-selected);\n}\n.lunatic-component .lunatic-suggester-default-style.lunatic-suggester-container .lunatic-suggester .lunatic-suggester-content .lunatic-suggester-panel .lunatic-suggester-option:hover {\n background-color: var(--color-primary-main);\n color: white;\n}");function getSearch(e,n){return!e.length&&n?n:""}function Suggester(e){var n=e.className,t=e.labelledBy,a=e.placeholder,i=e.onSelect,o=e.labelRenderer,d=e.optionRenderer,r=e.value,s=e.custom,l=e.disabled,u=e.id,c=e.searching,f="lunatic-suggester-".concat(u),p=React.useState(""),m=_slicedToArray(p,2),g=m[0],h=m[1],b=React.useState([]),y=_slicedToArray(b,2),x=y[0],v=y[1],w=React.useCallback(function(e){e?i(e):i(null)},[i]),k=React.useCallback(/*#__PURE__*/function(){var e=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function n(e){var t,a;return _regeneratorRuntime().wrap(function o(n){for(;1;)switch(n.prev=n.next){case 0:if(!(e&&"function"==typeof c)){n.next=10;break}return n.next=3,c(e);case 3:t=n.sent,a=t.results,t.search,v(a),h(e),n.next=13;break;case 10:v([]),i(null),h("");case 13:case"end":return n.stop();}},n)}));return function(n){return e.apply(this,arguments)}}(),[c,i]),E=getSearch(g,r);return/*#__PURE__*/React__default["default"].createElement(ComboBox$1,{id:u,htmlFor:f,className:n,labelledBy:t,onChange:k,disabled:l,options:x,editable:!0,onSelect:w,value:r,search:E,custom:s,optionRenderer:d,labelRenderer:o,placeholder:a})}Suggester.propTypes={id:PropTypes__default["default"].string.isRequired,className:PropTypes__default["default"].string,placeholder:PropTypes__default["default"].string,labelledBy:PropTypes__default["default"].string,optionRenderer:PropTypes__default["default"].elementType,labelRenderer:PropTypes__default["default"].elementType,onSelect:PropTypes__default["default"].func,value:PropTypes__default["default"].oneOfType([PropTypes__default["default"].string,PropTypes__default["default"].number,PropTypes__default["default"].bool,PropTypes__default["default"].object]),searching:PropTypes__default["default"].func},Suggester.defaultProps={className:"lunatic-suggester-default-style",labelledBy:void 0,placeholder:"Veuillez...",optionRenderer:DefaultOptionRenderer,labelRenderer:DefaultLabelRenderer,language:"French",onSelect:function e(){return null},value:void 0,searching:void 0};var Suggester$1=createCustomizableLunaticField(Suggester),WORKER_PATH=process.env.LUNATIC_SEARCH_WORKER_PATH||process.env.REACT_APP_LUNATIC_SEARCH_WORKER_PATH;function isWorkerCompatible(){return!!window.Worker}var searching=function t(n){return function(e,t,a){if(!WORKER_PATH)throw new Error("Worker path is required for suggester's searches.");return isWorkerCompatible()?new Promise(function(i){try{n&&n.terminate(),n=createWorker(WORKER_PATH),n.postMessage({search:e,name:t,version:a}),n.addEventListener("message",function(t){var e=t.data;i(e),n.terminate(),n=void 0})}catch(n){//TODO
|
|
2922
|
+
}}):void 0}};function createSearching(e,n){var t=void 0,a=searching(void 0);return/*#__PURE__*/function(){var t=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function i(t){return _regeneratorRuntime().wrap(function o(i){for(;1;)switch(i.prev=i.next){case 0:return i.abrupt("return",a(t,e,n));case 1:case"end":return i.stop();}},i)}));return function(e){return t.apply(this,arguments)}}()}function CheckStore(e){var n=e.storeName,t=e.version,a=e.setStore,i=e.children,o=React.useState(0),d=_slicedToArray(o,2),r=d[0],s=d[1],l=React.useState(!1),u=_slicedToArray(l,2),c=u[0],f=u[1],p=React.useState(!1),m=_slicedToArray(p,2),g=m[0],h=m[1],b=React.useCallback(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function e(){var i,o;return _regeneratorRuntime().wrap(function d(e){for(;1;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,openDb(n,t);case 3:return i=e.sent,e.next=6,get$1(i,STORE_INFO_NAME,n);case 6:o=e.sent,i&&o&&(s(200),a(o)),e.next=13;break;case 10:e.prev=10,e.t0=e["catch"](0),s(400);case 13:case"end":return e.stop();}},e,null,[[0,10]])})),[n,t,a]);return React.useEffect(function(){b()},[b]),React.useEffect(function(){if(c){var e=/*#__PURE__*/function(){var e=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function e(){return _regeneratorRuntime().wrap(function n(e){for(;1;)switch(e.prev=e.next){case 0:return e.next=2,b();case 2:h(!1);case 3:case"end":return e.stop();}},e)}));return function n(){return e.apply(this,arguments)}}();f(!1),h(!0),e()}},[c,b]),0===r?/*#__PURE__*/React__default["default"].createElement("div",{className:"lunatic-suggester-in-progress"},"Le store ",n," est en cour de chargement."):200===r?i:/*#__PURE__*/React__default["default"].createElement("div",{className:"lunatic-suggester-unvailable"},"Le store ",n," n'est pas disponible.",/*#__PURE__*/React__default["default"].createElement("button",{disabled:g,onClick:function e(){return f(!0)}},"Refresh"))}function IDBSuggester(e){var n=e.storeName,t=e.idbVersion,a=e.id,i=e.className,o=e.labelledBy,d=e.optionRenderer,r=e.labelRenderer,s=e.onSelect,l=e.disabled,u=e.value,c=e.custom,f=React.useState(void 0),p=_slicedToArray(f,2),m=p[0],g=p[1],h=React.useMemo(function(){return m?createSearching(n,t):void 0},[n,t,m]);return/*#__PURE__*/React__default["default"].createElement(CheckStore,{storeName:n,idbVersion:t,setStore:g},/*#__PURE__*/React__default["default"].createElement(Suggester$1,{id:a,className:i,labelledBy:o,optionRenderer:d,labelRenderer:r,onSelect:s,searching:h,disabled:l,value:u,custom:c}))}IDBSuggester.defaultProps={idbVersion:"1"},IDBSuggester.propTypes={storeName:PropTypes__default["default"].string.isRequired,idbVersion:PropTypes__default["default"].string,id:PropTypes__default["default"].string,className:PropTypes__default["default"].string,labelledBy:PropTypes__default["default"].string,optionRenderer:PropTypes__default["default"].func,labelRenderer:PropTypes__default["default"].func,onSelect:PropTypes__default["default"].func};// Declaration position
|
|
2923
|
+
var BEFORE_QUESTION_TEXT="BEFORE_QUESTION_TEXT",AFTER_QUESTION_TEXT="AFTER_QUESTION_TEXT",DETACHABLE="DETACHABLE",INSTRUCTION="INSTRUCTION",COMMENT="COMMENT",HELP="HELP",WARNING="WARNING",MESSAGE_FILTER="MESSAGE_FILTER",STATEMENT="STATEMENT",declarations=PropTypes__default["default"].arrayOf(PropTypes__default["default"].shape({id:PropTypes__default["default"].string.isRequired,declarationType:PropTypes__default["default"].oneOf([INSTRUCTION,COMMENT,HELP,WARNING,MESSAGE_FILTER,STATEMENT]),position:PropTypes__default["default"].oneOf(["BEFORE_QUESTION_TEXT",AFTER_QUESTION_TEXT,DETACHABLE]),label:PropTypes__default["default"].string.isRequired})).isRequired;PropTypes__default["default"].arrayOf(PropTypes__default["default"].shape({label:PropTypes__default["default"].string.isRequired,value:PropTypes__default["default"].string.isRequired}));var response=PropTypes__default["default"].shape({name:PropTypes__default["default"].string,values:PropTypes__default["default"].shape({})}),valueType=PropTypes__default["default"].oneOf([COLLECTED,PREVIOUS,FORCED,EDITED,INPUTED]);PropTypes__default["default"].shape({min:PropTypes__default["default"].oneOfType([PropTypes__default["default"].string,PropTypes__default["default"].number]),max:PropTypes__default["default"].oneOfType([PropTypes__default["default"].string,PropTypes__default["default"].number])});function LunaticSuggester(e){var n=e.id,t=e.storeName,a=e.optionRenderer,i=e.labelRenderer,o=e.idbVersion,d=e.focused,r=e.value,s=e.onChange,l=e.disabled,u=e.labelId,c=e.custom;return/*#__PURE__*/React__default["default"].createElement(IDBSuggester,{storeName:t,optionRenderer:a,labelRenderer:i,labelledBy:u,idbVersion:o,onSelect:s,focused:d,disabled:l,id:n,value:r,custom:c})}LunaticSuggester.defaultProps={label:"",preferences:[COLLECTED],response:{},disabled:!1,focused:!1,declarations:[],features:[],bindings:{},management:!1,labelPosition:"DEFAULT",style:{},getStoreInfo:void 0},LunaticSuggester.propTypes={id:PropTypes__default["default"].string.isRequired,label:PropTypes__default["default"].string,preferences:PropTypes__default["default"].arrayOf(valueType),response:response,handleChange:PropTypes__default["default"].func.isRequired,disabled:PropTypes__default["default"].bool,focused:PropTypes__default["default"].bool,declarations:declarations,features:PropTypes__default["default"].arrayOf(PropTypes__default["default"].string),bindings:PropTypes__default["default"].object,management:PropTypes__default["default"].bool,labelPosition:PropTypes__default["default"].oneOf(["DEFAULT","TOP","BOTTOM","LEFT","RIGHT"]),style:PropTypes__default["default"].object,storeInfo:PropTypes__default["default"].object,//TODO
|
|
2924
|
+
getStoreInfo:PropTypes__default["default"].func};var lunaticSuggester=createLunaticComponent(LunaticSuggester),css_248z$4=".lunatic-switch {\n display: flex;\n flex-direction: row;\n}\n.lunatic-switch .lunatic-switch-label {\n height: 100%;\n line-height: 26px;\n}\n.lunatic-switch .lunatic-switch-label.checked {\n font-weight: bold;\n}\n.lunatic-switch .lunatic-switch-container {\n display: inline-block;\n height: 26px;\n width: 52px;\n background-color: lightgrey;\n border-radius: 13px;\n position: relative;\n margin: 2px;\n cursor: pointer;\n}\n.lunatic-switch .lunatic-switch-container .lunatic-switch-button {\n position: absolute;\n height: 22px;\n width: 22px;\n background-color: white;\n border-radius: 11px;\n margin: 2px;\n -webkit-transition: 0.3s;\n transition: 0.3s;\n}\n.lunatic-switch .lunatic-switch-container.checked {\n background-color: royalblue;\n}\n.lunatic-switch .lunatic-switch-container.checked .lunatic-switch-button {\n -webkit-transform: translateX(26px);\n -ms-transform: translateX(26px);\n transform: translateX(26px);\n}";styleInject(css_248z$4);function Switch(e){var n=e.checked,t=e.disabled,a=e.onClick,i=e.statusLabel,o=e.labelId,d=e.id,r=React.useCallback(function(){a(!n)},[n,a]),s=React.useCallback(function(n){var e=n.code;"Space"===e&&a()},[a]),l=i["true"],u=i["false"];return/*#__PURE__*/React__default["default"].createElement("div",{className:"lunatic-switch",id:d},/*#__PURE__*/React__default["default"].createElement("div",{className:classnames("lunatic-switch-label",{checked:!n})},u),/*#__PURE__*/React__default["default"].createElement("div",{role:"switch","aria-checked":n,tabIndex:"0",className:classnames("lunatic-switch-container",{disabled:t,checked:n}),onClick:r,onKeyDown:s,labelledBy:o},/*#__PURE__*/React__default["default"].createElement("div",{className:"lunatic-switch-button"})),/*#__PURE__*/React__default["default"].createElement("div",{className:classnames("lunatic-switch-label",{checked:n})},l))}Switch.propTypes={checked:PropTypes__default["default"].bool.isRequired,disabled:PropTypes__default["default"].bool,handleChange:PropTypes__default["default"].func.isRequired,statusLabel:PropTypes__default["default"].shape({true:PropTypes__default["default"].string,false:PropTypes__default["default"].string}),labelId:PropTypes__default["default"].string.isRequired},Switch.defaultProps={disabled:!1,statusLabel:{true:"True",false:"False"}};var Switch$1=createCustomizableLunaticField(Switch);function LunaticSwitch(e){var n=e.id,t=e.value,a=e.statusLabel,i=e.onChange,o=e.custom,d=e.labelId,r=t||!1,s=React.useCallback(function(e){i(e)},[i]);return/*#__PURE__*/React__default["default"].createElement(Switch$1,{id:n,checked:r,onClick:s,statusLabel:a,labelId:d,custom:o})}LunaticSwitch.propTypes={value:PropTypes__default["default"].oneOf([null,!0,!1])},LunaticSwitch.defaultProps={statusLabel:{true:"True",false:"False"}};var lunaticSwitch=createLunaticComponent(LunaticSwitch,{inputId:"lunatic-switch"}),css_248z$3=".lunatic-component .textarea-lunatic {\n height: 3em;\n width: 100%;\n}";styleInject(css_248z$3);function checkValue(e){return e||""}function Textarea(e){var n=e.id,t=e.rows,a=e.maxLength,i=e.cols,o=e.onChange,d=e.value,r=e.className,s=e.placeholder,l=React.useCallback(function(n){o(n.target.value)},[o]);return/*#__PURE__*/React__default["default"].createElement("textarea",{id:n,className:classnames("lunatic-textarea",r),rows:t,maxLength:a,cols:i,onChange:l,value:checkValue(d),placeholder:s})}var Textarea$1=createCustomizableLunaticField(Textarea),LunaticTextarea=createLunaticComponent(Textarea$1,{inputId:"lunatic-textarea"});Textarea$1.defaultProps={rows:1,maxLength:100,cols:32,placeholder:"Please enter your text here"},Textarea$1.propTypes={rows:PropTypes__default["default"].number,maxLength:PropTypes__default["default"].number,cols:PropTypes__default["default"].number,placeholder:PropTypes__default["default"].string};function Progress(e){var n=Math.round,t=e.display,a=e.percent,i=void 0===a?0:a,o=e.handleClick,d=void 0===o?function(){return null}:o;return t?/*#__PURE__*/React__default["default"].createElement("div",{className:classnames("lunatic-suggester-loader-progress",{done:100===i}),onClick:function e(){return d(i)}},/*#__PURE__*/React__default["default"].createElement("div",{className:"content"},/*#__PURE__*/React__default["default"].createElement("div",{className:"progress",style:{width:"".concat(n(i),"%")}}))):null}function empty$1(){}function Loader(e){function n(e){var n=e.message,t=n.type,a=n.percent;"bulk-insert/complete"===t&&f(a)}var t=e.start,a=e.db,i=e.store,o=e.idbVersion,d=e.fetch,r=e.post,s=e.handleClick,l=React.useState(0),u=_slicedToArray(l,2),c=u[0],f=u[1],p=React.useState(void 0),m=_slicedToArray(p,2),g=m[0],h=m[1];return React.useEffect(function(){function e(){return n.apply(this,arguments)}function n(){return n=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function n(){var a;return _regeneratorRuntime().wrap(function n(e){for(;1;)switch(e.prev=e.next){case 0:if(!("function"==typeof d&&t)){e.next=5;break}return e.next=3,d();case 3:a=e.sent,h(a);case 5:case"end":return e.stop();}},n)})),n.apply(this,arguments)}e()},[d,t]),React.useEffect(function(){function e(){return t.apply(this,arguments)}function t(){return t=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function e(){var t,s,l,u;return _regeneratorRuntime().wrap(function c(e){for(;1;)switch(e.prev=e.next){case 0:if(e.prev=0,!(g&&a&&o&&i)){e.next=8;break}return t=task$1(i,o,n),s=_slicedToArray(t,2),l=s[0],u=s[1],d=u,clear$1(a),e.next=7,l(g);case 7:r(i.name,g.length);case 8:e.next=13;break;case 10:e.prev=10,e.t0=e["catch"](0),console.warn(e.t0);case 13:case"end":return e.stop();}},e,null,[[0,10]])})),t.apply(this,arguments)}var d;return e(),function(){d&&d()}},[i,a,g,o,r]),/*#__PURE__*/React__default["default"].createElement(Progress,{percent:c,display:!0,handleClick:s})}Loader.defaultProps={idbVersion:"1",post:empty$1,handleClick:empty$1};function LoaderRow(e){var n=e.storeInfo,t=e.idbVersion,a=e.fetchStore,i=e.onRefresh,o=e.disabled,d=void 0!==o&&o,r=n.name,s=useStoreIndex(n,t),l=React.useState(void 0),u=_slicedToArray(l,2),c=u[0],f=u[1],p=React.useState(!1),m=_slicedToArray(p,2),g=m[0],h=m[1],b=React.useCallback(function(e,n){f(n),i("Store ".concat(r," loaded."))},[i,r]),y=React.useCallback(function(){s&&(clear$1(s),f(0))},[s]);React.useEffect(function(){function e(){return n.apply(this,arguments)}function n(){return n=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function e(){var n;return _regeneratorRuntime().wrap(function t(e){for(;1;)switch(e.prev=e.next){case 0:return e.next=2,get(s);case 2:n=e.sent,f(n);case 4:case"end":return e.stop();}},e)})),n.apply(this,arguments)}s&&e()},[s]);var x=React.useCallback(function(e){100===e&&h(!1)},[]);return/*#__PURE__*/React__default["default"].createElement("div",{className:"widget-row"},/*#__PURE__*/React__default["default"].createElement("div",{className:"store-name"},r),g?/*#__PURE__*/React__default["default"].createElement(Loader,{start:!0,db:s,store:n,idVersion:t,fetch:a,post:b,handleClick:x}):/*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment,null,/*#__PURE__*/React__default["default"].createElement("div",{className:"stats"},0<c?"".concat(c," entities."):"Empty store."),/*#__PURE__*/React__default["default"].createElement("button",{className:classnames("widget-button",{disabled:d}),disabled:d,onClick:function e(){return h(!0)},title:"Load"},/*#__PURE__*/React__default["default"].createElement(ClosedIcon,{className:"lunatic-suggester-icon"})),/*#__PURE__*/React__default["default"].createElement("button",{className:classnames("widget-button",{disabled:d}),disabled:d,onClick:y,title:"Clear"},/*#__PURE__*/React__default["default"].createElement(CrossIcon$2,{className:"lunatic-suggester-icon"}))))}function ActionTool(e){var n=e.children,t=e.ariaLabel,a=e.className,i=e.title,o=e.display,d=!(void 0!==o)||o;return d?/*#__PURE__*/React__default["default"].createElement("div",{"aria-label":t,role:"button",className:classnames("lunatic-action-tool",a),title:i},n):null}function Tools(e){var n=e.children;return/*#__PURE__*/React__default["default"].createElement("div",{className:"lunatic-widget-tools"},n)}function useOnlineStatus(n,t){React.useEffect(function(){window.navigator.onLine&&"function"==typeof n?n():"function"==typeof t&&t()},[n,t]),React.useEffect(function(){var e;return"function"==typeof n&&(e=function e(t){n()},window.addEventListener("online",e)),function(){e&&window.removeEventListener("online",e)}},[n]),React.useEffect(function(){var e;return"function"==typeof t&&(e=function e(n){t()},window.addEventListener("offline",e)),function(){e&&window.removeEventListener("offline",e)}},[t])}function getTitle(e){return"Network ".concat(e?"on":"off")}function IsNetwork(e){var n=e.notify,t=void 0===n?function(){return null}:n,a=e.className,i=React.useState(window.navigator.onLine),o=_slicedToArray(i,2),d=o[0],r=o[1],s=React.useCallback(function(){r(!0),t(!0)},[t]),l=React.useCallback(function(){r(!1),t(!1)},[t]);return useOnlineStatus(s,l),/*#__PURE__*/React__default["default"].createElement("div",{className:classnames("is-network",a,{online:d}),title:getTitle(d)},/*#__PURE__*/React__default["default"].createElement(CrossIcon$1,null))}function WidgetContainer(e,n){var t=e.children,a=e.drag,i=e.absolute;return i?/*#__PURE__*/reactDom.createPortal(/*#__PURE__*/React__default["default"].createElement("div",{className:classnames("lunatic-suggester-widget-container",{absolute:i}),ref:n},/*#__PURE__*/React__default["default"].createElement("div",{className:classnames("lunatic-suggester-widget",{drag:a})},t)),document.body):/*#__PURE__*/React__default["default"].createElement("div",{className:classnames("lunatic-suggester-widget-container",{absolute:i}),ref:n},/*#__PURE__*/React__default["default"].createElement("div",{className:classnames("lunatic-suggester-widget",{drag:a})},t))}var WidgetContainer$1=/*#__PURE__*/React__default["default"].forwardRef(WidgetContainer),css_248z$2=".lunatic-dragger {\n display: inline-block;\n width: 100%;\n height: 100%;\n -moz-user-select: -moz-none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n}";styleInject(css_248z$2);function Dragger(e){function n(n){var e=n.clientX,t=n.clientY;l(!0),b([e,t]),o(!0,[e,t])}function t(){l(!1),o(!1)}var a=e.el,i=e.children,o=e.onDrag,d=React.useState(!1),r=_slicedToArray(d,2),s=r[0],l=r[1],u=React.useState([void 0,void 0]),c=_slicedToArray(u,2),f=c[0],p=c[1],m=React.useState([void 0,void 0]),g=_slicedToArray(m,2),h=g[0],b=g[1],y=React.useCallback(function(n){var e=n.clientX,t=n.clientY;if(s){var a=_slicedToArray(h,2),i=a[0],d=a[1],r=e-i,l=t-d;b([e,t]),p([r,l]),o(!0,[r,l])}},[s,h,o]);return React.useEffect(function(){var e=_slicedToArray(f,2),n=e[0],t=e[1];if(a&&void 0!==n&&void 0!==t){var i=a.getBoundingClientRect(),o=i.top,d=i.left;a.style.top="".concat(o+t,"px"),a.style.left="".concat(d+n,"px")}},[a,f]),useDocumentAddEventListener("mousemove",y),useDocumentAddEventListener("mouseup",t),/*#__PURE__*/React__default["default"].createElement("div",{className:"lunatic-dragger",onMouseDown:n},i)}Dragger.propTypes={el:PropTypes__default["default"].object,onDrag:PropTypes__default["default"].func},Dragger.defaultProps={el:void 0,onDrag:function e(){return null}};var css_248z$1=".lunatic-suggester-widget-container.absolute {\n position: fixed;\n z-index: 1;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget {\n position: relative;\n border: solid darkred 2px;\n background-color: #e9d0d0;\n padding: 4px 4px;\n border: 2px 2px;\n width: 400px;\n box-shadow: #320000 0px 3px 8px;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget.drag {\n box-shadow: goldenrod 0px 3px 8px;\n transition: box-shadow 0.5s;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .widget-row {\n height: 22px;\n display: flex;\n flex-direction: row;\n margin-bottom: 1px;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .widget-row .store-name {\n width: 60%;\n color: darkred;\n font-size: 18px;\n white-space: nowrap;\n overflow-x: hidden;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .widget-row .stats {\n color: darkred;\n font-size: 18px;\n white-space: nowrap;\n overflow-x: hidden;\n width: 40%;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .widget-row .widget-button {\n margin: 0 1px 0 0;\n padding: 0;\n border: none;\n width: 18px;\n height: 18px;\n background-color: darkred;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .widget-row .widget-button.disabled {\n background-color: gray;\n cursor: default;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .widget-row .widget-button:hover {\n background-color: #320000;\n transition: background-color 1s;\n cursor: pointer;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .widget-row .widget-button .lunatic-suggester-icon svg {\n width: 18px;\n height: 18px;\n fill: #e9d0d0;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .widget-row .lunatic-suggester-loader-progress {\n height: inherit;\n border: solid 1px darkred;\n border-radius: 2px;\n width: 70%;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .widget-row .lunatic-suggester-loader-progress.done:hover {\n border-color: #320000;\n transition: border-color 1s;\n cursor: pointer;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .widget-row .lunatic-suggester-loader-progress.done:hover .progress {\n background-color: #320000;\n transition: background-color 1s;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .widget-row .lunatic-suggester-loader-progress .content {\n padding: 2px 2px;\n height: 100%;\n width: 100%;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .widget-row .lunatic-suggester-loader-progress .content .progress {\n background-color: darkred;\n height: 100%;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .suggester-widget-network {\n position: absolute;\n border: solid darkred 2px;\n left: 6px;\n background-color: #e9d0d0;\n border-radius: 50%;\n padding: 2px 2px;\n left: -22px;\n top: -22px;\n box-shadow: #320000 0px 3px 8px;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .suggester-widget-network.online svg {\n fill: forestgreen;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .suggester-widget-network svg {\n width: 24px;\n height: 24px;\n fill: darkred;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .suggester-widget-network.drag {\n box-shadow: goldenrod 0px 3px 8px;\n transition: box-shadow 0.5s;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .lunatic-widget-tools {\n position: absolute;\n right: 0;\n top: -18px;\n margin-top: -4px;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .lunatic-widget-tools .lunatic-action-tool {\n display: inline-block;\n height: 18px;\n width: 18px;\n background-color: darkred;\n border-radius: 50%;\n margin-left: 2px;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .lunatic-widget-tools .lunatic-action-tool:hover {\n box-shadow: #320000 0px 3px 8px;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .lunatic-widget-tools .lunatic-action-tool.drag {\n background-color: goldenrod;\n transition: background-color 0.5s;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .lunatic-widget-tools .lunatic-action-tool .on-drag-icon {\n cursor: grab;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .lunatic-widget-tools .lunatic-action-tool .on-drag-icon.drag {\n cursor: grabbing;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .lunatic-widget-tools .lunatic-action-tool .on-drag-icon svg {\n width: 16px;\n height: 16px;\n fill: #e9d0d0;\n}";styleInject(".lunatic-suggester-widget-container.absolute {\n position: fixed;\n z-index: 1;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget {\n position: relative;\n border: solid darkred 2px;\n background-color: #e9d0d0;\n padding: 4px 4px;\n border: 2px 2px;\n width: 400px;\n box-shadow: #320000 0px 3px 8px;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget.drag {\n box-shadow: goldenrod 0px 3px 8px;\n transition: box-shadow 0.5s;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .widget-row {\n height: 22px;\n display: flex;\n flex-direction: row;\n margin-bottom: 1px;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .widget-row .store-name {\n width: 60%;\n color: darkred;\n font-size: 18px;\n white-space: nowrap;\n overflow-x: hidden;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .widget-row .stats {\n color: darkred;\n font-size: 18px;\n white-space: nowrap;\n overflow-x: hidden;\n width: 40%;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .widget-row .widget-button {\n margin: 0 1px 0 0;\n padding: 0;\n border: none;\n width: 18px;\n height: 18px;\n background-color: darkred;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .widget-row .widget-button.disabled {\n background-color: gray;\n cursor: default;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .widget-row .widget-button:hover {\n background-color: #320000;\n transition: background-color 1s;\n cursor: pointer;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .widget-row .widget-button .lunatic-suggester-icon svg {\n width: 18px;\n height: 18px;\n fill: #e9d0d0;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .widget-row .lunatic-suggester-loader-progress {\n height: inherit;\n border: solid 1px darkred;\n border-radius: 2px;\n width: 70%;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .widget-row .lunatic-suggester-loader-progress.done:hover {\n border-color: #320000;\n transition: border-color 1s;\n cursor: pointer;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .widget-row .lunatic-suggester-loader-progress.done:hover .progress {\n background-color: #320000;\n transition: background-color 1s;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .widget-row .lunatic-suggester-loader-progress .content {\n padding: 2px 2px;\n height: 100%;\n width: 100%;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .widget-row .lunatic-suggester-loader-progress .content .progress {\n background-color: darkred;\n height: 100%;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .suggester-widget-network {\n position: absolute;\n border: solid darkred 2px;\n left: 6px;\n background-color: #e9d0d0;\n border-radius: 50%;\n padding: 2px 2px;\n left: -22px;\n top: -22px;\n box-shadow: #320000 0px 3px 8px;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .suggester-widget-network.online svg {\n fill: forestgreen;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .suggester-widget-network svg {\n width: 24px;\n height: 24px;\n fill: darkred;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .suggester-widget-network.drag {\n box-shadow: goldenrod 0px 3px 8px;\n transition: box-shadow 0.5s;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .lunatic-widget-tools {\n position: absolute;\n right: 0;\n top: -18px;\n margin-top: -4px;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .lunatic-widget-tools .lunatic-action-tool {\n display: inline-block;\n height: 18px;\n width: 18px;\n background-color: darkred;\n border-radius: 50%;\n margin-left: 2px;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .lunatic-widget-tools .lunatic-action-tool:hover {\n box-shadow: #320000 0px 3px 8px;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .lunatic-widget-tools .lunatic-action-tool.drag {\n background-color: goldenrod;\n transition: background-color 0.5s;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .lunatic-widget-tools .lunatic-action-tool .on-drag-icon {\n cursor: grab;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .lunatic-widget-tools .lunatic-action-tool .on-drag-icon.drag {\n cursor: grabbing;\n}\n.lunatic-suggester-widget-container .lunatic-suggester-widget .lunatic-widget-tools .lunatic-action-tool .on-drag-icon svg {\n width: 16px;\n height: 16px;\n fill: #e9d0d0;\n}");function empty(){}function SuggesterLoaderWidget(e){var n=e.source,t=e.getStoreInfo,a=e.onRefresh,i=e.absolute,o=n.suggesters,d=React.useRef(),r=d.current,s=React.useState(void 0),l=_slicedToArray(s,2),u=l[0],c=l[1],f=React.useState([]),p=_slicedToArray(f,2),m=p[0],g=p[1],h=React.useState(!1),b=_slicedToArray(h,2),y=b[0],x=b[1],v=React.useState(!1),w=_slicedToArray(v,2),k=w[0],E=w[1];React.useEffect(function(){if(o){var e=o.reduce(function(e,n){var a=n.name;return _objectSpread2(_objectSpread2({},e),{},_defineProperty({},a,_objectSpread2({storeInfo:n},t(a))))},{});c(e)}},[o,t]);var S=React.useCallback(function(e){x(!e)},[]),C=React.useCallback(function(e){!k&&e?E(!0):k&&!e&&E(!1)},[k]);return React.useEffect(function(){u&&g(Object.entries(u).map(function(e){var n=_slicedToArray(e,2),t=n[0],i=n[1],o=i.storeInfo,d=i.idbVersion,r=i.fetch;return/*#__PURE__*/React__default["default"].createElement(LoaderRow,{key:t,storeInfo:o,idbVersion:d,fetchStore:r,onRefresh:a,disabled:y})}))},[u,y,a]),React.useEffect(function(){r&&i&&(r.style.top="30px",r.style.left="30px")},[r,i]),/*#__PURE__*/React__default["default"].createElement(WidgetContainer$1,{ref:d,drag:k,absolute:i},/*#__PURE__*/React__default["default"].createElement(Tools,null,/*#__PURE__*/React__default["default"].createElement(ActionTool,{className:classnames("",{drag:k}),ariaLabel:"drag",display:i,title:"drag"},/*#__PURE__*/React__default["default"].createElement(Dragger,{el:r,onDrag:C},/*#__PURE__*/React__default["default"].createElement(CrossIcon,{className:classnames("on-drag-icon",{drag:k})})))),/*#__PURE__*/React__default["default"].createElement(IsNetwork,{className:classnames("suggester-widget-network",{drag:k}),notify:S}),m)}SuggesterLoaderWidget.propTypes={absolute:PropTypes__default["default"].bool,source:PropTypes__default["default"].object.isRequired,getStoreInfo:PropTypes__default["default"].func.isRequired,onRefresh:PropTypes__default["default"].func},SuggesterLoaderWidget.defaultProps={onRefresh:empty,absolute:!1};function Header(e){var n=e.custom,t=e.id,a=e.header;if(Array.isArray(a)){var i=a.map(function(e,a){var i=e.label,o=e.rowspan,d=e.colspan;return/*#__PURE__*/React__default["default"].createElement(HtmlTh,{id:t,custom:n,row:0,index:a,rowSpan:o,colSpan:d,key:a},i)});return/*#__PURE__*/React__default["default"].createElement(HtmlThead,{id:t,custom:n},/*#__PURE__*/React__default["default"].createElement(HtmlTr,{id:t,custom:n,row:0},i))}return null}var css_248z=".lunatic-component .lunatic-table {\n table-layout: fixed;\n border-collapse: collapse;\n margin-top: 0.3em;\n margin-bottom: 0.3em;\n}\n.lunatic-component .lunatic-table td,\n.lunatic-component .lunatic-table th {\n border: 0.15em solid var(--color-primary-dark);\n padding: 0.2em;\n}\n.lunatic-component .lunatic-table td .field,\n.lunatic-component .lunatic-table td .field-with-tooltip {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.lunatic-component .table-lunatic .tooltip-lunatic img {\n height: 20px;\n width: 20px;\n}";styleInject(".lunatic-component .lunatic-table {\n table-layout: fixed;\n border-collapse: collapse;\n margin-top: 0.3em;\n margin-bottom: 0.3em;\n}\n.lunatic-component .lunatic-table td,\n.lunatic-component .lunatic-table th {\n border: 0.15em solid var(--color-primary-dark);\n padding: 0.2em;\n}\n.lunatic-component .lunatic-table td .field,\n.lunatic-component .lunatic-table td .field-with-tooltip {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.lunatic-component .table-lunatic .tooltip-lunatic img {\n height: 20px;\n width: 20px;\n}");function Table(e){var n=e.custom,t=e.id,a=e.header,i=e.children;return/*#__PURE__*/React__default["default"].createElement(HtmlTable,{id:t,custom:n,className:"lunatic-table"},/*#__PURE__*/React__default["default"].createElement(Header,{id:t,header:a,custom:n}),/*#__PURE__*/React__default["default"].createElement(HtmlTbody,{id:t,custom:n},i))}function collecteResponseValue(e,n){if("object"===_typeof(e)){var t=e.name;if(t in n)return n[t]}}function collecteArrayResponseValue(e,n){var t=_toArray(e),a=t[0],i=t.slice(1);return a?[collecteResponseValue(a,n),collecteArrayResponseValue(i,n)]:[]}function collecteValue(e,n){var t=e.response,a=e.responses;return Array.isArray(a)?collecteArrayResponseValue(a,n):"object"===_typeof(t)?collecteResponseValue(t,n):{}}function Cell(e){var n=e.content,t=e.id,a=e.custom,i=e.executeExpression,o=e.iteration,d=e.value,r=e.row,s=e.index,l=e.handleChange,u=n.label,c=n.componentType,f=n.rowspan,p=n.colspan;if(c){var m=collecteValue(n,d);return/*#__PURE__*/React__default["default"].createElement(HtmlTd,{id:t,row:r,index:s,rowSpan:f,colSpan:p},/*#__PURE__*/React__default["default"].createElement(OrchestratedComponent,{id:t,component:n,handleChange:l,value:m,custom:a,executeExpression:i,iteration:o}))}return/*#__PURE__*/React__default["default"].createElement(HtmlTd,{id:t,row:r,index:s,rowSpan:f,colSpan:p},u||"")}function Row(e){var n=e.id,t=e.custom,a=e.components,i=e.executeExpression,o=e.valueMap,d=e.rowIndex,r=e.iteration,s=e.handleChange,l=a.map(function(e,a){return/*#__PURE__*/React__default["default"].createElement(Cell,{id:n,content:e,custom:t,value:o,executeExpression:i,handleChange:s,iteration:r,row:d,index:a,key:a})});return/*#__PURE__*/React__default["default"].createElement(HtmlTr,{id:n,custom:t,row:d},l)}function TableOrchestrator(e){var n=e.body,t=e.custom,a=e.id,i=e.executeExpression,o=e.valueMap,d=e.handleChange,r=e.iteration,s=e.features,l=e.shortcut,u=e.preferences,c=e.management,f=e.missing;return Array.isArray(n)?n.map(function(e,n){return/*#__PURE__*/React__default["default"].createElement(Row,{key:n,rowIndex:n,components:e,id:a,valueMap:o,handleChange:d,iteration:r,executeExpression:i,custom:t/** */,features:s,shortcut:l,preferences:u,management:c,missing:f})}):null}function LunaticTable(e){var n=e.id,t=e.handleChange,a=e.value,i=e.custom,o=e.body,d=e.header,r=e.executeExpression,s=e.iteration,l=React.useState(void 0),u=_slicedToArray(l,2),c=u[0],f=u[1];return React.useEffect(function(){if(Array.isArray(o)){var e=o.length;f(e)}},[o]),/*#__PURE__*/React__default["default"].createElement(Table,{id:n,custom:i,header:d},/*#__PURE__*/React__default["default"].createElement(TableOrchestrator,{custom:i,id:n,body:o,executeExpression:r,handleChange:t,iteration:s,nbRows:c,valueMap:a}))}LunaticTable.propTypes={id:PropTypes__default["default"].string.isRequired,custom:PropTypes__default["default"].object,value:PropTypes__default["default"].object,body:PropTypes__default["default"].arrayOf(PropTypes__default["default"].array).isRequired,header:PropTypes__default["default"].array},LunaticTable.defaultProps={lines:void 0,custom:void 0,value:{},header:[]};var lunaticTable=createLunaticComponent(LunaticTable),INITIAL_STATE={variables:{},// map des variables du questionnaires
|
|
2925
|
+
pages:{},isInLoop:!1,isFirstPage:!1,isLastPage:!1,features:[VTL],preferences:[COLLECTED],savingType:COLLECTED,cleaning:{},missingBlock:{},resizing:{},pager:{page:void 0,maxPage:void 0,subPage:void 0,nbSubPages:void 0,iteration:void 0,nbIterations:void 0},waiting:!1,errors:void 0,/* fonctionnalités vtl & md */updateBindings:function e(){},executeExpression:function e(){},handleChange:function e(){},modalForControls:!1},GO_NEXT_PAGE="use-lunatic/go-next",goNextPage=function n(e){var t=e.block;return{type:GO_NEXT_PAGE,payload:{block:t}}},GO_PREVIOUS_PAGE="use-lunatic/go-previous",goPreviousPage$1=function e(){return{type:GO_PREVIOUS_PAGE}},ON_INIT="use-lunatic/on-init",onInit=function n(e){var t=e.data,a=e.source,i=e.initialPage,o=e.features,d=e.preferences,r=e.savingType,s=e.management,l=e.handleChange,u=e.modalForControls;return{type:ON_INIT,payload:{data:t,source:a,initialPage:i,features:o,preferences:d,savingType:r,management:s,handleChange:l,modalForControls:u}}},HANDLE_CHANGE="use-lunatic/handle-change",handleChange=function a(e,n,t){return{type:HANDLE_CHANGE,payload:{response:e,value:n,args:t}}},ON_SET_WAITING="use-lunatic/on-set-waiting",onSetWaiting=function n(e){return{type:ON_SET_WAITING,payload:{status:e}}};/* à bouger d'ici */function getInitalValueFromCollected(e){var n=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},t=e.values,a=e.name,i;if(a in n){var o=n[a],d=o.COLLECTED,r=o.FORCED;i=d||r}if(t){var s=t.COLLECTED,l=t.FORCED;return i||l||s}}function getInitialValueFromExternal(e){var n=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},t=e.name;return t in n?n[t]:void 0}function getInitialValue(e){var n=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},t=n.COLLECTED,a=n.EXTERNAL,i=n.CALCULATED,o=e.variableType;return"COLLECTED"===o?getInitalValueFromCollected(e,t):"EXTERNAL"===o?getInitialValueFromExternal(e,a):"CALCULATED"===o?getInitialValueFromExternal(e,i):null}function appendToArrayMap(e,n,t){return n in e?_objectSpread2(_objectSpread2({},e),{},_defineProperty({},n,[].concat(_toConsumableArray(e[n]),[t]))):_objectSpread2(_objectSpread2({},e),{},_defineProperty({},n,[t]))}function appendToObjectMap(e,n,t){return n in e?_objectSpread2(_objectSpread2({},e),{},_defineProperty({},n,_objectSpread2(_objectSpread2({},e[n]),t))):_objectSpread2(_objectSpread2({},e),{},_defineProperty({},n,t))}/**
|
|
2926
|
+
*
|
|
2927
|
+
* @param {*} source
|
|
2928
|
+
* @param {*} data
|
|
2929
|
+
* @returns
|
|
2930
|
+
*/function createVariables(e,n){var t=e.variables,a=void 0===t?[]:t,i=a.reduce(function(e,t){var a=_slicedToArray(e,2),i=a[0],o=a[1],d=t.variableType,r=t.name;return[appendToArrayMap(i,d,t),appendToObjectMap(o,r,{variable:t,type:d,value:getInitialValue(t,n)})]},[{},{}]),o=_slicedToArray(i,2),d=o[0],r=o[1],s=d.CALCULATED,l=void 0===s?[]:s;return l.forEach(function(e){var n=e.bindingDependencies,t=void 0===n?[]:n;t.forEach(function(n){if(n in r){var t=r[n],a=t.CalculatedLinked;a?a.push(e):t.CalculatedLinked=[e]}})}),r}/* */function checkInLoop(e){var n=e.pager,t=e.pages,a=e.executeExpression,i=n.page;if(i in t){var o=t[i],d=o.isLoop,r=o.subPages,s=o.iterations,l=o.loopDependencies;if(d)return _objectSpread2(_objectSpread2({},e),{},{pager:_objectSpread2(_objectSpread2({},n),{},{subPage:0,nbSubPages:r.length,iteration:0,nbIterations:a(s,{iteration:0,bindingDependencies:l})})})}return e}function reduceOnInit(e,n){var t=n.payload,a=t.source,i=t.data,o=t.initialPage,d=t.features,r=t.handleChange,s=t.preferences,l=t.savingType,u=t.management,c=t.modalForControls;if(a&&i){var f=createVariables(a,i),p=createExecuteExpression(f,d),m=_slicedToArray(p,2),g=m[0],h=m[1],b=checkLoops(createPages(a)),y=a.maxPage,x=a.cleaning,v=void 0===x?{}:x,w=a.missingBlock,k=void 0===w?{}:w,E=a.resizing,S=void 0===E?{}:E,C={page:o,maxPage:Number.parseInt(y)||1,subPage:void 0,nbSubPages:void 0,iteration:void 0,nbIterations:void 0},_=isFirstLastPage(C),N=_.isFirstPage,T=_.isLastPage;// map des variables
|
|
2931
|
+
return checkInLoop(_objectSpread2(_objectSpread2({},e),{},{cleaning:v,missingBlock:k,resizing:S,variables:f,pages:b,isFirstPage:N,isLastPage:T,pager:C,executeExpression:g,updateBindings:h,handleChange:r,preferences:s,management:u,savingType:l,modalForControls:c}))}return e}function isOnEmptyPage(e){var n=e.executeExpression,t=e.pager,a=t.iteration,i=getComponentsFromState(e),o=i.reduce(function(e,t){var i=t.conditionFilter;if(i){var o=executeConditionFilter(i,n,a);if(!0===o)return[].concat(_toConsumableArray(e),[t])}return e},[]);return!o.length}/**
|
|
2932
|
+
* certaines variables du questionnaire sont de type tableau.
|
|
2933
|
+
* Il faut alors vérifier qu'elles le sont véritablement.
|
|
2934
|
+
* Il faut aussi vérifier quelles sont de la taille adéquate.
|
|
2935
|
+
* @param {*} array
|
|
2936
|
+
* @param {*} length
|
|
2937
|
+
* @returns le tableau à la taille correcte.
|
|
2938
|
+
*/function resizeArrayVariable(e,n,t){if(!Array.isArray(e))// create the array
|
|
2939
|
+
return Array(n).fill(t);// do nothing
|
|
2940
|
+
return e.length===n?e:Array(n).fill(t).reduce(function(n,t,a){return a<e.length?[].concat(_toConsumableArray(n),[e[a]]):[].concat(_toConsumableArray(n),[t])},[])}function validateLoopConditionFilter(e,n){var t=n.next,a=n.iteration,i=e.pages,o=e.executeExpression,d=i[t].components,r=_slicedToArray(d,1),s=r[0];if(s){var l=s.conditionFilter;if(l)return executeConditionFilter(l,o,a)}return!0}// INFO: 'INFO',
|
|
2941
|
+
// WARN: 'WARN',
|
|
2942
|
+
// };
|
|
2943
|
+
function resolveControl(e,n){var t=e.executeExpression,a=e.pager,i=void 0===a?{}:a,o=i.iteration,d=n.criticality,r=n.errorMessage,s=n.id,l=n.control;l=void 0===l?{}:l;var u=l.value,c=void 0===u?"true":u;try{var f=t(c,{iteration:o});return f?void 0:{criticality:d,errorMessage:r,id:s}}catch(n){return void console.log("Error on validating control ".concat(c))}}function resolveComponentControls(e,n){return n.reduce(function(n,t){var a=resolveControl(e,t);return a?[].concat(_toConsumableArray(n),[a]):n},[])}function validateComponents(e,n){// TODO check components in components (Loop, etc...)
|
|
2944
|
+
return n.reduce(function(n,t){var a=t.controls,i=t.id;if(Array.isArray(a)){var o=resolveComponentControls(e,a);if(o.length)return _objectSpread2(_objectSpread2({},n),{},_defineProperty({},i,o))}return n},{})}// function isBlockingErrors(errors) {
|
|
2945
|
+
// // TODO find criticality WARN
|
|
2946
|
+
// return false;
|
|
2947
|
+
// }
|
|
2948
|
+
function isErrors(e){return!!e&&0<Object.keys(e).length}function createValidateReducer(e){// Nothing to init
|
|
2949
|
+
return function(n,t){var a=t.payload,i=n.modalForControls,o=a.block;if(!i)return e(_objectSpread2(_objectSpread2({},n),{},{errors:void 0}),t);var d=getComponentsFromState(n),r=n.errors;if(o)return _objectSpread2(_objectSpread2({},n),{},{errors:void 0});if(r)return e(_objectSpread2(_objectSpread2({},n),{},{errors:void 0}),t);var s=validateComponents(n,d);return isErrors(s)?_objectSpread2(_objectSpread2({},n),{},{errors:s}):e(_objectSpread2(_objectSpread2({},n),{},{errors:void 0}),t)}}function getNextPage(e){var n=e.pager,t=n.page,a=n.maxPage,i=Number.parseInt(t),o=a;return i<o?"".concat(i+1):"".concat(a)}function reduceNextSubPage(e){var n=e.pager,t=n.subPage;return _objectSpread2(_objectSpread2({},e),{},{pager:_objectSpread2(_objectSpread2({},n),{},{subPage:t+1}),errors:void 0})}function reduceNextIteration(e){var n=e.pager,t=n.iteration;return _objectSpread2(_objectSpread2({},e),{},{pager:_objectSpread2(_objectSpread2({},n),{},{subPage:0,iteration:t+1}),errors:void 0})}function reduceNextPage(e,n){var t=n.next;n.iterations;var a=e.pager;return _objectSpread2(_objectSpread2({},e),{},{isInLoop:!1,pager:_objectSpread2(_objectSpread2({},a),{},{page:t,iteration:void 0,nbIterations:void 0,subPage:void 0,nbSubPages:void 0}),errors:void 0})}function reduceStartLoop(e,n){var t=n.next,a=n.iterations,i=n.loopDependencies,o=e.pages,d=e.pager,r=e.executeExpression,s=o[t].subPages;if(!validateLoopConditionFilter(e,{next:t}))return _objectSpread2(_objectSpread2({},e),{},{pager:_objectSpread2(_objectSpread2({},d),{},{page:t,subPage:void 0,nbSubPages:void 0,iteration:void 0,nbIterations:void 0}),errors:void 0});/*
|
|
2950
|
+
|
|
2951
|
+
|
|
2952
|
+
|
|
2953
|
+
*/var l=r(getCompatibleVTLExpression(a),{bindingDependencies:i,iteration:void 0});return Array.isArray(s)?_objectSpread2(_objectSpread2({},e),{},{isInLoop:!0,pager:_objectSpread2(_objectSpread2({},d),{},{page:t,subPage:0,nbSubPages:s.length,iteration:0,nbIterations:l}),errors:void 0}):e}function validateChange$1(e){return isOnEmptyPage(e)?reduceGoNextPage(e):e}function reduceGoNextPage(e){var n=e.pages,t=e.isInLoop,a=e.pager,i=a.iteration,o=a.nbIterations,d=a.subPage,r=a.nbSubPages;if(a.page,t&&d<r-1)return validateChange$1(reduceNextSubPage(e));if(t&&d===r-1&&i<o-1)return validateChange$1(reduceNextIteration(e));var s=getNextPage(e),l=n[s],u=l.isLoop,c=l.iterations,f=l.loopDependencies;return u?validateChange$1(reduceStartLoop(e,{next:s,iterations:c,loopDependencies:f})):validateChange$1(reduceNextPage(e,{next:s}))}var reduceGoNextPage$1=createValidateReducer(reduceGoNextPage);function getPreviousPage(e){var n=e.page,t=Number.parseInt(n);return 1<t?"".concat(n-1):n}function goStartLoop(e,n){var t=n.previous,a=n.iterations,i=n.loopDependencies,o=e.pages,d=e.pager,r=e.executeExpression,s=o[t].subPages;//TODO: check if loop components are all filtered
|
|
2954
|
+
// if (validateLoopConditionFilter(state, { next: previous })) {
|
|
2955
|
+
// return {
|
|
2956
|
+
// ...state,
|
|
2957
|
+
// pager: {
|
|
2958
|
+
// ...pager,
|
|
2959
|
+
// page: previous,
|
|
2960
|
+
// subPage: undefined,
|
|
2961
|
+
// nbSubPages: undefined,
|
|
2962
|
+
// iteration: undefined,
|
|
2963
|
+
// nbIterations: undefined,
|
|
2964
|
+
// },
|
|
2965
|
+
// };
|
|
2966
|
+
// }
|
|
2967
|
+
if(Array.isArray(s)){var l=r(getCompatibleVTLExpression(a),{bindingDependencies:i});return _objectSpread2(_objectSpread2({},e),{},{isInLoop:!0,pager:_objectSpread2(_objectSpread2({},d),{},{page:t,subPage:s.length-1,nbSubPages:s.length,iteration:l-1,nbIterations:l})})}return e}function goPreviousSubPage(e){var n=e.pager,t=n.subPage;return _objectSpread2(_objectSpread2({},e),{},{pager:_objectSpread2(_objectSpread2({},n),{},{subPage:t-1})})}function goPreviousIteration(e){var n=e.pager,t=e.pages,a=n.iteration,i=n.page,o=t[i].subPages;return _objectSpread2(_objectSpread2({},e),{},{pager:_objectSpread2(_objectSpread2({},n),{},{subPage:o.length-1,iteration:a-1})})}function goPreviousPage(e,n){var t=n.previous,a=e.pager,i=a.page;return t===i?e:_objectSpread2(_objectSpread2({},e),{},{isInLoop:!1,pager:_objectSpread2(_objectSpread2({},a),{},{page:t,iteration:void 0,nbIterations:void 0,subPage:void 0,nbSubPages:void 0})})}function validateChange(e){return isOnEmptyPage(e)?reduceGoPreviousPage(e):e}function reduceGoPreviousPage(e){var n=e.pages,t=e.pager,a=e.isInLoop,i=t.iteration,o=t.subPage;// dans une boucle et l'itération courante n'est pas finie
|
|
2968
|
+
if(a&&0<o)return validateChange(goPreviousSubPage(e));// dans une boucle, l'itération courante est finie mais il reste encore au moins une autre
|
|
2969
|
+
if(a&&0===o&&0<i)return validateChange(goPreviousIteration(e));var d=getPreviousPage(t),r=n[d],s=r.isLoop,l=r.iterations,u=r.loopDependencies;// on rentre dans une boucle
|
|
2970
|
+
return s?validateChange(goStartLoop(e,{previous:d,loopDependencies:u,iterations:l})):validateChange(goPreviousPage(e,{previous:d}));// on change de page
|
|
2971
|
+
}function reduceVariablesArray(e,n){var t=n.name,a=n.value,i=n.index,o=n.length;if(t in e){var d=e[t],r=d.value,s=resizeArrayVariable(_toConsumableArray(r),o);return s[i]=a,_objectSpread2(_objectSpread2({},e),{},_defineProperty({},t,_objectSpread2(_objectSpread2({},d),{},{value:s})))}return e}function reduceVariablesSimple(e,n){var t=n.name,a=n.value;if(t in e){var i=e[t];return _objectSpread2(_objectSpread2({},e),{},_defineProperty({},t,_objectSpread2(_objectSpread2({},i),{},{value:a})))}return e}function reduceCleaning(e,n){var t=n.payload,a=t.response,i=e.executeExpression,o=e.cleaning,d=e.updateBindings,r=e.variables,s=e.pager,l=s.iteration;if(a){var u=a.name;if(u in o){var c=o[u],f=Object.entries(c).reduce(function(e,n){var t=_slicedToArray(n,2),a=t[0],o=t[1],s=i(getCompatibleVTLExpression(o),{iteration:l});if(!s&&a in r){var u=r[a],c=u.variable,f=(null===c||void 0===c||null===(p=c.values)||void 0===p?void 0:p.COLLECTED)||null,p;return d(a,f),_objectSpread2(_objectSpread2({},e),{},_defineProperty({},a,_objectSpread2(_objectSpread2({},u),{},{value:f})))}return e},{});return _objectSpread2(_objectSpread2({},e),{},{variables:_objectSpread2(_objectSpread2({},r),f)})}}return e}var _excluded=["value"];function buildMissingValue(e,n){var t=e.pager.iteration;// Root question
|
|
2972
|
+
if(void 0===t)return null;// Loop question
|
|
2973
|
+
var a=_toConsumableArray(n);return a[t]=null,a}function reduceMissing(e,n){var t=n.payload.response.name,a=e.missingBlock;if(t in a){var i=e.variables,o=e.updateBindings,d=a[t],r=d.reduce(function(n,t){var a=i[t],d=a.value,r=_objectWithoutProperties(a,_excluded);o(t,null);var s=buildMissingValue(e,d);return _objectSpread2(_objectSpread2({},n),{},_defineProperty({},t,_objectSpread2(_objectSpread2({},r),{},{value:s})))},{}),s=_objectSpread2(_objectSpread2({},e),{},{variables:_objectSpread2(_objectSpread2({},i),r)}),l=d.reduce(function(e,n){return reduceCleaning(e,{payload:{response:{name:n}}})},s);return l}return e}function reduceResizingVariables(e){var n=e.size,t=e.variableArray,a=e.variables,i=e.executeExpression,o=e.updateBindings;if(n!==void 0){var d=i(getCompatibleVTLExpression(n));return t.reduce(function(e,n){var t=a[n].value,i=resizeArrayVariable(t,d,null);return o(n,i),_objectSpread2(_objectSpread2({},e),{},_defineProperty({},n,_objectSpread2(_objectSpread2({},a[n]),{},{value:i})))},{})}return{}}function reduceResizingLinksVariables(e){var n=e.sizeForLinksVariables,t=e.linksVariables,a=e.variables,i=e.executeExpression,o=e.updateBindings;if(Array.isArray(n)){var d=n.map(function(e){return i(getCompatibleVTLExpression(e))}),r=_slicedToArray(d,2),s=r[0],l=r[1];return t.reduce(function(e,n){var t=a[n].value,i=resizeArrayVariable(t.map(function(e){return resizeArrayVariable(e,l,null)}),s,Array(l).fill(null));return o(n,i),_objectSpread2(_objectSpread2({},e),{},_defineProperty({},n,_objectSpread2(_objectSpread2({},a[n]),{},{value:i})))},{})}return{}}function reduceResizing(e,n){var t=n.payload.response.name,a=e.resizing,i=e.variables,o=e.updateBindings;if(t in a){var d=a[t],r=d.size,s=d.variables,l=d.sizeForLinksVariables,u=d.linksVariables,c=e.executeExpression,f=reduceResizingLinksVariables({sizeForLinksVariables:l,linksVariables:u,variables:i,executeExpression:c,updateBindings:o}),p=reduceResizingVariables({size:r,variableArray:s,variables:i,executeExpression:c,updateBindings:o});return _objectSpread2(_objectSpread2({},e),{},{variables:_objectSpread2(_objectSpread2(_objectSpread2({},i),f),p)})}return e}function reduceLinksVariable(e,n){var t=n.name,a=n.value,i=n.linksIterations;if(t in e){var o=e[t],d=o.value,r=_slicedToArray(i,2),s=r[0],l=r[1];return void 0===d[s][l]?e:(d[s][l]=a,_objectSpread2(_objectSpread2({},e),{},_defineProperty({},t,_objectSpread2(_objectSpread2({},o),{},{value:d}))))}return e}function compose(){for(var e=arguments.length,n=Array(e),t=0;t<e;t++)n[t]=arguments[t];return n.reverse().reduce(function(e,n){return function(t){for(var a=arguments.length,i=Array(1<a?a-1:0),o=1;o<a;o++)i[o-1]=arguments[o];return e.apply(void 0,[n.apply(void 0,[t].concat(i))].concat(i))}},function(e){return e})}function isOnSubPage(e){var n=e.subPage;return n!==void 0}/**
|
|
2974
|
+
* met à jour variables qui contient les valeur collectées
|
|
2975
|
+
* @param {*} state
|
|
2976
|
+
* @param {*} action
|
|
2977
|
+
* @returns
|
|
2978
|
+
*/function updateVariables(e,n){var t=n.payload,a=t.response,i=t.value,o=t.args,d=void 0===o?{}:o,r=a.name,s=d.loop,l=d.index,u=d.length,c=d.linksIterations,f=e.pager,p=e.variables,m=f.nbIterations,g=f.iteration;if(c!==void 0){var h=reduceLinksVariable(p,{name:r,value:i,linksIterations:c});return _objectSpread2(_objectSpread2({},e),{},{variables:h})}if(s){var b=reduceVariablesArray(p,{name:r,value:i,index:l,length:u});return _objectSpread2(_objectSpread2({},e),{},{variables:b})}if(isOnSubPage(f)){var y=reduceVariablesArray(p,{name:r,value:i,index:g,length:m});return _objectSpread2(_objectSpread2({},e),{},{variables:y})}var x=reduceVariablesSimple(p,{name:r,value:i});return _objectSpread2(_objectSpread2({},e),{},{variables:x})}/**
|
|
2979
|
+
* met à jour bindings pour l'exe du VTL (en appelant la fonction fournit par createExecuteExpression)
|
|
2980
|
+
* @param {*} state
|
|
2981
|
+
* @param {*} action
|
|
2982
|
+
* @returns
|
|
2983
|
+
*/function updateBindings(e,n){var t=n.payload,a=t.response,i=t.value,o=a.name,d=e.updateBindings;return d(o,i),e}var reducers=compose(updateVariables,updateBindings,reduceResizing,reduceMissing,reduceCleaning);/**
|
|
2984
|
+
*
|
|
2985
|
+
* @param {*} state
|
|
2986
|
+
* @param {*} action
|
|
2987
|
+
* @returns
|
|
2988
|
+
*/function reduceHandleChange(e,n){return reducers(e,n)}function reduceOnSetWaiting(e,n){var t=n.payload,a=t.status;return _objectSpread2(_objectSpread2({},e),{},{waiting:a})}function reducer(e,n){var t=n.type;return t===ON_INIT?reduceOnInit(e,n):t===GO_NEXT_PAGE?reduceGoNextPage$1(e,n):t===GO_PREVIOUS_PAGE?reduceGoPreviousPage(e):t===HANDLE_CHANGE?reduceHandleChange(e,n):t===ON_SET_WAITING?reduceOnSetWaiting(e,n):e}var workerPath=process.env.LUNATIC_LOADER_WORKER_PATH||process.env.REACT_APP_LUNATIC_LOADER_WORKER_PATH||"workers/lunatic-loader-worker-0.1.0.js",loadSuggesters=function n(e){return/*#__PURE__*/function(){var n=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function t(n){return _regeneratorRuntime().wrap(function a(t){for(;1;)switch(t.prev=t.next){case 0:Object.entries(n).forEach(/*#__PURE__*/function(){var e=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function n(e){var t,a,i,o,d;return _regeneratorRuntime().wrap(function r(n){for(;1;)switch(n.prev=n.next){case 0:return t=_slicedToArray(e,2),a=t[0],i=t[1],o=i.version,n.next=4,openStorage(a,o);case 4:if(d=n.sent,!d){n.next=12;break}return n.next=8,clear$1(d);case 8:return n.next=10,clear(d);case 10:return n.next=12,updateStoreInfo(d,i);case 12:case"end":return n.stop();}},n)}));return function(n){return e.apply(this,arguments)}}()),Object.entries(n).forEach(function(n){var t=_slicedToArray(n,2),a=t[0],i=t[1],o=i.url,d=i.version,r=i.fields,s=i.stopWords,l=e||fetch;l(o).then(/*#__PURE__*/function(){var e=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function n(e){var t,i,o,l,u;return _regeneratorRuntime().wrap(function c(n){for(;1;)switch(n.prev=n.next){case 0:return n.next=2,e.json();case 2:return t=n.sent,i=task({name:a,fields:r,stopWords:s},d),o=_slicedToArray(i,2),l=o[0],u=o[1],n.next=6,l(t);case 6:u();case 7:case"end":return n.stop();}},n)}));return function(n){return e.apply(this,arguments)}}())});case 2:case"end":return t.stop();}},t)}));return function(e){return n.apply(this,arguments)}}()};/**
|
|
2989
|
+
* Only with Worker
|
|
2990
|
+
*/function task(e,n){function t(e){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:function(){return null};return new Promise(function(a){l=!0,s.postMessage({name:i,version:n,fields:o,entities:e,stopWords:d}),s.addEventListener("message",function(n){var e=n.data;"success"===e?(!u&&t(),a(e)):r(e)})})}function a(){l&&(u=!0,s.terminate())}var i=e.name,o=e.fields,d=e.stopWords,r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:function(){return null},s=createWorker(workerPath),l=!1,u=!1;return[t,a]}var DEFAULT_DATA={},DEFAULT_FEATURES=["VTL","MD"],DEFAULT_PREFERENCES=[COLLECTED];function nothing(){}function useLunatic(e){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:DEFAULT_DATA,t=2<arguments.length?arguments[2]:void 0,a=t.features,i=void 0===a?DEFAULT_FEATURES:a,o=t.preferences,d=void 0===o?DEFAULT_PREFERENCES:o,r=t.savingType,s=void 0===r?COLLECTED:r,l=t.onChange,u=void 0===l?nothing:l,c=t.management,f=void 0!==c&&c,p=t.initialPage,m=void 0===p?"1":p,g=t.autoSuggesterLoading,h=void 0!==g&&g,b=t.suggesters,y=t.suggesterFetcher,x=t.modalForControls,v=void 0!==x&&x,w=React.useReducer(reducer,INITIAL_STATE),k=_slicedToArray(w,2),E=k[0],S=k[1],C=E.pager,_=E.waiting,N=E.errors,T=useComponentsFromState(E),R=e.suggesters;React.useEffect(function(){var e=/*#__PURE__*/function(){var e=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function e(){var n;return _regeneratorRuntime().wrap(function t(e){for(;1;)switch(e.prev=e.next){case 0:if(!(h&&"object"===_typeof(b)&&0<Object.values(b).length)){e.next=7;break}return n=R.reduce(function(e,n){var t=n.name;return b[t]?_objectSpread2(_objectSpread2({},e),{},_defineProperty({},t,_objectSpread2(_objectSpread2({},n),{},{url:b[t].url,stopWords:b[t].stopWords}))):e},{}),S(onSetWaiting(!0)),e.next=5,loadSuggesters(y)(n);case 5:e.sent,S(onSetWaiting(!1));case 7:case"end":return e.stop();}},e)}));return function n(){return e.apply(this,arguments)}}();e()},[h,y,b,R]);var P=React.useCallback(function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};S(goNextPage(e))},[S]),I=React.useCallback(function(){return N},[N]),L=React.useCallback(function(){S(goPreviousPage$1())},[S]),D=React.useCallback(function(){// validate variables ?
|
|
2991
|
+
return T},[T]),z=React.useCallback(function(e,n,t){S(handleChange(e,n,t)),u(e,n,t)},[S,u]),A=function e(){var n=E.variables;return Object.entries(n).reduce(function(e,n){var t=_slicedToArray(n,2),a=t[0],i=t[1].value;return _objectSpread2(_objectSpread2({},e),{},_defineProperty({},a,i))},{})},O=getPageTag(C),M=isFirstLastPage(C),U=M.isFirstPage,F=M.isLastPage;return React.useEffect(function(){S(onInit({source:e,data:n,initialPage:m,features:i,preferences:d,savingType:s,management:f,handleChange:z,modalForControls:v}))},[e,n,m,i,d,s,f,z,v]),{getComponents:D,goNextPage:P,goPreviousPage:L,getErrors:I,pageTag:O,isFirstPage:U,isLastPage:F,pager:C,waiting:_,getState:A}}exports.Button=Button,exports.CheckboxBoolean=lunaticCheckboxBoolean,exports.CheckboxGroup=lunaticCheckboxGroup,exports.CheckboxOne=LunaticCheckboxOne,exports.Datepicker=lunaticDatepicker,exports.Declarations=Declarations,exports.Dropdown=lunaticDropdown,exports.FilterDescription=FilterDescription,exports.Input=LunaticInput,exports.InputNumber=LunaticInputNumber,exports.Loop=Loop,exports.Modal=ModalControls,exports.PairwiseBlock=PairwiseBlock,exports.PairwiseLinks=PairwiseLinks,exports.Radio=LunaticRadioGroup$1,exports.RosterForLoop=Loop,exports.Sequence=Sequence,exports.Subsequence=Subsequence,exports.Suggester=lunaticSuggester,exports.SuggesterLoaderWidget=SuggesterLoaderWidget,exports.Switch=lunaticSwitch,exports.Table=lunaticTable,exports.Textarea=LunaticTextarea,exports.useLunatic=useLunatic;
|
|
2992
|
+
//# sourceMappingURL=index.js.map
|