flexlayout-react 0.8.4 → 0.8.6

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.
Files changed (56) hide show
  1. package/ChangeLog.txt +9 -0
  2. package/README.md +29 -2
  3. package/declarations/Types.d.ts +2 -6
  4. package/declarations/view/Layout.d.ts +3 -1
  5. package/dist/flexlayout.js +7 -7
  6. package/dist/flexlayout_min.js +1 -1
  7. package/lib/Types.js +2 -6
  8. package/lib/Types.js.map +1 -1
  9. package/lib/model/TabSetNode.js +9 -4
  10. package/lib/model/TabSetNode.js.map +1 -1
  11. package/lib/view/BorderTabSet.js +11 -5
  12. package/lib/view/BorderTabSet.js.map +1 -1
  13. package/lib/view/Layout.js +3 -2
  14. package/lib/view/Layout.js.map +1 -1
  15. package/lib/view/PopupMenu.js +11 -5
  16. package/lib/view/PopupMenu.js.map +1 -1
  17. package/lib/view/TabOverflowHook.js +104 -21
  18. package/lib/view/TabOverflowHook.js.map +1 -1
  19. package/lib/view/TabSet.js +11 -5
  20. package/lib/view/TabSet.js.map +1 -1
  21. package/package.json +2 -2
  22. package/src/Types.ts +3 -8
  23. package/src/model/TabSetNode.ts +8 -4
  24. package/src/view/BorderTabSet.tsx +38 -24
  25. package/src/view/Layout.tsx +9 -5
  26. package/src/view/PopupMenu.tsx +31 -19
  27. package/src/view/TabOverflowHook.tsx +112 -21
  28. package/src/view/TabSet.tsx +36 -22
  29. package/style/_base.scss +569 -595
  30. package/style/_themes.scss +649 -0
  31. package/style/combined.css +1055 -0
  32. package/style/combined.css.map +1 -0
  33. package/style/combined.scss +46 -0
  34. package/style/dark.css +704 -701
  35. package/style/dark.css.map +1 -1
  36. package/style/dark.scss +5 -181
  37. package/style/gray.css +707 -684
  38. package/style/gray.css.map +1 -1
  39. package/style/gray.scss +5 -180
  40. package/style/light.css +681 -685
  41. package/style/light.css.map +1 -1
  42. package/style/light.scss +5 -163
  43. package/style/rounded.css +723 -730
  44. package/style/rounded.css.map +1 -1
  45. package/style/rounded.scss +5 -210
  46. package/style/underline.css +710 -705
  47. package/style/underline.css.map +1 -1
  48. package/style/underline.scss +5 -186
  49. package/.editorconfig +0 -8
  50. package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -104
  51. package/.github/ISSUE_TEMPLATE/config.yml +0 -5
  52. package/.prettierrc.json +0 -3
  53. package/Screenshot_light.png +0 -0
  54. package/Screenshot_rounded.png +0 -0
  55. package/dist/bundles/demo.js +0 -232052
  56. package/dist/bundles/demo.js.map +0 -1
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see flexlayout_min.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):"object"==typeof exports?exports.FlexLayout=t(require("react"),require("react-dom")):e.FlexLayout=t(e.React,e.ReactDOM)}(self,((e,t)=>(()=>{"use strict";var n={36:t=>{t.exports=e},47:e=>{e.exports=t},370:(e,t,n)=>{e.exports=n(849)},553:(e,t,n)=>{var r=n(370),i=n(36),a=n(47);function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var l=Symbol.for("react.element"),s=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),h=Symbol.for("react.provider"),p=Symbol.for("react.consumer"),g=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),T=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var _=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.tracing_marker");var E=Symbol.for("react.memo_cache_sentinel"),w=Symbol.iterator;function S(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=w&&e[w]||e["@@iterator"])?e:null}var L=Symbol.for("react.client.reference");function O(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===L?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case c:return"Fragment";case u:return"Portal";case f:return"Profiler";case d:return"StrictMode";case b:return"Suspense";case v:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case g:return(e.displayName||"Context")+".Provider";case p:return(e._context.displayName||"Context")+".Consumer";case m:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case y:return null!==(t=e.displayName||null)?t:O(e.type)||"Memo";case T:t=e._payload,e=e._init;try{return O(e(t))}catch(e){}}return null}var N,A,R=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,x=Object.assign;function k(e){if(void 0===N)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);N=t&&t[1]||"",A=-1<e.stack.indexOf("\n at")?" (<anonymous>)":-1<e.stack.indexOf("@")?"@unknown:0:0":""}return"\n"+N+e+A}var C=!1;function D(e,t){if(!e||C)return"";C=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&"function"==typeof n.catch&&n.catch((function(){}))}}catch(e){if(e&&r&&"string"==typeof e.stack)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var a=r.DetermineComponentFrameRoot(),o=a[0],l=a[1];if(o&&l){var s=o.split("\n"),u=l.split("\n");for(i=r=0;r<s.length&&!s[r].includes("DetermineComponentFrameRoot");)r++;for(;i<u.length&&!u[i].includes("DetermineComponentFrameRoot");)i++;if(r===s.length||i===u.length)for(r=s.length-1,i=u.length-1;1<=r&&0<=i&&s[r]!==u[i];)i--;for(;1<=r&&0<=i;r--,i--)if(s[r]!==u[i]){if(1!==r||1!==i)do{if(r--,0>--i||s[r]!==u[i]){var c="\n"+s[r].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}}while(1<=r&&0<=i);break}}}finally{C=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?k(n):""}function M(e){switch(e.tag){case 26:case 27:case 5:return k(e.type);case 16:return k("Lazy");case 13:return k("Suspense");case 19:return k("SuspenseList");case 0:case 15:return D(e.type,!1);case 11:return D(e.type.render,!1);case 1:return D(e.type,!0);default:return""}}function I(e){try{var t="";do{t+=M(e),e=e.return}while(e);return t}catch(e){return"\nError generating stack: "+e.message+"\n"+e.stack}}function B(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function P(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function z(e){if(B(e)!==e)throw Error(o(188))}function U(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e;for(e=e.child;null!==e;){if(null!==(t=U(e)))return t;e=e.sibling}return null}var F=Array.isArray,W=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H={pending:!1,data:null,method:null,action:null},Y=[],X=-1;function V(e){return{current:e}}function j(e){0>X||(e.current=Y[X],Y[X]=null,X--)}function G(e,t){X++,Y[X]=e.current,e.current=t}var $=V(null),q=V(null),Q=V(null),J=V(null);function Z(e,t){switch(G(Q,t),G(q,e),G($,null),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)&&(t=t.namespaceURI)?qc(t):0;break;default:if(t=(e=8===e?t.parentNode:t).tagName,e=e.namespaceURI)t=Qc(e=qc(e),t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}j($),G($,t)}function K(){j($),j(q),j(Q)}function ee(e){null!==e.memoizedState&&G(J,e);var t=$.current,n=Qc(t,e.type);t!==n&&(G(q,e),G($,n))}function te(e){q.current===e&&(j($),j(q)),J.current===e&&(j(J),Id._currentValue=H)}var ne=Object.prototype.hasOwnProperty,re=r.unstable_scheduleCallback,ie=r.unstable_cancelCallback,ae=r.unstable_shouldYield,oe=r.unstable_requestPaint,le=r.unstable_now,se=r.unstable_getCurrentPriorityLevel,ue=r.unstable_ImmediatePriority,ce=r.unstable_UserBlockingPriority,de=r.unstable_NormalPriority,fe=r.unstable_LowPriority,he=r.unstable_IdlePriority,pe=r.log,ge=r.unstable_setDisableYieldValue,me=null,be=null;function ve(e){if("function"==typeof pe&&ge(e),be&&"function"==typeof be.setStrictMode)try{be.setStrictMode(me,e)}catch(e){}}var ye=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(Te(e)/_e|0)|0},Te=Math.log,_e=Math.LN2,Ee=128,we=4194304;function Se(e){var t=42&e;if(0!==t)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194176&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Le(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=e.warmLanes;e=0!==e.finishedLanes;var l=134217727&n;return 0!==l?0!=(n=l&~i)?r=Se(n):0!=(a&=l)?r=Se(a):e||0!=(o=l&~o)&&(r=Se(o)):0!=(l=n&~i)?r=Se(l):0!==a?r=Se(a):e||0!=(o=n&~o)&&(r=Se(o)),0===r?0:0===t||t===r||t&i||!((i=r&-r)>=(o=t&-t)||32===i&&4194176&o)?r:t}function Oe(e,t){return!(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function Ne(e,t){switch(e){case 1:case 2:case 4:case 8:return t+250;case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function Ae(){var e=Ee;return!(4194176&(Ee<<=1))&&(Ee=128),e}function Re(){var e=we;return!(62914560&(we<<=1))&&(we=4194304),e}function xe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ke(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ce(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-ye(t);e.entangledLanes|=t,e.entanglements[r]=1073741824|e.entanglements[r]|4194218&n}function De(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ye(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Me(e){return 2<(e&=-e)?8<e?134217727&e?32:268435456:8:2}function Ie(){var e=W.p;return 0!==e?e:void 0===(e=window.event)?32:$d(e.type)}var Be=Math.random().toString(36).slice(2),Pe="__reactFiber$"+Be,ze="__reactProps$"+Be,Ue="__reactContainer$"+Be,Fe="__reactEvents$"+Be,We="__reactListeners$"+Be,He="__reactHandles$"+Be,Ye="__reactResources$"+Be,Xe="__reactMarker$"+Be;function Ve(e){delete e[Pe],delete e[ze],delete e[Fe],delete e[We],delete e[He]}function je(e){var t=e[Pe];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ue]||n[Pe]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ld(e);null!==e;){if(n=e[Pe])return n;e=ld(e)}return t}n=(e=n).parentNode}return null}function Ge(e){if(e=e[Pe]||e[Ue]){var t=e.tag;if(5===t||6===t||13===t||26===t||27===t||3===t)return e}return null}function $e(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e.stateNode;throw Error(o(33))}function qe(e){var t=e[Ye];return t||(t=e[Ye]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Qe(e){e[Xe]=!0}var Je=new Set,Ze={};function Ke(e,t){et(e,t),et(e+"Capture",t)}function et(e,t){for(Ze[e]=t,e=0;e<t.length;e++)Je.add(t[e])}var tt=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),nt=RegExp("^[: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]*$"),rt={},it={};function at(e,t,n){if(i=t,ne.call(it,i)||!ne.call(rt,i)&&(nt.test(i)?it[i]=!0:(rt[i]=!0,0)))if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":return void e.removeAttribute(t);case"boolean":var r=t.toLowerCase().slice(0,5);if("data-"!==r&&"aria-"!==r)return void e.removeAttribute(t)}e.setAttribute(t,""+n)}var i}function ot(e,t,n){if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(t)}e.setAttribute(t,""+n)}}function lt(e,t,n,r){if(null===r)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(n)}e.setAttributeNS(t,n,""+r)}}function st(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function ut(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function ct(e){e._valueTracker||(e._valueTracker=function(e){var t=ut(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function dt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ut(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function ft(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}var ht=/[\n"\\]/g;function pt(e){return e.replace(ht,(function(e){return"\\"+e.charCodeAt(0).toString(16)+" "}))}function gt(e,t,n,r,i,a,o,l){e.name="",null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&"boolean"!=typeof o?e.type=o:e.removeAttribute("type"),null!=t?"number"===o?(0===t&&""===e.value||e.value!=t)&&(e.value=""+st(t)):e.value!==""+st(t)&&(e.value=""+st(t)):"submit"!==o&&"reset"!==o||e.removeAttribute("value"),null!=t?bt(e,o,st(t)):null!=n?bt(e,o,st(n)):null!=r&&e.removeAttribute("value"),null==i&&null!=a&&(e.defaultChecked=!!a),null!=i&&(e.checked=i&&"function"!=typeof i&&"symbol"!=typeof i),null!=l&&"function"!=typeof l&&"symbol"!=typeof l&&"boolean"!=typeof l?e.name=""+st(l):e.removeAttribute("name")}function mt(e,t,n,r,i,a,o,l){if(null!=a&&"function"!=typeof a&&"symbol"!=typeof a&&"boolean"!=typeof a&&(e.type=a),null!=t||null!=n){if(("submit"===a||"reset"===a)&&null==t)return;n=null!=n?""+st(n):"",t=null!=t?""+st(t):n,l||t===e.value||(e.value=t),e.defaultValue=t}r="function"!=typeof(r=null!=r?r:i)&&"symbol"!=typeof r&&!!r,e.checked=l?e.checked:!!r,e.defaultChecked=!!r,null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&"boolean"!=typeof o&&(e.name=o)}function bt(e,t,n){"number"===t&&ft(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function vt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+st(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function yt(e,t,n){null==t||((t=""+st(t))!==e.value&&(e.value=t),null!=n)?e.defaultValue=null!=n?""+st(n):"":e.defaultValue!==t&&(e.defaultValue=t)}function Tt(e,t,n,r){if(null==t){if(null!=r){if(null!=n)throw Error(o(92));if(F(r)){if(1<r.length)throw Error(o(93));r=r[0]}n=r}null==n&&(n=""),t=n}n=st(t),e.defaultValue=n,(r=e.textContent)===n&&""!==r&&null!==r&&(e.value=r)}function _t(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var Et=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function wt(e,t,n){var r=0===t.indexOf("--");null==n||"boolean"==typeof n||""===n?r?e.setProperty(t,""):"float"===t?e.cssFloat="":e[t]="":r?e.setProperty(t,n):"number"!=typeof n||0===n||Et.has(t)?"float"===t?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function St(e,t,n){if(null!=t&&"object"!=typeof t)throw Error(o(62));if(e=e.style,null!=n){for(var r in n)!n.hasOwnProperty(r)||null!=t&&t.hasOwnProperty(r)||(0===r.indexOf("--")?e.setProperty(r,""):"float"===r?e.cssFloat="":e[r]="");for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&wt(e,i,r)}else for(var a in t)t.hasOwnProperty(a)&&wt(e,a,t[a])}function Lt(e){if(-1===e.indexOf("-"))return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ot=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Nt=/^[\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;function At(e){return Nt.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var Rt=null;function xt(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var kt=null,Ct=null;function Dt(e){var t=Ge(e);if(t&&(e=t.stateNode)){var n=e[ze]||null;e:switch(e=t.stateNode,t.type){case"input":if(gt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+pt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[ze]||null;if(!i)throw Error(o(90));gt(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)(r=n[t]).form===e.form&&dt(r)}break e;case"textarea":yt(e,n.value,n.defaultValue);break e;case"select":null!=(t=n.value)&&vt(e,!!n.multiple,t,!1)}}}var Mt=!1;function It(e,t,n){if(Mt)return e(t,n);Mt=!0;try{return e(t)}finally{if(Mt=!1,(null!==kt||null!==Ct)&&(Pu(),kt&&(t=kt,e=Ct,Ct=kt=null,Dt(t),e)))for(t=0;t<e.length;t++)Dt(e[t])}}function Bt(e,t){var n=e.stateNode;if(null===n)return null;var r=n[ze]||null;if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(o(231,t,typeof n));return n}var Pt=!1;if(tt)try{var zt={};Object.defineProperty(zt,"passive",{get:function(){Pt=!0}}),window.addEventListener("test",zt,zt),window.removeEventListener("test",zt,zt)}catch(e){Pt=!1}var Ut=null,Ft=null,Wt=null;function Ht(){if(Wt)return Wt;var e,t,n=Ft,r=n.length,i="value"in Ut?Ut.value:Ut.textContent,a=i.length;for(e=0;e<r&&n[e]===i[e];e++);var o=r-e;for(t=1;t<=o&&n[r-t]===i[a-t];t++);return Wt=i.slice(e,1<t?1-t:void 0)}function Yt(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function Xt(){return!0}function Vt(){return!1}function jt(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?Xt:Vt,this.isPropagationStopped=Vt,this}return x(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Xt)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Xt)},persist:function(){},isPersistent:Xt}),t}var Gt,$t,qt,Qt={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Jt=jt(Qt),Zt=x({},Qt,{view:0,detail:0}),Kt=jt(Zt),en=x({},Zt,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:fn,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!==qt&&(qt&&"mousemove"===e.type?(Gt=e.screenX-qt.screenX,$t=e.screenY-qt.screenY):$t=Gt=0,qt=e),Gt)},movementY:function(e){return"movementY"in e?e.movementY:$t}}),tn=jt(en),nn=jt(x({},en,{dataTransfer:0})),rn=jt(x({},Zt,{relatedTarget:0})),an=jt(x({},Qt,{animationName:0,elapsedTime:0,pseudoElement:0})),on=jt(x({},Qt,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),ln=jt(x({},Qt,{data:0})),sn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},un={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"},cn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function dn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=cn[e])&&!!t[e]}function fn(){return dn}var hn=jt(x({},Zt,{key:function(e){if(e.key){var t=sn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Yt(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?un[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:fn,charCode:function(e){return"keypress"===e.type?Yt(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Yt(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),pn=jt(x({},en,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),gn=jt(x({},Zt,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:fn})),mn=jt(x({},Qt,{propertyName:0,elapsedTime:0,pseudoElement:0})),bn=jt(x({},en,{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})),vn=jt(x({},Qt,{newState:0,oldState:0})),yn=[9,13,27,32],Tn=tt&&"CompositionEvent"in window,_n=null;tt&&"documentMode"in document&&(_n=document.documentMode);var En=tt&&"TextEvent"in window&&!_n,wn=tt&&(!Tn||_n&&8<_n&&11>=_n),Sn=String.fromCharCode(32),Ln=!1;function On(e,t){switch(e){case"keyup":return-1!==yn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Nn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var An=!1,Rn={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 xn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Rn[e.type]:"textarea"===t}function kn(e,t,n,r){kt?Ct?Ct.push(r):Ct=[r]:kt=r,0<(t=Ic(t,"onChange")).length&&(n=new Jt("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Cn=null,Dn=null;function Mn(e){Nc(e,0)}function In(e){if(dt($e(e)))return e}function Bn(e,t){if("change"===e)return t}var Pn=!1;if(tt){var zn;if(tt){var Un="oninput"in document;if(!Un){var Fn=document.createElement("div");Fn.setAttribute("oninput","return;"),Un="function"==typeof Fn.oninput}zn=Un}else zn=!1;Pn=zn&&(!document.documentMode||9<document.documentMode)}function Wn(){Cn&&(Cn.detachEvent("onpropertychange",Hn),Dn=Cn=null)}function Hn(e){if("value"===e.propertyName&&In(Dn)){var t=[];kn(t,Dn,e,xt(e)),It(Mn,t)}}function Yn(e,t,n){"focusin"===e?(Wn(),Dn=n,(Cn=t).attachEvent("onpropertychange",Hn)):"focusout"===e&&Wn()}function Xn(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return In(Dn)}function Vn(e,t){if("click"===e)return In(t)}function jn(e,t){if("input"===e||"change"===e)return In(t)}var Gn="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function $n(e,t){if(Gn(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!ne.call(t,i)||!Gn(e[i],t[i]))return!1}return!0}function qn(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Qn(e,t){var n,r=qn(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=qn(r)}}function Jn(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?Jn(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function Zn(e){for(var t=ft((e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window).document);t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=ft((e=t.contentWindow).document)}return t}function Kn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function er(e,t){var n=Zn(t);t=e.focusedElem;var r=e.selectionRange;if(n!==t&&t&&t.ownerDocument&&Jn(t.ownerDocument.documentElement,t)){if(null!==r&&Kn(t))if(e=r.start,void 0===(n=r.end)&&(n=e),"selectionStart"in t)t.selectionStart=e,t.selectionEnd=Math.min(n,t.value.length);else if((n=(e=t.ownerDocument||document)&&e.defaultView||window).getSelection){n=n.getSelection();var i=t.textContent.length,a=Math.min(r.start,i);r=void 0===r.end?a:Math.min(r.end,i),!n.extend&&a>r&&(i=r,r=a,a=i),i=Qn(t,a);var o=Qn(t,r);i&&o&&(1!==n.rangeCount||n.anchorNode!==i.node||n.anchorOffset!==i.offset||n.focusNode!==o.node||n.focusOffset!==o.offset)&&((e=e.createRange()).setStart(i.node,i.offset),n.removeAllRanges(),a>r?(n.addRange(e),n.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),n.addRange(e)))}for(e=[],n=t;n=n.parentNode;)1===n.nodeType&&e.push({element:n,left:n.scrollLeft,top:n.scrollTop});for("function"==typeof t.focus&&t.focus(),t=0;t<e.length;t++)(n=e[t]).element.scrollLeft=n.left,n.element.scrollTop=n.top}}var tr=tt&&"documentMode"in document&&11>=document.documentMode,nr=null,rr=null,ir=null,ar=!1;function or(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;ar||null==nr||nr!==ft(r)||(r="selectionStart"in(r=nr)&&Kn(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},ir&&$n(ir,r)||(ir=r,0<(r=Ic(rr,"onSelect")).length&&(t=new Jt("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=nr)))}function lr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var sr={animationend:lr("Animation","AnimationEnd"),animationiteration:lr("Animation","AnimationIteration"),animationstart:lr("Animation","AnimationStart"),transitionrun:lr("Transition","TransitionRun"),transitionstart:lr("Transition","TransitionStart"),transitioncancel:lr("Transition","TransitionCancel"),transitionend:lr("Transition","TransitionEnd")},ur={},cr={};function dr(e){if(ur[e])return ur[e];if(!sr[e])return e;var t,n=sr[e];for(t in n)if(n.hasOwnProperty(t)&&t in cr)return ur[e]=n[t];return e}tt&&(cr=document.createElement("div").style,"AnimationEvent"in window||(delete sr.animationend.animation,delete sr.animationiteration.animation,delete sr.animationstart.animation),"TransitionEvent"in window||delete sr.transitionend.transition);var fr=dr("animationend"),hr=dr("animationiteration"),pr=dr("animationstart"),gr=dr("transitionrun"),mr=dr("transitionstart"),br=dr("transitioncancel"),vr=dr("transitionend"),yr=new Map,Tr="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll scrollEnd toggle touchMove waiting wheel".split(" ");function _r(e,t){yr.set(e,t),Ke(t,[e])}var Er=[],wr=0,Sr=0;function Lr(){for(var e=wr,t=Sr=wr=0;t<e;){var n=Er[t];Er[t++]=null;var r=Er[t];Er[t++]=null;var i=Er[t];Er[t++]=null;var a=Er[t];if(Er[t++]=null,null!==r&&null!==i){var o=r.pending;null===o?i.next=i:(i.next=o.next,o.next=i),r.pending=i}0!==a&&Rr(n,i,a)}}function Or(e,t,n,r){Er[wr++]=e,Er[wr++]=t,Er[wr++]=n,Er[wr++]=r,Sr|=r,e.lanes|=r,null!==(e=e.alternate)&&(e.lanes|=r)}function Nr(e,t,n,r){return Or(e,t,n,r),xr(e)}function Ar(e,t){return Or(e,null,null,t),xr(e)}function Rr(e,t,n){e.lanes|=n;var r=e.alternate;null!==r&&(r.lanes|=n);for(var i=!1,a=e.return;null!==a;)a.childLanes|=n,null!==(r=a.alternate)&&(r.childLanes|=n),22===a.tag&&(null===(e=a.stateNode)||1&e._visibility||(i=!0)),e=a,a=a.return;i&&null!==t&&3===e.tag&&(a=e.stateNode,i=31-ye(n),null===(e=(a=a.hiddenUpdates)[i])?a[i]=[t]:e.push(t),t.lane=536870912|n)}function xr(e){if(50<Nu)throw Nu=0,Au=null,Error(o(185));for(var t=e.return;null!==t;)t=(e=t).return;return 3===e.tag?e.stateNode:null}var kr={},Cr=new WeakMap;function Dr(e,t){if("object"==typeof e&&null!==e){var n=Cr.get(e);return void 0!==n?n:(t={value:e,source:t,stack:I(t)},Cr.set(e,t),t)}return{value:e,source:t,stack:I(t)}}var Mr=[],Ir=0,Br=null,Pr=0,zr=[],Ur=0,Fr=null,Wr=1,Hr="";function Yr(e,t){Mr[Ir++]=Pr,Mr[Ir++]=Br,Br=e,Pr=t}function Xr(e,t,n){zr[Ur++]=Wr,zr[Ur++]=Hr,zr[Ur++]=Fr,Fr=e;var r=Wr;e=Hr;var i=32-ye(r)-1;r&=~(1<<i),n+=1;var a=32-ye(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Wr=1<<32-ye(t)+i|n<<i|r,Hr=a+e}else Wr=1<<a|n<<i|r,Hr=e}function Vr(e){null!==e.return&&(Yr(e,1),Xr(e,1,0))}function jr(e){for(;e===Br;)Br=Mr[--Ir],Mr[Ir]=null,Pr=Mr[--Ir],Mr[Ir]=null;for(;e===Fr;)Fr=zr[--Ur],zr[Ur]=null,Hr=zr[--Ur],zr[Ur]=null,Wr=zr[--Ur],zr[Ur]=null}var Gr=null,$r=null,qr=!1,Qr=null,Jr=!1,Zr=Error(o(519));function Kr(e){throw ii(Dr(Error(o(418,"")),e)),Zr}function ei(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Pe]=e,t[ze]=r,n){case"dialog":Ac("cancel",t),Ac("close",t);break;case"iframe":case"object":case"embed":Ac("load",t);break;case"video":case"audio":for(n=0;n<Lc.length;n++)Ac(Lc[n],t);break;case"source":Ac("error",t);break;case"img":case"image":case"link":Ac("error",t),Ac("load",t);break;case"details":Ac("toggle",t);break;case"input":Ac("invalid",t),mt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0),ct(t);break;case"select":Ac("invalid",t);break;case"textarea":Ac("invalid",t),Tt(t,r.value,r.defaultValue,r.children),ct(t)}"string"!=typeof(n=r.children)&&"number"!=typeof n&&"bigint"!=typeof n||t.textContent===""+n||!0===r.suppressHydrationWarning||Wc(t.textContent,n)?(null!=r.popover&&(Ac("beforetoggle",t),Ac("toggle",t)),null!=r.onScroll&&Ac("scroll",t),null!=r.onScrollEnd&&Ac("scrollend",t),null!=r.onClick&&(t.onclick=Hc),t=!0):t=!1,t||Kr(e)}function ti(e){for(Gr=e.return;Gr;)switch(Gr.tag){case 3:case 27:return void(Jr=!0);case 5:case 13:return void(Jr=!1);default:Gr=Gr.return}}function ni(e){if(e!==Gr)return!1;if(!qr)return ti(e),qr=!0,!1;var t,n=!1;if((t=3!==e.tag&&27!==e.tag)&&((t=5===e.tag)&&(t=!("form"!==(t=e.type)&&"button"!==t)||Jc(e.type,e.memoizedProps)),t=!t),t&&(n=!0),n&&$r&&Kr(e),ti(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));e:{for(e=e.nextSibling,n=0;e;){if(8===e.nodeType)if("/$"===(t=e.data)){if(0===n){$r=od(e.nextSibling);break e}n--}else"$"!==t&&"$!"!==t&&"$?"!==t||n++;e=e.nextSibling}$r=null}}else $r=Gr?od(e.stateNode.nextSibling):null;return!0}function ri(){$r=Gr=null,qr=!1}function ii(e){null===Qr?Qr=[e]:Qr.push(e)}var ai=Error(o(460)),oi=Error(o(474)),li={then:function(){}};function si(e){return"fulfilled"===(e=e.status)||"rejected"===e}function ui(){}function ci(e,t,n){switch(void 0===(n=e[n])?e.push(t):n!==t&&(t.then(ui,ui),t=n),t.status){case"fulfilled":return t.value;case"rejected":if((e=t.reason)===ai)throw Error(o(483));throw e;default:if("string"==typeof t.status)t.then(ui,ui);else{if(null!==(e=eu)&&100<e.shellSuspendCounter)throw Error(o(482));(e=t).status="pending",e.then((function(e){if("pending"===t.status){var n=t;n.status="fulfilled",n.value=e}}),(function(e){if("pending"===t.status){var n=t;n.status="rejected",n.reason=e}}))}switch(t.status){case"fulfilled":return t.value;case"rejected":if((e=t.reason)===ai)throw Error(o(483));throw e}throw di=t,ai}}var di=null;function fi(){if(null===di)throw Error(o(459));var e=di;return di=null,e}var hi=null,pi=0;function gi(e){var t=pi;return pi+=1,null===hi&&(hi=[]),ci(hi,e,t)}function mi(e,t){t=t.props.ref,e.ref=void 0!==t?t:null}function bi(e,t){if(t.$$typeof===l)throw Error(o(525));throw e=Object.prototype.toString.call(t),Error(o(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function vi(e){return(0,e._init)(e._payload)}function yi(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function i(e,t){return(e=Bs(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=33554434,n):r:(t.flags|=33554434,n):(t.flags|=1048576,n)}function l(t){return e&&null===t.alternate&&(t.flags|=33554434),t}function d(e,t,n,r){return null===t||6!==t.tag?((t=Ws(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function f(e,t,n,r){var a=n.type;return a===c?p(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===a||"object"==typeof a&&null!==a&&a.$$typeof===T&&vi(a)===t.type)?(mi(t=i(t,n.props),n),t.return=e,t):(mi(t=zs(n.type,n.key,n.props,null,e.mode,r),n),t.return=e,t)}function h(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Hs(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function p(e,t,n,r,a){return null===t||7!==t.tag?((t=Us(n,e.mode,r,a)).return=e,t):((t=i(t,n)).return=e,t)}function m(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t||"bigint"==typeof t)return(t=Ws(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case s:return mi(n=zs(t.type,t.key,t.props,null,e.mode,n),t),n.return=e,n;case u:return(t=Hs(t,e.mode,n)).return=e,t;case T:return m(e,t=(0,t._init)(t._payload),n)}if(F(t)||S(t))return(t=Us(t,e.mode,n,null)).return=e,t;if("function"==typeof t.then)return m(e,gi(t),n);if(t.$$typeof===g)return m(e,Ll(e,t),n);bi(e,t)}return null}function b(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n||"bigint"==typeof n)return null!==i?null:d(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case s:return n.key===i?f(e,t,n,r):null;case u:return n.key===i?h(e,t,n,r):null;case T:return b(e,t,n=(i=n._init)(n._payload),r)}if(F(n)||S(n))return null!==i?null:p(e,t,n,r,null);if("function"==typeof n.then)return b(e,t,gi(n),r);if(n.$$typeof===g)return b(e,t,Ll(e,n),r);bi(e,n)}return null}function v(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r||"bigint"==typeof r)return d(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case s:return f(t,e=e.get(null===r.key?n:r.key)||null,r,i);case u:return h(t,e=e.get(null===r.key?n:r.key)||null,r,i);case T:return v(e,t,n,r=(0,r._init)(r._payload),i)}if(F(r)||S(r))return p(t,e=e.get(n)||null,r,i,null);if("function"==typeof r.then)return v(e,t,n,gi(r),i);if(r.$$typeof===g)return v(e,t,n,Ll(t,r),i);bi(t,r)}return null}function y(d,f,h,p){if("object"==typeof h&&null!==h&&h.type===c&&null===h.key&&(h=h.props.children),"object"==typeof h&&null!==h){switch(h.$$typeof){case s:e:{for(var _=h.key;null!==f;){if(f.key===_){if((_=h.type)===c){if(7===f.tag){n(d,f.sibling),(p=i(f,h.props.children)).return=d,d=p;break e}}else if(f.elementType===_||"object"==typeof _&&null!==_&&_.$$typeof===T&&vi(_)===f.type){n(d,f.sibling),mi(p=i(f,h.props),h),p.return=d,d=p;break e}n(d,f);break}t(d,f),f=f.sibling}h.type===c?((p=Us(h.props.children,d.mode,p,h.key)).return=d,d=p):(mi(p=zs(h.type,h.key,h.props,null,d.mode,p),h),p.return=d,d=p)}return l(d);case u:e:{for(_=h.key;null!==f;){if(f.key===_){if(4===f.tag&&f.stateNode.containerInfo===h.containerInfo&&f.stateNode.implementation===h.implementation){n(d,f.sibling),(p=i(f,h.children||[])).return=d,d=p;break e}n(d,f);break}t(d,f),f=f.sibling}(p=Hs(h,d.mode,p)).return=d,d=p}return l(d);case T:return y(d,f,h=(_=h._init)(h._payload),p)}if(F(h))return function(i,o,l,s){for(var u=null,c=null,d=o,f=o=0,h=null;null!==d&&f<l.length;f++){d.index>f?(h=d,d=null):h=d.sibling;var p=b(i,d,l[f],s);if(null===p){null===d&&(d=h);break}e&&d&&null===p.alternate&&t(i,d),o=a(p,o,f),null===c?u=p:c.sibling=p,c=p,d=h}if(f===l.length)return n(i,d),qr&&Yr(i,f),u;if(null===d){for(;f<l.length;f++)null!==(d=m(i,l[f],s))&&(o=a(d,o,f),null===c?u=d:c.sibling=d,c=d);return qr&&Yr(i,f),u}for(d=r(d);f<l.length;f++)null!==(h=v(d,i,f,l[f],s))&&(e&&null!==h.alternate&&d.delete(null===h.key?f:h.key),o=a(h,o,f),null===c?u=h:c.sibling=h,c=h);return e&&d.forEach((function(e){return t(i,e)})),qr&&Yr(i,f),u}(d,f,h,p);if(S(h)){if("function"!=typeof(_=S(h)))throw Error(o(150));return function(i,l,s,u){if(null==s)throw Error(o(151));for(var c=null,d=null,f=l,h=l=0,p=null,g=s.next();null!==f&&!g.done;h++,g=s.next()){f.index>h?(p=f,f=null):p=f.sibling;var y=b(i,f,g.value,u);if(null===y){null===f&&(f=p);break}e&&f&&null===y.alternate&&t(i,f),l=a(y,l,h),null===d?c=y:d.sibling=y,d=y,f=p}if(g.done)return n(i,f),qr&&Yr(i,h),c;if(null===f){for(;!g.done;h++,g=s.next())null!==(g=m(i,g.value,u))&&(l=a(g,l,h),null===d?c=g:d.sibling=g,d=g);return qr&&Yr(i,h),c}for(f=r(f);!g.done;h++,g=s.next())null!==(g=v(f,i,h,g.value,u))&&(e&&null!==g.alternate&&f.delete(null===g.key?h:g.key),l=a(g,l,h),null===d?c=g:d.sibling=g,d=g);return e&&f.forEach((function(e){return t(i,e)})),qr&&Yr(i,h),c}(d,f,h=_.call(h),p)}if("function"==typeof h.then)return y(d,f,gi(h),p);if(h.$$typeof===g)return y(d,f,Ll(d,h),p);bi(d,h)}return"string"==typeof h&&""!==h||"number"==typeof h||"bigint"==typeof h?(h=""+h,null!==f&&6===f.tag?(n(d,f.sibling),(p=i(f,h)).return=d,d=p):(n(d,f),(p=Ws(h,d.mode,p)).return=d,d=p),l(d)):n(d,f)}return function(e,t,n,r){try{pi=0;var i=y(e,t,n,r);return hi=null,i}catch(t){if(t===ai)throw t;var a=Ms(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ti=yi(!0),_i=yi(!1),Ei=V(null),wi=V(0);function Si(e,t){G(wi,e=su),G(Ei,t),su=e|t.baseLanes}function Li(){G(wi,su),G(Ei,Ei.current)}function Oi(){su=wi.current,j(Ei),j(wi)}var Ni=V(null),Ai=null;function Ri(e){var t=e.alternate;G(Di,1&Di.current),G(Ni,e),null===Ai&&(null===t||null!==Ei.current||null!==t.memoizedState)&&(Ai=e)}function xi(e){if(22===e.tag){if(G(Di,Di.current),G(Ni,e),null===Ai){var t=e.alternate;null!==t&&null!==t.memoizedState&&(Ai=e)}}else ki()}function ki(){G(Di,Di.current),G(Ni,Ni.current)}function Ci(e){j(Ni),Ai===e&&(Ai=null),j(Di)}var Di=V(0);function Mi(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ii="undefined"!=typeof AbortController?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach((function(e){return e()}))}},Bi=r.unstable_scheduleCallback,Pi=r.unstable_NormalPriority,zi={$$typeof:g,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ui(){return{controller:new Ii,data:new Map,refCount:0}}function Fi(e){e.refCount--,0===e.refCount&&Bi(Pi,(function(){e.controller.abort()}))}var Wi=null,Hi=0,Yi=0,Xi=null;function Vi(){if(0==--Hi&&null!==Wi){null!==Xi&&(Xi.status="fulfilled");var e=Wi;Wi=null,Yi=0,Xi=null;for(var t=0;t<e.length;t++)(0,e[t])()}}var ji=R.S;R.S=function(e,t){"object"==typeof t&&null!==t&&"function"==typeof t.then&&function(e,t){if(null===Wi){var n=Wi=[];Hi=0,Yi=Tc(),Xi={status:"pending",value:void 0,then:function(e){n.push(e)}}}Hi++,t.then(Vi,Vi)}(0,t),null!==ji&&ji(e,t)};var Gi=V(null);function $i(){var e=Gi.current;return null!==e?e:eu.pooledCache}function qi(e,t){G(Gi,null===t?Gi.current:t.pool)}function Qi(){var e=$i();return null===e?null:{parent:zi._currentValue,pool:e}}var Ji=0,Zi=null,Ki=null,ea=null,ta=!1,na=!1,ra=!1,ia=0,aa=0,oa=null,la=0;function sa(){throw Error(o(321))}function ua(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Gn(e[n],t[n]))return!1;return!0}function ca(e,t,n,r,i,a){return Ji=a,Zi=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,R.H=null===e||null===e.memoizedState?Lo:Oo,ra=!1,a=n(r,i),ra=!1,na&&(a=fa(t,n,r,i)),da(e),a}function da(e){R.H=So;var t=null!==Ki&&null!==Ki.next;if(Ji=0,ea=Ki=Zi=null,ta=!1,aa=0,oa=null,t)throw Error(o(300));null===e||Yo||null!==(e=e.dependencies)&&El(e)&&(Yo=!0)}function fa(e,t,n,r){Zi=e;var i=0;do{if(na&&(oa=null),aa=0,na=!1,25<=i)throw Error(o(301));if(i+=1,ea=Ki=null,null!=e.updateQueue){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,null!=a.memoCache&&(a.memoCache.index=0)}R.H=No,a=t(n,r)}while(na);return a}function ha(){var e=R.H,t=e.useState()[0];return t="function"==typeof t.then?ya(t):t,e=e.useState()[0],(null!==Ki?Ki.memoizedState:null)!==e&&(Zi.flags|=1024),t}function pa(){var e=0!==ia;return ia=0,e}function ga(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ma(e){if(ta){for(e=e.memoizedState;null!==e;){var t=e.queue;null!==t&&(t.pending=null),e=e.next}ta=!1}Ji=0,ea=Ki=Zi=null,na=!1,aa=ia=0,oa=null}function ba(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ea?Zi.memoizedState=ea=e:ea=ea.next=e,ea}function va(){if(null===Ki){var e=Zi.alternate;e=null!==e?e.memoizedState:null}else e=Ki.next;var t=null===ea?Zi.memoizedState:ea.next;if(null!==t)ea=t,Ki=e;else{if(null===e){if(null===Zi.alternate)throw Error(o(467));throw Error(o(310))}e={memoizedState:(Ki=e).memoizedState,baseState:Ki.baseState,baseQueue:Ki.baseQueue,queue:Ki.queue,next:null},null===ea?Zi.memoizedState=ea=e:ea=ea.next=e}return ea}function ya(e){var t=aa;return aa+=1,null===oa&&(oa=[]),e=ci(oa,e,t),t=Zi,null===(null===ea?t.memoizedState:ea.next)&&(t=t.alternate,R.H=null===t||null===t.memoizedState?Lo:Oo),e}function Ta(e){if(null!==e&&"object"==typeof e){if("function"==typeof e.then)return ya(e);if(e.$$typeof===g)return Sl(e)}throw Error(o(438,String(e)))}function _a(e){var t=null,n=Zi.updateQueue;if(null!==n&&(t=n.memoCache),null==t){var r=Zi.alternate;null!==r&&null!==(r=r.updateQueue)&&null!=(r=r.memoCache)&&(t={data:r.data.map((function(e){return e.slice()})),index:0})}if(null==t&&(t={data:[],index:0}),null===n&&(n={lastEffect:null,events:null,stores:null,memoCache:null},Zi.updateQueue=n),n.memoCache=t,void 0===(n=t.data[t.index]))for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=E;return t.index++,n}function Ea(e,t){return"function"==typeof t?t(e):t}function wa(e){return Sa(va(),Ki,e)}function Sa(e,t,n){var r=e.queue;if(null===r)throw Error(o(311));r.lastRenderedReducer=n;var i=e.baseQueue,a=r.pending;if(null!==a){if(null!==i){var l=i.next;i.next=a.next,a.next=l}t.baseQueue=i=a,r.pending=null}if(a=e.baseState,null===i)e.memoizedState=a;else{var s=l=null,u=null,c=t=i.next,d=!1;do{var f=-536870913&c.lane;if(f!==c.lane?(nu&f)===f:(Ji&f)===f){var h=c.revertLane;if(0===h)null!==u&&(u=u.next={lane:0,revertLane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),f===Yi&&(d=!0);else{if((Ji&h)===h){c=c.next,h===Yi&&(d=!0);continue}f={lane:0,revertLane:c.revertLane,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},null===u?(s=u=f,l=a):u=u.next=f,Zi.lanes|=h,cu|=h}f=c.action,ra&&n(a,f),a=c.hasEagerState?c.eagerState:n(a,f)}else h={lane:f,revertLane:c.revertLane,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},null===u?(s=u=h,l=a):u=u.next=h,Zi.lanes|=f,cu|=f;c=c.next}while(null!==c&&c!==t);if(null===u?l=a:u.next=s,!Gn(a,e.memoizedState)&&(Yo=!0,d&&null!==(n=Xi)))throw n;e.memoizedState=a,e.baseState=l,e.baseQueue=u,r.lastRenderedState=a}return null===i&&(r.lanes=0),[e.memoizedState,r.dispatch]}function La(e){var t=va(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(null!==i){n.pending=null;var l=i=i.next;do{a=e(a,l.action),l=l.next}while(l!==i);Gn(a,t.memoizedState)||(Yo=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function Oa(e,t,n){var r=Zi,i=va(),a=qr;if(a){if(void 0===n)throw Error(o(407));n=n()}else n=t();var l=!Gn((Ki||i).memoizedState,n);if(l&&(i.memoizedState=n,Yo=!0),i=i.queue,Ja(Ra.bind(null,r,i,e),[e]),i.getSnapshot!==t||l||null!==ea&&1&ea.memoizedState.tag){if(r.flags|=2048,ja(9,Aa.bind(null,r,i,n,t),{destroy:void 0},null),null===eu)throw Error(o(349));a||60&Ji||Na(r,t,n)}return n}function Na(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=Zi.updateQueue)?(t={lastEffect:null,events:null,stores:null,memoCache:null},Zi.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Aa(e,t,n,r){t.value=n,t.getSnapshot=r,xa(t)&&ka(e)}function Ra(e,t,n){return n((function(){xa(t)&&ka(e)}))}function xa(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Gn(e,n)}catch(e){return!0}}function ka(e){var t=Ar(e,2);null!==t&&ku(t,0,2)}function Ca(e){var t=ba();if("function"==typeof e){var n=e;if(e=n(),ra){ve(!0);try{n()}finally{ve(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ea,lastRenderedState:e},t}function Da(e,t,n,r){return e.baseState=n,Sa(e,Ki,"function"==typeof r?r:Ea)}function Ma(e,t,n,r,i){if(_o(e))throw Error(o(485));if(null!==(e=t.action)){var a={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(e){a.listeners.push(e)}};null!==R.T?n(!0):a.isTransition=!1,r(a),null===(n=t.pending)?(a.next=t.pending=a,Ia(t,a)):(a.next=n.next,t.pending=n.next=a)}}function Ia(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=R.T,o={};R.T=o;try{var l=n(i,r),s=R.S;null!==s&&s(o,l),Ba(e,t,l)}catch(n){za(e,t,n)}finally{R.T=a}}else try{Ba(e,t,a=n(i,r))}catch(n){za(e,t,n)}}function Ba(e,t,n){null!==n&&"object"==typeof n&&"function"==typeof n.then?n.then((function(n){Pa(e,t,n)}),(function(n){return za(e,t,n)})):Pa(e,t,n)}function Pa(e,t,n){t.status="fulfilled",t.value=n,Ua(t),e.state=n,null!==(t=e.pending)&&((n=t.next)===t?e.pending=null:(n=n.next,t.next=n,Ia(e,n)))}function za(e,t,n){var r=e.pending;if(e.pending=null,null!==r){r=r.next;do{t.status="rejected",t.reason=n,Ua(t),t=t.next}while(t!==r)}e.action=null}function Ua(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Fa(e,t){return t}function Wa(e,t){if(qr){var n=eu.formState;if(null!==n){e:{var r=Zi;if(qr){if($r){t:{for(var i=$r,a=Jr;8!==i.nodeType;){if(!a){i=null;break t}if(null===(i=od(i.nextSibling))){i=null;break t}}i="F!"===(a=i.data)||"F"===a?i:null}if(i){$r=od(i.nextSibling),r="F!"===i.data;break e}}Kr(r)}r=!1}r&&(t=n[0])}}return(n=ba()).memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fa,lastRenderedState:t},n.queue=r,n=vo.bind(null,Zi,r),r.dispatch=n,r=Ca(!1),a=To.bind(null,Zi,!1,r.queue),i={state:t,dispatch:null,action:e,pending:null},(r=ba()).queue=i,n=Ma.bind(null,Zi,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Ha(e){return Ya(va(),Ki,e)}function Ya(e,t,n){t=Sa(e,t,Fa)[0],e=wa(Ea)[0],t="object"==typeof t&&null!==t&&"function"==typeof t.then?ya(t):t;var r=va(),i=r.queue,a=i.dispatch;return n!==r.memoizedState&&(Zi.flags|=2048,ja(9,Xa.bind(null,i,n),{destroy:void 0},null)),[t,a,e]}function Xa(e,t){e.action=t}function Va(e){var t=va(),n=Ki;if(null!==n)return Ya(t,n,e);va(),t=t.memoizedState;var r=(n=va()).queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ja(e,t,n,r){return e={tag:e,create:t,inst:n,deps:r,next:null},null===(t=Zi.updateQueue)&&(t={lastEffect:null,events:null,stores:null,memoCache:null},Zi.updateQueue=t),null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Ga(){return va().memoizedState}function $a(e,t,n,r){var i=ba();Zi.flags|=e,i.memoizedState=ja(1|t,n,{destroy:void 0},void 0===r?null:r)}function qa(e,t,n,r){var i=va();r=void 0===r?null:r;var a=i.memoizedState.inst;null!==Ki&&null!==r&&ua(r,Ki.memoizedState.deps)?i.memoizedState=ja(t,n,a,r):(Zi.flags|=e,i.memoizedState=ja(1|t,n,a,r))}function Qa(e,t){$a(8390656,8,e,t)}function Ja(e,t){qa(2048,8,e,t)}function Za(e,t){return qa(4,2,e,t)}function Ka(e,t){return qa(4,4,e,t)}function eo(e,t){if("function"==typeof t){e=e();var n=t(e);return function(){"function"==typeof n?n():t(null)}}if(null!=t)return e=e(),t.current=e,function(){t.current=null}}function to(e,t,n){n=null!=n?n.concat([e]):null,qa(4,4,eo.bind(null,t,e),n)}function no(){}function ro(e,t){var n=va();t=void 0===t?null:t;var r=n.memoizedState;return null!==t&&ua(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function io(e,t){var n=va();t=void 0===t?null:t;var r=n.memoizedState;if(null!==t&&ua(t,r[1]))return r[0];if(r=e(),ra){ve(!0);try{e()}finally{ve(!1)}}return n.memoizedState=[r,t],r}function ao(e,t,n){return void 0===n||1073741824&Ji?e.memoizedState=t:(e.memoizedState=n,e=xu(),Zi.lanes|=e,cu|=e,n)}function oo(e,t,n,r){return Gn(n,t)?n:null!==Ei.current?(e=ao(e,n,r),Gn(e,t)||(Yo=!0),e):42&Ji?(e=xu(),Zi.lanes|=e,cu|=e,t):(Yo=!0,e.memoizedState=n)}function lo(e,t,n,r,i){var a=W.p;W.p=0!==a&&8>a?a:8;var o,l,s,u=R.T,c={};R.T=c,To(e,!1,t,n);try{var d=i(),f=R.S;null!==f&&f(c,d),null!==d&&"object"==typeof d&&"function"==typeof d.then?yo(e,t,(o=r,l=[],s={status:"pending",value:null,reason:null,then:function(e){l.push(e)}},d.then((function(){s.status="fulfilled",s.value=o;for(var e=0;e<l.length;e++)(0,l[e])(o)}),(function(e){for(s.status="rejected",s.reason=e,e=0;e<l.length;e++)(0,l[e])(void 0)})),s),Ru()):yo(e,t,r,Ru())}catch(n){yo(e,t,{then:function(){},status:"rejected",reason:n},Ru())}finally{W.p=a,R.T=u}}function so(){}function uo(e,t,n,r){if(5!==e.tag)throw Error(o(476));var i=co(e).queue;lo(e,i,t,H,null===n?so:function(){return fo(e),n(r)})}function co(e){var t=e.memoizedState;if(null!==t)return t;var n={};return(t={memoizedState:H,baseState:H,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ea,lastRenderedState:H},next:null}).next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ea,lastRenderedState:n},next:null},e.memoizedState=t,null!==(e=e.alternate)&&(e.memoizedState=t),t}function fo(e){yo(e,co(e).next.queue,{},Ru())}function ho(){return Sl(Id)}function po(){return va().memoizedState}function go(){return va().memoizedState}function mo(e){for(var t=e.return;null!==t;){switch(t.tag){case 24:case 3:var n=Ru(),r=kl(t,e=xl(n),n);return null!==r&&(ku(r,0,n),Cl(r,t,n)),t={cache:Ui()},void(e.payload=t)}t=t.return}}function bo(e,t,n){var r=Ru();n={lane:r,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},_o(e)?Eo(t,n):null!==(n=Nr(e,t,n,r))&&(ku(n,0,r),wo(n,t,r))}function vo(e,t,n){yo(e,t,n,Ru())}function yo(e,t,n,r){var i={lane:r,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if(_o(e))Eo(t,i);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var o=t.lastRenderedState,l=a(o,n);if(i.hasEagerState=!0,i.eagerState=l,Gn(l,o))return Or(e,t,i,0),null===eu&&Lr(),!1}catch(e){}if(null!==(n=Nr(e,t,i,r)))return ku(n,0,r),wo(n,t,r),!0}return!1}function To(e,t,n,r){if(r={lane:2,revertLane:Tc(),action:r,hasEagerState:!1,eagerState:null,next:null},_o(e)){if(t)throw Error(o(479))}else null!==(t=Nr(e,n,r,2))&&ku(t,0,2)}function _o(e){var t=e.alternate;return e===Zi||null!==t&&t===Zi}function Eo(e,t){na=ta=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function wo(e,t,n){if(4194176&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,De(e,n)}}var So={readContext:Sl,use:Ta,useCallback:sa,useContext:sa,useEffect:sa,useImperativeHandle:sa,useLayoutEffect:sa,useInsertionEffect:sa,useMemo:sa,useReducer:sa,useRef:sa,useState:sa,useDebugValue:sa,useDeferredValue:sa,useTransition:sa,useSyncExternalStore:sa,useId:sa};So.useCacheRefresh=sa,So.useMemoCache=sa,So.useHostTransitionStatus=sa,So.useFormState=sa,So.useActionState=sa,So.useOptimistic=sa;var Lo={readContext:Sl,use:Ta,useCallback:function(e,t){return ba().memoizedState=[e,void 0===t?null:t],e},useContext:Sl,useEffect:Qa,useImperativeHandle:function(e,t,n){n=null!=n?n.concat([e]):null,$a(4194308,4,eo.bind(null,t,e),n)},useLayoutEffect:function(e,t){return $a(4194308,4,e,t)},useInsertionEffect:function(e,t){$a(4,2,e,t)},useMemo:function(e,t){var n=ba();t=void 0===t?null:t;var r=e();if(ra){ve(!0);try{e()}finally{ve(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=ba();if(void 0!==n){var i=n(t);if(ra){ve(!0);try{n(t)}finally{ve(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=bo.bind(null,Zi,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},ba().memoizedState=e},useState:function(e){var t=(e=Ca(e)).queue,n=vo.bind(null,Zi,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:no,useDeferredValue:function(e,t){return ao(ba(),e,t)},useTransition:function(){var e=Ca(!1);return e=lo.bind(null,Zi,e.queue,!0,!1),ba().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=Zi,i=ba();if(qr){if(void 0===n)throw Error(o(407));n=n()}else{if(n=t(),null===eu)throw Error(o(349));60&nu||Na(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,Qa(Ra.bind(null,r,a,e),[e]),r.flags|=2048,ja(9,Aa.bind(null,r,a,n,t),{destroy:void 0},null),n},useId:function(){var e=ba(),t=eu.identifierPrefix;if(qr){var n=Hr;t=":"+t+"R"+(n=(Wr&~(1<<32-ye(Wr)-1)).toString(32)+n),0<(n=ia++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=la++).toString(32)+":";return e.memoizedState=t},useCacheRefresh:function(){return ba().memoizedState=mo.bind(null,Zi)}};Lo.useMemoCache=_a,Lo.useHostTransitionStatus=ho,Lo.useFormState=Wa,Lo.useActionState=Wa,Lo.useOptimistic=function(e){var t=ba();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=To.bind(null,Zi,!0,n),n.dispatch=t,[e,t]};var Oo={readContext:Sl,use:Ta,useCallback:ro,useContext:Sl,useEffect:Ja,useImperativeHandle:to,useInsertionEffect:Za,useLayoutEffect:Ka,useMemo:io,useReducer:wa,useRef:Ga,useState:function(){return wa(Ea)},useDebugValue:no,useDeferredValue:function(e,t){return oo(va(),Ki.memoizedState,e,t)},useTransition:function(){var e=wa(Ea)[0],t=va().memoizedState;return["boolean"==typeof e?e:ya(e),t]},useSyncExternalStore:Oa,useId:po};Oo.useCacheRefresh=go,Oo.useMemoCache=_a,Oo.useHostTransitionStatus=ho,Oo.useFormState=Ha,Oo.useActionState=Ha,Oo.useOptimistic=function(e,t){return Da(va(),0,e,t)};var No={readContext:Sl,use:Ta,useCallback:ro,useContext:Sl,useEffect:Ja,useImperativeHandle:to,useInsertionEffect:Za,useLayoutEffect:Ka,useMemo:io,useReducer:La,useRef:Ga,useState:function(){return La(Ea)},useDebugValue:no,useDeferredValue:function(e,t){var n=va();return null===Ki?ao(n,e,t):oo(n,Ki.memoizedState,e,t)},useTransition:function(){var e=La(Ea)[0],t=va().memoizedState;return["boolean"==typeof e?e:ya(e),t]},useSyncExternalStore:Oa,useId:po};function Ao(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:x({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}No.useCacheRefresh=go,No.useMemoCache=_a,No.useHostTransitionStatus=ho,No.useFormState=Va,No.useActionState=Va,No.useOptimistic=function(e,t){var n=va();return null!==Ki?Da(n,0,e,t):(n.baseState=e,[e,n.queue.dispatch])};var Ro={isMounted:function(e){return!!(e=e._reactInternals)&&B(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ru(),i=xl(r);i.payload=t,null!=n&&(i.callback=n),null!==(t=kl(e,i,r))&&(ku(t,0,r),Cl(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ru(),i=xl(r);i.tag=1,i.payload=t,null!=n&&(i.callback=n),null!==(t=kl(e,i,r))&&(ku(t,0,r),Cl(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ru(),r=xl(n);r.tag=2,null!=t&&(r.callback=t),null!==(t=kl(e,r,n))&&(ku(t,0,n),Cl(t,e,n))}};function xo(e,t,n,r,i,a,o){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,o):!(t.prototype&&t.prototype.isPureReactComponent&&$n(n,r)&&$n(i,a))}function ko(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ro.enqueueReplaceState(t,t.state,null)}function Co(e,t){var n=t;if("ref"in t)for(var r in n={},t)"ref"!==r&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=x({},n)),e)void 0===n[i]&&(n[i]=e[i]);return n}var Do="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)};function Mo(e){Do(e)}function Io(e){console.error(e)}function Bo(e){Do(e)}function Po(e,t){try{(0,e.onUncaughtError)(t.value,{componentStack:t.stack})}catch(e){setTimeout((function(){throw e}))}}function zo(e,t,n){try{(0,e.onCaughtError)(n.value,{componentStack:n.stack,errorBoundary:1===t.tag?t.stateNode:null})}catch(e){setTimeout((function(){throw e}))}}function Uo(e,t,n){return(n=xl(n)).tag=3,n.payload={element:null},n.callback=function(){Po(e,t)},n}function Fo(e){return(e=xl(e)).tag=3,e}function Wo(e,t,n,r){var i=n.type.getDerivedStateFromError;if("function"==typeof i){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){zo(t,n,r)}}var o=n.stateNode;null!==o&&"function"==typeof o.componentDidCatch&&(e.callback=function(){zo(t,n,r),"function"!=typeof i&&(null===_u?_u=new Set([this]):_u.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:null!==e?e:""})})}var Ho=Error(o(461)),Yo=!1;function Xo(e,t,n,r){t.child=null===e?_i(t,null,n,r):Ti(t,e.child,n,r)}function Vo(e,t,n,r,i){n=n.render;var a=t.ref;if("ref"in r){var o={};for(var l in r)"ref"!==l&&(o[l]=r[l])}else o=r;return wl(t),r=ca(e,t,n,o,a,i),l=pa(),null===e||Yo?(qr&&l&&Vr(t),t.flags|=1,Xo(e,t,r,i),t.child):(ga(e,t,i),dl(e,t,i))}function jo(e,t,n,r,i){if(null===e){var a=n.type;return"function"!=typeof a||Is(a)||void 0!==a.defaultProps||null!==n.compare?((e=zs(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Go(e,t,a,r,i))}if(a=e.child,!fl(e,i)){var o=a.memoizedProps;if((n=null!==(n=n.compare)?n:$n)(o,r)&&e.ref===t.ref)return dl(e,t,i)}return t.flags|=1,(e=Bs(a,r)).ref=t.ref,e.return=t,t.child=e}function Go(e,t,n,r,i){if(null!==e){var a=e.memoizedProps;if($n(a,r)&&e.ref===t.ref){if(Yo=!1,t.pendingProps=r=a,!fl(e,i))return t.lanes=e.lanes,dl(e,t,i);131072&e.flags&&(Yo=!0)}}return Jo(e,t,n,r,i)}function $o(e,t,n){var r=t.pendingProps,i=r.children,a=!!(2&t.stateNode._pendingVisibility),o=null!==e?e.memoizedState:null;if(Qo(e,t),"hidden"===r.mode||a){if(128&t.flags){if(r=null!==o?o.baseLanes|n:n,null!==e){for(i=t.child=e.child,a=0;null!==i;)a=a|i.lanes|i.childLanes,i=i.sibling;t.childLanes=a&~r}else t.childLanes=0,t.child=null;return qo(e,t,r,n)}if(!(536870912&n))return t.lanes=t.childLanes=536870912,qo(e,t,null!==o?o.baseLanes|n:n,n);t.memoizedState={baseLanes:0,cachePool:null},null!==e&&qi(0,null!==o?o.cachePool:null),null!==o?Si(t,o):Li(),xi(t)}else null!==o?(qi(0,o.cachePool),Si(t,o),ki(),t.memoizedState=null):(null!==e&&qi(0,null),Li(),ki());return Xo(e,t,i,n),t.child}function qo(e,t,n,r){var i=$i();return i=null===i?null:{parent:zi._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},null!==e&&qi(0,null),Li(),xi(t),null!==e&&_l(e,t,r,!0),null}function Qo(e,t){var n=t.ref;if(null===n)null!==e&&null!==e.ref&&(t.flags|=2097664);else{if("function"!=typeof n&&"object"!=typeof n)throw Error(o(284));null!==e&&e.ref===n||(t.flags|=2097664)}}function Jo(e,t,n,r,i){return wl(t),n=ca(e,t,n,r,void 0,i),r=pa(),null===e||Yo?(qr&&r&&Vr(t),t.flags|=1,Xo(e,t,n,i),t.child):(ga(e,t,i),dl(e,t,i))}function Zo(e,t,n,r,i,a){return wl(t),t.updateQueue=null,n=fa(t,r,n,i),da(e),r=pa(),null===e||Yo?(qr&&r&&Vr(t),t.flags|=1,Xo(e,t,n,a),t.child):(ga(e,t,a),dl(e,t,a))}function Ko(e,t,n,r,i){if(wl(t),null===t.stateNode){var a=kr,o=n.contextType;"object"==typeof o&&null!==o&&(a=Sl(o)),a=new n(r,a),t.memoizedState=null!==a.state&&void 0!==a.state?a.state:null,a.updater=Ro,t.stateNode=a,a._reactInternals=t,(a=t.stateNode).props=r,a.state=t.memoizedState,a.refs={},Al(t),o=n.contextType,a.context="object"==typeof o&&null!==o?Sl(o):kr,a.state=t.memoizedState,"function"==typeof(o=n.getDerivedStateFromProps)&&(Ao(t,n,o,r),a.state=t.memoizedState),"function"==typeof n.getDerivedStateFromProps||"function"==typeof a.getSnapshotBeforeUpdate||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||(o=a.state,"function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),o!==a.state&&Ro.enqueueReplaceState(a,a.state,null),Bl(t,r,a,i),Il(),a.state=t.memoizedState),"function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!0}else if(null===e){a=t.stateNode;var l=t.memoizedProps,s=Co(n,l);a.props=s;var u=a.context,c=n.contextType;o=kr,"object"==typeof c&&null!==c&&(o=Sl(c));var d=n.getDerivedStateFromProps;c="function"==typeof d||"function"==typeof a.getSnapshotBeforeUpdate,l=t.pendingProps!==l,c||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(l||u!==o)&&ko(t,a,r,o),Nl=!1;var f=t.memoizedState;a.state=f,Bl(t,r,a,i),Il(),u=t.memoizedState,l||f!==u||Nl?("function"==typeof d&&(Ao(t,n,d,r),u=t.memoizedState),(s=Nl||xo(t,n,s,r,f,u,o))?(c||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=o,r=s):("function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Rl(e,t),c=Co(n,o=t.memoizedProps),a.props=c,d=t.pendingProps,f=a.context,u=n.contextType,s=kr,"object"==typeof u&&null!==u&&(s=Sl(u)),(u="function"==typeof(l=n.getDerivedStateFromProps)||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(o!==d||f!==s)&&ko(t,a,r,s),Nl=!1,f=t.memoizedState,a.state=f,Bl(t,r,a,i),Il();var h=t.memoizedState;o!==d||f!==h||Nl||null!==e&&null!==e.dependencies&&El(e.dependencies)?("function"==typeof l&&(Ao(t,n,l,r),h=t.memoizedState),(c=Nl||xo(t,n,c,r,f,h,s)||null!==e&&null!==e.dependencies&&El(e.dependencies))?(u||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,h,s),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,h,s)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),a.props=r,a.state=h,a.context=s,r=c):("function"!=typeof a.componentDidUpdate||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,Qo(e,t),r=!!(128&t.flags),a||r?(a=t.stateNode,n=r&&"function"!=typeof n.getDerivedStateFromError?null:a.render(),t.flags|=1,null!==e&&r?(t.child=Ti(t,e.child,null,i),t.child=Ti(t,null,n,i)):Xo(e,t,n,i),t.memoizedState=a.state,e=t.child):e=dl(e,t,i),e}function el(e,t,n,r){return ri(),t.flags|=256,Xo(e,t,n,r),t.child}var tl={dehydrated:null,treeContext:null,retryLane:0};function nl(e){return{baseLanes:e,cachePool:Qi()}}function rl(e,t,n){return e=null!==e?e.childLanes&~n:0,t&&(e|=hu),e}function il(e,t,n){var r,i=t.pendingProps,a=!1,l=!!(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&!!(2&Di.current)),r&&(a=!0,t.flags&=-129),r=!!(32&t.flags),t.flags&=-33,null===e){if(qr){if(a?Ri(t):ki(),qr){var s,u=$r;if(s=u){e:{for(s=u,u=Jr;8!==s.nodeType;){if(!u){u=null;break e}if(null===(s=od(s.nextSibling))){u=null;break e}}u=s}null!==u?(t.memoizedState={dehydrated:u,treeContext:null!==Fr?{id:Wr,overflow:Hr}:null,retryLane:536870912},(s=Ms(18,null,null,0)).stateNode=u,s.return=t,t.child=s,Gr=t,$r=null,s=!0):s=!1}s||Kr(t)}if(null!==(u=t.memoizedState)&&null!==(u=u.dehydrated))return"$!"===u.data?t.lanes=16:t.lanes=536870912,null;Ci(t)}return u=i.children,i=i.fallback,a?(ki(),u=ol({mode:"hidden",children:u},a=t.mode),i=Us(i,a,n,null),u.return=t,i.return=t,u.sibling=i,t.child=u,(a=t.child).memoizedState=nl(n),a.childLanes=rl(e,r,n),t.memoizedState=tl,i):(Ri(t),al(t,u))}if(null!==(s=e.memoizedState)&&null!==(u=s.dehydrated)){if(l)256&t.flags?(Ri(t),t.flags&=-257,t=ll(e,t,n)):null!==t.memoizedState?(ki(),t.child=e.child,t.flags|=128,t=null):(ki(),a=i.fallback,u=t.mode,i=ol({mode:"visible",children:i.children},u),(a=Us(a,u,n,null)).flags|=2,i.return=t,a.return=t,i.sibling=a,t.child=i,Ti(t,e.child,null,n),(i=t.child).memoizedState=nl(n),i.childLanes=rl(e,r,n),t.memoizedState=tl,t=a);else if(Ri(t),"$!"===u.data){if(r=u.nextSibling&&u.nextSibling.dataset)var c=r.dgst;r=c,(i=Error(o(419))).stack="",i.digest=r,ii({value:i,source:null,stack:null}),t=ll(e,t,n)}else if(Yo||_l(e,t,n,!1),r=!!(n&e.childLanes),Yo||r){if(null!==(r=eu)){if(42&(i=n&-n))i=1;else switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=16;break;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:i=64;break;case 268435456:i=134217728;break;default:i=0}if(0!==(i=i&(r.suspendedLanes|n)?0:i)&&i!==s.retryLane)throw s.retryLane=i,Ar(e,i),ku(r,0,i),Ho}"$?"===u.data||Yu(),t=ll(e,t,n)}else"$?"===u.data?(t.flags|=128,t.child=e.child,t=oc.bind(null,e),u._reactRetry=t,t=null):(e=s.treeContext,$r=od(u.nextSibling),Gr=t,qr=!0,Qr=null,Jr=!1,null!==e&&(zr[Ur++]=Wr,zr[Ur++]=Hr,zr[Ur++]=Fr,Wr=e.id,Hr=e.overflow,Fr=t),(t=al(t,i.children)).flags|=4096);return t}return a?(ki(),a=i.fallback,u=t.mode,c=(s=e.child).sibling,(i=Bs(s,{mode:"hidden",children:i.children})).subtreeFlags=31457280&s.subtreeFlags,null!==c?a=Bs(c,a):(a=Us(a,u,n,null)).flags|=2,a.return=t,i.return=t,i.sibling=a,t.child=i,i=a,a=t.child,null===(u=e.child.memoizedState)?u=nl(n):(null!==(s=u.cachePool)?(c=zi._currentValue,s=s.parent!==c?{parent:c,pool:c}:s):s=Qi(),u={baseLanes:u.baseLanes|n,cachePool:s}),a.memoizedState=u,a.childLanes=rl(e,r,n),t.memoizedState=tl,i):(Ri(t),e=(n=e.child).sibling,(n=Bs(n,{mode:"visible",children:i.children})).return=t,n.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n)}function al(e,t){return(t=ol({mode:"visible",children:t},e.mode)).return=e,e.child=t}function ol(e,t){return Fs(e,t,0,null)}function ll(e,t,n){return Ti(t,e.child,null,n),(e=al(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function sl(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),yl(e.return,t,n)}function ul(e,t,n,r,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function cl(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(Xo(e,t,r.children,n),2&(r=Di.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&sl(e,n,t);else if(19===e.tag)sl(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}switch(G(Di,r),i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===Mi(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),ul(t,!1,i,n,a);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===Mi(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}ul(t,!0,n,null,a);break;case"together":ul(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function dl(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),cu|=t.lanes,!(n&t.childLanes)){if(null===e)return null;if(_l(e,t,n,!1),!(n&t.childLanes))return null}if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=Bs(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Bs(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function fl(e,t){return!!(e.lanes&t)||!(null===(e=e.dependencies)||!El(e))}function hl(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps)Yo=!0;else{if(!(fl(e,n)||128&t.flags))return Yo=!1,function(e,t,n){switch(t.tag){case 3:Z(t,t.stateNode.containerInfo),bl(0,zi,e.memoizedState.cache),ri();break;case 27:case 5:ee(t);break;case 4:Z(t,t.stateNode.containerInfo);break;case 10:bl(0,t.type,t.memoizedProps.value);break;case 13:var r=t.memoizedState;if(null!==r)return null!==r.dehydrated?(Ri(t),t.flags|=128,null):n&t.child.childLanes?il(e,t,n):(Ri(t),null!==(e=dl(e,t,n))?e.sibling:null);Ri(t);break;case 19:var i=!!(128&e.flags);if((r=!!(n&t.childLanes))||(_l(e,t,n,!1),r=!!(n&t.childLanes)),i){if(r)return cl(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),G(Di,Di.current),r)break;return null;case 22:case 23:return t.lanes=0,$o(e,t,n);case 24:bl(0,zi,e.memoizedState.cache)}return dl(e,t,n)}(e,t,n);Yo=!!(131072&e.flags)}else Yo=!1,qr&&1048576&t.flags&&Xr(t,Pr,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var r=t.elementType,i=r._init;if(r=i(r._payload),t.type=r,"function"!=typeof r){if(null!=r){if((i=r.$$typeof)===m){t.tag=11,t=Vo(null,t,r,e,n);break e}if(i===y){t.tag=14,t=jo(null,t,r,e,n);break e}}throw t=O(r)||r,Error(o(306,t,""))}Is(r)?(e=Co(r,e),t.tag=1,t=Ko(null,t,r,e,n)):(t.tag=0,t=Jo(null,t,r,e,n))}return t;case 0:return Jo(e,t,t.type,t.pendingProps,n);case 1:return Ko(e,t,r=t.type,i=Co(r,t.pendingProps),n);case 3:e:{if(Z(t,t.stateNode.containerInfo),null===e)throw Error(o(387));var a=t.pendingProps;r=(i=t.memoizedState).element,Rl(e,t),Bl(t,a,null,n);var l=t.memoizedState;if(a=l.cache,bl(0,zi,a),a!==i.cache&&Tl(t,[zi],n,!0),Il(),a=l.element,i.isDehydrated){if(i={element:a,isDehydrated:!1,cache:l.cache},t.updateQueue.baseState=i,t.memoizedState=i,256&t.flags){t=el(e,t,a,n);break e}if(a!==r){ii(r=Dr(Error(o(424)),t)),t=el(e,t,a,n);break e}for($r=od(t.stateNode.containerInfo.firstChild),Gr=t,qr=!0,Qr=null,Jr=!0,n=_i(t,null,a,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(ri(),a===r){t=dl(e,t,n);break e}Xo(e,t,a,n)}t=t.child}return t;case 26:return Qo(e,t),null===e?(n=gd(t.type,null,t.pendingProps,null))?t.memoizedState=n:qr||(n=t.type,e=t.pendingProps,(r=$c(Q.current).createElement(n))[Pe]=t,r[ze]=e,Vc(r,n,e),Qe(r),t.stateNode=r):t.memoizedState=gd(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ee(t),null===e&&qr&&(r=t.stateNode=sd(t.type,t.pendingProps,Q.current),Gr=t,Jr=!0,$r=od(r.firstChild)),r=t.pendingProps.children,null!==e||qr?Xo(e,t,r,n):t.child=Ti(t,null,r,n),Qo(e,t),t.child;case 5:return null===e&&qr&&((i=r=$r)&&(null!==(r=function(e,t,n,r){for(;1===e.nodeType;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&("INPUT"!==e.nodeName||"hidden"!==e.type))break}else if(r){if(!e[Xe])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if("stylesheet"===(a=e.getAttribute("rel"))&&e.hasAttribute("data-precedence"))break;if(a!==i.rel||e.getAttribute("href")!==(null==i.href?null:i.href)||e.getAttribute("crossorigin")!==(null==i.crossOrigin?null:i.crossOrigin)||e.getAttribute("title")!==(null==i.title?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(((a=e.getAttribute("src"))!==(null==i.src?null:i.src)||e.getAttribute("type")!==(null==i.type?null:i.type)||e.getAttribute("crossorigin")!==(null==i.crossOrigin?null:i.crossOrigin))&&a&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else{if("input"!==t||"hidden"!==e.type)return e;var a=null==i.name?null:""+i.name;if("hidden"===i.type&&e.getAttribute("name")===a)return e}if(null===(e=od(e.nextSibling)))break}return null}(r,t.type,t.pendingProps,Jr))?(t.stateNode=r,Gr=t,$r=od(r.firstChild),Jr=!1,i=!0):i=!1),i||Kr(t)),ee(t),i=t.type,a=t.pendingProps,l=null!==e?e.memoizedProps:null,r=a.children,Jc(i,a)?r=null:null!==l&&Jc(i,l)&&(t.flags|=32),null!==t.memoizedState&&(i=ca(e,t,ha,null,null,n),Id._currentValue=i),Qo(e,t),Xo(e,t,r,n),t.child;case 6:return null===e&&qr&&((e=n=$r)&&(null!==(n=function(e,t,n){if(""===t)return null;for(;3!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!n)return null;if(null===(e=od(e.nextSibling)))return null}return e}(n,t.pendingProps,Jr))?(t.stateNode=n,Gr=t,$r=null,e=!0):e=!1),e||Kr(t)),null;case 13:return il(e,t,n);case 4:return Z(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Ti(t,null,r,n):Xo(e,t,r,n),t.child;case 11:return Vo(e,t,t.type,t.pendingProps,n);case 7:return Xo(e,t,t.pendingProps,n),t.child;case 8:case 12:return Xo(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,bl(0,t.type,r.value),Xo(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,wl(t),r=r(i=Sl(i)),t.flags|=1,Xo(e,t,r,n),t.child;case 14:return jo(e,t,t.type,t.pendingProps,n);case 15:return Go(e,t,t.type,t.pendingProps,n);case 19:return cl(e,t,n);case 22:return $o(e,t,n);case 24:return wl(t),r=Sl(zi),null===e?(null===(i=$i())&&(i=eu,a=Ui(),i.pooledCache=a,a.refCount++,null!==a&&(i.pooledCacheLanes|=n),i=a),t.memoizedState={parent:r,cache:i},Al(t),bl(0,zi,i)):(!!(e.lanes&n)&&(Rl(e,t),Bl(t,null,null,n),Il()),i=e.memoizedState,a=t.memoizedState,i.parent!==r?(i={parent:r,cache:r},t.memoizedState=i,0===t.lanes&&(t.memoizedState=t.updateQueue.baseState=i),bl(0,zi,r)):(r=a.cache,bl(0,zi,r),r!==i.cache&&Tl(t,[zi],n,!0))),Xo(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}var pl=V(null),gl=null,ml=null;function bl(e,t,n){G(pl,t._currentValue),t._currentValue=n}function vl(e){e._currentValue=pl.current,j(pl)}function yl(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Tl(e,t,n,r){var i=e.child;for(null!==i&&(i.return=e);null!==i;){var a=i.dependencies;if(null!==a){var l=i.child;a=a.firstContext;e:for(;null!==a;){var s=a;a=i;for(var u=0;u<t.length;u++)if(s.context===t[u]){a.lanes|=n,null!==(s=a.alternate)&&(s.lanes|=n),yl(a.return,n,e),r||(l=null);break e}a=s.next}}else if(18===i.tag){if(null===(l=i.return))throw Error(o(341));l.lanes|=n,null!==(a=l.alternate)&&(a.lanes|=n),yl(l,n,e),l=null}else l=i.child;if(null!==l)l.return=i;else for(l=i;null!==l;){if(l===e){l=null;break}if(null!==(i=l.sibling)){i.return=l.return,l=i;break}l=l.return}i=l}}function _l(e,t,n,r){e=null;for(var i=t,a=!1;null!==i;){if(!a)if(524288&i.flags)a=!0;else if(262144&i.flags)break;if(10===i.tag){var l=i.alternate;if(null===l)throw Error(o(387));if(null!==(l=l.memoizedProps)){var s=i.type;Gn(i.pendingProps.value,l.value)||(null!==e?e.push(s):e=[s])}}else if(i===J.current){if(null===(l=i.alternate))throw Error(o(387));l.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(null!==e?e.push(Id):e=[Id])}i=i.return}null!==e&&Tl(t,e,n,r),t.flags|=262144}function El(e){for(e=e.firstContext;null!==e;){if(!Gn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function wl(e){gl=e,ml=null,null!==(e=e.dependencies)&&(e.firstContext=null)}function Sl(e){return Ol(gl,e)}function Ll(e,t){return null===gl&&wl(e),Ol(e,t)}function Ol(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},null===ml){if(null===e)throw Error(o(308));ml=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ml=ml.next=t;return n}var Nl=!1;function Al(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Rl(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function xl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function kl(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&Ks){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=xr(e),Rr(e,null,n),t}return Or(e,r,t,n),xr(e)}function Cl(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194176&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,De(e,n)}}function Dl(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};null===a?i=a=o:a=a.next=o,n=n.next}while(null!==n);null===a?i=a=t:a=a.next=t}else i=a=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ml=!1;function Il(){if(Ml&&null!==Xi)throw Xi}function Bl(e,t,n,r){Ml=!1;var i=e.updateQueue;Nl=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,l=i.shared.pending;if(null!==l){i.shared.pending=null;var s=l,u=s.next;s.next=null,null===o?a=u:o.next=u,o=s;var c=e.alternate;null!==c&&(l=(c=c.updateQueue).lastBaseUpdate)!==o&&(null===l?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=s)}if(null!==a){var d=i.baseState;for(o=0,c=u=s=null,l=a;;){var f=-536870913&l.lane,h=f!==l.lane;if(h?(nu&f)===f:(r&f)===f){0!==f&&f===Yi&&(Ml=!0),null!==c&&(c=c.next={lane:0,tag:l.tag,payload:l.payload,callback:null,next:null});e:{var p=e,g=l;f=t;var m=n;switch(g.tag){case 1:if("function"==typeof(p=g.payload)){d=p.call(m,d,f);break e}d=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null==(f="function"==typeof(p=g.payload)?p.call(m,d,f):p))break e;d=x({},d,f);break e;case 2:Nl=!0}}null!==(f=l.callback)&&(e.flags|=64,h&&(e.flags|=8192),null===(h=i.callbacks)?i.callbacks=[f]:h.push(f))}else h={lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},null===c?(u=c=h,s=d):c=c.next=h,o|=f;if(null===(l=l.next)){if(null===(l=i.shared.pending))break;l=(h=l).next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}null===c&&(s=d),i.baseState=s,i.firstBaseUpdate=u,i.lastBaseUpdate=c,null===a&&(i.shared.lanes=0),cu|=o,e.lanes=o,e.memoizedState=d}}function Pl(e,t){if("function"!=typeof e)throw Error(o(191,e));e.call(t)}function zl(e,t){var n=e.callbacks;if(null!==n)for(e.callbacks=null,e=0;e<n.length;e++)Pl(n[e],t)}function Ul(e,t){try{var n=t.updateQueue,r=null!==n?n.lastEffect:null;if(null!==r){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){nc(t,t.return,e)}}function Fl(e,t,n){try{var r=t.updateQueue,i=null!==r?r.lastEffect:null;if(null!==i){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,l=o.destroy;if(void 0!==l){o.destroy=void 0,i=t;var s=n;try{l()}catch(e){nc(i,s,e)}}}r=r.next}while(r!==a)}}catch(e){nc(t,t.return,e)}}function Wl(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{zl(t,n)}catch(t){nc(e,e.return,t)}}}function Hl(e,t,n){n.props=Co(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){nc(e,t,n)}}function Yl(e,t){try{var n=e.ref;if(null!==n){var r=e.stateNode;switch(e.tag){case 26:case 27:case 5:var i=r;break;default:i=r}"function"==typeof n?e.refCleanup=n(i):n.current=i}}catch(n){nc(e,t,n)}}function Xl(e,t){var n=e.ref,r=e.refCleanup;if(null!==n)if("function"==typeof r)try{r()}catch(n){nc(e,t,n)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"==typeof n)try{n(null)}catch(n){nc(e,t,n)}else n.current=null}function Vl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){nc(e,e.return,t)}}function jl(e,t,n){try{var r=e.stateNode;!function(e,t,n,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,a=null,l=null,s=null,u=null,c=null,d=null;for(p in n){var f=n[p];if(n.hasOwnProperty(p)&&null!=f)switch(p){case"checked":case"value":break;case"defaultValue":u=f;default:r.hasOwnProperty(p)||Yc(e,t,p,null,r,f)}}for(var h in r){var p=r[h];if(f=n[h],r.hasOwnProperty(h)&&(null!=p||null!=f))switch(h){case"type":a=p;break;case"name":i=p;break;case"checked":c=p;break;case"defaultChecked":d=p;break;case"value":l=p;break;case"defaultValue":s=p;break;case"children":case"dangerouslySetInnerHTML":if(null!=p)throw Error(o(137,t));break;default:p!==f&&Yc(e,t,h,p,r,f)}}return void gt(e,l,s,u,c,d,a,i);case"select":for(a in p=l=s=h=null,n)if(u=n[a],n.hasOwnProperty(a)&&null!=u)switch(a){case"value":break;case"multiple":p=u;default:r.hasOwnProperty(a)||Yc(e,t,a,null,r,u)}for(i in r)if(a=r[i],u=n[i],r.hasOwnProperty(i)&&(null!=a||null!=u))switch(i){case"value":h=a;break;case"defaultValue":s=a;break;case"multiple":l=a;default:a!==u&&Yc(e,t,i,a,r,u)}return t=s,n=l,r=p,void(null!=h?vt(e,!!n,h,!1):!!r!=!!n&&(null!=t?vt(e,!!n,t,!0):vt(e,!!n,n?[]:"",!1)));case"textarea":for(s in p=h=null,n)if(i=n[s],n.hasOwnProperty(s)&&null!=i&&!r.hasOwnProperty(s))switch(s){case"value":case"children":break;default:Yc(e,t,s,null,r,i)}for(l in r)if(i=r[l],a=n[l],r.hasOwnProperty(l)&&(null!=i||null!=a))switch(l){case"value":h=i;break;case"defaultValue":p=i;break;case"children":break;case"dangerouslySetInnerHTML":if(null!=i)throw Error(o(91));break;default:i!==a&&Yc(e,t,l,i,r,a)}return void yt(e,h,p);case"option":for(var g in n)h=n[g],n.hasOwnProperty(g)&&null!=h&&!r.hasOwnProperty(g)&&("selected"===g?e.selected=!1:Yc(e,t,g,null,r,h));for(u in r)h=r[u],p=n[u],!r.hasOwnProperty(u)||h===p||null==h&&null==p||("selected"===u?e.selected=h&&"function"!=typeof h&&"symbol"!=typeof h:Yc(e,t,u,h,r,p));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var m in n)h=n[m],n.hasOwnProperty(m)&&null!=h&&!r.hasOwnProperty(m)&&Yc(e,t,m,null,r,h);for(c in r)if(h=r[c],p=n[c],r.hasOwnProperty(c)&&h!==p&&(null!=h||null!=p))switch(c){case"children":case"dangerouslySetInnerHTML":if(null!=h)throw Error(o(137,t));break;default:Yc(e,t,c,h,r,p)}return;default:if(Lt(t)){for(var b in n)h=n[b],n.hasOwnProperty(b)&&void 0!==h&&!r.hasOwnProperty(b)&&Xc(e,t,b,void 0,r,h);for(d in r)h=r[d],p=n[d],!r.hasOwnProperty(d)||h===p||void 0===h&&void 0===p||Xc(e,t,d,h,r,p);return}}for(var v in n)h=n[v],n.hasOwnProperty(v)&&null!=h&&!r.hasOwnProperty(v)&&Yc(e,t,v,null,r,h);for(f in r)h=r[f],p=n[f],!r.hasOwnProperty(f)||h===p||null==h&&null==p||Yc(e,t,f,h,r,p)}(r,e.type,n,t),r[ze]=t}catch(t){nc(e,e.return,t)}}function Gl(e){return 5===e.tag||3===e.tag||26===e.tag||27===e.tag||4===e.tag}function $l(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Gl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&27!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ql(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Hc));else if(4!==r&&27!==r&&null!==(e=e.child))for(ql(e,t,n),e=e.sibling;null!==e;)ql(e,t,n),e=e.sibling}function Ql(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&27!==r&&null!==(e=e.child))for(Ql(e,t,n),e=e.sibling;null!==e;)Ql(e,t,n),e=e.sibling}var Jl=!1,Zl=!1,Kl=!1,es="function"==typeof WeakSet?WeakSet:Set,ts=null,ns=!1;function rs(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:ms(e,n),4&r&&Ul(5,n);break;case 1:if(ms(e,n),4&r)if(e=n.stateNode,null===t)try{e.componentDidMount()}catch(e){nc(n,n.return,e)}else{var i=Co(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){nc(n,n.return,e)}}64&r&&Wl(n),512&r&&Yl(n,n.return);break;case 3:if(ms(e,n),64&r&&null!==(r=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 27:case 5:case 1:e=n.child.stateNode}try{zl(r,e)}catch(e){nc(n,n.return,e)}}break;case 26:ms(e,n),512&r&&Yl(n,n.return);break;case 27:case 5:ms(e,n),null===t&&4&r&&Vl(n),512&r&&Yl(n,n.return);break;case 12:default:ms(e,n);break;case 13:ms(e,n),4&r&&us(e,n);break;case 22:if(!(i=null!==n.memoizedState||Jl)){t=null!==t&&null!==t.memoizedState||Zl;var a=Jl,o=Zl;Jl=i,(Zl=t)&&!o?vs(e,n,!!(8772&n.subtreeFlags)):ms(e,n),Jl=a,Zl=o}512&r&&("manual"===n.memoizedProps.mode?Yl(n,n.return):Xl(n,n.return))}}function is(e){var t=e.alternate;null!==t&&(e.alternate=null,is(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&Ve(t),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var as=null,os=!1;function ls(e,t,n){for(n=n.child;null!==n;)ss(e,t,n),n=n.sibling}function ss(e,t,n){if(be&&"function"==typeof be.onCommitFiberUnmount)try{be.onCommitFiberUnmount(me,n)}catch(e){}switch(n.tag){case 26:Zl||Xl(n,t),ls(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode).parentNode.removeChild(n);break;case 27:Zl||Xl(n,t);var r=as,i=os;for(as=n.stateNode,ls(e,t,n),t=(n=n.stateNode).attributes;t.length;)n.removeAttributeNode(t[0]);Ve(n),as=r,os=i;break;case 5:Zl||Xl(n,t);case 6:i=as;var a=os;if(as=null,ls(e,t,n),os=a,null!==(as=i))if(os)try{e=as,r=n.stateNode,8===e.nodeType?e.parentNode.removeChild(r):e.removeChild(r)}catch(e){nc(n,t,e)}else try{as.removeChild(n.stateNode)}catch(e){nc(n,t,e)}break;case 18:null!==as&&(os?(t=as,n=n.stateNode,8===t.nodeType?id(t.parentNode,n):1===t.nodeType&&id(t,n),hf(t)):id(as,n.stateNode));break;case 4:r=as,i=os,as=n.stateNode.containerInfo,os=!0,ls(e,t,n),as=r,os=i;break;case 0:case 11:case 14:case 15:Zl||Fl(2,n,t),Zl||Fl(4,n,t),ls(e,t,n);break;case 1:Zl||(Xl(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount&&Hl(n,t,r)),ls(e,t,n);break;case 21:ls(e,t,n);break;case 22:Zl||Xl(n,t),Zl=(r=Zl)||null!==n.memoizedState,ls(e,t,n),Zl=r;break;default:ls(e,t,n)}}function us(e,t){if(null===t.memoizedState&&null!==(e=t.alternate)&&null!==(e=e.memoizedState)&&null!==(e=e.dehydrated))try{hf(e)}catch(e){nc(t,t.return,e)}}function cs(e,t){var n=function(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return null===t&&(t=e.stateNode=new es),t;case 22:return null===(t=(e=e.stateNode)._retryCache)&&(t=e._retryCache=new es),t;default:throw Error(o(435,e.tag))}}(e);t.forEach((function(t){var r=lc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}function ds(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r],a=e,l=t,s=l;e:for(;null!==s;){switch(s.tag){case 27:case 5:as=s.stateNode,os=!1;break e;case 3:case 4:as=s.stateNode.containerInfo,os=!0;break e}s=s.return}if(null===as)throw Error(o(160));ss(a,l,i),as=null,os=!1,null!==(a=i.alternate)&&(a.return=null),i.return=null}if(13878&t.subtreeFlags)for(t=t.child;null!==t;)hs(t,e),t=t.sibling}var fs=null;function hs(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ds(t,e),ps(e),4&r&&(Fl(3,e,e.return),Ul(3,e),Fl(5,e,e.return));break;case 1:ds(t,e),ps(e),512&r&&(Zl||null===n||Xl(n,n.return)),64&r&&Jl&&null!==(e=e.updateQueue)&&null!==(r=e.callbacks)&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=null===n?r:n.concat(r));break;case 26:var i=fs;if(ds(t,e),ps(e),512&r&&(Zl||null===n||Xl(n,n.return)),4&r){var a=null!==n?n.memoizedState:null;if(r=e.memoizedState,null===n)if(null===r)if(null===e.stateNode){e:{r=e.type,n=e.memoizedProps,i=i.ownerDocument||i;t:switch(r){case"title":(!(a=i.getElementsByTagName("title")[0])||a[Xe]||a[Pe]||"http://www.w3.org/2000/svg"===a.namespaceURI||a.hasAttribute("itemprop"))&&(a=i.createElement(r),i.head.insertBefore(a,i.querySelector("head > title"))),Vc(a,r,n),a[Pe]=e,Qe(a),r=a;break e;case"link":var l=Od("link","href",i).get(r+(n.href||""));if(l)for(var s=0;s<l.length;s++)if((a=l[s]).getAttribute("href")===(null==n.href?null:n.href)&&a.getAttribute("rel")===(null==n.rel?null:n.rel)&&a.getAttribute("title")===(null==n.title?null:n.title)&&a.getAttribute("crossorigin")===(null==n.crossOrigin?null:n.crossOrigin)){l.splice(s,1);break t}Vc(a=i.createElement(r),r,n),i.head.appendChild(a);break;case"meta":if(l=Od("meta","content",i).get(r+(n.content||"")))for(s=0;s<l.length;s++)if((a=l[s]).getAttribute("content")===(null==n.content?null:""+n.content)&&a.getAttribute("name")===(null==n.name?null:n.name)&&a.getAttribute("property")===(null==n.property?null:n.property)&&a.getAttribute("http-equiv")===(null==n.httpEquiv?null:n.httpEquiv)&&a.getAttribute("charset")===(null==n.charSet?null:n.charSet)){l.splice(s,1);break t}Vc(a=i.createElement(r),r,n),i.head.appendChild(a);break;default:throw Error(o(468,r))}a[Pe]=e,Qe(a),r=a}e.stateNode=r}else Nd(i,e.type,e.stateNode);else e.stateNode=_d(i,r,e.memoizedProps);else a!==r?(null===a?null!==n.stateNode&&(n=n.stateNode).parentNode.removeChild(n):a.count--,null===r?Nd(i,e.type,e.stateNode):_d(i,r,e.memoizedProps)):null===r&&null!==e.stateNode&&jl(e,e.memoizedProps,n.memoizedProps)}break;case 27:if(4&r&&null===e.alternate){i=e.stateNode,a=e.memoizedProps;try{for(var u=i.firstChild;u;){var c=u.nextSibling,d=u.nodeName;u[Xe]||"HEAD"===d||"BODY"===d||"SCRIPT"===d||"STYLE"===d||"LINK"===d&&"stylesheet"===u.rel.toLowerCase()||i.removeChild(u),u=c}for(var f=e.type,h=i.attributes;h.length;)i.removeAttributeNode(h[0]);Vc(i,f,a),i[Pe]=e,i[ze]=a}catch(t){nc(e,e.return,t)}}case 5:if(ds(t,e),ps(e),512&r&&(Zl||null===n||Xl(n,n.return)),32&e.flags){i=e.stateNode;try{_t(i,"")}catch(t){nc(e,e.return,t)}}4&r&&null!=e.stateNode&&jl(e,i=e.memoizedProps,null!==n?n.memoizedProps:i),1024&r&&(Kl=!0);break;case 6:if(ds(t,e),ps(e),4&r){if(null===e.stateNode)throw Error(o(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){nc(e,e.return,t)}}break;case 3:if(Ld=null,i=fs,fs=dd(t.containerInfo),ds(t,e),fs=i,ps(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{hf(t.containerInfo)}catch(t){nc(e,e.return,t)}Kl&&(Kl=!1,gs(e));break;case 4:r=fs,fs=dd(e.stateNode.containerInfo),ds(t,e),ps(e),fs=r;break;case 12:ds(t,e),ps(e);break;case 13:ds(t,e),ps(e),8192&e.child.flags&&null!==e.memoizedState!=(null!==n&&null!==n.memoizedState)&&(vu=le()),4&r&&null!==(r=e.updateQueue)&&(e.updateQueue=null,cs(e,r));break;case 22:if(512&r&&(Zl||null===n||Xl(n,n.return)),u=null!==e.memoizedState,c=null!==n&&null!==n.memoizedState,Jl=(d=Jl)||u,Zl=(f=Zl)||c,ds(t,e),Zl=f,Jl=d,ps(e),(t=e.stateNode)._current=e,t._visibility&=-3,t._visibility|=2&t._pendingVisibility,8192&r&&(t._visibility=u?-2&t._visibility:1|t._visibility,u&&(t=Jl||Zl,null===n||c||t||bs(e)),null===e.memoizedProps||"manual"!==e.memoizedProps.mode))e:for(n=null,t=e;;){if(5===t.tag||26===t.tag||27===t.tag){if(null===n){c=n=t;try{if(i=c.stateNode,u)"function"==typeof(a=i.style).setProperty?a.setProperty("display","none","important"):a.display="none";else{l=c.stateNode;var p=null!=(s=c.memoizedProps.style)&&s.hasOwnProperty("display")?s.display:null;l.style.display=null==p||"boolean"==typeof p?"":(""+p).trim()}}catch(e){nc(c,c.return,e)}}}else if(6===t.tag){if(null===n){c=t;try{c.stateNode.nodeValue=u?"":c.memoizedProps}catch(e){nc(c,c.return,e)}}}else if((22!==t.tag&&23!==t.tag||null===t.memoizedState||t===e)&&null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;null===t.sibling;){if(null===t.return||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}4&r&&null!==(r=e.updateQueue)&&null!==(n=r.retryQueue)&&(r.retryQueue=null,cs(e,n));break;case 19:ds(t,e),ps(e),4&r&&null!==(r=e.updateQueue)&&(e.updateQueue=null,cs(e,r));break;case 21:break;default:ds(t,e),ps(e)}}function ps(e){var t=e.flags;if(2&t){try{if(27!==e.tag){e:{for(var n=e.return;null!==n;){if(Gl(n)){var r=n;break e}n=n.return}throw Error(o(160))}switch(r.tag){case 27:var i=r.stateNode;Ql(e,$l(e),i);break;case 5:var a=r.stateNode;32&r.flags&&(_t(a,""),r.flags&=-33),Ql(e,$l(e),a);break;case 3:case 4:var l=r.stateNode.containerInfo;ql(e,$l(e),l);break;default:throw Error(o(161))}}}catch(t){nc(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function gs(e){if(1024&e.subtreeFlags)for(e=e.child;null!==e;){var t=e;gs(t),5===t.tag&&1024&t.flags&&t.stateNode.reset(),e=e.sibling}}function ms(e,t){if(8772&t.subtreeFlags)for(t=t.child;null!==t;)rs(e,t.alternate,t),t=t.sibling}function bs(e){for(e=e.child;null!==e;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Fl(4,t,t.return),bs(t);break;case 1:Xl(t,t.return);var n=t.stateNode;"function"==typeof n.componentWillUnmount&&Hl(t,t.return,n),bs(t);break;case 26:case 27:case 5:Xl(t,t.return),bs(t);break;case 22:Xl(t,t.return),null===t.memoizedState&&bs(t);break;default:bs(t)}e=e.sibling}}function vs(e,t,n){for(n=n&&!!(8772&t.subtreeFlags),t=t.child;null!==t;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:vs(i,a,n),Ul(4,a);break;case 1:if(vs(i,a,n),"function"==typeof(i=(r=a).stateNode).componentDidMount)try{i.componentDidMount()}catch(e){nc(r,r.return,e)}if(null!==(i=(r=a).updateQueue)){var l=r.stateNode;try{var s=i.shared.hiddenCallbacks;if(null!==s)for(i.shared.hiddenCallbacks=null,i=0;i<s.length;i++)Pl(s[i],l)}catch(e){nc(r,r.return,e)}}n&&64&o&&Wl(a),Yl(a,a.return);break;case 26:case 27:case 5:vs(i,a,n),n&&null===r&&4&o&&Vl(a),Yl(a,a.return);break;case 12:default:vs(i,a,n);break;case 13:vs(i,a,n),n&&4&o&&us(i,a);break;case 22:null===a.memoizedState&&vs(i,a,n),Yl(a,a.return)}t=t.sibling}}function ys(e,t){var n=null;null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),e=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(e=t.memoizedState.cachePool.pool),e!==n&&(null!=e&&e.refCount++,null!=n&&Fi(n))}function Ts(e,t){e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&Fi(e))}function _s(e,t,n,r){if(10256&t.subtreeFlags)for(t=t.child;null!==t;)Es(e,t,n,r),t=t.sibling}function Es(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:_s(e,t,n,r),2048&i&&Ul(9,t);break;case 3:_s(e,t,n,r),2048&i&&(e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&Fi(e)));break;case 12:if(2048&i){_s(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,l=a.onPostCommit;"function"==typeof l&&l(o,null===t.alternate?"mount":"update",e.passiveEffectDuration,-0)}catch(e){nc(t,t.return,e)}}else _s(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,null!==t.memoizedState?4&a._visibility?_s(e,t,n,r):Ss(e,t):4&a._visibility?_s(e,t,n,r):(a._visibility|=4,ws(e,t,n,r,!!(10256&t.subtreeFlags))),2048&i&&ys(t.alternate,t);break;case 24:_s(e,t,n,r),2048&i&&Ts(t.alternate,t);break;default:_s(e,t,n,r)}}function ws(e,t,n,r,i){for(i=i&&!!(10256&t.subtreeFlags),t=t.child;null!==t;){var a=e,o=t,l=n,s=r,u=o.flags;switch(o.tag){case 0:case 11:case 15:ws(a,o,l,s,i),Ul(8,o);break;case 23:break;case 22:var c=o.stateNode;null!==o.memoizedState?4&c._visibility?ws(a,o,l,s,i):Ss(a,o):(c._visibility|=4,ws(a,o,l,s,i)),i&&2048&u&&ys(o.alternate,o);break;case 24:ws(a,o,l,s,i),i&&2048&u&&Ts(o.alternate,o);break;default:ws(a,o,l,s,i)}t=t.sibling}}function Ss(e,t){if(10256&t.subtreeFlags)for(t=t.child;null!==t;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Ss(n,r),2048&i&&ys(r.alternate,r);break;case 24:Ss(n,r),2048&i&&Ts(r.alternate,r);break;default:Ss(n,r)}t=t.sibling}}var Ls=8192;function Os(e){if(e.subtreeFlags&Ls)for(e=e.child;null!==e;)Ns(e),e=e.sibling}function Ns(e){switch(e.tag){case 26:Os(e),e.flags&Ls&&null!==e.memoizedState&&function(e,t,n){if(null===Rd)throw Error(o(475));var r=Rd;if(!("stylesheet"!==t.type||"string"==typeof n.media&&!1===matchMedia(n.media).matches||4&t.state.loading)){if(null===t.instance){var i=md(n.href),a=e.querySelector(bd(i));if(a)return null!==(e=a._p)&&"object"==typeof e&&"function"==typeof e.then&&(r.count++,r=kd.bind(r),e.then(r,r)),t.state.loading|=4,t.instance=a,void Qe(a);a=e.ownerDocument||e,n=vd(n),(i=ud.get(i))&&wd(n,i),Qe(a=a.createElement("link"));var l=a;l._p=new Promise((function(e,t){l.onload=e,l.onerror=t})),Vc(a,"link",n),t.instance=a}null===r.stylesheets&&(r.stylesheets=new Map),r.stylesheets.set(t,e),(e=t.state.preload)&&!(3&t.state.loading)&&(r.count++,t=kd.bind(r),e.addEventListener("load",t),e.addEventListener("error",t))}}(fs,e.memoizedState,e.memoizedProps);break;case 5:default:Os(e);break;case 3:case 4:var t=fs;fs=dd(e.stateNode.containerInfo),Os(e),fs=t;break;case 22:null===e.memoizedState&&(null!==(t=e.alternate)&&null!==t.memoizedState?(t=Ls,Ls=16777216,Os(e),Ls=t):Os(e))}}function As(e){var t=e.alternate;if(null!==t&&null!==(e=t.child)){t.child=null;do{t=e.sibling,e.sibling=null,e=t}while(null!==e)}}function Rs(e){var t=e.deletions;if(16&e.flags){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];ts=r,Cs(r,e)}As(e)}if(10256&e.subtreeFlags)for(e=e.child;null!==e;)xs(e),e=e.sibling}function xs(e){switch(e.tag){case 0:case 11:case 15:Rs(e),2048&e.flags&&Fl(9,e,e.return);break;case 3:case 12:default:Rs(e);break;case 22:var t=e.stateNode;null!==e.memoizedState&&4&t._visibility&&(null===e.return||13!==e.return.tag)?(t._visibility&=-5,ks(e)):Rs(e)}}function ks(e){var t=e.deletions;if(16&e.flags){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];ts=r,Cs(r,e)}As(e)}for(e=e.child;null!==e;){switch((t=e).tag){case 0:case 11:case 15:Fl(8,t,t.return),ks(t);break;case 22:4&(n=t.stateNode)._visibility&&(n._visibility&=-5,ks(t));break;default:ks(t)}e=e.sibling}}function Cs(e,t){for(;null!==ts;){var n=ts;switch(n.tag){case 0:case 11:case 15:Fl(8,n,t);break;case 23:case 22:if(null!==n.memoizedState&&null!==n.memoizedState.cachePool){var r=n.memoizedState.cachePool.pool;null!=r&&r.refCount++}break;case 24:Fi(n.memoizedState.cache)}if(null!==(r=n.child))r.return=n,ts=r;else e:for(n=e;null!==ts;){var i=(r=ts).sibling,a=r.return;if(is(r),r===n){ts=null;break e}if(null!==i){i.return=a,ts=i;break e}ts=a}}}function Ds(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ms(e,t,n,r){return new Ds(e,t,n,r)}function Is(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Bs(e,t){var n=e.alternate;return null===n?((n=Ms(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=31457280&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Ps(e,t){e.flags&=31457282;var n=e.alternate;return null===n?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function zs(e,t,n,r,i,a){var l=0;if(r=e,"function"==typeof e)Is(e)&&(l=1);else if("string"==typeof e)l=function(e,t,n){if(1===n||null!=t.itemProp)return!1;switch(e){case"meta":case"title":return!0;case"style":if("string"!=typeof t.precedence||"string"!=typeof t.href||""===t.href)break;return!0;case"link":if("string"!=typeof t.rel||"string"!=typeof t.href||""===t.href||t.onLoad||t.onError)break;return"stylesheet"!==t.rel||(e=t.disabled,"string"==typeof t.precedence&&null==e);case"script":if(t.async&&"function"!=typeof t.async&&"symbol"!=typeof t.async&&!t.onLoad&&!t.onError&&t.src&&"string"==typeof t.src)return!0}return!1}(e,n,$.current)?26:"html"===e||"head"===e||"body"===e?27:5;else e:switch(e){case c:return Us(n.children,i,a,t);case d:l=8,i|=24;break;case f:return(e=Ms(12,n,t,2|i)).elementType=f,e.lanes=a,e;case b:return(e=Ms(13,n,t,i)).elementType=b,e.lanes=a,e;case v:return(e=Ms(19,n,t,i)).elementType=v,e.lanes=a,e;case _:return Fs(n,i,a,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case h:case g:l=10;break e;case p:l=9;break e;case m:l=11;break e;case y:l=14;break e;case T:l=16,r=null;break e}l=29,n=Error(o(130,null===e?"null":typeof e,"")),r=null}return(t=Ms(l,n,t,i)).elementType=e,t.type=r,t.lanes=a,t}function Us(e,t,n,r){return(e=Ms(7,e,r,t)).lanes=n,e}function Fs(e,t,n,r){(e=Ms(22,e,r,t)).elementType=_,e.lanes=n;var i={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var e=i._current;if(null===e)throw Error(o(456));if(!(2&i._pendingVisibility)){var t=Ar(e,2);null!==t&&(i._pendingVisibility|=2,ku(t,0,2))}},attach:function(){var e=i._current;if(null===e)throw Error(o(456));if(2&i._pendingVisibility){var t=Ar(e,2);null!==t&&(i._pendingVisibility&=-3,ku(t,0,2))}}};return e.stateNode=i,e}function Ws(e,t,n){return(e=Ms(6,e,null,t)).lanes=n,e}function Hs(e,t,n){return(t=Ms(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Ys(e){e.flags|=4}function Xs(e,t){if("stylesheet"!==t.type||4&t.state.loading)e.flags&=-16777217;else if(e.flags|=16777216,!Ad(t)){if(null!==(t=Ni.current)&&((4194176&nu)===nu?null!==Ai:(62914560&nu)!==nu&&!(536870912&nu)||t!==Ai))throw di=li,oi;e.flags|=8192}}function Vs(e,t){null!==t&&(e.flags|=4),16384&e.flags&&(t=22!==e.tag?Re():536870912,e.lanes|=t,pu|=t)}function js(e,t){if(!qr)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Gs(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=31457280&i.subtreeFlags,r|=31457280&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function $s(e,t,n){var r=t.pendingProps;switch(jr(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:case 1:return Gs(t),null;case 3:return n=t.stateNode,r=null,null!==e&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),vl(zi),K(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||(ni(t)?Ys(t):null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==Qr&&(Du(Qr),Qr=null))),Gs(t),null;case 26:return n=t.memoizedState,null===e?(Ys(t),null!==n?(Gs(t),Xs(t,n)):(Gs(t),t.flags&=-16777217)):n?n!==e.memoizedState?(Ys(t),Gs(t),Xs(t,n)):(Gs(t),t.flags&=-16777217):(e.memoizedProps!==r&&Ys(t),Gs(t),t.flags&=-16777217),null;case 27:te(t),n=Q.current;var i=t.type;if(null!==e&&null!=t.stateNode)e.memoizedProps!==r&&Ys(t);else{if(!r){if(null===t.stateNode)throw Error(o(166));return Gs(t),null}e=$.current,ni(t)?ei(t):(e=sd(i,r,n),t.stateNode=e,Ys(t))}return Gs(t),null;case 5:if(te(t),n=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==r&&Ys(t);else{if(!r){if(null===t.stateNode)throw Error(o(166));return Gs(t),null}if(e=$.current,ni(t))ei(t);else{switch(i=$c(Q.current),e){case 1:e=i.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:e=i.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":e=i.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":e=i.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":(e=i.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e="string"==typeof r.is?i.createElement("select",{is:r.is}):i.createElement("select"),r.multiple?e.multiple=!0:r.size&&(e.size=r.size);break;default:e="string"==typeof r.is?i.createElement(n,{is:r.is}):i.createElement(n)}}e[Pe]=t,e[ze]=r;e:for(i=t.child;null!==i;){if(5===i.tag||6===i.tag)e.appendChild(i.stateNode);else if(4!==i.tag&&27!==i.tag&&null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break e;for(;null===i.sibling;){if(null===i.return||i.return===t)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}t.stateNode=e;e:switch(Vc(e,n,r),n){case"button":case"input":case"select":case"textarea":e=!!r.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&Ys(t)}}return Gs(t),t.flags&=-16777217,null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==r&&Ys(t);else{if("string"!=typeof r&&null===t.stateNode)throw Error(o(166));if(e=Q.current,ni(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,null!==(i=Gr))switch(i.tag){case 27:case 5:r=i.memoizedProps}e[Pe]=t,(e=!!(e.nodeValue===n||null!==r&&!0===r.suppressHydrationWarning||Wc(e.nodeValue,n)))||Kr(t)}else(e=$c(e).createTextNode(r))[Pe]=t,t.stateNode=e}return Gs(t),null;case 13:if(r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(i=ni(t),null!==r&&null!==r.dehydrated){if(null===e){if(!i)throw Error(o(318));if(!(i=null!==(i=t.memoizedState)?i.dehydrated:null))throw Error(o(317));i[Pe]=t}else ri(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Gs(t),i=!1}else null!==Qr&&(Du(Qr),Qr=null),i=!0;if(!i)return 256&t.flags?(Ci(t),t):(Ci(t),null)}if(Ci(t),128&t.flags)return t.lanes=n,t;if(n=null!==r,e=null!==e&&null!==e.memoizedState,n){i=null,null!==(r=t.child).alternate&&null!==r.alternate.memoizedState&&null!==r.alternate.memoizedState.cachePool&&(i=r.alternate.memoizedState.cachePool.pool);var a=null;null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(a=r.memoizedState.cachePool.pool),a!==i&&(r.flags|=2048)}return n!==e&&n&&(t.child.flags|=8192),Vs(t,t.updateQueue),Gs(t),null;case 4:return K(),null===e&&kc(t.stateNode.containerInfo),Gs(t),null;case 10:return vl(t.type),Gs(t),null;case 19:if(j(Di),null===(i=t.memoizedState))return Gs(t),null;if(r=!!(128&t.flags),null===(a=i.rendering))if(r)js(i,!1);else{if(0!==uu||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(a=Mi(e))){for(t.flags|=128,js(i,!1),e=a.updateQueue,t.updateQueue=e,Vs(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)Ps(n,e),n=n.sibling;return G(Di,1&Di.current|2),t.child}e=e.sibling}null!==i.tail&&le()>yu&&(t.flags|=128,r=!0,js(i,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=Mi(a))){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,Vs(t,e),js(i,!0),null===i.tail&&"hidden"===i.tailMode&&!a.alternate&&!qr)return Gs(t),null}else 2*le()-i.renderingStartTime>yu&&536870912!==n&&(t.flags|=128,r=!0,js(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(null!==(e=i.last)?e.sibling=a:t.child=a,i.last=a)}return null!==i.tail?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=le(),t.sibling=null,e=Di.current,G(Di,r?1&e|2:1&e),t):(Gs(t),null);case 22:case 23:return Ci(t),Oi(),r=null!==t.memoizedState,null!==e?null!==e.memoizedState!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?!!(536870912&n)&&!(128&t.flags)&&(Gs(t),6&t.subtreeFlags&&(t.flags|=8192)):Gs(t),null!==(n=t.updateQueue)&&Vs(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),r=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),null!==e&&j(Gi),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),vl(zi),Gs(t),null;case 25:return null}throw Error(o(156,t.tag))}function qs(e,t){switch(jr(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return vl(zi),K(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return te(t),null;case 13:if(Ci(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(o(340));ri()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return j(Di),null;case 4:return K(),null;case 10:return vl(t.type),null;case 22:case 23:return Ci(t),Oi(),null!==e&&j(Gi),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return vl(zi),null;default:return null}}function Qs(e,t){switch(jr(t),t.tag){case 3:vl(zi),K();break;case 26:case 27:case 5:te(t);break;case 4:K();break;case 13:Ci(t);break;case 19:j(Di);break;case 10:vl(t.type);break;case 22:case 23:Ci(t),Oi(),null!==e&&j(Gi);break;case 24:vl(zi)}}var Js={getCacheForType:function(e){var t=Sl(zi),n=t.data.get(e);return void 0===n&&(n=e(),t.data.set(e,n)),n}},Zs="function"==typeof WeakMap?WeakMap:Map,Ks=0,eu=null,tu=null,nu=0,ru=0,iu=null,au=!1,ou=!1,lu=!1,su=0,uu=0,cu=0,du=0,fu=0,hu=0,pu=0,gu=null,mu=null,bu=!1,vu=0,yu=1/0,Tu=null,_u=null,Eu=!1,wu=null,Su=0,Lu=0,Ou=null,Nu=0,Au=null;function Ru(){return 2&Ks&&0!==nu?nu&-nu:null!==R.T?0!==Yi?Yi:Tc():Ie()}function xu(){0===hu&&(hu=536870912&nu&&!qr?536870912:Ae());var e=Ni.current;return null!==e&&(e.flags|=32),hu}function ku(e,t,n){(e===eu&&2===ru||null!==e.cancelPendingCommit)&&(Uu(e,0),Bu(e,nu,hu,!1)),ke(e,n),2&Ks&&e===eu||(e===eu&&(!(2&Ks)&&(du|=n),4===uu&&Bu(e,nu,hu,!1)),pc(e))}function Cu(e,t,n){if(6&Ks)throw Error(o(327));for(var r=!n&&!(60&t)&&!(t&e.expiredLanes)||Oe(e,t),i=r?function(e,t){var n=Ks;Ks|=2;var r=Wu(),i=Hu();eu!==e||nu!==t?(Tu=null,yu=le()+500,Uu(e,t)):ou=Oe(e,t);e:for(;;)try{if(0!==ru&&null!==tu){t=tu;var a=iu;t:switch(ru){case 1:ru=0,iu=null,qu(e,t,a,1);break;case 2:if(si(a)){ru=0,iu=null,$u(t);break}t=function(){2===ru&&eu===e&&(ru=7),pc(e)},a.then(t,t);break e;case 3:ru=7;break e;case 4:ru=5;break e;case 7:si(a)?(ru=0,iu=null,$u(t)):(ru=0,iu=null,qu(e,t,a,7));break;case 5:var l=null;switch(tu.tag){case 26:l=tu.memoizedState;case 5:case 27:var s=tu;if(!l||Ad(l)){ru=0,iu=null;var u=s.sibling;if(null!==u)tu=u;else{var c=s.return;null!==c?(tu=c,Qu(c)):tu=null}break t}}ru=0,iu=null,qu(e,t,a,5);break;case 6:ru=0,iu=null,qu(e,t,a,6);break;case 8:zu(),uu=6;break e;default:throw Error(o(462))}}ju();break}catch(t){Fu(e,t)}return ml=gl=null,R.H=r,R.A=i,Ks=n,null!==tu?0:(eu=null,nu=0,Lr(),uu)}(e,t):Xu(e,t,!0),a=r;;){if(0===i){ou&&!r&&Bu(e,t,0,!1);break}if(6===i)Bu(e,t,0,!au);else{if(n=e.current.alternate,a&&!Iu(n)){i=Xu(e,t,!1),a=!1;continue}if(2===i){if(a=t,e.errorRecoveryDisabledLanes&a)var l=0;else l=0!=(l=-536870913&e.pendingLanes)?l:536870912&l?536870912:0;if(0!==l){t=l;e:{var s=e;i=gu;var u=s.current.memoizedState.isDehydrated;if(u&&(Uu(s,l).flags|=256),2!==(l=Xu(s,l,!1))){if(lu&&!u){s.errorRecoveryDisabledLanes|=a,du|=a,i=4;break e}a=mu,mu=i,null!==a&&Du(a)}i=l}if(a=!1,2!==i)continue}}if(1===i){Uu(e,0),Bu(e,t,0,!0);break}e:{switch(r=e,i){case 0:case 1:throw Error(o(345));case 4:if((4194176&t)===t){Bu(r,t,hu,!au);break e}break;case 2:mu=null;break;case 3:case 5:break;default:throw Error(o(329))}if(r.finishedWork=n,r.finishedLanes=t,(62914560&t)===t&&10<(a=vu+300-le())){if(Bu(r,t,hu,!au),0!==Le(r,0))break e;r.timeoutHandle=Kc(Mu.bind(null,r,n,mu,Tu,bu,t,hu,du,pu,au,2,-0,0),a)}else Mu(r,n,mu,Tu,bu,t,hu,du,pu,au,0,-0,0)}}break}pc(e)}function Du(e){null===mu?mu=e:mu.push.apply(mu,e)}function Mu(e,t,n,r,i,a,l,s,u,c,d,f,h){var p=t.subtreeFlags;if((8192&p||!(16785408&~p))&&(Rd={stylesheets:null,count:0,unsuspend:xd},Ns(t),null!==(t=function(){if(null===Rd)throw Error(o(475));var e=Rd;return e.stylesheets&&0===e.count&&Dd(e,e.stylesheets),0<e.count?function(t){var n=setTimeout((function(){if(e.stylesheets&&Dd(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}),6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(n)}}:null}())))return e.cancelPendingCommit=t(Zu.bind(null,e,n,r,i,l,s,u,1,f,h)),void Bu(e,a,l,!c);Zu(e,n,r,i,l,s,u)}function Iu(e){for(var t=e;;){var n=t.tag;if((0===n||11===n||15===n)&&16384&t.flags&&null!==(n=t.updateQueue)&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Gn(a(),i))return!1}catch(e){return!1}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Bu(e,t,n,r){t&=~fu,t&=~du,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-ye(i),o=1<<a;r[a]=-1,i&=~o}0!==n&&Ce(e,n,t)}function Pu(){return!!(6&Ks)||(gc(0,!1),!1)}function zu(){if(null!==tu){if(0===ru)var e=tu.return;else ml=gl=null,ma(e=tu),hi=null,pi=0,e=tu;for(;null!==e;)Qs(e.alternate,e),e=e.return;tu=null}}function Uu(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;-1!==n&&(e.timeoutHandle=-1,ed(n)),null!==(n=e.cancelPendingCommit)&&(e.cancelPendingCommit=null,n()),zu(),eu=e,tu=n=Bs(e.current,null),nu=t,ru=0,iu=null,au=!1,ou=Oe(e,t),lu=!1,pu=hu=fu=du=cu=uu=0,mu=gu=null,bu=!1,8&t&&(t|=32&t);var r=e.entangledLanes;if(0!==r)for(e=e.entanglements,r&=t;0<r;){var i=31-ye(r),a=1<<i;t|=e[i],r&=~a}return su=t,Lr(),n}function Fu(e,t){Zi=null,R.H=So,t===ai?(t=fi(),ru=3):t===oi?(t=fi(),ru=4):ru=t===Ho?8:null!==t&&"object"==typeof t&&"function"==typeof t.then?6:1,iu=t,null===tu&&(uu=1,Po(e,Dr(t,e.current)))}function Wu(){var e=R.H;return R.H=So,null===e?So:e}function Hu(){var e=R.A;return R.A=Js,e}function Yu(){uu=4,au||(4194176&nu)!==nu&&null!==Ni.current||(ou=!0),!(134217727&cu)&&!(134217727&du)||null===eu||Bu(eu,nu,hu,!1)}function Xu(e,t,n){var r=Ks;Ks|=2;var i=Wu(),a=Hu();eu===e&&nu===t||(Tu=null,Uu(e,t)),t=!1;var o=uu;e:for(;;)try{if(0!==ru&&null!==tu){var l=tu,s=iu;switch(ru){case 8:zu(),o=6;break e;case 3:case 2:case 6:null===Ni.current&&(t=!0);var u=ru;if(ru=0,iu=null,qu(e,l,s,u),n&&ou){o=0;break e}break;default:u=ru,ru=0,iu=null,qu(e,l,s,u)}}Vu(),o=uu;break}catch(t){Fu(e,t)}return t&&e.shellSuspendCounter++,ml=gl=null,Ks=r,R.H=i,R.A=a,null===tu&&(eu=null,nu=0,Lr()),o}function Vu(){for(;null!==tu;)Gu(tu)}function ju(){for(;null!==tu&&!ae();)Gu(tu)}function Gu(e){var t=hl(e.alternate,e,su);e.memoizedProps=e.pendingProps,null===t?Qu(e):tu=t}function $u(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Zo(n,t,t.pendingProps,t.type,void 0,nu);break;case 11:t=Zo(n,t,t.pendingProps,t.type.render,t.ref,nu);break;case 5:ma(t);default:Qs(n,t),t=hl(n,t=tu=Ps(t,su),su)}e.memoizedProps=e.pendingProps,null===t?Qu(e):tu=t}function qu(e,t,n,r){ml=gl=null,ma(t),hi=null,pi=0;var i=t.return;try{if(function(e,t,n,r,i){if(n.flags|=32768,null!==r&&"object"==typeof r&&"function"==typeof r.then){if(null!==(t=n.alternate)&&_l(t,n,i,!0),null!==(n=Ni.current)){switch(n.tag){case 13:return null===Ai?Yu():null===n.alternate&&0===uu&&(uu=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===li?n.flags|=16384:(null===(t=n.updateQueue)?n.updateQueue=new Set([r]):t.add(r),rc(e,r,i)),!1;case 22:return n.flags|=65536,r===li?n.flags|=16384:(null===(t=n.updateQueue)?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):null===(n=t.retryQueue)?t.retryQueue=new Set([r]):n.add(r),rc(e,r,i)),!1}throw Error(o(435,n.tag))}return rc(e,r,i),Yu(),!1}if(qr)return null!==(t=Ni.current)?(!(65536&t.flags)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==Zr&&ii(Dr(e=Error(o(422),{cause:r}),n))):(r!==Zr&&ii(Dr(t=Error(o(423),{cause:r}),n)),(e=e.current.alternate).flags|=65536,i&=-i,e.lanes|=i,r=Dr(r,n),Dl(e,i=Uo(e.stateNode,r,i)),4!==uu&&(uu=2)),!1;var a=Error(o(520),{cause:r});if(a=Dr(a,n),null===gu?gu=[a]:gu.push(a),4!==uu&&(uu=2),null===t)return!0;r=Dr(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,Dl(n,e=Uo(n.stateNode,r,e)),!1;case 1:if(t=n.type,a=n.stateNode,!(128&n.flags||"function"!=typeof t.getDerivedStateFromError&&(null===a||"function"!=typeof a.componentDidCatch||null!==_u&&_u.has(a))))return n.flags|=65536,i&=-i,n.lanes|=i,Wo(i=Fo(i),e,n,r),Dl(n,i),!1}n=n.return}while(null!==n);return!1}(e,i,t,n,nu))return uu=1,Po(e,Dr(n,e.current)),void(tu=null)}catch(t){if(null!==i)throw tu=i,t;return uu=1,Po(e,Dr(n,e.current)),void(tu=null)}32768&t.flags?(qr||1===r?e=!0:ou||536870912&nu?e=!1:(au=e=!0,(2===r||3===r||6===r)&&null!==(r=Ni.current)&&13===r.tag&&(r.flags|=16384)),Ju(t,e)):Qu(t)}function Qu(e){var t=e;do{if(32768&t.flags)return void Ju(t,au);e=t.return;var n=$s(t.alternate,t,su);if(null!==n)return void(tu=n);if(null!==(t=t.sibling))return void(tu=t);tu=t=e}while(null!==t);0===uu&&(uu=5)}function Ju(e,t){do{var n=qs(e.alternate,e);if(null!==n)return n.flags&=32767,void(tu=n);if(null!==(n=e.return)&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&null!==(e=e.sibling))return void(tu=e);tu=e=n}while(null!==e);uu=6,tu=null}function Zu(e,t,n,r,i,a,l,s,u,c){var d=R.T,f=W.p;try{W.p=2,R.T=null,function(e,t,n,r,i,a,l,s){do{ec()}while(null!==wu);if(6&Ks)throw Error(o(327));var u=e.finishedWork;if(r=e.finishedLanes,null===u)return null;if(e.finishedWork=null,e.finishedLanes=0,u===e.current)throw Error(o(177));e.callbackNode=null,e.callbackPriority=0,e.cancelPendingCommit=null;var c=u.lanes|u.childLanes;if(function(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var l=e.entanglements,s=e.expirationTimes,u=e.hiddenUpdates;for(n=o&~n;0<n;){var c=31-ye(n),d=1<<c;l[c]=0,s[c]=-1;var f=u[c];if(null!==f)for(u[c]=null,c=0;c<f.length;c++){var h=f[c];null!==h&&(h.lane&=-536870913)}n&=~d}0!==r&&Ce(e,r,0),0!==a&&0===i&&0!==e.tag&&(e.suspendedLanes|=a&~(o&~t))}(e,r,c|=Sr,a,l,s),e===eu&&(tu=eu=null,nu=0),!(10256&u.subtreeFlags)&&!(10256&u.flags)||Eu||(Eu=!0,Lu=c,Ou=n,re(de,(function(){return ec(),null}))),n=!!(15990&u.flags),15990&u.subtreeFlags||n?(n=R.T,R.T=null,a=W.p,W.p=2,l=Ks,Ks|=4,function(e,t){if(e=e.containerInfo,jc=Wd,Kn(e=Zn(e))){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch(e){n=null;break e}var l=0,s=-1,u=-1,c=0,d=0,f=e,h=null;t:for(;;){for(var p;f!==n||0!==i&&3!==f.nodeType||(s=l+i),f!==a||0!==r&&3!==f.nodeType||(u=l+r),3===f.nodeType&&(l+=f.nodeValue.length),null!==(p=f.firstChild);)h=f,f=p;for(;;){if(f===e)break t;if(h===n&&++c===i&&(s=l),h===a&&++d===r&&(u=l),null!==(p=f.nextSibling))break;h=(f=h).parentNode}f=p}n=-1===s||-1===u?null:{start:s,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Gc={focusedElem:e,selectionRange:n},Wd=!1,ts=t;null!==ts;)if(e=(t=ts).child,1028&t.subtreeFlags&&null!==e)e.return=t,ts=e;else for(;null!==ts;){switch(a=(t=ts).alternate,e=t.flags,t.tag){case 0:case 11:case 15:case 5:case 26:case 27:case 6:case 4:case 17:break;case 1:if(1024&e&&null!==a){e=void 0,n=t,i=a.memoizedProps,a=a.memoizedState,r=n.stateNode;try{var g=Co(n.type,i,(n.elementType,n.type));e=r.getSnapshotBeforeUpdate(g,a),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){nc(n,n.return,e)}}break;case 3:if(1024&e)if(9===(n=(e=t.stateNode.containerInfo).nodeType))ad(e);else if(1===n)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":ad(e);break;default:e.textContent=""}break;default:if(1024&e)throw Error(o(163))}if(null!==(e=t.sibling)){e.return=t.return,ts=e;break}ts=t.return}g=ns,ns=!1}(e,u),hs(u,e),er(Gc,e.containerInfo),Wd=!!jc,Gc=jc=null,e.current=u,rs(e,u.alternate,u),oe(),Ks=l,W.p=a,R.T=n):e.current=u,Eu?(Eu=!1,wu=e,Su=r):Ku(e,c),0===(c=e.pendingLanes)&&(_u=null),function(e){if(be&&"function"==typeof be.onCommitFiberRoot)try{be.onCommitFiberRoot(me,e,void 0,!(128&~e.current.flags))}catch(e){}}(u.stateNode),pc(e),null!==t)for(i=e.onRecoverableError,u=0;u<t.length;u++)i((c=t[u]).value,{componentStack:c.stack});!!(3&Su)&&ec(),c=e.pendingLanes,4194218&r&&42&c?e===Au?Nu++:(Nu=0,Au=e):Nu=0,gc(0,!1)}(e,t,n,r,f,i,a,l)}finally{R.T=d,W.p=f}}function Ku(e,t){0==(e.pooledCacheLanes&=t)&&null!=(t=e.pooledCache)&&(e.pooledCache=null,Fi(t))}function ec(){if(null!==wu){var e=wu,t=Lu;Lu=0;var n=Me(Su),r=R.T,i=W.p;try{if(W.p=32>n?32:n,R.T=null,null===wu)var a=!1;else{n=Ou,Ou=null;var l=wu,s=Su;if(wu=null,Su=0,6&Ks)throw Error(o(331));var u=Ks;if(Ks|=4,xs(l.current),Es(l,l.current,s,n),Ks=u,gc(0,!1),be&&"function"==typeof be.onPostCommitFiberRoot)try{be.onPostCommitFiberRoot(me,l)}catch(e){}a=!0}return a}finally{W.p=i,R.T=r,Ku(e,t)}}return!1}function tc(e,t,n){t=Dr(n,t),null!==(e=kl(e,t=Uo(e.stateNode,t,2),2))&&(ke(e,2),pc(e))}function nc(e,t,n){if(3===e.tag)tc(e,e,n);else for(;null!==t;){if(3===t.tag){tc(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===_u||!_u.has(r))){e=Dr(n,e),null!==(r=kl(t,n=Fo(2),2))&&(Wo(n,r,t,e),ke(r,2),pc(r));break}}t=t.return}}function rc(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new Zs;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(lu=!0,i.add(n),e=ic.bind(null,e,t,n),t.then(e,e))}function ic(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,eu===e&&(nu&n)===n&&(4===uu||3===uu&&(62914560&nu)===nu&&300>le()-vu?!(2&Ks)&&Uu(e,0):fu|=n,pu===nu&&(pu=0)),pc(e)}function ac(e,t){0===t&&(t=Re()),null!==(e=Ar(e,t))&&(ke(e,t),pc(e))}function oc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),ac(e,n)}function lc(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(o(314))}null!==r&&r.delete(t),ac(e,n)}var sc=null,uc=null,cc=!1,dc=!1,fc=!1,hc=0;function pc(e){var t;e!==uc&&null===e.next&&(null===uc?sc=uc=e:uc=uc.next=e),dc=!0,cc||(cc=!0,t=mc,nd((function(){6&Ks?re(ue,t):t()})))}function gc(e,t){if(!fc&&dc){fc=!0;do{for(var n=!1,r=sc;null!==r;){if(!t)if(0!==e){var i=r.pendingLanes;if(0===i)var a=0;else{var o=r.suspendedLanes,l=r.pingedLanes;a=(1<<31-ye(42|e)+1)-1,a=201326677&(a&=i&~(o&~l))?201326677&a|1:a?2|a:0}0!==a&&(n=!0,yc(r,a))}else a=nu,!(3&(a=Le(r,r===eu?a:0)))||Oe(r,a)||(n=!0,yc(r,a));r=r.next}}while(n);fc=!1}}function mc(){dc=cc=!1;var e,t=0;0!==hc&&(((e=window.event)&&"popstate"===e.type?e!==Zc&&(Zc=e,!0):(Zc=null,!1))&&(t=hc),hc=0);for(var n=le(),r=null,i=sc;null!==i;){var a=i.next,o=bc(i,n);0===o?(i.next=null,null===r?sc=a:r.next=a,null===a&&(uc=r)):(r=i,(0!==t||3&o)&&(dc=!0)),i=a}gc(t,!1)}function bc(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=-62914561&e.pendingLanes;0<a;){var o=31-ye(a),l=1<<o,s=i[o];-1===s?l&n&&!(l&r)||(i[o]=Ne(l,t)):s<=t&&(e.expiredLanes|=l),a&=~l}if(n=nu,n=Le(e,e===(t=eu)?n:0),r=e.callbackNode,0===n||e===t&&2===ru||null!==e.cancelPendingCommit)return null!==r&&null!==r&&ie(r),e.callbackNode=null,e.callbackPriority=0;if(!(3&n)||Oe(e,n)){if((t=n&-n)===e.callbackPriority)return t;switch(null!==r&&ie(r),Me(n)){case 2:case 8:n=ce;break;case 32:default:n=de;break;case 268435456:n=he}return r=vc.bind(null,e),n=re(n,r),e.callbackPriority=t,e.callbackNode=n,t}return null!==r&&null!==r&&ie(r),e.callbackPriority=2,e.callbackNode=null,2}function vc(e,t){var n=e.callbackNode;if(ec()&&e.callbackNode!==n)return null;var r=nu;return 0===(r=Le(e,e===eu?r:0))?null:(Cu(e,r,t),bc(e,le()),null!=e.callbackNode&&e.callbackNode===n?vc.bind(null,e):null)}function yc(e,t){if(ec())return null;Cu(e,t,!0)}function Tc(){return 0===hc&&(hc=Ae()),hc}function _c(e){return null==e||"symbol"==typeof e||"boolean"==typeof e?null:"function"==typeof e?e:At(""+e)}function Ec(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}for(var wc=0;wc<Tr.length;wc++){var Sc=Tr[wc];_r(Sc.toLowerCase(),"on"+(Sc[0].toUpperCase()+Sc.slice(1)))}_r(fr,"onAnimationEnd"),_r(hr,"onAnimationIteration"),_r(pr,"onAnimationStart"),_r("dblclick","onDoubleClick"),_r("focusin","onFocus"),_r("focusout","onBlur"),_r(gr,"onTransitionRun"),_r(mr,"onTransitionStart"),_r(br,"onTransitionCancel"),_r(vr,"onTransitionEnd"),et("onMouseEnter",["mouseout","mouseover"]),et("onMouseLeave",["mouseout","mouseover"]),et("onPointerEnter",["pointerout","pointerover"]),et("onPointerLeave",["pointerout","pointerover"]),Ke("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ke("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ke("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ke("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ke("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ke("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Lc="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Oc=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Lc));function Nc(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var l=r[o],s=l.instance,u=l.currentTarget;if(l=l.listener,s!==a&&i.isPropagationStopped())break e;a=l,i.currentTarget=u;try{a(i)}catch(e){Do(e)}i.currentTarget=null,a=s}else for(o=0;o<r.length;o++){if(s=(l=r[o]).instance,u=l.currentTarget,l=l.listener,s!==a&&i.isPropagationStopped())break e;a=l,i.currentTarget=u;try{a(i)}catch(e){Do(e)}i.currentTarget=null,a=s}}}}function Ac(e,t){var n=t[Fe];void 0===n&&(n=t[Fe]=new Set);var r=e+"__bubble";n.has(r)||(Cc(t,e,2,!1),n.add(r))}function Rc(e,t,n){var r=0;t&&(r|=4),Cc(n,e,r,t)}var xc="_reactListening"+Math.random().toString(36).slice(2);function kc(e){if(!e[xc]){e[xc]=!0,Je.forEach((function(t){"selectionchange"!==t&&(Oc.has(t)||Rc(t,!1,e),Rc(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[xc]||(t[xc]=!0,Rc("selectionchange",!1,t))}}function Cc(e,t,n,r){switch($d(t)){case 2:var i=Hd;break;case 8:i=Yd;break;default:i=Xd}n=i.bind(null,t,n,e),i=void 0,!Pt||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Dc(e,t,n,r,i){var a=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var o=r.tag;if(3===o||4===o){var l=r.stateNode.containerInfo;if(l===i||8===l.nodeType&&l.parentNode===i)break;if(4===o)for(o=r.return;null!==o;){var s=o.tag;if((3===s||4===s)&&((s=o.stateNode.containerInfo)===i||8===s.nodeType&&s.parentNode===i))return;o=o.return}for(;null!==l;){if(null===(o=je(l)))return;if(5===(s=o.tag)||6===s||26===s||27===s){r=a=o;continue e}l=l.parentNode}}r=r.return}It((function(){var r=a,i=xt(n),o=[];e:{var l=yr.get(e);if(void 0!==l){var s=Jt,u=e;switch(e){case"keypress":if(0===Yt(n))break e;case"keydown":case"keyup":s=hn;break;case"focusin":u="focus",s=rn;break;case"focusout":u="blur",s=rn;break;case"beforeblur":case"afterblur":s=rn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":s=tn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":s=nn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":s=gn;break;case fr:case hr:case pr:s=an;break;case vr:s=mn;break;case"scroll":case"scrollend":s=Kt;break;case"wheel":s=bn;break;case"copy":case"cut":case"paste":s=on;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":s=pn;break;case"toggle":case"beforetoggle":s=vn}var c=!!(4&t),d=!c&&("scroll"===e||"scrollend"===e),f=c?null!==l?l+"Capture":null:l;c=[];for(var h,p=r;null!==p;){var g=p;if(h=g.stateNode,5!==(g=g.tag)&&26!==g&&27!==g||null===h||null===f||null!=(g=Bt(p,f))&&c.push(Mc(p,g,h)),d)break;p=p.return}0<c.length&&(l=new s(l,u,null,n,i),o.push({event:l,listeners:c}))}}if(!(7&t)){if(s="mouseout"===e||"pointerout"===e,(!(l="mouseover"===e||"pointerover"===e)||n===Rt||!(u=n.relatedTarget||n.fromElement)||!je(u)&&!u[Ue])&&(s||l)&&(l=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,s?(s=r,null!==(u=(u=n.relatedTarget||n.toElement)?je(u):null)&&(d=B(u),c=u.tag,u!==d||5!==c&&27!==c&&6!==c)&&(u=null)):(s=null,u=r),s!==u)){if(c=tn,g="onMouseLeave",f="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(c=pn,g="onPointerLeave",f="onPointerEnter",p="pointer"),d=null==s?l:$e(s),h=null==u?l:$e(u),(l=new c(g,p+"leave",s,n,i)).target=d,l.relatedTarget=h,g=null,je(i)===r&&((c=new c(f,p+"enter",u,n,i)).target=h,c.relatedTarget=d,g=c),d=g,s&&u)e:{for(f=u,p=0,h=c=s;h;h=Bc(h))p++;for(h=0,g=f;g;g=Bc(g))h++;for(;0<p-h;)c=Bc(c),p--;for(;0<h-p;)f=Bc(f),h--;for(;p--;){if(c===f||null!==f&&c===f.alternate)break e;c=Bc(c),f=Bc(f)}c=null}else c=null;null!==s&&Pc(o,l,s,c,!1),null!==u&&null!==d&&Pc(o,d,u,c,!0)}if("select"===(s=(l=r?$e(r):window).nodeName&&l.nodeName.toLowerCase())||"input"===s&&"file"===l.type)var m=Bn;else if(xn(l))if(Pn)m=jn;else{m=Xn;var b=Yn}else!(s=l.nodeName)||"input"!==s.toLowerCase()||"checkbox"!==l.type&&"radio"!==l.type?r&&Lt(r.elementType)&&(m=Bn):m=Vn;switch(m&&(m=m(e,r))?kn(o,m,n,i):(b&&b(e,l,r),"focusout"===e&&r&&"number"===l.type&&null!=r.memoizedProps.value&&bt(l,"number",l.value)),b=r?$e(r):window,e){case"focusin":(xn(b)||"true"===b.contentEditable)&&(nr=b,rr=r,ir=null);break;case"focusout":ir=rr=nr=null;break;case"mousedown":ar=!0;break;case"contextmenu":case"mouseup":case"dragend":ar=!1,or(o,n,i);break;case"selectionchange":if(tr)break;case"keydown":case"keyup":or(o,n,i)}var v;if(Tn)e:{switch(e){case"compositionstart":var y="onCompositionStart";break e;case"compositionend":y="onCompositionEnd";break e;case"compositionupdate":y="onCompositionUpdate";break e}y=void 0}else An?On(e,n)&&(y="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(y="onCompositionStart");y&&(wn&&"ko"!==n.locale&&(An||"onCompositionStart"!==y?"onCompositionEnd"===y&&An&&(v=Ht()):(Ft="value"in(Ut=i)?Ut.value:Ut.textContent,An=!0)),0<(b=Ic(r,y)).length&&(y=new ln(y,e,null,n,i),o.push({event:y,listeners:b}),(v||null!==(v=Nn(n)))&&(y.data=v))),(v=En?function(e,t){switch(e){case"compositionend":return Nn(t);case"keypress":return 32!==t.which?null:(Ln=!0,Sn);case"textInput":return(e=t.data)===Sn&&Ln?null:e;default:return null}}(e,n):function(e,t){if(An)return"compositionend"===e||!Tn&&On(e,t)?(e=Ht(),Wt=Ft=Ut=null,An=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return wn&&"ko"!==t.locale?null:t.data}}(e,n))&&0<(y=Ic(r,"onBeforeInput")).length&&(b=new ln("onBeforeInput","beforeinput",null,n,i),o.push({event:b,listeners:y}),b.data=v),function(e,t,n,r,i){if("submit"===t&&n&&n.stateNode===i){var a=_c((i[ze]||null).action),o=r.submitter;o&&null!==(t=(t=o[ze]||null)?_c(t.formAction):o.getAttribute("formAction"))&&(a=t,o=null);var l=new Jt("action","action",null,r,i);e.push({event:l,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(0!==hc){var e=o?Ec(i,o):new FormData(i);uo(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else"function"==typeof a&&(l.preventDefault(),e=o?Ec(i,o):new FormData(i),uo(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}(o,e,r,n,i)}Nc(o,t)}))}function Mc(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ic(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,a=i.stateNode;5!==(i=i.tag)&&26!==i&&27!==i||null===a||(null!=(i=Bt(e,n))&&r.unshift(Mc(e,i,a)),null!=(i=Bt(e,t))&&r.push(Mc(e,i,a))),e=e.return}return r}function Bc(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag&&27!==e.tag);return e||null}function Pc(e,t,n,r,i){for(var a=t._reactName,o=[];null!==n&&n!==r;){var l=n,s=l.alternate,u=l.stateNode;if(l=l.tag,null!==s&&s===r)break;5!==l&&26!==l&&27!==l||null===u||(s=u,i?null!=(u=Bt(n,a))&&o.unshift(Mc(n,u,s)):i||null!=(u=Bt(n,a))&&o.push(Mc(n,u,s))),n=n.return}0!==o.length&&e.push({event:t,listeners:o})}var zc=/\r\n?/g,Uc=/\u0000|\uFFFD/g;function Fc(e){return("string"==typeof e?e:""+e).replace(zc,"\n").replace(Uc,"")}function Wc(e,t){return t=Fc(t),Fc(e)===t}function Hc(){}function Yc(e,t,n,r,i,a){switch(n){case"children":"string"==typeof r?"body"===t||"textarea"===t&&""===r||_t(e,r):("number"==typeof r||"bigint"==typeof r)&&"body"!==t&&_t(e,""+r);break;case"className":ot(e,"class",r);break;case"tabIndex":ot(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":ot(e,n,r);break;case"style":St(e,r,a);break;case"data":if("object"!==t){ot(e,"data",r);break}case"src":case"href":if(""===r&&("a"!==t||"href"!==n)){e.removeAttribute(n);break}if(null==r||"function"==typeof r||"symbol"==typeof r||"boolean"==typeof r){e.removeAttribute(n);break}r=At(""+r),e.setAttribute(n,r);break;case"action":case"formAction":if("function"==typeof r){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}if("function"==typeof a&&("formAction"===n?("input"!==t&&Yc(e,t,"name",i.name,i,null),Yc(e,t,"formEncType",i.formEncType,i,null),Yc(e,t,"formMethod",i.formMethod,i,null),Yc(e,t,"formTarget",i.formTarget,i,null)):(Yc(e,t,"encType",i.encType,i,null),Yc(e,t,"method",i.method,i,null),Yc(e,t,"target",i.target,i,null))),null==r||"symbol"==typeof r||"boolean"==typeof r){e.removeAttribute(n);break}r=At(""+r),e.setAttribute(n,r);break;case"onClick":null!=r&&(e.onclick=Hc);break;case"onScroll":null!=r&&Ac("scroll",e);break;case"onScrollEnd":null!=r&&Ac("scrollend",e);break;case"dangerouslySetInnerHTML":if(null!=r){if("object"!=typeof r||!("__html"in r))throw Error(o(61));if(null!=(n=r.__html)){if(null!=i.children)throw Error(o(60));e.innerHTML=n}}break;case"multiple":e.multiple=r&&"function"!=typeof r&&"symbol"!=typeof r;break;case"muted":e.muted=r&&"function"!=typeof r&&"symbol"!=typeof r;break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":case"autoFocus":break;case"xlinkHref":if(null==r||"function"==typeof r||"boolean"==typeof r||"symbol"==typeof r){e.removeAttribute("xlink:href");break}n=At(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":null!=r&&"function"!=typeof r&&"symbol"!=typeof r?e.setAttribute(n,""+r):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&"function"!=typeof r&&"symbol"!=typeof r?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":!0===r?e.setAttribute(n,""):!1!==r&&null!=r&&"function"!=typeof r&&"symbol"!=typeof r?e.setAttribute(n,r):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":null!=r&&"function"!=typeof r&&"symbol"!=typeof r&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case"rowSpan":case"start":null==r||"function"==typeof r||"symbol"==typeof r||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case"popover":Ac("beforetoggle",e),Ac("toggle",e),at(e,"popover",r);break;case"xlinkActuate":lt(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":lt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":lt(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":lt(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":lt(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":lt(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":lt(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":lt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":lt(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":at(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])&&at(e,n=Ot.get(n)||n,r)}}function Xc(e,t,n,r,i,a){switch(n){case"style":St(e,r,a);break;case"dangerouslySetInnerHTML":if(null!=r){if("object"!=typeof r||!("__html"in r))throw Error(o(61));if(null!=(n=r.__html)){if(null!=i.children)throw Error(o(60));e.innerHTML=n}}break;case"children":"string"==typeof r?_t(e,r):("number"==typeof r||"bigint"==typeof r)&&_t(e,""+r);break;case"onScroll":null!=r&&Ac("scroll",e);break;case"onScrollEnd":null!=r&&Ac("scrollend",e);break;case"onClick":null!=r&&(e.onclick=Hc);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":case"innerText":case"textContent":break;default:Ze.hasOwnProperty(n)||("o"!==n[0]||"n"!==n[1]||(i=n.endsWith("Capture"),t=n.slice(2,i?n.length-7:void 0),"function"==typeof(a=null!=(a=e[ze]||null)?a[n]:null)&&e.removeEventListener(t,a,i),"function"!=typeof r)?n in e?e[n]=r:!0===r?e.setAttribute(n,""):at(e,n,r):("function"!=typeof a&&null!==a&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i)))}}function Vc(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ac("error",e),Ac("load",e);var r,i=!1,a=!1;for(r in n)if(n.hasOwnProperty(r)){var l=n[r];if(null!=l)switch(r){case"src":i=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Yc(e,t,r,l,n,null)}}return a&&Yc(e,t,"srcSet",n.srcSet,n,null),void(i&&Yc(e,t,"src",n.src,n,null));case"input":Ac("invalid",e);var s=r=l=a=null,u=null,c=null;for(i in n)if(n.hasOwnProperty(i)){var d=n[i];if(null!=d)switch(i){case"name":a=d;break;case"type":l=d;break;case"checked":u=d;break;case"defaultChecked":c=d;break;case"value":r=d;break;case"defaultValue":s=d;break;case"children":case"dangerouslySetInnerHTML":if(null!=d)throw Error(o(137,t));break;default:Yc(e,t,i,d,n,null)}}return mt(e,r,s,u,c,l,a,!1),void ct(e);case"select":for(a in Ac("invalid",e),i=l=r=null,n)if(n.hasOwnProperty(a)&&null!=(s=n[a]))switch(a){case"value":r=s;break;case"defaultValue":l=s;break;case"multiple":i=s;default:Yc(e,t,a,s,n,null)}return t=r,n=l,e.multiple=!!i,void(null!=t?vt(e,!!i,t,!1):null!=n&&vt(e,!!i,n,!0));case"textarea":for(l in Ac("invalid",e),r=a=i=null,n)if(n.hasOwnProperty(l)&&null!=(s=n[l]))switch(l){case"value":i=s;break;case"defaultValue":a=s;break;case"children":r=s;break;case"dangerouslySetInnerHTML":if(null!=s)throw Error(o(91));break;default:Yc(e,t,l,s,n,null)}return Tt(e,i,a,r),void ct(e);case"option":for(u in n)n.hasOwnProperty(u)&&null!=(i=n[u])&&("selected"===u?e.selected=i&&"function"!=typeof i&&"symbol"!=typeof i:Yc(e,t,u,i,n,null));return;case"dialog":Ac("cancel",e),Ac("close",e);break;case"iframe":case"object":Ac("load",e);break;case"video":case"audio":for(i=0;i<Lc.length;i++)Ac(Lc[i],e);break;case"image":Ac("error",e),Ac("load",e);break;case"details":Ac("toggle",e);break;case"embed":case"source":case"link":Ac("error",e),Ac("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(c in n)if(n.hasOwnProperty(c)&&null!=(i=n[c]))switch(c){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Yc(e,t,c,i,n,null)}return;default:if(Lt(t)){for(d in n)n.hasOwnProperty(d)&&void 0!==(i=n[d])&&Xc(e,t,d,i,n,void 0);return}}for(s in n)n.hasOwnProperty(s)&&null!=(i=n[s])&&Yc(e,t,s,i,n,null)}var jc=null,Gc=null;function $c(e){return 9===e.nodeType?e:e.ownerDocument}function qc(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Qc(e,t){if(0===e)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return 1===e&&"foreignObject"===t?0:e}function Jc(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"bigint"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Zc=null,Kc="function"==typeof setTimeout?setTimeout:void 0,ed="function"==typeof clearTimeout?clearTimeout:void 0,td="function"==typeof Promise?Promise:void 0,nd="function"==typeof queueMicrotask?queueMicrotask:void 0!==td?function(e){return td.resolve(null).then(e).catch(rd)}:Kc;function rd(e){setTimeout((function(){throw e}))}function id(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void hf(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);hf(t)}function ad(e){var t=e.firstChild;for(t&&10===t.nodeType&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":ad(n),Ve(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if("stylesheet"===n.rel.toLowerCase())continue}e.removeChild(n)}}function od(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t||"F!"===t||"F"===t)break;if("/$"===t)return null}}return e}function ld(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}function sd(e,t,n){switch(t=$c(n),e){case"html":if(!(e=t.documentElement))throw Error(o(452));return e;case"head":if(!(e=t.head))throw Error(o(453));return e;case"body":if(!(e=t.body))throw Error(o(454));return e;default:throw Error(o(451))}}var ud=new Map,cd=new Set;function dd(e){return"function"==typeof e.getRootNode?e.getRootNode():e.ownerDocument}var fd=W.d;W.d={f:function(){var e=fd.f(),t=Pu();return e||t},r:function(e){var t=Ge(e);null!==t&&5===t.tag&&"form"===t.type?fo(t):fd.r(e)},D:function(e){fd.D(e),pd("dns-prefetch",e,null)},C:function(e,t){fd.C(e,t),pd("preconnect",e,t)},L:function(e,t,n){fd.L(e,t,n);var r=hd;if(r&&e&&t){var i='link[rel="preload"][as="'+pt(t)+'"]';"image"===t&&n&&n.imageSrcSet?(i+='[imagesrcset="'+pt(n.imageSrcSet)+'"]',"string"==typeof n.imageSizes&&(i+='[imagesizes="'+pt(n.imageSizes)+'"]')):i+='[href="'+pt(e)+'"]';var a=i;switch(t){case"style":a=md(e);break;case"script":a=yd(e)}ud.has(a)||(e=x({rel:"preload",href:"image"===t&&n&&n.imageSrcSet?void 0:e,as:t},n),ud.set(a,e),null!==r.querySelector(i)||"style"===t&&r.querySelector(bd(a))||"script"===t&&r.querySelector(Td(a))||(Vc(t=r.createElement("link"),"link",e),Qe(t),r.head.appendChild(t)))}},m:function(e,t){fd.m(e,t);var n=hd;if(n&&e){var r=t&&"string"==typeof t.as?t.as:"script",i='link[rel="modulepreload"][as="'+pt(r)+'"][href="'+pt(e)+'"]',a=i;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":a=yd(e)}if(!ud.has(a)&&(e=x({rel:"modulepreload",href:e},t),ud.set(a,e),null===n.querySelector(i))){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Td(a)))return}Vc(r=n.createElement("link"),"link",e),Qe(r),n.head.appendChild(r)}}},X:function(e,t){fd.X(e,t);var n=hd;if(n&&e){var r=qe(n).hoistableScripts,i=yd(e),a=r.get(i);a||((a=n.querySelector(Td(i)))||(e=x({src:e,async:!0},t),(t=ud.get(i))&&Sd(e,t),Qe(a=n.createElement("script")),Vc(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},r.set(i,a))}},S:function(e,t,n){fd.S(e,t,n);var r=hd;if(r&&e){var i=qe(r).hoistableStyles,a=md(e);t=t||"default";var o=i.get(a);if(!o){var l={loading:0,preload:null};if(o=r.querySelector(bd(a)))l.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":t},n),(n=ud.get(a))&&wd(e,n);var s=o=r.createElement("link");Qe(s),Vc(s,"link",e),s._p=new Promise((function(e,t){s.onload=e,s.onerror=t})),s.addEventListener("load",(function(){l.loading|=1})),s.addEventListener("error",(function(){l.loading|=2})),l.loading|=4,Ed(o,t,r)}o={type:"stylesheet",instance:o,count:1,state:l},i.set(a,o)}}},M:function(e,t){fd.M(e,t);var n=hd;if(n&&e){var r=qe(n).hoistableScripts,i=yd(e),a=r.get(i);a||((a=n.querySelector(Td(i)))||(e=x({src:e,async:!0,type:"module"},t),(t=ud.get(i))&&Sd(e,t),Qe(a=n.createElement("script")),Vc(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},r.set(i,a))}}};var hd="undefined"==typeof document?null:document;function pd(e,t,n){var r=hd;if(r&&"string"==typeof t&&t){var i=pt(t);i='link[rel="'+e+'"][href="'+i+'"]',"string"==typeof n&&(i+='[crossorigin="'+n+'"]'),cd.has(i)||(cd.add(i),e={rel:e,crossOrigin:n,href:t},null===r.querySelector(i)&&(Vc(t=r.createElement("link"),"link",e),Qe(t),r.head.appendChild(t)))}}function gd(e,t,n,r){var i,a,l,s,u=(u=Q.current)?dd(u):null;if(!u)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return"string"==typeof n.precedence&&"string"==typeof n.href?(t=md(n.href),(r=(n=qe(u).hoistableStyles).get(t))||(r={type:"style",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if("stylesheet"===n.rel&&"string"==typeof n.href&&"string"==typeof n.precedence){e=md(n.href);var c=qe(u).hoistableStyles,d=c.get(e);if(d||(u=u.ownerDocument||u,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,d),(c=u.querySelector(bd(e)))&&!c._p&&(d.instance=c,d.state.loading=5),ud.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},ud.set(e,n),c||(i=u,a=e,l=n,s=d.state,i.querySelector('link[rel="preload"][as="style"]['+a+"]")?s.loading=1:(a=i.createElement("link"),s.preload=a,a.addEventListener("load",(function(){return s.loading|=1})),a.addEventListener("error",(function(){return s.loading|=2})),Vc(a,"link",l),Qe(a),i.head.appendChild(a))))),t&&null===r)throw Error(o(528,""));return d}if(t&&null!==r)throw Error(o(529,""));return null;case"script":return t=n.async,"string"==typeof(n=n.src)&&t&&"function"!=typeof t&&"symbol"!=typeof t?(t=yd(n),(r=(n=qe(u).hoistableScripts).get(t))||(r={type:"script",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function md(e){return'href="'+pt(e)+'"'}function bd(e){return'link[rel="stylesheet"]['+e+"]"}function vd(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function yd(e){return'[src="'+pt(e)+'"]'}function Td(e){return"script[async]"+e}function _d(e,t,n){if(t.count++,null===t.instance)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+pt(n.href)+'"]');if(r)return t.instance=r,Qe(r),r;var i=x({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return Qe(r=(e.ownerDocument||e).createElement("style")),Vc(r,"style",i),Ed(r,n.precedence,e),t.instance=r;case"stylesheet":i=md(n.href);var a=e.querySelector(bd(i));if(a)return t.state.loading|=4,t.instance=a,Qe(a),a;r=vd(n),(i=ud.get(i))&&wd(r,i),Qe(a=(e.ownerDocument||e).createElement("link"));var l=a;return l._p=new Promise((function(e,t){l.onload=e,l.onerror=t})),Vc(a,"link",r),t.state.loading|=4,Ed(a,n.precedence,e),t.instance=a;case"script":return a=yd(n.src),(i=e.querySelector(Td(a)))?(t.instance=i,Qe(i),i):(r=n,(i=ud.get(a))&&Sd(r=x({},n),i),Qe(i=(e=e.ownerDocument||e).createElement("script")),Vc(i,"link",r),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(o(443,t.type))}else"stylesheet"===t.type&&!(4&t.state.loading)&&(r=t.instance,t.state.loading|=4,Ed(r,n.precedence,e));return t.instance}function Ed(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var l=r[o];if(l.dataset.precedence===t)a=l;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=9===n.nodeType?n.head:n).insertBefore(e,t.firstChild)}function wd(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.title&&(e.title=t.title)}function Sd(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.integrity&&(e.integrity=t.integrity)}var Ld=null;function Od(e,t,n){if(null===Ld){var r=new Map,i=Ld=new Map;i.set(n,r)}else(r=(i=Ld).get(n))||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Xe]||a[Pe]||"link"===e&&"stylesheet"===a.getAttribute("rel"))&&"http://www.w3.org/2000/svg"!==a.namespaceURI){var o=a.getAttribute(t)||"";o=e+o;var l=r.get(o);l?l.push(a):r.set(o,[a])}}return r}function Nd(e,t,n){(e=e.ownerDocument||e).head.insertBefore(n,"title"===t?e.querySelector("head > title"):null)}function Ad(e){return!!("stylesheet"!==e.type||3&e.state.loading)}var Rd=null;function xd(){}function kd(){if(this.count--,0===this.count)if(this.stylesheets)Dd(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}var Cd=null;function Dd(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,Cd=new Map,t.forEach(Md,e),Cd=null,kd.call(e))}function Md(e,t){if(!(4&t.state.loading)){var n=Cd.get(e);if(n)var r=n.get(null);else{n=new Map,Cd.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a<i.length;a++){var o=i[a];"LINK"!==o.nodeName&&"not all"===o.getAttribute("media")||(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}o=(i=t.instance).getAttribute("data-precedence"),(a=n.get(o)||r)===r&&n.set(null,i),n.set(o,i),this.count++,r=kd.bind(this),i.addEventListener("load",r),i.addEventListener("error",r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=9===e.nodeType?e.head:e).insertBefore(i,e.firstChild),t.state.loading|=4}}var Id={$$typeof:g,Provider:null,Consumer:null,_currentValue:H,_currentValue2:H,_threadCount:0};function Bd(e,t,n,r,i,a,o,l){this.tag=1,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=xe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xe(0),this.hiddenUpdates=xe(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.incompleteTransitions=new Map}function Pd(e,t,n,r,i,a){i=function(e){return e?e=kr:kr}(i),null===r.context?r.context=i:r.pendingContext=i,(r=xl(t)).payload={element:n},null!==(a=void 0===a?null:a)&&(r.callback=a),null!==(n=kl(e,r,t))&&(ku(n,0,t),Cl(n,e,t))}function zd(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Ud(e,t){zd(e,t),(e=e.alternate)&&zd(e,t)}function Fd(e){if(13===e.tag){var t=Ar(e,67108864);null!==t&&ku(t,0,67108864),Ud(e,67108864)}}var Wd=!0;function Hd(e,t,n,r){var i=R.T;R.T=null;var a=W.p;try{W.p=2,Xd(e,t,n,r)}finally{W.p=a,R.T=i}}function Yd(e,t,n,r){var i=R.T;R.T=null;var a=W.p;try{W.p=8,Xd(e,t,n,r)}finally{W.p=a,R.T=i}}function Xd(e,t,n,r){if(Wd){var i=Vd(r);if(null===i)Dc(e,t,r,jd,n),rf(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Qd=af(Qd,e,t,n,r,i),!0;case"dragenter":return Jd=af(Jd,e,t,n,r,i),!0;case"mouseover":return Zd=af(Zd,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return Kd.set(a,af(Kd.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":return a=i.pointerId,ef.set(a,af(ef.get(a)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(rf(e,r),4&t&&-1<nf.indexOf(e)){for(;null!==i;){var a=Ge(i);if(null!==a)switch(a.tag){case 3:if((a=a.stateNode).current.memoizedState.isDehydrated){var o=Se(a.pendingLanes);if(0!==o){var l=a;for(l.pendingLanes|=2,l.entangledLanes|=2;o;){var s=1<<31-ye(o);l.entanglements[1]|=s,o&=~s}pc(a),!(6&Ks)&&(yu=le()+500,gc(0,!1))}}break;case 13:null!==(l=Ar(a,2))&&ku(l,0,2),Pu(),Ud(a,2)}if(null===(a=Vd(r))&&Dc(e,t,r,jd,n),a===i)break;i=a}null!==i&&r.stopPropagation()}else Dc(e,t,r,null,n)}}function Vd(e){return Gd(e=xt(e))}var jd=null;function Gd(e){if(jd=null,null!==(e=je(e))){var t=B(e);if(null===t)e=null;else{var n=t.tag;if(13===n){if(null!==(e=P(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return jd=e,null}function $d(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(se()){case ue:return 2;case ce:return 8;case de:case fe:return 32;case he:return 268435456;default:return 32}default:return 32}}var qd=!1,Qd=null,Jd=null,Zd=null,Kd=new Map,ef=new Map,tf=[],nf="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".split(" ");function rf(e,t){switch(e){case"focusin":case"focusout":Qd=null;break;case"dragenter":case"dragleave":Jd=null;break;case"mouseover":case"mouseout":Zd=null;break;case"pointerover":case"pointerout":Kd.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ef.delete(t.pointerId)}}function af(e,t,n,r,i,a){return null===e||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},null!==t&&null!==(t=Ge(t))&&Fd(t),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function of(e){var t=je(e.target);if(null!==t){var n=B(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=P(n)))return e.blockedOn=t,void function(e){var t=W.p;try{return W.p=e,function(){if(13===n.tag){var e=Ru(),t=Ar(n,e);null!==t&&ku(t,0,e),Ud(n,e)}}()}finally{W.p=t}}(e.priority)}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function lf(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Vd(e.nativeEvent);if(null!==n)return null!==(t=Ge(n))&&Fd(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);Rt=r,n.target.dispatchEvent(r),Rt=null,t.shift()}return!0}function sf(e,t,n){lf(e)&&n.delete(t)}function uf(){qd=!1,null!==Qd&&lf(Qd)&&(Qd=null),null!==Jd&&lf(Jd)&&(Jd=null),null!==Zd&&lf(Zd)&&(Zd=null),Kd.forEach(sf),ef.forEach(sf)}function cf(e,t){e.blockedOn===t&&(e.blockedOn=null,qd||(qd=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,uf)))}var df=null;function ff(e){df!==e&&(df=e,r.unstable_scheduleCallback(r.unstable_NormalPriority,(function(){df===e&&(df=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if("function"!=typeof r){if(null===Gd(r||n))continue;break}var a=Ge(n);null!==a&&(e.splice(t,3),t-=3,uo(a,{pending:!0,data:i,method:n.method,action:r},r,i))}})))}function hf(e){function t(t){return cf(t,e)}null!==Qd&&cf(Qd,e),null!==Jd&&cf(Jd,e),null!==Zd&&cf(Zd,e),Kd.forEach(t),ef.forEach(t);for(var n=0;n<tf.length;n++){var r=tf[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<tf.length&&null===(n=tf[0]).blockedOn;)of(n),null===n.blockedOn&&tf.shift();if(null!=(n=(e.ownerDocument||e).$$reactFormReplay))for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[ze]||null;if("function"==typeof a)o||ff(n);else if(o){var l=null;if(a&&a.hasAttribute("formAction")){if(i=a,o=a[ze]||null)l=o.formAction;else if(null!==Gd(i))continue}else l=o.action;"function"==typeof l?n[r+1]=l:(n.splice(r,3),r-=3),ff(n)}}}function pf(e){this._internalRoot=e}function gf(e){this._internalRoot=e}gf.prototype.render=pf.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(o(409));Pd(t.current,Ru(),e,t,null,null)},gf.prototype.unmount=pf.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;0===e.tag&&ec(),Pd(e.current,2,null,e,null,null),Pu(),t[Ue]=null}},gf.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ie();e={blockedOn:null,target:e,priority:t};for(var n=0;n<tf.length&&0!==t&&t<tf[n].priority;n++);tf.splice(n,0,e),0===n&&of(e)}};var mf=i.version;if("19.0.0"!==mf)throw Error(o(527,mf,"19.0.0"));W.findDOMNode=function(e){var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(o(188));throw e=Object.keys(e).join(","),Error(o(268,e))}return e=function(e){var t=e.alternate;if(!t){if(null===(t=B(e)))throw Error(o(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var a=i.alternate;if(null===a){if(null!==(r=i.return)){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return z(i),e;if(a===r)return z(i),t;a=a.sibling}throw Error(o(188))}if(n.return!==r.return)n=i,r=a;else{for(var l=!1,s=i.child;s;){if(s===n){l=!0,n=i,r=a;break}if(s===r){l=!0,r=i,n=a;break}s=s.sibling}if(!l){for(s=a.child;s;){if(s===n){l=!0,n=a,r=i;break}if(s===r){l=!0,r=a,n=i;break}s=s.sibling}if(!l)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(3!==n.tag)throw Error(o(188));return n.stateNode.current===n?e:t}(t),null===(e=null!==e?U(e):null)?null:e.stateNode};var bf={bundleType:0,version:"19.0.0",rendererPackageName:"react-dom",currentDispatcherRef:R,findFiberByHostInstance:je,reconcilerVersion:"19.0.0"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var vf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vf.isDisabled&&vf.supportsFiber)try{me=vf.inject(bf),be=vf}catch(e){}}t.createRoot=function(e,t){if(!(n=e)||1!==n.nodeType&&9!==n.nodeType&&11!==n.nodeType)throw Error(o(299));var n,r=!1,i="",a=Mo,l=Io,s=Bo;return null!=t&&(!0===t.unstable_strictMode&&(r=!0),void 0!==t.identifierPrefix&&(i=t.identifierPrefix),void 0!==t.onUncaughtError&&(a=t.onUncaughtError),void 0!==t.onCaughtError&&(l=t.onCaughtError),void 0!==t.onRecoverableError&&(s=t.onRecoverableError),void 0!==t.unstable_transitionCallbacks&&t.unstable_transitionCallbacks),t=function(e,t,n,r,i,a,o,l,s,u,c,d){return e=new Bd(e,t,n,o,l,s,u,d),t=1,!0===a&&(t|=24),a=Ms(3,null,null,t),e.current=a,a.stateNode=e,(t=Ui()).refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Al(a),e}(e,1,!1,null,0,r,i,a,l,s,0,null),e[Ue]=t.current,kc(8===e.nodeType?e.parentNode:e),new pf(t)}},849:(e,t)=>{function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<a(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,o=i>>>1;r<o;){var l=2*(r+1)-1,s=e[l],u=l+1,c=e[u];if(0>a(s,n))u<i&&0>a(c,s)?(e[r]=c,e[u]=n,r=u):(e[r]=s,e[l]=n,r=l);else{if(!(u<i&&0>a(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(t.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var o=performance;t.unstable_now=function(){return o.now()}}else{var l=Date,s=l.now();t.unstable_now=function(){return l.now()-s}}var u=[],c=[],d=1,f=null,h=3,p=!1,g=!1,m=!1,b="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,y="undefined"!=typeof setImmediate?setImmediate:null;function T(e){for(var t=r(c);null!==t;){if(null===t.callback)i(c);else{if(!(t.startTime<=e))break;i(c),t.sortIndex=t.expirationTime,n(u,t)}t=r(c)}}function _(e){if(m=!1,T(e),!g)if(null!==r(u))g=!0,k();else{var t=r(c);null!==t&&C(_,t.startTime-e)}}var E,w=!1,S=-1,L=5,O=-1;function N(){return!(t.unstable_now()-O<L)}function A(){if(w){var e=t.unstable_now();O=e;var n=!0;try{e:{g=!1,m&&(m=!1,v(S),S=-1),p=!0;var a=h;try{t:{for(T(e),f=r(u);null!==f&&!(f.expirationTime>e&&N());){var o=f.callback;if("function"==typeof o){f.callback=null,h=f.priorityLevel;var l=o(f.expirationTime<=e);if(e=t.unstable_now(),"function"==typeof l){f.callback=l,T(e),n=!0;break t}f===r(u)&&i(u),T(e)}else i(u);f=r(u)}if(null!==f)n=!0;else{var s=r(c);null!==s&&C(_,s.startTime-e),n=!1}}break e}finally{f=null,h=a,p=!1}n=void 0}}finally{n?E():w=!1}}}if("function"==typeof y)E=function(){y(A)};else if("undefined"!=typeof MessageChannel){var R=new MessageChannel,x=R.port2;R.port1.onmessage=A,E=function(){x.postMessage(null)}}else E=function(){b(A,0)};function k(){w||(w=!0,E())}function C(e,n){S=b((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){g||p||(g=!0,k())},t.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"):L=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return h},t.unstable_getFirstCallbackNode=function(){return r(u)},t.unstable_next=function(e){switch(h){case 1:case 2:case 3:var t=3;break;default:t=h}var n=h;h=t;try{return e()}finally{h=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=h;h=e;try{return t()}finally{h=n}},t.unstable_scheduleCallback=function(e,i,a){var o=t.unstable_now();switch(a="object"==typeof a&&null!==a&&"number"==typeof(a=a.delay)&&0<a?o+a:o,e){case 1:var l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}return e={id:d++,callback:i,priorityLevel:e,startTime:a,expirationTime:l=a+l,sortIndex:-1},a>o?(e.sortIndex=a,n(c,e),null===r(u)&&e===r(c)&&(m?(v(S),S=-1):m=!0,C(_,a-o))):(e.sortIndex=l,n(u,e),g||p||(g=!0,k())),e},t.unstable_shouldYield=N,t.unstable_wrapCallback=function(e){var t=h;return function(){var n=h;h=t;try{return e.apply(this,arguments)}finally{h=n}}}},884:(e,t,n)=>{!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(553)}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var a=r[e]={exports:{}};return n[e](a,a.exports,i),a.exports}i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};i.r(a),i.d(a,{Action:()=>p,Actions:()=>g,BorderNode:()=>P,BorderSet:()=>y,CLASSES:()=>l,DefaultMax:()=>I,DefaultMin:()=>M,DockLocation:()=>h,DropInfo:()=>v,FlexLayoutVersion:()=>le,I18nLabel:()=>o,ICloseType:()=>F,Layout:()=>ae,LayoutInternal:()=>oe,LayoutWindow:()=>D,Model:()=>B,Node:()=>T,Orientation:()=>d,Rect:()=>f,RowNode:()=>C,TabNode:()=>_,TabSetNode:()=>k});var o,l,s=i(36),u=i(47),c=i(884);class d{static flip(e){return e===d.HORZ?d.VERT:d.HORZ}constructor(e){this._name=e}getName(){return this._name}toString(){return this._name}}d.HORZ=new d("horz"),d.VERT=new d("vert");class f{static empty(){return new f(0,0,0,0)}static fromJson(e){return new f(e.x,e.y,e.width,e.height)}constructor(e,t,n,r){this.x=e,this.y=t,this.width=n,this.height=r}toJson(){return{x:this.x,y:this.y,width:this.width,height:this.height}}snap(e){this.x=Math.round(this.x/e)*e,this.y=Math.round(this.y/e)*e,this.width=Math.round(this.width/e)*e,this.height=Math.round(this.height/e)*e}static getBoundingClientRect(e){let{x:t,y:n,width:r,height:i}=e.getBoundingClientRect();return new f(t,n,r,i)}static getContentRect(e){const t=e.getBoundingClientRect(),n=window.getComputedStyle(e),r=parseFloat(n.paddingLeft),i=parseFloat(n.paddingRight),a=parseFloat(n.paddingTop),o=parseFloat(n.paddingBottom),l=parseFloat(n.borderLeftWidth),s=parseFloat(n.borderRightWidth),u=parseFloat(n.borderTopWidth),c=parseFloat(n.borderBottomWidth),d=t.width-l-r-i-s,h=t.height-u-a-o-c;return new f(t.left+l+r,t.top+u+a,d,h)}static fromDomRect(e){return new f(e.x,e.y,e.width,e.height)}relativeTo(e){return new f(this.x-e.x,this.y-e.y,this.width,this.height)}clone(){return new f(this.x,this.y,this.width,this.height)}equals(e){return this.x===(null==e?void 0:e.x)&&this.y===(null==e?void 0:e.y)&&this.width===(null==e?void 0:e.width)&&this.height===(null==e?void 0:e.height)}equalSize(e){return this.width===(null==e?void 0:e.width)&&this.height===(null==e?void 0:e.height)}getBottom(){return this.y+this.height}getRight(){return this.x+this.width}getCenter(){return{x:this.x+this.width/2,y:this.y+this.height/2}}positionElement(e,t){this.styleWithPosition(e.style,t)}styleWithPosition(e,t="absolute"){return e.left=this.x+"px",e.top=this.y+"px",e.width=Math.max(0,this.width)+"px",e.height=Math.max(0,this.height)+"px",e.position=t,e}contains(e,t){return this.x<=e&&e<=this.getRight()&&this.y<=t&&t<=this.getBottom()}removeInsets(e){return new f(this.x+e.left,this.y+e.top,Math.max(0,this.width-e.left-e.right),Math.max(0,this.height-e.top-e.bottom))}centerInRect(e){this.x=(e.width-this.width)/2,this.y=(e.height-this.height)/2}_getSize(e){let t=this.width;return e===d.VERT&&(t=this.height),t}toString(){return"(Rect: x="+this.x+", y="+this.y+", width="+this.width+", height="+this.height+")"}}class h{static getByName(e){return h.values.get(e)}static getLocation(e,t,n){if(t=(t-e.x)/e.width,n=(n-e.y)/e.height,t>=.25&&t<.75&&n>=.25&&n<.75)return h.CENTER;const r=n>=1-t;return n>=t?r?h.BOTTOM:h.LEFT:r?h.RIGHT:h.TOP}constructor(e,t,n){this.name=e,this.orientation=t,this.indexPlus=n,h.values.set(this.name,this)}getName(){return this.name}getOrientation(){return this.orientation}getDockRect(e){return this===h.TOP?new f(e.x,e.y,e.width,e.height/2):this===h.BOTTOM?new f(e.x,e.getBottom()-e.height/2,e.width,e.height/2):this===h.LEFT?new f(e.x,e.y,e.width/2,e.height):this===h.RIGHT?new f(e.getRight()-e.width/2,e.y,e.width/2,e.height):e.clone()}split(e,t){return this===h.TOP?{start:new f(e.x,e.y,e.width,t),end:new f(e.x,e.y+t,e.width,e.height-t)}:this===h.LEFT?{start:new f(e.x,e.y,t,e.height),end:new f(e.x+t,e.y,e.width-t,e.height)}:this===h.RIGHT?{start:new f(e.getRight()-t,e.y,t,e.height),end:new f(e.x,e.y,e.width-t,e.height)}:{start:new f(e.x,e.getBottom()-t,e.width,t),end:new f(e.x,e.y,e.width,e.height-t)}}reflect(){return this===h.TOP?h.BOTTOM:this===h.LEFT?h.RIGHT:this===h.RIGHT?h.LEFT:h.TOP}toString(){return"(DockLocation: name="+this.name+", orientation="+this.orientation+")"}}h.values=new Map,h.TOP=new h("top",d.VERT,0),h.BOTTOM=new h("bottom",d.VERT,1),h.LEFT=new h("left",d.HORZ,0),h.RIGHT=new h("right",d.HORZ,1),h.CENTER=new h("center",d.VERT,0),function(e){e.Close_Tab="Close",e.Close_Tabset="Close tab set",e.Active_Tabset="Active tab set",e.Move_Tabset="Move tab set",e.Move_Tabs="Move tabs(?)",e.Maximize="Maximize tab set",e.Restore="Restore tab set",e.Popout_Tab="Popout selected tab",e.Overflow_Menu_Tooltip="Hidden tabs",e.Error_rendering_component="Error rendering component"}(o||(o={})),function(e){e.FLEXLAYOUT__BORDER="flexlayout__border",e.FLEXLAYOUT__BORDER_="flexlayout__border_",e.FLEXLAYOUT__BORDER_TAB_CONTENTS="flexlayout__border_tab_contents",e.FLEXLAYOUT__BORDER_BUTTON="flexlayout__border_button",e.FLEXLAYOUT__BORDER_BUTTON_="flexlayout__border_button_",e.FLEXLAYOUT__BORDER_BUTTON_CONTENT="flexlayout__border_button_content",e.FLEXLAYOUT__BORDER_BUTTON_LEADING="flexlayout__border_button_leading",e.FLEXLAYOUT__BORDER_BUTTON_TRAILING="flexlayout__border_button_trailing",e.FLEXLAYOUT__BORDER_BUTTON__SELECTED="flexlayout__border_button--selected",e.FLEXLAYOUT__BORDER_BUTTON__UNSELECTED="flexlayout__border_button--unselected",e.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON_OVERFLOW="flexlayout__border_toolbar_button_overflow",e.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON_OVERFLOW_="flexlayout__border_toolbar_button_overflow_",e.FLEXLAYOUT__BORDER_INNER="flexlayout__border_inner",e.FLEXLAYOUT__BORDER_INNER_="flexlayout__border_inner_",e.FLEXLAYOUT__BORDER_INNER_TAB_CONTAINER="flexlayout__border_inner_tab_container",e.FLEXLAYOUT__BORDER_INNER_TAB_CONTAINER_="flexlayout__border_inner_tab_container_",e.FLEXLAYOUT__BORDER_TAB_DIVIDER="flexlayout__border_tab_divider",e.FLEXLAYOUT__BORDER_SIZER="flexlayout__border_sizer",e.FLEXLAYOUT__BORDER_TOOLBAR="flexlayout__border_toolbar",e.FLEXLAYOUT__BORDER_TOOLBAR_="flexlayout__border_toolbar_",e.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON="flexlayout__border_toolbar_button",e.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON_FLOAT="flexlayout__border_toolbar_button-float",e.FLEXLAYOUT__DRAG_RECT="flexlayout__drag_rect",e.FLEXLAYOUT__EDGE_RECT="flexlayout__edge_rect",e.FLEXLAYOUT__EDGE_RECT_TOP="flexlayout__edge_rect_top",e.FLEXLAYOUT__EDGE_RECT_LEFT="flexlayout__edge_rect_left",e.FLEXLAYOUT__EDGE_RECT_BOTTOM="flexlayout__edge_rect_bottom",e.FLEXLAYOUT__EDGE_RECT_RIGHT="flexlayout__edge_rect_right",e.FLEXLAYOUT__ERROR_BOUNDARY_CONTAINER="flexlayout__error_boundary_container",e.FLEXLAYOUT__ERROR_BOUNDARY_CONTENT="flexlayout__error_boundary_content",e.FLEXLAYOUT__FLOATING_WINDOW_CONTENT="flexlayout__floating_window_content",e.FLEXLAYOUT__FLOATING_WINDOW_TAB="flexlayout__floating_window_tab",e.FLEXLAYOUT__LAYOUT="flexlayout__layout",e.FLEXLAYOUT__LAYOUT_MOVEABLES="flexlayout__layout_moveables",e.FLEXLAYOUT__LAYOUT_OVERLAY="flexlayout__layout_overlay",e.FLEXLAYOUT__LAYOUT_TAB_STAMPS="flexlayout__layout_tab_stamps",e.FLEXLAYOUT__LAYOUT_MAIN="flexlayout__layout_main",e.FLEXLAYOUT__LAYOUT_BORDER_CONTAINER="flexlayout__layout_border_container",e.FLEXLAYOUT__LAYOUT_BORDER_CONTAINER_INNER="flexlayout__layout_border_container_inner",e.FLEXLAYOUT__OUTLINE_RECT="flexlayout__outline_rect",e.FLEXLAYOUT__OUTLINE_RECT_EDGE="flexlayout__outline_rect_edge",e.FLEXLAYOUT__SPLITTER="flexlayout__splitter",e.FLEXLAYOUT__SPLITTER_EXTRA="flexlayout__splitter_extra",e.FLEXLAYOUT__SPLITTER_="flexlayout__splitter_",e.FLEXLAYOUT__SPLITTER_BORDER="flexlayout__splitter_border",e.FLEXLAYOUT__SPLITTER_DRAG="flexlayout__splitter_drag",e.FLEXLAYOUT__SPLITTER_HANDLE="flexlayout__splitter_handle",e.FLEXLAYOUT__SPLITTER_HANDLE_HORZ="flexlayout__splitter_handle_horz",e.FLEXLAYOUT__SPLITTER_HANDLE_VERT="flexlayout__splitter_handle_vert",e.FLEXLAYOUT__ROW="flexlayout__row",e.FLEXLAYOUT__TAB="flexlayout__tab",e.FLEXLAYOUT__TAB_POSITION="flexlayout__tab_position",e.FLEXLAYOUT__TAB_MOVEABLE="flexlayout__tab_moveable",e.FLEXLAYOUT__TAB_OVERLAY="flexlayout__tab_overlay",e.FLEXLAYOUT__TABSET="flexlayout__tabset",e.FLEXLAYOUT__TABSET_CONTAINER="flexlayout__tabset_container",e.FLEXLAYOUT__TABSET_HEADER="flexlayout__tabset_header",e.FLEXLAYOUT__TABSET_HEADER_SIZER="flexlayout__tabset_header_sizer",e.FLEXLAYOUT__TABSET_HEADER_CONTENT="flexlayout__tabset_header_content",e.FLEXLAYOUT__TABSET_MAXIMIZED="flexlayout__tabset-maximized",e.FLEXLAYOUT__TABSET_SELECTED="flexlayout__tabset-selected",e.FLEXLAYOUT__TABSET_SIZER="flexlayout__tabset_sizer",e.FLEXLAYOUT__TABSET_TAB_DIVIDER="flexlayout__tabset_tab_divider",e.FLEXLAYOUT__TABSET_CONTENT="flexlayout__tabset_content",e.FLEXLAYOUT__TABSET_TABBAR_INNER="flexlayout__tabset_tabbar_inner",e.FLEXLAYOUT__TABSET_TABBAR_INNER_="flexlayout__tabset_tabbar_inner_",e.FLEXLAYOUT__TABSET_TABBAR_INNER_TAB_CONTAINER="flexlayout__tabset_tabbar_inner_tab_container",e.FLEXLAYOUT__TABSET_TABBAR_INNER_TAB_CONTAINER_="flexlayout__tabset_tabbar_inner_tab_container_",e.FLEXLAYOUT__TABSET_TABBAR_OUTER="flexlayout__tabset_tabbar_outer",e.FLEXLAYOUT__TABSET_TABBAR_OUTER_="flexlayout__tabset_tabbar_outer_",e.FLEXLAYOUT__TAB_BORDER="flexlayout__tab_border",e.FLEXLAYOUT__TAB_BORDER_="flexlayout__tab_border_",e.FLEXLAYOUT__TAB_BUTTON="flexlayout__tab_button",e.FLEXLAYOUT__TAB_BUTTON_STRETCH="flexlayout__tab_button_stretch",e.FLEXLAYOUT__TAB_BUTTON_CONTENT="flexlayout__tab_button_content",e.FLEXLAYOUT__TAB_BUTTON_LEADING="flexlayout__tab_button_leading",e.FLEXLAYOUT__TAB_BUTTON_OVERFLOW="flexlayout__tab_button_overflow",e.FLEXLAYOUT__TAB_BUTTON_OVERFLOW_COUNT="flexlayout__tab_button_overflow_count",e.FLEXLAYOUT__TAB_BUTTON_TEXTBOX="flexlayout__tab_button_textbox",e.FLEXLAYOUT__TAB_BUTTON_TRAILING="flexlayout__tab_button_trailing",e.FLEXLAYOUT__TAB_BUTTON_STAMP="flexlayout__tab_button_stamp",e.FLEXLAYOUT__TAB_FLOATING="flexlayout__tab_floating",e.FLEXLAYOUT__TAB_FLOATING_INNER="flexlayout__tab_floating_inner",e.FLEXLAYOUT__TAB_TOOLBAR="flexlayout__tab_toolbar",e.FLEXLAYOUT__TAB_TOOLBAR_BUTTON="flexlayout__tab_toolbar_button",e.FLEXLAYOUT__TAB_TOOLBAR_ICON="flexlayout__tab_toolbar_icon",e.FLEXLAYOUT__TAB_TOOLBAR_BUTTON_="flexlayout__tab_toolbar_button-",e.FLEXLAYOUT__TAB_TOOLBAR_BUTTON_FLOAT="flexlayout__tab_toolbar_button-float",e.FLEXLAYOUT__TAB_TOOLBAR_STICKY_BUTTONS_CONTAINER="flexlayout__tab_toolbar_sticky_buttons_container",e.FLEXLAYOUT__TAB_TOOLBAR_BUTTON_CLOSE="flexlayout__tab_toolbar_button-close",e.FLEXLAYOUT__POPUP_MENU_CONTAINER="flexlayout__popup_menu_container",e.FLEXLAYOUT__POPUP_MENU_ITEM="flexlayout__popup_menu_item",e.FLEXLAYOUT__POPUP_MENU="flexlayout__popup_menu",e.FLEXLAYOUT__MINI_SCROLLBAR="flexlayout__mini_scrollbar",e.FLEXLAYOUT__MINI_SCROLLBAR_HIDDEN="flexlayout__mini_scrollbar_hidden"}(l||(l={}));class p{constructor(e,t){this.type=e,this.data=t}}class g{static addNode(e,t,n,r,i){return new p(g.ADD_NODE,{json:e,toNode:t,location:n.getName(),index:r,select:i})}static moveNode(e,t,n,r,i){return new p(g.MOVE_NODE,{fromNode:e,toNode:t,location:n.getName(),index:r,select:i})}static deleteTab(e){return new p(g.DELETE_TAB,{node:e})}static deleteTabset(e){return new p(g.DELETE_TABSET,{node:e})}static renameTab(e,t){return new p(g.RENAME_TAB,{node:e,text:t})}static selectTab(e){return new p(g.SELECT_TAB,{tabNode:e})}static setActiveTabset(e,t){return new p(g.SET_ACTIVE_TABSET,{tabsetNode:e,windowId:t})}static adjustWeights(e,t){return new p(g.ADJUST_WEIGHTS,{nodeId:e,weights:t})}static adjustBorderSplit(e,t){return new p(g.ADJUST_BORDER_SPLIT,{node:e,pos:t})}static maximizeToggle(e,t){return new p(g.MAXIMIZE_TOGGLE,{node:e,windowId:t})}static updateModelAttributes(e){return new p(g.UPDATE_MODEL_ATTRIBUTES,{json:e})}static updateNodeAttributes(e,t){return new p(g.UPDATE_NODE_ATTRIBUTES,{node:e,json:t})}static popoutTab(e){return new p(g.POPOUT_TAB,{node:e})}static popoutTabset(e){return new p(g.POPOUT_TABSET,{node:e})}static closeWindow(e){return new p(g.CLOSE_WINDOW,{windowId:e})}static createWindow(e,t){return new p(g.CREATE_WINDOW,{layout:e,rect:t})}}g.ADD_NODE="FlexLayout_AddNode",g.MOVE_NODE="FlexLayout_MoveNode",g.DELETE_TAB="FlexLayout_DeleteTab",g.DELETE_TABSET="FlexLayout_DeleteTabset",g.RENAME_TAB="FlexLayout_RenameTab",g.SELECT_TAB="FlexLayout_SelectTab",g.SET_ACTIVE_TABSET="FlexLayout_SetActiveTabset",g.ADJUST_WEIGHTS="FlexLayout_AdjustWeights",g.ADJUST_BORDER_SPLIT="FlexLayout_AdjustBorderSplit",g.MAXIMIZE_TOGGLE="FlexLayout_MaximizeToggle",g.UPDATE_MODEL_ATTRIBUTES="FlexLayout_UpdateModelAttributes",g.UPDATE_NODE_ATTRIBUTES="FlexLayout_UpdateNodeAttributes",g.POPOUT_TAB="FlexLayout_PopoutTab",g.POPOUT_TABSET="FlexLayout_PopoutTabset",g.CLOSE_WINDOW="FlexLayout_CloseWindow",g.CREATE_WINDOW="FlexLayout_CreateWindow";class m{constructor(e,t,n,r){this.name=e,this.alias=void 0,this.modelName=t,this.defaultValue=n,this.alwaysWriteJson=r,this.required=!1,this.fixed=!1,this.type="any"}setType(e){return this.type=e,this}setAlias(e){return this.alias=e,this}setDescription(e){this.description=e}setRequired(){return this.required=!0,this}setFixed(){return this.fixed=!0,this}setpairedAttr(e){this.pairedAttr=e}setPairedType(e){this.pairedType=e}}m.NUMBER="number",m.STRING="string",m.BOOLEAN="boolean";class b{constructor(){this.attributes=[],this.nameToAttribute=new Map}addWithAll(e,t,n,r){const i=new m(e,t,n,r);return this.attributes.push(i),this.nameToAttribute.set(e,i),i}addInherited(e,t){return this.addWithAll(e,t,void 0,!1)}add(e,t,n){return this.addWithAll(e,void 0,t,n)}getAttributes(){return this.attributes}getModelName(e){const t=this.nameToAttribute.get(e);if(void 0!==t)return t.modelName}toJson(e,t){for(const n of this.attributes){const r=t[n.name];(n.alwaysWriteJson||r!==n.defaultValue)&&(e[n.name]=r)}}fromJson(e,t){for(const n of this.attributes){let r=e[n.name];void 0===r&&n.alias&&(r=e[n.alias]),t[n.name]=void 0===r?n.defaultValue:r}}update(e,t){for(const n of this.attributes)if(e.hasOwnProperty(n.name)){const r=e[n.name];void 0===r?delete t[n.name]:t[n.name]=r}}setDefaults(e){for(const t of this.attributes)e[t.name]=t.defaultValue}pairAttributes(e,t){for(const n of t.attributes)if(n.modelName&&this.nameToAttribute.has(n.modelName)){const t=this.nameToAttribute.get(n.modelName);t.setpairedAttr(n),n.setpairedAttr(t),t.setPairedType(e)}}toTypescriptInterface(e,t){var n,r;const i=[],a=this.attributes.sort(((e,t)=>e.name.localeCompare(t.name)));i.push("export interface I"+e+"Attributes {");for(let e=0;e<a.length;e++){const o=a[e];let l,s,u=o.type,c=o;void 0!==c.defaultValue?l=c.defaultValue:void 0!==c.modelName&&void 0!==t&&void 0!==t.nameToAttribute.get(c.modelName)&&(s=c.modelName,c=t.nameToAttribute.get(s),l=c.defaultValue,u=c.type);let d=JSON.stringify(l);const f=c.required?"":"?";let h="\t/**\n\t ";o.description?h+=o.description:o.pairedType&&(null===(n=o.pairedAttr)||void 0===n?void 0:n.description)&&(h+=`Value for ${o.pairedType} attribute ${o.pairedAttr.name} if not overridden`,h+="\n\n\t ",h+=null===(r=o.pairedAttr)||void 0===r?void 0:r.description),h+="\n\n\t ",o.fixed?h+=`Fixed value: ${d}`:h+=s?`Default: inherited from Global attribute ${o.modelName} (default ${d})`:`Default: ${d}`,h+="\n\t */",i.push(h),i.push("\t"+o.name+f+": "+u+";\n")}return i.push("}"),i.join("\n")}}class v{constructor(e,t,n,r,i){this.node=e,this.rect=t,this.location=n,this.index=r,this.className=i}}class y{static fromJson(e,t){const n=new y(t);n.borders=e.map((e=>P.fromJson(e,t)));for(const e of n.borders)n.borderMap.set(e.getLocation(),e);return n}constructor(e){this.borders=[],this.borderMap=new Map,this.layoutHorizontal=!0}toJson(){return this.borders.map((e=>e.toJson()))}getLayoutHorizontal(){return this.layoutHorizontal}getBorders(){return this.borders}getBorderMap(){return this.borderMap}forEachNode(e){for(const t of this.borders){e(t,0);for(const n of t.getChildren())n.forEachNode(e,1)}}setPaths(){for(const e of this.borders){const t="/border/"+e.getLocation().getName();e.setPath(t);let n=0;for(const r of e.getChildren())r.setPath(t+"/t"+n),n++}}findDropTargetNode(e,t,n){for(const r of this.borders)if(r.isShowing()){const i=r.canDrop(e,t,n);if(void 0!==i)return i}}}class T{constructor(e){this.model=e,this.attributes={},this.children=[],this.rect=f.empty(),this.listeners=new Map,this.path=""}getId(){let e=this.attributes.id;return void 0!==e||(e=this.model.nextUniqueId(),this.setId(e)),e}getModel(){return this.model}getType(){return this.attributes.type}getParent(){return this.parent}getChildren(){return this.children}getRect(){return this.rect}getPath(){return this.path}getOrientation(){return void 0===this.parent?this.model.isRootOrientationVertical()?d.VERT:d.HORZ:d.flip(this.parent.getOrientation())}setEventListener(e,t){this.listeners.set(e,t)}removeEventListener(e){this.listeners.delete(e)}setId(e){this.attributes.id=e}fireEvent(e,t){this.listeners.has(e)&&this.listeners.get(e)(t)}getAttr(e){let t=this.attributes[e];if(void 0===t){const n=this.getAttributeDefinitions().getModelName(e);void 0!==n&&(t=this.model.getAttribute(n))}return t}forEachNode(e,t){e(this,t),t++;for(const n of this.children)n.forEachNode(e,t)}setPaths(e){let t=0;for(const n of this.children){let r=e;"row"===n.getType()?n.getOrientation()===d.VERT?r+="/c"+t:r+="/r"+t:"tabset"===n.getType()?r+="/ts"+t:"tab"===n.getType()&&(r+="/t"+t),n.path=r,n.setPaths(r),t++}}setParent(e){this.parent=e}setRect(e){this.rect=e}setPath(e){this.path=e}setWeight(e){this.attributes.weight=e}setSelected(e){this.attributes.selected=e}findDropTargetNode(e,t,n,r){let i;if(this.rect.contains(n,r))if(void 0!==this.model.getMaximizedTabset(e))i=this.model.getMaximizedTabset(e).canDrop(t,n,r);else if(i=this.canDrop(t,n,r),void 0===i&&0!==this.children.length)for(const a of this.children)if(i=a.findDropTargetNode(e,t,n,r),void 0!==i)break;return i}canDrop(e,t,n){}canDockInto(e,t){if(null!=t){if(t.location===h.CENTER&&!1===t.node.isEnableDrop())return!1;if(t.location===h.CENTER&&"tabset"===e.getType()&&void 0!==e.getName())return!1;if(t.location!==h.CENTER&&!1===t.node.isEnableDivide())return!1;if(this.model.getOnAllowDrop())return this.model.getOnAllowDrop()(e,t)}return!0}removeChild(e){const t=this.children.indexOf(e);return-1!==t&&this.children.splice(t,1),t}addChild(e,t){return null!=t?this.children.splice(t,0,e):(this.children.push(e),t=this.children.length-1),e.parent=this,t}removeAll(){this.children=[]}styleWithPosition(e){return null==e&&(e={}),this.rect.styleWithPosition(e)}isEnableDivide(){return!0}toAttributeString(){return JSON.stringify(this.attributes,void 0,"\t")}}class _ extends T{static fromJson(e,t,n=!0){return new _(t,e,n)}constructor(e,t,n=!0){super(e),this.tabRect=f.empty(),this.extra={},this.moveableElement=null,this.tabStamp=null,this.rendered=!1,this.visible=!1,_.attributeDefinitions.fromJson(t,this.attributes),!0===n&&e.addNode(this)}getName(){return this.getAttr("name")}getHelpText(){return this.getAttr("helpText")}getComponent(){return this.getAttr("component")}getWindowId(){return this.parent instanceof k?this.parent.getWindowId():B.MAIN_WINDOW_ID}getWindow(){const e=this.model.getwindowsMap().get(this.getWindowId());if(e)return e.window}getConfig(){return this.attributes.config}getExtraData(){return this.extra}isPoppedOut(){return this.getWindowId()!==B.MAIN_WINDOW_ID}isSelected(){return this.getParent().getSelectedNode()===this}getIcon(){return this.getAttr("icon")}isEnableClose(){return this.getAttr("enableClose")}getCloseType(){return this.getAttr("closeType")}isEnablePopout(){return this.getAttr("enablePopout")}isEnablePopoutIcon(){return this.getAttr("enablePopoutIcon")}isEnablePopoutOverlay(){return this.getAttr("enablePopoutOverlay")}isEnableDrag(){return this.getAttr("enableDrag")}isEnableRename(){return this.getAttr("enableRename")}isEnableWindowReMount(){return this.getAttr("enableWindowReMount")}getClassName(){return this.getAttr("className")}getContentClassName(){return this.getAttr("contentClassName")}getTabSetClassName(){return this.getAttr("tabsetClassName")}isEnableRenderOnDemand(){return this.getAttr("enableRenderOnDemand")}getMinWidth(){return this.getAttr("minWidth")}getMinHeight(){return this.getAttr("minHeight")}getMaxWidth(){return this.getAttr("maxWidth")}getMaxHeight(){return this.getAttr("maxHeight")}toJson(){const e={};return _.attributeDefinitions.toJson(e,this.attributes),e}saveScrollPosition(){this.moveableElement&&(this.scrollLeft=this.moveableElement.scrollLeft,this.scrollTop=this.moveableElement.scrollTop)}restoreScrollPosition(){this.scrollTop&&requestAnimationFrame((()=>{this.moveableElement&&this.scrollTop&&(this.moveableElement.scrollTop=this.scrollTop,this.moveableElement.scrollLeft=this.scrollLeft)}))}setRect(e){e.equals(this.rect)||(this.fireEvent("resize",{rect:e}),this.rect=e)}setVisible(e){e!==this.visible&&(this.fireEvent("visibility",{visible:e}),this.visible=e)}getScrollTop(){return this.scrollTop}setScrollTop(e){this.scrollTop=e}getScrollLeft(){return this.scrollLeft}setScrollLeft(e){this.scrollLeft=e}isRendered(){return this.rendered}setRendered(e){this.rendered=e}getTabRect(){return this.tabRect}setTabRect(e){this.tabRect=e}getTabStamp(){return this.tabStamp}setTabStamp(e){this.tabStamp=e}getMoveableElement(){return this.moveableElement}setMoveableElement(e){this.moveableElement=e}setRenderedName(e){this.renderedName=e}getNameForOverflowMenu(){const e=this.getAttr("altName");return void 0!==e?e:this.renderedName}setName(e){this.attributes.name=e}delete(){this.parent.remove(this),this.fireEvent("close",{})}updateAttrs(e){_.attributeDefinitions.update(e,this.attributes)}getAttributeDefinitions(){return _.attributeDefinitions}setBorderWidth(e){this.attributes.borderWidth=e}setBorderHeight(e){this.attributes.borderHeight=e}static getAttributeDefinitions(){return _.attributeDefinitions}static createAttributeDefinitions(){const e=new b;return e.add("type",_.TYPE,!0).setType(m.STRING).setFixed(),e.add("id",void 0).setType(m.STRING).setDescription("the unique id of the tab, if left undefined a uuid will be assigned"),e.add("name","[Unnamed Tab]").setType(m.STRING).setDescription("name of tab to be displayed in the tab button"),e.add("altName",void 0).setType(m.STRING).setDescription("if there is no name specifed then this value will be used in the overflow menu"),e.add("helpText",void 0).setType(m.STRING).setDescription("An optional help text for the tab to be displayed upon tab hover."),e.add("component",void 0).setType(m.STRING).setDescription("string identifying which component to run (for factory)"),e.add("config",void 0).setType("any").setDescription("a place to hold json config for the hosted component"),e.add("tabsetClassName",void 0).setType(m.STRING).setDescription("class applied to parent tabset when this is the only tab and it is stretched to fill the tabset"),e.add("enableWindowReMount",!1).setType(m.BOOLEAN).setDescription("if enabled the tab will re-mount when popped out/in"),e.addInherited("enableClose","tabEnableClose").setType(m.BOOLEAN).setDescription("allow user to close tab via close button"),e.addInherited("closeType","tabCloseType").setType("ICloseType").setDescription("see values in ICloseType"),e.addInherited("enableDrag","tabEnableDrag").setType(m.BOOLEAN).setDescription("allow user to drag tab to new location"),e.addInherited("enableRename","tabEnableRename").setType(m.BOOLEAN).setDescription("allow user to rename tabs by double clicking"),e.addInherited("className","tabClassName").setType(m.STRING).setDescription("class applied to tab button"),e.addInherited("contentClassName","tabContentClassName").setType(m.STRING).setDescription("class applied to tab content"),e.addInherited("icon","tabIcon").setType(m.STRING).setDescription("the tab icon"),e.addInherited("enableRenderOnDemand","tabEnableRenderOnDemand").setType(m.BOOLEAN).setDescription("whether to avoid rendering component until tab is visible"),e.addInherited("enablePopout","tabEnablePopout").setType(m.BOOLEAN).setAlias("enableFloat").setDescription("enable popout (in popout capable browser)"),e.addInherited("enablePopoutIcon","tabEnablePopoutIcon").setType(m.BOOLEAN).setDescription("whether to show the popout icon in the tabset header if this tab enables popouts"),e.addInherited("enablePopoutOverlay","tabEnablePopoutOverlay").setType(m.BOOLEAN).setDescription("if this tab will not work correctly in a popout window when the main window is backgrounded (inactive)\n then enabling this option will gray out this tab"),e.addInherited("borderWidth","tabBorderWidth").setType(m.NUMBER).setDescription("width when added to border, -1 will use border size"),e.addInherited("borderHeight","tabBorderHeight").setType(m.NUMBER).setDescription("height when added to border, -1 will use border size"),e.addInherited("minWidth","tabMinWidth").setType(m.NUMBER).setDescription("the min width of this tab"),e.addInherited("minHeight","tabMinHeight").setType(m.NUMBER).setDescription("the min height of this tab"),e.addInherited("maxWidth","tabMaxWidth").setType(m.NUMBER).setDescription("the max width of this tab"),e.addInherited("maxHeight","tabMaxHeight").setType(m.NUMBER).setDescription("the max height of this tab"),e}}function E(){return"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(hover: hover) and (pointer: fine)").matches}function w(e,t,n){let r,i=t.getName(),a=t.getName();void 0===n&&(n=0),void 0===r&&void 0!==t.getIcon()&&(r=0!==n?s.createElement("img",{style:{width:"1em",height:"1em",transform:"rotate("+n+"deg)"},src:t.getIcon(),alt:"leadingContent"}):s.createElement("img",{style:{width:"1em",height:"1em"},src:t.getIcon(),alt:"leadingContent"}));const o={leading:r,content:i,name:a,buttons:[]};return e.customizeTab(t,o),t.setRenderedName(o.name),o}function S(e){let t=!1;return e.nativeEvent instanceof MouseEvent&&(0!==e.nativeEvent.button||e.ctrlKey||e.altKey||e.metaKey||e.shiftKey)&&(t=!0),t}function L(e,t){const n=[...O("iframe",t),...O("webview",t)];for(const t of n)t.style.pointerEvents=e?"auto":"none"}function O(e,t){return[...t.getElementsByTagName(e)]}function N(e){if(e instanceof _)return e.isEnablePopout();if(e instanceof k){for(const t of e.getChildren())if(!1===t.isEnablePopout())return!1;return!0}return!1}function A(e,t){const n=e.getAttribute("style");return n!==t.getAttribute("style")&&(n?t.setAttribute("style",n):t.removeAttribute("style"),!0)}function R(e,t){if(void 0!==e&&(e instanceof k||e instanceof P)){const n=e.getSelected();-1!==n&&(t===n&&e.getChildren().length>0?t>=e.getChildren().length&&e.setSelected(e.getChildren().length-1):t<n?e.setSelected(n-1):t>n||e.setSelected(-1))}}function x(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)))}_.TYPE="tab",_.attributeDefinitions=_.createAttributeDefinitions();class k extends T{static fromJson(e,t,n){const r=new k(t,e);if(null!=e.children)for(const n of e.children){const e=_.fromJson(n,t);r.addChild(e)}return 0===r.children.length&&r.setSelected(-1),e.maximized&&!0===e.maximized&&(n.maximizedTabSet=r),e.active&&!0===e.active&&(n.activeTabSet=r),r}constructor(e,t){super(e),this.tabStripRect=f.empty(),this.contentRect=f.empty(),this.calculatedMinHeight=0,this.calculatedMinWidth=0,this.calculatedMaxHeight=0,this.calculatedMaxWidth=0,k.attributeDefinitions.fromJson(t,this.attributes),e.addNode(this)}getName(){return this.getAttr("name")}isEnableActiveIcon(){return this.getAttr("enableActiveIcon")}getSelected(){const e=this.attributes.selected;return void 0!==e?e:-1}getSelectedNode(){const e=this.getSelected();if(-1!==e)return this.children[e]}getWeight(){return this.getAttr("weight")}getAttrMinWidth(){return this.getAttr("minWidth")}getAttrMinHeight(){return this.getAttr("minHeight")}getMinWidth(){return this.calculatedMinWidth}getMinHeight(){return this.calculatedMinHeight}getMinSize(e){return e===d.HORZ?this.getMinWidth():this.getMinHeight()}getAttrMaxWidth(){return this.getAttr("maxWidth")}getAttrMaxHeight(){return this.getAttr("maxHeight")}getMaxWidth(){return this.calculatedMaxWidth}getMaxHeight(){return this.calculatedMaxHeight}getMaxSize(e){return e===d.HORZ?this.getMaxWidth():this.getMaxHeight()}getConfig(){return this.attributes.config}isMaximized(){return this.model.getMaximizedTabset(this.getWindowId())===this}isActive(){return this.model.getActiveTabset(this.getWindowId())===this}isEnableDeleteWhenEmpty(){return this.getAttr("enableDeleteWhenEmpty")}isEnableDrop(){return this.getAttr("enableDrop")}isEnableTabWrap(){return this.getAttr("enableTabWrap")}isEnableDrag(){return this.getAttr("enableDrag")}isEnableDivide(){return this.getAttr("enableDivide")}isEnableMaximize(){return this.getAttr("enableMaximize")}isEnableClose(){return this.getAttr("enableClose")}isEnableSingleTabStretch(){return this.getAttr("enableSingleTabStretch")}isEnableTabStrip(){return this.getAttr("enableTabStrip")}isAutoSelectTab(){return this.getAttr("autoSelectTab")}isEnableTabScrollbar(){return this.getAttr("enableTabScrollbar")}getClassNameTabStrip(){return this.getAttr("classNameTabStrip")}getTabLocation(){return this.getAttr("tabLocation")}toJson(){const e={};return k.attributeDefinitions.toJson(e,this.attributes),e.children=this.children.map((e=>e.toJson())),this.isActive()&&(e.active=!0),this.isMaximized()&&(e.maximized=!0),e}calcMinMaxSize(){this.calculatedMinHeight=this.getAttrMinHeight(),this.calculatedMinWidth=this.getAttrMinWidth(),this.calculatedMaxHeight=this.getAttrMaxHeight(),this.calculatedMaxWidth=this.getAttrMaxWidth();for(const e of this.children){const t=e;this.calculatedMinWidth=Math.max(this.calculatedMinWidth,t.getMinWidth()),this.calculatedMinHeight=Math.max(this.calculatedMinHeight,t.getMinHeight()),this.calculatedMaxWidth=Math.min(this.calculatedMaxWidth,t.getMaxWidth()),this.calculatedMaxHeight=Math.min(this.calculatedMaxHeight,t.getMaxHeight())}this.calculatedMinHeight+=this.tabStripRect.height,this.calculatedMaxHeight+=this.tabStripRect.height}canMaximize(){return!!this.isEnableMaximize()&&(this.getModel().getMaximizedTabset(this.getWindowId())===this||this.getParent()!==this.getModel().getRoot(this.getWindowId())||1!==this.getModel().getRoot(this.getWindowId()).getChildren().length)}setContentRect(e){this.contentRect=e}getContentRect(){return this.contentRect}setTabStripRect(e){this.tabStripRect=e}setWeight(e){this.attributes.weight=e}setSelected(e){this.attributes.selected=e}getWindowId(){return this.parent.getWindowId()}canDrop(e,t,n){let r;if(e===this){const e=h.CENTER,t=this.tabStripRect;r=new v(this,t,e,-1,l.FLEXLAYOUT__OUTLINE_RECT)}else{if(this.getWindowId()!==B.MAIN_WINDOW_ID&&!N(e))return;if(this.contentRect.contains(t,n)){let e=h.CENTER;void 0===this.model.getMaximizedTabset(this.parent.getWindowId())&&(e=h.getLocation(this.contentRect,t,n));const i=e.getDockRect(this.rect);r=new v(this,i,e,-1,l.FLEXLAYOUT__OUTLINE_RECT)}else if(null!=this.tabStripRect&&this.tabStripRect.contains(t,n)){let e,i,a;if(0===this.children.length)e=this.tabStripRect.clone(),i=e.y+3,a=e.height-4,e.width=2;else{let o=this.children[0];e=o.getTabRect(),i=e.y,a=e.height;let s=this.tabStripRect.x,u=0;for(let a=0;a<this.children.length;a++){if(o=this.children[a],e=o.getTabRect(),e.y!==i&&(i=e.y,s=this.tabStripRect.x),u=e.x+e.width/2,t>=s&&t<u&&n>e.y&&n<e.getBottom()){const t=h.CENTER,n=new f(e.x-2,e.y,3,e.height);r=new v(this,n,t,a,l.FLEXLAYOUT__OUTLINE_RECT);break}s=u}}if(null==r){const t=h.CENTER,n=new f(e.getRight()-2,i,3,a);r=new v(this,n,t,this.children.length,l.FLEXLAYOUT__OUTLINE_RECT)}}}if(e.canDockInto(e,r))return r}delete(){this.parent.removeChild(this)}remove(e){const t=this.removeChild(e);this.model.tidy(),R(this,t)}drop(e,t,n,r){const i=t;if(this===e)return;let a=e.getParent(),o=0;if(void 0!==a&&(o=a.removeChild(e),a instanceof P&&a.getSelected()===o?a.setSelected(-1):R(a,o)),e instanceof _&&a===this&&o<n&&n>0&&n--,i===h.CENTER){let t=n;if(-1===t&&(t=this.children.length),e instanceof _)this.addChild(e,t),(r||!1!==r&&this.isAutoSelectTab())&&this.setSelected(t);else if(e instanceof C)e.forEachNode(((e,n)=>{e instanceof _&&(this.addChild(e,t),t++)}),0);else{for(let n=0;n<e.getChildren().length;n++){const r=e.getChildren()[n];this.addChild(r,t),t++}-1===this.getSelected()&&this.children.length>0&&this.setSelected(0)}this.model.setActiveTabset(this,this.parent.getWindowId())}else{let n=e;if(e instanceof _){const t=this.model.getOnCreateTabSet();n=new k(this.model,t?t(e):{}),n.addChild(e),a=n}else if(e instanceof C){const r=this.getParent();if(e.getOrientation()===r.getOrientation()&&(t.getOrientation()===r.getOrientation()||t===h.CENTER)){const t=new C(this.model,this.getWindowId(),{});t.addChild(e),n=t}}else n=e;const r=this.parent,o=r.getChildren().indexOf(this);if(r.getOrientation()===i.orientation)n.setWeight(this.getWeight()/2),this.setWeight(this.getWeight()/2),r.addChild(n,o+i.indexPlus);else{const e=new C(this.model,this.getWindowId(),{});e.setWeight(this.getWeight()),e.addChild(this),this.setWeight(50),n.setWeight(50),e.addChild(n,i.indexPlus),r.removeChild(this),r.addChild(e,o)}n instanceof k&&this.model.setActiveTabset(n,this.getWindowId())}this.model.tidy()}updateAttrs(e){k.attributeDefinitions.update(e,this.attributes)}getAttributeDefinitions(){return k.attributeDefinitions}static getAttributeDefinitions(){return k.attributeDefinitions}static createAttributeDefinitions(){const e=new b;return e.add("type",k.TYPE,!0).setType(m.STRING).setFixed(),e.add("id",void 0).setType(m.STRING).setDescription("the unique id of the tab set, if left undefined a uuid will be assigned"),e.add("weight",100).setType(m.NUMBER).setDescription("relative weight for sizing of this tabset in parent row"),e.add("selected",0).setType(m.NUMBER).setDescription("index of selected/visible tab in tabset"),e.add("name",void 0).setType(m.STRING),e.add("config",void 0).setType("any").setDescription("a place to hold json config used in your own code"),e.addInherited("enableDeleteWhenEmpty","tabSetEnableDeleteWhenEmpty").setDescription("whether to delete this tabset when is has no tabs"),e.addInherited("enableDrop","tabSetEnableDrop").setDescription("allow user to drag tabs into this tabset"),e.addInherited("enableDrag","tabSetEnableDrag").setDescription("allow user to drag tabs out this tabset"),e.addInherited("enableDivide","tabSetEnableDivide").setDescription("allow user to drag tabs to region of this tabset, splitting into new tabset"),e.addInherited("enableMaximize","tabSetEnableMaximize").setDescription("allow user to maximize tabset to fill view via maximize button"),e.addInherited("enableClose","tabSetEnableClose").setDescription("allow user to close tabset via a close button"),e.addInherited("enableSingleTabStretch","tabSetEnableSingleTabStretch").setDescription("if the tabset has only a single tab then stretch the single tab to fill area and display in a header style"),e.addInherited("classNameTabStrip","tabSetClassNameTabStrip").setDescription("a class name to apply to the tab strip"),e.addInherited("enableTabStrip","tabSetEnableTabStrip").setDescription("enable tab strip and allow multiple tabs in this tabset"),e.addInherited("minWidth","tabSetMinWidth").setDescription("minimum width (in px) for this tabset"),e.addInherited("minHeight","tabSetMinHeight").setDescription("minimum height (in px) for this tabset"),e.addInherited("maxWidth","tabSetMaxWidth").setDescription("maximum width (in px) for this tabset"),e.addInherited("maxHeight","tabSetMaxHeight").setDescription("maximum height (in px) for this tabset"),e.addInherited("enableTabWrap","tabSetEnableTabWrap").setDescription("wrap tabs onto multiple lines"),e.addInherited("tabLocation","tabSetTabLocation").setDescription("the location of the tabs either top or bottom"),e.addInherited("autoSelectTab","tabSetAutoSelectTab").setType(m.BOOLEAN).setDescription("whether to select new/moved tabs in tabset"),e.addInherited("enableActiveIcon","tabSetEnableActiveIcon").setType(m.BOOLEAN).setDescription("whether the active icon (*) should be displayed when the tabset is active"),e.addInherited("enableTabScrollbar","tabSetEnableTabScrollbar").setType(m.BOOLEAN).setDescription("whether to show a mini scrollbar for the tabs"),e}}k.TYPE="tabset",k.attributeDefinitions=k.createAttributeDefinitions();class C extends T{static fromJson(e,t,n){const r=new C(t,n.windowId,e);if(null!=e.children)for(const i of e.children)if(i.type===k.TYPE){const e=k.fromJson(i,t,n);r.addChild(e)}else{const e=C.fromJson(i,t,n);r.addChild(e)}return r}constructor(e,t,n){super(e),this.windowId=t,this.minHeight=M,this.minWidth=M,this.maxHeight=I,this.maxWidth=I,C.attributeDefinitions.fromJson(n,this.attributes),this.normalizeWeights(),e.addNode(this)}getWeight(){return this.attributes.weight}toJson(){const e={};C.attributeDefinitions.toJson(e,this.attributes),e.children=[];for(const t of this.children)e.children.push(t.toJson());return e}getWindowId(){return this.windowId}setWindowId(e){this.windowId=e}setWeight(e){this.attributes.weight=e}getSplitterBounds(e){const t=this.getOrientation()===d.HORZ,n=this.getChildren(),r=this.model.getSplitterSize(),i=n[0].getRect(),a=n[n.length-1].getRect();let o=t?[i.x,a.getRight()]:[i.y,a.getBottom()];const l=t?[i.x,a.getRight()]:[i.y,a.getBottom()];for(let i=0;i<e;i++){const e=n[i];o[0]+=t?e.getMinWidth():e.getMinHeight(),l[0]+=t?e.getMaxWidth():e.getMaxHeight(),i>0&&(o[0]+=r,l[0]+=r)}for(let i=n.length-1;i>=e;i--){const e=n[i];o[1]-=(t?e.getMinWidth():e.getMinHeight())+r,l[1]-=(t?e.getMaxWidth():e.getMaxHeight())+r}return o=[Math.max(l[1],o[0]),Math.min(l[0],o[1])],o}getSplitterInitials(e){const t=this.getOrientation()===d.HORZ,n=this.getChildren(),r=this.model.getSplitterSize(),i=[];let a=0;for(let e=0;e<n.length;e++){const r=n[e].getRect(),o=t?r.width:r.height;i.push(o),a+=o}const o=n[e].getRect();return{initialSizes:i,sum:a,startPosition:(t?o.x:o.y)-r}}calculateSplit(e,t,n,r,i){const a=this.getOrientation()===d.HORZ,o=this.getChildren(),l=o[e],s=a?l.getMaxWidth():l.getMaxHeight(),u=[...n];if(t<i){let n=i-t,r=0;u[e]+n>s?(r=u[e]+n-s,u[e]=s):u[e]+=n;for(let t=e-1;t>=0;t--){const e=o[t],r=a?e.getMinWidth():e.getMinHeight();if(u[t]-n>r){u[t]-=n;break}n-=u[t]-r,u[t]=r}for(let t=e+1;t<o.length;t++){const e=o[t],n=a?e.getMaxWidth():e.getMaxHeight();if(u[t]+r<n){u[t]+=r;break}r-=n-u[t],u[t]=n}}else{let n=t-i,r=0;u[e-1]+n>s?(r=u[e-1]+n-s,u[e-1]=s):u[e-1]+=n;for(let t=e;t<o.length;t++){const e=o[t],r=a?e.getMinWidth():e.getMinHeight();if(u[t]-n>r){u[t]-=n;break}n-=u[t]-r,u[t]=r}for(let t=e-1;t>=0;t--){const e=o[t],n=a?e.getMaxWidth():e.getMaxHeight();if(u[t]+r<n){u[t]+=r;break}r-=n-u[t],u[t]=n}}return u.map((e=>100*Math.max(.1,e)/r))}getMinSize(e){return e===d.HORZ?this.getMinWidth():this.getMinHeight()}getMinWidth(){return this.minWidth}getMinHeight(){return this.minHeight}getMaxSize(e){return e===d.HORZ?this.getMaxWidth():this.getMaxHeight()}getMaxWidth(){return this.maxWidth}getMaxHeight(){return this.maxHeight}calcMinMaxSize(){this.minHeight=M,this.minWidth=M,this.maxHeight=I,this.maxWidth=I;let e=!0;for(const t of this.children){const n=t;n.calcMinMaxSize(),this.getOrientation()===d.VERT?(this.minHeight+=n.getMinHeight(),this.maxHeight+=n.getMaxHeight(),e||(this.minHeight+=this.model.getSplitterSize(),this.maxHeight+=this.model.getSplitterSize()),this.minWidth=Math.max(this.minWidth,n.getMinWidth()),this.maxWidth=Math.min(this.maxWidth,n.getMaxWidth())):(this.minWidth+=n.getMinWidth(),this.maxWidth+=n.getMaxWidth(),e||(this.minWidth+=this.model.getSplitterSize(),this.maxWidth+=this.model.getSplitterSize()),this.minHeight=Math.max(this.minHeight,n.getMinHeight()),this.maxHeight=Math.min(this.maxHeight,n.getMaxHeight())),e=!1}}tidy(){let e=0;for(;e<this.children.length;){const t=this.children[e];if(t instanceof C){t.tidy();const n=t.getChildren();if(0===n.length)this.removeChild(t);else if(1===n.length){const r=n[0];if(this.removeChild(t),r instanceof C){let n=0;const i=r.getChildren();for(const e of i)n+=e.getWeight();for(let r=0;r<i.length;r++){const a=i[r];a.setWeight(t.getWeight()*a.getWeight()/n),this.addChild(a,e+r)}}else r.setWeight(t.getWeight()),this.addChild(r,e)}else e++}else t instanceof k&&0===t.getChildren().length&&t.isEnableDeleteWhenEmpty()?(this.removeChild(t),t===this.model.getMaximizedTabset(this.windowId)&&this.model.setMaximizedTabset(void 0,this.windowId)):e++}if(this===this.model.getRoot(this.windowId)&&0===this.children.length){const e=this.model.getOnCreateTabSet();let t=e?e():{};t=Object.assign(Object.assign({},t),{selected:-1});const n=new k(this.model,t);this.model.setActiveTabset(n,this.windowId),this.addChild(n)}}canDrop(e,t,n){const r=n-this.rect.y,i=t-this.rect.x,a=this.rect.width,o=this.rect.height,s=50;let u;if(this.getWindowId()===B.MAIN_WINDOW_ID||N(e)){if(this.model.isEnableEdgeDock()&&void 0===this.parent){if(t<this.rect.x+10&&r>o/2-s&&r<o/2+s){const e=h.LEFT,t=e.getDockRect(this.rect);t.width=t.width/2,u=new v(this,t,e,-1,l.FLEXLAYOUT__OUTLINE_RECT_EDGE)}else if(t>this.rect.getRight()-10&&r>o/2-s&&r<o/2+s){const e=h.RIGHT,t=e.getDockRect(this.rect);t.width=t.width/2,t.x+=t.width,u=new v(this,t,e,-1,l.FLEXLAYOUT__OUTLINE_RECT_EDGE)}else if(n<this.rect.y+10&&i>a/2-s&&i<a/2+s){const e=h.TOP,t=e.getDockRect(this.rect);t.height=t.height/2,u=new v(this,t,e,-1,l.FLEXLAYOUT__OUTLINE_RECT_EDGE)}else if(n>this.rect.getBottom()-10&&i>a/2-s&&i<a/2+s){const e=h.BOTTOM,t=e.getDockRect(this.rect);t.height=t.height/2,t.y+=t.height,u=new v(this,t,e,-1,l.FLEXLAYOUT__OUTLINE_RECT_EDGE)}if(void 0!==u&&!e.canDockInto(e,u))return}return u}}drop(e,t,n){const r=t,i=e.getParent();let a;if(i&&i.removeChild(e),void 0!==i&&i instanceof k&&i.setSelected(0),void 0!==i&&i instanceof P&&i.setSelected(-1),e instanceof k||e instanceof C)a=e,a instanceof C&&a.getOrientation()===this.getOrientation()&&(t.getOrientation()===this.getOrientation()||t===h.CENTER)&&(a=new C(this.model,this.windowId,{}),a.addChild(e));else{const t=this.model.getOnCreateTabSet();a=new k(this.model,t?t(e):{}),a.addChild(e)}let o=this.children.reduce(((e,t)=>e+t.getWeight()),0);0===o&&(o=100),a.setWeight(o/3);const l=!this.model.isRootOrientationVertical();if(r===h.CENTER)-1===n?this.addChild(a,this.children.length):this.addChild(a,n);else if(l&&r===h.LEFT||!l&&r===h.TOP)this.addChild(a,0);else if(l&&r===h.RIGHT||!l&&r===h.BOTTOM)this.addChild(a);else if(l&&r===h.TOP||!l&&r===h.LEFT){const e=new C(this.model,this.windowId,{}),t=new C(this.model,this.windowId,{});t.setWeight(75),a.setWeight(25);for(const e of this.children)t.addChild(e);this.removeAll(),e.addChild(a),e.addChild(t),this.addChild(e)}else if(l&&r===h.BOTTOM||!l&&r===h.RIGHT){const e=new C(this.model,this.windowId,{}),t=new C(this.model,this.windowId,{});t.setWeight(75),a.setWeight(25);for(const e of this.children)t.addChild(e);this.removeAll(),e.addChild(t),e.addChild(a),this.addChild(e)}a instanceof k&&this.model.setActiveTabset(a,this.windowId),this.model.tidy()}isEnableDrop(){return!0}getAttributeDefinitions(){return C.attributeDefinitions}updateAttrs(e){C.attributeDefinitions.update(e,this.attributes)}static getAttributeDefinitions(){return C.attributeDefinitions}normalizeWeights(){let e=0;for(const t of this.children)e+=t.getWeight();0===e&&(e=1);for(const t of this.children){const n=t;n.setWeight(Math.max(.001,100*n.getWeight()/e))}}static createAttributeDefinitions(){const e=new b;return e.add("type",C.TYPE,!0).setType(m.STRING).setFixed(),e.add("id",void 0).setType(m.STRING).setDescription("the unique id of the row, if left undefined a uuid will be assigned"),e.add("weight",100).setType(m.NUMBER).setDescription("relative weight for sizing of this row in parent row"),e}}C.TYPE="row",C.attributeDefinitions=C.createAttributeDefinitions();class D{constructor(e,t){this._windowId=e,this._rect=t,this._toScreenRectFunction=e=>e}visitNodes(e){this.root.forEachNode(e,0)}get windowId(){return this._windowId}get rect(){return this._rect}get layout(){return this._layout}get window(){return this._window}get root(){return this._root}get maximizedTabSet(){return this._maximizedTabSet}get activeTabSet(){return this._activeTabSet}set rect(e){this._rect=e}set layout(e){this._layout=e}set window(e){this._window=e}set root(e){this._root=e}set maximizedTabSet(e){this._maximizedTabSet=e}set activeTabSet(e){this._activeTabSet=e}get toScreenRectFunction(){return this._toScreenRectFunction}set toScreenRectFunction(e){this._toScreenRectFunction=e}toJson(){return this._window&&this._window.screenTop>-1e4&&(this.rect=new f(this._window.screenLeft,this._window.screenTop,this._window.outerWidth,this._window.outerHeight)),{layout:this.root.toJson(),rect:this.rect.toJson()}}static fromJson(e,t,n){const r=t.getwindowsMap().size;let i=e.rect?f.fromJson(e.rect):new f(50+50*r,50+50*r,600,400);i.snap(10);const a=new D(n,i);return a.root=C.fromJson(e.layout,t,a),a}}const M=0,I=99999;class B{constructor(){this.attributes={},this.idMap=new Map,this.borders=new y(this),this.windows=new Map,this.rootWindow=new D(B.MAIN_WINDOW_ID,f.empty()),this.windows.set(B.MAIN_WINDOW_ID,this.rootWindow),this.changeListeners=[]}doAction(e){var t;let n;switch(e.type){case g.ADD_NODE:{const t=new _(this,e.data.json,!0),r=this.idMap.get(e.data.toNode);(r instanceof k||r instanceof P||r instanceof C)&&(r.drop(t,h.getByName(e.data.location),e.data.index,e.data.select),n=t);break}case g.MOVE_NODE:{const t=this.idMap.get(e.data.fromNode);if(t instanceof _||t instanceof k||t instanceof C){t===this.getMaximizedTabset(t.getWindowId())&&(this.windows.get(t.getWindowId()).maximizedTabSet=void 0);const n=this.idMap.get(e.data.toNode);(n instanceof k||n instanceof P||n instanceof C)&&n.drop(t,h.getByName(e.data.location),e.data.index,e.data.select)}this.removeEmptyWindows();break}case g.DELETE_TAB:{const t=this.idMap.get(e.data.node);t instanceof _&&t.delete(),this.removeEmptyWindows();break}case g.DELETE_TABSET:{const t=this.idMap.get(e.data.node);if(t instanceof k){const e=[...t.getChildren()];for(let t=0;t<e.length;t++){const n=e[t];n.isEnableClose()&&n.delete()}0===t.getChildren().length&&t.delete(),this.tidy()}this.removeEmptyWindows();break}case g.POPOUT_TABSET:{const t=this.idMap.get(e.data.node);if(t instanceof k){const e=t.isMaximized(),n=this.windows.get(t.getWindowId()),r=x(),i=new D(r,n.toScreenRectFunction(t.getRect())),a={type:"row",children:[]},o=C.fromJson(a,this,i);i.root=o,this.windows.set(r,i),o.drop(t,h.CENTER,0),e&&(this.rootWindow.maximizedTabSet=void 0)}this.removeEmptyWindows();break}case g.POPOUT_TAB:{const t=this.idMap.get(e.data.node);if(t instanceof _){const e=x();let n=f.empty();n=t.getParent()instanceof k?t.getParent().getRect():t.getParent().getContentRect();const r=this.windows.get(t.getWindowId()),i=new D(e,r.toScreenRectFunction(n)),a=x(),o={type:"row",children:[{type:"tabset",id:a}]},l=C.fromJson(o,this,i);i.root=l,this.windows.set(e,i),this.idMap.get(a).drop(t,h.CENTER,0,!0)}this.removeEmptyWindows();break}case g.CLOSE_WINDOW:{const n=this.windows.get(e.data.windowId);n&&(null===(t=this.rootWindow.root)||void 0===t||t.drop(null==n?void 0:n.root,h.CENTER,-1),this.rootWindow.visitNodes(((e,t)=>{e instanceof C&&e.setWindowId(B.MAIN_WINDOW_ID)})),this.windows.delete(e.data.windowId));break}case g.CREATE_WINDOW:{const t=x(),r=new D(t,f.fromJson(e.data.rect)),i=C.fromJson(e.data.layout,this,r);r.root=i,this.windows.set(t,r),n=t;break}case g.RENAME_TAB:{const t=this.idMap.get(e.data.node);t instanceof _&&t.setName(e.data.text);break}case g.SELECT_TAB:{const t=this.idMap.get(e.data.tabNode),n=e.data.windowId?e.data.windowId:B.MAIN_WINDOW_ID,r=this.windows.get(n);if(t instanceof _){const e=t.getParent(),n=e.getChildren().indexOf(t);e instanceof P?e.getSelected()===n?e.setSelected(-1):e.setSelected(n):e instanceof k&&(e.getSelected()!==n&&e.setSelected(n),r.activeTabSet=e)}break}case g.SET_ACTIVE_TABSET:{const t=e.data.windowId?e.data.windowId:B.MAIN_WINDOW_ID,n=this.windows.get(t);if(void 0===e.data.tabsetNode)n.activeTabSet=void 0;else{const t=this.idMap.get(e.data.tabsetNode);t instanceof k&&(n.activeTabSet=t)}break}case g.ADJUST_WEIGHTS:{const t=this.idMap.get(e.data.nodeId).getChildren();for(let n=0;n<t.length;n++)t[n].setWeight(e.data.weights[n]);break}case g.ADJUST_BORDER_SPLIT:{const t=this.idMap.get(e.data.node);t instanceof P&&t.setSize(e.data.pos);break}case g.MAXIMIZE_TOGGLE:{const t=e.data.windowId?e.data.windowId:B.MAIN_WINDOW_ID,n=this.windows.get(t),r=this.idMap.get(e.data.node);r instanceof k&&(r===n.maximizedTabSet?n.maximizedTabSet=void 0:(n.maximizedTabSet=r,n.activeTabSet=r));break}case g.UPDATE_MODEL_ATTRIBUTES:this.updateAttrs(e.data.json);break;case g.UPDATE_NODE_ATTRIBUTES:this.idMap.get(e.data.node).updateAttrs(e.data.json)}this.updateIdMap();for(const t of this.changeListeners)t(e);return n}getActiveTabset(e=B.MAIN_WINDOW_ID){const t=this.windows.get(e);return t&&t.activeTabSet&&this.getNodeById(t.activeTabSet.getId())?t.activeTabSet:void 0}getMaximizedTabset(e=B.MAIN_WINDOW_ID){return this.windows.get(e).maximizedTabSet}getRoot(e=B.MAIN_WINDOW_ID){return this.windows.get(e).root}isRootOrientationVertical(){return this.attributes.rootOrientationVertical}isEnableRotateBorderIcons(){return this.attributes.enableRotateBorderIcons}getBorderSet(){return this.borders}getwindowsMap(){return this.windows}visitNodes(e){this.borders.forEachNode(e);for(const[t,n]of this.windows)n.root.forEachNode(e,0)}visitWindowNodes(e,t){this.windows.has(e)&&(e===B.MAIN_WINDOW_ID&&this.borders.forEachNode(t),this.windows.get(e).visitNodes(t))}getNodeById(e){return this.idMap.get(e)}getFirstTabSet(e=this.windows.get(B.MAIN_WINDOW_ID).root){const t=e.getChildren()[0];return t instanceof k?t:this.getFirstTabSet(t)}static fromJson(e){const t=new B;if(B.attributeDefinitions.fromJson(e.global,t.attributes),e.borders&&(t.borders=y.fromJson(e.borders,t)),e.popouts)for(const n in e.popouts){const r=e.popouts[n],i=D.fromJson(r,t,n);t.windows.set(n,i)}return t.rootWindow.root=C.fromJson(e.layout,t,t.getwindowsMap().get(B.MAIN_WINDOW_ID)),t.tidy(),t}toJson(){const e={};B.attributeDefinitions.toJson(e,this.attributes),this.visitNodes((e=>{e.fireEvent("save",{})}));const t={};for(const[e,n]of this.windows)e!==B.MAIN_WINDOW_ID&&(t[e]=n.toJson());return{global:e,borders:this.borders.toJson(),layout:this.rootWindow.root.toJson(),popouts:t}}getSplitterSize(){return this.attributes.splitterSize}getSplitterExtra(){return this.attributes.splitterExtra}isEnableEdgeDock(){return this.attributes.enableEdgeDock}isSplitterEnableHandle(){return this.attributes.splitterEnableHandle}setOnAllowDrop(e){this.onAllowDrop=e}setOnCreateTabSet(e){this.onCreateTabSet=e}addChangeListener(e){this.changeListeners.push(e)}removeChangeListener(e){const t=this.changeListeners.findIndex((t=>t===e));-1!==t&&this.changeListeners.splice(t,1)}toString(){return JSON.stringify(this.toJson())}removeEmptyWindows(){const e=new Set;for(const[t]of this.windows)if(t!==B.MAIN_WINDOW_ID){let n=0;this.visitWindowNodes(t,(e=>{e instanceof _&&n++})),0===n&&e.add(t)}for(const t of e)this.windows.delete(t)}setActiveTabset(e,t){const n=this.windows.get(t);n&&(n.activeTabSet=e||void 0)}setMaximizedTabset(e,t){const n=this.windows.get(t);n&&(n.maximizedTabSet=e||void 0)}updateIdMap(){this.idMap.clear(),this.visitNodes((e=>{this.idMap.set(e.getId(),e)}))}addNode(e){const t=e.getId();if(this.idMap.has(t))throw new Error(`Error: each node must have a unique id, duplicate id:${e.getId()}`);this.idMap.set(t,e)}findDropTargetNode(e,t,n,r){let i=this.windows.get(e).root.findDropTargetNode(e,t,n,r);return void 0===i&&e===B.MAIN_WINDOW_ID&&(i=this.borders.findDropTargetNode(t,n,r)),i}tidy(){for(const[e,t]of this.windows)t.root.tidy()}updateAttrs(e){B.attributeDefinitions.update(e,this.attributes)}nextUniqueId(){return"#"+x()}getAttribute(e){return this.attributes[e]}getOnAllowDrop(){return this.onAllowDrop}getOnCreateTabSet(){return this.onCreateTabSet}static toTypescriptInterfaces(){B.attributeDefinitions.pairAttributes("RowNode",C.getAttributeDefinitions()),B.attributeDefinitions.pairAttributes("TabSetNode",k.getAttributeDefinitions()),B.attributeDefinitions.pairAttributes("TabNode",_.getAttributeDefinitions()),B.attributeDefinitions.pairAttributes("BorderNode",P.getAttributeDefinitions());let e=[];e.push(B.attributeDefinitions.toTypescriptInterface("Global",void 0)),e.push(C.getAttributeDefinitions().toTypescriptInterface("Row",B.attributeDefinitions)),e.push(k.getAttributeDefinitions().toTypescriptInterface("TabSet",B.attributeDefinitions)),e.push(_.getAttributeDefinitions().toTypescriptInterface("Tab",B.attributeDefinitions)),e.push(P.getAttributeDefinitions().toTypescriptInterface("Border",B.attributeDefinitions)),console.log(e.join("\n"))}static createAttributeDefinitions(){const e=new b;return e.add("enableEdgeDock",!0).setType(m.BOOLEAN).setDescription("enable docking to the edges of the layout, this will show the edge indicators"),e.add("rootOrientationVertical",!1).setType(m.BOOLEAN).setDescription("the top level 'row' will layout horizontally by default, set this option true to make it layout vertically"),e.add("enableRotateBorderIcons",!0).setType(m.BOOLEAN).setDescription("boolean indicating if tab icons should rotate with the text in the left and right borders"),e.add("splitterSize",8).setType(m.NUMBER).setDescription("width in pixels of all splitters between tabsets/borders"),e.add("splitterExtra",0).setType(m.NUMBER).setDescription("additional width in pixels of the splitter hit test area"),e.add("splitterEnableHandle",!1).setType(m.BOOLEAN).setDescription("enable a small centralized handle on all splitters"),e.add("tabEnableClose",!0).setType(m.BOOLEAN),e.add("tabCloseType",1).setType("ICloseType"),e.add("tabEnablePopout",!1).setType(m.BOOLEAN).setAlias("tabEnableFloat"),e.add("tabEnablePopoutIcon",!0).setType(m.BOOLEAN),e.add("tabEnablePopoutOverlay",!1).setType(m.BOOLEAN),e.add("tabEnableDrag",!0).setType(m.BOOLEAN),e.add("tabEnableRename",!0).setType(m.BOOLEAN),e.add("tabContentClassName",void 0).setType(m.STRING),e.add("tabClassName",void 0).setType(m.STRING),e.add("tabIcon",void 0).setType(m.STRING),e.add("tabEnableRenderOnDemand",!0).setType(m.BOOLEAN),e.add("tabDragSpeed",.3).setType(m.NUMBER),e.add("tabBorderWidth",-1).setType(m.NUMBER),e.add("tabBorderHeight",-1).setType(m.NUMBER),e.add("tabSetEnableDeleteWhenEmpty",!0).setType(m.BOOLEAN),e.add("tabSetEnableDrop",!0).setType(m.BOOLEAN),e.add("tabSetEnableDrag",!0).setType(m.BOOLEAN),e.add("tabSetEnableDivide",!0).setType(m.BOOLEAN),e.add("tabSetEnableMaximize",!0).setType(m.BOOLEAN),e.add("tabSetEnableClose",!1).setType(m.BOOLEAN),e.add("tabSetEnableSingleTabStretch",!1).setType(m.BOOLEAN),e.add("tabSetAutoSelectTab",!0).setType(m.BOOLEAN),e.add("tabSetEnableActiveIcon",!1).setType(m.BOOLEAN),e.add("tabSetClassNameTabStrip",void 0).setType(m.STRING),e.add("tabSetEnableTabStrip",!0).setType(m.BOOLEAN),e.add("tabSetEnableTabWrap",!1).setType(m.BOOLEAN),e.add("tabSetTabLocation","top").setType("ITabLocation"),e.add("tabMinWidth",M).setType(m.NUMBER),e.add("tabMinHeight",M).setType(m.NUMBER),e.add("tabSetMinWidth",M).setType(m.NUMBER),e.add("tabSetMinHeight",M).setType(m.NUMBER),e.add("tabMaxWidth",I).setType(m.NUMBER),e.add("tabMaxHeight",I).setType(m.NUMBER),e.add("tabSetMaxWidth",I).setType(m.NUMBER),e.add("tabSetMaxHeight",I).setType(m.NUMBER),e.add("tabSetEnableTabScrollbar",!1).setType(m.BOOLEAN),e.add("borderSize",200).setType(m.NUMBER),e.add("borderMinSize",M).setType(m.NUMBER),e.add("borderMaxSize",I).setType(m.NUMBER),e.add("borderEnableDrop",!0).setType(m.BOOLEAN),e.add("borderAutoSelectTabWhenOpen",!0).setType(m.BOOLEAN),e.add("borderAutoSelectTabWhenClosed",!1).setType(m.BOOLEAN),e.add("borderClassName",void 0).setType(m.STRING),e.add("borderEnableAutoHide",!1).setType(m.BOOLEAN),e.add("borderEnableTabScrollbar",!1).setType(m.BOOLEAN),e}}B.MAIN_WINDOW_ID="__main_window_id__",B.attributeDefinitions=B.createAttributeDefinitions();class P extends T{static fromJson(e,t){const n=h.getByName(e.location),r=new P(n,e,t);return e.children&&(r.children=e.children.map((e=>{const n=_.fromJson(e,t);return n.setParent(r),n}))),r}constructor(e,t,n){super(n),this.outerRect=f.empty(),this.contentRect=f.empty(),this.tabHeaderRect=f.empty(),this.location=e,this.attributes.id=`border_${e.getName()}`,P.attributeDefinitions.fromJson(t,this.attributes),n.addNode(this)}getLocation(){return this.location}getClassName(){return this.getAttr("className")}isHorizontal(){return this.location.orientation===d.HORZ}getSize(){const e=this.getAttr("size"),t=this.getSelected();if(-1===t)return e;{const n=this.children[t],r=this.isHorizontal()?n.getAttr("borderWidth"):n.getAttr("borderHeight");return-1===r?e:r}}getMinSize(){const e=this.getSelectedNode();let t=this.getAttr("minSize");if(e){const n=this.isHorizontal()?e.getMinWidth():e.getMinHeight();t=Math.max(t,n)}return t}getMaxSize(){const e=this.getSelectedNode();let t=this.getAttr("maxSize");if(e){const n=this.isHorizontal()?e.getMaxWidth():e.getMaxHeight();t=Math.min(t,n)}return t}getSelected(){return this.attributes.selected}isAutoHide(){return this.getAttr("enableAutoHide")}getSelectedNode(){if(-1!==this.getSelected())return this.children[this.getSelected()]}getOrientation(){return this.location.getOrientation()}getConfig(){return this.attributes.config}isMaximized(){return!1}isShowing(){return this.attributes.show}toJson(){const e={};return P.attributeDefinitions.toJson(e,this.attributes),e.location=this.location.getName(),e.children=this.children.map((e=>e.toJson())),e}isAutoSelectTab(e){return null==e&&(e=-1!==this.getSelected()),e?this.getAttr("autoSelectTabWhenOpen"):this.getAttr("autoSelectTabWhenClosed")}isEnableTabScrollbar(){return this.getAttr("enableTabScrollbar")}setSelected(e){this.attributes.selected=e}getTabHeaderRect(){return this.tabHeaderRect}setTabHeaderRect(e){this.tabHeaderRect=e}getOuterRect(){return this.outerRect}setOuterRect(e){this.outerRect=e}getRect(){return this.tabHeaderRect}getContentRect(){return this.contentRect}setContentRect(e){this.contentRect=e}isEnableDrop(){return this.getAttr("enableDrop")}setSize(e){const t=this.getSelected();if(-1===t)this.attributes.size=e;else{const n=this.children[t];-1===(this.isHorizontal()?n.getAttr("borderWidth"):n.getAttr("borderHeight"))?this.attributes.size=e:this.isHorizontal()?n.setBorderWidth(e):n.setBorderHeight(e)}}updateAttrs(e){P.attributeDefinitions.update(e,this.attributes)}remove(e){const t=this.removeChild(e);-1!==this.getSelected()&&R(this,t)}canDrop(e,t,n){if(!(e instanceof _))return;let r;const i=h.CENTER;if(this.tabHeaderRect.contains(t,n)){if(this.location.orientation===d.VERT)if(this.children.length>0){let e=this.children[0],n=e.getTabRect();const a=n.y,o=n.height;let s=this.tabHeaderRect.x,u=0;for(let c=0;c<this.children.length;c++){if(e=this.children[c],n=e.getTabRect(),u=n.x+n.width/2,t>=s&&t<u){const e=new f(n.x-2,a,3,o);r=new v(this,e,i,c,l.FLEXLAYOUT__OUTLINE_RECT);break}s=u}if(null==r){const e=new f(n.getRight()-2,a,3,o);r=new v(this,e,i,this.children.length,l.FLEXLAYOUT__OUTLINE_RECT)}}else{const e=new f(this.tabHeaderRect.x+1,this.tabHeaderRect.y+2,3,18);r=new v(this,e,i,0,l.FLEXLAYOUT__OUTLINE_RECT)}else if(this.children.length>0){let e=this.children[0],t=e.getTabRect();const a=t.x,o=t.width;let s=this.tabHeaderRect.y,u=0;for(let c=0;c<this.children.length;c++){if(e=this.children[c],t=e.getTabRect(),u=t.y+t.height/2,n>=s&&n<u){const e=new f(a,t.y-2,o,3);r=new v(this,e,i,c,l.FLEXLAYOUT__OUTLINE_RECT);break}s=u}if(null==r){const e=new f(a,t.getBottom()-2,o,3);r=new v(this,e,i,this.children.length,l.FLEXLAYOUT__OUTLINE_RECT)}}else{const e=new f(this.tabHeaderRect.x+2,this.tabHeaderRect.y+1,18,3);r=new v(this,e,i,0,l.FLEXLAYOUT__OUTLINE_RECT)}if(!e.canDockInto(e,r))return}else if(-1!==this.getSelected()&&this.outerRect.contains(t,n)){const t=this.outerRect;if(r=new v(this,t,i,-1,l.FLEXLAYOUT__OUTLINE_RECT),!e.canDockInto(e,r))return}return r}drop(e,t,n,r){let i=0;const a=e.getParent();void 0!==a&&(i=a.removeChild(e),a!==this&&a instanceof P&&a.getSelected()===i?a.setSelected(-1):R(a,i)),e instanceof _&&a===this&&i<n&&n>0&&n--;let o=n;-1===o&&(o=this.children.length),e instanceof _&&this.addChild(e,o),(r||!1!==r&&this.isAutoSelectTab())&&this.setSelected(o),this.model.tidy()}getSplitterBounds(e,t=!1){const n=[0,0],r=t?this.getMinSize():0,i=t?this.getMaxSize():99999,a=this.model.getRoot(B.MAIN_WINDOW_ID),o=a.getRect(),l=this.model.getSplitterSize();if(this.location===h.TOP){n[0]=this.tabHeaderRect.getBottom()+r;const e=this.tabHeaderRect.getBottom()+i;n[1]=Math.max(n[0],o.getBottom()-a.getMinHeight()-l),n[1]=Math.min(n[1],e)}else if(this.location===h.LEFT){n[0]=this.tabHeaderRect.getRight()+r;const e=this.tabHeaderRect.getRight()+i;n[1]=Math.max(n[0],o.getRight()-a.getMinWidth()-l),n[1]=Math.min(n[1],e)}else if(this.location===h.BOTTOM){n[1]=this.tabHeaderRect.y-r-l;const e=this.tabHeaderRect.y-i-l;n[0]=Math.min(n[1],o.y+a.getMinHeight()),n[0]=Math.max(n[0],e)}else if(this.location===h.RIGHT){n[1]=this.tabHeaderRect.x-r-l;const e=this.tabHeaderRect.x-i-l;n[0]=Math.min(n[1],o.x+a.getMinWidth()),n[0]=Math.max(n[0],e)}return n}calculateSplit(e,t){const n=this.getSplitterBounds(t);return this.location===h.BOTTOM||this.location===h.RIGHT?Math.max(0,n[1]-t):Math.max(0,t-n[0])}getAttributeDefinitions(){return P.attributeDefinitions}static getAttributeDefinitions(){return P.attributeDefinitions}static createAttributeDefinitions(){const e=new b;return e.add("type",P.TYPE,!0).setType(m.STRING).setFixed(),e.add("selected",-1).setType(m.NUMBER).setDescription("index of selected/visible tab in border; -1 means no tab selected"),e.add("show",!0).setType(m.BOOLEAN).setDescription("show/hide this border"),e.add("config",void 0).setType("any").setDescription("a place to hold json config used in your own code"),e.addInherited("enableDrop","borderEnableDrop").setType(m.BOOLEAN).setDescription("whether tabs can be dropped into this border"),e.addInherited("className","borderClassName").setType(m.STRING).setDescription("class applied to tab button"),e.addInherited("autoSelectTabWhenOpen","borderAutoSelectTabWhenOpen").setType(m.BOOLEAN).setDescription("whether to select new/moved tabs in border when the border is already open"),e.addInherited("autoSelectTabWhenClosed","borderAutoSelectTabWhenClosed").setType(m.BOOLEAN).setDescription("whether to select new/moved tabs in border when the border is currently closed"),e.addInherited("size","borderSize").setType(m.NUMBER).setDescription("size of the tab area when selected"),e.addInherited("minSize","borderMinSize").setType(m.NUMBER).setDescription("the minimum size of the tab area"),e.addInherited("maxSize","borderMaxSize").setType(m.NUMBER).setDescription("the maximum size of the tab area"),e.addInherited("enableAutoHide","borderEnableAutoHide").setType(m.BOOLEAN).setDescription("hide border if it has zero tabs"),e.addInherited("enableTabScrollbar","borderEnableTabScrollbar").setType(m.BOOLEAN).setDescription("whether to show a mini scrollbar for the tabs"),e}}P.TYPE="border",P.attributeDefinitions=P.createAttributeDefinitions();const z=e=>{const{layout:t,node:n,index:r,horizontal:i}=e,[a,o]=s.useState(!1),u=s.useRef(null),c=s.useRef(null),h=s.useRef([]),p=s.useRef(void 0),m=s.useRef(void 0),b=s.useRef(0),v=s.useRef(0),y=s.useRef({initialSizes:[],sum:0,startPosition:0}),T=n.getModel().getSplitterSize();let _=n.getModel().getSplitterExtra();E()||(_=Math.max(20,_+T)-T),s.useEffect((()=>{var e,t;return null===(e=u.current)||void 0===e||e.addEventListener("touchstart",w,{passive:!1}),null===(t=c.current)||void 0===t||t.addEventListener("touchstart",w,{passive:!1}),()=>{var e,t;null===(e=u.current)||void 0===e||e.removeEventListener("touchstart",w),null===(t=c.current)||void 0===t||t.removeEventListener("touchstart",w)}}),[]);const w=e=>{e.preventDefault(),e.stopImmediatePropagation()},S=e=>{var a;e.stopPropagation(),n instanceof C&&(y.current=n.getSplitterInitials(r)),L(!1,t.getCurrentDocument()),function(e,t,n,r,i){t.preventDefault();const a=e=>{e.preventDefault(),n(e.clientX,e.clientY)},o=e=>{e.preventDefault(),i()},l=()=>{e.removeEventListener("pointermove",a),e.removeEventListener("pointerup",l),e.removeEventListener("pointercancel",o),r()};e.addEventListener("pointermove",a),e.addEventListener("pointerup",l),e.addEventListener("pointercancel",o)}(e.currentTarget.ownerDocument,e,N,A,O),h.current=n.getSplitterBounds(r,!0);const s=t.getRootDiv();p.current=t.getCurrentDocument().createElement("div"),p.current.style.flexDirection=i?"row":"column",p.current.className=t.getClassName(l.FLEXLAYOUT__SPLITTER_DRAG),p.current.style.cursor=n.getOrientation()===d.VERT?"ns-resize":"ew-resize",n.getModel().isSplitterEnableHandle()&&(m.current=t.getCurrentDocument().createElement("div"),m.current.className=k(l.FLEXLAYOUT__SPLITTER_HANDLE)+" "+k(i?l.FLEXLAYOUT__SPLITTER_HANDLE_HORZ:l.FLEXLAYOUT__SPLITTER_HANDLE_VERT),p.current.appendChild(m.current));const c=null===(a=u.current)||void 0===a?void 0:a.getBoundingClientRect(),g=new f(c.x-t.getDomRect().x,c.y-t.getDomRect().y,c.width,c.height);b.current=e.clientX-c.x,v.current=e.clientY-c.y,g.positionElement(p.current),s&&s.appendChild(p.current),o(!0)},O=()=>{const e=t.getRootDiv();e&&p.current&&e.removeChild(p.current),p.current=void 0,o(!1)},N=(e,r)=>{if(p.current){const i=t.getDomRect();if(!i)return;n.getOrientation()===d.VERT?p.current.style.top=x(r-i.y-v.current)+"px":p.current.style.left=x(e-i.x-b.current)+"px",t.isRealtimeResize()&&R(!0)}},A=()=>{if(p.current){R(!1);const e=t.getRootDiv();e&&p.current&&e.removeChild(p.current),p.current=void 0}L(!0,t.getCurrentDocument()),o(!1)},R=e=>{(()=>{if(p.current){let e=0;if(e=n.getOrientation()===d.VERT?p.current.offsetTop:p.current.offsetLeft,n instanceof P){const r=n.calculateSplit(n,e);t.doAction(g.adjustBorderSplit(n.getId(),r))}else{const i=y.current,a=n.calculateSplit(r,e,i.initialSizes,i.sum,i.startPosition);t.doAction(g.adjustWeights(n.getId(),a))}}})()},x=e=>{const t=h.current;let n=e;return e<t[0]&&(n=t[0]),e>t[1]&&(n=t[1]),n},k=t.getClassName,D={cursor:i?"ew-resize":"ns-resize",flexDirection:i?"column":"row"};let M,I=k(l.FLEXLAYOUT__SPLITTER)+" "+k(l.FLEXLAYOUT__SPLITTER_+n.getOrientation().getName());if(n instanceof P?I+=" "+k(l.FLEXLAYOUT__SPLITTER_BORDER):void 0!==n.getModel().getMaximizedTabset(t.getWindowId())&&(D.display="none"),i?(D.width=T+"px",D.minWidth=T+"px"):(D.height=T+"px",D.minHeight=T+"px"),!a&&n.getModel().isSplitterEnableHandle()&&(M=s.createElement("div",{className:k(l.FLEXLAYOUT__SPLITTER_HANDLE)+" "+k(i?l.FLEXLAYOUT__SPLITTER_HANDLE_HORZ:l.FLEXLAYOUT__SPLITTER_HANDLE_VERT)})),0===_)return s.createElement("div",{className:I,style:D,ref:u,"data-layout-path":n.getPath()+"/s"+(r-1),onPointerDown:S},M);{const e={};n.getOrientation()===d.HORZ?(e.height="100%",e.width=T+_+"px",e.cursor="ew-resize"):(e.height=T+_+"px",e.width="100%",e.cursor="ns-resize");const t=k(l.FLEXLAYOUT__SPLITTER_EXTRA);return s.createElement("div",{className:I,style:D,ref:u,"data-layout-path":n.getPath()+"/s"+(r-1),onPointerDown:S},s.createElement("div",{style:e,ref:c,className:t,onPointerDown:S}))}};function U(e){const{layout:t,border:n,show:r}=e,i=s.useRef(null);s.useLayoutEffect((()=>{const e=t.getBoundingClientRect(i.current),r=f.getContentRect(i.current).relativeTo(t.getDomRect());e.width>0&&(n.setOuterRect(e),n.getContentRect().equals(r)||(n.setContentRect(r),t.redrawInternal("border content rect")))}));let a=!0;const o={};n.getOrientation()===d.HORZ?(o.width=n.getSize(),o.minWidth=n.getMinSize(),o.maxWidth=n.getMaxSize()):(o.height=n.getSize(),o.minHeight=n.getMinSize(),o.maxHeight=n.getMaxSize(),a=!1),o.display=r?"flex":"none";const u=t.getClassName(l.FLEXLAYOUT__BORDER_TAB_CONTENTS);return n.getLocation()===h.LEFT||n.getLocation()===h.TOP?s.createElement(s.Fragment,null,s.createElement("div",{ref:i,style:o,className:u}),r&&s.createElement(z,{layout:t,node:n,index:0,horizontal:a})):s.createElement(s.Fragment,null,r&&s.createElement(z,{layout:t,node:n,index:0,horizontal:a}),s.createElement("div",{ref:i,style:o,className:u}))}var F;!function(e){e[e.Visible=1]="Visible",e[e.Always=2]="Always",e[e.Selected=3]="Selected"}(F||(F={}));const W=e=>{const{layout:t,node:n,selected:r,border:i,icons:a,path:u}=e,c=s.useRef(null),d=s.useRef(null),f=()=>{t.doAction(g.selectTab(n.getId()))},h=e=>{(()=>{const e=n.getCloseType();return!!(r||e===F.Always||e===F.Visible&&window.matchMedia&&window.matchMedia("(hover: hover) and (pointer: fine)").matches)})()?t.doAction(g.deleteTab(n.getId())):f()},p=e=>{e.stopPropagation()};s.useLayoutEffect((()=>{n.setTabRect(t.getBoundingClientRect(c.current)),t.getEditingTab()===n&&d.current.select()}));const m=t.getClassName;let b=m(l.FLEXLAYOUT__BORDER_BUTTON)+" "+m(l.FLEXLAYOUT__BORDER_BUTTON_+i);b+=r?" "+m(l.FLEXLAYOUT__BORDER_BUTTON__SELECTED):" "+m(l.FLEXLAYOUT__BORDER_BUTTON__UNSELECTED),void 0!==n.getClassName()&&(b+=" "+n.getClassName());let v=0;!1===n.getModel().isEnableRotateBorderIcons()&&("left"===i?v=90:"right"===i&&(v=-90));const y=w(t,n,v);let T=y.content?s.createElement("div",{className:m(l.FLEXLAYOUT__BORDER_BUTTON_CONTENT)},y.content):null;const _=y.leading?s.createElement("div",{className:m(l.FLEXLAYOUT__BORDER_BUTTON_LEADING)},y.leading):null;if(t.getEditingTab()===n&&(T=s.createElement("input",{ref:d,className:m(l.FLEXLAYOUT__TAB_BUTTON_TEXTBOX),"data-layout-path":u+"/textbox",type:"text",autoFocus:!0,defaultValue:n.getName(),onKeyDown:e=>{"Escape"===e.code?t.setEditingTab(void 0):"Enter"===e.code&&(t.setEditingTab(void 0),t.doAction(g.renameTab(n.getId(),e.target.value)))},onPointerDown:e=>{e.stopPropagation()}})),n.isEnableClose()){const e=t.i18nName(o.Close_Tab);y.buttons.push(s.createElement("div",{key:"close","data-layout-path":u+"/button/close",title:e,className:m(l.FLEXLAYOUT__BORDER_BUTTON_TRAILING),onPointerDown:p,onClick:h},"function"==typeof a.close?a.close(n):a.close))}return s.createElement("div",{ref:c,"data-layout-path":u,className:b,onClick:f,onAuxClick:e=>{S(e)&&t.auxMouseClick(n,e)},onContextMenu:e=>{t.showContextMenu(n,e)},title:n.getHelpText(),draggable:!0,onDragStart:e=>{n.isEnableDrag()?(e.stopPropagation(),t.setDragNode(e.nativeEvent,n)):e.preventDefault()},onDragEnd:e=>{e.stopPropagation(),t.clearDragMain()}},_,T,y.buttons)},H=e=>{const{layout:t,node:n}=e,r=t.getClassName;let i=r(l.FLEXLAYOUT__TAB_BUTTON_STAMP);const a=w(t,n);let o=a.content?s.createElement("div",{className:r(l.FLEXLAYOUT__TAB_BUTTON_CONTENT)},a.content):n.getNameForOverflowMenu();const u=a.leading?s.createElement("div",{className:r(l.FLEXLAYOUT__TAB_BUTTON_LEADING)},a.leading):null;return s.createElement("div",{className:i,title:n.getHelpText()},u,o)};function Y(e,t,n,r){var i;const a=r.getRootDiv(),o=r.getClassName,u=e.ownerDocument,c=e.getBoundingClientRect(),d=null!==(i=null==a?void 0:a.getBoundingClientRect())&&void 0!==i?i:new DOMRect(0,0,100,100),f=u.createElement("div");f.className=o(l.FLEXLAYOUT__POPUP_MENU_CONTAINER),c.left<d.left+d.width/2?f.style.left=c.left-d.left+"px":f.style.right=d.right-c.right+"px",c.top<d.top+d.height/2?f.style.top=c.top-d.top+"px":f.style.bottom=d.bottom-c.bottom+"px",r.showOverlay(!0),a&&a.appendChild(f);const h=()=>{r.hideControlInPortal(),r.showOverlay(!1),a&&a.removeChild(f),f.removeEventListener("pointerdown",p),u.removeEventListener("pointerdown",g)},p=e=>{e.stopPropagation()},g=e=>{h()};f.addEventListener("pointerdown",p),u.addEventListener("pointerdown",g),r.showControlInPortal(s.createElement(X,{currentDocument:u,onSelect:n,onHide:h,items:t,classNameMapper:o,layout:r}),f)}const X=e=>{const{items:t,onHide:n,onSelect:r,classNameMapper:i,layout:a}=e,o=e=>{a.clearDragMain()},u=t.map(((e,t)=>s.createElement("div",{key:e.index,className:i(l.FLEXLAYOUT__POPUP_MENU_ITEM),"data-layout-path":"/popup-menu/tb"+t,onClick:t=>((e,t)=>{r(e),n(),t.stopPropagation()})(e,t),draggable:!0,onDragStart:t=>{return r=t,i=e.node,r.stopPropagation(),a.setDragNode(r.nativeEvent,i),void setTimeout((()=>{n()}),0);var r,i},onDragEnd:o,title:e.node.getHelpText()},s.createElement(H,{node:e.node,layout:a}))));return s.createElement("div",{className:i(l.FLEXLAYOUT__POPUP_MENU),"data-layout-path":"/popup-menu"},u)},V=(e,t,n,r,i)=>{const[a,o]=s.useState([]),[l,u]=s.useState(!1),c=s.useRef(null),f=s.useRef(!1),h=s.useRef(void 0),p=s.useRef([]);p.current=a,s.useEffect((()=>{f.current=!1}),[t.getSelectedNode(),t.getRect().width,t.getRect().height]),s.useEffect((()=>{if(v(),!f.current){const e=b();e&&e.scrollIntoView()}g()}));const g=()=>{void 0===h.current&&(h.current=setTimeout((()=>{const e=y();var t,n;t=e,n=p.current,t.length===n.length&&t.every(((e,t)=>e===n[t]))||o(e),h.current=void 0}),100))},m=()=>{if(r.current){const n=r.current.firstElementChild,a=t.getChildren();let o=0;Array.from(n.children).forEach((t=>{t.classList.contains(i)&&(a[o].setTabRect(e.getBoundingClientRect(t)),o++)}))}},b=()=>{let e;if(r.current){const t=r.current.firstElementChild;Array.from(t.children).forEach((t=>{t.classList.contains(i+"--selected")&&(e=t)}))}return e},v=()=>{if(r.current){const e=r.current.firstElementChild,t=l?10:0,n=E(e)+t>E(r.current);n!==l&&u(n)}},y=()=>{const e=[];if(r.current){const t=r.current,n=t.getBoundingClientRect(),a=T(n)-1,o=_(n)+1,l=t.firstElementChild;let s=0;Array.from(l.children).forEach((t=>{const n=t.getBoundingClientRect();t.classList.contains(i)&&((T(n)<a||_(n)>o)&&e.push(s),s++)}))}return e},T=e=>n===d.HORZ?e.x:e.y,_=e=>n===d.HORZ?e.right:e.bottom,E=e=>n===d.HORZ?e.clientWidth:e.clientHeight;return{selfRef:c,userControlledPositionRef:f,onScroll:()=>{m(),g(),f.current=!0},hiddenTabs:a,onMouseWheel:e=>{if(r.current){if(0===t.getChildren().length)return;let a=0;a=Math.abs(e.deltaX)>Math.abs(e.deltaY)?-e.deltaX:-e.deltaY,1===e.deltaMode&&(a*=40);const o=(n===d.HORZ?r.current.scrollLeft:r.current.scrollTop)-a,l=(i=r.current,(n===d.HORZ?i.scrollWidth:i.scrollHeight)-E(r.current)),s=Math.max(0,Math.min(l,o));f.current=!0,(e=>{n===d.HORZ?r.current.scrollLeft=e:r.current.scrollTop=e})(s),m(),g(),e.stopPropagation()}var i},isTabOverflow:l}},j=e=>{const{border:t,layout:n,size:r}=e,i=s.useRef(null),a=s.useRef(null),u=s.useRef(null),c=s.useRef(null),p=n.getIcons();s.useLayoutEffect((()=>{t.setTabHeaderRect(f.getBoundingClientRect(m.current).relativeTo(n.getDomRect()))}));const{selfRef:m,userControlledPositionRef:b,onScroll:v,hiddenTabs:y,onMouseWheel:T,isTabOverflow:_}=V(n,t,d.flip(t.getOrientation()),c,n.getClassName(l.FLEXLAYOUT__BORDER_BUTTON)),E=e=>{S(e)&&n.auxMouseClick(t,e)},w=e=>{e.stopPropagation()},L=e=>{const r=n.getShowOverflowMenu(),i=y.map((e=>({index:e,node:t.getChildren()[e]})));void 0!==r?r(t,e,i,O):Y(a.current,i,O,n),e.stopPropagation()},O=e=>{n.doAction(g.selectTab(e.node.getId())),b.current=!1},N=e=>{const r=t.getChildren()[t.getSelected()];void 0!==r&&n.doAction(g.popoutTab(r.getId())),e.stopPropagation()},A=n.getClassName,R=[],x=e=>{let r=t.getSelected()===e,i=t.getChildren()[e];R.push(s.createElement(W,{layout:n,border:t.getLocation().getName(),node:i,path:t.getPath()+"/tb"+e,key:i.getId(),selected:r,icons:p})),e<t.getChildren().length-1&&R.push(s.createElement("div",{key:"divider"+e,className:A(l.FLEXLAYOUT__BORDER_TAB_DIVIDER)}))};for(let e=0;e<t.getChildren().length;e++)x(e);let k=A(l.FLEXLAYOUT__BORDER)+" "+A(l.FLEXLAYOUT__BORDER_+t.getLocation().getName());void 0!==t.getClassName()&&(k+=" "+t.getClassName());let C=[],D=[];const M={buttons:C,stickyButtons:D,overflowPosition:void 0};if(n.customizeTabSet(t,M),C=M.buttons,void 0===M.overflowPosition&&(M.overflowPosition=D.length),D.length>0&&(_?C=[...D,...C]:R.push(s.createElement("div",{ref:u,key:"sticky_buttons_container",onPointerDown:w,onDragStart:e=>{e.preventDefault()},className:A(l.FLEXLAYOUT__TAB_TOOLBAR_STICKY_BUTTONS_CONTAINER)},D))),y.length>0){const e=n.i18nName(o.Overflow_Menu_Tooltip);let r;if("function"==typeof p.more){const e=y.map((e=>({index:e,node:t.getChildren()[e]})));r=p.more(t,e)}else r=s.createElement(s.Fragment,null,p.more,s.createElement("div",{className:A(l.FLEXLAYOUT__TAB_BUTTON_OVERFLOW_COUNT)},y.length));C.splice(Math.min(M.overflowPosition,C.length),0,s.createElement("button",{key:"overflowbutton",ref:a,className:A(l.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON)+" "+A(l.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON_OVERFLOW)+" "+A(l.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON_OVERFLOW_+t.getLocation().getName()),title:e,onClick:L,onPointerDown:w},r))}const I=t.getSelected();if(-1!==I){const e=t.getChildren()[I];if(void 0!==e&&n.isSupportsPopout()&&e.isEnablePopout()){const t=n.i18nName(o.Popout_Tab);C.push(s.createElement("button",{key:"popout",title:t,className:A(l.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON)+" "+A(l.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON_FLOAT),onClick:N,onPointerDown:w},"function"==typeof p.popout?p.popout(e):p.popout))}}const B=s.createElement("div",{key:"toolbar",ref:i,className:A(l.FLEXLAYOUT__BORDER_TOOLBAR)+" "+A(l.FLEXLAYOUT__BORDER_TOOLBAR_+t.getLocation().getName())},C);let P={},z={};const U=r-1;t.getLocation()===h.LEFT?(P={right:"100%",top:0},z={width:U,overflowY:"auto"}):t.getLocation()===h.RIGHT?(P={left:"100%",top:0},z={width:U,overflowY:"auto"}):(P={left:0},z={height:U,overflowX:"auto"});const F=A(l.FLEXLAYOUT__MINI_SCROLLBAR)+(t.isEnableTabScrollbar()?"":" "+A(l.FLEXLAYOUT__MINI_SCROLLBAR_HIDDEN));return s.createElement("div",{ref:m,style:{display:"flex",flexDirection:t.getOrientation()===d.VERT?"row":"column"},className:k,"data-layout-path":t.getPath(),onClick:E,onAuxClick:E,onContextMenu:e=>{n.showContextMenu(t,e)},onWheel:T},s.createElement("div",{ref:c,className:A(l.FLEXLAYOUT__BORDER_INNER)+" "+A(l.FLEXLAYOUT__BORDER_INNER_+t.getLocation().getName())+" "+F,style:z,onScroll:v},s.createElement("div",{style:P,className:A(l.FLEXLAYOUT__BORDER_INNER_TAB_CONTAINER)+" "+A(l.FLEXLAYOUT__BORDER_INNER_TAB_CONTAINER_+t.getLocation().getName())},R)),B)},G=e=>{const{layout:t,node:n}=e,r=s.useRef(null);s.useEffect((()=>{n.setTabStamp(r.current)}),[n,r.current]);let i=(0,t.getClassName)(l.FLEXLAYOUT__DRAG_RECT);return s.createElement("div",{ref:r,className:i},s.createElement(H,{key:n.getId(),layout:t,node:n}))};class $ extends s.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e,t){console.debug(e),console.debug(t)}render(){return this.state.hasError?s.createElement("div",{className:l.FLEXLAYOUT__ERROR_BOUNDARY_CONTAINER},s.createElement("div",{className:l.FLEXLAYOUT__ERROR_BOUNDARY_CONTENT},this.props.message)):this.props.children}}const q=e=>{const{title:t,layout:n,layoutWindow:r,url:i,onCloseWindow:a,onSetWindow:o,children:c}=e,d=s.useRef(null),[f,h]=s.useState(void 0),p=new Map;return s.useLayoutEffect((()=>{if(!d.current){const e=r.windowId,n=r.rect;d.current=window.open(i,e,`left=${n.x},top=${n.y},width=${n.width},height=${n.height}`),d.current?(r.window=d.current,o(r,d.current),window.addEventListener("beforeunload",(()=>{if(d.current){const e=d.current;d.current=null,e.close()}})),d.current.addEventListener("load",(()=>{if(d.current){d.current.focus(),d.current.resizeTo(n.width,n.height),d.current.moveTo(n.x,n.y);const e=d.current.document;e.title=t;const i=e.createElement("div");i.className=l.FLEXLAYOUT__FLOATING_WINDOW_CONTENT,e.body.appendChild(i),function(e,t){const n=[],r=document.querySelectorAll('style, link[rel="stylesheet"]');for(const i of r)Q(e,i,t,n);return Promise.all(n)}(e,p).then((()=>{h(i)}));const o=new MutationObserver((t=>function(e,t,n){for(const r of e)if("childList"===r.type){for(const e of r.addedNodes)(e instanceof HTMLLinkElement||e instanceof HTMLStyleElement)&&Q(t,e,n);for(const e of r.removedNodes)if(e instanceof HTMLLinkElement||e instanceof HTMLStyleElement){const r=n.get(e);r&&t.head.removeChild(r)}}}(t,e,p)));o.observe(document.head,{childList:!0}),d.current.addEventListener("beforeunload",(()=>{d.current&&(a(r),d.current=null,o.disconnect())}))}}))):(console.warn(`Unable to open window ${i}`),a(r))}return()=>{var e;n.getModel().getwindowsMap().has(r.windowId)||(null===(e=d.current)||void 0===e||e.close(),d.current=null)}}),[]),void 0!==f?(0,u.createPortal)(c,f):null};function Q(e,t,n,r){if(t instanceof HTMLLinkElement){const i=t.cloneNode(!0);e.head.appendChild(i),n.set(t,i),r&&r.push(new Promise((e=>{i.onload=()=>e(!0)})))}else if(t instanceof HTMLStyleElement)try{const r=t.cloneNode(!0);e.head.appendChild(r),n.set(t,r)}catch(e){}}const J={width:"1em",height:"1em",display:"flex",alignItems:"center"},Z=()=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",style:J,viewBox:"0 0 24 24"},s.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),s.createElement("path",{stroke:"var(--color-icon)",fill:"var(--color-icon)",d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),K=e=>{const{layout:t,show:n}=e;return s.createElement("div",{className:t.getClassName(l.FLEXLAYOUT__LAYOUT_OVERLAY),style:{display:n?"flex":"none"}})},ee=e=>{const{layout:t,node:n,selected:r,path:i}=e,a=s.useRef(null),u=s.useRef(null),c=t.getIcons();s.useLayoutEffect((()=>{n.setTabRect(t.getBoundingClientRect(a.current)),t.getEditingTab()===n&&u.current.select()}));const d=()=>{t.doAction(g.selectTab(n.getId()))},f=e=>{e.target!==u.current&&(t.getCurrentDocument().body.removeEventListener("pointerdown",f),t.setEditingTab(void 0))},h=e=>{(()=>{const e=n.getCloseType();return!!(r||e===F.Always||e===F.Visible&&window.matchMedia&&window.matchMedia("(hover: hover) and (pointer: fine)").matches)})()?t.doAction(g.deleteTab(n.getId())):d()},p=e=>{e.stopPropagation()},m=t.getClassName,b=n.getParent(),v=b.isEnableSingleTabStretch()&&1===b.getChildren().length;let y=v?l.FLEXLAYOUT__TAB_BUTTON_STRETCH:l.FLEXLAYOUT__TAB_BUTTON,T=m(y);T+=" "+m(y+"_"+b.getTabLocation()),v||(T+=r?" "+m(y+"--selected"):" "+m(y+"--unselected")),void 0!==n.getClassName()&&(T+=" "+n.getClassName());const _=w(t,n);let E=_.content?s.createElement("div",{className:m(l.FLEXLAYOUT__TAB_BUTTON_CONTENT)},_.content):null;const L=_.leading?s.createElement("div",{className:m(l.FLEXLAYOUT__TAB_BUTTON_LEADING)},_.leading):null;if(t.getEditingTab()===n&&(E=s.createElement("input",{ref:u,className:m(l.FLEXLAYOUT__TAB_BUTTON_TEXTBOX),"data-layout-path":i+"/textbox",type:"text",autoFocus:!0,defaultValue:n.getName(),onKeyDown:e=>{"Escape"===e.code?t.setEditingTab(void 0):"Enter"===e.code&&(t.setEditingTab(void 0),t.doAction(g.renameTab(n.getId(),e.target.value)))},onPointerDown:e=>{e.stopPropagation()}})),n.isEnableClose()&&!v){const e=t.i18nName(o.Close_Tab);_.buttons.push(s.createElement("div",{key:"close","data-layout-path":i+"/button/close",title:e,className:m(l.FLEXLAYOUT__TAB_BUTTON_TRAILING),onPointerDown:p,onClick:h},"function"==typeof c.close?c.close(n):c.close))}return s.createElement("div",{ref:a,"data-layout-path":i,className:T,onClick:d,onAuxClick:e=>{S(e)&&t.auxMouseClick(n,e)},onContextMenu:e=>{t.showContextMenu(n,e)},title:n.getHelpText(),draggable:!0,onDragStart:e=>{n.isEnableDrag()?(e.stopPropagation(),t.setDragNode(e.nativeEvent,n)):e.preventDefault()},onDragEnd:e=>{t.clearDragMain()},onDoubleClick:e=>{n.isEnableRename()&&(t.setEditingTab(n),t.getCurrentDocument().body.addEventListener("pointerdown",f),e.stopPropagation())}},L,E,_.buttons)},te=e=>{const{node:t,layout:n}=e,r=s.useRef(null),i=s.useRef(null),a=s.useRef(null),c=s.useRef(null),h=s.useRef(null),p=s.useRef(null),m=n.getIcons();s.useEffect((()=>{t.setRect(n.getBoundingClientRect(b.current)),r.current&&t.setTabStripRect(n.getBoundingClientRect(r.current));const e=f.getContentRect(a.current).relativeTo(n.getDomRect());t.getContentRect().equals(e)||(t.setContentRect(e),setTimeout((()=>{n.redrawInternal("tabset content rect "+e)}),0))}));const{selfRef:b,userControlledPositionRef:v,onScroll:y,hiddenTabs:T,onMouseWheel:_,isTabOverflow:E}=V(n,t,d.HORZ,i,n.getClassName(l.FLEXLAYOUT__TAB_BUTTON)),w=e=>{const r=n.getShowOverflowMenu(),i=T.map((e=>({index:e,node:t.getChildren()[e]})));void 0!==r?r(t,e,i,L):Y(h.current,i,L,n),e.stopPropagation()},L=e=>{n.doAction(g.selectTab(e.node.getId())),v.current=!1},O=e=>{n.getEditingTab()?e.preventDefault():t.isEnableDrag()?(e.stopPropagation(),n.setDragNode(e.nativeEvent,t)):e.preventDefault()},N=e=>{S(e)||n.doAction(g.setActiveTabset(t.getId(),n.getWindowId()))},A=e=>{S(e)&&n.auxMouseClick(t,e)},R=e=>{n.showContextMenu(t,e)},x=e=>{e.stopPropagation()},k=e=>{t.canMaximize()&&n.maximize(t),e.stopPropagation()},C=e=>{n.doAction(g.deleteTabset(t.getId())),e.stopPropagation()},D=e=>{n.doAction(g.deleteTab(t.getChildren()[0].getId())),e.stopPropagation()},M=e=>{void 0!==P&&n.doAction(g.popoutTab(P.getId())),e.stopPropagation()},I=e=>{t.canMaximize()&&n.maximize(t)},B=n.getClassName,P=t.getSelectedNode(),z=t.getPath(),U=[];if(t.isEnableTabStrip())for(let e=0;e<t.getChildren().length;e++){const r=t.getChildren()[e];let i=t.getSelected()===e;U.push(s.createElement(ee,{layout:n,node:r,path:z+"/tb"+e,key:r.getId(),selected:i})),e<t.getChildren().length-1&&U.push(s.createElement("div",{key:"divider"+e,className:B(l.FLEXLAYOUT__TABSET_TAB_DIVIDER)}))}let F=[],W=[];const H={stickyButtons:F,buttons:W,overflowPosition:void 0};n.customizeTabSet(t,H),F=H.stickyButtons,W=H.buttons;const X=t.isEnableSingleTabStretch()&&1===t.getChildren().length,j=X&&t.getChildren()[0].isEnableClose()||t.isEnableClose();if(void 0===H.overflowPosition&&(H.overflowPosition=F.length),F.length>0&&(t.isEnableTabWrap()||!E&&!X?U.push(s.createElement("div",{ref:p,key:"sticky_buttons_container",onPointerDown:x,onDragStart:e=>{e.preventDefault()},className:B(l.FLEXLAYOUT__TAB_TOOLBAR_STICKY_BUTTONS_CONTAINER)},F)):W=[...F,...W]),!t.isEnableTabWrap()&&T.length>0){const e=n.i18nName(o.Overflow_Menu_Tooltip);let r;if("function"==typeof m.more){const e=T.map((e=>({index:e,node:t.getChildren()[e]})));r=m.more(t,e)}else r=s.createElement(s.Fragment,null,m.more,s.createElement("div",{className:B(l.FLEXLAYOUT__TAB_BUTTON_OVERFLOW_COUNT)},T.length));W.splice(Math.min(H.overflowPosition,W.length),0,s.createElement("button",{key:"overflowbutton","data-layout-path":z+"/button/overflow",ref:h,className:B(l.FLEXLAYOUT__TAB_TOOLBAR_BUTTON)+" "+B(l.FLEXLAYOUT__TAB_BUTTON_OVERFLOW),title:e,onClick:w,onPointerDown:x},r))}if(void 0!==P&&n.isSupportsPopout()&&P.isEnablePopout()&&P.isEnablePopoutIcon()){const e=n.i18nName(o.Popout_Tab);W.push(s.createElement("button",{key:"popout","data-layout-path":z+"/button/popout",title:e,className:B(l.FLEXLAYOUT__TAB_TOOLBAR_BUTTON)+" "+B(l.FLEXLAYOUT__TAB_TOOLBAR_BUTTON_FLOAT),onClick:M,onPointerDown:x},"function"==typeof m.popout?m.popout(P):m.popout))}if(t.canMaximize()){const e=n.i18nName(o.Restore),r=n.i18nName(o.Maximize);W.push(s.createElement("button",{key:"max","data-layout-path":z+"/button/max",title:t.isMaximized()?e:r,className:B(l.FLEXLAYOUT__TAB_TOOLBAR_BUTTON)+" "+B(l.FLEXLAYOUT__TAB_TOOLBAR_BUTTON_+(t.isMaximized()?"max":"min")),onClick:k,onPointerDown:x},t.isMaximized()?"function"==typeof m.restore?m.restore(t):m.restore:"function"==typeof m.maximize?m.maximize(t):m.maximize))}if(!t.isMaximized()&&j){const e=X?n.i18nName(o.Close_Tab):n.i18nName(o.Close_Tabset);W.push(s.createElement("button",{key:"close","data-layout-path":z+"/button/close",title:e,className:B(l.FLEXLAYOUT__TAB_TOOLBAR_BUTTON)+" "+B(l.FLEXLAYOUT__TAB_TOOLBAR_BUTTON_CLOSE),onClick:X?D:C,onPointerDown:x},"function"==typeof m.closeTabset?m.closeTabset(t):m.closeTabset))}if(t.isActive()&&t.isEnableActiveIcon()){const e=n.i18nName(o.Active_Tabset);W.push(s.createElement("div",{key:"active","data-layout-path":z+"/button/active",title:e,className:B(l.FLEXLAYOUT__TAB_TOOLBAR_ICON)},"function"==typeof m.activeTabset?m.activeTabset(t):m.activeTabset))}const G=s.createElement("div",{key:"buttonbar",ref:c,className:B(l.FLEXLAYOUT__TAB_TOOLBAR),onPointerDown:x,onDragStart:e=>{e.preventDefault()}},W);let $,q=B(l.FLEXLAYOUT__TABSET_TABBAR_OUTER);if(void 0!==t.getClassNameTabStrip()&&(q+=" "+t.getClassNameTabStrip()),q+=" "+l.FLEXLAYOUT__TABSET_TABBAR_OUTER_+t.getTabLocation(),t.isActive()&&(q+=" "+B(l.FLEXLAYOUT__TABSET_SELECTED)),t.isMaximized()&&(q+=" "+B(l.FLEXLAYOUT__TABSET_MAXIMIZED)),X){const e=t.getChildren()[0];void 0!==e.getTabSetClassName()&&(q+=" "+e.getTabSetClassName())}if(t.isEnableTabWrap())t.isEnableTabStrip()&&($=s.createElement("div",{className:q,style:{flexWrap:"wrap",gap:"1px",marginTop:"2px"},ref:r,"data-layout-path":z+"/tabstrip",onPointerDown:N,onDoubleClick:I,onContextMenu:R,onClick:A,onAuxClick:A,draggable:!0,onDragStart:O},U,s.createElement("div",{style:{flexGrow:1}}),G));else if(t.isEnableTabStrip()){const e=B(l.FLEXLAYOUT__MINI_SCROLLBAR)+(t.isEnableTabScrollbar()?"":" "+B(l.FLEXLAYOUT__MINI_SCROLLBAR_HIDDEN));$=s.createElement("div",{className:q,ref:r,"data-layout-path":z+"/tabstrip",onPointerDown:N,onDoubleClick:I,onContextMenu:R,onClick:A,onAuxClick:A,draggable:!0,onWheel:_,onDragStart:O},s.createElement("div",{ref:i,className:B(l.FLEXLAYOUT__TABSET_TABBAR_INNER)+" "+B(l.FLEXLAYOUT__TABSET_TABBAR_INNER_+t.getTabLocation())+" "+e,style:{overflowX:"auto",overflowY:"hidden"},onScroll:y},s.createElement("div",{style:{width:X?"100%":"none"},className:B(l.FLEXLAYOUT__TABSET_TABBAR_INNER_TAB_CONTAINER)+" "+B(l.FLEXLAYOUT__TABSET_TABBAR_INNER_TAB_CONTAINER_+t.getTabLocation())},U)),G)}var Q;if(0===t.getChildren().length){const e=n.getTabSetPlaceHolderCallback();e&&(Q=e(t))}let J=s.createElement("div",{ref:a,className:B(l.FLEXLAYOUT__TABSET_CONTENT)},Q);J="top"===t.getTabLocation()?s.createElement(s.Fragment,null,$,J):s.createElement(s.Fragment,null,J,$);let Z={flexGrow:Math.max(1,1e3*t.getWeight()),minWidth:t.getMinWidth(),minHeight:t.getMinHeight(),maxWidth:t.getMaxWidth(),maxHeight:t.getMaxHeight()};void 0===t.getModel().getMaximizedTabset(n.getWindowId())||t.isMaximized()||(Z.display="none");const K=s.createElement("div",{ref:b,className:B(l.FLEXLAYOUT__TABSET_CONTAINER),style:Z},s.createElement("div",{className:B(l.FLEXLAYOUT__TABSET),"data-layout-path":z},J));return t.isMaximized()&&n.getMainElement()?(0,u.createPortal)(s.createElement("div",{style:{position:"absolute",display:"flex",top:0,left:0,bottom:0,right:0}},K),n.getMainElement()):K},ne=e=>{const{layout:t,node:n}=e,r=s.useRef(null),i=n.getOrientation()===d.HORZ;s.useLayoutEffect((()=>{n.setRect(t.getBoundingClientRect(r.current))}));const a=[];let o=0;for(const e of n.getChildren())o>0&&a.push(s.createElement(z,{key:"splitter"+o,layout:t,node:n,index:o,horizontal:i})),e instanceof C?a.push(s.createElement(ne,{key:e.getId(),layout:t,node:e})):e instanceof k&&a.push(s.createElement(te,{key:e.getId(),layout:t,node:e})),o++;const u={flexGrow:Math.max(1,1e3*n.getWeight()),minWidth:n.getMinWidth(),minHeight:n.getMinHeight(),maxWidth:n.getMaxWidth(),maxHeight:n.getMaxHeight()};return u.flexDirection=i?"row":"column",s.createElement("div",{ref:r,className:t.getClassName(l.FLEXLAYOUT__ROW),style:u},a)},re=e=>{const{layout:t,selected:n,node:r,path:i}=e,a=s.useRef(null),o=s.useRef(!0),u=r.getParent(),c=u.getContentRect();s.useLayoutEffect((()=>{const e=r.getMoveableElement();a.current.appendChild(e),r.setMoveableElement(e);const t=()=>{r.saveScrollPosition()};return e.addEventListener("scroll",t),a.current.addEventListener("pointerdown",d),()=>{e.removeEventListener("scroll",t),a.current&&a.current.removeEventListener("pointerdown",d),r.setVisible(!1)}}),[]),s.useEffect((()=>{r.isSelected()&&o.current&&(r.restoreScrollPosition(),o.current=!1)}));const d=()=>{const e=r.getParent();e instanceof k&&(e.isActive()||t.doAction(g.setActiveTabset(e.getId(),t.getWindowId())))};r.setRect(c);const f=t.getClassName,h={};c.styleWithPosition(h);let p=null;if(n){if(r.setVisible(!0),document.hidden&&r.isEnablePopoutOverlay()){const e={};c.styleWithPosition(e),p=s.createElement("div",{style:e,className:f(l.FLEXLAYOUT__TAB_OVERLAY)})}}else h.display="none",r.setVisible(!1);u instanceof k&&void 0!==r.getModel().getMaximizedTabset(t.getWindowId())&&(u.isMaximized()?h.zIndex=10:h.display="none"),u instanceof P&&(u.isShowing()||(h.display="none"));let m=f(l.FLEXLAYOUT__TAB);return u instanceof P&&(m+=" "+f(l.FLEXLAYOUT__TAB_BORDER),m+=" "+f(l.FLEXLAYOUT__TAB_BORDER_+u.getLocation().getName())),void 0!==r.getContentClassName()&&(m+=" "+r.getContentClassName()),s.createElement(s.Fragment,null,p,s.createElement("div",{ref:a,style:h,className:m,"data-layout-path":i}))},ie=s.memo((({children:e})=>s.createElement(s.Fragment,null,e)),((e,t)=>e.rect.equalSize(t.rect)&&e.selected===t.selected&&e.forceRevision===t.forceRevision&&e.tabsRevision===t.tabsRevision));class ae extends s.Component{constructor(e){super(e),this.selfRef=s.createRef(),this.revision=0}redraw(){this.selfRef.current.redraw("parent "+this.revision)}addTabToTabSet(e,t){return this.selfRef.current.addTabToTabSet(e,t)}addTabWithDragAndDrop(e,t,n){this.selfRef.current.addTabWithDragAndDrop(e,t,n)}moveTabWithDragAndDrop(e,t){this.selfRef.current.moveTabWithDragAndDrop(e,t)}addTabToActiveTabSet(e){return this.selfRef.current.addTabToActiveTabSet(e)}setDragComponent(e,t,n,r){this.selfRef.current.setDragComponent(e,t,n,r)}getRootDiv(){return this.selfRef.current.getRootDiv()}render(){return s.createElement(oe,Object.assign({ref:this.selfRef},this.props,{renderRevision:this.revision++}))}}class oe extends s.Component{constructor(e){super(e),this.moveableElementMap=new Map,this.dragEnterCount=0,this.dragging=!1,this.updateLayoutMetrics=()=>{if(this.findBorderBarSizeRef.current){const e=this.findBorderBarSizeRef.current.getBoundingClientRect().height;e!==this.state.calculatedBorderBarSize&&this.setState({calculatedBorderBarSize:e})}},this.onModelChange=e=>{this.redrawInternal("model change"),this.props.onModelChange&&this.props.onModelChange(this.props.model,e)},this.updateRect=()=>{const e=this.getDomRect();e.equals(this.state.rect)||0===e.width||0===e.height||(this.setState({rect:e}),this.windowId!==B.MAIN_WINDOW_ID&&this.redrawInternal("rect updated"))},this.getClassName=e=>void 0===this.props.classNameMapper?e:this.props.classNameMapper(e),this.onCloseWindow=e=>{this.doAction(g.closeWindow(e.windowId))},this.onSetWindow=(e,t)=>{},this.showControlInPortal=(e,t)=>{const n=(0,u.createPortal)(e,t);this.setState({portal:n})},this.hideControlInPortal=()=>{this.setState({portal:void 0})},this.getIcons=()=>this.icons,this.setDragNode=(e,t)=>{if(oe.dragState=new he(this.mainLayout,ue.Internal,t,void 0,void 0),e.dataTransfer.setData("text/plain","--flexlayout--"),e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.dropEffect="move",this.dragEnterCount=0,t instanceof k){let n=!1,r=this.i18nName(o.Move_Tabset);if(t.getChildren().length>0&&(r=this.i18nName(o.Move_Tabs).replace("?",String(t.getChildren().length))),this.props.onRenderDragRect){const i=this.props.onRenderDragRect(r,t,void 0);i&&(this.setDragComponent(e,i,10,10),n=!0)}n||this.setDragComponent(e,r,10,10)}else{const n=e.target.getBoundingClientRect(),r=e.clientX-n.left,i=e.clientY-n.top,a=null==t?void 0:t.getParent(),o=a instanceof P&&a.getOrientation()===d.HORZ,l=o?10:r,u=o?10:i;let c=!1;if(this.props.onRenderDragRect){const n=s.createElement(H,{key:t.getId(),layout:this,node:t}),r=this.props.onRenderDragRect(n,t,void 0);r&&(this.setDragComponent(e,r,l,u),c=!0)}c||(function(){const e=navigator.userAgent;return e.includes("Safari")&&!e.includes("Chrome")&&!e.includes("Chromium")}()?this.setDragComponent(e,s.createElement(H,{node:t,layout:this}),l,u):e.dataTransfer.setDragImage(t.getTabStamp(),l,u))}},this.onDragEnterRaw=e=>{this.dragEnterCount++,1===this.dragEnterCount&&this.onDragEnter(e)},this.onDragLeaveRaw=e=>{this.dragEnterCount--,0===this.dragEnterCount&&this.onDragLeave(e)},this.onDragEnter=e=>{var t;if(!oe.dragState&&this.props.onExternalDrag){const t=this.props.onExternalDrag(e);if(t){const e=_.fromJson(t.json,this.props.model,!1);oe.dragState=new he(this.mainLayout,ue.External,e,t.json,t.onDrop)}}if(oe.dragState){if(this.windowId!==B.MAIN_WINDOW_ID&&oe.dragState.mainLayout===this.mainLayout&&oe.dragState.mainLayout.setDraggingOverWindow(!0),oe.dragState.mainLayout!==this.mainLayout)return;e.preventDefault(),this.dropInfo=void 0;const n=this.selfRef.current;this.outlineDiv=this.currentDocument.createElement("div"),this.outlineDiv.className=this.getClassName(l.FLEXLAYOUT__OUTLINE_RECT),this.outlineDiv.style.visibility="hidden";const r=this.props.model.getAttribute("tabDragSpeed");this.outlineDiv.style.transition=`top ${r}s, left ${r}s, width ${r}s, height ${r}s`,n.appendChild(this.outlineDiv),this.dragging=!0,this.showOverlay(!0),this.isDraggingOverWindow||void 0!==this.props.model.getMaximizedTabset(this.windowId)||this.setState({showEdges:this.props.model.isEnableEdgeDock()});const i=null===(t=this.selfRef.current)||void 0===t?void 0:t.getBoundingClientRect();new f(e.clientX-i.left,e.clientY-i.top,1,1).positionElement(this.outlineDiv)}},this.onDragOver=e=>{var t,n,r;if(this.dragging&&!this.isDraggingOverWindow){e.preventDefault();const i=null===(t=this.selfRef.current)||void 0===t?void 0:t.getBoundingClientRect(),a={x:e.clientX-(null!==(n=null==i?void 0:i.left)&&void 0!==n?n:0),y:e.clientY-(null!==(r=null==i?void 0:i.top)&&void 0!==r?r:0)};this.checkForBorderToShow(a.x,a.y);let o=this.props.model.findDropTargetNode(this.windowId,oe.dragState.dragNode,a.x,a.y);o&&(this.dropInfo=o,this.outlineDiv&&(this.outlineDiv.className=this.getClassName(o.className),o.rect.positionElement(this.outlineDiv),this.outlineDiv.style.visibility="visible"))}},this.onDragLeave=e=>{this.dragging&&(this.windowId!==B.MAIN_WINDOW_ID&&oe.dragState.mainLayout.setDraggingOverWindow(!1),this.clearDragLocal())},this.onDrop=e=>{if(this.dragging){e.preventDefault();const t=oe.dragState;if(this.dropInfo)if(void 0!==t.dragJson){const n=this.doAction(g.addNode(t.dragJson,this.dropInfo.node.getId(),this.dropInfo.location,this.dropInfo.index));void 0!==t.fnNewNodeDropped&&t.fnNewNodeDropped(n,e)}else void 0!==t.dragNode&&this.doAction(g.moveNode(t.dragNode.getId(),this.dropInfo.node.getId(),this.dropInfo.location,this.dropInfo.index));this.mainLayout.clearDragMain()}this.dragEnterCount=0},this.orderedIds=[],this.selfRef=s.createRef(),this.moveablesRef=s.createRef(),this.mainRef=s.createRef(),this.findBorderBarSizeRef=s.createRef(),this.supportsPopout=void 0!==e.supportsPopout?e.supportsPopout:ce,this.popoutURL=e.popoutURL?e.popoutURL:"popout.html",this.icons=Object.assign(Object.assign({},se),e.icons),this.windowId=e.windowId?e.windowId:B.MAIN_WINDOW_ID,this.mainLayout=this.props.mainLayout?this.props.mainLayout:this,this.isDraggingOverWindow=!1,this.layoutWindow=this.props.model.getwindowsMap().get(this.windowId),this.layoutWindow.layout=this,this.popoutWindowName=this.props.popoutWindowName||"Popout Window",this.state={rect:f.empty(),editingTab:void 0,showEdges:!1,showOverlay:!1,calculatedBorderBarSize:29,layoutRevision:0,forceRevision:0,showHiddenBorder:h.CENTER},this.isMainWindow=this.windowId===B.MAIN_WINDOW_ID}componentDidMount(){if(this.updateRect(),this.currentDocument=this.selfRef.current.ownerDocument,this.currentWindow=this.currentDocument.defaultView,this.layoutWindow.window=this.currentWindow,this.layoutWindow.toScreenRectFunction=e=>this.getScreenRect(e),this.resizeObserver=new ResizeObserver((e=>{requestAnimationFrame((()=>{this.updateRect()}))})),this.selfRef.current&&this.resizeObserver.observe(this.selfRef.current),this.isMainWindow)this.props.model.addChangeListener(this.onModelChange),this.updateLayoutMetrics();else{this.currentWindow.addEventListener("resize",(()=>{this.updateRect()}));const e=this.props.mainLayout.getRootDiv(),t=this.selfRef.current;A(e,t),this.styleObserver=new MutationObserver((()=>{A(e,t)&&this.redraw("mutation observer")})),this.styleObserver.observe(e,{attributeFilter:["style"]})}document.addEventListener("visibilitychange",(()=>{for(const[e,t]of this.props.model.getwindowsMap())t.layout&&this.redraw("visibility change")}))}componentDidUpdate(){this.currentDocument=this.selfRef.current.ownerDocument,this.currentWindow=this.currentDocument.defaultView,this.isMainWindow&&(this.props.model!==this.previousModel&&(void 0!==this.previousModel&&this.previousModel.removeChangeListener(this.onModelChange),this.props.model.getwindowsMap().get(this.windowId).layout=this,this.props.model.addChangeListener(this.onModelChange),this.layoutWindow=this.props.model.getwindowsMap().get(this.windowId),this.layoutWindow.layout=this,this.layoutWindow.toScreenRectFunction=e=>this.getScreenRect(e),this.previousModel=this.props.model,this.tidyMoveablesMap()),this.updateLayoutMetrics())}componentWillUnmount(){var e,t;this.selfRef.current&&(null===(e=this.resizeObserver)||void 0===e||e.unobserve(this.selfRef.current)),null===(t=this.styleObserver)||void 0===t||t.disconnect()}render(){if(!this.selfRef.current)return s.createElement("div",{ref:this.selfRef,className:this.getClassName(l.FLEXLAYOUT__LAYOUT)},s.createElement("div",{ref:this.moveablesRef,key:"__moveables__",className:this.getClassName(l.FLEXLAYOUT__LAYOUT_MOVEABLES)}),this.renderMetricsElements());const e=this.props.model;e.getRoot(this.windowId).calcMinMaxSize(),e.getRoot(this.windowId).setPaths(""),e.getBorderSet().setPaths();const t=this.renderLayout(),n=this.renderBorders(t),r=this.renderTabs(),i=this.reorderComponents(r,this.orderedIds);let a=null,o=null,u=null,c=null;return this.isMainWindow&&(a=this.renderWindows(),c=this.renderMetricsElements(),o=this.renderTabMoveables(),u=s.createElement("div",{key:"__tabStamps__",className:this.getClassName(l.FLEXLAYOUT__LAYOUT_TAB_STAMPS)},this.renderTabStamps())),s.createElement("div",{ref:this.selfRef,className:this.getClassName(l.FLEXLAYOUT__LAYOUT),onDragEnter:this.onDragEnterRaw,onDragLeave:this.onDragLeaveRaw,onDragOver:this.onDragOver,onDrop:this.onDrop},s.createElement("div",{ref:this.moveablesRef,key:"__moveables__",className:this.getClassName(l.FLEXLAYOUT__LAYOUT_MOVEABLES)}),c,s.createElement(K,{key:"__overlay__",layout:this,show:this.state.showOverlay}),n,i,o,u,this.state.portal,a)}renderBorders(e){const t=this.getClassName(l.FLEXLAYOUT__LAYOUT_MAIN),n=this.props.model.getBorderSet().getBorderMap();if(this.isMainWindow&&n.size>0){e=s.createElement("div",{className:t,ref:this.mainRef},e);const r=new Map,i=new Map;for(const[e,t]of h.values){const e=n.get(t);e&&e.isShowing()&&(!e.isAutoHide()||e.isAutoHide()&&(e.getChildren().length>0||this.state.showHiddenBorder===t))&&(r.set(t,s.createElement(j,{layout:this,border:e,size:this.state.calculatedBorderBarSize})),i.set(t,s.createElement(U,{layout:this,border:e,show:-1!==e.getSelected()})))}const a=this.getClassName(l.FLEXLAYOUT__LAYOUT_BORDER_CONTAINER),o=this.getClassName(l.FLEXLAYOUT__LAYOUT_BORDER_CONTAINER_INNER);if(this.props.model.getBorderSet().getLayoutHorizontal()){const t=s.createElement("div",{className:o,style:{flexDirection:"column"}},i.get(h.TOP),s.createElement("div",{className:o,style:{flexDirection:"row"}},i.get(h.LEFT),e,i.get(h.RIGHT)),i.get(h.BOTTOM));return s.createElement("div",{className:a,style:{flexDirection:"column"}},r.get(h.TOP),s.createElement("div",{className:o,style:{flexDirection:"row"}},r.get(h.LEFT),t,r.get(h.RIGHT)),r.get(h.BOTTOM))}{const t=s.createElement("div",{className:o,style:{flexDirection:"row"}},i.get(h.LEFT),s.createElement("div",{className:o,style:{flexDirection:"column"}},i.get(h.TOP),e,i.get(h.BOTTOM)),i.get(h.RIGHT));return s.createElement("div",{className:a,style:{flexDirection:"row"}},r.get(h.LEFT),s.createElement("div",{className:o,style:{flexDirection:"column"}},r.get(h.TOP),t,r.get(h.BOTTOM)),r.get(h.RIGHT))}}return s.createElement("div",{className:t,ref:this.mainRef,style:{position:"absolute",top:0,left:0,bottom:0,right:0,display:"flex"}},e)}renderLayout(){return s.createElement(s.Fragment,null,s.createElement(ne,{key:"__row__",layout:this,node:this.props.model.getRoot(this.windowId)}),this.renderEdgeIndicators())}renderEdgeIndicators(){const e=[],t=this.icons.edgeArrow;if(this.state.showEdges){const n=this.props.model.getRoot(this.windowId).getRect(),r=de,i=fe,a=de/2,o=this.getClassName(l.FLEXLAYOUT__EDGE_RECT),u=50;e.push(s.createElement("div",{key:"North",style:{top:0,left:n.width/2-a,width:r,height:i,borderBottomLeftRadius:u,borderBottomRightRadius:u},className:o+" "+this.getClassName(l.FLEXLAYOUT__EDGE_RECT_TOP)},s.createElement("div",{style:{transform:"rotate(180deg)"}},t))),e.push(s.createElement("div",{key:"West",style:{top:n.height/2-a,left:0,width:i,height:r,borderTopRightRadius:u,borderBottomRightRadius:u},className:o+" "+this.getClassName(l.FLEXLAYOUT__EDGE_RECT_LEFT)},s.createElement("div",{style:{transform:"rotate(90deg)"}},t))),e.push(s.createElement("div",{key:"South",style:{top:n.height-i,left:n.width/2-a,width:r,height:i,borderTopLeftRadius:u,borderTopRightRadius:u},className:o+" "+this.getClassName(l.FLEXLAYOUT__EDGE_RECT_BOTTOM)},s.createElement("div",null,t))),e.push(s.createElement("div",{key:"East",style:{top:n.height/2-a,left:n.width-i,width:i,height:r,borderTopLeftRadius:u,borderBottomLeftRadius:u},className:o+" "+this.getClassName(l.FLEXLAYOUT__EDGE_RECT_RIGHT)},s.createElement("div",{style:{transform:"rotate(-90deg)"}},t)))}return e}renderWindows(){const e=[];if(this.supportsPopout){const t=this.props.model.getwindowsMap();let n=1;for(const[r,i]of t)r!==B.MAIN_WINDOW_ID&&(e.push(s.createElement(q,{key:r,layout:this,title:this.popoutWindowName+" "+n,layoutWindow:i,url:this.popoutURL+"?id="+r,onSetWindow:this.onSetWindow,onCloseWindow:this.onCloseWindow},s.createElement(oe,Object.assign({},this.props,{windowId:r,mainLayout:this})))),n++)}return e}renderTabMoveables(){const e=[];return this.props.model.visitNodes((t=>{if(t instanceof _){const n=t,r=this.getMoveableElement(n.getId());n.setMoveableElement(r);const i=n.isSelected(),a=n.getParent().getContentRect(),l=n.isRendered()||(i||!n.isEnableRenderOnDemand())&&a.width>0&&a.height>0;if(l){const t=n.getId()+(n.isEnableWindowReMount()?n.getWindowId():"");e.push((0,u.createPortal)(s.createElement(ie,{rect:a,selected:n.isSelected(),forceRevision:this.state.forceRevision,tabsRevision:this.props.renderRevision,key:t},s.createElement($,{message:this.i18nName(o.Error_rendering_component)},this.props.factory(n))),r,t)),n.setRendered(l)}}})),e}renderTabStamps(){const e=[];return this.props.model.visitNodes((t=>{if(t instanceof _){const n=t;e.push(s.createElement(G,{key:n.getId(),layout:this,node:n}))}})),e}renderTabs(){const e=new Map;return this.props.model.visitWindowNodes(this.windowId,(t=>{if(t instanceof _){const n=t,r=n.isSelected(),i=n.getPath();(n.isRendered()||r||!n.isEnableRenderOnDemand())&&e.set(n.getId(),s.createElement(re,{key:n.getId(),layout:this,path:i,node:n,selected:r}))}})),e}renderMetricsElements(){return s.createElement("div",{key:"findBorderBarSize",ref:this.findBorderBarSizeRef,className:this.getClassName(l.FLEXLAYOUT__BORDER_SIZER)},"FindBorderBarSize")}checkForBorderToShow(e,t){const n=this.getBoundingClientRect(this.mainRef.current),r=n.getCenter(),i=fe,a=de/2;let o=!1;this.props.model.isEnableEdgeDock()&&this.state.showHiddenBorder===h.CENTER&&(t>r.y-a&&t<r.y+a||e>r.x-a&&e<r.x+a)&&(o=!0);let l=h.CENTER;o||(e<=n.x+i?l=h.LEFT:e>=n.getRight()-i?l=h.RIGHT:t<=n.y+i?l=h.TOP:t>=n.getBottom()-i&&(l=h.BOTTOM)),l!==this.state.showHiddenBorder&&this.setState({showHiddenBorder:l})}tidyMoveablesMap(){const e=new Map;this.props.model.visitNodes(((t,n)=>{t instanceof _&&e.set(t.getId(),t)}));for(const[t,n]of this.moveableElementMap)e.has(t)||(n.remove(),this.moveableElementMap.delete(t))}reorderComponents(e,t){const n=[],r=new Set;let i=[];for(const i of t)e.get(i)&&(n.push(i),r.add(i));t.splice(0,t.length,...n);for(const[n,i]of e)r.has(n)||t.push(n);return i=t.map((t=>e.get(t))),i}redraw(e){this.mainLayout.setState(((e,t)=>({forceRevision:e.forceRevision+1})))}redrawInternal(e){this.mainLayout.setState(((e,t)=>({layoutRevision:e.layoutRevision+1})))}doAction(e){if(void 0!==this.props.onAction){const t=this.props.onAction(e);return void 0!==t?this.props.model.doAction(t):void 0}return this.props.model.doAction(e)}getBoundingClientRect(e){const t=this.getDomRect();return t?f.getBoundingClientRect(e).relativeTo(t):f.empty()}getMoveableContainer(){return this.moveablesRef.current}getMoveableElement(e){let t=this.moveableElementMap.get(e);return void 0===t&&(t=document.createElement("div"),this.moveablesRef.current.appendChild(t),t.className=l.FLEXLAYOUT__TAB_MOVEABLE,this.moveableElementMap.set(e,t)),t}getMainLayout(){return this.mainLayout}getCurrentDocument(){return this.currentDocument}getDomRect(){return this.selfRef.current?f.fromDomRect(this.selfRef.current.getBoundingClientRect()):f.empty()}getWindowId(){return this.windowId}getRootDiv(){return this.selfRef.current}getMainElement(){return this.mainRef.current}getFactory(){return this.props.factory}isSupportsPopout(){return this.supportsPopout}isRealtimeResize(){var e;return null!==(e=this.props.realtimeResize)&&void 0!==e&&e}getPopoutURL(){return this.popoutURL}setEditingTab(e){this.setState({editingTab:e})}getEditingTab(){return this.state.editingTab}getModel(){return this.props.model}getScreenRect(e){const t=e.clone(),n=this.getDomRect();return t.x=this.currentWindow.screenX+this.currentWindow.scrollX+1+n.x+t.x,t.y=this.currentWindow.screenY+this.currentWindow.scrollY+59+n.y+t.y,t.height+=60,t.width+=2,t}addTabToTabSet(e,t){if(void 0!==this.props.model.getNodeById(e))return this.doAction(g.addNode(t,e,h.CENTER,-1))}addTabToActiveTabSet(e){const t=this.props.model.getActiveTabset(this.windowId);if(void 0!==t)return this.doAction(g.addNode(e,t.getId(),h.CENTER,-1))}maximize(e){this.doAction(g.maximizeToggle(e.getId(),this.getWindowId()))}customizeTab(e,t){this.props.onRenderTab&&this.props.onRenderTab(e,t)}customizeTabSet(e,t){this.props.onRenderTabSet&&this.props.onRenderTabSet(e,t)}i18nName(e,t){let n;return this.props.i18nMapper&&(n=this.props.i18nMapper(e,t)),void 0===n&&(n=e+(void 0===t?"":t)),n}getShowOverflowMenu(){return this.props.onShowOverflowMenu}getTabSetPlaceHolderCallback(){return this.props.onTabSetPlaceHolder}showContextMenu(e,t){this.props.onContextMenu&&this.props.onContextMenu(e,t)}auxMouseClick(e,t){this.props.onAuxMouseClick&&this.props.onAuxMouseClick(e,t)}showOverlay(e){this.setState({showOverlay:e}),L(!e,this.currentDocument)}addTabWithDragAndDrop(e,t,n){const r=_.fromJson(t,this.props.model,!1);oe.dragState=new he(this.mainLayout,ue.Add,r,t,n)}moveTabWithDragAndDrop(e,t){this.setDragNode(e,t)}setDragComponent(e,t,n,r){let i=s.createElement("div",{style:{position:"unset"},className:this.getClassName(l.FLEXLAYOUT__LAYOUT)+" "+this.getClassName(l.FLEXLAYOUT__DRAG_RECT)},t);const a=this.currentDocument.createElement("div");a.setAttribute("data-layout-path","/drag-rectangle"),a.style.position="absolute",a.style.left="-10000px",a.style.top="-10000px",this.currentDocument.body.appendChild(a),(0,c.createRoot)(a).render(i),e.dataTransfer.setDragImage(a,n,r),setTimeout((()=>{this.currentDocument.body.removeChild(a)}),0)}setDraggingOverWindow(e){this.isDraggingOverWindow!==e&&(this.outlineDiv&&(this.outlineDiv.style.visibility=e?"hidden":"visible"),e?this.setState({showEdges:!1}):void 0===this.props.model.getMaximizedTabset(this.windowId)&&this.setState({showEdges:this.props.model.isEnableEdgeDock()}),this.isDraggingOverWindow=e)}clearDragMain(){oe.dragState=void 0,this.windowId===B.MAIN_WINDOW_ID&&(this.isDraggingOverWindow=!1);for(const[,e]of this.props.model.getwindowsMap())e.layout.clearDragLocal()}clearDragLocal(){this.setState({showEdges:!1}),this.showOverlay(!1),this.dragEnterCount=0,this.dragging=!1,this.outlineDiv&&(this.selfRef.current.removeChild(this.outlineDiv),this.outlineDiv=void 0)}}oe.dragState=void 0;const le="0.8.4",se={close:s.createElement(Z,null),closeTabset:s.createElement(Z,null),popout:s.createElement((()=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",style:J,viewBox:"0 0 20 20",fill:"var(--color-icon)"},s.createElement("path",{d:"M11 3a1 1 0 100 2h2.586l-6.293 6.293a1 1 0 101.414 1.414L15 6.414V9a1 1 0 102 0V4a1 1 0 00-1-1h-5z"}),s.createElement("path",{d:"M5 5a2 2 0 00-2 2v8a2 2 0 002 2h8a2 2 0 002-2v-3a1 1 0 10-2 0v3H5V7h3a1 1 0 000-2H5z"}))),null),maximize:s.createElement((()=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",style:J,viewBox:"0 0 24 24",fill:"var(--color-icon)"},s.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),s.createElement("path",{stroke:"var(--color-icon)",d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"}))),null),restore:s.createElement((()=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",style:J,viewBox:"0 0 24 24",fill:"var(--color-icon)"},s.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),s.createElement("path",{stroke:"var(--color-icon)",d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"}))),null),more:s.createElement((()=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",style:J,viewBox:"0 0 24 24",fill:"var(--color-icon)"},s.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),s.createElement("path",{stroke:"var(--color-icon)",d:"M7 10l5 5 5-5z"}))),null),edgeArrow:s.createElement((()=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",style:{display:"block",width:10,height:10},preserveAspectRatio:"none",viewBox:"0 0 100 100"},s.createElement("path",{fill:"var(--color-edge-icon)",stroke:"var(--color-edge-icon)",d:"M10 30 L90 30 l-40 40 Z"}))),null),activeTabset:s.createElement((()=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",style:J,height:"24px",viewBox:"0 -960 960 960",width:"24px"},s.createElement("path",{fill:"var(--color-icon)",stroke:"var(--color-icon)",d:"M440-120v-264L254-197l-57-57 187-186H120v-80h264L197-706l57-57 186 187v-264h80v264l186-187 57 57-187 186h264v80H576l187 186-57 57-186-187v264h-80Z"}))),null)};var ue;!function(e){e.Internal="internal",e.External="external",e.Add="add"}(ue||(ue={}));const ce=E(),de=100,fe=10;class he{constructor(e,t,n,r,i){this.mainLayout=e,this.dragSource=t,this.dragNode=n,this.dragJson=r,this.fnNewNodeDropped=i}}return a})()));
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):"object"==typeof exports?exports.FlexLayout=t(require("react"),require("react-dom")):e.FlexLayout=t(e.React,e.ReactDOM)}(self,((e,t)=>(()=>{"use strict";var n={36:t=>{t.exports=e},47:e=>{e.exports=t},370:(e,t,n)=>{e.exports=n(849)},553:(e,t,n)=>{var r=n(370),i=n(36),a=n(47);function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var l=Symbol.for("react.element"),s=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),h=Symbol.for("react.provider"),p=Symbol.for("react.consumer"),g=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),T=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var E=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.tracing_marker");var _=Symbol.for("react.memo_cache_sentinel"),w=Symbol.iterator;function S(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=w&&e[w]||e["@@iterator"])?e:null}var O=Symbol.for("react.client.reference");function L(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===O?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case c:return"Fragment";case u:return"Portal";case f:return"Profiler";case d:return"StrictMode";case b:return"Suspense";case v:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case g:return(e.displayName||"Context")+".Provider";case p:return(e._context.displayName||"Context")+".Consumer";case m:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case y:return null!==(t=e.displayName||null)?t:L(e.type)||"Memo";case T:t=e._payload,e=e._init;try{return L(e(t))}catch(e){}}return null}var N,A,R=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,x=Object.assign;function k(e){if(void 0===N)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);N=t&&t[1]||"",A=-1<e.stack.indexOf("\n at")?" (<anonymous>)":-1<e.stack.indexOf("@")?"@unknown:0:0":""}return"\n"+N+e+A}var C=!1;function D(e,t){if(!e||C)return"";C=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&"function"==typeof n.catch&&n.catch((function(){}))}}catch(e){if(e&&r&&"string"==typeof e.stack)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var a=r.DetermineComponentFrameRoot(),o=a[0],l=a[1];if(o&&l){var s=o.split("\n"),u=l.split("\n");for(i=r=0;r<s.length&&!s[r].includes("DetermineComponentFrameRoot");)r++;for(;i<u.length&&!u[i].includes("DetermineComponentFrameRoot");)i++;if(r===s.length||i===u.length)for(r=s.length-1,i=u.length-1;1<=r&&0<=i&&s[r]!==u[i];)i--;for(;1<=r&&0<=i;r--,i--)if(s[r]!==u[i]){if(1!==r||1!==i)do{if(r--,0>--i||s[r]!==u[i]){var c="\n"+s[r].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}}while(1<=r&&0<=i);break}}}finally{C=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?k(n):""}function M(e){switch(e.tag){case 26:case 27:case 5:return k(e.type);case 16:return k("Lazy");case 13:return k("Suspense");case 19:return k("SuspenseList");case 0:case 15:return D(e.type,!1);case 11:return D(e.type.render,!1);case 1:return D(e.type,!0);default:return""}}function I(e){try{var t="";do{t+=M(e),e=e.return}while(e);return t}catch(e){return"\nError generating stack: "+e.message+"\n"+e.stack}}function B(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function P(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function z(e){if(B(e)!==e)throw Error(o(188))}function U(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e;for(e=e.child;null!==e;){if(null!==(t=U(e)))return t;e=e.sibling}return null}var F=Array.isArray,W=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H={pending:!1,data:null,method:null,action:null},Y=[],X=-1;function V(e){return{current:e}}function j(e){0>X||(e.current=Y[X],Y[X]=null,X--)}function G(e,t){X++,Y[X]=e.current,e.current=t}var $=V(null),q=V(null),Q=V(null),J=V(null);function Z(e,t){switch(G(Q,t),G(q,e),G($,null),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)&&(t=t.namespaceURI)?qc(t):0;break;default:if(t=(e=8===e?t.parentNode:t).tagName,e=e.namespaceURI)t=Qc(e=qc(e),t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}j($),G($,t)}function K(){j($),j(q),j(Q)}function ee(e){null!==e.memoizedState&&G(J,e);var t=$.current,n=Qc(t,e.type);t!==n&&(G(q,e),G($,n))}function te(e){q.current===e&&(j($),j(q)),J.current===e&&(j(J),Id._currentValue=H)}var ne=Object.prototype.hasOwnProperty,re=r.unstable_scheduleCallback,ie=r.unstable_cancelCallback,ae=r.unstable_shouldYield,oe=r.unstable_requestPaint,le=r.unstable_now,se=r.unstable_getCurrentPriorityLevel,ue=r.unstable_ImmediatePriority,ce=r.unstable_UserBlockingPriority,de=r.unstable_NormalPriority,fe=r.unstable_LowPriority,he=r.unstable_IdlePriority,pe=r.log,ge=r.unstable_setDisableYieldValue,me=null,be=null;function ve(e){if("function"==typeof pe&&ge(e),be&&"function"==typeof be.setStrictMode)try{be.setStrictMode(me,e)}catch(e){}}var ye=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(Te(e)/Ee|0)|0},Te=Math.log,Ee=Math.LN2,_e=128,we=4194304;function Se(e){var t=42&e;if(0!==t)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194176&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Oe(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=e.warmLanes;e=0!==e.finishedLanes;var l=134217727&n;return 0!==l?0!=(n=l&~i)?r=Se(n):0!=(a&=l)?r=Se(a):e||0!=(o=l&~o)&&(r=Se(o)):0!=(l=n&~i)?r=Se(l):0!==a?r=Se(a):e||0!=(o=n&~o)&&(r=Se(o)),0===r?0:0===t||t===r||t&i||!((i=r&-r)>=(o=t&-t)||32===i&&4194176&o)?r:t}function Le(e,t){return!(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function Ne(e,t){switch(e){case 1:case 2:case 4:case 8:return t+250;case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function Ae(){var e=_e;return!(4194176&(_e<<=1))&&(_e=128),e}function Re(){var e=we;return!(62914560&(we<<=1))&&(we=4194304),e}function xe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ke(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ce(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-ye(t);e.entangledLanes|=t,e.entanglements[r]=1073741824|e.entanglements[r]|4194218&n}function De(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ye(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Me(e){return 2<(e&=-e)?8<e?134217727&e?32:268435456:8:2}function Ie(){var e=W.p;return 0!==e?e:void 0===(e=window.event)?32:$d(e.type)}var Be=Math.random().toString(36).slice(2),Pe="__reactFiber$"+Be,ze="__reactProps$"+Be,Ue="__reactContainer$"+Be,Fe="__reactEvents$"+Be,We="__reactListeners$"+Be,He="__reactHandles$"+Be,Ye="__reactResources$"+Be,Xe="__reactMarker$"+Be;function Ve(e){delete e[Pe],delete e[ze],delete e[Fe],delete e[We],delete e[He]}function je(e){var t=e[Pe];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ue]||n[Pe]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ld(e);null!==e;){if(n=e[Pe])return n;e=ld(e)}return t}n=(e=n).parentNode}return null}function Ge(e){if(e=e[Pe]||e[Ue]){var t=e.tag;if(5===t||6===t||13===t||26===t||27===t||3===t)return e}return null}function $e(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e.stateNode;throw Error(o(33))}function qe(e){var t=e[Ye];return t||(t=e[Ye]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Qe(e){e[Xe]=!0}var Je=new Set,Ze={};function Ke(e,t){et(e,t),et(e+"Capture",t)}function et(e,t){for(Ze[e]=t,e=0;e<t.length;e++)Je.add(t[e])}var tt=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),nt=RegExp("^[: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]*$"),rt={},it={};function at(e,t,n){if(i=t,ne.call(it,i)||!ne.call(rt,i)&&(nt.test(i)?it[i]=!0:(rt[i]=!0,0)))if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":return void e.removeAttribute(t);case"boolean":var r=t.toLowerCase().slice(0,5);if("data-"!==r&&"aria-"!==r)return void e.removeAttribute(t)}e.setAttribute(t,""+n)}var i}function ot(e,t,n){if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(t)}e.setAttribute(t,""+n)}}function lt(e,t,n,r){if(null===r)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(n)}e.setAttributeNS(t,n,""+r)}}function st(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function ut(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function ct(e){e._valueTracker||(e._valueTracker=function(e){var t=ut(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function dt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ut(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function ft(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}var ht=/[\n"\\]/g;function pt(e){return e.replace(ht,(function(e){return"\\"+e.charCodeAt(0).toString(16)+" "}))}function gt(e,t,n,r,i,a,o,l){e.name="",null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&"boolean"!=typeof o?e.type=o:e.removeAttribute("type"),null!=t?"number"===o?(0===t&&""===e.value||e.value!=t)&&(e.value=""+st(t)):e.value!==""+st(t)&&(e.value=""+st(t)):"submit"!==o&&"reset"!==o||e.removeAttribute("value"),null!=t?bt(e,o,st(t)):null!=n?bt(e,o,st(n)):null!=r&&e.removeAttribute("value"),null==i&&null!=a&&(e.defaultChecked=!!a),null!=i&&(e.checked=i&&"function"!=typeof i&&"symbol"!=typeof i),null!=l&&"function"!=typeof l&&"symbol"!=typeof l&&"boolean"!=typeof l?e.name=""+st(l):e.removeAttribute("name")}function mt(e,t,n,r,i,a,o,l){if(null!=a&&"function"!=typeof a&&"symbol"!=typeof a&&"boolean"!=typeof a&&(e.type=a),null!=t||null!=n){if(("submit"===a||"reset"===a)&&null==t)return;n=null!=n?""+st(n):"",t=null!=t?""+st(t):n,l||t===e.value||(e.value=t),e.defaultValue=t}r="function"!=typeof(r=null!=r?r:i)&&"symbol"!=typeof r&&!!r,e.checked=l?e.checked:!!r,e.defaultChecked=!!r,null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&"boolean"!=typeof o&&(e.name=o)}function bt(e,t,n){"number"===t&&ft(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function vt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+st(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function yt(e,t,n){null==t||((t=""+st(t))!==e.value&&(e.value=t),null!=n)?e.defaultValue=null!=n?""+st(n):"":e.defaultValue!==t&&(e.defaultValue=t)}function Tt(e,t,n,r){if(null==t){if(null!=r){if(null!=n)throw Error(o(92));if(F(r)){if(1<r.length)throw Error(o(93));r=r[0]}n=r}null==n&&(n=""),t=n}n=st(t),e.defaultValue=n,(r=e.textContent)===n&&""!==r&&null!==r&&(e.value=r)}function Et(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var _t=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function wt(e,t,n){var r=0===t.indexOf("--");null==n||"boolean"==typeof n||""===n?r?e.setProperty(t,""):"float"===t?e.cssFloat="":e[t]="":r?e.setProperty(t,n):"number"!=typeof n||0===n||_t.has(t)?"float"===t?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function St(e,t,n){if(null!=t&&"object"!=typeof t)throw Error(o(62));if(e=e.style,null!=n){for(var r in n)!n.hasOwnProperty(r)||null!=t&&t.hasOwnProperty(r)||(0===r.indexOf("--")?e.setProperty(r,""):"float"===r?e.cssFloat="":e[r]="");for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&wt(e,i,r)}else for(var a in t)t.hasOwnProperty(a)&&wt(e,a,t[a])}function Ot(e){if(-1===e.indexOf("-"))return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Lt=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Nt=/^[\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;function At(e){return Nt.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var Rt=null;function xt(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var kt=null,Ct=null;function Dt(e){var t=Ge(e);if(t&&(e=t.stateNode)){var n=e[ze]||null;e:switch(e=t.stateNode,t.type){case"input":if(gt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+pt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[ze]||null;if(!i)throw Error(o(90));gt(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)(r=n[t]).form===e.form&&dt(r)}break e;case"textarea":yt(e,n.value,n.defaultValue);break e;case"select":null!=(t=n.value)&&vt(e,!!n.multiple,t,!1)}}}var Mt=!1;function It(e,t,n){if(Mt)return e(t,n);Mt=!0;try{return e(t)}finally{if(Mt=!1,(null!==kt||null!==Ct)&&(Pu(),kt&&(t=kt,e=Ct,Ct=kt=null,Dt(t),e)))for(t=0;t<e.length;t++)Dt(e[t])}}function Bt(e,t){var n=e.stateNode;if(null===n)return null;var r=n[ze]||null;if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(o(231,t,typeof n));return n}var Pt=!1;if(tt)try{var zt={};Object.defineProperty(zt,"passive",{get:function(){Pt=!0}}),window.addEventListener("test",zt,zt),window.removeEventListener("test",zt,zt)}catch(e){Pt=!1}var Ut=null,Ft=null,Wt=null;function Ht(){if(Wt)return Wt;var e,t,n=Ft,r=n.length,i="value"in Ut?Ut.value:Ut.textContent,a=i.length;for(e=0;e<r&&n[e]===i[e];e++);var o=r-e;for(t=1;t<=o&&n[r-t]===i[a-t];t++);return Wt=i.slice(e,1<t?1-t:void 0)}function Yt(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function Xt(){return!0}function Vt(){return!1}function jt(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?Xt:Vt,this.isPropagationStopped=Vt,this}return x(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Xt)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Xt)},persist:function(){},isPersistent:Xt}),t}var Gt,$t,qt,Qt={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Jt=jt(Qt),Zt=x({},Qt,{view:0,detail:0}),Kt=jt(Zt),en=x({},Zt,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:fn,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!==qt&&(qt&&"mousemove"===e.type?(Gt=e.screenX-qt.screenX,$t=e.screenY-qt.screenY):$t=Gt=0,qt=e),Gt)},movementY:function(e){return"movementY"in e?e.movementY:$t}}),tn=jt(en),nn=jt(x({},en,{dataTransfer:0})),rn=jt(x({},Zt,{relatedTarget:0})),an=jt(x({},Qt,{animationName:0,elapsedTime:0,pseudoElement:0})),on=jt(x({},Qt,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),ln=jt(x({},Qt,{data:0})),sn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},un={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"},cn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function dn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=cn[e])&&!!t[e]}function fn(){return dn}var hn=jt(x({},Zt,{key:function(e){if(e.key){var t=sn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Yt(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?un[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:fn,charCode:function(e){return"keypress"===e.type?Yt(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Yt(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),pn=jt(x({},en,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),gn=jt(x({},Zt,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:fn})),mn=jt(x({},Qt,{propertyName:0,elapsedTime:0,pseudoElement:0})),bn=jt(x({},en,{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})),vn=jt(x({},Qt,{newState:0,oldState:0})),yn=[9,13,27,32],Tn=tt&&"CompositionEvent"in window,En=null;tt&&"documentMode"in document&&(En=document.documentMode);var _n=tt&&"TextEvent"in window&&!En,wn=tt&&(!Tn||En&&8<En&&11>=En),Sn=String.fromCharCode(32),On=!1;function Ln(e,t){switch(e){case"keyup":return-1!==yn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Nn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var An=!1,Rn={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 xn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Rn[e.type]:"textarea"===t}function kn(e,t,n,r){kt?Ct?Ct.push(r):Ct=[r]:kt=r,0<(t=Ic(t,"onChange")).length&&(n=new Jt("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Cn=null,Dn=null;function Mn(e){Nc(e,0)}function In(e){if(dt($e(e)))return e}function Bn(e,t){if("change"===e)return t}var Pn=!1;if(tt){var zn;if(tt){var Un="oninput"in document;if(!Un){var Fn=document.createElement("div");Fn.setAttribute("oninput","return;"),Un="function"==typeof Fn.oninput}zn=Un}else zn=!1;Pn=zn&&(!document.documentMode||9<document.documentMode)}function Wn(){Cn&&(Cn.detachEvent("onpropertychange",Hn),Dn=Cn=null)}function Hn(e){if("value"===e.propertyName&&In(Dn)){var t=[];kn(t,Dn,e,xt(e)),It(Mn,t)}}function Yn(e,t,n){"focusin"===e?(Wn(),Dn=n,(Cn=t).attachEvent("onpropertychange",Hn)):"focusout"===e&&Wn()}function Xn(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return In(Dn)}function Vn(e,t){if("click"===e)return In(t)}function jn(e,t){if("input"===e||"change"===e)return In(t)}var Gn="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function $n(e,t){if(Gn(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!ne.call(t,i)||!Gn(e[i],t[i]))return!1}return!0}function qn(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Qn(e,t){var n,r=qn(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=qn(r)}}function Jn(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?Jn(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function Zn(e){for(var t=ft((e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window).document);t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=ft((e=t.contentWindow).document)}return t}function Kn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function er(e,t){var n=Zn(t);t=e.focusedElem;var r=e.selectionRange;if(n!==t&&t&&t.ownerDocument&&Jn(t.ownerDocument.documentElement,t)){if(null!==r&&Kn(t))if(e=r.start,void 0===(n=r.end)&&(n=e),"selectionStart"in t)t.selectionStart=e,t.selectionEnd=Math.min(n,t.value.length);else if((n=(e=t.ownerDocument||document)&&e.defaultView||window).getSelection){n=n.getSelection();var i=t.textContent.length,a=Math.min(r.start,i);r=void 0===r.end?a:Math.min(r.end,i),!n.extend&&a>r&&(i=r,r=a,a=i),i=Qn(t,a);var o=Qn(t,r);i&&o&&(1!==n.rangeCount||n.anchorNode!==i.node||n.anchorOffset!==i.offset||n.focusNode!==o.node||n.focusOffset!==o.offset)&&((e=e.createRange()).setStart(i.node,i.offset),n.removeAllRanges(),a>r?(n.addRange(e),n.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),n.addRange(e)))}for(e=[],n=t;n=n.parentNode;)1===n.nodeType&&e.push({element:n,left:n.scrollLeft,top:n.scrollTop});for("function"==typeof t.focus&&t.focus(),t=0;t<e.length;t++)(n=e[t]).element.scrollLeft=n.left,n.element.scrollTop=n.top}}var tr=tt&&"documentMode"in document&&11>=document.documentMode,nr=null,rr=null,ir=null,ar=!1;function or(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;ar||null==nr||nr!==ft(r)||(r="selectionStart"in(r=nr)&&Kn(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},ir&&$n(ir,r)||(ir=r,0<(r=Ic(rr,"onSelect")).length&&(t=new Jt("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=nr)))}function lr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var sr={animationend:lr("Animation","AnimationEnd"),animationiteration:lr("Animation","AnimationIteration"),animationstart:lr("Animation","AnimationStart"),transitionrun:lr("Transition","TransitionRun"),transitionstart:lr("Transition","TransitionStart"),transitioncancel:lr("Transition","TransitionCancel"),transitionend:lr("Transition","TransitionEnd")},ur={},cr={};function dr(e){if(ur[e])return ur[e];if(!sr[e])return e;var t,n=sr[e];for(t in n)if(n.hasOwnProperty(t)&&t in cr)return ur[e]=n[t];return e}tt&&(cr=document.createElement("div").style,"AnimationEvent"in window||(delete sr.animationend.animation,delete sr.animationiteration.animation,delete sr.animationstart.animation),"TransitionEvent"in window||delete sr.transitionend.transition);var fr=dr("animationend"),hr=dr("animationiteration"),pr=dr("animationstart"),gr=dr("transitionrun"),mr=dr("transitionstart"),br=dr("transitioncancel"),vr=dr("transitionend"),yr=new Map,Tr="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll scrollEnd toggle touchMove waiting wheel".split(" ");function Er(e,t){yr.set(e,t),Ke(t,[e])}var _r=[],wr=0,Sr=0;function Or(){for(var e=wr,t=Sr=wr=0;t<e;){var n=_r[t];_r[t++]=null;var r=_r[t];_r[t++]=null;var i=_r[t];_r[t++]=null;var a=_r[t];if(_r[t++]=null,null!==r&&null!==i){var o=r.pending;null===o?i.next=i:(i.next=o.next,o.next=i),r.pending=i}0!==a&&Rr(n,i,a)}}function Lr(e,t,n,r){_r[wr++]=e,_r[wr++]=t,_r[wr++]=n,_r[wr++]=r,Sr|=r,e.lanes|=r,null!==(e=e.alternate)&&(e.lanes|=r)}function Nr(e,t,n,r){return Lr(e,t,n,r),xr(e)}function Ar(e,t){return Lr(e,null,null,t),xr(e)}function Rr(e,t,n){e.lanes|=n;var r=e.alternate;null!==r&&(r.lanes|=n);for(var i=!1,a=e.return;null!==a;)a.childLanes|=n,null!==(r=a.alternate)&&(r.childLanes|=n),22===a.tag&&(null===(e=a.stateNode)||1&e._visibility||(i=!0)),e=a,a=a.return;i&&null!==t&&3===e.tag&&(a=e.stateNode,i=31-ye(n),null===(e=(a=a.hiddenUpdates)[i])?a[i]=[t]:e.push(t),t.lane=536870912|n)}function xr(e){if(50<Nu)throw Nu=0,Au=null,Error(o(185));for(var t=e.return;null!==t;)t=(e=t).return;return 3===e.tag?e.stateNode:null}var kr={},Cr=new WeakMap;function Dr(e,t){if("object"==typeof e&&null!==e){var n=Cr.get(e);return void 0!==n?n:(t={value:e,source:t,stack:I(t)},Cr.set(e,t),t)}return{value:e,source:t,stack:I(t)}}var Mr=[],Ir=0,Br=null,Pr=0,zr=[],Ur=0,Fr=null,Wr=1,Hr="";function Yr(e,t){Mr[Ir++]=Pr,Mr[Ir++]=Br,Br=e,Pr=t}function Xr(e,t,n){zr[Ur++]=Wr,zr[Ur++]=Hr,zr[Ur++]=Fr,Fr=e;var r=Wr;e=Hr;var i=32-ye(r)-1;r&=~(1<<i),n+=1;var a=32-ye(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Wr=1<<32-ye(t)+i|n<<i|r,Hr=a+e}else Wr=1<<a|n<<i|r,Hr=e}function Vr(e){null!==e.return&&(Yr(e,1),Xr(e,1,0))}function jr(e){for(;e===Br;)Br=Mr[--Ir],Mr[Ir]=null,Pr=Mr[--Ir],Mr[Ir]=null;for(;e===Fr;)Fr=zr[--Ur],zr[Ur]=null,Hr=zr[--Ur],zr[Ur]=null,Wr=zr[--Ur],zr[Ur]=null}var Gr=null,$r=null,qr=!1,Qr=null,Jr=!1,Zr=Error(o(519));function Kr(e){throw ii(Dr(Error(o(418,"")),e)),Zr}function ei(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Pe]=e,t[ze]=r,n){case"dialog":Ac("cancel",t),Ac("close",t);break;case"iframe":case"object":case"embed":Ac("load",t);break;case"video":case"audio":for(n=0;n<Oc.length;n++)Ac(Oc[n],t);break;case"source":Ac("error",t);break;case"img":case"image":case"link":Ac("error",t),Ac("load",t);break;case"details":Ac("toggle",t);break;case"input":Ac("invalid",t),mt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0),ct(t);break;case"select":Ac("invalid",t);break;case"textarea":Ac("invalid",t),Tt(t,r.value,r.defaultValue,r.children),ct(t)}"string"!=typeof(n=r.children)&&"number"!=typeof n&&"bigint"!=typeof n||t.textContent===""+n||!0===r.suppressHydrationWarning||Wc(t.textContent,n)?(null!=r.popover&&(Ac("beforetoggle",t),Ac("toggle",t)),null!=r.onScroll&&Ac("scroll",t),null!=r.onScrollEnd&&Ac("scrollend",t),null!=r.onClick&&(t.onclick=Hc),t=!0):t=!1,t||Kr(e)}function ti(e){for(Gr=e.return;Gr;)switch(Gr.tag){case 3:case 27:return void(Jr=!0);case 5:case 13:return void(Jr=!1);default:Gr=Gr.return}}function ni(e){if(e!==Gr)return!1;if(!qr)return ti(e),qr=!0,!1;var t,n=!1;if((t=3!==e.tag&&27!==e.tag)&&((t=5===e.tag)&&(t=!("form"!==(t=e.type)&&"button"!==t)||Jc(e.type,e.memoizedProps)),t=!t),t&&(n=!0),n&&$r&&Kr(e),ti(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));e:{for(e=e.nextSibling,n=0;e;){if(8===e.nodeType)if("/$"===(t=e.data)){if(0===n){$r=od(e.nextSibling);break e}n--}else"$"!==t&&"$!"!==t&&"$?"!==t||n++;e=e.nextSibling}$r=null}}else $r=Gr?od(e.stateNode.nextSibling):null;return!0}function ri(){$r=Gr=null,qr=!1}function ii(e){null===Qr?Qr=[e]:Qr.push(e)}var ai=Error(o(460)),oi=Error(o(474)),li={then:function(){}};function si(e){return"fulfilled"===(e=e.status)||"rejected"===e}function ui(){}function ci(e,t,n){switch(void 0===(n=e[n])?e.push(t):n!==t&&(t.then(ui,ui),t=n),t.status){case"fulfilled":return t.value;case"rejected":if((e=t.reason)===ai)throw Error(o(483));throw e;default:if("string"==typeof t.status)t.then(ui,ui);else{if(null!==(e=eu)&&100<e.shellSuspendCounter)throw Error(o(482));(e=t).status="pending",e.then((function(e){if("pending"===t.status){var n=t;n.status="fulfilled",n.value=e}}),(function(e){if("pending"===t.status){var n=t;n.status="rejected",n.reason=e}}))}switch(t.status){case"fulfilled":return t.value;case"rejected":if((e=t.reason)===ai)throw Error(o(483));throw e}throw di=t,ai}}var di=null;function fi(){if(null===di)throw Error(o(459));var e=di;return di=null,e}var hi=null,pi=0;function gi(e){var t=pi;return pi+=1,null===hi&&(hi=[]),ci(hi,e,t)}function mi(e,t){t=t.props.ref,e.ref=void 0!==t?t:null}function bi(e,t){if(t.$$typeof===l)throw Error(o(525));throw e=Object.prototype.toString.call(t),Error(o(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function vi(e){return(0,e._init)(e._payload)}function yi(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function i(e,t){return(e=Bs(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=33554434,n):r:(t.flags|=33554434,n):(t.flags|=1048576,n)}function l(t){return e&&null===t.alternate&&(t.flags|=33554434),t}function d(e,t,n,r){return null===t||6!==t.tag?((t=Ws(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function f(e,t,n,r){var a=n.type;return a===c?p(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===a||"object"==typeof a&&null!==a&&a.$$typeof===T&&vi(a)===t.type)?(mi(t=i(t,n.props),n),t.return=e,t):(mi(t=zs(n.type,n.key,n.props,null,e.mode,r),n),t.return=e,t)}function h(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Hs(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function p(e,t,n,r,a){return null===t||7!==t.tag?((t=Us(n,e.mode,r,a)).return=e,t):((t=i(t,n)).return=e,t)}function m(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t||"bigint"==typeof t)return(t=Ws(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case s:return mi(n=zs(t.type,t.key,t.props,null,e.mode,n),t),n.return=e,n;case u:return(t=Hs(t,e.mode,n)).return=e,t;case T:return m(e,t=(0,t._init)(t._payload),n)}if(F(t)||S(t))return(t=Us(t,e.mode,n,null)).return=e,t;if("function"==typeof t.then)return m(e,gi(t),n);if(t.$$typeof===g)return m(e,Ol(e,t),n);bi(e,t)}return null}function b(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n||"bigint"==typeof n)return null!==i?null:d(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case s:return n.key===i?f(e,t,n,r):null;case u:return n.key===i?h(e,t,n,r):null;case T:return b(e,t,n=(i=n._init)(n._payload),r)}if(F(n)||S(n))return null!==i?null:p(e,t,n,r,null);if("function"==typeof n.then)return b(e,t,gi(n),r);if(n.$$typeof===g)return b(e,t,Ol(e,n),r);bi(e,n)}return null}function v(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r||"bigint"==typeof r)return d(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case s:return f(t,e=e.get(null===r.key?n:r.key)||null,r,i);case u:return h(t,e=e.get(null===r.key?n:r.key)||null,r,i);case T:return v(e,t,n,r=(0,r._init)(r._payload),i)}if(F(r)||S(r))return p(t,e=e.get(n)||null,r,i,null);if("function"==typeof r.then)return v(e,t,n,gi(r),i);if(r.$$typeof===g)return v(e,t,n,Ol(t,r),i);bi(t,r)}return null}function y(d,f,h,p){if("object"==typeof h&&null!==h&&h.type===c&&null===h.key&&(h=h.props.children),"object"==typeof h&&null!==h){switch(h.$$typeof){case s:e:{for(var E=h.key;null!==f;){if(f.key===E){if((E=h.type)===c){if(7===f.tag){n(d,f.sibling),(p=i(f,h.props.children)).return=d,d=p;break e}}else if(f.elementType===E||"object"==typeof E&&null!==E&&E.$$typeof===T&&vi(E)===f.type){n(d,f.sibling),mi(p=i(f,h.props),h),p.return=d,d=p;break e}n(d,f);break}t(d,f),f=f.sibling}h.type===c?((p=Us(h.props.children,d.mode,p,h.key)).return=d,d=p):(mi(p=zs(h.type,h.key,h.props,null,d.mode,p),h),p.return=d,d=p)}return l(d);case u:e:{for(E=h.key;null!==f;){if(f.key===E){if(4===f.tag&&f.stateNode.containerInfo===h.containerInfo&&f.stateNode.implementation===h.implementation){n(d,f.sibling),(p=i(f,h.children||[])).return=d,d=p;break e}n(d,f);break}t(d,f),f=f.sibling}(p=Hs(h,d.mode,p)).return=d,d=p}return l(d);case T:return y(d,f,h=(E=h._init)(h._payload),p)}if(F(h))return function(i,o,l,s){for(var u=null,c=null,d=o,f=o=0,h=null;null!==d&&f<l.length;f++){d.index>f?(h=d,d=null):h=d.sibling;var p=b(i,d,l[f],s);if(null===p){null===d&&(d=h);break}e&&d&&null===p.alternate&&t(i,d),o=a(p,o,f),null===c?u=p:c.sibling=p,c=p,d=h}if(f===l.length)return n(i,d),qr&&Yr(i,f),u;if(null===d){for(;f<l.length;f++)null!==(d=m(i,l[f],s))&&(o=a(d,o,f),null===c?u=d:c.sibling=d,c=d);return qr&&Yr(i,f),u}for(d=r(d);f<l.length;f++)null!==(h=v(d,i,f,l[f],s))&&(e&&null!==h.alternate&&d.delete(null===h.key?f:h.key),o=a(h,o,f),null===c?u=h:c.sibling=h,c=h);return e&&d.forEach((function(e){return t(i,e)})),qr&&Yr(i,f),u}(d,f,h,p);if(S(h)){if("function"!=typeof(E=S(h)))throw Error(o(150));return function(i,l,s,u){if(null==s)throw Error(o(151));for(var c=null,d=null,f=l,h=l=0,p=null,g=s.next();null!==f&&!g.done;h++,g=s.next()){f.index>h?(p=f,f=null):p=f.sibling;var y=b(i,f,g.value,u);if(null===y){null===f&&(f=p);break}e&&f&&null===y.alternate&&t(i,f),l=a(y,l,h),null===d?c=y:d.sibling=y,d=y,f=p}if(g.done)return n(i,f),qr&&Yr(i,h),c;if(null===f){for(;!g.done;h++,g=s.next())null!==(g=m(i,g.value,u))&&(l=a(g,l,h),null===d?c=g:d.sibling=g,d=g);return qr&&Yr(i,h),c}for(f=r(f);!g.done;h++,g=s.next())null!==(g=v(f,i,h,g.value,u))&&(e&&null!==g.alternate&&f.delete(null===g.key?h:g.key),l=a(g,l,h),null===d?c=g:d.sibling=g,d=g);return e&&f.forEach((function(e){return t(i,e)})),qr&&Yr(i,h),c}(d,f,h=E.call(h),p)}if("function"==typeof h.then)return y(d,f,gi(h),p);if(h.$$typeof===g)return y(d,f,Ol(d,h),p);bi(d,h)}return"string"==typeof h&&""!==h||"number"==typeof h||"bigint"==typeof h?(h=""+h,null!==f&&6===f.tag?(n(d,f.sibling),(p=i(f,h)).return=d,d=p):(n(d,f),(p=Ws(h,d.mode,p)).return=d,d=p),l(d)):n(d,f)}return function(e,t,n,r){try{pi=0;var i=y(e,t,n,r);return hi=null,i}catch(t){if(t===ai)throw t;var a=Ms(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ti=yi(!0),Ei=yi(!1),_i=V(null),wi=V(0);function Si(e,t){G(wi,e=su),G(_i,t),su=e|t.baseLanes}function Oi(){G(wi,su),G(_i,_i.current)}function Li(){su=wi.current,j(_i),j(wi)}var Ni=V(null),Ai=null;function Ri(e){var t=e.alternate;G(Di,1&Di.current),G(Ni,e),null===Ai&&(null===t||null!==_i.current||null!==t.memoizedState)&&(Ai=e)}function xi(e){if(22===e.tag){if(G(Di,Di.current),G(Ni,e),null===Ai){var t=e.alternate;null!==t&&null!==t.memoizedState&&(Ai=e)}}else ki()}function ki(){G(Di,Di.current),G(Ni,Ni.current)}function Ci(e){j(Ni),Ai===e&&(Ai=null),j(Di)}var Di=V(0);function Mi(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ii="undefined"!=typeof AbortController?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach((function(e){return e()}))}},Bi=r.unstable_scheduleCallback,Pi=r.unstable_NormalPriority,zi={$$typeof:g,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ui(){return{controller:new Ii,data:new Map,refCount:0}}function Fi(e){e.refCount--,0===e.refCount&&Bi(Pi,(function(){e.controller.abort()}))}var Wi=null,Hi=0,Yi=0,Xi=null;function Vi(){if(0==--Hi&&null!==Wi){null!==Xi&&(Xi.status="fulfilled");var e=Wi;Wi=null,Yi=0,Xi=null;for(var t=0;t<e.length;t++)(0,e[t])()}}var ji=R.S;R.S=function(e,t){"object"==typeof t&&null!==t&&"function"==typeof t.then&&function(e,t){if(null===Wi){var n=Wi=[];Hi=0,Yi=Tc(),Xi={status:"pending",value:void 0,then:function(e){n.push(e)}}}Hi++,t.then(Vi,Vi)}(0,t),null!==ji&&ji(e,t)};var Gi=V(null);function $i(){var e=Gi.current;return null!==e?e:eu.pooledCache}function qi(e,t){G(Gi,null===t?Gi.current:t.pool)}function Qi(){var e=$i();return null===e?null:{parent:zi._currentValue,pool:e}}var Ji=0,Zi=null,Ki=null,ea=null,ta=!1,na=!1,ra=!1,ia=0,aa=0,oa=null,la=0;function sa(){throw Error(o(321))}function ua(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Gn(e[n],t[n]))return!1;return!0}function ca(e,t,n,r,i,a){return Ji=a,Zi=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,R.H=null===e||null===e.memoizedState?Oo:Lo,ra=!1,a=n(r,i),ra=!1,na&&(a=fa(t,n,r,i)),da(e),a}function da(e){R.H=So;var t=null!==Ki&&null!==Ki.next;if(Ji=0,ea=Ki=Zi=null,ta=!1,aa=0,oa=null,t)throw Error(o(300));null===e||Yo||null!==(e=e.dependencies)&&_l(e)&&(Yo=!0)}function fa(e,t,n,r){Zi=e;var i=0;do{if(na&&(oa=null),aa=0,na=!1,25<=i)throw Error(o(301));if(i+=1,ea=Ki=null,null!=e.updateQueue){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,null!=a.memoCache&&(a.memoCache.index=0)}R.H=No,a=t(n,r)}while(na);return a}function ha(){var e=R.H,t=e.useState()[0];return t="function"==typeof t.then?ya(t):t,e=e.useState()[0],(null!==Ki?Ki.memoizedState:null)!==e&&(Zi.flags|=1024),t}function pa(){var e=0!==ia;return ia=0,e}function ga(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ma(e){if(ta){for(e=e.memoizedState;null!==e;){var t=e.queue;null!==t&&(t.pending=null),e=e.next}ta=!1}Ji=0,ea=Ki=Zi=null,na=!1,aa=ia=0,oa=null}function ba(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ea?Zi.memoizedState=ea=e:ea=ea.next=e,ea}function va(){if(null===Ki){var e=Zi.alternate;e=null!==e?e.memoizedState:null}else e=Ki.next;var t=null===ea?Zi.memoizedState:ea.next;if(null!==t)ea=t,Ki=e;else{if(null===e){if(null===Zi.alternate)throw Error(o(467));throw Error(o(310))}e={memoizedState:(Ki=e).memoizedState,baseState:Ki.baseState,baseQueue:Ki.baseQueue,queue:Ki.queue,next:null},null===ea?Zi.memoizedState=ea=e:ea=ea.next=e}return ea}function ya(e){var t=aa;return aa+=1,null===oa&&(oa=[]),e=ci(oa,e,t),t=Zi,null===(null===ea?t.memoizedState:ea.next)&&(t=t.alternate,R.H=null===t||null===t.memoizedState?Oo:Lo),e}function Ta(e){if(null!==e&&"object"==typeof e){if("function"==typeof e.then)return ya(e);if(e.$$typeof===g)return Sl(e)}throw Error(o(438,String(e)))}function Ea(e){var t=null,n=Zi.updateQueue;if(null!==n&&(t=n.memoCache),null==t){var r=Zi.alternate;null!==r&&null!==(r=r.updateQueue)&&null!=(r=r.memoCache)&&(t={data:r.data.map((function(e){return e.slice()})),index:0})}if(null==t&&(t={data:[],index:0}),null===n&&(n={lastEffect:null,events:null,stores:null,memoCache:null},Zi.updateQueue=n),n.memoCache=t,void 0===(n=t.data[t.index]))for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=_;return t.index++,n}function _a(e,t){return"function"==typeof t?t(e):t}function wa(e){return Sa(va(),Ki,e)}function Sa(e,t,n){var r=e.queue;if(null===r)throw Error(o(311));r.lastRenderedReducer=n;var i=e.baseQueue,a=r.pending;if(null!==a){if(null!==i){var l=i.next;i.next=a.next,a.next=l}t.baseQueue=i=a,r.pending=null}if(a=e.baseState,null===i)e.memoizedState=a;else{var s=l=null,u=null,c=t=i.next,d=!1;do{var f=-536870913&c.lane;if(f!==c.lane?(nu&f)===f:(Ji&f)===f){var h=c.revertLane;if(0===h)null!==u&&(u=u.next={lane:0,revertLane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),f===Yi&&(d=!0);else{if((Ji&h)===h){c=c.next,h===Yi&&(d=!0);continue}f={lane:0,revertLane:c.revertLane,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},null===u?(s=u=f,l=a):u=u.next=f,Zi.lanes|=h,cu|=h}f=c.action,ra&&n(a,f),a=c.hasEagerState?c.eagerState:n(a,f)}else h={lane:f,revertLane:c.revertLane,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},null===u?(s=u=h,l=a):u=u.next=h,Zi.lanes|=f,cu|=f;c=c.next}while(null!==c&&c!==t);if(null===u?l=a:u.next=s,!Gn(a,e.memoizedState)&&(Yo=!0,d&&null!==(n=Xi)))throw n;e.memoizedState=a,e.baseState=l,e.baseQueue=u,r.lastRenderedState=a}return null===i&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Oa(e){var t=va(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(null!==i){n.pending=null;var l=i=i.next;do{a=e(a,l.action),l=l.next}while(l!==i);Gn(a,t.memoizedState)||(Yo=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function La(e,t,n){var r=Zi,i=va(),a=qr;if(a){if(void 0===n)throw Error(o(407));n=n()}else n=t();var l=!Gn((Ki||i).memoizedState,n);if(l&&(i.memoizedState=n,Yo=!0),i=i.queue,Ja(Ra.bind(null,r,i,e),[e]),i.getSnapshot!==t||l||null!==ea&&1&ea.memoizedState.tag){if(r.flags|=2048,ja(9,Aa.bind(null,r,i,n,t),{destroy:void 0},null),null===eu)throw Error(o(349));a||60&Ji||Na(r,t,n)}return n}function Na(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=Zi.updateQueue)?(t={lastEffect:null,events:null,stores:null,memoCache:null},Zi.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Aa(e,t,n,r){t.value=n,t.getSnapshot=r,xa(t)&&ka(e)}function Ra(e,t,n){return n((function(){xa(t)&&ka(e)}))}function xa(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Gn(e,n)}catch(e){return!0}}function ka(e){var t=Ar(e,2);null!==t&&ku(t,0,2)}function Ca(e){var t=ba();if("function"==typeof e){var n=e;if(e=n(),ra){ve(!0);try{n()}finally{ve(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_a,lastRenderedState:e},t}function Da(e,t,n,r){return e.baseState=n,Sa(e,Ki,"function"==typeof r?r:_a)}function Ma(e,t,n,r,i){if(Eo(e))throw Error(o(485));if(null!==(e=t.action)){var a={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(e){a.listeners.push(e)}};null!==R.T?n(!0):a.isTransition=!1,r(a),null===(n=t.pending)?(a.next=t.pending=a,Ia(t,a)):(a.next=n.next,t.pending=n.next=a)}}function Ia(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=R.T,o={};R.T=o;try{var l=n(i,r),s=R.S;null!==s&&s(o,l),Ba(e,t,l)}catch(n){za(e,t,n)}finally{R.T=a}}else try{Ba(e,t,a=n(i,r))}catch(n){za(e,t,n)}}function Ba(e,t,n){null!==n&&"object"==typeof n&&"function"==typeof n.then?n.then((function(n){Pa(e,t,n)}),(function(n){return za(e,t,n)})):Pa(e,t,n)}function Pa(e,t,n){t.status="fulfilled",t.value=n,Ua(t),e.state=n,null!==(t=e.pending)&&((n=t.next)===t?e.pending=null:(n=n.next,t.next=n,Ia(e,n)))}function za(e,t,n){var r=e.pending;if(e.pending=null,null!==r){r=r.next;do{t.status="rejected",t.reason=n,Ua(t),t=t.next}while(t!==r)}e.action=null}function Ua(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Fa(e,t){return t}function Wa(e,t){if(qr){var n=eu.formState;if(null!==n){e:{var r=Zi;if(qr){if($r){t:{for(var i=$r,a=Jr;8!==i.nodeType;){if(!a){i=null;break t}if(null===(i=od(i.nextSibling))){i=null;break t}}i="F!"===(a=i.data)||"F"===a?i:null}if(i){$r=od(i.nextSibling),r="F!"===i.data;break e}}Kr(r)}r=!1}r&&(t=n[0])}}return(n=ba()).memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fa,lastRenderedState:t},n.queue=r,n=vo.bind(null,Zi,r),r.dispatch=n,r=Ca(!1),a=To.bind(null,Zi,!1,r.queue),i={state:t,dispatch:null,action:e,pending:null},(r=ba()).queue=i,n=Ma.bind(null,Zi,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Ha(e){return Ya(va(),Ki,e)}function Ya(e,t,n){t=Sa(e,t,Fa)[0],e=wa(_a)[0],t="object"==typeof t&&null!==t&&"function"==typeof t.then?ya(t):t;var r=va(),i=r.queue,a=i.dispatch;return n!==r.memoizedState&&(Zi.flags|=2048,ja(9,Xa.bind(null,i,n),{destroy:void 0},null)),[t,a,e]}function Xa(e,t){e.action=t}function Va(e){var t=va(),n=Ki;if(null!==n)return Ya(t,n,e);va(),t=t.memoizedState;var r=(n=va()).queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ja(e,t,n,r){return e={tag:e,create:t,inst:n,deps:r,next:null},null===(t=Zi.updateQueue)&&(t={lastEffect:null,events:null,stores:null,memoCache:null},Zi.updateQueue=t),null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Ga(){return va().memoizedState}function $a(e,t,n,r){var i=ba();Zi.flags|=e,i.memoizedState=ja(1|t,n,{destroy:void 0},void 0===r?null:r)}function qa(e,t,n,r){var i=va();r=void 0===r?null:r;var a=i.memoizedState.inst;null!==Ki&&null!==r&&ua(r,Ki.memoizedState.deps)?i.memoizedState=ja(t,n,a,r):(Zi.flags|=e,i.memoizedState=ja(1|t,n,a,r))}function Qa(e,t){$a(8390656,8,e,t)}function Ja(e,t){qa(2048,8,e,t)}function Za(e,t){return qa(4,2,e,t)}function Ka(e,t){return qa(4,4,e,t)}function eo(e,t){if("function"==typeof t){e=e();var n=t(e);return function(){"function"==typeof n?n():t(null)}}if(null!=t)return e=e(),t.current=e,function(){t.current=null}}function to(e,t,n){n=null!=n?n.concat([e]):null,qa(4,4,eo.bind(null,t,e),n)}function no(){}function ro(e,t){var n=va();t=void 0===t?null:t;var r=n.memoizedState;return null!==t&&ua(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function io(e,t){var n=va();t=void 0===t?null:t;var r=n.memoizedState;if(null!==t&&ua(t,r[1]))return r[0];if(r=e(),ra){ve(!0);try{e()}finally{ve(!1)}}return n.memoizedState=[r,t],r}function ao(e,t,n){return void 0===n||1073741824&Ji?e.memoizedState=t:(e.memoizedState=n,e=xu(),Zi.lanes|=e,cu|=e,n)}function oo(e,t,n,r){return Gn(n,t)?n:null!==_i.current?(e=ao(e,n,r),Gn(e,t)||(Yo=!0),e):42&Ji?(e=xu(),Zi.lanes|=e,cu|=e,t):(Yo=!0,e.memoizedState=n)}function lo(e,t,n,r,i){var a=W.p;W.p=0!==a&&8>a?a:8;var o,l,s,u=R.T,c={};R.T=c,To(e,!1,t,n);try{var d=i(),f=R.S;null!==f&&f(c,d),null!==d&&"object"==typeof d&&"function"==typeof d.then?yo(e,t,(o=r,l=[],s={status:"pending",value:null,reason:null,then:function(e){l.push(e)}},d.then((function(){s.status="fulfilled",s.value=o;for(var e=0;e<l.length;e++)(0,l[e])(o)}),(function(e){for(s.status="rejected",s.reason=e,e=0;e<l.length;e++)(0,l[e])(void 0)})),s),Ru()):yo(e,t,r,Ru())}catch(n){yo(e,t,{then:function(){},status:"rejected",reason:n},Ru())}finally{W.p=a,R.T=u}}function so(){}function uo(e,t,n,r){if(5!==e.tag)throw Error(o(476));var i=co(e).queue;lo(e,i,t,H,null===n?so:function(){return fo(e),n(r)})}function co(e){var t=e.memoizedState;if(null!==t)return t;var n={};return(t={memoizedState:H,baseState:H,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_a,lastRenderedState:H},next:null}).next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_a,lastRenderedState:n},next:null},e.memoizedState=t,null!==(e=e.alternate)&&(e.memoizedState=t),t}function fo(e){yo(e,co(e).next.queue,{},Ru())}function ho(){return Sl(Id)}function po(){return va().memoizedState}function go(){return va().memoizedState}function mo(e){for(var t=e.return;null!==t;){switch(t.tag){case 24:case 3:var n=Ru(),r=kl(t,e=xl(n),n);return null!==r&&(ku(r,0,n),Cl(r,t,n)),t={cache:Ui()},void(e.payload=t)}t=t.return}}function bo(e,t,n){var r=Ru();n={lane:r,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},Eo(e)?_o(t,n):null!==(n=Nr(e,t,n,r))&&(ku(n,0,r),wo(n,t,r))}function vo(e,t,n){yo(e,t,n,Ru())}function yo(e,t,n,r){var i={lane:r,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if(Eo(e))_o(t,i);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var o=t.lastRenderedState,l=a(o,n);if(i.hasEagerState=!0,i.eagerState=l,Gn(l,o))return Lr(e,t,i,0),null===eu&&Or(),!1}catch(e){}if(null!==(n=Nr(e,t,i,r)))return ku(n,0,r),wo(n,t,r),!0}return!1}function To(e,t,n,r){if(r={lane:2,revertLane:Tc(),action:r,hasEagerState:!1,eagerState:null,next:null},Eo(e)){if(t)throw Error(o(479))}else null!==(t=Nr(e,n,r,2))&&ku(t,0,2)}function Eo(e){var t=e.alternate;return e===Zi||null!==t&&t===Zi}function _o(e,t){na=ta=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function wo(e,t,n){if(4194176&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,De(e,n)}}var So={readContext:Sl,use:Ta,useCallback:sa,useContext:sa,useEffect:sa,useImperativeHandle:sa,useLayoutEffect:sa,useInsertionEffect:sa,useMemo:sa,useReducer:sa,useRef:sa,useState:sa,useDebugValue:sa,useDeferredValue:sa,useTransition:sa,useSyncExternalStore:sa,useId:sa};So.useCacheRefresh=sa,So.useMemoCache=sa,So.useHostTransitionStatus=sa,So.useFormState=sa,So.useActionState=sa,So.useOptimistic=sa;var Oo={readContext:Sl,use:Ta,useCallback:function(e,t){return ba().memoizedState=[e,void 0===t?null:t],e},useContext:Sl,useEffect:Qa,useImperativeHandle:function(e,t,n){n=null!=n?n.concat([e]):null,$a(4194308,4,eo.bind(null,t,e),n)},useLayoutEffect:function(e,t){return $a(4194308,4,e,t)},useInsertionEffect:function(e,t){$a(4,2,e,t)},useMemo:function(e,t){var n=ba();t=void 0===t?null:t;var r=e();if(ra){ve(!0);try{e()}finally{ve(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=ba();if(void 0!==n){var i=n(t);if(ra){ve(!0);try{n(t)}finally{ve(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=bo.bind(null,Zi,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},ba().memoizedState=e},useState:function(e){var t=(e=Ca(e)).queue,n=vo.bind(null,Zi,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:no,useDeferredValue:function(e,t){return ao(ba(),e,t)},useTransition:function(){var e=Ca(!1);return e=lo.bind(null,Zi,e.queue,!0,!1),ba().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=Zi,i=ba();if(qr){if(void 0===n)throw Error(o(407));n=n()}else{if(n=t(),null===eu)throw Error(o(349));60&nu||Na(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,Qa(Ra.bind(null,r,a,e),[e]),r.flags|=2048,ja(9,Aa.bind(null,r,a,n,t),{destroy:void 0},null),n},useId:function(){var e=ba(),t=eu.identifierPrefix;if(qr){var n=Hr;t=":"+t+"R"+(n=(Wr&~(1<<32-ye(Wr)-1)).toString(32)+n),0<(n=ia++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=la++).toString(32)+":";return e.memoizedState=t},useCacheRefresh:function(){return ba().memoizedState=mo.bind(null,Zi)}};Oo.useMemoCache=Ea,Oo.useHostTransitionStatus=ho,Oo.useFormState=Wa,Oo.useActionState=Wa,Oo.useOptimistic=function(e){var t=ba();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=To.bind(null,Zi,!0,n),n.dispatch=t,[e,t]};var Lo={readContext:Sl,use:Ta,useCallback:ro,useContext:Sl,useEffect:Ja,useImperativeHandle:to,useInsertionEffect:Za,useLayoutEffect:Ka,useMemo:io,useReducer:wa,useRef:Ga,useState:function(){return wa(_a)},useDebugValue:no,useDeferredValue:function(e,t){return oo(va(),Ki.memoizedState,e,t)},useTransition:function(){var e=wa(_a)[0],t=va().memoizedState;return["boolean"==typeof e?e:ya(e),t]},useSyncExternalStore:La,useId:po};Lo.useCacheRefresh=go,Lo.useMemoCache=Ea,Lo.useHostTransitionStatus=ho,Lo.useFormState=Ha,Lo.useActionState=Ha,Lo.useOptimistic=function(e,t){return Da(va(),0,e,t)};var No={readContext:Sl,use:Ta,useCallback:ro,useContext:Sl,useEffect:Ja,useImperativeHandle:to,useInsertionEffect:Za,useLayoutEffect:Ka,useMemo:io,useReducer:Oa,useRef:Ga,useState:function(){return Oa(_a)},useDebugValue:no,useDeferredValue:function(e,t){var n=va();return null===Ki?ao(n,e,t):oo(n,Ki.memoizedState,e,t)},useTransition:function(){var e=Oa(_a)[0],t=va().memoizedState;return["boolean"==typeof e?e:ya(e),t]},useSyncExternalStore:La,useId:po};function Ao(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:x({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}No.useCacheRefresh=go,No.useMemoCache=Ea,No.useHostTransitionStatus=ho,No.useFormState=Va,No.useActionState=Va,No.useOptimistic=function(e,t){var n=va();return null!==Ki?Da(n,0,e,t):(n.baseState=e,[e,n.queue.dispatch])};var Ro={isMounted:function(e){return!!(e=e._reactInternals)&&B(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ru(),i=xl(r);i.payload=t,null!=n&&(i.callback=n),null!==(t=kl(e,i,r))&&(ku(t,0,r),Cl(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ru(),i=xl(r);i.tag=1,i.payload=t,null!=n&&(i.callback=n),null!==(t=kl(e,i,r))&&(ku(t,0,r),Cl(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ru(),r=xl(n);r.tag=2,null!=t&&(r.callback=t),null!==(t=kl(e,r,n))&&(ku(t,0,n),Cl(t,e,n))}};function xo(e,t,n,r,i,a,o){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,o):!(t.prototype&&t.prototype.isPureReactComponent&&$n(n,r)&&$n(i,a))}function ko(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ro.enqueueReplaceState(t,t.state,null)}function Co(e,t){var n=t;if("ref"in t)for(var r in n={},t)"ref"!==r&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=x({},n)),e)void 0===n[i]&&(n[i]=e[i]);return n}var Do="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)};function Mo(e){Do(e)}function Io(e){console.error(e)}function Bo(e){Do(e)}function Po(e,t){try{(0,e.onUncaughtError)(t.value,{componentStack:t.stack})}catch(e){setTimeout((function(){throw e}))}}function zo(e,t,n){try{(0,e.onCaughtError)(n.value,{componentStack:n.stack,errorBoundary:1===t.tag?t.stateNode:null})}catch(e){setTimeout((function(){throw e}))}}function Uo(e,t,n){return(n=xl(n)).tag=3,n.payload={element:null},n.callback=function(){Po(e,t)},n}function Fo(e){return(e=xl(e)).tag=3,e}function Wo(e,t,n,r){var i=n.type.getDerivedStateFromError;if("function"==typeof i){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){zo(t,n,r)}}var o=n.stateNode;null!==o&&"function"==typeof o.componentDidCatch&&(e.callback=function(){zo(t,n,r),"function"!=typeof i&&(null===Eu?Eu=new Set([this]):Eu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:null!==e?e:""})})}var Ho=Error(o(461)),Yo=!1;function Xo(e,t,n,r){t.child=null===e?Ei(t,null,n,r):Ti(t,e.child,n,r)}function Vo(e,t,n,r,i){n=n.render;var a=t.ref;if("ref"in r){var o={};for(var l in r)"ref"!==l&&(o[l]=r[l])}else o=r;return wl(t),r=ca(e,t,n,o,a,i),l=pa(),null===e||Yo?(qr&&l&&Vr(t),t.flags|=1,Xo(e,t,r,i),t.child):(ga(e,t,i),dl(e,t,i))}function jo(e,t,n,r,i){if(null===e){var a=n.type;return"function"!=typeof a||Is(a)||void 0!==a.defaultProps||null!==n.compare?((e=zs(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Go(e,t,a,r,i))}if(a=e.child,!fl(e,i)){var o=a.memoizedProps;if((n=null!==(n=n.compare)?n:$n)(o,r)&&e.ref===t.ref)return dl(e,t,i)}return t.flags|=1,(e=Bs(a,r)).ref=t.ref,e.return=t,t.child=e}function Go(e,t,n,r,i){if(null!==e){var a=e.memoizedProps;if($n(a,r)&&e.ref===t.ref){if(Yo=!1,t.pendingProps=r=a,!fl(e,i))return t.lanes=e.lanes,dl(e,t,i);131072&e.flags&&(Yo=!0)}}return Jo(e,t,n,r,i)}function $o(e,t,n){var r=t.pendingProps,i=r.children,a=!!(2&t.stateNode._pendingVisibility),o=null!==e?e.memoizedState:null;if(Qo(e,t),"hidden"===r.mode||a){if(128&t.flags){if(r=null!==o?o.baseLanes|n:n,null!==e){for(i=t.child=e.child,a=0;null!==i;)a=a|i.lanes|i.childLanes,i=i.sibling;t.childLanes=a&~r}else t.childLanes=0,t.child=null;return qo(e,t,r,n)}if(!(536870912&n))return t.lanes=t.childLanes=536870912,qo(e,t,null!==o?o.baseLanes|n:n,n);t.memoizedState={baseLanes:0,cachePool:null},null!==e&&qi(0,null!==o?o.cachePool:null),null!==o?Si(t,o):Oi(),xi(t)}else null!==o?(qi(0,o.cachePool),Si(t,o),ki(),t.memoizedState=null):(null!==e&&qi(0,null),Oi(),ki());return Xo(e,t,i,n),t.child}function qo(e,t,n,r){var i=$i();return i=null===i?null:{parent:zi._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},null!==e&&qi(0,null),Oi(),xi(t),null!==e&&El(e,t,r,!0),null}function Qo(e,t){var n=t.ref;if(null===n)null!==e&&null!==e.ref&&(t.flags|=2097664);else{if("function"!=typeof n&&"object"!=typeof n)throw Error(o(284));null!==e&&e.ref===n||(t.flags|=2097664)}}function Jo(e,t,n,r,i){return wl(t),n=ca(e,t,n,r,void 0,i),r=pa(),null===e||Yo?(qr&&r&&Vr(t),t.flags|=1,Xo(e,t,n,i),t.child):(ga(e,t,i),dl(e,t,i))}function Zo(e,t,n,r,i,a){return wl(t),t.updateQueue=null,n=fa(t,r,n,i),da(e),r=pa(),null===e||Yo?(qr&&r&&Vr(t),t.flags|=1,Xo(e,t,n,a),t.child):(ga(e,t,a),dl(e,t,a))}function Ko(e,t,n,r,i){if(wl(t),null===t.stateNode){var a=kr,o=n.contextType;"object"==typeof o&&null!==o&&(a=Sl(o)),a=new n(r,a),t.memoizedState=null!==a.state&&void 0!==a.state?a.state:null,a.updater=Ro,t.stateNode=a,a._reactInternals=t,(a=t.stateNode).props=r,a.state=t.memoizedState,a.refs={},Al(t),o=n.contextType,a.context="object"==typeof o&&null!==o?Sl(o):kr,a.state=t.memoizedState,"function"==typeof(o=n.getDerivedStateFromProps)&&(Ao(t,n,o,r),a.state=t.memoizedState),"function"==typeof n.getDerivedStateFromProps||"function"==typeof a.getSnapshotBeforeUpdate||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||(o=a.state,"function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),o!==a.state&&Ro.enqueueReplaceState(a,a.state,null),Bl(t,r,a,i),Il(),a.state=t.memoizedState),"function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!0}else if(null===e){a=t.stateNode;var l=t.memoizedProps,s=Co(n,l);a.props=s;var u=a.context,c=n.contextType;o=kr,"object"==typeof c&&null!==c&&(o=Sl(c));var d=n.getDerivedStateFromProps;c="function"==typeof d||"function"==typeof a.getSnapshotBeforeUpdate,l=t.pendingProps!==l,c||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(l||u!==o)&&ko(t,a,r,o),Nl=!1;var f=t.memoizedState;a.state=f,Bl(t,r,a,i),Il(),u=t.memoizedState,l||f!==u||Nl?("function"==typeof d&&(Ao(t,n,d,r),u=t.memoizedState),(s=Nl||xo(t,n,s,r,f,u,o))?(c||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=o,r=s):("function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Rl(e,t),c=Co(n,o=t.memoizedProps),a.props=c,d=t.pendingProps,f=a.context,u=n.contextType,s=kr,"object"==typeof u&&null!==u&&(s=Sl(u)),(u="function"==typeof(l=n.getDerivedStateFromProps)||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(o!==d||f!==s)&&ko(t,a,r,s),Nl=!1,f=t.memoizedState,a.state=f,Bl(t,r,a,i),Il();var h=t.memoizedState;o!==d||f!==h||Nl||null!==e&&null!==e.dependencies&&_l(e.dependencies)?("function"==typeof l&&(Ao(t,n,l,r),h=t.memoizedState),(c=Nl||xo(t,n,c,r,f,h,s)||null!==e&&null!==e.dependencies&&_l(e.dependencies))?(u||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,h,s),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,h,s)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),a.props=r,a.state=h,a.context=s,r=c):("function"!=typeof a.componentDidUpdate||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,Qo(e,t),r=!!(128&t.flags),a||r?(a=t.stateNode,n=r&&"function"!=typeof n.getDerivedStateFromError?null:a.render(),t.flags|=1,null!==e&&r?(t.child=Ti(t,e.child,null,i),t.child=Ti(t,null,n,i)):Xo(e,t,n,i),t.memoizedState=a.state,e=t.child):e=dl(e,t,i),e}function el(e,t,n,r){return ri(),t.flags|=256,Xo(e,t,n,r),t.child}var tl={dehydrated:null,treeContext:null,retryLane:0};function nl(e){return{baseLanes:e,cachePool:Qi()}}function rl(e,t,n){return e=null!==e?e.childLanes&~n:0,t&&(e|=hu),e}function il(e,t,n){var r,i=t.pendingProps,a=!1,l=!!(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&!!(2&Di.current)),r&&(a=!0,t.flags&=-129),r=!!(32&t.flags),t.flags&=-33,null===e){if(qr){if(a?Ri(t):ki(),qr){var s,u=$r;if(s=u){e:{for(s=u,u=Jr;8!==s.nodeType;){if(!u){u=null;break e}if(null===(s=od(s.nextSibling))){u=null;break e}}u=s}null!==u?(t.memoizedState={dehydrated:u,treeContext:null!==Fr?{id:Wr,overflow:Hr}:null,retryLane:536870912},(s=Ms(18,null,null,0)).stateNode=u,s.return=t,t.child=s,Gr=t,$r=null,s=!0):s=!1}s||Kr(t)}if(null!==(u=t.memoizedState)&&null!==(u=u.dehydrated))return"$!"===u.data?t.lanes=16:t.lanes=536870912,null;Ci(t)}return u=i.children,i=i.fallback,a?(ki(),u=ol({mode:"hidden",children:u},a=t.mode),i=Us(i,a,n,null),u.return=t,i.return=t,u.sibling=i,t.child=u,(a=t.child).memoizedState=nl(n),a.childLanes=rl(e,r,n),t.memoizedState=tl,i):(Ri(t),al(t,u))}if(null!==(s=e.memoizedState)&&null!==(u=s.dehydrated)){if(l)256&t.flags?(Ri(t),t.flags&=-257,t=ll(e,t,n)):null!==t.memoizedState?(ki(),t.child=e.child,t.flags|=128,t=null):(ki(),a=i.fallback,u=t.mode,i=ol({mode:"visible",children:i.children},u),(a=Us(a,u,n,null)).flags|=2,i.return=t,a.return=t,i.sibling=a,t.child=i,Ti(t,e.child,null,n),(i=t.child).memoizedState=nl(n),i.childLanes=rl(e,r,n),t.memoizedState=tl,t=a);else if(Ri(t),"$!"===u.data){if(r=u.nextSibling&&u.nextSibling.dataset)var c=r.dgst;r=c,(i=Error(o(419))).stack="",i.digest=r,ii({value:i,source:null,stack:null}),t=ll(e,t,n)}else if(Yo||El(e,t,n,!1),r=!!(n&e.childLanes),Yo||r){if(null!==(r=eu)){if(42&(i=n&-n))i=1;else switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=16;break;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:i=64;break;case 268435456:i=134217728;break;default:i=0}if(0!==(i=i&(r.suspendedLanes|n)?0:i)&&i!==s.retryLane)throw s.retryLane=i,Ar(e,i),ku(r,0,i),Ho}"$?"===u.data||Yu(),t=ll(e,t,n)}else"$?"===u.data?(t.flags|=128,t.child=e.child,t=oc.bind(null,e),u._reactRetry=t,t=null):(e=s.treeContext,$r=od(u.nextSibling),Gr=t,qr=!0,Qr=null,Jr=!1,null!==e&&(zr[Ur++]=Wr,zr[Ur++]=Hr,zr[Ur++]=Fr,Wr=e.id,Hr=e.overflow,Fr=t),(t=al(t,i.children)).flags|=4096);return t}return a?(ki(),a=i.fallback,u=t.mode,c=(s=e.child).sibling,(i=Bs(s,{mode:"hidden",children:i.children})).subtreeFlags=31457280&s.subtreeFlags,null!==c?a=Bs(c,a):(a=Us(a,u,n,null)).flags|=2,a.return=t,i.return=t,i.sibling=a,t.child=i,i=a,a=t.child,null===(u=e.child.memoizedState)?u=nl(n):(null!==(s=u.cachePool)?(c=zi._currentValue,s=s.parent!==c?{parent:c,pool:c}:s):s=Qi(),u={baseLanes:u.baseLanes|n,cachePool:s}),a.memoizedState=u,a.childLanes=rl(e,r,n),t.memoizedState=tl,i):(Ri(t),e=(n=e.child).sibling,(n=Bs(n,{mode:"visible",children:i.children})).return=t,n.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n)}function al(e,t){return(t=ol({mode:"visible",children:t},e.mode)).return=e,e.child=t}function ol(e,t){return Fs(e,t,0,null)}function ll(e,t,n){return Ti(t,e.child,null,n),(e=al(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function sl(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),yl(e.return,t,n)}function ul(e,t,n,r,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function cl(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(Xo(e,t,r.children,n),2&(r=Di.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&sl(e,n,t);else if(19===e.tag)sl(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}switch(G(Di,r),i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===Mi(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),ul(t,!1,i,n,a);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===Mi(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}ul(t,!0,n,null,a);break;case"together":ul(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function dl(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),cu|=t.lanes,!(n&t.childLanes)){if(null===e)return null;if(El(e,t,n,!1),!(n&t.childLanes))return null}if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=Bs(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Bs(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function fl(e,t){return!!(e.lanes&t)||!(null===(e=e.dependencies)||!_l(e))}function hl(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps)Yo=!0;else{if(!(fl(e,n)||128&t.flags))return Yo=!1,function(e,t,n){switch(t.tag){case 3:Z(t,t.stateNode.containerInfo),bl(0,zi,e.memoizedState.cache),ri();break;case 27:case 5:ee(t);break;case 4:Z(t,t.stateNode.containerInfo);break;case 10:bl(0,t.type,t.memoizedProps.value);break;case 13:var r=t.memoizedState;if(null!==r)return null!==r.dehydrated?(Ri(t),t.flags|=128,null):n&t.child.childLanes?il(e,t,n):(Ri(t),null!==(e=dl(e,t,n))?e.sibling:null);Ri(t);break;case 19:var i=!!(128&e.flags);if((r=!!(n&t.childLanes))||(El(e,t,n,!1),r=!!(n&t.childLanes)),i){if(r)return cl(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),G(Di,Di.current),r)break;return null;case 22:case 23:return t.lanes=0,$o(e,t,n);case 24:bl(0,zi,e.memoizedState.cache)}return dl(e,t,n)}(e,t,n);Yo=!!(131072&e.flags)}else Yo=!1,qr&&1048576&t.flags&&Xr(t,Pr,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var r=t.elementType,i=r._init;if(r=i(r._payload),t.type=r,"function"!=typeof r){if(null!=r){if((i=r.$$typeof)===m){t.tag=11,t=Vo(null,t,r,e,n);break e}if(i===y){t.tag=14,t=jo(null,t,r,e,n);break e}}throw t=L(r)||r,Error(o(306,t,""))}Is(r)?(e=Co(r,e),t.tag=1,t=Ko(null,t,r,e,n)):(t.tag=0,t=Jo(null,t,r,e,n))}return t;case 0:return Jo(e,t,t.type,t.pendingProps,n);case 1:return Ko(e,t,r=t.type,i=Co(r,t.pendingProps),n);case 3:e:{if(Z(t,t.stateNode.containerInfo),null===e)throw Error(o(387));var a=t.pendingProps;r=(i=t.memoizedState).element,Rl(e,t),Bl(t,a,null,n);var l=t.memoizedState;if(a=l.cache,bl(0,zi,a),a!==i.cache&&Tl(t,[zi],n,!0),Il(),a=l.element,i.isDehydrated){if(i={element:a,isDehydrated:!1,cache:l.cache},t.updateQueue.baseState=i,t.memoizedState=i,256&t.flags){t=el(e,t,a,n);break e}if(a!==r){ii(r=Dr(Error(o(424)),t)),t=el(e,t,a,n);break e}for($r=od(t.stateNode.containerInfo.firstChild),Gr=t,qr=!0,Qr=null,Jr=!0,n=Ei(t,null,a,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(ri(),a===r){t=dl(e,t,n);break e}Xo(e,t,a,n)}t=t.child}return t;case 26:return Qo(e,t),null===e?(n=gd(t.type,null,t.pendingProps,null))?t.memoizedState=n:qr||(n=t.type,e=t.pendingProps,(r=$c(Q.current).createElement(n))[Pe]=t,r[ze]=e,Vc(r,n,e),Qe(r),t.stateNode=r):t.memoizedState=gd(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ee(t),null===e&&qr&&(r=t.stateNode=sd(t.type,t.pendingProps,Q.current),Gr=t,Jr=!0,$r=od(r.firstChild)),r=t.pendingProps.children,null!==e||qr?Xo(e,t,r,n):t.child=Ti(t,null,r,n),Qo(e,t),t.child;case 5:return null===e&&qr&&((i=r=$r)&&(null!==(r=function(e,t,n,r){for(;1===e.nodeType;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&("INPUT"!==e.nodeName||"hidden"!==e.type))break}else if(r){if(!e[Xe])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if("stylesheet"===(a=e.getAttribute("rel"))&&e.hasAttribute("data-precedence"))break;if(a!==i.rel||e.getAttribute("href")!==(null==i.href?null:i.href)||e.getAttribute("crossorigin")!==(null==i.crossOrigin?null:i.crossOrigin)||e.getAttribute("title")!==(null==i.title?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(((a=e.getAttribute("src"))!==(null==i.src?null:i.src)||e.getAttribute("type")!==(null==i.type?null:i.type)||e.getAttribute("crossorigin")!==(null==i.crossOrigin?null:i.crossOrigin))&&a&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else{if("input"!==t||"hidden"!==e.type)return e;var a=null==i.name?null:""+i.name;if("hidden"===i.type&&e.getAttribute("name")===a)return e}if(null===(e=od(e.nextSibling)))break}return null}(r,t.type,t.pendingProps,Jr))?(t.stateNode=r,Gr=t,$r=od(r.firstChild),Jr=!1,i=!0):i=!1),i||Kr(t)),ee(t),i=t.type,a=t.pendingProps,l=null!==e?e.memoizedProps:null,r=a.children,Jc(i,a)?r=null:null!==l&&Jc(i,l)&&(t.flags|=32),null!==t.memoizedState&&(i=ca(e,t,ha,null,null,n),Id._currentValue=i),Qo(e,t),Xo(e,t,r,n),t.child;case 6:return null===e&&qr&&((e=n=$r)&&(null!==(n=function(e,t,n){if(""===t)return null;for(;3!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!n)return null;if(null===(e=od(e.nextSibling)))return null}return e}(n,t.pendingProps,Jr))?(t.stateNode=n,Gr=t,$r=null,e=!0):e=!1),e||Kr(t)),null;case 13:return il(e,t,n);case 4:return Z(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Ti(t,null,r,n):Xo(e,t,r,n),t.child;case 11:return Vo(e,t,t.type,t.pendingProps,n);case 7:return Xo(e,t,t.pendingProps,n),t.child;case 8:case 12:return Xo(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,bl(0,t.type,r.value),Xo(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,wl(t),r=r(i=Sl(i)),t.flags|=1,Xo(e,t,r,n),t.child;case 14:return jo(e,t,t.type,t.pendingProps,n);case 15:return Go(e,t,t.type,t.pendingProps,n);case 19:return cl(e,t,n);case 22:return $o(e,t,n);case 24:return wl(t),r=Sl(zi),null===e?(null===(i=$i())&&(i=eu,a=Ui(),i.pooledCache=a,a.refCount++,null!==a&&(i.pooledCacheLanes|=n),i=a),t.memoizedState={parent:r,cache:i},Al(t),bl(0,zi,i)):(!!(e.lanes&n)&&(Rl(e,t),Bl(t,null,null,n),Il()),i=e.memoizedState,a=t.memoizedState,i.parent!==r?(i={parent:r,cache:r},t.memoizedState=i,0===t.lanes&&(t.memoizedState=t.updateQueue.baseState=i),bl(0,zi,r)):(r=a.cache,bl(0,zi,r),r!==i.cache&&Tl(t,[zi],n,!0))),Xo(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}var pl=V(null),gl=null,ml=null;function bl(e,t,n){G(pl,t._currentValue),t._currentValue=n}function vl(e){e._currentValue=pl.current,j(pl)}function yl(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Tl(e,t,n,r){var i=e.child;for(null!==i&&(i.return=e);null!==i;){var a=i.dependencies;if(null!==a){var l=i.child;a=a.firstContext;e:for(;null!==a;){var s=a;a=i;for(var u=0;u<t.length;u++)if(s.context===t[u]){a.lanes|=n,null!==(s=a.alternate)&&(s.lanes|=n),yl(a.return,n,e),r||(l=null);break e}a=s.next}}else if(18===i.tag){if(null===(l=i.return))throw Error(o(341));l.lanes|=n,null!==(a=l.alternate)&&(a.lanes|=n),yl(l,n,e),l=null}else l=i.child;if(null!==l)l.return=i;else for(l=i;null!==l;){if(l===e){l=null;break}if(null!==(i=l.sibling)){i.return=l.return,l=i;break}l=l.return}i=l}}function El(e,t,n,r){e=null;for(var i=t,a=!1;null!==i;){if(!a)if(524288&i.flags)a=!0;else if(262144&i.flags)break;if(10===i.tag){var l=i.alternate;if(null===l)throw Error(o(387));if(null!==(l=l.memoizedProps)){var s=i.type;Gn(i.pendingProps.value,l.value)||(null!==e?e.push(s):e=[s])}}else if(i===J.current){if(null===(l=i.alternate))throw Error(o(387));l.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(null!==e?e.push(Id):e=[Id])}i=i.return}null!==e&&Tl(t,e,n,r),t.flags|=262144}function _l(e){for(e=e.firstContext;null!==e;){if(!Gn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function wl(e){gl=e,ml=null,null!==(e=e.dependencies)&&(e.firstContext=null)}function Sl(e){return Ll(gl,e)}function Ol(e,t){return null===gl&&wl(e),Ll(e,t)}function Ll(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},null===ml){if(null===e)throw Error(o(308));ml=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ml=ml.next=t;return n}var Nl=!1;function Al(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Rl(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function xl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function kl(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&Ks){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=xr(e),Rr(e,null,n),t}return Lr(e,r,t,n),xr(e)}function Cl(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194176&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,De(e,n)}}function Dl(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};null===a?i=a=o:a=a.next=o,n=n.next}while(null!==n);null===a?i=a=t:a=a.next=t}else i=a=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ml=!1;function Il(){if(Ml&&null!==Xi)throw Xi}function Bl(e,t,n,r){Ml=!1;var i=e.updateQueue;Nl=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,l=i.shared.pending;if(null!==l){i.shared.pending=null;var s=l,u=s.next;s.next=null,null===o?a=u:o.next=u,o=s;var c=e.alternate;null!==c&&(l=(c=c.updateQueue).lastBaseUpdate)!==o&&(null===l?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=s)}if(null!==a){var d=i.baseState;for(o=0,c=u=s=null,l=a;;){var f=-536870913&l.lane,h=f!==l.lane;if(h?(nu&f)===f:(r&f)===f){0!==f&&f===Yi&&(Ml=!0),null!==c&&(c=c.next={lane:0,tag:l.tag,payload:l.payload,callback:null,next:null});e:{var p=e,g=l;f=t;var m=n;switch(g.tag){case 1:if("function"==typeof(p=g.payload)){d=p.call(m,d,f);break e}d=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null==(f="function"==typeof(p=g.payload)?p.call(m,d,f):p))break e;d=x({},d,f);break e;case 2:Nl=!0}}null!==(f=l.callback)&&(e.flags|=64,h&&(e.flags|=8192),null===(h=i.callbacks)?i.callbacks=[f]:h.push(f))}else h={lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},null===c?(u=c=h,s=d):c=c.next=h,o|=f;if(null===(l=l.next)){if(null===(l=i.shared.pending))break;l=(h=l).next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}null===c&&(s=d),i.baseState=s,i.firstBaseUpdate=u,i.lastBaseUpdate=c,null===a&&(i.shared.lanes=0),cu|=o,e.lanes=o,e.memoizedState=d}}function Pl(e,t){if("function"!=typeof e)throw Error(o(191,e));e.call(t)}function zl(e,t){var n=e.callbacks;if(null!==n)for(e.callbacks=null,e=0;e<n.length;e++)Pl(n[e],t)}function Ul(e,t){try{var n=t.updateQueue,r=null!==n?n.lastEffect:null;if(null!==r){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){nc(t,t.return,e)}}function Fl(e,t,n){try{var r=t.updateQueue,i=null!==r?r.lastEffect:null;if(null!==i){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,l=o.destroy;if(void 0!==l){o.destroy=void 0,i=t;var s=n;try{l()}catch(e){nc(i,s,e)}}}r=r.next}while(r!==a)}}catch(e){nc(t,t.return,e)}}function Wl(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{zl(t,n)}catch(t){nc(e,e.return,t)}}}function Hl(e,t,n){n.props=Co(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){nc(e,t,n)}}function Yl(e,t){try{var n=e.ref;if(null!==n){var r=e.stateNode;switch(e.tag){case 26:case 27:case 5:var i=r;break;default:i=r}"function"==typeof n?e.refCleanup=n(i):n.current=i}}catch(n){nc(e,t,n)}}function Xl(e,t){var n=e.ref,r=e.refCleanup;if(null!==n)if("function"==typeof r)try{r()}catch(n){nc(e,t,n)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"==typeof n)try{n(null)}catch(n){nc(e,t,n)}else n.current=null}function Vl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){nc(e,e.return,t)}}function jl(e,t,n){try{var r=e.stateNode;!function(e,t,n,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,a=null,l=null,s=null,u=null,c=null,d=null;for(p in n){var f=n[p];if(n.hasOwnProperty(p)&&null!=f)switch(p){case"checked":case"value":break;case"defaultValue":u=f;default:r.hasOwnProperty(p)||Yc(e,t,p,null,r,f)}}for(var h in r){var p=r[h];if(f=n[h],r.hasOwnProperty(h)&&(null!=p||null!=f))switch(h){case"type":a=p;break;case"name":i=p;break;case"checked":c=p;break;case"defaultChecked":d=p;break;case"value":l=p;break;case"defaultValue":s=p;break;case"children":case"dangerouslySetInnerHTML":if(null!=p)throw Error(o(137,t));break;default:p!==f&&Yc(e,t,h,p,r,f)}}return void gt(e,l,s,u,c,d,a,i);case"select":for(a in p=l=s=h=null,n)if(u=n[a],n.hasOwnProperty(a)&&null!=u)switch(a){case"value":break;case"multiple":p=u;default:r.hasOwnProperty(a)||Yc(e,t,a,null,r,u)}for(i in r)if(a=r[i],u=n[i],r.hasOwnProperty(i)&&(null!=a||null!=u))switch(i){case"value":h=a;break;case"defaultValue":s=a;break;case"multiple":l=a;default:a!==u&&Yc(e,t,i,a,r,u)}return t=s,n=l,r=p,void(null!=h?vt(e,!!n,h,!1):!!r!=!!n&&(null!=t?vt(e,!!n,t,!0):vt(e,!!n,n?[]:"",!1)));case"textarea":for(s in p=h=null,n)if(i=n[s],n.hasOwnProperty(s)&&null!=i&&!r.hasOwnProperty(s))switch(s){case"value":case"children":break;default:Yc(e,t,s,null,r,i)}for(l in r)if(i=r[l],a=n[l],r.hasOwnProperty(l)&&(null!=i||null!=a))switch(l){case"value":h=i;break;case"defaultValue":p=i;break;case"children":break;case"dangerouslySetInnerHTML":if(null!=i)throw Error(o(91));break;default:i!==a&&Yc(e,t,l,i,r,a)}return void yt(e,h,p);case"option":for(var g in n)h=n[g],n.hasOwnProperty(g)&&null!=h&&!r.hasOwnProperty(g)&&("selected"===g?e.selected=!1:Yc(e,t,g,null,r,h));for(u in r)h=r[u],p=n[u],!r.hasOwnProperty(u)||h===p||null==h&&null==p||("selected"===u?e.selected=h&&"function"!=typeof h&&"symbol"!=typeof h:Yc(e,t,u,h,r,p));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var m in n)h=n[m],n.hasOwnProperty(m)&&null!=h&&!r.hasOwnProperty(m)&&Yc(e,t,m,null,r,h);for(c in r)if(h=r[c],p=n[c],r.hasOwnProperty(c)&&h!==p&&(null!=h||null!=p))switch(c){case"children":case"dangerouslySetInnerHTML":if(null!=h)throw Error(o(137,t));break;default:Yc(e,t,c,h,r,p)}return;default:if(Ot(t)){for(var b in n)h=n[b],n.hasOwnProperty(b)&&void 0!==h&&!r.hasOwnProperty(b)&&Xc(e,t,b,void 0,r,h);for(d in r)h=r[d],p=n[d],!r.hasOwnProperty(d)||h===p||void 0===h&&void 0===p||Xc(e,t,d,h,r,p);return}}for(var v in n)h=n[v],n.hasOwnProperty(v)&&null!=h&&!r.hasOwnProperty(v)&&Yc(e,t,v,null,r,h);for(f in r)h=r[f],p=n[f],!r.hasOwnProperty(f)||h===p||null==h&&null==p||Yc(e,t,f,h,r,p)}(r,e.type,n,t),r[ze]=t}catch(t){nc(e,e.return,t)}}function Gl(e){return 5===e.tag||3===e.tag||26===e.tag||27===e.tag||4===e.tag}function $l(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Gl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&27!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ql(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Hc));else if(4!==r&&27!==r&&null!==(e=e.child))for(ql(e,t,n),e=e.sibling;null!==e;)ql(e,t,n),e=e.sibling}function Ql(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&27!==r&&null!==(e=e.child))for(Ql(e,t,n),e=e.sibling;null!==e;)Ql(e,t,n),e=e.sibling}var Jl=!1,Zl=!1,Kl=!1,es="function"==typeof WeakSet?WeakSet:Set,ts=null,ns=!1;function rs(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:ms(e,n),4&r&&Ul(5,n);break;case 1:if(ms(e,n),4&r)if(e=n.stateNode,null===t)try{e.componentDidMount()}catch(e){nc(n,n.return,e)}else{var i=Co(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){nc(n,n.return,e)}}64&r&&Wl(n),512&r&&Yl(n,n.return);break;case 3:if(ms(e,n),64&r&&null!==(r=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 27:case 5:case 1:e=n.child.stateNode}try{zl(r,e)}catch(e){nc(n,n.return,e)}}break;case 26:ms(e,n),512&r&&Yl(n,n.return);break;case 27:case 5:ms(e,n),null===t&&4&r&&Vl(n),512&r&&Yl(n,n.return);break;case 12:default:ms(e,n);break;case 13:ms(e,n),4&r&&us(e,n);break;case 22:if(!(i=null!==n.memoizedState||Jl)){t=null!==t&&null!==t.memoizedState||Zl;var a=Jl,o=Zl;Jl=i,(Zl=t)&&!o?vs(e,n,!!(8772&n.subtreeFlags)):ms(e,n),Jl=a,Zl=o}512&r&&("manual"===n.memoizedProps.mode?Yl(n,n.return):Xl(n,n.return))}}function is(e){var t=e.alternate;null!==t&&(e.alternate=null,is(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&Ve(t),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var as=null,os=!1;function ls(e,t,n){for(n=n.child;null!==n;)ss(e,t,n),n=n.sibling}function ss(e,t,n){if(be&&"function"==typeof be.onCommitFiberUnmount)try{be.onCommitFiberUnmount(me,n)}catch(e){}switch(n.tag){case 26:Zl||Xl(n,t),ls(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode).parentNode.removeChild(n);break;case 27:Zl||Xl(n,t);var r=as,i=os;for(as=n.stateNode,ls(e,t,n),t=(n=n.stateNode).attributes;t.length;)n.removeAttributeNode(t[0]);Ve(n),as=r,os=i;break;case 5:Zl||Xl(n,t);case 6:i=as;var a=os;if(as=null,ls(e,t,n),os=a,null!==(as=i))if(os)try{e=as,r=n.stateNode,8===e.nodeType?e.parentNode.removeChild(r):e.removeChild(r)}catch(e){nc(n,t,e)}else try{as.removeChild(n.stateNode)}catch(e){nc(n,t,e)}break;case 18:null!==as&&(os?(t=as,n=n.stateNode,8===t.nodeType?id(t.parentNode,n):1===t.nodeType&&id(t,n),hf(t)):id(as,n.stateNode));break;case 4:r=as,i=os,as=n.stateNode.containerInfo,os=!0,ls(e,t,n),as=r,os=i;break;case 0:case 11:case 14:case 15:Zl||Fl(2,n,t),Zl||Fl(4,n,t),ls(e,t,n);break;case 1:Zl||(Xl(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount&&Hl(n,t,r)),ls(e,t,n);break;case 21:ls(e,t,n);break;case 22:Zl||Xl(n,t),Zl=(r=Zl)||null!==n.memoizedState,ls(e,t,n),Zl=r;break;default:ls(e,t,n)}}function us(e,t){if(null===t.memoizedState&&null!==(e=t.alternate)&&null!==(e=e.memoizedState)&&null!==(e=e.dehydrated))try{hf(e)}catch(e){nc(t,t.return,e)}}function cs(e,t){var n=function(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return null===t&&(t=e.stateNode=new es),t;case 22:return null===(t=(e=e.stateNode)._retryCache)&&(t=e._retryCache=new es),t;default:throw Error(o(435,e.tag))}}(e);t.forEach((function(t){var r=lc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}function ds(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r],a=e,l=t,s=l;e:for(;null!==s;){switch(s.tag){case 27:case 5:as=s.stateNode,os=!1;break e;case 3:case 4:as=s.stateNode.containerInfo,os=!0;break e}s=s.return}if(null===as)throw Error(o(160));ss(a,l,i),as=null,os=!1,null!==(a=i.alternate)&&(a.return=null),i.return=null}if(13878&t.subtreeFlags)for(t=t.child;null!==t;)hs(t,e),t=t.sibling}var fs=null;function hs(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ds(t,e),ps(e),4&r&&(Fl(3,e,e.return),Ul(3,e),Fl(5,e,e.return));break;case 1:ds(t,e),ps(e),512&r&&(Zl||null===n||Xl(n,n.return)),64&r&&Jl&&null!==(e=e.updateQueue)&&null!==(r=e.callbacks)&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=null===n?r:n.concat(r));break;case 26:var i=fs;if(ds(t,e),ps(e),512&r&&(Zl||null===n||Xl(n,n.return)),4&r){var a=null!==n?n.memoizedState:null;if(r=e.memoizedState,null===n)if(null===r)if(null===e.stateNode){e:{r=e.type,n=e.memoizedProps,i=i.ownerDocument||i;t:switch(r){case"title":(!(a=i.getElementsByTagName("title")[0])||a[Xe]||a[Pe]||"http://www.w3.org/2000/svg"===a.namespaceURI||a.hasAttribute("itemprop"))&&(a=i.createElement(r),i.head.insertBefore(a,i.querySelector("head > title"))),Vc(a,r,n),a[Pe]=e,Qe(a),r=a;break e;case"link":var l=Ld("link","href",i).get(r+(n.href||""));if(l)for(var s=0;s<l.length;s++)if((a=l[s]).getAttribute("href")===(null==n.href?null:n.href)&&a.getAttribute("rel")===(null==n.rel?null:n.rel)&&a.getAttribute("title")===(null==n.title?null:n.title)&&a.getAttribute("crossorigin")===(null==n.crossOrigin?null:n.crossOrigin)){l.splice(s,1);break t}Vc(a=i.createElement(r),r,n),i.head.appendChild(a);break;case"meta":if(l=Ld("meta","content",i).get(r+(n.content||"")))for(s=0;s<l.length;s++)if((a=l[s]).getAttribute("content")===(null==n.content?null:""+n.content)&&a.getAttribute("name")===(null==n.name?null:n.name)&&a.getAttribute("property")===(null==n.property?null:n.property)&&a.getAttribute("http-equiv")===(null==n.httpEquiv?null:n.httpEquiv)&&a.getAttribute("charset")===(null==n.charSet?null:n.charSet)){l.splice(s,1);break t}Vc(a=i.createElement(r),r,n),i.head.appendChild(a);break;default:throw Error(o(468,r))}a[Pe]=e,Qe(a),r=a}e.stateNode=r}else Nd(i,e.type,e.stateNode);else e.stateNode=Ed(i,r,e.memoizedProps);else a!==r?(null===a?null!==n.stateNode&&(n=n.stateNode).parentNode.removeChild(n):a.count--,null===r?Nd(i,e.type,e.stateNode):Ed(i,r,e.memoizedProps)):null===r&&null!==e.stateNode&&jl(e,e.memoizedProps,n.memoizedProps)}break;case 27:if(4&r&&null===e.alternate){i=e.stateNode,a=e.memoizedProps;try{for(var u=i.firstChild;u;){var c=u.nextSibling,d=u.nodeName;u[Xe]||"HEAD"===d||"BODY"===d||"SCRIPT"===d||"STYLE"===d||"LINK"===d&&"stylesheet"===u.rel.toLowerCase()||i.removeChild(u),u=c}for(var f=e.type,h=i.attributes;h.length;)i.removeAttributeNode(h[0]);Vc(i,f,a),i[Pe]=e,i[ze]=a}catch(t){nc(e,e.return,t)}}case 5:if(ds(t,e),ps(e),512&r&&(Zl||null===n||Xl(n,n.return)),32&e.flags){i=e.stateNode;try{Et(i,"")}catch(t){nc(e,e.return,t)}}4&r&&null!=e.stateNode&&jl(e,i=e.memoizedProps,null!==n?n.memoizedProps:i),1024&r&&(Kl=!0);break;case 6:if(ds(t,e),ps(e),4&r){if(null===e.stateNode)throw Error(o(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){nc(e,e.return,t)}}break;case 3:if(Od=null,i=fs,fs=dd(t.containerInfo),ds(t,e),fs=i,ps(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{hf(t.containerInfo)}catch(t){nc(e,e.return,t)}Kl&&(Kl=!1,gs(e));break;case 4:r=fs,fs=dd(e.stateNode.containerInfo),ds(t,e),ps(e),fs=r;break;case 12:ds(t,e),ps(e);break;case 13:ds(t,e),ps(e),8192&e.child.flags&&null!==e.memoizedState!=(null!==n&&null!==n.memoizedState)&&(vu=le()),4&r&&null!==(r=e.updateQueue)&&(e.updateQueue=null,cs(e,r));break;case 22:if(512&r&&(Zl||null===n||Xl(n,n.return)),u=null!==e.memoizedState,c=null!==n&&null!==n.memoizedState,Jl=(d=Jl)||u,Zl=(f=Zl)||c,ds(t,e),Zl=f,Jl=d,ps(e),(t=e.stateNode)._current=e,t._visibility&=-3,t._visibility|=2&t._pendingVisibility,8192&r&&(t._visibility=u?-2&t._visibility:1|t._visibility,u&&(t=Jl||Zl,null===n||c||t||bs(e)),null===e.memoizedProps||"manual"!==e.memoizedProps.mode))e:for(n=null,t=e;;){if(5===t.tag||26===t.tag||27===t.tag){if(null===n){c=n=t;try{if(i=c.stateNode,u)"function"==typeof(a=i.style).setProperty?a.setProperty("display","none","important"):a.display="none";else{l=c.stateNode;var p=null!=(s=c.memoizedProps.style)&&s.hasOwnProperty("display")?s.display:null;l.style.display=null==p||"boolean"==typeof p?"":(""+p).trim()}}catch(e){nc(c,c.return,e)}}}else if(6===t.tag){if(null===n){c=t;try{c.stateNode.nodeValue=u?"":c.memoizedProps}catch(e){nc(c,c.return,e)}}}else if((22!==t.tag&&23!==t.tag||null===t.memoizedState||t===e)&&null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;null===t.sibling;){if(null===t.return||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}4&r&&null!==(r=e.updateQueue)&&null!==(n=r.retryQueue)&&(r.retryQueue=null,cs(e,n));break;case 19:ds(t,e),ps(e),4&r&&null!==(r=e.updateQueue)&&(e.updateQueue=null,cs(e,r));break;case 21:break;default:ds(t,e),ps(e)}}function ps(e){var t=e.flags;if(2&t){try{if(27!==e.tag){e:{for(var n=e.return;null!==n;){if(Gl(n)){var r=n;break e}n=n.return}throw Error(o(160))}switch(r.tag){case 27:var i=r.stateNode;Ql(e,$l(e),i);break;case 5:var a=r.stateNode;32&r.flags&&(Et(a,""),r.flags&=-33),Ql(e,$l(e),a);break;case 3:case 4:var l=r.stateNode.containerInfo;ql(e,$l(e),l);break;default:throw Error(o(161))}}}catch(t){nc(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function gs(e){if(1024&e.subtreeFlags)for(e=e.child;null!==e;){var t=e;gs(t),5===t.tag&&1024&t.flags&&t.stateNode.reset(),e=e.sibling}}function ms(e,t){if(8772&t.subtreeFlags)for(t=t.child;null!==t;)rs(e,t.alternate,t),t=t.sibling}function bs(e){for(e=e.child;null!==e;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Fl(4,t,t.return),bs(t);break;case 1:Xl(t,t.return);var n=t.stateNode;"function"==typeof n.componentWillUnmount&&Hl(t,t.return,n),bs(t);break;case 26:case 27:case 5:Xl(t,t.return),bs(t);break;case 22:Xl(t,t.return),null===t.memoizedState&&bs(t);break;default:bs(t)}e=e.sibling}}function vs(e,t,n){for(n=n&&!!(8772&t.subtreeFlags),t=t.child;null!==t;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:vs(i,a,n),Ul(4,a);break;case 1:if(vs(i,a,n),"function"==typeof(i=(r=a).stateNode).componentDidMount)try{i.componentDidMount()}catch(e){nc(r,r.return,e)}if(null!==(i=(r=a).updateQueue)){var l=r.stateNode;try{var s=i.shared.hiddenCallbacks;if(null!==s)for(i.shared.hiddenCallbacks=null,i=0;i<s.length;i++)Pl(s[i],l)}catch(e){nc(r,r.return,e)}}n&&64&o&&Wl(a),Yl(a,a.return);break;case 26:case 27:case 5:vs(i,a,n),n&&null===r&&4&o&&Vl(a),Yl(a,a.return);break;case 12:default:vs(i,a,n);break;case 13:vs(i,a,n),n&&4&o&&us(i,a);break;case 22:null===a.memoizedState&&vs(i,a,n),Yl(a,a.return)}t=t.sibling}}function ys(e,t){var n=null;null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),e=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(e=t.memoizedState.cachePool.pool),e!==n&&(null!=e&&e.refCount++,null!=n&&Fi(n))}function Ts(e,t){e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&Fi(e))}function Es(e,t,n,r){if(10256&t.subtreeFlags)for(t=t.child;null!==t;)_s(e,t,n,r),t=t.sibling}function _s(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Es(e,t,n,r),2048&i&&Ul(9,t);break;case 3:Es(e,t,n,r),2048&i&&(e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&Fi(e)));break;case 12:if(2048&i){Es(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,l=a.onPostCommit;"function"==typeof l&&l(o,null===t.alternate?"mount":"update",e.passiveEffectDuration,-0)}catch(e){nc(t,t.return,e)}}else Es(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,null!==t.memoizedState?4&a._visibility?Es(e,t,n,r):Ss(e,t):4&a._visibility?Es(e,t,n,r):(a._visibility|=4,ws(e,t,n,r,!!(10256&t.subtreeFlags))),2048&i&&ys(t.alternate,t);break;case 24:Es(e,t,n,r),2048&i&&Ts(t.alternate,t);break;default:Es(e,t,n,r)}}function ws(e,t,n,r,i){for(i=i&&!!(10256&t.subtreeFlags),t=t.child;null!==t;){var a=e,o=t,l=n,s=r,u=o.flags;switch(o.tag){case 0:case 11:case 15:ws(a,o,l,s,i),Ul(8,o);break;case 23:break;case 22:var c=o.stateNode;null!==o.memoizedState?4&c._visibility?ws(a,o,l,s,i):Ss(a,o):(c._visibility|=4,ws(a,o,l,s,i)),i&&2048&u&&ys(o.alternate,o);break;case 24:ws(a,o,l,s,i),i&&2048&u&&Ts(o.alternate,o);break;default:ws(a,o,l,s,i)}t=t.sibling}}function Ss(e,t){if(10256&t.subtreeFlags)for(t=t.child;null!==t;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Ss(n,r),2048&i&&ys(r.alternate,r);break;case 24:Ss(n,r),2048&i&&Ts(r.alternate,r);break;default:Ss(n,r)}t=t.sibling}}var Os=8192;function Ls(e){if(e.subtreeFlags&Os)for(e=e.child;null!==e;)Ns(e),e=e.sibling}function Ns(e){switch(e.tag){case 26:Ls(e),e.flags&Os&&null!==e.memoizedState&&function(e,t,n){if(null===Rd)throw Error(o(475));var r=Rd;if(!("stylesheet"!==t.type||"string"==typeof n.media&&!1===matchMedia(n.media).matches||4&t.state.loading)){if(null===t.instance){var i=md(n.href),a=e.querySelector(bd(i));if(a)return null!==(e=a._p)&&"object"==typeof e&&"function"==typeof e.then&&(r.count++,r=kd.bind(r),e.then(r,r)),t.state.loading|=4,t.instance=a,void Qe(a);a=e.ownerDocument||e,n=vd(n),(i=ud.get(i))&&wd(n,i),Qe(a=a.createElement("link"));var l=a;l._p=new Promise((function(e,t){l.onload=e,l.onerror=t})),Vc(a,"link",n),t.instance=a}null===r.stylesheets&&(r.stylesheets=new Map),r.stylesheets.set(t,e),(e=t.state.preload)&&!(3&t.state.loading)&&(r.count++,t=kd.bind(r),e.addEventListener("load",t),e.addEventListener("error",t))}}(fs,e.memoizedState,e.memoizedProps);break;case 5:default:Ls(e);break;case 3:case 4:var t=fs;fs=dd(e.stateNode.containerInfo),Ls(e),fs=t;break;case 22:null===e.memoizedState&&(null!==(t=e.alternate)&&null!==t.memoizedState?(t=Os,Os=16777216,Ls(e),Os=t):Ls(e))}}function As(e){var t=e.alternate;if(null!==t&&null!==(e=t.child)){t.child=null;do{t=e.sibling,e.sibling=null,e=t}while(null!==e)}}function Rs(e){var t=e.deletions;if(16&e.flags){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];ts=r,Cs(r,e)}As(e)}if(10256&e.subtreeFlags)for(e=e.child;null!==e;)xs(e),e=e.sibling}function xs(e){switch(e.tag){case 0:case 11:case 15:Rs(e),2048&e.flags&&Fl(9,e,e.return);break;case 3:case 12:default:Rs(e);break;case 22:var t=e.stateNode;null!==e.memoizedState&&4&t._visibility&&(null===e.return||13!==e.return.tag)?(t._visibility&=-5,ks(e)):Rs(e)}}function ks(e){var t=e.deletions;if(16&e.flags){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];ts=r,Cs(r,e)}As(e)}for(e=e.child;null!==e;){switch((t=e).tag){case 0:case 11:case 15:Fl(8,t,t.return),ks(t);break;case 22:4&(n=t.stateNode)._visibility&&(n._visibility&=-5,ks(t));break;default:ks(t)}e=e.sibling}}function Cs(e,t){for(;null!==ts;){var n=ts;switch(n.tag){case 0:case 11:case 15:Fl(8,n,t);break;case 23:case 22:if(null!==n.memoizedState&&null!==n.memoizedState.cachePool){var r=n.memoizedState.cachePool.pool;null!=r&&r.refCount++}break;case 24:Fi(n.memoizedState.cache)}if(null!==(r=n.child))r.return=n,ts=r;else e:for(n=e;null!==ts;){var i=(r=ts).sibling,a=r.return;if(is(r),r===n){ts=null;break e}if(null!==i){i.return=a,ts=i;break e}ts=a}}}function Ds(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ms(e,t,n,r){return new Ds(e,t,n,r)}function Is(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Bs(e,t){var n=e.alternate;return null===n?((n=Ms(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=31457280&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Ps(e,t){e.flags&=31457282;var n=e.alternate;return null===n?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function zs(e,t,n,r,i,a){var l=0;if(r=e,"function"==typeof e)Is(e)&&(l=1);else if("string"==typeof e)l=function(e,t,n){if(1===n||null!=t.itemProp)return!1;switch(e){case"meta":case"title":return!0;case"style":if("string"!=typeof t.precedence||"string"!=typeof t.href||""===t.href)break;return!0;case"link":if("string"!=typeof t.rel||"string"!=typeof t.href||""===t.href||t.onLoad||t.onError)break;return"stylesheet"!==t.rel||(e=t.disabled,"string"==typeof t.precedence&&null==e);case"script":if(t.async&&"function"!=typeof t.async&&"symbol"!=typeof t.async&&!t.onLoad&&!t.onError&&t.src&&"string"==typeof t.src)return!0}return!1}(e,n,$.current)?26:"html"===e||"head"===e||"body"===e?27:5;else e:switch(e){case c:return Us(n.children,i,a,t);case d:l=8,i|=24;break;case f:return(e=Ms(12,n,t,2|i)).elementType=f,e.lanes=a,e;case b:return(e=Ms(13,n,t,i)).elementType=b,e.lanes=a,e;case v:return(e=Ms(19,n,t,i)).elementType=v,e.lanes=a,e;case E:return Fs(n,i,a,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case h:case g:l=10;break e;case p:l=9;break e;case m:l=11;break e;case y:l=14;break e;case T:l=16,r=null;break e}l=29,n=Error(o(130,null===e?"null":typeof e,"")),r=null}return(t=Ms(l,n,t,i)).elementType=e,t.type=r,t.lanes=a,t}function Us(e,t,n,r){return(e=Ms(7,e,r,t)).lanes=n,e}function Fs(e,t,n,r){(e=Ms(22,e,r,t)).elementType=E,e.lanes=n;var i={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var e=i._current;if(null===e)throw Error(o(456));if(!(2&i._pendingVisibility)){var t=Ar(e,2);null!==t&&(i._pendingVisibility|=2,ku(t,0,2))}},attach:function(){var e=i._current;if(null===e)throw Error(o(456));if(2&i._pendingVisibility){var t=Ar(e,2);null!==t&&(i._pendingVisibility&=-3,ku(t,0,2))}}};return e.stateNode=i,e}function Ws(e,t,n){return(e=Ms(6,e,null,t)).lanes=n,e}function Hs(e,t,n){return(t=Ms(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Ys(e){e.flags|=4}function Xs(e,t){if("stylesheet"!==t.type||4&t.state.loading)e.flags&=-16777217;else if(e.flags|=16777216,!Ad(t)){if(null!==(t=Ni.current)&&((4194176&nu)===nu?null!==Ai:(62914560&nu)!==nu&&!(536870912&nu)||t!==Ai))throw di=li,oi;e.flags|=8192}}function Vs(e,t){null!==t&&(e.flags|=4),16384&e.flags&&(t=22!==e.tag?Re():536870912,e.lanes|=t,pu|=t)}function js(e,t){if(!qr)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Gs(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=31457280&i.subtreeFlags,r|=31457280&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function $s(e,t,n){var r=t.pendingProps;switch(jr(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:case 1:return Gs(t),null;case 3:return n=t.stateNode,r=null,null!==e&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),vl(zi),K(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||(ni(t)?Ys(t):null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==Qr&&(Du(Qr),Qr=null))),Gs(t),null;case 26:return n=t.memoizedState,null===e?(Ys(t),null!==n?(Gs(t),Xs(t,n)):(Gs(t),t.flags&=-16777217)):n?n!==e.memoizedState?(Ys(t),Gs(t),Xs(t,n)):(Gs(t),t.flags&=-16777217):(e.memoizedProps!==r&&Ys(t),Gs(t),t.flags&=-16777217),null;case 27:te(t),n=Q.current;var i=t.type;if(null!==e&&null!=t.stateNode)e.memoizedProps!==r&&Ys(t);else{if(!r){if(null===t.stateNode)throw Error(o(166));return Gs(t),null}e=$.current,ni(t)?ei(t):(e=sd(i,r,n),t.stateNode=e,Ys(t))}return Gs(t),null;case 5:if(te(t),n=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==r&&Ys(t);else{if(!r){if(null===t.stateNode)throw Error(o(166));return Gs(t),null}if(e=$.current,ni(t))ei(t);else{switch(i=$c(Q.current),e){case 1:e=i.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:e=i.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":e=i.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":e=i.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":(e=i.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e="string"==typeof r.is?i.createElement("select",{is:r.is}):i.createElement("select"),r.multiple?e.multiple=!0:r.size&&(e.size=r.size);break;default:e="string"==typeof r.is?i.createElement(n,{is:r.is}):i.createElement(n)}}e[Pe]=t,e[ze]=r;e:for(i=t.child;null!==i;){if(5===i.tag||6===i.tag)e.appendChild(i.stateNode);else if(4!==i.tag&&27!==i.tag&&null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break e;for(;null===i.sibling;){if(null===i.return||i.return===t)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}t.stateNode=e;e:switch(Vc(e,n,r),n){case"button":case"input":case"select":case"textarea":e=!!r.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&Ys(t)}}return Gs(t),t.flags&=-16777217,null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==r&&Ys(t);else{if("string"!=typeof r&&null===t.stateNode)throw Error(o(166));if(e=Q.current,ni(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,null!==(i=Gr))switch(i.tag){case 27:case 5:r=i.memoizedProps}e[Pe]=t,(e=!!(e.nodeValue===n||null!==r&&!0===r.suppressHydrationWarning||Wc(e.nodeValue,n)))||Kr(t)}else(e=$c(e).createTextNode(r))[Pe]=t,t.stateNode=e}return Gs(t),null;case 13:if(r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(i=ni(t),null!==r&&null!==r.dehydrated){if(null===e){if(!i)throw Error(o(318));if(!(i=null!==(i=t.memoizedState)?i.dehydrated:null))throw Error(o(317));i[Pe]=t}else ri(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Gs(t),i=!1}else null!==Qr&&(Du(Qr),Qr=null),i=!0;if(!i)return 256&t.flags?(Ci(t),t):(Ci(t),null)}if(Ci(t),128&t.flags)return t.lanes=n,t;if(n=null!==r,e=null!==e&&null!==e.memoizedState,n){i=null,null!==(r=t.child).alternate&&null!==r.alternate.memoizedState&&null!==r.alternate.memoizedState.cachePool&&(i=r.alternate.memoizedState.cachePool.pool);var a=null;null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(a=r.memoizedState.cachePool.pool),a!==i&&(r.flags|=2048)}return n!==e&&n&&(t.child.flags|=8192),Vs(t,t.updateQueue),Gs(t),null;case 4:return K(),null===e&&kc(t.stateNode.containerInfo),Gs(t),null;case 10:return vl(t.type),Gs(t),null;case 19:if(j(Di),null===(i=t.memoizedState))return Gs(t),null;if(r=!!(128&t.flags),null===(a=i.rendering))if(r)js(i,!1);else{if(0!==uu||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(a=Mi(e))){for(t.flags|=128,js(i,!1),e=a.updateQueue,t.updateQueue=e,Vs(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)Ps(n,e),n=n.sibling;return G(Di,1&Di.current|2),t.child}e=e.sibling}null!==i.tail&&le()>yu&&(t.flags|=128,r=!0,js(i,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=Mi(a))){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,Vs(t,e),js(i,!0),null===i.tail&&"hidden"===i.tailMode&&!a.alternate&&!qr)return Gs(t),null}else 2*le()-i.renderingStartTime>yu&&536870912!==n&&(t.flags|=128,r=!0,js(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(null!==(e=i.last)?e.sibling=a:t.child=a,i.last=a)}return null!==i.tail?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=le(),t.sibling=null,e=Di.current,G(Di,r?1&e|2:1&e),t):(Gs(t),null);case 22:case 23:return Ci(t),Li(),r=null!==t.memoizedState,null!==e?null!==e.memoizedState!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?!!(536870912&n)&&!(128&t.flags)&&(Gs(t),6&t.subtreeFlags&&(t.flags|=8192)):Gs(t),null!==(n=t.updateQueue)&&Vs(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),r=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),null!==e&&j(Gi),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),vl(zi),Gs(t),null;case 25:return null}throw Error(o(156,t.tag))}function qs(e,t){switch(jr(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return vl(zi),K(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return te(t),null;case 13:if(Ci(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(o(340));ri()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return j(Di),null;case 4:return K(),null;case 10:return vl(t.type),null;case 22:case 23:return Ci(t),Li(),null!==e&&j(Gi),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return vl(zi),null;default:return null}}function Qs(e,t){switch(jr(t),t.tag){case 3:vl(zi),K();break;case 26:case 27:case 5:te(t);break;case 4:K();break;case 13:Ci(t);break;case 19:j(Di);break;case 10:vl(t.type);break;case 22:case 23:Ci(t),Li(),null!==e&&j(Gi);break;case 24:vl(zi)}}var Js={getCacheForType:function(e){var t=Sl(zi),n=t.data.get(e);return void 0===n&&(n=e(),t.data.set(e,n)),n}},Zs="function"==typeof WeakMap?WeakMap:Map,Ks=0,eu=null,tu=null,nu=0,ru=0,iu=null,au=!1,ou=!1,lu=!1,su=0,uu=0,cu=0,du=0,fu=0,hu=0,pu=0,gu=null,mu=null,bu=!1,vu=0,yu=1/0,Tu=null,Eu=null,_u=!1,wu=null,Su=0,Ou=0,Lu=null,Nu=0,Au=null;function Ru(){return 2&Ks&&0!==nu?nu&-nu:null!==R.T?0!==Yi?Yi:Tc():Ie()}function xu(){0===hu&&(hu=536870912&nu&&!qr?536870912:Ae());var e=Ni.current;return null!==e&&(e.flags|=32),hu}function ku(e,t,n){(e===eu&&2===ru||null!==e.cancelPendingCommit)&&(Uu(e,0),Bu(e,nu,hu,!1)),ke(e,n),2&Ks&&e===eu||(e===eu&&(!(2&Ks)&&(du|=n),4===uu&&Bu(e,nu,hu,!1)),pc(e))}function Cu(e,t,n){if(6&Ks)throw Error(o(327));for(var r=!n&&!(60&t)&&!(t&e.expiredLanes)||Le(e,t),i=r?function(e,t){var n=Ks;Ks|=2;var r=Wu(),i=Hu();eu!==e||nu!==t?(Tu=null,yu=le()+500,Uu(e,t)):ou=Le(e,t);e:for(;;)try{if(0!==ru&&null!==tu){t=tu;var a=iu;t:switch(ru){case 1:ru=0,iu=null,qu(e,t,a,1);break;case 2:if(si(a)){ru=0,iu=null,$u(t);break}t=function(){2===ru&&eu===e&&(ru=7),pc(e)},a.then(t,t);break e;case 3:ru=7;break e;case 4:ru=5;break e;case 7:si(a)?(ru=0,iu=null,$u(t)):(ru=0,iu=null,qu(e,t,a,7));break;case 5:var l=null;switch(tu.tag){case 26:l=tu.memoizedState;case 5:case 27:var s=tu;if(!l||Ad(l)){ru=0,iu=null;var u=s.sibling;if(null!==u)tu=u;else{var c=s.return;null!==c?(tu=c,Qu(c)):tu=null}break t}}ru=0,iu=null,qu(e,t,a,5);break;case 6:ru=0,iu=null,qu(e,t,a,6);break;case 8:zu(),uu=6;break e;default:throw Error(o(462))}}ju();break}catch(t){Fu(e,t)}return ml=gl=null,R.H=r,R.A=i,Ks=n,null!==tu?0:(eu=null,nu=0,Or(),uu)}(e,t):Xu(e,t,!0),a=r;;){if(0===i){ou&&!r&&Bu(e,t,0,!1);break}if(6===i)Bu(e,t,0,!au);else{if(n=e.current.alternate,a&&!Iu(n)){i=Xu(e,t,!1),a=!1;continue}if(2===i){if(a=t,e.errorRecoveryDisabledLanes&a)var l=0;else l=0!=(l=-536870913&e.pendingLanes)?l:536870912&l?536870912:0;if(0!==l){t=l;e:{var s=e;i=gu;var u=s.current.memoizedState.isDehydrated;if(u&&(Uu(s,l).flags|=256),2!==(l=Xu(s,l,!1))){if(lu&&!u){s.errorRecoveryDisabledLanes|=a,du|=a,i=4;break e}a=mu,mu=i,null!==a&&Du(a)}i=l}if(a=!1,2!==i)continue}}if(1===i){Uu(e,0),Bu(e,t,0,!0);break}e:{switch(r=e,i){case 0:case 1:throw Error(o(345));case 4:if((4194176&t)===t){Bu(r,t,hu,!au);break e}break;case 2:mu=null;break;case 3:case 5:break;default:throw Error(o(329))}if(r.finishedWork=n,r.finishedLanes=t,(62914560&t)===t&&10<(a=vu+300-le())){if(Bu(r,t,hu,!au),0!==Oe(r,0))break e;r.timeoutHandle=Kc(Mu.bind(null,r,n,mu,Tu,bu,t,hu,du,pu,au,2,-0,0),a)}else Mu(r,n,mu,Tu,bu,t,hu,du,pu,au,0,-0,0)}}break}pc(e)}function Du(e){null===mu?mu=e:mu.push.apply(mu,e)}function Mu(e,t,n,r,i,a,l,s,u,c,d,f,h){var p=t.subtreeFlags;if((8192&p||!(16785408&~p))&&(Rd={stylesheets:null,count:0,unsuspend:xd},Ns(t),null!==(t=function(){if(null===Rd)throw Error(o(475));var e=Rd;return e.stylesheets&&0===e.count&&Dd(e,e.stylesheets),0<e.count?function(t){var n=setTimeout((function(){if(e.stylesheets&&Dd(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}),6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(n)}}:null}())))return e.cancelPendingCommit=t(Zu.bind(null,e,n,r,i,l,s,u,1,f,h)),void Bu(e,a,l,!c);Zu(e,n,r,i,l,s,u)}function Iu(e){for(var t=e;;){var n=t.tag;if((0===n||11===n||15===n)&&16384&t.flags&&null!==(n=t.updateQueue)&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Gn(a(),i))return!1}catch(e){return!1}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Bu(e,t,n,r){t&=~fu,t&=~du,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-ye(i),o=1<<a;r[a]=-1,i&=~o}0!==n&&Ce(e,n,t)}function Pu(){return!!(6&Ks)||(gc(0,!1),!1)}function zu(){if(null!==tu){if(0===ru)var e=tu.return;else ml=gl=null,ma(e=tu),hi=null,pi=0,e=tu;for(;null!==e;)Qs(e.alternate,e),e=e.return;tu=null}}function Uu(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;-1!==n&&(e.timeoutHandle=-1,ed(n)),null!==(n=e.cancelPendingCommit)&&(e.cancelPendingCommit=null,n()),zu(),eu=e,tu=n=Bs(e.current,null),nu=t,ru=0,iu=null,au=!1,ou=Le(e,t),lu=!1,pu=hu=fu=du=cu=uu=0,mu=gu=null,bu=!1,8&t&&(t|=32&t);var r=e.entangledLanes;if(0!==r)for(e=e.entanglements,r&=t;0<r;){var i=31-ye(r),a=1<<i;t|=e[i],r&=~a}return su=t,Or(),n}function Fu(e,t){Zi=null,R.H=So,t===ai?(t=fi(),ru=3):t===oi?(t=fi(),ru=4):ru=t===Ho?8:null!==t&&"object"==typeof t&&"function"==typeof t.then?6:1,iu=t,null===tu&&(uu=1,Po(e,Dr(t,e.current)))}function Wu(){var e=R.H;return R.H=So,null===e?So:e}function Hu(){var e=R.A;return R.A=Js,e}function Yu(){uu=4,au||(4194176&nu)!==nu&&null!==Ni.current||(ou=!0),!(134217727&cu)&&!(134217727&du)||null===eu||Bu(eu,nu,hu,!1)}function Xu(e,t,n){var r=Ks;Ks|=2;var i=Wu(),a=Hu();eu===e&&nu===t||(Tu=null,Uu(e,t)),t=!1;var o=uu;e:for(;;)try{if(0!==ru&&null!==tu){var l=tu,s=iu;switch(ru){case 8:zu(),o=6;break e;case 3:case 2:case 6:null===Ni.current&&(t=!0);var u=ru;if(ru=0,iu=null,qu(e,l,s,u),n&&ou){o=0;break e}break;default:u=ru,ru=0,iu=null,qu(e,l,s,u)}}Vu(),o=uu;break}catch(t){Fu(e,t)}return t&&e.shellSuspendCounter++,ml=gl=null,Ks=r,R.H=i,R.A=a,null===tu&&(eu=null,nu=0,Or()),o}function Vu(){for(;null!==tu;)Gu(tu)}function ju(){for(;null!==tu&&!ae();)Gu(tu)}function Gu(e){var t=hl(e.alternate,e,su);e.memoizedProps=e.pendingProps,null===t?Qu(e):tu=t}function $u(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Zo(n,t,t.pendingProps,t.type,void 0,nu);break;case 11:t=Zo(n,t,t.pendingProps,t.type.render,t.ref,nu);break;case 5:ma(t);default:Qs(n,t),t=hl(n,t=tu=Ps(t,su),su)}e.memoizedProps=e.pendingProps,null===t?Qu(e):tu=t}function qu(e,t,n,r){ml=gl=null,ma(t),hi=null,pi=0;var i=t.return;try{if(function(e,t,n,r,i){if(n.flags|=32768,null!==r&&"object"==typeof r&&"function"==typeof r.then){if(null!==(t=n.alternate)&&El(t,n,i,!0),null!==(n=Ni.current)){switch(n.tag){case 13:return null===Ai?Yu():null===n.alternate&&0===uu&&(uu=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===li?n.flags|=16384:(null===(t=n.updateQueue)?n.updateQueue=new Set([r]):t.add(r),rc(e,r,i)),!1;case 22:return n.flags|=65536,r===li?n.flags|=16384:(null===(t=n.updateQueue)?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):null===(n=t.retryQueue)?t.retryQueue=new Set([r]):n.add(r),rc(e,r,i)),!1}throw Error(o(435,n.tag))}return rc(e,r,i),Yu(),!1}if(qr)return null!==(t=Ni.current)?(!(65536&t.flags)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==Zr&&ii(Dr(e=Error(o(422),{cause:r}),n))):(r!==Zr&&ii(Dr(t=Error(o(423),{cause:r}),n)),(e=e.current.alternate).flags|=65536,i&=-i,e.lanes|=i,r=Dr(r,n),Dl(e,i=Uo(e.stateNode,r,i)),4!==uu&&(uu=2)),!1;var a=Error(o(520),{cause:r});if(a=Dr(a,n),null===gu?gu=[a]:gu.push(a),4!==uu&&(uu=2),null===t)return!0;r=Dr(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,Dl(n,e=Uo(n.stateNode,r,e)),!1;case 1:if(t=n.type,a=n.stateNode,!(128&n.flags||"function"!=typeof t.getDerivedStateFromError&&(null===a||"function"!=typeof a.componentDidCatch||null!==Eu&&Eu.has(a))))return n.flags|=65536,i&=-i,n.lanes|=i,Wo(i=Fo(i),e,n,r),Dl(n,i),!1}n=n.return}while(null!==n);return!1}(e,i,t,n,nu))return uu=1,Po(e,Dr(n,e.current)),void(tu=null)}catch(t){if(null!==i)throw tu=i,t;return uu=1,Po(e,Dr(n,e.current)),void(tu=null)}32768&t.flags?(qr||1===r?e=!0:ou||536870912&nu?e=!1:(au=e=!0,(2===r||3===r||6===r)&&null!==(r=Ni.current)&&13===r.tag&&(r.flags|=16384)),Ju(t,e)):Qu(t)}function Qu(e){var t=e;do{if(32768&t.flags)return void Ju(t,au);e=t.return;var n=$s(t.alternate,t,su);if(null!==n)return void(tu=n);if(null!==(t=t.sibling))return void(tu=t);tu=t=e}while(null!==t);0===uu&&(uu=5)}function Ju(e,t){do{var n=qs(e.alternate,e);if(null!==n)return n.flags&=32767,void(tu=n);if(null!==(n=e.return)&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&null!==(e=e.sibling))return void(tu=e);tu=e=n}while(null!==e);uu=6,tu=null}function Zu(e,t,n,r,i,a,l,s,u,c){var d=R.T,f=W.p;try{W.p=2,R.T=null,function(e,t,n,r,i,a,l,s){do{ec()}while(null!==wu);if(6&Ks)throw Error(o(327));var u=e.finishedWork;if(r=e.finishedLanes,null===u)return null;if(e.finishedWork=null,e.finishedLanes=0,u===e.current)throw Error(o(177));e.callbackNode=null,e.callbackPriority=0,e.cancelPendingCommit=null;var c=u.lanes|u.childLanes;if(function(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var l=e.entanglements,s=e.expirationTimes,u=e.hiddenUpdates;for(n=o&~n;0<n;){var c=31-ye(n),d=1<<c;l[c]=0,s[c]=-1;var f=u[c];if(null!==f)for(u[c]=null,c=0;c<f.length;c++){var h=f[c];null!==h&&(h.lane&=-536870913)}n&=~d}0!==r&&Ce(e,r,0),0!==a&&0===i&&0!==e.tag&&(e.suspendedLanes|=a&~(o&~t))}(e,r,c|=Sr,a,l,s),e===eu&&(tu=eu=null,nu=0),!(10256&u.subtreeFlags)&&!(10256&u.flags)||_u||(_u=!0,Ou=c,Lu=n,re(de,(function(){return ec(),null}))),n=!!(15990&u.flags),15990&u.subtreeFlags||n?(n=R.T,R.T=null,a=W.p,W.p=2,l=Ks,Ks|=4,function(e,t){if(e=e.containerInfo,jc=Wd,Kn(e=Zn(e))){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch(e){n=null;break e}var l=0,s=-1,u=-1,c=0,d=0,f=e,h=null;t:for(;;){for(var p;f!==n||0!==i&&3!==f.nodeType||(s=l+i),f!==a||0!==r&&3!==f.nodeType||(u=l+r),3===f.nodeType&&(l+=f.nodeValue.length),null!==(p=f.firstChild);)h=f,f=p;for(;;){if(f===e)break t;if(h===n&&++c===i&&(s=l),h===a&&++d===r&&(u=l),null!==(p=f.nextSibling))break;h=(f=h).parentNode}f=p}n=-1===s||-1===u?null:{start:s,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Gc={focusedElem:e,selectionRange:n},Wd=!1,ts=t;null!==ts;)if(e=(t=ts).child,1028&t.subtreeFlags&&null!==e)e.return=t,ts=e;else for(;null!==ts;){switch(a=(t=ts).alternate,e=t.flags,t.tag){case 0:case 11:case 15:case 5:case 26:case 27:case 6:case 4:case 17:break;case 1:if(1024&e&&null!==a){e=void 0,n=t,i=a.memoizedProps,a=a.memoizedState,r=n.stateNode;try{var g=Co(n.type,i,(n.elementType,n.type));e=r.getSnapshotBeforeUpdate(g,a),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){nc(n,n.return,e)}}break;case 3:if(1024&e)if(9===(n=(e=t.stateNode.containerInfo).nodeType))ad(e);else if(1===n)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":ad(e);break;default:e.textContent=""}break;default:if(1024&e)throw Error(o(163))}if(null!==(e=t.sibling)){e.return=t.return,ts=e;break}ts=t.return}g=ns,ns=!1}(e,u),hs(u,e),er(Gc,e.containerInfo),Wd=!!jc,Gc=jc=null,e.current=u,rs(e,u.alternate,u),oe(),Ks=l,W.p=a,R.T=n):e.current=u,_u?(_u=!1,wu=e,Su=r):Ku(e,c),0===(c=e.pendingLanes)&&(Eu=null),function(e){if(be&&"function"==typeof be.onCommitFiberRoot)try{be.onCommitFiberRoot(me,e,void 0,!(128&~e.current.flags))}catch(e){}}(u.stateNode),pc(e),null!==t)for(i=e.onRecoverableError,u=0;u<t.length;u++)i((c=t[u]).value,{componentStack:c.stack});!!(3&Su)&&ec(),c=e.pendingLanes,4194218&r&&42&c?e===Au?Nu++:(Nu=0,Au=e):Nu=0,gc(0,!1)}(e,t,n,r,f,i,a,l)}finally{R.T=d,W.p=f}}function Ku(e,t){0==(e.pooledCacheLanes&=t)&&null!=(t=e.pooledCache)&&(e.pooledCache=null,Fi(t))}function ec(){if(null!==wu){var e=wu,t=Ou;Ou=0;var n=Me(Su),r=R.T,i=W.p;try{if(W.p=32>n?32:n,R.T=null,null===wu)var a=!1;else{n=Lu,Lu=null;var l=wu,s=Su;if(wu=null,Su=0,6&Ks)throw Error(o(331));var u=Ks;if(Ks|=4,xs(l.current),_s(l,l.current,s,n),Ks=u,gc(0,!1),be&&"function"==typeof be.onPostCommitFiberRoot)try{be.onPostCommitFiberRoot(me,l)}catch(e){}a=!0}return a}finally{W.p=i,R.T=r,Ku(e,t)}}return!1}function tc(e,t,n){t=Dr(n,t),null!==(e=kl(e,t=Uo(e.stateNode,t,2),2))&&(ke(e,2),pc(e))}function nc(e,t,n){if(3===e.tag)tc(e,e,n);else for(;null!==t;){if(3===t.tag){tc(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Eu||!Eu.has(r))){e=Dr(n,e),null!==(r=kl(t,n=Fo(2),2))&&(Wo(n,r,t,e),ke(r,2),pc(r));break}}t=t.return}}function rc(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new Zs;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(lu=!0,i.add(n),e=ic.bind(null,e,t,n),t.then(e,e))}function ic(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,eu===e&&(nu&n)===n&&(4===uu||3===uu&&(62914560&nu)===nu&&300>le()-vu?!(2&Ks)&&Uu(e,0):fu|=n,pu===nu&&(pu=0)),pc(e)}function ac(e,t){0===t&&(t=Re()),null!==(e=Ar(e,t))&&(ke(e,t),pc(e))}function oc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),ac(e,n)}function lc(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(o(314))}null!==r&&r.delete(t),ac(e,n)}var sc=null,uc=null,cc=!1,dc=!1,fc=!1,hc=0;function pc(e){var t;e!==uc&&null===e.next&&(null===uc?sc=uc=e:uc=uc.next=e),dc=!0,cc||(cc=!0,t=mc,nd((function(){6&Ks?re(ue,t):t()})))}function gc(e,t){if(!fc&&dc){fc=!0;do{for(var n=!1,r=sc;null!==r;){if(!t)if(0!==e){var i=r.pendingLanes;if(0===i)var a=0;else{var o=r.suspendedLanes,l=r.pingedLanes;a=(1<<31-ye(42|e)+1)-1,a=201326677&(a&=i&~(o&~l))?201326677&a|1:a?2|a:0}0!==a&&(n=!0,yc(r,a))}else a=nu,!(3&(a=Oe(r,r===eu?a:0)))||Le(r,a)||(n=!0,yc(r,a));r=r.next}}while(n);fc=!1}}function mc(){dc=cc=!1;var e,t=0;0!==hc&&(((e=window.event)&&"popstate"===e.type?e!==Zc&&(Zc=e,!0):(Zc=null,!1))&&(t=hc),hc=0);for(var n=le(),r=null,i=sc;null!==i;){var a=i.next,o=bc(i,n);0===o?(i.next=null,null===r?sc=a:r.next=a,null===a&&(uc=r)):(r=i,(0!==t||3&o)&&(dc=!0)),i=a}gc(t,!1)}function bc(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=-62914561&e.pendingLanes;0<a;){var o=31-ye(a),l=1<<o,s=i[o];-1===s?l&n&&!(l&r)||(i[o]=Ne(l,t)):s<=t&&(e.expiredLanes|=l),a&=~l}if(n=nu,n=Oe(e,e===(t=eu)?n:0),r=e.callbackNode,0===n||e===t&&2===ru||null!==e.cancelPendingCommit)return null!==r&&null!==r&&ie(r),e.callbackNode=null,e.callbackPriority=0;if(!(3&n)||Le(e,n)){if((t=n&-n)===e.callbackPriority)return t;switch(null!==r&&ie(r),Me(n)){case 2:case 8:n=ce;break;case 32:default:n=de;break;case 268435456:n=he}return r=vc.bind(null,e),n=re(n,r),e.callbackPriority=t,e.callbackNode=n,t}return null!==r&&null!==r&&ie(r),e.callbackPriority=2,e.callbackNode=null,2}function vc(e,t){var n=e.callbackNode;if(ec()&&e.callbackNode!==n)return null;var r=nu;return 0===(r=Oe(e,e===eu?r:0))?null:(Cu(e,r,t),bc(e,le()),null!=e.callbackNode&&e.callbackNode===n?vc.bind(null,e):null)}function yc(e,t){if(ec())return null;Cu(e,t,!0)}function Tc(){return 0===hc&&(hc=Ae()),hc}function Ec(e){return null==e||"symbol"==typeof e||"boolean"==typeof e?null:"function"==typeof e?e:At(""+e)}function _c(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}for(var wc=0;wc<Tr.length;wc++){var Sc=Tr[wc];Er(Sc.toLowerCase(),"on"+(Sc[0].toUpperCase()+Sc.slice(1)))}Er(fr,"onAnimationEnd"),Er(hr,"onAnimationIteration"),Er(pr,"onAnimationStart"),Er("dblclick","onDoubleClick"),Er("focusin","onFocus"),Er("focusout","onBlur"),Er(gr,"onTransitionRun"),Er(mr,"onTransitionStart"),Er(br,"onTransitionCancel"),Er(vr,"onTransitionEnd"),et("onMouseEnter",["mouseout","mouseover"]),et("onMouseLeave",["mouseout","mouseover"]),et("onPointerEnter",["pointerout","pointerover"]),et("onPointerLeave",["pointerout","pointerover"]),Ke("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ke("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ke("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ke("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ke("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ke("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Oc="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Lc=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Oc));function Nc(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var l=r[o],s=l.instance,u=l.currentTarget;if(l=l.listener,s!==a&&i.isPropagationStopped())break e;a=l,i.currentTarget=u;try{a(i)}catch(e){Do(e)}i.currentTarget=null,a=s}else for(o=0;o<r.length;o++){if(s=(l=r[o]).instance,u=l.currentTarget,l=l.listener,s!==a&&i.isPropagationStopped())break e;a=l,i.currentTarget=u;try{a(i)}catch(e){Do(e)}i.currentTarget=null,a=s}}}}function Ac(e,t){var n=t[Fe];void 0===n&&(n=t[Fe]=new Set);var r=e+"__bubble";n.has(r)||(Cc(t,e,2,!1),n.add(r))}function Rc(e,t,n){var r=0;t&&(r|=4),Cc(n,e,r,t)}var xc="_reactListening"+Math.random().toString(36).slice(2);function kc(e){if(!e[xc]){e[xc]=!0,Je.forEach((function(t){"selectionchange"!==t&&(Lc.has(t)||Rc(t,!1,e),Rc(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[xc]||(t[xc]=!0,Rc("selectionchange",!1,t))}}function Cc(e,t,n,r){switch($d(t)){case 2:var i=Hd;break;case 8:i=Yd;break;default:i=Xd}n=i.bind(null,t,n,e),i=void 0,!Pt||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Dc(e,t,n,r,i){var a=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var o=r.tag;if(3===o||4===o){var l=r.stateNode.containerInfo;if(l===i||8===l.nodeType&&l.parentNode===i)break;if(4===o)for(o=r.return;null!==o;){var s=o.tag;if((3===s||4===s)&&((s=o.stateNode.containerInfo)===i||8===s.nodeType&&s.parentNode===i))return;o=o.return}for(;null!==l;){if(null===(o=je(l)))return;if(5===(s=o.tag)||6===s||26===s||27===s){r=a=o;continue e}l=l.parentNode}}r=r.return}It((function(){var r=a,i=xt(n),o=[];e:{var l=yr.get(e);if(void 0!==l){var s=Jt,u=e;switch(e){case"keypress":if(0===Yt(n))break e;case"keydown":case"keyup":s=hn;break;case"focusin":u="focus",s=rn;break;case"focusout":u="blur",s=rn;break;case"beforeblur":case"afterblur":s=rn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":s=tn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":s=nn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":s=gn;break;case fr:case hr:case pr:s=an;break;case vr:s=mn;break;case"scroll":case"scrollend":s=Kt;break;case"wheel":s=bn;break;case"copy":case"cut":case"paste":s=on;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":s=pn;break;case"toggle":case"beforetoggle":s=vn}var c=!!(4&t),d=!c&&("scroll"===e||"scrollend"===e),f=c?null!==l?l+"Capture":null:l;c=[];for(var h,p=r;null!==p;){var g=p;if(h=g.stateNode,5!==(g=g.tag)&&26!==g&&27!==g||null===h||null===f||null!=(g=Bt(p,f))&&c.push(Mc(p,g,h)),d)break;p=p.return}0<c.length&&(l=new s(l,u,null,n,i),o.push({event:l,listeners:c}))}}if(!(7&t)){if(s="mouseout"===e||"pointerout"===e,(!(l="mouseover"===e||"pointerover"===e)||n===Rt||!(u=n.relatedTarget||n.fromElement)||!je(u)&&!u[Ue])&&(s||l)&&(l=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,s?(s=r,null!==(u=(u=n.relatedTarget||n.toElement)?je(u):null)&&(d=B(u),c=u.tag,u!==d||5!==c&&27!==c&&6!==c)&&(u=null)):(s=null,u=r),s!==u)){if(c=tn,g="onMouseLeave",f="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(c=pn,g="onPointerLeave",f="onPointerEnter",p="pointer"),d=null==s?l:$e(s),h=null==u?l:$e(u),(l=new c(g,p+"leave",s,n,i)).target=d,l.relatedTarget=h,g=null,je(i)===r&&((c=new c(f,p+"enter",u,n,i)).target=h,c.relatedTarget=d,g=c),d=g,s&&u)e:{for(f=u,p=0,h=c=s;h;h=Bc(h))p++;for(h=0,g=f;g;g=Bc(g))h++;for(;0<p-h;)c=Bc(c),p--;for(;0<h-p;)f=Bc(f),h--;for(;p--;){if(c===f||null!==f&&c===f.alternate)break e;c=Bc(c),f=Bc(f)}c=null}else c=null;null!==s&&Pc(o,l,s,c,!1),null!==u&&null!==d&&Pc(o,d,u,c,!0)}if("select"===(s=(l=r?$e(r):window).nodeName&&l.nodeName.toLowerCase())||"input"===s&&"file"===l.type)var m=Bn;else if(xn(l))if(Pn)m=jn;else{m=Xn;var b=Yn}else!(s=l.nodeName)||"input"!==s.toLowerCase()||"checkbox"!==l.type&&"radio"!==l.type?r&&Ot(r.elementType)&&(m=Bn):m=Vn;switch(m&&(m=m(e,r))?kn(o,m,n,i):(b&&b(e,l,r),"focusout"===e&&r&&"number"===l.type&&null!=r.memoizedProps.value&&bt(l,"number",l.value)),b=r?$e(r):window,e){case"focusin":(xn(b)||"true"===b.contentEditable)&&(nr=b,rr=r,ir=null);break;case"focusout":ir=rr=nr=null;break;case"mousedown":ar=!0;break;case"contextmenu":case"mouseup":case"dragend":ar=!1,or(o,n,i);break;case"selectionchange":if(tr)break;case"keydown":case"keyup":or(o,n,i)}var v;if(Tn)e:{switch(e){case"compositionstart":var y="onCompositionStart";break e;case"compositionend":y="onCompositionEnd";break e;case"compositionupdate":y="onCompositionUpdate";break e}y=void 0}else An?Ln(e,n)&&(y="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(y="onCompositionStart");y&&(wn&&"ko"!==n.locale&&(An||"onCompositionStart"!==y?"onCompositionEnd"===y&&An&&(v=Ht()):(Ft="value"in(Ut=i)?Ut.value:Ut.textContent,An=!0)),0<(b=Ic(r,y)).length&&(y=new ln(y,e,null,n,i),o.push({event:y,listeners:b}),(v||null!==(v=Nn(n)))&&(y.data=v))),(v=_n?function(e,t){switch(e){case"compositionend":return Nn(t);case"keypress":return 32!==t.which?null:(On=!0,Sn);case"textInput":return(e=t.data)===Sn&&On?null:e;default:return null}}(e,n):function(e,t){if(An)return"compositionend"===e||!Tn&&Ln(e,t)?(e=Ht(),Wt=Ft=Ut=null,An=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return wn&&"ko"!==t.locale?null:t.data}}(e,n))&&0<(y=Ic(r,"onBeforeInput")).length&&(b=new ln("onBeforeInput","beforeinput",null,n,i),o.push({event:b,listeners:y}),b.data=v),function(e,t,n,r,i){if("submit"===t&&n&&n.stateNode===i){var a=Ec((i[ze]||null).action),o=r.submitter;o&&null!==(t=(t=o[ze]||null)?Ec(t.formAction):o.getAttribute("formAction"))&&(a=t,o=null);var l=new Jt("action","action",null,r,i);e.push({event:l,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(0!==hc){var e=o?_c(i,o):new FormData(i);uo(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else"function"==typeof a&&(l.preventDefault(),e=o?_c(i,o):new FormData(i),uo(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}(o,e,r,n,i)}Nc(o,t)}))}function Mc(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ic(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,a=i.stateNode;5!==(i=i.tag)&&26!==i&&27!==i||null===a||(null!=(i=Bt(e,n))&&r.unshift(Mc(e,i,a)),null!=(i=Bt(e,t))&&r.push(Mc(e,i,a))),e=e.return}return r}function Bc(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag&&27!==e.tag);return e||null}function Pc(e,t,n,r,i){for(var a=t._reactName,o=[];null!==n&&n!==r;){var l=n,s=l.alternate,u=l.stateNode;if(l=l.tag,null!==s&&s===r)break;5!==l&&26!==l&&27!==l||null===u||(s=u,i?null!=(u=Bt(n,a))&&o.unshift(Mc(n,u,s)):i||null!=(u=Bt(n,a))&&o.push(Mc(n,u,s))),n=n.return}0!==o.length&&e.push({event:t,listeners:o})}var zc=/\r\n?/g,Uc=/\u0000|\uFFFD/g;function Fc(e){return("string"==typeof e?e:""+e).replace(zc,"\n").replace(Uc,"")}function Wc(e,t){return t=Fc(t),Fc(e)===t}function Hc(){}function Yc(e,t,n,r,i,a){switch(n){case"children":"string"==typeof r?"body"===t||"textarea"===t&&""===r||Et(e,r):("number"==typeof r||"bigint"==typeof r)&&"body"!==t&&Et(e,""+r);break;case"className":ot(e,"class",r);break;case"tabIndex":ot(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":ot(e,n,r);break;case"style":St(e,r,a);break;case"data":if("object"!==t){ot(e,"data",r);break}case"src":case"href":if(""===r&&("a"!==t||"href"!==n)){e.removeAttribute(n);break}if(null==r||"function"==typeof r||"symbol"==typeof r||"boolean"==typeof r){e.removeAttribute(n);break}r=At(""+r),e.setAttribute(n,r);break;case"action":case"formAction":if("function"==typeof r){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}if("function"==typeof a&&("formAction"===n?("input"!==t&&Yc(e,t,"name",i.name,i,null),Yc(e,t,"formEncType",i.formEncType,i,null),Yc(e,t,"formMethod",i.formMethod,i,null),Yc(e,t,"formTarget",i.formTarget,i,null)):(Yc(e,t,"encType",i.encType,i,null),Yc(e,t,"method",i.method,i,null),Yc(e,t,"target",i.target,i,null))),null==r||"symbol"==typeof r||"boolean"==typeof r){e.removeAttribute(n);break}r=At(""+r),e.setAttribute(n,r);break;case"onClick":null!=r&&(e.onclick=Hc);break;case"onScroll":null!=r&&Ac("scroll",e);break;case"onScrollEnd":null!=r&&Ac("scrollend",e);break;case"dangerouslySetInnerHTML":if(null!=r){if("object"!=typeof r||!("__html"in r))throw Error(o(61));if(null!=(n=r.__html)){if(null!=i.children)throw Error(o(60));e.innerHTML=n}}break;case"multiple":e.multiple=r&&"function"!=typeof r&&"symbol"!=typeof r;break;case"muted":e.muted=r&&"function"!=typeof r&&"symbol"!=typeof r;break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":case"autoFocus":break;case"xlinkHref":if(null==r||"function"==typeof r||"boolean"==typeof r||"symbol"==typeof r){e.removeAttribute("xlink:href");break}n=At(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":null!=r&&"function"!=typeof r&&"symbol"!=typeof r?e.setAttribute(n,""+r):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&"function"!=typeof r&&"symbol"!=typeof r?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":!0===r?e.setAttribute(n,""):!1!==r&&null!=r&&"function"!=typeof r&&"symbol"!=typeof r?e.setAttribute(n,r):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":null!=r&&"function"!=typeof r&&"symbol"!=typeof r&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case"rowSpan":case"start":null==r||"function"==typeof r||"symbol"==typeof r||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case"popover":Ac("beforetoggle",e),Ac("toggle",e),at(e,"popover",r);break;case"xlinkActuate":lt(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":lt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":lt(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":lt(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":lt(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":lt(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":lt(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":lt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":lt(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":at(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])&&at(e,n=Lt.get(n)||n,r)}}function Xc(e,t,n,r,i,a){switch(n){case"style":St(e,r,a);break;case"dangerouslySetInnerHTML":if(null!=r){if("object"!=typeof r||!("__html"in r))throw Error(o(61));if(null!=(n=r.__html)){if(null!=i.children)throw Error(o(60));e.innerHTML=n}}break;case"children":"string"==typeof r?Et(e,r):("number"==typeof r||"bigint"==typeof r)&&Et(e,""+r);break;case"onScroll":null!=r&&Ac("scroll",e);break;case"onScrollEnd":null!=r&&Ac("scrollend",e);break;case"onClick":null!=r&&(e.onclick=Hc);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":case"innerText":case"textContent":break;default:Ze.hasOwnProperty(n)||("o"!==n[0]||"n"!==n[1]||(i=n.endsWith("Capture"),t=n.slice(2,i?n.length-7:void 0),"function"==typeof(a=null!=(a=e[ze]||null)?a[n]:null)&&e.removeEventListener(t,a,i),"function"!=typeof r)?n in e?e[n]=r:!0===r?e.setAttribute(n,""):at(e,n,r):("function"!=typeof a&&null!==a&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i)))}}function Vc(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ac("error",e),Ac("load",e);var r,i=!1,a=!1;for(r in n)if(n.hasOwnProperty(r)){var l=n[r];if(null!=l)switch(r){case"src":i=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Yc(e,t,r,l,n,null)}}return a&&Yc(e,t,"srcSet",n.srcSet,n,null),void(i&&Yc(e,t,"src",n.src,n,null));case"input":Ac("invalid",e);var s=r=l=a=null,u=null,c=null;for(i in n)if(n.hasOwnProperty(i)){var d=n[i];if(null!=d)switch(i){case"name":a=d;break;case"type":l=d;break;case"checked":u=d;break;case"defaultChecked":c=d;break;case"value":r=d;break;case"defaultValue":s=d;break;case"children":case"dangerouslySetInnerHTML":if(null!=d)throw Error(o(137,t));break;default:Yc(e,t,i,d,n,null)}}return mt(e,r,s,u,c,l,a,!1),void ct(e);case"select":for(a in Ac("invalid",e),i=l=r=null,n)if(n.hasOwnProperty(a)&&null!=(s=n[a]))switch(a){case"value":r=s;break;case"defaultValue":l=s;break;case"multiple":i=s;default:Yc(e,t,a,s,n,null)}return t=r,n=l,e.multiple=!!i,void(null!=t?vt(e,!!i,t,!1):null!=n&&vt(e,!!i,n,!0));case"textarea":for(l in Ac("invalid",e),r=a=i=null,n)if(n.hasOwnProperty(l)&&null!=(s=n[l]))switch(l){case"value":i=s;break;case"defaultValue":a=s;break;case"children":r=s;break;case"dangerouslySetInnerHTML":if(null!=s)throw Error(o(91));break;default:Yc(e,t,l,s,n,null)}return Tt(e,i,a,r),void ct(e);case"option":for(u in n)n.hasOwnProperty(u)&&null!=(i=n[u])&&("selected"===u?e.selected=i&&"function"!=typeof i&&"symbol"!=typeof i:Yc(e,t,u,i,n,null));return;case"dialog":Ac("cancel",e),Ac("close",e);break;case"iframe":case"object":Ac("load",e);break;case"video":case"audio":for(i=0;i<Oc.length;i++)Ac(Oc[i],e);break;case"image":Ac("error",e),Ac("load",e);break;case"details":Ac("toggle",e);break;case"embed":case"source":case"link":Ac("error",e),Ac("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(c in n)if(n.hasOwnProperty(c)&&null!=(i=n[c]))switch(c){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Yc(e,t,c,i,n,null)}return;default:if(Ot(t)){for(d in n)n.hasOwnProperty(d)&&void 0!==(i=n[d])&&Xc(e,t,d,i,n,void 0);return}}for(s in n)n.hasOwnProperty(s)&&null!=(i=n[s])&&Yc(e,t,s,i,n,null)}var jc=null,Gc=null;function $c(e){return 9===e.nodeType?e:e.ownerDocument}function qc(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Qc(e,t){if(0===e)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return 1===e&&"foreignObject"===t?0:e}function Jc(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"bigint"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Zc=null,Kc="function"==typeof setTimeout?setTimeout:void 0,ed="function"==typeof clearTimeout?clearTimeout:void 0,td="function"==typeof Promise?Promise:void 0,nd="function"==typeof queueMicrotask?queueMicrotask:void 0!==td?function(e){return td.resolve(null).then(e).catch(rd)}:Kc;function rd(e){setTimeout((function(){throw e}))}function id(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void hf(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);hf(t)}function ad(e){var t=e.firstChild;for(t&&10===t.nodeType&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":ad(n),Ve(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if("stylesheet"===n.rel.toLowerCase())continue}e.removeChild(n)}}function od(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t||"F!"===t||"F"===t)break;if("/$"===t)return null}}return e}function ld(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}function sd(e,t,n){switch(t=$c(n),e){case"html":if(!(e=t.documentElement))throw Error(o(452));return e;case"head":if(!(e=t.head))throw Error(o(453));return e;case"body":if(!(e=t.body))throw Error(o(454));return e;default:throw Error(o(451))}}var ud=new Map,cd=new Set;function dd(e){return"function"==typeof e.getRootNode?e.getRootNode():e.ownerDocument}var fd=W.d;W.d={f:function(){var e=fd.f(),t=Pu();return e||t},r:function(e){var t=Ge(e);null!==t&&5===t.tag&&"form"===t.type?fo(t):fd.r(e)},D:function(e){fd.D(e),pd("dns-prefetch",e,null)},C:function(e,t){fd.C(e,t),pd("preconnect",e,t)},L:function(e,t,n){fd.L(e,t,n);var r=hd;if(r&&e&&t){var i='link[rel="preload"][as="'+pt(t)+'"]';"image"===t&&n&&n.imageSrcSet?(i+='[imagesrcset="'+pt(n.imageSrcSet)+'"]',"string"==typeof n.imageSizes&&(i+='[imagesizes="'+pt(n.imageSizes)+'"]')):i+='[href="'+pt(e)+'"]';var a=i;switch(t){case"style":a=md(e);break;case"script":a=yd(e)}ud.has(a)||(e=x({rel:"preload",href:"image"===t&&n&&n.imageSrcSet?void 0:e,as:t},n),ud.set(a,e),null!==r.querySelector(i)||"style"===t&&r.querySelector(bd(a))||"script"===t&&r.querySelector(Td(a))||(Vc(t=r.createElement("link"),"link",e),Qe(t),r.head.appendChild(t)))}},m:function(e,t){fd.m(e,t);var n=hd;if(n&&e){var r=t&&"string"==typeof t.as?t.as:"script",i='link[rel="modulepreload"][as="'+pt(r)+'"][href="'+pt(e)+'"]',a=i;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":a=yd(e)}if(!ud.has(a)&&(e=x({rel:"modulepreload",href:e},t),ud.set(a,e),null===n.querySelector(i))){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Td(a)))return}Vc(r=n.createElement("link"),"link",e),Qe(r),n.head.appendChild(r)}}},X:function(e,t){fd.X(e,t);var n=hd;if(n&&e){var r=qe(n).hoistableScripts,i=yd(e),a=r.get(i);a||((a=n.querySelector(Td(i)))||(e=x({src:e,async:!0},t),(t=ud.get(i))&&Sd(e,t),Qe(a=n.createElement("script")),Vc(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},r.set(i,a))}},S:function(e,t,n){fd.S(e,t,n);var r=hd;if(r&&e){var i=qe(r).hoistableStyles,a=md(e);t=t||"default";var o=i.get(a);if(!o){var l={loading:0,preload:null};if(o=r.querySelector(bd(a)))l.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":t},n),(n=ud.get(a))&&wd(e,n);var s=o=r.createElement("link");Qe(s),Vc(s,"link",e),s._p=new Promise((function(e,t){s.onload=e,s.onerror=t})),s.addEventListener("load",(function(){l.loading|=1})),s.addEventListener("error",(function(){l.loading|=2})),l.loading|=4,_d(o,t,r)}o={type:"stylesheet",instance:o,count:1,state:l},i.set(a,o)}}},M:function(e,t){fd.M(e,t);var n=hd;if(n&&e){var r=qe(n).hoistableScripts,i=yd(e),a=r.get(i);a||((a=n.querySelector(Td(i)))||(e=x({src:e,async:!0,type:"module"},t),(t=ud.get(i))&&Sd(e,t),Qe(a=n.createElement("script")),Vc(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},r.set(i,a))}}};var hd="undefined"==typeof document?null:document;function pd(e,t,n){var r=hd;if(r&&"string"==typeof t&&t){var i=pt(t);i='link[rel="'+e+'"][href="'+i+'"]',"string"==typeof n&&(i+='[crossorigin="'+n+'"]'),cd.has(i)||(cd.add(i),e={rel:e,crossOrigin:n,href:t},null===r.querySelector(i)&&(Vc(t=r.createElement("link"),"link",e),Qe(t),r.head.appendChild(t)))}}function gd(e,t,n,r){var i,a,l,s,u=(u=Q.current)?dd(u):null;if(!u)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return"string"==typeof n.precedence&&"string"==typeof n.href?(t=md(n.href),(r=(n=qe(u).hoistableStyles).get(t))||(r={type:"style",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if("stylesheet"===n.rel&&"string"==typeof n.href&&"string"==typeof n.precedence){e=md(n.href);var c=qe(u).hoistableStyles,d=c.get(e);if(d||(u=u.ownerDocument||u,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,d),(c=u.querySelector(bd(e)))&&!c._p&&(d.instance=c,d.state.loading=5),ud.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},ud.set(e,n),c||(i=u,a=e,l=n,s=d.state,i.querySelector('link[rel="preload"][as="style"]['+a+"]")?s.loading=1:(a=i.createElement("link"),s.preload=a,a.addEventListener("load",(function(){return s.loading|=1})),a.addEventListener("error",(function(){return s.loading|=2})),Vc(a,"link",l),Qe(a),i.head.appendChild(a))))),t&&null===r)throw Error(o(528,""));return d}if(t&&null!==r)throw Error(o(529,""));return null;case"script":return t=n.async,"string"==typeof(n=n.src)&&t&&"function"!=typeof t&&"symbol"!=typeof t?(t=yd(n),(r=(n=qe(u).hoistableScripts).get(t))||(r={type:"script",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function md(e){return'href="'+pt(e)+'"'}function bd(e){return'link[rel="stylesheet"]['+e+"]"}function vd(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function yd(e){return'[src="'+pt(e)+'"]'}function Td(e){return"script[async]"+e}function Ed(e,t,n){if(t.count++,null===t.instance)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+pt(n.href)+'"]');if(r)return t.instance=r,Qe(r),r;var i=x({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return Qe(r=(e.ownerDocument||e).createElement("style")),Vc(r,"style",i),_d(r,n.precedence,e),t.instance=r;case"stylesheet":i=md(n.href);var a=e.querySelector(bd(i));if(a)return t.state.loading|=4,t.instance=a,Qe(a),a;r=vd(n),(i=ud.get(i))&&wd(r,i),Qe(a=(e.ownerDocument||e).createElement("link"));var l=a;return l._p=new Promise((function(e,t){l.onload=e,l.onerror=t})),Vc(a,"link",r),t.state.loading|=4,_d(a,n.precedence,e),t.instance=a;case"script":return a=yd(n.src),(i=e.querySelector(Td(a)))?(t.instance=i,Qe(i),i):(r=n,(i=ud.get(a))&&Sd(r=x({},n),i),Qe(i=(e=e.ownerDocument||e).createElement("script")),Vc(i,"link",r),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(o(443,t.type))}else"stylesheet"===t.type&&!(4&t.state.loading)&&(r=t.instance,t.state.loading|=4,_d(r,n.precedence,e));return t.instance}function _d(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var l=r[o];if(l.dataset.precedence===t)a=l;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=9===n.nodeType?n.head:n).insertBefore(e,t.firstChild)}function wd(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.title&&(e.title=t.title)}function Sd(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.integrity&&(e.integrity=t.integrity)}var Od=null;function Ld(e,t,n){if(null===Od){var r=new Map,i=Od=new Map;i.set(n,r)}else(r=(i=Od).get(n))||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Xe]||a[Pe]||"link"===e&&"stylesheet"===a.getAttribute("rel"))&&"http://www.w3.org/2000/svg"!==a.namespaceURI){var o=a.getAttribute(t)||"";o=e+o;var l=r.get(o);l?l.push(a):r.set(o,[a])}}return r}function Nd(e,t,n){(e=e.ownerDocument||e).head.insertBefore(n,"title"===t?e.querySelector("head > title"):null)}function Ad(e){return!!("stylesheet"!==e.type||3&e.state.loading)}var Rd=null;function xd(){}function kd(){if(this.count--,0===this.count)if(this.stylesheets)Dd(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}var Cd=null;function Dd(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,Cd=new Map,t.forEach(Md,e),Cd=null,kd.call(e))}function Md(e,t){if(!(4&t.state.loading)){var n=Cd.get(e);if(n)var r=n.get(null);else{n=new Map,Cd.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a<i.length;a++){var o=i[a];"LINK"!==o.nodeName&&"not all"===o.getAttribute("media")||(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}o=(i=t.instance).getAttribute("data-precedence"),(a=n.get(o)||r)===r&&n.set(null,i),n.set(o,i),this.count++,r=kd.bind(this),i.addEventListener("load",r),i.addEventListener("error",r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=9===e.nodeType?e.head:e).insertBefore(i,e.firstChild),t.state.loading|=4}}var Id={$$typeof:g,Provider:null,Consumer:null,_currentValue:H,_currentValue2:H,_threadCount:0};function Bd(e,t,n,r,i,a,o,l){this.tag=1,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=xe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xe(0),this.hiddenUpdates=xe(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.incompleteTransitions=new Map}function Pd(e,t,n,r,i,a){i=function(e){return e?e=kr:kr}(i),null===r.context?r.context=i:r.pendingContext=i,(r=xl(t)).payload={element:n},null!==(a=void 0===a?null:a)&&(r.callback=a),null!==(n=kl(e,r,t))&&(ku(n,0,t),Cl(n,e,t))}function zd(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Ud(e,t){zd(e,t),(e=e.alternate)&&zd(e,t)}function Fd(e){if(13===e.tag){var t=Ar(e,67108864);null!==t&&ku(t,0,67108864),Ud(e,67108864)}}var Wd=!0;function Hd(e,t,n,r){var i=R.T;R.T=null;var a=W.p;try{W.p=2,Xd(e,t,n,r)}finally{W.p=a,R.T=i}}function Yd(e,t,n,r){var i=R.T;R.T=null;var a=W.p;try{W.p=8,Xd(e,t,n,r)}finally{W.p=a,R.T=i}}function Xd(e,t,n,r){if(Wd){var i=Vd(r);if(null===i)Dc(e,t,r,jd,n),rf(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Qd=af(Qd,e,t,n,r,i),!0;case"dragenter":return Jd=af(Jd,e,t,n,r,i),!0;case"mouseover":return Zd=af(Zd,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return Kd.set(a,af(Kd.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":return a=i.pointerId,ef.set(a,af(ef.get(a)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(rf(e,r),4&t&&-1<nf.indexOf(e)){for(;null!==i;){var a=Ge(i);if(null!==a)switch(a.tag){case 3:if((a=a.stateNode).current.memoizedState.isDehydrated){var o=Se(a.pendingLanes);if(0!==o){var l=a;for(l.pendingLanes|=2,l.entangledLanes|=2;o;){var s=1<<31-ye(o);l.entanglements[1]|=s,o&=~s}pc(a),!(6&Ks)&&(yu=le()+500,gc(0,!1))}}break;case 13:null!==(l=Ar(a,2))&&ku(l,0,2),Pu(),Ud(a,2)}if(null===(a=Vd(r))&&Dc(e,t,r,jd,n),a===i)break;i=a}null!==i&&r.stopPropagation()}else Dc(e,t,r,null,n)}}function Vd(e){return Gd(e=xt(e))}var jd=null;function Gd(e){if(jd=null,null!==(e=je(e))){var t=B(e);if(null===t)e=null;else{var n=t.tag;if(13===n){if(null!==(e=P(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return jd=e,null}function $d(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(se()){case ue:return 2;case ce:return 8;case de:case fe:return 32;case he:return 268435456;default:return 32}default:return 32}}var qd=!1,Qd=null,Jd=null,Zd=null,Kd=new Map,ef=new Map,tf=[],nf="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".split(" ");function rf(e,t){switch(e){case"focusin":case"focusout":Qd=null;break;case"dragenter":case"dragleave":Jd=null;break;case"mouseover":case"mouseout":Zd=null;break;case"pointerover":case"pointerout":Kd.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ef.delete(t.pointerId)}}function af(e,t,n,r,i,a){return null===e||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},null!==t&&null!==(t=Ge(t))&&Fd(t),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function of(e){var t=je(e.target);if(null!==t){var n=B(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=P(n)))return e.blockedOn=t,void function(e){var t=W.p;try{return W.p=e,function(){if(13===n.tag){var e=Ru(),t=Ar(n,e);null!==t&&ku(t,0,e),Ud(n,e)}}()}finally{W.p=t}}(e.priority)}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function lf(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Vd(e.nativeEvent);if(null!==n)return null!==(t=Ge(n))&&Fd(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);Rt=r,n.target.dispatchEvent(r),Rt=null,t.shift()}return!0}function sf(e,t,n){lf(e)&&n.delete(t)}function uf(){qd=!1,null!==Qd&&lf(Qd)&&(Qd=null),null!==Jd&&lf(Jd)&&(Jd=null),null!==Zd&&lf(Zd)&&(Zd=null),Kd.forEach(sf),ef.forEach(sf)}function cf(e,t){e.blockedOn===t&&(e.blockedOn=null,qd||(qd=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,uf)))}var df=null;function ff(e){df!==e&&(df=e,r.unstable_scheduleCallback(r.unstable_NormalPriority,(function(){df===e&&(df=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if("function"!=typeof r){if(null===Gd(r||n))continue;break}var a=Ge(n);null!==a&&(e.splice(t,3),t-=3,uo(a,{pending:!0,data:i,method:n.method,action:r},r,i))}})))}function hf(e){function t(t){return cf(t,e)}null!==Qd&&cf(Qd,e),null!==Jd&&cf(Jd,e),null!==Zd&&cf(Zd,e),Kd.forEach(t),ef.forEach(t);for(var n=0;n<tf.length;n++){var r=tf[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<tf.length&&null===(n=tf[0]).blockedOn;)of(n),null===n.blockedOn&&tf.shift();if(null!=(n=(e.ownerDocument||e).$$reactFormReplay))for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[ze]||null;if("function"==typeof a)o||ff(n);else if(o){var l=null;if(a&&a.hasAttribute("formAction")){if(i=a,o=a[ze]||null)l=o.formAction;else if(null!==Gd(i))continue}else l=o.action;"function"==typeof l?n[r+1]=l:(n.splice(r,3),r-=3),ff(n)}}}function pf(e){this._internalRoot=e}function gf(e){this._internalRoot=e}gf.prototype.render=pf.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(o(409));Pd(t.current,Ru(),e,t,null,null)},gf.prototype.unmount=pf.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;0===e.tag&&ec(),Pd(e.current,2,null,e,null,null),Pu(),t[Ue]=null}},gf.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ie();e={blockedOn:null,target:e,priority:t};for(var n=0;n<tf.length&&0!==t&&t<tf[n].priority;n++);tf.splice(n,0,e),0===n&&of(e)}};var mf=i.version;if("19.0.0"!==mf)throw Error(o(527,mf,"19.0.0"));W.findDOMNode=function(e){var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(o(188));throw e=Object.keys(e).join(","),Error(o(268,e))}return e=function(e){var t=e.alternate;if(!t){if(null===(t=B(e)))throw Error(o(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var a=i.alternate;if(null===a){if(null!==(r=i.return)){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return z(i),e;if(a===r)return z(i),t;a=a.sibling}throw Error(o(188))}if(n.return!==r.return)n=i,r=a;else{for(var l=!1,s=i.child;s;){if(s===n){l=!0,n=i,r=a;break}if(s===r){l=!0,r=i,n=a;break}s=s.sibling}if(!l){for(s=a.child;s;){if(s===n){l=!0,n=a,r=i;break}if(s===r){l=!0,r=a,n=i;break}s=s.sibling}if(!l)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(3!==n.tag)throw Error(o(188));return n.stateNode.current===n?e:t}(t),null===(e=null!==e?U(e):null)?null:e.stateNode};var bf={bundleType:0,version:"19.0.0",rendererPackageName:"react-dom",currentDispatcherRef:R,findFiberByHostInstance:je,reconcilerVersion:"19.0.0"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var vf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vf.isDisabled&&vf.supportsFiber)try{me=vf.inject(bf),be=vf}catch(e){}}t.createRoot=function(e,t){if(!(n=e)||1!==n.nodeType&&9!==n.nodeType&&11!==n.nodeType)throw Error(o(299));var n,r=!1,i="",a=Mo,l=Io,s=Bo;return null!=t&&(!0===t.unstable_strictMode&&(r=!0),void 0!==t.identifierPrefix&&(i=t.identifierPrefix),void 0!==t.onUncaughtError&&(a=t.onUncaughtError),void 0!==t.onCaughtError&&(l=t.onCaughtError),void 0!==t.onRecoverableError&&(s=t.onRecoverableError),void 0!==t.unstable_transitionCallbacks&&t.unstable_transitionCallbacks),t=function(e,t,n,r,i,a,o,l,s,u,c,d){return e=new Bd(e,t,n,o,l,s,u,d),t=1,!0===a&&(t|=24),a=Ms(3,null,null,t),e.current=a,a.stateNode=e,(t=Ui()).refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Al(a),e}(e,1,!1,null,0,r,i,a,l,s,0,null),e[Ue]=t.current,kc(8===e.nodeType?e.parentNode:e),new pf(t)}},849:(e,t)=>{function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<a(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,o=i>>>1;r<o;){var l=2*(r+1)-1,s=e[l],u=l+1,c=e[u];if(0>a(s,n))u<i&&0>a(c,s)?(e[r]=c,e[u]=n,r=u):(e[r]=s,e[l]=n,r=l);else{if(!(u<i&&0>a(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(t.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var o=performance;t.unstable_now=function(){return o.now()}}else{var l=Date,s=l.now();t.unstable_now=function(){return l.now()-s}}var u=[],c=[],d=1,f=null,h=3,p=!1,g=!1,m=!1,b="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,y="undefined"!=typeof setImmediate?setImmediate:null;function T(e){for(var t=r(c);null!==t;){if(null===t.callback)i(c);else{if(!(t.startTime<=e))break;i(c),t.sortIndex=t.expirationTime,n(u,t)}t=r(c)}}function E(e){if(m=!1,T(e),!g)if(null!==r(u))g=!0,k();else{var t=r(c);null!==t&&C(E,t.startTime-e)}}var _,w=!1,S=-1,O=5,L=-1;function N(){return!(t.unstable_now()-L<O)}function A(){if(w){var e=t.unstable_now();L=e;var n=!0;try{e:{g=!1,m&&(m=!1,v(S),S=-1),p=!0;var a=h;try{t:{for(T(e),f=r(u);null!==f&&!(f.expirationTime>e&&N());){var o=f.callback;if("function"==typeof o){f.callback=null,h=f.priorityLevel;var l=o(f.expirationTime<=e);if(e=t.unstable_now(),"function"==typeof l){f.callback=l,T(e),n=!0;break t}f===r(u)&&i(u),T(e)}else i(u);f=r(u)}if(null!==f)n=!0;else{var s=r(c);null!==s&&C(E,s.startTime-e),n=!1}}break e}finally{f=null,h=a,p=!1}n=void 0}}finally{n?_():w=!1}}}if("function"==typeof y)_=function(){y(A)};else if("undefined"!=typeof MessageChannel){var R=new MessageChannel,x=R.port2;R.port1.onmessage=A,_=function(){x.postMessage(null)}}else _=function(){b(A,0)};function k(){w||(w=!0,_())}function C(e,n){S=b((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){g||p||(g=!0,k())},t.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"):O=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return h},t.unstable_getFirstCallbackNode=function(){return r(u)},t.unstable_next=function(e){switch(h){case 1:case 2:case 3:var t=3;break;default:t=h}var n=h;h=t;try{return e()}finally{h=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=h;h=e;try{return t()}finally{h=n}},t.unstable_scheduleCallback=function(e,i,a){var o=t.unstable_now();switch(a="object"==typeof a&&null!==a&&"number"==typeof(a=a.delay)&&0<a?o+a:o,e){case 1:var l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}return e={id:d++,callback:i,priorityLevel:e,startTime:a,expirationTime:l=a+l,sortIndex:-1},a>o?(e.sortIndex=a,n(c,e),null===r(u)&&e===r(c)&&(m?(v(S),S=-1):m=!0,C(E,a-o))):(e.sortIndex=l,n(u,e),g||p||(g=!0,k())),e},t.unstable_shouldYield=N,t.unstable_wrapCallback=function(e){var t=h;return function(){var n=h;h=t;try{return e.apply(this,arguments)}finally{h=n}}}},884:(e,t,n)=>{!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(553)}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var a=r[e]={exports:{}};return n[e](a,a.exports,i),a.exports}i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};i.r(a),i.d(a,{Action:()=>p,Actions:()=>g,BorderNode:()=>z,BorderSet:()=>y,CLASSES:()=>l,DefaultMax:()=>B,DefaultMin:()=>I,DockLocation:()=>h,DropInfo:()=>v,FlexLayoutVersion:()=>se,I18nLabel:()=>o,ICloseType:()=>W,Layout:()=>oe,LayoutInternal:()=>le,LayoutWindow:()=>M,Model:()=>P,Node:()=>T,Orientation:()=>d,Rect:()=>f,RowNode:()=>D,TabNode:()=>E,TabSetNode:()=>C});var o,l,s=i(36),u=i(47),c=i(884);class d{static flip(e){return e===d.HORZ?d.VERT:d.HORZ}constructor(e){this._name=e}getName(){return this._name}toString(){return this._name}}d.HORZ=new d("horz"),d.VERT=new d("vert");class f{static empty(){return new f(0,0,0,0)}static fromJson(e){return new f(e.x,e.y,e.width,e.height)}constructor(e,t,n,r){this.x=e,this.y=t,this.width=n,this.height=r}toJson(){return{x:this.x,y:this.y,width:this.width,height:this.height}}snap(e){this.x=Math.round(this.x/e)*e,this.y=Math.round(this.y/e)*e,this.width=Math.round(this.width/e)*e,this.height=Math.round(this.height/e)*e}static getBoundingClientRect(e){let{x:t,y:n,width:r,height:i}=e.getBoundingClientRect();return new f(t,n,r,i)}static getContentRect(e){const t=e.getBoundingClientRect(),n=window.getComputedStyle(e),r=parseFloat(n.paddingLeft),i=parseFloat(n.paddingRight),a=parseFloat(n.paddingTop),o=parseFloat(n.paddingBottom),l=parseFloat(n.borderLeftWidth),s=parseFloat(n.borderRightWidth),u=parseFloat(n.borderTopWidth),c=parseFloat(n.borderBottomWidth),d=t.width-l-r-i-s,h=t.height-u-a-o-c;return new f(t.left+l+r,t.top+u+a,d,h)}static fromDomRect(e){return new f(e.x,e.y,e.width,e.height)}relativeTo(e){return new f(this.x-e.x,this.y-e.y,this.width,this.height)}clone(){return new f(this.x,this.y,this.width,this.height)}equals(e){return this.x===(null==e?void 0:e.x)&&this.y===(null==e?void 0:e.y)&&this.width===(null==e?void 0:e.width)&&this.height===(null==e?void 0:e.height)}equalSize(e){return this.width===(null==e?void 0:e.width)&&this.height===(null==e?void 0:e.height)}getBottom(){return this.y+this.height}getRight(){return this.x+this.width}getCenter(){return{x:this.x+this.width/2,y:this.y+this.height/2}}positionElement(e,t){this.styleWithPosition(e.style,t)}styleWithPosition(e,t="absolute"){return e.left=this.x+"px",e.top=this.y+"px",e.width=Math.max(0,this.width)+"px",e.height=Math.max(0,this.height)+"px",e.position=t,e}contains(e,t){return this.x<=e&&e<=this.getRight()&&this.y<=t&&t<=this.getBottom()}removeInsets(e){return new f(this.x+e.left,this.y+e.top,Math.max(0,this.width-e.left-e.right),Math.max(0,this.height-e.top-e.bottom))}centerInRect(e){this.x=(e.width-this.width)/2,this.y=(e.height-this.height)/2}_getSize(e){let t=this.width;return e===d.VERT&&(t=this.height),t}toString(){return"(Rect: x="+this.x+", y="+this.y+", width="+this.width+", height="+this.height+")"}}class h{static getByName(e){return h.values.get(e)}static getLocation(e,t,n){if(t=(t-e.x)/e.width,n=(n-e.y)/e.height,t>=.25&&t<.75&&n>=.25&&n<.75)return h.CENTER;const r=n>=1-t;return n>=t?r?h.BOTTOM:h.LEFT:r?h.RIGHT:h.TOP}constructor(e,t,n){this.name=e,this.orientation=t,this.indexPlus=n,h.values.set(this.name,this)}getName(){return this.name}getOrientation(){return this.orientation}getDockRect(e){return this===h.TOP?new f(e.x,e.y,e.width,e.height/2):this===h.BOTTOM?new f(e.x,e.getBottom()-e.height/2,e.width,e.height/2):this===h.LEFT?new f(e.x,e.y,e.width/2,e.height):this===h.RIGHT?new f(e.getRight()-e.width/2,e.y,e.width/2,e.height):e.clone()}split(e,t){return this===h.TOP?{start:new f(e.x,e.y,e.width,t),end:new f(e.x,e.y+t,e.width,e.height-t)}:this===h.LEFT?{start:new f(e.x,e.y,t,e.height),end:new f(e.x+t,e.y,e.width-t,e.height)}:this===h.RIGHT?{start:new f(e.getRight()-t,e.y,t,e.height),end:new f(e.x,e.y,e.width-t,e.height)}:{start:new f(e.x,e.getBottom()-t,e.width,t),end:new f(e.x,e.y,e.width,e.height-t)}}reflect(){return this===h.TOP?h.BOTTOM:this===h.LEFT?h.RIGHT:this===h.RIGHT?h.LEFT:h.TOP}toString(){return"(DockLocation: name="+this.name+", orientation="+this.orientation+")"}}h.values=new Map,h.TOP=new h("top",d.VERT,0),h.BOTTOM=new h("bottom",d.VERT,1),h.LEFT=new h("left",d.HORZ,0),h.RIGHT=new h("right",d.HORZ,1),h.CENTER=new h("center",d.VERT,0),function(e){e.Close_Tab="Close",e.Close_Tabset="Close tab set",e.Active_Tabset="Active tab set",e.Move_Tabset="Move tab set",e.Move_Tabs="Move tabs(?)",e.Maximize="Maximize tab set",e.Restore="Restore tab set",e.Popout_Tab="Popout selected tab",e.Overflow_Menu_Tooltip="Hidden tabs",e.Error_rendering_component="Error rendering component"}(o||(o={})),function(e){e.FLEXLAYOUT__BORDER="flexlayout__border",e.FLEXLAYOUT__BORDER_="flexlayout__border_",e.FLEXLAYOUT__BORDER_TAB_CONTENTS="flexlayout__border_tab_contents",e.FLEXLAYOUT__BORDER_BUTTON="flexlayout__border_button",e.FLEXLAYOUT__BORDER_BUTTON_="flexlayout__border_button_",e.FLEXLAYOUT__BORDER_BUTTON_CONTENT="flexlayout__border_button_content",e.FLEXLAYOUT__BORDER_BUTTON_LEADING="flexlayout__border_button_leading",e.FLEXLAYOUT__BORDER_BUTTON_TRAILING="flexlayout__border_button_trailing",e.FLEXLAYOUT__BORDER_BUTTON__SELECTED="flexlayout__border_button--selected",e.FLEXLAYOUT__BORDER_BUTTON__UNSELECTED="flexlayout__border_button--unselected",e.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON_OVERFLOW="flexlayout__border_toolbar_button_overflow",e.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON_OVERFLOW_="flexlayout__border_toolbar_button_overflow_",e.FLEXLAYOUT__BORDER_INNER="flexlayout__border_inner",e.FLEXLAYOUT__BORDER_INNER_="flexlayout__border_inner_",e.FLEXLAYOUT__BORDER_INNER_TAB_CONTAINER="flexlayout__border_inner_tab_container",e.FLEXLAYOUT__BORDER_INNER_TAB_CONTAINER_="flexlayout__border_inner_tab_container_",e.FLEXLAYOUT__BORDER_TAB_DIVIDER="flexlayout__border_tab_divider",e.FLEXLAYOUT__BORDER_SIZER="flexlayout__border_sizer",e.FLEXLAYOUT__BORDER_TOOLBAR="flexlayout__border_toolbar",e.FLEXLAYOUT__BORDER_TOOLBAR_="flexlayout__border_toolbar_",e.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON="flexlayout__border_toolbar_button",e.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON_FLOAT="flexlayout__border_toolbar_button-float",e.FLEXLAYOUT__DRAG_RECT="flexlayout__drag_rect",e.FLEXLAYOUT__EDGE_RECT="flexlayout__edge_rect",e.FLEXLAYOUT__EDGE_RECT_TOP="flexlayout__edge_rect_top",e.FLEXLAYOUT__EDGE_RECT_LEFT="flexlayout__edge_rect_left",e.FLEXLAYOUT__EDGE_RECT_BOTTOM="flexlayout__edge_rect_bottom",e.FLEXLAYOUT__EDGE_RECT_RIGHT="flexlayout__edge_rect_right",e.FLEXLAYOUT__ERROR_BOUNDARY_CONTAINER="flexlayout__error_boundary_container",e.FLEXLAYOUT__ERROR_BOUNDARY_CONTENT="flexlayout__error_boundary_content",e.FLEXLAYOUT__FLOATING_WINDOW_CONTENT="flexlayout__floating_window_content",e.FLEXLAYOUT__LAYOUT="flexlayout__layout",e.FLEXLAYOUT__LAYOUT_MOVEABLES="flexlayout__layout_moveables",e.FLEXLAYOUT__LAYOUT_OVERLAY="flexlayout__layout_overlay",e.FLEXLAYOUT__LAYOUT_TAB_STAMPS="flexlayout__layout_tab_stamps",e.FLEXLAYOUT__LAYOUT_MAIN="flexlayout__layout_main",e.FLEXLAYOUT__LAYOUT_BORDER_CONTAINER="flexlayout__layout_border_container",e.FLEXLAYOUT__LAYOUT_BORDER_CONTAINER_INNER="flexlayout__layout_border_container_inner",e.FLEXLAYOUT__OUTLINE_RECT="flexlayout__outline_rect",e.FLEXLAYOUT__OUTLINE_RECT_EDGE="flexlayout__outline_rect_edge",e.FLEXLAYOUT__SPLITTER="flexlayout__splitter",e.FLEXLAYOUT__SPLITTER_EXTRA="flexlayout__splitter_extra",e.FLEXLAYOUT__SPLITTER_="flexlayout__splitter_",e.FLEXLAYOUT__SPLITTER_BORDER="flexlayout__splitter_border",e.FLEXLAYOUT__SPLITTER_DRAG="flexlayout__splitter_drag",e.FLEXLAYOUT__SPLITTER_HANDLE="flexlayout__splitter_handle",e.FLEXLAYOUT__SPLITTER_HANDLE_HORZ="flexlayout__splitter_handle_horz",e.FLEXLAYOUT__SPLITTER_HANDLE_VERT="flexlayout__splitter_handle_vert",e.FLEXLAYOUT__ROW="flexlayout__row",e.FLEXLAYOUT__TAB="flexlayout__tab",e.FLEXLAYOUT__TAB_POSITION="flexlayout__tab_position",e.FLEXLAYOUT__TAB_MOVEABLE="flexlayout__tab_moveable",e.FLEXLAYOUT__TAB_OVERLAY="flexlayout__tab_overlay",e.FLEXLAYOUT__TABSET="flexlayout__tabset",e.FLEXLAYOUT__TABSET_CONTAINER="flexlayout__tabset_container",e.FLEXLAYOUT__TABSET_HEADER="flexlayout__tabset_header",e.FLEXLAYOUT__TABSET_HEADER_CONTENT="flexlayout__tabset_header_content",e.FLEXLAYOUT__TABSET_MAXIMIZED="flexlayout__tabset-maximized",e.FLEXLAYOUT__TABSET_SELECTED="flexlayout__tabset-selected",e.FLEXLAYOUT__TABSET_TAB_DIVIDER="flexlayout__tabset_tab_divider",e.FLEXLAYOUT__TABSET_CONTENT="flexlayout__tabset_content",e.FLEXLAYOUT__TABSET_TABBAR_INNER="flexlayout__tabset_tabbar_inner",e.FLEXLAYOUT__TABSET_TABBAR_INNER_="flexlayout__tabset_tabbar_inner_",e.FLEXLAYOUT__TABSET_TABBAR_INNER_TAB_CONTAINER="flexlayout__tabset_tabbar_inner_tab_container",e.FLEXLAYOUT__TABSET_TABBAR_INNER_TAB_CONTAINER_="flexlayout__tabset_tabbar_inner_tab_container_",e.FLEXLAYOUT__TABSET_TABBAR_OUTER="flexlayout__tabset_tabbar_outer",e.FLEXLAYOUT__TABSET_TABBAR_OUTER_="flexlayout__tabset_tabbar_outer_",e.FLEXLAYOUT__TAB_BORDER="flexlayout__tab_border",e.FLEXLAYOUT__TAB_BORDER_="flexlayout__tab_border_",e.FLEXLAYOUT__TAB_BUTTON="flexlayout__tab_button",e.FLEXLAYOUT__TAB_BUTTON_STRETCH="flexlayout__tab_button_stretch",e.FLEXLAYOUT__TAB_BUTTON_CONTENT="flexlayout__tab_button_content",e.FLEXLAYOUT__TAB_BUTTON_LEADING="flexlayout__tab_button_leading",e.FLEXLAYOUT__TAB_BUTTON_OVERFLOW="flexlayout__tab_button_overflow",e.FLEXLAYOUT__TAB_BUTTON_OVERFLOW_COUNT="flexlayout__tab_button_overflow_count",e.FLEXLAYOUT__TAB_BUTTON_TEXTBOX="flexlayout__tab_button_textbox",e.FLEXLAYOUT__TAB_BUTTON_TRAILING="flexlayout__tab_button_trailing",e.FLEXLAYOUT__TAB_BUTTON_STAMP="flexlayout__tab_button_stamp",e.FLEXLAYOUT__TAB_TOOLBAR="flexlayout__tab_toolbar",e.FLEXLAYOUT__TAB_TOOLBAR_BUTTON="flexlayout__tab_toolbar_button",e.FLEXLAYOUT__TAB_TOOLBAR_ICON="flexlayout__tab_toolbar_icon",e.FLEXLAYOUT__TAB_TOOLBAR_BUTTON_="flexlayout__tab_toolbar_button-",e.FLEXLAYOUT__TAB_TOOLBAR_BUTTON_FLOAT="flexlayout__tab_toolbar_button-float",e.FLEXLAYOUT__TAB_TOOLBAR_STICKY_BUTTONS_CONTAINER="flexlayout__tab_toolbar_sticky_buttons_container",e.FLEXLAYOUT__TAB_TOOLBAR_BUTTON_CLOSE="flexlayout__tab_toolbar_button-close",e.FLEXLAYOUT__POPUP_MENU_CONTAINER="flexlayout__popup_menu_container",e.FLEXLAYOUT__POPUP_MENU_ITEM="flexlayout__popup_menu_item",e.FLEXLAYOUT__POPUP_MENU_ITEM__SELECTED="flexlayout__popup_menu_item--selected",e.FLEXLAYOUT__POPUP_MENU="flexlayout__popup_menu",e.FLEXLAYOUT__MINI_SCROLLBAR="flexlayout__mini_scrollbar",e.FLEXLAYOUT__MINI_SCROLLBAR_CONTAINER="flexlayout__mini_scrollbar_container"}(l||(l={}));class p{constructor(e,t){this.type=e,this.data=t}}class g{static addNode(e,t,n,r,i){return new p(g.ADD_NODE,{json:e,toNode:t,location:n.getName(),index:r,select:i})}static moveNode(e,t,n,r,i){return new p(g.MOVE_NODE,{fromNode:e,toNode:t,location:n.getName(),index:r,select:i})}static deleteTab(e){return new p(g.DELETE_TAB,{node:e})}static deleteTabset(e){return new p(g.DELETE_TABSET,{node:e})}static renameTab(e,t){return new p(g.RENAME_TAB,{node:e,text:t})}static selectTab(e){return new p(g.SELECT_TAB,{tabNode:e})}static setActiveTabset(e,t){return new p(g.SET_ACTIVE_TABSET,{tabsetNode:e,windowId:t})}static adjustWeights(e,t){return new p(g.ADJUST_WEIGHTS,{nodeId:e,weights:t})}static adjustBorderSplit(e,t){return new p(g.ADJUST_BORDER_SPLIT,{node:e,pos:t})}static maximizeToggle(e,t){return new p(g.MAXIMIZE_TOGGLE,{node:e,windowId:t})}static updateModelAttributes(e){return new p(g.UPDATE_MODEL_ATTRIBUTES,{json:e})}static updateNodeAttributes(e,t){return new p(g.UPDATE_NODE_ATTRIBUTES,{node:e,json:t})}static popoutTab(e){return new p(g.POPOUT_TAB,{node:e})}static popoutTabset(e){return new p(g.POPOUT_TABSET,{node:e})}static closeWindow(e){return new p(g.CLOSE_WINDOW,{windowId:e})}static createWindow(e,t){return new p(g.CREATE_WINDOW,{layout:e,rect:t})}}g.ADD_NODE="FlexLayout_AddNode",g.MOVE_NODE="FlexLayout_MoveNode",g.DELETE_TAB="FlexLayout_DeleteTab",g.DELETE_TABSET="FlexLayout_DeleteTabset",g.RENAME_TAB="FlexLayout_RenameTab",g.SELECT_TAB="FlexLayout_SelectTab",g.SET_ACTIVE_TABSET="FlexLayout_SetActiveTabset",g.ADJUST_WEIGHTS="FlexLayout_AdjustWeights",g.ADJUST_BORDER_SPLIT="FlexLayout_AdjustBorderSplit",g.MAXIMIZE_TOGGLE="FlexLayout_MaximizeToggle",g.UPDATE_MODEL_ATTRIBUTES="FlexLayout_UpdateModelAttributes",g.UPDATE_NODE_ATTRIBUTES="FlexLayout_UpdateNodeAttributes",g.POPOUT_TAB="FlexLayout_PopoutTab",g.POPOUT_TABSET="FlexLayout_PopoutTabset",g.CLOSE_WINDOW="FlexLayout_CloseWindow",g.CREATE_WINDOW="FlexLayout_CreateWindow";class m{constructor(e,t,n,r){this.name=e,this.alias=void 0,this.modelName=t,this.defaultValue=n,this.alwaysWriteJson=r,this.required=!1,this.fixed=!1,this.type="any"}setType(e){return this.type=e,this}setAlias(e){return this.alias=e,this}setDescription(e){this.description=e}setRequired(){return this.required=!0,this}setFixed(){return this.fixed=!0,this}setpairedAttr(e){this.pairedAttr=e}setPairedType(e){this.pairedType=e}}m.NUMBER="number",m.STRING="string",m.BOOLEAN="boolean";class b{constructor(){this.attributes=[],this.nameToAttribute=new Map}addWithAll(e,t,n,r){const i=new m(e,t,n,r);return this.attributes.push(i),this.nameToAttribute.set(e,i),i}addInherited(e,t){return this.addWithAll(e,t,void 0,!1)}add(e,t,n){return this.addWithAll(e,void 0,t,n)}getAttributes(){return this.attributes}getModelName(e){const t=this.nameToAttribute.get(e);if(void 0!==t)return t.modelName}toJson(e,t){for(const n of this.attributes){const r=t[n.name];(n.alwaysWriteJson||r!==n.defaultValue)&&(e[n.name]=r)}}fromJson(e,t){for(const n of this.attributes){let r=e[n.name];void 0===r&&n.alias&&(r=e[n.alias]),t[n.name]=void 0===r?n.defaultValue:r}}update(e,t){for(const n of this.attributes)if(e.hasOwnProperty(n.name)){const r=e[n.name];void 0===r?delete t[n.name]:t[n.name]=r}}setDefaults(e){for(const t of this.attributes)e[t.name]=t.defaultValue}pairAttributes(e,t){for(const n of t.attributes)if(n.modelName&&this.nameToAttribute.has(n.modelName)){const t=this.nameToAttribute.get(n.modelName);t.setpairedAttr(n),n.setpairedAttr(t),t.setPairedType(e)}}toTypescriptInterface(e,t){var n,r;const i=[],a=this.attributes.sort(((e,t)=>e.name.localeCompare(t.name)));i.push("export interface I"+e+"Attributes {");for(let e=0;e<a.length;e++){const o=a[e];let l,s,u=o.type,c=o;void 0!==c.defaultValue?l=c.defaultValue:void 0!==c.modelName&&void 0!==t&&void 0!==t.nameToAttribute.get(c.modelName)&&(s=c.modelName,c=t.nameToAttribute.get(s),l=c.defaultValue,u=c.type);let d=JSON.stringify(l);const f=c.required?"":"?";let h="\t/**\n\t ";o.description?h+=o.description:o.pairedType&&(null===(n=o.pairedAttr)||void 0===n?void 0:n.description)&&(h+=`Value for ${o.pairedType} attribute ${o.pairedAttr.name} if not overridden`,h+="\n\n\t ",h+=null===(r=o.pairedAttr)||void 0===r?void 0:r.description),h+="\n\n\t ",o.fixed?h+=`Fixed value: ${d}`:h+=s?`Default: inherited from Global attribute ${o.modelName} (default ${d})`:`Default: ${d}`,h+="\n\t */",i.push(h),i.push("\t"+o.name+f+": "+u+";\n")}return i.push("}"),i.join("\n")}}class v{constructor(e,t,n,r,i){this.node=e,this.rect=t,this.location=n,this.index=r,this.className=i}}class y{static fromJson(e,t){const n=new y(t);n.borders=e.map((e=>z.fromJson(e,t)));for(const e of n.borders)n.borderMap.set(e.getLocation(),e);return n}constructor(e){this.borders=[],this.borderMap=new Map,this.layoutHorizontal=!0}toJson(){return this.borders.map((e=>e.toJson()))}getLayoutHorizontal(){return this.layoutHorizontal}getBorders(){return this.borders}getBorderMap(){return this.borderMap}forEachNode(e){for(const t of this.borders){e(t,0);for(const n of t.getChildren())n.forEachNode(e,1)}}setPaths(){for(const e of this.borders){const t="/border/"+e.getLocation().getName();e.setPath(t);let n=0;for(const r of e.getChildren())r.setPath(t+"/t"+n),n++}}findDropTargetNode(e,t,n){for(const r of this.borders)if(r.isShowing()){const i=r.canDrop(e,t,n);if(void 0!==i)return i}}}class T{constructor(e){this.model=e,this.attributes={},this.children=[],this.rect=f.empty(),this.listeners=new Map,this.path=""}getId(){let e=this.attributes.id;return void 0!==e||(e=this.model.nextUniqueId(),this.setId(e)),e}getModel(){return this.model}getType(){return this.attributes.type}getParent(){return this.parent}getChildren(){return this.children}getRect(){return this.rect}getPath(){return this.path}getOrientation(){return void 0===this.parent?this.model.isRootOrientationVertical()?d.VERT:d.HORZ:d.flip(this.parent.getOrientation())}setEventListener(e,t){this.listeners.set(e,t)}removeEventListener(e){this.listeners.delete(e)}setId(e){this.attributes.id=e}fireEvent(e,t){this.listeners.has(e)&&this.listeners.get(e)(t)}getAttr(e){let t=this.attributes[e];if(void 0===t){const n=this.getAttributeDefinitions().getModelName(e);void 0!==n&&(t=this.model.getAttribute(n))}return t}forEachNode(e,t){e(this,t),t++;for(const n of this.children)n.forEachNode(e,t)}setPaths(e){let t=0;for(const n of this.children){let r=e;"row"===n.getType()?n.getOrientation()===d.VERT?r+="/c"+t:r+="/r"+t:"tabset"===n.getType()?r+="/ts"+t:"tab"===n.getType()&&(r+="/t"+t),n.path=r,n.setPaths(r),t++}}setParent(e){this.parent=e}setRect(e){this.rect=e}setPath(e){this.path=e}setWeight(e){this.attributes.weight=e}setSelected(e){this.attributes.selected=e}findDropTargetNode(e,t,n,r){let i;if(this.rect.contains(n,r))if(void 0!==this.model.getMaximizedTabset(e))i=this.model.getMaximizedTabset(e).canDrop(t,n,r);else if(i=this.canDrop(t,n,r),void 0===i&&0!==this.children.length)for(const a of this.children)if(i=a.findDropTargetNode(e,t,n,r),void 0!==i)break;return i}canDrop(e,t,n){}canDockInto(e,t){if(null!=t){if(t.location===h.CENTER&&!1===t.node.isEnableDrop())return!1;if(t.location===h.CENTER&&"tabset"===e.getType()&&void 0!==e.getName())return!1;if(t.location!==h.CENTER&&!1===t.node.isEnableDivide())return!1;if(this.model.getOnAllowDrop())return this.model.getOnAllowDrop()(e,t)}return!0}removeChild(e){const t=this.children.indexOf(e);return-1!==t&&this.children.splice(t,1),t}addChild(e,t){return null!=t?this.children.splice(t,0,e):(this.children.push(e),t=this.children.length-1),e.parent=this,t}removeAll(){this.children=[]}styleWithPosition(e){return null==e&&(e={}),this.rect.styleWithPosition(e)}isEnableDivide(){return!0}toAttributeString(){return JSON.stringify(this.attributes,void 0,"\t")}}class E extends T{static fromJson(e,t,n=!0){return new E(t,e,n)}constructor(e,t,n=!0){super(e),this.tabRect=f.empty(),this.extra={},this.moveableElement=null,this.tabStamp=null,this.rendered=!1,this.visible=!1,E.attributeDefinitions.fromJson(t,this.attributes),!0===n&&e.addNode(this)}getName(){return this.getAttr("name")}getHelpText(){return this.getAttr("helpText")}getComponent(){return this.getAttr("component")}getWindowId(){return this.parent instanceof C?this.parent.getWindowId():P.MAIN_WINDOW_ID}getWindow(){const e=this.model.getwindowsMap().get(this.getWindowId());if(e)return e.window}getConfig(){return this.attributes.config}getExtraData(){return this.extra}isPoppedOut(){return this.getWindowId()!==P.MAIN_WINDOW_ID}isSelected(){return this.getParent().getSelectedNode()===this}getIcon(){return this.getAttr("icon")}isEnableClose(){return this.getAttr("enableClose")}getCloseType(){return this.getAttr("closeType")}isEnablePopout(){return this.getAttr("enablePopout")}isEnablePopoutIcon(){return this.getAttr("enablePopoutIcon")}isEnablePopoutOverlay(){return this.getAttr("enablePopoutOverlay")}isEnableDrag(){return this.getAttr("enableDrag")}isEnableRename(){return this.getAttr("enableRename")}isEnableWindowReMount(){return this.getAttr("enableWindowReMount")}getClassName(){return this.getAttr("className")}getContentClassName(){return this.getAttr("contentClassName")}getTabSetClassName(){return this.getAttr("tabsetClassName")}isEnableRenderOnDemand(){return this.getAttr("enableRenderOnDemand")}getMinWidth(){return this.getAttr("minWidth")}getMinHeight(){return this.getAttr("minHeight")}getMaxWidth(){return this.getAttr("maxWidth")}getMaxHeight(){return this.getAttr("maxHeight")}toJson(){const e={};return E.attributeDefinitions.toJson(e,this.attributes),e}saveScrollPosition(){this.moveableElement&&(this.scrollLeft=this.moveableElement.scrollLeft,this.scrollTop=this.moveableElement.scrollTop)}restoreScrollPosition(){this.scrollTop&&requestAnimationFrame((()=>{this.moveableElement&&this.scrollTop&&(this.moveableElement.scrollTop=this.scrollTop,this.moveableElement.scrollLeft=this.scrollLeft)}))}setRect(e){e.equals(this.rect)||(this.fireEvent("resize",{rect:e}),this.rect=e)}setVisible(e){e!==this.visible&&(this.fireEvent("visibility",{visible:e}),this.visible=e)}getScrollTop(){return this.scrollTop}setScrollTop(e){this.scrollTop=e}getScrollLeft(){return this.scrollLeft}setScrollLeft(e){this.scrollLeft=e}isRendered(){return this.rendered}setRendered(e){this.rendered=e}getTabRect(){return this.tabRect}setTabRect(e){this.tabRect=e}getTabStamp(){return this.tabStamp}setTabStamp(e){this.tabStamp=e}getMoveableElement(){return this.moveableElement}setMoveableElement(e){this.moveableElement=e}setRenderedName(e){this.renderedName=e}getNameForOverflowMenu(){const e=this.getAttr("altName");return void 0!==e?e:this.renderedName}setName(e){this.attributes.name=e}delete(){this.parent.remove(this),this.fireEvent("close",{})}updateAttrs(e){E.attributeDefinitions.update(e,this.attributes)}getAttributeDefinitions(){return E.attributeDefinitions}setBorderWidth(e){this.attributes.borderWidth=e}setBorderHeight(e){this.attributes.borderHeight=e}static getAttributeDefinitions(){return E.attributeDefinitions}static createAttributeDefinitions(){const e=new b;return e.add("type",E.TYPE,!0).setType(m.STRING).setFixed(),e.add("id",void 0).setType(m.STRING).setDescription("the unique id of the tab, if left undefined a uuid will be assigned"),e.add("name","[Unnamed Tab]").setType(m.STRING).setDescription("name of tab to be displayed in the tab button"),e.add("altName",void 0).setType(m.STRING).setDescription("if there is no name specifed then this value will be used in the overflow menu"),e.add("helpText",void 0).setType(m.STRING).setDescription("An optional help text for the tab to be displayed upon tab hover."),e.add("component",void 0).setType(m.STRING).setDescription("string identifying which component to run (for factory)"),e.add("config",void 0).setType("any").setDescription("a place to hold json config for the hosted component"),e.add("tabsetClassName",void 0).setType(m.STRING).setDescription("class applied to parent tabset when this is the only tab and it is stretched to fill the tabset"),e.add("enableWindowReMount",!1).setType(m.BOOLEAN).setDescription("if enabled the tab will re-mount when popped out/in"),e.addInherited("enableClose","tabEnableClose").setType(m.BOOLEAN).setDescription("allow user to close tab via close button"),e.addInherited("closeType","tabCloseType").setType("ICloseType").setDescription("see values in ICloseType"),e.addInherited("enableDrag","tabEnableDrag").setType(m.BOOLEAN).setDescription("allow user to drag tab to new location"),e.addInherited("enableRename","tabEnableRename").setType(m.BOOLEAN).setDescription("allow user to rename tabs by double clicking"),e.addInherited("className","tabClassName").setType(m.STRING).setDescription("class applied to tab button"),e.addInherited("contentClassName","tabContentClassName").setType(m.STRING).setDescription("class applied to tab content"),e.addInherited("icon","tabIcon").setType(m.STRING).setDescription("the tab icon"),e.addInherited("enableRenderOnDemand","tabEnableRenderOnDemand").setType(m.BOOLEAN).setDescription("whether to avoid rendering component until tab is visible"),e.addInherited("enablePopout","tabEnablePopout").setType(m.BOOLEAN).setAlias("enableFloat").setDescription("enable popout (in popout capable browser)"),e.addInherited("enablePopoutIcon","tabEnablePopoutIcon").setType(m.BOOLEAN).setDescription("whether to show the popout icon in the tabset header if this tab enables popouts"),e.addInherited("enablePopoutOverlay","tabEnablePopoutOverlay").setType(m.BOOLEAN).setDescription("if this tab will not work correctly in a popout window when the main window is backgrounded (inactive)\n then enabling this option will gray out this tab"),e.addInherited("borderWidth","tabBorderWidth").setType(m.NUMBER).setDescription("width when added to border, -1 will use border size"),e.addInherited("borderHeight","tabBorderHeight").setType(m.NUMBER).setDescription("height when added to border, -1 will use border size"),e.addInherited("minWidth","tabMinWidth").setType(m.NUMBER).setDescription("the min width of this tab"),e.addInherited("minHeight","tabMinHeight").setType(m.NUMBER).setDescription("the min height of this tab"),e.addInherited("maxWidth","tabMaxWidth").setType(m.NUMBER).setDescription("the max width of this tab"),e.addInherited("maxHeight","tabMaxHeight").setType(m.NUMBER).setDescription("the max height of this tab"),e}}function _(){return"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(hover: hover) and (pointer: fine)").matches}function w(e,t,n){let r,i=t.getName(),a=t.getName();void 0===n&&(n=0),void 0===r&&void 0!==t.getIcon()&&(r=0!==n?s.createElement("img",{style:{width:"1em",height:"1em",transform:"rotate("+n+"deg)"},src:t.getIcon(),alt:"leadingContent"}):s.createElement("img",{style:{width:"1em",height:"1em"},src:t.getIcon(),alt:"leadingContent"}));const o={leading:r,content:i,name:a,buttons:[]};return e.customizeTab(t,o),t.setRenderedName(o.name),o}function S(e){let t=!1;return e.nativeEvent instanceof MouseEvent&&(0!==e.nativeEvent.button||e.ctrlKey||e.altKey||e.metaKey||e.shiftKey)&&(t=!0),t}function O(e,t){const n=[...L("iframe",t),...L("webview",t)];for(const t of n)t.style.pointerEvents=e?"auto":"none"}function L(e,t){return[...t.getElementsByTagName(e)]}function N(e,t,n,r,i){t.preventDefault();const a=e=>{e.preventDefault(),n(e.clientX,e.clientY)},o=e=>{e.preventDefault(),i()},l=()=>{e.removeEventListener("pointermove",a),e.removeEventListener("pointerup",l),e.removeEventListener("pointercancel",o),r()};e.addEventListener("pointermove",a),e.addEventListener("pointerup",l),e.addEventListener("pointercancel",o)}function A(e){if(e instanceof E)return e.isEnablePopout();if(e instanceof C){for(const t of e.getChildren())if(!1===t.isEnablePopout())return!1;return!0}return!1}function R(e,t){const n=e.getAttribute("style");return n!==t.getAttribute("style")&&(n?t.setAttribute("style",n):t.removeAttribute("style"),!0)}function x(e,t){if(void 0!==e&&(e instanceof C||e instanceof z)){const n=e.getSelected();-1!==n&&(t===n&&e.getChildren().length>0?t>=e.getChildren().length&&e.setSelected(e.getChildren().length-1):t<n?e.setSelected(n-1):t>n||e.setSelected(-1))}}function k(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)))}E.TYPE="tab",E.attributeDefinitions=E.createAttributeDefinitions();class C extends T{static fromJson(e,t,n){const r=new C(t,e);if(null!=e.children)for(const n of e.children){const e=E.fromJson(n,t);r.addChild(e)}return 0===r.children.length&&r.setSelected(-1),e.maximized&&!0===e.maximized&&(n.maximizedTabSet=r),e.active&&!0===e.active&&(n.activeTabSet=r),r}constructor(e,t){super(e),this.tabStripRect=f.empty(),this.contentRect=f.empty(),this.calculatedMinHeight=0,this.calculatedMinWidth=0,this.calculatedMaxHeight=0,this.calculatedMaxWidth=0,C.attributeDefinitions.fromJson(t,this.attributes),e.addNode(this)}getName(){return this.getAttr("name")}isEnableActiveIcon(){return this.getAttr("enableActiveIcon")}getSelected(){const e=this.attributes.selected;return void 0!==e?e:-1}getSelectedNode(){const e=this.getSelected();if(-1!==e)return this.children[e]}getWeight(){return this.getAttr("weight")}getAttrMinWidth(){return this.getAttr("minWidth")}getAttrMinHeight(){return this.getAttr("minHeight")}getMinWidth(){return this.calculatedMinWidth}getMinHeight(){return this.calculatedMinHeight}getMinSize(e){return e===d.HORZ?this.getMinWidth():this.getMinHeight()}getAttrMaxWidth(){return this.getAttr("maxWidth")}getAttrMaxHeight(){return this.getAttr("maxHeight")}getMaxWidth(){return this.calculatedMaxWidth}getMaxHeight(){return this.calculatedMaxHeight}getMaxSize(e){return e===d.HORZ?this.getMaxWidth():this.getMaxHeight()}getConfig(){return this.attributes.config}isMaximized(){return this.model.getMaximizedTabset(this.getWindowId())===this}isActive(){return this.model.getActiveTabset(this.getWindowId())===this}isEnableDeleteWhenEmpty(){return this.getAttr("enableDeleteWhenEmpty")}isEnableDrop(){return this.getAttr("enableDrop")}isEnableTabWrap(){return this.getAttr("enableTabWrap")}isEnableDrag(){return this.getAttr("enableDrag")}isEnableDivide(){return this.getAttr("enableDivide")}isEnableMaximize(){return this.getAttr("enableMaximize")}isEnableClose(){return this.getAttr("enableClose")}isEnableSingleTabStretch(){return this.getAttr("enableSingleTabStretch")}isEnableTabStrip(){return this.getAttr("enableTabStrip")}isAutoSelectTab(){return this.getAttr("autoSelectTab")}isEnableTabScrollbar(){return this.getAttr("enableTabScrollbar")}getClassNameTabStrip(){return this.getAttr("classNameTabStrip")}getTabLocation(){return this.getAttr("tabLocation")}toJson(){const e={};return C.attributeDefinitions.toJson(e,this.attributes),e.children=this.children.map((e=>e.toJson())),this.isActive()&&(e.active=!0),this.isMaximized()&&(e.maximized=!0),e}calcMinMaxSize(){this.calculatedMinHeight=this.getAttrMinHeight(),this.calculatedMinWidth=this.getAttrMinWidth(),this.calculatedMaxHeight=this.getAttrMaxHeight(),this.calculatedMaxWidth=this.getAttrMaxWidth();for(const e of this.children){const t=e;this.calculatedMinWidth=Math.max(this.calculatedMinWidth,t.getMinWidth()),this.calculatedMinHeight=Math.max(this.calculatedMinHeight,t.getMinHeight()),this.calculatedMaxWidth=Math.min(this.calculatedMaxWidth,t.getMaxWidth()),this.calculatedMaxHeight=Math.min(this.calculatedMaxHeight,t.getMaxHeight())}this.calculatedMinHeight+=this.tabStripRect.height,this.calculatedMaxHeight+=this.tabStripRect.height}canMaximize(){return!!this.isEnableMaximize()&&(this.getModel().getMaximizedTabset(this.getWindowId())===this||this.getParent()!==this.getModel().getRoot(this.getWindowId())||1!==this.getModel().getRoot(this.getWindowId()).getChildren().length)}setContentRect(e){this.contentRect=e}getContentRect(){return this.contentRect}setTabStripRect(e){this.tabStripRect=e}setWeight(e){this.attributes.weight=e}setSelected(e){this.attributes.selected=e}getWindowId(){return this.parent.getWindowId()}canDrop(e,t,n){let r;if(e===this){const e=h.CENTER,t=this.tabStripRect;r=new v(this,t,e,-1,l.FLEXLAYOUT__OUTLINE_RECT)}else{if(this.getWindowId()!==P.MAIN_WINDOW_ID&&!A(e))return;if(this.contentRect.contains(t,n)){let e=h.CENTER;void 0===this.model.getMaximizedTabset(this.parent.getWindowId())&&(e=h.getLocation(this.contentRect,t,n));const i=e.getDockRect(this.rect);r=new v(this,i,e,-1,l.FLEXLAYOUT__OUTLINE_RECT)}else if(null!=this.tabStripRect&&this.tabStripRect.contains(t,n)){let e,i,a;if(0===this.children.length)e=this.tabStripRect.clone(),i=e.y+3,a=e.height-4,e.width=2;else{let o=this.children[0];e=o.getTabRect(),i=e.y,a=e.height;let s=this.tabStripRect.x,u=0;for(let a=0;a<this.children.length;a++){if(o=this.children[a],e=o.getTabRect(),e.y!==i&&(i=e.y,s=this.tabStripRect.x),u=e.x+e.width/2,s<=t&&t<u&&e.y<n&&n<e.getBottom()){const t=h.CENTER,n=new f(e.x-2,e.y,3,e.height);if(this.rect.x<e.x&&e.x<this.rect.getRight()){r=new v(this,n,t,a,l.FLEXLAYOUT__OUTLINE_RECT);break}return}s=u}}if(null==r&&e.getRight()<this.rect.getRight()){const t=h.CENTER,n=new f(e.getRight()-2,i,3,a);r=new v(this,n,t,this.children.length,l.FLEXLAYOUT__OUTLINE_RECT)}}}if(e.canDockInto(e,r))return r}delete(){this.parent.removeChild(this)}remove(e){const t=this.removeChild(e);this.model.tidy(),x(this,t)}drop(e,t,n,r){const i=t;if(this===e)return;let a=e.getParent(),o=0;if(void 0!==a&&(o=a.removeChild(e),a instanceof z&&a.getSelected()===o?a.setSelected(-1):x(a,o)),e instanceof E&&a===this&&o<n&&n>0&&n--,i===h.CENTER){let t=n;if(-1===t&&(t=this.children.length),e instanceof E)this.addChild(e,t),(r||!1!==r&&this.isAutoSelectTab())&&this.setSelected(t);else if(e instanceof D)e.forEachNode(((e,n)=>{e instanceof E&&(this.addChild(e,t),t++)}),0);else{for(let n=0;n<e.getChildren().length;n++){const r=e.getChildren()[n];this.addChild(r,t),t++}-1===this.getSelected()&&this.children.length>0&&this.setSelected(0)}this.model.setActiveTabset(this,this.parent.getWindowId())}else{let n=e;if(e instanceof E){const t=this.model.getOnCreateTabSet();n=new C(this.model,t?t(e):{}),n.addChild(e),a=n}else if(e instanceof D){const r=this.getParent();if(e.getOrientation()===r.getOrientation()&&(t.getOrientation()===r.getOrientation()||t===h.CENTER)){const t=new D(this.model,this.getWindowId(),{});t.addChild(e),n=t}}else n=e;const r=this.parent,o=r.getChildren().indexOf(this);if(r.getOrientation()===i.orientation)n.setWeight(this.getWeight()/2),this.setWeight(this.getWeight()/2),r.addChild(n,o+i.indexPlus);else{const e=new D(this.model,this.getWindowId(),{});e.setWeight(this.getWeight()),e.addChild(this),this.setWeight(50),n.setWeight(50),e.addChild(n,i.indexPlus),r.removeChild(this),r.addChild(e,o)}n instanceof C&&this.model.setActiveTabset(n,this.getWindowId())}this.model.tidy()}updateAttrs(e){C.attributeDefinitions.update(e,this.attributes)}getAttributeDefinitions(){return C.attributeDefinitions}static getAttributeDefinitions(){return C.attributeDefinitions}static createAttributeDefinitions(){const e=new b;return e.add("type",C.TYPE,!0).setType(m.STRING).setFixed(),e.add("id",void 0).setType(m.STRING).setDescription("the unique id of the tab set, if left undefined a uuid will be assigned"),e.add("weight",100).setType(m.NUMBER).setDescription("relative weight for sizing of this tabset in parent row"),e.add("selected",0).setType(m.NUMBER).setDescription("index of selected/visible tab in tabset"),e.add("name",void 0).setType(m.STRING),e.add("config",void 0).setType("any").setDescription("a place to hold json config used in your own code"),e.addInherited("enableDeleteWhenEmpty","tabSetEnableDeleteWhenEmpty").setDescription("whether to delete this tabset when is has no tabs"),e.addInherited("enableDrop","tabSetEnableDrop").setDescription("allow user to drag tabs into this tabset"),e.addInherited("enableDrag","tabSetEnableDrag").setDescription("allow user to drag tabs out this tabset"),e.addInherited("enableDivide","tabSetEnableDivide").setDescription("allow user to drag tabs to region of this tabset, splitting into new tabset"),e.addInherited("enableMaximize","tabSetEnableMaximize").setDescription("allow user to maximize tabset to fill view via maximize button"),e.addInherited("enableClose","tabSetEnableClose").setDescription("allow user to close tabset via a close button"),e.addInherited("enableSingleTabStretch","tabSetEnableSingleTabStretch").setDescription("if the tabset has only a single tab then stretch the single tab to fill area and display in a header style"),e.addInherited("classNameTabStrip","tabSetClassNameTabStrip").setDescription("a class name to apply to the tab strip"),e.addInherited("enableTabStrip","tabSetEnableTabStrip").setDescription("enable tab strip and allow multiple tabs in this tabset"),e.addInherited("minWidth","tabSetMinWidth").setDescription("minimum width (in px) for this tabset"),e.addInherited("minHeight","tabSetMinHeight").setDescription("minimum height (in px) for this tabset"),e.addInherited("maxWidth","tabSetMaxWidth").setDescription("maximum width (in px) for this tabset"),e.addInherited("maxHeight","tabSetMaxHeight").setDescription("maximum height (in px) for this tabset"),e.addInherited("enableTabWrap","tabSetEnableTabWrap").setDescription("wrap tabs onto multiple lines"),e.addInherited("tabLocation","tabSetTabLocation").setDescription("the location of the tabs either top or bottom"),e.addInherited("autoSelectTab","tabSetAutoSelectTab").setType(m.BOOLEAN).setDescription("whether to select new/moved tabs in tabset"),e.addInherited("enableActiveIcon","tabSetEnableActiveIcon").setType(m.BOOLEAN).setDescription("whether the active icon (*) should be displayed when the tabset is active"),e.addInherited("enableTabScrollbar","tabSetEnableTabScrollbar").setType(m.BOOLEAN).setDescription("whether to show a mini scrollbar for the tabs"),e}}C.TYPE="tabset",C.attributeDefinitions=C.createAttributeDefinitions();class D extends T{static fromJson(e,t,n){const r=new D(t,n.windowId,e);if(null!=e.children)for(const i of e.children)if(i.type===C.TYPE){const e=C.fromJson(i,t,n);r.addChild(e)}else{const e=D.fromJson(i,t,n);r.addChild(e)}return r}constructor(e,t,n){super(e),this.windowId=t,this.minHeight=I,this.minWidth=I,this.maxHeight=B,this.maxWidth=B,D.attributeDefinitions.fromJson(n,this.attributes),this.normalizeWeights(),e.addNode(this)}getWeight(){return this.attributes.weight}toJson(){const e={};D.attributeDefinitions.toJson(e,this.attributes),e.children=[];for(const t of this.children)e.children.push(t.toJson());return e}getWindowId(){return this.windowId}setWindowId(e){this.windowId=e}setWeight(e){this.attributes.weight=e}getSplitterBounds(e){const t=this.getOrientation()===d.HORZ,n=this.getChildren(),r=this.model.getSplitterSize(),i=n[0].getRect(),a=n[n.length-1].getRect();let o=t?[i.x,a.getRight()]:[i.y,a.getBottom()];const l=t?[i.x,a.getRight()]:[i.y,a.getBottom()];for(let i=0;i<e;i++){const e=n[i];o[0]+=t?e.getMinWidth():e.getMinHeight(),l[0]+=t?e.getMaxWidth():e.getMaxHeight(),i>0&&(o[0]+=r,l[0]+=r)}for(let i=n.length-1;i>=e;i--){const e=n[i];o[1]-=(t?e.getMinWidth():e.getMinHeight())+r,l[1]-=(t?e.getMaxWidth():e.getMaxHeight())+r}return o=[Math.max(l[1],o[0]),Math.min(l[0],o[1])],o}getSplitterInitials(e){const t=this.getOrientation()===d.HORZ,n=this.getChildren(),r=this.model.getSplitterSize(),i=[];let a=0;for(let e=0;e<n.length;e++){const r=n[e].getRect(),o=t?r.width:r.height;i.push(o),a+=o}const o=n[e].getRect();return{initialSizes:i,sum:a,startPosition:(t?o.x:o.y)-r}}calculateSplit(e,t,n,r,i){const a=this.getOrientation()===d.HORZ,o=this.getChildren(),l=o[e],s=a?l.getMaxWidth():l.getMaxHeight(),u=[...n];if(t<i){let n=i-t,r=0;u[e]+n>s?(r=u[e]+n-s,u[e]=s):u[e]+=n;for(let t=e-1;t>=0;t--){const e=o[t],r=a?e.getMinWidth():e.getMinHeight();if(u[t]-n>r){u[t]-=n;break}n-=u[t]-r,u[t]=r}for(let t=e+1;t<o.length;t++){const e=o[t],n=a?e.getMaxWidth():e.getMaxHeight();if(u[t]+r<n){u[t]+=r;break}r-=n-u[t],u[t]=n}}else{let n=t-i,r=0;u[e-1]+n>s?(r=u[e-1]+n-s,u[e-1]=s):u[e-1]+=n;for(let t=e;t<o.length;t++){const e=o[t],r=a?e.getMinWidth():e.getMinHeight();if(u[t]-n>r){u[t]-=n;break}n-=u[t]-r,u[t]=r}for(let t=e-1;t>=0;t--){const e=o[t],n=a?e.getMaxWidth():e.getMaxHeight();if(u[t]+r<n){u[t]+=r;break}r-=n-u[t],u[t]=n}}return u.map((e=>100*Math.max(.1,e)/r))}getMinSize(e){return e===d.HORZ?this.getMinWidth():this.getMinHeight()}getMinWidth(){return this.minWidth}getMinHeight(){return this.minHeight}getMaxSize(e){return e===d.HORZ?this.getMaxWidth():this.getMaxHeight()}getMaxWidth(){return this.maxWidth}getMaxHeight(){return this.maxHeight}calcMinMaxSize(){this.minHeight=I,this.minWidth=I,this.maxHeight=B,this.maxWidth=B;let e=!0;for(const t of this.children){const n=t;n.calcMinMaxSize(),this.getOrientation()===d.VERT?(this.minHeight+=n.getMinHeight(),this.maxHeight+=n.getMaxHeight(),e||(this.minHeight+=this.model.getSplitterSize(),this.maxHeight+=this.model.getSplitterSize()),this.minWidth=Math.max(this.minWidth,n.getMinWidth()),this.maxWidth=Math.min(this.maxWidth,n.getMaxWidth())):(this.minWidth+=n.getMinWidth(),this.maxWidth+=n.getMaxWidth(),e||(this.minWidth+=this.model.getSplitterSize(),this.maxWidth+=this.model.getSplitterSize()),this.minHeight=Math.max(this.minHeight,n.getMinHeight()),this.maxHeight=Math.min(this.maxHeight,n.getMaxHeight())),e=!1}}tidy(){let e=0;for(;e<this.children.length;){const t=this.children[e];if(t instanceof D){t.tidy();const n=t.getChildren();if(0===n.length)this.removeChild(t);else if(1===n.length){const r=n[0];if(this.removeChild(t),r instanceof D){let n=0;const i=r.getChildren();for(const e of i)n+=e.getWeight();for(let r=0;r<i.length;r++){const a=i[r];a.setWeight(t.getWeight()*a.getWeight()/n),this.addChild(a,e+r)}}else r.setWeight(t.getWeight()),this.addChild(r,e)}else e++}else t instanceof C&&0===t.getChildren().length&&t.isEnableDeleteWhenEmpty()?(this.removeChild(t),t===this.model.getMaximizedTabset(this.windowId)&&this.model.setMaximizedTabset(void 0,this.windowId)):e++}if(this===this.model.getRoot(this.windowId)&&0===this.children.length){const e=this.model.getOnCreateTabSet();let t=e?e():{};t=Object.assign(Object.assign({},t),{selected:-1});const n=new C(this.model,t);this.model.setActiveTabset(n,this.windowId),this.addChild(n)}}canDrop(e,t,n){const r=n-this.rect.y,i=t-this.rect.x,a=this.rect.width,o=this.rect.height,s=50;let u;if(this.getWindowId()===P.MAIN_WINDOW_ID||A(e)){if(this.model.isEnableEdgeDock()&&void 0===this.parent){if(t<this.rect.x+10&&r>o/2-s&&r<o/2+s){const e=h.LEFT,t=e.getDockRect(this.rect);t.width=t.width/2,u=new v(this,t,e,-1,l.FLEXLAYOUT__OUTLINE_RECT_EDGE)}else if(t>this.rect.getRight()-10&&r>o/2-s&&r<o/2+s){const e=h.RIGHT,t=e.getDockRect(this.rect);t.width=t.width/2,t.x+=t.width,u=new v(this,t,e,-1,l.FLEXLAYOUT__OUTLINE_RECT_EDGE)}else if(n<this.rect.y+10&&i>a/2-s&&i<a/2+s){const e=h.TOP,t=e.getDockRect(this.rect);t.height=t.height/2,u=new v(this,t,e,-1,l.FLEXLAYOUT__OUTLINE_RECT_EDGE)}else if(n>this.rect.getBottom()-10&&i>a/2-s&&i<a/2+s){const e=h.BOTTOM,t=e.getDockRect(this.rect);t.height=t.height/2,t.y+=t.height,u=new v(this,t,e,-1,l.FLEXLAYOUT__OUTLINE_RECT_EDGE)}if(void 0!==u&&!e.canDockInto(e,u))return}return u}}drop(e,t,n){const r=t,i=e.getParent();let a;if(i&&i.removeChild(e),void 0!==i&&i instanceof C&&i.setSelected(0),void 0!==i&&i instanceof z&&i.setSelected(-1),e instanceof C||e instanceof D)a=e,a instanceof D&&a.getOrientation()===this.getOrientation()&&(t.getOrientation()===this.getOrientation()||t===h.CENTER)&&(a=new D(this.model,this.windowId,{}),a.addChild(e));else{const t=this.model.getOnCreateTabSet();a=new C(this.model,t?t(e):{}),a.addChild(e)}let o=this.children.reduce(((e,t)=>e+t.getWeight()),0);0===o&&(o=100),a.setWeight(o/3);const l=!this.model.isRootOrientationVertical();if(r===h.CENTER)-1===n?this.addChild(a,this.children.length):this.addChild(a,n);else if(l&&r===h.LEFT||!l&&r===h.TOP)this.addChild(a,0);else if(l&&r===h.RIGHT||!l&&r===h.BOTTOM)this.addChild(a);else if(l&&r===h.TOP||!l&&r===h.LEFT){const e=new D(this.model,this.windowId,{}),t=new D(this.model,this.windowId,{});t.setWeight(75),a.setWeight(25);for(const e of this.children)t.addChild(e);this.removeAll(),e.addChild(a),e.addChild(t),this.addChild(e)}else if(l&&r===h.BOTTOM||!l&&r===h.RIGHT){const e=new D(this.model,this.windowId,{}),t=new D(this.model,this.windowId,{});t.setWeight(75),a.setWeight(25);for(const e of this.children)t.addChild(e);this.removeAll(),e.addChild(t),e.addChild(a),this.addChild(e)}a instanceof C&&this.model.setActiveTabset(a,this.windowId),this.model.tidy()}isEnableDrop(){return!0}getAttributeDefinitions(){return D.attributeDefinitions}updateAttrs(e){D.attributeDefinitions.update(e,this.attributes)}static getAttributeDefinitions(){return D.attributeDefinitions}normalizeWeights(){let e=0;for(const t of this.children)e+=t.getWeight();0===e&&(e=1);for(const t of this.children){const n=t;n.setWeight(Math.max(.001,100*n.getWeight()/e))}}static createAttributeDefinitions(){const e=new b;return e.add("type",D.TYPE,!0).setType(m.STRING).setFixed(),e.add("id",void 0).setType(m.STRING).setDescription("the unique id of the row, if left undefined a uuid will be assigned"),e.add("weight",100).setType(m.NUMBER).setDescription("relative weight for sizing of this row in parent row"),e}}D.TYPE="row",D.attributeDefinitions=D.createAttributeDefinitions();class M{constructor(e,t){this._windowId=e,this._rect=t,this._toScreenRectFunction=e=>e}visitNodes(e){this.root.forEachNode(e,0)}get windowId(){return this._windowId}get rect(){return this._rect}get layout(){return this._layout}get window(){return this._window}get root(){return this._root}get maximizedTabSet(){return this._maximizedTabSet}get activeTabSet(){return this._activeTabSet}set rect(e){this._rect=e}set layout(e){this._layout=e}set window(e){this._window=e}set root(e){this._root=e}set maximizedTabSet(e){this._maximizedTabSet=e}set activeTabSet(e){this._activeTabSet=e}get toScreenRectFunction(){return this._toScreenRectFunction}set toScreenRectFunction(e){this._toScreenRectFunction=e}toJson(){return this._window&&this._window.screenTop>-1e4&&(this.rect=new f(this._window.screenLeft,this._window.screenTop,this._window.outerWidth,this._window.outerHeight)),{layout:this.root.toJson(),rect:this.rect.toJson()}}static fromJson(e,t,n){const r=t.getwindowsMap().size;let i=e.rect?f.fromJson(e.rect):new f(50+50*r,50+50*r,600,400);i.snap(10);const a=new M(n,i);return a.root=D.fromJson(e.layout,t,a),a}}const I=0,B=99999;class P{constructor(){this.attributes={},this.idMap=new Map,this.borders=new y(this),this.windows=new Map,this.rootWindow=new M(P.MAIN_WINDOW_ID,f.empty()),this.windows.set(P.MAIN_WINDOW_ID,this.rootWindow),this.changeListeners=[]}doAction(e){var t;let n;switch(e.type){case g.ADD_NODE:{const t=new E(this,e.data.json,!0),r=this.idMap.get(e.data.toNode);(r instanceof C||r instanceof z||r instanceof D)&&(r.drop(t,h.getByName(e.data.location),e.data.index,e.data.select),n=t);break}case g.MOVE_NODE:{const t=this.idMap.get(e.data.fromNode);if(t instanceof E||t instanceof C||t instanceof D){t===this.getMaximizedTabset(t.getWindowId())&&(this.windows.get(t.getWindowId()).maximizedTabSet=void 0);const n=this.idMap.get(e.data.toNode);(n instanceof C||n instanceof z||n instanceof D)&&n.drop(t,h.getByName(e.data.location),e.data.index,e.data.select)}this.removeEmptyWindows();break}case g.DELETE_TAB:{const t=this.idMap.get(e.data.node);t instanceof E&&t.delete(),this.removeEmptyWindows();break}case g.DELETE_TABSET:{const t=this.idMap.get(e.data.node);if(t instanceof C){const e=[...t.getChildren()];for(let t=0;t<e.length;t++){const n=e[t];n.isEnableClose()&&n.delete()}0===t.getChildren().length&&t.delete(),this.tidy()}this.removeEmptyWindows();break}case g.POPOUT_TABSET:{const t=this.idMap.get(e.data.node);if(t instanceof C){const e=t.isMaximized(),n=this.windows.get(t.getWindowId()),r=k(),i=new M(r,n.toScreenRectFunction(t.getRect())),a={type:"row",children:[]},o=D.fromJson(a,this,i);i.root=o,this.windows.set(r,i),o.drop(t,h.CENTER,0),e&&(this.rootWindow.maximizedTabSet=void 0)}this.removeEmptyWindows();break}case g.POPOUT_TAB:{const t=this.idMap.get(e.data.node);if(t instanceof E){const e=k();let n=f.empty();n=t.getParent()instanceof C?t.getParent().getRect():t.getParent().getContentRect();const r=this.windows.get(t.getWindowId()),i=new M(e,r.toScreenRectFunction(n)),a=k(),o={type:"row",children:[{type:"tabset",id:a}]},l=D.fromJson(o,this,i);i.root=l,this.windows.set(e,i),this.idMap.get(a).drop(t,h.CENTER,0,!0)}this.removeEmptyWindows();break}case g.CLOSE_WINDOW:{const n=this.windows.get(e.data.windowId);n&&(null===(t=this.rootWindow.root)||void 0===t||t.drop(null==n?void 0:n.root,h.CENTER,-1),this.rootWindow.visitNodes(((e,t)=>{e instanceof D&&e.setWindowId(P.MAIN_WINDOW_ID)})),this.windows.delete(e.data.windowId));break}case g.CREATE_WINDOW:{const t=k(),r=new M(t,f.fromJson(e.data.rect)),i=D.fromJson(e.data.layout,this,r);r.root=i,this.windows.set(t,r),n=t;break}case g.RENAME_TAB:{const t=this.idMap.get(e.data.node);t instanceof E&&t.setName(e.data.text);break}case g.SELECT_TAB:{const t=this.idMap.get(e.data.tabNode),n=e.data.windowId?e.data.windowId:P.MAIN_WINDOW_ID,r=this.windows.get(n);if(t instanceof E){const e=t.getParent(),n=e.getChildren().indexOf(t);e instanceof z?e.getSelected()===n?e.setSelected(-1):e.setSelected(n):e instanceof C&&(e.getSelected()!==n&&e.setSelected(n),r.activeTabSet=e)}break}case g.SET_ACTIVE_TABSET:{const t=e.data.windowId?e.data.windowId:P.MAIN_WINDOW_ID,n=this.windows.get(t);if(void 0===e.data.tabsetNode)n.activeTabSet=void 0;else{const t=this.idMap.get(e.data.tabsetNode);t instanceof C&&(n.activeTabSet=t)}break}case g.ADJUST_WEIGHTS:{const t=this.idMap.get(e.data.nodeId).getChildren();for(let n=0;n<t.length;n++)t[n].setWeight(e.data.weights[n]);break}case g.ADJUST_BORDER_SPLIT:{const t=this.idMap.get(e.data.node);t instanceof z&&t.setSize(e.data.pos);break}case g.MAXIMIZE_TOGGLE:{const t=e.data.windowId?e.data.windowId:P.MAIN_WINDOW_ID,n=this.windows.get(t),r=this.idMap.get(e.data.node);r instanceof C&&(r===n.maximizedTabSet?n.maximizedTabSet=void 0:(n.maximizedTabSet=r,n.activeTabSet=r));break}case g.UPDATE_MODEL_ATTRIBUTES:this.updateAttrs(e.data.json);break;case g.UPDATE_NODE_ATTRIBUTES:this.idMap.get(e.data.node).updateAttrs(e.data.json)}this.updateIdMap();for(const t of this.changeListeners)t(e);return n}getActiveTabset(e=P.MAIN_WINDOW_ID){const t=this.windows.get(e);return t&&t.activeTabSet&&this.getNodeById(t.activeTabSet.getId())?t.activeTabSet:void 0}getMaximizedTabset(e=P.MAIN_WINDOW_ID){return this.windows.get(e).maximizedTabSet}getRoot(e=P.MAIN_WINDOW_ID){return this.windows.get(e).root}isRootOrientationVertical(){return this.attributes.rootOrientationVertical}isEnableRotateBorderIcons(){return this.attributes.enableRotateBorderIcons}getBorderSet(){return this.borders}getwindowsMap(){return this.windows}visitNodes(e){this.borders.forEachNode(e);for(const[t,n]of this.windows)n.root.forEachNode(e,0)}visitWindowNodes(e,t){this.windows.has(e)&&(e===P.MAIN_WINDOW_ID&&this.borders.forEachNode(t),this.windows.get(e).visitNodes(t))}getNodeById(e){return this.idMap.get(e)}getFirstTabSet(e=this.windows.get(P.MAIN_WINDOW_ID).root){const t=e.getChildren()[0];return t instanceof C?t:this.getFirstTabSet(t)}static fromJson(e){const t=new P;if(P.attributeDefinitions.fromJson(e.global,t.attributes),e.borders&&(t.borders=y.fromJson(e.borders,t)),e.popouts)for(const n in e.popouts){const r=e.popouts[n],i=M.fromJson(r,t,n);t.windows.set(n,i)}return t.rootWindow.root=D.fromJson(e.layout,t,t.getwindowsMap().get(P.MAIN_WINDOW_ID)),t.tidy(),t}toJson(){const e={};P.attributeDefinitions.toJson(e,this.attributes),this.visitNodes((e=>{e.fireEvent("save",{})}));const t={};for(const[e,n]of this.windows)e!==P.MAIN_WINDOW_ID&&(t[e]=n.toJson());return{global:e,borders:this.borders.toJson(),layout:this.rootWindow.root.toJson(),popouts:t}}getSplitterSize(){return this.attributes.splitterSize}getSplitterExtra(){return this.attributes.splitterExtra}isEnableEdgeDock(){return this.attributes.enableEdgeDock}isSplitterEnableHandle(){return this.attributes.splitterEnableHandle}setOnAllowDrop(e){this.onAllowDrop=e}setOnCreateTabSet(e){this.onCreateTabSet=e}addChangeListener(e){this.changeListeners.push(e)}removeChangeListener(e){const t=this.changeListeners.findIndex((t=>t===e));-1!==t&&this.changeListeners.splice(t,1)}toString(){return JSON.stringify(this.toJson())}removeEmptyWindows(){const e=new Set;for(const[t]of this.windows)if(t!==P.MAIN_WINDOW_ID){let n=0;this.visitWindowNodes(t,(e=>{e instanceof E&&n++})),0===n&&e.add(t)}for(const t of e)this.windows.delete(t)}setActiveTabset(e,t){const n=this.windows.get(t);n&&(n.activeTabSet=e||void 0)}setMaximizedTabset(e,t){const n=this.windows.get(t);n&&(n.maximizedTabSet=e||void 0)}updateIdMap(){this.idMap.clear(),this.visitNodes((e=>{this.idMap.set(e.getId(),e)}))}addNode(e){const t=e.getId();if(this.idMap.has(t))throw new Error(`Error: each node must have a unique id, duplicate id:${e.getId()}`);this.idMap.set(t,e)}findDropTargetNode(e,t,n,r){let i=this.windows.get(e).root.findDropTargetNode(e,t,n,r);return void 0===i&&e===P.MAIN_WINDOW_ID&&(i=this.borders.findDropTargetNode(t,n,r)),i}tidy(){for(const[e,t]of this.windows)t.root.tidy()}updateAttrs(e){P.attributeDefinitions.update(e,this.attributes)}nextUniqueId(){return"#"+k()}getAttribute(e){return this.attributes[e]}getOnAllowDrop(){return this.onAllowDrop}getOnCreateTabSet(){return this.onCreateTabSet}static toTypescriptInterfaces(){P.attributeDefinitions.pairAttributes("RowNode",D.getAttributeDefinitions()),P.attributeDefinitions.pairAttributes("TabSetNode",C.getAttributeDefinitions()),P.attributeDefinitions.pairAttributes("TabNode",E.getAttributeDefinitions()),P.attributeDefinitions.pairAttributes("BorderNode",z.getAttributeDefinitions());let e=[];e.push(P.attributeDefinitions.toTypescriptInterface("Global",void 0)),e.push(D.getAttributeDefinitions().toTypescriptInterface("Row",P.attributeDefinitions)),e.push(C.getAttributeDefinitions().toTypescriptInterface("TabSet",P.attributeDefinitions)),e.push(E.getAttributeDefinitions().toTypescriptInterface("Tab",P.attributeDefinitions)),e.push(z.getAttributeDefinitions().toTypescriptInterface("Border",P.attributeDefinitions)),console.log(e.join("\n"))}static createAttributeDefinitions(){const e=new b;return e.add("enableEdgeDock",!0).setType(m.BOOLEAN).setDescription("enable docking to the edges of the layout, this will show the edge indicators"),e.add("rootOrientationVertical",!1).setType(m.BOOLEAN).setDescription("the top level 'row' will layout horizontally by default, set this option true to make it layout vertically"),e.add("enableRotateBorderIcons",!0).setType(m.BOOLEAN).setDescription("boolean indicating if tab icons should rotate with the text in the left and right borders"),e.add("splitterSize",8).setType(m.NUMBER).setDescription("width in pixels of all splitters between tabsets/borders"),e.add("splitterExtra",0).setType(m.NUMBER).setDescription("additional width in pixels of the splitter hit test area"),e.add("splitterEnableHandle",!1).setType(m.BOOLEAN).setDescription("enable a small centralized handle on all splitters"),e.add("tabEnableClose",!0).setType(m.BOOLEAN),e.add("tabCloseType",1).setType("ICloseType"),e.add("tabEnablePopout",!1).setType(m.BOOLEAN).setAlias("tabEnableFloat"),e.add("tabEnablePopoutIcon",!0).setType(m.BOOLEAN),e.add("tabEnablePopoutOverlay",!1).setType(m.BOOLEAN),e.add("tabEnableDrag",!0).setType(m.BOOLEAN),e.add("tabEnableRename",!0).setType(m.BOOLEAN),e.add("tabContentClassName",void 0).setType(m.STRING),e.add("tabClassName",void 0).setType(m.STRING),e.add("tabIcon",void 0).setType(m.STRING),e.add("tabEnableRenderOnDemand",!0).setType(m.BOOLEAN),e.add("tabDragSpeed",.3).setType(m.NUMBER),e.add("tabBorderWidth",-1).setType(m.NUMBER),e.add("tabBorderHeight",-1).setType(m.NUMBER),e.add("tabSetEnableDeleteWhenEmpty",!0).setType(m.BOOLEAN),e.add("tabSetEnableDrop",!0).setType(m.BOOLEAN),e.add("tabSetEnableDrag",!0).setType(m.BOOLEAN),e.add("tabSetEnableDivide",!0).setType(m.BOOLEAN),e.add("tabSetEnableMaximize",!0).setType(m.BOOLEAN),e.add("tabSetEnableClose",!1).setType(m.BOOLEAN),e.add("tabSetEnableSingleTabStretch",!1).setType(m.BOOLEAN),e.add("tabSetAutoSelectTab",!0).setType(m.BOOLEAN),e.add("tabSetEnableActiveIcon",!1).setType(m.BOOLEAN),e.add("tabSetClassNameTabStrip",void 0).setType(m.STRING),e.add("tabSetEnableTabStrip",!0).setType(m.BOOLEAN),e.add("tabSetEnableTabWrap",!1).setType(m.BOOLEAN),e.add("tabSetTabLocation","top").setType("ITabLocation"),e.add("tabMinWidth",I).setType(m.NUMBER),e.add("tabMinHeight",I).setType(m.NUMBER),e.add("tabSetMinWidth",I).setType(m.NUMBER),e.add("tabSetMinHeight",I).setType(m.NUMBER),e.add("tabMaxWidth",B).setType(m.NUMBER),e.add("tabMaxHeight",B).setType(m.NUMBER),e.add("tabSetMaxWidth",B).setType(m.NUMBER),e.add("tabSetMaxHeight",B).setType(m.NUMBER),e.add("tabSetEnableTabScrollbar",!1).setType(m.BOOLEAN),e.add("borderSize",200).setType(m.NUMBER),e.add("borderMinSize",I).setType(m.NUMBER),e.add("borderMaxSize",B).setType(m.NUMBER),e.add("borderEnableDrop",!0).setType(m.BOOLEAN),e.add("borderAutoSelectTabWhenOpen",!0).setType(m.BOOLEAN),e.add("borderAutoSelectTabWhenClosed",!1).setType(m.BOOLEAN),e.add("borderClassName",void 0).setType(m.STRING),e.add("borderEnableAutoHide",!1).setType(m.BOOLEAN),e.add("borderEnableTabScrollbar",!1).setType(m.BOOLEAN),e}}P.MAIN_WINDOW_ID="__main_window_id__",P.attributeDefinitions=P.createAttributeDefinitions();class z extends T{static fromJson(e,t){const n=h.getByName(e.location),r=new z(n,e,t);return e.children&&(r.children=e.children.map((e=>{const n=E.fromJson(e,t);return n.setParent(r),n}))),r}constructor(e,t,n){super(n),this.outerRect=f.empty(),this.contentRect=f.empty(),this.tabHeaderRect=f.empty(),this.location=e,this.attributes.id=`border_${e.getName()}`,z.attributeDefinitions.fromJson(t,this.attributes),n.addNode(this)}getLocation(){return this.location}getClassName(){return this.getAttr("className")}isHorizontal(){return this.location.orientation===d.HORZ}getSize(){const e=this.getAttr("size"),t=this.getSelected();if(-1===t)return e;{const n=this.children[t],r=this.isHorizontal()?n.getAttr("borderWidth"):n.getAttr("borderHeight");return-1===r?e:r}}getMinSize(){const e=this.getSelectedNode();let t=this.getAttr("minSize");if(e){const n=this.isHorizontal()?e.getMinWidth():e.getMinHeight();t=Math.max(t,n)}return t}getMaxSize(){const e=this.getSelectedNode();let t=this.getAttr("maxSize");if(e){const n=this.isHorizontal()?e.getMaxWidth():e.getMaxHeight();t=Math.min(t,n)}return t}getSelected(){return this.attributes.selected}isAutoHide(){return this.getAttr("enableAutoHide")}getSelectedNode(){if(-1!==this.getSelected())return this.children[this.getSelected()]}getOrientation(){return this.location.getOrientation()}getConfig(){return this.attributes.config}isMaximized(){return!1}isShowing(){return this.attributes.show}toJson(){const e={};return z.attributeDefinitions.toJson(e,this.attributes),e.location=this.location.getName(),e.children=this.children.map((e=>e.toJson())),e}isAutoSelectTab(e){return null==e&&(e=-1!==this.getSelected()),e?this.getAttr("autoSelectTabWhenOpen"):this.getAttr("autoSelectTabWhenClosed")}isEnableTabScrollbar(){return this.getAttr("enableTabScrollbar")}setSelected(e){this.attributes.selected=e}getTabHeaderRect(){return this.tabHeaderRect}setTabHeaderRect(e){this.tabHeaderRect=e}getOuterRect(){return this.outerRect}setOuterRect(e){this.outerRect=e}getRect(){return this.tabHeaderRect}getContentRect(){return this.contentRect}setContentRect(e){this.contentRect=e}isEnableDrop(){return this.getAttr("enableDrop")}setSize(e){const t=this.getSelected();if(-1===t)this.attributes.size=e;else{const n=this.children[t];-1===(this.isHorizontal()?n.getAttr("borderWidth"):n.getAttr("borderHeight"))?this.attributes.size=e:this.isHorizontal()?n.setBorderWidth(e):n.setBorderHeight(e)}}updateAttrs(e){z.attributeDefinitions.update(e,this.attributes)}remove(e){const t=this.removeChild(e);-1!==this.getSelected()&&x(this,t)}canDrop(e,t,n){if(!(e instanceof E))return;let r;const i=h.CENTER;if(this.tabHeaderRect.contains(t,n)){if(this.location.orientation===d.VERT)if(this.children.length>0){let e=this.children[0],n=e.getTabRect();const a=n.y,o=n.height;let s=this.tabHeaderRect.x,u=0;for(let c=0;c<this.children.length;c++){if(e=this.children[c],n=e.getTabRect(),u=n.x+n.width/2,t>=s&&t<u){const e=new f(n.x-2,a,3,o);r=new v(this,e,i,c,l.FLEXLAYOUT__OUTLINE_RECT);break}s=u}if(null==r){const e=new f(n.getRight()-2,a,3,o);r=new v(this,e,i,this.children.length,l.FLEXLAYOUT__OUTLINE_RECT)}}else{const e=new f(this.tabHeaderRect.x+1,this.tabHeaderRect.y+2,3,18);r=new v(this,e,i,0,l.FLEXLAYOUT__OUTLINE_RECT)}else if(this.children.length>0){let e=this.children[0],t=e.getTabRect();const a=t.x,o=t.width;let s=this.tabHeaderRect.y,u=0;for(let c=0;c<this.children.length;c++){if(e=this.children[c],t=e.getTabRect(),u=t.y+t.height/2,n>=s&&n<u){const e=new f(a,t.y-2,o,3);r=new v(this,e,i,c,l.FLEXLAYOUT__OUTLINE_RECT);break}s=u}if(null==r){const e=new f(a,t.getBottom()-2,o,3);r=new v(this,e,i,this.children.length,l.FLEXLAYOUT__OUTLINE_RECT)}}else{const e=new f(this.tabHeaderRect.x+2,this.tabHeaderRect.y+1,18,3);r=new v(this,e,i,0,l.FLEXLAYOUT__OUTLINE_RECT)}if(!e.canDockInto(e,r))return}else if(-1!==this.getSelected()&&this.outerRect.contains(t,n)){const t=this.outerRect;if(r=new v(this,t,i,-1,l.FLEXLAYOUT__OUTLINE_RECT),!e.canDockInto(e,r))return}return r}drop(e,t,n,r){let i=0;const a=e.getParent();void 0!==a&&(i=a.removeChild(e),a!==this&&a instanceof z&&a.getSelected()===i?a.setSelected(-1):x(a,i)),e instanceof E&&a===this&&i<n&&n>0&&n--;let o=n;-1===o&&(o=this.children.length),e instanceof E&&this.addChild(e,o),(r||!1!==r&&this.isAutoSelectTab())&&this.setSelected(o),this.model.tidy()}getSplitterBounds(e,t=!1){const n=[0,0],r=t?this.getMinSize():0,i=t?this.getMaxSize():99999,a=this.model.getRoot(P.MAIN_WINDOW_ID),o=a.getRect(),l=this.model.getSplitterSize();if(this.location===h.TOP){n[0]=this.tabHeaderRect.getBottom()+r;const e=this.tabHeaderRect.getBottom()+i;n[1]=Math.max(n[0],o.getBottom()-a.getMinHeight()-l),n[1]=Math.min(n[1],e)}else if(this.location===h.LEFT){n[0]=this.tabHeaderRect.getRight()+r;const e=this.tabHeaderRect.getRight()+i;n[1]=Math.max(n[0],o.getRight()-a.getMinWidth()-l),n[1]=Math.min(n[1],e)}else if(this.location===h.BOTTOM){n[1]=this.tabHeaderRect.y-r-l;const e=this.tabHeaderRect.y-i-l;n[0]=Math.min(n[1],o.y+a.getMinHeight()),n[0]=Math.max(n[0],e)}else if(this.location===h.RIGHT){n[1]=this.tabHeaderRect.x-r-l;const e=this.tabHeaderRect.x-i-l;n[0]=Math.min(n[1],o.x+a.getMinWidth()),n[0]=Math.max(n[0],e)}return n}calculateSplit(e,t){const n=this.getSplitterBounds(t);return this.location===h.BOTTOM||this.location===h.RIGHT?Math.max(0,n[1]-t):Math.max(0,t-n[0])}getAttributeDefinitions(){return z.attributeDefinitions}static getAttributeDefinitions(){return z.attributeDefinitions}static createAttributeDefinitions(){const e=new b;return e.add("type",z.TYPE,!0).setType(m.STRING).setFixed(),e.add("selected",-1).setType(m.NUMBER).setDescription("index of selected/visible tab in border; -1 means no tab selected"),e.add("show",!0).setType(m.BOOLEAN).setDescription("show/hide this border"),e.add("config",void 0).setType("any").setDescription("a place to hold json config used in your own code"),e.addInherited("enableDrop","borderEnableDrop").setType(m.BOOLEAN).setDescription("whether tabs can be dropped into this border"),e.addInherited("className","borderClassName").setType(m.STRING).setDescription("class applied to tab button"),e.addInherited("autoSelectTabWhenOpen","borderAutoSelectTabWhenOpen").setType(m.BOOLEAN).setDescription("whether to select new/moved tabs in border when the border is already open"),e.addInherited("autoSelectTabWhenClosed","borderAutoSelectTabWhenClosed").setType(m.BOOLEAN).setDescription("whether to select new/moved tabs in border when the border is currently closed"),e.addInherited("size","borderSize").setType(m.NUMBER).setDescription("size of the tab area when selected"),e.addInherited("minSize","borderMinSize").setType(m.NUMBER).setDescription("the minimum size of the tab area"),e.addInherited("maxSize","borderMaxSize").setType(m.NUMBER).setDescription("the maximum size of the tab area"),e.addInherited("enableAutoHide","borderEnableAutoHide").setType(m.BOOLEAN).setDescription("hide border if it has zero tabs"),e.addInherited("enableTabScrollbar","borderEnableTabScrollbar").setType(m.BOOLEAN).setDescription("whether to show a mini scrollbar for the tabs"),e}}z.TYPE="border",z.attributeDefinitions=z.createAttributeDefinitions();const U=e=>{const{layout:t,node:n,index:r,horizontal:i}=e,[a,o]=s.useState(!1),u=s.useRef(null),c=s.useRef(null),h=s.useRef([]),p=s.useRef(void 0),m=s.useRef(void 0),b=s.useRef(0),v=s.useRef(0),y=s.useRef({initialSizes:[],sum:0,startPosition:0}),T=n.getModel().getSplitterSize();let E=n.getModel().getSplitterExtra();_()||(E=Math.max(20,E+T)-T),s.useEffect((()=>{var e,t;return null===(e=u.current)||void 0===e||e.addEventListener("touchstart",w,{passive:!1}),null===(t=c.current)||void 0===t||t.addEventListener("touchstart",w,{passive:!1}),()=>{var e,t;null===(e=u.current)||void 0===e||e.removeEventListener("touchstart",w),null===(t=c.current)||void 0===t||t.removeEventListener("touchstart",w)}}),[]);const w=e=>{e.preventDefault(),e.stopImmediatePropagation()},S=e=>{var a;e.stopPropagation(),n instanceof D&&(y.current=n.getSplitterInitials(r)),O(!1,t.getCurrentDocument()),N(e.currentTarget.ownerDocument,e,A,R,L),h.current=n.getSplitterBounds(r,!0);const s=t.getRootDiv();p.current=t.getCurrentDocument().createElement("div"),p.current.style.flexDirection=i?"row":"column",p.current.className=t.getClassName(l.FLEXLAYOUT__SPLITTER_DRAG),p.current.style.cursor=n.getOrientation()===d.VERT?"ns-resize":"ew-resize",n.getModel().isSplitterEnableHandle()&&(m.current=t.getCurrentDocument().createElement("div"),m.current.className=C(l.FLEXLAYOUT__SPLITTER_HANDLE)+" "+C(i?l.FLEXLAYOUT__SPLITTER_HANDLE_HORZ:l.FLEXLAYOUT__SPLITTER_HANDLE_VERT),p.current.appendChild(m.current));const c=null===(a=u.current)||void 0===a?void 0:a.getBoundingClientRect(),g=new f(c.x-t.getDomRect().x,c.y-t.getDomRect().y,c.width,c.height);b.current=e.clientX-c.x,v.current=e.clientY-c.y,g.positionElement(p.current),s&&s.appendChild(p.current),o(!0)},L=()=>{const e=t.getRootDiv();e&&p.current&&e.removeChild(p.current),p.current=void 0,o(!1)},A=(e,r)=>{if(p.current){const i=t.getDomRect();if(!i)return;n.getOrientation()===d.VERT?p.current.style.top=k(r-i.y-v.current)+"px":p.current.style.left=k(e-i.x-b.current)+"px",t.isRealtimeResize()&&x(!0)}},R=()=>{if(p.current){x(!1);const e=t.getRootDiv();e&&p.current&&e.removeChild(p.current),p.current=void 0}O(!0,t.getCurrentDocument()),o(!1)},x=e=>{(()=>{if(p.current){let e=0;if(e=n.getOrientation()===d.VERT?p.current.offsetTop:p.current.offsetLeft,n instanceof z){const r=n.calculateSplit(n,e);t.doAction(g.adjustBorderSplit(n.getId(),r))}else{const i=y.current,a=n.calculateSplit(r,e,i.initialSizes,i.sum,i.startPosition);t.doAction(g.adjustWeights(n.getId(),a))}}})()},k=e=>{const t=h.current;let n=e;return e<t[0]&&(n=t[0]),e>t[1]&&(n=t[1]),n},C=t.getClassName,M={cursor:i?"ew-resize":"ns-resize",flexDirection:i?"column":"row"};let I,B=C(l.FLEXLAYOUT__SPLITTER)+" "+C(l.FLEXLAYOUT__SPLITTER_+n.getOrientation().getName());if(n instanceof z?B+=" "+C(l.FLEXLAYOUT__SPLITTER_BORDER):void 0!==n.getModel().getMaximizedTabset(t.getWindowId())&&(M.display="none"),i?(M.width=T+"px",M.minWidth=T+"px"):(M.height=T+"px",M.minHeight=T+"px"),!a&&n.getModel().isSplitterEnableHandle()&&(I=s.createElement("div",{className:C(l.FLEXLAYOUT__SPLITTER_HANDLE)+" "+C(i?l.FLEXLAYOUT__SPLITTER_HANDLE_HORZ:l.FLEXLAYOUT__SPLITTER_HANDLE_VERT)})),0===E)return s.createElement("div",{className:B,style:M,ref:u,"data-layout-path":n.getPath()+"/s"+(r-1),onPointerDown:S},I);{const e={};n.getOrientation()===d.HORZ?(e.height="100%",e.width=T+E+"px",e.cursor="ew-resize"):(e.height=T+E+"px",e.width="100%",e.cursor="ns-resize");const t=C(l.FLEXLAYOUT__SPLITTER_EXTRA);return s.createElement("div",{className:B,style:M,ref:u,"data-layout-path":n.getPath()+"/s"+(r-1),onPointerDown:S},s.createElement("div",{style:e,ref:c,className:t,onPointerDown:S}))}};function F(e){const{layout:t,border:n,show:r}=e,i=s.useRef(null);s.useLayoutEffect((()=>{const e=t.getBoundingClientRect(i.current),r=f.getContentRect(i.current).relativeTo(t.getDomRect());e.width>0&&(n.setOuterRect(e),n.getContentRect().equals(r)||(n.setContentRect(r),t.redrawInternal("border content rect")))}));let a=!0;const o={};n.getOrientation()===d.HORZ?(o.width=n.getSize(),o.minWidth=n.getMinSize(),o.maxWidth=n.getMaxSize()):(o.height=n.getSize(),o.minHeight=n.getMinSize(),o.maxHeight=n.getMaxSize(),a=!1),o.display=r?"flex":"none";const u=t.getClassName(l.FLEXLAYOUT__BORDER_TAB_CONTENTS);return n.getLocation()===h.LEFT||n.getLocation()===h.TOP?s.createElement(s.Fragment,null,s.createElement("div",{ref:i,style:o,className:u}),r&&s.createElement(U,{layout:t,node:n,index:0,horizontal:a})):s.createElement(s.Fragment,null,r&&s.createElement(U,{layout:t,node:n,index:0,horizontal:a}),s.createElement("div",{ref:i,style:o,className:u}))}var W;!function(e){e[e.Visible=1]="Visible",e[e.Always=2]="Always",e[e.Selected=3]="Selected"}(W||(W={}));const H=e=>{const{layout:t,node:n,selected:r,border:i,icons:a,path:u}=e,c=s.useRef(null),d=s.useRef(null),f=()=>{t.doAction(g.selectTab(n.getId()))},h=e=>{(()=>{const e=n.getCloseType();return!!(r||e===W.Always||e===W.Visible&&window.matchMedia&&window.matchMedia("(hover: hover) and (pointer: fine)").matches)})()?t.doAction(g.deleteTab(n.getId())):f()},p=e=>{e.stopPropagation()};s.useLayoutEffect((()=>{n.setTabRect(t.getBoundingClientRect(c.current)),t.getEditingTab()===n&&d.current.select()}));const m=t.getClassName;let b=m(l.FLEXLAYOUT__BORDER_BUTTON)+" "+m(l.FLEXLAYOUT__BORDER_BUTTON_+i);b+=r?" "+m(l.FLEXLAYOUT__BORDER_BUTTON__SELECTED):" "+m(l.FLEXLAYOUT__BORDER_BUTTON__UNSELECTED),void 0!==n.getClassName()&&(b+=" "+n.getClassName());let v=0;!1===n.getModel().isEnableRotateBorderIcons()&&("left"===i?v=90:"right"===i&&(v=-90));const y=w(t,n,v);let T=y.content?s.createElement("div",{className:m(l.FLEXLAYOUT__BORDER_BUTTON_CONTENT)},y.content):null;const E=y.leading?s.createElement("div",{className:m(l.FLEXLAYOUT__BORDER_BUTTON_LEADING)},y.leading):null;if(t.getEditingTab()===n&&(T=s.createElement("input",{ref:d,className:m(l.FLEXLAYOUT__TAB_BUTTON_TEXTBOX),"data-layout-path":u+"/textbox",type:"text",autoFocus:!0,defaultValue:n.getName(),onKeyDown:e=>{"Escape"===e.code?t.setEditingTab(void 0):"Enter"===e.code&&(t.setEditingTab(void 0),t.doAction(g.renameTab(n.getId(),e.target.value)))},onPointerDown:e=>{e.stopPropagation()}})),n.isEnableClose()){const e=t.i18nName(o.Close_Tab);y.buttons.push(s.createElement("div",{key:"close","data-layout-path":u+"/button/close",title:e,className:m(l.FLEXLAYOUT__BORDER_BUTTON_TRAILING),onPointerDown:p,onClick:h},"function"==typeof a.close?a.close(n):a.close))}return s.createElement("div",{ref:c,"data-layout-path":u,className:b,onClick:f,onAuxClick:e=>{S(e)&&t.auxMouseClick(n,e)},onContextMenu:e=>{t.showContextMenu(n,e)},title:n.getHelpText(),draggable:!0,onDragStart:e=>{n.isEnableDrag()?(e.stopPropagation(),t.setDragNode(e.nativeEvent,n)):e.preventDefault()},onDragEnd:e=>{e.stopPropagation(),t.clearDragMain()}},E,T,y.buttons)},Y=e=>{const{layout:t,node:n}=e,r=t.getClassName;let i=r(l.FLEXLAYOUT__TAB_BUTTON_STAMP);const a=w(t,n);let o=a.content?s.createElement("div",{className:r(l.FLEXLAYOUT__TAB_BUTTON_CONTENT)},a.content):n.getNameForOverflowMenu();const u=a.leading?s.createElement("div",{className:r(l.FLEXLAYOUT__TAB_BUTTON_LEADING)},a.leading):null;return s.createElement("div",{className:i,title:n.getHelpText()},u,o)};function X(e,t,n,r,i){var a;const o=i.getRootDiv(),u=i.getClassName,c=e.ownerDocument,d=e.getBoundingClientRect(),f=null!==(a=null==o?void 0:o.getBoundingClientRect())&&void 0!==a?a:new DOMRect(0,0,100,100),h=c.createElement("div");h.className=u(l.FLEXLAYOUT__POPUP_MENU_CONTAINER),d.left<f.left+f.width/2?h.style.left=d.left-f.left+"px":h.style.right=f.right-d.right+"px",d.top<f.top+f.height/2?h.style.top=d.top-f.top+"px":h.style.bottom=f.bottom-d.bottom+"px",i.showOverlay(!0),o&&o.appendChild(h);const p=()=>{i.hideControlInPortal(),i.showOverlay(!1),o&&o.removeChild(h),h.removeEventListener("pointerdown",g),c.removeEventListener("pointerdown",m)},g=e=>{e.stopPropagation()},m=e=>{p()};h.addEventListener("pointerdown",g),c.addEventListener("pointerdown",m),i.showControlInPortal(s.createElement(V,{currentDocument:c,parentNode:t,onSelect:r,onHide:p,items:n,classNameMapper:u,layout:i}),h)}const V=e=>{const{parentNode:t,items:n,onHide:r,onSelect:i,classNameMapper:a,layout:o}=e,u=e=>{o.clearDragMain()},c=n.map(((e,n)=>{let c=a(l.FLEXLAYOUT__POPUP_MENU_ITEM);return t.getSelected()===e.index&&(c+=" "+a(l.FLEXLAYOUT__POPUP_MENU_ITEM__SELECTED)),s.createElement("div",{key:e.index,className:c,"data-layout-path":"/popup-menu/tb"+n,onClick:t=>((e,t)=>{i(e),r(),t.stopPropagation()})(e,t),draggable:!0,onDragStart:t=>{return n=t,i=e.node,n.stopPropagation(),o.setDragNode(n.nativeEvent,i),void setTimeout((()=>{r()}),0);var n,i},onDragEnd:u,title:e.node.getHelpText()},s.createElement(Y,{node:e.node,layout:o}))}));return s.createElement("div",{className:a(l.FLEXLAYOUT__POPUP_MENU),"data-layout-path":"/popup-menu"},c)},j=(e,t,n,r,i,a)=>{const[o,l]=s.useState([]),[u,c]=s.useState(!1),f=s.useRef(null),h=s.useRef(!1),p=s.useRef(void 0),g=s.useRef([]),m=s.useRef(0);g.current=o,s.useEffect((()=>{r.current&&k(0)}),[t]),s.useEffect((()=>{h.current=!1}),[t.getSelectedNode(),t.getRect().width,t.getRect().height]),s.useEffect((()=>{if(S(),!h.current){const e=w();e&&e.scrollIntoView()}v(),b()}));const b=()=>{if(r.current&&i.current){const e=r.current,t=i.current,a=R(e),o=x(e),l=C(e);if(o>a&&o>0){let e=a*a/o,r=0;e<20&&(r=20-e,e=20);const i=l*(a-r)/o;n===d.HORZ?(t.style.width=e+"px",t.style.left=i+"px"):(t.style.height=e+"px",t.style.top=i+"px"),t.style.display="block"}else t.style.display="none";n===d.HORZ?t.style.bottom="0px":t.style.right="0px"}},v=()=>{void 0===p.current&&(p.current=setTimeout((()=>{const e=O();var t,n;t=e,n=g.current,t.length===n.length&&t.every(((e,t)=>e===n[t]))||l(e),p.current=void 0}),100))},y=()=>{if(r.current){const n=r.current.firstElementChild,i=t.getChildren();let o=0;Array.from(n.children).forEach((t=>{t.classList.contains(a)&&(i[o].setTabRect(e.getBoundingClientRect(t)),o++)}))}},T=(e,t)=>{if(r.current&&i.current){const a=r.current,o=i.current,l=R(a),s=x(a),u=R(o),c=a.getBoundingClientRect();let f=0;f=n===d.HORZ?e-c.x-m.current:t-c.y-m.current,f=Math.max(0,Math.min(s-u,f)),l>0&&k(f*s/l)}},E=()=>{},_=()=>{},w=()=>{let e;if(r.current){const t=r.current.firstElementChild;Array.from(t.children).forEach((t=>{t.classList.contains(a+"--selected")&&(e=t)}))}return e},S=()=>{if(r.current){const e=r.current.firstElementChild,t=u?10:0,n=R(e)+t>R(r.current);n!==u&&c(n)}},O=()=>{const e=[];if(r.current){const t=r.current,n=t.getBoundingClientRect(),i=L(n)-1,o=A(n)+1,l=t.firstElementChild;let s=0;Array.from(l.children).forEach((t=>{const n=t.getBoundingClientRect();t.classList.contains(a)&&((L(n)<i||A(n)>o)&&e.push(s),s++)}))}return e},L=e=>n===d.HORZ?e.x:e.y,A=e=>n===d.HORZ?e.right:e.bottom,R=e=>n===d.HORZ?e.clientWidth:e.clientHeight,x=e=>n===d.HORZ?e.scrollWidth:e.scrollHeight,k=e=>{n===d.HORZ?r.current.scrollLeft=e:r.current.scrollTop=e},C=e=>n===d.HORZ?e.scrollLeft:e.scrollTop;return{selfRef:f,userControlledPositionRef:h,onScroll:()=>{h.current=!0,y(),b(),v()},onScrollPointerDown:e=>{var t;e.stopPropagation(),i.current.setPointerCapture(e.pointerId);const r=null===(t=i.current)||void 0===t?void 0:t.getBoundingClientRect();n===d.HORZ?m.current=e.clientX-r.x:m.current=e.clientY-r.y,h.current=!0,N(e.currentTarget.ownerDocument,e,T,E,_)},hiddenTabs:o,onMouseWheel:e=>{if(r.current){if(0===t.getChildren().length)return;let n=0;if(Math.abs(e.deltaY)>0){n=-e.deltaY,1===e.deltaMode&&(n*=40);const t=C(r.current)-n,i=x(r.current)-R(r.current),a=Math.max(0,Math.min(i,t));k(a),y(),v(),h.current=!0,e.stopPropagation()}}},isTabOverflow:u}},G=e=>{const{border:t,layout:n,size:r}=e,i=s.useRef(null),a=s.useRef(null),u=s.useRef(null),c=s.useRef(null),p=s.useRef(null),m=n.getIcons();s.useLayoutEffect((()=>{t.setTabHeaderRect(f.getBoundingClientRect(b.current).relativeTo(n.getDomRect()))}));const{selfRef:b,userControlledPositionRef:v,onScroll:y,onScrollPointerDown:T,hiddenTabs:E,onMouseWheel:_,isTabOverflow:w}=j(n,t,d.flip(t.getOrientation()),p,a,n.getClassName(l.FLEXLAYOUT__BORDER_BUTTON)),O=e=>{S(e)&&n.auxMouseClick(t,e)},L=e=>{e.stopPropagation()},N=e=>{const r=n.getShowOverflowMenu(),i=E.map((e=>({index:e,node:t.getChildren()[e]})));void 0!==r?r(t,e,i,A):X(u.current,t,i,A,n),e.stopPropagation()},A=e=>{n.doAction(g.selectTab(e.node.getId())),v.current=!1},R=e=>{const r=t.getChildren()[t.getSelected()];void 0!==r&&n.doAction(g.popoutTab(r.getId())),e.stopPropagation()},x=n.getClassName,k=[],C=e=>{let r=t.getSelected()===e,i=t.getChildren()[e];k.push(s.createElement(H,{layout:n,border:t.getLocation().getName(),node:i,path:t.getPath()+"/tb"+e,key:i.getId(),selected:r,icons:m})),e<t.getChildren().length-1&&k.push(s.createElement("div",{key:"divider"+e,className:x(l.FLEXLAYOUT__BORDER_TAB_DIVIDER)}))};for(let e=0;e<t.getChildren().length;e++)C(e);let D=x(l.FLEXLAYOUT__BORDER)+" "+x(l.FLEXLAYOUT__BORDER_+t.getLocation().getName());void 0!==t.getClassName()&&(D+=" "+t.getClassName());let M=[],I=[];const B={buttons:M,stickyButtons:I,overflowPosition:void 0};if(n.customizeTabSet(t,B),M=B.buttons,void 0===B.overflowPosition&&(B.overflowPosition=I.length),I.length>0&&(w?M=[...I,...M]:k.push(s.createElement("div",{ref:c,key:"sticky_buttons_container",onPointerDown:L,onDragStart:e=>{e.preventDefault()},className:x(l.FLEXLAYOUT__TAB_TOOLBAR_STICKY_BUTTONS_CONTAINER)},I))),E.length>0){const e=n.i18nName(o.Overflow_Menu_Tooltip);let r;if("function"==typeof m.more){const e=E.map((e=>({index:e,node:t.getChildren()[e]})));r=m.more(t,e)}else r=s.createElement(s.Fragment,null,m.more,s.createElement("div",{className:x(l.FLEXLAYOUT__TAB_BUTTON_OVERFLOW_COUNT)},E.length));M.splice(Math.min(B.overflowPosition,M.length),0,s.createElement("button",{key:"overflowbutton",ref:u,className:x(l.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON)+" "+x(l.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON_OVERFLOW)+" "+x(l.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON_OVERFLOW_+t.getLocation().getName()),title:e,onClick:N,onPointerDown:L},r))}const P=t.getSelected();if(-1!==P){const e=t.getChildren()[P];if(void 0!==e&&n.isSupportsPopout()&&e.isEnablePopout()){const t=n.i18nName(o.Popout_Tab);M.push(s.createElement("button",{key:"popout",title:t,className:x(l.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON)+" "+x(l.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON_FLOAT),onClick:R,onPointerDown:L},"function"==typeof m.popout?m.popout(e):m.popout))}}const z=s.createElement("div",{key:"toolbar",ref:i,className:x(l.FLEXLAYOUT__BORDER_TOOLBAR)+" "+x(l.FLEXLAYOUT__BORDER_TOOLBAR_+t.getLocation().getName())},M);let U={},F={};const W=r-1;let Y;return t.getLocation()===h.LEFT?(U={right:"100%",top:0},F={width:W,overflowY:"auto"}):t.getLocation()===h.RIGHT?(U={left:"100%",top:0},F={width:W,overflowY:"auto"}):(U={left:0},F={height:W,overflowX:"auto"}),t.isEnableTabScrollbar()&&(Y=s.createElement("div",{ref:a,className:x(l.FLEXLAYOUT__MINI_SCROLLBAR),onPointerDown:T})),s.createElement("div",{ref:b,style:{display:"flex",flexDirection:t.getOrientation()===d.VERT?"row":"column"},className:D,"data-layout-path":t.getPath(),onClick:O,onAuxClick:O,onContextMenu:e=>{n.showContextMenu(t,e)},onWheel:_},s.createElement("div",{className:x(l.FLEXLAYOUT__MINI_SCROLLBAR_CONTAINER)},s.createElement("div",{ref:p,className:x(l.FLEXLAYOUT__BORDER_INNER)+" "+x(l.FLEXLAYOUT__BORDER_INNER_+t.getLocation().getName()),style:F,onScroll:y},s.createElement("div",{style:U,className:x(l.FLEXLAYOUT__BORDER_INNER_TAB_CONTAINER)+" "+x(l.FLEXLAYOUT__BORDER_INNER_TAB_CONTAINER_+t.getLocation().getName())},k)),Y),z)},$=e=>{const{layout:t,node:n}=e,r=s.useRef(null);s.useEffect((()=>{n.setTabStamp(r.current)}),[n,r.current]);let i=(0,t.getClassName)(l.FLEXLAYOUT__DRAG_RECT);return s.createElement("div",{ref:r,className:i},s.createElement(Y,{key:n.getId(),layout:t,node:n}))};class q extends s.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e,t){console.debug(e),console.debug(t)}render(){return this.state.hasError?s.createElement("div",{className:l.FLEXLAYOUT__ERROR_BOUNDARY_CONTAINER},s.createElement("div",{className:l.FLEXLAYOUT__ERROR_BOUNDARY_CONTENT},this.props.message)):this.props.children}}const Q=e=>{const{title:t,layout:n,layoutWindow:r,url:i,onCloseWindow:a,onSetWindow:o,children:c}=e,d=s.useRef(null),[f,h]=s.useState(void 0),p=new Map;return s.useLayoutEffect((()=>{if(!d.current){const e=r.windowId,n=r.rect;d.current=window.open(i,e,`left=${n.x},top=${n.y},width=${n.width},height=${n.height}`),d.current?(r.window=d.current,o(r,d.current),window.addEventListener("beforeunload",(()=>{if(d.current){const e=d.current;d.current=null,e.close()}})),d.current.addEventListener("load",(()=>{if(d.current){d.current.focus(),d.current.resizeTo(n.width,n.height),d.current.moveTo(n.x,n.y);const e=d.current.document;e.title=t;const i=e.createElement("div");i.className=l.FLEXLAYOUT__FLOATING_WINDOW_CONTENT,e.body.appendChild(i),function(e,t){const n=[],r=document.querySelectorAll('style, link[rel="stylesheet"]');for(const i of r)J(e,i,t,n);return Promise.all(n)}(e,p).then((()=>{h(i)}));const o=new MutationObserver((t=>function(e,t,n){for(const r of e)if("childList"===r.type){for(const e of r.addedNodes)(e instanceof HTMLLinkElement||e instanceof HTMLStyleElement)&&J(t,e,n);for(const e of r.removedNodes)if(e instanceof HTMLLinkElement||e instanceof HTMLStyleElement){const r=n.get(e);r&&t.head.removeChild(r)}}}(t,e,p)));o.observe(document.head,{childList:!0}),d.current.addEventListener("beforeunload",(()=>{d.current&&(a(r),d.current=null,o.disconnect())}))}}))):(console.warn(`Unable to open window ${i}`),a(r))}return()=>{var e;n.getModel().getwindowsMap().has(r.windowId)||(null===(e=d.current)||void 0===e||e.close(),d.current=null)}}),[]),void 0!==f?(0,u.createPortal)(c,f):null};function J(e,t,n,r){if(t instanceof HTMLLinkElement){const i=t.cloneNode(!0);e.head.appendChild(i),n.set(t,i),r&&r.push(new Promise((e=>{i.onload=()=>e(!0)})))}else if(t instanceof HTMLStyleElement)try{const r=t.cloneNode(!0);e.head.appendChild(r),n.set(t,r)}catch(e){}}const Z={width:"1em",height:"1em",display:"flex",alignItems:"center"},K=()=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",style:Z,viewBox:"0 0 24 24"},s.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),s.createElement("path",{stroke:"var(--color-icon)",fill:"var(--color-icon)",d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),ee=e=>{const{layout:t,show:n}=e;return s.createElement("div",{className:t.getClassName(l.FLEXLAYOUT__LAYOUT_OVERLAY),style:{display:n?"flex":"none"}})},te=e=>{const{layout:t,node:n,selected:r,path:i}=e,a=s.useRef(null),u=s.useRef(null),c=t.getIcons();s.useLayoutEffect((()=>{n.setTabRect(t.getBoundingClientRect(a.current)),t.getEditingTab()===n&&u.current.select()}));const d=()=>{t.doAction(g.selectTab(n.getId()))},f=e=>{e.target!==u.current&&(t.getCurrentDocument().body.removeEventListener("pointerdown",f),t.setEditingTab(void 0))},h=e=>{(()=>{const e=n.getCloseType();return!!(r||e===W.Always||e===W.Visible&&window.matchMedia&&window.matchMedia("(hover: hover) and (pointer: fine)").matches)})()?t.doAction(g.deleteTab(n.getId())):d()},p=e=>{e.stopPropagation()},m=t.getClassName,b=n.getParent(),v=b.isEnableSingleTabStretch()&&1===b.getChildren().length;let y=v?l.FLEXLAYOUT__TAB_BUTTON_STRETCH:l.FLEXLAYOUT__TAB_BUTTON,T=m(y);T+=" "+m(y+"_"+b.getTabLocation()),v||(T+=r?" "+m(y+"--selected"):" "+m(y+"--unselected")),void 0!==n.getClassName()&&(T+=" "+n.getClassName());const E=w(t,n);let _=E.content?s.createElement("div",{className:m(l.FLEXLAYOUT__TAB_BUTTON_CONTENT)},E.content):null;const O=E.leading?s.createElement("div",{className:m(l.FLEXLAYOUT__TAB_BUTTON_LEADING)},E.leading):null;if(t.getEditingTab()===n&&(_=s.createElement("input",{ref:u,className:m(l.FLEXLAYOUT__TAB_BUTTON_TEXTBOX),"data-layout-path":i+"/textbox",type:"text",autoFocus:!0,defaultValue:n.getName(),onKeyDown:e=>{"Escape"===e.code?t.setEditingTab(void 0):"Enter"===e.code&&(t.setEditingTab(void 0),t.doAction(g.renameTab(n.getId(),e.target.value)))},onPointerDown:e=>{e.stopPropagation()}})),n.isEnableClose()&&!v){const e=t.i18nName(o.Close_Tab);E.buttons.push(s.createElement("div",{key:"close","data-layout-path":i+"/button/close",title:e,className:m(l.FLEXLAYOUT__TAB_BUTTON_TRAILING),onPointerDown:p,onClick:h},"function"==typeof c.close?c.close(n):c.close))}return s.createElement("div",{ref:a,"data-layout-path":i,className:T,onClick:d,onAuxClick:e=>{S(e)&&t.auxMouseClick(n,e)},onContextMenu:e=>{t.showContextMenu(n,e)},title:n.getHelpText(),draggable:!0,onDragStart:e=>{n.isEnableDrag()?(e.stopPropagation(),t.setDragNode(e.nativeEvent,n)):e.preventDefault()},onDragEnd:e=>{t.clearDragMain()},onDoubleClick:e=>{n.isEnableRename()&&(t.setEditingTab(n),t.getCurrentDocument().body.addEventListener("pointerdown",f),e.stopPropagation())}},O,_,E.buttons)},ne=e=>{const{node:t,layout:n}=e,r=s.useRef(null),i=s.useRef(null),a=s.useRef(null),c=s.useRef(null),h=s.useRef(null),p=s.useRef(null),m=s.useRef(null),b=n.getIcons();s.useEffect((()=>{t.setRect(n.getBoundingClientRect(v.current)),r.current&&t.setTabStripRect(n.getBoundingClientRect(r.current));const e=f.getContentRect(c.current).relativeTo(n.getDomRect());t.getContentRect().equals(e)||(t.setContentRect(e),setTimeout((()=>{n.redrawInternal("tabset content rect "+e)}),0))}));const{selfRef:v,userControlledPositionRef:y,onScroll:T,onScrollPointerDown:E,hiddenTabs:_,onMouseWheel:w,isTabOverflow:O}=j(n,t,d.HORZ,a,i,n.getClassName(l.FLEXLAYOUT__TAB_BUTTON)),L=e=>{const r=n.getShowOverflowMenu(),i=_.map((e=>({index:e,node:t.getChildren()[e]})));void 0!==r?r(t,e,i,N):X(p.current,t,i,N,n),e.stopPropagation()},N=e=>{n.doAction(g.selectTab(e.node.getId())),y.current=!1},A=e=>{n.getEditingTab()?e.preventDefault():t.isEnableDrag()?(e.stopPropagation(),n.setDragNode(e.nativeEvent,t)):e.preventDefault()},R=e=>{S(e)||n.doAction(g.setActiveTabset(t.getId(),n.getWindowId()))},x=e=>{S(e)&&n.auxMouseClick(t,e)},k=e=>{n.showContextMenu(t,e)},C=e=>{e.stopPropagation()},D=e=>{t.canMaximize()&&n.maximize(t),e.stopPropagation()},M=e=>{n.doAction(g.deleteTabset(t.getId())),e.stopPropagation()},I=e=>{n.doAction(g.deleteTab(t.getChildren()[0].getId())),e.stopPropagation()},B=e=>{void 0!==U&&n.doAction(g.popoutTab(U.getId())),e.stopPropagation()},P=e=>{t.canMaximize()&&n.maximize(t)},z=n.getClassName,U=t.getSelectedNode(),F=t.getPath(),W=[];if(t.isEnableTabStrip())for(let e=0;e<t.getChildren().length;e++){const r=t.getChildren()[e];let i=t.getSelected()===e;W.push(s.createElement(te,{layout:n,node:r,path:F+"/tb"+e,key:r.getId(),selected:i})),e<t.getChildren().length-1&&W.push(s.createElement("div",{key:"divider"+e,className:z(l.FLEXLAYOUT__TABSET_TAB_DIVIDER)}))}let H=[],Y=[];const V={stickyButtons:H,buttons:Y,overflowPosition:void 0};n.customizeTabSet(t,V),H=V.stickyButtons,Y=V.buttons;const G=t.isEnableSingleTabStretch()&&1===t.getChildren().length,$=G&&t.getChildren()[0].isEnableClose()||t.isEnableClose();if(void 0===V.overflowPosition&&(V.overflowPosition=H.length),H.length>0&&(t.isEnableTabWrap()||!O&&!G?W.push(s.createElement("div",{ref:m,key:"sticky_buttons_container",onPointerDown:C,onDragStart:e=>{e.preventDefault()},className:z(l.FLEXLAYOUT__TAB_TOOLBAR_STICKY_BUTTONS_CONTAINER)},H)):Y=[...H,...Y]),!t.isEnableTabWrap()&&_.length>0){const e=n.i18nName(o.Overflow_Menu_Tooltip);let r;if("function"==typeof b.more){const e=_.map((e=>({index:e,node:t.getChildren()[e]})));r=b.more(t,e)}else r=s.createElement(s.Fragment,null,b.more,s.createElement("div",{className:z(l.FLEXLAYOUT__TAB_BUTTON_OVERFLOW_COUNT)},_.length));Y.splice(Math.min(V.overflowPosition,Y.length),0,s.createElement("button",{key:"overflowbutton","data-layout-path":F+"/button/overflow",ref:p,className:z(l.FLEXLAYOUT__TAB_TOOLBAR_BUTTON)+" "+z(l.FLEXLAYOUT__TAB_BUTTON_OVERFLOW),title:e,onClick:L,onPointerDown:C},r))}if(void 0!==U&&n.isSupportsPopout()&&U.isEnablePopout()&&U.isEnablePopoutIcon()){const e=n.i18nName(o.Popout_Tab);Y.push(s.createElement("button",{key:"popout","data-layout-path":F+"/button/popout",title:e,className:z(l.FLEXLAYOUT__TAB_TOOLBAR_BUTTON)+" "+z(l.FLEXLAYOUT__TAB_TOOLBAR_BUTTON_FLOAT),onClick:B,onPointerDown:C},"function"==typeof b.popout?b.popout(U):b.popout))}if(t.canMaximize()){const e=n.i18nName(o.Restore),r=n.i18nName(o.Maximize);Y.push(s.createElement("button",{key:"max","data-layout-path":F+"/button/max",title:t.isMaximized()?e:r,className:z(l.FLEXLAYOUT__TAB_TOOLBAR_BUTTON)+" "+z(l.FLEXLAYOUT__TAB_TOOLBAR_BUTTON_+(t.isMaximized()?"max":"min")),onClick:D,onPointerDown:C},t.isMaximized()?"function"==typeof b.restore?b.restore(t):b.restore:"function"==typeof b.maximize?b.maximize(t):b.maximize))}if(!t.isMaximized()&&$){const e=G?n.i18nName(o.Close_Tab):n.i18nName(o.Close_Tabset);Y.push(s.createElement("button",{key:"close","data-layout-path":F+"/button/close",title:e,className:z(l.FLEXLAYOUT__TAB_TOOLBAR_BUTTON)+" "+z(l.FLEXLAYOUT__TAB_TOOLBAR_BUTTON_CLOSE),onClick:G?I:M,onPointerDown:C},"function"==typeof b.closeTabset?b.closeTabset(t):b.closeTabset))}if(t.isActive()&&t.isEnableActiveIcon()){const e=n.i18nName(o.Active_Tabset);Y.push(s.createElement("div",{key:"active","data-layout-path":F+"/button/active",title:e,className:z(l.FLEXLAYOUT__TAB_TOOLBAR_ICON)},"function"==typeof b.activeTabset?b.activeTabset(t):b.activeTabset))}const q=s.createElement("div",{key:"buttonbar",ref:h,className:z(l.FLEXLAYOUT__TAB_TOOLBAR),onPointerDown:C,onDragStart:e=>{e.preventDefault()}},Y);let Q,J=z(l.FLEXLAYOUT__TABSET_TABBAR_OUTER);if(void 0!==t.getClassNameTabStrip()&&(J+=" "+t.getClassNameTabStrip()),J+=" "+l.FLEXLAYOUT__TABSET_TABBAR_OUTER_+t.getTabLocation(),t.isActive()&&(J+=" "+z(l.FLEXLAYOUT__TABSET_SELECTED)),t.isMaximized()&&(J+=" "+z(l.FLEXLAYOUT__TABSET_MAXIMIZED)),G){const e=t.getChildren()[0];void 0!==e.getTabSetClassName()&&(J+=" "+e.getTabSetClassName())}if(t.isEnableTabWrap())t.isEnableTabStrip()&&(Q=s.createElement("div",{className:J,style:{flexWrap:"wrap",gap:"1px",marginTop:"2px"},ref:r,"data-layout-path":F+"/tabstrip",onPointerDown:R,onDoubleClick:P,onContextMenu:k,onClick:x,onAuxClick:x,draggable:!0,onDragStart:A},W,s.createElement("div",{style:{flexGrow:1}}),q));else if(t.isEnableTabStrip()){let e;t.isEnableTabScrollbar()&&(e=s.createElement("div",{ref:i,className:z(l.FLEXLAYOUT__MINI_SCROLLBAR),onPointerDown:E})),Q=s.createElement("div",{className:J,ref:r,"data-layout-path":F+"/tabstrip",onPointerDown:R,onDoubleClick:P,onContextMenu:k,onClick:x,onAuxClick:x,draggable:!0,onWheel:w,onDragStart:A},s.createElement("div",{className:z(l.FLEXLAYOUT__MINI_SCROLLBAR_CONTAINER)},s.createElement("div",{ref:a,className:z(l.FLEXLAYOUT__TABSET_TABBAR_INNER)+" "+z(l.FLEXLAYOUT__TABSET_TABBAR_INNER_+t.getTabLocation()),style:{overflowX:"auto",overflowY:"hidden"},onScroll:T},s.createElement("div",{style:{width:G?"100%":"none"},className:z(l.FLEXLAYOUT__TABSET_TABBAR_INNER_TAB_CONTAINER)+" "+z(l.FLEXLAYOUT__TABSET_TABBAR_INNER_TAB_CONTAINER_+t.getTabLocation())},W)),e),q)}var Z;if(0===t.getChildren().length){const e=n.getTabSetPlaceHolderCallback();e&&(Z=e(t))}let K=s.createElement("div",{ref:c,className:z(l.FLEXLAYOUT__TABSET_CONTENT)},Z);K="top"===t.getTabLocation()?s.createElement(s.Fragment,null,Q,K):s.createElement(s.Fragment,null,K,Q);let ee={flexGrow:Math.max(1,1e3*t.getWeight()),minWidth:t.getMinWidth(),minHeight:t.getMinHeight(),maxWidth:t.getMaxWidth(),maxHeight:t.getMaxHeight()};void 0===t.getModel().getMaximizedTabset(n.getWindowId())||t.isMaximized()||(ee.display="none");const ne=s.createElement("div",{ref:v,className:z(l.FLEXLAYOUT__TABSET_CONTAINER),style:ee},s.createElement("div",{className:z(l.FLEXLAYOUT__TABSET),"data-layout-path":F},K));return t.isMaximized()&&n.getMainElement()?(0,u.createPortal)(s.createElement("div",{style:{position:"absolute",display:"flex",top:0,left:0,bottom:0,right:0}},ne),n.getMainElement()):ne},re=e=>{const{layout:t,node:n}=e,r=s.useRef(null),i=n.getOrientation()===d.HORZ;s.useLayoutEffect((()=>{n.setRect(t.getBoundingClientRect(r.current))}));const a=[];let o=0;for(const e of n.getChildren())o>0&&a.push(s.createElement(U,{key:"splitter"+o,layout:t,node:n,index:o,horizontal:i})),e instanceof D?a.push(s.createElement(re,{key:e.getId(),layout:t,node:e})):e instanceof C&&a.push(s.createElement(ne,{key:e.getId(),layout:t,node:e})),o++;const u={flexGrow:Math.max(1,1e3*n.getWeight()),minWidth:n.getMinWidth(),minHeight:n.getMinHeight(),maxWidth:n.getMaxWidth(),maxHeight:n.getMaxHeight()};return u.flexDirection=i?"row":"column",s.createElement("div",{ref:r,className:t.getClassName(l.FLEXLAYOUT__ROW),style:u},a)},ie=e=>{const{layout:t,selected:n,node:r,path:i}=e,a=s.useRef(null),o=s.useRef(!0),u=r.getParent(),c=u.getContentRect();s.useLayoutEffect((()=>{const e=r.getMoveableElement();a.current.appendChild(e),r.setMoveableElement(e);const t=()=>{r.saveScrollPosition()};return e.addEventListener("scroll",t),a.current.addEventListener("pointerdown",d),()=>{e.removeEventListener("scroll",t),a.current&&a.current.removeEventListener("pointerdown",d),r.setVisible(!1)}}),[]),s.useEffect((()=>{r.isSelected()&&o.current&&(r.restoreScrollPosition(),o.current=!1)}));const d=()=>{const e=r.getParent();e instanceof C&&(e.isActive()||t.doAction(g.setActiveTabset(e.getId(),t.getWindowId())))};r.setRect(c);const f=t.getClassName,h={};c.styleWithPosition(h);let p=null;if(n){if(r.setVisible(!0),document.hidden&&r.isEnablePopoutOverlay()){const e={};c.styleWithPosition(e),p=s.createElement("div",{style:e,className:f(l.FLEXLAYOUT__TAB_OVERLAY)})}}else h.display="none",r.setVisible(!1);u instanceof C&&void 0!==r.getModel().getMaximizedTabset(t.getWindowId())&&(u.isMaximized()?h.zIndex=10:h.display="none"),u instanceof z&&(u.isShowing()||(h.display="none"));let m=f(l.FLEXLAYOUT__TAB);return u instanceof z&&(m+=" "+f(l.FLEXLAYOUT__TAB_BORDER),m+=" "+f(l.FLEXLAYOUT__TAB_BORDER_+u.getLocation().getName())),void 0!==r.getContentClassName()&&(m+=" "+r.getContentClassName()),s.createElement(s.Fragment,null,p,s.createElement("div",{ref:a,style:h,className:m,"data-layout-path":i}))},ae=s.memo((({children:e})=>s.createElement(s.Fragment,null,e)),((e,t)=>e.rect.equalSize(t.rect)&&e.selected===t.selected&&e.forceRevision===t.forceRevision&&e.tabsRevision===t.tabsRevision));class oe extends s.Component{constructor(e){super(e),this.selfRef=s.createRef(),this.revision=0}redraw(){this.selfRef.current.redraw("parent "+this.revision)}addTabToTabSet(e,t){return this.selfRef.current.addTabToTabSet(e,t)}addTabWithDragAndDrop(e,t,n){this.selfRef.current.addTabWithDragAndDrop(e,t,n)}moveTabWithDragAndDrop(e,t){this.selfRef.current.moveTabWithDragAndDrop(e,t)}addTabToActiveTabSet(e){return this.selfRef.current.addTabToActiveTabSet(e)}setDragComponent(e,t,n,r){this.selfRef.current.setDragComponent(e,t,n,r)}getRootDiv(){return this.selfRef.current.getRootDiv()}render(){return s.createElement(le,Object.assign({ref:this.selfRef},this.props,{renderRevision:this.revision++}))}}class le extends s.Component{constructor(e){super(e),this.moveableElementMap=new Map,this.dragEnterCount=0,this.dragging=!1,this.updateLayoutMetrics=()=>{if(this.findBorderBarSizeRef.current){const e=this.findBorderBarSizeRef.current.getBoundingClientRect().height;e!==this.state.calculatedBorderBarSize&&this.setState({calculatedBorderBarSize:e})}},this.onModelChange=e=>{this.redrawInternal("model change"),this.props.onModelChange&&this.props.onModelChange(this.props.model,e)},this.updateRect=()=>{const e=this.getDomRect();e.equals(this.state.rect)||0===e.width||0===e.height||(this.setState({rect:e}),this.windowId!==P.MAIN_WINDOW_ID&&this.redrawInternal("rect updated"))},this.getClassName=e=>void 0===this.props.classNameMapper?e:this.props.classNameMapper(e),this.onCloseWindow=e=>{this.doAction(g.closeWindow(e.windowId))},this.onSetWindow=(e,t)=>{},this.showControlInPortal=(e,t)=>{const n=(0,u.createPortal)(e,t);this.setState({portal:n})},this.hideControlInPortal=()=>{this.setState({portal:void 0})},this.getIcons=()=>this.icons,this.setDragNode=(e,t)=>{if(le.dragState=new pe(this.mainLayout,ce.Internal,t,void 0,void 0),e.dataTransfer.setData("text/plain","--flexlayout--"),e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.dropEffect="move",this.dragEnterCount=0,t instanceof C){let n=!1,r=this.i18nName(o.Move_Tabset);if(t.getChildren().length>0&&(r=this.i18nName(o.Move_Tabs).replace("?",String(t.getChildren().length))),this.props.onRenderDragRect){const i=this.props.onRenderDragRect(r,t,void 0);i&&(this.setDragComponent(e,i,10,10),n=!0)}n||this.setDragComponent(e,r,10,10)}else{const n=e.target.getBoundingClientRect(),r=e.clientX-n.left,i=e.clientY-n.top,a=null==t?void 0:t.getParent(),o=a instanceof z&&a.getOrientation()===d.HORZ,l=o?10:r,u=o?10:i;let c=!1;if(this.props.onRenderDragRect){const n=s.createElement(Y,{key:t.getId(),layout:this,node:t}),r=this.props.onRenderDragRect(n,t,void 0);r&&(this.setDragComponent(e,r,l,u),c=!0)}c||(function(){const e=navigator.userAgent;return e.includes("Safari")&&!e.includes("Chrome")&&!e.includes("Chromium")}()?this.setDragComponent(e,s.createElement(Y,{node:t,layout:this}),l,u):e.dataTransfer.setDragImage(t.getTabStamp(),l,u))}},this.onDragEnterRaw=e=>{this.dragEnterCount++,1===this.dragEnterCount&&this.onDragEnter(e)},this.onDragLeaveRaw=e=>{this.dragEnterCount--,0===this.dragEnterCount&&this.onDragLeave(e)},this.onDragEnter=e=>{var t;if(!le.dragState&&this.props.onExternalDrag){const t=this.props.onExternalDrag(e);if(t){const e=E.fromJson(t.json,this.props.model,!1);le.dragState=new pe(this.mainLayout,ce.External,e,t.json,t.onDrop)}}if(le.dragState){if(this.windowId!==P.MAIN_WINDOW_ID&&le.dragState.mainLayout===this.mainLayout&&le.dragState.mainLayout.setDraggingOverWindow(!0),le.dragState.mainLayout!==this.mainLayout)return;e.preventDefault(),this.dropInfo=void 0;const n=this.selfRef.current;this.outlineDiv=this.currentDocument.createElement("div"),this.outlineDiv.className=this.getClassName(l.FLEXLAYOUT__OUTLINE_RECT),this.outlineDiv.style.visibility="hidden";const r=this.props.model.getAttribute("tabDragSpeed");this.outlineDiv.style.transition=`top ${r}s, left ${r}s, width ${r}s, height ${r}s`,n.appendChild(this.outlineDiv),this.dragging=!0,this.showOverlay(!0),this.isDraggingOverWindow||void 0!==this.props.model.getMaximizedTabset(this.windowId)||this.setState({showEdges:this.props.model.isEnableEdgeDock()});const i=null===(t=this.selfRef.current)||void 0===t?void 0:t.getBoundingClientRect();new f(e.clientX-i.left,e.clientY-i.top,1,1).positionElement(this.outlineDiv)}},this.onDragOver=e=>{var t,n,r;if(this.dragging&&!this.isDraggingOverWindow){e.preventDefault();const i=null===(t=this.selfRef.current)||void 0===t?void 0:t.getBoundingClientRect(),a={x:e.clientX-(null!==(n=null==i?void 0:i.left)&&void 0!==n?n:0),y:e.clientY-(null!==(r=null==i?void 0:i.top)&&void 0!==r?r:0)};this.checkForBorderToShow(a.x,a.y);let o=this.props.model.findDropTargetNode(this.windowId,le.dragState.dragNode,a.x,a.y);o&&(this.dropInfo=o,this.outlineDiv&&(this.outlineDiv.className=this.getClassName(o.className),o.rect.positionElement(this.outlineDiv),this.outlineDiv.style.visibility="visible"))}},this.onDragLeave=e=>{this.dragging&&(this.windowId!==P.MAIN_WINDOW_ID&&le.dragState.mainLayout.setDraggingOverWindow(!1),this.clearDragLocal())},this.onDrop=e=>{if(this.dragging){e.preventDefault();const t=le.dragState;if(this.dropInfo)if(void 0!==t.dragJson){const n=this.doAction(g.addNode(t.dragJson,this.dropInfo.node.getId(),this.dropInfo.location,this.dropInfo.index));void 0!==t.fnNewNodeDropped&&t.fnNewNodeDropped(n,e)}else void 0!==t.dragNode&&this.doAction(g.moveNode(t.dragNode.getId(),this.dropInfo.node.getId(),this.dropInfo.location,this.dropInfo.index));this.mainLayout.clearDragMain()}this.dragEnterCount=0},this.orderedIds=[],this.selfRef=s.createRef(),this.moveablesRef=s.createRef(),this.mainRef=s.createRef(),this.findBorderBarSizeRef=s.createRef(),this.supportsPopout=void 0!==e.supportsPopout?e.supportsPopout:de,this.popoutURL=e.popoutURL?e.popoutURL:"popout.html",this.icons=Object.assign(Object.assign({},ue),e.icons),this.windowId=e.windowId?e.windowId:P.MAIN_WINDOW_ID,this.mainLayout=this.props.mainLayout?this.props.mainLayout:this,this.isDraggingOverWindow=!1,this.layoutWindow=this.props.model.getwindowsMap().get(this.windowId),this.layoutWindow.layout=this,this.popoutWindowName=this.props.popoutWindowName||"Popout Window",this.state={rect:f.empty(),editingTab:void 0,showEdges:!1,showOverlay:!1,calculatedBorderBarSize:29,layoutRevision:0,forceRevision:0,showHiddenBorder:h.CENTER},this.isMainWindow=this.windowId===P.MAIN_WINDOW_ID}componentDidMount(){if(this.updateRect(),this.currentDocument=this.selfRef.current.ownerDocument,this.currentWindow=this.currentDocument.defaultView,this.layoutWindow.window=this.currentWindow,this.layoutWindow.toScreenRectFunction=e=>this.getScreenRect(e),this.resizeObserver=new ResizeObserver((e=>{requestAnimationFrame((()=>{this.updateRect()}))})),this.selfRef.current&&this.resizeObserver.observe(this.selfRef.current),this.isMainWindow)this.props.model.addChangeListener(this.onModelChange),this.updateLayoutMetrics();else{this.currentWindow.addEventListener("resize",(()=>{this.updateRect()}));const e=this.props.mainLayout.getRootDiv(),t=this.selfRef.current;R(e,t),this.styleObserver=new MutationObserver((()=>{R(e,t)&&this.redraw("mutation observer")})),this.styleObserver.observe(e,{attributeFilter:["style"]})}document.addEventListener("visibilitychange",(()=>{for(const[e,t]of this.props.model.getwindowsMap())t.layout&&this.redraw("visibility change")}))}componentDidUpdate(){this.currentDocument=this.selfRef.current.ownerDocument,this.currentWindow=this.currentDocument.defaultView,this.isMainWindow&&(this.props.model!==this.previousModel&&(void 0!==this.previousModel&&this.previousModel.removeChangeListener(this.onModelChange),this.props.model.getwindowsMap().get(this.windowId).layout=this,this.props.model.addChangeListener(this.onModelChange),this.layoutWindow=this.props.model.getwindowsMap().get(this.windowId),this.layoutWindow.layout=this,this.layoutWindow.toScreenRectFunction=e=>this.getScreenRect(e),this.previousModel=this.props.model,this.tidyMoveablesMap()),this.updateLayoutMetrics())}componentWillUnmount(){var e,t;this.selfRef.current&&(null===(e=this.resizeObserver)||void 0===e||e.unobserve(this.selfRef.current)),null===(t=this.styleObserver)||void 0===t||t.disconnect()}render(){if(!this.selfRef.current)return s.createElement("div",{ref:this.selfRef,className:this.getClassName(l.FLEXLAYOUT__LAYOUT)},s.createElement("div",{ref:this.moveablesRef,key:"__moveables__",className:this.getClassName(l.FLEXLAYOUT__LAYOUT_MOVEABLES)}),this.renderMetricsElements());const e=this.props.model;e.getRoot(this.windowId).calcMinMaxSize(),e.getRoot(this.windowId).setPaths(""),e.getBorderSet().setPaths();const t=this.renderLayout(),n=this.renderBorders(t),r=this.renderTabs(),i=this.reorderComponents(r,this.orderedIds);let a=null,o=null,u=null,c=null;return this.isMainWindow&&(a=this.renderWindows(),c=this.renderMetricsElements(),o=this.renderTabMoveables(),u=s.createElement("div",{key:"__tabStamps__",className:this.getClassName(l.FLEXLAYOUT__LAYOUT_TAB_STAMPS)},this.renderTabStamps())),s.createElement("div",{ref:this.selfRef,className:this.getClassName(l.FLEXLAYOUT__LAYOUT),onDragEnter:this.onDragEnterRaw,onDragLeave:this.onDragLeaveRaw,onDragOver:this.onDragOver,onDrop:this.onDrop},s.createElement("div",{ref:this.moveablesRef,key:"__moveables__",className:this.getClassName(l.FLEXLAYOUT__LAYOUT_MOVEABLES)}),c,s.createElement(ee,{key:"__overlay__",layout:this,show:this.state.showOverlay}),n,i,o,u,this.state.portal,a)}renderBorders(e){const t=this.getClassName(l.FLEXLAYOUT__LAYOUT_MAIN),n=this.props.model.getBorderSet().getBorderMap();if(this.isMainWindow&&n.size>0){e=s.createElement("div",{className:t,ref:this.mainRef},e);const r=new Map,i=new Map;for(const[e,t]of h.values){const e=n.get(t);e&&e.isShowing()&&(!e.isAutoHide()||e.isAutoHide()&&(e.getChildren().length>0||this.state.showHiddenBorder===t))&&(r.set(t,s.createElement(G,{layout:this,border:e,size:this.state.calculatedBorderBarSize})),i.set(t,s.createElement(F,{layout:this,border:e,show:-1!==e.getSelected()})))}const a=this.getClassName(l.FLEXLAYOUT__LAYOUT_BORDER_CONTAINER),o=this.getClassName(l.FLEXLAYOUT__LAYOUT_BORDER_CONTAINER_INNER);if(this.props.model.getBorderSet().getLayoutHorizontal()){const t=s.createElement("div",{className:o,style:{flexDirection:"column"}},i.get(h.TOP),s.createElement("div",{className:o,style:{flexDirection:"row"}},i.get(h.LEFT),e,i.get(h.RIGHT)),i.get(h.BOTTOM));return s.createElement("div",{className:a,style:{flexDirection:"column"}},r.get(h.TOP),s.createElement("div",{className:o,style:{flexDirection:"row"}},r.get(h.LEFT),t,r.get(h.RIGHT)),r.get(h.BOTTOM))}{const t=s.createElement("div",{className:o,style:{flexDirection:"row"}},i.get(h.LEFT),s.createElement("div",{className:o,style:{flexDirection:"column"}},i.get(h.TOP),e,i.get(h.BOTTOM)),i.get(h.RIGHT));return s.createElement("div",{className:a,style:{flexDirection:"row"}},r.get(h.LEFT),s.createElement("div",{className:o,style:{flexDirection:"column"}},r.get(h.TOP),t,r.get(h.BOTTOM)),r.get(h.RIGHT))}}return s.createElement("div",{className:t,ref:this.mainRef,style:{position:"absolute",top:0,left:0,bottom:0,right:0,display:"flex"}},e)}renderLayout(){return s.createElement(s.Fragment,null,s.createElement(re,{key:"__row__",layout:this,node:this.props.model.getRoot(this.windowId)}),this.renderEdgeIndicators())}renderEdgeIndicators(){const e=[],t=this.icons.edgeArrow;if(this.state.showEdges){const n=this.props.model.getRoot(this.windowId).getRect(),r=fe,i=he,a=fe/2,o=this.getClassName(l.FLEXLAYOUT__EDGE_RECT),u=50;e.push(s.createElement("div",{key:"North",style:{top:0,left:n.width/2-a,width:r,height:i,borderBottomLeftRadius:u,borderBottomRightRadius:u},className:o+" "+this.getClassName(l.FLEXLAYOUT__EDGE_RECT_TOP)},s.createElement("div",{style:{transform:"rotate(180deg)"}},t))),e.push(s.createElement("div",{key:"West",style:{top:n.height/2-a,left:0,width:i,height:r,borderTopRightRadius:u,borderBottomRightRadius:u},className:o+" "+this.getClassName(l.FLEXLAYOUT__EDGE_RECT_LEFT)},s.createElement("div",{style:{transform:"rotate(90deg)"}},t))),e.push(s.createElement("div",{key:"South",style:{top:n.height-i,left:n.width/2-a,width:r,height:i,borderTopLeftRadius:u,borderTopRightRadius:u},className:o+" "+this.getClassName(l.FLEXLAYOUT__EDGE_RECT_BOTTOM)},s.createElement("div",null,t))),e.push(s.createElement("div",{key:"East",style:{top:n.height/2-a,left:n.width-i,width:i,height:r,borderTopLeftRadius:u,borderBottomLeftRadius:u},className:o+" "+this.getClassName(l.FLEXLAYOUT__EDGE_RECT_RIGHT)},s.createElement("div",{style:{transform:"rotate(-90deg)"}},t)))}return e}renderWindows(){const e=[];if(this.supportsPopout){const t=this.props.model.getwindowsMap();let n=1;for(const[r,i]of t)r!==P.MAIN_WINDOW_ID&&(e.push(s.createElement(Q,{key:r,layout:this,title:this.popoutWindowName+" "+n,layoutWindow:i,url:this.popoutURL+"?id="+r,onSetWindow:this.onSetWindow,onCloseWindow:this.onCloseWindow},s.createElement("div",{className:this.props.popoutClassName},s.createElement(le,Object.assign({},this.props,{windowId:r,mainLayout:this}))))),n++)}return e}renderTabMoveables(){const e=[];return this.props.model.visitNodes((t=>{if(t instanceof E){const n=t,r=this.getMoveableElement(n.getId());n.setMoveableElement(r);const i=n.isSelected(),a=n.getParent().getContentRect(),l=n.isRendered()||(i||!n.isEnableRenderOnDemand())&&a.width>0&&a.height>0;if(l){const t=n.getId()+(n.isEnableWindowReMount()?n.getWindowId():"");e.push((0,u.createPortal)(s.createElement(ae,{rect:a,selected:n.isSelected(),forceRevision:this.state.forceRevision,tabsRevision:this.props.renderRevision,key:t},s.createElement(q,{message:this.i18nName(o.Error_rendering_component)},this.props.factory(n))),r,t)),n.setRendered(l)}}})),e}renderTabStamps(){const e=[];return this.props.model.visitNodes((t=>{if(t instanceof E){const n=t;e.push(s.createElement($,{key:n.getId(),layout:this,node:n}))}})),e}renderTabs(){const e=new Map;return this.props.model.visitWindowNodes(this.windowId,(t=>{if(t instanceof E){const n=t,r=n.isSelected(),i=n.getPath();(n.isRendered()||r||!n.isEnableRenderOnDemand())&&e.set(n.getId(),s.createElement(ie,{key:n.getId(),layout:this,path:i,node:n,selected:r}))}})),e}renderMetricsElements(){return s.createElement("div",{key:"findBorderBarSize",ref:this.findBorderBarSizeRef,className:this.getClassName(l.FLEXLAYOUT__BORDER_SIZER)},"FindBorderBarSize")}checkForBorderToShow(e,t){const n=this.getBoundingClientRect(this.mainRef.current),r=n.getCenter(),i=he,a=fe/2;let o=!1;this.props.model.isEnableEdgeDock()&&this.state.showHiddenBorder===h.CENTER&&(t>r.y-a&&t<r.y+a||e>r.x-a&&e<r.x+a)&&(o=!0);let l=h.CENTER;o||(e<=n.x+i?l=h.LEFT:e>=n.getRight()-i?l=h.RIGHT:t<=n.y+i?l=h.TOP:t>=n.getBottom()-i&&(l=h.BOTTOM)),l!==this.state.showHiddenBorder&&this.setState({showHiddenBorder:l})}tidyMoveablesMap(){const e=new Map;this.props.model.visitNodes(((t,n)=>{t instanceof E&&e.set(t.getId(),t)}));for(const[t,n]of this.moveableElementMap)e.has(t)||(n.remove(),this.moveableElementMap.delete(t))}reorderComponents(e,t){const n=[],r=new Set;let i=[];for(const i of t)e.get(i)&&(n.push(i),r.add(i));t.splice(0,t.length,...n);for(const[n,i]of e)r.has(n)||t.push(n);return i=t.map((t=>e.get(t))),i}redraw(e){this.mainLayout.setState(((e,t)=>({forceRevision:e.forceRevision+1})))}redrawInternal(e){this.mainLayout.setState(((e,t)=>({layoutRevision:e.layoutRevision+1})))}doAction(e){if(void 0!==this.props.onAction){const t=this.props.onAction(e);return void 0!==t?this.props.model.doAction(t):void 0}return this.props.model.doAction(e)}getBoundingClientRect(e){const t=this.getDomRect();return t?f.getBoundingClientRect(e).relativeTo(t):f.empty()}getMoveableContainer(){return this.moveablesRef.current}getMoveableElement(e){let t=this.moveableElementMap.get(e);return void 0===t&&(t=document.createElement("div"),this.moveablesRef.current.appendChild(t),t.className=l.FLEXLAYOUT__TAB_MOVEABLE,this.moveableElementMap.set(e,t)),t}getMainLayout(){return this.mainLayout}getCurrentDocument(){return this.currentDocument}getDomRect(){return this.selfRef.current?f.fromDomRect(this.selfRef.current.getBoundingClientRect()):f.empty()}getWindowId(){return this.windowId}getRootDiv(){return this.selfRef.current}getMainElement(){return this.mainRef.current}getFactory(){return this.props.factory}isSupportsPopout(){return this.supportsPopout}isRealtimeResize(){var e;return null!==(e=this.props.realtimeResize)&&void 0!==e&&e}getPopoutURL(){return this.popoutURL}setEditingTab(e){this.setState({editingTab:e})}getEditingTab(){return this.state.editingTab}getModel(){return this.props.model}getScreenRect(e){const t=e.clone(),n=this.getDomRect();return t.x=this.currentWindow.screenX+this.currentWindow.scrollX+1+n.x+t.x,t.y=this.currentWindow.screenY+this.currentWindow.scrollY+59+n.y+t.y,t.height+=60,t.width+=2,t}addTabToTabSet(e,t){if(void 0!==this.props.model.getNodeById(e))return this.doAction(g.addNode(t,e,h.CENTER,-1))}addTabToActiveTabSet(e){const t=this.props.model.getActiveTabset(this.windowId);if(void 0!==t)return this.doAction(g.addNode(e,t.getId(),h.CENTER,-1))}maximize(e){this.doAction(g.maximizeToggle(e.getId(),this.getWindowId()))}customizeTab(e,t){this.props.onRenderTab&&this.props.onRenderTab(e,t)}customizeTabSet(e,t){this.props.onRenderTabSet&&this.props.onRenderTabSet(e,t)}i18nName(e,t){let n;return this.props.i18nMapper&&(n=this.props.i18nMapper(e,t)),void 0===n&&(n=e+(void 0===t?"":t)),n}getShowOverflowMenu(){return this.props.onShowOverflowMenu}getTabSetPlaceHolderCallback(){return this.props.onTabSetPlaceHolder}showContextMenu(e,t){this.props.onContextMenu&&this.props.onContextMenu(e,t)}auxMouseClick(e,t){this.props.onAuxMouseClick&&this.props.onAuxMouseClick(e,t)}showOverlay(e){this.setState({showOverlay:e}),O(!e,this.currentDocument)}addTabWithDragAndDrop(e,t,n){const r=E.fromJson(t,this.props.model,!1);le.dragState=new pe(this.mainLayout,ce.Add,r,t,n)}moveTabWithDragAndDrop(e,t){this.setDragNode(e,t)}setDragComponent(e,t,n,r){let i=s.createElement("div",{style:{position:"unset"},className:this.getClassName(l.FLEXLAYOUT__LAYOUT)+" "+this.getClassName(l.FLEXLAYOUT__DRAG_RECT)},t);const a=this.currentDocument.createElement("div");a.setAttribute("data-layout-path","/drag-rectangle"),a.style.position="absolute",a.style.left="-10000px",a.style.top="-10000px",this.currentDocument.body.appendChild(a),(0,c.createRoot)(a).render(i),e.dataTransfer.setDragImage(a,n,r),setTimeout((()=>{this.currentDocument.body.removeChild(a)}),0)}setDraggingOverWindow(e){this.isDraggingOverWindow!==e&&(this.outlineDiv&&(this.outlineDiv.style.visibility=e?"hidden":"visible"),e?this.setState({showEdges:!1}):void 0===this.props.model.getMaximizedTabset(this.windowId)&&this.setState({showEdges:this.props.model.isEnableEdgeDock()}),this.isDraggingOverWindow=e)}clearDragMain(){le.dragState=void 0,this.windowId===P.MAIN_WINDOW_ID&&(this.isDraggingOverWindow=!1);for(const[,e]of this.props.model.getwindowsMap())e.layout.clearDragLocal()}clearDragLocal(){this.setState({showEdges:!1}),this.showOverlay(!1),this.dragEnterCount=0,this.dragging=!1,this.outlineDiv&&(this.selfRef.current.removeChild(this.outlineDiv),this.outlineDiv=void 0)}}le.dragState=void 0;const se="0.8.6",ue={close:s.createElement(K,null),closeTabset:s.createElement(K,null),popout:s.createElement((()=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",style:Z,viewBox:"0 0 20 20",fill:"var(--color-icon)"},s.createElement("path",{d:"M11 3a1 1 0 100 2h2.586l-6.293 6.293a1 1 0 101.414 1.414L15 6.414V9a1 1 0 102 0V4a1 1 0 00-1-1h-5z"}),s.createElement("path",{d:"M5 5a2 2 0 00-2 2v8a2 2 0 002 2h8a2 2 0 002-2v-3a1 1 0 10-2 0v3H5V7h3a1 1 0 000-2H5z"}))),null),maximize:s.createElement((()=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",style:Z,viewBox:"0 0 24 24",fill:"var(--color-icon)"},s.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),s.createElement("path",{stroke:"var(--color-icon)",d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"}))),null),restore:s.createElement((()=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",style:Z,viewBox:"0 0 24 24",fill:"var(--color-icon)"},s.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),s.createElement("path",{stroke:"var(--color-icon)",d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"}))),null),more:s.createElement((()=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",style:Z,viewBox:"0 0 24 24",fill:"var(--color-icon)"},s.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),s.createElement("path",{stroke:"var(--color-icon)",d:"M7 10l5 5 5-5z"}))),null),edgeArrow:s.createElement((()=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",style:{display:"block",width:10,height:10},preserveAspectRatio:"none",viewBox:"0 0 100 100"},s.createElement("path",{fill:"var(--color-edge-icon)",stroke:"var(--color-edge-icon)",d:"M10 30 L90 30 l-40 40 Z"}))),null),activeTabset:s.createElement((()=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",style:Z,height:"24px",viewBox:"0 -960 960 960",width:"24px"},s.createElement("path",{fill:"var(--color-icon)",stroke:"var(--color-icon)",d:"M440-120v-264L254-197l-57-57 187-186H120v-80h264L197-706l57-57 186 187v-264h80v264l186-187 57 57-187 186h264v80H576l187 186-57 57-186-187v264h-80Z"}))),null)};var ce;!function(e){e.Internal="internal",e.External="external",e.Add="add"}(ce||(ce={}));const de=_(),fe=100,he=10;class pe{constructor(e,t,n,r,i){this.mainLayout=e,this.dragSource=t,this.dragNode=n,this.dragJson=r,this.fnNewNodeDropped=i}}return a})()));