@reposkein/mcp 0.2.7 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/README.md +73 -1
  2. package/binary-digests.json +4 -4
  3. package/dist/SKILL.md +63 -1
  4. package/dist/cli/adr.d.ts +37 -0
  5. package/dist/cli/adr.js +231 -0
  6. package/dist/cli/adr.js.map +1 -0
  7. package/dist/cli/agentAdapters.d.ts +68 -0
  8. package/dist/cli/agentAdapters.js +223 -0
  9. package/dist/cli/agentAdapters.js.map +1 -0
  10. package/dist/cli/ansi.d.ts +24 -0
  11. package/dist/cli/ansi.js +40 -0
  12. package/dist/cli/ansi.js.map +1 -0
  13. package/dist/cli/doctor.d.ts +34 -2
  14. package/dist/cli/doctor.js +53 -5
  15. package/dist/cli/doctor.js.map +1 -1
  16. package/dist/cli/doctorDecisions.d.ts +5 -0
  17. package/dist/cli/doctorDecisions.js +83 -0
  18. package/dist/cli/doctorDecisions.js.map +1 -0
  19. package/dist/cli/doctorFreshness.d.ts +43 -0
  20. package/dist/cli/doctorFreshness.js +111 -0
  21. package/dist/cli/doctorFreshness.js.map +1 -0
  22. package/dist/cli/doctorSummaries.d.ts +2 -0
  23. package/dist/cli/doctorSummaries.js +95 -0
  24. package/dist/cli/doctorSummaries.js.map +1 -0
  25. package/dist/cli/federatedDiscovery.d.ts +16 -0
  26. package/dist/cli/federatedDiscovery.js +75 -0
  27. package/dist/cli/federatedDiscovery.js.map +1 -0
  28. package/dist/cli/init.d.ts +69 -6
  29. package/dist/cli/init.js +194 -28
  30. package/dist/cli/init.js.map +1 -1
  31. package/dist/cli/sourceSlices.d.ts +17 -0
  32. package/dist/cli/sourceSlices.js +59 -0
  33. package/dist/cli/sourceSlices.js.map +1 -0
  34. package/dist/cli/stats.d.ts +29 -0
  35. package/dist/cli/stats.js +180 -0
  36. package/dist/cli/stats.js.map +1 -0
  37. package/dist/cli/view.d.ts +71 -3
  38. package/dist/cli/view.js +147 -12
  39. package/dist/cli/view.js.map +1 -1
  40. package/dist/guard/decisionValidation.d.ts +29 -0
  41. package/dist/guard/decisionValidation.js +51 -0
  42. package/dist/guard/decisionValidation.js.map +1 -0
  43. package/dist/guard/summaryValidation.d.ts +3 -0
  44. package/dist/guard/summaryValidation.js +5 -3
  45. package/dist/guard/summaryValidation.js.map +1 -1
  46. package/dist/index.d.ts +48 -0
  47. package/dist/index.js +355 -78
  48. package/dist/index.js.map +1 -1
  49. package/dist/indexer/decisionsAffected.d.ts +42 -0
  50. package/dist/indexer/decisionsAffected.js +149 -0
  51. package/dist/indexer/decisionsAffected.js.map +1 -0
  52. package/dist/indexer/fetchBinary.d.ts +14 -0
  53. package/dist/indexer/fetchBinary.js +81 -40
  54. package/dist/indexer/fetchBinary.js.map +1 -1
  55. package/dist/indexer/runIndexer.d.ts +3 -2
  56. package/dist/indexer/runIndexer.js +8 -4
  57. package/dist/indexer/runIndexer.js.map +1 -1
  58. package/dist/profile/decisions.d.ts +37 -0
  59. package/dist/profile/decisions.js +112 -0
  60. package/dist/profile/decisions.js.map +1 -0
  61. package/dist/profile/types.d.ts +8 -0
  62. package/dist/store/GraphStore.d.ts +5 -0
  63. package/dist/store/JsonlGraphStore.d.ts +14 -3
  64. package/dist/store/JsonlGraphStore.js +66 -19
  65. package/dist/store/JsonlGraphStore.js.map +1 -1
  66. package/dist/store/decisions.d.ts +131 -0
  67. package/dist/store/decisions.js +321 -0
  68. package/dist/store/decisions.js.map +1 -0
  69. package/dist/store/indexedAt.d.ts +18 -0
  70. package/dist/store/indexedAt.js +56 -0
  71. package/dist/store/indexedAt.js.map +1 -0
  72. package/dist/store/instrumentTool.d.ts +40 -0
  73. package/dist/store/instrumentTool.js +82 -0
  74. package/dist/store/instrumentTool.js.map +1 -0
  75. package/dist/store/repoContextCache.d.ts +15 -0
  76. package/dist/store/repoContextCache.js +26 -0
  77. package/dist/store/repoContextCache.js.map +1 -0
  78. package/dist/store/repoSession.d.ts +63 -0
  79. package/dist/store/repoSession.js +123 -0
  80. package/dist/store/repoSession.js.map +1 -0
  81. package/dist/store/resolveRepoPath.d.ts +31 -0
  82. package/dist/store/resolveRepoPath.js +85 -0
  83. package/dist/store/resolveRepoPath.js.map +1 -0
  84. package/dist/store/sessionLog.d.ts +98 -0
  85. package/dist/store/sessionLog.js +216 -0
  86. package/dist/store/sessionLog.js.map +1 -0
  87. package/dist/store/sessionStats.d.ts +55 -0
  88. package/dist/store/sessionStats.js +140 -0
  89. package/dist/store/sessionStats.js.map +1 -0
  90. package/dist/store/sidecar.d.ts +39 -3
  91. package/dist/store/sidecar.js +89 -5
  92. package/dist/store/sidecar.js.map +1 -1
  93. package/dist/store/summaryShards.d.ts +117 -0
  94. package/dist/store/summaryShards.js +291 -0
  95. package/dist/store/summaryShards.js.map +1 -0
  96. package/dist/store/teamConfig.d.ts +13 -0
  97. package/dist/store/teamConfig.js +49 -0
  98. package/dist/store/teamConfig.js.map +1 -0
  99. package/dist/tools/getContextProfile.d.ts +1 -1
  100. package/dist/tools/getContextProfile.js +9 -1
  101. package/dist/tools/getContextProfile.js.map +1 -1
  102. package/dist/tools/getDecision.d.ts +6 -0
  103. package/dist/tools/getDecision.js +59 -0
  104. package/dist/tools/getDecision.js.map +1 -0
  105. package/dist/tools/impact.d.ts +1 -1
  106. package/dist/tools/impact.js +13 -1
  107. package/dist/tools/impact.js.map +1 -1
  108. package/dist/tools/indexerTools.d.ts +16 -2
  109. package/dist/tools/indexerTools.js +44 -5
  110. package/dist/tools/indexerTools.js.map +1 -1
  111. package/dist/tools/listDecisions.d.ts +19 -0
  112. package/dist/tools/listDecisions.js +93 -0
  113. package/dist/tools/listDecisions.js.map +1 -0
  114. package/dist/tools/reaffirmDecision.d.ts +11 -0
  115. package/dist/tools/reaffirmDecision.js +55 -0
  116. package/dist/tools/reaffirmDecision.js.map +1 -0
  117. package/dist/tools/recordDecision.d.ts +24 -0
  118. package/dist/tools/recordDecision.js +135 -0
  119. package/dist/tools/recordDecision.js.map +1 -0
  120. package/dist/tools/semanticFind.d.ts +9 -2
  121. package/dist/tools/semanticFind.js +44 -2
  122. package/dist/tools/semanticFind.js.map +1 -1
  123. package/dist/tools/setDecisionStatus.d.ts +8 -0
  124. package/dist/tools/setDecisionStatus.js +34 -0
  125. package/dist/tools/setDecisionStatus.js.map +1 -0
  126. package/dist/viz/assets/{graph.worker-CC7BeE-8.js → graph.worker-DkH6-lMU.js} +1 -1
  127. package/dist/viz/assets/index-CxqeGuRS.css +1 -0
  128. package/dist/viz/assets/index-DiNZyrXx.js +9 -0
  129. package/dist/viz/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
  130. package/dist/viz/assets/jetbrains-mono-latin-500-normal-BWZEU5yA.woff2 +0 -0
  131. package/dist/viz/assets/jetbrains-mono-latin-700-normal-BYuf6tUa.woff2 +0 -0
  132. package/dist/viz/assets/r3f-BZY3QR6_.js +336 -0
  133. package/dist/viz/assets/tanstack-CjXr-L-s.js +62 -0
  134. package/dist/viz/assets/three-Cpu5RUEM.js +4116 -0
  135. package/dist/viz/index.html +5 -4
  136. package/package.json +5 -4
  137. package/dist/viz/assets/index-C_8UkiJ8.js +0 -9
  138. package/dist/viz/assets/r3f-Cku1OhB-.js +0 -277
  139. package/dist/viz/assets/tanstack-DyXcNRWk.js +0 -77
  140. package/dist/viz/assets/three-Z8XaLGmf.js +0 -3839
@@ -0,0 +1,336 @@
1
+ import{r as Mg,a as Cg,R as o0,u as Ug,g as Ag,b as J,j as ul}from"./tanstack-CjXr-L-s.js";import{W as Dg,R as c0,O as nm,P as lm,S as op,a as Ym,V as Rg,b as Ng,B as Bg,C as wg,L as Tp,c as Hn,N as cp,A as Hg,d as gv,e as am,f as Yi,g as Lg,U as Nu,h as kg,i as Fi,j as wn,T as jg,D as Gg,k as Vg,l as Fg,F as f0,m as ni,n as Ih,M as Yg,o as Kh,p as ac,E as zp,q as d0,r as qg,s as Vh,t as Ff,u as Zg,v as Cr,w as ct,x as h0,y as m0,z as Qg,G as yv,H as Xg,I as Op,J as fp,K as Ig,Q as p0,X as Kg,Y as Pg,Z as $g,_ as Jg,$ as Wg,a0 as e1}from"./three-Cpu5RUEM.js";var qm={exports:{}},Lf={},Zm={exports:{}},Qm={};/**
2
+ * @license React
3
+ * scheduler.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var _v;function t1(){return _v||(_v=1,(function(u){function r(q,W){var me=q.length;q.push(W);e:for(;0<me;){var Te=me-1>>>1,De=q[Te];if(0<v(De,W))q[Te]=W,q[me]=De,me=Te;else break e}}function d(q){return q.length===0?null:q[0]}function m(q){if(q.length===0)return null;var W=q[0],me=q.pop();if(me!==W){q[0]=me;e:for(var Te=0,De=q.length,Me=De>>>1;Te<Me;){var ye=2*(Te+1)-1,_e=q[ye],fe=ye+1,jt=q[fe];if(0>v(_e,me))fe<De&&0>v(jt,_e)?(q[Te]=jt,q[fe]=me,Te=fe):(q[Te]=_e,q[ye]=me,Te=ye);else if(fe<De&&0>v(jt,me))q[Te]=jt,q[fe]=me,Te=fe;else break e}}return W}function v(q,W){var me=q.sortIndex-W.sortIndex;return me!==0?me:q.id-W.id}if(u.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var b=performance;u.unstable_now=function(){return b.now()}}else{var S=Date,E=S.now();u.unstable_now=function(){return S.now()-E}}var T=[],C=[],R=1,x=null,V=3,N=!1,K=!1,ee=!1,le=!1,U=typeof setTimeout=="function"?setTimeout:null,B=typeof clearTimeout=="function"?clearTimeout:null,Z=typeof setImmediate<"u"?setImmediate:null;function ne(q){for(var W=d(C);W!==null;){if(W.callback===null)m(C);else if(W.startTime<=q)m(C),W.sortIndex=W.expirationTime,r(T,W);else break;W=d(C)}}function re(q){if(ee=!1,ne(q),!K)if(d(T)!==null)K=!0,ie||(ie=!0,Pe());else{var W=d(C);W!==null&&ue(re,W.startTime-q)}}var ie=!1,ce=-1,he=5,se=-1;function Ee(){return le?!0:!(u.unstable_now()-se<he)}function Se(){if(le=!1,ie){var q=u.unstable_now();se=q;var W=!0;try{e:{K=!1,ee&&(ee=!1,B(ce),ce=-1),N=!0;var me=V;try{t:{for(ne(q),x=d(T);x!==null&&!(x.expirationTime>q&&Ee());){var Te=x.callback;if(typeof Te=="function"){x.callback=null,V=x.priorityLevel;var De=Te(x.expirationTime<=q);if(q=u.unstable_now(),typeof De=="function"){x.callback=De,ne(q),W=!0;break t}x===d(T)&&m(T),ne(q)}else m(T);x=d(T)}if(x!==null)W=!0;else{var Me=d(C);Me!==null&&ue(re,Me.startTime-q),W=!1}}break e}finally{x=null,V=me,N=!1}W=void 0}}finally{W?Pe():ie=!1}}}var Pe;if(typeof Z=="function")Pe=function(){Z(Se)};else if(typeof MessageChannel<"u"){var ve=new MessageChannel,be=ve.port2;ve.port1.onmessage=Se,Pe=function(){be.postMessage(null)}}else Pe=function(){U(Se,0)};function ue(q,W){ce=U(function(){q(u.unstable_now())},W)}u.unstable_IdlePriority=5,u.unstable_ImmediatePriority=1,u.unstable_LowPriority=4,u.unstable_NormalPriority=3,u.unstable_Profiling=null,u.unstable_UserBlockingPriority=2,u.unstable_cancelCallback=function(q){q.callback=null},u.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):he=0<q?Math.floor(1e3/q):5},u.unstable_getCurrentPriorityLevel=function(){return V},u.unstable_next=function(q){switch(V){case 1:case 2:case 3:var W=3;break;default:W=V}var me=V;V=W;try{return q()}finally{V=me}},u.unstable_requestPaint=function(){le=!0},u.unstable_runWithPriority=function(q,W){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var me=V;V=q;try{return W()}finally{V=me}},u.unstable_scheduleCallback=function(q,W,me){var Te=u.unstable_now();switch(typeof me=="object"&&me!==null?(me=me.delay,me=typeof me=="number"&&0<me?Te+me:Te):me=Te,q){case 1:var De=-1;break;case 2:De=250;break;case 5:De=1073741823;break;case 4:De=1e4;break;default:De=5e3}return De=me+De,q={id:R++,callback:W,priorityLevel:q,startTime:me,expirationTime:De,sortIndex:-1},me>Te?(q.sortIndex=me,r(C,q),d(T)===null&&q===d(C)&&(ee?(B(ce),ce=-1):ee=!0,ue(re,me-Te))):(q.sortIndex=De,r(T,q),K||N||(K=!0,ie||(ie=!0,Pe()))),q},u.unstable_shouldYield=Ee,u.unstable_wrapCallback=function(q){var W=V;return function(){var me=V;V=W;try{return q.apply(this,arguments)}finally{V=me}}}})(Qm)),Qm}var bv;function v0(){return bv||(bv=1,Zm.exports=t1()),Zm.exports}/**
10
+ * @license React
11
+ * react-dom-client.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var Sv;function n1(){if(Sv)return Lf;Sv=1;var u=v0(),r=Mg(),d=Cg();function m(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}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."}function v(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function b(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function S(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function E(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function T(e){if(b(e)!==e)throw Error(m(188))}function C(e){var t=e.alternate;if(!t){if(t=b(e),t===null)throw Error(m(188));return t!==e?null:e}for(var a=e,i=t;;){var c=a.return;if(c===null)break;var f=c.alternate;if(f===null){if(i=c.return,i!==null){a=i;continue}break}if(c.child===f.child){for(f=c.child;f;){if(f===a)return T(c),e;if(f===i)return T(c),t;f=f.sibling}throw Error(m(188))}if(a.return!==i.return)a=c,i=f;else{for(var g=!1,_=c.child;_;){if(_===a){g=!0,a=c,i=f;break}if(_===i){g=!0,i=c,a=f;break}_=_.sibling}if(!g){for(_=f.child;_;){if(_===a){g=!0,a=f,i=c;break}if(_===i){g=!0,i=f,a=c;break}_=_.sibling}if(!g)throw Error(m(189))}}if(a.alternate!==i)throw Error(m(190))}if(a.tag!==3)throw Error(m(188));return a.stateNode.current===a?e:t}function R(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=R(e),t!==null)return t;e=e.sibling}return null}var x=Object.assign,V=Symbol.for("react.element"),N=Symbol.for("react.transitional.element"),K=Symbol.for("react.portal"),ee=Symbol.for("react.fragment"),le=Symbol.for("react.strict_mode"),U=Symbol.for("react.profiler"),B=Symbol.for("react.consumer"),Z=Symbol.for("react.context"),ne=Symbol.for("react.forward_ref"),re=Symbol.for("react.suspense"),ie=Symbol.for("react.suspense_list"),ce=Symbol.for("react.memo"),he=Symbol.for("react.lazy"),se=Symbol.for("react.activity"),Ee=Symbol.for("react.memo_cache_sentinel"),Se=Symbol.iterator;function Pe(e){return e===null||typeof e!="object"?null:(e=Se&&e[Se]||e["@@iterator"],typeof e=="function"?e:null)}var ve=Symbol.for("react.client.reference");function be(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ve?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ee:return"Fragment";case U:return"Profiler";case le:return"StrictMode";case re:return"Suspense";case ie:return"SuspenseList";case se:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case K:return"Portal";case Z:return e.displayName||"Context";case B:return(e._context.displayName||"Context")+".Consumer";case ne:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ce:return t=e.displayName||null,t!==null?t:be(e.type)||"Memo";case he:t=e._payload,e=e._init;try{return be(e(t))}catch{}}return null}var ue=Array.isArray,q=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=d.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,me={pending:!1,data:null,method:null,action:null},Te=[],De=-1;function Me(e){return{current:e}}function ye(e){0>De||(e.current=Te[De],Te[De]=null,De--)}function _e(e,t){De++,Te[De]=e.current,e.current=t}var fe=Me(null),jt=Me(null),ln=Me(null),li=Me(null);function In(e,t){switch(_e(ln,t),_e(jt,e),_e(fe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Gp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Gp(t),e=Vp(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}ye(fe),_e(fe,e)}function bn(){ye(fe),ye(jt),ye(ln)}function fn(e){e.memoizedState!==null&&_e(li,e);var t=fe.current,a=Vp(t,e.type);t!==a&&(_e(jt,e),_e(fe,a))}function at(e){jt.current===e&&(ye(fe),ye(jt)),li.current===e&&(ye(li),Nf._currentValue=me)}var Mn,dn;function Ln(e){if(Mn===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Mn=t&&t[1]||"",dn=-1<a.stack.indexOf(`
18
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
19
+ `+Mn+e+dn}var Tl=!1;function zl(e,t){if(!e||Tl)return"";Tl=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(t){var I=function(){throw Error()};if(Object.defineProperty(I.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(I,[])}catch(Y){var k=Y}Reflect.construct(e,[],I)}else{try{I.call()}catch(Y){k=Y}e.call(I.prototype)}}else{try{throw Error()}catch(Y){k=Y}(I=e())&&typeof I.catch=="function"&&I.catch(function(){})}}catch(Y){if(Y&&k&&typeof Y.stack=="string")return[Y.stack,k.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=i.DetermineComponentFrameRoot(),g=f[0],_=f[1];if(g&&_){var z=g.split(`
20
+ `),H=_.split(`
21
+ `);for(c=i=0;i<z.length&&!z[i].includes("DetermineComponentFrameRoot");)i++;for(;c<H.length&&!H[c].includes("DetermineComponentFrameRoot");)c++;if(i===z.length||c===H.length)for(i=z.length-1,c=H.length-1;1<=i&&0<=c&&z[i]!==H[c];)c--;for(;1<=i&&0<=c;i--,c--)if(z[i]!==H[c]){if(i!==1||c!==1)do if(i--,c--,0>c||z[i]!==H[c]){var Q=`
22
+ `+z[i].replace(" at new "," at ");return e.displayName&&Q.includes("<anonymous>")&&(Q=Q.replace("<anonymous>",e.displayName)),Q}while(1<=i&&0<=c);break}}}finally{Tl=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Ln(a):""}function Sn(e,t){switch(e.tag){case 26:case 27:case 5:return Ln(e.type);case 16:return Ln("Lazy");case 13:return e.child!==t&&t!==null?Ln("Suspense Fallback"):Ln("Suspense");case 19:return Ln("SuspenseList");case 0:case 15:return zl(e.type,!1);case 11:return zl(e.type.render,!1);case 1:return zl(e.type,!0);case 31:return Ln("Activity");default:return""}}function qi(e){try{var t="",a=null;do t+=Sn(e,a),a=e,e=e.return;while(e);return t}catch(i){return`
23
+ Error generating stack: `+i.message+`
24
+ `+i.stack}}var Ca=Object.prototype.hasOwnProperty,Ql=u.unstable_scheduleCallback,ai=u.unstable_cancelCallback,Ua=u.unstable_shouldYield,an=u.unstable_requestPaint,hn=u.unstable_now,Ur=u.unstable_getCurrentPriorityLevel,Us=u.unstable_ImmediatePriority,Kn=u.unstable_UserBlockingPriority,Zi=u.unstable_NormalPriority,ea=u.unstable_LowPriority,Qi=u.unstable_IdlePriority,Wf=u.log,ed=u.unstable_setDisableYieldValue,As=null,Pn=null;function Aa(e){if(typeof Wf=="function"&&ed(e),Pn&&typeof Pn.setStrictMode=="function")try{Pn.setStrictMode(As,e)}catch{}}var ol=Math.clz32?Math.clz32:td,sc=Math.log,rm=Math.LN2;function td(e){return e>>>=0,e===0?32:31-(sc(e)/rm|0)|0}var Ar=256,Ds=262144,Xi=4194304;function ii(e){var t=e&42;if(t!==0)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:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ii(e,t,a){var i=e.pendingLanes;if(i===0)return 0;var c=0,f=e.suspendedLanes,g=e.pingedLanes;e=e.warmLanes;var _=i&134217727;return _!==0?(i=_&~f,i!==0?c=ii(i):(g&=_,g!==0?c=ii(g):a||(a=_&~e,a!==0&&(c=ii(a))))):(_=i&~f,_!==0?c=ii(_):g!==0?c=ii(g):a||(a=i&~e,a!==0&&(c=ii(a)))),c===0?0:t!==0&&t!==c&&(t&f)===0&&(f=c&-c,a=t&-t,f>=a||f===32&&(a&4194048)!==0)?t:c}function Rs(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function nd(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function si(){var e=Xi;return Xi<<=1,(Xi&62914560)===0&&(Xi=4194304),e}function Dr(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Ns(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Rr(e,t,a,i,c,f){var g=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var _=e.entanglements,z=e.expirationTimes,H=e.hiddenUpdates;for(a=g&~a;0<a;){var Q=31-ol(a),I=1<<Q;_[Q]=0,z[Q]=-1;var k=H[Q];if(k!==null)for(H[Q]=null,Q=0;Q<k.length;Q++){var Y=k[Q];Y!==null&&(Y.lane&=-536870913)}a&=~I}i!==0&&Bs(e,i,0),f!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=f&~(g&~t))}function Bs(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var i=31-ol(t);e.entangledLanes|=t,e.entanglements[i]=e.entanglements[i]|1073741824|a&261930}function Bu(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var i=31-ol(a),c=1<<i;c&t|e[i]&t&&(e[i]|=t),a&=~c}}function uc(e,t){var a=t&-t;return a=(a&42)!==0?1:ws(a),(a&(e.suspendedLanes|t))!==0?0:a}function ws(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Hs(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Nr(){var e=W.p;return e!==0?e:(e=window.event,e===void 0?32:cv(e.type))}function ui(e,t){var a=W.p;try{return W.p=e,t()}finally{W.p=a}}var Da=Math.random().toString(36).slice(2),$t="__reactFiber$"+Da,Cn="__reactProps$"+Da,ri="__reactContainer$"+Da,ta="__reactEvents$"+Da,oi="__reactListeners$"+Da,wu="__reactHandles$"+Da,Br="__reactResources$"+Da,Ra="__reactMarker$"+Da;function Ki(e){delete e[$t],delete e[Cn],delete e[ta],delete e[oi],delete e[wu]}function Pi(e){var t=e[$t];if(t)return t;for(var a=e.parentNode;a;){if(t=a[ri]||a[$t]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Ip(e);e!==null;){if(a=e[$t])return a;e=Ip(e)}return t}e=a,a=e.parentNode}return null}function $i(e){if(e=e[$t]||e[ri]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ls(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(m(33))}function ci(e){var t=e[Br];return t||(t=e[Br]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Jt(e){e[Ra]=!0}var Na=new Set,wr={};function fi(e,t){cl(e,t),cl(e+"Capture",t)}function cl(e,t){for(wr[e]=t,e=0;e<t.length;e++)Na.add(t[e])}var fl=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]*$"),Hu={},At={};function rc(e){return Ca.call(At,e)?!0:Ca.call(Hu,e)?!1:fl.test(e)?At[e]=!0:(Hu[e]=!0,!1)}function ks(e,t,a){if(rc(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var i=t.toLowerCase().slice(0,5);if(i!=="data-"&&i!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Lu(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function na(e,t,a,i){if(i===null)e.removeAttribute(a);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+i)}}function Ol(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Hr(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function oc(e,t,a){var i=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var c=i.get,f=i.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(g){a=""+g,f.call(this,g)}}),Object.defineProperty(e,t,{enumerable:i.enumerable}),{getValue:function(){return a},setValue:function(g){a=""+g},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ku(e){if(!e._valueTracker){var t=Hr(e)?"checked":"value";e._valueTracker=oc(e,t,""+e[t])}}function Un(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),i="";return e&&(i=Hr(e)?e.checked?"true":"false":e.value),e=i,e!==a?(t.setValue(e),!0):!1}function zt(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Lr=/[\n"\\]/g;function An(e){return e.replace(Lr,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function js(e,t,a,i,c,f,g,_){e.name="",g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.type=g:e.removeAttribute("type"),t!=null?g==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ol(t)):e.value!==""+Ol(t)&&(e.value=""+Ol(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?Xl(e,g,Ol(t)):a!=null?Xl(e,g,Ol(a)):i!=null&&e.removeAttribute("value"),c==null&&f!=null&&(e.defaultChecked=!!f),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?e.name=""+Ol(_):e.removeAttribute("name")}function kr(e,t,a,i,c,f,g,_){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),t!=null||a!=null){if(!(f!=="submit"&&f!=="reset"||t!=null)){ku(e);return}a=a!=null?""+Ol(a):"",t=t!=null?""+Ol(t):a,_||t===e.value||(e.value=t),e.defaultValue=t}i=i??c,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=_?e.checked:!!i,e.defaultChecked=!!i,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.name=g),ku(e)}function Xl(e,t,a){t==="number"&&zt(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Ba(e,t,a,i){if(e=e.options,t){t={};for(var c=0;c<a.length;c++)t["$"+a[c]]=!0;for(a=0;a<e.length;a++)c=t.hasOwnProperty("$"+e[a].value),e[a].selected!==c&&(e[a].selected=c),c&&i&&(e[a].defaultSelected=!0)}else{for(a=""+Ol(a),t=null,c=0;c<e.length;c++){if(e[c].value===a){e[c].selected=!0,i&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function jr(e,t,a){if(t!=null&&(t=""+Ol(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Ol(a):""}function Gr(e,t,a,i){if(t==null){if(i!=null){if(a!=null)throw Error(m(92));if(ue(i)){if(1<i.length)throw Error(m(93));i=i[0]}a=i}a==null&&(a=""),t=a}a=Ol(t),e.defaultValue=a,i=e.textContent,i===a&&i!==""&&i!==null&&(e.value=i),ku(e)}function Ji(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var ld=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 cc(e,t,a){var i=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?i?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":i?e.setProperty(t,a):typeof a!="number"||a===0||ld.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function fc(e,t,a){if(t!=null&&typeof t!="object")throw Error(m(62));if(e=e.style,a!=null){for(var i in a)!a.hasOwnProperty(i)||t!=null&&t.hasOwnProperty(i)||(i.indexOf("--")===0?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="");for(var c in t)i=t[c],t.hasOwnProperty(c)&&a[c]!==i&&cc(e,c,i)}else for(var f in t)t.hasOwnProperty(f)&&cc(e,f,t[f])}function Vr(e){if(e.indexOf("-")===-1)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 ad=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"]]),dc=/^[\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 ju(e){return dc.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function wa(){}var Fr=null;function Yr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Wi=null,di=null;function hc(e){var t=$i(e);if(t&&(e=t.stateNode)){var a=e[Cn]||null;e:switch(e=t.stateNode,t.type){case"input":if(js(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+An(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var i=a[t];if(i!==e&&i.form===e.form){var c=i[Cn]||null;if(!c)throw Error(m(90));js(i,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<a.length;t++)i=a[t],i.form===e.form&&Un(i)}break e;case"textarea":jr(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Ba(e,!!a.multiple,t,!1)}}}var qr=!1;function mc(e,t,a){if(qr)return e(t,a);qr=!0;try{var i=e(t);return i}finally{if(qr=!1,(Wi!==null||di!==null)&&(Jl(),Wi&&(t=Wi,e=di,di=Wi=null,hc(t),e)))for(t=0;t<e.length;t++)hc(e[t])}}function Gs(e,t){var a=e.stateNode;if(a===null)return null;var i=a[Cn]||null;if(i===null)return null;a=i[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":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(m(231,t,typeof a));return a}var la=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),pc=!1;if(la)try{var Vs={};Object.defineProperty(Vs,"passive",{get:function(){pc=!0}}),window.addEventListener("test",Vs,Vs),window.removeEventListener("test",Vs,Vs)}catch{pc=!1}var dl=null,Zr=null,es=null;function Gu(){if(es)return es;var e,t=Zr,a=t.length,i,c="value"in dl?dl.value:dl.textContent,f=c.length;for(e=0;e<a&&t[e]===c[e];e++);var g=a-e;for(i=1;i<=g&&t[a-i]===c[f-i];i++);return es=c.slice(e,1<i?1-i:void 0)}function Vu(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Fs(){return!0}function id(){return!1}function kn(e){function t(a,i,c,f,g){this._reactName=a,this._targetInst=c,this.type=i,this.nativeEvent=f,this.target=g,this.currentTarget=null;for(var _ in e)e.hasOwnProperty(_)&&(a=e[_],this[_]=a?a(f):f[_]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Fs:id,this.isPropagationStopped=id,this}return x(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Fs)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Fs)},persist:function(){},isPersistent:Fs}),t}var hi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Fu=kn(hi),Ys=x({},hi,{view:0,detail:0}),sd=kn(Ys),Yu,Qr,qs,Zs=x({},Ys,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Pr,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==qs&&(qs&&e.type==="mousemove"?(Yu=e.screenX-qs.screenX,Qr=e.screenY-qs.screenY):Qr=Yu=0,qs=e),Yu)},movementY:function(e){return"movementY"in e?e.movementY:Qr}}),vc=kn(Zs),ud=x({},Zs,{dataTransfer:0}),rd=kn(ud),gc=x({},Ys,{relatedTarget:0}),Xr=kn(gc),od=x({},hi,{animationName:0,elapsedTime:0,pseudoElement:0}),om=kn(od),cm=x({},hi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),cd=kn(cm),qu=x({},hi,{data:0}),Ir=kn(qu),Kr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},fd={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"},dd={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function yc(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=dd[e])?!!t[e]:!1}function Pr(){return yc}var hd=x({},Ys,{key:function(e){if(e.key){var t=Kr[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Vu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?fd[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Pr,charCode:function(e){return e.type==="keypress"?Vu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Vu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ts=kn(hd),$r=x({},Zs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),_c=kn($r),bc=x({},Ys,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Pr}),md=kn(bc),pd=x({},hi,{propertyName:0,elapsedTime:0,pseudoElement:0}),fm=kn(pd),En=x({},Zs,{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}),vd=kn(En),gd=x({},hi,{newState:0,oldState:0}),yd=kn(gd),_d=[9,13,27,32],ns=la&&"CompositionEvent"in window,Qs=null;la&&"documentMode"in document&&(Qs=document.documentMode);var Jr=la&&"TextEvent"in window&&!Qs,Sc=la&&(!ns||Qs&&8<Qs&&11>=Qs),bd=" ",Zu=!1;function Wr(e,t){switch(e){case"keyup":return _d.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ec(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ls=!1;function Sd(e,t){switch(e){case"compositionend":return Ec(t);case"keypress":return t.which!==32?null:(Zu=!0,bd);case"textInput":return e=t.data,e===bd&&Zu?null:e;default:return null}}function Tc(e,t){if(ls)return e==="compositionend"||!ns&&Wr(e,t)?(e=Gu(),es=Zr=dl=null,ls=!1,e):null;switch(e){case"paste":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 Sc&&t.locale!=="ko"?null:t.data;default:return null}}var zc={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 Oc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!zc[e.type]:t==="textarea"}function eo(e,t,a,i){Wi?di?di.push(i):di=[i]:Wi=i,t=xh(t,"onChange"),0<t.length&&(a=new Fu("onChange","change",null,a,i),e.push({event:a,listeners:t}))}var mi=null,as=null;function Ed(e){Bp(e,0)}function Xs(e){var t=Ls(e);if(Un(t))return e}function xc(e,t){if(e==="change")return t}var aa=!1;if(la){var Qu;if(la){var Mc="oninput"in document;if(!Mc){var Cc=document.createElement("div");Cc.setAttribute("oninput","return;"),Mc=typeof Cc.oninput=="function"}Qu=Mc}else Qu=!1;aa=Qu&&(!document.documentMode||9<document.documentMode)}function xl(){mi&&(mi.detachEvent("onpropertychange",Xu),as=mi=null)}function Xu(e){if(e.propertyName==="value"&&Xs(as)){var t=[];eo(t,as,e,Yr(e)),mc(Ed,t)}}function Td(e,t,a){e==="focusin"?(xl(),mi=t,as=a,mi.attachEvent("onpropertychange",Xu)):e==="focusout"&&xl()}function Uc(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Xs(as)}function zd(e,t){if(e==="click")return Xs(t)}function Od(e,t){if(e==="input"||e==="change")return Xs(t)}function Ac(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var jn=typeof Object.is=="function"?Object.is:Ac;function Is(e,t){if(jn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),i=Object.keys(t);if(a.length!==i.length)return!1;for(i=0;i<a.length;i++){var c=a[i];if(!Ca.call(t,c)||!jn(e[c],t[c]))return!1}return!0}function Iu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ks(e,t){var a=Iu(e);e=0;for(var i;a;){if(a.nodeType===3){if(i=e+a.textContent.length,e<=t&&i>=t)return{node:a,offset:t-e};e=i}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Iu(a)}}function yt(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?yt(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function xd(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=zt(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=zt(e.document)}return t}function Dc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Md=la&&"documentMode"in document&&11>=document.documentMode,ia=null,sa=null,Ps=null,to=!1;function $s(e,t,a){var i=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;to||ia==null||ia!==zt(i)||(i=ia,"selectionStart"in i&&Dc(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),Ps&&Is(Ps,i)||(Ps=i,i=xh(sa,"onSelect"),0<i.length&&(t=new Fu("onSelect","select",null,t,a),e.push({event:t,listeners:i}),t.target=ia)))}function Dn(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var is={animationend:Dn("Animation","AnimationEnd"),animationiteration:Dn("Animation","AnimationIteration"),animationstart:Dn("Animation","AnimationStart"),transitionrun:Dn("Transition","TransitionRun"),transitionstart:Dn("Transition","TransitionStart"),transitioncancel:Dn("Transition","TransitionCancel"),transitionend:Dn("Transition","TransitionEnd")},Ku={},Rc={};la&&(Rc=document.createElement("div").style,"AnimationEvent"in window||(delete is.animationend.animation,delete is.animationiteration.animation,delete is.animationstart.animation),"TransitionEvent"in window||delete is.transitionend.transition);function Ha(e){if(Ku[e])return Ku[e];if(!is[e])return e;var t=is[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Rc)return Ku[e]=t[a];return e}var no=Ha("animationend"),Pu=Ha("animationiteration"),Nc=Ha("animationstart"),Cd=Ha("transitionrun"),dm=Ha("transitionstart"),Ud=Ha("transitioncancel"),Bc=Ha("transitionend"),Ml=new Map,$u="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 toggle touchMove waiting wheel".split(" ");$u.push("scrollEnd");function Cl(e,t){Ml.set(e,t),fi(t,[e])}var Ju=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Ul=[],La=0,mn=0;function Wu(){for(var e=La,t=mn=La=0;t<e;){var a=Ul[t];Ul[t++]=null;var i=Ul[t];Ul[t++]=null;var c=Ul[t];Ul[t++]=null;var f=Ul[t];if(Ul[t++]=null,i!==null&&c!==null){var g=i.pending;g===null?c.next=c:(c.next=g.next,g.next=c),i.pending=c}f!==0&&pi(a,c,f)}}function pn(e,t,a,i){Ul[La++]=e,Ul[La++]=t,Ul[La++]=a,Ul[La++]=i,mn|=i,e.lanes|=i,e=e.alternate,e!==null&&(e.lanes|=i)}function lo(e,t,a,i){return pn(e,t,a,i),Al(e)}function Gn(e,t){return pn(e,null,null,t),Al(e)}function pi(e,t,a){e.lanes|=a;var i=e.alternate;i!==null&&(i.lanes|=a);for(var c=!1,f=e.return;f!==null;)f.childLanes|=a,i=f.alternate,i!==null&&(i.childLanes|=a),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(c=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,c&&t!==null&&(c=31-ol(a),e=f.hiddenUpdates,i=e[c],i===null?e[c]=[t]:i.push(t),t.lane=a|536870912),f):null}function Al(e){if(50<Bi)throw Bi=0,zs=null,Error(m(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var vi={};function wc(e,t,a,i){this.tag=e,this.key=a,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=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Dt(e,t,a,i){return new wc(e,t,a,i)}function ao(e){return e=e.prototype,!(!e||!e.isReactComponent)}function $n(e,t){var a=e.alternate;return a===null?(a=Dt(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Js(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(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=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ua(e,t,a,i,c,f){var g=0;if(i=e,typeof e=="function")ao(e)&&(g=1);else if(typeof e=="string")g=pg(e,a,fe.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case se:return e=Dt(31,a,t,c),e.elementType=se,e.lanes=f,e;case ee:return gi(a.children,c,f,t);case le:g=8,c|=24;break;case U:return e=Dt(12,a,t,c|2),e.elementType=U,e.lanes=f,e;case re:return e=Dt(13,a,t,c),e.elementType=re,e.lanes=f,e;case ie:return e=Dt(19,a,t,c),e.elementType=ie,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Z:g=10;break e;case B:g=9;break e;case ne:g=11;break e;case ce:g=14;break e;case he:g=16,i=null;break e}g=29,a=Error(m(130,e===null?"null":typeof e,"")),i=null}return t=Dt(g,a,t,c),t.elementType=e,t.type=i,t.lanes=f,t}function gi(e,t,a,i){return e=Dt(7,e,i,t),e.lanes=a,e}function io(e,t,a){return e=Dt(6,e,null,t),e.lanes=a,e}function Ws(e){var t=Dt(18,null,null,0);return t.stateNode=e,t}function so(e,t,a){return t=Dt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var er=new WeakMap;function hl(e,t){if(typeof e=="object"&&e!==null){var a=er.get(e);return a!==void 0?a:(t={value:e,source:t,stack:qi(t)},er.set(e,t),t)}return{value:e,source:t,stack:qi(t)}}var yi=[],_i=0,eu=null,tu=0,Jn=[],Ot=0,ka=null,Rt=1,Il="";function ra(e,t){yi[_i++]=tu,yi[_i++]=eu,eu=e,tu=t}function Ad(e,t,a){Jn[Ot++]=Rt,Jn[Ot++]=Il,Jn[Ot++]=ka,ka=e;var i=Rt;e=Il;var c=32-ol(i)-1;i&=~(1<<c),a+=1;var f=32-ol(t)+c;if(30<f){var g=c-c%5;f=(i&(1<<g)-1).toString(32),i>>=g,c-=g,Rt=1<<32-ol(t)+c|a<<c|i,Il=f+e}else Rt=1<<f|a<<c|i,Il=e}function oa(e){e.return!==null&&(ra(e,1),Ad(e,1,0))}function uo(e){for(;e===eu;)eu=yi[--_i],yi[_i]=null,tu=yi[--_i],yi[_i]=null;for(;e===ka;)ka=Jn[--Ot],Jn[Ot]=null,Il=Jn[--Ot],Jn[Ot]=null,Rt=Jn[--Ot],Jn[Ot]=null}function ro(e,t){Jn[Ot++]=Rt,Jn[Ot++]=Il,Jn[Ot++]=ka,Rt=t.id,Il=t.overflow,ka=e}var Gt=null,_t=null,Ie=!1,ja=null,ml=!1,nu=Error(m(519));function ca(e){var t=Error(m(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw fa(hl(t,e)),nu}function Dd(e){var t=e.stateNode,a=e.type,i=e.memoizedProps;switch(t[$t]=e,t[Cn]=i,a){case"dialog":Je("cancel",t),Je("close",t);break;case"iframe":case"object":case"embed":Je("load",t);break;case"video":case"audio":for(a=0;a<Yl.length;a++)Je(Yl[a],t);break;case"source":Je("error",t);break;case"img":case"image":case"link":Je("error",t),Je("load",t);break;case"details":Je("toggle",t);break;case"input":Je("invalid",t),kr(t,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0);break;case"select":Je("invalid",t);break;case"textarea":Je("invalid",t),Gr(t,i.value,i.defaultValue,i.children)}a=i.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||i.suppressHydrationWarning===!0||kp(t.textContent,a)?(i.popover!=null&&(Je("beforetoggle",t),Je("toggle",t)),i.onScroll!=null&&Je("scroll",t),i.onScrollEnd!=null&&Je("scrollend",t),i.onClick!=null&&(t.onclick=wa),t=!0):t=!1,t||ca(e,!0)}function Rd(e){for(Gt=e.return;Gt;)switch(Gt.tag){case 5:case 31:case 13:ml=!1;return;case 27:case 3:ml=!0;return;default:Gt=Gt.return}}function lu(e){if(e!==Gt)return!1;if(!Ie)return Rd(e),Ie=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Cm(e.type,e.memoizedProps)),a=!a),a&&_t&&ca(e),Rd(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(m(317));_t=Xp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(m(317));_t=Xp(e)}else t===27?(t=_t,Tu(e.type)?(e=Nm,Nm=null,_t=e):_t=t):_t=Gt?Oa(e.stateNode.nextSibling):null;return!0}function bi(){_t=Gt=null,Ie=!1}function oo(){var e=ja;return e!==null&&(Ft===null?Ft=e:Ft.push.apply(Ft,e),ja=null),e}function fa(e){ja===null?ja=[e]:ja.push(e)}var au=Me(null),Si=null,da=null;function Ga(e,t,a){_e(au,t._currentValue),t._currentValue=a}function ha(e){e._currentValue=au.current,ye(au)}function co(e,t,a){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===a)break;e=e.return}}function fo(e,t,a,i){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var f=c.dependencies;if(f!==null){var g=c.child;f=f.firstContext;e:for(;f!==null;){var _=f;f=c;for(var z=0;z<t.length;z++)if(_.context===t[z]){f.lanes|=a,_=f.alternate,_!==null&&(_.lanes|=a),co(f.return,a,e),i||(g=null);break e}f=_.next}}else if(c.tag===18){if(g=c.return,g===null)throw Error(m(341));g.lanes|=a,f=g.alternate,f!==null&&(f.lanes|=a),co(g,a,e),g=null}else g=c.child;if(g!==null)g.return=c;else for(g=c;g!==null;){if(g===e){g=null;break}if(c=g.sibling,c!==null){c.return=g.return,g=c;break}g=g.return}c=g}}function ma(e,t,a,i){e=null;for(var c=t,f=!1;c!==null;){if(!f){if((c.flags&524288)!==0)f=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var g=c.alternate;if(g===null)throw Error(m(387));if(g=g.memoizedProps,g!==null){var _=c.type;jn(c.pendingProps.value,g.value)||(e!==null?e.push(_):e=[_])}}else if(c===li.current){if(g=c.alternate,g===null)throw Error(m(387));g.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(Nf):e=[Nf])}c=c.return}e!==null&&fo(t,e,a,i),t.flags|=262144}function tr(e){for(e=e.firstContext;e!==null;){if(!jn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ei(e){Si=e,da=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ae(e){return Nd(Si,e)}function iu(e,t){return Si===null&&Ei(e),Nd(e,t)}function Nd(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},da===null){if(e===null)throw Error(m(308));da=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else da=da.next=t;return a}var Bd=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,i){e.push(i)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},hm=u.unstable_scheduleCallback,mm=u.unstable_NormalPriority,Wt={$$typeof:Z,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Hc(){return{controller:new Bd,data:new Map,refCount:0}}function ss(e){e.refCount--,e.refCount===0&&hm(mm,function(){e.controller.abort()})}var pl=null,ho=0,Va=0,Dl=null;function Lc(e,t){if(pl===null){var a=pl=[];ho=0,Va=G(),Dl={status:"pending",value:void 0,then:function(i){a.push(i)}}}return ho++,t.then(kc,kc),t}function kc(){if(--ho===0&&pl!==null){Dl!==null&&(Dl.status="fulfilled");var e=pl;pl=null,Va=0,Dl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function jc(e,t){var a=[],i={status:"pending",value:null,reason:null,then:function(c){a.push(c)}};return e.then(function(){i.status="fulfilled",i.value=t;for(var c=0;c<a.length;c++)(0,a[c])(t)},function(c){for(i.status="rejected",i.reason=c,c=0;c<a.length;c++)(0,a[c])(void 0)}),i}var wd=q.S;q.S=function(e,t){Mf=hn(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Lc(e,t),wd!==null&&wd(e,t)};var Ti=Me(null);function mo(){var e=Ti.current;return e!==null?e:Re.pooledCache}function nr(e,t){t===null?_e(Ti,Ti.current):_e(Ti,t.pool)}function Gc(){var e=mo();return e===null?null:{parent:Wt._currentValue,pool:e}}var us=Error(m(460)),lr=Error(m(474)),ke=Error(m(542)),po={then:function(){}};function Wn(e){return e=e.status,e==="fulfilled"||e==="rejected"}function vo(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(wa,wa),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,cs(e),e;default:if(typeof t.status=="string")t.then(wa,wa);else{if(e=Re,e!==null&&100<e.shellSuspendCounter)throw Error(m(482));e=t,e.status="pending",e.then(function(i){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=i}},function(i){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=i}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,cs(e),e}throw pa=t,us}}function rs(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(pa=a,us):a}}var pa=null;function os(){if(pa===null)throw Error(m(459));var e=pa;return pa=null,e}function cs(e){if(e===us||e===ke)throw Error(m(483))}var fs=null,ds=0;function ar(e){var t=ds;return ds+=1,fs===null&&(fs=[]),vo(fs,e,t)}function Rl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function su(e,t){throw t.$$typeof===V?Error(m(525)):(e=Object.prototype.toString.call(t),Error(m(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function go(e){function t(A,M){if(e){var w=A.deletions;w===null?(A.deletions=[M],A.flags|=16):w.push(M)}}function a(A,M){if(!e)return null;for(;M!==null;)t(A,M),M=M.sibling;return null}function i(A){for(var M=new Map;A!==null;)A.key!==null?M.set(A.key,A):M.set(A.index,A),A=A.sibling;return M}function c(A,M){return A=$n(A,M),A.index=0,A.sibling=null,A}function f(A,M,w){return A.index=w,e?(w=A.alternate,w!==null?(w=w.index,w<M?(A.flags|=67108866,M):w):(A.flags|=67108866,M)):(A.flags|=1048576,M)}function g(A){return e&&A.alternate===null&&(A.flags|=67108866),A}function _(A,M,w,X){return M===null||M.tag!==6?(M=io(w,A.mode,X),M.return=A,M):(M=c(M,w),M.return=A,M)}function z(A,M,w,X){var Oe=w.type;return Oe===ee?Q(A,M,w.props.children,X,w.key):M!==null&&(M.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===he&&rs(Oe)===M.type)?(M=c(M,w.props),Rl(M,w),M.return=A,M):(M=ua(w.type,w.key,w.props,null,A.mode,X),Rl(M,w),M.return=A,M)}function H(A,M,w,X){return M===null||M.tag!==4||M.stateNode.containerInfo!==w.containerInfo||M.stateNode.implementation!==w.implementation?(M=so(w,A.mode,X),M.return=A,M):(M=c(M,w.children||[]),M.return=A,M)}function Q(A,M,w,X,Oe){return M===null||M.tag!==7?(M=gi(w,A.mode,X,Oe),M.return=A,M):(M=c(M,w),M.return=A,M)}function I(A,M,w){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=io(""+M,A.mode,w),M.return=A,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case N:return w=ua(M.type,M.key,M.props,null,A.mode,w),Rl(w,M),w.return=A,w;case K:return M=so(M,A.mode,w),M.return=A,M;case he:return M=rs(M),I(A,M,w)}if(ue(M)||Pe(M))return M=gi(M,A.mode,w,null),M.return=A,M;if(typeof M.then=="function")return I(A,ar(M),w);if(M.$$typeof===Z)return I(A,iu(A,M),w);su(A,M)}return null}function k(A,M,w,X){var Oe=M!==null?M.key:null;if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return Oe!==null?null:_(A,M,""+w,X);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case N:return w.key===Oe?z(A,M,w,X):null;case K:return w.key===Oe?H(A,M,w,X):null;case he:return w=rs(w),k(A,M,w,X)}if(ue(w)||Pe(w))return Oe!==null?null:Q(A,M,w,X,null);if(typeof w.then=="function")return k(A,M,ar(w),X);if(w.$$typeof===Z)return k(A,M,iu(A,w),X);su(A,w)}return null}function Y(A,M,w,X,Oe){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return A=A.get(w)||null,_(M,A,""+X,Oe);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case N:return A=A.get(X.key===null?w:X.key)||null,z(M,A,X,Oe);case K:return A=A.get(X.key===null?w:X.key)||null,H(M,A,X,Oe);case he:return X=rs(X),Y(A,M,w,X,Oe)}if(ue(X)||Pe(X))return A=A.get(w)||null,Q(M,A,X,Oe,null);if(typeof X.then=="function")return Y(A,M,w,ar(X),Oe);if(X.$$typeof===Z)return Y(A,M,w,iu(M,X),Oe);su(M,X)}return null}function de(A,M,w,X){for(var Oe=null,st=null,pe=M,Ve=M=0,et=null;pe!==null&&Ve<w.length;Ve++){pe.index>Ve?(et=pe,pe=null):et=pe.sibling;var ut=k(A,pe,w[Ve],X);if(ut===null){pe===null&&(pe=et);break}e&&pe&&ut.alternate===null&&t(A,pe),M=f(ut,M,Ve),st===null?Oe=ut:st.sibling=ut,st=ut,pe=et}if(Ve===w.length)return a(A,pe),Ie&&ra(A,Ve),Oe;if(pe===null){for(;Ve<w.length;Ve++)pe=I(A,w[Ve],X),pe!==null&&(M=f(pe,M,Ve),st===null?Oe=pe:st.sibling=pe,st=pe);return Ie&&ra(A,Ve),Oe}for(pe=i(pe);Ve<w.length;Ve++)et=Y(pe,A,Ve,w[Ve],X),et!==null&&(e&&et.alternate!==null&&pe.delete(et.key===null?Ve:et.key),M=f(et,M,Ve),st===null?Oe=et:st.sibling=et,st=et);return e&&pe.forEach(function(Cu){return t(A,Cu)}),Ie&&ra(A,Ve),Oe}function Ue(A,M,w,X){if(w==null)throw Error(m(151));for(var Oe=null,st=null,pe=M,Ve=M=0,et=null,ut=w.next();pe!==null&&!ut.done;Ve++,ut=w.next()){pe.index>Ve?(et=pe,pe=null):et=pe.sibling;var Cu=k(A,pe,ut.value,X);if(Cu===null){pe===null&&(pe=et);break}e&&pe&&Cu.alternate===null&&t(A,pe),M=f(Cu,M,Ve),st===null?Oe=Cu:st.sibling=Cu,st=Cu,pe=et}if(ut.done)return a(A,pe),Ie&&ra(A,Ve),Oe;if(pe===null){for(;!ut.done;Ve++,ut=w.next())ut=I(A,ut.value,X),ut!==null&&(M=f(ut,M,Ve),st===null?Oe=ut:st.sibling=ut,st=ut);return Ie&&ra(A,Ve),Oe}for(pe=i(pe);!ut.done;Ve++,ut=w.next())ut=Y(pe,A,Ve,ut.value,X),ut!==null&&(e&&ut.alternate!==null&&pe.delete(ut.key===null?Ve:ut.key),M=f(ut,M,Ve),st===null?Oe=ut:st.sibling=ut,st=ut);return e&&pe.forEach(function(xg){return t(A,xg)}),Ie&&ra(A,Ve),Oe}function Et(A,M,w,X){if(typeof w=="object"&&w!==null&&w.type===ee&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case N:e:{for(var Oe=w.key;M!==null;){if(M.key===Oe){if(Oe=w.type,Oe===ee){if(M.tag===7){a(A,M.sibling),X=c(M,w.props.children),X.return=A,A=X;break e}}else if(M.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===he&&rs(Oe)===M.type){a(A,M.sibling),X=c(M,w.props),Rl(X,w),X.return=A,A=X;break e}a(A,M);break}else t(A,M);M=M.sibling}w.type===ee?(X=gi(w.props.children,A.mode,X,w.key),X.return=A,A=X):(X=ua(w.type,w.key,w.props,null,A.mode,X),Rl(X,w),X.return=A,A=X)}return g(A);case K:e:{for(Oe=w.key;M!==null;){if(M.key===Oe)if(M.tag===4&&M.stateNode.containerInfo===w.containerInfo&&M.stateNode.implementation===w.implementation){a(A,M.sibling),X=c(M,w.children||[]),X.return=A,A=X;break e}else{a(A,M);break}else t(A,M);M=M.sibling}X=so(w,A.mode,X),X.return=A,A=X}return g(A);case he:return w=rs(w),Et(A,M,w,X)}if(ue(w))return de(A,M,w,X);if(Pe(w)){if(Oe=Pe(w),typeof Oe!="function")throw Error(m(150));return w=Oe.call(w),Ue(A,M,w,X)}if(typeof w.then=="function")return Et(A,M,ar(w),X);if(w.$$typeof===Z)return Et(A,M,iu(A,w),X);su(A,w)}return typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint"?(w=""+w,M!==null&&M.tag===6?(a(A,M.sibling),X=c(M,w),X.return=A,A=X):(a(A,M),X=io(w,A.mode,X),X.return=A,A=X),g(A)):a(A,M)}return function(A,M,w,X){try{ds=0;var Oe=Et(A,M,w,X);return fs=null,Oe}catch(pe){if(pe===us||pe===ke)throw pe;var st=Dt(29,pe,null,A.mode);return st.lanes=X,st.return=A,st}finally{}}}var Fa=go(!0),yo=go(!1),Vn=!1;function ir(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Vc(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 Ya(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function zi(e,t,a){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(ge&2)!==0){var c=i.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),i.pending=t,t=Al(e),pi(e,null,a),t}return pn(e,i,t,a),Al(e)}function Oi(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var i=t.lanes;i&=e.pendingLanes,a|=i,t.lanes=a,Bu(e,a)}}function ze(e,t){var a=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,a===i)){var c=null,f=null;if(a=a.firstBaseUpdate,a!==null){do{var g={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};f===null?c=f=g:f=f.next=g,a=a.next}while(a!==null);f===null?c=f=t:f=f.next=t}else c=f=t;a={baseState:i.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:i.shared,callbacks:i.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Fc=!1;function sr(){if(Fc){var e=Dl;if(e!==null)throw e}}function uu(e,t,a,i){Fc=!1;var c=e.updateQueue;Vn=!1;var f=c.firstBaseUpdate,g=c.lastBaseUpdate,_=c.shared.pending;if(_!==null){c.shared.pending=null;var z=_,H=z.next;z.next=null,g===null?f=H:g.next=H,g=z;var Q=e.alternate;Q!==null&&(Q=Q.updateQueue,_=Q.lastBaseUpdate,_!==g&&(_===null?Q.firstBaseUpdate=H:_.next=H,Q.lastBaseUpdate=z))}if(f!==null){var I=c.baseState;g=0,Q=H=z=null,_=f;do{var k=_.lane&-536870913,Y=k!==_.lane;if(Y?(Le&k)===k:(i&k)===k){k!==0&&k===Va&&(Fc=!0),Q!==null&&(Q=Q.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var de=e,Ue=_;k=t;var Et=a;switch(Ue.tag){case 1:if(de=Ue.payload,typeof de=="function"){I=de.call(Et,I,k);break e}I=de;break e;case 3:de.flags=de.flags&-65537|128;case 0:if(de=Ue.payload,k=typeof de=="function"?de.call(Et,I,k):de,k==null)break e;I=x({},I,k);break e;case 2:Vn=!0}}k=_.callback,k!==null&&(e.flags|=64,Y&&(e.flags|=8192),Y=c.callbacks,Y===null?c.callbacks=[k]:Y.push(k))}else Y={lane:k,tag:_.tag,payload:_.payload,callback:_.callback,next:null},Q===null?(H=Q=Y,z=I):Q=Q.next=Y,g|=k;if(_=_.next,_===null){if(_=c.shared.pending,_===null)break;Y=_,_=Y.next,Y.next=null,c.lastBaseUpdate=Y,c.shared.pending=null}}while(!0);Q===null&&(z=I),c.baseState=z,c.firstBaseUpdate=H,c.lastBaseUpdate=Q,f===null&&(c.shared.lanes=0),Ea|=g,e.lanes=g,e.memoizedState=I}}function ru(e,t){if(typeof e!="function")throw Error(m(191,e));e.call(t)}function Hd(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)ru(a[e],t)}var ou=Me(null),_o=Me(0);function Ld(e,t){e=_l,_e(_o,e),_e(ou,t),_l=e|t.baseLanes}function Yc(){_e(_o,_l),_e(ou,ou.current)}function ur(){_l=_o.current,ye(ou),ye(_o)}var el=Me(null),Fn=null;function qa(e){var t=e.alternate;_e(Ke,Ke.current&1),_e(el,e),Fn===null&&(t===null||ou.current!==null||t.memoizedState!==null)&&(Fn=e)}function qc(e){_e(Ke,Ke.current),_e(el,e),Fn===null&&(Fn=e)}function kd(e){e.tag===22?(_e(Ke,Ke.current),_e(el,e),Fn===null&&(Fn=e)):tl()}function tl(){_e(Ke,Ke.current),_e(el,el.current)}function qt(e){ye(el),Fn===e&&(Fn=null),ye(Ke)}var Ke=Me(0);function vl(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Dm(a)||Rm(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var xt=0,we=null,pt=null,Ze=null,Nl=!1,cu=!1,hs=!1,bo=0,rr=0,fu=null,Zc=0;function Nt(){throw Error(m(321))}function Qc(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!jn(e[a],t[a]))return!1;return!0}function So(e,t,a,i,c,f){return xt=f,we=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,q.H=e===null||e.memoizedState===null?vh:hf,hs=!1,f=a(i,c),hs=!1,cu&&(f=ms(t,a,i,c)),jd(e),f}function jd(e){q.H=du;var t=pt!==null&&pt.next!==null;if(xt=0,Ze=pt=we=null,Nl=!1,rr=0,fu=null,t)throw Error(m(300));e===null||en||(e=e.dependencies,e!==null&&tr(e)&&(en=!0))}function ms(e,t,a,i){we=e;var c=0;do{if(cu&&(fu=null),rr=0,cu=!1,25<=c)throw Error(m(301));if(c+=1,Ze=pt=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}q.H=Bl,f=t(a,i)}while(cu);return f}function ps(){var e=q.H,t=e.useState()[0];return t=typeof t.then=="function"?or(t):t,e=e.useState()[0],(pt!==null?pt.memoizedState:null)!==e&&(we.flags|=1024),t}function Xc(){var e=bo!==0;return bo=0,e}function Ic(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Kc(e){if(Nl){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Nl=!1}xt=0,Ze=pt=we=null,cu=!1,rr=bo=0,fu=null}function sn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ze===null?we.memoizedState=Ze=e:Ze=Ze.next=e,Ze}function Zt(){if(pt===null){var e=we.alternate;e=e!==null?e.memoizedState:null}else e=pt.next;var t=Ze===null?we.memoizedState:Ze.next;if(t!==null)Ze=t,pt=e;else{if(e===null)throw we.alternate===null?Error(m(467)):Error(m(310));pt=e,e={memoizedState:pt.memoizedState,baseState:pt.baseState,baseQueue:pt.baseQueue,queue:pt.queue,next:null},Ze===null?we.memoizedState=Ze=e:Ze=Ze.next=e}return Ze}function Eo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function or(e){var t=rr;return rr+=1,fu===null&&(fu=[]),e=vo(fu,e,t),t=we,(Ze===null?t.memoizedState:Ze.next)===null&&(t=t.alternate,q.H=t===null||t.memoizedState===null?vh:hf),e}function xi(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return or(e);if(e.$$typeof===Z)return Ae(e)}throw Error(m(438,String(e)))}function Pc(e){var t=null,a=we.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var i=we.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(t={data:i.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Eo(),we.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),i=0;i<e;i++)a[i]=Ee;return t.index++,a}function Za(e,t){return typeof t=="function"?t(e):t}function To(e){var t=Zt();return $c(t,pt,e)}function $c(e,t,a){var i=e.queue;if(i===null)throw Error(m(311));i.lastRenderedReducer=a;var c=e.baseQueue,f=i.pending;if(f!==null){if(c!==null){var g=c.next;c.next=f.next,f.next=g}t.baseQueue=c=f,i.pending=null}if(f=e.baseState,c===null)e.memoizedState=f;else{t=c.next;var _=g=null,z=null,H=t,Q=!1;do{var I=H.lane&-536870913;if(I!==H.lane?(Le&I)===I:(xt&I)===I){var k=H.revertLane;if(k===0)z!==null&&(z=z.next={lane:0,revertLane:0,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null}),I===Va&&(Q=!0);else if((xt&k)===k){H=H.next,k===Va&&(Q=!0);continue}else I={lane:0,revertLane:H.revertLane,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},z===null?(_=z=I,g=f):z=z.next=I,we.lanes|=k,Ea|=k;I=H.action,hs&&a(f,I),f=H.hasEagerState?H.eagerState:a(f,I)}else k={lane:I,revertLane:H.revertLane,gesture:H.gesture,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},z===null?(_=z=k,g=f):z=z.next=k,we.lanes|=I,Ea|=I;H=H.next}while(H!==null&&H!==t);if(z===null?g=f:z.next=_,!jn(f,e.memoizedState)&&(en=!0,Q&&(a=Dl,a!==null)))throw a;e.memoizedState=f,e.baseState=g,e.baseQueue=z,i.lastRenderedState=f}return c===null&&(i.lanes=0),[e.memoizedState,i.dispatch]}function Jc(e){var t=Zt(),a=t.queue;if(a===null)throw Error(m(311));a.lastRenderedReducer=e;var i=a.dispatch,c=a.pending,f=t.memoizedState;if(c!==null){a.pending=null;var g=c=c.next;do f=e(f,g.action),g=g.next;while(g!==c);jn(f,t.memoizedState)||(en=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),a.lastRenderedState=f}return[f,i]}function Gd(e,t,a){var i=we,c=Zt(),f=Ie;if(f){if(a===void 0)throw Error(m(407));a=a()}else a=t();var g=!jn((pt||c).memoizedState,a);if(g&&(c.memoizedState=a,en=!0),c=c.queue,uf(Yd.bind(null,i,c,e),[e]),c.getSnapshot!==t||g||Ze!==null&&Ze.memoizedState.tag&1){if(i.flags|=2048,Mi(9,{destroy:void 0},Fd.bind(null,i,c,a,t),null),Re===null)throw Error(m(349));f||(xt&127)!==0||Vd(i,t,a)}return a}function Vd(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=we.updateQueue,t===null?(t=Eo(),we.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Fd(e,t,a,i){t.value=a,t.getSnapshot=i,qd(t)&&Zd(e)}function Yd(e,t,a){return a(function(){qd(t)&&Zd(e)})}function qd(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!jn(e,a)}catch{return!0}}function Zd(e){var t=Gn(e,2);t!==null&&Ge(t,e,2)}function Wc(e){var t=sn();if(typeof e=="function"){var a=e;if(e=a(),hs){Aa(!0);try{a()}finally{Aa(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Za,lastRenderedState:e},t}function ef(e,t,a,i){return e.baseState=a,$c(e,pt,typeof i=="function"?i:Za)}function pm(e,t,a,i,c){if(Mo(e))throw Error(m(485));if(e=t.action,e!==null){var f={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(g){f.listeners.push(g)}};q.T!==null?a(!0):f.isTransition=!1,i(f),a=t.pending,a===null?(f.next=t.pending=f,Qd(t,f)):(f.next=a.next,t.pending=a.next=f)}}function Qd(e,t){var a=t.action,i=t.payload,c=e.state;if(t.isTransition){var f=q.T,g={};q.T=g;try{var _=a(c,i),z=q.S;z!==null&&z(g,_),Xd(e,t,_)}catch(H){tf(e,t,H)}finally{f!==null&&g.types!==null&&(f.types=g.types),q.T=f}}else try{f=a(c,i),Xd(e,t,f)}catch(H){tf(e,t,H)}}function Xd(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(i){Id(e,t,i)},function(i){return tf(e,t,i)}):Id(e,t,a)}function Id(e,t,a){t.status="fulfilled",t.value=a,Kd(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Qd(e,a)))}function tf(e,t,a){var i=e.pending;if(e.pending=null,i!==null){i=i.next;do t.status="rejected",t.reason=a,Kd(t),t=t.next;while(t!==i)}e.action=null}function Kd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function nf(e,t){return t}function lf(e,t){if(Ie){var a=Re.formState;if(a!==null){e:{var i=we;if(Ie){if(_t){t:{for(var c=_t,f=ml;c.nodeType!==8;){if(!f){c=null;break t}if(c=Oa(c.nextSibling),c===null){c=null;break t}}f=c.data,c=f==="F!"||f==="F"?c:null}if(c){_t=Oa(c.nextSibling),i=c.data==="F!";break e}}ca(i)}i=!1}i&&(t=a[0])}}return a=sn(),a.memoizedState=a.baseState=t,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:nf,lastRenderedState:t},a.queue=i,a=hh.bind(null,we,i),i.dispatch=a,i=Wc(!1),f=df.bind(null,we,!1,i.queue),i=sn(),c={state:t,dispatch:null,action:e,pending:null},i.queue=c,a=pm.bind(null,we,c,f,a),c.dispatch=a,i.memoizedState=e,[t,a,!1]}function Pd(e){var t=Zt();return af(t,pt,e)}function af(e,t,a){if(t=$c(e,t,nf)[0],e=To(Za)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var i=or(t)}catch(g){throw g===us?ke:g}else i=t;t=Zt();var c=t.queue,f=c.dispatch;return a!==t.memoizedState&&(we.flags|=2048,Mi(9,{destroy:void 0},$d.bind(null,c,a),null)),[i,f,e]}function $d(e,t){e.action=t}function sf(e){var t=Zt(),a=pt;if(a!==null)return af(t,a,e);Zt(),t=t.memoizedState,a=Zt();var i=a.queue.dispatch;return a.memoizedState=e,[t,i,!1]}function Mi(e,t,a,i){return e={tag:e,create:a,deps:i,inst:t,next:null},t=we.updateQueue,t===null&&(t=Eo(),we.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(i=a.next,a.next=e,e.next=i,t.lastEffect=e),e}function zo(){return Zt().memoizedState}function Oo(e,t,a,i){var c=sn();we.flags|=e,c.memoizedState=Mi(1|t,{destroy:void 0},a,i===void 0?null:i)}function xo(e,t,a,i){var c=Zt();i=i===void 0?null:i;var f=c.memoizedState.inst;pt!==null&&i!==null&&Qc(i,pt.memoizedState.deps)?c.memoizedState=Mi(t,f,a,i):(we.flags|=e,c.memoizedState=Mi(1|t,f,a,i))}function Jd(e,t){Oo(8390656,8,e,t)}function uf(e,t){xo(2048,8,e,t)}function Wd(e){we.flags|=4;var t=we.updateQueue;if(t===null)t=Eo(),we.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function eh(e){var t=Zt().memoizedState;return Wd({ref:t,nextImpl:e}),function(){if((ge&2)!==0)throw Error(m(440));return t.impl.apply(void 0,arguments)}}function th(e,t){return xo(4,2,e,t)}function nh(e,t){return xo(4,4,e,t)}function lh(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ah(e,t,a){a=a!=null?a.concat([e]):null,xo(4,4,lh.bind(null,t,e),a)}function rf(){}function ih(e,t){var a=Zt();t=t===void 0?null:t;var i=a.memoizedState;return t!==null&&Qc(t,i[1])?i[0]:(a.memoizedState=[e,t],e)}function sh(e,t){var a=Zt();t=t===void 0?null:t;var i=a.memoizedState;if(t!==null&&Qc(t,i[1]))return i[0];if(i=e(),hs){Aa(!0);try{e()}finally{Aa(!1)}}return a.memoizedState=[i,t],i}function of(e,t,a){return a===void 0||(xt&1073741824)!==0&&(Le&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Ye(),we.lanes|=e,Ea|=e,a)}function uh(e,t,a,i){return jn(a,t)?a:ou.current!==null?(e=of(e,a,i),jn(e,t)||(en=!0),e):(xt&42)===0||(xt&1073741824)!==0&&(Le&261930)===0?(en=!0,e.memoizedState=a):(e=Ye(),we.lanes|=e,Ea|=e,t)}function rh(e,t,a,i,c){var f=W.p;W.p=f!==0&&8>f?f:8;var g=q.T,_={};q.T=_,df(e,!1,t,a);try{var z=c(),H=q.S;if(H!==null&&H(_,z),z!==null&&typeof z=="object"&&typeof z.then=="function"){var Q=jc(z,i);cr(e,t,Q,Sl(e))}else cr(e,t,i,Sl(e))}catch(I){cr(e,t,{then:function(){},status:"rejected",reason:I},Sl())}finally{W.p=f,g!==null&&_.types!==null&&(g.types=_.types),q.T=g}}function vm(){}function cf(e,t,a,i){if(e.tag!==5)throw Error(m(476));var c=oh(e).queue;rh(e,c,t,me,a===null?vm:function(){return ch(e),a(i)})}function oh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:me,baseState:me,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Za,lastRenderedState:me},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Za,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ch(e){var t=oh(e);t.next===null&&(t=e.alternate.memoizedState),cr(e,t.next.queue,{},Sl())}function ff(){return Ae(Nf)}function fh(){return Zt().memoizedState}function dh(){return Zt().memoizedState}function gm(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Sl();e=Ya(a);var i=zi(t,e,a);i!==null&&(Ge(i,t,a),Oi(i,t,a)),t={cache:Hc()},e.payload=t;return}t=t.return}}function ym(e,t,a){var i=Sl();a={lane:i,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Mo(e)?mh(t,a):(a=lo(e,t,a,i),a!==null&&(Ge(a,e,i),ph(a,t,i)))}function hh(e,t,a){var i=Sl();cr(e,t,a,i)}function cr(e,t,a,i){var c={lane:i,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Mo(e))mh(t,c);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var g=t.lastRenderedState,_=f(g,a);if(c.hasEagerState=!0,c.eagerState=_,jn(_,g))return pn(e,t,c,0),Re===null&&Wu(),!1}catch{}finally{}if(a=lo(e,t,c,i),a!==null)return Ge(a,e,i),ph(a,t,i),!0}return!1}function df(e,t,a,i){if(i={lane:2,revertLane:G(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Mo(e)){if(t)throw Error(m(479))}else t=lo(e,a,i,2),t!==null&&Ge(t,e,2)}function Mo(e){var t=e.alternate;return e===we||t!==null&&t===we}function mh(e,t){cu=Nl=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function ph(e,t,a){if((a&4194048)!==0){var i=t.lanes;i&=e.pendingLanes,a|=i,t.lanes=a,Bu(e,a)}}var du={readContext:Ae,use:xi,useCallback:Nt,useContext:Nt,useEffect:Nt,useImperativeHandle:Nt,useLayoutEffect:Nt,useInsertionEffect:Nt,useMemo:Nt,useReducer:Nt,useRef:Nt,useState:Nt,useDebugValue:Nt,useDeferredValue:Nt,useTransition:Nt,useSyncExternalStore:Nt,useId:Nt,useHostTransitionStatus:Nt,useFormState:Nt,useActionState:Nt,useOptimistic:Nt,useMemoCache:Nt,useCacheRefresh:Nt};du.useEffectEvent=Nt;var vh={readContext:Ae,use:xi,useCallback:function(e,t){return sn().memoizedState=[e,t===void 0?null:t],e},useContext:Ae,useEffect:Jd,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Oo(4194308,4,lh.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Oo(4194308,4,e,t)},useInsertionEffect:function(e,t){Oo(4,2,e,t)},useMemo:function(e,t){var a=sn();t=t===void 0?null:t;var i=e();if(hs){Aa(!0);try{e()}finally{Aa(!1)}}return a.memoizedState=[i,t],i},useReducer:function(e,t,a){var i=sn();if(a!==void 0){var c=a(t);if(hs){Aa(!0);try{a(t)}finally{Aa(!1)}}}else c=t;return i.memoizedState=i.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},i.queue=e,e=e.dispatch=ym.bind(null,we,e),[i.memoizedState,e]},useRef:function(e){var t=sn();return e={current:e},t.memoizedState=e},useState:function(e){e=Wc(e);var t=e.queue,a=hh.bind(null,we,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:rf,useDeferredValue:function(e,t){var a=sn();return of(a,e,t)},useTransition:function(){var e=Wc(!1);return e=rh.bind(null,we,e.queue,!0,!1),sn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var i=we,c=sn();if(Ie){if(a===void 0)throw Error(m(407));a=a()}else{if(a=t(),Re===null)throw Error(m(349));(Le&127)!==0||Vd(i,t,a)}c.memoizedState=a;var f={value:a,getSnapshot:t};return c.queue=f,Jd(Yd.bind(null,i,f,e),[e]),i.flags|=2048,Mi(9,{destroy:void 0},Fd.bind(null,i,f,a,t),null),a},useId:function(){var e=sn(),t=Re.identifierPrefix;if(Ie){var a=Il,i=Rt;a=(i&~(1<<32-ol(i)-1)).toString(32)+a,t="_"+t+"R_"+a,a=bo++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Zc++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:ff,useFormState:lf,useActionState:lf,useOptimistic:function(e){var t=sn();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=df.bind(null,we,!0,a),a.dispatch=t,[e,t]},useMemoCache:Pc,useCacheRefresh:function(){return sn().memoizedState=gm.bind(null,we)},useEffectEvent:function(e){var t=sn(),a={impl:e};return t.memoizedState=a,function(){if((ge&2)!==0)throw Error(m(440));return a.impl.apply(void 0,arguments)}}},hf={readContext:Ae,use:xi,useCallback:ih,useContext:Ae,useEffect:uf,useImperativeHandle:ah,useInsertionEffect:th,useLayoutEffect:nh,useMemo:sh,useReducer:To,useRef:zo,useState:function(){return To(Za)},useDebugValue:rf,useDeferredValue:function(e,t){var a=Zt();return uh(a,pt.memoizedState,e,t)},useTransition:function(){var e=To(Za)[0],t=Zt().memoizedState;return[typeof e=="boolean"?e:or(e),t]},useSyncExternalStore:Gd,useId:fh,useHostTransitionStatus:ff,useFormState:Pd,useActionState:Pd,useOptimistic:function(e,t){var a=Zt();return ef(a,pt,e,t)},useMemoCache:Pc,useCacheRefresh:dh};hf.useEffectEvent=eh;var Bl={readContext:Ae,use:xi,useCallback:ih,useContext:Ae,useEffect:uf,useImperativeHandle:ah,useInsertionEffect:th,useLayoutEffect:nh,useMemo:sh,useReducer:Jc,useRef:zo,useState:function(){return Jc(Za)},useDebugValue:rf,useDeferredValue:function(e,t){var a=Zt();return pt===null?of(a,e,t):uh(a,pt.memoizedState,e,t)},useTransition:function(){var e=Jc(Za)[0],t=Zt().memoizedState;return[typeof e=="boolean"?e:or(e),t]},useSyncExternalStore:Gd,useId:fh,useHostTransitionStatus:ff,useFormState:sf,useActionState:sf,useOptimistic:function(e,t){var a=Zt();return pt!==null?ef(a,pt,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Pc,useCacheRefresh:dh};Bl.useEffectEvent=eh;function Co(e,t,a,i){t=e.memoizedState,a=a(i,t),a=a==null?t:x({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var fr={enqueueSetState:function(e,t,a){e=e._reactInternals;var i=Sl(),c=Ya(i);c.payload=t,a!=null&&(c.callback=a),t=zi(e,c,i),t!==null&&(Ge(t,e,i),Oi(t,e,i))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var i=Sl(),c=Ya(i);c.tag=1,c.payload=t,a!=null&&(c.callback=a),t=zi(e,c,i),t!==null&&(Ge(t,e,i),Oi(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Sl(),i=Ya(a);i.tag=2,t!=null&&(i.callback=t),t=zi(e,i,a),t!==null&&(Ge(t,e,a),Oi(t,e,a))}};function mf(e,t,a,i,c,f,g){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,f,g):t.prototype&&t.prototype.isPureReactComponent?!Is(a,i)||!Is(c,f):!0}function pf(e,t,a,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,i),t.state!==e&&fr.enqueueReplaceState(t,t.state,null)}function Ci(e,t){var a=t;if("ref"in t){a={};for(var i in t)i!=="ref"&&(a[i]=t[i])}if(e=e.defaultProps){a===t&&(a=x({},a));for(var c in e)a[c]===void 0&&(a[c]=e[c])}return a}function gh(e){Ju(e)}function vf(e){console.error(e)}function gf(e){Ju(e)}function Uo(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(i){setTimeout(function(){throw i})}}function yh(e,t,a){try{var i=e.onCaughtError;i(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function yf(e,t,a){return a=Ya(a),a.tag=3,a.payload={element:null},a.callback=function(){Uo(e,t)},a}function _f(e){return e=Ya(e),e.tag=3,e}function _h(e,t,a,i){var c=a.type.getDerivedStateFromError;if(typeof c=="function"){var f=i.value;e.payload=function(){return c(f)},e.callback=function(){yh(t,a,i)}}var g=a.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(e.callback=function(){yh(t,a,i),typeof c!="function"&&(It===null?It=new Set([this]):It.add(this));var _=i.stack;this.componentDidCatch(i.value,{componentStack:_!==null?_:""})})}function un(e,t,a,i,c){if(a.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(t=a.alternate,t!==null&&ma(t,a,c,!0),a=el.current,a!==null){switch(a.tag){case 31:case 13:return Fn===null?_u():a.alternate===null&&Bt===0&&(Bt=3),a.flags&=-257,a.flags|=65536,a.lanes=c,i===po?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([i]):t.add(i),Tr(e,i,c)),!1;case 22:return a.flags|=65536,i===po?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([i]):a.add(i)),Tr(e,i,c)),!1}throw Error(m(435,a.tag))}return Tr(e,i,c),_u(),!1}if(Ie)return t=el.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,i!==nu&&(e=Error(m(422),{cause:i}),fa(hl(e,a)))):(i!==nu&&(t=Error(m(423),{cause:i}),fa(hl(t,a))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,i=hl(i,a),c=yf(e.stateNode,i,c),ze(e,c),Bt!==4&&(Bt=2)),!1;var f=Error(m(520),{cause:i});if(f=hl(f,a),Ts===null?Ts=[f]:Ts.push(f),Bt!==4&&(Bt=2),t===null)return!0;i=hl(i,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=c&-c,a.lanes|=e,e=yf(a.stateNode,i,e),ze(a,e),!1;case 1:if(t=a.type,f=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(It===null||!It.has(f))))return a.flags|=65536,c&=-c,a.lanes|=c,c=_f(c),_h(c,e,a,i),ze(a,c),!1}a=a.return}while(a!==null);return!1}var Ao=Error(m(461)),en=!1;function vn(e,t,a,i){t.child=e===null?yo(t,null,a,i):Fa(t,e.child,a,i)}function bf(e,t,a,i,c){a=a.render;var f=t.ref;if("ref"in i){var g={};for(var _ in i)_!=="ref"&&(g[_]=i[_])}else g=i;return Ei(t),i=So(e,t,a,g,f,c),_=Xc(),e!==null&&!en?(Ic(e,t,c),Qt(e,t,c)):(Ie&&_&&oa(t),t.flags|=1,vn(e,t,i,c),t.child)}function vs(e,t,a,i,c){if(e===null){var f=a.type;return typeof f=="function"&&!ao(f)&&f.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=f,Do(e,t,f,i,c)):(e=ua(a.type,null,i,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!Lo(e,c)){var g=f.memoizedProps;if(a=a.compare,a=a!==null?a:Is,a(g,i)&&e.ref===t.ref)return Qt(e,t,c)}return t.flags|=1,e=$n(f,i),e.ref=t.ref,e.return=t,t.child=e}function Do(e,t,a,i,c){if(e!==null){var f=e.memoizedProps;if(Is(f,i)&&e.ref===t.ref)if(en=!1,t.pendingProps=i=f,Lo(e,c))(e.flags&131072)!==0&&(en=!0);else return t.lanes=e.lanes,Qt(e,t,c)}return hu(e,t,a,i,c)}function gs(e,t,a,i){var c=i.children,f=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.mode==="hidden"){if((t.flags&128)!==0){if(f=f!==null?f.baseLanes|a:a,e!==null){for(i=t.child=e.child,c=0;i!==null;)c=c|i.lanes|i.childLanes,i=i.sibling;i=c&~f}else i=0,t.child=null;return nl(e,t,f,a,i)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&nr(t,f!==null?f.cachePool:null),f!==null?Ld(t,f):Yc(),kd(t);else return i=t.lanes=536870912,nl(e,t,f!==null?f.baseLanes|a:a,a,i)}else f!==null?(nr(t,f.cachePool),Ld(t,f),tl(),t.memoizedState=null):(e!==null&&nr(t,null),Yc(),tl());return vn(e,t,c,a),t.child}function va(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function nl(e,t,a,i,c){var f=mo();return f=f===null?null:{parent:Wt._currentValue,pool:f},t.memoizedState={baseLanes:a,cachePool:f},e!==null&&nr(t,null),Yc(),kd(t),e!==null&&ma(e,t,i,!0),t.childLanes=c,null}function Ro(e,t){return t=Ho({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function bh(e,t,a){return Fa(t,e.child,null,a),e=Ro(t,t.pendingProps),e.flags|=2,qt(t),t.memoizedState=null,e}function No(e,t,a){var i=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ie){if(i.mode==="hidden")return e=Ro(t,i),t.lanes=536870912,va(null,e);if(qc(t),(e=_t)?(e=Qp(e,ml),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ka!==null?{id:Rt,overflow:Il}:null,retryLane:536870912,hydrationErrors:null},a=Ws(e),a.return=t,t.child=a,Gt=t,_t=null)):e=null,e===null)throw ca(t);return t.lanes=536870912,null}return Ro(t,i)}var f=e.memoizedState;if(f!==null){var g=f.dehydrated;if(qc(t),c)if(t.flags&256)t.flags&=-257,t=bh(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(m(558));else if(en||ma(e,t,a,!1),c=(a&e.childLanes)!==0,en||c){if(i=Re,i!==null&&(g=uc(i,a),g!==0&&g!==f.retryLane))throw f.retryLane=g,Gn(e,g),Ge(i,e,g),Ao;_u(),t=bh(e,t,a)}else e=f.treeContext,_t=Oa(g.nextSibling),Gt=t,Ie=!0,ja=null,ml=!1,e!==null&&ro(t,e),t=Ro(t,i),t.flags|=4096;return t}return e=$n(e.child,{mode:i.mode,children:i.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ys(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(m(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function hu(e,t,a,i,c){return Ei(t),a=So(e,t,a,i,void 0,c),i=Xc(),e!==null&&!en?(Ic(e,t,c),Qt(e,t,c)):(Ie&&i&&oa(t),t.flags|=1,vn(e,t,a,c),t.child)}function dr(e,t,a,i,c,f){return Ei(t),t.updateQueue=null,a=ms(t,i,a,c),jd(e),i=Xc(),e!==null&&!en?(Ic(e,t,f),Qt(e,t,f)):(Ie&&i&&oa(t),t.flags|=1,vn(e,t,a,f),t.child)}function Bo(e,t,a,i,c){if(Ei(t),t.stateNode===null){var f=vi,g=a.contextType;typeof g=="object"&&g!==null&&(f=Ae(g)),f=new a(i,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=fr,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=i,f.state=t.memoizedState,f.refs={},ir(t),g=a.contextType,f.context=typeof g=="object"&&g!==null?Ae(g):vi,f.state=t.memoizedState,g=a.getDerivedStateFromProps,typeof g=="function"&&(Co(t,a,g,i),f.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(g=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),g!==f.state&&fr.enqueueReplaceState(f,f.state,null),uu(t,i,f,c),sr(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),i=!0}else if(e===null){f=t.stateNode;var _=t.memoizedProps,z=Ci(a,_);f.props=z;var H=f.context,Q=a.contextType;g=vi,typeof Q=="object"&&Q!==null&&(g=Ae(Q));var I=a.getDerivedStateFromProps;Q=typeof I=="function"||typeof f.getSnapshotBeforeUpdate=="function",_=t.pendingProps!==_,Q||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(_||H!==g)&&pf(t,f,i,g),Vn=!1;var k=t.memoizedState;f.state=k,uu(t,i,f,c),sr(),H=t.memoizedState,_||k!==H||Vn?(typeof I=="function"&&(Co(t,a,I,i),H=t.memoizedState),(z=Vn||mf(t,a,z,i,k,H,g))?(Q||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(t.flags|=4194308)):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=H),f.props=i,f.state=H,f.context=g,i=z):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{f=t.stateNode,Vc(e,t),g=t.memoizedProps,Q=Ci(a,g),f.props=Q,I=t.pendingProps,k=f.context,H=a.contextType,z=vi,typeof H=="object"&&H!==null&&(z=Ae(H)),_=a.getDerivedStateFromProps,(H=typeof _=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(g!==I||k!==z)&&pf(t,f,i,z),Vn=!1,k=t.memoizedState,f.state=k,uu(t,i,f,c),sr();var Y=t.memoizedState;g!==I||k!==Y||Vn||e!==null&&e.dependencies!==null&&tr(e.dependencies)?(typeof _=="function"&&(Co(t,a,_,i),Y=t.memoizedState),(Q=Vn||mf(t,a,Q,i,k,Y,z)||e!==null&&e.dependencies!==null&&tr(e.dependencies))?(H||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(i,Y,z),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(i,Y,z)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||g===e.memoizedProps&&k===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&k===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=Y),f.props=i,f.state=Y,f.context=z,i=Q):(typeof f.componentDidUpdate!="function"||g===e.memoizedProps&&k===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&k===e.memoizedState||(t.flags|=1024),i=!1)}return f=i,ys(e,t),i=(t.flags&128)!==0,f||i?(f=t.stateNode,a=i&&typeof a.getDerivedStateFromError!="function"?null:f.render(),t.flags|=1,e!==null&&i?(t.child=Fa(t,e.child,null,c),t.child=Fa(t,null,a,c)):vn(e,t,a,c),t.memoizedState=f.state,e=t.child):e=Qt(e,t,c),e}function Sh(e,t,a,i){return bi(),t.flags|=256,vn(e,t,a,i),t.child}var Sf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Rn(e){return{baseLanes:e,cachePool:Gc()}}function wo(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Zn),e}function Eh(e,t,a){var i=t.pendingProps,c=!1,f=(t.flags&128)!==0,g;if((g=f)||(g=e!==null&&e.memoizedState===null?!1:(Ke.current&2)!==0),g&&(c=!0,t.flags&=-129),g=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ie){if(c?qa(t):tl(),(e=_t)?(e=Qp(e,ml),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ka!==null?{id:Rt,overflow:Il}:null,retryLane:536870912,hydrationErrors:null},a=Ws(e),a.return=t,t.child=a,Gt=t,_t=null)):e=null,e===null)throw ca(t);return Rm(e)?t.lanes=32:t.lanes=536870912,null}var _=i.children;return i=i.fallback,c?(tl(),c=t.mode,_=Ho({mode:"hidden",children:_},c),i=gi(i,c,a,null),_.return=t,i.return=t,_.sibling=i,t.child=_,i=t.child,i.memoizedState=Rn(a),i.childLanes=wo(e,g,a),t.memoizedState=Sf,va(null,i)):(qa(t),hr(t,_))}var z=e.memoizedState;if(z!==null&&(_=z.dehydrated,_!==null)){if(f)t.flags&256?(qa(t),t.flags&=-257,t=Ef(e,t,a)):t.memoizedState!==null?(tl(),t.child=e.child,t.flags|=128,t=null):(tl(),_=i.fallback,c=t.mode,i=Ho({mode:"visible",children:i.children},c),_=gi(_,c,a,null),_.flags|=2,i.return=t,_.return=t,i.sibling=_,t.child=i,Fa(t,e.child,null,a),i=t.child,i.memoizedState=Rn(a),i.childLanes=wo(e,g,a),t.memoizedState=Sf,t=va(null,i));else if(qa(t),Rm(_)){if(g=_.nextSibling&&_.nextSibling.dataset,g)var H=g.dgst;g=H,i=Error(m(419)),i.stack="",i.digest=g,fa({value:i,source:null,stack:null}),t=Ef(e,t,a)}else if(en||ma(e,t,a,!1),g=(a&e.childLanes)!==0,en||g){if(g=Re,g!==null&&(i=uc(g,a),i!==0&&i!==z.retryLane))throw z.retryLane=i,Gn(e,i),Ge(g,e,i),Ao;Dm(_)||_u(),t=Ef(e,t,a)}else Dm(_)?(t.flags|=192,t.child=e.child,t=null):(e=z.treeContext,_t=Oa(_.nextSibling),Gt=t,Ie=!0,ja=null,ml=!1,e!==null&&ro(t,e),t=hr(t,i.children),t.flags|=4096);return t}return c?(tl(),_=i.fallback,c=t.mode,z=e.child,H=z.sibling,i=$n(z,{mode:"hidden",children:i.children}),i.subtreeFlags=z.subtreeFlags&65011712,H!==null?_=$n(H,_):(_=gi(_,c,a,null),_.flags|=2),_.return=t,i.return=t,i.sibling=_,t.child=i,va(null,i),i=t.child,_=e.child.memoizedState,_===null?_=Rn(a):(c=_.cachePool,c!==null?(z=Wt._currentValue,c=c.parent!==z?{parent:z,pool:z}:c):c=Gc(),_={baseLanes:_.baseLanes|a,cachePool:c}),i.memoizedState=_,i.childLanes=wo(e,g,a),t.memoizedState=Sf,va(e.child,i)):(qa(t),a=e.child,e=a.sibling,a=$n(a,{mode:"visible",children:i.children}),a.return=t,a.sibling=null,e!==null&&(g=t.deletions,g===null?(t.deletions=[e],t.flags|=16):g.push(e)),t.child=a,t.memoizedState=null,a)}function hr(e,t){return t=Ho({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ho(e,t){return e=Dt(22,e,null,t),e.lanes=0,e}function Ef(e,t,a){return Fa(t,e.child,null,a),e=hr(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Th(e,t,a){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),co(e.return,t,a)}function _s(e,t,a,i,c,f){var g=e.memoizedState;g===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:a,tailMode:c,treeForkCount:f}:(g.isBackwards=t,g.rendering=null,g.renderingStartTime=0,g.last=i,g.tail=a,g.tailMode=c,g.treeForkCount=f)}function ll(e,t,a){var i=t.pendingProps,c=i.revealOrder,f=i.tail;i=i.children;var g=Ke.current,_=(g&2)!==0;if(_?(g=g&1|2,t.flags|=128):g&=1,_e(Ke,g),vn(e,t,i,a),i=Ie?tu:0,!_&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Th(e,a,t);else if(e.tag===19)Th(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(c){case"forwards":for(a=t.child,c=null;a!==null;)e=a.alternate,e!==null&&vl(e)===null&&(c=a),a=a.sibling;a=c,a===null?(c=t.child,t.child=null):(c=a.sibling,a.sibling=null),_s(t,!1,c,a,f,i);break;case"backwards":case"unstable_legacy-backwards":for(a=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&vl(e)===null){t.child=c;break}e=c.sibling,c.sibling=a,a=c,c=e}_s(t,!0,a,null,f,i);break;case"together":_s(t,!1,null,null,void 0,i);break;default:t.memoizedState=null}return t.child}function Qt(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Ea|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(ma(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(m(153));if(t.child!==null){for(e=t.child,a=$n(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=$n(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Lo(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&tr(e)))}function _m(e,t,a){switch(t.tag){case 3:In(t,t.stateNode.containerInfo),Ga(t,Wt,e.memoizedState.cache),bi();break;case 27:case 5:fn(t);break;case 4:In(t,t.stateNode.containerInfo);break;case 10:Ga(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,qc(t),null;break;case 13:var i=t.memoizedState;if(i!==null)return i.dehydrated!==null?(qa(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Eh(e,t,a):(qa(t),e=Qt(e,t,a),e!==null?e.sibling:null);qa(t);break;case 19:var c=(e.flags&128)!==0;if(i=(a&t.childLanes)!==0,i||(ma(e,t,a,!1),i=(a&t.childLanes)!==0),c){if(i)return ll(e,t,a);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),_e(Ke,Ke.current),i)break;return null;case 22:return t.lanes=0,gs(e,t,a,t.pendingProps);case 24:Ga(t,Wt,e.memoizedState.cache)}return Qt(e,t,a)}function ko(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)en=!0;else{if(!Lo(e,a)&&(t.flags&128)===0)return en=!1,_m(e,t,a);en=(e.flags&131072)!==0}else en=!1,Ie&&(t.flags&1048576)!==0&&Ad(t,tu,t.index);switch(t.lanes=0,t.tag){case 16:e:{var i=t.pendingProps;if(e=rs(t.elementType),t.type=e,typeof e=="function")ao(e)?(i=Ci(e,i),t.tag=1,t=Bo(null,t,e,i,a)):(t.tag=0,t=hu(null,t,e,i,a));else{if(e!=null){var c=e.$$typeof;if(c===ne){t.tag=11,t=bf(null,t,e,i,a);break e}else if(c===ce){t.tag=14,t=vs(null,t,e,i,a);break e}}throw t=be(e)||e,Error(m(306,t,""))}}return t;case 0:return hu(e,t,t.type,t.pendingProps,a);case 1:return i=t.type,c=Ci(i,t.pendingProps),Bo(e,t,i,c,a);case 3:e:{if(In(t,t.stateNode.containerInfo),e===null)throw Error(m(387));i=t.pendingProps;var f=t.memoizedState;c=f.element,Vc(e,t),uu(t,i,null,a);var g=t.memoizedState;if(i=g.cache,Ga(t,Wt,i),i!==f.cache&&fo(t,[Wt],a,!0),sr(),i=g.element,f.isDehydrated)if(f={element:i,isDehydrated:!1,cache:g.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=Sh(e,t,i,a);break e}else if(i!==c){c=hl(Error(m(424)),t),fa(c),t=Sh(e,t,i,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(_t=Oa(e.firstChild),Gt=t,Ie=!0,ja=null,ml=!0,a=yo(t,null,i,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(bi(),i===c){t=Qt(e,t,a);break e}vn(e,t,i,a)}t=t.child}return t;case 26:return ys(e,t),e===null?(a=Jp(t.type,null,t.pendingProps,null))?t.memoizedState=a:Ie||(a=t.type,e=t.pendingProps,i=Mh(ln.current).createElement(a),i[$t]=t,i[Cn]=e,Xn(i,a,e),Jt(i),t.stateNode=i):t.memoizedState=Jp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return fn(t),e===null&&Ie&&(i=t.stateNode=Kp(t.type,t.pendingProps,ln.current),Gt=t,ml=!0,c=_t,Tu(t.type)?(Nm=c,_t=Oa(i.firstChild)):_t=c),vn(e,t,t.pendingProps.children,a),ys(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ie&&((c=i=_t)&&(i=ng(i,t.type,t.pendingProps,ml),i!==null?(t.stateNode=i,Gt=t,_t=Oa(i.firstChild),ml=!1,c=!0):c=!1),c||ca(t)),fn(t),c=t.type,f=t.pendingProps,g=e!==null?e.memoizedProps:null,i=f.children,Cm(c,f)?i=null:g!==null&&Cm(c,g)&&(t.flags|=32),t.memoizedState!==null&&(c=So(e,t,ps,null,null,a),Nf._currentValue=c),ys(e,t),vn(e,t,i,a),t.child;case 6:return e===null&&Ie&&((e=a=_t)&&(a=lg(a,t.pendingProps,ml),a!==null?(t.stateNode=a,Gt=t,_t=null,e=!0):e=!1),e||ca(t)),null;case 13:return Eh(e,t,a);case 4:return In(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Fa(t,null,i,a):vn(e,t,i,a),t.child;case 11:return bf(e,t,t.type,t.pendingProps,a);case 7:return vn(e,t,t.pendingProps,a),t.child;case 8:return vn(e,t,t.pendingProps.children,a),t.child;case 12:return vn(e,t,t.pendingProps.children,a),t.child;case 10:return i=t.pendingProps,Ga(t,t.type,i.value),vn(e,t,i.children,a),t.child;case 9:return c=t.type._context,i=t.pendingProps.children,Ei(t),c=Ae(c),i=i(c),t.flags|=1,vn(e,t,i,a),t.child;case 14:return vs(e,t,t.type,t.pendingProps,a);case 15:return Do(e,t,t.type,t.pendingProps,a);case 19:return ll(e,t,a);case 31:return No(e,t,a);case 22:return gs(e,t,a,t.pendingProps);case 24:return Ei(t),i=Ae(Wt),e===null?(c=mo(),c===null&&(c=Re,f=Hc(),c.pooledCache=f,f.refCount++,f!==null&&(c.pooledCacheLanes|=a),c=f),t.memoizedState={parent:i,cache:c},ir(t),Ga(t,Wt,c)):((e.lanes&a)!==0&&(Vc(e,t),uu(t,null,null,a),sr()),c=e.memoizedState,f=t.memoizedState,c.parent!==i?(c={parent:i,cache:i},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),Ga(t,Wt,i)):(i=f.cache,Ga(t,Wt,i),i!==c.cache&&fo(t,[Wt],a,!0))),vn(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(m(156,t.tag))}function ga(e){e.flags|=4}function mr(e,t,a,i,c){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(Ht())e.flags|=8192;else throw pa=po,lr}else e.flags&=-16777217}function Tf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!lv(t))if(Ht())e.flags|=8192;else throw pa=po,lr}function Qa(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?si():536870912,e.lanes|=t,Tt|=t)}function ya(e,t){if(!Ie)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var i=null;a!==null;)a.alternate!==null&&(i=a),a=a.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function vt(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,i=0;if(t)for(var c=e.child;c!==null;)a|=c.lanes|c.childLanes,i|=c.subtreeFlags&65011712,i|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)a|=c.lanes|c.childLanes,i|=c.subtreeFlags,i|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=i,e.childLanes=a,t}function pr(e,t,a){var i=t.pendingProps;switch(uo(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vt(t),null;case 1:return vt(t),null;case 3:return a=t.stateNode,i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),ha(Wt),bn(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(lu(t)?ga(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,oo())),vt(t),null;case 26:var c=t.type,f=t.memoizedState;return e===null?(ga(t),f!==null?(vt(t),Tf(t,f)):(vt(t),mr(t,c,null,i,a))):f?f!==e.memoizedState?(ga(t),vt(t),Tf(t,f)):(vt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==i&&ga(t),vt(t),mr(t,c,e,i,a)),null;case 27:if(at(t),a=ln.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&ga(t);else{if(!i){if(t.stateNode===null)throw Error(m(166));return vt(t),null}e=fe.current,lu(t)?Dd(t):(e=Kp(c,i,a),t.stateNode=e,ga(t))}return vt(t),null;case 5:if(at(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&ga(t);else{if(!i){if(t.stateNode===null)throw Error(m(166));return vt(t),null}if(f=fe.current,lu(t))Dd(t);else{var g=Mh(ln.current);switch(f){case 1:f=g.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:f=g.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":f=g.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":f=g.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":f=g.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof i.is=="string"?g.createElement("select",{is:i.is}):g.createElement("select"),i.multiple?f.multiple=!0:i.size&&(f.size=i.size);break;default:f=typeof i.is=="string"?g.createElement(c,{is:i.is}):g.createElement(c)}}f[$t]=t,f[Cn]=i;e:for(g=t.child;g!==null;){if(g.tag===5||g.tag===6)f.appendChild(g.stateNode);else if(g.tag!==4&&g.tag!==27&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===t)break e;for(;g.sibling===null;){if(g.return===null||g.return===t)break e;g=g.return}g.sibling.return=g.return,g=g.sibling}t.stateNode=f;e:switch(Xn(f,c,i),c){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&ga(t)}}return vt(t),mr(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&ga(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(m(166));if(e=ln.current,lu(t)){if(e=t.stateNode,a=t.memoizedProps,i=null,c=Gt,c!==null)switch(c.tag){case 27:case 5:i=c.memoizedProps}e[$t]=t,e=!!(e.nodeValue===a||i!==null&&i.suppressHydrationWarning===!0||kp(e.nodeValue,a)),e||ca(t,!0)}else e=Mh(e).createTextNode(i),e[$t]=t,t.stateNode=e}return vt(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(i=lu(t),a!==null){if(e===null){if(!i)throw Error(m(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(m(557));e[$t]=t}else bi(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;vt(t),e=!1}else a=oo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(qt(t),t):(qt(t),null);if((t.flags&128)!==0)throw Error(m(558))}return vt(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=lu(t),i!==null&&i.dehydrated!==null){if(e===null){if(!c)throw Error(m(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(m(317));c[$t]=t}else bi(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;vt(t),c=!1}else c=oo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(qt(t),t):(qt(t),null)}return qt(t),(t.flags&128)!==0?(t.lanes=a,t):(a=i!==null,e=e!==null&&e.memoizedState!==null,a&&(i=t.child,c=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(c=i.alternate.memoizedState.cachePool.pool),f=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(f=i.memoizedState.cachePool.pool),f!==c&&(i.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Qa(t,t.updateQueue),vt(t),null);case 4:return bn(),e===null&&Tm(t.stateNode.containerInfo),vt(t),null;case 10:return ha(t.type),vt(t),null;case 19:if(ye(Ke),i=t.memoizedState,i===null)return vt(t),null;if(c=(t.flags&128)!==0,f=i.rendering,f===null)if(c)ya(i,!1);else{if(Bt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=vl(e),f!==null){for(t.flags|=128,ya(i,!1),e=f.updateQueue,t.updateQueue=e,Qa(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Js(a,e),a=a.sibling;return _e(Ke,Ke.current&1|2),Ie&&ra(t,i.treeForkCount),t.child}e=e.sibling}i.tail!==null&&hn()>Xt&&(t.flags|=128,c=!0,ya(i,!1),t.lanes=4194304)}else{if(!c)if(e=vl(f),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,Qa(t,e),ya(i,!0),i.tail===null&&i.tailMode==="hidden"&&!f.alternate&&!Ie)return vt(t),null}else 2*hn()-i.renderingStartTime>Xt&&a!==536870912&&(t.flags|=128,c=!0,ya(i,!1),t.lanes=4194304);i.isBackwards?(f.sibling=t.child,t.child=f):(e=i.last,e!==null?e.sibling=f:t.child=f,i.last=f)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=hn(),e.sibling=null,a=Ke.current,_e(Ke,c?a&1|2:a&1),Ie&&ra(t,i.treeForkCount),e):(vt(t),null);case 22:case 23:return qt(t),ur(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?(a&536870912)!==0&&(t.flags&128)===0&&(vt(t),t.subtreeFlags&6&&(t.flags|=8192)):vt(t),a=t.updateQueue,a!==null&&Qa(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==a&&(t.flags|=2048),e!==null&&ye(Ti),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),ha(Wt),vt(t),null;case 25:return null;case 30:return null}throw Error(m(156,t.tag))}function wl(e,t){switch(uo(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ha(Wt),bn(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return at(t),null;case 31:if(t.memoizedState!==null){if(qt(t),t.alternate===null)throw Error(m(340));bi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(qt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(m(340));bi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ye(Ke),null;case 4:return bn(),null;case 10:return ha(t.type),null;case 22:case 23:return qt(t),ur(),e!==null&&ye(Ti),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ha(Wt),null;case 25:return null;default:return null}}function gl(e,t){switch(uo(t),t.tag){case 3:ha(Wt),bn();break;case 26:case 27:case 5:at(t);break;case 4:bn();break;case 31:t.memoizedState!==null&&qt(t);break;case 13:qt(t);break;case 19:ye(Ke);break;case 10:ha(t.type);break;case 22:case 23:qt(t),ur(),e!==null&&ye(Ti);break;case 24:ha(Wt)}}function Hl(e,t){try{var a=t.updateQueue,i=a!==null?a.lastEffect:null;if(i!==null){var c=i.next;a=c;do{if((a.tag&e)===e){i=void 0;var f=a.create,g=a.inst;i=f(),g.destroy=i}a=a.next}while(a!==c)}}catch(_){nt(t,t.return,_)}}function Tn(e,t,a){try{var i=t.updateQueue,c=i!==null?i.lastEffect:null;if(c!==null){var f=c.next;i=f;do{if((i.tag&e)===e){var g=i.inst,_=g.destroy;if(_!==void 0){g.destroy=void 0,c=t;var z=a,H=_;try{H()}catch(Q){nt(c,z,Q)}}}i=i.next}while(i!==f)}}catch(Q){nt(t,t.return,Q)}}function Kl(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Hd(t,a)}catch(i){nt(e,e.return,i)}}}function gn(e,t,a){a.props=Ci(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(i){nt(e,t,i)}}function Xa(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;case 30:i=e.stateNode;break;default:i=e.stateNode}typeof a=="function"?e.refCleanup=a(i):a.current=i}}catch(c){nt(e,t,c)}}function zn(e,t){var a=e.ref,i=e.refCleanup;if(a!==null)if(typeof i=="function")try{i()}catch(c){nt(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(c){nt(e,t,c)}else a.current=null}function vr(e){var t=e.type,a=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&i.focus();break e;case"img":a.src?i.src=a.src:a.srcSet&&(i.srcset=a.srcSet)}}catch(c){nt(e,e.return,c)}}function rn(e,t,a){try{var i=e.stateNode;P0(i,e.type,a,t),i[Cn]=t}catch(c){nt(e,e.return,c)}}function Mt(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Tu(e.type)||e.tag===4}function Qe(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Mt(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Tu(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function _a(e,t,a){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=wa));else if(i!==4&&(i===27&&Tu(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(_a(e,t,a),e=e.sibling;e!==null;)_a(e,t,a),e=e.sibling}function Yn(e,t,a){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(i!==4&&(i===27&&Tu(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Yn(e,t,a),e=e.sibling;e!==null;)Yn(e,t,a),e=e.sibling}function jo(e){var t=e.stateNode,a=e.memoizedProps;try{for(var i=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);Xn(t,i,a),t[$t]=e,t[Cn]=a}catch(f){nt(e,e.return,f)}}var Ll=!1,bt=!1,Pl=!1,zh=typeof WeakSet=="function"?WeakSet:Set,yn=null;function bm(e,t){if(e=e.containerInfo,xm=Bh,e=xd(e),Dc(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var i=a.getSelection&&a.getSelection();if(i&&i.rangeCount!==0){a=i.anchorNode;var c=i.anchorOffset,f=i.focusNode;i=i.focusOffset;try{a.nodeType,f.nodeType}catch{a=null;break e}var g=0,_=-1,z=-1,H=0,Q=0,I=e,k=null;t:for(;;){for(var Y;I!==a||c!==0&&I.nodeType!==3||(_=g+c),I!==f||i!==0&&I.nodeType!==3||(z=g+i),I.nodeType===3&&(g+=I.nodeValue.length),(Y=I.firstChild)!==null;)k=I,I=Y;for(;;){if(I===e)break t;if(k===a&&++H===c&&(_=g),k===f&&++Q===i&&(z=g),(Y=I.nextSibling)!==null)break;I=k,k=I.parentNode}I=Y}a=_===-1||z===-1?null:{start:_,end:z}}else a=null}a=a||{start:0,end:0}}else a=null;for(Mm={focusedElem:e,selectionRange:a},Bh=!1,yn=t;yn!==null;)if(t=yn,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,yn=e;else for(;yn!==null;){switch(t=yn,f=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)c=e[a],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&f!==null){e=void 0,a=t,c=f.memoizedProps,f=f.memoizedState,i=a.stateNode;try{var de=Ci(a.type,c);e=i.getSnapshotBeforeUpdate(de,f),i.__reactInternalSnapshotBeforeUpdate=e}catch(Ue){nt(a,a.return,Ue)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Am(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Am(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(m(163))}if(e=t.sibling,e!==null){e.return=t.return,yn=e;break}yn=t.return}}function Ct(e,t,a){var i=a.flags;switch(a.tag){case 0:case 11:case 15:Gl(e,a),i&4&&Hl(5,a);break;case 1:if(Gl(e,a),i&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(g){nt(a,a.return,g)}else{var c=Ci(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(g){nt(a,a.return,g)}}i&64&&Kl(a),i&512&&Xa(a,a.return);break;case 3:if(Gl(e,a),i&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{Hd(e,t)}catch(g){nt(a,a.return,g)}}break;case 27:t===null&&i&4&&jo(a);case 26:case 5:Gl(e,a),t===null&&i&4&&vr(a),i&512&&Xa(a,a.return);break;case 12:Gl(e,a);break;case 31:Gl(e,a),i&4&&Ui(e,a);break;case 13:Gl(e,a),i&4&&mu(e,a),i&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=s.bind(null,a),ag(e,a))));break;case 22:if(i=a.memoizedState!==null||Ll,!i){t=t!==null&&t.memoizedState!==null||bt,c=Ll;var f=bt;Ll=i,(bt=t)&&!f?qn(e,a,(a.subtreeFlags&8772)!==0):Gl(e,a),Ll=c,bt=f}break;case 30:break;default:Gl(e,a)}}function gr(e){var t=e.alternate;t!==null&&(e.alternate=null,gr(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ki(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 dt=null,Nn=!1;function kl(e,t,a){for(a=a.child;a!==null;)Go(e,t,a),a=a.sibling}function Go(e,t,a){if(Pn&&typeof Pn.onCommitFiberUnmount=="function")try{Pn.onCommitFiberUnmount(As,a)}catch{}switch(a.tag){case 26:bt||zn(a,t),kl(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:bt||zn(a,t);var i=dt,c=Nn;Tu(a.type)&&(dt=a.stateNode,Nn=!1),kl(e,t,a),Af(a.stateNode),dt=i,Nn=c;break;case 5:bt||zn(a,t);case 6:if(i=dt,c=Nn,dt=null,kl(e,t,a),dt=i,Nn=c,dt!==null)if(Nn)try{(dt.nodeType===9?dt.body:dt.nodeName==="HTML"?dt.ownerDocument.body:dt).removeChild(a.stateNode)}catch(f){nt(a,t,f)}else try{dt.removeChild(a.stateNode)}catch(f){nt(a,t,f)}break;case 18:dt!==null&&(Nn?(e=dt,qp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Io(e)):qp(dt,a.stateNode));break;case 4:i=dt,c=Nn,dt=a.stateNode.containerInfo,Nn=!0,kl(e,t,a),dt=i,Nn=c;break;case 0:case 11:case 14:case 15:Tn(2,a,t),bt||Tn(4,a,t),kl(e,t,a);break;case 1:bt||(zn(a,t),i=a.stateNode,typeof i.componentWillUnmount=="function"&&gn(a,t,i)),kl(e,t,a);break;case 21:kl(e,t,a);break;case 22:bt=(i=bt)||a.memoizedState!==null,kl(e,t,a),bt=i;break;default:kl(e,t,a)}}function Ui(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Io(e)}catch(a){nt(t,t.return,a)}}}function mu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Io(e)}catch(a){nt(t,t.return,a)}}function zf(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new zh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new zh),t;default:throw Error(m(435,e.tag))}}function Ia(e,t){var a=zf(e);t.forEach(function(i){if(!a.has(i)){a.add(i);var c=o.bind(null,e,i);i.then(c,c)}})}function on(e,t){var a=t.deletions;if(a!==null)for(var i=0;i<a.length;i++){var c=a[i],f=e,g=t,_=g;e:for(;_!==null;){switch(_.tag){case 27:if(Tu(_.type)){dt=_.stateNode,Nn=!1;break e}break;case 5:dt=_.stateNode,Nn=!1;break e;case 3:case 4:dt=_.stateNode.containerInfo,Nn=!0;break e}_=_.return}if(dt===null)throw Error(m(160));Go(f,g,c),dt=null,Nn=!1,f=c.alternate,f!==null&&(f.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Ai(t,e),t=t.sibling}var jl=null;function Ai(e,t){var a=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:on(t,e),cn(e),i&4&&(Tn(3,e,e.return),Hl(3,e),Tn(5,e,e.return));break;case 1:on(t,e),cn(e),i&512&&(bt||a===null||zn(a,a.return)),i&64&&Ll&&(e=e.updateQueue,e!==null&&(i=e.callbacks,i!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?i:a.concat(i))));break;case 26:var c=jl;if(on(t,e),cn(e),i&512&&(bt||a===null||zn(a,a.return)),i&4){var f=a!==null?a.memoizedState:null;if(i=e.memoizedState,a===null)if(i===null)if(e.stateNode===null){e:{i=e.type,a=e.memoizedProps,c=c.ownerDocument||c;t:switch(i){case"title":f=c.getElementsByTagName("title")[0],(!f||f[Ra]||f[$t]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=c.createElement(i),c.head.insertBefore(f,c.querySelector("head > title"))),Xn(f,i,a),f[$t]=e,Jt(f),i=f;break e;case"link":var g=tv("link","href",c).get(i+(a.href||""));if(g){for(var _=0;_<g.length;_++)if(f=g[_],f.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&f.getAttribute("rel")===(a.rel==null?null:a.rel)&&f.getAttribute("title")===(a.title==null?null:a.title)&&f.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){g.splice(_,1);break t}}f=c.createElement(i),Xn(f,i,a),c.head.appendChild(f);break;case"meta":if(g=tv("meta","content",c).get(i+(a.content||""))){for(_=0;_<g.length;_++)if(f=g[_],f.getAttribute("content")===(a.content==null?null:""+a.content)&&f.getAttribute("name")===(a.name==null?null:a.name)&&f.getAttribute("property")===(a.property==null?null:a.property)&&f.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&f.getAttribute("charset")===(a.charSet==null?null:a.charSet)){g.splice(_,1);break t}}f=c.createElement(i),Xn(f,i,a),c.head.appendChild(f);break;default:throw Error(m(468,i))}f[$t]=e,Jt(f),i=f}e.stateNode=i}else nv(c,e.type,e.stateNode);else e.stateNode=ev(c,i,e.memoizedProps);else f!==i?(f===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):f.count--,i===null?nv(c,e.type,e.stateNode):ev(c,i,e.memoizedProps)):i===null&&e.stateNode!==null&&rn(e,e.memoizedProps,a.memoizedProps)}break;case 27:on(t,e),cn(e),i&512&&(bt||a===null||zn(a,a.return)),a!==null&&i&4&&rn(e,e.memoizedProps,a.memoizedProps);break;case 5:if(on(t,e),cn(e),i&512&&(bt||a===null||zn(a,a.return)),e.flags&32){c=e.stateNode;try{Ji(c,"")}catch(de){nt(e,e.return,de)}}i&4&&e.stateNode!=null&&(c=e.memoizedProps,rn(e,c,a!==null?a.memoizedProps:c)),i&1024&&(Pl=!0);break;case 6:if(on(t,e),cn(e),i&4){if(e.stateNode===null)throw Error(m(162));i=e.memoizedProps,a=e.stateNode;try{a.nodeValue=i}catch(de){nt(e,e.return,de)}}break;case 3:if(Ah=null,c=jl,jl=Ch(t.containerInfo),on(t,e),jl=c,cn(e),i&4&&a!==null&&a.memoizedState.isDehydrated)try{Io(t.containerInfo)}catch(de){nt(e,e.return,de)}Pl&&(Pl=!1,Vo(e));break;case 4:i=jl,jl=Ch(e.stateNode.containerInfo),on(t,e),cn(e),jl=i;break;case 12:on(t,e),cn(e);break;case 31:on(t,e),cn(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,Ia(e,i)));break;case 13:on(t,e),cn(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(pu=hn()),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,Ia(e,i)));break;case 22:c=e.memoizedState!==null;var z=a!==null&&a.memoizedState!==null,H=Ll,Q=bt;if(Ll=H||c,bt=Q||z,on(t,e),bt=Q,Ll=H,cn(e),i&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(a===null||z||Ll||bt||ba(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){z=a=t;try{if(f=z.stateNode,c)g=f.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none";else{_=z.stateNode;var I=z.memoizedProps.style,k=I!=null&&I.hasOwnProperty("display")?I.display:null;_.style.display=k==null||typeof k=="boolean"?"":(""+k).trim()}}catch(de){nt(z,z.return,de)}}}else if(t.tag===6){if(a===null){z=t;try{z.stateNode.nodeValue=c?"":z.memoizedProps}catch(de){nt(z,z.return,de)}}}else if(t.tag===18){if(a===null){z=t;try{var Y=z.stateNode;c?Zp(Y,!0):Zp(z.stateNode,!1)}catch(de){nt(z,z.return,de)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}i&4&&(i=e.updateQueue,i!==null&&(a=i.retryQueue,a!==null&&(i.retryQueue=null,Ia(e,a))));break;case 19:on(t,e),cn(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,Ia(e,i)));break;case 30:break;case 21:break;default:on(t,e),cn(e)}}function cn(e){var t=e.flags;if(t&2){try{for(var a,i=e.return;i!==null;){if(Mt(i)){a=i;break}i=i.return}if(a==null)throw Error(m(160));switch(a.tag){case 27:var c=a.stateNode,f=Qe(e);Yn(e,f,c);break;case 5:var g=a.stateNode;a.flags&32&&(Ji(g,""),a.flags&=-33);var _=Qe(e);Yn(e,_,g);break;case 3:case 4:var z=a.stateNode.containerInfo,H=Qe(e);_a(e,H,z);break;default:throw Error(m(161))}}catch(Q){nt(e,e.return,Q)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Vo(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Vo(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Gl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Ct(e,t.alternate,t),t=t.sibling}function ba(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Tn(4,t,t.return),ba(t);break;case 1:zn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&gn(t,t.return,a),ba(t);break;case 27:Af(t.stateNode);case 26:case 5:zn(t,t.return),ba(t);break;case 22:t.memoizedState===null&&ba(t);break;case 30:ba(t);break;default:ba(t)}e=e.sibling}}function qn(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var i=t.alternate,c=e,f=t,g=f.flags;switch(f.tag){case 0:case 11:case 15:qn(c,f,a),Hl(4,f);break;case 1:if(qn(c,f,a),i=f,c=i.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(H){nt(i,i.return,H)}if(i=f,c=i.updateQueue,c!==null){var _=i.stateNode;try{var z=c.shared.hiddenCallbacks;if(z!==null)for(c.shared.hiddenCallbacks=null,c=0;c<z.length;c++)ru(z[c],_)}catch(H){nt(i,i.return,H)}}a&&g&64&&Kl(f),Xa(f,f.return);break;case 27:jo(f);case 26:case 5:qn(c,f,a),a&&i===null&&g&4&&vr(f),Xa(f,f.return);break;case 12:qn(c,f,a);break;case 31:qn(c,f,a),a&&g&4&&Ui(c,f);break;case 13:qn(c,f,a),a&&g&4&&mu(c,f);break;case 22:f.memoizedState===null&&qn(c,f,a),Xa(f,f.return);break;case 30:break;default:qn(c,f,a)}t=t.sibling}}function Di(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&ss(a))}function bs(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ss(e))}function On(e,t,a,i){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Of(e,t,a,i),t=t.sibling}function Of(e,t,a,i){var c=t.flags;switch(t.tag){case 0:case 11:case 15:On(e,t,a,i),c&2048&&Hl(9,t);break;case 1:On(e,t,a,i);break;case 3:On(e,t,a,i),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ss(e)));break;case 12:if(c&2048){On(e,t,a,i),e=t.stateNode;try{var f=t.memoizedProps,g=f.id,_=f.onPostCommit;typeof _=="function"&&_(g,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(z){nt(t,t.return,z)}}else On(e,t,a,i);break;case 31:On(e,t,a,i);break;case 13:On(e,t,a,i);break;case 23:break;case 22:f=t.stateNode,g=t.alternate,t.memoizedState!==null?f._visibility&2?On(e,t,a,i):Sa(e,t):f._visibility&2?On(e,t,a,i):(f._visibility|=2,xn(e,t,a,i,(t.subtreeFlags&10256)!==0||!1)),c&2048&&Di(g,t);break;case 24:On(e,t,a,i),c&2048&&bs(t.alternate,t);break;default:On(e,t,a,i)}}function xn(e,t,a,i,c){for(c=c&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var f=e,g=t,_=a,z=i,H=g.flags;switch(g.tag){case 0:case 11:case 15:xn(f,g,_,z,c),Hl(8,g);break;case 23:break;case 22:var Q=g.stateNode;g.memoizedState!==null?Q._visibility&2?xn(f,g,_,z,c):Sa(f,g):(Q._visibility|=2,xn(f,g,_,z,c)),c&&H&2048&&Di(g.alternate,g);break;case 24:xn(f,g,_,z,c),c&&H&2048&&bs(g.alternate,g);break;default:xn(f,g,_,z,c)}t=t.sibling}}function Sa(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,i=t,c=i.flags;switch(i.tag){case 22:Sa(a,i),c&2048&&Di(i.alternate,i);break;case 24:Sa(a,i),c&2048&&bs(i.alternate,i);break;default:Sa(a,i)}t=t.sibling}}var Ss=8192;function yl(e,t,a){if(e.subtreeFlags&Ss)for(e=e.child;e!==null;)Fo(e,t,a),e=e.sibling}function Fo(e,t,a){switch(e.tag){case 26:yl(e,t,a),e.flags&Ss&&e.memoizedState!==null&&vg(a,jl,e.memoizedState,e.memoizedProps);break;case 5:yl(e,t,a);break;case 3:case 4:var i=jl;jl=Ch(e.stateNode.containerInfo),yl(e,t,a),jl=i;break;case 22:e.memoizedState===null&&(i=e.alternate,i!==null&&i.memoizedState!==null?(i=Ss,Ss=16777216,yl(e,t,a),Ss=i):yl(e,t,a));break;default:yl(e,t,a)}}function Es(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ri(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var i=t[a];yn=i,Vt(i,e)}Es(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)al(e),e=e.sibling}function al(e){switch(e.tag){case 0:case 11:case 15:Ri(e),e.flags&2048&&Tn(9,e,e.return);break;case 3:Ri(e);break;case 12:Ri(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,il(e)):Ri(e);break;default:Ri(e)}}function il(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var i=t[a];yn=i,Vt(i,e)}Es(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Tn(8,t,t.return),il(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,il(t));break;default:il(t)}e=e.sibling}}function Vt(e,t){for(;yn!==null;){var a=yn;switch(a.tag){case 0:case 11:case 15:Tn(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var i=a.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:ss(a.memoizedState.cache)}if(i=a.child,i!==null)i.return=a,yn=i;else e:for(a=e;yn!==null;){i=yn;var c=i.sibling,f=i.return;if(gr(i),i===a){yn=null;break e}if(c!==null){c.return=f,yn=c;break e}yn=f}}}var Ka={getCacheForType:function(e){var t=Ae(Wt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Ae(Wt).controller.signal}},He=typeof WeakMap=="function"?WeakMap:Map,ge=0,Re=null,je=null,Le=0,$e=0,Bn=null,Vl=!1,$l=!1,xf=!1,_l=0,Bt=0,Ea=0,Ni=0,yr=0,Zn=0,Tt=0,Ts=null,Ft=null,Yt=!1,pu=0,Mf=0,Xt=1/0,wt=null,It=null,ht=0,bl=null,vu=null,Fl=0,gu=0,yu=null,_r=null,Bi=0,zs=null;function Sl(){return(ge&2)!==0&&Le!==0?Le&-Le:q.T!==null?G():Nr()}function Ye(){if(Zn===0)if((Le&536870912)===0||Ie){var e=Ds;Ds<<=1,(Ds&3932160)===0&&(Ds=262144),Zn=e}else Zn=536870912;return e=el.current,e!==null&&(e.flags|=32),Zn}function Ge(e,t,a){(e===Re&&($e===2||$e===9)||e.cancelPendingCommit!==null)&&(Hi(e,0),tn(e,Le,Zn,!1)),Ns(e,a),((ge&2)===0||e!==Re)&&(e===Re&&((ge&2)===0&&(Ni|=a),Bt===4&&tn(e,Le,Zn,!1)),$(e))}function qe(e,t,a){if((ge&6)!==0)throw Error(m(327));var i=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Rs(e,t),c=i?br(e,t):Qn(e,t,!0),f=i;do{if(c===0){$l&&!i&&tn(e,t,0,!1);break}else{if(a=e.current.alternate,f&&!mt(a)){c=Qn(e,t,!1),f=!1;continue}if(c===2){if(f=t,e.errorRecoveryDisabledLanes&f)var g=0;else g=e.pendingLanes&-536870913,g=g!==0?g:g&536870912?536870912:0;if(g!==0){t=g;e:{var _=e;c=Ts;var z=_.current.memoizedState.isDehydrated;if(z&&(Hi(_,g).flags|=256),g=Qn(_,g,!1),g!==2){if(xf&&!z){_.errorRecoveryDisabledLanes|=f,Ni|=f,c=4;break e}f=Ft,Ft=c,f!==null&&(Ft===null?Ft=f:Ft.push.apply(Ft,f))}c=g}if(f=!1,c!==2)continue}}if(c===1){Hi(e,0),tn(e,t,0,!0);break}e:{switch(i=e,f=c,f){case 0:case 1:throw Error(m(345));case 4:if((t&4194048)!==t)break;case 6:tn(i,t,Zn,!Vl);break e;case 2:Ft=null;break;case 3:case 5:break;default:throw Error(m(329))}if((t&62914560)===t&&(c=pu+300-hn(),10<c)){if(tn(i,t,Zn,!Vl),Ii(i,0,!0)!==0)break e;Fl=t,i.timeoutHandle=Fp(Xe.bind(null,i,a,Ft,wt,Yt,t,Zn,Ni,Tt,Vl,f,"Throttled",-0,0),c);break e}Xe(i,a,Ft,wt,Yt,t,Zn,Ni,Tt,Vl,f,null,-0,0)}}break}while(!0);$(e)}function Xe(e,t,a,i,c,f,g,_,z,H,Q,I,k,Y){if(e.timeoutHandle=-1,I=t.subtreeFlags,I&8192||(I&16785408)===16785408){I={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:wa},Fo(t,f,I);var de=(f&62914560)===f?pu-hn():(f&4194048)===f?Mf-hn():0;if(de=gg(I,de),de!==null){Fl=f,e.cancelPendingCommit=de($a.bind(null,e,t,f,a,i,c,g,_,z,Q,I,null,k,Y)),tn(e,f,g,!H);return}}$a(e,t,f,a,i,c,g,_,z)}function mt(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var i=0;i<a.length;i++){var c=a[i],f=c.getSnapshot;c=c.value;try{if(!jn(f(),c))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function tn(e,t,a,i){t&=~yr,t&=~Ni,e.suspendedLanes|=t,e.pingedLanes&=~t,i&&(e.warmLanes|=t),i=e.expirationTimes;for(var c=t;0<c;){var f=31-ol(c),g=1<<f;i[f]=-1,c&=~g}a!==0&&Bs(e,a,t)}function Jl(){return(ge&6)===0?(oe(0),!1):!0}function wi(){if(je!==null){if($e===0)var e=je.return;else e=je,da=Si=null,Kc(e),fs=null,ds=0,e=je;for(;e!==null;)gl(e.alternate,e),e=e.return;je=null}}function Hi(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,W0(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Fl=0,wi(),Re=e,je=a=$n(e.current,null),Le=t,$e=0,Bn=null,Vl=!1,$l=Rs(e,t),xf=!1,Tt=Zn=yr=Ni=Ea=Bt=0,Ft=Ts=null,Yt=!1,(t&8)!==0&&(t|=t&32);var i=e.entangledLanes;if(i!==0)for(e=e.entanglements,i&=t;0<i;){var c=31-ol(i),f=1<<c;t|=e[c],i&=~f}return _l=t,Wu(),a}function Ta(e,t){we=null,q.H=du,t===us||t===ke?(t=os(),$e=3):t===lr?(t=os(),$e=4):$e=t===Ao?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Bn=t,je===null&&(Bt=1,Uo(e,hl(t,e.current)))}function Ht(){var e=el.current;return e===null?!0:(Le&4194048)===Le?Fn===null:(Le&62914560)===Le||(Le&536870912)!==0?e===Fn:!1}function Pa(){var e=q.H;return q.H=du,e===null?du:e}function Li(){var e=q.A;return q.A=Ka,e}function _u(){Bt=4,Vl||(Le&4194048)!==Le&&el.current!==null||($l=!0),(Ea&134217727)===0&&(Ni&134217727)===0||Re===null||tn(Re,Le,Zn,!1)}function Qn(e,t,a){var i=ge;ge|=2;var c=Pa(),f=Li();(Re!==e||Le!==t)&&(wt=null,Hi(e,t)),t=!1;var g=Bt;e:do try{if($e!==0&&je!==null){var _=je,z=Bn;switch($e){case 8:wi(),g=6;break e;case 3:case 2:case 9:case 6:el.current===null&&(t=!0);var H=$e;if($e=0,Bn=null,Os(e,_,z,H),a&&$l){g=0;break e}break;default:H=$e,$e=0,Bn=null,Os(e,_,z,H)}}bu(),g=Bt;break}catch(Q){Ta(e,Q)}while(!0);return t&&e.shellSuspendCounter++,da=Si=null,ge=i,q.H=c,q.A=f,je===null&&(Re=null,Le=0,Wu()),g}function bu(){for(;je!==null;)Yo(je)}function br(e,t){var a=ge;ge|=2;var i=Pa(),c=Li();Re!==e||Le!==t?(wt=null,Xt=hn()+500,Hi(e,t)):$l=Rs(e,t);e:do try{if($e!==0&&je!==null){t=je;var f=Bn;t:switch($e){case 1:$e=0,Bn=null,Os(e,t,f,1);break;case 2:case 9:if(Wn(f)){$e=0,Bn=null,Sr(t);break}t=function(){$e!==2&&$e!==9||Re!==e||($e=7),$(e)},f.then(t,t);break e;case 3:$e=7;break e;case 4:$e=5;break e;case 7:Wn(f)?($e=0,Bn=null,Sr(t)):($e=0,Bn=null,Os(e,t,f,7));break;case 5:var g=null;switch(je.tag){case 26:g=je.memoizedState;case 5:case 27:var _=je;if(g?lv(g):_.stateNode.complete){$e=0,Bn=null;var z=_.sibling;if(z!==null)je=z;else{var H=_.return;H!==null?(je=H,ki(H)):je=null}break t}}$e=0,Bn=null,Os(e,t,f,5);break;case 6:$e=0,Bn=null,Os(e,t,f,6);break;case 8:wi(),Bt=6;break e;default:throw Error(m(462))}}sl();break}catch(Q){Ta(e,Q)}while(!0);return da=Si=null,q.H=i,q.A=c,ge=a,je!==null?0:(Re=null,Le=0,Wu(),Bt)}function sl(){for(;je!==null&&!Ua();)Yo(je)}function Yo(e){var t=ko(e.alternate,e,_l);e.memoizedProps=e.pendingProps,t===null?ki(e):je=t}function Sr(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=dr(a,t,t.pendingProps,t.type,void 0,Le);break;case 11:t=dr(a,t,t.pendingProps,t.type.render,t.ref,Le);break;case 5:Kc(t);default:gl(a,t),t=je=Js(t,_l),t=ko(a,t,_l)}e.memoizedProps=e.pendingProps,t===null?ki(e):je=t}function Os(e,t,a,i){da=Si=null,Kc(t),fs=null,ds=0;var c=t.return;try{if(un(e,c,t,a,Le)){Bt=1,Uo(e,hl(a,e.current)),je=null;return}}catch(f){if(c!==null)throw je=c,f;Bt=1,Uo(e,hl(a,e.current)),je=null;return}t.flags&32768?(Ie||i===1?e=!0:$l||(Le&536870912)!==0?e=!1:(Vl=e=!0,(i===2||i===9||i===3||i===6)&&(i=el.current,i!==null&&i.tag===13&&(i.flags|=16384))),Er(t,e)):ki(t)}function ki(e){var t=e;do{if((t.flags&32768)!==0){Er(t,Vl);return}e=t.return;var a=pr(t.alternate,t,_l);if(a!==null){je=a;return}if(t=t.sibling,t!==null){je=t;return}je=t=e}while(t!==null);Bt===0&&(Bt=5)}function Er(e,t){do{var a=wl(e.alternate,e);if(a!==null){a.flags&=32767,je=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){je=e;return}je=e=a}while(e!==null);Bt=6,je=null}function $a(e,t,a,i,c,f,g,_,z){e.cancelPendingCommit=null;do Su();while(ht!==0);if((ge&6)!==0)throw Error(m(327));if(t!==null){if(t===e.current)throw Error(m(177));if(f=t.lanes|t.childLanes,f|=mn,Rr(e,a,f,g,_,z),e===Re&&(je=Re=null,Le=0),vu=t,bl=e,Fl=a,gu=f,yu=c,_r=i,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,h(Zi,function(){return qo(),null})):(e.callbackNode=null,e.callbackPriority=0),i=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||i){i=q.T,q.T=null,c=W.p,W.p=2,g=ge,ge|=4;try{bm(e,t,a)}finally{ge=g,W.p=c,q.T=i}}ht=1,nn(),Ja(),xs()}}function nn(){if(ht===1){ht=0;var e=bl,t=vu,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=q.T,q.T=null;var i=W.p;W.p=2;var c=ge;ge|=4;try{Ai(t,e);var f=Mm,g=xd(e.containerInfo),_=f.focusedElem,z=f.selectionRange;if(g!==_&&_&&_.ownerDocument&&yt(_.ownerDocument.documentElement,_)){if(z!==null&&Dc(_)){var H=z.start,Q=z.end;if(Q===void 0&&(Q=H),"selectionStart"in _)_.selectionStart=H,_.selectionEnd=Math.min(Q,_.value.length);else{var I=_.ownerDocument||document,k=I&&I.defaultView||window;if(k.getSelection){var Y=k.getSelection(),de=_.textContent.length,Ue=Math.min(z.start,de),Et=z.end===void 0?Ue:Math.min(z.end,de);!Y.extend&&Ue>Et&&(g=Et,Et=Ue,Ue=g);var A=Ks(_,Ue),M=Ks(_,Et);if(A&&M&&(Y.rangeCount!==1||Y.anchorNode!==A.node||Y.anchorOffset!==A.offset||Y.focusNode!==M.node||Y.focusOffset!==M.offset)){var w=I.createRange();w.setStart(A.node,A.offset),Y.removeAllRanges(),Ue>Et?(Y.addRange(w),Y.extend(M.node,M.offset)):(w.setEnd(M.node,M.offset),Y.addRange(w))}}}}for(I=[],Y=_;Y=Y.parentNode;)Y.nodeType===1&&I.push({element:Y,left:Y.scrollLeft,top:Y.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<I.length;_++){var X=I[_];X.element.scrollLeft=X.left,X.element.scrollTop=X.top}}Bh=!!xm,Mm=xm=null}finally{ge=c,W.p=i,q.T=a}}e.current=t,ht=2}}function Ja(){if(ht===2){ht=0;var e=bl,t=vu,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=q.T,q.T=null;var i=W.p;W.p=2;var c=ge;ge|=4;try{Ct(e,t.alternate,t)}finally{ge=c,W.p=i,q.T=a}}ht=3}}function xs(){if(ht===4||ht===3){ht=0,an();var e=bl,t=vu,a=Fl,i=_r;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ht=5:(ht=0,vu=bl=null,za(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(It=null),Hs(a),t=t.stateNode,Pn&&typeof Pn.onCommitFiberRoot=="function")try{Pn.onCommitFiberRoot(As,t,void 0,(t.current.flags&128)===128)}catch{}if(i!==null){t=q.T,c=W.p,W.p=2,q.T=null;try{for(var f=e.onRecoverableError,g=0;g<i.length;g++){var _=i[g];f(_.value,{componentStack:_.stack})}}finally{q.T=t,W.p=c}}(Fl&3)!==0&&Su(),$(e),c=e.pendingLanes,(a&261930)!==0&&(c&42)!==0?e===zs?Bi++:(Bi=0,zs=e):Bi=0,oe(0)}}function za(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ss(t)))}function Su(){return nn(),Ja(),xs(),qo()}function qo(){if(ht!==5)return!1;var e=bl,t=gu;gu=0;var a=Hs(Fl),i=q.T,c=W.p;try{W.p=32>a?32:a,q.T=null,a=yu,yu=null;var f=bl,g=Fl;if(ht=0,vu=bl=null,Fl=0,(ge&6)!==0)throw Error(m(331));var _=ge;if(ge|=4,al(f.current),Of(f,f.current,g,a),ge=_,oe(0,!1),Pn&&typeof Pn.onPostCommitFiberRoot=="function")try{Pn.onPostCommitFiberRoot(As,f)}catch{}return!0}finally{W.p=c,q.T=i,za(e,t)}}function Cf(e,t,a){t=hl(a,t),t=yf(e.stateNode,t,2),e=zi(e,t,2),e!==null&&(Ns(e,2),$(e))}function nt(e,t,a){if(e.tag===3)Cf(e,e,a);else for(;t!==null;){if(t.tag===3){Cf(t,e,a);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(It===null||!It.has(i))){e=hl(a,e),a=_f(2),i=zi(t,a,2),i!==null&&(_h(a,i,t,e),Ns(i,2),$(i));break}}t=t.return}}function Tr(e,t,a){var i=e.pingCache;if(i===null){i=e.pingCache=new He;var c=new Set;i.set(t,c)}else c=i.get(t),c===void 0&&(c=new Set,i.set(t,c));c.has(a)||(xf=!0,c.add(a),e=n.bind(null,e,t,a),t.then(e,e))}function n(e,t,a){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Re===e&&(Le&a)===a&&(Bt===4||Bt===3&&(Le&62914560)===Le&&300>hn()-pu?(ge&2)===0&&Hi(e,0):yr|=a,Tt===Le&&(Tt=0)),$(e)}function l(e,t){t===0&&(t=si()),e=Gn(e,t),e!==null&&(Ns(e,t),$(e))}function s(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),l(e,a)}function o(e,t){var a=0;switch(e.tag){case 31:case 13:var i=e.stateNode,c=e.memoizedState;c!==null&&(a=c.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(m(314))}i!==null&&i.delete(t),l(e,a)}function h(e,t){return Ql(e,t)}var p=null,y=null,O=!1,F=!1,P=!1,ae=0;function $(e){e!==y&&e.next===null&&(y===null?p=y=e:y=y.next=e),F=!0,O||(O=!0,D())}function oe(e,t){if(!P&&F){P=!0;do for(var a=!1,i=p;i!==null;){if(e!==0){var c=i.pendingLanes;if(c===0)var f=0;else{var g=i.suspendedLanes,_=i.pingedLanes;f=(1<<31-ol(42|e)+1)-1,f&=c&~(g&~_),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(a=!0,L(i,f))}else f=Le,f=Ii(i,i===Re?f:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(f&3)===0||Rs(i,f)||(a=!0,L(i,f));i=i.next}while(a);P=!1}}function Be(){Kt()}function Kt(){F=O=!1;var e=0;ae!==0&&J0()&&(e=ae);for(var t=hn(),a=null,i=p;i!==null;){var c=i.next,f=Eu(i,t);f===0?(i.next=null,a===null?p=c:a.next=c,c===null&&(y=a)):(a=i,(e!==0||(f&3)!==0)&&(F=!0)),i=c}ht!==0&&ht!==5||oe(e),ae!==0&&(ae=0)}function Eu(e,t){for(var a=e.suspendedLanes,i=e.pingedLanes,c=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var g=31-ol(f),_=1<<g,z=c[g];z===-1?((_&a)===0||(_&i)!==0)&&(c[g]=nd(_,t)):z<=t&&(e.expiredLanes|=_),f&=~_}if(t=Re,a=Le,a=Ii(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i=e.callbackNode,a===0||e===t&&($e===2||$e===9)||e.cancelPendingCommit!==null)return i!==null&&i!==null&&ai(i),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Rs(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(i!==null&&ai(i),Hs(a)){case 2:case 8:a=Kn;break;case 32:a=Zi;break;case 268435456:a=Qi;break;default:a=Zi}return i=ji.bind(null,e),a=Ql(a,i),e.callbackPriority=t,e.callbackNode=a,t}return i!==null&&i!==null&&ai(i),e.callbackPriority=2,e.callbackNode=null,2}function ji(e,t){if(ht!==0&&ht!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Su()&&e.callbackNode!==a)return null;var i=Le;return i=Ii(e,e===Re?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i===0?null:(qe(e,i,t),Eu(e,hn()),e.callbackNode!=null&&e.callbackNode===a?ji.bind(null,e):null)}function L(e,t){if(Su())return null;qe(e,t,!0)}function D(){eg(function(){(ge&6)!==0?Ql(Us,Be):Kt()})}function G(){if(ae===0){var e=Va;e===0&&(e=Ar,Ar<<=1,(Ar&261888)===0&&(Ar=256)),ae=e}return ae}function te(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ju(""+e)}function xe(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function Lt(e,t,a,i,c){if(t==="submit"&&a&&a.stateNode===c){var f=te((c[Cn]||null).action),g=i.submitter;g&&(t=(t=g[Cn]||null)?te(t.formAction):g.getAttribute("formAction"),t!==null&&(f=t,g=null));var _=new Fu("action","action",null,i,c);e.push({event:_,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(ae!==0){var z=g?xe(c,g):new FormData(c);cf(a,{pending:!0,data:z,method:c.method,action:f},null,z)}}else typeof f=="function"&&(_.preventDefault(),z=g?xe(c,g):new FormData(c),cf(a,{pending:!0,data:z,method:c.method,action:f},f,z))},currentTarget:c}]})}}for(var Ce=0;Ce<$u.length;Ce++){var We=$u[Ce],_n=We.toLowerCase(),lt=We[0].toUpperCase()+We.slice(1);Cl(_n,"on"+lt)}Cl(no,"onAnimationEnd"),Cl(Pu,"onAnimationIteration"),Cl(Nc,"onAnimationStart"),Cl("dblclick","onDoubleClick"),Cl("focusin","onFocus"),Cl("focusout","onBlur"),Cl(Cd,"onTransitionRun"),Cl(dm,"onTransitionStart"),Cl(Ud,"onTransitionCancel"),Cl(Bc,"onTransitionEnd"),cl("onMouseEnter",["mouseout","mouseover"]),cl("onMouseLeave",["mouseout","mouseover"]),cl("onPointerEnter",["pointerout","pointerover"]),cl("onPointerLeave",["pointerout","pointerover"]),fi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),fi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),fi("onBeforeInput",["compositionend","keypress","textInput","paste"]),fi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),fi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),fi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Yl="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(" "),Sm=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Yl));function Bp(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var i=e[a],c=i.event;i=i.listeners;e:{var f=void 0;if(t)for(var g=i.length-1;0<=g;g--){var _=i[g],z=_.instance,H=_.currentTarget;if(_=_.listener,z!==f&&c.isPropagationStopped())break e;f=_,c.currentTarget=H;try{f(c)}catch(Q){Ju(Q)}c.currentTarget=null,f=z}else for(g=0;g<i.length;g++){if(_=i[g],z=_.instance,H=_.currentTarget,_=_.listener,z!==f&&c.isPropagationStopped())break e;f=_,c.currentTarget=H;try{f(c)}catch(Q){Ju(Q)}c.currentTarget=null,f=z}}}}function Je(e,t){var a=t[ta];a===void 0&&(a=t[ta]=new Set);var i=e+"__bubble";a.has(i)||(wp(t,e,2,!1),a.add(i))}function Em(e,t,a){var i=0;t&&(i|=4),wp(a,e,i,t)}var Oh="_reactListening"+Math.random().toString(36).slice(2);function Tm(e){if(!e[Oh]){e[Oh]=!0,Na.forEach(function(a){a!=="selectionchange"&&(Sm.has(a)||Em(a,!1,e),Em(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Oh]||(t[Oh]=!0,Em("selectionchange",!1,t))}}function wp(e,t,a,i){switch(cv(t)){case 2:var c=bg;break;case 8:c=Sg;break;default:c=km}a=c.bind(null,t,a,e),c=void 0,!pc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),i?c!==void 0?e.addEventListener(t,a,{capture:!0,passive:c}):e.addEventListener(t,a,!0):c!==void 0?e.addEventListener(t,a,{passive:c}):e.addEventListener(t,a,!1)}function zm(e,t,a,i,c){var f=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var g=i.tag;if(g===3||g===4){var _=i.stateNode.containerInfo;if(_===c)break;if(g===4)for(g=i.return;g!==null;){var z=g.tag;if((z===3||z===4)&&g.stateNode.containerInfo===c)return;g=g.return}for(;_!==null;){if(g=Pi(_),g===null)return;if(z=g.tag,z===5||z===6||z===26||z===27){i=f=g;continue e}_=_.parentNode}}i=i.return}mc(function(){var H=f,Q=Yr(a),I=[];e:{var k=Ml.get(e);if(k!==void 0){var Y=Fu,de=e;switch(e){case"keypress":if(Vu(a)===0)break e;case"keydown":case"keyup":Y=ts;break;case"focusin":de="focus",Y=Xr;break;case"focusout":de="blur",Y=Xr;break;case"beforeblur":case"afterblur":Y=Xr;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Y=vc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Y=rd;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Y=md;break;case no:case Pu:case Nc:Y=om;break;case Bc:Y=fm;break;case"scroll":case"scrollend":Y=sd;break;case"wheel":Y=vd;break;case"copy":case"cut":case"paste":Y=cd;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Y=_c;break;case"toggle":case"beforetoggle":Y=yd}var Ue=(t&4)!==0,Et=!Ue&&(e==="scroll"||e==="scrollend"),A=Ue?k!==null?k+"Capture":null:k;Ue=[];for(var M=H,w;M!==null;){var X=M;if(w=X.stateNode,X=X.tag,X!==5&&X!==26&&X!==27||w===null||A===null||(X=Gs(M,A),X!=null&&Ue.push(Uf(M,X,w))),Et)break;M=M.return}0<Ue.length&&(k=new Y(k,de,null,a,Q),I.push({event:k,listeners:Ue}))}}if((t&7)===0){e:{if(k=e==="mouseover"||e==="pointerover",Y=e==="mouseout"||e==="pointerout",k&&a!==Fr&&(de=a.relatedTarget||a.fromElement)&&(Pi(de)||de[ri]))break e;if((Y||k)&&(k=Q.window===Q?Q:(k=Q.ownerDocument)?k.defaultView||k.parentWindow:window,Y?(de=a.relatedTarget||a.toElement,Y=H,de=de?Pi(de):null,de!==null&&(Et=b(de),Ue=de.tag,de!==Et||Ue!==5&&Ue!==27&&Ue!==6)&&(de=null)):(Y=null,de=H),Y!==de)){if(Ue=vc,X="onMouseLeave",A="onMouseEnter",M="mouse",(e==="pointerout"||e==="pointerover")&&(Ue=_c,X="onPointerLeave",A="onPointerEnter",M="pointer"),Et=Y==null?k:Ls(Y),w=de==null?k:Ls(de),k=new Ue(X,M+"leave",Y,a,Q),k.target=Et,k.relatedTarget=w,X=null,Pi(Q)===H&&(Ue=new Ue(A,M+"enter",de,a,Q),Ue.target=w,Ue.relatedTarget=Et,X=Ue),Et=X,Y&&de)t:{for(Ue=X0,A=Y,M=de,w=0,X=A;X;X=Ue(X))w++;X=0;for(var Oe=M;Oe;Oe=Ue(Oe))X++;for(;0<w-X;)A=Ue(A),w--;for(;0<X-w;)M=Ue(M),X--;for(;w--;){if(A===M||M!==null&&A===M.alternate){Ue=A;break t}A=Ue(A),M=Ue(M)}Ue=null}else Ue=null;Y!==null&&Hp(I,k,Y,Ue,!1),de!==null&&Et!==null&&Hp(I,Et,de,Ue,!0)}}e:{if(k=H?Ls(H):window,Y=k.nodeName&&k.nodeName.toLowerCase(),Y==="select"||Y==="input"&&k.type==="file")var st=xc;else if(Oc(k))if(aa)st=Od;else{st=Uc;var pe=Td}else Y=k.nodeName,!Y||Y.toLowerCase()!=="input"||k.type!=="checkbox"&&k.type!=="radio"?H&&Vr(H.elementType)&&(st=xc):st=zd;if(st&&(st=st(e,H))){eo(I,st,a,Q);break e}pe&&pe(e,k,H),e==="focusout"&&H&&k.type==="number"&&H.memoizedProps.value!=null&&Xl(k,"number",k.value)}switch(pe=H?Ls(H):window,e){case"focusin":(Oc(pe)||pe.contentEditable==="true")&&(ia=pe,sa=H,Ps=null);break;case"focusout":Ps=sa=ia=null;break;case"mousedown":to=!0;break;case"contextmenu":case"mouseup":case"dragend":to=!1,$s(I,a,Q);break;case"selectionchange":if(Md)break;case"keydown":case"keyup":$s(I,a,Q)}var Ve;if(ns)e:{switch(e){case"compositionstart":var et="onCompositionStart";break e;case"compositionend":et="onCompositionEnd";break e;case"compositionupdate":et="onCompositionUpdate";break e}et=void 0}else ls?Wr(e,a)&&(et="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(et="onCompositionStart");et&&(Sc&&a.locale!=="ko"&&(ls||et!=="onCompositionStart"?et==="onCompositionEnd"&&ls&&(Ve=Gu()):(dl=Q,Zr="value"in dl?dl.value:dl.textContent,ls=!0)),pe=xh(H,et),0<pe.length&&(et=new Ir(et,e,null,a,Q),I.push({event:et,listeners:pe}),Ve?et.data=Ve:(Ve=Ec(a),Ve!==null&&(et.data=Ve)))),(Ve=Jr?Sd(e,a):Tc(e,a))&&(et=xh(H,"onBeforeInput"),0<et.length&&(pe=new Ir("onBeforeInput","beforeinput",null,a,Q),I.push({event:pe,listeners:et}),pe.data=Ve)),Lt(I,e,H,a,Q)}Bp(I,t)})}function Uf(e,t,a){return{instance:e,listener:t,currentTarget:a}}function xh(e,t){for(var a=t+"Capture",i=[];e!==null;){var c=e,f=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||f===null||(c=Gs(e,a),c!=null&&i.unshift(Uf(e,c,f)),c=Gs(e,t),c!=null&&i.push(Uf(e,c,f))),e.tag===3)return i;e=e.return}return[]}function X0(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Hp(e,t,a,i,c){for(var f=t._reactName,g=[];a!==null&&a!==i;){var _=a,z=_.alternate,H=_.stateNode;if(_=_.tag,z!==null&&z===i)break;_!==5&&_!==26&&_!==27||H===null||(z=H,c?(H=Gs(a,f),H!=null&&g.unshift(Uf(a,H,z))):c||(H=Gs(a,f),H!=null&&g.push(Uf(a,H,z)))),a=a.return}g.length!==0&&e.push({event:t,listeners:g})}var I0=/\r\n?/g,K0=/\u0000|\uFFFD/g;function Lp(e){return(typeof e=="string"?e:""+e).replace(I0,`
25
+ `).replace(K0,"")}function kp(e,t){return t=Lp(t),Lp(e)===t}function St(e,t,a,i,c,f){switch(a){case"children":typeof i=="string"?t==="body"||t==="textarea"&&i===""||Ji(e,i):(typeof i=="number"||typeof i=="bigint")&&t!=="body"&&Ji(e,""+i);break;case"className":Lu(e,"class",i);break;case"tabIndex":Lu(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":Lu(e,a,i);break;case"style":fc(e,i,f);break;case"data":if(t!=="object"){Lu(e,"data",i);break}case"src":case"href":if(i===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(a);break}i=ju(""+i),e.setAttribute(a,i);break;case"action":case"formAction":if(typeof i=="function"){e.setAttribute(a,"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}else typeof f=="function"&&(a==="formAction"?(t!=="input"&&St(e,t,"name",c.name,c,null),St(e,t,"formEncType",c.formEncType,c,null),St(e,t,"formMethod",c.formMethod,c,null),St(e,t,"formTarget",c.formTarget,c,null)):(St(e,t,"encType",c.encType,c,null),St(e,t,"method",c.method,c,null),St(e,t,"target",c.target,c,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(a);break}i=ju(""+i),e.setAttribute(a,i);break;case"onClick":i!=null&&(e.onclick=wa);break;case"onScroll":i!=null&&Je("scroll",e);break;case"onScrollEnd":i!=null&&Je("scrollend",e);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(m(61));if(a=i.__html,a!=null){if(c.children!=null)throw Error(m(60));e.innerHTML=a}}break;case"multiple":e.multiple=i&&typeof i!="function"&&typeof i!="symbol";break;case"muted":e.muted=i&&typeof i!="function"&&typeof i!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(i==null||typeof i=="function"||typeof i=="boolean"||typeof i=="symbol"){e.removeAttribute("xlink:href");break}a=ju(""+i),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,""+i):e.removeAttribute(a);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":i&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":i===!0?e.setAttribute(a,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,i):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?e.setAttribute(a,i):e.removeAttribute(a);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?e.removeAttribute(a):e.setAttribute(a,i);break;case"popover":Je("beforetoggle",e),Je("toggle",e),ks(e,"popover",i);break;case"xlinkActuate":na(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":na(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":na(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":na(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":na(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":na(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":na(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":na(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":na(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":ks(e,"is",i);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=ad.get(a)||a,ks(e,a,i))}}function Om(e,t,a,i,c,f){switch(a){case"style":fc(e,i,f);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(m(61));if(a=i.__html,a!=null){if(c.children!=null)throw Error(m(60));e.innerHTML=a}}break;case"children":typeof i=="string"?Ji(e,i):(typeof i=="number"||typeof i=="bigint")&&Ji(e,""+i);break;case"onScroll":i!=null&&Je("scroll",e);break;case"onScrollEnd":i!=null&&Je("scrollend",e);break;case"onClick":i!=null&&(e.onclick=wa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!wr.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(c=a.endsWith("Capture"),t=a.slice(2,c?a.length-7:void 0),f=e[Cn]||null,f=f!=null?f[a]:null,typeof f=="function"&&e.removeEventListener(t,f,c),typeof i=="function")){typeof f!="function"&&f!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,i,c);break e}a in e?e[a]=i:i===!0?e.setAttribute(a,""):ks(e,a,i)}}}function Xn(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Je("error",e),Je("load",e);var i=!1,c=!1,f;for(f in a)if(a.hasOwnProperty(f)){var g=a[f];if(g!=null)switch(f){case"src":i=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(m(137,t));default:St(e,t,f,g,a,null)}}c&&St(e,t,"srcSet",a.srcSet,a,null),i&&St(e,t,"src",a.src,a,null);return;case"input":Je("invalid",e);var _=f=g=c=null,z=null,H=null;for(i in a)if(a.hasOwnProperty(i)){var Q=a[i];if(Q!=null)switch(i){case"name":c=Q;break;case"type":g=Q;break;case"checked":z=Q;break;case"defaultChecked":H=Q;break;case"value":f=Q;break;case"defaultValue":_=Q;break;case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(m(137,t));break;default:St(e,t,i,Q,a,null)}}kr(e,f,_,z,H,g,c,!1);return;case"select":Je("invalid",e),i=g=f=null;for(c in a)if(a.hasOwnProperty(c)&&(_=a[c],_!=null))switch(c){case"value":f=_;break;case"defaultValue":g=_;break;case"multiple":i=_;default:St(e,t,c,_,a,null)}t=f,a=g,e.multiple=!!i,t!=null?Ba(e,!!i,t,!1):a!=null&&Ba(e,!!i,a,!0);return;case"textarea":Je("invalid",e),f=c=i=null;for(g in a)if(a.hasOwnProperty(g)&&(_=a[g],_!=null))switch(g){case"value":i=_;break;case"defaultValue":c=_;break;case"children":f=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(m(91));break;default:St(e,t,g,_,a,null)}Gr(e,i,c,f);return;case"option":for(z in a)if(a.hasOwnProperty(z)&&(i=a[z],i!=null))switch(z){case"selected":e.selected=i&&typeof i!="function"&&typeof i!="symbol";break;default:St(e,t,z,i,a,null)}return;case"dialog":Je("beforetoggle",e),Je("toggle",e),Je("cancel",e),Je("close",e);break;case"iframe":case"object":Je("load",e);break;case"video":case"audio":for(i=0;i<Yl.length;i++)Je(Yl[i],e);break;case"image":Je("error",e),Je("load",e);break;case"details":Je("toggle",e);break;case"embed":case"source":case"link":Je("error",e),Je("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(H in a)if(a.hasOwnProperty(H)&&(i=a[H],i!=null))switch(H){case"children":case"dangerouslySetInnerHTML":throw Error(m(137,t));default:St(e,t,H,i,a,null)}return;default:if(Vr(t)){for(Q in a)a.hasOwnProperty(Q)&&(i=a[Q],i!==void 0&&Om(e,t,Q,i,a,void 0));return}}for(_ in a)a.hasOwnProperty(_)&&(i=a[_],i!=null&&St(e,t,_,i,a,null))}function P0(e,t,a,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,f=null,g=null,_=null,z=null,H=null,Q=null;for(Y in a){var I=a[Y];if(a.hasOwnProperty(Y)&&I!=null)switch(Y){case"checked":break;case"value":break;case"defaultValue":z=I;default:i.hasOwnProperty(Y)||St(e,t,Y,null,i,I)}}for(var k in i){var Y=i[k];if(I=a[k],i.hasOwnProperty(k)&&(Y!=null||I!=null))switch(k){case"type":f=Y;break;case"name":c=Y;break;case"checked":H=Y;break;case"defaultChecked":Q=Y;break;case"value":g=Y;break;case"defaultValue":_=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(m(137,t));break;default:Y!==I&&St(e,t,k,Y,i,I)}}js(e,g,_,z,H,Q,f,c);return;case"select":Y=g=_=k=null;for(f in a)if(z=a[f],a.hasOwnProperty(f)&&z!=null)switch(f){case"value":break;case"multiple":Y=z;default:i.hasOwnProperty(f)||St(e,t,f,null,i,z)}for(c in i)if(f=i[c],z=a[c],i.hasOwnProperty(c)&&(f!=null||z!=null))switch(c){case"value":k=f;break;case"defaultValue":_=f;break;case"multiple":g=f;default:f!==z&&St(e,t,c,f,i,z)}t=_,a=g,i=Y,k!=null?Ba(e,!!a,k,!1):!!i!=!!a&&(t!=null?Ba(e,!!a,t,!0):Ba(e,!!a,a?[]:"",!1));return;case"textarea":Y=k=null;for(_ in a)if(c=a[_],a.hasOwnProperty(_)&&c!=null&&!i.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:St(e,t,_,null,i,c)}for(g in i)if(c=i[g],f=a[g],i.hasOwnProperty(g)&&(c!=null||f!=null))switch(g){case"value":k=c;break;case"defaultValue":Y=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(m(91));break;default:c!==f&&St(e,t,g,c,i,f)}jr(e,k,Y);return;case"option":for(var de in a)if(k=a[de],a.hasOwnProperty(de)&&k!=null&&!i.hasOwnProperty(de))switch(de){case"selected":e.selected=!1;break;default:St(e,t,de,null,i,k)}for(z in i)if(k=i[z],Y=a[z],i.hasOwnProperty(z)&&k!==Y&&(k!=null||Y!=null))switch(z){case"selected":e.selected=k&&typeof k!="function"&&typeof k!="symbol";break;default:St(e,t,z,k,i,Y)}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 Ue in a)k=a[Ue],a.hasOwnProperty(Ue)&&k!=null&&!i.hasOwnProperty(Ue)&&St(e,t,Ue,null,i,k);for(H in i)if(k=i[H],Y=a[H],i.hasOwnProperty(H)&&k!==Y&&(k!=null||Y!=null))switch(H){case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(m(137,t));break;default:St(e,t,H,k,i,Y)}return;default:if(Vr(t)){for(var Et in a)k=a[Et],a.hasOwnProperty(Et)&&k!==void 0&&!i.hasOwnProperty(Et)&&Om(e,t,Et,void 0,i,k);for(Q in i)k=i[Q],Y=a[Q],!i.hasOwnProperty(Q)||k===Y||k===void 0&&Y===void 0||Om(e,t,Q,k,i,Y);return}}for(var A in a)k=a[A],a.hasOwnProperty(A)&&k!=null&&!i.hasOwnProperty(A)&&St(e,t,A,null,i,k);for(I in i)k=i[I],Y=a[I],!i.hasOwnProperty(I)||k===Y||k==null&&Y==null||St(e,t,I,k,i,Y)}function jp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function $0(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),i=0;i<a.length;i++){var c=a[i],f=c.transferSize,g=c.initiatorType,_=c.duration;if(f&&_&&jp(g)){for(g=0,_=c.responseEnd,i+=1;i<a.length;i++){var z=a[i],H=z.startTime;if(H>_)break;var Q=z.transferSize,I=z.initiatorType;Q&&jp(I)&&(z=z.responseEnd,g+=Q*(z<_?1:(_-H)/(z-H)))}if(--i,t+=8*(f+g)/(c.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var xm=null,Mm=null;function Mh(e){return e.nodeType===9?e:e.ownerDocument}function Gp(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 Vp(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Cm(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Um=null;function J0(){var e=window.event;return e&&e.type==="popstate"?e===Um?!1:(Um=e,!0):(Um=null,!1)}var Fp=typeof setTimeout=="function"?setTimeout:void 0,W0=typeof clearTimeout=="function"?clearTimeout:void 0,Yp=typeof Promise=="function"?Promise:void 0,eg=typeof queueMicrotask=="function"?queueMicrotask:typeof Yp<"u"?function(e){return Yp.resolve(null).then(e).catch(tg)}:Fp;function tg(e){setTimeout(function(){throw e})}function Tu(e){return e==="head"}function qp(e,t){var a=t,i=0;do{var c=a.nextSibling;if(e.removeChild(a),c&&c.nodeType===8)if(a=c.data,a==="/$"||a==="/&"){if(i===0){e.removeChild(c),Io(t);return}i--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")i++;else if(a==="html")Af(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Af(a);for(var f=a.firstChild;f;){var g=f.nextSibling,_=f.nodeName;f[Ra]||_==="SCRIPT"||_==="STYLE"||_==="LINK"&&f.rel.toLowerCase()==="stylesheet"||a.removeChild(f),f=g}}else a==="body"&&Af(e.ownerDocument.body);a=c}while(a);Io(t)}function Zp(e,t){var a=e;e=0;do{var i=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),i&&i.nodeType===8)if(a=i.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=i}while(a)}function Am(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Am(a),Ki(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function ng(e,t,a,i){for(;e.nodeType===1;){var c=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!i&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(i){if(!e[Ra])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var f=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=Oa(e.nextSibling),e===null)break}return null}function lg(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Oa(e.nextSibling),e===null))return null;return e}function Qp(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Oa(e.nextSibling),e===null))return null;return e}function Dm(e){return e.data==="$?"||e.data==="$~"}function Rm(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function ag(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var i=function(){t(),a.removeEventListener("DOMContentLoaded",i)};a.addEventListener("DOMContentLoaded",i),e._reactRetry=i}}function Oa(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Nm=null;function Xp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Oa(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function Ip(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function Kp(e,t,a){switch(t=Mh(a),e){case"html":if(e=t.documentElement,!e)throw Error(m(452));return e;case"head":if(e=t.head,!e)throw Error(m(453));return e;case"body":if(e=t.body,!e)throw Error(m(454));return e;default:throw Error(m(451))}}function Af(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ki(e)}var xa=new Map,Pp=new Set;function Ch(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ms=W.d;W.d={f:ig,r:sg,D:ug,C:rg,L:og,m:cg,X:dg,S:fg,M:hg};function ig(){var e=Ms.f(),t=Jl();return e||t}function sg(e){var t=$i(e);t!==null&&t.tag===5&&t.type==="form"?ch(t):Ms.r(e)}var Zo=typeof document>"u"?null:document;function $p(e,t,a){var i=Zo;if(i&&typeof t=="string"&&t){var c=An(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof a=="string"&&(c+='[crossorigin="'+a+'"]'),Pp.has(c)||(Pp.add(c),e={rel:e,crossOrigin:a,href:t},i.querySelector(c)===null&&(t=i.createElement("link"),Xn(t,"link",e),Jt(t),i.head.appendChild(t)))}}function ug(e){Ms.D(e),$p("dns-prefetch",e,null)}function rg(e,t){Ms.C(e,t),$p("preconnect",e,t)}function og(e,t,a){Ms.L(e,t,a);var i=Zo;if(i&&e&&t){var c='link[rel="preload"][as="'+An(t)+'"]';t==="image"&&a&&a.imageSrcSet?(c+='[imagesrcset="'+An(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(c+='[imagesizes="'+An(a.imageSizes)+'"]')):c+='[href="'+An(e)+'"]';var f=c;switch(t){case"style":f=Qo(e);break;case"script":f=Xo(e)}xa.has(f)||(e=x({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),xa.set(f,e),i.querySelector(c)!==null||t==="style"&&i.querySelector(Df(f))||t==="script"&&i.querySelector(Rf(f))||(t=i.createElement("link"),Xn(t,"link",e),Jt(t),i.head.appendChild(t)))}}function cg(e,t){Ms.m(e,t);var a=Zo;if(a&&e){var i=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+An(i)+'"][href="'+An(e)+'"]',f=c;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Xo(e)}if(!xa.has(f)&&(e=x({rel:"modulepreload",href:e},t),xa.set(f,e),a.querySelector(c)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Rf(f)))return}i=a.createElement("link"),Xn(i,"link",e),Jt(i),a.head.appendChild(i)}}}function fg(e,t,a){Ms.S(e,t,a);var i=Zo;if(i&&e){var c=ci(i).hoistableStyles,f=Qo(e);t=t||"default";var g=c.get(f);if(!g){var _={loading:0,preload:null};if(g=i.querySelector(Df(f)))_.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":t},a),(a=xa.get(f))&&Bm(e,a);var z=g=i.createElement("link");Jt(z),Xn(z,"link",e),z._p=new Promise(function(H,Q){z.onload=H,z.onerror=Q}),z.addEventListener("load",function(){_.loading|=1}),z.addEventListener("error",function(){_.loading|=2}),_.loading|=4,Uh(g,t,i)}g={type:"stylesheet",instance:g,count:1,state:_},c.set(f,g)}}}function dg(e,t){Ms.X(e,t);var a=Zo;if(a&&e){var i=ci(a).hoistableScripts,c=Xo(e),f=i.get(c);f||(f=a.querySelector(Rf(c)),f||(e=x({src:e,async:!0},t),(t=xa.get(c))&&wm(e,t),f=a.createElement("script"),Jt(f),Xn(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},i.set(c,f))}}function hg(e,t){Ms.M(e,t);var a=Zo;if(a&&e){var i=ci(a).hoistableScripts,c=Xo(e),f=i.get(c);f||(f=a.querySelector(Rf(c)),f||(e=x({src:e,async:!0,type:"module"},t),(t=xa.get(c))&&wm(e,t),f=a.createElement("script"),Jt(f),Xn(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},i.set(c,f))}}function Jp(e,t,a,i){var c=(c=ln.current)?Ch(c):null;if(!c)throw Error(m(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Qo(a.href),a=ci(c).hoistableStyles,i=a.get(t),i||(i={type:"style",instance:null,count:0,state:null},a.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Qo(a.href);var f=ci(c).hoistableStyles,g=f.get(e);if(g||(c=c.ownerDocument||c,g={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,g),(f=c.querySelector(Df(e)))&&!f._p&&(g.instance=f,g.state.loading=5),xa.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},xa.set(e,a),f||mg(c,e,a,g.state))),t&&i===null)throw Error(m(528,""));return g}if(t&&i!==null)throw Error(m(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Xo(a),a=ci(c).hoistableScripts,i=a.get(t),i||(i={type:"script",instance:null,count:0,state:null},a.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(m(444,e))}}function Qo(e){return'href="'+An(e)+'"'}function Df(e){return'link[rel="stylesheet"]['+e+"]"}function Wp(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function mg(e,t,a,i){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?i.loading=1:(t=e.createElement("link"),i.preload=t,t.addEventListener("load",function(){return i.loading|=1}),t.addEventListener("error",function(){return i.loading|=2}),Xn(t,"link",a),Jt(t),e.head.appendChild(t))}function Xo(e){return'[src="'+An(e)+'"]'}function Rf(e){return"script[async]"+e}function ev(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+An(a.href)+'"]');if(i)return t.instance=i,Jt(i),i;var c=x({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),Jt(i),Xn(i,"style",c),Uh(i,a.precedence,e),t.instance=i;case"stylesheet":c=Qo(a.href);var f=e.querySelector(Df(c));if(f)return t.state.loading|=4,t.instance=f,Jt(f),f;i=Wp(a),(c=xa.get(c))&&Bm(i,c),f=(e.ownerDocument||e).createElement("link"),Jt(f);var g=f;return g._p=new Promise(function(_,z){g.onload=_,g.onerror=z}),Xn(f,"link",i),t.state.loading|=4,Uh(f,a.precedence,e),t.instance=f;case"script":return f=Xo(a.src),(c=e.querySelector(Rf(f)))?(t.instance=c,Jt(c),c):(i=a,(c=xa.get(f))&&(i=x({},a),wm(i,c)),e=e.ownerDocument||e,c=e.createElement("script"),Jt(c),Xn(c,"link",i),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(m(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(i=t.instance,t.state.loading|=4,Uh(i,a.precedence,e));return t.instance}function Uh(e,t,a){for(var i=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=i.length?i[i.length-1]:null,f=c,g=0;g<i.length;g++){var _=i[g];if(_.dataset.precedence===t)f=_;else if(f!==c)break}f?f.parentNode.insertBefore(e,f.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Bm(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function wm(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ah=null;function tv(e,t,a){if(Ah===null){var i=new Map,c=Ah=new Map;c.set(a,i)}else c=Ah,i=c.get(a),i||(i=new Map,c.set(a,i));if(i.has(e))return i;for(i.set(e,null),a=a.getElementsByTagName(e),c=0;c<a.length;c++){var f=a[c];if(!(f[Ra]||f[$t]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var g=f.getAttribute(t)||"";g=e+g;var _=i.get(g);_?_.push(f):i.set(g,[f])}}return i}function nv(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function pg(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function lv(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function vg(e,t,a,i){if(a.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var c=Qo(i.href),f=t.querySelector(Df(c));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Dh.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=f,Jt(f);return}f=t.ownerDocument||t,i=Wp(i),(c=xa.get(c))&&Bm(i,c),f=f.createElement("link"),Jt(f);var g=f;g._p=new Promise(function(_,z){g.onload=_,g.onerror=z}),Xn(f,"link",i),a.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Dh.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Hm=0;function gg(e,t){return e.stylesheets&&e.count===0&&Nh(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var i=setTimeout(function(){if(e.stylesheets&&Nh(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+t);0<e.imgBytes&&Hm===0&&(Hm=62500*$0());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Nh(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>Hm?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(i),clearTimeout(c)}}:null}function Dh(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Nh(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Rh=null;function Nh(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Rh=new Map,t.forEach(yg,e),Rh=null,Dh.call(e))}function yg(e,t){if(!(t.state.loading&4)){var a=Rh.get(e);if(a)var i=a.get(null);else{a=new Map,Rh.set(e,a);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<c.length;f++){var g=c[f];(g.nodeName==="LINK"||g.getAttribute("media")!=="not all")&&(a.set(g.dataset.precedence,g),i=g)}i&&a.set(null,i)}c=t.instance,g=c.getAttribute("data-precedence"),f=a.get(g)||i,f===i&&a.set(null,c),a.set(g,c),this.count++,i=Dh.bind(this),c.addEventListener("load",i),c.addEventListener("error",i),f?f.parentNode.insertBefore(c,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var Nf={$$typeof:Z,Provider:null,Consumer:null,_currentValue:me,_currentValue2:me,_threadCount:0};function _g(e,t,a,i,c,f,g,_,z){this.tag=1,this.containerInfo=e,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=Dr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Dr(0),this.hiddenUpdates=Dr(null),this.identifierPrefix=i,this.onUncaughtError=c,this.onCaughtError=f,this.onRecoverableError=g,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=z,this.incompleteTransitions=new Map}function av(e,t,a,i,c,f,g,_,z,H,Q,I){return e=new _g(e,t,a,g,z,H,Q,I,_),t=1,f===!0&&(t|=24),f=Dt(3,null,null,t),e.current=f,f.stateNode=e,t=Hc(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:i,isDehydrated:a,cache:t},ir(f),e}function iv(e){return e?(e=vi,e):vi}function sv(e,t,a,i,c,f){c=iv(c),i.context===null?i.context=c:i.pendingContext=c,i=Ya(t),i.payload={element:a},f=f===void 0?null:f,f!==null&&(i.callback=f),a=zi(e,i,t),a!==null&&(Ge(a,e,t),Oi(a,e,t))}function uv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Lm(e,t){uv(e,t),(e=e.alternate)&&uv(e,t)}function rv(e){if(e.tag===13||e.tag===31){var t=Gn(e,67108864);t!==null&&Ge(t,e,67108864),Lm(e,67108864)}}function ov(e){if(e.tag===13||e.tag===31){var t=Sl();t=ws(t);var a=Gn(e,t);a!==null&&Ge(a,e,t),Lm(e,t)}}var Bh=!0;function bg(e,t,a,i){var c=q.T;q.T=null;var f=W.p;try{W.p=2,km(e,t,a,i)}finally{W.p=f,q.T=c}}function Sg(e,t,a,i){var c=q.T;q.T=null;var f=W.p;try{W.p=8,km(e,t,a,i)}finally{W.p=f,q.T=c}}function km(e,t,a,i){if(Bh){var c=jm(i);if(c===null)zm(e,t,i,wh,a),fv(e,i);else if(Tg(c,e,t,a,i))i.stopPropagation();else if(fv(e,i),t&4&&-1<Eg.indexOf(e)){for(;c!==null;){var f=$i(c);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var g=ii(f.pendingLanes);if(g!==0){var _=f;for(_.pendingLanes|=2,_.entangledLanes|=2;g;){var z=1<<31-ol(g);_.entanglements[1]|=z,g&=~z}$(f),(ge&6)===0&&(Xt=hn()+500,oe(0))}}break;case 31:case 13:_=Gn(f,2),_!==null&&Ge(_,f,2),Jl(),Lm(f,2)}if(f=jm(i),f===null&&zm(e,t,i,wh,a),f===c)break;c=f}c!==null&&i.stopPropagation()}else zm(e,t,i,null,a)}}function jm(e){return e=Yr(e),Gm(e)}var wh=null;function Gm(e){if(wh=null,e=Pi(e),e!==null){var t=b(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=S(t),e!==null)return e;e=null}else if(a===31){if(e=E(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return wh=e,null}function cv(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(Ur()){case Us:return 2;case Kn:return 8;case Zi:case ea:return 32;case Qi:return 268435456;default:return 32}default:return 32}}var Vm=!1,zu=null,Ou=null,xu=null,Bf=new Map,wf=new Map,Mu=[],Eg="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 fv(e,t){switch(e){case"focusin":case"focusout":zu=null;break;case"dragenter":case"dragleave":Ou=null;break;case"mouseover":case"mouseout":xu=null;break;case"pointerover":case"pointerout":Bf.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":wf.delete(t.pointerId)}}function Hf(e,t,a,i,c,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:a,eventSystemFlags:i,nativeEvent:f,targetContainers:[c]},t!==null&&(t=$i(t),t!==null&&rv(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function Tg(e,t,a,i,c){switch(t){case"focusin":return zu=Hf(zu,e,t,a,i,c),!0;case"dragenter":return Ou=Hf(Ou,e,t,a,i,c),!0;case"mouseover":return xu=Hf(xu,e,t,a,i,c),!0;case"pointerover":var f=c.pointerId;return Bf.set(f,Hf(Bf.get(f)||null,e,t,a,i,c)),!0;case"gotpointercapture":return f=c.pointerId,wf.set(f,Hf(wf.get(f)||null,e,t,a,i,c)),!0}return!1}function dv(e){var t=Pi(e.target);if(t!==null){var a=b(t);if(a!==null){if(t=a.tag,t===13){if(t=S(a),t!==null){e.blockedOn=t,ui(e.priority,function(){ov(a)});return}}else if(t===31){if(t=E(a),t!==null){e.blockedOn=t,ui(e.priority,function(){ov(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Hh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=jm(e.nativeEvent);if(a===null){a=e.nativeEvent;var i=new a.constructor(a.type,a);Fr=i,a.target.dispatchEvent(i),Fr=null}else return t=$i(a),t!==null&&rv(t),e.blockedOn=a,!1;t.shift()}return!0}function hv(e,t,a){Hh(e)&&a.delete(t)}function zg(){Vm=!1,zu!==null&&Hh(zu)&&(zu=null),Ou!==null&&Hh(Ou)&&(Ou=null),xu!==null&&Hh(xu)&&(xu=null),Bf.forEach(hv),wf.forEach(hv)}function Lh(e,t){e.blockedOn===t&&(e.blockedOn=null,Vm||(Vm=!0,u.unstable_scheduleCallback(u.unstable_NormalPriority,zg)))}var kh=null;function mv(e){kh!==e&&(kh=e,u.unstable_scheduleCallback(u.unstable_NormalPriority,function(){kh===e&&(kh=null);for(var t=0;t<e.length;t+=3){var a=e[t],i=e[t+1],c=e[t+2];if(typeof i!="function"){if(Gm(i||a)===null)continue;break}var f=$i(a);f!==null&&(e.splice(t,3),t-=3,cf(f,{pending:!0,data:c,method:a.method,action:i},i,c))}}))}function Io(e){function t(z){return Lh(z,e)}zu!==null&&Lh(zu,e),Ou!==null&&Lh(Ou,e),xu!==null&&Lh(xu,e),Bf.forEach(t),wf.forEach(t);for(var a=0;a<Mu.length;a++){var i=Mu[a];i.blockedOn===e&&(i.blockedOn=null)}for(;0<Mu.length&&(a=Mu[0],a.blockedOn===null);)dv(a),a.blockedOn===null&&Mu.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(i=0;i<a.length;i+=3){var c=a[i],f=a[i+1],g=c[Cn]||null;if(typeof f=="function")g||mv(a);else if(g){var _=null;if(f&&f.hasAttribute("formAction")){if(c=f,g=f[Cn]||null)_=g.formAction;else if(Gm(c)!==null)continue}else _=g.action;typeof _=="function"?a[i+1]=_:(a.splice(i,3),i-=3),mv(a)}}}function pv(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(g){return c=g})},focusReset:"manual",scroll:"manual"})}function t(){c!==null&&(c(),c=null),i||setTimeout(a,20)}function a(){if(!i&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var i=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){i=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),c!==null&&(c(),c=null)}}}function Fm(e){this._internalRoot=e}jh.prototype.render=Fm.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(m(409));var a=t.current,i=Sl();sv(a,i,e,t,null,null)},jh.prototype.unmount=Fm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;sv(e.current,2,null,e,null,null),Jl(),t[ri]=null}};function jh(e){this._internalRoot=e}jh.prototype.unstable_scheduleHydration=function(e){if(e){var t=Nr();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Mu.length&&t!==0&&t<Mu[a].priority;a++);Mu.splice(a,0,e),a===0&&dv(e)}};var vv=r.version;if(vv!=="19.2.8")throw Error(m(527,vv,"19.2.8"));W.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(m(188)):(e=Object.keys(e).join(","),Error(m(268,e)));return e=C(t),e=e!==null?R(e):null,e=e===null?null:e.stateNode,e};var Og={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:q,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Gh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Gh.isDisabled&&Gh.supportsFiber)try{As=Gh.inject(Og),Pn=Gh}catch{}}return Lf.createRoot=function(e,t){if(!v(e))throw Error(m(299));var a=!1,i="",c=gh,f=vf,g=gf;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(f=t.onCaughtError),t.onRecoverableError!==void 0&&(g=t.onRecoverableError)),t=av(e,1,!1,null,null,a,i,null,c,f,g,pv),e[ri]=t.current,Tm(e),new Fm(t)},Lf.hydrateRoot=function(e,t,a){if(!v(e))throw Error(m(299));var i=!1,c="",f=gh,g=vf,_=gf,z=null;return a!=null&&(a.unstable_strictMode===!0&&(i=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(f=a.onUncaughtError),a.onCaughtError!==void 0&&(g=a.onCaughtError),a.onRecoverableError!==void 0&&(_=a.onRecoverableError),a.formState!==void 0&&(z=a.formState)),t=av(e,1,!0,t,a??null,i,c,z,f,g,_,pv),t.context=iv(null),a=t.current,i=Sl(),i=ws(i),c=Ya(i),c.callback=null,zi(a,c,i),a=i,t.current.lanes=a,Ns(t,a),$(t),e[ri]=t.current,Tm(e),new jh(t)},Lf.version="19.2.8",Lf}var Ev;function l1(){if(Ev)return qm.exports;Ev=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(r){console.error(r)}}return u(),qm.exports=n1(),qm.exports}var a1=l1();const Tv=u=>{let r;const d=new Set,m=(C,R)=>{const x=typeof C=="function"?C(r):C;if(!Object.is(x,r)){const V=r;r=R??(typeof x!="object"||x===null)?x:Object.assign({},r,x),d.forEach(N=>N(r,V))}},v=()=>r,E={setState:m,getState:v,getInitialState:()=>T,subscribe:C=>(d.add(C),()=>d.delete(C))},T=r=u(m,v,E);return E},i1=(u=>u?Tv(u):Tv),{useSyncExternalStoreWithSelector:s1}=Ug,u1=u=>u;function r1(u,r=u1,d){const m=s1(u.subscribe,u.getState,u.getInitialState,r,d);return o0.useDebugValue(m),m}const zv=(u,r)=>{const d=i1(u),m=(v,b=r)=>r1(d,v,b);return Object.assign(m,d),m},o1=((u,r)=>u?zv(u,r):zv);var Cs=v0();const c1=Ag(Cs);function xp(u,r,d){if(!u)return;if(d(u)===!0)return u;let m=r?u.return:u.child;for(;m;){const v=xp(m,r,d);if(v)return v;m=r?null:m.sibling}}function g0(u){try{return Object.defineProperties(u,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return u}}const Mp=g0(J.createContext(null));class y0 extends J.Component{render(){return J.createElement(Mp.Provider,{value:this._reactInternals},this.props.children)}}function _0(){const u=J.useContext(Mp);if(u===null)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const r=J.useId();return J.useMemo(()=>{for(const d of[u,u?.alternate]){if(!d)continue;const m=xp(d,!1,v=>{let b=v.memoizedState;for(;b;){if(b.memoizedState===r)return!0;b=b.next}});if(m)return m}},[u,r])}const f1=Symbol.for("react.context"),d1=u=>u!==null&&typeof u=="object"&&"$$typeof"in u&&u.$$typeof===f1;function h1(){const u=_0(),[r]=J.useState(()=>new Map);r.clear();let d=u;for(;d;){const m=d.type;d1(m)&&m!==Mp&&!r.has(m)&&r.set(m,J.use(g0(m))),d=d.return}return r}function m1(){const u=h1();return J.useMemo(()=>Array.from(u.keys()).reduce((r,d)=>m=>J.createElement(r,null,J.createElement(d.Provider,{...m,value:u.get(d)})),r=>J.createElement(y0,{...r})),[u])}function Cp(u){let r=u.root;for(;r.getState().previousRoot;)r=r.getState().previousRoot;return r}const b0=u=>u&&u.isOrthographicCamera,p1=u=>u&&u.hasOwnProperty("current"),v1=u=>u!=null&&(typeof u=="string"||typeof u=="number"||u.isColor),Kf=((u,r)=>typeof window<"u"&&(((u=window.document)==null?void 0:u.createElement)||((r=window.navigator)==null?void 0:r.product)==="ReactNative"))()?J.useLayoutEffect:J.useEffect;function S0(u){const r=J.useRef(u);return Kf(()=>void(r.current=u),[u]),r}function g1(){const u=_0(),r=m1();return J.useMemo(()=>({children:d})=>{const v=!!xp(u,!0,b=>b.type===J.StrictMode)?J.StrictMode:J.Fragment;return ul.jsx(v,{children:ul.jsx(r,{children:d})})},[u,r])}function y1({set:u}){return Kf(()=>(u(new Promise(()=>null)),()=>u(!1)),[u]),null}const _1=(u=>(u=class extends J.Component{constructor(...d){super(...d),this.state={error:!1}}componentDidCatch(d){this.props.set(d)}render(){return this.state.error?null:this.props.children}},u.getDerivedStateFromError=()=>({error:!0}),u))();function E0(u){var r;const d=typeof window<"u"?(r=window.devicePixelRatio)!=null?r:2:1;return Array.isArray(u)?Math.min(Math.max(u[0],d),u[1]):u}function Ko(u){var r;return(r=u.__r3f)==null?void 0:r.root.getState()}const kt={obj:u=>u===Object(u)&&!kt.arr(u)&&typeof u!="function",fun:u=>typeof u=="function",str:u=>typeof u=="string",num:u=>typeof u=="number",boo:u=>typeof u=="boolean",und:u=>u===void 0,nul:u=>u===null,arr:u=>Array.isArray(u),equ(u,r,{arrays:d="shallow",objects:m="reference",strict:v=!0}={}){if(typeof u!=typeof r||!!u!=!!r)return!1;if(kt.str(u)||kt.num(u)||kt.boo(u))return u===r;const b=kt.obj(u);if(b&&m==="reference")return u===r;const S=kt.arr(u);if(S&&d==="reference")return u===r;if((S||b)&&u===r)return!0;let E;for(E in u)if(!(E in r))return!1;if(b&&d==="shallow"&&m==="shallow"){for(E in v?r:u)if(!kt.equ(u[E],r[E],{strict:v,objects:"reference"}))return!1}else for(E in v?r:u)if(u[E]!==r[E])return!1;if(kt.und(E)){if(S&&u.length===0&&r.length===0||b&&Object.keys(u).length===0&&Object.keys(r).length===0)return!0;if(u!==r)return!1}return!0}};function b1(u){u.type!=="Scene"&&(u.dispose==null||u.dispose());for(const r in u){const d=u[r];d?.type!=="Scene"&&(d==null||d.dispose==null||d.dispose())}}const T0=["children","key","ref"];function dp(u){const r={};for(const d in u)T0.includes(d)||(r[d]=u[d]);return r}function Ph(u,r,d,m){const v=u;let b=v?.__r3f;return b||(b={root:r,type:d,parent:null,children:[],props:dp(m),object:v,eventCount:0,handlers:{},isHidden:!1},v&&(v.__r3f=b)),b}function Qf(u,r){if(!r.includes("-"))return{root:u,key:r,target:u[r]};if(r in u)return{root:u,key:r,target:u[r]};let d=u;const m=r.split("-");for(const v of m){if(typeof d!="object"||d===null){if(d!==void 0){const b=m.slice(m.indexOf(v)).join("-");return{root:d,key:b,target:void 0}}return{root:u,key:r,target:void 0}}r=v,u=d,d=d[r]}return{root:u,key:r,target:d}}const Ov=/-\d+$/;function $h(u,r){if(kt.str(r.props.attach)){if(Ov.test(r.props.attach)){const v=r.props.attach.replace(Ov,""),{root:b,key:S}=Qf(u.object,v);Array.isArray(b[S])||(b[S]=[])}const{root:d,key:m}=Qf(u.object,r.props.attach);r.previousAttach=d[m],d[m]=r.object}else kt.fun(r.props.attach)&&(r.previousAttach=r.props.attach(u.object,r.object))}function Jh(u,r){if(kt.str(r.props.attach)){const{root:d,key:m}=Qf(u.object,r.props.attach),v=r.previousAttach;v===void 0?delete d[m]:d[m]=v}else r.previousAttach==null||r.previousAttach(u.object,r.object);delete r.previousAttach}const hp=[...T0,"args","dispose","attach","object","onUpdate","dispose"],xv=new Map;function S1(u){let r=xv.get(u.constructor);try{r||(r=new u.constructor,xv.set(u.constructor,r))}catch{}return r}function E1(u,r){const d={};for(const m in r)if(!hp.includes(m)&&!kt.equ(r[m],u.props[m])){d[m]=r[m];for(const v in r)v.startsWith(`${m}-`)&&(d[v]=r[v])}for(const m in u.props){if(hp.includes(m)||r.hasOwnProperty(m))continue;const{root:v,key:b}=Qf(u.object,m);if(v.constructor&&v.constructor.length===0){const S=S1(v);kt.und(S)||(d[m]=S[b])}else d[m]=0}return d}const T1=["map","emissiveMap","sheenColorMap","specularColorMap","envMap"],z1=/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/;function Ru(u,r){var d;const m=u.__r3f,v=m&&Cp(m).getState(),b=m?.eventCount;for(const E in r){let T=r[E];if(hp.includes(E))continue;if(m&&z1.test(E)){typeof T=="function"?m.handlers[E]=T:delete m.handlers[E],m.eventCount=Object.keys(m.handlers).length;continue}if(T===void 0)continue;let{root:C,key:R,target:x}=Qf(u,E);if(x===void 0&&(typeof C!="object"||C===null))throw Error(`R3F: Cannot set "${E}". Ensure it is an object before setting "${R}".`);if(x instanceof gv&&T instanceof gv)x.mask=T.mask;else if(x instanceof am&&v1(T))x.set(T);else if(x!==null&&typeof x=="object"&&typeof x.set=="function"&&typeof x.copy=="function"&&T!=null&&T.constructor&&x.constructor===T.constructor)x.copy(T);else if(x!==null&&typeof x=="object"&&typeof x.set=="function"&&Array.isArray(T))typeof x.fromArray=="function"?x.fromArray(T):x.set(...T);else if(x!==null&&typeof x=="object"&&typeof x.set=="function"&&typeof T=="number")typeof x.setScalar=="function"?x.setScalar(T):x.set(T);else if(C instanceof Yi&&R==="uniforms"&&kt.obj(T)){kt.obj(C.uniforms)||(C.uniforms={});const V=C.uniforms,N=T;for(const K in N){const ee=N[K],le=V[K];le?Object.assign(le,ee):V[K]={...ee}}}else{var S;C[R]=T,v&&!v.linear&&T1.includes(R)&&(S=C[R])!=null&&S.isTexture&&C[R].format===Lg&&C[R].type===Nu&&(C[R].colorSpace=Hn)}}if(m!=null&&m.parent&&v!=null&&v.internal&&(d=m.object)!=null&&d.isObject3D&&b!==m.eventCount){const E=m.object,T=v.internal.interaction.indexOf(E);T>-1&&v.internal.interaction.splice(T,1),m.eventCount&&E.raycast!==null&&v.internal.interaction.push(E)}return m&&m.props.attach===void 0&&(m.object.isBufferGeometry?m.props.attach="geometry":m.object.isMaterial&&(m.props.attach="material")),m&&ic(m),u}function ic(u){var r;if(!u.parent)return;u.props.onUpdate==null||u.props.onUpdate(u.object);const d=(r=u.root)==null||r.getState==null?void 0:r.getState();d&&d.internal.frames===0&&d.invalidate()}function O1(u,r){u.manual||(b0(u)?(u.left=r.width/-2,u.right=r.width/2,u.top=r.height/2,u.bottom=r.height/-2):u.aspect=r.width/r.height,u.updateProjectionMatrix())}const Zl=u=>u?.isObject3D;function Yf(u){return(u.eventObject||u.object).uuid+"/"+u.index+u.instanceId}function z0(u,r,d,m){const v=d.get(r);v&&(d.delete(r),d.size===0&&(u.delete(m),v.target.releasePointerCapture(m)))}function x1(u,r,d){const{internal:m}=u.getState();for(let v=0;v<m.interaction.length;v++)m.interaction[v]===r&&(m.interaction[v]=d);for(let v=0;v<m.initialHits.length;v++)m.initialHits[v]===r&&(m.initialHits[v]=d);m.hovered.forEach((v,b)=>{if(v.eventObject===r||v.object===r){m.hovered.delete(b);const S={...v,eventObject:v.eventObject===r?d:v.eventObject,object:v.object===r?d:v.object};m.hovered.set(Yf(S),S)}}),m.capturedMap.forEach(v=>{const b=v.get(r);b&&(v.delete(r),v.set(d,b))})}function M1(u,r){const{internal:d}=u.getState();d.interaction=d.interaction.filter(m=>m!==r),d.initialHits=d.initialHits.filter(m=>m!==r),d.hovered.forEach((m,v)=>{(m.eventObject===r||m.object===r)&&d.hovered.delete(v)}),d.capturedMap.forEach((m,v)=>{z0(d.capturedMap,r,m,v)})}function C1(u){function r(T){const{internal:C}=u.getState(),R=T.offsetX-C.initialClick[0],x=T.offsetY-C.initialClick[1];return Math.round(Math.sqrt(R*R+x*x))}function d(T){return T.filter(C=>["Move","Over","Enter","Out","Leave"].some(R=>{var x;return(x=C.__r3f)==null?void 0:x.handlers["onPointer"+R]}))}function m(T,C){const R=u.getState(),x=new Set,V=[],N=C?C(R.internal.interaction):R.internal.interaction;for(let U=0;U<N.length;U++){const B=Ko(N[U]);B&&(B.raycaster.camera=void 0)}R.previousRoot||R.events.compute==null||R.events.compute(T,R);function K(U){const B=Ko(U);if(!B||!B.events.enabled||B.raycaster.camera===null)return[];if(B.raycaster.camera===void 0){var Z;B.events.compute==null||B.events.compute(T,B,(Z=B.previousRoot)==null?void 0:Z.getState()),B.raycaster.camera===void 0&&(B.raycaster.camera=null)}return B.raycaster.camera?B.raycaster.intersectObject(U,!0):[]}let ee=N.flatMap(K).sort((U,B)=>{const Z=Ko(U.object),ne=Ko(B.object);return!Z||!ne?U.distance-B.distance:ne.events.priority-Z.events.priority||U.distance-B.distance}).filter(U=>{const B=Yf(U);return x.has(B)?!1:(x.add(B),!0)});R.events.filter&&(ee=R.events.filter(ee,R));for(const U of ee){let B=U.object;for(;B;){var le;(le=B.__r3f)!=null&&le.eventCount&&V.push({...U,eventObject:B}),B=B.parent}}if("pointerId"in T&&R.internal.capturedMap.has(T.pointerId))for(let U of R.internal.capturedMap.get(T.pointerId).values())x.has(Yf(U.intersection))||V.push(U.intersection);return V}function v(T,C,R,x){if(T.length){const V={stopped:!1};for(const N of T){let K=Ko(N.object);if(K||N.object.traverseAncestors(ee=>{const le=Ko(ee);if(le)return K=le,!1}),K){const{raycaster:ee,pointer:le,camera:U,internal:B}=K,Z=new Fi(le.x,le.y,0).unproject(U),ne=se=>{var Ee,Se;return(Ee=(Se=B.capturedMap.get(se))==null?void 0:Se.has(N.eventObject))!=null?Ee:!1},re=se=>{const Ee={intersection:N,target:C.target};B.capturedMap.has(se)?B.capturedMap.get(se).set(N.eventObject,Ee):B.capturedMap.set(se,new Map([[N.eventObject,Ee]])),C.target.setPointerCapture(se)},ie=se=>{const Ee=B.capturedMap.get(se);Ee&&z0(B.capturedMap,N.eventObject,Ee,se)};let ce={};for(let se in C){let Ee=C[se];typeof Ee!="function"&&(ce[se]=Ee)}let he={...N,...ce,pointer:le,intersections:T,stopped:V.stopped,delta:R,unprojectedPoint:Z,ray:ee.ray,camera:U,stopPropagation(){const se="pointerId"in C&&B.capturedMap.get(C.pointerId);if((!se||se.has(N.eventObject))&&(he.stopped=V.stopped=!0,B.hovered.size&&Array.from(B.hovered.values()).find(Ee=>Ee.eventObject===N.eventObject))){const Ee=T.slice(0,T.indexOf(N));b([...Ee,N])}},target:{hasPointerCapture:ne,setPointerCapture:re,releasePointerCapture:ie},currentTarget:{hasPointerCapture:ne,setPointerCapture:re,releasePointerCapture:ie},nativeEvent:C};if(x(he),V.stopped===!0)break}}}return T}function b(T){const{internal:C}=u.getState();for(const R of C.hovered.values())if(!T.length||!T.find(x=>x.object===R.object&&x.index===R.index&&x.instanceId===R.instanceId)){const V=R.eventObject.__r3f;if(C.hovered.delete(Yf(R)),V!=null&&V.eventCount){const N=V.handlers,K={...R,intersections:T};N.onPointerOut==null||N.onPointerOut(K),N.onPointerLeave==null||N.onPointerLeave(K)}}}function S(T,C){for(let R=0;R<C.length;R++){const x=C[R].__r3f;x==null||x.handlers.onPointerMissed==null||x.handlers.onPointerMissed(T)}}function E(T){switch(T){case"onPointerLeave":case"onPointerCancel":return()=>b([]);case"onLostPointerCapture":return C=>{const{internal:R}=u.getState();"pointerId"in C&&R.capturedMap.has(C.pointerId)&&requestAnimationFrame(()=>{R.capturedMap.has(C.pointerId)&&(R.capturedMap.delete(C.pointerId),b([]))})}}return function(R){const{onPointerMissed:x,internal:V}=u.getState();V.lastEvent.current=R;const N=T==="onPointerMove",K=T==="onClick"||T==="onContextMenu"||T==="onDoubleClick",le=m(R,N?d:void 0),U=K?r(R):0;T==="onPointerDown"&&(V.initialClick=[R.offsetX,R.offsetY],V.initialHits=le.map(Z=>Z.eventObject)),K&&!le.length&&U<=2&&(S(R,V.interaction),x&&x(R)),N&&b(le);function B(Z){const ne=Z.eventObject,re=ne.__r3f;if(!(re!=null&&re.eventCount))return;const ie=re.handlers;if(N){if(ie.onPointerOver||ie.onPointerEnter||ie.onPointerOut||ie.onPointerLeave){const ce=Yf(Z),he=V.hovered.get(ce);he?he.stopped&&Z.stopPropagation():(V.hovered.set(ce,Z),ie.onPointerOver==null||ie.onPointerOver(Z),ie.onPointerEnter==null||ie.onPointerEnter(Z))}ie.onPointerMove==null||ie.onPointerMove(Z)}else{const ce=ie[T];ce?(!K||V.initialHits.includes(ne))&&(S(R,V.interaction.filter(he=>!V.initialHits.includes(he))),ce(Z)):K&&V.initialHits.includes(ne)&&S(R,V.interaction.filter(he=>!V.initialHits.includes(he)))}}v(le,R,U,B)}}return{handlePointer:E}}const Mv=u=>!!(u!=null&&u.render),O0=J.createContext(null),U1=(u,r)=>{const d=o1((E,T)=>{const C=new Fi,R=new Fi,x=new Fi;function V(U=T().camera,B=R,Z=T().size){const{width:ne,height:re,top:ie,left:ce}=Z,he=ne/re;B.isVector3?x.copy(B):x.set(...B);const se=U.getWorldPosition(C).distanceTo(x);if(b0(U))return{width:ne/U.zoom,height:re/U.zoom,top:ie,left:ce,factor:1,distance:se,aspect:he};{const Ee=U.fov*Math.PI/180,Se=2*Math.tan(Ee/2)*se,Pe=Se*(ne/re);return{width:Pe,height:Se,top:ie,left:ce,factor:ne/Pe,distance:se,aspect:he}}}let N;const K=U=>E(B=>({performance:{...B.performance,current:U}})),ee=new wn;return{set:E,get:T,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},scene:null,xr:null,invalidate:(U=1)=>u(T(),U),advance:(U,B)=>r(U,B,T()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new kg,pointer:ee,mouse:ee,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const U=T();N&&clearTimeout(N),U.performance.current!==U.performance.min&&K(U.performance.min),N=setTimeout(()=>K(T().performance.max),U.performance.debounce)}},size:{width:0,height:0,top:0,left:0},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:V},setEvents:U=>E(B=>({...B,events:{...B.events,...U}})),setSize:(U,B,Z=0,ne=0)=>{const re=T().camera,ie={width:U,height:B,top:Z,left:ne};E(ce=>({size:ie,viewport:{...ce.viewport,...V(re,R,ie)}}))},setDpr:U=>E(B=>{const Z=E0(U);return{viewport:{...B.viewport,dpr:Z,initialDpr:B.viewport.initialDpr||Z}}}),setFrameloop:(U="always")=>{const B=T().clock;B.stop(),B.elapsedTime=0,U!=="never"&&(B.start(),B.elapsedTime=0),E(()=>({frameloop:U}))},previousRoot:void 0,internal:{interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,lastEvent:J.createRef(),active:!1,frames:0,priority:0,subscribe:(U,B,Z)=>{const ne=T().internal;return ne.priority=ne.priority+(B>0?1:0),ne.subscribers.push({ref:U,priority:B,store:Z}),ne.subscribers=ne.subscribers.sort((re,ie)=>re.priority-ie.priority),()=>{const re=T().internal;re!=null&&re.subscribers&&(re.priority=re.priority-(B>0?1:0),re.subscribers=re.subscribers.filter(ie=>ie.ref!==U))}}}}}),m=d.getState();let v=m.size,b=m.viewport.dpr,S=m.camera;return d.subscribe(()=>{const{camera:E,size:T,viewport:C,gl:R,set:x}=d.getState();if(T.width!==v.width||T.height!==v.height||C.dpr!==b){v=T,b=C.dpr,O1(E,T),C.dpr>0&&R.setPixelRatio(C.dpr);const V=typeof HTMLCanvasElement<"u"&&R.domElement instanceof HTMLCanvasElement;R.setSize(T.width,T.height,V)}E!==S&&(S=E,x(V=>({viewport:{...V.viewport,...V.viewport.getCurrentViewport(E)}})))}),d.subscribe(E=>u(E)),d};function x0(){const u=J.useContext(O0);if(!u)throw new Error("R3F: Hooks can only be used within the Canvas component!");return u}function ei(u=d=>d,r){return x0()(u,r)}function im(u,r=0){const d=x0(),m=d.getState().internal.subscribe,v=S0(u);return Kf(()=>m(v,r,d),[r,m,d]),null}/**
26
+ * @license React
27
+ * react-reconciler-constants.production.js
28
+ *
29
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */const A1=1,Cv=8,Xh=32,Uv=2,D1=268435456;var R1={version:"9.7.0"};function N1(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var Av={exports:{}},Dv={exports:{}},Rv;function B1(){return Rv||(Rv=1,(function(u){u.exports=function(r){function d(n,l,s,o){return new Hc(n,l,s,o)}function m(){}function v(n){var l="https://react.dev/errors/"+n;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)l+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+n+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function b(n){var l=n,s=n;if(n.alternate)for(;l.return;)l=l.return;else{n=l;do l=n,(l.flags&4098)!==0&&(s=l.return),n=l.return;while(n)}return l.tag===3?s:null}function S(n){if(b(n)!==n)throw Error(v(188))}function E(n){var l=n.alternate;if(!l){if(l=b(n),l===null)throw Error(v(188));return l!==n?null:n}for(var s=n,o=l;;){var h=s.return;if(h===null)break;var p=h.alternate;if(p===null){if(o=h.return,o!==null){s=o;continue}break}if(h.child===p.child){for(p=h.child;p;){if(p===s)return S(h),n;if(p===o)return S(h),l;p=p.sibling}throw Error(v(188))}if(s.return!==o.return)s=h,o=p;else{for(var y=!1,O=h.child;O;){if(O===s){y=!0,s=h,o=p;break}if(O===o){y=!0,o=h,s=p;break}O=O.sibling}if(!y){for(O=p.child;O;){if(O===s){y=!0,s=p,o=h;break}if(O===o){y=!0,o=p,s=h;break}O=O.sibling}if(!y)throw Error(v(189))}}if(s.alternate!==o)throw Error(v(190))}if(s.tag!==3)throw Error(v(188));return s.stateNode.current===s?n:l}function T(n){var l=n.tag;if(l===5||l===26||l===27||l===6)return n;for(n=n.child;n!==null;){if(l=T(n),l!==null)return l;n=n.sibling}return null}function C(n){var l=n.tag;if(l===5||l===26||l===27||l===6)return n;for(n=n.child;n!==null;){if(n.tag!==4&&(l=C(n),l!==null))return l;n=n.sibling}return null}function R(n){return n===null||typeof n!="object"?null:(n=Ya&&n[Ya]||n["@@iterator"],typeof n=="function"?n:null)}function x(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===zi?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case cs:return"Fragment";case ds:return"Profiler";case fs:return"StrictMode";case go:return"Suspense";case Fa:return"SuspenseList";case ir:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case os:return"Portal";case Rl:return n.displayName||"Context";case ar:return(n._context.displayName||"Context")+".Consumer";case su:var l=n.render;return n=n.displayName,n||(n=l.displayName||l.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case yo:return l=n.displayName||null,l!==null?l:x(n.type)||"Memo";case Vn:l=n._payload,n=n._init;try{return x(n(l))}catch{}}return null}function V(n){return{current:n}}function N(n){0>gs||(n.current=Do[gs],Do[gs]=null,gs--)}function K(n,l){gs++,Do[gs]=n.current,n.current=l}function ee(n){return n>>>=0,n===0?32:31-(Ro(n)/bh|0)|0}function le(n){var l=n&42;if(l!==0)return l;switch(n&-n){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:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function U(n,l,s){var o=n.pendingLanes;if(o===0)return 0;var h=0,p=n.suspendedLanes,y=n.pingedLanes;n=n.warmLanes;var O=o&134217727;return O!==0?(o=O&~p,o!==0?h=le(o):(y&=O,y!==0?h=le(y):s||(s=O&~n,s!==0&&(h=le(s))))):(O=o&~p,O!==0?h=le(O):y!==0?h=le(y):s||(s=o&~n,s!==0&&(h=le(s)))),h===0?0:l!==0&&l!==h&&(l&p)===0&&(p=h&-h,s=l&-l,p>=s||p===32&&(s&4194048)!==0)?l:h}function B(n,l){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&l)===0}function Z(n,l){switch(n){case 1:case 2:case 4:case 8:case 64:return l+250;case 16:case 32: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 l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ne(){var n=hu;return hu<<=1,(hu&62914560)===0&&(hu=4194304),n}function re(n){for(var l=[],s=0;31>s;s++)l.push(n);return l}function ie(n,l){n.pendingLanes|=l,l!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function ce(n,l,s,o,h,p){var y=n.pendingLanes;n.pendingLanes=s,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=s,n.entangledLanes&=s,n.errorRecoveryDisabledLanes&=s,n.shellSuspendCounter=0;var O=n.entanglements,F=n.expirationTimes,P=n.hiddenUpdates;for(s=y&~s;0<s;){var ae=31-nl(s),$=1<<ae;O[ae]=0,F[ae]=-1;var oe=P[ae];if(oe!==null)for(P[ae]=null,ae=0;ae<oe.length;ae++){var Be=oe[ae];Be!==null&&(Be.lane&=-536870913)}s&=~$}o!==0&&he(n,o,0),p!==0&&h===0&&n.tag!==0&&(n.suspendedLanes|=p&~(y&~l))}function he(n,l,s){n.pendingLanes|=l,n.suspendedLanes&=~l;var o=31-nl(l);n.entangledLanes|=l,n.entanglements[o]=n.entanglements[o]|1073741824|s&261930}function se(n,l){var s=n.entangledLanes|=l;for(n=n.entanglements;s;){var o=31-nl(s),h=1<<o;h&l|n[o]&l&&(n[o]|=l),s&=~h}}function Ee(n,l){var s=l&-l;return s=(s&42)!==0?1:Se(s),(s&(n.suspendedLanes|l))!==0?0:s}function Se(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;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:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function Pe(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function ve(n){if(typeof Ef=="function"&&Th(n),ll&&typeof ll.setStrictMode=="function")try{ll.setStrictMode(_s,n)}catch{}}function be(n,l){return n===l&&(n!==0||1/n===1/l)||n!==n&&l!==l}function ue(n){if(ko===void 0)try{throw Error()}catch(s){var l=s.stack.trim().match(/\n( *(at )?)/);ko=l&&l[1]||"",ga=-1<s.stack.indexOf(`
34
+ at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
35
+ `+ko+n+ga}function q(n,l){if(!n||mr)return"";mr=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(l){var $=function(){throw Error()};if(Object.defineProperty($.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct($,[])}catch(Be){var oe=Be}Reflect.construct(n,[],$)}else{try{$.call()}catch(Be){oe=Be}n.call($.prototype)}}else{try{throw Error()}catch(Be){oe=Be}($=n())&&typeof $.catch=="function"&&$.catch(function(){})}}catch(Be){if(Be&&oe&&typeof Be.stack=="string")return[Be.stack,oe.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var p=o.DetermineComponentFrameRoot(),y=p[0],O=p[1];if(y&&O){var F=y.split(`
36
+ `),P=O.split(`
37
+ `);for(h=o=0;o<F.length&&!F[o].includes("DetermineComponentFrameRoot");)o++;for(;h<P.length&&!P[h].includes("DetermineComponentFrameRoot");)h++;if(o===F.length||h===P.length)for(o=F.length-1,h=P.length-1;1<=o&&0<=h&&F[o]!==P[h];)h--;for(;1<=o&&0<=h;o--,h--)if(F[o]!==P[h]){if(o!==1||h!==1)do if(o--,h--,0>h||F[o]!==P[h]){var ae=`
38
+ `+F[o].replace(" at new "," at ");return n.displayName&&ae.includes("<anonymous>")&&(ae=ae.replace("<anonymous>",n.displayName)),ae}while(1<=o&&0<=h);break}}}finally{mr=!1,Error.prepareStackTrace=s}return(s=n?n.displayName||n.name:"")?ue(s):""}function W(n,l){switch(n.tag){case 26:case 27:case 5:return ue(n.type);case 16:return ue("Lazy");case 13:return n.child!==l&&l!==null?ue("Suspense Fallback"):ue("Suspense");case 19:return ue("SuspenseList");case 0:case 15:return q(n.type,!1);case 11:return q(n.type.render,!1);case 1:return q(n.type,!0);case 31:return ue("Activity");default:return""}}function me(n){try{var l="",s=null;do l+=W(n,s),s=n,n=n.return;while(n);return l}catch(o){return`
39
+ Error generating stack: `+o.message+`
40
+ `+o.stack}}function Te(n,l){if(typeof n=="object"&&n!==null){var s=Tf.get(n);return s!==void 0?s:(l={value:n,source:l,stack:me(l)},Tf.set(n,l),l)}return{value:n,source:l,stack:me(l)}}function De(n,l){Qa[ya++]=pr,Qa[ya++]=vt,vt=n,pr=l}function Me(n,l,s){wl[gl++]=Tn,wl[gl++]=Kl,wl[gl++]=Hl,Hl=n;var o=Tn;n=Kl;var h=32-nl(o)-1;o&=~(1<<h),s+=1;var p=32-nl(l)+h;if(30<p){var y=h-h%5;p=(o&(1<<y)-1).toString(32),o>>=y,h-=y,Tn=1<<32-nl(l)+h|s<<h|o,Kl=p+n}else Tn=1<<p|s<<h|o,Kl=n}function ye(n){n.return!==null&&(De(n,1),Me(n,1,0))}function _e(n){for(;n===vt;)vt=Qa[--ya],Qa[ya]=null,pr=Qa[--ya],Qa[ya]=null;for(;n===Hl;)Hl=wl[--gl],wl[gl]=null,Kl=wl[--gl],wl[gl]=null,Tn=wl[--gl],wl[gl]=null}function fe(n,l){wl[gl++]=Tn,wl[gl++]=Kl,wl[gl++]=Hl,Tn=l.id,Kl=l.overflow,Hl=n}function jt(n,l){K(zn,l),K(Xa,n),K(gn,null),n=Hd(l),N(gn),K(gn,n)}function ln(){N(gn),N(Xa),N(zn)}function li(n){n.memoizedState!==null&&K(vr,n);var l=gn.current,s=ou(l,n.type);l!==s&&(K(Xa,n),K(gn,s))}function In(n){Xa.current===n&&(N(gn),N(Xa)),vr.current===n&&(N(vr),qt?ps._currentValue=ms:ps._currentValue2=ms)}function bn(n){var l=Error(v(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Tl(Te(l,n)),jo}function fn(n,l){if(!xt)throw Error(v(175));rh(n.stateNode,n.type,n.memoizedProps,l,n)||bn(n,!0)}function at(n){for(rn=n.return;rn;)switch(rn.tag){case 5:case 31:case 13:Yn=!1;return;case 27:case 3:Yn=!0;return;default:rn=rn.return}}function Mn(n){if(!xt||n!==rn)return!1;if(!Qe)return at(n),Qe=!0,!1;var l=n.tag;if(un?l!==3&&l!==27&&(l!==5||du(n.type)&&!Fn(n.type,n.memoizedProps))&&Mt&&bn(n):l!==3&&(l!==5||du(n.type)&&!Fn(n.type,n.memoizedProps))&&Mt&&bn(n),at(n),l===13){if(!xt)throw Error(v(316));if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(v(317));Mt=ff(n)}else if(l===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(v(317));Mt=ch(n)}else Mt=un&&l===27?eh(n.type,Mt):rn?Wd(n.stateNode):null;return!0}function dn(){xt&&(Mt=rn=null,Qe=!1)}function Ln(){var n=_a;return n!==null&&(sl===null?sl=n:sl.push.apply(sl,n),_a=null),n}function Tl(n){_a===null?_a=[n]:_a.push(n)}function zl(n,l,s){qt?(K(Ll,l._currentValue),l._currentValue=s):(K(Ll,l._currentValue2),l._currentValue2=s)}function Sn(n){var l=Ll.current;qt?n._currentValue=l:n._currentValue2=l,N(Ll)}function qi(n,l,s){for(;n!==null;){var o=n.alternate;if((n.childLanes&l)!==l?(n.childLanes|=l,o!==null&&(o.childLanes|=l)):o!==null&&(o.childLanes&l)!==l&&(o.childLanes|=l),n===s)break;n=n.return}}function Ca(n,l,s,o){var h=n.child;for(h!==null&&(h.return=n);h!==null;){var p=h.dependencies;if(p!==null){var y=h.child;p=p.firstContext;e:for(;p!==null;){var O=p;p=h;for(var F=0;F<l.length;F++)if(O.context===l[F]){p.lanes|=s,O=p.alternate,O!==null&&(O.lanes|=s),qi(p.return,s,n),o||(y=null);break e}p=O.next}}else if(h.tag===18){if(y=h.return,y===null)throw Error(v(341));y.lanes|=s,p=y.alternate,p!==null&&(p.lanes|=s),qi(y,s,n),y=null}else y=h.child;if(y!==null)y.return=h;else for(y=h;y!==null;){if(y===n){y=null;break}if(h=y.sibling,h!==null){h.return=y.return,y=h;break}y=y.return}h=y}}function Ql(n,l,s,o){n=null;for(var h=l,p=!1;h!==null;){if(!p){if((h.flags&524288)!==0)p=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var y=h.alternate;if(y===null)throw Error(v(387));if(y=y.memoizedProps,y!==null){var O=h.type;Qt(h.pendingProps.value,y.value)||(n!==null?n.push(O):n=[O])}}else if(h===vr.current){if(y=h.alternate,y===null)throw Error(v(387));y.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(n!==null?n.push(ps):n=[ps])}h=h.return}n!==null&&Ca(l,n,s,o),l.flags|=262144}function ai(n){for(n=n.firstContext;n!==null;){var l=n.context;if(!Qt(qt?l._currentValue:l._currentValue2,n.memoizedValue))return!0;n=n.next}return!1}function Ua(n){bt=n,Pl=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function an(n){return Ur(bt,n)}function hn(n,l){return bt===null&&Ua(n),Ur(n,l)}function Ur(n,l){var s=qt?l._currentValue:l._currentValue2;if(l={context:l,memoizedValue:s,next:null},Pl===null){if(n===null)throw Error(v(308));Pl=l,n.dependencies={lanes:0,firstContext:l},n.flags|=524288}else Pl=Pl.next=l;return s}function Us(){return{controller:new zh,data:new Map,refCount:0}}function Kn(n){n.refCount--,n.refCount===0&&yn(bm,function(){n.controller.abort()})}function Zi(){}function ea(n){n!==dt&&n.next===null&&(dt===null?gr=dt=n:dt=dt.next=n),kl=!0,Nn||(Nn=!0,ol())}function Qi(n,l){if(!Go&&kl){Go=!0;do for(var s=!1,o=gr;o!==null;){if(n!==0){var h=o.pendingLanes;if(h===0)var p=0;else{var y=o.suspendedLanes,O=o.pingedLanes;p=(1<<31-nl(42|n)+1)-1,p&=h&~(y&~O),p=p&201326741?p&201326741|1:p?p|2:0}p!==0&&(s=!0,Aa(o,p))}else p=Xe,p=U(o,o===Ge?p:0,o.cancelPendingCommit!==null||o.timeoutHandle!==tl),(p&3)===0||B(o,p)||(s=!0,Aa(o,p));o=o.next}while(s);Go=!1}}function Wf(){ed()}function ed(){kl=Nn=!1;var n=0;Ui!==0&&hs()&&(n=Ui);for(var l=Rn(),s=null,o=gr;o!==null;){var h=o.next,p=As(o,l);p===0?(o.next=null,s===null?gr=h:s.next=h,h===null&&(dt=s)):(s=o,(n!==0||(p&3)!==0)&&(kl=!0)),o=h}nn!==0&&nn!==5||Qi(n),Ui!==0&&(Ui=0)}function As(n,l){for(var s=n.suspendedLanes,o=n.pingedLanes,h=n.expirationTimes,p=n.pendingLanes&-62914561;0<p;){var y=31-nl(p),O=1<<y,F=h[y];F===-1?((O&s)===0||(O&o)!==0)&&(h[y]=Z(O,l)):F<=l&&(n.expiredLanes|=O),p&=~O}if(l=Ge,s=Xe,s=U(n,n===l?s:0,n.cancelPendingCommit!==null||n.timeoutHandle!==tl),o=n.callbackNode,s===0||n===l&&(mt===2||mt===9)||n.cancelPendingCommit!==null)return o!==null&&o!==null&&Bo(o),n.callbackNode=null,n.callbackPriority=0;if((s&3)===0||B(n,s)){if(l=s&-s,l===n.callbackPriority)return l;switch(o!==null&&Bo(o),Pe(s)){case 2:case 8:s=Eh;break;case 32:s=hr;break;case 268435456:s=Ho;break;default:s=hr}return o=Pn.bind(null,n),s=dr(s,o),n.callbackPriority=l,n.callbackNode=s,l}return o!==null&&o!==null&&Bo(o),n.callbackPriority=2,n.callbackNode=null,2}function Pn(n,l){if(nn!==0&&nn!==5)return n.callbackNode=null,n.callbackPriority=0,null;var s=n.callbackNode;if(ma()&&n.callbackNode!==s)return null;var o=Xe;return o=U(n,n===Ge?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==tl),o===0?null:(Il(n,o,l),As(n,Rn()),n.callbackNode!=null&&n.callbackNode===s?Pn.bind(null,n):null)}function Aa(n,l){if(ma())return null;Il(n,l,!0)}function ol(){Ic?Kc(function(){(Ye&6)!==0?dr(wo,Wf):ed()}):dr(wo,Wf)}function sc(){if(Ui===0){var n=Ia;n===0&&(n=No,No<<=1,(No&261888)===0&&(No=256)),Ui=n}return Ui}function rm(n,l){if(mu===null){var s=mu=[];zf=0,Ia=sc(),on={status:"pending",value:void 0,then:function(o){s.push(o)}}}return zf++,l.then(td,td),l}function td(){if(--zf===0&&mu!==null){on!==null&&(on.status="fulfilled");var n=mu;mu=null,Ia=0,on=null;for(var l=0;l<n.length;l++)(0,n[l])()}}function Ar(n,l){var s=[],o={status:"pending",value:null,reason:null,then:function(h){s.push(h)}};return n.then(function(){o.status="fulfilled",o.value=l;for(var h=0;h<s.length;h++)(0,s[h])(l)},function(h){for(o.status="rejected",o.reason=h,h=0;h<s.length;h++)(0,s[h])(void 0)}),o}function Ds(){var n=Ai.current;return n!==null?n:Ge.pooledCache}function Xi(n,l){l===null?K(Ai,Ai.current):K(Ai,l.pool)}function ii(){var n=Ds();return n===null?null:{parent:qt?Ct._currentValue:Ct._currentValue2,pool:n}}function Ii(n,l){if(Qt(n,l))return!0;if(typeof n!="object"||n===null||typeof l!="object"||l===null)return!1;var s=Object.keys(n),o=Object.keys(l);if(s.length!==o.length)return!1;for(o=0;o<s.length;o++){var h=s[o];if(!_m.call(l,h)||!Qt(n[h],l[h]))return!1}return!0}function Rs(n){return n=n.status,n==="fulfilled"||n==="rejected"}function nd(n,l,s){switch(s=n[s],s===void 0?n.push(l):s!==l&&(l.then(Zi,Zi),l=s),l.status){case"fulfilled":return l.value;case"rejected":throw n=l.reason,Ns(n),n;default:if(typeof l.status=="string")l.then(Zi,Zi);else{if(n=Ge,n!==null&&100<n.shellSuspendCounter)throw Error(v(482));n=l,n.status="pending",n.then(function(o){if(l.status==="pending"){var h=l;h.status="fulfilled",h.value=o}},function(o){if(l.status==="pending"){var h=l;h.status="rejected",h.reason=o}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw n=l.reason,Ns(n),n}throw qn=l,cn}}function si(n){try{var l=n._init;return l(n._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(qn=s,cn):s}}function Dr(){if(qn===null)throw Error(v(459));var n=qn;return qn=null,n}function Ns(n){if(n===cn||n===Gl)throw Error(v(483))}function Rr(n){var l=bs;return bs+=1,Di===null&&(Di=[]),nd(Di,n,l)}function Bs(n,l){l=l.props.ref,n.ref=l!==void 0?l:null}function Bu(n,l){throw l.$$typeof===rs?Error(v(525)):(n=Object.prototype.toString.call(l),Error(v(31,n==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":n)))}function uc(n){function l(L,D){if(n){var G=L.deletions;G===null?(L.deletions=[D],L.flags|=16):G.push(D)}}function s(L,D){if(!n)return null;for(;D!==null;)l(L,D),D=D.sibling;return null}function o(L){for(var D=new Map;L!==null;)L.key!==null?D.set(L.key,L):D.set(L.index,L),L=L.sibling;return D}function h(L,D){return L=pl(L,D),L.index=0,L.sibling=null,L}function p(L,D,G){return L.index=G,n?(G=L.alternate,G!==null?(G=G.index,G<D?(L.flags|=67108866,D):G):(L.flags|=67108866,D)):(L.flags|=1048576,D)}function y(L){return n&&L.alternate===null&&(L.flags|=67108866),L}function O(L,D,G,te){return D===null||D.tag!==6?(D=Lc(G,L.mode,te),D.return=L,D):(D=h(D,G),D.return=L,D)}function F(L,D,G,te){var xe=G.type;return xe===cs?ae(L,D,G.props.children,te,G.key):D!==null&&(D.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===Vn&&si(xe)===D.type)?(D=h(D,G.props),Bs(D,G),D.return=L,D):(D=Va(G.type,G.key,G.props,null,L.mode,te),Bs(D,G),D.return=L,D)}function P(L,D,G,te){return D===null||D.tag!==4||D.stateNode.containerInfo!==G.containerInfo||D.stateNode.implementation!==G.implementation?(D=jc(G,L.mode,te),D.return=L,D):(D=h(D,G.children||[]),D.return=L,D)}function ae(L,D,G,te,xe){return D===null||D.tag!==7?(D=Dl(G,L.mode,te,xe),D.return=L,D):(D=h(D,G),D.return=L,D)}function $(L,D,G){if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return D=Lc(""+D,L.mode,G),D.return=L,D;if(typeof D=="object"&&D!==null){switch(D.$$typeof){case pa:return G=Va(D.type,D.key,D.props,null,L.mode,G),Bs(G,D),G.return=L,G;case os:return D=jc(D,L.mode,G),D.return=L,D;case Vn:return D=si(D),$(L,D,G)}if(Oi(D)||R(D))return D=Dl(D,L.mode,G,null),D.return=L,D;if(typeof D.then=="function")return $(L,Rr(D),G);if(D.$$typeof===Rl)return $(L,hn(L,D),G);Bu(L,D)}return null}function oe(L,D,G,te){var xe=D!==null?D.key:null;if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return xe!==null?null:O(L,D,""+G,te);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case pa:return G.key===xe?F(L,D,G,te):null;case os:return G.key===xe?P(L,D,G,te):null;case Vn:return G=si(G),oe(L,D,G,te)}if(Oi(G)||R(G))return xe!==null?null:ae(L,D,G,te,null);if(typeof G.then=="function")return oe(L,D,Rr(G),te);if(G.$$typeof===Rl)return oe(L,D,hn(L,G),te);Bu(L,G)}return null}function Be(L,D,G,te,xe){if(typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint")return L=L.get(G)||null,O(D,L,""+te,xe);if(typeof te=="object"&&te!==null){switch(te.$$typeof){case pa:return L=L.get(te.key===null?G:te.key)||null,F(D,L,te,xe);case os:return L=L.get(te.key===null?G:te.key)||null,P(D,L,te,xe);case Vn:return te=si(te),Be(L,D,G,te,xe)}if(Oi(te)||R(te))return L=L.get(G)||null,ae(D,L,te,xe,null);if(typeof te.then=="function")return Be(L,D,G,Rr(te),xe);if(te.$$typeof===Rl)return Be(L,D,G,hn(D,te),xe);Bu(D,te)}return null}function Kt(L,D,G,te){for(var xe=null,Lt=null,Ce=D,We=D=0,_n=null;Ce!==null&&We<G.length;We++){Ce.index>We?(_n=Ce,Ce=null):_n=Ce.sibling;var lt=oe(L,Ce,G[We],te);if(lt===null){Ce===null&&(Ce=_n);break}n&&Ce&&lt.alternate===null&&l(L,Ce),D=p(lt,D,We),Lt===null?xe=lt:Lt.sibling=lt,Lt=lt,Ce=_n}if(We===G.length)return s(L,Ce),Qe&&De(L,We),xe;if(Ce===null){for(;We<G.length;We++)Ce=$(L,G[We],te),Ce!==null&&(D=p(Ce,D,We),Lt===null?xe=Ce:Lt.sibling=Ce,Lt=Ce);return Qe&&De(L,We),xe}for(Ce=o(Ce);We<G.length;We++)_n=Be(Ce,L,We,G[We],te),_n!==null&&(n&&_n.alternate!==null&&Ce.delete(_n.key===null?We:_n.key),D=p(_n,D,We),Lt===null?xe=_n:Lt.sibling=_n,Lt=_n);return n&&Ce.forEach(function(Yl){return l(L,Yl)}),Qe&&De(L,We),xe}function Eu(L,D,G,te){if(G==null)throw Error(v(151));for(var xe=null,Lt=null,Ce=D,We=D=0,_n=null,lt=G.next();Ce!==null&&!lt.done;We++,lt=G.next()){Ce.index>We?(_n=Ce,Ce=null):_n=Ce.sibling;var Yl=oe(L,Ce,lt.value,te);if(Yl===null){Ce===null&&(Ce=_n);break}n&&Ce&&Yl.alternate===null&&l(L,Ce),D=p(Yl,D,We),Lt===null?xe=Yl:Lt.sibling=Yl,Lt=Yl,Ce=_n}if(lt.done)return s(L,Ce),Qe&&De(L,We),xe;if(Ce===null){for(;!lt.done;We++,lt=G.next())lt=$(L,lt.value,te),lt!==null&&(D=p(lt,D,We),Lt===null?xe=lt:Lt.sibling=lt,Lt=lt);return Qe&&De(L,We),xe}for(Ce=o(Ce);!lt.done;We++,lt=G.next())lt=Be(Ce,L,We,lt.value,te),lt!==null&&(n&&lt.alternate!==null&&Ce.delete(lt.key===null?We:lt.key),D=p(lt,D,We),Lt===null?xe=lt:Lt.sibling=lt,Lt=lt);return n&&Ce.forEach(function(Sm){return l(L,Sm)}),Qe&&De(L,We),xe}function ji(L,D,G,te){if(typeof G=="object"&&G!==null&&G.type===cs&&G.key===null&&(G=G.props.children),typeof G=="object"&&G!==null){switch(G.$$typeof){case pa:e:{for(var xe=G.key;D!==null;){if(D.key===xe){if(xe=G.type,xe===cs){if(D.tag===7){s(L,D.sibling),te=h(D,G.props.children),te.return=L,L=te;break e}}else if(D.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===Vn&&si(xe)===D.type){s(L,D.sibling),te=h(D,G.props),Bs(te,G),te.return=L,L=te;break e}s(L,D);break}else l(L,D);D=D.sibling}G.type===cs?(te=Dl(G.props.children,L.mode,te,G.key),te.return=L,L=te):(te=Va(G.type,G.key,G.props,null,L.mode,te),Bs(te,G),te.return=L,L=te)}return y(L);case os:e:{for(xe=G.key;D!==null;){if(D.key===xe)if(D.tag===4&&D.stateNode.containerInfo===G.containerInfo&&D.stateNode.implementation===G.implementation){s(L,D.sibling),te=h(D,G.children||[]),te.return=L,L=te;break e}else{s(L,D);break}else l(L,D);D=D.sibling}te=jc(G,L.mode,te),te.return=L,L=te}return y(L);case Vn:return G=si(G),ji(L,D,G,te)}if(Oi(G))return Kt(L,D,G,te);if(R(G)){if(xe=R(G),typeof xe!="function")throw Error(v(150));return G=xe.call(G),Eu(L,D,G,te)}if(typeof G.then=="function")return ji(L,D,Rr(G),te);if(G.$$typeof===Rl)return ji(L,D,hn(L,G),te);Bu(L,G)}return typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint"?(G=""+G,D!==null&&D.tag===6?(s(L,D.sibling),te=h(D,G),te.return=L,L=te):(s(L,D),te=Lc(G,L.mode,te),te.return=L,L=te),y(L)):s(L,D)}return function(L,D,G,te){try{bs=0;var xe=ji(L,D,G,te);return Di=null,xe}catch(Ce){if(Ce===cn||Ce===Gl)throw Ce;var Lt=d(29,Ce,null,L.mode);return Lt.lanes=te,Lt.return=L,Lt}finally{}}}function ws(){for(var n=Sa,l=Ss=Sa=0;l<n;){var s=xn[l];xn[l++]=null;var o=xn[l];xn[l++]=null;var h=xn[l];xn[l++]=null;var p=xn[l];if(xn[l++]=null,o!==null&&h!==null){var y=o.pending;y===null?h.next=h:(h.next=y.next,y.next=h),o.pending=h}p!==0&&Da(s,h,p)}}function Hs(n,l,s,o){xn[Sa++]=n,xn[Sa++]=l,xn[Sa++]=s,xn[Sa++]=o,Ss|=o,n.lanes|=o,n=n.alternate,n!==null&&(n.lanes|=o)}function Nr(n,l,s,o){return Hs(n,l,s,o),$t(n)}function ui(n,l){return Hs(n,null,null,l),$t(n)}function Da(n,l,s){n.lanes|=s;var o=n.alternate;o!==null&&(o.lanes|=s);for(var h=!1,p=n.return;p!==null;)p.childLanes|=s,o=p.alternate,o!==null&&(o.childLanes|=s),p.tag===22&&(n=p.stateNode,n===null||n._visibility&1||(h=!0)),n=p,p=p.return;return n.tag===3?(p=n.stateNode,h&&l!==null&&(h=31-nl(s),n=p.hiddenUpdates,o=n[h],o===null?n[h]=[l]:o.push(l),l.lane=s|536870912),p):null}function $t(n){if(50<nt)throw nt=0,Tr=null,Error(v(185));for(var l=n.return;l!==null;)n=l,l=n.return;return n.tag===3?n.stateNode:null}function Cn(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ri(n,l){n=n.updateQueue,l.updateQueue===n&&(l.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function ta(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function oi(n,l,s){var o=n.updateQueue;if(o===null)return null;if(o=o.shared,(Ye&2)!==0){var h=o.pending;return h===null?l.next=l:(l.next=h.next,h.next=l),o.pending=l,l=$t(n),Da(n,null,s),l}return Hs(n,o,l,s),$t(n)}function wu(n,l,s){if(l=l.updateQueue,l!==null&&(l=l.shared,(s&4194048)!==0)){var o=l.lanes;o&=n.pendingLanes,s|=o,l.lanes=s,se(n,s)}}function Br(n,l){var s=n.updateQueue,o=n.alternate;if(o!==null&&(o=o.updateQueue,s===o)){var h=null,p=null;if(s=s.firstBaseUpdate,s!==null){do{var y={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};p===null?h=p=y:p=p.next=y,s=s.next}while(s!==null);p===null?h=p=l:p=p.next=l}else h=p=l;s={baseState:o.baseState,firstBaseUpdate:h,lastBaseUpdate:p,shared:o.shared,callbacks:o.callbacks},n.updateQueue=s;return}n=s.lastBaseUpdate,n===null?s.firstBaseUpdate=l:n.next=l,s.lastBaseUpdate=l}function Ra(){if(Fo){var n=on;if(n!==null)throw n}}function Ki(n,l,s,o){Fo=!1;var h=n.updateQueue;yl=!1;var p=h.firstBaseUpdate,y=h.lastBaseUpdate,O=h.shared.pending;if(O!==null){h.shared.pending=null;var F=O,P=F.next;F.next=null,y===null?p=P:y.next=P,y=F;var ae=n.alternate;ae!==null&&(ae=ae.updateQueue,O=ae.lastBaseUpdate,O!==y&&(O===null?ae.firstBaseUpdate=P:O.next=P,ae.lastBaseUpdate=F))}if(p!==null){var $=h.baseState;y=0,ae=P=F=null,O=p;do{var oe=O.lane&-536870913,Be=oe!==O.lane;if(Be?(Xe&oe)===oe:(o&oe)===oe){oe!==0&&oe===Ia&&(Fo=!0),ae!==null&&(ae=ae.next={lane:0,tag:O.tag,payload:O.payload,callback:null,next:null});e:{var Kt=n,Eu=O;oe=l;var ji=s;switch(Eu.tag){case 1:if(Kt=Eu.payload,typeof Kt=="function"){$=Kt.call(ji,$,oe);break e}$=Kt;break e;case 3:Kt.flags=Kt.flags&-65537|128;case 0:if(Kt=Eu.payload,oe=typeof Kt=="function"?Kt.call(ji,$,oe):Kt,oe==null)break e;$=vo({},$,oe);break e;case 2:yl=!0}}oe=O.callback,oe!==null&&(n.flags|=64,Be&&(n.flags|=8192),Be=h.callbacks,Be===null?h.callbacks=[oe]:Be.push(oe))}else Be={lane:oe,tag:O.tag,payload:O.payload,callback:O.callback,next:null},ae===null?(P=ae=Be,F=$):ae=ae.next=Be,y|=oe;if(O=O.next,O===null){if(O=h.shared.pending,O===null)break;Be=O,O=Be.next,Be.next=null,h.lastBaseUpdate=Be,h.shared.pending=null}}while(!0);ae===null&&(F=$),h.baseState=F,h.firstBaseUpdate=P,h.lastBaseUpdate=ae,p===null&&(h.shared.lanes=0),Pa|=y,n.lanes=y,n.memoizedState=$}}function Pi(n,l){if(typeof n!="function")throw Error(v(191,n));n.call(l)}function $i(n,l){var s=n.callbacks;if(s!==null)for(n.callbacks=null,n=0;n<s.length;n++)Pi(s[n],l)}function Ls(n,l){n=Ta,K(Ri,n),K(Es,l),Ta=n|l.baseLanes}function ci(){K(Ri,Ta),K(Es,Es.current)}function Jt(){Ta=Ri.current,N(Es),N(Ri)}function Na(n){var l=n.alternate;K(Vt,Vt.current&1),K(al,n),il===null&&(l===null||Es.current!==null||l.memoizedState!==null)&&(il=n)}function wr(n){K(Vt,Vt.current),K(al,n),il===null&&(il=n)}function fi(n){n.tag===22?(K(Vt,Vt.current),K(al,n),il===null&&(il=n)):cl()}function cl(){K(Vt,Vt.current),K(al,al.current)}function fl(n){N(al),il===n&&(il=null),N(Vt)}function Hu(n){for(var l=n;l!==null;){if(l.tag===13){var s=l.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||Mi(s)||zo(s)))return l}else if(l.tag===19&&(l.memoizedProps.revealOrder==="forwards"||l.memoizedProps.revealOrder==="backwards"||l.memoizedProps.revealOrder==="unstable_legacy-backwards"||l.memoizedProps.revealOrder==="together")){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===n)break;for(;l.sibling===null;){if(l.return===null||l.return===n)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}function At(){throw Error(v(321))}function rc(n,l){if(l===null)return!1;for(var s=0;s<l.length&&s<n.length;s++)if(!Qt(n[s],l[s]))return!1;return!0}function ks(n,l,s,o,h,p){return Ka=p,He=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,ze.H=n===null||n.memoizedState===null?Bt:Ea,$e=!1,p=s(o,h),$e=!1,Le&&(p=na(l,s,o,h)),Lu(n),p}function Lu(n){ze.H=_l;var l=ge!==null&&ge.next!==null;if(Ka=0,Re=ge=He=null,je=!1,Vl=0,$l=null,l)throw Error(v(300));n===null||Tt||(n=n.dependencies,n!==null&&ai(n)&&(Tt=!0))}function na(n,l,s,o){He=n;var h=0;do{if(Le&&($l=null),Vl=0,Le=!1,25<=h)throw Error(v(301));if(h+=1,Re=ge=null,n.updateQueue!=null){var p=n.updateQueue;p.lastEffect=null,p.events=null,p.stores=null,p.memoCache!=null&&(p.memoCache.index=0)}ze.H=Ni,p=l(s,o)}while(Le);return p}function Ol(){var n=ze.H,l=n.useState()[0];return l=typeof l.then=="function"?An(l):l,n=n.useState()[0],(ge!==null?ge.memoizedState:null)!==n&&(He.flags|=1024),l}function Hr(){var n=Bn!==0;return Bn=0,n}function oc(n,l,s){l.updateQueue=n.updateQueue,l.flags&=-2053,n.lanes&=~s}function ku(n){if(je){for(n=n.memoizedState;n!==null;){var l=n.queue;l!==null&&(l.pending=null),n=n.next}je=!1}Ka=0,Re=ge=He=null,Le=!1,Vl=Bn=0,$l=null}function Un(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Re===null?He.memoizedState=Re=n:Re=Re.next=n,Re}function zt(){if(ge===null){var n=He.alternate;n=n!==null?n.memoizedState:null}else n=ge.next;var l=Re===null?He.memoizedState:Re.next;if(l!==null)Re=l,ge=n;else{if(n===null)throw He.alternate===null?Error(v(467)):Error(v(310));ge=n,n={memoizedState:ge.memoizedState,baseState:ge.baseState,baseQueue:ge.baseQueue,queue:ge.queue,next:null},Re===null?He.memoizedState=Re=n:Re=Re.next=n}return Re}function Lr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function An(n){var l=Vl;return Vl+=1,$l===null&&($l=[]),n=nd($l,n,l),l=He,(Re===null?l.memoizedState:Re.next)===null&&(l=l.alternate,ze.H=l===null||l.memoizedState===null?Bt:Ea),n}function js(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return An(n);if(n.$$typeof===Rl)return an(n)}throw Error(v(438,String(n)))}function kr(n){var l=null,s=He.updateQueue;if(s!==null&&(l=s.memoCache),l==null){var o=He.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(l={data:o.data.map(function(h){return h.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),s===null&&(s=Lr(),He.updateQueue=s),s.memoCache=l,s=l.data[l.index],s===void 0)for(s=l.data[l.index]=Array(n),o=0;o<n;o++)s[o]=Vc;return l.index++,s}function Xl(n,l){return typeof l=="function"?l(n):l}function Ba(n){var l=zt();return jr(l,ge,n)}function jr(n,l,s){var o=n.queue;if(o===null)throw Error(v(311));o.lastRenderedReducer=s;var h=n.baseQueue,p=o.pending;if(p!==null){if(h!==null){var y=h.next;h.next=p.next,p.next=y}l.baseQueue=h=p,o.pending=null}if(p=n.baseState,h===null)n.memoizedState=p;else{l=h.next;var O=y=null,F=null,P=l,ae=!1;do{var $=P.lane&-536870913;if($!==P.lane?(Xe&$)===$:(Ka&$)===$){var oe=P.revertLane;if(oe===0)F!==null&&(F=F.next={lane:0,revertLane:0,gesture:null,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null}),$===Ia&&(ae=!0);else if((Ka&oe)===oe){P=P.next,oe===Ia&&(ae=!0);continue}else $={lane:0,revertLane:P.revertLane,gesture:null,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null},F===null?(O=F=$,y=p):F=F.next=$,He.lanes|=oe,Pa|=oe;$=P.action,$e&&s(p,$),p=P.hasEagerState?P.eagerState:s(p,$)}else oe={lane:$,revertLane:P.revertLane,gesture:P.gesture,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null},F===null?(O=F=oe,y=p):F=F.next=oe,He.lanes|=$,Pa|=$;P=P.next}while(P!==null&&P!==l);if(F===null?y=p:F.next=O,!Qt(p,n.memoizedState)&&(Tt=!0,ae&&(s=on,s!==null)))throw s;n.memoizedState=p,n.baseState=y,n.baseQueue=F,o.lastRenderedState=p}return h===null&&(o.lanes=0),[n.memoizedState,o.dispatch]}function Gr(n){var l=zt(),s=l.queue;if(s===null)throw Error(v(311));s.lastRenderedReducer=n;var o=s.dispatch,h=s.pending,p=l.memoizedState;if(h!==null){s.pending=null;var y=h=h.next;do p=n(p,y.action),y=y.next;while(y!==h);Qt(p,l.memoizedState)||(Tt=!0),l.memoizedState=p,l.baseQueue===null&&(l.baseState=p),s.lastRenderedState=p}return[p,o]}function Ji(n,l,s){var o=He,h=zt(),p=Qe;if(p){if(s===void 0)throw Error(v(407));s=s()}else s=l();var y=!Qt((ge||h).memoizedState,s);if(y&&(h.memoizedState=s,Tt=!0),h=h.queue,Fs(fc.bind(null,o,h,n),[n]),h.getSnapshot!==l||y||Re!==null&&Re.memoizedState.tag&1){if(o.flags|=2048,dl(9,{destroy:void 0},cc.bind(null,o,h,s,l),null),Ge===null)throw Error(v(349));p||(Ka&127)!==0||ld(o,l,s)}return s}function ld(n,l,s){n.flags|=16384,n={getSnapshot:l,value:s},l=He.updateQueue,l===null?(l=Lr(),He.updateQueue=l,l.stores=[n]):(s=l.stores,s===null?l.stores=[n]:s.push(n))}function cc(n,l,s,o){l.value=s,l.getSnapshot=o,Vr(l)&&ad(n)}function fc(n,l,s){return s(function(){Vr(l)&&ad(n)})}function Vr(n){var l=n.getSnapshot;n=n.value;try{var s=l();return!Qt(n,s)}catch{return!0}}function ad(n){var l=ui(n,2);l!==null&&Rt(l,n,2)}function dc(n){var l=Un();if(typeof n=="function"){var s=n;if(n=s(),$e){ve(!0);try{s()}finally{ve(!1)}}}return l.memoizedState=l.baseState=n,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xl,lastRenderedState:n},l}function ju(n,l,s,o){return n.baseState=s,jr(n,ge,typeof o=="function"?o:Xl)}function wa(n,l,s,o,h){if(Kr(n))throw Error(v(485));if(n=l.action,n!==null){var p={payload:h,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){p.listeners.push(y)}};ze.T!==null?s(!0):p.isTransition=!1,o(p),s=l.pending,s===null?(p.next=l.pending=p,Fr(l,p)):(p.next=s.next,l.pending=s.next=p)}}function Fr(n,l){var s=l.action,o=l.payload,h=n.state;if(l.isTransition){var p=ze.T,y={};ze.T=y;try{var O=s(h,o),F=ze.S;F!==null&&F(y,O),Yr(n,l,O)}catch(P){di(n,l,P)}finally{p!==null&&y.types!==null&&(p.types=y.types),ze.T=p}}else try{p=s(h,o),Yr(n,l,p)}catch(P){di(n,l,P)}}function Yr(n,l,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(o){Wi(n,l,o)},function(o){return di(n,l,o)}):Wi(n,l,s)}function Wi(n,l,s){l.status="fulfilled",l.value=s,hc(l),n.state=s,l=n.pending,l!==null&&(s=l.next,s===l?n.pending=null:(s=s.next,l.next=s,Fr(n,s)))}function di(n,l,s){var o=n.pending;if(n.pending=null,o!==null){o=o.next;do l.status="rejected",l.reason=s,hc(l),l=l.next;while(l!==o)}n.action=null}function hc(n){n=n.listeners;for(var l=0;l<n.length;l++)(0,n[l])()}function qr(n,l){return l}function mc(n,l){if(Qe){var s=Ge.formState;if(s!==null){e:{var o=He;if(Qe){if(Mt){var h=Jd(Mt,Yn);if(h){Mt=Wd(h),o=uf(h);break e}}bn(o)}o=!1}o&&(l=s[0])}}s=Un(),s.memoizedState=s.baseState=l,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:qr,lastRenderedState:l},s.queue=o,s=cd.bind(null,He,o),o.dispatch=s,o=dc(!1);var p=Ir.bind(null,He,!1,o.queue);return o=Un(),h={state:l,dispatch:null,action:n,pending:null},o.queue=h,s=wa.bind(null,He,h,p,s),h.dispatch=s,o.memoizedState=n,[l,s,!1]}function Gs(n){var l=zt();return la(l,ge,n)}function la(n,l,s){if(l=jr(n,l,qr)[0],n=Ba(Xl)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var o=An(l)}catch(y){throw y===cn?Gl:y}else o=l;l=zt();var h=l.queue,p=h.dispatch;return s!==l.memoizedState&&(He.flags|=2048,dl(9,{destroy:void 0},pc.bind(null,h,s),null)),[o,p,n]}function pc(n,l){n.action=l}function Vs(n){var l=zt(),s=ge;if(s!==null)return la(l,s,n);zt(),l=l.memoizedState,s=zt();var o=s.queue.dispatch;return s.memoizedState=n,[l,o,!1]}function dl(n,l,s,o){return n={tag:n,create:s,deps:o,inst:l,next:null},l=He.updateQueue,l===null&&(l=Lr(),He.updateQueue=l),s=l.lastEffect,s===null?l.lastEffect=n.next=n:(o=s.next,s.next=n,n.next=o,l.lastEffect=n),n}function Zr(){return zt().memoizedState}function es(n,l,s,o){var h=Un();He.flags|=n,h.memoizedState=dl(1|l,{destroy:void 0},s,o===void 0?null:o)}function Gu(n,l,s,o){var h=zt();o=o===void 0?null:o;var p=h.memoizedState.inst;ge!==null&&o!==null&&rc(o,ge.memoizedState.deps)?h.memoizedState=dl(l,p,s,o):(He.flags|=n,h.memoizedState=dl(1|l,p,s,o))}function Vu(n,l){es(8390656,8,n,l)}function Fs(n,l){Gu(2048,8,n,l)}function id(n){He.flags|=4;var l=He.updateQueue;if(l===null)l=Lr(),He.updateQueue=l,l.events=[n];else{var s=l.events;s===null?l.events=[n]:s.push(n)}}function kn(n){var l=zt().memoizedState;return id({ref:l,nextImpl:n}),function(){if((Ye&2)!==0)throw Error(v(440));return l.impl.apply(void 0,arguments)}}function hi(n,l){return Gu(4,2,n,l)}function Fu(n,l){return Gu(4,4,n,l)}function Ys(n,l){if(typeof l=="function"){n=n();var s=l(n);return function(){typeof s=="function"?s():l(null)}}if(l!=null)return n=n(),l.current=n,function(){l.current=null}}function sd(n,l,s){s=s!=null?s.concat([n]):null,Gu(4,4,Ys.bind(null,l,n),s)}function Yu(){}function Qr(n,l){var s=zt();l=l===void 0?null:l;var o=s.memoizedState;return l!==null&&rc(l,o[1])?o[0]:(s.memoizedState=[n,l],n)}function qs(n,l){var s=zt();l=l===void 0?null:l;var o=s.memoizedState;if(l!==null&&rc(l,o[1]))return o[0];if(o=n(),$e){ve(!0);try{n()}finally{ve(!1)}}return s.memoizedState=[o,l],o}function Zs(n,l,s){return s===void 0||(Ka&1073741824)!==0&&(Xe&261930)===0?n.memoizedState=l:(n.memoizedState=s,n=ka(),He.lanes|=n,Pa|=n,s)}function vc(n,l,s,o){return Qt(s,l)?s:Es.current!==null?(n=Zs(n,s,o),Qt(n,l)||(Tt=!0),n):(Ka&42)===0||(Ka&1073741824)!==0&&(Xe&261930)===0?(Tt=!0,n.memoizedState=s):(n=ka(),He.lanes|=n,Pa|=n,l)}function ud(n,l,s,o,h){var p=Nl();Ze(p!==0&&8>p?p:8);var y=ze.T,O={};ze.T=O,Ir(n,!1,l,s);try{var F=h(),P=ze.S;if(P!==null&&P(O,F),F!==null&&typeof F=="object"&&typeof F.then=="function"){var ae=Ar(F,o);qu(n,l,ae,Ot(n))}else qu(n,l,o,Ot(n))}catch($){qu(n,l,{then:function(){},status:"rejected",reason:$},Ot())}finally{Ze(p),y!==null&&O.types!==null&&(y.types=O.types),ze.T=y}}function rd(n){var l=n.memoizedState;if(l!==null)return l;l={memoizedState:ms,baseState:ms,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xl,lastRenderedState:ms},next:null};var s={};return l.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xl,lastRenderedState:s},next:null},n.memoizedState=l,n=n.alternate,n!==null&&(n.memoizedState=l),l}function gc(){return an(ps)}function Xr(){return zt().memoizedState}function od(){return zt().memoizedState}function om(n){for(var l=n.return;l!==null;){switch(l.tag){case 24:case 3:var s=Ot();n=ta(s);var o=oi(l,n,s);o!==null&&(Rt(o,l,s),wu(o,l,s)),l={cache:Us()},n.payload=l;return}l=l.return}}function cm(n,l,s){var o=Ot();s={lane:o,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Kr(n)?fd(l,s):(s=Nr(n,l,s,o),s!==null&&(Rt(s,n,o),dd(s,l,o)))}function cd(n,l,s){var o=Ot();qu(n,l,s,o)}function qu(n,l,s,o){var h={lane:o,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(Kr(n))fd(l,h);else{var p=n.alternate;if(n.lanes===0&&(p===null||p.lanes===0)&&(p=l.lastRenderedReducer,p!==null))try{var y=l.lastRenderedState,O=p(y,s);if(h.hasEagerState=!0,h.eagerState=O,Qt(O,y))return Hs(n,l,h,0),Ge===null&&ws(),!1}catch{}finally{}if(s=Nr(n,l,h,o),s!==null)return Rt(s,n,o),dd(s,l,o),!0}return!1}function Ir(n,l,s,o){if(o={lane:2,revertLane:sc(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Kr(n)){if(l)throw Error(v(479))}else l=Nr(n,s,o,2),l!==null&&Rt(l,n,2)}function Kr(n){var l=n.alternate;return n===He||l!==null&&l===He}function fd(n,l){Le=je=!0;var s=n.pending;s===null?l.next=l:(l.next=s.next,s.next=l),n.pending=l}function dd(n,l,s){if((s&4194048)!==0){var o=l.lanes;o&=n.pendingLanes,s|=o,l.lanes=s,se(n,s)}}function yc(n,l,s,o){l=n.memoizedState,s=s(o,l),s=s==null?l:vo({},l,s),n.memoizedState=s,n.lanes===0&&(n.updateQueue.baseState=s)}function Pr(n,l,s,o,h,p,y){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(o,p,y):l.prototype&&l.prototype.isPureReactComponent?!Ii(s,o)||!Ii(h,p):!0}function hd(n,l,s,o){n=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(s,o),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(s,o),l.state!==n&&yr.enqueueReplaceState(l,l.state,null)}function ts(n,l){var s=l;if("ref"in l){s={};for(var o in l)o!=="ref"&&(s[o]=l[o])}if(n=n.defaultProps){s===l&&(s=vo({},s));for(var h in n)s[h]===void 0&&(s[h]=n[h])}return s}function $r(n,l){try{var s=n.onUncaughtError;s(l.value,{componentStack:l.stack})}catch(o){setTimeout(function(){throw o})}}function _c(n,l,s){try{var o=n.onCaughtError;o(s.value,{componentStack:s.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function bc(n,l,s){return s=ta(s),s.tag=3,s.payload={element:null},s.callback=function(){$r(n,l)},s}function md(n){return n=ta(n),n.tag=3,n}function pd(n,l,s,o){var h=s.type.getDerivedStateFromError;if(typeof h=="function"){var p=o.value;n.payload=function(){return h(p)},n.callback=function(){_c(l,s,o)}}var y=s.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(n.callback=function(){_c(l,s,o),typeof h!="function"&&($a===null?$a=new Set([this]):$a.add(this));var O=o.stack;this.componentDidCatch(o.value,{componentStack:O!==null?O:""})})}function fm(n,l,s,o,h){if(s.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(l=s.alternate,l!==null&&Ql(l,s,h,!0),s=al.current,s!==null){switch(s.tag){case 31:case 13:return il===null?nu():s.alternate===null&&Ht===0&&(Ht=3),s.flags&=-257,s.flags|=65536,s.lanes=h,o===ba?s.flags|=16384:(l=s.updateQueue,l===null?s.updateQueue=new Set([o]):l.add(o),iu(n,o,h)),!1;case 22:return s.flags|=65536,o===ba?s.flags|=16384:(l=s.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([o])},s.updateQueue=l):(s=l.retryQueue,s===null?l.retryQueue=new Set([o]):s.add(o)),iu(n,o,h)),!1}throw Error(v(435,s.tag))}return iu(n,o,h),nu(),!1}if(Qe)return l=al.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=h,o!==jo&&(n=Error(v(422),{cause:o}),Tl(Te(n,s)))):(o!==jo&&(l=Error(v(423),{cause:o}),Tl(Te(l,s))),n=n.current.alternate,n.flags|=65536,h&=-h,n.lanes|=h,o=Te(o,s),h=bc(n.stateNode,o,h),Br(n,h),Ht!==4&&(Ht=2)),!1;var p=Error(v(520),{cause:o});if(p=Te(p,s),br===null?br=[p]:br.push(p),Ht!==4&&(Ht=2),l===null)return!0;o=Te(o,s),s=l;do{switch(s.tag){case 3:return s.flags|=65536,n=h&-h,s.lanes|=n,n=bc(s.stateNode,o,n),Br(s,n),!1;case 1:if(l=s.type,p=s.stateNode,(s.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&($a===null||!$a.has(p))))return s.flags|=65536,h&=-h,s.lanes|=h,h=md(h),pd(h,n,s,o),Br(s,h),!1}s=s.return}while(s!==null);return!1}function En(n,l,s,o){l.child=n===null?Of(l,null,s,o):On(l,n.child,s,o)}function vd(n,l,s,o,h){s=s.render;var p=l.ref;if("ref"in o){var y={};for(var O in o)O!=="ref"&&(y[O]=o[O])}else y=o;return Ua(l),o=ks(n,l,s,y,p,h),O=Hr(),n!==null&&!Tt?(oc(n,l,h),aa(n,l,h)):(Qe&&O&&ye(l),l.flags|=1,En(n,l,o,h),l.child)}function gd(n,l,s,o,h){if(n===null){var p=s.type;return typeof p=="function"&&!ss(p)&&p.defaultProps===void 0&&s.compare===null?(l.tag=15,l.type=p,yd(n,l,p,o,h)):(n=Va(s.type,null,o,l,l.mode,h),n.ref=l.ref,n.return=l,l.child=n)}if(p=n.child,!Qu(n,h)){var y=p.memoizedProps;if(s=s.compare,s=s!==null?s:Ii,s(y,o)&&n.ref===l.ref)return aa(n,l,h)}return l.flags|=1,n=pl(p,o),n.ref=l.ref,n.return=l,l.child=n}function yd(n,l,s,o,h){if(n!==null){var p=n.memoizedProps;if(Ii(p,o)&&n.ref===l.ref)if(Tt=!1,l.pendingProps=o=p,Qu(n,h))(n.flags&131072)!==0&&(Tt=!0);else return l.lanes=n.lanes,aa(n,l,h)}return Wr(n,l,s,o,h)}function _d(n,l,s,o){var h=o.children,p=n!==null?n.memoizedState:null;if(n===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((l.flags&128)!==0){if(p=p!==null?p.baseLanes|s:s,n!==null){for(o=l.child=n.child,h=0;o!==null;)h=h|o.lanes|o.childLanes,o=o.sibling;o=h&~p}else o=0,l.child=null;return Qs(n,l,p,s,o)}if((s&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},n!==null&&Xi(l,p!==null?p.cachePool:null),p!==null?Ls(l,p):ci(),fi(l);else return o=l.lanes=536870912,Qs(n,l,p!==null?p.baseLanes|s:s,s,o)}else p!==null?(Xi(l,p.cachePool),Ls(l,p),cl(),l.memoizedState=null):(n!==null&&Xi(l,null),ci(),cl());return En(n,l,h,s),l.child}function ns(n,l){return n!==null&&n.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function Qs(n,l,s,o,h){var p=Ds();return p=p===null?null:{parent:qt?Ct._currentValue:Ct._currentValue2,pool:p},l.memoizedState={baseLanes:s,cachePool:p},n!==null&&Xi(l,null),ci(),fi(l),n!==null&&Ql(n,l,o,!0),l.childLanes=h,null}function Jr(n,l){return l=mi({mode:l.mode,children:l.children},n.mode),l.ref=n.ref,n.child=l,l.return=n,l}function Sc(n,l,s){return On(l,n.child,null,s),n=Jr(l,l.pendingProps),n.flags|=2,fl(l),l.memoizedState=null,n}function bd(n,l,s){var o=l.pendingProps,h=(l.flags&128)!==0;if(l.flags&=-129,n===null){if(Qe){if(o.mode==="hidden")return n=Jr(l,o),l.lanes=536870912,ns(null,n);if(wr(l),(n=Mt)?(n=of(n,Yn),n!==null&&(l.memoizedState={dehydrated:n,treeContext:Hl!==null?{id:Tn,overflow:Kl}:null,retryLane:536870912,hydrationErrors:null},s=kc(n),s.return=l,l.child=s,rn=l,Mt=null)):n=null,n===null)throw bn(l);return l.lanes=536870912,null}return Jr(l,o)}var p=n.memoizedState;if(p!==null){var y=p.dehydrated;if(wr(l),h)if(l.flags&256)l.flags&=-257,l=Sc(n,l,s);else if(l.memoizedState!==null)l.child=n.child,l.flags|=128,l=null;else throw Error(v(558));else if(Tt||Ql(n,l,s,!1),h=(s&n.childLanes)!==0,Tt||h){if(o=Ge,o!==null&&(y=Ee(o,s),y!==0&&y!==p.retryLane))throw p.retryLane=y,ui(n,y),Rt(o,n,y),Zn;nu(),l=Sc(n,l,s)}else n=p.treeContext,xt&&(Mt=lh(y),rn=l,Qe=!0,_a=null,Yn=!1,n!==null&&fe(l,n)),l=Jr(l,o),l.flags|=4096;return l}return n=pl(n.child,{mode:o.mode,children:o.children}),n.ref=l.ref,l.child=n,n.return=l,n}function Zu(n,l){var s=l.ref;if(s===null)n!==null&&n.ref!==null&&(l.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(v(284));(n===null||n.ref!==s)&&(l.flags|=4194816)}}function Wr(n,l,s,o,h){return Ua(l),s=ks(n,l,s,o,void 0,h),o=Hr(),n!==null&&!Tt?(oc(n,l,h),aa(n,l,h)):(Qe&&o&&ye(l),l.flags|=1,En(n,l,s,h),l.child)}function Ec(n,l,s,o,h,p){return Ua(l),l.updateQueue=null,s=na(l,o,s,h),Lu(n),o=Hr(),n!==null&&!Tt?(oc(n,l,p),aa(n,l,p)):(Qe&&o&&ye(l),l.flags|=1,En(n,l,s,p),l.child)}function ls(n,l,s,o,h){if(Ua(l),l.stateNode===null){var p=va,y=s.contextType;typeof y=="object"&&y!==null&&(p=an(y)),p=new s(o,p),l.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=yr,l.stateNode=p,p._reactInternals=l,p=l.stateNode,p.props=o,p.state=l.memoizedState,p.refs={},Cn(l),y=s.contextType,p.context=typeof y=="object"&&y!==null?an(y):va,p.state=l.memoizedState,y=s.getDerivedStateFromProps,typeof y=="function"&&(yc(l,s,y,o),p.state=l.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(y=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),y!==p.state&&yr.enqueueReplaceState(p,p.state,null),Ki(l,o,p,h),Ra(),p.state=l.memoizedState),typeof p.componentDidMount=="function"&&(l.flags|=4194308),o=!0}else if(n===null){p=l.stateNode;var O=l.memoizedProps,F=ts(s,O);p.props=F;var P=p.context,ae=s.contextType;y=va,typeof ae=="object"&&ae!==null&&(y=an(ae));var $=s.getDerivedStateFromProps;ae=typeof $=="function"||typeof p.getSnapshotBeforeUpdate=="function",O=l.pendingProps!==O,ae||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(O||P!==y)&&hd(l,p,o,y),yl=!1;var oe=l.memoizedState;p.state=oe,Ki(l,o,p,h),Ra(),P=l.memoizedState,O||oe!==P||yl?(typeof $=="function"&&(yc(l,s,$,o),P=l.memoizedState),(F=yl||Pr(l,s,F,o,oe,P,y))?(ae||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(l.flags|=4194308)):(typeof p.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=o,l.memoizedState=P),p.props=o,p.state=P,p.context=y,o=F):(typeof p.componentDidMount=="function"&&(l.flags|=4194308),o=!1)}else{p=l.stateNode,ri(n,l),y=l.memoizedProps,ae=ts(s,y),p.props=ae,$=l.pendingProps,oe=p.context,P=s.contextType,F=va,typeof P=="object"&&P!==null&&(F=an(P)),O=s.getDerivedStateFromProps,(P=typeof O=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(y!==$||oe!==F)&&hd(l,p,o,F),yl=!1,oe=l.memoizedState,p.state=oe,Ki(l,o,p,h),Ra();var Be=l.memoizedState;y!==$||oe!==Be||yl||n!==null&&n.dependencies!==null&&ai(n.dependencies)?(typeof O=="function"&&(yc(l,s,O,o),Be=l.memoizedState),(ae=yl||Pr(l,s,ae,o,oe,Be,F)||n!==null&&n.dependencies!==null&&ai(n.dependencies))?(P||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(o,Be,F),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(o,Be,F)),typeof p.componentDidUpdate=="function"&&(l.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof p.componentDidUpdate!="function"||y===n.memoizedProps&&oe===n.memoizedState||(l.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||y===n.memoizedProps&&oe===n.memoizedState||(l.flags|=1024),l.memoizedProps=o,l.memoizedState=Be),p.props=o,p.state=Be,p.context=F,o=ae):(typeof p.componentDidUpdate!="function"||y===n.memoizedProps&&oe===n.memoizedState||(l.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||y===n.memoizedProps&&oe===n.memoizedState||(l.flags|=1024),o=!1)}return p=o,Zu(n,l),o=(l.flags&128)!==0,p||o?(p=l.stateNode,s=o&&typeof s.getDerivedStateFromError!="function"?null:p.render(),l.flags|=1,n!==null&&o?(l.child=On(l,n.child,null,h),l.child=On(l,null,s,h)):En(n,l,s,h),l.memoizedState=p.state,n=l.child):n=aa(n,l,h),n}function Sd(n,l,s,o){return dn(),l.flags|=256,En(n,l,s,o),l.child}function Tc(n){return{baseLanes:n,cachePool:ii()}}function zc(n,l,s){return n=n!==null?n.childLanes&~s:0,l&&(n|=Qn),n}function Oc(n,l,s){var o=l.pendingProps,h=!1,p=(l.flags&128)!==0,y;if((y=p)||(y=n!==null&&n.memoizedState===null?!1:(Vt.current&2)!==0),y&&(h=!0,l.flags&=-129),y=(l.flags&32)!==0,l.flags&=-33,n===null){if(Qe){if(h?Na(l):cl(),(n=Mt)?(n=uh(n,Yn),n!==null&&(l.memoizedState={dehydrated:n,treeContext:Hl!==null?{id:Tn,overflow:Kl}:null,retryLane:536870912,hydrationErrors:null},s=kc(n),s.return=l,l.child=s,rn=l,Mt=null)):n=null,n===null)throw bn(l);return zo(n)?l.lanes=32:l.lanes=536870912,null}var O=o.children;return o=o.fallback,h?(cl(),h=l.mode,O=mi({mode:"hidden",children:O},h),o=Dl(o,h,s,null),O.return=l,o.return=l,O.sibling=o,l.child=O,o=l.child,o.memoizedState=Tc(s),o.childLanes=zc(n,y,s),l.memoizedState=Ts,ns(null,o)):(Na(l),eo(l,O))}var F=n.memoizedState;if(F!==null&&(O=F.dehydrated,O!==null)){if(p)l.flags&256?(Na(l),l.flags&=-257,l=as(n,l,s)):l.memoizedState!==null?(cl(),l.child=n.child,l.flags|=128,l=null):(cl(),O=o.fallback,h=l.mode,o=mi({mode:"visible",children:o.children},h),O=Dl(O,h,s,null),O.flags|=2,o.return=l,O.return=l,o.sibling=O,l.child=o,On(l,n.child,null,s),o=l.child,o.memoizedState=Tc(s),o.childLanes=zc(n,y,s),l.memoizedState=Ts,l=ns(null,o));else if(Na(l),zo(O))y=Oo(O).digest,o=Error(v(419)),o.stack="",o.digest=y,Tl({value:o,source:null,stack:null}),l=as(n,l,s);else if(Tt||Ql(n,l,s,!1),y=(s&n.childLanes)!==0,Tt||y){if(y=Ge,y!==null&&(o=Ee(y,s),o!==0&&o!==F.retryLane))throw F.retryLane=o,ui(n,o),Rt(y,n,o),Zn;Mi(O)||nu(),l=as(n,l,s)}else Mi(O)?(l.flags|=192,l.child=n.child,l=null):(n=F.treeContext,xt&&(Mt=ah(O),rn=l,Qe=!0,_a=null,Yn=!1,n!==null&&fe(l,n)),l=eo(l,o.children),l.flags|=4096);return l}return h?(cl(),O=o.fallback,h=l.mode,F=n.child,p=F.sibling,o=pl(F,{mode:"hidden",children:o.children}),o.subtreeFlags=F.subtreeFlags&65011712,p!==null?O=pl(p,O):(O=Dl(O,h,s,null),O.flags|=2),O.return=l,o.return=l,o.sibling=O,l.child=o,ns(null,o),o=l.child,O=n.child.memoizedState,O===null?O=Tc(s):(h=O.cachePool,h!==null?(F=qt?Ct._currentValue:Ct._currentValue2,h=h.parent!==F?{parent:F,pool:F}:h):h=ii(),O={baseLanes:O.baseLanes|s,cachePool:h}),o.memoizedState=O,o.childLanes=zc(n,y,s),l.memoizedState=Ts,ns(n.child,o)):(Na(l),s=n.child,n=s.sibling,s=pl(s,{mode:"visible",children:o.children}),s.return=l,s.sibling=null,n!==null&&(y=l.deletions,y===null?(l.deletions=[n],l.flags|=16):y.push(n)),l.child=s,l.memoizedState=null,s)}function eo(n,l){return l=mi({mode:"visible",children:l},n.mode),l.return=n,n.child=l}function mi(n,l){return n=d(22,n,null,l),n.lanes=0,n}function as(n,l,s){return On(l,n.child,null,s),n=eo(l,l.pendingProps.children),n.flags|=2,l.memoizedState=null,n}function Ed(n,l,s){n.lanes|=l;var o=n.alternate;o!==null&&(o.lanes|=l),qi(n.return,l,s)}function Xs(n,l,s,o,h,p){var y=n.memoizedState;y===null?n.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:o,tail:s,tailMode:h,treeForkCount:p}:(y.isBackwards=l,y.rendering=null,y.renderingStartTime=0,y.last=o,y.tail=s,y.tailMode=h,y.treeForkCount=p)}function xc(n,l,s){var o=l.pendingProps,h=o.revealOrder,p=o.tail;o=o.children;var y=Vt.current,O=(y&2)!==0;if(O?(y=y&1|2,l.flags|=128):y&=1,K(Vt,y),En(n,l,o,s),o=Qe?pr:0,!O&&n!==null&&(n.flags&128)!==0)e:for(n=l.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Ed(n,s,l);else if(n.tag===19)Ed(n,s,l);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===l)break e;for(;n.sibling===null;){if(n.return===null||n.return===l)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(h){case"forwards":for(s=l.child,h=null;s!==null;)n=s.alternate,n!==null&&Hu(n)===null&&(h=s),s=s.sibling;s=h,s===null?(h=l.child,l.child=null):(h=s.sibling,s.sibling=null),Xs(l,!1,h,s,p,o);break;case"backwards":case"unstable_legacy-backwards":for(s=null,h=l.child,l.child=null;h!==null;){if(n=h.alternate,n!==null&&Hu(n)===null){l.child=h;break}n=h.sibling,h.sibling=s,s=h,h=n}Xs(l,!0,s,null,p,o);break;case"together":Xs(l,!1,null,null,void 0,o);break;default:l.memoizedState=null}return l.child}function aa(n,l,s){if(n!==null&&(l.dependencies=n.dependencies),Pa|=l.lanes,(s&l.childLanes)===0)if(n!==null){if(Ql(n,l,s,!1),(s&l.childLanes)===0)return null}else return null;if(n!==null&&l.child!==n.child)throw Error(v(153));if(l.child!==null){for(n=l.child,s=pl(n,n.pendingProps),l.child=s,s.return=l;n.sibling!==null;)n=n.sibling,s=s.sibling=pl(n,n.pendingProps),s.return=l;s.sibling=null}return l.child}function Qu(n,l){return(n.lanes&l)!==0?!0:(n=n.dependencies,!!(n!==null&&ai(n)))}function Mc(n,l,s){switch(l.tag){case 3:jt(l,l.stateNode.containerInfo),zl(l,Ct,n.memoizedState.cache),dn();break;case 27:case 5:li(l);break;case 4:jt(l,l.stateNode.containerInfo);break;case 10:zl(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,wr(l),null;break;case 13:var o=l.memoizedState;if(o!==null)return o.dehydrated!==null?(Na(l),l.flags|=128,null):(s&l.child.childLanes)!==0?Oc(n,l,s):(Na(l),n=aa(n,l,s),n!==null?n.sibling:null);Na(l);break;case 19:var h=(n.flags&128)!==0;if(o=(s&l.childLanes)!==0,o||(Ql(n,l,s,!1),o=(s&l.childLanes)!==0),h){if(o)return xc(n,l,s);l.flags|=128}if(h=l.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),K(Vt,Vt.current),o)break;return null;case 22:return l.lanes=0,_d(n,l,s,l.pendingProps);case 24:zl(l,Ct,n.memoizedState.cache)}return aa(n,l,s)}function Cc(n,l,s){if(n!==null)if(n.memoizedProps!==l.pendingProps)Tt=!0;else{if(!Qu(n,s)&&(l.flags&128)===0)return Tt=!1,Mc(n,l,s);Tt=(n.flags&131072)!==0}else Tt=!1,Qe&&(l.flags&1048576)!==0&&Me(l,pr,l.index);switch(l.lanes=0,l.tag){case 16:e:{var o=l.pendingProps;if(n=si(l.elementType),l.type=n,typeof n=="function")ss(n)?(o=ts(n,o),l.tag=1,l=ls(null,l,n,o,s)):(l.tag=0,l=Wr(null,l,n,o,s));else{if(n!=null){var h=n.$$typeof;if(h===su){l.tag=11,l=vd(null,l,n,o,s);break e}else if(h===yo){l.tag=14,l=gd(null,l,n,o,s);break e}}throw l=x(n)||n,Error(v(306,l,""))}}return l;case 0:return Wr(n,l,l.type,l.pendingProps,s);case 1:return o=l.type,h=ts(o,l.pendingProps),ls(n,l,o,h,s);case 3:e:{if(jt(l,l.stateNode.containerInfo),n===null)throw Error(v(387));var p=l.pendingProps;h=l.memoizedState,o=h.element,ri(n,l),Ki(l,p,null,s);var y=l.memoizedState;if(p=y.cache,zl(l,Ct,p),p!==h.cache&&Ca(l,[Ct],s,!0),Ra(),p=y.element,xt&&h.isDehydrated)if(h={element:p,isDehydrated:!1,cache:y.cache},l.updateQueue.baseState=h,l.memoizedState=h,l.flags&256){l=Sd(n,l,p,s);break e}else if(p!==o){o=Te(Error(v(424)),l),Tl(o),l=Sd(n,l,p,s);break e}else for(xt&&(Mt=nh(l.stateNode.containerInfo),rn=l,Qe=!0,_a=null,Yn=!0),s=Of(l,null,p,s),l.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(dn(),p===o){l=aa(n,l,s);break e}En(n,l,p,s)}l=l.child}return l;case 26:if(Bl)return Zu(n,l),n===null?(s=mf(l.type,null,l.pendingProps,null))?l.memoizedState=s:Qe||(l.stateNode=Uo(l.type,l.pendingProps,zn.current,l)):l.memoizedState=mf(l.type,n.memoizedProps,l.pendingProps,n.memoizedState),null;case 27:if(un)return li(l),n===null&&un&&Qe&&(o=l.stateNode=Ao(l.type,l.pendingProps,zn.current,gn.current,!1),rn=l,Yn=!0,Mt=rf(l.type,o,Mt)),En(n,l,l.pendingProps.children,s),Zu(n,l),n===null&&(l.flags|=4194304),l.child;case 5:return n===null&&Qe&&(vh(l.type,l.pendingProps,gn.current),(h=o=Mt)&&(o=ih(o,l.type,l.pendingProps,Yn),o!==null?(l.stateNode=o,rn=l,Mt=th(o),Yn=!1,h=!0):h=!1),h||bn(l)),li(l),h=l.type,p=l.pendingProps,y=n!==null?n.memoizedProps:null,o=p.children,Fn(h,p)?o=null:y!==null&&Fn(h,y)&&(l.flags|=32),l.memoizedState!==null&&(h=ks(n,l,Ol,null,null,s),qt?ps._currentValue=h:ps._currentValue2=h),Zu(n,l),En(n,l,o,s),l.child;case 6:return n===null&&Qe&&(hf(l.pendingProps,gn.current),(n=s=Mt)&&(s=sh(s,l.pendingProps,Yn),s!==null?(l.stateNode=s,rn=l,Mt=null,n=!0):n=!1),n||bn(l)),null;case 13:return Oc(n,l,s);case 4:return jt(l,l.stateNode.containerInfo),o=l.pendingProps,n===null?l.child=On(l,null,o,s):En(n,l,o,s),l.child;case 11:return vd(n,l,l.type,l.pendingProps,s);case 7:return En(n,l,l.pendingProps,s),l.child;case 8:return En(n,l,l.pendingProps.children,s),l.child;case 12:return En(n,l,l.pendingProps.children,s),l.child;case 10:return o=l.pendingProps,zl(l,l.type,o.value),En(n,l,o.children,s),l.child;case 9:return h=l.type._context,o=l.pendingProps.children,Ua(l),h=an(h),o=o(h),l.flags|=1,En(n,l,o,s),l.child;case 14:return gd(n,l,l.type,l.pendingProps,s);case 15:return yd(n,l,l.type,l.pendingProps,s);case 19:return xc(n,l,s);case 31:return bd(n,l,s);case 22:return _d(n,l,s,l.pendingProps);case 24:return Ua(l),o=an(Ct),n===null?(h=Ds(),h===null&&(h=Ge,p=Us(),h.pooledCache=p,p.refCount++,p!==null&&(h.pooledCacheLanes|=s),h=p),l.memoizedState={parent:o,cache:h},Cn(l),zl(l,Ct,h)):((n.lanes&s)!==0&&(ri(n,l),Ki(l,null,null,s),Ra()),h=n.memoizedState,p=l.memoizedState,h.parent!==o?(h={parent:o,cache:o},l.memoizedState=h,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=h),zl(l,Ct,o)):(o=p.cache,zl(l,Ct,o),o!==h.cache&&Ca(l,[Ct],s,!0))),En(n,l,l.pendingProps.children,s),l.child;case 29:throw l.pendingProps}throw Error(v(156,l.tag))}function xl(n){n.flags|=4}function Xu(n){vl&&(n.flags|=8)}function Td(n,l){if(n!==null&&n.child===l.child)return!1;if((l.flags&16)!==0)return!0;for(n=l.child;n!==null;){if((n.flags&8218)!==0||(n.subtreeFlags&8218)!==0)return!0;n=n.sibling}return!1}function Uc(n,l,s,o){if(Ke)for(s=l.child;s!==null;){if(s.tag===5||s.tag===6)ur(n,s.stateNode);else if(!(s.tag===4||un&&s.tag===27)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===l)break;for(;s.sibling===null;){if(s.return===null||s.return===l)return;s=s.return}s.sibling.return=s.return,s=s.sibling}else if(vl)for(var h=l.child;h!==null;){if(h.tag===5){var p=h.stateNode;s&&o&&(p=$d(p,h.type,h.memoizedProps)),ur(n,p)}else if(h.tag===6)p=h.stateNode,s&&o&&(p=sf(p,h.memoizedProps)),ur(n,p);else if(h.tag!==4){if(h.tag===22&&h.memoizedState!==null)p=h.child,p!==null&&(p.return=h),Uc(n,h,!0,!0);else if(h.child!==null){h.child.return=h,h=h.child;continue}}if(h===l)break;for(;h.sibling===null;){if(h.return===null||h.return===l)return;h=h.return}h.sibling.return=h.return,h=h.sibling}}function zd(n,l,s,o){var h=!1;if(vl)for(var p=l.child;p!==null;){if(p.tag===5){var y=p.stateNode;s&&o&&(y=$d(y,p.type,p.memoizedProps)),lf(n,y)}else if(p.tag===6)y=p.stateNode,s&&o&&(y=sf(y,p.memoizedProps)),lf(n,y);else if(p.tag!==4){if(p.tag===22&&p.memoizedState!==null)h=p.child,h!==null&&(h.return=p),zd(n,p,!0,!0),h=!0;else if(p.child!==null){p.child.return=p,p=p.child;continue}}if(p===l)break;for(;p.sibling===null;){if(p.return===null||p.return===l)return h;p=p.return}p.sibling.return=p.return,p=p.sibling}return h}function Od(n,l){if(vl&&Td(n,l)){n=l.stateNode;var s=n.containerInfo,o=nf();zd(o,l,!1,!1),n.pendingChildren=o,xl(l),Pd(s,o)}}function Ac(n,l,s,o){if(Ke)n.memoizedProps!==o&&xl(l);else if(vl){var h=n.stateNode,p=n.memoizedProps;if((n=Td(n,l))||p!==o){var y=gn.current;p=Kd(h,s,p,o,!n,null),p===h?l.stateNode=h:(Xu(l),el(p,s,o,y)&&xl(l),l.stateNode=p,n&&Uc(p,l,!1,!1))}else l.stateNode=h}}function jn(n,l,s,o,h){if((n.mode&32)!==0&&(s===null?rr(l,o):fu(l,s,o))){if(n.flags|=16777216,(h&335544128)===h||Zc(l,o))if(Nt(n.stateNode,l,o))n.flags|=8192;else if(Ie())n.flags|=8192;else throw qn=ba,Vo}else n.flags&=-16777217}function Is(n,l){if(yf(l)){if(n.flags|=16777216,!_f(l))if(Ie())n.flags|=8192;else throw qn=ba,Vo}else n.flags&=-16777217}function Iu(n,l){l!==null&&(n.flags|=4),n.flags&16384&&(l=n.tag!==22?ne():536870912,n.lanes|=l,bu|=l)}function Ks(n,l){if(!Qe)switch(n.tailMode){case"hidden":l=n.tail;for(var s=null;l!==null;)l.alternate!==null&&(s=l),l=l.sibling;s===null?n.tail=null:s.sibling=null;break;case"collapsed":s=n.tail;for(var o=null;s!==null;)s.alternate!==null&&(o=s),s=s.sibling;o===null?l||n.tail===null?n.tail=null:n.tail.sibling=null:o.sibling=null}}function yt(n){var l=n.alternate!==null&&n.alternate.child===n.child,s=0,o=0;if(l)for(var h=n.child;h!==null;)s|=h.lanes|h.childLanes,o|=h.subtreeFlags&65011712,o|=h.flags&65011712,h.return=n,h=h.sibling;else for(h=n.child;h!==null;)s|=h.lanes|h.childLanes,o|=h.subtreeFlags,o|=h.flags,h.return=n,h=h.sibling;return n.subtreeFlags|=o,n.childLanes=s,l}function xd(n,l,s){var o=l.pendingProps;switch(_e(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return yt(l),null;case 1:return yt(l),null;case 3:return s=l.stateNode,o=null,n!==null&&(o=n.memoizedState.cache),l.memoizedState.cache!==o&&(l.flags|=2048),Sn(Ct),ln(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(n===null||n.child===null)&&(Mn(l)?xl(l):n===null||n.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,Ln())),Od(n,l),yt(l),null;case 26:if(Bl){var h=l.type,p=l.memoizedState;return n===null?(xl(l),p!==null?(yt(l),Is(l,p)):(yt(l),jn(l,h,null,o,s))):p?p!==n.memoizedState?(xl(l),yt(l),Is(l,p)):(yt(l),l.flags&=-16777217):(p=n.memoizedProps,Ke?p!==o&&xl(l):Ac(n,l,h,o),yt(l),jn(l,h,p,o,s)),null}case 27:if(un){if(In(l),s=zn.current,h=l.type,n!==null&&l.stateNode!=null)Ke?n.memoizedProps!==o&&xl(l):Ac(n,l,h,o);else{if(!o){if(l.stateNode===null)throw Error(v(166));return yt(l),null}n=gn.current,Mn(l)?fn(l,n):(n=Ao(h,o,s,n,!0),l.stateNode=n,xl(l))}return yt(l),null}case 5:if(In(l),h=l.type,n!==null&&l.stateNode!=null)Ac(n,l,h,o);else{if(!o){if(l.stateNode===null)throw Error(v(166));return yt(l),null}if(p=gn.current,Mn(l))fn(l,p),hh(l.stateNode,h,o,p)&&(l.flags|=64);else{var y=Yc(h,o,zn.current,p,l);Xu(l),Uc(y,l,!1,!1),l.stateNode=y,el(y,h,o,p)&&xl(l)}}return yt(l),jn(l,l.type,n===null?null:n.memoizedProps,l.pendingProps,s),null;case 6:if(n&&l.stateNode!=null)s=n.memoizedProps,Ke?s!==o&&xl(l):vl&&(s!==o?(n=zn.current,s=gn.current,Xu(l),l.stateNode=qa(o,n,s,l)):l.stateNode=n.stateNode);else{if(typeof o!="string"&&l.stateNode===null)throw Error(v(166));if(n=zn.current,s=gn.current,Mn(l)){if(!xt)throw Error(v(176));if(n=l.stateNode,s=l.memoizedProps,o=null,h=rn,h!==null)switch(h.tag){case 27:case 5:o=h.memoizedProps}vm(n,s,l,o)||bn(l,!0)}else Xu(l),l.stateNode=qa(o,n,s,l)}return yt(l),null;case 31:if(s=l.memoizedState,n===null||n.memoizedState!==null){if(o=Mn(l),s!==null){if(n===null){if(!o)throw Error(v(318));if(!xt)throw Error(v(556));if(n=l.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(v(557));cf(n,l)}else dn(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;yt(l),n=!1}else s=Ln(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=s),n=!0;if(!n)return l.flags&256?(fl(l),l):(fl(l),null);if((l.flags&128)!==0)throw Error(v(558))}return yt(l),null;case 13:if(o=l.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(h=Mn(l),o!==null&&o.dehydrated!==null){if(n===null){if(!h)throw Error(v(318));if(!xt)throw Error(v(344));if(h=l.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(v(317));oh(h,l)}else dn(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;yt(l),h=!1}else h=Ln(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=h),h=!0;if(!h)return l.flags&256?(fl(l),l):(fl(l),null)}return fl(l),(l.flags&128)!==0?(l.lanes=s,l):(s=o!==null,n=n!==null&&n.memoizedState!==null,s&&(o=l.child,h=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(h=o.alternate.memoizedState.cachePool.pool),p=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(p=o.memoizedState.cachePool.pool),p!==h&&(o.flags|=2048)),s!==n&&s&&(l.child.flags|=8192),Iu(l,l.updateQueue),yt(l),null);case 4:return ln(),Od(n,l),n===null&&pt(l.stateNode.containerInfo),yt(l),null;case 10:return Sn(l.type),yt(l),null;case 19:if(N(Vt),o=l.memoizedState,o===null)return yt(l),null;if(h=(l.flags&128)!==0,p=o.rendering,p===null)if(h)Ks(o,!1);else{if(Ht!==0||n!==null&&(n.flags&128)!==0)for(n=l.child;n!==null;){if(p=Hu(n),p!==null){for(l.flags|=128,Ks(o,!1),n=p.updateQueue,l.updateQueue=n,Iu(l,n),l.subtreeFlags=0,n=s,s=l.child;s!==null;)ho(s,n),s=s.sibling;return K(Vt,Vt.current&1|2),Qe&&De(l,o.treeForkCount),l.child}n=n.sibling}o.tail!==null&&Rn()>ki&&(l.flags|=128,h=!0,Ks(o,!1),l.lanes=4194304)}else{if(!h)if(n=Hu(p),n!==null){if(l.flags|=128,h=!0,n=n.updateQueue,l.updateQueue=n,Iu(l,n),Ks(o,!0),o.tail===null&&o.tailMode==="hidden"&&!p.alternate&&!Qe)return yt(l),null}else 2*Rn()-o.renderingStartTime>ki&&s!==536870912&&(l.flags|=128,h=!0,Ks(o,!1),l.lanes=4194304);o.isBackwards?(p.sibling=l.child,l.child=p):(n=o.last,n!==null?n.sibling=p:l.child=p,o.last=p)}return o.tail!==null?(n=o.tail,o.rendering=n,o.tail=n.sibling,o.renderingStartTime=Rn(),n.sibling=null,s=Vt.current,K(Vt,h?s&1|2:s&1),Qe&&De(l,o.treeForkCount),n):(yt(l),null);case 22:case 23:return fl(l),Jt(),o=l.memoizedState!==null,n!==null?n.memoizedState!==null!==o&&(l.flags|=8192):o&&(l.flags|=8192),o?(s&536870912)!==0&&(l.flags&128)===0&&(yt(l),l.subtreeFlags&6&&(l.flags|=8192)):yt(l),s=l.updateQueue,s!==null&&Iu(l,s.retryQueue),s=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),o=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(o=l.memoizedState.cachePool.pool),o!==s&&(l.flags|=2048),n!==null&&N(Ai),null;case 24:return s=null,n!==null&&(s=n.memoizedState.cache),l.memoizedState.cache!==s&&(l.flags|=2048),Sn(Ct),yt(l),null;case 25:return null;case 30:return null}throw Error(v(156,l.tag))}function Dc(n,l){switch(_e(l),l.tag){case 1:return n=l.flags,n&65536?(l.flags=n&-65537|128,l):null;case 3:return Sn(Ct),ln(),n=l.flags,(n&65536)!==0&&(n&128)===0?(l.flags=n&-65537|128,l):null;case 26:case 27:case 5:return In(l),null;case 31:if(l.memoizedState!==null){if(fl(l),l.alternate===null)throw Error(v(340));dn()}return n=l.flags,n&65536?(l.flags=n&-65537|128,l):null;case 13:if(fl(l),n=l.memoizedState,n!==null&&n.dehydrated!==null){if(l.alternate===null)throw Error(v(340));dn()}return n=l.flags,n&65536?(l.flags=n&-65537|128,l):null;case 19:return N(Vt),null;case 4:return ln(),null;case 10:return Sn(l.type),null;case 22:case 23:return fl(l),Jt(),n!==null&&N(Ai),n=l.flags,n&65536?(l.flags=n&-65537|128,l):null;case 24:return Sn(Ct),null;case 25:return null;default:return null}}function Md(n,l){switch(_e(l),l.tag){case 3:Sn(Ct),ln();break;case 26:case 27:case 5:In(l);break;case 4:ln();break;case 31:l.memoizedState!==null&&fl(l);break;case 13:fl(l);break;case 19:N(Vt);break;case 10:Sn(l.type);break;case 22:case 23:fl(l),Jt(),n!==null&&N(Ai);break;case 24:Sn(Ct)}}function ia(n,l){try{var s=l.updateQueue,o=s!==null?s.lastEffect:null;if(o!==null){var h=o.next;s=h;do{if((s.tag&n)===n){o=void 0;var p=s.create,y=s.inst;o=p(),y.destroy=o}s=s.next}while(s!==h)}}catch(O){Ae(l,l.return,O)}}function sa(n,l,s){try{var o=l.updateQueue,h=o!==null?o.lastEffect:null;if(h!==null){var p=h.next;o=p;do{if((o.tag&n)===n){var y=o.inst,O=y.destroy;if(O!==void 0){y.destroy=void 0,h=l;var F=s,P=O;try{P()}catch(ae){Ae(h,F,ae)}}}o=o.next}while(o!==p)}}catch(ae){Ae(l,l.return,ae)}}function Ps(n){var l=n.updateQueue;if(l!==null){var s=n.stateNode;try{$i(l,s)}catch(o){Ae(n,n.return,o)}}}function to(n,l,s){s.props=ts(n.type,n.memoizedProps),s.state=n.memoizedState;try{s.componentWillUnmount()}catch(o){Ae(n,l,o)}}function $s(n,l){try{var s=n.ref;if(s!==null){switch(n.tag){case 26:case 27:case 5:var o=ru(n.stateNode);break;case 30:o=n.stateNode;break;default:o=n.stateNode}typeof s=="function"?n.refCleanup=s(o):s.current=o}}catch(h){Ae(n,l,h)}}function Dn(n,l){var s=n.ref,o=n.refCleanup;if(s!==null)if(typeof o=="function")try{o()}catch(h){Ae(n,l,h)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(h){Ae(n,l,h)}else s.current=null}function is(n){var l=n.type,s=n.memoizedProps,o=n.stateNode;try{Vd(o,l,s,n)}catch(h){Ae(n,n.return,h)}}function Ku(n,l,s){try{Fd(n.stateNode,n.type,s,l,n)}catch(o){Ae(n,n.return,o)}}function Rc(n){return n.tag===5||n.tag===3||(Bl?n.tag===26:!1)||(un?n.tag===27&&vs(n.type):!1)||n.tag===4}function Ha(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Rc(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(un&&n.tag===27&&vs(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function no(n,l,s){var o=n.tag;if(o===5||o===6)n=n.stateNode,l?qd(s,n,l):Jc(s,n);else if(o!==4&&(un&&o===27&&vs(n.type)&&(s=n.stateNode,l=null),n=n.child,n!==null))for(no(n,l,s),n=n.sibling;n!==null;)no(n,l,s),n=n.sibling}function Pu(n,l,s){var o=n.tag;if(o===5||o===6)n=n.stateNode,l?Yd(s,n,l):$c(s,n);else if(o!==4&&(un&&o===27&&vs(n.type)&&(s=n.stateNode),n=n.child,n!==null))for(Pu(n,l,s),n=n.sibling;n!==null;)Pu(n,l,s),n=n.sibling}function Nc(n,l,s){n=n.containerInfo;try{af(n,s)}catch(o){Ae(l,l.return,o)}}function Cd(n){var l=n.stateNode,s=n.memoizedProps;try{en(n.type,s,l,n)}catch(o){Ae(n,n.return,o)}}function dm(n,l){for(_o(n.containerInfo),Xt=l;Xt!==null;)if(n=Xt,l=n.child,(n.subtreeFlags&1028)!==0&&l!==null)l.return=n,Xt=l;else for(;Xt!==null;){n=Xt;var s=n.alternate;switch(l=n.flags,n.tag){case 0:if((l&4)!==0&&(l=n.updateQueue,l=l!==null?l.events:null,l!==null))for(var o=0;o<l.length;o++){var h=l[o];h.ref.impl=h.nextImpl}break;case 11:case 15:break;case 1:if((l&1024)!==0&&s!==null){l=void 0,o=n,h=s.memoizedProps,s=s.memoizedState;var p=o.stateNode;try{var y=ts(o.type,h);l=p.getSnapshotBeforeUpdate(y,s),p.__reactInternalSnapshotBeforeUpdate=l}catch(O){Ae(o,o.return,O)}}break;case 3:(l&1024)!==0&&Ke&&tf(n.stateNode.containerInfo);break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((l&1024)!==0)throw Error(v(163))}if(l=n.sibling,l!==null){l.return=n.return,Xt=l;break}Xt=n.return}}function Ud(n,l,s){var o=s.flags;switch(s.tag){case 0:case 11:case 15:Gn(n,s),o&4&&ia(5,s);break;case 1:if(Gn(n,s),o&4)if(n=s.stateNode,l===null)try{n.componentDidMount()}catch(y){Ae(s,s.return,y)}else{var h=ts(s.type,l.memoizedProps);l=l.memoizedState;try{n.componentDidUpdate(h,l,n.__reactInternalSnapshotBeforeUpdate)}catch(y){Ae(s,s.return,y)}}o&64&&Ps(s),o&512&&$s(s,s.return);break;case 3:if(Gn(n,s),o&64&&(o=s.updateQueue,o!==null)){if(n=null,s.child!==null)switch(s.child.tag){case 27:case 5:n=ru(s.child.stateNode);break;case 1:n=s.child.stateNode}try{$i(o,n)}catch(y){Ae(s,s.return,y)}}break;case 27:un&&l===null&&o&4&&Cd(s);case 26:case 5:if(Gn(n,s),l===null){if(o&4)is(s);else if(o&64){n=s.type,l=s.memoizedProps,h=s.stateNode;try{fh(h,n,l,s)}catch(y){Ae(s,s.return,y)}}}o&512&&$s(s,s.return);break;case 12:Gn(n,s);break;case 31:Gn(n,s),o&4&&Cl(n,s);break;case 13:Gn(n,s),o&4&&Ju(n,s),o&64&&(o=s.memoizedState,o!==null&&(o=o.dehydrated,o!==null&&(s=hm.bind(null,s),xo(o,s))));break;case 22:if(o=s.memoizedState!==null||Ft,!o){l=l!==null&&l.memoizedState!==null||Yt,h=Ft;var p=Yt;Ft=o,(Yt=l)&&!p?Al(n,s,(s.subtreeFlags&8772)!==0):Gn(n,s),Ft=h,Yt=p}break;case 30:break;default:Gn(n,s)}}function Bc(n){var l=n.alternate;l!==null&&(n.alternate=null,Bc(l)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(l=n.stateNode,l!==null&&bo(l)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function Ml(n,l,s){for(s=s.child;s!==null;)$u(n,l,s),s=s.sibling}function $u(n,l,s){if(ll&&typeof ll.onCommitFiberUnmount=="function")try{ll.onCommitFiberUnmount(_s,s)}catch{}switch(s.tag){case 26:if(Bl){Yt||Dn(s,l),Ml(n,l,s),s.memoizedState?Ci(s.memoizedState):s.stateNode&&gf(s.stateNode);break}case 27:if(un){Yt||Dn(s,l);var o=wt,h=It;vs(s.type)&&(wt=s.stateNode,It=!1),Ml(n,l,s),vn(s.stateNode),wt=o,It=h;break}case 5:Yt||Dn(s,l);case 6:if(Ke){if(o=wt,h=It,wt=null,Ml(n,l,s),wt=o,It=h,wt!==null)if(It)try{Wc(wt,s.stateNode)}catch(p){Ae(s,l,p)}else try{Zd(wt,s.stateNode)}catch(p){Ae(s,l,p)}}else Ml(n,l,s);break;case 18:Ke&&wt!==null&&(It?Mo(wt,s.stateNode):df(wt,s.stateNode));break;case 4:Ke?(o=wt,h=It,wt=s.stateNode.containerInfo,It=!0,Ml(n,l,s),wt=o,It=h):(vl&&Nc(s.stateNode,s,nf()),Ml(n,l,s));break;case 0:case 11:case 14:case 15:sa(2,s,l),Yt||sa(4,s,l),Ml(n,l,s);break;case 1:Yt||(Dn(s,l),o=s.stateNode,typeof o.componentWillUnmount=="function"&&to(s,l,o)),Ml(n,l,s);break;case 21:Ml(n,l,s);break;case 22:Yt=(o=Yt)||s.memoizedState!==null,Ml(n,l,s),Yt=o;break;default:Ml(n,l,s)}}function Cl(n,l){if(xt&&l.memoizedState===null&&(n=l.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{gm(n)}catch(s){Ae(l,l.return,s)}}}function Ju(n,l){if(xt&&l.memoizedState===null&&(n=l.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{ym(n)}catch(s){Ae(l,l.return,s)}}function Ul(n){switch(n.tag){case 31:case 13:case 19:var l=n.stateNode;return l===null&&(l=n.stateNode=new Mf),l;case 22:return n=n.stateNode,l=n._retryCache,l===null&&(l=n._retryCache=new Mf),l;default:throw Error(v(435,n.tag))}}function La(n,l){var s=Ul(n);l.forEach(function(o){if(!s.has(o)){s.add(o);var h=mm.bind(null,n,o);o.then(h,h)}})}function mn(n,l){var s=l.deletions;if(s!==null)for(var o=0;o<s.length;o++){var h=s[o],p=n,y=l;if(Ke){var O=y;e:for(;O!==null;){switch(O.tag){case 27:if(un){if(vs(O.type)){wt=O.stateNode,It=!1;break e}break}case 5:wt=O.stateNode,It=!1;break e;case 3:case 4:wt=O.stateNode.containerInfo,It=!0;break e}O=O.return}if(wt===null)throw Error(v(160));$u(p,y,h),wt=null,It=!1}else $u(p,y,h);p=h.alternate,p!==null&&(p.return=null),h.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)Wu(l,n),l=l.sibling}function Wu(n,l){var s=n.alternate,o=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:mn(l,n),pn(n),o&4&&(sa(3,n,n.return),ia(3,n),sa(5,n,n.return));break;case 1:mn(l,n),pn(n),o&512&&(Yt||s===null||Dn(s,s.return)),o&64&&Ft&&(n=n.updateQueue,n!==null&&(o=n.callbacks,o!==null&&(s=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=s===null?o:s.concat(o))));break;case 26:if(Bl){var h=ht;if(mn(l,n),pn(n),o&512&&(Yt||s===null||Dn(s,s.return)),o&4){o=s!==null?s.memoizedState:null;var p=n.memoizedState;s===null?p===null?n.stateNode===null?n.stateNode=gh(h,n.type,n.memoizedProps,n):vf(h,n.type,n.stateNode):n.stateNode=pf(h,p,n.memoizedProps):o!==p?(o===null?s.stateNode!==null&&gf(s.stateNode):Ci(o),p===null?vf(h,n.type,n.stateNode):pf(h,p,n.memoizedProps)):p===null&&n.stateNode!==null&&Ku(n,n.memoizedProps,s.memoizedProps)}break}case 27:if(un){mn(l,n),pn(n),o&512&&(Yt||s===null||Dn(s,s.return)),s!==null&&o&4&&Ku(n,n.memoizedProps,s.memoizedProps);break}case 5:if(mn(l,n),pn(n),o&512&&(Yt||s===null||Dn(s,s.return)),Ke){if(n.flags&32){h=n.stateNode;try{ef(h)}catch($){Ae(n,n.return,$)}}o&4&&n.stateNode!=null&&(h=n.memoizedProps,Ku(n,h,s!==null?s.memoizedProps:h)),o&1024&&(pu=!0)}else vl&&n.alternate!==null&&(n.alternate.stateNode=n.stateNode);break;case 6:if(mn(l,n),pn(n),o&4&&Ke){if(n.stateNode===null)throw Error(v(162));o=n.memoizedProps,s=s!==null?s.memoizedProps:o,h=n.stateNode;try{Gd(h,s,o)}catch($){Ae(n,n.return,$)}}break;case 3:if(Bl?(yh(),h=ht,ht=fr(l.containerInfo),mn(l,n),ht=h):mn(l,n),pn(n),o&4){if(Ke&&xt&&s!==null&&s.memoizedState.isDehydrated)try{dh(l.containerInfo)}catch($){Ae(n,n.return,$)}if(vl){o=l.containerInfo,s=l.pendingChildren;try{af(o,s)}catch($){Ae(n,n.return,$)}}}pu&&(pu=!1,lo(n));break;case 4:Bl?(s=ht,ht=fr(n.stateNode.containerInfo),mn(l,n),pn(n),ht=s):(mn(l,n),pn(n)),o&4&&vl&&Nc(n.stateNode,n,n.stateNode.pendingChildren);break;case 12:mn(l,n),pn(n);break;case 31:mn(l,n),pn(n),o&4&&(o=n.updateQueue,o!==null&&(n.updateQueue=null,La(n,o)));break;case 13:mn(l,n),pn(n),n.child.flags&8192&&n.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Sr=Rn()),o&4&&(o=n.updateQueue,o!==null&&(n.updateQueue=null,La(n,o)));break;case 22:h=n.memoizedState!==null;var y=s!==null&&s.memoizedState!==null,O=Ft,F=Yt;if(Ft=O||h,Yt=F||y,mn(l,n),Yt=F,Ft=O,pn(n),o&8192&&(l=n.stateNode,l._visibility=h?l._visibility&-2:l._visibility|1,h&&(s===null||y||Ft||Yt||pi(n)),Ke)){e:if(s=null,Ke)for(l=n;;){if(l.tag===5||Bl&&l.tag===26){if(s===null){y=s=l;try{p=y.stateNode,h?pm(p):Xd(y.stateNode,y.memoizedProps)}catch($){Ae(y,y.return,$)}}}else if(l.tag===6){if(s===null){y=l;try{var P=y.stateNode;h?Qd(P):Id(P,y.memoizedProps)}catch($){Ae(y,y.return,$)}}}else if(l.tag===18){if(s===null){y=l;try{var ae=y.stateNode;h?mh(ae):ph(y.stateNode)}catch($){Ae(y,y.return,$)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===n)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===n)break e;for(;l.sibling===null;){if(l.return===null||l.return===n)break e;s===l&&(s=null),l=l.return}s===l&&(s=null),l.sibling.return=l.return,l=l.sibling}}o&4&&(o=n.updateQueue,o!==null&&(s=o.retryQueue,s!==null&&(o.retryQueue=null,La(n,s))));break;case 19:mn(l,n),pn(n),o&4&&(o=n.updateQueue,o!==null&&(n.updateQueue=null,La(n,o)));break;case 30:break;case 21:break;default:mn(l,n),pn(n)}}function pn(n){var l=n.flags;if(l&2){try{for(var s,o=n.return;o!==null;){if(Rc(o)){s=o;break}o=o.return}if(Ke){if(s==null)throw Error(v(160));switch(s.tag){case 27:if(un){var h=s.stateNode,p=Ha(n);Pu(n,p,h);break}case 5:var y=s.stateNode;s.flags&32&&(ef(y),s.flags&=-33);var O=Ha(n);Pu(n,O,y);break;case 3:case 4:var F=s.stateNode.containerInfo,P=Ha(n);no(n,P,F);break;default:throw Error(v(161))}}}catch(ae){Ae(n,n.return,ae)}n.flags&=-3}l&4096&&(n.flags&=-4097)}function lo(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var l=n;lo(l),l.tag===5&&l.flags&1024&&Xc(l.stateNode),n=n.sibling}}function Gn(n,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)Ud(n,l.alternate,l),l=l.sibling}function pi(n){for(n=n.child;n!==null;){var l=n;switch(l.tag){case 0:case 11:case 14:case 15:sa(4,l,l.return),pi(l);break;case 1:Dn(l,l.return);var s=l.stateNode;typeof s.componentWillUnmount=="function"&&to(l,l.return,s),pi(l);break;case 27:un&&vn(l.stateNode);case 26:case 5:Dn(l,l.return),pi(l);break;case 22:l.memoizedState===null&&pi(l);break;case 30:pi(l);break;default:pi(l)}n=n.sibling}}function Al(n,l,s){for(s=s&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var o=l.alternate,h=n,p=l,y=p.flags;switch(p.tag){case 0:case 11:case 15:Al(h,p,s),ia(4,p);break;case 1:if(Al(h,p,s),o=p,h=o.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(P){Ae(o,o.return,P)}if(o=p,h=o.updateQueue,h!==null){var O=o.stateNode;try{var F=h.shared.hiddenCallbacks;if(F!==null)for(h.shared.hiddenCallbacks=null,h=0;h<F.length;h++)Pi(F[h],O)}catch(P){Ae(o,o.return,P)}}s&&y&64&&Ps(p),$s(p,p.return);break;case 27:un&&Cd(p);case 26:case 5:Al(h,p,s),s&&o===null&&y&4&&is(p),$s(p,p.return);break;case 12:Al(h,p,s);break;case 31:Al(h,p,s),s&&y&4&&Cl(h,p);break;case 13:Al(h,p,s),s&&y&4&&Ju(h,p);break;case 22:p.memoizedState===null&&Al(h,p,s),$s(p,p.return);break;case 30:break;default:Al(h,p,s)}l=l.sibling}}function vi(n,l){var s=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),n=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(n=l.memoizedState.cachePool.pool),n!==s&&(n!=null&&n.refCount++,s!=null&&Kn(s))}function wc(n,l){n=null,l.alternate!==null&&(n=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==n&&(l.refCount++,n!=null&&Kn(n))}function Dt(n,l,s,o){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)ao(n,l,s,o),l=l.sibling}function ao(n,l,s,o){var h=l.flags;switch(l.tag){case 0:case 11:case 15:Dt(n,l,s,o),h&2048&&ia(9,l);break;case 1:Dt(n,l,s,o);break;case 3:Dt(n,l,s,o),h&2048&&(n=null,l.alternate!==null&&(n=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==n&&(l.refCount++,n!=null&&Kn(n)));break;case 12:if(h&2048){Dt(n,l,s,o),n=l.stateNode;try{var p=l.memoizedProps,y=p.id,O=p.onPostCommit;typeof O=="function"&&O(y,l.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(F){Ae(l,l.return,F)}}else Dt(n,l,s,o);break;case 31:Dt(n,l,s,o);break;case 13:Dt(n,l,s,o);break;case 23:break;case 22:p=l.stateNode,y=l.alternate,l.memoizedState!==null?p._visibility&2?Dt(n,l,s,o):Js(n,l):p._visibility&2?Dt(n,l,s,o):(p._visibility|=2,$n(n,l,s,o,(l.subtreeFlags&10256)!==0||!1)),h&2048&&vi(y,l);break;case 24:Dt(n,l,s,o),h&2048&&wc(l.alternate,l);break;default:Dt(n,l,s,o)}}function $n(n,l,s,o,h){for(h=h&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var p=n,y=l,O=s,F=o,P=y.flags;switch(y.tag){case 0:case 11:case 15:$n(p,y,O,F,h),ia(8,y);break;case 23:break;case 22:var ae=y.stateNode;y.memoizedState!==null?ae._visibility&2?$n(p,y,O,F,h):Js(p,y):(ae._visibility|=2,$n(p,y,O,F,h)),h&&P&2048&&vi(y.alternate,y);break;case 24:$n(p,y,O,F,h),h&&P&2048&&wc(y.alternate,y);break;default:$n(p,y,O,F,h)}l=l.sibling}}function Js(n,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var s=n,o=l,h=o.flags;switch(o.tag){case 22:Js(s,o),h&2048&&vi(o.alternate,o);break;case 24:Js(s,o),h&2048&&wc(o.alternate,o);break;default:Js(s,o)}l=l.sibling}}function ua(n,l,s){if(n.subtreeFlags&bl)for(n=n.child;n!==null;)gi(n,l,s),n=n.sibling}function gi(n,l,s){switch(n.tag){case 26:if(ua(n,l,s),n.flags&bl)if(n.memoizedState!==null)_h(s,ht,n.memoizedState,n.memoizedProps);else{var o=n.stateNode,h=n.type;n=n.memoizedProps,((l&335544128)===l||Zc(h,n))&&So(s,o,h,n)}break;case 5:ua(n,l,s),n.flags&bl&&(o=n.stateNode,h=n.type,n=n.memoizedProps,((l&335544128)===l||Zc(h,n))&&So(s,o,h,n));break;case 3:case 4:Bl?(o=ht,ht=fr(n.stateNode.containerInfo),ua(n,l,s),ht=o):ua(n,l,s);break;case 22:n.memoizedState===null&&(o=n.alternate,o!==null&&o.memoizedState!==null?(o=bl,bl=16777216,ua(n,l,s),bl=o):ua(n,l,s));break;default:ua(n,l,s)}}function io(n){var l=n.alternate;if(l!==null&&(n=l.child,n!==null)){l.child=null;do l=n.sibling,n.sibling=null,n=l;while(n!==null)}}function Ws(n){var l=n.deletions;if((n.flags&16)!==0){if(l!==null)for(var s=0;s<l.length;s++){var o=l[s];Xt=o,hl(o,n)}io(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)so(n),n=n.sibling}function so(n){switch(n.tag){case 0:case 11:case 15:Ws(n),n.flags&2048&&sa(9,n,n.return);break;case 3:Ws(n);break;case 12:Ws(n);break;case 22:var l=n.stateNode;n.memoizedState!==null&&l._visibility&2&&(n.return===null||n.return.tag!==13)?(l._visibility&=-3,er(n)):Ws(n);break;default:Ws(n)}}function er(n){var l=n.deletions;if((n.flags&16)!==0){if(l!==null)for(var s=0;s<l.length;s++){var o=l[s];Xt=o,hl(o,n)}io(n)}for(n=n.child;n!==null;){switch(l=n,l.tag){case 0:case 11:case 15:sa(8,l,l.return),er(l);break;case 22:s=l.stateNode,s._visibility&2&&(s._visibility&=-3,er(l));break;default:er(l)}n=n.sibling}}function hl(n,l){for(;Xt!==null;){var s=Xt;switch(s.tag){case 0:case 11:case 15:sa(8,s,l);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var o=s.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:Kn(s.memoizedState.cache)}if(o=s.child,o!==null)o.return=s,Xt=o;else e:for(s=n;Xt!==null;){o=Xt;var h=o.sibling,p=o.return;if(Bc(o),o===s){Xt=null;break e}if(h!==null){h.return=p,Xt=h;break e}Xt=p}}}function yi(n){var l=we(n);if(l!=null){if(typeof l.memoizedProps["data-testname"]!="string")throw Error(v(364));return l}if(n=Zt(n),n===null)throw Error(v(362));return n.stateNode.current}function _i(n,l){var s=n.tag;switch(l.$$typeof){case Fl:if(n.type===l.value)return!0;break;case gu:e:{for(l=l.value,n=[n,0],s=0;s<n.length;){var o=n[s++],h=o.tag,p=n[s++],y=l[p];if(h!==5&&h!==26&&h!==27||!xi(o)){for(;y!=null&&_i(o,y);)p++,y=l[p];if(p===l.length){l=!0;break e}else for(o=o.child;o!==null;)n.push(o,p),o=o.sibling}}l=!1}return l;case yu:if((s===5||s===26||s===27)&&Pc(n.stateNode,l.value))return!0;break;case Bi:if((s===5||s===6||s===26||s===27)&&(n=or(n),n!==null&&0<=n.indexOf(l.value)))return!0;break;case _r:if((s===5||s===26||s===27)&&(n=n.memoizedProps["data-testname"],typeof n=="string"&&n.toLowerCase()===l.value.toLowerCase()))return!0;break;default:throw Error(v(365))}return!1}function eu(n){switch(n.$$typeof){case Fl:return"<"+(x(n.value)||"Unknown")+">";case gu:return":has("+(eu(n)||"")+")";case yu:return'[role="'+n.value+'"]';case Bi:return'"'+n.value+'"';case _r:return'[data-testname="'+n.value+'"]';default:throw Error(v(365))}}function tu(n,l){var s=[];n=[n,0];for(var o=0;o<n.length;){var h=n[o++],p=h.tag,y=n[o++],O=l[y];if(p!==5&&p!==26&&p!==27||!xi(h)){for(;O!=null&&_i(h,O);)y++,O=l[y];if(y===l.length)s.push(h);else for(h=h.child;h!==null;)n.push(h,y),h=h.sibling}}return s}function Jn(n,l){if(!sn)throw Error(v(363));n=yi(n),n=tu(n,l),l=[],n=Array.from(n);for(var s=0;s<n.length;){var o=n[s++],h=o.tag;if(h===5||h===26||h===27)xi(o)||l.push(o.stateNode);else for(o=o.child;o!==null;)n.push(o),o=o.sibling}return l}function Ot(){return(Ye&2)!==0&&Xe!==0?Xe&-Xe:ze.T!==null?sc():cu()}function ka(){if(Qn===0)if((Xe&536870912)===0||Qe){var n=ys;ys<<=1,(ys&3932160)===0&&(ys=262144),Qn=n}else Qn=536870912;return n=al.current,n!==null&&(n.flags|=32),Qn}function Rt(n,l,s){(n===Ge&&(mt===2||mt===9)||n.cancelPendingCommit!==null)&&(Gt(n,0),oa(n,Xe,Qn,!1)),ie(n,s),((Ye&2)===0||n!==Ge)&&(n===Ge&&((Ye&2)===0&&(Li|=s),Ht===4&&oa(n,Xe,Qn,!1)),ea(n))}function Il(n,l,s){if((Ye&6)!==0)throw Error(v(327));var o=!s&&(l&127)===0&&(l&n.expiredLanes)===0||B(n,l),h=o?Rd(n,l):ca(n,l,!0),p=o;do{if(h===0){wi&&!o&&oa(n,l,0,!1);break}else{if(s=n.current.alternate,p&&!Ad(s)){h=ca(n,l,!1),p=!1;continue}if(h===2){if(p=l,n.errorRecoveryDisabledLanes&p)var y=0;else y=n.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){l=y;e:{var O=n;h=br;var F=xt&&O.current.memoizedState.isDehydrated;if(F&&(Gt(O,y).flags|=256),y=ca(O,y,!1),y!==2){if(Hi&&!F){O.errorRecoveryDisabledLanes|=p,Li|=p,h=4;break e}p=sl,sl=h,p!==null&&(sl===null?sl=p:sl.push.apply(sl,p))}h=y}if(p=!1,h!==2)continue}}if(h===1){Gt(n,0),oa(n,l,0,!0);break}e:{switch(o=n,p=h,p){case 0:case 1:throw Error(v(345));case 4:if((l&4194048)!==l)break;case 6:oa(o,l,Qn,!Jl);break e;case 2:sl=null;break;case 3:case 5:break;default:throw Error(v(329))}if((l&62914560)===l&&(h=Sr+300-Rn(),10<h)){if(oa(o,l,Qn,!Jl),U(o,0,!0)!==0)break e;za=l,o.timeoutHandle=qc(ra.bind(null,o,s,sl,Er,Yo,l,Qn,Li,bu,Jl,p,"Throttled",-0,0),h);break e}ra(o,s,sl,Er,Yo,l,Qn,Li,bu,Jl,p,null,-0,0)}}break}while(!0);ea(n)}function ra(n,l,s,o,h,p,y,O,F,P,ae,$,oe,Be){if(n.timeoutHandle=tl,$=l.subtreeFlags,$&8192||($&16785408)===16785408){$=Qc(),gi(l,p,$);var Kt=(p&62914560)===p?Sr-Rn():(p&4194048)===p?Os-Rn():0;if(Kt=jd($,Kt),Kt!==null){za=p,n.cancelPendingCommit=Kt(da.bind(null,n,l,p,s,o,h,y,O,F,ae,$,null,oe,Be)),oa(n,p,y,!P);return}}da(n,l,p,s,o,h,y,O,F)}function Ad(n){for(var l=n;;){var s=l.tag;if((s===0||s===11||s===15)&&l.flags&16384&&(s=l.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var o=0;o<s.length;o++){var h=s[o],p=h.getSnapshot;h=h.value;try{if(!Qt(p(),h))return!1}catch{return!1}}if(s=l.child,l.subtreeFlags&16384&&s!==null)s.return=l,l=s;else{if(l===n)break;for(;l.sibling===null;){if(l.return===null||l.return===n)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function oa(n,l,s,o){l&=~_u,l&=~Li,n.suspendedLanes|=l,n.pingedLanes&=~l,o&&(n.warmLanes|=l),o=n.expirationTimes;for(var h=l;0<h;){var p=31-nl(h),y=1<<p;o[p]=-1,h&=~y}s!==0&&he(n,s,l)}function uo(){return(Ye&6)===0?(Qi(0),!1):!0}function ro(){if(qe!==null){if(mt===0)var n=qe.return;else n=qe,Pl=bt=null,ku(n),Di=null,bs=0,n=qe;for(;n!==null;)Md(n.alternate,n),n=n.return;qe=null}}function Gt(n,l){var s=n.timeoutHandle;s!==tl&&(n.timeoutHandle=tl,kd(s)),s=n.cancelPendingCommit,s!==null&&(n.cancelPendingCommit=null,s()),za=0,ro(),Ge=n,qe=s=pl(n.current,null),Xe=l,mt=0,tn=null,Jl=!1,wi=B(n,l),Hi=!1,bu=Qn=_u=Li=Pa=Ht=0,sl=br=null,Yo=!1,(l&8)!==0&&(l|=l&32);var o=n.entangledLanes;if(o!==0)for(n=n.entanglements,o&=l;0<o;){var h=31-nl(o),p=1<<h;l|=n[h],o&=~p}return Ta=l,ws(),s}function _t(n,l){He=null,ze.H=_l,l===cn||l===Gl?(l=Dr(),mt=3):l===Vo?(l=Dr(),mt=4):mt=l===Zn?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,tn=l,qe===null&&(Ht=1,$r(n,Te(l,n.current)))}function Ie(){var n=al.current;return n===null?!0:(Xe&4194048)===Xe?il===null:(Xe&62914560)===Xe||(Xe&536870912)!==0?n===il:!1}function ja(){var n=ze.H;return ze.H=_l,n===null?_l:n}function ml(){var n=ze.A;return ze.A=vu,n}function nu(){Ht=4,Jl||(Xe&4194048)!==Xe&&al.current!==null||(wi=!0),(Pa&134217727)===0&&(Li&134217727)===0||Ge===null||oa(Ge,Xe,Qn,!1)}function ca(n,l,s){var o=Ye;Ye|=2;var h=ja(),p=ml();(Ge!==n||Xe!==l)&&(Er=null,Gt(n,l)),l=!1;var y=Ht;e:do try{if(mt!==0&&qe!==null){var O=qe,F=tn;switch(mt){case 8:ro(),y=6;break e;case 3:case 2:case 9:case 6:al.current===null&&(l=!0);var P=mt;if(mt=0,tn=null,fa(n,O,F,P),s&&wi){y=0;break e}break;default:P=mt,mt=0,tn=null,fa(n,O,F,P)}}Dd(),y=Ht;break}catch(ae){_t(n,ae)}while(!0);return l&&n.shellSuspendCounter++,Pl=bt=null,Ye=o,ze.H=h,ze.A=p,qe===null&&(Ge=null,Xe=0,ws()),y}function Dd(){for(;qe!==null;)bi(qe)}function Rd(n,l){var s=Ye;Ye|=2;var o=ja(),h=ml();Ge!==n||Xe!==l?(Er=null,ki=Rn()+500,Gt(n,l)):wi=B(n,l);e:do try{if(mt!==0&&qe!==null){l=qe;var p=tn;t:switch(mt){case 1:mt=0,tn=null,fa(n,l,p,1);break;case 2:case 9:if(Rs(p)){mt=0,tn=null,oo(l);break}l=function(){mt!==2&&mt!==9||Ge!==n||(mt=7),ea(n)},p.then(l,l);break e;case 3:mt=7;break e;case 4:mt=5;break e;case 7:Rs(p)?(mt=0,tn=null,oo(l)):(mt=0,tn=null,fa(n,l,p,7));break;case 5:var y=null;switch(qe.tag){case 26:y=qe.memoizedState;case 5:case 27:var O=qe,F=O.type,P=O.pendingProps;if(y?_f(y):Nt(O.stateNode,F,P)){mt=0,tn=null;var ae=O.sibling;if(ae!==null)qe=ae;else{var $=O.return;$!==null?(qe=$,au($)):qe=null}break t}}mt=0,tn=null,fa(n,l,p,5);break;case 6:mt=0,tn=null,fa(n,l,p,6);break;case 8:ro(),Ht=6;break e;default:throw Error(v(462))}}lu();break}catch(oe){_t(n,oe)}while(!0);return Pl=bt=null,ze.H=o,ze.A=h,Ye=s,qe!==null?0:(Ge=null,Xe=0,ws(),Ht)}function lu(){for(;qe!==null&&!Sh();)bi(qe)}function bi(n){var l=Cc(n.alternate,n,Ta);n.memoizedProps=n.pendingProps,l===null?au(n):qe=l}function oo(n){var l=n,s=l.alternate;switch(l.tag){case 15:case 0:l=Ec(s,l,l.pendingProps,l.type,void 0,Xe);break;case 11:l=Ec(s,l,l.pendingProps,l.type.render,l.ref,Xe);break;case 5:ku(l);default:Md(s,l),l=qe=ho(l,Ta),l=Cc(s,l,Ta)}n.memoizedProps=n.pendingProps,l===null?au(n):qe=l}function fa(n,l,s,o){Pl=bt=null,ku(l),Di=null,bs=0;var h=l.return;try{if(fm(n,h,l,s,Xe)){Ht=1,$r(n,Te(s,n.current)),qe=null;return}}catch(p){if(h!==null)throw qe=h,p;Ht=1,$r(n,Te(s,n.current)),qe=null;return}l.flags&32768?(Qe||o===1?n=!0:wi||(Xe&536870912)!==0?n=!1:(Jl=n=!0,(o===2||o===9||o===3||o===6)&&(o=al.current,o!==null&&o.tag===13&&(o.flags|=16384))),Si(l,n)):au(l)}function au(n){var l=n;do{if((l.flags&32768)!==0){Si(l,Jl);return}n=l.return;var s=xd(l.alternate,l,Ta);if(s!==null){qe=s;return}if(l=l.sibling,l!==null){qe=l;return}qe=l=n}while(l!==null);Ht===0&&(Ht=5)}function Si(n,l){do{var s=Dc(n.alternate,n);if(s!==null){s.flags&=32767,qe=s;return}if(s=n.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!l&&(n=n.sibling,n!==null)){qe=n;return}qe=n=s}while(n!==null);Ht=6,qe=null}function da(n,l,s,o,h,p,y,O,F){n.cancelPendingCommit=null;do ma();while(nn!==0);if((Ye&6)!==0)throw Error(v(327));if(l!==null){if(l===n.current)throw Error(v(177));if(p=l.lanes|l.childLanes,p|=Ss,ce(n,s,p,y,O,F),n===Ge&&(qe=Ge=null,Xe=0),xs=l,Ja=n,za=s,Su=p,qo=h,Cf=o,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,Wt(hr,function(){return tr(),null})):(n.callbackNode=null,n.callbackPriority=0),o=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||o){o=ze.T,ze.T=null,h=Nl(),Ze(2),y=Ye,Ye|=4;try{dm(n,l,s)}finally{Ye=y,Ze(h),ze.T=o}}nn=1,Ga(),ha(),co()}}function Ga(){if(nn===1){nn=0;var n=Ja,l=xs,s=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||s){s=ze.T,ze.T=null;var o=Nl();Ze(2);var h=Ye;Ye|=4;try{Wu(l,n),Ld(n.containerInfo)}finally{Ye=h,Ze(o),ze.T=s}}n.current=l,nn=2}}function ha(){if(nn===2){nn=0;var n=Ja,l=xs,s=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||s){s=ze.T,ze.T=null;var o=Nl();Ze(2);var h=Ye;Ye|=4;try{Ud(n,l.alternate,l)}finally{Ye=h,Ze(o),ze.T=s}}nn=3}}function co(){if(nn===4||nn===3){nn=0,Sf();var n=Ja,l=xs,s=za,o=Cf;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?nn=5:(nn=0,xs=Ja=null,fo(n,n.pendingLanes));var h=n.pendingLanes;if(h===0&&($a=null),Pe(s),l=l.stateNode,ll&&typeof ll.onCommitFiberRoot=="function")try{ll.onCommitFiberRoot(_s,l,void 0,(l.current.flags&128)===128)}catch{}if(o!==null){l=ze.T,h=Nl(),Ze(2),ze.T=null;try{for(var p=n.onRecoverableError,y=0;y<o.length;y++){var O=o[y];p(O.value,{componentStack:O.stack})}}finally{ze.T=l,Ze(h)}}(za&3)!==0&&ma(),ea(n),h=n.pendingLanes,(s&261930)!==0&&(h&42)!==0?n===Tr?nt++:(nt=0,Tr=n):nt=0,xt&&cr(),Qi(0)}}function fo(n,l){(n.pooledCacheLanes&=l)===0&&(l=n.pooledCache,l!=null&&(n.pooledCache=null,Kn(l)))}function ma(){return Ga(),ha(),co(),tr()}function tr(){if(nn!==5)return!1;var n=Ja,l=Su;Su=0;var s=Pe(za),o=32>s?32:s;s=ze.T;var h=Nl();try{Ze(o),ze.T=null,o=qo,qo=null;var p=Ja,y=za;if(nn=0,xs=Ja=null,za=0,(Ye&6)!==0)throw Error(v(331));var O=Ye;if(Ye|=4,so(p.current),ao(p,p.current,y,o),Ye=O,Qi(0,!1),ll&&typeof ll.onPostCommitFiberRoot=="function")try{ll.onPostCommitFiberRoot(_s,p)}catch{}return!0}finally{Ze(h),ze.T=s,fo(n,l)}}function Ei(n,l,s){l=Te(s,l),l=bc(n.stateNode,l,2),n=oi(n,l,2),n!==null&&(ie(n,2),ea(n))}function Ae(n,l,s){if(n.tag===3)Ei(n,n,s);else for(;l!==null;){if(l.tag===3){Ei(l,n,s);break}else if(l.tag===1){var o=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&($a===null||!$a.has(o))){n=Te(s,n),s=md(2),o=oi(l,s,2),o!==null&&(pd(s,o,l,n),ie(o,2),ea(o));break}}l=l.return}}function iu(n,l,s){var o=n.pingCache;if(o===null){o=n.pingCache=new Sl;var h=new Set;o.set(l,h)}else h=o.get(l),h===void 0&&(h=new Set,o.set(l,h));h.has(s)||(Hi=!0,h.add(s),n=Nd.bind(null,n,l,s),l.then(n,n))}function Nd(n,l,s){var o=n.pingCache;o!==null&&o.delete(l),n.pingedLanes|=n.suspendedLanes&s,n.warmLanes&=~s,Ge===n&&(Xe&s)===s&&(Ht===4||Ht===3&&(Xe&62914560)===Xe&&300>Rn()-Sr?(Ye&2)===0&&Gt(n,0):_u|=s,bu===Xe&&(bu=0)),ea(n)}function Bd(n,l){l===0&&(l=ne()),n=ui(n,l),n!==null&&(ie(n,l),ea(n))}function hm(n){var l=n.memoizedState,s=0;l!==null&&(s=l.retryLane),Bd(n,s)}function mm(n,l){var s=0;switch(n.tag){case 31:case 13:var o=n.stateNode,h=n.memoizedState;h!==null&&(s=h.retryLane);break;case 19:o=n.stateNode;break;case 22:o=n.stateNode._retryCache;break;default:throw Error(v(314))}o!==null&&o.delete(l),Bd(n,s)}function Wt(n,l){return dr(n,l)}function Hc(n,l,s,o){this.tag=n,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ss(n){return n=n.prototype,!(!n||!n.isReactComponent)}function pl(n,l){var s=n.alternate;return s===null?(s=d(n.tag,l,n.key,n.mode),s.elementType=n.elementType,s.type=n.type,s.stateNode=n.stateNode,s.alternate=n,n.alternate=s):(s.pendingProps=l,s.type=n.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=n.flags&65011712,s.childLanes=n.childLanes,s.lanes=n.lanes,s.child=n.child,s.memoizedProps=n.memoizedProps,s.memoizedState=n.memoizedState,s.updateQueue=n.updateQueue,l=n.dependencies,s.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},s.sibling=n.sibling,s.index=n.index,s.ref=n.ref,s.refCleanup=n.refCleanup,s}function ho(n,l){n.flags&=65011714;var s=n.alternate;return s===null?(n.childLanes=0,n.lanes=l,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=s.childLanes,n.lanes=s.lanes,n.child=s.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=s.memoizedProps,n.memoizedState=s.memoizedState,n.updateQueue=s.updateQueue,n.type=s.type,l=s.dependencies,n.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),n}function Va(n,l,s,o,h,p){var y=0;if(o=n,typeof n=="function")ss(n)&&(y=1);else if(typeof n=="string")y=Bl&&un?Co(n,s,gn.current)?26:bf(n)?27:5:Bl?Co(n,s,gn.current)?26:5:un&&bf(n)?27:5;else e:switch(n){case ir:return n=d(31,s,l,h),n.elementType=ir,n.lanes=p,n;case cs:return Dl(s.children,h,p,l);case fs:y=8,h|=24;break;case ds:return n=d(12,s,l,h|2),n.elementType=ds,n.lanes=p,n;case go:return n=d(13,s,l,h),n.elementType=go,n.lanes=p,n;case Fa:return n=d(19,s,l,h),n.elementType=Fa,n.lanes=p,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case Rl:y=10;break e;case ar:y=9;break e;case su:y=11;break e;case yo:y=14;break e;case Vn:y=16,o=null;break e}y=29,s=Error(v(130,n===null?"null":typeof n,"")),o=null}return l=d(y,s,l,h),l.elementType=n,l.type=o,l.lanes=p,l}function Dl(n,l,s,o){return n=d(7,n,o,l),n.lanes=s,n}function Lc(n,l,s){return n=d(6,n,null,l),n.lanes=s,n}function kc(n){var l=d(18,null,null,0);return l.stateNode=n,l}function jc(n,l,s){return l=d(4,n.children!==null?n.children:[],n.key,l),l.lanes=s,l.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},l}function wd(n,l,s,o,h,p,y,O,F){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=tl,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=re(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=re(0),this.hiddenUpdates=re(null),this.identifierPrefix=o,this.onUncaughtError=h,this.onCaughtError=p,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=F,this.incompleteTransitions=new Map}function Ti(n,l,s,o,h,p,y,O,F,P,ae,$){return n=new wd(n,l,s,y,F,P,ae,$,O),l=1,p===!0&&(l|=24),p=d(3,null,null,l),n.current=p,p.stateNode=n,l=Us(),l.refCount++,n.pooledCache=l,l.refCount++,p.memoizedState={element:o,isDehydrated:s,cache:l},Cn(p),n}function mo(n){return n?(n=va,n):va}function nr(n){var l=n._reactInternals;if(l===void 0)throw typeof n.render=="function"?Error(v(188)):(n=Object.keys(n).join(","),Error(v(268,n)));return n=E(l),n=n!==null?T(n):null,n===null?null:ru(n.stateNode)}function Gc(n,l,s,o,h,p){h=mo(h),o.context===null?o.context=h:o.pendingContext=h,o=ta(l),o.payload={element:s},p=p===void 0?null:p,p!==null&&(o.callback=p),s=oi(n,o,l),s!==null&&(Rt(s,n,l),wu(s,n,l))}function us(n,l){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var s=n.retryLane;n.retryLane=s!==0&&s<l?s:l}}function lr(n,l){us(n,l),(n=n.alternate)&&us(n,l)}var ke={},po=o0,Wn=c1,vo=Object.assign,rs=Symbol.for("react.element"),pa=Symbol.for("react.transitional.element"),os=Symbol.for("react.portal"),cs=Symbol.for("react.fragment"),fs=Symbol.for("react.strict_mode"),ds=Symbol.for("react.profiler"),ar=Symbol.for("react.consumer"),Rl=Symbol.for("react.context"),su=Symbol.for("react.forward_ref"),go=Symbol.for("react.suspense"),Fa=Symbol.for("react.suspense_list"),yo=Symbol.for("react.memo"),Vn=Symbol.for("react.lazy"),ir=Symbol.for("react.activity"),Vc=Symbol.for("react.memo_cache_sentinel"),Ya=Symbol.iterator,zi=Symbol.for("react.client.reference"),Oi=Array.isArray,ze=po.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Fc=r.rendererVersion,sr=r.rendererPackageName,uu=r.extraDevToolsConfig,ru=r.getPublicInstance,Hd=r.getRootHostContext,ou=r.getChildHostContext,_o=r.prepareForCommit,Ld=r.resetAfterCommit,Yc=r.createInstance;r.cloneMutableInstance;var ur=r.appendInitialChild,el=r.finalizeInitialChildren,Fn=r.shouldSetTextContent,qa=r.createTextInstance;r.cloneMutableTextInstance;var qc=r.scheduleTimeout,kd=r.cancelTimeout,tl=r.noTimeout,qt=r.isPrimaryRenderer;r.warnsIfNotActing;var Ke=r.supportsMutation,vl=r.supportsPersistence,xt=r.supportsHydration,we=r.getInstanceFromNode;r.beforeActiveInstanceBlur;var pt=r.preparePortalMount;r.prepareScopeUpdate,r.getInstanceFromScope;var Ze=r.setCurrentUpdatePriority,Nl=r.getCurrentUpdatePriority,cu=r.resolveUpdatePriority;r.trackSchedulerEvent,r.resolveEventType,r.resolveEventTimeStamp;var hs=r.shouldAttemptEagerTransition,bo=r.detachDeletedInstance;r.requestPostPaintCallback;var rr=r.maySuspendCommit,fu=r.maySuspendCommitOnUpdate,Zc=r.maySuspendCommitInSyncRender,Nt=r.preloadInstance,Qc=r.startSuspendingCommit,So=r.suspendInstance;r.suspendOnActiveViewTransition;var jd=r.waitForCommitToBeReady;r.getSuspendedCommitReason;var ms=r.NotPendingTransition,ps=r.HostTransitionContext,Xc=r.resetFormInstance;r.bindToConsole;var Ic=r.supportsMicrotasks,Kc=r.scheduleMicrotask,sn=r.supportsTestSelectors,Zt=r.findFiberRoot,Eo=r.getBoundingRect,or=r.getTextContent,xi=r.isHiddenSubtree,Pc=r.matchAccessibilityRole,Za=r.setFocusIfFocusable,To=r.setupIntersectionObserver,$c=r.appendChild,Jc=r.appendChildToContainer,Gd=r.commitTextUpdate,Vd=r.commitMount,Fd=r.commitUpdate,Yd=r.insertBefore,qd=r.insertInContainerBefore,Zd=r.removeChild,Wc=r.removeChildFromContainer,ef=r.resetTextContent,pm=r.hideInstance,Qd=r.hideTextInstance,Xd=r.unhideInstance,Id=r.unhideTextInstance;r.cancelViewTransitionName,r.cancelRootViewTransitionName,r.restoreRootViewTransitionName,r.cloneRootViewTransitionContainer,r.removeRootViewTransitionClone,r.measureClonedInstance,r.hasInstanceChanged,r.hasInstanceAffectedParent,r.startViewTransition,r.startGestureTransition,r.stopViewTransition,r.getCurrentGestureOffset,r.createViewTransitionInstance;var tf=r.clearContainer;r.createFragmentInstance,r.updateFragmentInstanceFiber,r.commitNewChildToFragmentInstance,r.deleteChildFromFragmentInstance;var Kd=r.cloneInstance,nf=r.createContainerChildSet,lf=r.appendChildToContainerChildSet,Pd=r.finalizeContainerChildren,af=r.replaceContainerChildren,$d=r.cloneHiddenInstance,sf=r.cloneHiddenTextInstance,Mi=r.isSuspenseInstancePending,zo=r.isSuspenseInstanceFallback,Oo=r.getSuspenseInstanceFallbackErrorDetails,xo=r.registerSuspenseInstanceRetry,Jd=r.canHydrateFormStateMarker,uf=r.isFormStateMarkerMatching,Wd=r.getNextHydratableSibling,eh=r.getNextHydratableSiblingAfterSingleton,th=r.getFirstHydratableChild,nh=r.getFirstHydratableChildWithinContainer,lh=r.getFirstHydratableChildWithinActivityInstance,ah=r.getFirstHydratableChildWithinSuspenseInstance,rf=r.getFirstHydratableChildWithinSingleton,ih=r.canHydrateInstance,sh=r.canHydrateTextInstance,of=r.canHydrateActivityInstance,uh=r.canHydrateSuspenseInstance,rh=r.hydrateInstance,vm=r.hydrateTextInstance,cf=r.hydrateActivityInstance,oh=r.hydrateSuspenseInstance,ch=r.getNextHydratableInstanceAfterActivityInstance,ff=r.getNextHydratableInstanceAfterSuspenseInstance,fh=r.commitHydratedInstance,dh=r.commitHydratedContainer,gm=r.commitHydratedActivityInstance,ym=r.commitHydratedSuspenseInstance,hh=r.finalizeHydratedChildren,cr=r.flushHydrationEvents;r.clearActivityBoundary;var df=r.clearSuspenseBoundary;r.clearActivityBoundaryFromContainer;var Mo=r.clearSuspenseBoundaryFromContainer,mh=r.hideDehydratedBoundary,ph=r.unhideDehydratedBoundary,du=r.shouldDeleteUnhydratedTailInstances;r.diffHydratedPropsForDevWarnings,r.diffHydratedTextForDevWarnings,r.describeHydratableInstanceForDevWarnings;var vh=r.validateHydratableInstance,hf=r.validateHydratableTextInstance,Bl=r.supportsResources,Co=r.isHostHoistableType,fr=r.getHoistableRoot,mf=r.getResource,pf=r.acquireResource,Ci=r.releaseResource,gh=r.hydrateHoistable,vf=r.mountHoistable,gf=r.unmountHoistable,Uo=r.createHoistableInstance,yh=r.prepareToCommitHoistables,yf=r.mayResourceSuspendCommit,_f=r.preloadResource,_h=r.suspendResource,un=r.supportsSingletons,Ao=r.resolveSingletonInstance,en=r.acquireSingletonInstance,vn=r.releaseSingletonInstance,bf=r.isHostSingletonType,vs=r.isSingletonScope,Do=[],gs=-1,va={},nl=Math.clz32?Math.clz32:ee,Ro=Math.log,bh=Math.LN2,No=256,ys=262144,hu=4194304,dr=Wn.unstable_scheduleCallback,Bo=Wn.unstable_cancelCallback,Sh=Wn.unstable_shouldYield,Sf=Wn.unstable_requestPaint,Rn=Wn.unstable_now,wo=Wn.unstable_ImmediatePriority,Eh=Wn.unstable_UserBlockingPriority,hr=Wn.unstable_NormalPriority,Ho=Wn.unstable_IdlePriority,Ef=Wn.log,Th=Wn.unstable_setDisableYieldValue,_s=null,ll=null,Qt=typeof Object.is=="function"?Object.is:be,Lo=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},_m=Object.prototype.hasOwnProperty,ko,ga,mr=!1,Tf=new WeakMap,Qa=[],ya=0,vt=null,pr=0,wl=[],gl=0,Hl=null,Tn=1,Kl="",gn=V(null),Xa=V(null),zn=V(null),vr=V(null),rn=null,Mt=null,Qe=!1,_a=null,Yn=!1,jo=Error(v(519)),Ll=V(null),bt=null,Pl=null,zh=typeof AbortController<"u"?AbortController:function(){var n=[],l=this.signal={aborted:!1,addEventListener:function(s,o){n.push(o)}};this.abort=function(){l.aborted=!0,n.forEach(function(s){return s()})}},yn=Wn.unstable_scheduleCallback,bm=Wn.unstable_NormalPriority,Ct={$$typeof:Rl,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0},gr=null,dt=null,Nn=!1,kl=!1,Go=!1,Ui=0,mu=null,zf=0,Ia=0,on=null,jl=ze.S;ze.S=function(n,l){Os=Rn(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&rm(n,l),jl!==null&&jl(n,l)};var Ai=V(null),cn=Error(v(460)),Vo=Error(v(474)),Gl=Error(v(542)),ba={then:function(){}},qn=null,Di=null,bs=0,On=uc(!0),Of=uc(!1),xn=[],Sa=0,Ss=0,yl=!1,Fo=!1,Es=V(null),Ri=V(0),al=V(null),il=null,Vt=V(0),Ka=0,He=null,ge=null,Re=null,je=!1,Le=!1,$e=!1,Bn=0,Vl=0,$l=null,xf=0,_l={readContext:an,use:js,useCallback:At,useContext:At,useEffect:At,useImperativeHandle:At,useLayoutEffect:At,useInsertionEffect:At,useMemo:At,useReducer:At,useRef:At,useState:At,useDebugValue:At,useDeferredValue:At,useTransition:At,useSyncExternalStore:At,useId:At,useHostTransitionStatus:At,useFormState:At,useActionState:At,useOptimistic:At,useMemoCache:At,useCacheRefresh:At};_l.useEffectEvent=At;var Bt={readContext:an,use:js,useCallback:function(n,l){return Un().memoizedState=[n,l===void 0?null:l],n},useContext:an,useEffect:Vu,useImperativeHandle:function(n,l,s){s=s!=null?s.concat([n]):null,es(4194308,4,Ys.bind(null,l,n),s)},useLayoutEffect:function(n,l){return es(4194308,4,n,l)},useInsertionEffect:function(n,l){es(4,2,n,l)},useMemo:function(n,l){var s=Un();l=l===void 0?null:l;var o=n();if($e){ve(!0);try{n()}finally{ve(!1)}}return s.memoizedState=[o,l],o},useReducer:function(n,l,s){var o=Un();if(s!==void 0){var h=s(l);if($e){ve(!0);try{s(l)}finally{ve(!1)}}}else h=l;return o.memoizedState=o.baseState=h,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:h},o.queue=n,n=n.dispatch=cm.bind(null,He,n),[o.memoizedState,n]},useRef:function(n){var l=Un();return n={current:n},l.memoizedState=n},useState:function(n){n=dc(n);var l=n.queue,s=cd.bind(null,He,l);return l.dispatch=s,[n.memoizedState,s]},useDebugValue:Yu,useDeferredValue:function(n,l){var s=Un();return Zs(s,n,l)},useTransition:function(){var n=dc(!1);return n=ud.bind(null,He,n.queue,!0,!1),Un().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,l,s){var o=He,h=Un();if(Qe){if(s===void 0)throw Error(v(407));s=s()}else{if(s=l(),Ge===null)throw Error(v(349));(Xe&127)!==0||ld(o,l,s)}h.memoizedState=s;var p={value:s,getSnapshot:l};return h.queue=p,Vu(fc.bind(null,o,p,n),[n]),o.flags|=2048,dl(9,{destroy:void 0},cc.bind(null,o,p,s,l),null),s},useId:function(){var n=Un(),l=Ge.identifierPrefix;if(Qe){var s=Kl,o=Tn;s=(o&~(1<<32-nl(o)-1)).toString(32)+s,l="_"+l+"R_"+s,s=Bn++,0<s&&(l+="H"+s.toString(32)),l+="_"}else s=xf++,l="_"+l+"r_"+s.toString(32)+"_";return n.memoizedState=l},useHostTransitionStatus:gc,useFormState:mc,useActionState:mc,useOptimistic:function(n){var l=Un();l.memoizedState=l.baseState=n;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=s,l=Ir.bind(null,He,!0,s),s.dispatch=l,[n,l]},useMemoCache:kr,useCacheRefresh:function(){return Un().memoizedState=om.bind(null,He)},useEffectEvent:function(n){var l=Un(),s={impl:n};return l.memoizedState=s,function(){if((Ye&2)!==0)throw Error(v(440));return s.impl.apply(void 0,arguments)}}},Ea={readContext:an,use:js,useCallback:Qr,useContext:an,useEffect:Fs,useImperativeHandle:sd,useInsertionEffect:hi,useLayoutEffect:Fu,useMemo:qs,useReducer:Ba,useRef:Zr,useState:function(){return Ba(Xl)},useDebugValue:Yu,useDeferredValue:function(n,l){var s=zt();return vc(s,ge.memoizedState,n,l)},useTransition:function(){var n=Ba(Xl)[0],l=zt().memoizedState;return[typeof n=="boolean"?n:An(n),l]},useSyncExternalStore:Ji,useId:Xr,useHostTransitionStatus:gc,useFormState:Gs,useActionState:Gs,useOptimistic:function(n,l){var s=zt();return ju(s,ge,n,l)},useMemoCache:kr,useCacheRefresh:od};Ea.useEffectEvent=kn;var Ni={readContext:an,use:js,useCallback:Qr,useContext:an,useEffect:Fs,useImperativeHandle:sd,useInsertionEffect:hi,useLayoutEffect:Fu,useMemo:qs,useReducer:Gr,useRef:Zr,useState:function(){return Gr(Xl)},useDebugValue:Yu,useDeferredValue:function(n,l){var s=zt();return ge===null?Zs(s,n,l):vc(s,ge.memoizedState,n,l)},useTransition:function(){var n=Gr(Xl)[0],l=zt().memoizedState;return[typeof n=="boolean"?n:An(n),l]},useSyncExternalStore:Ji,useId:Xr,useHostTransitionStatus:gc,useFormState:Vs,useActionState:Vs,useOptimistic:function(n,l){var s=zt();return ge!==null?ju(s,ge,n,l):(s.baseState=n,[n,s.queue.dispatch])},useMemoCache:kr,useCacheRefresh:od};Ni.useEffectEvent=kn;var yr={enqueueSetState:function(n,l,s){n=n._reactInternals;var o=Ot(),h=ta(o);h.payload=l,s!=null&&(h.callback=s),l=oi(n,h,o),l!==null&&(Rt(l,n,o),wu(l,n,o))},enqueueReplaceState:function(n,l,s){n=n._reactInternals;var o=Ot(),h=ta(o);h.tag=1,h.payload=l,s!=null&&(h.callback=s),l=oi(n,h,o),l!==null&&(Rt(l,n,o),wu(l,n,o))},enqueueForceUpdate:function(n,l){n=n._reactInternals;var s=Ot(),o=ta(s);o.tag=2,l!=null&&(o.callback=l),l=oi(n,o,s),l!==null&&(Rt(l,n,s),wu(l,n,s))}},Zn=Error(v(461)),Tt=!1,Ts={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},Ft=!1,Yt=!1,pu=!1,Mf=typeof WeakSet=="function"?WeakSet:Set,Xt=null,wt=null,It=!1,ht=null,bl=8192,vu={getCacheForType:function(n){var l=an(Ct),s=l.data.get(n);return s===void 0&&(s=n(),l.data.set(n,s)),s},cacheSignal:function(){return an(Ct).controller.signal}},Fl=0,gu=1,yu=2,_r=3,Bi=4;if(typeof Symbol=="function"&&Symbol.for){var zs=Symbol.for;Fl=zs("selector.component"),gu=zs("selector.has_pseudo_class"),yu=zs("selector.role"),_r=zs("selector.test_id"),Bi=zs("selector.text")}var Sl=typeof WeakMap=="function"?WeakMap:Map,Ye=0,Ge=null,qe=null,Xe=0,mt=0,tn=null,Jl=!1,wi=!1,Hi=!1,Ta=0,Ht=0,Pa=0,Li=0,_u=0,Qn=0,bu=0,br=null,sl=null,Yo=!1,Sr=0,Os=0,ki=1/0,Er=null,$a=null,nn=0,Ja=null,xs=null,za=0,Su=0,qo=null,Cf=null,nt=0,Tr=null;return ke.attemptContinuousHydration=function(n){if(n.tag===13||n.tag===31){var l=ui(n,67108864);l!==null&&Rt(l,n,67108864),lr(n,67108864)}},ke.attemptHydrationAtCurrentPriority=function(n){if(n.tag===13||n.tag===31){var l=Ot();l=Se(l);var s=ui(n,l);s!==null&&Rt(s,n,l),lr(n,l)}},ke.attemptSynchronousHydration=function(n){switch(n.tag){case 3:if(n=n.stateNode,n.current.memoizedState.isDehydrated){var l=le(n.pendingLanes);if(l!==0){for(n.pendingLanes|=2,n.entangledLanes|=2;l;){var s=1<<31-nl(l);n.entanglements[1]|=s,l&=~s}ea(n),(Ye&6)===0&&(ki=Rn()+500,Qi(0))}}break;case 31:case 13:l=ui(n,2),l!==null&&Rt(l,n,2),uo(),lr(n,2)}},ke.batchedUpdates=function(n,l){return n(l)},ke.createComponentSelector=function(n){return{$$typeof:Fl,value:n}},ke.createContainer=function(n,l,s,o,h,p,y,O,F,P){return Ti(n,l,!1,null,s,o,p,null,y,O,F,P)},ke.createHasPseudoClassSelector=function(n){return{$$typeof:gu,value:n}},ke.createHydrationContainer=function(n,l,s,o,h,p,y,O,F,P,ae,$,oe,Be){var Kt;return n=Ti(s,o,!0,n,h,p,O,Be,F,P,ae,$),n.context=mo(null),s=n.current,o=Ot(),o=Se(o),h=ta(o),h.callback=(Kt=l)!=null?Kt:null,oi(s,h,o),l=o,n.current.lanes=l,ie(n,l),ea(n),n},ke.createPortal=function(n,l,s){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:os,key:o==null?null:""+o,children:n,containerInfo:l,implementation:s}},ke.createRoleSelector=function(n){return{$$typeof:yu,value:n}},ke.createTestNameSelector=function(n){return{$$typeof:_r,value:n}},ke.createTextSelector=function(n){return{$$typeof:Bi,value:n}},ke.defaultOnCaughtError=function(n){console.error(n)},ke.defaultOnRecoverableError=function(n){Lo(n)},ke.defaultOnUncaughtError=function(n){Lo(n)},ke.deferredUpdates=function(n){var l=ze.T,s=Nl();try{return Ze(32),ze.T=null,n()}finally{Ze(s),ze.T=l}},ke.discreteUpdates=function(n,l,s,o,h){var p=ze.T,y=Nl();try{return Ze(2),ze.T=null,n(l,s,o,h)}finally{Ze(y),ze.T=p,Ye===0&&(ki=Rn()+500)}},ke.findAllNodes=Jn,ke.findBoundingRects=function(n,l){if(!sn)throw Error(v(363));l=Jn(n,l),n=[];for(var s=0;s<l.length;s++)n.push(Eo(l[s]));for(l=n.length-1;0<l;l--){s=n[l];for(var o=s.x,h=o+s.width,p=s.y,y=p+s.height,O=l-1;0<=O;O--)if(l!==O){var F=n[O],P=F.x,ae=P+F.width,$=F.y,oe=$+F.height;if(o>=P&&p>=$&&h<=ae&&y<=oe){n.splice(l,1);break}else if(o!==P||s.width!==F.width||oe<p||$>y){if(!(p!==$||s.height!==F.height||ae<o||P>h)){P>o&&(F.width+=P-o,F.x=o),ae<h&&(F.width=h-P),n.splice(l,1);break}}else{$>p&&(F.height+=$-p,F.y=p),oe<y&&(F.height=y-$),n.splice(l,1);break}}}return n},ke.findHostInstance=nr,ke.findHostInstanceWithNoPortals=function(n){return n=E(n),n=n!==null?C(n):null,n===null?null:ru(n.stateNode)},ke.findHostInstanceWithWarning=function(n){return nr(n)},ke.flushPassiveEffects=ma,ke.flushSyncFromReconciler=function(n){var l=Ye;Ye|=1;var s=ze.T,o=Nl();try{if(Ze(2),ze.T=null,n)return n()}finally{Ze(o),ze.T=s,Ye=l,(Ye&6)===0&&Qi(0)}},ke.flushSyncWork=uo,ke.focusWithin=function(n,l){if(!sn)throw Error(v(363));for(n=yi(n),l=tu(n,l),l=Array.from(l),n=0;n<l.length;){var s=l[n++],o=s.tag;if(!xi(s)){if((o===5||o===26||o===27)&&Za(s.stateNode))return!0;for(s=s.child;s!==null;)l.push(s),s=s.sibling}}return!1},ke.getFindAllNodesFailureDescription=function(n,l){if(!sn)throw Error(v(363));var s=0,o=[];n=[yi(n),0];for(var h=0;h<n.length;){var p=n[h++],y=p.tag,O=n[h++],F=l[O];if((y!==5&&y!==26&&y!==27||!xi(p))&&(_i(p,F)&&(o.push(eu(F)),O++,O>s&&(s=O)),O<l.length))for(p=p.child;p!==null;)n.push(p,O),p=p.sibling}if(s<l.length){for(n=[];s<l.length;s++)n.push(eu(l[s]));return`findAllNodes was able to match part of the selector:
41
+ `+(o.join(" > ")+`
42
+
43
+ No matching component was found for:
44
+ `)+n.join(" > ")}return null},ke.getPublicRootInstance=function(n){if(n=n.current,!n.child)return null;switch(n.child.tag){case 27:case 5:return ru(n.child.stateNode);default:return n.child.stateNode}},ke.injectIntoDevTools=function(){var n={bundleType:0,version:Fc,rendererPackageName:sr,currentDispatcherRef:ze,reconcilerVersion:"19.2.0"};if(uu!==null&&(n.rendererConfig=uu),typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")n=!1;else{var l=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(l.isDisabled||!l.supportsFiber)n=!0;else{try{_s=l.inject(n),ll=l}catch{}n=!!l.checkDCE}}return n},ke.isAlreadyRendering=function(){return(Ye&6)!==0},ke.observeVisibleRects=function(n,l,s,o){if(!sn)throw Error(v(363));n=Jn(n,l);var h=To(n,s,o).disconnect;return{disconnect:function(){h()}}},ke.shouldError=function(){return null},ke.shouldSuspend=function(){return!1},ke.startHostTransition=function(n,l,s,o){if(n.tag!==5)throw Error(v(476));var h=rd(n).queue;ud(n,h,l,ms,s===null?m:function(){var p=rd(n);return p.next===null&&(p=n.alternate.memoizedState),qu(n,p.next.queue,{},Ot()),s(o)})},ke.updateContainer=function(n,l,s,o){var h=l.current,p=Ot();return Gc(h,p,n,l,s,o),p},ke.updateContainerSync=function(n,l,s,o){return Gc(l.current,2,n,l,s,o),2},ke},u.exports.default=u.exports,Object.defineProperty(u.exports,"__esModule",{value:!0})})(Dv)),Dv.exports}var Nv;function w1(){return Nv||(Nv=1,Av.exports=B1()),Av.exports}var H1=w1();const L1=N1(H1);function k1(u){const r=L1(u);return r.injectIntoDevTools(),r}const M0=0,nc={},j1=/^three(?=[A-Z])/,sm=u=>`${u[0].toUpperCase()}${u.slice(1)}`;let G1=0;const V1=u=>typeof u=="function";function Up(u){if(V1(u)){const r=`${G1++}`;return nc[r]=u,r}else Object.assign(nc,u)}function C0(u,r){const d=sm(u),m=nc[d];if(u!=="primitive"&&!m)throw new Error(`R3F: ${d} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);if(u==="primitive"&&!r.object)throw new Error("R3F: Primitives without 'object' are invalid!");if(r.args!==void 0&&!Array.isArray(r.args))throw new Error("R3F: The args prop must be an array!")}function F1(u,r,d){var m;return u=sm(u)in nc?u:u.replace(j1,""),C0(u,r),u==="primitive"&&(m=r.object)!=null&&m.__r3f&&delete r.object.__r3f,Ph(r.object,d,u,r)}function Y1(u){if(!u.isHidden){var r;u.props.attach&&(r=u.parent)!=null&&r.object?Jh(u.parent,u):Zl(u.object)&&(u.object.visible=!1),u.isHidden=!0,ic(u)}}function U0(u){if(u.isHidden){var r;u.props.attach&&(r=u.parent)!=null&&r.object?$h(u.parent,u):Zl(u.object)&&u.props.visible!==!1&&(u.object.visible=!0),u.isHidden=!1,ic(u)}}function Ap(u,r,d){const m=r.root.getState();if(!(!u.parent&&u.object!==m.scene)){if(!r.object){var v,b;const S=nc[sm(r.type)];r.object=(v=r.props.object)!=null?v:new S(...(b=r.props.args)!=null?b:[]),r.object.__r3f=r}if(Ru(r.object,r.props),r.props.attach)$h(u,r);else if(Zl(r.object)&&Zl(u.object)){const S=u.object.children.indexOf(d?.object);if(d&&S!==-1){const E=u.object.children.indexOf(r.object);if(E!==-1){u.object.children.splice(E,1);const T=E<S?S-1:S;u.object.children.splice(T,0,r.object)}else r.object.parent=u.object,u.object.children.splice(S,0,r.object),r.object.dispatchEvent({type:"added"}),u.object.dispatchEvent({type:"childadded",child:r.object})}else u.object.add(r.object)}for(const S of r.children)Ap(r,S);ic(r)}}function Xm(u,r){if(r){if(r.parent===u){const d=u.children.indexOf(r);d!==-1&&u.children.splice(d,1)}r.parent=u,u.children.push(r),Ap(u,r)}}function Bv(u,r,d){if(!r||!d)return;if(r.parent===u){const v=u.children.indexOf(r);v!==-1&&u.children.splice(v,1)}r.parent=u;const m=u.children.indexOf(d);m!==-1?u.children.splice(m,0,r):u.children.push(r),Ap(u,r,d)}function A0(u){if(typeof u.dispose=="function"){const r=()=>{try{u.dispose()}catch{}};typeof IS_REACT_ACT_ENVIRONMENT<"u"?r():Cs.unstable_scheduleCallback(Cs.unstable_IdlePriority,r)}}function mp(u,r,d){if(!r)return;r.parent=null;const m=u.children.indexOf(r);m!==-1&&u.children.splice(m,1),r.props.attach?Jh(u,r):Zl(r.object)&&Zl(u.object)&&(u.object.remove(r.object),M1(Cp(r),r.object));const v=r.props.dispose!==null&&d!==!1;for(let b=r.children.length-1;b>=0;b--){const S=r.children[b];mp(r,S,v)}r.children.length=0,delete r.object.__r3f,v&&r.type!=="primitive"&&r.object.type!=="Scene"&&A0(r.object),d===void 0&&ic(r)}function q1(u,r){for(const d of[u,u.alternate])if(d!==null)if(typeof d.ref=="function"){d.refCleanup==null||d.refCleanup();const m=d.ref(r);typeof m=="function"&&(d.refCleanup=m)}else d.ref&&(d.ref.current=r)}const Xf=[];function Z1(){if(Xf.length!==0)try{Q1()}finally{Xf.length=0}}function Q1(){for(const[d]of Xf){const m=d.parent;if(m){d.props.attach?Jh(m,d):Zl(d.object)&&Zl(m.object)&&m.object.remove(d.object);for(const v of d.children)v.props.attach?Jh(d,v):Zl(v.object)&&Zl(d.object)&&d.object.remove(v.object)}d.isHidden&&U0(d),d.object.__r3f&&delete d.object.__r3f,d.type!=="primitive"&&A0(d.object)}for(const[d,m,v]of Xf){d.props=m;const b=d.parent;if(b){var u,r;const S=nc[sm(d.type)],E=d.object;d.object=(u=d.props.object)!=null?u:new S(...(r=d.props.args)!=null?r:[]),d.object.__r3f=d,q1(v,d.object),x1(Cp(d),E,d.object),Ru(d.object,d.props),d.props.attach?$h(b,d):Zl(d.object)&&Zl(b.object)&&b.object.add(d.object);for(const T of d.children)T.props.attach?$h(d,T):Zl(T.object)&&Zl(d.object)&&d.object.add(T.object);ic(d)}}}const Im=()=>{},wv={};let Fh=M0;function X1(u){switch(u){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"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return Uv;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 Cv;case"message":switch(Cs.unstable_getCurrentPriorityLevel()){case Cs.unstable_ImmediatePriority:return Uv;case Cs.unstable_UserBlockingPriority:return Cv;case Cs.unstable_NormalPriority:case Cs.unstable_LowPriority:return Xh;case Cs.unstable_IdlePriority:return D1;default:return Xh}default:return Xh}}function I1(u){typeof queueMicrotask=="function"?queueMicrotask(u):typeof Promise<"u"?Promise.resolve().then(u).catch(r=>{setTimeout(()=>{throw r})}):setTimeout(u)}const pp=k1({isPrimaryRenderer:!1,warnsIfNotActing:!1,supportsMutation:!0,supportsPersistence:!1,supportsHydration:!1,createInstance:F1,removeChild:mp,appendChild:Xm,appendInitialChild:Xm,insertBefore:Bv,appendChildToContainer(u,r){const d=u.getState().scene.__r3f;!r||!d||Xm(d,r)},removeChildFromContainer(u,r){const d=u.getState().scene.__r3f;!r||!d||mp(d,r)},insertInContainerBefore(u,r,d){const m=u.getState().scene.__r3f;!r||!d||!m||Bv(m,r,d)},getRootHostContext:()=>wv,getChildHostContext:()=>wv,commitUpdate(u,r,d,m,v){var b,S,E;C0(r,m);let T=!1;if((u.type==="primitive"&&d.object!==m.object||((b=m.args)==null?void 0:b.length)!==((S=d.args)==null?void 0:S.length)||(E=m.args)!=null&&E.some((C,R)=>{var x;return C!==((x=d.args)==null?void 0:x[R])}))&&(T=!0),T)Xf.push([u,dp(m),v]);else{const C=E1(u,m),R=u.props.attach;u.props=dp(m),R!==void 0?u.props.attach=R:delete u.props.attach,Object.keys(C).length&&Ru(u.object,C)}},finalizeInitialChildren:()=>!1,commitMount(){},getPublicInstance:u=>u?.object,prepareForCommit:()=>null,preparePortalMount:u=>Ph(u.getState().scene,u,"",{}),resetAfterCommit:Z1,shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance:Y1,unhideInstance:U0,createTextInstance:Im,hideTextInstance:Im,unhideTextInstance:Im,supportsMicrotasks:!0,scheduleMicrotask:I1,scheduleTimeout:typeof setTimeout=="function"?setTimeout:void 0,cancelTimeout:typeof clearTimeout=="function"?clearTimeout:void 0,noTimeout:-1,getInstanceFromNode:()=>null,beforeActiveInstanceBlur(){},afterActiveInstanceBlur(){},detachDeletedInstance(){},prepareScopeUpdate(){},getInstanceFromScope:()=>null,shouldAttemptEagerTransition:()=>!1,trackSchedulerEvent:()=>{},resolveEventType:()=>null,resolveEventTimeStamp:()=>-1.1,requestPostPaintCallback(){},maySuspendCommit:()=>!1,preloadInstance:()=>!0,suspendInstance(){},waitForCommitToBeReady:()=>null,NotPendingTransition:null,HostTransitionContext:J.createContext(null),setCurrentUpdatePriority(u){Fh=u},getCurrentUpdatePriority(){return Fh},resolveUpdatePriority(){var u;if(Fh!==M0)return Fh;const r=typeof window<"u"?(u=window.event)==null?void 0:u.type:void 0;return r===void 0?Xh:X1(r)},resetFormInstance(){},rendererPackageName:"@react-three/fiber",rendererVersion:R1.version,applyViewTransitionName(u,r,d){},restoreViewTransitionName(u,r){},cancelViewTransitionName(u,r,d){},cancelRootViewTransitionName(u){},restoreRootViewTransitionName(u){},InstanceMeasurement:null,measureInstance:u=>null,wasInstanceInViewport:u=>!0,hasInstanceChanged:(u,r)=>!1,hasInstanceAffectedParent:(u,r)=>!1,suspendOnActiveViewTransition(u,r){},startGestureTransition:()=>null,startViewTransition:()=>null,stopViewTransition(u){},createViewTransitionInstance:u=>null,getCurrentGestureOffset(u){throw new Error("startGestureTransition is not yet supported in react-three-fiber.")},cloneMutableInstance(u,r){return u},cloneMutableTextInstance(u){return u},cloneRootViewTransitionContainer(u){throw new Error("Not implemented.")},removeRootViewTransitionClone(u,r){throw new Error("Not implemented.")},createFragmentInstance:u=>null,updateFragmentInstanceFiber(u,r){},commitNewChildToFragmentInstance(u,r){},deleteChildFromFragmentInstance(u,r){},measureClonedInstance:u=>null,maySuspendCommitOnUpdate:(u,r,d)=>!1,maySuspendCommitInSyncRender:(u,r)=>!1,startSuspendingCommit:()=>null,getSuspendedCommitReason:(u,r)=>null}),Mr=new Map,Po={objects:"shallow",strict:!1};function K1(u,r){if(!r&&typeof HTMLCanvasElement<"u"&&u instanceof HTMLCanvasElement&&u.parentElement){const{width:d,height:m,top:v,left:b}=u.parentElement.getBoundingClientRect();return{width:d,height:m,top:v,left:b}}else if(!r&&typeof OffscreenCanvas<"u"&&u instanceof OffscreenCanvas)return{width:u.width,height:u.height,top:0,left:0};return{width:0,height:0,top:0,left:0,...r}}function P1(u){const r=Mr.get(u),d=r?.fiber,m=r?.store;r&&console.warn("R3F.createRoot should only be called once!");const v=typeof reportError=="function"?reportError:console.error,b=m||U1(yp,Lv),S=d||pp.createContainer(b,A1,null,!1,null,"",v,v,v,null);r||Mr.set(u,{fiber:S,store:b});let E,T,C=!1,R=null;return{async configure(x={}){let V;R=new Promise(Me=>V=Me);let{gl:N,size:K,scene:ee,events:le,onCreated:U,shadows:B=!1,linear:Z=!1,flat:ne=!1,legacy:re=!1,orthographic:ie=!1,frameloop:ce="always",dpr:he=[1,2],performance:se,raycaster:Ee,camera:Se,onPointerMissed:Pe}=x,ve=b.getState(),be=ve.gl;if(!ve.gl){const Me={canvas:u,powerPreference:"high-performance",antialias:!0,alpha:!0},ye=typeof N=="function"?await N(Me):N;Mv(ye)?be=ye:be=new Dg({...Me,...N}),ve.set({gl:be})}let ue=ve.raycaster;ue||ve.set({raycaster:ue=new c0});const{params:q,...W}=Ee||{};if(kt.equ(W,ue,Po)||Ru(ue,{...W}),kt.equ(q,ue.params,Po)||Ru(ue,{params:{...ue.params,...q}}),!ve.camera||ve.camera===T&&!kt.equ(T,Se,Po)){T=Se;const Me=Se?.isCamera,ye=Me?Se:ie?new nm(0,0,0,0,.1,1e3):new lm(75,0,.1,1e3);Me||(ye.position.z=5,Se&&(Ru(ye,Se),ye.manual||("aspect"in Se||"left"in Se||"right"in Se||"bottom"in Se||"top"in Se)&&(ye.manual=!0,ye.updateProjectionMatrix())),!ve.camera&&!(Se!=null&&Se.rotation)&&ye.lookAt(0,0,0)),ve.set({camera:ye}),ue.camera=ye}if(!ve.scene){let Me;ee!=null&&ee.isScene?(Me=ee,Ph(Me,b,"",{})):(Me=new op,Ph(Me,b,"",{}),ee&&Ru(Me,ee)),ve.set({scene:Me})}le&&!ve.events.handlers&&ve.set({events:le(b)});const me=K1(u,K);if(kt.equ(me,ve.size,Po)||ve.setSize(me.width,me.height,me.top,me.left),he&&ve.viewport.dpr!==E0(he)&&ve.setDpr(he),ve.frameloop!==ce&&ve.setFrameloop(ce),ve.onPointerMissed||ve.set({onPointerMissed:Pe}),se&&!kt.equ(se,ve.performance,Po)&&ve.set(Me=>({performance:{...Me.performance,...se}})),!ve.xr){var Te;const Me=(fe,jt)=>{const ln=b.getState();ln.frameloop!=="never"&&Lv(fe,!0,ln,jt)},ye=()=>{const fe=b.getState();fe.gl.xr.enabled=fe.gl.xr.isPresenting,fe.gl.xr.setAnimationLoop(fe.gl.xr.isPresenting?Me:null),fe.gl.xr.isPresenting||yp(fe)},_e={connect(){const fe=b.getState().gl;fe.xr.addEventListener("sessionstart",ye),fe.xr.addEventListener("sessionend",ye)},disconnect(){const fe=b.getState().gl;fe.xr.removeEventListener("sessionstart",ye),fe.xr.removeEventListener("sessionend",ye)}};typeof((Te=be.xr)==null?void 0:Te.addEventListener)=="function"&&_e.connect(),ve.set({xr:_e})}if(be.shadowMap){const Me=be.shadowMap.enabled,ye=be.shadowMap.type;if(be.shadowMap.enabled=!!B,kt.boo(B))be.shadowMap.type=Ym;else if(kt.str(B)){var De;const _e={basic:Bg,percentage:Ng,soft:Ym,variance:Rg};be.shadowMap.type=(De=_e[B])!=null?De:Ym}else kt.obj(B)&&Object.assign(be.shadowMap,B);(Me!==be.shadowMap.enabled||ye!==be.shadowMap.type)&&(be.shadowMap.needsUpdate=!0)}return wg.enabled=!re,C||(be.outputColorSpace=Z?Tp:Hn,be.toneMapping=ne?cp:Hg),ve.legacy!==re&&ve.set(()=>({legacy:re})),ve.linear!==Z&&ve.set(()=>({linear:Z})),ve.flat!==ne&&ve.set(()=>({flat:ne})),N&&!kt.fun(N)&&!Mv(N)&&!kt.equ(N,be,Po)&&Ru(be,N),E=U,C=!0,V(),this},render(x){return!C&&!R&&this.configure(),R.then(()=>{pp.updateContainer(ul.jsx($1,{store:b,children:x,onCreated:E,rootElement:u}),S,null,()=>{})}),b},unmount(){D0(u)}}}function $1({store:u,children:r,onCreated:d,rootElement:m}){return Kf(()=>{const v=u.getState();v.set(b=>({internal:{...b.internal,active:!0}})),d&&d(v),u.getState().events.connected||v.events.connect==null||v.events.connect(m)},[]),ul.jsx(O0.Provider,{value:u,children:r})}function D0(u,r){const d=Mr.get(u),m=d?.fiber;if(m){const v=d?.store.getState();v&&(v.internal.active=!1),pp.updateContainer(null,m,null,()=>{v&&setTimeout(()=>{try{var b,S,E,T;v.events.disconnect==null||v.events.disconnect(),(b=v.gl)==null||(S=b.renderLists)==null||S.dispose==null||S.dispose(),(E=v.gl)==null||E.forceContextLoss==null||E.forceContextLoss(),(T=v.gl)!=null&&T.xr&&v.xr.disconnect(),b1(v.scene),Mr.delete(u)}catch{}},500)})}}const J1=new Set,W1=new Set,ey=new Set;function Km(u,r){if(u.size)for(const{callback:d}of u.values())d(r)}function qf(u,r){switch(u){case"before":return Km(J1,r);case"after":return Km(W1,r);case"tail":return Km(ey,r)}}let Pm,$m;function vp(u,r,d){let m=r.clock.getDelta();r.frameloop==="never"&&typeof u=="number"&&(m=u-r.clock.elapsedTime,r.clock.oldTime=r.clock.elapsedTime,r.clock.elapsedTime=u),Pm=r.internal.subscribers;for(let v=0;v<Pm.length;v++)$m=Pm[v],$m.ref.current($m.store.getState(),m,d);return!r.internal.priority&&r.gl.render&&r.gl.render(r.scene,r.camera),r.internal.frames=Math.max(0,r.internal.frames-1),r.frameloop==="always"?1:r.internal.frames}let Wh=!1,gp=!1,Jm,Hv,$o;function R0(u){Hv=requestAnimationFrame(R0),Wh=!0,Jm=0,qf("before",u),gp=!0;for(const d of Mr.values()){var r;$o=d.store.getState(),$o.internal.active&&($o.frameloop==="always"||$o.internal.frames>0)&&!((r=$o.gl.xr)!=null&&r.isPresenting)&&(Jm+=vp(u,$o))}if(gp=!1,qf("after",u),Jm===0)return qf("tail",u),Wh=!1,cancelAnimationFrame(Hv)}function yp(u,r=1){var d;if(!u)return Mr.forEach(m=>yp(m.store.getState(),r));(d=u.gl.xr)!=null&&d.isPresenting||!u.internal.active||u.frameloop==="never"||(r>1?u.internal.frames=Math.min(60,u.internal.frames+r):gp?u.internal.frames=2:u.internal.frames=1,Wh||(Wh=!0,requestAnimationFrame(R0)))}function Lv(u,r=!0,d,m){if(r&&qf("before",u),d)vp(u,d,m);else for(const v of Mr.values())vp(u,v.store.getState());r&&qf("after",u)}const Wm={onClick:["click",!1],onContextMenu:["contextmenu",!1],onDoubleClick:["dblclick",!1],onWheel:["wheel",!0],onPointerDown:["pointerdown",!0],onPointerUp:["pointerup",!0],onPointerLeave:["pointerleave",!0],onPointerMove:["pointermove",!0],onPointerCancel:["pointercancel",!0],onLostPointerCapture:["lostpointercapture",!0]};function ty(u){const{handlePointer:r}=C1(u);return{priority:1,enabled:!0,compute(d,m,v){m.pointer.set(d.offsetX/m.size.width*2-1,-(d.offsetY/m.size.height)*2+1),m.raycaster.setFromCamera(m.pointer,m.camera)},connected:void 0,handlers:Object.keys(Wm).reduce((d,m)=>({...d,[m]:r(m)}),{}),update:()=>{var d;const{events:m,internal:v}=u.getState();(d=v.lastEvent)!=null&&d.current&&m.handlers&&m.handlers.onPointerMove(v.lastEvent.current)},connect:d=>{const{set:m,events:v}=u.getState();if(v.disconnect==null||v.disconnect(),m(b=>({events:{...b.events,connected:d}})),v.handlers)for(const b in v.handlers){const S=v.handlers[b],[E,T]=Wm[b];d.addEventListener(E,S,{passive:T})}},disconnect:()=>{const{set:d,events:m}=u.getState();if(m.connected){if(m.handlers)for(const v in m.handlers){const b=m.handlers[v],[S]=Wm[v];m.connected.removeEventListener(S,b)}d(v=>({events:{...v.events,connected:void 0}}))}}}}function kv(u,r){let d;return(...m)=>{window.clearTimeout(d),d=window.setTimeout(()=>u(...m),r)}}function ny({debounce:u,scroll:r,polyfill:d,offsetSize:m}={debounce:0,scroll:!1,offsetSize:!1}){const v=d||(typeof window>"u"?class{}:window.ResizeObserver);if(!v)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[b,S]=J.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),E=J.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:b,orientationHandler:null}),T=u?typeof u=="number"?u:u.scroll:null,C=u?typeof u=="number"?u:u.resize:null,R=J.useRef(!1);J.useEffect(()=>(R.current=!0,()=>void(R.current=!1)));const[x,V,N]=J.useMemo(()=>{const U=()=>{if(!E.current.element)return;const{left:B,top:Z,width:ne,height:re,bottom:ie,right:ce,x:he,y:se}=E.current.element.getBoundingClientRect(),Ee={left:B,top:Z,width:ne,height:re,bottom:ie,right:ce,x:he,y:se};E.current.element instanceof HTMLElement&&m&&(Ee.height=E.current.element.offsetHeight,Ee.width=E.current.element.offsetWidth),Object.freeze(Ee),R.current&&!sy(E.current.lastBounds,Ee)&&S(E.current.lastBounds=Ee)};return[U,C?kv(U,C):U,T?kv(U,T):U]},[S,m,T,C]);function K(){E.current.scrollContainers&&(E.current.scrollContainers.forEach(U=>U.removeEventListener("scroll",N,!0)),E.current.scrollContainers=null),E.current.resizeObserver&&(E.current.resizeObserver.disconnect(),E.current.resizeObserver=null),E.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",E.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",E.current.orientationHandler))}function ee(){E.current.element&&(E.current.resizeObserver=new v(N),E.current.resizeObserver.observe(E.current.element),r&&E.current.scrollContainers&&E.current.scrollContainers.forEach(U=>U.addEventListener("scroll",N,{capture:!0,passive:!0})),E.current.orientationHandler=()=>{N()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",E.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",E.current.orientationHandler))}const le=U=>{!U||U===E.current.element||(K(),E.current.element=U,E.current.scrollContainers=N0(U),ee())};return ay(N,!!r),ly(V),J.useEffect(()=>{K(),ee()},[r,N,V]),J.useEffect(()=>K,[]),[le,b,x]}function ly(u){J.useEffect(()=>{const r=u;return window.addEventListener("resize",r),()=>void window.removeEventListener("resize",r)},[u])}function ay(u,r){J.useEffect(()=>{if(r){const d=u;return window.addEventListener("scroll",d,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",d,!0)}},[u,r])}function N0(u){const r=[];if(!u||u===document.body)return r;const{overflow:d,overflowX:m,overflowY:v}=window.getComputedStyle(u);return[d,m,v].some(b=>b==="auto"||b==="scroll")&&r.push(u),[...r,...N0(u.parentElement)]}const iy=["x","y","top","bottom","left","right","width","height"],sy=(u,r)=>iy.every(d=>u[d]===r[d]);function uy({ref:u,children:r,fallback:d,resize:m,style:v,gl:b,events:S=ty,eventSource:E,eventPrefix:T,shadows:C,linear:R,flat:x,legacy:V,orthographic:N,frameloop:K,dpr:ee,performance:le,raycaster:U,camera:B,scene:Z,onPointerMissed:ne,onCreated:re,...ie}){J.useMemo(()=>Up(jg),[]);const ce=g1(),[he,se]=ny({scroll:!0,debounce:{scroll:50,resize:0},...m}),Ee=J.useRef(null),Se=J.useRef(null);J.useImperativeHandle(u,()=>Ee.current);const Pe=S0(ne),[ve,be]=J.useState(!1),[ue,q]=J.useState(!1);if(ve)throw ve;if(ue)throw ue;const W=J.useRef(null);Kf(()=>{const Te=Ee.current;if(se.width>0&&se.height>0&&Te){W.current||(W.current=P1(Te));async function De(){await W.current.configure({gl:b,scene:Z,events:S,shadows:C,linear:R,flat:x,legacy:V,orthographic:N,frameloop:K,dpr:ee,performance:le,raycaster:U,camera:B,size:se,onPointerMissed:(...Me)=>Pe.current==null?void 0:Pe.current(...Me),onCreated:Me=>{Me.events.connect==null||Me.events.connect(E?p1(E)?E.current:E:Se.current),T&&Me.setEvents({compute:(ye,_e)=>{const fe=ye[T+"X"],jt=ye[T+"Y"];_e.pointer.set(fe/_e.size.width*2-1,-(jt/_e.size.height)*2+1),_e.raycaster.setFromCamera(_e.pointer,_e.camera)}}),re?.(Me)}}),W.current.render(ul.jsx(ce,{children:ul.jsx(_1,{set:q,children:ul.jsx(J.Suspense,{fallback:ul.jsx(y1,{set:be}),children:r??null})})}))}De()}}),J.useEffect(()=>{const Te=Ee.current;if(Te)return()=>D0(Te)},[]);const me=E?"none":"auto";return ul.jsx("div",{ref:Se,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:me,...v},...ie,children:ul.jsx("div",{ref:he,style:{width:"100%",height:"100%"},children:ul.jsx("canvas",{ref:Ee,style:{display:"block"},children:d})})})}function vb(u){return ul.jsx(y0,{children:ul.jsx(uy,{...u})})}/**
45
+ * postprocessing v6.39.4 build Mon Jul 27 2026
46
+ * https://github.com/pmndrs/postprocessing
47
+ * Copyright 2015-2026 Raoul van Rüschen
48
+ * @license Zlib
49
+ */var ry=(()=>{const u=new Float32Array([-1,-1,0,3,-1,0,-1,3,0]),r=new Float32Array([0,0,2,0,0,2]),d=new Qg;return d.setAttribute("position",new yv(u,3)),d.setAttribute("uv",new yv(r,2)),d})(),El=class _p{static get fullscreenGeometry(){return ry}constructor(r="Pass",d=new op,m=new nm){this.name=r,this.renderer=null,this.scene=d,this.camera=m,this.screen=null,this.rtt=!0,this.needsSwap=!0,this.needsDepthBlit=!1,this.needsDepthTexture=!1,this.enabled=!0}get renderToScreen(){return!this.rtt}set renderToScreen(r){if(this.rtt===r){const d=this.fullscreenMaterial;d!==null&&(d.needsUpdate=!0),this.rtt=!r}}set mainScene(r){}set mainCamera(r){}setRenderer(r){this.renderer=r}isEnabled(){return this.enabled}setEnabled(r){this.enabled=r}get fullscreenMaterial(){return this.screen!==null?this.screen.material:null}set fullscreenMaterial(r){let d=this.screen;d!==null?d.material=r:(d=new qg(_p.fullscreenGeometry,r),d.frustumCulled=!1,this.scene===null&&(this.scene=new op),this.scene.add(d),this.screen=d)}getFullscreenMaterial(){return this.fullscreenMaterial}setFullscreenMaterial(r){this.fullscreenMaterial=r}getDepthTexture(){return null}setDepthTexture(r,d=ac){}render(r,d,m,v,b){throw new Error("Render method not implemented!")}setSize(r,d){}initialize(r,d,m){}dispose(){for(const r of Object.keys(this)){const d=this[r];(d instanceof ni||d instanceof h0||d instanceof m0||d instanceof _p)&&this[r].dispose()}this.fullscreenMaterial!==null&&this.fullscreenMaterial.dispose()}},oy=class extends El{constructor(){super("ClearMaskPass",null,null),this.needsSwap=!1}render(u,r,d,m,v){const b=u.state.buffers.stencil;b.setLocked(!1),b.setTest(!1)}},cy=`#ifdef COLOR_WRITE
50
+ #include <common>
51
+ #include <dithering_pars_fragment>
52
+ #ifdef FRAMEBUFFER_PRECISION_HIGH
53
+ uniform mediump sampler2D inputBuffer;
54
+ #else
55
+ uniform lowp sampler2D inputBuffer;
56
+ #endif
57
+ #endif
58
+ #ifdef DEPTH_WRITE
59
+ #include <packing>
60
+ #ifdef GL_FRAGMENT_PRECISION_HIGH
61
+ uniform highp sampler2D depthBuffer;
62
+ #else
63
+ uniform mediump sampler2D depthBuffer;
64
+ #endif
65
+ float readDepth(const in vec2 uv){
66
+ #if DEPTH_PACKING == 3201
67
+ return unpackRGBAToDepth(texture2D(depthBuffer,uv));
68
+ #else
69
+ return texture2D(depthBuffer,uv).r;
70
+ #endif
71
+ }
72
+ #endif
73
+ #ifdef USE_WEIGHTS
74
+ uniform vec4 channelWeights;
75
+ #endif
76
+ uniform float opacity;varying vec2 vUv;void main(){
77
+ #ifdef COLOR_WRITE
78
+ vec4 texel=texture2D(inputBuffer,vUv);
79
+ #ifdef USE_WEIGHTS
80
+ texel*=channelWeights;
81
+ #endif
82
+ gl_FragColor=opacity*texel;
83
+ #ifdef COLOR_SPACE_CONVERSION
84
+ #include <colorspace_fragment>
85
+ #endif
86
+ #include <dithering_fragment>
87
+ #else
88
+ gl_FragColor=vec4(0.0);
89
+ #endif
90
+ #ifdef DEPTH_WRITE
91
+ gl_FragDepth=readDepth(vUv);
92
+ #endif
93
+ }`,B0="varying vec2 vUv;void main(){vUv=position.xy*0.5+0.5;gl_Position=vec4(position.xy,1.0,1.0);}",w0=class extends Yi{constructor(){super({name:"CopyMaterial",defines:{COLOR_SPACE_CONVERSION:"1",DEPTH_PACKING:"0",COLOR_WRITE:"1"},uniforms:{inputBuffer:new ct(null),depthBuffer:new ct(null),channelWeights:new ct(null),opacity:new ct(1)},blending:Cr,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:cy,vertexShader:B0}),this.depthFunc=Xg}get inputBuffer(){return this.uniforms.inputBuffer.value}set inputBuffer(u){const r=u!==null;this.colorWrite!==r&&(r?this.defines.COLOR_WRITE=!0:delete this.defines.COLOR_WRITE,this.colorWrite=r,this.needsUpdate=!0),this.uniforms.inputBuffer.value=u}get depthBuffer(){return this.uniforms.depthBuffer.value}set depthBuffer(u){const r=u!==null;this.depthWrite!==r&&(r?this.defines.DEPTH_WRITE=!0:delete this.defines.DEPTH_WRITE,this.depthTest=r,this.depthWrite=r,this.needsUpdate=!0),this.uniforms.depthBuffer.value=u}set depthPacking(u){this.defines.DEPTH_PACKING=u.toFixed(0),this.needsUpdate=!0}get colorSpaceConversion(){return this.defines.COLOR_SPACE_CONVERSION!==void 0}set colorSpaceConversion(u){this.colorSpaceConversion!==u&&(u?this.defines.COLOR_SPACE_CONVERSION=!0:delete this.defines.COLOR_SPACE_CONVERSION,this.needsUpdate=!0)}get channelWeights(){return this.uniforms.channelWeights.value}set channelWeights(u){u!==null?(this.defines.USE_WEIGHTS="1",this.uniforms.channelWeights.value=u):delete this.defines.USE_WEIGHTS,this.needsUpdate=!0}setInputBuffer(u){this.uniforms.inputBuffer.value=u}getOpacity(u){return this.uniforms.opacity.value}setOpacity(u){this.uniforms.opacity.value=u}},fy=class extends El{constructor(u,r=!0){super("CopyPass"),this.fullscreenMaterial=new w0,this.needsSwap=!1,this.renderTarget=u,u===void 0&&(this.renderTarget=new ni(1,1,{minFilter:Ih,magFilter:Ih,stencilBuffer:!1,depthBuffer:!1}),this.renderTarget.texture.name="CopyPass.Target"),this.autoResize=r}get resize(){return this.autoResize}set resize(u){this.autoResize=u}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}setAutoResizeEnabled(u){this.autoResize=u}render(u,r,d,m,v){this.fullscreenMaterial.inputBuffer=r.texture,u.setRenderTarget(this.renderToScreen?null:this.renderTarget),u.render(this.scene,this.camera)}setSize(u,r){this.autoResize&&this.renderTarget.setSize(u,r)}initialize(u,r,d){d!==void 0&&(this.renderTarget.texture.type=d,d!==Nu?this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1":u!==null&&u.outputColorSpace===Hn&&(this.renderTarget.texture.colorSpace=Hn))}},jv=new am,H0=class extends El{constructor(u=!0,r=!0,d=!1){super("ClearPass",null,null),this.needsSwap=!1,this.color=u,this.depth=r,this.stencil=d,this.overrideClearColor=null,this.overrideClearAlpha=-1}setClearFlags(u,r,d){this.color=u,this.depth=r,this.stencil=d}getOverrideClearColor(){return this.overrideClearColor}setOverrideClearColor(u){this.overrideClearColor=u}getOverrideClearAlpha(){return this.overrideClearAlpha}setOverrideClearAlpha(u){this.overrideClearAlpha=u}render(u,r,d,m,v){const b=this.overrideClearColor,S=this.overrideClearAlpha,E=u.getClearAlpha(),T=b!==null,C=S>=0;T?(u.getClearColor(jv),u.setClearColor(b,C?S:E)):C&&u.setClearAlpha(S),u.setRenderTarget(this.renderToScreen?null:r),u.clear(this.color,this.depth,this.stencil),T?u.setClearColor(jv,E):C&&u.setClearAlpha(E)}},dy=class extends El{constructor(u,r){super("MaskPass",u,r),this.needsSwap=!1,this.clearPass=new H0(!1,!1,!0),this.inverse=!1}set mainScene(u){this.scene=u}set mainCamera(u){this.camera=u}get inverted(){return this.inverse}set inverted(u){this.inverse=u}get clear(){return this.clearPass.enabled}set clear(u){this.clearPass.enabled=u}getClearPass(){return this.clearPass}isInverted(){return this.inverted}setInverted(u){this.inverted=u}render(u,r,d,m,v){const b=u.getContext(),S=u.state.buffers,E=this.scene,T=this.camera,C=this.clearPass,R=this.inverted?0:1,x=1-R;S.color.setMask(!1),S.depth.setMask(!1),S.color.setLocked(!0),S.depth.setLocked(!0),S.stencil.setTest(!0),S.stencil.setOp(b.REPLACE,b.REPLACE,b.REPLACE),S.stencil.setFunc(b.ALWAYS,R,4294967295),S.stencil.setClear(x),S.stencil.setLocked(!0),this.clearPass.enabled&&(this.renderToScreen?C.render(u,null):(C.render(u,r),C.render(u,d))),this.renderToScreen?(u.setRenderTarget(null),u.render(E,T)):(u.setRenderTarget(r),u.render(E,T),u.setRenderTarget(d),u.render(E,T)),S.color.setLocked(!1),S.depth.setLocked(!1),S.stencil.setLocked(!1),S.stencil.setFunc(b.EQUAL,1,4294967295),S.stencil.setOp(b.KEEP,b.KEEP,b.KEEP),S.stencil.setLocked(!0)}},ep=1/1e3,hy=1e3,my=class{constructor(){this.startTime=performance.now(),this.previousTime=0,this.currentTime=0,this._delta=0,this._elapsed=0,this._fixedDelta=1e3/60,this.timescale=1,this.useFixedDelta=!1,this._autoReset=!1}get autoReset(){return this._autoReset}set autoReset(u){typeof document<"u"&&document.hidden!==void 0&&(u?document.addEventListener("visibilitychange",this):document.removeEventListener("visibilitychange",this),this._autoReset=u)}get delta(){return this._delta*ep}get fixedDelta(){return this._fixedDelta*ep}set fixedDelta(u){this._fixedDelta=u*hy}get elapsed(){return this._elapsed*ep}update(u){this.useFixedDelta?this._delta=this.fixedDelta:(this.previousTime=this.currentTime,this.currentTime=(u!==void 0?u:performance.now())-this.startTime,this._delta=this.currentTime-this.previousTime),this._delta*=this.timescale,this._elapsed+=this._delta}reset(){this._delta=0,this._elapsed=0,this.currentTime=performance.now()-this.startTime}getDelta(){return this.delta}getElapsed(){return this.elapsed}handleEvent(u){document.hidden||(this.currentTime=performance.now()-this.startTime)}dispose(){this.autoReset=!1}},py=class{constructor(u=null,{depthBuffer:r=!0,stencilBuffer:d=!1,multisampling:m=0,frameBufferType:v}={}){this.renderer=null,this.inputBuffer=this.createBuffer(r,d,v,m),this.outputBuffer=this.inputBuffer.clone(),this.copyPass=new fy,this.depthRenderTarget=null,this.passes=[],this.timer=new my,this.autoRenderToScreen=!0,this.setRenderer(u)}get stableDepthTexture(){return this.depthRenderTarget===null?null:this.depthRenderTarget.depthTexture}get multisampling(){return this.inputBuffer.samples}set multisampling(u){this.multisampling!==u&&(this.inputBuffer.samples=u,this.outputBuffer.samples=u,this.inputBuffer.dispose(),this.outputBuffer.dispose())}getTimer(){return this.timer}getRenderer(){return this.renderer}setRenderer(u){if(this.renderer=u,u!==null){const r=u.getSize(new wn),d=u.getContext().getContextAttributes().alpha,m=this.inputBuffer.texture.type;m===Nu&&u.outputColorSpace===Hn&&(this.inputBuffer.texture.colorSpace=Hn,this.outputBuffer.texture.colorSpace=Hn,this.inputBuffer.dispose(),this.outputBuffer.dispose()),u.autoClear=!1,this.setSize(r.width,r.height);for(const v of this.passes)v.initialize(u,d,m)}}replaceRenderer(u,r=!0){const d=this.renderer,m=d.domElement.parentNode;return this.setRenderer(u),r&&m!==null&&(m.removeChild(d.domElement),m.appendChild(u.domElement)),d}createDepthTexture(){const u=new Gg;u.name="EffectComposer.InputDepth",this.inputBuffer.stencilBuffer?(u.format=Vg,u.type=Fg):u.type=f0;const r=u.clone();r.name="EffectComposer.OutputDepth";const d=u.clone();d.name="EffectComposer.StableDepth",this.inputBuffer.depthTexture=u,this.outputBuffer.depthTexture=r,this.inputBuffer.dispose(),this.outputBuffer.dispose();const{width:m,height:v}=this.inputBuffer;this.depthRenderTarget=new ni(m,v,{depthBuffer:!0,stencilBuffer:this.inputBuffer.stencilBuffer,depthTexture:d})}blitDepthBuffer(u){const r=this.renderer,d=this.depthRenderTarget,m=r.properties,v=r.getContext();r.setRenderTarget(d);const b=m.get(u).__webglFramebuffer,S=m.get(d).__webglFramebuffer,E=u.stencilBuffer?v.DEPTH_BUFFER_BIT|v.STENCIL_BUFFER_BIT:v.DEPTH_BUFFER_BIT;v.bindFramebuffer(v.READ_FRAMEBUFFER,b),v.bindFramebuffer(v.DRAW_FRAMEBUFFER,S),v.blitFramebuffer(0,0,u.width,u.height,0,0,d.width,d.height,E,v.NEAREST),v.bindFramebuffer(v.READ_FRAMEBUFFER,null),v.bindFramebuffer(v.DRAW_FRAMEBUFFER,null),r.setRenderTarget(null)}deleteDepthTexture(){const u=this.stableDepthTexture;for(const r of this.passes)r.getDepthTexture()===u&&r.setDepthTexture(null);this.depthRenderTarget!==null&&(this.depthRenderTarget.dispose(),this.depthRenderTarget=null),this.inputBuffer.depthTexture!==null&&(this.inputBuffer.depthTexture.dispose(),this.inputBuffer.depthTexture=null),this.outputBuffer.depthTexture!==null&&(this.outputBuffer.depthTexture.dispose(),this.outputBuffer.depthTexture=null)}createBuffer(u,r,d,m){const v=this.renderer,b=v===null?new wn:v.getDrawingBufferSize(new wn),S=new ni(b.width,b.height,{minFilter:Ih,magFilter:Ih,samples:m,stencilBuffer:r,depthBuffer:u,type:d});return d===Nu&&v!==null&&v.outputColorSpace===Hn&&(S.texture.colorSpace=Hn),S.texture.name="EffectComposer.Buffer",S.texture.generateMipmaps=!1,S}setMainScene(u){for(const r of this.passes)r.mainScene=u}setMainCamera(u){for(const r of this.passes)r.mainCamera=u}addPass(u,r){const d=this.passes,m=this.renderer,v=m.getDrawingBufferSize(new wn),b=m.getContext().getContextAttributes().alpha,S=this.inputBuffer.texture.type;if(u.renderer=m,u.setSize(v.width,v.height),u.initialize(m,b,S),this.autoRenderToScreen&&(d.length>0&&(d[d.length-1].renderToScreen=!1),u.renderToScreen&&(this.autoRenderToScreen=!1)),r!==void 0?d.splice(r,0,u):d.push(u),this.autoRenderToScreen&&(d[d.length-1].renderToScreen=!0),u.needsDepthTexture||this.depthRenderTarget!==null)if(this.depthRenderTarget===null){this.createDepthTexture();for(const E of d)E.setDepthTexture(this.stableDepthTexture)}else u.setDepthTexture(this.stableDepthTexture)}removePass(u){const r=this.passes,d=r.indexOf(u);if(d!==-1&&r.splice(d,1).length>0){const b=this.stableDepthTexture;if(b!==null){const S=(T,C)=>T||C.needsDepthTexture;r.reduce(S,!1)||(u.getDepthTexture()===b&&u.setDepthTexture(null),this.deleteDepthTexture())}this.autoRenderToScreen&&d===r.length&&(u.renderToScreen=!1,r.length>0&&(r[r.length-1].renderToScreen=!0))}}removeAllPasses(){const u=this.passes;this.deleteDepthTexture(),u.length>0&&(this.autoRenderToScreen&&(u[u.length-1].renderToScreen=!1),this.passes=[])}render(u){const r=this.renderer,d=this.copyPass;let m=this.inputBuffer,v=this.outputBuffer,b,S=!1;u===void 0&&(this.timer.update(),u=this.timer.getDelta());for(const E of this.passes)if(E.enabled){if(E.render(r,m,v,u,S),E.needsDepthBlit&&this.depthRenderTarget!==null&&this.blitDepthBuffer(m),E.needsSwap){if(S){d.renderToScreen=E.renderToScreen;const T=r.getContext(),C=r.state.buffers.stencil;C.setFunc(T.NOTEQUAL,1,4294967295),d.render(r,m,v,u,S),C.setFunc(T.EQUAL,1,4294967295)}b=m,m=v,v=b}E instanceof dy?S=!0:E instanceof oy&&(S=!1)}}setSize(u,r,d){const m=this.renderer,v=m.getSize(new wn);(u===void 0||r===void 0)&&(u=v.width,r=v.height),(v.width!==u||v.height!==r)&&m.setSize(u,r,d);const b=m.getDrawingBufferSize(new wn);this.inputBuffer.setSize(b.width,b.height),this.outputBuffer.setSize(b.width,b.height),this.depthRenderTarget!==null&&this.depthRenderTarget.setSize(b.width,b.height);for(const S of this.passes)S.setSize(b.width,b.height)}reset(){this.dispose(),this.autoRenderToScreen=!0}dispose(){for(const u of this.passes)u.dispose();this.deleteDepthTexture(),this.inputBuffer.dispose(),this.outputBuffer.dispose(),this.copyPass.dispose(),this.timer.dispose(),this.passes=[],El.fullscreenGeometry.dispose()}},xr={NONE:0,DEPTH:1,CONVOLUTION:2},ot={FRAGMENT_HEAD:"FRAGMENT_HEAD",FRAGMENT_MAIN_UV:"FRAGMENT_MAIN_UV",FRAGMENT_MAIN_IMAGE:"FRAGMENT_MAIN_IMAGE",VERTEX_HEAD:"VERTEX_HEAD",VERTEX_MAIN_SUPPORT:"VERTEX_MAIN_SUPPORT"},vy=class{constructor(){this.shaderParts=new Map([[ot.FRAGMENT_HEAD,null],[ot.FRAGMENT_MAIN_UV,null],[ot.FRAGMENT_MAIN_IMAGE,null],[ot.VERTEX_HEAD,null],[ot.VERTEX_MAIN_SUPPORT,null]]),this.defines=new Map,this.uniforms=new Map,this.blendModes=new Map,this.extensions=new Set,this.attributes=xr.NONE,this.varyings=new Set,this.uvTransformation=!1,this.readDepth=!1,this.colorSpace=Tp}},tp=!1,Gv=class{constructor(u=null){this.originalMaterials=new Map,this.material=null,this.materials=null,this.materialsBackSide=null,this.materialsDoubleSide=null,this.materialsFlatShaded=null,this.materialsFlatShadedBackSide=null,this.materialsFlatShadedDoubleSide=null,this.setMaterial(u),this.meshCount=0,this.replaceMaterial=r=>{if(r.isMesh){let d;if(r.material.flatShading)switch(r.material.side){case Ff:d=this.materialsFlatShadedDoubleSide;break;case Vh:d=this.materialsFlatShadedBackSide;break;default:d=this.materialsFlatShaded;break}else switch(r.material.side){case Ff:d=this.materialsDoubleSide;break;case Vh:d=this.materialsBackSide;break;default:d=this.materials;break}this.originalMaterials.set(r,r.material),r.isSkinnedMesh?r.material=d[2]:r.isInstancedMesh?r.material=d[1]:r.material=d[0],++this.meshCount}}}cloneMaterial(u){if(!(u instanceof Yi))return u.clone();const r=u.uniforms,d=new Map;for(const v in r){const b=r[v].value;b.isRenderTargetTexture&&(r[v].value=null,d.set(v,b))}const m=u.clone();for(const v of d)r[v[0]].value=v[1],m.uniforms[v[0]].value=v[1];return m}setMaterial(u){if(this.disposeMaterials(),this.material=u,u!==null){const r=this.materials=[this.cloneMaterial(u),this.cloneMaterial(u),this.cloneMaterial(u)];for(const d of r)d.uniforms=Object.assign({},u.uniforms),d.side=Zg;r[2].skinning=!0,this.materialsBackSide=r.map(d=>{const m=this.cloneMaterial(d);return m.uniforms=Object.assign({},u.uniforms),m.side=Vh,m}),this.materialsDoubleSide=r.map(d=>{const m=this.cloneMaterial(d);return m.uniforms=Object.assign({},u.uniforms),m.side=Ff,m}),this.materialsFlatShaded=r.map(d=>{const m=this.cloneMaterial(d);return m.uniforms=Object.assign({},u.uniforms),m.flatShading=!0,m}),this.materialsFlatShadedBackSide=r.map(d=>{const m=this.cloneMaterial(d);return m.uniforms=Object.assign({},u.uniforms),m.flatShading=!0,m.side=Vh,m}),this.materialsFlatShadedDoubleSide=r.map(d=>{const m=this.cloneMaterial(d);return m.uniforms=Object.assign({},u.uniforms),m.flatShading=!0,m.side=Ff,m})}}render(u,r,d){const m=u.shadowMap.enabled;if(u.shadowMap.enabled=!1,tp){const v=this.originalMaterials;this.meshCount=0,r.traverse(this.replaceMaterial),u.render(r,d);for(const b of v)b[0].material=b[1];this.meshCount!==v.size&&v.clear()}else{const v=r.overrideMaterial;r.overrideMaterial=this.material,u.render(r,d),r.overrideMaterial=v}u.shadowMap.enabled=m}disposeMaterials(){if(this.material!==null){const u=this.materials.concat(this.materialsBackSide).concat(this.materialsDoubleSide).concat(this.materialsFlatShaded).concat(this.materialsFlatShadedBackSide).concat(this.materialsFlatShadedDoubleSide);for(const r of u)r.dispose()}}dispose(){this.originalMaterials.clear(),this.disposeMaterials()}static get workaroundEnabled(){return tp}static set workaroundEnabled(u){tp=u}},Uu=-1,rl=class extends zp{constructor(u=null,r=Uu,d=Uu,m=1){super(),u!==null&&this.addEventListener("change",()=>u.setSize(this.baseSize.width,this.baseSize.height)),this.baseSize=new wn(1,1),this.preferredSize=new wn(r,d),this.target=this.preferredSize,this.s=m,this.effectiveSize=new wn,this.addEventListener("change",()=>this.updateEffectiveSize()),this.updateEffectiveSize()}updateEffectiveSize(){const u=this.baseSize,r=this.preferredSize,d=this.effectiveSize,m=this.scale;r.width!==Uu?d.width=r.width:r.height!==Uu?d.width=Math.round(r.height*(u.width/Math.max(u.height,1))):d.width=Math.round(u.width*m),r.height!==Uu?d.height=r.height:r.width!==Uu?d.height=Math.round(r.width/Math.max(u.width/Math.max(u.height,1),1)):d.height=Math.round(u.height*m)}get width(){return this.effectiveSize.width}set width(u){this.preferredWidth=u}get height(){return this.effectiveSize.height}set height(u){this.preferredHeight=u}getWidth(){return this.width}getHeight(){return this.height}get scale(){return this.s}set scale(u){this.s!==u&&(this.s=u,this.preferredSize.setScalar(Uu),this.dispatchEvent({type:"change"}))}getScale(){return this.scale}setScale(u){this.scale=u}get baseWidth(){return this.baseSize.width}set baseWidth(u){this.baseSize.width!==u&&(this.baseSize.width=u,this.dispatchEvent({type:"change"}))}getBaseWidth(){return this.baseWidth}setBaseWidth(u){this.baseWidth=u}get baseHeight(){return this.baseSize.height}set baseHeight(u){this.baseSize.height!==u&&(this.baseSize.height=u,this.dispatchEvent({type:"change"}))}getBaseHeight(){return this.baseHeight}setBaseHeight(u){this.baseHeight=u}setBaseSize(u,r){(this.baseSize.width!==u||this.baseSize.height!==r)&&(this.baseSize.set(u,r),this.dispatchEvent({type:"change"}))}get preferredWidth(){return this.preferredSize.width}set preferredWidth(u){this.preferredSize.width!==u&&(this.preferredSize.width=u,this.dispatchEvent({type:"change"}))}getPreferredWidth(){return this.preferredWidth}setPreferredWidth(u){this.preferredWidth=u}get preferredHeight(){return this.preferredSize.height}set preferredHeight(u){this.preferredSize.height!==u&&(this.preferredSize.height=u,this.dispatchEvent({type:"change"}))}getPreferredHeight(){return this.preferredHeight}setPreferredHeight(u){this.preferredHeight=u}setPreferredSize(u,r){(this.preferredSize.width!==u||this.preferredSize.height!==r)&&(this.preferredSize.set(u,r),this.dispatchEvent({type:"change"}))}copy(u){this.s=u.scale,this.baseSize.set(u.baseWidth,u.baseHeight),this.preferredSize.set(u.preferredWidth,u.preferredHeight),this.dispatchEvent({type:"change"})}static get AUTO_SIZE(){return Uu}},tt={ADD:0,ALPHA:1,AVERAGE:2,COLOR:3,COLOR_BURN:4,COLOR_DODGE:5,DARKEN:6,DIFFERENCE:7,DIVIDE:8,DST:9,EXCLUSION:10,HARD_LIGHT:11,HARD_MIX:12,HUE:13,INVERT:14,INVERT_RGB:15,LIGHTEN:16,LINEAR_BURN:17,LINEAR_DODGE:18,LINEAR_LIGHT:19,LUMINOSITY:20,MULTIPLY:21,NEGATION:22,NORMAL:23,OVERLAY:24,PIN_LIGHT:25,REFLECT:26,SATURATION:27,SCREEN:28,SOFT_LIGHT:29,SRC:30,SUBTRACT:31,VIVID_LIGHT:32},gy="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=dst.rgb+src.rgb;return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",yy="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){return mix(dst,src,src.a*opacity);}",_y="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=(dst.rgb+src.rgb)*0.5;return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",by="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 a=RGBToHSL(dst.rgb);vec3 b=RGBToHSL(src.rgb);vec3 c=HSLToRGB(vec3(b.xy,a.z));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",Sy="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 a=dst.rgb,b=src.rgb;vec3 c=mix(step(0.0,b)*(1.0-min(vec3(1.0),(1.0-a)/max(b,1e-9))),vec3(1.0),step(1.0,a));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",Ey="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 a=dst.rgb,b=src.rgb;vec3 c=step(0.0,a)*mix(min(vec3(1.0),a/max(1.0-b,1e-9)),vec3(1.0),step(1.0,b));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",Ty="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=min(dst.rgb,src.rgb);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",zy="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=abs(dst.rgb-src.rgb);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",Oy="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=dst.rgb/max(src.rgb,1e-9);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",xy="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=dst.rgb+src.rgb-2.0*dst.rgb*src.rgb;return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",My="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 a=min(dst.rgb,1.0);vec3 b=min(src.rgb,1.0);vec3 c=mix(2.0*a*b,1.0-2.0*(1.0-a)*(1.0-b),step(0.5,b));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",Cy="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=step(1.0,dst.rgb+src.rgb);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",Uy="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 a=RGBToHSL(dst.rgb);vec3 b=RGBToHSL(src.rgb);vec3 c=HSLToRGB(vec3(b.x,a.yz));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",Ay="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=max(1.0-src.rgb,0.0);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",Dy="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=src.rgb*max(1.0-dst.rgb,0.0);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",Ry="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=max(dst.rgb,src.rgb);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",Ny="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=clamp(src.rgb+dst.rgb-1.0,0.0,1.0);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",By="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=min(dst.rgb+src.rgb,1.0);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",wy="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=clamp(2.0*src.rgb+dst.rgb-1.0,0.0,1.0);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",Hy="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 a=RGBToHSL(dst.rgb);vec3 b=RGBToHSL(src.rgb);vec3 c=HSLToRGB(vec3(a.xy,b.z));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",Ly="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=dst.rgb*src.rgb;return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",ky="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=max(1.0-abs(1.0-dst.rgb-src.rgb),0.0);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",jy="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){return mix(dst,src,opacity);}",Gy="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 a=2.0*src.rgb*dst.rgb;vec3 b=1.0-2.0*(1.0-src.rgb)*(1.0-dst.rgb);vec3 c=mix(a,b,step(0.5,dst.rgb));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",Vy="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 src2=2.0*src.rgb;vec3 c=mix(mix(src2,dst.rgb,step(0.5*dst.rgb,src.rgb)),max(src2-1.0,vec3(0.0)),step(dst.rgb,src2-1.0));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",Fy="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 a=min(dst.rgb*dst.rgb/max(1.0-src.rgb,1e-9),1.0);vec3 c=mix(a,src.rgb,step(1.0,src.rgb));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",Yy="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 a=RGBToHSL(dst.rgb);vec3 b=RGBToHSL(src.rgb);vec3 c=HSLToRGB(vec3(a.x,b.y,a.z));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",qy="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=dst.rgb+src.rgb-min(dst.rgb*src.rgb,1.0);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",Zy="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 src2=2.0*src.rgb;vec3 d=dst.rgb+(src2-1.0);vec3 w=step(0.5,src.rgb);vec3 a=dst.rgb-(1.0-src2)*dst.rgb*(1.0-dst.rgb);vec3 b=mix(d*(sqrt(dst.rgb)-dst.rgb),d*dst.rgb*((16.0*dst.rgb-12.0)*dst.rgb+3.0),w*(1.0-step(0.25,dst.rgb)));vec3 c=mix(a,b,w);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",Qy="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){return src;}",Xy="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=max(dst.rgb-src.rgb,0.0);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",Iy="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=mix(max(1.0-min((1.0-dst.rgb)/(2.0*src.rgb),1.0),0.0),min(dst.rgb/(2.0*(1.0-src.rgb)),1.0),step(0.5,src.rgb));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",Ky=new Map([[tt.ADD,gy],[tt.ALPHA,yy],[tt.AVERAGE,_y],[tt.COLOR,by],[tt.COLOR_BURN,Sy],[tt.COLOR_DODGE,Ey],[tt.DARKEN,Ty],[tt.DIFFERENCE,zy],[tt.DIVIDE,Oy],[tt.DST,null],[tt.EXCLUSION,xy],[tt.HARD_LIGHT,My],[tt.HARD_MIX,Cy],[tt.HUE,Uy],[tt.INVERT,Ay],[tt.INVERT_RGB,Dy],[tt.LIGHTEN,Ry],[tt.LINEAR_BURN,Ny],[tt.LINEAR_DODGE,By],[tt.LINEAR_LIGHT,wy],[tt.LUMINOSITY,Hy],[tt.MULTIPLY,Ly],[tt.NEGATION,ky],[tt.NORMAL,jy],[tt.OVERLAY,Gy],[tt.PIN_LIGHT,Vy],[tt.REFLECT,Fy],[tt.SATURATION,Yy],[tt.SCREEN,qy],[tt.SOFT_LIGHT,Zy],[tt.SRC,Qy],[tt.SUBTRACT,Xy],[tt.VIVID_LIGHT,Iy]]),Py=class extends zp{constructor(u,r=1){super(),this._blendFunction=u,this.opacity=new ct(r)}getOpacity(){return this.opacity.value}setOpacity(u){this.opacity.value=u}get blendFunction(){return this._blendFunction}set blendFunction(u){this._blendFunction=u,this.dispatchEvent({type:"change"})}getBlendFunction(){return this.blendFunction}setBlendFunction(u){this.blendFunction=u}getShaderCode(){return Ky.get(this.blendFunction)}},em=class extends zp{constructor(u,r,{attributes:d=xr.NONE,blendFunction:m=tt.NORMAL,defines:v=new Map,uniforms:b=new Map,extensions:S=null,vertexShader:E=null}={}){super(),this.name=u,this.renderer=null,this.attributes=d,this.fragmentShader=r,this.vertexShader=E,this.defines=v,this.uniforms=b,this.extensions=S,this.blendMode=new Py(m),this.blendMode.addEventListener("change",T=>this.setChanged()),this._inputColorSpace=Tp,this._outputColorSpace=d0}get inputColorSpace(){return this._inputColorSpace}set inputColorSpace(u){this._inputColorSpace=u,this.setChanged()}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(u){this._outputColorSpace=u,this.setChanged()}set mainScene(u){}set mainCamera(u){}getName(){return this.name}setRenderer(u){this.renderer=u}getDefines(){return this.defines}getUniforms(){return this.uniforms}getExtensions(){return this.extensions}getBlendMode(){return this.blendMode}getAttributes(){return this.attributes}setAttributes(u){this.attributes=u,this.setChanged()}getFragmentShader(){return this.fragmentShader}setFragmentShader(u){this.fragmentShader=u,this.setChanged()}getVertexShader(){return this.vertexShader}setVertexShader(u){this.vertexShader=u,this.setChanged()}setChanged(){this.dispatchEvent({type:"change"})}setDepthTexture(u,r=ac){}update(u,r,d){}setSize(u,r){}initialize(u,r,d){}dispose(){for(const u of Object.keys(this)){const r=this[u];(r instanceof ni||r instanceof h0||r instanceof m0||r instanceof El)&&this[u].dispose()}}},Dp={MEDIUM:2,LARGE:3},$y=`#ifdef FRAMEBUFFER_PRECISION_HIGH
94
+ uniform mediump sampler2D inputBuffer;
95
+ #else
96
+ uniform lowp sampler2D inputBuffer;
97
+ #endif
98
+ varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec4 sum=texture2D(inputBuffer,vUv0);sum+=texture2D(inputBuffer,vUv1);sum+=texture2D(inputBuffer,vUv2);sum+=texture2D(inputBuffer,vUv3);gl_FragColor=sum*0.25;
99
+ #include <colorspace_fragment>
100
+ }`,Jy="uniform vec4 texelSize;uniform float kernel;uniform float scale;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 uv=position.xy*0.5+0.5;vec2 dUv=(texelSize.xy*vec2(kernel)+texelSize.zw)*scale;vUv0=vec2(uv.x-dUv.x,uv.y+dUv.y);vUv1=vec2(uv.x+dUv.x,uv.y+dUv.y);vUv2=vec2(uv.x+dUv.x,uv.y-dUv.y);vUv3=vec2(uv.x-dUv.x,uv.y-dUv.y);gl_Position=vec4(position.xy,1.0,1.0);}",Wy=[new Float32Array([0,0]),new Float32Array([0,1,1]),new Float32Array([0,1,1,2]),new Float32Array([0,1,2,2,3]),new Float32Array([0,1,2,3,4,4,5]),new Float32Array([0,1,2,3,4,5,7,8,9,10])],e_=class extends Yi{constructor(u=new fp){super({name:"KawaseBlurMaterial",uniforms:{inputBuffer:new ct(null),texelSize:new ct(new fp),scale:new ct(1),kernel:new ct(0)},blending:Cr,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:$y,vertexShader:Jy}),this.setTexelSize(u.x,u.y),this.kernelSize=Dp.MEDIUM}set inputBuffer(u){this.uniforms.inputBuffer.value=u}setInputBuffer(u){this.inputBuffer=u}get kernelSequence(){return Wy[this.kernelSize]}get scale(){return this.uniforms.scale.value}set scale(u){this.uniforms.scale.value=u}getScale(){return this.uniforms.scale.value}setScale(u){this.uniforms.scale.value=u}getKernel(){return null}get kernel(){return this.uniforms.kernel.value}set kernel(u){this.uniforms.kernel.value=u}setKernel(u){this.kernel=u}setTexelSize(u,r){this.uniforms.texelSize.value.set(u,r,u*.5,r*.5)}setSize(u,r){const d=1/u,m=1/r;this.uniforms.texelSize.value.set(d,m,d*.5,m*.5)}},t_=class extends El{constructor({kernelSize:u=Dp.MEDIUM,resolutionScale:r=.5,width:d=rl.AUTO_SIZE,height:m=rl.AUTO_SIZE,resolutionX:v=d,resolutionY:b=m}={}){super("KawaseBlurPass"),this.renderTargetA=new ni(1,1,{depthBuffer:!1}),this.renderTargetA.texture.name="Blur.Target.A",this.renderTargetB=this.renderTargetA.clone(),this.renderTargetB.texture.name="Blur.Target.B";const S=this.resolution=new rl(this,v,b,r);S.addEventListener("change",E=>this.setSize(S.baseWidth,S.baseHeight)),this._blurMaterial=new e_,this._blurMaterial.kernelSize=u,this.copyMaterial=new w0}getResolution(){return this.resolution}get blurMaterial(){return this._blurMaterial}set blurMaterial(u){this._blurMaterial=u}get dithering(){return this.copyMaterial.dithering}set dithering(u){this.copyMaterial.dithering=u}get kernelSize(){return this.blurMaterial.kernelSize}set kernelSize(u){this.blurMaterial.kernelSize=u}get width(){return this.resolution.width}set width(u){this.resolution.preferredWidth=u}get height(){return this.resolution.height}set height(u){this.resolution.preferredHeight=u}get scale(){return this.blurMaterial.scale}set scale(u){this.blurMaterial.scale=u}getScale(){return this.blurMaterial.scale}setScale(u){this.blurMaterial.scale=u}getKernelSize(){return this.kernelSize}setKernelSize(u){this.kernelSize=u}getResolutionScale(){return this.resolution.scale}setResolutionScale(u){this.resolution.scale=u}render(u,r,d,m,v){const b=this.scene,S=this.camera,E=this.renderTargetA,T=this.renderTargetB,C=this.blurMaterial,R=C.kernelSequence;let x=r;this.fullscreenMaterial=C;for(let V=0,N=R.length;V<N;++V){const K=(V&1)===0?E:T;C.kernel=R[V],C.inputBuffer=x.texture,u.setRenderTarget(K),u.render(b,S),x=K}this.fullscreenMaterial=this.copyMaterial,this.copyMaterial.inputBuffer=x.texture,u.setRenderTarget(this.renderToScreen?null:d),u.render(b,S)}setSize(u,r){const d=this.resolution;d.setBaseSize(u,r);const m=d.width,v=d.height;this.renderTargetA.setSize(m,v),this.renderTargetB.setSize(m,v),this.blurMaterial.setSize(u,r)}initialize(u,r,d){d!==void 0&&(this.renderTargetA.texture.type=d,this.renderTargetB.texture.type=d,d!==Nu?(this.blurMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1",this.copyMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1"):u!==null&&u.outputColorSpace===Hn&&(this.renderTargetA.texture.colorSpace=Hn,this.renderTargetB.texture.colorSpace=Hn))}static get AUTO_SIZE(){return rl.AUTO_SIZE}},n_=`#include <common>
101
+ #ifdef FRAMEBUFFER_PRECISION_HIGH
102
+ uniform mediump sampler2D inputBuffer;
103
+ #else
104
+ uniform lowp sampler2D inputBuffer;
105
+ #endif
106
+ #ifdef RANGE
107
+ uniform vec2 range;
108
+ #elif defined(THRESHOLD)
109
+ uniform float threshold;uniform float smoothing;
110
+ #endif
111
+ varying vec2 vUv;void main(){vec4 texel=texture2D(inputBuffer,vUv);float l=luminance(texel.rgb);float mask=1.0;
112
+ #ifdef RANGE
113
+ float low=step(range.x,l);float high=step(l,range.y);mask=low*high;
114
+ #elif defined(THRESHOLD)
115
+ mask=smoothstep(threshold,threshold+smoothing,l);
116
+ #endif
117
+ #ifdef COLOR
118
+ gl_FragColor=texel*mask;
119
+ #else
120
+ gl_FragColor=vec4(l*mask);
121
+ #endif
122
+ }`,l_=class extends Yi{constructor(u=!1,r=null){super({name:"LuminanceMaterial",defines:{THREE_REVISION:Op.replace(/\D+/g,"")},uniforms:{inputBuffer:new ct(null),threshold:new ct(0),smoothing:new ct(1),range:new ct(null)},blending:Cr,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:n_,vertexShader:B0}),this.colorOutput=u,this.luminanceRange=r}set inputBuffer(u){this.uniforms.inputBuffer.value=u}setInputBuffer(u){this.uniforms.inputBuffer.value=u}get threshold(){return this.uniforms.threshold.value}set threshold(u){this.smoothing>0||u>0?this.defines.THRESHOLD="1":delete this.defines.THRESHOLD,this.uniforms.threshold.value=u}getThreshold(){return this.threshold}setThreshold(u){this.threshold=u}get smoothing(){return this.uniforms.smoothing.value}set smoothing(u){this.threshold>0||u>0?this.defines.THRESHOLD="1":delete this.defines.THRESHOLD,this.uniforms.smoothing.value=u}getSmoothingFactor(){return this.smoothing}setSmoothingFactor(u){this.smoothing=u}get useThreshold(){return this.threshold>0||this.smoothing>0}set useThreshold(u){}get colorOutput(){return this.defines.COLOR!==void 0}set colorOutput(u){u?this.defines.COLOR="1":delete this.defines.COLOR,this.needsUpdate=!0}isColorOutputEnabled(u){return this.colorOutput}setColorOutputEnabled(u){this.colorOutput=u}get useRange(){return this.luminanceRange!==null}set useRange(u){this.luminanceRange=null}get luminanceRange(){return this.uniforms.range.value}set luminanceRange(u){u!==null?this.defines.RANGE="1":delete this.defines.RANGE,this.uniforms.range.value=u,this.needsUpdate=!0}getLuminanceRange(){return this.luminanceRange}setLuminanceRange(u){this.luminanceRange=u}},a_=class extends El{constructor({renderTarget:u,luminanceRange:r,colorOutput:d,resolutionScale:m=1,width:v=rl.AUTO_SIZE,height:b=rl.AUTO_SIZE,resolutionX:S=v,resolutionY:E=b}={}){super("LuminancePass"),this.fullscreenMaterial=new l_(d,r),this.needsSwap=!1,this.renderTarget=u,this.renderTarget===void 0&&(this.renderTarget=new ni(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="LuminancePass.Target");const T=this.resolution=new rl(this,S,E,m);T.addEventListener("change",C=>this.setSize(T.baseWidth,T.baseHeight))}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}render(u,r,d,m,v){const b=this.fullscreenMaterial;b.inputBuffer=r.texture,u.setRenderTarget(this.renderToScreen?null:this.renderTarget),u.render(this.scene,this.camera)}setSize(u,r){const d=this.resolution;d.setBaseSize(u,r),this.renderTarget.setSize(d.width,d.height)}initialize(u,r,d){d!==void 0&&d!==Nu&&(this.renderTarget.texture.type=d,this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}},i_=`#ifdef FRAMEBUFFER_PRECISION_HIGH
123
+ uniform mediump sampler2D inputBuffer;
124
+ #else
125
+ uniform lowp sampler2D inputBuffer;
126
+ #endif
127
+ #define WEIGHT_INNER 0.125
128
+ #define WEIGHT_OUTER 0.05556
129
+ varying vec2 vUv;varying vec2 vUv00;varying vec2 vUv01;varying vec2 vUv02;varying vec2 vUv03;varying vec2 vUv04;varying vec2 vUv05;varying vec2 vUv06;varying vec2 vUv07;varying vec2 vUv08;varying vec2 vUv09;varying vec2 vUv10;varying vec2 vUv11;float clampToBorder(const in vec2 uv){return float(uv.s>=0.0&&uv.s<=1.0&&uv.t>=0.0&&uv.t<=1.0);}void main(){vec4 c=vec4(0.0);vec4 w=WEIGHT_INNER*vec4(clampToBorder(vUv00),clampToBorder(vUv01),clampToBorder(vUv02),clampToBorder(vUv03));c+=w.x*texture2D(inputBuffer,vUv00);c+=w.y*texture2D(inputBuffer,vUv01);c+=w.z*texture2D(inputBuffer,vUv02);c+=w.w*texture2D(inputBuffer,vUv03);w=WEIGHT_OUTER*vec4(clampToBorder(vUv04),clampToBorder(vUv05),clampToBorder(vUv06),clampToBorder(vUv07));c+=w.x*texture2D(inputBuffer,vUv04);c+=w.y*texture2D(inputBuffer,vUv05);c+=w.z*texture2D(inputBuffer,vUv06);c+=w.w*texture2D(inputBuffer,vUv07);w=WEIGHT_OUTER*vec4(clampToBorder(vUv08),clampToBorder(vUv09),clampToBorder(vUv10),clampToBorder(vUv11));c+=w.x*texture2D(inputBuffer,vUv08);c+=w.y*texture2D(inputBuffer,vUv09);c+=w.z*texture2D(inputBuffer,vUv10);c+=w.w*texture2D(inputBuffer,vUv11);c+=WEIGHT_OUTER*texture2D(inputBuffer,vUv);gl_FragColor=c;
130
+ #include <colorspace_fragment>
131
+ }`,s_="uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv00;varying vec2 vUv01;varying vec2 vUv02;varying vec2 vUv03;varying vec2 vUv04;varying vec2 vUv05;varying vec2 vUv06;varying vec2 vUv07;varying vec2 vUv08;varying vec2 vUv09;varying vec2 vUv10;varying vec2 vUv11;void main(){vUv=position.xy*0.5+0.5;vUv00=vUv+texelSize*vec2(-1.0,1.0);vUv01=vUv+texelSize*vec2(1.0,1.0);vUv02=vUv+texelSize*vec2(-1.0,-1.0);vUv03=vUv+texelSize*vec2(1.0,-1.0);vUv04=vUv+texelSize*vec2(-2.0,2.0);vUv05=vUv+texelSize*vec2(0.0,2.0);vUv06=vUv+texelSize*vec2(2.0,2.0);vUv07=vUv+texelSize*vec2(-2.0,0.0);vUv08=vUv+texelSize*vec2(2.0,0.0);vUv09=vUv+texelSize*vec2(-2.0,-2.0);vUv10=vUv+texelSize*vec2(0.0,-2.0);vUv11=vUv+texelSize*vec2(2.0,-2.0);gl_Position=vec4(position.xy,1.0,1.0);}",u_=class extends Yi{constructor(){super({name:"DownsamplingMaterial",uniforms:{inputBuffer:new ct(null),texelSize:new ct(new wn)},blending:Cr,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:i_,vertexShader:s_})}set inputBuffer(u){this.uniforms.inputBuffer.value=u}setSize(u,r){this.uniforms.texelSize.value.set(1/u,1/r)}},r_=`#ifdef FRAMEBUFFER_PRECISION_HIGH
132
+ uniform mediump sampler2D inputBuffer;uniform mediump sampler2D supportBuffer;
133
+ #else
134
+ uniform lowp sampler2D inputBuffer;uniform lowp sampler2D supportBuffer;
135
+ #endif
136
+ uniform float radius;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;varying vec2 vUv6;varying vec2 vUv7;void main(){vec4 c=vec4(0.0);c+=texture2D(inputBuffer,vUv0)*0.0625;c+=texture2D(inputBuffer,vUv1)*0.125;c+=texture2D(inputBuffer,vUv2)*0.0625;c+=texture2D(inputBuffer,vUv3)*0.125;c+=texture2D(inputBuffer,vUv)*0.25;c+=texture2D(inputBuffer,vUv4)*0.125;c+=texture2D(inputBuffer,vUv5)*0.0625;c+=texture2D(inputBuffer,vUv6)*0.125;c+=texture2D(inputBuffer,vUv7)*0.0625;vec4 baseColor=texture2D(supportBuffer,vUv);gl_FragColor=mix(baseColor,c,radius);
137
+ #include <colorspace_fragment>
138
+ }`,o_="uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;varying vec2 vUv6;varying vec2 vUv7;void main(){vUv=position.xy*0.5+0.5;vUv0=vUv+texelSize*vec2(-1.0,1.0);vUv1=vUv+texelSize*vec2(0.0,1.0);vUv2=vUv+texelSize*vec2(1.0,1.0);vUv3=vUv+texelSize*vec2(-1.0,0.0);vUv4=vUv+texelSize*vec2(1.0,0.0);vUv5=vUv+texelSize*vec2(-1.0,-1.0);vUv6=vUv+texelSize*vec2(0.0,-1.0);vUv7=vUv+texelSize*vec2(1.0,-1.0);gl_Position=vec4(position.xy,1.0,1.0);}",c_=class extends Yi{constructor(){super({name:"UpsamplingMaterial",uniforms:{inputBuffer:new ct(null),supportBuffer:new ct(null),texelSize:new ct(new wn),radius:new ct(.85)},blending:Cr,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:r_,vertexShader:o_})}set inputBuffer(u){this.uniforms.inputBuffer.value=u}set supportBuffer(u){this.uniforms.supportBuffer.value=u}get radius(){return this.uniforms.radius.value}set radius(u){this.uniforms.radius.value=u}setSize(u,r){this.uniforms.texelSize.value.set(1/u,1/r)}},f_=class extends El{constructor(){super("MipmapBlurPass"),this.needsSwap=!1,this.renderTarget=new ni(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="Upsampling.Mipmap0",this.downsamplingMipmaps=[],this.upsamplingMipmaps=[],this.downsamplingMaterial=new u_,this.upsamplingMaterial=new c_,this.resolution=new wn}get texture(){return this.renderTarget.texture}get levels(){return this.downsamplingMipmaps.length}set levels(u){if(this.levels!==u){const r=this.renderTarget;this.dispose(),this.downsamplingMipmaps=[],this.upsamplingMipmaps=[];for(let d=0;d<u;++d){const m=r.clone();m.texture.name="Downsampling.Mipmap"+d,this.downsamplingMipmaps.push(m)}this.upsamplingMipmaps.push(r);for(let d=1,m=u-1;d<m;++d){const v=r.clone();v.texture.name="Upsampling.Mipmap"+d,this.upsamplingMipmaps.push(v)}this.setSize(this.resolution.x,this.resolution.y)}}get radius(){return this.upsamplingMaterial.radius}set radius(u){this.upsamplingMaterial.radius=u}render(u,r,d,m,v){const{scene:b,camera:S}=this,{downsamplingMaterial:E,upsamplingMaterial:T}=this,{downsamplingMipmaps:C,upsamplingMipmaps:R}=this;let x=r;this.fullscreenMaterial=E;for(let V=0,N=C.length;V<N;++V){const K=C[V];E.setSize(x.width,x.height),E.inputBuffer=x.texture,u.setRenderTarget(K),u.render(b,S),x=K}this.fullscreenMaterial=T;for(let V=R.length-1;V>=0;--V){const N=R[V];T.setSize(x.width,x.height),T.inputBuffer=x.texture,T.supportBuffer=C[V].texture,u.setRenderTarget(N),u.render(b,S),x=N}}setSize(u,r){const d=this.resolution;d.set(u,r);let m=d.width,v=d.height;for(let b=0,S=this.downsamplingMipmaps.length;b<S;++b)m=Math.round(m*.5),v=Math.round(v*.5),this.downsamplingMipmaps[b].setSize(m,v),b<this.upsamplingMipmaps.length&&this.upsamplingMipmaps[b].setSize(m,v)}initialize(u,r,d){if(d!==void 0){const m=this.downsamplingMipmaps.concat(this.upsamplingMipmaps);for(const v of m)v.texture.type=d;if(d!==Nu)this.downsamplingMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1",this.upsamplingMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1";else if(u!==null&&u.outputColorSpace===Hn)for(const v of m)v.texture.colorSpace=Hn}}dispose(){super.dispose();for(const u of this.downsamplingMipmaps.concat(this.upsamplingMipmaps))u.dispose()}},d_=`#ifdef FRAMEBUFFER_PRECISION_HIGH
139
+ uniform mediump sampler2D map;
140
+ #else
141
+ uniform lowp sampler2D map;
142
+ #endif
143
+ uniform float intensity;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){outputColor=texture2D(map,uv)*intensity;}`,h_=class extends em{constructor({blendFunction:u=tt.SCREEN,luminanceThreshold:r=1,luminanceSmoothing:d=.03,mipmapBlur:m=!0,intensity:v=1,radius:b=.85,levels:S=8,kernelSize:E=Dp.LARGE,resolutionScale:T=.5,width:C=rl.AUTO_SIZE,height:R=rl.AUTO_SIZE,resolutionX:x=C,resolutionY:V=R}={}){super("BloomEffect",d_,{blendFunction:u,uniforms:new Map([["map",new ct(null)],["intensity",new ct(v)]])}),this.renderTarget=new ni(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="Bloom.Target",this.blurPass=new t_({kernelSize:E}),this.luminancePass=new a_({colorOutput:!0}),this.luminanceMaterial.threshold=r,this.luminanceMaterial.smoothing=d,this.mipmapBlurPass=new f_,this.mipmapBlurPass.enabled=m,this.mipmapBlurPass.radius=b,this.mipmapBlurPass.levels=S,this.uniforms.get("map").value=m?this.mipmapBlurPass.texture:this.renderTarget.texture;const N=this.resolution=new rl(this,x,V,T);N.addEventListener("change",K=>this.setSize(N.baseWidth,N.baseHeight))}get texture(){return this.mipmapBlurPass.enabled?this.mipmapBlurPass.texture:this.renderTarget.texture}getTexture(){return this.texture}getResolution(){return this.resolution}getBlurPass(){return this.blurPass}getLuminancePass(){return this.luminancePass}get luminanceMaterial(){return this.luminancePass.fullscreenMaterial}getLuminanceMaterial(){return this.luminancePass.fullscreenMaterial}get width(){return this.resolution.width}set width(u){this.resolution.preferredWidth=u}get height(){return this.resolution.height}set height(u){this.resolution.preferredHeight=u}get dithering(){return this.blurPass.dithering}set dithering(u){this.blurPass.dithering=u}get kernelSize(){return this.blurPass.kernelSize}set kernelSize(u){this.blurPass.kernelSize=u}get distinction(){return console.warn(this.name,"distinction was removed"),1}set distinction(u){console.warn(this.name,"distinction was removed")}get intensity(){return this.uniforms.get("intensity").value}set intensity(u){this.uniforms.get("intensity").value=u}getIntensity(){return this.intensity}setIntensity(u){this.intensity=u}getResolutionScale(){return this.resolution.scale}setResolutionScale(u){this.resolution.scale=u}update(u,r,d){const m=this.renderTarget,v=this.luminancePass;v.enabled?(v.render(u,r),this.mipmapBlurPass.enabled?this.mipmapBlurPass.render(u,v.renderTarget):this.blurPass.render(u,v.renderTarget,m)):this.mipmapBlurPass.enabled?this.mipmapBlurPass.render(u,r):this.blurPass.render(u,r,m)}setSize(u,r){const d=this.resolution;d.setBaseSize(u,r),this.renderTarget.setSize(d.width,d.height),this.blurPass.resolution.copy(d),this.luminancePass.setSize(u,r),this.mipmapBlurPass.setSize(u,r)}initialize(u,r,d){this.blurPass.initialize(u,r,d),this.luminancePass.initialize(u,r,d),this.mipmapBlurPass.initialize(u,r,d),d!==void 0&&(this.renderTarget.texture.type=d,u!==null&&u.outputColorSpace===Hn&&(this.renderTarget.texture.colorSpace=Hn))}},L0=class extends El{constructor(u,r,d=null){super("RenderPass",u,r),this.needsSwap=!1,this.needsDepthBlit=!0,this.clearPass=new H0,this.overrideMaterialManager=d===null?null:new Gv(d),this.ignoreBackground=!1,this.skipShadowMapUpdate=!1,this.selection=null}set mainScene(u){this.scene=u}set mainCamera(u){this.camera=u}get renderToScreen(){return super.renderToScreen}set renderToScreen(u){super.renderToScreen=u,this.clearPass.renderToScreen=u}get overrideMaterial(){const u=this.overrideMaterialManager;return u!==null?u.material:null}set overrideMaterial(u){const r=this.overrideMaterialManager;u!==null?r!==null?r.setMaterial(u):this.overrideMaterialManager=new Gv(u):r!==null&&(r.dispose(),this.overrideMaterialManager=null)}getOverrideMaterial(){return this.overrideMaterial}setOverrideMaterial(u){this.overrideMaterial=u}get clear(){return this.clearPass.enabled}set clear(u){this.clearPass.enabled=u}getSelection(){return this.selection}setSelection(u){this.selection=u}isBackgroundDisabled(){return this.ignoreBackground}setBackgroundDisabled(u){this.ignoreBackground=u}isShadowMapDisabled(){return this.skipShadowMapUpdate}setShadowMapDisabled(u){this.skipShadowMapUpdate=u}getClearPass(){return this.clearPass}render(u,r,d,m,v){const b=this.scene,S=this.camera,E=this.selection,T=S.layers.mask,C=b.background,R=u.shadowMap.autoUpdate,x=this.renderToScreen?null:r;E!==null&&S.layers.set(E.getLayer()),this.skipShadowMapUpdate&&(u.shadowMap.autoUpdate=!1),(this.ignoreBackground||this.clearPass.overrideClearColor!==null)&&(b.background=null),this.clearPass.enabled&&this.clearPass.render(u,r),u.setRenderTarget(x),this.overrideMaterialManager!==null?this.overrideMaterialManager.render(u,b,S):u.render(b,S),S.layers.mask=T,b.background=C,u.shadowMap.autoUpdate=R}},m_=`#include <packing>
144
+ #ifdef GL_FRAGMENT_PRECISION_HIGH
145
+ uniform highp sampler2D depthBuffer;
146
+ #else
147
+ uniform mediump sampler2D depthBuffer;
148
+ #endif
149
+ #ifdef DOWNSAMPLE_NORMALS
150
+ uniform lowp sampler2D normalBuffer;
151
+ #endif
152
+ varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;float readDepth(const in vec2 uv){
153
+ #if DEPTH_PACKING == 3201
154
+ return unpackRGBAToDepth(texture2D(depthBuffer,uv));
155
+ #else
156
+ return texture2D(depthBuffer,uv).r;
157
+ #endif
158
+ }int findBestDepth(const in float samples[4]){float c=(samples[0]+samples[1]+samples[2]+samples[3])*0.25;float distances[4];distances[0]=abs(c-samples[0]);distances[1]=abs(c-samples[1]);distances[2]=abs(c-samples[2]);distances[3]=abs(c-samples[3]);float maxDistance=max(max(distances[0],distances[1]),max(distances[2],distances[3]));int remaining[3];int rejected[3];int i,j,k;for(i=0,j=0,k=0;i<4;++i){if(distances[i]<maxDistance){remaining[j++]=i;}else{rejected[k++]=i;}}for(;j<3;++j){remaining[j]=rejected[--k];}vec3 s=vec3(samples[remaining[0]],samples[remaining[1]],samples[remaining[2]]);c=(s.x+s.y+s.z)/3.0;distances[0]=abs(c-s.x);distances[1]=abs(c-s.y);distances[2]=abs(c-s.z);float minDistance=min(distances[0],min(distances[1],distances[2]));for(i=0;i<3;++i){if(distances[i]==minDistance){break;}}return remaining[i];}void main(){float d[4];d[0]=readDepth(vUv0);d[1]=readDepth(vUv1);d[2]=readDepth(vUv2);d[3]=readDepth(vUv3);int index=findBestDepth(d);
159
+ #ifdef DOWNSAMPLE_NORMALS
160
+ vec3 n[4];n[0]=texture2D(normalBuffer,vUv0).rgb;n[1]=texture2D(normalBuffer,vUv1).rgb;n[2]=texture2D(normalBuffer,vUv2).rgb;n[3]=texture2D(normalBuffer,vUv3).rgb;
161
+ #else
162
+ vec3 n[4];n[0]=vec3(0.0);n[1]=vec3(0.0);n[2]=vec3(0.0);n[3]=vec3(0.0);
163
+ #endif
164
+ gl_FragColor=vec4(n[index],d[index]);}`,p_="uniform vec2 texelSize;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 uv=position.xy*0.5+0.5;vUv0=uv;vUv1=vec2(uv.x,uv.y+texelSize.y);vUv2=vec2(uv.x+texelSize.x,uv.y);vUv3=uv+texelSize;gl_Position=vec4(position.xy,1.0,1.0);}",v_=class extends Yi{constructor(){super({name:"DepthDownsamplingMaterial",defines:{DEPTH_PACKING:"0"},uniforms:{depthBuffer:new ct(null),normalBuffer:new ct(null),texelSize:new ct(new wn)},blending:Cr,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:m_,vertexShader:p_})}set depthBuffer(u){this.uniforms.depthBuffer.value=u}set depthPacking(u){this.defines.DEPTH_PACKING=u.toFixed(0),this.needsUpdate=!0}setDepthBuffer(u,r=ac){this.depthBuffer=u,this.depthPacking=r}set normalBuffer(u){this.uniforms.normalBuffer.value=u,u!==null?this.defines.DOWNSAMPLE_NORMALS="1":delete this.defines.DOWNSAMPLE_NORMALS,this.needsUpdate=!0}setNormalBuffer(u){this.normalBuffer=u}setTexelSize(u,r){this.uniforms.texelSize.value.set(u,r)}setSize(u,r){this.uniforms.texelSize.value.set(1/u,1/r)}},g_=class extends El{constructor({normalBuffer:u=null,resolutionScale:r=.5,width:d=rl.AUTO_SIZE,height:m=rl.AUTO_SIZE,resolutionX:v=d,resolutionY:b=m}={}){super("DepthDownsamplingPass");const S=new v_;S.normalBuffer=u,this.fullscreenMaterial=S,this.needsDepthTexture=!0,this.needsSwap=!1,this.renderTarget=new ni(1,1,{minFilter:Kh,magFilter:Kh,depthBuffer:!1,type:f0}),this.renderTarget.texture.name="DepthDownsamplingPass.Target",this.renderTarget.texture.generateMipmaps=!1;const E=this.resolution=new rl(this,v,b,r);E.addEventListener("change",T=>this.setSize(E.baseWidth,E.baseHeight))}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}setDepthTexture(u,r=ac){this.fullscreenMaterial.depthBuffer=u,this.fullscreenMaterial.depthPacking=r}render(u,r,d,m,v){u.setRenderTarget(this.renderToScreen?null:this.renderTarget),u.render(this.scene,this.camera)}setSize(u,r){const d=this.resolution;d.setBaseSize(u,r),this.renderTarget.setSize(d.width,d.height),this.fullscreenMaterial.setSize(u,r)}initialize(u,r,d){const m=u.getContext();if(!(m.getExtension("EXT_color_buffer_float")||m.getExtension("EXT_color_buffer_half_float")))throw new Error("Rendering to float texture is not supported.")}},y_=`#include <common>
165
+ #include <packing>
166
+ #include <dithering_pars_fragment>
167
+ #define packFloatToRGBA(v) packDepthToRGBA(v)
168
+ #define unpackRGBAToFloat(v) unpackRGBAToDepth(v)
169
+ #ifdef FRAMEBUFFER_PRECISION_HIGH
170
+ uniform mediump sampler2D inputBuffer;
171
+ #else
172
+ uniform lowp sampler2D inputBuffer;
173
+ #endif
174
+ #if DEPTH_PACKING == 3201
175
+ uniform lowp sampler2D depthBuffer;
176
+ #elif defined(GL_FRAGMENT_PRECISION_HIGH)
177
+ uniform highp sampler2D depthBuffer;
178
+ #else
179
+ uniform mediump sampler2D depthBuffer;
180
+ #endif
181
+ uniform vec2 resolution;uniform vec2 texelSize;uniform float cameraNear;uniform float cameraFar;uniform float aspect;uniform float time;varying vec2 vUv;vec4 sRGBToLinear(const in vec4 value){return vec4(mix(pow(value.rgb*0.9478672986+vec3(0.0521327014),vec3(2.4)),value.rgb*0.0773993808,vec3(lessThanEqual(value.rgb,vec3(0.04045)))),value.a);}float readDepth(const in vec2 uv){
182
+ #if DEPTH_PACKING == 3201
183
+ float depth=unpackRGBAToDepth(texture2D(depthBuffer,uv));
184
+ #else
185
+ float depth=texture2D(depthBuffer,uv).r;
186
+ #endif
187
+ #if defined(USE_LOGARITHMIC_DEPTH_BUFFER) || defined(LOG_DEPTH)
188
+ float d=pow(2.0,depth*log2(cameraFar+1.0))-1.0;float a=cameraFar/(cameraFar-cameraNear);float b=cameraFar*cameraNear/(cameraNear-cameraFar);depth=a+b/d;
189
+ #elif defined(USE_REVERSED_DEPTH_BUFFER)
190
+ depth=1.0-depth;
191
+ #endif
192
+ return depth;}float getViewZ(const in float depth){
193
+ #ifdef PERSPECTIVE_CAMERA
194
+ return perspectiveDepthToViewZ(depth,cameraNear,cameraFar);
195
+ #else
196
+ return orthographicDepthToViewZ(depth,cameraNear,cameraFar);
197
+ #endif
198
+ }vec3 RGBToHCV(const in vec3 RGB){vec4 P=mix(vec4(RGB.bg,-1.0,2.0/3.0),vec4(RGB.gb,0.0,-1.0/3.0),step(RGB.b,RGB.g));vec4 Q=mix(vec4(P.xyw,RGB.r),vec4(RGB.r,P.yzx),step(P.x,RGB.r));float C=Q.x-min(Q.w,Q.y);float H=abs((Q.w-Q.y)/(6.0*C+EPSILON)+Q.z);return vec3(H,C,Q.x);}vec3 RGBToHSL(const in vec3 RGB){vec3 HCV=RGBToHCV(RGB);float L=HCV.z-HCV.y*0.5;float S=HCV.y/(1.0-abs(L*2.0-1.0)+EPSILON);return vec3(HCV.x,S,L);}vec3 HueToRGB(const in float H){float R=abs(H*6.0-3.0)-1.0;float G=2.0-abs(H*6.0-2.0);float B=2.0-abs(H*6.0-4.0);return clamp(vec3(R,G,B),0.0,1.0);}vec3 HSLToRGB(const in vec3 HSL){vec3 RGB=HueToRGB(HSL.x);float C=(1.0-abs(2.0*HSL.z-1.0))*HSL.y;return(RGB-0.5)*C+HSL.z;}FRAGMENT_HEAD void main(){FRAGMENT_MAIN_UV vec4 color0=texture2D(inputBuffer,UV);vec4 color1=vec4(0.0);FRAGMENT_MAIN_IMAGE color0.a=clamp(color0.a,0.0,1.0);gl_FragColor=color0;
199
+ #ifdef ENCODE_OUTPUT
200
+ #include <colorspace_fragment>
201
+ #endif
202
+ #include <dithering_fragment>
203
+ }`,__="uniform vec2 resolution;uniform vec2 texelSize;uniform float cameraNear;uniform float cameraFar;uniform float aspect;uniform float time;varying vec2 vUv;VERTEX_HEAD void main(){vUv=position.xy*0.5+0.5;VERTEX_MAIN_SUPPORT gl_Position=vec4(position.xy,1.0,1.0);}",b_=class extends Yi{constructor(u,r,d,m,v=!1){super({name:"EffectMaterial",defines:{THREE_REVISION:Op.replace(/\D+/g,""),DEPTH_PACKING:"0",ENCODE_OUTPUT:"1"},uniforms:{inputBuffer:new ct(null),depthBuffer:new ct(null),resolution:new ct(new wn),texelSize:new ct(new wn),cameraNear:new ct(.3),cameraFar:new ct(1e3),aspect:new ct(1),time:new ct(0)},blending:Cr,toneMapped:!1,depthWrite:!1,depthTest:!1,dithering:v}),u&&this.setShaderParts(u),r&&this.setDefines(r),d&&this.setUniforms(d),this.copyCameraSettings(m)}set inputBuffer(u){this.uniforms.inputBuffer.value=u}setInputBuffer(u){this.uniforms.inputBuffer.value=u}get depthBuffer(){return this.uniforms.depthBuffer.value}set depthBuffer(u){this.uniforms.depthBuffer.value=u}get depthPacking(){return Number(this.defines.DEPTH_PACKING)}set depthPacking(u){this.defines.DEPTH_PACKING=u.toFixed(0),this.needsUpdate=!0}setDepthBuffer(u,r=ac){this.depthBuffer=u,this.depthPacking=r}setShaderData(u){this.setShaderParts(u.shaderParts),this.setDefines(u.defines),this.setUniforms(u.uniforms),this.setExtensions(u.extensions)}setShaderParts(u){return this.fragmentShader=y_.replace(ot.FRAGMENT_HEAD,u.get(ot.FRAGMENT_HEAD)||"").replace(ot.FRAGMENT_MAIN_UV,u.get(ot.FRAGMENT_MAIN_UV)||"").replace(ot.FRAGMENT_MAIN_IMAGE,u.get(ot.FRAGMENT_MAIN_IMAGE)||""),this.vertexShader=__.replace(ot.VERTEX_HEAD,u.get(ot.VERTEX_HEAD)||"").replace(ot.VERTEX_MAIN_SUPPORT,u.get(ot.VERTEX_MAIN_SUPPORT)||""),this.needsUpdate=!0,this}setDefines(u){for(const r of u.entries())this.defines[r[0]]=r[1];return this.needsUpdate=!0,this}setUniforms(u){for(const r of u.entries())this.uniforms[r[0]]=r[1];return this}setExtensions(u){this.extensions={};for(const r of u)this.extensions[r]=!0;return this}get encodeOutput(){return this.defines.ENCODE_OUTPUT!==void 0}set encodeOutput(u){this.encodeOutput!==u&&(u?this.defines.ENCODE_OUTPUT="1":delete this.defines.ENCODE_OUTPUT,this.needsUpdate=!0)}isOutputEncodingEnabled(u){return this.encodeOutput}setOutputEncodingEnabled(u){this.encodeOutput=u}get time(){return this.uniforms.time.value}set time(u){this.uniforms.time.value=u}setDeltaTime(u){this.uniforms.time.value+=u}adoptCameraSettings(u){this.copyCameraSettings(u)}copyCameraSettings(u){u&&(this.uniforms.cameraNear.value=u.near,this.uniforms.cameraFar.value=u.far,u instanceof lm?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}setSize(u,r){const d=this.uniforms;d.resolution.value.set(u,r),d.texelSize.value.set(1/u,1/r),d.aspect.value=u/r}static get Section(){return ot}};function Vv(u,r,d){for(const m of r){const v="$1"+u+m.charAt(0).toUpperCase()+m.slice(1),b=new RegExp("([^\\.])(\\b"+m+"\\b)","g");for(const S of d.entries())S[1]!==null&&d.set(S[0],S[1].replace(b,v))}}function S_(u,r,d){let m=r.getFragmentShader(),v=r.getVertexShader();const b=m!==void 0&&/mainImage/.test(m),S=m!==void 0&&/mainUv/.test(m);if(d.attributes|=r.getAttributes(),m===void 0)throw new Error(`Missing fragment shader (${r.name})`);if(S&&(d.attributes&xr.CONVOLUTION)!==0)throw new Error(`Effects that transform UVs are incompatible with convolution effects (${r.name})`);if(!b&&!S)throw new Error(`Could not find mainImage or mainUv function (${r.name})`);{const E=/\w+\s+(\w+)\([\w\s,]*\)\s*{/g,T=d.shaderParts;let C=T.get(ot.FRAGMENT_HEAD)||"",R=T.get(ot.FRAGMENT_MAIN_UV)||"",x=T.get(ot.FRAGMENT_MAIN_IMAGE)||"",V=T.get(ot.VERTEX_HEAD)||"",N=T.get(ot.VERTEX_MAIN_SUPPORT)||"";const K=new Set,ee=new Set;if(S&&(R+=` ${u}MainUv(UV);
204
+ `,d.uvTransformation=!0),v!==null&&/mainSupport/.test(v)){const B=/mainSupport *\([\w\s]*?uv\s*?\)/.test(v);N+=` ${u}MainSupport(`,N+=B?`vUv);
205
+ `:`);
206
+ `;for(const Z of v.matchAll(/(?:varying\s+\w+\s+([\S\s]*?);)/g))for(const ne of Z[1].split(/\s*,\s*/))d.varyings.add(ne),K.add(ne),ee.add(ne);for(const Z of v.matchAll(E))ee.add(Z[1])}for(const B of m.matchAll(E))ee.add(B[1]);for(const B of r.defines.keys())ee.add(B.replace(/\([\w\s,]*\)/g,""));for(const B of r.uniforms.keys())ee.add(B);ee.delete("while"),ee.delete("for"),ee.delete("if"),r.uniforms.forEach((B,Z)=>d.uniforms.set(u+Z.charAt(0).toUpperCase()+Z.slice(1),B)),r.defines.forEach((B,Z)=>d.defines.set(u+Z.charAt(0).toUpperCase()+Z.slice(1),B));const le=new Map([["fragment",m],["vertex",v]]);Vv(u,ee,d.defines),Vv(u,ee,le),m=le.get("fragment"),v=le.get("vertex");const U=r.blendMode;if(d.blendModes.set(U.blendFunction,U),b){r.inputColorSpace!==null&&r.inputColorSpace!==d.colorSpace&&(x+=r.inputColorSpace===Hn?`color0 = sRGBTransferOETF(color0);
207
+ `:`color0 = sRGBToLinear(color0);
208
+ `),r.outputColorSpace!==d0?d.colorSpace=r.outputColorSpace:r.inputColorSpace!==null&&(d.colorSpace=r.inputColorSpace);const B=/MainImage *\([\w\s,]*?depth[\w\s,]*?\)/;x+=`${u}MainImage(color0, UV, `,(d.attributes&xr.DEPTH)!==0&&B.test(m)&&(x+="depth, ",d.readDepth=!0),x+=`color1);
209
+ `;const Z=u+"BlendOpacity";d.uniforms.set(Z,U.opacity),x+=`color0 = blend${U.blendFunction}(color0, color1, ${Z});
210
+
211
+ `,C+=`uniform float ${Z};
212
+
213
+ `}if(C+=m+`
214
+ `,v!==null&&(V+=v+`
215
+ `),T.set(ot.FRAGMENT_HEAD,C),T.set(ot.FRAGMENT_MAIN_UV,R),T.set(ot.FRAGMENT_MAIN_IMAGE,x),T.set(ot.VERTEX_HEAD,V),T.set(ot.VERTEX_MAIN_SUPPORT,N),r.extensions!==null)for(const B of r.extensions)d.extensions.add(B)}}var E_=class extends El{constructor(u,...r){super("EffectPass"),this.fullscreenMaterial=new b_(null,null,null,u),this.listener=d=>this.handleEvent(d),this.effects=[],this.setEffects(r),this.skipRendering=!1,this.minTime=1,this.maxTime=Number.POSITIVE_INFINITY,this.timeScale=1}set mainScene(u){for(const r of this.effects)r.mainScene=u}set mainCamera(u){this.fullscreenMaterial.copyCameraSettings(u);for(const r of this.effects)r.mainCamera=u}get encodeOutput(){return this.fullscreenMaterial.encodeOutput}set encodeOutput(u){this.fullscreenMaterial.encodeOutput=u}get dithering(){return this.fullscreenMaterial.dithering}set dithering(u){const r=this.fullscreenMaterial;r.dithering=u,r.needsUpdate=!0}setEffects(u){for(const r of this.effects)r.removeEventListener("change",this.listener);this.effects=u.sort((r,d)=>d.attributes-r.attributes);for(const r of this.effects)r.addEventListener("change",this.listener)}updateMaterial(){const u=new vy;let r=0;for(const S of this.effects)if(S.blendMode.blendFunction===tt.DST)u.attributes|=S.getAttributes()&xr.DEPTH;else{if((u.attributes&S.getAttributes()&xr.CONVOLUTION)!==0)throw new Error(`Convolution effects cannot be merged (${S.name})`);S_("e"+r++,S,u)}let d=u.shaderParts.get(ot.FRAGMENT_HEAD),m=u.shaderParts.get(ot.FRAGMENT_MAIN_IMAGE),v=u.shaderParts.get(ot.FRAGMENT_MAIN_UV);const b=/\bblend\b/g;for(const S of u.blendModes.values())d+=S.getShaderCode().replace(b,`blend${S.blendFunction}`)+`
216
+ `;(u.attributes&xr.DEPTH)!==0?(u.readDepth&&(m=`float depth = readDepth(UV);
217
+
218
+ `+m),this.needsDepthTexture=this.getDepthTexture()===null):this.needsDepthTexture=!1,u.colorSpace===Hn&&(m+=`color0 = sRGBToLinear(color0);
219
+ `),u.uvTransformation?(v=`vec2 transformedUv = vUv;
220
+ `+v,u.defines.set("UV","transformedUv")):u.defines.set("UV","vUv"),u.shaderParts.set(ot.FRAGMENT_HEAD,d),u.shaderParts.set(ot.FRAGMENT_MAIN_IMAGE,m),u.shaderParts.set(ot.FRAGMENT_MAIN_UV,v);for(const[S,E]of u.shaderParts)E!==null&&u.shaderParts.set(S,E.trim().replace(/^#/,`
221
+ #`));this.skipRendering=r===0,this.needsSwap=!this.skipRendering,this.fullscreenMaterial.setShaderData(u)}recompile(){this.updateMaterial()}getDepthTexture(){return this.fullscreenMaterial.depthBuffer}setDepthTexture(u,r=ac){this.fullscreenMaterial.depthBuffer=u,this.fullscreenMaterial.depthPacking=r;for(const d of this.effects)d.setDepthTexture(u,r)}render(u,r,d,m,v){for(const b of this.effects)b.update(u,r,m);if(!this.skipRendering||this.renderToScreen){const b=this.fullscreenMaterial;b.inputBuffer=r.texture,b.time+=m*this.timeScale,u.setRenderTarget(this.renderToScreen?null:d),u.render(this.scene,this.camera)}}setSize(u,r){this.fullscreenMaterial.setSize(u,r);for(const d of this.effects)d.setSize(u,r)}initialize(u,r,d){this.renderer=u;for(const m of this.effects)m.initialize(u,r,d);this.updateMaterial(),d!==void 0&&d!==Nu&&(this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}dispose(){super.dispose();for(const u of this.effects)u.removeEventListener("change",this.listener),u.dispose()}handleEvent(u){switch(u.type){case"change":this.recompile();break}}},T_=class extends El{constructor(u,r,{renderTarget:d,resolutionScale:m=1,width:v=rl.AUTO_SIZE,height:b=rl.AUTO_SIZE,resolutionX:S=v,resolutionY:E=b}={}){super("NormalPass"),this.needsSwap=!1,this.renderPass=new L0(u,r,new Yg);const T=this.renderPass;T.ignoreBackground=!0,T.skipShadowMapUpdate=!0;const C=T.getClearPass();C.overrideClearColor=new am(7829503),C.overrideClearAlpha=1,this.renderTarget=d,this.renderTarget===void 0&&(this.renderTarget=new ni(1,1,{minFilter:Kh,magFilter:Kh}),this.renderTarget.texture.name="NormalPass.Target");const R=this.resolution=new rl(this,S,E,m);R.addEventListener("change",x=>this.setSize(R.baseWidth,R.baseHeight))}set mainScene(u){this.renderPass.mainScene=u}set mainCamera(u){this.renderPass.mainCamera=u}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}getResolutionScale(){return this.resolution.scale}setResolutionScale(u){this.resolution.scale=u}render(u,r,d,m,v){const b=this.renderToScreen?null:this.renderTarget;this.renderPass.render(u,b,b)}setSize(u,r){const d=this.resolution;d.setBaseSize(u,r),this.renderTarget.setSize(d.width,d.height)}};function Zf(u,r,d){return r in u?Object.defineProperty(u,r,{value:d,enumerable:!0,configurable:!0,writable:!0}):u[r]=d,u}function k0(u,r){if(!(u instanceof r))throw new TypeError("Cannot call a class as a function")}var Ma=function u(r,d,m){var v=this;k0(this,u),Zf(this,"dot2",function(b,S){return v.x*b+v.y*S}),Zf(this,"dot3",function(b,S,E){return v.x*b+v.y*S+v.z*E}),this.x=r,this.y=d,this.z=m},z_=[new Ma(1,1,0),new Ma(-1,1,0),new Ma(1,-1,0),new Ma(-1,-1,0),new Ma(1,0,1),new Ma(-1,0,1),new Ma(1,0,-1),new Ma(-1,0,-1),new Ma(0,1,1),new Ma(0,-1,1),new Ma(0,1,-1),new Ma(0,-1,-1)],Fv=[151,160,137,91,90,15,131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23,190,6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,88,237,149,56,87,174,20,125,136,171,168,68,175,74,165,71,134,139,48,27,166,77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,102,143,54,65,25,63,161,1,216,80,73,209,76,132,187,208,89,18,169,200,196,135,130,116,188,159,86,164,100,109,198,173,186,3,64,52,217,226,250,124,123,5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,223,183,170,213,119,248,152,2,44,154,163,70,221,153,101,155,167,43,172,9,129,22,39,253,19,98,108,110,79,113,224,232,178,185,112,104,218,246,97,228,251,34,242,193,238,210,144,12,191,179,162,241,81,51,145,235,249,14,239,107,49,192,214,31,181,199,106,157,184,84,204,176,115,121,50,45,127,4,150,254,138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180],Yv=new Array(512),qv=new Array(512),O_=function(r){r>0&&r<1&&(r*=65536),r=Math.floor(r),r<256&&(r|=r<<8);for(var d=0;d<256;d++){var m;d&1?m=Fv[d]^r&255:m=Fv[d]^r>>8&255,Yv[d]=Yv[d+256]=m,qv[d]=qv[d+256]=z_[m%12]}};O_(0);function x_(u){if(typeof u=="number")u=Math.abs(u);else if(typeof u=="string"){var r=u;u=0;for(var d=0;d<r.length;d++)u=(u+(d+1)*(r.charCodeAt(d)%96))%2147483647}return u===0&&(u=311),u}function Zv(u){var r=x_(u);return function(){var d=r*48271%2147483647;return r=d,d/2147483647}}var M_=function u(r){var d=this;k0(this,u),Zf(this,"seed",0),Zf(this,"init",function(m){d.seed=m,d.value=Zv(m)}),Zf(this,"value",Zv(this.seed)),this.init(r)};new M_(Math.random());function ft(u){return u&&u.__esModule?u.default:u}var it={};it=JSON.parse('{"architecture":"attention-v3-int8","formatVersion":3,"globalBias":[-0.32877659797668457,0.4370867609977722,-0.05251404270529747,1.3072023391723633,0.0477047860622406,0.24477416276931763,0.009111796505749226,-0.17459993064403534],"globalFeatureInverseStandardDeviation":[10.771836280822754,1.9548665285110474,1.612365484237671],"globalFeatureMean":[0.9198138117790222,-0.49808526039123535,0.03374629095196724],"globalWeights":[101,-4,7,-127,6,-11,3,1,0,-16,-7,8,-8,-1,7,-4,0,0,-12,-3,-13,1,0,2],"headBias":[-0.15895532071590424,0.007501596584916115,-0.47742825746536255,0.01632097363471985,-0.48355796933174133,-0.1052703931927681,-0.8414919376373291,-0.21046382188796997],"headWeights":[-45,-7,-45,-20,7,-13,120,-24,-15,-26,-19,1,27,-48,-4,-10,1,-5,-24,64,91,-1,-68,39,54,39,101,-40,-127,64,-41,-17,-23,-19,3,35,-2,33,3,9,-64,-32,30,42,-112,12,28,-11,15,2,-4,-7,7,-3,-5,1,76,48,-34,-67,103,-40,-26,1,58,-11,46,-41,5,-6,-17,-8,13,17,-35,45,27,-17,-28,7,-53,12,-51,6,-32,-5,58,-9,-28,-21,37,-12,1,20,2,2,11,7,-4,-9,2,-15,-1,-8,16,12,-27,-1,61,-5,-1,4,-7,-2,7,4,1,4,-2,4,-18,-16,28,6,-65,16,3,-3,-5,-2,0,-40,-21,-22,14,30,-21,49,15,-64,43,19,23,18,5,-15,21,21,30,17,-11,-6,22,-38,-20,97,-46,-5,-13,-59,26,-13,11,-2,-10,-8,2,-15,-17,-27,-9,26,7,-7,6,9,-32,5,-9,12,49,17,-1,24,20,35,14,-33,-50,-1,-4,-26,11,11,9,-80,30,9,36,6,-12,-4,-7,39,-10,-30,-49,1,-43,-20,-34,76,-36,-10,15,-8,43,31,38,-42,39,37,-7,7,8,16,28,-83,32,9,23,-13,39,119,23,-127,-24,8,-48,-29,-7,-33,-12,58,-24,-29,-19,12,-55,-90,0,126,26,42,54,22],"keyProjectionWeights":[0,-1,-1,1,1,1,1,1,-64,32,49,23,-25,4,27,-22,0,1,-1,-1,-1,1,1,0,-34,38,64,88,13,-53,-41,58,-7,-4,79,-41,27,26,14,2,-2,1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,4,-3,126,42,-40,-116,35,20],"name":"residual-attention-v3-50m-qat-int8-epoch-25-zo-278w","outputBias":-0.0005526235327124596,"outputWeights":[11,11,14,-27,9,-22,127,6],"quantization":{"scales":{"globalWeight":0.021090541950849095,"headWeight":0.04935851140909355,"keyWeight":0.1733924937791441,"outputWeight":0.0030087142047955295,"tapInputWeight":0.1096231754049479,"tapOutputWeight":0.017949438644286102,"valueWeight":0.013986751242596301},"scheme":"symmetric-int8-per-tensor","zeroPoint":0},"summaryQueries":[0.0038647791370749474,0.09565000981092453,0.002756686182692647,-0.08183622360229492,-0.15209506452083588,-0.0006105066277086735,0.0010439646430313587,-0.03020688332617283,0.005065929610282183,0.14488759636878967,0.003160916268825531,-0.0855727270245552,-0.3123375475406647,0.00039022407145239413,0.0037786494940519333,0.1451321840286255,-0.002009483054280281,0.0597594790160656,0.0045239729806780815,-0.08765853196382523,-0.13884992897510529,-0.0021647117100656033,0.003985927440226078,0.09727758169174194,0.007170629221946001,0.0786278173327446,0.004103775601834059,-0.1198369711637497,-0.2925199568271637,-0.002055276418104768,0.0030450925696641207,0.14401987195014954],"supportedDenoiseSamples":[4,8,16],"tapFeatureInverseStandardDeviation":[2.283243417739868,0.8810898065567017,0.8210930228233337,3.752316474914551,3.6375720500946045,2.670454978942871,10.249449729919434,0.12639354169368744,100],"tapFeatureMean":[0.010318092070519924,0.01364430133253336,0.13411010801792145,-0.004725644364953041,0.10053129494190216,0.8384788632392883,0.9203217625617981,1.7139031887054443,1],"tapInputBias":[0.4780646860599518,-0.45214661955833435,0.289407879114151,0.34804567694664,-0.1320028454065323,0.17722633481025696,0.011480014771223068,-0.26692497730255127],"tapInputWeights":[0,1,7,0,-1,-7,0,31,-2,-1,14,-126,0,0,-1,2,26,-2,0,66,-73,0,0,0,-12,22,-3,0,-76,-90,0,-1,-7,-3,58,-1,0,2,6,0,0,3,4,-40,0,0,3,-13,0,0,1,-7,-13,0,0,-7,10,0,-2,-7,0,-39,-2,0,-13,-19,0,-2,20,-1,3,-1],"tapOutputBias":[-0.3867710530757904,0.1349504142999649,0.35706064105033875,-0.5938405394554138,-0.031154220923781395,1.4079623222351074,-1.9221038818359375,0.6029739379882812],"tapOutputWeights":[18,-4,47,19,74,-94,-21,-9,73,-59,88,-10,-3,71,-7,24,20,74,24,-31,-12,-10,-15,-45,-126,2,-4,27,-5,24,35,-11,-4,9,-8,26,-10,27,26,-20,17,-50,5,-35,0,-5,12,-71,89,-58,22,-83,-115,7,-16,-89,89,22,1,-20,-22,-25,-26,44],"valueProjectionWeights":[-16,-6,40,-17,84,-76,59,51,-10,-2,-10,-1,-23,74,-70,23,-5,4,4,-7,-77,127,20,-48,-36,4,-17,-12,-4,10,29,-27,-2,11,-47,-50,-54,-3,14,11,-23,-1,109,31,4,-100,-33,-36,-19,0,-8,20,-35,-24,79,2,44,2,5,7,22,-70,-67,-35]}');const Rp=[["tapInputWeight","tapInputWeights",8,9],["tapOutputWeight","tapOutputWeights",8,8],["globalWeight","globalWeights",8,3],["keyWeight","keyProjectionWeights",8,8],["valueWeight","valueProjectionWeights",8,8],["headWeight","headWeights",8,32],["outputWeight","outputWeights",1,8]],Pf=u=>{const r=ft(it).quantization?.scales?.[u];if(!(r>0)||!Number.isFinite(r))throw new Error(`The bundled N8AO neural model has no valid ${u} scale.`);return r};if(ft(it).architecture!=="attention-v3-int8"||ft(it).formatVersion!==3||ft(it).quantization?.scheme!=="symmetric-int8-per-tensor"||ft(it).quantization?.zeroPoint!==0||ft(it).supportedDenoiseSamples?.join(",")!=="4,8,16"||Rp.some(([,u,r,d])=>ft(it)[u]?.length!==r*d||ft(it)[u].some(m=>!Number.isInteger(m)||m<-127||m>127)))throw new Error("The bundled N8AO neural denoise model has an unsupported layout.");const lc=u=>{if(!Number.isFinite(u))throw new Error("The bundled N8AO neural model contains a non-finite value.");if(Object.is(u,-0))return"0.0";const r=Number(u).toString();return/[.eE]/.test(r)?r:`${r}.0`},If=["x","y","z","w"],um=u=>[...If.map(r=>`${u}.lo.${r}`),...If.map(r=>`${u}.hi.${r}`)],C_=(u,r)=>u===0?null:u===1?r:u===-1?`(-${r})`:u<0?`(-${lc(-u)} * ${r})`:`${lc(u)} * ${r}`,U_=(u,r)=>u===0?null:`${lc(u)} * ${r}`,j0=u=>u.filter(Boolean).join(" + ")||"0.0",$f=(u,r,d,m,v,b)=>{const S=m.map((E,T)=>C_(u[r*d+T],E));return`${lc(v)} * (${j0(S)}) + ${lc(b[r])}`},ti=(u,r=" ")=>`vec4(
222
+ ${u.map(d=>`${r} ${d}`).join(`,
223
+ `)}
224
+ ${r})`,np=({functionName:u,scaleName:r,weights:d,bias:m,width:v=8,relu:b=!1})=>{const S=um("inputToken"),E=Pf(r),T=Array.from({length:8},(V,N)=>$f(d,N,v,S,E,m)),C=ti(T.slice(0,4)),R=ti(T.slice(4)),x=V=>b?`max(${V}, vec4(0.0))`:V;return`
225
+ NeuralToken neural${u[0].toUpperCase()}${u.slice(1)}(NeuralToken inputToken) {
226
+ return NeuralToken(
227
+ ${x(C)},
228
+ ${x(R)}
229
+ );
230
+ }
231
+ `},G0=(u,r,d,m,v,b,S,E={})=>Array.from({length:v},(T,C)=>{let R=r[C];for(let x=0;x<b;x++){const V=u[C*b+x]*S;R-=V*m[x]*d[x],Object.hasOwn(E,x)&&(R+=V*m[x]*E[x])}return R}),V0=Pf("tapInputWeight"),A_=G0(ft(it).tapInputWeights,ft(it).tapInputBias,ft(it).tapFeatureMean,ft(it).tapFeatureInverseStandardDeviation,8,9,V0,{8:1}),D_=um("scaledInput"),Qv=Array.from({length:8},(u,r)=>$f(ft(it).tapInputWeights,r,9,D_,V0,A_)),R_=`
232
+ NeuralToken neuralTapInput(NeuralToken raw) {
233
+ NeuralToken scaledInput = NeuralToken(
234
+ raw.lo * ${ti(ft(it).tapFeatureInverseStandardDeviation.slice(0,4)," ")},
235
+ raw.hi * ${ti(ft(it).tapFeatureInverseStandardDeviation.slice(4,8)," ")}
236
+ );
237
+ return NeuralToken(
238
+ max(${ti(Qv.slice(0,4))}, vec4(0.0)),
239
+ max(${ti(Qv.slice(4))}, vec4(0.0))
240
+ );
241
+ }
242
+ `,F0=Pf("globalWeight"),N_=G0(ft(it).globalWeights,ft(it).globalBias,ft(it).globalFeatureMean,ft(it).globalFeatureInverseStandardDeviation,8,3,F0),B_=If.slice(0,3).map(u=>`scaledInput.${u}`),Xv=Array.from({length:8},(u,r)=>$f(ft(it).globalWeights,r,3,B_,F0,N_)),w_=`
243
+ NeuralToken neuralEncodeGlobal(vec4 raw) {
244
+ vec3 scaledInput = raw.xyz * vec3(
245
+ ${ft(it).globalFeatureInverseStandardDeviation.map(lc).join(", ")}
246
+ );
247
+ return NeuralToken(
248
+ max(${ti(Xv.slice(0,4))}, vec4(0.0)),
249
+ max(${ti(Xv.slice(4))}, vec4(0.0))
250
+ );
251
+ }
252
+ `,H_=um("key"),L_=Array.from({length:4},(u,r)=>j0(H_.map((d,m)=>U_(ft(it).summaryQueries[r*8+m],d)))),k_=`
253
+ vec4 neuralQueryScores(NeuralToken key) {
254
+ return ${ti(L_)};
255
+ }
256
+ `,Y0=[];for(let u=0;u<4;u++)Y0.push(...If.map(r=>`runningSummaryLo[${u}].${r}`),...If.map(r=>`runningSummaryHi[${u}].${r}`));const j_=Pf("headWeight"),Iv=Array.from({length:8},(u,r)=>$f(ft(it).headWeights,r,32,Y0,j_,ft(it).headBias)),G_=`
257
+ NeuralToken neuralHead(
258
+ vec4 runningSummaryLo[4],
259
+ vec4 runningSummaryHi[4]
260
+ ) {
261
+ return NeuralToken(
262
+ max(${ti(Iv.slice(0,4))}, vec4(0.0)),
263
+ max(${ti(Iv.slice(4))}, vec4(0.0))
264
+ );
265
+ }
266
+ `,V_=$f(ft(it).outputWeights,0,8,um("head"),Pf("outputWeight"),[ft(it).outputBias]),F_=`
267
+ float neuralOutput(NeuralToken head) {
268
+ return ${V_};
269
+ }
270
+ `;[R_,np({functionName:"tapOutput",scaleName:"tapOutputWeight",weights:ft(it).tapOutputWeights,bias:ft(it).tapOutputBias,relu:!0}),w_,np({functionName:"keyProject",scaleName:"keyWeight",weights:ft(it).keyProjectionWeights,bias:new Array(8).fill(0)}),np({functionName:"valueProject",scaleName:"valueWeight",weights:ft(it).valueProjectionWeights,bias:new Array(8).fill(0)}),k_,G_,F_].join(`
271
+ `);Rp.reduce((u,[,r])=>u+ft(it)[r].length,0);Rp.reduce((u,[,r])=>u+ft(it)[r].filter(d=>d!==0).length,0);var Y_=J.createContext(null),Kv=u=>(u.getAttributes()&2)==2;function q0(u){let r=new WeakMap;return{acquire(d,m){let v=r.get(d);v?(v.count++,v.forcedValue=m):r.set(d,{count:1,original:d[u],forcedValue:m})},release(d){let m=r.get(d);m&&--m.count<=0&&(d[u]===m.forcedValue&&(d[u]=m.original),r.delete(d))}}}var Pv=q0("autoClear"),$v=q0("toneMapping");function q_(u,r){let d=[];for(let m=0;m<u.length;m++){let v=u[m];if(v instanceof em){let b=[v];if(!Kv(v)){let S;for(;(S=u[m+1])instanceof em&&!Kv(S);)b.push(S),m++}d.push(new E_(r,...b))}else v instanceof El&&d.push(v)}return d}var gb=J.memo(function({children:u,camera:r,scene:d,resolutionScale:m,enabled:v=!0,renderPriority:b=1,autoClear:S=!0,depthBuffer:E,enableNormalPass:T,stencilBuffer:C,multisampling:R=8,frameBufferType:x=Ig,ref:V}){let{gl:N,scene:K,camera:ee,size:le}=ei(),U=d||K,B=r||ee,[Z,ne]=J.useState(null);J.useEffect(()=>{Pv.acquire(N,!1);let ce=new py(N,{depthBuffer:E,stencilBuffer:C,multisampling:R,frameBufferType:x});ce.addPass(new L0(U,B));let he=null,se=null;return T&&(he=new T_(U,B),he.enabled=!1,ce.addPass(he),m!==void 0&&(se=new g_({normalBuffer:he.texture,resolutionScale:m}),se.enabled=!1,ce.addPass(se))),ce.setSize(le.width,le.height),ne({composer:ce,normalPass:he,downSamplingPass:se}),()=>{ce.dispose(),Pv.release(N)}},[B,N,E,C,R,x,U,T,m]),J.useEffect(()=>{Z?.composer.setSize(le.width,le.height)},[Z,le]),im((ce,he)=>{if(!v||!Z)return;let{composer:se}=Z,Ee=N.autoClear;N.autoClear=S,C&&!S&&N.clearStencil(),se.render(he),N.autoClear=Ee},v?b:0);let re=J.useRef(null);J.useLayoutEffect(()=>{if(!Z)return;let{composer:ce,normalPass:he,downSamplingPass:se}=Z,Ee=[],Se=re.current.__r3f;if(Se){let Pe=Se.children.map(ve=>ve.object).filter(ve=>ve instanceof em||ve instanceof El);Ee.push(...q_(Pe,B))}for(let Pe of Ee)ce.addPass(Pe);return Ee.length&&(he&&(he.enabled=!0),se&&(se.enabled=!0)),()=>{for(let Pe of Ee)ce.removePass(Pe);he&&(he.enabled=!1),se&&(se.enabled=!1)}},[Z,u,B]),J.useEffect(()=>($v.acquire(N,cp),N.toneMapping=cp,()=>{$v.release(N)}),[N]);let ie=J.useMemo(()=>Z?{composer:Z.composer,normalPass:Z.normalPass,downSamplingPass:Z.downSamplingPass,resolutionScale:m,camera:B,scene:U}:null,[Z,m,B,U]);return J.useImperativeHandle(V,()=>Z?.composer,[Z]),ie?ul.jsx(Y_.Provider,{value:ie,children:ul.jsx("group",{ref:re,children:u})}):null}),Z_=0,Jv=new WeakMap,Wv=new WeakMap,Q_=0;function X_(u){let r=Wv.get(u);return r===void 0&&(r=Q_++,Wv.set(u,r)),r}function bp(u,r){if(typeof u!="object"||!u)return u;if(r.has(u))return"[Circular]";if(ArrayBuffer.isView(u)||u instanceof ArrayBuffer)return X_(u);if(r.add(u),Array.isArray(u))return u.map(m=>bp(m,r));let d={};for(let m of Object.keys(u).sort())d[m]=bp(u[m],r);return d}function I_(u){return JSON.stringify(bp(u,new WeakSet))}function K_(u,r){return function({ref:d,blendFunction:m=r?.blendFunction,opacity:v=r?.opacity,...b}){let S=Jv.get(u);if(!S){let C=`@react-three/postprocessing/${u.name}-${Z_++}`;Up({[C]:u}),Jv.set(u,S=C)}let E=ei(C=>C.camera),T=J.useMemo(()=>[...r?.args??[],...b.args??[{...r,...b}]],[I_(b)]);return ul.jsx(S,{camera:E,"blendMode-blendFunction":m,"blendMode-opacity-value":v,...b,args:T,ref:d})}}var yb=K_(h_,{blendFunction:0});function tm(){return tm=Object.assign?Object.assign.bind():function(u){for(var r=1;r<arguments.length;r++){var d=arguments[r];for(var m in d)({}).hasOwnProperty.call(d,m)&&(u[m]=d[m])}return u},tm.apply(null,arguments)}const Jf=new Fi,Np=new Fi,P_=new Fi,e0=new wn;function $_(u,r,d){const m=Jf.setFromMatrixPosition(u.matrixWorld);m.project(r);const v=d.width/2,b=d.height/2;return[m.x*v+v,-(m.y*b)+b]}function J_(u,r){const d=Jf.setFromMatrixPosition(u.matrixWorld),m=Np.setFromMatrixPosition(r.matrixWorld),v=d.sub(m),b=r.getWorldDirection(P_);return v.angleTo(b)>Math.PI/2}function W_(u,r,d,m){const v=Jf.setFromMatrixPosition(u.matrixWorld),b=v.clone();b.project(r),e0.set(b.x,b.y),d.setFromCamera(e0,r);const S=d.intersectObjects(m,!0);if(S.length){const E=S[0].distance;return v.distanceTo(d.ray.origin)<E}return!0}function eb(u,r){if(r instanceof nm)return r.zoom;if(r instanceof lm){const d=Jf.setFromMatrixPosition(u.matrixWorld),m=Np.setFromMatrixPosition(r.matrixWorld),v=r.fov*Math.PI/180,b=d.distanceTo(m);return 1/(2*Math.tan(v/2)*b)}else return 1}function tb(u,r,d){if(r instanceof lm||r instanceof nm){const m=Jf.setFromMatrixPosition(u.matrixWorld),v=Np.setFromMatrixPosition(r.matrixWorld),b=m.distanceTo(v),S=(d[1]-d[0])/(r.far-r.near),E=d[1]-S*r.far;return Math.round(S*b+E)}}const Sp=u=>Math.abs(u)<1e-10?0:u;function Z0(u,r,d=""){let m="matrix3d(";for(let v=0;v!==16;v++)m+=Sp(r[v]*u.elements[v])+(v!==15?",":")");return d+m}const nb=(u=>r=>Z0(r,u))([1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1]),lb=(u=>(r,d)=>Z0(r,u(d),"translate(-50%,-50%)"))(u=>[1/u,1/u,1/u,1,-1/u,-1/u,-1/u,-1,1/u,1/u,1/u,1,1,1,1,1]);function ab(u){return u&&typeof u=="object"&&"current"in u}const _b=J.forwardRef(({children:u,eps:r=.001,style:d,className:m,prepend:v,center:b,fullscreen:S,portal:E,distanceFactor:T,sprite:C=!1,transform:R=!1,occlude:x,onOcclude:V,castShadow:N,receiveShadow:K,material:ee,geometry:le,zIndexRange:U=[16777271,0],calculatePosition:B=$_,as:Z="div",wrapperClass:ne,pointerEvents:re="auto",...ie},ce)=>{const{gl:he,camera:se,scene:Ee,size:Se,raycaster:Pe,events:ve,viewport:be}=ei(),[ue]=J.useState(()=>document.createElement(Z)),q=J.useRef(null),W=J.useRef(null),me=J.useRef(0),Te=J.useRef([0,0]),De=J.useRef(null),Me=J.useRef(null),ye=E?.current||ve.connected||he.domElement.parentNode,_e=J.useRef(null),fe=J.useRef(!1),jt=J.useMemo(()=>x&&x!=="blending"||Array.isArray(x)&&x.length&&ab(x[0]),[x]);J.useLayoutEffect(()=>{const fn=he.domElement;x&&x==="blending"?(fn.style.zIndex=`${Math.floor(U[0]/2)}`,fn.style.position="absolute",fn.style.pointerEvents="none"):(fn.style.zIndex=null,fn.style.position=null,fn.style.pointerEvents=null)},[x]),J.useLayoutEffect(()=>{if(W.current){const fn=q.current=a1.createRoot(ue);if(Ee.updateMatrixWorld(),R)ue.style.cssText="position:absolute;top:0;left:0;pointer-events:none;overflow:hidden;";else{const at=B(W.current,se,Se);ue.style.cssText=`position:absolute;top:0;left:0;transform:translate3d(${at[0]}px,${at[1]}px,0);transform-origin:0 0;`}return ye&&(v?ye.prepend(ue):ye.appendChild(ue)),()=>{ye&&ye.removeChild(ue),fn.unmount()}}},[ye,R]),J.useLayoutEffect(()=>{ne&&(ue.className=ne)},[ne]);const ln=J.useMemo(()=>R?{position:"absolute",top:0,left:0,width:Se.width,height:Se.height,transformStyle:"preserve-3d",pointerEvents:"none"}:{position:"absolute",transform:b?"translate3d(-50%,-50%,0)":"none",...S&&{top:-Se.height/2,left:-Se.width/2,width:Se.width,height:Se.height},...d},[d,b,S,Se,R]),li=J.useMemo(()=>({position:"absolute",pointerEvents:re}),[re]);J.useLayoutEffect(()=>{if(fe.current=!1,R){var fn;(fn=q.current)==null||fn.render(J.createElement("div",{ref:De,style:ln},J.createElement("div",{ref:Me,style:li},J.createElement("div",{ref:ce,className:m,style:d,children:u}))))}else{var at;(at=q.current)==null||at.render(J.createElement("div",{ref:ce,style:ln,className:m,children:u}))}});const In=J.useRef(!0);im(fn=>{if(W.current){se.updateMatrixWorld(),W.current.updateWorldMatrix(!0,!1);const at=R?Te.current:B(W.current,se,Se);if(R||Math.abs(me.current-se.zoom)>r||Math.abs(Te.current[0]-at[0])>r||Math.abs(Te.current[1]-at[1])>r){const Mn=J_(W.current,se);let dn=!1;jt&&(Array.isArray(x)?dn=x.map(Sn=>Sn.current):x!=="blending"&&(dn=[Ee]));const Ln=In.current;if(dn){const Sn=W_(W.current,se,Pe,dn);In.current=Sn&&!Mn}else In.current=!Mn;Ln!==In.current&&(V?V(!In.current):ue.style.display=In.current?"block":"none");const Tl=Math.floor(U[0]/2),zl=x?jt?[U[0],Tl]:[Tl-1,0]:U;if(ue.style.zIndex=`${tb(W.current,se,zl)}`,R){const[Sn,qi]=[Se.width/2,Se.height/2],Ca=se.projectionMatrix.elements[5]*qi,{isOrthographicCamera:Ql,top:ai,left:Ua,bottom:an,right:hn}=se,Ur=nb(se.matrixWorldInverse),Us=Ql?`scale(${Ca})translate(${Sp(-(hn+Ua)/2)}px,${Sp((ai+an)/2)}px)`:`translateZ(${Ca}px)`;let Kn=W.current.matrixWorld;C&&(Kn=se.matrixWorldInverse.clone().transpose().copyPosition(Kn).scale(W.current.scale),Kn.elements[3]=Kn.elements[7]=Kn.elements[11]=0,Kn.elements[15]=1),ue.style.width=Se.width+"px",ue.style.height=Se.height+"px",ue.style.perspective=Ql?"":`${Ca}px`,De.current&&Me.current&&(De.current.style.transform=`${Us}${Ur}translate(${Sn}px,${qi}px)`,Me.current.style.transform=lb(Kn,1/((T||10)/400)))}else{const Sn=T===void 0?1:eb(W.current,se)*T;ue.style.transform=`translate3d(${at[0]}px,${at[1]}px,0) scale(${Sn})`}Te.current=at,me.current=se.zoom}}if(!jt&&_e.current&&!fe.current)if(R){if(De.current){const at=De.current.children[0];if(at!=null&&at.clientWidth&&at!=null&&at.clientHeight){const{isOrthographicCamera:Mn}=se;if(Mn||le)ie.scale&&(Array.isArray(ie.scale)?ie.scale instanceof Fi?_e.current.scale.copy(ie.scale.clone().divideScalar(1)):_e.current.scale.set(1/ie.scale[0],1/ie.scale[1],1/ie.scale[2]):_e.current.scale.setScalar(1/ie.scale));else{const dn=(T||10)/400,Ln=at.clientWidth*dn,Tl=at.clientHeight*dn;_e.current.scale.set(Ln,Tl,1)}fe.current=!0}}}else{const at=ue.children[0];if(at!=null&&at.clientWidth&&at!=null&&at.clientHeight){const Mn=1/be.factor,dn=at.clientWidth*Mn,Ln=at.clientHeight*Mn;_e.current.scale.set(dn,Ln,1),fe.current=!0}_e.current.lookAt(fn.camera.position)}});const bn=J.useMemo(()=>({vertexShader:R?void 0:`
272
+ /*
273
+ This shader is from the THREE's SpriteMaterial.
274
+ We need to turn the backing plane into a Sprite
275
+ (make it always face the camera) if "transfrom"
276
+ is false.
277
+ */
278
+ #include <common>
279
+
280
+ void main() {
281
+ vec2 center = vec2(0., 1.);
282
+ float rotation = 0.0;
283
+
284
+ // This is somewhat arbitrary, but it seems to work well
285
+ // Need to figure out how to derive this dynamically if it even matters
286
+ float size = 0.03;
287
+
288
+ vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );
289
+ vec2 scale;
290
+ scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );
291
+ scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );
292
+
293
+ bool isPerspective = isPerspectiveMatrix( projectionMatrix );
294
+ if ( isPerspective ) scale *= - mvPosition.z;
295
+
296
+ vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale * size;
297
+ vec2 rotatedPosition;
298
+ rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;
299
+ rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;
300
+ mvPosition.xy += rotatedPosition;
301
+
302
+ gl_Position = projectionMatrix * mvPosition;
303
+ }
304
+ `,fragmentShader:`
305
+ void main() {
306
+ gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
307
+ }
308
+ `}),[R]);return J.createElement("group",tm({},ie,{ref:W}),x&&!jt&&J.createElement("mesh",{castShadow:N,receiveShadow:K,ref:_e},le||J.createElement("planeGeometry",null),ee||J.createElement("shaderMaterial",{side:Ff,vertexShader:bn.vertexShader,fragmentShader:bn.fragmentShader})))}),ib=()=>parseInt(Op.replace(/\D+/g,"")),sb=ib();/*!
309
+ * camera-controls
310
+ * https://github.com/yomotsu/camera-controls
311
+ * (c) 2017 @yomotsu
312
+ * Released under the MIT License.
313
+ */const Pt={LEFT:1,RIGHT:2,MIDDLE:4},j=Object.freeze({NONE:0,ROTATE:1,TRUCK:2,SCREEN_PAN:4,OFFSET:8,DOLLY:16,ZOOM:32,TOUCH_ROTATE:64,TOUCH_TRUCK:128,TOUCH_SCREEN_PAN:256,TOUCH_OFFSET:512,TOUCH_DOLLY:1024,TOUCH_ZOOM:2048,TOUCH_DOLLY_TRUCK:4096,TOUCH_DOLLY_SCREEN_PAN:8192,TOUCH_DOLLY_OFFSET:16384,TOUCH_DOLLY_ROTATE:32768,TOUCH_ZOOM_TRUCK:65536,TOUCH_ZOOM_OFFSET:131072,TOUCH_ZOOM_SCREEN_PAN:262144,TOUCH_ZOOM_ROTATE:524288}),Jo={NONE:0,IN:1,OUT:-1};function zr(u){return u.isPerspectiveCamera}function Du(u){return u.isOrthographicCamera}const Au=Math.PI*2,t0=Math.PI/2,Q0=1e-5,kf=Math.PI/180;function Wa(u,r,d){return Math.max(r,Math.min(d,u))}function Ut(u,r=Q0){return Math.abs(u)<r}function gt(u,r,d=Q0){return Ut(u-r,d)}function n0(u,r){return Math.round(u/r)*r}function jf(u){return isFinite(u)?u:u<0?-Number.MAX_VALUE:Number.MAX_VALUE}function Gf(u){return Math.abs(u)<Number.MAX_VALUE?u:u*(1/0)}function Yh(u,r,d,m,v=1/0,b){m=Math.max(1e-4,m);const S=2/m,E=S*b,T=1/(1+E+.48*E*E+.235*E*E*E);let C=u-r;const R=r,x=v*m;C=Wa(C,-x,x),r=u-C;const V=(d.value+S*C)*b;d.value=(d.value-S*V)*T;let N=r+(C+V)*T;return R-u>0==N>R&&(N=R,d.value=(N-R)/b),N}function l0(u,r,d,m,v=1/0,b,S){m=Math.max(1e-4,m);const E=2/m,T=E*b,C=1/(1+T+.48*T*T+.235*T*T*T);let R=r.x,x=r.y,V=r.z,N=u.x-R,K=u.y-x,ee=u.z-V;const le=R,U=x,B=V,Z=v*m,ne=Z*Z,re=N*N+K*K+ee*ee;if(re>ne){const ue=Math.sqrt(re);N=N/ue*Z,K=K/ue*Z,ee=ee/ue*Z}R=u.x-N,x=u.y-K,V=u.z-ee;const ie=(d.x+E*N)*b,ce=(d.y+E*K)*b,he=(d.z+E*ee)*b;d.x=(d.x-E*ie)*C,d.y=(d.y-E*ce)*C,d.z=(d.z-E*he)*C,S.x=R+(N+ie)*C,S.y=x+(K+ce)*C,S.z=V+(ee+he)*C;const se=le-u.x,Ee=U-u.y,Se=B-u.z,Pe=S.x-le,ve=S.y-U,be=S.z-B;return se*Pe+Ee*ve+Se*be>0&&(S.x=le,S.y=U,S.z=B,d.x=(S.x-le)/b,d.y=(S.y-U)/b,d.z=(S.z-B)/b),S}function lp(u,r){r.set(0,0),u.forEach(d=>{r.x+=d.clientX,r.y+=d.clientY}),r.x/=u.length,r.y/=u.length}function ap(u,r){return Du(u)?(console.warn(`${r} is not supported in OrthographicCamera`),!0):!1}class ub{_listeners={};addEventListener(r,d){const m=this._listeners;m[r]===void 0&&(m[r]=[]),m[r].indexOf(d)===-1&&m[r].push(d)}hasEventListener(r,d){const m=this._listeners;return m[r]!==void 0&&m[r].indexOf(d)!==-1}removeEventListener(r,d){const v=this._listeners[r];if(v!==void 0){const b=v.indexOf(d);b!==-1&&v.splice(b,1)}}removeAllEventListeners(r){if(!r){this._listeners={};return}Array.isArray(this._listeners[r])&&(this._listeners[r].length=0)}dispatchEvent(r){const m=this._listeners[r.type];if(m!==void 0){r.target=this;const v=m.slice(0);for(let b=0,S=v.length;b<S;b++)v[b].call(this,r)}}}const rb="3.1.2",qh=1/8,ob=/Mac/.test(globalThis?.navigator?.platform);let Ne,a0,Zh,ip,ql,Fe,rt,Wo,Vf,Gi,Vi,Or,i0,s0,Wl,ec,tc,u0,sp,r0,up,rp,Qh,cb=class Ep extends ub{static install(r){Ne=r.THREE,a0=Object.freeze(new Ne.Vector3(0,0,0)),Zh=Object.freeze(new Ne.Vector3(0,1,0)),ip=Object.freeze(new Ne.Vector3(0,0,1)),ql=new Ne.Vector2,Fe=new Ne.Vector3,rt=new Ne.Vector3,Wo=new Ne.Vector3,Vf=new Ne.Vector3,Gi=new Ne.Vector3,Vi=new Ne.Vector3,Or=new Ne.Vector3,i0=new Ne.Vector3,s0=new Ne.Vector3,Wl=new Ne.Spherical,ec=new Ne.Spherical,tc=new Ne.Box3,u0=new Ne.Box3,sp=new Ne.Sphere,r0=new Ne.Quaternion,up=new Ne.Quaternion,rp=new Ne.Matrix4,Qh=new Ne.Raycaster}static get ACTION(){return j}minPolarAngle=0;maxPolarAngle=Math.PI;minAzimuthAngle=-1/0;maxAzimuthAngle=1/0;minDistance=Number.EPSILON;maxDistance=1/0;infinityDolly=!1;minZoom=.01;maxZoom=1/0;smoothTime=.25;draggingSmoothTime=.125;maxSpeed=1/0;azimuthRotateSpeed=1;polarRotateSpeed=1;dollySpeed=1;dollyDragInverted=!1;truckSpeed=2;dollyToCursor=!1;dragToOffset=!1;boundaryFriction=0;restThreshold=.01;colliderMeshes=[];mouseButtons;touches;cancel=()=>{};lockPointer;unlockPointer;_enabled=!0;_camera;_yAxisUpSpace;_yAxisUpSpaceInverse;_state=j.NONE;_domElement;_viewport=null;_target;_targetEnd;_focalOffset;_focalOffsetEnd;_spherical;_sphericalEnd;_lastDistance;_zoom;_zoomEnd;_lastZoom;_cameraUp0;_target0;_position0;_zoom0;_focalOffset0;_dollyControlCoord;_changedDolly=0;_changedZoom=0;_nearPlaneCorners;_hasRested=!0;_boundary;_boundaryEnclosesCamera=!1;_needsUpdate=!0;_updatedLastTime=!1;_elementRect=new DOMRect;_isDragging=!1;_dragNeedsUpdate=!0;_activePointers=[];_lockedPointer=null;_interactiveArea=new DOMRect(0,0,1,1);_isUserControllingRotate=!1;_isUserControllingDolly=!1;_isUserControllingTruck=!1;_isUserControllingOffset=!1;_isUserControllingZoom=!1;_lastDollyDirection=Jo.NONE;_thetaVelocity={value:0};_phiVelocity={value:0};_radiusVelocity={value:0};_targetVelocity=new Ne.Vector3;_focalOffsetVelocity=new Ne.Vector3;_zoomVelocity={value:0};set verticalDragToForward(r){console.warn("camera-controls: `verticalDragToForward` was removed. Use `mouseButtons.left = CameraControls.ACTION.SCREEN_PAN` instead.")}constructor(r,d){super(),typeof Ne>"u"&&console.error("camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."),this._camera=r,this._yAxisUpSpace=new Ne.Quaternion().setFromUnitVectors(this._camera.up,Zh),this._yAxisUpSpaceInverse=this._yAxisUpSpace.clone().invert(),this._state=j.NONE,this._target=new Ne.Vector3,this._targetEnd=this._target.clone(),this._focalOffset=new Ne.Vector3,this._focalOffsetEnd=this._focalOffset.clone(),this._spherical=new Ne.Spherical().setFromVector3(Fe.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace)),this._sphericalEnd=this._spherical.clone(),this._lastDistance=this._spherical.radius,this._zoom=this._camera.zoom,this._zoomEnd=this._zoom,this._lastZoom=this._zoom,this._nearPlaneCorners=[new Ne.Vector3,new Ne.Vector3,new Ne.Vector3,new Ne.Vector3],this._updateNearPlaneCorners(),this._boundary=new Ne.Box3(new Ne.Vector3(-1/0,-1/0,-1/0),new Ne.Vector3(1/0,1/0,1/0)),this._cameraUp0=this._camera.up.clone(),this._target0=this._target.clone(),this._position0=this._camera.position.clone(),this._zoom0=this._zoom,this._focalOffset0=this._focalOffset.clone(),this._dollyControlCoord=new Ne.Vector2,this.mouseButtons={left:j.ROTATE,middle:j.DOLLY,right:j.TRUCK,wheel:zr(this._camera)?j.DOLLY:Du(this._camera)?j.ZOOM:j.NONE},this.touches={one:j.TOUCH_ROTATE,two:zr(this._camera)?j.TOUCH_DOLLY_TRUCK:Du(this._camera)?j.TOUCH_ZOOM_TRUCK:j.NONE,three:j.TOUCH_TRUCK};const m=new Ne.Vector2,v=new Ne.Vector2,b=new Ne.Vector2,S=U=>{if(!this._enabled||!this._domElement)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const ne=this._domElement.getBoundingClientRect(),re=U.clientX/ne.width,ie=U.clientY/ne.height;if(re<this._interactiveArea.left||re>this._interactiveArea.right||ie<this._interactiveArea.top||ie>this._interactiveArea.bottom)return}const B=U.pointerType!=="mouse"?null:(U.buttons&Pt.LEFT)===Pt.LEFT?Pt.LEFT:(U.buttons&Pt.MIDDLE)===Pt.MIDDLE?Pt.MIDDLE:(U.buttons&Pt.RIGHT)===Pt.RIGHT?Pt.RIGHT:null;if(B!==null){const ne=this._findPointerByMouseButton(B);ne&&this._disposePointer(ne)}if((U.buttons&Pt.LEFT)===Pt.LEFT&&this._lockedPointer)return;const Z={pointerId:U.pointerId,clientX:U.clientX,clientY:U.clientY,deltaX:0,deltaY:0,mouseButton:B};this._activePointers.push(Z),this._domElement.ownerDocument.removeEventListener("pointermove",E,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",T),this._domElement.ownerDocument.addEventListener("pointermove",E,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",T),this._isDragging=!0,V(U)},E=U=>{U.cancelable&&U.preventDefault();const B=U.pointerId,Z=this._lockedPointer||this._findPointerById(B);if(Z){if(Z.clientX=U.clientX,Z.clientY=U.clientY,Z.deltaX=U.movementX,Z.deltaY=U.movementY,this._state=0,U.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else(!this._isDragging&&this._lockedPointer||this._isDragging&&(U.buttons&Pt.LEFT)===Pt.LEFT)&&(this._state=this._state|this.mouseButtons.left),this._isDragging&&(U.buttons&Pt.MIDDLE)===Pt.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),this._isDragging&&(U.buttons&Pt.RIGHT)===Pt.RIGHT&&(this._state=this._state|this.mouseButtons.right);N()}},T=U=>{const B=this._findPointerById(U.pointerId);if(!(B&&B===this._lockedPointer)){if(B&&this._disposePointer(B),U.pointerType==="touch")switch(this._activePointers.length){case 0:this._state=j.NONE;break;case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else this._state=j.NONE;K()}};let C=-1;const R=U=>{if(!this._domElement||!this._enabled||this.mouseButtons.wheel===j.NONE)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const ce=this._domElement.getBoundingClientRect(),he=U.clientX/ce.width,se=U.clientY/ce.height;if(he<this._interactiveArea.left||he>this._interactiveArea.right||se<this._interactiveArea.top||se>this._interactiveArea.bottom)return}if(U.preventDefault(),this.dollyToCursor||this.mouseButtons.wheel===j.ROTATE||this.mouseButtons.wheel===j.TRUCK){const ce=performance.now();C-ce<1e3&&this._getClientRect(this._elementRect),C=ce}const B=ob?-1:-3,Z=U.deltaMode===1&&!U.ctrlKey?U.deltaY/B:U.deltaY/(B*10),ne=this.dollyToCursor?(U.clientX-this._elementRect.x)/this._elementRect.width*2-1:0,re=this.dollyToCursor?(U.clientY-this._elementRect.y)/this._elementRect.height*-2+1:0;switch(U.ctrlKey?j.ZOOM:this.mouseButtons.wheel){case j.ROTATE:{this._rotateInternal(U.deltaX,U.deltaY),this._isUserControllingRotate=!0;break}case j.TRUCK:{this._truckInternal(U.deltaX,U.deltaY,!1,!1),this._isUserControllingTruck=!0;break}case j.SCREEN_PAN:{this._truckInternal(U.deltaX,U.deltaY,!1,!0),this._isUserControllingTruck=!0;break}case j.OFFSET:{this._truckInternal(U.deltaX,U.deltaY,!0,!1),this._isUserControllingOffset=!0;break}case j.DOLLY:{this._dollyInternal(-Z,ne,re),this._isUserControllingDolly=!0;break}case j.ZOOM:{this._zoomInternal(-Z,ne,re),this._isUserControllingZoom=!0;break}}this.dispatchEvent({type:"control"})},x=U=>{if(!(!this._domElement||!this._enabled)){if(this.mouseButtons.right===Ep.ACTION.NONE){const B=U instanceof PointerEvent?U.pointerId:0,Z=this._findPointerById(B);Z&&this._disposePointer(Z),this._domElement.ownerDocument.removeEventListener("pointermove",E,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",T);return}U.preventDefault()}},V=U=>{if(!this._enabled)return;if(lp(this._activePointers,ql),this._getClientRect(this._elementRect),m.copy(ql),v.copy(ql),this._activePointers.length>=2){const Z=ql.x-this._activePointers[1].clientX,ne=ql.y-this._activePointers[1].clientY,re=Math.sqrt(Z*Z+ne*ne);b.set(0,re);const ie=(this._activePointers[0].clientX+this._activePointers[1].clientX)*.5,ce=(this._activePointers[0].clientY+this._activePointers[1].clientY)*.5;v.set(ie,ce)}if(this._state=0,!U)this._lockedPointer&&(this._state=this._state|this.mouseButtons.left);else if("pointerType"in U&&U.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else!this._lockedPointer&&(U.buttons&Pt.LEFT)===Pt.LEFT&&(this._state=this._state|this.mouseButtons.left),(U.buttons&Pt.MIDDLE)===Pt.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(U.buttons&Pt.RIGHT)===Pt.RIGHT&&(this._state=this._state|this.mouseButtons.right);((this._state&j.ROTATE)===j.ROTATE||(this._state&j.TOUCH_ROTATE)===j.TOUCH_ROTATE||(this._state&j.TOUCH_DOLLY_ROTATE)===j.TOUCH_DOLLY_ROTATE||(this._state&j.TOUCH_ZOOM_ROTATE)===j.TOUCH_ZOOM_ROTATE)&&(this._sphericalEnd.theta=this._spherical.theta,this._sphericalEnd.phi=this._spherical.phi,this._thetaVelocity.value=0,this._phiVelocity.value=0),((this._state&j.TRUCK)===j.TRUCK||(this._state&j.SCREEN_PAN)===j.SCREEN_PAN||(this._state&j.TOUCH_TRUCK)===j.TOUCH_TRUCK||(this._state&j.TOUCH_SCREEN_PAN)===j.TOUCH_SCREEN_PAN||(this._state&j.TOUCH_DOLLY_TRUCK)===j.TOUCH_DOLLY_TRUCK||(this._state&j.TOUCH_DOLLY_SCREEN_PAN)===j.TOUCH_DOLLY_SCREEN_PAN||(this._state&j.TOUCH_ZOOM_TRUCK)===j.TOUCH_ZOOM_TRUCK||(this._state&j.TOUCH_ZOOM_SCREEN_PAN)===j.TOUCH_DOLLY_SCREEN_PAN)&&(this._targetEnd.copy(this._target),this._targetVelocity.set(0,0,0)),((this._state&j.DOLLY)===j.DOLLY||(this._state&j.TOUCH_DOLLY)===j.TOUCH_DOLLY||(this._state&j.TOUCH_DOLLY_TRUCK)===j.TOUCH_DOLLY_TRUCK||(this._state&j.TOUCH_DOLLY_SCREEN_PAN)===j.TOUCH_DOLLY_SCREEN_PAN||(this._state&j.TOUCH_DOLLY_OFFSET)===j.TOUCH_DOLLY_OFFSET||(this._state&j.TOUCH_DOLLY_ROTATE)===j.TOUCH_DOLLY_ROTATE)&&(this._sphericalEnd.radius=this._spherical.radius,this._radiusVelocity.value=0),((this._state&j.ZOOM)===j.ZOOM||(this._state&j.TOUCH_ZOOM)===j.TOUCH_ZOOM||(this._state&j.TOUCH_ZOOM_TRUCK)===j.TOUCH_ZOOM_TRUCK||(this._state&j.TOUCH_ZOOM_SCREEN_PAN)===j.TOUCH_ZOOM_SCREEN_PAN||(this._state&j.TOUCH_ZOOM_OFFSET)===j.TOUCH_ZOOM_OFFSET||(this._state&j.TOUCH_ZOOM_ROTATE)===j.TOUCH_ZOOM_ROTATE)&&(this._zoomEnd=this._zoom,this._zoomVelocity.value=0),((this._state&j.OFFSET)===j.OFFSET||(this._state&j.TOUCH_OFFSET)===j.TOUCH_OFFSET||(this._state&j.TOUCH_DOLLY_OFFSET)===j.TOUCH_DOLLY_OFFSET||(this._state&j.TOUCH_ZOOM_OFFSET)===j.TOUCH_ZOOM_OFFSET)&&(this._focalOffsetEnd.copy(this._focalOffset),this._focalOffsetVelocity.set(0,0,0)),this.dispatchEvent({type:"controlstart"})},N=()=>{if(!this._enabled||!this._dragNeedsUpdate)return;this._dragNeedsUpdate=!1,lp(this._activePointers,ql);const B=this._domElement&&this._domElement.ownerDocument.pointerLockElement===this._domElement?this._lockedPointer||this._activePointers[0]:null,Z=B?-B.deltaX:v.x-ql.x,ne=B?-B.deltaY:v.y-ql.y;if(v.copy(ql),((this._state&j.ROTATE)===j.ROTATE||(this._state&j.TOUCH_ROTATE)===j.TOUCH_ROTATE||(this._state&j.TOUCH_DOLLY_ROTATE)===j.TOUCH_DOLLY_ROTATE||(this._state&j.TOUCH_ZOOM_ROTATE)===j.TOUCH_ZOOM_ROTATE)&&(this._rotateInternal(Z,ne),this._isUserControllingRotate=!0),(this._state&j.DOLLY)===j.DOLLY||(this._state&j.ZOOM)===j.ZOOM){const re=this.dollyToCursor?(m.x-this._elementRect.x)/this._elementRect.width*2-1:0,ie=this.dollyToCursor?(m.y-this._elementRect.y)/this._elementRect.height*-2+1:0,ce=this.dollyDragInverted?-1:1;(this._state&j.DOLLY)===j.DOLLY?(this._dollyInternal(ce*ne*qh,re,ie),this._isUserControllingDolly=!0):(this._zoomInternal(ce*ne*qh,re,ie),this._isUserControllingZoom=!0)}if((this._state&j.TOUCH_DOLLY)===j.TOUCH_DOLLY||(this._state&j.TOUCH_ZOOM)===j.TOUCH_ZOOM||(this._state&j.TOUCH_DOLLY_TRUCK)===j.TOUCH_DOLLY_TRUCK||(this._state&j.TOUCH_ZOOM_TRUCK)===j.TOUCH_ZOOM_TRUCK||(this._state&j.TOUCH_DOLLY_SCREEN_PAN)===j.TOUCH_DOLLY_SCREEN_PAN||(this._state&j.TOUCH_ZOOM_SCREEN_PAN)===j.TOUCH_ZOOM_SCREEN_PAN||(this._state&j.TOUCH_DOLLY_OFFSET)===j.TOUCH_DOLLY_OFFSET||(this._state&j.TOUCH_ZOOM_OFFSET)===j.TOUCH_ZOOM_OFFSET||(this._state&j.TOUCH_DOLLY_ROTATE)===j.TOUCH_DOLLY_ROTATE||(this._state&j.TOUCH_ZOOM_ROTATE)===j.TOUCH_ZOOM_ROTATE){const re=ql.x-this._activePointers[1].clientX,ie=ql.y-this._activePointers[1].clientY,ce=Math.sqrt(re*re+ie*ie),he=b.y-ce;b.set(0,ce);const se=this.dollyToCursor?(v.x-this._elementRect.x)/this._elementRect.width*2-1:0,Ee=this.dollyToCursor?(v.y-this._elementRect.y)/this._elementRect.height*-2+1:0;(this._state&j.TOUCH_DOLLY)===j.TOUCH_DOLLY||(this._state&j.TOUCH_DOLLY_ROTATE)===j.TOUCH_DOLLY_ROTATE||(this._state&j.TOUCH_DOLLY_TRUCK)===j.TOUCH_DOLLY_TRUCK||(this._state&j.TOUCH_DOLLY_SCREEN_PAN)===j.TOUCH_DOLLY_SCREEN_PAN||(this._state&j.TOUCH_DOLLY_OFFSET)===j.TOUCH_DOLLY_OFFSET?(this._dollyInternal(he*qh,se,Ee),this._isUserControllingDolly=!0):(this._zoomInternal(he*qh,se,Ee),this._isUserControllingZoom=!0)}((this._state&j.TRUCK)===j.TRUCK||(this._state&j.TOUCH_TRUCK)===j.TOUCH_TRUCK||(this._state&j.TOUCH_DOLLY_TRUCK)===j.TOUCH_DOLLY_TRUCK||(this._state&j.TOUCH_ZOOM_TRUCK)===j.TOUCH_ZOOM_TRUCK)&&(this._truckInternal(Z,ne,!1,!1),this._isUserControllingTruck=!0),((this._state&j.SCREEN_PAN)===j.SCREEN_PAN||(this._state&j.TOUCH_SCREEN_PAN)===j.TOUCH_SCREEN_PAN||(this._state&j.TOUCH_DOLLY_SCREEN_PAN)===j.TOUCH_DOLLY_SCREEN_PAN||(this._state&j.TOUCH_ZOOM_SCREEN_PAN)===j.TOUCH_ZOOM_SCREEN_PAN)&&(this._truckInternal(Z,ne,!1,!0),this._isUserControllingTruck=!0),((this._state&j.OFFSET)===j.OFFSET||(this._state&j.TOUCH_OFFSET)===j.TOUCH_OFFSET||(this._state&j.TOUCH_DOLLY_OFFSET)===j.TOUCH_DOLLY_OFFSET||(this._state&j.TOUCH_ZOOM_OFFSET)===j.TOUCH_ZOOM_OFFSET)&&(this._truckInternal(Z,ne,!0,!1),this._isUserControllingOffset=!0),this.dispatchEvent({type:"control"})},K=()=>{lp(this._activePointers,ql),v.copy(ql),this._dragNeedsUpdate=!1,(this._activePointers.length===0||this._activePointers.length===1&&this._activePointers[0]===this._lockedPointer)&&(this._isDragging=!1),this._activePointers.length===0&&this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointermove",E,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",T),this.dispatchEvent({type:"controlend"}))};this.lockPointer=()=>{!this._enabled||!this._domElement||(this.cancel(),this._lockedPointer={pointerId:-1,clientX:0,clientY:0,deltaX:0,deltaY:0,mouseButton:null},this._activePointers.push(this._lockedPointer),this._domElement.ownerDocument.removeEventListener("pointermove",E,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",T),this._domElement.requestPointerLock(),this._domElement.ownerDocument.addEventListener("pointerlockchange",ee),this._domElement.ownerDocument.addEventListener("pointerlockerror",le),this._domElement.ownerDocument.addEventListener("pointermove",E,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",T),V())},this.unlockPointer=()=>{this._lockedPointer!==null&&(this._disposePointer(this._lockedPointer),this._lockedPointer=null),this._domElement?.ownerDocument.exitPointerLock(),this._domElement?.ownerDocument.removeEventListener("pointerlockchange",ee),this._domElement?.ownerDocument.removeEventListener("pointerlockerror",le),this.cancel()};const ee=()=>{this._domElement&&this._domElement.ownerDocument.pointerLockElement===this._domElement||this.unlockPointer()},le=()=>{this.unlockPointer()};this._addAllEventListeners=U=>{this._domElement=U,this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none",this._domElement.addEventListener("pointerdown",S),this._domElement.addEventListener("pointercancel",T),this._domElement.addEventListener("wheel",R,{passive:!1}),this._domElement.addEventListener("contextmenu",x)},this._removeAllEventListeners=()=>{this._domElement&&(this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect="",this._domElement.removeEventListener("pointerdown",S),this._domElement.removeEventListener("pointercancel",T),this._domElement.removeEventListener("wheel",R,{passive:!1}),this._domElement.removeEventListener("contextmenu",x),this._domElement.ownerDocument.removeEventListener("pointermove",E,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",T),this._domElement.ownerDocument.removeEventListener("pointerlockchange",ee),this._domElement.ownerDocument.removeEventListener("pointerlockerror",le))},this.cancel=()=>{this._state!==j.NONE&&(this._state=j.NONE,this._activePointers.length=0,K())},d&&this.connect(d),this.update(0)}get camera(){return this._camera}set camera(r){this._camera=r,this.updateCameraUp(),this._camera.updateProjectionMatrix(),this._updateNearPlaneCorners(),this._needsUpdate=!0}get enabled(){return this._enabled}set enabled(r){this._enabled=r,this._domElement&&(r?(this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none"):(this.cancel(),this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect=""))}get active(){return!this._hasRested}get currentAction(){return this._state}get distance(){return this._spherical.radius}set distance(r){this._spherical.radius===r&&this._sphericalEnd.radius===r||(this._spherical.radius=r,this._sphericalEnd.radius=r,this._needsUpdate=!0)}get azimuthAngle(){return this._spherical.theta}set azimuthAngle(r){this._spherical.theta===r&&this._sphericalEnd.theta===r||(this._spherical.theta=r,this._sphericalEnd.theta=r,this._needsUpdate=!0)}get polarAngle(){return this._spherical.phi}set polarAngle(r){this._spherical.phi===r&&this._sphericalEnd.phi===r||(this._spherical.phi=r,this._sphericalEnd.phi=r,this._needsUpdate=!0)}get boundaryEnclosesCamera(){return this._boundaryEnclosesCamera}set boundaryEnclosesCamera(r){this._boundaryEnclosesCamera=r,this._needsUpdate=!0}set interactiveArea(r){this._interactiveArea.width=Wa(r.width,0,1),this._interactiveArea.height=Wa(r.height,0,1),this._interactiveArea.x=Wa(r.x,0,1-this._interactiveArea.width),this._interactiveArea.y=Wa(r.y,0,1-this._interactiveArea.height)}addEventListener(r,d){super.addEventListener(r,d)}removeEventListener(r,d){super.removeEventListener(r,d)}rotate(r,d,m=!1){return this.rotateTo(this._sphericalEnd.theta+r,this._sphericalEnd.phi+d,m)}rotateAzimuthTo(r,d=!1){return this.rotateTo(r,this._sphericalEnd.phi,d)}rotatePolarTo(r,d=!1){return this.rotateTo(this._sphericalEnd.theta,r,d)}rotateTo(r,d,m=!1){this._isUserControllingRotate=!1;const v=Wa(r,this.minAzimuthAngle,this.maxAzimuthAngle),b=Wa(d,this.minPolarAngle,this.maxPolarAngle);this._sphericalEnd.theta=v,this._sphericalEnd.phi=b,this._sphericalEnd.makeSafe(),this._needsUpdate=!0,m||(this._spherical.theta=this._sphericalEnd.theta,this._spherical.phi=this._sphericalEnd.phi);const S=!m||gt(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&gt(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold);return this._createOnRestPromise(S)}dolly(r,d=!1){return this.dollyTo(this._sphericalEnd.radius-r,d)}dollyTo(r,d=!1){return this._isUserControllingDolly=!1,this._lastDollyDirection=Jo.NONE,this._changedDolly=0,this._dollyToNoClamp(Wa(r,this.minDistance,this.maxDistance),d)}_dollyToNoClamp(r,d=!1){const m=this._sphericalEnd.radius;if(this.colliderMeshes.length>=1){const S=this._collisionTest(),E=gt(S,this._spherical.radius);if(!(m>r)&&E)return Promise.resolve();this._sphericalEnd.radius=Math.min(r,S)}else this._sphericalEnd.radius=r;this._needsUpdate=!0,d||(this._spherical.radius=this._sphericalEnd.radius);const b=!d||gt(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(b)}dollyInFixed(r,d=!1){this._targetEnd.add(this._getCameraDirection(Vf).multiplyScalar(r)),d||this._target.copy(this._targetEnd);const m=!d||gt(this._target.x,this._targetEnd.x,this.restThreshold)&&gt(this._target.y,this._targetEnd.y,this.restThreshold)&&gt(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(m)}zoom(r,d=!1){return this.zoomTo(this._zoomEnd+r,d)}zoomTo(r,d=!1){this._isUserControllingZoom=!1,this._zoomEnd=Wa(r,this.minZoom,this.maxZoom),this._needsUpdate=!0,d||(this._zoom=this._zoomEnd);const m=!d||gt(this._zoom,this._zoomEnd,this.restThreshold);return this._changedZoom=0,this._createOnRestPromise(m)}pan(r,d,m=!1){return console.warn("`pan` has been renamed to `truck`"),this.truck(r,d,m)}truck(r,d,m=!1){this._camera.updateMatrix(),Gi.setFromMatrixColumn(this._camera.matrix,0),Vi.setFromMatrixColumn(this._camera.matrix,1),Gi.multiplyScalar(r),Vi.multiplyScalar(-d);const v=Fe.copy(Gi).add(Vi),b=rt.copy(this._targetEnd).add(v);return this.moveTo(b.x,b.y,b.z,m)}forward(r,d=!1){Fe.setFromMatrixColumn(this._camera.matrix,0),Fe.crossVectors(this._camera.up,Fe),Fe.multiplyScalar(r);const m=rt.copy(this._targetEnd).add(Fe);return this.moveTo(m.x,m.y,m.z,d)}elevate(r,d=!1){return Fe.copy(this._camera.up).multiplyScalar(r),this.moveTo(this._targetEnd.x+Fe.x,this._targetEnd.y+Fe.y,this._targetEnd.z+Fe.z,d)}moveTo(r,d,m,v=!1){this._isUserControllingTruck=!1;const b=Fe.set(r,d,m).sub(this._targetEnd);this._encloseToBoundary(this._targetEnd,b,this.boundaryFriction),this._needsUpdate=!0,v||this._target.copy(this._targetEnd);const S=!v||gt(this._target.x,this._targetEnd.x,this.restThreshold)&&gt(this._target.y,this._targetEnd.y,this.restThreshold)&&gt(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(S)}lookInDirectionOf(r,d,m,v=!1){const E=Fe.set(r,d,m).sub(this._targetEnd).normalize().multiplyScalar(-this._sphericalEnd.radius).add(this._targetEnd);return this.setPosition(E.x,E.y,E.z,v)}fitToBox(r,d,{cover:m=!1,paddingLeft:v=0,paddingRight:b=0,paddingBottom:S=0,paddingTop:E=0}={}){const T=[],C=r.isBox3?tc.copy(r):tc.setFromObject(r);C.isEmpty()&&(console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"),Promise.resolve());const R=n0(this._sphericalEnd.theta,t0),x=n0(this._sphericalEnd.phi,t0);T.push(this.rotateTo(R,x,d));const V=Fe.setFromSpherical(this._sphericalEnd).normalize(),N=r0.setFromUnitVectors(V,ip),K=gt(Math.abs(V.y),1);K&&N.multiply(up.setFromAxisAngle(Zh,R)),N.multiply(this._yAxisUpSpaceInverse);const ee=u0.makeEmpty();rt.copy(C.min).applyQuaternion(N),ee.expandByPoint(rt),rt.copy(C.min).setX(C.max.x).applyQuaternion(N),ee.expandByPoint(rt),rt.copy(C.min).setY(C.max.y).applyQuaternion(N),ee.expandByPoint(rt),rt.copy(C.max).setZ(C.min.z).applyQuaternion(N),ee.expandByPoint(rt),rt.copy(C.min).setZ(C.max.z).applyQuaternion(N),ee.expandByPoint(rt),rt.copy(C.max).setY(C.min.y).applyQuaternion(N),ee.expandByPoint(rt),rt.copy(C.max).setX(C.min.x).applyQuaternion(N),ee.expandByPoint(rt),rt.copy(C.max).applyQuaternion(N),ee.expandByPoint(rt),ee.min.x-=v,ee.min.y-=S,ee.max.x+=b,ee.max.y+=E,N.setFromUnitVectors(ip,V),K&&N.premultiply(up.invert()),N.premultiply(this._yAxisUpSpace);const le=ee.getSize(Fe),U=ee.getCenter(rt).applyQuaternion(N);if(zr(this._camera)){const B=this.getDistanceToFitBox(le.x,le.y,le.z,m);T.push(this.moveTo(U.x,U.y,U.z,d)),T.push(this.dollyTo(B,d)),T.push(this.setFocalOffset(0,0,0,d))}else if(Du(this._camera)){const B=this._camera,Z=B.right-B.left,ne=B.top-B.bottom,re=m?Math.max(Z/le.x,ne/le.y):Math.min(Z/le.x,ne/le.y);T.push(this.moveTo(U.x,U.y,U.z,d)),T.push(this.zoomTo(re,d)),T.push(this.setFocalOffset(0,0,0,d))}return Promise.all(T)}fitToSphere(r,d){const m=[],b="isObject3D"in r?Ep.createBoundingSphere(r,sp):sp.copy(r);if(m.push(this.moveTo(b.center.x,b.center.y,b.center.z,d)),zr(this._camera)){const S=this.getDistanceToFitSphere(b.radius);m.push(this.dollyTo(S,d))}else if(Du(this._camera)){const S=this._camera.right-this._camera.left,E=this._camera.top-this._camera.bottom,T=2*b.radius,C=Math.min(S/T,E/T);m.push(this.zoomTo(C,d))}return m.push(this.setFocalOffset(0,0,0,d)),Promise.all(m)}setLookAt(r,d,m,v,b,S,E=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=Jo.NONE,this._changedDolly=0;const T=rt.set(v,b,S),C=Fe.set(r,d,m);this._targetEnd.copy(T),this._sphericalEnd.setFromVector3(C.sub(T).applyQuaternion(this._yAxisUpSpace)),this._needsUpdate=!0,E||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const R=!E||gt(this._target.x,this._targetEnd.x,this.restThreshold)&&gt(this._target.y,this._targetEnd.y,this.restThreshold)&&gt(this._target.z,this._targetEnd.z,this.restThreshold)&&gt(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&gt(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&gt(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(R)}lerp(r,d,m,v=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=Jo.NONE,this._changedDolly=0;const b=Fe.set(...r.target);if("spherical"in r)Wl.set(...r.spherical);else{const x=rt.set(...r.position);Wl.setFromVector3(x.sub(b).applyQuaternion(this._yAxisUpSpace))}const S=Wo.set(...d.target);if("spherical"in d)ec.set(...d.spherical);else{const x=rt.set(...d.position);ec.setFromVector3(x.sub(S).applyQuaternion(this._yAxisUpSpace))}this._targetEnd.copy(b.lerp(S,m));const E=ec.theta-Wl.theta,T=ec.phi-Wl.phi,C=ec.radius-Wl.radius;this._sphericalEnd.set(Wl.radius+C*m,Wl.phi+T*m,Wl.theta+E*m),this._needsUpdate=!0,v||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const R=!v||gt(this._target.x,this._targetEnd.x,this.restThreshold)&&gt(this._target.y,this._targetEnd.y,this.restThreshold)&&gt(this._target.z,this._targetEnd.z,this.restThreshold)&&gt(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&gt(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&gt(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(R)}lerpLookAt(r,d,m,v,b,S,E,T,C,R,x,V,N,K=!1){return this.lerp({position:[r,d,m],target:[v,b,S]},{position:[E,T,C],target:[R,x,V]},N,K)}setPosition(r,d,m,v=!1){return this.setLookAt(r,d,m,this._targetEnd.x,this._targetEnd.y,this._targetEnd.z,v)}setTarget(r,d,m,v=!1){const b=this.getPosition(Fe),S=this.setLookAt(b.x,b.y,b.z,r,d,m,v);return this._sphericalEnd.phi=Wa(this._sphericalEnd.phi,this.minPolarAngle,this.maxPolarAngle),S}setFocalOffset(r,d,m,v=!1){this._isUserControllingOffset=!1,this._focalOffsetEnd.set(r,d,m),this._needsUpdate=!0,v||this._focalOffset.copy(this._focalOffsetEnd);const b=!v||gt(this._focalOffset.x,this._focalOffsetEnd.x,this.restThreshold)&&gt(this._focalOffset.y,this._focalOffsetEnd.y,this.restThreshold)&&gt(this._focalOffset.z,this._focalOffsetEnd.z,this.restThreshold);return this._createOnRestPromise(b)}setOrbitPoint(r,d,m){this._camera.updateMatrixWorld(),Gi.setFromMatrixColumn(this._camera.matrixWorldInverse,0),Vi.setFromMatrixColumn(this._camera.matrixWorldInverse,1),Or.setFromMatrixColumn(this._camera.matrixWorldInverse,2);const v=Fe.set(r,d,m),b=v.distanceTo(this._camera.position),S=v.sub(this._camera.position);Gi.multiplyScalar(S.x),Vi.multiplyScalar(S.y),Or.multiplyScalar(S.z),Fe.copy(Gi).add(Vi).add(Or),Fe.z=Fe.z+b,this.dollyTo(b,!1),this.setFocalOffset(-Fe.x,Fe.y,-Fe.z,!1),this.moveTo(r,d,m,!1)}setBoundary(r){if(!r){this._boundary.min.set(-1/0,-1/0,-1/0),this._boundary.max.set(1/0,1/0,1/0),this._needsUpdate=!0;return}this._boundary.copy(r),this._boundary.clampPoint(this._targetEnd,this._targetEnd),this._needsUpdate=!0}setViewport(r,d,m,v){if(r===null){this._viewport=null;return}this._viewport=this._viewport||new Ne.Vector4,typeof r=="number"?this._viewport.set(r,d,m,v):this._viewport.copy(r)}getDistanceToFitBox(r,d,m,v=!1){if(ap(this._camera,"getDistanceToFitBox"))return this._spherical.radius;const b=r/d,S=this._camera.getEffectiveFOV()*kf,E=this._camera.aspect;return((v?b>E:b<E)?d:r/E)*.5/Math.tan(S*.5)+m*.5}getDistanceToFitSphere(r){if(ap(this._camera,"getDistanceToFitSphere"))return this._spherical.radius;const d=this._camera.getEffectiveFOV()*kf,m=Math.atan(Math.tan(d*.5)*this._camera.aspect)*2,v=1<this._camera.aspect?d:m;return r/Math.sin(v*.5)}getTarget(r,d=!0){return(r&&r.isVector3?r:new Ne.Vector3).copy(d?this._targetEnd:this._target)}getPosition(r,d=!0){return(r&&r.isVector3?r:new Ne.Vector3).setFromSpherical(d?this._sphericalEnd:this._spherical).applyQuaternion(this._yAxisUpSpaceInverse).add(d?this._targetEnd:this._target)}getSpherical(r,d=!0){return(r||new Ne.Spherical).copy(d?this._sphericalEnd:this._spherical)}getFocalOffset(r,d=!0){return(r&&r.isVector3?r:new Ne.Vector3).copy(d?this._focalOffsetEnd:this._focalOffset)}normalizeRotations(){return this._sphericalEnd.theta=(this._sphericalEnd.theta%Au+Au)%Au,this._sphericalEnd.theta>Math.PI&&(this._sphericalEnd.theta-=Au),this._spherical.theta+=Au*Math.round((this._sphericalEnd.theta-this._spherical.theta)/Au),this}stop(){this._focalOffset.copy(this._focalOffsetEnd),this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd),this._zoom=this._zoomEnd}reset(r=!1){if(!gt(this._camera.up.x,this._cameraUp0.x)||!gt(this._camera.up.y,this._cameraUp0.y)||!gt(this._camera.up.z,this._cameraUp0.z)){this._camera.up.copy(this._cameraUp0);const m=this.getPosition(Fe);this.updateCameraUp(),this.setPosition(m.x,m.y,m.z)}const d=[this.setLookAt(this._position0.x,this._position0.y,this._position0.z,this._target0.x,this._target0.y,this._target0.z,r),this.setFocalOffset(this._focalOffset0.x,this._focalOffset0.y,this._focalOffset0.z,r),this.zoomTo(this._zoom0,r)];return Promise.all(d)}saveState(){this._cameraUp0.copy(this._camera.up),this.getTarget(this._target0),this.getPosition(this._position0),this._zoom0=this._zoom,this._focalOffset0.copy(this._focalOffset)}updateCameraUp(){this._yAxisUpSpace.setFromUnitVectors(this._camera.up,Zh),this._yAxisUpSpaceInverse.copy(this._yAxisUpSpace).invert()}applyCameraUp(){const r=Fe.subVectors(this._target,this._camera.position).normalize(),d=rt.crossVectors(r,this._camera.up);this._camera.up.crossVectors(d,r).normalize(),this._camera.updateMatrixWorld();const m=this.getPosition(Fe);this.updateCameraUp(),this.setPosition(m.x,m.y,m.z)}update(r){const d=this._sphericalEnd.theta-this._spherical.theta,m=this._sphericalEnd.phi-this._spherical.phi,v=this._sphericalEnd.radius-this._spherical.radius,b=i0.subVectors(this._targetEnd,this._target),S=s0.subVectors(this._focalOffsetEnd,this._focalOffset),E=this._zoomEnd-this._zoom;if(Ut(d))this._thetaVelocity.value=0,this._spherical.theta=this._sphericalEnd.theta;else{const x=this._isUserControllingRotate?this.draggingSmoothTime:this.smoothTime;this._spherical.theta=Yh(this._spherical.theta,this._sphericalEnd.theta,this._thetaVelocity,x,1/0,r),this._needsUpdate=!0}if(Ut(m))this._phiVelocity.value=0,this._spherical.phi=this._sphericalEnd.phi;else{const x=this._isUserControllingRotate?this.draggingSmoothTime:this.smoothTime;this._spherical.phi=Yh(this._spherical.phi,this._sphericalEnd.phi,this._phiVelocity,x,1/0,r),this._needsUpdate=!0}if(Ut(v))this._radiusVelocity.value=0,this._spherical.radius=this._sphericalEnd.radius;else{const x=this._isUserControllingDolly?this.draggingSmoothTime:this.smoothTime;this._spherical.radius=Yh(this._spherical.radius,this._sphericalEnd.radius,this._radiusVelocity,x,this.maxSpeed,r),this._needsUpdate=!0}if(Ut(b.x)&&Ut(b.y)&&Ut(b.z))this._targetVelocity.set(0,0,0),this._target.copy(this._targetEnd);else{const x=this._isUserControllingTruck?this.draggingSmoothTime:this.smoothTime;l0(this._target,this._targetEnd,this._targetVelocity,x,this.maxSpeed,r,this._target),this._needsUpdate=!0}if(Ut(S.x)&&Ut(S.y)&&Ut(S.z))this._focalOffsetVelocity.set(0,0,0),this._focalOffset.copy(this._focalOffsetEnd);else{const x=this._isUserControllingOffset?this.draggingSmoothTime:this.smoothTime;l0(this._focalOffset,this._focalOffsetEnd,this._focalOffsetVelocity,x,this.maxSpeed,r,this._focalOffset),this._needsUpdate=!0}if(Ut(E))this._zoomVelocity.value=0,this._zoom=this._zoomEnd;else{const x=this._isUserControllingZoom?this.draggingSmoothTime:this.smoothTime;this._zoom=Yh(this._zoom,this._zoomEnd,this._zoomVelocity,x,1/0,r)}if(this.dollyToCursor){if(zr(this._camera)&&this._changedDolly!==0){const x=this._spherical.radius-this._lastDistance,V=this._camera,N=this._getCameraDirection(Vf),K=Fe.copy(N).cross(V.up).normalize();K.lengthSq()===0&&(K.x=1);const ee=rt.crossVectors(K,N),le=this._sphericalEnd.radius*Math.tan(V.getEffectiveFOV()*kf*.5),B=(this._sphericalEnd.radius-x-this._sphericalEnd.radius)/this._sphericalEnd.radius,Z=Wo.copy(this._targetEnd).add(K.multiplyScalar(this._dollyControlCoord.x*le*V.aspect)).add(ee.multiplyScalar(this._dollyControlCoord.y*le)),ne=Fe.copy(this._targetEnd).lerp(Z,B),re=this._lastDollyDirection===Jo.IN&&this._spherical.radius<=this.minDistance,ie=this._lastDollyDirection===Jo.OUT&&this.maxDistance<=this._spherical.radius;if(this.infinityDolly&&(re||ie)){this._sphericalEnd.radius-=x,this._spherical.radius-=x;const he=rt.copy(N).multiplyScalar(-x);ne.add(he)}this._boundary.clampPoint(ne,ne);const ce=rt.subVectors(ne,this._targetEnd);this._targetEnd.copy(ne),this._target.add(ce),this._changedDolly-=x,Ut(this._changedDolly)&&(this._changedDolly=0)}else if(Du(this._camera)&&this._changedZoom!==0){const x=this._zoom-this._lastZoom,V=this._camera,N=Fe.set(this._dollyControlCoord.x,this._dollyControlCoord.y,(V.near+V.far)/(V.near-V.far)).unproject(V),K=rt.set(0,0,-1).applyQuaternion(V.quaternion),ee=Wo.copy(N).add(K.multiplyScalar(-N.dot(V.up))),U=-(this._zoom-x-this._zoom)/this._zoom,B=this._getCameraDirection(Vf),Z=this._targetEnd.dot(B),ne=Fe.copy(this._targetEnd).lerp(ee,U),re=ne.dot(B),ie=B.multiplyScalar(re-Z);ne.sub(ie),this._boundary.clampPoint(ne,ne);const ce=rt.subVectors(ne,this._targetEnd);this._targetEnd.copy(ne),this._target.add(ce),this._changedZoom-=x,Ut(this._changedZoom)&&(this._changedZoom=0)}}this._camera.zoom!==this._zoom&&(this._camera.zoom=this._zoom,this._camera.updateProjectionMatrix(),this._updateNearPlaneCorners(),this._needsUpdate=!0),this._dragNeedsUpdate=!0;const T=this._collisionTest();this._spherical.radius=Math.min(this._spherical.radius,T),this._spherical.makeSafe(),this._camera.position.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse).add(this._target),this._camera.lookAt(this._target),(!Ut(this._focalOffset.x)||!Ut(this._focalOffset.y)||!Ut(this._focalOffset.z))&&(this._camera.matrix.compose(this._camera.position,this._camera.quaternion,this._camera.scale),Gi.setFromMatrixColumn(this._camera.matrix,0),Vi.setFromMatrixColumn(this._camera.matrix,1),Or.setFromMatrixColumn(this._camera.matrix,2),Gi.multiplyScalar(this._focalOffset.x),Vi.multiplyScalar(-this._focalOffset.y),Or.multiplyScalar(this._focalOffset.z),Fe.copy(Gi).add(Vi).add(Or),this._camera.position.add(Fe),this._camera.updateMatrixWorld()),this._boundaryEnclosesCamera&&this._encloseToBoundary(this._camera.position.copy(this._target),Fe.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse),1);const R=this._needsUpdate;return R&&!this._updatedLastTime?(this._hasRested=!1,this.dispatchEvent({type:"wake"}),this.dispatchEvent({type:"update"})):R?(this.dispatchEvent({type:"update"}),Ut(d,this.restThreshold)&&Ut(m,this.restThreshold)&&Ut(v,this.restThreshold)&&Ut(b.x,this.restThreshold)&&Ut(b.y,this.restThreshold)&&Ut(b.z,this.restThreshold)&&Ut(S.x,this.restThreshold)&&Ut(S.y,this.restThreshold)&&Ut(S.z,this.restThreshold)&&Ut(E,this.restThreshold)&&!this._hasRested&&(this._hasRested=!0,this.dispatchEvent({type:"rest"}))):!R&&this._updatedLastTime&&this.dispatchEvent({type:"sleep"}),this._lastDistance=this._spherical.radius,this._lastZoom=this._zoom,this._updatedLastTime=R,this._needsUpdate=!1,R}toJSON(){return JSON.stringify({enabled:this._enabled,minDistance:this.minDistance,maxDistance:jf(this.maxDistance),minZoom:this.minZoom,maxZoom:jf(this.maxZoom),minPolarAngle:this.minPolarAngle,maxPolarAngle:jf(this.maxPolarAngle),minAzimuthAngle:jf(this.minAzimuthAngle),maxAzimuthAngle:jf(this.maxAzimuthAngle),smoothTime:this.smoothTime,draggingSmoothTime:this.draggingSmoothTime,dollySpeed:this.dollySpeed,truckSpeed:this.truckSpeed,dollyToCursor:this.dollyToCursor,target:this._targetEnd.toArray(),position:Fe.setFromSpherical(this._sphericalEnd).add(this._targetEnd).toArray(),zoom:this._zoomEnd,focalOffset:this._focalOffsetEnd.toArray(),target0:this._target0.toArray(),position0:this._position0.toArray(),zoom0:this._zoom0,focalOffset0:this._focalOffset0.toArray()})}fromJSON(r,d=!1){const m=JSON.parse(r);this.enabled=m.enabled,this.minDistance=m.minDistance,this.maxDistance=Gf(m.maxDistance),this.minZoom=m.minZoom,this.maxZoom=Gf(m.maxZoom),this.minPolarAngle=m.minPolarAngle,this.maxPolarAngle=Gf(m.maxPolarAngle),this.minAzimuthAngle=Gf(m.minAzimuthAngle),this.maxAzimuthAngle=Gf(m.maxAzimuthAngle),this.smoothTime=m.smoothTime,this.draggingSmoothTime=m.draggingSmoothTime,this.dollySpeed=m.dollySpeed,this.truckSpeed=m.truckSpeed,this.dollyToCursor=m.dollyToCursor,this._target0.fromArray(m.target0),this._position0.fromArray(m.position0),this._zoom0=m.zoom0,this._focalOffset0.fromArray(m.focalOffset0),this.moveTo(m.target[0],m.target[1],m.target[2],d),Wl.setFromVector3(Fe.fromArray(m.position).sub(this._targetEnd).applyQuaternion(this._yAxisUpSpace)),this.rotateTo(Wl.theta,Wl.phi,d),this.dollyTo(Wl.radius,d),this.zoomTo(m.zoom,d),this.setFocalOffset(m.focalOffset[0],m.focalOffset[1],m.focalOffset[2],d),this._needsUpdate=!0}connect(r){if(this._domElement){console.warn("camera-controls is already connected.");return}r.setAttribute("data-camera-controls-version",rb),this._addAllEventListeners(r),this._getClientRect(this._elementRect)}disconnect(){this.cancel(),this._removeAllEventListeners(),this._domElement&&(this._domElement.removeAttribute("data-camera-controls-version"),this._domElement=void 0)}dispose(){this.removeAllEventListeners(),this.disconnect()}_getTargetDirection(r){return r.setFromSpherical(this._spherical).divideScalar(this._spherical.radius).applyQuaternion(this._yAxisUpSpaceInverse)}_getCameraDirection(r){return this._getTargetDirection(r).negate()}_findPointerById(r){return this._activePointers.find(d=>d.pointerId===r)}_findPointerByMouseButton(r){return this._activePointers.find(d=>d.mouseButton===r)}_disposePointer(r){this._activePointers.splice(this._activePointers.indexOf(r),1)}_encloseToBoundary(r,d,m){const v=d.lengthSq();if(v===0)return r;const b=rt.copy(d).add(r),E=this._boundary.clampPoint(b,Wo).sub(b),T=E.lengthSq();if(T===0)return r.add(d);if(T===v)return r;if(m===0)return r.add(d).add(E);{const C=1+m*T/d.dot(E);return r.add(rt.copy(d).multiplyScalar(C)).add(E.multiplyScalar(1-m))}}_updateNearPlaneCorners(){if(zr(this._camera)){const r=this._camera,d=r.near,m=r.getEffectiveFOV()*kf,v=Math.tan(m*.5)*d,b=v*r.aspect;this._nearPlaneCorners[0].set(-b,-v,0),this._nearPlaneCorners[1].set(b,-v,0),this._nearPlaneCorners[2].set(b,v,0),this._nearPlaneCorners[3].set(-b,v,0)}else if(Du(this._camera)){const r=this._camera,d=1/r.zoom,m=r.left*d,v=r.right*d,b=r.top*d,S=r.bottom*d;this._nearPlaneCorners[0].set(m,b,0),this._nearPlaneCorners[1].set(v,b,0),this._nearPlaneCorners[2].set(v,S,0),this._nearPlaneCorners[3].set(m,S,0)}}_truckInternal=(r,d,m,v)=>{let b,S;if(zr(this._camera)){const E=Fe.copy(this._camera.position).sub(this._target),T=this._camera.getEffectiveFOV()*kf,C=E.length()*Math.tan(T*.5);b=this.truckSpeed*r*C/this._elementRect.height,S=this.truckSpeed*d*C/this._elementRect.height}else if(Du(this._camera)){const E=this._camera;b=this.truckSpeed*r*(E.right-E.left)/E.zoom/this._elementRect.width,S=this.truckSpeed*d*(E.top-E.bottom)/E.zoom/this._elementRect.height}else return;v?(m?this.setFocalOffset(this._focalOffsetEnd.x+b,this._focalOffsetEnd.y,this._focalOffsetEnd.z,!0):this.truck(b,0,!0),this.forward(-S,!0)):m?this.setFocalOffset(this._focalOffsetEnd.x+b,this._focalOffsetEnd.y+S,this._focalOffsetEnd.z,!0):this.truck(b,S,!0)};_rotateInternal=(r,d)=>{const m=Au*this.azimuthRotateSpeed*r/this._elementRect.height,v=Au*this.polarRotateSpeed*d/this._elementRect.height;this.rotate(m,v,!0)};_dollyInternal=(r,d,m)=>{const v=Math.pow(.95,-r*this.dollySpeed),b=this._sphericalEnd.radius,S=this._sphericalEnd.radius*v,E=Wa(S,this.minDistance,this.maxDistance),T=E-S;this.infinityDolly&&this.dollyToCursor?this._dollyToNoClamp(S,!0):this.infinityDolly&&!this.dollyToCursor?(this.dollyInFixed(T,!0),this._dollyToNoClamp(E,!0)):this._dollyToNoClamp(E,!0),this.dollyToCursor&&(this._changedDolly+=(this.infinityDolly?S:E)-b,this._dollyControlCoord.set(d,m)),this._lastDollyDirection=Math.sign(-r)};_zoomInternal=(r,d,m)=>{const v=Math.pow(.95,r*this.dollySpeed),b=this._zoom,S=this._zoom*v;this.zoomTo(S,!0),this.dollyToCursor&&(this._changedZoom+=S-b,this._dollyControlCoord.set(d,m))};_collisionTest(){let r=1/0;if(!(this.colliderMeshes.length>=1)||ap(this._camera,"_collisionTest"))return r;const m=this._getTargetDirection(Vf);rp.lookAt(a0,m,this._camera.up);for(let v=0;v<4;v++){const b=rt.copy(this._nearPlaneCorners[v]);b.applyMatrix4(rp);const S=Wo.addVectors(this._target,b);Qh.set(S,m),Qh.far=this._spherical.radius+1;const E=Qh.intersectObjects(this.colliderMeshes);E.length!==0&&E[0].distance<r&&(r=E[0].distance)}return r}_getClientRect(r){if(!this._domElement)return;const d=this._domElement.getBoundingClientRect();return r.x=d.left,r.y=d.top,this._viewport?(r.x+=this._viewport.x,r.y+=d.height-this._viewport.w-this._viewport.y,r.width=this._viewport.z,r.height=this._viewport.w):(r.width=d.width,r.height=d.height),r}_createOnRestPromise(r){return r?Promise.resolve():(this._hasRested=!1,this.dispatchEvent({type:"transitionstart"}),new Promise(d=>{const m=()=>{this.removeEventListener("rest",m),d()};this.addEventListener("rest",m)}))}_addAllEventListeners(r){}_removeAllEventListeners(){}get dampingFactor(){return console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead."),0}set dampingFactor(r){console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead.")}get draggingDampingFactor(){return console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead."),0}set draggingDampingFactor(r){console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead.")}static createBoundingSphere(r,d=new Ne.Sphere){const m=d,v=m.center;tc.makeEmpty(),r.traverseVisible(S=>{S.isMesh&&tc.expandByObject(S)}),tc.getCenter(v);let b=0;return r.traverseVisible(S=>{if(!S.isMesh)return;const E=S;if(!E.geometry)return;const T=E.geometry.clone();T.applyMatrix4(E.matrixWorld);const R=T.attributes.position;for(let x=0,V=R.count;x<V;x++)Fe.fromBufferAttribute(R,x),b=Math.max(b,v.distanceToSquared(Fe))}),m.radius=Math.sqrt(b),m}};const bb=J.forwardRef((u,r)=>{const{impl:d,camera:m,domElement:v,makeDefault:b,onControlStart:S,onControl:E,onControlEnd:T,onTransitionStart:C,onUpdate:R,onWake:x,onRest:V,onSleep:N,onStart:K,onEnd:ee,onChange:le,regress:U,...B}=u,Z=d??cb;J.useMemo(()=>{const ue={Box3:Wg,MathUtils:{clamp:Jg.clamp},Matrix4:$g,Quaternion:Pg,Raycaster:c0,Sphere:Kg,Spherical:p0,Vector2:wn,Vector3:Fi,Vector4:fp};Z.install({THREE:ue}),Up({CameraControlsImpl:Z})},[Z]);const ne=ei(ue=>ue.camera),re=ei(ue=>ue.gl),ie=ei(ue=>ue.invalidate),ce=ei(ue=>ue.events),he=ei(ue=>ue.setEvents),se=ei(ue=>ue.set),Ee=ei(ue=>ue.get),Se=ei(ue=>ue.performance),Pe=m||ne,ve=v||ce.connected||re.domElement,be=J.useMemo(()=>new Z(Pe),[Z,Pe]);return im((ue,q)=>{be.update(q)},-1),J.useEffect(()=>(be.connect(ve),()=>void be.disconnect()),[ve,be]),J.useEffect(()=>{function ue(){ie(),U&&Se.regress()}const q=fe=>{ue(),S?.(fe),K?.(fe)},W=fe=>{ue(),E?.(fe),le?.(fe)},me=fe=>{T?.(fe),ee?.(fe)},Te=fe=>{ue(),C?.(fe),le?.(fe)},De=fe=>{ue(),R?.(fe),le?.(fe)},Me=fe=>{ue(),x?.(fe),le?.(fe)},ye=fe=>{V?.(fe)},_e=fe=>{N?.(fe)};return be.addEventListener("controlstart",q),be.addEventListener("control",W),be.addEventListener("controlend",me),be.addEventListener("transitionstart",Te),be.addEventListener("update",De),be.addEventListener("wake",Me),be.addEventListener("rest",ye),be.addEventListener("sleep",_e),()=>{be.removeEventListener("controlstart",q),be.removeEventListener("control",W),be.removeEventListener("controlend",me),be.removeEventListener("transitionstart",Te),be.removeEventListener("update",De),be.removeEventListener("wake",Me),be.removeEventListener("rest",ye),be.removeEventListener("sleep",_e)}},[be,ie,he,U,Se,S,E,T,C,R,x,V,N,le,K,ee]),J.useEffect(()=>{if(b){const ue=Ee().controls;return se({controls:be}),()=>se({controls:ue})}},[b,be]),J.createElement("primitive",tm({ref:r,object:be},B))});class fb extends Yi{constructor(){super({uniforms:{time:{value:0},fade:{value:1}},vertexShader:`
314
+ uniform float time;
315
+ attribute float size;
316
+ varying vec3 vColor;
317
+ void main() {
318
+ vColor = color;
319
+ vec4 mvPosition = modelViewMatrix * vec4(position, 0.5);
320
+ gl_PointSize = size * (30.0 / -mvPosition.z) * (3.0 + sin(time + 100.0));
321
+ gl_Position = projectionMatrix * mvPosition;
322
+ }`,fragmentShader:`
323
+ uniform sampler2D pointTexture;
324
+ uniform float fade;
325
+ varying vec3 vColor;
326
+ void main() {
327
+ float opacity = 1.0;
328
+ if (fade == 1.0) {
329
+ float d = distance(gl_PointCoord, vec2(0.5, 0.5));
330
+ opacity = 1.0 / (1.0 + exp(16.0 * (d - 0.25)));
331
+ }
332
+ gl_FragColor = vec4(vColor, opacity);
333
+
334
+ #include <tonemapping_fragment>
335
+ #include <${sb>=154?"colorspace_fragment":"encodings_fragment"}>
336
+ }`})}}const db=u=>new Fi().setFromSpherical(new p0(u,Math.acos(1-Math.random()*2),Math.random()*2*Math.PI)),Sb=J.forwardRef(({radius:u=100,depth:r=50,count:d=5e3,saturation:m=0,factor:v=4,fade:b=!1,speed:S=1},E)=>{const T=J.useRef(null),[C,R,x]=J.useMemo(()=>{const N=[],K=[],ee=Array.from({length:d},()=>(.5+.5*Math.random())*v),le=new am;let U=u+r;const B=r/d;for(let Z=0;Z<d;Z++)U-=B*Math.random(),N.push(...db(U).toArray()),le.setHSL(Z/d,m,.9),K.push(le.r,le.g,le.b);return[new Float32Array(N),new Float32Array(K),new Float32Array(ee)]},[d,r,v,u,m]);im(N=>T.current&&(T.current.uniforms.time.value=N.clock.elapsedTime*S));const[V]=J.useState(()=>new fb);return J.createElement("points",{ref:E},J.createElement("bufferGeometry",null,J.createElement("bufferAttribute",{attach:"attributes-position",args:[C,3]}),J.createElement("bufferAttribute",{attach:"attributes-color",args:[R,3]}),J.createElement("bufferAttribute",{attach:"attributes-size",args:[x,1]})),J.createElement("primitive",{ref:T,object:V,attach:"material",blending:e1,"uniforms-fade-value":b,depthWrite:!1,transparent:!0,vertexColors:!0}))});export{bb as C,_b as H,gb as N,Sb as S,yb as Y,ei as a,vb as b,a1 as c,im as u};